@useinsider/guido 3.30.1 → 3.30.2-beta.779a6a4

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.
Files changed (31) hide show
  1. package/README.md +12 -1
  2. package/dist/components/Guido.vue.js +5 -5
  3. package/dist/components/Guido.vue2.js +115 -109
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +1 -1
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +54 -48
  6. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.js +17 -0
  7. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue2.js +30 -0
  8. package/dist/composables/useModuleRepair.js +56 -50
  9. package/dist/composables/useStripo.js +87 -79
  10. package/dist/config/migrator/index.js +14 -13
  11. package/dist/config/migrator/recommendation/cssCascade.js +84 -0
  12. package/dist/config/migrator/recommendation/extractors.js +195 -89
  13. package/dist/config/migrator/recommendation/themeMapper.js +33 -21
  14. package/dist/config/migrator/recommendationMigrator.js +70 -63
  15. package/dist/config/migrator/sfmcUnsubscribeTextMigrator.js +20 -0
  16. package/dist/enums/academy.js +2 -1
  17. package/dist/guido.css +1 -1
  18. package/dist/package.json.js +2 -2
  19. package/dist/src/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.d.ts +2 -0
  20. package/dist/src/composables/useModuleRepair.d.ts +1 -1
  21. package/dist/src/config/migrator/index.d.ts +1 -1
  22. package/dist/src/config/migrator/recommendation/cssCascade.d.ts +24 -0
  23. package/dist/src/config/migrator/recommendation/extractors.d.ts +18 -1
  24. package/dist/src/config/migrator/recommendationMigrator.d.ts +2 -1
  25. package/dist/src/config/migrator/sfmcUnsubscribeTextMigrator.d.ts +1 -0
  26. package/dist/src/enums/academy.d.ts +1 -0
  27. package/dist/src/stores/editor.d.ts +54 -0
  28. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +3 -0
  29. package/dist/stores/editor.js +2 -0
  30. package/dist/utils/legacyUnsubscribeConversion.js +69 -28
  31. package/package.json +1 -1
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-c8351f74]{gap:16px}.validation-error-row[data-v-c8351f74]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-c8351f74]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-c8351f74]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-f5ff6219]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-f5ff6219]{min-height:504px}.iframe-wrapper[data-v-a7102458]{width:258px}.iframe-scaled[data-v-a7102458]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-c8351f74]{gap:16px}.validation-error-row[data-v-c8351f74]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-c8351f74]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-c8351f74]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-b0036f48]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-b0036f48]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-b0036f48]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-f5ff6219]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-f5ff6219]{min-height:504px}.iframe-wrapper[data-v-a7102458]{width:258px}.iframe-scaled[data-v-a7102458]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
@@ -1,9 +1,9 @@
1
- const o = "3.30.1", s = { stripo: { version: "2.87.0" } }, n = {
1
+ const o = "3.30.2-beta.779a6a4", s = { stripo: { version: "2.87.0" } }, a = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
5
5
  export {
6
- n as default,
6
+ a as default,
7
7
  s as guido,
8
8
  o as version
9
9
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -4,7 +4,7 @@ import { type DynamicContentConversionResult } from '@@/Utils/dynamicContentConv
4
4
  export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
5
5
  export declare const registerUsedAttributes: (html: string, candidates: DynamicContentCandidate[]) => void;
6
6
  /**
7
- * Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
7
+ * Repairs dropped/copied saved modules (items currency, unsubscribe → text block,
8
8
  * dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
9
9
  */
10
10
  export declare const useModuleRepair: () => {
@@ -3,4 +3,4 @@ import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrat
3
3
  export interface MigrationFeatureFlags {
4
4
  itemsPriceFormatting?: boolean;
5
5
  }
6
- export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions, features?: MigrationFeatureFlags) => Promise<string>;
6
+ export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions, features?: MigrationFeatureFlags, css?: string) => Promise<string>;
@@ -0,0 +1,24 @@
1
+ export type StyleDeclaration = {
2
+ prop: string;
3
+ value: string;
4
+ important: boolean;
5
+ };
6
+ export type CssRule = {
7
+ selectors: string[];
8
+ declarations: StyleDeclaration[];
9
+ };
10
+ export type ResolvedStyle = Map<string, {
11
+ value: string;
12
+ position: number;
13
+ }>;
14
+ export declare function parseDeclarations(text: string): StyleDeclaration[];
15
+ /**
16
+ * Parses the top-level style rules of a stylesheet; at-rules such as `@media` are skipped
17
+ * because they apply only to other screen sizes or clients, not to the desktop render.
18
+ */
19
+ export declare function parseCssRules(css: string): CssRule[];
20
+ /**
21
+ * Resolves the element's declared style the way the legacy editor rendered it: matching stylesheet rules,
22
+ * then the inline style, ordered by the CSS cascade (importance, inline over stylesheet, specificity, order).
23
+ */
24
+ export declare function resolveDeclaredStyle(element: Element | null, rules: CssRule[]): ResolvedStyle;
@@ -1,4 +1,5 @@
1
- import type { LegacyPaddingViewport, LegacyVariable } from './types';
1
+ import type { CssRule } from './cssCascade';
2
+ import type { LegacyButtonTheme, LegacyPaddingViewport, LegacyVariable } from './types';
2
3
  export declare function extractTitleText(block: Element): string;
3
4
  /**
4
5
  * Fallback for legacy configs that carry no `p_recommendation_title` variable:
@@ -33,6 +34,22 @@ export declare function isPriceOnNextLine(block: Element): boolean;
33
34
  * @returns The variables, with `textColor` / `textTrimming` filled from the rendered HTML where the theme lacks them
34
35
  */
35
36
  export declare function withRenderedTextTheme(variables: LegacyVariable[] | undefined, block: Element): LegacyVariable[] | undefined;
37
+ /**
38
+ * Reads the first legacy product button's colors, border and internal padding as the legacy editor rendered them.
39
+ * @param block - The legacy recommendation block element
40
+ * @param theme - The legacy button theme; its colors and border are not read again, its internal padding is
41
+ * @param cssRules - The template stylesheet's rules; legacy templates keep the button's text color and border there
42
+ * @returns Only the keys filled from the rendered button, or an empty object
43
+ */
44
+ export declare function extractRenderedButtonTheme(block: Element, theme?: LegacyButtonTheme, cssRules?: CssRule[]): LegacyButtonTheme;
45
+ /**
46
+ * Legacy keeps the product button's colors, border and internal padding on the rendered button and its stylesheet.
47
+ * @param variables - The legacy composition variables
48
+ * @param block - The legacy recommendation block element
49
+ * @param cssRules - The template stylesheet's rules
50
+ * @returns The variables, with the `p_button` theme filled from the rendered button where the theme lacks a value
51
+ */
52
+ export declare function withRenderedButtonTheme(variables: LegacyVariable[] | undefined, block: Element, cssRules?: CssRule[]): LegacyVariable[] | undefined;
36
53
  /**
37
54
  * Card background lives on either the block (`bgcolor`/`style`) or per-card
38
55
  * cells (`.product-card`). Returns empty string when no background is set —
@@ -8,6 +8,7 @@ import type { LegacyRecommendationConfig } from '@@/Types/config';
8
8
  * Migrate all legacy Recommendation Blocks in the given HTML string.
9
9
  * @param html - Full template HTML.
10
10
  * @param recommendationConfigs - Map of campaign-id → legacy config (`Record<string, LegacyRecommendationConfig>`).
11
+ * @param css - The template stylesheet, where legacy templates keep the product button's colors and border.
11
12
  * @returns Migrated HTML, or the original HTML if no legacy blocks exist.
12
13
  */
13
- export declare function migrateRecommendation(html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>): string;
14
+ export declare function migrateRecommendation(html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, css?: string): string;
@@ -0,0 +1 @@
1
+ export declare const migrateSfmcUnsubscribeText: (html: string) => string;
@@ -11,5 +11,6 @@ export declare const ACADEMY_LINKS: {
11
11
  readonly EMAIL_DISPLAY_CONDITIONS: "https://academy.insiderone.com/docs/new-editor-add-display-conditions-to-an-email";
12
12
  readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
13
13
  readonly LEGACY_UNSUBSCRIBE_MODULE: "https://academy.insiderone.com/docs/new-editor-add-unsubscribe-pages-into-emails";
14
+ readonly SFMC_RELAY: "https://academy.insiderone.com/docs/sfmc-relay";
14
15
  };
15
16
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -13,6 +13,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
13
13
  changeSeq: number;
14
14
  isStripoInitialized: boolean;
15
15
  isLegacyUnsubscribeModalRequested: boolean;
16
+ isSfmcUnsubscribeModalRequested: boolean;
17
+ isUnsubscribeConvertedOnLoad: boolean;
16
18
  templateId: string;
17
19
  syncModulesEnabled: boolean;
18
20
  trackIdSessionFloor: number;
@@ -31,6 +33,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
31
33
  changeSeq: number;
32
34
  isStripoInitialized: boolean;
33
35
  isLegacyUnsubscribeModalRequested: boolean;
36
+ isSfmcUnsubscribeModalRequested: boolean;
37
+ isUnsubscribeConvertedOnLoad: boolean;
34
38
  templateId: string;
35
39
  syncModulesEnabled: boolean;
36
40
  trackIdSessionFloor: number;
@@ -48,6 +52,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
48
52
  changeSeq: number;
49
53
  isStripoInitialized: boolean;
50
54
  isLegacyUnsubscribeModalRequested: boolean;
55
+ isSfmcUnsubscribeModalRequested: boolean;
56
+ isUnsubscribeConvertedOnLoad: boolean;
51
57
  templateId: string;
52
58
  syncModulesEnabled: boolean;
53
59
  trackIdSessionFloor: number;
@@ -66,6 +72,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
66
72
  changeSeq: number;
67
73
  isStripoInitialized: boolean;
68
74
  isLegacyUnsubscribeModalRequested: boolean;
75
+ isSfmcUnsubscribeModalRequested: boolean;
76
+ isUnsubscribeConvertedOnLoad: boolean;
69
77
  templateId: string;
70
78
  syncModulesEnabled: boolean;
71
79
  trackIdSessionFloor: number;
@@ -83,6 +91,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
83
91
  changeSeq: number;
84
92
  isStripoInitialized: boolean;
85
93
  isLegacyUnsubscribeModalRequested: boolean;
94
+ isSfmcUnsubscribeModalRequested: boolean;
95
+ isUnsubscribeConvertedOnLoad: boolean;
86
96
  templateId: string;
87
97
  syncModulesEnabled: boolean;
88
98
  trackIdSessionFloor: number;
@@ -101,6 +111,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
101
111
  changeSeq: number;
102
112
  isStripoInitialized: boolean;
103
113
  isLegacyUnsubscribeModalRequested: boolean;
114
+ isSfmcUnsubscribeModalRequested: boolean;
115
+ isUnsubscribeConvertedOnLoad: boolean;
104
116
  templateId: string;
105
117
  syncModulesEnabled: boolean;
106
118
  trackIdSessionFloor: number;
@@ -118,6 +130,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
118
130
  changeSeq: number;
119
131
  isStripoInitialized: boolean;
120
132
  isLegacyUnsubscribeModalRequested: boolean;
133
+ isSfmcUnsubscribeModalRequested: boolean;
134
+ isUnsubscribeConvertedOnLoad: boolean;
121
135
  templateId: string;
122
136
  syncModulesEnabled: boolean;
123
137
  trackIdSessionFloor: number;
@@ -136,6 +150,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
136
150
  changeSeq: number;
137
151
  isStripoInitialized: boolean;
138
152
  isLegacyUnsubscribeModalRequested: boolean;
153
+ isSfmcUnsubscribeModalRequested: boolean;
154
+ isUnsubscribeConvertedOnLoad: boolean;
139
155
  templateId: string;
140
156
  syncModulesEnabled: boolean;
141
157
  trackIdSessionFloor: number;
@@ -153,6 +169,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
153
169
  changeSeq: number;
154
170
  isStripoInitialized: boolean;
155
171
  isLegacyUnsubscribeModalRequested: boolean;
172
+ isSfmcUnsubscribeModalRequested: boolean;
173
+ isUnsubscribeConvertedOnLoad: boolean;
156
174
  templateId: string;
157
175
  syncModulesEnabled: boolean;
158
176
  trackIdSessionFloor: number;
@@ -171,6 +189,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
171
189
  changeSeq: number;
172
190
  isStripoInitialized: boolean;
173
191
  isLegacyUnsubscribeModalRequested: boolean;
192
+ isSfmcUnsubscribeModalRequested: boolean;
193
+ isUnsubscribeConvertedOnLoad: boolean;
174
194
  templateId: string;
175
195
  syncModulesEnabled: boolean;
176
196
  trackIdSessionFloor: number;
@@ -188,6 +208,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
188
208
  changeSeq: number;
189
209
  isStripoInitialized: boolean;
190
210
  isLegacyUnsubscribeModalRequested: boolean;
211
+ isSfmcUnsubscribeModalRequested: boolean;
212
+ isUnsubscribeConvertedOnLoad: boolean;
191
213
  templateId: string;
192
214
  syncModulesEnabled: boolean;
193
215
  trackIdSessionFloor: number;
@@ -206,6 +228,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
206
228
  changeSeq: number;
207
229
  isStripoInitialized: boolean;
208
230
  isLegacyUnsubscribeModalRequested: boolean;
231
+ isSfmcUnsubscribeModalRequested: boolean;
232
+ isUnsubscribeConvertedOnLoad: boolean;
209
233
  templateId: string;
210
234
  syncModulesEnabled: boolean;
211
235
  trackIdSessionFloor: number;
@@ -223,6 +247,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
223
247
  changeSeq: number;
224
248
  isStripoInitialized: boolean;
225
249
  isLegacyUnsubscribeModalRequested: boolean;
250
+ isSfmcUnsubscribeModalRequested: boolean;
251
+ isUnsubscribeConvertedOnLoad: boolean;
226
252
  templateId: string;
227
253
  syncModulesEnabled: boolean;
228
254
  trackIdSessionFloor: number;
@@ -241,6 +267,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
241
267
  changeSeq: number;
242
268
  isStripoInitialized: boolean;
243
269
  isLegacyUnsubscribeModalRequested: boolean;
270
+ isSfmcUnsubscribeModalRequested: boolean;
271
+ isUnsubscribeConvertedOnLoad: boolean;
244
272
  templateId: string;
245
273
  syncModulesEnabled: boolean;
246
274
  trackIdSessionFloor: number;
@@ -258,6 +286,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
258
286
  changeSeq: number;
259
287
  isStripoInitialized: boolean;
260
288
  isLegacyUnsubscribeModalRequested: boolean;
289
+ isSfmcUnsubscribeModalRequested: boolean;
290
+ isUnsubscribeConvertedOnLoad: boolean;
261
291
  templateId: string;
262
292
  syncModulesEnabled: boolean;
263
293
  trackIdSessionFloor: number;
@@ -276,6 +306,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
276
306
  changeSeq: number;
277
307
  isStripoInitialized: boolean;
278
308
  isLegacyUnsubscribeModalRequested: boolean;
309
+ isSfmcUnsubscribeModalRequested: boolean;
310
+ isUnsubscribeConvertedOnLoad: boolean;
279
311
  templateId: string;
280
312
  syncModulesEnabled: boolean;
281
313
  trackIdSessionFloor: number;
@@ -293,6 +325,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
293
325
  changeSeq: number;
294
326
  isStripoInitialized: boolean;
295
327
  isLegacyUnsubscribeModalRequested: boolean;
328
+ isSfmcUnsubscribeModalRequested: boolean;
329
+ isUnsubscribeConvertedOnLoad: boolean;
296
330
  templateId: string;
297
331
  syncModulesEnabled: boolean;
298
332
  trackIdSessionFloor: number;
@@ -311,6 +345,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
311
345
  changeSeq: number;
312
346
  isStripoInitialized: boolean;
313
347
  isLegacyUnsubscribeModalRequested: boolean;
348
+ isSfmcUnsubscribeModalRequested: boolean;
349
+ isUnsubscribeConvertedOnLoad: boolean;
314
350
  templateId: string;
315
351
  syncModulesEnabled: boolean;
316
352
  trackIdSessionFloor: number;
@@ -328,6 +364,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
328
364
  changeSeq: number;
329
365
  isStripoInitialized: boolean;
330
366
  isLegacyUnsubscribeModalRequested: boolean;
367
+ isSfmcUnsubscribeModalRequested: boolean;
368
+ isUnsubscribeConvertedOnLoad: boolean;
331
369
  templateId: string;
332
370
  syncModulesEnabled: boolean;
333
371
  trackIdSessionFloor: number;
@@ -346,6 +384,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
346
384
  changeSeq: number;
347
385
  isStripoInitialized: boolean;
348
386
  isLegacyUnsubscribeModalRequested: boolean;
387
+ isSfmcUnsubscribeModalRequested: boolean;
388
+ isUnsubscribeConvertedOnLoad: boolean;
349
389
  templateId: string;
350
390
  syncModulesEnabled: boolean;
351
391
  trackIdSessionFloor: number;
@@ -363,6 +403,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
363
403
  changeSeq: number;
364
404
  isStripoInitialized: boolean;
365
405
  isLegacyUnsubscribeModalRequested: boolean;
406
+ isSfmcUnsubscribeModalRequested: boolean;
407
+ isUnsubscribeConvertedOnLoad: boolean;
366
408
  templateId: string;
367
409
  syncModulesEnabled: boolean;
368
410
  trackIdSessionFloor: number;
@@ -381,6 +423,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
381
423
  changeSeq: number;
382
424
  isStripoInitialized: boolean;
383
425
  isLegacyUnsubscribeModalRequested: boolean;
426
+ isSfmcUnsubscribeModalRequested: boolean;
427
+ isUnsubscribeConvertedOnLoad: boolean;
384
428
  templateId: string;
385
429
  syncModulesEnabled: boolean;
386
430
  trackIdSessionFloor: number;
@@ -398,6 +442,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
398
442
  changeSeq: number;
399
443
  isStripoInitialized: boolean;
400
444
  isLegacyUnsubscribeModalRequested: boolean;
445
+ isSfmcUnsubscribeModalRequested: boolean;
446
+ isUnsubscribeConvertedOnLoad: boolean;
401
447
  templateId: string;
402
448
  syncModulesEnabled: boolean;
403
449
  trackIdSessionFloor: number;
@@ -416,6 +462,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
416
462
  changeSeq: number;
417
463
  isStripoInitialized: boolean;
418
464
  isLegacyUnsubscribeModalRequested: boolean;
465
+ isSfmcUnsubscribeModalRequested: boolean;
466
+ isUnsubscribeConvertedOnLoad: boolean;
419
467
  templateId: string;
420
468
  syncModulesEnabled: boolean;
421
469
  trackIdSessionFloor: number;
@@ -433,6 +481,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
433
481
  changeSeq: number;
434
482
  isStripoInitialized: boolean;
435
483
  isLegacyUnsubscribeModalRequested: boolean;
484
+ isSfmcUnsubscribeModalRequested: boolean;
485
+ isUnsubscribeConvertedOnLoad: boolean;
436
486
  templateId: string;
437
487
  syncModulesEnabled: boolean;
438
488
  trackIdSessionFloor: number;
@@ -451,6 +501,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
451
501
  changeSeq: number;
452
502
  isStripoInitialized: boolean;
453
503
  isLegacyUnsubscribeModalRequested: boolean;
504
+ isSfmcUnsubscribeModalRequested: boolean;
505
+ isUnsubscribeConvertedOnLoad: boolean;
454
506
  templateId: string;
455
507
  syncModulesEnabled: boolean;
456
508
  trackIdSessionFloor: number;
@@ -468,6 +520,8 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
468
520
  changeSeq: number;
469
521
  isStripoInitialized: boolean;
470
522
  isLegacyUnsubscribeModalRequested: boolean;
523
+ isSfmcUnsubscribeModalRequested: boolean;
524
+ isUnsubscribeConvertedOnLoad: boolean;
471
525
  templateId: string;
472
526
  syncModulesEnabled: boolean;
473
527
  trackIdSessionFloor: number;
@@ -5,6 +5,9 @@ export interface LegacyUnsubscribeConversionResult {
5
5
  converted: boolean;
6
6
  }
7
7
  export declare const hasLegacyUnsubscribeClass: (html: string) => boolean;
8
+ export declare const hasAnyUnsubscribeClass: (html: string) => boolean;
8
9
  export declare const convertLinklessLegacyUnsubscribeBlocks: (root: ParentNode) => number;
9
10
  export declare const convertLegacyUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
10
11
  export declare const convertLegacyUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
12
+ export declare const convertAllUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
13
+ export declare const convertAllUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
@@ -17,6 +17,8 @@ const o = e("guidoEditor", {
17
17
  changeSeq: 0,
18
18
  isStripoInitialized: !1,
19
19
  isLegacyUnsubscribeModalRequested: !1,
20
+ isSfmcUnsubscribeModalRequested: !1,
21
+ isUnsubscribeConvertedOnLoad: !1,
20
22
  templateId: "",
21
23
  syncModulesEnabled: !1,
22
24
  // In-session id high-water mark; floors tracking-id minting so ids
@@ -1,49 +1,90 @@
1
- import { protectLiquid as a, restoreLiquid as u } from "./liquidProtection.js";
2
- const b = "td.unsubscribe-block", l = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], d = "esd-block-text", m = [
1
+ import { hasInsiderUnsubscribeCode as f } from "../composables/validators/useUnsubscribeBlockValidator.js";
2
+ import { UNSUBSCRIBE_LINK_SELECTOR as A } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
+ import { protectLiquid as C, restoreLiquid as _ } from "./liquidProtection.js";
4
+ const u = "td.unsubscribe-block", p = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], v = `${u}, .unsubscribe-block-v2`, y = "esd-block-text", U = [
3
5
  "unsubscribe-block",
4
6
  "esd-extension",
5
7
  "esd-extension-block",
6
8
  "esd-unsubscribe-block",
7
9
  "esd-block-unsubscribe"
8
- ], L = "esd-extension-block-id", S = "data-unsubscribe-", E = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", f = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), p = (e) => typeof e == "string" && f.test(e), y = (e) => l.some((t) => e.querySelector(t) !== null), g = (e) => {
9
- e.classList.remove(...m), e.classList.add(d), e.removeAttribute(L), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(S)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(E) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
10
- }, h = (e) => {
11
- const t = Array.from(e.querySelectorAll(b)).filter((r) => !y(r));
12
- return t.forEach(g), t.length;
13
- }, v = (e) => {
10
+ ], h = "unsubscribe-block-v2", T = "esd-extension-block-id", l = "data-unsubscribe-", g = "unsubscribe-link", k = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", I = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), N = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?:-v2)?(?![\\w-])`, "i"), R = (e) => typeof e == "string" && I.test(e), B = (e) => p.some((t) => e.querySelector(t) !== null), b = (e) => {
11
+ e.classList.remove(...U), e.classList.add(y), e.removeAttribute(T), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(l)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(k) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
12
+ }, O = (e) => {
13
+ const t = e.getAttribute("href") ?? "";
14
+ return f(t) || t.trim() === "" && e.matches(A);
15
+ }, M = (e) => {
16
+ e.classList.remove(g), e.classList.length === 0 && e.removeAttribute("class"), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(l)).forEach(({ name: t }) => e.removeAttribute(t));
17
+ }, x = (e) => {
18
+ Array.from(e.querySelectorAll("a")).forEach((t) => {
19
+ if (O(t)) {
20
+ t.replaceWith(...Array.from(t.childNodes));
21
+ return;
22
+ }
23
+ M(t);
24
+ });
25
+ }, q = (e) => typeof e == "string" && N.test(e), D = (e) => {
26
+ const t = Array.from(e.querySelectorAll(v));
27
+ return t.forEach((r) => {
28
+ r.classList.remove(h), x(r), b(r);
29
+ }), t.length;
30
+ }, H = (e) => {
31
+ const t = Array.from(e.querySelectorAll(u)).filter((r) => !B(r));
32
+ return t.forEach(b), t.length;
33
+ }, a = (e) => {
14
34
  const t = e.trimStart(), r = new DOMParser();
15
35
  return /^<t[dh][\s>]/i.test(t) ? r.parseFromString(`<table><tbody><tr>${e}</tr></tbody></table>`, "text/html").querySelector("tr") : /^<tr[\s>]/i.test(t) ? r.parseFromString(`<table><tbody>${e}</tbody></table>`, "text/html").querySelector("tbody") : /^<table[\s>]/i.test(t) ? r.parseFromString(e, "text/html").body : (console.debug("[LegacyUnsubscribeConversion] Skipped module with a non-table root"), null);
16
- }, c = (e) => {
36
+ }, d = (e) => {
17
37
  const t = e.search(/<html[\s>]/i), r = [...e.matchAll(/<\/html\s*>/gi)].at(-1), s = (r == null ? void 0 : r.index) === void 0 ? -1 : r.index + r[0].length;
18
38
  return t < 0 || s <= t ? { head: "", root: e, tail: "" } : { head: e.slice(0, t), root: e.slice(t, s), tail: e.slice(s) };
19
- }, i = (e, t, r, s) => {
20
- if (!p(e))
39
+ }, K = {
40
+ detect: R,
41
+ convertCells: H
42
+ }, S = {
43
+ detect: q,
44
+ convertCells: D
45
+ }, n = (e, t, r, s, i = K) => {
46
+ if (!i.detect(e))
21
47
  return { html: e, converted: !1 };
22
48
  try {
23
- const o = a(e), n = t(o);
24
- return !n || h(n) === 0 ? { html: e, converted: !1 } : { html: u(r(n, o)), converted: !0 };
49
+ const o = C(e), c = t(o);
50
+ return !c || i.convertCells(c) === 0 ? { html: e, converted: !1 } : { html: _(r(c, o)), converted: !0 };
25
51
  } catch (o) {
26
52
  return console.error(`Failed to convert legacy unsubscribe blocks in ${s}:`, o), { html: e, converted: !1 };
27
53
  }
28
- }, C = (e) => i(
54
+ }, m = (e) => e.innerHTML, E = (e) => new DOMParser().parseFromString(d(e).root, "text/html"), L = (e, t) => {
55
+ const { head: r, tail: s } = d(t);
56
+ return `${r}${e.documentElement.outerHTML}${s}`;
57
+ }, F = (e) => n(
29
58
  e,
30
- v,
31
- (t) => t.innerHTML,
59
+ a,
60
+ m,
32
61
  "module"
33
- ), _ = (e) => i(
62
+ ), G = (e) => n(
34
63
  e,
35
- (t) => new DOMParser().parseFromString(c(t).root, "text/html"),
36
- (t, r) => {
37
- const { head: s, tail: o } = c(r);
38
- return `${s}${t.documentElement.outerHTML}${o}`;
39
- },
64
+ E,
65
+ L,
40
66
  "document"
67
+ ), P = (e) => n(
68
+ e,
69
+ a,
70
+ m,
71
+ "module",
72
+ S
73
+ ), V = (e) => n(
74
+ e,
75
+ E,
76
+ L,
77
+ "document",
78
+ S
41
79
  );
42
80
  export {
43
- l as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
44
- b as LEGACY_UNSUBSCRIBE_SELECTOR,
45
- _ as convertLegacyUnsubscribeInDocumentHtml,
46
- C as convertLegacyUnsubscribeInModuleHtml,
47
- h as convertLinklessLegacyUnsubscribeBlocks,
48
- p as hasLegacyUnsubscribeClass
81
+ p as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
82
+ u as LEGACY_UNSUBSCRIBE_SELECTOR,
83
+ V as convertAllUnsubscribeInDocumentHtml,
84
+ P as convertAllUnsubscribeInModuleHtml,
85
+ G as convertLegacyUnsubscribeInDocumentHtml,
86
+ F as convertLegacyUnsubscribeInModuleHtml,
87
+ H as convertLinklessLegacyUnsubscribeBlocks,
88
+ q as hasAnyUnsubscribeClass,
89
+ R as hasLegacyUnsubscribeClass
49
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.30.1",
3
+ "version": "3.30.2-beta.779a6a4",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",