@useinsider/guido 1.0.2 → 1.0.3-beta.000af7d
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 +36 -2
- package/dist/components/Guido.vue.js +10 -8
- package/dist/components/Guido.vue2.js +87 -67
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +10 -10
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -10
- package/dist/components/organisms/header/RightSlot.vue.js +5 -3
- package/dist/components/organisms/header/RightSlot.vue2.js +26 -27
- package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +37 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +83 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +43 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +21 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +44 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +74 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +37 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
- package/dist/components/wrappers/WpDrawer.vue.js +6 -4
- package/dist/composables/useCustomInterfaceAppearance.js +22 -18
- package/dist/composables/useHtmlCompiler.js +17 -9
- package/dist/composables/useHtmlValidator.js +148 -0
- package/dist/composables/usePartner.js +16 -9
- package/dist/composables/useRecommendation.js +27 -0
- package/dist/composables/useSave.js +15 -0
- package/dist/composables/useStripo.js +66 -45
- package/dist/composables/useStripoEventHandler.js +20 -0
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.js +36 -0
- package/dist/config/compiler/recommendationCompilerRules.js +83 -0
- package/dist/config/compiler/socialCompilerRules.js +21 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +77 -0
- package/dist/config/migrator/checkboxMigrator.js +83 -0
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.js +12 -0
- package/dist/config/migrator/radioButtonMigrator.js +86 -0
- package/dist/config/migrator/recommendationMigrator.js +293 -0
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/date.js +6 -0
- package/dist/enums/defaults.js +49 -9
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/html-validator.js +7 -0
- package/dist/enums/onboarding.js +9 -0
- package/dist/enums/recommendation.js +56 -0
- package/dist/enums/unsubscribe.js +54 -0
- package/dist/extensions/Blocks/Checkbox/block.js +30 -0
- package/dist/extensions/Blocks/Checkbox/control.js +92 -0
- package/dist/extensions/Blocks/Checkbox/extension.js +9 -0
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -0
- package/dist/extensions/Blocks/Checkbox/template.js +64 -0
- package/dist/extensions/Blocks/CouponBlock/block.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +8 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +24 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
- package/dist/extensions/Blocks/RadioButton/block.js +30 -0
- package/dist/extensions/Blocks/RadioButton/control.js +92 -0
- package/dist/extensions/Blocks/RadioButton/extension.js +9 -0
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -0
- package/dist/extensions/Blocks/RadioButton/template.js +149 -0
- package/dist/extensions/Blocks/Recommendation/block.js +30 -0
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/control.js +306 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +45 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +160 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +152 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +180 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
- package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
- package/dist/extensions/Blocks/common-control.js +184 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +21 -21
- package/dist/extensions/DynamicContent/extension.js +6 -6
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +866 -0
- package/dist/package.json.js +7 -0
- package/dist/services/onboardingApi.js +23 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/src/@types/events.d.ts +7 -0
- package/dist/{@types → src/@types}/generic.d.ts +23 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +6 -3
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +4 -0
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +4 -0
- package/dist/src/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +4 -0
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +4 -0
- package/dist/src/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
- package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +6 -4
- package/dist/src/composables/useHtmlValidator.d.ts +4 -0
- package/dist/{composables → src/composables}/usePartner.d.ts +1 -0
- package/dist/src/composables/useRecommendation.d.ts +19 -0
- package/dist/src/composables/useSave.d.ts +4 -0
- package/dist/src/composables/useStripoEventHandler.d.ts +3 -0
- package/dist/src/config/compiler/outlookCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/recommendationCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/socialCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
- package/dist/src/config/migrator/checkboxMigrator.d.ts +1 -0
- package/dist/src/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/src/config/migrator/index.d.ts +1 -0
- package/dist/src/config/migrator/radioButtonMigrator.d.ts +1 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -0
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/src/enums/date.d.ts +4 -0
- package/dist/{enums → src/enums}/defaults.d.ts +6 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/html-validator.d.ts +6 -0
- package/dist/src/enums/onboarding.d.ts +2 -0
- package/dist/src/enums/recommendation.d.ts +54 -0
- package/dist/src/enums/unsubscribe.d.ts +38 -0
- package/dist/src/extensions/Blocks/Checkbox/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Checkbox/control.d.ts +22 -0
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +12 -0
- package/dist/src/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/src/extensions/Blocks/RadioButton/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/RadioButton/control.d.ts +17 -0
- package/dist/src/extensions/Blocks/RadioButton/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/RadioButton/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +51 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +44 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
- package/dist/src/extensions/Blocks/Unsubscribe/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +87 -0
- package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/src/mock/api/template-library.d.ts +2 -0
- package/dist/src/mock/api/unsubscribe.d.ts +2 -0
- package/dist/src/mock/api/user-modal-state.d.ts +2 -0
- package/dist/src/mock/api/validator.d.ts +2 -0
- package/dist/src/services/onboardingApi.d.ts +4 -0
- package/dist/src/services/recommendationApi.d.ts +6 -0
- package/dist/src/services/unsubscribeApi.d.ts +4 -0
- package/dist/src/stores/config.d.ts +97 -0
- package/dist/{stores → src/stores}/dynamic-content.d.ts +12 -0
- package/dist/{stores → src/stores}/editor.d.ts +42 -0
- package/dist/src/stores/onboarding.d.ts +1068 -0
- package/dist/src/stores/recommendation.d.ts +10 -0
- package/dist/src/stores/unsubscribe.d.ts +256 -0
- package/dist/src/utils/dateUtil.d.ts +22 -0
- package/dist/src/utils/genericUtil.d.ts +9 -0
- package/dist/static/assets/onboarding-img.svg.js +4 -0
- package/dist/static/styles/components/alert-message.css.js +32 -2
- package/dist/static/styles/components/button.css.js +32 -2
- package/dist/static/styles/components/notification.css.js +55 -0
- package/dist/static/styles/components/popup.css.js +68 -0
- package/dist/static/styles/components/wide-panel.css.js +5 -1
- package/dist/static/styles/customEditorStyle.css.js +11 -0
- package/dist/static/styles/variables.css.js +10 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/dynamic-content.js +7 -6
- package/dist/stores/editor.js +3 -1
- package/dist/stores/onboarding.js +95 -0
- package/dist/stores/recommendation.js +9 -0
- package/dist/stores/unsubscribe.js +129 -0
- package/dist/utils/dateUtil.js +24 -3
- package/dist/utils/genericUtil.js +9 -5
- package/dist/utils/templatePreparation.js +25 -17
- package/package.json +11 -5
- package/dist/@types/events.d.ts +0 -1
- package/dist/_virtual/AddCustomFont.js +0 -4
- package/dist/_virtual/AiAssistantValueType.js +0 -4
- package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
- package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
- package/dist/_virtual/Block.js +0 -4
- package/dist/_virtual/BlockAttributes.js +0 -4
- package/dist/_virtual/BlockCompositionType.js +0 -4
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/BlockRenderer.js +0 -4
- package/dist/_virtual/BlockType.js +0 -4
- package/dist/_virtual/BlocksPanel.js +0 -4
- package/dist/_virtual/BuiltInControl.js +0 -4
- package/dist/_virtual/BuiltInControlTypes.js +0 -4
- package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
- package/dist/_virtual/ContextAction.js +0 -4
- package/dist/_virtual/ContextActionType.js +0 -4
- package/dist/_virtual/Control.js +0 -4
- package/dist/_virtual/EditorStatePropertyType.js +0 -4
- package/dist/_virtual/Extension.js +0 -4
- package/dist/_virtual/ExtensionBuilder.js +0 -4
- package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
- package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
- package/dist/_virtual/ModificationDescription.js +0 -4
- package/dist/_virtual/PanelPosition.js +0 -4
- package/dist/_virtual/PreviewDeviceMode.js +0 -4
- package/dist/_virtual/SettingsPanelRegistry.js +0 -4
- package/dist/_virtual/SettingsPanelTab.js +0 -4
- package/dist/_virtual/SettingsTab.js +0 -4
- package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/TextColorBuiltInControl.js +0 -4
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
- package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
- package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
- package/dist/_virtual/UIElement.js +0 -4
- package/dist/_virtual/UIElementTagRegistry.js +0 -4
- package/dist/_virtual/UIElementType.js +0 -4
- package/dist/_virtual/UIElementsAttributes.js +0 -4
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
- package/dist/utils/dateUtil.d.ts +0 -1
- package/dist/utils/genericUtil.d.ts +0 -3
- /package/dist/{@types → src/@types}/save-as-template.d.ts +0 -0
- /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/base/Toaster.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/HeaderWrapper.vue.d.ts → src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/LeftSlot.vue.d.ts → src/components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/MiddleSlot.vue.d.ts → src/components/organisms/header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/RightSlot.vue.d.ts → src/components/organisms/header/MiddleSlot.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts → src/components/organisms/onboarding/AMPOnboarding.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +0 -0
- /package/dist/{composables → src/composables}/useActionsApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useApiExample.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useConfig.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebounce.d.ts +0 -0
- /package/dist/{composables → src/composables}/useExport.d.ts +0 -0
- /package/dist/{composables → src/composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHttp.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
- /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripo.d.ts +0 -0
- /package/dist/{composables → src/composables}/useToaster.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTranslations.d.ts +0 -0
- /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
- /package/dist/{enums → src/enums}/preview.d.ts +0 -0
- /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Checkbox}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content.d.ts +0 -0
- /package/dist/{library.d.ts → src/library.d.ts} +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{mock → src/mock}/api/auth.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/default-template.d.ts +0 -0
- /package/dist/{mock/api/template-library.d.ts → src/mock/api/recommendation.d.ts} +0 -0
- /package/dist/{mock → src/mock}/browser.d.ts +0 -0
- /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
- /package/dist/{services → src/services}/stripoApi.d.ts +0 -0
- /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{stores → src/stores}/preview.d.ts +0 -0
- /package/dist/{stores → src/stores}/save-as-template.d.ts +0 -0
- /package/dist/{stores → src/stores}/toaster.d.ts +0 -0
- /package/dist/{stores → src/stores}/version-history.d.ts +0 -0
- /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/base64.d.ts +0 -0
- /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
- /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
|
@@ -0,0 +1,866 @@
|
|
|
1
|
+
var J = /* @__PURE__ */ ((t) => (t.BLOCK = "BLOCK", t.STRUCTURE = "STRUCTURE", t.CONTAINER = "CONTAINER", t))(J || {}), B = class u {
|
|
2
|
+
/**
|
|
3
|
+
* Validates that all required methods are properly implemented in the subclass.
|
|
4
|
+
* @param requiredMethods - Array of method names that must be implemented
|
|
5
|
+
* @param classRef - Reference to the class constructor for validation caching
|
|
6
|
+
*/
|
|
7
|
+
constructor(e, r) {
|
|
8
|
+
if (r !== u) {
|
|
9
|
+
u.validatedClasses.has(r) || this.validateImplementation(e, r);
|
|
10
|
+
const s = u.validationErrors.get(r);
|
|
11
|
+
if (s && s.length > 0)
|
|
12
|
+
throw new Error(
|
|
13
|
+
`${r.name} has validation errors:
|
|
14
|
+
${s.map((E) => ` - ${E}`).join(`
|
|
15
|
+
`)}`
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that all required methods are properly implemented in the subclass.
|
|
21
|
+
* This validation runs only once per class type and results are cached.
|
|
22
|
+
*/
|
|
23
|
+
validateImplementation(e, r) {
|
|
24
|
+
var O;
|
|
25
|
+
const s = [], E = r.name, T = Object.getPrototypeOf(this);
|
|
26
|
+
e.forEach((l) => {
|
|
27
|
+
if (typeof this[l] != "function") {
|
|
28
|
+
s.push(`Method ${l}() is not defined`);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
T[l] === r.prototype[l] && s.push(`Method ${l}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
+
}), u.validatedClasses.add(r), s.length > 0 ? (u.validationErrors.set(r, s), console.error(`[${E} Validation] ${E} validation failed:`, s)) : typeof process < "u" && ((O = process.env) == null ? void 0 : O.NODE_ENV) === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
B.validatedClasses = /* @__PURE__ */ new Set();
|
|
36
|
+
B.validationErrors = /* @__PURE__ */ new Map();
|
|
37
|
+
var i = B, x = class c extends i {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(c.REQUIRED_METHODS, c);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Determines if the block should be available for use in the editor.
|
|
43
|
+
* Override to provide custom logic based on editor state or configuration.
|
|
44
|
+
* @returns True if the block is enabled, false otherwise. Defaults to true.
|
|
45
|
+
*/
|
|
46
|
+
isEnabled() {
|
|
47
|
+
return !0;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Determines if the block can be saved as a reusable module by the user.
|
|
51
|
+
* @returns True if the block can be saved as a module, false otherwise. Defaults to false.
|
|
52
|
+
*/
|
|
53
|
+
canBeSavedAsModule() {
|
|
54
|
+
return !1;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the context actions available for this block.
|
|
58
|
+
* If not overridden, the editor might use a default set of actions.
|
|
59
|
+
* Use IDs from {@link ContextActionType} or custom action IDs.
|
|
60
|
+
* @returns An array of context action IDs, or undefined to use defaults (if any).
|
|
61
|
+
*/
|
|
62
|
+
getContextActionsIds() {
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Provides a custom renderer class for this block, allowing for specialized rendering logic.
|
|
66
|
+
* @returns A constructor for a class extending {@link BlockRenderer}, or undefined to use the default renderer.
|
|
67
|
+
*/
|
|
68
|
+
getCustomRenderer() {
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Gets a unique CSS class name specifically for this block type.
|
|
72
|
+
* Used for targeting styles.
|
|
73
|
+
* @returns A unique CSS class name. Defaults to `esd-{blockId}`.
|
|
74
|
+
*/
|
|
75
|
+
getUniqueBlockClassname() {
|
|
76
|
+
return `esd-${this.getId()}`;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Lifecycle hook called when the editor document is initialized.
|
|
80
|
+
* Useful for performing initial setup or modifications on existing block instances in the template.
|
|
81
|
+
*/
|
|
82
|
+
onDocumentInit() {
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Lifecycle hook called when an instance of this block is selected in the editor.
|
|
86
|
+
* @param node - The immutable HTML node representing the selected block instance.
|
|
87
|
+
*/
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
89
|
+
onSelect(e) {
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Lifecycle hook called when an instance of this block is copied.
|
|
93
|
+
* @param modifier - The HTML node modifier to apply changes to the copied block instance.
|
|
94
|
+
*/
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
96
|
+
onCopy(e) {
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Lifecycle hook called when an instance of this block is deleted.
|
|
100
|
+
* @param node - The immutable HTML node representing the block instance being deleted.
|
|
101
|
+
*/
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
103
|
+
onDelete(e) {
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Lifecycle hook called after a new instance of this block is created and added to the document (e.g., via drag-and-drop).
|
|
107
|
+
* @param node - The immutable HTML node representing the newly created block instance.
|
|
108
|
+
*/
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
|
+
onCreated(e) {
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Lifecycle hook called when any part of the document template has changed.
|
|
114
|
+
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
115
|
+
* @param node - The immutable HTML node representing current node instance
|
|
116
|
+
*/
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
118
|
+
onDocumentChanged(e) {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @description Determines if block is atomic or composite.
|
|
122
|
+
* {@link BlockCompositionType.BLOCK} - atomic block which can be inserted inside other container and cannot hold other objects
|
|
123
|
+
* {@link BlockCompositionType.STRUCTURE} - composite block which can serve as a container for another atomic block
|
|
124
|
+
* @returns The type of the block. Defaults to {@link BlockCompositionType.BLOCK}.
|
|
125
|
+
*/
|
|
126
|
+
getBlockCompositionType() {
|
|
127
|
+
return "BLOCK";
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @description Determines if block should be included in empty container quick insert actions list.
|
|
131
|
+
* @returns True to show a quick-add icon for this block in empty containers, false otherwise. Defaults to false.
|
|
132
|
+
*/
|
|
133
|
+
shouldDisplayQuickAddIcon() {
|
|
134
|
+
return !1;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @description Determines if nested blocks selection allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
138
|
+
*/
|
|
139
|
+
allowInnerBlocksSelection() {
|
|
140
|
+
return !0;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @description Determines if nested blocks drag and drop allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
144
|
+
*/
|
|
145
|
+
allowInnerBlocksDND() {
|
|
146
|
+
return !0;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Gets the unique identifier for this block type.
|
|
150
|
+
* This ID is used for registration and referencing the block.
|
|
151
|
+
* @returns A unique string ID.
|
|
152
|
+
*/
|
|
153
|
+
getId() {
|
|
154
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Gets the HTML template string that defines the initial structure of this block.
|
|
158
|
+
* This template will be used when the block is dragged into the editor.
|
|
159
|
+
* @returns An HTML string.
|
|
160
|
+
*/
|
|
161
|
+
getTemplate() {
|
|
162
|
+
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Gets the URL or path to the icon representing this block in the editor's block panel.
|
|
166
|
+
* @returns A string representing the icon source (e.g., URL, data URI).
|
|
167
|
+
*/
|
|
168
|
+
getIcon() {
|
|
169
|
+
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Gets the display name of the block shown to the user in the block panel.
|
|
173
|
+
* Use `this.api.translate()` for localization.
|
|
174
|
+
* @returns The localized block name string.
|
|
175
|
+
*/
|
|
176
|
+
getName() {
|
|
177
|
+
throw new Error("Method getName() must be implemented by the subclass");
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Gets a short description of the block shown to the user, often as a tooltip in the block panel.
|
|
181
|
+
* Use `this.api.translate()` for localization.
|
|
182
|
+
* @returns The localized description string.
|
|
183
|
+
*/
|
|
184
|
+
getDescription() {
|
|
185
|
+
throw new Error("Method getDescription() must be implemented by the subclass");
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
x.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
189
|
+
var wt = x, tt = class _ extends i {
|
|
190
|
+
constructor() {
|
|
191
|
+
super(_.REQUIRED_METHODS, _);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @deprecated - use {@link getPreviewInnerHtml} instead
|
|
195
|
+
*/
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
197
|
+
getPreviewHtml(e) {
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* @description returns custom content to be displayed inside the {@link Block} root TD element
|
|
201
|
+
*/
|
|
202
|
+
getPreviewInnerHtml(e) {
|
|
203
|
+
throw new Error("Method getPreviewInnerHtml() must be implemented by the subclass");
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
tt.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
207
|
+
var et = class R extends i {
|
|
208
|
+
constructor() {
|
|
209
|
+
super(R.REQUIRED_METHODS, R);
|
|
210
|
+
}
|
|
211
|
+
getId() {
|
|
212
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
213
|
+
}
|
|
214
|
+
getIcon() {
|
|
215
|
+
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
216
|
+
}
|
|
217
|
+
getLabel() {
|
|
218
|
+
throw new Error("Method getLabel() must be implemented by the subclass");
|
|
219
|
+
}
|
|
220
|
+
onClick(e) {
|
|
221
|
+
throw new Error("Method onClick() must be implemented by the subclass");
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
et.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
|
|
225
|
+
var rt = {
|
|
226
|
+
src: "src",
|
|
227
|
+
alt: "alt",
|
|
228
|
+
href: "href"
|
|
229
|
+
}, nt = {
|
|
230
|
+
href: "href"
|
|
231
|
+
}, Pt = {
|
|
232
|
+
BLOCK_IMAGE: rt,
|
|
233
|
+
BLOCK_BUTTON: nt
|
|
234
|
+
}, U = "esd-block-button", y = "esd-block-text", K = "esd-block-image", st = "esd-structure", it = "esd-block-video", at = "esd-block-social", ot = "esd-block-banner", Et = "esd-block-timer", lt = "esd-block-menu", dt = "esd-block-html", ut = "esd-block-spacer", Ot = "esd-container-frame", It = "esd-stripe", Tt = "esd-amp-form", I = ((t) => (t.BUTTON = `.${U}`, t.TEXT = `.${y}`, t.IMAGE = `.${K}`, t.STRUCTURE = `.${st}`, t.VIDEO = `.${it}`, t.SOCIAL = `.${at}`, t.BANNER = `.${ot}`, t.TIMER = `.${Et}`, t.MENU = `.${lt}`, t.HTML = `.${dt}`, t.SPACER = `.${ut}`, t.CONTAINER = `.${Ot}`, t.STRIPE = `.${It}`, t.FORM = `.${Tt}`, t))(I || {}), ct = /* @__PURE__ */ ((t) => (t.BLOCK_IMAGE = "BLOCK_IMAGE", t.BLOCK_TEXT = "BLOCK_TEXT", t.BLOCK_BUTTON = "BLOCK_BUTTON", t.BLOCK_SPACER = "BLOCK_SPACER", t.BLOCK_VIDEO = "BLOCK_VIDEO", t.BLOCK_SOCIAL = "BLOCK_SOCIAL", t.BLOCK_BANNER = "BLOCK_BANNER", t.BLOCK_TIMER = "BLOCK_TIMER", t.BLOCK_MENU = "BLOCK_MENU", t.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", t.BLOCK_HTML = "BLOCK_HTML", t.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", t.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", t.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", t.CONTAINER = "CONTAINER", t.FORM_CONTAINER = "FORM_CONTAINER", t.STRUCTURE = "STRUCTURE", t.STRIPE = "STRIPE", t.EMPTY_CONTAINER = "EMPTY_CONTAINER", t.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", t.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", t.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", t))(ct || {}), p = /* @__PURE__ */ ((t) => (t.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", t.APPLY_CONDITION = "applyCondition", t.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", t.BACKGROUND_COLOR = "backgroundColor", t.BACKGROUND_IMAGE = "generalImageContainer", t.TEXT_COLOR = "textColor", t.TEXT_STYLE = "textStyle", t.TEXT_SIZE = "textSize", t.TEXT_LINE_SPACING = "textLineSpacing", t.TEXT_ALIGN = "textAlign", t.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", t.HIDDEN_NODE = "hiddenNode", t.SMART_BLOCK = "smartBlock", t.SYNCHRONIZED_MODULE = "synchronizedModuleForm", t.FONT_FAMILY = "generalFontFamilyForm", t.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", t.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", t))(p || {}), F = /* @__PURE__ */ ((t) => (t.ADJUST_TO_WIDTH = "adjustToWidth", t.ALIGNMENT = "buttonAlignment", t.BORDER = "buttonBorder", t.BORDER_RADIUS = "buttonBorderRadius", t.COLOR = "buttonColor", t.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", t.EXTERNAL_INDENTS = "buttonExternalIndents", t.FIXED_HEIGHT = "buttonFixedHeightForm", t.FONT_COLOR = "buttonFontColor", t.FONT_FAMILY = "buttonFontFamily", t.FONT_SIZE = "buttonFontSize", t.ICON = "buttonIconContainer", t.ICON_ALIGN = "buttonIconAlign", t.ICON_INDENT = "buttonIconIndent", t.ICON_WIDTH = "buttonIconWidth", t.IMAGE = "buttonImageForm", t.INTERNAL_INDENTS = "buttonInternalIndents", t.LINK = "buttonLink", t.MIME_TYPE = "buttonMimeTypeForm", t.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", t.TEXT = "buttonText", t.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", t.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", t.HOVERED_COLOR = "hoveredButtonColorForm", t.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", t))(F || {}), w = /* @__PURE__ */ ((t) => (t.HIDDEN_NODE = "hiddenNodeText", t.PARAGRAPH_STYLE = "paragraphStyleForm", t.ALIGN = "textAlignmentForm", t.ANCHOR_CONTAINER = "textAnchorForm", t.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", t.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", t.FONT_COLOR = "textBlockFontColor", t.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", t.FONT_FAMILY = "textFontFamily", t.FONT_SIZE = "textBlockFontSize", t.DIRECTION = "textBlockDirectionForm", t.INSERT_FORM = "textBlockInsertForm", t.LINK_DATA = "textBlockLinkDataForm", t.FORMAT = "textBlockTextFormatForm", t.FIXED_HEIGHT = "textFixedHeightForm", t.INTERNAL_INDENTS = "textInternalIndents", t.LINE_HEIGHT = "textLineHeightForm", t.LINKS_COLOR = "textLinksFontColorForm", t.MIME_TYPE = "textMimeTypeForm", t.NO_LINE_WRAPS = "textNoLineWrapsForm", t))(w || {}), P = /* @__PURE__ */ ((t) => (t.ALT_TEXT = "altText", t.LINK = "blockLink", t.ALIGNMENT = "imageAlignment", t.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", t.BORDER_RADIUS = "imageBorderRadiusForm", t.IMAGE = "imageImageForm", t.EXTERNAL_INDENTS = "imageExternalIndents", t.MIME_TYPE = "imageMimeTypeForm", t.RESPONSIVE = "imageResponsive", t.ROLLOVER_IMAGE = "imageRolloverImageForm", t.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", t.SIZE = "imageSizeContainer", t))(P || {}), _t = /* @__PURE__ */ ((t) => (t.BACKGROUND_COLOR = "containerBackgroundColorForm", t.BORDER_FORM = "containerBorderForm", t.BORDER_RADIUS = "containerBorderRadiusForm", t.EXTERNAL_INDENTS = "containerExternalIndentsForm", t.IMAGE_CONTAINER = "containerImageContainerForm", t.MIME_TYPE = "containerMimeTypeForm", t.DISPLAY_CONDITIONS = "displayConditions", t.HIDDEN_NODE = "containerHiddenNodeForm", t))(_t || {}), n = {
|
|
235
|
+
BLOCK_BUTTON: F,
|
|
236
|
+
BLOCK_TEXT: w,
|
|
237
|
+
BLOCK_IMAGE: P,
|
|
238
|
+
GENERAL: p
|
|
239
|
+
}, Rt = /* @__PURE__ */ ((t) => (t.SETTINGS = "settings", t.STYLES = "styles", t.DATA = "data", t))(Rt || {}), a = {
|
|
240
|
+
name: "name",
|
|
241
|
+
disabled: "disabled"
|
|
242
|
+
}, ht = {
|
|
243
|
+
...a,
|
|
244
|
+
caption: "caption",
|
|
245
|
+
icon: "icon"
|
|
246
|
+
}, Ct = {
|
|
247
|
+
...a,
|
|
248
|
+
caption: "caption"
|
|
249
|
+
}, Lt = {
|
|
250
|
+
...a,
|
|
251
|
+
minValue: "min-value",
|
|
252
|
+
maxValue: "max-value",
|
|
253
|
+
step: "step"
|
|
254
|
+
}, gt = {
|
|
255
|
+
...a,
|
|
256
|
+
text: "text"
|
|
257
|
+
}, mt = {
|
|
258
|
+
...a
|
|
259
|
+
}, H = {
|
|
260
|
+
...a,
|
|
261
|
+
searchable: "searchable",
|
|
262
|
+
multiSelect: "multi-select",
|
|
263
|
+
placeholder: "placeholder",
|
|
264
|
+
items: "items"
|
|
265
|
+
}, At = {
|
|
266
|
+
...H
|
|
267
|
+
}, Nt = {
|
|
268
|
+
text: "text",
|
|
269
|
+
value: "value"
|
|
270
|
+
}, bt = {
|
|
271
|
+
text: "text",
|
|
272
|
+
value: "value"
|
|
273
|
+
}, Dt = {
|
|
274
|
+
...a
|
|
275
|
+
}, St = {
|
|
276
|
+
controlId: "control-id"
|
|
277
|
+
}, Bt = {
|
|
278
|
+
...a,
|
|
279
|
+
icon: "icon",
|
|
280
|
+
position: "position"
|
|
281
|
+
}, Mt = {
|
|
282
|
+
...a
|
|
283
|
+
}, Ht = {
|
|
284
|
+
BUTTON: ht,
|
|
285
|
+
CHECKBOX: Ct,
|
|
286
|
+
COLOR: a,
|
|
287
|
+
COUNTER: Lt,
|
|
288
|
+
LABEL: gt,
|
|
289
|
+
RADIO_BUTTONS: mt,
|
|
290
|
+
SELECTPICKER: H,
|
|
291
|
+
FONT_FAMILY_SELECT: At,
|
|
292
|
+
SWITCHER: a,
|
|
293
|
+
TEXT: Dt,
|
|
294
|
+
SELECT_ITEM: Nt,
|
|
295
|
+
RADIO_ITEM: bt,
|
|
296
|
+
NESTED_CONTROL: St,
|
|
297
|
+
ORDERABLE: Bt,
|
|
298
|
+
ORDERABLE_ITEM: Mt
|
|
299
|
+
}, vt = /* @__PURE__ */ ((t) => (t.BUTTON = "UE-BUTTON", t.CHECKBOX = "UE-CHECKBOX", t.CHECK_BUTTONS = "UE-CHECK-BUTTONS", t.COLOR = "UE-COLOR", t.COUNTER = "UE-COUNTER", t.DATEPICKER = "UE-DATEPICKER", t.LABEL = "UE-LABEL", t.MESSAGE = "UE-MESSAGE", t.RADIO_BUTTONS = "UE-RADIO-BUTTONS", t.SELECTPICKER = "UE-SELECT", t.SWITCHER = "UE-SWITCHER", t.TEXT = "UE-TEXT", t.TEXTAREA = "UE-TEXTAREA", t.CHECK_ITEM = "UE-CHECK-ITEM", t.RADIO_ITEM = "UE-RADIO-ITEM", t.SELECT_ITEM = "UE-SELECT-ITEM", t.ICON = "UE-ICON", t.MERGETAGS = "UE-MERGETAGS", t.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", t.NESTED_CONTROL = "UE-NESTED-CONTROL", t.EXPANDABLE = "UE-EXPANDABLE", t.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", t.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", t.ORDERABLE = "UE-ORDERABLE", t.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", t.ORDERABLE_ICON = "UE-ORDERABLE-ICON", t))(vt || {}), M = class {
|
|
300
|
+
/**
|
|
301
|
+
* @description returns map of nodes parent control operates on
|
|
302
|
+
*/
|
|
303
|
+
getTargetNodes(t) {
|
|
304
|
+
return [t];
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* @description returns map of labels used by parent control UI
|
|
308
|
+
*/
|
|
309
|
+
getLabels() {
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @description returns custom description for parent modifications
|
|
313
|
+
*/
|
|
314
|
+
getModificationDescription() {
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @description returns custom modifications to be included in the parent control patch
|
|
318
|
+
*/
|
|
319
|
+
getAdditionalModifications(t) {
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Determines whether the specified HTML node is visible.
|
|
323
|
+
*
|
|
324
|
+
* @param _node - The HTML node to evaluate for visibility, provided as an immutable object.
|
|
325
|
+
* @return A boolean value indicating whether the node is visible. Returns `true` if the node is visible, otherwise `false`.
|
|
326
|
+
*/
|
|
327
|
+
isVisible(t) {
|
|
328
|
+
return !0;
|
|
329
|
+
}
|
|
330
|
+
}, o = class extends M {
|
|
331
|
+
getTargetNodes(t) {
|
|
332
|
+
const e = t.querySelectorAll(I.BUTTON), r = t.asElement().hasClass(U) ? [t] : [];
|
|
333
|
+
return e.length ? e : r;
|
|
334
|
+
}
|
|
335
|
+
}, Xt = class extends o {
|
|
336
|
+
getParentControlId() {
|
|
337
|
+
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
338
|
+
}
|
|
339
|
+
getLabels() {
|
|
340
|
+
}
|
|
341
|
+
}, kt = class extends o {
|
|
342
|
+
getParentControlId() {
|
|
343
|
+
return n.BLOCK_BUTTON.ALIGNMENT;
|
|
344
|
+
}
|
|
345
|
+
}, Vt = class extends o {
|
|
346
|
+
getParentControlId() {
|
|
347
|
+
return n.BLOCK_BUTTON.BORDER;
|
|
348
|
+
}
|
|
349
|
+
getLabels() {
|
|
350
|
+
}
|
|
351
|
+
}, Gt = class extends o {
|
|
352
|
+
getParentControlId() {
|
|
353
|
+
return n.BLOCK_BUTTON.COLOR;
|
|
354
|
+
}
|
|
355
|
+
}, ft = class extends o {
|
|
356
|
+
getParentControlId() {
|
|
357
|
+
return n.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
358
|
+
}
|
|
359
|
+
}, Qt = class extends o {
|
|
360
|
+
getParentControlId() {
|
|
361
|
+
return n.BLOCK_BUTTON.FONT_FAMILY;
|
|
362
|
+
}
|
|
363
|
+
}, Yt = class extends o {
|
|
364
|
+
getParentControlId() {
|
|
365
|
+
return n.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
366
|
+
}
|
|
367
|
+
}, $t = class extends o {
|
|
368
|
+
getParentControlId() {
|
|
369
|
+
return n.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
370
|
+
}
|
|
371
|
+
}, Wt = class extends o {
|
|
372
|
+
getParentControlId() {
|
|
373
|
+
return n.BLOCK_BUTTON.TEXT;
|
|
374
|
+
}
|
|
375
|
+
}, zt = class extends o {
|
|
376
|
+
getParentControlId() {
|
|
377
|
+
return n.BLOCK_BUTTON.FONT_SIZE;
|
|
378
|
+
}
|
|
379
|
+
}, Zt = class extends o {
|
|
380
|
+
getParentControlId() {
|
|
381
|
+
return n.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
382
|
+
}
|
|
383
|
+
getLabels() {
|
|
384
|
+
}
|
|
385
|
+
}, X = class h extends i {
|
|
386
|
+
constructor() {
|
|
387
|
+
super(h.REQUIRED_METHODS, h);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
391
|
+
* Called on every node modification.
|
|
392
|
+
*/
|
|
393
|
+
isVisible(e) {
|
|
394
|
+
return !0;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Optional hook called when the control is initially rendered.
|
|
398
|
+
* Use this for setup tasks like attaching event listeners to the control's template elements.
|
|
399
|
+
*/
|
|
400
|
+
onRender() {
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Optional cleanup hook called when the control is being destroyed.
|
|
404
|
+
* Use this to remove event listeners or perform other cleanup tasks.
|
|
405
|
+
*/
|
|
406
|
+
onDestroy() {
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Gets the unique identifier for this UI control type.
|
|
410
|
+
* This ID is used for registration and referencing.
|
|
411
|
+
* @returns A unique string ID.
|
|
412
|
+
*/
|
|
413
|
+
getId() {
|
|
414
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Gets the HTML template string that defines the structure of this UI control,
|
|
418
|
+
* typically containing one or more UI elements (e.g., `<UE-TEXT>`, `<UE-BUTTON>`).
|
|
419
|
+
* @returns An HTML string.
|
|
420
|
+
*/
|
|
421
|
+
getTemplate() {
|
|
422
|
+
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Hook called whenever the underlying template node associated with this control's context
|
|
426
|
+
* (e.g., the selected block's HTMLnode) is updated.
|
|
427
|
+
* Implement this to react to changes in the block/structure and update the control's UI elements accordingly.
|
|
428
|
+
* @param node - The updated immutable HTML node representing the control's context.
|
|
429
|
+
*/
|
|
430
|
+
onTemplateNodeUpdated(e) {
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Lifecycle hook called when any part of the document template has changed.
|
|
434
|
+
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
435
|
+
* @param _node - The immutable HTML node representing current node instance
|
|
436
|
+
*/
|
|
437
|
+
onDocumentChanged(e) {
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
X.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
441
|
+
var jt = X, k = class extends M {
|
|
442
|
+
getTargetNodes(t) {
|
|
443
|
+
const e = t.querySelectorAll(I.IMAGE), r = t.asElement().hasClass(K) ? [t] : [];
|
|
444
|
+
return e.length ? e : r;
|
|
445
|
+
}
|
|
446
|
+
}, qt = class extends k {
|
|
447
|
+
getParentControlId() {
|
|
448
|
+
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
449
|
+
}
|
|
450
|
+
}, Jt = class extends k {
|
|
451
|
+
getParentControlId() {
|
|
452
|
+
return n.BLOCK_IMAGE.SIZE;
|
|
453
|
+
}
|
|
454
|
+
}, V = class C extends i {
|
|
455
|
+
constructor() {
|
|
456
|
+
super(C.REQUIRED_METHODS, C);
|
|
457
|
+
}
|
|
458
|
+
registerBlockControls(e) {
|
|
459
|
+
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
V.REQUIRED_METHODS = ["registerBlockControls"];
|
|
463
|
+
var te = V, ee = class {
|
|
464
|
+
constructor(t, e) {
|
|
465
|
+
this.tabId = t, this.controlsIds = e;
|
|
466
|
+
}
|
|
467
|
+
getTabId() {
|
|
468
|
+
return this.tabId;
|
|
469
|
+
}
|
|
470
|
+
getLabel() {
|
|
471
|
+
return this.label;
|
|
472
|
+
}
|
|
473
|
+
getControlsIds() {
|
|
474
|
+
return this.controlsIds;
|
|
475
|
+
}
|
|
476
|
+
withLabel(t) {
|
|
477
|
+
return this.label = t, this;
|
|
478
|
+
}
|
|
479
|
+
addControl(t, e) {
|
|
480
|
+
return e < 0 ? this.controlsIds.unshift(t) : e > this.controlsIds.length ? this.controlsIds.push(t) : this.controlsIds.splice(e, 0, t), this;
|
|
481
|
+
}
|
|
482
|
+
deleteControl(t) {
|
|
483
|
+
const e = this.controlsIds.indexOf(t);
|
|
484
|
+
e !== -1 && this.controlsIds.splice(e, 1);
|
|
485
|
+
}
|
|
486
|
+
}, d = class extends M {
|
|
487
|
+
getTargetNodes(t) {
|
|
488
|
+
const e = t.querySelectorAll(I.TEXT), r = t.asElement().hasClass(y) ? [t] : [];
|
|
489
|
+
return e.length ? e : r;
|
|
490
|
+
}
|
|
491
|
+
}, re = class extends d {
|
|
492
|
+
getParentControlId() {
|
|
493
|
+
return n.GENERAL.TEXT_ALIGN;
|
|
494
|
+
}
|
|
495
|
+
}, ne = class extends d {
|
|
496
|
+
getParentControlId() {
|
|
497
|
+
return n.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
|
|
498
|
+
}
|
|
499
|
+
}, se = class extends d {
|
|
500
|
+
getParentControlId() {
|
|
501
|
+
return n.GENERAL.TEXT_COLOR;
|
|
502
|
+
}
|
|
503
|
+
}, ie = class extends d {
|
|
504
|
+
getParentControlId() {
|
|
505
|
+
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
506
|
+
}
|
|
507
|
+
}, ae = class extends d {
|
|
508
|
+
getParentControlId() {
|
|
509
|
+
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
510
|
+
}
|
|
511
|
+
}, oe = class extends d {
|
|
512
|
+
getParentControlId() {
|
|
513
|
+
return n.GENERAL.TEXT_SIZE;
|
|
514
|
+
}
|
|
515
|
+
}, Ee = class extends d {
|
|
516
|
+
getParentControlId() {
|
|
517
|
+
return n.GENERAL.TEXT_STYLE;
|
|
518
|
+
}
|
|
519
|
+
}, xt = class {
|
|
520
|
+
constructor(t, e, r = [], s, E = [], T, O = [], l = [], v, Y, $, W, z, Z, j, q) {
|
|
521
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = $, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = O, this.blocks = l, this.externalSmartElementsLibrary = v, this.externalImageLibrary = Y, this.externalAiAssistant = W, this.externalDisplayConditionsLibrary = z, this.externalVideoLibrary = Z, this.blocksPanel = j, this.iconsRegistry = q, this.id = Math.random().toString(36).substring(2);
|
|
522
|
+
}
|
|
523
|
+
getI18n() {
|
|
524
|
+
return this.i18n;
|
|
525
|
+
}
|
|
526
|
+
getStyles() {
|
|
527
|
+
return this.styles;
|
|
528
|
+
}
|
|
529
|
+
getPreviewStyles() {
|
|
530
|
+
return this.previewStyles;
|
|
531
|
+
}
|
|
532
|
+
getUiElements() {
|
|
533
|
+
return this.uiElements;
|
|
534
|
+
}
|
|
535
|
+
getUiElementTagRegistry() {
|
|
536
|
+
return this.uiElementTagRegistry;
|
|
537
|
+
}
|
|
538
|
+
getControls() {
|
|
539
|
+
return this.controls;
|
|
540
|
+
}
|
|
541
|
+
getSettingsPanelRegistry() {
|
|
542
|
+
return this.settingsPanelRegistry;
|
|
543
|
+
}
|
|
544
|
+
getContextActions() {
|
|
545
|
+
return this.contextActions;
|
|
546
|
+
}
|
|
547
|
+
getBlocks() {
|
|
548
|
+
return this.blocks;
|
|
549
|
+
}
|
|
550
|
+
getId() {
|
|
551
|
+
return this.id;
|
|
552
|
+
}
|
|
553
|
+
getExternalSmartElementsLibrary() {
|
|
554
|
+
return this.externalSmartElementsLibrary;
|
|
555
|
+
}
|
|
556
|
+
getExternalImageLibrary() {
|
|
557
|
+
return this.externalImageLibrary;
|
|
558
|
+
}
|
|
559
|
+
getExternalAiAssistant() {
|
|
560
|
+
return this.externalAiAssistant;
|
|
561
|
+
}
|
|
562
|
+
getExternalDisplayConditionsLibrary() {
|
|
563
|
+
return this.externalDisplayConditionsLibrary;
|
|
564
|
+
}
|
|
565
|
+
getExternalVideoLibrary() {
|
|
566
|
+
return this.externalVideoLibrary;
|
|
567
|
+
}
|
|
568
|
+
getBlocksPanel() {
|
|
569
|
+
return this.blocksPanel;
|
|
570
|
+
}
|
|
571
|
+
getIconsRegistry() {
|
|
572
|
+
return this.iconsRegistry;
|
|
573
|
+
}
|
|
574
|
+
}, le = class {
|
|
575
|
+
constructor() {
|
|
576
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
|
|
577
|
+
}
|
|
578
|
+
withLocalization(t) {
|
|
579
|
+
return this.i18n = t, this;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* @deprecated Use addStyles() instead. This method will be removed in a future version.
|
|
583
|
+
*/
|
|
584
|
+
withStyles(t) {
|
|
585
|
+
return this.styles = [t], this;
|
|
586
|
+
}
|
|
587
|
+
addStyles(t) {
|
|
588
|
+
return this.styles.push(t), this;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* @description defines custom developer styles to use inside the editor document preview
|
|
592
|
+
*/
|
|
593
|
+
withPreviewStyles(t) {
|
|
594
|
+
return this.previewStyles = t, this;
|
|
595
|
+
}
|
|
596
|
+
addContextAction(t) {
|
|
597
|
+
return this.contextActions.push(t), this;
|
|
598
|
+
}
|
|
599
|
+
addUiElement(t) {
|
|
600
|
+
return this.uiElements.push(t), this;
|
|
601
|
+
}
|
|
602
|
+
withUiElementTagRegistry(t) {
|
|
603
|
+
return this.uiElementTagRegistry = t, this;
|
|
604
|
+
}
|
|
605
|
+
addControl(t) {
|
|
606
|
+
return this.controls.push(t), this;
|
|
607
|
+
}
|
|
608
|
+
withSettingsPanelRegistry(t) {
|
|
609
|
+
return this.settingsPanelRegistry = t, this;
|
|
610
|
+
}
|
|
611
|
+
withExternalSmartElementsLibrary(t) {
|
|
612
|
+
return this.externalSmartElementsLibrary = t, this;
|
|
613
|
+
}
|
|
614
|
+
withExternalImageLibrary(t) {
|
|
615
|
+
return this.externalImageLibrary = t, this;
|
|
616
|
+
}
|
|
617
|
+
withExternalAiAssistant(t) {
|
|
618
|
+
return this.externalAiAssistant = t, this;
|
|
619
|
+
}
|
|
620
|
+
withExternalDisplayCondition(t) {
|
|
621
|
+
return this.externalDisplayConditionsLibrary = t, this;
|
|
622
|
+
}
|
|
623
|
+
withExternalVideosLibrary(t) {
|
|
624
|
+
return this.externalVideoLibrary = t, this;
|
|
625
|
+
}
|
|
626
|
+
withBlocksPanel(t) {
|
|
627
|
+
return this.blocksPanel = t, this;
|
|
628
|
+
}
|
|
629
|
+
addBlock(t) {
|
|
630
|
+
return this.blocks.push(t), this;
|
|
631
|
+
}
|
|
632
|
+
withIconsRegistry(t) {
|
|
633
|
+
return this.iconsRegistry = t, this;
|
|
634
|
+
}
|
|
635
|
+
build() {
|
|
636
|
+
return new xt(
|
|
637
|
+
this.i18n,
|
|
638
|
+
(this.styles || []).map((t) => t.trim()).join(`
|
|
639
|
+
`),
|
|
640
|
+
this.uiElements,
|
|
641
|
+
this.uiElementTagRegistry,
|
|
642
|
+
this.controls,
|
|
643
|
+
this.settingsPanelRegistry,
|
|
644
|
+
this.contextActions,
|
|
645
|
+
this.blocks,
|
|
646
|
+
this.externalSmartElementsLibrary,
|
|
647
|
+
this.externalImageLibrary,
|
|
648
|
+
this.previewStyles,
|
|
649
|
+
this.externalAiAssistant,
|
|
650
|
+
this.externalDisplayConditionsLibrary,
|
|
651
|
+
this.externalVideoLibrary,
|
|
652
|
+
this.blocksPanel,
|
|
653
|
+
this.iconsRegistry
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
}, Ut = class L extends i {
|
|
657
|
+
constructor() {
|
|
658
|
+
super(L.REQUIRED_METHODS, L);
|
|
659
|
+
}
|
|
660
|
+
openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: s, type: E }) {
|
|
661
|
+
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
Ut.REQUIRED_METHODS = ["openAiAssistant"];
|
|
665
|
+
var yt = class g extends i {
|
|
666
|
+
constructor() {
|
|
667
|
+
super(g.REQUIRED_METHODS, g);
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Retrieves the name of the category.
|
|
671
|
+
*
|
|
672
|
+
* @return {string} The name of the category.
|
|
673
|
+
*/
|
|
674
|
+
getCategoryName() {
|
|
675
|
+
throw new Error("Method getCategoryName() must be implemented by the subclass");
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Opens a popup dialog for creating or updating a display condition.
|
|
679
|
+
*
|
|
680
|
+
* @param {DisplayCondition} currentCondition - The currently selected display condition to edit.
|
|
681
|
+
* @param {ExternalDisplayConditionSelectedCB} successCallback - Callback executed with the updated or newly created condition upon success.
|
|
682
|
+
* @param {() => void} cancelCallback - Callback executed when the dialog is closed without making changes.
|
|
683
|
+
*/
|
|
684
|
+
openExternalDisplayConditionsDialog(e, r, s) {
|
|
685
|
+
throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Determines if the context action associated with this library is enabled.
|
|
689
|
+
*
|
|
690
|
+
* @returns {boolean} `true` if the context action is enabled, otherwise `false`.
|
|
691
|
+
*/
|
|
692
|
+
getIsContextActionEnabled() {
|
|
693
|
+
throw new Error("Method getIsContextActionEnabled() must be implemented by the subclass");
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Retrieves the index of the context action associated with this library.
|
|
697
|
+
* The index represents the position/order of the action in the UI.
|
|
698
|
+
*
|
|
699
|
+
* @returns {number} The index of the context action.
|
|
700
|
+
*/
|
|
701
|
+
getContextActionIndex() {
|
|
702
|
+
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
yt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
706
|
+
var Kt = class m extends i {
|
|
707
|
+
constructor() {
|
|
708
|
+
super(m.REQUIRED_METHODS, m);
|
|
709
|
+
}
|
|
710
|
+
openImageLibrary(e, r, s) {
|
|
711
|
+
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
Kt.REQUIRED_METHODS = ["openImageLibrary"];
|
|
715
|
+
var pt = class A extends i {
|
|
716
|
+
constructor() {
|
|
717
|
+
super(A.REQUIRED_METHODS, A);
|
|
718
|
+
}
|
|
719
|
+
openSmartElementsLibrary(e, r) {
|
|
720
|
+
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
pt.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
724
|
+
var Ft = class N extends i {
|
|
725
|
+
constructor() {
|
|
726
|
+
super(N.REQUIRED_METHODS, N);
|
|
727
|
+
}
|
|
728
|
+
openExternalVideosLibraryDialog(e, r, s) {
|
|
729
|
+
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
Ft.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
733
|
+
var G = class b extends i {
|
|
734
|
+
constructor() {
|
|
735
|
+
super(b.REQUIRED_METHODS, b);
|
|
736
|
+
}
|
|
737
|
+
registerIconsSvg(e) {
|
|
738
|
+
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
G.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
742
|
+
var de = G, ue = class {
|
|
743
|
+
constructor(t) {
|
|
744
|
+
this.key = t;
|
|
745
|
+
}
|
|
746
|
+
withParams(t) {
|
|
747
|
+
return this.params = t, this;
|
|
748
|
+
}
|
|
749
|
+
getValue() {
|
|
750
|
+
return {
|
|
751
|
+
key: this.key,
|
|
752
|
+
params: this.params
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
}, f = class D extends i {
|
|
756
|
+
constructor() {
|
|
757
|
+
super(D.REQUIRED_METHODS, D);
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Called when the UI element should render its content into the provided container.
|
|
761
|
+
* @param container - The HTMLElement where the UI element should be rendered.
|
|
762
|
+
*/
|
|
763
|
+
onRender(e) {
|
|
764
|
+
throw new Error("Method onRender() must be implemented by the subclass");
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Optional cleanup hook called when the UI element is being destroyed.
|
|
768
|
+
* Use this to remove event listeners or perform other cleanup tasks.
|
|
769
|
+
*/
|
|
770
|
+
onDestroy() {
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Optional method to get the current value of the UI element.
|
|
774
|
+
* Implement this if the element manages a state or value (e.g., input fields).
|
|
775
|
+
* @returns The current value of the element.
|
|
776
|
+
*/
|
|
777
|
+
getValue() {
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Optional method to set the value of the UI element.
|
|
781
|
+
* Implement this if the element manages a state or value and needs to be updated externally.
|
|
782
|
+
* @param value - The new value to set.
|
|
783
|
+
*/
|
|
784
|
+
setValue(e) {
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* @description Optional hook called when one of the element's supported attributes ({@link UEAttr}) gets updated externally.
|
|
788
|
+
* Implement this to react to attribute changes (e.g., visibility, disabled state).
|
|
789
|
+
* @param name - The name of the attribute that was updated.
|
|
790
|
+
* @param value - The new value of the attribute.
|
|
791
|
+
*/
|
|
792
|
+
onAttributeUpdated(e, r) {
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Gets the unique identifier for this UI element type.
|
|
796
|
+
* This ID is used for registration and referencing within controls.
|
|
797
|
+
* @returns A unique string ID.
|
|
798
|
+
*/
|
|
799
|
+
getId() {
|
|
800
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Gets the HTML template string that defines the structure of this UI element.
|
|
804
|
+
* @returns An HTML string.
|
|
805
|
+
*/
|
|
806
|
+
getTemplate() {
|
|
807
|
+
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
f.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
811
|
+
var Oe = f, Q = class S extends i {
|
|
812
|
+
constructor() {
|
|
813
|
+
super(S.REQUIRED_METHODS, S);
|
|
814
|
+
}
|
|
815
|
+
registerUiElements(e) {
|
|
816
|
+
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
Q.REQUIRED_METHODS = ["registerUiElements"];
|
|
820
|
+
var Ie = Q;
|
|
821
|
+
export {
|
|
822
|
+
wt as Block,
|
|
823
|
+
Pt as BlockAttr,
|
|
824
|
+
J as BlockCompositionType,
|
|
825
|
+
I as BlockSelector,
|
|
826
|
+
ct as BlockType,
|
|
827
|
+
M as BuiltInControl,
|
|
828
|
+
n as BuiltInControlTypes,
|
|
829
|
+
kt as ButtonAlignBuiltInControl,
|
|
830
|
+
Vt as ButtonBorderBuiltInControl,
|
|
831
|
+
Xt as ButtonBorderRadiusBuiltInControl,
|
|
832
|
+
Gt as ButtonColorBuiltInControl,
|
|
833
|
+
F as ButtonControls,
|
|
834
|
+
ft as ButtonFitToContainerBuiltInControl,
|
|
835
|
+
Qt as ButtonFontFamilyBuiltInControl,
|
|
836
|
+
Yt as ButtonMarginsBuiltInControl,
|
|
837
|
+
$t as ButtonPaddingsBuiltInControl,
|
|
838
|
+
Wt as ButtonTextBuiltInControl,
|
|
839
|
+
zt as ButtonTextSizeBuiltInControl,
|
|
840
|
+
Zt as ButtonTextStyleAndFontColorBuiltInControl,
|
|
841
|
+
_t as ContainerControls,
|
|
842
|
+
jt as Control,
|
|
843
|
+
xt as Extension,
|
|
844
|
+
le as ExtensionBuilder,
|
|
845
|
+
p as GeneralControls,
|
|
846
|
+
de as IconsRegistry,
|
|
847
|
+
P as ImageControls,
|
|
848
|
+
qt as ImageMarginsBuiltInControl,
|
|
849
|
+
Jt as ImageSizeBuiltInControl,
|
|
850
|
+
ue as ModificationDescription,
|
|
851
|
+
te as SettingsPanelRegistry,
|
|
852
|
+
ee as SettingsPanelTab,
|
|
853
|
+
Rt as SettingsTab,
|
|
854
|
+
re as TextAlignBuiltInControl,
|
|
855
|
+
ne as TextBlockBackgroundBuiltInControl,
|
|
856
|
+
se as TextColorBuiltInControl,
|
|
857
|
+
w as TextControls,
|
|
858
|
+
ie as TextFontFamilyBuiltInControl,
|
|
859
|
+
ae as TextPaddingsBuiltInControl,
|
|
860
|
+
oe as TextSizeBuiltInControl,
|
|
861
|
+
Ee as TextStyleBuiltInControl,
|
|
862
|
+
Ht as UEAttr,
|
|
863
|
+
Oe as UIElement,
|
|
864
|
+
Ie as UIElementTagRegistry,
|
|
865
|
+
vt as UIElementType
|
|
866
|
+
};
|