@useinsider/guido 3.8.1-beta.fc167ba → 3.8.2-beta.06011ff

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 (24) hide show
  1. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +8 -8
  2. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +15 -12
  3. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  4. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +16 -15
  5. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +42 -37
  7. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  8. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +40 -37
  9. package/dist/composables/usePreviewInteractionGuard.js +17 -0
  10. package/dist/composables/useSave.js +14 -14
  11. package/dist/composables/validators/useUnsubscribeBlockValidator.js +26 -17
  12. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +22 -21
  13. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +62 -4
  14. package/dist/extensions/Blocks/Unsubscribe/block.js +40 -37
  15. package/dist/extensions/Blocks/Unsubscribe/control.js +19 -16
  16. package/dist/extensions/Blocks/common-control.js +58 -45
  17. package/dist/guido.css +1 -1
  18. package/dist/src/composables/usePreviewInteractionGuard.d.ts +3 -0
  19. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +1 -0
  20. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +1 -1
  21. package/dist/src/extensions/Blocks/common-control.d.ts +7 -0
  22. package/dist/src/stores/unsubscribe.d.ts +11 -1
  23. package/dist/stores/unsubscribe.js +8 -7
  24. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  var c = Object.defineProperty;
2
- var i = (s, r, e) => r in s ? c(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
- var u = (s, r, e) => i(s, typeof r != "symbol" ? r + "" : r, e);
2
+ var i = (s, a, e) => a in s ? c(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e;
3
+ var T = (s, a, e) => i(s, typeof a != "symbol" ? a + "" : a, e);
4
4
  import { Control as I, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- class d extends I {
5
+ class _ extends I {
6
6
  constructor() {
7
7
  super(...arguments);
8
- u(this, "currentNode");
9
- u(this, "lastBlockInstanceId", null);
8
+ T(this, "currentNode");
9
+ T(this, "lastBlockInstanceId", null);
10
10
  }
11
11
  getContainer() {
12
12
  var e;
@@ -47,15 +47,15 @@ class d extends I {
47
47
  const t = this.getBlockInstanceId();
48
48
  if (!t)
49
49
  return !1;
50
- const o = t !== this.lastBlockInstanceId;
51
- return e(), o && (this.lastBlockInstanceId = t), o;
50
+ const E = t !== this.lastBlockInstanceId;
51
+ return e(), E && (this.lastBlockInstanceId = t), E;
52
52
  }
53
- _GuLabel({ text: e, name: t = "", hint: o }) {
53
+ _GuLabel({ text: e, name: t = "", hint: E }) {
54
54
  return `
55
55
  <${n.LABEL}
56
56
  ${$.LABEL.text}="${e}"
57
57
  ${$.LABEL.name}="${t || `${e} Label`}"
58
- ${o ? `${$.LABEL.hint}="${o}"` : ""}>
58
+ ${E ? `${$.LABEL.hint}="${E}"` : ""}>
59
59
  </${n.LABEL}>
60
60
  `;
61
61
  }
@@ -73,7 +73,7 @@ class d extends I {
73
73
  * Use in getTemplate() — the icon is registered in a hidden store so Stripo initializes it.
74
74
  * Pair with _setInfoMessageValue() in onRender() to set the text content.
75
75
  */
76
- _GuOnPageMessage({ name: e, icon: t = "not-found", type: o = "info" }) {
76
+ _GuOnPageMessage({ name: e, icon: t = "not-found", type: E = "info" }) {
77
77
  return `
78
78
  <div data-info-message="${e}" style="display: none; padding: 16px 16px 0;">
79
79
  <div class="icon-store" style="display: none;">
@@ -81,7 +81,7 @@ class d extends I {
81
81
  ${this._GuIcon({ src: t, className: "icon" })}
82
82
  </div>
83
83
  </div>
84
- ${this._GuMessage({ name: e, type: o })}
84
+ ${this._GuMessage({ name: e, type: E })}
85
85
  </div>
86
86
  `;
87
87
  }
@@ -91,7 +91,7 @@ class d extends I {
91
91
  * and combines it with the text in Stripo's alert-message layout.
92
92
  */
93
93
  _setInfoMessageValue(e, t) {
94
- const o = this.getContainer(), E = o.querySelector(`[data-icon-key="${e}"]`), a = E == null ? void 0 : E.querySelector("ue-icon-component"), l = (a == null ? void 0 : a.outerHTML) ?? "";
94
+ const E = this.getContainer(), o = E.querySelector(`[data-icon-key="${e}"]`), r = o == null ? void 0 : o.querySelector("ue-icon-component"), l = (r == null ? void 0 : r.outerHTML) ?? "";
95
95
  this.api.setUIEAttribute(
96
96
  e,
97
97
  "value",
@@ -104,8 +104,8 @@ class d extends I {
104
104
  </div>
105
105
  `
106
106
  );
107
- const T = o.querySelector(`[data-info-message="${e}"]`);
108
- T && (T.style.display = "");
107
+ const u = E.querySelector(`[data-info-message="${e}"]`);
108
+ u && (u.style.display = "");
109
109
  }
110
110
  _GuToggle(e) {
111
111
  return `
@@ -121,59 +121,59 @@ class d extends I {
121
121
  ${$.SELECT_ITEM.value}="${t}">
122
122
  </${n.SELECT_ITEM}>`;
123
123
  }
124
- _GuSelect({ name: e, placeholder: t, options: o, className: E = "es-180w" }) {
124
+ _GuSelect({ name: e, placeholder: t, options: E, className: o = "es-180w" }) {
125
125
  return `
126
126
  <${n.SELECTPICKER}
127
- class="${E}"
127
+ class="${o}"
128
128
  ${$.SELECTPICKER.name}="${e}"
129
129
  ${$.SELECTPICKER.placeholder}="${t}">
130
- ${o.map((a) => this._GuSelectItem(a)).join("")}
130
+ ${E.map((r) => this._GuSelectItem(r)).join("")}
131
131
  </${n.SELECTPICKER}>
132
132
  `;
133
133
  }
134
- _GuTextInput({ name: e, placeholder: t, className: o = "", disabled: E = !1 }) {
134
+ _GuTextInput({ name: e, placeholder: t, className: E = "", disabled: o = !1 }) {
135
135
  return `
136
136
  <${n.TEXT}
137
- class=${o}
137
+ class=${E}
138
138
  ${$.TEXT.name}="${e}"
139
139
  placeholder="${t || e}"
140
- ${E ? `${$.TEXT.disabled}="true"` : ""}>
140
+ ${o ? `${$.TEXT.disabled}="true"` : ""}>
141
141
  </${n.TEXT}>
142
142
  `;
143
143
  }
144
- _GuCounter({ name: e, maxValue: t, minValue: o = 1, step: E = 1 }) {
144
+ _GuCounter({ name: e, maxValue: t, minValue: E = 1, step: o = 1 }) {
145
145
  return `
146
146
  <${n.COUNTER}
147
147
  ${$.COUNTER.name}="${e}"
148
- ${$.COUNTER.minValue}="${o}"
148
+ ${$.COUNTER.minValue}="${E}"
149
149
  ${$.COUNTER.maxValue}="${t}"
150
- ${$.COUNTER.step}="${E}">
150
+ ${$.COUNTER.step}="${o}">
151
151
  </${n.COUNTER}>
152
152
  `;
153
153
  }
154
- _GuRadioButtonItem({ text: e, value: t, icon: o }) {
154
+ _GuRadioButtonItem({ text: e, value: t, icon: E }) {
155
155
  return `
156
156
  <${n.RADIO_ITEM}
157
157
  ${$.RADIO_ITEM.value}="${t}"
158
158
  ${e ? `${$.RADIO_ITEM.text}="${e}"` : ""}
159
- ${o ? `${$.RADIO_ITEM.icon}="${o}"` : ""}>
159
+ ${E ? `${$.RADIO_ITEM.icon}="${E}"` : ""}>
160
160
  </${n.RADIO_ITEM}>
161
161
  `;
162
162
  }
163
- _GuRadioButton({ name: e, buttons: t, id: o = "" }) {
163
+ _GuRadioButton({ name: e, buttons: t, id: E = "" }) {
164
164
  return `
165
165
  <${n.RADIO_BUTTONS}
166
- ${o ? `id="${o}"` : ""}
166
+ ${E ? `id="${E}"` : ""}
167
167
  ${$.RADIO_BUTTONS.name}="${e}">
168
- ${t.map((E) => this._GuRadioButtonItem(E)).join("")}
168
+ ${t.map((o) => this._GuRadioButtonItem(o)).join("")}
169
169
  </${n.RADIO_BUTTONS}>
170
170
  `;
171
171
  }
172
- _GuButton({ name: e, label: t, id: o = "" }) {
172
+ _GuButton({ name: e, label: t, id: E = "" }) {
173
173
  return `
174
174
  <${n.BUTTON}
175
175
  ${$.BUTTON.name}="${e}"
176
- ${o ? `id="${o}"` : ""}
176
+ ${E ? `id="${E}"` : ""}
177
177
  ${$.BUTTON.caption}="${t}"}>
178
178
  </${n.BUTTON}>
179
179
  `;
@@ -191,10 +191,10 @@ class d extends I {
191
191
  * @param param0
192
192
  * @returns It returns a button with an icon.
193
193
  */
194
- _GuIconButton({ name: e, icon: t, className: o = "" }) {
194
+ _GuIconButton({ name: e, icon: t, className: E = "" }) {
195
195
  return `
196
196
  <${n.BUTTON}
197
- class="${o}"
197
+ class="${E}"
198
198
  ${$.BUTTON.name}="${e}"
199
199
  ${$.BUTTON.icon}="${t}">
200
200
  </${n.BUTTON}>
@@ -222,19 +222,19 @@ class d extends I {
222
222
  * @returns HTML string for the orderable control
223
223
  */
224
224
  _GuOrderable(e, t) {
225
- let o = "";
226
- t.forEach((a) => {
225
+ let E = "";
226
+ t.forEach((r) => {
227
227
  const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
228
- o += `
229
- <${n.ORDERABLE_ITEM} ${l}="${a.key}">
230
- ${a.content}
228
+ E += `
229
+ <${n.ORDERABLE_ITEM} ${l}="${r.key}">
230
+ ${r.content}
231
231
  </${n.ORDERABLE_ITEM}>
232
232
  `;
233
233
  });
234
- const E = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
234
+ const o = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
235
235
  return `
236
- <${n.ORDERABLE} ${E}="${e}">
237
- ${o}
236
+ <${n.ORDERABLE} ${o}="${e}">
237
+ ${E}
238
238
  </${n.ORDERABLE}>
239
239
  `;
240
240
  }
@@ -275,16 +275,16 @@ class d extends I {
275
275
  `;
276
276
  }
277
277
  _GuRadioButtons(e, t) {
278
- const o = t.map((E) => `
278
+ const E = t.map((o) => `
279
279
  <${n.RADIO_ITEM}
280
- ${$.RADIO_ITEM.text}="${E.text}"
281
- ${$.RADIO_ITEM.value}="${E.value}">
280
+ ${$.RADIO_ITEM.text}="${o.text}"
281
+ ${$.RADIO_ITEM.value}="${o.value}">
282
282
  </${n.RADIO_ITEM}>
283
283
  `).join("");
284
284
  return `
285
285
  <${n.RADIO_BUTTONS}
286
286
  ${$.RADIO_BUTTONS.name}="${e}">
287
- ${o}
287
+ ${E}
288
288
  </${n.RADIO_BUTTONS}>
289
289
  `;
290
290
  }
@@ -296,7 +296,20 @@ class d extends I {
296
296
  </${n.CHECKBOX}>
297
297
  `;
298
298
  }
299
+ // Tag/chips input (Stripo MULTIPLE_SELECT): add-by-Enter, remove-by-×.
300
+ // Value is read/written as a string[] via updateValues / onValueChanged.
301
+ _GuMultiSelect({ name: e, placeholder: t = "", className: E = "", disabled: o = !1 }) {
302
+ const r = [E, o ? "" : "click-enabled"].filter(Boolean).join(" ");
303
+ return `
304
+ <${n.MULTIPLE_SELECT}
305
+ class="${r}"
306
+ ${$.MULTIPLE_SELECT.name}="${e}"
307
+ ${$.MULTIPLE_SELECT.placeholder}="${t}"
308
+ ${o ? `${$.MULTIPLE_SELECT.disabled}="true"` : ""}>
309
+ </${n.MULTIPLE_SELECT}>
310
+ `;
311
+ }
299
312
  }
300
313
  export {
301
- d as CommonControl
314
+ _ as CommonControl
302
315
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-82128f7d]{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-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-f6a8cb4c]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-f6a8cb4c]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-f6a8cb4c]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-f6a8cb4c]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-f6a8cb4c]{object-fit:cover;transform:scale(1)}[data-v-18e1220a] .guido__verion-history-view-option-selection-desktop svg,[data-v-18e1220a] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-18e1220a] .in-segments-wrapper__button_selected,[data-v-18e1220a] .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-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-82128f7d]{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-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-669fe7cf]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-669fe7cf]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-669fe7cf]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-669fe7cf]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-669fe7cf]{object-fit:cover;transform:scale(1)}[data-v-7a305bb2] .guido__verion-history-view-option-selection-desktop svg,[data-v-7a305bb2] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-7a305bb2] .in-segments-wrapper__button_selected,[data-v-7a305bb2] .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-06afaecb]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-06afaecb]{min-height:504px}.iframe-wrapper[data-v-cbafc185]{width:258px}.iframe-scaled[data-v-cbafc185]{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,3 @@
1
+ export declare const usePreviewInteractionGuard: () => {
2
+ blockPreviewInteractions: (iframe: HTMLIFrameElement) => void;
3
+ };
@@ -1,3 +1,4 @@
1
1
  export declare const useUnsubscribeBlockValidator: () => {
2
2
  validateUnsubscribeBlockUniqueness: (html: string) => boolean;
3
+ validateUnsubscribeBlockHasTemplate: (html: string) => boolean;
3
4
  };
@@ -24,6 +24,6 @@ export declare class AlgorithmControl extends CommonControl {
24
24
  _initializeSelectItems(): void;
25
25
  _setProductIdsVisibility(strategy?: string): void;
26
26
  _onAlgorithmChange(value: string): void;
27
- _onProductIdsChange(value: string): void;
27
+ _onProductIdsChange(value: string[]): void;
28
28
  _listenToFormUpdates(): void;
29
29
  }
@@ -6,6 +6,12 @@ interface TextInputProps {
6
6
  className?: string;
7
7
  disabled?: boolean;
8
8
  }
9
+ interface MultiSelectProps {
10
+ name: string;
11
+ placeholder?: string;
12
+ className?: string;
13
+ disabled?: boolean;
14
+ }
9
15
  interface LabelProps {
10
16
  text: string;
11
17
  name?: string;
@@ -145,5 +151,6 @@ export declare abstract class CommonControl extends Control {
145
151
  value: string;
146
152
  }[]): string;
147
153
  _GuCheckbox(name: string, caption: string): string;
154
+ _GuMultiSelect({ name, placeholder, className, disabled }: MultiSelectProps): string;
148
155
  }
149
156
  export {};
@@ -10,6 +10,7 @@ interface StoreState {
10
10
  typeSelectionDrawerStatus: boolean;
11
11
  isGlobalUnsubscribeDisabled: boolean;
12
12
  isSubscriptionPreferencesCenterDisabled: boolean;
13
+ pendingBlockId: string | null;
13
14
  }
14
15
  export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guidoUnsubscribe", StoreState, {
15
16
  getSelectedCollection: (state: {
@@ -35,6 +36,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
35
36
  typeSelectionDrawerStatus: boolean;
36
37
  isGlobalUnsubscribeDisabled: boolean;
37
38
  isSubscriptionPreferencesCenterDisabled: boolean;
39
+ pendingBlockId: string | null;
38
40
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
39
41
  getSelectedTemplateByActiveType: (state: {
40
42
  templates: {
@@ -59,6 +61,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
59
61
  typeSelectionDrawerStatus: boolean;
60
62
  isGlobalUnsubscribeDisabled: boolean;
61
63
  isSubscriptionPreferencesCenterDisabled: boolean;
64
+ pendingBlockId: string | null;
62
65
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
63
66
  getTemplatesByActiveType: (state: {
64
67
  templates: {
@@ -83,6 +86,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
83
86
  typeSelectionDrawerStatus: boolean;
84
87
  isGlobalUnsubscribeDisabled: boolean;
85
88
  isSubscriptionPreferencesCenterDisabled: boolean;
89
+ pendingBlockId: string | null;
86
90
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => {
87
91
  id: number;
88
92
  name: string;
@@ -119,6 +123,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
119
123
  typeSelectionDrawerStatus: boolean;
120
124
  isGlobalUnsubscribeDisabled: boolean;
121
125
  isSubscriptionPreferencesCenterDisabled: boolean;
126
+ pendingBlockId: string | null;
122
127
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => (id: number) => string;
123
128
  getSelectedUnsubscribePagesByCollection: (state: {
124
129
  templates: {
@@ -143,6 +148,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
143
148
  typeSelectionDrawerStatus: boolean;
144
149
  isGlobalUnsubscribeDisabled: boolean;
145
150
  isSubscriptionPreferencesCenterDisabled: boolean;
151
+ pendingBlockId: string | null;
146
152
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => (collectionType: number) => number[];
147
153
  isActiveTypeFirstInCollection: (state: {
148
154
  templates: {
@@ -167,6 +173,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
167
173
  typeSelectionDrawerStatus: boolean;
168
174
  isGlobalUnsubscribeDisabled: boolean;
169
175
  isSubscriptionPreferencesCenterDisabled: boolean;
176
+ pendingBlockId: string | null;
170
177
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
171
178
  isActiveTypeLastInCollection: (state: {
172
179
  templates: {
@@ -191,6 +198,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
191
198
  typeSelectionDrawerStatus: boolean;
192
199
  isGlobalUnsubscribeDisabled: boolean;
193
200
  isSubscriptionPreferencesCenterDisabled: boolean;
201
+ pendingBlockId: string | null;
194
202
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
195
203
  hasTemplatesByCollectionType: (state: {
196
204
  templates: {
@@ -215,6 +223,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
215
223
  typeSelectionDrawerStatus: boolean;
216
224
  isGlobalUnsubscribeDisabled: boolean;
217
225
  isSubscriptionPreferencesCenterDisabled: boolean;
226
+ pendingBlockId: string | null;
218
227
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => Record<number, boolean>;
219
228
  unsubscribePagesStatus: (state: {
220
229
  templates: {
@@ -239,10 +248,11 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
239
248
  typeSelectionDrawerStatus: boolean;
240
249
  isGlobalUnsubscribeDisabled: boolean;
241
250
  isSubscriptionPreferencesCenterDisabled: boolean;
251
+ pendingBlockId: string | null;
242
252
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
243
253
  }, {
244
254
  $reset(): void;
245
- fetchTemplates(): Promise<void>;
255
+ fetchTemplates(force?: boolean): Promise<void>;
246
256
  setCollection(collectionType: number): void;
247
257
  setCollectionWithoutAutoSelection(collectionType: number): void;
248
258
  setSelectedTemplate(template: number): void;
@@ -1,6 +1,6 @@
1
1
  import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
2
2
  import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
3
- import { defineStore as h } from "pinia";
3
+ import { defineStore as u } from "pinia";
4
4
  let o = null;
5
5
  const r = () => ({
6
6
  templates: [],
@@ -12,8 +12,9 @@ const r = () => ({
12
12
  pageSelectionDrawerStatus: !1,
13
13
  typeSelectionDrawerStatus: !1,
14
14
  isGlobalUnsubscribeDisabled: !1,
15
- isSubscriptionPreferencesCenterDisabled: !1
16
- }), b = h("guidoUnsubscribe", {
15
+ isSubscriptionPreferencesCenterDisabled: !1,
16
+ pendingBlockId: null
17
+ }), b = u("guidoUnsubscribe", {
17
18
  state: () => r(),
18
19
  getters: {
19
20
  getSelectedCollection: (e) => i[e.selectedCollectionType],
@@ -62,10 +63,10 @@ const r = () => ({
62
63
  selectedUnsubscribePages: t
63
64
  });
64
65
  },
65
- async fetchTemplates() {
66
- this.templates.length || (o || (o = (async () => {
67
- const { getUnsubscribePages: e } = d();
68
- this.templates = await e();
66
+ async fetchTemplates(e = !1) {
67
+ !e && this.templates.length || ((e || !o) && (o = (async () => {
68
+ const { getUnsubscribePages: t } = d();
69
+ this.templates = await t();
69
70
  })().finally(() => {
70
71
  o = null;
71
72
  })), await o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.8.1-beta.fc167ba",
3
+ "version": "3.8.2-beta.06011ff",
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",