treege 3.0.0-beta.62 → 3.0.0-beta.63
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 +88 -37
- package/dist/{DefaultInputs-DamDWb5R.js → DefaultInputs-nX-CVK2i.js} +415 -390
- package/dist/{ThemeContext-cGSTk24y.js → ThemeContext-nopV_oRU.js} +184 -168
- package/dist/{editor-K1jjfc5n.js → editor-Bag5U_S5.js} +237 -237
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +2 -0
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +2 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +4 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +4 -1
- package/dist/renderer/types/renderer.d.ts +50 -4
- package/dist/renderer/utils/form.d.ts +16 -0
- package/dist/renderer-native.js +1014 -1002
- package/dist/renderer.js +3 -3
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, F as i,
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, N as o, O as s, T as c, b as l, d as u, g as d, i as f, j as p, k as m, r as h, s as g, t as _, w as v, x as y } from "./ThemeContext-nopV_oRU.js";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { createContext as x, forwardRef as S, useCallback as C, useContext as w, useEffect as T, useMemo as ee, useRef as E, useState as D } from "react";
|
|
4
4
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
5
|
-
import { Check as te, CheckIcon as
|
|
5
|
+
import { Check as te, CheckIcon as j, ChevronDownIcon as M, ChevronLeftIcon as N, ChevronRightIcon as P, ChevronUpIcon as ne, ChevronsUpDown as re, CircleIcon as F, Loader2 as I, MapPin as L, SearchIcon as R, XIcon as ie } from "lucide-react";
|
|
6
6
|
import { Slot as ae } from "@radix-ui/react-slot";
|
|
7
|
-
import { cva as
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { extendTailwindMerge as
|
|
7
|
+
import { cva as oe } from "class-variance-authority";
|
|
8
|
+
import { clsx as z } from "clsx";
|
|
9
|
+
import { extendTailwindMerge as B } from "tailwind-merge";
|
|
10
10
|
import * as se from "@radix-ui/react-checkbox";
|
|
11
11
|
import * as ce from "@radix-ui/react-label";
|
|
12
12
|
import * as V from "@radix-ui/react-popover";
|
|
@@ -19,13 +19,13 @@ import { DayPicker as ue, getDefaultClassNames as de } from "react-day-picker";
|
|
|
19
19
|
import * as K from "@radix-ui/react-radio-group";
|
|
20
20
|
import * as fe from "@radix-ui/react-switch";
|
|
21
21
|
//#region src/shared/lib/utils.ts
|
|
22
|
-
var pe =
|
|
22
|
+
var pe = B({ prefix: "tg" });
|
|
23
23
|
function q(...e) {
|
|
24
|
-
return pe(
|
|
24
|
+
return pe(z(e));
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/shared/components/ui/button.tsx
|
|
28
|
-
var me =
|
|
28
|
+
var me = oe("tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:text-sm tg:font-medium tg:transition-all tg:disabled:pointer-events-none tg:disabled:opacity-50 tg:[&_svg]:pointer-events-none tg:[&_svg:not([class*='size-'])]:size-4 tg:shrink-0 tg:[&_svg]:shrink-0 tg:outline-none tg:focus-visible:border-ring tg:focus-visible:ring-ring/50 tg:focus-visible:ring-[3px] tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:aria-invalid:border-destructive", {
|
|
29
29
|
defaultVariants: {
|
|
30
30
|
size: "default",
|
|
31
31
|
variant: "default"
|
|
@@ -72,7 +72,7 @@ function ge({ className: e, ...t }) {
|
|
|
72
72
|
children: /* @__PURE__ */ k(se.Indicator, {
|
|
73
73
|
"data-slot": "checkbox-indicator",
|
|
74
74
|
className: "tg:grid tg:place-content-center tg:text-current tg:transition-none",
|
|
75
|
-
children: /* @__PURE__ */ k(
|
|
75
|
+
children: /* @__PURE__ */ k(j, { className: "tg:size-3.5" })
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -164,7 +164,7 @@ var Se = ({ ...e }) => /* @__PURE__ */ k(H.Root, {
|
|
|
164
164
|
...r,
|
|
165
165
|
children: [n, /* @__PURE__ */ k(H.Icon, {
|
|
166
166
|
asChild: !0,
|
|
167
|
-
children: /* @__PURE__ */ k(
|
|
167
|
+
children: /* @__PURE__ */ k(M, { className: "tg:size-4 tg:opacity-50" })
|
|
168
168
|
})]
|
|
169
169
|
}), Ee = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ k(H.Portal, {
|
|
170
170
|
container: _e() ?? void 0,
|
|
@@ -196,7 +196,7 @@ var Se = ({ ...e }) => /* @__PURE__ */ k(H.Root, {
|
|
|
196
196
|
...n,
|
|
197
197
|
children: [/* @__PURE__ */ k("span", {
|
|
198
198
|
className: "tg:absolute tg:right-2 tg:flex tg:size-3.5 tg:items-center tg:justify-center",
|
|
199
|
-
children: /* @__PURE__ */ k(H.ItemIndicator, { children: /* @__PURE__ */ k(
|
|
199
|
+
children: /* @__PURE__ */ k(H.ItemIndicator, { children: /* @__PURE__ */ k(j, { className: "tg:size-4" }) })
|
|
200
200
|
}), /* @__PURE__ */ k(H.ItemText, { children: t })]
|
|
201
201
|
}), ke = ({ className: e, ...t }) => /* @__PURE__ */ k(H.Separator, {
|
|
202
202
|
"data-slot": "select-separator",
|
|
@@ -206,12 +206,12 @@ var Se = ({ ...e }) => /* @__PURE__ */ k(H.Root, {
|
|
|
206
206
|
"data-slot": "select-scroll-up-button",
|
|
207
207
|
className: q("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
|
|
208
208
|
...t,
|
|
209
|
-
children: /* @__PURE__ */ k(
|
|
209
|
+
children: /* @__PURE__ */ k(ne, { className: "tg:size-4" })
|
|
210
210
|
}), je = ({ className: e, ...t }) => /* @__PURE__ */ k(H.ScrollDownButton, {
|
|
211
211
|
"data-slot": "select-scroll-down-button",
|
|
212
212
|
className: q("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
|
|
213
213
|
...t,
|
|
214
|
-
children: /* @__PURE__ */ k(
|
|
214
|
+
children: /* @__PURE__ */ k(M, { className: "tg:size-4" })
|
|
215
215
|
});
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/shared/components/ui/tooltip.tsx
|
|
@@ -415,23 +415,23 @@ var Qe = async (e, t) => {
|
|
|
415
415
|
value: e.description
|
|
416
416
|
})));
|
|
417
417
|
});
|
|
418
|
-
}), et = (
|
|
419
|
-
let [
|
|
420
|
-
h(e.value),
|
|
418
|
+
}), et = (e, t) => {
|
|
419
|
+
let [n, r] = D(""), [i, o] = D([]), [s, c] = D(!1), { id: l, name: u, value: d, placeholder: f } = e, { node: m, setValue: h, error: g, label: _, helperText: v } = t, { googleApiKey: y, language: b } = a(), x = p(), S = C((e) => {
|
|
420
|
+
h(e.value), r(e.value), c(!1);
|
|
421
421
|
}, [h]), w = C((e) => {
|
|
422
|
-
h(e),
|
|
422
|
+
h(e), r(e), e.length >= 3 && c(!0);
|
|
423
423
|
}, [h]);
|
|
424
424
|
return T(() => {
|
|
425
|
-
if (!
|
|
426
|
-
|
|
425
|
+
if (!n || n.trim().length < 3) {
|
|
426
|
+
o([]);
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
429
|
let e = setTimeout(async () => {
|
|
430
|
-
|
|
430
|
+
o(y ? await $e(n) : await Qe(n, b));
|
|
431
431
|
}, 300);
|
|
432
432
|
return () => clearTimeout(e);
|
|
433
433
|
}, [
|
|
434
|
-
|
|
434
|
+
n,
|
|
435
435
|
y,
|
|
436
436
|
b
|
|
437
437
|
]), /* @__PURE__ */ A(O, { children: [y && /* @__PURE__ */ k("script", {
|
|
@@ -441,7 +441,7 @@ var Qe = async (e, t) => {
|
|
|
441
441
|
className: "tg:mb-4",
|
|
442
442
|
children: [
|
|
443
443
|
/* @__PURE__ */ A(Q, {
|
|
444
|
-
htmlFor:
|
|
444
|
+
htmlFor: l,
|
|
445
445
|
children: [_ || m.data.name, m.data.required && /* @__PURE__ */ k("span", {
|
|
446
446
|
className: "tg:text-red-500",
|
|
447
447
|
children: "*"
|
|
@@ -452,21 +452,21 @@ var Qe = async (e, t) => {
|
|
|
452
452
|
children: [
|
|
453
453
|
/* @__PURE__ */ k(Z, {
|
|
454
454
|
type: "text",
|
|
455
|
-
id:
|
|
456
|
-
name:
|
|
457
|
-
value:
|
|
455
|
+
id: l,
|
|
456
|
+
name: u,
|
|
457
|
+
value: d || "",
|
|
458
458
|
onChange: (e) => w(e.target.value),
|
|
459
459
|
onFocus: () => {
|
|
460
|
-
|
|
460
|
+
i.length > 0 && c(!0);
|
|
461
461
|
},
|
|
462
|
-
placeholder:
|
|
462
|
+
placeholder: f || x("renderer.defaultAddressInput.enterAddress"),
|
|
463
463
|
className: "tg:pr-10",
|
|
464
464
|
autoComplete: "off"
|
|
465
465
|
}),
|
|
466
466
|
/* @__PURE__ */ k(L, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-3 tg:h-4 tg:w-4 tg:text-muted-foreground" }),
|
|
467
|
-
|
|
467
|
+
s && /* @__PURE__ */ k("div", {
|
|
468
468
|
className: "tg:absolute tg:z-50 tg:mt-1 tg:w-full tg:rounded-md tg:border tg:bg-popover tg:shadow-md",
|
|
469
|
-
children: /* @__PURE__ */ k(Ke, { children: /* @__PURE__ */ A(Je, { children: [/* @__PURE__ */ k(Ye, { children: x("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ k(Xe, { children:
|
|
469
|
+
children: /* @__PURE__ */ k(Ke, { children: /* @__PURE__ */ A(Je, { children: [/* @__PURE__ */ k(Ye, { children: x("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ k(Xe, { children: i.map((e, t) => /* @__PURE__ */ A(Ze, {
|
|
470
470
|
value: e.value,
|
|
471
471
|
onSelect: () => S(e),
|
|
472
472
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -479,12 +479,12 @@ var Qe = async (e, t) => {
|
|
|
479
479
|
v && !g && /* @__PURE__ */ k(Y, { children: v })
|
|
480
480
|
]
|
|
481
481
|
})] });
|
|
482
|
-
}, tt = ({ missing:
|
|
482
|
+
}, tt = ({ missing: e }) => /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("p", {
|
|
483
483
|
className: "tg:font-medium",
|
|
484
|
-
children:
|
|
484
|
+
children: p()("renderer.dependencyHint.title")
|
|
485
485
|
}), /* @__PURE__ */ k("ul", {
|
|
486
486
|
className: "tg:mt-1 tg:list-disc tg:pl-4",
|
|
487
|
-
children:
|
|
487
|
+
children: e.map((e) => /* @__PURE__ */ k("li", { children: e.label }, e.id))
|
|
488
488
|
})] }), nt = ({ missing: e, children: t }) => e.length === 0 ? /* @__PURE__ */ k(O, { children: t }) : /* @__PURE__ */ k(Me, { children: /* @__PURE__ */ A(Ne, { children: [/* @__PURE__ */ k(Pe, {
|
|
489
489
|
asChild: !0,
|
|
490
490
|
children: /* @__PURE__ */ k("div", {
|
|
@@ -495,7 +495,7 @@ var Qe = async (e, t) => {
|
|
|
495
495
|
className: "tg:text-muted-foreground tg:text-sm",
|
|
496
496
|
children: /* @__PURE__ */ k(tt, { missing: e })
|
|
497
497
|
});
|
|
498
|
-
|
|
498
|
+
oe("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg:border-transparent tg:text-sm tg:outline-none tg:transition-colors tg:duration-100 tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:[a]:transition-colors tg:[a]:hover:bg-accent/50", {
|
|
499
499
|
defaultVariants: {
|
|
500
500
|
size: "default",
|
|
501
501
|
variant: "default"
|
|
@@ -512,7 +512,7 @@ z("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
|
-
var it =
|
|
515
|
+
var it = oe("tg:flex tg:shrink-0 tg:items-center tg:justify-center tg:gap-2 tg:group-has-[[data-slot=item-description]]/item:translate-y-0.5 tg:group-has-[[data-slot=item-description]]/item:self-start tg:[&_svg]:pointer-events-none", {
|
|
516
516
|
defaultVariants: { variant: "default" },
|
|
517
517
|
variants: { variant: {
|
|
518
518
|
default: "tg:bg-transparent",
|
|
@@ -569,125 +569,125 @@ var lt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(O, { chil
|
|
|
569
569
|
className: "tg:line-clamp-1",
|
|
570
570
|
children: t
|
|
571
571
|
})]
|
|
572
|
-
})] }), ut = /\{\{([\w-]+)}}/g, dt = (
|
|
573
|
-
let [
|
|
572
|
+
})] }), ut = /\{\{([\w-]+)}}/g, dt = (t) => {
|
|
573
|
+
let [i, o] = D({
|
|
574
574
|
error: null,
|
|
575
575
|
fetched: null,
|
|
576
576
|
isLoading: !1
|
|
577
|
-
}), { baseUrl: c, formValues:
|
|
578
|
-
if (!(
|
|
579
|
-
let t =
|
|
577
|
+
}), { baseUrl: c, formValues: l, headers: u } = a(), d = t.data.optionsSource, f = t.data.options, p = ee(() => {
|
|
578
|
+
if (!(d?.url && d.mapping?.valueField && d.mapping?.labelField) || !Array.from(d.url.matchAll(ut), (e) => e[1]).every((e) => {
|
|
579
|
+
let t = l[e];
|
|
580
580
|
return t != null && t !== "";
|
|
581
581
|
})) return null;
|
|
582
|
-
let
|
|
583
|
-
body:
|
|
582
|
+
let t = d.method ?? "GET", r = {
|
|
583
|
+
body: d.body && [
|
|
584
584
|
"POST",
|
|
585
585
|
"PUT",
|
|
586
586
|
"PATCH"
|
|
587
|
-
].includes(
|
|
588
|
-
headers:
|
|
589
|
-
mapping:
|
|
590
|
-
method:
|
|
591
|
-
queryParams:
|
|
592
|
-
responsePath:
|
|
593
|
-
url:
|
|
587
|
+
].includes(t) ? s(d.body, l, { json: !0 }) : void 0,
|
|
588
|
+
headers: n(m(u, l), m(d.headers, l)),
|
|
589
|
+
mapping: d.mapping,
|
|
590
|
+
method: t,
|
|
591
|
+
queryParams: m(d.queryParams, l) ?? {},
|
|
592
|
+
responsePath: d.responsePath,
|
|
593
|
+
url: e(s(d.url, l, { encode: !0 }), c)
|
|
594
594
|
};
|
|
595
|
-
return JSON.stringify(
|
|
595
|
+
return JSON.stringify(r);
|
|
596
596
|
}, [
|
|
597
597
|
c,
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
598
|
+
d,
|
|
599
|
+
l,
|
|
600
|
+
u
|
|
601
601
|
]);
|
|
602
602
|
T(() => {
|
|
603
|
-
if (!
|
|
604
|
-
|
|
603
|
+
if (!p) {
|
|
604
|
+
o({
|
|
605
605
|
error: null,
|
|
606
606
|
fetched: null,
|
|
607
607
|
isLoading: !1
|
|
608
608
|
});
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
|
-
let e = JSON.parse(
|
|
612
|
-
return
|
|
611
|
+
let e = JSON.parse(p), t = new AbortController();
|
|
612
|
+
return o((e) => ({
|
|
613
613
|
...e,
|
|
614
614
|
error: null,
|
|
615
615
|
isLoading: !0
|
|
616
616
|
})), (async () => {
|
|
617
|
-
let
|
|
617
|
+
let n = await r({
|
|
618
618
|
body: e.body,
|
|
619
619
|
headers: e.headers,
|
|
620
620
|
method: e.method,
|
|
621
621
|
queryParams: e.queryParams,
|
|
622
|
-
signal:
|
|
622
|
+
signal: t.signal,
|
|
623
623
|
url: e.url
|
|
624
624
|
});
|
|
625
|
-
if (!
|
|
626
|
-
if (!
|
|
627
|
-
|
|
628
|
-
error:
|
|
625
|
+
if (!t.signal.aborted) {
|
|
626
|
+
if (!n.success) {
|
|
627
|
+
o({
|
|
628
|
+
error: n.error ?? "Fetch failed",
|
|
629
629
|
fetched: null,
|
|
630
630
|
isLoading: !1
|
|
631
631
|
});
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
|
|
634
|
+
o({
|
|
635
635
|
error: null,
|
|
636
|
-
fetched:
|
|
636
|
+
fetched: v(n.data, e.responsePath, e.mapping),
|
|
637
637
|
isLoading: !1
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
})(), () =>
|
|
641
|
-
}, [
|
|
642
|
-
let
|
|
640
|
+
})(), () => t.abort();
|
|
641
|
+
}, [p]);
|
|
642
|
+
let h = i.fetched ?? f ?? [];
|
|
643
643
|
return {
|
|
644
|
-
error:
|
|
645
|
-
isLoading:
|
|
646
|
-
options:
|
|
644
|
+
error: i.error,
|
|
645
|
+
isLoading: i.isLoading,
|
|
646
|
+
options: h
|
|
647
647
|
};
|
|
648
|
-
}, ft = (
|
|
649
|
-
let [
|
|
648
|
+
}, ft = (e, t) => {
|
|
649
|
+
let [n, r] = D(!1), { id: i, value: a, placeholder: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d, missingDependencies: f } = t, { options: m, isLoading: h, error: g } = dt(s), _ = p(), v = `${i}-trigger`, y = `${i}-error`, b = m.find((e) => e.value === a);
|
|
650
650
|
return /* @__PURE__ */ A(J, {
|
|
651
651
|
className: "tg:mb-4",
|
|
652
652
|
children: [
|
|
653
653
|
/* @__PURE__ */ A(Q, {
|
|
654
654
|
htmlFor: v,
|
|
655
|
-
children: [
|
|
655
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ k("span", {
|
|
656
656
|
className: "tg:text-red-500",
|
|
657
657
|
children: "*"
|
|
658
658
|
})]
|
|
659
659
|
}),
|
|
660
660
|
/* @__PURE__ */ k(nt, {
|
|
661
|
-
missing:
|
|
661
|
+
missing: f,
|
|
662
662
|
children: /* @__PURE__ */ A(ye, {
|
|
663
|
-
open:
|
|
664
|
-
onOpenChange:
|
|
663
|
+
open: n,
|
|
664
|
+
onOpenChange: r,
|
|
665
665
|
children: [/* @__PURE__ */ k(be, {
|
|
666
666
|
asChild: !0,
|
|
667
667
|
children: /* @__PURE__ */ A(he, {
|
|
668
668
|
id: v,
|
|
669
669
|
variant: "outline",
|
|
670
670
|
role: "combobox",
|
|
671
|
-
"aria-expanded":
|
|
672
|
-
"aria-invalid": !!
|
|
673
|
-
"aria-describedby":
|
|
674
|
-
disabled: h ||
|
|
671
|
+
"aria-expanded": n,
|
|
672
|
+
"aria-invalid": !!l || void 0,
|
|
673
|
+
"aria-describedby": l ? y : void 0,
|
|
674
|
+
disabled: h || f.length > 0,
|
|
675
675
|
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
676
676
|
children: [/* @__PURE__ */ A("span", {
|
|
677
677
|
className: "tg:flex tg:items-center tg:gap-2 tg:truncate",
|
|
678
|
-
children: [h && /* @__PURE__ */ k(I, { className: "tg:h-4 tg:w-4 tg:shrink-0 tg:animate-spin" }),
|
|
679
|
-
}), /* @__PURE__ */ k(
|
|
678
|
+
children: [h && /* @__PURE__ */ k(I, { className: "tg:h-4 tg:w-4 tg:shrink-0 tg:animate-spin" }), a ? b?.label ? _(b.label) : a : o || _("renderer.defaultAutocompleteInput.selectOption")]
|
|
679
|
+
}), /* @__PURE__ */ k(re, { className: "tg:ml-2 tg:size-4 tg:shrink-0 tg:opacity-50" })]
|
|
680
680
|
})
|
|
681
681
|
}), /* @__PURE__ */ k(xe, {
|
|
682
682
|
className: "tg:w-(--radix-popover-trigger-width) tg:p-0",
|
|
683
683
|
align: "start",
|
|
684
|
-
children: /* @__PURE__ */ A(Ke, { children: [/* @__PURE__ */ k(qe, { placeholder:
|
|
684
|
+
children: /* @__PURE__ */ A(Ke, { children: [/* @__PURE__ */ k(qe, { placeholder: o || _("renderer.defaultAutocompleteInput.search") }), /* @__PURE__ */ A(Je, { children: [/* @__PURE__ */ k(Ye, { children: _("renderer.defaultAutocompleteInput.noResults") }), /* @__PURE__ */ k(Xe, { children: m.map((e) => /* @__PURE__ */ A(Ze, {
|
|
685
685
|
value: e.value,
|
|
686
686
|
disabled: e.disabled,
|
|
687
687
|
onSelect: (e) => {
|
|
688
|
-
|
|
688
|
+
c(e === a ? "" : e), r(!1);
|
|
689
689
|
},
|
|
690
|
-
children: [/* @__PURE__ */ k(te, { className: q("tg:mr-2 tg:size-4",
|
|
690
|
+
children: [/* @__PURE__ */ k(te, { className: q("tg:mr-2 tg:size-4", a === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ k(lt, {
|
|
691
691
|
label: _(e.label) || e.value,
|
|
692
692
|
description: _(e.description),
|
|
693
693
|
image: e.image
|
|
@@ -696,26 +696,26 @@ var lt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(O, { chil
|
|
|
696
696
|
})]
|
|
697
697
|
})
|
|
698
698
|
}),
|
|
699
|
-
|
|
699
|
+
l && /* @__PURE__ */ k(X, {
|
|
700
700
|
id: y,
|
|
701
|
-
children:
|
|
701
|
+
children: l
|
|
702
702
|
}),
|
|
703
|
-
g && !
|
|
704
|
-
|
|
703
|
+
g && !l && /* @__PURE__ */ k(X, { children: g }),
|
|
704
|
+
d && !l && !g && /* @__PURE__ */ k(Y, { children: d })
|
|
705
705
|
]
|
|
706
706
|
});
|
|
707
|
-
}, pt = (
|
|
708
|
-
let { id:
|
|
709
|
-
if (h.length > 0 ||
|
|
710
|
-
let e = Array.isArray(
|
|
711
|
-
|
|
707
|
+
}, pt = (e, t) => {
|
|
708
|
+
let { id: n, name: r, value: i } = e, { node: o, setValue: s, error: c, label: l, helperText: u, renderOptionExtras: d, compactOptions: f, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = dt(o), { optionsDisplayLimit: v } = a(), y = p();
|
|
709
|
+
if (h.length > 0 || o.data.optionsSource) {
|
|
710
|
+
let e = Array.isArray(i) ? i.map(String) : [], t = v ? h.slice(0, v) : h, a = h.length - t.length, p = (t, n) => {
|
|
711
|
+
s(n ? [...e, t] : e.filter((e) => e !== t));
|
|
712
712
|
};
|
|
713
713
|
return /* @__PURE__ */ A(J, {
|
|
714
714
|
className: "tg:mb-4",
|
|
715
715
|
children: [
|
|
716
716
|
/* @__PURE__ */ A(Q, {
|
|
717
717
|
className: "tg:mb-1",
|
|
718
|
-
children: [
|
|
718
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ k("span", {
|
|
719
719
|
className: "tg:text-red-500",
|
|
720
720
|
children: "*"
|
|
721
721
|
})]
|
|
@@ -727,16 +727,16 @@ var lt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(O, { chil
|
|
|
727
727
|
}),
|
|
728
728
|
/* @__PURE__ */ A("div", {
|
|
729
729
|
className: "tg:min-w-0 tg:space-y-2",
|
|
730
|
-
children: [t.map((t,
|
|
731
|
-
let
|
|
730
|
+
children: [t.map((t, i) => {
|
|
731
|
+
let a = y(t.description);
|
|
732
732
|
return /* @__PURE__ */ A("div", {
|
|
733
|
-
className: q("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:gap-3",
|
|
733
|
+
className: q("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:gap-3", f && "tg:pr-22"),
|
|
734
734
|
children: [
|
|
735
735
|
/* @__PURE__ */ k(ge, {
|
|
736
|
-
id: `${
|
|
737
|
-
name:
|
|
736
|
+
id: `${n}-${t.value}`,
|
|
737
|
+
name: r,
|
|
738
738
|
checked: e.includes(String(t.value)),
|
|
739
|
-
onCheckedChange: (e) =>
|
|
739
|
+
onCheckedChange: (e) => p(String(t.value), !!e),
|
|
740
740
|
disabled: t.disabled,
|
|
741
741
|
className: "tg:mt-0.5"
|
|
742
742
|
}),
|
|
@@ -746,30 +746,30 @@ var lt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(O, { chil
|
|
|
746
746
|
className: "tg:h-8 tg:w-8 tg:shrink-0 tg:rounded tg:object-cover"
|
|
747
747
|
}),
|
|
748
748
|
/* @__PURE__ */ A("div", {
|
|
749
|
-
className: q("tg:flex tg:flex-col",
|
|
749
|
+
className: q("tg:flex tg:flex-col", f && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
|
|
750
750
|
children: [/* @__PURE__ */ k(Q, {
|
|
751
|
-
htmlFor: `${
|
|
752
|
-
className: q("tg:cursor-pointer tg:font-normal tg:text-sm",
|
|
751
|
+
htmlFor: `${n}-${t.value}`,
|
|
752
|
+
className: q("tg:cursor-pointer tg:font-normal tg:text-sm", f && "tg:block tg:max-w-full tg:truncate"),
|
|
753
753
|
children: y(t.label) ? y(t.label) : t.value
|
|
754
|
-
}),
|
|
755
|
-
className: q("tg:text-muted-foreground tg:text-xs",
|
|
756
|
-
children:
|
|
754
|
+
}), a && /* @__PURE__ */ k("span", {
|
|
755
|
+
className: q("tg:text-muted-foreground tg:text-xs", f && "tg:block tg:max-w-full tg:truncate"),
|
|
756
|
+
children: a
|
|
757
757
|
})]
|
|
758
758
|
}),
|
|
759
|
-
|
|
760
|
-
index:
|
|
759
|
+
d?.({
|
|
760
|
+
index: i,
|
|
761
761
|
option: t
|
|
762
762
|
})
|
|
763
763
|
]
|
|
764
|
-
}, t.value +
|
|
765
|
-
}),
|
|
764
|
+
}, t.value + i);
|
|
765
|
+
}), a > 0 && /* @__PURE__ */ k("div", {
|
|
766
766
|
className: "tg:px-2 tg:text-muted-foreground tg:text-xs",
|
|
767
767
|
children: "…"
|
|
768
768
|
})]
|
|
769
769
|
}),
|
|
770
|
-
|
|
771
|
-
_ && !
|
|
772
|
-
|
|
770
|
+
c && /* @__PURE__ */ k(X, { children: c }),
|
|
771
|
+
_ && !c && /* @__PURE__ */ k(X, { children: _ }),
|
|
772
|
+
u && !c && !_ && /* @__PURE__ */ k(Y, { children: u })
|
|
773
773
|
]
|
|
774
774
|
});
|
|
775
775
|
}
|
|
@@ -778,19 +778,19 @@ var lt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(O, { chil
|
|
|
778
778
|
children: [/* @__PURE__ */ A("div", {
|
|
779
779
|
className: "tg:flex tg:items-center tg:gap-3",
|
|
780
780
|
children: [/* @__PURE__ */ k(ge, {
|
|
781
|
-
id:
|
|
782
|
-
name:
|
|
783
|
-
checked: typeof
|
|
784
|
-
onCheckedChange: (e) =>
|
|
781
|
+
id: n,
|
|
782
|
+
name: r,
|
|
783
|
+
checked: typeof i == "boolean" ? i : !1,
|
|
784
|
+
onCheckedChange: (e) => s(!!e)
|
|
785
785
|
}), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A(Q, {
|
|
786
|
-
htmlFor:
|
|
786
|
+
htmlFor: n,
|
|
787
787
|
className: "tg:cursor-pointer tg:font-medium tg:text-sm",
|
|
788
|
-
children: [
|
|
788
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ k("span", {
|
|
789
789
|
className: "tg:text-red-500",
|
|
790
790
|
children: "*"
|
|
791
791
|
})]
|
|
792
|
-
}),
|
|
793
|
-
}),
|
|
792
|
+
}), u && !c && /* @__PURE__ */ k(Y, { children: u })] })]
|
|
793
|
+
}), c && /* @__PURE__ */ k(X, { children: c })]
|
|
794
794
|
});
|
|
795
795
|
};
|
|
796
796
|
//#endregion
|
|
@@ -834,7 +834,7 @@ function mt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
834
834
|
...t
|
|
835
835
|
},
|
|
836
836
|
components: {
|
|
837
|
-
Chevron: ({ className: e, orientation: t, ...n }) => k(t === "left" ?
|
|
837
|
+
Chevron: ({ className: e, orientation: t, ...n }) => k(t === "left" ? N : t === "right" ? P : M, {
|
|
838
838
|
className: q("tg:size-4", e),
|
|
839
839
|
...n
|
|
840
840
|
}),
|
|
@@ -876,29 +876,29 @@ function ht({ className: e, day: t, modifiers: n, ...r }) {
|
|
|
876
876
|
}
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.tsx
|
|
879
|
-
var gt = (
|
|
880
|
-
let [
|
|
879
|
+
var gt = (e, t) => {
|
|
880
|
+
let [n, r] = D(!1), { id: i, name: a, value: o, placeholder: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, m = p(), h = o ? new Date(o) : void 0;
|
|
881
881
|
return /* @__PURE__ */ A(J, {
|
|
882
882
|
className: "tg:mb-4",
|
|
883
883
|
children: [
|
|
884
884
|
/* @__PURE__ */ A(Q, {
|
|
885
|
-
htmlFor:
|
|
886
|
-
children: [
|
|
885
|
+
htmlFor: i,
|
|
886
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ k("span", {
|
|
887
887
|
className: "tg:text-red-500",
|
|
888
888
|
children: "*"
|
|
889
889
|
})]
|
|
890
890
|
}),
|
|
891
891
|
/* @__PURE__ */ A(ye, {
|
|
892
|
-
open:
|
|
893
|
-
onOpenChange:
|
|
892
|
+
open: n,
|
|
893
|
+
onOpenChange: r,
|
|
894
894
|
children: [/* @__PURE__ */ k(be, {
|
|
895
895
|
asChild: !0,
|
|
896
896
|
children: /* @__PURE__ */ A(he, {
|
|
897
897
|
variant: "outline",
|
|
898
|
-
id:
|
|
899
|
-
name:
|
|
898
|
+
id: i,
|
|
899
|
+
name: a,
|
|
900
900
|
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
901
|
-
children: [h ? h.toLocaleDateString() :
|
|
901
|
+
children: [h ? h.toLocaleDateString() : s || m("renderer.defaultInputs.selectDate"), /* @__PURE__ */ k(M, { className: "tg:size-4" })]
|
|
902
902
|
})
|
|
903
903
|
}), /* @__PURE__ */ k(xe, {
|
|
904
904
|
className: "tg:w-auto tg:overflow-hidden tg:p-0",
|
|
@@ -908,44 +908,44 @@ var gt = (t, n) => {
|
|
|
908
908
|
selected: h,
|
|
909
909
|
captionLayout: "dropdown",
|
|
910
910
|
disabled: (e) => {
|
|
911
|
-
if (
|
|
911
|
+
if (c.data.disablePast) {
|
|
912
912
|
let t = /* @__PURE__ */ new Date();
|
|
913
913
|
return t.setHours(0, 0, 0, 0), e < t;
|
|
914
914
|
}
|
|
915
915
|
return !1;
|
|
916
916
|
},
|
|
917
917
|
onSelect: (e) => {
|
|
918
|
-
|
|
918
|
+
l(e ? e.toISOString() : ""), r(!1);
|
|
919
919
|
}
|
|
920
920
|
})
|
|
921
921
|
})]
|
|
922
922
|
}),
|
|
923
|
-
|
|
924
|
-
|
|
923
|
+
u && /* @__PURE__ */ k(X, { children: u }),
|
|
924
|
+
f && !u && /* @__PURE__ */ k(Y, { children: f })
|
|
925
925
|
]
|
|
926
926
|
});
|
|
927
|
-
}, _t = (
|
|
928
|
-
let [
|
|
927
|
+
}, _t = (e, t) => {
|
|
928
|
+
let [n, r] = D(!1), { id: i, value: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, d = p(), f = Array.isArray(a) ? a : [], m = f[0] ? new Date(f[0]) : void 0, h = f[1] ? new Date(f[1]) : void 0;
|
|
929
929
|
return /* @__PURE__ */ A(J, {
|
|
930
930
|
className: "tg:mb-4",
|
|
931
931
|
children: [
|
|
932
932
|
/* @__PURE__ */ A(Q, {
|
|
933
|
-
htmlFor:
|
|
934
|
-
children: [
|
|
933
|
+
htmlFor: i,
|
|
934
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ k("span", {
|
|
935
935
|
className: "tg:text-red-500",
|
|
936
936
|
children: "*"
|
|
937
937
|
})]
|
|
938
938
|
}),
|
|
939
939
|
/* @__PURE__ */ A(ye, {
|
|
940
|
-
open:
|
|
941
|
-
onOpenChange:
|
|
940
|
+
open: n,
|
|
941
|
+
onOpenChange: r,
|
|
942
942
|
children: [/* @__PURE__ */ k(be, {
|
|
943
943
|
asChild: !0,
|
|
944
944
|
children: /* @__PURE__ */ A(he, {
|
|
945
|
-
id:
|
|
945
|
+
id: i,
|
|
946
946
|
variant: "outline",
|
|
947
947
|
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
948
|
-
children: [m && h ? `${m.toLocaleDateString()} - ${h.toLocaleDateString()}` : m ? m.toLocaleDateString() :
|
|
948
|
+
children: [m && h ? `${m.toLocaleDateString()} - ${h.toLocaleDateString()}` : m ? m.toLocaleDateString() : d("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ k(M, { className: "tg:size-4" })]
|
|
949
949
|
})
|
|
950
950
|
}), /* @__PURE__ */ k(xe, {
|
|
951
951
|
className: "tg:w-auto tg:overflow-hidden tg:p-0",
|
|
@@ -958,25 +958,25 @@ var gt = (t, n) => {
|
|
|
958
958
|
},
|
|
959
959
|
captionLayout: "dropdown",
|
|
960
960
|
disabled: (e) => {
|
|
961
|
-
if (
|
|
961
|
+
if (o.data.disablePast) {
|
|
962
962
|
let t = /* @__PURE__ */ new Date();
|
|
963
963
|
return t.setHours(0, 0, 0, 0), e < t;
|
|
964
964
|
}
|
|
965
965
|
return !1;
|
|
966
966
|
},
|
|
967
967
|
onSelect: (e) => {
|
|
968
|
-
|
|
968
|
+
s([e?.from ? e.from.toISOString() : void 0, e?.to ? e.to.toISOString() : void 0]);
|
|
969
969
|
},
|
|
970
970
|
numberOfMonths: 2
|
|
971
971
|
})
|
|
972
972
|
})]
|
|
973
973
|
}),
|
|
974
|
-
|
|
975
|
-
|
|
974
|
+
c && /* @__PURE__ */ k(X, { children: c }),
|
|
975
|
+
u && !c && /* @__PURE__ */ k(Y, { children: u })
|
|
976
976
|
]
|
|
977
977
|
});
|
|
978
978
|
}, vt = (e, t) => {
|
|
979
|
-
let { id: n, name: r, placeholder: i } = e, { node: a, setValue: o, error: s, label: c, helperText:
|
|
979
|
+
let { id: n, name: r, placeholder: i } = e, { node: a, setValue: o, error: s, label: c, helperText: u } = t;
|
|
980
980
|
return /* @__PURE__ */ A(J, {
|
|
981
981
|
className: "tg:mb-4",
|
|
982
982
|
children: [
|
|
@@ -998,16 +998,16 @@ var gt = (t, n) => {
|
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
1000
|
if (a.data.multiple) {
|
|
1001
|
-
o(await
|
|
1001
|
+
o(await y(Array.from(t)));
|
|
1002
1002
|
return;
|
|
1003
1003
|
}
|
|
1004
|
-
o(await
|
|
1004
|
+
o(await l(t[0]));
|
|
1005
1005
|
},
|
|
1006
1006
|
multiple: a.data.multiple,
|
|
1007
1007
|
placeholder: i
|
|
1008
1008
|
}),
|
|
1009
1009
|
s && /* @__PURE__ */ k(X, { children: s }),
|
|
1010
|
-
|
|
1010
|
+
u && !s && /* @__PURE__ */ k(Y, { children: u })
|
|
1011
1011
|
]
|
|
1012
1012
|
});
|
|
1013
1013
|
}, yt = (e, t) => {
|
|
@@ -1027,79 +1027,79 @@ var gt = (t, n) => {
|
|
|
1027
1027
|
}), St = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1028
1028
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1029
1029
|
return n ? encodeURIComponent(a) : a;
|
|
1030
|
-
}), Ct = (
|
|
1031
|
-
let [s, l] = D(!1), [u,
|
|
1032
|
-
|
|
1030
|
+
}), Ct = (r, i) => {
|
|
1031
|
+
let [s, l] = D(!1), [u, f] = D(null), [h, g] = D([]), [_, v] = D(""), [y, b] = D(!1), { id: x, name: S, value: w, placeholder: j } = r, { node: M, setValue: N, error: P, label: ne, helperText: F, missingDependencies: L } = i, { formValues: R, inputNodes: ie, headers: ae, baseUrl: oe } = a(), { httpConfig: z } = M.data, B = E(!1), se = E(!1), ce = E(""), V = p(), H = E(z), U = E(R), le = E(ie), W = E(ae), G = E(oe), ue = E(N), de = E(null), K = E(null), fe = ee(() => z?.url ? bt(z.url) : [], [z?.url]), pe = fe.length > 0, me = ee(() => fe.map((e) => `${e}:${String(R[e] ?? "")}`).join("|"), [fe, R]), ge = ee(() => z?.url ? pe ? xt(z.url, R) : !0 : !1, [
|
|
1032
|
+
z?.url,
|
|
1033
1033
|
pe,
|
|
1034
1034
|
R
|
|
1035
|
-
]), $ = C(async (
|
|
1035
|
+
]), $ = C(async (r) => {
|
|
1036
1036
|
K.current && K.current.abort();
|
|
1037
|
-
let
|
|
1038
|
-
K.current =
|
|
1039
|
-
let
|
|
1040
|
-
if (!
|
|
1041
|
-
|
|
1037
|
+
let i = new AbortController();
|
|
1038
|
+
K.current = i;
|
|
1039
|
+
let a = H.current, s = U.current, u = ue.current;
|
|
1040
|
+
if (!a?.url) {
|
|
1041
|
+
f(V("renderer.defaultHttpInput.noUrlConfigured")), K.current = null;
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
|
-
if (
|
|
1044
|
+
if (a.url && !xt(a.url, s)) {
|
|
1045
1045
|
K.current = null;
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
l(!0),
|
|
1048
|
+
l(!0), f(null);
|
|
1049
1049
|
try {
|
|
1050
|
-
let
|
|
1050
|
+
let p = e(St(a.url, s, !0), G.current), h = t(a.searchParam && r ? `${p}${p.includes("?") ? "&" : "?"}${a.searchParam}=${encodeURIComponent(r)}` : p, m(a.queryParams, s)), _ = n({ "Content-Type": "application/json" }, m(W.current, s), m(a.headers, s)), v = [
|
|
1051
1051
|
"POST",
|
|
1052
1052
|
"PUT",
|
|
1053
1053
|
"PATCH"
|
|
1054
|
-
].includes(
|
|
1055
|
-
body:
|
|
1056
|
-
headers: Object.fromEntries(Object.entries(
|
|
1057
|
-
method:
|
|
1058
|
-
signal:
|
|
1054
|
+
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(d(s, le.current)) : a.body ? St(a.body, s) : void 0 : void 0, y = setTimeout(() => i.abort(), 3e4), b = await fetch(h, {
|
|
1055
|
+
body: v || void 0,
|
|
1056
|
+
headers: Object.fromEntries(Object.entries(_).filter(([, e]) => e)),
|
|
1057
|
+
method: a.method || "GET",
|
|
1058
|
+
signal: i.signal
|
|
1059
1059
|
});
|
|
1060
1060
|
if (clearTimeout(y), !b.ok) {
|
|
1061
|
-
|
|
1061
|
+
f(`HTTP Error ${b.status}: ${b.statusText}`), l(!1);
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
|
-
let x =
|
|
1065
|
-
if (
|
|
1066
|
-
let { valueField: e = "value", labelField: t = "label", descriptionField:
|
|
1067
|
-
|
|
1068
|
-
let a =
|
|
1064
|
+
let x = o(await b.json()), S = a.responsePath ? c(x, a.responsePath) : x;
|
|
1065
|
+
if (a.responseMapping && Array.isArray(S)) {
|
|
1066
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = a.responseMapping;
|
|
1067
|
+
g(S.map((i) => {
|
|
1068
|
+
let a = n ? c(i, n) : void 0, o = r ? c(i, r) : void 0;
|
|
1069
1069
|
return {
|
|
1070
1070
|
description: a != null && a !== "" ? String(a) : void 0,
|
|
1071
1071
|
image: typeof o == "string" && o !== "" ? o : void 0,
|
|
1072
|
-
label: String(
|
|
1073
|
-
value: String(
|
|
1072
|
+
label: String(c(i, t) || ""),
|
|
1073
|
+
value: String(c(i, e) || "")
|
|
1074
1074
|
};
|
|
1075
1075
|
}));
|
|
1076
|
-
} else
|
|
1076
|
+
} else u(typeof S == "string" ? S : JSON.stringify(S));
|
|
1077
1077
|
} catch (e) {
|
|
1078
1078
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1079
|
-
|
|
1079
|
+
f(e instanceof Error ? e.message : V("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1080
1080
|
} finally {
|
|
1081
1081
|
l(!1), K.current = null;
|
|
1082
1082
|
}
|
|
1083
1083
|
}, [V]);
|
|
1084
1084
|
if (T(() => {
|
|
1085
|
-
H.current =
|
|
1085
|
+
H.current = z, U.current = R, le.current = ie, W.current = ae, G.current = oe, ue.current = N, de.current = $;
|
|
1086
1086
|
}, [
|
|
1087
|
-
|
|
1087
|
+
z,
|
|
1088
1088
|
R,
|
|
1089
1089
|
ie,
|
|
1090
1090
|
ae,
|
|
1091
|
-
|
|
1092
|
-
|
|
1091
|
+
oe,
|
|
1092
|
+
N,
|
|
1093
1093
|
$
|
|
1094
1094
|
]), T(() => () => {
|
|
1095
|
-
K.current && K.current.abort(),
|
|
1095
|
+
K.current && K.current.abort(), B.current = !1, se.current = !1;
|
|
1096
1096
|
}, []), T(() => {
|
|
1097
|
-
if (
|
|
1098
|
-
|
|
1097
|
+
if (B.current) return;
|
|
1098
|
+
B.current = !0;
|
|
1099
1099
|
let e = H.current, t = U.current, n = de.current, r = e?.url && xt(e.url, t);
|
|
1100
1100
|
e?.fetchOnMount && r && n && (n(), e.url && (ce.current = bt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1101
1101
|
}, []), T(() => {
|
|
1102
|
-
if (!
|
|
1102
|
+
if (!B.current || !pe || ce.current === me || !ge) return;
|
|
1103
1103
|
let e = setTimeout(() => {
|
|
1104
1104
|
$(), ce.current = me;
|
|
1105
1105
|
}, 500);
|
|
@@ -1117,40 +1117,40 @@ var gt = (t, n) => {
|
|
|
1117
1117
|
let e = H.current, t = U.current, n = de.current, r = e?.url && xt(e.url, t);
|
|
1118
1118
|
e?.fetchOnMount && r && n && (n(), e.url && (ce.current = bt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1119
1119
|
}, [ee(() => JSON.stringify({
|
|
1120
|
-
body:
|
|
1121
|
-
fetchOnMount:
|
|
1122
|
-
headers:
|
|
1123
|
-
method:
|
|
1124
|
-
queryParams:
|
|
1125
|
-
responseMapping:
|
|
1126
|
-
responsePath:
|
|
1127
|
-
searchParam:
|
|
1128
|
-
sendAllFormValues:
|
|
1129
|
-
url:
|
|
1130
|
-
}), [
|
|
1131
|
-
if (!(
|
|
1120
|
+
body: z?.body,
|
|
1121
|
+
fetchOnMount: z?.fetchOnMount,
|
|
1122
|
+
headers: z?.headers,
|
|
1123
|
+
method: z?.method,
|
|
1124
|
+
queryParams: z?.queryParams,
|
|
1125
|
+
responseMapping: z?.responseMapping,
|
|
1126
|
+
responsePath: z?.responsePath,
|
|
1127
|
+
searchParam: z?.searchParam,
|
|
1128
|
+
sendAllFormValues: z?.sendAllFormValues,
|
|
1129
|
+
url: z?.url
|
|
1130
|
+
}), [z])]), T(() => {
|
|
1131
|
+
if (!(z?.searchParam && _)) return;
|
|
1132
1132
|
let e = setTimeout(() => {
|
|
1133
|
-
$(
|
|
1133
|
+
$(_);
|
|
1134
1134
|
}, 300);
|
|
1135
1135
|
return () => clearTimeout(e);
|
|
1136
1136
|
}, [
|
|
1137
|
-
|
|
1138
|
-
|
|
1137
|
+
_,
|
|
1138
|
+
z?.searchParam,
|
|
1139
1139
|
$
|
|
1140
|
-
]),
|
|
1141
|
-
let e = Array.isArray(w) ? w[0] : w, t =
|
|
1142
|
-
if (
|
|
1143
|
-
let e = s &&
|
|
1140
|
+
]), z?.responseMapping) {
|
|
1141
|
+
let e = Array.isArray(w) ? w[0] : w, t = h.find((t) => t.value === e);
|
|
1142
|
+
if (z.searchParam) {
|
|
1143
|
+
let e = s && z?.showLoading ? /* @__PURE__ */ A("div", {
|
|
1144
1144
|
className: "tg:flex tg:items-center tg:gap-2",
|
|
1145
1145
|
children: [/* @__PURE__ */ k(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k("span", {
|
|
1146
1146
|
className: "tg:text-muted-foreground",
|
|
1147
|
-
children: t?.label ||
|
|
1147
|
+
children: t?.label || j || V("renderer.defaultHttpInput.search")
|
|
1148
1148
|
})]
|
|
1149
|
-
}) : t?.label ||
|
|
1149
|
+
}) : t?.label || j || V("renderer.defaultHttpInput.search");
|
|
1150
1150
|
return /* @__PURE__ */ A(J, {
|
|
1151
1151
|
className: "tg:mb-4",
|
|
1152
1152
|
children: [
|
|
1153
|
-
/* @__PURE__ */ A(Q, { children: [
|
|
1153
|
+
/* @__PURE__ */ A(Q, { children: [ne || M.data.name, M.data.required && /* @__PURE__ */ k("span", {
|
|
1154
1154
|
className: "tg:text-red-500",
|
|
1155
1155
|
children: "*"
|
|
1156
1156
|
})] }),
|
|
@@ -1167,7 +1167,7 @@ var gt = (t, n) => {
|
|
|
1167
1167
|
"aria-expanded": y,
|
|
1168
1168
|
disabled: L.length > 0,
|
|
1169
1169
|
className: "tg:w-full tg:justify-between",
|
|
1170
|
-
children: [e, /* @__PURE__ */ k(
|
|
1170
|
+
children: [e, /* @__PURE__ */ k(re, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
|
|
1171
1171
|
})
|
|
1172
1172
|
}), /* @__PURE__ */ k(xe, {
|
|
1173
1173
|
className: "tg:w-[var(--radix-popover-trigger-width)] tg:p-0",
|
|
@@ -1176,9 +1176,9 @@ var gt = (t, n) => {
|
|
|
1176
1176
|
shouldFilter: !1,
|
|
1177
1177
|
children: [/* @__PURE__ */ k(qe, {
|
|
1178
1178
|
placeholder: V("renderer.defaultHttpInput.search"),
|
|
1179
|
-
value:
|
|
1179
|
+
value: _,
|
|
1180
1180
|
onValueChange: (e) => {
|
|
1181
|
-
|
|
1181
|
+
v(e), f(null);
|
|
1182
1182
|
}
|
|
1183
1183
|
}), /* @__PURE__ */ A(Je, { children: [
|
|
1184
1184
|
s && /* @__PURE__ */ k("div", {
|
|
@@ -1189,15 +1189,15 @@ var gt = (t, n) => {
|
|
|
1189
1189
|
className: "tg:p-4 tg:text-destructive tg:text-sm",
|
|
1190
1190
|
children: [/* @__PURE__ */ k("div", { children: u }), /* @__PURE__ */ k("button", {
|
|
1191
1191
|
type: "button",
|
|
1192
|
-
onClick: () => $(
|
|
1192
|
+
onClick: () => $(_),
|
|
1193
1193
|
className: "tg:mt-2 tg:block tg:text-primary tg:hover:underline",
|
|
1194
1194
|
children: V("renderer.defaultHttpInput.retry")
|
|
1195
1195
|
})]
|
|
1196
1196
|
}),
|
|
1197
|
-
!(s || u) && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(Ye, { children: V("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ k(Xe, { children:
|
|
1197
|
+
!(s || u) && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(Ye, { children: V("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ k(Xe, { children: h.map((e) => /* @__PURE__ */ A(Ze, {
|
|
1198
1198
|
value: e.value,
|
|
1199
1199
|
onSelect: () => {
|
|
1200
|
-
|
|
1200
|
+
N(e.value), b(!1);
|
|
1201
1201
|
},
|
|
1202
1202
|
children: [/* @__PURE__ */ k(te, { className: q("tg:mr-2 tg:h-4 tg:w-4", w === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ k(lt, {
|
|
1203
1203
|
label: e.label,
|
|
@@ -1210,22 +1210,22 @@ var gt = (t, n) => {
|
|
|
1210
1210
|
})]
|
|
1211
1211
|
})
|
|
1212
1212
|
}),
|
|
1213
|
-
|
|
1214
|
-
F && !
|
|
1213
|
+
P && /* @__PURE__ */ k(X, { children: P }),
|
|
1214
|
+
F && !P && /* @__PURE__ */ k(Y, { children: F })
|
|
1215
1215
|
]
|
|
1216
1216
|
});
|
|
1217
1217
|
}
|
|
1218
|
-
let n = s &&
|
|
1218
|
+
let n = s && z?.showLoading, r = L.length === 0 && h.length === 0 && !n ? u ?? V("renderer.defaultHttpInput.noDataAvailable") : void 0, i = /* @__PURE__ */ A(Se, {
|
|
1219
1219
|
value: Array.isArray(w) ? w[0] ?? "" : w ?? "",
|
|
1220
|
-
onValueChange: (e) =>
|
|
1221
|
-
disabled: n ||
|
|
1220
|
+
onValueChange: (e) => N(e),
|
|
1221
|
+
disabled: n || h.length === 0,
|
|
1222
1222
|
name: S,
|
|
1223
1223
|
children: [/* @__PURE__ */ A(Te, {
|
|
1224
1224
|
id: x,
|
|
1225
1225
|
name: S,
|
|
1226
1226
|
className: "tg:w-full",
|
|
1227
|
-
children: [n && /* @__PURE__ */ k(I, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k(we, { placeholder:
|
|
1228
|
-
}), /* @__PURE__ */ k(Ee, { children: /* @__PURE__ */ k(Ce, { children:
|
|
1227
|
+
children: [n && /* @__PURE__ */ k(I, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k(we, { placeholder: j || V("renderer.defaultHttpInput.selectOption") })]
|
|
1228
|
+
}), /* @__PURE__ */ k(Ee, { children: /* @__PURE__ */ k(Ce, { children: h.map((e, t) => /* @__PURE__ */ k(Oe, {
|
|
1229
1229
|
value: e.value,
|
|
1230
1230
|
children: /* @__PURE__ */ k(lt, {
|
|
1231
1231
|
label: e.label,
|
|
@@ -1239,7 +1239,7 @@ var gt = (t, n) => {
|
|
|
1239
1239
|
children: [
|
|
1240
1240
|
/* @__PURE__ */ A(Q, {
|
|
1241
1241
|
htmlFor: x,
|
|
1242
|
-
children: [
|
|
1242
|
+
children: [ne || M.data.name, M.data.required && /* @__PURE__ */ k("span", {
|
|
1243
1243
|
className: "tg:text-red-500",
|
|
1244
1244
|
children: "*"
|
|
1245
1245
|
})]
|
|
@@ -1254,8 +1254,8 @@ var gt = (t, n) => {
|
|
|
1254
1254
|
})
|
|
1255
1255
|
}), /* @__PURE__ */ k(Fe, { children: /* @__PURE__ */ k("p", { children: r }) })] }) }) : i
|
|
1256
1256
|
}),
|
|
1257
|
-
|
|
1258
|
-
F && !
|
|
1257
|
+
P && /* @__PURE__ */ k(X, { children: P }),
|
|
1258
|
+
F && !P && /* @__PURE__ */ k(Y, { children: F })
|
|
1259
1259
|
]
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
@@ -1264,7 +1264,7 @@ var gt = (t, n) => {
|
|
|
1264
1264
|
children: [
|
|
1265
1265
|
/* @__PURE__ */ A(Q, {
|
|
1266
1266
|
htmlFor: x,
|
|
1267
|
-
children: [
|
|
1267
|
+
children: [ne || M.data.name, M.data.required && /* @__PURE__ */ k("span", {
|
|
1268
1268
|
className: "tg:text-red-500",
|
|
1269
1269
|
children: "*"
|
|
1270
1270
|
})]
|
|
@@ -1277,8 +1277,8 @@ var gt = (t, n) => {
|
|
|
1277
1277
|
readOnly: !0,
|
|
1278
1278
|
disabled: !0
|
|
1279
1279
|
}),
|
|
1280
|
-
|
|
1281
|
-
F && !
|
|
1280
|
+
P && /* @__PURE__ */ k(X, { children: P }),
|
|
1281
|
+
F && !P && /* @__PURE__ */ k(Y, { children: F })
|
|
1282
1282
|
]
|
|
1283
1283
|
});
|
|
1284
1284
|
}, wt = (e, t) => {
|
|
@@ -1330,7 +1330,7 @@ var gt = (t, n) => {
|
|
|
1330
1330
|
u && !c && /* @__PURE__ */ k(Y, { children: u })
|
|
1331
1331
|
]
|
|
1332
1332
|
});
|
|
1333
|
-
}, Et =
|
|
1333
|
+
}, Et = oe("tg:group/field tg:flex tg:w-full tg:gap-3 tg:data-[invalid=true]:text-destructive", {
|
|
1334
1334
|
defaultVariants: { orientation: "vertical" },
|
|
1335
1335
|
variants: { orientation: {
|
|
1336
1336
|
horizontal: [
|
|
@@ -1406,15 +1406,15 @@ function Nt({ className: e, ...t }) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
//#endregion
|
|
1408
1408
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.tsx
|
|
1409
|
-
var Pt = (
|
|
1410
|
-
let { id:
|
|
1409
|
+
var Pt = (e, t) => {
|
|
1410
|
+
let { id: n, name: r, value: i } = e, { node: o, setValue: s, error: c, label: l, helperText: u, renderOptionExtras: d, compactOptions: f, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = dt(o), { optionsDisplayLimit: v } = a(), y = p(), b = i ? String(i) : "", x = o.data.variant !== "default", S = `${n}-label`, C = v ? h.slice(0, v) : h, w = h.length - C.length;
|
|
1411
1411
|
return /* @__PURE__ */ A(J, {
|
|
1412
1412
|
className: "tg:mb-4",
|
|
1413
1413
|
children: [
|
|
1414
1414
|
/* @__PURE__ */ A(Q, {
|
|
1415
1415
|
className: "tg:mb-1",
|
|
1416
1416
|
id: S,
|
|
1417
|
-
children: [
|
|
1417
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ k("span", {
|
|
1418
1418
|
className: "tg:text-red-500",
|
|
1419
1419
|
children: "*"
|
|
1420
1420
|
})]
|
|
@@ -1426,15 +1426,15 @@ var Pt = (t, n) => {
|
|
|
1426
1426
|
}),
|
|
1427
1427
|
/* @__PURE__ */ A(Mt, {
|
|
1428
1428
|
value: b,
|
|
1429
|
-
onValueChange: (e) =>
|
|
1429
|
+
onValueChange: (e) => s(e),
|
|
1430
1430
|
"aria-labelledby": S,
|
|
1431
|
-
name:
|
|
1431
|
+
name: r,
|
|
1432
1432
|
className: q("tg:min-w-0", x && "tg:flex tg:flex-col tg:gap-2"),
|
|
1433
1433
|
children: [C.map((e, t) => {
|
|
1434
|
-
let
|
|
1434
|
+
let r = `${n}-${e.value}`, i = y(e.label) || e.value, a = y(e.description), o = String(e.value);
|
|
1435
1435
|
return x ? /* @__PURE__ */ A(kt, {
|
|
1436
|
-
htmlFor:
|
|
1437
|
-
className: q("tg:group/option tg:pointer-events-auto tg:relative",
|
|
1436
|
+
htmlFor: r,
|
|
1437
|
+
className: q("tg:group/option tg:pointer-events-auto tg:relative", f && "tg:group-hover/option:pr-16"),
|
|
1438
1438
|
children: [/* @__PURE__ */ A(Dt, {
|
|
1439
1439
|
orientation: "horizontal",
|
|
1440
1440
|
"data-disabled": e.disabled || void 0,
|
|
@@ -1445,33 +1445,33 @@ var Pt = (t, n) => {
|
|
|
1445
1445
|
className: "tg:h-10 tg:w-10 tg:shrink-0 tg:self-center tg:rounded tg:object-cover"
|
|
1446
1446
|
}),
|
|
1447
1447
|
/* @__PURE__ */ A(Ot, {
|
|
1448
|
-
className: q(
|
|
1448
|
+
className: q(f && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
|
|
1449
1449
|
children: [/* @__PURE__ */ k(At, {
|
|
1450
|
-
className: q(
|
|
1450
|
+
className: q(f && "tg:block tg:max-w-full tg:truncate"),
|
|
1451
1451
|
children: i
|
|
1452
1452
|
}), a && /* @__PURE__ */ k(jt, {
|
|
1453
|
-
className: q(
|
|
1453
|
+
className: q(f && "tg:block tg:max-w-full tg:truncate"),
|
|
1454
1454
|
children: a
|
|
1455
1455
|
})]
|
|
1456
1456
|
}),
|
|
1457
1457
|
/* @__PURE__ */ k(Nt, {
|
|
1458
1458
|
value: o,
|
|
1459
|
-
id:
|
|
1459
|
+
id: r,
|
|
1460
1460
|
disabled: e.disabled,
|
|
1461
|
-
className: q(
|
|
1461
|
+
className: q(f && "tg:ml-auto tg:shrink-0 tg:group-hover/option:invisible")
|
|
1462
1462
|
})
|
|
1463
1463
|
]
|
|
1464
|
-
}),
|
|
1464
|
+
}), d?.({
|
|
1465
1465
|
index: t,
|
|
1466
1466
|
option: e,
|
|
1467
1467
|
variant: "card"
|
|
1468
1468
|
})]
|
|
1469
1469
|
}, e.value + t) : /* @__PURE__ */ A("div", {
|
|
1470
|
-
className: q("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:space-x-2",
|
|
1470
|
+
className: q("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:space-x-2", f && "tg:min-w-0 tg:pr-22"),
|
|
1471
1471
|
children: [
|
|
1472
1472
|
/* @__PURE__ */ k(Nt, {
|
|
1473
1473
|
value: o,
|
|
1474
|
-
id:
|
|
1474
|
+
id: r,
|
|
1475
1475
|
disabled: e.disabled,
|
|
1476
1476
|
className: "tg:mt-0.5"
|
|
1477
1477
|
}),
|
|
@@ -1481,17 +1481,17 @@ var Pt = (t, n) => {
|
|
|
1481
1481
|
className: "tg:h-8 tg:w-8 tg:rounded tg:object-cover"
|
|
1482
1482
|
}),
|
|
1483
1483
|
/* @__PURE__ */ A("div", {
|
|
1484
|
-
className: q("tg:flex tg:flex-col",
|
|
1484
|
+
className: q("tg:flex tg:flex-col", f && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
|
|
1485
1485
|
children: [/* @__PURE__ */ k(Q, {
|
|
1486
|
-
htmlFor:
|
|
1487
|
-
className: q("tg:cursor-pointer tg:font-normal tg:text-sm",
|
|
1486
|
+
htmlFor: r,
|
|
1487
|
+
className: q("tg:cursor-pointer tg:font-normal tg:text-sm", f && "tg:block tg:max-w-full tg:truncate"),
|
|
1488
1488
|
children: i
|
|
1489
1489
|
}), a && /* @__PURE__ */ k("span", {
|
|
1490
|
-
className: q("tg:text-muted-foreground tg:text-xs",
|
|
1490
|
+
className: q("tg:text-muted-foreground tg:text-xs", f && "tg:block tg:max-w-full tg:truncate"),
|
|
1491
1491
|
children: a
|
|
1492
1492
|
})]
|
|
1493
1493
|
}),
|
|
1494
|
-
|
|
1494
|
+
d?.({
|
|
1495
1495
|
index: t,
|
|
1496
1496
|
option: e,
|
|
1497
1497
|
variant: "default"
|
|
@@ -1503,36 +1503,36 @@ var Pt = (t, n) => {
|
|
|
1503
1503
|
children: "…"
|
|
1504
1504
|
})]
|
|
1505
1505
|
}),
|
|
1506
|
-
|
|
1507
|
-
_ && !
|
|
1508
|
-
|
|
1506
|
+
c && /* @__PURE__ */ k(X, { children: c }),
|
|
1507
|
+
_ && !c && /* @__PURE__ */ k(X, { children: _ }),
|
|
1508
|
+
u && !c && !_ && /* @__PURE__ */ k(Y, { children: u })
|
|
1509
1509
|
]
|
|
1510
1510
|
});
|
|
1511
|
-
}, Ft = (
|
|
1512
|
-
let { id:
|
|
1511
|
+
}, Ft = (e, t) => {
|
|
1512
|
+
let { id: n, name: r, value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u, missingDependencies: d } = t, { options: f, isLoading: m, error: h } = dt(o), g = p(), _ = i ? String(i) : "";
|
|
1513
1513
|
return /* @__PURE__ */ A(J, {
|
|
1514
1514
|
className: "tg:mb-4",
|
|
1515
1515
|
children: [
|
|
1516
1516
|
/* @__PURE__ */ A(Q, {
|
|
1517
|
-
htmlFor:
|
|
1518
|
-
children: [
|
|
1517
|
+
htmlFor: n,
|
|
1518
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ k("span", {
|
|
1519
1519
|
className: "tg:text-red-500",
|
|
1520
1520
|
children: "*"
|
|
1521
1521
|
})]
|
|
1522
1522
|
}),
|
|
1523
1523
|
/* @__PURE__ */ k(nt, {
|
|
1524
|
-
missing:
|
|
1524
|
+
missing: d,
|
|
1525
1525
|
children: /* @__PURE__ */ A(Se, {
|
|
1526
|
-
name:
|
|
1526
|
+
name: r,
|
|
1527
1527
|
value: _,
|
|
1528
|
-
onValueChange: (e) =>
|
|
1529
|
-
disabled: m ||
|
|
1528
|
+
onValueChange: (e) => s(e),
|
|
1529
|
+
disabled: m || d.length > 0,
|
|
1530
1530
|
children: [/* @__PURE__ */ A(Te, {
|
|
1531
|
-
id:
|
|
1532
|
-
name:
|
|
1531
|
+
id: n,
|
|
1532
|
+
name: r,
|
|
1533
1533
|
className: "tg:w-full",
|
|
1534
|
-
children: [m && /* @__PURE__ */ k(I, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k(we, { placeholder:
|
|
1535
|
-
}), /* @__PURE__ */ k(Ee, { children: /* @__PURE__ */ k(Ce, { children:
|
|
1534
|
+
children: [m && /* @__PURE__ */ k(I, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k(we, { placeholder: a || g("renderer.defaultSelectInput.selectOption") })]
|
|
1535
|
+
}), /* @__PURE__ */ k(Ee, { children: /* @__PURE__ */ k(Ce, { children: f.map((e, t) => /* @__PURE__ */ k(Oe, {
|
|
1536
1536
|
value: String(e.value),
|
|
1537
1537
|
disabled: e.disabled,
|
|
1538
1538
|
children: /* @__PURE__ */ k(lt, {
|
|
@@ -1543,99 +1543,100 @@ var Pt = (t, n) => {
|
|
|
1543
1543
|
}, `${e.value}-${t}`)) }) })]
|
|
1544
1544
|
})
|
|
1545
1545
|
}),
|
|
1546
|
-
|
|
1547
|
-
h && !
|
|
1548
|
-
|
|
1546
|
+
c && /* @__PURE__ */ k(X, { children: c }),
|
|
1547
|
+
h && !c && /* @__PURE__ */ k(X, { children: h }),
|
|
1548
|
+
u && !c && !h && /* @__PURE__ */ k(Y, { children: u })
|
|
1549
1549
|
]
|
|
1550
1550
|
});
|
|
1551
|
-
}, It = ({ children: e,
|
|
1552
|
-
|
|
1551
|
+
}, It = ({ children: e, id: t, onSubmit: n }) => /* @__PURE__ */ k("form", {
|
|
1552
|
+
id: t,
|
|
1553
|
+
onSubmit: n,
|
|
1553
1554
|
className: "tg:mx-auto tg:max-w-2xl tg:gap-y-3",
|
|
1554
1555
|
children: e
|
|
1555
|
-
}), Lt = ({ children:
|
|
1556
|
-
let
|
|
1557
|
-
return
|
|
1556
|
+
}), Lt = ({ children: e, missingFields: t = [] }) => {
|
|
1557
|
+
let n = t.length > 0, r = p();
|
|
1558
|
+
return n ? /* @__PURE__ */ k(Me, { children: /* @__PURE__ */ A(Ne, { children: [/* @__PURE__ */ k(Pe, {
|
|
1558
1559
|
asChild: !0,
|
|
1559
1560
|
children: /* @__PURE__ */ k("span", {
|
|
1560
1561
|
className: "tg:inline-flex",
|
|
1561
|
-
children:
|
|
1562
|
+
children: e
|
|
1562
1563
|
})
|
|
1563
1564
|
}), /* @__PURE__ */ k(Fe, { children: /* @__PURE__ */ A("div", {
|
|
1564
1565
|
className: "tg:space-y-1",
|
|
1565
1566
|
children: [/* @__PURE__ */ A("p", {
|
|
1566
1567
|
className: "tg:font-semibold",
|
|
1567
|
-
children: [
|
|
1568
|
+
children: [r("renderer.defaultSubmitButton.requiredFieldsMissing"), ":"]
|
|
1568
1569
|
}), /* @__PURE__ */ k("ul", {
|
|
1569
1570
|
className: "tg:list-inside tg:list-disc",
|
|
1570
|
-
children:
|
|
1571
|
+
children: t.map((e, t) => /* @__PURE__ */ k("li", { children: e }, t))
|
|
1571
1572
|
})]
|
|
1572
|
-
}) })] }) }) :
|
|
1573
|
-
}, Rt = ({ label:
|
|
1574
|
-
let
|
|
1573
|
+
}) })] }) }) : e;
|
|
1574
|
+
}, Rt = ({ label: e, children: t, canGoBack: n, isLastStep: r, canContinue: i, isSubmitting: a, onBack: o, onContinue: s, missingFields: c }) => {
|
|
1575
|
+
let l = p(), u = /* @__PURE__ */ A("button", {
|
|
1575
1576
|
type: "button",
|
|
1576
|
-
onClick:
|
|
1577
|
-
disabled: !
|
|
1578
|
-
className: "tg:rounded-md tg:bg-blue-500 tg:px-4 tg:py-2 tg:font-medium tg:text-sm tg:text-white tg:transition-colors tg:hover:bg-blue-600 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-blue-500 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50",
|
|
1579
|
-
children:
|
|
1577
|
+
onClick: s,
|
|
1578
|
+
disabled: !i || a,
|
|
1579
|
+
className: "tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:rounded-md tg:bg-blue-500 tg:px-4 tg:py-2 tg:font-medium tg:text-sm tg:text-white tg:transition-colors tg:hover:bg-blue-600 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-blue-500 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50",
|
|
1580
|
+
children: [a && /* @__PURE__ */ k(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), l(r ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")]
|
|
1580
1581
|
});
|
|
1581
1582
|
return /* @__PURE__ */ A("section", {
|
|
1582
1583
|
className: "tg:rounded-lg tg:border tg:p-4",
|
|
1583
1584
|
children: [
|
|
1584
|
-
|
|
1585
|
+
e && /* @__PURE__ */ k("h3", {
|
|
1585
1586
|
className: "tg:mb-4 tg:font-semibold tg:text-lg",
|
|
1586
|
-
children:
|
|
1587
|
+
children: e
|
|
1587
1588
|
}),
|
|
1588
|
-
|
|
1589
|
+
t,
|
|
1589
1590
|
/* @__PURE__ */ A("div", {
|
|
1590
1591
|
className: "tg:mt-6 tg:flex tg:items-center tg:justify-between tg:gap-2",
|
|
1591
|
-
children: [
|
|
1592
|
+
children: [n ? /* @__PURE__ */ k("button", {
|
|
1592
1593
|
type: "button",
|
|
1593
|
-
onClick:
|
|
1594
|
-
disabled:
|
|
1594
|
+
onClick: o,
|
|
1595
|
+
disabled: a,
|
|
1595
1596
|
className: "tg:rounded-md tg:border tg:border-input tg:bg-background tg:px-4 tg:py-2 tg:font-medium tg:text-sm tg:transition-colors tg:hover:bg-accent tg:disabled:cursor-not-allowed tg:disabled:opacity-50",
|
|
1596
|
-
children:
|
|
1597
|
-
}), /* @__PURE__ */ k(Lt, {
|
|
1598
|
-
missingFields:
|
|
1599
|
-
children:
|
|
1597
|
+
children: l("renderer.step.back")
|
|
1598
|
+
}) : /* @__PURE__ */ k("span", {}), /* @__PURE__ */ k(Lt, {
|
|
1599
|
+
missingFields: c,
|
|
1600
|
+
children: u
|
|
1600
1601
|
})]
|
|
1601
1602
|
})
|
|
1602
1603
|
]
|
|
1603
1604
|
});
|
|
1604
|
-
}, zt = S(({ label:
|
|
1605
|
-
let f =
|
|
1606
|
-
return /* @__PURE__ */
|
|
1605
|
+
}, zt = S(({ label: e, id: t, disabled: n, isSubmitting: r, onBlur: i, onClick: a, onFocus: o, onPointerDown: s, onPointerLeave: c, onPointerMove: l, ...u }, d) => {
|
|
1606
|
+
let f = p();
|
|
1607
|
+
return /* @__PURE__ */ A("button", {
|
|
1607
1608
|
ref: d,
|
|
1608
|
-
id:
|
|
1609
|
+
id: t,
|
|
1609
1610
|
onBlur: i,
|
|
1610
1611
|
onClick: a,
|
|
1611
1612
|
onFocus: o,
|
|
1612
1613
|
onPointerDown: s,
|
|
1613
|
-
disabled: r,
|
|
1614
|
+
disabled: n || r,
|
|
1614
1615
|
onPointerLeave: c,
|
|
1615
1616
|
onPointerMove: l,
|
|
1616
1617
|
type: "submit",
|
|
1617
|
-
className: "tg:mt-4 tg:rounded-md tg:bg-blue-500 tg:px-4 tg:py-2 tg:font-medium tg:text-white tg:transition-colors tg:hover:bg-blue-600 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-blue-500 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50",
|
|
1618
|
+
className: "tg:mt-4 tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:rounded-md tg:bg-blue-500 tg:px-4 tg:py-2 tg:font-medium tg:text-white tg:transition-colors tg:hover:bg-blue-600 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-blue-500 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50",
|
|
1618
1619
|
...u,
|
|
1619
|
-
children:
|
|
1620
|
+
children: [r && /* @__PURE__ */ k(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), e || f("renderer.defaultSubmitButton.submit")]
|
|
1620
1621
|
});
|
|
1621
|
-
}), Bt = ({ node:
|
|
1622
|
-
let
|
|
1623
|
-
return
|
|
1622
|
+
}), Bt = ({ node: e }) => {
|
|
1623
|
+
let t = p()(e.data?.label);
|
|
1624
|
+
return t ? /* @__PURE__ */ A("div", {
|
|
1624
1625
|
className: "tg:flex tg:items-center tg:gap-x-3",
|
|
1625
1626
|
children: [
|
|
1626
1627
|
/* @__PURE__ */ k(Ie, { className: "tg:my-8 tg:flex-1" }),
|
|
1627
1628
|
/* @__PURE__ */ k("h4", {
|
|
1628
1629
|
className: "tg:font-semibold tg:text-sm",
|
|
1629
|
-
children:
|
|
1630
|
+
children: t
|
|
1630
1631
|
}),
|
|
1631
1632
|
/* @__PURE__ */ k(Ie, { className: "tg:my-8 tg:flex-1" })
|
|
1632
1633
|
]
|
|
1633
1634
|
}) : /* @__PURE__ */ k(Ie, { className: "tg:my-8" });
|
|
1634
|
-
}, Vt = ({ node:
|
|
1635
|
-
let { edges:
|
|
1635
|
+
}, Vt = ({ node: e }) => {
|
|
1636
|
+
let { edges: t } = a(), n = p();
|
|
1636
1637
|
return /* @__PURE__ */ k("h2", {
|
|
1637
|
-
className: q("tg:mb-5 tg:font-bold tg:text-2xl", !g(
|
|
1638
|
-
children:
|
|
1638
|
+
className: q("tg:mb-5 tg:font-bold tg:text-2xl", !g(e.id, t) && "tg:mt-10"),
|
|
1639
|
+
children: n(e.data?.label)
|
|
1639
1640
|
});
|
|
1640
1641
|
}, Ht = {
|
|
1641
1642
|
divider: Bt,
|
|
@@ -1685,99 +1686,122 @@ var Gt = () => /* @__PURE__ */ A("section", {
|
|
|
1685
1686
|
href: "treege-renderer",
|
|
1686
1687
|
precedence: "default",
|
|
1687
1688
|
children: Kt
|
|
1688
|
-
}), Jt = ({ baseUrl: e, components: t, className: n, flow: r, googleApiKey:
|
|
1689
|
-
let { canContinueStep:
|
|
1689
|
+
}), Jt = ({ baseUrl: e, components: t, className: n, flow: r, formId: a, googleApiKey: o, headers: s, language: c, onBack: l, onChange: u, onSubmit: d, theme: p, validate: m, validationMode: g, initialValues: v = {}, isLoading: y = !1, isSubmitting: b = !1 }) => {
|
|
1690
|
+
let { canContinueStep: x, canSubmit: S, clearSubmitMessage: w, config: T, currentStep: E, currentStepGroupNode: O, currentStepIndex: te, firstErrorFieldId: j, formErrors: M, formValues: N, goToNextStep: P, goToPreviousStep: ne, handleSubmit: re, inputNodes: F, isFirstStep: I, isLastStep: L, isSubmitting: R, missingRequiredFields: ie, setFieldValue: ae, steps: oe, submitMessage: z, t: B } = f({
|
|
1690
1691
|
baseUrl: e,
|
|
1691
1692
|
components: t,
|
|
1692
1693
|
flow: r,
|
|
1693
|
-
googleApiKey:
|
|
1694
|
-
headers:
|
|
1695
|
-
initialValues:
|
|
1696
|
-
language:
|
|
1697
|
-
onChange:
|
|
1698
|
-
onSubmit:
|
|
1699
|
-
theme:
|
|
1700
|
-
validate:
|
|
1701
|
-
validationMode:
|
|
1702
|
-
}), [
|
|
1703
|
-
config:
|
|
1694
|
+
googleApiKey: o,
|
|
1695
|
+
headers: s,
|
|
1696
|
+
initialValues: v,
|
|
1697
|
+
language: c,
|
|
1698
|
+
onChange: u,
|
|
1699
|
+
onSubmit: d,
|
|
1700
|
+
theme: p,
|
|
1701
|
+
validate: m,
|
|
1702
|
+
validationMode: g
|
|
1703
|
+
}), [se, ce] = D(null), V = b || R, { FormWrapper: H, renderNode: U } = h({
|
|
1704
|
+
config: T,
|
|
1704
1705
|
DefaultFormWrapper: It,
|
|
1705
1706
|
DefaultInputWrapper: Ut,
|
|
1706
1707
|
DefaultSubmitButton: zt,
|
|
1707
1708
|
DefaultSubmitButtonWrapper: Lt,
|
|
1708
1709
|
defaultInputRenderers: rn,
|
|
1709
1710
|
defaultUI: Ht,
|
|
1710
|
-
formErrors:
|
|
1711
|
-
formValues:
|
|
1712
|
-
inputNodes:
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
M();
|
|
1711
|
+
formErrors: M,
|
|
1712
|
+
formValues: N,
|
|
1713
|
+
inputNodes: F,
|
|
1714
|
+
isSubmitting: V,
|
|
1715
|
+
missingRequiredFields: ie,
|
|
1716
|
+
setFieldValue: ae
|
|
1717
|
+
}), le = T.components.step ?? Rt, W = T.components.loadingSkeleton ?? Gt, G = ee(() => B(O?.data?.label), [B, O]), ue = C(async (e) => {
|
|
1718
|
+
if (e.preventDefault(), !L) {
|
|
1719
|
+
x && P();
|
|
1720
1720
|
return;
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1722
|
+
!await re() && j && document.getElementById(j)?.focus();
|
|
1723
1723
|
}, [
|
|
1724
|
+
L,
|
|
1725
|
+
x,
|
|
1724
1726
|
P,
|
|
1725
|
-
|
|
1727
|
+
re,
|
|
1728
|
+
j
|
|
1729
|
+
]), de = C(() => {
|
|
1730
|
+
if (L) {
|
|
1731
|
+
re();
|
|
1732
|
+
return;
|
|
1733
|
+
}
|
|
1734
|
+
P();
|
|
1735
|
+
}, [
|
|
1736
|
+
L,
|
|
1737
|
+
re,
|
|
1738
|
+
P
|
|
1739
|
+
]), K = C(() => {
|
|
1740
|
+
if (I) {
|
|
1741
|
+
l?.();
|
|
1742
|
+
return;
|
|
1743
|
+
}
|
|
1744
|
+
ne();
|
|
1745
|
+
}, [
|
|
1746
|
+
I,
|
|
1747
|
+
l,
|
|
1726
1748
|
ne
|
|
1727
|
-
]);
|
|
1749
|
+
]), fe = !I || !!l;
|
|
1728
1750
|
return /* @__PURE__ */ k("div", {
|
|
1729
|
-
ref:
|
|
1751
|
+
ref: ce,
|
|
1730
1752
|
className: q("treege treege-renderer", n),
|
|
1731
1753
|
children: /* @__PURE__ */ A(ve, {
|
|
1732
|
-
container:
|
|
1754
|
+
container: se,
|
|
1733
1755
|
children: [/* @__PURE__ */ k(qt, {}), /* @__PURE__ */ k(_, {
|
|
1734
|
-
theme:
|
|
1756
|
+
theme: T.theme,
|
|
1735
1757
|
storageKey: "treege-renderer-theme",
|
|
1736
|
-
children:
|
|
1758
|
+
children: y ? /* @__PURE__ */ k(W, {}) : /* @__PURE__ */ A(i, {
|
|
1737
1759
|
value: {
|
|
1738
|
-
baseUrl:
|
|
1760
|
+
baseUrl: T.baseUrl,
|
|
1739
1761
|
flow: r,
|
|
1740
|
-
formErrors:
|
|
1741
|
-
formValues:
|
|
1742
|
-
googleApiKey:
|
|
1743
|
-
headers:
|
|
1744
|
-
inputNodes:
|
|
1745
|
-
language:
|
|
1746
|
-
setFieldValue:
|
|
1762
|
+
formErrors: M,
|
|
1763
|
+
formValues: N,
|
|
1764
|
+
googleApiKey: T.googleApiKey,
|
|
1765
|
+
headers: T.headers,
|
|
1766
|
+
inputNodes: F,
|
|
1767
|
+
language: T.language,
|
|
1768
|
+
setFieldValue: ae
|
|
1747
1769
|
},
|
|
1748
|
-
children: [/* @__PURE__ */ A(
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1770
|
+
children: [/* @__PURE__ */ A(H, {
|
|
1771
|
+
id: a,
|
|
1772
|
+
onSubmit: ue,
|
|
1773
|
+
children: [E && /* @__PURE__ */ k(le, {
|
|
1774
|
+
step: E,
|
|
1775
|
+
groupNode: O,
|
|
1776
|
+
stepIndex: te,
|
|
1777
|
+
totalSteps: oe.length,
|
|
1778
|
+
isFirstStep: I,
|
|
1779
|
+
isLastStep: L,
|
|
1780
|
+
canContinue: x && (!L || S),
|
|
1781
|
+
canGoBack: fe,
|
|
1782
|
+
isSubmitting: V,
|
|
1783
|
+
onBack: K,
|
|
1784
|
+
onContinue: de,
|
|
1785
|
+
label: G,
|
|
1786
|
+
missingFields: L ? ie : void 0,
|
|
1787
|
+
children: E.nodes.map((e) => U(e))
|
|
1764
1788
|
}), /* @__PURE__ */ k("p", {
|
|
1765
1789
|
className: "tg:py-2 tg:text-right tg:text-muted-foreground tg:text-xs",
|
|
1766
1790
|
children: "Powered by Treege"
|
|
1767
1791
|
})]
|
|
1768
|
-
}),
|
|
1769
|
-
className: `tg:my-4 tg:rounded-md tg:p-4 ${
|
|
1792
|
+
}), z && /* @__PURE__ */ k("div", {
|
|
1793
|
+
className: `tg:my-4 tg:rounded-md tg:p-4 ${z.type === "success" ? "bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-300" : "bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-300"}`,
|
|
1770
1794
|
role: "alert",
|
|
1771
1795
|
children: /* @__PURE__ */ A("div", {
|
|
1772
1796
|
className: "tg:flex tg:items-center tg:justify-between",
|
|
1773
1797
|
children: [/* @__PURE__ */ k("p", {
|
|
1774
1798
|
className: "tg:font-medium tg:text-sm",
|
|
1775
|
-
children:
|
|
1799
|
+
children: z.message
|
|
1776
1800
|
}), /* @__PURE__ */ k("button", {
|
|
1777
1801
|
type: "button",
|
|
1778
|
-
onClick:
|
|
1802
|
+
onClick: w,
|
|
1779
1803
|
className: "tg:ml-4 tg:font-medium tg:text-sm tg:underline tg:hover:no-underline tg:focus:outline-none",
|
|
1780
|
-
children:
|
|
1804
|
+
children: B("common.close")
|
|
1781
1805
|
})]
|
|
1782
1806
|
})
|
|
1783
1807
|
})]
|
|
@@ -1786,12 +1810,13 @@ var Gt = () => /* @__PURE__ */ A("section", {
|
|
|
1786
1810
|
})
|
|
1787
1811
|
});
|
|
1788
1812
|
}, Yt = (e, t) => {
|
|
1789
|
-
let { missingRequiredFields: n, isSubmitting: r, label: i } = t, a =
|
|
1813
|
+
let { missingRequiredFields: n, isSubmitting: r, label: i } = t, a = u(), o = a?.components?.submitButton, s = a?.components?.submitButtonWrapper;
|
|
1790
1814
|
return /* @__PURE__ */ k(s || Lt, {
|
|
1791
1815
|
missingFields: n,
|
|
1792
1816
|
children: /* @__PURE__ */ k(o || zt, {
|
|
1793
1817
|
label: i,
|
|
1794
|
-
disabled: r
|
|
1818
|
+
disabled: r,
|
|
1819
|
+
isSubmitting: r
|
|
1795
1820
|
})
|
|
1796
1821
|
});
|
|
1797
1822
|
};
|
|
@@ -1918,18 +1943,18 @@ var $t = (e, t) => {
|
|
|
1918
1943
|
u && !c && /* @__PURE__ */ k(Y, { children: u })
|
|
1919
1944
|
]
|
|
1920
1945
|
});
|
|
1921
|
-
}, nn = (
|
|
1922
|
-
let { id:
|
|
1923
|
-
|
|
1946
|
+
}, nn = (e, t) => {
|
|
1947
|
+
let { id: n, name: r, value: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, u = p(), d = Array.isArray(i) ? i : [], f = d[0] || "", m = d[1] || "", h = (e) => {
|
|
1948
|
+
o([e, m]);
|
|
1924
1949
|
}, g = (e) => {
|
|
1925
|
-
|
|
1950
|
+
o([f, e]);
|
|
1926
1951
|
};
|
|
1927
1952
|
return /* @__PURE__ */ A(J, {
|
|
1928
1953
|
className: "tg:mb-4",
|
|
1929
1954
|
children: [
|
|
1930
1955
|
/* @__PURE__ */ A(Q, {
|
|
1931
|
-
htmlFor: `${
|
|
1932
|
-
children: [
|
|
1956
|
+
htmlFor: `${n}-start`,
|
|
1957
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ k("span", {
|
|
1933
1958
|
className: "tg:text-red-500",
|
|
1934
1959
|
children: "*"
|
|
1935
1960
|
})]
|
|
@@ -1937,31 +1962,31 @@ var $t = (e, t) => {
|
|
|
1937
1962
|
/* @__PURE__ */ A("div", {
|
|
1938
1963
|
className: "tg:flex tg:gap-2",
|
|
1939
1964
|
children: [/* @__PURE__ */ k(Z, {
|
|
1940
|
-
id: `${
|
|
1941
|
-
name: `${
|
|
1942
|
-
"aria-label": `${
|
|
1943
|
-
"aria-invalid": !!
|
|
1944
|
-
"aria-describedby":
|
|
1965
|
+
id: `${n}-start`,
|
|
1966
|
+
name: `${r}-start`,
|
|
1967
|
+
"aria-label": `${c || a.data.name} - ${u("renderer.defaultInputs.startTime")}`,
|
|
1968
|
+
"aria-invalid": !!s,
|
|
1969
|
+
"aria-describedby": s ? `${a.id}-error` : void 0,
|
|
1945
1970
|
type: "time",
|
|
1946
|
-
value:
|
|
1971
|
+
value: f,
|
|
1947
1972
|
onChange: (e) => h(e.target.value),
|
|
1948
|
-
placeholder:
|
|
1973
|
+
placeholder: u("renderer.defaultInputs.startTime"),
|
|
1949
1974
|
className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
|
|
1950
1975
|
}), /* @__PURE__ */ k(Z, {
|
|
1951
|
-
id: `${
|
|
1952
|
-
name: `${
|
|
1953
|
-
"aria-label": `${
|
|
1954
|
-
"aria-invalid": !!
|
|
1955
|
-
"aria-describedby":
|
|
1976
|
+
id: `${n}-end`,
|
|
1977
|
+
name: `${r}-end`,
|
|
1978
|
+
"aria-label": `${c || a.data.name} - ${u("renderer.defaultInputs.endTime")}`,
|
|
1979
|
+
"aria-invalid": !!s,
|
|
1980
|
+
"aria-describedby": s ? `${a.id}-error` : void 0,
|
|
1956
1981
|
type: "time",
|
|
1957
1982
|
value: m,
|
|
1958
1983
|
onChange: (e) => g(e.target.value),
|
|
1959
|
-
placeholder:
|
|
1984
|
+
placeholder: u("renderer.defaultInputs.endTime"),
|
|
1960
1985
|
className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
|
|
1961
1986
|
})]
|
|
1962
1987
|
}),
|
|
1963
|
-
|
|
1964
|
-
|
|
1988
|
+
s && /* @__PURE__ */ k(X, { children: s }),
|
|
1989
|
+
l && !s && /* @__PURE__ */ k(Y, { children: l })
|
|
1965
1990
|
]
|
|
1966
1991
|
});
|
|
1967
1992
|
}, rn = {
|