@chili-publish/studio-sdk 1.43.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/Connector.Shared.d.ts +1 -1
- package/connector-types/src/DataConnector.d.ts +8 -2
- package/lib/src/connector-types/src/Common.cjs.js +12 -0
- package/lib/src/connector-types/src/Common.cjs.js.map +1 -0
- package/lib/src/connector-types/src/Common.es.js +12 -0
- package/lib/src/connector-types/src/Common.es.js.map +1 -0
- package/lib/src/controllers/ActionController.cjs.js +78 -0
- package/lib/src/controllers/ActionController.cjs.js.map +1 -0
- package/lib/src/controllers/ActionController.es.js +78 -0
- package/lib/src/controllers/ActionController.es.js.map +1 -0
- package/lib/src/controllers/AnimationController.cjs.js +68 -0
- package/lib/src/controllers/AnimationController.cjs.js.map +1 -0
- package/lib/src/controllers/AnimationController.es.js +68 -0
- package/lib/src/controllers/AnimationController.es.js.map +1 -0
- package/lib/src/controllers/BarcodeController.cjs.js +159 -0
- package/lib/src/controllers/BarcodeController.cjs.js.map +1 -0
- package/lib/src/controllers/BarcodeController.es.js +159 -0
- package/lib/src/controllers/BarcodeController.es.js.map +1 -0
- package/lib/src/controllers/BrandKitController.cjs.js +142 -0
- package/lib/src/controllers/BrandKitController.cjs.js.map +1 -0
- package/lib/src/controllers/BrandKitController.es.js +142 -0
- package/lib/src/controllers/BrandKitController.es.js.map +1 -0
- package/lib/src/controllers/CanvasController.cjs.js +45 -0
- package/lib/src/controllers/CanvasController.cjs.js.map +1 -0
- package/lib/src/controllers/CanvasController.es.js +45 -0
- package/lib/src/controllers/CanvasController.es.js.map +1 -0
- package/lib/src/controllers/CharacterStyleController.cjs.js +58 -0
- package/lib/src/controllers/CharacterStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/CharacterStyleController.es.js +58 -0
- package/lib/src/controllers/CharacterStyleController.es.js.map +1 -0
- package/lib/src/controllers/ClipboardController.cjs.js +54 -0
- package/lib/src/controllers/ClipboardController.cjs.js.map +1 -0
- package/lib/src/controllers/ClipboardController.es.js +54 -0
- package/lib/src/controllers/ClipboardController.es.js.map +1 -0
- package/lib/src/controllers/ColorConversionController.cjs.js +30 -0
- package/lib/src/controllers/ColorConversionController.cjs.js.map +1 -0
- package/lib/src/controllers/ColorConversionController.es.js +30 -0
- package/lib/src/controllers/ColorConversionController.es.js.map +1 -0
- package/lib/src/controllers/ColorStyleController.cjs.js +63 -0
- package/lib/src/controllers/ColorStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/ColorStyleController.es.js +63 -0
- package/lib/src/controllers/ColorStyleController.es.js.map +1 -0
- package/lib/src/controllers/ComponentConnectorController.cjs.js +54 -0
- package/lib/src/controllers/ComponentConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentConnectorController.es.js +54 -0
- package/lib/src/controllers/ComponentConnectorController.es.js.map +1 -0
- package/lib/src/controllers/ComponentController.cjs.js +38 -0
- package/lib/src/controllers/ComponentController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentController.es.js +38 -0
- package/lib/src/controllers/ComponentController.es.js.map +1 -0
- package/lib/src/controllers/ComponentGridController.cjs.js +50 -0
- package/lib/src/controllers/ComponentGridController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentGridController.d.ts +59 -0
- package/lib/src/controllers/ComponentGridController.es.js +50 -0
- package/lib/src/controllers/ComponentGridController.es.js.map +1 -0
- package/lib/src/controllers/ConfigurationController.cjs.js +68 -0
- package/lib/src/controllers/ConfigurationController.cjs.js.map +1 -0
- package/lib/src/controllers/ConfigurationController.d.ts +6 -0
- package/lib/src/controllers/ConfigurationController.es.js +68 -0
- package/lib/src/controllers/ConfigurationController.es.js.map +1 -0
- package/lib/src/controllers/ConnectorController.cjs.js +190 -0
- package/lib/src/controllers/ConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/ConnectorController.es.js +190 -0
- package/lib/src/controllers/ConnectorController.es.js.map +1 -0
- package/lib/src/controllers/DataConnectorController.cjs.js +88 -0
- package/lib/src/controllers/DataConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/DataConnectorController.es.js +88 -0
- package/lib/src/controllers/DataConnectorController.es.js.map +1 -0
- package/lib/src/controllers/DataSourceController.cjs.js +46 -0
- package/lib/src/controllers/DataSourceController.cjs.js.map +1 -0
- package/lib/src/controllers/DataSourceController.es.js +46 -0
- package/lib/src/controllers/DataSourceController.es.js.map +1 -0
- package/lib/src/controllers/DebugController.cjs.js +42 -0
- package/lib/src/controllers/DebugController.cjs.js.map +1 -0
- package/lib/src/controllers/DebugController.es.js +42 -0
- package/lib/src/controllers/DebugController.es.js.map +1 -0
- package/lib/src/controllers/DocumentController.cjs.js +40 -0
- package/lib/src/controllers/DocumentController.cjs.js.map +1 -0
- package/lib/src/controllers/DocumentController.d.ts +6 -0
- package/lib/src/controllers/DocumentController.es.js +40 -0
- package/lib/src/controllers/DocumentController.es.js.map +1 -0
- package/lib/src/controllers/ExperimentController.cjs.js +60 -0
- package/lib/src/controllers/ExperimentController.cjs.js.map +1 -0
- package/lib/src/controllers/ExperimentController.es.js +60 -0
- package/lib/src/controllers/ExperimentController.es.js.map +1 -0
- package/lib/src/controllers/FontConnectorController.cjs.js +58 -0
- package/lib/src/controllers/FontConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/FontConnectorController.es.js +58 -0
- package/lib/src/controllers/FontConnectorController.es.js.map +1 -0
- package/lib/src/controllers/FontController.cjs.js +82 -0
- package/lib/src/controllers/FontController.cjs.js.map +1 -0
- package/lib/src/controllers/FontController.es.js +82 -0
- package/lib/src/controllers/FontController.es.js.map +1 -0
- package/lib/src/controllers/FrameController.cjs.js +585 -0
- package/lib/src/controllers/FrameController.cjs.js.map +1 -0
- package/lib/src/controllers/FrameController.d.ts +10 -1
- package/lib/src/controllers/FrameController.es.js +585 -0
- package/lib/src/controllers/FrameController.es.js.map +1 -0
- package/lib/src/controllers/GradientStyleController.cjs.js +59 -0
- package/lib/src/controllers/GradientStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/GradientStyleController.es.js +59 -0
- package/lib/src/controllers/GradientStyleController.es.js.map +1 -0
- package/lib/src/controllers/InfoController.cjs.js +12 -0
- package/lib/src/controllers/InfoController.cjs.js.map +1 -0
- package/lib/src/controllers/InfoController.es.js +12 -0
- package/lib/src/controllers/InfoController.es.js.map +1 -0
- package/lib/src/controllers/LayoutController.cjs.js +179 -0
- package/lib/src/controllers/LayoutController.cjs.js.map +1 -0
- package/lib/src/controllers/LayoutController.es.js +179 -0
- package/lib/src/controllers/LayoutController.es.js.map +1 -0
- package/lib/src/controllers/MediaConnectorController.cjs.js +93 -0
- package/lib/src/controllers/MediaConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/MediaConnectorController.es.js +93 -0
- package/lib/src/controllers/MediaConnectorController.es.js.map +1 -0
- package/lib/src/controllers/PageController.cjs.js +95 -0
- package/lib/src/controllers/PageController.cjs.js.map +1 -0
- package/lib/src/controllers/PageController.es.js +95 -0
- package/lib/src/controllers/PageController.es.js.map +1 -0
- package/lib/src/controllers/ParagraphStyleController.cjs.js +58 -0
- package/lib/src/controllers/ParagraphStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/ParagraphStyleController.es.js +58 -0
- package/lib/src/controllers/ParagraphStyleController.es.js.map +1 -0
- package/lib/src/controllers/ShapeController.cjs.js +78 -0
- package/lib/src/controllers/ShapeController.cjs.js.map +1 -0
- package/lib/src/controllers/ShapeController.es.js +78 -0
- package/lib/src/controllers/ShapeController.es.js.map +1 -0
- package/lib/src/controllers/SubscriberController.cjs.js +188 -0
- package/lib/src/controllers/SubscriberController.cjs.js.map +1 -0
- package/lib/src/controllers/SubscriberController.d.ts +6 -0
- package/lib/src/controllers/SubscriberController.es.js +188 -0
- package/lib/src/controllers/SubscriberController.es.js.map +1 -0
- package/lib/src/controllers/TextStyleController.cjs.js +38 -0
- package/lib/src/controllers/TextStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/TextStyleController.es.js +38 -0
- package/lib/src/controllers/TextStyleController.es.js.map +1 -0
- package/lib/src/controllers/ToolController.cjs.js +65 -0
- package/lib/src/controllers/ToolController.cjs.js.map +1 -0
- package/lib/src/controllers/ToolController.d.ts +4 -0
- package/lib/src/controllers/ToolController.es.js +65 -0
- package/lib/src/controllers/ToolController.es.js.map +1 -0
- package/lib/src/controllers/UndoManagerController.cjs.js +134 -0
- package/lib/src/controllers/UndoManagerController.cjs.js.map +1 -0
- package/lib/src/controllers/UndoManagerController.es.js +134 -0
- package/lib/src/controllers/UndoManagerController.es.js.map +1 -0
- package/lib/src/controllers/UtilsController.cjs.js +97 -0
- package/lib/src/controllers/UtilsController.cjs.js.map +1 -0
- package/lib/src/controllers/UtilsController.es.js +97 -0
- package/lib/src/controllers/UtilsController.es.js.map +1 -0
- package/lib/src/controllers/VariableController.cjs.js +433 -0
- package/lib/src/controllers/VariableController.cjs.js.map +1 -0
- package/lib/src/controllers/VariableController.d.ts +16 -0
- package/lib/src/controllers/VariableController.es.js +433 -0
- package/lib/src/controllers/VariableController.es.js.map +1 -0
- package/lib/src/exceptions/AsyncExceptions.cjs.js +22 -0
- package/lib/src/exceptions/AsyncExceptions.cjs.js.map +1 -0
- package/lib/src/exceptions/AsyncExceptions.es.js +22 -0
- package/lib/src/exceptions/AsyncExceptions.es.js.map +1 -0
- package/lib/src/exceptions/Codes.cjs.js +7 -0
- package/lib/src/exceptions/Codes.cjs.js.map +1 -0
- package/lib/src/exceptions/Codes.es.js +7 -0
- package/lib/src/exceptions/Codes.es.js.map +1 -0
- package/lib/src/exceptions/Exceptions.cjs.js +17 -0
- package/lib/src/exceptions/Exceptions.cjs.js.map +1 -0
- package/lib/src/exceptions/Exceptions.es.js +17 -0
- package/lib/src/exceptions/Exceptions.es.js.map +1 -0
- package/lib/src/exceptions/Helpers.cjs.js +50 -0
- package/lib/src/exceptions/Helpers.cjs.js.map +1 -0
- package/lib/src/exceptions/Helpers.es.js +50 -0
- package/lib/src/exceptions/Helpers.es.js.map +1 -0
- package/lib/src/index.cjs.js +138 -0
- package/lib/src/index.cjs.js.map +1 -0
- package/lib/src/index.d.ts +8 -4
- package/lib/src/index.es.js +138 -0
- package/lib/src/index.es.js.map +1 -0
- package/lib/src/interactions/Connector.cjs.js +199 -0
- package/lib/src/interactions/Connector.cjs.js.map +1 -0
- package/lib/src/interactions/Connector.d.ts +1 -0
- package/lib/src/interactions/Connector.es.js +199 -0
- package/lib/src/interactions/Connector.es.js.map +1 -0
- package/lib/src/next/NextInitiator.cjs.js +28 -0
- package/lib/src/next/NextInitiator.cjs.js.map +1 -0
- package/lib/src/next/NextInitiator.es.js +28 -0
- package/lib/src/next/NextInitiator.es.js.map +1 -0
- package/lib/src/next/controllers/BrandKitController.cjs.js +34 -0
- package/lib/src/next/controllers/BrandKitController.cjs.js.map +1 -0
- package/lib/src/next/controllers/BrandKitController.es.js +34 -0
- package/lib/src/next/controllers/BrandKitController.es.js.map +1 -0
- package/lib/src/next/controllers/ConnectorController.cjs.js +38 -0
- package/lib/src/next/controllers/ConnectorController.cjs.js.map +1 -0
- package/lib/src/next/controllers/ConnectorController.es.js +38 -0
- package/lib/src/next/controllers/ConnectorController.es.js.map +1 -0
- package/lib/src/next/controllers/PageController.cjs.js +40 -0
- package/lib/src/next/controllers/PageController.cjs.js.map +1 -0
- package/lib/src/next/controllers/PageController.es.js +40 -0
- package/lib/src/next/controllers/PageController.es.js.map +1 -0
- package/lib/src/next/controllers/SubscriberController.cjs.js +24 -0
- package/lib/src/next/controllers/SubscriberController.cjs.js.map +1 -0
- package/lib/src/next/controllers/SubscriberController.es.js +24 -0
- package/lib/src/next/controllers/SubscriberController.es.js.map +1 -0
- package/lib/src/next/controllers/VariableController.cjs.js +87 -0
- package/lib/src/next/controllers/VariableController.cjs.js.map +1 -0
- package/lib/src/next/controllers/VariableController.es.js +87 -0
- package/lib/src/next/controllers/VariableController.es.js.map +1 -0
- package/lib/src/next/index.cjs.js +5 -0
- package/lib/src/next/index.cjs.js.map +1 -0
- package/lib/src/next/index.es.js +5 -0
- package/lib/src/next/index.es.js.map +1 -0
- package/lib/src/next/types/ConnectorTypes.cjs.js +10 -0
- package/lib/src/next/types/ConnectorTypes.cjs.js.map +1 -0
- package/lib/src/next/types/ConnectorTypes.es.js +10 -0
- package/lib/src/next/types/ConnectorTypes.es.js.map +1 -0
- package/lib/src/sdk/editor-engine.json.cjs.js +9 -0
- package/lib/src/sdk/editor-engine.json.cjs.js.map +1 -0
- package/lib/src/sdk/editor-engine.json.es.js +9 -0
- package/lib/src/sdk/editor-engine.json.es.js.map +1 -0
- package/lib/src/sdk/package.json.cjs.js +9 -0
- package/lib/src/sdk/package.json.cjs.js.map +1 -0
- package/lib/src/sdk/package.json.es.js +9 -0
- package/lib/src/sdk/package.json.es.js.map +1 -0
- package/lib/src/sdk.cjs.js +231 -0
- package/lib/src/sdk.cjs.js.map +1 -0
- package/lib/src/sdk.d.ts +2 -0
- package/lib/src/sdk.es.js +231 -0
- package/lib/src/sdk.es.js.map +1 -0
- package/lib/src/types/ActionTypes.cjs.js +12 -0
- package/lib/src/types/ActionTypes.cjs.js.map +1 -0
- package/lib/src/types/ActionTypes.es.js +12 -0
- package/lib/src/types/ActionTypes.es.js.map +1 -0
- package/lib/src/types/AnimationTypes.cjs.js +56 -0
- package/lib/src/types/AnimationTypes.cjs.js.map +1 -0
- package/lib/src/types/AnimationTypes.es.js +56 -0
- package/lib/src/types/AnimationTypes.es.js.map +1 -0
- package/lib/src/types/BarcodeTypes.cjs.js +45 -0
- package/lib/src/types/BarcodeTypes.cjs.js.map +1 -0
- package/lib/src/types/BarcodeTypes.es.js +45 -0
- package/lib/src/types/BarcodeTypes.es.js.map +1 -0
- package/lib/src/types/ColorStyleTypes.cjs.js +23 -0
- package/lib/src/types/ColorStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/ColorStyleTypes.es.js +23 -0
- package/lib/src/types/ColorStyleTypes.es.js.map +1 -0
- package/lib/src/types/CommonTypes.cjs.js +30 -0
- package/lib/src/types/CommonTypes.cjs.js.map +1 -0
- package/lib/src/types/CommonTypes.d.ts +8 -0
- package/lib/src/types/CommonTypes.es.js +30 -0
- package/lib/src/types/CommonTypes.es.js.map +1 -0
- package/lib/src/types/ComponentConnectorTypes.cjs.js +10 -0
- package/lib/src/types/ComponentConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/ComponentConnectorTypes.es.js +10 -0
- package/lib/src/types/ComponentConnectorTypes.es.js.map +1 -0
- package/lib/src/types/ComponentGridTypes.cjs.js +8 -0
- package/lib/src/types/ComponentGridTypes.cjs.js.map +1 -0
- package/lib/src/types/ComponentGridTypes.d.ts +25 -0
- package/lib/src/types/ComponentGridTypes.es.js +8 -0
- package/lib/src/types/ComponentGridTypes.es.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.cjs.js +39 -0
- package/lib/src/types/ConfigurationTypes.cjs.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.d.ts +2 -0
- package/lib/src/types/ConfigurationTypes.es.js +39 -0
- package/lib/src/types/ConfigurationTypes.es.js.map +1 -0
- package/lib/src/types/ConnectorTypes.cjs.js +159 -0
- package/lib/src/types/ConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/ConnectorTypes.d.ts +10 -6
- package/lib/src/types/ConnectorTypes.es.js +159 -0
- package/lib/src/types/ConnectorTypes.es.js.map +1 -0
- package/lib/src/types/DataConnectorTypes.d.ts +1 -1
- package/lib/src/types/DocumentTypes.cjs.js +19 -0
- package/lib/src/types/DocumentTypes.cjs.js.map +1 -0
- package/lib/src/types/DocumentTypes.es.js +19 -0
- package/lib/src/types/DocumentTypes.es.js.map +1 -0
- package/lib/src/types/EngineEditModeTypes.cjs.js +13 -0
- package/lib/src/types/EngineEditModeTypes.cjs.js.map +1 -0
- package/lib/src/types/EngineEditModeTypes.es.js +13 -0
- package/lib/src/types/EngineEditModeTypes.es.js.map +1 -0
- package/lib/src/types/FontConnectorTypes.cjs.js +9 -0
- package/lib/src/types/FontConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/FontConnectorTypes.es.js +9 -0
- package/lib/src/types/FontConnectorTypes.es.js.map +1 -0
- package/lib/src/types/FrameTypes.cjs.js +174 -0
- package/lib/src/types/FrameTypes.cjs.js.map +1 -0
- package/lib/src/types/FrameTypes.d.ts +48 -4
- package/lib/src/types/FrameTypes.es.js +174 -0
- package/lib/src/types/FrameTypes.es.js.map +1 -0
- package/lib/src/types/GradientStyleTypes.cjs.js +14 -0
- package/lib/src/types/GradientStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/GradientStyleTypes.es.js +14 -0
- package/lib/src/types/GradientStyleTypes.es.js.map +1 -0
- package/lib/src/types/LayoutTypes.cjs.js +31 -0
- package/lib/src/types/LayoutTypes.cjs.js.map +1 -0
- package/lib/src/types/LayoutTypes.es.js +31 -0
- package/lib/src/types/LayoutTypes.es.js.map +1 -0
- package/lib/src/types/MediaConnectorTypes.cjs.js +18 -0
- package/lib/src/types/MediaConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/MediaConnectorTypes.es.js +18 -0
- package/lib/src/types/MediaConnectorTypes.es.js.map +1 -0
- package/lib/src/types/ParagraphStyleTypes.cjs.js +21 -0
- package/lib/src/types/ParagraphStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/ParagraphStyleTypes.es.js +21 -0
- package/lib/src/types/ParagraphStyleTypes.es.js.map +1 -0
- package/lib/src/types/RichTextRuleTypes.cjs.js +22 -0
- package/lib/src/types/RichTextRuleTypes.cjs.js.map +1 -0
- package/lib/src/types/RichTextRuleTypes.d.ts +119 -0
- package/lib/src/types/RichTextRuleTypes.es.js +22 -0
- package/lib/src/types/RichTextRuleTypes.es.js.map +1 -0
- package/lib/src/types/ShapeTypes.cjs.js +17 -0
- package/lib/src/types/ShapeTypes.cjs.js.map +1 -0
- package/lib/src/types/ShapeTypes.es.js +17 -0
- package/lib/src/types/ShapeTypes.es.js.map +1 -0
- package/lib/src/types/TextStyleTypes.cjs.js +86 -0
- package/lib/src/types/TextStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/TextStyleTypes.es.js +86 -0
- package/lib/src/types/TextStyleTypes.es.js.map +1 -0
- package/lib/src/types/VariableTypes.cjs.js +81 -0
- package/lib/src/types/VariableTypes.cjs.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +5 -0
- package/lib/src/types/VariableTypes.es.js +81 -0
- package/lib/src/types/VariableTypes.es.js.map +1 -0
- package/lib/src/types/ViewModeTypes.cjs.js +9 -0
- package/lib/src/types/ViewModeTypes.cjs.js.map +1 -0
- package/lib/src/types/ViewModeTypes.es.js +9 -0
- package/lib/src/types/ViewModeTypes.es.js.map +1 -0
- package/lib/src/utils/BrandKitAdapter.cjs.js +42 -0
- package/lib/src/utils/BrandKitAdapter.cjs.js.map +1 -0
- package/lib/src/utils/BrandKitAdapter.es.js +42 -0
- package/lib/src/utils/BrandKitAdapter.es.js.map +1 -0
- package/lib/src/utils/ConfigHelper.cjs.js +214 -0
- package/lib/src/utils/ConfigHelper.cjs.js.map +1 -0
- package/lib/src/utils/ConfigHelper.es.js +214 -0
- package/lib/src/utils/ConfigHelper.es.js.map +1 -0
- package/lib/src/utils/ConnectorCompatibilityTools.cjs.js +47 -0
- package/lib/src/utils/ConnectorCompatibilityTools.cjs.js.map +1 -0
- package/lib/src/utils/ConnectorCompatibilityTools.es.js +47 -0
- package/lib/src/utils/ConnectorCompatibilityTools.es.js.map +1 -0
- package/lib/src/utils/DataItemMappingTools.cjs.js +56 -0
- package/lib/src/utils/DataItemMappingTools.cjs.js.map +1 -0
- package/lib/src/utils/DataItemMappingTools.d.ts +3 -2
- package/lib/src/utils/DataItemMappingTools.es.js +56 -0
- package/lib/src/utils/DataItemMappingTools.es.js.map +1 -0
- package/lib/src/utils/EditorResponseData.cjs.js +35 -0
- package/lib/src/utils/EditorResponseData.cjs.js.map +1 -0
- package/lib/src/utils/EditorResponseData.es.js +35 -0
- package/lib/src/utils/EditorResponseData.es.js.map +1 -0
- package/lib/src/utils/EngineCallbackHandler.cjs.js +25 -0
- package/lib/src/utils/EngineCallbackHandler.cjs.js.map +1 -0
- package/lib/src/utils/EngineCallbackHandler.es.js +25 -0
- package/lib/src/utils/EngineCallbackHandler.es.js.map +1 -0
- package/lib/src/utils/EngineEvent.cjs.js +46 -0
- package/lib/src/utils/EngineEvent.cjs.js.map +1 -0
- package/lib/src/utils/EngineEvent.es.js +46 -0
- package/lib/src/utils/EngineEvent.es.js.map +1 -0
- package/lib/src/utils/EngineEventTrigger.cjs.js +32 -0
- package/lib/src/utils/EngineEventTrigger.cjs.js.map +1 -0
- package/lib/src/utils/EngineEventTrigger.es.js +32 -0
- package/lib/src/utils/EngineEventTrigger.es.js.map +1 -0
- package/lib/src/utils/Enums.cjs.js +52 -0
- package/lib/src/utils/Enums.cjs.js.map +1 -0
- package/lib/src/utils/Enums.d.ts +2 -1
- package/lib/src/utils/Enums.es.js +52 -0
- package/lib/src/utils/Enums.es.js.map +1 -0
- package/lib/src/utils/LocalConfigurationDecorator.cjs.js +59 -0
- package/lib/src/utils/LocalConfigurationDecorator.cjs.js.map +1 -0
- package/lib/src/utils/LocalConfigurationDecorator.es.js +59 -0
- package/lib/src/utils/LocalConfigurationDecorator.es.js.map +1 -0
- package/lib/src/utils/MathUtils.cjs.js +8 -0
- package/lib/src/utils/MathUtils.cjs.js.map +1 -0
- package/lib/src/utils/MathUtils.es.js +8 -0
- package/lib/src/utils/MathUtils.es.js.map +1 -0
- package/lib/src/utils/VariableHelper.cjs.js +15 -0
- package/lib/src/utils/VariableHelper.cjs.js.map +1 -0
- package/lib/src/utils/VariableHelper.es.js +15 -0
- package/lib/src/utils/VariableHelper.es.js.map +1 -0
- package/package.json +19 -6
- package/_bundles/main.es.js +0 -2688
- package/_bundles/main.es.js.map +0 -1
- package/connector-types/src/Common.js +0 -9
- package/connector-types/src/Common.js.map +0 -1
- package/connector-types/src/ComponentConnector.js +0 -3
- package/connector-types/src/ComponentConnector.js.map +0 -1
- package/connector-types/src/Connector.Shared.js +0 -2
- package/connector-types/src/Connector.Shared.js.map +0 -1
- package/connector-types/src/DataConnector.js +0 -2
- package/connector-types/src/DataConnector.js.map +0 -1
- package/connector-types/src/FontConnector.js +0 -2
- package/connector-types/src/FontConnector.js.map +0 -1
- package/connector-types/src/MediaConnector.js +0 -2
- package/connector-types/src/MediaConnector.js.map +0 -1
- package/connector-types/src/index.js +0 -7
- package/connector-types/src/index.js.map +0 -1
- package/lib/editor-engine.json +0 -3
- package/lib/package.json +0 -87
- package/lib/src/controllers/ActionController.js +0 -178
- package/lib/src/controllers/ActionController.js.map +0 -1
- package/lib/src/controllers/AnimationController.js +0 -135
- package/lib/src/controllers/AnimationController.js.map +0 -1
- package/lib/src/controllers/BarcodeController.js +0 -288
- package/lib/src/controllers/BarcodeController.js.map +0 -1
- package/lib/src/controllers/BrandKitController.js +0 -230
- package/lib/src/controllers/BrandKitController.js.map +0 -1
- package/lib/src/controllers/CanvasController.js +0 -84
- package/lib/src/controllers/CanvasController.js.map +0 -1
- package/lib/src/controllers/CharacterStyleController.js +0 -119
- package/lib/src/controllers/CharacterStyleController.js.map +0 -1
- package/lib/src/controllers/ClipboardController.js +0 -87
- package/lib/src/controllers/ClipboardController.js.map +0 -1
- package/lib/src/controllers/ColorConversionController.js +0 -49
- package/lib/src/controllers/ColorConversionController.js.map +0 -1
- package/lib/src/controllers/ColorStyleController.js +0 -118
- package/lib/src/controllers/ColorStyleController.js.map +0 -1
- package/lib/src/controllers/ComponentConnectorController.js +0 -124
- package/lib/src/controllers/ComponentConnectorController.js.map +0 -1
- package/lib/src/controllers/ComponentController.js +0 -74
- package/lib/src/controllers/ComponentController.js.map +0 -1
- package/lib/src/controllers/ConfigurationController.js +0 -84
- package/lib/src/controllers/ConfigurationController.js.map +0 -1
- package/lib/src/controllers/ConnectorController.js +0 -320
- package/lib/src/controllers/ConnectorController.js.map +0 -1
- package/lib/src/controllers/DataConnectorController.js +0 -129
- package/lib/src/controllers/DataConnectorController.js.map +0 -1
- package/lib/src/controllers/DataSourceController.js +0 -83
- package/lib/src/controllers/DataSourceController.js.map +0 -1
- package/lib/src/controllers/DebugController.js +0 -72
- package/lib/src/controllers/DebugController.js.map +0 -1
- package/lib/src/controllers/DocumentController.js +0 -77
- package/lib/src/controllers/DocumentController.js.map +0 -1
- package/lib/src/controllers/ExperimentController.js +0 -131
- package/lib/src/controllers/ExperimentController.js.map +0 -1
- package/lib/src/controllers/FontConnectorController.js +0 -146
- package/lib/src/controllers/FontConnectorController.js.map +0 -1
- package/lib/src/controllers/FontController.js +0 -178
- package/lib/src/controllers/FontController.js.map +0 -1
- package/lib/src/controllers/FrameController.js +0 -1308
- package/lib/src/controllers/FrameController.js.map +0 -1
- package/lib/src/controllers/GradientStyleController.js +0 -114
- package/lib/src/controllers/GradientStyleController.js.map +0 -1
- package/lib/src/controllers/InfoController.js +0 -20
- package/lib/src/controllers/InfoController.js.map +0 -1
- package/lib/src/controllers/LayoutController.js +0 -401
- package/lib/src/controllers/LayoutController.js.map +0 -1
- package/lib/src/controllers/MediaConnectorController.js +0 -177
- package/lib/src/controllers/MediaConnectorController.js.map +0 -1
- package/lib/src/controllers/PageController.js +0 -186
- package/lib/src/controllers/PageController.js.map +0 -1
- package/lib/src/controllers/ParagraphStyleController.js +0 -115
- package/lib/src/controllers/ParagraphStyleController.js.map +0 -1
- package/lib/src/controllers/ShapeController.js +0 -172
- package/lib/src/controllers/ShapeController.js.map +0 -1
- package/lib/src/controllers/SubscriberController.js +0 -379
- package/lib/src/controllers/SubscriberController.js.map +0 -1
- package/lib/src/controllers/TextStyleController.js +0 -69
- package/lib/src/controllers/TextStyleController.js.map +0 -1
- package/lib/src/controllers/ToolController.js +0 -112
- package/lib/src/controllers/ToolController.js.map +0 -1
- package/lib/src/controllers/UndoManagerController.js +0 -207
- package/lib/src/controllers/UndoManagerController.js.map +0 -1
- package/lib/src/controllers/UtilsController.js +0 -135
- package/lib/src/controllers/UtilsController.js.map +0 -1
- package/lib/src/controllers/VariableController.js +0 -891
- package/lib/src/controllers/VariableController.js.map +0 -1
- package/lib/src/exceptions/AsyncExceptions.js +0 -23
- package/lib/src/exceptions/AsyncExceptions.js.map +0 -1
- package/lib/src/exceptions/Codes.js +0 -4
- package/lib/src/exceptions/Codes.js.map +0 -1
- package/lib/src/exceptions/Exceptions.js +0 -13
- package/lib/src/exceptions/Exceptions.js.map +0 -1
- package/lib/src/exceptions/Helpers.js +0 -55
- package/lib/src/exceptions/Helpers.js.map +0 -1
- package/lib/src/exceptions/index.js +0 -4
- package/lib/src/exceptions/index.js.map +0 -1
- package/lib/src/index.js +0 -31
- package/lib/src/index.js.map +0 -1
- package/lib/src/interactions/Connector.js +0 -195
- package/lib/src/interactions/Connector.js.map +0 -1
- package/lib/src/next/NextInitiator.js +0 -34
- package/lib/src/next/NextInitiator.js.map +0 -1
- package/lib/src/next/controllers/BrandKitController.js +0 -57
- package/lib/src/next/controllers/BrandKitController.js.map +0 -1
- package/lib/src/next/controllers/CanvasController.js +0 -54
- package/lib/src/next/controllers/CanvasController.js.map +0 -1
- package/lib/src/next/controllers/ConnectorController.js +0 -79
- package/lib/src/next/controllers/ConnectorController.js.map +0 -1
- package/lib/src/next/controllers/PageController.js +0 -65
- package/lib/src/next/controllers/PageController.js.map +0 -1
- package/lib/src/next/controllers/SubscriberController.js +0 -42
- package/lib/src/next/controllers/SubscriberController.js.map +0 -1
- package/lib/src/next/controllers/VariableController.js +0 -158
- package/lib/src/next/controllers/VariableController.js.map +0 -1
- package/lib/src/next/index.js +0 -2
- package/lib/src/next/index.js.map +0 -1
- package/lib/src/next/tests/controllers/BrandKitController.test.js +0 -104
- package/lib/src/next/tests/controllers/BrandKitController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/CanvasController.test.js +0 -37
- package/lib/src/next/tests/controllers/CanvasController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.js +0 -71
- package/lib/src/next/tests/controllers/ConnectorController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/PageController.test.js +0 -37
- package/lib/src/next/tests/controllers/PageController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js +0 -54
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +0 -1
- package/lib/src/next/tests/controllers/VariableController.test.js +0 -186
- package/lib/src/next/tests/controllers/VariableController.test.js.map +0 -1
- package/lib/src/next/types/BrandKitTypes.js +0 -2
- package/lib/src/next/types/BrandKitTypes.js.map +0 -1
- package/lib/src/next/types/ConnectorTypes.js +0 -27
- package/lib/src/next/types/ConnectorTypes.js.map +0 -1
- package/lib/src/next/types/NextSubscribers.js +0 -2
- package/lib/src/next/types/NextSubscribers.js.map +0 -1
- package/lib/src/next/types/PageTypes.js +0 -2
- package/lib/src/next/types/PageTypes.js.map +0 -1
- package/lib/src/next/types/VariableTypes.js +0 -12
- package/lib/src/next/types/VariableTypes.js.map +0 -1
- package/lib/src/sdk.js +0 -231
- package/lib/src/sdk.js.map +0 -1
- package/lib/src/setupTests.js +0 -2
- package/lib/src/setupTests.js.map +0 -1
- package/lib/src/tests/__mocks__/Animations.js +0 -10
- package/lib/src/tests/__mocks__/Animations.js.map +0 -1
- package/lib/src/tests/__mocks__/Brandkit.js +0 -532
- package/lib/src/tests/__mocks__/Brandkit.js.map +0 -1
- package/lib/src/tests/__mocks__/Config.js +0 -41
- package/lib/src/tests/__mocks__/Config.js.map +0 -1
- package/lib/src/tests/__mocks__/FrameProperties.js +0 -20
- package/lib/src/tests/__mocks__/FrameProperties.js.map +0 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +0 -15
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +0 -1
- package/lib/src/tests/__mocks__/localConfig.js +0 -4
- package/lib/src/tests/__mocks__/localConfig.js.map +0 -1
- package/lib/src/tests/__mocks__/mockDocument.js +0 -2
- package/lib/src/tests/__mocks__/mockDocument.js.map +0 -1
- package/lib/src/tests/controllers/ActionController.test.js +0 -156
- package/lib/src/tests/controllers/ActionController.test.js.map +0 -1
- package/lib/src/tests/controllers/AnimationController.test.js +0 -91
- package/lib/src/tests/controllers/AnimationController.test.js.map +0 -1
- package/lib/src/tests/controllers/BarcodeController.test.js +0 -292
- package/lib/src/tests/controllers/BarcodeController.test.js.map +0 -1
- package/lib/src/tests/controllers/BrandKitController.test.js +0 -318
- package/lib/src/tests/controllers/BrandKitController.test.js.map +0 -1
- package/lib/src/tests/controllers/CanvasController.test.js +0 -58
- package/lib/src/tests/controllers/CanvasController.test.js.map +0 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +0 -155
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ClipboardController.test.js +0 -64
- package/lib/src/tests/controllers/ClipboardController.test.js.map +0 -1
- package/lib/src/tests/controllers/ColorConversionController.test.js +0 -32
- package/lib/src/tests/controllers/ColorConversionController.test.js.map +0 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +0 -94
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ComponentConnectorController.test.js +0 -73
- package/lib/src/tests/controllers/ComponentConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/ComponentController.test.js +0 -52
- package/lib/src/tests/controllers/ComponentController.test.js.map +0 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +0 -271
- package/lib/src/tests/controllers/ConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js +0 -145
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/DataSourceController.test.js +0 -67
- package/lib/src/tests/controllers/DataSourceController.test.js.map +0 -1
- package/lib/src/tests/controllers/DebugController.test.js +0 -47
- package/lib/src/tests/controllers/DebugController.test.js.map +0 -1
- package/lib/src/tests/controllers/DocumentController.test.js +0 -63
- package/lib/src/tests/controllers/DocumentController.test.js.map +0 -1
- package/lib/src/tests/controllers/ExperimentController.test.js +0 -98
- package/lib/src/tests/controllers/ExperimentController.test.js.map +0 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +0 -87
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/FontController.test.js +0 -142
- package/lib/src/tests/controllers/FontController.test.js.map +0 -1
- package/lib/src/tests/controllers/FrameConstraintController.test.js +0 -335
- package/lib/src/tests/controllers/FrameConstraintController.test.js.map +0 -1
- package/lib/src/tests/controllers/FrameController.test.js +0 -669
- package/lib/src/tests/controllers/FrameController.test.js.map +0 -1
- package/lib/src/tests/controllers/GradientStyleController.test.js +0 -82
- package/lib/src/tests/controllers/GradientStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/InfoController.test.js +0 -26
- package/lib/src/tests/controllers/InfoController.test.js.map +0 -1
- package/lib/src/tests/controllers/LayoutController.test.js +0 -345
- package/lib/src/tests/controllers/LayoutController.test.js.map +0 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +0 -116
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/PageController.test.js +0 -141
- package/lib/src/tests/controllers/PageController.test.js.map +0 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +0 -164
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ShapeController.test.js +0 -102
- package/lib/src/tests/controllers/ShapeController.test.js.map +0 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +0 -467
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +0 -1
- package/lib/src/tests/controllers/TextStyleController.test.js +0 -43
- package/lib/src/tests/controllers/TextStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ToolController.test.js +0 -80
- package/lib/src/tests/controllers/ToolController.test.js.map +0 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js +0 -120
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +0 -1
- package/lib/src/tests/controllers/UtilsController.test.js +0 -127
- package/lib/src/tests/controllers/UtilsController.test.js.map +0 -1
- package/lib/src/tests/controllers/VariableController.test.js +0 -579
- package/lib/src/tests/controllers/VariableController.test.js.map +0 -1
- package/lib/src/tests/index.test.js +0 -26
- package/lib/src/tests/index.test.js.map +0 -1
- package/lib/src/tests/interactions/Connector.test.js +0 -44
- package/lib/src/tests/interactions/Connector.test.js.map +0 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js +0 -74
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +0 -1
- package/lib/src/tests/utils/EditorResponseData.test.js +0 -125
- package/lib/src/tests/utils/EditorResponseData.test.js.map +0 -1
- package/lib/src/tests/utils/EventSubscription.test.js +0 -238
- package/lib/src/tests/utils/EventSubscription.test.js.map +0 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js +0 -61
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +0 -1
- package/lib/src/tests/utils/Logging.test.js +0 -99
- package/lib/src/tests/utils/Logging.test.js.map +0 -1
- package/lib/src/tests/utils/Round.test.js +0 -16
- package/lib/src/tests/utils/Round.test.js.map +0 -1
- package/lib/src/types/ActionTypes.js +0 -29
- package/lib/src/types/ActionTypes.js.map +0 -1
- package/lib/src/types/AnimationTypes.js +0 -49
- package/lib/src/types/AnimationTypes.js.map +0 -1
- package/lib/src/types/BarcodeTypes.js +0 -39
- package/lib/src/types/BarcodeTypes.js.map +0 -1
- package/lib/src/types/BrandKitTypes.js +0 -2
- package/lib/src/types/BrandKitTypes.js.map +0 -1
- package/lib/src/types/CharacterStyleTypes.js +0 -2
- package/lib/src/types/CharacterStyleTypes.js.map +0 -1
- package/lib/src/types/ClipboardTypes.js +0 -6
- package/lib/src/types/ClipboardTypes.js.map +0 -1
- package/lib/src/types/ColorStyleTypes.js +0 -42
- package/lib/src/types/ColorStyleTypes.js.map +0 -1
- package/lib/src/types/CommonTypes.js +0 -28
- package/lib/src/types/CommonTypes.js.map +0 -1
- package/lib/src/types/ComponentConnectorTypes.js +0 -10
- package/lib/src/types/ComponentConnectorTypes.js.map +0 -1
- package/lib/src/types/ConfigurationTypes.js +0 -43
- package/lib/src/types/ConfigurationTypes.js.map +0 -1
- package/lib/src/types/ConnectorTypes.js +0 -207
- package/lib/src/types/ConnectorTypes.js.map +0 -1
- package/lib/src/types/DataConnectorTypes.js +0 -2
- package/lib/src/types/DataConnectorTypes.js.map +0 -1
- package/lib/src/types/DebugTypes.js +0 -8
- package/lib/src/types/DebugTypes.js.map +0 -1
- package/lib/src/types/DocumentTypes.js +0 -35
- package/lib/src/types/DocumentTypes.js.map +0 -1
- package/lib/src/types/EngineEditModeTypes.js +0 -10
- package/lib/src/types/EngineEditModeTypes.js.map +0 -1
- package/lib/src/types/FontConnectorTypes.js +0 -6
- package/lib/src/types/FontConnectorTypes.js.map +0 -1
- package/lib/src/types/FontTypes.js +0 -2
- package/lib/src/types/FontTypes.js.map +0 -1
- package/lib/src/types/FrameTypes.js +0 -147
- package/lib/src/types/FrameTypes.js.map +0 -1
- package/lib/src/types/GradientStyleTypes.js +0 -16
- package/lib/src/types/GradientStyleTypes.js.map +0 -1
- package/lib/src/types/LayoutTypes.js +0 -26
- package/lib/src/types/LayoutTypes.js.map +0 -1
- package/lib/src/types/MediaConnectorTypes.js +0 -14
- package/lib/src/types/MediaConnectorTypes.js.map +0 -1
- package/lib/src/types/PageTypes.js +0 -2
- package/lib/src/types/PageTypes.js.map +0 -1
- package/lib/src/types/ParagraphStyleTypes.js +0 -17
- package/lib/src/types/ParagraphStyleTypes.js.map +0 -1
- package/lib/src/types/ShapeTypes.js +0 -13
- package/lib/src/types/ShapeTypes.js.map +0 -1
- package/lib/src/types/TextStyleTypes.js +0 -83
- package/lib/src/types/TextStyleTypes.js.map +0 -1
- package/lib/src/types/TextTypes.js +0 -6
- package/lib/src/types/TextTypes.js.map +0 -1
- package/lib/src/types/VariableTypes.js +0 -70
- package/lib/src/types/VariableTypes.js.map +0 -1
- package/lib/src/types/ViewModeTypes.js +0 -6
- package/lib/src/types/ViewModeTypes.js.map +0 -1
- package/lib/src/types/ViewportTypes.js +0 -2
- package/lib/src/types/ViewportTypes.js.map +0 -1
- package/lib/src/utils/BrandKitAdapter.js +0 -45
- package/lib/src/utils/BrandKitAdapter.js.map +0 -1
- package/lib/src/utils/ConfigHelper.js +0 -92
- package/lib/src/utils/ConfigHelper.js.map +0 -1
- package/lib/src/utils/ConnectorCompatibilityTools.js +0 -54
- package/lib/src/utils/ConnectorCompatibilityTools.js.map +0 -1
- package/lib/src/utils/DataItemMappingTools.js +0 -58
- package/lib/src/utils/DataItemMappingTools.js.map +0 -1
- package/lib/src/utils/EditorResponseData.js +0 -44
- package/lib/src/utils/EditorResponseData.js.map +0 -1
- package/lib/src/utils/EngineCallbackHandler.js +0 -23
- package/lib/src/utils/EngineCallbackHandler.js.map +0 -1
- package/lib/src/utils/EngineEvent.js +0 -44
- package/lib/src/utils/EngineEvent.js.map +0 -1
- package/lib/src/utils/EngineEventTrigger.js +0 -33
- package/lib/src/utils/EngineEventTrigger.js.map +0 -1
- package/lib/src/utils/Enums.js +0 -47
- package/lib/src/utils/Enums.js.map +0 -1
- package/lib/src/utils/LocalConfigurationDecorator.js +0 -76
- package/lib/src/utils/LocalConfigurationDecorator.js.map +0 -1
- package/lib/src/utils/MathUtils.js +0 -5
- package/lib/src/utils/MathUtils.js.map +0 -1
- package/lib/src/utils/VariableHelper.js +0 -12
- package/lib/src/utils/VariableHelper.js.map +0 -1
package/_bundles/main.es.js
DELETED
|
@@ -1,2688 +0,0 @@
|
|
|
1
|
-
var Re = (s) => {
|
|
2
|
-
throw TypeError(s);
|
|
3
|
-
};
|
|
4
|
-
var xe = (s, o, e) => o.has(s) || Re("Cannot " + e);
|
|
5
|
-
var a = (s, o, e) => (xe(s, o, "read from private field"), e ? e.call(s) : o.get(s)), u = (s, o, e) => o.has(s) ? Re("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, e), g = (s, o, e, t) => (xe(s, o, "write to private field"), t ? t.call(s, e) : o.set(s, e), e);
|
|
6
|
-
const Ns = "2.26.latest", ms = {
|
|
7
|
-
current: Ns
|
|
8
|
-
}, Rs = "1.43.0", fs = {
|
|
9
|
-
version: Rs
|
|
10
|
-
};
|
|
11
|
-
var j;
|
|
12
|
-
(function(s) {
|
|
13
|
-
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
|
-
})(j || (j = {}));
|
|
15
|
-
var lt;
|
|
16
|
-
(function(s) {
|
|
17
|
-
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
|
-
})(lt || (lt = {}));
|
|
19
|
-
var Gt;
|
|
20
|
-
(function(s) {
|
|
21
|
-
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
22
|
-
})(Gt || (Gt = {}));
|
|
23
|
-
var ce;
|
|
24
|
-
(function(s) {
|
|
25
|
-
s.DataCloneError = "DataCloneError";
|
|
26
|
-
})(ce || (ce = {}));
|
|
27
|
-
var dt;
|
|
28
|
-
(function(s) {
|
|
29
|
-
s.Message = "message";
|
|
30
|
-
})(dt || (dt = {}));
|
|
31
|
-
const xs = (s, o) => {
|
|
32
|
-
const e = [];
|
|
33
|
-
let t = !1;
|
|
34
|
-
return {
|
|
35
|
-
destroy(r) {
|
|
36
|
-
t || (t = !0, o(`${s}: Destroying connection`), e.forEach((n) => {
|
|
37
|
-
n(r);
|
|
38
|
-
}));
|
|
39
|
-
},
|
|
40
|
-
onDestroy(r) {
|
|
41
|
-
t ? r() : e.push(r);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}, Ms = (s) => (...o) => {
|
|
45
|
-
s && console.log("[Penpal]", ...o);
|
|
46
|
-
}, Vs = {
|
|
47
|
-
"http:": "80",
|
|
48
|
-
"https:": "443"
|
|
49
|
-
}, Bs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Js = ["file:", "data:"], Us = (s) => {
|
|
50
|
-
if (s && Js.find((h) => s.startsWith(h)))
|
|
51
|
-
return "null";
|
|
52
|
-
const o = document.location, e = Bs.exec(s);
|
|
53
|
-
let t, r, n;
|
|
54
|
-
e ? (t = e[1] ? e[1] : o.protocol, r = e[2], n = e[4]) : (t = o.protocol, r = o.hostname, n = o.port);
|
|
55
|
-
const c = n && n !== Vs[t] ? `:${n}` : "";
|
|
56
|
-
return `${t}//${r}${c}`;
|
|
57
|
-
}, Me = ({ name: s, message: o, stack: e }) => ({
|
|
58
|
-
name: s,
|
|
59
|
-
message: o,
|
|
60
|
-
stack: e
|
|
61
|
-
}), ks = (s) => {
|
|
62
|
-
const o = new Error();
|
|
63
|
-
return Object.keys(s).forEach((e) => o[e] = s[e]), o;
|
|
64
|
-
}, Gs = (s, o, e) => {
|
|
65
|
-
const { localName: t, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
|
|
66
|
-
let l = !1;
|
|
67
|
-
const p = (y) => {
|
|
68
|
-
if (y.source !== n || y.data.penpal !== j.Call)
|
|
69
|
-
return;
|
|
70
|
-
if (y.origin !== h) {
|
|
71
|
-
e(`${t} received message from origin ${y.origin} which did not match expected origin ${h}`);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const b = y.data, { methodName: S, args: v, id: E } = b;
|
|
75
|
-
e(`${t}: Received ${S}() call`);
|
|
76
|
-
const O = (f) => (H) => {
|
|
77
|
-
if (e(`${t}: Sending ${S}() reply`), l) {
|
|
78
|
-
e(`${t}: Unable to send ${S}() reply due to destroyed connection`);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const x = {
|
|
82
|
-
penpal: j.Reply,
|
|
83
|
-
id: E,
|
|
84
|
-
resolution: f,
|
|
85
|
-
returnValue: H
|
|
86
|
-
};
|
|
87
|
-
f === lt.Rejected && H instanceof Error && (x.returnValue = Me(H), x.returnValueIsError = !0);
|
|
88
|
-
try {
|
|
89
|
-
n.postMessage(x, c);
|
|
90
|
-
} catch (I) {
|
|
91
|
-
if (I.name === ce.DataCloneError) {
|
|
92
|
-
const W = {
|
|
93
|
-
penpal: j.Reply,
|
|
94
|
-
id: E,
|
|
95
|
-
resolution: lt.Rejected,
|
|
96
|
-
returnValue: Me(I),
|
|
97
|
-
returnValueIsError: !0
|
|
98
|
-
};
|
|
99
|
-
n.postMessage(W, c);
|
|
100
|
-
}
|
|
101
|
-
throw I;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
new Promise((f) => f(o[S].apply(o, v))).then(O(lt.Fulfilled), O(lt.Rejected));
|
|
105
|
-
};
|
|
106
|
-
return r.addEventListener(dt.Message, p), () => {
|
|
107
|
-
l = !0, r.removeEventListener(dt.Message, p);
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
let Ts = 0;
|
|
111
|
-
const _s = () => ++Ts, Ss = ".", bs = (s) => s ? s.split(Ss) : [], Hs = (s) => s.join(Ss), $s = (s, o) => {
|
|
112
|
-
const e = bs(o || "");
|
|
113
|
-
return e.push(s), Hs(e);
|
|
114
|
-
}, zs = (s, o, e) => {
|
|
115
|
-
const t = bs(o);
|
|
116
|
-
return t.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === t.length - 1 && (r[n] = e), r[n]), s), s;
|
|
117
|
-
}, vs = (s, o) => {
|
|
118
|
-
const e = {};
|
|
119
|
-
return Object.keys(s).forEach((t) => {
|
|
120
|
-
const r = s[t], n = $s(t, o);
|
|
121
|
-
typeof r == "object" && Object.assign(e, vs(r, n)), typeof r == "function" && (e[n] = r);
|
|
122
|
-
}), e;
|
|
123
|
-
}, Ks = (s) => {
|
|
124
|
-
const o = {};
|
|
125
|
-
for (const e in s)
|
|
126
|
-
zs(o, e, s[e]);
|
|
127
|
-
return o;
|
|
128
|
-
}, js = (s, o, e, t, r) => {
|
|
129
|
-
const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: p } = o;
|
|
130
|
-
let y = !1;
|
|
131
|
-
r(`${n}: Connecting call sender`);
|
|
132
|
-
const b = (v) => (...E) => {
|
|
133
|
-
r(`${n}: Sending ${v}() call`);
|
|
134
|
-
let O;
|
|
135
|
-
try {
|
|
136
|
-
h.closed && (O = !0);
|
|
137
|
-
} catch {
|
|
138
|
-
O = !0;
|
|
139
|
-
}
|
|
140
|
-
if (O && t(), y) {
|
|
141
|
-
const f = new Error(`Unable to send ${v}() call due to destroyed connection`);
|
|
142
|
-
throw f.code = Gt.ConnectionDestroyed, f;
|
|
143
|
-
}
|
|
144
|
-
return new Promise((f, H) => {
|
|
145
|
-
const x = _s(), I = (q) => {
|
|
146
|
-
if (q.source !== h || q.data.penpal !== j.Reply || q.data.id !== x)
|
|
147
|
-
return;
|
|
148
|
-
if (q.origin !== p) {
|
|
149
|
-
r(`${n} received message from origin ${q.origin} which did not match expected origin ${p}`);
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
const bt = q.data;
|
|
153
|
-
r(`${n}: Received ${v}() reply`), c.removeEventListener(dt.Message, I);
|
|
154
|
-
let vt = bt.returnValue;
|
|
155
|
-
bt.returnValueIsError && (vt = ks(vt)), (bt.resolution === lt.Fulfilled ? f : H)(vt);
|
|
156
|
-
};
|
|
157
|
-
c.addEventListener(dt.Message, I);
|
|
158
|
-
const W = {
|
|
159
|
-
penpal: j.Call,
|
|
160
|
-
id: x,
|
|
161
|
-
methodName: v,
|
|
162
|
-
args: E
|
|
163
|
-
};
|
|
164
|
-
h.postMessage(W, l);
|
|
165
|
-
});
|
|
166
|
-
}, S = e.reduce((v, E) => (v[E] = b(E), v), {});
|
|
167
|
-
return Object.assign(s, Ks(S)), () => {
|
|
168
|
-
y = !0;
|
|
169
|
-
};
|
|
170
|
-
}, Ws = (s, o, e, t, r) => {
|
|
171
|
-
const { destroy: n, onDestroy: c } = t;
|
|
172
|
-
let h, l;
|
|
173
|
-
const p = {};
|
|
174
|
-
return (y) => {
|
|
175
|
-
if (y.origin !== o) {
|
|
176
|
-
r(`Parent: Handshake - Received ACK message from origin ${y.origin} which did not match expected origin ${o}`);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
r("Parent: Handshake - Received ACK");
|
|
180
|
-
const b = {
|
|
181
|
-
localName: "Parent",
|
|
182
|
-
local: window,
|
|
183
|
-
remote: y.source,
|
|
184
|
-
originForSending: e,
|
|
185
|
-
originForReceiving: o
|
|
186
|
-
};
|
|
187
|
-
h && h(), h = Gs(b, s, r), c(h), l && l.forEach((v) => {
|
|
188
|
-
delete p[v];
|
|
189
|
-
}), l = y.data.methodNames;
|
|
190
|
-
const S = js(p, b, l, n, r);
|
|
191
|
-
return c(S), p;
|
|
192
|
-
};
|
|
193
|
-
}, qs = (s, o, e, t) => (r) => {
|
|
194
|
-
if (r.origin !== e) {
|
|
195
|
-
s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${e}`);
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
s("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
199
|
-
const n = {
|
|
200
|
-
penpal: j.SynAck,
|
|
201
|
-
methodNames: Object.keys(o)
|
|
202
|
-
};
|
|
203
|
-
r.source.postMessage(n, t);
|
|
204
|
-
}, Ys = 6e4, Zs = (s, o) => {
|
|
205
|
-
const { destroy: e, onDestroy: t } = o, r = setInterval(() => {
|
|
206
|
-
s.isConnected || (clearInterval(r), e());
|
|
207
|
-
}, Ys);
|
|
208
|
-
t(() => {
|
|
209
|
-
clearInterval(r);
|
|
210
|
-
});
|
|
211
|
-
}, Qs = (s, o) => {
|
|
212
|
-
let e;
|
|
213
|
-
return s !== void 0 && (e = window.setTimeout(() => {
|
|
214
|
-
const t = new Error(`Connection timed out after ${s}ms`);
|
|
215
|
-
t.code = Gt.ConnectionTimeout, o(t);
|
|
216
|
-
}, s)), () => {
|
|
217
|
-
clearTimeout(e);
|
|
218
|
-
};
|
|
219
|
-
}, Xs = (s) => {
|
|
220
|
-
if (!s.src && !s.srcdoc) {
|
|
221
|
-
const o = new Error("Iframe must have src or srcdoc property defined.");
|
|
222
|
-
throw o.code = Gt.NoIframeSrc, o;
|
|
223
|
-
}
|
|
224
|
-
}, tr = (s) => {
|
|
225
|
-
let { iframe: o, methods: e = {}, childOrigin: t, timeout: r, debug: n = !1 } = s;
|
|
226
|
-
const c = Ms(n), h = xs("Parent", c), { onDestroy: l, destroy: p } = h;
|
|
227
|
-
t || (Xs(o), t = Us(o.src));
|
|
228
|
-
const y = t === "null" ? "*" : t, b = vs(e), S = qs(c, b, t, y), v = Ws(b, t, y, h, c);
|
|
229
|
-
return {
|
|
230
|
-
promise: new Promise((O, f) => {
|
|
231
|
-
const H = Qs(r, p), x = (I) => {
|
|
232
|
-
if (!(I.source !== o.contentWindow || !I.data)) {
|
|
233
|
-
if (I.data.penpal === j.Syn) {
|
|
234
|
-
S(I);
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
if (I.data.penpal === j.Ack) {
|
|
238
|
-
const W = v(I);
|
|
239
|
-
W && (H(), O(W));
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
window.addEventListener(dt.Message, x), c("Parent: Awaiting handshake"), Zs(o, h), l((I) => {
|
|
245
|
-
window.removeEventListener(dt.Message, x), I && f(I);
|
|
246
|
-
});
|
|
247
|
-
}),
|
|
248
|
-
destroy() {
|
|
249
|
-
p();
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
}, er = (s) => {
|
|
253
|
-
const o = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
|
|
254
|
-
let e = "";
|
|
255
|
-
return o.test(s) ? e = s : s.indexOf("/index.html") > -1 ? e = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (e = `${s}/`), e;
|
|
256
|
-
}, sr = (s, o, e) => {
|
|
257
|
-
const t = er(o), n = `<html>
|
|
258
|
-
<head>
|
|
259
|
-
<base href="/" />
|
|
260
|
-
<meta charset="UTF-8"/>
|
|
261
|
-
<!-- use this property to pass the StudioStyling to the engine -->
|
|
262
|
-
<meta name="studio-styling" content='${JSON.stringify(e || {})}'>
|
|
263
|
-
</head>
|
|
264
|
-
<body>
|
|
265
|
-
<script>
|
|
266
|
-
const handleIframeError = (event) => {
|
|
267
|
-
if (window.parent && window.parent !== window) {
|
|
268
|
-
window.parent.postMessage(
|
|
269
|
-
{
|
|
270
|
-
type: 'iframe-error',
|
|
271
|
-
error: {
|
|
272
|
-
message: event.message,
|
|
273
|
-
filename: event.filename,
|
|
274
|
-
lineno: event.lineno,
|
|
275
|
-
colno: event.colno,
|
|
276
|
-
error: event.error?.toString(),
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
window.location.ancestorOrigins[0] || window.location.origin,
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
const handleUnhandledRejection = (event) => {
|
|
284
|
-
if (window.parent && window.parent !== window) {
|
|
285
|
-
window.parent.postMessage(
|
|
286
|
-
{
|
|
287
|
-
type: 'iframe-error',
|
|
288
|
-
error: { message: event.reason?.toString() || 'Unhandled promise rejection' },
|
|
289
|
-
},
|
|
290
|
-
window.location.ancestorOrigins[0] || window.location.origin,
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
window.addEventListener('error', handleIframeError);
|
|
295
|
-
window.addEventListener('unhandledrejection', handleUnhandledRejection);
|
|
296
|
-
<\/script>
|
|
297
|
-
<script src="${t}init.js" async><\/script>
|
|
298
|
-
<script src="${t}flutter_bootstrap.js"><\/script>
|
|
299
|
-
<script>
|
|
300
|
-
try {
|
|
301
|
-
if(!window?.initializeStudioEngine){
|
|
302
|
-
throw new Error('Failed to initialize studio engine: initializeStudioEngine not found');
|
|
303
|
-
}
|
|
304
|
-
initializeStudioEngine({
|
|
305
|
-
assetBase: '${t}',
|
|
306
|
-
});
|
|
307
|
-
} catch(error) {
|
|
308
|
-
if (window.parent && window.parent !== window) {
|
|
309
|
-
window.parent.postMessage({
|
|
310
|
-
type: 'iframe-error',
|
|
311
|
-
error: {
|
|
312
|
-
message: error?.message || 'Error initializing studio engine',
|
|
313
|
-
error: error?.toString()
|
|
314
|
-
}
|
|
315
|
-
}, window.location.ancestorOrigins[0] || window.location.origin);
|
|
316
|
-
}
|
|
317
|
-
throw error;
|
|
318
|
-
} finally {
|
|
319
|
-
window.removeEventListener('error', handleIframeError);
|
|
320
|
-
window.removeEventListener('unhandledrejection', handleUnhandledRejection);
|
|
321
|
-
}
|
|
322
|
-
<\/script>
|
|
323
|
-
</body>
|
|
324
|
-
</html>`;
|
|
325
|
-
s.srcdoc = n;
|
|
326
|
-
};
|
|
327
|
-
let ee = null;
|
|
328
|
-
const rr = (s, o, e, t = "chili-editor", r, n) => {
|
|
329
|
-
ee && window.removeEventListener("message", ee);
|
|
330
|
-
const c = `#${t}`, h = document.createElement("iframe");
|
|
331
|
-
h.setAttribute("srcdoc", " "), h.setAttribute("title", "Chili-Editor"), h.setAttribute("style", "width: 100%; height: 100%;"), h.setAttribute("frameBorder", "0"), h.setAttribute("referrerpolicy", "origin");
|
|
332
|
-
const l = () => {
|
|
333
|
-
const p = document.querySelector(c);
|
|
334
|
-
if (p) {
|
|
335
|
-
p == null || p.appendChild(h), h.addEventListener(
|
|
336
|
-
"error",
|
|
337
|
-
() => {
|
|
338
|
-
const y = new Error("Failed to setup frame: iframe failed to load");
|
|
339
|
-
n == null || n(y);
|
|
340
|
-
},
|
|
341
|
-
{ capture: !0, once: !0 }
|
|
342
|
-
);
|
|
343
|
-
try {
|
|
344
|
-
sr(h, s, r);
|
|
345
|
-
} catch (y) {
|
|
346
|
-
y instanceof Error ? n == null || n(y) : n == null || n(new Error(`Failed to setup frame: ${y}`));
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
|
|
351
|
-
l();
|
|
352
|
-
}), ee = (p) => {
|
|
353
|
-
var y;
|
|
354
|
-
if (p.source === h.contentWindow && ((y = p.data) == null ? void 0 : y.type) === "iframe-error") {
|
|
355
|
-
const b = p.data.error, S = new Error(b.message || "Failed to setup frame: error in iframe");
|
|
356
|
-
n == null || n(S);
|
|
357
|
-
}
|
|
358
|
-
}, window.addEventListener("message", ee), e(
|
|
359
|
-
tr({
|
|
360
|
-
// The iframe to which a connection should be made
|
|
361
|
-
iframe: h,
|
|
362
|
-
// All the methods that we want to expose to the child should be inside the methods object
|
|
363
|
-
// f.e. stateChange(documentJson)
|
|
364
|
-
methods: {
|
|
365
|
-
actionsChanged: o.onActionsChanged,
|
|
366
|
-
stateChanged: o.onStateChanged,
|
|
367
|
-
documentLoaded: o.onDocumentLoaded,
|
|
368
|
-
authExpired: o.onAuthExpired,
|
|
369
|
-
viewportRequested: o.onViewportRequested,
|
|
370
|
-
selectedFramesContent: o.onSelectedFramesContentChanged,
|
|
371
|
-
selectedFramesLayout: o.onSelectedFramesLayoutChanged,
|
|
372
|
-
allFramesLayout: o.onFramesLayoutChanged,
|
|
373
|
-
selectedLayoutProperties: o.onSelectedLayoutPropertiesChanged,
|
|
374
|
-
openLayoutPropertiesPanel: o.onPageSelectionChanged,
|
|
375
|
-
selectedLayoutUnit: o.onSelectedLayoutUnitChanged,
|
|
376
|
-
scrubberPositionChanged: o.onScrubberPositionChanged,
|
|
377
|
-
frameAnimationsChanged: o.onFrameAnimationsChanged,
|
|
378
|
-
selectedToolChanged: o.onSelectedToolChanged,
|
|
379
|
-
variableListChanged: o.onVariableListChanged,
|
|
380
|
-
undoStackStateChanged: o.onUndoStateChanged,
|
|
381
|
-
selectedLayoutFramesChanged: o.onSelectedLayoutFramesChanged,
|
|
382
|
-
selectedTextStyleChanged: o.onSelectedTextStyleChanged,
|
|
383
|
-
colorsChanged: o.onColorsChanged,
|
|
384
|
-
paragraphStylesChanged: o.onParagraphStylesChanged,
|
|
385
|
-
characterStylesChanged: o.onCharacterStylesChanged,
|
|
386
|
-
fontFamiliesChanged: o.onFontFamiliesChanged,
|
|
387
|
-
selectedLayoutId: o.onSelectedLayoutIdChanged,
|
|
388
|
-
layoutListChanged: o.onLayoutsChanged,
|
|
389
|
-
connectorEvent: o.onConnectorEvent,
|
|
390
|
-
connectorsChanged: o.onConnectorsChanged,
|
|
391
|
-
zoomChanged: o.onZoomChanged,
|
|
392
|
-
pageSnapshotInvalidated: o.onPageSnapshotInvalidated,
|
|
393
|
-
pagesChanged: o.onPagesChanged,
|
|
394
|
-
pageSizeChanged: o.onPageSizeChanged,
|
|
395
|
-
shapeCornerRadiusChanged: o.onShapeCornerRadiusChanged,
|
|
396
|
-
cropActiveFrameIdChanged: o.onCropActiveFrameIdChanged,
|
|
397
|
-
asyncError: o.onAsyncError,
|
|
398
|
-
viewModeChanged: o.onViewModeChanged,
|
|
399
|
-
barcodeValidationChanged: o.onBarcodeValidationChanged,
|
|
400
|
-
selectedPageIdChanged: o.onSelectedPageIdChanged,
|
|
401
|
-
dataSourceIdChanged: o.onDataSourceIdChanged,
|
|
402
|
-
documentIssueListChanged: o.onDocumentIssueListChanged,
|
|
403
|
-
customUndoDataChanged: o.onCustomUndoDataChanged,
|
|
404
|
-
engineEditingModeChanged: o.onEngineEditModeChanged,
|
|
405
|
-
brandKitMediaChanged: o.onBrandKitMediaChanged
|
|
406
|
-
}
|
|
407
|
-
})
|
|
408
|
-
);
|
|
409
|
-
};
|
|
410
|
-
var tt = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(tt || {}), nr = /* @__PURE__ */ ((s) => (s.full = "full", s.followConstraints = "followConstraints", s))(nr || {});
|
|
411
|
-
const ar = {
|
|
412
|
-
shortcutOptions: {
|
|
413
|
-
debugPanel: { enabled: !1 },
|
|
414
|
-
ellipse: { enabled: !1 },
|
|
415
|
-
hand: { enabled: !1 },
|
|
416
|
-
temporaryHand: { enabled: !1 },
|
|
417
|
-
image: { enabled: !1 },
|
|
418
|
-
polygon: { enabled: !1 },
|
|
419
|
-
rectangle: { enabled: !1 },
|
|
420
|
-
select: { enabled: !1 },
|
|
421
|
-
text: { enabled: !1 },
|
|
422
|
-
zoom: { enabled: !1 },
|
|
423
|
-
copyPaste: { enabled: !1 },
|
|
424
|
-
viewMode: { enabled: !1 }
|
|
425
|
-
},
|
|
426
|
-
frameEditingMode: "full"
|
|
427
|
-
/* full */
|
|
428
|
-
};
|
|
429
|
-
var ir = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(ir || {}), Is = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s.component = "component", s))(Is || {});
|
|
430
|
-
class or {
|
|
431
|
-
constructor(o, e, t, r) {
|
|
432
|
-
this.type = "action", this.message = o, this.id = e, this.event = t, this.eventChain = r;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
class cr {
|
|
436
|
-
constructor(o, e, t) {
|
|
437
|
-
this.type = "dataRow", this.count = o, this.message = e, this.exceptions = t;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
class hr extends Error {
|
|
441
|
-
constructor(o, e, t) {
|
|
442
|
-
super(e, t), this.statusCode = o;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
class dr extends Error {
|
|
446
|
-
constructor(o, e, t) {
|
|
447
|
-
super(e, t), this.context = o;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
const lr = 404075, ur = 403032;
|
|
451
|
-
function St(s) {
|
|
452
|
-
const o = s.error ?? "Yikes, something went wrong", e = {
|
|
453
|
-
cause: {
|
|
454
|
-
name: String(s.status),
|
|
455
|
-
message: s.error ?? "Yikes, something went wrong"
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
if (s.status === lr) {
|
|
459
|
-
const r = JSON.parse(s.data).statusCode;
|
|
460
|
-
throw new hr(r, o, e);
|
|
461
|
-
} else
|
|
462
|
-
throw new Error(o, e);
|
|
463
|
-
}
|
|
464
|
-
function gr(s) {
|
|
465
|
-
const o = [
|
|
466
|
-
/DateVariable '([^']+)' should not be part of excludedDays, ".*" was given/,
|
|
467
|
-
/DateVariable '([^']+)' expects \$date to be > startDate:.*$/,
|
|
468
|
-
/DateVariable '([^']+)' expects \$date to be < endDate:.*$/,
|
|
469
|
-
/NumberVariable '([^']+)' expects \$extractedValue to be >= .+$/,
|
|
470
|
-
/NumberVariable '([^']+)' expects \$extractedValue to be <= .+$/
|
|
471
|
-
];
|
|
472
|
-
for (const e of o)
|
|
473
|
-
if (s.match(e))
|
|
474
|
-
return { valid: !0 };
|
|
475
|
-
return { valid: !1 };
|
|
476
|
-
}
|
|
477
|
-
function yr(s, o) {
|
|
478
|
-
if (s.status === ur && s.error) {
|
|
479
|
-
const e = s.error;
|
|
480
|
-
if (gr(e).valid)
|
|
481
|
-
throw new dr(o, e, {
|
|
482
|
-
cause: { name: String(s.status), message: e }
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
function pr(s) {
|
|
487
|
-
St(s);
|
|
488
|
-
}
|
|
489
|
-
function i(s, o) {
|
|
490
|
-
let e = !0, t = !1, r = pr;
|
|
491
|
-
typeof o == "function" ? (t = !0, r = o) : typeof o == "boolean" && (e = o);
|
|
492
|
-
try {
|
|
493
|
-
s.success || (r(s), t && St(s));
|
|
494
|
-
const n = s.data && e;
|
|
495
|
-
return {
|
|
496
|
-
...s,
|
|
497
|
-
parsedData: n ? JSON.parse(s.data) : s.data
|
|
498
|
-
};
|
|
499
|
-
} catch (n) {
|
|
500
|
-
throw console.error(n), n;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
var L;
|
|
504
|
-
class Ve {
|
|
505
|
-
/**
|
|
506
|
-
* @ignore
|
|
507
|
-
*/
|
|
508
|
-
constructor(o) {
|
|
509
|
-
/**
|
|
510
|
-
* @ignore
|
|
511
|
-
*/
|
|
512
|
-
u(this, L);
|
|
513
|
-
this.getAll = async () => (await a(this, L)).getActions().then((t) => i(t)), this.getById = async (e) => (await a(this, L)).getActionById(e).then((r) => i(r)), this.create = async () => (await a(this, L)).createAction().then((t) => i(t)), this.duplicate = async (e) => (await a(this, L)).duplicateAction(e).then((r) => i(r)), this.remove = async (e) => (await a(this, L)).removeAction(e).then((r) => i(r)), this.update = async (e, t) => (await a(this, L)).updateAction(e, JSON.stringify(t)).then((n) => i(n)), this.rename = async (e, t) => this.update(e, { name: t }), this.updateScript = async (e, t) => this.update(e, { script: t }), this.updateTriggers = async (e, t) => this.update(e, { triggers: t }), this.move = async (e, t) => (await a(this, L)).moveActions(e, t).then((n) => i(n)), this.setTypeError = async (e, t) => this.update(e, { hasTypeError: t }), this.disable = async () => (await a(this, L)).disableActions().then((t) => i(t)), this.enable = async () => (await a(this, L)).enableActions().then((t) => i(t)), this.enableForComponents = async (e) => (await a(this, L)).enableComponentActions(e).then((r) => i(r)), g(this, L, o);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
L = new WeakMap();
|
|
517
|
-
var N;
|
|
518
|
-
class Be {
|
|
519
|
-
/**
|
|
520
|
-
* @ignore
|
|
521
|
-
*/
|
|
522
|
-
constructor(o) {
|
|
523
|
-
/**
|
|
524
|
-
* @ignore
|
|
525
|
-
*/
|
|
526
|
-
u(this, N);
|
|
527
|
-
this.getAllOnSelectedLayout = async () => (await a(this, N)).getAnimationsOnSelectedLayout().then((t) => i(t)), this.getByFrameId = async (e, t) => (await a(this, N)).getAnimationByFrameId(e, t).then((n) => i(n)), this.getByLayoutId = async (e) => (await a(this, N)).getAnimationsByLayoutId(e).then((r) => i(r)), this.setFrameAnimation = async (e) => (await a(this, N)).setFrameAnimation(JSON.stringify(e)).then(
|
|
528
|
-
(r) => i({ ...r, data: JSON.stringify(e) })
|
|
529
|
-
), this.play = async () => (await a(this, N)).playAnimation().then((t) => i(t)), this.pause = async () => (await a(this, N)).pauseAnimation().then((t) => i(t)), this.setScrubberPosition = async (e) => (await a(this, N)).setScrubberPosition(e).then((r) => i(r)), this.setDuration = async (e) => (await a(this, N)).setAnimationDuration(e).then((r) => i(r)), this.resetFrameAnimation = async (e) => (await a(this, N)).resetFrameAnimation(e).then((r) => i(r)), this.reset = async () => (await a(this, N)).resetAnimation().then((t) => i(t)), g(this, N, o);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
N = new WeakMap();
|
|
533
|
-
var $ = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))($ || {}), Jt = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Jt || {}), It = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(It || {}), wr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(wr || {}), Cr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(Cr || {}), X = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(X || {}), mr = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(mr || {}), fr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(fr || {}), Sr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(Sr || {}), T;
|
|
534
|
-
class Je {
|
|
535
|
-
/**
|
|
536
|
-
* @ignore
|
|
537
|
-
*/
|
|
538
|
-
constructor(o) {
|
|
539
|
-
/**
|
|
540
|
-
* @ignore
|
|
541
|
-
*/
|
|
542
|
-
u(this, T);
|
|
543
|
-
this.setBarcodeProperties = async (e, t) => (await a(this, T)).setBarcodeProperties(e, JSON.stringify(t)).then((n) => i(n)), this.setEnableBackground = async (e, t) => {
|
|
544
|
-
const r = { enableBackground: t };
|
|
545
|
-
return this.setBarcodeProperties(e, r);
|
|
546
|
-
}, this.setBackgroundColor = async (e, t) => {
|
|
547
|
-
const r = { backgroundColor: t };
|
|
548
|
-
return this.setBarcodeProperties(e, r);
|
|
549
|
-
}, this.setEnableBars = async (e, t) => {
|
|
550
|
-
const r = { enableBars: t };
|
|
551
|
-
return this.setBarcodeProperties(e, r);
|
|
552
|
-
}, this.setBarColor = async (e, t) => {
|
|
553
|
-
const r = { barColor: t };
|
|
554
|
-
return this.setBarcodeProperties(e, r);
|
|
555
|
-
}, this.setBarcodeSource = async (e, t) => (await a(this, T)).setBarcodeSource(e, JSON.stringify(t)).then((n) => i(n)), this.removeBarcodeSource = async (e) => (await a(this, T)).setBarcodeSource(e, null).then((r) => i(r)), this.setEnableText = async (e, t) => {
|
|
556
|
-
const r = { enableText: t };
|
|
557
|
-
return this.setBarcodeProperties(e, r);
|
|
558
|
-
}, this.setBarHeight = async (e, t) => {
|
|
559
|
-
const r = { barHeight: t };
|
|
560
|
-
return this.setBarcodeProperties(e, r);
|
|
561
|
-
}, this.setMagnification = async (e, t) => {
|
|
562
|
-
const r = { magnification: t };
|
|
563
|
-
return this.setBarcodeProperties(e, r);
|
|
564
|
-
}, this.setQuietZoneValue = async (e, t, r) => {
|
|
565
|
-
const n = r ? {
|
|
566
|
-
left: r === X.left ? t : void 0,
|
|
567
|
-
top: r === X.top ? t : void 0,
|
|
568
|
-
right: r === X.right ? t : void 0,
|
|
569
|
-
bottom: r === X.bottom ? t : void 0
|
|
570
|
-
} : { left: t, top: t, right: t, bottom: t };
|
|
571
|
-
return (await a(this, T)).setBarcodeProperties(e, JSON.stringify({ quietZone: n })).then((h) => i(h));
|
|
572
|
-
}, this.setAreQuietZoneValuesCombined = async (e, t) => {
|
|
573
|
-
const r = { areQuietZoneValuesCombined: t };
|
|
574
|
-
return (await a(this, T)).setBarcodeProperties(e, JSON.stringify({ quietZone: r })).then((c) => i(c));
|
|
575
|
-
}, this.setErrorCorrectionLevel = async (e, t) => (await a(this, T)).setBarcodeProperties(e, JSON.stringify({ errorCorrectionLevel: t })).then((n) => i(n)), this.setCharacterSet = async (e, t) => (await a(this, T)).setBarcodeProperties(e, JSON.stringify({ characterSet: t })).then((n) => i(n)), this.setDrawLightMarginIndicator = async (e, t) => {
|
|
576
|
-
const r = { drawStartStopChars: t };
|
|
577
|
-
return this.setBarcodeProperties(e, r);
|
|
578
|
-
}, this.setDrawStartStopChars = async (e, t) => {
|
|
579
|
-
const r = { drawStartStopChars: t };
|
|
580
|
-
return this.setBarcodeProperties(e, r);
|
|
581
|
-
}, this.getBarcodeConfigationOptions = (e) => {
|
|
582
|
-
let t = !0, r = !0, n = !0, c, h, l = !1, p = !1, y = !1;
|
|
583
|
-
switch (e) {
|
|
584
|
-
case $.qr:
|
|
585
|
-
c = [It.iso8859_1, It.utf8], h = [
|
|
586
|
-
Jt.low,
|
|
587
|
-
Jt.medium,
|
|
588
|
-
Jt.quartile,
|
|
589
|
-
Jt.high
|
|
590
|
-
];
|
|
591
|
-
case $.dataMatrix:
|
|
592
|
-
t = !1, r = !1, n = !1, l = !0;
|
|
593
|
-
break;
|
|
594
|
-
case $.ean13:
|
|
595
|
-
t = !1, p = !0;
|
|
596
|
-
break;
|
|
597
|
-
case $.ean8:
|
|
598
|
-
p = !0;
|
|
599
|
-
case $.upca:
|
|
600
|
-
case $.upce:
|
|
601
|
-
t = !1;
|
|
602
|
-
break;
|
|
603
|
-
case $.code128:
|
|
604
|
-
case $.gs1128:
|
|
605
|
-
c = [
|
|
606
|
-
It.code128a,
|
|
607
|
-
It.code128b,
|
|
608
|
-
It.code128c
|
|
609
|
-
];
|
|
610
|
-
break;
|
|
611
|
-
case $.code39:
|
|
612
|
-
y = !0;
|
|
613
|
-
break;
|
|
614
|
-
}
|
|
615
|
-
return {
|
|
616
|
-
allowEnableMagnification: n,
|
|
617
|
-
allowBarHeight: r,
|
|
618
|
-
allowQuietZone: !0,
|
|
619
|
-
allowedCharacterSets: c,
|
|
620
|
-
allowedErrorCorrectionLevels: h,
|
|
621
|
-
allowToggleText: t,
|
|
622
|
-
quietZoneAlwaysCombined: l,
|
|
623
|
-
allowToggleLightMarginIndicator: p,
|
|
624
|
-
allowToggleDrawStartAndEndChar: y
|
|
625
|
-
};
|
|
626
|
-
}, g(this, T, o);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
T = new WeakMap();
|
|
630
|
-
function br(s) {
|
|
631
|
-
const o = s.fontFamilies.length > 0 ? String(s.fontFamilies[0].connectorId) : "", e = {
|
|
632
|
-
id: s.id ?? "",
|
|
633
|
-
name: s.name ?? "",
|
|
634
|
-
dateCreated: "",
|
|
635
|
-
// This is not supported by the API yet
|
|
636
|
-
lastModifiedDate: s.version ?? "",
|
|
637
|
-
// Ideally those types should be mapped, but this is a breaking change
|
|
638
|
-
fonts: s.fontFamilies,
|
|
639
|
-
colors: s.colors,
|
|
640
|
-
characterStyles: s.characterStyles,
|
|
641
|
-
paragraphStyles: s.paragraphStyles,
|
|
642
|
-
media: s.media,
|
|
643
|
-
themes: s.themes
|
|
644
|
-
};
|
|
645
|
-
return {
|
|
646
|
-
id: s.id ?? "",
|
|
647
|
-
name: s.name ?? "",
|
|
648
|
-
fontConnectorId: o,
|
|
649
|
-
brandKit: e
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
function vr(s) {
|
|
653
|
-
return {
|
|
654
|
-
id: s.id ?? "",
|
|
655
|
-
version: s.version ?? "",
|
|
656
|
-
name: s.name ?? "",
|
|
657
|
-
colors: s.colors,
|
|
658
|
-
gradients: s.gradients,
|
|
659
|
-
fonts: s.fontFamilies,
|
|
660
|
-
characterStyles: s.characterStyles,
|
|
661
|
-
paragraphStyles: s.paragraphStyles,
|
|
662
|
-
media: s.media,
|
|
663
|
-
themes: s.themes
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
var A, ys;
|
|
667
|
-
let Ue = (ys = class {
|
|
668
|
-
/**
|
|
669
|
-
* @ignore
|
|
670
|
-
*/
|
|
671
|
-
constructor(o, e) {
|
|
672
|
-
/**
|
|
673
|
-
* @ignore
|
|
674
|
-
*/
|
|
675
|
-
u(this, A);
|
|
676
|
-
this.getId = async () => (await a(this, A)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, A)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, A)).getBrandKitName().then((r) => i(r)), this.rename = async (t) => (await a(this, A)).renameBrandKit(t).then((n) => i(n)), this.updateIdAndVersion = async (t, r) => (await a(this, A)).updateBrandKitIdAndVersion(t, r).then((c) => i(c)), this.get = async () => {
|
|
677
|
-
const r = await (await a(this, A)).getBrandKit(), n = i(r), c = n.parsedData;
|
|
678
|
-
if (c == null)
|
|
679
|
-
throw new Error("Brand kit response has no data");
|
|
680
|
-
return {
|
|
681
|
-
...n,
|
|
682
|
-
parsedData: br(c)
|
|
683
|
-
};
|
|
684
|
-
}, this.getAllMedia = async () => (await a(this, A)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (t, r, n) => (await a(this, A)).addBrandKitMedia(t, r, n).then((h) => i(h)), this.updateMedia = async (t, r, n) => (await a(this, A)).updateBrandKitMedia(t, r, n).then((h) => i(h)), this.renameMedia = async (t, r) => (await a(this, A)).renameBrandKitMedia(t, r).then((c) => i(c)), this.removeMedia = async (t) => (await a(this, A)).removeBrandKitMedia(t).then((n) => i(n)), this.remove = async () => {
|
|
685
|
-
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], l = (await this.paragraphStyleController.getAll()).parsedData || [], y = (await this.characterStyleController.getAll()).parsedData || [], S = (await this.fontController.getFontFamilies()).parsedData || [], E = (await this.getAllMedia()).parsedData || [];
|
|
686
|
-
await this.undoManagerController.record("brandKit.remove", async (O) => {
|
|
687
|
-
for (const f of r)
|
|
688
|
-
await O.colorStyle.remove(f.id);
|
|
689
|
-
for (const f of c)
|
|
690
|
-
await O.gradientStyle.remove(f.id);
|
|
691
|
-
for (const f of l)
|
|
692
|
-
await O.paragraphStyle.remove(f.id);
|
|
693
|
-
for (const f of y)
|
|
694
|
-
await O.characterStyle.remove(f.id);
|
|
695
|
-
for (const f of S)
|
|
696
|
-
await O.font.removeFontFamily(f.id);
|
|
697
|
-
for (const f of E)
|
|
698
|
-
await this.removeMedia(f.name);
|
|
699
|
-
});
|
|
700
|
-
}, this.set = async (t) => {
|
|
701
|
-
const n = await (await a(this, A)).setBrandKit(JSON.stringify(t.brandKit)), c = i(n), h = c.parsedData;
|
|
702
|
-
if (h == null)
|
|
703
|
-
throw new Error("Brand kit set response has no data");
|
|
704
|
-
return {
|
|
705
|
-
...c,
|
|
706
|
-
parsedData: vr(h)
|
|
707
|
-
};
|
|
708
|
-
}, this.isAutoSync = async () => (await a(this, A)).isBrandKitAutoSync().then((r) => i(r)), this.enableAutoSync = async (t) => (await a(this, A)).enableBrandKitAutoSync(t).then((n) => i(n)), g(this, A, o), this.colorStyleController = e.colorStyle, this.gradientStyleController = e.gradientStyle, this.fontController = e.font, this.mediaController = e.mediaConnector, this.paragraphStyleController = e.paragraphStyle, this.characterStyleController = e.characterStyle, this.undoManagerController = e.undoManager;
|
|
709
|
-
}
|
|
710
|
-
}, A = new WeakMap(), ys);
|
|
711
|
-
var st;
|
|
712
|
-
class he {
|
|
713
|
-
/**
|
|
714
|
-
* @ignore
|
|
715
|
-
*/
|
|
716
|
-
constructor(o) {
|
|
717
|
-
/**
|
|
718
|
-
* @ignore
|
|
719
|
-
*/
|
|
720
|
-
u(this, st);
|
|
721
|
-
this.zoomToPage = async (e, t, r, n, c) => (e !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(t, r, n, c).then((l) => i(l))), this.getZoomPercentage = async () => (await a(this, st)).getZoomPercentage().then((t) => i(t)), this.setZoomPercentage = async (e) => (await a(this, st)).setZoomPercentage(e).then((r) => i(r)), this.setViewMode = async (e) => (await a(this, st)).setViewMode(e).then((r) => i(r)), g(this, st, o);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
st = new WeakMap();
|
|
725
|
-
var V;
|
|
726
|
-
class ke {
|
|
727
|
-
/**
|
|
728
|
-
* @ignore
|
|
729
|
-
*/
|
|
730
|
-
constructor(o) {
|
|
731
|
-
/**
|
|
732
|
-
* @ignore
|
|
733
|
-
*/
|
|
734
|
-
u(this, V);
|
|
735
|
-
this.getAll = async () => (await a(this, V)).getCharacterStyles().then((t) => i(t)), this.getById = async (e) => (await a(this, V)).getCharacterStyleById(e).then((r) => i(r)), this.create = async () => (await a(this, V)).createCharacterStyle().then((t) => i(t)), this.update = async (e, t) => (await a(this, V)).updateCharacterStyle(e, JSON.stringify(t)).then((n) => i(n)), this.remove = async (e) => (await a(this, V)).removeCharacterStyle(e).then((r) => i(r)), this.duplicate = async (e) => (await a(this, V)).duplicateCharacterStyle(e).then((r) => i(r)), this.rename = async (e, t) => (await a(this, V)).renameCharacterStyle(e, t).then((n) => i(n)), this.move = async (e, t) => (await a(this, V)).moveCharacterStyles(e, t).then((n) => i(n)), g(this, V, o);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
V = new WeakMap();
|
|
739
|
-
var rt;
|
|
740
|
-
class Ge {
|
|
741
|
-
/**
|
|
742
|
-
* @ignore
|
|
743
|
-
*/
|
|
744
|
-
constructor(o) {
|
|
745
|
-
/**
|
|
746
|
-
* @ignore
|
|
747
|
-
*/
|
|
748
|
-
u(this, rt);
|
|
749
|
-
this.copyFrames = async (e) => {
|
|
750
|
-
const r = await (await a(this, rt)).copyFrames(e);
|
|
751
|
-
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
752
|
-
}, this.cutFrames = async (e) => {
|
|
753
|
-
const r = await (await a(this, rt)).cutFrames(e);
|
|
754
|
-
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
755
|
-
}, this.pasteFrames = async () => {
|
|
756
|
-
const e = await a(this, rt), t = await navigator.clipboard.readText(), r = await e.pasteFrames(t);
|
|
757
|
-
return i(r);
|
|
758
|
-
}, this.getContentType = async () => {
|
|
759
|
-
const e = await a(this, rt), t = await navigator.clipboard.readText(), r = await e.getClipboardContentType(t);
|
|
760
|
-
return i(r);
|
|
761
|
-
}, g(this, rt, o);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
rt = new WeakMap();
|
|
765
|
-
var $t;
|
|
766
|
-
class Te {
|
|
767
|
-
/**
|
|
768
|
-
* @ignore
|
|
769
|
-
*/
|
|
770
|
-
constructor(o) {
|
|
771
|
-
/**
|
|
772
|
-
* @ignore
|
|
773
|
-
*/
|
|
774
|
-
u(this, $t);
|
|
775
|
-
this.convertToRgb = async (e) => (await a(this, $t)).colorToRgb(JSON.stringify(e)).then((r) => i(r)), g(this, $t, o);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
$t = new WeakMap();
|
|
779
|
-
var de = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(de || {}), Ir = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(Ir || {}), B;
|
|
780
|
-
class _e {
|
|
781
|
-
/**
|
|
782
|
-
* @ignore
|
|
783
|
-
*/
|
|
784
|
-
constructor(o) {
|
|
785
|
-
/**
|
|
786
|
-
* @ignore
|
|
787
|
-
*/
|
|
788
|
-
u(this, B);
|
|
789
|
-
this.getAll = async () => (await a(this, B)).getColors().then((t) => i(t)), this.getById = async (e) => (await a(this, B)).getColorById(e).then((r) => i(r)), this.create = async () => (await a(this, B)).createColor().then((t) => i(t)), this.duplicate = async (e) => (await a(this, B)).duplicateColor(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, B)).moveColors(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, B)).renameColor(e, t).then((n) => i(n)), this.update = async (e, t) => {
|
|
790
|
-
const r = await a(this, B), n = t;
|
|
791
|
-
return n.type === de.spot && (n.type = de.spotCMYK), r.updateColor(e, JSON.stringify(n)).then((c) => i(c));
|
|
792
|
-
}, this.remove = async (e) => (await a(this, B)).removeColor(e).then((r) => i(r)), g(this, B, o);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
B = new WeakMap();
|
|
796
|
-
var Tt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Tt || {}), le = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(le || {}), _t = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(_t || {}), Ar = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s.components = "components", s))(Ar || {}), Pr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(Pr || {}), Or = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(Or || {}), Fr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(Er || {}), Ut = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ut || {});
|
|
797
|
-
class Xn {
|
|
798
|
-
constructor(o, e, t, r = "engineToConnector") {
|
|
799
|
-
this.direction = "engineToConnector", this.name = o, this.direction = r, e === "var" ? this.value = `${e}.${t}` : this.value = t;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
var Dr = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(Lr || {}), ue = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(ue || {}), Nr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(Nr || {});
|
|
803
|
-
const ta = {
|
|
804
|
-
url: "grafx-media.json",
|
|
805
|
-
source: "local"
|
|
806
|
-
/* local */
|
|
807
|
-
};
|
|
808
|
-
class ea {
|
|
809
|
-
constructor(o, e) {
|
|
810
|
-
this.type = "grafxToken", this.token = o, this.headers = e;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
class sa {
|
|
814
|
-
constructor(o) {
|
|
815
|
-
this.type = "refreshed", this.headers = o;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
var Rr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(Rr || {}), xr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(xr || {}), As = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(As || {});
|
|
819
|
-
class Mr extends Error {
|
|
820
|
-
constructor(o, e) {
|
|
821
|
-
super(o), this.type = e;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
var Vr = /* @__PURE__ */ ((s) => (s.StaticKey = "staticKey", s.OAuth2ClientCredentials = "oAuth2ClientCredentials", s.OAuth2AuthorizationCode = "oAuth2AuthorizationCode", s.OAuth2ResourceOwnerPassword = "oAuth2ResourceOwnerPassword", s.OAuth2JwtBearer = "oAuth2JwtBearer", s.None = "none", s))(Vr || {});
|
|
825
|
-
class ne {
|
|
826
|
-
constructor() {
|
|
827
|
-
this.makeConnectorSourceForwardsCompatible = (o) => {
|
|
828
|
-
if (o.source != Ut.grafx || this.isSourceMigrated(o))
|
|
829
|
-
return o;
|
|
830
|
-
let e = o.url;
|
|
831
|
-
for (; e.endsWith("/"); )
|
|
832
|
-
e = e.substring(0, e.length - 1);
|
|
833
|
-
const t = e.split("/");
|
|
834
|
-
return { id: t[t.length - 1], source: Ut.grafx };
|
|
835
|
-
}, this.makeMultipleConnectorsBackwardsCompatible = (o, e) => o.map((t) => this.makeSingleConnectorBackwardsCompatible(t, e)), this.makeSingleConnectorBackwardsCompatible = (o, e) => o.source.source != Ut.grafx ? o : {
|
|
836
|
-
id: o.id,
|
|
837
|
-
name: o.name,
|
|
838
|
-
iconUrl: o.iconUrl,
|
|
839
|
-
source: this.makeConnectorSourceBackwardsCompatible(o.source, e)
|
|
840
|
-
}, this.makeConnectorSourceBackwardsCompatible = (o, e) => {
|
|
841
|
-
let t = e;
|
|
842
|
-
for (; t != null && t.endsWith("/"); )
|
|
843
|
-
t = t.substring(0, t.length - 1);
|
|
844
|
-
return {
|
|
845
|
-
url: `${t}/connectors/${o.id}`,
|
|
846
|
-
source: Ut.grafx
|
|
847
|
-
};
|
|
848
|
-
}, this.isSourceMigrated = (o) => "id" in o;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
var R, At, ut, ps;
|
|
852
|
-
let He = (ps = class {
|
|
853
|
-
/**
|
|
854
|
-
* @ignore
|
|
855
|
-
*/
|
|
856
|
-
constructor(o, e) {
|
|
857
|
-
/**
|
|
858
|
-
* @ignore
|
|
859
|
-
*/
|
|
860
|
-
u(this, R);
|
|
861
|
-
u(this, At);
|
|
862
|
-
u(this, ut);
|
|
863
|
-
this.getById = async (t) => (await a(this, R)).getConnectorById(t).then((n) => i(n)).then((n) => {
|
|
864
|
-
const c = { ...n, parsedData: null };
|
|
865
|
-
return n.parsedData && (c.parsedData = a(this, ut).makeSingleConnectorBackwardsCompatible(
|
|
866
|
-
n.parsedData,
|
|
867
|
-
a(this, At).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
868
|
-
)), c;
|
|
869
|
-
}), this.getAllByType = async (t) => (await a(this, R)).getConnectors(t).then((n) => i(n)).then((n) => {
|
|
870
|
-
const c = { ...n, parsedData: null };
|
|
871
|
-
return n.parsedData && (c.parsedData = a(this, ut).makeMultipleConnectorsBackwardsCompatible(
|
|
872
|
-
n.parsedData,
|
|
873
|
-
a(this, At).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
874
|
-
)), c;
|
|
875
|
-
}), this.register = async (t) => {
|
|
876
|
-
const r = await a(this, R), n = a(this, ut).makeConnectorSourceForwardsCompatible(t);
|
|
877
|
-
return r.registerConnector(JSON.stringify(n)).then((c) => i(c));
|
|
878
|
-
}, this.unregister = async (t) => (await a(this, R)).unregisterConnector(t).then((n) => i(n)), this.configure = async (t, r) => {
|
|
879
|
-
const n = await a(this, R);
|
|
880
|
-
return await this.waitToBeReady(t), await r(new Br(t, n)), n.updateConnectorConfiguration(t).then((c) => i(c));
|
|
881
|
-
}, this.getState = async (t) => (await a(this, R)).getConnectorState(t).then((n) => i(n)), this.getOptions = async (t) => (await a(this, R)).getConnectorOptions(t).then((n) => i(n)), this.waitToBeReady = async (t, r = 2e3) => {
|
|
882
|
-
let n = Math.max(r, 500);
|
|
883
|
-
n = Math.min(n, 5e3);
|
|
884
|
-
const c = 100;
|
|
885
|
-
let h = 0;
|
|
886
|
-
try {
|
|
887
|
-
for (; h * c < n; ) {
|
|
888
|
-
const l = await this.getState(t);
|
|
889
|
-
if (l.success && l.parsedData && (l.parsedData.type === ue.running || l.parsedData.type === ue.ready))
|
|
890
|
-
return i(
|
|
891
|
-
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
892
|
-
!1
|
|
893
|
-
);
|
|
894
|
-
await new Promise((p) => setTimeout(p, c)), h++;
|
|
895
|
-
}
|
|
896
|
-
} catch (l) {
|
|
897
|
-
return i(
|
|
898
|
-
{
|
|
899
|
-
data: null,
|
|
900
|
-
success: !1,
|
|
901
|
-
error: `Error while getting connector state ${l}`,
|
|
902
|
-
status: 5e4,
|
|
903
|
-
parsedData: void 0
|
|
904
|
-
},
|
|
905
|
-
!1
|
|
906
|
-
);
|
|
907
|
-
}
|
|
908
|
-
return i(
|
|
909
|
-
{
|
|
910
|
-
data: null,
|
|
911
|
-
success: !1,
|
|
912
|
-
error: "Timed out waiting for connector",
|
|
913
|
-
status: 5e4,
|
|
914
|
-
parsedData: void 0
|
|
915
|
-
},
|
|
916
|
-
!1
|
|
917
|
-
);
|
|
918
|
-
}, this.updateMappings = async (t, r) => await this.configure(t, async (n) => {
|
|
919
|
-
const { parsedData: c } = await this.getMappings(t), h = (c == null ? void 0 : c.filter(
|
|
920
|
-
(y) => !r.some(
|
|
921
|
-
(b) => b.name === y.name && b.direction === y.direction
|
|
922
|
-
)
|
|
923
|
-
)) ?? [], l = r.filter((y) => y.name !== "" && y.value !== ""), p = [...h, ...l];
|
|
924
|
-
await n.setMappings(p);
|
|
925
|
-
}), this.applyMappings = async (t, r) => await this.configure(t, async (n) => {
|
|
926
|
-
const c = r.filter((h) => h.name !== "" && h.value !== "");
|
|
927
|
-
await n.setMappings(c);
|
|
928
|
-
}), this.setHttpHeaders = async (t, r) => (await a(this, R)).remoteConnectorAuthenticationSetHttpHeaders(t, JSON.stringify(r)).then((c) => i(c)), g(this, R, o), g(this, At, e), g(this, ut, new ne());
|
|
929
|
-
}
|
|
930
|
-
async getMappings(o, e) {
|
|
931
|
-
return (await a(this, R)).getConnectorMappings(o).then((r) => i(r)).then(
|
|
932
|
-
(r) => {
|
|
933
|
-
var n;
|
|
934
|
-
return e ? {
|
|
935
|
-
...r,
|
|
936
|
-
parsedData: (n = r.parsedData) == null ? void 0 : n.filter((c) => c.direction === e)
|
|
937
|
-
} : r;
|
|
938
|
-
}
|
|
939
|
-
);
|
|
940
|
-
}
|
|
941
|
-
}, R = new WeakMap(), At = new WeakMap(), ut = new WeakMap(), ps);
|
|
942
|
-
var gt, yt;
|
|
943
|
-
class Br {
|
|
944
|
-
/**
|
|
945
|
-
* @ignore
|
|
946
|
-
*/
|
|
947
|
-
constructor(o, e) {
|
|
948
|
-
/**
|
|
949
|
-
* @ignore
|
|
950
|
-
*/
|
|
951
|
-
u(this, gt);
|
|
952
|
-
u(this, yt);
|
|
953
|
-
this.setOptions = async (t) => a(this, yt).setConnectorOptions(a(this, gt), JSON.stringify(t)).then((r) => i(r)), this.setMappings = async (t) => {
|
|
954
|
-
const r = await a(this, yt).setConnectorMappings(
|
|
955
|
-
a(this, gt),
|
|
956
|
-
t.map(function(n) {
|
|
957
|
-
return JSON.stringify(n);
|
|
958
|
-
})
|
|
959
|
-
);
|
|
960
|
-
return i(r);
|
|
961
|
-
}, this.setHttpHeader = async (t, r) => a(this, yt).connectorAuthenticationSetHttpHeader(a(this, gt), t, r).then((n) => i(n)), g(this, gt, o), g(this, yt, e);
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
gt = new WeakMap(), yt = new WeakMap();
|
|
965
|
-
var Y, Pt;
|
|
966
|
-
class $e {
|
|
967
|
-
/**
|
|
968
|
-
* @ignore
|
|
969
|
-
*/
|
|
970
|
-
constructor(o, e) {
|
|
971
|
-
/**
|
|
972
|
-
* @ignore
|
|
973
|
-
*/
|
|
974
|
-
u(this, Y);
|
|
975
|
-
u(this, Pt);
|
|
976
|
-
this.getPageItemById = async (t, r, n, c = {}) => {
|
|
977
|
-
const l = await (await a(this, Y)).dataConnectorGetPageItemById(
|
|
978
|
-
t,
|
|
979
|
-
r,
|
|
980
|
-
JSON.stringify(n),
|
|
981
|
-
JSON.stringify(c)
|
|
982
|
-
), p = i(l), y = { ...p, parsedData: null };
|
|
983
|
-
return p.parsedData && (y.parsedData = {
|
|
984
|
-
...p.parsedData,
|
|
985
|
-
data: a(this, Pt).mapEngineToDataItem(p.parsedData.data)
|
|
986
|
-
}), y;
|
|
987
|
-
}, this.getConfigurationOptions = async (t) => (await a(this, Y)).dataConnectorGetConfigurationOptions(t).then((n) => i(n)), this.getCapabilities = async (t) => (await a(this, Y)).dataConnectorGetCapabilities(t).then((n) => i(n)), g(this, Y, o), g(this, Pt, e);
|
|
988
|
-
}
|
|
989
|
-
async getPage(o, e, t = {}) {
|
|
990
|
-
const { previousPageToken: r, continuationToken: n } = e;
|
|
991
|
-
if (r != null && n != null)
|
|
992
|
-
throw new Error(
|
|
993
|
-
'Invalid page config: "previousPageToken" and "continuationToken" are mutually exclusive. Provide only one to indicate navigation direction.'
|
|
994
|
-
);
|
|
995
|
-
const h = await (await a(this, Y)).dataConnectorGetPage(o, JSON.stringify(e), JSON.stringify(t)), l = i(
|
|
996
|
-
h
|
|
997
|
-
), p = { ...l, parsedData: null };
|
|
998
|
-
return l.parsedData && (p.parsedData = {
|
|
999
|
-
...l.parsedData,
|
|
1000
|
-
data: l.parsedData.data.map(
|
|
1001
|
-
(y) => a(this, Pt).mapEngineToDataItem(y)
|
|
1002
|
-
)
|
|
1003
|
-
}), p;
|
|
1004
|
-
}
|
|
1005
|
-
/**
|
|
1006
|
-
* Query a specific DataConnector for a data model using the dynamic context as parameter.
|
|
1007
|
-
* @param connectorId unique id of the data connector
|
|
1008
|
-
* @param context context that will be available in the connector script.
|
|
1009
|
-
* @returns DataModel or DataSourceVariableDataModel
|
|
1010
|
-
*/
|
|
1011
|
-
async getModel(o, e = {}) {
|
|
1012
|
-
return (await a(this, Y)).dataConnectorGetModel(o, JSON.stringify(e)).then((r) => i(r));
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
Y = new WeakMap(), Pt = new WeakMap();
|
|
1016
|
-
var nt, zt;
|
|
1017
|
-
class ze {
|
|
1018
|
-
/**
|
|
1019
|
-
* @ignore
|
|
1020
|
-
*/
|
|
1021
|
-
constructor(o, e) {
|
|
1022
|
-
/**
|
|
1023
|
-
* @ignore
|
|
1024
|
-
*/
|
|
1025
|
-
u(this, nt);
|
|
1026
|
-
u(this, zt);
|
|
1027
|
-
this.setDataSource = async (t) => (await a(this, nt)).setDataSource(t).then((n) => i(n)), this.getDataSource = async () => (await a(this, nt)).getDataSource().then((r) => i(r)), this.removeDataSource = async () => (await a(this, nt)).removeDataSource().then((r) => i(r)), this.setDataRow = async (t) => {
|
|
1028
|
-
const r = await a(this, nt), n = a(this, zt).mapDataItemToEngine(t);
|
|
1029
|
-
return r.setDataRow(JSON.stringify(n)).then((c) => i(c));
|
|
1030
|
-
}, g(this, nt, o), g(this, zt, e);
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
nt = new WeakMap(), zt = new WeakMap();
|
|
1034
|
-
var at;
|
|
1035
|
-
class Ke {
|
|
1036
|
-
/**
|
|
1037
|
-
* @ignore
|
|
1038
|
-
*/
|
|
1039
|
-
constructor(o) {
|
|
1040
|
-
/**
|
|
1041
|
-
* @ignore
|
|
1042
|
-
*/
|
|
1043
|
-
u(this, at);
|
|
1044
|
-
this.getAllLogs = async () => (await a(this, at)).getLogs().then((t) => i(t)), this.toggleDebugPanel = async () => (await a(this, at)).toggleDebugPanel().then((t) => i(t)), this.enableDebug = async () => (await a(this, at)).enableDebug().then((t) => i(t)), this.disableDebug = async () => (await a(this, at)).disableDebug().then((t) => i(t)), g(this, at, o);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
at = new WeakMap();
|
|
1048
|
-
var pt;
|
|
1049
|
-
class je {
|
|
1050
|
-
/**
|
|
1051
|
-
* @ignore
|
|
1052
|
-
*/
|
|
1053
|
-
constructor(o) {
|
|
1054
|
-
/**
|
|
1055
|
-
* @ignore
|
|
1056
|
-
*/
|
|
1057
|
-
u(this, pt);
|
|
1058
|
-
this.getCurrentState = async () => (await a(this, pt)).getCurrentDocumentState().then((t) => i(t)), this.load = async (e, t = { keepConnectors: !1 }) => {
|
|
1059
|
-
const r = await a(this, pt), n = typeof e != "string" ? JSON.stringify(e) : e;
|
|
1060
|
-
return r.loadDocument(n, JSON.stringify(t)).then((c) => i(c));
|
|
1061
|
-
}, this.createAndLoad = async (e) => {
|
|
1062
|
-
const t = await a(this, pt), r = JSON.stringify(e);
|
|
1063
|
-
return t.createAndLoadDocument(r).then((n) => i(n));
|
|
1064
|
-
}, g(this, pt, o);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
pt = new WeakMap();
|
|
1068
|
-
var Jr = /* @__PURE__ */ ((s) => (s.resize = "resize", s.scale = "scale", s.scaleAndResize = "scaleAndResize", s))(Jr || {}), Ur = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Ur || {}), se = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(se || {}), kr = /* @__PURE__ */ ((s) => (s.connector = "connector", s))(kr || {}), Gr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s.component = "component", s))(Gr || {}), Tr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Tr || {}), _r = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(_r || {}), Hr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Hr || {}), $r = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))($r || {}), zr = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(zr || {}), Kr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Kr || {}), jr = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(jr || {}), Wr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Wr || {}), qr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(qr || {}), Yr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Yr || {}), Zr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Zr || {});
|
|
1069
|
-
class na {
|
|
1070
|
-
constructor() {
|
|
1071
|
-
this.type = "page";
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
class aa {
|
|
1075
|
-
constructor(o, e) {
|
|
1076
|
-
this.type = "frame", this.frameId = o, this.edge = e;
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
var Ps = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Ps || {}), J;
|
|
1080
|
-
class We {
|
|
1081
|
-
/**
|
|
1082
|
-
* @ignore
|
|
1083
|
-
*/
|
|
1084
|
-
constructor(o) {
|
|
1085
|
-
/**
|
|
1086
|
-
* @ignore
|
|
1087
|
-
*/
|
|
1088
|
-
u(this, J);
|
|
1089
|
-
this.insertImageVariableToFrame = async (e, t) => {
|
|
1090
|
-
const r = await a(this, J), n = { id: t, type: se.variable };
|
|
1091
|
-
return r.setImageSource(e, JSON.stringify(n)).then((c) => i(c));
|
|
1092
|
-
}, this.insertTextVariable = async (e) => (await a(this, J)).insertTextVariable(e).then((r) => i(r)), this.enterTextEditMode = async (e) => (await a(this, J)).enterTextEditMode(e).then((r) => i(r)), this.exitTextEditMode = async () => (await a(this, J)).exitTextEditMode().then((t) => i(t)), this.getText = async (e, t) => (await a(this, J)).getTextByFrameId(e, t).then((n) => i(n)), this.setText = async (e, t) => (await a(this, J)).setTextByFrameId(e, t).then((n) => i(n)), this.selectText = async (e, t, r) => (await a(this, J)).selectTextById(e, t, r).then((c) => i(c)), this.addCustomUndoData = async (e, t, r) => (await a(this, J)).setCustomUndoData(e, t, r ?? !1).then((c) => i(c)), g(this, J, o);
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
J = new WeakMap();
|
|
1096
|
-
var it, Ot;
|
|
1097
|
-
class qe {
|
|
1098
|
-
/**
|
|
1099
|
-
* @ignore
|
|
1100
|
-
*/
|
|
1101
|
-
constructor(o) {
|
|
1102
|
-
/**
|
|
1103
|
-
* @ignore
|
|
1104
|
-
*/
|
|
1105
|
-
u(this, it);
|
|
1106
|
-
u(this, Ot);
|
|
1107
|
-
this.query = async (e, t, r = {}) => (await a(this, it)).fontConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.detail = async (e, t, r = {}) => (await a(this, it)).fontConnectorDetail(e, t, JSON.stringify(r)).then((c) => i(c)), this.download = async (e, t, r = {}) => (await a(this, Ot)).fontConnectorDownload(e, t, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (e, t, r, n = {}) => (await a(this, Ot)).fontConnectorPreview(e, t, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (e) => (await a(this, it)).fontConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, it)).fontConnectorGetCapabilities(e).then((r) => i(r)), this.parseDeprecatedFontType = (e) => {
|
|
1108
|
-
if (e === Tt.file) return _t.file;
|
|
1109
|
-
if (e === Tt.collection) return _t.collection;
|
|
1110
|
-
}, g(this, it, o), g(this, Ot, o);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
it = new WeakMap(), Ot = new WeakMap();
|
|
1114
|
-
var P;
|
|
1115
|
-
class Ye {
|
|
1116
|
-
/**
|
|
1117
|
-
* @ignore
|
|
1118
|
-
*/
|
|
1119
|
-
constructor(o) {
|
|
1120
|
-
/**
|
|
1121
|
-
* @ignore
|
|
1122
|
-
*/
|
|
1123
|
-
u(this, P);
|
|
1124
|
-
this.addFontFamily = async (e, t) => (await a(this, P)).addFontFamily(e, JSON.stringify(t)).then((n) => i(n)), this.removeFontFamily = async (e) => (await a(this, P)).removeFontFamily(e).then((r) => i(r)), this.addFontStyle = async (e, t) => (await a(this, P)).addFontStyle(e, JSON.stringify(t)).then((n) => i(n)), this.removeFontStyle = async (e) => (await a(this, P)).removeFontStyle(e).then((r) => i(r)), this.getFontFamilies = async () => (await a(this, P)).getFontFamilies().then((t) => i(t)), this.getFontStyles = async (e) => (await a(this, P)).getFontStyles(e).then((r) => i(r)), this.getFontFamilyById = async (e) => (await a(this, P)).getFontFamilyById(e).then((r) => i(r)), this.getFontStyleById = async (e) => (await a(this, P)).getFontStyleById(e).then((r) => i(r)), this.getDefaultFontStyle = async () => (await a(this, P)).getDefaultFontStyle().then((t) => i(t)), this.getDefaultFontFamily = async () => (await a(this, P)).getDefaultFontFamily().then((t) => i(t)), this.isFontFamilyUsed = async (e) => (await a(this, P)).isFontFamilyUsed(e).then((r) => i(r)), this.isFontStyleUsed = async (e) => (await a(this, P)).isFontStyleUsed(e).then((r) => i(r)), this.moveFontFamilies = async (e, t) => (await a(this, P)).moveFontFamilies(e, t).then((n) => i(n)), this.getPreviewsOfCharacterStrings = async (e, t) => (await a(this, P)).getPreviewsOfCharacterStrings(e, JSON.stringify(t)).then((n) => i(n)), g(this, P, o);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
P = new WeakMap();
|
|
1128
|
-
var Ft;
|
|
1129
|
-
class ge {
|
|
1130
|
-
/**
|
|
1131
|
-
* @ignore
|
|
1132
|
-
*/
|
|
1133
|
-
constructor(o) {
|
|
1134
|
-
/**
|
|
1135
|
-
* @ignore
|
|
1136
|
-
*/
|
|
1137
|
-
u(this, Ft);
|
|
1138
|
-
this.setShapeProperties = async (e, t) => (await a(this, Ft)).setShapeProperties(e, JSON.stringify(t)).then((n) => i(n)), this.setEnableFill = async (e, t) => {
|
|
1139
|
-
const r = { enableFill: t };
|
|
1140
|
-
return this.setShapeProperties(e, r);
|
|
1141
|
-
}, this.setFillColor = async (e, t) => {
|
|
1142
|
-
const r = { fillColor: t };
|
|
1143
|
-
return this.setShapeProperties(e, r);
|
|
1144
|
-
}, this.setEnableStroke = async (e, t) => {
|
|
1145
|
-
const r = { enableStroke: t };
|
|
1146
|
-
return this.setShapeProperties(e, r);
|
|
1147
|
-
}, this.setStrokeColor = async (e, t) => {
|
|
1148
|
-
const r = { strokeColor: t };
|
|
1149
|
-
return this.setShapeProperties(e, r);
|
|
1150
|
-
}, this.setStrokeWeight = async (e, t) => {
|
|
1151
|
-
const r = { strokeWeight: t };
|
|
1152
|
-
return this.setShapeProperties(e, r);
|
|
1153
|
-
}, this.setFlagAllCornersSame = async (e, t) => {
|
|
1154
|
-
const r = { allCornersSame: t };
|
|
1155
|
-
return this.setShapeProperties(e, r);
|
|
1156
|
-
}, this.setShapeCorners = async (e, t) => (await a(this, Ft)).setShapeCorners(e, JSON.stringify(t)).then((n) => i(n)), this.setRadiusAll = async (e, t) => {
|
|
1157
|
-
const r = { radiusAll: t };
|
|
1158
|
-
return this.setShapeCorners(e, r);
|
|
1159
|
-
}, this.setRadiusTopLeft = async (e, t) => {
|
|
1160
|
-
const r = { topLeft: t };
|
|
1161
|
-
return this.setShapeCorners(e, r);
|
|
1162
|
-
}, this.setRadiusBottomLeft = async (e, t) => {
|
|
1163
|
-
const r = { bottomLeft: t };
|
|
1164
|
-
return this.setShapeCorners(e, r);
|
|
1165
|
-
}, this.setRadiusTopRight = async (e, t) => {
|
|
1166
|
-
const r = { topRight: t };
|
|
1167
|
-
return this.setShapeCorners(e, r);
|
|
1168
|
-
}, this.setRadiusBottomRight = async (e, t) => {
|
|
1169
|
-
const r = { bottomRight: t };
|
|
1170
|
-
return this.setShapeCorners(e, r);
|
|
1171
|
-
}, g(this, Ft, o);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
Ft = new WeakMap();
|
|
1175
|
-
var d;
|
|
1176
|
-
class Ze {
|
|
1177
|
-
/**
|
|
1178
|
-
* @ignore
|
|
1179
|
-
*/
|
|
1180
|
-
constructor(o) {
|
|
1181
|
-
/**
|
|
1182
|
-
* @ignore
|
|
1183
|
-
*/
|
|
1184
|
-
u(this, d);
|
|
1185
|
-
this.getAll = async () => (await a(this, d)).getFrames().then((t) => i(t)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((t) => i(t)), this.getAllByPageId = async (e) => (await a(this, d)).getFramesByPageId(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, d)).getFrameByName(e).then((r) => i(r)), this.getById = async (e) => (await a(this, d)).getFrameById(e).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((t) => i(t)), this.getLayoutProperties = async (e, t) => (await a(this, d)).getFramePropertiesByFrameId(e, t).then((n) => i(n)), this.getAllLayoutProperties = async (e) => (await a(this, d)).getFramesProperties(e).then((r) => i(r)), this.resetTransformation = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetSize = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.select = async (e) => (await a(this, d)).selectFrames([e]).then((r) => i(r)), this.selectMultiple = async (e) => (await a(this, d)).selectFrames(e).then((r) => i(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((t) => i(t)), this.reorderFrames = async (e, t) => (await a(this, d)).reorderFrames(e, t).then((n) => i(n)), this.setZIndex = async (e, t) => (await a(this, d)).setFrameZIndex(e, t).then((n) => i(n)), this.setHeight = async (e, t) => (await a(this, d)).setFrameHeight(e, t).then((n) => i(n)), this.setRotation = async (e, t) => (await a(this, d)).setFrameRotation(e, t).then((n) => i(n)), this.setWidth = async (e, t) => (await a(this, d)).setFrameWidth(e, t).then((n) => i(n)), this.setX = async (e, t) => (await a(this, d)).setFrameX(e, t).then((n) => i(n)), this.setY = async (e, t) => (await a(this, d)).setFrameY(e, t).then((n) => i(n)), this.setOpacity = async (e, t) => (await a(this, d)).setFrameOpacity(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, d)).renameFrame(e, t).then((n) => i(n)), this.reset = async (e) => (await a(this, d)).resetFrame(e).then((r) => i(r)), this.resetX = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetY = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetRotation = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetWidth = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetHeight = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetImageFrameFitMode = async (e) => (await a(this, d)).resetImageFrameFitMode(e).then((r) => i(r)), this.setVisibility = async (e, t) => (await a(this, d)).setFrameIsVisible(e, t).then((n) => i(n)), this.setIsVisible = async (e, t) => (await a(this, d)).setFrameIsVisible(e, t).then((n) => i(n)), this.remove = async (e) => (await a(this, d)).removeFrames([e]).then((r) => i(r)), this.removeFrames = async (e) => (await a(this, d)).removeFrames(e).then((r) => i(r)), this.create = async (e, t, r, n, c) => (await a(this, d)).addFrame(e, t, r, n, c).then((l) => i(l)), this.createShapeFrame = async (e, t, r, n, c) => (await a(this, d)).addFrame(e, t, r, n, c).then((l) => i(l)), this.createBarcodeFrame = async (e, t) => (await a(this, d)).addBarcodeFrame(e, t == null ? void 0 : t.x, t == null ? void 0 : t.y).then((n) => i(n)), this.createComponentFrame = async (e, t, r, n, c) => (await a(this, d)).addComponentFrame(t, r, n, c, JSON.stringify(e)).then((l) => i(l)), this.duplicateFrames = async (e) => (await a(this, d)).duplicateFrames(e).then((r) => i(r)), this.updateImageSource = async (e, t) => {
|
|
1186
|
-
const r = await a(this, d), n = t !== null ? JSON.stringify(t) : null;
|
|
1187
|
-
return r.setImageSource(e, n).then((c) => i(c));
|
|
1188
|
-
}, this.removeImageSource = async (e) => this.updateImageSource(e, null), this.setImageFromConnector = async (e, t, r) => {
|
|
1189
|
-
const n = {
|
|
1190
|
-
id: t,
|
|
1191
|
-
assetId: r,
|
|
1192
|
-
type: se.connector
|
|
1193
|
-
};
|
|
1194
|
-
return this.updateImageSource(e, n);
|
|
1195
|
-
}, this.setImageFromUrl = async (e, t) => {
|
|
1196
|
-
const r = { url: t, type: se.url };
|
|
1197
|
-
return this.updateImageSource(e, r);
|
|
1198
|
-
}, this.setImageFrameFitMode = async (e, t) => (await a(this, d)).setImageFrameFitMode(e, t).then((n) => i(n)), this.setImageFrameFitModePosition = async (e, t) => (await a(this, d)).setImageFrameFitModePosition(e, t).then((n) => i(n)), this.setFrameConstrainProportions = async (e, t) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
|
|
1199
|
-
success: !1,
|
|
1200
|
-
status: 0,
|
|
1201
|
-
error: "setFrameConstrainProportions is not supported anymore",
|
|
1202
|
-
parsedData: null
|
|
1203
|
-
})), this.setVerticalAlign = async (e, t) => (await a(this, d)).setVerticalAlignment(e, t).then((n) => i(n)), this.setNumberOfColumns = async (e, t) => (await a(this, d)).setNumberOfColumns(e, t).then((n) => i(n)), this.setColumnGap = async (e, t) => (await a(this, d)).setColumnGap(e, t).then((n) => i(n)), this.setMinCopyfitting = async (e, t) => (await a(this, d)).setMinCopyfitting(e, t).then((n) => i(n)), this.setMaxCopyfitting = async (e, t) => (await a(this, d)).setMaxCopyfitting(e, t).then((n) => i(n)), this.setEnableCopyfitting = async (e, t) => (await a(this, d)).setEnableCopyfitting(e, t).then((n) => i(n)), this.resetMinCopyfitting = async (e) => (await a(this, d)).resetMinCopyfitting(e).then((r) => i(r)), this.resetMaxCopyfitting = async (e) => (await a(this, d)).resetMaxCopyfitting(e).then((r) => i(r)), this.resetEnableCopyfitting = async (e) => (await a(this, d)).resetEnableCopyfitting(e).then((r) => i(r)), this.setShapeFrameEnableFill = async (e, t) => this.shapeController.setEnableFill(e, t), this.setShapeFrameFillColor = async (e, t) => this.shapeController.setFillColor(e, t), this.setShapeFrameEnableStroke = async (e, t) => this.shapeController.setEnableStroke(e, t), this.setShapeFrameStrokeColor = async (e, t) => this.shapeController.setStrokeColor(e, t), this.setShapeFrameStrokeWeight = async (e, t) => this.shapeController.setStrokeWeight(e, t), this.setBlendMode = async (e, t) => (await a(this, d)).setFrameBlendMode(e, t).then((n) => i(n)), this.setFrameContainerShape = async (e, t) => (await a(this, d)).setFrameContainerShape(e, JSON.stringify(t)).then((n) => i(n)), this.enterCropMode = async (e, t = Ps.frameCrop) => (await a(this, d)).enterCropMode(e, t).then((n) => i(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((t) => i(t)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((t) => i(t)), this.enterSubjectMode = async (e) => (await a(this, d)).enterSubjectMode(e).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((t) => i(t)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((t) => i(t)), this.enterGradientMode = async (e) => (await a(this, d)).enterGradientMode(e).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, d)).applyGradientMode().then((t) => i(t)), this.cancelGradientMode = async () => (await a(this, d)).cancelGradientMode().then((t) => i(t)), this.resetCropMode = async (e) => (console.error("resetCropMode is not supported anymore"), i({
|
|
1204
|
-
success: !1,
|
|
1205
|
-
status: 0,
|
|
1206
|
-
error: "resetCropMode is not supported anymore",
|
|
1207
|
-
parsedData: null
|
|
1208
|
-
})), this.setEnableAutoGrow = async (e, t) => {
|
|
1209
|
-
const r = { enabled: { value: t } };
|
|
1210
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1211
|
-
}, this.setAutoGrowMinWidth = async (e, t) => {
|
|
1212
|
-
const r = { minWidth: { value: t } };
|
|
1213
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1214
|
-
}, this.setAutoGrowMaxWidth = async (e, t) => {
|
|
1215
|
-
const r = { maxWidth: { value: t } };
|
|
1216
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1217
|
-
}, this.setAutoGrowMinHeight = async (e, t) => {
|
|
1218
|
-
const r = { minHeight: { value: t } };
|
|
1219
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1220
|
-
}, this.setAutoGrowMaxHeight = async (e, t) => {
|
|
1221
|
-
const r = { maxHeight: { value: t } };
|
|
1222
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1223
|
-
}, this.setAutoGrowDirections = async (e, t) => {
|
|
1224
|
-
const r = { directions: { value: t } };
|
|
1225
|
-
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1226
|
-
}, this.resetAutoGrowSettingsEnabled = async (e) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
|
|
1227
|
-
success: !1,
|
|
1228
|
-
status: 0,
|
|
1229
|
-
error: "resetAutoGrowSettingsEnabled is not supported anymore",
|
|
1230
|
-
parsedData: null
|
|
1231
|
-
})), this.resetAutoGrowMinWidth = async (e) => (console.error("resetAutoGrowMinWidth is not supported anymore"), i({
|
|
1232
|
-
success: !1,
|
|
1233
|
-
status: 0,
|
|
1234
|
-
error: "resetAutoGrowMinWidth is not supported anymore",
|
|
1235
|
-
parsedData: null
|
|
1236
|
-
})), this.resetAutoGrowMaxWidth = async (e) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), i({
|
|
1237
|
-
success: !1,
|
|
1238
|
-
status: 0,
|
|
1239
|
-
error: "resetAutoGrowMaxWidth is not supported anymore",
|
|
1240
|
-
parsedData: null
|
|
1241
|
-
})), this.resetAutoGrowMinHeight = async (e) => (console.error("resetAutoGrowMinHeight is not supported anymore"), i({
|
|
1242
|
-
success: !1,
|
|
1243
|
-
status: 0,
|
|
1244
|
-
error: "resetAutoGrowMinHeight is not supported anymore",
|
|
1245
|
-
parsedData: null
|
|
1246
|
-
})), this.resetAutoGrowMaxHeight = async (e) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), i({
|
|
1247
|
-
success: !1,
|
|
1248
|
-
status: 0,
|
|
1249
|
-
error: "resetAutoGrowMaxHeight is not supported anymore",
|
|
1250
|
-
parsedData: null
|
|
1251
|
-
})), this.resetAutoGrowDirections = async (e) => (console.error("resetAutoGrowDirections is not supported anymore"), i({
|
|
1252
|
-
success: !1,
|
|
1253
|
-
status: 0,
|
|
1254
|
-
error: "resetAutoGrowDirections is not supported anymore",
|
|
1255
|
-
parsedData: null
|
|
1256
|
-
})), this.resetAutoGrow = async (e) => (console.error("resetAutoGrow is not supported anymore"), i({
|
|
1257
|
-
success: !1,
|
|
1258
|
-
status: 0,
|
|
1259
|
-
error: "resetAutoGrow is not supported anymore",
|
|
1260
|
-
parsedData: null
|
|
1261
|
-
})), this.setShadowEnabled = async (e, t) => {
|
|
1262
|
-
const r = { enabled: { value: t } };
|
|
1263
|
-
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1264
|
-
}, this.setShadowDistance = async (e, t) => {
|
|
1265
|
-
const r = { distance: { value: t } };
|
|
1266
|
-
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1267
|
-
}, this.setShadowAngleDegrees = async (e, t) => {
|
|
1268
|
-
const r = { angleDegrees: { value: t } };
|
|
1269
|
-
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1270
|
-
}, this.setShadowBlurRadius = async (e, t) => {
|
|
1271
|
-
const r = { blurRadius: { value: t } };
|
|
1272
|
-
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1273
|
-
}, this.setShadowColor = async (e, t) => {
|
|
1274
|
-
const r = { color: { value: t } };
|
|
1275
|
-
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1276
|
-
}, this.setAnchor = async (e, t, r, n, c) => {
|
|
1277
|
-
const h = {
|
|
1278
|
-
horizontal: t,
|
|
1279
|
-
type: r,
|
|
1280
|
-
target: n,
|
|
1281
|
-
endTarget: c
|
|
1282
|
-
};
|
|
1283
|
-
return (await a(this, d)).setAnchorProperties(e, JSON.stringify(h)).then((p) => i(p));
|
|
1284
|
-
}, this.setVerticalAnchor = async (e, t, r, n) => this.setAnchor(e, !1, t, r, n), this.setHorizontalAnchor = async (e, t, r, n) => this.setAnchor(e, !0, t, r, n), this.resetAnchoring = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetVisibility = async (e) => (await a(this, d)).setFrameIsVisible(e, null).then((r) => i(r)), this.getConfiguration = async (e) => (await a(this, d)).getFrameConfiguration(e).then((r) => i(r)), this.resetAssetCropOverride = async (e) => (await a(this, d)).resetAssetCropOverride(e).then((r) => i(r)), this.resetAllAssetCropOverrides = async (e) => (await a(this, d)).resetAllAssetCropOverrides(e).then((r) => i(r)), this.setGradientApplied = async (e, t) => {
|
|
1285
|
-
const r = { isApplied: t };
|
|
1286
|
-
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1287
|
-
}, this.setLocalGradient = async (e, t) => {
|
|
1288
|
-
const r = { gradient: t };
|
|
1289
|
-
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1290
|
-
}, this.setBrandKitGradient = async (e, t) => {
|
|
1291
|
-
const r = { id: t };
|
|
1292
|
-
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1293
|
-
}, this.setSmartCropSubjectId = async (e, t) => (await a(this, d)).setSmartCropSubjectId(e, t).then((n) => i(n)), g(this, d, o), this.shapeController = new ge(a(this, d)), this.constraints = new Qr(a(this, d));
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
d = new WeakMap();
|
|
1297
|
-
var F;
|
|
1298
|
-
class Qr {
|
|
1299
|
-
/**
|
|
1300
|
-
* @ignore
|
|
1301
|
-
*/
|
|
1302
|
-
constructor(o) {
|
|
1303
|
-
/**
|
|
1304
|
-
* @ignore
|
|
1305
|
-
*/
|
|
1306
|
-
u(this, F);
|
|
1307
|
-
this.get = async (e) => (await a(this, F)).getFrameConstraints(e).then((r) => i(r)), this.setSelectable = async (e, t) => {
|
|
1308
|
-
const r = { selectionAllowed: { value: t } };
|
|
1309
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1310
|
-
}, this.setHorizontalMovement = async (e, t) => {
|
|
1311
|
-
const r = { horizontalMovementAllowed: { value: t } };
|
|
1312
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1313
|
-
}, this.setVerticalMovement = async (e, t) => {
|
|
1314
|
-
const r = { verticalMovementAllowed: { value: t } };
|
|
1315
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1316
|
-
}, this.setRotation = async (e, t) => {
|
|
1317
|
-
const r = { rotationAllowed: { value: t } };
|
|
1318
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1319
|
-
}, this.setResize = async (e, t, r) => {
|
|
1320
|
-
const n = {
|
|
1321
|
-
resizeAllowed: { value: t },
|
|
1322
|
-
...r !== void 0 && { proportionLocked: { value: r } }
|
|
1323
|
-
};
|
|
1324
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(n)).then((h) => i(h));
|
|
1325
|
-
}, this.setCrop = async (e, t) => {
|
|
1326
|
-
const r = { image: { cropAllowed: { value: t } } };
|
|
1327
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1328
|
-
}, this.setTextEditingAllowed = async (e, t) => {
|
|
1329
|
-
const r = { text: { editingAllowed: { value: t } } };
|
|
1330
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1331
|
-
}, this.setAllowedParagraphStyles = async (e, t) => {
|
|
1332
|
-
const r = { text: { paragraphStyles: { value: t } } };
|
|
1333
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1334
|
-
}, this.setAllowedCharacterStyles = async (e, t) => {
|
|
1335
|
-
const r = { text: { characterStyles: { value: t } } };
|
|
1336
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1337
|
-
}, this.setAllowedColors = async (e, t) => {
|
|
1338
|
-
const r = { text: { colors: { value: t } } };
|
|
1339
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1340
|
-
}, this.setAllowedFontSizes = async (e, t) => {
|
|
1341
|
-
const r = { text: { fontSizes: { value: t } } };
|
|
1342
|
-
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1343
|
-
}, g(this, F, o);
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
F = new WeakMap();
|
|
1347
|
-
class Qe {
|
|
1348
|
-
constructor() {
|
|
1349
|
-
this.currentEngineVersion = ms.current, this.currentSDKVersion = fs.version;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
var m, Kt;
|
|
1353
|
-
class Xe {
|
|
1354
|
-
/**
|
|
1355
|
-
* @ignore
|
|
1356
|
-
*/
|
|
1357
|
-
constructor(o) {
|
|
1358
|
-
/**
|
|
1359
|
-
* @ignore
|
|
1360
|
-
*/
|
|
1361
|
-
u(this, m);
|
|
1362
|
-
u(this, Kt);
|
|
1363
|
-
this.getAll = async () => (await a(this, m)).getLayouts().then((t) => i(t)), this.getById = async (e) => (await a(this, m)).getLayoutById(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, m)).getLayoutByName(e).then((r) => i(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((t) => i(t)), this.remove = async (e) => (await a(this, m)).removeLayout(e).then((r) => i(r)), this.create = async (e, t) => {
|
|
1364
|
-
const r = await a(this, m);
|
|
1365
|
-
return t != null && t.length ? r.addLayouts(e, JSON.stringify(t)).then((n) => i(n)) : r.addLayout(e).then((n) => i(n));
|
|
1366
|
-
}, this.rename = async (e, t) => (await a(this, m)).renameLayout(e, t).then((n) => i(n)), this.select = async (e) => (await a(this, m)).selectLayoutWithOptions(e, null).then((r) => i(r)), this.selectWithPageSize = async (e, t) => {
|
|
1367
|
-
const r = await a(this, m), n = {
|
|
1368
|
-
pageSize: t
|
|
1369
|
-
};
|
|
1370
|
-
return r.selectLayoutWithOptions(e, JSON.stringify(n)).then((c) => i(c));
|
|
1371
|
-
}, this.duplicate = async (e) => (await a(this, m)).duplicateLayout(e).then((r) => i(r)), this.reset = async (e) => (await a(this, m)).resetLayout(e).then((r) => i(r)), this.setHeight = async (e, t) => (await a(this, m)).setLayoutHeight(e, t).then((n) => i(n)), this.setWidth = async (e, t) => (await a(this, m)).setLayoutWidth(e, t).then((n) => i(n)), this.setUnit = async (e, t) => (await a(this, m)).setLayoutUnit(e, t).then((n) => i(n)), this.resetHeight = async (e) => (await a(this, m)).resetLayoutHeight(e).then((r) => i(r)), this.resetWidth = async (e) => (await a(this, m)).resetLayoutWidth(e).then((r) => i(r)), this.resetUnit = async (e) => (await a(this, m)).resetLayoutUnit(e).then((r) => i(r)), this.getSelectedSnapshot = async () => (await a(this, Kt)).getPageSnapshot().then((t) => t ?? t), this.setIntent = async (e, t) => (await a(this, m)).setLayoutIntent(e, t).then((n) => i(n)), this.resetIntent = async (e) => (await a(this, m)).resetLayoutIntent(e).then((r) => i(r)), this.setFillColor = async (e, t) => (await a(this, m)).setLayoutFillColor(e, JSON.stringify(t)).then((n) => i(n)), this.setFillColorEnabled = async (e, t) => (await a(this, m)).setLayoutFillColorEnabled(e, t).then((n) => i(n)), this.resetFillColor = async (e) => (await a(this, m)).resetLayoutFillColor(e).then((r) => i(r)), this.setBleedValue = async (e, t, r) => {
|
|
1372
|
-
const n = r ? {
|
|
1373
|
-
left: r === X.left ? t : void 0,
|
|
1374
|
-
top: r === X.top ? t : void 0,
|
|
1375
|
-
right: r === X.right ? t : void 0,
|
|
1376
|
-
bottom: r === X.bottom ? t : void 0
|
|
1377
|
-
} : { left: t, top: t, right: t, bottom: t };
|
|
1378
|
-
return (await a(this, m)).updateLayoutBleed(e, JSON.stringify(n)).then((h) => i(h));
|
|
1379
|
-
}, this.setAreBleedValuesCombined = async (e, t) => {
|
|
1380
|
-
const r = { areBleedValuesCombined: t };
|
|
1381
|
-
return (await a(this, m)).updateLayoutBleed(e, JSON.stringify(r)).then((c) => i(c));
|
|
1382
|
-
}, this.resetBleedValues = async (e) => (await a(this, m)).updateLayoutBleed(e, null).then((r) => i(r)), this.setPrivateData = async (e, t) => (await a(this, m)).setLayoutPrivateData(e, JSON.stringify(t)).then((n) => i(n)), this.getPrivateData = async (e) => (await a(this, m)).getLayoutPrivateData(e).then((r) => i(r)), this.setDisplayName = async (e, t) => (await a(this, m)).setLayoutDisplayName(e, t).then((n) => i(n)), this.getDisplayName = async (e) => (await a(this, m)).getLayoutDisplayName(e).then((r) => i(r)), this.resetDisplayName = async (e) => (await a(this, m)).setLayoutDisplayName(e, null).then((r) => i(r)), this.setAvailableForUser = async (e, t) => (await a(this, m)).setLayoutAvailableForUser(e, t).then((n) => i(n)), this.setSelectedByUser = async (e, t) => (await a(this, m)).setLayoutSelectedByUser(e, t).then((n) => i(n)), this.setResizableByUser = async (e, t) => (await a(this, m)).setLayoutResizableByUser(e, JSON.stringify(t)).then((n) => i(n)), g(this, m, o), g(this, Kt, o);
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
m = new WeakMap(), Kt = new WeakMap();
|
|
1386
|
-
var ye = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ye || {}), Os = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(Os || {}), Z, jt;
|
|
1387
|
-
class ts {
|
|
1388
|
-
/**
|
|
1389
|
-
* @ignore
|
|
1390
|
-
*/
|
|
1391
|
-
constructor(o) {
|
|
1392
|
-
/**
|
|
1393
|
-
* @ignore
|
|
1394
|
-
*/
|
|
1395
|
-
u(this, Z);
|
|
1396
|
-
u(this, jt);
|
|
1397
|
-
this.query = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.detail = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorDetail(e, t, JSON.stringify(r)).then((c) => i(c)), this.download = async (e, t, r, n = {}) => {
|
|
1398
|
-
const c = this.parseDeprecatedMediaDownloadType(
|
|
1399
|
-
r
|
|
1400
|
-
);
|
|
1401
|
-
return (await a(this, jt)).mediaConnectorDownload(
|
|
1402
|
-
e,
|
|
1403
|
-
t,
|
|
1404
|
-
c,
|
|
1405
|
-
Os.web,
|
|
1406
|
-
JSON.stringify(n)
|
|
1407
|
-
).then((l) => {
|
|
1408
|
-
if (l instanceof Uint8Array)
|
|
1409
|
-
return l;
|
|
1410
|
-
throw typeof l == "object" && l !== null && "success" in l && !l.success && St(l), new Error(`Unexpected response type: ${typeof l}.`);
|
|
1411
|
-
});
|
|
1412
|
-
}, this.getConfigurationOptions = async (e) => (await a(this, Z)).mediaConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, Z)).mediaConnectorGetCapabilities(e).then((r) => i(r)), this.parseDeprecatedMediaType = (e) => {
|
|
1413
|
-
if (e === Tt.file) return _t.file;
|
|
1414
|
-
if (e === Tt.collection) return _t.collection;
|
|
1415
|
-
}, this.upload = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorUpload(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), g(this, Z, o), g(this, jt, o);
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
1419
|
-
* This method will be removed once the deprecatedMediaDownloadType is out of use
|
|
1420
|
-
* @param deprecatedMediaDownloadType legacy download type
|
|
1421
|
-
* @returns MediaDownloadType
|
|
1422
|
-
*/
|
|
1423
|
-
parseDeprecatedMediaDownloadType(o) {
|
|
1424
|
-
switch (o) {
|
|
1425
|
-
case le.HighResolutionWeb:
|
|
1426
|
-
return ye.highres;
|
|
1427
|
-
case le.LowResolutionWeb:
|
|
1428
|
-
return ye.thumbnail;
|
|
1429
|
-
default:
|
|
1430
|
-
return o;
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
Z = new WeakMap(), jt = new WeakMap();
|
|
1435
|
-
var D, Wt, ws;
|
|
1436
|
-
let es = (ws = class {
|
|
1437
|
-
/**
|
|
1438
|
-
* @ignore
|
|
1439
|
-
*/
|
|
1440
|
-
constructor(o) {
|
|
1441
|
-
/**
|
|
1442
|
-
* @ignore
|
|
1443
|
-
*/
|
|
1444
|
-
u(this, D);
|
|
1445
|
-
/**
|
|
1446
|
-
* @ignore
|
|
1447
|
-
*/
|
|
1448
|
-
u(this, Wt);
|
|
1449
|
-
this.add = async () => (await a(this, D)).addPage().then((t) => i(t)), this.remove = async (e) => (await a(this, D)).removePage(e).then((r) => i(r)), this.select = async (e) => (await a(this, D)).selectPage(e).then((r) => i(r)), this.setVisibility = async (e, t) => (await a(this, D)).setPageIsVisible(e, t).then((n) => i(n)), this.duplicate = async (e) => (await a(this, D)).duplicatePage(e).then((r) => i(r)), this.getAll = async () => (await a(this, D)).getPages().then((t) => i(t)), this.getById = async (e) => (await a(this, D)).getPageById(e).then((r) => i(r)), this.getSnapshot = async (e, t) => (await a(this, Wt)).getPageSnapshotWithSettings(e, t == null ? null : JSON.stringify(t)).then((n) => {
|
|
1450
|
-
if (n instanceof Uint8Array)
|
|
1451
|
-
return n;
|
|
1452
|
-
throw typeof n == "object" && n !== null && "success" in n && !n.success && St(n), new Error(`Unexpected response type: ${typeof n}.`);
|
|
1453
|
-
}), this.setWidth = async (e, t) => (e !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, D)).setPageWidth(t).then((n) => i(n))), this.setHeight = async (e, t) => (e !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, D)).setPageHeight(t).then((n) => i(n))), this.setSize = async (e, t) => (await a(this, D)).setPageSize(e, t).then((n) => i(n)), this.move = async (e, t) => (await a(this, D)).reorderPages(e, t).then((n) => i(n)), g(this, D, o), g(this, Wt, o);
|
|
1454
|
-
}
|
|
1455
|
-
}, D = new WeakMap(), Wt = new WeakMap(), ws);
|
|
1456
|
-
var U;
|
|
1457
|
-
class ss {
|
|
1458
|
-
/**
|
|
1459
|
-
* @ignore
|
|
1460
|
-
*/
|
|
1461
|
-
constructor(o) {
|
|
1462
|
-
/**
|
|
1463
|
-
* @ignore
|
|
1464
|
-
*/
|
|
1465
|
-
u(this, U);
|
|
1466
|
-
this.getAll = async () => (await a(this, U)).getParagraphStyles().then((t) => i(t)), this.getById = async (e) => (await a(this, U)).getParagraphStyleById(e).then((r) => i(r)), this.create = async () => (await a(this, U)).createParagraphStyle().then((t) => i(t)), this.duplicate = async (e) => (await a(this, U)).duplicateParagraphStyle(e).then((r) => i(r)), this.update = async (e, t) => (await a(this, U)).updateParagraphStyle(e, JSON.stringify(t)).then((n) => i(n)), this.rename = async (e, t) => (await a(this, U)).renameParagraphStyle(e, t).then((n) => i(n)), this.remove = async (e) => (await a(this, U)).removeParagraphStyle(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, U)).moveParagraphStyles(e, t).then((n) => i(n)), g(this, U, o);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
U = new WeakMap();
|
|
1470
|
-
var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s.dataSource = "dataSource", s))(ae || {}), Xr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Xr || {}), tn = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(tn || {}), kt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(kt || {}), en = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(sn || {}), Fs = /* @__PURE__ */ ((s) => (s.injected = "injected", s.connector = "connector", s))(Fs || {}), rn = /* @__PURE__ */ ((s) => (s.table = "table", s.list = "list", s))(rn || {});
|
|
1471
|
-
let nn = class {
|
|
1472
|
-
/**
|
|
1473
|
-
* @ignore
|
|
1474
|
-
*/
|
|
1475
|
-
constructor(o, e) {
|
|
1476
|
-
this.onActionsChanged = (t) => {
|
|
1477
|
-
this.config.events.onActionsChanged.trigger(JSON.parse(t));
|
|
1478
|
-
}, this.onAnimationChanged = (t) => {
|
|
1479
|
-
this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(t));
|
|
1480
|
-
}, this.onAnimationPlaybackChanged = (t) => {
|
|
1481
|
-
this.config.events.onScrubberPositionChanged.trigger(JSON.parse(t));
|
|
1482
|
-
}, this.onSelectedLayoutPropertiesChanged = (t) => {
|
|
1483
|
-
this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(t));
|
|
1484
|
-
}, this.onSelectedLayoutUnitChanged = (t) => {
|
|
1485
|
-
this.config.events.onSelectedLayoutUnitChanged.trigger(t);
|
|
1486
|
-
}, this.onFramesLayoutChanged = (t) => {
|
|
1487
|
-
const r = JSON.parse(t);
|
|
1488
|
-
this.config.events.onFramesLayoutChanged.trigger(r);
|
|
1489
|
-
}, this.onSelectedFramesLayoutChanged = (t) => {
|
|
1490
|
-
const r = JSON.parse(t);
|
|
1491
|
-
this.config.events.onSelectedFramesLayoutChanged.trigger(r);
|
|
1492
|
-
const n = this.config.onSelectedFrameLayoutChanged;
|
|
1493
|
-
n && n(r.length > 1 ? void 0 : r[0]);
|
|
1494
|
-
}, this.onSelectedFramesContentChanged = (t) => {
|
|
1495
|
-
const r = JSON.parse(t);
|
|
1496
|
-
this.config.events.onSelectedFramesContentChanged.trigger(r);
|
|
1497
|
-
const n = this.config.onSelectedFrameContentChanged;
|
|
1498
|
-
n && n(r.length > 1 ? null : r[0]);
|
|
1499
|
-
}, this.onStateChanged = () => {
|
|
1500
|
-
this.config.events.onStateChanged.trigger();
|
|
1501
|
-
}, this.onAuthExpired = async (t) => {
|
|
1502
|
-
const r = await this.config.handlers.onAuthExpired.trigger(JSON.parse(t));
|
|
1503
|
-
return r != null ? JSON.stringify(r) : null;
|
|
1504
|
-
}, this.onViewportRequested = () => {
|
|
1505
|
-
const t = this.config.handlers.onViewportRequested.trigger();
|
|
1506
|
-
return t != null ? JSON.stringify(t) : null;
|
|
1507
|
-
}, this.onDocumentLoaded = () => {
|
|
1508
|
-
this.config.events.onDocumentLoaded.trigger();
|
|
1509
|
-
}, this.onPageSelectionChanged = (t) => {
|
|
1510
|
-
this.config.events.onPageSelectionChanged.trigger(t);
|
|
1511
|
-
}, this.onVariableListChanged = (t) => {
|
|
1512
|
-
const n = JSON.parse(t).map(
|
|
1513
|
-
(c) => {
|
|
1514
|
-
var h;
|
|
1515
|
-
return c.type === ae.list ? {
|
|
1516
|
-
...c,
|
|
1517
|
-
items: c.items.map(
|
|
1518
|
-
(l) => l.value
|
|
1519
|
-
),
|
|
1520
|
-
selected: (h = c.selected) == null ? void 0 : h.value
|
|
1521
|
-
} : c;
|
|
1522
|
-
}
|
|
1523
|
-
);
|
|
1524
|
-
this.config.events.onVariableListChanged.trigger(n);
|
|
1525
|
-
}, this.onSelectedToolChanged = (t) => {
|
|
1526
|
-
this.config.events.onSelectedToolChanged.trigger(t);
|
|
1527
|
-
}, this.onUndoStateChanged = (t) => {
|
|
1528
|
-
this.config.events.onUndoStackStateChanged.trigger(JSON.parse(t));
|
|
1529
|
-
}, this.onCustomUndoDataChanged = (t) => {
|
|
1530
|
-
this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(t));
|
|
1531
|
-
}, this.onSelectedLayoutFramesChanged = (t) => {
|
|
1532
|
-
this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(t));
|
|
1533
|
-
}, this.onSelectedTextStyleChanged = (t) => {
|
|
1534
|
-
this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(t));
|
|
1535
|
-
}, this.onColorsChanged = (t) => {
|
|
1536
|
-
this.config.events.onColorsChanged.trigger(JSON.parse(t));
|
|
1537
|
-
}, this.onParagraphStylesChanged = (t) => {
|
|
1538
|
-
this.config.events.onParagraphStylesChanged.trigger(JSON.parse(t));
|
|
1539
|
-
}, this.onCharacterStylesChanged = (t) => {
|
|
1540
|
-
this.config.events.onCharacterStylesChanged.trigger(JSON.parse(t));
|
|
1541
|
-
}, this.onFontFamiliesChanged = (t) => {
|
|
1542
|
-
this.config.events.onFontFamiliesChanged.trigger(JSON.parse(t));
|
|
1543
|
-
}, this.onSelectedLayoutIdChanged = (t) => {
|
|
1544
|
-
this.config.events.onSelectedLayoutIdChanged.trigger(t);
|
|
1545
|
-
}, this.onLayoutsChanged = (t) => {
|
|
1546
|
-
this.config.events.onLayoutsChanged.trigger(JSON.parse(t));
|
|
1547
|
-
}, this.onZoomChanged = (t) => {
|
|
1548
|
-
this.config.events.onZoomChanged.trigger(JSON.parse(t));
|
|
1549
|
-
}, this.onConnectorEvent = (t) => {
|
|
1550
|
-
this.config.events.onConnectorEvent.trigger(JSON.parse(t));
|
|
1551
|
-
}, this.onConnectorsChanged = (t) => {
|
|
1552
|
-
const n = new ne().makeMultipleConnectorsBackwardsCompatible(
|
|
1553
|
-
JSON.parse(t),
|
|
1554
|
-
this.localConfig.get(tt.GraFxStudioEnvironmentApiUrl)
|
|
1555
|
-
);
|
|
1556
|
-
this.config.events.onConnectorsChanged.trigger(n);
|
|
1557
|
-
}, this.onSelectedPageIdChanged = (t) => {
|
|
1558
|
-
this.config.events.onSelectedPageIdChanged.trigger(t);
|
|
1559
|
-
}, this.onPagesChanged = (t) => {
|
|
1560
|
-
this.config.events.onPagesChanged.trigger(JSON.parse(t));
|
|
1561
|
-
}, this.onPageSnapshotInvalidated = (t) => {
|
|
1562
|
-
this.config.events.onPageSnapshotInvalidated.trigger(t);
|
|
1563
|
-
}, this.onPageSizeChanged = (t) => {
|
|
1564
|
-
this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
|
|
1565
|
-
}, this.onShapeCornerRadiusChanged = (t) => {
|
|
1566
|
-
this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(t));
|
|
1567
|
-
}, this.onCropActiveFrameIdChanged = (t) => {
|
|
1568
|
-
this.config.events.onCropActiveFrameIdChanged.trigger(t);
|
|
1569
|
-
}, this.onAsyncError = (t) => {
|
|
1570
|
-
const r = JSON.parse(t);
|
|
1571
|
-
if ((r == null ? void 0 : r.type) === "dataRow") {
|
|
1572
|
-
const n = new cr(
|
|
1573
|
-
r.count,
|
|
1574
|
-
r.message,
|
|
1575
|
-
r.exceptions
|
|
1576
|
-
);
|
|
1577
|
-
this.config.events.onAsyncError.trigger(n);
|
|
1578
|
-
} else if ((r == null ? void 0 : r.type) === "action") {
|
|
1579
|
-
const n = new or(
|
|
1580
|
-
r.message,
|
|
1581
|
-
r.id,
|
|
1582
|
-
r.event,
|
|
1583
|
-
r.eventChain
|
|
1584
|
-
);
|
|
1585
|
-
this.config.events.onAsyncError.trigger(n);
|
|
1586
|
-
} else
|
|
1587
|
-
this.config.events.onAsyncError.trigger(r);
|
|
1588
|
-
}, this.onViewModeChanged = (t) => {
|
|
1589
|
-
this.config.events.onViewModeChanged.trigger(t);
|
|
1590
|
-
}, this.onBarcodeValidationChanged = (t) => {
|
|
1591
|
-
this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(t));
|
|
1592
|
-
}, this.onDataSourceIdChanged = (t) => {
|
|
1593
|
-
this.config.events.onDataSourceIdChanged.trigger(t);
|
|
1594
|
-
}, this.onDocumentIssueListChanged = (t) => {
|
|
1595
|
-
this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(t));
|
|
1596
|
-
}, this.onEngineEditModeChanged = (t) => {
|
|
1597
|
-
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t));
|
|
1598
|
-
}, this.onBrandKitMediaChanged = (t) => {
|
|
1599
|
-
this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(t));
|
|
1600
|
-
}, this.config = o, this.localConfig = e;
|
|
1601
|
-
}
|
|
1602
|
-
};
|
|
1603
|
-
var wt;
|
|
1604
|
-
class rs {
|
|
1605
|
-
/**
|
|
1606
|
-
* @ignore
|
|
1607
|
-
*/
|
|
1608
|
-
constructor(o) {
|
|
1609
|
-
/**
|
|
1610
|
-
* @ignore
|
|
1611
|
-
*/
|
|
1612
|
-
u(this, wt);
|
|
1613
|
-
this.set = async (e) => (await a(this, wt)).selectedTextStyleDeltaUpdate(JSON.stringify(e)).then((r) => i(r)), this.removeSelected = async () => (await a(this, wt)).selectedTextStyleClean().then((t) => i(t)), this.getSelected = async () => (await a(this, wt)).getSelectedTextStyle().then((t) => i(t)), g(this, wt, o);
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
wt = new WeakMap();
|
|
1617
|
-
var an = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(on || {}), z = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(z || {}), cn = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(cn || {}), pe = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(pe || {}), Et;
|
|
1618
|
-
class ns {
|
|
1619
|
-
/**
|
|
1620
|
-
* @ignore
|
|
1621
|
-
*/
|
|
1622
|
-
constructor(o) {
|
|
1623
|
-
/**
|
|
1624
|
-
* @ignore
|
|
1625
|
-
*/
|
|
1626
|
-
u(this, Et);
|
|
1627
|
-
this.setTool = async (e) => (await a(this, Et)).setTool(e).then((r) => i(r)), this.getSelected = async () => (await a(this, Et)).getSelectedTool().then((t) => i(t)), this.setPointer = async () => this.setTool(z.SELECT), this.setSelect = async () => this.setTool(z.SELECT), this.setHand = async () => this.setTool(z.HAND), this.setZoom = async () => this.setTool(z.ZOOM), this.setTextFrame = async () => this.setTool(z.TEXT_FRAME), this.setImageFrame = async () => this.setTool(z.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(z.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(z.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(z.SHAPE_POLYGON), g(this, Et, o);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
Et = new WeakMap();
|
|
1631
|
-
var K, _, qt;
|
|
1632
|
-
class as {
|
|
1633
|
-
/**
|
|
1634
|
-
* @ignore
|
|
1635
|
-
*/
|
|
1636
|
-
constructor(o, e) {
|
|
1637
|
-
/**
|
|
1638
|
-
* @ignore
|
|
1639
|
-
*/
|
|
1640
|
-
u(this, K);
|
|
1641
|
-
u(this, _);
|
|
1642
|
-
u(this, qt);
|
|
1643
|
-
this.undo = async () => (await a(this, K)).undo().then((r) => i(r)), this.redo = async () => (await a(this, K)).redo().then((r) => i(r)), this.addCustomData = async (t, r) => (await a(this, K)).setCustomUndoData(t, r, !1).then((c) => i(c)), this.record = async (t, r) => {
|
|
1644
|
-
try {
|
|
1645
|
-
await a(this, _).beginIfNoneActive(t), await r(a(this, qt)), await a(this, _).end();
|
|
1646
|
-
} catch (n) {
|
|
1647
|
-
throw await a(this, _).abort(), n;
|
|
1648
|
-
}
|
|
1649
|
-
}, this.pause = async () => (await a(this, K)).pause().then((r) => i(r)), this.resume = async () => (await a(this, K)).resume().then((r) => i(r)), this.clear = async () => (await a(this, K)).clear().then((r) => i(r)), this.advanced = {
|
|
1650
|
-
/**
|
|
1651
|
-
* This will start a new undo operation.
|
|
1652
|
-
* This will throw an exception when there is already an undo operation recording.
|
|
1653
|
-
* @experimental This method is experimental and may change in future versions.
|
|
1654
|
-
* @returns
|
|
1655
|
-
*/
|
|
1656
|
-
begin: async (t) => a(this, _).begin(t),
|
|
1657
|
-
/**
|
|
1658
|
-
* This will start a new undo operation if there is no other undo operation recording.
|
|
1659
|
-
* This does not throw.
|
|
1660
|
-
* @experimental This method is experimental and may change in future versions.
|
|
1661
|
-
* @returns
|
|
1662
|
-
*/
|
|
1663
|
-
beginIfNoneActive: async (t) => a(this, _).beginIfNoneActive(t),
|
|
1664
|
-
/**
|
|
1665
|
-
* Ends the currently active recording operation.
|
|
1666
|
-
* If there is no recording operation currently running this will throw an exception.
|
|
1667
|
-
* @experimental This method is experimental and may change in future versions.
|
|
1668
|
-
* @returns
|
|
1669
|
-
*/
|
|
1670
|
-
end: async () => a(this, _).end(),
|
|
1671
|
-
/**
|
|
1672
|
-
* Aborts the currently active recording operation.
|
|
1673
|
-
* If there is no recording operation currently running this will throw an exception.
|
|
1674
|
-
* @experimental This method is experimental and may change in future versions.
|
|
1675
|
-
* @returns
|
|
1676
|
-
*/
|
|
1677
|
-
abort: async () => a(this, _).abort()
|
|
1678
|
-
}, g(this, K, o), g(this, qt, e), g(this, _, new hn(o));
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
K = new WeakMap(), _ = new WeakMap(), qt = new WeakMap();
|
|
1682
|
-
var ot;
|
|
1683
|
-
class hn {
|
|
1684
|
-
/**
|
|
1685
|
-
* @ignore
|
|
1686
|
-
*/
|
|
1687
|
-
constructor(o) {
|
|
1688
|
-
/**
|
|
1689
|
-
* @ignore
|
|
1690
|
-
*/
|
|
1691
|
-
u(this, ot);
|
|
1692
|
-
this.begin = async (e) => (await a(this, ot)).begin(e).then((r) => i(r)), this.beginIfNoneActive = async (e) => (await a(this, ot)).beginIfNoneActive(e).then((r) => i(r)), this.end = async () => (await a(this, ot)).end().then((t) => i(t)), this.abort = async () => (await a(this, ot)).abort().then((t) => i(t)), g(this, ot, o);
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
ot = new WeakMap();
|
|
1696
|
-
const dn = (s, o = 2) => {
|
|
1697
|
-
const e = Math.pow(10, o);
|
|
1698
|
-
return Math.round(s * e) / e;
|
|
1699
|
-
};
|
|
1700
|
-
var Yt, Dt;
|
|
1701
|
-
class is {
|
|
1702
|
-
/**
|
|
1703
|
-
* @ignore
|
|
1704
|
-
*/
|
|
1705
|
-
constructor(o, e) {
|
|
1706
|
-
/**
|
|
1707
|
-
* @ignore
|
|
1708
|
-
*/
|
|
1709
|
-
u(this, Yt);
|
|
1710
|
-
u(this, Dt);
|
|
1711
|
-
this.round = (t, r) => i({
|
|
1712
|
-
data: String(dn(t, r)),
|
|
1713
|
-
success: !0,
|
|
1714
|
-
status: 200,
|
|
1715
|
-
parsedData: null
|
|
1716
|
-
}), this.createEnvironmentBaseURL = (t) => {
|
|
1717
|
-
const { type: r = pe.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = t, h = r == pe.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1718
|
-
return `https://${n}.${h}.online/grafx/api/v${c}/environment/${n}`;
|
|
1719
|
-
}, this.stageFiles = async (t, r, n) => {
|
|
1720
|
-
const c = a(this, Dt).get(tt.GraFxStudioEnvironmentApiUrl);
|
|
1721
|
-
if (!c)
|
|
1722
|
-
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1723
|
-
const h = `${c}connectors/${r}/stage`, l = a(this, Dt).get(tt.GraFxStudioAuthToken);
|
|
1724
|
-
if (!l)
|
|
1725
|
-
throw new Error("GraFx Studio Auth Token is not set");
|
|
1726
|
-
const p = new FormData();
|
|
1727
|
-
t.forEach((S, v) => {
|
|
1728
|
-
const E = S instanceof File ? S.name : `blob-${v}`;
|
|
1729
|
-
p.append("files", S, E);
|
|
1730
|
-
}), n && p.append(
|
|
1731
|
-
"validationJson",
|
|
1732
|
-
JSON.stringify({
|
|
1733
|
-
allowedMimeTypes: n.mimeTypes,
|
|
1734
|
-
minDimensions: {
|
|
1735
|
-
width: n.minWidthPixels,
|
|
1736
|
-
height: n.minHeightPixels
|
|
1737
|
-
}
|
|
1738
|
-
})
|
|
1739
|
-
);
|
|
1740
|
-
const y = await fetch(h, {
|
|
1741
|
-
method: "POST",
|
|
1742
|
-
body: p,
|
|
1743
|
-
headers: {
|
|
1744
|
-
Authorization: `Bearer ${l}`
|
|
1745
|
-
}
|
|
1746
|
-
});
|
|
1747
|
-
if (y.status === 422) {
|
|
1748
|
-
const S = await y.json();
|
|
1749
|
-
throw new Mr(S.message, As.minDimension);
|
|
1750
|
-
}
|
|
1751
|
-
if (!y.ok)
|
|
1752
|
-
throw new Error("Failed to stage files");
|
|
1753
|
-
return await y.json();
|
|
1754
|
-
}, this.unitEvaluate = async (t, r) => (await a(this, Yt)).unitEvaluate(t, r).then((c) => i(c)), g(this, Yt, o), g(this, Dt, e);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
Yt = new WeakMap(), Dt = new WeakMap();
|
|
1758
|
-
const ln = (s) => s.type === ae.dataSource, un = (s) => {
|
|
1759
|
-
var o;
|
|
1760
|
-
return s ? ln(s) && ((o = s == null ? void 0 : s.value) == null ? void 0 : o.type) === Fs.injected : !1;
|
|
1761
|
-
};
|
|
1762
|
-
var Zt;
|
|
1763
|
-
class gn {
|
|
1764
|
-
constructor(o) {
|
|
1765
|
-
u(this, Zt);
|
|
1766
|
-
this.setMinimum = async (e, t) => {
|
|
1767
|
-
const r = { minValue: { value: t } };
|
|
1768
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1769
|
-
}, this.setMaximum = async (e, t) => {
|
|
1770
|
-
const r = { maxValue: { value: t } };
|
|
1771
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1772
|
-
}, this.setShowStepper = async (e, t) => {
|
|
1773
|
-
const r = { showStepper: { value: t } };
|
|
1774
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1775
|
-
}, this.setStepSize = async (e, t) => {
|
|
1776
|
-
const r = { stepSize: { value: t } };
|
|
1777
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1778
|
-
}, this.setThousandsSeparator = async (e, t) => {
|
|
1779
|
-
const r = { thousandsSeparator: { value: t } };
|
|
1780
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1781
|
-
}, this.setDecimalSeparator = async (e, t) => {
|
|
1782
|
-
const r = { decimalSeparator: { value: t } };
|
|
1783
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1784
|
-
}, this.setDecimalCharacterStyle = async (e, t) => {
|
|
1785
|
-
const r = { decimalCharacterStyleId: { value: t } };
|
|
1786
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1787
|
-
}, this.setNumberOfDecimals = async (e, t) => {
|
|
1788
|
-
const r = { numberOfDecimals: { value: t } };
|
|
1789
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1790
|
-
}, g(this, Zt, o);
|
|
1791
|
-
}
|
|
1792
|
-
async applyPropertiesUpdate(o, e) {
|
|
1793
|
-
const r = await (await a(this, Zt)).updateNumberVariableProperties(o, JSON.stringify(e));
|
|
1794
|
-
return i(r);
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
Zt = new WeakMap();
|
|
1798
|
-
var Qt;
|
|
1799
|
-
class yn {
|
|
1800
|
-
constructor(o) {
|
|
1801
|
-
u(this, Qt);
|
|
1802
|
-
this.setDisplayFormat = async (e, t) => {
|
|
1803
|
-
const r = { displayFormat: { value: t } };
|
|
1804
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1805
|
-
}, this.setLocale = async (e, t) => {
|
|
1806
|
-
const r = { locale: { value: t } };
|
|
1807
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1808
|
-
}, this.setStartDate = async (e, t) => {
|
|
1809
|
-
const r = { startDate: { value: t } };
|
|
1810
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1811
|
-
}, this.setEndDate = async (e, t) => {
|
|
1812
|
-
const r = { endDate: { value: t } };
|
|
1813
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1814
|
-
}, this.setExcludedDays = async (e, t) => {
|
|
1815
|
-
const r = { excludedDays: { value: t } };
|
|
1816
|
-
return this.applyPropertiesUpdate(e, r);
|
|
1817
|
-
}, g(this, Qt, o);
|
|
1818
|
-
}
|
|
1819
|
-
async applyPropertiesUpdate(o, e) {
|
|
1820
|
-
const r = await (await a(this, Qt)).updateDateVariableProperties(o, JSON.stringify(e));
|
|
1821
|
-
return i(r);
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
Qt = new WeakMap();
|
|
1825
|
-
var k, Lt;
|
|
1826
|
-
class pn {
|
|
1827
|
-
constructor(o, e) {
|
|
1828
|
-
u(this, k);
|
|
1829
|
-
u(this, Lt);
|
|
1830
|
-
this.setValue = async (t, r) => {
|
|
1831
|
-
const n = await a(this, k);
|
|
1832
|
-
let c;
|
|
1833
|
-
return Array.isArray(r) ? c = r.map((h) => a(this, Lt).mapDataItemToEngine(h)) : c = r, n.setVariableValue(t, c).then((h) => i(h));
|
|
1834
|
-
}, this.getInjectedData = async (t) => (await a(this, k)).getInjectedDataSourceVariableData(t).then((n) => i(n)).then((n) => {
|
|
1835
|
-
const c = { ...n, parsedData: null };
|
|
1836
|
-
return n.parsedData && (c.parsedData = {
|
|
1837
|
-
...n.parsedData,
|
|
1838
|
-
data: n.parsedData.data.map(
|
|
1839
|
-
(h) => a(this, Lt).mapEngineToDataItem(h)
|
|
1840
|
-
)
|
|
1841
|
-
}), c;
|
|
1842
|
-
}), this.getInjectedItemById = async (t, r) => {
|
|
1843
|
-
var y;
|
|
1844
|
-
const c = await (await a(this, k)).getVariableById(t).then((b) => i(b));
|
|
1845
|
-
un(c.parsedData) || St({
|
|
1846
|
-
status: 400,
|
|
1847
|
-
error: "Variable is not an injected data source variable"
|
|
1848
|
-
});
|
|
1849
|
-
const h = c.parsedData.value.itemIdPropertyName, p = (y = (await this.getInjectedData(t)).parsedData) == null ? void 0 : y.data.find(
|
|
1850
|
-
(b) => {
|
|
1851
|
-
var S;
|
|
1852
|
-
return ((S = b[h]) == null ? void 0 : S.toString()) === r.toString();
|
|
1853
|
-
}
|
|
1854
|
-
);
|
|
1855
|
-
return p || St({
|
|
1856
|
-
status: 404,
|
|
1857
|
-
error: `Item not found in injected data for variable ${t}`
|
|
1858
|
-
}), {
|
|
1859
|
-
success: !0,
|
|
1860
|
-
status: 200,
|
|
1861
|
-
parsedData: {
|
|
1862
|
-
data: p,
|
|
1863
|
-
continuationToken: null,
|
|
1864
|
-
previousPageToken: null
|
|
1865
|
-
}
|
|
1866
|
-
};
|
|
1867
|
-
}, this.setInjectedModel = async (t, r) => {
|
|
1868
|
-
const n = r.properties, c = r.itemIdPropertyName;
|
|
1869
|
-
return (await a(this, k)).setInjectedDataSourceVariableModel(t, JSON.stringify(n), c).then((l) => i(l));
|
|
1870
|
-
}, this.setSourceType = async (t, r) => (await a(this, k)).setDataSourceVariableSourceType(t, r).then((c) => i(c)), this.setConnector = async (t, r) => {
|
|
1871
|
-
const n = await a(this, k), h = new ne().makeConnectorSourceForwardsCompatible(r);
|
|
1872
|
-
return n.setDataSourceVariableConnector(t, JSON.stringify(h)).then((l) => i(l));
|
|
1873
|
-
}, this.removeConnector = async (t) => (await a(this, k)).setDataSourceVariableConnector(t, null).then((n) => i(n)), g(this, k, o), g(this, Lt, e);
|
|
1874
|
-
}
|
|
1875
|
-
async setDisplayOptions(o, e, t) {
|
|
1876
|
-
return (await a(this, k)).setDataSourceVariableDisplayOptions(o, e, t ?? void 0).then((n) => i(n));
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
k = new WeakMap(), Lt = new WeakMap();
|
|
1880
|
-
var w, Nt, Rt, Cs;
|
|
1881
|
-
let os = (Cs = class {
|
|
1882
|
-
/**
|
|
1883
|
-
* @ignore
|
|
1884
|
-
*/
|
|
1885
|
-
constructor(o, e) {
|
|
1886
|
-
/**
|
|
1887
|
-
* @ignore
|
|
1888
|
-
*/
|
|
1889
|
-
u(this, w);
|
|
1890
|
-
u(this, Nt);
|
|
1891
|
-
u(this, Rt);
|
|
1892
|
-
this.getAll = async () => (await a(this, w)).getVariables().then((r) => i(r)).then((r) => {
|
|
1893
|
-
const n = r;
|
|
1894
|
-
return n.parsedData && (n.parsedData = this.makeVariablesBackwardsCompatible(n.parsedData)), n;
|
|
1895
|
-
}), this.getById = async (t) => (await a(this, w)).getVariableById(t).then((n) => i(n)).then((n) => {
|
|
1896
|
-
const c = n;
|
|
1897
|
-
return c.parsedData && (c.parsedData = this.makeVariableBackwardsCompatible(c.parsedData)), c;
|
|
1898
|
-
}), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((n) => i(n)).then((n) => {
|
|
1899
|
-
const c = n;
|
|
1900
|
-
return c.parsedData && (c.parsedData = this.makeVariableBackwardsCompatible(c.parsedData)), c;
|
|
1901
|
-
}), this.create = async (t, r) => (await a(this, w)).addVariable(t, r).then((c) => i(c)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((n) => i(n)), this.rename = async (t, r) => (await a(this, w)).setVariableName(t, r).then((c) => i(c)), this.setLabel = async (t, r) => (await a(this, w)).setVariableLabel(t, r).then((c) => i(c)), g(this, Nt, async (t, r) => (await a(this, w)).setVariablePlaceholder(t, r).then((c) => i(c))), this.setPlaceholder = async (t, r) => a(this, Nt).call(this, t, r), this.resetPlaceholder = async (t) => a(this, Nt).call(this, t, null), g(this, Rt, async (t, r) => (await a(this, w)).setVariableHelpText(t, r).then((c) => i(c))), this.setHelpText = async (t, r) => a(this, Rt).call(this, t, r), this.resetHelpText = async (t) => a(this, Rt).call(this, t, null), this.setType = async (t, r) => (await a(this, w)).setVariableType(t, r).then((c) => i(c)), this.setListVariable = async (t, r) => (await a(this, w)).setListVariableItems(
|
|
1902
|
-
t,
|
|
1903
|
-
r.map((c) => JSON.stringify({ value: c }))
|
|
1904
|
-
).then((c) => i(c)), this.setValue = async (t, r) => (await a(this, w)).setVariableValue(t, r).then((c) => i(c, (h) => yr(h, { id: t }))), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((n) => i(n)), this.groupVariables = async (t, r) => (await a(this, w)).groupVariables(t, r).then((c) => i(c)), this.ungroupVariables = async (t) => (await a(this, w)).ungroupVariable(t).then((n) => i(n)), this.move = async (t, r, n) => (await a(this, w)).moveVariable(r, n, t).then((h) => i(h)), this.moveVariables = async (t, r, n) => (await a(this, w)).moveVariables(r, n, t).then((h) => i(h)), this.setIsVisible = async (t, r) => {
|
|
1905
|
-
const n = r ? { type: kt.visible } : { type: kt.invisible };
|
|
1906
|
-
return this.setVariableVisibility(t, n);
|
|
1907
|
-
}, this.setIsHidden = async (t, r) => {
|
|
1908
|
-
const n = r ? { type: kt.invisible } : { type: kt.visible };
|
|
1909
|
-
return this.setVariableVisibility(t, n);
|
|
1910
|
-
}, this.setVariableVisibility = async (t, r) => (await a(this, w)).setVariableVisibility(t, JSON.stringify(r)).then((c) => i(c)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, w)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((n) => i(n)), this.setIsRequired = async (t, r) => (await a(this, w)).setVariableIsRequired(t, r).then((c) => i(c)), this.setRemoveParagraphIfEmpty = async (t, r) => (await a(this, w)).setVariableRemoveParagraphIfEmpty(t, r).then((c) => i(c)), this.setVariableCharacterLimit = async (t, r) => (await a(this, w)).setVariableCharacterLimit(t, r).then((c) => i(c)), this.setIsReadonly = async (t, r) => (await a(this, w)).setVariableIsReadonly(t, r).then((c) => i(c)), this.getImageVariableConnectorId = async (t) => (await a(this, w)).getImageVariableConnectorId(t).then((n) => i(n)), this.setImageVariableConnector = async (t, r) => {
|
|
1911
|
-
const n = await a(this, w), h = new ne().makeConnectorSourceForwardsCompatible(r);
|
|
1912
|
-
return n.setImageVariableConnector(t, JSON.stringify(h)).then((l) => i(l));
|
|
1913
|
-
}, this.setImageVariableValueWithContext = async (t, r, n) => (await a(this, w)).setImageVariableValueWithContext(t, r, JSON.stringify(n)).then((h) => i(h)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, r) => {
|
|
1914
|
-
const n = { prefix: { value: r } };
|
|
1915
|
-
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1916
|
-
}, this.setSuffix = async (t, r) => {
|
|
1917
|
-
const n = { suffix: { value: r } };
|
|
1918
|
-
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1919
|
-
}, this.setPrefixCharacterStyle = async (t, r) => {
|
|
1920
|
-
const n = { prefixCharacterStyleId: { value: r } };
|
|
1921
|
-
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1922
|
-
}, this.setSuffixCharacterStyle = async (t, r) => {
|
|
1923
|
-
const n = { suffixCharacterStyleId: { value: r } };
|
|
1924
|
-
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1925
|
-
}, this.setPrivateData = async (t, r) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(r)).then((c) => i(c)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((n) => i(n)), this.setAllowImageQuery = async (t, r) => (await a(this, w)).setImageVariableAllowQuery(t, r).then((c) => i(c)), this.setAllowImageUpload = async (t, r) => (await a(this, w)).setImageVariableAllowUpload(t, r).then((c) => i(c)), this.setMinImageUploadSize = async (t, r, n) => (await a(this, w)).setImageVariableUploadMinSize(t, r, n).then((h) => i(h)), this.setIsDontBreak = async (t, r) => (await a(this, w)).setVariableIsDontBreak(t, r).then((c) => i(c)), this.highlightUsages = async (t) => (await a(this, w)).highlightVariableUsages(t).then((n) => i(n)), g(this, w, o), this.number = new gn(a(this, w)), this.date = new yn(a(this, w)), this.dataSource = new pn(a(this, w), e);
|
|
1926
|
-
}
|
|
1927
|
-
makeVariablesBackwardsCompatible(o) {
|
|
1928
|
-
return o.map((e) => this.makeVariableBackwardsCompatible(e));
|
|
1929
|
-
}
|
|
1930
|
-
makeVariableBackwardsCompatible(o) {
|
|
1931
|
-
return o.type !== ae.list ? o : this.makeListVariableBackwardsCompatible(o);
|
|
1932
|
-
}
|
|
1933
|
-
makeListVariableBackwardsCompatible(o) {
|
|
1934
|
-
const e = o, t = o.items, r = o.selected, n = t.map((c) => c.value);
|
|
1935
|
-
return e.items = n, e.selected = r == null ? void 0 : r.value, e;
|
|
1936
|
-
}
|
|
1937
|
-
async applyPrefixSuffixDeltaUpdate(o, e) {
|
|
1938
|
-
const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(o, JSON.stringify(e));
|
|
1939
|
-
return i(r);
|
|
1940
|
-
}
|
|
1941
|
-
}, w = new WeakMap(), Nt = new WeakMap(), Rt = new WeakMap(), Cs);
|
|
1942
|
-
var xt;
|
|
1943
|
-
class wn {
|
|
1944
|
-
/**
|
|
1945
|
-
* @ignore
|
|
1946
|
-
*/
|
|
1947
|
-
constructor(o) {
|
|
1948
|
-
/**
|
|
1949
|
-
* @ignore
|
|
1950
|
-
*/
|
|
1951
|
-
u(this, xt);
|
|
1952
|
-
this.get = async () => (await a(this, xt)).getBrandKit().then((t) => i(t)), this.set = async (e) => (await a(this, xt)).setBrandKit(JSON.stringify(e)).then((r) => i(r)), g(this, xt, o);
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
xt = new WeakMap();
|
|
1956
|
-
class Cn {
|
|
1957
|
-
/**
|
|
1958
|
-
* @ignore
|
|
1959
|
-
*/
|
|
1960
|
-
constructor(o) {
|
|
1961
|
-
this.onVariableListChanged = (e) => {
|
|
1962
|
-
this.config.events.onVariableListChanged.trigger(JSON.parse(e));
|
|
1963
|
-
}, this.onConnectorsChanged = (e) => {
|
|
1964
|
-
this.config.events.onConnectorsChanged.trigger(JSON.parse(e));
|
|
1965
|
-
}, this.onPageSizeChanged = (e) => {
|
|
1966
|
-
this.config.events.onPageSizeChanged.trigger(JSON.parse(e));
|
|
1967
|
-
}, this.onEngineEditModeChanged = (e) => {
|
|
1968
|
-
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
|
|
1969
|
-
}, this.config = o;
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
var ct;
|
|
1973
|
-
class mn {
|
|
1974
|
-
/**
|
|
1975
|
-
* @ignore
|
|
1976
|
-
*/
|
|
1977
|
-
constructor(o) {
|
|
1978
|
-
/**
|
|
1979
|
-
* @ignore
|
|
1980
|
-
*/
|
|
1981
|
-
u(this, ct);
|
|
1982
|
-
this.getAll = async () => (await a(this, ct)).getVariables().then((t) => i(t)), this.getById = async (e) => (await a(this, ct)).getVariableById(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, ct)).getVariableByName(e).then((r) => i(r)), this.setListVariable = async (e, t) => (await a(this, ct)).setListVariableItems(
|
|
1983
|
-
e,
|
|
1984
|
-
t.map((n) => JSON.stringify(n))
|
|
1985
|
-
).then((n) => i(n)), g(this, ct, o), this.image = new fn(o), this.dataSource = new Sn(o);
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
ct = new WeakMap();
|
|
1989
|
-
var Q;
|
|
1990
|
-
class fn {
|
|
1991
|
-
constructor(o) {
|
|
1992
|
-
u(this, Q);
|
|
1993
|
-
this.setAllowQuery = async (e, t) => (await a(this, Q)).setImageVariableAllowQuery(e, t).then((n) => i(n)), this.setAllowUpload = async (e, t) => (await a(this, Q)).setImageVariableAllowUpload(e, t).then((n) => i(n)), this.setMinUploadSize = async (e, t, r) => (await a(this, Q)).setImageVariableUploadMinSize(e, t, r).then((c) => i(c)), this.setConnector = async (e, t) => (await a(this, Q)).setImageVariableConnector(e, JSON.stringify(t)).then((n) => i(n)), this.setConnectorContext = async (e, t) => (await a(this, Q)).setImageVariableConnectorContext(e, JSON.stringify(t)).then((n) => i(n)), g(this, Q, o);
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
Q = new WeakMap();
|
|
1997
|
-
var Xt;
|
|
1998
|
-
class Sn {
|
|
1999
|
-
constructor(o) {
|
|
2000
|
-
u(this, Xt);
|
|
2001
|
-
this.setConnector = async (e, t) => (await a(this, Xt)).setDataSourceVariableConnector(e, JSON.stringify(t)).then((n) => i(n)), g(this, Xt, o);
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
Xt = new WeakMap();
|
|
2005
|
-
var Ct;
|
|
2006
|
-
class bn {
|
|
2007
|
-
/**
|
|
2008
|
-
* @ignore
|
|
2009
|
-
*/
|
|
2010
|
-
constructor(o) {
|
|
2011
|
-
/**
|
|
2012
|
-
* @ignore
|
|
2013
|
-
*/
|
|
2014
|
-
u(this, Ct);
|
|
2015
|
-
this.register = async (e) => (await a(this, Ct)).registerConnector(JSON.stringify(e)).then((r) => i(r)), this.getById = async (e) => (await a(this, Ct)).getConnectorById(e).then((r) => i(r)), this.getAllByType = async (e) => (await a(this, Ct)).getConnectors(e).then((r) => i(r)), g(this, Ct, o);
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
Ct = new WeakMap();
|
|
2019
|
-
var Mt, re;
|
|
2020
|
-
class vn {
|
|
2021
|
-
/**
|
|
2022
|
-
* @ignore
|
|
2023
|
-
*/
|
|
2024
|
-
constructor(o) {
|
|
2025
|
-
/**
|
|
2026
|
-
* @ignore
|
|
2027
|
-
*/
|
|
2028
|
-
u(this, Mt);
|
|
2029
|
-
/**
|
|
2030
|
-
* @ignore
|
|
2031
|
-
*/
|
|
2032
|
-
u(this, re);
|
|
2033
|
-
this.setWidth = async (e) => (await a(this, Mt)).setPageWidth(e).then((r) => i(r)), this.setHeight = async (e) => (await a(this, Mt)).setPageHeight(e).then((r) => i(r)), g(this, Mt, o), g(this, re, o);
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
Mt = new WeakMap(), re = new WeakMap();
|
|
2037
|
-
class cs {
|
|
2038
|
-
/**
|
|
2039
|
-
* The next initiator is a split off on SDK level to tag next features
|
|
2040
|
-
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
2041
|
-
* @param config The configuration object where the SDK and editor can get configured
|
|
2042
|
-
*/
|
|
2043
|
-
constructor(o, e, t) {
|
|
2044
|
-
this.config = o, this.connection = e, this.editorAPI = t, this.subscriber = new Cn(o), this.variable = new mn(this.editorAPI), this.connector = new bn(this.editorAPI), this.page = new vn(this.editorAPI), this.canvas = new he(this.editorAPI), this.brandKit = new wn(this.editorAPI);
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
var M = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(M || {}), Es = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Es || {}), Ht = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Ht || {});
|
|
2048
|
-
class Ds {
|
|
2049
|
-
constructor(o) {
|
|
2050
|
-
this.logger = o;
|
|
2051
|
-
}
|
|
2052
|
-
createEventHandlerFn(o, e) {
|
|
2053
|
-
return (...r) => {
|
|
2054
|
-
try {
|
|
2055
|
-
const n = o(...r);
|
|
2056
|
-
return n instanceof Promise ? n.catch((c) => this.handleError(c, e, o.name)) : n;
|
|
2057
|
-
} catch (n) {
|
|
2058
|
-
this.handleError(n, e, o.name);
|
|
2059
|
-
}
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2062
|
-
handleError(o, e, t) {
|
|
2063
|
-
var r;
|
|
2064
|
-
if (e === Ht.log)
|
|
2065
|
-
(r = this.logger) == null || r.call(this, M.error, Es.event, `Error in callback ${t}: ${o}`);
|
|
2066
|
-
else
|
|
2067
|
-
throw o;
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
class hs extends Ds {
|
|
2071
|
-
constructor(o, e) {
|
|
2072
|
-
super(e), this.handler = o;
|
|
2073
|
-
}
|
|
2074
|
-
/**
|
|
2075
|
-
* Executes the defined handler with the provided arguments.
|
|
2076
|
-
*
|
|
2077
|
-
* @param args The arguments to pass to the callbacks.
|
|
2078
|
-
* @returns The result of executing the callbacks.
|
|
2079
|
-
*/
|
|
2080
|
-
trigger(...o) {
|
|
2081
|
-
const e = this.handler();
|
|
2082
|
-
if (e)
|
|
2083
|
-
return this.createEventHandlerFn(e, Ht.throw)(...o);
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
class C extends Ds {
|
|
2087
|
-
constructor(o, e) {
|
|
2088
|
-
super(e), this.legacyHandler = o, this.subscriptions = /* @__PURE__ */ new Set();
|
|
2089
|
-
}
|
|
2090
|
-
/**
|
|
2091
|
-
* Executes the registered callbacks with provided arguments
|
|
2092
|
-
*
|
|
2093
|
-
* @param args The arguments to pass to the callbacks.
|
|
2094
|
-
* @returns The result of executing the callbacks.
|
|
2095
|
-
*/
|
|
2096
|
-
trigger(...o) {
|
|
2097
|
-
const e = this.legacyHandler();
|
|
2098
|
-
e && this.createEventHandlerFn(e, Ht.log)(...o);
|
|
2099
|
-
for (const t of this.subscriptions)
|
|
2100
|
-
t(...o);
|
|
2101
|
-
}
|
|
2102
|
-
/**
|
|
2103
|
-
* Registers a callback function.
|
|
2104
|
-
*
|
|
2105
|
-
* @param callback - The callback function to register. This function will be invoked when the event occurs.
|
|
2106
|
-
* @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.
|
|
2107
|
-
* Accepted values are:
|
|
2108
|
-
* - "log": Logs the error to the console (default behavior)
|
|
2109
|
-
* - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
|
|
2110
|
-
* @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
|
|
2111
|
-
*/
|
|
2112
|
-
registerCallback(o, e = Ht.log) {
|
|
2113
|
-
const t = this.createEventHandlerFn(o, e);
|
|
2114
|
-
return this.subscriptions.add(t), () => {
|
|
2115
|
-
this.subscriptions.delete(t);
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
class we {
|
|
2120
|
-
/**
|
|
2121
|
-
* Creates a runtime configuration object from the provided configuration object.
|
|
2122
|
-
*
|
|
2123
|
-
* @param config The configuration object to create the runtime configuration object from.
|
|
2124
|
-
* @returns The runtime configuration object.
|
|
2125
|
-
*/
|
|
2126
|
-
static createRuntimeConfig(o) {
|
|
2127
|
-
var t, r, n, c, h, l, p, y, b, S, v, E, O, f, H, x, I, W, q, bt, vt, Ce, me, fe, Se, be, ve, Ie, Ae, Pe, Oe, Fe, Ee, De, Le;
|
|
2128
|
-
const e = { ...o };
|
|
2129
|
-
return e.logging = {
|
|
2130
|
-
logLevel: ((t = o.logging) == null ? void 0 : t.logLevel) || M.error,
|
|
2131
|
-
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((Bt, ie, oe) => {
|
|
2132
|
-
var Ne;
|
|
2133
|
-
if (we.isLoggingEnabled(Bt, ((Ne = e.logging) == null ? void 0 : Ne.logLevel) ?? M.error))
|
|
2134
|
-
switch (Bt) {
|
|
2135
|
-
case M.error:
|
|
2136
|
-
console.error(`[${ie}] [${Bt}] ${oe}`);
|
|
2137
|
-
break;
|
|
2138
|
-
case M.warn:
|
|
2139
|
-
console.warn(`[${ie}] [${Bt}] ${oe}`);
|
|
2140
|
-
break;
|
|
2141
|
-
default:
|
|
2142
|
-
console.log(`[${ie}] [${Bt}] ${oe}`);
|
|
2143
|
-
}
|
|
2144
|
-
})
|
|
2145
|
-
}, e.handlers = {
|
|
2146
|
-
onAuthExpired: new hs(() => e.onAuthExpired, (n = e.logging) == null ? void 0 : n.logger),
|
|
2147
|
-
onViewportRequested: new hs(
|
|
2148
|
-
() => e.onViewportRequested,
|
|
2149
|
-
(c = e.logging) == null ? void 0 : c.logger
|
|
2150
|
-
)
|
|
2151
|
-
}, e.events = {
|
|
2152
|
-
onActionsChanged: new C(
|
|
2153
|
-
() => e.onActionsChanged,
|
|
2154
|
-
(h = e.logging) == null ? void 0 : h.logger
|
|
2155
|
-
),
|
|
2156
|
-
onStateChanged: new C(
|
|
2157
|
-
() => e.onStateChanged,
|
|
2158
|
-
(l = e.logging) == null ? void 0 : l.logger
|
|
2159
|
-
),
|
|
2160
|
-
onDocumentLoaded: new C(
|
|
2161
|
-
() => e.onDocumentLoaded,
|
|
2162
|
-
(p = e.logging) == null ? void 0 : p.logger
|
|
2163
|
-
),
|
|
2164
|
-
onSelectedFramesLayoutChanged: new C(
|
|
2165
|
-
() => e.onSelectedFramesLayoutChanged,
|
|
2166
|
-
(y = e.logging) == null ? void 0 : y.logger
|
|
2167
|
-
),
|
|
2168
|
-
onFramesLayoutChanged: new C(
|
|
2169
|
-
() => e.onFramesLayoutChanged,
|
|
2170
|
-
(b = e.logging) == null ? void 0 : b.logger
|
|
2171
|
-
),
|
|
2172
|
-
onSelectedFramesContentChanged: new C(
|
|
2173
|
-
() => e.onSelectedFramesContentChanged,
|
|
2174
|
-
(S = e.logging) == null ? void 0 : S.logger
|
|
2175
|
-
),
|
|
2176
|
-
onPageSelectionChanged: new C(
|
|
2177
|
-
() => e.onPageSelectionChanged,
|
|
2178
|
-
(v = e.logging) == null ? void 0 : v.logger
|
|
2179
|
-
),
|
|
2180
|
-
onSelectedLayoutPropertiesChanged: new C(
|
|
2181
|
-
() => e.onSelectedLayoutPropertiesChanged,
|
|
2182
|
-
(E = e.logging) == null ? void 0 : E.logger
|
|
2183
|
-
),
|
|
2184
|
-
onSelectedLayoutUnitChanged: new C(
|
|
2185
|
-
() => e.onSelectedLayoutUnitChanged,
|
|
2186
|
-
(O = e.logging) == null ? void 0 : O.logger
|
|
2187
|
-
),
|
|
2188
|
-
onScrubberPositionChanged: new C(
|
|
2189
|
-
() => e.onScrubberPositionChanged,
|
|
2190
|
-
(f = e.logging) == null ? void 0 : f.logger
|
|
2191
|
-
),
|
|
2192
|
-
onFrameAnimationsChanged: new C(
|
|
2193
|
-
() => e.onFrameAnimationsChanged,
|
|
2194
|
-
(H = e.logging) == null ? void 0 : H.logger
|
|
2195
|
-
),
|
|
2196
|
-
onVariableListChanged: new C(
|
|
2197
|
-
() => e.onVariableListChanged,
|
|
2198
|
-
(x = e.logging) == null ? void 0 : x.logger
|
|
2199
|
-
),
|
|
2200
|
-
onSelectedToolChanged: new C(
|
|
2201
|
-
() => e.onSelectedToolChanged,
|
|
2202
|
-
(I = e.logging) == null ? void 0 : I.logger
|
|
2203
|
-
),
|
|
2204
|
-
onUndoStackStateChanged: new C(
|
|
2205
|
-
() => e.onUndoStackStateChanged,
|
|
2206
|
-
(W = e.logging) == null ? void 0 : W.logger
|
|
2207
|
-
),
|
|
2208
|
-
onSelectedLayoutFramesChanged: new C(
|
|
2209
|
-
() => e.onSelectedLayoutFramesChanged,
|
|
2210
|
-
(q = e.logging) == null ? void 0 : q.logger
|
|
2211
|
-
),
|
|
2212
|
-
onSelectedTextStyleChanged: new C(
|
|
2213
|
-
() => e.onSelectedTextStyleChanged,
|
|
2214
|
-
(bt = e.logging) == null ? void 0 : bt.logger
|
|
2215
|
-
),
|
|
2216
|
-
onColorsChanged: new C(
|
|
2217
|
-
() => e.onColorsChanged,
|
|
2218
|
-
(vt = e.logging) == null ? void 0 : vt.logger
|
|
2219
|
-
),
|
|
2220
|
-
onParagraphStylesChanged: new C(
|
|
2221
|
-
() => e.onParagraphStylesChanged,
|
|
2222
|
-
(Ce = e.logging) == null ? void 0 : Ce.logger
|
|
2223
|
-
),
|
|
2224
|
-
onCharacterStylesChanged: new C(
|
|
2225
|
-
() => e.onCharacterStylesChanged,
|
|
2226
|
-
(me = e.logging) == null ? void 0 : me.logger
|
|
2227
|
-
),
|
|
2228
|
-
onFontFamiliesChanged: new C(
|
|
2229
|
-
() => e.onFontFamiliesChanged,
|
|
2230
|
-
(fe = e.logging) == null ? void 0 : fe.logger
|
|
2231
|
-
),
|
|
2232
|
-
onSelectedLayoutIdChanged: new C(
|
|
2233
|
-
() => e.onSelectedLayoutIdChanged,
|
|
2234
|
-
(Se = e.logging) == null ? void 0 : Se.logger
|
|
2235
|
-
),
|
|
2236
|
-
onLayoutsChanged: new C(
|
|
2237
|
-
() => e.onLayoutsChanged,
|
|
2238
|
-
(be = e.logging) == null ? void 0 : be.logger
|
|
2239
|
-
),
|
|
2240
|
-
onConnectorEvent: new C(
|
|
2241
|
-
() => e.onConnectorEvent,
|
|
2242
|
-
(ve = e.logging) == null ? void 0 : ve.logger
|
|
2243
|
-
),
|
|
2244
|
-
onConnectorsChanged: new C(
|
|
2245
|
-
() => e.onConnectorsChanged,
|
|
2246
|
-
(Ie = e.logging) == null ? void 0 : Ie.logger
|
|
2247
|
-
),
|
|
2248
|
-
onZoomChanged: new C(
|
|
2249
|
-
() => e.onZoomChanged,
|
|
2250
|
-
(Ae = e.logging) == null ? void 0 : Ae.logger
|
|
2251
|
-
),
|
|
2252
|
-
onSelectedPageIdChanged: new C(
|
|
2253
|
-
() => e.onSelectedPageIdChanged,
|
|
2254
|
-
e.logging.logger
|
|
2255
|
-
),
|
|
2256
|
-
onPagesChanged: new C(
|
|
2257
|
-
() => e.onPagesChanged,
|
|
2258
|
-
e.logging.logger
|
|
2259
|
-
),
|
|
2260
|
-
onPageSnapshotInvalidated: new C(
|
|
2261
|
-
() => e.onPageSnapshotInvalidated,
|
|
2262
|
-
e.logging.logger
|
|
2263
|
-
),
|
|
2264
|
-
onPageSizeChanged: new C(
|
|
2265
|
-
() => e.onPageSizeChanged,
|
|
2266
|
-
(Pe = e.logging) == null ? void 0 : Pe.logger
|
|
2267
|
-
),
|
|
2268
|
-
onShapeCornerRadiusChanged: new C(
|
|
2269
|
-
() => e.onShapeCornerRadiusChanged,
|
|
2270
|
-
(Oe = e.logging) == null ? void 0 : Oe.logger
|
|
2271
|
-
),
|
|
2272
|
-
onCropActiveFrameIdChanged: new C(
|
|
2273
|
-
() => e.onCropActiveFrameIdChanged,
|
|
2274
|
-
(Fe = e.logging) == null ? void 0 : Fe.logger
|
|
2275
|
-
),
|
|
2276
|
-
onAsyncError: new C(
|
|
2277
|
-
() => e.onAsyncError,
|
|
2278
|
-
(Ee = e.logging) == null ? void 0 : Ee.logger
|
|
2279
|
-
),
|
|
2280
|
-
onViewModeChanged: new C(
|
|
2281
|
-
() => e.onViewModeChanged,
|
|
2282
|
-
(De = e.logging) == null ? void 0 : De.logger
|
|
2283
|
-
),
|
|
2284
|
-
onBarcodeValidationChanged: new C(() => e.onBarcodeValidationChanged, (Le = e.logging) == null ? void 0 : Le.logger),
|
|
2285
|
-
onDataSourceIdChanged: new C(
|
|
2286
|
-
() => e.onDataSourceIdChanged,
|
|
2287
|
-
e.logging.logger
|
|
2288
|
-
),
|
|
2289
|
-
onDocumentIssueListChanged: new C(
|
|
2290
|
-
() => e.onDocumentIssueListChanged,
|
|
2291
|
-
e.logging.logger
|
|
2292
|
-
),
|
|
2293
|
-
onCustomUndoDataChanged: new C(
|
|
2294
|
-
() => e.onCustomUndoDataChanged,
|
|
2295
|
-
e.logging.logger
|
|
2296
|
-
),
|
|
2297
|
-
onEngineEditModeChanged: new C(
|
|
2298
|
-
() => e.onEngineEditModeChanged,
|
|
2299
|
-
e.logging.logger
|
|
2300
|
-
),
|
|
2301
|
-
onBrandKitMediaChanged: new C(
|
|
2302
|
-
() => e.onBrandKitMediaChanged,
|
|
2303
|
-
e.logging.logger
|
|
2304
|
-
)
|
|
2305
|
-
}, e;
|
|
2306
|
-
}
|
|
2307
|
-
static isLoggingEnabled(o, e) {
|
|
2308
|
-
return e == M.info || e == M.warn && (o == M.warn || o == M.error) ? !0 : e == M.error && o == M.error;
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
class In {
|
|
2312
|
-
/**
|
|
2313
|
-
* Checks if the given value is a `DatePropertyWrapper`.
|
|
2314
|
-
*
|
|
2315
|
-
* @param value The value to check.
|
|
2316
|
-
* @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.
|
|
2317
|
-
*/
|
|
2318
|
-
isDatePropertyWrapper(o) {
|
|
2319
|
-
return typeof o == "object" && (o == null ? void 0 : o.type) === "date";
|
|
2320
|
-
}
|
|
2321
|
-
/**
|
|
2322
|
-
* Checks if the given value is a `Date` object instance.
|
|
2323
|
-
*
|
|
2324
|
-
* @param value The value to check.
|
|
2325
|
-
* @returns `true` if the value is a `Date` object, otherwise `false`.
|
|
2326
|
-
*/
|
|
2327
|
-
isDateObject(o) {
|
|
2328
|
-
return o instanceof Date;
|
|
2329
|
-
}
|
|
2330
|
-
/**
|
|
2331
|
-
* Transforms an `EngineDataItem` into a `DataItem`.
|
|
2332
|
-
*
|
|
2333
|
-
* Converts `DatePropertyWrapper` values to JavaScript `Date` objects
|
|
2334
|
-
* while keeping other values unchanged.
|
|
2335
|
-
*
|
|
2336
|
-
* @param dataItem the EngineDataItem to transform.
|
|
2337
|
-
* @returns the resulting `DataItem` with parsed date properties.
|
|
2338
|
-
*/
|
|
2339
|
-
mapEngineToDataItem(o) {
|
|
2340
|
-
const e = {};
|
|
2341
|
-
return Object.entries(o).forEach(([t, r]) => {
|
|
2342
|
-
e[t] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
|
|
2343
|
-
}), e;
|
|
2344
|
-
}
|
|
2345
|
-
/**
|
|
2346
|
-
* Transforms a `DataItem` into an `EngineDataItem`.
|
|
2347
|
-
*
|
|
2348
|
-
* Converts JavaScript `Date` objects to `DatePropertyWrapper` objects
|
|
2349
|
-
* while keeping other values unchanged.
|
|
2350
|
-
*
|
|
2351
|
-
* @param dataItem the `DataItem` to transform.
|
|
2352
|
-
* @returns the resulting `EngineDataItem` with parsed date properties.
|
|
2353
|
-
*/
|
|
2354
|
-
mapDataItemToEngine(o) {
|
|
2355
|
-
const e = {};
|
|
2356
|
-
return Object.entries(o).forEach(([t, r]) => {
|
|
2357
|
-
e[t] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
|
|
2358
|
-
}), e;
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
var ht;
|
|
2362
|
-
class An {
|
|
2363
|
-
/**
|
|
2364
|
-
* @ignore
|
|
2365
|
-
*/
|
|
2366
|
-
constructor(o) {
|
|
2367
|
-
/**
|
|
2368
|
-
* @ignore
|
|
2369
|
-
*/
|
|
2370
|
-
u(this, ht);
|
|
2371
|
-
g(this, ht, o);
|
|
2372
|
-
}
|
|
2373
|
-
/**
|
|
2374
|
-
* This method returns the value for a given configuration key. If a value was not found in the configuration store
|
|
2375
|
-
* this method returns an error. The key cannot be null.
|
|
2376
|
-
* @returns value for a given configuration key
|
|
2377
|
-
*/
|
|
2378
|
-
async getValue(o) {
|
|
2379
|
-
return (await a(this, ht)).getConfigValue(o).then((t) => i(t));
|
|
2380
|
-
}
|
|
2381
|
-
/**
|
|
2382
|
-
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
2383
|
-
* using them will result in an error.
|
|
2384
|
-
* @returns
|
|
2385
|
-
*/
|
|
2386
|
-
async setValue(o, e) {
|
|
2387
|
-
return (await a(this, ht)).setConfigValue(o, e).then((r) => i(r));
|
|
2388
|
-
}
|
|
2389
|
-
/**
|
|
2390
|
-
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
2391
|
-
* @returns
|
|
2392
|
-
*/
|
|
2393
|
-
async updateStudioOptions(o) {
|
|
2394
|
-
return (await a(this, ht)).updateStudioOptions(JSON.stringify(o)).then((t) => i(t));
|
|
2395
|
-
}
|
|
2396
|
-
/**
|
|
2397
|
-
* This method returns the engine session id. This id is unique for this engine session
|
|
2398
|
-
* @returns the engine session id
|
|
2399
|
-
*/
|
|
2400
|
-
async getEngineSessionId() {
|
|
2401
|
-
return (await a(this, ht)).getEngineSessionId().then((e) => i(e));
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
ht = new WeakMap();
|
|
2405
|
-
var Vt;
|
|
2406
|
-
class ds extends An {
|
|
2407
|
-
/**
|
|
2408
|
-
* @ignore
|
|
2409
|
-
*/
|
|
2410
|
-
constructor(e, t) {
|
|
2411
|
-
super(e);
|
|
2412
|
-
/**
|
|
2413
|
-
* @ignore
|
|
2414
|
-
*/
|
|
2415
|
-
u(this, Vt);
|
|
2416
|
-
g(this, Vt, t);
|
|
2417
|
-
}
|
|
2418
|
-
/**
|
|
2419
|
-
* This method returns the value for a given configuration key. If a value was not found in the configuration store,
|
|
2420
|
-
* this method returns an error. The key cannot be null.
|
|
2421
|
-
* @returns value for a given configuration key
|
|
2422
|
-
*/
|
|
2423
|
-
async getValue(e) {
|
|
2424
|
-
const t = a(this, Vt).get(e);
|
|
2425
|
-
return t != null ? i(
|
|
2426
|
-
{
|
|
2427
|
-
status: 200,
|
|
2428
|
-
success: !0,
|
|
2429
|
-
parsedData: t,
|
|
2430
|
-
data: t
|
|
2431
|
-
},
|
|
2432
|
-
!1
|
|
2433
|
-
) : super.getValue(e);
|
|
2434
|
-
}
|
|
2435
|
-
/**
|
|
2436
|
-
* This method sets or overrides the value for a given key.
|
|
2437
|
-
* Null values are not allowed for both key and value,
|
|
2438
|
-
* using them will result in an error.
|
|
2439
|
-
* @returns
|
|
2440
|
-
*/
|
|
2441
|
-
async setValue(e, t) {
|
|
2442
|
-
const r = super.setValue(e, t);
|
|
2443
|
-
return a(this, Vt).set(e, t), r;
|
|
2444
|
-
}
|
|
2445
|
-
}
|
|
2446
|
-
Vt = new WeakMap();
|
|
2447
|
-
var G;
|
|
2448
|
-
class ls {
|
|
2449
|
-
/**
|
|
2450
|
-
* @ignore
|
|
2451
|
-
*/
|
|
2452
|
-
constructor(o) {
|
|
2453
|
-
/**
|
|
2454
|
-
* @ignore
|
|
2455
|
-
*/
|
|
2456
|
-
u(this, G);
|
|
2457
|
-
this.getAll = async () => (await a(this, G)).getGradients().then((t) => i(t)), this.getById = async (e) => (await a(this, G)).getGradientById(e).then((r) => i(r)), this.create = async () => (await a(this, G)).createGradient().then((t) => i(t)), this.duplicate = async (e) => (await a(this, G)).duplicateGradient(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, G)).moveGradients(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, G)).renameGradient(e, t).then((n) => i(n)), this.update = async (e, t) => {
|
|
2458
|
-
const r = await a(this, G), n = t;
|
|
2459
|
-
return r.updateGradient(e, JSON.stringify(n)).then((c) => i(c));
|
|
2460
|
-
}, this.remove = async (e) => (await a(this, G)).removeGradient(e).then((r) => i(r)), g(this, G, o);
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
G = new WeakMap();
|
|
2464
|
-
var mt, te;
|
|
2465
|
-
class us {
|
|
2466
|
-
/**
|
|
2467
|
-
* @ignore
|
|
2468
|
-
*/
|
|
2469
|
-
constructor(o) {
|
|
2470
|
-
/**
|
|
2471
|
-
* @ignore
|
|
2472
|
-
*/
|
|
2473
|
-
u(this, mt);
|
|
2474
|
-
u(this, te);
|
|
2475
|
-
this.query = async (e, t, r = {}) => (await a(this, mt)).componentConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.preview = async (e, t, r, n = {}) => (await a(this, te)).componentConnectorPreview(e, t, r, JSON.stringify(n)).then((h) => {
|
|
2476
|
-
if (h instanceof Uint8Array)
|
|
2477
|
-
return h;
|
|
2478
|
-
throw typeof h == "object" && h !== null && "success" in h && !h.success && St(h), new Error(`Unexpected response type: ${typeof h}.`);
|
|
2479
|
-
}), this.getConfigurationOptions = async (e) => (await a(this, mt)).componentConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, mt)).componentConnectorGetCapabilities(e).then((r) => i(r)), g(this, mt, o), g(this, te, o);
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
mt = new WeakMap(), te = new WeakMap();
|
|
2483
|
-
var ft;
|
|
2484
|
-
class gs {
|
|
2485
|
-
/**
|
|
2486
|
-
* @ignore
|
|
2487
|
-
*/
|
|
2488
|
-
constructor(o) {
|
|
2489
|
-
/**
|
|
2490
|
-
* @ignore
|
|
2491
|
-
*/
|
|
2492
|
-
u(this, ft);
|
|
2493
|
-
this.linkVariable = async (e, t, r, n) => (await a(this, ft)).linkComponentVariable(e, t, r, n ?? null).then((h) => i(h)), this.getComponentVariables = async (e) => (await a(this, ft)).getComponentVariables(e).then((r) => i(r)), this.setFitMode = async (e, t) => (await a(this, ft)).setComponentLayoutFit(e, t).then((n) => i(n)), g(this, ft, o);
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
ft = new WeakMap();
|
|
2497
|
-
const Pn = "studio-cdn.chiligrafx.com", On = `https://${Pn}/editor/${ms.current}/web`;
|
|
2498
|
-
let et;
|
|
2499
|
-
class ha {
|
|
2500
|
-
/**
|
|
2501
|
-
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
2502
|
-
* @param config The configuration object where the SDK and editor can get configured
|
|
2503
|
-
*/
|
|
2504
|
-
constructor(o) {
|
|
2505
|
-
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new In(), this.loadEditor = () => {
|
|
2506
|
-
var e;
|
|
2507
|
-
rr(
|
|
2508
|
-
this.config.editorLink || On,
|
|
2509
|
-
{
|
|
2510
|
-
onActionsChanged: this.subscriber.onActionsChanged,
|
|
2511
|
-
onStateChanged: this.subscriber.onStateChanged,
|
|
2512
|
-
onAuthExpired: this.subscriber.onAuthExpired,
|
|
2513
|
-
onViewportRequested: this.subscriber.onViewportRequested,
|
|
2514
|
-
onDocumentLoaded: this.subscriber.onDocumentLoaded,
|
|
2515
|
-
onSelectedFramesContentChanged: this.subscriber.onSelectedFramesContentChanged,
|
|
2516
|
-
onSelectedFramesLayoutChanged: this.subscriber.onSelectedFramesLayoutChanged,
|
|
2517
|
-
onFramesLayoutChanged: this.subscriber.onFramesLayoutChanged,
|
|
2518
|
-
onSelectedLayoutPropertiesChanged: this.subscriber.onSelectedLayoutPropertiesChanged,
|
|
2519
|
-
onSelectedLayoutUnitChanged: this.subscriber.onSelectedLayoutUnitChanged,
|
|
2520
|
-
onPageSelectionChanged: this.subscriber.onPageSelectionChanged,
|
|
2521
|
-
onScrubberPositionChanged: this.subscriber.onAnimationPlaybackChanged,
|
|
2522
|
-
onFrameAnimationsChanged: this.subscriber.onAnimationChanged,
|
|
2523
|
-
onVariableListChanged: (t) => {
|
|
2524
|
-
var r;
|
|
2525
|
-
(r = this.enabledNextSubscribers) != null && r.onVariableListChanged ? this.next.subscriber.onVariableListChanged(t) : this.subscriber.onVariableListChanged(t);
|
|
2526
|
-
},
|
|
2527
|
-
onSelectedToolChanged: this.subscriber.onSelectedToolChanged,
|
|
2528
|
-
onUndoStateChanged: this.subscriber.onUndoStateChanged,
|
|
2529
|
-
onSelectedLayoutFramesChanged: this.subscriber.onSelectedLayoutFramesChanged,
|
|
2530
|
-
onSelectedTextStyleChanged: this.subscriber.onSelectedTextStyleChanged,
|
|
2531
|
-
onColorsChanged: this.subscriber.onColorsChanged,
|
|
2532
|
-
onParagraphStylesChanged: this.subscriber.onParagraphStylesChanged,
|
|
2533
|
-
onCharacterStylesChanged: this.subscriber.onCharacterStylesChanged,
|
|
2534
|
-
onFontFamiliesChanged: this.subscriber.onFontFamiliesChanged,
|
|
2535
|
-
onSelectedLayoutIdChanged: this.subscriber.onSelectedLayoutIdChanged,
|
|
2536
|
-
onLayoutsChanged: this.subscriber.onLayoutsChanged,
|
|
2537
|
-
onConnectorEvent: this.subscriber.onConnectorEvent,
|
|
2538
|
-
onConnectorsChanged: (t) => {
|
|
2539
|
-
var r;
|
|
2540
|
-
(r = this.enabledNextSubscribers) != null && r.onConnectorsChanged ? this.next.subscriber.onConnectorsChanged(t) : this.subscriber.onConnectorsChanged(t);
|
|
2541
|
-
},
|
|
2542
|
-
onZoomChanged: this.subscriber.onZoomChanged,
|
|
2543
|
-
onSelectedPageIdChanged: this.subscriber.onSelectedPageIdChanged,
|
|
2544
|
-
onPagesChanged: this.subscriber.onPagesChanged,
|
|
2545
|
-
onPageSnapshotInvalidated: this.subscriber.onPageSnapshotInvalidated,
|
|
2546
|
-
onPageSizeChanged: (t) => {
|
|
2547
|
-
var r;
|
|
2548
|
-
(r = this.enabledNextSubscribers) != null && r.onPageSizeChanged ? this.next.subscriber.onPageSizeChanged(t) : this.subscriber.onPageSizeChanged(t);
|
|
2549
|
-
},
|
|
2550
|
-
onShapeCornerRadiusChanged: this.subscriber.onShapeCornerRadiusChanged,
|
|
2551
|
-
onCropActiveFrameIdChanged: this.subscriber.onCropActiveFrameIdChanged,
|
|
2552
|
-
onAsyncError: this.subscriber.onAsyncError,
|
|
2553
|
-
onViewModeChanged: this.subscriber.onViewModeChanged,
|
|
2554
|
-
onBarcodeValidationChanged: this.subscriber.onBarcodeValidationChanged,
|
|
2555
|
-
onDataSourceIdChanged: this.subscriber.onDataSourceIdChanged,
|
|
2556
|
-
onDocumentIssueListChanged: this.subscriber.onDocumentIssueListChanged,
|
|
2557
|
-
onCustomUndoDataChanged: this.subscriber.onCustomUndoDataChanged,
|
|
2558
|
-
onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged,
|
|
2559
|
-
onBrandKitMediaChanged: this.subscriber.onBrandKitMediaChanged
|
|
2560
|
-
},
|
|
2561
|
-
this.setConnection,
|
|
2562
|
-
this.config.editorId,
|
|
2563
|
-
this.config.studioStyling,
|
|
2564
|
-
(t) => {
|
|
2565
|
-
var r, n;
|
|
2566
|
-
(n = (r = this.config).onConnectionError) == null || n.call(r, t);
|
|
2567
|
-
}
|
|
2568
|
-
), this.editorAPI = et == null ? void 0 : et.promise.then((t) => t), this.action = new Ve(this.editorAPI), this.layout = new Xe(this.editorAPI), this.frame = new Ze(this.editorAPI), this.barcode = new Je(this.editorAPI), this.component = new gs(this.editorAPI), this.animation = new Be(this.editorAPI), this.document = new je(this.editorAPI), this.configuration = new ds(this.editorAPI, this.localConfig), this.utils = new is(this.editorAPI, this.localConfig), this.tool = new ns(this.editorAPI), this.page = new es(this.editorAPI), this.debug = new Ke(this.editorAPI), this.undoManager = new as(this.editorAPI, this), this.textSelection = new rs(this.editorAPI), this.colorStyle = new _e(this.editorAPI), this.gradientStyle = new ls(this.editorAPI), this.paragraphStyle = new ss(this.editorAPI), this.characterStyle = new ke(this.editorAPI), this.mediaConnector = new ts(this.editorAPI), this.fontConnector = new qe(this.editorAPI), this.componentConnector = new us(this.editorAPI), this.dataConnector = new $e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ze(this.editorAPI, this.dataItemMappingTools), this.connector = new He(this.editorAPI, this.localConfig), this.variable = new os(this.editorAPI, this.dataItemMappingTools), this.font = new Ye(this.editorAPI), this.experiment = new We(this.editorAPI), this.canvas = new he(this.editorAPI), this.shape = new ge(this.editorAPI), this.colorConversion = new Te(this.editorAPI), this.info = new Qe(), this.clipboard = new Ge(this.editorAPI), this.brandKit = new Ue(this.editorAPI, this), this.next = new cs(this.config, this.connection, this.editorAPI), this.configuration.setValue(tt.GraFxStudioSdkVersion, fs.version), this.configuration.setValue(
|
|
2569
|
-
tt.GraFxStudioDocumentType,
|
|
2570
|
-
this.config.documentType || Is.template
|
|
2571
|
-
), this.configuration.updateStudioOptions(this.config.studioOptions || ar), this.configuration.setValue(
|
|
2572
|
-
tt.QueryCallCacheEnabled,
|
|
2573
|
-
((e = this.config.enableQueryCallCache) == null ? void 0 : e.toString()) || "false"
|
|
2574
|
-
);
|
|
2575
|
-
}, this.setConnection = (e) => {
|
|
2576
|
-
et = e;
|
|
2577
|
-
}, this.config = we.createRuntimeConfig(o), this.connection = et, this.editorAPI = et == null ? void 0 : et.promise.then((e) => e), this.action = new Ve(this.editorAPI), this.layout = new Xe(this.editorAPI), this.frame = new Ze(this.editorAPI), this.shape = new ge(this.editorAPI), this.barcode = new Je(this.editorAPI), this.component = new gs(this.editorAPI), this.undoManager = new as(this.editorAPI, this), this.connector = new He(this.editorAPI, this.localConfig), this.mediaConnector = new ts(this.editorAPI), this.fontConnector = new qe(this.editorAPI), this.componentConnector = new us(this.editorAPI), this.dataConnector = new $e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ze(this.editorAPI, this.dataItemMappingTools), this.animation = new Be(this.editorAPI), this.document = new je(this.editorAPI), this.configuration = new ds(this.editorAPI, this.localConfig), this.variable = new os(this.editorAPI, this.dataItemMappingTools), this.utils = new is(this.editorAPI, this.localConfig), this.subscriber = new nn(this.config, this.localConfig), this.tool = new ns(this.editorAPI), this.page = new es(this.editorAPI), this.debug = new Ke(this.editorAPI), this.textSelection = new rs(this.editorAPI), this.colorStyle = new _e(this.editorAPI), this.gradientStyle = new ls(this.editorAPI), this.paragraphStyle = new ss(this.editorAPI), this.characterStyle = new ke(this.editorAPI), this.font = new Ye(this.editorAPI), this.experiment = new We(this.editorAPI), this.canvas = new he(this.editorAPI), this.colorConversion = new Te(this.editorAPI), this.info = new Qe(), this.clipboard = new Ge(this.editorAPI), this.next = new cs(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Ue(this.editorAPI, this);
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
var Fn = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(Fn || {}), En = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(En || {}), Dn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(Dn || {}), Ln = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(Ln || {}), Nn = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(Nn || {}), Rn = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(Rn || {}), xn = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(xn || {}), Mn = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(Mn || {}), Vn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(Vn || {}), Bn = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.highest = "highest", s.medium = "medium", s))(Bn || {}), Jn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(Jn || {}), Un = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(Un || {}), kn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(kn || {}), Gn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(Gn || {}), Tn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Tn || {}), _n = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(_n || {}), Hn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(Hn || {}), $n = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.BACKGROUND_COLOR = "backgroundColor", s.BACKGROUND_COLOR_APPLIED = "backgroundColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s.MARKED_LIST_TYPE = "markedListType", s.MARKED_LIST_GROUP = "markedListGroup", s.MARKED_LIST_LEVEL = "markedListLevel", s))($n || {}), zn = /* @__PURE__ */ ((s) => (s.arabic = "arabic", s.romanUpperCase = "romanUpperCase", s.romanLowerCase = "romanLowerCase", s.latinUpperCase = "latinUpperCase", s.latinLowerCase = "latinLowerCase", s))(zn || {}), Kn = /* @__PURE__ */ ((s) => (s.none = "none", s.dash = "dash", s.dot = "dot", s.colon = "colon", s.roundBracket = "roundBracket", s))(Kn || {}), jn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(jn || {}), Wn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Wn || {}), qn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(qn || {}), Yn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s.gradient = "gradient", s))(Yn || {}), Ls = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ls || {});
|
|
2581
|
-
const da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2582
|
-
__proto__: null,
|
|
2583
|
-
ConnectorRegistrationSource: Ls
|
|
2584
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2585
|
-
export {
|
|
2586
|
-
or as ActionAsyncError,
|
|
2587
|
-
jn as ActionEditorEvent,
|
|
2588
|
-
Un as Alignment,
|
|
2589
|
-
Zr as AnchorTargetEdgeType,
|
|
2590
|
-
Yr as AnchorTargetType,
|
|
2591
|
-
Rr as AuthCredentialsTypeEnum,
|
|
2592
|
-
xr as AuthRefreshTypeEnum,
|
|
2593
|
-
Ur as AutoGrowDirection,
|
|
2594
|
-
It as BarcodeCharacterSet,
|
|
2595
|
-
Jt as BarcodeErrorCorrectionLevel,
|
|
2596
|
-
Tr as BarcodeSourceTypeEnum,
|
|
2597
|
-
$ as BarcodeType,
|
|
2598
|
-
wr as BarcodeValidationResult,
|
|
2599
|
-
Nn as BasicAnimationsEmphasisStyles,
|
|
2600
|
-
zr as BlendMode,
|
|
2601
|
-
Gn as Case,
|
|
2602
|
-
de as ColorType,
|
|
2603
|
-
Ir as ColorUsageType,
|
|
2604
|
-
Jr as ComponentFitEnum,
|
|
2605
|
-
Bn as ComponentPreviewType,
|
|
2606
|
-
kr as ComponentSourceTypeEnum,
|
|
2607
|
-
Er as ConnectorConfigContextType,
|
|
2608
|
-
Fr as ConnectorConfigValueType,
|
|
2609
|
-
Nr as ConnectorEventType,
|
|
2610
|
-
hr as ConnectorHttpError,
|
|
2611
|
-
Xn as ConnectorMapping,
|
|
2612
|
-
Lr as ConnectorMappingDirection,
|
|
2613
|
-
Dr as ConnectorMappingSource,
|
|
2614
|
-
Ut as ConnectorRegistrationSource,
|
|
2615
|
-
ue as ConnectorStateType,
|
|
2616
|
-
Vr as ConnectorSupportedAuth,
|
|
2617
|
-
Ar as ConnectorType,
|
|
2618
|
-
Sr as ConstraintMode,
|
|
2619
|
-
qn as CornerRadiusType,
|
|
2620
|
-
Ps as CropType,
|
|
2621
|
-
cr as DataRowAsyncError,
|
|
2622
|
-
rn as DataSourceVariableDisplayOptionsType,
|
|
2623
|
-
Fs as DataSourceVariableSourceType,
|
|
2624
|
-
Xr as Day,
|
|
2625
|
-
le as DeprecatedMediaConnectorDownloadType,
|
|
2626
|
-
Tt as DeprecatedMediaType,
|
|
2627
|
-
ir as DocumentIssueTypeEnum,
|
|
2628
|
-
Is as DocumentType,
|
|
2629
|
-
cn as DownloadFormats,
|
|
2630
|
-
Dn as EaseTypes,
|
|
2631
|
-
Yn as EngineEditModeType,
|
|
2632
|
-
pe as EnvironmentType,
|
|
2633
|
-
Kr as FitMode,
|
|
2634
|
-
jr as FitModePosition,
|
|
2635
|
-
Hr as FlowDirection,
|
|
2636
|
-
Vn as FontPreviewFormat,
|
|
2637
|
-
Jn as FontWeights,
|
|
2638
|
-
aa as FrameAnchorTarget,
|
|
2639
|
-
qr as FrameAnchorType,
|
|
2640
|
-
nr as FrameEditingMode,
|
|
2641
|
-
an as FramePropertyNames,
|
|
2642
|
-
Gr as FrameTypeEnum,
|
|
2643
|
-
xn as GradientType,
|
|
2644
|
-
Mn as GradientUsageType,
|
|
2645
|
-
ea as GrafxTokenAuthCredentials,
|
|
2646
|
-
se as ImageSourceTypeEnum,
|
|
2647
|
-
fr as LayoutIntent,
|
|
2648
|
-
on as LayoutPropertyNames,
|
|
2649
|
-
mr as LayoutType,
|
|
2650
|
-
tn as Locale,
|
|
2651
|
-
_n as MarkedListType,
|
|
2652
|
-
Cr as MeasurementUnit,
|
|
2653
|
-
Os as MediaDownloadIntent,
|
|
2654
|
-
ye as MediaDownloadType,
|
|
2655
|
-
_t as MediaType,
|
|
2656
|
-
da as Next,
|
|
2657
|
-
zn as NumberListFormat,
|
|
2658
|
-
Kn as NumberListSeparatorSymbol,
|
|
2659
|
-
na as PageAnchorTarget,
|
|
2660
|
-
X as PositionEnum,
|
|
2661
|
-
sa as RefreshedAuthCredendentials,
|
|
2662
|
-
Tn as Scripting,
|
|
2663
|
-
Hn as SelectedTextStyleSections,
|
|
2664
|
-
$n as SelectedTextStyles,
|
|
2665
|
-
En as ShakeDirections,
|
|
2666
|
-
Wn as ShapeType,
|
|
2667
|
-
Fn as SlideDirections,
|
|
2668
|
-
Pr as SortBy,
|
|
2669
|
-
Or as SortOrder,
|
|
2670
|
-
_r as TextDirection,
|
|
2671
|
-
kn as TextPosition,
|
|
2672
|
-
z as ToolType,
|
|
2673
|
-
Ln as TweenTypes,
|
|
2674
|
-
Wr as UpdateZIndexMethod,
|
|
2675
|
-
Mr as UploadAssetValidationError,
|
|
2676
|
-
As as UploadAssetValidationErrorType,
|
|
2677
|
-
ae as VariableType,
|
|
2678
|
-
dr as VariableValueConstrainsViolationError,
|
|
2679
|
-
sn as VariableVisibilityOperator,
|
|
2680
|
-
en as VariableVisibilityTargetType,
|
|
2681
|
-
kt as VariableVisibilityType,
|
|
2682
|
-
$r as VerticalAlign,
|
|
2683
|
-
Rn as ViewMode,
|
|
2684
|
-
tt as WellKnownConfigurationKeys,
|
|
2685
|
-
ha as default,
|
|
2686
|
-
ta as grafxMediaConnectorRegistration
|
|
2687
|
-
};
|
|
2688
|
-
//# sourceMappingURL=main.es.js.map
|