@useinsider/guido 3.3.0-beta.4134d8d → 3.3.0-beta.4ab4365

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.
@@ -1,26 +1,24 @@
1
- import r from "./FilterItem.vue2.js";
1
+ import l from "./FilterItem.vue2.js";
2
2
  /* empty css */
3
- import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var i = function() {
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
5
  var a = this, e = a._self._c, t = a._self._setupProxy;
6
6
  return e("div", { staticClass: "d-f f-d-c w-1 gap-16", attrs: { "data-filter-group": a.filter.filterGroup, "data-filter-number": a.filter.filterNumber } }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
7
7
  return t.emit("delete-filter", t.props.filter);
8
- } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: function(s) {
9
- return t.updateFilter({ text: "operator", value: s.value });
10
- } } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
8
+ } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: t.handleOperatorChange } }), t.isAnyOfOperator ? e(t.InTags, { staticClass: "w-2", attrs: { "allow-bulk-paste": "", validate: "text", "allow-duplicates": !1, invalid: t.invalidFields.has("value"), "invalid-message": t.valueErrorMessage, label: t.trans("condition.value"), placeholder: t.trans("condition.enter-value-placeholder"), value: t.tagValues }, on: { input: t.onTagsInput } }) : t.isDateAttribute ? e(t.InDatePickerV2, { staticClass: "w-2", attrs: { id: `filter-item-input--value-${a.index}`, "single-date-picker-status": "", "label-text": t.trans("condition.value"), locale: t.datePickerLocale, name: `filter-item-input--value-${a.index}`, "placeholder-text": t.trans("condition.enter-value-placeholder"), state: t.getFieldState("value"), "state-message": t.valueErrorMessage, value: t.datePickerValue }, on: { apply: t.onDatePickerApply } }) : e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: `filter-item-input--value-${a.index}`, name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: t.safeDecodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
11
9
  t.updateFilter({ text: "value", value: encodeURIComponent(s) });
12
10
  } } })]], 2), t.props.hasLogicAdapter ? e("div", { staticClass: "w-1 d-f a-i-c j-c-c p-r bor-b-s-s bor-b-w-1 bor-b-c-50 mt-4" }, [e(t.LogicAdapter, { staticClass: "p-a", attrs: { logic: t.props.filter.innerGroupOperator }, on: { change: function(s) {
13
11
  return t.updateFilter({ text: "innerGroupOperator", value: s });
14
12
  } } })], 1) : a._e()]);
15
- }, o = [], n = /* @__PURE__ */ l(
13
+ }, n = [], o = /* @__PURE__ */ i(
14
+ l,
16
15
  r,
17
- i,
18
- o,
16
+ n,
19
17
  !1,
20
18
  null,
21
- "3b53a736"
19
+ "8053a037"
22
20
  );
23
- const f = n.exports;
21
+ const f = o.exports;
24
22
  export {
25
23
  f as default
26
24
  };
