Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18next-phrase-in-context-editor-post-processor

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-phrase-in-context-editor-post-processor - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

dist/i18next-phrase-in-context-editor-post-processor.js

@@ -1,2 +0,2 @@

function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}require("@sagi.io/globalthis");var r=function(){function r(t){this.type="postProcessor",this.name="phraseInContextEditor",this.config=e({},globalThis.PHRASEAPP_CONFIG,t),this.phraseEnabled=t.phraseEnabled}r.interpolateKey=function(t,e,r){return e+"phrase_"+t+r},r.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}};var n,i,o,s=r.prototype;return s.interpolateKey=function(t){return r.interpolateKey(t,this.config.prefix,this.config.suffix)},s.process=function(t,e,r,n){return this.phraseEnabled?this.interpolateKey(e[0]):t},s.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+r.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},n=r,o=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime()}}],(i=[{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=r.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(t){globalThis.PHRASEAPP_CONFIG=e({},r.defaultConfig,t)}}])&&t(n.prototype,i),o&&t(n,o),r}();r.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0},module.exports=r;
function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}require("@sagi.io/globalthis"),module.exports=function(){function e(e){this.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,useOldICE:!0,scriptAutoLoad:!0},this.type="postProcessor",this.name="phraseInContextEditor",this.config=t({},globalThis.PHRASEAPP_CONFIG,e),this.phraseEnabled=e.phraseEnabled}e.interpolateKey=function(t,e,i){return e+"phrase_"+t+i};var i,n=e.prototype;return n.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type=this.config.useOldICE?"text/javascript":"module",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}},n.interpolateKey=function(t){return e.interpolateKey(t,this.config.prefix,this.config.suffix)},n.process=function(t,e,i,n){return this.phraseEnabled?this.interpolateKey(e[0]):t},n.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+this.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},(i=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return this.config.useOldICE?"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime():"https://d2bgdldl6xit7z.cloudfront.net/latest/ice/index.js"}},{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=this.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(e){globalThis.PHRASEAPP_CONFIG=t({},this.defaultConfig,e)}}])&&function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,i),e}();
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.js.map

@@ -1,2 +0,2 @@

import"@sagi.io/globalthis";function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}class e{constructor(e){this.type="postProcessor",this.name="phraseInContextEditor",this.config=t({},globalThis.PHRASEAPP_CONFIG,e),this.phraseEnabled=e.phraseEnabled}static get IN_CONTEXT_EDITOR_SCRIPT_URL(){return"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime()}static interpolateKey(t,e,r){return e+"phrase_"+t+r}static loadInContextEditorScript(){if("undefined"!=typeof window){const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;const e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}}interpolateKey(t){return e.interpolateKey(t,this.config.prefix,this.config.suffix)}process(t,e,r,i){return this.phraseEnabled?this.interpolateKey(e[0]):t}set phraseEnabled(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=e.loadInContextEditorScript())}get phraseEnabled(){return globalThis.PHRASEAPP_ENABLED}set config(r){globalThis.PHRASEAPP_CONFIG=t({},e.defaultConfig,r)}get config(){return globalThis.PHRASEAPP_CONFIG}toScriptHTML(){return`<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG=${JSON.stringify(this.config)}<\/script><script type="text/javascript" async src="${e.IN_CONTEXT_EDITOR_SCRIPT_URL}"><\/script>`}}e.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default e;
import"@sagi.io/globalthis";function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t}).apply(this,arguments)}class e{constructor(e){this.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,useOldICE:!0,scriptAutoLoad:!0},this.type="postProcessor",this.name="phraseInContextEditor",this.config=t({},globalThis.PHRASEAPP_CONFIG,e),this.phraseEnabled=e.phraseEnabled}get IN_CONTEXT_EDITOR_SCRIPT_URL(){return this.config.useOldICE?"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime():"https://d2bgdldl6xit7z.cloudfront.net/latest/ice/index.js"}static interpolateKey(t,e,i){return e+"phrase_"+t+i}loadInContextEditorScript(){if("undefined"!=typeof window){const t=document.createElement("script");t.type=this.config.useOldICE?"text/javascript":"module",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;const e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}}interpolateKey(t){return e.interpolateKey(t,this.config.prefix,this.config.suffix)}process(t,e,i,s){return this.phraseEnabled?this.interpolateKey(e[0]):t}set phraseEnabled(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=this.loadInContextEditorScript())}get phraseEnabled(){return globalThis.PHRASEAPP_ENABLED}set config(e){globalThis.PHRASEAPP_CONFIG=t({},this.defaultConfig,e)}get config(){return globalThis.PHRASEAPP_CONFIG}toScriptHTML(){return`<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG=${JSON.stringify(this.config)}<\/script><script type="text/javascript" async src="${this.IN_CONTEXT_EDITOR_SCRIPT_URL}"><\/script>`}}export default e;
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.modern.js.map

@@ -1,2 +0,2 @@

import"@sagi.io/globalthis";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var n=function(){function n(t){this.type="postProcessor",this.name="phraseInContextEditor",this.config=e({},globalThis.PHRASEAPP_CONFIG,t),this.phraseEnabled=t.phraseEnabled}n.interpolateKey=function(t,e,n){return e+"phrase_"+t+n},n.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}};var r,i,o,a=n.prototype;return a.interpolateKey=function(t){return n.interpolateKey(t,this.config.prefix,this.config.suffix)},a.process=function(t,e,n,r){return this.phraseEnabled?this.interpolateKey(e[0]):t},a.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+n.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},r=n,o=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime()}}],(i=[{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=n.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(t){globalThis.PHRASEAPP_CONFIG=e({},n.defaultConfig,t)}}])&&t(r.prototype,i),o&&t(r,o),n}();n.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default n;
import"@sagi.io/globalthis";function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}var e=function(){function e(e){this.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,useOldICE:!0,scriptAutoLoad:!0},this.type="postProcessor",this.name="phraseInContextEditor",this.config=t({},globalThis.PHRASEAPP_CONFIG,e),this.phraseEnabled=e.phraseEnabled}e.interpolateKey=function(t,e,i){return e+"phrase_"+t+i};var i,n=e.prototype;return n.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type=this.config.useOldICE?"text/javascript":"module",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}},n.interpolateKey=function(t){return e.interpolateKey(t,this.config.prefix,this.config.suffix)},n.process=function(t,e,i,n){return this.phraseEnabled?this.interpolateKey(e[0]):t},n.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+this.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},(i=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return this.config.useOldICE?"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime():"https://d2bgdldl6xit7z.cloudfront.net/latest/ice/index.js"}},{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=this.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(e){globalThis.PHRASEAPP_CONFIG=t({},this.defaultConfig,e)}}])&&function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,i),e}();export default e;
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.module.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@sagi.io/globalthis")):"function"==typeof define&&define.amd?define(["@sagi.io/globalthis"],e):(t=t||self).i18NextPhraseInContextEditorPostProcessor=e()}(this,function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var n=function(){function n(t){this.type="postProcessor",this.name="phraseInContextEditor",this.config=e({},globalThis.PHRASEAPP_CONFIG,t),this.phraseEnabled=t.phraseEnabled}n.interpolateKey=function(t,e,n){return e+"phrase_"+t+n},n.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}};var i,r,o,s=n.prototype;return s.interpolateKey=function(t){return n.interpolateKey(t,this.config.prefix,this.config.suffix)},s.process=function(t,e,n,i){return this.phraseEnabled?this.interpolateKey(e[0]):t},s.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+n.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},i=n,o=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime()}}],(r=[{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=n.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(t){globalThis.PHRASEAPP_CONFIG=e({},n.defaultConfig,t)}}])&&t(i.prototype,r),o&&t(i,o),n}();return n.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0},n});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@sagi.io/globalthis")):"function"==typeof define&&define.amd?define(["@sagi.io/globalthis"],e):(t=t||self).i18NextPhraseInContextEditorPostProcessor=e()}(this,function(){function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}return function(){function e(e){this.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,useOldICE:!0,scriptAutoLoad:!0},this.type="postProcessor",this.name="phraseInContextEditor",this.config=t({},globalThis.PHRASEAPP_CONFIG,e),this.phraseEnabled=e.phraseEnabled}e.interpolateKey=function(t,e,i){return e+"phrase_"+t+i};var i,n=e.prototype;return n.loadInContextEditorScript=function(){if("undefined"!=typeof window){var t=document.createElement("script");t.type=this.config.useOldICE?"text/javascript":"module",t.async=!0,t.src=this.IN_CONTEXT_EDITOR_SCRIPT_URL;var e=document.getElementsByTagName("script")[0];return e&&e.parentNode?e.parentNode.insertBefore(t,e):document.body.appendChild(t),t}},n.interpolateKey=function(t){return e.interpolateKey(t,this.config.prefix,this.config.suffix)},n.process=function(t,e,i,n){return this.phraseEnabled?this.interpolateKey(e[0]):t},n.toScriptHTML=function(){return"<script>window.PHRASEAPP_ENABLED=true;window.PHRASEAPP_CONFIG="+JSON.stringify(this.config)+'<\/script><script type="text/javascript" async src="'+this.IN_CONTEXT_EDITOR_SCRIPT_URL+'"><\/script>'},(i=[{key:"IN_CONTEXT_EDITOR_SCRIPT_URL",get:function(){return this.config.useOldICE?"https://phrase.com/assets/in-context-editor/2.0/app.js?"+(new Date).getTime():"https://d2bgdldl6xit7z.cloudfront.net/latest/ice/index.js"}},{key:"phraseEnabled",get:function(){return globalThis.PHRASEAPP_ENABLED},set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=this.loadInContextEditorScript())}},{key:"config",get:function(){return globalThis.PHRASEAPP_CONFIG},set:function(e){globalThis.PHRASEAPP_CONFIG=t({},this.defaultConfig,e)}}])&&function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,i),e}()});
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.umd.js.map

@@ -14,2 +14,4 @@ export declare type PhraseConfig = {

projectId: string;
accountId: string;
useOldICE: boolean;
branch: string;

@@ -16,0 +18,0 @@ ajaxObserver: boolean;

@@ -8,7 +8,7 @@ import '@sagi.io/globalthis';

export default class PhraseInContextEditorPostProcessor {
private static defaultConfig;
private phraseScript?;
static get IN_CONTEXT_EDITOR_SCRIPT_URL(): string;
private defaultConfig;
phraseScript?: HTMLScriptElement;
get IN_CONTEXT_EDITOR_SCRIPT_URL(): string;
static interpolateKey(key: string, prefix: string, suffix: string): string;
static loadInContextEditorScript(): HTMLScriptElement | undefined;
loadInContextEditorScript(): HTMLScriptElement | undefined;
type: 'postProcessor';

@@ -15,0 +15,0 @@ name: string;

{
"name": "i18next-phrase-in-context-editor-post-processor",
"description": "Plugin for i18next that paires well with Phrase In-Context Editor",
"version": "1.3.0",
"version": "1.4.0",
"source": "index.ts",

@@ -6,0 +6,0 @@ "main": "dist/i18next-phrase-in-context-editor-post-processor.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc