@useinsider/guido 2.1.0-beta.fb6f235 → 2.1.0-beta.fb7fb56

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 (172) hide show
  1. package/README.md +13 -22
  2. package/dist/@types/config/schemas.js +57 -56
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +63 -62
  5. package/dist/components/organisms/base/Toaster.vue.js +4 -4
  6. package/dist/components/organisms/base/Toaster.vue2.js +12 -9
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
  9. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
  10. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
  11. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
  12. package/dist/composables/useBlocksConfig.js +21 -20
  13. package/dist/composables/useHtmlValidator.js +114 -104
  14. package/dist/composables/useRecommendation.js +54 -21
  15. package/dist/composables/useStripo.js +25 -23
  16. package/dist/composables/useVersionHistoryApi.js +1 -1
  17. package/dist/config/compiler/recommendationCompilerRules.js +45 -39
  18. package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
  19. package/dist/config/i18n/en/index.js +11 -0
  20. package/dist/config/i18n/en/labels.json.js +7 -0
  21. package/dist/config/i18n/en/toasters.json.js +56 -0
  22. package/dist/config/i18n/en/tooltips.json.js +82 -0
  23. package/dist/config/i18n/index.js +7 -0
  24. package/dist/config/migrator/itemsBlockMigrator.js +127 -122
  25. package/dist/config/migrator/recommendationMigrator.js +2 -2
  26. package/dist/enums/defaults.js +8 -4
  27. package/dist/enums/extensions/recommendationBlock.js +1 -1
  28. package/dist/enums/recommendation.js +16 -15
  29. package/dist/extensions/Blocks/Recommendation/block.js +133 -9
  30. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
  31. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
  32. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +66 -0
  33. package/dist/extensions/Blocks/Recommendation/constants/layout.js +22 -0
  34. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +21 -0
  35. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
  36. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
  37. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
  38. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
  39. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
  40. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
  41. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
  42. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
  43. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +250 -0
  44. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
  45. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +160 -0
  46. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
  47. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +307 -0
  48. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
  49. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
  50. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
  51. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
  52. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
  53. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
  54. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
  55. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
  56. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
  57. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
  58. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
  59. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
  60. package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
  61. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
  62. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
  63. package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
  64. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
  65. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
  66. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
  67. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
  68. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
  69. package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
  70. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
  71. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
  72. package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
  73. package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
  74. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
  75. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
  76. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
  77. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
  78. package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
  79. package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
  80. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
  81. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
  82. package/dist/extensions/Blocks/controlFactories.js +125 -93
  83. package/dist/extensions/ModulesTabIcons/extension.js +10 -9
  84. package/dist/guido.css +1 -1
  85. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +242 -186
  86. package/dist/services/recommendationApi.js +11 -8
  87. package/dist/services/stripoApi.js +20 -17
  88. package/dist/services/templateLibraryApi.js +16 -13
  89. package/dist/src/@types/config/schemas.d.ts +4 -4
  90. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
  91. package/dist/src/composables/useRecommendation.d.ts +1 -0
  92. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
  93. package/dist/src/config/i18n/en/index.d.ts +1 -0
  94. package/dist/src/config/i18n/index.d.ts +16 -0
  95. package/dist/src/enums/defaults.d.ts +4 -0
  96. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
  97. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
  98. package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
  99. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
  100. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
  101. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +41 -0
  102. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +35 -0
  103. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
  104. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
  105. package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
  106. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
  107. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
  108. package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
  109. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
  110. package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
  111. package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
  112. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
  113. package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
  114. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
  115. package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +221 -0
  117. package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
  118. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
  119. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
  120. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
  121. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
  122. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
  123. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
  124. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
  125. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
  126. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
  127. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
  128. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
  129. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
  130. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
  131. package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
  132. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
  133. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
  134. package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
  135. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
  136. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
  137. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
  138. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
  139. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
  140. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
  141. package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
  142. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +166 -0
  143. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
  144. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
  145. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
  146. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
  147. package/dist/static/styles/components/notification.css.js +19 -0
  148. package/dist/static/styles/components/tools.css.js +6 -2
  149. package/dist/static/styles/components/version-history.css.js +10 -2
  150. package/dist/static/styles/components/wide-panel.css.js +18 -2
  151. package/dist/static/styles/customEditorStyle.css.js +35 -11
  152. package/dist/static/styles/variables.css.js +2 -0
  153. package/dist/static/templates/empty/index.html.js +74 -0
  154. package/dist/static/templates/empty/style.css.js +779 -0
  155. package/dist/stores/unsubscribe.js +37 -34
  156. package/dist/utils/pairProductVariables.js +57 -56
  157. package/dist/utils/templatePreparation.js +15 -14
  158. package/package.json +1 -1
  159. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
  160. package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
  161. package/dist/extensions/Blocks/Recommendation/control.js +0 -336
  162. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
  163. package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
  164. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
  165. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
  166. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
  167. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
  168. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
  169. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
  170. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
  171. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
  172. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
