@amcharts/editor4
Advanced tools
Comparing version 4.0.0-beta.1 to 4.0.0-beta.2
{ | ||
"files": { | ||
"main.css": "./static/css/main.c1f9af79.chunk.css", | ||
"main.js": "./static/js/main.37efb211.chunk.js", | ||
"main.js.map": "./static/js/main.37efb211.chunk.js.map", | ||
"main.js": "./static/js/main.6016fb81.chunk.js", | ||
"main.js.map": "./static/js/main.6016fb81.chunk.js.map", | ||
"runtime-main.js": "./static/js/runtime-main.1c5b1033.js", | ||
@@ -22,3 +22,3 @@ "runtime-main.js.map": "./static/js/runtime-main.1c5b1033.js.map", | ||
"index.html": "./index.html", | ||
"precache-manifest.a6000f6b93ca018ecd98e6489fd07dc6.js": "./precache-manifest.a6000f6b93ca018ecd98e6489fd07dc6.js", | ||
"precache-manifest.edab4ba96fd180b171b71f848d5da847.js": "./precache-manifest.edab4ba96fd180b171b71f848d5da847.js", | ||
"service-worker.js": "./service-worker.js", | ||
@@ -62,4 +62,4 @@ "static/css/3.da134b6e.chunk.css.map": "./static/css/3.da134b6e.chunk.css.map", | ||
"static/css/main.c1f9af79.chunk.css", | ||
"static/js/main.37efb211.chunk.js" | ||
"static/js/main.6016fb81.chunk.js" | ||
] | ||
} |
@@ -17,3 +17,3 @@ /** | ||
importScripts( | ||
"./precache-manifest.a6000f6b93ca018ecd98e6489fd07dc6.js" | ||
"./precache-manifest.edab4ba96fd180b171b71f848d5da847.js" | ||
); | ||
@@ -20,0 +20,0 @@ |
@@ -126,2 +126,20 @@ /** | ||
interface ITranslationBlock { | ||
[key: string]: string; | ||
} | ||
interface ITranslationPack { | ||
ui: ITranslationBlock; | ||
common: ITranslationBlock; | ||
properties: ITranslationBlock; | ||
} | ||
declare class Language { | ||
private fallbackTranslations; | ||
private _translations?; | ||
private locale?; | ||
translations: ITranslationPack; | ||
private getTranslation; | ||
getUiTranslation(id: string, fallback?: string): string; | ||
getLabel(id: string, fallback?: string): string; | ||
} | ||
/** | ||
@@ -167,2 +185,6 @@ * Editor modules. | ||
editorLicense?: string; | ||
/** | ||
* Translation prompts. | ||
*/ | ||
language?: ITranslationPack; | ||
} | ||
@@ -247,2 +269,2 @@ /** | ||
export { EditorLauncher, IConfig, IEngineConfig, ILauncherConfig, ILauncherEventArguments, ILauncherTarget, IPresetData, ITemplate, ITemplateGroup, IThemeInfo, LauncherEventHandler, LauncherEventType, ModuleType }; | ||
export { EditorLauncher, IConfig, IEngineConfig, ILauncherConfig, ILauncherEventArguments, ILauncherTarget, IPresetData, ITemplate, ITemplateGroup, IThemeInfo, ITranslationBlock, ITranslationPack, Language, LauncherEventHandler, LauncherEventType, ModuleType }; |
@@ -1,2 +0,2 @@ | ||
var e=function(){function e(e){var t=this;this._config={editorUrl:"/am4editor/",target:{type:"inline"}},this._editorConfig={},this.eventHanlders=new Map([["save",[]],["close",[]]]),this.addLicense=function(e){t._editorLicense=e},this.launch=function(e){switch(window.addEventListener("message",t.editorMessageHandler,!1),t._editorConfig.chartConfig=void 0!==e?e:void 0,t.target.type){case"inline":t.target.target?t.target.target instanceof HTMLElement||(t.target.target=document.getElementById(t.target.target.toString())):(t.editorHostDiv=document.createElement("div"),t.editorHostDiv.style.position="absolute",t.editorHostDiv.style.top="0px",t.editorHostDiv.style.left="0px",t.editorHostDiv.style.width="100vw",t.editorHostDiv.style.height="100vh",t.editorHostDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",t.editorHostDiv.style.zIndex="1000",t.editorHostDiv.style.display="flex",document.body.appendChild(t.editorHostDiv),t.target.target=t.editorHostDiv),t.editorIFrame=document.createElement("iframe"),t.editorIFrame.style.display="flex",t.editorIFrame.style.flexGrow="2",void 0!==t.editorHostDiv&&(t.editorIFrame.style.margin="30px",t.editorIFrame.style.border="0px"),t.editorIFrame.src=t._config.editorUrl,t.target.target.appendChild(t.editorIFrame),t.editorWindow=t.editorIFrame.contentWindow;break;case"window":default:t.editorWindow=window.open(t._config.editorUrl,void 0!==t.target.target?t.target.target.toString():"_blank",t.target.windowFeatures)}},this.editorMessageHandler=function(e){e.source===t.editorWindow&&("amcharts4-editor-loaded"===e.data?(void 0!==t._editorLicense&&void 0!==t.editorConfig&&void 0===t.editorConfig.editorLicense&&(t.editorConfig.editorLicense=t._editorLicense),t.editorWindow.postMessage({messageType:"amcharts4-editor-message",config:t.editorConfig},"*")):"amcharts4-editor-result"===e.data.messageType?t.handleEvent("save",{chartConfig:e.data.config,appliedThemes:e.data.appliedThemes,appliedLicenses:e.data.licenseNumbers}):"amcharts4-editor-cancel"===e.data.messageType&&t.handleEvent("close"))},this.close=function(){t.target&&t.target.type&&"window"===t.target.type?t.editorWindow&&t.editorWindow.close():t.target&&t.target.type&&"inline"===t.target.type&&t.editorIFrame&&t.target.target instanceof HTMLElement&&(t.target.target.removeChild(t.editorIFrame),void 0!==t.editorHostDiv&&(document.body.removeChild(t.editorHostDiv),t.editorHostDiv=void 0,t.target.target=void 0)),window.removeEventListener("message",t.editorMessageHandler,!1)},this.addEventListener=function(e,i){t.eventHanlders.get(e).push(i)},this.removeEventListener=function(e,i){var o=t.eventHanlders.get(e),r=o.findIndex(function(e){return e===i});r>-1&&o.splice(r,1)},this.handleEvent=function(e,i){var o=t.eventHanlders.get(e);void 0!==o&&o.forEach(function(e){return e(i)})},void 0!==e&&(this._config=e,void 0===this._config.target&&(this._config.target={type:"inline"}),void 0===this._config.editorUrl&&(this._config.editorUrl="/am4editor/"))}return Object.defineProperty(e.prototype,"editorUrl",{get:function(){return this._config.editorUrl},set:function(e){this._config.editorUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._config.target},set:function(e){this._config.target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"editorConfig",{get:function(){return this._editorConfig},set:function(e){this._editorConfig=e},enumerable:!0,configurable:!0}),e}();export{e as EditorLauncher}; | ||
var t=function(){function t(t){var e=this;this._config={editorUrl:"/am4editor/",target:{type:"inline"}},this._editorConfig={},this.eventHanlders=new Map([["save",[]],["close",[]]]),this.addLicense=function(t){e._editorLicense=t},this.launch=function(t){switch(window.addEventListener("message",e.editorMessageHandler,!1),e._editorConfig.chartConfig=void 0!==t?t:void 0,e.target.type){case"inline":e.target.target?e.target.target instanceof HTMLElement||(e.target.target=document.getElementById(e.target.target.toString())):(e.editorHostDiv=document.createElement("div"),e.editorHostDiv.style.position="absolute",e.editorHostDiv.style.top="0px",e.editorHostDiv.style.left="0px",e.editorHostDiv.style.width="100vw",e.editorHostDiv.style.height="100vh",e.editorHostDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",e.editorHostDiv.style.zIndex="1000",e.editorHostDiv.style.display="flex",document.body.appendChild(e.editorHostDiv),e.target.target=e.editorHostDiv),e.editorIFrame=document.createElement("iframe"),e.editorIFrame.style.display="flex",e.editorIFrame.style.flexGrow="2",void 0!==e.editorHostDiv&&(e.editorIFrame.style.margin="30px",e.editorIFrame.style.border="0px"),e.editorIFrame.src=e._config.editorUrl,e.target.target.appendChild(e.editorIFrame),e.editorWindow=e.editorIFrame.contentWindow;break;case"window":default:e.editorWindow=window.open(e._config.editorUrl,void 0!==e.target.target?e.target.target.toString():"_blank",e.target.windowFeatures)}},this.editorMessageHandler=function(t){t.source===e.editorWindow&&("amcharts4-editor-loaded"===t.data?(void 0!==e._editorLicense&&void 0!==e.editorConfig&&void 0===e.editorConfig.editorLicense&&(e.editorConfig.editorLicense=e._editorLicense),e.editorWindow.postMessage({messageType:"amcharts4-editor-message",config:e.editorConfig},"*")):"amcharts4-editor-result"===t.data.messageType?e.handleEvent("save",{chartConfig:t.data.config,appliedThemes:t.data.appliedThemes,appliedLicenses:t.data.licenseNumbers}):"amcharts4-editor-cancel"===t.data.messageType&&e.handleEvent("close"))},this.close=function(){e.target&&e.target.type&&"window"===e.target.type?e.editorWindow&&e.editorWindow.close():e.target&&e.target.type&&"inline"===e.target.type&&e.editorIFrame&&e.target.target instanceof HTMLElement&&(e.target.target.removeChild(e.editorIFrame),void 0!==e.editorHostDiv&&(document.body.removeChild(e.editorHostDiv),e.editorHostDiv=void 0,e.target.target=void 0)),window.removeEventListener("message",e.editorMessageHandler,!1)},this.addEventListener=function(t,i){e.eventHanlders.get(t).push(i)},this.removeEventListener=function(t,i){var o=e.eventHanlders.get(t),r=o.findIndex(function(t){return t===i});r>-1&&o.splice(r,1)},this.handleEvent=function(t,i){var o=e.eventHanlders.get(t);void 0!==o&&o.forEach(function(t){return t(i)})},void 0!==t&&(this._config=t,void 0===this._config.target&&(this._config.target={type:"inline"}),void 0===this._config.editorUrl&&(this._config.editorUrl="/am4editor/"))}return Object.defineProperty(t.prototype,"editorUrl",{get:function(){return this._config.editorUrl},set:function(t){this._config.editorUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._config.target},set:function(t){this._config.target=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"editorConfig",{get:function(){return this._editorConfig},set:function(t){this._editorConfig=t},enumerable:!0,configurable:!0}),t}(),e={ui:{"module_bar.design":"Design"},common:{width:"Width zzz"},properties:{"Label.text":"Text"}},i=function(){function t(){this.fallbackTranslations=e}return Object.defineProperty(t.prototype,"translations",{set:function(t){this._translations=t},enumerable:!0,configurable:!0}),t.prototype.getTranslation=function(t,e,i){return i&&Object.keys(i).includes(t)?i[t]:Object.keys(e).includes(t)?e[t]:void 0},t.prototype.getUiTranslation=function(t,e){var i=this.getTranslation(t,this.fallbackTranslations.ui,this._translations?this._translations.ui:void 0);return void 0!==i?i:void 0!==e?e:t},t.prototype.getLabel=function(t,e){var i=this.getTranslation(t,this.fallbackTranslations.properties,this._translations?this._translations.properties:void 0);return void 0===i&&t.includes(".")&&(i=this.getTranslation(t.substr(t.indexOf(".")+1),this.fallbackTranslations.common,this._translations?this._translations.common:void 0)),void 0!==i?i:void 0!==e?e:t},t}();export{t as EditorLauncher,i as Language}; | ||
//# sourceMappingURL=editor.esm.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).am4editor={})}(this,function(e){"use strict";var t=function(){function e(e){var t=this;this._config={editorUrl:"/am4editor/",target:{type:"inline"}},this._editorConfig={},this.eventHanlders=new Map([["save",[]],["close",[]]]),this.addLicense=function(e){t._editorLicense=e},this.launch=function(e){switch(window.addEventListener("message",t.editorMessageHandler,!1),t._editorConfig.chartConfig=void 0!==e?e:void 0,t.target.type){case"inline":t.target.target?t.target.target instanceof HTMLElement||(t.target.target=document.getElementById(t.target.target.toString())):(t.editorHostDiv=document.createElement("div"),t.editorHostDiv.style.position="absolute",t.editorHostDiv.style.top="0px",t.editorHostDiv.style.left="0px",t.editorHostDiv.style.width="100vw",t.editorHostDiv.style.height="100vh",t.editorHostDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",t.editorHostDiv.style.zIndex="1000",t.editorHostDiv.style.display="flex",document.body.appendChild(t.editorHostDiv),t.target.target=t.editorHostDiv),t.editorIFrame=document.createElement("iframe"),t.editorIFrame.style.display="flex",t.editorIFrame.style.flexGrow="2",void 0!==t.editorHostDiv&&(t.editorIFrame.style.margin="30px",t.editorIFrame.style.border="0px"),t.editorIFrame.src=t._config.editorUrl,t.target.target.appendChild(t.editorIFrame),t.editorWindow=t.editorIFrame.contentWindow;break;case"window":default:t.editorWindow=window.open(t._config.editorUrl,void 0!==t.target.target?t.target.target.toString():"_blank",t.target.windowFeatures)}},this.editorMessageHandler=function(e){e.source===t.editorWindow&&("amcharts4-editor-loaded"===e.data?(void 0!==t._editorLicense&&void 0!==t.editorConfig&&void 0===t.editorConfig.editorLicense&&(t.editorConfig.editorLicense=t._editorLicense),t.editorWindow.postMessage({messageType:"amcharts4-editor-message",config:t.editorConfig},"*")):"amcharts4-editor-result"===e.data.messageType?t.handleEvent("save",{chartConfig:e.data.config,appliedThemes:e.data.appliedThemes,appliedLicenses:e.data.licenseNumbers}):"amcharts4-editor-cancel"===e.data.messageType&&t.handleEvent("close"))},this.close=function(){t.target&&t.target.type&&"window"===t.target.type?t.editorWindow&&t.editorWindow.close():t.target&&t.target.type&&"inline"===t.target.type&&t.editorIFrame&&t.target.target instanceof HTMLElement&&(t.target.target.removeChild(t.editorIFrame),void 0!==t.editorHostDiv&&(document.body.removeChild(t.editorHostDiv),t.editorHostDiv=void 0,t.target.target=void 0)),window.removeEventListener("message",t.editorMessageHandler,!1)},this.addEventListener=function(e,i){t.eventHanlders.get(e).push(i)},this.removeEventListener=function(e,i){var o=t.eventHanlders.get(e),r=o.findIndex(function(e){return e===i});r>-1&&o.splice(r,1)},this.handleEvent=function(e,i){var o=t.eventHanlders.get(e);void 0!==o&&o.forEach(function(e){return e(i)})},void 0!==e&&(this._config=e,void 0===this._config.target&&(this._config.target={type:"inline"}),void 0===this._config.editorUrl&&(this._config.editorUrl="/am4editor/"))}return Object.defineProperty(e.prototype,"editorUrl",{get:function(){return this._config.editorUrl},set:function(e){this._config.editorUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._config.target},set:function(e){this._config.target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"editorConfig",{get:function(){return this._editorConfig},set:function(e){this._editorConfig=e},enumerable:!0,configurable:!0}),e}();e.EditorLauncher=t,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).am4editor={})}(this,function(e){"use strict";var t=function(){function e(e){var t=this;this._config={editorUrl:"/am4editor/",target:{type:"inline"}},this._editorConfig={},this.eventHanlders=new Map([["save",[]],["close",[]]]),this.addLicense=function(e){t._editorLicense=e},this.launch=function(e){switch(window.addEventListener("message",t.editorMessageHandler,!1),t._editorConfig.chartConfig=void 0!==e?e:void 0,t.target.type){case"inline":t.target.target?t.target.target instanceof HTMLElement||(t.target.target=document.getElementById(t.target.target.toString())):(t.editorHostDiv=document.createElement("div"),t.editorHostDiv.style.position="absolute",t.editorHostDiv.style.top="0px",t.editorHostDiv.style.left="0px",t.editorHostDiv.style.width="100vw",t.editorHostDiv.style.height="100vh",t.editorHostDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",t.editorHostDiv.style.zIndex="1000",t.editorHostDiv.style.display="flex",document.body.appendChild(t.editorHostDiv),t.target.target=t.editorHostDiv),t.editorIFrame=document.createElement("iframe"),t.editorIFrame.style.display="flex",t.editorIFrame.style.flexGrow="2",void 0!==t.editorHostDiv&&(t.editorIFrame.style.margin="30px",t.editorIFrame.style.border="0px"),t.editorIFrame.src=t._config.editorUrl,t.target.target.appendChild(t.editorIFrame),t.editorWindow=t.editorIFrame.contentWindow;break;case"window":default:t.editorWindow=window.open(t._config.editorUrl,void 0!==t.target.target?t.target.target.toString():"_blank",t.target.windowFeatures)}},this.editorMessageHandler=function(e){e.source===t.editorWindow&&("amcharts4-editor-loaded"===e.data?(void 0!==t._editorLicense&&void 0!==t.editorConfig&&void 0===t.editorConfig.editorLicense&&(t.editorConfig.editorLicense=t._editorLicense),t.editorWindow.postMessage({messageType:"amcharts4-editor-message",config:t.editorConfig},"*")):"amcharts4-editor-result"===e.data.messageType?t.handleEvent("save",{chartConfig:e.data.config,appliedThemes:e.data.appliedThemes,appliedLicenses:e.data.licenseNumbers}):"amcharts4-editor-cancel"===e.data.messageType&&t.handleEvent("close"))},this.close=function(){t.target&&t.target.type&&"window"===t.target.type?t.editorWindow&&t.editorWindow.close():t.target&&t.target.type&&"inline"===t.target.type&&t.editorIFrame&&t.target.target instanceof HTMLElement&&(t.target.target.removeChild(t.editorIFrame),void 0!==t.editorHostDiv&&(document.body.removeChild(t.editorHostDiv),t.editorHostDiv=void 0,t.target.target=void 0)),window.removeEventListener("message",t.editorMessageHandler,!1)},this.addEventListener=function(e,i){t.eventHanlders.get(e).push(i)},this.removeEventListener=function(e,i){var o=t.eventHanlders.get(e),r=o.findIndex(function(e){return e===i});r>-1&&o.splice(r,1)},this.handleEvent=function(e,i){var o=t.eventHanlders.get(e);void 0!==o&&o.forEach(function(e){return e(i)})},void 0!==e&&(this._config=e,void 0===this._config.target&&(this._config.target={type:"inline"}),void 0===this._config.editorUrl&&(this._config.editorUrl="/am4editor/"))}return Object.defineProperty(e.prototype,"editorUrl",{get:function(){return this._config.editorUrl},set:function(e){this._config.editorUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._config.target},set:function(e){this._config.target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"editorConfig",{get:function(){return this._editorConfig},set:function(e){this._editorConfig=e},enumerable:!0,configurable:!0}),e}(),i={ui:{"module_bar.design":"Design"},common:{width:"Width zzz"},properties:{"Label.text":"Text"}},o=function(){function e(){this.fallbackTranslations=i}return Object.defineProperty(e.prototype,"translations",{set:function(e){this._translations=e},enumerable:!0,configurable:!0}),e.prototype.getTranslation=function(e,t,i){return i&&Object.keys(i).includes(e)?i[e]:Object.keys(t).includes(e)?t[e]:void 0},e.prototype.getUiTranslation=function(e,t){var i=this.getTranslation(e,this.fallbackTranslations.ui,this._translations?this._translations.ui:void 0);return void 0!==i?i:void 0!==t?t:e},e.prototype.getLabel=function(e,t){var i=this.getTranslation(e,this.fallbackTranslations.properties,this._translations?this._translations.properties:void 0);return void 0===i&&e.includes(".")&&(i=this.getTranslation(e.substr(e.indexOf(".")+1),this.fallbackTranslations.common,this._translations?this._translations.common:void 0)),void 0!==i?i:void 0!==t?t:e},e}();e.EditorLauncher=t,e.Language=o,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=editor.js.map |
{ | ||
"name": "@amcharts/editor4", | ||
"version": "4.0.0-beta.1", | ||
"version": "4.0.0-beta.2", | ||
"description": "amCharts 4 Editor", | ||
@@ -5,0 +5,0 @@ "main": "editor.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31610229
92
48563
1