@ram_28/kf-ai-sdk 1.0.3 → 1.0.5
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 +85 -114
- package/dist/auth/authConfig.d.ts +1 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +317 -331
- package/package.json +1 -1
- package/sdk/auth/authConfig.ts +4 -4
- package/sdk/auth/index.ts +2 -21
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import rt, { useState as we, useCallback as E, useMemo as ce, useEffect as Re, useRef as ge, createContext as tt, useContext as
|
|
6
|
-
import { useQuery as ar, useQueryClient as nt, useQueries as
|
|
7
|
-
import { useForm as
|
|
1
|
+
var Ut = Object.defineProperty;
|
|
2
|
+
var Bt = (e, r, t) => r in e ? Ut(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
|
+
var Ge = (e, r, t) => Bt(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
|
+
import * as Le from "react";
|
|
5
|
+
import rt, { useState as we, useCallback as E, useMemo as ce, useEffect as Re, useRef as ge, createContext as tt, useContext as zt } from "react";
|
|
6
|
+
import { useQuery as ar, useQueryClient as nt, useQueries as Kt, keepPreviousData as Mt, useMutation as ir } from "@tanstack/react-query";
|
|
7
|
+
import { useForm as Gt } from "react-hook-form";
|
|
8
8
|
let We = {
|
|
9
9
|
baseUrl: "",
|
|
10
10
|
headers: {
|
|
@@ -231,7 +231,7 @@ function so(e) {
|
|
|
231
231
|
function io(e) {
|
|
232
232
|
return new Date(e.$__d__);
|
|
233
233
|
}
|
|
234
|
-
async function
|
|
234
|
+
async function Ht(e) {
|
|
235
235
|
try {
|
|
236
236
|
const r = Ar(), t = yr(), n = await fetch(`${r}/api/app/meta/bdo/${e}`, {
|
|
237
237
|
method: "GET",
|
|
@@ -269,7 +269,7 @@ async function lo(e) {
|
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Yt(e) {
|
|
273
273
|
return typeof e == "string" ? e : typeof e == "object" && e !== null ? new Intl.NumberFormat("en-US", {
|
|
274
274
|
style: "currency",
|
|
275
275
|
currency: e.currency
|
|
@@ -284,7 +284,7 @@ function co(e) {
|
|
|
284
284
|
}
|
|
285
285
|
return null;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Qt(e, r = "medium") {
|
|
288
288
|
if (!(e instanceof Date) || isNaN(e.getTime()))
|
|
289
289
|
return "Invalid Date";
|
|
290
290
|
const t = {
|
|
@@ -294,7 +294,7 @@ function Wt(e, r = "medium") {
|
|
|
294
294
|
}[r];
|
|
295
295
|
return new Intl.DateTimeFormat("en-US", t).format(e);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Wt(e, r = "medium") {
|
|
298
298
|
if (!(e instanceof Date) || isNaN(e.getTime()))
|
|
299
299
|
return "Invalid Date";
|
|
300
300
|
const t = {
|
|
@@ -304,26 +304,26 @@ function Jt(e, r = "medium") {
|
|
|
304
304
|
}[r];
|
|
305
305
|
return new Intl.DateTimeFormat("en-US", t).format(e);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Jt(e, r = 2) {
|
|
308
308
|
return typeof e != "number" || isNaN(e) ? "Invalid Number" : e.toFixed(r);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Xt(e, r = 2) {
|
|
311
311
|
try {
|
|
312
312
|
return JSON.stringify(e, null, r);
|
|
313
313
|
} catch {
|
|
314
314
|
return "Invalid JSON";
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Zt(e, r, t = ", ") {
|
|
318
318
|
return Array.isArray(e) ? r ? e.map(r).join(t) : e.map((n) => String(n)).join(t) : "Invalid Array";
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function en(e, r) {
|
|
321
321
|
return typeof e != "boolean" ? "Invalid Boolean" : e ? (r == null ? void 0 : r.trueLabel) || "Yes" : (r == null ? void 0 : r.falseLabel) || "No";
|
|
322
322
|
}
|
|
323
323
|
function uo(e, r = 50) {
|
|
324
324
|
return typeof e != "string" ? "Invalid String" : e.length <= r ? e : e.slice(0, r - 3) + "...";
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function rn(e, r) {
|
|
327
327
|
if (typeof e != "string")
|
|
328
328
|
return "Invalid Text";
|
|
329
329
|
const t = e.split(`
|
|
@@ -340,21 +340,21 @@ function fo(e, r) {
|
|
|
340
340
|
case "string":
|
|
341
341
|
return String(e);
|
|
342
342
|
case "textarea":
|
|
343
|
-
return
|
|
343
|
+
return rn(String(e));
|
|
344
344
|
case "number":
|
|
345
|
-
return
|
|
345
|
+
return Jt(e);
|
|
346
346
|
case "boolean":
|
|
347
|
-
return
|
|
347
|
+
return en(e);
|
|
348
348
|
case "date":
|
|
349
|
-
return
|
|
349
|
+
return Qt(e);
|
|
350
350
|
case "datetime":
|
|
351
|
-
return
|
|
351
|
+
return Wt(e);
|
|
352
352
|
case "currency":
|
|
353
|
-
return
|
|
353
|
+
return Yt(e);
|
|
354
354
|
case "json":
|
|
355
|
-
return
|
|
355
|
+
return Xt(e);
|
|
356
356
|
case "array":
|
|
357
|
-
return
|
|
357
|
+
return Zt(e);
|
|
358
358
|
default:
|
|
359
359
|
return String(e);
|
|
360
360
|
}
|
|
@@ -368,40 +368,40 @@ function at(e) {
|
|
|
368
368
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
369
369
|
return n;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function tn() {
|
|
372
372
|
for (var e, r, t = 0, n = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (r = at(e)) && (n && (n += " "), n += r);
|
|
373
373
|
return n;
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const nn = (e, r) => {
|
|
376
376
|
const t = new Array(e.length + r.length);
|
|
377
377
|
for (let n = 0; n < e.length; n++)
|
|
378
378
|
t[n] = e[n];
|
|
379
379
|
for (let n = 0; n < r.length; n++)
|
|
380
380
|
t[e.length + n] = r[n];
|
|
381
381
|
return t;
|
|
382
|
-
},
|
|
382
|
+
}, an = (e, r) => ({
|
|
383
383
|
classGroupId: e,
|
|
384
384
|
validator: r
|
|
385
385
|
}), ot = (e = /* @__PURE__ */ new Map(), r = null, t) => ({
|
|
386
386
|
nextPart: e,
|
|
387
387
|
validators: r,
|
|
388
388
|
classGroupId: t
|
|
389
|
-
}), hr = "-", jr = [],
|
|
390
|
-
const r =
|
|
389
|
+
}), hr = "-", jr = [], on = "arbitrary..", sn = (e) => {
|
|
390
|
+
const r = cn(e), {
|
|
391
391
|
conflictingClassGroups: t,
|
|
392
392
|
conflictingClassGroupModifiers: n
|
|
393
393
|
} = e;
|
|
394
394
|
return {
|
|
395
395
|
getClassGroupId: (i) => {
|
|
396
396
|
if (i.startsWith("[") && i.endsWith("]"))
|
|
397
|
-
return
|
|
397
|
+
return ln(i);
|
|
398
398
|
const f = i.split(hr), c = f[0] === "" && f.length > 1 ? 1 : 0;
|
|
399
399
|
return st(f, c, r);
|
|
400
400
|
},
|
|
401
401
|
getConflictingClassGroupIds: (i, f) => {
|
|
402
402
|
if (f) {
|
|
403
403
|
const c = n[i], u = t[i];
|
|
404
|
-
return c ? u ?
|
|
404
|
+
return c ? u ? nn(u, c) : c : u || jr;
|
|
405
405
|
}
|
|
406
406
|
return t[i] || jr;
|
|
407
407
|
}
|
|
@@ -423,16 +423,16 @@ const an = (e, r) => {
|
|
|
423
423
|
if (y.validator(f))
|
|
424
424
|
return y.classGroupId;
|
|
425
425
|
}
|
|
426
|
-
},
|
|
426
|
+
}, ln = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
427
427
|
const r = e.slice(1, -1), t = r.indexOf(":"), n = r.slice(0, t);
|
|
428
|
-
return n ?
|
|
429
|
-
})(),
|
|
428
|
+
return n ? on + n : void 0;
|
|
429
|
+
})(), cn = (e) => {
|
|
430
430
|
const {
|
|
431
431
|
theme: r,
|
|
432
432
|
classGroups: t
|
|
433
433
|
} = e;
|
|
434
|
-
return
|
|
435
|
-
},
|
|
434
|
+
return un(t, r);
|
|
435
|
+
}, un = (e, r) => {
|
|
436
436
|
const t = ot();
|
|
437
437
|
for (const n in e) {
|
|
438
438
|
const a = e[n];
|
|
@@ -443,28 +443,28 @@ const an = (e, r) => {
|
|
|
443
443
|
const a = e.length;
|
|
444
444
|
for (let s = 0; s < a; s++) {
|
|
445
445
|
const i = e[s];
|
|
446
|
-
|
|
446
|
+
dn(i, r, t, n);
|
|
447
447
|
}
|
|
448
|
-
},
|
|
448
|
+
}, dn = (e, r, t, n) => {
|
|
449
449
|
if (typeof e == "string") {
|
|
450
|
-
|
|
450
|
+
fn(e, r, t);
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
453
|
if (typeof e == "function") {
|
|
454
|
-
|
|
454
|
+
mn(e, r, t, n);
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
|
|
458
|
-
},
|
|
457
|
+
pn(e, r, t, n);
|
|
458
|
+
}, fn = (e, r, t) => {
|
|
459
459
|
const n = e === "" ? r : it(r, e);
|
|
460
460
|
n.classGroupId = t;
|
|
461
|
-
},
|
|
462
|
-
if (
|
|
461
|
+
}, mn = (e, r, t, n) => {
|
|
462
|
+
if (gn(e)) {
|
|
463
463
|
Fr(e(n), r, t, n);
|
|
464
464
|
return;
|
|
465
465
|
}
|
|
466
|
-
r.validators === null && (r.validators = []), r.validators.push(
|
|
467
|
-
},
|
|
466
|
+
r.validators === null && (r.validators = []), r.validators.push(an(t, e));
|
|
467
|
+
}, pn = (e, r, t, n) => {
|
|
468
468
|
const a = Object.entries(e), s = a.length;
|
|
469
469
|
for (let i = 0; i < s; i++) {
|
|
470
470
|
const [f, c] = a[i];
|
|
@@ -479,7 +479,7 @@ const an = (e, r) => {
|
|
|
479
479
|
f || (f = ot(), t.nextPart.set(i, f)), t = f;
|
|
480
480
|
}
|
|
481
481
|
return t;
|
|
482
|
-
},
|
|
482
|
+
}, gn = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, hn = (e) => {
|
|
483
483
|
if (e < 1)
|
|
484
484
|
return {
|
|
485
485
|
get: () => {
|
|
@@ -503,13 +503,13 @@ const an = (e, r) => {
|
|
|
503
503
|
s in t ? t[s] = i : a(s, i);
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
|
-
}, Nr = "!", qr = ":",
|
|
506
|
+
}, Nr = "!", qr = ":", yn = [], Ur = (e, r, t, n, a) => ({
|
|
507
507
|
modifiers: e,
|
|
508
508
|
hasImportantModifier: r,
|
|
509
509
|
baseClassName: t,
|
|
510
510
|
maybePostfixModifierPosition: n,
|
|
511
511
|
isExternal: a
|
|
512
|
-
}),
|
|
512
|
+
}), bn = (e) => {
|
|
513
513
|
const {
|
|
514
514
|
prefix: r,
|
|
515
515
|
experimentalParseClassName: t
|
|
@@ -546,7 +546,7 @@ const an = (e, r) => {
|
|
|
546
546
|
};
|
|
547
547
|
if (r) {
|
|
548
548
|
const a = r + qr, s = n;
|
|
549
|
-
n = (i) => i.startsWith(a) ? s(i.slice(a.length)) : Ur(
|
|
549
|
+
n = (i) => i.startsWith(a) ? s(i.slice(a.length)) : Ur(yn, !1, i, void 0, !0);
|
|
550
550
|
}
|
|
551
551
|
if (t) {
|
|
552
552
|
const a = n;
|
|
@@ -556,7 +556,7 @@ const an = (e, r) => {
|
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
558
|
return n;
|
|
559
|
-
},
|
|
559
|
+
}, wn = (e) => {
|
|
560
560
|
const r = /* @__PURE__ */ new Map();
|
|
561
561
|
return e.orderSensitiveModifiers.forEach((t, n) => {
|
|
562
562
|
r.set(t, 1e6 + n);
|
|
@@ -569,18 +569,18 @@ const an = (e, r) => {
|
|
|
569
569
|
}
|
|
570
570
|
return a.length > 0 && (a.sort(), n.push(...a)), n;
|
|
571
571
|
};
|
|
572
|
-
},
|
|
573
|
-
cache:
|
|
574
|
-
parseClassName:
|
|
575
|
-
sortModifiers:
|
|
576
|
-
...
|
|
577
|
-
}),
|
|
572
|
+
}, vn = (e) => ({
|
|
573
|
+
cache: hn(e.cacheSize),
|
|
574
|
+
parseClassName: bn(e),
|
|
575
|
+
sortModifiers: wn(e),
|
|
576
|
+
...sn(e)
|
|
577
|
+
}), Cn = /\s+/, En = (e, r) => {
|
|
578
578
|
const {
|
|
579
579
|
parseClassName: t,
|
|
580
580
|
getClassGroupId: n,
|
|
581
581
|
getConflictingClassGroupIds: a,
|
|
582
582
|
sortModifiers: s
|
|
583
|
-
} = r, i = [], f = e.trim().split(
|
|
583
|
+
} = r, i = [], f = e.trim().split(Cn);
|
|
584
584
|
let c = "";
|
|
585
585
|
for (let u = f.length - 1; u >= 0; u -= 1) {
|
|
586
586
|
const y = f[u], {
|
|
@@ -618,7 +618,7 @@ const an = (e, r) => {
|
|
|
618
618
|
c = y + (c.length > 0 ? " " + c : c);
|
|
619
619
|
}
|
|
620
620
|
return c;
|
|
621
|
-
},
|
|
621
|
+
}, Sn = (...e) => {
|
|
622
622
|
let r = 0, t, n, a = "";
|
|
623
623
|
for (; r < e.length; )
|
|
624
624
|
(t = e[r++]) && (n = lt(t)) && (a && (a += " "), a += n);
|
|
@@ -630,34 +630,34 @@ const an = (e, r) => {
|
|
|
630
630
|
for (let n = 0; n < e.length; n++)
|
|
631
631
|
e[n] && (r = lt(e[n])) && (t && (t += " "), t += r);
|
|
632
632
|
return t;
|
|
633
|
-
},
|
|
633
|
+
}, xn = (e, ...r) => {
|
|
634
634
|
let t, n, a, s;
|
|
635
635
|
const i = (c) => {
|
|
636
636
|
const u = r.reduce((y, D) => D(y), e());
|
|
637
|
-
return t =
|
|
637
|
+
return t = vn(u), n = t.cache.get, a = t.cache.set, s = f, f(c);
|
|
638
638
|
}, f = (c) => {
|
|
639
639
|
const u = n(c);
|
|
640
640
|
if (u)
|
|
641
641
|
return u;
|
|
642
|
-
const y =
|
|
642
|
+
const y = En(c, t);
|
|
643
643
|
return a(c, y), y;
|
|
644
644
|
};
|
|
645
|
-
return s = i, (...c) => s(
|
|
646
|
-
},
|
|
647
|
-
const r = (t) => t[e] ||
|
|
645
|
+
return s = i, (...c) => s(Sn(...c));
|
|
646
|
+
}, On = [], fe = (e) => {
|
|
647
|
+
const r = (t) => t[e] || On;
|
|
648
648
|
return r.isThemeGetter = !0, r;
|
|
649
|
-
}, ct = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ut = /^\((?:(\w[\w-]*):)?(.+)\)$/i,
|
|
649
|
+
}, ct = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ut = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Nn = /^\d+\/\d+$/, kn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Rn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Tn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Fn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, nr = (e) => Nn.test(e), z = (e) => !!e && !Number.isNaN(Number(e)), Be = (e) => !!e && Number.isInteger(Number(e)), Sr = (e) => e.endsWith("%") && z(e.slice(0, -1)), Ie = (e) => kn.test(e), Dn = () => !0, _n = (e) => (
|
|
650
650
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
651
651
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
652
652
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
653
|
-
|
|
654
|
-
), dt = () => !1,
|
|
653
|
+
Rn.test(e) && !Tn.test(e)
|
|
654
|
+
), dt = () => !1, Vn = (e) => An.test(e), Pn = (e) => Fn.test(e), $n = (e) => !O(e) && !N(e), In = (e) => or(e, pt, dt), O = (e) => ct.test(e), He = (e) => or(e, gt, _n), xr = (e) => or(e, Bn, z), Br = (e) => or(e, ft, dt), Ln = (e) => or(e, mt, Pn), mr = (e) => or(e, ht, Vn), N = (e) => ut.test(e), lr = (e) => sr(e, gt), jn = (e) => sr(e, zn), zr = (e) => sr(e, ft), qn = (e) => sr(e, pt), Un = (e) => sr(e, mt), pr = (e) => sr(e, ht, !0), or = (e, r, t) => {
|
|
655
655
|
const n = ct.exec(e);
|
|
656
656
|
return n ? n[1] ? r(n[1]) : t(n[2]) : !1;
|
|
657
657
|
}, sr = (e, r, t = !1) => {
|
|
658
658
|
const n = ut.exec(e);
|
|
659
659
|
return n ? n[1] ? r(n[1]) : t : !1;
|
|
660
|
-
}, ft = (e) => e === "position" || e === "percentage", mt = (e) => e === "image" || e === "url", pt = (e) => e === "length" || e === "size" || e === "bg-size", gt = (e) => e === "length",
|
|
660
|
+
}, ft = (e) => e === "position" || e === "percentage", mt = (e) => e === "image" || e === "url", pt = (e) => e === "length" || e === "size" || e === "bg-size", gt = (e) => e === "length", Bn = (e) => e === "number", zn = (e) => e === "family-name", ht = (e) => e === "shadow", Kn = () => {
|
|
661
661
|
const e = fe("color"), r = fe("font"), t = fe("text"), n = fe("font-weight"), a = fe("tracking"), s = fe("leading"), i = fe("breakpoint"), f = fe("container"), c = fe("spacing"), u = fe("radius"), y = fe("shadow"), D = fe("inset-shadow"), V = fe("text-shadow"), F = fe("drop-shadow"), G = fe("blur"), b = fe("perspective"), H = fe("aspect"), q = fe("ease"), $ = fe("animate"), j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], te = () => [
|
|
662
662
|
"center",
|
|
663
663
|
"top",
|
|
@@ -676,15 +676,15 @@ const an = (e, r) => {
|
|
|
676
676
|
"bottom-left",
|
|
677
677
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
678
678
|
"left-bottom"
|
|
679
|
-
], ne = () => [...te(), N, O], T = () => ["auto", "hidden", "clip", "visible", "scroll"], p = () => ["auto", "contain", "none"], l = () => [N, O, c], w = () => [nr, "full", "auto", ...l()], v = () => [
|
|
680
|
-
span: ["full",
|
|
681
|
-
},
|
|
679
|
+
], ne = () => [...te(), N, O], T = () => ["auto", "hidden", "clip", "visible", "scroll"], p = () => ["auto", "contain", "none"], l = () => [N, O, c], w = () => [nr, "full", "auto", ...l()], v = () => [Be, "none", "subgrid", N, O], k = () => ["auto", {
|
|
680
|
+
span: ["full", Be, N, O]
|
|
681
|
+
}, Be, N, O], L = () => [Be, "auto", N, O], K = () => ["auto", "min", "max", "fr", N, O], Q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], ee = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], U = () => ["auto", ...l()], Z = () => [nr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...l()], A = () => [e, N, O], me = () => [...te(), zr, Br, {
|
|
682
682
|
position: [N, O]
|
|
683
683
|
}], Fe = () => ["no-repeat", {
|
|
684
684
|
repeat: ["", "x", "y", "space", "round"]
|
|
685
|
-
}], he = () => ["auto", "cover", "contain",
|
|
685
|
+
}], he = () => ["auto", "cover", "contain", qn, In, {
|
|
686
686
|
size: [N, O]
|
|
687
|
-
}], Se = () => [Sr, lr,
|
|
687
|
+
}], Se = () => [Sr, lr, He], R = () => [
|
|
688
688
|
// Deprecated since Tailwind CSS v4.0.0
|
|
689
689
|
"",
|
|
690
690
|
"none",
|
|
@@ -692,7 +692,7 @@ const an = (e, r) => {
|
|
|
692
692
|
u,
|
|
693
693
|
N,
|
|
694
694
|
O
|
|
695
|
-
], ae = () => ["", z, lr,
|
|
695
|
+
], ae = () => ["", z, lr, He], xe = () => ["solid", "dashed", "dotted", "double"], pe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => [z, Sr, zr, Br], Oe = () => [
|
|
696
696
|
// Deprecated since Tailwind CSS v4.0.0
|
|
697
697
|
"",
|
|
698
698
|
"none",
|
|
@@ -707,11 +707,11 @@ const an = (e, r) => {
|
|
|
707
707
|
aspect: ["video"],
|
|
708
708
|
blur: [Ie],
|
|
709
709
|
breakpoint: [Ie],
|
|
710
|
-
color: [
|
|
710
|
+
color: [Dn],
|
|
711
711
|
container: [Ie],
|
|
712
712
|
"drop-shadow": [Ie],
|
|
713
713
|
ease: ["in", "out", "in-out"],
|
|
714
|
-
font: [
|
|
714
|
+
font: [$n],
|
|
715
715
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
716
716
|
"inset-shadow": [Ie],
|
|
717
717
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -945,7 +945,7 @@ const an = (e, r) => {
|
|
|
945
945
|
* @see https://tailwindcss.com/docs/z-index
|
|
946
946
|
*/
|
|
947
947
|
z: [{
|
|
948
|
-
z: [
|
|
948
|
+
z: [Be, "auto", N, O]
|
|
949
949
|
}],
|
|
950
950
|
// ------------------------
|
|
951
951
|
// --- Flexbox and Grid ---
|
|
@@ -997,7 +997,7 @@ const an = (e, r) => {
|
|
|
997
997
|
* @see https://tailwindcss.com/docs/order
|
|
998
998
|
*/
|
|
999
999
|
order: [{
|
|
1000
|
-
order: [
|
|
1000
|
+
order: [Be, "first", "last", "none", N, O]
|
|
1001
1001
|
}],
|
|
1002
1002
|
/**
|
|
1003
1003
|
* Grid Template Columns
|
|
@@ -1392,7 +1392,7 @@ const an = (e, r) => {
|
|
|
1392
1392
|
* @see https://tailwindcss.com/docs/font-size
|
|
1393
1393
|
*/
|
|
1394
1394
|
"font-size": [{
|
|
1395
|
-
text: ["base", t, lr,
|
|
1395
|
+
text: ["base", t, lr, He]
|
|
1396
1396
|
}],
|
|
1397
1397
|
/**
|
|
1398
1398
|
* Font Smoothing
|
|
@@ -1423,7 +1423,7 @@ const an = (e, r) => {
|
|
|
1423
1423
|
* @see https://tailwindcss.com/docs/font-family
|
|
1424
1424
|
*/
|
|
1425
1425
|
"font-family": [{
|
|
1426
|
-
font: [
|
|
1426
|
+
font: [jn, O, r]
|
|
1427
1427
|
}],
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Font Variant Numeric
|
|
@@ -1540,7 +1540,7 @@ const an = (e, r) => {
|
|
|
1540
1540
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1541
1541
|
*/
|
|
1542
1542
|
"text-decoration-thickness": [{
|
|
1543
|
-
decoration: [z, "from-font", "auto", N,
|
|
1543
|
+
decoration: [z, "from-font", "auto", N, He]
|
|
1544
1544
|
}],
|
|
1545
1545
|
/**
|
|
1546
1546
|
* Text Decoration Color
|
|
@@ -1675,10 +1675,10 @@ const an = (e, r) => {
|
|
|
1675
1675
|
bg: ["none", {
|
|
1676
1676
|
linear: [{
|
|
1677
1677
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1678
|
-
},
|
|
1678
|
+
}, Be, N, O],
|
|
1679
1679
|
radial: ["", N, O],
|
|
1680
|
-
conic: [
|
|
1681
|
-
},
|
|
1680
|
+
conic: [Be, N, O]
|
|
1681
|
+
}, Un, Ln]
|
|
1682
1682
|
}],
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Background Color
|
|
@@ -2027,7 +2027,7 @@ const an = (e, r) => {
|
|
|
2027
2027
|
* @see https://tailwindcss.com/docs/outline-width
|
|
2028
2028
|
*/
|
|
2029
2029
|
"outline-w": [{
|
|
2030
|
-
outline: ["", z, lr,
|
|
2030
|
+
outline: ["", z, lr, He]
|
|
2031
2031
|
}],
|
|
2032
2032
|
/**
|
|
2033
2033
|
* Outline Color
|
|
@@ -2102,7 +2102,7 @@ const an = (e, r) => {
|
|
|
2102
2102
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2103
2103
|
*/
|
|
2104
2104
|
"ring-offset-w": [{
|
|
2105
|
-
"ring-offset": [z,
|
|
2105
|
+
"ring-offset": [z, He]
|
|
2106
2106
|
}],
|
|
2107
2107
|
/**
|
|
2108
2108
|
* Ring Offset Color
|
|
@@ -3052,7 +3052,7 @@ const an = (e, r) => {
|
|
|
3052
3052
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
3053
3053
|
*/
|
|
3054
3054
|
"stroke-w": [{
|
|
3055
|
-
stroke: [z, lr,
|
|
3055
|
+
stroke: [z, lr, He, xr]
|
|
3056
3056
|
}],
|
|
3057
3057
|
/**
|
|
3058
3058
|
* Stroke
|
|
@@ -3127,11 +3127,11 @@ const an = (e, r) => {
|
|
|
3127
3127
|
},
|
|
3128
3128
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
3129
3129
|
};
|
|
3130
|
-
},
|
|
3131
|
-
function
|
|
3132
|
-
return
|
|
3130
|
+
}, Mn = /* @__PURE__ */ xn(Kn);
|
|
3131
|
+
function je(...e) {
|
|
3132
|
+
return Mn(tn(e));
|
|
3133
3133
|
}
|
|
3134
|
-
const
|
|
3134
|
+
const Gn = () => crypto.randomUUID(), yt = (e) => e === "And" || e === "Or" || e === "Not", bt = (e, r) => {
|
|
3135
3135
|
const t = [];
|
|
3136
3136
|
if (e.operator || t.push("Operator is required"), e.operator && yt(e.operator))
|
|
3137
3137
|
!e.children || !Array.isArray(e.children) ? t.push("Logical operators require a children array") : e.children.length === 0 ? t.push("Logical operators require at least one child condition") : e.operator === "Not" && e.children.length > 1 && t.push("Not operator can only have one child condition"), e.children && Array.isArray(e.children) && e.children.forEach((n, a) => {
|
|
@@ -3177,7 +3177,7 @@ const Hn = () => crypto.randomUUID(), yt = (e) => e === "And" || e === "Or" || e
|
|
|
3177
3177
|
LHSField: e.lhsField,
|
|
3178
3178
|
RHSValue: e.rhsValue,
|
|
3179
3179
|
RHSType: e.rhsType || "Constant"
|
|
3180
|
-
},
|
|
3180
|
+
}, Hn = (e, r) => {
|
|
3181
3181
|
if (e.length === 0)
|
|
3182
3182
|
return;
|
|
3183
3183
|
const t = e.filter((n) => n.isValid);
|
|
@@ -3204,7 +3204,7 @@ function vt(e = {}) {
|
|
|
3204
3204
|
errors: p
|
|
3205
3205
|
};
|
|
3206
3206
|
}, [r.conditions, a]), i = E((p) => {
|
|
3207
|
-
const l =
|
|
3207
|
+
const l = Gn(), w = p, v = a(w), k = {
|
|
3208
3208
|
...w,
|
|
3209
3209
|
id: l,
|
|
3210
3210
|
isValid: v.isValid,
|
|
@@ -3300,7 +3300,7 @@ function vt(e = {}) {
|
|
|
3300
3300
|
}, [a]), H = E(() => {
|
|
3301
3301
|
t({ ...n });
|
|
3302
3302
|
}, [n]), q = ce(
|
|
3303
|
-
() =>
|
|
3303
|
+
() => Hn(r.conditions, r.logicalOperator),
|
|
3304
3304
|
[r.conditions, r.logicalOperator]
|
|
3305
3305
|
), $ = ce(() => {
|
|
3306
3306
|
const p = [];
|
|
@@ -3351,7 +3351,7 @@ function vt(e = {}) {
|
|
|
3351
3351
|
canAddCondition: T
|
|
3352
3352
|
};
|
|
3353
3353
|
}
|
|
3354
|
-
const
|
|
3354
|
+
const Yn = (e, r) => {
|
|
3355
3355
|
const t = [];
|
|
3356
3356
|
switch (r) {
|
|
3357
3357
|
case "Between":
|
|
@@ -3378,7 +3378,7 @@ const Qn = (e, r) => {
|
|
|
3378
3378
|
isValid: t.length === 0,
|
|
3379
3379
|
errors: t
|
|
3380
3380
|
};
|
|
3381
|
-
},
|
|
3381
|
+
}, Qn = (e, r) => {
|
|
3382
3382
|
const t = [], n = (s) => s instanceof Date && !isNaN(s.getTime()), a = (s) => {
|
|
3383
3383
|
if (s instanceof Date) return s;
|
|
3384
3384
|
if (typeof s == "string" || typeof s == "number") {
|
|
@@ -3412,7 +3412,7 @@ const Qn = (e, r) => {
|
|
|
3412
3412
|
isValid: t.length === 0,
|
|
3413
3413
|
errors: t
|
|
3414
3414
|
};
|
|
3415
|
-
},
|
|
3415
|
+
}, Wn = (e, r) => {
|
|
3416
3416
|
const t = [], n = (i) => i && typeof i == "object" && typeof i.value == "number" && typeof i.currency == "string" && i.currency.length === 3, a = (i) => typeof i == "string" && /^\d+(\.\d{2})?\s[A-Z]{3}$/.test(i), s = (i) => n(i) || a(i) || typeof i == "number";
|
|
3417
3417
|
switch (r) {
|
|
3418
3418
|
case "Between":
|
|
@@ -3434,7 +3434,7 @@ const Qn = (e, r) => {
|
|
|
3434
3434
|
isValid: t.length === 0,
|
|
3435
3435
|
errors: t
|
|
3436
3436
|
};
|
|
3437
|
-
},
|
|
3437
|
+
}, Jn = (e, r) => {
|
|
3438
3438
|
const t = [];
|
|
3439
3439
|
switch (r) {
|
|
3440
3440
|
case "Between":
|
|
@@ -3468,7 +3468,7 @@ const Qn = (e, r) => {
|
|
|
3468
3468
|
isValid: t.length === 0,
|
|
3469
3469
|
errors: t
|
|
3470
3470
|
};
|
|
3471
|
-
},
|
|
3471
|
+
}, Xn = (e, r) => {
|
|
3472
3472
|
const t = [];
|
|
3473
3473
|
if (!["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"].includes(r))
|
|
3474
3474
|
return t.push(`Operator ${r} is not supported for boolean fields`), { isValid: !1, errors: t };
|
|
@@ -3488,7 +3488,7 @@ const Qn = (e, r) => {
|
|
|
3488
3488
|
isValid: t.length === 0,
|
|
3489
3489
|
errors: t
|
|
3490
3490
|
};
|
|
3491
|
-
},
|
|
3491
|
+
}, Zn = (e, r, t) => {
|
|
3492
3492
|
const n = [];
|
|
3493
3493
|
if (!t || t.length === 0)
|
|
3494
3494
|
return n.push("No select options defined for this field"), { isValid: !1, errors: n };
|
|
@@ -3517,37 +3517,37 @@ const Qn = (e, r) => {
|
|
|
3517
3517
|
isValid: n.length === 0,
|
|
3518
3518
|
errors: n
|
|
3519
3519
|
};
|
|
3520
|
-
},
|
|
3520
|
+
}, Ye = (e) => {
|
|
3521
3521
|
switch (e) {
|
|
3522
3522
|
case "string":
|
|
3523
3523
|
return {
|
|
3524
3524
|
type: "string",
|
|
3525
3525
|
allowedOperators: ["EQ", "NE", "Contains", "NotContains", "IN", "NIN", "Empty", "NotEmpty", "MinLength", "MaxLength"],
|
|
3526
|
-
validateValue:
|
|
3526
|
+
validateValue: Jn
|
|
3527
3527
|
};
|
|
3528
3528
|
case "number":
|
|
3529
3529
|
return {
|
|
3530
3530
|
type: "number",
|
|
3531
3531
|
allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
|
|
3532
|
-
validateValue:
|
|
3532
|
+
validateValue: Yn
|
|
3533
3533
|
};
|
|
3534
3534
|
case "date":
|
|
3535
3535
|
return {
|
|
3536
3536
|
type: "date",
|
|
3537
3537
|
allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
|
|
3538
|
-
validateValue:
|
|
3538
|
+
validateValue: Qn
|
|
3539
3539
|
};
|
|
3540
3540
|
case "boolean":
|
|
3541
3541
|
return {
|
|
3542
3542
|
type: "boolean",
|
|
3543
3543
|
allowedOperators: ["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"],
|
|
3544
|
-
validateValue:
|
|
3544
|
+
validateValue: Xn
|
|
3545
3545
|
};
|
|
3546
3546
|
case "currency":
|
|
3547
3547
|
return {
|
|
3548
3548
|
type: "currency",
|
|
3549
3549
|
allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
|
|
3550
|
-
validateValue:
|
|
3550
|
+
validateValue: Wn
|
|
3551
3551
|
};
|
|
3552
3552
|
case "select":
|
|
3553
3553
|
const r = {
|
|
@@ -3555,15 +3555,15 @@ const Qn = (e, r) => {
|
|
|
3555
3555
|
allowedOperators: ["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"],
|
|
3556
3556
|
selectOptions: []
|
|
3557
3557
|
};
|
|
3558
|
-
return r.validateValue = (t, n) =>
|
|
3558
|
+
return r.validateValue = (t, n) => Zn(t, n, r.selectOptions), r;
|
|
3559
3559
|
default:
|
|
3560
|
-
return
|
|
3560
|
+
return Ye("string");
|
|
3561
3561
|
}
|
|
3562
3562
|
}, mo = (e) => {
|
|
3563
3563
|
const r = {};
|
|
3564
3564
|
return !e || typeof e != "object" || Object.keys(e).forEach((t) => {
|
|
3565
3565
|
const n = e[t], a = t;
|
|
3566
|
-
typeof n == "string" ? r[a] =
|
|
3566
|
+
typeof n == "string" ? r[a] = Ye("string") : typeof n == "number" ? r[a] = Ye("number") : typeof n == "boolean" ? r[a] = Ye("boolean") : n instanceof Date ? r[a] = Ye("date") : n && typeof n == "object" && "value" in n && "currency" in n ? r[a] = Ye("currency") : r[a] = Ye("string");
|
|
3567
3567
|
}), r;
|
|
3568
3568
|
}, dr = (e) => e === "And" || e === "Or" || e === "Not", Ct = (e) => dr(e.operator) ? {
|
|
3569
3569
|
Operator: e.operator,
|
|
@@ -3573,7 +3573,7 @@ const Qn = (e, r) => {
|
|
|
3573
3573
|
LHSField: e.lhsField,
|
|
3574
3574
|
RHSValue: e.rhsValue,
|
|
3575
3575
|
RHSType: e.rhsType || "Constant"
|
|
3576
|
-
},
|
|
3576
|
+
}, ea = (e, r) => {
|
|
3577
3577
|
if (e.length === 0)
|
|
3578
3578
|
return;
|
|
3579
3579
|
const t = e.filter((n) => n.isValid);
|
|
@@ -3582,7 +3582,7 @@ const Qn = (e, r) => {
|
|
|
3582
3582
|
Operator: r,
|
|
3583
3583
|
Condition: t.map(Ct)
|
|
3584
3584
|
};
|
|
3585
|
-
}, po = (e) =>
|
|
3585
|
+
}, po = (e) => ea(e.conditions, e.logicalOperator), Et = (e) => e ? !e.Operator || !["And", "Or", "Not"].includes(e.Operator) || !Array.isArray(e.Condition) || e.Condition.length === 0 || e.Operator === "Not" && e.Condition.length !== 1 ? !1 : e.Condition.every((r) => {
|
|
3586
3586
|
if (!r.Operator)
|
|
3587
3587
|
return !1;
|
|
3588
3588
|
if (dr(r.Operator))
|
|
@@ -3606,7 +3606,7 @@ const Qn = (e, r) => {
|
|
|
3606
3606
|
RHSType: r.RHSType
|
|
3607
3607
|
};
|
|
3608
3608
|
}
|
|
3609
|
-
},
|
|
3609
|
+
}, ra = (e) => {
|
|
3610
3610
|
if (e)
|
|
3611
3611
|
return {
|
|
3612
3612
|
Operator: e.Operator,
|
|
@@ -3619,7 +3619,7 @@ const Qn = (e, r) => {
|
|
|
3619
3619
|
if (t.length === 0)
|
|
3620
3620
|
return;
|
|
3621
3621
|
if (t.length === 1)
|
|
3622
|
-
return
|
|
3622
|
+
return ra(t[0]);
|
|
3623
3623
|
const n = t.flatMap((a) => a.Condition);
|
|
3624
3624
|
return {
|
|
3625
3625
|
Operator: r,
|
|
@@ -3654,7 +3654,7 @@ const Qn = (e, r) => {
|
|
|
3654
3654
|
(t, n) => Ot(t, r.Condition[n])
|
|
3655
3655
|
);
|
|
3656
3656
|
function bo(e) {
|
|
3657
|
-
var R, ae, xe, pe, P, Oe, ve, ye, De, Ne,
|
|
3657
|
+
var R, ae, xe, pe, P, Oe, ve, ye, De, Ne, qe;
|
|
3658
3658
|
const [r, t] = we({
|
|
3659
3659
|
query: ""
|
|
3660
3660
|
}), [n, a] = we({
|
|
@@ -3668,7 +3668,7 @@ function bo(e) {
|
|
|
3668
3668
|
pageSize: ((De = (ye = e.initialState) == null ? void 0 : ye.pagination) == null ? void 0 : De.pageSize) || 10
|
|
3669
3669
|
}), u = vt({
|
|
3670
3670
|
initialConditions: (Ne = e.initialState) == null ? void 0 : Ne.filters,
|
|
3671
|
-
initialLogicalOperator: ((
|
|
3671
|
+
initialLogicalOperator: ((qe = e.initialState) == null ? void 0 : qe.filterOperator) || "And",
|
|
3672
3672
|
fieldDefinitions: e.fieldDefinitions,
|
|
3673
3673
|
validateOnChange: !0,
|
|
3674
3674
|
onValidationError: e.onFilterError,
|
|
@@ -3848,7 +3848,7 @@ function bo(e) {
|
|
|
3848
3848
|
refetch: Se
|
|
3849
3849
|
};
|
|
3850
3850
|
}
|
|
3851
|
-
function
|
|
3851
|
+
function ta() {
|
|
3852
3852
|
const e = /* @__PURE__ */ new Date();
|
|
3853
3853
|
return {
|
|
3854
3854
|
NOW: e,
|
|
@@ -3864,7 +3864,7 @@ function na() {
|
|
|
3864
3864
|
CURRENT_USER_ID: 1
|
|
3865
3865
|
};
|
|
3866
3866
|
}
|
|
3867
|
-
const
|
|
3867
|
+
const na = {
|
|
3868
3868
|
// String functions
|
|
3869
3869
|
CONCAT: (...e) => e.map((r) => String(r || "")).join(""),
|
|
3870
3870
|
TRIM: (e) => String(e || "").trim(),
|
|
@@ -3927,7 +3927,7 @@ const aa = {
|
|
|
3927
3927
|
ARRAY_CONTAINS: (e, r) => Array.isArray(e) ? e.includes(r) : !1,
|
|
3928
3928
|
ARRAY_JOIN: (e, r = ",") => Array.isArray(e) ? e.join(r) : ""
|
|
3929
3929
|
};
|
|
3930
|
-
function
|
|
3930
|
+
function ze(e, r) {
|
|
3931
3931
|
var t;
|
|
3932
3932
|
switch (e.Type) {
|
|
3933
3933
|
case "Literal":
|
|
@@ -3947,31 +3947,31 @@ function Ke(e, r) {
|
|
|
3947
3947
|
case "MemberExpression":
|
|
3948
3948
|
if (!e.Arguments || e.Arguments.length === 0)
|
|
3949
3949
|
throw new Error("MemberExpression requires Arguments array");
|
|
3950
|
-
const n =
|
|
3950
|
+
const n = ze(e.Arguments[0], r), a = (t = e.Arguments[0].Property) == null ? void 0 : t.Name;
|
|
3951
3951
|
return a ? Or(n, a) : n;
|
|
3952
3952
|
case "BinaryExpression":
|
|
3953
3953
|
if (!e.Arguments || e.Arguments.length !== 2)
|
|
3954
3954
|
throw new Error("BinaryExpression requires exactly 2 arguments");
|
|
3955
|
-
const s =
|
|
3956
|
-
return
|
|
3955
|
+
const s = ze(e.Arguments[0], r), i = ze(e.Arguments[1], r);
|
|
3956
|
+
return aa(e.Operator, s, i);
|
|
3957
3957
|
case "LogicalExpression":
|
|
3958
3958
|
if (!e.Arguments || e.Arguments.length < 2)
|
|
3959
3959
|
throw new Error("LogicalExpression requires at least 2 arguments");
|
|
3960
|
-
return
|
|
3960
|
+
return oa(e.Operator, e.Arguments, r);
|
|
3961
3961
|
case "CallExpression":
|
|
3962
3962
|
if (!e.Callee)
|
|
3963
3963
|
throw new Error("CallExpression requires Callee");
|
|
3964
|
-
const f =
|
|
3964
|
+
const f = na[e.Callee];
|
|
3965
3965
|
if (!f)
|
|
3966
3966
|
throw new Error(`Unknown function: ${e.Callee}`);
|
|
3967
3967
|
const c = (e.Arguments || []).map(
|
|
3968
|
-
(u) =>
|
|
3968
|
+
(u) => ze(u, r)
|
|
3969
3969
|
);
|
|
3970
3970
|
return f(...c);
|
|
3971
3971
|
case "AssignmentExpression":
|
|
3972
3972
|
if (!e.Arguments || e.Arguments.length !== 1)
|
|
3973
3973
|
throw new Error("AssignmentExpression requires exactly 1 argument");
|
|
3974
|
-
return
|
|
3974
|
+
return ze(e.Arguments[0], r);
|
|
3975
3975
|
default:
|
|
3976
3976
|
throw new Error(`Unknown expression type: ${e.Type}`);
|
|
3977
3977
|
}
|
|
@@ -3990,7 +3990,7 @@ function Or(e, r) {
|
|
|
3990
3990
|
if (!(!e || typeof e != "object"))
|
|
3991
3991
|
return e[r];
|
|
3992
3992
|
}
|
|
3993
|
-
function
|
|
3993
|
+
function aa(e, r, t) {
|
|
3994
3994
|
const n = (a) => a == null ? 0 : typeof a == "number" ? a : typeof a == "object" && a !== null && "value" in a ? Number(a.value) || 0 : Number(a) || 0;
|
|
3995
3995
|
switch (e) {
|
|
3996
3996
|
case "==":
|
|
@@ -4018,12 +4018,12 @@ function oa(e, r, t) {
|
|
|
4018
4018
|
throw new Error(`Unknown binary operator: ${e}`);
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function oa(e, r, t) {
|
|
4022
4022
|
switch (e) {
|
|
4023
4023
|
case "AND":
|
|
4024
|
-
return r.every((n) => !!
|
|
4024
|
+
return r.every((n) => !!ze(n, t));
|
|
4025
4025
|
case "OR":
|
|
4026
|
-
return r.some((n) => !!
|
|
4026
|
+
return r.some((n) => !!ze(n, t));
|
|
4027
4027
|
default:
|
|
4028
4028
|
throw new Error(`Unknown logical operator: ${e}`);
|
|
4029
4029
|
}
|
|
@@ -4031,16 +4031,16 @@ function sa(e, r, t) {
|
|
|
4031
4031
|
function Nt(e, r, t = {}) {
|
|
4032
4032
|
const n = {
|
|
4033
4033
|
formValues: r,
|
|
4034
|
-
systemValues:
|
|
4034
|
+
systemValues: ta(),
|
|
4035
4035
|
referenceData: t
|
|
4036
4036
|
};
|
|
4037
4037
|
try {
|
|
4038
|
-
return
|
|
4038
|
+
return ze(e, n);
|
|
4039
4039
|
} catch (a) {
|
|
4040
4040
|
return console.warn("Expression evaluation failed:", a), !1;
|
|
4041
4041
|
}
|
|
4042
4042
|
}
|
|
4043
|
-
function
|
|
4043
|
+
function sa(e, r, t = {}) {
|
|
4044
4044
|
const n = [];
|
|
4045
4045
|
for (const a of e)
|
|
4046
4046
|
try {
|
|
@@ -4058,7 +4058,7 @@ function ia(e, r, t = {}) {
|
|
|
4058
4058
|
}
|
|
4059
4059
|
return n;
|
|
4060
4060
|
}
|
|
4061
|
-
function
|
|
4061
|
+
function ia(e, r = {}, t = {}) {
|
|
4062
4062
|
try {
|
|
4063
4063
|
return Nt(e, r, t);
|
|
4064
4064
|
} catch (n) {
|
|
@@ -4076,7 +4076,7 @@ function Mr(e, r) {
|
|
|
4076
4076
|
`${s}!=''`
|
|
4077
4077
|
].some((y) => t.includes(y));
|
|
4078
4078
|
}
|
|
4079
|
-
function
|
|
4079
|
+
function la(e) {
|
|
4080
4080
|
const r = { ...e };
|
|
4081
4081
|
r.Rules || (r.Rules = {
|
|
4082
4082
|
Validation: {},
|
|
@@ -4118,7 +4118,7 @@ function ca(e) {
|
|
|
4118
4118
|
}
|
|
4119
4119
|
}), r.Fields = t, r;
|
|
4120
4120
|
}
|
|
4121
|
-
function
|
|
4121
|
+
function ca(e) {
|
|
4122
4122
|
var t, n, a;
|
|
4123
4123
|
const r = {
|
|
4124
4124
|
validation: {},
|
|
@@ -4127,7 +4127,7 @@ function ua(e) {
|
|
|
4127
4127
|
};
|
|
4128
4128
|
return (t = e.Rules) != null && t.Validation && (r.validation = { ...e.Rules.Validation }), (n = e.Rules) != null && n.Computation && (r.computation = { ...e.Rules.Computation }), (a = e.Rules) != null && a.BusinessLogic && (r.businessLogic = { ...e.Rules.BusinessLogic }), r;
|
|
4129
4129
|
}
|
|
4130
|
-
function
|
|
4130
|
+
function ua(e) {
|
|
4131
4131
|
var n;
|
|
4132
4132
|
const r = {};
|
|
4133
4133
|
if (!((n = e.Rules) != null && n.Computation)) return r;
|
|
@@ -4149,7 +4149,7 @@ function da(e) {
|
|
|
4149
4149
|
}
|
|
4150
4150
|
}), r;
|
|
4151
4151
|
}
|
|
4152
|
-
function
|
|
4152
|
+
function da(e, r) {
|
|
4153
4153
|
const t = {};
|
|
4154
4154
|
Object.keys(e.Fields).forEach((a) => {
|
|
4155
4155
|
t[a] = {
|
|
@@ -4165,12 +4165,12 @@ function fa(e, r) {
|
|
|
4165
4165
|
f.Expression === ((c = s.Formula) == null ? void 0 : c.Expression) && (t[a].computation.includes(i) || t[a].computation.push(i));
|
|
4166
4166
|
});
|
|
4167
4167
|
});
|
|
4168
|
-
const n =
|
|
4168
|
+
const n = ua(e);
|
|
4169
4169
|
return Object.entries(n).forEach(([a, s]) => {
|
|
4170
4170
|
t[s] && !t[s].computation.includes(a) && t[s].computation.push(a);
|
|
4171
4171
|
}), t;
|
|
4172
4172
|
}
|
|
4173
|
-
function
|
|
4173
|
+
function fa(e, r) {
|
|
4174
4174
|
const t = {}, n = {
|
|
4175
4175
|
editable: !0,
|
|
4176
4176
|
readable: !0,
|
|
@@ -4190,7 +4190,7 @@ function ma(e, r) {
|
|
|
4190
4190
|
};
|
|
4191
4191
|
}), t;
|
|
4192
4192
|
}
|
|
4193
|
-
function
|
|
4193
|
+
function ma(e) {
|
|
4194
4194
|
return {
|
|
4195
4195
|
Id: "legacy_schema",
|
|
4196
4196
|
Name: "Legacy Schema",
|
|
@@ -4217,7 +4217,7 @@ function pa(e) {
|
|
|
4217
4217
|
Roles: {}
|
|
4218
4218
|
};
|
|
4219
4219
|
}
|
|
4220
|
-
function
|
|
4220
|
+
function pa(e, r) {
|
|
4221
4221
|
switch (e) {
|
|
4222
4222
|
case "String":
|
|
4223
4223
|
return r.toLowerCase().includes("email") ? "email" : r.toLowerCase().includes("password") ? "password" : "text";
|
|
@@ -4241,7 +4241,7 @@ function ga(e, r) {
|
|
|
4241
4241
|
function kt(e) {
|
|
4242
4242
|
return e.replace(/([A-Z])/g, " $1").replace(/^./, (r) => r.toUpperCase()).replace(/_/g, " ").trim();
|
|
4243
4243
|
}
|
|
4244
|
-
function
|
|
4244
|
+
function ga(e, r, t) {
|
|
4245
4245
|
const n = {};
|
|
4246
4246
|
switch (r.Required && (n.required = {
|
|
4247
4247
|
value: !0,
|
|
@@ -4257,13 +4257,13 @@ function ha(e, r, t) {
|
|
|
4257
4257
|
}
|
|
4258
4258
|
return r.Validation && r.Validation.length > 0 && (n.validate = () => !0), n;
|
|
4259
4259
|
}
|
|
4260
|
-
function
|
|
4260
|
+
function ha(e) {
|
|
4261
4261
|
return e.Values ? e.Values.Mode === "Static" && e.Values.Items ? e.Values.Items.map((r) => ({
|
|
4262
4262
|
value: r.Value,
|
|
4263
4263
|
label: r.Label
|
|
4264
4264
|
})) : e.Values.Mode === "Dynamic" && e.Values.Reference ? [] : [] : [];
|
|
4265
4265
|
}
|
|
4266
|
-
function
|
|
4266
|
+
function ya(e, r = {}) {
|
|
4267
4267
|
if (!e.DefaultValue)
|
|
4268
4268
|
switch (e.Type) {
|
|
4269
4269
|
case "Boolean":
|
|
@@ -4279,12 +4279,12 @@ function ba(e, r = {}) {
|
|
|
4279
4279
|
default:
|
|
4280
4280
|
return;
|
|
4281
4281
|
}
|
|
4282
|
-
return
|
|
4282
|
+
return ia(
|
|
4283
4283
|
e.DefaultValue.ExpressionTree,
|
|
4284
4284
|
r
|
|
4285
4285
|
);
|
|
4286
4286
|
}
|
|
4287
|
-
function
|
|
4287
|
+
function ba(e, r, t, n = {}, a, s) {
|
|
4288
4288
|
const i = {
|
|
4289
4289
|
editable: !0,
|
|
4290
4290
|
readable: !0,
|
|
@@ -4293,15 +4293,15 @@ function wa(e, r, t, n = {}, a, s) {
|
|
|
4293
4293
|
validation: [],
|
|
4294
4294
|
computation: [],
|
|
4295
4295
|
businessLogic: []
|
|
4296
|
-
}, u = r.Computed || !!r.Formula || c.computation.length > 0, y =
|
|
4296
|
+
}, u = r.Computed || !!r.Formula || c.computation.length > 0, y = ga(e, r);
|
|
4297
4297
|
return u && (y.disabled = !0), {
|
|
4298
4298
|
name: e,
|
|
4299
|
-
type:
|
|
4299
|
+
type: pa(r.Type, e),
|
|
4300
4300
|
label: r.Name || kt(e),
|
|
4301
4301
|
required: r.Required || !1,
|
|
4302
4302
|
computed: u,
|
|
4303
|
-
defaultValue:
|
|
4304
|
-
options:
|
|
4303
|
+
defaultValue: ya(r, n),
|
|
4304
|
+
options: ha(r),
|
|
4305
4305
|
validation: y,
|
|
4306
4306
|
description: r.Description,
|
|
4307
4307
|
backendField: r,
|
|
@@ -4309,17 +4309,17 @@ function wa(e, r, t, n = {}, a, s) {
|
|
|
4309
4309
|
rules: c
|
|
4310
4310
|
};
|
|
4311
4311
|
}
|
|
4312
|
-
function
|
|
4313
|
-
let n = "Kind" in e && e.Kind === "BusinessObject" ? e :
|
|
4314
|
-
n =
|
|
4315
|
-
const a = {}, s = [], i = [], f = [], c = [], u =
|
|
4312
|
+
function wa(e, r = {}, t) {
|
|
4313
|
+
let n = "Kind" in e && e.Kind === "BusinessObject" ? e : ma(e);
|
|
4314
|
+
n = la(n);
|
|
4315
|
+
const a = {}, s = [], i = [], f = [], c = [], u = ca(n), y = da(n, u), D = fa(n, t);
|
|
4316
4316
|
for (const [V, F] of Object.entries(n.Fields)) {
|
|
4317
4317
|
if (V.startsWith("_") && !["_id"].includes(V))
|
|
4318
4318
|
continue;
|
|
4319
4319
|
const G = D[V];
|
|
4320
4320
|
if (G.hidden)
|
|
4321
4321
|
continue;
|
|
4322
|
-
const b =
|
|
4322
|
+
const b = ba(
|
|
4323
4323
|
V,
|
|
4324
4324
|
F,
|
|
4325
4325
|
n.Fields,
|
|
@@ -4344,7 +4344,7 @@ function va(e, r = {}, t) {
|
|
|
4344
4344
|
rolePermissions: n.RolePermission
|
|
4345
4345
|
};
|
|
4346
4346
|
}
|
|
4347
|
-
function
|
|
4347
|
+
function va(e) {
|
|
4348
4348
|
var t;
|
|
4349
4349
|
if (e.type !== "reference" || !((t = e.backendField.Values) != null && t.Reference))
|
|
4350
4350
|
return null;
|
|
@@ -4357,18 +4357,18 @@ function Ca(e) {
|
|
|
4357
4357
|
sort: r.Sort
|
|
4358
4358
|
};
|
|
4359
4359
|
}
|
|
4360
|
-
function
|
|
4360
|
+
function Ca(e) {
|
|
4361
4361
|
const r = {};
|
|
4362
4362
|
for (const [t, n] of Object.entries(e.fields))
|
|
4363
4363
|
if (n.type === "reference") {
|
|
4364
|
-
const a =
|
|
4364
|
+
const a = va(n);
|
|
4365
4365
|
a && (r[t] = a);
|
|
4366
4366
|
}
|
|
4367
4367
|
return r;
|
|
4368
4368
|
}
|
|
4369
|
-
async function
|
|
4369
|
+
async function Ea(e) {
|
|
4370
4370
|
try {
|
|
4371
|
-
const t = (await
|
|
4371
|
+
const t = (await Ht(e)).BOBlob;
|
|
4372
4372
|
if (!t || typeof t != "object" || !t.Fields)
|
|
4373
4373
|
throw new Error(`Invalid BDO schema response for ${e}`);
|
|
4374
4374
|
return t;
|
|
@@ -4378,11 +4378,11 @@ async function Sa(e) {
|
|
|
4378
4378
|
);
|
|
4379
4379
|
}
|
|
4380
4380
|
}
|
|
4381
|
-
async function
|
|
4381
|
+
async function Sa(e, r = 3) {
|
|
4382
4382
|
let t;
|
|
4383
4383
|
for (let n = 1; n <= r; n++)
|
|
4384
4384
|
try {
|
|
4385
|
-
return await
|
|
4385
|
+
return await Ea(e);
|
|
4386
4386
|
} catch (a) {
|
|
4387
4387
|
if (t = a, n < r) {
|
|
4388
4388
|
const s = Math.min(1e3 * Math.pow(2, n - 1), 5e3);
|
|
@@ -4392,7 +4392,7 @@ async function xa(e, r = 3) {
|
|
|
4392
4392
|
}
|
|
4393
4393
|
throw t;
|
|
4394
4394
|
}
|
|
4395
|
-
async function
|
|
4395
|
+
async function xa(e, r) {
|
|
4396
4396
|
try {
|
|
4397
4397
|
return await Te(e).get(r);
|
|
4398
4398
|
} catch (t) {
|
|
@@ -4401,7 +4401,7 @@ async function Oa(e, r) {
|
|
|
4401
4401
|
);
|
|
4402
4402
|
}
|
|
4403
4403
|
}
|
|
4404
|
-
async function
|
|
4404
|
+
async function Oa(e, r, t, n) {
|
|
4405
4405
|
try {
|
|
4406
4406
|
let a;
|
|
4407
4407
|
if (r === "create")
|
|
@@ -4429,7 +4429,7 @@ async function Na(e, r, t, n) {
|
|
|
4429
4429
|
};
|
|
4430
4430
|
}
|
|
4431
4431
|
}
|
|
4432
|
-
async function
|
|
4432
|
+
async function Na(e, r = ["_id"], t, n) {
|
|
4433
4433
|
try {
|
|
4434
4434
|
const a = {};
|
|
4435
4435
|
return t && (a.Filter = t), n && (a.Sort = n), r.length > 0 && (a.Field = r), (await Te(e).list(a)).Data || [];
|
|
@@ -4437,11 +4437,11 @@ async function ka(e, r = ["_id"], t, n) {
|
|
|
4437
4437
|
return console.error(`Reference data fetch error for ${e}:`, a), [];
|
|
4438
4438
|
}
|
|
4439
4439
|
}
|
|
4440
|
-
async function
|
|
4440
|
+
async function ka(e) {
|
|
4441
4441
|
const r = {}, t = Object.entries(e).map(
|
|
4442
4442
|
async ([a, s]) => {
|
|
4443
4443
|
try {
|
|
4444
|
-
const i = await
|
|
4444
|
+
const i = await Na(
|
|
4445
4445
|
s.businessObject,
|
|
4446
4446
|
s.fields,
|
|
4447
4447
|
s.filters,
|
|
@@ -4460,7 +4460,7 @@ async function Ra(e) {
|
|
|
4460
4460
|
}
|
|
4461
4461
|
}), r;
|
|
4462
4462
|
}
|
|
4463
|
-
function
|
|
4463
|
+
function Ra(e, r, t = "create", n) {
|
|
4464
4464
|
const a = {};
|
|
4465
4465
|
return Object.keys(e).forEach((s) => {
|
|
4466
4466
|
const i = s, f = e[i];
|
|
@@ -4481,28 +4481,28 @@ function Ta(e, r, t = "create", n) {
|
|
|
4481
4481
|
}), a;
|
|
4482
4482
|
}
|
|
4483
4483
|
const kr = /* @__PURE__ */ new Map();
|
|
4484
|
-
function
|
|
4484
|
+
function Ta(e, r, t = 10) {
|
|
4485
4485
|
kr.set(e, {
|
|
4486
4486
|
data: r,
|
|
4487
4487
|
timestamp: Date.now(),
|
|
4488
4488
|
ttl: t * 60 * 1e3
|
|
4489
4489
|
});
|
|
4490
4490
|
}
|
|
4491
|
-
function
|
|
4491
|
+
function Aa(e) {
|
|
4492
4492
|
const r = kr.get(e);
|
|
4493
4493
|
return r ? Date.now() - r.timestamp > r.ttl ? (kr.delete(e), null) : r.data : null;
|
|
4494
4494
|
}
|
|
4495
|
-
async function
|
|
4496
|
-
const r = `schema:${e}`, t =
|
|
4495
|
+
async function Fa(e) {
|
|
4496
|
+
const r = `schema:${e}`, t = Aa(r);
|
|
4497
4497
|
if (t)
|
|
4498
4498
|
return t;
|
|
4499
|
-
const n = await
|
|
4500
|
-
return
|
|
4499
|
+
const n = await Sa(e);
|
|
4500
|
+
return Ta(r, n, 30), n;
|
|
4501
4501
|
}
|
|
4502
4502
|
class Gr {
|
|
4503
4503
|
constructor(r = 1e3) {
|
|
4504
|
-
|
|
4505
|
-
|
|
4504
|
+
Ge(this, "cache", /* @__PURE__ */ new Map());
|
|
4505
|
+
Ge(this, "maxSize");
|
|
4506
4506
|
this.maxSize = r;
|
|
4507
4507
|
}
|
|
4508
4508
|
get(r) {
|
|
@@ -4522,7 +4522,7 @@ class Gr {
|
|
|
4522
4522
|
this.cache.clear();
|
|
4523
4523
|
}
|
|
4524
4524
|
}
|
|
4525
|
-
function
|
|
4525
|
+
function Da(e) {
|
|
4526
4526
|
const r = /* @__PURE__ */ new Set();
|
|
4527
4527
|
function t(n) {
|
|
4528
4528
|
switch (n.Type) {
|
|
@@ -4541,11 +4541,11 @@ function _a(e) {
|
|
|
4541
4541
|
}
|
|
4542
4542
|
return t(e), r;
|
|
4543
4543
|
}
|
|
4544
|
-
class
|
|
4544
|
+
class _a {
|
|
4545
4545
|
constructor() {
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4546
|
+
Ge(this, "resultCache", new Gr(500));
|
|
4547
|
+
Ge(this, "dependencyCache", new Gr(200));
|
|
4548
|
+
Ge(this, "compiledExpressions", /* @__PURE__ */ new Map());
|
|
4549
4549
|
}
|
|
4550
4550
|
/**
|
|
4551
4551
|
* Create cache key from expression and context
|
|
@@ -4560,7 +4560,7 @@ class Va {
|
|
|
4560
4560
|
getDependencies(r) {
|
|
4561
4561
|
const t = JSON.stringify(r);
|
|
4562
4562
|
let n = this.dependencyCache.get(t);
|
|
4563
|
-
return n || (n =
|
|
4563
|
+
return n || (n = Da(r), this.dependencyCache.set(t, n)), n;
|
|
4564
4564
|
}
|
|
4565
4565
|
/**
|
|
4566
4566
|
* Check if expression result is cached and context hasn't changed
|
|
@@ -4755,8 +4755,8 @@ class Va {
|
|
|
4755
4755
|
this.resultCache.clear(), this.dependencyCache.clear(), this.compiledExpressions.clear();
|
|
4756
4756
|
}
|
|
4757
4757
|
}
|
|
4758
|
-
const Rt = new
|
|
4759
|
-
function
|
|
4758
|
+
const Rt = new _a();
|
|
4759
|
+
function Va(e, r, t, n, a) {
|
|
4760
4760
|
if (!t || t.length === 0)
|
|
4761
4761
|
return { isValid: !0 };
|
|
4762
4762
|
const s = { ...n, [e]: r };
|
|
@@ -4814,7 +4814,7 @@ function wo(e) {
|
|
|
4814
4814
|
refetch: A
|
|
4815
4815
|
} = ar({
|
|
4816
4816
|
queryKey: ["form-schema", r],
|
|
4817
|
-
queryFn: () => V ? Promise.resolve(F || {}) :
|
|
4817
|
+
queryFn: () => V ? Promise.resolve(F || {}) : Fa(r),
|
|
4818
4818
|
enabled: i && (!V || !!F),
|
|
4819
4819
|
retry: 3,
|
|
4820
4820
|
staleTime: 30 * 60 * 1e3,
|
|
@@ -4828,7 +4828,7 @@ function wo(e) {
|
|
|
4828
4828
|
error: he
|
|
4829
4829
|
} = ar({
|
|
4830
4830
|
queryKey: ["form-record", r, n],
|
|
4831
|
-
queryFn: () =>
|
|
4831
|
+
queryFn: () => xa(r, n),
|
|
4832
4832
|
enabled: i && t === "update" && !!n,
|
|
4833
4833
|
retry: 3,
|
|
4834
4834
|
staleTime: 5 * 60 * 1e3,
|
|
@@ -4842,7 +4842,7 @@ function wo(e) {
|
|
|
4842
4842
|
for (const [h, x] of Object.entries(b.fields))
|
|
4843
4843
|
x.defaultValue !== void 0 && !(h in d) && (d[h] = x.defaultValue);
|
|
4844
4844
|
return d;
|
|
4845
|
-
}, [a, me, t, b]), R =
|
|
4845
|
+
}, [a, me, t, b]), R = Gt({
|
|
4846
4846
|
mode: s,
|
|
4847
4847
|
defaultValues: a,
|
|
4848
4848
|
values: t === "update" && me ? Se : void 0
|
|
@@ -4851,15 +4851,15 @@ function wo(e) {
|
|
|
4851
4851
|
var d;
|
|
4852
4852
|
if (ee)
|
|
4853
4853
|
try {
|
|
4854
|
-
const h =
|
|
4854
|
+
const h = wa(
|
|
4855
4855
|
ee,
|
|
4856
4856
|
{},
|
|
4857
4857
|
// Pass empty object - validation functions get live values from react-hook-form
|
|
4858
4858
|
f
|
|
4859
4859
|
);
|
|
4860
4860
|
H(h);
|
|
4861
|
-
const x =
|
|
4862
|
-
Object.keys(x).length > 0 &&
|
|
4861
|
+
const x = Ca(h);
|
|
4862
|
+
Object.keys(x).length > 0 && ka(x).then($).catch(console.warn);
|
|
4863
4863
|
} catch (h) {
|
|
4864
4864
|
console.error("Schema processing failed:", h), (d = Q.current) == null || d.call(Q, h);
|
|
4865
4865
|
}
|
|
@@ -4913,15 +4913,15 @@ function wo(e) {
|
|
|
4913
4913
|
Object.keys(x).forEach((de) => {
|
|
4914
4914
|
ue.has(de) || (Pe[de] = x[de]);
|
|
4915
4915
|
}), v.current = Pe;
|
|
4916
|
-
const
|
|
4917
|
-
|
|
4916
|
+
const Ue = t === "update" && n ? await B.draftPatch(n, _e) : await B.draft(_e);
|
|
4917
|
+
Ue && typeof Ue == "object" && (Object.entries(Ue).forEach(
|
|
4918
4918
|
([de, be]) => {
|
|
4919
4919
|
x[de] !== be && R.setValue(de, be, {
|
|
4920
4920
|
shouldDirty: !1,
|
|
4921
4921
|
shouldValidate: !1
|
|
4922
4922
|
});
|
|
4923
4923
|
}
|
|
4924
|
-
), Object.entries(
|
|
4924
|
+
), Object.entries(Ue).forEach(
|
|
4925
4925
|
([de, be]) => {
|
|
4926
4926
|
ue.has(de) && (v.current[de] = be);
|
|
4927
4927
|
}
|
|
@@ -4956,7 +4956,7 @@ function wo(e) {
|
|
|
4956
4956
|
Condition: { ExpressionTree: B.ExpressionTree },
|
|
4957
4957
|
Message: B.Message || `Validation failed for ${B.Name}`
|
|
4958
4958
|
})
|
|
4959
|
-
), W =
|
|
4959
|
+
), W = sa(
|
|
4960
4960
|
x,
|
|
4961
4961
|
d,
|
|
4962
4962
|
q
|
|
@@ -4981,12 +4981,12 @@ function wo(e) {
|
|
|
4981
4981
|
try {
|
|
4982
4982
|
if (!await pe())
|
|
4983
4983
|
throw new Error("Form validation failed");
|
|
4984
|
-
const B = R.getValues(), J =
|
|
4984
|
+
const B = R.getValues(), J = Ra(
|
|
4985
4985
|
B,
|
|
4986
4986
|
b.computedFields,
|
|
4987
4987
|
t,
|
|
4988
4988
|
me
|
|
4989
|
-
), se = await
|
|
4989
|
+
), se = await Oa(
|
|
4990
4990
|
r,
|
|
4991
4991
|
t,
|
|
4992
4992
|
J,
|
|
@@ -5018,14 +5018,14 @@ function wo(e) {
|
|
|
5018
5018
|
), Ne = E(
|
|
5019
5019
|
(d) => (b == null ? void 0 : b.requiredFields.includes(d)) || !1,
|
|
5020
5020
|
[b]
|
|
5021
|
-
),
|
|
5021
|
+
), qe = E(
|
|
5022
5022
|
(d) => (b == null ? void 0 : b.computedFields.includes(d)) || !1,
|
|
5023
5023
|
[b]
|
|
5024
5024
|
), _ = E(async () => {
|
|
5025
5025
|
await A();
|
|
5026
5026
|
}, [A]), oe = E(() => {
|
|
5027
5027
|
R.clearErrors(), te(null);
|
|
5028
|
-
}, [R]), Ce = U || t === "update" && Fe, Je = Ce || ne,
|
|
5028
|
+
}, [R]), Ce = U || t === "update" && Fe, Je = Ce || ne, Ke = Z || he, $e = !!(Ke || j), Xe = ce(
|
|
5029
5029
|
() => (b == null ? void 0 : b.computedFields) || [],
|
|
5030
5030
|
[b]
|
|
5031
5031
|
), Ze = ce(
|
|
@@ -5052,7 +5052,7 @@ function wo(e) {
|
|
|
5052
5052
|
for (const ue of B) {
|
|
5053
5053
|
const _e = b.rules.validation[ue];
|
|
5054
5054
|
if (_e) {
|
|
5055
|
-
const Pe =
|
|
5055
|
+
const Pe = Va(
|
|
5056
5056
|
h,
|
|
5057
5057
|
J,
|
|
5058
5058
|
[_e],
|
|
@@ -5103,7 +5103,7 @@ function wo(e) {
|
|
|
5103
5103
|
isLoadingRecord: Fe,
|
|
5104
5104
|
isLoading: Je,
|
|
5105
5105
|
// Error handling
|
|
5106
|
-
loadError:
|
|
5106
|
+
loadError: Ke,
|
|
5107
5107
|
submitError: j,
|
|
5108
5108
|
hasError: $e,
|
|
5109
5109
|
// Schema information
|
|
@@ -5116,7 +5116,7 @@ function wo(e) {
|
|
|
5116
5116
|
getFields: ye,
|
|
5117
5117
|
hasField: De,
|
|
5118
5118
|
isFieldRequired: Ne,
|
|
5119
|
-
isFieldComputed:
|
|
5119
|
+
isFieldComputed: qe,
|
|
5120
5120
|
// Operations
|
|
5121
5121
|
submit: P,
|
|
5122
5122
|
refreshSchema: _,
|
|
@@ -5125,7 +5125,7 @@ function wo(e) {
|
|
|
5125
5125
|
};
|
|
5126
5126
|
}
|
|
5127
5127
|
const Yr = 50, Qr = 5, Wr = 5;
|
|
5128
|
-
function
|
|
5128
|
+
function Pa({
|
|
5129
5129
|
onCardMove: e,
|
|
5130
5130
|
onError: r,
|
|
5131
5131
|
columns: t,
|
|
@@ -5401,7 +5401,7 @@ function vo(e) {
|
|
|
5401
5401
|
{ columnId: "ASC" },
|
|
5402
5402
|
{ position: "ASC" }
|
|
5403
5403
|
], G.query && (x.Search = G.query), x;
|
|
5404
|
-
}, [w.filterPayload, q, H, G.query]), k =
|
|
5404
|
+
}, [w.filterPayload, q, H, G.query]), k = Kt({
|
|
5405
5405
|
queries: r.map((m) => {
|
|
5406
5406
|
const C = v(m.id);
|
|
5407
5407
|
return {
|
|
@@ -5413,7 +5413,7 @@ function vo(e) {
|
|
|
5413
5413
|
throw d;
|
|
5414
5414
|
}
|
|
5415
5415
|
},
|
|
5416
|
-
placeholderData:
|
|
5416
|
+
placeholderData: Mt,
|
|
5417
5417
|
staleTime: 30 * 1e3
|
|
5418
5418
|
};
|
|
5419
5419
|
})
|
|
@@ -5519,14 +5519,14 @@ function vo(e) {
|
|
|
5519
5519
|
const Pe = {
|
|
5520
5520
|
...se,
|
|
5521
5521
|
Data: se.Data.filter((be) => be._id !== m)
|
|
5522
|
-
},
|
|
5522
|
+
}, Ue = {
|
|
5523
5523
|
..._e,
|
|
5524
5524
|
columnId: d,
|
|
5525
5525
|
position: h ?? ue.Data.length,
|
|
5526
5526
|
_modified_at: /* @__PURE__ */ new Date()
|
|
5527
5527
|
}, de = {
|
|
5528
5528
|
...ue,
|
|
5529
|
-
Data: [...ue.Data,
|
|
5529
|
+
Data: [...ue.Data, Ue].sort((be, er) => be.position - er.position)
|
|
5530
5530
|
};
|
|
5531
5531
|
l.setQueryData(B, Pe), l.setQueryData(J, de);
|
|
5532
5532
|
}
|
|
@@ -5608,7 +5608,7 @@ function vo(e) {
|
|
|
5608
5608
|
_created_at: /* @__PURE__ */ new Date(),
|
|
5609
5609
|
_modified_at: /* @__PURE__ */ new Date()
|
|
5610
5610
|
};
|
|
5611
|
-
}), [r, k]), P =
|
|
5611
|
+
}), [r, k]), P = Pa({
|
|
5612
5612
|
onCardMove: xe,
|
|
5613
5613
|
onError: j.current,
|
|
5614
5614
|
columns: pe,
|
|
@@ -5660,9 +5660,9 @@ function vo(e) {
|
|
|
5660
5660
|
b({ query: m });
|
|
5661
5661
|
}, []), De = E(() => {
|
|
5662
5662
|
b({ query: "" });
|
|
5663
|
-
}, []), Ne = (Z == null ? void 0 : Z.Count) || 0,
|
|
5663
|
+
}, []), Ne = (Z == null ? void 0 : Z.Count) || 0, qe = L || A, _ = K, oe = Fe.isPending || he.isPending || Se.isPending || R.isPending || ae.isPending, Ce = Q || me, Je = E(async () => {
|
|
5664
5664
|
await ee();
|
|
5665
|
-
}, [ee]),
|
|
5665
|
+
}, [ee]), Ke = E(async () => {
|
|
5666
5666
|
await l.invalidateQueries({
|
|
5667
5667
|
predicate: (m) => m.queryKey[0] === "kanban-cards" || m.queryKey[0] === "kanban-count"
|
|
5668
5668
|
});
|
|
@@ -5674,7 +5674,7 @@ function vo(e) {
|
|
|
5674
5674
|
columns: pe,
|
|
5675
5675
|
totalCards: Ne,
|
|
5676
5676
|
// Loading States
|
|
5677
|
-
isLoading:
|
|
5677
|
+
isLoading: qe,
|
|
5678
5678
|
isFetching: _,
|
|
5679
5679
|
isUpdating: oe,
|
|
5680
5680
|
// Error Handling
|
|
@@ -5747,7 +5747,7 @@ function vo(e) {
|
|
|
5747
5747
|
}, []),
|
|
5748
5748
|
// Utilities
|
|
5749
5749
|
refetch: Je,
|
|
5750
|
-
refresh:
|
|
5750
|
+
refresh: Ke
|
|
5751
5751
|
};
|
|
5752
5752
|
}
|
|
5753
5753
|
tt(null);
|
|
@@ -5762,7 +5762,7 @@ var Rr = { exports: {} }, cr = {};
|
|
|
5762
5762
|
* LICENSE file in the root directory of this source tree.
|
|
5763
5763
|
*/
|
|
5764
5764
|
var Jr;
|
|
5765
|
-
function
|
|
5765
|
+
function $a() {
|
|
5766
5766
|
if (Jr) return cr;
|
|
5767
5767
|
Jr = 1;
|
|
5768
5768
|
var e = rt, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
@@ -5786,7 +5786,7 @@ var ur = {};
|
|
|
5786
5786
|
* LICENSE file in the root directory of this source tree.
|
|
5787
5787
|
*/
|
|
5788
5788
|
var Xr;
|
|
5789
|
-
function
|
|
5789
|
+
function Ia() {
|
|
5790
5790
|
return Xr || (Xr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
5791
5791
|
var e = rt, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), G = Symbol.iterator, b = "@@iterator";
|
|
5792
5792
|
function H(o) {
|
|
@@ -6026,10 +6026,10 @@ function La() {
|
|
|
6026
6026
|
} finally {
|
|
6027
6027
|
ve = !1, pe.current = re, xe(), Error.prepareStackTrace = X;
|
|
6028
6028
|
}
|
|
6029
|
-
var tr = o ? o.displayName || o.name : "",
|
|
6030
|
-
return typeof o == "function" && ye.set(o,
|
|
6029
|
+
var tr = o ? o.displayName || o.name : "", Me = tr ? Oe(tr) : "";
|
|
6030
|
+
return typeof o == "function" && ye.set(o, Me), Me;
|
|
6031
6031
|
}
|
|
6032
|
-
function
|
|
6032
|
+
function qe(o, g, S) {
|
|
6033
6033
|
return Ne(o, !1);
|
|
6034
6034
|
}
|
|
6035
6035
|
function _(o) {
|
|
@@ -6052,7 +6052,7 @@ function La() {
|
|
|
6052
6052
|
if (typeof o == "object")
|
|
6053
6053
|
switch (o.$$typeof) {
|
|
6054
6054
|
case c:
|
|
6055
|
-
return
|
|
6055
|
+
return qe(o.render);
|
|
6056
6056
|
case D:
|
|
6057
6057
|
return oe(o.type, g, S);
|
|
6058
6058
|
case V: {
|
|
@@ -6065,13 +6065,13 @@ function La() {
|
|
|
6065
6065
|
}
|
|
6066
6066
|
return "";
|
|
6067
6067
|
}
|
|
6068
|
-
var Ce = Object.prototype.hasOwnProperty, Je = {},
|
|
6068
|
+
var Ce = Object.prototype.hasOwnProperty, Je = {}, Ke = q.ReactDebugCurrentFrame;
|
|
6069
6069
|
function $e(o) {
|
|
6070
6070
|
if (o) {
|
|
6071
6071
|
var g = o._owner, S = oe(o.type, o._source, g ? g.type : null);
|
|
6072
|
-
|
|
6072
|
+
Ke.setExtraStackFrame(S);
|
|
6073
6073
|
} else
|
|
6074
|
-
|
|
6074
|
+
Ke.setExtraStackFrame(null);
|
|
6075
6075
|
}
|
|
6076
6076
|
function Xe(o, g, S, I, X) {
|
|
6077
6077
|
{
|
|
@@ -6141,7 +6141,7 @@ function La() {
|
|
|
6141
6141
|
function Pe(o, g) {
|
|
6142
6142
|
typeof o.ref == "string" && W.current;
|
|
6143
6143
|
}
|
|
6144
|
-
function
|
|
6144
|
+
function Ue(o, g) {
|
|
6145
6145
|
{
|
|
6146
6146
|
var S = function() {
|
|
6147
6147
|
J || (J = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
|
|
@@ -6205,7 +6205,7 @@ function La() {
|
|
|
6205
6205
|
}
|
|
6206
6206
|
if (M || Ee) {
|
|
6207
6207
|
var le = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
6208
|
-
M &&
|
|
6208
|
+
M && Ue(Y, le), Ee && de(Y, le);
|
|
6209
6209
|
}
|
|
6210
6210
|
return be(o, M, Ee, X, I, W.current, Y);
|
|
6211
6211
|
}
|
|
@@ -6235,11 +6235,11 @@ Check the render method of \`` + o + "`.";
|
|
|
6235
6235
|
return "";
|
|
6236
6236
|
}
|
|
6237
6237
|
}
|
|
6238
|
-
function
|
|
6238
|
+
function Ft(o) {
|
|
6239
6239
|
return "";
|
|
6240
6240
|
}
|
|
6241
6241
|
var Vr = {};
|
|
6242
|
-
function
|
|
6242
|
+
function Dt(o) {
|
|
6243
6243
|
{
|
|
6244
6244
|
var g = _r();
|
|
6245
6245
|
if (!g) {
|
|
@@ -6256,7 +6256,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
6256
6256
|
if (!o._store || o._store.validated || o.key != null)
|
|
6257
6257
|
return;
|
|
6258
6258
|
o._store.validated = !0;
|
|
6259
|
-
var S =
|
|
6259
|
+
var S = Dt(g);
|
|
6260
6260
|
if (Vr[S])
|
|
6261
6261
|
return;
|
|
6262
6262
|
Vr[S] = !0;
|
|
@@ -6283,7 +6283,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
6283
6283
|
}
|
|
6284
6284
|
}
|
|
6285
6285
|
}
|
|
6286
|
-
function
|
|
6286
|
+
function _t(o) {
|
|
6287
6287
|
{
|
|
6288
6288
|
var g = o.type;
|
|
6289
6289
|
if (g == null || typeof g == "string")
|
|
@@ -6308,7 +6308,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
6308
6308
|
typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
6309
6309
|
}
|
|
6310
6310
|
}
|
|
6311
|
-
function
|
|
6311
|
+
function Vt(o) {
|
|
6312
6312
|
{
|
|
6313
6313
|
for (var g = Object.keys(o.props), S = 0; S < g.length; S++) {
|
|
6314
6314
|
var I = g[S];
|
|
@@ -6327,7 +6327,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
6327
6327
|
if (!Y) {
|
|
6328
6328
|
var M = "";
|
|
6329
6329
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
6330
|
-
var Ee =
|
|
6330
|
+
var Ee = Ft();
|
|
6331
6331
|
Ee ? M += Ee : M += _r();
|
|
6332
6332
|
var ie;
|
|
6333
6333
|
o === null ? ie = "null" : m(o) ? ie = "array" : o !== void 0 && o.$$typeof === r ? (ie = "<" + (K(o.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof o, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, M);
|
|
@@ -6349,125 +6349,125 @@ Check the top-level render call using <` + S + ">.");
|
|
|
6349
6349
|
$r(Ve, o);
|
|
6350
6350
|
}
|
|
6351
6351
|
if (Ce.call(g, "key")) {
|
|
6352
|
-
var
|
|
6353
|
-
return
|
|
6352
|
+
var Me = K(o), ke = Object.keys(g).filter(function(qt) {
|
|
6353
|
+
return qt !== "key";
|
|
6354
6354
|
}), Er = ke.length > 0 ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
6355
|
-
if (!Ir[
|
|
6356
|
-
var
|
|
6355
|
+
if (!Ir[Me + Er]) {
|
|
6356
|
+
var jt = ke.length > 0 ? "{" + ke.join(": ..., ") + ": ...}" : "{}";
|
|
6357
6357
|
$(`A props object containing a "key" prop is being spread into JSX:
|
|
6358
6358
|
let props = %s;
|
|
6359
6359
|
<%s {...props} />
|
|
6360
6360
|
React keys must be passed directly to JSX without using spread:
|
|
6361
6361
|
let props = %s;
|
|
6362
|
-
<%s key={someKey} {...props} />`, Er,
|
|
6362
|
+
<%s key={someKey} {...props} />`, Er, Me, jt, Me), Ir[Me + Er] = !0;
|
|
6363
6363
|
}
|
|
6364
6364
|
}
|
|
6365
|
-
return o === n ?
|
|
6365
|
+
return o === n ? Vt(le) : _t(le), le;
|
|
6366
6366
|
}
|
|
6367
6367
|
}
|
|
6368
|
-
function
|
|
6368
|
+
function Pt(o, g, S) {
|
|
6369
6369
|
return Lr(o, g, S, !0);
|
|
6370
6370
|
}
|
|
6371
|
-
function
|
|
6371
|
+
function $t(o, g, S) {
|
|
6372
6372
|
return Lr(o, g, S, !1);
|
|
6373
6373
|
}
|
|
6374
|
-
var
|
|
6375
|
-
ur.Fragment = n, ur.jsx =
|
|
6374
|
+
var It = $t, Lt = Pt;
|
|
6375
|
+
ur.Fragment = n, ur.jsx = It, ur.jsxs = Lt;
|
|
6376
6376
|
}()), ur;
|
|
6377
6377
|
}
|
|
6378
|
-
process.env.NODE_ENV === "production" ? Rr.exports =
|
|
6378
|
+
process.env.NODE_ENV === "production" ? Rr.exports = $a() : Rr.exports = Ia();
|
|
6379
6379
|
var Ae = Rr.exports;
|
|
6380
|
-
const
|
|
6380
|
+
const La = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6381
6381
|
"div",
|
|
6382
6382
|
{
|
|
6383
6383
|
ref: t,
|
|
6384
|
-
className:
|
|
6384
|
+
className: je(
|
|
6385
6385
|
"flex h-full flex-grow items-start gap-x-4 overflow-x-auto py-2",
|
|
6386
6386
|
e
|
|
6387
6387
|
),
|
|
6388
6388
|
...r
|
|
6389
6389
|
}
|
|
6390
6390
|
));
|
|
6391
|
-
|
|
6392
|
-
const
|
|
6391
|
+
La.displayName = "Kanban";
|
|
6392
|
+
const ja = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6393
6393
|
"div",
|
|
6394
6394
|
{
|
|
6395
6395
|
ref: t,
|
|
6396
|
-
className:
|
|
6396
|
+
className: je(
|
|
6397
6397
|
"flex h-full min-w-[300px] flex-col rounded-lg border bg-gray-50 p-3",
|
|
6398
6398
|
e
|
|
6399
6399
|
),
|
|
6400
6400
|
...r
|
|
6401
6401
|
}
|
|
6402
6402
|
));
|
|
6403
|
-
|
|
6404
|
-
const
|
|
6403
|
+
ja.displayName = "KanbanColumn";
|
|
6404
|
+
const qa = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6405
6405
|
"div",
|
|
6406
6406
|
{
|
|
6407
6407
|
ref: t,
|
|
6408
|
-
className:
|
|
6408
|
+
className: je("mb-3 flex items-center justify-between", e),
|
|
6409
6409
|
...r
|
|
6410
6410
|
}
|
|
6411
6411
|
));
|
|
6412
|
-
|
|
6413
|
-
const
|
|
6412
|
+
qa.displayName = "KanbanColumnHeader";
|
|
6413
|
+
const Ua = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6414
6414
|
"h3",
|
|
6415
6415
|
{
|
|
6416
6416
|
ref: t,
|
|
6417
|
-
className:
|
|
6417
|
+
className: je("text-sm font-semibold text-gray-700", e),
|
|
6418
6418
|
...r
|
|
6419
6419
|
}
|
|
6420
6420
|
));
|
|
6421
|
-
|
|
6422
|
-
const
|
|
6421
|
+
Ua.displayName = "KanbanColumnTitle";
|
|
6422
|
+
const Ba = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6423
6423
|
"div",
|
|
6424
6424
|
{
|
|
6425
6425
|
ref: t,
|
|
6426
|
-
className:
|
|
6426
|
+
className: je("flex-1 space-y-2 overflow-y-auto", e),
|
|
6427
6427
|
...r
|
|
6428
6428
|
}
|
|
6429
6429
|
));
|
|
6430
|
-
|
|
6431
|
-
const
|
|
6430
|
+
Ba.displayName = "KanbanColumnContent";
|
|
6431
|
+
const za = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6432
6432
|
"div",
|
|
6433
6433
|
{
|
|
6434
6434
|
ref: t,
|
|
6435
|
-
className:
|
|
6435
|
+
className: je(
|
|
6436
6436
|
"rounded-lg border border-gray-200 bg-white p-3 shadow-sm hover:shadow-md transition-shadow cursor-move",
|
|
6437
6437
|
e
|
|
6438
6438
|
),
|
|
6439
6439
|
...r
|
|
6440
6440
|
}
|
|
6441
6441
|
));
|
|
6442
|
-
|
|
6443
|
-
const
|
|
6442
|
+
za.displayName = "KanbanCard";
|
|
6443
|
+
const Ka = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6444
6444
|
"div",
|
|
6445
6445
|
{
|
|
6446
6446
|
ref: t,
|
|
6447
|
-
className:
|
|
6447
|
+
className: je("font-medium text-gray-900 mb-1", e),
|
|
6448
6448
|
...r
|
|
6449
6449
|
}
|
|
6450
6450
|
));
|
|
6451
|
-
|
|
6452
|
-
const
|
|
6451
|
+
Ka.displayName = "KanbanCardTitle";
|
|
6452
|
+
const Ma = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6453
6453
|
"div",
|
|
6454
6454
|
{
|
|
6455
6455
|
ref: t,
|
|
6456
|
-
className:
|
|
6456
|
+
className: je("text-sm text-gray-600", e),
|
|
6457
6457
|
...r
|
|
6458
6458
|
}
|
|
6459
6459
|
));
|
|
6460
|
-
|
|
6461
|
-
const
|
|
6460
|
+
Ma.displayName = "KanbanCardDescription";
|
|
6461
|
+
const Ga = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
|
|
6462
6462
|
"div",
|
|
6463
6463
|
{
|
|
6464
6464
|
ref: t,
|
|
6465
|
-
className:
|
|
6465
|
+
className: je("mt-3 pt-3 border-t border-gray-200", e),
|
|
6466
6466
|
...r
|
|
6467
6467
|
}
|
|
6468
6468
|
));
|
|
6469
|
-
|
|
6470
|
-
const
|
|
6469
|
+
Ga.displayName = "KanbanColumnFooter";
|
|
6470
|
+
const Ha = {
|
|
6471
6471
|
sessionEndpoint: "/api/id",
|
|
6472
6472
|
providers: {
|
|
6473
6473
|
google: {
|
|
@@ -6476,50 +6476,44 @@ const Tt = {
|
|
|
6476
6476
|
}
|
|
6477
6477
|
},
|
|
6478
6478
|
defaultProvider: "google",
|
|
6479
|
-
autoRedirect: !
|
|
6479
|
+
autoRedirect: !1,
|
|
6480
6480
|
sessionCheckInterval: 0,
|
|
6481
6481
|
retry: {
|
|
6482
6482
|
count: 3,
|
|
6483
6483
|
delay: 1e3
|
|
6484
6484
|
},
|
|
6485
6485
|
staleTime: 5 * 60 * 1e3,
|
|
6486
|
-
refetchOnWindowFocus: !
|
|
6486
|
+
refetchOnWindowFocus: !1,
|
|
6487
6487
|
refetchOnReconnect: !0
|
|
6488
6488
|
};
|
|
6489
|
-
let
|
|
6489
|
+
let Qe = { ...Ha };
|
|
6490
6490
|
function Ya(e) {
|
|
6491
|
-
|
|
6492
|
-
...
|
|
6491
|
+
Qe = {
|
|
6492
|
+
...Qe,
|
|
6493
6493
|
...e,
|
|
6494
6494
|
providers: {
|
|
6495
|
-
...
|
|
6495
|
+
...Qe.providers,
|
|
6496
6496
|
...e.providers
|
|
6497
6497
|
},
|
|
6498
6498
|
retry: {
|
|
6499
|
-
...
|
|
6499
|
+
...Qe.retry,
|
|
6500
6500
|
...e.retry
|
|
6501
6501
|
}
|
|
6502
6502
|
};
|
|
6503
6503
|
}
|
|
6504
|
-
function Co(e, r) {
|
|
6505
|
-
Le.providers[e] = r;
|
|
6506
|
-
}
|
|
6507
6504
|
function br() {
|
|
6508
|
-
return { ...
|
|
6505
|
+
return { ...Qe };
|
|
6509
6506
|
}
|
|
6510
6507
|
function Dr() {
|
|
6511
|
-
return
|
|
6508
|
+
return Qe.baseUrl || Ar() || (typeof window < "u" ? window.location.origin : "");
|
|
6512
6509
|
}
|
|
6513
|
-
function
|
|
6514
|
-
return
|
|
6515
|
-
}
|
|
6516
|
-
function Eo() {
|
|
6517
|
-
Le = { ...Tt };
|
|
6510
|
+
function Tt(e) {
|
|
6511
|
+
return Qe.providers[e];
|
|
6518
6512
|
}
|
|
6519
6513
|
class Tr extends Error {
|
|
6520
6514
|
constructor(t, n) {
|
|
6521
6515
|
super(t);
|
|
6522
|
-
|
|
6516
|
+
Ge(this, "statusCode");
|
|
6523
6517
|
this.name = "AuthenticationError", this.statusCode = n;
|
|
6524
6518
|
}
|
|
6525
6519
|
}
|
|
@@ -6543,7 +6537,7 @@ function Zr(e, r) {
|
|
|
6543
6537
|
throw new Error(
|
|
6544
6538
|
'Auth base URL is not configured. Call setApiBaseUrl("https://...") or configureAuth({ baseUrl: "https://..." }) first.'
|
|
6545
6539
|
);
|
|
6546
|
-
const a = e || t.defaultProvider, s =
|
|
6540
|
+
const a = e || t.defaultProvider, s = Tt(a);
|
|
6547
6541
|
if (!s) {
|
|
6548
6542
|
const f = Object.keys(t.providers || {}).join(", ") || "none";
|
|
6549
6543
|
throw new Error(
|
|
@@ -6571,7 +6565,7 @@ function Zr(e, r) {
|
|
|
6571
6565
|
});
|
|
6572
6566
|
}
|
|
6573
6567
|
async function Wa(e) {
|
|
6574
|
-
const r = br(), t = Dr(), n = yr(), a =
|
|
6568
|
+
const r = br(), t = Dr(), n = yr(), a = Tt(r.defaultProvider), s = a == null ? void 0 : a.logoutPath;
|
|
6575
6569
|
if (s && (e == null ? void 0 : e.callLogoutEndpoint) !== !1)
|
|
6576
6570
|
try {
|
|
6577
6571
|
await fetch(`${t}${s}`, {
|
|
@@ -6584,8 +6578,8 @@ async function Wa(e) {
|
|
|
6584
6578
|
}
|
|
6585
6579
|
e != null && e.redirectUrl ? window.location.href = e.redirectUrl : r.loginRedirectUrl && (window.location.href = r.loginRedirectUrl);
|
|
6586
6580
|
}
|
|
6587
|
-
const
|
|
6588
|
-
function
|
|
6581
|
+
const At = tt(null), et = ["auth", "session"];
|
|
6582
|
+
function Co({
|
|
6589
6583
|
children: e,
|
|
6590
6584
|
config: r,
|
|
6591
6585
|
onAuthChange: t,
|
|
@@ -6687,15 +6681,15 @@ function So({
|
|
|
6687
6681
|
Q
|
|
6688
6682
|
]
|
|
6689
6683
|
);
|
|
6690
|
-
return q === "loading" && a ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: a }) : q === "unauthenticated" && !u.autoRedirect && s ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: s }) : /* @__PURE__ */ Ae.jsx(
|
|
6684
|
+
return q === "loading" && a ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: a }) : q === "unauthenticated" && !u.autoRedirect && s ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: s }) : /* @__PURE__ */ Ae.jsx(At.Provider, { value: ee, children: e });
|
|
6691
6685
|
}
|
|
6692
6686
|
function Ja() {
|
|
6693
|
-
const e =
|
|
6687
|
+
const e = zt(At);
|
|
6694
6688
|
if (!e)
|
|
6695
6689
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
6696
6690
|
return e;
|
|
6697
6691
|
}
|
|
6698
|
-
function
|
|
6692
|
+
function Eo() {
|
|
6699
6693
|
const e = Ja();
|
|
6700
6694
|
return ce(
|
|
6701
6695
|
() => ({
|
|
@@ -6731,66 +6725,58 @@ function xo() {
|
|
|
6731
6725
|
);
|
|
6732
6726
|
}
|
|
6733
6727
|
export {
|
|
6734
|
-
|
|
6728
|
+
Co as AuthProvider,
|
|
6735
6729
|
Tr as AuthenticationError,
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6730
|
+
La as Kanban,
|
|
6731
|
+
za as KanbanCard,
|
|
6732
|
+
Ma as KanbanCardDescription,
|
|
6733
|
+
Ka as KanbanCardTitle,
|
|
6734
|
+
ja as KanbanColumn,
|
|
6735
|
+
Ba as KanbanColumnContent,
|
|
6736
|
+
Ga as KanbanColumnFooter,
|
|
6737
|
+
qa as KanbanColumnHeader,
|
|
6738
|
+
Ua as KanbanColumnTitle,
|
|
6745
6739
|
Te as api,
|
|
6746
6740
|
yo as areFilterPayloadsEqual,
|
|
6747
|
-
|
|
6741
|
+
ea as buildFilterPayload,
|
|
6748
6742
|
po as buildFilterPayloadFromState,
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
Ya as configureAuth,
|
|
6743
|
+
ra as cloneFilterPayload,
|
|
6744
|
+
je as cn,
|
|
6752
6745
|
mo as createFieldDefinitionsFromSample,
|
|
6753
6746
|
io as decodeDate,
|
|
6754
6747
|
oo as decodeDatetime,
|
|
6755
6748
|
so as encodeDate,
|
|
6756
6749
|
ao as encodeDatetime,
|
|
6757
|
-
Qa as fetchSession,
|
|
6758
6750
|
ho as filterPayloadToString,
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6751
|
+
Zt as formatArray,
|
|
6752
|
+
en as formatBoolean,
|
|
6753
|
+
Yt as formatCurrency,
|
|
6754
|
+
Qt as formatDate,
|
|
6755
|
+
Wt as formatDateTime,
|
|
6764
6756
|
fo as formatFieldValue,
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6757
|
+
Xt as formatJSON,
|
|
6758
|
+
Jt as formatNumber,
|
|
6759
|
+
rn as formatTextArea,
|
|
6768
6760
|
Ar as getApiBaseUrl,
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
Yt as getBdoSchema,
|
|
6772
|
-
Qe as getDefaultFieldDefinition,
|
|
6761
|
+
Ht as getBdoSchema,
|
|
6762
|
+
Ye as getDefaultFieldDefinition,
|
|
6773
6763
|
yr as getDefaultHeaders,
|
|
6774
|
-
Zr as initiateLogin,
|
|
6775
6764
|
lo as listMetadata,
|
|
6776
6765
|
go as mergeFilterPayloads,
|
|
6777
6766
|
co as parseCurrency,
|
|
6778
|
-
Wa as performLogout,
|
|
6779
|
-
Eo as resetAuthConfig,
|
|
6780
6767
|
to as setApiBaseUrl,
|
|
6781
|
-
Co as setAuthProvider,
|
|
6782
6768
|
no as setDefaultHeaders,
|
|
6783
6769
|
uo as truncateString,
|
|
6784
|
-
|
|
6770
|
+
Eo as useAuth,
|
|
6785
6771
|
vt as useFilter,
|
|
6786
6772
|
wo as useForm,
|
|
6787
6773
|
vo as useKanban,
|
|
6788
6774
|
bo as useTable,
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6775
|
+
Xn as validateBooleanValue,
|
|
6776
|
+
Wn as validateCurrencyValue,
|
|
6777
|
+
Qn as validateDateValue,
|
|
6792
6778
|
Et as validateFilterPayload,
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6779
|
+
Yn as validateNumberValue,
|
|
6780
|
+
Zn as validateSelectValue,
|
|
6781
|
+
Jn as validateStringValue
|
|
6796
6782
|
};
|