@useinsider/guido 1.0.3-beta.df46976 → 1.0.3-beta.dfb1fcf
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 +140 -3
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +79 -73
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +23 -22
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -20
- package/dist/composables/useBlocksConfig.js +49 -0
- package/dist/composables/useGuidoActions.js +19 -9
- package/dist/composables/useStripo.js +53 -57
- package/dist/config/compiler/unsubscribeCompilerRules.js +33 -28
- package/dist/config/migrator/index.js +7 -6
- package/dist/config/migrator/recommendationMigrator.js +293 -0
- package/dist/enums/date.js +4 -14
- package/dist/enums/defaults.js +16 -9
- package/dist/enums/onboarding.js +2 -1
- package/dist/enums/unsubscribe.js +27 -25
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/Recommendation/block.js +6 -3
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +193 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +14 -0
- package/dist/extensions/Blocks/Recommendation/control.js +109 -65
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
- package/dist/extensions/Blocks/Recommendation/controls/index.js +272 -0
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/priceHideControl.js +60 -0
- package/dist/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.js +160 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +18 -7
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +159 -21
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +184 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +189 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +209 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/common-control.js +125 -43
- package/dist/extensions/Blocks/controlFactories.js +234 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +25 -19
- package/dist/extensions/DynamicContent/dynamic-content.js +128 -33
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +312 -100
- package/dist/package.json.js +7 -0
- package/dist/services/stripoApi.js +1 -1
- package/dist/{@types → src/@types}/generic.d.ts +41 -6
- package/dist/{components → src/components}/Guido.vue.d.ts +3 -2
- package/dist/src/composables/useBlocksConfig.d.ts +11 -0
- package/dist/{composables → src/composables}/useGuidoActions.d.ts +9 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -0
- package/dist/src/enums/date.d.ts +4 -0
- package/dist/src/enums/onboarding.d.ts +2 -0
- package/dist/{extensions → src/extensions}/Blocks/Recommendation/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +79 -0
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +91 -0
- package/dist/{extensions → src/extensions}/Blocks/Recommendation/control.d.ts +11 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +71 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/priceHideControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.d.ts +50 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +60 -0
- package/dist/{extensions → src/extensions}/Blocks/Recommendation/store/recommendation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +52 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/{extensions → src/extensions}/Blocks/common-control.d.ts +21 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +95 -0
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +13 -0
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +66 -0
- package/dist/{stores → src/stores}/config.d.ts +9 -2
- package/dist/{stores → src/stores}/dynamic-content.d.ts +3 -3
- package/dist/{stores → src/stores}/editor.d.ts +1 -1
- package/dist/{stores → src/stores}/onboarding.d.ts +1 -1
- package/dist/{stores → src/stores}/preview.d.ts +1 -1
- package/dist/{stores → src/stores}/recommendation.d.ts +1 -1
- package/dist/{stores → src/stores}/save-as-template.d.ts +1 -1
- package/dist/{stores → src/stores}/toaster.d.ts +1 -1
- package/dist/{stores → src/stores}/unsubscribe.d.ts +1 -1
- package/dist/{stores → src/stores}/version-history.d.ts +1 -1
- package/dist/src/utils/dateUtil.d.ts +22 -0
- package/dist/src/utils/environmentUtil.d.ts +5 -0
- package/dist/{utils → src/utils}/genericUtil.d.ts +1 -0
- package/dist/static/styles/components/narrow-panel.css.js +10 -0
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +19 -0
- package/dist/stores/config.js +5 -5
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/stores/editor.js +1 -1
- package/dist/stores/onboarding.js +27 -27
- package/dist/stores/preview.js +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/stores/save-as-template.js +2 -2
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.js +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/dateUtil.js +33 -7
- package/dist/utils/environmentUtil.js +4 -0
- package/dist/utils/genericUtil.js +20 -9
- package/package.json +7 -2
- package/dist/enums/date.d.ts +0 -13
- package/dist/enums/onboarding.d.ts +0 -1
- package/dist/extensions/Blocks/Recommendation/template.d.ts +0 -6
- package/dist/extensions/Blocks/Recommendation/template.js +0 -200
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
- package/dist/utils/dateUtil.d.ts +0 -2
- 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 → src/components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/LeftSlot.vue.d.ts +0 -0
- package/dist/{components → 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 → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -0
- package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +0 -0
- package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +1 -1
- /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}/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/index.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/unsubscribeMigrator.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}/extensions/recommendationBlock.d.ts +0 -0
- /package/dist/{enums → src/enums}/html-validator.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/{enums → src/enums}/unsubscribe.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/block.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/iconsRegistry.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/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/block.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/iconsRegistry.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 → src/extensions}/Blocks/Recommendation/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/elements/preview.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/tagRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/utils/constants.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/utils/utils.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/extension.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 → src/mock}/api/recommendation.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/template-library.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/unsubscribe.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/user-modal-state.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/validator.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}/recommendationApi.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/{services → src/services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/base64.d.ts +0 -0
- /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
- /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
"amp-accordion": "ampAccordionEnabled",
|
|
3
|
+
"amp-carousel": "ampCarouselEnabled",
|
|
4
|
+
"amp-form-controls": "ampFormControlsEnabled",
|
|
5
|
+
"banner-block": "bannerEnabled",
|
|
6
|
+
"button-block": "buttonEnabled",
|
|
7
|
+
"html-block": "htmlEnabled",
|
|
8
|
+
"image-block": "imageEnabled",
|
|
9
|
+
"menu-block": "menuEnabled",
|
|
10
|
+
"social-block": "socialNetEnabled",
|
|
11
|
+
"spacer-block": "spacerEnabled",
|
|
12
|
+
"text-block": "textEnabled",
|
|
13
|
+
"timer-block": "timerEnabled",
|
|
14
|
+
"video-block": "videoEnabled"
|
|
15
|
+
}, c = {
|
|
16
|
+
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
17
|
+
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
18
|
+
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
19
|
+
"recommendation-block": () => import("../extensions/Blocks/Recommendation/extension.js"),
|
|
20
|
+
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
21
|
+
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
22
|
+
"items-block": null
|
|
23
|
+
// TODO: Add ItemsBlock extension when available
|
|
24
|
+
}, a = (n) => {
|
|
25
|
+
if (!n || !n.length)
|
|
26
|
+
return {};
|
|
27
|
+
const o = {};
|
|
28
|
+
return n.forEach((e) => {
|
|
29
|
+
const t = l[e];
|
|
30
|
+
t && (o[t] = !1);
|
|
31
|
+
}), o;
|
|
32
|
+
}, r = async (n) => !n || !n.length ? [] : (await Promise.all(
|
|
33
|
+
n.map(async (e) => {
|
|
34
|
+
const t = c[e];
|
|
35
|
+
return t ? (await t()).default : null;
|
|
36
|
+
})
|
|
37
|
+
)).filter((e) => e !== null), s = () => ({
|
|
38
|
+
getStripoBlocksConfig: async () => {
|
|
39
|
+
var e;
|
|
40
|
+
const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
|
|
41
|
+
return {
|
|
42
|
+
baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
|
|
43
|
+
extensions: await r(o == null ? void 0 : o.includeCustoms)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
s as useBlocksConfig
|
|
49
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
|
|
2
|
-
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"),
|
|
3
|
-
o(r, e.onBack), o(n, e.onSaveStart), o(
|
|
2
|
+
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symbol.for("guido.save.complete"), a = Symbol.for("guido.test.email.click"), i = (e) => {
|
|
3
|
+
o(r, e.onBack), o(n, e.onSaveStart), o(c, e.onSaveComplete), o(a, e.onTestEmailClick);
|
|
4
4
|
}, u = () => {
|
|
5
5
|
try {
|
|
6
6
|
return t(r);
|
|
@@ -9,7 +9,7 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symb
|
|
|
9
9
|
"useBack: No back handler provided. Make sure Guido component is in the component tree."
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, l = () => {
|
|
13
13
|
try {
|
|
14
14
|
return t(n);
|
|
15
15
|
} catch {
|
|
@@ -17,21 +17,31 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symb
|
|
|
17
17
|
"useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, d = () => {
|
|
21
21
|
try {
|
|
22
|
-
return t(
|
|
22
|
+
return t(c);
|
|
23
23
|
} catch {
|
|
24
24
|
throw new Error(
|
|
25
25
|
"useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
|
+
}, m = () => {
|
|
29
|
+
try {
|
|
30
|
+
return t(a);
|
|
31
|
+
} catch {
|
|
32
|
+
throw new Error(
|
|
33
|
+
"useTestEmailClick: No test email click handler provided. Make sure Guido component is in the component tree."
|
|
34
|
+
);
|
|
35
|
+
}
|
|
28
36
|
};
|
|
29
37
|
export {
|
|
30
38
|
r as BACK_KEY,
|
|
31
|
-
|
|
39
|
+
c as SAVE_COMPLETE_KEY,
|
|
32
40
|
n as SAVE_START_KEY,
|
|
33
|
-
|
|
41
|
+
a as TEST_EMAIL_CLICK_KEY,
|
|
42
|
+
i as provideGuidoActions,
|
|
34
43
|
u as useBack,
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
d as useSaveComplete,
|
|
45
|
+
l as useSaveStart,
|
|
46
|
+
m as useTestEmailClick
|
|
37
47
|
};
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = V(), { handleEvent: m } = S(), l = (r, i = []) => {
|
|
18
|
-
const t = F(), { html: e, css: a, forceRecreate: g } = r;
|
|
1
|
+
import { useActionsApi as w } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as b } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as k } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as V } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as _ } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as T } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as A } from "../services/stripoApi.js";
|
|
9
|
+
import F from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as M } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
|
|
12
|
+
import v from "../package.json.js";
|
|
13
|
+
const J = (c) => {
|
|
14
|
+
const { config: l } = k(), { handleError: u } = _(), { getToken: f, getCustomFonts: S } = A(), { handleEvent: y } = V(), { getStripoBlocksConfig: C } = b(), E = async (i, r = []) => {
|
|
15
|
+
var m, g;
|
|
16
|
+
const t = M(), { html: n, css: p, forceRecreate: a } = i, { baseBlocks: e, extensions: d } = await C();
|
|
19
17
|
window.UIEditor.initEditor(
|
|
20
18
|
document.querySelector("#guido-editor"),
|
|
21
19
|
{
|
|
22
|
-
metadata:
|
|
23
|
-
html:
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
20
|
+
metadata: c,
|
|
21
|
+
html: n,
|
|
22
|
+
css: p,
|
|
23
|
+
forceRecreate: a,
|
|
26
24
|
locale: "en",
|
|
27
25
|
undoButtonSelector: "#guido__undo-button",
|
|
28
26
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -32,39 +30,44 @@ const G = (s) => {
|
|
|
32
30
|
customAppearanceMergetags: !0,
|
|
33
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
34
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
35
|
-
customViewStyles:
|
|
36
|
-
conditionsEnabled: !0,
|
|
37
|
-
customConditionsEnabled: !0,
|
|
38
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: F,
|
|
34
|
+
conditionsEnabled: ((m = l.features) == null ? void 0 : m.displayConditions) ?? !0,
|
|
35
|
+
customConditionsEnabled: ((g = l.features) == null ? void 0 : g.displayConditions) ?? !0,
|
|
36
|
+
conditionCategories: T,
|
|
39
37
|
enableXSSSecurity: !0,
|
|
40
|
-
messageSettingsEnabled: !
|
|
38
|
+
messageSettingsEnabled: !0,
|
|
39
|
+
displayGmailAnnotations: !0,
|
|
40
|
+
displayHiddenPreheader: !1,
|
|
41
|
+
displayTitle: !1,
|
|
42
|
+
displayUTM: !1,
|
|
41
43
|
selectBlockAfterDropFromSettingsPanel: !0,
|
|
44
|
+
...e ? { baseBlocks: e } : {},
|
|
42
45
|
editorFonts: {
|
|
43
46
|
showDefaultStandardFonts: !0,
|
|
44
47
|
showDefaultNotStandardFonts: !0,
|
|
45
|
-
customFonts:
|
|
48
|
+
customFonts: r
|
|
46
49
|
},
|
|
47
50
|
mergeTags: [
|
|
48
51
|
{
|
|
49
|
-
entries:
|
|
52
|
+
entries: U(c.preselectedDynamicContentList)
|
|
50
53
|
}
|
|
51
54
|
],
|
|
52
55
|
async onTokenRefreshRequest(o) {
|
|
53
56
|
try {
|
|
54
|
-
const
|
|
55
|
-
o(
|
|
56
|
-
} catch (
|
|
57
|
-
|
|
57
|
+
const s = await f();
|
|
58
|
+
o(s);
|
|
59
|
+
} catch (s) {
|
|
60
|
+
u(s, "Failed to refresh token");
|
|
58
61
|
}
|
|
59
62
|
},
|
|
60
63
|
onTemplateLoaded() {
|
|
61
64
|
try {
|
|
62
|
-
const { importCss: o } =
|
|
63
|
-
o(),
|
|
65
|
+
const { importCss: o } = B(), { activateCustomViewStyles: s } = w();
|
|
66
|
+
o(), s(), c.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
64
67
|
t.hasChanges = !1;
|
|
65
68
|
}, 1e3);
|
|
66
69
|
} catch (o) {
|
|
67
|
-
|
|
70
|
+
u(o, "Failed to load custom interface appearance");
|
|
68
71
|
}
|
|
69
72
|
},
|
|
70
73
|
onCodeEditorVisibilityChanged(o) {
|
|
@@ -79,42 +82,35 @@ const G = (s) => {
|
|
|
79
82
|
onDataChanged() {
|
|
80
83
|
t.hasChanges = !0;
|
|
81
84
|
},
|
|
82
|
-
onEvent:
|
|
85
|
+
onEvent: y,
|
|
83
86
|
ignoreClickOutsideSelectors: [
|
|
84
87
|
"#guido-dynamic-content-modal",
|
|
85
88
|
".in-on-board-wrapper",
|
|
86
89
|
".in-drawer__container"
|
|
87
90
|
],
|
|
88
|
-
extensions:
|
|
89
|
-
B,
|
|
90
|
-
h,
|
|
91
|
-
b,
|
|
92
|
-
_,
|
|
93
|
-
k,
|
|
94
|
-
w
|
|
95
|
-
]
|
|
91
|
+
extensions: d
|
|
96
92
|
}
|
|
97
93
|
);
|
|
98
|
-
},
|
|
94
|
+
}, h = (i) => new Promise((r, t) => {
|
|
95
|
+
var d;
|
|
99
96
|
if (document.getElementById("UiEditorScript")) {
|
|
100
|
-
|
|
97
|
+
i(), r();
|
|
101
98
|
return;
|
|
102
99
|
}
|
|
103
|
-
const e = document.createElement("script");
|
|
104
|
-
e.id = "UiEditorScript", e.type = "module", e.src =
|
|
105
|
-
|
|
100
|
+
const n = v.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
|
|
101
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
102
|
+
i(), r();
|
|
106
103
|
}, e.onerror = () => {
|
|
107
|
-
|
|
108
|
-
t(a);
|
|
104
|
+
t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
109
105
|
}, document.body.appendChild(e);
|
|
110
106
|
});
|
|
111
|
-
return { initPlugin: async (
|
|
112
|
-
await
|
|
113
|
-
const
|
|
114
|
-
|
|
107
|
+
return { initPlugin: async (i) => {
|
|
108
|
+
await h(async () => {
|
|
109
|
+
const r = await S();
|
|
110
|
+
await E(i, r);
|
|
115
111
|
});
|
|
116
112
|
} };
|
|
117
113
|
};
|
|
118
114
|
export {
|
|
119
|
-
|
|
115
|
+
J as useStripo
|
|
120
116
|
};
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as l, LINK_TYPES as
|
|
3
|
-
import { parsePageList as
|
|
4
|
-
import { useConfigStore as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { usePartner as N } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as l, LINK_TYPES as g, INSIDER_ID as f, URLS as S } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as U } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as B } from "../../stores/config.js";
|
|
5
|
+
import { useDynamicContentStore as y } from "../../stores/dynamic-content.js";
|
|
6
|
+
import { useUnsubscribeStore as L } from "../../stores/unsubscribe.js";
|
|
7
|
+
const D = [
|
|
7
8
|
{
|
|
8
9
|
id: "add-unsubscribe-link-values",
|
|
9
10
|
description: "Adding unsubscribe link values",
|
|
10
11
|
type: "custom",
|
|
11
12
|
processor: (t) => {
|
|
12
|
-
const { getPartnerName: i } =
|
|
13
|
-
if (!
|
|
13
|
+
const { getPartnerName: i } = N(), c = B(), n = y(), u = L(), a = c.getVariationId;
|
|
14
|
+
if (!a)
|
|
14
15
|
return t;
|
|
15
|
-
let
|
|
16
|
-
const
|
|
17
|
-
return new DOMParser().parseFromString(
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
16
|
+
let e = t;
|
|
17
|
+
const r = `/${i()}/email/${a}?user={{iid}}`;
|
|
18
|
+
return new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]").forEach((p) => {
|
|
19
|
+
var b;
|
|
20
|
+
const m = p.getAttribute("data-unsubscribe-page-list");
|
|
21
|
+
if (!m)
|
|
21
22
|
return;
|
|
22
|
-
const
|
|
23
|
-
(
|
|
24
|
-
)) ?? [],
|
|
23
|
+
const R = U(m), d = ((b = u.templates) == null ? void 0 : b.filter(
|
|
24
|
+
(o) => R.includes(o.id)
|
|
25
|
+
)) ?? [], _ = d.some((o) => o.type === g.UNSUBSCRIBE_LINK_TYPE), I = d.some((o) => o.type === g.PREFERENCES_LINK_TYPE), E = p.outerHTML;
|
|
25
26
|
let s = E;
|
|
26
|
-
|
|
27
|
+
_ && (n.selectedDynamicContentList.push({
|
|
28
|
+
text: f,
|
|
29
|
+
value: f,
|
|
30
|
+
fallback: ""
|
|
31
|
+
}), s = s.replace(
|
|
27
32
|
l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
28
|
-
|
|
29
|
-
)),
|
|
33
|
+
S.UNSUBSCRIBE_URL + r
|
|
34
|
+
)), I && (s = s.replace(
|
|
30
35
|
l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
31
|
-
|
|
32
|
-
)), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""),
|
|
33
|
-
}),
|
|
36
|
+
S.PREFERENCES_URL + r
|
|
37
|
+
)), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), e = e.replace(E, s);
|
|
38
|
+
}), e;
|
|
34
39
|
},
|
|
35
40
|
priority: 60
|
|
36
41
|
},
|
|
@@ -56,16 +61,16 @@ const T = [
|
|
|
56
61
|
type: "custom",
|
|
57
62
|
processor: (t) => {
|
|
58
63
|
let i = t;
|
|
59
|
-
const
|
|
60
|
-
return
|
|
64
|
+
const c = i.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
65
|
+
return c && c.forEach((n) => {
|
|
61
66
|
if (n.includes("insEmail=1"))
|
|
62
67
|
return;
|
|
63
68
|
if (n.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
64
|
-
const
|
|
69
|
+
const a = n.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
|
|
65
70
|
const r = e.slice(6, e.length - 1).trim();
|
|
66
71
|
return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
|
|
67
72
|
});
|
|
68
|
-
i = i.replace(n,
|
|
73
|
+
i = i.replace(n, a);
|
|
69
74
|
}
|
|
70
75
|
}), i;
|
|
71
76
|
},
|
|
@@ -73,5 +78,5 @@ const T = [
|
|
|
73
78
|
}
|
|
74
79
|
];
|
|
75
80
|
export {
|
|
76
|
-
|
|
81
|
+
D as unsubscribeCompilerRules
|
|
77
82
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import { migrateCouponBlock as
|
|
1
|
+
import { migrateCheckbox as m } from "./checkboxMigrator.js";
|
|
2
|
+
import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
|
|
3
3
|
import { migrateRadioButton as i } from "./radioButtonMigrator.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { migrateRecommendation as e } from "./recommendationMigrator.js";
|
|
5
|
+
import { migrateUnsubscribe as a } from "./unsubscribeMigrator.js";
|
|
6
|
+
const s = async (t) => {
|
|
6
7
|
let r = t;
|
|
7
|
-
return r =
|
|
8
|
+
return r = m(r), r = i(r), r = await a(r), r = o(r), r = e(r), r;
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
s as migrate
|
|
11
12
|
};
|