@useinsider/guido 3.17.0-beta.e6704da → 3.17.0-beta.ea65303

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 (75) hide show
  1. package/README.md +1 -1
  2. package/dist/@types/config/schemas.js +31 -35
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +77 -77
  5. package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
  6. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  7. package/dist/components/organisms/header/EditorActions.vue2.js +74 -43
  8. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
  10. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  11. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +48 -0
  12. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  13. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  14. package/dist/composables/useCustomInterfaceAppearance.js +16 -19
  15. package/dist/composables/useHtmlCompiler.js +37 -26
  16. package/dist/composables/useHtmlValidator.js +2 -0
  17. package/dist/composables/useRecommendation.js +34 -41
  18. package/dist/composables/useSave.js +84 -41
  19. package/dist/composables/useSaveValidation.js +279 -0
  20. package/dist/composables/useSaveValidationRollout.js +9 -0
  21. package/dist/composables/validators/useCouponBlockValidator.js +24 -21
  22. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  23. package/dist/config/migrator/recommendationMigrator.js +4 -6
  24. package/dist/enums/academy.js +1 -2
  25. package/dist/enums/date.js +3 -4
  26. package/dist/enums/extensions/recommendationBlock.js +23 -25
  27. package/dist/enums/save-validation.js +4 -0
  28. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -13
  29. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +95 -96
  30. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +154 -156
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +82 -223
  32. package/dist/extensions/Blocks/common-control.js +19 -22
  33. package/dist/guido.css +1 -1
  34. package/dist/services/recommendationApi.js +29 -78
  35. package/dist/src/@types/config/schemas.d.ts +4 -12
  36. package/dist/src/@types/save-validation.d.ts +19 -0
  37. package/dist/src/components/Guido.vue.d.ts +17 -1
  38. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  39. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  40. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  41. package/dist/src/components/organisms/{extensions/recommendation/AssignStrategyDrawer.vue.d.ts → validation/ValidationErrorDrawer.vue.d.ts} +0 -1
  42. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  43. package/dist/src/composables/useConfig.d.ts +2 -2
  44. package/dist/src/composables/useHtmlValidator.d.ts +21 -0
  45. package/dist/src/composables/useRecommendation.d.ts +0 -1
  46. package/dist/src/composables/useSave.d.ts +6 -1
  47. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  48. package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
  49. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  50. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  51. package/dist/src/enums/academy.d.ts +0 -1
  52. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  53. package/dist/src/enums/save-validation.d.ts +27 -0
  54. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -14
  55. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +15 -214
  56. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  57. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  58. package/dist/src/services/recommendationApi.d.ts +1 -4
  59. package/dist/src/stores/config.d.ts +30 -18
  60. package/dist/src/stores/save-validation.d.ts +22 -0
  61. package/dist/src/utils/templatePreparation.d.ts +30 -0
  62. package/dist/stores/config.js +39 -22
  63. package/dist/stores/save-validation.js +30 -0
  64. package/dist/utils/dateUtil.js +10 -23
  65. package/dist/utils/templatePreparation.js +50 -50
  66. package/package.json +1 -2
  67. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  68. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -70
  69. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  70. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  71. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -141
  72. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +0 -24
  73. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -29
  74. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -43
  75. package/dist/static/styles/components/recommendation-strategy.css.js +0 -171
