treege 3.0.0-beta.40 → 3.0.0-beta.41
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/dist/{DefaultInputs-8yJMEyMh.js → DefaultInputs-xMZhO-ry.js} +372 -371
- package/dist/ThemeContext-Ejgu9Mwr.js +1 -1
- package/dist/{editor-DWJ95r4g.js → editor-sMVFoMxL.js} +290 -290
- package/dist/editor.js +1 -1
- package/dist/main.js +2 -2
- package/dist/renderer.js +1 -1
- package/package.json +7 -8
|
@@ -6,7 +6,7 @@ import { forwardRef as D, useCallback as O, useEffect as k, useMemo as ne, useRe
|
|
|
6
6
|
import { Slot as M } from "@radix-ui/react-slot";
|
|
7
7
|
import { cva as N } from "class-variance-authority";
|
|
8
8
|
import { clsx as P } from "clsx";
|
|
9
|
-
import {
|
|
9
|
+
import { extendTailwindMerge as F } from "tailwind-merge";
|
|
10
10
|
import * as I from "@radix-ui/react-checkbox";
|
|
11
11
|
import * as re from "@radix-ui/react-label";
|
|
12
12
|
import * as L from "@radix-ui/react-popover";
|
|
@@ -19,40 +19,41 @@ import * as U from "@radix-ui/react-radio-group";
|
|
|
19
19
|
import * as ae from "@radix-ui/react-separator";
|
|
20
20
|
import * as oe from "@radix-ui/react-switch";
|
|
21
21
|
//#region src/shared/lib/utils.ts
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
var W = F({ prefix: "tg" });
|
|
23
|
+
function G(...e) {
|
|
24
|
+
return W(P(e));
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/shared/components/ui/button.tsx
|
|
27
|
-
var
|
|
28
|
+
var se = N("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", {
|
|
28
29
|
defaultVariants: {
|
|
29
30
|
size: "default",
|
|
30
31
|
variant: "default"
|
|
31
32
|
},
|
|
32
33
|
variants: {
|
|
33
34
|
size: {
|
|
34
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
35
|
-
icon: "size-9",
|
|
36
|
-
"icon-lg": "size-10",
|
|
37
|
-
"icon-sm": "size-8",
|
|
38
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
39
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
40
|
-
xs: "h-6 rounded-md gap-1 px-2 text-xs has-[>svg]:px-1.5"
|
|
35
|
+
default: "tg:h-9 tg:px-4 tg:py-2 tg:has-[>svg]:px-3",
|
|
36
|
+
icon: "tg:size-9",
|
|
37
|
+
"icon-lg": "tg:size-10",
|
|
38
|
+
"icon-sm": "tg:size-8",
|
|
39
|
+
lg: "tg:h-10 tg:rounded-md tg:px-6 tg:has-[>svg]:px-4",
|
|
40
|
+
sm: "tg:h-8 tg:rounded-md tg:gap-1.5 tg:px-3 tg:has-[>svg]:px-2.5",
|
|
41
|
+
xs: "tg:h-6 tg:rounded-md tg:gap-1 tg:px-2 tg:text-xs tg:has-[>svg]:px-1.5"
|
|
41
42
|
},
|
|
42
43
|
variant: {
|
|
43
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
44
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
45
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
46
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
47
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
48
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
44
|
+
default: "tg:bg-primary tg:text-primary-foreground tg:hover:bg-primary/90",
|
|
45
|
+
destructive: "tg:bg-destructive tg:text-white tg:hover:bg-destructive/90 tg:focus-visible:ring-destructive/20 tg:dark:focus-visible:ring-destructive/40 tg:dark:bg-destructive/60",
|
|
46
|
+
ghost: "tg:hover:bg-accent tg:hover:text-accent-foreground tg:dark:hover:bg-accent/50",
|
|
47
|
+
link: "tg:text-primary tg:underline-offset-4 tg:hover:underline",
|
|
48
|
+
outline: "tg:border tg:bg-background tg:shadow-xs tg:hover:bg-accent tg:hover:text-accent-foreground tg:dark:bg-input/30 tg:dark:border-input tg:dark:hover:bg-input/50",
|
|
49
|
+
secondary: "tg:bg-secondary tg:text-secondary-foreground tg:hover:bg-secondary/80"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
53
|
function K({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
|
|
53
54
|
return /* @__PURE__ */ m(r ? M : "button", {
|
|
54
55
|
"data-slot": "button",
|
|
55
|
-
className:
|
|
56
|
+
className: G(se({
|
|
56
57
|
className: e,
|
|
57
58
|
size: n,
|
|
58
59
|
variant: t
|
|
@@ -62,15 +63,15 @@ function K({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
|
|
|
62
63
|
}
|
|
63
64
|
//#endregion
|
|
64
65
|
//#region src/shared/components/ui/checkbox.tsx
|
|
65
|
-
function
|
|
66
|
+
function ce({ className: e, ...t }) {
|
|
66
67
|
return /* @__PURE__ */ m(I.Root, {
|
|
67
68
|
"data-slot": "checkbox",
|
|
68
|
-
className:
|
|
69
|
+
className: G("tg:peer tg:size-4 tg:shrink-0 tg:rounded-[4px] tg:border tg:border-input tg:shadow-xs tg:outline-none tg:transition-shadow tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[state=checked]:border-primary tg:data-[state=checked]:bg-primary tg:data-[state=checked]:text-primary-foreground tg:dark:bg-input/30 tg:dark:data-[state=checked]:bg-primary tg:dark:aria-invalid:ring-destructive/40", e),
|
|
69
70
|
...t,
|
|
70
71
|
children: /* @__PURE__ */ m(I.Indicator, {
|
|
71
72
|
"data-slot": "checkbox-indicator",
|
|
72
|
-
className: "grid place-content-center text-current transition-none",
|
|
73
|
-
children: /* @__PURE__ */ m(_, { className: "size-3.5" })
|
|
73
|
+
className: "tg:grid tg:place-content-center tg:text-current tg:transition-none",
|
|
74
|
+
children: /* @__PURE__ */ m(_, { className: "tg:size-3.5" })
|
|
74
75
|
})
|
|
75
76
|
});
|
|
76
77
|
}
|
|
@@ -79,21 +80,21 @@ function se({ className: e, ...t }) {
|
|
|
79
80
|
function q({ className: e, ...t }) {
|
|
80
81
|
return /* @__PURE__ */ m("div", {
|
|
81
82
|
"data-slot": "form-item",
|
|
82
|
-
className:
|
|
83
|
+
className: G("tg:grid tg:gap-2", e),
|
|
83
84
|
...t
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
function J({ className: e, ...t }) {
|
|
87
88
|
return /* @__PURE__ */ m("p", {
|
|
88
89
|
"data-slot": "form-description",
|
|
89
|
-
className:
|
|
90
|
+
className: G("tg:text-muted-foreground tg:text-xs", e),
|
|
90
91
|
...t
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
94
|
function Y({ className: e, ...t }) {
|
|
94
95
|
return /* @__PURE__ */ m("p", {
|
|
95
96
|
"data-slot": "form-error",
|
|
96
|
-
className:
|
|
97
|
+
className: G("tg:text-destructive tg:text-xs", e),
|
|
97
98
|
...t
|
|
98
99
|
});
|
|
99
100
|
}
|
|
@@ -103,7 +104,7 @@ function X({ className: e, type: t, ...n }) {
|
|
|
103
104
|
return /* @__PURE__ */ m("input", {
|
|
104
105
|
type: t,
|
|
105
106
|
"data-slot": "input",
|
|
106
|
-
className:
|
|
107
|
+
className: G("tg:h-9 tg:w-full tg:min-w-0 tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-1 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:selection:bg-primary tg:selection:text-primary-foreground tg:file:inline-flex tg:file:h-7 tg:file:border-0 tg:file:bg-transparent tg:file:font-medium tg:file:text-foreground tg:file:text-sm tg:placeholder:text-muted-foreground tg:disabled:pointer-events-none tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:md:text-sm tg:dark:bg-input/30", "tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50", "tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40", e),
|
|
107
108
|
...n
|
|
108
109
|
});
|
|
109
110
|
}
|
|
@@ -111,7 +112,7 @@ function X({ className: e, type: t, ...n }) {
|
|
|
111
112
|
//#region src/shared/components/ui/label.tsx
|
|
112
113
|
var Z = ({ className: e, ...t }) => /* @__PURE__ */ m(re.Root, {
|
|
113
114
|
"data-slot": "label",
|
|
114
|
-
className:
|
|
115
|
+
className: G("tg:flex tg:select-none tg:items-center tg:gap-2 tg:font-medium tg:text-muted-foreground tg:text-sm tg:leading-none tg:peer-disabled:cursor-not-allowed tg:peer-disabled:opacity-50 tg:group-data-[disabled=true]:pointer-events-none tg:group-data-[disabled=true]:opacity-50", e),
|
|
115
116
|
...t
|
|
116
117
|
});
|
|
117
118
|
//#endregion
|
|
@@ -122,210 +123,210 @@ function Q({ ...e }) {
|
|
|
122
123
|
...e
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function $({ ...e }) {
|
|
126
127
|
return /* @__PURE__ */ m(L.Trigger, {
|
|
127
128
|
"data-slot": "popover-trigger",
|
|
128
129
|
...e
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function le({ className: e, align: t = "center", sideOffset: n = 4, disablePortal: r = !1, ...i }) {
|
|
132
133
|
let a = /* @__PURE__ */ m(L.Content, {
|
|
133
134
|
"data-slot": "popover-content",
|
|
134
135
|
align: t,
|
|
135
136
|
sideOffset: n,
|
|
136
|
-
className:
|
|
137
|
+
className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-50 tg:w-72 tg:origin-(--radix-popover-content-transform-origin) tg:rounded-md tg:border tg:bg-popover tg:p-4 tg:text-popover-foreground tg:shadow-md tg:outline-hidden tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
|
|
137
138
|
...i
|
|
138
139
|
});
|
|
139
140
|
return r ? a : /* @__PURE__ */ m(L.Portal, { children: a });
|
|
140
141
|
}
|
|
141
142
|
//#endregion
|
|
142
143
|
//#region src/shared/components/ui/select.tsx
|
|
143
|
-
var
|
|
144
|
+
var ue = ({ ...e }) => /* @__PURE__ */ m(R.Root, {
|
|
144
145
|
"data-slot": "select",
|
|
145
146
|
...e
|
|
146
|
-
}),
|
|
147
|
+
}), de = ({ ...e }) => /* @__PURE__ */ m(R.Group, {
|
|
147
148
|
"data-slot": "select-group",
|
|
148
149
|
...e
|
|
149
|
-
}),
|
|
150
|
+
}), fe = ({ ...e }) => /* @__PURE__ */ m(R.Value, {
|
|
150
151
|
"data-slot": "select-value",
|
|
151
152
|
...e
|
|
152
|
-
}),
|
|
153
|
+
}), pe = ({ className: e, size: t = "default", children: n, ...r }) => /* @__PURE__ */ h(R.Trigger, {
|
|
153
154
|
"data-slot": "select-trigger",
|
|
154
155
|
"data-size": t,
|
|
155
|
-
className:
|
|
156
|
+
className: G("tg:flex tg:w-fit tg:items-center tg:justify-between tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-sm tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[size=default]:h-9 tg:data-[size=sm]:h-8 tg:data-[placeholder]:text-muted-foreground tg:*:data-[slot=select-value]:line-clamp-1 tg:*:data-[slot=select-value]:flex tg:*:data-[slot=select-value]:items-center tg:*:data-[slot=select-value]:gap-2 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40 tg:dark:hover:bg-input/50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
|
|
156
157
|
...r,
|
|
157
158
|
children: [n, /* @__PURE__ */ m(R.Icon, {
|
|
158
159
|
asChild: !0,
|
|
159
|
-
children: /* @__PURE__ */ m(v, { className: "size-4 opacity-50" })
|
|
160
|
+
children: /* @__PURE__ */ m(v, { className: "tg:size-4 tg:opacity-50" })
|
|
160
161
|
})]
|
|
161
|
-
}),
|
|
162
|
+
}), me = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ m(R.Portal, { children: /* @__PURE__ */ h(R.Content, {
|
|
162
163
|
"data-slot": "select-content",
|
|
163
|
-
className:
|
|
164
|
+
className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:relative tg:z-50 tg:max-h-(--radix-select-content-available-height) tg:min-w-[8rem] tg:origin-(--radix-select-content-transform-origin) tg:overflow-y-auto tg:overflow-x-hidden tg:rounded-md tg:border tg:bg-popover tg:text-popover-foreground tg:shadow-md tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", n === "popper" && "tg:data-[side=left]:-translate-x-1 tg:data-[side=top]:-translate-y-1 tg:data-[side=right]:translate-x-1 tg:data-[side=bottom]:translate-y-1", e),
|
|
164
165
|
position: n,
|
|
165
166
|
...r,
|
|
166
167
|
children: [
|
|
167
|
-
/* @__PURE__ */ m(
|
|
168
|
+
/* @__PURE__ */ m(ve, {}),
|
|
168
169
|
/* @__PURE__ */ m(R.Viewport, {
|
|
169
|
-
className:
|
|
170
|
+
className: G("tg:p-1", n === "popper" && "tg:h-[var(--radix-select-trigger-height)] tg:w-full tg:min-w-[var(--radix-select-trigger-width)] tg:scroll-my-1"),
|
|
170
171
|
children: t
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */ m(
|
|
173
|
+
/* @__PURE__ */ m(ye, {})
|
|
173
174
|
]
|
|
174
|
-
}) }),
|
|
175
|
+
}) }), he = ({ className: e, htmlFor: t, children: n, ...r }) => /* @__PURE__ */ m(R.Label, {
|
|
175
176
|
"data-slot": "select-label",
|
|
176
|
-
className:
|
|
177
|
+
className: G("tg:pb-1.5 tg:font-medium tg:text-muted-foreground tg:text-sm", e),
|
|
177
178
|
...r,
|
|
178
179
|
children: /* @__PURE__ */ m("label", {
|
|
179
180
|
htmlFor: t,
|
|
180
181
|
children: n
|
|
181
182
|
})
|
|
182
|
-
}),
|
|
183
|
+
}), ge = ({ className: e, children: t, ...n }) => /* @__PURE__ */ h(R.Item, {
|
|
183
184
|
"data-slot": "select-item",
|
|
184
|
-
className:
|
|
185
|
+
className: G("tg:relative tg:flex tg:w-full tg:cursor-pointer tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:py-1.5 tg:pr-8 tg:pl-2 tg:text-sm tg:outline-hidden tg:focus:bg-accent tg:focus:text-accent-foreground tg:data-[disabled]:pointer-events-none tg:data-[disabled]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0 tg:*:[span]:last:flex tg:*:[span]:last:items-center tg:*:[span]:last:gap-2", e),
|
|
185
186
|
...n,
|
|
186
187
|
children: [/* @__PURE__ */ m("span", {
|
|
187
|
-
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
188
|
-
children: /* @__PURE__ */ m(R.ItemIndicator, { children: /* @__PURE__ */ m(_, { className: "size-4" }) })
|
|
188
|
+
className: "tg:absolute tg:right-2 tg:flex tg:size-3.5 tg:items-center tg:justify-center",
|
|
189
|
+
children: /* @__PURE__ */ m(R.ItemIndicator, { children: /* @__PURE__ */ m(_, { className: "tg:size-4" }) })
|
|
189
190
|
}), /* @__PURE__ */ m(R.ItemText, { children: t })]
|
|
190
|
-
}),
|
|
191
|
+
}), _e = ({ className: e, ...t }) => /* @__PURE__ */ m(R.Separator, {
|
|
191
192
|
"data-slot": "select-separator",
|
|
192
|
-
className:
|
|
193
|
+
className: G("tg:-mx-1 tg:pointer-events-none tg:my-1 tg:h-px tg:bg-border", e),
|
|
193
194
|
...t
|
|
194
|
-
}),
|
|
195
|
+
}), ve = ({ className: e, ...t }) => /* @__PURE__ */ m(R.ScrollUpButton, {
|
|
195
196
|
"data-slot": "select-scroll-up-button",
|
|
196
|
-
className:
|
|
197
|
+
className: G("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
|
|
197
198
|
...t,
|
|
198
|
-
children: /* @__PURE__ */ m(x, { className: "size-4" })
|
|
199
|
-
}),
|
|
199
|
+
children: /* @__PURE__ */ m(x, { className: "tg:size-4" })
|
|
200
|
+
}), ye = ({ className: e, ...t }) => /* @__PURE__ */ m(R.ScrollDownButton, {
|
|
200
201
|
"data-slot": "select-scroll-down-button",
|
|
201
|
-
className:
|
|
202
|
+
className: G("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
|
|
202
203
|
...t,
|
|
203
|
-
children: /* @__PURE__ */ m(v, { className: "size-4" })
|
|
204
|
+
children: /* @__PURE__ */ m(v, { className: "tg:size-4" })
|
|
204
205
|
});
|
|
205
206
|
//#endregion
|
|
206
207
|
//#region src/shared/components/ui/dialog.tsx
|
|
207
|
-
function
|
|
208
|
+
function be({ ...e }) {
|
|
208
209
|
return /* @__PURE__ */ m(B.Root, {
|
|
209
210
|
"data-slot": "dialog",
|
|
210
211
|
...e
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function xe({ ...e }) {
|
|
214
215
|
return /* @__PURE__ */ m(B.Trigger, {
|
|
215
216
|
"data-slot": "dialog-trigger",
|
|
216
217
|
...e
|
|
217
218
|
});
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
+
function Se({ ...e }) {
|
|
220
221
|
return /* @__PURE__ */ m(B.Portal, {
|
|
221
222
|
"data-slot": "dialog-portal",
|
|
222
223
|
...e
|
|
223
224
|
});
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
+
function Ce({ className: e, ...t }) {
|
|
226
227
|
return /* @__PURE__ */ m(B.Overlay, {
|
|
227
228
|
"data-slot": "dialog-overlay",
|
|
228
|
-
className:
|
|
229
|
+
className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:fixed tg:inset-0 tg:z-50 tg:bg-black/50 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
|
|
229
230
|
...t
|
|
230
231
|
});
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
-
return /* @__PURE__ */ h(
|
|
233
|
+
function we({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
234
|
+
return /* @__PURE__ */ h(Se, {
|
|
234
235
|
"data-slot": "dialog-portal",
|
|
235
|
-
children: [/* @__PURE__ */ m(
|
|
236
|
+
children: [/* @__PURE__ */ m(Ce, {}), /* @__PURE__ */ h(B.Content, {
|
|
236
237
|
"data-slot": "dialog-content",
|
|
237
|
-
className:
|
|
238
|
+
className: G("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:fixed tg:top-[50%] tg:left-[50%] tg:z-50 tg:grid tg:w-full tg:max-w-[calc(100%-2rem)] tg:translate-x-[-50%] tg:translate-y-[-50%] tg:gap-4 tg:rounded-lg tg:border tg:bg-background tg:p-6 tg:shadow-lg tg:duration-200 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in tg:sm:max-w-lg", e),
|
|
238
239
|
...r,
|
|
239
240
|
children: [t, n && /* @__PURE__ */ h(B.Close, {
|
|
240
241
|
"data-slot": "dialog-close",
|
|
241
|
-
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
242
|
+
className: "tg:absolute tg:top-4 tg:right-4 tg:rounded-xs tg:opacity-70 tg:ring-offset-background tg:transition-opacity tg:hover:opacity-100 tg:focus:outline-hidden tg:focus:ring-2 tg:focus:ring-ring tg:focus:ring-offset-2 tg:disabled:pointer-events-none tg:data-[state=open]:bg-accent tg:data-[state=open]:text-muted-foreground tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0",
|
|
242
243
|
children: [/* @__PURE__ */ m(te, {}), /* @__PURE__ */ m("span", {
|
|
243
|
-
className: "sr-only",
|
|
244
|
+
className: "tg:sr-only",
|
|
244
245
|
children: "Close"
|
|
245
246
|
})]
|
|
246
247
|
})]
|
|
247
248
|
})]
|
|
248
249
|
});
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
+
function Te({ className: e, ...t }) {
|
|
251
252
|
return /* @__PURE__ */ m("div", {
|
|
252
253
|
"data-slot": "dialog-header",
|
|
253
|
-
className:
|
|
254
|
+
className: G("tg:flex tg:flex-col tg:gap-2 tg:text-center tg:sm:text-left", e),
|
|
254
255
|
...t
|
|
255
256
|
});
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
+
function Ee({ className: e, ...t }) {
|
|
258
259
|
return /* @__PURE__ */ m("div", {
|
|
259
260
|
"data-slot": "dialog-footer",
|
|
260
|
-
className:
|
|
261
|
+
className: G("tg:flex tg:flex-col-reverse tg:gap-2 tg:sm:flex-row tg:sm:justify-end", e),
|
|
261
262
|
...t
|
|
262
263
|
});
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function De({ className: e, ...t }) {
|
|
265
266
|
return /* @__PURE__ */ m(B.Title, {
|
|
266
267
|
"data-slot": "dialog-title",
|
|
267
|
-
className:
|
|
268
|
+
className: G("tg:font-semibold tg:text-lg tg:leading-none", e),
|
|
268
269
|
...t
|
|
269
270
|
});
|
|
270
271
|
}
|
|
271
|
-
function
|
|
272
|
+
function Oe({ className: e, ...t }) {
|
|
272
273
|
return /* @__PURE__ */ m(B.Description, {
|
|
273
274
|
"data-slot": "dialog-description",
|
|
274
|
-
className:
|
|
275
|
+
className: G("tg:text-muted-foreground tg:text-sm", e),
|
|
275
276
|
...t
|
|
276
277
|
});
|
|
277
278
|
}
|
|
278
279
|
//#endregion
|
|
279
280
|
//#region src/shared/components/ui/command.tsx
|
|
280
|
-
function
|
|
281
|
+
function ke({ className: e, ...t }) {
|
|
281
282
|
return /* @__PURE__ */ m(z, {
|
|
282
283
|
"data-slot": "command",
|
|
283
|
-
className:
|
|
284
|
+
className: G("tg:flex tg:h-full tg:w-full tg:flex-col tg:overflow-hidden tg:rounded-md tg:bg-popover tg:text-popover-foreground", e),
|
|
284
285
|
...t
|
|
285
286
|
});
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function Ae({ className: e, ...t }) {
|
|
288
289
|
return /* @__PURE__ */ h("div", {
|
|
289
290
|
"data-slot": "command-input-wrapper",
|
|
290
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
291
|
-
children: [/* @__PURE__ */ m(T, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ m(z.Input, {
|
|
291
|
+
className: "tg:flex tg:h-9 tg:items-center tg:gap-2 tg:border-b tg:px-3",
|
|
292
|
+
children: [/* @__PURE__ */ m(T, { className: "tg:size-4 tg:shrink-0 tg:opacity-50" }), /* @__PURE__ */ m(z.Input, {
|
|
292
293
|
"data-slot": "command-input",
|
|
293
|
-
className:
|
|
294
|
+
className: G("tg:flex tg:h-10 tg:w-full tg:rounded-md tg:bg-transparent tg:py-3 tg:text-sm tg:outline-hidden tg:placeholder:text-muted-foreground tg:disabled:cursor-not-allowed tg:disabled:opacity-50", e),
|
|
294
295
|
...t
|
|
295
296
|
})]
|
|
296
297
|
});
|
|
297
298
|
}
|
|
298
|
-
function
|
|
299
|
+
function je({ className: e, ...t }) {
|
|
299
300
|
return /* @__PURE__ */ m(z.List, {
|
|
300
301
|
"data-slot": "command-list",
|
|
301
|
-
className:
|
|
302
|
+
className: G("tg:max-h-[300px] tg:scroll-py-1 tg:overflow-y-auto tg:overflow-x-hidden", e),
|
|
302
303
|
...t
|
|
303
304
|
});
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
+
function Me({ ...e }) {
|
|
306
307
|
return /* @__PURE__ */ m(z.Empty, {
|
|
307
308
|
"data-slot": "command-empty",
|
|
308
|
-
className: "py-6 text-center text-sm",
|
|
309
|
+
className: "tg:py-6 tg:text-center tg:text-sm",
|
|
309
310
|
...e
|
|
310
311
|
});
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
+
function Ne({ className: e, ...t }) {
|
|
313
314
|
return /* @__PURE__ */ m(z.Group, {
|
|
314
315
|
"data-slot": "command-group",
|
|
315
|
-
className:
|
|
316
|
+
className: G("tg:overflow-hidden tg:p-1 tg:text-foreground tg:[&_[cmdk-group-heading]]:px-2 tg:[&_[cmdk-group-heading]]:py-1.5 tg:[&_[cmdk-group-heading]]:font-medium tg:[&_[cmdk-group-heading]]:text-muted-foreground tg:[&_[cmdk-group-heading]]:text-xs", e),
|
|
316
317
|
...t
|
|
317
318
|
});
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function Pe({ className: e, ...t }) {
|
|
320
321
|
return /* @__PURE__ */ m(z.Item, {
|
|
321
322
|
"data-slot": "command-item",
|
|
322
|
-
className:
|
|
323
|
+
className: G("tg:relative tg:flex tg:cursor-default tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:px-2 tg:py-1.5 tg:text-sm tg:outline-hidden tg:data-[disabled=true]:pointer-events-none tg:data-[selected=true]:bg-accent tg:data-[selected=true]:text-accent-foreground tg:data-[disabled=true]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
|
|
323
324
|
...t
|
|
324
325
|
});
|
|
325
326
|
}
|
|
326
327
|
//#endregion
|
|
327
328
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.tsx
|
|
328
|
-
var
|
|
329
|
+
var Fe = async (e, t) => {
|
|
329
330
|
if (!e || e.trim().length < 3) return [];
|
|
330
331
|
try {
|
|
331
332
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -340,7 +341,7 @@ var Pe = async (e, t) => {
|
|
|
340
341
|
} catch (e) {
|
|
341
342
|
return console.error("Nominatim fetch error:", e), [];
|
|
342
343
|
}
|
|
343
|
-
},
|
|
344
|
+
}, Ie = (e) => !e || e.trim().length < 3 ? Promise.resolve([]) : new Promise((t) => {
|
|
344
345
|
if (!window.google?.maps?.places) {
|
|
345
346
|
console.warn("Google Places SDK not loaded yet"), t([]);
|
|
346
347
|
return;
|
|
@@ -355,7 +356,7 @@ var Pe = async (e, t) => {
|
|
|
355
356
|
value: e.description
|
|
356
357
|
})));
|
|
357
358
|
});
|
|
358
|
-
}),
|
|
359
|
+
}), Le = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: o, helperText: s, id: c, name: l }) => {
|
|
359
360
|
let [u, f] = j(""), [g, _] = j([]), [v, y] = j(!1), { googleApiKey: b, language: x } = a(), S = d(), C = O((e) => {
|
|
360
361
|
n(e.value), f(e.value), y(!1);
|
|
361
362
|
}, [n]);
|
|
@@ -365,7 +366,7 @@ var Pe = async (e, t) => {
|
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
368
|
let e = setTimeout(async () => {
|
|
368
|
-
_(b ? await
|
|
369
|
+
_(b ? await Ie(u) : await Fe(u, x));
|
|
369
370
|
}, 300);
|
|
370
371
|
return () => clearTimeout(e);
|
|
371
372
|
}, [
|
|
@@ -380,17 +381,17 @@ var Pe = async (e, t) => {
|
|
|
380
381
|
async: !0,
|
|
381
382
|
src: `https://maps.googleapis.com/maps/api/js?key=${b}&libraries=places`
|
|
382
383
|
}), /* @__PURE__ */ h(q, {
|
|
383
|
-
className: "mb-4",
|
|
384
|
+
className: "tg:mb-4",
|
|
384
385
|
children: [
|
|
385
386
|
/* @__PURE__ */ h(Z, {
|
|
386
387
|
htmlFor: c,
|
|
387
388
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
388
|
-
className: "text-red-500",
|
|
389
|
+
className: "tg:text-red-500",
|
|
389
390
|
children: "*"
|
|
390
391
|
})]
|
|
391
392
|
}),
|
|
392
393
|
/* @__PURE__ */ h("div", {
|
|
393
|
-
className: "relative",
|
|
394
|
+
className: "tg:relative",
|
|
394
395
|
children: [
|
|
395
396
|
/* @__PURE__ */ m(X, {
|
|
396
397
|
type: "text",
|
|
@@ -402,17 +403,17 @@ var Pe = async (e, t) => {
|
|
|
402
403
|
g.length > 0 && y(!0);
|
|
403
404
|
},
|
|
404
405
|
placeholder: o || S("renderer.defaultAddressInput.enterAddress"),
|
|
405
|
-
className: "pr-10",
|
|
406
|
+
className: "tg:pr-10",
|
|
406
407
|
autoComplete: "off"
|
|
407
408
|
}),
|
|
408
|
-
/* @__PURE__ */ m(w, { className: "
|
|
409
|
+
/* @__PURE__ */ m(w, { 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" }),
|
|
409
410
|
v && /* @__PURE__ */ m("div", {
|
|
410
|
-
className: "absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md",
|
|
411
|
-
children: /* @__PURE__ */ m(
|
|
411
|
+
className: "tg:absolute tg:z-50 tg:mt-1 tg:w-full tg:rounded-md tg:border tg:bg-popover tg:shadow-md",
|
|
412
|
+
children: /* @__PURE__ */ m(ke, { children: /* @__PURE__ */ h(je, { children: [/* @__PURE__ */ m(Me, { children: S("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ m(Ne, { children: g.map((e, t) => /* @__PURE__ */ h(Pe, {
|
|
412
413
|
value: e.value,
|
|
413
414
|
onSelect: () => C(e),
|
|
414
415
|
onMouseDown: (e) => e.preventDefault(),
|
|
415
|
-
children: [/* @__PURE__ */ m(w, { className: "mr-2 h-4 w-4" }), e.label]
|
|
416
|
+
children: [/* @__PURE__ */ m(w, { className: "tg:mr-2 tg:h-4 tg:w-4" }), e.label]
|
|
416
417
|
}, t)) })] }) })
|
|
417
418
|
})
|
|
418
419
|
]
|
|
@@ -421,22 +422,22 @@ var Pe = async (e, t) => {
|
|
|
421
422
|
s && !r && /* @__PURE__ */ m(J, { children: s })
|
|
422
423
|
]
|
|
423
424
|
})] });
|
|
424
|
-
},
|
|
425
|
+
}, Re = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, id: s }) => {
|
|
425
426
|
let c = d(), [l, u] = j(!1), f = `${s}-trigger`, p = `${s}-error`, _ = e.data.options || [], v = _.find((e) => e.value === t);
|
|
426
427
|
return /* @__PURE__ */ h(q, {
|
|
427
|
-
className: "mb-4",
|
|
428
|
+
className: "tg:mb-4",
|
|
428
429
|
children: [
|
|
429
430
|
/* @__PURE__ */ h(Z, {
|
|
430
431
|
htmlFor: f,
|
|
431
432
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
432
|
-
className: "text-red-500",
|
|
433
|
+
className: "tg:text-red-500",
|
|
433
434
|
children: "*"
|
|
434
435
|
})]
|
|
435
436
|
}),
|
|
436
437
|
/* @__PURE__ */ h(Q, {
|
|
437
438
|
open: l,
|
|
438
439
|
onOpenChange: u,
|
|
439
|
-
children: [/* @__PURE__ */ m(
|
|
440
|
+
children: [/* @__PURE__ */ m($, {
|
|
440
441
|
asChild: !0,
|
|
441
442
|
children: /* @__PURE__ */ h(K, {
|
|
442
443
|
id: f,
|
|
@@ -445,19 +446,19 @@ var Pe = async (e, t) => {
|
|
|
445
446
|
"aria-expanded": l,
|
|
446
447
|
"aria-invalid": !!r || void 0,
|
|
447
448
|
"aria-describedby": r ? p : void 0,
|
|
448
|
-
className: "w-full justify-between font-normal",
|
|
449
|
-
children: [t ? v?.label ? c(v.label) : t : a || c("renderer.defaultAutocompleteInput.selectOption"), /* @__PURE__ */ m(S, { className: "ml-2 size-4 shrink-0 opacity-50" })]
|
|
449
|
+
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
450
|
+
children: [t ? v?.label ? c(v.label) : t : a || c("renderer.defaultAutocompleteInput.selectOption"), /* @__PURE__ */ m(S, { className: "tg:ml-2 tg:size-4 tg:shrink-0 tg:opacity-50" })]
|
|
450
451
|
})
|
|
451
|
-
}), /* @__PURE__ */ m(
|
|
452
|
-
className: "w-full p-0",
|
|
452
|
+
}), /* @__PURE__ */ m(le, {
|
|
453
|
+
className: "tg:w-full tg:p-0",
|
|
453
454
|
align: "start",
|
|
454
|
-
children: /* @__PURE__ */ h(
|
|
455
|
+
children: /* @__PURE__ */ h(ke, { children: [/* @__PURE__ */ m(Ae, { placeholder: a || c("renderer.defaultAutocompleteInput.search") }), /* @__PURE__ */ h(je, { children: [/* @__PURE__ */ m(Me, { children: c("renderer.defaultAutocompleteInput.noResults") }), /* @__PURE__ */ m(Ne, { children: _.map((e) => /* @__PURE__ */ h(Pe, {
|
|
455
456
|
value: e.value,
|
|
456
457
|
disabled: e.disabled,
|
|
457
458
|
onSelect: (e) => {
|
|
458
459
|
n(e === t ? "" : e), u(!1);
|
|
459
460
|
},
|
|
460
|
-
children: [/* @__PURE__ */ m(g, { className:
|
|
461
|
+
children: [/* @__PURE__ */ m(g, { className: G("tg:mr-2 tg:size-4", t === e.value ? "tg:opacity-100" : "tg:opacity-0") }), c(e.label)]
|
|
461
462
|
}, e.value)) })] })] })
|
|
462
463
|
})]
|
|
463
464
|
}),
|
|
@@ -468,43 +469,43 @@ var Pe = async (e, t) => {
|
|
|
468
469
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
469
470
|
]
|
|
470
471
|
});
|
|
471
|
-
},
|
|
472
|
+
}, ze = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, id: o, name: s }) => {
|
|
472
473
|
let c = d();
|
|
473
474
|
if (e.data.options && e.data.options.length > 0) {
|
|
474
475
|
let l = Array.isArray(t) ? t.map(String) : [], u = (e, t) => {
|
|
475
476
|
n(t ? [...l, e] : l.filter((t) => t !== e));
|
|
476
477
|
};
|
|
477
478
|
return /* @__PURE__ */ h(q, {
|
|
478
|
-
className: "mb-4",
|
|
479
|
+
className: "tg:mb-4",
|
|
479
480
|
children: [
|
|
480
481
|
/* @__PURE__ */ h(Z, {
|
|
481
|
-
className: "mb-1",
|
|
482
|
+
className: "tg:mb-1",
|
|
482
483
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
483
|
-
className: "text-red-500",
|
|
484
|
+
className: "tg:text-red-500",
|
|
484
485
|
children: "*"
|
|
485
486
|
})]
|
|
486
487
|
}),
|
|
487
488
|
/* @__PURE__ */ m("div", {
|
|
488
|
-
className: "space-y-2",
|
|
489
|
+
className: "tg:space-y-2",
|
|
489
490
|
children: e.data.options.map((e, t) => {
|
|
490
491
|
let n = c(e.description);
|
|
491
492
|
return /* @__PURE__ */ h("div", {
|
|
492
|
-
className: "flex items-start gap-3",
|
|
493
|
-
children: [/* @__PURE__ */ m(
|
|
493
|
+
className: "tg:flex tg:items-start tg:gap-3",
|
|
494
|
+
children: [/* @__PURE__ */ m(ce, {
|
|
494
495
|
id: `${o}-${e.value}`,
|
|
495
496
|
name: s,
|
|
496
497
|
checked: l.includes(String(e.value)),
|
|
497
498
|
onCheckedChange: (t) => u(String(e.value), !!t),
|
|
498
499
|
disabled: e.disabled,
|
|
499
|
-
className: "mt-0.5"
|
|
500
|
+
className: "tg:mt-0.5"
|
|
500
501
|
}), /* @__PURE__ */ h("div", {
|
|
501
|
-
className: "flex flex-col",
|
|
502
|
+
className: "tg:flex tg:flex-col",
|
|
502
503
|
children: [/* @__PURE__ */ m(Z, {
|
|
503
504
|
htmlFor: `${o}-${e.value}`,
|
|
504
|
-
className: "cursor-pointer font-normal text-sm",
|
|
505
|
+
className: "tg:cursor-pointer tg:font-normal tg:text-sm",
|
|
505
506
|
children: c(e.label) ? c(e.label) : e.value
|
|
506
507
|
}), n && /* @__PURE__ */ m("span", {
|
|
507
|
-
className: "text-muted-foreground text-xs",
|
|
508
|
+
className: "tg:text-muted-foreground tg:text-xs",
|
|
508
509
|
children: n
|
|
509
510
|
})]
|
|
510
511
|
})]
|
|
@@ -517,19 +518,19 @@ var Pe = async (e, t) => {
|
|
|
517
518
|
});
|
|
518
519
|
}
|
|
519
520
|
return /* @__PURE__ */ h(q, {
|
|
520
|
-
className: "mb-4",
|
|
521
|
+
className: "tg:mb-4",
|
|
521
522
|
children: [/* @__PURE__ */ h("div", {
|
|
522
|
-
className: "flex items-center gap-3",
|
|
523
|
-
children: [/* @__PURE__ */ m(
|
|
523
|
+
className: "tg:flex tg:items-center tg:gap-3",
|
|
524
|
+
children: [/* @__PURE__ */ m(ce, {
|
|
524
525
|
id: o,
|
|
525
526
|
name: s,
|
|
526
527
|
checked: typeof t == "boolean" ? t : !1,
|
|
527
528
|
onCheckedChange: (e) => n(!!e)
|
|
528
529
|
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h(Z, {
|
|
529
530
|
htmlFor: o,
|
|
530
|
-
className: "cursor-pointer font-medium text-sm",
|
|
531
|
+
className: "tg:cursor-pointer tg:font-medium tg:text-sm",
|
|
531
532
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
532
|
-
className: "text-red-500",
|
|
533
|
+
className: "tg:text-red-500",
|
|
533
534
|
children: "*"
|
|
534
535
|
})]
|
|
535
536
|
}), a && !r && /* @__PURE__ */ m(J, { children: a })] })]
|
|
@@ -538,60 +539,60 @@ var Pe = async (e, t) => {
|
|
|
538
539
|
};
|
|
539
540
|
//#endregion
|
|
540
541
|
//#region src/shared/components/ui/calendar.tsx
|
|
541
|
-
function
|
|
542
|
+
function Be({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
|
|
542
543
|
let c = V();
|
|
543
544
|
return /* @__PURE__ */ m(ie, {
|
|
544
545
|
showOutsideDays: n,
|
|
545
|
-
className:
|
|
546
|
+
className: G("tg:group/calendar tg:bg-background tg:p-3 tg:[--cell-size:--spacing(8)] tg:[[data-slot=card-content]_&]:bg-transparent tg:[[data-slot=popover-content]_&]:bg-transparent", String.raw`tg:rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`tg:rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
546
547
|
captionLayout: r,
|
|
547
548
|
formatters: {
|
|
548
549
|
formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
|
|
549
550
|
...a
|
|
550
551
|
},
|
|
551
552
|
classNames: {
|
|
552
|
-
button_next:
|
|
553
|
-
button_previous:
|
|
554
|
-
caption_label:
|
|
555
|
-
day:
|
|
556
|
-
disabled:
|
|
557
|
-
dropdown:
|
|
558
|
-
dropdown_root:
|
|
559
|
-
dropdowns:
|
|
560
|
-
hidden:
|
|
561
|
-
month:
|
|
562
|
-
month_caption:
|
|
563
|
-
months:
|
|
564
|
-
nav:
|
|
565
|
-
outside:
|
|
566
|
-
range_end:
|
|
567
|
-
range_middle:
|
|
568
|
-
range_start:
|
|
569
|
-
root:
|
|
570
|
-
table: "w-full border-collapse",
|
|
571
|
-
today:
|
|
572
|
-
week:
|
|
573
|
-
week_number:
|
|
574
|
-
week_number_header:
|
|
575
|
-
weekday:
|
|
576
|
-
weekdays:
|
|
553
|
+
button_next: G(se({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_next),
|
|
554
|
+
button_previous: G(se({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_previous),
|
|
555
|
+
caption_label: G("tg:select-none tg:font-medium", r === "label" ? "tg:text-sm" : "tg:rounded-md tg:pl-2 tg:pr-1 tg:flex tg:items-center tg:gap-1 tg:text-sm tg:h-8 tg:[&>svg]:text-muted-foreground tg:[&>svg]:size-3.5", c.caption_label),
|
|
556
|
+
day: G("tg:relative tg:w-full tg:h-full tg:p-0 tg:text-center tg:[&:first-child[data-selected=true]_button]:rounded-l-md tg:[&:last-child[data-selected=true]_button]:rounded-r-md tg:group/day tg:aspect-square tg:select-none", c.day),
|
|
557
|
+
disabled: G("tg:text-muted-foreground tg:opacity-50", c.disabled),
|
|
558
|
+
dropdown: G("tg:absolute tg:bg-popover tg:inset-0 tg:opacity-0", c.dropdown),
|
|
559
|
+
dropdown_root: G("tg:relative tg:has-focus:border-ring tg:border tg:border-input tg:shadow-xs tg:has-focus:ring-ring/50 tg:has-focus:ring-[3px] tg:rounded-md", c.dropdown_root),
|
|
560
|
+
dropdowns: G("tg:w-full tg:flex tg:items-center tg:text-sm tg:font-medium tg:justify-center tg:h-(--cell-size) tg:gap-1.5", c.dropdowns),
|
|
561
|
+
hidden: G("tg:invisible", c.hidden),
|
|
562
|
+
month: G("tg:flex tg:flex-col tg:w-full tg:gap-4", c.month),
|
|
563
|
+
month_caption: G("tg:flex tg:items-center tg:justify-center tg:h-(--cell-size) tg:w-full tg:px-(--cell-size)", c.month_caption),
|
|
564
|
+
months: G("tg:flex tg:gap-4 tg:flex-col tg:md:flex-row tg:relative", c.months),
|
|
565
|
+
nav: G("tg:flex tg:items-center tg:gap-1 tg:w-full tg:absolute tg:top-0 tg:inset-x-0 tg:justify-between", c.nav),
|
|
566
|
+
outside: G("tg:text-muted-foreground tg:aria-selected:text-muted-foreground", c.outside),
|
|
567
|
+
range_end: G("tg:rounded-r-md tg:bg-accent", c.range_end),
|
|
568
|
+
range_middle: G("tg:rounded-none", c.range_middle),
|
|
569
|
+
range_start: G("tg:rounded-l-md tg:bg-accent", c.range_start),
|
|
570
|
+
root: G("tg:w-fit", c.root),
|
|
571
|
+
table: "tg:w-full tg:border-collapse",
|
|
572
|
+
today: G("tg:bg-accent tg:text-accent-foreground tg:rounded-md tg:data-[selected=true]:rounded-none", c.today),
|
|
573
|
+
week: G("tg:flex tg:w-full tg:mt-2", c.week),
|
|
574
|
+
week_number: G("tg:text-[0.8rem] tg:select-none tg:text-muted-foreground", c.week_number),
|
|
575
|
+
week_number_header: G("tg:select-none tg:w-(--cell-size)", c.week_number_header),
|
|
576
|
+
weekday: G("tg:text-muted-foreground tg:rounded-md tg:flex-1 tg:font-normal tg:text-[0.8rem] tg:select-none", c.weekday),
|
|
577
|
+
weekdays: G("tg:flex", c.weekdays),
|
|
577
578
|
...t
|
|
578
579
|
},
|
|
579
580
|
components: {
|
|
580
581
|
Chevron: ({ className: e, orientation: t, ...n }) => m(t === "left" ? y : t === "right" ? b : v, {
|
|
581
|
-
className:
|
|
582
|
+
className: G("tg:size-4", e),
|
|
582
583
|
...n
|
|
583
584
|
}),
|
|
584
|
-
DayButton:
|
|
585
|
+
DayButton: Ve,
|
|
585
586
|
Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ m("div", {
|
|
586
587
|
"data-slot": "calendar",
|
|
587
588
|
ref: t,
|
|
588
|
-
className:
|
|
589
|
+
className: G(e),
|
|
589
590
|
...n
|
|
590
591
|
}),
|
|
591
592
|
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ m("td", {
|
|
592
593
|
...t,
|
|
593
594
|
children: /* @__PURE__ */ m("div", {
|
|
594
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
595
|
+
className: "tg:flex tg:size-(--cell-size) tg:items-center tg:justify-center tg:text-center",
|
|
595
596
|
children: e
|
|
596
597
|
})
|
|
597
598
|
}),
|
|
@@ -600,7 +601,7 @@ function ze({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
600
601
|
...s
|
|
601
602
|
});
|
|
602
603
|
}
|
|
603
|
-
function
|
|
604
|
+
function Ve({ className: e, day: t, modifiers: n, ...r }) {
|
|
604
605
|
let i = V(), a = E.useRef(null);
|
|
605
606
|
return E.useEffect(() => {
|
|
606
607
|
n.focused && a.current?.focus();
|
|
@@ -613,40 +614,40 @@ function Be({ className: e, day: t, modifiers: n, ...r }) {
|
|
|
613
614
|
"data-range-start": n.range_start,
|
|
614
615
|
"data-range-end": n.range_end,
|
|
615
616
|
"data-range-middle": n.range_middle,
|
|
616
|
-
className:
|
|
617
|
+
className: G("tg:flex tg:aspect-square tg:size-auto tg:w-full tg:min-w-(--cell-size) tg:flex-col tg:gap-1 tg:font-normal tg:leading-none tg:data-[range-end=true]:rounded-md tg:data-[range-middle=true]:rounded-none tg:data-[range-start=true]:rounded-md tg:data-[range-end=true]:rounded-r-md tg:data-[range-start=true]:rounded-l-md tg:data-[range-end=true]:bg-primary tg:data-[range-middle=true]:bg-accent tg:data-[range-start=true]:bg-primary tg:data-[selected-single=true]:bg-primary tg:data-[range-end=true]:text-primary-foreground tg:data-[range-middle=true]:text-accent-foreground tg:data-[range-start=true]:text-primary-foreground tg:data-[selected-single=true]:text-primary-foreground tg:group-data-[focused=true]/day:relative tg:group-data-[focused=true]/day:z-10 tg:group-data-[focused=true]/day:border-ring tg:group-data-[focused=true]/day:ring-[3px] tg:group-data-[focused=true]/day:ring-ring/50 tg:dark:hover:text-accent-foreground tg:[&>span]:text-xs tg:[&>span]:opacity-70", i.day, e),
|
|
617
618
|
...r
|
|
618
619
|
});
|
|
619
620
|
}
|
|
620
621
|
//#endregion
|
|
621
622
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.tsx
|
|
622
|
-
var
|
|
623
|
+
var He = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, id: s, name: c }) => {
|
|
623
624
|
let [l, u] = j(!1), f = d(), p = t ? new Date(t) : void 0;
|
|
624
625
|
return /* @__PURE__ */ h(q, {
|
|
625
|
-
className: "mb-4",
|
|
626
|
+
className: "tg:mb-4",
|
|
626
627
|
children: [
|
|
627
628
|
/* @__PURE__ */ h(Z, {
|
|
628
629
|
htmlFor: s,
|
|
629
630
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
630
|
-
className: "text-red-500",
|
|
631
|
+
className: "tg:text-red-500",
|
|
631
632
|
children: "*"
|
|
632
633
|
})]
|
|
633
634
|
}),
|
|
634
635
|
/* @__PURE__ */ h(Q, {
|
|
635
636
|
open: l,
|
|
636
637
|
onOpenChange: u,
|
|
637
|
-
children: [/* @__PURE__ */ m(
|
|
638
|
+
children: [/* @__PURE__ */ m($, {
|
|
638
639
|
asChild: !0,
|
|
639
640
|
children: /* @__PURE__ */ h(K, {
|
|
640
641
|
variant: "outline",
|
|
641
642
|
id: s,
|
|
642
643
|
name: c,
|
|
643
|
-
className: "w-full justify-between font-normal",
|
|
644
|
-
children: [p ? p.toLocaleDateString() : a || f("renderer.defaultInputs.selectDate"), /* @__PURE__ */ m(v, { className: "size-4" })]
|
|
644
|
+
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
645
|
+
children: [p ? p.toLocaleDateString() : a || f("renderer.defaultInputs.selectDate"), /* @__PURE__ */ m(v, { className: "tg:size-4" })]
|
|
645
646
|
})
|
|
646
|
-
}), /* @__PURE__ */ m(
|
|
647
|
-
className: "w-auto overflow-hidden p-0",
|
|
647
|
+
}), /* @__PURE__ */ m(le, {
|
|
648
|
+
className: "tg:w-auto tg:overflow-hidden tg:p-0",
|
|
648
649
|
align: "start",
|
|
649
|
-
children: /* @__PURE__ */ m(
|
|
650
|
+
children: /* @__PURE__ */ m(Be, {
|
|
650
651
|
mode: "single",
|
|
651
652
|
selected: p,
|
|
652
653
|
captionLayout: "dropdown",
|
|
@@ -667,33 +668,33 @@ var Ve = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
667
668
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
668
669
|
]
|
|
669
670
|
});
|
|
670
|
-
},
|
|
671
|
+
}, Ue = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, id: o }) => {
|
|
671
672
|
let [s, c] = j(!1), l = d(), u = Array.isArray(t) ? t : [], f = u[0] ? new Date(u[0]) : void 0, p = u[1] ? new Date(u[1]) : void 0;
|
|
672
673
|
return /* @__PURE__ */ h(q, {
|
|
673
|
-
className: "mb-4",
|
|
674
|
+
className: "tg:mb-4",
|
|
674
675
|
children: [
|
|
675
676
|
/* @__PURE__ */ h(Z, {
|
|
676
677
|
htmlFor: o,
|
|
677
678
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
678
|
-
className: "text-red-500",
|
|
679
|
+
className: "tg:text-red-500",
|
|
679
680
|
children: "*"
|
|
680
681
|
})]
|
|
681
682
|
}),
|
|
682
683
|
/* @__PURE__ */ h(Q, {
|
|
683
684
|
open: s,
|
|
684
685
|
onOpenChange: c,
|
|
685
|
-
children: [/* @__PURE__ */ m(
|
|
686
|
+
children: [/* @__PURE__ */ m($, {
|
|
686
687
|
asChild: !0,
|
|
687
688
|
children: /* @__PURE__ */ h(K, {
|
|
688
689
|
id: o,
|
|
689
690
|
variant: "outline",
|
|
690
|
-
className: "w-full justify-between font-normal",
|
|
691
|
-
children: [f && p ? `${f.toLocaleDateString()} - ${p.toLocaleDateString()}` : f ? f.toLocaleDateString() : l("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ m(v, { className: "size-4" })]
|
|
691
|
+
className: "tg:w-full tg:justify-between tg:font-normal",
|
|
692
|
+
children: [f && p ? `${f.toLocaleDateString()} - ${p.toLocaleDateString()}` : f ? f.toLocaleDateString() : l("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ m(v, { className: "tg:size-4" })]
|
|
692
693
|
})
|
|
693
|
-
}), /* @__PURE__ */ m(
|
|
694
|
-
className: "w-auto overflow-hidden p-0",
|
|
694
|
+
}), /* @__PURE__ */ m(le, {
|
|
695
|
+
className: "tg:w-auto tg:overflow-hidden tg:p-0",
|
|
695
696
|
align: "start",
|
|
696
|
-
children: /* @__PURE__ */ m(
|
|
697
|
+
children: /* @__PURE__ */ m(Be, {
|
|
697
698
|
mode: "range",
|
|
698
699
|
selected: {
|
|
699
700
|
from: f,
|
|
@@ -718,13 +719,13 @@ var Ve = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
718
719
|
a && !r && /* @__PURE__ */ m(J, { children: a })
|
|
719
720
|
]
|
|
720
721
|
});
|
|
721
|
-
},
|
|
722
|
-
className: "mb-4",
|
|
722
|
+
}, We = ({ node: e, setValue: t, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
723
|
+
className: "tg:mb-4",
|
|
723
724
|
children: [
|
|
724
725
|
/* @__PURE__ */ h(Z, {
|
|
725
726
|
htmlFor: c,
|
|
726
727
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
727
|
-
className: "text-red-500",
|
|
728
|
+
className: "tg:text-red-500",
|
|
728
729
|
children: "*"
|
|
729
730
|
})]
|
|
730
731
|
}),
|
|
@@ -750,7 +751,7 @@ var Ve = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
750
751
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
751
752
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
752
753
|
]
|
|
753
|
-
}),
|
|
754
|
+
}), Ge = ({ value: e, name: t, id: n }) => /* @__PURE__ */ m(X, {
|
|
754
755
|
type: "hidden",
|
|
755
756
|
id: n,
|
|
756
757
|
name: t,
|
|
@@ -758,37 +759,37 @@ var Ve = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
758
759
|
});
|
|
759
760
|
//#endregion
|
|
760
761
|
//#region src/shared/components/ui/tooltip.tsx
|
|
761
|
-
function
|
|
762
|
+
function Ke({ delayDuration: e = 0, ...t }) {
|
|
762
763
|
return /* @__PURE__ */ m(H.Provider, {
|
|
763
764
|
"data-slot": "tooltip-provider",
|
|
764
765
|
delayDuration: e,
|
|
765
766
|
...t
|
|
766
767
|
});
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
-
return /* @__PURE__ */ m(
|
|
769
|
+
function qe({ ...e }) {
|
|
770
|
+
return /* @__PURE__ */ m(Ke, { children: /* @__PURE__ */ m(H.Root, {
|
|
770
771
|
"data-slot": "tooltip",
|
|
771
772
|
...e
|
|
772
773
|
}) });
|
|
773
774
|
}
|
|
774
|
-
function
|
|
775
|
+
function Je({ ...e }) {
|
|
775
776
|
return /* @__PURE__ */ m(H.Trigger, {
|
|
776
777
|
"data-slot": "tooltip-trigger",
|
|
777
778
|
...e
|
|
778
779
|
});
|
|
779
780
|
}
|
|
780
|
-
function
|
|
781
|
+
function Ye({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
781
782
|
return /* @__PURE__ */ m(H.Portal, { children: /* @__PURE__ */ h(H.Content, {
|
|
782
783
|
"data-slot": "tooltip-content",
|
|
783
784
|
sideOffset: t,
|
|
784
|
-
className:
|
|
785
|
+
className: G("tg:fade-in-0 tg:zoom-in-95 tg:data-[state=closed]:fade-out-0 tg:data-[state=closed]:zoom-out-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-50 tg:w-fit tg:origin-(--radix-tooltip-content-transform-origin) tg:animate-in tg:text-balance tg:rounded-md tg:bg-foreground tg:px-3 tg:py-1.5 tg:text-background tg:text-xs tg:data-[state=closed]:animate-out", e),
|
|
785
786
|
...r,
|
|
786
|
-
children: [n, /* @__PURE__ */ m(H.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
787
|
+
children: [n, /* @__PURE__ */ m(H.Arrow, { className: "tg:z-50 tg:size-2.5 tg:translate-y-[calc(-50%_-_2px)] tg:rotate-45 tg:rounded-[2px] tg:bg-foreground tg:fill-foreground" })]
|
|
787
788
|
}) });
|
|
788
789
|
}
|
|
789
790
|
//#endregion
|
|
790
791
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.tsx
|
|
791
|
-
var
|
|
792
|
+
var Xe = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
792
793
|
if (e == null) return;
|
|
793
794
|
let n = t.match(/^(\w+)\[(\d+)]$/);
|
|
794
795
|
if (n) {
|
|
@@ -796,21 +797,21 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
796
797
|
return Array.isArray(i) ? i[Number.parseInt(r, 10)] : i;
|
|
797
798
|
}
|
|
798
799
|
return e[t];
|
|
799
|
-
}, e) : e,
|
|
800
|
+
}, e) : e, Ze = (e) => {
|
|
800
801
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
801
802
|
return Array.from(t, (e) => e[1]);
|
|
802
|
-
},
|
|
803
|
+
}, Qe = (e, t) => Ze(e).every((e) => {
|
|
803
804
|
let n = t[e];
|
|
804
805
|
return n != null && n !== "";
|
|
805
|
-
}),
|
|
806
|
+
}), $e = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
806
807
|
let i = t[r], a = i == null ? "" : String(i);
|
|
807
808
|
return n ? encodeURIComponent(a) : a;
|
|
808
|
-
}),
|
|
809
|
-
let [v, y] = j(!1), [b, x] = j(null), [C, w] = j([]), [T, te] = j(""), [E, D] = j(!1), { formValues: M, inputNodes: N } = a(), P = d(), { httpConfig: F } = t.data, I = A(!1), re = A(""), L = A(F), R = A(M), z = A(N), B = A(i), ie = A(null), V = A(null), H = ne(() => F?.url ?
|
|
809
|
+
}), et = ({ node: t, value: n, setValue: i, error: o, label: s, placeholder: c, helperText: l, id: u, name: _ }) => {
|
|
810
|
+
let [v, y] = j(!1), [b, x] = j(null), [C, w] = j([]), [T, te] = j(""), [E, D] = j(!1), { formValues: M, inputNodes: N } = a(), P = d(), { httpConfig: F } = t.data, I = A(!1), re = A(""), L = A(F), R = A(M), z = A(N), B = A(i), ie = A(null), V = A(null), H = ne(() => F?.url ? Ze(F.url) : [], [F?.url]), U = H.length > 0, ae = ne(() => H.map((e) => `${e}:${String(M[e] ?? "")}`).join("|"), [H, M]), oe = ne(() => F?.url ? U ? Qe(F.url, M) : !0 : !1, [
|
|
810
811
|
F?.url,
|
|
811
812
|
U,
|
|
812
813
|
M
|
|
813
|
-
]),
|
|
814
|
+
]), W = O(async (t) => {
|
|
814
815
|
V.current && V.current.abort();
|
|
815
816
|
let n = new AbortController();
|
|
816
817
|
V.current = n;
|
|
@@ -819,21 +820,21 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
819
820
|
x(P("renderer.defaultHttpInput.noUrlConfigured")), V.current = null;
|
|
820
821
|
return;
|
|
821
822
|
}
|
|
822
|
-
if (i.url && !
|
|
823
|
+
if (i.url && !Qe(i.url, a)) {
|
|
823
824
|
V.current = null;
|
|
824
825
|
return;
|
|
825
826
|
}
|
|
826
827
|
y(!0), x(null);
|
|
827
828
|
try {
|
|
828
|
-
let s =
|
|
829
|
+
let s = $e(i.url, a, !0), c = i.searchParam && t ? `${s}${s.includes("?") ? "&" : "?"}${i.searchParam}=${encodeURIComponent(t)}` : s, l = {};
|
|
829
830
|
i.headers?.forEach((e) => {
|
|
830
|
-
l[e.key] =
|
|
831
|
+
l[e.key] = $e(e.value, a);
|
|
831
832
|
});
|
|
832
833
|
let u = [
|
|
833
834
|
"POST",
|
|
834
835
|
"PUT",
|
|
835
836
|
"PATCH"
|
|
836
|
-
].includes(i.method || "") ? i.sendAllFormValues ? JSON.stringify(e(a, z.current)) : i.body ?
|
|
837
|
+
].includes(i.method || "") ? i.sendAllFormValues ? JSON.stringify(e(a, z.current)) : i.body ? $e(i.body, a) : void 0 : void 0, d = setTimeout(() => n.abort(), 3e4), f = await fetch(c, {
|
|
837
838
|
body: u || void 0,
|
|
838
839
|
headers: {
|
|
839
840
|
"Content-Type": "application/json",
|
|
@@ -846,12 +847,12 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
846
847
|
x(`HTTP Error ${f.status}: ${f.statusText}`), y(!1);
|
|
847
848
|
return;
|
|
848
849
|
}
|
|
849
|
-
let p = r(await f.json()), m = i.responsePath ?
|
|
850
|
+
let p = r(await f.json()), m = i.responsePath ? Xe(p, i.responsePath) : p;
|
|
850
851
|
if (i.responseMapping && Array.isArray(m)) {
|
|
851
852
|
let { valueField: e = "value", labelField: t = "label" } = i.responseMapping;
|
|
852
853
|
w(m.map((n) => ({
|
|
853
|
-
label: String(
|
|
854
|
-
value: String(
|
|
854
|
+
label: String(Xe(n, t) || ""),
|
|
855
|
+
value: String(Xe(n, e) || "")
|
|
855
856
|
})));
|
|
856
857
|
} else o(typeof m == "string" ? m : JSON.stringify(m));
|
|
857
858
|
} catch (e) {
|
|
@@ -862,101 +863,101 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
862
863
|
}
|
|
863
864
|
}, [P]);
|
|
864
865
|
if (k(() => {
|
|
865
|
-
L.current = F, R.current = M, z.current = N, B.current = i, ie.current =
|
|
866
|
+
L.current = F, R.current = M, z.current = N, B.current = i, ie.current = W;
|
|
866
867
|
}, [
|
|
867
868
|
F,
|
|
868
869
|
M,
|
|
869
870
|
N,
|
|
870
871
|
i,
|
|
871
|
-
|
|
872
|
+
W
|
|
872
873
|
]), k(() => () => {
|
|
873
874
|
V.current && V.current.abort();
|
|
874
875
|
}, []), k(() => {
|
|
875
876
|
if (I.current) return;
|
|
876
877
|
I.current = !0;
|
|
877
|
-
let e = L.current, t = R.current, n = ie.current, r = e?.url &&
|
|
878
|
-
e?.fetchOnMount && r && n && (n(), e.url && (re.current =
|
|
878
|
+
let e = L.current, t = R.current, n = ie.current, r = e?.url && Qe(e.url, t);
|
|
879
|
+
e?.fetchOnMount && r && n && (n(), e.url && (re.current = Ze(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
879
880
|
}, []), k(() => {
|
|
880
881
|
if (!I.current || !U || re.current === ae || !oe) return;
|
|
881
882
|
let e = setTimeout(() => {
|
|
882
|
-
|
|
883
|
+
W(), re.current = ae;
|
|
883
884
|
}, 500);
|
|
884
885
|
return () => clearTimeout(e);
|
|
885
886
|
}, [
|
|
886
887
|
ae,
|
|
887
888
|
U,
|
|
888
889
|
oe,
|
|
889
|
-
|
|
890
|
+
W
|
|
890
891
|
]), k(() => {
|
|
891
892
|
if (!(F?.searchParam && T)) return;
|
|
892
893
|
let e = setTimeout(() => {
|
|
893
|
-
|
|
894
|
+
W(T);
|
|
894
895
|
}, 300);
|
|
895
896
|
return () => clearTimeout(e);
|
|
896
897
|
}, [
|
|
897
898
|
T,
|
|
898
899
|
F?.searchParam,
|
|
899
|
-
|
|
900
|
+
W
|
|
900
901
|
]), F?.responseMapping) {
|
|
901
902
|
let e = Array.isArray(n) ? n[0] : n, r = C.find((t) => t.value === e);
|
|
902
903
|
if (F.searchParam) {
|
|
903
904
|
let e = v && F?.showLoading ? /* @__PURE__ */ h("div", {
|
|
904
|
-
className: "flex items-center gap-2",
|
|
905
|
-
children: [/* @__PURE__ */ m(ee, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ m("span", {
|
|
906
|
-
className: "text-muted-foreground",
|
|
905
|
+
className: "tg:flex tg:items-center tg:gap-2",
|
|
906
|
+
children: [/* @__PURE__ */ m(ee, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ m("span", {
|
|
907
|
+
className: "tg:text-muted-foreground",
|
|
907
908
|
children: r?.label || c || P("renderer.defaultHttpInput.search")
|
|
908
909
|
})]
|
|
909
910
|
}) : r?.label || c || P("renderer.defaultHttpInput.search");
|
|
910
911
|
return /* @__PURE__ */ h(q, {
|
|
911
|
-
className: "mb-4",
|
|
912
|
+
className: "tg:mb-4",
|
|
912
913
|
children: [
|
|
913
914
|
/* @__PURE__ */ h(Z, { children: [s || t.data.name, t.data.required && /* @__PURE__ */ m("span", {
|
|
914
|
-
className: "text-red-500",
|
|
915
|
+
className: "tg:text-red-500",
|
|
915
916
|
children: "*"
|
|
916
917
|
})] }),
|
|
917
918
|
/* @__PURE__ */ h(Q, {
|
|
918
919
|
open: E,
|
|
919
920
|
onOpenChange: D,
|
|
920
|
-
children: [/* @__PURE__ */ m(
|
|
921
|
+
children: [/* @__PURE__ */ m($, {
|
|
921
922
|
asChild: !0,
|
|
922
923
|
children: /* @__PURE__ */ h(K, {
|
|
923
924
|
variant: "outline",
|
|
924
925
|
role: "combobox",
|
|
925
926
|
"aria-expanded": E,
|
|
926
|
-
className: "w-full justify-between",
|
|
927
|
-
children: [e, /* @__PURE__ */ m(S, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
927
|
+
className: "tg:w-full tg:justify-between",
|
|
928
|
+
children: [e, /* @__PURE__ */ m(S, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
|
|
928
929
|
})
|
|
929
|
-
}), /* @__PURE__ */ m(
|
|
930
|
-
className: "w-[300px] p-0",
|
|
930
|
+
}), /* @__PURE__ */ m(le, {
|
|
931
|
+
className: "tg:w-[300px] tg:p-0",
|
|
931
932
|
align: "start",
|
|
932
|
-
children: /* @__PURE__ */ h(
|
|
933
|
+
children: /* @__PURE__ */ h(ke, {
|
|
933
934
|
shouldFilter: !1,
|
|
934
|
-
children: [/* @__PURE__ */ m(
|
|
935
|
+
children: [/* @__PURE__ */ m(Ae, {
|
|
935
936
|
placeholder: P("renderer.defaultHttpInput.search"),
|
|
936
937
|
value: T,
|
|
937
938
|
onValueChange: (e) => {
|
|
938
939
|
te(e), x(null);
|
|
939
940
|
}
|
|
940
|
-
}), /* @__PURE__ */ h(
|
|
941
|
+
}), /* @__PURE__ */ h(je, { children: [
|
|
941
942
|
v && /* @__PURE__ */ m("div", {
|
|
942
|
-
className: "flex items-center justify-center p-4",
|
|
943
|
-
children: /* @__PURE__ */ m(ee, { className: "h-4 w-4 animate-spin" })
|
|
943
|
+
className: "tg:flex tg:items-center tg:justify-center tg:p-4",
|
|
944
|
+
children: /* @__PURE__ */ m(ee, { className: "tg:h-4 tg:w-4 tg:animate-spin" })
|
|
944
945
|
}),
|
|
945
946
|
!v && b && /* @__PURE__ */ h("div", {
|
|
946
|
-
className: "p-4 text-destructive text-sm",
|
|
947
|
+
className: "tg:p-4 tg:text-destructive tg:text-sm",
|
|
947
948
|
children: [/* @__PURE__ */ m("div", { children: b }), /* @__PURE__ */ m("button", {
|
|
948
949
|
type: "button",
|
|
949
|
-
onClick: () =>
|
|
950
|
-
className: "mt-2 block text-primary hover:underline",
|
|
950
|
+
onClick: () => W(T),
|
|
951
|
+
className: "tg:mt-2 tg:block tg:text-primary tg:hover:underline",
|
|
951
952
|
children: P("renderer.defaultHttpInput.retry")
|
|
952
953
|
})]
|
|
953
954
|
}),
|
|
954
|
-
!(v || b) && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
955
|
+
!(v || b) && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Me, { children: P("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ m(Ne, { children: C.map((e) => /* @__PURE__ */ h(Pe, {
|
|
955
956
|
value: e.value,
|
|
956
957
|
onSelect: () => {
|
|
957
958
|
i(e.value), D(!1);
|
|
958
959
|
},
|
|
959
|
-
children: [/* @__PURE__ */ m(g, { className:
|
|
960
|
+
children: [/* @__PURE__ */ m(g, { className: G("tg:mr-2 tg:h-4 tg:w-4", n === e.value ? "tg:opacity-100" : "tg:opacity-0") }), e.label]
|
|
960
961
|
}, e.value)) })] })
|
|
961
962
|
] })]
|
|
962
963
|
})
|
|
@@ -970,50 +971,50 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
970
971
|
let a = v && F?.showLoading, d = H.filter((e) => {
|
|
971
972
|
let t = M[e];
|
|
972
973
|
return t == null || t === "";
|
|
973
|
-
}), y = d.map((e) => f(e, N) || e), w = C.length === 0 && !a ? b || (d.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${y.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0, O = /* @__PURE__ */ h(
|
|
974
|
+
}), y = d.map((e) => f(e, N) || e), w = C.length === 0 && !a ? b || (d.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${y.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0, O = /* @__PURE__ */ h(ue, {
|
|
974
975
|
value: Array.isArray(n) ? n[0] ?? "" : n ?? "",
|
|
975
976
|
onValueChange: (e) => i(e),
|
|
976
977
|
disabled: a || C.length === 0,
|
|
977
978
|
name: _,
|
|
978
|
-
children: [/* @__PURE__ */ h(
|
|
979
|
+
children: [/* @__PURE__ */ h(pe, {
|
|
979
980
|
id: u,
|
|
980
981
|
name: _,
|
|
981
|
-
className: "w-full",
|
|
982
|
-
children: [a && /* @__PURE__ */ m(ee, { className: "mr-2 h-4 w-4 animate-spin" }), /* @__PURE__ */ m(
|
|
983
|
-
}), /* @__PURE__ */ m(
|
|
982
|
+
className: "tg:w-full",
|
|
983
|
+
children: [a && /* @__PURE__ */ m(ee, { className: "tg:mr-2 tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ m(fe, { placeholder: c || P("renderer.defaultHttpInput.selectOption") })]
|
|
984
|
+
}), /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(de, { children: C.map((e, t) => /* @__PURE__ */ m(ge, {
|
|
984
985
|
value: e.value,
|
|
985
986
|
children: e.label
|
|
986
987
|
}, e.value + t)) }) })]
|
|
987
988
|
});
|
|
988
989
|
return /* @__PURE__ */ h(q, {
|
|
989
|
-
className: "mb-4",
|
|
990
|
+
className: "tg:mb-4",
|
|
990
991
|
children: [
|
|
991
992
|
/* @__PURE__ */ h(Z, {
|
|
992
993
|
htmlFor: u,
|
|
993
994
|
children: [s || t.data.name, t.data.required && /* @__PURE__ */ m("span", {
|
|
994
|
-
className: "text-red-500",
|
|
995
|
+
className: "tg:text-red-500",
|
|
995
996
|
children: "*"
|
|
996
997
|
})]
|
|
997
998
|
}),
|
|
998
|
-
w ? /* @__PURE__ */ m(
|
|
999
|
+
w ? /* @__PURE__ */ m(Ke, { children: /* @__PURE__ */ h(qe, { children: [/* @__PURE__ */ m(Je, {
|
|
999
1000
|
asChild: !0,
|
|
1000
1001
|
children: /* @__PURE__ */ m("div", {
|
|
1001
|
-
className: "w-full",
|
|
1002
|
+
className: "tg:w-full",
|
|
1002
1003
|
children: O
|
|
1003
1004
|
})
|
|
1004
|
-
}), /* @__PURE__ */ m(
|
|
1005
|
+
}), /* @__PURE__ */ m(Ye, { children: /* @__PURE__ */ m("p", { children: w }) })] }) }) : O,
|
|
1005
1006
|
o && /* @__PURE__ */ m(Y, { children: o }),
|
|
1006
1007
|
l && !o && /* @__PURE__ */ m(J, { children: l })
|
|
1007
1008
|
]
|
|
1008
1009
|
});
|
|
1009
1010
|
}
|
|
1010
1011
|
return /* @__PURE__ */ h(q, {
|
|
1011
|
-
className: "mb-4",
|
|
1012
|
+
className: "tg:mb-4",
|
|
1012
1013
|
children: [
|
|
1013
1014
|
/* @__PURE__ */ h(Z, {
|
|
1014
1015
|
htmlFor: u,
|
|
1015
1016
|
children: [s || t.data.name, t.data.required && /* @__PURE__ */ m("span", {
|
|
1016
|
-
className: "text-red-500",
|
|
1017
|
+
className: "tg:text-red-500",
|
|
1017
1018
|
children: "*"
|
|
1018
1019
|
})]
|
|
1019
1020
|
}),
|
|
@@ -1029,13 +1030,13 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
1029
1030
|
l && !o && /* @__PURE__ */ m(J, { children: l })
|
|
1030
1031
|
]
|
|
1031
1032
|
});
|
|
1032
|
-
},
|
|
1033
|
-
className: "mb-4",
|
|
1033
|
+
}, tt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
1034
|
+
className: "tg:mb-4",
|
|
1034
1035
|
children: [
|
|
1035
1036
|
/* @__PURE__ */ h(Z, {
|
|
1036
1037
|
htmlFor: c,
|
|
1037
1038
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1038
|
-
className: "text-red-500",
|
|
1039
|
+
className: "tg:text-red-500",
|
|
1039
1040
|
children: "*"
|
|
1040
1041
|
})]
|
|
1041
1042
|
}),
|
|
@@ -1050,13 +1051,13 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
1050
1051
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
1051
1052
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
1052
1053
|
]
|
|
1053
|
-
}),
|
|
1054
|
-
className: "mb-4",
|
|
1054
|
+
}), nt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
1055
|
+
className: "tg:mb-4",
|
|
1055
1056
|
children: [
|
|
1056
1057
|
/* @__PURE__ */ h(Z, {
|
|
1057
1058
|
htmlFor: c,
|
|
1058
1059
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1059
|
-
className: "text-red-500",
|
|
1060
|
+
className: "tg:text-red-500",
|
|
1060
1061
|
children: "*"
|
|
1061
1062
|
})]
|
|
1062
1063
|
}),
|
|
@@ -1075,96 +1076,96 @@ var Ye = (e, t) => t ? t.split(".").reduce((e, t) => {
|
|
|
1075
1076
|
});
|
|
1076
1077
|
//#endregion
|
|
1077
1078
|
//#region src/shared/components/ui/radio-group.tsx
|
|
1078
|
-
function
|
|
1079
|
+
function rt({ className: e, ...t }) {
|
|
1079
1080
|
return /* @__PURE__ */ m(U.Root, {
|
|
1080
1081
|
"data-slot": "radio-group",
|
|
1081
|
-
className:
|
|
1082
|
+
className: G("tg:grid tg:gap-3", e),
|
|
1082
1083
|
...t
|
|
1083
1084
|
});
|
|
1084
1085
|
}
|
|
1085
|
-
function
|
|
1086
|
+
function it({ className: e, ...t }) {
|
|
1086
1087
|
return /* @__PURE__ */ m(U.Item, {
|
|
1087
1088
|
"data-slot": "radio-group-item",
|
|
1088
|
-
className:
|
|
1089
|
+
className: G("tg:aspect-square tg:size-4 tg:shrink-0 tg:rounded-full tg:border tg:border-input tg:text-primary tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
|
|
1089
1090
|
...t,
|
|
1090
1091
|
children: /* @__PURE__ */ m(U.Indicator, {
|
|
1091
1092
|
"data-slot": "radio-group-indicator",
|
|
1092
|
-
className: "relative flex items-center justify-center",
|
|
1093
|
-
children: /* @__PURE__ */ m(C, { className: "
|
|
1093
|
+
className: "tg:relative tg:flex tg:items-center tg:justify-center",
|
|
1094
|
+
children: /* @__PURE__ */ m(C, { className: "tg:-translate-x-1/2 tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:left-1/2 tg:size-2 tg:fill-primary" })
|
|
1094
1095
|
})
|
|
1095
1096
|
});
|
|
1096
1097
|
}
|
|
1097
1098
|
//#endregion
|
|
1098
1099
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.tsx
|
|
1099
|
-
var
|
|
1100
|
+
var at = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, id: o, name: s }) => {
|
|
1100
1101
|
let c = d(), l = t ? String(t) : "", u = e.data.variant === "card";
|
|
1101
1102
|
return /* @__PURE__ */ h(q, {
|
|
1102
|
-
className: "mb-4",
|
|
1103
|
+
className: "tg:mb-4",
|
|
1103
1104
|
children: [
|
|
1104
1105
|
/* @__PURE__ */ h(Z, {
|
|
1105
|
-
className: "mb-1",
|
|
1106
|
+
className: "tg:mb-1",
|
|
1106
1107
|
htmlFor: o,
|
|
1107
1108
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1108
|
-
className: "text-red-500",
|
|
1109
|
+
className: "tg:text-red-500",
|
|
1109
1110
|
children: "*"
|
|
1110
1111
|
})]
|
|
1111
1112
|
}),
|
|
1112
|
-
/* @__PURE__ */ m(
|
|
1113
|
+
/* @__PURE__ */ m(rt, {
|
|
1113
1114
|
value: l,
|
|
1114
1115
|
onValueChange: (e) => n(e),
|
|
1115
1116
|
id: o,
|
|
1116
1117
|
name: s,
|
|
1117
|
-
className: u ? "flex flex-col gap-2" : void 0,
|
|
1118
|
+
className: u ? "tg:flex tg:flex-col tg:gap-2" : void 0,
|
|
1118
1119
|
children: e.data.options?.map((e, t) => {
|
|
1119
1120
|
let n = `${o}-${e.value}`, r = c(e.label) || e.value, i = c(e.description), a = l === String(e.value);
|
|
1120
1121
|
return u ? /* @__PURE__ */ h(Z, {
|
|
1121
1122
|
htmlFor: n,
|
|
1122
|
-
className:
|
|
1123
|
+
className: G("tg:flex tg:cursor-pointer tg:items-start tg:gap-3 tg:rounded-md tg:border tg:p-3 tg:transition-colors", "tg:hover:border-primary/50", a && "tg:border-primary tg:bg-primary/5", e.disabled && "tg:pointer-events-none tg:opacity-50"),
|
|
1123
1124
|
children: [
|
|
1124
|
-
/* @__PURE__ */ m(
|
|
1125
|
+
/* @__PURE__ */ m(it, {
|
|
1125
1126
|
value: String(e.value),
|
|
1126
1127
|
id: n,
|
|
1127
1128
|
disabled: e.disabled,
|
|
1128
|
-
className: "mt-1"
|
|
1129
|
+
className: "tg:mt-1"
|
|
1129
1130
|
}),
|
|
1130
1131
|
e.image && /* @__PURE__ */ m("img", {
|
|
1131
1132
|
src: e.image,
|
|
1132
1133
|
alt: "",
|
|
1133
|
-
className: "h-10 w-10 shrink-0 rounded object-cover"
|
|
1134
|
+
className: "tg:h-10 tg:w-10 tg:shrink-0 tg:rounded tg:object-cover"
|
|
1134
1135
|
}),
|
|
1135
1136
|
/* @__PURE__ */ h("div", {
|
|
1136
|
-
className: "flex min-w-0 flex-col",
|
|
1137
|
+
className: "tg:flex tg:min-w-0 tg:flex-col",
|
|
1137
1138
|
children: [/* @__PURE__ */ m("span", {
|
|
1138
|
-
className: "font-medium text-sm",
|
|
1139
|
+
className: "tg:font-medium tg:text-sm",
|
|
1139
1140
|
children: r
|
|
1140
1141
|
}), i && /* @__PURE__ */ m("span", {
|
|
1141
|
-
className: "text-muted-foreground text-xs",
|
|
1142
|
+
className: "tg:text-muted-foreground tg:text-xs",
|
|
1142
1143
|
children: i
|
|
1143
1144
|
})]
|
|
1144
1145
|
})
|
|
1145
1146
|
]
|
|
1146
1147
|
}, e.value + t) : /* @__PURE__ */ h("div", {
|
|
1147
|
-
className: "flex items-start space-x-2",
|
|
1148
|
+
className: "tg:flex tg:items-start tg:space-x-2",
|
|
1148
1149
|
children: [
|
|
1149
|
-
/* @__PURE__ */ m(
|
|
1150
|
+
/* @__PURE__ */ m(it, {
|
|
1150
1151
|
value: String(e.value),
|
|
1151
1152
|
id: n,
|
|
1152
1153
|
disabled: e.disabled,
|
|
1153
|
-
className: "mt-0.5"
|
|
1154
|
+
className: "tg:mt-0.5"
|
|
1154
1155
|
}),
|
|
1155
1156
|
e.image && /* @__PURE__ */ m("img", {
|
|
1156
1157
|
src: e.image,
|
|
1157
1158
|
alt: "",
|
|
1158
|
-
className: "h-8 w-8 rounded object-cover"
|
|
1159
|
+
className: "tg:h-8 tg:w-8 tg:rounded tg:object-cover"
|
|
1159
1160
|
}),
|
|
1160
1161
|
/* @__PURE__ */ h("div", {
|
|
1161
|
-
className: "flex flex-col",
|
|
1162
|
+
className: "tg:flex tg:flex-col",
|
|
1162
1163
|
children: [/* @__PURE__ */ m(Z, {
|
|
1163
1164
|
htmlFor: n,
|
|
1164
|
-
className: "cursor-pointer font-normal text-sm",
|
|
1165
|
+
className: "tg:cursor-pointer tg:font-normal tg:text-sm",
|
|
1165
1166
|
children: r
|
|
1166
1167
|
}), i && /* @__PURE__ */ m("span", {
|
|
1167
|
-
className: "text-muted-foreground text-xs",
|
|
1168
|
+
className: "tg:text-muted-foreground tg:text-xs",
|
|
1168
1169
|
children: i
|
|
1169
1170
|
})]
|
|
1170
1171
|
})
|
|
@@ -1176,28 +1177,28 @@ var it = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, i
|
|
|
1176
1177
|
a && !r && /* @__PURE__ */ m(J, { children: a })
|
|
1177
1178
|
]
|
|
1178
1179
|
});
|
|
1179
|
-
},
|
|
1180
|
+
}, ot = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => {
|
|
1180
1181
|
let l = d(), u = t ? String(t) : "";
|
|
1181
1182
|
return /* @__PURE__ */ h(q, {
|
|
1182
|
-
className: "mb-4",
|
|
1183
|
+
className: "tg:mb-4",
|
|
1183
1184
|
children: [
|
|
1184
1185
|
/* @__PURE__ */ h(Z, {
|
|
1185
1186
|
htmlFor: c,
|
|
1186
1187
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1187
|
-
className: "text-red-500",
|
|
1188
|
+
className: "tg:text-red-500",
|
|
1188
1189
|
children: "*"
|
|
1189
1190
|
})]
|
|
1190
1191
|
}),
|
|
1191
|
-
/* @__PURE__ */ h(
|
|
1192
|
+
/* @__PURE__ */ h(ue, {
|
|
1192
1193
|
name: s,
|
|
1193
1194
|
value: u,
|
|
1194
1195
|
onValueChange: (e) => n(e),
|
|
1195
|
-
children: [/* @__PURE__ */ m(
|
|
1196
|
+
children: [/* @__PURE__ */ m(pe, {
|
|
1196
1197
|
id: c,
|
|
1197
1198
|
name: s,
|
|
1198
|
-
className: "w-full",
|
|
1199
|
-
children: /* @__PURE__ */ m(
|
|
1200
|
-
}), /* @__PURE__ */ m(
|
|
1199
|
+
className: "tg:w-full",
|
|
1200
|
+
children: /* @__PURE__ */ m(fe, { placeholder: a || l("renderer.defaultSelectInput.selectOption") })
|
|
1201
|
+
}), /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(de, { children: e.data.options?.map((e, t) => /* @__PURE__ */ m(ge, {
|
|
1201
1202
|
value: String(e.value),
|
|
1202
1203
|
disabled: e.disabled,
|
|
1203
1204
|
children: l(e.label) ? l(e.label) : e.value
|
|
@@ -1207,20 +1208,20 @@ var it = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, i
|
|
|
1207
1208
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
1208
1209
|
]
|
|
1209
1210
|
});
|
|
1210
|
-
},
|
|
1211
|
+
}, st = ({ children: e, onSubmit: t }) => /* @__PURE__ */ m("form", {
|
|
1211
1212
|
onSubmit: t,
|
|
1212
|
-
className: "mx-auto max-w-2xl gap-y-3",
|
|
1213
|
+
className: "tg:mx-auto tg:max-w-2xl tg:gap-y-3",
|
|
1213
1214
|
children: e
|
|
1214
|
-
}),
|
|
1215
|
+
}), ct = ({ node: e, children: t }) => {
|
|
1215
1216
|
let n = d()(e.data.label);
|
|
1216
1217
|
return /* @__PURE__ */ h("section", {
|
|
1217
|
-
className: "mb-6 rounded-lg border p-4",
|
|
1218
|
+
className: "tg:mb-6 tg:rounded-lg tg:border tg:p-4",
|
|
1218
1219
|
children: [n && /* @__PURE__ */ m("h3", {
|
|
1219
|
-
className: "mb-4 font-semibold text-lg",
|
|
1220
|
+
className: "tg:mb-4 tg:font-semibold tg:text-lg",
|
|
1220
1221
|
children: n
|
|
1221
1222
|
}), t]
|
|
1222
1223
|
});
|
|
1223
|
-
},
|
|
1224
|
+
}, lt = D(({ label: e, id: t, disabled: n, onBlur: r, onClick: i, onFocus: a, onPointerDown: o, onPointerLeave: s, onPointerMove: c, ...l }, u) => {
|
|
1224
1225
|
let f = d();
|
|
1225
1226
|
return /* @__PURE__ */ m("button", {
|
|
1226
1227
|
ref: u,
|
|
@@ -1233,62 +1234,62 @@ var it = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, i
|
|
|
1233
1234
|
onPointerLeave: s,
|
|
1234
1235
|
onPointerMove: c,
|
|
1235
1236
|
type: "submit",
|
|
1236
|
-
className: "mt-4 rounded-md bg-blue-500 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1237
|
+
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",
|
|
1237
1238
|
...l,
|
|
1238
1239
|
children: e || f("renderer.defaultSubmitButton.submit")
|
|
1239
1240
|
});
|
|
1240
1241
|
});
|
|
1241
1242
|
//#endregion
|
|
1242
1243
|
//#region src/shared/components/ui/separator.tsx
|
|
1243
|
-
function
|
|
1244
|
+
function ut({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
1244
1245
|
return /* @__PURE__ */ m(ae.Root, {
|
|
1245
1246
|
"data-slot": "separator",
|
|
1246
1247
|
decorative: n,
|
|
1247
1248
|
orientation: t,
|
|
1248
|
-
className:
|
|
1249
|
+
className: G("tg:shrink-0 tg:bg-border tg:data-[orientation=horizontal]:h-px tg:data-[orientation=vertical]:h-full tg:data-[orientation=horizontal]:w-full tg:data-[orientation=vertical]:w-px", e),
|
|
1249
1250
|
...r
|
|
1250
1251
|
});
|
|
1251
1252
|
}
|
|
1252
1253
|
//#endregion
|
|
1253
1254
|
//#region src/renderer/features/TreegeRenderer/web/components/DefaultUI.tsx
|
|
1254
|
-
var
|
|
1255
|
+
var dt = ({ node: e }) => {
|
|
1255
1256
|
let t = d()(e.data?.label);
|
|
1256
1257
|
return t ? /* @__PURE__ */ h("div", {
|
|
1257
|
-
className: "flex items-center gap-x-3",
|
|
1258
|
+
className: "tg:flex tg:items-center tg:gap-x-3",
|
|
1258
1259
|
children: [
|
|
1259
|
-
/* @__PURE__ */ m(
|
|
1260
|
+
/* @__PURE__ */ m(ut, { className: "tg:my-8 tg:flex-1" }),
|
|
1260
1261
|
/* @__PURE__ */ m("h4", {
|
|
1261
|
-
className: "font-semibold text-sm",
|
|
1262
|
+
className: "tg:font-semibold tg:text-sm",
|
|
1262
1263
|
children: t
|
|
1263
1264
|
}),
|
|
1264
|
-
/* @__PURE__ */ m(
|
|
1265
|
+
/* @__PURE__ */ m(ut, { className: "tg:my-8 tg:flex-1" })
|
|
1265
1266
|
]
|
|
1266
|
-
}) : /* @__PURE__ */ m(
|
|
1267
|
-
},
|
|
1267
|
+
}) : /* @__PURE__ */ m(ut, { className: "tg:my-8" });
|
|
1268
|
+
}, ft = ({ node: e }) => {
|
|
1268
1269
|
let { edges: n } = a(), r = d();
|
|
1269
1270
|
return /* @__PURE__ */ m("h2", {
|
|
1270
|
-
className:
|
|
1271
|
+
className: G("tg:mb-5 tg:font-bold tg:text-2xl", !t(e.id, n) && "tg:mt-10"),
|
|
1271
1272
|
children: r(e.data?.label)
|
|
1272
1273
|
});
|
|
1273
|
-
},
|
|
1274
|
-
divider:
|
|
1275
|
-
title:
|
|
1276
|
-
},
|
|
1274
|
+
}, pt = {
|
|
1275
|
+
divider: dt,
|
|
1276
|
+
title: ft
|
|
1277
|
+
}, mt = ({ children: e, missingFields: t = [] }) => {
|
|
1277
1278
|
let n = t.length > 0, r = d();
|
|
1278
|
-
return n ? /* @__PURE__ */ m(
|
|
1279
|
+
return n ? /* @__PURE__ */ m(Ke, { children: /* @__PURE__ */ h(qe, { children: [/* @__PURE__ */ m(Je, {
|
|
1279
1280
|
asChild: !0,
|
|
1280
1281
|
children: e
|
|
1281
|
-
}), /* @__PURE__ */ m(
|
|
1282
|
-
className: "space-y-1",
|
|
1282
|
+
}), /* @__PURE__ */ m(Ye, { children: /* @__PURE__ */ h("div", {
|
|
1283
|
+
className: "tg:space-y-1",
|
|
1283
1284
|
children: [/* @__PURE__ */ h("p", {
|
|
1284
|
-
className: "font-semibold",
|
|
1285
|
+
className: "tg:font-semibold",
|
|
1285
1286
|
children: [r("renderer.defaultSubmitButton.requiredFieldsMissing"), ":"]
|
|
1286
1287
|
}), /* @__PURE__ */ m("ul", {
|
|
1287
|
-
className: "list-inside list-disc",
|
|
1288
|
+
className: "tg:list-inside tg:list-disc",
|
|
1288
1289
|
children: t.map((e, t) => /* @__PURE__ */ m("li", { children: e }, t))
|
|
1289
1290
|
})]
|
|
1290
1291
|
}) })] }) }) : e;
|
|
1291
|
-
},
|
|
1292
|
+
}, ht = ({ components: e, className: t, flows: n, googleApiKey: r, language: a, onChange: o, onSubmit: l, theme: d, validate: f, validationMode: p, initialValues: g = {} }) => {
|
|
1292
1293
|
let { canSubmit: _, clearSubmitMessage: v, config: y, firstErrorFieldId: b, formErrors: x, formValues: S, handleSubmit: C, inputNodes: ee, isSubmitting: w, mergedFlow: T, missingRequiredFields: te, setFieldValue: E, submitMessage: D, t: k, visibleNodes: ne, visibleRootNodes: A } = i({
|
|
1293
1294
|
components: e,
|
|
1294
1295
|
flows: n,
|
|
@@ -1302,12 +1303,12 @@ var ut = ({ node: e }) => {
|
|
|
1302
1303
|
validationMode: p
|
|
1303
1304
|
}), { FormWrapper: j, SubmitButton: M, SubmitButtonWrapper: N, renderNode: P } = c({
|
|
1304
1305
|
config: y,
|
|
1305
|
-
DefaultFormWrapper:
|
|
1306
|
-
DefaultGroup:
|
|
1307
|
-
DefaultSubmitButton:
|
|
1308
|
-
DefaultSubmitButtonWrapper:
|
|
1309
|
-
defaultInputRenderers:
|
|
1310
|
-
defaultUI:
|
|
1306
|
+
DefaultFormWrapper: st,
|
|
1307
|
+
DefaultGroup: ct,
|
|
1308
|
+
DefaultSubmitButton: lt,
|
|
1309
|
+
DefaultSubmitButtonWrapper: mt,
|
|
1310
|
+
defaultInputRenderers: wt,
|
|
1311
|
+
defaultUI: pt,
|
|
1311
1312
|
formErrors: x,
|
|
1312
1313
|
formValues: S,
|
|
1313
1314
|
missingRequiredFields: te,
|
|
@@ -1317,7 +1318,7 @@ var ut = ({ node: e }) => {
|
|
|
1317
1318
|
e.preventDefault(), !await C() && b && document.getElementById(b)?.focus();
|
|
1318
1319
|
}, [C, b]);
|
|
1319
1320
|
return /* @__PURE__ */ m("div", {
|
|
1320
|
-
className:
|
|
1321
|
+
className: G("treege", t),
|
|
1321
1322
|
children: /* @__PURE__ */ m(u, {
|
|
1322
1323
|
theme: y.theme,
|
|
1323
1324
|
storageKey: "treege-renderer-theme",
|
|
@@ -1343,22 +1344,22 @@ var ut = ({ node: e }) => {
|
|
|
1343
1344
|
})
|
|
1344
1345
|
}),
|
|
1345
1346
|
/* @__PURE__ */ m("p", {
|
|
1346
|
-
className: "py-2 text-muted-foreground text-xs",
|
|
1347
|
+
className: "tg:py-2 tg:text-muted-foreground tg:text-xs",
|
|
1347
1348
|
children: "Powered by Treege"
|
|
1348
1349
|
})
|
|
1349
1350
|
]
|
|
1350
1351
|
}), D && /* @__PURE__ */ m("div", {
|
|
1351
|
-
className: `my-4 rounded-md p-4 ${D.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"}`,
|
|
1352
|
+
className: `tg:my-4 tg:rounded-md tg:p-4 ${D.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"}`,
|
|
1352
1353
|
role: "alert",
|
|
1353
1354
|
children: /* @__PURE__ */ h("div", {
|
|
1354
|
-
className: "flex items-center justify-between",
|
|
1355
|
+
className: "tg:flex tg:items-center tg:justify-between",
|
|
1355
1356
|
children: [/* @__PURE__ */ m("p", {
|
|
1356
|
-
className: "font-medium text-sm",
|
|
1357
|
+
className: "tg:font-medium tg:text-sm",
|
|
1357
1358
|
children: D.message
|
|
1358
1359
|
}), /* @__PURE__ */ m("button", {
|
|
1359
1360
|
type: "button",
|
|
1360
1361
|
onClick: v,
|
|
1361
|
-
className: "ml-4 font-medium text-sm underline hover:no-underline focus:outline-none",
|
|
1362
|
+
className: "tg:ml-4 tg:font-medium tg:text-sm tg:underline tg:hover:no-underline tg:focus:outline-none",
|
|
1362
1363
|
children: k("common.close")
|
|
1363
1364
|
})]
|
|
1364
1365
|
})
|
|
@@ -1366,11 +1367,11 @@ var ut = ({ node: e }) => {
|
|
|
1366
1367
|
})
|
|
1367
1368
|
})
|
|
1368
1369
|
});
|
|
1369
|
-
},
|
|
1370
|
+
}, gt = ({ missingRequiredFields: e, isSubmitting: t, label: n }) => {
|
|
1370
1371
|
let r = o(), i = r?.components?.submitButton, a = r?.components?.submitButtonWrapper;
|
|
1371
|
-
return /* @__PURE__ */ m(a ||
|
|
1372
|
+
return /* @__PURE__ */ m(a || mt, {
|
|
1372
1373
|
missingFields: e,
|
|
1373
|
-
children: /* @__PURE__ */ m(i ||
|
|
1374
|
+
children: /* @__PURE__ */ m(i || lt, {
|
|
1374
1375
|
label: n,
|
|
1375
1376
|
disabled: t
|
|
1376
1377
|
})
|
|
@@ -1378,30 +1379,30 @@ var ut = ({ node: e }) => {
|
|
|
1378
1379
|
};
|
|
1379
1380
|
//#endregion
|
|
1380
1381
|
//#region src/shared/components/ui/switch.tsx
|
|
1381
|
-
function
|
|
1382
|
+
function _t({ className: e, ...t }) {
|
|
1382
1383
|
return /* @__PURE__ */ m(oe.Root, {
|
|
1383
1384
|
"data-slot": "switch",
|
|
1384
|
-
className:
|
|
1385
|
+
className: G("tg:peer tg:inline-flex tg:h-[1.15rem] tg:w-8 tg:shrink-0 tg:items-center tg:rounded-full tg:border tg:border-transparent tg:shadow-xs tg:outline-none tg:transition-all tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:data-[state=checked]:bg-primary tg:data-[state=unchecked]:bg-input tg:dark:data-[state=unchecked]:bg-input/80", e),
|
|
1385
1386
|
...t,
|
|
1386
1387
|
children: /* @__PURE__ */ m(oe.Thumb, {
|
|
1387
1388
|
"data-slot": "switch-thumb",
|
|
1388
|
-
className:
|
|
1389
|
+
className: G("tg:pointer-events-none tg:block tg:size-4 tg:rounded-full tg:bg-background tg:ring-0 tg:transition-transform tg:data-[state=checked]:translate-x-[calc(100%-2px)] tg:data-[state=unchecked]:translate-x-0 tg:dark:data-[state=checked]:bg-primary-foreground tg:dark:data-[state=unchecked]:bg-foreground")
|
|
1389
1390
|
})
|
|
1390
1391
|
});
|
|
1391
1392
|
}
|
|
1392
1393
|
//#endregion
|
|
1393
1394
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.tsx
|
|
1394
|
-
var
|
|
1395
|
-
className: "mb-4",
|
|
1395
|
+
var vt = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, name: o, id: s }) => /* @__PURE__ */ h(q, {
|
|
1396
|
+
className: "tg:mb-4",
|
|
1396
1397
|
children: [
|
|
1397
1398
|
/* @__PURE__ */ h(Z, {
|
|
1398
1399
|
htmlFor: s,
|
|
1399
1400
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1400
|
-
className: "text-red-500",
|
|
1401
|
+
className: "tg:text-red-500",
|
|
1401
1402
|
children: "*"
|
|
1402
1403
|
})]
|
|
1403
1404
|
}),
|
|
1404
|
-
/* @__PURE__ */ m(
|
|
1405
|
+
/* @__PURE__ */ m(_t, {
|
|
1405
1406
|
id: s,
|
|
1406
1407
|
name: o,
|
|
1407
1408
|
checked: t,
|
|
@@ -1413,44 +1414,44 @@ var _t = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, n
|
|
|
1413
1414
|
});
|
|
1414
1415
|
//#endregion
|
|
1415
1416
|
//#region src/shared/components/ui/textarea.tsx
|
|
1416
|
-
function
|
|
1417
|
+
function yt({ className: e, ...t }) {
|
|
1417
1418
|
return /* @__PURE__ */ m("textarea", {
|
|
1418
1419
|
"data-slot": "textarea",
|
|
1419
|
-
className:
|
|
1420
|
+
className: G("tg:field-sizing-content tg:flex tg:min-h-16 tg:w-full tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:placeholder:text-muted-foreground tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:md:text-sm tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
|
|
1420
1421
|
...t
|
|
1421
1422
|
});
|
|
1422
1423
|
}
|
|
1423
1424
|
//#endregion
|
|
1424
1425
|
//#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.tsx
|
|
1425
|
-
var
|
|
1426
|
-
className: "mb-4",
|
|
1426
|
+
var bt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
1427
|
+
className: "tg:mb-4",
|
|
1427
1428
|
children: [
|
|
1428
1429
|
/* @__PURE__ */ h(Z, {
|
|
1429
1430
|
htmlFor: c,
|
|
1430
1431
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1431
|
-
className: "text-red-500",
|
|
1432
|
+
className: "tg:text-red-500",
|
|
1432
1433
|
children: "*"
|
|
1433
1434
|
})]
|
|
1434
1435
|
}),
|
|
1435
|
-
/* @__PURE__ */ m(
|
|
1436
|
+
/* @__PURE__ */ m(yt, {
|
|
1436
1437
|
id: c,
|
|
1437
1438
|
name: s,
|
|
1438
1439
|
value: t ?? "",
|
|
1439
1440
|
onChange: (e) => n(e.target.value),
|
|
1440
1441
|
placeholder: a,
|
|
1441
|
-
className: "w-full rounded-md border px-3 py-2",
|
|
1442
|
+
className: "tg:w-full tg:rounded-md tg:border tg:px-3 tg:py-2",
|
|
1442
1443
|
rows: 4
|
|
1443
1444
|
}),
|
|
1444
1445
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
1445
1446
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
1446
1447
|
]
|
|
1447
|
-
}),
|
|
1448
|
-
className: "mb-4",
|
|
1448
|
+
}), xt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
1449
|
+
className: "tg:mb-4",
|
|
1449
1450
|
children: [
|
|
1450
1451
|
/* @__PURE__ */ h(Z, {
|
|
1451
1452
|
htmlFor: c,
|
|
1452
1453
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1453
|
-
className: "text-red-500",
|
|
1454
|
+
className: "tg:text-red-500",
|
|
1454
1455
|
children: "*"
|
|
1455
1456
|
})]
|
|
1456
1457
|
}),
|
|
@@ -1465,13 +1466,13 @@ var yt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
1465
1466
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
1466
1467
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
1467
1468
|
]
|
|
1468
|
-
}),
|
|
1469
|
-
className: "mb-4",
|
|
1469
|
+
}), St = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s, id: c }) => /* @__PURE__ */ h(q, {
|
|
1470
|
+
className: "tg:mb-4",
|
|
1470
1471
|
children: [
|
|
1471
1472
|
/* @__PURE__ */ h(Z, {
|
|
1472
1473
|
htmlFor: c,
|
|
1473
1474
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1474
|
-
className: "text-red-500",
|
|
1475
|
+
className: "tg:text-red-500",
|
|
1475
1476
|
children: "*"
|
|
1476
1477
|
})]
|
|
1477
1478
|
}),
|
|
@@ -1482,29 +1483,29 @@ var yt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
1482
1483
|
value: t ?? "",
|
|
1483
1484
|
onChange: (e) => n(e.target.value),
|
|
1484
1485
|
placeholder: a,
|
|
1485
|
-
className: "bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1486
|
+
className: "tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
|
|
1486
1487
|
}),
|
|
1487
1488
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
1488
1489
|
o && !r && /* @__PURE__ */ m(J, { children: o })
|
|
1489
1490
|
]
|
|
1490
|
-
}),
|
|
1491
|
+
}), Ct = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a, id: o, name: s }) => {
|
|
1491
1492
|
let c = d(), l = Array.isArray(t) ? t : [], u = l[0] || "", f = l[1] || "", p = (e) => {
|
|
1492
1493
|
n([e, f]);
|
|
1493
1494
|
}, g = (e) => {
|
|
1494
1495
|
n([u, e]);
|
|
1495
1496
|
};
|
|
1496
1497
|
return /* @__PURE__ */ h(q, {
|
|
1497
|
-
className: "mb-4",
|
|
1498
|
+
className: "tg:mb-4",
|
|
1498
1499
|
children: [
|
|
1499
1500
|
/* @__PURE__ */ h(Z, {
|
|
1500
1501
|
htmlFor: `${o}-start`,
|
|
1501
1502
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ m("span", {
|
|
1502
|
-
className: "text-red-500",
|
|
1503
|
+
className: "tg:text-red-500",
|
|
1503
1504
|
children: "*"
|
|
1504
1505
|
})]
|
|
1505
1506
|
}),
|
|
1506
1507
|
/* @__PURE__ */ h("div", {
|
|
1507
|
-
className: "flex gap-2",
|
|
1508
|
+
className: "tg:flex tg:gap-2",
|
|
1508
1509
|
children: [/* @__PURE__ */ m(X, {
|
|
1509
1510
|
id: `${o}-start`,
|
|
1510
1511
|
name: `${s}-start`,
|
|
@@ -1515,7 +1516,7 @@ var yt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
1515
1516
|
value: u,
|
|
1516
1517
|
onChange: (e) => p(e.target.value),
|
|
1517
1518
|
placeholder: c("renderer.defaultInputs.startTime"),
|
|
1518
|
-
className: "flex-1 bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1519
|
+
className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
|
|
1519
1520
|
}), /* @__PURE__ */ m(X, {
|
|
1520
1521
|
id: `${o}-end`,
|
|
1521
1522
|
name: `${s}-end`,
|
|
@@ -1526,32 +1527,32 @@ var yt = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a,
|
|
|
1526
1527
|
value: f,
|
|
1527
1528
|
onChange: (e) => g(e.target.value),
|
|
1528
1529
|
placeholder: c("renderer.defaultInputs.endTime"),
|
|
1529
|
-
className: "flex-1 bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1530
|
+
className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
|
|
1530
1531
|
})]
|
|
1531
1532
|
}),
|
|
1532
1533
|
r && /* @__PURE__ */ m(Y, { children: r }),
|
|
1533
1534
|
a && !r && /* @__PURE__ */ m(J, { children: a })
|
|
1534
1535
|
]
|
|
1535
1536
|
});
|
|
1536
|
-
},
|
|
1537
|
-
address:
|
|
1538
|
-
autocomplete:
|
|
1539
|
-
checkbox:
|
|
1540
|
-
date:
|
|
1541
|
-
daterange:
|
|
1542
|
-
file:
|
|
1543
|
-
hidden:
|
|
1544
|
-
http:
|
|
1545
|
-
number:
|
|
1546
|
-
password:
|
|
1547
|
-
radio:
|
|
1548
|
-
select:
|
|
1549
|
-
submit:
|
|
1550
|
-
switch:
|
|
1551
|
-
text:
|
|
1552
|
-
textarea:
|
|
1553
|
-
time:
|
|
1554
|
-
timerange:
|
|
1537
|
+
}, wt = {
|
|
1538
|
+
address: Le,
|
|
1539
|
+
autocomplete: Re,
|
|
1540
|
+
checkbox: ze,
|
|
1541
|
+
date: He,
|
|
1542
|
+
daterange: Ue,
|
|
1543
|
+
file: We,
|
|
1544
|
+
hidden: Ge,
|
|
1545
|
+
http: et,
|
|
1546
|
+
number: tt,
|
|
1547
|
+
password: nt,
|
|
1548
|
+
radio: at,
|
|
1549
|
+
select: ot,
|
|
1550
|
+
submit: gt,
|
|
1551
|
+
switch: vt,
|
|
1552
|
+
text: xt,
|
|
1553
|
+
textarea: bt,
|
|
1554
|
+
time: St,
|
|
1555
|
+
timerange: Ct
|
|
1555
1556
|
};
|
|
1556
1557
|
//#endregion
|
|
1557
|
-
export { Z as $,
|
|
1558
|
+
export { Z as $, Me as A, De as B, We as C, Re as D, ze as E, be as F, ge as G, ue as H, we as I, pe as J, he as K, Oe as L, Ae as M, Pe as N, Le as O, je as P, $ as Q, Ee as R, Ge as S, He as T, me as U, xe as V, de as W, Q as X, fe as Y, le as Z, rt as _, bt as a, G as at, tt as b, _t as c, ft as d, X as et, pt as f, at as g, ot as h, xt as i, K as it, Ne as j, ke as k, ht as l, ct as m, Ct as n, q as nt, yt as o, ut as p, _e as q, St as r, ce as rt, vt as s, wt as t, J as tt, dt as u, it as v, Ue as w, et as x, nt as y, Te as z };
|