@useinsider/guido 1.0.3-beta.bedc181 → 1.0.3-beta.bf31272

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 (36) hide show
  1. package/dist/components/Guido.vue.js +1 -1
  2. package/dist/components/Guido.vue2.js +48 -49
  3. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  4. package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
  5. package/dist/composables/useActionsApi.js +26 -38
  6. package/dist/composables/useStripo.js +34 -34
  7. package/dist/enums/defaults.js +5 -4
  8. package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
  9. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +92 -0
  10. package/dist/extensions/Blocks/Items/controls/settingsControl.js +94 -90
  11. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  12. package/dist/extensions/Blocks/Items/enums/productEnums.js +3 -2
  13. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -2
  14. package/dist/extensions/Blocks/Items/extension.js +7 -6
  15. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +2 -2
  16. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +17 -5
  17. package/dist/extensions/Blocks/Items/settingsPanel.js +25 -24
  18. package/dist/extensions/Blocks/Items/store/items-block.js +8 -4
  19. package/dist/extensions/Blocks/Items/template.js +65 -59
  20. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +35 -26
  21. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +29 -27
  22. package/dist/extensions/Blocks/Unsubscribe/block.js +34 -30
  23. package/dist/guido.css +1 -1
  24. package/dist/services/stripoApi.js +16 -17
  25. package/dist/src/composables/useActionsApi.d.ts +0 -2
  26. package/dist/src/enums/defaults.d.ts +1 -0
  27. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +15 -0
  28. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
  29. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +1 -0
  30. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -0
  31. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
  32. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +6 -0
  33. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +3 -4
  34. package/package.json +3 -1
  35. package/dist/composables/useTimerClone.js +0 -53
  36. package/dist/src/composables/useTimerClone.d.ts +0 -6
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "48a9b534"
15
+ "98181b5a"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,24 +1,23 @@
1
- import { defineComponent as z, defineAsyncComponent as L, ref as K, computed as W, watch as j, onMounted as q, onUnmounted as J } from "vue";
2
- import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
3
- import { usePartner as V } from "../composables/usePartner.js";
4
- import { useStripo as X } from "../composables/useStripo.js";
5
- import { useTimerClone as Y } from "../composables/useTimerClone.js";
6
- import { migrate as _ } from "../config/migrator/index.js";
7
- import { DefaultUsername as Z, DefaultMessageType as $, DefaultGuidoConfig as ee } from "../enums/defaults.js";
8
- import oe from "./organisms/base/Toaster.vue.js";
9
- import te from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
- import ne from "./organisms/header/HeaderWrapper.vue.js";
11
- import re from "./organisms/LoadingWrapper.vue.js";
12
- import ie from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
- import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
- import { useStripoApi as ae } from "../services/stripoApi.js";
15
- import { useConfigStore as ce } from "../stores/config.js";
16
- import { useDynamicContentStore as me } from "../stores/dynamic-content.js";
17
- import { useEditorStore as de } from "../stores/editor.js";
18
- import { usePreviewStore as le } from "../stores/preview.js";
19
- import { useUnsubscribeStore as ue } from "../stores/unsubscribe.js";
20
- import pe from "../node_modules/lodash-es/merge.js";
21
- const Ae = /* @__PURE__ */ z({
1
+ import { defineComponent as O, defineAsyncComponent as I, ref as z, computed as U, watch as B, onMounted as K, onUnmounted as j } from "vue";
2
+ import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
+ import { usePartner as J } from "../composables/usePartner.js";
4
+ import { useStripo as Q } from "../composables/useStripo.js";
5
+ import { migrate as L } from "../config/migrator/index.js";
6
+ import { DefaultUsername as V, DefaultMessageType as X, DefaultGuidoConfig as Y } from "../enums/defaults.js";
7
+ import Z from "./organisms/base/Toaster.vue.js";
8
+ import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import ee from "./organisms/header/HeaderWrapper.vue.js";
10
+ import oe from "./organisms/LoadingWrapper.vue.js";
11
+ import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
+ import { useStripoApi as re } from "../services/stripoApi.js";
14
+ import { useConfigStore as ie } from "../stores/config.js";
15
+ import { useDynamicContentStore as se } from "../stores/dynamic-content.js";
16
+ import { useEditorStore as ae } from "../stores/editor.js";
17
+ import { usePreviewStore as ce } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as me } from "../stores/unsubscribe.js";
19
+ import de from "../node_modules/lodash-es/merge.js";
20
+ const Ue = /* @__PURE__ */ O({
22
21
  __name: "Guido",
23
22
  props: {
24
23
  templateId: null,
@@ -33,34 +32,34 @@ const Ae = /* @__PURE__ */ z({
33
32
  templateConfig: null
34
33
  },
35
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
36
- setup(A, { expose: N, emit: o }) {
37
- const u = A, F = L(
35
+ setup(W, { expose: _, emit: o }) {
36
+ const u = W, A = I(
38
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
39
- ), H = L(
38
+ ), N = I(
40
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
41
- ), p = K(), i = me(), g = ue(), f = ce(), s = de(), O = le(), n = W(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: R } = V(), h = () => {
40
+ ), p = z(), i = se(), g = me(), f = ie(), s = ae(), F = ce(), n = U(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: H } = J(), b = () => {
42
41
  var e;
43
42
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
44
43
  }, {
45
44
  templateId: a,
46
- userId: b,
47
- guidoConfig: C,
45
+ userId: C,
46
+ guidoConfig: h,
48
47
  templateConfig: t,
49
48
  html: r = "",
50
49
  css: S = "",
51
50
  partnerName: c = y(),
52
51
  productType: m = v(),
53
- messageType: w = $,
54
- username: D = Z
52
+ messageType: w = X,
53
+ username: D = V
55
54
  } = u, d = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
56
- s.templateId = a, window.GuidoConfig = pe(ee, C), window.GuidoConfig.partner = {
55
+ s.templateId = a, window.GuidoConfig = de(Y, h), window.GuidoConfig.partner = {
57
56
  partnerName: c,
58
57
  productType: m,
59
58
  messageType: w
60
59
  }, f.templateConfig = t;
61
- const { initPlugin: T } = X({
60
+ const { initPlugin: E } = Q({
62
61
  emailId: a,
63
- userId: b,
62
+ userId: C,
64
63
  username: D,
65
64
  partnerName: c,
66
65
  productType: m,
@@ -68,11 +67,11 @@ const Ae = /* @__PURE__ */ z({
68
67
  onReady: () => {
69
68
  console.debug("guido:ready"), o("ready");
70
69
  }
71
- }), { getDefaultTemplate: E } = ae(), { cloneTimersOnSave: k, hasTimerBlocks: P } = Y(), x = W(() => {
70
+ }), { getDefaultTemplate: T } = re(), R = U(() => {
72
71
  var e;
73
72
  return !((e = window.GuidoConfig) != null && e.useHeader);
74
73
  });
75
- Q({
74
+ q({
76
75
  onBack: () => {
77
76
  console.debug("guido:back"), o("back");
78
77
  },
@@ -86,50 +85,50 @@ const Ae = /* @__PURE__ */ z({
86
85
  console.debug("guido:test-email:click"), o("test-email:click");
87
86
  }
88
87
  });
89
- const G = (e) => {
88
+ const P = (e) => {
90
89
  console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
91
- }, I = () => {
90
+ }, k = () => {
92
91
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
93
92
  };
94
- j(() => n.value, () => {
93
+ B(() => n.value, () => {
95
94
  o("on-change", n.value);
96
95
  });
97
96
  const l = (e) => {
98
- const U = e, { attribute: B, position: M } = U.detail;
99
- console.debug("dynamic-content:open", U.detail), o("dynamic-content:open", B, M);
97
+ const G = e, { attribute: x, position: M } = G.detail;
98
+ console.debug("dynamic-content:open", G.detail), o("dynamic-content:open", x, M);
100
99
  };
101
- return q(async () => {
100
+ return K(async () => {
102
101
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
103
102
  try {
104
103
  g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
105
104
  let e = {
106
- html: r && await _(r),
105
+ html: r && await L(r),
107
106
  css: S,
108
107
  forceRecreate: !0
109
108
  // TODO: It should be false for old templates. We will communicate with Stripo
110
109
  };
111
- e.html || (e = await E(), e.html = await _(e.html)), P(e.html) && (e.html = await k(e.html)), await T(e), i.selectedDynamicContentList = d;
110
+ e.html || (e = await T(), e.html = await L(e.html)), await E(e), i.selectedDynamicContentList = d;
112
111
  } catch (e) {
113
112
  console.error("Failed to initialize Stripo editor:", e);
114
113
  }
115
114
  document.addEventListener("dynamic-content:open", l);
116
- }), J(() => {
115
+ }), j(() => {
117
116
  document.removeEventListener("dynamic-content:open", l);
118
117
  try {
119
118
  window.UIEditor.removeEditor();
120
119
  } catch {
121
120
  console.debug("Failed to remove Stripo editor: No editor found");
122
121
  }
123
- }), N({
122
+ }), _({
124
123
  dynamicContent: {
125
- insert: G,
126
- close: I
124
+ insert: P,
125
+ close: k
127
126
  },
128
127
  hasChanges: n,
129
- saveSilent: h
130
- }), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: H, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: O, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: R, saveSilent: h, templateId: a, userId: b, guidoConfig: C, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: T, getDefaultTemplate: E, cloneTimersOnSave: k, hasTimerBlocks: P, noHeader: x, insertDynamicContent: G, closeDynamicContent: I, handleDynamicContentOpen: l, Toaster: oe, FilterSelectionDrawer: te, HeaderWrapper: ne, LoadingWrapper: re, SaveAsTemplateDrawer: ie, UnsubscribeWrapper: se };
128
+ saveSilent: b
129
+ }), { __sfc: !0, PreviewContainer: A, OnboardingWrapper: N, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: F, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: H, saveSilent: b, templateId: a, userId: C, guidoConfig: h, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: E, getDefaultTemplate: T, noHeader: R, insertDynamicContent: P, closeDynamicContent: k, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
131
130
  }
132
131
  });
133
132
  export {
134
- Ae as default
133
+ Ue as default
135
134
  };
@@ -10,7 +10,7 @@ var s = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "dced5582"
13
+ "07c4b2d8"
14
14
  );
15
15
  const l = _.exports;
16
16
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, ref as p, computed as _ } from "vue";
1
+ import { defineComponent as H, ref as m, computed as _ } from "vue";
2
2
  import { useConfig as h } from "../../../composables/useConfig.js";
3
3
  import { useExport as V } from "../../../composables/useExport.js";
4
4
  import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
@@ -10,25 +10,25 @@ import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
10
10
  import { InButtonV2 as A } from "@useinsider/design-system-vue";
11
11
  const J = /* @__PURE__ */ H({
12
12
  __name: "RightSlot",
13
- setup(k, { expose: m }) {
14
- const { config: c } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), t = C(), o = T(), e = p(!1), s = p(!1), u = x(), f = () => {
15
- if (t.isVersionHistoryOpen) {
13
+ setup(k, { expose: c }) {
14
+ const { config: u } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = m(!1), s = m(!1), f = x(), v = () => {
15
+ if (o.isVersionHistoryOpen) {
16
16
  a();
17
17
  return;
18
18
  }
19
19
  i();
20
- }, v = async () => {
20
+ }, d = async () => {
21
21
  e.value = !0, await r(), e.value = !1;
22
- }, d = () => {
23
- t.isSaveAsTemplateDrawerOpen = !0;
24
- }, y = _(() => t.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), l = async (S) => {
25
- s.value = !0, t.loadingStatus = !0;
26
- const g = await n(S);
27
- return s.value = !1, t.loadingStatus = !1, g;
22
+ }, y = () => {
23
+ o.isSaveAsTemplateDrawerOpen = !0;
24
+ }, S = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
25
+ s.value = !0, o.loadingStatus = !0;
26
+ const g = await n(p);
27
+ return s.value = !1, p && (o.loadingStatus = !1), g;
28
28
  };
29
- return m({
29
+ return c({
30
30
  handleSave: l
31
- }), { __sfc: !0, config: c, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: o, isExporting: e, isSaving: s, testEmailClick: u, handleVersionHistory: f, handleExport: v, handleSaveAs: d, versionHistoryTooltipText: y, handleSave: l, getTooltipOptions: O, InButtonV2: A };
31
+ }), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: f, handleVersionHistory: v, handleExport: d, handleSaveAs: y, versionHistoryTooltipText: S, handleSave: l, getTooltipOptions: O, InButtonV2: A };
32
32
  }
33
33
  });
34
34
  export {
@@ -1,6 +1,6 @@
1
- import { useToaster as w } from "./useToaster.js";
2
- const S = () => {
3
- const { handleError: l } = w(), m = (e = {}) => new Promise((t, a) => {
1
+ import { useToaster as g } from "./useToaster.js";
2
+ const A = () => {
3
+ const { handleError: l } = g(), n = (t = {}) => new Promise((e, a) => {
4
4
  const i = { ...{
5
5
  minimize: !0,
6
6
  utmEntity: {
@@ -20,72 +20,60 @@ const S = () => {
20
20
  forceAmp: !1,
21
21
  resetDataSavedFlag: !1,
22
22
  disableLineHeightsReplace: !0
23
- }, ...e }, s = {
24
- callback: (n, p, c, d, u) => {
25
- n ? a(n) : t({
26
- html: p,
27
- ampHtml: c,
28
- ampErrors: d,
29
- displayConditions: u
23
+ }, ...t }, m = {
24
+ callback: (s, c, p, u, d) => {
25
+ s ? a(s) : e({
26
+ html: c,
27
+ ampHtml: p,
28
+ ampErrors: u,
29
+ displayConditions: d
30
30
  });
31
31
  },
32
32
  ...i
33
33
  };
34
- window.StripoEditorApi.actionsApi.compileEmail(s);
34
+ window.StripoEditorApi.actionsApi.compileEmail(m);
35
35
  });
36
36
  return {
37
- getCompiledEmail: m,
38
- getTemplateData: () => new Promise((e) => {
39
- const t = ({ html: a, css: o, width: i, height: r, utmParams: s, syncModulesIds: n }) => e({
37
+ getCompiledEmail: n,
38
+ getTemplateData: () => new Promise((t) => {
39
+ const e = ({ html: a, css: o, width: i, height: r, utmParams: m, syncModulesIds: s }) => t({
40
40
  html: a,
41
41
  css: o,
42
42
  width: i,
43
43
  height: r,
44
- utmParams: s,
45
- syncModulesIds: n
44
+ utmParams: m,
45
+ syncModulesIds: s
46
46
  });
47
- window.StripoEditorApi.actionsApi.getTemplateData(t);
47
+ window.StripoEditorApi.actionsApi.getTemplateData(e);
48
48
  }),
49
- activateCustomViewStyles: (e = !0) => {
50
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
49
+ activateCustomViewStyles: (t = !0) => {
50
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
51
51
  },
52
- getPreviewData: async (e) => {
52
+ getPreviewData: async (t) => {
53
53
  try {
54
54
  const {
55
- html: t,
55
+ html: e,
56
56
  displayConditions: a,
57
57
  ampHtml: o = "",
58
58
  ampErrors: i = []
59
- } = await m({ minimize: !1, resetDataSavedFlag: !1, ...e });
59
+ } = await n({ minimize: !1, resetDataSavedFlag: !1, ...t });
60
60
  return {
61
- html: t,
61
+ html: e,
62
62
  ampHtml: o,
63
63
  ampErrors: i,
64
64
  displayConditions: a
65
65
  };
66
- } catch (t) {
67
- return l(t, "Error loading preview"), {
66
+ } catch (e) {
67
+ return l(e, "Error loading preview"), {
68
68
  html: "",
69
69
  ampHtml: "",
70
70
  ampErrors: [],
71
71
  displayConditions: []
72
72
  };
73
73
  }
74
- },
75
- updateTimerInClonedTemplate: () => new Promise((e) => {
76
- try {
77
- window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((t, a) => {
78
- t ? (l(t, "Failed to update timer in cloned template"), e(null)) : e(a || null);
79
- });
80
- } catch (t) {
81
- l(t, "Failed to call updateTimerInClonedTemplate"), e(null);
82
- }
83
- }),
84
- updateHtmlAndCss: (e, t) => {
85
- window.StripoEditorApi.actionsApi.updateHtmlAndCss(e, t);
86
74
  }
87
75
  };
88
76
  };
89
77
  export {
90
- S as useActionsApi
78
+ A as useActionsApi
91
79
  };
@@ -1,19 +1,19 @@
1
- import { useActionsApi as b } from "./useActionsApi.js";
2
- import { useBlocksConfig as k } from "./useBlocksConfig.js";
3
- import { useConfig as T } from "./useConfig.js";
1
+ import { useActionsApi as w } from "./useActionsApi.js";
2
+ import { useBlocksConfig as b } from "./useBlocksConfig.js";
3
+ import { useConfig as k } from "./useConfig.js";
4
4
  import { useCustomInterfaceAppearance as V } from "./useCustomInterfaceAppearance.js";
5
5
  import { useStripoEventHandler as _ } from "./useStripoEventHandler.js";
6
6
  import { useToaster as B } from "./useToaster.js";
7
- import { displayConditions as A } from "../enums/displayConditions.js";
8
- import { useStripoApi as F } from "../services/stripoApi.js";
9
- import v from "../static/styles/customEditorStyle.css.js";
10
- import { useEditorStore as I } from "../stores/editor.js";
11
- import { dynamicContentToMergeTags as M } from "../utils/genericUtil.js";
12
- import U from "../package.json.js";
13
- const N = (c) => {
14
- const { config: l } = T(), { handleError: u } = B(), { getToken: f, getCustomFonts: y } = F(), { handleEvent: S } = _(), { getStripoBlocksConfig: C } = k(), E = async (i, r = []) => {
7
+ import { displayConditions as T } from "../enums/displayConditions.js";
8
+ import { useStripoApi as A } from "../services/stripoApi.js";
9
+ import F from "../static/styles/customEditorStyle.css.js";
10
+ import { useEditorStore as M } from "../stores/editor.js";
11
+ import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
12
+ import v from "../package.json.js";
13
+ const J = (c) => {
14
+ const { config: u } = k(), { handleError: l } = B(), { getToken: f, getCustomFonts: y } = A(), { handleEvent: S } = _(), { getStripoBlocksConfig: C } = b(), E = async (i, r = []) => {
15
15
  var m, g;
16
- const e = I(), { html: n, css: p, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await C();
16
+ const t = M(), { html: n, css: p, forceRecreate: a } = i, { baseBlocks: e, extensions: d } = await C();
17
17
  window.UIEditor.initEditor(
18
18
  document.querySelector("#guido-editor"),
19
19
  {
@@ -30,10 +30,10 @@ const N = (c) => {
30
30
  customAppearanceMergetags: !0,
31
31
  customAppearanceMergetagsBorderColor: "#f1f3fe",
32
32
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
33
- customViewStyles: v,
34
- conditionsEnabled: ((m = l.features) == null ? void 0 : m.displayConditions) ?? !0,
35
- customConditionsEnabled: ((g = l.features) == null ? void 0 : g.displayConditions) ?? !0,
36
- conditionCategories: A,
33
+ customViewStyles: F,
34
+ conditionsEnabled: ((m = u.features) == null ? void 0 : m.displayConditions) ?? !0,
35
+ customConditionsEnabled: ((g = u.features) == null ? void 0 : g.displayConditions) ?? !0,
36
+ conditionCategories: T,
37
37
  enableXSSSecurity: !0,
38
38
  messageSettingsEnabled: !0,
39
39
  displayGmailAnnotations: !0,
@@ -41,7 +41,7 @@ const N = (c) => {
41
41
  displayTitle: !1,
42
42
  displayUTM: !1,
43
43
  selectElementAfterDrop: !0,
44
- ...t ? { baseBlocks: t } : {},
44
+ ...e ? { baseBlocks: e } : {},
45
45
  editorFonts: {
46
46
  showDefaultStandardFonts: !0,
47
47
  showDefaultNotStandardFonts: !0,
@@ -49,7 +49,7 @@ const N = (c) => {
49
49
  },
50
50
  mergeTags: [
51
51
  {
52
- entries: M(c.preselectedDynamicContentList)
52
+ entries: U(c.preselectedDynamicContentList)
53
53
  }
54
54
  ],
55
55
  async onTokenRefreshRequest(o) {
@@ -57,30 +57,30 @@ const N = (c) => {
57
57
  const s = await f();
58
58
  o(s);
59
59
  } catch (s) {
60
- u(s, "Failed to refresh token");
60
+ l(s, "Failed to refresh token");
61
61
  }
62
62
  },
63
63
  onTemplateLoaded() {
64
64
  try {
65
- const { importCss: o } = V(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: w } = b();
66
- o(), s(), w(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
67
- e.hasChanges = !1;
65
+ const { importCss: o } = V(), { activateCustomViewStyles: s } = w();
66
+ o(), s(), c.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
67
+ t.hasChanges = !1;
68
68
  }, 1e3);
69
69
  } catch (o) {
70
- u(o, "Failed to load custom interface appearance");
70
+ l(o, "Failed to load custom interface appearance");
71
71
  }
72
72
  },
73
73
  onCodeEditorVisibilityChanged(o) {
74
- e.isCodeEditorOpen = o;
74
+ t.isCodeEditorOpen = o;
75
75
  },
76
76
  onEditorVisualModeChanged(o) {
77
- e.editorVisualMode = o.toLowerCase();
77
+ t.editorVisualMode = o.toLowerCase();
78
78
  },
79
79
  onVersionHistoryVisibilityChanged(o) {
80
- e.isVersionHistoryOpen = o;
80
+ t.isVersionHistoryOpen = o;
81
81
  },
82
82
  onDataChanged() {
83
- e.hasChanges = !0;
83
+ t.hasChanges = !0;
84
84
  },
85
85
  onEvent: S,
86
86
  ignoreClickOutsideSelectors: [
@@ -91,18 +91,18 @@ const N = (c) => {
91
91
  extensions: d
92
92
  }
93
93
  );
94
- }, h = (i) => new Promise((r, e) => {
94
+ }, h = (i) => new Promise((r, t) => {
95
95
  var d;
96
96
  if (document.getElementById("UiEditorScript")) {
97
97
  i(), r();
98
98
  return;
99
99
  }
100
- const n = U.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
101
- t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
100
+ const n = v.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
101
+ e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
102
102
  i(), r();
103
- }, t.onerror = () => {
104
- e(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
105
- }, document.body.appendChild(t);
103
+ }, e.onerror = () => {
104
+ t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
105
+ }, document.body.appendChild(e);
106
106
  });
107
107
  return { initPlugin: async (i) => {
108
108
  await h(async () => {
@@ -112,5 +112,5 @@ const N = (c) => {
112
112
  } };
113
113
  };
114
114
  export {
115
- N as useStripo
115
+ J as useStripo
116
116
  };
@@ -23,11 +23,11 @@ const e = {
23
23
  }, t = {
24
24
  promotional: 1,
25
25
  transactional: 2
26
- }, a = "email", o = "Guido User", s = t.promotional, n = 2, i = {
26
+ }, a = "email", o = "Guido User", s = t.promotional, n = 2, i = 13, u = {
27
27
  email: 60,
28
28
  architect: 49,
29
29
  unsubscribePages: 97
30
- }, u = [
30
+ }, r = [
31
31
  "alfredtesting",
32
32
  "electio",
33
33
  "eurekatest",
@@ -65,7 +65,8 @@ export {
65
65
  a as DefaultProductType,
66
66
  o as DefaultUsername,
67
67
  n as EditorType,
68
- i as ProductIds,
69
- u as TEST_PARTNER_LIST,
68
+ i as MAX_DEFAULT_TEMPLATE_ID,
69
+ u as ProductIds,
70
+ r as TEST_PARTNER_LIST,
70
71
  t as TemplateTypes
71
72
  };
@@ -1,70 +1,70 @@
1
1
  var d = Object.defineProperty;
2
2
  var h = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var s = (i, t, e) => h(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { ModificationDescription as n, UIElementType as a, UEAttr as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ var n = (i, t, e) => h(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { ModificationDescription as a, UIElementType as l, UEAttr as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  import { CommonControl as c } from "../../../common-control.js";
6
- import { ItemsBlockControlId as l } from "../../enums/controlEnums.js";
6
+ import { ItemsBlockControlId as p } from "../../enums/controlEnums.js";
7
7
  import { SETTINGS_ENUMS as I } from "../../enums/settingsEnums.js";
8
8
  import { useItemsBlockStore as N } from "../../store/items-block.js";
9
- import { syncNameTrimmingFromAttributes as y } from "../../utils/syncAttributesFromConfigBlock.js";
10
- import { updateConfigBlockAttributes as M } from "../../utils/updateAttributes.js";
11
- const f = l.NAME_TRIMMING, r = {
9
+ import { syncNameTrimmingFromAttributes as M } from "../../utils/syncAttributesFromConfigBlock.js";
10
+ import { updateConfigBlockAttributes as u } from "../../utils/updateAttributes.js";
11
+ const y = p.NAME_TRIMMING, o = {
12
12
  TRIMMING: "trimming"
13
13
  };
14
- class R extends c {
14
+ class _ extends c {
15
15
  constructor() {
16
16
  super(...arguments);
17
- s(this, "store", N());
17
+ n(this, "store", N());
18
18
  }
19
19
  getId() {
20
- return f;
20
+ return y;
21
21
  }
22
22
  getTemplate() {
23
23
  return `
24
- <div class="${l.NAME_TRIMMING}">
24
+ <div class="${p.NAME_TRIMMING}">
25
25
  ${this._getTextTrimming()}
26
26
  </div>
27
27
  `;
28
28
  }
29
29
  onRender() {
30
- this.api.updateValues({ [r.TRIMMING]: this.store.nameTrimming }), this.api.onValueChanged(r.TRIMMING, (e) => {
30
+ this.api.updateValues({ [o.TRIMMING]: this.store.nameTrimming }), this.api.onValueChanged(o.TRIMMING, (e) => {
31
31
  this._onTrimmingChange(e);
32
32
  });
33
33
  }
34
34
  onTemplateNodeUpdated(e) {
35
35
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(
36
- () => y(this.currentNode),
36
+ () => M(this.currentNode),
37
37
  () => {
38
- this.api.updateValues({ [r.TRIMMING]: this.store.nameTrimming });
38
+ this.api.updateValues({ [o.TRIMMING]: this.store.nameTrimming });
39
39
  }
40
- ), this.store.nameTrimming && this._applyTrimmingStyles();
40
+ );
41
41
  }
42
42
  _onTrimmingChange(e) {
43
- this.store.setNameTrimming(e), M(this.currentNode, this.api), this.api.updateValues({ [r.TRIMMING]: e }), this._applyTrimmingStyles(e);
43
+ this.store.setNameTrimming(e), u(this.currentNode, this.api), this.api.updateValues({ [o.TRIMMING]: e }), this._applyTrimmingStyles(e);
44
44
  }
45
45
  _applyTrimmingStyles(e) {
46
- var m;
47
- const o = (m = this.currentNode) == null ? void 0 : m.querySelector("p > a");
48
- if (!o)
46
+ var s;
47
+ const r = (s = this.currentNode) == null ? void 0 : s.querySelector("p > a");
48
+ if (!r)
49
49
  return;
50
- const p = e !== void 0 ? e : this.store.nameTrimming, T = this.store.orientation === I.ORIENTATION.VERTICAL;
51
- p ? this.api.getDocumentModifier().modifyHtml(o).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", T ? "130px" : "550px").apply(new n("Text Trimming Enabled")) : this.api.getDocumentModifier().modifyHtml(o).removeStyle("white-space").removeStyle("overflow").removeStyle("text-overflow").removeStyle("max-width").apply(new n("Text Trimming Disabled"));
50
+ const T = e !== void 0 ? e : this.store.nameTrimming, m = this.store.orientation === I.ORIENTATION.VERTICAL;
51
+ T ? this.api.getDocumentModifier().modifyHtml(r).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", m ? "130px" : "520px").apply(new a("Text Trimming Enabled")) : this.api.getDocumentModifier().modifyHtml(r).removeStyle("white-space").removeStyle("overflow").removeStyle("text-overflow").removeStyle("max-width").setStyle("max-width", m ? "130px" : "520px").apply(new a("Text Trimming Disabled"));
52
52
  }
53
53
  _getTextTrimming() {
54
54
  return `
55
55
  <div class="container">
56
56
  <div class="display-flex align-items-center justify-content-between">
57
- <${a.LABEL}
57
+ <${l.LABEL}
58
58
  ${g.LABEL.text}="${this.api.translate("Text Trimming")}"
59
59
  >
60
- </${a.LABEL}>
61
- ${this._GuToggle(r.TRIMMING)}
60
+ </${l.LABEL}>
61
+ ${this._GuToggle(o.TRIMMING)}
62
62
  </div>
63
63
  </div>
64
64
  `;
65
65
  }
66
66
  }
67
67
  export {
68
- f as CONTROL_BLOCK_ID,
69
- R as NameTrimmingControl
68
+ y as CONTROL_BLOCK_ID,
69
+ _ as NameTrimmingControl
70
70
  };