@useinsider/guido 3.15.1-beta.6da4177 → 3.16.0-beta.20cd2fe

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 (93) hide show
  1. package/dist/@types/config/schemas.js +118 -100
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/Guido.vue2.js +78 -75
  4. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  5. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +21 -0
  6. package/dist/components/organisms/header/EditorActions.vue.js +11 -11
  7. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  8. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  9. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +39 -0
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  12. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  13. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  14. package/dist/components/organisms/header/RightSlot.vue.js +6 -6
  15. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  16. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  17. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  18. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  19. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  20. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
  21. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +74 -0
  22. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
  23. package/dist/composables/useAccessibilityApi.js +31 -0
  24. package/dist/composables/useActionsApi.js +30 -22
  25. package/dist/composables/useEmailTemplateApplier.js +25 -23
  26. package/dist/composables/useHtmlValidator.js +85 -83
  27. package/dist/composables/useTimerClone.js +21 -19
  28. package/dist/config/i18n/en/labels.json.js +28 -4
  29. package/dist/config/migrator/checkboxMigrator.js +20 -19
  30. package/dist/config/migrator/radioButtonMigrator.js +26 -25
  31. package/dist/extensions/Blocks/Checkbox/constants/controlIds.js +4 -0
  32. package/dist/extensions/Blocks/Checkbox/constants/selectors.js +6 -0
  33. package/dist/extensions/Blocks/Checkbox/controls/blockBackground/index.js +10 -0
  34. package/dist/extensions/Blocks/Checkbox/extension.js +6 -5
  35. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +15 -14
  36. package/dist/extensions/Blocks/Checkbox/template.js +10 -9
  37. package/dist/extensions/Blocks/Items/block.js +44 -42
  38. package/dist/extensions/Blocks/Items/template.js +86 -86
  39. package/dist/extensions/Blocks/RadioButton/constants/controlIds.js +4 -0
  40. package/dist/extensions/Blocks/RadioButton/constants/selectors.js +6 -0
  41. package/dist/extensions/Blocks/RadioButton/controls/blockBackground/index.js +10 -0
  42. package/dist/extensions/Blocks/RadioButton/extension.js +5 -4
  43. package/dist/extensions/Blocks/RadioButton/settingsPanel.js +12 -11
  44. package/dist/extensions/Blocks/RadioButton/template.js +16 -9
  45. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +5 -9
  46. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +98 -113
  47. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +21 -0
  48. package/dist/extensions/Blocks/controlFactories.js +117 -115
  49. package/dist/guido.css +1 -1
  50. package/dist/library.js +11 -7
  51. package/dist/node_modules/@vueuse/core/index.js +102 -0
  52. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  53. package/dist/node_modules/valibot/dist/index.js +230 -216
  54. package/dist/public/trackingIds.js +8 -0
  55. package/dist/src/@types/config/schemas.d.ts +24 -0
  56. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  57. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  58. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  59. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  60. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  61. package/dist/src/composables/useActionsApi.d.ts +3 -3
  62. package/dist/src/composables/useConfig.d.ts +6 -0
  63. package/dist/src/extensions/Blocks/Checkbox/constants/controlIds.d.ts +7 -0
  64. package/dist/src/extensions/Blocks/Checkbox/constants/index.d.ts +10 -0
  65. package/dist/src/extensions/Blocks/Checkbox/constants/selectors.d.ts +16 -0
  66. package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +14 -0
  67. package/dist/src/extensions/Blocks/RadioButton/constants/controlIds.d.ts +7 -0
  68. package/dist/src/extensions/Blocks/RadioButton/constants/index.d.ts +10 -0
  69. package/dist/src/extensions/Blocks/RadioButton/constants/selectors.d.ts +16 -0
  70. package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +14 -0
  71. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +5 -0
  72. package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +7 -0
  73. package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +10 -0
  74. package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +16 -0
  75. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +14 -0
  76. package/dist/src/library.d.ts +1 -0
  77. package/dist/src/public/trackingIds.d.ts +9 -0
  78. package/dist/src/stores/config.d.ts +54 -0
  79. package/dist/src/stores/editor.d.ts +132 -0
  80. package/dist/src/stores/onboarding.d.ts +377 -0
  81. package/dist/src/stores/version-history.d.ts +1 -1
  82. package/dist/src/utils/linkTrackingIds.d.ts +30 -0
  83. package/dist/src/utils/timeUtil.d.ts +10 -0
  84. package/dist/stores/editor.js +9 -2
  85. package/dist/stores/onboarding.js +23 -14
  86. package/dist/utils/linkTrackingIds.js +56 -0
  87. package/dist/utils/pairProductVariables.js +105 -99
  88. package/dist/utils/templatePreparation.js +72 -61
  89. package/dist/utils/timeUtil.js +6 -17
  90. package/package.json +5 -1
  91. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  92. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  93. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
