@useinsider/guido 2.1.0-beta.71300f0 → 2.1.0-beta.76fc9ee

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
@@ -1,6 +1,8 @@
1
1
  <p align="center">
2
2
  <a href="https://www.youtube.com/shorts/Y0RwBeMezL4" target="_blank" rel="noopener noreferrer">
3
- <img width="180" src="./public/guido.png" alt="Guido logo">
3
+ <img width="180"
4
+ src="https://web-image.useinsider.com/guido/defaultImageLibrary/iUH0liTK0d2YDsVB5LDN1770169173.jpg"
5
+ alt="Guido logo">
4
6
  </a>
5
7
  </p>
6
8
 
@@ -122,8 +124,8 @@ const config: GuidoConfigInput = {
122
124
  senderName?: string,
123
125
  subject?: string,
124
126
  },
125
- savedModulesFolderName?: string, // Default: 'savedModules' sent as guido_{partnerName}_{value}
126
- defaultModulesFolderName?: string, // Default: 'defaultModules' sent as guido_{value}
127
+ savedModulesFolderName?: string, // Default: 'savedModules' - folder name for user-saved modules
128
+ defaultModulesFolderName?: string, // Default: 'defaultModules' - folder name for default/prebuilt modules
127
129
  },
128
130
 
129
131
  // Optional: UI settings
