@useinsider/guido 1.0.3-beta.637a0f4 → 1.0.3-beta.63e6005
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/{src/@types → @types}/generic.d.ts +1 -2
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +60 -61
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +13 -12
- package/dist/composables/useStripo.js +32 -35
- package/dist/config/compiler/unsubscribeCompilerRules.js +26 -39
- package/dist/config/migrator/index.js +6 -7
- package/dist/config/migrator/unsubscribeMigrator.js +49 -61
- package/dist/{src/enums → enums}/unsubscribe.d.ts +0 -4
- package/dist/enums/unsubscribe.js +11 -15
- 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/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 +18 -7
- package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/block.d.ts +0 -1
- package/dist/extensions/Blocks/Unsubscribe/block.js +41 -28
- package/dist/extensions/Blocks/Unsubscribe/control.js +56 -43
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +24 -12
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -10
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +24 -27
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +18 -6
- package/dist/extensions/Blocks/Unsubscribe/template.js +20 -9
- package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -1
- package/dist/extensions/DynamicContent/dynamic-content.js +45 -31
- 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 +25 -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/{src/stores → stores}/unsubscribe.d.ts +2 -72
- package/dist/stores/unsubscribe.js +42 -43
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +2 -7
- package/dist/config/migrator/couponBlockMigrator.js +0 -67
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +0 -18
- package/dist/extensions/Blocks/CouponBlock/block.js +0 -33
- package/dist/extensions/Blocks/CouponBlock/extension.js +0 -8
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +0 -33
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +0 -24
- package/dist/extensions/Blocks/CouponBlock/template.js +0 -18
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +0 -14
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -648
- package/dist/package.json.js +0 -7
- package/dist/src/config/migrator/couponBlockMigrator.d.ts +0 -1
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +0 -12
- package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/CouponBlock/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +0 -3
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -96
- package/dist/stores/config.js +0 -17
- /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}/Guido.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 → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
- /package/dist/{src/components → 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}/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -0
- /package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +0 -0
- /package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +0 -0
- /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}/useGuidoActions.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/index.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/unsubscribeMigrator.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}/onboarding.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/RadioButton/control.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/CouponBlock → 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/Unsubscribe/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/elements/preview.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/RadioButton → extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/tagRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/constants.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/utils.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/_Boilerplate → 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/services → services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
- /package/dist/{src/stores → stores}/editor.d.ts +0 -0
- /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
- /package/dist/{src/stores → stores}/preview.d.ts +0 -0
- /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
- /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
- /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
- /package/dist/{src/stores → stores}/version-history.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}/dateUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/genericUtil.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
|
@@ -23,9 +23,8 @@ export type GuidoConfig = {
|
|
|
23
23
|
features?: Features;
|
|
24
24
|
};
|
|
25
25
|
export type TemplateConfig = {
|
|
26
|
-
preselectedDynamicContentList
|
|
26
|
+
preselectedDynamicContentList: DynamicContent[];
|
|
27
27
|
selectedUnsubscribePages?: number[];
|
|
28
|
-
variationId?: string;
|
|
29
28
|
};
|
|
30
29
|
export type DynamicContent = {
|
|
31
30
|
value: string;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { migrate as
|
|
6
|
-
import { DefaultUsername as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useStripoApi as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
const Ee = /* @__PURE__ */ x({
|
|
1
|
+
import { defineComponent as R, defineAsyncComponent as G, ref as x, computed as U, watch as F, onMounted as M, onUnmounted as z } from "vue";
|
|
2
|
+
import { provideGuidoActions as B } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as K } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as O } from "../composables/useStripo.js";
|
|
5
|
+
import { migrate as I } from "../config/migrator/index.js";
|
|
6
|
+
import { DefaultUsername as j, DefaultMessageType as q, DefaultGuidoConfig as J } from "../enums/defaults.js";
|
|
7
|
+
import Q from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import V from "./organisms/header/HeaderWrapper.vue.js";
|
|
9
|
+
import X from "./organisms/LoadingWrapper.vue.js";
|
|
10
|
+
import Y from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
11
|
+
import Z from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
12
|
+
import { useStripoApi as $ } from "../services/stripoApi.js";
|
|
13
|
+
import { useDynamicContentStore as ee } from "../stores/dynamic-content.js";
|
|
14
|
+
import { useEditorStore as oe } from "../stores/editor.js";
|
|
15
|
+
import { usePreviewStore as te } from "../stores/preview.js";
|
|
16
|
+
import { useUnsubscribeStore as ne } from "../stores/unsubscribe.js";
|
|
17
|
+
import re from "../node_modules/lodash-es/merge.js";
|
|
18
|
+
const Se = /* @__PURE__ */ R({
|
|
20
19
|
__name: "Guido",
|
|
21
20
|
props: {
|
|
22
21
|
templateId: null,
|
|
@@ -31,97 +30,97 @@ const Ee = /* @__PURE__ */ x({
|
|
|
31
30
|
templateConfig: null
|
|
32
31
|
},
|
|
33
32
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
|
|
34
|
-
setup(
|
|
35
|
-
const d =
|
|
33
|
+
setup(W, { expose: _, emit: o }) {
|
|
34
|
+
const d = W, L = G(
|
|
36
35
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
37
|
-
),
|
|
36
|
+
), k = G(
|
|
38
37
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
|
-
), m =
|
|
38
|
+
), m = x(), s = ee(), u = ne(), l = oe(), A = te(), n = U(() => l.hasChanges), { getPartnerName: p, getProductType: g, isTestPartner: N } = K(), f = () => {
|
|
40
39
|
var e;
|
|
41
40
|
return (e = m.value) == null ? void 0 : e.handleSave(!0);
|
|
42
41
|
}, {
|
|
43
|
-
templateId:
|
|
44
|
-
userId:
|
|
45
|
-
guidoConfig:
|
|
46
|
-
templateConfig:
|
|
42
|
+
templateId: y,
|
|
43
|
+
userId: v,
|
|
44
|
+
guidoConfig: b,
|
|
45
|
+
templateConfig: t,
|
|
47
46
|
html: r = "",
|
|
48
47
|
css: h = "",
|
|
49
|
-
partnerName: a =
|
|
50
|
-
productType: i =
|
|
51
|
-
messageType:
|
|
52
|
-
username: w =
|
|
53
|
-
} = d, c = (
|
|
54
|
-
window.GuidoConfig =
|
|
48
|
+
partnerName: a = p(),
|
|
49
|
+
productType: i = g(),
|
|
50
|
+
messageType: C = q,
|
|
51
|
+
username: w = j
|
|
52
|
+
} = d, c = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
|
|
53
|
+
window.GuidoConfig = re(J, b), window.GuidoConfig.partner = {
|
|
55
54
|
partnerName: a,
|
|
56
55
|
productType: i,
|
|
57
|
-
messageType:
|
|
58
|
-
}
|
|
59
|
-
const { initPlugin:
|
|
60
|
-
emailId:
|
|
61
|
-
userId:
|
|
56
|
+
messageType: C
|
|
57
|
+
};
|
|
58
|
+
const { initPlugin: S } = O({
|
|
59
|
+
emailId: y,
|
|
60
|
+
userId: v,
|
|
62
61
|
username: w,
|
|
63
62
|
partnerName: a,
|
|
64
63
|
productType: i,
|
|
65
64
|
preselectedDynamicContentList: c,
|
|
66
65
|
onReady: () => {
|
|
67
|
-
console.debug("guido:ready"),
|
|
66
|
+
console.debug("guido:ready"), o("ready");
|
|
68
67
|
}
|
|
69
|
-
}), { getDefaultTemplate:
|
|
68
|
+
}), { getDefaultTemplate: D } = $(), H = U(() => {
|
|
70
69
|
var e;
|
|
71
70
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
72
71
|
});
|
|
73
|
-
|
|
72
|
+
B({
|
|
74
73
|
onBack: () => {
|
|
75
|
-
console.debug("guido:back"),
|
|
74
|
+
console.debug("guido:back"), o("back");
|
|
76
75
|
},
|
|
77
76
|
onSaveStart: () => {
|
|
78
|
-
console.debug("guido:save:start"),
|
|
77
|
+
console.debug("guido:save:start"), o("save:start");
|
|
79
78
|
},
|
|
80
79
|
onSaveComplete: (e) => {
|
|
81
|
-
console.debug("guido:save:complete", e),
|
|
80
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
82
81
|
}
|
|
83
82
|
});
|
|
84
|
-
const
|
|
83
|
+
const T = (e) => {
|
|
85
84
|
console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
86
|
-
},
|
|
85
|
+
}, E = () => {
|
|
87
86
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
88
87
|
};
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
}),
|
|
88
|
+
return F(() => n.value, () => {
|
|
89
|
+
o("on-change", n.value);
|
|
90
|
+
}), M(async () => {
|
|
92
91
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
93
92
|
try {
|
|
94
|
-
u.selectedUnsubscribePages = (
|
|
93
|
+
u.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
|
|
95
94
|
let e = {
|
|
96
|
-
html: r && await
|
|
95
|
+
html: r && await I(r),
|
|
97
96
|
css: h,
|
|
98
97
|
forceRecreate: !0
|
|
99
98
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
100
99
|
};
|
|
101
|
-
e.html || (e = await
|
|
100
|
+
e.html || (e = await D(), e.html = await I(e.html)), await S(e), s.selectedDynamicContentList = c;
|
|
102
101
|
} catch (e) {
|
|
103
102
|
console.error("Failed to initialize Stripo editor:", e);
|
|
104
103
|
}
|
|
105
104
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
106
|
-
const
|
|
107
|
-
console.debug("dynamic-content:open",
|
|
105
|
+
const P = e;
|
|
106
|
+
console.debug("dynamic-content:open", P.detail), o("dynamic-content:open", P.detail);
|
|
108
107
|
});
|
|
109
|
-
}),
|
|
108
|
+
}), z(() => {
|
|
110
109
|
try {
|
|
111
110
|
window.UIEditor.removeEditor();
|
|
112
111
|
} catch {
|
|
113
112
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
114
113
|
}
|
|
115
|
-
}),
|
|
114
|
+
}), _({
|
|
116
115
|
dynamicContent: {
|
|
117
|
-
insert:
|
|
118
|
-
close:
|
|
116
|
+
insert: T,
|
|
117
|
+
close: E
|
|
119
118
|
},
|
|
120
119
|
hasChanges: n,
|
|
121
|
-
saveSilent:
|
|
122
|
-
}), { __sfc: !0, PreviewContainer:
|
|
120
|
+
saveSilent: f
|
|
121
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: k, headerWrapperRef: m, dynamicContentStore: s, unsubscribeStore: u, props: d, editorStore: l, previewStore: A, hasChanges: n, getPartnerName: p, getProductType: g, isTestPartner: N, saveSilent: f, templateId: y, userId: v, guidoConfig: b, templateConfig: t, html: r, css: h, partnerName: a, productType: i, messageType: C, username: w, preselectedDynamicContentList: c, emit: o, initPlugin: S, getDefaultTemplate: D, noHeader: H, insertDynamicContent: T, closeDynamicContent: E, Toaster: Q, HeaderWrapper: V, LoadingWrapper: X, SaveAsTemplateDrawer: Y, UnsubscribeWrapper: Z };
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
124
|
export {
|
|
126
|
-
|
|
125
|
+
Se as default
|
|
127
126
|
};
|
|
@@ -9,7 +9,7 @@ import { InSegments as I } from "@useinsider/design-system-vue";
|
|
|
9
9
|
const z = /* @__PURE__ */ h({
|
|
10
10
|
__name: "UnsubscribeTypeSelection",
|
|
11
11
|
setup(G) {
|
|
12
|
-
const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0),
|
|
12
|
+
const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0), r = b(l.GLOBAL_UNSUBSCRIBE), S = e(
|
|
13
13
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
14
14
|
{ action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
15
15
|
), T = m(() => [
|
|
@@ -19,7 +19,6 @@ const z = /* @__PURE__ */ h({
|
|
|
19
19
|
text: e("unsubscription-preference.type-global-unsubscribe"),
|
|
20
20
|
value: l.GLOBAL_UNSUBSCRIBE,
|
|
21
21
|
disable: t.isGlobalUnsubscribeDisabled,
|
|
22
|
-
position: "bottom",
|
|
23
22
|
tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
|
|
24
23
|
},
|
|
25
24
|
{
|
|
@@ -55,20 +54,20 @@ const z = /* @__PURE__ */ h({
|
|
|
55
54
|
s();
|
|
56
55
|
}, 500);
|
|
57
56
|
}, E = (s) => {
|
|
58
|
-
|
|
57
|
+
r.value = s;
|
|
59
58
|
}, g = () => {
|
|
60
|
-
const s = t.hasTemplatesByCollectionType,
|
|
59
|
+
const s = t.hasTemplatesByCollectionType, o = [];
|
|
61
60
|
if (Object.entries(s).forEach(([c, p]) => {
|
|
62
|
-
p ||
|
|
63
|
-
}),
|
|
61
|
+
p || o.push(Number(c));
|
|
62
|
+
}), o.length === 0)
|
|
64
63
|
return !0;
|
|
65
|
-
const a =
|
|
64
|
+
const a = o.map((c) => R[c]);
|
|
66
65
|
let u = "";
|
|
67
|
-
if (
|
|
66
|
+
if (o.length === 1)
|
|
68
67
|
u = e("unsubscription-preference.create-page-to-continue", {
|
|
69
68
|
page: a[0]
|
|
70
69
|
});
|
|
71
|
-
else if (
|
|
70
|
+
else if (o.length === 2)
|
|
72
71
|
u = e("unsubscription-preference.create-pages-to-continue", {
|
|
73
72
|
page1: a[0],
|
|
74
73
|
page2: a[1]
|
|
@@ -91,15 +90,17 @@ const z = /* @__PURE__ */ h({
|
|
|
91
90
|
}
|
|
92
91
|
}), !1;
|
|
93
92
|
}, C = async () => {
|
|
94
|
-
if (n.value = !0, await t.fetchTemplates(), t.setCollection(
|
|
93
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(r.value), !g()) {
|
|
95
94
|
n.value = !1, d();
|
|
96
95
|
return;
|
|
97
96
|
}
|
|
98
97
|
n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
|
|
99
98
|
};
|
|
100
99
|
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
101
|
-
s && (i.value = !0,
|
|
102
|
-
|
|
100
|
+
s && (i.value = !0, r.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (r.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), setTimeout(() => {
|
|
101
|
+
i.value = !1;
|
|
102
|
+
}, 1e3));
|
|
103
|
+
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: r, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
export {
|
|
@@ -4,25 +4,23 @@ import { useStripoEventHandler as E } from "./useStripoEventHandler.js";
|
|
|
4
4
|
import { useToaster as C } from "./useToaster.js";
|
|
5
5
|
import { displayConditions as y } from "../enums/displayConditions.js";
|
|
6
6
|
import h from "../extensions/Blocks/Checkbox/extension.js";
|
|
7
|
-
import w from "../extensions/Blocks/
|
|
8
|
-
import b from "../extensions/Blocks/
|
|
9
|
-
import V from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
7
|
+
import w from "../extensions/Blocks/RadioButton/extension.js";
|
|
8
|
+
import b from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
10
9
|
import _ from "../extensions/DynamicContent/extension.js";
|
|
11
10
|
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
12
11
|
import B from "../static/styles/customEditorStyle.css.js";
|
|
13
|
-
import { useEditorStore as
|
|
14
|
-
import { dynamicContentToMergeTags as
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const t = F(), { html: n, css: c, forceRecreate: s } = r;
|
|
12
|
+
import { useEditorStore as V } from "../stores/editor.js";
|
|
13
|
+
import { dynamicContentToMergeTags as F } from "../utils/genericUtil.js";
|
|
14
|
+
const j = (s) => {
|
|
15
|
+
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = k(), { handleEvent: l } = E(), m = (r, i = []) => {
|
|
16
|
+
const t = V(), { html: e, css: a, forceRecreate: g } = r;
|
|
19
17
|
window.UIEditor.initEditor(
|
|
20
18
|
document.querySelector("#guido-editor"),
|
|
21
19
|
{
|
|
22
|
-
metadata:
|
|
23
|
-
html:
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
20
|
+
metadata: s,
|
|
21
|
+
html: e,
|
|
22
|
+
css: a,
|
|
23
|
+
forceRecreate: g,
|
|
26
24
|
locale: "en",
|
|
27
25
|
undoButtonSelector: "#guido__undo-button",
|
|
28
26
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -46,21 +44,21 @@ const N = (a) => {
|
|
|
46
44
|
},
|
|
47
45
|
mergeTags: [
|
|
48
46
|
{
|
|
49
|
-
entries:
|
|
47
|
+
entries: F(s.preselectedDynamicContentList)
|
|
50
48
|
}
|
|
51
49
|
],
|
|
52
50
|
async onTokenRefreshRequest(o) {
|
|
53
51
|
try {
|
|
54
|
-
const
|
|
55
|
-
o(
|
|
56
|
-
} catch (
|
|
57
|
-
d(
|
|
52
|
+
const n = await c();
|
|
53
|
+
o(n);
|
|
54
|
+
} catch (n) {
|
|
55
|
+
d(n, "Failed to refresh token");
|
|
58
56
|
}
|
|
59
57
|
},
|
|
60
58
|
onTemplateLoaded() {
|
|
61
59
|
try {
|
|
62
|
-
const { importCss: o } = S(), { activateCustomViewStyles:
|
|
63
|
-
o(),
|
|
60
|
+
const { importCss: o } = S(), { activateCustomViewStyles: n } = f();
|
|
61
|
+
o(), n(), s.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
64
62
|
t.hasChanges = !1;
|
|
65
63
|
}, 1e3);
|
|
66
64
|
} catch (o) {
|
|
@@ -79,7 +77,7 @@ const N = (a) => {
|
|
|
79
77
|
onDataChanged() {
|
|
80
78
|
t.hasChanges = !0;
|
|
81
79
|
},
|
|
82
|
-
onEvent:
|
|
80
|
+
onEvent: l,
|
|
83
81
|
ignoreClickOutsideSelectors: [
|
|
84
82
|
"#guido-dynamic-content-modal",
|
|
85
83
|
".in-on-board-wrapper",
|
|
@@ -88,32 +86,31 @@ const N = (a) => {
|
|
|
88
86
|
extensions: [
|
|
89
87
|
_,
|
|
90
88
|
h,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
w
|
|
89
|
+
w,
|
|
90
|
+
b
|
|
94
91
|
]
|
|
95
92
|
}
|
|
96
93
|
);
|
|
97
|
-
},
|
|
98
|
-
var e;
|
|
94
|
+
}, p = (r) => new Promise((i, t) => {
|
|
99
95
|
if (document.getElementById("UiEditorScript")) {
|
|
100
96
|
r(), i();
|
|
101
97
|
return;
|
|
102
98
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
99
|
+
const e = document.createElement("script");
|
|
100
|
+
e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
|
|
105
101
|
r(), i();
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
}, e.onerror = () => {
|
|
103
|
+
const a = new Error("Failed to load Stripo UIEditor script");
|
|
104
|
+
t(a);
|
|
105
|
+
}, document.body.appendChild(e);
|
|
109
106
|
});
|
|
110
107
|
return { initPlugin: async (r) => {
|
|
111
|
-
await
|
|
112
|
-
const i = await
|
|
113
|
-
|
|
108
|
+
await p(async () => {
|
|
109
|
+
const i = await u();
|
|
110
|
+
m(r, i);
|
|
114
111
|
});
|
|
115
112
|
} };
|
|
116
113
|
};
|
|
117
114
|
export {
|
|
118
|
-
|
|
115
|
+
j as useStripo
|
|
119
116
|
};
|
|
@@ -1,36 +1,23 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as l, LINK_TYPES as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { useUnsubscribeStore as I } from "../../stores/unsubscribe.js";
|
|
6
|
-
const T = [
|
|
1
|
+
import { usePartner as m } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as l, LINK_TYPES as p, URLS as d } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { useUnsubscribeStore as b } from "../../stores/unsubscribe.js";
|
|
4
|
+
const S = [
|
|
7
5
|
{
|
|
8
6
|
id: "add-unsubscribe-link-values",
|
|
9
7
|
description: "Adding unsubscribe link values",
|
|
10
8
|
type: "custom",
|
|
11
9
|
processor: (t) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(c) => S.includes(c.id)
|
|
24
|
-
)) ?? [], R = m.some((c) => c.type === b.UNSUBSCRIBE_LINK_TYPE), _ = m.some((c) => c.type === b.PREFERENCES_LINK_TYPE), E = p.outerHTML;
|
|
25
|
-
let s = E;
|
|
26
|
-
R && (s = s.replace(
|
|
27
|
-
l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
28
|
-
f.UNSUBSCRIBE_URL + e
|
|
29
|
-
)), _ && (s = s.replace(
|
|
30
|
-
l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
31
|
-
f.PREFERENCES_URL + e
|
|
32
|
-
)), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), o = o.replace(E, s);
|
|
33
|
-
}), o;
|
|
10
|
+
var a, u;
|
|
11
|
+
const { getPartnerName: n } = m(), i = b();
|
|
12
|
+
let e = t;
|
|
13
|
+
const c = `/${n()}/email/0?user={{iid}}`, r = (a = i.templates) == null ? void 0 : a.find((o) => i.selectedUnsubscribePages.includes(o.id) && o.type === p.UNSUBSCRIBE_LINK_TYPE), s = (u = i.templates) == null ? void 0 : u.find((o) => i.selectedUnsubscribePages.includes(o.id) && o.type === p.PREFERENCES_LINK_TYPE);
|
|
14
|
+
return r && (e = e.replace(
|
|
15
|
+
l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
16
|
+
d.UNSUBSCRIBE_URL + c
|
|
17
|
+
)), s && (e = e.replace(
|
|
18
|
+
l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
19
|
+
d.PREFERENCES_URL + c
|
|
20
|
+
)), e.replace(l.UNSUBSCRIBE_LINK_REGEX, "");
|
|
34
21
|
},
|
|
35
22
|
priority: 60
|
|
36
23
|
},
|
|
@@ -55,23 +42,23 @@ const T = [
|
|
|
55
42
|
description: "Adding universal link flags",
|
|
56
43
|
type: "custom",
|
|
57
44
|
processor: (t) => {
|
|
58
|
-
let
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
if (
|
|
45
|
+
let n = t;
|
|
46
|
+
const i = n.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
47
|
+
return i && i.forEach((e) => {
|
|
48
|
+
if (e.includes("insEmail=1"))
|
|
62
49
|
return;
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
return
|
|
50
|
+
if (e.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
51
|
+
const c = e.replace(/href=(["'`”])(.*?)\1/gm, (r) => {
|
|
52
|
+
const s = r.slice(6, r.length - 1).trim();
|
|
53
|
+
return r.includes("?") || r.includes("#") ? s.slice(-1) === "&" ? r.replace(s, `${s}insEmail=1`) : r.replace(s, `${s}&insEmail=1`) : r.replace(s, `${s}?insEmail=1`);
|
|
67
54
|
});
|
|
68
|
-
|
|
55
|
+
n = n.replace(e, c);
|
|
69
56
|
}
|
|
70
|
-
}),
|
|
57
|
+
}), n;
|
|
71
58
|
},
|
|
72
59
|
priority: 63
|
|
73
60
|
}
|
|
74
61
|
];
|
|
75
62
|
export {
|
|
76
|
-
|
|
63
|
+
S as unsubscribeCompilerRules
|
|
77
64
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import { migrateCouponBlock as m } from "./couponBlockMigrator.js";
|
|
1
|
+
import { migrateCheckbox as m } from "./checkboxMigrator.js";
|
|
3
2
|
import { migrateRadioButton as i } from "./radioButtonMigrator.js";
|
|
4
|
-
import { migrateUnsubscribe as
|
|
5
|
-
const
|
|
6
|
-
let
|
|
7
|
-
return
|
|
3
|
+
import { migrateUnsubscribe as o } from "./unsubscribeMigrator.js";
|
|
4
|
+
const n = async (r) => {
|
|
5
|
+
let t = r;
|
|
6
|
+
return t = m(t), t = i(t), t = await o(t), t;
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
|
-
|
|
9
|
+
n as migrate
|
|
11
10
|
};
|