@useinsider/guido 3.18.2-beta.32d291d → 3.18.2-beta.3718ee1

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 (47) hide show
  1. package/README.md +3 -21
  2. package/dist/@types/config/schemas.js +51 -59
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +53 -55
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
  7. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
  8. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +24 -28
  9. package/dist/composables/useCustomInterfaceAppearance.js +42 -46
  10. package/dist/enums/extensions/recommendationBlock.js +31 -40
  11. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +4 -4
  12. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +76 -77
  13. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +28 -72
  14. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
  15. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +6 -3
  16. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +46 -110
  17. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
  18. package/dist/guido.css +1 -1
  19. package/dist/services/recommendationApi.js +37 -46
  20. package/dist/src/@types/config/schemas.d.ts +0 -16
  21. package/dist/src/composables/useConfig.d.ts +0 -4
  22. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  23. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
  24. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
  25. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -70
  26. package/dist/src/services/recommendationApi.d.ts +1 -2
  27. package/dist/src/stores/config.d.ts +0 -322
  28. package/dist/src/stores/onboarding.d.ts +10 -808
  29. package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
  30. package/dist/stores/config.js +60 -74
  31. package/dist/stores/onboarding.js +36 -46
  32. package/package.json +1 -1
  33. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
  34. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
  35. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
  36. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
  37. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
  38. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -46
  39. package/dist/composables/useLegacyStrategyConversion.js +0 -61
  40. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -42
  41. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
  42. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
  43. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
  44. package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
  45. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -32
  46. package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
  47. package/dist/static/assets/icons/line-info.svg.js +0 -5
