@useinsider/guido 3.19.0-beta.0a1f92f → 3.19.0-beta.1134ab5

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 (104) hide show
  1. package/README.md +21 -3
  2. package/dist/@types/config/schemas.js +62 -55
  3. package/dist/components/Guido.vue.js +7 -7
  4. package/dist/components/Guido.vue2.js +80 -85
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
  6. package/dist/components/organisms/base/Toaster.vue2.js +13 -12
  7. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  8. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +78 -57
  9. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  10. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  11. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +28 -42
  12. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  13. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  14. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  15. package/dist/components/organisms/header/EditorActions.vue2.js +52 -36
  16. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  17. package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
  18. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  19. package/dist/components/organisms/header/LeftSlot.vue2.js +23 -32
  20. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  21. package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
  22. package/dist/components/organisms/header/RightSlot.vue.js +8 -9
  23. package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
  24. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +40 -54
  26. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  27. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  28. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  29. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  30. package/dist/composables/useCustomInterfaceAppearance.js +65 -52
  31. package/dist/composables/useHtmlValidator.js +87 -82
  32. package/dist/composables/useLegacyStrategyConversion.js +61 -0
  33. package/dist/composables/useRecommendation.js +40 -35
  34. package/dist/composables/useStripo.js +30 -30
  35. package/dist/composables/useToaster.js +14 -20
  36. package/dist/config/i18n/en/labels.json.js +4 -36
  37. package/dist/config/i18n/en/tooltips.json.js +1 -2
  38. package/dist/enums/extensions/recommendationBlock.js +49 -33
  39. package/dist/extensions/Blocks/Recommendation/block.js +61 -42
  40. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  41. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +100 -94
  42. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +130 -55
  43. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  44. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +273 -92
  45. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  46. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  47. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  48. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  49. package/dist/guido.css +1 -1
  50. package/dist/services/recommendationApi.js +46 -37
  51. package/dist/sprite.svg +0 -6
  52. package/dist/src/@types/config/schemas.d.ts +16 -2
  53. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
  54. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  55. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
  56. package/dist/src/composables/useActionsApi.d.ts +2 -2
  57. package/dist/src/composables/useConfig.d.ts +4 -2
  58. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  59. package/dist/src/enums/extensions/recommendationBlock.d.ts +7 -1
  60. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  61. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  62. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  63. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  64. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +10 -0
  65. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  66. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +162 -1
  67. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  68. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  69. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  70. package/dist/src/services/recommendationApi.d.ts +2 -1
  71. package/dist/src/stores/config.d.ts +322 -18
  72. package/dist/src/stores/editor.d.ts +0 -109
  73. package/dist/src/stores/onboarding.d.ts +284 -201
  74. package/dist/src/stores/version-history.d.ts +1 -1
  75. package/dist/src/utils/timeUtil.d.ts +0 -5
  76. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  77. package/dist/static/assets/icons/line-info.svg.js +5 -0
  78. package/dist/static/styles/components/recommendation-strategy.css.js +104 -9
  79. package/dist/static/styles/components/skeleton.css.js +23 -0
  80. package/dist/static/styles/variables.css.js +0 -2
  81. package/dist/stores/config.js +74 -60
  82. package/dist/stores/editor.js +4 -7
  83. package/dist/stores/onboarding.js +30 -42
  84. package/dist/utils/templatePreparation.js +55 -55
  85. package/dist/utils/timeUtil.js +17 -6
  86. package/package.json +1 -1
  87. package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
  88. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -25
  89. package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
  90. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
  91. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
  92. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
  93. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -22
  94. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
  95. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
  96. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
  97. package/dist/composables/useAccessibilityApi.js +0 -35
  98. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
  99. package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
  100. package/dist/static/styles/components/accessibility.css.js +0 -234
  101. /package/dist/src/components/organisms/{header/AutoSaveStatus.vue.d.ts → extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts} +0 -0
  102. /package/dist/src/components/organisms/header/{EditorActionsMenu.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
  103. /package/dist/src/components/organisms/{header/accessibility/AccessibilityToolbar.vue.d.ts → onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts} +0 -0
  104. /package/dist/src/components/organisms/{header/accessibility/ColorVisionSelect.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
package/README.md CHANGED
@@ -95,9 +95,11 @@ import type { GuidoConfigInput } from '@useinsider/guido';
95
95
  const config: GuidoConfigInput = {
96
96
  // Required: Identity
97
97
  identity: {
98
- templateId: string, // Required - Template identifier
99
- userId: string, // Required - User identifier
100
- variationId?: string, // Optional - A/B test variation
98
+ templateId: string, // Required - Template identifier
99
+ userId: string, // Required - User identifier
100
+ variationId?: string, // Optional - A/B test variation
101
+ campaignId?: string, // Optional - Numeric campaign id; absent for templates/modules
102
+ templateLibraryId?: string, // Optional - Numeric template-library id; absent for campaigns/modules
101
103
  },
102
104
 
103
105
  // Required: Partner
@@ -184,6 +186,22 @@ const config: GuidoConfigInput = {
184
186
  };
185
187
  ```
186
188
 
189
+ ### `identity` ids
190
+
191
+ `templateId` is the editor's **document** identity (a uuid / Stripo doc id) and never addresses a
192
+ backend resource. `campaignId` and `templateLibraryId` are the **numeric** ids of the surface the
193
+ editor was opened on, and they are what Guido uses to resolve host-scoped endpoints — most visibly
194
+ when converting a legacy recommendation block into a reusable strategy.
195
+
196
+ | Surface | `campaignId` | `templateLibraryId` |
197
+ |---------|--------------|---------------------|
198
+ | Campaign editor | the campaign id | absent |
199
+ | Saved template editor | absent | the template-library id |
200
+ | Module editor / unsaved template | absent | absent |
201
+
202
+ Pass only the one that applies. A campaign id takes precedence when both are present, and when
203
+ neither is supplied Guido falls back to campaign scope — so a module keeps working unchanged.
204
+
187
205
  ### `ready` prop
188
206
 
189
207
  ```vue
@@ -1,5 +1,5 @@
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 i, pipe as m, minLength as b, custom as h, 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 y, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
+ import { object as o, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as a, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as I, union as y, unknown as r, lazy as T } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,7 +12,7 @@ const p = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, A = a({
15
+ }, A = o({
16
16
  /** Unique identifier for the template being edited */
17
17
  templateId: m(
18
18
  t(),
@@ -24,13 +24,21 @@ const p = {
24
24
  b(1, "userId is required")
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
- variationId: e(t())
28
- }), L = a({
27
+ variationId: e(t()),
28
+ /** Optional numeric campaign ID of the host campaign; absent for templates and modules */
29
+ campaignId: e(t()),
30
+ /**
31
+ * Optional numeric template-library id of the host template; absent for campaigns and
32
+ * modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
33
+ * Stripo doc id) and is never an endpoint id.
34
+ */
35
+ templateLibraryId: e(t())
36
+ }), L = o({
29
37
  /** Fallback font name (e.g., "Georgia") */
30
38
  name: t(),
31
39
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
40
  family: t()
33
- }), M = a({
41
+ }), M = o({
34
42
  /** Partner/organization name (required) */
35
43
  name: m(
36
44
  t(),
@@ -54,7 +62,7 @@ const p = {
54
62
  username: e(t(), "Guido User"),
55
63
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
64
  fallbackFont: e(L)
57
- }), E = a({
65
+ }), E = o({
58
66
  /** Display text for the dynamic content */
59
67
  text: t(),
60
68
  /** Template variable value (e.g., {{username}}) */
@@ -63,22 +71,22 @@ const p = {
63
71
  fallback: e(t()),
64
72
  /** Optional formatting options */
65
73
  format: e(
66
- a({
74
+ o({
67
75
  key: t(),
68
76
  value: t()
69
77
  })
70
78
  )
71
- }), f = I(() => g({
79
+ }), S = T(() => g({
72
80
  text: e(t()),
73
81
  // eslint-disable-next-line camelcase -- backend field name
74
82
  tag_text: e(t()),
75
83
  value: e(t()),
76
- children: e(c(f)),
84
+ children: e(c(S)),
77
85
  // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(f))
86
+ select_items: e(c(S))
79
87
  })), N = k(
80
88
  t(),
81
- R(c(f), [])
89
+ R(c(S), [])
82
90
  ), P = g({
83
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
92
  id: e(n()),
@@ -87,9 +95,9 @@ const p = {
87
95
  /** Pinned product IDs (empty array when filter-driven) */
88
96
  productIds: e(c(r())),
89
97
  /** Whether the block requested live products at send time */
90
- sendProductRequestFlag: e(o()),
98
+ sendProductRequestFlag: e(a()),
91
99
  /** Whether to randomize product order */
92
- shuffleProducts: e(o()),
100
+ shuffleProducts: e(a()),
93
101
  /** Filter rules driving product selection */
94
102
  filters: e(c(r())),
95
103
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
@@ -109,22 +117,22 @@ const p = {
109
117
  /** Mobile-only padding (left) */
110
118
  mobileLeftPadding: e(n()),
111
119
  /** Disable responsive scaling */
112
- unresponsive: e(o()),
120
+ unresponsive: e(a()),
113
121
  /** Layout orientation ('vertical' | 'horizontal') */
114
122
  orientation: e(t()),
115
123
  /** Whether long text is trimmed */
116
- textTrimming: e(o()),
124
+ textTrimming: e(a()),
117
125
  /** Block type marker used by some legacy variants */
118
126
  blockType: e(t()),
119
127
  /** Size variant marker (legacy data may use string or number) */
120
128
  size: e(y([t(), n()])),
121
129
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
- verticalResponsiveness: e(o()),
130
+ verticalResponsiveness: e(a()),
123
131
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
124
- isPriceMovedToNextLine: e(o()),
132
+ isPriceMovedToNextLine: e(a()),
125
133
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
126
- isPriceDeletedForZeroSale: e(o())
127
- }), v = a({
134
+ isPriceDeletedForZeroSale: e(a())
135
+ }), v = o({
128
136
  /**
129
137
  * Legacy recommendation block configs keyed by block ID.
130
138
  * Pass this when loading a template authored with the v1
@@ -135,7 +143,7 @@ const p = {
135
143
  k(t(), P),
136
144
  {}
137
145
  )
138
- }), x = a({
146
+ }), x = o({
139
147
  /** Initial HTML content */
140
148
  html: e(t(), ""),
141
149
  /** Initial CSS content */
@@ -157,7 +165,7 @@ const p = {
157
165
  /** Selected unsubscribe page IDs */
158
166
  selectedUnsubscribePages: e(c(n()), []),
159
167
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
160
- forceRecreate: e(o(), !1),
168
+ forceRecreate: e(a(), !1),
161
169
  /**
162
170
  * Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
163
171
  * during migration so a rolled-back document never re-mints retired tracking ids.
@@ -174,12 +182,12 @@ const p = {
174
182
  ),
175
183
  /** Migration-only inputs (legacy block configs) */
176
184
  migration: e(v, {})
177
- }), D = a({
185
+ }), D = o({
178
186
  /** Sender display name */
179
187
  senderName: e(t(), ""),
180
188
  /** Email subject line */
181
189
  subject: e(t(), "")
182
- }), O = a({
190
+ }), O = o({
183
191
  /** Locale for the editor UI */
184
192
  locale: e(t(), "en"),
185
193
  /** Path to translations object */
@@ -189,39 +197,38 @@ const p = {
189
197
  /** Email header settings */
190
198
  emailHeader: e(D, { senderName: "", subject: "" }),
191
199
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
192
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
200
+ savedModulesFolderName: e(t(), f.SAVED_MODULES),
193
201
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
194
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
195
- }), F = a({
202
+ defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
203
+ }), F = o({
196
204
  /** Whether to show the header bar */
197
- showHeader: e(o(), !0),
205
+ showHeader: e(a(), !0),
198
206
  /** Custom label for back button (if shown) */
199
207
  backButtonLabel: e(t())
200
- }), U = a({
208
+ }), U = o({
201
209
  /** Enable dynamic content insertion */
202
- dynamicContent: e(o(), !0),
210
+ dynamicContent: e(a(), !0),
203
211
  /** Enable save as template functionality */
204
- saveAsTemplate: e(o(), !0),
212
+ saveAsTemplate: e(a(), !0),
205
213
  /** Enable version history */
206
- versionHistory: e(o(), !0),
214
+ versionHistory: e(a(), !0),
207
215
  /** Enable test message sending */
208
- testMessage: e(o(), !0),
216
+ testMessage: e(a(), !0),
209
217
  /** Enable display conditions */
210
- displayConditions: e(o(), !0),
218
+ displayConditions: e(a(), !0),
211
219
  /** Enable unsubscribe block */
212
- unsubscribe: e(o(), !0),
220
+ unsubscribe: e(a(), !0),
213
221
  /** Disable modules panel in the editor */
214
- modulesDisabled: e(o(), !1),
222
+ modulesDisabled: e(a(), !1),
215
223
  /** Enable Liquid template syntax */
216
- liquidSyntax: e(o(), !1),
224
+ liquidSyntax: e(a(), !1),
217
225
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
218
- autosave: e(o(), !1),
219
- accessibilityTesting: e(o(), !1),
226
+ autosave: e(a(), !1),
220
227
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
221
- allowlistEnabled: e(o(), !1),
228
+ allowlistEnabled: e(a(), !1),
222
229
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
223
- linkTrackingIds: e(o(), !1),
224
- reusableRecommendationStrategy: e(o(), !1)
230
+ linkTrackingIds: e(a(), !1),
231
+ reusableRecommendationStrategy: e(a(), !1)
225
232
  }), B = i([
226
233
  "amp-accordion",
227
234
  "amp-carousel",
@@ -244,7 +251,7 @@ const p = {
244
251
  "unsubscribe-block",
245
252
  "coupon-block",
246
253
  "items-block"
247
- ]), H = a({
254
+ ]), H = o({
248
255
  /** Default blocks to exclude from the editor */
249
256
  excludeDefaults: e(
250
257
  c(B),
@@ -255,14 +262,14 @@ const p = {
255
262
  c(w),
256
263
  []
257
264
  )
258
- }), d = a({
265
+ }), d = o({
259
266
  /** Unique identifier for the rule */
260
267
  id: t(),
261
268
  /** Human-readable description */
262
269
  description: e(t()),
263
270
  /** Priority for rule ordering (lower = earlier) */
264
271
  priority: n()
265
- }), _ = a({
272
+ }), _ = o({
266
273
  ...d.entries,
267
274
  type: u("replace"),
268
275
  /** String to search for */
@@ -270,8 +277,8 @@ const p = {
270
277
  /** Replacement string */
271
278
  replacement: t(),
272
279
  /** Replace all occurrences (default: false) */
273
- replaceAll: e(o())
274
- }), j = a({
280
+ replaceAll: e(a())
281
+ }), j = o({
275
282
  ...d.entries,
276
283
  type: u("regex"),
277
284
  /** Regex pattern string */
@@ -280,12 +287,12 @@ const p = {
280
287
  replacement: t(),
281
288
  /** Regex flags (e.g., 'gi') */
282
289
  flags: e(t())
283
- }), q = a({
290
+ }), q = o({
284
291
  ...d.entries,
285
292
  type: u("remove"),
286
293
  /** Strings or patterns to remove */
287
294
  targets: c(t())
288
- }), G = a({
295
+ }), G = o({
289
296
  ...d.entries,
290
297
  type: u("custom"),
291
298
  /** Custom processor function */
@@ -293,17 +300,17 @@ const p = {
293
300
  (s) => typeof s == "function",
294
301
  "processor must be a function"
295
302
  )
296
- }), V = T("type", [
303
+ }), V = I("type", [
297
304
  _,
298
305
  j,
299
306
  q,
300
307
  G
301
- ]), z = a({
308
+ ]), z = o({
302
309
  /** Custom compiler rules to apply */
303
310
  customRules: e(c(V), []),
304
311
  /** Skip default compiler rules */
305
- ignoreDefaultRules: e(o(), !1)
306
- }), Z = a({
312
+ ignoreDefaultRules: e(a(), !1)
313
+ }), Z = o({
307
314
  /**
308
315
  * External validation handler called before save completes.
309
316
  * Return false to cancel the save operation.
@@ -314,7 +321,7 @@ const p = {
314
321
  "externalValidation must be a function"
315
322
  )
316
323
  )
317
- }), Q = a({
324
+ }), Q = o({
318
325
  // Required sections
319
326
  /** Identity configuration (required) */
320
327
  identity: A,
@@ -345,7 +352,7 @@ export {
345
352
  G as CustomRuleSchema,
346
353
  B as DefaultBlockTypeSchema,
347
354
  N as DynamicContentListSchema,
348
- f as DynamicContentNodeSchema,
355
+ S as DynamicContentNodeSchema,
349
356
  E as DynamicContentSchema,
350
357
  O as EditorSchema,
351
358
  D as EmailHeaderSchema,
@@ -1,20 +1,20 @@
1
- import a from "./Guido.vue2.js";
1
+ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
- var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : o._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
5
+ var a = this, r = a._self._c, e = a._self._setupProxy;
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, s = [], n = /* @__PURE__ */ i(
10
- a,
10
+ o,
11
11
  t,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "f9694296"
15
+ "36867e2e"
16
16
  );
17
- const c = n.exports;
17
+ const g = n.exports;
18
18
  export {
19
- c as default
19
+ g as default
20
20
  };
@@ -1,62 +1,57 @@
1
- import { defineComponent as ne, defineAsyncComponent as l, ref as _, computed as u, watch as P, onMounted as re, onUnmounted as se } from "vue";
1
+ import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as x, onMounted as se, onUnmounted as ae } from "vue";
2
2
  import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as ae } from "../composables/useEditorLock.js";
4
- import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
5
- import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js";
6
- import { usePartner as me } from "../composables/usePartner.js";
7
- import { useStripo as le } from "../composables/useStripo.js";
8
- import { useTimerClone as ue } from "../composables/useTimerClone.js";
9
- import { migrate as x } from "../config/migrator/index.js";
10
- import { ModuleFolderDefaults as H } from "../enums/defaults.js";
11
- import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
12
- import { useRecommendationExtensionStore as W } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
- import fe from "./organisms/AutoSaveController.vue.js";
14
- import ye from "./organisms/base/Toaster.vue.js";
15
- import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import ve from "./organisms/header/HeaderWrapper.vue.js";
3
+ import { useEditorLock as ce } from "../composables/useEditorLock.js";
4
+ import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
5
+ import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
6
+ import { usePartner as le } from "../composables/usePartner.js";
7
+ import { useStripo as ue } from "../composables/useStripo.js";
8
+ import { useTimerClone as pe } from "../composables/useTimerClone.js";
9
+ import { migrate as W } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as G } from "../enums/defaults.js";
11
+ import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
12
+ import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
+ import ye from "./organisms/AutoSaveController.vue.js";
14
+ import ge from "./organisms/base/Toaster.vue.js";
15
+ import ve from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
+ import Se from "./organisms/header/HeaderWrapper.vue.js";
17
17
  import be from "./organisms/LoadingWrapper.vue.js";
18
- import Se from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import he from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as Ee } from "../services/stripoApi.js";
21
- import { useConfigStore as we } from "../stores/config.js";
22
- import { useDynamicContentStore as Ce } from "../stores/dynamic-content.js";
23
- import { useEditorStore as G } from "../stores/editor.js";
18
+ import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
+ import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
+ import { useStripoApi as we } from "../services/stripoApi.js";
21
+ import { useConfigStore as Ce } from "../stores/config.js";
22
+ import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
23
+ import { useEditorStore as H } from "../stores/editor.js";
24
24
  import { usePreviewStore as ke } from "../stores/preview.js";
25
- import { useTemplateStore as De } from "../stores/template.js";
26
- import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
25
+ import { useTemplateStore as Te } from "../stores/template.js";
26
+ import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
27
27
  import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
28
- const et = /* @__PURE__ */ ne({
28
+ const tt = /* @__PURE__ */ re({
29
29
  __name: "Guido",
30
30
  props: {
31
31
  config: null,
32
32
  ready: { type: Boolean, default: !0 }
33
33
  },
34
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup(z, { expose: V, emit: r }) {
36
- const a = z, q = l(
35
+ setup(z, { expose: q, emit: r }) {
36
+ const a = z, K = m(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), K = l(
38
+ ), V = m(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), j = l(
40
+ ), j = m(
41
41
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
42
- ), J = l(
42
+ ), J = m(
43
43
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
44
- ), h = _(), p = _(), f = Ce(), E = Te(), o = we();
44
+ ), Q = m(
45
+ () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
46
+ ), E = O(), p = O(), f = De(), w = Fe(), o = Ce();
45
47
  a.ready && o.init(a.config);
46
- const s = G(), Q = ke(), m = u(() => s.hasChanges), { isTestPartner: X } = me(), w = () => {
48
+ const c = H(), X = ke(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), C = () => {
47
49
  var t;
48
- if (!s.isNormalMode) {
49
- console.debug("guido:save:silent:blocked", {
50
- isVersionHistoryOpen: s.isVersionHistoryOpen,
51
- isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
52
- });
53
- return;
54
- }
55
- return (t = h.value) == null ? void 0 : t.saveSilent();
56
- }, C = (t) => {
57
- s.loadingStatus = t;
50
+ return (t = E.value) == null ? void 0 : t.handleSave(!0);
51
+ }, D = (t) => {
52
+ c.loadingStatus = t;
58
53
  };
59
- ie(), de();
54
+ ie(), me();
60
55
  const y = () => {
61
56
  var t, e;
62
57
  return {
@@ -64,18 +59,18 @@ const et = /* @__PURE__ */ ne({
64
59
  userId: o.userId,
65
60
  username: o.username,
66
61
  partnerName: o.partnerName,
67
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || H.SAVED_MODULES,
68
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || H.DEFAULT_MODULES
62
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
63
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
69
64
  };
70
- }, { initPlugin: k, preloadRuntime: D } = le(), { runExclusive: T, beginMount: F, isCurrentMount: M } = ae();
65
+ }, { initPlugin: k, preloadRuntime: T } = ue(), { runExclusive: F, beginMount: M, isCurrentMount: R } = ce();
71
66
  let g = 0;
72
- const { getDefaultTemplate: I } = Ee(), { cloneTimersOnSave: R, hasTimerBlocks: L } = ue(), Y = u(() => {
67
+ const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: B } = pe(), Z = u(() => {
73
68
  var t;
74
69
  return !((t = o.ui) != null && t.showHeader);
75
- }), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
76
- () => !!W().recommendationConfigs.strategyId
70
+ }), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
71
+ () => !!h().recommendationConfigs.strategyId
77
72
  );
78
- ce({
73
+ de({
79
74
  onBack: () => {
80
75
  console.debug("guido:back"), r("back");
81
76
  },
@@ -90,80 +85,80 @@ const et = /* @__PURE__ */ ne({
90
85
  console.debug("guido:test-email:click"), r("test-email:click");
91
86
  }
92
87
  });
93
- const O = (t) => {
88
+ const U = (t) => {
94
89
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
95
90
  }, A = () => {
96
91
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
97
92
  };
98
- P(() => m.value, () => {
99
- r("on-change", m.value);
93
+ x(() => l.value, () => {
94
+ r("on-change", l.value);
100
95
  });
101
96
  const v = (t) => {
102
- const e = t, { attribute: i, position: d } = e.detail;
103
- console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
97
+ const e = t, { attribute: s, position: d } = e.detail;
98
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
104
99
  };
105
- let c = null;
106
- const b = () => {
100
+ let i = null;
101
+ const S = () => {
107
102
  var e;
108
- const t = document.querySelector(pe);
103
+ const t = document.querySelector(fe);
109
104
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
110
- }, S = async () => {
105
+ }, b = async () => {
111
106
  var t;
112
107
  try {
113
- o.initialized || o.init(a.config), s.templateId = o.templateId;
114
- const e = o.template, i = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
115
- E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
116
- const N = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, U = o.isFeatureEnabled("linkTrackingIds");
108
+ o.initialized || o.init(a.config), c.templateId = o.templateId;
109
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", P = (e == null ? void 0 : e.preselectedDynamicContent) || [];
110
+ w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
111
+ const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
117
112
  let n = {
118
- html: i && await x(i, N),
113
+ html: s && await W(s, _),
119
114
  css: d
120
115
  };
121
- n.html || (n = await I(), n.html = await x(n.html, N));
122
- const te = U ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
123
- L(n.html) && (n.html = await R(n.html)), U && (s.trackIdSessionFloor = Math.max(te, $(n.html)));
124
- const oe = {
125
- preselectedDynamicContentList: B,
116
+ n.html || (n = await I(), n.html = await W(n.html, _));
117
+ const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
118
+ B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
119
+ const ne = {
120
+ preselectedDynamicContentList: P,
126
121
  onReady: () => {
127
122
  console.debug("guido:ready"), r("ready");
128
123
  }
129
124
  };
130
- g = F(), await k(n, y(), oe), f.selectedDynamicContentList = B;
125
+ g = M(), await k(n, y(), ne), f.selectedDynamicContentList = P;
131
126
  } catch (e) {
132
127
  console.error("Failed to initialize Stripo editor:", e);
133
128
  }
134
129
  };
135
- return re(async () => {
130
+ return se(async () => {
136
131
  var e;
137
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), W().$reset(), G().$reset(), De().$reset(), b();
132
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), Te().$reset(), S();
138
133
  const t = (e = p.value) == null ? void 0 : e.parentElement;
139
- if (t && (c = new ResizeObserver(b), c.observe(t)), D(), a.ready)
140
- await S();
134
+ if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
135
+ await b();
141
136
  else {
142
- const i = P(() => a.ready, (d) => {
143
- d && (i(), S());
137
+ const s = x(() => a.ready, (d) => {
138
+ d && (s(), b());
144
139
  });
145
140
  }
146
141
  document.addEventListener("dynamic-content:open", v);
147
- }), se(() => {
148
- c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", v), T(async () => {
149
- if (M(g))
142
+ }), ae(() => {
143
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
144
+ if (R(g))
150
145
  try {
151
146
  window.UIEditor.removeEditor();
152
147
  } catch {
153
148
  console.debug("Failed to remove Stripo editor: No editor found");
154
149
  }
155
150
  }), o.reset();
156
- }), V({
151
+ }), q({
157
152
  dynamicContent: {
158
- insert: O,
153
+ insert: U,
159
154
  close: A
160
155
  },
161
- hasChanges: m,
162
- saveSilent: w,
163
- setLoading: C
164
- }), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, AssignStrategyDrawer: j, RemoveStrategyModal: J, autoSaveControllerRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: s, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: D, runExclusive: T, beginMount: F, isCurrentMount: M, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: R, hasTimerBlocks: L, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: O, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: c, updateRibbonOffset: b, startEditor: S, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: be, SaveAsTemplateDrawer: Se, UnsubscribeWrapper: he };
156
+ hasChanges: l,
157
+ saveSilent: C,
158
+ setLoading: D
159
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: M, isCurrentMount: R, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: U, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
165
160
  }
166
161
  });
167
162
  export {
168
- et as default
163
+ tt as default
169
164
  };
@@ -1,15 +1,13 @@
1
- import { defineComponent as r } from "vue";
2
- import { useAutoSave as s } from "../../composables/useAutoSave.js";
3
- import { useSave as a } from "../../composables/useSave.js";
4
- const p = /* @__PURE__ */ r({
1
+ import { defineComponent as t } from "vue";
2
+ import { useAutoSave as r } from "../../composables/useAutoSave.js";
3
+ import { useSave as s } from "../../composables/useSave.js";
4
+ const f = /* @__PURE__ */ t({
5
5
  __name: "AutoSaveController",
6
- setup(n, { expose: t }) {
7
- const { save: e } = a(), o = () => e(!1, !0);
8
- return s(o), t({
9
- saveSilent: () => e(!0)
10
- }), { __sfc: !0, save: e, backgroundSave: o };
6
+ setup(a) {
7
+ const { save: e } = s(), o = () => e(!1, !0);
8
+ return r(o), { __sfc: !0, save: e, backgroundSave: o };
11
9
  }
12
10
  });
13
11
  export {
14
- p as default
12
+ f as default
15
13
  };