@useinsider/guido 3.28.1-beta.5919d57 → 3.28.1-beta.6aafa21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -173,6 +173,7 @@ const config: GuidoConfigInput = {
173
173
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
174
174
  allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
175
175
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
176
+ dynamicContentSpecialLinks?: boolean, // Default: false - List the catalogue's URL attributes (token ends in `url` or `url_<n>`) and every Call an API variable as Stripo special links (Personalization tab of the link type selector)
176
177
  legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
177
178
  accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
178
179
  itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
@@ -690,6 +691,21 @@ const closeModal = () => {
690
691
  </script>
691
692
  ```
692
693
 
694
+ ### Special links in the link type selector
695
+
696
+ Behind `features.dynamicContentSpecialLinks` (default `false`). Guido passes the `template.dynamicContentList`
697
+ catalogue to Stripo as `specialLinks`, one group per top-level category, keeping only the attributes whose
698
+ token ends in `url` or `url_<n>` (`last_visited_product_url`, `ins_apr_url_1`), each entry valued `{{token}}`.
699
+ Call an API variables are the exception: their tokens are id-based (`call_an_api_response_<id>`) and carry no
700
+ usable type, so the whole category is listed as its own group regardless of suffix. The link type dropdown of
701
+ link fields gains a **Personalization** tab with those groups and a search box; picking an entry writes the
702
+ token into the URL field and the dropdown label shows the entry's label.
703
+
704
+ - Link fields only: the image path, alt text and button text are not covered; they keep Stripo's native
705
+ merge-tag dropdown fed by `mergeTags`.
706
+ - The list is fixed at editor init and the host picker is not involved, so nothing is added to the selected
707
+ list; `template.customFieldAttributes` must list every token for save validation.
708
+
693
709
  ### Saved-module token repair
694
710
 
695
711
  Legacy or hand-written **saved modules** may carry tokens by display label
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as h, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as k, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -91,7 +91,7 @@ const b = {
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
92
  id: e(c()),
93
93
  /** Decimal places for price display (legacy data may use string or number) */
94
- decimalCount: e(h([t(), c()])),
94
+ decimalCount: e(k([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
96
  productIds: e(n(i())),
97
97
  /** Whether the block requested live products at send time */
@@ -125,7 +125,7 @@ const b = {
125
125
  /** Block type marker used by some legacy variants */
126
126
  blockType: e(t()),
127
127
  /** Size variant marker (legacy data may use string or number) */
128
- size: e(h([t(), c()])),
128
+ size: e(k([t(), c()])),
129
129
  /** Vertical responsiveness flag (legacy size=1 variants) */
130
130
  verticalResponsiveness: e(a()),
131
131
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -247,6 +247,8 @@ const b = {
247
247
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
248
248
  allowSaveWithErrors: e(a(), !0),
249
249
  reusableRecommendationStrategy: e(a(), !1),
250
+ /** List the dynamic-content catalogue as Stripo special links in the link type selector */
251
+ dynamicContentSpecialLinks: e(a(), !1),
250
252
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
251
253
  legacyUnsubscribeConversion: e(a(), !1),
252
254
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
@@ -320,7 +322,7 @@ const b = {
320
322
  ...d.entries,
321
323
  type: u("custom"),
322
324
  /** Custom processor function */
323
- processor: k(
325
+ processor: h(
324
326
  (s) => typeof s == "function",
325
327
  "processor must be a function"
326
328
  )
@@ -340,7 +342,7 @@ const b = {
340
342
  * Return false to cancel the save operation.
341
343
  */
342
344
  externalValidation: e(
343
- k(
345
+ h(
344
346
  (s) => typeof s == "function",
345
347
  "externalValidation must be a function"
346
348
  )
@@ -1,23 +1,22 @@
1
- import s from "./AssignStrategyDrawer.vue2.js";
2
- /* empty css */
1
+ import r from "./AssignStrategyDrawer.vue2.js";
3
2
  /* empty css */
4
3
  import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
4
  var a = function() {
6
- var e = this, r = e._self._c, t = e._self._setupProxy;
7
- return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
- return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading || t.store.legacyConversionLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
7
+ return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [t.strategiesLoading ? s(t.InSkeleton, { staticClass: "assign-strategy-select-skeleton", attrs: { sizing: t.SELECT_SKELETON_SIZING } }) : s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select w-23-s", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(c) {
9
8
  return t.store.openStrategyCreation();
10
9
  }, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
11
- }, proxy: !0 }], null, !1, 659108535) }) : e._e();
10
+ }, proxy: !0 }], null, !1, 3648942541) }) : e._e();
12
11
  }, n = [], i = /* @__PURE__ */ o(
13
- s,
12
+ r,
14
13
  a,
15
14
  n,
16
15
  !1,
17
16
  null,
18
- "6ce48dfd"
17
+ null
19
18
  );
20
- const y = i.exports;
19
+ const u = i.exports;
21
20
  export {
22
- y as default
21
+ u as default
23
22
  };
@@ -1,34 +1,34 @@
1
- import { defineComponent as B, defineAsyncComponent as T, ref as w, computed as n, watch as k } from "vue";
1
+ import { defineComponent as b, defineAsyncComponent as T, ref as w, computed as o, watch as N } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as b } from "../../../../composables/useToaster.js";
4
- import { useTranslations as L } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as N } from "../../../../enums/date.js";
6
- import { URLS as R } from "../../../../enums/extensions/recommendationBlock.js";
3
+ import { useToaster as R } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as P } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as U } from "../../../../enums/date.js";
6
+ import { URLS as G } from "../../../../enums/extensions/recommendationBlock.js";
7
7
  import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as P } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitStrategyChange as D } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
- import U from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as M } from "../../../../utils/dateUtil.js";
12
- import { asText as O } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as G } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as $ } from "@useinsider/design-system-vue";
15
- const st = /* @__PURE__ */ B({
8
+ import { useRecommendationExtensionStore as M } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { commitStrategyChange as E } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
+ import $ from "./StrategyInfoBoxContent.vue.js";
11
+ import { formatShortDate as z } from "../../../../utils/dateUtil.js";
12
+ import { asText as D } from "../../../../utils/genericUtil.js";
13
+ import { escapeHtml as H } from "../../../../utils/htmlEscape.js";
14
+ import { InSkeleton as O } from "@useinsider/design-system-vue";
15
+ const it = /* @__PURE__ */ b({
16
16
  __name: "AssignStrategyDrawer",
17
- setup(H) {
17
+ setup(F) {
18
18
  const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
19
- render: (o) => o($, { props: { sizing: { width: t, height: r } } })
20
- }), E = T({
19
+ render: (s) => s(O, { props: { sizing: { width: t, height: r } } })
20
+ }), I = T({
21
21
  loader: async () => (await g()).OrgStrategyDetailModal,
22
22
  loadingComponent: p(480, 240),
23
23
  delay: 0
24
- }), I = T({
24
+ }), h = T({
25
25
  loader: async () => (await g()).OrgStrategyDropdown
26
- }), i = "guido-edit-strategy-", a = L(), e = P(), { showToaster: c } = b(), s = w(null), m = "legacy", l = w(!1), x = n(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: R.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
- k(() => e.assignStrategyDrawerStatus, (t) => {
26
+ }), i = "guido-edit-strategy-", x = { width: 480, height: 42 }, a = P(), e = M(), { showToaster: c } = R(), n = w(null), d = "legacy", l = w(!1), A = o(() => e.strategiesLoading || e.legacyConversionLoading), C = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: G.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
+ N(() => e.assignStrategyDrawerStatus, (t) => {
28
28
  if (!t)
29
29
  return;
30
30
  const { strategyId: r } = e.recommendationConfigs;
31
- s.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
31
+ n.value = r || (e.isLegacyStrategyBlock ? d : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
32
32
  c({
33
33
  type: u.Error,
34
34
  message: a("discovery-strategy.error-description")
@@ -36,27 +36,28 @@ const st = /* @__PURE__ */ B({
36
36
  });
37
37
  });
38
38
  const f = (t) => {
39
- const r = O(t.updated_at || t.created_at);
39
+ const r = D(t.updated_at || t.created_at);
40
40
  if (!r)
41
41
  return "";
42
- const o = M(r, N);
43
- return a("recommendation-strategy.last-updated-on", { value: o });
44
- }, S = n(() => ({
42
+ const s = z(r, U);
43
+ return a("recommendation-strategy.last-updated-on", { value: s });
44
+ }, S = o(() => ({
45
45
  text: a("ds-steps.legacy-strategy"),
46
- value: m,
46
+ value: d,
47
47
  hidden: !0
48
- })), d = n(() => e.strategies.map((t) => ({
48
+ })), m = o(() => e.strategies.map((t) => ({
49
49
  text: t.name,
50
50
  value: t.strategy_id,
51
51
  infoBoxProps: {
52
52
  id: `strategy-info-${t.strategy_id}`,
53
53
  theme: "light",
54
54
  variant: "information",
55
- className: "assign-strategy-info-box",
56
- titleText: G(O(t.name)),
55
+ size: "small",
56
+ class: "assign-strategy-info-box",
57
+ titleText: H(D(t.name)),
57
58
  descriptionStatus: !0,
58
59
  descriptionText: f(t),
59
- slot: U,
60
+ slot: $,
60
61
  slotProps: { strategy: t },
61
62
  // The info box drops the option's value/text, so the id is the only channel
62
63
  // that can carry the strategy back to the click handler.
@@ -69,17 +70,17 @@ const st = /* @__PURE__ */ B({
69
70
  icon: "line-open-website"
70
71
  }]
71
72
  }
72
- }))), A = n(() => e.isLegacyStrategyBlock ? [S.value, ...d.value] : d.value), h = (t) => {
73
+ }))), L = o(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), B = (t) => {
73
74
  var _;
74
75
  const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
75
76
  if (!r)
76
77
  return;
77
- const o = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
78
- e.openStrategyEdit(r) && (String(s.value ?? "") === r && (s.value = null), y && (e.removeStrategy(), o !== null && D(o, "Removed recommendation strategy")));
79
- }, v = n(() => {
80
- const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
78
+ const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
79
+ e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && E(s, "Removed recommendation strategy")));
80
+ }, v = o(() => {
81
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
81
82
  return t ? { ...t, fallback_config: null } : null;
82
- }), C = n(() => ({
83
+ }), k = o(() => ({
83
84
  primaryButton: {
84
85
  styling: "solid",
85
86
  type: "primary",
@@ -91,7 +92,7 @@ const st = /* @__PURE__ */ B({
91
92
  labelText: a("products.cancel")
92
93
  }
93
94
  }));
94
- return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: E, OrgStrategyDropdown: I, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: c, selectedStrategyId: s, LEGACY_OPTION_VALUE: m, showSelectionError: l, drawerDescription: x, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: d, strategyOptions: A, onInfoBoxButtonClick: h, selectedStrategy: v, footerButtonGroupOptions: C, closeDrawer: () => {
95
+ return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: I, OrgStrategyDropdown: h, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: x, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, strategiesLoading: A, drawerDescription: C, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: m, strategyOptions: L, onInfoBoxButtonClick: B, selectedStrategy: v, footerButtonGroupOptions: k, closeDrawer: () => {
95
96
  e.closeAssignStrategyDrawer();
96
97
  }, assignStrategy: async () => {
97
98
  const t = v.value;
@@ -112,16 +113,16 @@ const st = /* @__PURE__ */ B({
112
113
  });
113
114
  return;
114
115
  }
115
- const o = e.currentRecommendationId;
116
+ const s = e.currentRecommendationId;
116
117
  e.assignStrategy(t), c({
117
118
  type: u.Success,
118
119
  message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
119
- }), e.closeAssignStrategyDrawer(), o !== null && await D(o, "Assigned recommendation strategy");
120
+ }), e.closeAssignStrategyDrawer(), s !== null && await E(s, "Assigned recommendation strategy");
120
121
  }, onSelect: (t) => {
121
- s.value = t.value, l.value = !1;
122
- } };
122
+ n.value = t.value, l.value = !1;
123
+ }, InSkeleton: O };
123
124
  }
124
125
  });
125
126
  export {
126
- st as default
127
+ it as default
127
128
  };
@@ -1,69 +1,75 @@
1
- import { useActionsApi as j } from "./useActionsApi.js";
2
- import { useAmbiguousDynamicContent as z } from "./useAmbiguousDynamicContent.js";
3
- import { useBlocksConfig as $ } from "./useBlocksConfig.js";
4
- import { useConfig as G } from "./useConfig.js";
5
- import { useCustomInterfaceAppearance as v } from "./useCustomInterfaceAppearance.js";
6
- import { useFullStoryBridge as X } from "./useFullStoryBridge.js";
7
- import { useModuleRepair as J } from "./useModuleRepair.js";
8
- import { useStripoEventHandler as K } from "./useStripoEventHandler.js";
9
- import { useStripoNotifications as Q } from "./useStripoNotifications.js";
10
- import { useToaster as W } from "./useToaster.js";
11
- import { localePatch as Y } from "../config/i18n/index.js";
12
- import { en as B } from "../config/i18n/en/index.js";
13
- import { ToasterTypeOptions as Z } from "../enums/toaster.js";
14
- import { useStripoApi as ee } from "../services/stripoApi.js";
15
- import te from "../static/styles/customEditorStyle.css.js";
16
- import { useEditorStore as T } from "../stores/editor.js";
17
- import { buildMergeTagEntries as oe, flattenDynamicContentList as re } from "../utils/genericUtil.js";
18
- import { getStripoRuntimeBaseUrl as ie } from "../utils/stripoRuntime.js";
19
- let d = null, F = !1;
20
- const ve = (t) => {
21
- const { features: u, template: m, isFeatureEnabled: p } = G(), { handleError: f, showToaster: A } = W(), { getToken: P, getCustomFonts: R, getSyncModulesStatus: D } = ee(), { handleEvent: U } = K(), { handleModuleAdd: V } = J(), { restorePending: I } = z(), { getStripoBlocksConfig: L } = $(), { getStripoNotifications: q } = Q(), g = () => d || (d = new Promise((n, s) => {
1
+ import { useActionsApi as G } from "./useActionsApi.js";
2
+ import { useAmbiguousDynamicContent as $ } from "./useAmbiguousDynamicContent.js";
3
+ import { useBlocksConfig as X } from "./useBlocksConfig.js";
4
+ import { useConfig as J } from "./useConfig.js";
5
+ import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
6
+ import { useFullStoryBridge as K } from "./useFullStoryBridge.js";
7
+ import { useModuleRepair as Q } from "./useModuleRepair.js";
8
+ import { useStripoEventHandler as W } from "./useStripoEventHandler.js";
9
+ import { useStripoNotifications as Y } from "./useStripoNotifications.js";
10
+ import { useToaster as Z } from "./useToaster.js";
11
+ import { localePatch as ee } from "../config/i18n/index.js";
12
+ import { en as T } from "../config/i18n/en/index.js";
13
+ import { ToasterTypeOptions as te } from "../enums/toaster.js";
14
+ import { useStripoApi as oe } from "../services/stripoApi.js";
15
+ import re from "../static/styles/customEditorStyle.css.js";
16
+ import { useEditorStore as F } from "../stores/editor.js";
17
+ import { buildMergeTagEntries as ie, flattenDynamicContentList as ne, buildSpecialLinkGroups as ae } from "../utils/genericUtil.js";
18
+ import { getStripoRuntimeBaseUrl as se } from "../utils/stripoRuntime.js";
19
+ let d = null, A = !1;
20
+ const Fe = (t) => {
21
+ const { features: p, template: u, isFeatureEnabled: c } = J(), { handleError: f, showToaster: P } = Z(), { getToken: L, getCustomFonts: R, getSyncModulesStatus: D } = oe(), { handleEvent: U } = W(), { handleModuleAdd: V } = Q(), { restorePending: I } = $(), { getStripoBlocksConfig: q } = X(), { getStripoNotifications: x } = Y(), g = () => d || (d = new Promise((n, a) => {
22
22
  if (document.getElementById("UiEditorScript")) {
23
23
  n();
24
24
  return;
25
25
  }
26
- const i = ie();
26
+ const i = se();
27
27
  if (!i) {
28
- s(
28
+ a(
29
29
  new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
30
30
  );
31
31
  return;
32
32
  }
33
- const a = `${i}UIEditor.js`, e = document.createElement("script");
34
- e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
35
- F = !0, n();
33
+ const s = `${i}UIEditor.js`, e = document.createElement("script");
34
+ e.id = "UiEditorScript", e.type = "module", e.src = s, e.onload = () => {
35
+ A = !0, n();
36
36
  }, e.onerror = () => {
37
- e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
37
+ e.remove(), a(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
38
38
  }, document.body.appendChild(e);
39
39
  }), d.catch(() => {
40
40
  d = null;
41
- }), d), x = async (n, s, i, a = [], e = !1, c = !1) => {
42
- var w, k, b, _;
43
- const o = T(), { html: S, css: y } = n, { baseBlocks: E, extensions: O } = await L();
41
+ }), d), O = async (n, a, i, s = [], e = !1, m = !1) => {
42
+ var k, w, b, _, v;
43
+ const o = F(), { html: S, css: y } = n, { baseBlocks: E, extensions: H } = await q();
44
44
  t.mark("blocks_config_ready");
45
- const h = ((w = u.value) == null ? void 0 : w.displayConditions) ?? !0, H = ((k = u.value) == null ? void 0 : k.modulesDisabled) ?? !1, C = c || (((b = m.value) == null ? void 0 : b.forceRecreate) ?? !1), M = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
46
- t.setTemplate({ html: S, css: y, forceRecreate: C }), v().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
45
+ const C = ((k = p.value) == null ? void 0 : k.displayConditions) ?? !0, M = ((w = p.value) == null ? void 0 : w.modulesDisabled) ?? !1, N = c("dynamicContentSpecialLinks"), h = m || (((b = u.value) == null ? void 0 : b.forceRecreate) ?? !1), j = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
46
+ t.setTemplate({ html: S, css: y, forceRecreate: h }), B().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
47
47
  document.querySelector("#guido-editor"),
48
48
  {
49
- metadata: s,
49
+ metadata: a,
50
50
  html: S,
51
51
  css: y,
52
- forceRecreate: C,
52
+ forceRecreate: h,
53
53
  locale: "en",
54
54
  undoButtonSelector: "#guido__undo-button",
55
55
  redoButtonSelector: "#guido__redo-button",
56
56
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
57
57
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
58
58
  codeEditorButtonSelector: "#guido__code-button",
59
- customAppearanceMergetags: !p("liquidSyntax"),
59
+ customAppearanceMergetags: !c("liquidSyntax"),
60
60
  customAppearanceMergetagsBorderColor: "#f1f3fe",
61
61
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
62
- customViewStyles: te,
63
- conditionsEnabled: h,
64
- customConditionsEnabled: h,
62
+ ...N ? {
63
+ specialLinks: ae(
64
+ (_ = u.value) == null ? void 0 : _.dynamicContentList,
65
+ c("liquidSyntax")
66
+ )
67
+ } : {},
68
+ customViewStyles: re,
69
+ conditionsEnabled: C,
70
+ customConditionsEnabled: C,
65
71
  enableXSSSecurity: !0,
66
- modulesDisabled: H,
72
+ modulesDisabled: M,
67
73
  syncModulesEnabled: e,
68
74
  messageSettingsEnabled: !0,
69
75
  displayGmailAnnotations: !0,
@@ -74,26 +80,26 @@ const ve = (t) => {
74
80
  copyPasteEnabled: !1,
75
81
  selectElementAfterDrop: !0,
76
82
  sameFontSizeForOutlook: !0,
77
- allowedScriptSourceDomains: M,
83
+ allowedScriptSourceDomains: j,
78
84
  ...E ? { baseBlocks: E } : {},
79
85
  editorFonts: {
80
86
  showDefaultStandardFonts: !0,
81
87
  showDefaultNotStandardFonts: !0,
82
- customFonts: a
88
+ customFonts: s
83
89
  },
84
90
  mergeTags: [
85
91
  {
86
- entries: oe(
92
+ entries: ie(
87
93
  i.preselectedDynamicContentList,
88
- re((_ = m.value) == null ? void 0 : _.dynamicContentList),
89
- p("liquidSyntax")
94
+ ne((v = u.value) == null ? void 0 : v.dynamicContentList),
95
+ c("liquidSyntax")
90
96
  )
91
97
  }
92
98
  ],
93
99
  async onTokenRefreshRequest(r) {
94
100
  try {
95
101
  t.mark("token_start");
96
- const l = await P();
102
+ const l = await L();
97
103
  t.mark("token_end"), r(l);
98
104
  } catch (l) {
99
105
  f(l, "Failed to refresh token");
@@ -101,8 +107,8 @@ const ve = (t) => {
101
107
  },
102
108
  onTemplateLoaded() {
103
109
  try {
104
- const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = j(), { injectFullStory: N } = X();
105
- v().importCss(), r(), N(), I(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
110
+ const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = G(), { injectFullStory: z } = K();
111
+ B().importCss(), r(), z(), I(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
106
112
  o.hasChanges = !1;
107
113
  }, 1e3), t.markReady();
108
114
  } catch (r) {
@@ -123,7 +129,7 @@ const ve = (t) => {
123
129
  },
124
130
  onEvent: U,
125
131
  onModuleAdd: V,
126
- notifications: q(),
132
+ notifications: x(),
127
133
  // Stripo deselects the block on any click outside the canvas, so every surface
128
134
  // that belongs to the block's own flow has to be listed here (SD-153273).
129
135
  ignoreClickOutsideSelectors: [
@@ -133,26 +139,26 @@ const ve = (t) => {
133
139
  ".in-modal-v2-wrapper",
134
140
  ".in-toasts-wrapper"
135
141
  ],
136
- extensions: O,
137
- localePatch: Y
142
+ extensions: H,
143
+ localePatch: ee
138
144
  }
139
145
  );
140
146
  };
141
- return { initPlugin: async (n, s, i, a = !1) => {
142
- const e = T();
147
+ return { initPlugin: async (n, a, i, s = !1) => {
148
+ const e = F();
143
149
  try {
144
- t.mark("plugin_start"), t.setScriptPreloaded(F), await g(), t.mark("script_ready");
145
- const [c, o] = await Promise.all([
150
+ t.mark("plugin_start"), t.setScriptPreloaded(A), await g(), t.mark("script_ready");
151
+ const [m, o] = await Promise.all([
146
152
  R(),
147
153
  D()
148
154
  ]);
149
- t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await x(n, s, i, c, o, a);
155
+ t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await O(n, a, i, m, o, s);
150
156
  } catch {
151
- e.loadingStatus = !1, A({
152
- type: Z.Error,
153
- message: B["An error has occurred. Please report the error code to support."],
157
+ e.loadingStatus = !1, P({
158
+ type: te.Error,
159
+ message: T["An error has occurred. Please report the error code to support."],
154
160
  actionButton: {
155
- text: B["Reload page"],
161
+ text: T["Reload page"],
156
162
  onClick: () => window.location.reload()
157
163
  }
158
164
  }), t.markFailed();
@@ -163,5 +169,5 @@ const ve = (t) => {
163
169
  } };
164
170
  };
165
171
  export {
166
- ve as useStripo
172
+ Fe as useStripo
167
173
  };