@useinsider/guido 1.0.3-beta.2155d71 → 1.0.3-beta.2214097
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 +0 -9
- package/dist/{src/components → components}/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +69 -74
- package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/composables/useStripo.js +43 -52
- package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
- package/dist/config/migrator/index.d.ts +1 -0
- package/dist/config/migrator/index.js +5 -7
- package/dist/enums/defaults.js +3 -6
- package/dist/enums/unsubscribe.d.ts +15 -0
- package/dist/enums/unsubscribe.js +6 -43
- 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/_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 +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/stores/unsubscribe.d.ts +8 -0
- package/dist/stores/unsubscribe.js +6 -126
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +2 -7
- 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/config/migrator/couponBlockMigrator.js +0 -67
- package/dist/config/migrator/unsubscribeMigrator.js +0 -124
- 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/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/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -648
- package/dist/package.json.js +0 -7
- package/dist/services/unsubscribeApi.js +0 -16
- 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/config/migrator/couponBlockMigrator.d.ts +0 -1
- package/dist/src/config/migrator/index.d.ts +0 -1
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
- 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/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/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/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/DynamicContent/extension.d.ts +0 -2
- package/dist/src/services/unsubscribeApi.d.ts +0 -4
- package/dist/src/stores/config.d.ts +0 -96
- package/dist/src/stores/unsubscribe.d.ts +0 -256
- 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}/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}/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/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}/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/_Boilerplate/control.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/RadioButton → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → 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/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/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
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CompilerRule } from './html-compiler';
|
|
2
|
-
type Extensions = {
|
|
3
|
-
unsubscribe?: boolean;
|
|
4
|
-
};
|
|
5
2
|
type Features = {
|
|
6
3
|
dynamicContent?: boolean;
|
|
7
4
|
saveAsTemplate?: boolean;
|
|
@@ -19,14 +16,8 @@ export type GuidoConfig = {
|
|
|
19
16
|
useHeader?: boolean;
|
|
20
17
|
emailHeader: EmailHeader;
|
|
21
18
|
partner?: Partner;
|
|
22
|
-
extensions?: Extensions;
|
|
23
19
|
features?: Features;
|
|
24
20
|
};
|
|
25
|
-
export type TemplateConfig = {
|
|
26
|
-
preselectedDynamicContentList?: DynamicContent[];
|
|
27
|
-
selectedUnsubscribePages?: number[];
|
|
28
|
-
variationId?: string;
|
|
29
|
-
};
|
|
30
21
|
export type DynamicContent = {
|
|
31
22
|
value: string;
|
|
32
23
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DynamicContent, GuidoConfig
|
|
1
|
+
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
@@ -9,8 +9,8 @@ type __VLS_Props = {
|
|
|
9
9
|
username?: string;
|
|
10
10
|
html?: string;
|
|
11
11
|
css?: string;
|
|
12
|
+
preselectedDynamicContentList: DynamicContent[];
|
|
12
13
|
guidoConfig: GuidoConfig;
|
|
13
|
-
templateConfig?: TemplateConfig;
|
|
14
14
|
};
|
|
15
15
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
16
16
|
dynamicContent: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) :
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
s,
|
|
4
|
+
var t = function() {
|
|
5
|
+
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
|
|
7
|
+
}, s = [], d = /* @__PURE__ */ i(
|
|
8
|
+
o,
|
|
10
9
|
t,
|
|
10
|
+
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"aca05338"
|
|
14
14
|
);
|
|
15
15
|
const v = d.exports;
|
|
16
16
|
export {
|
|
@@ -1,22 +1,19 @@
|
|
|
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 {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
|
|
18
|
-
import ae from "../node_modules/lodash-es/merge.js";
|
|
19
|
-
const Ee = /* @__PURE__ */ x({
|
|
1
|
+
import { defineComponent as H, defineAsyncComponent as E, ref as R, computed as G, watch as U, onMounted as x, onUnmounted as F } from "vue";
|
|
2
|
+
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as z } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as B } from "../composables/useStripo.js";
|
|
5
|
+
import { migrate as P } from "../config/migrator/index.js";
|
|
6
|
+
import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
|
|
7
|
+
import q from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import J from "./organisms/header/HeaderWrapper.vue.js";
|
|
9
|
+
import Q from "./organisms/LoadingWrapper.vue.js";
|
|
10
|
+
import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
11
|
+
import { useStripoApi as X } from "../services/stripoApi.js";
|
|
12
|
+
import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
|
|
13
|
+
import { useEditorStore as Z } from "../stores/editor.js";
|
|
14
|
+
import { usePreviewStore as $ } from "../stores/preview.js";
|
|
15
|
+
import ee from "../node_modules/lodash-es/merge.js";
|
|
16
|
+
const ye = /* @__PURE__ */ H({
|
|
20
17
|
__name: "Guido",
|
|
21
18
|
props: {
|
|
22
19
|
templateId: null,
|
|
@@ -27,86 +24,84 @@ const Ee = /* @__PURE__ */ x({
|
|
|
27
24
|
username: null,
|
|
28
25
|
html: null,
|
|
29
26
|
css: null,
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
preselectedDynamicContentList: null,
|
|
28
|
+
guidoConfig: null
|
|
32
29
|
},
|
|
33
30
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
31
|
+
setup(I, { expose: L, emit: o }) {
|
|
32
|
+
const r = I, _ = E(
|
|
36
33
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
37
|
-
),
|
|
34
|
+
), W = E(
|
|
38
35
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
|
-
),
|
|
36
|
+
), d = R(), a = Y(), m = Z(), k = $(), t = G(() => m.hasChanges), i = r.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: A } = z(), p = () => {
|
|
40
37
|
var e;
|
|
41
|
-
return (e =
|
|
38
|
+
return (e = d.value) == null ? void 0 : e.handleSave(!0);
|
|
42
39
|
}, {
|
|
43
|
-
templateId:
|
|
44
|
-
userId:
|
|
45
|
-
guidoConfig:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
preselectedDynamicContentList: c,
|
|
40
|
+
templateId: g,
|
|
41
|
+
userId: f,
|
|
42
|
+
guidoConfig: y,
|
|
43
|
+
html: n = "",
|
|
44
|
+
css: v = "",
|
|
45
|
+
partnerName: s = l(),
|
|
46
|
+
productType: c = u(),
|
|
47
|
+
messageType: C = O,
|
|
48
|
+
username: h = K
|
|
49
|
+
} = r;
|
|
50
|
+
window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
|
|
51
|
+
partnerName: s,
|
|
52
|
+
productType: c,
|
|
53
|
+
messageType: C
|
|
54
|
+
};
|
|
55
|
+
const { initPlugin: w } = B({
|
|
56
|
+
emailId: g,
|
|
57
|
+
userId: f,
|
|
58
|
+
username: h,
|
|
59
|
+
partnerName: s,
|
|
60
|
+
productType: c,
|
|
61
|
+
preselectedDynamicContentList: i,
|
|
66
62
|
onReady: () => {
|
|
67
|
-
console.debug("guido:ready"),
|
|
63
|
+
console.debug("guido:ready"), o("ready");
|
|
68
64
|
}
|
|
69
|
-
}), { getDefaultTemplate:
|
|
65
|
+
}), { getDefaultTemplate: S } = X(), N = G(() => {
|
|
70
66
|
var e;
|
|
71
67
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
72
68
|
});
|
|
73
|
-
|
|
69
|
+
M({
|
|
74
70
|
onBack: () => {
|
|
75
|
-
console.debug("guido:back"),
|
|
71
|
+
console.debug("guido:back"), o("back");
|
|
76
72
|
},
|
|
77
73
|
onSaveStart: () => {
|
|
78
|
-
console.debug("guido:save:start"),
|
|
74
|
+
console.debug("guido:save:start"), o("save:start");
|
|
79
75
|
},
|
|
80
76
|
onSaveComplete: (e) => {
|
|
81
|
-
console.debug("guido:save:complete", e),
|
|
77
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
82
78
|
}
|
|
83
79
|
});
|
|
84
|
-
const
|
|
85
|
-
console.debug("dynamic-content:close", e),
|
|
86
|
-
},
|
|
80
|
+
const b = (e) => {
|
|
81
|
+
console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
82
|
+
}, D = () => {
|
|
87
83
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
88
84
|
};
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
}),
|
|
85
|
+
return U(() => t.value, () => {
|
|
86
|
+
o("on-change", t.value);
|
|
87
|
+
}), x(async () => {
|
|
92
88
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
93
89
|
try {
|
|
94
|
-
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
95
90
|
let e = {
|
|
96
|
-
html:
|
|
97
|
-
css:
|
|
91
|
+
html: n && P(n),
|
|
92
|
+
css: v,
|
|
98
93
|
forceRecreate: !0
|
|
99
94
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
100
95
|
};
|
|
101
|
-
e.html || (e = await
|
|
96
|
+
e.html || (e = await S(), e.html = P(e.html)), await w(e), a.selectedDynamicContentList = i;
|
|
102
97
|
} catch (e) {
|
|
103
98
|
console.error("Failed to initialize Stripo editor:", e);
|
|
104
99
|
}
|
|
105
100
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
106
|
-
const
|
|
107
|
-
console.debug("dynamic-content:open",
|
|
101
|
+
const T = e;
|
|
102
|
+
console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
|
|
108
103
|
});
|
|
109
|
-
}),
|
|
104
|
+
}), F(() => {
|
|
110
105
|
try {
|
|
111
106
|
window.UIEditor.removeEditor();
|
|
112
107
|
} catch {
|
|
@@ -114,14 +109,14 @@ const Ee = /* @__PURE__ */ x({
|
|
|
114
109
|
}
|
|
115
110
|
}), L({
|
|
116
111
|
dynamicContent: {
|
|
117
|
-
insert:
|
|
118
|
-
close:
|
|
112
|
+
insert: b,
|
|
113
|
+
close: D
|
|
119
114
|
},
|
|
120
|
-
hasChanges:
|
|
121
|
-
saveSilent:
|
|
122
|
-
}), { __sfc: !0, PreviewContainer:
|
|
115
|
+
hasChanges: t,
|
|
116
|
+
saveSilent: p
|
|
117
|
+
}), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: d, dynamicContentStore: a, props: r, editorStore: m, previewStore: k, hasChanges: t, preselectedDynamicContentList: i, getPartnerName: l, getProductType: u, isTestPartner: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: n, css: v, partnerName: s, productType: c, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: b, closeDynamicContent: D, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
|
|
123
118
|
}
|
|
124
119
|
});
|
|
125
120
|
export {
|
|
126
|
-
|
|
121
|
+
ye as default
|
|
127
122
|
};
|
|
@@ -2,7 +2,7 @@ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
id: string;
|
|
4
4
|
className?: string;
|
|
5
|
-
size?:
|
|
5
|
+
size?: string;
|
|
6
6
|
closeOnOutsideClick?: boolean;
|
|
7
7
|
descriptionStatus?: boolean;
|
|
8
8
|
descriptionText?: string;
|
|
@@ -10,11 +10,9 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var __VLS_12: {}
|
|
13
|
+
declare var __VLS_12: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
|
|
16
|
-
} & {
|
|
17
|
-
default?: (props: typeof __VLS_14) => any;
|
|
15
|
+
default?: (props: typeof __VLS_12) => any;
|
|
18
16
|
};
|
|
19
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
20
18
|
className: string;
|
|
@@ -34,7 +32,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
32
|
descriptionText: string;
|
|
35
33
|
}>>>, {
|
|
36
34
|
className: string;
|
|
37
|
-
size:
|
|
35
|
+
size: string;
|
|
38
36
|
closeOnOutsideClick: boolean;
|
|
39
37
|
descriptionStatus: boolean;
|
|
40
38
|
descriptionText: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "./WpDrawer.vue2.js";
|
|
2
2
|
import s from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var i = function() {
|
|
4
4
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
5
|
return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
|
|
6
6
|
return e.emit("cancelOrBackButtonEvent");
|
|
@@ -8,15 +8,13 @@ var u = function() {
|
|
|
8
8
|
return e.emit("onCloseEvent");
|
|
9
9
|
}, primaryButtonEvent: function(o) {
|
|
10
10
|
return e.emit("primaryButtonEvent");
|
|
11
|
-
} }, scopedSlots: t._u([
|
|
12
|
-
return [t._t("headerBottomSlot")];
|
|
13
|
-
}, proxy: !0 } : null, { key: "contentSlot", fn: function() {
|
|
11
|
+
} }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
|
|
14
12
|
return [n("div", [t._t("default")], 2)];
|
|
15
13
|
}, proxy: !0 }], null, !0) });
|
|
16
|
-
},
|
|
14
|
+
}, u = [], c = /* @__PURE__ */ s(
|
|
17
15
|
r,
|
|
18
|
-
u,
|
|
19
16
|
i,
|
|
17
|
+
u,
|
|
20
18
|
!1,
|
|
21
19
|
null,
|
|
22
20
|
null
|
|
@@ -4,25 +4,22 @@ 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/
|
|
9
|
-
import V from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
10
|
-
import _ from "../extensions/DynamicContent/extension.js";
|
|
7
|
+
import w from "../extensions/Blocks/RadioButton/extension.js";
|
|
8
|
+
import b from "../extensions/DynamicContent/extension.js";
|
|
11
9
|
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
12
10
|
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;
|
|
11
|
+
import { useEditorStore as V } from "../stores/editor.js";
|
|
12
|
+
import { dynamicContentToMergeTags as _ } from "../utils/genericUtil.js";
|
|
13
|
+
const q = (s) => {
|
|
14
|
+
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = k(), { handleEvent: l } = E(), m = (r, i = []) => {
|
|
15
|
+
const o = V(), { html: e, css: a, forceRecreate: g } = r;
|
|
19
16
|
window.UIEditor.initEditor(
|
|
20
17
|
document.querySelector("#guido-editor"),
|
|
21
18
|
{
|
|
22
|
-
metadata:
|
|
23
|
-
html:
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
19
|
+
metadata: s,
|
|
20
|
+
html: e,
|
|
21
|
+
css: a,
|
|
22
|
+
forceRecreate: g,
|
|
26
23
|
locale: "en",
|
|
27
24
|
undoButtonSelector: "#guido__undo-button",
|
|
28
25
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -46,74 +43,68 @@ const N = (a) => {
|
|
|
46
43
|
},
|
|
47
44
|
mergeTags: [
|
|
48
45
|
{
|
|
49
|
-
entries:
|
|
46
|
+
entries: _(s.preselectedDynamicContentList)
|
|
50
47
|
}
|
|
51
48
|
],
|
|
52
|
-
async onTokenRefreshRequest(
|
|
49
|
+
async onTokenRefreshRequest(t) {
|
|
53
50
|
try {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
} catch (
|
|
57
|
-
d(
|
|
51
|
+
const n = await c();
|
|
52
|
+
t(n);
|
|
53
|
+
} catch (n) {
|
|
54
|
+
d(n, "Failed to refresh token");
|
|
58
55
|
}
|
|
59
56
|
},
|
|
60
57
|
onTemplateLoaded() {
|
|
61
58
|
try {
|
|
62
|
-
const { importCss:
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const { importCss: t } = S(), { activateCustomViewStyles: n } = f();
|
|
60
|
+
t(), n(), s.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
61
|
+
o.hasChanges = !1;
|
|
65
62
|
}, 1e3);
|
|
66
|
-
} catch (
|
|
67
|
-
d(
|
|
63
|
+
} catch (t) {
|
|
64
|
+
d(t, "Failed to load custom interface appearance");
|
|
68
65
|
}
|
|
69
66
|
},
|
|
70
|
-
onCodeEditorVisibilityChanged(
|
|
71
|
-
|
|
67
|
+
onCodeEditorVisibilityChanged(t) {
|
|
68
|
+
o.isCodeEditorOpen = t;
|
|
72
69
|
},
|
|
73
|
-
onEditorVisualModeChanged(
|
|
74
|
-
|
|
70
|
+
onEditorVisualModeChanged(t) {
|
|
71
|
+
o.editorVisualMode = t.toLowerCase();
|
|
75
72
|
},
|
|
76
|
-
onVersionHistoryVisibilityChanged(
|
|
77
|
-
|
|
73
|
+
onVersionHistoryVisibilityChanged(t) {
|
|
74
|
+
o.isVersionHistoryOpen = t;
|
|
78
75
|
},
|
|
79
76
|
onDataChanged() {
|
|
80
|
-
|
|
77
|
+
o.hasChanges = !0;
|
|
81
78
|
},
|
|
82
|
-
onEvent:
|
|
83
|
-
ignoreClickOutsideSelectors: [
|
|
84
|
-
"#guido-dynamic-content-modal",
|
|
85
|
-
".in-on-board-wrapper",
|
|
86
|
-
".in-drawer__container"
|
|
87
|
-
],
|
|
79
|
+
onEvent: l,
|
|
80
|
+
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
|
|
88
81
|
extensions: [
|
|
89
|
-
_,
|
|
90
|
-
h,
|
|
91
82
|
b,
|
|
92
|
-
|
|
83
|
+
h,
|
|
93
84
|
w
|
|
94
85
|
]
|
|
95
86
|
}
|
|
96
87
|
);
|
|
97
|
-
},
|
|
98
|
-
var e;
|
|
88
|
+
}, p = (r) => new Promise((i, o) => {
|
|
99
89
|
if (document.getElementById("UiEditorScript")) {
|
|
100
90
|
r(), i();
|
|
101
91
|
return;
|
|
102
92
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
93
|
+
const e = document.createElement("script");
|
|
94
|
+
e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
|
|
105
95
|
r(), i();
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
}, e.onerror = () => {
|
|
97
|
+
const a = new Error("Failed to load Stripo UIEditor script");
|
|
98
|
+
o(a);
|
|
99
|
+
}, document.body.appendChild(e);
|
|
109
100
|
});
|
|
110
101
|
return { initPlugin: async (r) => {
|
|
111
|
-
await
|
|
112
|
-
const i = await
|
|
113
|
-
|
|
102
|
+
await p(async () => {
|
|
103
|
+
const i = await u();
|
|
104
|
+
m(r, i);
|
|
114
105
|
});
|
|
115
106
|
} };
|
|
116
107
|
};
|
|
117
108
|
export {
|
|
118
|
-
|
|
109
|
+
q as useStripo
|
|
119
110
|
};
|
|
@@ -1,36 +1,23 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES 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 c, LINK_TYPES as p, URLS as E } 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
|
-
processor: (
|
|
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;
|
|
9
|
+
processor: (n) => {
|
|
10
|
+
var a, u;
|
|
11
|
+
const { getPartnerName: i } = m(), t = b();
|
|
12
|
+
let e = n;
|
|
13
|
+
const o = `/${i()}/email/0?user={{iid}}`, r = (a = t.selectedUnsubscribePages) == null ? void 0 : a.find((l) => l.type === p.UNSUBSCRIBE_LINK_TYPE), s = (u = t.selectedUnsubscribePages) == null ? void 0 : u.find((l) => l.type === p.PREFERENCES_LINK_TYPE);
|
|
14
|
+
return r && (e = e.replace(
|
|
15
|
+
c.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
16
|
+
E.UNSUBSCRIBE_URL + o
|
|
17
|
+
)), s && (e = e.replace(
|
|
18
|
+
c.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
19
|
+
E.PREFERENCES_URL + o
|
|
20
|
+
)), e.replace(c.UNSUBSCRIBE_LINK_REGEX, "");
|
|
34
21
|
},
|
|
35
22
|
priority: 60
|
|
36
23
|
},
|
|
@@ -38,7 +25,7 @@ const T = [
|
|
|
38
25
|
id: "remove-data-ogsb-button-styles",
|
|
39
26
|
description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
|
|
40
27
|
type: "regex",
|
|
41
|
-
pattern:
|
|
28
|
+
pattern: c.DATA_OGSB_BUTTON_CSS_REGEX,
|
|
42
29
|
replacement: "",
|
|
43
30
|
flags: "g",
|
|
44
31
|
priority: 61
|
|
@@ -47,25 +34,25 @@ const T = [
|
|
|
47
34
|
id: "format-comment-braces",
|
|
48
35
|
description: "Adding spaces around comment braces for proper formatting",
|
|
49
36
|
type: "custom",
|
|
50
|
-
processor: (
|
|
37
|
+
processor: (n) => n.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
|
|
51
38
|
priority: 62
|
|
52
39
|
},
|
|
53
40
|
{
|
|
54
41
|
id: "add-universal-link-flags",
|
|
55
42
|
description: "Adding universal link flags",
|
|
56
43
|
type: "custom",
|
|
57
|
-
processor: (
|
|
58
|
-
let i =
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
if (
|
|
44
|
+
processor: (n) => {
|
|
45
|
+
let i = n;
|
|
46
|
+
const t = i.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
47
|
+
return t && t.forEach((e) => {
|
|
48
|
+
if (e.includes("insEmail=1"))
|
|
62
49
|
return;
|
|
63
|
-
if (
|
|
64
|
-
const o =
|
|
65
|
-
const
|
|
66
|
-
return
|
|
50
|
+
if (e.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
51
|
+
const o = 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
|
-
i = i.replace(
|
|
55
|
+
i = i.replace(e, o);
|
|
69
56
|
}
|
|
70
57
|
}), i;
|
|
71
58
|
},
|
|
@@ -73,5 +60,5 @@ const T = [
|
|
|
73
60
|
}
|
|
74
61
|
];
|
|
75
62
|
export {
|
|
76
|
-
|
|
63
|
+
S as unsubscribeCompilerRules
|
|
77
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const migrate: (html: string) => string;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { migrateCheckbox as o } from "./checkboxMigrator.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let r = t;
|
|
7
|
-
return r = o(r), r = i(r), r = await e(r), r = m(r), r;
|
|
2
|
+
import { migrateRadioButton as e } from "./radioButtonMigrator.js";
|
|
3
|
+
const a = (r) => {
|
|
4
|
+
let t = r;
|
|
5
|
+
return t = o(r), t = e(r), t;
|
|
8
6
|
};
|
|
9
7
|
export {
|
|
10
|
-
|
|
8
|
+
a as migrate
|
|
11
9
|
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -4,9 +4,6 @@ const a = {
|
|
|
4
4
|
senderName: "",
|
|
5
5
|
subject: ""
|
|
6
6
|
},
|
|
7
|
-
extensions: {
|
|
8
|
-
unsubscribe: !0
|
|
9
|
-
},
|
|
10
7
|
features: {
|
|
11
8
|
dynamicContent: !0,
|
|
12
9
|
saveAsTemplate: !0,
|
|
@@ -16,7 +13,7 @@ const a = {
|
|
|
16
13
|
}, t = {
|
|
17
14
|
promotional: 1,
|
|
18
15
|
transactional: 2
|
|
19
|
-
}, e = "email", o = "Guido User", n = t.promotional,
|
|
16
|
+
}, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
|
|
20
17
|
email: 60,
|
|
21
18
|
architect: 49
|
|
22
19
|
}, u = [
|
|
@@ -56,8 +53,8 @@ export {
|
|
|
56
53
|
n as DefaultMessageType,
|
|
57
54
|
e as DefaultProductType,
|
|
58
55
|
o as DefaultUsername,
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
i as EditorType,
|
|
57
|
+
s as ProductIds,
|
|
61
58
|
u as TEST_PARTNER_LIST,
|
|
62
59
|
t as TemplateTypes
|
|
63
60
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const LINK_TYPES: {
|
|
2
|
+
UNSUBSCRIBE_LINK_TYPE: number;
|
|
3
|
+
PREFERENCES_LINK_TYPE: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const LINK_REGEXES: {
|
|
6
|
+
UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
7
|
+
DATA_OGSB_BUTTON_CSS_REGEX: string;
|
|
8
|
+
GLOBAL_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
9
|
+
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
10
|
+
};
|
|
11
|
+
export declare const URLS: {
|
|
12
|
+
UNSUBSCRIBE_URL: string;
|
|
13
|
+
PREFERENCES_URL: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const INSIDER_ID = "iid";
|