@useinsider/guido 3.17.0-beta.dc7f4d2 → 3.17.0-beta.e23d5cd

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 (88) hide show
  1. package/README.md +6 -5
  2. package/dist/@types/config/schemas.js +7 -6
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +96 -94
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +21 -0
  7. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +106 -0
  8. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
  9. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +63 -0
  10. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  11. package/dist/components/organisms/header/EditorActions.vue2.js +43 -74
  12. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  13. package/dist/components/organisms/header/LeftSlot.vue2.js +23 -46
  14. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  15. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  16. package/dist/composables/useCustomInterfaceAppearance.js +52 -38
  17. package/dist/composables/useHtmlCompiler.js +26 -37
  18. package/dist/composables/useHtmlValidator.js +0 -2
  19. package/dist/composables/useRecommendation.js +41 -34
  20. package/dist/composables/useSave.js +41 -84
  21. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  22. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  23. package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
  24. package/dist/config/migrator/recommendationMigrator.js +5 -4
  25. package/dist/enums/academy.js +2 -1
  26. package/dist/enums/date.js +5 -3
  27. package/dist/enums/extensions/recommendationBlock.js +3 -1
  28. package/dist/extensions/Blocks/Recommendation/block.js +26 -21
  29. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +34 -34
  30. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +96 -95
  31. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +238 -185
  32. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +124 -0
  33. package/dist/extensions/Blocks/Recommendation/services/configService.js +54 -36
  34. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +165 -86
  35. package/dist/extensions/Blocks/common-control.js +22 -19
  36. package/dist/guido.css +1 -1
  37. package/dist/services/recommendationApi.js +69 -30
  38. package/dist/src/@types/config/schemas.d.ts +2 -0
  39. package/dist/src/components/Guido.vue.d.ts +1 -17
  40. package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → extensions/recommendation/AssignStrategyDrawer.vue.d.ts} +1 -0
  41. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +15 -0
  42. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  43. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  44. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  45. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  46. package/dist/src/composables/useConfig.d.ts +2 -0
  47. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  48. package/dist/src/composables/useRecommendation.d.ts +1 -0
  49. package/dist/src/composables/useSave.d.ts +1 -6
  50. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  51. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  52. package/dist/src/enums/academy.d.ts +1 -0
  53. package/dist/src/enums/date.d.ts +1 -0
  54. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  55. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +2 -6
  56. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  57. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +44 -8
  58. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +16 -0
  59. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +12 -1
  60. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +150 -15
  61. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -0
  62. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  63. package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
  64. package/dist/src/services/recommendationApi.d.ts +4 -1
  65. package/dist/src/stores/config.d.ts +18 -5
  66. package/dist/src/stores/save-as-template.d.ts +4 -3
  67. package/dist/src/utils/genericUtil.d.ts +5 -0
  68. package/dist/src/utils/templatePreparation.d.ts +0 -30
  69. package/dist/static/assets/icons/line-change.svg.js +5 -0
  70. package/dist/static/assets/icons/line-delete.svg.js +5 -0
  71. package/dist/static/assets/icons/line-plus.svg.js +5 -0
  72. package/dist/static/styles/components/recommendation-strategy.css.js +155 -0
  73. package/dist/stores/config.js +6 -13
  74. package/dist/utils/dateUtil.js +23 -10
  75. package/dist/utils/genericUtil.js +28 -27
  76. package/dist/utils/templatePreparation.js +48 -50
  77. package/package.json +3 -2
  78. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  79. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  80. package/dist/composables/useSaveValidation.js +0 -279
  81. package/dist/composables/useSaveValidationRollout.js +0 -9
  82. package/dist/enums/save-validation.js +0 -4
  83. package/dist/src/@types/save-validation.d.ts +0 -19
  84. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  85. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  86. package/dist/src/enums/save-validation.d.ts +0 -27
  87. package/dist/src/stores/save-validation.d.ts +0 -22
  88. package/dist/stores/save-validation.js +0 -30
