@useinsider/guido 1.0.3-beta.09a6feb → 1.0.3-beta.0d0bb85

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.
package/README.md CHANGED
@@ -82,12 +82,10 @@ export default {
82
82
  translationsPath: 'window.trans.en',
83
83
  htmlCompilerRules: [],
84
84
  ignoreDefaultHtmlCompilerRules: false,
85
- backButtonLabel?: "Back to Design",
86
85
  features: {
87
86
  dynamicContent: true,
88
87
  saveAsTemplate: true,
89
- versionHistory: true,
90
- testMessage: true
88
+ versionHistory: true
91
89
  }
92
90
  },
93
91
  dynamicContentModalVisible: false
@@ -167,7 +165,6 @@ export default {
167
165
  | `on-change` | void | It Fires once for managing leave modal etc. |
168
166
  | `ready` | void | Fired when the editor is ready and template is loaded |
169
167
  | `onboarding-finished` | void | Fired when the onboarding popup is dismissed or completed, allowing parent applications to track onboarding state |
170
- | `test-email:click` | - | Fired when user clicks the test email button in the header |
171
168
 
172
169
  ### Guido Exposed Methods
173
170
  ```typescript
@@ -197,11 +194,6 @@ interface GuidoConfig {
197
194
  dynamicContent: boolean;
198
195
  saveAsTemplate: boolean;
199
196
  versionHistory: boolean;
200
- testMessage: boolean;
201
- };
202
- blocks?: {
203
- excludeDefaults?: GuidoBlockType[];
204
- includeCustoms?: GuidoCustomBlockType[];
205
197
  };
206
198
  }
207
199
  ```
@@ -216,9 +208,6 @@ interface GuidoConfig {
216
208
  | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
217
209
  | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
218
210
  | `features.versionHistory` | `boolean` | `true` | Enable version history feature |
219
- | `blocks` | `BlocksConfig` | `{ excludeDefaults: [], includeCustoms: [] }` | Block configuration for excluding default blocks and including custom blocks. See [Blocks Configuration](#-blocks-configuration) section below |
220
- | `blocks.excludeDefaults` | `GuidoBlockType[]` | `[]` | Array of default Stripo blocks to exclude from the editor |
221
- | `blocks.includeCustoms` | `GuidoCustomBlockType[]` | `[]` | Array of custom blocks to include in the editor |
222
211
 
223
212
  ```typescript
224
213
  interface DynamicContent {
@@ -235,128 +224,6 @@ interface DynamicContent {
235
224
  | `text` | `string` | '' | Visible value of the dynamic content |
236
225
  | `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
237
226
 
238
- ## 🧱 Blocks Configuration
239
-
240
- Guido allows you to customize which blocks are available in the editor. You can exclude default Stripo blocks and selectively include custom blocks to create tailored editing experiences for different product types.
241
-
242
- ### Block Types
243
-
244
- #### Default Blocks (GuidoBlockType)
245
-
246
- These are the standard Stripo email editor blocks that can be excluded:
247
-
248
- ```typescript
249
- type GuidoBlockType =
250
- | 'amp-accordion' // AMP accordion component
251
- | 'amp-carousel' // AMP image carousel
252
- | 'amp-form-controls' // AMP form elements
253
- | 'banner-block' // Banner/hero section
254
- | 'button-block' // Call-to-action buttons
255
- | 'html-block' // Custom HTML
256
- | 'image-block' // Image elements
257
- | 'menu-block' // Navigation menu
258
- | 'social-block' // Social media links
259
- | 'spacer-block' // Vertical spacing
260
- | 'text-block' // Text content
261
- | 'timer-block' // Countdown timer
262
- | 'video-block' // Video embeds
263
- ```
264
-
265
- #### Custom Blocks (GuidoCustomBlockType)
266
-
267
- These are custom blocks that can be selectively included:
268
-
269
- ```typescript
270
- type GuidoCustomBlockType =
271
- | 'dynamic-content' // Dynamic content merge tags
272
- | 'checkbox-block' // Checkbox form input
273
- | 'radio-button-block' // Radio button form input
274
- | 'recommendation-block' // Product recommendations
275
- | 'unsubscribe-block' // Unsubscribe link
276
- | 'coupon-block' // Coupon/promo code
277
- | 'items-block' // Cart items display
278
- ```
279
-
280
- ### Configuration Examples
281
-
282
- #### Example 1: Exclude Specific Default Blocks
283
-
284
- Disable button, image, and video blocks while keeping all custom blocks:
285
-
286
- ```typescript
287
- const guidoConfig = {
288
- translationsPath: 'window.trans.en',
289
- features: {
290
- dynamicContent: true,
291
- saveAsTemplate: true,
292
- versionHistory: true,
293
- testMessage: true
294
- },
295
- blocks: {
296
- excludeDefaults: ['button-block', 'image-block', 'video-block']
297
- }
298
- };
299
- ```
300
-
301
- **Result:**
302
- - Button, Image, Video blocks disabled
303
- - All other default blocks enabled
304
- - All custom blocks are disabled.
305
-
306
- #### Example 2: Include Only Specific Custom Blocks
307
-
308
- Enable only coupon and recommendation blocks:
309
-
310
- ```typescript
311
- const guidoConfig = {
312
- translationsPath: 'window.trans.en',
313
- features: {
314
- dynamicContent: true,
315
- saveAsTemplate: true,
316
- versionHistory: true,
317
- testMessage: true
318
- },
319
- blocks: {
320
- includeCustoms: ['coupon-block', 'recommendation-block']
321
- }
322
- };
323
- ```
324
-
325
- **Result:**
326
- - All default blocks enabled
327
- - Only Coupon and Recommendation extensions enabled.
328
- - Other custom blocks are disabled
329
-
330
- ### Default Behavior
331
-
332
- When `blocks` is not provided or is `undefined`:
333
-
334
- ```typescript
335
- const guidoConfig = {
336
- translationsPath: 'window.trans.en',
337
- features: {
338
- dynamicContent: true,
339
- saveAsTemplate: true,
340
- versionHistory: true,
341
- testMessage: true
342
- },
343
- // No blocks config
344
- };
345
- ```
346
-
347
- **Result:**
348
- - All 13 default Stripo blocks enabled
349
- - All custom blocks are disabled.
350
-
351
- ### Block Configuration Interface
352
-
353
- ```typescript
354
- interface BlocksConfig {
355
- excludeDefaults?: GuidoBlockType[];
356
- includeCustoms?: GuidoCustomBlockType[];
357
- }
358
- ```
359
-
360
227
  ### TypeScript Types
361
228
 
362
229
  The library exports the following TypeScript types:
@@ -451,8 +318,7 @@ const guidoConfig = {
451
318
  features: {
452
319
  dynamicContent: true,
453
320
  saveAsTemplate: true,
454
- versionHistory: false, // Disable version history
455
- testMessage: true
321
+ versionHistory: false // Disable version history
456
322
  },
457
323
  htmlCompilerRules: [
458
324
  {
@@ -485,8 +351,7 @@ const guidoConfig = {
485
351
  features: {
486
352
  dynamicContent: true,
487
353
  saveAsTemplate: true,
488
- versionHistory: true,
489
- testMessage: true
354
+ versionHistory: true
490
355
  },
491
356
  ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
492
357
  htmlCompilerRules: [
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "e299731b"
15
+ "3c910a93"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,8 +1,8 @@
1
- import { defineComponent as R, defineAsyncComponent as G, ref as x, computed as I, watch as M, onMounted as z, onUnmounted as B } from "vue";
1
+ import { defineComponent as R, defineAsyncComponent as I, ref as x, computed as U, watch as M, onMounted as z, onUnmounted as B } from "vue";
2
2
  import { provideGuidoActions as K } from "../composables/useGuidoActions.js";
3
3
  import { usePartner as O } from "../composables/usePartner.js";
4
4
  import { useStripo as j } from "../composables/useStripo.js";
5
- import { migrate as U } from "../config/migrator/index.js";
5
+ import { migrate as W } from "../config/migrator/index.js";
6
6
  import { DefaultUsername as q, DefaultMessageType as J, DefaultGuidoConfig as Q } from "../enums/defaults.js";
7
7
  import V from "./organisms/base/Toaster.vue.js";
8
8
  import X from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
@@ -14,10 +14,10 @@ import { useStripoApi as oe } from "../services/stripoApi.js";
14
14
  import { useConfigStore as te } from "../stores/config.js";
15
15
  import { useDynamicContentStore as ne } from "../stores/dynamic-content.js";
16
16
  import { useEditorStore as re } from "../stores/editor.js";
17
- import { usePreviewStore as ie } from "../stores/preview.js";
18
- import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
19
- import ae from "../node_modules/lodash-es/merge.js";
20
- const ke = /* @__PURE__ */ R({
17
+ import { usePreviewStore as ae } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as ie } from "../stores/unsubscribe.js";
19
+ import se from "../node_modules/lodash-es/merge.js";
20
+ const Ge = /* @__PURE__ */ R({
21
21
  __name: "Guido",
22
22
  props: {
23
23
  templateId: null,
@@ -31,84 +31,81 @@ const ke = /* @__PURE__ */ R({
31
31
  guidoConfig: null,
32
32
  templateConfig: null
33
33
  },
34
- emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup(W, { expose: _, emit: o }) {
36
- const l = W, L = G(
34
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished"],
35
+ setup(_, { expose: L, emit: t }) {
36
+ const u = _, k = I(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), A = G(
38
+ ), A = I(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), u = x(), i = ne(), p = se(), g = te(), s = re(), N = ie(), n = I(() => s.hasChanges), { getPartnerName: f, getProductType: y, isTestPartner: F } = O(), v = () => {
40
+ ), l = x(), a = ne(), p = ie(), g = te(), i = re(), N = ae(), n = U(() => i.hasChanges), { getPartnerName: f, getProductType: y, isTestPartner: F } = O(), v = () => {
41
41
  var e;
42
- return (e = u.value) == null ? void 0 : e.handleSave(!0);
42
+ return (e = l.value) == null ? void 0 : e.handleSave(!0);
43
43
  }, {
44
- templateId: a,
44
+ templateId: s,
45
45
  userId: b,
46
46
  guidoConfig: C,
47
- templateConfig: t,
47
+ templateConfig: o,
48
48
  html: r = "",
49
49
  css: h = "",
50
50
  partnerName: c = f(),
51
51
  productType: d = y(),
52
52
  messageType: S = J,
53
53
  username: w = q
54
- } = l, m = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
55
- s.templateId = a, window.GuidoConfig = ae(Q, C), window.GuidoConfig.partner = {
54
+ } = u, m = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
55
+ i.templateId = s, window.GuidoConfig = se(Q, C), window.GuidoConfig.partner = {
56
56
  partnerName: c,
57
57
  productType: d,
58
58
  messageType: S
59
- }, g.templateConfig = t;
59
+ }, g.templateConfig = o;
60
60
  const { initPlugin: D } = j({
61
- emailId: a,
61
+ emailId: s,
62
62
  userId: b,
63
63
  username: w,
64
64
  partnerName: c,
65
65
  productType: d,
66
66
  preselectedDynamicContentList: m,
67
67
  onReady: () => {
68
- console.debug("guido:ready"), o("ready");
68
+ console.debug("guido:ready"), t("ready");
69
69
  }
70
- }), { getDefaultTemplate: T } = oe(), H = I(() => {
70
+ }), { getDefaultTemplate: T } = oe(), H = U(() => {
71
71
  var e;
72
72
  return !((e = window.GuidoConfig) != null && e.useHeader);
73
73
  });
74
74
  K({
75
75
  onBack: () => {
76
- console.debug("guido:back"), o("back");
76
+ console.debug("guido:back"), t("back");
77
77
  },
78
78
  onSaveStart: () => {
79
- console.debug("guido:save:start"), o("save:start");
79
+ console.debug("guido:save:start"), t("save:start");
80
80
  },
81
81
  onSaveComplete: (e) => {
82
- console.debug("guido:save:complete", e), o("save:complete", e);
83
- },
84
- onTestEmailClick: () => {
85
- console.debug("guido:test-email:click"), o("test-email:click");
82
+ console.debug("guido:save:complete", e), t("save:complete", e);
86
83
  }
87
84
  });
88
85
  const E = (e) => {
89
- console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
86
+ console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
90
87
  }, P = () => {
91
88
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
92
89
  };
93
90
  return M(() => n.value, () => {
94
- o("on-change", n.value);
91
+ t("on-change", n.value);
95
92
  }), z(async () => {
96
93
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
97
94
  try {
98
- p.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
95
+ p.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
99
96
  let e = {
100
- html: r && await U(r),
97
+ html: r && await W(r),
101
98
  css: h,
102
99
  forceRecreate: !0
103
100
  // TODO: It should be false for old templates. We will communicate with Stripo
104
101
  };
105
- e.html || (e = await T(), e.html = await U(e.html)), await D(e), i.selectedDynamicContentList = m;
102
+ e.html || (e = await T(), e.html = await W(e.html)), await D(e), a.selectedDynamicContentList = m;
106
103
  } catch (e) {
107
104
  console.error("Failed to initialize Stripo editor:", e);
108
105
  }
109
106
  document.addEventListener("dynamic-content:open", (e) => {
110
- const k = e;
111
- console.debug("dynamic-content:open", k.detail), o("dynamic-content:open", k.detail);
107
+ const G = e;
108
+ console.debug("dynamic-content:open", G.detail), t("dynamic-content:open", G.detail);
112
109
  });
113
110
  }), B(() => {
114
111
  try {
@@ -116,16 +113,16 @@ const ke = /* @__PURE__ */ R({
116
113
  } catch {
117
114
  console.debug("Failed to remove Stripo editor: No editor found");
118
115
  }
119
- }), _({
116
+ }), L({
120
117
  dynamicContent: {
121
118
  insert: E,
122
119
  close: P
123
120
  },
124
121
  hasChanges: n,
125
122
  saveSilent: v
126
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: u, dynamicContentStore: i, unsubscribeStore: p, props: l, configStore: g, editorStore: s, previewStore: N, hasChanges: n, getPartnerName: f, getProductType: y, isTestPartner: F, saveSilent: v, templateId: a, userId: b, guidoConfig: C, templateConfig: t, html: r, css: h, partnerName: c, productType: d, messageType: S, username: w, preselectedDynamicContentList: m, emit: o, initPlugin: D, getDefaultTemplate: T, noHeader: H, insertDynamicContent: E, closeDynamicContent: P, Toaster: V, FilterSelectionDrawer: X, HeaderWrapper: Y, LoadingWrapper: Z, SaveAsTemplateDrawer: $, UnsubscribeWrapper: ee };
123
+ }), { __sfc: !0, PreviewContainer: k, OnboardingWrapper: A, headerWrapperRef: l, dynamicContentStore: a, unsubscribeStore: p, props: u, configStore: g, editorStore: i, previewStore: N, hasChanges: n, getPartnerName: f, getProductType: y, isTestPartner: F, saveSilent: v, templateId: s, userId: b, guidoConfig: C, templateConfig: o, html: r, css: h, partnerName: c, productType: d, messageType: S, username: w, preselectedDynamicContentList: m, emit: t, initPlugin: D, getDefaultTemplate: T, noHeader: H, insertDynamicContent: E, closeDynamicContent: P, Toaster: V, FilterSelectionDrawer: X, HeaderWrapper: Y, LoadingWrapper: Z, SaveAsTemplateDrawer: $, UnsubscribeWrapper: ee };
127
124
  }
128
125
  });
129
126
  export {
130
- ke as default
127
+ Ge as default
131
128
  };
@@ -10,7 +10,7 @@ var n = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "0502bceb"
13
+ "2c168944"
14
14
  );
15
15
  const p = i.exports;
16
16
  export {
@@ -1,29 +1,28 @@
1
- import { defineComponent as c, computed as a } from "vue";
2
- import { useConfig as m } from "../../../composables/useConfig.js";
3
- import { useBack as u } from "../../../composables/useGuidoActions.js";
4
- import { usePreviewMode as f } from "../../../composables/usePreviewMode.js";
1
+ import { defineComponent as s, computed as c } from "vue";
2
+ import { useBack as m } from "../../../composables/useGuidoActions.js";
3
+ import { usePreviewMode as a } from "../../../composables/usePreviewMode.js";
5
4
  import { useTranslations as p } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as d } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as l } from "../../../stores/editor.js";
8
- import { InButtonV2 as k } from "@useinsider/design-system-vue";
9
- import B from "./version-history/RestoreButton.vue.js";
10
- const P = /* @__PURE__ */ c({
5
+ import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
6
+ import { useEditorStore as d } from "../../../stores/editor.js";
7
+ import { InButtonV2 as f } from "@useinsider/design-system-vue";
8
+ import l from "./version-history/RestoreButton.vue.js";
9
+ const O = /* @__PURE__ */ s({
11
10
  __name: "LeftSlot",
12
- setup(b) {
13
- const o = l(), r = u(), { closeVersionHistory: i } = d(), { closePreviewMode: n } = f(), e = p(), { config: t } = m(), s = a(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : t.backButtonLabel ? t.backButtonLabel : e("email-editor.back-to-design"));
14
- return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: s, handleBackClick: () => {
11
+ setup(k) {
12
+ const o = d(), r = m(), { closeVersionHistory: t } = u(), { closePreviewMode: i } = a(), e = p(), n = c(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : e("email-editor.back-to-design"));
13
+ return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: t, closePreviewMode: i, trans: e, backButtonLabel: n, handleBackClick: () => {
15
14
  if (o.isVersionHistoryOpen) {
16
- i();
15
+ t();
17
16
  return;
18
17
  }
19
18
  if (o.isPreviewModeOpen) {
20
- n();
19
+ i();
21
20
  return;
22
21
  }
23
22
  r();
24
- }, InButtonV2: k, RestoreButton: B };
23
+ }, InButtonV2: f, RestoreButton: l };
25
24
  }
26
25
  });
27
26
  export {
28
- P as default
27
+ O as default
29
28
  };
@@ -1,20 +1,20 @@
1
- import a from "./RightSlot.vue2.js";
2
- import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var r = function() {
4
- var o, i, n;
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (n = t.config.features) != null && n.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(c) {
1
+ import n from "./RightSlot.vue2.js";
2
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var l = function() {
4
+ var s, i;
5
+ var o = this, e = o._self._c, t = o._self._setupProxy;
6
+ return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(p) {
7
7
  return t.handleSave(!1);
8
8
  } } })], 1);
9
- }, u = [], d = /* @__PURE__ */ l(
10
- a,
9
+ }, r = [], d = /* @__PURE__ */ a(
10
+ n,
11
+ l,
11
12
  r,
12
- u,
13
13
  !1,
14
14
  null,
15
15
  null
16
16
  );
17
- const f = d.exports;
17
+ const g = d.exports;
18
18
  export {
19
- f as default
19
+ g as default
20
20
  };
@@ -1,36 +1,35 @@
1
- import { defineComponent as H, ref as p, computed as _ } from "vue";
2
- import { useConfig as h } from "../../../composables/useConfig.js";
3
- import { useExport as V } from "../../../composables/useExport.js";
4
- import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
5
- import { useSave as E } from "../../../composables/useSave.js";
6
- import { useTranslations as T } from "../../../composables/useTranslations.js";
1
+ import { defineComponent as g, ref as l, computed as H } from "vue";
2
+ import { useConfig as _ } from "../../../composables/useConfig.js";
3
+ import { useExport as h } from "../../../composables/useExport.js";
4
+ import { useSave as V } from "../../../composables/useSave.js";
5
+ import { useTranslations as x } from "../../../composables/useTranslations.js";
7
6
  import { useVersionHistoryApi as w } from "../../../composables/useVersionHistoryApi.js";
8
- import { useEditorStore as C } from "../../../stores/editor.js";
9
- import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
10
- import { InButtonV2 as A } from "@useinsider/design-system-vue";
11
- const J = /* @__PURE__ */ H({
7
+ import { useEditorStore as T } from "../../../stores/editor.js";
8
+ import { getTooltipOptions as E } from "../../../utils/tooltipUtils.js";
9
+ import { InButtonV2 as O } from "@useinsider/design-system-vue";
10
+ const z = /* @__PURE__ */ g({
12
11
  __name: "RightSlot",
13
- setup(k, { expose: m }) {
14
- const { config: c } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), t = C(), o = T(), e = p(!1), s = p(!1), u = x(), f = () => {
15
- if (t.isVersionHistoryOpen) {
12
+ setup(A, { expose: m }) {
13
+ const { config: u } = _(), { exportHtml: r } = h(), { save: n } = V(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = T(), t = x(), e = l(!1), s = l(!1), c = () => {
14
+ if (o.isVersionHistoryOpen) {
16
15
  a();
17
16
  return;
18
17
  }
19
18
  i();
20
- }, v = async () => {
19
+ }, f = async () => {
21
20
  e.value = !0, await r(), e.value = !1;
22
- }, d = () => {
23
- t.isSaveAsTemplateDrawerOpen = !0;
24
- }, y = _(() => t.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), l = async (S) => {
25
- s.value = !0, t.loadingStatus = !0;
26
- const g = await n(S);
27
- return s.value = !1, t.loadingStatus = !1, g;
21
+ }, v = () => {
22
+ o.isSaveAsTemplateDrawerOpen = !0;
23
+ }, d = H(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), p = async (y) => {
24
+ s.value = !0, o.loadingStatus = !0;
25
+ const S = await n(y);
26
+ return s.value = !1, o.loadingStatus = !1, S;
28
27
  };
29
28
  return m({
30
- handleSave: l
31
- }), { __sfc: !0, config: c, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: o, isExporting: e, isSaving: s, testEmailClick: u, handleVersionHistory: f, handleExport: v, handleSaveAs: d, versionHistoryTooltipText: y, handleSave: l, getTooltipOptions: O, InButtonV2: A };
29
+ handleSave: p
30
+ }), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, handleVersionHistory: c, handleExport: f, handleSaveAs: v, versionHistoryTooltipText: d, handleSave: p, getTooltipOptions: E, InButtonV2: O };
32
31
  }
33
32
  });
34
33
  export {
35
- J as default
34
+ z as default
36
35
  };
@@ -1,6 +1,6 @@
1
1
  import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
2
- const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symbol.for("guido.save.complete"), a = Symbol.for("guido.test.email.click"), i = (e) => {
3
- o(r, e.onBack), o(n, e.onSaveStart), o(c, e.onSaveComplete), o(a, e.onTestEmailClick);
2
+ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
3
+ o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
4
4
  }, u = () => {
5
5
  try {
6
6
  return t(r);
@@ -9,7 +9,7 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symb
9
9
  "useBack: No back handler provided. Make sure Guido component is in the component tree."
10
10
  );
11
11
  }
12
- }, l = () => {
12
+ }, d = () => {
13
13
  try {
14
14
  return t(n);
15
15
  } catch {
@@ -17,31 +17,21 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symb
17
17
  "useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
18
18
  );
19
19
  }
20
- }, d = () => {
21
- try {
22
- return t(c);
23
- } catch {
24
- throw new Error(
25
- "useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
26
- );
27
- }
28
- }, m = () => {
20
+ }, i = () => {
29
21
  try {
30
22
  return t(a);
31
23
  } catch {
32
24
  throw new Error(
33
- "useTestEmailClick: No test email click handler provided. Make sure Guido component is in the component tree."
25
+ "useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
34
26
  );
35
27
  }
36
28
  };
37
29
  export {
38
30
  r as BACK_KEY,
39
- c as SAVE_COMPLETE_KEY,
31
+ a as SAVE_COMPLETE_KEY,
40
32
  n as SAVE_START_KEY,
41
- a as TEST_EMAIL_CLICK_KEY,
42
- i as provideGuidoActions,
33
+ s as provideGuidoActions,
43
34
  u as useBack,
44
- d as useSaveComplete,
45
- l as useSaveStart,
46
- m as useTestEmailClick
35
+ i as useSaveComplete,
36
+ d as useSaveStart
47
37
  };
@@ -1,24 +1,29 @@
1
- import { useActionsApi as y } from "./useActionsApi.js";
2
- import { useBlocksConfig as E } from "./useBlocksConfig.js";
3
- import { useCustomInterfaceAppearance as w } from "./useCustomInterfaceAppearance.js";
4
- import { useStripoEventHandler as h } from "./useStripoEventHandler.js";
5
- import { useToaster as b } from "./useToaster.js";
6
- import { displayConditions as k } from "../enums/displayConditions.js";
1
+ import { useActionsApi as f } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as E } from "./useCustomInterfaceAppearance.js";
3
+ import { useStripoEventHandler as S } from "./useStripoEventHandler.js";
4
+ import { useToaster as C } from "./useToaster.js";
5
+ import { displayConditions as y } from "../enums/displayConditions.js";
6
+ import h from "../extensions/Blocks/Checkbox/extension.js";
7
+ import w from "../extensions/Blocks/CouponBlock/extension.js";
8
+ import b from "../extensions/Blocks/RadioButton/extension.js";
9
+ import V from "../extensions/Blocks/Recommendation/extension.js";
10
+ import _ from "../extensions/Blocks/Unsubscribe/extension.js";
11
+ import k from "../extensions/DynamicContent/extension.js";
7
12
  import { useStripoApi as B } from "../services/stripoApi.js";
8
- import V from "../static/styles/customEditorStyle.css.js";
9
- import { useEditorStore as _ } from "../stores/editor.js";
10
- import { dynamicContentToMergeTags as F } from "../utils/genericUtil.js";
11
- import A from "../package.json.js";
12
- const L = (d) => {
13
- const { handleError: u } = b(), { getToken: p, getCustomFonts: m } = B(), { handleEvent: g } = h(), { getStripoBlocksConfig: f } = E(), S = async (r, i = []) => {
14
- const t = _(), { html: n, css: l, forceRecreate: a } = r, { baseBlocks: e, extensions: c } = await f();
13
+ import x from "../static/styles/customEditorStyle.css.js";
14
+ import { useEditorStore as F } from "../stores/editor.js";
15
+ import { dynamicContentToMergeTags as A } from "../utils/genericUtil.js";
16
+ import T from "../package.json.js";
17
+ const G = (a) => {
18
+ const { handleError: d } = C(), { getToken: u, getCustomFonts: m } = B(), { handleEvent: p } = S(), l = (r, i = []) => {
19
+ const t = F(), { html: n, css: c, forceRecreate: s } = r;
15
20
  window.UIEditor.initEditor(
16
21
  document.querySelector("#guido-editor"),
17
22
  {
18
- metadata: d,
23
+ metadata: a,
19
24
  html: n,
20
- css: l,
21
- forceRecreate: a,
25
+ css: c,
26
+ forceRecreate: s,
22
27
  locale: "en",
23
28
  undoButtonSelector: "#guido__undo-button",
24
29
  redoButtonSelector: "#guido__redo-button",
@@ -28,14 +33,13 @@ const L = (d) => {
28
33
  customAppearanceMergetags: !0,
29
34
  customAppearanceMergetagsBorderColor: "#f1f3fe",
30
35
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
31
- customViewStyles: V,
36
+ customViewStyles: x,
32
37
  conditionsEnabled: !0,
33
38
  customConditionsEnabled: !0,
34
- conditionCategories: k,
39
+ conditionCategories: y,
35
40
  enableXSSSecurity: !0,
36
41
  messageSettingsEnabled: !1,
37
42
  selectBlockAfterDropFromSettingsPanel: !0,
38
- ...e ? { baseBlocks: e } : {},
39
43
  editorFonts: {
40
44
  showDefaultStandardFonts: !0,
41
45
  showDefaultNotStandardFonts: !0,
@@ -43,25 +47,25 @@ const L = (d) => {
43
47
  },
44
48
  mergeTags: [
45
49
  {
46
- entries: F(d.preselectedDynamicContentList)
50
+ entries: A(a.preselectedDynamicContentList)
47
51
  }
48
52
  ],
49
53
  async onTokenRefreshRequest(o) {
50
54
  try {
51
- const s = await p();
52
- o(s);
53
- } catch (s) {
54
- u(s, "Failed to refresh token");
55
+ const e = await u();
56
+ o(e);
57
+ } catch (e) {
58
+ d(e, "Failed to refresh token");
55
59
  }
56
60
  },
57
61
  onTemplateLoaded() {
58
62
  try {
59
- const { importCss: o } = w(), { activateCustomViewStyles: s } = y();
60
- o(), s(), d.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
63
+ const { importCss: o } = E(), { activateCustomViewStyles: e } = f();
64
+ o(), e(), a.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
61
65
  t.hasChanges = !1;
62
66
  }, 1e3);
63
67
  } catch (o) {
64
- u(o, "Failed to load custom interface appearance");
68
+ d(o, "Failed to load custom interface appearance");
65
69
  }
66
70
  },
67
71
  onCodeEditorVisibilityChanged(o) {
@@ -76,35 +80,42 @@ const L = (d) => {
76
80
  onDataChanged() {
77
81
  t.hasChanges = !0;
78
82
  },
79
- onEvent: g,
83
+ onEvent: p,
80
84
  ignoreClickOutsideSelectors: [
81
85
  "#guido-dynamic-content-modal",
82
86
  ".in-on-board-wrapper",
83
87
  ".in-drawer__container"
84
88
  ],
85
- extensions: c
89
+ extensions: [
90
+ k,
91
+ h,
92
+ b,
93
+ V,
94
+ _,
95
+ w
96
+ ]
86
97
  }
87
98
  );
88
- }, C = (r) => new Promise((i, t) => {
89
- var c;
99
+ }, g = (r) => new Promise((i, t) => {
100
+ var e;
90
101
  if (document.getElementById("UiEditorScript")) {
91
102
  r(), i();
92
103
  return;
93
104
  }
94
- const n = A.guido, a = `https://email-static.useinsider.com/guido/${(c = n == null ? void 0 : n.stripo) == null ? void 0 : c.version}/UIEditor.js`, e = document.createElement("script");
95
- e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
105
+ const n = T.guido, s = `https://email-static.useinsider.com/guido/${(e = n == null ? void 0 : n.stripo) == null ? void 0 : e.version}/UIEditor.js`, o = document.createElement("script");
106
+ o.id = "UiEditorScript", o.type = "module", o.src = s, o.onload = () => {
96
107
  r(), i();
97
- }, e.onerror = () => {
98
- t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
99
- }, document.body.appendChild(e);
108
+ }, o.onerror = () => {
109
+ t(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
110
+ }, document.body.appendChild(o);
100
111
  });
101
112
  return { initPlugin: async (r) => {
102
- await C(async () => {
113
+ await g(async () => {
103
114
  const i = await m();
104
- await S(r, i);
115
+ l(r, i);
105
116
  });
106
117
  } };
107
118
  };
108
119
  export {
109
- L as useStripo
120
+ G as useStripo
110
121
  };
@@ -1,41 +1,36 @@
1
- import { usePartner as N } from "../../composables/usePartner.js";
2
- import { LINK_REGEXES as l, LINK_TYPES as g, INSIDER_ID as f, URLS as S } from "../../enums/unsubscribe.js";
3
- import { parsePageList as U } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
4
- import { useConfigStore as B } from "../../stores/config.js";
5
- import { useDynamicContentStore as y } from "../../stores/dynamic-content.js";
6
- import { useUnsubscribeStore as L } from "../../stores/unsubscribe.js";
7
- const D = [
1
+ import { usePartner as U } from "../../composables/usePartner.js";
2
+ import { LINK_REGEXES as l, LINK_TYPES as b, URLS as f } from "../../enums/unsubscribe.js";
3
+ import { parsePageList as B } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
4
+ import { useConfigStore as N } from "../../stores/config.js";
5
+ import { useUnsubscribeStore as I } from "../../stores/unsubscribe.js";
6
+ const T = [
8
7
  {
9
8
  id: "add-unsubscribe-link-values",
10
9
  description: "Adding unsubscribe link values",
11
10
  type: "custom",
12
11
  processor: (t) => {
13
- const { getPartnerName: i } = N(), c = B(), n = y(), u = L(), a = c.getVariationId;
14
- if (!a)
12
+ const { getPartnerName: i } = U(), a = N(), n = I(), u = a.getVariationId;
13
+ if (!u)
15
14
  return t;
16
- let e = t;
17
- const r = `/${i()}/email/${a}?user={{iid}}`;
18
- return new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]").forEach((p) => {
19
- var b;
20
- const m = p.getAttribute("data-unsubscribe-page-list");
21
- if (!m)
15
+ let o = t;
16
+ const e = `/${i()}/email/${u}?user={{iid}}`;
17
+ return new DOMParser().parseFromString(o, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]").forEach((p) => {
18
+ var g;
19
+ const d = p.getAttribute("data-unsubscribe-page-list");
20
+ if (!d)
22
21
  return;
23
- const R = U(m), d = ((b = u.templates) == null ? void 0 : b.filter(
24
- (o) => R.includes(o.id)
25
- )) ?? [], _ = d.some((o) => o.type === g.UNSUBSCRIBE_LINK_TYPE), I = d.some((o) => o.type === g.PREFERENCES_LINK_TYPE), E = p.outerHTML;
22
+ const S = B(d), m = ((g = n.templates) == null ? void 0 : g.filter(
23
+ (c) => S.includes(c.id)
24
+ )) ?? [], R = m.some((c) => c.type === b.UNSUBSCRIBE_LINK_TYPE), _ = m.some((c) => c.type === b.PREFERENCES_LINK_TYPE), E = p.outerHTML;
26
25
  let s = E;
27
- _ && (n.selectedDynamicContentList.push({
28
- text: f,
29
- value: f,
30
- fallback: ""
31
- }), s = s.replace(
26
+ R && (s = s.replace(
32
27
  l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
33
- S.UNSUBSCRIBE_URL + r
34
- )), I && (s = s.replace(
28
+ f.UNSUBSCRIBE_URL + e
29
+ )), _ && (s = s.replace(
35
30
  l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
36
- S.PREFERENCES_URL + r
37
- )), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), e = e.replace(E, s);
38
- }), e;
31
+ f.PREFERENCES_URL + e
32
+ )), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), o = o.replace(E, s);
33
+ }), o;
39
34
  },
40
35
  priority: 60
41
36
  },
@@ -61,16 +56,16 @@ const D = [
61
56
  type: "custom",
62
57
  processor: (t) => {
63
58
  let i = t;
64
- const c = i.match(/<a[^>]+>(.*?)<\/a>/gm);
65
- return c && c.forEach((n) => {
59
+ const a = i.match(/<a[^>]+>(.*?)<\/a>/gm);
60
+ return a && a.forEach((n) => {
66
61
  if (n.includes("insEmail=1"))
67
62
  return;
68
63
  if (n.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
69
- const a = n.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
64
+ const o = n.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
70
65
  const r = e.slice(6, e.length - 1).trim();
71
66
  return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
72
67
  });
73
- i = i.replace(n, a);
68
+ i = i.replace(n, o);
74
69
  }
75
70
  }), i;
76
71
  },
@@ -78,5 +73,5 @@ const D = [
78
73
  }
79
74
  ];
80
75
  export {
81
- D as unsubscribeCompilerRules
76
+ T as unsubscribeCompilerRules
82
77
  };
@@ -1,4 +1,4 @@
1
- const e = {
1
+ const a = {
2
2
  translationsPath: "window.trans.en",
3
3
  migrationDate: 1759696858,
4
4
  emailHeader: {
@@ -8,24 +8,18 @@ const e = {
8
8
  extensions: {
9
9
  unsubscribe: !0
10
10
  },
11
- blocks: {
12
- excludeDefaults: [],
13
- includeCustoms: []
14
- },
15
11
  features: {
16
12
  dynamicContent: !0,
17
13
  saveAsTemplate: !0,
18
- versionHistory: !0,
19
- testMessage: !0
14
+ versionHistory: !0
20
15
  },
21
16
  useHeader: !0
22
17
  }, t = {
23
18
  promotional: 1,
24
19
  transactional: 2
25
- }, a = "email", o = "Guido User", s = t.promotional, n = 2, i = {
20
+ }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
26
21
  email: 60,
27
- architect: 49,
28
- unsubscribePages: 97
22
+ architect: 49
29
23
  }, u = [
30
24
  "alfredtesting",
31
25
  "electio",
@@ -59,12 +53,12 @@ const e = {
59
53
  "stripoeditorlivetest"
60
54
  ];
61
55
  export {
62
- e as DefaultGuidoConfig,
63
- s as DefaultMessageType,
64
- a as DefaultProductType,
56
+ a as DefaultGuidoConfig,
57
+ n as DefaultMessageType,
58
+ e as DefaultProductType,
65
59
  o as DefaultUsername,
66
- n as EditorType,
67
- i as ProductIds,
60
+ i as EditorType,
61
+ s as ProductIds,
68
62
  u as TEST_PARTNER_LIST,
69
63
  t as TemplateTypes
70
64
  };
@@ -10,16 +10,16 @@ const s = e(), R = {
10
10
  }, N = {
11
11
  UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
12
12
  PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
13
- }, I = "iid", _ = {
13
+ }, _ = {
14
14
  name: "Global Unsubscribe",
15
15
  sendGridId: "G"
16
- }, i = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
16
+ }, I = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
17
17
  GLOBAL_UNSUBSCRIBE: 1,
18
18
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
19
19
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
20
20
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
21
21
  RESUBSCRIBE: 5
22
- }, B = {
22
+ }, i = {
23
23
  [E.GLOBAL_UNSUBSCRIBE]: [
24
24
  E.GLOBAL_UNSUBSCRIBE,
25
25
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -29,27 +29,26 @@ const s = e(), R = {
29
29
  E.SUBSCRIPTION_PREFERENCE_CENTER,
30
30
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
31
31
  ]
32
- }, C = {
32
+ }, B = {
33
33
  [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
34
34
  [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
35
35
  [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
36
36
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
37
37
  [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
38
- }, c = {
38
+ }, C = {
39
39
  default: "{{ins-unsubscribe-link}}",
40
40
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
41
41
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
42
42
  };
43
43
  export {
44
- i as ACADEMY_LINK,
44
+ I as ACADEMY_LINK,
45
45
  _ as DEFAULT_UNSUBSCRIBE_GROUP,
46
- I as INSIDER_ID,
47
46
  S as LINK_REGEXES,
48
47
  R as LINK_TYPES,
49
- c as MERGE_TAGS,
48
+ C as MERGE_TAGS,
50
49
  E as PAGE_TYPES,
51
- B as TYPE_COLLECTIONS,
52
- C as TYPE_TRANSLATIONS,
50
+ i as TYPE_COLLECTIONS,
51
+ B as TYPE_TRANSLATIONS,
53
52
  r as UNSUBSCRIBE_PAGES_LINK,
54
53
  N as URLS
55
54
  };
@@ -3,7 +3,7 @@ import { CheckboxBlock as t } from "./block.js";
3
3
  import { CheckboxControl as e } from "./control.js";
4
4
  import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
5
5
  import { CheckboxBlockSettings as i } from "./settingsPanel.js";
6
- const d = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
6
+ const k = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
7
7
  export {
8
- d as default
8
+ k as default
9
9
  };
@@ -2,7 +2,7 @@ import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-edito
2
2
  import { CouponBlock as t } from "./block.js";
3
3
  import { CouponIconsRegistry as i } from "./iconsRegistry.js";
4
4
  import { CouponBlockSettings as n } from "./settingsPanel.js";
5
- const p = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
5
+ const m = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
6
6
  export {
7
- p as default
7
+ m as default
8
8
  };
@@ -31,15 +31,15 @@ import { OldPriceSizeControl as I } from "./controls/oldPrice/size.js";
31
31
  import { OldPriceStyleControl as T } from "./controls/oldPrice/style.js";
32
32
  import { PriceAlignControl as w } from "./controls/price/align.js";
33
33
  import { PriceBackgroundControl as h } from "./controls/price/background.js";
34
- import { PriceColorControl as M } from "./controls/price/color.js";
35
- import { PriceFontFamilyControl as b } from "./controls/price/fontFamily.js";
36
- import { PricePaddingsControl as E } from "./controls/price/paddings.js";
34
+ import { PriceColorControl as E } from "./controls/price/color.js";
35
+ import { PriceFontFamilyControl as M } from "./controls/price/fontFamily.js";
36
+ import { PricePaddingsControl as b } from "./controls/price/paddings.js";
37
37
  import { PriceSizeControl as j } from "./controls/price/size.js";
38
38
  import { PriceStyleControl as q } from "./controls/price/style.js";
39
39
  import { RecommendationIconsRegistry as v } from "./iconsRegistry.js";
40
40
  import D from "./recommendation.css.js";
41
41
  import { SettingsPanel as G } from "./settingsPanel.js";
42
- const Io = new o().addBlock(r).withSettingsPanelRegistry(G).addControl(n).addControl(d).addControl(l).addControl(m).addControl(i).addControl(C).addControl(a).addControl(e).addControl(p).addControl(f).addControl(c).addControl(s).addControl(g).addControl(B).addControl(P).addControl(u).addControl(y).addControl(S).addControl(F).addControl(R).addControl(N).addControl(O).addControl(k).addControl(x).addControl(z).addControl(A).addControl(I).addControl(T).addControl(w).addControl(h).addControl(M).addControl(b).addControl(E).addControl(j).addControl(q).addControl(t).addStyles(D).withIconsRegistry(v).build();
42
+ const Io = new o().addBlock(r).withSettingsPanelRegistry(G).addControl(n).addControl(d).addControl(l).addControl(m).addControl(i).addControl(C).addControl(a).addControl(e).addControl(p).addControl(f).addControl(c).addControl(s).addControl(g).addControl(B).addControl(P).addControl(u).addControl(y).addControl(S).addControl(F).addControl(R).addControl(N).addControl(O).addControl(k).addControl(x).addControl(z).addControl(A).addControl(I).addControl(T).addControl(w).addControl(h).addControl(E).addControl(M).addControl(b).addControl(j).addControl(q).addControl(t).addStyles(D).withIconsRegistry(v).build();
43
43
  export {
44
44
  Io as default
45
45
  };
@@ -1,6 +1,6 @@
1
1
  import { BlockType as t, BlockAttr as n } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RecommendationBlockId as o } from "../constants.js";
3
- import { generateTemplate as l, prepareProductRows as s, spacer as d, DEFAULTS as p, getDefaultProducts as i } from "./templateUtils.js";
3
+ import { spacer as l, generateTemplate as s, prepareProductRows as d, DEFAULTS as p, getDefaultProducts as i } from "./templateUtils.js";
4
4
  import { DEFAULT_CARD_COMPOSITION as $ } from "./templateUtils.js";
5
5
  const g = `
6
6
  <td align="left" class="ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20">
@@ -33,7 +33,7 @@ const g = `
33
33
  </table>
34
34
  </td>
35
35
  </tr>
36
- ${d}
36
+ ${l}
37
37
  <tr>
38
38
  <td>
39
39
  <table
@@ -134,7 +134,7 @@ const g = `
134
134
  };
135
135
  function x() {
136
136
  const e = i();
137
- return l(
137
+ return s(
138
138
  g,
139
139
  e,
140
140
  3,
@@ -143,7 +143,7 @@ function x() {
143
143
  );
144
144
  }
145
145
  function f(e, r, c) {
146
- return s(
146
+ return d(
147
147
  e,
148
148
  r,
149
149
  a,
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-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-e299731b],.guido-editor__container[data-v-e299731b]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-e299731b]{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-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-2c168944] .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-3c910a93],.guido-editor__container[data-v-3c910a93]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-3c910a93]{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-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -29,7 +29,7 @@ const m = () => {
29
29
  forceRecreate: !0
30
30
  };
31
31
  try {
32
- const { data: e } = await r("/stripo/default-template/0");
32
+ const { data: e } = await r("/stripo/default-template");
33
33
  try {
34
34
  return {
35
35
  ...JSON.parse(e),
@@ -6,19 +6,12 @@ type Features = {
6
6
  dynamicContent?: boolean;
7
7
  saveAsTemplate?: boolean;
8
8
  versionHistory?: boolean;
9
- testMessage?: boolean;
10
9
  };
11
10
  type Partner = {
12
11
  partnerName: string;
13
12
  productType: number;
14
13
  messageType: number;
15
14
  };
16
- export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
17
- export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
18
- type BlocksConfig = {
19
- excludeDefaults?: GuidoBlockType[];
20
- includeCustoms?: GuidoCustomBlockType[];
21
- };
22
15
  export type GuidoConfig = {
23
16
  translationsPath: string;
24
17
  htmlCompilerRules?: CompilerRule[];
@@ -29,8 +22,6 @@ export type GuidoConfig = {
29
22
  partner?: Partner;
30
23
  extensions?: Extensions;
31
24
  features?: Features;
32
- blocks?: BlocksConfig;
33
- backButtonLabel?: string;
34
25
  };
35
26
  export type TemplateConfig = {
36
27
  preselectedDynamicContentList?: DynamicContent[];
@@ -27,7 +27,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
27
27
  "on-change": (hasChanges: boolean) => void;
28
28
  ready: () => void;
29
29
  "onboarding:finished": () => void;
30
- "test-email:click": () => void;
31
30
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
32
31
  export default _default;
33
32
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
32
32
  closeOnOutsideClick: boolean;
33
33
  footerStatus: boolean;
34
34
  }>>>, {
35
- size: "small" | "medium" | "large";
36
35
  description: string;
36
+ size: "small" | "medium" | "large";
37
37
  closeOnOutsideClick: boolean;
38
38
  footerButtonOptions: FooterButtonGroup;
39
39
  closeButtonStatus: boolean;
@@ -3,11 +3,9 @@ import type { InjectionKey } from 'vue';
3
3
  export type BackHandler = () => void;
4
4
  export type SaveStartHandler = () => void;
5
5
  export type SaveCompleteHandler = (template: Omit<SavedTemplateDetails, 'forceRecreate'>) => void;
6
- export type TestEmailClickHandler = () => void;
7
6
  export declare const BACK_KEY: InjectionKey<BackHandler>;
8
7
  export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
9
8
  export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
10
- export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
11
9
  /**
12
10
  * Provides Guido action handlers to child components
13
11
  */
@@ -15,7 +13,6 @@ export declare const provideGuidoActions: (actions: {
15
13
  onBack: BackHandler;
16
14
  onSaveStart: SaveStartHandler;
17
15
  onSaveComplete: SaveCompleteHandler;
18
- onTestEmailClick: TestEmailClickHandler;
19
16
  }) => void;
20
17
  /**
21
18
  * Provides individual Guido action handlers
@@ -38,11 +35,6 @@ export declare const useSaveStart: () => SaveStartHandler;
38
35
  * @returns Save complete function
39
36
  */
40
37
  export declare const useSaveComplete: () => SaveCompleteHandler;
41
- /**
42
- * Hook to use the test email click handler
43
- * @returns Test email click function
44
- */
45
- export declare const useTestEmailClick: () => TestEmailClickHandler;
46
38
  /**
47
39
  * Convenience hook to get all Guido actions
48
40
  * @returns Object containing all action handlers
@@ -51,5 +43,4 @@ export declare const useGuidoActions: () => {
51
43
  back: BackHandler;
52
44
  saveStart: SaveStartHandler;
53
45
  saveComplete: SaveCompleteHandler;
54
- testEmailClick: TestEmailClickHandler;
55
46
  };
@@ -77,13 +77,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"config", S
77
77
  dynamicContent?: boolean | undefined;
78
78
  saveAsTemplate?: boolean | undefined;
79
79
  versionHistory?: boolean | undefined;
80
- testMessage?: boolean | undefined;
81
80
  } | undefined;
82
- blocks?: {
83
- excludeDefaults?: import("@@/Types/generic").GuidoBlockType[] | undefined;
84
- includeCustoms?: import("@@/Types/generic").GuidoCustomBlockType[] | undefined;
85
- } | undefined;
86
- backButtonLabel?: string | undefined;
87
81
  };
88
82
  templateConfig?: {
89
83
  preselectedDynamicContentList?: {
@@ -1 +1,6 @@
1
+ /**
2
+ * Removes duplicate items from an array by comparing stringified values
3
+ * @param arr - Array of items to deduplicate
4
+ * @returns New array with unique items only
5
+ */
1
6
  export declare const removeDuplicatesFromArray: <T>(arr?: T[]) => T[];
@@ -32,16 +32,6 @@ ue-stripe-thumb:hover:not(.disabled),
32
32
  padding: 0 16px 16px;
33
33
  grid-row-gap: 16px;
34
34
  }
35
-
36
- /* TODO: will be removed after we find another way to hide stripo custom modules */
37
- #moduleTab_tab1,
38
- button[aria-label="Default Modules"],
39
- button[aria-controls="moduleTab_tab1_content"],
40
- #moduleTab_tab2,
41
- button[aria-label="Pre-Built AMP"],
42
- button[aria-controls="moduleTab_tab2_content"] {
43
- display: none !important;
44
- }
45
35
  `;
46
36
  export {
47
37
  o as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.09a6feb",
3
+ "version": "1.0.3-beta.0d0bb85",
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,49 +0,0 @@
1
- const l = {
2
- "amp-accordion": "ampAccordionEnabled",
3
- "amp-carousel": "ampCarouselEnabled",
4
- "amp-form-controls": "ampFormControlsEnabled",
5
- "banner-block": "bannerEnabled",
6
- "button-block": "buttonEnabled",
7
- "html-block": "htmlEnabled",
8
- "image-block": "imageEnabled",
9
- "menu-block": "menuEnabled",
10
- "social-block": "socialNetEnabled",
11
- "spacer-block": "spacerEnabled",
12
- "text-block": "textEnabled",
13
- "timer-block": "timerEnabled",
14
- "video-block": "videoEnabled"
15
- }, c = {
16
- "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
17
- "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
18
- "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
19
- "recommendation-block": () => import("../extensions/Blocks/Recommendation/extension.js"),
20
- "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
21
- "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
22
- "items-block": null
23
- // TODO: Add ItemsBlock extension when available
24
- }, a = (n) => {
25
- if (!n || !n.length)
26
- return {};
27
- const o = {};
28
- return n.forEach((e) => {
29
- const t = l[e];
30
- t && (o[t] = !1);
31
- }), o;
32
- }, r = async (n) => !n || !n.length ? [] : (await Promise.all(
33
- n.map(async (e) => {
34
- const t = c[e];
35
- return t ? (await t()).default : null;
36
- })
37
- )).filter((e) => e !== null), s = () => ({
38
- getStripoBlocksConfig: async () => {
39
- var e;
40
- const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
41
- return {
42
- baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
43
- extensions: await r(o == null ? void 0 : o.includeCustoms)
44
- };
45
- }
46
- });
47
- export {
48
- s as useBlocksConfig
49
- };
@@ -1,11 +0,0 @@
1
- import type { Extension } from '@stripoinc/ui-editor-extensions';
2
- /**
3
- * Composable for managing Guido blocks configuration
4
- * Converts GuidoConfig blocks settings to Stripo-compatible format
5
- */
6
- export declare const useBlocksConfig: () => {
7
- getStripoBlocksConfig: () => Promise<{
8
- baseBlocks: Record<string, boolean>;
9
- extensions: Extension[];
10
- }>;
11
- };