@useinsider/guido 3.28.1-beta.d3309a6 → 3.28.1-beta.ff58f9a
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 +2 -2
- 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
|
@@ -31,21 +31,21 @@ function w(n) {
|
|
|
31
31
|
return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && ((s = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : s.name)) ?? "null" : r;
|
|
32
32
|
}
|
|
33
33
|
function f(n, r, e, s, t) {
|
|
34
|
-
const l = t && "input" in t ? t.input : e.value, u = (t == null ? void 0 : t.expected) ?? n.expects ?? null,
|
|
34
|
+
const l = t && "input" in t ? t.input : e.value, u = (t == null ? void 0 : t.expected) ?? n.expects ?? null, a = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ w(l), i = {
|
|
35
35
|
kind: n.kind,
|
|
36
36
|
type: n.type,
|
|
37
37
|
input: l,
|
|
38
38
|
expected: u,
|
|
39
|
-
received:
|
|
40
|
-
message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${
|
|
39
|
+
received: a,
|
|
40
|
+
message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
|
|
41
41
|
requirement: n.requirement,
|
|
42
42
|
path: t == null ? void 0 : t.path,
|
|
43
43
|
issues: t == null ? void 0 : t.issues,
|
|
44
44
|
lang: s.lang,
|
|
45
45
|
abortEarly: s.abortEarly,
|
|
46
46
|
abortPipeEarly: s.abortPipeEarly
|
|
47
|
-
},
|
|
48
|
-
c !== void 0 && (i.message = typeof c == "function" ? c(i) : c),
|
|
47
|
+
}, p = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ q(n.reference, i.lang) ?? (p ? /* @__PURE__ */ V(i.lang) : null) ?? s.message ?? /* @__PURE__ */ A(i.lang);
|
|
48
|
+
c !== void 0 && (i.message = typeof c == "function" ? c(i) : c), p && (e.typed = !1), e.issues ? e.issues.push(i) : e.issues = [i];
|
|
49
49
|
}
|
|
50
50
|
// @__NO_SIDE_EFFECTS__
|
|
51
51
|
function o(n) {
|
|
@@ -136,26 +136,11 @@ function L(n) {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
// @__NO_SIDE_EFFECTS__
|
|
139
|
-
function N(n
|
|
140
|
-
return {
|
|
141
|
-
kind: "validation",
|
|
142
|
-
type: "regex",
|
|
143
|
-
reference: N,
|
|
144
|
-
async: !1,
|
|
145
|
-
expects: `${n}`,
|
|
146
|
-
requirement: n,
|
|
147
|
-
message: r,
|
|
148
|
-
"~run"(e, s) {
|
|
149
|
-
return e.typed && !this.requirement.test(e.value) && f(this, "format", e, s), e;
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
// @__NO_SIDE_EFFECTS__
|
|
154
|
-
function C(n) {
|
|
139
|
+
function N(n) {
|
|
155
140
|
return {
|
|
156
141
|
kind: "transformation",
|
|
157
142
|
type: "transform",
|
|
158
|
-
reference:
|
|
143
|
+
reference: N,
|
|
159
144
|
async: !1,
|
|
160
145
|
operation: n,
|
|
161
146
|
"~run"(r) {
|
|
@@ -164,11 +149,11 @@ function C(n) {
|
|
|
164
149
|
};
|
|
165
150
|
}
|
|
166
151
|
// @__NO_SIDE_EFFECTS__
|
|
167
|
-
function
|
|
152
|
+
function C() {
|
|
168
153
|
return {
|
|
169
154
|
kind: "transformation",
|
|
170
155
|
type: "trim",
|
|
171
|
-
reference:
|
|
156
|
+
reference: C,
|
|
172
157
|
async: !1,
|
|
173
158
|
"~run"(n) {
|
|
174
159
|
return n.value = n.value.trim(), n;
|
|
@@ -180,7 +165,7 @@ function P(n, r, e) {
|
|
|
180
165
|
return typeof n.fallback == "function" ? n.fallback(r, e) : n.fallback;
|
|
181
166
|
}
|
|
182
167
|
// @__NO_SIDE_EFFECTS__
|
|
183
|
-
function
|
|
168
|
+
function se(n, r) {
|
|
184
169
|
return {
|
|
185
170
|
...n,
|
|
186
171
|
fallback: r,
|
|
@@ -201,11 +186,11 @@ function x(n, r, e) {
|
|
|
201
186
|
return typeof n.default == "function" ? n.default(r, e) : n.default;
|
|
202
187
|
}
|
|
203
188
|
// @__NO_SIDE_EFFECTS__
|
|
204
|
-
function
|
|
189
|
+
function F(n, r) {
|
|
205
190
|
return {
|
|
206
191
|
kind: "schema",
|
|
207
192
|
type: "array",
|
|
208
|
-
reference:
|
|
193
|
+
reference: F,
|
|
209
194
|
expects: "Array",
|
|
210
195
|
async: !1,
|
|
211
196
|
item: n,
|
|
@@ -219,17 +204,17 @@ function R(n, r) {
|
|
|
219
204
|
if (Array.isArray(t)) {
|
|
220
205
|
e.typed = !0, e.value = [];
|
|
221
206
|
for (let u = 0; u < t.length; u++) {
|
|
222
|
-
const
|
|
207
|
+
const a = t[u], i = this.item["~run"]({ value: a }, s);
|
|
223
208
|
if (i.issues) {
|
|
224
|
-
const
|
|
209
|
+
const p = {
|
|
225
210
|
type: "array",
|
|
226
211
|
origin: "value",
|
|
227
212
|
input: t,
|
|
228
213
|
key: u,
|
|
229
|
-
value:
|
|
214
|
+
value: a
|
|
230
215
|
};
|
|
231
216
|
for (const c of i.issues)
|
|
232
|
-
c.path ? c.path.unshift(
|
|
217
|
+
c.path ? c.path.unshift(p) : c.path = [p], (l = e.issues) == null || l.push(c);
|
|
233
218
|
if (e.issues || (e.issues = i.issues), s.abortEarly) {
|
|
234
219
|
e.typed = !1;
|
|
235
220
|
break;
|
|
@@ -243,11 +228,11 @@ function R(n, r) {
|
|
|
243
228
|
};
|
|
244
229
|
}
|
|
245
230
|
// @__NO_SIDE_EFFECTS__
|
|
246
|
-
function
|
|
231
|
+
function R(n) {
|
|
247
232
|
return {
|
|
248
233
|
kind: "schema",
|
|
249
234
|
type: "boolean",
|
|
250
|
-
reference:
|
|
235
|
+
reference: R,
|
|
251
236
|
expects: "boolean",
|
|
252
237
|
async: !1,
|
|
253
238
|
message: n,
|
|
@@ -260,11 +245,11 @@ function B(n) {
|
|
|
260
245
|
};
|
|
261
246
|
}
|
|
262
247
|
// @__NO_SIDE_EFFECTS__
|
|
263
|
-
function
|
|
248
|
+
function B(n, r) {
|
|
264
249
|
return {
|
|
265
250
|
kind: "schema",
|
|
266
251
|
type: "custom",
|
|
267
|
-
reference:
|
|
252
|
+
reference: B,
|
|
268
253
|
expects: "unknown",
|
|
269
254
|
async: !1,
|
|
270
255
|
check: n,
|
|
@@ -278,11 +263,11 @@ function H(n, r) {
|
|
|
278
263
|
};
|
|
279
264
|
}
|
|
280
265
|
// @__NO_SIDE_EFFECTS__
|
|
281
|
-
function
|
|
266
|
+
function H(n) {
|
|
282
267
|
return {
|
|
283
268
|
kind: "schema",
|
|
284
269
|
type: "lazy",
|
|
285
|
-
reference:
|
|
270
|
+
reference: H,
|
|
286
271
|
expects: "unknown",
|
|
287
272
|
async: !1,
|
|
288
273
|
getter: n,
|
|
@@ -295,11 +280,11 @@ function J(n) {
|
|
|
295
280
|
};
|
|
296
281
|
}
|
|
297
282
|
// @__NO_SIDE_EFFECTS__
|
|
298
|
-
function
|
|
283
|
+
function J(n, r) {
|
|
299
284
|
return {
|
|
300
285
|
kind: "schema",
|
|
301
286
|
type: "literal",
|
|
302
|
-
reference:
|
|
287
|
+
reference: J,
|
|
303
288
|
expects: /* @__PURE__ */ w(n),
|
|
304
289
|
async: !1,
|
|
305
290
|
literal: n,
|
|
@@ -313,11 +298,11 @@ function Q(n, r) {
|
|
|
313
298
|
};
|
|
314
299
|
}
|
|
315
300
|
// @__NO_SIDE_EFFECTS__
|
|
316
|
-
function
|
|
301
|
+
function Q(n, r) {
|
|
317
302
|
return {
|
|
318
303
|
kind: "schema",
|
|
319
304
|
type: "loose_object",
|
|
320
|
-
reference:
|
|
305
|
+
reference: Q,
|
|
321
306
|
expects: "Object",
|
|
322
307
|
async: !1,
|
|
323
308
|
entries: n,
|
|
@@ -331,10 +316,10 @@ function T(n, r) {
|
|
|
331
316
|
if (t && typeof t == "object") {
|
|
332
317
|
e.typed = !0, e.value = {};
|
|
333
318
|
for (const u in this.entries) {
|
|
334
|
-
const
|
|
335
|
-
if (u in t || (
|
|
336
|
-
const i = u in t ? t[u] : /* @__PURE__ */ x(
|
|
337
|
-
if (
|
|
319
|
+
const a = this.entries[u];
|
|
320
|
+
if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
321
|
+
const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
|
|
322
|
+
if (p.issues) {
|
|
338
323
|
const c = {
|
|
339
324
|
type: "object",
|
|
340
325
|
origin: "value",
|
|
@@ -342,16 +327,16 @@ function T(n, r) {
|
|
|
342
327
|
key: u,
|
|
343
328
|
value: i
|
|
344
329
|
};
|
|
345
|
-
for (const y of
|
|
330
|
+
for (const y of p.issues)
|
|
346
331
|
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
347
|
-
if (e.issues || (e.issues =
|
|
332
|
+
if (e.issues || (e.issues = p.issues), s.abortEarly) {
|
|
348
333
|
e.typed = !1;
|
|
349
334
|
break;
|
|
350
335
|
}
|
|
351
336
|
}
|
|
352
|
-
|
|
353
|
-
} else if (
|
|
354
|
-
else if (
|
|
337
|
+
p.typed || (e.typed = !1), e.value[u] = p.value;
|
|
338
|
+
} else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
|
|
339
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
|
|
355
340
|
input: void 0,
|
|
356
341
|
expected: `"${u}"`,
|
|
357
342
|
path: [{
|
|
@@ -372,11 +357,11 @@ function T(n, r) {
|
|
|
372
357
|
};
|
|
373
358
|
}
|
|
374
359
|
// @__NO_SIDE_EFFECTS__
|
|
375
|
-
function
|
|
360
|
+
function T(n, r) {
|
|
376
361
|
return {
|
|
377
362
|
kind: "schema",
|
|
378
363
|
type: "nullish",
|
|
379
|
-
reference:
|
|
364
|
+
reference: T,
|
|
380
365
|
expects: `(${n.expects} | null | undefined)`,
|
|
381
366
|
async: !1,
|
|
382
367
|
wrapped: n,
|
|
@@ -390,11 +375,11 @@ function U(n, r) {
|
|
|
390
375
|
};
|
|
391
376
|
}
|
|
392
377
|
// @__NO_SIDE_EFFECTS__
|
|
393
|
-
function
|
|
378
|
+
function U(n) {
|
|
394
379
|
return {
|
|
395
380
|
kind: "schema",
|
|
396
381
|
type: "number",
|
|
397
|
-
reference:
|
|
382
|
+
reference: U,
|
|
398
383
|
expects: "number",
|
|
399
384
|
async: !1,
|
|
400
385
|
message: n,
|
|
@@ -407,11 +392,11 @@ function W(n) {
|
|
|
407
392
|
};
|
|
408
393
|
}
|
|
409
394
|
// @__NO_SIDE_EFFECTS__
|
|
410
|
-
function
|
|
395
|
+
function W(n, r) {
|
|
411
396
|
return {
|
|
412
397
|
kind: "schema",
|
|
413
398
|
type: "object",
|
|
414
|
-
reference:
|
|
399
|
+
reference: W,
|
|
415
400
|
expects: "Object",
|
|
416
401
|
async: !1,
|
|
417
402
|
entries: n,
|
|
@@ -425,10 +410,10 @@ function X(n, r) {
|
|
|
425
410
|
if (t && typeof t == "object") {
|
|
426
411
|
e.typed = !0, e.value = {};
|
|
427
412
|
for (const u in this.entries) {
|
|
428
|
-
const
|
|
429
|
-
if (u in t || (
|
|
430
|
-
const i = u in t ? t[u] : /* @__PURE__ */ x(
|
|
431
|
-
if (
|
|
413
|
+
const a = this.entries[u];
|
|
414
|
+
if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
415
|
+
const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
|
|
416
|
+
if (p.issues) {
|
|
432
417
|
const c = {
|
|
433
418
|
type: "object",
|
|
434
419
|
origin: "value",
|
|
@@ -436,16 +421,16 @@ function X(n, r) {
|
|
|
436
421
|
key: u,
|
|
437
422
|
value: i
|
|
438
423
|
};
|
|
439
|
-
for (const y of
|
|
424
|
+
for (const y of p.issues)
|
|
440
425
|
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
441
|
-
if (e.issues || (e.issues =
|
|
426
|
+
if (e.issues || (e.issues = p.issues), s.abortEarly) {
|
|
442
427
|
e.typed = !1;
|
|
443
428
|
break;
|
|
444
429
|
}
|
|
445
430
|
}
|
|
446
|
-
|
|
447
|
-
} else if (
|
|
448
|
-
else if (
|
|
431
|
+
p.typed || (e.typed = !1), e.value[u] = p.value;
|
|
432
|
+
} else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
|
|
433
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
|
|
449
434
|
input: void 0,
|
|
450
435
|
expected: `"${u}"`,
|
|
451
436
|
path: [{
|
|
@@ -464,11 +449,11 @@ function X(n, r) {
|
|
|
464
449
|
};
|
|
465
450
|
}
|
|
466
451
|
// @__NO_SIDE_EFFECTS__
|
|
467
|
-
function
|
|
452
|
+
function X(n, r) {
|
|
468
453
|
return {
|
|
469
454
|
kind: "schema",
|
|
470
455
|
type: "optional",
|
|
471
|
-
reference:
|
|
456
|
+
reference: X,
|
|
472
457
|
expects: `(${n.expects} | undefined)`,
|
|
473
458
|
async: !1,
|
|
474
459
|
wrapped: n,
|
|
@@ -482,11 +467,11 @@ function Y(n, r) {
|
|
|
482
467
|
};
|
|
483
468
|
}
|
|
484
469
|
// @__NO_SIDE_EFFECTS__
|
|
485
|
-
function
|
|
470
|
+
function Y(n, r) {
|
|
486
471
|
return {
|
|
487
472
|
kind: "schema",
|
|
488
473
|
type: "picklist",
|
|
489
|
-
reference:
|
|
474
|
+
reference: Y,
|
|
490
475
|
expects: /* @__PURE__ */ D(n.map(w), "|"),
|
|
491
476
|
async: !1,
|
|
492
477
|
options: n,
|
|
@@ -500,11 +485,11 @@ function Z(n, r) {
|
|
|
500
485
|
};
|
|
501
486
|
}
|
|
502
487
|
// @__NO_SIDE_EFFECTS__
|
|
503
|
-
function
|
|
488
|
+
function Z(n, r, e) {
|
|
504
489
|
return {
|
|
505
490
|
kind: "schema",
|
|
506
491
|
type: "record",
|
|
507
|
-
reference:
|
|
492
|
+
reference: Z,
|
|
508
493
|
expects: "Object",
|
|
509
494
|
async: !1,
|
|
510
495
|
key: n,
|
|
@@ -514,19 +499,19 @@ function $(n, r, e) {
|
|
|
514
499
|
return /* @__PURE__ */ o(this);
|
|
515
500
|
},
|
|
516
501
|
"~run"(s, t) {
|
|
517
|
-
var u,
|
|
502
|
+
var u, a;
|
|
518
503
|
const l = s.value;
|
|
519
504
|
if (l && typeof l == "object") {
|
|
520
505
|
s.typed = !0, s.value = {};
|
|
521
506
|
for (const i in l) if (/* @__PURE__ */ I(l, i)) {
|
|
522
|
-
const
|
|
507
|
+
const p = l[i], c = this.key["~run"]({ value: i }, t);
|
|
523
508
|
if (c.issues) {
|
|
524
509
|
const b = {
|
|
525
510
|
type: "object",
|
|
526
511
|
origin: "key",
|
|
527
512
|
input: l,
|
|
528
513
|
key: i,
|
|
529
|
-
value:
|
|
514
|
+
value: p
|
|
530
515
|
};
|
|
531
516
|
for (const h of c.issues)
|
|
532
517
|
h.path = [b], (u = s.issues) == null || u.push(h);
|
|
@@ -535,17 +520,17 @@ function $(n, r, e) {
|
|
|
535
520
|
break;
|
|
536
521
|
}
|
|
537
522
|
}
|
|
538
|
-
const y = this.value["~run"]({ value:
|
|
523
|
+
const y = this.value["~run"]({ value: p }, t);
|
|
539
524
|
if (y.issues) {
|
|
540
525
|
const b = {
|
|
541
526
|
type: "object",
|
|
542
527
|
origin: "value",
|
|
543
528
|
input: l,
|
|
544
529
|
key: i,
|
|
545
|
-
value:
|
|
530
|
+
value: p
|
|
546
531
|
};
|
|
547
532
|
for (const h of y.issues)
|
|
548
|
-
h.path ? h.path.unshift(b) : h.path = [b], (
|
|
533
|
+
h.path ? h.path.unshift(b) : h.path = [b], (a = s.issues) == null || a.push(h);
|
|
549
534
|
if (s.issues || (s.issues = y.issues), t.abortEarly) {
|
|
550
535
|
s.typed = !1;
|
|
551
536
|
break;
|
|
@@ -559,11 +544,11 @@ function $(n, r, e) {
|
|
|
559
544
|
};
|
|
560
545
|
}
|
|
561
546
|
// @__NO_SIDE_EFFECTS__
|
|
562
|
-
function
|
|
547
|
+
function $(n) {
|
|
563
548
|
return {
|
|
564
549
|
kind: "schema",
|
|
565
550
|
type: "string",
|
|
566
|
-
reference:
|
|
551
|
+
reference: $,
|
|
567
552
|
expects: "string",
|
|
568
553
|
async: !1,
|
|
569
554
|
message: n,
|
|
@@ -582,11 +567,11 @@ function S(n) {
|
|
|
582
567
|
return r;
|
|
583
568
|
}
|
|
584
569
|
// @__NO_SIDE_EFFECTS__
|
|
585
|
-
function
|
|
570
|
+
function ee(n, r) {
|
|
586
571
|
return {
|
|
587
572
|
kind: "schema",
|
|
588
573
|
type: "union",
|
|
589
|
-
reference:
|
|
574
|
+
reference: ee,
|
|
590
575
|
expects: /* @__PURE__ */ D(n.map((e) => e.expects), "|"),
|
|
591
576
|
async: !1,
|
|
592
577
|
options: n,
|
|
@@ -596,8 +581,8 @@ function ne(n, r) {
|
|
|
596
581
|
},
|
|
597
582
|
"~run"(e, s) {
|
|
598
583
|
let t, l, u;
|
|
599
|
-
for (const
|
|
600
|
-
const i =
|
|
584
|
+
for (const a of this.options) {
|
|
585
|
+
const i = a["~run"]({ value: e.value }, s);
|
|
601
586
|
if (i.typed) if (i.issues) l ? l.push(i) : l = [i];
|
|
602
587
|
else {
|
|
603
588
|
t = i;
|
|
@@ -618,11 +603,11 @@ function ne(n, r) {
|
|
|
618
603
|
};
|
|
619
604
|
}
|
|
620
605
|
// @__NO_SIDE_EFFECTS__
|
|
621
|
-
function
|
|
606
|
+
function ne() {
|
|
622
607
|
return {
|
|
623
608
|
kind: "schema",
|
|
624
609
|
type: "unknown",
|
|
625
|
-
reference:
|
|
610
|
+
reference: ne,
|
|
626
611
|
expects: "unknown",
|
|
627
612
|
async: !1,
|
|
628
613
|
get "~standard"() {
|
|
@@ -634,11 +619,11 @@ function re() {
|
|
|
634
619
|
};
|
|
635
620
|
}
|
|
636
621
|
// @__NO_SIDE_EFFECTS__
|
|
637
|
-
function
|
|
622
|
+
function re(n, r, e) {
|
|
638
623
|
return {
|
|
639
624
|
kind: "schema",
|
|
640
625
|
type: "variant",
|
|
641
|
-
reference:
|
|
626
|
+
reference: re,
|
|
642
627
|
expects: "Object",
|
|
643
628
|
async: !1,
|
|
644
629
|
key: n,
|
|
@@ -650,7 +635,7 @@ function se(n, r, e) {
|
|
|
650
635
|
"~run"(s, t) {
|
|
651
636
|
const l = s.value;
|
|
652
637
|
if (l && typeof l == "object") {
|
|
653
|
-
let u,
|
|
638
|
+
let u, a = 0, i = this.key, p = [];
|
|
654
639
|
const c = (y, b) => {
|
|
655
640
|
for (const h of y.options) {
|
|
656
641
|
if (h.type === "variant") c(h, new Set(b).add(h.key));
|
|
@@ -662,7 +647,7 @@ function se(n, r, e) {
|
|
|
662
647
|
typed: !1,
|
|
663
648
|
value: l[v]
|
|
664
649
|
}, { abortEarly: !0 }).issues : d.type !== "exact_optional" && d.type !== "optional" && d.type !== "nullish") {
|
|
665
|
-
O = !1, i !== v && (
|
|
650
|
+
O = !1, i !== v && (a < k || a === k && v in l && !(i in l)) && (a = k, i = v, p = []), i === v && p.push(h.entries[v].expects);
|
|
666
651
|
break;
|
|
667
652
|
}
|
|
668
653
|
k++;
|
|
@@ -678,7 +663,7 @@ function se(n, r, e) {
|
|
|
678
663
|
if (c(this, /* @__PURE__ */ new Set([this.key])), u) return u;
|
|
679
664
|
f(this, "type", s, t, {
|
|
680
665
|
input: l[i],
|
|
681
|
-
expected: /* @__PURE__ */ D(
|
|
666
|
+
expected: /* @__PURE__ */ D(p, "|"),
|
|
682
667
|
path: [{
|
|
683
668
|
type: "object",
|
|
684
669
|
origin: "value",
|
|
@@ -692,13 +677,13 @@ function se(n, r, e) {
|
|
|
692
677
|
}
|
|
693
678
|
};
|
|
694
679
|
}
|
|
695
|
-
function
|
|
680
|
+
function te(n, r, e) {
|
|
696
681
|
const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
|
|
697
682
|
if (s.issues) throw new K(s.issues);
|
|
698
683
|
return s.value;
|
|
699
684
|
}
|
|
700
685
|
// @__NO_SIDE_EFFECTS__
|
|
701
|
-
function
|
|
686
|
+
function ue(...n) {
|
|
702
687
|
return {
|
|
703
688
|
...n[0],
|
|
704
689
|
pipe: n,
|
|
@@ -718,7 +703,7 @@ function ie(...n) {
|
|
|
718
703
|
};
|
|
719
704
|
}
|
|
720
705
|
// @__NO_SIDE_EFFECTS__
|
|
721
|
-
function
|
|
706
|
+
function ie(...n) {
|
|
722
707
|
return {
|
|
723
708
|
...n[0],
|
|
724
709
|
pipe: n,
|
|
@@ -739,7 +724,7 @@ function le(...n) {
|
|
|
739
724
|
};
|
|
740
725
|
}
|
|
741
726
|
// @__NO_SIDE_EFFECTS__
|
|
742
|
-
function
|
|
727
|
+
function le(n, r, e) {
|
|
743
728
|
const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
|
|
744
729
|
return {
|
|
745
730
|
typed: s.typed,
|
|
@@ -765,39 +750,38 @@ export {
|
|
|
765
750
|
I as _isValidObjectKey,
|
|
766
751
|
D as _joinExpects,
|
|
767
752
|
w as _stringify,
|
|
768
|
-
|
|
769
|
-
|
|
753
|
+
F as array,
|
|
754
|
+
R as boolean,
|
|
770
755
|
M as checkAsync,
|
|
771
|
-
|
|
772
|
-
|
|
756
|
+
B as custom,
|
|
757
|
+
se as fallback,
|
|
773
758
|
x as getDefault,
|
|
774
759
|
P as getFallback,
|
|
775
760
|
g as getGlobalConfig,
|
|
776
761
|
A as getGlobalMessage,
|
|
777
762
|
V as getSchemaMessage,
|
|
778
763
|
q as getSpecificMessage,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
764
|
+
H as lazy,
|
|
765
|
+
J as literal,
|
|
766
|
+
Q as looseObject,
|
|
782
767
|
z as maxLength,
|
|
783
768
|
G as minLength,
|
|
784
769
|
L as nonEmpty,
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
pe as safeParse,
|
|
770
|
+
T as nullish,
|
|
771
|
+
U as number,
|
|
772
|
+
W as object,
|
|
773
|
+
X as optional,
|
|
774
|
+
te as parse,
|
|
775
|
+
Y as picklist,
|
|
776
|
+
ue as pipe,
|
|
777
|
+
ie as pipeAsync,
|
|
778
|
+
Z as record,
|
|
779
|
+
le as safeParse,
|
|
796
780
|
ae as safeParseAsync,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
781
|
+
$ as string,
|
|
782
|
+
N as transform,
|
|
783
|
+
C as trim,
|
|
784
|
+
ee as union,
|
|
785
|
+
ne as unknown,
|
|
786
|
+
re as variant
|
|
803
787
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { useHttp as p } from "../composables/useHttp.js";
|
|
2
|
-
import { SavedDisplayConditionSchema as
|
|
2
|
+
import { SavedDisplayConditionSchema as y, DisplayConditionListResponseSchema as S } from "../@types/display-condition.js";
|
|
3
3
|
import { parse as r } from "../node_modules/valibot/dist/index.js";
|
|
4
|
-
const
|
|
5
|
-
const { get: c, post: m, delete: l } = p(),
|
|
4
|
+
const s = "/email-proxy/v1/display-conditions", u = 100, P = () => {
|
|
5
|
+
const { get: c, post: m, delete: l } = p(), i = async (t, e) => {
|
|
6
6
|
const o = new URLSearchParams({
|
|
7
7
|
page: String(e),
|
|
8
|
-
limit: String(
|
|
8
|
+
limit: String(u),
|
|
9
9
|
sortColumn: "id",
|
|
10
10
|
sortDirection: "desc",
|
|
11
11
|
"filter[syntax]": t
|
|
12
|
-
}), { data:
|
|
13
|
-
return r(
|
|
12
|
+
}), { data: n } = await c(`${s}?${o.toString()}`);
|
|
13
|
+
return r(S, n);
|
|
14
14
|
};
|
|
15
15
|
return { list: async (t) => {
|
|
16
|
-
const e = await
|
|
16
|
+
const e = await i(t, 1), o = await Promise.all(Array.from(
|
|
17
17
|
{ length: Math.max(e.meta.lastPage - 1, 0) },
|
|
18
|
-
(
|
|
19
|
-
)),
|
|
20
|
-
return [...new Map(
|
|
18
|
+
(a, d) => i(t, d + 2)
|
|
19
|
+
)), n = [e, ...o].flatMap((a) => a.data);
|
|
20
|
+
return [...new Map(n.map((a) => [a.id, a])).values()];
|
|
21
21
|
}, create: async (t, e) => {
|
|
22
|
-
const
|
|
22
|
+
const { data: o } = await m(s, {
|
|
23
23
|
name: t.name.trim(),
|
|
24
24
|
description: t.description.trim() || null,
|
|
25
25
|
syntax: e,
|
|
26
|
-
method:
|
|
27
|
-
|
|
26
|
+
method: "codeOnly",
|
|
27
|
+
codeBefore: t.codeBefore,
|
|
28
|
+
codeAfter: t.codeAfter
|
|
28
29
|
});
|
|
29
|
-
return r(
|
|
30
|
+
return r(y, o.data);
|
|
30
31
|
}, remove: async (t) => {
|
|
31
|
-
await l(`${
|
|
32
|
+
await l(`${s}/${t}`);
|
|
32
33
|
} };
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
u as DISPLAY_CONDITIONS_PAGE_LIMIT,
|
|
37
|
+
s as DISPLAY_CONDITIONS_URL,
|
|
38
|
+
P as useDisplayConditionApi
|
|
38
39
|
};
|