@useinsider/guido 1.0.3-beta.52ded25 → 1.0.3-beta.5361682

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 (98) hide show
  1. package/README.md +32 -3
  2. package/dist/components/Guido.vue.js +1 -1
  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 +1 -1
  6. package/dist/composables/useHtmlValidator.js +35 -36
  7. package/dist/composables/useStripo.js +25 -29
  8. package/dist/enums/unsubscribe.js +26 -27
  9. package/dist/extensions/Blocks/Checkbox/control.js +14 -15
  10. package/dist/extensions/Blocks/Checkbox/template.js +9 -14
  11. package/dist/extensions/Blocks/Items/block.js +26 -26
  12. package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
  13. package/dist/extensions/Blocks/Items/controls/settingsControl.js +81 -84
  14. package/dist/extensions/Blocks/Items/enums/productEnums.js +4 -62
  15. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +57 -57
  16. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +55 -54
  17. package/dist/extensions/Blocks/Items/settingsPanel.js +29 -28
  18. package/dist/extensions/Blocks/Items/template.js +82 -79
  19. package/dist/extensions/Blocks/RadioButton/control.js +17 -18
  20. package/dist/extensions/Blocks/RadioButton/template.js +9 -18
  21. package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
  22. package/dist/guido.css +1 -1
  23. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  24. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  25. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
  26. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -14
  27. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +2 -5
  28. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -2
  29. package/dist/src/extensions/Blocks/Items/template.d.ts +1 -9
  30. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  31. package/package.json +10 -5
  32. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  33. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  34. package/dist/node_modules/lodash-es/_Set.js +0 -6
  35. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  36. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  37. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  38. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  39. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  40. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  41. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  42. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  43. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  44. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  45. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  46. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  47. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  48. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  49. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  50. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  51. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  52. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  53. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  54. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  55. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  56. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  57. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  58. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  59. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  60. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  61. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  62. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  63. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  64. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  65. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  66. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  67. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  68. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  69. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  70. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  71. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  72. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  73. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  74. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  75. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  76. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  77. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  78. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  79. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  80. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  81. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  82. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  83. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  84. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  85. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  86. package/dist/node_modules/lodash-es/get.js +0 -8
  87. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  88. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  89. package/dist/node_modules/lodash-es/keys.js +0 -9
  90. package/dist/node_modules/lodash-es/map.js +0 -11
  91. package/dist/node_modules/lodash-es/property.js +0 -10
  92. package/dist/node_modules/lodash-es/range.js +0 -5
  93. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  94. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  95. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  96. package/dist/node_modules/lodash-es/toString.js +0 -7
  97. package/dist/src/utils/environmentUtil.d.ts +0 -5
  98. package/dist/utils/environmentUtil.js +0 -4
@@ -1,17 +1,17 @@
1
1
  var _ = Object.defineProperty;
