@useinsider/guido 3.17.0-beta.3e9d6e7 → 3.17.0-beta.3ff6ea0

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 (111) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +6 -12
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +61 -63
  5. package/dist/composables/useCustomInterfaceAppearance.js +16 -19
  6. package/dist/composables/useRecommendation.js +34 -41
  7. package/dist/composables/useStripo.js +14 -14
  8. package/dist/config/migrator/index.js +9 -8
  9. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  10. package/dist/config/migrator/recommendation/extractors.js +29 -24
  11. package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
  12. package/dist/config/migrator/recommendationMigrator.js +16 -15
  13. package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
  14. package/dist/enums/date.js +3 -4
  15. package/dist/enums/extensions/recommendationBlock.js +23 -25
  16. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  17. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  18. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
  19. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +34 -28
  20. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +306 -238
  21. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +95 -122
  22. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
  23. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
  24. package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
  25. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
  26. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +53 -199
  27. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  28. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
  29. package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
  30. package/dist/extensions/Blocks/common-control.js +19 -22
  31. package/dist/guido.css +1 -1
  32. package/dist/services/recommendationApi.js +28 -77
  33. package/dist/src/@types/config/schemas.d.ts +0 -12
  34. package/dist/src/composables/useConfig.d.ts +0 -2
  35. package/dist/src/composables/useRecommendation.d.ts +0 -1
  36. package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
  37. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
  38. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  39. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
  40. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
  41. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  42. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  43. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +10 -0
  44. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +10 -0
  45. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  46. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -12
  47. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
  48. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
  49. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -210
  50. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
  51. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  52. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  53. package/dist/src/services/recommendationApi.d.ts +1 -4
  54. package/dist/src/stores/config.d.ts +0 -18
  55. package/dist/static/styles/customEditorStyle.css.js +3 -1
  56. package/dist/utils/dateUtil.js +10 -23
  57. package/dist/utils/templatePreparation.js +34 -37
  58. package/package.json +1 -2
  59. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  60. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -67
  61. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  62. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  63. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -132
  64. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +0 -526
  65. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -9345
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
  69. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
  70. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
  71. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
  72. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
  73. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
  74. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
  75. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
  76. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
  77. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
  78. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
  79. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
  80. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
  81. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
  82. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
  83. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
  84. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
  85. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
  86. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
  87. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
  88. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
  89. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
  90. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
  91. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
  92. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
  93. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
  94. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
  95. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
  96. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
  97. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
  98. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
  99. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
  100. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
  101. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
  102. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
  103. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
  104. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
  105. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
  106. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
  107. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
  108. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +0 -24
  109. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -37
  110. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -43
  111. package/dist/static/styles/components/recommendation-strategy.css.js +0 -171
package/README.md CHANGED
@@ -162,7 +162,6 @@ const config: GuidoConfigInput = {
162
162
  liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
163
163
  autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
164
164
  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).
165
- reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
166
165
  },
167
166
 