@@ -1,97 +1,66 @@
1
- import { defineComponent as R, computed as l, ref as m } from "vue";
2
- import { useActionsApi as D } from "../../../composables/useActionsApi.js";
3
- import { useConfig as F } from "../../../composables/useConfig.js";
4
- import { useExport as z } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as I } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as P } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as j } from "../../../composables/useSave.js";
8
- import { useSaveValidation as G } from "../../../composables/useSaveValidation.js";
9
- import { useSaveValidationRollout as J } from "../../../composables/useSaveValidationRollout.js";
10
- import { useToaster as K } from "../../../composables/useToaster.js";
11
- import { useTranslations as N } from "../../../composables/useTranslations.js";
12
- import { useVersionHistoryApi as Q } from "../../../composables/useVersionHistoryApi.js";
13
- import { useLiquidValidator as U } from "../../../composables/validators/useLiquidValidator.js";
14
- import { ToasterTypeOptions as W } from "../../../enums/toaster.js";
15
- import { useConfigStore as X } from "../../../stores/config.js";
16
- import { useEditorStore as Y } from "../../../stores/editor.js";
17
- import { useSaveValidationStore as Z } from "../../../stores/save-validation.js";
18
- import { useTemplateStore as $ } from "../../../stores/template.js";
19
- import { getTooltipOptions as tt } from "../../../utils/tooltipUtils.js";
20
- import { InButtonV2 as ot } from "@useinsider/design-system-vue";
21
- import { storeToRefs as et } from "pinia";
22
- import rt from "./MigrationConfirmModal.vue.js";
23
- const At = /* @__PURE__ */ R({
1
+ import { defineComponent as O, ref as n, computed as h } from "vue";
2
+ import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as b } from "../../../composables/useConfig.js";
4
+ import { useExport as k } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as F } from "../../../composables/useSave.js";
8
+ import { useTranslations as L } from "../../../composables/useTranslations.js";
9
+ import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
+ import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
+ import { useEditorStore as I } from "../../../stores/editor.js";
12
+ import { useTemplateStore as P } from "../../../stores/template.js";
13
+ import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
+ import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
+ import { storeToRefs as J } from "pinia";
16
+ import K from "./MigrationConfirmModal.vue.js";
17
+ const ut = /* @__PURE__ */ O({
24
18
  __name: "EditorActions",
25
- setup(it, { expose: A }) {
26
- const { config: u, isFeatureEnabled: c } = F(), { exportHtml: f } = z(), { save: p } = j(), { validateCurrentTemplate: d } = G(), { isEnabled: i } = J(), { showToaster: v } = K(), { openVersionHistory: S, closeVersionHistory: y } = Q(), { getCompiledEmail: g } = D(), { compileHtml: h } = P(), { validateLiquidSyntax: T } = U(), V = X(), e = Y(), H = Z(), w = $(), { hasMigrations: E } = et(w), r = N(), O = l(() => i.value && !V.isTransactional ? r("email-editor.save-and-continue") : "Save"), s = m(!1), a = m(!1), x = m(), n = I(), M = () => {
19
+ setup(N, { expose: x }) {
20
+ const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
27
21
  if (e.isVersionHistoryOpen) {
28
- y();
22
+ p();
29
23
  return;
30
24
  }
31
- S();
32
- }, b = async () => {
33
- s.value = !0, await f(), s.value = !1;
34
- }, k = () => {
25
+ c();
26
+ }, w = async () => {
27
+ i.value = !0, await m(), i.value = !1;
28
+ }, _ = () => {
35
29
  e.isSaveAsTemplateDrawerOpen = !0;
36
- }, q = l(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), B = l(
30
+ }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
37
31
  () => {
38
32
  var t, o;
39
- return ((o = (t = u.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
33
+ return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
40
34
  }
41
- ), C = async (t) => {
42
- a.value = !0, t || (e.loadingStatus = !0);
43
- const o = await p(t);
44
- return a.value = !1, !t && !o && (e.loadingStatus = !1), o;
45
- }, _ = (t) => {
35
+ ), V = async (t) => {
36
+ r.value = !0, t || (e.loadingStatus = !0);
37
+ const o = await u(t);
38
+ return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
39
+ }, E = (t) => {
46
40
  var o;
47
- if (!t && E.value) {
48
- (o = x.value) == null || o.open();
41
+ if (!t && g.value) {
42
+ (o = S.value) == null || o.open();
49
43
  return;
50
44
  }
51
- return C(t);
52
- }, L = async () => {
53
- if (i.value) {
45
+ return V(t);
46
+ }, M = async () => {
47
+ if (l("liquidSyntax")) {
54
48
  e.loadingStatus = !0;
55
- let t = [];
56
49
  try {
57
- t = await d();
58
- } catch (o) {
59
- console.warn("Test-path validation failed; sending without the drawer.", o);
60
- } finally {
61
- e.loadingStatus = !1;
62
- }
63
- if (t.length) {
64
- v({
65
- type: W.Error,
66
- message: r("email-editor.validation-errors-found"),
67
- actionButton: {
68
- text: r("email-editor.check-errors"),
69
- onClick: () => H.open(t, "test")
70
- },
71
- autoHide: !1
72
- });
73
- return;
74
- }
75
- n();
76
- return;
77
- }
78
- if (c("liquidSyntax")) {
79
- e.loadingStatus = !0;
80
- try {
81
- const { html: t } = await g({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = h(t);
82
- if (!await T(o))
50
+ const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
+ if (!await v(o))
83
52
  return;
84
53
  } finally {
85
54
  e.loadingStatus = !1;
86
55
  }
87
56
  }
88
- n();
57
+ H();
89
58
  };
90
- return A({
91
- handleSave: _
92
- }), { __sfc: !0, config: u, isFeatureEnabled: c, exportHtml: f, save: p, validateCurrentTemplate: d, isEnabled: i, showToaster: v, openVersionHistory: S, closeVersionHistory: y, getCompiledEmail: g, compileHtml: h, validateLiquidSyntax: T, configStore: V, editorStore: e, saveValidationStore: H, templateStore: w, hasMigrations: E, trans: r, saveLabel: O, isExporting: s, isSaving: a, migrationModalRef: x, testEmailClick: n, handleVersionHistory: M, handleExport: b, handleSaveAs: k, versionHistoryTooltipText: q, isVersionHistoryButtonVisible: B, executeSave: C, handleSave: _, handleTestEmail: L, getTooltipOptions: tt, InButtonV2: ot, MigrationConfirmModal: rt };
59
+ return x({
60
+ handleSave: E
61
+ }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
93
62
  }
94
63
  });
95
64
  export {
96
- At as default
65
+ ut as default
97
66
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
6
  return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
7
- }, i = [], r = /* @__PURE__ */ n(
7
+ }, i = [], r = /* @__PURE__ */ a(
8
8
  o,
9
- a,
9
+ n,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "74d455fc"
13
+ "73199fa4"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,59 +1,36 @@
1
- import { defineComponent as v, computed as b, ref as B } from "vue";
2
- import { useConfig as S } from "../../../composables/useConfig.js";
3
- import { useBack as y } from "../../../composables/useGuidoActions.js";
4
- import { usePreviewMode as g } from "../../../composables/usePreviewMode.js";
5
- import { useSaveValidation as w } from "../../../composables/useSaveValidation.js";
6
- import { useSaveValidationRollout as V } from "../../../composables/useSaveValidationRollout.js";
7
- import { useTranslations as h } from "../../../composables/useTranslations.js";
1
+ import { defineComponent as l, computed as p, ref as d } from "vue";
2
+ import { useConfig as k } from "../../../composables/useConfig.js";
3
+ import { useBack as B } from "../../../composables/useGuidoActions.js";
4
+ import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
5
+ import { useTranslations as v } from "../../../composables/useTranslations.js";
8
6
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
9
- import { useConfigStore as C } from "../../../stores/config.js";
10
- import { useEditorStore as H } from "../../../stores/editor.js";
11
- import { useSaveValidationStore as L } from "../../../stores/save-validation.js";
12
- import { InButtonV2 as M } from "@useinsider/design-system-vue";
13
- import { useDebounceFn as O } from "../../../node_modules/@vueuse/shared/index.js";
14
- const N = /* @__PURE__ */ v({
7
+ import { useEditorStore as V } from "../../../stores/editor.js";
8
+ import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
+ import { useDebounceFn as y } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ l({
15
11
  __name: "LeftSlot",
16
- setup(P) {
17
- const e = H(), a = y(), { closeVersionHistory: s } = _(), { closePreviewMode: c } = g(), { validateCurrentTemplate: l } = w(), { isEnabled: u } = V(), f = L(), m = C(), r = h(), { config: i } = S(), k = b(() => {
18
- var o, t;
19
- return e.isVersionHistoryOpen || e.isPreviewModeOpen ? r("email-editor.back-to-editor") : (t = (o = i.value) == null ? void 0 : o.ui) != null && t.backButtonLabel ? i.value.ui.backButtonLabel : r("email-editor.back-to-design");
20
- }), n = B(!1), d = async () => {
12
+ setup(C) {
13
+ const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f = p(() => {
14
+ var u, m;
15
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
+ }), r = d(!1), c = () => {
21
17
  if (e.isVersionHistoryOpen) {
22
- s();
18
+ n();
23
19
  return;
24
20
  }
25
21
  if (e.isPreviewModeOpen) {
26
- c();
22
+ s();
27
23
  return;
28
24
  }
29
- if (u.value && !m.isTransactional) {
30
- e.loadingStatus = !0;
31
- let o = [];
32
- try {
33
- o = await l();
34
- } catch (t) {
35
- console.warn("Back-path validation failed; leaving without the drawer.", t);
36
- } finally {
37
- e.loadingStatus = !1;
38
- }
39
- if (o.length) {
40
- f.open(o, "back");
41
- return;
42
- }
43
- }
44
- a();
45
- }, p = O(async () => {
46
- try {
47
- await d();
48
- } finally {
49
- n.value = !1;
50
- }
25
+ i();
26
+ }, a = y(() => {
27
+ c(), r.value = !1;
51
28
  }, 500);
52
- return { __sfc: !0, editorStore: e, handleBack: a, closeVersionHistory: s, closePreviewMode: c, validateCurrentTemplate: l, isEnabled: u, saveValidationStore: f, configStore: m, trans: r, config: i, backButtonLabel: k, isBackButtonDisabled: n, executeBackAction: d, debouncedBackAction: p, handleBackClick: () => {
53
- n.value = !0, p();
54
- }, InButtonV2: M };
29
+ return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
30
+ r.value = !0, a();
31
+ }, InButtonV2: w };
55
32
  }
56
33
  });
57
34
  export {
58
- N as default
35
+ D as default
59
36
  };
@@ -1,19 +1,17 @@
1
1
  import r from "./WpDrawer.vue2.js";
2
2
  import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var u = function() {
4
- var t = this, o = t._self._c, e = t._self._setupProxy;
5
- return o(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(n) {
4
+ var t = this, n = t._self._c, e = t._self._setupProxy;
5
+ return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
6
6
  return e.emit("cancelOrBackButtonEvent");
7
- }, onCloseEvent: function(n) {
7
+ }, onCloseEvent: function(o) {
8
8
  return e.emit("onCloseEvent");
9
- }, primaryButtonEvent: function(n) {
9
+ }, primaryButtonEvent: function(o) {
10
10
  return e.emit("primaryButtonEvent");
11
- }, secondaryButtonEvent: function(n) {
12
- return e.emit("secondaryButtonEvent");
13
11
  } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
14
12
  return [t._t("headerBottomSlot")];
15
13
  }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
16
- return [o("div", [t._t("default")], 2)];
14
+ return [n("div", [t._t("default")], 2)];
17
15
  }, proxy: !0 }], null, !0) });
18
16
  }, i = [], c = /* @__PURE__ */ s(
19
17
  r,
@@ -23,7 +21,7 @@ var u = function() {
23
21
  null,
24
22
  null
25
23
  );
26
- const p = c.exports;
24
+ const f = c.exports;
27
25
  export {
28
- p as default
26
+ f as default
29
27
  };
@@ -13,7 +13,7 @@ const r = /* @__PURE__ */ e({
13
13
  status: { type: Boolean },
14
14
  titleText: null
15
15
  },
16
- emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent", "secondaryButtonEvent"],
16
+ emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent"],
17
17
  setup(n, { emit: t }) {
18
18
  return { __sfc: !0, emit: t, InDrawer: o };
19
19
  }
@@ -1,53 +1,67 @@
1
- import S from "../static/styles/base.css.js";
2
- import m from "../static/styles/components/alert-message.css.js";
3
- import e from "../static/styles/components/amp-block.css.js";
4
- import i from "../static/styles/components/base-input.css.js";
5
- import p from "../static/styles/components/button-group.css.js";
6
- import n from "../static/styles/components/button.css.js";
7
- import s from "../static/styles/components/combobox.css.js";
8
- import C from "../static/styles/components/counter.css.js";
9
- import f from "../static/styles/components/dropdown-menu.css.js";
10
- import a from "../static/styles/components/loader.css.js";
11
- import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/popup.css.js";
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,
21
- // Must be on top
22
- S,
1
+ import S from "../static/assets/icons/line-change.svg.js";
2
+ import i from "../static/assets/icons/line-delete.svg.js";
3
+ import n from "../static/assets/icons/line-plus.svg.js";
4
+ import p from "../static/styles/base.css.js";
5
+ import s from "../static/styles/components/alert-message.css.js";
6
+ import C from "../static/styles/components/amp-block.css.js";
7
+ import a from "../static/styles/components/base-input.css.js";
8
+ import f from "../static/styles/components/button-group.css.js";
9
+ import c from "../static/styles/components/button.css.js";
10
+ import u from "../static/styles/components/combobox.css.js";
11
+ import l from "../static/styles/components/counter.css.js";
12
+ import d from "../static/styles/components/dropdown-menu.css.js";
13
+ import h from "../static/styles/components/loader.css.js";
14
+ import g from "../static/styles/components/narrow-panel.css.js";
15
+ import I from "../static/styles/components/popup.css.js";
16
+ import w from "../static/styles/components/recommendation-strategy.css.js";
17
+ import y from "../static/styles/components/switcher.css.js";
18
+ import b from "../static/styles/components/tabs.css.js";
19
+ import B from "../static/styles/components/tools.css.js";
20
+ import $ from "../static/styles/components/version-history.css.js";
21
+ import P from "../static/styles/components/wide-panel.css.js";
22
+ import x from "../static/styles/variables.css.js";
23
+ function r(t, o) {
24
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
25
+ }
26
+ const A = `:host {
27
+ ${r("line-change", S)}
28
+ ${r("line-delete", i)}
29
+ ${r("line-plus", n)}
30
+ }`, R = [
31
+ x,
23
32
  // Must be on top
24
- m,
25
- e,
26
- i,
33
+ A,
27
34
  p,
28
- n,
35
+ // Must be on top
29
36
  s,
30
37
  C,
31
- f,
32
38
  a,
33
- u,
39
+ f,
34
40
  c,
35
- d,
41
+ u,
36
42
  l,
43
+ d,
37
44
  h,
38
- w,
39
- y
45
+ g,
46
+ I,
47
+ y,
48
+ b,
49
+ B,
50
+ $,
51
+ P,
52
+ w
53
+ // Last: overrides button.css / wide-panel.css defaults
40
54
  ].join(`
41
55
 
42
- `), v = () => ({ importCss: () => {
56
+ `), Y = () => ({ importCss: () => {
43
57
  const o = new CSSStyleSheet();
44
- o.replaceSync(b);
45
- const r = document.querySelector("ui-editor");
46
- if (!r)
58
+ o.replaceSync(R);
59
+ const e = document.querySelector("ui-editor");
60
+ if (!e)
47
61
  return;
48
- const t = r.shadowRoot;
49
- t && (t.adoptedStyleSheets = [o]);
62
+ const m = e.shadowRoot;
63
+ m && (m.adoptedStyleSheets = [o]);
50
64
  } });
51
65
  export {
52
- v as useCustomInterfaceAppearance
66
+ Y as useCustomInterfaceAppearance
53
67
  };
@@ -1,14 +1,13 @@
1
- import { defaultHtmlCompilerRules as d } from "../config/compiler/htmlCompilerRules.js";
2
- import { itemsCompilerRules as f } from "../config/compiler/itemsCompilerRules.js";
3
- import { liquidCompilerRules as g } from "../config/compiler/liquidCompilerRules.js";
4
- import { outlookCompilerRules as R } from "../config/compiler/outlookCompilerRules.js";
1
+ import { defaultHtmlCompilerRules as R } from "../config/compiler/htmlCompilerRules.js";
2
+ import { itemsCompilerRules as g } from "../config/compiler/itemsCompilerRules.js";
3
+ import { liquidCompilerRules as C } from "../config/compiler/liquidCompilerRules.js";
4
+ import { outlookCompilerRules as b } from "../config/compiler/outlookCompilerRules.js";
5
5
  import { recommendationCompilerRules as v } from "../config/compiler/recommendationCompilerRules.js";
6
6
  import { socialCompilerRules as H } from "../config/compiler/socialCompilerRules.js";
7
- import { unsubscribeCompilerRules as b } from "../config/compiler/unsubscribeCompilerRules.js";
8
- import { createHtmlCompiler as n } from "../utils/htmlCompiler.js";
9
- import { computed as p } from "vue";
10
- import { useConfig as C } from "./useConfig.js";
11
- const x = /* @__PURE__ */ new Set([
7
+ import { unsubscribeCompilerRules as x } from "../config/compiler/unsubscribeCompilerRules.js";
8
+ import { createHtmlCompiler as s } from "../utils/htmlCompiler.js";
9
+ import { useConfig as k } from "./useConfig.js";
10
+ const y = /* @__PURE__ */ new Set([
12
11
  // URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
13
12
  "fix-url-encoding-start",
14
13
  "fix-url-encoding-end",
@@ -31,34 +30,24 @@ const x = /* @__PURE__ */ new Set([
31
30
  // Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
32
31
  // it in narrows/breaks rendering. Pure attribute removal, emits nothing.
33
32
  "remove-contenteditable"
34
- ]), I = () => {
35
- const { compiler: i, isFeatureEnabled: u, partner: a } = C(), c = p(() => {
36
- var m, l;
37
- const e = ((m = i.value) == null ? void 0 : m.customRules) || [];
38
- return [
39
- ...!!((l = i.value) != null && l.ignoreDefaultRules) ? [] : d,
40
- ...v,
41
- ...b,
42
- ...f,
43
- ...R,
44
- ...H,
45
- ...u("liquidSyntax") ? g : [],
46
- ...e.map((t, o) => ({
47
- ...t,
48
- priority: t.priority + 1e3 + o
49
- // Ensure additional rules run after default rules
50
- }))
51
- ];
52
- }), r = p(() => {
53
- var t;
54
- const e = c.value, s = n(e), m = n(e.filter((o) => x.has(o.id))), l = (t = a.value) == null ? void 0 : t.fallbackFont;
55
- return {
56
- compileHtml: (o) => s.compile(o, void 0, l),
57
- compileAmpHtml: (o) => m.compile(o, void 0, l)
58
- };
59
- });
60
- return { compileHtml: (e) => r.value.compileHtml(e), compileAmpHtml: (e) => r.value.compileAmpHtml(e) };
33
+ ]), M = () => {
34
+ var i, m, r;
35
+ const { compiler: o, isFeatureEnabled: n, partner: a } = k(), p = ((i = o.value) == null ? void 0 : i.customRules) || [], l = [
36
+ ...!!((m = o.value) != null && m.ignoreDefaultRules) ? [] : R,
37
+ ...v,
38
+ ...x,
39
+ ...g,
40
+ ...b,
41
+ ...H,
42
+ ...n("liquidSyntax") ? C : [],
43
+ ...p.map((e, f) => ({
44
+ ...e,
45
+ priority: e.priority + 1e3 + f
46
+ // Ensure additional rules run after default rules
47
+ }))
48
+ ], u = s(l), c = l.filter((e) => y.has(e.id)), d = s(c), t = (r = a.value) == null ? void 0 : r.fallbackFont;
49
+ return { compileHtml: (e) => u.compile(e, void 0, t), compileAmpHtml: (e) => d.compile(e, void 0, t) };
61
50
  };
62
51
  export {
63
- I as useHtmlCompiler
52
+ M as useHtmlCompiler
64
53
  };
@@ -221,8 +221,6 @@ const De = () => {
221
221
  export {
222
222
  de as buildPartnerAttributeNameSet,
223
223
  fe as findInvalidCustomFields,
224
- pe as getInvalidDynamicContentTags,
225
- ce as getRecommendationBlockIds,
226
224
  ue as parseRecommendationVariable,
227
225
  De as useHtmlValidator
228
226
  };
@@ -1,22 +1,22 @@
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";
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";
3
3
  import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.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";
4
+ import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
+ import { getPartnerRecommendationParams as h } 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
- mobileLeftPadding: a,
11
- mobileRightPadding: s,
12
- cardsInRow: c,
10
+ mobileLeftPadding: i,
11
+ mobileRightPadding: c,
12
+ cardsInRow: s,
13
13
  unresponsive: n
14
14
  }) => {
15
- const r = n ? c : 1, e = a + s + (r - 1) * b;
16
- return (C - e) / r;
15
+ const o = n ? s : 1, e = i + c + (o - 1) * R;
16
+ return (C - e) / o;
17
17
  },
18
- getRecommendationCampaignData: (a) => {
19
- const s = l(), c = Number(a), n = s.blockStates[c];
18
+ getRecommendationCampaignData: (i) => {
19
+ const c = l(), s = Number(i), n = c.blockStates[s];
20
20
  if (!n)
21
21
  return {
22
22
  textTrimming: !1,
@@ -30,47 +30,54 @@ const B = () => ({
30
30
  discountBeforeTextValue: "",
31
31
  discountAfterTextValue: ""
32
32
  };
33
- const { recommendationConfigs: r } = n, e = r.orientation === "grid" ? "vertical" : "horizontal";
33
+ const { recommendationConfigs: o } = n, e = o.orientation === "grid" ? "vertical" : "horizontal";
34
34
  return {
35
- textTrimming: r.textTrimming,
35
+ textTrimming: o.textTrimming,
36
36
  orientation: e,
37
37
  mobileLeftPadding: 0,
38
38
  mobileRightPadding: 0,
39
- cardsInRow: r.cardsInRow,
40
- unresponsive: r.unresponsive,
39
+ cardsInRow: o.cardsInRow,
40
+ unresponsive: o.unresponsive,
41
41
  priceBeforeTextValue: "",
42
42
  priceAfterTextValue: "",
43
43
  discountBeforeTextValue: "",
44
44
  discountAfterTextValue: ""
45
45
  };
46
46
  },
47
- buildCampaignUrl: (a, s) => {
47
+ buildCampaignUrl: (i, c) => {
48
48
  var m;
49
- const c = l(), n = P(), r = Number(a);
49
+ const s = l(), n = P(), o = Number(i);
50
50
  let e;
51
- if (s)
52
- e = s;
51
+ if (c)
52
+ e = c;
53
53
  else {
54
- const i = c.blockStates[r];
55
- if (!i)
54
+ const a = s.blockStates[o];
55
+ if (!a)
56
56
  return "";
57
- const { recommendationConfigs: o } = i;
57
+ const { recommendationConfigs: r } = a;
58
58
  e = {
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
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
66
67
  };
67
68
  }
68
- const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
69
+ if (e.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy"))
70
+ return s.recommendationCampaignUrls[i] = {
71
+ strategyId: e.strategyId,
72
+ locale: e.language,
73
+ currency: e.currencyCode
74
+ }, "";
75
+ const g = ((m = y().find((a) => a.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
69
76
  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;
77
+ const f = e.filters.filter((a) => a.isValid), d = b(f);
78
+ d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(n.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
79
+ const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${g}?${p}`;
80
+ return s.recommendationCampaignUrls[i] = u, u;
74
81
  }
75
82
  });
76
83
  export {