@@ -1,73 +1,48 @@
1
- import { defineComponent as h, defineAsyncComponent as T, ref as _, computed as s, watch as B } from "vue";
1
+ import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useLegacyStrategyConversion as I } from "../../../../composables/useLegacyStrategyConversion.js";
4
- import { useToaster as N } from "../../../../composables/useToaster.js";
5
- import { useTranslations as k } from "../../../../composables/useTranslations.js";
6
- import { DOTTED_DATE_LOCALE as P } from "../../../../enums/date.js";
7
- import { URLS as U } from "../../../../enums/extensions/recommendationBlock.js";
8
- import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
9
- import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
10
- import G from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as M } from "../../../../utils/dateUtil.js";
12
- import { asText as D } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as x } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as R } from "@useinsider/design-system-vue";
15
- const st = /* @__PURE__ */ h({
3
+ import { useToaster as x } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
+ import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import B from "./StrategyInfoBoxContent.vue.js";
10
+ import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
+ import { asText as f } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as b } from "@useinsider/design-system-vue";
14
+ const W = /* @__PURE__ */ v({
16
15
  __name: "AssignStrategyDrawer",
17
- setup(H) {
18
- const l = () => import("@useinsider/design-system-organisms"), g = (t, a) => ({
19
- render: (n) => n(R, { props: { sizing: { width: t, height: a } } })
20
- }), O = T({
21
- loader: async () => (await l()).OrgStrategyDetailModal,
16
+ setup(k) {
17
+ const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
18
+ render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
19
+ }), S = y({
20
+ loader: async () => (await c()).OrgStrategyDetailModal,
22
21
  loadingComponent: g(480, 240),
23
22
  delay: 0
24
- }), w = T({
25
- loader: async () => (await l()).OrgStrategyDropdown,
23
+ }), T = y({
24
+ loader: async () => (await c()).OrgStrategyDropdown,
26
25
  loadingComponent: g(240, 42),
27
26
  delay: 0
28
- }), r = k(), e = b(), { showToaster: i } = N(), { convertLegacyStrategy: u } = I(), o = _(null), y = "legacy", d = "guido__btn-update-legacy-strategy", c = _(!1), A = s(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: U.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
29
- B(() => e.assignStrategyDrawerStatus, (t) => {
27
+ }), o = A(), e = C(), { showToaster: s } = x(), n = u(null), i = u(!1), _ = l(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
28
+ O(() => e.assignStrategyDrawerStatus, (t) => {
30
29
  if (!t)
31
30
  return;
32
- const { strategyId: a } = e.recommendationConfigs;
33
- o.value = a || (e.isLegacyStrategyBlock ? y : null), c.value = !1, e.fetchStrategies().catch(() => {
34
- i({
35
- type: p.Error,
36
- message: r("discovery-strategy.error-description")
31
+ const { strategyId: r } = e.recommendationConfigs;
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
34
+ type: m.Error,
35
+ message: o("discovery-strategy.error-description")
37
36
  });
38
37
  });
39
38
  });
40
- const f = (t) => {
41
- const a = D(t.updated_at || t.created_at);
42
- if (!a)
39
+ const p = (t) => {
40
+ const r = f(t.updated_at || t.created_at);
41
+ if (!r)
43
42
  return "";
44
- const n = M(a, P);
45
- return r("recommendation-strategy.last-updated-on", { value: n });
46
- }, S = s(() => ({
47
- text: r("ds-steps.legacy-strategy"),
48
- value: y,
49
- infoBoxProps: {
50
- id: "strategy-info-legacy",
51
- theme: "light",
52
- variant: "information",
53
- className: "assign-strategy-info-box",
54
- titleText: x(r("ds-steps.legacy-strategy")),
55
- descriptionStatus: !0,
56
- descriptionText: r("statistics.legacy-strategy-description"),
57
- buttonOptions: [{
58
- id: d,
59
- type: "primary",
60
- text: r("ds-steps.update"),
61
- loadingStatus: e.legacyConversionLoading,
62
- disabledStatus: e.legacyConversionLoading
63
- }]
64
- }
65
- })), E = async (t) => {
66
- if ((t == null ? void 0 : t.id) !== d)
67
- return;
68
- const a = await u();
69
- a && (o.value = a);
70
- }, m = s(() => e.strategies.map((t) => ({
43
+ const a = I(r, E);
44
+ return o("recommendation-strategy.last-updated-on", { value: a });
45
+ }, D = l(() => e.strategies.map((t) => ({
71
46
  text: t.name,
72
47
  value: t.strategy_id,
73
48
  infoBoxProps: {
@@ -75,57 +50,57 @@ const st = /* @__PURE__ */ h({
75
50
  theme: "light",
76
51
  variant: "information",
77
52
  className: "assign-strategy-info-box",
78
- titleText: x(D(t.name)),
53
+ titleText: N(f(t.name)),
79
54
  descriptionStatus: !0,
80
- descriptionText: f(t),
81
- slot: G,
55
+ descriptionText: p(t),
56
+ slot: B,
82
57
  slotProps: { strategy: t }
83
58
  }
84
- }))), C = s(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), v = s(() => {
85
- const t = e.strategies.find((a) => String(a.strategy_id) === String(o.value ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
86
61
  return t ? { ...t, fallback_config: null } : null;
87
- }), L = s(() => ({
62
+ }), w = l(() => ({
88
63
  primaryButton: {
89
64
  styling: "solid",
90
65
  type: "primary",
91
- labelText: r("products.assign-btn")
66
+ labelText: o("products.assign-btn")
92
67
  },
93
68
  cancelOrBackButton: {
94
69
  styling: "ghost",
95
70
  type: "secondary",
96
- labelText: r("products.cancel")
71
+ labelText: o("products.cancel")
97
72
  }
98
73
  }));
99
- return { __sfc: !0, loadOrganisms: l, skeleton: g, OrgStrategyDetailModal: O, OrgStrategyDropdown: w, trans: r, store: e, showToaster: i, convertLegacyStrategy: u, selectedStrategyId: o, LEGACY_OPTION_VALUE: y, LEGACY_UPDATE_BUTTON_ID: d, showSelectionError: c, drawerDescription: A, lastUpdatedText: f, legacyStrategyOption: S, onInfoBoxButtonClick: E, remoteStrategyOptions: m, strategyOptions: C, selectedStrategy: v, footerButtonGroupOptions: L, closeDrawer: () => {
74
+ return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: S, OrgStrategyDropdown: T, trans: o, store: e, showToaster: s, selectedStrategyId: n, showSelectionError: i, drawerDescription: _, lastUpdatedText: p, strategyOptions: D, selectedStrategy: d, footerButtonGroupOptions: w, closeDrawer: () => {
100
75
  e.closeAssignStrategyDrawer();
101
76
  }, assignStrategy: async () => {
102
- const t = v.value;
77
+ const t = d.value;
103
78
  if (!t) {
104
- c.value = !0;
79
+ i.value = !0;
105
80
  return;
106
81
  }
107
- let a = "";
82
+ let r = "";
108
83
  try {
109
- a = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
110
- } catch (n) {
111
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
84
+ r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
85
+ } catch (a) {
86
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
112
87
  }
113
- if (!a) {
114
- i({
115
- type: p.Error,
116
- message: r("email-editor.strategy-assign-failed", { strategyName: t.name })
88
+ if (!r) {
89
+ s({
90
+ type: m.Error,
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
117
92
  });
118
93
  return;
119
94
  }
120
- e.assignStrategy(t), i({
121
- type: p.Success,
122
- message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
95
+ e.assignStrategy(t), s({
96
+ type: m.Success,
97
+ message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
123
98
  }), e.closeAssignStrategyDrawer();
124
99
  }, onSelect: (t) => {
125
- o.value = t.value, c.value = !1;
100
+ n.value = t.value, i.value = !1;
126
101
  } };
127
102
  }
128
103
  });
129
104
  export {
130
- st as default
105
+ W as default
131
106
  };
@@ -1,17 +1,15 @@
1
- import { defineComponent as y, computed as n } from "vue";
2
- import f from "../../../wrappers/WpModal.vue.js";
3
- import { useToaster as u } from "../../../../composables/useToaster.js";
1
+ import { defineComponent as u, computed as n } from "vue";
2
+ import y from "../../../wrappers/WpModal.vue.js";
3
+ import { useToaster as f } from "../../../../composables/useToaster.js";
4
4
  import { useTranslations as _ } from "../../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as R } from "../../../../enums/toaster.js";
6
- import "../../../../extensions/Blocks/Recommendation/constants/selectors.js";
7
- import { CURRENT_CONFIG_VERSION as T } from "../../../../extensions/Blocks/Recommendation/constants/defaultConfig.js";
8
- import { useRecommendationExtensionStore as v } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitBlockChangeOutsidePanel as N } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
10
- import { escapeHtml as S } from "../../../../utils/htmlEscape.js";
11
- const w = /* @__PURE__ */ y({
5
+ import { ToasterTypeOptions as v } from "../../../../enums/toaster.js";
6
+ import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
+ import { commitBlockChangeOutsidePanel as h } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
8
+ import { escapeHtml as R } from "../../../../utils/htmlEscape.js";
9
+ const P = /* @__PURE__ */ u({
12
10
  __name: "RemoveStrategyModal",
13
- setup(h) {
14
- const t = _(), e = v(), { showToaster: a } = u(), i = n(() => ({
11
+ setup(S) {
12
+ const t = _(), e = T(), { showToaster: a } = f(), i = n(() => ({
15
13
  cancelOrBackButton: {
16
14
  type: "secondary",
17
15
  labelText: t("products.cancel"),
@@ -22,38 +20,38 @@ const w = /* @__PURE__ */ y({
22
20
  labelText: t("discovery-strategy.remove")
23
21
  }
24
22
  })), m = n(() => {
25
- var r;
26
- const { strategyId: o } = e.recommendationConfigs;
27
- return o ? ((r = e.assignedStrategy) == null ? void 0 : r.name) || `#${o}` : t("ds-steps.legacy-strategy");
23
+ var o;
24
+ const { strategyId: r } = e.recommendationConfigs;
25
+ return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${r}`;
28
26
  }), s = "__STRATEGY_NAME__", d = n(() => t("email-editor.remove-strategy-confirm-message", { strategyName: s }).split(s)), c = () => {
29
27
  e.closeRemoveStrategyModal();
30
28
  };
31
29
  return { __sfc: !0, trans: t, store: e, showToaster: a, footerButtonOptions: i, strategyName: m, NAME_TOKEN: s, messageParts: d, close: c, handleConfirm: async () => {
32
- const o = m.value, r = e.currentRecommendationId;
30
+ const r = m.value, o = e.currentRecommendationId;
33
31
  e.removeStrategy(), c();
34
32
  const { strategyId: l, size: g } = e.recommendationConfigs;
35
33
  if (a({
36
- type: R.Success,
34
+ type: v.Success,
37
35
  // The toast renders through a sanitizing v-html, so the name is escaped first.
38
36
  message: t("email-editor.strategy-removed-success", {
39
- strategyName: `<b>${S(o)}</b>`
37
+ strategyName: `<b>${R(r)}</b>`
40
38
  })
41
- }), r !== null) {
39
+ }), o !== null) {
42
40
  try {
43
41
  await e.fetchRecommendationProducts();
44
42
  } catch (p) {
45
43
  console.error("[RemoveStrategyModal] product refetch failed", p);
46
44
  }
47
- N(
48
- r,
49
- { strategyId: l, size: g, configVersion: T },
45
+ h(
46
+ o,
47
+ { strategyId: l, size: g },
50
48
  e.recommendationProducts,
51
49
  "Removed recommendation strategy"
52
50
  );
53
51
  }
54
- }, WpModal: f };
52
+ }, WpModal: y };
55
53
  }
56
54
  });
57
55
  export {
58
- w as default
56
+ P as default
59
57
  };
@@ -1,30 +1,26 @@
1
- import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
2
- import y from "./AMPOnboarding.vue.js";
3
- import u from "./GenericOnboarding.vue.js";
4
- import v from "./ItemsOnboarding.vue.js";
5
- import S from "./NewVersionPopup.vue.js";
6
- import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
7
- import h from "./RecommendationStrategyOnboarding.vue.js";
8
- import w from "./TextBlockOnboarding.vue.js";
9
- import P from "./VersionHistoryOnboarding.vue.js";
10
- import { usePartner as _ } from "../../../composables/usePartner.js";
11
- import { useEditorStore as A } from "../../../stores/editor.js";
12
- import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
- import { usePreviewStore as M } from "../../../stores/preview.js";
14
- const U = /* @__PURE__ */ f({
1
+ import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
+ import u from "./AMPOnboarding.vue.js";
3
+ import v from "./GenericOnboarding.vue.js";
4
+ import l from "./ItemsOnboarding.vue.js";
5
+ import y from "./NewVersionPopup.vue.js";
6
+ import S from "./TextBlockOnboarding.vue.js";
7
+ import h from "./VersionHistoryOnboarding.vue.js";
8
+ import { usePartner as w } from "../../../composables/usePartner.js";
9
+ import { useEditorStore as P } from "../../../stores/editor.js";
10
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
+ import { usePreviewStore as A } from "../../../stores/preview.js";
12
+ const G = /* @__PURE__ */ b({
15
13
  __name: "OnboardingWrapper",
16
14
  emits: ["onboarding-finished"],
17
- setup(x, { emit: g }) {
18
- const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
19
- { type: "newVersionPopup", component: S },
20
- { type: "genericOnboarding", component: u },
21
- { type: "textBlockOnboarding", component: w },
22
- { type: "versionHistoryOnboarding", component: P },
23
- { type: "ampOnboarding", component: y },
24
- { type: "itemsOnboarding", component: v },
25
- { type: "recommendationStrategyOnboarding", component: h },
26
- { type: "recommendationLegacyStrategyOnboarding", component: l }
27
- ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
15
+ setup(H, { emit: f }) {
16
+ const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
+ { type: "newVersionPopup", component: y },
18
+ { type: "genericOnboarding", component: v },
19
+ { type: "textBlockOnboarding", component: S },
20
+ { type: "versionHistoryOnboarding", component: h },
21
+ { type: "ampOnboarding", component: u },
22
+ { type: "itemsOnboarding", component: l }
23
+ ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
28
24
  return O(async () => {
29
25
  await o.fetchUserModalState();
30
26
  }), t(
@@ -33,7 +29,7 @@ const U = /* @__PURE__ */ f({
33
29
  n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
34
30
  }
35
31
  ), t(
36
- () => a.emailFormat,
32
+ () => s.emailFormat,
37
33
  (n, i) => {
38
34
  i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
39
35
  }
@@ -42,9 +38,9 @@ const U = /* @__PURE__ */ f({
42
38
  (n) => {
43
39
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
44
40
  }
45
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
41
+ ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
46
42
  }
47
43
  });
48
44
  export {
49
- U as default
45
+ G as default
50
46
  };
@@ -1,71 +1,67 @@
1
- import i from "../static/assets/icons/filled-arrow-rising.svg.js";
2
- import n from "../static/assets/icons/line-change.svg.js";
3
- import S from "../static/assets/icons/line-delete.svg.js";
4
- import p from "../static/assets/icons/line-info.svg.js";
5
- import s from "../static/assets/icons/line-plus.svg.js";
6
- import f from "../static/styles/base.css.js";
7
- import C from "../static/styles/components/alert-message.css.js";
8
- import a from "../static/styles/components/amp-block.css.js";
9
- import c from "../static/styles/components/base-input.css.js";
10
- import l from "../static/styles/components/button-group.css.js";
11
- import u from "../static/styles/components/button.css.js";
12
- import d from "../static/styles/components/combobox.css.js";
13
- import I from "../static/styles/components/counter.css.js";
14
- import g from "../static/styles/components/dropdown-menu.css.js";
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";
15
13
  import h from "../static/styles/components/loader.css.js";
16
- import w from "../static/styles/components/narrow-panel.css.js";
17
- import $ from "../static/styles/components/popup.css.js";
18
- import y from "../static/styles/components/recommendation-strategy.css.js";
19
- import b from "../static/styles/components/switcher.css.js";
20
- import B from "../static/styles/components/tabs.css.js";
21
- import A from "../static/styles/components/tools.css.js";
22
- import P from "../static/styles/components/version-history.css.js";
23
- import R from "../static/styles/components/wide-panel.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";
24
22
  import x from "../static/styles/variables.css.js";
25
- function o(t, r) {
26
- return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(r.trim())}");`;
23
+ function r(t, o) {
24
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
27
25
  }
28
- const V = `:host {
29
- ${o("line-change", n)}
30
- ${o("line-delete", S)}
31
- ${o("filled-arrow-rising", i)}
32
- ${o("line-info", p)}
33
- ${o("line-plus", s)}
34
- }`, D = [
26
+ const A = `:host {
27
+ ${r("line-change", S)}
28
+ ${r("line-delete", i)}
29
+ ${r("line-plus", n)}
30
+ }`, R = [
35
31
  x,
36
32
  // Must be on top
37
- V,
38
- f,
33
+ A,
34
+ p,
39
35
  // Must be on top
36
+ s,
40
37
  C,
41
38
  a,
39
+ f,
42
40
  c,
43
- l,
44
41
  u,
42
+ l,
45
43
  d,
46
- I,
47
- g,
48
44
  h,
49
- w,
50
- $,
45
+ g,
46
+ I,
47
+ y,
51
48
  b,
52
49
  B,
53
- A,
50
+ $,
54
51
  P,
55
- R,
56
- y
52
+ w
57
53
  // Last: overrides button.css / wide-panel.css defaults
58
54
  ].join(`
59
55
 
60
- `), ro = () => ({ importCss: () => {
61
- const r = new CSSStyleSheet();
62
- r.replaceSync(D);
56
+ `), Y = () => ({ importCss: () => {
57
+ const o = new CSSStyleSheet();
58
+ o.replaceSync(R);
63
59
  const e = document.querySelector("ui-editor");
64
60
  if (!e)
65
61
  return;
66
62
  const m = e.shadowRoot;
67
- m && (m.adoptedStyleSheets = [r]);
63
+ m && (m.adoptedStyleSheets = [o]);
68
64
  } });
69
65
  export {
70
- ro as useCustomInterfaceAppearance
66
+ Y as useCustomInterfaceAppearance
71
67
  };
@@ -1,22 +1,14 @@
1
- import { useTranslations as n } from "../../composables/useTranslations.js";
2
- const a = {
1
+ import { useTranslations as r } from "../../composables/useTranslations.js";
2
+ const l = {
3
3
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com",
4
4
  // Relative path → same-origin as the embedding inone dashboard.
5
5
  PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
6
6
  RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies",
7
- RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies",
8
- NEWSLETTER_RECOMMENDATIONS_PATH: "/newsletter/recommendations",
9
- MIGRATE_STRATEGIES_PATH: "/newsletter/recommendations/migrate-strategies",
10
- // The template route narrows the recommendations resource before the action: the id
11
- // travels in the body, not the path.
12
- TEMPLATE_MIGRATE_STRATEGIES_PATH: "/newsletter/recommendations/template/migrate-strategies"
7
+ RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
13
8
  }, c = {
14
- campaign: a.MIGRATE_STRATEGIES_PATH,
15
- template: a.TEMPLATE_MIGRATE_STRATEGIES_PATH
16
- }, d = {
17
9
  CLIENT_ID: "clientId"
18
- }, m = () => {
19
- const e = n();
10
+ }, d = () => {
11
+ const e = r();
20
12
  return [
21
13
  {
22
14
  id: 11,
@@ -79,74 +71,73 @@ const a = {
79
71
  path: "top-sellers"
80
72
  }
81
73
  ];
82
- }, p = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], T = [
74
+ }, m = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], p = [
83
75
  { text: "before the amount", value: "0" },
84
76
  { text: "after the amount", value: "1" }
85
77
  ], v = [
86
78
  { text: "dot(.)", value: "." },
87
79
  { text: "comma(,)", value: "," },
88
80
  { text: "space( )", value: " " }
89
- ], A = [
81
+ ], h = [
90
82
  { text: "0", value: "0" },
91
83
  { text: "1", value: "1" },
92
84
  { text: "2", value: "2" },
93
85
  { text: "3", value: "3" },
94
86
  { text: "4", value: "4" },
95
87
  { text: "5", value: "5" }
96
- ], r = "||", t = [
88
+ ], a = "||", t = [
97
89
  { text: "is exactly", value: "=" },
98
90
  { text: "contains", value: "~" },
99
91
  { text: "does not contain", value: "!~" },
100
- { text: "any of", value: r }
101
- ], o = [
92
+ { text: "any of", value: a }
93
+ ], n = [
102
94
  { text: "is exactly", value: "=" },
103
95
  { text: "is not exactly", value: "!==" },
104
96
  { text: "contains", value: "~" },
105
97
  { text: "does not contain", value: "!~" },
106
- { text: "any of", value: r }
107
- ], s = [
98
+ { text: "any of", value: a }
99
+ ], o = [
108
100
  { text: "is equal to", value: "=" },
109
101
  { text: "is greater than", value: ">" },
110
102
  { text: "is less than", value: "<" }
111
- ], i = [
103
+ ], s = [
112
104
  { text: "is equal to", value: "=" },
113
105
  { text: "after", value: ">" },
114
106
  { text: "before", value: "<" }
115
- ], u = [
107
+ ], i = [
116
108
  { text: "true", value: "==" },
117
109
  { text: "false", value: "!=" }
118
- ], E = (e) => {
110
+ ], x = (e) => {
119
111
  if (!e)
120
112
  return t;
121
113
  switch (e) {
122
114
  case "Boolean":
123
- return u;
124
- case "Date":
125
115
  return i;
126
- case "Number":
116
+ case "Date":
127
117
  return s;
118
+ case "Number":
119
+ return o;
128
120
  case "String":
129
121
  return t;
130
122
  case "Strings":
131
- return o;
123
+ return n;
132
124
  default:
133
125
  return t;
134
126
  }
135
127
  };
136
128
  export {
137
- c as MIGRATION_PATHS,
138
- r as OP_ANY_OF,
139
- p as PriceAttributes,
140
- d as QUERY_PARAMS,
141
- a as URLS,
142
- A as currencyDecimalCounts,
143
- T as currencyLocationMaps,
129
+ a as OP_ANY_OF,
130
+ m as PriceAttributes,
131
+ c as QUERY_PARAMS,
132
+ l as URLS,
133
+ h as currencyDecimalCounts,
134
+ p as currencyLocationMaps,
144
135
  v as currencyOperators,
145
- E as getOperatorOptions,
146
- m as getRecommendationFeedSourceMaps,
147
- o as operatorOptionsForArrayOfStrings,
148
- u as operatorOptionsForBooleans,
149
- i as operatorOptionsForDates,
150
- s as operatorOptionsForNumbers,
136
+ x as getOperatorOptions,
137
+ d as getRecommendationFeedSourceMaps,
138
+ n as operatorOptionsForArrayOfStrings,
139
+ i as operatorOptionsForBooleans,
140
+ s as operatorOptionsForDates,
141
+ o as operatorOptionsForNumbers,
151
142
  t as operatorOptionsForStrings
152
143
  };
@@ -67,7 +67,7 @@ class se extends ut {
67
67
  (d, c) => `
68
68
  <div data-reorder-icon-key="${P}${c}" style="display: none;">
69
69
  <${_.BUTTON}
70
- class="drag-handle-btn flat-inline flat-white"
70
+ class="guido-drag-handle-btn flat-inline flat-white"
71
71
  ${O.BUTTON.name}="${P}${c}"
72
72
  >
73
73
  <${_.ICON}
@@ -328,7 +328,7 @@ class se extends ut {
328
328
  _createBuiltInItemHtml(t, e) {
329
329
  return `
330
330
  <div class="orderable-item" draggable="true" data-key="${t.key}">
331
- <span class="drag-handle" data-reorder-icon-slot="${e}"></span>
331
+ <span class="guido-drag-handle" data-reorder-icon-slot="${e}"></span>
332
332
  <span class="item-label">${this.api.translate(t.label)}</span>
333
333
  <div class="item-action" data-action-for="${t.key}"></div>
334
334
  </div>
@@ -353,7 +353,7 @@ class se extends ut {
353
353
  <div class="orderable-item price-group-item" draggable="true"
354
354
  data-key="${C}" data-group="prices">
355
355
  <div class="price-group-header">
356
- <span class="drag-handle" data-reorder-icon-slot="${t}"></span>
356
+ <span class="guido-drag-handle" data-reorder-icon-slot="${t}"></span>
357
357
  <span class="item-label">${this.api.translate("Product Prices")}</span>
358
358
  <div class="item-action" data-action-for="${C}"></div>
359
359
  </div>
@@ -365,7 +365,7 @@ class se extends ut {
365
365
  return `
366
366
  <div class="orderable-item" draggable="true"
367
367
  data-key="${t}" data-custom-index="${e}">
368
- <span class="drag-handle" data-reorder-icon-slot="${r}"></span>
368
+ <span class="guido-drag-handle" data-reorder-icon-slot="${r}"></span>
369
369
  <div class="custom-attr-select-wrap"
370
370
  data-custom-select-slot="${e}"></div>
371
371
  <div class="item-action"