@useinsider/guido 2.2.0-beta.dc12458 → 2.2.0-beta.fa4cec8
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 +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +127 -122
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +8 -4
- 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 +228 -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 +169 -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/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +317 -193
- package/dist/services/recommendationApi.js +11 -8
- package/dist/services/stripoApi.js +20 -17
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- 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/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +35 -11
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/stores/unsubscribe.js +37 -34
- 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/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/README.md
CHANGED
|
@@ -122,6 +122,8 @@ 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
|
|
125
127
|
},
|
|
126
128
|
|
|
127
129
|
// Optional: UI settings
|
|
@@ -141,6 +143,11 @@ const config: GuidoConfigInput = {
|
|
|
141
143
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
142
144
|
},
|
|
143
145
|
|
|
146
|
+
// Optional: Callbacks
|
|
147
|
+
callbacks?: {
|
|
148
|
+
externalValidation?: (data: SavedTemplateDetails) => Promise<boolean>, // Return false to cancel save
|
|
149
|
+
},
|
|
150
|
+
|
|
144
151
|
// Optional: Block configuration
|
|
145
152
|
blocks?: {
|
|
146
153
|
excludeDefaults?: DefaultBlockType[],
|
|
@@ -251,6 +258,35 @@ const config: GuidoConfigInput = {
|
|
|
251
258
|
|
|
252
259
|
---
|
|
253
260
|
|
|
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
|
+
|
|
254
290
|
## HTML Compiler Rules
|
|
255
291
|
|
|
256
292
|
Add custom rules to transform HTML during export:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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,24 +12,24 @@ const m = {
|
|
|
11
12
|
ARCHITECT: 49,
|
|
12
13
|
/** Unsubscribe page builder */
|
|
13
14
|
UNSUBSCRIBE_PAGES: 97
|
|
14
|
-
},
|
|
15
|
+
}, h = o({
|
|
15
16
|
/** Unique identifier for the template being edited */
|
|
16
17
|
templateId: u(
|
|
17
18
|
t(),
|
|
18
|
-
|
|
19
|
+
d(1, "templateId is required")
|
|
19
20
|
),
|
|
20
21
|
/** Unique identifier for the user editing the template */
|
|
21
22
|
userId: u(
|
|
22
23
|
t(),
|
|
23
|
-
|
|
24
|
+
d(1, "userId is required")
|
|
24
25
|
),
|
|
25
26
|
/** Optional variation ID for A/B testing */
|
|
26
27
|
variationId: e(t())
|
|
27
|
-
}),
|
|
28
|
+
}), y = o({
|
|
28
29
|
/** Partner/organization name (required) */
|
|
29
30
|
name: u(
|
|
30
31
|
t(),
|
|
31
|
-
|
|
32
|
+
d(1, "partner.name is required")
|
|
32
33
|
),
|
|
33
34
|
/** Product type identifier */
|
|
34
35
|
productType: e(
|
|
@@ -46,7 +47,7 @@ const m = {
|
|
|
46
47
|
),
|
|
47
48
|
/** Display name for the current user */
|
|
48
49
|
username: e(t(), "Guido User")
|
|
49
|
-
}),
|
|
50
|
+
}), f = o({
|
|
50
51
|
/** Display text for the dynamic content */
|
|
51
52
|
text: t(),
|
|
52
53
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -67,14 +68,14 @@ const m = {
|
|
|
67
68
|
css: e(t(), ""),
|
|
68
69
|
/** Preselected dynamic content items */
|
|
69
70
|
preselectedDynamicContent: e(
|
|
70
|
-
|
|
71
|
+
c(f),
|
|
71
72
|
[]
|
|
72
73
|
),
|
|
73
74
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(
|
|
75
|
+
selectedUnsubscribePages: e(c(p()), []),
|
|
75
76
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
76
|
-
forceRecreate: e(
|
|
77
|
-
}),
|
|
77
|
+
forceRecreate: e(a(), !1)
|
|
78
|
+
}), A = o({
|
|
78
79
|
/** Sender display name */
|
|
79
80
|
senderName: e(t(), ""),
|
|
80
81
|
/** Email subject line */
|
|
@@ -85,30 +86,34 @@ const m = {
|
|
|
85
86
|
/** Path to translations object */
|
|
86
87
|
translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
|
|
87
88
|
/** Migration date for template compatibility */
|
|
88
|
-
migrationDate: e(
|
|
89
|
+
migrationDate: e(p(), 1759696858),
|
|
89
90
|
/** Email header settings */
|
|
90
|
-
emailHeader: e(
|
|
91
|
-
|
|
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({
|
|
92
97
|
/** Whether to show the header bar */
|
|
93
|
-
showHeader: e(
|
|
98
|
+
showHeader: e(a(), !0),
|
|
94
99
|
/** Custom label for back button (if shown) */
|
|
95
100
|
backButtonLabel: e(t())
|
|
96
|
-
}),
|
|
101
|
+
}), I = o({
|
|
97
102
|
/** Enable dynamic content insertion */
|
|
98
|
-
dynamicContent: e(
|
|
103
|
+
dynamicContent: e(a(), !0),
|
|
99
104
|
/** Enable save as template functionality */
|
|
100
|
-
saveAsTemplate: e(
|
|
105
|
+
saveAsTemplate: e(a(), !0),
|
|
101
106
|
/** Enable version history */
|
|
102
|
-
versionHistory: e(
|
|
107
|
+
versionHistory: e(a(), !0),
|
|
103
108
|
/** Enable test message sending */
|
|
104
|
-
testMessage: e(
|
|
109
|
+
testMessage: e(a(), !0),
|
|
105
110
|
/** Enable display conditions */
|
|
106
|
-
displayConditions: e(
|
|
111
|
+
displayConditions: e(a(), !0),
|
|
107
112
|
/** Enable unsubscribe block */
|
|
108
|
-
unsubscribe: e(
|
|
113
|
+
unsubscribe: e(a(), !0),
|
|
109
114
|
/** Disable modules panel in the editor */
|
|
110
|
-
modulesDisabled: e(
|
|
111
|
-
}),
|
|
115
|
+
modulesDisabled: e(a(), !1)
|
|
116
|
+
}), E = n([
|
|
112
117
|
"amp-accordion",
|
|
113
118
|
"amp-carousel",
|
|
114
119
|
"amp-form-controls",
|
|
@@ -133,12 +138,12 @@ const m = {
|
|
|
133
138
|
]), O = o({
|
|
134
139
|
/** Default blocks to exclude from the editor */
|
|
135
140
|
excludeDefaults: e(
|
|
136
|
-
|
|
141
|
+
c(E),
|
|
137
142
|
[]
|
|
138
143
|
),
|
|
139
144
|
/** Custom blocks to include in the editor */
|
|
140
145
|
includeCustoms: e(
|
|
141
|
-
|
|
146
|
+
c(g),
|
|
142
147
|
[]
|
|
143
148
|
)
|
|
144
149
|
}), l = o({
|
|
@@ -147,8 +152,8 @@ const m = {
|
|
|
147
152
|
/** Human-readable description */
|
|
148
153
|
description: e(t()),
|
|
149
154
|
/** Priority for rule ordering (lower = earlier) */
|
|
150
|
-
priority:
|
|
151
|
-
}),
|
|
155
|
+
priority: p()
|
|
156
|
+
}), L = o({
|
|
152
157
|
...l.entries,
|
|
153
158
|
type: r("replace"),
|
|
154
159
|
/** String to search for */
|
|
@@ -156,8 +161,8 @@ const m = {
|
|
|
156
161
|
/** Replacement string */
|
|
157
162
|
replacement: t(),
|
|
158
163
|
/** Replace all occurrences (default: false) */
|
|
159
|
-
replaceAll: e(
|
|
160
|
-
}),
|
|
164
|
+
replaceAll: e(a())
|
|
165
|
+
}), M = o({
|
|
161
166
|
...l.entries,
|
|
162
167
|
type: r("regex"),
|
|
163
168
|
/** Regex pattern string */
|
|
@@ -166,82 +171,82 @@ const m = {
|
|
|
166
171
|
replacement: t(),
|
|
167
172
|
/** Regex flags (e.g., 'gi') */
|
|
168
173
|
flags: e(t())
|
|
169
|
-
}),
|
|
174
|
+
}), N = o({
|
|
170
175
|
...l.entries,
|
|
171
176
|
type: r("remove"),
|
|
172
177
|
/** Strings or patterns to remove */
|
|
173
|
-
targets:
|
|
174
|
-
}),
|
|
178
|
+
targets: c(t())
|
|
179
|
+
}), D = o({
|
|
175
180
|
...l.entries,
|
|
176
181
|
type: r("custom"),
|
|
177
182
|
/** Custom processor function */
|
|
178
|
-
processor:
|
|
183
|
+
processor: S(
|
|
179
184
|
(i) => typeof i == "function",
|
|
180
185
|
"processor must be a function"
|
|
181
186
|
)
|
|
182
|
-
}),
|
|
183
|
-
E,
|
|
184
|
-
N,
|
|
187
|
+
}), v = k("type", [
|
|
185
188
|
L,
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
M,
|
|
190
|
+
N,
|
|
191
|
+
D
|
|
192
|
+
]), U = o({
|
|
188
193
|
/** Custom compiler rules to apply */
|
|
189
|
-
customRules: e(
|
|
194
|
+
customRules: e(c(v), []),
|
|
190
195
|
/** Skip default compiler rules */
|
|
191
|
-
ignoreDefaultRules: e(
|
|
192
|
-
}),
|
|
196
|
+
ignoreDefaultRules: e(a(), !1)
|
|
197
|
+
}), x = o({
|
|
193
198
|
/**
|
|
194
199
|
* External validation handler called before save completes.
|
|
195
200
|
* Return false to cancel the save operation.
|
|
196
201
|
*/
|
|
197
202
|
externalValidation: e(
|
|
198
|
-
|
|
203
|
+
S(
|
|
199
204
|
(i) => typeof i == "function",
|
|
200
205
|
"externalValidation must be a function"
|
|
201
206
|
)
|
|
202
207
|
)
|
|
203
|
-
}),
|
|
208
|
+
}), H = o({
|
|
204
209
|
// Required sections
|
|
205
210
|
/** Identity configuration (required) */
|
|
206
|
-
identity:
|
|
211
|
+
identity: h,
|
|
207
212
|
/** Partner configuration (required) */
|
|
208
|
-
partner:
|
|
213
|
+
partner: y,
|
|
209
214
|
// Optional sections (with defaults)
|
|
210
215
|
/** Template content and presets */
|
|
211
216
|
template: e(R, {}),
|
|
212
217
|
/** Editor settings */
|
|
213
218
|
editor: e(C, {}),
|
|
214
219
|
/** UI configuration */
|
|
215
|
-
ui: e(
|
|
220
|
+
ui: e(T, {}),
|
|
216
221
|
/** Feature toggles */
|
|
217
|
-
features: e(
|
|
222
|
+
features: e(I, {}),
|
|
218
223
|
/** Block configuration */
|
|
219
224
|
blocks: e(O, {}),
|
|
220
225
|
/** Compiler configuration */
|
|
221
|
-
compiler: e(
|
|
226
|
+
compiler: e(U, {}),
|
|
222
227
|
/** Callbacks and event handlers */
|
|
223
|
-
callbacks: e(
|
|
228
|
+
callbacks: e(x, {})
|
|
224
229
|
});
|
|
225
230
|
export {
|
|
226
231
|
O as BlocksSchema,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
x as CallbacksSchema,
|
|
233
|
+
v as CompilerRuleSchema,
|
|
234
|
+
U as CompilerSchema,
|
|
230
235
|
g as CustomBlockTypeSchema,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
D as CustomRuleSchema,
|
|
237
|
+
E as DefaultBlockTypeSchema,
|
|
238
|
+
f as DynamicContentSchema,
|
|
234
239
|
C as EditorSchema,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
240
|
+
A as EmailHeaderSchema,
|
|
241
|
+
I as FeaturesSchema,
|
|
242
|
+
H as GuidoConfigSchema,
|
|
243
|
+
h as IdentitySchema,
|
|
239
244
|
m as MessageType,
|
|
240
|
-
|
|
245
|
+
y as PartnerSchema,
|
|
241
246
|
s as ProductType,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
247
|
+
M as RegexRuleSchema,
|
|
248
|
+
N as RemoveRuleSchema,
|
|
249
|
+
L as ReplaceRuleSchema,
|
|
245
250
|
R as TemplateSchema,
|
|
246
|
-
|
|
251
|
+
T as UISchema
|
|
247
252
|
};
|
|
@@ -1,54 +1,65 @@
|
|
|
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
|
-
|
|
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";
|
|
15
|
+
import { useConfigStore as se } from "../stores/config.js";
|
|
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(
|
|
26
|
-
const
|
|
26
|
+
setup(N, { expose: W, emit: t }) {
|
|
27
|
+
const u = N, I = M(
|
|
27
28
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
28
|
-
),
|
|
29
|
+
), O = M(
|
|
29
30
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
30
|
-
), p =
|
|
31
|
-
|
|
32
|
-
const i =
|
|
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
35
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
35
|
-
}, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
username:
|
|
41
|
-
|
|
36
|
+
}, {
|
|
37
|
+
templateId: d,
|
|
38
|
+
userId: h,
|
|
39
|
+
partnerName: f,
|
|
40
|
+
productType: b,
|
|
41
|
+
username: S,
|
|
42
|
+
template: o,
|
|
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,
|
|
42
51
|
productType: b,
|
|
43
52
|
preselectedDynamicContentList: m,
|
|
53
|
+
savedModulesFolderName: w,
|
|
54
|
+
defaultModulesFolderName: D,
|
|
44
55
|
onReady: () => {
|
|
45
56
|
console.debug("guido:ready"), t("ready");
|
|
46
57
|
}
|
|
47
|
-
}), { getDefaultTemplate:
|
|
58
|
+
}), { getDefaultTemplate: C } = re(), { cloneTimersOnSave: T, hasTimerBlocks: k } = Y(), x = _(() => {
|
|
48
59
|
var e;
|
|
49
|
-
return !((e =
|
|
60
|
+
return !((e = r.ui) != null && e.showHeader);
|
|
50
61
|
});
|
|
51
|
-
|
|
62
|
+
J({
|
|
52
63
|
onBack: () => {
|
|
53
64
|
console.debug("guido:back"), t("back");
|
|
54
65
|
},
|
|
@@ -62,49 +73,49 @@ const Ee = /* @__PURE__ */ B({
|
|
|
62
73
|
console.debug("guido:test-email:click"), t("test-email:click");
|
|
63
74
|
}
|
|
64
75
|
});
|
|
65
|
-
const
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
67
|
-
},
|
|
76
|
+
const F = (e) => {
|
|
77
|
+
console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
78
|
+
}, U = () => {
|
|
68
79
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
80
|
};
|
|
70
|
-
|
|
71
|
-
t("on-change",
|
|
81
|
+
V(() => s.value, () => {
|
|
82
|
+
t("on-change", s.value);
|
|
72
83
|
});
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
console.debug("dynamic-content:open",
|
|
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);
|
|
76
87
|
};
|
|
77
|
-
return
|
|
88
|
+
return j(async () => {
|
|
78
89
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
90
|
try {
|
|
80
|
-
|
|
91
|
+
v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
81
92
|
let e = {
|
|
82
|
-
html:
|
|
93
|
+
html: c && await P(c),
|
|
83
94
|
css: g
|
|
84
95
|
};
|
|
85
|
-
e.html || (e = await
|
|
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;
|
|
86
97
|
} catch (e) {
|
|
87
98
|
console.error("Failed to initialize Stripo editor:", e);
|
|
88
99
|
}
|
|
89
|
-
document.addEventListener("dynamic-content:open",
|
|
90
|
-
}),
|
|
91
|
-
document.removeEventListener("dynamic-content:open",
|
|
100
|
+
document.addEventListener("dynamic-content:open", l);
|
|
101
|
+
}), q(() => {
|
|
102
|
+
document.removeEventListener("dynamic-content:open", l);
|
|
92
103
|
try {
|
|
93
104
|
window.UIEditor.removeEditor();
|
|
94
105
|
} catch {
|
|
95
106
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
96
107
|
}
|
|
97
|
-
|
|
98
|
-
}),
|
|
108
|
+
r.reset();
|
|
109
|
+
}), W({
|
|
99
110
|
dynamicContent: {
|
|
100
|
-
insert:
|
|
101
|
-
close:
|
|
111
|
+
insert: F,
|
|
112
|
+
close: U
|
|
102
113
|
},
|
|
103
|
-
hasChanges:
|
|
104
|
-
saveSilent:
|
|
105
|
-
}), { __sfc: !0, PreviewContainer:
|
|
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 };
|
|
106
117
|
}
|
|
107
118
|
});
|
|
108
119
|
export {
|
|
109
|
-
|
|
120
|
+
Le as default
|
|
110
121
|
};
|
|
@@ -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,18 +1,18 @@
|
|
|
1
1
|
import o from "./HeaderWrapper.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = function() {
|
|
5
5
|
var t = this, r = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
-
},
|
|
6
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
+
}, d = [], i = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
s,
|
|
10
|
+
d,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"5c02dcc7"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = i.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|