@@ -260,39 +262,30 @@ const config: GuidoConfigInput = {
260
262
 
261
263
  ## Module Folder Configuration
262
264
 
263
- Customize the Stripo module folder names for saved and default modules:
265
+ Customize the Stripo module folder names for saved and default modules. These values are passed to Stripo metadata and the dynamic folder paths are constructed in the Stripo plugin panel configuration.
264
266
 
265
267
  ```typescript
266
268
  const config: GuidoConfigInput = {
267
269
  identity: { templateId: 'tpl-123', userId: 'user-456' },
268
270
  partner: { name: 'acme' },
269
271
  editor: {
270
- // Custom folder for user-saved modules
271
- // Sent to Stripo as: guido_acme_myCustomModules
272
- savedModulesFolderName: 'myCustomModules',
272
+ // Folder name for user-saved modules
273
+ savedModulesFolderName: 'savedModules',
273
274
 
274
- // Custom folder for default/prebuilt modules
275
- // Sent to Stripo as: guido_myPrebuilts
276
- defaultModulesFolderName: 'myPrebuilts',
275
+ // Folder name for default/prebuilt modules
276
+ defaultModulesFolderName: 'defaultModules',
277
277
  },
278
278
  };
279
279
  ```
280
280
 
281
- ### Folder Naming Convention
281
+ ### Default Values
282
282
 
283
- | Config Option | Default Value | Stripo Folder Name |
284
- |--------------|---------------|-------------------|
285
- | `savedModulesFolderName` | `'savedModules'` | `guido_{partnerName}_{value}` |
286
- | `defaultModulesFolderName` | `'defaultModules'` | `guido_{value}` |
283
+ | Config Option | Default Value |
284
+ |--------------|---------------|
285
+ | `savedModulesFolderName` | `'savedModules'` |
286
+ | `defaultModulesFolderName` | `'defaultModules'` |
287
287
 
288
- **Examples with partner name `acme`:**
289
-
290
- | Config Value | Result |
291
- |--------------|--------|
292
- | `savedModulesFolderName: 'savedModules'` (default) | `guido_acme_savedModules` |
293
- | `savedModulesFolderName: 'v2_modules'` | `guido_acme_v2_modules` |
294
- | `defaultModulesFolderName: 'defaultModules'` (default) | `guido_defaultModules` |
295
- | `defaultModulesFolderName: 'prebuilts'` | `guido_prebuilts` |
288
+ > **Note:** The actual folder paths (e.g., `guido_acme_savedModules`) are configured in the Stripo plugin panel using variable substitution like `${savedModulesFolderName}`.
296
289
 
297
290
  ---
298
291
 
@@ -1,4 +1,5 @@
1
- import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, custom as b, boolean as a, array as c, minLength as d, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
2
+ import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, custom as S, boolean as a, array as c, minLength as d, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
2
3
  const m = {
3
4
  /** Promotional/marketing emails */
4
5
  PROMOTIONAL: 1,
@@ -11,7 +12,7 @@ const m = {
11
12
  ARCHITECT: 49,
12
13
  /** Unsubscribe page builder */
13
14
  UNSUBSCRIBE_PAGES: 97
14
- }, S = o({
15
+ }, h = o({
15
16
  /** Unique identifier for the template being edited */
16
17
  templateId: u(
17
18
  t(),
@@ -24,7 +25,7 @@ const m = {
24
25
  ),
25
26
  /** Optional variation ID for A/B testing */
26
27
  variationId: e(t())
27
- }), h = o({
28
+ }), y = o({
28
29
  /** Partner/organization name (required) */
29
30
  name: u(
30
31
  t(),
@@ -46,7 +47,7 @@ const m = {
46
47
  ),
47
48
  /** Display name for the current user */
48
49
  username: e(t(), "Guido User")
49
- }), y = o({
50
+ }), f = o({
50
51
  /** Display text for the dynamic content */
51
52
  text: t(),
52
53
  /** Template variable value (e.g., {{username}}) */
@@ -60,21 +61,21 @@ const m = {
60
61
  value: t()
61
62
  })
62
63
  )
63
- }), f = o({
64
+ }), R = o({
64
65
  /** Initial HTML content */
65
66
  html: e(t(), ""),
66
67
  /** Initial CSS content */
67
68
  css: e(t(), ""),
68
69
  /** Preselected dynamic content items */
69
70
  preselectedDynamicContent: e(
70
- c(y),
71
+ c(f),
71
72
  []
72
73
  ),
73
74
  /** Selected unsubscribe page IDs */
74
75
  selectedUnsubscribePages: e(c(p()), []),
75
76
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
76
77
  forceRecreate: e(a(), !1)
77
- }), R = o({
78
+ }), A = o({
78
79
  /** Sender display name */
79
80
  senderName: e(t(), ""),
80
81
  /** Email subject line */
@@ -87,17 +88,17 @@ const m = {
87
88
  /** Migration date for template compatibility */
88
89
  migrationDate: e(p(), 1759696858),
89
90
  /** Email header settings */
90
- emailHeader: e(R, { senderName: "", subject: "" }),
91
- /** Custom folder name for user-saved modules (sent to Stripo as guido_{partnerName}_{savedModulesFolderName}) */
92
- savedModulesFolderName: e(t(), "savedModules"),
93
- /** Custom folder name for default/prebuilt modules (sent to Stripo as guido_{defaultModulesFolderName}) */
94
- defaultModulesFolderName: e(t(), "defaultModules")
95
- }), I = o({
91
+ emailHeader: e(A, { senderName: "", subject: "" }),
92
+ /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
93
+ savedModulesFolderName: e(t(), b.SAVED_MODULES),
94
+ /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
95
+ defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
96
+ }), T = o({
96
97
  /** Whether to show the header bar */
97
98
  showHeader: e(a(), !0),
98
99
  /** Custom label for back button (if shown) */
99
100
  backButtonLabel: e(t())
100
- }), T = o({
101
+ }), I = o({
101
102
  /** Enable dynamic content insertion */
102
103
  dynamicContent: e(a(), !0),
103
104
  /** Enable save as template functionality */
@@ -112,7 +113,7 @@ const m = {
112
113
  unsubscribe: e(a(), !0),
113
114
  /** Disable modules panel in the editor */
114
115
  modulesDisabled: e(a(), !1)
115
- }), A = n([
116
+ }), E = n([
116
117
  "amp-accordion",
117
118
  "amp-carousel",
118
119
  "amp-form-controls",
@@ -134,10 +135,10 @@ const m = {
134
135
  "unsubscribe-block",
135
136
  "coupon-block",
136
137
  "items-block"
137
- ]), N = o({
138
+ ]), O = o({
138
139
  /** Default blocks to exclude from the editor */
139
140
  excludeDefaults: e(
140
- c(A),
141
+ c(E),
141
142
  []
142
143
  ),
143
144
  /** Custom blocks to include in the editor */
@@ -152,7 +153,7 @@ const m = {
152
153
  description: e(t()),
153
154
  /** Priority for rule ordering (lower = earlier) */
154
155
  priority: p()
155
- }), M = o({
156
+ }), L = o({
156
157
  ...l.entries,
157
158
  type: r("replace"),
158
159
  /** String to search for */
@@ -161,7 +162,7 @@ const m = {
161
162
  replacement: t(),
162
163
  /** Replace all occurrences (default: false) */
163
164
  replaceAll: e(a())
164
- }), O = o({
165
+ }), M = o({
165
166
  ...l.entries,
166
167
  type: r("regex"),
167
168
  /** Regex pattern string */
@@ -170,82 +171,82 @@ const m = {
170
171
  replacement: t(),
171
172
  /** Regex flags (e.g., 'gi') */
172
173
  flags: e(t())
173
- }), v = o({
174
+ }), N = o({
174
175
  ...l.entries,
175
176
  type: r("remove"),
176
177
  /** Strings or patterns to remove */
177
178
  targets: c(t())
178
- }), E = o({
179
+ }), D = o({
179
180
  ...l.entries,
180
181
  type: r("custom"),
181
182
  /** Custom processor function */
182
- processor: b(
183
+ processor: S(
183
184
  (i) => typeof i == "function",
184
185
  "processor must be a function"
185
186
  )
186
- }), L = k("type", [
187
+ }), v = k("type", [
188
+ L,
187
189
  M,
188
- O,
189
- v,
190
- E
191
- ]), x = o({
190
+ N,
191
+ D
192
+ ]), U = o({
192
193
  /** Custom compiler rules to apply */
193
- customRules: e(c(L), []),
194
+ customRules: e(c(v), []),
194
195
  /** Skip default compiler rules */
195
196
  ignoreDefaultRules: e(a(), !1)
196
- }), B = o({
197
+ }), x = o({
197
198
  /**
198
199
  * External validation handler called before save completes.
199
200
  * Return false to cancel the save operation.
200
201
  */
201
202
  externalValidation: e(
202
- b(
203
+ S(
203
204
  (i) => typeof i == "function",
204
205
  "externalValidation must be a function"
205
206
  )
206
207
  )
207
- }), D = o({
208
+ }), H = o({
208
209
  // Required sections
209
210
  /** Identity configuration (required) */
210
- identity: S,
211
+ identity: h,
211
212
  /** Partner configuration (required) */
212
- partner: h,
213
+ partner: y,
213
214
  // Optional sections (with defaults)
214
215
  /** Template content and presets */
215
- template: e(f, {}),
216
+ template: e(R, {}),
216
217
  /** Editor settings */
217
218
  editor: e(C, {}),
218
219
  /** UI configuration */
219
- ui: e(I, {}),
220
+ ui: e(T, {}),
220
221
  /** Feature toggles */
221
- features: e(T, {}),
222
+ features: e(I, {}),
222
223
  /** Block configuration */
223
- blocks: e(N, {}),
224
+ blocks: e(O, {}),
224
225
  /** Compiler configuration */
225
- compiler: e(x, {}),
226
+ compiler: e(U, {}),
226
227
  /** Callbacks and event handlers */
227
- callbacks: e(B, {})
228
+ callbacks: e(x, {})
228
229
  });
229
230
  export {
230
- N as BlocksSchema,
231
- B as CallbacksSchema,
232
- L as CompilerRuleSchema,
233
- x as CompilerSchema,
231
+ O as BlocksSchema,
232
+ x as CallbacksSchema,
233
+ v as CompilerRuleSchema,
234
+ U as CompilerSchema,
234
235
  g as CustomBlockTypeSchema,
235
- E as CustomRuleSchema,
236
- A as DefaultBlockTypeSchema,
237
- y as DynamicContentSchema,
236
+ D as CustomRuleSchema,
237
+ E as DefaultBlockTypeSchema,
238
+ f as DynamicContentSchema,
238
239
  C as EditorSchema,
239
- R as EmailHeaderSchema,
240
- T as FeaturesSchema,
241
- D as GuidoConfigSchema,
242
- S as IdentitySchema,
240
+ A as EmailHeaderSchema,
241
+ I as FeaturesSchema,
242
+ H as GuidoConfigSchema,
243
+ h as IdentitySchema,
243
244
  m as MessageType,
244
- h as PartnerSchema,
245
+ y as PartnerSchema,
245
246
  s as ProductType,
246
- O as RegexRuleSchema,
247
- v as RemoveRuleSchema,
248
- M as ReplaceRuleSchema,
249
- f as TemplateSchema,
250
- I as UISchema
247
+ M as RegexRuleSchema,
248
+ N as RemoveRuleSchema,
249
+ L as ReplaceRuleSchema,
250
+ R as TemplateSchema,
251
+ T as UISchema
251
252
  };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "d2b19ebc"
15
+ "16abb398"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,64 +1,65 @@
1
- import { defineComponent as B, defineAsyncComponent as N, ref as R, computed as P, watch as z, onMounted as K, onUnmounted as j } from "vue";
2
- import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
- import { usePartner as J } from "../composables/usePartner.js";
4
- import { useStripo as Q } from "../composables/useStripo.js";
5
- import { useTimerClone as V } from "../composables/useTimerClone.js";
6
- import { migrate as U } from "../config/migrator/index.js";
7
- import X from "./organisms/base/Toaster.vue.js";
8
- import Y from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import Z from "./organisms/header/HeaderWrapper.vue.js";
10
- import ee from "./organisms/LoadingWrapper.vue.js";
11
- import oe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import te from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as ne } from "../services/stripoApi.js";
1
+ import { defineComponent as z, defineAsyncComponent as M, ref as K, computed as _, watch as V, onMounted as j, onUnmounted as q } from "vue";
2
+ import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
3
+ import { usePartner as Q } from "../composables/usePartner.js";
4
+ import { useStripo as X } from "../composables/useStripo.js";
5
+ import { useTimerClone as Y } from "../composables/useTimerClone.js";
6
+ import { migrate as P } from "../config/migrator/index.js";
7
+ import { ModuleFolderDefaults as A } from "../enums/defaults.js";
8
+ import Z from "./organisms/base/Toaster.vue.js";
9
+ import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
+ import ee from "./organisms/header/HeaderWrapper.vue.js";
11
+ import oe from "./organisms/LoadingWrapper.vue.js";
12
+ import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
+ import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
+ import { useStripoApi as re } from "../services/stripoApi.js";
14
15
  import { useConfigStore as se } from "../stores/config.js";
15
- import { useDynamicContentStore as re } from "../stores/dynamic-content.js";
16
- import { useEditorStore as ce } from "../stores/editor.js";
17
- import { usePreviewStore as ae } from "../stores/preview.js";
18
- import { useUnsubscribeStore as ie } from "../stores/unsubscribe.js";
19
- const Me = /* @__PURE__ */ B({
16
+ import { useDynamicContentStore as ce } from "../stores/dynamic-content.js";
17
+ import { useEditorStore as ae } from "../stores/editor.js";
18
+ import { usePreviewStore as ie } from "../stores/preview.js";
19
+ import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
20
+ const Le = /* @__PURE__ */ z({
20
21
  __name: "Guido",
21
22
  props: {
22
23
  config: null
23
24
  },
24
25
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
25
- setup(W, { expose: I, emit: t }) {
26
- const p = W, L = N(
26
+ setup(N, { expose: W, emit: t }) {
27
+ const u = N, I = M(
27
28
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
- ), A = N(
29
+ ), O = M(
29
30
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
30
- ), v = R(), a = re(), y = ie(), s = se();
31
- s.init(p.config);
32
- const i = ce(), G = ae(), r = P(() => i.hasChanges), { isTestPartner: H } = J(), h = () => {
31
+ ), p = K(), a = ce(), v = de(), r = se();
32
+ r.init(u.config);
33
+ const i = ae(), G = ie(), s = _(() => i.hasChanges), { isTestPartner: H } = Q(), y = () => {
33
34
  var e;
34
- return (e = v.value) == null ? void 0 : e.handleSave(!0);
35
+ return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
36
  }, {
36
37
  templateId: d,
37
- userId: f,
38
- partnerName: m,
38
+ userId: h,
39
+ partnerName: f,
39
40
  productType: b,
40
- username: g,
41
+ username: S,
41
42
  template: o,
42
43
  editor: n
43
- } = s, c = (o == null ? void 0 : o.html) || "", S = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || "savedModules", C = (n == null ? void 0 : n.defaultModulesFolderName) || "defaultModules";
44
+ } = r, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || A.SAVED_MODULES, D = (n == null ? void 0 : n.defaultModulesFolderName) || A.DEFAULT_MODULES;
44
45
  i.templateId = d;
45
- const { initPlugin: D } = Q({
46
+ const { initPlugin: E } = X({
46
47
  emailId: d,
47
- userId: f,
48
- username: g,
49
- partnerName: m,
48
+ userId: h,
49
+ username: S,
50
+ partnerName: f,
50
51
  productType: b,
51
- preselectedDynamicContentList: l,
52
- savedModulesFolderName: `guido_${m}_${w}`,
53
- defaultModulesFolderName: `guido_${C}`,
52
+ preselectedDynamicContentList: m,
53
+ savedModulesFolderName: w,
54
+ defaultModulesFolderName: D,
54
55
  onReady: () => {
55
56
  console.debug("guido:ready"), t("ready");
56
57
  }
57
- }), { getDefaultTemplate: E } = ne(), { cloneTimersOnSave: k, hasTimerBlocks: F } = V(), O = P(() => {
58
+ }), { getDefaultTemplate: C } = re(), { cloneTimersOnSave: T, hasTimerBlocks: k } = Y(), x = _(() => {
58
59
  var e;
59
- return !((e = s.ui) != null && e.showHeader);
60
+ return !((e = r.ui) != null && e.showHeader);
60
61
  });
61
- q({
62
+ J({
62
63
  onBack: () => {
63
64
  console.debug("guido:back"), t("back");
64
65
  },
@@ -72,49 +73,49 @@ const Me = /* @__PURE__ */ B({
72
73
  console.debug("guido:test-email:click"), t("test-email:click");
73
74
  }
74
75
  });
75
- const M = (e) => {
76
+ const F = (e) => {
76
77
  console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
77
- }, T = () => {
78
+ }, U = () => {
78
79
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
79
80
  };
80
- z(() => r.value, () => {
81
- t("on-change", r.value);
81
+ V(() => s.value, () => {
82
+ t("on-change", s.value);
82
83
  });
83
- const u = (e) => {
84
- const _ = e, { attribute: $, position: x } = _.detail;
85
- console.debug("dynamic-content:open", _.detail), t("dynamic-content:open", $, x);
84
+ const l = (e) => {
85
+ const L = e, { attribute: B, position: R } = L.detail;
86
+ console.debug("dynamic-content:open", L.detail), t("dynamic-content:open", B, R);
86
87
  };
87
- return K(async () => {
88
+ return j(async () => {
88
89
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
89
90
  try {
90
- y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
+ v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
92
  let e = {
92
- html: c && await U(c),
93
- css: S
93
+ html: c && await P(c),
94
+ css: g
94
95
  };
95
- e.html || (e = await E(), e.html = await U(e.html)), F(e.html) && (e.html = await k(e.html)), await D(e), a.selectedDynamicContentList = l;
96
+ e.html || (e = await C(), e.html = await P(e.html)), k(e.html) && (e.html = await T(e.html)), await E(e), a.selectedDynamicContentList = m;
96
97
  } catch (e) {
97
98
  console.error("Failed to initialize Stripo editor:", e);
98
99
  }
99
- document.addEventListener("dynamic-content:open", u);
100
- }), j(() => {
101
- document.removeEventListener("dynamic-content:open", u);
100
+ document.addEventListener("dynamic-content:open", l);
101
+ }), q(() => {
102
+ document.removeEventListener("dynamic-content:open", l);
102
103
  try {
103
104
  window.UIEditor.removeEditor();
104
105
  } catch {
105
106
  console.debug("Failed to remove Stripo editor: No editor found");
106
107
  }
107
- s.reset();
108
- }), I({
108
+ r.reset();
109
+ }), W({
109
110
  dynamicContent: {
110
- insert: M,
111
- close: T
111
+ insert: F,
112
+ close: U
112
113
  },
113
- hasChanges: r,
114
- saveSilent: h
115
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: v, dynamicContentStore: a, unsubscribeStore: y, props: p, configStore: s, editorStore: i, previewStore: G, hasChanges: r, isTestPartner: H, saveSilent: h, templateId: d, userId: f, partnerName: m, productType: b, username: g, templateConfig: o, editorConfig: n, html: c, css: S, preselectedDynamicContentList: l, savedModulesFolderName: w, defaultModulesFolderName: C, emit: t, initPlugin: D, getDefaultTemplate: E, cloneTimersOnSave: k, hasTimerBlocks: F, noHeader: O, insertDynamicContent: M, closeDynamicContent: T, handleDynamicContentOpen: u, Toaster: X, FilterSelectionDrawer: Y, HeaderWrapper: Z, LoadingWrapper: ee, SaveAsTemplateDrawer: oe, UnsubscribeWrapper: te };
114
+ hasChanges: s,
115
+ saveSilent: y
116
+ }), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: O, headerWrapperRef: p, dynamicContentStore: a, unsubscribeStore: v, props: u, configStore: r, editorStore: i, previewStore: G, hasChanges: s, isTestPartner: H, saveSilent: y, templateId: d, userId: h, partnerName: f, productType: b, username: S, templateConfig: o, editorConfig: n, html: c, css: g, preselectedDynamicContentList: m, savedModulesFolderName: w, defaultModulesFolderName: D, emit: t, initPlugin: E, getDefaultTemplate: C, cloneTimersOnSave: T, hasTimerBlocks: k, noHeader: x, insertDynamicContent: F, closeDynamicContent: U, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
116
117
  }
117
118
  });
118
119
  export {
119
- Me as default
120
+ Le as default
120
121
  };
@@ -1,5 +1,6 @@
1
- import { useConfigStore as a } from "../stores/config.js";
2
- const r = {
1
+ import r from "../extensions/ModulesTabIcons/extension.js";
2
+ import { useConfigStore as l } from "../stores/config.js";
3
+ const a = {
3
4
  "amp-accordion": "ampAccordionEnabled",
4
5
  "amp-carousel": "ampCarouselEnabled",
5
6
  "amp-form-controls": "ampFormControlsEnabled",
@@ -13,7 +14,7 @@ const r = {
13
14
  "text-block": "textEnabled",
14
15
  "timer-block": "timerEnabled",
15
16
  "video-block": "videoEnabled"
16
- }, l = {
17
+ }, s = {
17
18
  "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
18
19
  "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
19
20
  "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
@@ -21,40 +22,40 @@ const r = {
21
22
  "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
22
23
  "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
23
24
  "items-block": () => import("../extensions/Blocks/Items/extension.js")
24
- }, s = (o) => {
25
- if (!o || !o.length)
25
+ }, i = (n) => {
26
+ if (!n || !n.length)
26
27
  return {};
27
28
  const t = {};
28
- return o.forEach((n) => {
29
- const e = r[n];
29
+ return n.forEach((o) => {
30
+ const e = a[o];
30
31
  e && (t[e] = !1);
31
32
  }), t;
32
- }, i = async () => [(await import("../extensions/ModulesTabIcons/extension.js")).default], b = async (o) => {
33
- const t = await i();
34
- if (!o || !o.length)
33
+ }, b = () => [r], m = async (n) => {
34
+ const t = b();
35
+ if (!n || !n.length)
35
36
  return t;
36
- const n = await Promise.all(
37
- o.map(async (e) => {
38
- const c = l[e];
37
+ const o = await Promise.all(
38
+ n.map(async (e) => {
39
+ const c = s[e];
39
40
  return c ? (await c()).default : null;
40
41
  })
41
42
  );
42
43
  return [
43
44
  ...t,
44
- ...n.filter((e) => e !== null)
45
+ ...o.filter((e) => e !== null)
45
46
  ];
46
- }, u = () => {
47
- const o = a();
47
+ }, E = () => {
48
+ const n = l();
48
49
  return {
49
50
  getStripoBlocksConfig: async () => {
50
- const n = o.blocks;
51
+ const o = n.blocks;
51
52
  return {
52
- baseBlocks: s(n == null ? void 0 : n.excludeDefaults),
53
- extensions: await b(n == null ? void 0 : n.includeCustoms)
53
+ baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
54
+ extensions: await m(o == null ? void 0 : o.includeCustoms)
54
55
  };
55
56
  }
56
57
  };
57
58
  };
58
59
  export {
59
- u as useBlocksConfig
60
+ E as useBlocksConfig
60
61
  };
@@ -1,17 +1,21 @@
1
- import { useConfig as l } from "./useConfig.js";
2
- import { useSaveStart as m, useSaveComplete as c } from "./useGuidoActions.js";
3
- import { useTemplatePreparation as d } from "../utils/templatePreparation.js";
4
- import { useHtmlValidator as p } from "./useHtmlValidator.js";
5
- const w = () => {
6
- const i = m(), s = c(), { validateHtml: o } = p(), { callbacks: a } = l();
7
- return { save: async (r = !1) => {
1
+ import { useConfig as u } from "./useConfig.js";
2
+ import { useSaveStart as d, useSaveComplete as p } from "./useGuidoActions.js";
3
+ import { useSyncModuleExtractor as f } from "./useSyncModuleExtractor.js";
4
+ import { useStripoApi as v } from "../services/stripoApi.js";
5
+ import { useTemplatePreparation as S } from "../utils/templatePreparation.js";
6
+ import { useHtmlValidator as x } from "./useHtmlValidator.js";
7
+ const E = () => {
8
+ const o = d(), s = p(), { validateHtml: i } = x(), { callbacks: a } = u(), { extractSyncModuleUnsubscribeData: r } = f(), { setSyncModuleUnsubscriptionPages: n } = v();
9
+ return { save: async (l = !1) => {
8
10
  var e;
9
- i();
10
- const { prepareTemplateDetails: n } = d(), t = await n();
11
- if (await o(t.compiledHtml, t.dynamicContentList, !0) && !((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)))
12
- return r || s(t), t;
11
+ o();
12
+ const { prepareTemplateDetails: c } = S(), t = await c();
13
+ if (!await i(t.compiledHtml, t.dynamicContentList, !0) || (e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t))
14
+ return;
15
+ const m = r(t.rawHtml);
16
+ return await n(m), l || s(t), t;
13
17
  } };
14
18
  };
15
19
  export {
16
- w as useSave
20
+ E as useSave
17
21
  };