@useinsider/guido 1.0.3-beta.63633cd → 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 -6
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +67 -69
- 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 +39 -44
- 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 +24 -13
- 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}/editor.d.ts +0 -21
- package/dist/stores/editor.js +1 -2
- package/dist/{src/stores → stores}/unsubscribe.d.ts +2 -72
- package/dist/stores/unsubscribe.js +42 -43
- package/dist/{src/utils → utils}/genericUtil.d.ts +0 -1
- package/dist/utils/genericUtil.js +7 -8
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +3 -8
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
- package/dist/config/migrator/couponBlockMigrator.js +0 -67
- package/dist/enums/extensions/recommendationBlock.js +0 -80
- 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/Recommendation/block.js +0 -27
- package/dist/extensions/Blocks/Recommendation/control.js +0 -277
- package/dist/extensions/Blocks/Recommendation/extension.js +0 -10
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -32
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
- package/dist/extensions/Blocks/Recommendation/template.js +0 -200
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
- package/dist/extensions/Blocks/common-control.js +0 -102
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -659
- package/dist/package.json.js +0 -7
- package/dist/services/recommendationApi.js +0 -43
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
- package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
- package/dist/src/config/migrator/couponBlockMigrator.d.ts +0 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
- 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/Recommendation/block.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -29
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -66
- package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/src/mock/api/recommendation.d.ts +0 -2
- package/dist/src/services/recommendationApi.d.ts +0 -6
- package/dist/src/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/Blocks/Recommendation → 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/Recommendation → 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/services → services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/dynamic-content.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}/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,49 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { MERGE_TAGS as
|
|
5
|
-
import { DATA_ATTRIBUTES as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
class
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var T = (l, e, t) => e in l ? A(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
|
|
3
|
+
var d = (l, e, t) => T(l, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { MERGE_TAGS as p, PAGE_TYPES as g } from "../../enums/unsubscribe.js";
|
|
5
|
+
import { DATA_ATTRIBUTES as y } from "../../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
6
|
+
import { useUnsubscribeStore as x } from "../../stores/unsubscribe.js";
|
|
7
|
+
class h {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
9
|
+
d(this, "parser");
|
|
10
10
|
this.parser = new DOMParser();
|
|
11
11
|
}
|
|
12
12
|
async migrate(e) {
|
|
13
13
|
try {
|
|
14
|
-
const t = this.parser.parseFromString(e, "text/html"),
|
|
15
|
-
if (!
|
|
14
|
+
const t = this.parser.parseFromString(e, "text/html"), s = t.querySelectorAll("td.unsubscribe-block");
|
|
15
|
+
if (!s.length)
|
|
16
16
|
return e;
|
|
17
|
-
const
|
|
18
|
-
return await
|
|
19
|
-
const
|
|
17
|
+
const u = x();
|
|
18
|
+
return await u.fetchTemplates(), s.forEach((i) => {
|
|
19
|
+
const a = i.getAttribute("id"), n = this.extractUnsubscribeContent(i), r = this.getCollectionTypeFromMergeTag(n.linkHref), o = u.getSelectedUnsubscribePagesByCollection(r);
|
|
20
20
|
console.debug("[UnsubscribeMigrator]", {
|
|
21
21
|
mergeTag: n.linkHref,
|
|
22
|
-
collectionType:
|
|
23
|
-
pageIds:
|
|
24
|
-
paddingClass: g,
|
|
25
|
-
bgColor: u
|
|
22
|
+
collectionType: r,
|
|
23
|
+
pageIds: o
|
|
26
24
|
});
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
s,
|
|
30
|
-
b,
|
|
31
|
-
g,
|
|
32
|
-
u
|
|
33
|
-
), a = this.parser.parseFromString(
|
|
34
|
-
`<table id="tempDoc"><tbody><tr>${f}</tr></tbody></table>`,
|
|
25
|
+
const c = this.buildUnsubscribeBlock(n, r, o), b = this.parser.parseFromString(
|
|
26
|
+
`<table id="tempDoc"><tbody><tr>${c}</tr></tbody></table>`,
|
|
35
27
|
"text/html"
|
|
36
28
|
).querySelector(".unsubscribe-block-v2");
|
|
37
|
-
|
|
29
|
+
b && i.parentNode && (b.setAttribute("id", a || ""), i.parentNode.replaceChild(b, i));
|
|
38
30
|
}), t.documentElement.outerHTML;
|
|
39
31
|
} catch (t) {
|
|
40
32
|
return console.error("UnsubscribeMigrator failed:", t), e;
|
|
41
33
|
}
|
|
42
34
|
}
|
|
43
|
-
extractPaddingClass(e) {
|
|
44
|
-
const i = (e.getAttribute("class") || "").match(/\bes-p\d+\b/);
|
|
45
|
-
return i ? i[0] : "";
|
|
46
|
-
}
|
|
47
35
|
extractUnsubscribeContent(e) {
|
|
48
36
|
var m;
|
|
49
37
|
const t = e.querySelector("p");
|
|
@@ -59,8 +47,8 @@ class C {
|
|
|
59
47
|
align: "center",
|
|
60
48
|
paragraphStyle: ""
|
|
61
49
|
};
|
|
62
|
-
const
|
|
63
|
-
if (!
|
|
50
|
+
const s = e.getAttribute("align") || t.getAttribute("align") || "center", u = t.getAttribute("style") || "", i = t.querySelector("a.unsubscribe-link") || t.querySelector('a[href*="unsubscribe"]');
|
|
51
|
+
if (!i)
|
|
64
52
|
return {
|
|
65
53
|
textBefore: "You can ",
|
|
66
54
|
linkText: "unsubscribe",
|
|
@@ -69,56 +57,56 @@ class C {
|
|
|
69
57
|
textAfter: " from our emails, if you need to.",
|
|
70
58
|
isBold: !1,
|
|
71
59
|
isItalic: !1,
|
|
72
|
-
align:
|
|
73
|
-
paragraphStyle:
|
|
60
|
+
align: s,
|
|
61
|
+
paragraphStyle: u
|
|
74
62
|
};
|
|
75
|
-
const
|
|
63
|
+
const a = ((m = i.textContent) == null ? void 0 : m.trim()) || "unsubscribe", n = i.getAttribute("href") || "{{ins-unsubscribe-link}}", r = i.getAttribute("style") || "", o = t.textContent || "", c = o.indexOf(a), f = c >= 0 ? o.substring(0, c).trim() : "You can ", b = c >= 0 ? o.substring(c + a.length).trim() : " from our emails, if you need to.", k = !!t.querySelector("b, strong"), S = !!t.querySelector("i, em");
|
|
76
64
|
return {
|
|
77
|
-
textBefore:
|
|
78
|
-
linkText:
|
|
79
|
-
linkHref: this.normalizeUnsubscribeHref(
|
|
80
|
-
linkStyle:
|
|
81
|
-
textAfter:
|
|
82
|
-
isBold:
|
|
83
|
-
isItalic:
|
|
84
|
-
align:
|
|
85
|
-
paragraphStyle:
|
|
65
|
+
textBefore: f,
|
|
66
|
+
linkText: a,
|
|
67
|
+
linkHref: this.normalizeUnsubscribeHref(n),
|
|
68
|
+
linkStyle: r,
|
|
69
|
+
textAfter: b,
|
|
70
|
+
isBold: k,
|
|
71
|
+
isItalic: S,
|
|
72
|
+
align: s,
|
|
73
|
+
paragraphStyle: u
|
|
86
74
|
};
|
|
87
75
|
}
|
|
88
|
-
buildUnsubscribeBlock(e, t,
|
|
89
|
-
const
|
|
90
|
-
e.textBefore && n.push(e.textBefore), n.push(
|
|
91
|
-
let
|
|
92
|
-
e.isBold && e.isItalic ?
|
|
93
|
-
const
|
|
76
|
+
buildUnsubscribeBlock(e, t, s) {
|
|
77
|
+
const u = e.linkStyle ? ` style="${e.linkStyle}"` : "", a = `<a ${`href="${e.linkHref}" class="unsubscribe-link" target="_blank" data-unsubscribe-link="true"`}${u}>${e.linkText}</a>`, n = [];
|
|
78
|
+
e.textBefore && n.push(e.textBefore), n.push(a), e.textAfter && n.push(e.textAfter);
|
|
79
|
+
let r = n.join(" ");
|
|
80
|
+
e.isBold && e.isItalic ? r = `<strong path="1,0"><em path="1,0,0">${r}</em></strong>` : e.isBold ? r = `<strong path="1,0">${r}</strong>` : e.isItalic && (r = `<em path="1,0">${r}</em>`);
|
|
81
|
+
const o = e.align ? ` align="${e.align}"` : "", c = e.paragraphStyle ? ` style="${e.paragraphStyle}"` : "", f = s.length > 0 ? ` ${y.PAGE_LIST}="${s.join(",")}"` : "", b = ` ${y.PAGE_TYPE}="${t}"`;
|
|
94
82
|
return `
|
|
95
83
|
<td
|
|
96
84
|
data-migration="true"
|
|
97
85
|
esd-extension-block-id="unsubscribe-block"
|
|
98
|
-
class="
|
|
99
|
-
${
|
|
86
|
+
class="esd-block-text unsubscribe-block-v2 esd-block-unsubscribe esd-unsubscribe-block esd-extension-block"
|
|
87
|
+
${o}${b}${f}
|
|
100
88
|
>
|
|
101
|
-
<p path="1"${
|
|
102
|
-
${
|
|
89
|
+
<p path="1"${c}>
|
|
90
|
+
${r}
|
|
103
91
|
</p>
|
|
104
92
|
</td>
|
|
105
93
|
`;
|
|
106
94
|
}
|
|
107
95
|
getCollectionTypeFromMergeTag(e) {
|
|
108
|
-
return e ===
|
|
96
|
+
return e === p[g.SUBSCRIPTION_PREFERENCE_CENTER] ? g.SUBSCRIPTION_PREFERENCE_CENTER : e === p[g.GLOBAL_UNSUBSCRIBE] ? g.GLOBAL_UNSUBSCRIBE : g.GLOBAL_UNSUBSCRIBE;
|
|
109
97
|
}
|
|
110
98
|
normalizeUnsubscribeHref(e) {
|
|
111
|
-
if (Object.values(
|
|
99
|
+
if (Object.values(p).includes(e))
|
|
112
100
|
return e;
|
|
113
|
-
const
|
|
114
|
-
return
|
|
101
|
+
const s = e.match(/{{ins-(?:global-)?(?:preferences-)?unsubscribe-link}}/);
|
|
102
|
+
return s ? s[0] : e.includes("unsubscribe") || e.includes("unsub") ? (console.warn(
|
|
115
103
|
`[UnsubscribeMigrator] Unrecognized unsubscribe href format: "${e}". Defaulting to {{ins-unsubscribe-link}}`
|
|
116
104
|
), "{{ins-unsubscribe-link}}") : e;
|
|
117
105
|
}
|
|
118
106
|
}
|
|
119
|
-
async function
|
|
120
|
-
return new
|
|
107
|
+
async function $(l) {
|
|
108
|
+
return new h().migrate(l);
|
|
121
109
|
}
|
|
122
110
|
export {
|
|
123
|
-
|
|
111
|
+
$ as migrateUnsubscribe
|
|
124
112
|
};
|
|
@@ -13,10 +13,6 @@ export declare const URLS: {
|
|
|
13
13
|
PREFERENCES_URL: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const INSIDER_ID = "iid";
|
|
16
|
-
export declare const DEFAULT_UNSUBSCRIBE_GROUP: {
|
|
17
|
-
readonly name: "Global Unsubscribe";
|
|
18
|
-
readonly sendGridId: "G";
|
|
19
|
-
};
|
|
20
16
|
export declare const ACADEMY_LINK = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center";
|
|
21
17
|
export declare const UNSUBSCRIBE_PAGES_LINK = "/email/unsubscribe-pages";
|
|
22
18
|
export declare const PAGE_TYPES: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTranslations as e } from "../composables/useTranslations.js";
|
|
2
|
-
const s = e(),
|
|
2
|
+
const s = e(), n = {
|
|
3
3
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
4
4
|
PREFERENCES_LINK_TYPE: 3
|
|
5
5
|
}, S = {
|
|
@@ -10,16 +10,13 @@ const s = e(), R = {
|
|
|
10
10
|
}, N = {
|
|
11
11
|
UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
|
|
12
12
|
PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
|
|
13
|
-
}, _ = {
|
|
14
|
-
name: "Global Unsubscribe",
|
|
15
|
-
sendGridId: "G"
|
|
16
|
-
}, I = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
|
|
13
|
+
}, _ = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", I = "/email/unsubscribe-pages", E = {
|
|
17
14
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
18
15
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
19
16
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
20
17
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
21
18
|
RESUBSCRIBE: 5
|
|
22
|
-
},
|
|
19
|
+
}, r = {
|
|
23
20
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
24
21
|
E.GLOBAL_UNSUBSCRIBE,
|
|
25
22
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -29,26 +26,25 @@ const s = e(), R = {
|
|
|
29
26
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
30
27
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
31
28
|
]
|
|
32
|
-
},
|
|
29
|
+
}, i = {
|
|
33
30
|
[E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
|
|
34
31
|
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
35
32
|
[E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
|
|
36
33
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
|
|
37
34
|
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
38
|
-
},
|
|
35
|
+
}, B = {
|
|
39
36
|
default: "{{ins-unsubscribe-link}}",
|
|
40
37
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
41
38
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
42
39
|
};
|
|
43
40
|
export {
|
|
44
|
-
|
|
45
|
-
_ as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
41
|
+
_ as ACADEMY_LINK,
|
|
46
42
|
S as LINK_REGEXES,
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
n as LINK_TYPES,
|
|
44
|
+
B as MERGE_TAGS,
|
|
49
45
|
E as PAGE_TYPES,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
r as TYPE_COLLECTIONS,
|
|
47
|
+
i as TYPE_TRANSLATIONS,
|
|
48
|
+
I as UNSUBSCRIBE_PAGES_LINK,
|
|
53
49
|
N as URLS
|
|
54
50
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
2
|
export declare const CHECKBOX_BLOCK_ID = "checkbox-block";
|
|
3
3
|
export declare class CheckboxBlock extends Block {
|
|
4
|
-
constructor();
|
|
5
4
|
getId(): string;
|
|
6
5
|
getIcon(): string;
|
|
7
6
|
getBlockCompositionType(): BlockCompositionType;
|
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
import { Block as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Block as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
3
|
+
import { BlockCompositionType as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
4
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
5
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
11
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
13
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
14
|
+
import { getDefaultTemplate as r } from "./template.js";
|
|
15
|
+
const e = "checkbox-block";
|
|
16
|
+
class x extends t {
|
|
8
17
|
getId() {
|
|
9
|
-
return
|
|
18
|
+
return e;
|
|
10
19
|
}
|
|
11
20
|
getIcon() {
|
|
12
|
-
return "
|
|
21
|
+
return "check-circle";
|
|
13
22
|
}
|
|
14
23
|
getBlockCompositionType() {
|
|
15
|
-
return
|
|
24
|
+
return o.BLOCK;
|
|
16
25
|
}
|
|
17
26
|
getName() {
|
|
18
|
-
return this.api.translate("Checkbox
|
|
27
|
+
return this.api.translate("Checkbox block");
|
|
19
28
|
}
|
|
20
29
|
getDescription() {
|
|
21
|
-
return this.api.translate("Checkbox
|
|
30
|
+
return this.api.translate("Checkbox block description");
|
|
22
31
|
}
|
|
23
32
|
getTemplate() {
|
|
24
|
-
return
|
|
33
|
+
return r();
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
e as CHECKBOX_BLOCK_ID,
|
|
38
|
+
x as CheckboxBlock
|
|
30
39
|
};
|
|
@@ -1,92 +1,104 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useHttp as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var c = (o, s, t) => s in o ? E(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
|
|
3
|
+
var a = (o, s, t) => c(o, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { useHttp as p } from "../../../composables/useHttp.js";
|
|
5
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
11
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
13
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
14
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
15
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
16
|
+
import { UEAttr as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js";
|
|
17
|
+
import { UIElementType as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
18
|
+
import { Control as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js";
|
|
19
|
+
import { ModificationDescription as l } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js";
|
|
20
|
+
const d = "ui-elements-checkbox", n = "select", { get: L } = p();
|
|
21
|
+
class K extends m {
|
|
9
22
|
constructor() {
|
|
10
23
|
super(...arguments);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
a(this, "currentNode");
|
|
25
|
+
a(this, "selectedUnsubGroup");
|
|
26
|
+
a(this, "unsubList", []);
|
|
14
27
|
}
|
|
15
28
|
getId() {
|
|
16
|
-
return
|
|
29
|
+
return d;
|
|
17
30
|
}
|
|
18
31
|
_setFormValues() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const s = e === u.sendGridId ? e : Number(e);
|
|
23
|
-
s && (this.selectedUnsubGroup = s, this.api.updateValues({
|
|
24
|
-
[a]: this.selectedUnsubGroup
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
32
|
+
this.api.updateValues({
|
|
33
|
+
[n]: ""
|
|
34
|
+
});
|
|
28
35
|
}
|
|
29
|
-
_getLabel(
|
|
36
|
+
_getLabel(t, i = `${Math.random()}`) {
|
|
30
37
|
return `
|
|
31
|
-
<${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
</${
|
|
38
|
+
<${r.LABEL}
|
|
39
|
+
${e.LABEL.text}="${t}"
|
|
40
|
+
${e.LABEL.name}="${i}">
|
|
41
|
+
</${r.LABEL}>
|
|
35
42
|
`;
|
|
36
43
|
}
|
|
37
|
-
_getSelectItem(
|
|
44
|
+
_getSelectItem(t, i) {
|
|
38
45
|
return `
|
|
39
|
-
<${
|
|
40
|
-
${
|
|
41
|
-
${
|
|
42
|
-
</${
|
|
46
|
+
<${r.SELECT_ITEM}
|
|
47
|
+
${e.SELECT_ITEM.text}="${t}"
|
|
48
|
+
${e.SELECT_ITEM.value}="${i}">
|
|
49
|
+
</${r.SELECT_ITEM}>`;
|
|
43
50
|
}
|
|
44
51
|
_getSelect() {
|
|
45
|
-
return this.unsubList.map((
|
|
52
|
+
return this.unsubList.map((t) => this._getSelectItem(t.name, t.sendGridId)).join("");
|
|
46
53
|
}
|
|
47
54
|
getTemplate() {
|
|
48
55
|
return `
|
|
49
56
|
<div class="checkbox-controls-container">
|
|
50
57
|
<div class="checkbox-select-container container two-columns stretch">
|
|
51
|
-
<${
|
|
52
|
-
${
|
|
53
|
-
${
|
|
54
|
-
</${
|
|
58
|
+
<${r.LABEL}
|
|
59
|
+
${e.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
|
|
60
|
+
${e.LABEL.name}="${Math.random()}">
|
|
61
|
+
</${r.LABEL}>
|
|
55
62
|
|
|
56
|
-
<${
|
|
57
|
-
${
|
|
58
|
-
${
|
|
63
|
+
<${r.SELECTPICKER}
|
|
64
|
+
${e.SELECTPICKER.name}="${n}"
|
|
65
|
+
${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
59
66
|
${this._getSelect()}
|
|
60
|
-
</${
|
|
67
|
+
</${r.SELECTPICKER}>
|
|
61
68
|
</div>
|
|
62
69
|
</div>
|
|
63
70
|
`;
|
|
64
71
|
}
|
|
65
|
-
_onSelectChange(
|
|
66
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id",
|
|
72
|
+
_onSelectChange(t) {
|
|
73
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new l(`Updated text to ${t}`));
|
|
67
74
|
}
|
|
68
75
|
_listenToFormUpdates() {
|
|
69
|
-
this.api.onValueChanged(
|
|
76
|
+
this.api.onValueChanged(n, (t) => this._onSelectChange(t));
|
|
70
77
|
}
|
|
71
|
-
onTemplateNodeUpdated(
|
|
72
|
-
this.currentNode =
|
|
78
|
+
onTemplateNodeUpdated(t) {
|
|
79
|
+
if (this.currentNode = t, "getAttribute" in t) {
|
|
80
|
+
const i = Number(t.getAttribute("id"));
|
|
81
|
+
i && (this.selectedUnsubGroup = i, this.api.updateValues({
|
|
82
|
+
[n]: this.selectedUnsubGroup
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
73
85
|
}
|
|
74
86
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
75
87
|
async onRender() {
|
|
76
|
-
const
|
|
88
|
+
const t = await L(
|
|
77
89
|
"/unsubscribe-groups/unsubscribe-list"
|
|
78
|
-
),
|
|
79
|
-
[
|
|
80
|
-
[
|
|
90
|
+
), i = t.data.map((u) => ({
|
|
91
|
+
[e.SELECT_ITEM.text]: u.name,
|
|
92
|
+
[e.SELECT_ITEM.value]: u.sendGridId
|
|
81
93
|
}));
|
|
82
|
-
this.unsubList =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
this.unsubList = t.data, this.api.setUIEAttribute(
|
|
95
|
+
n,
|
|
96
|
+
e.SELECTPICKER.items,
|
|
97
|
+
i
|
|
86
98
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
101
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
d as CHECKBOX_CONTROL_BLOCK_ID,
|
|
103
|
+
K as CheckboxControl
|
|
92
104
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
+
import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js";
|
|
2
14
|
import { CheckboxBlock as t } from "./block.js";
|
|
3
|
-
import { CheckboxControl as
|
|
4
|
-
import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
|
|
15
|
+
import { CheckboxControl as r } from "./control.js";
|
|
5
16
|
import { CheckboxBlockSettings as i } from "./settingsPanel.js";
|
|
6
|
-
const
|
|
17
|
+
const g = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(r).build();
|
|
7
18
|
export {
|
|
8
|
-
|
|
19
|
+
g as default
|
|
9
20
|
};
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
+
import { ContainerControls as i, TextControls as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
+
import { SettingsTab as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
+
import { SettingsPanelRegistry as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js";
|
|
14
|
+
import { SettingsPanelTab as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js";
|
|
15
|
+
import { CHECKBOX_BLOCK_ID as p } from "./block.js";
|
|
16
|
+
import { CHECKBOX_CONTROL_BLOCK_ID as C } from "./control.js";
|
|
17
|
+
class x extends e {
|
|
18
|
+
registerBlockControls(r) {
|
|
19
|
+
r[p] = [
|
|
7
20
|
new t(
|
|
8
|
-
|
|
21
|
+
o.SETTINGS,
|
|
9
22
|
[
|
|
10
|
-
|
|
11
|
-
|
|
23
|
+
C,
|
|
24
|
+
i.EXTERNAL_INDENTS
|
|
12
25
|
]
|
|
13
26
|
),
|
|
14
27
|
new t(
|
|
15
|
-
|
|
28
|
+
o.STYLES,
|
|
16
29
|
[
|
|
17
|
-
|
|
30
|
+
m.TEXT_BLOCK_BACKGROUND_COLOR
|
|
18
31
|
]
|
|
19
32
|
)
|
|
20
33
|
];
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
export {
|
|
24
|
-
|
|
37
|
+
x as CheckboxBlockSettings
|
|
25
38
|
};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
+
import { BlockType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
2
13
|
const e = {
|
|
3
14
|
TITLE: "Unsubscribe From All Email Lists",
|
|
4
15
|
DESCRIPTION: "You will still receive important transactional and billing-related emails."
|
|
@@ -26,7 +37,7 @@ const e = {
|
|
|
26
37
|
</tbody>
|
|
27
38
|
</table>
|
|
28
39
|
</td>
|
|
29
|
-
`,
|
|
40
|
+
`, m = `
|
|
30
41
|
<td
|
|
31
42
|
align="left"
|
|
32
43
|
esd-extension-block-id="checkbox-block"
|
|
@@ -55,10 +66,10 @@ const e = {
|
|
|
55
66
|
</table>
|
|
56
67
|
</td>
|
|
57
68
|
`;
|
|
58
|
-
function
|
|
69
|
+
function h() {
|
|
59
70
|
return l.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`);
|
|
60
71
|
}
|
|
61
72
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
m as default,
|
|
74
|
+
h as getDefaultTemplate
|
|
64
75
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
2
|
export declare const BLOCK_ID = "radio-button-block";
|
|
3
3
|
export declare class RadioButtonCustomBlock extends Block {
|
|
4
|
-
constructor();
|
|
5
4
|
getId(): string;
|
|
6
5
|
getIcon(): string;
|
|
7
6
|
getBlockCompositionType(): BlockCompositionType;
|