@useinsider/guido 3.11.0-beta.04c9b87 → 3.11.0-beta.17c184c
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 +112 -99
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
- package/dist/enums/unsubscribe.js +35 -31
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/defaults.d.ts +5 -1
- package/dist/src/@types/config/index.d.ts +3 -3
- package/dist/src/@types/config/schemas.d.ts +21 -0
- package/dist/src/@types/config/types.d.ts +5 -1
- package/dist/src/composables/useConfig.d.ts +3 -0
- package/dist/src/enums/unsubscribe.d.ts +2 -2
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +192 -1
- package/dist/src/utils/environmentUtil.d.ts +5 -2
- package/dist/stores/config.js +27 -20
- package/dist/utils/environmentUtil.js +8 -2
- package/package.json +5 -1
- package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
|
-
import { object as
|
|
3
|
-
const
|
|
2
|
+
import { object as o, number as c, optional as e, string as t, picklist as i, pipe as l, minLength as m, custom as h, boolean as a, array as n, record as y, literal as u, looseObject as k, variant as g, union as f, unknown as s } from "../../node_modules/valibot/dist/index.js";
|
|
3
|
+
const b = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
6
6
|
/** Transactional/system emails */
|
|
@@ -12,33 +12,33 @@ const d = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
}, R =
|
|
15
|
+
}, R = o({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
|
-
templateId:
|
|
17
|
+
templateId: l(
|
|
18
18
|
t(),
|
|
19
|
-
|
|
19
|
+
m(1, "templateId is required")
|
|
20
20
|
),
|
|
21
21
|
/** Unique identifier for the user editing the template */
|
|
22
|
-
userId:
|
|
22
|
+
userId: l(
|
|
23
23
|
t(),
|
|
24
|
-
|
|
24
|
+
m(1, "userId is required")
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
27
|
variationId: e(t())
|
|
28
|
-
}), T =
|
|
28
|
+
}), T = o({
|
|
29
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}), C =
|
|
33
|
+
}), C = o({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
|
-
name:
|
|
35
|
+
name: l(
|
|
36
36
|
t(),
|
|
37
|
-
|
|
37
|
+
m(1, "partner.name is required")
|
|
38
38
|
),
|
|
39
39
|
/** Product type identifier */
|
|
40
40
|
productType: e(
|
|
41
|
-
|
|
41
|
+
i([
|
|
42
42
|
r.EMAIL,
|
|
43
43
|
r.ARCHITECT,
|
|
44
44
|
r.UNSUBSCRIBE_PAGES
|
|
@@ -47,14 +47,14 @@ const d = {
|
|
|
47
47
|
),
|
|
48
48
|
/** Message type (promotional or transactional) */
|
|
49
49
|
messageType: e(
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
i([b.PROMOTIONAL, b.TRANSACTIONAL]),
|
|
51
|
+
b.PROMOTIONAL
|
|
52
52
|
),
|
|
53
53
|
/** Display name for the current user */
|
|
54
54
|
username: e(t(), "Guido User"),
|
|
55
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
56
|
fallbackFont: e(T)
|
|
57
|
-
}), A =
|
|
57
|
+
}), A = o({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -63,57 +63,57 @@ const d = {
|
|
|
63
63
|
fallback: e(t()),
|
|
64
64
|
/** Optional formatting options */
|
|
65
65
|
format: e(
|
|
66
|
-
|
|
66
|
+
o({
|
|
67
67
|
key: t(),
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}), I =
|
|
71
|
+
}), I = k({
|
|
72
72
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
73
|
-
id: e(
|
|
73
|
+
id: e(c()),
|
|
74
74
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
75
|
-
decimalCount: e(f([t(),
|
|
75
|
+
decimalCount: e(f([t(), c()])),
|
|
76
76
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
77
|
-
productIds: e(
|
|
77
|
+
productIds: e(n(s())),
|
|
78
78
|
/** Whether the block requested live products at send time */
|
|
79
|
-
sendProductRequestFlag: e(
|
|
79
|
+
sendProductRequestFlag: e(a()),
|
|
80
80
|
/** Whether to randomize product order */
|
|
81
|
-
shuffleProducts: e(
|
|
81
|
+
shuffleProducts: e(a()),
|
|
82
82
|
/** Filter rules driving product selection */
|
|
83
|
-
filters: e(
|
|
83
|
+
filters: e(n(s())),
|
|
84
84
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
85
85
|
currency: e(t()),
|
|
86
86
|
/** Currency display settings (separators, alignment, decimals) */
|
|
87
|
-
currencySettings: e(
|
|
87
|
+
currencySettings: e(s()),
|
|
88
88
|
/** Locale (e.g. 'nl_NL') */
|
|
89
89
|
language: e(t()),
|
|
90
90
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
91
91
|
strategy: e(t()),
|
|
92
92
|
/** Snapshot of products as rendered by the legacy block */
|
|
93
|
-
recommendedProducts: e(
|
|
93
|
+
recommendedProducts: e(n(s())),
|
|
94
94
|
/** Number of product cards per row */
|
|
95
|
-
cardsInRow: e(
|
|
95
|
+
cardsInRow: e(c()),
|
|
96
96
|
/** Mobile-only padding (right) */
|
|
97
|
-
mobileRightPadding: e(
|
|
97
|
+
mobileRightPadding: e(c()),
|
|
98
98
|
/** Mobile-only padding (left) */
|
|
99
|
-
mobileLeftPadding: e(
|
|
99
|
+
mobileLeftPadding: e(c()),
|
|
100
100
|
/** Disable responsive scaling */
|
|
101
|
-
unresponsive: e(
|
|
101
|
+
unresponsive: e(a()),
|
|
102
102
|
/** Layout orientation ('vertical' | 'horizontal') */
|
|
103
103
|
orientation: e(t()),
|
|
104
104
|
/** Whether long text is trimmed */
|
|
105
|
-
textTrimming: e(
|
|
105
|
+
textTrimming: e(a()),
|
|
106
106
|
/** Block type marker used by some legacy variants */
|
|
107
107
|
blockType: e(t()),
|
|
108
108
|
/** Size variant marker (legacy data may use string or number) */
|
|
109
|
-
size: e(f([t(),
|
|
109
|
+
size: e(f([t(), c()])),
|
|
110
110
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
111
|
-
verticalResponsiveness: e(
|
|
111
|
+
verticalResponsiveness: e(a()),
|
|
112
112
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
113
|
-
isPriceMovedToNextLine: e(
|
|
113
|
+
isPriceMovedToNextLine: e(a()),
|
|
114
114
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
115
|
-
isPriceDeletedForZeroSale: e(
|
|
116
|
-
}),
|
|
115
|
+
isPriceDeletedForZeroSale: e(a())
|
|
116
|
+
}), v = o({
|
|
117
117
|
/**
|
|
118
118
|
* Legacy recommendation block configs keyed by block ID.
|
|
119
119
|
* Pass this when loading a template authored with the v1
|
|
@@ -121,70 +121,70 @@ const d = {
|
|
|
121
121
|
* strategy, currency, locale, and layout data.
|
|
122
122
|
*/
|
|
123
123
|
recommendationConfigs: e(
|
|
124
|
-
|
|
124
|
+
y(t(), I),
|
|
125
125
|
{}
|
|
126
126
|
)
|
|
127
|
-
}),
|
|
127
|
+
}), E = o({
|
|
128
128
|
/** Initial HTML content */
|
|
129
129
|
html: e(t(), ""),
|
|
130
130
|
/** Initial CSS content */
|
|
131
131
|
css: e(t(), ""),
|
|
132
132
|
/** Preselected dynamic content items */
|
|
133
133
|
preselectedDynamicContent: e(
|
|
134
|
-
|
|
134
|
+
n(A),
|
|
135
135
|
[]
|
|
136
136
|
),
|
|
137
137
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
138
|
-
customFieldAttributes: e(
|
|
138
|
+
customFieldAttributes: e(n(t()), []),
|
|
139
139
|
/** Selected unsubscribe page IDs */
|
|
140
|
-
selectedUnsubscribePages: e(c(
|
|
140
|
+
selectedUnsubscribePages: e(n(c()), []),
|
|
141
141
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
142
|
-
forceRecreate: e(
|
|
142
|
+
forceRecreate: e(a(), !1),
|
|
143
143
|
/** Migration-only inputs (legacy block configs) */
|
|
144
|
-
migration: e(
|
|
145
|
-
}),
|
|
144
|
+
migration: e(v, {})
|
|
145
|
+
}), L = o({
|
|
146
146
|
/** Sender display name */
|
|
147
147
|
senderName: e(t(), ""),
|
|
148
148
|
/** Email subject line */
|
|
149
149
|
subject: e(t(), "")
|
|
150
|
-
}),
|
|
150
|
+
}), P = o({
|
|
151
151
|
/** Locale for the editor UI */
|
|
152
152
|
locale: e(t(), "en"),
|
|
153
153
|
/** Path to translations object */
|
|
154
154
|
translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
|
|
155
155
|
/** Migration date for template compatibility */
|
|
156
|
-
migrationDate: e(
|
|
156
|
+
migrationDate: e(c(), 1759696858),
|
|
157
157
|
/** Email header settings */
|
|
158
|
-
emailHeader: e(
|
|
158
|
+
emailHeader: e(L, { senderName: "", subject: "" }),
|
|
159
159
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
160
160
|
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
161
161
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
162
162
|
defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
|
|
163
|
-
}), M =
|
|
163
|
+
}), M = o({
|
|
164
164
|
/** Whether to show the header bar */
|
|
165
|
-
showHeader: e(
|
|
165
|
+
showHeader: e(a(), !0),
|
|
166
166
|
/** Custom label for back button (if shown) */
|
|
167
167
|
backButtonLabel: e(t())
|
|
168
|
-
}), O =
|
|
168
|
+
}), O = o({
|
|
169
169
|
/** Enable dynamic content insertion */
|
|
170
|
-
dynamicContent: e(
|
|
170
|
+
dynamicContent: e(a(), !0),
|
|
171
171
|
/** Enable save as template functionality */
|
|
172
|
-
saveAsTemplate: e(
|
|
172
|
+
saveAsTemplate: e(a(), !0),
|
|
173
173
|
/** Enable version history */
|
|
174
|
-
versionHistory: e(
|
|
174
|
+
versionHistory: e(a(), !0),
|
|
175
175
|
/** Enable test message sending */
|
|
176
|
-
testMessage: e(
|
|
176
|
+
testMessage: e(a(), !0),
|
|
177
177
|
/** Enable display conditions */
|
|
178
|
-
displayConditions: e(
|
|
178
|
+
displayConditions: e(a(), !0),
|
|
179
179
|
/** Enable unsubscribe block */
|
|
180
|
-
unsubscribe: e(
|
|
180
|
+
unsubscribe: e(a(), !0),
|
|
181
181
|
/** Disable modules panel in the editor */
|
|
182
|
-
modulesDisabled: e(
|
|
182
|
+
modulesDisabled: e(a(), !1),
|
|
183
183
|
/** Enable Liquid template syntax */
|
|
184
|
-
liquidSyntax: e(
|
|
184
|
+
liquidSyntax: e(a(), !1),
|
|
185
185
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
186
|
-
autosave: e(
|
|
187
|
-
}),
|
|
186
|
+
autosave: e(a(), !1)
|
|
187
|
+
}), x = i([
|
|
188
188
|
"amp-accordion",
|
|
189
189
|
"amp-carousel",
|
|
190
190
|
"amp-form-controls",
|
|
@@ -198,7 +198,7 @@ const d = {
|
|
|
198
198
|
"text-block",
|
|
199
199
|
"timer-block",
|
|
200
200
|
"video-block"
|
|
201
|
-
]),
|
|
201
|
+
]), N = i([
|
|
202
202
|
"dynamic-content",
|
|
203
203
|
"checkbox-block",
|
|
204
204
|
"radio-button-block",
|
|
@@ -206,53 +206,53 @@ const d = {
|
|
|
206
206
|
"unsubscribe-block",
|
|
207
207
|
"coupon-block",
|
|
208
208
|
"items-block"
|
|
209
|
-
]),
|
|
209
|
+
]), D = o({
|
|
210
210
|
/** Default blocks to exclude from the editor */
|
|
211
211
|
excludeDefaults: e(
|
|
212
|
-
|
|
212
|
+
n(x),
|
|
213
213
|
[]
|
|
214
214
|
),
|
|
215
215
|
/** Custom blocks to include in the editor */
|
|
216
216
|
includeCustoms: e(
|
|
217
|
-
|
|
217
|
+
n(N),
|
|
218
218
|
[]
|
|
219
219
|
)
|
|
220
|
-
}),
|
|
220
|
+
}), d = o({
|
|
221
221
|
/** Unique identifier for the rule */
|
|
222
222
|
id: t(),
|
|
223
223
|
/** Human-readable description */
|
|
224
224
|
description: e(t()),
|
|
225
225
|
/** Priority for rule ordering (lower = earlier) */
|
|
226
|
-
priority:
|
|
227
|
-
}), F =
|
|
228
|
-
...
|
|
229
|
-
type:
|
|
226
|
+
priority: c()
|
|
227
|
+
}), F = o({
|
|
228
|
+
...d.entries,
|
|
229
|
+
type: u("replace"),
|
|
230
230
|
/** String to search for */
|
|
231
231
|
search: t(),
|
|
232
232
|
/** Replacement string */
|
|
233
233
|
replacement: t(),
|
|
234
234
|
/** Replace all occurrences (default: false) */
|
|
235
|
-
replaceAll: e(
|
|
236
|
-
}), U =
|
|
237
|
-
...
|
|
238
|
-
type:
|
|
235
|
+
replaceAll: e(a())
|
|
236
|
+
}), U = o({
|
|
237
|
+
...d.entries,
|
|
238
|
+
type: u("regex"),
|
|
239
239
|
/** Regex pattern string */
|
|
240
240
|
pattern: t(),
|
|
241
241
|
/** Replacement string (supports $1, $2, etc.) */
|
|
242
242
|
replacement: t(),
|
|
243
243
|
/** Regex flags (e.g., 'gi') */
|
|
244
244
|
flags: e(t())
|
|
245
|
-
}), B =
|
|
246
|
-
...
|
|
247
|
-
type:
|
|
245
|
+
}), B = o({
|
|
246
|
+
...d.entries,
|
|
247
|
+
type: u("remove"),
|
|
248
248
|
/** Strings or patterns to remove */
|
|
249
|
-
targets:
|
|
250
|
-
}), w =
|
|
251
|
-
...
|
|
252
|
-
type:
|
|
249
|
+
targets: n(t())
|
|
250
|
+
}), w = o({
|
|
251
|
+
...d.entries,
|
|
252
|
+
type: u("custom"),
|
|
253
253
|
/** Custom processor function */
|
|
254
254
|
processor: h(
|
|
255
|
-
(
|
|
255
|
+
(p) => typeof p == "function",
|
|
256
256
|
"processor must be a function"
|
|
257
257
|
)
|
|
258
258
|
}), H = g("type", [
|
|
@@ -260,23 +260,33 @@ const d = {
|
|
|
260
260
|
U,
|
|
261
261
|
B,
|
|
262
262
|
w
|
|
263
|
-
]), j =
|
|
263
|
+
]), j = o({
|
|
264
264
|
/** Custom compiler rules to apply */
|
|
265
|
-
customRules: e(
|
|
265
|
+
customRules: e(n(H), []),
|
|
266
266
|
/** Skip default compiler rules */
|
|
267
|
-
ignoreDefaultRules: e(
|
|
268
|
-
}), q =
|
|
267
|
+
ignoreDefaultRules: e(a(), !1)
|
|
268
|
+
}), q = o({
|
|
269
269
|
/**
|
|
270
270
|
* External validation handler called before save completes.
|
|
271
271
|
* Return false to cancel the save operation.
|
|
272
272
|
*/
|
|
273
273
|
externalValidation: e(
|
|
274
274
|
h(
|
|
275
|
-
(
|
|
275
|
+
(p) => typeof p == "function",
|
|
276
276
|
"externalValidation must be a function"
|
|
277
277
|
)
|
|
278
278
|
)
|
|
279
|
-
}),
|
|
279
|
+
}), G = o({
|
|
280
|
+
/**
|
|
281
|
+
* Environment prefix for runtime-built hosts (unsubscribe / preference-center
|
|
282
|
+
* links compile to `https://mail.<prefix>.com/...`). When omitted, the prefix
|
|
283
|
+
* is derived from the hostname with a safe production fallback (SD-145225).
|
|
284
|
+
*/
|
|
285
|
+
prefix: e(l(
|
|
286
|
+
t(),
|
|
287
|
+
m(1, "environment.prefix cannot be empty")
|
|
288
|
+
))
|
|
289
|
+
}), z = o({
|
|
280
290
|
// Required sections
|
|
281
291
|
/** Identity configuration (required) */
|
|
282
292
|
identity: R,
|
|
@@ -284,43 +294,46 @@ const d = {
|
|
|
284
294
|
partner: C,
|
|
285
295
|
// Optional sections (with defaults)
|
|
286
296
|
/** Template content and presets */
|
|
287
|
-
template: e(
|
|
297
|
+
template: e(E, {}),
|
|
288
298
|
/** Editor settings */
|
|
289
|
-
editor: e(
|
|
299
|
+
editor: e(P, {}),
|
|
290
300
|
/** UI configuration */
|
|
291
301
|
ui: e(M, {}),
|
|
292
302
|
/** Feature toggles */
|
|
293
303
|
features: e(O, {}),
|
|
294
304
|
/** Block configuration */
|
|
295
|
-
blocks: e(
|
|
305
|
+
blocks: e(D, {}),
|
|
296
306
|
/** Compiler configuration */
|
|
297
307
|
compiler: e(j, {}),
|
|
298
308
|
/** Callbacks and event handlers */
|
|
299
|
-
callbacks: e(q, {})
|
|
309
|
+
callbacks: e(q, {}),
|
|
310
|
+
/** Deployment environment context */
|
|
311
|
+
environment: e(G, {})
|
|
300
312
|
});
|
|
301
313
|
export {
|
|
302
|
-
|
|
314
|
+
D as BlocksSchema,
|
|
303
315
|
q as CallbacksSchema,
|
|
304
316
|
H as CompilerRuleSchema,
|
|
305
317
|
j as CompilerSchema,
|
|
306
|
-
|
|
318
|
+
N as CustomBlockTypeSchema,
|
|
307
319
|
w as CustomRuleSchema,
|
|
308
|
-
|
|
320
|
+
x as DefaultBlockTypeSchema,
|
|
309
321
|
A as DynamicContentSchema,
|
|
310
|
-
|
|
311
|
-
|
|
322
|
+
P as EditorSchema,
|
|
323
|
+
L as EmailHeaderSchema,
|
|
324
|
+
G as EnvironmentSchema,
|
|
312
325
|
T as FallbackFontSchema,
|
|
313
326
|
O as FeaturesSchema,
|
|
314
|
-
|
|
327
|
+
z as GuidoConfigSchema,
|
|
315
328
|
R as IdentitySchema,
|
|
316
329
|
I as LegacyRecommendationConfigSchema,
|
|
317
|
-
|
|
330
|
+
b as MessageType,
|
|
318
331
|
C as PartnerSchema,
|
|
319
332
|
r as ProductType,
|
|
320
333
|
U as RegexRuleSchema,
|
|
321
334
|
B as RemoveRuleSchema,
|
|
322
335
|
F as ReplaceRuleSchema,
|
|
323
|
-
|
|
324
|
-
|
|
336
|
+
v as TemplateMigrationSchema,
|
|
337
|
+
E as TemplateSchema,
|
|
325
338
|
M as UISchema
|
|
326
339
|
};
|
|
@@ -8,6 +8,8 @@ const c = /* @__PURE__ */ n({
|
|
|
8
8
|
setup(l, { expose: r }) {
|
|
9
9
|
const e = m(null);
|
|
10
10
|
return r({
|
|
11
|
+
// Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
|
|
12
|
+
// v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
|
|
11
13
|
handleSave: (t) => {
|
|
12
14
|
var o;
|
|
13
15
|
return (o = e.value) == null ? void 0 : o.handleSave(t);
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { useTranslations as R } from "../composables/useTranslations.js";
|
|
2
2
|
import { ProductType as s } from "../@types/config/schemas.js";
|
|
3
3
|
import "../@types/config/defaults.js";
|
|
4
|
-
import { getEnvironmentPrefix as
|
|
4
|
+
import { getEnvironmentPrefix as n } from "../utils/environmentUtil.js";
|
|
5
5
|
const B = {
|
|
6
6
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
7
7
|
PREFERENCES_LINK_TYPE: 3
|
|
8
|
-
},
|
|
8
|
+
}, i = {
|
|
9
9
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
10
10
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
11
11
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
12
12
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
13
|
-
},
|
|
14
|
-
UNSUBSCRIBE_URL
|
|
15
|
-
|
|
16
|
-
},
|
|
13
|
+
}, C = {
|
|
14
|
+
get UNSUBSCRIBE_URL() {
|
|
15
|
+
return `https://mail.${n()}.com/user/v1/unsub`;
|
|
16
|
+
},
|
|
17
|
+
get PREFERENCES_URL() {
|
|
18
|
+
return `https://mail.${n()}.com/user/v1/prefs`;
|
|
19
|
+
}
|
|
20
|
+
}, U = {
|
|
17
21
|
[s.EMAIL]: "email",
|
|
18
22
|
[s.ARCHITECT]: "journey",
|
|
19
23
|
[s.UNSUBSCRIBE_PAGES]: "email"
|
|
20
|
-
}, c = "iid", S = "G",
|
|
24
|
+
}, c = "iid", S = "G", _ = "P", o = [
|
|
21
25
|
S,
|
|
22
|
-
|
|
23
|
-
],
|
|
26
|
+
_
|
|
27
|
+
], u = () => ({
|
|
24
28
|
name: R()("onboarding-center.email-subscribers-global-unsub-card-title"),
|
|
25
29
|
sendGridId: S
|
|
26
|
-
}),
|
|
30
|
+
}), T = "/email/unsubscribe-pages", E = {
|
|
27
31
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
28
32
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
29
33
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
30
34
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
31
35
|
RESUBSCRIBE: 5
|
|
32
|
-
},
|
|
36
|
+
}, b = {
|
|
33
37
|
[E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
|
|
34
38
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
|
|
35
|
-
},
|
|
39
|
+
}, P = {
|
|
36
40
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
37
41
|
E.GLOBAL_UNSUBSCRIBE,
|
|
38
42
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -42,16 +46,16 @@ const B = {
|
|
|
42
46
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
43
47
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
44
48
|
]
|
|
45
|
-
},
|
|
46
|
-
const
|
|
49
|
+
}, L = () => {
|
|
50
|
+
const e = R();
|
|
47
51
|
return {
|
|
48
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
49
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
50
|
-
[E.RESUBSCRIBE]:
|
|
51
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
52
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
52
|
+
[E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
|
|
53
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
54
|
+
[E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
|
|
55
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
56
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
53
57
|
};
|
|
54
|
-
},
|
|
58
|
+
}, O = {
|
|
55
59
|
default: "{{ins-unsubscribe-link}}",
|
|
56
60
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
57
61
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
@@ -59,17 +63,17 @@ const B = {
|
|
|
59
63
|
export {
|
|
60
64
|
S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
|
|
61
65
|
c as INSIDER_ID,
|
|
62
|
-
|
|
66
|
+
i as LINK_REGEXES,
|
|
63
67
|
B as LINK_TYPES,
|
|
64
|
-
|
|
68
|
+
O as MERGE_TAGS,
|
|
65
69
|
E as PAGE_TYPES,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
_ as PIXEL_TRACKING_SEND_GRID_ID,
|
|
71
|
+
U as PRODUCT_TYPE_URL_SEGMENTS,
|
|
72
|
+
P as TYPE_COLLECTIONS,
|
|
73
|
+
T as UNSUBSCRIBE_PAGES_LINK,
|
|
74
|
+
o as UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS,
|
|
75
|
+
b as UNSUBSCRIBE_SYNC_MODULE_TYPES,
|
|
76
|
+
C as URLS,
|
|
77
|
+
u as getDefaultUnsubscribeGroup,
|
|
78
|
+
L as getTypeTranslations
|
|
75
79
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-06afaecb]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-06afaecb]{min-height:504px}.iframe-wrapper[data-v-cbafc185]{width:258px}.iframe-scaled[data-v-cbafc185]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* These are applied during validation when values are not provided.
|
|
6
6
|
* @module @types/config/defaults
|
|
7
7
|
*/
|
|
8
|
-
import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
|
|
8
|
+
import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EnvironmentConfig, EmailHeader } from './types';
|
|
9
9
|
/**
|
|
10
10
|
* Default email header values
|
|
11
11
|
*/
|
|
@@ -38,6 +38,10 @@ export declare const DEFAULT_BLOCKS: BlocksConfig;
|
|
|
38
38
|
* Default compiler configuration
|
|
39
39
|
*/
|
|
40
40
|
export declare const DEFAULT_COMPILER: CompilerConfig;
|
|
41
|
+
/**
|
|
42
|
+
* Default environment configuration (no explicit prefix — derived from hostname)
|
|
43
|
+
*/
|
|
44
|
+
export declare const DEFAULT_ENVIRONMENT: EnvironmentConfig;
|
|
41
45
|
/**
|
|
42
46
|
* Default product type (Email)
|
|
43
47
|
*/
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
|
-
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
|
-
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, EnvironmentSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, EnvironmentConfig, EnvironmentConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
|
+
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -560,6 +560,17 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
560
560
|
*/
|
|
561
561
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
562
562
|
}, undefined>;
|
|
563
|
+
/**
|
|
564
|
+
* Environment configuration - deployment environment context
|
|
565
|
+
*/
|
|
566
|
+
export declare const EnvironmentSchema: v.ObjectSchema<{
|
|
567
|
+
/**
|
|
568
|
+
* Environment prefix for runtime-built hosts (unsubscribe / preference-center
|
|
569
|
+
* links compile to `https://mail.<prefix>.com/...`). When omitted, the prefix
|
|
570
|
+
* is derived from the hostname with a safe production fallback (SD-145225).
|
|
571
|
+
*/
|
|
572
|
+
readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "environment.prefix cannot be empty">]>, undefined>;
|
|
573
|
+
}, undefined>;
|
|
563
574
|
/**
|
|
564
575
|
* Complete Guido configuration schema
|
|
565
576
|
*
|
|
@@ -573,6 +584,7 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
573
584
|
* - blocks: Block configuration
|
|
574
585
|
* - compiler: HTML compilation
|
|
575
586
|
* - callbacks: Event handlers and hooks
|
|
587
|
+
* - environment: Deployment environment context
|
|
576
588
|
*/
|
|
577
589
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
578
590
|
/** Identity configuration (required) */
|
|
@@ -805,4 +817,13 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
805
817
|
*/
|
|
806
818
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
807
819
|
}, undefined>, {}>;
|
|
820
|
+
/** Deployment environment context */
|
|
821
|
+
readonly environment: v.OptionalSchema<v.ObjectSchema<{
|
|
822
|
+
/**
|
|
823
|
+
* Environment prefix for runtime-built hosts (unsubscribe / preference-center
|
|
824
|
+
* links compile to `https://mail.<prefix>.com/...`). When omitted, the prefix
|
|
825
|
+
* is derived from the hostname with a safe production fallback (SD-145225).
|
|
826
|
+
*/
|
|
827
|
+
readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "environment.prefix cannot be empty">]>, undefined>;
|
|
828
|
+
}, undefined>, {}>;
|
|
808
829
|
}, undefined>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, EnvironmentSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -49,6 +49,8 @@ export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
|
49
49
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
50
50
|
/** Callbacks configuration (event handlers and hooks) */
|
|
51
51
|
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
52
|
+
/** Environment configuration (deployment environment context) */
|
|
53
|
+
export type EnvironmentConfig = v.InferOutput<typeof EnvironmentSchema>;
|
|
52
54
|
/** Re-export ExternalValidationHandler for convenience */
|
|
53
55
|
export type { ExternalValidationHandler };
|
|
54
56
|
/** Email header configuration (senderName, subject) */
|
|
@@ -101,6 +103,8 @@ export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
|
101
103
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
102
104
|
/** Input type for callbacks configuration */
|
|
103
105
|
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
106
|
+
/** Input type for environment configuration */
|
|
107
|
+
export type EnvironmentConfigInput = v.InferInput<typeof EnvironmentSchema>;
|
|
104
108
|
/** Default Stripo block types */
|
|
105
109
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
106
110
|
/** Custom Guido block types */
|
|
@@ -133,6 +133,9 @@ export declare const useConfig: () => {
|
|
|
133
133
|
callbacks: {
|
|
134
134
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
135
135
|
};
|
|
136
|
+
environment: {
|
|
137
|
+
prefix?: string | undefined;
|
|
138
|
+
};
|
|
136
139
|
} | null>;
|
|
137
140
|
initialized: import("vue").Ref<boolean>;
|
|
138
141
|
identity: import("vue").ComputedRef<{
|
|
@@ -9,8 +9,8 @@ export declare const LINK_REGEXES: {
|
|
|
9
9
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
10
10
|
};
|
|
11
11
|
export declare const URLS: {
|
|
12
|
-
UNSUBSCRIBE_URL: string;
|
|
13
|
-
PREFERENCES_URL: string;
|
|
12
|
+
readonly UNSUBSCRIBE_URL: string;
|
|
13
|
+
readonly PREFERENCES_URL: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const PRODUCT_TYPE_URL_SEGMENTS: {
|
|
16
16
|
readonly 60: "email";
|
package/dist/src/library.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Guido } from './components/Guido.vue';
|
|
2
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
2
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EnvironmentConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
3
3
|
export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
|
|
4
4
|
export type { StripoEventType } from './@types/events';
|
|
5
5
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, CallbacksConfig } from '@@/Types/config';
|
|
1
|
+
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, CallbacksConfig, EnvironmentConfig } from '@@/Types/config';
|
|
2
2
|
interface ConfigStoreState {
|
|
3
3
|
/** Whether the config has been initialized */
|
|
4
4
|
initialized: boolean;
|
|
@@ -138,6 +138,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
138
138
|
callbacks: {
|
|
139
139
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
140
140
|
};
|
|
141
|
+
environment: {
|
|
142
|
+
prefix?: string | undefined;
|
|
143
|
+
};
|
|
141
144
|
} | null;
|
|
142
145
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
143
146
|
/**
|
|
@@ -272,6 +275,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
272
275
|
callbacks: {
|
|
273
276
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
274
277
|
};
|
|
278
|
+
environment: {
|
|
279
|
+
prefix?: string | undefined;
|
|
280
|
+
};
|
|
275
281
|
} | null;
|
|
276
282
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
277
283
|
/**
|
|
@@ -406,6 +412,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
406
412
|
callbacks: {
|
|
407
413
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
408
414
|
};
|
|
415
|
+
environment: {
|
|
416
|
+
prefix?: string | undefined;
|
|
417
|
+
};
|
|
409
418
|
} | null;
|
|
410
419
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
411
420
|
/**
|
|
@@ -540,6 +549,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
540
549
|
callbacks: {
|
|
541
550
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
542
551
|
};
|
|
552
|
+
environment: {
|
|
553
|
+
prefix?: string | undefined;
|
|
554
|
+
};
|
|
543
555
|
} | null;
|
|
544
556
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
545
557
|
/**
|
|
@@ -674,6 +686,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
674
686
|
callbacks: {
|
|
675
687
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
676
688
|
};
|
|
689
|
+
environment: {
|
|
690
|
+
prefix?: string | undefined;
|
|
691
|
+
};
|
|
677
692
|
} | null;
|
|
678
693
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
679
694
|
/**
|
|
@@ -808,6 +823,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
808
823
|
callbacks: {
|
|
809
824
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
810
825
|
};
|
|
826
|
+
environment: {
|
|
827
|
+
prefix?: string | undefined;
|
|
828
|
+
};
|
|
811
829
|
} | null;
|
|
812
830
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
813
831
|
/**
|
|
@@ -942,6 +960,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
942
960
|
callbacks: {
|
|
943
961
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
944
962
|
};
|
|
963
|
+
environment: {
|
|
964
|
+
prefix?: string | undefined;
|
|
965
|
+
};
|
|
945
966
|
} | null;
|
|
946
967
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
947
968
|
/**
|
|
@@ -1076,6 +1097,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1076
1097
|
callbacks: {
|
|
1077
1098
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1078
1099
|
};
|
|
1100
|
+
environment: {
|
|
1101
|
+
prefix?: string | undefined;
|
|
1102
|
+
};
|
|
1079
1103
|
} | null;
|
|
1080
1104
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
1081
1105
|
/**
|
|
@@ -1210,8 +1234,148 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1210
1234
|
callbacks: {
|
|
1211
1235
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1212
1236
|
};
|
|
1237
|
+
environment: {
|
|
1238
|
+
prefix?: string | undefined;
|
|
1239
|
+
};
|
|
1213
1240
|
} | null;
|
|
1214
1241
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
1242
|
+
/**
|
|
1243
|
+
* Get the environment configuration
|
|
1244
|
+
*/
|
|
1245
|
+
environment: (state: {
|
|
1246
|
+
initialized: boolean;
|
|
1247
|
+
config: {
|
|
1248
|
+
identity: {
|
|
1249
|
+
templateId: string;
|
|
1250
|
+
userId: string;
|
|
1251
|
+
variationId?: string | undefined;
|
|
1252
|
+
};
|
|
1253
|
+
partner: {
|
|
1254
|
+
name: string;
|
|
1255
|
+
productType: 60 | 49 | 97;
|
|
1256
|
+
messageType: 1 | 2;
|
|
1257
|
+
username: string;
|
|
1258
|
+
fallbackFont?: {
|
|
1259
|
+
name: string;
|
|
1260
|
+
family: string;
|
|
1261
|
+
} | undefined;
|
|
1262
|
+
};
|
|
1263
|
+
template: {
|
|
1264
|
+
html: string;
|
|
1265
|
+
css: string;
|
|
1266
|
+
preselectedDynamicContent: {
|
|
1267
|
+
text: string;
|
|
1268
|
+
value: string;
|
|
1269
|
+
fallback?: string | undefined;
|
|
1270
|
+
format?: {
|
|
1271
|
+
key: string;
|
|
1272
|
+
value: string;
|
|
1273
|
+
} | undefined;
|
|
1274
|
+
}[];
|
|
1275
|
+
customFieldAttributes: string[];
|
|
1276
|
+
selectedUnsubscribePages: number[];
|
|
1277
|
+
forceRecreate: boolean;
|
|
1278
|
+
migration: {
|
|
1279
|
+
recommendationConfigs: {
|
|
1280
|
+
[x: string]: {
|
|
1281
|
+
id?: number | undefined;
|
|
1282
|
+
decimalCount?: string | number | undefined;
|
|
1283
|
+
productIds?: unknown[] | undefined;
|
|
1284
|
+
sendProductRequestFlag?: boolean | undefined;
|
|
1285
|
+
shuffleProducts?: boolean | undefined;
|
|
1286
|
+
filters?: unknown[] | undefined;
|
|
1287
|
+
currency?: string | undefined;
|
|
1288
|
+
currencySettings?: unknown;
|
|
1289
|
+
language?: string | undefined;
|
|
1290
|
+
strategy?: string | undefined;
|
|
1291
|
+
recommendedProducts?: unknown[] | undefined;
|
|
1292
|
+
cardsInRow?: number | undefined;
|
|
1293
|
+
mobileRightPadding?: number | undefined;
|
|
1294
|
+
mobileLeftPadding?: number | undefined;
|
|
1295
|
+
unresponsive?: boolean | undefined;
|
|
1296
|
+
orientation?: string | undefined;
|
|
1297
|
+
textTrimming?: boolean | undefined;
|
|
1298
|
+
blockType?: string | undefined;
|
|
1299
|
+
size?: string | number | undefined;
|
|
1300
|
+
verticalResponsiveness?: boolean | undefined;
|
|
1301
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1302
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1303
|
+
} & {
|
|
1304
|
+
[key: string]: unknown;
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
editor: {
|
|
1310
|
+
locale: string;
|
|
1311
|
+
translationsPath: string;
|
|
1312
|
+
migrationDate: number;
|
|
1313
|
+
emailHeader: {
|
|
1314
|
+
senderName: string;
|
|
1315
|
+
subject: string;
|
|
1316
|
+
};
|
|
1317
|
+
savedModulesFolderName: string;
|
|
1318
|
+
defaultModulesFolderName: string;
|
|
1319
|
+
};
|
|
1320
|
+
ui: {
|
|
1321
|
+
showHeader: boolean;
|
|
1322
|
+
backButtonLabel?: string | undefined;
|
|
1323
|
+
};
|
|
1324
|
+
features: {
|
|
1325
|
+
dynamicContent: boolean;
|
|
1326
|
+
saveAsTemplate: boolean;
|
|
1327
|
+
versionHistory: boolean;
|
|
1328
|
+
testMessage: boolean;
|
|
1329
|
+
displayConditions: boolean;
|
|
1330
|
+
unsubscribe: boolean;
|
|
1331
|
+
modulesDisabled: boolean;
|
|
1332
|
+
liquidSyntax: boolean;
|
|
1333
|
+
autosave: boolean;
|
|
1334
|
+
};
|
|
1335
|
+
blocks: {
|
|
1336
|
+
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
1337
|
+
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
1338
|
+
};
|
|
1339
|
+
compiler: {
|
|
1340
|
+
customRules: ({
|
|
1341
|
+
type: "replace";
|
|
1342
|
+
search: string;
|
|
1343
|
+
replacement: string;
|
|
1344
|
+
replaceAll?: boolean | undefined;
|
|
1345
|
+
id: string;
|
|
1346
|
+
description?: string | undefined;
|
|
1347
|
+
priority: number;
|
|
1348
|
+
} | {
|
|
1349
|
+
type: "regex";
|
|
1350
|
+
pattern: string;
|
|
1351
|
+
replacement: string;
|
|
1352
|
+
flags?: string | undefined;
|
|
1353
|
+
id: string;
|
|
1354
|
+
description?: string | undefined;
|
|
1355
|
+
priority: number;
|
|
1356
|
+
} | {
|
|
1357
|
+
type: "remove";
|
|
1358
|
+
targets: string[];
|
|
1359
|
+
id: string;
|
|
1360
|
+
description?: string | undefined;
|
|
1361
|
+
priority: number;
|
|
1362
|
+
} | {
|
|
1363
|
+
type: "custom";
|
|
1364
|
+
processor: (html: string) => string;
|
|
1365
|
+
id: string;
|
|
1366
|
+
description?: string | undefined;
|
|
1367
|
+
priority: number;
|
|
1368
|
+
})[];
|
|
1369
|
+
ignoreDefaultRules: boolean;
|
|
1370
|
+
};
|
|
1371
|
+
callbacks: {
|
|
1372
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1373
|
+
};
|
|
1374
|
+
environment: {
|
|
1375
|
+
prefix?: string | undefined;
|
|
1376
|
+
};
|
|
1377
|
+
} | null;
|
|
1378
|
+
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EnvironmentConfig | null;
|
|
1215
1379
|
/**
|
|
1216
1380
|
* Get the template ID
|
|
1217
1381
|
*/
|
|
@@ -1344,6 +1508,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1344
1508
|
callbacks: {
|
|
1345
1509
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1346
1510
|
};
|
|
1511
|
+
environment: {
|
|
1512
|
+
prefix?: string | undefined;
|
|
1513
|
+
};
|
|
1347
1514
|
} | null;
|
|
1348
1515
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1349
1516
|
/**
|
|
@@ -1478,6 +1645,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1478
1645
|
callbacks: {
|
|
1479
1646
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1480
1647
|
};
|
|
1648
|
+
environment: {
|
|
1649
|
+
prefix?: string | undefined;
|
|
1650
|
+
};
|
|
1481
1651
|
} | null;
|
|
1482
1652
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1483
1653
|
/**
|
|
@@ -1612,6 +1782,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1612
1782
|
callbacks: {
|
|
1613
1783
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1614
1784
|
};
|
|
1785
|
+
environment: {
|
|
1786
|
+
prefix?: string | undefined;
|
|
1787
|
+
};
|
|
1615
1788
|
} | null;
|
|
1616
1789
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1617
1790
|
/**
|
|
@@ -1746,6 +1919,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1746
1919
|
callbacks: {
|
|
1747
1920
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1748
1921
|
};
|
|
1922
|
+
environment: {
|
|
1923
|
+
prefix?: string | undefined;
|
|
1924
|
+
};
|
|
1749
1925
|
} | null;
|
|
1750
1926
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1751
1927
|
/**
|
|
@@ -1880,6 +2056,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1880
2056
|
callbacks: {
|
|
1881
2057
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1882
2058
|
};
|
|
2059
|
+
environment: {
|
|
2060
|
+
prefix?: string | undefined;
|
|
2061
|
+
};
|
|
1883
2062
|
} | null;
|
|
1884
2063
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1885
2064
|
/**
|
|
@@ -2014,6 +2193,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2014
2193
|
callbacks: {
|
|
2015
2194
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2016
2195
|
};
|
|
2196
|
+
environment: {
|
|
2197
|
+
prefix?: string | undefined;
|
|
2198
|
+
};
|
|
2017
2199
|
} | null;
|
|
2018
2200
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
2019
2201
|
/**
|
|
@@ -2148,6 +2330,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2148
2330
|
callbacks: {
|
|
2149
2331
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2150
2332
|
};
|
|
2333
|
+
environment: {
|
|
2334
|
+
prefix?: string | undefined;
|
|
2335
|
+
};
|
|
2151
2336
|
} | null;
|
|
2152
2337
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
2153
2338
|
/**
|
|
@@ -2282,6 +2467,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2282
2467
|
callbacks: {
|
|
2283
2468
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2284
2469
|
};
|
|
2470
|
+
environment: {
|
|
2471
|
+
prefix?: string | undefined;
|
|
2472
|
+
};
|
|
2285
2473
|
} | null;
|
|
2286
2474
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
2287
2475
|
/**
|
|
@@ -2416,6 +2604,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2416
2604
|
callbacks: {
|
|
2417
2605
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2418
2606
|
};
|
|
2607
|
+
environment: {
|
|
2608
|
+
prefix?: string | undefined;
|
|
2609
|
+
};
|
|
2419
2610
|
} | null;
|
|
2420
2611
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
2421
2612
|
}, {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/** Production default — pony-express builds unsubscribe links on mail.useinsider.com. */
|
|
2
|
+
export declare const DEFAULT_ENVIRONMENT_PREFIX = "useinsider";
|
|
1
3
|
/**
|
|
2
|
-
* Gets the
|
|
3
|
-
*
|
|
4
|
+
* Gets the environment prefix used to build runtime hosts (`https://mail.<prefix>.com`).
|
|
5
|
+
* Resolution order: explicit `environment.prefix` config → third hostname segment →
|
|
6
|
+
* production default. Never returns `undefined` (SD-145225).
|
|
4
7
|
*/
|
|
5
8
|
export declare const getEnvironmentPrefix: () => string;
|
package/dist/stores/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import "../@types/config/schemas.js";
|
|
|
2
2
|
import "../@types/config/defaults.js";
|
|
3
3
|
import { parseConfig as o } from "../@types/config/validator.js";
|
|
4
4
|
import { defineStore as r } from "pinia";
|
|
5
|
-
const
|
|
5
|
+
const s = r("guido-config", {
|
|
6
6
|
state: () => ({
|
|
7
7
|
initialized: !1,
|
|
8
8
|
config: null
|
|
@@ -71,69 +71,76 @@ const f = r("guido-config", {
|
|
|
71
71
|
var e;
|
|
72
72
|
return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
|
|
73
73
|
},
|
|
74
|
+
/**
|
|
75
|
+
* Get the environment configuration
|
|
76
|
+
*/
|
|
77
|
+
environment: (i) => {
|
|
78
|
+
var e;
|
|
79
|
+
return ((e = i.config) == null ? void 0 : e.environment) ?? null;
|
|
80
|
+
},
|
|
74
81
|
/**
|
|
75
82
|
* Get the template ID
|
|
76
83
|
*/
|
|
77
84
|
templateId: (i) => {
|
|
78
|
-
var e,
|
|
79
|
-
return ((
|
|
85
|
+
var e, n;
|
|
86
|
+
return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.templateId) ?? "";
|
|
80
87
|
},
|
|
81
88
|
/**
|
|
82
89
|
* Get the user ID
|
|
83
90
|
*/
|
|
84
91
|
userId: (i) => {
|
|
85
|
-
var e,
|
|
86
|
-
return ((
|
|
92
|
+
var e, n;
|
|
93
|
+
return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.userId) ?? "";
|
|
87
94
|
},
|
|
88
95
|
/**
|
|
89
96
|
* Get the variation ID
|
|
90
97
|
*/
|
|
91
98
|
variationId: (i) => {
|
|
92
|
-
var e,
|
|
93
|
-
return ((
|
|
99
|
+
var e, n;
|
|
100
|
+
return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.variationId) ?? "";
|
|
94
101
|
},
|
|
95
102
|
/**
|
|
96
103
|
* Get the partner name
|
|
97
104
|
*/
|
|
98
105
|
partnerName: (i) => {
|
|
99
|
-
var e,
|
|
100
|
-
return ((
|
|
106
|
+
var e, n;
|
|
107
|
+
return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.name) ?? "";
|
|
101
108
|
},
|
|
102
109
|
/**
|
|
103
110
|
* Get the product type
|
|
104
111
|
*/
|
|
105
112
|
productType: (i) => {
|
|
106
|
-
var e,
|
|
107
|
-
return ((
|
|
113
|
+
var e, n;
|
|
114
|
+
return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.productType) ?? 60;
|
|
108
115
|
},
|
|
109
116
|
/**
|
|
110
117
|
* Get the message type
|
|
111
118
|
*/
|
|
112
119
|
messageType: (i) => {
|
|
113
|
-
var e,
|
|
114
|
-
return ((
|
|
120
|
+
var e, n;
|
|
121
|
+
return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.messageType) ?? 1;
|
|
115
122
|
},
|
|
116
123
|
/**
|
|
117
124
|
* Get the username
|
|
118
125
|
*/
|
|
119
126
|
username: (i) => {
|
|
120
|
-
var e,
|
|
121
|
-
return ((
|
|
127
|
+
var e, n;
|
|
128
|
+
return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.username) ?? "Guido User";
|
|
122
129
|
},
|
|
123
130
|
/**
|
|
124
131
|
* Check if header should be shown
|
|
125
132
|
*/
|
|
126
133
|
showHeader: (i) => {
|
|
127
|
-
var e,
|
|
128
|
-
return ((
|
|
134
|
+
var e, n;
|
|
135
|
+
return ((n = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : n.showHeader) ?? !0;
|
|
129
136
|
},
|
|
130
137
|
/**
|
|
131
138
|
* Check if a specific feature is enabled
|
|
132
139
|
*/
|
|
133
140
|
// eslint-disable-next-line @stylistic/max-len
|
|
134
141
|
isFeatureEnabled: (i) => (e) => {
|
|
135
|
-
var
|
|
136
|
-
return ((
|
|
142
|
+
var n, t;
|
|
143
|
+
return ((t = (n = i.config) == null ? void 0 : n.features) == null ? void 0 : t[e]) ?? !0;
|
|
137
144
|
}
|
|
138
145
|
},
|
|
139
146
|
actions: {
|
|
@@ -153,5 +160,5 @@ const f = r("guido-config", {
|
|
|
153
160
|
}
|
|
154
161
|
});
|
|
155
162
|
export {
|
|
156
|
-
|
|
163
|
+
s as useConfigStore
|
|
157
164
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { useConfigStore as n } from "../stores/config.js";
|
|
2
|
+
import { getActivePinia as e } from "pinia";
|
|
3
|
+
const t = "useinsider", s = () => {
|
|
4
|
+
var i, o;
|
|
5
|
+
return (e() ? (o = (i = n().config) == null ? void 0 : i.environment) == null ? void 0 : o.prefix : void 0) ?? window.location.hostname.split(".")[2] ?? t;
|
|
6
|
+
};
|
|
2
7
|
export {
|
|
3
|
-
|
|
8
|
+
t as DEFAULT_ENVIRONMENT_PREFIX,
|
|
9
|
+
s as getEnvironmentPrefix
|
|
4
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.11.0-beta.
|
|
3
|
+
"version": "3.11.0-beta.17c184c",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"test:visual-update": "npx playwright test --update-snapshots --reporter html",
|
|
35
35
|
"test:e2e:coverage": "E2E_COVERAGE=true playwright test",
|
|
36
36
|
"coverage:e2e:report": "nyc report --reporter=lcov --reporter=text-summary --report-dir=coverage/e2e",
|
|
37
|
+
"test:mutation": "stryker run",
|
|
38
|
+
"test:mutation:since": "CHANGED=$(git diff --name-only --diff-filter=AMR origin/develop...HEAD -- 'src/**/*.ts' ':(glob)src/components/organisms/onboarding/**/*.vue' ':(glob)src/components/organisms/header/**/*.vue' ':(glob)src/components/organisms/unsubscribe/**/*.vue' ':(glob)src/components/organisms/save-as-template/**/*.vue' ':(glob)src/components/organisms/email-preview/**/*.vue' ':(glob)src/components/wrappers/**/*.vue' 'src/components/Guido.vue' ':(exclude)src/**/*.test.ts' ':(exclude)src/**/index.ts' ':(exclude)src/@types/**' ':(exclude)src/enums/**' ':(exclude)src/mock/**' ':(exclude)src/**/_Boilerplate/**' | paste -sd, -); if [ -n \"$CHANGED\" ]; then stryker run --incremental --mutate \"$CHANGED\"; else echo \"No changed mutatable src files vs origin/develop\"; fi",
|
|
37
39
|
"prepare": "husky",
|
|
38
40
|
"preinstall": "rm -rf ./node_modules/.vite"
|
|
39
41
|
},
|
|
@@ -57,6 +59,8 @@
|
|
|
57
59
|
"@eslint/eslintrc": "3.3.0",
|
|
58
60
|
"@eslint/js": "8.57.1",
|
|
59
61
|
"@playwright/test": "1.57.0",
|
|
62
|
+
"@stryker-mutator/core": "9.6.1",
|
|
63
|
+
"@stryker-mutator/vitest-runner": "9.6.1",
|
|
60
64
|
"@stylistic/eslint-plugin": "3.1.0",
|
|
61
65
|
"@stylistic/eslint-plugin-migrate": "3.1.0",
|
|
62
66
|
"@types/eslint": "8.56.12",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|