@useinsider/guido 1.0.3-beta.40a19f6 → 1.0.3-beta.413aef4
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/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +74 -68
- 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/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/useStripo.js +42 -33
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/couponBlockMigrator.js +32 -32
- package/dist/config/migrator/index.js +7 -6
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/defaults.js +6 -3
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/unsubscribe.js +43 -6
- package/dist/extensions/Blocks/Checkbox/block.js +15 -24
- package/dist/extensions/Blocks/Checkbox/control.js +55 -67
- package/dist/extensions/Blocks/Checkbox/extension.js +5 -16
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +12 -25
- package/dist/extensions/Blocks/Checkbox/template.js +5 -16
- package/dist/extensions/Blocks/CouponBlock/block.js +14 -24
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -16
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +16 -29
- package/dist/extensions/Blocks/CouponBlock/template.js +6 -8
- package/dist/extensions/Blocks/RadioButton/block.js +13 -22
- package/dist/extensions/Blocks/RadioButton/control.js +40 -52
- package/dist/extensions/Blocks/RadioButton/extension.js +4 -15
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +13 -26
- package/dist/extensions/Blocks/RadioButton/template.js +13 -24
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -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 +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -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 +102 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +31 -45
- package/dist/extensions/DynamicContent/extension.js +6 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +659 -0
- package/dist/package.json.js +7 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/{@types → src/@types}/generic.d.ts +13 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +2 -2
- 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/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/config/migrator/index.d.ts +1 -0
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/unsubscribe.d.ts +38 -0
- package/dist/{extensions → src/extensions}/Blocks/Checkbox/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
- package/dist/{extensions → src/extensions}/Blocks/CouponBlock/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/{extensions → src/extensions}/Blocks/RadioButton/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -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/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/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +1 -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/common-control.d.ts +66 -0
- package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/src/mock/api/validator.d.ts +2 -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 +96 -0
- package/dist/{stores → src/stores}/editor.d.ts +21 -0
- package/dist/src/stores/unsubscribe.d.ts +256 -0
- package/dist/{utils → src/utils}/genericUtil.d.ts +1 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/genericUtil.js +8 -7
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +8 -3
- package/dist/config/migrator/index.d.ts +0 -1
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +0 -3
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -75
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -77
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -123
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -119
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -33
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -40
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -5
- package/dist/static/assets/icons/coupon.svg.js +0 -4
- package/dist/stores/unsubscribe.d.ts +0 -8
- /package/dist/{@types → src/@types}/events.d.ts +0 -0
- /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/LeftSlot.vue.d.ts → src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/MiddleSlot.vue.d.ts → src/components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/ViewOptions.vue.d.ts → src/components/organisms/header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/version-history/RestoreButton.vue.d.ts → src/components/organisms/header/MiddleSlot.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/RightSlot.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/version-history → src/components/organisms/header}/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components/organisms/onboarding/AMPOnboarding.vue.d.ts → 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/organisms/onboarding/GenericOnboarding.vue.d.ts → src/components/organisms/header/version-history/ViewOptions.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/NewVersionPopup.vue.d.ts → src/components/organisms/onboarding/AMPOnboarding.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/OnboardingWrapper.vue.d.ts → src/components/organisms/onboarding/GenericOnboarding.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/TextBlockOnboarding.vue.d.ts → src/components/organisms/onboarding/NewVersionPopup.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts → src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts} +0 -0
- /package/dist/{components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts → src/components/organisms/onboarding/TextBlockOnboarding.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}/useHtmlValidator.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHttp.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePartner.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}/useRecommendation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSave.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripo.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripoEventHandler.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/{config → src/config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/couponBlockMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{enums → src/enums}/defaults.d.ts +0 -0
- /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
- /package/dist/{enums → src/enums}/html-validator.d.ts +0 -0
- /package/dist/{enums → src/enums}/onboarding.d.ts +0 -0
- /package/dist/{enums → src/enums}/preview.d.ts +0 -0
- /package/dist/{enums → src/enums}/recommendation.d.ts +0 -0
- /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Recommendation}/extension.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Recommendation}/settingsPanel.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.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/api/unsubscribe.d.ts → src/mock/api/template-library.d.ts} +0 -0
- /package/dist/{mock/api/user-modal-state.d.ts → src/mock/api/unsubscribe.d.ts} +0 -0
- /package/dist/{mock/api/validator.d.ts → src/mock/api/user-modal-state.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}/onboardingApi.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}/dynamic-content.d.ts +0 -0
- /package/dist/{stores → src/stores}/onboarding.d.ts +0 -0
- /package/dist/{stores → src/stores}/preview.d.ts +0 -0
- /package/dist/{stores → src/stores}/recommendation.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}/dateUtil.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
|
@@ -1,9 +1,129 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TYPE_COLLECTIONS as i, PAGE_TYPES as a } from "../enums/unsubscribe.js";
|
|
2
|
+
import { useUnsubscribeApi as r } from "../services/unsubscribeApi.js";
|
|
3
|
+
import { defineStore as d } from "pinia";
|
|
4
|
+
const p = () => ({
|
|
5
|
+
templates: [],
|
|
6
|
+
selectedTemplates: {},
|
|
7
|
+
selectedUnsubscribePages: [],
|
|
8
|
+
selectedCollectionType: a.GLOBAL_UNSUBSCRIBE,
|
|
9
|
+
activeType: a.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
pageSelectionUpdateStatus: !1,
|
|
11
|
+
pageSelectionDrawerStatus: !1,
|
|
12
|
+
typeSelectionDrawerStatus: !1,
|
|
13
|
+
isGlobalUnsubscribeDisabled: !1,
|
|
14
|
+
isSubscriptionPreferencesCenterDisabled: !1
|
|
15
|
+
}), g = d("unsubscribe", {
|
|
16
|
+
state: () => p(),
|
|
17
|
+
getters: {
|
|
18
|
+
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
19
|
+
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
20
|
+
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
21
|
+
getThumbnailByTemplateId: (e) => (t) => {
|
|
22
|
+
var c;
|
|
23
|
+
return ((c = e.templates.find((s) => s.id === t)) == null ? void 0 : c.thumbnail) ?? "";
|
|
24
|
+
},
|
|
25
|
+
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
26
|
+
const c = i[t];
|
|
27
|
+
if (!c)
|
|
28
|
+
return [];
|
|
29
|
+
const s = /* @__PURE__ */ new Map();
|
|
30
|
+
e.templates.forEach((n) => {
|
|
31
|
+
s.set(n.id, n.type);
|
|
32
|
+
});
|
|
33
|
+
const l = new Set(c);
|
|
34
|
+
return e.selectedUnsubscribePages.filter((n) => {
|
|
35
|
+
const o = s.get(n);
|
|
36
|
+
return o !== void 0 && l.has(o);
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
isActiveTypeFirstInCollection: (e) => {
|
|
40
|
+
const t = i[e.selectedCollectionType];
|
|
41
|
+
return e.activeType === t[0];
|
|
42
|
+
},
|
|
43
|
+
isActiveTypeLastInCollection: (e) => {
|
|
44
|
+
const t = i[e.selectedCollectionType];
|
|
45
|
+
return e.activeType === t[t.length - 1];
|
|
46
|
+
},
|
|
47
|
+
hasTemplatesByCollectionType: (e) => {
|
|
48
|
+
const t = {};
|
|
49
|
+
return i[e.selectedCollectionType].forEach((s) => {
|
|
50
|
+
t[s] = e.templates.some((l) => l.type === s);
|
|
51
|
+
}), t;
|
|
52
|
+
},
|
|
53
|
+
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
54
|
+
},
|
|
55
|
+
actions: {
|
|
56
|
+
$reset() {
|
|
57
|
+
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
58
|
+
Object.assign(this, {
|
|
59
|
+
...p(),
|
|
60
|
+
templates: e,
|
|
61
|
+
selectedUnsubscribePages: t
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
async fetchTemplates() {
|
|
65
|
+
if (this.templates.length)
|
|
66
|
+
return;
|
|
67
|
+
const { getUnsubscribePages: e } = r(), t = await e();
|
|
68
|
+
this.templates = t;
|
|
69
|
+
},
|
|
70
|
+
setCollection(e) {
|
|
71
|
+
this.selectedCollectionType = e;
|
|
72
|
+
const t = i[e];
|
|
73
|
+
if (t && t.length > 0) {
|
|
74
|
+
[this.activeType] = t;
|
|
75
|
+
const c = { ...this.selectedTemplates };
|
|
76
|
+
t.forEach((s) => {
|
|
77
|
+
if (!c[s]) {
|
|
78
|
+
const l = this.templates.find((n) => n.type === s);
|
|
79
|
+
l && (c[s] = l.id);
|
|
80
|
+
}
|
|
81
|
+
}), this.selectedTemplates = c;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
setCollectionWithoutAutoSelection(e) {
|
|
85
|
+
this.selectedCollectionType = e;
|
|
86
|
+
const t = i[e];
|
|
87
|
+
t && t.length > 0 && ([this.activeType] = t);
|
|
88
|
+
},
|
|
89
|
+
setSelectedTemplate(e) {
|
|
90
|
+
this.selectedTemplates = {
|
|
91
|
+
...this.selectedTemplates,
|
|
92
|
+
[this.activeType]: e
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
setNextType() {
|
|
96
|
+
const t = this.getSelectedCollection.indexOf(this.activeType) + 1;
|
|
97
|
+
t < this.getSelectedCollection.length && (this.activeType = this.getSelectedCollection[t]);
|
|
98
|
+
},
|
|
99
|
+
setPreviousType() {
|
|
100
|
+
const t = this.getSelectedCollection.indexOf(this.activeType) - 1;
|
|
101
|
+
t >= 0 && (this.activeType = this.getSelectedCollection[t]);
|
|
102
|
+
},
|
|
103
|
+
loadSelectedTemplates(e) {
|
|
104
|
+
const t = new Map(this.templates.map((s) => [s.id, s.type])), c = { ...this.selectedTemplates };
|
|
105
|
+
e.forEach((s) => {
|
|
106
|
+
const l = t.get(s);
|
|
107
|
+
l !== void 0 && (c[l] = s);
|
|
108
|
+
}), this.selectedTemplates = c;
|
|
109
|
+
},
|
|
110
|
+
getSelectedTemplatesByCollection(e) {
|
|
111
|
+
const t = i[e], c = [];
|
|
112
|
+
return t.forEach((s) => {
|
|
113
|
+
this.selectedTemplates[s] && c.push(this.selectedTemplates[s]);
|
|
114
|
+
}), c;
|
|
115
|
+
},
|
|
116
|
+
addUnsubscribePages(e) {
|
|
117
|
+
const t = /* @__PURE__ */ new Set([...this.selectedUnsubscribePages, ...e]);
|
|
118
|
+
this.selectedUnsubscribePages = Array.from(t);
|
|
119
|
+
},
|
|
120
|
+
removeUnsubscribePages(e) {
|
|
121
|
+
this.selectedUnsubscribePages = this.selectedUnsubscribePages.filter(
|
|
122
|
+
(t) => !e.includes(t)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
6
126
|
});
|
|
7
127
|
export {
|
|
8
|
-
|
|
128
|
+
g as useUnsubscribeStore
|
|
9
129
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = (e) => e.map((a) => a.format ? {
|
|
2
2
|
label: `${a.text} | ${a.format.key}=${a.format.value}`,
|
|
3
3
|
value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
|
|
4
4
|
} : {
|
|
5
5
|
label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
|
|
6
6
|
value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
|
|
7
|
-
}),
|
|
8
|
-
var
|
|
9
|
-
return ((
|
|
10
|
-
};
|
|
7
|
+
}), f = () => {
|
|
8
|
+
var e;
|
|
9
|
+
return ((e = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : e.getAttribute("content")) ?? "";
|
|
10
|
+
}, $ = (e = "", a = {}, n = !1) => Object.entries(a).reduce((l, [t, r]) => n && (r === "" || r === null || r === void 0) ? l.replace(`&${t}={${t}}`, "") : l.replace(`{${t}}`, String(r)), e);
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
o as dynamicContentToMergeTags,
|
|
13
|
+
f as getCsrfToken,
|
|
14
|
+
$ as replaceString
|
|
14
15
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useHtmlCompiler as
|
|
1
|
+
import { useActionsApi as S } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useHtmlCompiler as b } from "../composables/useHtmlCompiler.js";
|
|
3
3
|
import { useDynamicContentStore as f } from "../stores/dynamic-content.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { useUnsubscribeStore as C } from "../stores/unsubscribe.js";
|
|
5
|
+
const z = () => {
|
|
6
|
+
const i = f(), t = C(), { getCompiledEmail: o, getTemplateData: s } = S(), { compileHtml: n } = b();
|
|
6
7
|
return {
|
|
7
8
|
prepareTemplateDetails: async () => {
|
|
8
|
-
const { html: a, ampHtml:
|
|
9
|
+
const { html: a, ampHtml: m = "", ampErrors: r = [] } = await o({
|
|
9
10
|
minimize: !0,
|
|
10
11
|
resetDataSavedFlag: !1
|
|
11
|
-
}), { html:
|
|
12
|
+
}), { html: c, css: l, syncModulesIds: p = [] } = await s(), { compiledHtml: u, stats: e, appliedRules: d } = n(a), g = i.getSelectedDynamicContentList;
|
|
12
13
|
return console.debug("HTML Compilation Stats:", {
|
|
13
14
|
originalSize: e.originalSize,
|
|
14
15
|
compiledSize: e.compiledSize,
|
|
@@ -16,25 +17,25 @@ const H = () => {
|
|
|
16
17
|
appliedRules: d,
|
|
17
18
|
executionTime: `${e.executionTime.toFixed(2)}ms`
|
|
18
19
|
}), {
|
|
19
|
-
dynamicContentList:
|
|
20
|
-
compiledHtml:
|
|
21
|
-
rawHtml:
|
|
22
|
-
css:
|
|
23
|
-
ampHtml:
|
|
24
|
-
ampErrors:
|
|
25
|
-
modules:
|
|
20
|
+
dynamicContentList: g,
|
|
21
|
+
compiledHtml: u,
|
|
22
|
+
rawHtml: c,
|
|
23
|
+
css: l,
|
|
24
|
+
ampHtml: m,
|
|
25
|
+
ampErrors: r,
|
|
26
|
+
modules: p,
|
|
26
27
|
recommendation: {
|
|
27
28
|
campaignUrls: {},
|
|
28
29
|
configs: {}
|
|
29
30
|
},
|
|
30
31
|
unsubscribe: {
|
|
31
|
-
status:
|
|
32
|
-
config:
|
|
32
|
+
status: t.unsubscribePagesStatus,
|
|
33
|
+
config: t.selectedUnsubscribePages
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
z as useTemplatePreparation
|
|
40
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.413aef4",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"author": "",
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stripoinc/ui-editor-extensions": "
|
|
35
|
-
"@useinsider/design-system-vue": "0.14.
|
|
34
|
+
"@stripoinc/ui-editor-extensions": "3.0.0",
|
|
35
|
+
"@useinsider/design-system-vue": "0.14.20",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
38
38
|
"pinia": "2.3.1",
|
|
@@ -80,5 +80,10 @@
|
|
|
80
80
|
},
|
|
81
81
|
"msw": {
|
|
82
82
|
"workerDirectory": "public"
|
|
83
|
+
},
|
|
84
|
+
"guido": {
|
|
85
|
+
"stripo": {
|
|
86
|
+
"version": "2.43.0"
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const migrate: (html: string) => string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const LINK_TYPES: {
|
|
2
|
-
UNSUBSCRIBE_LINK_TYPE: number;
|
|
3
|
-
PREFERENCES_LINK_TYPE: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const LINK_REGEXES: {
|
|
6
|
-
UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
7
|
-
DATA_OGSB_BUTTON_CSS_REGEX: string;
|
|
8
|
-
GLOBAL_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
9
|
-
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
10
|
-
};
|
|
11
|
-
export declare const URLS: {
|
|
12
|
-
UNSUBSCRIBE_URL: string;
|
|
13
|
-
PREFERENCES_URL: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const INSIDER_ID = "iid";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td \n class=\"coupon-block ins-coupon-code esd-block-text esd-extension-block\" \n esd-extension-block-id=\"coupon-block\"\n >\n <p class=\"ins-title\" contenteditable=\"false\">{@COUPON_CODE}</p>\n </td>\n";
|
|
2
|
-
export declare function getDefaultTemplate(): string;
|
|
3
|
-
export default migrationTemplate;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
var E = Object.defineProperty;
|
|
2
|
-
var L = (r, e, i) => e in r ? E(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i;
|
|
3
|
-
var t = (r, e, i) => L(r, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
class A {
|
|
5
|
-
constructor(e, i, s = [], n, a = [], l, o = [], g = [], y, h, x, u, b, c, m) {
|
|
6
|
-
t(this, "i18n");
|
|
7
|
-
t(this, "styles");
|
|
8
|
-
t(this, "previewStyles");
|
|
9
|
-
t(this, "uiElements", []);
|
|
10
|
-
t(this, "uiElementTagRegistry");
|
|
11
|
-
t(this, "controls", []);
|
|
12
|
-
t(this, "settingsPanelRegistry");
|
|
13
|
-
t(this, "contextActions", []);
|
|
14
|
-
t(this, "blocks", []);
|
|
15
|
-
t(this, "id");
|
|
16
|
-
t(this, "externalSmartElementsLibrary");
|
|
17
|
-
t(this, "externalImageLibrary");
|
|
18
|
-
t(this, "externalAiAssistant");
|
|
19
|
-
t(this, "externalDisplayConditionsLibrary");
|
|
20
|
-
t(this, "externalVideoLibrary");
|
|
21
|
-
t(this, "blocksPanel");
|
|
22
|
-
this.i18n = e, this.styles = i, this.previewStyles = x, this.uiElements = s, this.uiElementTagRegistry = n, this.controls = a, this.settingsPanelRegistry = l, this.contextActions = o, this.blocks = g, this.externalSmartElementsLibrary = y, this.externalImageLibrary = h, this.externalAiAssistant = u, this.externalDisplayConditionsLibrary = b, this.externalVideoLibrary = c, this.blocksPanel = m, this.id = Math.random().toString(36).substring(2);
|
|
23
|
-
}
|
|
24
|
-
getI18n() {
|
|
25
|
-
return this.i18n;
|
|
26
|
-
}
|
|
27
|
-
getStyles() {
|
|
28
|
-
return this.styles;
|
|
29
|
-
}
|
|
30
|
-
getPreviewStyles() {
|
|
31
|
-
return this.previewStyles;
|
|
32
|
-
}
|
|
33
|
-
getUiElements() {
|
|
34
|
-
return this.uiElements;
|
|
35
|
-
}
|
|
36
|
-
getUiElementTagRegistry() {
|
|
37
|
-
return this.uiElementTagRegistry;
|
|
38
|
-
}
|
|
39
|
-
getControls() {
|
|
40
|
-
return this.controls;
|
|
41
|
-
}
|
|
42
|
-
getSettingsPanelRegistry() {
|
|
43
|
-
return this.settingsPanelRegistry;
|
|
44
|
-
}
|
|
45
|
-
getContextActions() {
|
|
46
|
-
return this.contextActions;
|
|
47
|
-
}
|
|
48
|
-
getBlocks() {
|
|
49
|
-
return this.blocks;
|
|
50
|
-
}
|
|
51
|
-
getId() {
|
|
52
|
-
return this.id;
|
|
53
|
-
}
|
|
54
|
-
getExternalSmartElementsLibrary() {
|
|
55
|
-
return this.externalSmartElementsLibrary;
|
|
56
|
-
}
|
|
57
|
-
getExternalImageLibrary() {
|
|
58
|
-
return this.externalImageLibrary;
|
|
59
|
-
}
|
|
60
|
-
getExternalAiAssistant() {
|
|
61
|
-
return this.externalAiAssistant;
|
|
62
|
-
}
|
|
63
|
-
getExternalDisplayConditionsLibrary() {
|
|
64
|
-
return this.externalDisplayConditionsLibrary;
|
|
65
|
-
}
|
|
66
|
-
getExternalVideoLibrary() {
|
|
67
|
-
return this.externalVideoLibrary;
|
|
68
|
-
}
|
|
69
|
-
getBlocksPanel() {
|
|
70
|
-
return this.blocksPanel;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
A as Extension
|
|
75
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
var r = Object.defineProperty;
|
|
2
|
-
var n = (e, t, s) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
-
var i = (e, t, s) => n(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { Extension as a } from "./Extension.js";
|
|
5
|
-
class o {
|
|
6
|
-
constructor() {
|
|
7
|
-
i(this, "i18n");
|
|
8
|
-
i(this, "styles");
|
|
9
|
-
i(this, "previewStyles");
|
|
10
|
-
i(this, "uiElements", []);
|
|
11
|
-
i(this, "uiElementTagRegistry");
|
|
12
|
-
i(this, "controls", []);
|
|
13
|
-
i(this, "settingsPanelRegistry");
|
|
14
|
-
i(this, "contextActions", []);
|
|
15
|
-
i(this, "blocks", []);
|
|
16
|
-
i(this, "externalSmartElementsLibrary");
|
|
17
|
-
i(this, "externalImageLibrary");
|
|
18
|
-
i(this, "externalAiAssistant");
|
|
19
|
-
i(this, "externalDisplayConditionsLibrary");
|
|
20
|
-
i(this, "externalVideoLibrary");
|
|
21
|
-
i(this, "blocksPanel");
|
|
22
|
-
}
|
|
23
|
-
withLocalization(t) {
|
|
24
|
-
return this.i18n = t, this;
|
|
25
|
-
}
|
|
26
|
-
withStyles(t) {
|
|
27
|
-
return this.styles = t, this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @description defines custom developer styles to use inside the editor document preview
|
|
31
|
-
*/
|
|
32
|
-
withPreviewStyles(t) {
|
|
33
|
-
return this.previewStyles = t, this;
|
|
34
|
-
}
|
|
35
|
-
addContextAction(t) {
|
|
36
|
-
return this.contextActions.push(t), this;
|
|
37
|
-
}
|
|
38
|
-
addUiElement(t) {
|
|
39
|
-
return this.uiElements.push(t), this;
|
|
40
|
-
}
|
|
41
|
-
withUiElementTagRegistry(t) {
|
|
42
|
-
return this.uiElementTagRegistry = t, this;
|
|
43
|
-
}
|
|
44
|
-
addControl(t) {
|
|
45
|
-
return this.controls.push(t), this;
|
|
46
|
-
}
|
|
47
|
-
withSettingsPanelRegistry(t) {
|
|
48
|
-
return this.settingsPanelRegistry = t, this;
|
|
49
|
-
}
|
|
50
|
-
withExternalSmartElementsLibrary(t) {
|
|
51
|
-
return this.externalSmartElementsLibrary = t, this;
|
|
52
|
-
}
|
|
53
|
-
withExternalImageLibrary(t) {
|
|
54
|
-
return this.externalImageLibrary = t, this;
|
|
55
|
-
}
|
|
56
|
-
withExternalAiAssistant(t) {
|
|
57
|
-
return this.externalAiAssistant = t, this;
|
|
58
|
-
}
|
|
59
|
-
withExternalDisplayCondition(t) {
|
|
60
|
-
return this.externalDisplayConditionsLibrary = t, this;
|
|
61
|
-
}
|
|
62
|
-
withExternalVideosLibrary(t) {
|
|
63
|
-
return this.externalVideoLibrary = t, this;
|
|
64
|
-
}
|
|
65
|
-
withBlocksPanel(t) {
|
|
66
|
-
return this.blocksPanel = t, this;
|
|
67
|
-
}
|
|
68
|
-
addBlock(t) {
|
|
69
|
-
return this.blocks.push(t), this;
|
|
70
|
-
}
|
|
71
|
-
build() {
|
|
72
|
-
return new a(this.i18n, this.styles, this.uiElements, this.uiElementTagRegistry, this.controls, this.settingsPanelRegistry, this.contextActions, this.blocks, this.externalSmartElementsLibrary, this.externalImageLibrary, this.previewStyles, this.externalAiAssistant, this.externalDisplayConditionsLibrary, this.externalVideoLibrary, this.blocksPanel);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
o as ExtensionBuilder
|
|
77
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var t = Object.defineProperty;
|
|
2
|
-
var u = (n, e, o) => e in n ? t(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o;
|
|
3
|
-
var r = (n, e, o) => u(n, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
-
import { BlockCompositionType as d } from "../constants/BlockCompositionType.js";
|
|
5
|
-
class s {
|
|
6
|
-
constructor() {
|
|
7
|
-
/** Provides access to editor functionalities specific to this block instance. */
|
|
8
|
-
r(this, "api");
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Determines if the block should be available for use in the editor.
|
|
12
|
-
* Override to provide custom logic based on editor state or configuration.
|
|
13
|
-
* @returns True if the block is enabled, false otherwise. Defaults to true.
|
|
14
|
-
*/
|
|
15
|
-
isEnabled() {
|
|
16
|
-
return !0;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Determines if the block can be saved as a reusable module by the user.
|
|
20
|
-
* @returns True if the block can be saved as a module, false otherwise. Defaults to false.
|
|
21
|
-
*/
|
|
22
|
-
canBeSavedAsModule() {
|
|
23
|
-
return !1;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Specifies the context actions available for this block.
|
|
27
|
-
* If not overridden, the editor might use a default set of actions.
|
|
28
|
-
* Use IDs from {@link ContextActionType} or custom action IDs.
|
|
29
|
-
* @returns An array of context action IDs, or undefined to use defaults (if any).
|
|
30
|
-
*/
|
|
31
|
-
getContextActionsIds() {
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Provides a custom renderer class for this block, allowing for specialized rendering logic.
|
|
35
|
-
* @returns A constructor for a class extending {@link BlockRenderer}, or undefined to use the default renderer.
|
|
36
|
-
*/
|
|
37
|
-
getCustomRenderer() {
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Gets a unique CSS class name specifically for this block type.
|
|
41
|
-
* Used for targeting styles.
|
|
42
|
-
* @returns A unique CSS class name. Defaults to `esd-{blockId}`.
|
|
43
|
-
*/
|
|
44
|
-
getUniqueBlockClassname() {
|
|
45
|
-
return `esd-${this.getId()}`;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Lifecycle hook called when the editor document is initialized.
|
|
49
|
-
* Useful for performing initial setup or modifications on existing block instances in the template.
|
|
50
|
-
* @returns An optional {@link HtmlNodeModifier} to apply changes to the block's HTML structure.
|
|
51
|
-
*/
|
|
52
|
-
onDocumentInit() {
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Lifecycle hook called when an instance of this block is selected in the editor.
|
|
56
|
-
* @param node - The immutable HTML node representing the selected block instance.
|
|
57
|
-
* @returns An optional {@link HtmlNodeModifier} to apply changes upon selection.
|
|
58
|
-
*/
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
60
|
-
onSelect(e) {
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Lifecycle hook called when an instance of this block is copied.
|
|
64
|
-
* @param targetNode - The immutable HTML node where the copy is being inserted relative to.
|
|
65
|
-
* @param sourceNode - The immutable HTML node representing the block instance being copied.
|
|
66
|
-
* @returns An optional {@link HtmlNodeModifier} to apply changes to the copied node.
|
|
67
|
-
*/
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
69
|
-
onCopy(e, o) {
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Lifecycle hook called when an instance of this block is deleted.
|
|
73
|
-
* @param node - The immutable HTML node representing the block instance being deleted.
|
|
74
|
-
* @returns An optional {@link HtmlNodeModifier} to apply changes before deletion (rarely needed).
|
|
75
|
-
*/
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
77
|
-
onDelete(e) {
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Lifecycle hook called after a new instance of this block is created and added to the document (e.g., via drag-and-drop).
|
|
81
|
-
* @param node - The immutable HTML node representing the newly created block instance.
|
|
82
|
-
*/
|
|
83
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
84
|
-
onCreated(e) {
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Lifecycle hook called when any part of the document template has changed.
|
|
88
|
-
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
89
|
-
*/
|
|
90
|
-
onDocumentChanged() {
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @description Determines if block is atomic or composite.
|
|
94
|
-
* {@link BlockCompositionType.BLOCK} - atomic block which can be inserted inside other container and cannot hold other objects
|
|
95
|
-
* {@link BlockCompositionType.STRUCTURE} - composite block which can serve as a container for another atomic block
|
|
96
|
-
* @returns The type of the block. Defaults to {@link BlockCompositionType.BLOCK}.
|
|
97
|
-
*/
|
|
98
|
-
getBlockCompositionType() {
|
|
99
|
-
return d.BLOCK;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @description Determines if block should be included in empty container quick insert actions list.
|
|
103
|
-
* @returns True to show a quick-add icon for this block in empty containers, false otherwise. Defaults to false.
|
|
104
|
-
*/
|
|
105
|
-
shouldDisplayQuickAddIcon() {
|
|
106
|
-
return !1;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @description Determines if nested blocks selection allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
110
|
-
*/
|
|
111
|
-
allowInnerBlocksSelection() {
|
|
112
|
-
return !0;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @description Determines if nested blocks drag and drop allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
116
|
-
*/
|
|
117
|
-
allowInnerBlocksDND() {
|
|
118
|
-
return !0;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export {
|
|
122
|
-
s as Block
|
|
123
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var d;
|
|
2
|
-
(function(s) {
|
|
3
|
-
s.BUTTON = "esd-block-button", s.TEXT = "esd-block-text", s.IMAGE = "esd-block-image", s.STRUCTURE = "esd-structure", s.VIDEO = "esd-block-video", s.SOCIAL = "esd-block-social", s.BANNER = "esd-block-banner", s.TIMER = "esd-block-timer", s.MENU = "esd-block-menu", s.HTML = "esd-block-html", s.SPACER = "esd-block-spacer", s.CONTAINER = "esd-container-frame";
|
|
4
|
-
})(d || (d = {}));
|
|
5
|
-
var b;
|
|
6
|
-
(function(s) {
|
|
7
|
-
s.BUTTON = ".esd-block-button", s.TEXT = ".esd-block-text", s.IMAGE = ".esd-block-image", s.STRUCTURE = ".esd-structure", s.VIDEO = ".esd-block-video", s.SOCIAL = ".esd-block-social", s.BANNER = ".esd-block-banner", s.TIMER = ".esd-block-timer", s.MENU = ".esd-block-menu", s.HTML = ".esd-block-html", s.SPACER = ".esd-block-spacer", s.CONTAINER = ".esd-container-frame", s.STRIPE = ".esd-stripe", s.FORM = ".esd-amp-form";
|
|
8
|
-
})(b || (b = {}));
|
|
9
|
-
export {
|
|
10
|
-
d as BlockName,
|
|
11
|
-
b as BlockSelector
|
|
12
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var C;
|
|
2
|
-
(function(O) {
|
|
3
|
-
O.BLOCK_IMAGE = "BLOCK_IMAGE", O.BLOCK_TEXT = "BLOCK_TEXT", O.BLOCK_BUTTON = "BLOCK_BUTTON", O.BLOCK_SPACER = "BLOCK_SPACER", O.BLOCK_VIDEO = "BLOCK_VIDEO", O.BLOCK_SOCIAL = "BLOCK_SOCIAL", O.BLOCK_BANNER = "BLOCK_BANNER", O.BLOCK_TIMER = "BLOCK_TIMER", O.BLOCK_MENU = "BLOCK_MENU", O.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", O.BLOCK_HTML = "BLOCK_HTML", O.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", O.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", O.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", O.CONTAINER = "CONTAINER", O.FORM_CONTAINER = "FORM_CONTAINER", O.STRUCTURE = "STRUCTURE", O.STRIPE = "STRIPE", O.EMPTY_CONTAINER = "EMPTY_CONTAINER", O.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", O.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", O.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT";
|
|
4
|
-
})(C || (C = {}));
|
|
5
|
-
export {
|
|
6
|
-
C as BlockType
|
|
7
|
-
};
|