@@ -1,12 +1,14 @@
1
- import { defineComponent as _, computed as l } from "vue";
2
- import { useTranslations as C } from "../../../../composables/useTranslations.js";
3
- import { getOperatorOptions as p } from "../../../../enums/extensions/recommendationBlock.js";
4
- import { useRecommendationExtensionStore as V } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { getInvalidFilterFields as A } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
6
- import { InButtonV2 as L, InSelect as O, InBasicTextInput as S } from "@useinsider/design-system-vue";
7
- import E from "./LogicAdapter.vue.js";
8
- import { useDebounceFn as N } from "../../../../node_modules/@vueuse/shared/index.js";
9
- const K = /* @__PURE__ */ _({
1
+ import { defineComponent as N, computed as r } from "vue";
2
+ import { useTranslations as U } from "../../../../composables/useTranslations.js";
3
+ import { getOperatorOptions as f, OP_ANY_OF as d } from "../../../../enums/extensions/recommendationBlock.js";
4
+ import { useRecommendationExtensionStore as E } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { parseTagList as j, safeDecodeURIComponent as g } from "../../../../extensions/Blocks/Recommendation/utils/filterUtil.js";
6
+ import { getInvalidFilterFields as w } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
7
+ import { locale as M } from "../../../../utils/dateUtil.js";
8
+ import { InTags as Y, InButtonV2 as q, InSelect as z, InDatePickerV2 as G, InBasicTextInput as H } from "@useinsider/design-system-vue";
9
+ import J from "./LogicAdapter.vue.js";
10
+ import { useDebounceFn as K } from "../../../../node_modules/@vueuse/shared/index.js";
11
+ const se = /* @__PURE__ */ N({
10
12
  __name: "FilterItem",
11
13
  props: {
12
14
  filter: null,
@@ -15,55 +17,88 @@ const K = /* @__PURE__ */ _({
15
17
  submitted: { type: Boolean }
16
18
  },
17
19
  emits: ["delete-filter"],
18
- setup(f, { emit: v }) {
19
- const t = f, n = C(), a = V(), y = [
20
+ setup(I, { emit: O }) {
21
+ const t = I, s = U(), n = E(), T = [
20
22
  {
21
- text: n("email-editor.standard-filter"),
23
+ text: s("email-editor.standard-filter"),
22
24
  value: "standardFilter"
23
25
  }
24
- ], i = [
26
+ ], u = [
25
27
  { text: "True", value: "true" },
26
28
  { text: "False", value: "false" }
27
- ], d = l(() => t.filter.attribute || ""), r = l(() => a.getFilterList.find((e) => e.value === d.value) || { text: "", value: "", type: "" }), F = l(
29
+ ], m = r(() => t.filter.attribute || ""), i = r(() => n.getFilterList.find((e) => e.value === m.value) || { text: "", value: "", type: "" }), h = r(
28
30
  () => {
29
31
  var e;
30
- return ((e = r.value) == null ? void 0 : e.type) === "Boolean";
32
+ return ((e = i.value) == null ? void 0 : e.type) === "Boolean";
31
33
  }
32
- ), b = l(() => {
34
+ ), b = r(() => {
33
35
  var e;
34
- return p((e = r.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
35
- }), g = l(
36
- () => i.find((e) => e.value === t.filter.value) || i[0]
37
- ), u = l(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => u.value.has(e) ? "error" : "default", B = l(
38
- () => u.value.has("value") ? n("action-builder.filter-empty-value-error") : ""
39
- ), c = l(
36
+ return f((e = i.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
37
+ }), A = r(
38
+ () => u.find((e) => e.value === t.filter.value) || u[0]
39
+ ), p = r(() => t.submitted ? w(t.filter) : /* @__PURE__ */ new Set()), x = (e) => p.value.has(e) ? "error" : "default", B = r(
40
+ () => p.value.has("value") ? s("action-builder.filter-empty-value-error") : ""
41
+ ), v = r(
40
42
  () => {
41
43
  var e;
42
- return ((e = r.value) == null ? void 0 : e.type) === "Number";
44
+ return ((e = i.value) == null ? void 0 : e.type) === "Number";
43
45
  }
44
- ), x = l(() => c.value ? "number" : "text"), T = N((e) => {
45
- a.updateFilter({
46
+ ), D = r(() => v.value ? "number" : "text"), C = r(
47
+ () => {
48
+ var e;
49
+ return ((e = i.value) == null ? void 0 : e.type) === "Date";
50
+ }
51
+ ), _ = r(() => t.filter.operator === d), k = r(() => j(t.filter.value)), P = K((e) => {
52
+ n.updateFilter({
46
53
  ...t.filter,
47
54
  [e.text]: e.value
48
55
  });
49
- }, 500);
50
- return { __sfc: !0, trans: n, store: a, props: t, filterTypeOptions: y, booleanValueOptions: i, attributeType: d, selectedAttributeType: r, isBooleanAttribute: F, selectedOperatorType: b, selectedBooleanValue: g, emit: v, invalidFields: u, getFieldState: h, valueErrorMessage: B, isNumericAttribute: c, valueInputType: x, updateFilter: T, handleAttributeChange: (e) => {
51
- const o = a.getFilterList.find((I) => I.value === e.value), m = (o == null ? void 0 : o.type) === "Boolean", [s] = p(o == null ? void 0 : o.type);
52
- a.updateFilter({
56
+ }, 500), V = (e) => {
57
+ const o = n.getFilterList.find((c) => c.value === e.value), l = (o == null ? void 0 : o.type) === "Boolean", [a] = f(o == null ? void 0 : o.type);
58
+ n.updateFilter({
53
59
  ...t.filter,
54
60
  attribute: e.value,
55
- operator: m ? "=" : (s == null ? void 0 : s.value) ?? "",
56
- value: m ? "true" : ""
61
+ operator: l ? "=" : (a == null ? void 0 : a.value) ?? "",
62
+ value: l ? "true" : ""
57
63
  });
58
- }, handleBooleanValueChange: (e) => {
59
- a.updateFilter({
64
+ }, L = (e) => {
65
+ n.updateFilter({
60
66
  ...t.filter,
61
67
  operator: "=",
62
68
  value: e.value
63
69
  });
64
- }, getOperatorOptions: p, InBasicTextInput: S, InSelect: O, InButtonV2: L, LogicAdapter: E };
70
+ }, S = (e) => {
71
+ const o = e.value;
72
+ if (o === t.filter.operator)
73
+ return;
74
+ const c = t.filter.operator === d !== (o === d);
75
+ n.updateFilter({
76
+ ...t.filter,
77
+ operator: o,
78
+ value: c ? "" : t.filter.value
79
+ });
80
+ }, $ = M(), y = (e) => {
81
+ const [o, l, a] = e.split("-");
82
+ return !o || !l || !a ? "" : `${l}/${a}/${o}`;
83
+ }, F = (e) => {
84
+ const [o, l, a] = e.split("/");
85
+ return !a || !o || !l ? "" : `${a}-${o.padStart(2, "0")}-${l.padStart(2, "0")}`;
86
+ }, R = r(
87
+ () => y(g(t.filter.value))
88
+ );
89
+ return { __sfc: !0, trans: s, store: n, props: t, filterTypeOptions: T, booleanValueOptions: u, attributeType: m, selectedAttributeType: i, isBooleanAttribute: h, selectedOperatorType: b, selectedBooleanValue: A, emit: O, invalidFields: p, getFieldState: x, valueErrorMessage: B, isNumericAttribute: v, valueInputType: D, isDateAttribute: C, isAnyOfOperator: _, tagValues: k, updateFilter: P, handleAttributeChange: V, handleBooleanValueChange: L, handleOperatorChange: S, datePickerLocale: $, isoToPickerDate: y, pickerDateToIso: F, datePickerValue: R, onDatePickerApply: (e) => {
90
+ n.updateFilter({
91
+ ...t.filter,
92
+ value: encodeURIComponent(F(e))
93
+ });
94
+ }, onTagsInput: (e) => {
95
+ n.updateFilter({
96
+ ...t.filter,
97
+ value: e.map(encodeURIComponent).join(",")
98
+ });
99
+ }, getOperatorOptions: f, safeDecodeURIComponent: g, InBasicTextInput: H, InDatePickerV2: G, InSelect: z, InButtonV2: q, InTags: Y, LogicAdapter: J };
65
100
  }
66
101
  });
67
102
  export {
68
- K as default
103
+ se as default
69
104
  };
@@ -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
- import c from "../static/styles/components/notification.css.js";
13
- import d from "../static/styles/components/popup.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,
12
+ import c from "../static/styles/components/popup.css.js";
13
+ import d from "../static/styles/components/switcher.css.js";
14
+ import l from "../static/styles/components/tabs.css.js";
15
+ import h from "../static/styles/components/tools.css.js";
16
+ import w from "../static/styles/components/version-history.css.js";
17
+ import y from "../static/styles/components/wide-panel.css.js";
18
+ import B from "../static/styles/variables.css.js";
19
+ const b = [
20
+ B,
22
21
  // Must be on top
23
22
  S,
24
23
  // Must be on top
@@ -27,8 +26,8 @@ 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,
@@ -37,13 +36,12 @@ const A = [
37
36
  l,
38
37
  h,
39
38
  w,
40
- y,
41
- B
39
+ y
42
40
  ].join(`
43
41
 
44
- `), F = () => ({ importCss: () => {
42
+ `), v = () => ({ importCss: () => {
45
43
  const o = new CSSStyleSheet();
46
- o.replaceSync(A);
44
+ o.replaceSync(b);
47
45
  const r = document.querySelector("ui-editor");
48
46
  if (!r)
49
47
  return;
@@ -51,5 +49,5 @@ const A = [
51
49
  t && (t.adoptedStyleSheets = [o]);
52
50
  } });
53
51
  export {
54
- F as useCustomInterfaceAppearance
52
+ v as useCustomInterfaceAppearance
55
53
  };
@@ -1,27 +1,28 @@
1
- import { useActionsApi as D } from "./useActionsApi.js";
2
- import { useBlocksConfig as I } from "./useBlocksConfig.js";
3
- import { useConfig as P } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as U } from "./useCustomInterfaceAppearance.js";
5
- import { useFullStoryBridge as R } from "./useFullStoryBridge.js";
6
- import { useStripoEventHandler as q } from "./useStripoEventHandler.js";
7
- import { useToaster as x } from "./useToaster.js";
8
- import { localePatch as H } from "../config/i18n/index.js";
9
- import { useStripoApi as O } from "../services/stripoApi.js";
10
- import j from "../static/styles/customEditorStyle.css.js";
1
+ import { useActionsApi as U } from "./useActionsApi.js";
2
+ import { useBlocksConfig as R } from "./useBlocksConfig.js";
3
+ import { useConfig as q } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as x } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as H } from "./useFullStoryBridge.js";
6
+ import { useStripoEventHandler as N } from "./useStripoEventHandler.js";
7
+ import { useStripoNotifications as O } from "./useStripoNotifications.js";
8
+ import { useToaster as j } from "./useToaster.js";
9
+ import { localePatch as L } from "../config/i18n/index.js";
10
+ import { useStripoApi as $ } from "../services/stripoApi.js";
11
+ import z from "../static/styles/customEditorStyle.css.js";
11
12
  import { useEditorStore as E } from "../stores/editor.js";
12
- import { dynamicContentToMergeTags as L } from "../utils/genericUtil.js";
13
- import $ from "../package.json.js";
14
- const se = (C, l) => {
15
- const { features: c, template: h, isFeatureEnabled: u } = P(), { handleError: m } = x(), { getToken: w, getCustomFonts: b, getSyncModulesStatus: k } = O(), { handleEvent: B } = q(), { getStripoBlocksConfig: T } = I(), V = async (i, r = [], s = !1) => {
13
+ import { dynamicContentToMergeTags as G } from "../utils/genericUtil.js";
14
+ import J from "../package.json.js";
15
+ const ct = (C, c) => {
16
+ const { features: l, template: h, isFeatureEnabled: u } = q(), { handleError: m } = j(), { getToken: w, getCustomFonts: b, getSyncModulesStatus: k } = $(), { handleEvent: B } = N(), { getStripoNotifications: T } = O(), { getStripoBlocksConfig: V } = R(), _ = async (i, s = [], r = !1) => {
16
17
  var g, S, y;
17
- const e = E(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await T(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, F = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, v = ((y = h.value) == null ? void 0 : y.forceRecreate) ?? !1;
18
+ const t = E(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await V(), f = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, v = ((S = l.value) == null ? void 0 : S.modulesDisabled) ?? !1, M = ((y = h.value) == null ? void 0 : y.forceRecreate) ?? !1, A = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com", D = T();
18
19
  window.UIEditor.initEditor(
19
20
  document.querySelector("#guido-editor"),
20
21
  {
21
22
  metadata: C,
22
23
  html: p,
23
24
  css: a,
24
- forceRecreate: v,
25
+ forceRecreate: M,
25
26
  locale: "en",
26
27
  undoButtonSelector: "#guido__undo-button",
27
28
  redoButtonSelector: "#guido__redo-button",
@@ -31,96 +32,97 @@ const se = (C, l) => {
31
32
  customAppearanceMergetags: !u("liquidSyntax"),
32
33
  customAppearanceMergetagsBorderColor: "#f1f3fe",
33
34
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
34
- customViewStyles: j,
35
+ customViewStyles: z,
35
36
  conditionsEnabled: f,
36
37
  customConditionsEnabled: f,
37
38
  enableXSSSecurity: !0,
38
- modulesDisabled: F,
39
- syncModulesEnabled: s,
39
+ modulesDisabled: v,
40
+ syncModulesEnabled: r,
40
41
  messageSettingsEnabled: !0,
41
42
  displayGmailAnnotations: !0,
42
43
  displayHiddenPreheader: !1,
43
44
  displayTitle: !1,
44
45
  displayUTM: !1,
45
46
  selectElementAfterDrop: !0,
46
- allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
47
+ allowedScriptSourceDomains: A,
47
48
  ...o ? { baseBlocks: o } : {},
48
49
  editorFonts: {
49
50
  showDefaultStandardFonts: !0,
50
51
  showDefaultNotStandardFonts: !0,
51
- customFonts: r
52
+ customFonts: s
52
53
  },
53
54
  mergeTags: [
54
55
  {
55
- entries: L(
56
- l.preselectedDynamicContentList,
56
+ entries: G(
57
+ c.preselectedDynamicContentList,
57
58
  u("liquidSyntax")
58
59
  )
59
60
  }
60
61
  ],
61
- async onTokenRefreshRequest(t) {
62
+ async onTokenRefreshRequest(e) {
62
63
  try {
63
64
  const n = await w();
64
- t(n);
65
+ e(n);
65
66
  } catch (n) {
66
67
  m(n, "Failed to refresh token");
67
68
  }
68
69
  },
69
70
  onTemplateLoaded() {
70
71
  try {
71
- const { importCss: t } = U(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: M } = D(), { injectFullStory: A } = R();
72
- t(), n(), A(), M(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
73
- e.hasChanges = !1;
72
+ const { importCss: e } = x(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: I } = U(), { injectFullStory: P } = H();
73
+ e(), n(), P(), I(), c.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
74
+ t.hasChanges = !1;
74
75
  }, 1e3);
75
- } catch (t) {
76
- m(t, "Failed to load custom interface appearance");
76
+ } catch (e) {
77
+ m(e, "Failed to load custom interface appearance");
77
78
  }
78
79
  },
79
- onCodeEditorVisibilityChanged(t) {
80
- e.isCodeEditorOpen = t;
80
+ onCodeEditorVisibilityChanged(e) {
81
+ t.isCodeEditorOpen = e;
81
82
  },
82
- onEditorVisualModeChanged(t) {
83
- e.editorVisualMode = t.toLowerCase();
83
+ onEditorVisualModeChanged(e) {
84
+ t.editorVisualMode = e.toLowerCase();
84
85
  },
85
- onVersionHistoryVisibilityChanged(t) {
86
- e.isVersionHistoryOpen = t;
86
+ onVersionHistoryVisibilityChanged(e) {
87
+ t.isVersionHistoryOpen = e;
87
88
  },
88
89
  onDataChanged() {
89
- e.hasChanges = !0;
90
+ t.hasChanges = !0;
90
91
  },
91
92
  onEvent: B,
93
+ notifications: D,
92
94
  ignoreClickOutsideSelectors: [
93
95
  "#guido-dynamic-content-modal",
94
96
  ".in-on-board-wrapper",
95
97
  ".in-drawer__container"
96
98
  ],
97
99
  extensions: d,
98
- localePatch: H
100
+ localePatch: L
99
101
  }
100
102
  );
101
- }, _ = (i) => new Promise((r, s) => {
103
+ }, F = (i) => new Promise((s, r) => {
102
104
  var d;
103
105
  if (document.getElementById("UiEditorScript")) {
104
- i(), r();
106
+ i(), s();
105
107
  return;
106
108
  }
107
- const e = $.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
109
+ const t = J.guido, a = `https://email-static.useinsider.com/guido/${(d = t == null ? void 0 : t.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
108
110
  o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
109
- i(), r();
111
+ i(), s();
110
112
  }, o.onerror = () => {
111
- s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
113
+ r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
112
114
  }, document.body.appendChild(o);
113
115
  });
114
116
  return { initPlugin: async (i) => {
115
- await _(async () => {
116
- const r = E(), [s, e] = await Promise.all([
117
+ await F(async () => {
118
+ const s = E(), [r, t] = await Promise.all([
117
119
  b(),
118
120
  k()
119
121
  ]);
120
- r.syncModulesEnabled = e, await V(i, s, e);
122
+ s.syncModulesEnabled = t, await _(i, r, t);
121
123
  });
122
124
  } };
123
125
  };
124
126
  export {
125
- se as useStripo
127
+ ct as useStripo
126
128
  };
@@ -0,0 +1,28 @@
1
+ import { useToaster as d } from "./useToaster.js";
2
+ import { ToasterTypeOptions as c } from "../enums/toaster.js";
3
+ const p = () => {
4
+ const { showToaster: s, hideToaster: u } = d();
5
+ let r = null, l = null;
6
+ const n = (t, o, i, e, f = {}) => {
7
+ if (r === i && l === o)
8
+ return;
9
+ r = i, l = o;
10
+ const a = e != null && e.action ? { text: e.action.label, onClick: e.action.func } : void 0;
11
+ s({ type: t, message: o, actionButton: a, autoHide: f.autoHide });
12
+ };
13
+ return { getStripoNotifications: () => ({
14
+ info: (t, o, i) => n(c.Info, t, o, i),
15
+ success: (t, o, i) => n(c.Success, t, o, i),
16
+ warn: (t, o, i) => n(c.Warning, t, o, i),
17
+ error: (t, o, i) => n(c.Alert, t, o, i),
18
+ // Loader represents an in-progress operation; Stripo dismisses it via hide(id)
19
+ // when the operation finishes, so we disable auto-hide for this variant.
20
+ loader: (t, o, i) => n(c.Info, t, o, i, { autoHide: !1 }),
21
+ hide: (t) => {
22
+ r === t && (u(), r = null, l = null);
23
+ }
24
+ }) };
25
+ };
26
+ export {
27
+ p as useStripoNotifications
28
+ };
@@ -9,14 +9,14 @@ class B {
9
9
  }
10
10
  migrate(e) {
11
11
  try {
12
- const t = this.parser.parseFromString(e, "text/html"), i = t.querySelectorAll("td.radio-button-block"), s = t.querySelectorAll("td.radio-button-v2");
13
- if (i.length === 0 && s.length === 0)
12
+ const t = this.parser.parseFromString(e, "text/html"), s = t.querySelectorAll("td.radio-button-block"), i = t.querySelectorAll("td.radio-button-v2");
13
+ if (s.length === 0 && i.length === 0)
14
14
  return e;
15
15
  let o = !1;
16
- return i.forEach((r) => {
16
+ return s.forEach((r) => {
17
17
  if (r.classList.contains("radio-button-v2"))
18
18
  return;
19
- const n = r.getAttribute("id"), a = this.extractTextFromElement(r, "ins-title"), g = this.extractTextFromElement(r, "ins-description"), c = this.extractTextFromElement(r, "ins-subscribe"), u = this.extractTextFromElement(r, "ins-unsubscribe"), d = this.buildTextBlock(a), p = this.buildTextBlock(g), y = this.buildTextBlock({ ...c, classList: "" }), f = this.buildTextBlock({ ...u, classList: "" }), h = S.replace("{-{-TITLE-}-}", d).replace("{-{-DESCRIPTION-}-}", p).replace("{-{-YES-}-}", y).replace("{-{-NO-}-}", f), m = this.parser.parseFromString(
19
+ const n = r.getAttribute("id"), a = this.extractTextFromElement(r, "ins-title"), g = this.extractTextFromElement(r, "ins-description"), c = this.extractTextFromElement(r, "ins-subscribe"), u = this.extractTextFromElement(r, "ins-unsubscribe"), p = this.buildTextBlock(a), d = this.buildTextBlock(g), y = this.buildTextBlock({ ...c, classList: "" }), f = this.buildTextBlock({ ...u, classList: "" }), h = S.replace("{-{-TITLE-}-}", p).replace("{-{-DESCRIPTION-}-}", d).replace("{-{-YES-}-}", y).replace("{-{-NO-}-}", f), m = this.parser.parseFromString(
20
20
  `<table id="tempDoc"><tbody><tr>${h}</tr></tbody></table>`,
21
21
  "text/html"
22
22
  ).querySelector(".radio-button-v2");
@@ -28,25 +28,26 @@ class B {
28
28
  }
29
29
  healRadioButtonV2(e) {
30
30
  let t = !1;
31
- return e.querySelectorAll("td.radio-button-v2").forEach((i) => {
32
- var p;
33
- const s = i.querySelector("input#radioYes"), o = i.querySelector("input#radioNo");
34
- if (!s || !o)
31
+ return e.querySelectorAll("td.radio-button-v2").forEach((s) => {
32
+ var d;
33
+ s.classList.contains("radio-button-block") || (s.classList.add("radio-button-block"), t = !0);
34
+ const i = s.querySelector("input#radioYes"), o = s.querySelector("input#radioNo");
35
+ if (!i || !o)
35
36
  return;
36
- const r = ((p = s.parentElement) == null ? void 0 : p.querySelector(":scope > p")) || null;
37
- if (!r && !s.hasAttribute("align"))
37
+ const r = ((d = i.parentElement) == null ? void 0 : d.querySelector(":scope > p")) || null;
38
+ if (!r && !i.hasAttribute("align"))
38
39
  return;
39
- const n = s.closest("tr"), a = o.closest("tr");
40
+ const n = i.closest("tr"), a = o.closest("tr");
40
41
  if (!n || !a || n === a || !n.parentNode)
41
42
  return;
42
- const g = (r == null ? void 0 : r.innerHTML.trim()) || "Yes", c = a.cloneNode(!0), u = c.querySelector("input#radioNo"), d = c.querySelector("p");
43
- u && (u.setAttribute("id", "radioYes"), u.removeAttribute("align")), d && (d.innerHTML = g), n.parentNode.replaceChild(c, n), t = !0;
43
+ const g = (r == null ? void 0 : r.innerHTML.trim()) || "Yes", c = a.cloneNode(!0), u = c.querySelector("input#radioNo"), p = c.querySelector("p");
44
+ u && (u.setAttribute("id", "radioYes"), u.removeAttribute("align")), p && (p.innerHTML = g), n.parentNode.replaceChild(c, n), t = !0;
44
45
  }), t;
45
46
  }
46
47
  extractTextFromElement(e, t) {
47
- var p, y;
48
- const i = e.querySelector(`.${t}`);
49
- if (!i)
48
+ var d, y;
49
+ const s = e.querySelector(`.${t}`);
50
+ if (!s)
50
51
  return {
51
52
  text: t === "ins-title" ? "Title" : "Description",
52
53
  isBold: !1,
@@ -55,42 +56,42 @@ class B {
55
56
  styles: "",
56
57
  classList: ""
57
58
  };
58
- const s = i.querySelector("p");
59
- if (!s)
59
+ const i = s.querySelector("p");
60
+ if (!i)
60
61
  return {
61
- text: ((p = i.textContent) == null ? void 0 : p.trim()) || (t === "ins-title" ? "Title" : "Description"),
62
+ text: ((d = s.textContent) == null ? void 0 : d.trim()) || (t === "ins-title" ? "Title" : "Description"),
62
63
  isBold: !1,
63
64
  isItalic: !1,
64
- align: i.getAttribute("align") || "left",
65
+ align: s.getAttribute("align") || "left",
65
66
  styles: "",
66
67
  classList: ""
67
68
  };
68
- const o = ((y = s.textContent) == null ? void 0 : y.trim()) || (t === "ins-title" ? "Title" : "Description"), r = s.getAttribute("style") || "", n = i.getAttribute("align") || s.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(r) || !!s.querySelector("b, strong"), g = /font-style\s*:\s*italic/i.test(r) || !!s.querySelector("i, em"), c = this.removeStyleProperties(r, ["font-weight", "font-style"]), u = this.convertInlineToBlock(c), d = i.getAttribute("class") || "";
69
+ const o = ((y = i.textContent) == null ? void 0 : y.trim()) || (t === "ins-title" ? "Title" : "Description"), r = i.getAttribute("style") || "", n = s.getAttribute("align") || i.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(r) || !!i.querySelector("b, strong"), g = /font-style\s*:\s*italic/i.test(r) || !!i.querySelector("i, em"), c = this.removeStyleProperties(r, ["font-weight", "font-style"]), u = this.convertInlineToBlock(c), p = s.getAttribute("class") || "";
69
70
  return {
70
71
  text: o,
71
72
  isBold: a,
72
73
  isItalic: g,
73
74
  align: n,
74
75
  styles: u,
75
- classList: d
76
+ classList: p
76
77
  };
77
78
  }
78
79
  buildTextBlock(e) {
79
80
  let t = e.text;
80
81
  e.isBold && e.isItalic ? t = `<strong path="1,0"><em path="1,0,0">${t}</em></strong>` : e.isBold ? t = `<strong path="1,0">${t}</strong>` : e.isItalic && (t = `<em path="1,0">${t}</em>`);
81
- const i = e.align ? ` align="${e.align}"` : "", s = e.styles ? ` style="${e.styles.replaceAll('"', "'")}"` : "";
82
+ const s = e.align ? ` align="${e.align}"` : "", i = e.styles ? ` style="${e.styles.replaceAll('"', "'")}"` : "";
82
83
  return `
83
- <td class="esd-block-text ${e.classList}" ${i}>
84
- <p path="1" ${s}>
84
+ <td class="esd-block-text ${e.classList}" ${s}>
85
+ <p path="1" ${i}>
85
86
  ${t}
86
87
  </p>
87
88
  </td>
88
89
  `;
89
90
  }
90
91
  removeStyleProperties(e, t) {
91
- return e ? t.reduce((s, o) => {
92
+ return e ? t.reduce((i, o) => {
92
93
  const r = new RegExp(`${o}\\s*:\\s*[^;]*;?`, "gi");
93
- return s.replace(r, "");
94
+ return i.replace(r, "");
94
95
  }, e).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
95
96
  }
96
97
  convertInlineToBlock(e) {
@@ -100,9 +101,9 @@ class B {
100
101
  return /display\s*:/i.test(t) || (t = t ? `${t}; display: block` : "display: block"), t.replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim();
101
102
  }
102
103
  }
103
- function q(l) {
104
+ function L(l) {
104
105
  return new B().migrate(l);
105
106
  }
106
107
  export {
107
- q as migrateRadioButton
108
+ L as migrateRadioButton
108
109
  };
@@ -1,10 +1,10 @@
1
- import { useTranslations as a } from "../../composables/useTranslations.js";
2
- const u = {
1
+ import { useTranslations as r } from "../../composables/useTranslations.js";
2
+ const l = {
3
3
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
4
- }, l = {
4
+ }, c = {
5
5
  CLIENT_ID: "clientId"
6
- }, c = () => {
7
- const e = a();
6
+ }, d = () => {
7
+ const e = r();
8
8
  return [
9
9
  {
10
10
  id: 11,
@@ -67,72 +67,73 @@ const u = {
67
67
  path: "top-sellers"
68
68
  }
69
69
  ];
70
- }, d = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], m = [
70
+ }, m = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], p = [
71
71
  { text: "before the amount", value: "0" },
72
72
  { text: "after the amount", value: "1" }
73
- ], p = [
73
+ ], v = [
74
74
  { text: "dot(.)", value: "." },
75
75
  { text: "comma(,)", value: "," },
76
76
  { text: "space( )", value: " " }
77
- ], v = [
77
+ ], h = [
78
78
  { text: "0", value: "0" },
79
79
  { text: "1", value: "1" },
80
80
  { text: "2", value: "2" },
81
81
  { text: "3", value: "3" },
82
82
  { text: "4", value: "4" },
83
83
  { text: "5", value: "5" }
84
- ], t = [
84
+ ], a = "||", t = [
85
85
  { text: "is exactly", value: "=" },
86
86
  { text: "contains", value: "~" },
87
87
  { text: "does not contain", value: "!~" },
88
- { text: "any of", value: "||" }
89
- ], r = [
88
+ { text: "any of", value: a }
89
+ ], n = [
90
90
  { text: "is exactly", value: "=" },
91
91
  { text: "is not exactly", value: "!==" },
92
92
  { text: "contains", value: "~" },
93
93
  { text: "does not contain", value: "!~" },
94
- { text: "any of", value: "||" }
95
- ], n = [
94
+ { text: "any of", value: a }
95
+ ], o = [
96
96
  { text: "is equal to", value: "=" },
97
97
  { text: "is greater than", value: ">" },
98
98
  { text: "is less than", value: "<" }
99
- ], o = [
99
+ ], s = [
100
100
  { text: "is equal to", value: "=" },
101
101
  { text: "after", value: ">" },
102
102
  { text: "before", value: "<" }
103
- ], s = [
103
+ ], i = [
104
104
  { text: "true", value: "==" },
105
105
  { text: "false", value: "!=" }
106
- ], h = (e) => {
106
+ ], x = (e) => {
107
107
  if (!e)
108
108
  return t;
109
109
  switch (e) {
110
110
  case "Boolean":
111
- return s;
111
+ return i;
112
112
  case "Date":
113
- return o;
113
+ return s;
114
114
  case "Number":
115
- return n;
115
+ return o;
116
116
  case "String":
117
117
  return t;
118
118
  case "Strings":
119
- return r;
119
+ return n;
120
120
  default:
121
121
  return t;
122
122
  }
123
123
  };
124
124
  export {
125
- d as PriceAttributes,
126
- l as QUERY_PARAMS,
127
- u as URLS,
128
- v as currencyDecimalCounts,
129
- m as currencyLocationMaps,
130
- p as currencyOperators,
131
- h as getOperatorOptions,
132
- c as getRecommendationFeedSourceMaps,
133
- r as operatorOptionsForArrayOfStrings,
134
- s as operatorOptionsForBooleans,
135
- o as operatorOptionsForDates,
136
- n as operatorOptionsForNumbers,
125
+ a as OP_ANY_OF,
126
+ m as PriceAttributes,
127
+ c as QUERY_PARAMS,
128
+ l as URLS,
129
+ h as currencyDecimalCounts,
130
+ p as currencyLocationMaps,
131
+ v as currencyOperators,
132
+ x as getOperatorOptions,
133
+ d as getRecommendationFeedSourceMaps,
134
+ n as operatorOptionsForArrayOfStrings,
135
+ i as operatorOptionsForBooleans,
136
+ s as operatorOptionsForDates,
137
+ o as operatorOptionsForNumbers,
137
138
  t as operatorOptionsForStrings
138
139
  };
@@ -1,4 +1,4 @@
1
- var c = /* @__PURE__ */ ((r) => (r.Success = "success", r.Warning = "warning", r.Alert = "alert", r))(c || {});
1
+ var c = /* @__PURE__ */ ((r) => (r.Success = "success", r.Warning = "warning", r.Alert = "alert", r.Info = "info", r))(c || {});
2
2
  export {
3
3
  c as ToasterTypeOptions
4
4
  };
@@ -5,7 +5,7 @@ const e = {
5
5
  YES: "Yes",
6
6
  NO: "No"
7
7
  }, d = `
8
- <td align="left" class="radio-button radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
8
+ <td align="left" class="radio-button-block radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
9
9
  <table cellpadding="0" cellspacing="0" role="presentation" width="100%">
10
10
  <tbody>
11
11
  <tr>
@@ -75,13 +75,13 @@ const e = {
75
75
  </tbody>
76
76
  </table>
77
77
  </td>
78
- `, a = `
78
+ `, l = `
79
79
  <td
80
80
  align="left"
81
81
  esd-extension-block-id="radio-button-block"
82
82
  esd-handler-name="esd-extension-RadioButtonBlock"
83
83
  class="
84
- radio-button
84
+ radio-button-block
85
85
  radio-button-v2
86
86
  esd-block-ra
87
87
  esd-radio-button-block
@@ -149,10 +149,10 @@ const e = {
149
149
  </table>
150
150
  </td>
151
151
  `;
152
- function l() {
152
+ function a() {
153
153
  return d.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
154
154
  }
155
155
  export {
156
- a as default,
157
- l as getDefaultTemplate
156
+ l as default,
157
+ a as getDefaultTemplate
158
158
  };
@@ -1,31 +1,44 @@
1
- function l(t) {
1
+ import { OP_ANY_OF as l } from "../../../../enums/extensions/recommendationBlock.js";
2
+ function m(t) {
3
+ try {
4
+ return decodeURIComponent(t);
5
+ } catch {
6
+ return t;
7
+ }
8
+ }
9
+ function f(t) {
10
+ return t.split(",").filter(Boolean).map(m);
11
+ }
12
+ function y(t) {
2
13
  if (t.length === 0)
3
14
  return "";
4
15
  const o = t.sort((r, e) => r.filterNumber - e.filterNumber), u = o.map((r) => {
5
- const e = r.operator === "||", a = e ? "=" : r.operator, c = e ? decodeURIComponent(r.value).split(",").join("||") : r.value;
16
+ const e = r.operator === l, a = e ? "=" : r.operator, c = e ? f(r.value).join(l) : r.value;
6
17
  return `[${r.attribute}][${a}][${c}]`;
7
- }), [s, ...p] = u;
8
- let n = s;
18
+ }), [i, ...p] = u;
19
+ let n = i;
9
20
  for (let r = 0; r < p.length; r++) {
10
21
  const e = o[r].innerGroupOperator;
11
22
  n += `${e}${p[r]}`;
12
23
  }
13
24
  return `(${n})`;
14
25
  }
15
- function G(t) {
26
+ function Q(t) {
16
27
  if (!t || t.length === 0)
17
28
  return "";
18
- const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e), s = u.map((r) => {
29
+ const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e), i = u.map((r) => {
19
30
  const e = o[r];
20
- return l(e);
21
- }), [p, ...n] = s;
22
- let i = p;
31
+ return y(e);
32
+ }), [p, ...n] = i;
33
+ let s = p;
23
34
  for (let r = 0; r < n.length; r++) {
24
35
  const e = u[r + 1], c = o[e][0].outerGroupOperator;
25
- i += `${c}${n[r]}`;
36
+ s += `${c}${n[r]}`;
26
37
  }
27
- return i.trim();
38
+ return s.trim();
28
39
  }
29
40
  export {
30
- G as generateCompleteFilterQuery
41
+ Q as generateCompleteFilterQuery,
42
+ f as parseTagList,
43
+ m as safeDecodeURIComponent
31
44
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-cdee3452]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cdee3452]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cdee3452]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-8053a037],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-cdee3452]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cdee3452]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cdee3452]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
@@ -0,0 +1,4 @@
1
+ import type { StripoNotifications } from '@@/Types/stripo';
2
+ export declare const useStripoNotifications: () => {
3
+ getStripoNotifications: () => StripoNotifications;
4
+ };
@@ -15,6 +15,7 @@ export declare const PriceAttributes: string[];
15
15
  export declare const currencyLocationMaps: TextValueObject[];
16
16
  export declare const currencyOperators: TextValueObject[];
17
17
  export declare const currencyDecimalCounts: TextValueObject[];
18
+ export declare const OP_ANY_OF = "||";
18
19
  export declare const operatorOptionsForStrings: TextValueObject[];
19
20
  export declare const operatorOptionsForArrayOfStrings: TextValueObject[];
20
21
  export declare const operatorOptionsForNumbers: TextValueObject[];
@@ -1,5 +1,6 @@
1
1
  export declare enum ToasterTypeOptions {
2
2
  Success = "success",
3
3
  Warning = "warning",
4
- Alert = "alert"
4
+ Alert = "alert",
5
+ Info = "info"
5
6
  }
@@ -1,4 +1,4 @@
1
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
1
+ declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button-block\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
2
2
  /**
3
3
  * @returns The template for the default checkbox block
4
4
  */
@@ -1,4 +1,6 @@
1
1
  import type { Filter } from '@@/Types/recommendation';
2
+ export declare function safeDecodeURIComponent(value: string): string;
3
+ export declare function parseTagList(value: string): string[];
2
4
  /**
3
5
  * Generates the complete query with outer group operators
4
6
  * @param filters Array of Filter objects
@@ -11,8 +11,9 @@ export declare const useToasterStore: import("pinia").StoreDefinition<"guidoToas
11
11
  text: string;
12
12
  onClick: () => void;
13
13
  } | undefined;
14
+ autoHide: boolean;
14
15
  } & import("pinia").PiniaCustomStateProperties<ToasterState>) => boolean;
15
16
  }, {
16
- showToaster(this: ToasterState, { type, message, actionButton }: ToasterOptions): void;
17
+ showToaster(this: ToasterState, { type, message, actionButton, autoHide }: ToasterOptions): void;
17
18
  hideToaster(this: ToasterState): void;
18
19
  }>;
@@ -1,21 +1,22 @@
1
1
  import { ToasterTypeOptions as e } from "../enums/toaster.js";
2
- import { defineStore as i } from "pinia";
3
- const a = () => ({
2
+ import { defineStore as a } from "pinia";
3
+ const u = () => ({
4
4
  status: !1,
5
5
  type: e.Success,
6
6
  text: "",
7
7
  icon: "",
8
8
  withIcon: !0,
9
9
  withoutLeftMargin: !1,
10
- actionButton: void 0
11
- }), n = i("guidoToaster", {
12
- state: () => a(),
10
+ actionButton: void 0,
11
+ autoHide: !0
12
+ }), c = a("guidoToaster", {
13
+ state: () => u(),
13
14
  getters: {
14
- shouldAutoHide: (t) => t.status && !!t.text
15
+ shouldAutoHide: (t) => t.status && !!t.text && t.autoHide
15
16
  },
16
17
  actions: {
17
- showToaster({ type: t = e.Success, message: s, actionButton: o }) {
18
- this.status = !0, this.text = s, this.type = t, this.actionButton = o;
18
+ showToaster({ type: t = e.Success, message: o, actionButton: s, autoHide: i = !0 }) {
19
+ this.status = !0, this.text = o, this.type = t, this.actionButton = s, this.autoHide = i;
19
20
  },
20
21
  hideToaster() {
21
22
  this.status = !1;
@@ -23,5 +24,5 @@ const a = () => ({
23
24
  }
24
25
  });
25
26
  export {
26
- n as useToasterStore
27
+ c as useToasterStore
27
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.3.0-beta.4134d8d",
3
+ "version": "3.3.0-beta.4ab4365",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,74 +0,0 @@
1
- const n = `ue-notifications-container {
2
- left: 96px;
3
- margin: 0;
4
- bottom: 32px;
5
- top: unset;
6
- width: unset;
7
- position: fixed;
8
- }
9
-
10
- ue-notifications-container ue-message + ue-message {
11
- margin-bottom: 24px;
12
- }
13
-
14
- ue-notifications-container .alert-message-wrapper {
15
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
16
- border: none;
17
- padding: 16px 24px;
18
- }
19
-
20
- ue-notifications-container .alert-message-wrapper.info,
21
- ue-notifications-container .alert-message-wrapper.loader {
22
- background-color: var(--guido-color-background-toaster-info) !important;
23
- color: inherit;
24
- }
25
-
26
- .alert-message-wrapper .alert-message-main {
27
- align-items: center;
28
- }
29
-
30
- ue-notifications-container ue-caption .caption {
31
- color: var(--guido-color-white) !important;
32
- }
33
-
34
- ue-block-thumb-hint {
35
- text-align: left;
36
- }
37
-
38
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
39
- width: calc(100% - 64px);
40
- }
41
-
42
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-text {
43
- font-size: 15px;
44
- font-weight: 600;
45
- }
46
-
47
- ue-notifications-container .alert-message-text,
48
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon,
49
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon-button {
50
- color: var(--guido-color-white);
51
- }
52
-
53
- ue-notifications-container ue-message ue-button.close {
54
- margin: 0 0 0 16px;
55
- }
56
-
57
- ue-notifications-container .alert-message-wrapper.success {
58
- background: var(--guido-color-background-toaster-success);
59
- color: inherit;
60
- }
61
-
62
- ue-notifications-container .alert-message-wrapper.error {
63
- background: var(--guido-color-background-toaster-error);
64
- color: inherit;
65
- }
66
-
67
- ue-notifications-container .alert-message-wrapper.warn {
68
- background: var(--guido-color-background-toaster-warn);
69
- color: inherit;
70
- }
71
- `;
72
- export {
73
- n as default
74
- };