2
- var S = (n, i, e) => i in n ? _(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var u = (n, i, e) => S(n, typeof i != "symbol" ? i + "" : i, e);
2
+ var d = (n, i, e) => i in n ? _(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
+ var u = (n, i, e) => d(n, typeof i != "symbol" ? i + "" : i, e);
4
4
  import { PAGE_TYPES as E } from "../../../enums/unsubscribe.js";
5
5
  import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
6
- import { Block as d, BlockCompositionType as L, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- import { getDefaultTemplate as h } from "./template.js";
6
+ import { Block as S, BlockCompositionType as h, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ import { getDefaultTemplate as L } from "./template.js";
8
8
  import { UNSUBSCRIBE_EVENTS as a, DATA_ATTRIBUTES as o } from "./utils/constants.js";
9
9
  import { parsePageList as m } from "./utils/utils.js";
10
- const v = "unsubscribe-block", g = 'a[data-unsubscribe-link="true"]', T = ".unsubscribe-block-v2", f = "{{ins-unsubscribe-link}}", B = {
10
+ const v = "unsubscribe-block", g = 'a[data-unsubscribe-link="true"]', B = ".unsubscribe-block-v2", f = "{{ins-unsubscribe-link}}", C = {
11
11
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
12
12
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
13
13
  };
14
- class D extends d {
14
+ class D extends S {
15
15
  constructor() {
16
16
  super();
17
17
  u(this, "selectEventListener", null);
@@ -25,7 +25,7 @@ class D extends d {
25
25
  return "unsubscribe-icon";
26
26
  }
27
27
  getBlockCompositionType() {
28
- return L.BLOCK;
28
+ return h.BLOCK;
29
29
  }
30
30
  getName() {
31
31
  return this.api.translate("Unsubscribe Block");
@@ -34,10 +34,10 @@ class D extends d {
34
34
  return this.api.translate("Unsubscribe Block Description");
35
35
  }
36
36
  getTemplate() {
37
- return h();
37
+ return L();
38
38
  }
39
39
  onCreated(e) {
40
- "getOuterHTML" in e && !e.getOuterHTML() || "getAttribute" in e && e.getAttribute("data-migration") || (this.currentNode = e, this._resetStoreState(), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
40
+ "getAttribute" in e && e.getAttribute("data-migration") || (this.currentNode = e, this._resetStoreState(), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
41
41
  }
42
42
  onSelect(e) {
43
43
  this.currentNode = e, this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener();
@@ -50,8 +50,8 @@ class D extends d {
50
50
  }
51
51
  _setupSelectEventListener() {
52
52
  this._removeSelectEventListener(), this.selectEventListener = (e) => {
53
- const s = e, { collectionType: t, selectedPages: r } = s.detail;
54
- this._updateBlock(t, r.join(","));
53
+ const r = e, { collectionType: t, selectedPages: s } = r.detail;
54
+ this._updateBlock(t, s.join(","));
55
55
  }, document.addEventListener(a.SELECT, this.selectEventListener);
56
56
  }
57
57
  _removeSelectEventListener() {
@@ -71,17 +71,17 @@ class D extends d {
71
71
  _removeEventListeners() {
72
72
  this._removeSelectEventListener(), this._removeCancelEventListener();
73
73
  }
74
- _updateBlock(e, s) {
74
+ _updateBlock(e, r) {
75
75
  if (!this.currentNode || !("querySelector" in this.currentNode))
76
76
  return;
77
77
  const t = this.currentNode.querySelector(g);
78
78
  if (!t)
79
79
  return;
80
- const r = this._getMergeTag(e);
81
- this.api.getDocumentModifier().modifyHtml(t).setAttribute("href", r).apply(new b(`Updated unsubscribe link to ${r}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, s).apply(new b("Updated unsubscribe block metadata"));
80
+ const s = this._getMergeTag(e);
81
+ this.api.getDocumentModifier().modifyHtml(t).setAttribute("href", s).apply(new b(`Updated unsubscribe link to ${s}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, r).apply(new b("Updated unsubscribe block metadata"));
82
82
  }
83
83
  _getMergeTag(e) {
84
- return B[e] ?? f;
84
+ return C[e] ?? f;
85
85
  }
86
86
  _openDrawer() {
87
87
  try {
@@ -93,11 +93,11 @@ class D extends d {
93
93
  }
94
94
  _checkExistingBlocks() {
95
95
  const e = c();
96
- e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(T).forEach((t) => {
96
+ e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(B).forEach((t) => {
97
97
  if ("getAttribute" in t) {
98
- const r = t.getAttribute(o.PAGE_TYPE);
99
- if (r) {
100
- const l = Number(r);
98
+ const s = t.getAttribute(o.PAGE_TYPE);
99
+ if (s) {
100
+ const l = Number(s);
101
101
  l === E.GLOBAL_UNSUBSCRIBE ? e.isGlobalUnsubscribeDisabled = !0 : l === E.SUBSCRIPTION_PREFERENCE_CENTER && (e.isSubscriptionPreferencesCenterDisabled = !0);
102
102
  }
103
103
  }
@@ -106,11 +106,11 @@ class D extends d {
106
106
  _loadBlockState(e) {
107
107
  if (!("getAttribute" in e))
108
108
  return;
109
- const s = e.getAttribute(o.PAGE_TYPE), t = e.getAttribute(o.PAGE_LIST);
110
- if (!s || !t)
109
+ const r = e.getAttribute(o.PAGE_TYPE), t = e.getAttribute(o.PAGE_LIST);
110
+ if (!r || !t)
111
111
  return;
112
- const r = c(), l = Number(s), p = m(t);
113
- r.setCollectionWithoutAutoSelection(l), r.loadSelectedTemplates(p);
112
+ const s = c(), l = Number(r), p = m(t);
113
+ s.setCollectionWithoutAutoSelection(l), s.loadSelectedTemplates(p);
114
114
  }
115
115
  _resetStoreState() {
116
116
  c().$reset();
@@ -118,11 +118,11 @@ class D extends d {
118
118
  _removeBlockTemplatesFromStore(e) {
119
119
  if (!("getAttribute" in e))
120
120
  return;
121
- const s = e.getAttribute(o.PAGE_LIST);
122
- if (!s)
121
+ const r = e.getAttribute(o.PAGE_LIST);
122
+ if (!r)
123
123
  return;
124
- const t = c(), r = m(s);
125
- t.removeUnsubscribePages(r);
124
+ const t = c(), s = m(r);
125
+ t.removeUnsubscribePages(s);
126
126
  }
127
127
  }
128
128
  export {
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-0502bceb] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.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}.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}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-98181b5a]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-98181b5a]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-98181b5a]{height:calc(100vh - 75px)}[data-v-70835920] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-dd57102d] .guido__verion-history-view-option-selection-desktop svg,[data-v-dd57102d] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-dd57102d] .in-segments-wrapper__button_selected,[data-v-dd57102d] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-0502bceb] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.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}.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}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-23c413c9],.guido-editor__container[data-v-23c413c9]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-23c413c9]{height:calc(100vh - 75px)}[data-v-70835920] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-dd57102d] .guido__verion-history-view-option-selection-desktop svg,[data-v-dd57102d] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-dd57102d] .in-segments-wrapper__button_selected,[data-v-dd57102d] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -1,20 +1,19 @@
1
- import a from "./_baseTimes.js";
1
+ import p from "./_baseTimes.js";
2
2
  import g from "./isArguments.js";
3
3
  import h from "./isArray.js";
4
- import b from "./isBuffer.js";
5
- import A from "./_isIndex.js";
6
- import c from "./isTypedArray.js";
7
- var d = Object.prototype, O = d.hasOwnProperty;
8
- function l(t, p) {
9
- var o = h(t), i = !o && g(t), s = !o && !i && b(t), e = !o && !i && !s && c(t), n = o || i || s || e, f = n ? a(t.length, String) : [], m = f.length;
10
- for (var r in t)
11
- (p || O.call(t, r)) && !(n && // Safari 9 has enumerable `arguments.length` in strict mode.
4
+ import a from "./isBuffer.js";
5
+ import d from "./_isIndex.js";
6
+ import A from "./isTypedArray.js";
7
+ function c(i, b) {
8
+ var t = h(i), f = !t && g(i), s = !t && !f && a(i), o = !t && !f && !s && A(i), n = t || f || s || o, e = n ? p(i.length, String) : [], m = e.length;
9
+ for (var r in i)
10
+ n && // Safari 9 has enumerable `arguments.length` in strict mode.
12
11
  (r == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
13
12
  s && (r == "offset" || r == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
14
- e && (r == "buffer" || r == "byteLength" || r == "byteOffset") || // Skip index properties.
15
- A(r, m))) && f.push(r);
16
- return f;
13
+ o && (r == "buffer" || r == "byteLength" || r == "byteOffset") || // Skip index properties.
14
+ d(r, m)) || e.push(r);
15
+ return e;
17
16
  }
18
17
  export {
19
- l as default
18
+ c as default
20
19
  };
@@ -1,9 +1,9 @@
1
1
  import e from "./_arrayLikeKeys.js";
2
2
  import i from "./_baseKeysIn.js";
3
3
  import a from "./isArrayLike.js";
4
- function t(r) {
5
- return a(r) ? e(r, !0) : i(r);
4
+ function f(r) {
5
+ return a(r) ? e(r) : i(r);
6
6
  }
7
7
  export {
8
- t as default
8
+ f as default
9
9
  };
@@ -1,4 +1,4 @@
1
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"checkbox-block\"\n class=\"\n checkbox-block\n checkbox-block-v2\n esd-block-checkbox\n esd-checkbox-block\n esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" 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 </tr>\n </tbody>\n </table>\n </td>\n";
1
+ declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"checkbox-block\" \n class=\"checkbox-block-v2 esd-block-checkbox esd-checkbox-block esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" 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 </tr>\n </tbody>\n </table>\n </td>\n";
2
2
  /**
3
3
  * @returns The template for the default checkbox block
4
4
  */
@@ -1,19 +1,5 @@
1
1
  import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
2
  export declare const BLOCK_ID = "items-block";
3
- /**
4
- * Items Block extension for Stripo email editor.
5
- *
6
- * Displays personalized product items (cart items, browsed items, or purchased items)
7
- * in a configurable card layout with horizontal or vertical orientation.
8
- *
9
- * Features:
10
- * - Multiple product data sources (cart, browsed, purchased)
11
- * - Configurable card composition (image, name, price, quantity, button)
12
- * - Orientation control (horizontal/vertical)
13
- * - Price formatting and currency display options
14
- * - Product name trimming
15
- * - Onboarding support
16
- */
17
3
  export declare class ItemsBlock extends Block {
18
4
  getId(): string;
19
5
  getIcon(): string;
@@ -13,7 +13,7 @@ export declare class ItemsBlockControl extends CommonControl {
13
13
  _getOrientation(): string;
14
14
  _getItemInCart(): string;
15
15
  _onOrientationChange(value: string): void;
16
- _onItemsTypeChange(value: string): void;
16
+ _onItemsTypeChange(value: string, oldValue: string): void;
17
17
  _onItemIdsChange(value: string): void;
18
18
  _initializeSelectItems(): void;
19
19
  _listenToFormUpdates(): void;
@@ -31,10 +31,7 @@ export declare class ItemsBlockControl extends CommonControl {
31
31
  _updatePrice(price: string): void;
32
32
  _updateOriginalPrice(originalPrice: string): void;
33
33
  _updateQuantity(quantity: string): void;
34
- /**
35
- * @todo Optimize template reordering for performance.
36
- * @description Reorders the template structure based on current orientation and visibility settings.
37
- */
34
+ _updateButton(button: string): void;
38
35
  _reOrderTemplate(): void;
39
36
  _updateDataTypeAttributes(itemsType: ProductType): void;
40
37
  _updateDataNumberAttributes(itemId: string): void;
@@ -1,4 +1,3 @@
1
- export declare const templateFirstLine = "<td align=\"center\" class=\"ins-product-td items-block items-block-v2\">";
2
1
  export declare const configAttributes: {
3
2
  TYPE: string;
4
3
  ITEMS_INDEX_SELECT_CONTROL_VALUE: string;
@@ -159,4 +158,3 @@ export declare const productPairs: {
159
158
  };
160
159
  };
161
160
  };
162
- export declare const itemsBlockDynamicVariables: string[];
@@ -10,15 +10,7 @@ type TemplateParameters = {
10
10
  formattedPrice?: boolean;
11
11
  };
12
12
  /**
13
- * Generates the default template for the Items Block.
14
- * @param params - Template parameters including orientation, items type, item ID, and formatting options
15
- * @param params.orientation - Layout orientation ('vertical' or 'horizontal')
16
- * @param params.itemsType - Product data source type ('CART_ITEMS', 'BROWSED_ITEMS', or 'PURCHASED_ITEMS')
17
- * @param params.itemId - The merge tag for the item (e.g., '{{Abandoned Cart Item (1) Url}}')
18
- * @param params.currencySymbol - Currency symbol to display (e.g., 'USD')
19
- * @param params.currencyLocation - Currency position ('0' for before, '1' for after)
20
- * @param params.formattedPrice - Whether to use formatted price display
21
- * @returns HTML template string for the Items Block
13
+ * @returns The template for the default checkbox block
22
14
  */
23
15
  export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, formattedPrice, }: TemplateParameters): string;
24
16
  export default migrationTemplate;
@@ -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=\"radio-button-v2 esd-block-ra esd-radio-button-block esd-extension-block es-p10t es-p10b es-p30r 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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.52ded25",
3
+ "version": "1.0.3-beta.5361682",
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",
@@ -27,7 +27,14 @@
27
27
  "test:visual-update": "npx playwright test --update-snapshots --reporter html",
28
28
  "prepare": "husky"
29
29
  },
30
- "keywords": [],
30
+ "keywords": [
31
+ "vue",
32
+ "typescript",
33
+ "email",
34
+ "editor",
35
+ "stripo",
36
+ "useinsider"
37
+ ],
31
38
  "author": "",
32
39
  "license": "ISC",
33
40
  "dependencies": {
@@ -41,12 +48,10 @@
41
48
  "vue": "2.7.14"
42
49
  },
43
50
  "devDependencies": {
44
- "@commitlint/cli": "20.2.0",
45
- "@commitlint/config-conventional": "20.2.0",
46
51
  "@cspell/eslint-plugin": "8.17.5",
47
52
  "@eslint/eslintrc": "3.3.0",
48
53
  "@eslint/js": "8.57.1",
49
- "@playwright/test": "1.57.0",
54
+ "@playwright/test": "1.55.0",
50
55
  "@stylistic/eslint-plugin": "3.1.0",
51
56
  "@stylistic/eslint-plugin-migrate": "3.1.0",
52
57
  "@types/eslint": "8.56.12",
@@ -1,6 +0,0 @@
1
- import t from "./_getNative.js";
2
- import a from "./_root.js";
3
- var e = t(a, "DataView");
4
- export {
5
- e as default
6
- };
@@ -1,6 +0,0 @@
1
- import o from "./_getNative.js";
2
- import r from "./_root.js";
3
- var m = o(r, "Promise");
4
- export {
5
- m as default
6
- };
@@ -1,6 +0,0 @@
1
- import t from "./_getNative.js";
2
- import o from "./_root.js";
3
- var a = t(o, "Set");
4
- export {
5
- a as default
6
- };
@@ -1,13 +0,0 @@
1
- import p from "./_MapCache.js";
2
- import h from "./_setCacheAdd.js";
3
- import r from "./_setCacheHas.js";
4
- function e(t) {
5
- var o = -1, a = t == null ? 0 : t.length;
6
- for (this.__data__ = new p(); ++o < a; )
7
- this.add(t[o]);
8
- }
9
- e.prototype.add = e.prototype.push = h;
10
- e.prototype.has = r;
11
- export {
12
- e as default
13
- };
@@ -1,6 +0,0 @@
1
- import a from "./_getNative.js";
2
- import o from "./_root.js";
3
- var e = a(o, "WeakMap");
4
- export {
5
- e as default
6
- };
@@ -1,10 +0,0 @@
1
- function d(e, i) {
2
- for (var n = -1, r = e == null ? 0 : e.length, u = 0, t = []; ++n < r; ) {
3
- var l = e[n];
4
- i(l, n, e) && (t[u++] = l);
5
- }
6
- return t;
7
- }
8
- export {
9
- d as default
10
- };
@@ -1,8 +0,0 @@
1
- function h(e, u) {
2
- for (var l = -1, n = e == null ? 0 : e.length, t = Array(n); ++l < n; )
3
- t[l] = u(e[l], l, e);
4
- return t;
5
- }
6
- export {
7
- h as default
8
- };
@@ -1,8 +0,0 @@
1
- function l(e, n) {
2
- for (var t = -1, h = n.length, f = e.length; ++t < h; )
3
- e[f + t] = n[t];
4
- return e;
5
- }
6
- export {
7
- l as default
8
- };
@@ -1,9 +0,0 @@
1
- function u(e, t) {
2
- for (var n = -1, l = e == null ? 0 : e.length; ++n < l; )
3
- if (t(e[n], n, e))
4
- return !0;
5
- return !1;
6
- }
7
- export {
8
- u as default
9
- };
@@ -1,6 +0,0 @@
1
- import a from "./_baseForOwn.js";
2
- import r from "./_createBaseEach.js";
3
- var t = r(a);
4
- export {
5
- t as default
6
- };
@@ -1,13 +0,0 @@
1
- import a from "./_arrayPush.js";
2
- import e from "./_isFlattenable.js";
3
- function l(h, m, t, g, n) {
4
- var o = -1, f = h.length;
5
- for (t || (t = e), n || (n = []); ++o < f; ) {
6
- var i = h[o];
7
- t(i) ? a(n, i) : n[n.length] = i;
8
- }
9
- return n;
10
- }
11
- export {
12
- l as default
13
- };
@@ -1,8 +0,0 @@
1
- import e from "./_baseFor.js";
2
- import t from "./keys.js";
3
- function m(r, o) {
4
- return r && e(r, o, t);
5
- }
6
- export {
7
- m as default
8
- };
@@ -1,11 +0,0 @@
1
- import l from "./_castPath.js";
2
- import f from "./_toKey.js";
3
- function d(n, e) {
4
- e = l(e, n);
5
- for (var r = 0, i = e.length; n != null && r < i; )
6
- n = n[f(e[r++])];
7
- return r && r == i ? n : void 0;
8
- }
9
- export {
10
- d as default
11
- };
@@ -1,9 +0,0 @@
1
- import e from "./_arrayPush.js";
2
- import u from "./isArray.js";
3
- function l(r, s, t) {
4
- var a = s(r);
5
- return u(r) ? a : e(a, t(r));
6
- }
7
- export {
8
- l as default
9
- };
@@ -1,6 +0,0 @@
1
- function e(n, a) {
2
- return n != null && a in Object(n);
3
- }
4
- export {
5
- e as default
6
- };
@@ -1,8 +0,0 @@
1
- import u from "./_baseIsEqualDeep.js";
2
- import r from "./isObjectLike.js";
3
- function m(i, n, f, s, t) {
4
- return i === n ? !0 : i == null || n == null || !r(i) && !r(n) ? i !== i && n !== n : u(i, n, f, s, m, t);
5
- }
6
- export {
7
- m as default
8
- };
@@ -1,32 +0,0 @@
1
- import v from "./_Stack.js";
2
- import B from "./_equalArrays.js";
3
- import E from "./_equalByTag.js";
4
- import L from "./_equalObjects.js";
5
- import _ from "./_getTag.js";
6
- import O from "./isArray.js";
7
- import u from "./isBuffer.js";
8
- import R from "./isTypedArray.js";
9
- var S = 1, w = "[object Arguments]", P = "[object Array]", l = "[object Object]", q = Object.prototype, I = q.hasOwnProperty;
10
- function K(r, f, p, i, g, a) {
11
- var m = O(r), j = O(f), e = m ? P : _(r), o = j ? P : _(f);
12
- e = e == w ? l : e, o = o == w ? l : o;
13
- var A = e == l, d = o == l, n = e == o;
14
- if (n && u(r)) {
15
- if (!u(f))
16
- return !1;
17
- m = !0, A = !1;
18
- }
19
- if (n && !A)
20
- return a || (a = new v()), m || R(r) ? B(r, f, p, i, g, a) : E(r, f, e, p, i, g, a);
21
- if (!(p & S)) {
22
- var y = A && I.call(r, "__wrapped__"), T = d && I.call(f, "__wrapped__");
23
- if (y || T) {
24
- var s = y ? r.value() : r, t = T ? f.value() : f;
25
- return a || (a = new v()), g(s, t, p, i, a);
26
- }
27
- }
28
- return n ? (a || (a = new v()), L(r, f, p, i, g, a)) : !1;
29
- }
30
- export {
31
- K as default
32
- };
@@ -1,29 +0,0 @@
1
- import R from "./_Stack.js";
2
- import O from "./_baseIsEqual.js";
3
- var _ = 1, h = 2;
4
- function L(e, p, i, v) {
5
- var n = i.length, f = n;
6
- if (e == null)
7
- return !f;
8
- for (e = Object(e); n--; ) {
9
- var r = i[n];
10
- if (r[2] ? r[1] !== e[r[0]] : !(r[0] in e))
11
- return !1;
12
- }
13
- for (; ++n < f; ) {
14
- r = i[n];
15
- var u = r[0], l = e[u], A = r[1];
16
- if (r[2]) {
17
- if (l === void 0 && !(u in e))
18
- return !1;
19
- } else {
20
- var E = new R(), s;
21
- if (!(s === void 0 ? O(A, l, _ | h, v, E) : s))
22
- return !1;
23
- }
24
- }
25
- return !0;
26
- }
27
- export {
28
- L as default
29
- };
@@ -1,11 +0,0 @@
1
- import t from "./_baseMatches.js";
2
- import o from "./_baseMatchesProperty.js";
3
- import f from "./identity.js";
4
- import i from "./isArray.js";
5
- import e from "./property.js";
6
- function c(r) {
7
- return typeof r == "function" ? r : r == null ? f : typeof r == "object" ? i(r) ? o(r[0], r[1]) : t(r) : e(r);
8
- }
9
- export {
10
- c as default
11
- };
@@ -1,14 +0,0 @@
1
- import a from "./_isPrototype.js";
2
- import e from "./_nativeKeys.js";
3
- var s = Object.prototype, n = s.hasOwnProperty;
4
- function f(r) {
5
- if (!a(r))
6
- return e(r);
7
- var o = [];
8
- for (var t in Object(r))
9
- n.call(r, t) && t != "constructor" && o.push(t);
10
- return o;
11
- }
12
- export {
13
- f as default
14
- };
@@ -1,11 +0,0 @@
1
- import s from "./_baseEach.js";
2
- import u from "./isArrayLike.js";
3
- function o(r, e) {
4
- var t = -1, a = u(r) ? Array(r.length) : [];
5
- return s(r, function(f, i, n) {
6
- a[++t] = e(f, i, n);
7
- }), a;
8
- }
9
- export {
10
- o as default
11
- };
@@ -1,12 +0,0 @@
1
- import e from "./_baseIsMatch.js";
2
- import m from "./_getMatchData.js";
3
- import n from "./_matchesStrictComparable.js";
4
- function h(a) {
5
- var t = m(a);
6
- return t.length == 1 && t[0][2] ? n(t[0][0], t[0][1]) : function(r) {
7
- return r === a || e(r, a, t);
8
- };
9
- }
10
- export {
11
- h as default
12
- };
@@ -1,17 +0,0 @@
1
- import i from "./_baseIsEqual.js";
2
- import e from "./get.js";
3
- import f from "./hasIn.js";
4
- import n from "./_isKey.js";
5
- import a from "./_isStrictComparable.js";
6
- import p from "./_matchesStrictComparable.js";
7
- import s from "./_toKey.js";
8
- var u = 1, A = 2;
9
- function y(r, o) {
10
- return n(r) && a(o) ? p(s(r), o) : function(m) {
11
- var t = e(m, r);
12
- return t === void 0 && t === o ? f(m, r) : i(o, t, u | A);
13
- };
14
- }
15
- export {
16
- y as default
17
- };