@useinsider/guido 1.0.3-beta.8e64d3b → 1.0.3-beta.8eea45e
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 +3 -144
- package/dist/@types/generic.d.ts +49 -0
- package/dist/{src/components → components}/Guido.vue.d.ts +3 -5
- package/dist/components/Guido.vue.js +9 -11
- package/dist/components/Guido.vue2.js +69 -81
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -19
- package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -9
- package/dist/composables/useGuidoActions.js +9 -19
- package/dist/composables/useStripo.js +54 -58
- package/dist/config/compiler/unsubscribeCompilerRules.js +29 -47
- package/dist/config/migrator/couponBlockMigrator.js +32 -32
- package/dist/config/migrator/index.d.ts +1 -0
- package/dist/config/migrator/index.js +6 -8
- package/dist/enums/defaults.js +9 -20
- package/dist/enums/onboarding.d.ts +1 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.d.ts +15 -0
- package/dist/enums/unsubscribe.js +7 -46
- package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -1
- package/dist/extensions/Blocks/Checkbox/block.js +24 -15
- package/dist/extensions/Blocks/Checkbox/control.js +67 -55
- package/dist/extensions/Blocks/Checkbox/extension.js +16 -5
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -12
- package/dist/extensions/Blocks/Checkbox/template.js +16 -5
- package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -1
- package/dist/extensions/Blocks/CouponBlock/block.js +24 -14
- package/dist/extensions/Blocks/CouponBlock/extension.js +16 -5
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +29 -16
- package/dist/extensions/Blocks/CouponBlock/template.js +3 -1
- package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -1
- package/dist/extensions/Blocks/RadioButton/block.js +22 -13
- package/dist/extensions/Blocks/RadioButton/control.js +52 -40
- package/dist/extensions/Blocks/RadioButton/extension.js +15 -4
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -13
- package/dist/extensions/Blocks/RadioButton/template.js +24 -13
- package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -1
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +44 -125
- package/dist/extensions/DynamicContent/extension.js +18 -6
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +75 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +77 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +123 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +119 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +24 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +24 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +11 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +33 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +40 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +5 -0
- package/dist/services/stripoApi.js +1 -1
- package/dist/static/assets/icons/coupon.svg.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -19
- package/dist/{src/stores → stores}/dynamic-content.d.ts +3 -3
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/{src/stores → stores}/editor.d.ts +1 -22
- package/dist/stores/editor.js +2 -3
- package/dist/{src/stores → stores}/onboarding.d.ts +1 -1
- package/dist/stores/onboarding.js +27 -27
- package/dist/{src/stores → stores}/preview.d.ts +1 -1
- package/dist/stores/preview.js +1 -1
- package/dist/{src/stores → stores}/recommendation.d.ts +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/{src/stores → stores}/save-as-template.d.ts +1 -1
- package/dist/stores/save-as-template.js +2 -2
- package/dist/{src/stores → stores}/toaster.d.ts +1 -1
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.d.ts +8 -0
- package/dist/stores/unsubscribe.js +6 -126
- package/dist/{src/stores → stores}/version-history.d.ts +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/dateUtil.d.ts +1 -0
- package/dist/utils/dateUtil.js +3 -24
- package/dist/{src/utils → utils}/genericUtil.d.ts +0 -2
- package/dist/utils/genericUtil.js +11 -23
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +3 -8
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/config/migrator/recommendationMigrator.js +0 -293
- package/dist/config/migrator/unsubscribeMigrator.js +0 -124
- package/dist/enums/date.js +0 -6
- package/dist/enums/extensions/recommendationBlock.js +0 -80
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +0 -18
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +0 -33
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +0 -14
- package/dist/extensions/Blocks/Recommendation/block.js +0 -30
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/control.js +0 -321
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/extension.js +0 -19
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -162
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
- package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
- package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
- package/dist/extensions/Blocks/common-control.js +0 -184
- package/dist/extensions/Blocks/controlFactories.js +0 -223
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -866
- package/dist/package.json.js +0 -7
- package/dist/services/recommendationApi.js +0 -43
- package/dist/services/unsubscribeApi.js +0 -16
- package/dist/src/@types/generic.d.ts +0 -98
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -4
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -4
- package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
- package/dist/src/composables/useBlocksConfig.d.ts +0 -11
- package/dist/src/config/migrator/index.d.ts +0 -1
- package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
- package/dist/src/enums/date.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
- package/dist/src/enums/onboarding.d.ts +0 -2
- package/dist/src/enums/unsubscribe.d.ts +0 -38
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -11
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -75
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -83
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -64
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +0 -60
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
- package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
- package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -87
- package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -91
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -13
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +0 -66
- package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/src/mock/api/recommendation.d.ts +0 -2
- package/dist/src/services/recommendationApi.d.ts +0 -6
- package/dist/src/services/unsubscribeApi.d.ts +0 -4
- package/dist/src/stores/config.d.ts +0 -104
- package/dist/src/stores/unsubscribe.d.ts +0 -256
- package/dist/src/utils/dateUtil.d.ts +0 -22
- package/dist/src/utils/environmentUtil.d.ts +0 -5
- package/dist/stores/config.js +0 -17
- package/dist/utils/environmentUtil.js +0 -4
- package/dist/{src/@types → @types}/events.d.ts +0 -0
- package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
- package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
- package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
- package/dist/{src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts → components/organisms/onboarding/NewVersionPopup.vue.d.ts} +0 -0
- package/dist/{src/components/organisms/extensions/recommendation/Filters.vue.d.ts → components/organisms/onboarding/OnboardingWrapper.vue.d.ts} +0 -0
- package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
- package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +1 -1
- /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
- /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
- /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
- /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
- /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
- /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
- /package/dist/{src/enums → enums}/preview.d.ts +0 -0
- /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
- /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Recommendation → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Recommendation → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/DynamicContent}/extension.d.ts +0 -0
- /package/dist/{src/library.d.ts → library.d.ts} +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
- /package/dist/{src/mock → mock}/browser.d.ts +0 -0
- /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
- /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
- /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
- /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/base64.d.ts +0 -0
- /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
- /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY } from './templateUtils';
|
|
3
|
-
declare const blockTemplate = "\n <td align=\"left\" class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <BLOCK_TEXT\n class=\"es-p10t es-p10b es-p20l es-p20r\"\n align=\"center\">\n <p path=\"1\" style=\"font-size: 28px; color: #333333;\">\n <strong path=\"1,0\">{-{-TITLE-}-}</strong>\n </p>\n </BLOCK_TEXT>\n </tbody>\n </table>\n </td>\n </tr>\n \n <tr>\n <td class=\"spacer\" style=\"height: 10px;\"></td>\n </tr>\n\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
4
|
-
export declare function getDefaultTemplate(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Generates a custom template with specified products and layout
|
|
7
|
-
* @param products - Array of products to display
|
|
8
|
-
* @param productsPerRow - Number of products per row
|
|
9
|
-
* @param title - Optional title for the block
|
|
10
|
-
* @param composition - Optional array defining order of card elements
|
|
11
|
-
* @returns Complete HTML template
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
14
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
15
|
-
export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefaultProducts, };
|
|
16
|
-
export default blockTemplate;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { DEFAULTS, getDefaultProducts } from './templateUtils';
|
|
3
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
4
|
-
export declare function getMigrationTemplate(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Generates a custom migration template with specified products and layout
|
|
7
|
-
* @param products - Array of products to display
|
|
8
|
-
* @param productsPerRow - Number of products per row
|
|
9
|
-
* @param title - Optional title for the block
|
|
10
|
-
* @param composition - Optional array defining order of card elements
|
|
11
|
-
* @returns Complete HTML template
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateMigrationTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
14
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
15
|
-
export { DEFAULTS, getDefaultProducts };
|
|
16
|
-
export default migrationTemplate;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON } from '../constants';
|
|
3
|
-
export interface ElementRenderer {
|
|
4
|
-
[ATTR_PRODUCT_IMAGE]: (product: RecommendationProduct) => string;
|
|
5
|
-
[ATTR_PRODUCT_NAME]: (product: RecommendationProduct) => string;
|
|
6
|
-
[ATTR_PRODUCT_PRICE]: (product: RecommendationProduct) => string;
|
|
7
|
-
[ATTR_PRODUCT_OLD_PRICE]: (product: RecommendationProduct) => string;
|
|
8
|
-
[ATTR_PRODUCT_OMNIBUS_PRICE]: (product: RecommendationProduct) => string;
|
|
9
|
-
[ATTR_PRODUCT_OMNIBUS_DISCOUNT]: (product: RecommendationProduct) => string;
|
|
10
|
-
[ATTR_PRODUCT_BUTTON]: (product: RecommendationProduct) => string;
|
|
11
|
-
}
|
|
12
|
-
export interface TemplateConfig {
|
|
13
|
-
spacer: string;
|
|
14
|
-
blockTemplate: string;
|
|
15
|
-
productRow: string;
|
|
16
|
-
productCardWrapper: string;
|
|
17
|
-
elementRenderer: ElementRenderer;
|
|
18
|
-
}
|
|
19
|
-
export declare const DEFAULTS: {
|
|
20
|
-
TITLE: string;
|
|
21
|
-
DESCRIPTION: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const spacer = "\n <tr>\n <td class=\"spacer\" style=\"height: 10px;\"></td>\n </tr>\n";
|
|
24
|
-
export declare const productRow = "\n <tr class=\"recommendation-product-row\">\n <td>\n <table width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n {-{-PRODUCTS-}-}\n </table>\n </td>\n </tr>\n";
|
|
25
|
-
export declare const productCardWrapper = "\n <td width=\"{-{-COLUMN_WIDTH-}-}\" style=\"padding: 0 5px;\" valign=\"top\" height=\"100%\">\n <table\n width=\"100%\"\n height=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n class=\"product-card-wrapper\">\n <tr>\n <td\n class=\"product-attribute-cell\"\n valign=\"top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n {-{-PRODUCT_CONTENT-}-}\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
26
|
-
export declare const DEFAULT_CARD_COMPOSITION: string[];
|
|
27
|
-
/**
|
|
28
|
-
* Default visibility settings for card composition elements
|
|
29
|
-
* Omnibus Price and Omnibus Discount are hidden by default
|
|
30
|
-
*/
|
|
31
|
-
export declare const DEFAULT_CARD_VISIBILITY: Record<string, boolean>;
|
|
32
|
-
export declare function getDefaultProducts(): RecommendationProduct[];
|
|
33
|
-
/**
|
|
34
|
-
* Core template generation logic that works with any element renderer
|
|
35
|
-
* @param products - Array of products to display
|
|
36
|
-
* @param productsPerRow - Number of products per row
|
|
37
|
-
* @param elementRenderer - Object with methods to render each product element
|
|
38
|
-
* @param composition - Optional array defining order of card elements
|
|
39
|
-
* @returns HTML string for product rows
|
|
40
|
-
*/
|
|
41
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
42
|
-
/**
|
|
43
|
-
* Generates complete HTML template with dynamic products and layout
|
|
44
|
-
* @param blockTemplate - The base block template string
|
|
45
|
-
* @param products - Array of products to display
|
|
46
|
-
* @param productsPerRow - Number of products per row
|
|
47
|
-
* @param elementRenderer - Element renderer for generating product HTML
|
|
48
|
-
* @param title - Title for the block
|
|
49
|
-
* @param composition - Optional array defining order of card elements
|
|
50
|
-
* @returns Complete HTML template
|
|
51
|
-
*/
|
|
52
|
-
export declare function generateTemplate(blockTemplate: string, products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, title?: string, composition?: string[]): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Filter } from '@@/Types/recommendation';
|
|
2
|
-
/**
|
|
3
|
-
* Generates the complete query with outer group operators
|
|
4
|
-
* @param filters Array of Filter objects
|
|
5
|
-
* @returns Complete query string with outer operators
|
|
6
|
-
*/
|
|
7
|
-
export declare function generateCompleteFilterQuery(filters: Filter[]): string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility for preserving text styling when updating innerHTML
|
|
3
|
-
*/
|
|
4
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
5
|
-
/**
|
|
6
|
-
* Preserves existing style tags when updating text content
|
|
7
|
-
*
|
|
8
|
-
* When users apply text styles (bold, italic, etc.) in Stripo, the editor wraps
|
|
9
|
-
* content in tags like <strong>, <em>, <u>, <s>. This function extracts those
|
|
10
|
-
* style tags from the original HTML and re-applies them to the new text content.
|
|
11
|
-
* @example
|
|
12
|
-
* // Original: <span class="omnibus-text-before"><strong>Lowest price: </strong></span>
|
|
13
|
-
* // After calling preserveTextStyles(element, 'Best price: ')
|
|
14
|
-
* // Result: <strong>Best price: </strong>
|
|
15
|
-
* @param element - The DOM element or ImmutableHtmlNode containing the styled text
|
|
16
|
-
* @param newText - The new text content to insert
|
|
17
|
-
* @returns The new text wrapped in the original style tags
|
|
18
|
-
*/
|
|
19
|
-
export declare function preserveTextStyles(element: ImmutableHtmlNode | Element, newText: string): string;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
3
|
-
export declare const UNSUBSCRIBE_BLOCK_ID = "unsubscribe-block";
|
|
4
|
-
export declare class UnsubscribeBlock extends Block {
|
|
5
|
-
private selectEventListener;
|
|
6
|
-
private cancelEventListener;
|
|
7
|
-
private currentNode?;
|
|
8
|
-
constructor();
|
|
9
|
-
getId(): string;
|
|
10
|
-
getIcon(): string;
|
|
11
|
-
getBlockCompositionType(): BlockCompositionType;
|
|
12
|
-
getName(): string;
|
|
13
|
-
getDescription(): string;
|
|
14
|
-
getTemplate(): string;
|
|
15
|
-
onCreated(node: ImmutableHtmlNode): void;
|
|
16
|
-
onSelect(node: ImmutableHtmlNode): undefined;
|
|
17
|
-
onDelete(node: ImmutableHtmlNode): undefined;
|
|
18
|
-
onDestroy(): void;
|
|
19
|
-
private _setupSelectEventListener;
|
|
20
|
-
private _removeSelectEventListener;
|
|
21
|
-
private _setupCancelEventListener;
|
|
22
|
-
private _removeCancelEventListener;
|
|
23
|
-
private _handleCancel;
|
|
24
|
-
private _removeEventListeners;
|
|
25
|
-
private _updateBlock;
|
|
26
|
-
private _getMergeTag;
|
|
27
|
-
private _openDrawer;
|
|
28
|
-
private _checkExistingBlocks;
|
|
29
|
-
private _loadBlockState;
|
|
30
|
-
private _resetStoreState;
|
|
31
|
-
private _removeBlockTemplatesFromStore;
|
|
32
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { Control } from '@stripoinc/ui-editor-extensions';
|
|
3
|
-
export declare const UNSUBSCRIBE_CONTROL_ID = "ui-elements-unsubscribe";
|
|
4
|
-
export declare class UnsubscribeControl extends Control {
|
|
5
|
-
private currentPreviewIndex;
|
|
6
|
-
private currentNode?;
|
|
7
|
-
private currentPages?;
|
|
8
|
-
private valueChangeHandlers;
|
|
9
|
-
private lastParsedAttribute?;
|
|
10
|
-
getId(): string;
|
|
11
|
-
getTemplate(): string;
|
|
12
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
13
|
-
onRender(): void;
|
|
14
|
-
onDestroy(): void;
|
|
15
|
-
private get totalTemplates();
|
|
16
|
-
private _listenToFormUpdates;
|
|
17
|
-
private _onButtonClick;
|
|
18
|
-
private _onPrevClick;
|
|
19
|
-
private _onNextClick;
|
|
20
|
-
private _updatePreview;
|
|
21
|
-
private _updateCounter;
|
|
22
|
-
private _getPreview;
|
|
23
|
-
private _getButton;
|
|
24
|
-
private _getLabel;
|
|
25
|
-
private _getIconButton;
|
|
26
|
-
private _getPrevButton;
|
|
27
|
-
private _getNextButton;
|
|
28
|
-
private _getCounterText;
|
|
29
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UIElement } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const PREVIEW_UI_ELEMENT_ID = "unsubscribe-preview";
|
|
3
|
-
export declare class PreviewUIElement extends UIElement {
|
|
4
|
-
private imgElement?;
|
|
5
|
-
getId(): string;
|
|
6
|
-
getTemplate(): string;
|
|
7
|
-
onRender(container: HTMLElement): void;
|
|
8
|
-
setValue(value: string): void;
|
|
9
|
-
getValue(): string;
|
|
10
|
-
onDestroy(): void;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration template for legacy unsubscribe blocks.
|
|
3
|
-
* This template is used to identify and migrate older versions of the unsubscribe block
|
|
4
|
-
* that may exist in saved email templates. The migration is detected in the Block's
|
|
5
|
-
* onCreated() lifecycle method via the 'data-migration' attribute check.
|
|
6
|
-
*
|
|
7
|
-
* Note: This template is currently exported but not actively used in the codebase.
|
|
8
|
-
* It serves as a reference for the expected structure of legacy blocks during migration.
|
|
9
|
-
*/
|
|
10
|
-
declare const migrationTemplate = "\n <td\n esd-extension-block-id=\"unsubscribe-block\"\n class=\"esd-block-text unsubscribe-block-v2 esd-block-unsubscribe esd-unsubscribe-block esd-extension-block\"\n >\n {-{-TITLE-}-}\n </td>\n";
|
|
11
|
-
export declare function getDefaultTemplate(): string;
|
|
12
|
-
export default migrationTemplate;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const UNSUBSCRIBE_EVENTS: {
|
|
2
|
-
readonly SELECT: "unsubscribe:select";
|
|
3
|
-
readonly CANCEL: "unsubscribe:cancel";
|
|
4
|
-
};
|
|
5
|
-
export type UnsubscribeEvent = typeof UNSUBSCRIBE_EVENTS[keyof typeof UNSUBSCRIBE_EVENTS];
|
|
6
|
-
export declare const DATA_ATTRIBUTES: {
|
|
7
|
-
readonly PAGE_TYPE: "data-unsubscribe-page-type";
|
|
8
|
-
readonly PAGE_LIST: "data-unsubscribe-page-list";
|
|
9
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parses a comma-separated list of page IDs into an array of numbers.
|
|
3
|
-
* Filters out invalid values (NaN, empty strings, negative numbers).
|
|
4
|
-
* @param pageList - Comma-separated string of page IDs
|
|
5
|
-
* @returns Array of valid page IDs
|
|
6
|
-
*/
|
|
7
|
-
export declare function parsePageList(pageList: string): number[];
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Control, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
interface TextInputProps {
|
|
3
|
-
name: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
interface LabelProps {
|
|
8
|
-
text: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
position?: 'top' | 'left';
|
|
11
|
-
}
|
|
12
|
-
interface IconButtonProps {
|
|
13
|
-
name: string;
|
|
14
|
-
icon: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
interface SelectProps {
|
|
18
|
-
name: string;
|
|
19
|
-
placeholder: string;
|
|
20
|
-
options: {
|
|
21
|
-
text: string;
|
|
22
|
-
value: string;
|
|
23
|
-
}[];
|
|
24
|
-
className?: string;
|
|
25
|
-
}
|
|
26
|
-
interface CounterProps {
|
|
27
|
-
name: string;
|
|
28
|
-
maxValue: number;
|
|
29
|
-
minValue?: number;
|
|
30
|
-
step?: number;
|
|
31
|
-
}
|
|
32
|
-
interface ButtonProps {
|
|
33
|
-
name: string;
|
|
34
|
-
label: string;
|
|
35
|
-
id?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Common control for all blocks which includes common UI Elements.
|
|
39
|
-
* If you need to add a new UI Element, you can add it here.
|
|
40
|
-
*/
|
|
41
|
-
export declare abstract class CommonControl extends Control {
|
|
42
|
-
currentNode?: ImmutableHtmlNode;
|
|
43
|
-
abstract getId(): string;
|
|
44
|
-
abstract getTemplate(): string;
|
|
45
|
-
abstract onRender(): Promise<void> | void;
|
|
46
|
-
getContainer(): ShadowRoot;
|
|
47
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
48
|
-
_GuLabel({ text, name, position }: LabelProps): string;
|
|
49
|
-
_GuToggle(name: string): string;
|
|
50
|
-
_GuSelectItem({ text, value }: {
|
|
51
|
-
text: string;
|
|
52
|
-
value: string;
|
|
53
|
-
}): string;
|
|
54
|
-
_GuSelect({ name, placeholder, options, className }: SelectProps): string;
|
|
55
|
-
_GuTextInput({ name, placeholder, className }: TextInputProps): string;
|
|
56
|
-
_GuCounter({ name, maxValue, minValue, step }: CounterProps): string;
|
|
57
|
-
_GuButton({ name, label, id }: ButtonProps): string;
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* @param param0
|
|
61
|
-
* @returns It returns a button with an icon.
|
|
62
|
-
*/
|
|
63
|
-
_GuIconButton({ name, icon, className }: IconButtonProps): string;
|
|
64
|
-
_GuTwoColumns(children: string[]): string;
|
|
65
|
-
/**
|
|
66
|
-
* Creates an orderable (sortable) list control
|
|
67
|
-
* @param name - The control name for value binding
|
|
68
|
-
* @param items - Array of item keys/values
|
|
69
|
-
* @param itemLabels - Optional array of objects with key and label properties for display
|
|
70
|
-
* @returns HTML string for the orderable control
|
|
71
|
-
*/
|
|
72
|
-
_GuOrderable(name: string, items: {
|
|
73
|
-
key: string;
|
|
74
|
-
label: string;
|
|
75
|
-
content: string;
|
|
76
|
-
}[]): string;
|
|
77
|
-
_GuNestedControl(id: string, content: string): string;
|
|
78
|
-
_GuExpandable(label: string, content: string): string;
|
|
79
|
-
_GuColorPicker(name: string): string;
|
|
80
|
-
_GuFontFamily(name: string, placeholder?: string): string;
|
|
81
|
-
_GuRadioButtons(name: string, buttons: {
|
|
82
|
-
text: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[]): string;
|
|
85
|
-
_GuCheckbox(name: string, caption: string): string;
|
|
86
|
-
}
|
|
87
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reusable Control Factory Functions
|
|
3
|
-
*
|
|
4
|
-
* These factory functions can be used by any extension block to generate
|
|
5
|
-
* controls dynamically, reducing code duplication across the codebase.
|
|
6
|
-
*
|
|
7
|
-
* Note: TypeScript's type inference has limitations with dynamically generated classes.
|
|
8
|
-
* The eslint-disable comment above suppresses warnings that would otherwise require
|
|
9
|
-
* extensive type assertions throughout the file. The generated controls are type-safe
|
|
10
|
-
* at runtime and follow the exact same patterns as manually-written control classes.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Factory function to create text align controls for different block elements
|
|
14
|
-
*/
|
|
15
|
-
export declare function createTextAlignControl(controlId: string, targetBlockId: string, containerSelector: string): any;
|
|
16
|
-
/**
|
|
17
|
-
* Factory function to create text color controls for different block elements
|
|
18
|
-
*/
|
|
19
|
-
export declare function createTextColorControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
20
|
-
/**
|
|
21
|
-
* Factory function to create text size controls for different block elements
|
|
22
|
-
*/
|
|
23
|
-
export declare function createTextSizeControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
24
|
-
/**
|
|
25
|
-
* Factory function to create text style controls for different block elements
|
|
26
|
-
*/
|
|
27
|
-
export declare function createTextStyleControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
28
|
-
/**
|
|
29
|
-
* Factory function to create text font family controls for different block elements
|
|
30
|
-
*/
|
|
31
|
-
export declare function createTextFontFamilyControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
32
|
-
/**
|
|
33
|
-
* Factory function to create text background color controls for different block elements
|
|
34
|
-
*/
|
|
35
|
-
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
36
|
-
/**
|
|
37
|
-
* Factory function to create paddings controls for different block elements
|
|
38
|
-
*/
|
|
39
|
-
export declare function createPaddingsControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
40
|
-
/**
|
|
41
|
-
* Factory function to create button align controls for different block elements
|
|
42
|
-
*/
|
|
43
|
-
export declare function createButtonAlignControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
44
|
-
/**
|
|
45
|
-
* Factory function to create button color controls for different block elements
|
|
46
|
-
*/
|
|
47
|
-
export declare function createButtonColorControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
48
|
-
/**
|
|
49
|
-
* Factory function to create button border controls for different block elements
|
|
50
|
-
*/
|
|
51
|
-
export declare function createButtonBorderControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
52
|
-
/**
|
|
53
|
-
* Factory function to create button border radius controls for different block elements
|
|
54
|
-
*/
|
|
55
|
-
export declare function createButtonBorderRadiusControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
56
|
-
/**
|
|
57
|
-
* Factory function to create button font family controls for different block elements
|
|
58
|
-
*/
|
|
59
|
-
export declare function createButtonFontFamilyControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
60
|
-
/**
|
|
61
|
-
* Factory function to create button margins controls for different block elements
|
|
62
|
-
*/
|
|
63
|
-
export declare function createButtonMarginsControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
64
|
-
/**
|
|
65
|
-
* Factory function to create button paddings controls for different block elements
|
|
66
|
-
*/
|
|
67
|
-
export declare function createButtonPaddingsControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
68
|
-
/**
|
|
69
|
-
* Factory function to create button text controls for different block elements
|
|
70
|
-
*/
|
|
71
|
-
export declare function createButtonTextControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
72
|
-
/**
|
|
73
|
-
* Factory function to create button text size controls for different block elements
|
|
74
|
-
*/
|
|
75
|
-
export declare function createButtonTextSizeControl(controlId: string, targetBlockId: string, containerSelector?: string): any;
|
|
76
|
-
/**
|
|
77
|
-
* Factory function to create button text style and font color controls for different block elements
|
|
78
|
-
*/
|
|
79
|
-
export declare function createButtonTextStyleAndFontColorControl(controlId: string, targetBlockId: string, containerSelector: string): any;
|
|
80
|
-
/**
|
|
81
|
-
* Factory function to create button fit to container controls for different block elements
|
|
82
|
-
*/
|
|
83
|
-
export declare function createButtonFitToContainerControl(controlId: string, targetBlockId: string, containerSelector: string): any;
|
|
84
|
-
/**
|
|
85
|
-
* Factory function to create image size controls for different block elements
|
|
86
|
-
*/
|
|
87
|
-
export declare function createImageSizeControl(controlId: string, targetBlockId: string, containerSelector: string): any;
|
|
88
|
-
/**
|
|
89
|
-
* Factory function to create image margins controls for different block elements
|
|
90
|
-
*/
|
|
91
|
-
export declare function createImageMarginsControl(controlId: string, targetBlockId: string, containerSelector: string): any;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DynamicContent, PositionData } from '@@/Types/generic';
|
|
2
|
-
export declare class ExternalMergeTagsLibrary {
|
|
3
|
-
selectedDynamicContent: DynamicContent | null;
|
|
4
|
-
dataSelectCallback: (data: DynamicContent) => void;
|
|
5
|
-
private closeDynamicContentHandler;
|
|
6
|
-
/**
|
|
7
|
-
* Opens the merge tags library modal
|
|
8
|
-
* @param dynamicContent - Currently selected dynamic content (if any)
|
|
9
|
-
* @param onDataSelectCallback - Callback invoked when user selects a merge tag
|
|
10
|
-
* @param position - Optional position data to place the modal
|
|
11
|
-
*/
|
|
12
|
-
openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void, position?: PositionData): void;
|
|
13
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { MergeTag } from '@@/Types/generic';
|
|
2
|
-
import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
|
|
3
|
-
export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
|
|
4
|
-
registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
|
|
5
|
-
}
|
|
6
|
-
export declare class DynamicContentUiElementExtension extends UIElement {
|
|
7
|
-
private mergeTagsButton;
|
|
8
|
-
private mergeTagsLibrary;
|
|
9
|
-
private clickListener;
|
|
10
|
-
private lastClickedElement;
|
|
11
|
-
private lastClickedFrame;
|
|
12
|
-
private mousedownListener;
|
|
13
|
-
getId(): string;
|
|
14
|
-
onRender(container: HTMLElement): void;
|
|
15
|
-
onDestroy(): void;
|
|
16
|
-
_onClick(): void;
|
|
17
|
-
/**
|
|
18
|
-
* Called when Stripo detects merge tag interactions
|
|
19
|
-
* This is the key method that receives notifications about merge tag clicks
|
|
20
|
-
* @param name - Attribute name (e.g., 'mergeTag')
|
|
21
|
-
* @param value - MergeTag object with label, value, selStart, selEnd, etc.
|
|
22
|
-
*/
|
|
23
|
-
onAttributeUpdated(name: string, value: MergeTag | null | undefined): void;
|
|
24
|
-
openMergeTagLibrary(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Opens the dynamic content library for external apps
|
|
27
|
-
* Dispatches event with dynamic content data and position
|
|
28
|
-
*/
|
|
29
|
-
private _openDynamicContentLibrary;
|
|
30
|
-
/**
|
|
31
|
-
* Gets the button's position on the screen
|
|
32
|
-
* Used to position the modal or anything else near the button
|
|
33
|
-
*/
|
|
34
|
-
private _getButtonPosition;
|
|
35
|
-
/**
|
|
36
|
-
* Sets up coordinate tracking for merge tag clicks in the iframe
|
|
37
|
-
* Workaround from Stripo intercepting click events - tracks mousedown events instead
|
|
38
|
-
*/
|
|
39
|
-
private _setupCoordinateTracking;
|
|
40
|
-
/**
|
|
41
|
-
* Gets the editor iframe element
|
|
42
|
-
*/
|
|
43
|
-
private _getEditorFrame;
|
|
44
|
-
/**
|
|
45
|
-
* Finds merge tag element in the element tree
|
|
46
|
-
*/
|
|
47
|
-
private _findMergeTagElement;
|
|
48
|
-
/**
|
|
49
|
-
* Gets the position of the last clicked element, calculated on-demand
|
|
50
|
-
* This ensures we always use the correct element's position even with rapid clicks
|
|
51
|
-
*/
|
|
52
|
-
private _getLastClickedPosition;
|
|
53
|
-
/**
|
|
54
|
-
* Calculates absolute position of element relative to page
|
|
55
|
-
*/
|
|
56
|
-
private _calculateAbsolutePosition;
|
|
57
|
-
/**
|
|
58
|
-
* Cleans up the coordinate tracking event listener
|
|
59
|
-
*/
|
|
60
|
-
private _cleanupCoordinateTracking;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the HTML template for the "Add Dynamic Content" button
|
|
63
|
-
* This button is placed in the merge tags selector UI
|
|
64
|
-
*/
|
|
65
|
-
getTemplate(): string;
|
|
66
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams } from '@@/Types/recommendation';
|
|
2
|
-
export declare const useRecommendationApi: () => {
|
|
3
|
-
fetchRecommendationCreateData: () => Promise<InitialResponse>;
|
|
4
|
-
fetchRecommendationFilters: () => Promise<FiltersResponse>;
|
|
5
|
-
fetchRecommendationProducts: (strategy: string, params: RecommendationProductsParams) => Promise<RecommendationProduct[]>;
|
|
6
|
-
};
|