i18next-phrase-in-context-editor-post-processor
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,8 @@ | ||
## [1.1.1](https://github.com/phrase/i18next-phrase-in-context-editor-post-processor/compare/v1.1.0...v1.1.1) (2021-01-07) | ||
### Bug Fixes | ||
* server-side-rendering works with next.js ([#14](https://github.com/phrase/i18next-phrase-in-context-editor-post-processor/issues/14)) ([7cd9ad6](https://github.com/phrase/i18next-phrase-in-context-editor-post-processor/commit/7cd9ad6136d0bb9a517a64e7677e2c870dfece25)) | ||
# [1.1.0](https://github.com/phrase/i18next-phrase-in-context-editor-post-processor/compare/v1.0.0...v1.1.0) (2020-07-20) | ||
@@ -2,0 +9,0 @@ |
@@ -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(){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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=r.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},r.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(n.prototype,i),o&&t(n,o),r}();r.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0},module.exports=r; | ||
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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=r.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},r.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(n.prototype,i),o&&t(n,o),r}();r.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0},module.exports=r; | ||
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.js.map |
@@ -1,2 +0,2 @@ | ||
import"@sagi.io/globalthis";class t{constructor(t){this.type="postProcessor",this.name="phraseInContextEditor",this.config={...globalThis.PHRASEAPP_CONFIG,...t},this.phraseEnabled=t.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,s){return e+"phrase_"+t+s}static loadInContextEditorScript(){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(e){return t.interpolateKey(e,this.config.prefix,this.config.suffix)}process(t,e,s,i){return this.phraseEnabled?this.interpolateKey(e[0]):t}set phraseEnabled(e){globalThis.PHRASEAPP_ENABLED=e,e&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=t.loadInContextEditorScript())}get phraseEnabled(){return globalThis.PHRASEAPP_ENABLED}set config(e){globalThis.PHRASEAPP_CONFIG={...t.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="${t.IN_CONTEXT_EDITOR_SCRIPT_URL}"><\/script>`}}t.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default t; | ||
import"@sagi.io/globalthis";class t{constructor(t){this.type="postProcessor",this.name="phraseInContextEditor",this.config={...globalThis.PHRASEAPP_CONFIG,...t},this.phraseEnabled=t.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,i){return e+"phrase_"+t+i}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(e){return t.interpolateKey(e,this.config.prefix,this.config.suffix)}process(t,e,i,s){return this.phraseEnabled?this.interpolateKey(e[0]):t}set phraseEnabled(e){globalThis.PHRASEAPP_ENABLED=e,e&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=t.loadInContextEditorScript())}get phraseEnabled(){return globalThis.PHRASEAPP_ENABLED}set config(e){globalThis.PHRASEAPP_CONFIG={...t.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="${t.IN_CONTEXT_EDITOR_SCRIPT_URL}"><\/script>`}}t.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default t; | ||
//# 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 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)}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(){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,a=r.prototype;return a.interpolateKey=function(t){return r.interpolateKey(t,this.config.prefix,this.config.suffix)},a.process=function(t,e,r,n){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="'+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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=r.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},r.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(n.prototype,i),o&&t(n,o),r}();r.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default r; | ||
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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=n.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},n.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(r.prototype,i),o&&t(r,o),n}();n.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0};export default n; | ||
//# 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 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(){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,s=n.prototype;return s.interpolateKey=function(t){return n.interpolateKey(t,this.config.prefix,this.config.suffix)},s.process=function(t,e,n,r){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>'},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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=n.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},n.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(r.prototype,i),o&&t(r,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(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",set:function(t){globalThis.PHRASEAPP_ENABLED=t,t&&this.config.scriptAutoLoad&&!this.phraseScript&&(this.phraseScript=n.loadInContextEditorScript())},get:function(){return globalThis.PHRASEAPP_ENABLED}},{key:"config",set:function(t){globalThis.PHRASEAPP_CONFIG=e({},n.defaultConfig,t)},get:function(){return globalThis.PHRASEAPP_CONFIG}}])&&t(i.prototype,r),o&&t(i,o),n}();return n.defaultConfig={prefix:"{{__",suffix:"__}}",fullReparse:!0,scriptAutoLoad:!0},n}); | ||
//# sourceMappingURL=i18next-phrase-in-context-editor-post-processor.umd.js.map |
@@ -11,3 +11,3 @@ import '@sagi.io/globalthis'; | ||
static interpolateKey(key: string, prefix: string, suffix: string): string; | ||
static loadInContextEditorScript(): HTMLScriptElement; | ||
static loadInContextEditorScript(): HTMLScriptElement | undefined; | ||
type: 'postProcessor'; | ||
@@ -14,0 +14,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.1.0", | ||
"version": "1.1.1", | ||
"source": "index.ts", | ||
@@ -11,2 +11,3 @@ "main": "dist/i18next-phrase-in-context-editor-post-processor.js", | ||
"types": "dist/index.d.ts", | ||
"repository": "https://github.com/phrase/i18next-phrase-in-context-editor-post-processor.git", | ||
"author": "Jakub Freisler <jakubfreisler@phrase.com>", | ||
@@ -40,3 +41,3 @@ "license": "MIT", | ||
"eslint-config-phrase": "https://github.com/phrase/eslint-config-phrase.git", | ||
"i18next": "^19.5.1", | ||
"i18next": "^19.6.3", | ||
"jest": "^26.1.0", | ||
@@ -43,0 +44,0 @@ "microbundle": "^0.12.2", |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
40854