@useinsider/guido 3.28.1-beta.d3309a6 → 3.28.1-beta.d6813f5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -10
- package/dist/@types/config/schemas.js +129 -142
- package/dist/@types/display-condition.js +21 -45
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +19 -25
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +55 -77
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +1 -1
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +43 -62
- package/dist/composables/useDisplayConditions.js +68 -83
- package/dist/enums/html-validator.js +1 -1
- package/dist/extensions/DisplayConditions/constants.js +10 -19
- package/dist/extensions/DisplayConditions/control.js +99 -120
- package/dist/extensions/DisplayConditions/display-conditions.css.js +6 -58
- package/dist/extensions/DisplayConditions/extension.js +14 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +102 -118
- package/dist/package.json.js +1 -1
- package/dist/services/displayConditionApi.js +19 -18
- package/dist/src/@types/config/schemas.d.ts +0 -65
- package/dist/src/@types/display-condition.d.ts +0 -67
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +2 -42
- package/dist/src/composables/useDisplayConditions.d.ts +1 -1
- package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -2
- package/dist/src/extensions/DisplayConditions/control.d.ts +0 -1
- package/dist/src/stores/config.d.ts +21 -441
- package/package.json +1 -1
- package/dist/components/organisms/display-conditions/LogicBuilderConnector.vue.js +0 -18
- package/dist/components/organisms/display-conditions/LogicBuilderConnector.vue2.js +0 -25
- package/dist/components/organisms/display-conditions/LogicBuilderField.vue.js +0 -28
- package/dist/components/organisms/display-conditions/LogicBuilderField.vue2.js +0 -28
- package/dist/components/organisms/display-conditions/LogicBuilderGroup.vue.js +0 -30
- package/dist/components/organisms/display-conditions/LogicBuilderGroup.vue2.js +0 -32
- package/dist/components/organisms/display-conditions/LogicBuilderRow.vue.js +0 -28
- package/dist/components/organisms/display-conditions/LogicBuilderRow.vue2.js +0 -60
- package/dist/composables/useScrollToInvalid.js +0 -15
- package/dist/src/components/organisms/display-conditions/LogicBuilderConnector.vue.d.ts +0 -19
- package/dist/src/components/organisms/display-conditions/LogicBuilderField.vue.d.ts +0 -22
- package/dist/src/components/organisms/display-conditions/LogicBuilderGroup.vue.d.ts +0 -24
- package/dist/src/components/organisms/display-conditions/LogicBuilderRow.vue.d.ts +0 -25
- package/dist/src/composables/useScrollToInvalid.d.ts +0 -6
- package/dist/src/utils/displayConditionBuilder.d.ts +0 -29
- package/dist/src/utils/displayConditionRules.d.ts +0 -12
- package/dist/src/utils/displayConditionSummary.d.ts +0 -11
- package/dist/utils/displayConditionBuilder.js +0 -50
- package/dist/utils/displayConditionRules.js +0 -91
- package/dist/utils/displayConditionSummary.js +0 -28
package/README.md
CHANGED
|
@@ -131,16 +131,6 @@ const config: GuidoConfigInput = {
|
|
|
131
131
|
// Behaviour change: releases up to v3.23.0 forced a recreate for any non-empty html and
|
|
132
132
|
// ignored this option, so a host that sends `false` now gets Stripo's stored copy.
|
|
133
133
|
forceRecreate?: boolean,
|
|
134
|
-
// Properties offered by the display-condition Logic Builder (features.externalDisplayConditions),
|
|
135
|
-
// listed under "Custom Attributes" and "Default Attributes". `key` is the Liquid/Pongo variable the
|
|
136
|
-
// compiled condition reads; `type` picks the operators and the value input; `options` turns the value
|
|
137
|
-
// into a select. Invalid items are dropped. Default: { custom: [], default: [] }.
|
|
138
|
-
// Item shape: { key: string, label: string, type?: 'string' | 'number' | 'boolean' | 'date' | 'strings'
|
|
139
|
-
// (default 'string'), options?: { label: string, value: string }[] }. Dates compare as YYYY-MM-DD strings.
|
|
140
|
-
displayConditionAttributes?: {
|
|
141
|
-
custom?: DisplayConditionAttributeItem[],
|
|
142
|
-
default?: DisplayConditionAttributeItem[],
|
|
143
|
-
},
|
|
144
134
|
migration?: {
|
|
145
135
|
// Legacy block configs keyed by block ID. Consumed once by the migrator
|
|
146
136
|
// when upgrading templates authored with v1 block formats. See the
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as
|
|
3
|
-
|
|
4
|
-
const p = {
|
|
1
|
+
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
+
import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
|
+
const b = {
|
|
5
4
|
/** Promotional/marketing emails */
|
|
6
5
|
PROMOTIONAL: 1,
|
|
7
6
|
/** Transactional/system emails */
|
|
@@ -13,16 +12,16 @@ const p = {
|
|
|
13
12
|
ARCHITECT: 49,
|
|
14
13
|
/** Unsubscribe page builder */
|
|
15
14
|
UNSUBSCRIBE_PAGES: 97
|
|
16
|
-
},
|
|
15
|
+
}, A = o({
|
|
17
16
|
/** Unique identifier for the template being edited */
|
|
18
17
|
templateId: r(
|
|
19
18
|
t(),
|
|
20
|
-
|
|
19
|
+
p(1, "templateId is required")
|
|
21
20
|
),
|
|
22
21
|
/** Unique identifier for the user editing the template */
|
|
23
22
|
userId: r(
|
|
24
23
|
t(),
|
|
25
|
-
|
|
24
|
+
p(1, "userId is required")
|
|
26
25
|
),
|
|
27
26
|
/** Optional variation ID for A/B testing */
|
|
28
27
|
variationId: e(t()),
|
|
@@ -34,16 +33,16 @@ const p = {
|
|
|
34
33
|
* Stripo doc id) and is never an endpoint id.
|
|
35
34
|
*/
|
|
36
35
|
templateLibraryId: e(t())
|
|
37
|
-
}),
|
|
36
|
+
}), L = o({
|
|
38
37
|
/** Fallback font name (e.g., "Georgia") */
|
|
39
38
|
name: t(),
|
|
40
39
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
41
40
|
family: t()
|
|
42
|
-
}),
|
|
41
|
+
}), E = o({
|
|
43
42
|
/** Partner/organization name (required) */
|
|
44
43
|
name: r(
|
|
45
44
|
t(),
|
|
46
|
-
|
|
45
|
+
p(1, "partner.name is required")
|
|
47
46
|
),
|
|
48
47
|
/** Product type identifier */
|
|
49
48
|
productType: e(
|
|
@@ -56,14 +55,14 @@ const p = {
|
|
|
56
55
|
),
|
|
57
56
|
/** Message type (promotional or transactional) */
|
|
58
57
|
messageType: e(
|
|
59
|
-
m([
|
|
60
|
-
|
|
58
|
+
m([b.PROMOTIONAL, b.TRANSACTIONAL]),
|
|
59
|
+
b.PROMOTIONAL
|
|
61
60
|
),
|
|
62
61
|
/** Display name for the current user */
|
|
63
62
|
username: e(t(), "Guido User"),
|
|
64
63
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
65
|
-
fallbackFont: e(
|
|
66
|
-
}),
|
|
64
|
+
fallbackFont: e(L)
|
|
65
|
+
}), M = o({
|
|
67
66
|
/** Display text for the dynamic content */
|
|
68
67
|
text: t(),
|
|
69
68
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -72,35 +71,35 @@ const p = {
|
|
|
72
71
|
fallback: e(t()),
|
|
73
72
|
/** Optional formatting options */
|
|
74
73
|
format: e(
|
|
75
|
-
|
|
74
|
+
o({
|
|
76
75
|
key: t(),
|
|
77
76
|
value: t()
|
|
78
77
|
})
|
|
79
78
|
)
|
|
80
|
-
}),
|
|
79
|
+
}), f = I(() => C({
|
|
81
80
|
text: e(t()),
|
|
82
81
|
// eslint-disable-next-line camelcase -- backend field name
|
|
83
82
|
tag_text: e(t()),
|
|
84
83
|
value: e(t()),
|
|
85
|
-
children: e(
|
|
84
|
+
children: e(n(f)),
|
|
86
85
|
// eslint-disable-next-line camelcase -- backend field name
|
|
87
|
-
select_items: e(
|
|
88
|
-
})),
|
|
86
|
+
select_items: e(n(f))
|
|
87
|
+
})), P = g(
|
|
89
88
|
t(),
|
|
90
|
-
|
|
91
|
-
),
|
|
89
|
+
R(n(f), [])
|
|
90
|
+
), v = C({
|
|
92
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
93
92
|
id: e(c()),
|
|
94
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
95
|
-
decimalCount: e(
|
|
94
|
+
decimalCount: e(h([t(), c()])),
|
|
96
95
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
97
|
-
productIds: e(
|
|
96
|
+
productIds: e(n(i())),
|
|
98
97
|
/** Whether the block requested live products at send time */
|
|
99
|
-
sendProductRequestFlag: e(
|
|
98
|
+
sendProductRequestFlag: e(a()),
|
|
100
99
|
/** Whether to randomize product order */
|
|
101
|
-
shuffleProducts: e(
|
|
100
|
+
shuffleProducts: e(a()),
|
|
102
101
|
/** Filter rules driving product selection */
|
|
103
|
-
filters: e(
|
|
102
|
+
filters: e(n(i())),
|
|
104
103
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
105
104
|
currency: e(t()),
|
|
106
105
|
/** Currency display settings (separators, alignment, decimals) */
|
|
@@ -110,7 +109,7 @@ const p = {
|
|
|
110
109
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
111
110
|
strategy: e(t()),
|
|
112
111
|
/** Snapshot of products as rendered by the legacy block */
|
|
113
|
-
recommendedProducts: e(
|
|
112
|
+
recommendedProducts: e(n(i())),
|
|
114
113
|
/** Number of product cards per row */
|
|
115
114
|
cardsInRow: e(c()),
|
|
116
115
|
/** Mobile-only padding (right) */
|
|
@@ -118,22 +117,22 @@ const p = {
|
|
|
118
117
|
/** Mobile-only padding (left) */
|
|
119
118
|
mobileLeftPadding: e(c()),
|
|
120
119
|
/** Disable responsive scaling */
|
|
121
|
-
unresponsive: e(
|
|
120
|
+
unresponsive: e(a()),
|
|
122
121
|
/** Layout orientation ('vertical' | 'horizontal') */
|
|
123
122
|
orientation: e(t()),
|
|
124
123
|
/** Whether long text is trimmed */
|
|
125
|
-
textTrimming: e(
|
|
124
|
+
textTrimming: e(a()),
|
|
126
125
|
/** Block type marker used by some legacy variants */
|
|
127
126
|
blockType: e(t()),
|
|
128
127
|
/** Size variant marker (legacy data may use string or number) */
|
|
129
|
-
size: e(
|
|
128
|
+
size: e(h([t(), c()])),
|
|
130
129
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
131
|
-
verticalResponsiveness: e(
|
|
130
|
+
verticalResponsiveness: e(a()),
|
|
132
131
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
133
|
-
isPriceMovedToNextLine: e(
|
|
132
|
+
isPriceMovedToNextLine: e(a()),
|
|
134
133
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
135
|
-
isPriceDeletedForZeroSale: e(
|
|
136
|
-
}),
|
|
134
|
+
isPriceDeletedForZeroSale: e(a())
|
|
135
|
+
}), x = o({
|
|
137
136
|
/**
|
|
138
137
|
* Legacy recommendation block configs keyed by block ID.
|
|
139
138
|
* Pass this when loading a template authored with the v1
|
|
@@ -141,26 +140,17 @@ const p = {
|
|
|
141
140
|
* strategy, currency, locale, and layout data.
|
|
142
141
|
*/
|
|
143
142
|
recommendationConfigs: e(
|
|
144
|
-
|
|
143
|
+
g(t(), v),
|
|
145
144
|
{}
|
|
146
145
|
)
|
|
147
|
-
}),
|
|
148
|
-
T(s(i()), []),
|
|
149
|
-
f((n) => n.flatMap((I) => {
|
|
150
|
-
const S = L(P, I);
|
|
151
|
-
return S.success ? [S.output] : [];
|
|
152
|
-
}))
|
|
153
|
-
), w = a({
|
|
154
|
-
custom: e(g, []),
|
|
155
|
-
default: e(g, [])
|
|
156
|
-
}), B = a({
|
|
146
|
+
}), D = o({
|
|
157
147
|
/** Initial HTML content */
|
|
158
148
|
html: e(t(), ""),
|
|
159
149
|
/** Initial CSS content */
|
|
160
150
|
css: e(t(), ""),
|
|
161
151
|
/** Preselected dynamic content items */
|
|
162
152
|
preselectedDynamicContent: e(
|
|
163
|
-
|
|
153
|
+
n(M),
|
|
164
154
|
[]
|
|
165
155
|
),
|
|
166
156
|
/**
|
|
@@ -169,15 +159,13 @@ const p = {
|
|
|
169
159
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
170
160
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
171
161
|
*/
|
|
172
|
-
dynamicContentList: e(
|
|
162
|
+
dynamicContentList: e(P, {}),
|
|
173
163
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
174
|
-
customFieldAttributes: e(
|
|
175
|
-
/** Attributes the display-condition Logic Builder offers (`ui.externalDisplayConditions`) */
|
|
176
|
-
displayConditionAttributes: e(w, {}),
|
|
164
|
+
customFieldAttributes: e(n(t()), []),
|
|
177
165
|
/** Selected unsubscribe page IDs */
|
|
178
|
-
selectedUnsubscribePages: e(
|
|
166
|
+
selectedUnsubscribePages: e(n(c()), []),
|
|
179
167
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
180
|
-
forceRecreate: e(
|
|
168
|
+
forceRecreate: e(a(), !1),
|
|
181
169
|
/**
|
|
182
170
|
* Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
|
|
183
171
|
* during migration so a rolled-back document never re-mints retired tracking ids.
|
|
@@ -188,7 +176,7 @@ const p = {
|
|
|
188
176
|
trackIdCounter: e(
|
|
189
177
|
r(
|
|
190
178
|
c(),
|
|
191
|
-
|
|
179
|
+
S((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
|
|
192
180
|
),
|
|
193
181
|
0
|
|
194
182
|
),
|
|
@@ -202,17 +190,17 @@ const p = {
|
|
|
202
190
|
recommendationCampaignUrls: e(
|
|
203
191
|
r(
|
|
204
192
|
i(),
|
|
205
|
-
|
|
193
|
+
S((s) => s && typeof s == "object" ? { ...s } : void 0)
|
|
206
194
|
)
|
|
207
195
|
),
|
|
208
196
|
/** Migration-only inputs (legacy block configs) */
|
|
209
|
-
migration: e(
|
|
210
|
-
}),
|
|
197
|
+
migration: e(x, {})
|
|
198
|
+
}), N = o({
|
|
211
199
|
/** Sender display name */
|
|
212
200
|
senderName: e(t(), ""),
|
|
213
201
|
/** Email subject line */
|
|
214
202
|
subject: e(t(), "")
|
|
215
|
-
}),
|
|
203
|
+
}), O = o({
|
|
216
204
|
/** Locale for the editor UI */
|
|
217
205
|
locale: e(t(), "en"),
|
|
218
206
|
/** Path to translations object */
|
|
@@ -220,52 +208,52 @@ const p = {
|
|
|
220
208
|
/** Migration date for template compatibility */
|
|
221
209
|
migrationDate: e(c(), 1759696858),
|
|
222
210
|
/** Email header settings */
|
|
223
|
-
emailHeader: e(
|
|
211
|
+
emailHeader: e(N, { senderName: "", subject: "" }),
|
|
224
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
225
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), y.SAVED_MODULES),
|
|
226
214
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
227
|
-
defaultModulesFolderName: e(t(),
|
|
228
|
-
}),
|
|
215
|
+
defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
|
|
216
|
+
}), F = o({
|
|
229
217
|
/** Whether to show the header bar */
|
|
230
|
-
showHeader: e(
|
|
218
|
+
showHeader: e(a(), !0),
|
|
231
219
|
/** Custom label for back button (if shown) */
|
|
232
220
|
backButtonLabel: e(t()),
|
|
233
221
|
/** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
|
|
234
|
-
externalDisplayConditions: e(
|
|
235
|
-
}),
|
|
222
|
+
externalDisplayConditions: e(a(), !1)
|
|
223
|
+
}), U = o({
|
|
236
224
|
/** Enable dynamic content insertion */
|
|
237
|
-
dynamicContent: e(
|
|
225
|
+
dynamicContent: e(a(), !0),
|
|
238
226
|
/** Enable save as template functionality */
|
|
239
|
-
saveAsTemplate: e(
|
|
227
|
+
saveAsTemplate: e(a(), !0),
|
|
240
228
|
/** Enable version history */
|
|
241
|
-
versionHistory: e(
|
|
229
|
+
versionHistory: e(a(), !0),
|
|
242
230
|
/** Enable test message sending */
|
|
243
|
-
testMessage: e(
|
|
231
|
+
testMessage: e(a(), !0),
|
|
244
232
|
/** Enable display conditions */
|
|
245
|
-
displayConditions: e(
|
|
233
|
+
displayConditions: e(a(), !0),
|
|
246
234
|
/** Enable unsubscribe block */
|
|
247
|
-
unsubscribe: e(
|
|
235
|
+
unsubscribe: e(a(), !0),
|
|
248
236
|
/** Disable modules panel in the editor */
|
|
249
|
-
modulesDisabled: e(
|
|
237
|
+
modulesDisabled: e(a(), !1),
|
|
250
238
|
/** Enable Liquid template syntax */
|
|
251
|
-
liquidSyntax: e(
|
|
239
|
+
liquidSyntax: e(a(), !1),
|
|
252
240
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
253
|
-
autosave: e(
|
|
254
|
-
accessibilityTesting: e(
|
|
241
|
+
autosave: e(a(), !1),
|
|
242
|
+
accessibilityTesting: e(a(), !1),
|
|
255
243
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
256
|
-
allowlistEnabled: e(
|
|
244
|
+
allowlistEnabled: e(a(), !1),
|
|
257
245
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
258
|
-
linkTrackingIds: e(
|
|
246
|
+
linkTrackingIds: e(a(), !1),
|
|
259
247
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
260
|
-
allowSaveWithErrors: e(
|
|
261
|
-
reusableRecommendationStrategy: e(
|
|
248
|
+
allowSaveWithErrors: e(a(), !0),
|
|
249
|
+
reusableRecommendationStrategy: e(a(), !1),
|
|
262
250
|
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
263
|
-
legacyUnsubscribeConversion: e(
|
|
251
|
+
legacyUnsubscribeConversion: e(a(), !1),
|
|
264
252
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
265
|
-
itemsPriceFormatting: e(
|
|
253
|
+
itemsPriceFormatting: e(a(), !1),
|
|
266
254
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
267
|
-
blockUnsubscribeLinks: e(
|
|
268
|
-
}),
|
|
255
|
+
blockUnsubscribeLinks: e(a(), !1)
|
|
256
|
+
}), w = m([
|
|
269
257
|
"amp-accordion",
|
|
270
258
|
"amp-carousel",
|
|
271
259
|
"amp-form-controls",
|
|
@@ -279,7 +267,7 @@ const p = {
|
|
|
279
267
|
"text-block",
|
|
280
268
|
"timer-block",
|
|
281
269
|
"video-block"
|
|
282
|
-
]),
|
|
270
|
+
]), B = m([
|
|
283
271
|
"dynamic-content",
|
|
284
272
|
"checkbox-block",
|
|
285
273
|
"radio-button-block",
|
|
@@ -287,25 +275,25 @@ const p = {
|
|
|
287
275
|
"unsubscribe-block",
|
|
288
276
|
"coupon-block",
|
|
289
277
|
"items-block"
|
|
290
|
-
]),
|
|
278
|
+
]), j = o({
|
|
291
279
|
/** Default blocks to exclude from the editor */
|
|
292
280
|
excludeDefaults: e(
|
|
293
|
-
|
|
281
|
+
n(w),
|
|
294
282
|
[]
|
|
295
283
|
),
|
|
296
284
|
/** Custom blocks to include in the editor */
|
|
297
285
|
includeCustoms: e(
|
|
298
|
-
|
|
286
|
+
n(B),
|
|
299
287
|
[]
|
|
300
288
|
)
|
|
301
|
-
}), d =
|
|
289
|
+
}), d = o({
|
|
302
290
|
/** Unique identifier for the rule */
|
|
303
291
|
id: t(),
|
|
304
292
|
/** Human-readable description */
|
|
305
293
|
description: e(t()),
|
|
306
294
|
/** Priority for rule ordering (lower = earlier) */
|
|
307
295
|
priority: c()
|
|
308
|
-
}),
|
|
296
|
+
}), H = o({
|
|
309
297
|
...d.entries,
|
|
310
298
|
type: u("replace"),
|
|
311
299
|
/** String to search for */
|
|
@@ -313,8 +301,8 @@ const p = {
|
|
|
313
301
|
/** Replacement string */
|
|
314
302
|
replacement: t(),
|
|
315
303
|
/** Replace all occurrences (default: false) */
|
|
316
|
-
replaceAll: e(
|
|
317
|
-
}),
|
|
304
|
+
replaceAll: e(a())
|
|
305
|
+
}), _ = o({
|
|
318
306
|
...d.entries,
|
|
319
307
|
type: u("regex"),
|
|
320
308
|
/** Regex pattern string */
|
|
@@ -323,88 +311,87 @@ const p = {
|
|
|
323
311
|
replacement: t(),
|
|
324
312
|
/** Regex flags (e.g., 'gi') */
|
|
325
313
|
flags: e(t())
|
|
326
|
-
}),
|
|
314
|
+
}), q = o({
|
|
327
315
|
...d.entries,
|
|
328
316
|
type: u("remove"),
|
|
329
317
|
/** Strings or patterns to remove */
|
|
330
|
-
targets:
|
|
331
|
-
}),
|
|
318
|
+
targets: n(t())
|
|
319
|
+
}), G = o({
|
|
332
320
|
...d.entries,
|
|
333
321
|
type: u("custom"),
|
|
334
322
|
/** Custom processor function */
|
|
335
|
-
processor:
|
|
336
|
-
(
|
|
323
|
+
processor: k(
|
|
324
|
+
(s) => typeof s == "function",
|
|
337
325
|
"processor must be a function"
|
|
338
326
|
)
|
|
339
|
-
}),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
]),
|
|
327
|
+
}), V = T("type", [
|
|
328
|
+
H,
|
|
329
|
+
_,
|
|
330
|
+
q,
|
|
331
|
+
G
|
|
332
|
+
]), z = o({
|
|
345
333
|
/** Custom compiler rules to apply */
|
|
346
|
-
customRules: e(
|
|
334
|
+
customRules: e(n(V), []),
|
|
347
335
|
/** Skip default compiler rules */
|
|
348
|
-
ignoreDefaultRules: e(
|
|
349
|
-
}),
|
|
336
|
+
ignoreDefaultRules: e(a(), !1)
|
|
337
|
+
}), W = o({
|
|
350
338
|
/**
|
|
351
339
|
* External validation handler called before save completes.
|
|
352
340
|
* Return false to cancel the save operation.
|
|
353
341
|
*/
|
|
354
342
|
externalValidation: e(
|
|
355
|
-
|
|
356
|
-
(
|
|
343
|
+
k(
|
|
344
|
+
(s) => typeof s == "function",
|
|
357
345
|
"externalValidation must be a function"
|
|
358
346
|
)
|
|
359
347
|
)
|
|
360
|
-
}),
|
|
348
|
+
}), K = o({
|
|
361
349
|
// Required sections
|
|
362
350
|
/** Identity configuration (required) */
|
|
363
|
-
identity:
|
|
351
|
+
identity: A,
|
|
364
352
|
/** Partner configuration (required) */
|
|
365
|
-
partner:
|
|
353
|
+
partner: E,
|
|
366
354
|
// Optional sections (with defaults)
|
|
367
355
|
/** Template content and presets */
|
|
368
|
-
template: e(
|
|
356
|
+
template: e(D, {}),
|
|
369
357
|
/** Editor settings */
|
|
370
|
-
editor: e(
|
|
358
|
+
editor: e(O, {}),
|
|
371
359
|
/** UI configuration */
|
|
372
|
-
ui: e(
|
|
360
|
+
ui: e(F, {}),
|
|
373
361
|
/** Feature toggles */
|
|
374
|
-
features: e(
|
|
362
|
+
features: e(U, {}),
|
|
375
363
|
/** Block configuration */
|
|
376
|
-
blocks: e(
|
|
364
|
+
blocks: e(j, {}),
|
|
377
365
|
/** Compiler configuration */
|
|
378
|
-
compiler: e(
|
|
366
|
+
compiler: e(z, {}),
|
|
379
367
|
/** Callbacks and event handlers */
|
|
380
|
-
callbacks: e(
|
|
368
|
+
callbacks: e(W, {})
|
|
381
369
|
});
|
|
382
370
|
export {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
x as PartnerSchema,
|
|
371
|
+
j as BlocksSchema,
|
|
372
|
+
W as CallbacksSchema,
|
|
373
|
+
V as CompilerRuleSchema,
|
|
374
|
+
z as CompilerSchema,
|
|
375
|
+
B as CustomBlockTypeSchema,
|
|
376
|
+
G as CustomRuleSchema,
|
|
377
|
+
w as DefaultBlockTypeSchema,
|
|
378
|
+
P as DynamicContentListSchema,
|
|
379
|
+
f as DynamicContentNodeSchema,
|
|
380
|
+
M as DynamicContentSchema,
|
|
381
|
+
O as EditorSchema,
|
|
382
|
+
N as EmailHeaderSchema,
|
|
383
|
+
L as FallbackFontSchema,
|
|
384
|
+
U as FeaturesSchema,
|
|
385
|
+
K as GuidoConfigSchema,
|
|
386
|
+
A as IdentitySchema,
|
|
387
|
+
v as LegacyRecommendationConfigSchema,
|
|
388
|
+
b as MessageType,
|
|
389
|
+
E as PartnerSchema,
|
|
403
390
|
l as ProductType,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
391
|
+
_ as RegexRuleSchema,
|
|
392
|
+
q as RemoveRuleSchema,
|
|
393
|
+
H as ReplaceRuleSchema,
|
|
394
|
+
x as TemplateMigrationSchema,
|
|
395
|
+
D as TemplateSchema,
|
|
396
|
+
F as UISchema
|
|
410
397
|
};
|
|
@@ -1,49 +1,25 @@
|
|
|
1
|
-
import { object as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
groups: o(a(b), s(1))
|
|
19
|
-
}), A = t({
|
|
20
|
-
id: n(),
|
|
21
|
-
name: e(),
|
|
22
|
-
description: r(e(), ""),
|
|
23
|
-
syntax: h,
|
|
24
|
-
method: g,
|
|
25
|
-
codeBefore: e(),
|
|
26
|
-
codeAfter: r(e(), ""),
|
|
27
|
-
createdAt: c(e())
|
|
28
|
-
}), T = t({
|
|
29
|
-
data: a(A),
|
|
30
|
-
meta: t({
|
|
31
|
-
totalCount: n(),
|
|
32
|
-
perPage: n(),
|
|
33
|
-
currentPage: n(),
|
|
34
|
-
lastPage: n()
|
|
1
|
+
import { object as e, optional as a, string as o, nullish as i, number as t, picklist as n, array as c } from "../node_modules/valibot/dist/index.js";
|
|
2
|
+
const s = n(["liquid", "pongo"]), d = n(["codeOnly", "logicBuilder"]), r = e({
|
|
3
|
+
id: t(),
|
|
4
|
+
name: o(),
|
|
5
|
+
description: i(o(), ""),
|
|
6
|
+
syntax: s,
|
|
7
|
+
method: d,
|
|
8
|
+
codeBefore: o(),
|
|
9
|
+
codeAfter: i(o(), ""),
|
|
10
|
+
createdAt: a(o())
|
|
11
|
+
}), p = e({
|
|
12
|
+
data: c(r),
|
|
13
|
+
meta: e({
|
|
14
|
+
totalCount: t(),
|
|
15
|
+
perPage: t(),
|
|
16
|
+
currentPage: t(),
|
|
17
|
+
lastPage: t()
|
|
35
18
|
})
|
|
36
19
|
});
|
|
37
20
|
export {
|
|
38
|
-
p as
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
h as DisplayConditionSyntaxSchema,
|
|
43
|
-
d as LogicOperatorSchema,
|
|
44
|
-
b as RuleGroupSchema,
|
|
45
|
-
y as RuleOperatorSchema,
|
|
46
|
-
S as RuleSchema,
|
|
47
|
-
R as RuleTreeSchema,
|
|
48
|
-
A as SavedDisplayConditionSchema
|
|
21
|
+
p as DisplayConditionListResponseSchema,
|
|
22
|
+
d as DisplayConditionMethodSchema,
|
|
23
|
+
s as DisplayConditionSyntaxSchema,
|
|
24
|
+
r as SavedDisplayConditionSchema
|
|
49
25
|
};
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./DisplayConditionCreateDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var i = this, t = i._self._c, e = i._self._setupProxy;
|
|
6
|
+
return t(e.WpDrawer, { attrs: { id: "guido__display-condition-create-drawer", "description-status": "", "class-name": "guido-display-condition-create-drawer", size: "large", "close-on-outside-click": !1, "description-text": e.descriptionText, "footer-button-group-options": e.footerButtonGroupOptions, status: e.store.isCreateOpen, "title-text": e.trans(`${e.KEY}.create-title`) }, on: { cancelOrBackButtonEvent: e.close, onCloseEvent: e.close, primaryButtonEvent: function(o) {
|
|
7
7
|
return e.submit("inline");
|
|
8
|
-
}, secondaryButtonEvent: function(
|
|
8
|
+
}, secondaryButtonEvent: function(o) {
|
|
9
9
|
return e.submit("save");
|
|
10
|
-
} } }, [
|
|
11
|
-
return e.updateField("name",
|
|
12
|
-
} } }
|
|
13
|
-
return e.updateField("description",
|
|
14
|
-
} } }
|
|
15
|
-
return e.
|
|
16
|
-
} } }),
|
|
17
|
-
return e.
|
|
18
|
-
} } })], 1)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return e.updateField("codeBefore", t);
|
|
22
|
-
} } }, "CodeEditorField", e.invalidFieldAttrs(e.errors.codeBefore), !1)), e.isLogicBuilder ? o._e() : i(e.CodeEditorField, o._b({ ref: "codeAfterRef", attrs: { id: "guido__display-condition-code-after", disabled: e.isSaving, error: e.errors.codeAfter, label: e.trans(`${e.KEY}.code-after`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeAfter }, on: { input: function(t) {
|
|
23
|
-
return e.updateField("codeAfter", t);
|
|
24
|
-
} } }, "CodeEditorField", e.invalidFieldAttrs(e.errors.codeAfter), !1))], 1)]);
|
|
25
|
-
}, n = [], d = /* @__PURE__ */ a(
|
|
26
|
-
r,
|
|
27
|
-
s,
|
|
10
|
+
} } }, [t("div", { staticClass: "guido-display-condition-create" }, [t(e.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-name-input", name: "displayConditionName", "character-counter-status": !1, "disabled-status": e.isSaving, "label-text": e.trans(`${e.KEY}.condition-name`), "max-character-length": e.DISPLAY_CONDITION_LIMITS.NAME_MAX, "placeholder-text": e.trans(`${e.KEY}.condition-name-placeholder`), "state-message": e.errors.name || "", states: e.errors.name ? "error" : "default", "tooltip-status": !1, value: e.draft.name }, on: { input: function(o) {
|
|
11
|
+
return e.updateField("name", o);
|
|
12
|
+
} } }), t(e.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-description-input", name: "displayConditionDescription", "character-counter-status": !1, "disabled-status": e.isSaving, "label-text": e.descriptionLabel, "max-character-length": e.DISPLAY_CONDITION_LIMITS.DESCRIPTION_MAX, "placeholder-text": e.trans(`${e.KEY}.condition-description-placeholder`), "state-message": e.errors.description || "", states: e.errors.description ? "error" : "default", "tooltip-status": !1, value: e.draft.description }, on: { input: function(o) {
|
|
13
|
+
return e.updateField("description", o);
|
|
14
|
+
} } }), t("div", { staticClass: "guido-display-condition-create__separator t-c-3" }), t("p", { staticClass: "guido-display-condition-create__method-title mt-0 mb-4 f-s-1 f-w-600 l-h-6 l-s-5 t-t-u t-c-55" }, [i._v(" " + i._s(e.trans(`${e.KEY}.select-method`)) + " ")]), t("div", { staticClass: "guido-display-condition-create__methods d-f mb-4" }, [t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-logic-builder", disable: "", disabled: "", name: "displayConditionMethod", selected: "codeOnly", value: "logicBuilder", label: e.trans(`${e.KEY}.logic-builder`) } }), t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-code-only", name: "displayConditionMethod", selected: "codeOnly", value: "codeOnly", label: e.trans(`${e.KEY}.code-only`) } })], 1), t(e.CodeEditorField, { ref: "codeBeforeRef", staticClass: "mb-3", attrs: { id: "guido__display-condition-code-before", disabled: e.isSaving, error: e.errors.codeBefore, label: e.trans(`${e.KEY}.code-before`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeBefore }, on: { input: function(o) {
|
|
15
|
+
return e.updateField("codeBefore", o);
|
|
16
|
+
} } }), t(e.CodeEditorField, { ref: "codeAfterRef", attrs: { id: "guido__display-condition-code-after", disabled: e.isSaving, error: e.errors.codeAfter, label: e.trans(`${e.KEY}.code-after`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeAfter }, on: { input: function(o) {
|
|
17
|
+
return e.updateField("codeAfter", o);
|
|
18
|
+
} } })], 1)]);
|
|
19
|
+
}, s = [], d = /* @__PURE__ */ r(
|
|
20
|
+
a,
|
|
28
21
|
n,
|
|
22
|
+
s,
|
|
29
23
|
!1,
|
|
30
24
|
null,
|
|
31
|
-
"
|
|
25
|
+
"929822bc"
|
|
32
26
|
);
|
|
33
27
|
const f = d.exports;
|
|
34
28
|
export {
|