@useinsider/guido 3.28.1-beta.70df1f2 → 3.28.1-beta.7539890

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