@@ -1,66 +1,97 @@
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({
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 W } from "../../../composables/useSave.js";
8
+ import { useSaveValidation as j } from "../../../composables/useSaveValidation.js";
9
+ import { useSaveValidationRollout as G } from "../../../composables/useSaveValidationRollout.js";
10
+ import { useToaster as J } from "../../../composables/useToaster.js";
11
+ import { useTranslations as K } from "../../../composables/useTranslations.js";
12
+ import { useVersionHistoryApi as N } from "../../../composables/useVersionHistoryApi.js";
13
+ import { useLiquidValidator as Q } from "../../../composables/validators/useLiquidValidator.js";
14
+ import { ToasterTypeOptions as U } 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({
18
24
  __name: "EditorActions",
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 = () => {
25
+ setup(it, { expose: A }) {
26
+ const { config: u, isFeatureEnabled: c } = F(), { exportHtml: f } = z(), { save: p } = W(), { validateCurrentTemplate: d } = j(), { isEnabled: i } = G(), { showToaster: v } = J(), { openVersionHistory: S, closeVersionHistory: y } = N(), { getCompiledEmail: g } = D(), { compileHtml: h } = P(), { validateLiquidSyntax: V } = Q(), T = X(), e = Y(), w = Z(), H = $(), { hasMigrations: E } = et(H), r = K(), O = l(() => i.value && T.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), s = m(!1), a = m(!1), x = m(), n = I(), M = () => {
21
27
  if (e.isVersionHistoryOpen) {
22
- p();
28
+ y();
23
29
  return;
24
30
  }
25
- c();
26
- }, w = async () => {
27
- i.value = !0, await m(), i.value = !1;
28
- }, _ = () => {
31
+ S();
32
+ }, b = async () => {
33
+ s.value = !0, await f(), s.value = !1;
34
+ }, k = () => {
29
35
  e.isSaveAsTemplateDrawerOpen = !0;
30
- }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
36
+ }, q = l(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), B = l(
31
37
  () => {
32
38
  var t, o;
33
- return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
39
+ return ((o = (t = u.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
40
  }
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) => {
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) => {
40
46
  var o;
41
- if (!t && g.value) {
42
- (o = S.value) == null || o.open();
47
+ if (!t && E.value) {
48
+ (o = x.value) == null || o.open();
43
49
  return;
44
50
  }
45
- return V(t);
46
- }, M = async () => {
47
- if (l("liquidSyntax")) {
51
+ return C(t);
52
+ }, L = async () => {
53
+ if (i.value) {
48
54
  e.loadingStatus = !0;
55
+ let t = [];
49
56
  try {
50
- const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
- if (!await v(o))
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: U.Error,
66
+ message: r("email-editor.validation-errors-found"),
67
+ actionButton: {
68
+ text: r("email-editor.check-errors"),
69
+ onClick: () => w.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 V(o))
52
83
  return;
53
84
  } finally {
54
85
  e.loadingStatus = !1;
55
86
  }
56
87
  }
57
- H();
88
+ n();
58
89
  };
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 };
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: V, configStore: T, editorStore: e, saveValidationStore: w, templateStore: H, 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 };
62
93
  }
63
94
  });
64
95
  export {
65
- ut as default
96
+ At as default
66
97
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = 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__ */ a(
7
+ }, i = [], r = /* @__PURE__ */ n(
8
8
  o,
9
- n,
9
+ a,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "73199fa4"
13
+ "b8f24f34"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,19 +1,19 @@
1
- import { defineComponent as l, computed as p, ref as d } from "vue";
1
+ import { defineComponent as m, computed as p, ref as d } from "vue";
2
2
  import { useConfig as k } from "../../../composables/useConfig.js";
3
3
  import { useBack as B } from "../../../composables/useGuidoActions.js";
4
4
  import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
5
5
  import { useTranslations as v } from "../../../composables/useTranslations.js";
6
6
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as V } from "../../../stores/editor.js";
7
+ import { useEditorStore as y } from "../../../stores/editor.js";
8
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({
9
+ import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ m({
11
11
  __name: "LeftSlot",
12
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 = () => {
13
+ const e = y(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), l = p(() => {
14
+ var u, f;
15
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (f = (u = t.value) == null ? void 0 : u.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
+ }), r = d(!1), a = () => {
17
17
  if (e.isVersionHistoryOpen) {
18
18
  n();
19
19
  return;
@@ -23,11 +23,15 @@ const D = /* @__PURE__ */ l({
23
23
  return;
24
24
  }
25
25
  i();
26
- }, a = y(() => {
27
- c(), r.value = !1;
26
+ }, c = V(async () => {
27
+ try {
28
+ await a();
29
+ } finally {
30
+ r.value = !1;
31
+ }
28
32
  }, 500);
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();
33
+ return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: l, isBackButtonDisabled: r, executeBackAction: a, debouncedBackAction: c, handleBackClick: () => {
34
+ r.value = !0, c();
31
35
  }, InButtonV2: w };
32
36
  }
33
37
  });
@@ -0,0 +1,20 @@
1
+ import a from "./ValidationErrorDrawer.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var r = this, o = r._self._c, t = r._self._setupProxy;
6
+ return o(t.WpDrawer, { attrs: { id: "guido__validation-error-drawer", size: "small", "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.isDrawerOpen, "title-text": t.titleText }, on: { onCloseEvent: t.handleClose, primaryButtonEvent: t.handleClose, secondaryButtonEvent: t.handleSaveAndContinue } }, [o("div", { staticClass: "d-f f-d-c validation-error-list" }, r._l(t.rows, function(e, n) {
7
+ return o("div", { key: n, staticClass: "d-f a-i-c validation-error-row" }, [o(t.InIcons, { staticClass: "validation-error-row__icon i-c-12", attrs: { name: "filled-caution-triangle" } }), o("span", { staticClass: "validation-error-row__text" }, [r._v(r._s(e))])], 1);
8
+ }), 0)]);
9
+ }, l = [], _ = /* @__PURE__ */ s(
10
+ a,
11
+ i,
12
+ l,
13
+ !1,
14
+ null,
15
+ "30d2e1f9"
16
+ );
17
+ const p = _.exports;
18
+ export {
19
+ p as default
20
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as m, ref as p, computed as a } from "vue";
2
+ import f from "../../wrappers/WpDrawer.vue.js";
3
+ import { useSave as S } from "../../../composables/useSave.js";
4
+ import { useTranslations as v } from "../../../composables/useTranslations.js";
5
+ import { useConfigStore as g } from "../../../stores/config.js";
6
+ import { useEditorStore as y } from "../../../stores/editor.js";
7
+ import { useSaveValidationStore as h } from "../../../stores/save-validation.js";
8
+ import { InIcons as w } from "@useinsider/design-system-vue";
9
+ const I = /* @__PURE__ */ m({
10
+ __name: "ValidationErrorDrawer",
11
+ setup(_) {
12
+ const r = v(), e = h(), n = y(), s = g(), { saveWithErrors: i } = S(), o = p(!1), l = a(() => `${r("email-editor.validation-errors")} (${e.errorCount})`), u = a(() => {
13
+ const t = {
14
+ primaryButton: {
15
+ styling: "solid",
16
+ type: "primary",
17
+ labelText: r("email-editor.update-design")
18
+ }
19
+ };
20
+ return s.allowSaveWithErrors && e.intent !== "test" && (t.secondaryButton = {
21
+ styling: "solid",
22
+ type: "subtle-primary",
23
+ labelText: r("email-editor.save-and-continue"),
24
+ loadingStatus: o.value
25
+ }), t;
26
+ }), d = a(() => e.errors.map((t) => {
27
+ const c = t.detail ? ` (${t.detail})` : "";
28
+ return `${t.message}${c}`;
29
+ }));
30
+ return { __sfc: !0, trans: r, store: e, editorStore: n, configStore: s, saveWithErrors: i, isSaving: o, titleText: l, footerButtonGroupOptions: u, rows: d, handleClose: () => {
31
+ e.isDrawerOpen && e.close();
32
+ }, handleSaveAndContinue: async () => {
33
+ if (!o.value) {
34
+ o.value = !0, n.loadingStatus = !0;
35
+ try {
36
+ await i() ? e.close() : n.loadingStatus = !1;
37
+ } catch (t) {
38
+ console.warn("Soft-save failed; keeping the drawer open.", t), n.loadingStatus = !1;
39
+ } finally {
40
+ o.value = !1;
41
+ }
42
+ }
43
+ }, WpDrawer: f, InIcons: w };
44
+ }
45
+ });
46
+ export {
47
+ I as default
48
+ };
@@ -1,17 +1,19 @@
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, 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) {
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) {
6
6
  return e.emit("cancelOrBackButtonEvent");
7
- }, onCloseEvent: function(o) {
7
+ }, onCloseEvent: function(n) {
8
8
  return e.emit("onCloseEvent");
9
- }, primaryButtonEvent: function(o) {
9
+ }, primaryButtonEvent: function(n) {
10
10
  return e.emit("primaryButtonEvent");
11
+ }, secondaryButtonEvent: function(n) {
12
+ return e.emit("secondaryButtonEvent");
11
13
  } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
12
14
  return [t._t("headerBottomSlot")];
13
15
  }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
14
- return [n("div", [t._t("default")], 2)];
16
+ return [o("div", [t._t("default")], 2)];
15
17
  }, proxy: !0 }], null, !0) });