168
167
  // Optional: Callbacks
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as k, boolean as o, array as c, transform as C, record as y, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const p = {
76
76
  children: e(c(S)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
78
  select_items: e(c(S))
79
- })), N = k(
79
+ })), N = y(
80
80
  t(),
81
81
  R(c(S), [])
82
82
  ), P = g({
@@ -132,7 +132,7 @@ const p = {
132
132
  * strategy, currency, locale, and layout data.
133
133
  */
134
134
  recommendationConfigs: e(
135
- k(t(), P),
135
+ y(t(), P),
136
136
  {}
137
137
  )
138
138
  }), x = a({
@@ -219,13 +219,7 @@ const p = {
219
219
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
220
220
  allowlistEnabled: e(o(), !1),
221
221
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
222
- linkTrackingIds: e(o(), !1),
223
- /**
224
- * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
225
- * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
226
- * (they live on the strategy) and adds the Assign Strategy flow.
227
- */
228
- reusableRecommendationStrategy: e(o(), !1)
222
+ linkTrackingIds: e(o(), !1)
229
223
  }), B = i([
230
224
  "amp-accordion",
231
225
  "amp-carousel",
@@ -293,7 +287,7 @@ const p = {
293
287
  ...d.entries,
294
288
  type: u("custom"),
295
289
  /** Custom processor function */
296
- processor: y(
290
+ processor: k(
297
291
  (s) => typeof s == "function",
298
292
  "processor must be a function"
299
293
  )
@@ -313,7 +307,7 @@ const p = {
313
307
  * Return false to cancel the save operation.
314
308
  */
315
309
  externalValidation: e(
316
- y(
310
+ k(
317
311
  (s) => typeof s == "function",
318
312
  "externalValidation must be a function"
319
313
  )
@@ -1,18 +1,18 @@
1
- import a from "./Guido.vue2.js";
1
+ import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.configStore.isFeatureEnabled("reusableRecommendationStrategy") ? r(e.AssignStrategyDrawer) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, n = [], s = /* @__PURE__ */ i(
10
- a,
9
+ }, n = [], s = /* @__PURE__ */ a(
10
+ i,
11
11
  t,
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "f258bc9e"
15
+ "b0d3b445"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,30 +1,30 @@
1
- import { defineComponent as J, defineAsyncComponent as g, ref as B, computed as U, watch as _, onMounted as Q, onUnmounted as X } from "vue";
2
- import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as Z } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as ee } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as te } from "../composables/usePartner.js";
6
- import { useStripo as oe } from "../composables/useStripo.js";
7
- import { useTimerClone as ne } from "../composables/useTimerClone.js";
8
- import { migrate as A } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as re } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as se } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import ae from "./organisms/AutoSaveController.vue.js";
13
- import ie from "./organisms/base/Toaster.vue.js";
14
- import ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import de from "./organisms/header/HeaderWrapper.vue.js";
16
- import me from "./organisms/LoadingWrapper.vue.js";
17
- import le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ue from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as pe } from "../services/stripoApi.js";
20
- import { useConfigStore as fe } from "../stores/config.js";
21
- import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
22
- import { useEditorStore as O } from "../stores/editor.js";
23
- import { usePreviewStore as ve } from "../stores/preview.js";
24
- import { useTemplateStore as ge } from "../stores/template.js";
25
- import { useUnsubscribeStore as Se } from "../stores/unsubscribe.js";
26
- import { readTrackFloor as P } from "../utils/linkTrackingIds.js";
27
- const qe = /* @__PURE__ */ J({
1
+ import { defineComponent as j, defineAsyncComponent as R, ref as B, computed as U, watch as _, onMounted as J, onUnmounted as Q } from "vue";
2
+ import { useCortexBlueprintBridge as X } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as ee } from "../composables/usePartner.js";
6
+ import { useStripo as te } from "../composables/useStripo.js";
7
+ import { useTimerClone as oe } from "../composables/useTimerClone.js";
8
+ import { migrate as N } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as O } from "../enums/defaults.js";
10
+ import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import se from "./organisms/AutoSaveController.vue.js";
13
+ import ae from "./organisms/base/Toaster.vue.js";
14
+ import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ce from "./organisms/header/HeaderWrapper.vue.js";
16
+ import de from "./organisms/LoadingWrapper.vue.js";
17
+ import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ue } from "../services/stripoApi.js";
20
+ import { useConfigStore as pe } from "../stores/config.js";
21
+ import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
22
+ import { useEditorStore as P } from "../stores/editor.js";
23
+ import { usePreviewStore as ye } from "../stores/preview.js";
24
+ import { useTemplateStore as ve } from "../stores/template.js";
25
+ import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
26
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
+ const ze = /* @__PURE__ */ j({
28
28
  __name: "Guido",
29
29
  props: {
30
30
  config: null,
@@ -32,21 +32,19 @@ const qe = /* @__PURE__ */ J({
32
32
  },
33
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
34
  setup(W, { expose: x, emit: r }) {
35
- const a = W, G = g(
35
+ const a = W, G = R(
36
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), H = g(
37
+ ), H = R(
38
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), $ = g(
40
- () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), S = B(), l = B(), u = ye(), h = Se(), o = fe();
39
+ ), h = B(), l = B(), u = fe(), S = he(), o = pe();
42
40
  a.ready && o.init(a.config);
43
- const c = O(), z = ve(), m = U(() => c.hasChanges), { isTestPartner: q } = te(), b = () => {
41
+ const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
44
42
  var t;
45
- return (t = S.value) == null ? void 0 : t.handleSave(!0);
46
- }, E = (t) => {
43
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
44
+ }, b = (t) => {
47
45
  c.loadingStatus = t;
48
46
  };
49
- Y(), ee();
47
+ X(), Z();
50
48
  const p = () => {
51
49
  var t, e;
52
50
  return {
@@ -54,14 +52,14 @@ const qe = /* @__PURE__ */ J({
54
52
  userId: o.userId,
55
53
  username: o.username,
56
54
  partnerName: o.partnerName,
57
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
58
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
55
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
56
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
59
57
  };
60
- }, { initPlugin: w, preloadRuntime: D } = oe(), { getDefaultTemplate: C } = pe(), { cloneTimersOnSave: k, hasTimerBlocks: T } = ne(), K = U(() => {
58
+ }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
61
59
  var t;
62
60
  return !((t = o.ui) != null && t.showHeader);
63
61
  });
64
- Z({
62
+ Y({
65
63
  onBack: () => {
66
64
  console.debug("guido:back"), r("back");
67
65
  },
@@ -76,9 +74,9 @@ const qe = /* @__PURE__ */ J({
76
74
  console.debug("guido:test-email:click"), r("test-email:click");
77
75
  }
78
76
  });
79
- const F = (t) => {
77
+ const T = (t) => {
80
78
  console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
81
- }, I = () => {
79
+ }, F = () => {
82
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
81
  };
84
82
  _(() => m.value, () => {
@@ -91,38 +89,38 @@ const qe = /* @__PURE__ */ J({
91
89
  let i = null;
92
90
  const y = () => {
93
91
  var e;
94
- const t = document.querySelector(re);
92
+ const t = document.querySelector(ne);
95
93
  (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
96
94
  }, v = async () => {
97
95
  var t;
98
96
  try {
99
97
  o.initialized || o.init(a.config), c.templateId = o.templateId;
100
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
101
- h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
102
- const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, R = o.isFeatureEnabled("linkTrackingIds");
98
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
99
+ S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
100
+ const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
103
101
  let n = {
104
- html: s && await A(s, M),
102
+ html: s && await N(s, L),
105
103
  css: d
106
104
  };
107
- n.html || (n = await C(), n.html = await A(n.html, M));
108
- const V = R ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
109
- T(n.html) && (n.html = await k(n.html)), R && (c.trackIdSessionFloor = Math.max(V, P(n.html)));
110
- const j = {
111
- preselectedDynamicContentList: L,
105
+ n.html || (n = await C(), n.html = await N(n.html, L));
106
+ const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
107
+ k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
108
+ const V = {
109
+ preselectedDynamicContentList: I,
112
110
  onReady: () => {
113
111
  console.debug("guido:ready"), r("ready");
114
112
  }
115
113
  };
116
- await w(n, p(), j), u.selectedDynamicContentList = L;
114
+ await E(n, p(), V), u.selectedDynamicContentList = I;
117
115
  } catch (e) {
118
116
  console.error("Failed to initialize Stripo editor:", e);
119
117
  }
120
118
  };
121
- return Q(async () => {
119
+ return J(async () => {
122
120
  var e;
123
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), se().$reset(), O().$reset(), ge().$reset(), y();
121
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
124
122
  const t = (e = l.value) == null ? void 0 : e.parentElement;
125
- if (t && (i = new ResizeObserver(y), i.observe(t)), D(), a.ready)
123
+ if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
126
124
  await v();
127
125
  else {
128
126
  const s = _(() => a.ready, (d) => {
@@ -130,7 +128,7 @@ const qe = /* @__PURE__ */ J({
130
128
  });
131
129
  }
132
130
  document.addEventListener("dynamic-content:open", f);
133
- }), X(() => {
131
+ }), Q(() => {
134
132
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
135
133
  try {
136
134
  window.UIEditor.removeEditor();
@@ -140,15 +138,15 @@ const qe = /* @__PURE__ */ J({
140
138
  o.reset();
141
139
  }), x({
142
140
  dynamicContent: {
143
- insert: F,
144
- close: I
141
+ insert: T,
142
+ close: F
145
143
  },
146
144
  hasChanges: m,
147
- saveSilent: b,
148
- setLoading: E
149
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef: S, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: b, setLoading: E, emit: r, buildMetadata: p, initPlugin: w, preloadRuntime: D, getDefaultTemplate: C, cloneTimersOnSave: k, hasTimerBlocks: T, noHeader: K, insertDynamicContent: F, closeDynamicContent: I, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: ae, Toaster: ie, FilterSelectionDrawer: ce, HeaderWrapper: de, LoadingWrapper: me, SaveAsTemplateDrawer: le, UnsubscribeWrapper: ue };
145
+ saveSilent: g,
146
+ setLoading: b
147
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
150
148
  }
151
149
  });
152
150
  export {
153
- qe as default
151
+ ze as default
154
152
  };
@@ -4,21 +4,20 @@ import e from "../static/styles/components/amp-block.css.js";
4
4
  import i from "../static/styles/components/base-input.css.js";
5
5
  import p from "../static/styles/components/button-group.css.js";
6
6
  import n from "../static/styles/components/button.css.js";
7
- import C from "../static/styles/components/combobox.css.js";
8
- import s from "../static/styles/components/counter.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C from "../static/styles/components/counter.css.js";
9
9
  import f from "../static/styles/components/dropdown-menu.css.js";
10
10
  import a from "../static/styles/components/loader.css.js";
11
11
  import u from "../static/styles/components/narrow-panel.css.js";
12
12
  import c from "../static/styles/components/popup.css.js";
13
- import d from "../static/styles/components/recommendation-strategy.css.js";
14
- import l from "../static/styles/components/switcher.css.js";
15
- import h from "../static/styles/components/tabs.css.js";
16
- import w from "../static/styles/components/tools.css.js";
17
- import y from "../static/styles/components/version-history.css.js";
18
- import B from "../static/styles/components/wide-panel.css.js";
19
- import b from "../static/styles/variables.css.js";
20
- const A = [
21
- b,
13
+ import d from "../static/styles/components/switcher.css.js";
14
+ import l from "../static/styles/components/tabs.css.js";
15
+ import h from "../static/styles/components/tools.css.js";
16
+ import w from "../static/styles/components/version-history.css.js";
17
+ import y from "../static/styles/components/wide-panel.css.js";
18
+ import B from "../static/styles/variables.css.js";
19
+ const b = [
20
+ B,
22
21
  // Must be on top
23
22
  S,
24
23
  // Must be on top
@@ -27,24 +26,22 @@ const A = [
27
26
  i,
28
27
  p,
29
28
  n,
30
- C,
31
29
  s,
30
+ C,
32
31
  f,
33
32
  a,
34
33
  u,
35
34
  c,
35
+ d,
36
36
  l,
37
37
  h,
38
38
  w,
39
- y,
40
- B,
41
- d
42
- // Last: overrides button.css / wide-panel.css defaults
39
+ y
43
40
  ].join(`
44
41
 
45
- `), F = () => ({ importCss: () => {
42
+ `), v = () => ({ importCss: () => {
46
43
  const o = new CSSStyleSheet();
47
- o.replaceSync(A);
44
+ o.replaceSync(b);
48
45
  const r = document.querySelector("ui-editor");
49
46
  if (!r)
50
47
  return;
@@ -52,5 +49,5 @@ const A = [
52
49
  t && (t.adoptedStyleSheets = [o]);
53
50
  } });
54
51
  export {
55
- F as useCustomInterfaceAppearance
52
+ v as useCustomInterfaceAppearance
56
53
  };
@@ -1,23 +1,23 @@
1
- import { getRecommendationFeedSourceMaps as y, URLS as I } from "../enums/extensions/recommendationBlock.js";
2
- import { MinDeviceViewport as C, DefaultPadding as R } from "../enums/recommendation.js";
1
+ import { getRecommendationFeedSourceMaps as I, URLS as R } from "../enums/extensions/recommendationBlock.js";
2
+ import { MinDeviceViewport as C, DefaultPadding as b } from "../enums/recommendation.js";
3
3
  import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
- import { getPartnerRecommendationParams as h } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
4
+ import { generateCompleteFilterQuery as h } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
+ import { getPartnerRecommendationParams as y } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
6
6
  import { sanitizeProductIds as x } from "../extensions/Blocks/Recommendation/utils/productIds.js";
7
7
  import { useConfigStore as P } from "../stores/config.js";
8
8
  const B = () => ({
9
9
  calculateCardWidth: ({
10
10
  mobileLeftPadding: a,
11
- mobileRightPadding: c,
12
- cardsInRow: s,
13
- unresponsive: o
11
+ mobileRightPadding: s,
12
+ cardsInRow: c,
13
+ unresponsive: n
14
14
  }) => {
15
- const n = o ? s : 1, e = a + c + (n - 1) * R;
16
- return (C - e) / n;
15
+ const r = n ? c : 1, e = a + s + (r - 1) * b;
16
+ return (C - e) / r;
17
17
  },
18
18
  getRecommendationCampaignData: (a) => {
19
- const c = l(), s = Number(a), o = c.blockStates[s];
20
- if (!o)
19
+ const s = l(), c = Number(a), n = s.blockStates[c];
20
+ if (!n)
21
21
  return {
22
22
  textTrimming: !1,
23
23
  orientation: "vertical",
@@ -30,54 +30,47 @@ const B = () => ({
30
30
  discountBeforeTextValue: "",
31
31
  discountAfterTextValue: ""
32
32
  };
33
- const { recommendationConfigs: n } = o, e = n.orientation === "grid" ? "vertical" : "horizontal";
33
+ const { recommendationConfigs: r } = n, e = r.orientation === "grid" ? "vertical" : "horizontal";
34
34
  return {
35
- textTrimming: n.textTrimming,
35
+ textTrimming: r.textTrimming,
36
36
  orientation: e,
37
37
  mobileLeftPadding: 0,
38
38
  mobileRightPadding: 0,
39
- cardsInRow: n.cardsInRow,
40
- unresponsive: n.unresponsive,
39
+ cardsInRow: r.cardsInRow,
40
+ unresponsive: r.unresponsive,
41
41
  priceBeforeTextValue: "",
42
42
  priceAfterTextValue: "",
43
43
  discountBeforeTextValue: "",
44
44
  discountAfterTextValue: ""
45
45
  };
46
46
  },
47
- buildCampaignUrl: (a, c) => {
47
+ buildCampaignUrl: (a, s) => {
48
48
  var m;
49
- const s = l(), o = P(), n = Number(a);
49
+ const c = l(), n = P(), r = Number(a);
50
50
  let e;
51
- if (c)
52
- e = c;
51
+ if (s)
52
+ e = s;
53
53
  else {
54
- const i = s.blockStates[n];
54
+ const i = c.blockStates[r];
55
55
  if (!i)
56
56
  return "";
57
- const { recommendationConfigs: r } = i;
57
+ const { recommendationConfigs: o } = i;
58
58
  e = {
59
- strategy: r.strategy,
60
- strategyId: r.strategyId,
61
- language: r.language,
62
- currencyCode: r.currencySettings.value,
63
- size: r.size,
64
- productIds: r.productIds,
65
- filters: r.filters,
66
- shuffleProducts: r.shuffleProducts
59
+ strategy: o.strategy,
60
+ language: o.language,
61
+ currencyCode: o.currencySettings.value,
62
+ size: o.size,
63
+ productIds: o.productIds,
64
+ filters: o.filters,
65
+ shuffleProducts: o.shuffleProducts
67
66
  };
68
67
  }
69
- if (e.strategyId)
70
- return s.recommendationCampaignUrls[a] = {
71
- strategyId: e.strategyId,
72
- locale: e.language,
73
- currency: e.currencyCode
74
- }, "";
75
- const f = ((m = y().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
76
- t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
77
- const g = e.filters.filter((i) => i.isValid), d = b(g);
78
- d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(o.partnerName, e.strategy)).forEach(([i, r]) => t.set(i, r));
79
- const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
80
- return s.recommendationCampaignUrls[a] = u, u;
68
+ const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
69
+ t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
70
+ const g = e.filters.filter((i) => i.isValid), d = h(g);
71
+ d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(y(n.partnerName, e.strategy)).forEach(([i, o]) => t.set(i, o));
72
+ const p = decodeURIComponent(t.toString()), u = `${R.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
73
+ return c.recommendationCampaignUrls[a] = u, u;
81
74
  }
82
75
  });
83
76
  export {
@@ -17,13 +17,13 @@ import { buildMergeTagEntries as W, flattenDynamicContentList as Y } from "../ut
17
17
  import Z from "../package.json.js";
18
18
  let n = null;
19
19
  const Ce = () => {
20
- const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: M, getCustomFonts: T, getSyncModulesStatus: v } = K(), { handleEvent: B } = z(), { handleModuleAdd: F } = j(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), f = () => n || (n = new Promise((i, s) => {
21
- var l;
20
+ const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: B, getCustomFonts: M, getSyncModulesStatus: T } = K(), { handleEvent: v } = z(), { handleModuleAdd: F } = j(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), f = () => n || (n = new Promise((i, s) => {
21
+ var d;
22
22
  if (document.getElementById("UiEditorScript")) {
23
23
  i();
24
24
  return;
25
25
  }
26
- const o = Z.guido, r = `https://email-static.useinsider.com/guido/${(l = o == null ? void 0 : o.stripo) == null ? void 0 : l.version}/UIEditor.js`, e = document.createElement("script");
26
+ const o = Z.guido, r = `https://email-static.useinsider.com/guido/${(d = o == null ? void 0 : o.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
27
27
  e.id = "UiEditorScript", e.type = "module", e.src = r, e.onload = () => i(), e.onerror = () => {
28
28
  e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${r}`));
29
29
  }, document.body.appendChild(e);
@@ -31,12 +31,12 @@ const Ce = () => {
31
31
  n = null;
32
32
  }), n), _ = async (i, s, o, a = [], r = !1) => {
33
33
  var y, E, h, C;
34
- const e = b(), { html: l, css: D } = i, { baseBlocks: g, extensions: R } = await A(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, P = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, U = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
34
+ const e = b(), { html: d, css: D } = i, { baseBlocks: g, extensions: R } = await A(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, P = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, U = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1);
35
35
  await window.UIEditor.initEditor(
36
36
  document.querySelector("#guido-editor"),
37
37
  {
38
38
  metadata: s,
39
- html: l,
39
+ html: d,
40
40
  css: D,
41
41
  forceRecreate: U,
42
42
  locale: "en",
@@ -80,16 +80,16 @@ const Ce = () => {
80
80
  ],
81
81
  async onTokenRefreshRequest(t) {
82
82
  try {
83
- const d = await M();
84
- t(d);
85
- } catch (d) {
86
- p(d, "Failed to refresh token");
83
+ const l = await B();
84
+ t(l);
85
+ } catch (l) {
86
+ p(l, "Failed to refresh token");
87
87
  }
88
88
  },
89
89
  onTemplateLoaded() {
90
90
  try {
91
- const { importCss: t } = H(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: I } = L(), { injectFullStory: x } = N();
92
- t(), d(), x(), I(), o.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
91
+ const { importCss: t } = H(), { activateCustomViewStyles: l, updateTimerInClonedTemplate: I } = L(), { injectFullStory: x } = N();
92
+ t(), l(), x(), I(), o.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
93
93
  e.hasChanges = !1;
94
94
  }, 1e3);
95
95
  } catch (t) {
@@ -108,7 +108,7 @@ const Ce = () => {
108
108
  onDataChanged() {
109
109
  e.hasChanges = !0;
110
110
  },
111
- onEvent: B,
111
+ onEvent: v,
112
112
  onModuleAdd: F,
113
113
  notifications: V(),
114
114
  ignoreClickOutsideSelectors: [
@@ -126,8 +126,8 @@ const Ce = () => {
126
126
  try {
127
127
  await f();
128
128
  const [r, e] = await Promise.all([
129
- T(),
130
- v()
129
+ M(),
130
+ T()
131
131
  ]);
132
132
  a.syncModulesEnabled = e, await _(i, s, o, r, e);
133
133
  } catch {
@@ -2,14 +2,15 @@ import { migrateCheckbox as t } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as i } from "./couponBlockMigrator.js";
3
3
  import { migrateItemsBlock as e } from "./itemsBlockMigrator.js";
4
4
  import { migrateProductNameLink as a } from "./productNameLinkMigrator.js";
5
- import { migrateRadioButton as c } from "./radioButtonMigrator.js";
6
- import { migrateRecommendation as g } from "./recommendationMigrator.js";
7
- import { migrateSocialIcons as n } from "./socialIconMigrator.js";
8
- import { migrateUnsubscribe as p } from "./unsubscribeMigrator.js";
9
- const x = async (r, o = {}) => {
10
- let m = r;
11
- return m = t(m), m = c(m), m = await p(m), m = i(m), m = g(m, o), m = e(m), m = a(m), m = n(m), m;
5
+ import { migrateRadioButton as n } from "./radioButtonMigrator.js";
6
+ import { migrateRecommendation as c } from "./recommendationMigrator.js";
7
+ import { migrateRecommendationTitle as g } from "./recommendationTitleMigrator.js";
8
+ import { migrateSocialIcons as p } from "./socialIconMigrator.js";
9
+ import { migrateUnsubscribe as f } from "./unsubscribeMigrator.js";
10
+ const C = async (o, r = {}) => {
11
+ let m = o;
12
+ return m = t(m), m = n(m), m = await f(m), m = i(m), m = c(m, r), m = g(m), m = e(m), m = a(m), m = p(m), m;
12
13
  };
13
14
  export {
14
- x as migrate
15
+ C as migrate
15
16
  };