@useinsider/guido 1.0.0-beta.f7c239e → 1.0.1-beta.0168eae
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/README.md +422 -21
- package/dist/@types/generic.d.ts +39 -23
- package/dist/@types/save-as-template.d.ts +29 -0
- package/dist/App.vue.d.ts +1 -1
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +21 -4
- package/dist/components/Guido.vue.js +12 -12
- package/dist/components/Guido.vue2.js +89 -25
- package/dist/components/organisms/base/Toaster.vue.d.ts +2 -0
- package/dist/components/organisms/base/Toaster.vue.js +17 -0
- package/dist/components/organisms/base/Toaster.vue2.js +15 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/LeftSlot.vue2.js +10 -6
- package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
- package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +12 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +30 -17
- package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +30 -10
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
- package/dist/components/wrappers/WpDrawer.vue.js +25 -0
- package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
- package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +5 -1
- package/dist/composables/useActionsApi.js +74 -31
- package/dist/composables/useApiExample.d.ts +6 -4
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +4 -0
- package/dist/composables/useConfig.js +7 -0
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useDebounce.d.ts +4 -0
- package/dist/composables/useDebounce.js +12 -0
- package/dist/composables/useExport.d.ts +1 -1
- package/dist/composables/useExport.js +38 -22
- package/dist/composables/useGuidoActions.d.ts +46 -0
- package/dist/composables/useGuidoActions.js +37 -0
- package/dist/composables/useHtmlCompiler.d.ts +4 -0
- package/dist/composables/useHtmlCompiler.js +17 -0
- package/dist/composables/useHttp.d.ts +19 -1
- package/dist/composables/useHttp.js +23 -21
- package/dist/composables/usePartner.d.ts +1 -1
- package/dist/composables/usePartner.js +9 -14
- package/dist/composables/usePreviewMode.d.ts +5 -0
- package/dist/composables/usePreviewMode.js +31 -0
- package/dist/composables/useProvideInject.d.ts +14 -0
- package/dist/composables/useProvideInject.js +17 -0
- package/dist/composables/useResponsivePreview.d.ts +5 -0
- package/dist/composables/useResponsivePreview.js +86 -0
- package/dist/composables/useStripo.js +66 -40
- package/dist/composables/useToaster.d.ts +1 -8
- package/dist/composables/useToaster.js +24 -30
- package/dist/composables/useTranslations.d.ts +4 -1
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useValidation.d.ts +56 -0
- package/dist/composables/useValidation.js +19 -0
- package/dist/composables/useVersionHistoryApi.js +11 -10
- package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
- package/dist/composables/validators/saveAsTemplate.js +24 -0
- package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
- package/dist/config/compiler/htmlCompilerRules.js +145 -0
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/enums/defaults.d.ts +4 -1
- package/dist/enums/defaults.js +22 -6
- package/dist/enums/displayConditions.d.ts +2 -0
- package/dist/enums/displayConditions.js +80 -0
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- package/dist/enums/toaster.d.ts +5 -0
- package/dist/enums/toaster.js +4 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
- package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
- package/dist/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/extensions/DynamicContent/extension.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/default-template.d.ts +2 -0
- package/dist/mock/api/template-library.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
- package/dist/node_modules/@vueuse/shared/index.js +45 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_apply.js +16 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
- package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
- package/dist/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
- package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +9 -0
- package/dist/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_overRest.js +15 -0
- package/dist/node_modules/lodash-es/_safeGet.js +7 -0
- package/dist/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/lodash-es/_shortOut.js +16 -0
- package/dist/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +17 -0
- package/dist/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/valibot/dist/index.js +190 -0
- package/dist/node_modules/vue-demi/lib/index.js +7 -0
- package/dist/services/stripoApi.d.ts +6 -7
- package/dist/services/stripoApi.js +44 -23
- package/dist/services/templateLibraryApi.d.ts +7 -0
- package/dist/services/templateLibraryApi.js +87 -0
- package/dist/static/assets/inbox-mockup.svg.js +4 -0
- package/dist/static/assets/phone-mockup.svg.js +4 -0
- package/dist/static/styles/base.css.js +11 -0
- package/dist/static/styles/components/alert-message.css.js +39 -0
- package/dist/static/styles/components/amp-block.css.js +18 -0
- package/dist/static/styles/components/base-input.css.js +47 -0
- package/dist/static/styles/components/button-group.css.js +54 -0
- package/dist/static/styles/components/button.css.js +106 -0
- package/dist/static/styles/components/combobox.css.js +49 -0
- package/dist/static/styles/components/counter.css.js +42 -0
- package/dist/static/styles/components/dropdown-menu.css.js +52 -0
- package/dist/static/styles/components/narrow-panel.css.js +38 -0
- package/dist/static/styles/components/switcher.css.js +11 -0
- package/dist/static/styles/components/tabs.css.js +97 -0
- package/dist/static/styles/components/tools.css.js +23 -0
- package/dist/static/styles/components/version-history.css.js +30 -0
- package/dist/static/styles/components/wide-panel.css.js +144 -0
- package/dist/static/styles/customEditorStyle.css.js +18 -0
- package/dist/static/styles/variables.css.js +23 -0
- package/dist/stores/dynamic-content.d.ts +27 -0
- package/dist/stores/dynamic-content.js +23 -0
- package/dist/stores/editor.d.ts +3 -0
- package/dist/stores/editor.js +6 -3
- package/dist/stores/preview.d.ts +46 -0
- package/dist/stores/preview.js +53 -0
- package/dist/stores/save-as-template.d.ts +73 -0
- package/dist/stores/save-as-template.js +48 -0
- package/dist/stores/toaster.d.ts +18 -0
- package/dist/stores/toaster.js +27 -0
- package/dist/utils/arrayUtil.d.ts +1 -0
- package/dist/utils/arrayUtil.js +10 -0
- package/dist/utils/base64.d.ts +1 -0
- package/dist/utils/base64.js +7 -0
- package/dist/utils/genericUtil.d.ts +3 -0
- package/dist/utils/genericUtil.js +11 -0
- package/dist/utils/htmlCompiler.d.ts +12 -0
- package/dist/utils/htmlCompiler.js +70 -0
- package/dist/utils/templatePreparation.d.ts +4 -0
- package/dist/utils/templatePreparation.js +33 -0
- package/dist/utils/tooltipUtils.d.ts +2 -0
- package/dist/utils/tooltipUtils.js +11 -0
- package/package.json +8 -7
- package/dist/@types/http.d.ts +0 -19
- package/dist/composables/useTemplates.d.ts +0 -5
- package/dist/composables/useTemplates.js +0 -27
- package/dist/static/editor.css.js +0 -232
- package/dist/static/templates/default/index.html.js +0 -5
- package/dist/static/templates/default/style.css.js +0 -119
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const o = `ue-ui-headed-simple-panel,
|
|
2
|
+
ue-ui-simple-panel,
|
|
3
|
+
.modules-panel-small-content {
|
|
4
|
+
box-shadow: var(--guido-box-shadow);
|
|
5
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
ue-stripe-thumb,
|
|
9
|
+
.ue-stripe-thumb {
|
|
10
|
+
box-shadow: none;
|
|
11
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
ue-stripe-thumb:hover:not(.disabled),
|
|
15
|
+
.ue-stripe-thumb:hover:not(.disabled) {
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
border: 1px solid var(--guido-color-primary-500);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.block-thumb {
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ue-dragged-node-component>.block-thumb,
|
|
26
|
+
.block-thumb:hover:not(.disabled) {
|
|
27
|
+
box-shadow: none;
|
|
28
|
+
border-color: var(--guido-color-primary-500);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.modules-layout-wrapper {
|
|
32
|
+
padding: 0 16px 16px;
|
|
33
|
+
grid-row-gap: 16px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
export {
|
|
37
|
+
o as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const n = `
|
|
2
|
+
|
|
3
|
+
ue-tabs-header .tabs-header {
|
|
4
|
+
padding: 0;
|
|
5
|
+
column-gap: 0;
|
|
6
|
+
background-color: transparent;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.control-panel-tabs .tabs-header {
|
|
10
|
+
margin: 16px 16px 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
ue-tabs-header .tabs-header button {
|
|
14
|
+
background-color: var(--guido-color-gray-0);
|
|
15
|
+
outline: none;
|
|
16
|
+
padding: 8px 16px;
|
|
17
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
18
|
+
height: 40px;
|
|
19
|
+
font-size: 15px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
ue-tabs-header .tabs-header button:hover:not(:disabled,.disabled,.checked) {
|
|
23
|
+
background-color: var(--guido-color-gray-1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
ue-tabs-header .tabs-header button ue-icon-component.icon-button {
|
|
27
|
+
color: var(--guido-color-gray-800);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ue-tabs-header .tabs-header button:before {
|
|
31
|
+
content: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ue-tabs-header .tabs-header button:not(:last-child),
|
|
35
|
+
ue-tabs-header .tabs-header button:not(:first-child) {
|
|
36
|
+
border-radius: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ue-tabs-header .tabs-header button:first-child {
|
|
40
|
+
border-radius: 4px 0 0 4px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ue-tabs-header .tabs-header button:last-child {
|
|
44
|
+
border-radius: 0 4px 4px 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ue-tabs-header .tabs-header button:first-child:last-child {
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ue-tabs-header .tabs-header button.checked {
|
|
52
|
+
background-color: var(--guido-color-primary-100);
|
|
53
|
+
color: var(--guido-color-primary-500);
|
|
54
|
+
border-color: var(--guido-color-primary-500);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ue-tabs-header .tabs-header button.checked ue-icon-component.icon-button {
|
|
58
|
+
color: var(--guido-color-primary-500);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ue-radio-tabs .button-group {
|
|
62
|
+
padding: 0;
|
|
63
|
+
column-gap: 0;
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ue-radio-tabs .button-group .button {
|
|
68
|
+
background-color: var(--guido-color-gray-0);
|
|
69
|
+
outline: none;
|
|
70
|
+
padding: 8px 16px;
|
|
71
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
72
|
+
height: 40px;
|
|
73
|
+
font-size: 15px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ue-radio-tabs .button-group input:checked + label {
|
|
77
|
+
box-shadow: none;
|
|
78
|
+
background-color: var(--guido-color-primary-100);
|
|
79
|
+
color: var(--guido-color-primary-500);
|
|
80
|
+
border-color: var(--guido-color-primary-500);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ue-radio-tabs .button-group > div:first-of-type .button {
|
|
84
|
+
border-radius: 4px 0 0 4px !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ue-radio-tabs .button-group > div:last-of-type .button {
|
|
88
|
+
border-radius: 0 4px 4px 0 !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ue-radio-tabs .button-group > div:first-of-type:last-of-type .button {
|
|
92
|
+
border-radius: 4px !important;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
export {
|
|
96
|
+
n as default
|
|
97
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const o = `ue-emoji .emoji-tabs .active-smile-tab {
|
|
2
|
+
border-color: var(--guido-color-primary-500);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
ue-insert-table .hovered-template-cell {
|
|
6
|
+
background: var(--guido-color-primary-100);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
ue-insert-table .template-row,
|
|
10
|
+
ue-insert-table .template-row:last-child,
|
|
11
|
+
ue-insert-table .template-cell {
|
|
12
|
+
border-color: var(--guido-color-primary-500);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ue-popover.light {
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
18
|
+
box-shadow: var(--guido-box-shadow);
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export {
|
|
22
|
+
o as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const o = `.patch-session-container {
|
|
2
|
+
row-gap: 16px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
ue-vh-group {
|
|
6
|
+
box-shadow: none;
|
|
7
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
ue-vh-group:has(ue-vh-patch.selected) {
|
|
12
|
+
border-color: var(--guido-color-primary-500);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
ue-vh-patch.selected .patch-wrapper {
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
ue-vh-patch:hover .patch-wrapper {
|
|
20
|
+
background: var(--guido-color-neutral-100);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ue-vh-patch.selected .patch-wrapper {
|
|
24
|
+
background-color: var(--guido-color-primary-100);
|
|
25
|
+
box-shadow: 0 0 0 1px var(--guido-color-primary-500);
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
export {
|
|
29
|
+
o as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
const n = `ue-wide-panel {
|
|
2
|
+
width: 425px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
ue-main-tabs-panel-component .fixed-panel-header {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Remove with this writing task DT-28355 */
|
|
10
|
+
ue-description a {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.label {
|
|
15
|
+
font-size: 13px;
|
|
16
|
+
color: var(--guido-color-gray-800);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.stacked-panel {
|
|
20
|
+
overflow: scroll;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.stacked-panel-title {
|
|
24
|
+
padding: 16px;
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: var(--guido-color-gray-800);
|
|
28
|
+
text-align: left;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.stacked-panel-item {
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
34
|
+
box-shadow: var(--guido-box-shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.container {
|
|
38
|
+
padding: 16px;
|
|
39
|
+
grid-column-gap: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.container.widest-spacing {
|
|
43
|
+
grid-column-gap: 16px;
|
|
44
|
+
grid-row-gap: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.container.parent-container > .container {
|
|
48
|
+
padding: 0 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.container .container.has-container-separator {
|
|
52
|
+
padding-top: 16px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ue-control-panel,
|
|
56
|
+
.common-wrapper {
|
|
57
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
58
|
+
box-shadow: var(--guido-box-shadow);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.control-panel-header {
|
|
62
|
+
grid-template-columns: repeat(12, 1fr);
|
|
63
|
+
padding: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.control-panel-header > * {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.header-control-panel-left {
|
|
72
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.header-control-panel-label {
|
|
76
|
+
grid-area: 1 / 2 / 2 / 12;
|
|
77
|
+
text-align: left;
|
|
78
|
+
padding: 0;
|
|
79
|
+
font-size: 16px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
line-height: 24px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.header-control-panel-right {
|
|
85
|
+
grid-area: 1 / 12 / 2 / 13;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.control-panel-header button {
|
|
89
|
+
padding: 16px !important;
|
|
90
|
+
border: 0;
|
|
91
|
+
min-height: auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.container.droppable-header-container ue-button:last-child {
|
|
95
|
+
margin-right: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.secondary-control-group {
|
|
99
|
+
gap: 16px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.droppable-container {
|
|
103
|
+
padding-top: 6px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.control-plus-rounded-wrapper {
|
|
107
|
+
border-radius: 4px;
|
|
108
|
+
border: 1px solid var(--guido-color-gray-300);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.structure-item-container {
|
|
112
|
+
padding: 8px 16px 8px 10px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ue-label {
|
|
116
|
+
align-items: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
ue-label.accent-dot:before {
|
|
120
|
+
content: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
ue-label.accent-dot:after {
|
|
124
|
+
content: "New";
|
|
125
|
+
width: auto;
|
|
126
|
+
height: auto;
|
|
127
|
+
border-radius: 4px;
|
|
128
|
+
background: var(--guido-color-primary-500);
|
|
129
|
+
z-index: 2;
|
|
130
|
+
color: var(--guido-color-white);
|
|
131
|
+
padding: 4px 8px;
|
|
132
|
+
right: 1px;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.e2e-size,
|
|
137
|
+
.e2e-timer-size {
|
|
138
|
+
grid-auto-flow: row;
|
|
139
|
+
grid-template-columns: 1fr !important;
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
export {
|
|
143
|
+
n as default
|
|
144
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const n = `.esd-x,
|
|
2
|
+
.esd-merge-tag {
|
|
3
|
+
color: #0a2ecc !important;
|
|
4
|
+
box-shadow: none !important;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.esd-merge-tag {
|
|
8
|
+
border: 1px solid #b5c1f1;
|
|
9
|
+
border-radius: 4px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ue-preview-control-wrapper ue-icon-component:not([disabled=true]):not(.stripo-static-icon):hover {
|
|
13
|
+
background: none;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
n as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const o = `:host {
|
|
2
|
+
--guido-color-white: #FFFFFF;
|
|
3
|
+
--guido-color-primary-500: #0A2ECC;
|
|
4
|
+
--guido-color-primary-200: #B5C1F1;
|
|
5
|
+
--guido-color-primary-100: #DAE1FB;
|
|
6
|
+
--guido-color-gray-800: #292929;
|
|
7
|
+
--guido-color-gray-700: #989898;
|
|
8
|
+
--guido-color-gray-600: #666666;
|
|
9
|
+
--guido-color-gray-300: #E1E1E1;
|
|
10
|
+
--guido-color-gray-1: #F0F0F0;
|
|
11
|
+
--guido-color-gray-0: #F9F9F9;
|
|
12
|
+
--guido-color-neutral-800: #222938;
|
|
13
|
+
--guido-color-neutral-200: #DCDFE6;
|
|
14
|
+
--guido-color-neutral-100: #EFF2F4;
|
|
15
|
+
--guido-color-danger-500: #DC2A2A;
|
|
16
|
+
--guido-box-shadow: 0 4px 12px 0 rgba(44,53,70,0.15);
|
|
17
|
+
--guido-color-background-onpage-message-info: #D3EEF8;
|
|
18
|
+
--guido-color-border-onpage-message-info: #258DDE;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export {
|
|
22
|
+
o as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DynamicContent } from '@@/Types/generic';
|
|
2
|
+
export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dynamicContent", {
|
|
3
|
+
selectedDynamicContent: DynamicContent;
|
|
4
|
+
selectedDynamicContentList: DynamicContent[];
|
|
5
|
+
}, {
|
|
6
|
+
getSelectedDynamicContentList: (state: {
|
|
7
|
+
selectedDynamicContent: {
|
|
8
|
+
value: string;
|
|
9
|
+
text: string;
|
|
10
|
+
fallback?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
selectedDynamicContentList: {
|
|
13
|
+
value: string;
|
|
14
|
+
text: string;
|
|
15
|
+
fallback?: string | undefined;
|
|
16
|
+
}[];
|
|
17
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
18
|
+
selectedDynamicContent: DynamicContent;
|
|
19
|
+
selectedDynamicContentList: DynamicContent[];
|
|
20
|
+
}>) => {
|
|
21
|
+
text: string;
|
|
22
|
+
value: string;
|
|
23
|
+
fallback: string | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
}, {
|
|
26
|
+
setSelectedDynamicContent(dynamicContent: DynamicContent): void;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
|
|
2
|
+
import { defineStore as a } from "pinia";
|
|
3
|
+
const s = a("dynamicContent", {
|
|
4
|
+
state: () => ({
|
|
5
|
+
selectedDynamicContent: { text: "", value: "", fallback: "" },
|
|
6
|
+
selectedDynamicContentList: []
|
|
7
|
+
}),
|
|
8
|
+
actions: {
|
|
9
|
+
setSelectedDynamicContent(e) {
|
|
10
|
+
this.selectedDynamicContent = e, this.selectedDynamicContentList.push(e);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
getters: {
|
|
14
|
+
getSelectedDynamicContentList: (e) => n(e.selectedDynamicContentList).map((t) => ({
|
|
15
|
+
text: t.text,
|
|
16
|
+
value: t.value,
|
|
17
|
+
fallback: t.fallback
|
|
18
|
+
})) || []
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
s as useDynamicContentStore
|
|
23
|
+
};
|
package/dist/stores/editor.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
2
2
|
isCodeEditorOpen: boolean;
|
|
3
|
+
isSaveAsTemplateDrawerOpen: boolean;
|
|
3
4
|
isVersionHistoryOpen: boolean;
|
|
5
|
+
isPreviewModeOpen: boolean;
|
|
4
6
|
editorVisualMode: string;
|
|
7
|
+
hasChanges: boolean;
|
|
5
8
|
}, {}, {}>;
|
package/dist/stores/editor.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { defineStore as e } from "pinia";
|
|
2
|
-
const
|
|
2
|
+
const o = e("editor", {
|
|
3
3
|
state: () => ({
|
|
4
4
|
isCodeEditorOpen: !1,
|
|
5
|
+
isSaveAsTemplateDrawerOpen: !1,
|
|
5
6
|
isVersionHistoryOpen: !1,
|
|
6
|
-
|
|
7
|
+
isPreviewModeOpen: !1,
|
|
8
|
+
editorVisualMode: "desktop",
|
|
9
|
+
hasChanges: !1
|
|
7
10
|
})
|
|
8
11
|
});
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
o as useEditorStore
|
|
11
14
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { PreviewState, EmailFormat } from '@@/Types/preview';
|
|
2
|
+
export declare const usePreviewStore: import("pinia").StoreDefinition<"preview", PreviewState, {
|
|
3
|
+
isAMPModeEnabled: (state: {
|
|
4
|
+
emailFormat: EmailFormat;
|
|
5
|
+
ampHtml: string;
|
|
6
|
+
ampErrors: string[];
|
|
7
|
+
templateHtml: string;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isLoaded: boolean;
|
|
10
|
+
isAMPErrorModalVisible: boolean;
|
|
11
|
+
isPreviewModeOpen: boolean;
|
|
12
|
+
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
13
|
+
previewHtml(): string;
|
|
14
|
+
hasAMP: (state: {
|
|
15
|
+
emailFormat: EmailFormat;
|
|
16
|
+
ampHtml: string;
|
|
17
|
+
ampErrors: string[];
|
|
18
|
+
templateHtml: string;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
isLoaded: boolean;
|
|
21
|
+
isAMPErrorModalVisible: boolean;
|
|
22
|
+
isPreviewModeOpen: boolean;
|
|
23
|
+
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
24
|
+
hasAMPErrors: (state: {
|
|
25
|
+
emailFormat: EmailFormat;
|
|
26
|
+
ampHtml: string;
|
|
27
|
+
ampErrors: string[];
|
|
28
|
+
templateHtml: string;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
isLoaded: boolean;
|
|
31
|
+
isAMPErrorModalVisible: boolean;
|
|
32
|
+
isPreviewModeOpen: boolean;
|
|
33
|
+
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
34
|
+
showAMPErrorButton(): boolean;
|
|
35
|
+
isAMPResponsive(): boolean;
|
|
36
|
+
}, {
|
|
37
|
+
updateAMPData(ampData: {
|
|
38
|
+
ampHtml?: string;
|
|
39
|
+
ampErrors?: string[];
|
|
40
|
+
}): void;
|
|
41
|
+
setEmailFormat(format: EmailFormat): void;
|
|
42
|
+
closeErrorModal(): void;
|
|
43
|
+
openErrorModal(): void;
|
|
44
|
+
openPreviewMode(): void;
|
|
45
|
+
closePreviewMode(): void;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineStore as t } from "pinia";
|
|
2
|
+
const s = () => ({
|
|
3
|
+
emailFormat: "html",
|
|
4
|
+
ampHtml: "",
|
|
5
|
+
ampErrors: [],
|
|
6
|
+
templateHtml: "",
|
|
7
|
+
isLoading: !1,
|
|
8
|
+
isLoaded: !1,
|
|
9
|
+
isAMPErrorModalVisible: !1,
|
|
10
|
+
isPreviewModeOpen: !1
|
|
11
|
+
}), o = t("preview", {
|
|
12
|
+
state: () => s(),
|
|
13
|
+
getters: {
|
|
14
|
+
isAMPModeEnabled: (e) => e.emailFormat === "AMP",
|
|
15
|
+
previewHtml() {
|
|
16
|
+
return this.isAMPModeEnabled ? this.ampHtml : this.templateHtml;
|
|
17
|
+
},
|
|
18
|
+
hasAMP: (e) => {
|
|
19
|
+
var r;
|
|
20
|
+
return !!((r = e.ampHtml) != null && r.trim());
|
|
21
|
+
},
|
|
22
|
+
hasAMPErrors: (e) => e.ampErrors.length > 0,
|
|
23
|
+
showAMPErrorButton() {
|
|
24
|
+
return this.isAMPModeEnabled && this.hasAMPErrors;
|
|
25
|
+
},
|
|
26
|
+
isAMPResponsive() {
|
|
27
|
+
return this.isAMPModeEnabled && this.ampHtml.includes("@media") && this.ampHtml.includes(".adapt-img");
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
actions: {
|
|
31
|
+
updateAMPData(e) {
|
|
32
|
+
this.ampHtml = e.ampHtml ?? "", this.ampErrors = e.ampErrors ?? [], this.emailFormat = e.ampHtml ? "AMP" : "html";
|
|
33
|
+
},
|
|
34
|
+
setEmailFormat(e) {
|
|
35
|
+
this.emailFormat = e;
|
|
36
|
+
},
|
|
37
|
+
closeErrorModal() {
|
|
38
|
+
this.isAMPErrorModalVisible = !1;
|
|
39
|
+
},
|
|
40
|
+
openErrorModal() {
|
|
41
|
+
this.isAMPErrorModalVisible = !0;
|
|
42
|
+
},
|
|
43
|
+
openPreviewMode() {
|
|
44
|
+
this.isPreviewModeOpen = !0;
|
|
45
|
+
},
|
|
46
|
+
closePreviewMode() {
|
|
47
|
+
this.isPreviewModeOpen = !1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
o as usePreviewStore
|
|
53
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { MappedCategory } from '@@/Types/save-as-template';
|
|
2
|
+
interface StoreState {
|
|
3
|
+
templateName: string;
|
|
4
|
+
categories: MappedCategory[];
|
|
5
|
+
selectedCategories: MappedCategory[];
|
|
6
|
+
skeletonStatus: boolean;
|
|
7
|
+
recommendation: {
|
|
8
|
+
campaignUrls: Record<string, string>;
|
|
9
|
+
configs: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
unsubscribe: {
|
|
12
|
+
status: boolean;
|
|
13
|
+
config: Record<string, string>;
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
editor: number;
|
|
17
|
+
message: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"saveAsTemplate", StoreState, {
|
|
21
|
+
getTemplateName: (state: {
|
|
22
|
+
templateName: string;
|
|
23
|
+
categories: {
|
|
24
|
+
value: string;
|
|
25
|
+
text: string;
|
|
26
|
+
}[];
|
|
27
|
+
selectedCategories: {
|
|
28
|
+
value: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
skeletonStatus: boolean;
|
|
32
|
+
recommendation: {
|
|
33
|
+
campaignUrls: Record<string, string>;
|
|
34
|
+
configs: Record<string, string>;
|
|
35
|
+
};
|
|
36
|
+
unsubscribe: {
|
|
37
|
+
status: boolean;
|
|
38
|
+
config: Record<string, string>;
|
|
39
|
+
};
|
|
40
|
+
type: {
|
|
41
|
+
editor: number;
|
|
42
|
+
message: number;
|
|
43
|
+
};
|
|
44
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => string;
|
|
45
|
+
getSelectedCategoryIds: (state: {
|
|
46
|
+
templateName: string;
|
|
47
|
+
categories: {
|
|
48
|
+
value: string;
|
|
49
|
+
text: string;
|
|
50
|
+
}[];
|
|
51
|
+
selectedCategories: {
|
|
52
|
+
value: string;
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
skeletonStatus: boolean;
|
|
56
|
+
recommendation: {
|
|
57
|
+
campaignUrls: Record<string, string>;
|
|
58
|
+
configs: Record<string, string>;
|
|
59
|
+
};
|
|
60
|
+
unsubscribe: {
|
|
61
|
+
status: boolean;
|
|
62
|
+
config: Record<string, string>;
|
|
63
|
+
};
|
|
64
|
+
type: {
|
|
65
|
+
editor: number;
|
|
66
|
+
message: number;
|
|
67
|
+
};
|
|
68
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
|
|
69
|
+
}, {
|
|
70
|
+
fetchCategories(): Promise<void>;
|
|
71
|
+
addCategory(category: string): Promise<void>;
|
|
72
|
+
}>;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useTemplateLibraryApi as o } from "../services/templateLibraryApi.js";
|
|
2
|
+
import { defineStore as i } from "pinia";
|
|
3
|
+
const r = () => ({
|
|
4
|
+
templateName: "",
|
|
5
|
+
categories: [],
|
|
6
|
+
selectedCategories: [],
|
|
7
|
+
skeletonStatus: !0,
|
|
8
|
+
recommendation: {
|
|
9
|
+
campaignUrls: {},
|
|
10
|
+
configs: {}
|
|
11
|
+
},
|
|
12
|
+
unsubscribe: {
|
|
13
|
+
status: !1,
|
|
14
|
+
config: {}
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
editor: 2,
|
|
18
|
+
message: 1
|
|
19
|
+
}
|
|
20
|
+
}), n = i("saveAsTemplate", {
|
|
21
|
+
state: () => r(),
|
|
22
|
+
getters: {
|
|
23
|
+
getTemplateName: (e) => e.templateName.trim(),
|
|
24
|
+
getSelectedCategoryIds: (e) => e.selectedCategories.map((a) => Number(a.value))
|
|
25
|
+
},
|
|
26
|
+
actions: {
|
|
27
|
+
async fetchCategories() {
|
|
28
|
+
const { getCategories: e } = o(), a = await e();
|
|
29
|
+
this.categories = a.map((t) => ({
|
|
30
|
+
value: t.id.toString(),
|
|
31
|
+
text: t.name
|
|
32
|
+
})).sort((t, s) => t.text.localeCompare(s.text));
|
|
33
|
+
},
|
|
34
|
+
async addCategory(e) {
|
|
35
|
+
const { createCategory: a } = o(), t = await a(e);
|
|
36
|
+
if (t) {
|
|
37
|
+
const s = {
|
|
38
|
+
value: t,
|
|
39
|
+
text: e
|
|
40
|
+
};
|
|
41
|
+
this.categories.push(s), this.selectedCategories.push(s);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
n as useSaveAsTemplateStore
|
|
48
|
+
};
|