16
18
  }, i = [], c = /* @__PURE__ */ s(
17
19
  r,
@@ -21,7 +23,7 @@ var u = function() {
21
23
  null,
22
24
  null
23
25
  );
24
- const f = c.exports;
26
+ const p = c.exports;
25
27
  export {
26
- f as default
28
+ p as default
27
29
  };
@@ -13,7 +13,7 @@ const r = /* @__PURE__ */ e({
13
13
  status: { type: Boolean },
14
14
  titleText: null
15
15
  },
16
- emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent"],
16
+ emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent", "secondaryButtonEvent"],
17
17
  setup(n, { emit: t }) {
18
18
  return { __sfc: !0, emit: t, InDrawer: o };
19
19
  }
@@ -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,13 +1,14 @@
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";
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";
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 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([
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([
11
12
  // URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
12
13
  "fix-url-encoding-start",
13
14
  "fix-url-encoding-end",
@@ -30,24 +31,34 @@ const y = /* @__PURE__ */ new Set([
30
31
  // Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
31
32
  // it in narrows/breaks rendering. Pure attribute removal, emits nothing.
32
33
  "remove-contenteditable"
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) };
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) };
50
61
  };
51
62
  export {
52
- M as useHtmlCompiler
63
+ I as useHtmlCompiler
53
64
  };
@@ -221,6 +221,8 @@ const De = () => {
221
221
  export {
222
222
  de as buildPartnerAttributeNameSet,
223
223
  fe as findInvalidCustomFields,
224
+ pe as getInvalidDynamicContentTags,
225
+ ce as getRecommendationBlockIds,
224
226
  ue as parseRecommendationVariable,
225
227
  De as useHtmlValidator
226
228
  };
@@ -1,22 +1,22 @@
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
- mobileLeftPadding: i,
11
- mobileRightPadding: c,
12
- cardsInRow: s,
10
+ mobileLeftPadding: a,
11
+ mobileRightPadding: s,
12
+ cardsInRow: c,
13
13
  unresponsive: n
14
14
  }) => {
15
- const o = n ? s : 1, e = i + c + (o - 1) * R;
16
- return (C - e) / o;
15
+ const r = n ? c : 1, e = a + s + (r - 1) * b;
16
+ return (C - e) / r;
17
17
  },
18
- getRecommendationCampaignData: (i) => {
19
- const c = l(), s = Number(i), n = c.blockStates[s];
18
+ getRecommendationCampaignData: (a) => {
19
+ const s = l(), c = Number(a), n = s.blockStates[c];
20
20
  if (!n)
21
21
  return {
22
22
  textTrimming: !1,
@@ -30,54 +30,47 @@ const B = () => ({
30
30
  discountBeforeTextValue: "",
31
31
  discountAfterTextValue: ""
32
32
  };
33
- const { recommendationConfigs: o } = n, e = o.orientation === "grid" ? "vertical" : "horizontal";
33
+ const { recommendationConfigs: r } = n, e = r.orientation === "grid" ? "vertical" : "horizontal";
34
34
  return {
35
- textTrimming: o.textTrimming,
35
+ textTrimming: r.textTrimming,
36
36
  orientation: e,
37
37
  mobileLeftPadding: 0,
38
38
  mobileRightPadding: 0,
39
- cardsInRow: o.cardsInRow,
40
- unresponsive: o.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: (i, c) => {
47
+ buildCampaignUrl: (a, s) => {
48
48
  var m;
49
- const s = l(), n = P(), o = Number(i);
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 a = s.blockStates[o];
55
- if (!a)
54
+ const i = c.blockStates[r];
55
+ if (!i)
56
56
  return "";
57
- const { recommendationConfigs: r } = a;
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 (n.isFeatureEnabled("reusableRecommendationStrategy") && e.strategyId)
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();
68
+ const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
76
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}");
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;
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 {