- import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as r, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as f, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
3
- const d = {
1
+ import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as l, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
+ const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
6
6
  /** Transactional/system emails */
7
7
  TRANSACTIONAL: 2
8
- }, l = {
8
+ }, i = {
9
9
  /** Standard email campaigns */
10
10
  EMAIL: 60,
11
11
  /** Architect journey builder */
@@ -14,47 +14,47 @@ const d = {
14
14
  UNSUBSCRIBE_PAGES: 97
15
15
  }, A = a({
16
16
  /** Unique identifier for the template being edited */
17
- templateId: p(
17
+ templateId: m(
18
18
  t(),
19
19
  b(1, "templateId is required")
20
20
  ),
21
21
  /** Unique identifier for the user editing the template */
22
- userId: p(
22
+ userId: m(
23
23
  t(),
24
24
  b(1, "userId is required")
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
27
  variationId: e(t())
28
- }), I = a({
28
+ }), L = a({
29
29
  /** Fallback font name (e.g., "Georgia") */
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), L = a({
33
+ }), M = a({
34
34
  /** Partner/organization name (required) */
35
- name: p(
35
+ name: m(
36
36
  t(),
37
37
  b(1, "partner.name is required")
38
38
  ),
39
39
  /** Product type identifier */
40
40
  productType: e(
41
- r([
42
- l.EMAIL,
43
- l.ARCHITECT,
44
- l.UNSUBSCRIBE_PAGES
41
+ l([
42
+ i.EMAIL,
43
+ i.ARCHITECT,
44
+ i.UNSUBSCRIBE_PAGES
45
45
  ]),
46
- l.EMAIL
46
+ i.EMAIL
47
47
  ),
48
48
  /** Message type (promotional or transactional) */
49
49
  messageType: e(
50
- r([d.PROMOTIONAL, d.TRANSACTIONAL]),
51
- d.PROMOTIONAL
50
+ l([p.PROMOTIONAL, p.TRANSACTIONAL]),
51
+ p.PROMOTIONAL
52
52
  ),
53
53
  /** Display name for the current user */
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
- fallbackFont: e(I)
57
- }), v = a({
56
+ fallbackFont: e(L)
57
+ }), E = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -68,40 +68,40 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), S = T(() => g({
71
+ }), f = I(() => g({
72
72
  text: e(t()),
73
73
  // eslint-disable-next-line camelcase -- backend field name
74
74
  tag_text: e(t()),
75
75
  value: e(t()),
76
- children: e(c(S)),
76
+ children: e(c(f)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(S))
79
- })), E = k(
78
+ select_items: e(c(f))
79
+ })), N = k(
80
80
  t(),
81
- C(c(S), [])
81
+ R(c(f), [])
82
82
  ), P = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
86
- decimalCount: e(f([t(), n()])),
86
+ decimalCount: e(h([t(), n()])),
87
87
  /** Pinned product IDs (empty array when filter-driven) */
88
- productIds: e(c(s())),
88
+ productIds: e(c(r())),
89
89
  /** Whether the block requested live products at send time */
90
90
  sendProductRequestFlag: e(o()),
91
91
  /** Whether to randomize product order */
92
92
  shuffleProducts: e(o()),
93
93
  /** Filter rules driving product selection */
94
- filters: e(c(s())),
94
+ filters: e(c(r())),
95
95
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
96
96
  currency: e(t()),
97
97
  /** Currency display settings (separators, alignment, decimals) */
98
- currencySettings: e(s()),
98
+ currencySettings: e(r()),
99
99
  /** Locale (e.g. 'nl_NL') */
100
100
  language: e(t()),
101
101
  /** Recommendation strategy key (e.g. 'newArrivals') */
102
102
  strategy: e(t()),
103
103
  /** Snapshot of products as rendered by the legacy block */
104
- recommendedProducts: e(c(s())),
104
+ recommendedProducts: e(c(r())),
105
105
  /** Number of product cards per row */
106
106
  cardsInRow: e(n()),
107
107
  /** Mobile-only padding (right) */
@@ -117,14 +117,14 @@ const d = {
117
117
  /** Block type marker used by some legacy variants */
118
118
  blockType: e(t()),
119
119
  /** Size variant marker (legacy data may use string or number) */
120
- size: e(f([t(), n()])),
120
+ size: e(h([t(), n()])),
121
121
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
122
  verticalResponsiveness: e(o()),
123
123
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
124
124
  isPriceMovedToNextLine: e(o()),
125
125
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
126
126
  isPriceDeletedForZeroSale: e(o())
127
- }), D = a({
127
+ }), v = a({
128
128
  /**
129
129
  * Legacy recommendation block configs keyed by block ID.
130
130
  * Pass this when loading a template authored with the v1
@@ -135,14 +135,14 @@ const d = {
135
135
  k(t(), P),
136
136
  {}
137
137
  )
138
- }), M = a({
138
+ }), x = a({
139
139
  /** Initial HTML content */
140
140
  html: e(t(), ""),
141
141
  /** Initial CSS content */
142
142
  css: e(t(), ""),
143
143
  /** Preselected dynamic content items */
144
144
  preselectedDynamicContent: e(
145
- c(v),
145
+ c(E),
146
146
  []
147
147
  ),
148
148
  /**
@@ -151,16 +151,30 @@ const d = {
151
151
  * (first) partner's leaf attributes into the label→token map that repairs
152
152
  * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
153
153
  */
154
- dynamicContentList: e(E, {}),
154
+ dynamicContentList: e(N, {}),
155
155
  /** Valid custom field attribute names from the partner's categorized fields */
156
156
  customFieldAttributes: e(c(t()), []),
157
157
  /** Selected unsubscribe page IDs */
158
158
  selectedUnsubscribePages: e(c(n()), []),
159
159
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
160
160
  forceRecreate: e(o(), !1),
161
+ /**
162
+ * Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
163
+ * during migration so a rolled-back document never re-mints retired tracking ids.
164
+ * Out-of-range numbers are coerced rather than rejected — this value arrives from
165
+ * stored partner data, and rejecting it would fail parseConfig and block the editor
166
+ * mount. Non-numbers still fail, like every other field in this schema.
167
+ */
168
+ trackIdCounter: e(
169
+ m(
170
+ n(),
171
+ C((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
172
+ ),
173
+ 0
174
+ ),
161
175
  /** Migration-only inputs (legacy block configs) */
162
- migration: e(D, {})
163
- }), N = a({
176
+ migration: e(v, {})
177
+ }), D = a({
164
178
  /** Sender display name */
165
179
  senderName: e(t(), ""),
166
180
  /** Email subject line */
@@ -173,17 +187,17 @@ const d = {
173
187
  /** Migration date for template compatibility */
174
188
  migrationDate: e(n(), 1759696858),
175
189
  /** Email header settings */
176
- emailHeader: e(N, { senderName: "", subject: "" }),
190
+ emailHeader: e(D, { senderName: "", subject: "" }),
177
191
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
178
- savedModulesFolderName: e(t(), y.SAVED_MODULES),
192
+ savedModulesFolderName: e(t(), S.SAVED_MODULES),
179
193
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
180
- defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
181
- }), x = a({
194
+ defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
195
+ }), F = a({
182
196
  /** Whether to show the header bar */
183
197
  showHeader: e(o(), !0),
184
198
  /** Custom label for back button (if shown) */
185
199
  backButtonLabel: e(t())
186
- }), F = a({
200
+ }), U = a({
187
201
  /** Enable dynamic content insertion */
188
202
  dynamicContent: e(o(), !0),
189
203
  /** Enable save as template functionality */
@@ -202,9 +216,13 @@ const d = {
202
216
  liquidSyntax: e(o(), !1),
203
217
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
204
218
  autosave: e(o(), !1),
219
+ /** Enable the Stripo Accessibility Checker control in the editor toolbar. */
220
+ accessibilityTesting: e(o(), !1),
205
221
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
206
- allowlistEnabled: e(o(), !1)
207
- }), U = r([
222
+ allowlistEnabled: e(o(), !1),
223
+ /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
224
+ linkTrackingIds: e(o(), !1)
225
+ }), B = l([
208
226
  "amp-accordion",
209
227
  "amp-carousel",
210
228
  "amp-form-controls",
@@ -218,7 +236,7 @@ const d = {
218
236
  "text-block",
219
237
  "timer-block",
220
238
  "video-block"
221
- ]), B = r([
239
+ ]), w = l([
222
240
  "dynamic-content",
223
241
  "checkbox-block",
224
242
  "radio-button-block",
@@ -226,123 +244,123 @@ const d = {
226
244
  "unsubscribe-block",
227
245
  "coupon-block",
228
246
  "items-block"
229
- ]), w = a({
247
+ ]), H = a({
230
248
  /** Default blocks to exclude from the editor */
231
249
  excludeDefaults: e(
232
- c(U),
250
+ c(B),
233
251
  []
234
252
  ),
235
253
  /** Custom blocks to include in the editor */
236
254
  includeCustoms: e(
237
- c(B),
255
+ c(w),
238
256
  []
239
257
  )
240
- }), m = a({
258
+ }), d = a({
241
259
  /** Unique identifier for the rule */
242
260
  id: t(),
243
261
  /** Human-readable description */
244
262
  description: e(t()),
245
263
  /** Priority for rule ordering (lower = earlier) */
246
264
  priority: n()
247
- }), H = a({
248
- ...m.entries,
249
- type: i("replace"),
265
+ }), _ = a({
266
+ ...d.entries,
267
+ type: u("replace"),
250
268
  /** String to search for */
251
269
  search: t(),
252
270
  /** Replacement string */
253
271
  replacement: t(),
254
272
  /** Replace all occurrences (default: false) */
255
273
  replaceAll: e(o())
256
- }), _ = a({
257
- ...m.entries,
258
- type: i("regex"),
274
+ }), j = a({
275
+ ...d.entries,
276
+ type: u("regex"),
259
277
  /** Regex pattern string */
260
278
  pattern: t(),
261
279
  /** Replacement string (supports $1, $2, etc.) */
262
280
  replacement: t(),
263
281
  /** Regex flags (e.g., 'gi') */
264
282
  flags: e(t())
265
- }), j = a({
266
- ...m.entries,
267
- type: i("remove"),
283
+ }), q = a({
284
+ ...d.entries,
285
+ type: u("remove"),
268
286
  /** Strings or patterns to remove */
269
287
  targets: c(t())
270
- }), q = a({
271
- ...m.entries,
272
- type: i("custom"),
288
+ }), G = a({
289
+ ...d.entries,
290
+ type: u("custom"),
273
291
  /** Custom processor function */
274
- processor: h(
275
- (u) => typeof u == "function",
292
+ processor: y(
293
+ (s) => typeof s == "function",
276
294
  "processor must be a function"
277
295
  )
278
- }), G = R("type", [
279
- H,
296
+ }), V = T("type", [
280
297
  _,
281
298
  j,
282
- q
283
- ]), V = a({
299
+ q,
300
+ G
301
+ ]), z = a({
284
302
  /** Custom compiler rules to apply */
285
- customRules: e(c(G), []),
303
+ customRules: e(c(V), []),
286
304
  /** Skip default compiler rules */
287
305
  ignoreDefaultRules: e(o(), !1)
288
- }), z = a({
306
+ }), Z = a({
289
307
  /**
290
308
  * External validation handler called before save completes.
291
309
  * Return false to cancel the save operation.
292
310
  */
293
311
  externalValidation: e(
294
- h(
295
- (u) => typeof u == "function",
312
+ y(
313
+ (s) => typeof s == "function",
296
314
  "externalValidation must be a function"
297
315
  )
298
316
  )
299
- }), K = a({
317
+ }), Q = a({
300
318
  // Required sections
301
319
  /** Identity configuration (required) */
302
320
  identity: A,
303
321
  /** Partner configuration (required) */
304
- partner: L,
322
+ partner: M,
305
323
  // Optional sections (with defaults)
306
324
  /** Template content and presets */
307
- template: e(M, {}),
325
+ template: e(x, {}),
308
326
  /** Editor settings */
309
327
  editor: e(O, {}),
310
328
  /** UI configuration */
311
- ui: e(x, {}),
329
+ ui: e(F, {}),
312
330
  /** Feature toggles */
313
- features: e(F, {}),
331
+ features: e(U, {}),
314
332
  /** Block configuration */
315
- blocks: e(w, {}),
333
+ blocks: e(H, {}),
316
334
  /** Compiler configuration */
317
- compiler: e(V, {}),
335
+ compiler: e(z, {}),
318
336
  /** Callbacks and event handlers */
319
- callbacks: e(z, {})
337
+ callbacks: e(Z, {})
320
338
  });
321
339
  export {
322
- w as BlocksSchema,
323
- z as CallbacksSchema,
324
- G as CompilerRuleSchema,
325
- V as CompilerSchema,
326
- B as CustomBlockTypeSchema,
327
- q as CustomRuleSchema,
328
- U as DefaultBlockTypeSchema,
329
- E as DynamicContentListSchema,
330
- S as DynamicContentNodeSchema,
331
- v as DynamicContentSchema,
340
+ H as BlocksSchema,
341
+ Z as CallbacksSchema,
342
+ V as CompilerRuleSchema,
343
+ z as CompilerSchema,
344
+ w as CustomBlockTypeSchema,
345
+ G as CustomRuleSchema,
346
+ B as DefaultBlockTypeSchema,
347
+ N as DynamicContentListSchema,
348
+ f as DynamicContentNodeSchema,
349
+ E as DynamicContentSchema,
332
350
  O as EditorSchema,
333
- N as EmailHeaderSchema,
334
- I as FallbackFontSchema,
335
- F as FeaturesSchema,
336
- K as GuidoConfigSchema,
351
+ D as EmailHeaderSchema,
352
+ L as FallbackFontSchema,
353
+ U as FeaturesSchema,
354
+ Q as GuidoConfigSchema,
337
355
  A as IdentitySchema,
338
356
  P as LegacyRecommendationConfigSchema,
339
- d as MessageType,
340
- L as PartnerSchema,
341
- l as ProductType,
342
- _ as RegexRuleSchema,
343
- j as RemoveRuleSchema,
344
- H as ReplaceRuleSchema,
345
- D as TemplateMigrationSchema,
346
- M as TemplateSchema,
347
- x as UISchema
357
+ p as MessageType,
358
+ M as PartnerSchema,
359
+ i as ProductType,
360
+ j as RegexRuleSchema,
361
+ q as RemoveRuleSchema,
362
+ _ as ReplaceRuleSchema,
363
+ v as TemplateMigrationSchema,
364
+ x as TemplateSchema,
365
+ F as UISchema
348
366
  };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "5079a1c8"
15
+ "b0d3b445"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,49 +1,50 @@
1
- import { defineComponent as q, defineAsyncComponent as M, ref as U, computed as _, watch as B, onMounted as K, onUnmounted as V } from "vue";
2
- import { useCortexBlueprintBridge as j } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as Q } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as X } from "../composables/usePartner.js";
6
- import { useStripo as Y } from "../composables/useStripo.js";
7
- import { useTimerClone as Z } from "../composables/useTimerClone.js";
8
- import { migrate as I } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ee } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as te } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import oe from "./organisms/AutoSaveController.vue.js";
13
- import ne from "./organisms/base/Toaster.vue.js";
14
- import re from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import se from "./organisms/header/HeaderWrapper.vue.js";
16
- import ie from "./organisms/LoadingWrapper.vue.js";
17
- import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as de } from "../services/stripoApi.js";
20
- import { useConfigStore as me } from "../stores/config.js";
21
- import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
22
- import { useEditorStore as O } from "../stores/editor.js";
23
- import { usePreviewStore as ue } from "../stores/preview.js";
24
- import { useTemplateStore as pe } from "../stores/template.js";
25
- import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
26
- const xe = /* @__PURE__ */ q({
1
+ import { defineComponent as j, defineAsyncComponent as R, ref as B, computed as U, watch as _, onMounted as J, onUnmounted as Q } from "vue";
2
+ import { useCortexBlueprintBridge as X } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as ee } from "../composables/usePartner.js";
6
+ import { useStripo as te } from "../composables/useStripo.js";
7
+ import { useTimerClone as oe } from "../composables/useTimerClone.js";
8
+ import { migrate as N } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as O } from "../enums/defaults.js";
10
+ import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import se from "./organisms/AutoSaveController.vue.js";
13
+ import ae from "./organisms/base/Toaster.vue.js";
14
+ import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ce from "./organisms/header/HeaderWrapper.vue.js";
16
+ import de from "./organisms/LoadingWrapper.vue.js";
17
+ import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ue } from "../services/stripoApi.js";
20
+ import { useConfigStore as pe } from "../stores/config.js";
21
+ import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
22
+ import { useEditorStore as P } from "../stores/editor.js";
23
+ import { usePreviewStore as ye } from "../stores/preview.js";
24
+ import { useTemplateStore as ve } from "../stores/template.js";
25
+ import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
26
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
+ const ze = /* @__PURE__ */ j({
27
28
  __name: "Guido",
28
29
  props: {
29
30
  config: null,
30
31
  ready: { type: Boolean, default: !0 }
31
32
  },
32
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
33
- setup(P, { expose: A, emit: n }) {
34
- const i = P, W = M(
34
+ setup(W, { expose: x, emit: r }) {
35
+ const a = W, G = R(
35
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
36
- ), x = M(
37
+ ), H = R(
37
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
38
- ), g = U(), l = U(), u = le(), S = fe(), o = me();
39
- i.ready && o.init(i.config);
40
- const d = O(), G = ue(), m = _(() => d.hasChanges), { isTestPartner: H } = X(), h = () => {
39
+ ), h = B(), l = B(), u = fe(), S = he(), o = pe();
40
+ a.ready && o.init(a.config);
41
+ const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
41
42
  var t;
42
- return (t = g.value) == null ? void 0 : t.handleSave(!0);
43
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
43
44
  }, b = (t) => {
44
- d.loadingStatus = t;
45
+ c.loadingStatus = t;
45
46
  };
46
- j(), Q();
47
+ X(), Z();
47
48
  const p = () => {
48
49
  var t, e;
49
50
  return {
@@ -51,99 +52,101 @@ const xe = /* @__PURE__ */ q({
51
52
  userId: o.userId,
52
53
  username: o.username,
53
54
  partnerName: o.partnerName,
54
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
55
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
55
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
56
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
56
57
  };
57
- }, { initPlugin: E, preloadRuntime: w } = Y(), { getDefaultTemplate: C } = de(), { cloneTimersOnSave: D, hasTimerBlocks: T } = Z(), $ = _(() => {
58
+ }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
58
59
  var t;
59
60
  return !((t = o.ui) != null && t.showHeader);
60
61
  });
61
- J({
62
+ Y({
62
63
  onBack: () => {
63
- console.debug("guido:back"), n("back");
64
+ console.debug("guido:back"), r("back");
64
65
  },
65
66
  onSaveStart: () => {
66
- console.debug("guido:save:start"), n("save:start");
67
+ console.debug("guido:save:start"), r("save:start");
67
68
  },
68
69
  onSaveComplete: (t) => {
69
70
  const e = { ...t, metadata: p() };
70
- console.debug("guido:save:complete", e), n("save:complete", e);
71
+ console.debug("guido:save:complete", e), r("save:complete", e);
71
72
  },
72
73
  onTestEmailClick: () => {
73
- console.debug("guido:test-email:click"), n("test-email:click");
74
+ console.debug("guido:test-email:click"), r("test-email:click");
74
75
  }
75
76
  });
76
- const L = (t) => {
77
+ const T = (t) => {
77
78
  console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
78
- }, R = () => {
79
+ }, F = () => {
79
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
80
81
  };
81
- B(() => m.value, () => {
82
- n("on-change", m.value);
82
+ _(() => m.value, () => {
83
+ r("on-change", m.value);
83
84
  });
84
85
  const f = (t) => {
85
- const e = t, { attribute: s, position: c } = e.detail;
86
- console.debug("dynamic-content:open", e.detail), n("dynamic-content:open", s, c);
86
+ const e = t, { attribute: s, position: d } = e.detail;
87
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
87
88
  };
88
- let a = null;
89
+ let i = null;
89
90
  const y = () => {
90
91
  var e;
91
- const t = document.querySelector(ee);
92
+ const t = document.querySelector(ne);
92
93
  (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
93
94
  }, v = async () => {
94
95
  var t;
95
96
  try {
96
- o.initialized || o.init(i.config), d.templateId = o.templateId;
97
- const e = o.template, s = (e == null ? void 0 : e.html) || "", c = (e == null ? void 0 : e.css) || "", k = (e == null ? void 0 : e.preselectedDynamicContent) || [];
97
+ o.initialized || o.init(a.config), c.templateId = o.templateId;
98
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
98
99
  S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
99
- const F = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {};
100
- let r = {
101
- html: s && await I(s, F),
102
- css: c
100
+ const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
101
+ let n = {
102
+ html: s && await N(s, L),
103
+ css: d
103
104
  };
104
- r.html || (r = await C(), r.html = await I(r.html, F)), T(r.html) && (r.html = await D(r.html));
105
- const z = {
106
- preselectedDynamicContentList: k,
105
+ n.html || (n = await C(), n.html = await N(n.html, L));
106
+ const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
107
+ k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
108
+ const V = {
109
+ preselectedDynamicContentList: I,
107
110
  onReady: () => {
108
- console.debug("guido:ready"), n("ready");
111
+ console.debug("guido:ready"), r("ready");
109
112
  }
110
113
  };
111
- await E(r, p(), z), u.selectedDynamicContentList = k;
114
+ await E(n, p(), V), u.selectedDynamicContentList = I;
112
115
  } catch (e) {
113
116
  console.error("Failed to initialize Stripo editor:", e);
114
117
  }
115
118
  };
116
- return K(async () => {
119
+ return J(async () => {
117
120
  var e;
118
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), te().$reset(), O().$reset(), pe().$reset(), y();
121
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
119
122
  const t = (e = l.value) == null ? void 0 : e.parentElement;
120
- if (t && (a = new ResizeObserver(y), a.observe(t)), w(), i.ready)
123
+ if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
121
124
  await v();
122
125
  else {
123
- const s = B(() => i.ready, (c) => {
124
- c && (s(), v());
126
+ const s = _(() => a.ready, (d) => {
127
+ d && (s(), v());
125
128
  });
126
129
  }
127
130
  document.addEventListener("dynamic-content:open", f);
128
- }), V(() => {
129
- a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", f);
131
+ }), Q(() => {
132
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
130
133
  try {
131
134
  window.UIEditor.removeEditor();
132
135
  } catch {
133
136
  console.debug("Failed to remove Stripo editor: No editor found");
134
137
  }
135
138
  o.reset();
136
- }), A({
139
+ }), x({
137
140
  dynamicContent: {
138
- insert: L,
139
- close: R
141
+ insert: T,
142
+ close: F
140
143
  },
141
144
  hasChanges: m,
142
- saveSilent: h,
145
+ saveSilent: g,
143
146
  setLoading: b
144
- }), { __sfc: !0, PreviewContainer: W, OnboardingWrapper: x, headerWrapperRef: g, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: o, editorStore: d, previewStore: G, hasChanges: m, isTestPartner: H, saveSilent: h, setLoading: b, emit: n, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: T, noHeader: $, insertDynamicContent: L, closeDynamicContent: R, handleDynamicContentOpen: f, ribbonObserver: a, updateRibbonOffset: y, startEditor: v, AutoSaveController: oe, Toaster: ne, FilterSelectionDrawer: re, HeaderWrapper: se, LoadingWrapper: ie, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ce };
147
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
145
148
  }
146
149
  });
147
150
  export {
148
- xe as default
151
+ ze as default
149
152
  };