@useinsider/guido 2.1.0-beta.fd71a10 → 2.1.0-beta.ff1bc98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -36
- package/dist/@types/config/schemas.js +65 -70
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +58 -69
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/composables/useBlocksConfig.js +16 -26
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +116 -0
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +4 -8
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +16 -15
- package/dist/extensions/Blocks/Recommendation/block.js +133 -9
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +66 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +22 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +250 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +160 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +307 -0
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
- package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +233 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +174 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +225 -237
- package/dist/services/recommendationApi.js +11 -8
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +0 -8
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/enums/defaults.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +221 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +166 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
- package/dist/src/stores/config.d.ts +0 -36
- package/dist/static/styles/customEditorStyle.css.js +35 -11
- package/dist/utils/pairProductVariables.js +57 -56
- package/dist/utils/templatePreparation.js +15 -14
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/control.js +0 -336
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/extensions/ModulesTabIcons/extension.js +0 -17
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +0 -2
package/README.md
CHANGED
|
@@ -122,8 +122,6 @@ const config: GuidoConfigInput = {
|
|
|
122
122
|
senderName?: string,
|
|
123
123
|
subject?: string,
|
|
124
124
|
},
|
|
125
|
-
savedModulesFolderName?: string, // Default: 'savedModules' - folder name for user-saved modules
|
|
126
|
-
defaultModulesFolderName?: string, // Default: 'defaultModules' - folder name for default/prebuilt modules
|
|
127
125
|
},
|
|
128
126
|
|
|
129
127
|
// Optional: UI settings
|
|
@@ -143,11 +141,6 @@ const config: GuidoConfigInput = {
|
|
|
143
141
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
144
142
|
},
|
|
145
143
|
|
|
146
|
-
// Optional: Callbacks
|
|
147
|
-
callbacks?: {
|
|
148
|
-
externalValidation?: (data: SavedTemplateDetails) => Promise<boolean>, // Return false to cancel save
|
|
149
|
-
},
|
|
150
|
-
|
|
151
144
|
// Optional: Block configuration
|
|
152
145
|
blocks?: {
|
|
153
146
|
excludeDefaults?: DefaultBlockType[],
|
|
@@ -258,35 +251,6 @@ const config: GuidoConfigInput = {
|
|
|
258
251
|
|
|
259
252
|
---
|
|
260
253
|
|
|
261
|
-
## Module Folder Configuration
|
|
262
|
-
|
|
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
|
-
|
|
265
|
-
```typescript
|
|
266
|
-
const config: GuidoConfigInput = {
|
|
267
|
-
identity: { templateId: 'tpl-123', userId: 'user-456' },
|
|
268
|
-
partner: { name: 'acme' },
|
|
269
|
-
editor: {
|
|
270
|
-
// Folder name for user-saved modules
|
|
271
|
-
savedModulesFolderName: 'savedModules',
|
|
272
|
-
|
|
273
|
-
// Folder name for default/prebuilt modules
|
|
274
|
-
defaultModulesFolderName: 'defaultModules',
|
|
275
|
-
},
|
|
276
|
-
};
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### Default Values
|
|
280
|
-
|
|
281
|
-
| Config Option | Default Value |
|
|
282
|
-
|--------------|---------------|
|
|
283
|
-
| `savedModulesFolderName` | `'savedModules'` |
|
|
284
|
-
| `defaultModulesFolderName` | `'defaultModules'` |
|
|
285
|
-
|
|
286
|
-
> **Note:** The actual folder paths (e.g., `guido_acme_savedModules`) are configured in the Stripo plugin panel using variable substitution like `${savedModulesFolderName}`.
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
254
|
## HTML Compiler Rules
|
|
291
255
|
|
|
292
256
|
Add custom rules to transform HTML during export:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
1
|
+
import { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
|
|
3
2
|
const m = {
|
|
4
3
|
/** Promotional/marketing emails */
|
|
5
4
|
PROMOTIONAL: 1,
|
|
@@ -12,24 +11,24 @@ const m = {
|
|
|
12
11
|
ARCHITECT: 49,
|
|
13
12
|
/** Unsubscribe page builder */
|
|
14
13
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
},
|
|
14
|
+
}, S = o({
|
|
16
15
|
/** Unique identifier for the template being edited */
|
|
17
16
|
templateId: u(
|
|
18
17
|
t(),
|
|
19
|
-
|
|
18
|
+
p(1, "templateId is required")
|
|
20
19
|
),
|
|
21
20
|
/** Unique identifier for the user editing the template */
|
|
22
21
|
userId: u(
|
|
23
22
|
t(),
|
|
24
|
-
|
|
23
|
+
p(1, "userId is required")
|
|
25
24
|
),
|
|
26
25
|
/** Optional variation ID for A/B testing */
|
|
27
26
|
variationId: e(t())
|
|
28
|
-
}),
|
|
27
|
+
}), h = o({
|
|
29
28
|
/** Partner/organization name (required) */
|
|
30
29
|
name: u(
|
|
31
30
|
t(),
|
|
32
|
-
|
|
31
|
+
p(1, "partner.name is required")
|
|
33
32
|
),
|
|
34
33
|
/** Product type identifier */
|
|
35
34
|
productType: e(
|
|
@@ -47,7 +46,7 @@ const m = {
|
|
|
47
46
|
),
|
|
48
47
|
/** Display name for the current user */
|
|
49
48
|
username: e(t(), "Guido User")
|
|
50
|
-
}),
|
|
49
|
+
}), y = o({
|
|
51
50
|
/** Display text for the dynamic content */
|
|
52
51
|
text: t(),
|
|
53
52
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,14 +67,14 @@ const m = {
|
|
|
68
67
|
css: e(t(), ""),
|
|
69
68
|
/** Preselected dynamic content items */
|
|
70
69
|
preselectedDynamicContent: e(
|
|
71
|
-
|
|
70
|
+
a(y),
|
|
72
71
|
[]
|
|
73
72
|
),
|
|
74
73
|
/** Selected unsubscribe page IDs */
|
|
75
|
-
selectedUnsubscribePages: e(
|
|
74
|
+
selectedUnsubscribePages: e(a(b()), []),
|
|
76
75
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
77
|
-
forceRecreate: e(
|
|
78
|
-
}),
|
|
76
|
+
forceRecreate: e(c(), !1)
|
|
77
|
+
}), f = o({
|
|
79
78
|
/** Sender display name */
|
|
80
79
|
senderName: e(t(), ""),
|
|
81
80
|
/** Email subject line */
|
|
@@ -86,34 +85,30 @@ const m = {
|
|
|
86
85
|
/** Path to translations object */
|
|
87
86
|
translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
|
|
88
87
|
/** Migration date for template compatibility */
|
|
89
|
-
migrationDate: e(
|
|
88
|
+
migrationDate: e(b(), 1759696858),
|
|
90
89
|
/** Email header settings */
|
|
91
|
-
emailHeader: e(
|
|
92
|
-
|
|
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({
|
|
90
|
+
emailHeader: e(f, { senderName: "", subject: "" })
|
|
91
|
+
}), I = o({
|
|
97
92
|
/** Whether to show the header bar */
|
|
98
|
-
showHeader: e(
|
|
93
|
+
showHeader: e(c(), !0),
|
|
99
94
|
/** Custom label for back button (if shown) */
|
|
100
95
|
backButtonLabel: e(t())
|
|
101
|
-
}),
|
|
96
|
+
}), T = o({
|
|
102
97
|
/** Enable dynamic content insertion */
|
|
103
|
-
dynamicContent: e(
|
|
98
|
+
dynamicContent: e(c(), !0),
|
|
104
99
|
/** Enable save as template functionality */
|
|
105
|
-
saveAsTemplate: e(
|
|
100
|
+
saveAsTemplate: e(c(), !0),
|
|
106
101
|
/** Enable version history */
|
|
107
|
-
versionHistory: e(
|
|
102
|
+
versionHistory: e(c(), !0),
|
|
108
103
|
/** Enable test message sending */
|
|
109
|
-
testMessage: e(
|
|
104
|
+
testMessage: e(c(), !0),
|
|
110
105
|
/** Enable display conditions */
|
|
111
|
-
displayConditions: e(
|
|
106
|
+
displayConditions: e(c(), !0),
|
|
112
107
|
/** Enable unsubscribe block */
|
|
113
|
-
unsubscribe: e(
|
|
108
|
+
unsubscribe: e(c(), !0),
|
|
114
109
|
/** Disable modules panel in the editor */
|
|
115
|
-
modulesDisabled: e(
|
|
116
|
-
}),
|
|
110
|
+
modulesDisabled: e(c(), !1)
|
|
111
|
+
}), A = n([
|
|
117
112
|
"amp-accordion",
|
|
118
113
|
"amp-carousel",
|
|
119
114
|
"amp-form-controls",
|
|
@@ -138,12 +133,12 @@ const m = {
|
|
|
138
133
|
]), O = o({
|
|
139
134
|
/** Default blocks to exclude from the editor */
|
|
140
135
|
excludeDefaults: e(
|
|
141
|
-
|
|
136
|
+
a(A),
|
|
142
137
|
[]
|
|
143
138
|
),
|
|
144
139
|
/** Custom blocks to include in the editor */
|
|
145
140
|
includeCustoms: e(
|
|
146
|
-
|
|
141
|
+
a(g),
|
|
147
142
|
[]
|
|
148
143
|
)
|
|
149
144
|
}), l = o({
|
|
@@ -152,8 +147,8 @@ const m = {
|
|
|
152
147
|
/** Human-readable description */
|
|
153
148
|
description: e(t()),
|
|
154
149
|
/** Priority for rule ordering (lower = earlier) */
|
|
155
|
-
priority:
|
|
156
|
-
}),
|
|
150
|
+
priority: b()
|
|
151
|
+
}), E = o({
|
|
157
152
|
...l.entries,
|
|
158
153
|
type: r("replace"),
|
|
159
154
|
/** String to search for */
|
|
@@ -161,8 +156,8 @@ const m = {
|
|
|
161
156
|
/** Replacement string */
|
|
162
157
|
replacement: t(),
|
|
163
158
|
/** Replace all occurrences (default: false) */
|
|
164
|
-
replaceAll: e(
|
|
165
|
-
}),
|
|
159
|
+
replaceAll: e(c())
|
|
160
|
+
}), N = o({
|
|
166
161
|
...l.entries,
|
|
167
162
|
type: r("regex"),
|
|
168
163
|
/** Regex pattern string */
|
|
@@ -171,82 +166,82 @@ const m = {
|
|
|
171
166
|
replacement: t(),
|
|
172
167
|
/** Regex flags (e.g., 'gi') */
|
|
173
168
|
flags: e(t())
|
|
174
|
-
}),
|
|
169
|
+
}), L = o({
|
|
175
170
|
...l.entries,
|
|
176
171
|
type: r("remove"),
|
|
177
172
|
/** Strings or patterns to remove */
|
|
178
|
-
targets:
|
|
179
|
-
}),
|
|
173
|
+
targets: a(t())
|
|
174
|
+
}), v = o({
|
|
180
175
|
...l.entries,
|
|
181
176
|
type: r("custom"),
|
|
182
177
|
/** Custom processor function */
|
|
183
|
-
processor:
|
|
178
|
+
processor: d(
|
|
184
179
|
(i) => typeof i == "function",
|
|
185
180
|
"processor must be a function"
|
|
186
181
|
)
|
|
187
|
-
}),
|
|
188
|
-
|
|
189
|
-
M,
|
|
182
|
+
}), x = k("type", [
|
|
183
|
+
E,
|
|
190
184
|
N,
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
L,
|
|
186
|
+
v
|
|
187
|
+
]), B = o({
|
|
193
188
|
/** Custom compiler rules to apply */
|
|
194
|
-
customRules: e(
|
|
189
|
+
customRules: e(a(x), []),
|
|
195
190
|
/** Skip default compiler rules */
|
|
196
|
-
ignoreDefaultRules: e(
|
|
197
|
-
}),
|
|
191
|
+
ignoreDefaultRules: e(c(), !1)
|
|
192
|
+
}), P = o({
|
|
198
193
|
/**
|
|
199
194
|
* External validation handler called before save completes.
|
|
200
195
|
* Return false to cancel the save operation.
|
|
201
196
|
*/
|
|
202
197
|
externalValidation: e(
|
|
203
|
-
|
|
198
|
+
d(
|
|
204
199
|
(i) => typeof i == "function",
|
|
205
200
|
"externalValidation must be a function"
|
|
206
201
|
)
|
|
207
202
|
)
|
|
208
|
-
}),
|
|
203
|
+
}), D = o({
|
|
209
204
|
// Required sections
|
|
210
205
|
/** Identity configuration (required) */
|
|
211
|
-
identity:
|
|
206
|
+
identity: S,
|
|
212
207
|
/** Partner configuration (required) */
|
|
213
|
-
partner:
|
|
208
|
+
partner: h,
|
|
214
209
|
// Optional sections (with defaults)
|
|
215
210
|
/** Template content and presets */
|
|
216
211
|
template: e(R, {}),
|
|
217
212
|
/** Editor settings */
|
|
218
213
|
editor: e(C, {}),
|
|
219
214
|
/** UI configuration */
|
|
220
|
-
ui: e(
|
|
215
|
+
ui: e(I, {}),
|
|
221
216
|
/** Feature toggles */
|
|
222
|
-
features: e(
|
|
217
|
+
features: e(T, {}),
|
|
223
218
|
/** Block configuration */
|
|
224
219
|
blocks: e(O, {}),
|
|
225
220
|
/** Compiler configuration */
|
|
226
|
-
compiler: e(
|
|
221
|
+
compiler: e(B, {}),
|
|
227
222
|
/** Callbacks and event handlers */
|
|
228
|
-
callbacks: e(
|
|
223
|
+
callbacks: e(P, {})
|
|
229
224
|
});
|
|
230
225
|
export {
|
|
231
226
|
O as BlocksSchema,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
P as CallbacksSchema,
|
|
228
|
+
x as CompilerRuleSchema,
|
|
229
|
+
B as CompilerSchema,
|
|
235
230
|
g as CustomBlockTypeSchema,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
231
|
+
v as CustomRuleSchema,
|
|
232
|
+
A as DefaultBlockTypeSchema,
|
|
233
|
+
y as DynamicContentSchema,
|
|
239
234
|
C as EditorSchema,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
f as EmailHeaderSchema,
|
|
236
|
+
T as FeaturesSchema,
|
|
237
|
+
D as GuidoConfigSchema,
|
|
238
|
+
S as IdentitySchema,
|
|
244
239
|
m as MessageType,
|
|
245
|
-
|
|
240
|
+
h as PartnerSchema,
|
|
246
241
|
s as ProductType,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
242
|
+
N as RegexRuleSchema,
|
|
243
|
+
L as RemoveRuleSchema,
|
|
244
|
+
E as ReplaceRuleSchema,
|
|
250
245
|
R as TemplateSchema,
|
|
251
|
-
|
|
246
|
+
I as UISchema
|
|
252
247
|
};
|
|
@@ -1,65 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
const Le = /* @__PURE__ */ z({
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
|
|
2
|
+
import { provideGuidoActions as M } 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 J } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
7
|
+
import Q from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import V from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
9
|
+
import X from "./organisms/header/HeaderWrapper.vue.js";
|
|
10
|
+
import Y from "./organisms/LoadingWrapper.vue.js";
|
|
11
|
+
import Z from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
12
|
+
import $ from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
13
|
+
import { useStripoApi as ee } from "../services/stripoApi.js";
|
|
14
|
+
import { useConfigStore as oe } from "../stores/config.js";
|
|
15
|
+
import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
|
|
16
|
+
import { useEditorStore as ne } from "../stores/editor.js";
|
|
17
|
+
import { usePreviewStore as re } from "../stores/preview.js";
|
|
18
|
+
import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ B({
|
|
21
20
|
__name: "Guido",
|
|
22
21
|
props: {
|
|
23
22
|
config: null
|
|
24
23
|
},
|
|
25
24
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
25
|
+
setup(_, { expose: I, emit: t }) {
|
|
26
|
+
const l = _, L = P(
|
|
28
27
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
29
|
-
),
|
|
28
|
+
), A = P(
|
|
30
29
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
31
|
-
), p =
|
|
32
|
-
|
|
33
|
-
const i =
|
|
30
|
+
), p = N(), c = te(), u = se(), n = oe();
|
|
31
|
+
n.init(l.config);
|
|
32
|
+
const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
|
|
34
33
|
var e;
|
|
35
34
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
36
|
-
}, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
username:
|
|
42
|
-
|
|
43
|
-
editor: n
|
|
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;
|
|
45
|
-
i.templateId = d;
|
|
46
|
-
const { initPlugin: E } = X({
|
|
47
|
-
emailId: d,
|
|
48
|
-
userId: h,
|
|
49
|
-
username: S,
|
|
50
|
-
partnerName: f,
|
|
35
|
+
}, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
36
|
+
i.templateId = a;
|
|
37
|
+
const { initPlugin: S } = q({
|
|
38
|
+
emailId: a,
|
|
39
|
+
userId: y,
|
|
40
|
+
username: f,
|
|
41
|
+
partnerName: h,
|
|
51
42
|
productType: b,
|
|
52
43
|
preselectedDynamicContentList: m,
|
|
53
|
-
savedModulesFolderName: w,
|
|
54
|
-
defaultModulesFolderName: D,
|
|
55
44
|
onReady: () => {
|
|
56
45
|
console.debug("guido:ready"), t("ready");
|
|
57
46
|
}
|
|
58
|
-
}), { getDefaultTemplate:
|
|
47
|
+
}), { getDefaultTemplate: w } = ee(), { cloneTimersOnSave: C, hasTimerBlocks: D } = J(), H = U(() => {
|
|
59
48
|
var e;
|
|
60
|
-
return !((e =
|
|
49
|
+
return !((e = n.ui) != null && e.showHeader);
|
|
61
50
|
});
|
|
62
|
-
|
|
51
|
+
M({
|
|
63
52
|
onBack: () => {
|
|
64
53
|
console.debug("guido:back"), t("back");
|
|
65
54
|
},
|
|
@@ -73,49 +62,49 @@ const Le = /* @__PURE__ */ z({
|
|
|
73
62
|
console.debug("guido:test-email:click"), t("test-email:click");
|
|
74
63
|
}
|
|
75
64
|
});
|
|
76
|
-
const
|
|
77
|
-
console.debug("dynamic-content:close", e),
|
|
78
|
-
},
|
|
65
|
+
const E = (e) => {
|
|
66
|
+
console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
67
|
+
}, k = () => {
|
|
79
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
80
69
|
};
|
|
81
|
-
|
|
82
|
-
t("on-change",
|
|
70
|
+
R(() => r.value, () => {
|
|
71
|
+
t("on-change", r.value);
|
|
83
72
|
});
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
console.debug("dynamic-content:open",
|
|
73
|
+
const d = (e) => {
|
|
74
|
+
const T = e, { attribute: O, position: x } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
|
|
87
76
|
};
|
|
88
|
-
return
|
|
77
|
+
return z(async () => {
|
|
89
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
90
79
|
try {
|
|
91
|
-
|
|
80
|
+
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
92
81
|
let e = {
|
|
93
|
-
html:
|
|
82
|
+
html: s && await W(s),
|
|
94
83
|
css: g
|
|
95
84
|
};
|
|
96
|
-
e.html || (e = await
|
|
85
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
|
|
97
86
|
} catch (e) {
|
|
98
87
|
console.error("Failed to initialize Stripo editor:", e);
|
|
99
88
|
}
|
|
100
|
-
document.addEventListener("dynamic-content:open",
|
|
101
|
-
}),
|
|
102
|
-
document.removeEventListener("dynamic-content:open",
|
|
89
|
+
document.addEventListener("dynamic-content:open", d);
|
|
90
|
+
}), K(() => {
|
|
91
|
+
document.removeEventListener("dynamic-content:open", d);
|
|
103
92
|
try {
|
|
104
93
|
window.UIEditor.removeEditor();
|
|
105
94
|
} catch {
|
|
106
95
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
107
96
|
}
|
|
108
|
-
|
|
109
|
-
}),
|
|
97
|
+
n.reset();
|
|
98
|
+
}), I({
|
|
110
99
|
dynamicContent: {
|
|
111
|
-
insert:
|
|
112
|
-
close:
|
|
100
|
+
insert: E,
|
|
101
|
+
close: k
|
|
113
102
|
},
|
|
114
|
-
hasChanges:
|
|
115
|
-
saveSilent:
|
|
116
|
-
}), { __sfc: !0, PreviewContainer:
|
|
103
|
+
hasChanges: r,
|
|
104
|
+
saveSilent: v
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
|
|
117
106
|
}
|
|
118
107
|
});
|
|
119
108
|
export {
|
|
120
|
-
|
|
109
|
+
Ee as default
|
|
121
110
|
};
|
|
@@ -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
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
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
|
|
6
|
+
const v = /* @__PURE__ */ n({
|
|
7
7
|
__name: "FilterSelectionDrawer",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
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:
|
|
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:
|
|
22
|
+
labelText: r("products.cancel"),
|
|
23
23
|
disabledStatus: e.value
|
|
24
24
|
}
|
|
25
|
-
})),
|
|
26
|
-
|
|
25
|
+
})), o = () => {
|
|
26
|
+
t.closeFilterDrawer();
|
|
27
27
|
};
|
|
28
|
-
return { __sfc: !0, trans:
|
|
29
|
-
e.value = !0,
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
37
|
+
v as default
|
|
37
38
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import r from "../extensions/ModulesTabIcons/extension.js";
|
|
2
1
|
import { useConfigStore as l } from "../stores/config.js";
|
|
3
|
-
const
|
|
2
|
+
const r = {
|
|
4
3
|
"amp-accordion": "ampAccordionEnabled",
|
|
5
4
|
"amp-carousel": "ampCarouselEnabled",
|
|
6
5
|
"amp-form-controls": "ampFormControlsEnabled",
|
|
@@ -14,7 +13,7 @@ const a = {
|
|
|
14
13
|
"text-block": "textEnabled",
|
|
15
14
|
"timer-block": "timerEnabled",
|
|
16
15
|
"video-block": "videoEnabled"
|
|
17
|
-
},
|
|
16
|
+
}, c = {
|
|
18
17
|
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
19
18
|
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
20
19
|
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
@@ -22,40 +21,31 @@ const a = {
|
|
|
22
21
|
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
23
22
|
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
24
23
|
"items-block": () => import("../extensions/Blocks/Items/extension.js")
|
|
25
|
-
},
|
|
24
|
+
}, a = (n) => {
|
|
26
25
|
if (!n || !n.length)
|
|
27
26
|
return {};
|
|
28
|
-
const
|
|
27
|
+
const e = {};
|
|
29
28
|
return n.forEach((o) => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return t;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const c = s[e];
|
|
40
|
-
return c ? (await c()).default : null;
|
|
41
|
-
})
|
|
42
|
-
);
|
|
43
|
-
return [
|
|
44
|
-
...t,
|
|
45
|
-
...o.filter((e) => e !== null)
|
|
46
|
-
];
|
|
47
|
-
}, E = () => {
|
|
29
|
+
const t = r[o];
|
|
30
|
+
t && (e[t] = !1);
|
|
31
|
+
}), e;
|
|
32
|
+
}, i = async (n) => !n || !n.length ? [] : (await Promise.all(
|
|
33
|
+
n.map(async (o) => {
|
|
34
|
+
const t = c[o];
|
|
35
|
+
return t ? (await t()).default : null;
|
|
36
|
+
})
|
|
37
|
+
)).filter((o) => o !== null), m = () => {
|
|
48
38
|
const n = l();
|
|
49
39
|
return {
|
|
50
40
|
getStripoBlocksConfig: async () => {
|
|
51
41
|
const o = n.blocks;
|
|
52
42
|
return {
|
|
53
|
-
baseBlocks:
|
|
54
|
-
extensions: await
|
|
43
|
+
baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
|
|
44
|
+
extensions: await i(o == null ? void 0 : o.includeCustoms)
|
|
55
45
|
};
|
|
56
46
|
}
|
|
57
47
|
};
|
|
58
48
|
};
|
|
59
49
|
export {
|
|
60
|
-
|
|
50
|
+
m as useBlocksConfig
|
|
61
51
|
};
|