package/README.md CHANGED
@@ -122,8 +122,8 @@ const config: GuidoConfigInput = {
122
122
  senderName?: string,
123
123
  subject?: string,
124
124
  },
125
- savedModulesFolderName?: string, // Default: 'savedModules' sent as guido_{partnerName}_{value}
126
- defaultModulesFolderName?: string, // Default: 'defaultModules' sent as guido_{value}
125
+ savedModulesFolderName?: string, // Default: 'savedModules' - folder name for user-saved modules
126
+ defaultModulesFolderName?: string, // Default: 'defaultModules' - folder name for default/prebuilt modules
127
127
  },
128
128
 
129
129
  // Optional: UI settings
@@ -260,39 +260,30 @@ const config: GuidoConfigInput = {
260
260
 
261
261
  ## Module Folder Configuration
262
262
 
263
- Customize the Stripo module folder names for saved and default modules:
263
+ 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
264
 
265
265
  ```typescript
266
266
  const config: GuidoConfigInput = {
267
267
  identity: { templateId: 'tpl-123', userId: 'user-456' },
268
268
  partner: { name: 'acme' },
269
269
  editor: {
270
- // Custom folder for user-saved modules
271
- // Sent to Stripo as: guido_acme_myCustomModules
272
- savedModulesFolderName: 'myCustomModules',
270
+ // Folder name for user-saved modules
271
+ savedModulesFolderName: 'savedModules',
273
272
 
274
- // Custom folder for default/prebuilt modules
275
- // Sent to Stripo as: guido_myPrebuilts
276
- defaultModulesFolderName: 'myPrebuilts',
273
+ // Folder name for default/prebuilt modules
274
+ defaultModulesFolderName: 'defaultModules',
277
275
  },
278
276
  };
279
277
  ```
280
278
 
281
- ### Folder Naming Convention
279
+ ### Default Values
282
280
 
283
- | Config Option | Default Value | Stripo Folder Name |
284
- |--------------|---------------|-------------------|
285
- | `savedModulesFolderName` | `'savedModules'` | `guido_{partnerName}_{value}` |
286
- | `defaultModulesFolderName` | `'defaultModules'` | `guido_{value}` |
281
+ | Config Option | Default Value |
282
+ |--------------|---------------|
283
+ | `savedModulesFolderName` | `'savedModules'` |
284
+ | `defaultModulesFolderName` | `'defaultModules'` |
287
285
 
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` |
286
+ > **Note:** The actual folder paths (e.g., `guido_acme_savedModules`) are configured in the Stripo plugin panel using variable substitution like `${savedModulesFolderName}`.
296
287
 
297
288
  ---
298
289
 
@@ -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,10 +1,10 @@
1
- import e from "./Toaster.vue2.js";
1
+ import n from "./Toaster.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var r = function() {
4
- var o = this, n = o._self._c, t = o._self._setupProxy;
5
- return n(t.InToasts, { attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
4
+ var o = this, e = o._self._c, t = o._self._setupProxy;
5
+ return e(t.InToasts, { ref: "toastRef", attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- e,
7
+ n,
8
8
  r,
9
9
  a,
10
10
  !1,
@@ -1,15 +1,18 @@
1
- import { defineComponent as n, computed as e } from "vue";
2
- import { useToasterStore as i } from "../../../stores/toaster.js";
3
- import { InToasts as c } from "@useinsider/design-system-vue";
4
- const f = /* @__PURE__ */ n({
1
+ import { defineComponent as a, ref as c, computed as i, onBeforeUnmount as u } from "vue";
2
+ import { useToasterStore as f } from "../../../stores/toaster.js";
3
+ import { InToasts as m } from "@useinsider/design-system-vue";
4
+ const d = /* @__PURE__ */ a({
5
5
  __name: "Toaster",
6
- setup(s) {
7
- const t = i(), o = e(() => t.actionButton ? [{ text: t.actionButton.text }] : []);
8
- return { __sfc: !0, store: t, actionButtonsConfig: o, handleActionClick: () => {
6
+ setup(p) {
7
+ const t = f(), o = c(null), r = i(() => t.actionButton ? [{ text: t.actionButton.text }] : []), s = () => {
9
8
  t.actionButton && t.actionButton.onClick(), t.hideToaster();
10
- }, InToasts: c };
9
+ };
10
+ return u(() => {
11
+ var e, n;
12
+ t.$reset(), (n = (e = o.value) == null ? void 0 : e.$el) == null || n.remove();
13
+ }), { __sfc: !0, store: t, toastRef: o, actionButtonsConfig: r, handleActionClick: s, InToasts: m };
11
14
  }
12
15
  });
13
16
  export {
14
- f as default
17
+ d as default
15
18
  };
@@ -1,16 +1,16 @@
1
- import i from "./EmailSizeIndicator.vue2.js";
1
+ import s from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return e.previewStore.previewHtml ? s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(e.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: e.htmlSize, "max-value": e.MAX_EMAIL_SIZE_IN_KB, type: e.progress.type, value: e.progress.value } }), s(e.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: e.trans("email-editor.preview-design-size-tooltip") } })], 1) : t._e();
5
+ var e = this, i = e._self._c, t = e._self._setupProxy;
6
+ return t.previewStore.previewHtml ? i("div", { staticClass: "d-f a-i-c j-c-c" }, [i(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), i(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })], 1) : e._e();
7
7
  }, a = [], n = /* @__PURE__ */ r(
8
- i,
8
+ s,
9
9
  o,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "913a3417"
13
+ "079d2bf7"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
2
2
  import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
3
  import { usePreviewStore as _ } from "../../../../stores/preview.js";
4
- import { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
4
+ import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
5
5
  const S = /* @__PURE__ */ c({
6
6
  __name: "EmailSizeIndicator",
7
7
  setup(w) {
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
17
17
  }, i = p();
18
18
  return u(() => t.previewHtml, () => {
19
19
  r();
20
- }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: v };
20
+ }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
21
21
  }
22
22
  });
23
23
  export {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as n, ref as a, computed as l } from "vue";
2
2
  import i from "../../../wrappers/WpDrawer.vue.js";
3
- import { useTranslations as p } from "../../../../composables/useTranslations.js";
4
- import { useRecommendationExtensionStore as c } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
3
+ import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
+ import { useRecommendationExtensionStore as p } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
5
  import u from "./Filters.vue.js";
6
- const b = /* @__PURE__ */ n({
6
+ const v = /* @__PURE__ */ n({
7
7
  __name: "FilterSelectionDrawer",
8
- setup(m) {
9
- const t = p(), o = c(), e = a(!1), s = l(() => ({
8
+ setup(f) {
9
+ const r = c(), t = p(), e = a(!1), s = l(() => ({
10
10
  primaryButton: {
11
11
  styling: "solid",
12
12
  type: "primary",
13
- labelText: t(
13
+ labelText: r(
14
14
  e.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
15
15
  ),
16
16
  loadingStatus: e.value,
@@ -19,19 +19,20 @@ const b = /* @__PURE__ */ n({
19
19
  cancelOrBackButton: {
20
20
  styling: "ghost",
21
21
  type: "secondary",
22
- labelText: t("products.cancel"),
22
+ labelText: r("products.cancel"),
23
23
  disabledStatus: e.value
24
24
  }
25
- })), r = () => {
26
- o.filterSelectionDrawerStatus = !1;
25
+ })), o = () => {
26
+ t.closeFilterDrawer();
27
27
  };
28
- return { __sfc: !0, trans: t, store: o, isApplying: e, footerButtonGroupOptions: s, closeModal: r, applyFilter: () => {
29
- e.value = !0, setTimeout(() => {
30
- console.debug("Filter applied!"), r(), o.generateFilterQuery();
31
- }, 2e3);
28
+ return { __sfc: !0, trans: r, store: t, isApplying: e, footerButtonGroupOptions: s, closeModal: o, applyFilter: () => {
29
+ e.value = !0, t.patchCurrentBlockConfig(
30
+ { filters: t.recommendationConfigs.filters },
31
+ { triggerRefetch: !0 }
32
+ ), o(), e.value = !1;
32
33
  }, WpDrawer: i, Filters: u };
33
34
  }
34
35
  });
35
36
  export {
36
- b as default
37
+ v as default
37
38
  };
@@ -16,7 +16,7 @@ var o = function() {
16
16
  i,
17
17
  !1,
18
18
  null,
19
- "a86fc486"
19
+ "df672485"
20
20
  );
21
21
  const _ = c.exports;
22
22
  export {