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