@declarion/react 0.2.16 → 0.3.0
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-lib/{DraggableChildrenTable-B4JD8tAe.js → DraggableChildrenTable-C5Mzy-o2.js} +2 -2
- package/dist-lib/{DraggableChildrenTable-B4JD8tAe.js.map → DraggableChildrenTable-C5Mzy-o2.js.map} +1 -1
- package/dist-lib/api/data.d.ts +13 -6
- package/dist-lib/api/entities.d.ts +64 -5
- package/dist-lib/api/params.d.ts +7 -3
- package/dist-lib/{dataTableStyles-DQdH4Ilw.js → dataTableStyles-D3BsVlSi.js} +685 -680
- package/dist-lib/dataTableStyles-D3BsVlSi.js.map +1 -0
- package/dist-lib/index.js +1162 -1126
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/dataTableStyles-DQdH4Ilw.js.map +0 -1
|
@@ -3,18 +3,18 @@ import { a as w, i as T, o as E, r as D, s as O, t as k } from "./rich-text-CJpz
|
|
|
3
3
|
import { Suspense as A, forwardRef as j, lazy as M, useCallback as N, useEffect as P, useLayoutEffect as F, useMemo as I, useRef as L, useState as R } from "react";
|
|
4
4
|
import { useQuery as z } from "@tanstack/react-query";
|
|
5
5
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { create as
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { twMerge as
|
|
10
|
-
import { formatDistanceStrict as
|
|
6
|
+
import { createPortal as te } from "react-dom";
|
|
7
|
+
import { create as U } from "zustand";
|
|
8
|
+
import { clsx as ne } from "clsx";
|
|
9
|
+
import { twMerge as W } from "tailwind-merge";
|
|
10
|
+
import { formatDistanceStrict as re, formatDistanceToNowStrict as ie, formatISO as ae } from "date-fns";
|
|
11
11
|
//#region src/components/primitives/cx.ts
|
|
12
|
-
function
|
|
12
|
+
function oe(...e) {
|
|
13
13
|
return e.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/components/primitives/Icons.tsx
|
|
17
|
-
var
|
|
17
|
+
var G = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__PURE__ */ V("svg", {
|
|
18
18
|
width: n,
|
|
19
19
|
height: n,
|
|
20
20
|
viewBox: "0 0 24 24",
|
|
@@ -27,14 +27,14 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
27
27
|
style: i,
|
|
28
28
|
"aria-hidden": "true",
|
|
29
29
|
children: e
|
|
30
|
-
}),
|
|
31
|
-
home:
|
|
32
|
-
inbox:
|
|
30
|
+
}), K = {
|
|
31
|
+
home: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M3 10.5 12 3l9 7.5" }), /* @__PURE__ */ V("path", { d: "M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5" })] })),
|
|
32
|
+
inbox: G(/* @__PURE__ */ H(B, { children: [
|
|
33
33
|
/* @__PURE__ */ V("path", { d: "M4 13v5a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5" }),
|
|
34
34
|
/* @__PURE__ */ V("path", { d: "M4 13h5l1 2h4l1-2h5" }),
|
|
35
35
|
/* @__PURE__ */ V("path", { d: "M4 13 7 5a2 2 0 0 1 2-1h6a2 2 0 0 1 2 1l3 8" })
|
|
36
36
|
] })),
|
|
37
|
-
flow:
|
|
37
|
+
flow: G(/* @__PURE__ */ H(B, { children: [
|
|
38
38
|
/* @__PURE__ */ V("circle", {
|
|
39
39
|
cx: "6",
|
|
40
40
|
cy: "6",
|
|
@@ -57,12 +57,12 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ V("path", { d: "M8 6h8M6 8v8M18 8v8M8 18h8" })
|
|
59
59
|
] })),
|
|
60
|
-
pipeline:
|
|
60
|
+
pipeline: G(/* @__PURE__ */ H(B, { children: [
|
|
61
61
|
/* @__PURE__ */ V("path", { d: "M3 6h13l5 3-5 3H3z" }),
|
|
62
62
|
/* @__PURE__ */ V("path", { d: "M3 13h9" }),
|
|
63
63
|
/* @__PURE__ */ V("path", { d: "M3 18h13" })
|
|
64
64
|
] })),
|
|
65
|
-
leads:
|
|
65
|
+
leads: G(/* @__PURE__ */ H(B, { children: [
|
|
66
66
|
/* @__PURE__ */ V("circle", {
|
|
67
67
|
cx: "9",
|
|
68
68
|
cy: "8",
|
|
@@ -71,13 +71,13 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
71
71
|
/* @__PURE__ */ V("path", { d: "M3 20c0-3 3-5 6-5s6 2 6 5" }),
|
|
72
72
|
/* @__PURE__ */ V("path", { d: "M17 10l2 2 4-4" })
|
|
73
73
|
] })),
|
|
74
|
-
company:
|
|
74
|
+
company: G(/* @__PURE__ */ H(B, { children: [
|
|
75
75
|
/* @__PURE__ */ V("path", { d: "M4 21V6a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v15" }),
|
|
76
76
|
/* @__PURE__ */ V("path", { d: "M15 21V11h4a1 1 0 0 1 1 1v9" }),
|
|
77
77
|
/* @__PURE__ */ V("path", { d: "M7 9h2M7 13h2M7 17h2M11 9h1M11 13h1M11 17h1" })
|
|
78
78
|
] })),
|
|
79
|
-
activity:
|
|
80
|
-
users:
|
|
79
|
+
activity: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M3 12h4l3-8 4 16 3-8h4" }) })),
|
|
80
|
+
users: G(/* @__PURE__ */ H(B, { children: [
|
|
81
81
|
/* @__PURE__ */ V("circle", {
|
|
82
82
|
cx: "9",
|
|
83
83
|
cy: "8",
|
|
@@ -87,19 +87,19 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
87
87
|
/* @__PURE__ */ V("path", { d: "M16 3.5a3 3 0 0 1 0 6" }),
|
|
88
88
|
/* @__PURE__ */ V("path", { d: "M22 20c0-2.5-1.5-5-4-6" })
|
|
89
89
|
] })),
|
|
90
|
-
tenant:
|
|
90
|
+
tenant: G(/* @__PURE__ */ H(B, { children: [
|
|
91
91
|
/* @__PURE__ */ V("path", { d: "M3 21V9l6-4 6 4M3 21h18" }),
|
|
92
92
|
/* @__PURE__ */ V("path", { d: "M15 21V9" }),
|
|
93
93
|
/* @__PURE__ */ V("path", { d: "M19 21V13l2-2" }),
|
|
94
94
|
/* @__PURE__ */ V("path", { d: "M7 13h2M7 17h2M11 13h1M11 17h1" })
|
|
95
95
|
] })),
|
|
96
|
-
shield:
|
|
97
|
-
key:
|
|
96
|
+
shield: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M12 3 4 6v6c0 4.5 3.5 8 8 9 4.5-1 8-4.5 8-9V6z" }) })),
|
|
97
|
+
key: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
98
98
|
cx: "8",
|
|
99
99
|
cy: "14",
|
|
100
100
|
r: "4"
|
|
101
101
|
}), /* @__PURE__ */ V("path", { d: "m11 11 9-9M17 5l3 3M15 7l3 3" })] })),
|
|
102
|
-
group:
|
|
102
|
+
group: G(/* @__PURE__ */ H(B, { children: [
|
|
103
103
|
/* @__PURE__ */ V("circle", {
|
|
104
104
|
cx: "8",
|
|
105
105
|
cy: "10",
|
|
@@ -113,7 +113,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
113
113
|
/* @__PURE__ */ V("path", { d: "M2 20c0-3 2.5-5 6-5s6 2 6 5" }),
|
|
114
114
|
/* @__PURE__ */ V("path", { d: "M15 16c2-1 4-1 6 0" })
|
|
115
115
|
] })),
|
|
116
|
-
idp:
|
|
116
|
+
idp: G(/* @__PURE__ */ H(B, { children: [
|
|
117
117
|
/* @__PURE__ */ V("rect", {
|
|
118
118
|
x: "3",
|
|
119
119
|
y: "5",
|
|
@@ -124,24 +124,24 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
124
124
|
/* @__PURE__ */ V("path", { d: "M3 10h18" }),
|
|
125
125
|
/* @__PURE__ */ V("path", { d: "M7 15h4" })
|
|
126
126
|
] })),
|
|
127
|
-
audit:
|
|
127
|
+
audit: G(/* @__PURE__ */ H(B, { children: [
|
|
128
128
|
/* @__PURE__ */ V("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
|
|
129
129
|
/* @__PURE__ */ V("path", { d: "M14 3v6h6" }),
|
|
130
130
|
/* @__PURE__ */ V("path", { d: "M8 13h8M8 17h5" })
|
|
131
131
|
] })),
|
|
132
|
-
log:
|
|
132
|
+
log: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
133
133
|
x: "3",
|
|
134
134
|
y: "4",
|
|
135
135
|
width: "18",
|
|
136
136
|
height: "16",
|
|
137
137
|
rx: "2"
|
|
138
138
|
}), /* @__PURE__ */ V("path", { d: "M7 9h10M7 13h10M7 17h6" })] })),
|
|
139
|
-
handlers:
|
|
139
|
+
handlers: G(/* @__PURE__ */ H(B, { children: [
|
|
140
140
|
/* @__PURE__ */ V("path", { d: "M10 4 4 8v8l6 4 6-4" }),
|
|
141
141
|
/* @__PURE__ */ V("path", { d: "M16 4l4 2.5v8L16 17" }),
|
|
142
142
|
/* @__PURE__ */ V("path", { d: "m10 12 6-3.5" })
|
|
143
143
|
] })),
|
|
144
|
-
jobs:
|
|
144
|
+
jobs: G(/* @__PURE__ */ H(B, { children: [
|
|
145
145
|
/* @__PURE__ */ V("rect", {
|
|
146
146
|
x: "3",
|
|
147
147
|
y: "6",
|
|
@@ -153,7 +153,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
153
153
|
/* @__PURE__ */ V("path", { d: "M12 10v5" }),
|
|
154
154
|
/* @__PURE__ */ V("path", { d: "M10 12h4" })
|
|
155
155
|
] })),
|
|
156
|
-
sched:
|
|
156
|
+
sched: G(/* @__PURE__ */ H(B, { children: [
|
|
157
157
|
/* @__PURE__ */ V("circle", {
|
|
158
158
|
cx: "12",
|
|
159
159
|
cy: "13",
|
|
@@ -162,7 +162,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
162
162
|
/* @__PURE__ */ V("path", { d: "M12 9v4l3 2" }),
|
|
163
163
|
/* @__PURE__ */ V("path", { d: "M9 3h6" })
|
|
164
164
|
] })),
|
|
165
|
-
entity:
|
|
165
|
+
entity: G(/* @__PURE__ */ H(B, { children: [
|
|
166
166
|
/* @__PURE__ */ V("ellipse", {
|
|
167
167
|
cx: "12",
|
|
168
168
|
cy: "6",
|
|
@@ -172,26 +172,26 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
172
172
|
/* @__PURE__ */ V("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
|
|
173
173
|
/* @__PURE__ */ V("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
|
|
174
174
|
] })),
|
|
175
|
-
field:
|
|
176
|
-
action:
|
|
177
|
-
code:
|
|
178
|
-
search:
|
|
175
|
+
field: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M4 6h16M4 12h10M4 18h16" }) })),
|
|
176
|
+
action: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M13 3 4 14h6l-1 7 9-11h-6z" }) })),
|
|
177
|
+
code: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m8 8-4 4 4 4M16 8l4 4-4 4M14 4l-4 16" }) })),
|
|
178
|
+
search: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
179
179
|
cx: "11",
|
|
180
180
|
cy: "11",
|
|
181
181
|
r: "7"
|
|
182
182
|
}), /* @__PURE__ */ V("path", { d: "m20 20-3.5-3.5" })] })),
|
|
183
|
-
filter:
|
|
184
|
-
columns:
|
|
183
|
+
filter: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M3 5h18l-7 9v6l-4-2v-4z" }) })),
|
|
184
|
+
columns: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
185
185
|
x: "3",
|
|
186
186
|
y: "4",
|
|
187
187
|
width: "18",
|
|
188
188
|
height: "16",
|
|
189
189
|
rx: "1"
|
|
190
190
|
}), /* @__PURE__ */ V("path", { d: "M9 4v16M15 4v16" })] })),
|
|
191
|
-
plus:
|
|
192
|
-
minus:
|
|
193
|
-
sort:
|
|
194
|
-
more:
|
|
191
|
+
plus: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M12 5v14M5 12h14" }) })),
|
|
192
|
+
minus: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M5 12h14" }) })),
|
|
193
|
+
sort: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M8 4v16l-3-3M8 4l3 3" }), /* @__PURE__ */ V("path", { d: "M16 20V4l-3 3M16 20l3-3" })] })),
|
|
194
|
+
more: G(/* @__PURE__ */ H(B, { children: [
|
|
195
195
|
/* @__PURE__ */ V("circle", {
|
|
196
196
|
cx: "5",
|
|
197
197
|
cy: "12",
|
|
@@ -208,15 +208,15 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
208
208
|
r: "1.2"
|
|
209
209
|
})
|
|
210
210
|
] }), { sw: 2 }),
|
|
211
|
-
x:
|
|
212
|
-
check:
|
|
213
|
-
down:
|
|
214
|
-
up:
|
|
215
|
-
right:
|
|
216
|
-
left:
|
|
217
|
-
cheveron:
|
|
218
|
-
back:
|
|
219
|
-
calendar:
|
|
211
|
+
x: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M18 6 6 18M6 6l12 12" }) })),
|
|
212
|
+
check: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m5 12 5 5L20 7" }) }), { sw: 2 }),
|
|
213
|
+
down: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m6 9 6 6 6-6" }) })),
|
|
214
|
+
up: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m6 15 6-6 6 6" }) })),
|
|
215
|
+
right: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m9 6 6 6-6 6" }) })),
|
|
216
|
+
left: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m15 6-6 6 6 6" }) })),
|
|
217
|
+
cheveron: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m8 10 4 4 4-4" }) })),
|
|
218
|
+
back: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M19 12H5M12 19l-7-7 7-7" }) })),
|
|
219
|
+
calendar: G(/* @__PURE__ */ H(B, { children: [
|
|
220
220
|
/* @__PURE__ */ V("rect", {
|
|
221
221
|
x: "3",
|
|
222
222
|
y: "5",
|
|
@@ -227,93 +227,93 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
227
227
|
/* @__PURE__ */ V("path", { d: "M3 10h18" }),
|
|
228
228
|
/* @__PURE__ */ V("path", { d: "M8 3v4M16 3v4" })
|
|
229
229
|
] })),
|
|
230
|
-
clock:
|
|
230
|
+
clock: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
231
231
|
cx: "12",
|
|
232
232
|
cy: "12",
|
|
233
233
|
r: "9"
|
|
234
234
|
}), /* @__PURE__ */ V("path", { d: "M12 7v5l3 2" })] })),
|
|
235
|
-
lock:
|
|
235
|
+
lock: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
236
236
|
x: "5",
|
|
237
237
|
y: "11",
|
|
238
238
|
width: "14",
|
|
239
239
|
height: "9",
|
|
240
240
|
rx: "2"
|
|
241
241
|
}), /* @__PURE__ */ V("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })] })),
|
|
242
|
-
email:
|
|
242
|
+
email: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
243
243
|
x: "3",
|
|
244
244
|
y: "5",
|
|
245
245
|
width: "18",
|
|
246
246
|
height: "14",
|
|
247
247
|
rx: "2"
|
|
248
248
|
}), /* @__PURE__ */ V("path", { d: "m3 7 9 6 9-6" })] })),
|
|
249
|
-
link:
|
|
250
|
-
hash:
|
|
251
|
-
eye:
|
|
249
|
+
link: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M10 14a5 5 0 0 0 7 0l3-3a5 5 0 1 0-7-7l-1 1" }), /* @__PURE__ */ V("path", { d: "M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 1 0 7 7l1-1" })] })),
|
|
250
|
+
hash: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M5 9h14M5 15h14M10 3 8 21M16 3l-2 18" }) })),
|
|
251
|
+
eye: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ V("circle", {
|
|
252
252
|
cx: "12",
|
|
253
253
|
cy: "12",
|
|
254
254
|
r: "3"
|
|
255
255
|
})] })),
|
|
256
|
-
eyeOff:
|
|
256
|
+
eyeOff: G(/* @__PURE__ */ H(B, { children: [
|
|
257
257
|
/* @__PURE__ */ V("path", { d: "M3 3l18 18" }),
|
|
258
258
|
/* @__PURE__ */ V("path", { d: "M10.6 6.2A10 10 0 0 1 12 6c6.5 0 10 6 10 6a17 17 0 0 1-3.6 4.3M6.4 6.4A17 17 0 0 0 2 12s3.5 6 10 6c1.3 0 2.5-.2 3.6-.6" }),
|
|
259
259
|
/* @__PURE__ */ V("path", { d: "M9.9 9.9a3 3 0 0 0 4.2 4.2" })
|
|
260
260
|
] })),
|
|
261
|
-
copy:
|
|
261
|
+
copy: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
262
262
|
x: "9",
|
|
263
263
|
y: "9",
|
|
264
264
|
width: "11",
|
|
265
265
|
height: "11",
|
|
266
266
|
rx: "2"
|
|
267
267
|
}), /* @__PURE__ */ V("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })] })),
|
|
268
|
-
trash:
|
|
269
|
-
edit:
|
|
270
|
-
save:
|
|
271
|
-
refresh:
|
|
268
|
+
trash: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M4 7h16M9 7V4h6v3M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13" }) })),
|
|
269
|
+
edit: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M4 20h4l11-11-4-4L4 16z" }), /* @__PURE__ */ V("path", { d: "m13 6 4 4" })] })),
|
|
270
|
+
save: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M4 5a2 2 0 0 1 2-2h10l4 4v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z" }), /* @__PURE__ */ V("path", { d: "M7 3v5h8V3M8 15h8v6H8z" })] })),
|
|
271
|
+
refresh: G(/* @__PURE__ */ H(B, { children: [
|
|
272
272
|
/* @__PURE__ */ V("path", { d: "M3 12a9 9 0 0 1 15-6.7L21 8" }),
|
|
273
273
|
/* @__PURE__ */ V("path", { d: "M21 3v5h-5" }),
|
|
274
274
|
/* @__PURE__ */ V("path", { d: "M21 12a9 9 0 0 1-15 6.7L3 16" }),
|
|
275
275
|
/* @__PURE__ */ V("path", { d: "M3 21v-5h5" })
|
|
276
276
|
] })),
|
|
277
|
-
download:
|
|
277
|
+
download: G(/* @__PURE__ */ H(B, { children: [
|
|
278
278
|
/* @__PURE__ */ V("path", { d: "M12 3v12" }),
|
|
279
279
|
/* @__PURE__ */ V("path", { d: "m7 10 5 5 5-5" }),
|
|
280
280
|
/* @__PURE__ */ V("path", { d: "M5 20h14" })
|
|
281
281
|
] })),
|
|
282
|
-
upload:
|
|
282
|
+
upload: G(/* @__PURE__ */ H(B, { children: [
|
|
283
283
|
/* @__PURE__ */ V("path", { d: "M12 15V3" }),
|
|
284
284
|
/* @__PURE__ */ V("path", { d: "m7 8 5-5 5 5" }),
|
|
285
285
|
/* @__PURE__ */ V("path", { d: "M5 20h14" })
|
|
286
286
|
] })),
|
|
287
|
-
paperclip:
|
|
288
|
-
tag:
|
|
287
|
+
paperclip: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m21 10-9.2 9.2a5 5 0 1 1-7-7L14 3a3.5 3.5 0 0 1 5 5L9.8 17.2a2 2 0 1 1-3-3L15 6" }) })),
|
|
288
|
+
tag: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M4 4h7l9 9-7 7-9-9z" }), /* @__PURE__ */ V("circle", {
|
|
289
289
|
cx: "8",
|
|
290
290
|
cy: "8",
|
|
291
291
|
r: "1.5"
|
|
292
292
|
})] })),
|
|
293
|
-
bolt:
|
|
294
|
-
bell:
|
|
295
|
-
ai:
|
|
293
|
+
bolt: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M13 3 4 14h6l-1 7 9-11h-6z" }) })),
|
|
294
|
+
bell: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M18 16v-5a6 6 0 0 0-12 0v5l-2 3h16z" }), /* @__PURE__ */ V("path", { d: "M10 20a2 2 0 0 0 4 0" })] })),
|
|
295
|
+
ai: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.5 5.5l2 2M16.5 16.5l2 2M18.5 5.5l-2 2M7.5 16.5l-2 2" }), /* @__PURE__ */ V("circle", {
|
|
296
296
|
cx: "12",
|
|
297
297
|
cy: "12",
|
|
298
298
|
r: "3.5"
|
|
299
299
|
})] })),
|
|
300
|
-
sparkle:
|
|
301
|
-
command:
|
|
302
|
-
menu:
|
|
303
|
-
dot:
|
|
300
|
+
sparkle: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M12 3v4M12 17v4M3 12h4M17 12h4" }), /* @__PURE__ */ V("path", { d: "m7 7 2 2M15 15l2 2M17 7l-2 2M9 15l-2 2" })] })),
|
|
301
|
+
command: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M9 3a3 3 0 1 1-3 3v12a3 3 0 1 1 3-3h6a3 3 0 1 1 3 3V6a3 3 0 1 1-3 3H9" }) })),
|
|
302
|
+
menu: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M4 6h16M4 12h16M4 18h16" }) })),
|
|
303
|
+
dot: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("circle", {
|
|
304
304
|
cx: "12",
|
|
305
305
|
cy: "12",
|
|
306
306
|
r: "4",
|
|
307
307
|
fill: "currentColor"
|
|
308
308
|
}) })),
|
|
309
|
-
globe:
|
|
309
|
+
globe: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
310
310
|
cx: "12",
|
|
311
311
|
cy: "12",
|
|
312
312
|
r: "9"
|
|
313
313
|
}), /* @__PURE__ */ V("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })),
|
|
314
|
-
folder:
|
|
315
|
-
file:
|
|
316
|
-
branch:
|
|
314
|
+
folder: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M3 6a1 1 0 0 1 1-1h5l2 2h8a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z" }) })),
|
|
315
|
+
file: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }), /* @__PURE__ */ V("path", { d: "M14 3v6h6" })] })),
|
|
316
|
+
branch: G(/* @__PURE__ */ H(B, { children: [
|
|
317
317
|
/* @__PURE__ */ V("circle", {
|
|
318
318
|
cx: "6",
|
|
319
319
|
cy: "6",
|
|
@@ -332,24 +332,24 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
332
332
|
/* @__PURE__ */ V("path", { d: "M6 8v8" }),
|
|
333
333
|
/* @__PURE__ */ V("path", { d: "M18 10c0 4-4 4-6 6" })
|
|
334
334
|
] })),
|
|
335
|
-
sun:
|
|
335
|
+
sun: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
336
336
|
cx: "12",
|
|
337
337
|
cy: "12",
|
|
338
338
|
r: "4"
|
|
339
339
|
}), /* @__PURE__ */ V("path", { d: "M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4" })] })),
|
|
340
|
-
moon:
|
|
341
|
-
settings:
|
|
340
|
+
moon: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M20 14A8 8 0 0 1 10 4a8 8 0 1 0 10 10z" }) })),
|
|
341
|
+
settings: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
342
342
|
cx: "12",
|
|
343
343
|
cy: "12",
|
|
344
344
|
r: "3"
|
|
345
345
|
}), /* @__PURE__ */ V("path", { d: "M19 12a7 7 0 0 0-.2-1.7l2-1.5-2-3.4-2.3.9a7 7 0 0 0-3-1.7L13 2h-4l-.5 2.6a7 7 0 0 0-3 1.7L3.2 5.4l-2 3.4 2 1.5A7 7 0 0 0 3 12c0 .6.1 1.2.2 1.7l-2 1.5 2 3.4 2.3-.9a7 7 0 0 0 3 1.7L9 22h4l.5-2.6a7 7 0 0 0 3-1.7l2.3.9 2-3.4-2-1.5c.1-.5.2-1.1.2-1.7z" })] })),
|
|
346
|
-
logout:
|
|
346
|
+
logout: G(/* @__PURE__ */ H(B, { children: [
|
|
347
347
|
/* @__PURE__ */ V("path", { d: "M14 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }),
|
|
348
348
|
/* @__PURE__ */ V("path", { d: "M10 17 5 12l5-5" }),
|
|
349
349
|
/* @__PURE__ */ V("path", { d: "M5 12h12" })
|
|
350
350
|
] })),
|
|
351
|
-
loader:
|
|
352
|
-
grid:
|
|
351
|
+
loader: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M18.4 5.6l-2.8 2.8M8.4 15.6l-2.8 2.8" }) })),
|
|
352
|
+
grid: G(/* @__PURE__ */ H(B, { children: [
|
|
353
353
|
/* @__PURE__ */ V("rect", {
|
|
354
354
|
x: "4",
|
|
355
355
|
y: "4",
|
|
@@ -379,40 +379,40 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
379
379
|
rx: "1"
|
|
380
380
|
})
|
|
381
381
|
] })),
|
|
382
|
-
star:
|
|
383
|
-
warning:
|
|
384
|
-
info:
|
|
382
|
+
star: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "m12 3 3 6 6 1-4.5 4.5 1 6.5L12 18l-5.5 3 1-6.5L3 10l6-1z" }) })),
|
|
383
|
+
warning: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "m12 3 10 18H2z" }), /* @__PURE__ */ V("path", { d: "M12 10v5M12 18v.5" })] })),
|
|
384
|
+
info: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
385
385
|
cx: "12",
|
|
386
386
|
cy: "12",
|
|
387
387
|
r: "9"
|
|
388
388
|
}), /* @__PURE__ */ V("path", { d: "M12 11v6M12 8v.5" })] })),
|
|
389
|
-
building:
|
|
389
|
+
building: G(/* @__PURE__ */ H(B, { children: [
|
|
390
390
|
/* @__PURE__ */ V("path", { d: "M4 21V3h12v18M4 21h16" }),
|
|
391
391
|
/* @__PURE__ */ V("path", { d: "M16 9h4v12" }),
|
|
392
392
|
/* @__PURE__ */ V("path", { d: "M7 6h2M7 10h2M7 14h2M11 6h2M11 10h2M11 14h2" })
|
|
393
393
|
] })),
|
|
394
|
-
device:
|
|
394
|
+
device: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
395
395
|
x: "5",
|
|
396
396
|
y: "3",
|
|
397
397
|
width: "14",
|
|
398
398
|
height: "18",
|
|
399
399
|
rx: "2"
|
|
400
400
|
}), /* @__PURE__ */ V("path", { d: "M10 18h4" })] })),
|
|
401
|
-
arrowUp:
|
|
402
|
-
arrowDown:
|
|
403
|
-
external:
|
|
401
|
+
arrowUp: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M12 19V5M5 12l7-7 7 7" }) })),
|
|
402
|
+
arrowDown: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M12 5v14M5 12l7 7 7-7" }) })),
|
|
403
|
+
external: G(/* @__PURE__ */ H(B, { children: [
|
|
404
404
|
/* @__PURE__ */ V("path", { d: "M14 4h6v6" }),
|
|
405
405
|
/* @__PURE__ */ V("path", { d: "M20 4 10 14" }),
|
|
406
406
|
/* @__PURE__ */ V("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
|
|
407
407
|
] })),
|
|
408
|
-
dbtable:
|
|
408
|
+
dbtable: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
409
409
|
x: "3",
|
|
410
410
|
y: "5",
|
|
411
411
|
width: "18",
|
|
412
412
|
height: "14",
|
|
413
413
|
rx: "1"
|
|
414
414
|
}), /* @__PURE__ */ V("path", { d: "M3 9h18M3 13h18M9 9v10M15 9v10" })] })),
|
|
415
|
-
"users-round":
|
|
415
|
+
"users-round": G(/* @__PURE__ */ H(B, { children: [
|
|
416
416
|
/* @__PURE__ */ V("circle", {
|
|
417
417
|
cx: "10",
|
|
418
418
|
cy: "8",
|
|
@@ -422,12 +422,12 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
422
422
|
/* @__PURE__ */ V("path", { d: "M17 4a5 5 0 0 1 0 8" }),
|
|
423
423
|
/* @__PURE__ */ V("path", { d: "M22 21a6 6 0 0 0-4-5.6" })
|
|
424
424
|
] })),
|
|
425
|
-
user:
|
|
425
|
+
user: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
426
426
|
cx: "12",
|
|
427
427
|
cy: "7",
|
|
428
428
|
r: "4"
|
|
429
429
|
}), /* @__PURE__ */ V("path", { d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2" })] })),
|
|
430
|
-
"user-plus":
|
|
430
|
+
"user-plus": G(/* @__PURE__ */ H(B, { children: [
|
|
431
431
|
/* @__PURE__ */ V("circle", {
|
|
432
432
|
cx: "9",
|
|
433
433
|
cy: "7",
|
|
@@ -436,20 +436,20 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
436
436
|
/* @__PURE__ */ V("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
437
437
|
/* @__PURE__ */ V("path", { d: "M19 8v6M22 11h-6" })
|
|
438
438
|
] })),
|
|
439
|
-
"shield-check":
|
|
440
|
-
"shield-plus":
|
|
441
|
-
"key-round":
|
|
439
|
+
"shield-check": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M12 3 4 6v6c0 4.5 3.5 8 8 9 4.5-1 8-4.5 8-9V6z" }), /* @__PURE__ */ V("path", { d: "m9 12 2 2 4-4" })] })),
|
|
440
|
+
"shield-plus": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M12 3 4 6v6c0 4.5 3.5 8 8 9 4.5-1 8-4.5 8-9V6z" }), /* @__PURE__ */ V("path", { d: "M9 12h6M12 9v6" })] })),
|
|
441
|
+
"key-round": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4z" }), /* @__PURE__ */ V("circle", {
|
|
442
442
|
cx: "16.5",
|
|
443
443
|
cy: "7.5",
|
|
444
444
|
r: "0.5",
|
|
445
445
|
fill: "currentColor"
|
|
446
446
|
})] })),
|
|
447
|
-
"list-checks":
|
|
447
|
+
"list-checks": G(/* @__PURE__ */ H(B, { children: [
|
|
448
448
|
/* @__PURE__ */ V("path", { d: "m3 17 2 2 4-4" }),
|
|
449
449
|
/* @__PURE__ */ V("path", { d: "m3 7 2 2 4-4" }),
|
|
450
450
|
/* @__PURE__ */ V("path", { d: "M13 6h8M13 12h8M13 18h8" })
|
|
451
451
|
] })),
|
|
452
|
-
list:
|
|
452
|
+
list: G(/* @__PURE__ */ H(B, { children: [
|
|
453
453
|
/* @__PURE__ */ V("path", { d: "M8 6h13M8 12h13M8 18h13" }),
|
|
454
454
|
/* @__PURE__ */ V("circle", {
|
|
455
455
|
cx: "3.5",
|
|
@@ -470,18 +470,18 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
470
470
|
fill: "currentColor"
|
|
471
471
|
})
|
|
472
472
|
] })),
|
|
473
|
-
"play-circle":
|
|
473
|
+
"play-circle": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
474
474
|
cx: "12",
|
|
475
475
|
cy: "12",
|
|
476
476
|
r: "9"
|
|
477
477
|
}), /* @__PURE__ */ V("path", { d: "M10 8.5v7L16 12z" })] })),
|
|
478
|
-
play:
|
|
479
|
-
layers:
|
|
478
|
+
play: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M6 3 20 12 6 21z" }) })),
|
|
479
|
+
layers: G(/* @__PURE__ */ H(B, { children: [
|
|
480
480
|
/* @__PURE__ */ V("path", { d: "M12 2 2 7l10 5 10-5z" }),
|
|
481
481
|
/* @__PURE__ */ V("path", { d: "m2 12 10 5 10-5" }),
|
|
482
482
|
/* @__PURE__ */ V("path", { d: "m2 17 10 5 10-5" })
|
|
483
483
|
] })),
|
|
484
|
-
layout:
|
|
484
|
+
layout: G(/* @__PURE__ */ H(B, { children: [
|
|
485
485
|
/* @__PURE__ */ V("rect", {
|
|
486
486
|
x: "3",
|
|
487
487
|
y: "3",
|
|
@@ -492,7 +492,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
492
492
|
/* @__PURE__ */ V("path", { d: "M3 9h18" }),
|
|
493
493
|
/* @__PURE__ */ V("path", { d: "M9 21V9" })
|
|
494
494
|
] })),
|
|
495
|
-
"layout-dashboard":
|
|
495
|
+
"layout-dashboard": G(/* @__PURE__ */ H(B, { children: [
|
|
496
496
|
/* @__PURE__ */ V("rect", {
|
|
497
497
|
x: "3",
|
|
498
498
|
y: "3",
|
|
@@ -522,7 +522,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
522
522
|
rx: "1"
|
|
523
523
|
})
|
|
524
524
|
] })),
|
|
525
|
-
database:
|
|
525
|
+
database: G(/* @__PURE__ */ H(B, { children: [
|
|
526
526
|
/* @__PURE__ */ V("ellipse", {
|
|
527
527
|
cx: "12",
|
|
528
528
|
cy: "5",
|
|
@@ -532,8 +532,8 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
532
532
|
/* @__PURE__ */ V("path", { d: "M3 5v14c0 1.7 4 3 9 3s9-1.3 9-3V5" }),
|
|
533
533
|
/* @__PURE__ */ V("path", { d: "M3 12c0 1.7 4 3 9 3s9-1.3 9-3" })
|
|
534
534
|
] })),
|
|
535
|
-
zap:
|
|
536
|
-
cpu:
|
|
535
|
+
zap: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M13 3 4 14h6l-1 7 9-11h-6z" }) })),
|
|
536
|
+
cpu: G(/* @__PURE__ */ H(B, { children: [
|
|
537
537
|
/* @__PURE__ */ V("rect", {
|
|
538
538
|
x: "4",
|
|
539
539
|
y: "4",
|
|
@@ -549,7 +549,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
549
549
|
}),
|
|
550
550
|
/* @__PURE__ */ V("path", { d: "M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2" })
|
|
551
551
|
] })),
|
|
552
|
-
"circle-dot":
|
|
552
|
+
"circle-dot": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
553
553
|
cx: "12",
|
|
554
554
|
cy: "12",
|
|
555
555
|
r: "9"
|
|
@@ -559,7 +559,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
559
559
|
r: "1.5",
|
|
560
560
|
fill: "currentColor"
|
|
561
561
|
})] })),
|
|
562
|
-
"toggle-right":
|
|
562
|
+
"toggle-right": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
563
563
|
x: "2",
|
|
564
564
|
y: "6",
|
|
565
565
|
width: "20",
|
|
@@ -571,21 +571,21 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
571
571
|
r: "2.5",
|
|
572
572
|
fill: "currentColor"
|
|
573
573
|
})] })),
|
|
574
|
-
sliders:
|
|
575
|
-
"sliders-horizontal":
|
|
576
|
-
box:
|
|
574
|
+
sliders: G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M21 4h-7M10 4H3M21 12h-9M8 12H3M21 20h-5M12 20H3M14 2v4M8 10v4M16 18v4" }) })),
|
|
575
|
+
"sliders-horizontal": G(/* @__PURE__ */ V(B, { children: /* @__PURE__ */ V("path", { d: "M21 4h-7M10 4H3M21 12h-9M8 12H3M21 20h-5M12 20H3M14 2v4M8 10v4M16 18v4" }) })),
|
|
576
|
+
box: G(/* @__PURE__ */ H(B, { children: [
|
|
577
577
|
/* @__PURE__ */ V("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }),
|
|
578
578
|
/* @__PURE__ */ V("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
579
579
|
/* @__PURE__ */ V("path", { d: "M12 22V12" })
|
|
580
580
|
] })),
|
|
581
|
-
"columns-3":
|
|
581
|
+
"columns-3": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("rect", {
|
|
582
582
|
x: "3",
|
|
583
583
|
y: "4",
|
|
584
584
|
width: "18",
|
|
585
585
|
height: "16",
|
|
586
586
|
rx: "1"
|
|
587
587
|
}), /* @__PURE__ */ V("path", { d: "M9 4v16M15 4v16" })] })),
|
|
588
|
-
"settings-2":
|
|
588
|
+
"settings-2": G(/* @__PURE__ */ H(B, { children: [
|
|
589
589
|
/* @__PURE__ */ V("path", { d: "M20 7h-9M14 17H5" }),
|
|
590
590
|
/* @__PURE__ */ V("circle", {
|
|
591
591
|
cx: "17",
|
|
@@ -598,12 +598,12 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
598
598
|
r: "3"
|
|
599
599
|
})
|
|
600
600
|
] })),
|
|
601
|
-
"file-diff":
|
|
601
|
+
"file-diff": G(/* @__PURE__ */ H(B, { children: [
|
|
602
602
|
/* @__PURE__ */ V("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
603
603
|
/* @__PURE__ */ V("path", { d: "M14 2v6h6" }),
|
|
604
604
|
/* @__PURE__ */ V("path", { d: "M12 12v6M9 15h6M9 18h6" })
|
|
605
605
|
] })),
|
|
606
|
-
"git-branch":
|
|
606
|
+
"git-branch": G(/* @__PURE__ */ H(B, { children: [
|
|
607
607
|
/* @__PURE__ */ V("circle", {
|
|
608
608
|
cx: "6",
|
|
609
609
|
cy: "6",
|
|
@@ -622,29 +622,29 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
622
622
|
/* @__PURE__ */ V("path", { d: "M6 8v8" }),
|
|
623
623
|
/* @__PURE__ */ V("path", { d: "M18 10a6 6 0 0 1-6 6h-2" })
|
|
624
624
|
] })),
|
|
625
|
-
"log-in":
|
|
625
|
+
"log-in": G(/* @__PURE__ */ H(B, { children: [
|
|
626
626
|
/* @__PURE__ */ V("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }),
|
|
627
627
|
/* @__PURE__ */ V("path", { d: "m10 17 5-5-5-5" }),
|
|
628
628
|
/* @__PURE__ */ V("path", { d: "M15 12H3" })
|
|
629
629
|
] })),
|
|
630
|
-
"plus-circle":
|
|
630
|
+
"plus-circle": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
631
631
|
cx: "12",
|
|
632
632
|
cy: "12",
|
|
633
633
|
r: "9"
|
|
634
634
|
}), /* @__PURE__ */ V("path", { d: "M8 12h8M12 8v8" })] })),
|
|
635
|
-
repeat:
|
|
635
|
+
repeat: G(/* @__PURE__ */ H(B, { children: [
|
|
636
636
|
/* @__PURE__ */ V("path", { d: "m17 2 4 4-4 4" }),
|
|
637
637
|
/* @__PURE__ */ V("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
638
638
|
/* @__PURE__ */ V("path", { d: "m7 22-4-4 4-4" }),
|
|
639
639
|
/* @__PURE__ */ V("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
640
640
|
] })),
|
|
641
|
-
ban:
|
|
641
|
+
ban: G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
642
642
|
cx: "12",
|
|
643
643
|
cy: "12",
|
|
644
644
|
r: "9"
|
|
645
645
|
}), /* @__PURE__ */ V("path", { d: "m5.6 5.6 12.8 12.8" })] })),
|
|
646
|
-
"trash-2":
|
|
647
|
-
"shopping-cart":
|
|
646
|
+
"trash-2": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M4 7h16M9 7V4h6v3M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13" }), /* @__PURE__ */ V("path", { d: "M10 11v6M14 11v6" })] })),
|
|
647
|
+
"shopping-cart": G(/* @__PURE__ */ H(B, { children: [
|
|
648
648
|
/* @__PURE__ */ V("circle", {
|
|
649
649
|
cx: "9",
|
|
650
650
|
cy: "20",
|
|
@@ -657,7 +657,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
657
657
|
}),
|
|
658
658
|
/* @__PURE__ */ V("path", { d: "M2 3h3l3 12h10l3-8H7" })
|
|
659
659
|
] })),
|
|
660
|
-
"credit-card":
|
|
660
|
+
"credit-card": G(/* @__PURE__ */ H(B, { children: [
|
|
661
661
|
/* @__PURE__ */ V("rect", {
|
|
662
662
|
x: "3",
|
|
663
663
|
y: "5",
|
|
@@ -668,22 +668,22 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
668
668
|
/* @__PURE__ */ V("path", { d: "M3 10h18" }),
|
|
669
669
|
/* @__PURE__ */ V("path", { d: "M7 15h4" })
|
|
670
670
|
] })),
|
|
671
|
-
package:
|
|
671
|
+
package: G(/* @__PURE__ */ H(B, { children: [
|
|
672
672
|
/* @__PURE__ */ V("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }),
|
|
673
673
|
/* @__PURE__ */ V("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
674
674
|
/* @__PURE__ */ V("path", { d: "M12 22V12" })
|
|
675
675
|
] })),
|
|
676
|
-
boxes:
|
|
676
|
+
boxes: G(/* @__PURE__ */ H(B, { children: [
|
|
677
677
|
/* @__PURE__ */ V("path", { d: "M7.5 7.5 3 10v5l4.5 2.5L12 15v-5z" }),
|
|
678
678
|
/* @__PURE__ */ V("path", { d: "M16.5 7.5 12 10v5l4.5 2.5L21 15v-5z" }),
|
|
679
679
|
/* @__PURE__ */ V("path", { d: "M12 2.5 7.5 5v5L12 12.5 16.5 10V5z" })
|
|
680
680
|
] })),
|
|
681
|
-
tags:
|
|
681
|
+
tags: G(/* @__PURE__ */ H(B, { children: [
|
|
682
682
|
/* @__PURE__ */ V("path", { d: "M4 4h7l9 9-7 7-9-9z" }),
|
|
683
683
|
/* @__PURE__ */ V("path", { d: "M8 8h.01" }),
|
|
684
684
|
/* @__PURE__ */ V("path", { d: "M13 4h2l6 6" })
|
|
685
685
|
] })),
|
|
686
|
-
"wallet-cards":
|
|
686
|
+
"wallet-cards": G(/* @__PURE__ */ H(B, { children: [
|
|
687
687
|
/* @__PURE__ */ V("rect", {
|
|
688
688
|
x: "3",
|
|
689
689
|
y: "7",
|
|
@@ -694,14 +694,14 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
694
694
|
/* @__PURE__ */ V("path", { d: "M16 11h5v5h-5a2.5 2.5 0 0 1 0-5z" }),
|
|
695
695
|
/* @__PURE__ */ V("path", { d: "M5 7V5a2 2 0 0 1 2-2h10v4" })
|
|
696
696
|
] })),
|
|
697
|
-
"receipt-text":
|
|
698
|
-
"badge-dollar-sign":
|
|
697
|
+
"receipt-text": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M6 3h12v18l-3-2-3 2-3-2-3 2z" }), /* @__PURE__ */ V("path", { d: "M9 8h6M9 12h6M9 16h4" })] })),
|
|
698
|
+
"badge-dollar-sign": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("circle", {
|
|
699
699
|
cx: "12",
|
|
700
700
|
cy: "12",
|
|
701
701
|
r: "9"
|
|
702
702
|
}), /* @__PURE__ */ V("path", { d: "M12 6v12M15 9.5c-.7-.8-1.7-1.2-3-1.2-1.6 0-2.7.8-2.7 2s1 1.7 2.7 2.1c1.8.4 3 .9 3 2.3S13.8 17 12 17c-1.4 0-2.6-.5-3.4-1.4" })] })),
|
|
703
|
-
"undo-2":
|
|
704
|
-
},
|
|
703
|
+
"undo-2": G(/* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("path", { d: "M9 14 4 9l5-5" }), /* @__PURE__ */ V("path", { d: "M4 9h10a6 6 0 1 1 0 12h-2" })] }))
|
|
704
|
+
}, q = j(function({ kind: e = "default", size: t = "sm", icon: n, iconRight: r, children: i, onClick: a, active: o, danger: s, style: c, disabled: l, type: u = "button", title: d, ...f }, p) {
|
|
705
705
|
let m = {
|
|
706
706
|
display: "inline-flex",
|
|
707
707
|
alignItems: "center",
|
|
@@ -766,7 +766,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
766
766
|
r
|
|
767
767
|
]
|
|
768
768
|
});
|
|
769
|
-
}),
|
|
769
|
+
}), J = j(function({ icon: e, onClick: t, title: n, size: r = 28, active: i, disabled: a, style: o }, s) {
|
|
770
770
|
return /* @__PURE__ */ V("button", {
|
|
771
771
|
type: "button",
|
|
772
772
|
ref: s,
|
|
@@ -800,7 +800,7 @@ var K = (e, t = {}) => ({ size: n = 14, cls: r = "", style: i = {} }) => /* @__P
|
|
|
800
800
|
});
|
|
801
801
|
//#endregion
|
|
802
802
|
//#region src/components/primitives/Pill.tsx
|
|
803
|
-
function
|
|
803
|
+
function Y({ tone: e = "slate", children: t, size: n = "sm", dot: r = !1, style: i }) {
|
|
804
804
|
let a = `var(--pill-${e}-bg)`, o = `var(--pill-${e})`;
|
|
805
805
|
return /* @__PURE__ */ H("span", {
|
|
806
806
|
className: "num",
|
|
@@ -837,7 +837,7 @@ function X({ tone: e = "slate", children: t, size: n = "sm", dot: r = !1, style:
|
|
|
837
837
|
}
|
|
838
838
|
//#endregion
|
|
839
839
|
//#region src/components/primitives/Kbd.tsx
|
|
840
|
-
function
|
|
840
|
+
function se({ children: e }) {
|
|
841
841
|
return /* @__PURE__ */ V("span", {
|
|
842
842
|
className: "mono",
|
|
843
843
|
style: {
|
|
@@ -858,7 +858,7 @@ function oe({ children: e }) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/components/primitives/Avatar.tsx
|
|
861
|
-
function
|
|
861
|
+
function ce({ name: e, size: t = 22, color: n }) {
|
|
862
862
|
let r = e.split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase(), i = e.split("").reduce((e, t) => e + t.charCodeAt(0), 0), a = [
|
|
863
863
|
"#DCE4F6",
|
|
864
864
|
"#E4DCF6",
|
|
@@ -888,7 +888,7 @@ function se({ name: e, size: t = 22, color: n }) {
|
|
|
888
888
|
}
|
|
889
889
|
//#endregion
|
|
890
890
|
//#region src/components/primitives/BrandGlyph.tsx
|
|
891
|
-
function
|
|
891
|
+
function le({ size: e = 24, className: t, title: n }) {
|
|
892
892
|
return /* @__PURE__ */ H("svg", {
|
|
893
893
|
width: e,
|
|
894
894
|
height: e,
|
|
@@ -924,7 +924,7 @@ function ce({ size: e = 24, className: t, title: n }) {
|
|
|
924
924
|
}
|
|
925
925
|
//#endregion
|
|
926
926
|
//#region src/components/primitives/Dropdown.tsx
|
|
927
|
-
function
|
|
927
|
+
function ue({ open: e, onClose: t, anchor: n, children: r, align: i = "start", width: a, style: o }) {
|
|
928
928
|
let s = L(null), [c, l] = R(null);
|
|
929
929
|
return F(() => {
|
|
930
930
|
if (!e || !n) return;
|
|
@@ -950,7 +950,7 @@ function le({ open: e, onClose: t, anchor: n, children: r, align: i = "start", w
|
|
|
950
950
|
e,
|
|
951
951
|
n,
|
|
952
952
|
t
|
|
953
|
-
]), !e || !c ? null :
|
|
953
|
+
]), !e || !c ? null : te(/* @__PURE__ */ V("div", {
|
|
954
954
|
ref: s,
|
|
955
955
|
style: {
|
|
956
956
|
position: "fixed",
|
|
@@ -970,13 +970,13 @@ function le({ open: e, onClose: t, anchor: n, children: r, align: i = "start", w
|
|
|
970
970
|
}
|
|
971
971
|
//#endregion
|
|
972
972
|
//#region src/components/primitives/HoverCard.tsx
|
|
973
|
-
var
|
|
974
|
-
function
|
|
973
|
+
var de = 400, fe = 150, pe = 320, me = 240, he = 4, ge = 4;
|
|
974
|
+
function _e({ content: e, children: t, width: n = pe, align: r = "center", style: i }) {
|
|
975
975
|
let a = L(null), o = L(null), s = L(null), c = L(null), [l, u] = R(!1), [d, f] = R(null), [p, m] = R(!1), h = N(() => {
|
|
976
976
|
let e = a.current;
|
|
977
977
|
if (!e) return;
|
|
978
|
-
let t = e.getBoundingClientRect(), i = typeof window < "u" ? window.innerWidth : 0, s = typeof window < "u" ? window.innerHeight : 0, c = o.current?.offsetHeight ??
|
|
979
|
-
d = r === "start" ? t.left : r === "end" ? t.right - n : t.left + t.width / 2 - n / 2, d + n > i -
|
|
978
|
+
let t = e.getBoundingClientRect(), i = typeof window < "u" ? window.innerWidth : 0, s = typeof window < "u" ? window.innerHeight : 0, c = o.current?.offsetHeight ?? me, l = s - t.bottom < c + ge * 2 && t.top > c + ge * 2 ? "above" : "below", u = l === "below" ? t.bottom + ge : t.top - ge - c, d;
|
|
979
|
+
d = r === "start" ? t.left : r === "end" ? t.right - n : t.left + t.width / 2 - n / 2, d + n > i - he && (d = Math.max(he, t.right - n)), d < he && (d = he), f((e) => e && e.top === u && e.left === d && e.placement === l ? e : {
|
|
980
980
|
top: u,
|
|
981
981
|
left: d,
|
|
982
982
|
placement: l
|
|
@@ -993,11 +993,11 @@ function ge({ content: e, children: t, width: n = fe, align: r = "center", style
|
|
|
993
993
|
}, y = () => {
|
|
994
994
|
c.current !== null && (window.clearTimeout(c.current), c.current = null), !(l || s.current !== null) && (s.current = window.setTimeout(() => {
|
|
995
995
|
s.current = null, u(!0);
|
|
996
|
-
},
|
|
996
|
+
}, de));
|
|
997
997
|
}, b = () => {
|
|
998
998
|
s.current !== null && (window.clearTimeout(s.current), s.current = null), c.current === null && (c.current = window.setTimeout(() => {
|
|
999
999
|
c.current = null, u(!1);
|
|
1000
|
-
},
|
|
1000
|
+
}, fe));
|
|
1001
1001
|
};
|
|
1002
1002
|
P(() => () => {
|
|
1003
1003
|
v(), g.current &&= (g.current.disconnect(), null);
|
|
@@ -1010,7 +1010,7 @@ function ge({ content: e, children: t, width: n = fe, align: r = "center", style
|
|
|
1010
1010
|
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
1011
1011
|
};
|
|
1012
1012
|
}, [l, h]);
|
|
1013
|
-
let x = l && d ?
|
|
1013
|
+
let x = l && d ? te(/* @__PURE__ */ V("div", {
|
|
1014
1014
|
ref: _,
|
|
1015
1015
|
role: "tooltip",
|
|
1016
1016
|
onMouseEnter: () => {
|
|
@@ -1022,7 +1022,7 @@ function ge({ content: e, children: t, width: n = fe, align: r = "center", style
|
|
|
1022
1022
|
top: d.top,
|
|
1023
1023
|
left: d.left,
|
|
1024
1024
|
width: n,
|
|
1025
|
-
maxHeight:
|
|
1025
|
+
maxHeight: me,
|
|
1026
1026
|
overflowY: "auto",
|
|
1027
1027
|
zIndex: 250,
|
|
1028
1028
|
background: "var(--surface)",
|
|
@@ -1051,7 +1051,7 @@ function ge({ content: e, children: t, width: n = fe, align: r = "center", style
|
|
|
1051
1051
|
}
|
|
1052
1052
|
//#endregion
|
|
1053
1053
|
//#region src/components/primitives/Chip.tsx
|
|
1054
|
-
function
|
|
1054
|
+
function ve({ icon: e, children: t, onRemove: n, onClick: r }) {
|
|
1055
1055
|
return /* @__PURE__ */ H("span", {
|
|
1056
1056
|
onClick: r,
|
|
1057
1057
|
style: {
|
|
@@ -1084,14 +1084,14 @@ function _e({ icon: e, children: t, onRemove: n, onClick: r }) {
|
|
|
1084
1084
|
cursor: "pointer",
|
|
1085
1085
|
display: "flex"
|
|
1086
1086
|
},
|
|
1087
|
-
children: /* @__PURE__ */ V(
|
|
1087
|
+
children: /* @__PURE__ */ V(K.x, { size: 12 })
|
|
1088
1088
|
})
|
|
1089
1089
|
]
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
//#endregion
|
|
1093
1093
|
//#region src/components/primitives/SectionCard.tsx
|
|
1094
|
-
var
|
|
1094
|
+
var ye = {
|
|
1095
1095
|
primary: {
|
|
1096
1096
|
surface: "var(--surface)",
|
|
1097
1097
|
shadow: "var(--shadow-xs)"
|
|
@@ -1101,8 +1101,8 @@ var ve = {
|
|
|
1101
1101
|
shadow: "none"
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
function
|
|
1105
|
-
let [p, m] = R(c), h =
|
|
1104
|
+
function be({ title: e, subtitle: t, right: n, badge: r, count: i, children: a, footer: o, collapsible: s = !0, defaultOpen: c = !0, icon: l, emphasis: u = "primary", headingLevel: d = 2, padding: f = "16px" }) {
|
|
1105
|
+
let [p, m] = R(c), h = ye[u] ?? ye.primary;
|
|
1106
1106
|
return /* @__PURE__ */ H("div", {
|
|
1107
1107
|
"data-emphasis": u,
|
|
1108
1108
|
style: {
|
|
@@ -1200,16 +1200,16 @@ function ye({ title: e, subtitle: t, right: n, badge: r, count: i, children: a,
|
|
|
1200
1200
|
]
|
|
1201
1201
|
})
|
|
1202
1202
|
}),
|
|
1203
|
-
r && /* @__PURE__ */ V(
|
|
1203
|
+
r && /* @__PURE__ */ V(Y, {
|
|
1204
1204
|
tone: r.tone ?? "violet",
|
|
1205
1205
|
size: "xs",
|
|
1206
1206
|
dot: r.dot,
|
|
1207
1207
|
children: r.text
|
|
1208
1208
|
}),
|
|
1209
1209
|
n,
|
|
1210
|
-
s && /* @__PURE__ */ V(
|
|
1210
|
+
s && /* @__PURE__ */ V(J, {
|
|
1211
1211
|
size: 24,
|
|
1212
|
-
icon: V(p ?
|
|
1212
|
+
icon: V(p ? K.up : K.down, { size: 14 }),
|
|
1213
1213
|
onClick: () => m(!p),
|
|
1214
1214
|
title: p ? "Collapse" : "Expand"
|
|
1215
1215
|
})
|
|
@@ -1234,19 +1234,19 @@ function ye({ title: e, subtitle: t, right: n, badge: r, count: i, children: a,
|
|
|
1234
1234
|
}
|
|
1235
1235
|
//#endregion
|
|
1236
1236
|
//#region src/components/primitives/RecordIdBadge.tsx
|
|
1237
|
-
var
|
|
1238
|
-
function
|
|
1239
|
-
let [t, n] = R(!1), r =
|
|
1237
|
+
var xe = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Se = 1200;
|
|
1238
|
+
function Ce({ value: e }) {
|
|
1239
|
+
let [t, n] = R(!1), r = xe.test(e) ? `${e.slice(0, 8)}…` : e;
|
|
1240
1240
|
return /* @__PURE__ */ H("button", {
|
|
1241
1241
|
type: "button",
|
|
1242
1242
|
onClick: N(async () => {
|
|
1243
1243
|
try {
|
|
1244
|
-
await navigator.clipboard.writeText(e), n(!0), window.setTimeout(() => n(!1),
|
|
1244
|
+
await navigator.clipboard.writeText(e), n(!0), window.setTimeout(() => n(!1), Se);
|
|
1245
1245
|
} catch {}
|
|
1246
1246
|
}, [e]),
|
|
1247
1247
|
title: t ? "Copied" : `Copy ${e}`,
|
|
1248
1248
|
className: "mono inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-text-4 hover:bg-surface-2 hover:text-text-3 transition-colors shrink-0 border border-transparent hover:border-border",
|
|
1249
|
-
children: [/* @__PURE__ */ V("span", { children: r }), t ? /* @__PURE__ */ V(
|
|
1249
|
+
children: [/* @__PURE__ */ V("span", { children: r }), t ? /* @__PURE__ */ V(K.check, { size: 10 }) : /* @__PURE__ */ V(K.copy, {
|
|
1250
1250
|
size: 10,
|
|
1251
1251
|
style: { opacity: .6 }
|
|
1252
1252
|
})]
|
|
@@ -1254,7 +1254,7 @@ function Se({ value: e }) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
//#endregion
|
|
1256
1256
|
//#region src/components/primitives/RowField.tsx
|
|
1257
|
-
function
|
|
1257
|
+
function we({ label: e, children: t, wide: n, editing: r, required: i }) {
|
|
1258
1258
|
return /* @__PURE__ */ H("div", {
|
|
1259
1259
|
style: {
|
|
1260
1260
|
display: "flex",
|
|
@@ -1296,7 +1296,7 @@ function Ce({ label: e, children: t, wide: n, editing: r, required: i }) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
//#endregion
|
|
1298
1298
|
//#region src/components/primitives/BoolToggle.tsx
|
|
1299
|
-
function
|
|
1299
|
+
function Te({ value: e, onChange: t, id: n, ariaLabelledby: r }) {
|
|
1300
1300
|
return /* @__PURE__ */ V("button", {
|
|
1301
1301
|
type: "button",
|
|
1302
1302
|
id: n,
|
|
@@ -1329,7 +1329,7 @@ function we({ value: e, onChange: t, id: n, ariaLabelledby: r }) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
//#endregion
|
|
1331
1331
|
//#region src/components/primitives/MenuItem.tsx
|
|
1332
|
-
function
|
|
1332
|
+
function Ee({ icon: e, children: t, onClick: n, danger: r, kbd: i, active: a, divider: o, disabled: s, title: c, "data-testid": l }) {
|
|
1333
1333
|
return o ? /* @__PURE__ */ V("div", { style: {
|
|
1334
1334
|
height: 1,
|
|
1335
1335
|
background: "var(--divider)",
|
|
@@ -1369,13 +1369,13 @@ function Te({ icon: e, children: t, onClick: n, danger: r, kbd: i, active: a, di
|
|
|
1369
1369
|
style: { flex: 1 },
|
|
1370
1370
|
children: t
|
|
1371
1371
|
}),
|
|
1372
|
-
i && /* @__PURE__ */ V(
|
|
1372
|
+
i && /* @__PURE__ */ V(se, { children: i })
|
|
1373
1373
|
]
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
//#endregion
|
|
1377
1377
|
//#region src/components/primitives/Check.tsx
|
|
1378
|
-
function
|
|
1378
|
+
function De({ checked: e, onChange: t, indeterminate: n, size: r = 14 }) {
|
|
1379
1379
|
return /* @__PURE__ */ H("span", {
|
|
1380
1380
|
onClick: (n) => {
|
|
1381
1381
|
n.stopPropagation(), t && t(!e);
|
|
@@ -1411,7 +1411,7 @@ function Ee({ checked: e, onChange: t, indeterminate: n, size: r = 14 }) {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
//#endregion
|
|
1413
1413
|
//#region src/components/primitives/Spinner.tsx
|
|
1414
|
-
function
|
|
1414
|
+
function Oe({ size: e = 14 }) {
|
|
1415
1415
|
return /* @__PURE__ */ H("svg", {
|
|
1416
1416
|
width: e,
|
|
1417
1417
|
height: e,
|
|
@@ -1439,18 +1439,18 @@ function De({ size: e = 14 }) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
//#endregion
|
|
1441
1441
|
//#region src/components/primitives/ClassifiedFieldLocked.tsx
|
|
1442
|
-
function
|
|
1442
|
+
function ke({ tier: e, tierDef: t, requiredPermission: n, locale: r = "en", variant: i = "value" }) {
|
|
1443
1443
|
let a = t?.name?.[r] ?? t?.name?.en ?? e, o = n ? `Locked: requires permission "${n}". Ask your administrator to grant it to your role.` : `Locked: ${a} classification — requires explicit grant.`;
|
|
1444
1444
|
return /* @__PURE__ */ H("span", {
|
|
1445
1445
|
title: o,
|
|
1446
1446
|
"aria-label": o,
|
|
1447
1447
|
className: `inline-flex items-center gap-1 text-muted-foreground italic select-none ${i === "input" ? "border border-divider rounded-md px-2 py-1 bg-surface" : ""}`,
|
|
1448
|
-
children: [/* @__PURE__ */ V(
|
|
1448
|
+
children: [/* @__PURE__ */ V(K.lock, { size: 12 }), /* @__PURE__ */ V("span", { children: a })]
|
|
1449
1449
|
});
|
|
1450
1450
|
}
|
|
1451
1451
|
//#endregion
|
|
1452
1452
|
//#region src/components/primitives/Fields.tsx
|
|
1453
|
-
var
|
|
1453
|
+
var Ae = ({ children: e, required: t, hint: n }) => /* @__PURE__ */ H("div", {
|
|
1454
1454
|
style: {
|
|
1455
1455
|
display: "flex",
|
|
1456
1456
|
alignItems: "center",
|
|
@@ -1475,10 +1475,10 @@ var ke = ({ children: e, required: t, hint: n }) => /* @__PURE__ */ H("div", {
|
|
|
1475
1475
|
color: "var(--text-4)",
|
|
1476
1476
|
display: "flex"
|
|
1477
1477
|
},
|
|
1478
|
-
children: /* @__PURE__ */ V(
|
|
1478
|
+
children: /* @__PURE__ */ V(K.info, { size: 11 })
|
|
1479
1479
|
})
|
|
1480
1480
|
]
|
|
1481
|
-
}),
|
|
1481
|
+
}), je = {
|
|
1482
1482
|
width: "100%",
|
|
1483
1483
|
height: 30,
|
|
1484
1484
|
padding: "0 10px",
|
|
@@ -1491,14 +1491,14 @@ var ke = ({ children: e, required: t, hint: n }) => /* @__PURE__ */ H("div", {
|
|
|
1491
1491
|
outline: "none",
|
|
1492
1492
|
transition: "border-color .12s, box-shadow .12s"
|
|
1493
1493
|
};
|
|
1494
|
-
function
|
|
1494
|
+
function X({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style: a, ...o }) {
|
|
1495
1495
|
let [s, c] = R(!1);
|
|
1496
1496
|
return /* @__PURE__ */ H("div", {
|
|
1497
1497
|
style: {
|
|
1498
1498
|
display: "flex",
|
|
1499
1499
|
alignItems: "center",
|
|
1500
1500
|
gap: 6,
|
|
1501
|
-
...
|
|
1501
|
+
...je,
|
|
1502
1502
|
padding: r || i ? "0 8px" : "0 10px",
|
|
1503
1503
|
borderColor: s ? "var(--accent)" : "var(--border)",
|
|
1504
1504
|
boxShadow: s ? "0 0 0 3px var(--accent-ring)" : "none",
|
|
@@ -1540,7 +1540,7 @@ function Z({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style:
|
|
|
1540
1540
|
]
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function Me({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a, name: o, ariaRequired: s }) {
|
|
1544
1544
|
let [c, l] = R(!1), u = i ? {
|
|
1545
1545
|
flex: 1,
|
|
1546
1546
|
height: "100%",
|
|
@@ -1561,7 +1561,7 @@ function je({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a
|
|
|
1561
1561
|
onFocus: () => l(!0),
|
|
1562
1562
|
onBlur: () => l(!1),
|
|
1563
1563
|
style: {
|
|
1564
|
-
...
|
|
1564
|
+
...je,
|
|
1565
1565
|
padding: "8px 10px",
|
|
1566
1566
|
lineHeight: 1.5,
|
|
1567
1567
|
...u,
|
|
@@ -1571,14 +1571,14 @@ function je({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a
|
|
|
1571
1571
|
}
|
|
1572
1572
|
});
|
|
1573
1573
|
}
|
|
1574
|
-
var
|
|
1575
|
-
function
|
|
1574
|
+
var Ne = 20, Pe = 100;
|
|
1575
|
+
function Fe(e) {
|
|
1576
1576
|
return typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : e.value;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1579
|
-
let [a, o] = R(!1), [s, c] = R(""), l = L(null), u = t.find((t) => t.value === e), d = t.length >
|
|
1578
|
+
function Ie({ value: e, options: t, onChange: n, placeholder: r = "Select...", ...i }) {
|
|
1579
|
+
let [a, o] = R(!1), [s, c] = R(""), l = L(null), u = t.find((t) => t.value === e), d = t.length > Ne, f = I(() => {
|
|
1580
1580
|
let e = s.trim().toLowerCase();
|
|
1581
|
-
return e ? t.filter((t) =>
|
|
1581
|
+
return e ? t.filter((t) => Fe(t).toLowerCase().includes(e)).slice(0, Pe) : t.slice(0, Pe);
|
|
1582
1582
|
}, [t, s]);
|
|
1583
1583
|
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("button", {
|
|
1584
1584
|
type: "button",
|
|
@@ -1588,7 +1588,7 @@ function Fe({ value: e, options: t, onChange: n, placeholder: r = "Select...", .
|
|
|
1588
1588
|
},
|
|
1589
1589
|
...i,
|
|
1590
1590
|
style: {
|
|
1591
|
-
...
|
|
1591
|
+
...je,
|
|
1592
1592
|
display: "flex",
|
|
1593
1593
|
alignItems: "center",
|
|
1594
1594
|
justifyContent: "space-between",
|
|
@@ -1606,12 +1606,12 @@ function Fe({ value: e, options: t, onChange: n, placeholder: r = "Select...", .
|
|
|
1606
1606
|
textOverflow: "ellipsis"
|
|
1607
1607
|
},
|
|
1608
1608
|
children: u ? u.label : r
|
|
1609
|
-
}), /* @__PURE__ */ V(
|
|
1609
|
+
}), /* @__PURE__ */ V(K.down, {
|
|
1610
1610
|
size: 12,
|
|
1611
1611
|
cls: "",
|
|
1612
1612
|
style: { color: "var(--text-3)" }
|
|
1613
1613
|
})]
|
|
1614
|
-
}), /* @__PURE__ */ H(
|
|
1614
|
+
}), /* @__PURE__ */ H(ue, {
|
|
1615
1615
|
open: a,
|
|
1616
1616
|
anchor: l.current,
|
|
1617
1617
|
onClose: () => o(!1),
|
|
@@ -1629,15 +1629,15 @@ function Fe({ value: e, options: t, onChange: n, placeholder: r = "Select...", .
|
|
|
1629
1629
|
background: "var(--surface)",
|
|
1630
1630
|
zIndex: 1
|
|
1631
1631
|
},
|
|
1632
|
-
children: /* @__PURE__ */ V(
|
|
1632
|
+
children: /* @__PURE__ */ V(X, {
|
|
1633
1633
|
value: s,
|
|
1634
1634
|
onChange: c,
|
|
1635
1635
|
placeholder: "Search…",
|
|
1636
|
-
prefix: /* @__PURE__ */ V(
|
|
1636
|
+
prefix: /* @__PURE__ */ V(K.search, { size: 12 }),
|
|
1637
1637
|
autoFocus: !0
|
|
1638
1638
|
})
|
|
1639
1639
|
}),
|
|
1640
|
-
f.map((t) => /* @__PURE__ */ V(
|
|
1640
|
+
f.map((t) => /* @__PURE__ */ V(Ee, {
|
|
1641
1641
|
onClick: () => {
|
|
1642
1642
|
n(t.value), o(!1);
|
|
1643
1643
|
},
|
|
@@ -1655,35 +1655,35 @@ function Fe({ value: e, options: t, onChange: n, placeholder: r = "Select...", .
|
|
|
1655
1655
|
]
|
|
1656
1656
|
})] });
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1659
|
-
return /* @__PURE__ */ V(
|
|
1658
|
+
function Le({ value: e, onChange: t }) {
|
|
1659
|
+
return /* @__PURE__ */ V(X, {
|
|
1660
1660
|
value: e || "",
|
|
1661
1661
|
onChange: t,
|
|
1662
1662
|
placeholder: "YYYY-MM-DD HH:mm",
|
|
1663
|
-
prefix: /* @__PURE__ */ V(
|
|
1663
|
+
prefix: /* @__PURE__ */ V(K.calendar, { size: 13 })
|
|
1664
1664
|
});
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function Re(e) {
|
|
1667
1667
|
if (!e) return 0;
|
|
1668
1668
|
let t = 0;
|
|
1669
1669
|
return e.length >= 8 && t++, e.length >= 12 && t++, /[A-Z]/.test(e) && /[a-z]/.test(e) && t++, /\d/.test(e) && t++, /[^A-Za-z0-9]/.test(e) && t++, Math.min(4, t);
|
|
1670
1670
|
}
|
|
1671
|
-
var
|
|
1671
|
+
var ze = [
|
|
1672
1672
|
"Too short",
|
|
1673
1673
|
"Weak",
|
|
1674
1674
|
"Fair",
|
|
1675
1675
|
"Good",
|
|
1676
1676
|
"Strong"
|
|
1677
|
-
],
|
|
1677
|
+
], Be = [
|
|
1678
1678
|
"var(--danger)",
|
|
1679
1679
|
"var(--danger)",
|
|
1680
1680
|
"var(--warning, #B45309)",
|
|
1681
1681
|
"var(--accent)",
|
|
1682
1682
|
"var(--success, #3FBF8F)"
|
|
1683
1683
|
];
|
|
1684
|
-
function
|
|
1685
|
-
let [s, c] = R(!1), l = e || "", u =
|
|
1686
|
-
return /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(
|
|
1684
|
+
function Ve({ value: e, onChange: t, placeholder: n = "Enter password", showStrength: r, id: i, name: a, ariaRequired: o }) {
|
|
1685
|
+
let [s, c] = R(!1), l = e || "", u = Re(l);
|
|
1686
|
+
return /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(X, {
|
|
1687
1687
|
id: i,
|
|
1688
1688
|
name: a,
|
|
1689
1689
|
"aria-required": o || void 0,
|
|
@@ -1703,7 +1703,7 @@ function Be({ value: e, onChange: t, placeholder: n = "Enter password", showStre
|
|
|
1703
1703
|
display: "flex"
|
|
1704
1704
|
},
|
|
1705
1705
|
onClick: () => c(!s),
|
|
1706
|
-
children: V(s ?
|
|
1706
|
+
children: V(s ? K.eyeOff : K.eye, { size: 14 })
|
|
1707
1707
|
})
|
|
1708
1708
|
}), r && /* @__PURE__ */ H("div", {
|
|
1709
1709
|
style: {
|
|
@@ -1727,7 +1727,7 @@ function Be({ value: e, onChange: t, placeholder: n = "Enter password", showStre
|
|
|
1727
1727
|
flex: 1,
|
|
1728
1728
|
height: 3,
|
|
1729
1729
|
borderRadius: 999,
|
|
1730
|
-
background: e < u ?
|
|
1730
|
+
background: e < u ? Be[u] : "var(--surface-3)",
|
|
1731
1731
|
transition: "background .15s"
|
|
1732
1732
|
} }, e))
|
|
1733
1733
|
}), /* @__PURE__ */ V("span", {
|
|
@@ -1737,15 +1737,15 @@ function Be({ value: e, onChange: t, placeholder: n = "Enter password", showStre
|
|
|
1737
1737
|
minWidth: 54,
|
|
1738
1738
|
textAlign: "right"
|
|
1739
1739
|
},
|
|
1740
|
-
children: l ?
|
|
1740
|
+
children: l ? ze[u] : ""
|
|
1741
1741
|
})]
|
|
1742
1742
|
})] });
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function He({ value: e = [], onChange: t }) {
|
|
1745
1745
|
let [n, r] = R("");
|
|
1746
1746
|
return /* @__PURE__ */ H("div", {
|
|
1747
1747
|
style: {
|
|
1748
|
-
...
|
|
1748
|
+
...je,
|
|
1749
1749
|
height: "auto",
|
|
1750
1750
|
minHeight: 30,
|
|
1751
1751
|
display: "flex",
|
|
@@ -1754,7 +1754,7 @@ function Ve({ value: e = [], onChange: t }) {
|
|
|
1754
1754
|
padding: "4px 6px",
|
|
1755
1755
|
alignItems: "center"
|
|
1756
1756
|
},
|
|
1757
|
-
children: [e.map((n, r) => /* @__PURE__ */ V(
|
|
1757
|
+
children: [e.map((n, r) => /* @__PURE__ */ V(ve, {
|
|
1758
1758
|
tone: "slate",
|
|
1759
1759
|
onRemove: () => t(e.filter((e, t) => t !== r)),
|
|
1760
1760
|
children: n
|
|
@@ -1777,7 +1777,7 @@ function Ve({ value: e = [], onChange: t }) {
|
|
|
1777
1777
|
})]
|
|
1778
1778
|
});
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Ue({ value: e, onChange: t }) {
|
|
1781
1781
|
return /* @__PURE__ */ H("div", {
|
|
1782
1782
|
style: {
|
|
1783
1783
|
border: "1px solid var(--border)",
|
|
@@ -1806,12 +1806,12 @@ function He({ value: e, onChange: t }) {
|
|
|
1806
1806
|
children: "JSON"
|
|
1807
1807
|
}),
|
|
1808
1808
|
/* @__PURE__ */ V("span", { style: { flex: 1 } }),
|
|
1809
|
-
/* @__PURE__ */ V(
|
|
1809
|
+
/* @__PURE__ */ V(q, {
|
|
1810
1810
|
size: "xs",
|
|
1811
1811
|
kind: "ghost",
|
|
1812
1812
|
children: "Format"
|
|
1813
1813
|
}),
|
|
1814
|
-
/* @__PURE__ */ V(
|
|
1814
|
+
/* @__PURE__ */ V(q, {
|
|
1815
1815
|
size: "xs",
|
|
1816
1816
|
kind: "ghost",
|
|
1817
1817
|
children: "Validate"
|
|
@@ -1836,7 +1836,7 @@ function He({ value: e, onChange: t }) {
|
|
|
1836
1836
|
})]
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1839
|
+
function We({ value: e, entity: t = "company", onChange: n, items: r = [], id: i, ariaLabelledby: a, ariaRequired: o }) {
|
|
1840
1840
|
let [s, c] = R(!1), l = L(null);
|
|
1841
1841
|
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("button", {
|
|
1842
1842
|
type: "button",
|
|
@@ -1846,7 +1846,7 @@ function Ue({ value: e, entity: t = "company", onChange: n, items: r = [], id: i
|
|
|
1846
1846
|
ref: l,
|
|
1847
1847
|
onClick: () => c(!0),
|
|
1848
1848
|
style: {
|
|
1849
|
-
...
|
|
1849
|
+
...je,
|
|
1850
1850
|
display: "flex",
|
|
1851
1851
|
alignItems: "center",
|
|
1852
1852
|
justifyContent: "space-between",
|
|
@@ -1871,30 +1871,30 @@ function Ue({ value: e, entity: t = "company", onChange: n, items: r = [], id: i
|
|
|
1871
1871
|
alignItems: "center",
|
|
1872
1872
|
justifyContent: "center"
|
|
1873
1873
|
},
|
|
1874
|
-
children: /* @__PURE__ */ V(
|
|
1874
|
+
children: /* @__PURE__ */ V(K.link, { size: 11 })
|
|
1875
1875
|
}), /* @__PURE__ */ V("span", {
|
|
1876
1876
|
style: { color: e ? "var(--accent)" : "var(--text-placeholder)" },
|
|
1877
1877
|
children: e || `Link to ${t}…`
|
|
1878
1878
|
})]
|
|
1879
|
-
}), /* @__PURE__ */ V(
|
|
1879
|
+
}), /* @__PURE__ */ V(K.search, {
|
|
1880
1880
|
size: 12,
|
|
1881
1881
|
cls: "",
|
|
1882
1882
|
style: { color: "var(--text-3)" }
|
|
1883
1883
|
})]
|
|
1884
|
-
}), /* @__PURE__ */ H(
|
|
1884
|
+
}), /* @__PURE__ */ H(ue, {
|
|
1885
1885
|
open: s,
|
|
1886
1886
|
anchor: l.current,
|
|
1887
1887
|
onClose: () => c(!1),
|
|
1888
1888
|
width: l.current?.offsetWidth,
|
|
1889
1889
|
children: [/* @__PURE__ */ V("div", {
|
|
1890
1890
|
style: { padding: 4 },
|
|
1891
|
-
children: /* @__PURE__ */ V(
|
|
1891
|
+
children: /* @__PURE__ */ V(X, {
|
|
1892
1892
|
placeholder: `Search ${t}…`,
|
|
1893
|
-
prefix: /* @__PURE__ */ V(
|
|
1893
|
+
prefix: /* @__PURE__ */ V(K.search, { size: 12 }),
|
|
1894
1894
|
style: { marginBottom: 4 }
|
|
1895
1895
|
})
|
|
1896
|
-
}), r.slice(0, 6).map((e) => /* @__PURE__ */ V(
|
|
1897
|
-
icon: /* @__PURE__ */ V(
|
|
1896
|
+
}), r.slice(0, 6).map((e) => /* @__PURE__ */ V(Ee, {
|
|
1897
|
+
icon: /* @__PURE__ */ V(K.building, { size: 13 }),
|
|
1898
1898
|
onClick: () => {
|
|
1899
1899
|
n && n(e.name), c(!1);
|
|
1900
1900
|
},
|
|
@@ -1902,7 +1902,7 @@ function Ue({ value: e, entity: t = "company", onChange: n, items: r = [], id: i
|
|
|
1902
1902
|
}, e.id))]
|
|
1903
1903
|
})] });
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ge({ label: e, children: t, mono: n, wide: r, empty: i }) {
|
|
1906
1906
|
return /* @__PURE__ */ H("div", {
|
|
1907
1907
|
style: {
|
|
1908
1908
|
display: "flex",
|
|
@@ -1935,7 +1935,7 @@ function We({ label: e, children: t, mono: n, wide: r, empty: i }) {
|
|
|
1935
1935
|
})]
|
|
1936
1936
|
});
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Ke({ value: e, onChange: t, type: n = "text", options: r }) {
|
|
1939
1939
|
let [i, a] = R(!1), [o, s] = R(e), c = () => {
|
|
1940
1940
|
t && o !== void 0 && t(o), a(!1);
|
|
1941
1941
|
}, l = () => {
|
|
@@ -1950,30 +1950,30 @@ function Ge({ value: e, onChange: t, type: n = "text", options: r }) {
|
|
|
1950
1950
|
onKeyDown: (e) => {
|
|
1951
1951
|
e.key === "Enter" && c(), e.key === "Escape" && l();
|
|
1952
1952
|
},
|
|
1953
|
-
children: [n === "select" ? /* @__PURE__ */ V(
|
|
1953
|
+
children: [n === "select" ? /* @__PURE__ */ V(Ie, {
|
|
1954
1954
|
value: o,
|
|
1955
1955
|
options: r || [],
|
|
1956
1956
|
onChange: (e) => {
|
|
1957
1957
|
s(e), t && t(e), a(!1);
|
|
1958
1958
|
}
|
|
1959
|
-
}) : n === "bool" ? /* @__PURE__ */ V(
|
|
1959
|
+
}) : n === "bool" ? /* @__PURE__ */ V(Te, {
|
|
1960
1960
|
value: o === "true",
|
|
1961
1961
|
onChange: (e) => {
|
|
1962
1962
|
let n = String(e);
|
|
1963
1963
|
s(n), t && t(n), a(!1);
|
|
1964
1964
|
}
|
|
1965
|
-
}) : /* @__PURE__ */ V(
|
|
1965
|
+
}) : /* @__PURE__ */ V(X, {
|
|
1966
1966
|
value: o ?? "",
|
|
1967
1967
|
onChange: s,
|
|
1968
1968
|
autoFocus: !0
|
|
1969
|
-
}), n !== "select" && n !== "bool" && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(
|
|
1969
|
+
}), n !== "select" && n !== "bool" && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(J, {
|
|
1970
1970
|
size: 24,
|
|
1971
|
-
icon: /* @__PURE__ */ V(
|
|
1971
|
+
icon: /* @__PURE__ */ V(K.check, { size: 13 }),
|
|
1972
1972
|
onClick: c,
|
|
1973
1973
|
title: "Save"
|
|
1974
|
-
}), /* @__PURE__ */ V(
|
|
1974
|
+
}), /* @__PURE__ */ V(J, {
|
|
1975
1975
|
size: 24,
|
|
1976
|
-
icon: /* @__PURE__ */ V(
|
|
1976
|
+
icon: /* @__PURE__ */ V(K.x, { size: 13 }),
|
|
1977
1977
|
onClick: l,
|
|
1978
1978
|
title: "Cancel"
|
|
1979
1979
|
})] })]
|
|
@@ -2004,7 +2004,7 @@ function Ge({ value: e, onChange: t, type: n = "text", options: r }) {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
//#endregion
|
|
2006
2006
|
//#region src/types/ordmap.ts
|
|
2007
|
-
var
|
|
2007
|
+
var qe = class e {
|
|
2008
2008
|
#e;
|
|
2009
2009
|
#t;
|
|
2010
2010
|
constructor(e) {
|
|
@@ -2045,33 +2045,33 @@ var Ke = class e {
|
|
|
2045
2045
|
for (let e of this.#e) yield [e.name ?? "", e];
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
|
-
function
|
|
2048
|
+
function Z(e, t = "en") {
|
|
2049
2049
|
return e ? e[t] ?? Object.values(e)[0] ?? "" : "";
|
|
2050
2050
|
}
|
|
2051
|
-
var
|
|
2052
|
-
function
|
|
2051
|
+
var Je = "$display";
|
|
2052
|
+
function Ye(e, t) {
|
|
2053
2053
|
if (!e) return;
|
|
2054
|
-
let n = e[
|
|
2054
|
+
let n = e[Je];
|
|
2055
2055
|
if (typeof n == "string" && n !== "") return n;
|
|
2056
2056
|
let r = t?.display?.display_field;
|
|
2057
2057
|
if (!r) return;
|
|
2058
2058
|
let i = e[r];
|
|
2059
|
-
if (i != null) return typeof i == "object" && !Array.isArray(i) ?
|
|
2059
|
+
if (i != null) return typeof i == "object" && !Array.isArray(i) ? Z(i) || void 0 : String(i);
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2062
|
-
let r = e[
|
|
2061
|
+
function Xe(e, t, n) {
|
|
2062
|
+
let r = e[Je];
|
|
2063
2063
|
if (typeof r == "string" && r !== "") return r;
|
|
2064
2064
|
if (t) {
|
|
2065
2065
|
let r = e[t];
|
|
2066
|
-
if (r != null) return typeof r == "object" && !Array.isArray(r) ?
|
|
2066
|
+
if (r != null) return typeof r == "object" && !Array.isArray(r) ? Z(r) || n : String(r);
|
|
2067
2067
|
}
|
|
2068
2068
|
return n;
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2070
|
+
function Ze(e) {
|
|
2071
2071
|
let t = e.replace(/\/+$/, "").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2072
2072
|
return RegExp("^" + t.join("/") + "$");
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function Qe(e) {
|
|
2075
2075
|
let t = (() => {
|
|
2076
2076
|
try {
|
|
2077
2077
|
return decodeURIComponent(e);
|
|
@@ -2081,17 +2081,17 @@ function Ze(e) {
|
|
|
2081
2081
|
})().split("-")[0];
|
|
2082
2082
|
return t.length > 8 ? t.slice(0, 8) : t;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function $e(e, t, n) {
|
|
2085
2085
|
if (!t) return;
|
|
2086
2086
|
let r = e.replace(/\/+$/, "") || "/", i;
|
|
2087
2087
|
for (let e of Object.values(t)) {
|
|
2088
|
-
if (!e.route || !
|
|
2089
|
-
let t = e.route.includes("/:"), a =
|
|
2088
|
+
if (!e.route || !Ze(e.route).test(r)) continue;
|
|
2089
|
+
let t = e.route.includes("/:"), a = Z(e.display?.name);
|
|
2090
2090
|
if (!a && t && n && e.entity) {
|
|
2091
|
-
let t =
|
|
2091
|
+
let t = Z(n[e.entity]?.display?.name);
|
|
2092
2092
|
if (t) {
|
|
2093
2093
|
let e = r.slice(r.lastIndexOf("/") + 1);
|
|
2094
|
-
a = e ? `${t} ${
|
|
2094
|
+
a = e ? `${t} ${Qe(e)}` : t;
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
2097
|
if (!a) continue;
|
|
@@ -2104,19 +2104,19 @@ function Qe(e, t, n) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
return i;
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2108
|
-
let r =
|
|
2107
|
+
function et(e, t, n) {
|
|
2108
|
+
let r = Z(e.display?.name);
|
|
2109
2109
|
if (r) return r;
|
|
2110
2110
|
if (e.type === "ref" && e.ref?.entity && n) {
|
|
2111
2111
|
let t = n[e.ref.entity];
|
|
2112
2112
|
if (t) {
|
|
2113
|
-
let e =
|
|
2113
|
+
let e = Z(t.display?.name);
|
|
2114
2114
|
if (e) return e;
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
2117
|
return t;
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function tt(e) {
|
|
2120
2120
|
let t = e.name, n = e.display ? {
|
|
2121
2121
|
...e.display,
|
|
2122
2122
|
name: e.display.name ?? t
|
|
@@ -2129,29 +2129,29 @@ function et(e) {
|
|
|
2129
2129
|
structure: e.structure
|
|
2130
2130
|
};
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function nt(e, t) {
|
|
2133
2133
|
return !e || e.readonly ? !1 : e.mutations?.[t] ?? !0;
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2135
|
+
function rt(e) {
|
|
2136
2136
|
if (e.primary_key && e.primary_key.length > 0) return e.primary_key;
|
|
2137
2137
|
for (let [t, n] of e.fields) if (n.primary) return [t];
|
|
2138
2138
|
return ["id"];
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2141
|
-
let n =
|
|
2140
|
+
function it(e, t) {
|
|
2141
|
+
let n = rt(e), r = {};
|
|
2142
2142
|
for (let e of n) r[e] = String(t[e] ?? "");
|
|
2143
2143
|
return r;
|
|
2144
2144
|
}
|
|
2145
|
-
function it(e) {
|
|
2146
|
-
return e.length === 1 ? e[0] : JSON.stringify(e);
|
|
2147
|
-
}
|
|
2148
2145
|
function at(e) {
|
|
2149
|
-
return
|
|
2146
|
+
return e.length === 1 ? e[0] : JSON.stringify(e);
|
|
2150
2147
|
}
|
|
2151
|
-
function ot(e
|
|
2152
|
-
return
|
|
2148
|
+
function ot(e) {
|
|
2149
|
+
return at(Object.values(e));
|
|
2153
2150
|
}
|
|
2154
2151
|
function st(e, t) {
|
|
2152
|
+
return at(rt(e).map((e) => t[e] ?? ""));
|
|
2153
|
+
}
|
|
2154
|
+
function ct(e, t) {
|
|
2155
2155
|
if (t <= 1) return [e];
|
|
2156
2156
|
try {
|
|
2157
2157
|
let n = JSON.parse(e);
|
|
@@ -2161,64 +2161,64 @@ function st(e, t) {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
return null;
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function lt(e, t, n) {
|
|
2165
2165
|
if (e?.detail_screen === "none") return null;
|
|
2166
2166
|
let r = e?.detail_screen ?? t?.detail_screen;
|
|
2167
2167
|
return r ? n?.[r]?.route ?? null : null;
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2169
|
+
function ut(e, t, n, r) {
|
|
2170
2170
|
if (!t) return null;
|
|
2171
|
-
let i =
|
|
2171
|
+
let i = lt(e, n, r);
|
|
2172
2172
|
return i ? i.replace(":id", encodeURIComponent(t)) : null;
|
|
2173
2173
|
}
|
|
2174
|
-
function ut(e, t, n, r) {
|
|
2175
|
-
return !t || nt(t).some((e) => !r[e]) ? null : lt(e, ot(t, r), t, n);
|
|
2176
|
-
}
|
|
2177
2174
|
function dt(e, t, n, r) {
|
|
2178
|
-
return t ? ut(e, t,
|
|
2175
|
+
return !t || rt(t).some((e) => !r[e]) ? null : ut(e, st(t, r), t, n);
|
|
2179
2176
|
}
|
|
2180
|
-
function ft(e) {
|
|
2181
|
-
return
|
|
2177
|
+
function ft(e, t, n, r) {
|
|
2178
|
+
return t ? dt(e, t, n, it(t, r)) : null;
|
|
2179
|
+
}
|
|
2180
|
+
function pt(e) {
|
|
2181
|
+
return rt(e).length > 1;
|
|
2182
2182
|
}
|
|
2183
2183
|
//#endregion
|
|
2184
2184
|
//#region src/api/schema.ts
|
|
2185
|
-
function
|
|
2185
|
+
function mt(e) {
|
|
2186
2186
|
return {
|
|
2187
2187
|
...e,
|
|
2188
|
-
params: e.params ?
|
|
2188
|
+
params: e.params ? qe.fromObject(e.params) : void 0
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function ht(e) {
|
|
2192
2192
|
return {
|
|
2193
2193
|
...e,
|
|
2194
|
-
resolved_params: e.resolved_params ?
|
|
2194
|
+
resolved_params: e.resolved_params ? qe.fromObject(e.resolved_params) : void 0
|
|
2195
2195
|
};
|
|
2196
2196
|
}
|
|
2197
|
-
function
|
|
2197
|
+
function gt(e) {
|
|
2198
2198
|
let t = {};
|
|
2199
|
-
if (e.handlers) for (let [n, r] of Object.entries(e.handlers)) t[n] =
|
|
2199
|
+
if (e.handlers) for (let [n, r] of Object.entries(e.handlers)) t[n] = mt(r);
|
|
2200
2200
|
let n = {};
|
|
2201
|
-
if (e.actions) for (let [t, r] of Object.entries(e.actions)) n[t] =
|
|
2201
|
+
if (e.actions) for (let [t, r] of Object.entries(e.actions)) n[t] = ht(r);
|
|
2202
2202
|
return {
|
|
2203
2203
|
...e,
|
|
2204
|
-
fields:
|
|
2205
|
-
files: e.files ?
|
|
2204
|
+
fields: qe.fromObject(e.fields),
|
|
2205
|
+
files: e.files ? qe.fromObject(e.files) : void 0,
|
|
2206
2206
|
handlers: e.handlers ? t : void 0,
|
|
2207
2207
|
actions: e.actions ? n : void 0
|
|
2208
2208
|
};
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2210
|
+
function _t(e) {
|
|
2211
2211
|
let t = {};
|
|
2212
|
-
if (e.entities) for (let [n, r] of Object.entries(e.entities)) t[n] =
|
|
2212
|
+
if (e.entities) for (let [n, r] of Object.entries(e.entities)) t[n] = gt(r);
|
|
2213
2213
|
let n = {};
|
|
2214
2214
|
if (e.structures) for (let [t, r] of Object.entries(e.structures)) n[t] = {
|
|
2215
2215
|
...r,
|
|
2216
|
-
fields:
|
|
2216
|
+
fields: qe.fromObject(r.fields)
|
|
2217
2217
|
};
|
|
2218
2218
|
let r = {};
|
|
2219
|
-
if (e.handlers) for (let [t, n] of Object.entries(e.handlers)) r[t] =
|
|
2219
|
+
if (e.handlers) for (let [t, n] of Object.entries(e.handlers)) r[t] = mt(n);
|
|
2220
2220
|
let i = {};
|
|
2221
|
-
if (e.actions) for (let [t, n] of Object.entries(e.actions)) i[t] =
|
|
2221
|
+
if (e.actions) for (let [t, n] of Object.entries(e.actions)) i[t] = ht(n);
|
|
2222
2222
|
return {
|
|
2223
2223
|
...e,
|
|
2224
2224
|
entities: t,
|
|
@@ -2227,15 +2227,15 @@ function gt(e) {
|
|
|
2227
2227
|
actions: i
|
|
2228
2228
|
};
|
|
2229
2229
|
}
|
|
2230
|
-
async function
|
|
2231
|
-
return
|
|
2230
|
+
async function vt() {
|
|
2231
|
+
return _t(await e("/api/schema"));
|
|
2232
2232
|
}
|
|
2233
2233
|
//#endregion
|
|
2234
2234
|
//#region src/api/auth.ts
|
|
2235
|
-
async function
|
|
2235
|
+
async function yt() {
|
|
2236
2236
|
return n("auth.check_setup");
|
|
2237
2237
|
}
|
|
2238
|
-
async function
|
|
2238
|
+
async function bt(e, t, r = !0) {
|
|
2239
2239
|
let i = await n("auth.login", {
|
|
2240
2240
|
email: e,
|
|
2241
2241
|
password: t,
|
|
@@ -2243,7 +2243,7 @@ async function yt(e, t, r = !0) {
|
|
|
2243
2243
|
});
|
|
2244
2244
|
return f(i.expires_at), i;
|
|
2245
2245
|
}
|
|
2246
|
-
async function
|
|
2246
|
+
async function xt(e, t, r) {
|
|
2247
2247
|
let i = await n("auth.signup", {
|
|
2248
2248
|
email: e,
|
|
2249
2249
|
password: t,
|
|
@@ -2251,42 +2251,42 @@ async function bt(e, t, r) {
|
|
|
2251
2251
|
});
|
|
2252
2252
|
return f(i.expires_at), i;
|
|
2253
2253
|
}
|
|
2254
|
-
async function
|
|
2254
|
+
async function St() {
|
|
2255
2255
|
return n("auth.me");
|
|
2256
2256
|
}
|
|
2257
|
-
async function
|
|
2257
|
+
async function Ct() {
|
|
2258
2258
|
return (await n("auth.list_tenants")).tenants;
|
|
2259
2259
|
}
|
|
2260
|
-
async function
|
|
2260
|
+
async function wt(e) {
|
|
2261
2261
|
let t = await n("auth.switch_tenant", { tenant_id: e });
|
|
2262
2262
|
return f(t.expires_at), t;
|
|
2263
2263
|
}
|
|
2264
|
-
async function
|
|
2264
|
+
async function Tt() {
|
|
2265
2265
|
await n("auth.logout");
|
|
2266
2266
|
}
|
|
2267
|
-
async function
|
|
2267
|
+
async function Et(e) {
|
|
2268
2268
|
return (await n("sso_provider.list", e ? { tenant_code: e } : {})).providers;
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function Dt(e, t, n) {
|
|
2271
2271
|
let r = new URLSearchParams();
|
|
2272
2272
|
t && r.set("tenant", t), n && r.set("redirect", n);
|
|
2273
2273
|
let i = r.toString();
|
|
2274
2274
|
return `/api/auth/sso/authorize/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
|
|
2275
2275
|
}
|
|
2276
|
-
async function
|
|
2276
|
+
async function Ot(e, t, r) {
|
|
2277
2277
|
let i = {
|
|
2278
2278
|
target_user_id: e,
|
|
2279
2279
|
reason: t
|
|
2280
2280
|
};
|
|
2281
2281
|
return r != null && (i.duration_minutes = r), n("impersonation.start", i);
|
|
2282
2282
|
}
|
|
2283
|
-
async function
|
|
2283
|
+
async function kt() {
|
|
2284
2284
|
return n("impersonation.stop");
|
|
2285
2285
|
}
|
|
2286
|
-
async function
|
|
2286
|
+
async function At(e) {
|
|
2287
2287
|
await n("impersonation.revoke", { session_id: e });
|
|
2288
2288
|
}
|
|
2289
|
-
async function
|
|
2289
|
+
async function jt(e, t) {
|
|
2290
2290
|
await n("auth.change_password", {
|
|
2291
2291
|
current_password: e,
|
|
2292
2292
|
new_password: t
|
|
@@ -2294,7 +2294,7 @@ async function At(e, t) {
|
|
|
2294
2294
|
}
|
|
2295
2295
|
//#endregion
|
|
2296
2296
|
//#region src/stores/auth.ts
|
|
2297
|
-
var
|
|
2297
|
+
var Mt = U((e) => ({
|
|
2298
2298
|
user: null,
|
|
2299
2299
|
isAuthenticated: !1,
|
|
2300
2300
|
isLoading: !0,
|
|
@@ -2302,9 +2302,9 @@ var jt = W((e) => ({
|
|
|
2302
2302
|
tenants: [],
|
|
2303
2303
|
initialize: async () => {
|
|
2304
2304
|
try {
|
|
2305
|
-
let t = await
|
|
2305
|
+
let t = await St(), n = t.tenant ?? null, r = [];
|
|
2306
2306
|
try {
|
|
2307
|
-
r = await
|
|
2307
|
+
r = await Ct();
|
|
2308
2308
|
} catch {}
|
|
2309
2309
|
e({
|
|
2310
2310
|
user: t,
|
|
@@ -2323,7 +2323,7 @@ var jt = W((e) => ({
|
|
|
2323
2323
|
},
|
|
2324
2324
|
refreshMe: async () => {
|
|
2325
2325
|
try {
|
|
2326
|
-
let t = await
|
|
2326
|
+
let t = await St();
|
|
2327
2327
|
e({
|
|
2328
2328
|
user: t,
|
|
2329
2329
|
activeTenant: t.tenant ?? null
|
|
@@ -2347,7 +2347,7 @@ var jt = W((e) => ({
|
|
|
2347
2347
|
logout: async () => {
|
|
2348
2348
|
t();
|
|
2349
2349
|
try {
|
|
2350
|
-
await
|
|
2350
|
+
await Tt();
|
|
2351
2351
|
} catch {}
|
|
2352
2352
|
e({
|
|
2353
2353
|
user: null,
|
|
@@ -2359,18 +2359,18 @@ var jt = W((e) => ({
|
|
|
2359
2359
|
}));
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/hooks/useSchema.ts
|
|
2362
|
-
function
|
|
2363
|
-
let e =
|
|
2362
|
+
function Nt() {
|
|
2363
|
+
let e = Mt((e) => e.isAuthenticated);
|
|
2364
2364
|
return z({
|
|
2365
2365
|
queryKey: ["schema", e],
|
|
2366
|
-
queryFn:
|
|
2366
|
+
queryFn: vt,
|
|
2367
2367
|
staleTime: Infinity,
|
|
2368
2368
|
enabled: e
|
|
2369
2369
|
});
|
|
2370
2370
|
}
|
|
2371
2371
|
//#endregion
|
|
2372
2372
|
//#region src/stores/appearance.ts
|
|
2373
|
-
var
|
|
2373
|
+
var Pt = {
|
|
2374
2374
|
theme: "light",
|
|
2375
2375
|
accent: "violet",
|
|
2376
2376
|
density: "compact",
|
|
@@ -2383,26 +2383,26 @@ var Nt = {
|
|
|
2383
2383
|
aiSurface: "both",
|
|
2384
2384
|
faviconSource: "google",
|
|
2385
2385
|
toastPosition: "bottom-right"
|
|
2386
|
-
},
|
|
2386
|
+
}, Ft = ["light", "dark"], It = [
|
|
2387
2387
|
"violet",
|
|
2388
2388
|
"blue",
|
|
2389
2389
|
"teal",
|
|
2390
2390
|
"amber",
|
|
2391
2391
|
"rose"
|
|
2392
|
-
],
|
|
2392
|
+
], Lt = [
|
|
2393
2393
|
"compact",
|
|
2394
2394
|
"comfortable",
|
|
2395
2395
|
"cozy"
|
|
2396
|
-
],
|
|
2396
|
+
], Rt = ["wide", "collapsed"], zt = ["top", "bottom"], Bt = [
|
|
2397
2397
|
"command",
|
|
2398
2398
|
"panel",
|
|
2399
2399
|
"both",
|
|
2400
2400
|
"off"
|
|
2401
|
-
],
|
|
2401
|
+
], Vt = [
|
|
2402
2402
|
"google",
|
|
2403
2403
|
"direct",
|
|
2404
2404
|
"none"
|
|
2405
|
-
],
|
|
2405
|
+
], Ht = [
|
|
2406
2406
|
"top-left",
|
|
2407
2407
|
"top-center",
|
|
2408
2408
|
"top-right",
|
|
@@ -2410,48 +2410,48 @@ var Nt = {
|
|
|
2410
2410
|
"bottom-center",
|
|
2411
2411
|
"bottom-right"
|
|
2412
2412
|
];
|
|
2413
|
-
function
|
|
2413
|
+
function Ut(e, t) {
|
|
2414
2414
|
return typeof t == "string" && e.includes(t) ? t : void 0;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2417
|
-
let t = {}, n =
|
|
2416
|
+
function Wt(e) {
|
|
2417
|
+
let t = {}, n = Ut(Ft, e.theme);
|
|
2418
2418
|
n && (t.theme = n);
|
|
2419
|
-
let r =
|
|
2419
|
+
let r = Ut(It, e.accent);
|
|
2420
2420
|
r && (t.accent = r);
|
|
2421
|
-
let i =
|
|
2421
|
+
let i = Ut(Lt, e.density);
|
|
2422
2422
|
i && (t.density = i);
|
|
2423
|
-
let a =
|
|
2423
|
+
let a = Ut(Rt, e.sidebar);
|
|
2424
2424
|
a && (t.sidebar = a);
|
|
2425
|
-
let o =
|
|
2425
|
+
let o = Ut(zt, e.tabsPosition);
|
|
2426
2426
|
o && (t.tabsPosition = o);
|
|
2427
|
-
let s =
|
|
2427
|
+
let s = Ut(Bt, e.aiSurface);
|
|
2428
2428
|
s && (t.aiSurface = s);
|
|
2429
|
-
let c =
|
|
2429
|
+
let c = Ut(Vt, e.faviconSource);
|
|
2430
2430
|
c && (t.faviconSource = c);
|
|
2431
|
-
let l = Ht
|
|
2431
|
+
let l = Ut(Ht, e.toastPosition);
|
|
2432
2432
|
return l && (t.toastPosition = l), typeof e.tabsMaxOpen == "number" && e.tabsMaxOpen > 0 && (t.tabsMaxOpen = e.tabsMaxOpen), typeof e.radius == "number" && e.radius >= 0 && e.radius <= 32 && (t.radius = e.radius), typeof e.zebra == "boolean" && (t.zebra = e.zebra), typeof e.tabsPersist == "boolean" && (t.tabsPersist = e.tabsPersist), t;
|
|
2433
2433
|
}
|
|
2434
|
-
var
|
|
2435
|
-
function
|
|
2434
|
+
var Gt = "declarion-appearance";
|
|
2435
|
+
function Kt() {
|
|
2436
2436
|
if (typeof window > "u") return null;
|
|
2437
2437
|
try {
|
|
2438
|
-
let e = localStorage.getItem(
|
|
2438
|
+
let e = localStorage.getItem(Gt);
|
|
2439
2439
|
return e ? JSON.parse(e) : null;
|
|
2440
2440
|
} catch {
|
|
2441
2441
|
return null;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function qt(e) {
|
|
2445
2445
|
if (!(typeof window > "u")) try {
|
|
2446
|
-
localStorage.setItem(
|
|
2446
|
+
localStorage.setItem(Gt, JSON.stringify(e));
|
|
2447
2447
|
} catch {}
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function Jt(e) {
|
|
2450
2450
|
if (typeof document > "u") return;
|
|
2451
2451
|
let t = document.documentElement;
|
|
2452
2452
|
t.dataset.theme = e.theme, t.dataset.accent = e.accent, t.dataset.density = e.density, t.dataset.sidebar = e.sidebar, t.dataset.tabbar = e.tabsPosition, t.dataset.zebra = e.zebra ? "on" : "off", t.dataset.ai = e.aiSurface, t.style.setProperty("--radius-md", `${e.radius}px`), t.style.setProperty("--radius-lg", `${e.radius + 3}px`);
|
|
2453
2453
|
}
|
|
2454
|
-
var
|
|
2454
|
+
var Yt = {
|
|
2455
2455
|
ui_theme: "theme",
|
|
2456
2456
|
ui_accent: "accent",
|
|
2457
2457
|
ui_density: "density",
|
|
@@ -2464,117 +2464,109 @@ var Jt = {
|
|
|
2464
2464
|
ui_ai_surface: "aiSurface",
|
|
2465
2465
|
ui_favicon_source: "faviconSource",
|
|
2466
2466
|
ui_toast_position: "toastPosition"
|
|
2467
|
-
},
|
|
2468
|
-
...
|
|
2469
|
-
...
|
|
2467
|
+
}, Xt = Kt(), Zt = Xt ? new Set(Object.keys(Xt)) : /* @__PURE__ */ new Set(), Qt = {
|
|
2468
|
+
...Pt,
|
|
2469
|
+
...Xt ? Wt(Xt) : {}
|
|
2470
2470
|
};
|
|
2471
|
-
typeof window < "u" &&
|
|
2472
|
-
var
|
|
2473
|
-
...
|
|
2471
|
+
typeof window < "u" && Jt(Qt);
|
|
2472
|
+
var $t = U((e, t) => ({
|
|
2473
|
+
...Qt,
|
|
2474
2474
|
set: (n, r) => {
|
|
2475
|
-
let i =
|
|
2475
|
+
let i = Wt({ [n]: r });
|
|
2476
2476
|
if (i[n] === void 0) return;
|
|
2477
2477
|
let a = {
|
|
2478
2478
|
...t(),
|
|
2479
2479
|
...i
|
|
2480
2480
|
};
|
|
2481
|
-
|
|
2481
|
+
Jt(a), qt(a), Zt.add(n), e(i);
|
|
2482
2482
|
},
|
|
2483
2483
|
setMany: (n) => {
|
|
2484
|
-
let r =
|
|
2484
|
+
let r = Wt(n);
|
|
2485
2485
|
if (!Object.keys(r).length) return;
|
|
2486
2486
|
let i = {
|
|
2487
2487
|
...t(),
|
|
2488
2488
|
...r
|
|
2489
2489
|
};
|
|
2490
|
-
|
|
2491
|
-
for (let e of Object.keys(r))
|
|
2490
|
+
Jt(i), qt(i);
|
|
2491
|
+
for (let e of Object.keys(r)) Zt.add(e);
|
|
2492
2492
|
e(r);
|
|
2493
2493
|
},
|
|
2494
2494
|
hydrateFromParams: (t) => {
|
|
2495
2495
|
let n = {};
|
|
2496
|
-
for (let [e, r] of Object.entries(
|
|
2497
|
-
let r =
|
|
2498
|
-
Object.keys(r).length && (
|
|
2499
|
-
|
|
2496
|
+
for (let [e, r] of Object.entries(Yt)) Zt.has(r) || t[e] !== void 0 && (n[r] = t[e]);
|
|
2497
|
+
let r = Wt(n);
|
|
2498
|
+
Object.keys(r).length && (Jt({
|
|
2499
|
+
...$t.getState(),
|
|
2500
2500
|
...r
|
|
2501
2501
|
}), e(r));
|
|
2502
2502
|
}
|
|
2503
2503
|
}));
|
|
2504
2504
|
//#endregion
|
|
2505
2505
|
//#region src/lib/utils.ts
|
|
2506
|
-
function
|
|
2507
|
-
return
|
|
2506
|
+
function en(...e) {
|
|
2507
|
+
return W(ne(e));
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2509
|
+
function tn(e) {
|
|
2510
2510
|
return e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0;
|
|
2511
2511
|
}
|
|
2512
2512
|
//#endregion
|
|
2513
2513
|
//#region src/components/shared/DynamicIcon.tsx
|
|
2514
|
-
function
|
|
2515
|
-
return /* @__PURE__ */ V(
|
|
2514
|
+
function nn({ name: e, size: t, className: n, style: r }) {
|
|
2515
|
+
return /* @__PURE__ */ V(K[e] ?? K.folder, {
|
|
2516
2516
|
size: typeof t == "number" ? t : typeof t == "string" ? parseFloat(t) : void 0,
|
|
2517
2517
|
cls: n,
|
|
2518
2518
|
style: r
|
|
2519
2519
|
});
|
|
2520
2520
|
}
|
|
2521
2521
|
//#endregion
|
|
2522
|
-
//#region src/components/shared/Markdown.tsx
|
|
2523
|
-
var nn = M(() => import("./MarkdownRenderer-Dvo_0Zcx.js").then((e) => ({ default: e.MarkdownRenderer })));
|
|
2524
|
-
function rn() {
|
|
2525
|
-
return /* @__PURE__ */ V("div", { className: "h-4 w-2/3 rounded bg-muted animate-pulse" });
|
|
2526
|
-
}
|
|
2527
|
-
function an(e) {
|
|
2528
|
-
return /* @__PURE__ */ V(A, {
|
|
2529
|
-
fallback: /* @__PURE__ */ V(rn, {}),
|
|
2530
|
-
children: /* @__PURE__ */ V(nn, { ...e })
|
|
2531
|
-
});
|
|
2532
|
-
}
|
|
2533
|
-
//#endregion
|
|
2534
2522
|
//#region src/api/data.ts
|
|
2535
|
-
function
|
|
2523
|
+
function rn(e, t) {
|
|
2536
2524
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
2537
2525
|
if (t.page && n.searchParams.set("page", String(t.page)), t.per_page && n.searchParams.set("per_page", String(t.per_page)), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.expand) for (let e of t.expand) n.searchParams.append("expand", e);
|
|
2538
2526
|
return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), t.count && n.searchParams.set("count", t.count), n.pathname + n.search;
|
|
2539
2527
|
}
|
|
2540
|
-
async function
|
|
2541
|
-
return e(
|
|
2528
|
+
async function an(t, n = {}, r = {}) {
|
|
2529
|
+
return e(rn(t, n), { signal: r.signal });
|
|
2542
2530
|
}
|
|
2543
|
-
async function
|
|
2531
|
+
async function on(t, n) {
|
|
2544
2532
|
let r = new URLSearchParams();
|
|
2545
2533
|
if (typeof n == "string") r.set("id", n);
|
|
2546
2534
|
else for (let [e, t] of Object.entries(n)) r.set(e, t);
|
|
2547
2535
|
return e(`/api/data/${t}?${r.toString()}`);
|
|
2548
2536
|
}
|
|
2549
|
-
async function
|
|
2550
|
-
return { data: (await
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
}))[0] };
|
|
2554
|
-
}
|
|
2555
|
-
async function
|
|
2556
|
-
let r = typeof t == "string" ?
|
|
2557
|
-
return { data: ((await
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2537
|
+
async function sn(e, t) {
|
|
2538
|
+
return { data: ((await gn(`${e}.__create`, {
|
|
2539
|
+
entity: e,
|
|
2540
|
+
fields: t
|
|
2541
|
+
})).result?.rows ?? [])[0] };
|
|
2542
|
+
}
|
|
2543
|
+
async function cn(e, t, n) {
|
|
2544
|
+
let r = typeof t == "string" ? t : un(t);
|
|
2545
|
+
return { data: ((await gn(`${e}.__update`, {
|
|
2546
|
+
object_ids: [r],
|
|
2547
|
+
entity: e,
|
|
2548
|
+
fields: n
|
|
2549
|
+
})).result?.rows ?? [])[0] };
|
|
2550
|
+
}
|
|
2551
|
+
async function ln(e, t) {
|
|
2552
|
+
let n = typeof t == "string" ? t : un(t);
|
|
2553
|
+
await gn(`${e}.__delete`, {
|
|
2554
|
+
object_ids: [n],
|
|
2555
|
+
entity: e
|
|
2556
|
+
});
|
|
2565
2557
|
}
|
|
2566
|
-
function
|
|
2558
|
+
function un(e) {
|
|
2567
2559
|
let t = Object.values(e);
|
|
2568
2560
|
return t.length === 1 ? t[0] : t.join("");
|
|
2569
2561
|
}
|
|
2570
|
-
async function
|
|
2571
|
-
let
|
|
2572
|
-
await
|
|
2573
|
-
|
|
2574
|
-
|
|
2562
|
+
async function dn(e, t) {
|
|
2563
|
+
let n = typeof t == "string" ? t : un(t);
|
|
2564
|
+
await gn(`${e}.__restore`, {
|
|
2565
|
+
object_ids: [n],
|
|
2566
|
+
entity: e
|
|
2575
2567
|
});
|
|
2576
2568
|
}
|
|
2577
|
-
async function
|
|
2569
|
+
async function fn(e, t) {
|
|
2578
2570
|
let n = await S(`/api/data/${e}/export`, {
|
|
2579
2571
|
method: "POST",
|
|
2580
2572
|
body: JSON.stringify(t)
|
|
@@ -2584,7 +2576,7 @@ async function mn(e, t) {
|
|
|
2584
2576
|
filename: n.filename
|
|
2585
2577
|
};
|
|
2586
2578
|
}
|
|
2587
|
-
var
|
|
2579
|
+
var pn = class extends Error {
|
|
2588
2580
|
status;
|
|
2589
2581
|
response;
|
|
2590
2582
|
constructor(e, t) {
|
|
@@ -2592,55 +2584,68 @@ var hn = class extends Error {
|
|
|
2592
2584
|
super(n || "Action failed"), this.name = "ActionBatchError", this.status = e, this.response = t;
|
|
2593
2585
|
}
|
|
2594
2586
|
};
|
|
2595
|
-
function
|
|
2587
|
+
function mn(e) {
|
|
2596
2588
|
if (!e || typeof e != "object") return !1;
|
|
2597
2589
|
let t = e;
|
|
2598
2590
|
return typeof t.status == "string" && Array.isArray(t.errors);
|
|
2599
2591
|
}
|
|
2600
|
-
function
|
|
2592
|
+
function hn(e, t) {
|
|
2601
2593
|
let n = { ...e ?? {} };
|
|
2602
|
-
if ("
|
|
2603
|
-
|
|
2594
|
+
if ("object_ids" in n) throw Error("handler param \"object_ids\" collides with reserved key");
|
|
2595
|
+
if ("_ids" in n) throw Error("handler param \"_ids\" is a removed legacy key; use object_ids");
|
|
2596
|
+
return t !== void 0 && (n.object_ids = t), n;
|
|
2604
2597
|
}
|
|
2605
|
-
async function
|
|
2598
|
+
async function gn(t, n) {
|
|
2606
2599
|
try {
|
|
2607
2600
|
return await e(`/api/actions/${t}`, {
|
|
2608
2601
|
method: "POST",
|
|
2609
2602
|
body: JSON.stringify(n)
|
|
2610
2603
|
});
|
|
2611
2604
|
} catch (e) {
|
|
2612
|
-
throw e instanceof r &&
|
|
2605
|
+
throw e instanceof r && mn(e.raw) ? new pn(e.status, e.raw) : e;
|
|
2613
2606
|
}
|
|
2614
2607
|
}
|
|
2615
|
-
async function
|
|
2608
|
+
async function _n(t, n) {
|
|
2616
2609
|
let r = new URLSearchParams();
|
|
2617
2610
|
return r.set("ids", n.join(",")), e(`/api/associations/${t}?${r.toString()}`);
|
|
2618
2611
|
}
|
|
2619
2612
|
//#endregion
|
|
2613
|
+
//#region src/components/shared/Markdown.tsx
|
|
2614
|
+
var vn = M(() => import("./MarkdownRenderer-Dvo_0Zcx.js").then((e) => ({ default: e.MarkdownRenderer })));
|
|
2615
|
+
function yn() {
|
|
2616
|
+
return /* @__PURE__ */ V("div", { className: "h-4 w-2/3 rounded bg-muted animate-pulse" });
|
|
2617
|
+
}
|
|
2618
|
+
function bn(e) {
|
|
2619
|
+
return /* @__PURE__ */ V(A, {
|
|
2620
|
+
fallback: /* @__PURE__ */ V(yn, {}),
|
|
2621
|
+
children: /* @__PURE__ */ V(vn, { ...e })
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
//#endregion
|
|
2620
2625
|
//#region src/types/fieldType.ts
|
|
2621
|
-
var
|
|
2626
|
+
var xn = /* @__PURE__ */ "bool.bytes.date.decimal.email.enum.float.int.int_array.json.multilang.multilang_text.password.phone.ref.rich_text.secret.string.string_array.structure.tags.text.time.timestamp.url.uuid.uuid_array".split(".");
|
|
2622
2627
|
//#endregion
|
|
2623
2628
|
//#region src/components/shared/CopyButton.tsx
|
|
2624
|
-
function
|
|
2629
|
+
function Sn({ value: e, title: t, size: n = "icon" }) {
|
|
2625
2630
|
let [r, i] = R(!1), a = N(async (t) => {
|
|
2626
2631
|
t.stopPropagation(), t.preventDefault();
|
|
2627
2632
|
try {
|
|
2628
2633
|
await navigator.clipboard.writeText(e), i(!0), setTimeout(() => i(!1), 2e3);
|
|
2629
2634
|
} catch {}
|
|
2630
2635
|
}, [e]), o = n === "sm" ? 12 : 14;
|
|
2631
|
-
return /* @__PURE__ */ V(
|
|
2636
|
+
return /* @__PURE__ */ V(J, {
|
|
2632
2637
|
size: n === "sm" ? 22 : 28,
|
|
2633
|
-
icon: r ? /* @__PURE__ */ V(
|
|
2638
|
+
icon: r ? /* @__PURE__ */ V(K.check, {
|
|
2634
2639
|
size: o,
|
|
2635
2640
|
style: { color: "var(--success)" }
|
|
2636
|
-
}) : /* @__PURE__ */ V(
|
|
2641
|
+
}) : /* @__PURE__ */ V(K.copy, { size: o }),
|
|
2637
2642
|
onClick: a,
|
|
2638
2643
|
title: t ?? "Copy to clipboard"
|
|
2639
2644
|
});
|
|
2640
2645
|
}
|
|
2641
2646
|
//#endregion
|
|
2642
2647
|
//#region src/components/fields/StringField.tsx
|
|
2643
|
-
function
|
|
2648
|
+
function Cn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
2644
2649
|
if (r === "display") {
|
|
2645
2650
|
let t = String(n ?? "");
|
|
2646
2651
|
return e.copyable && t ? /* @__PURE__ */ H("span", {
|
|
@@ -2652,7 +2657,7 @@ function Sn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2652
2657
|
children: [/* @__PURE__ */ V("span", {
|
|
2653
2658
|
style: { fontSize: 12.5 },
|
|
2654
2659
|
children: t
|
|
2655
|
-
}), /* @__PURE__ */ V(
|
|
2660
|
+
}), /* @__PURE__ */ V(Sn, {
|
|
2656
2661
|
value: t,
|
|
2657
2662
|
size: "sm"
|
|
2658
2663
|
})]
|
|
@@ -2664,7 +2669,7 @@ function Sn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2664
2669
|
})
|
|
2665
2670
|
});
|
|
2666
2671
|
}
|
|
2667
|
-
return /* @__PURE__ */ V(
|
|
2672
|
+
return /* @__PURE__ */ V(X, {
|
|
2668
2673
|
id: a,
|
|
2669
2674
|
name: t,
|
|
2670
2675
|
"aria-required": e.required || void 0,
|
|
@@ -2674,7 +2679,7 @@ function Sn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2674
2679
|
}
|
|
2675
2680
|
//#endregion
|
|
2676
2681
|
//#region src/components/fields/TextField.tsx
|
|
2677
|
-
function
|
|
2682
|
+
function wn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, compact: o, fieldId: s }) {
|
|
2678
2683
|
let c = e.display?.widget;
|
|
2679
2684
|
if (r === "display") {
|
|
2680
2685
|
let t = String(n ?? "");
|
|
@@ -2685,7 +2690,7 @@ function Cn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
2685
2690
|
},
|
|
2686
2691
|
children: "—"
|
|
2687
2692
|
});
|
|
2688
|
-
let r = c === "markdown" ? /* @__PURE__ */ V(
|
|
2693
|
+
let r = c === "markdown" ? /* @__PURE__ */ V(bn, { content: t }) : c === "code" ? /* @__PURE__ */ V("pre", {
|
|
2689
2694
|
className: "mono",
|
|
2690
2695
|
style: {
|
|
2691
2696
|
fontSize: 12,
|
|
@@ -2717,14 +2722,14 @@ function Cn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
2717
2722
|
top: 0,
|
|
2718
2723
|
right: 0
|
|
2719
2724
|
},
|
|
2720
|
-
children: /* @__PURE__ */ V(
|
|
2725
|
+
children: /* @__PURE__ */ V(Sn, {
|
|
2721
2726
|
value: t,
|
|
2722
2727
|
size: "sm"
|
|
2723
2728
|
})
|
|
2724
2729
|
})]
|
|
2725
2730
|
}) : r;
|
|
2726
2731
|
}
|
|
2727
|
-
if (o) return /* @__PURE__ */ V(
|
|
2732
|
+
if (o) return /* @__PURE__ */ V(X, {
|
|
2728
2733
|
id: s,
|
|
2729
2734
|
name: t,
|
|
2730
2735
|
"aria-required": e.required || void 0,
|
|
@@ -2732,7 +2737,7 @@ function Cn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
2732
2737
|
onChange: (e) => i?.(e)
|
|
2733
2738
|
});
|
|
2734
2739
|
let l = c === "markdown" || c === "code" ? 10 : 4;
|
|
2735
|
-
return /* @__PURE__ */ V(
|
|
2740
|
+
return /* @__PURE__ */ V(Me, {
|
|
2736
2741
|
id: s,
|
|
2737
2742
|
name: t,
|
|
2738
2743
|
ariaRequired: e.required,
|
|
@@ -2744,13 +2749,13 @@ function Cn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
2744
2749
|
}
|
|
2745
2750
|
//#endregion
|
|
2746
2751
|
//#region src/components/fields/EnumField.tsx
|
|
2747
|
-
var
|
|
2748
|
-
function
|
|
2752
|
+
var Tn = "__declarion_enum_null__";
|
|
2753
|
+
function En({ field: e, value: t, mode: n, onChange: r, fieldId: i, labelId: a }) {
|
|
2749
2754
|
let o = e.values ?? [], s = o.find((e) => e.code === t);
|
|
2750
|
-
if (n === "display") return s ? /* @__PURE__ */ V(
|
|
2755
|
+
if (n === "display") return s ? /* @__PURE__ */ V(Y, {
|
|
2751
2756
|
tone: s.color ?? "slate",
|
|
2752
2757
|
size: "xs",
|
|
2753
|
-
children:
|
|
2758
|
+
children: Z(s.name)
|
|
2754
2759
|
}) : /* @__PURE__ */ V("span", {
|
|
2755
2760
|
style: {
|
|
2756
2761
|
fontSize: 12.5,
|
|
@@ -2758,27 +2763,27 @@ function Tn({ field: e, value: t, mode: n, onChange: r, fieldId: i, labelId: a }
|
|
|
2758
2763
|
},
|
|
2759
2764
|
children: "—"
|
|
2760
2765
|
});
|
|
2761
|
-
let c = !e.required, l = t != null && t !== "" ? String(t) :
|
|
2762
|
-
value:
|
|
2766
|
+
let c = !e.required, l = t != null && t !== "" ? String(t) : Tn, u = [...c ? [{
|
|
2767
|
+
value: Tn,
|
|
2763
2768
|
label: "— None —"
|
|
2764
2769
|
}] : [], ...o.map((e) => ({
|
|
2765
2770
|
value: e.code,
|
|
2766
|
-
label:
|
|
2771
|
+
label: Z(e.name) || e.code
|
|
2767
2772
|
}))];
|
|
2768
|
-
return /* @__PURE__ */ V(
|
|
2773
|
+
return /* @__PURE__ */ V(Ie, {
|
|
2769
2774
|
id: i,
|
|
2770
2775
|
"aria-labelledby": a,
|
|
2771
2776
|
"aria-required": e.required || void 0,
|
|
2772
2777
|
value: l,
|
|
2773
2778
|
options: u,
|
|
2774
|
-
onChange: (e) => r?.(e ===
|
|
2779
|
+
onChange: (e) => r?.(e === Tn ? null : e),
|
|
2775
2780
|
placeholder: "Select…"
|
|
2776
2781
|
});
|
|
2777
2782
|
}
|
|
2778
2783
|
//#endregion
|
|
2779
2784
|
//#region src/components/fields/EmailField.tsx
|
|
2780
|
-
function
|
|
2781
|
-
return /* @__PURE__ */ V(
|
|
2785
|
+
function Dn({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
2786
|
+
return /* @__PURE__ */ V(X, {
|
|
2782
2787
|
id: i,
|
|
2783
2788
|
name: t,
|
|
2784
2789
|
"aria-required": e.required || void 0,
|
|
@@ -2789,8 +2794,8 @@ function En({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
2789
2794
|
}
|
|
2790
2795
|
//#endregion
|
|
2791
2796
|
//#region src/components/fields/UrlField.tsx
|
|
2792
|
-
function
|
|
2793
|
-
return /* @__PURE__ */ V(
|
|
2797
|
+
function On({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
2798
|
+
return /* @__PURE__ */ V(X, {
|
|
2794
2799
|
id: i,
|
|
2795
2800
|
name: t,
|
|
2796
2801
|
"aria-required": e.required || void 0,
|
|
@@ -2802,8 +2807,8 @@ function Dn({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
2802
2807
|
}
|
|
2803
2808
|
//#endregion
|
|
2804
2809
|
//#region src/components/fields/PhoneField.tsx
|
|
2805
|
-
function
|
|
2806
|
-
return /* @__PURE__ */ V(
|
|
2810
|
+
function kn({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
2811
|
+
return /* @__PURE__ */ V(X, {
|
|
2807
2812
|
id: i,
|
|
2808
2813
|
name: t,
|
|
2809
2814
|
"aria-required": e.required || void 0,
|
|
@@ -2815,10 +2820,10 @@ function On({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
2815
2820
|
}
|
|
2816
2821
|
//#endregion
|
|
2817
2822
|
//#region src/lib/timestamp.ts
|
|
2818
|
-
function
|
|
2819
|
-
return
|
|
2823
|
+
function An(e = /* @__PURE__ */ new Date()) {
|
|
2824
|
+
return ae(e);
|
|
2820
2825
|
}
|
|
2821
|
-
function
|
|
2826
|
+
function jn(e) {
|
|
2822
2827
|
let t = e.match(/([+-]\d{2}:\d{2})$/), n = e.endsWith("Z");
|
|
2823
2828
|
if (t || n) {
|
|
2824
2829
|
let r = new Date(e);
|
|
@@ -2851,7 +2856,7 @@ function An(e) {
|
|
|
2851
2856
|
timeStyle: "short"
|
|
2852
2857
|
}).format(r);
|
|
2853
2858
|
}
|
|
2854
|
-
function
|
|
2859
|
+
function Mn(e, t = /* @__PURE__ */ new Date()) {
|
|
2855
2860
|
if (e == null || e === "") return {
|
|
2856
2861
|
text: "—",
|
|
2857
2862
|
absolute: ""
|
|
@@ -2864,18 +2869,18 @@ function jn(e, t = /* @__PURE__ */ new Date()) {
|
|
|
2864
2869
|
absolute: t
|
|
2865
2870
|
};
|
|
2866
2871
|
}
|
|
2867
|
-
let r =
|
|
2872
|
+
let r = jn(typeof e == "string" ? e : n.toISOString()), i = t.getTime() - n.getTime();
|
|
2868
2873
|
return Math.abs(i) > 720 * 60 * 60 * 1e3 ? {
|
|
2869
|
-
text:
|
|
2874
|
+
text: ae(n, { representation: "date" }),
|
|
2870
2875
|
absolute: r
|
|
2871
2876
|
} : {
|
|
2872
|
-
text:
|
|
2877
|
+
text: ie(n, { addSuffix: !0 }),
|
|
2873
2878
|
absolute: r
|
|
2874
2879
|
};
|
|
2875
2880
|
}
|
|
2876
2881
|
//#endregion
|
|
2877
2882
|
//#region src/components/fields/TimestampField.tsx
|
|
2878
|
-
function
|
|
2883
|
+
function Nn(e, t) {
|
|
2879
2884
|
if (t) {
|
|
2880
2885
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
2881
2886
|
return isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(void 0, {
|
|
@@ -2921,7 +2926,7 @@ function Mn(e, t) {
|
|
|
2921
2926
|
minute: "2-digit"
|
|
2922
2927
|
}).format(i);
|
|
2923
2928
|
}
|
|
2924
|
-
function
|
|
2929
|
+
function Pn(e, t) {
|
|
2925
2930
|
if (t) {
|
|
2926
2931
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
2927
2932
|
return isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(void 0, {
|
|
@@ -2939,14 +2944,14 @@ function Nn(e, t) {
|
|
|
2939
2944
|
minute: "2-digit"
|
|
2940
2945
|
}).format(n);
|
|
2941
2946
|
}
|
|
2942
|
-
function
|
|
2947
|
+
function Fn(e) {
|
|
2943
2948
|
if (e.endsWith("Z")) return "UTC";
|
|
2944
2949
|
let t = e.match(/([+-]\d{2}:\d{2})$/);
|
|
2945
2950
|
if (!t) return null;
|
|
2946
2951
|
let n = t[1].charAt(0), r = parseInt(t[1].substring(1, 3), 10), i = parseInt(t[1].substring(4, 6), 10);
|
|
2947
2952
|
return r === 0 && i === 0 ? "UTC" : `UTC${n}${r}${i > 0 ? `:${String(i).padStart(2, "0")}` : ""}`;
|
|
2948
2953
|
}
|
|
2949
|
-
function
|
|
2954
|
+
function In(e, t) {
|
|
2950
2955
|
let n = e.match(/([+-]\d{2}:\d{2})$/), r = e.endsWith("Z"), i = new Date(e);
|
|
2951
2956
|
if (isNaN(i.getTime())) return "";
|
|
2952
2957
|
if (r) {
|
|
@@ -2959,13 +2964,13 @@ function Fn(e, t) {
|
|
|
2959
2964
|
}
|
|
2960
2965
|
return t ? e.slice(0, 10) : e.slice(0, 16);
|
|
2961
2966
|
}
|
|
2962
|
-
function
|
|
2967
|
+
function Ln(e, t) {
|
|
2963
2968
|
let n = new Date(e);
|
|
2964
2969
|
if (isNaN(n.getTime())) return "";
|
|
2965
2970
|
let r = n.getFullYear(), i = String(n.getMonth() + 1).padStart(2, "0"), a = String(n.getDate()).padStart(2, "0");
|
|
2966
2971
|
return t ? `${r}-${i}-${a}` : `${r}-${i}-${a}T${String(n.getHours()).padStart(2, "0")}:${String(n.getMinutes()).padStart(2, "0")}`;
|
|
2967
2972
|
}
|
|
2968
|
-
function
|
|
2973
|
+
function Rn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
2969
2974
|
let o = e.type === "date", s = !!e.timezone;
|
|
2970
2975
|
if (r === "display") {
|
|
2971
2976
|
if (!n) return /* @__PURE__ */ V("span", {
|
|
@@ -2975,7 +2980,7 @@ function Ln({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2975
2980
|
},
|
|
2976
2981
|
children: "—"
|
|
2977
2982
|
});
|
|
2978
|
-
let e = String(n), t = s ?
|
|
2983
|
+
let e = String(n), t = s ? Nn(e, o) : Pn(e, o), r = s && !o ? Fn(e) : null;
|
|
2979
2984
|
return /* @__PURE__ */ H("span", {
|
|
2980
2985
|
style: { fontSize: 12.5 },
|
|
2981
2986
|
children: [t, r && /* @__PURE__ */ V("span", {
|
|
@@ -2987,8 +2992,8 @@ function Ln({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2987
2992
|
})]
|
|
2988
2993
|
});
|
|
2989
2994
|
}
|
|
2990
|
-
let c = n ? s ?
|
|
2991
|
-
return /* @__PURE__ */ V(
|
|
2995
|
+
let c = n ? s ? In(String(n), o) : Ln(String(n), o) : "";
|
|
2996
|
+
return /* @__PURE__ */ V(X, {
|
|
2992
2997
|
id: a,
|
|
2993
2998
|
name: t,
|
|
2994
2999
|
"aria-required": e.required || void 0,
|
|
@@ -3008,13 +3013,13 @@ function Ln({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3008
3013
|
i?.(e);
|
|
3009
3014
|
return;
|
|
3010
3015
|
}
|
|
3011
|
-
i?.(
|
|
3016
|
+
i?.(An(t));
|
|
3012
3017
|
}
|
|
3013
3018
|
});
|
|
3014
3019
|
}
|
|
3015
3020
|
//#endregion
|
|
3016
3021
|
//#region src/components/fields/BoolField.tsx
|
|
3017
|
-
function
|
|
3022
|
+
function zn({ value: e, mode: t, onChange: n, fieldId: r, labelId: i }) {
|
|
3018
3023
|
let a = !!e;
|
|
3019
3024
|
return t === "display" ? /* @__PURE__ */ H("span", {
|
|
3020
3025
|
style: {
|
|
@@ -3030,7 +3035,7 @@ function Rn({ value: e, mode: t, onChange: n, fieldId: r, labelId: i }) {
|
|
|
3030
3035
|
borderRadius: 999,
|
|
3031
3036
|
background: a ? "var(--success)" : "var(--text-4)"
|
|
3032
3037
|
} }), a ? "Yes" : "No"]
|
|
3033
|
-
}) : /* @__PURE__ */ V(
|
|
3038
|
+
}) : /* @__PURE__ */ V(Te, {
|
|
3034
3039
|
id: r,
|
|
3035
3040
|
ariaLabelledby: i,
|
|
3036
3041
|
value: a,
|
|
@@ -3039,7 +3044,7 @@ function Rn({ value: e, mode: t, onChange: n, fieldId: r, labelId: i }) {
|
|
|
3039
3044
|
}
|
|
3040
3045
|
//#endregion
|
|
3041
3046
|
//#region src/components/fields/NumberField.tsx
|
|
3042
|
-
function
|
|
3047
|
+
function Bn(e) {
|
|
3043
3048
|
let t = e.trim();
|
|
3044
3049
|
if (t === "" || t === "-") return t;
|
|
3045
3050
|
let n = t.startsWith("-"), [r, i] = (n ? t.slice(1) : t).split("."), a;
|
|
@@ -3051,8 +3056,8 @@ function zn(e) {
|
|
|
3051
3056
|
let o = n ? `-${a}` : a;
|
|
3052
3057
|
return i !== void 0 && (o += `.${i}`), o;
|
|
3053
3058
|
}
|
|
3054
|
-
var
|
|
3055
|
-
function
|
|
3059
|
+
var Vn = new Intl.NumberFormat();
|
|
3060
|
+
function Hn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3056
3061
|
let s = e.display?.widget === "money", c = e.type === "decimal" || s, l = a?.$units?.[t], u = !l && e.unit ? e.unit.display || e.unit.storage : void 0, d = l || (u && !u.startsWith("$") ? u : void 0);
|
|
3057
3062
|
if (r === "display") {
|
|
3058
3063
|
if (n == null) return /* @__PURE__ */ V("span", {
|
|
@@ -3063,10 +3068,10 @@ function Vn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3063
3068
|
children: "—"
|
|
3064
3069
|
});
|
|
3065
3070
|
let e;
|
|
3066
|
-
if (c && typeof n == "string") e =
|
|
3071
|
+
if (c && typeof n == "string") e = Bn(n);
|
|
3067
3072
|
else {
|
|
3068
3073
|
let t = Number(n);
|
|
3069
|
-
e = isNaN(t) ? null :
|
|
3074
|
+
e = isNaN(t) ? null : Vn.format(t);
|
|
3070
3075
|
}
|
|
3071
3076
|
return e == null ? /* @__PURE__ */ V("span", {
|
|
3072
3077
|
style: { fontSize: 12.5 },
|
|
@@ -3086,7 +3091,7 @@ function Vn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3086
3091
|
})]
|
|
3087
3092
|
});
|
|
3088
3093
|
}
|
|
3089
|
-
return c ? /* @__PURE__ */ V(
|
|
3094
|
+
return c ? /* @__PURE__ */ V(X, {
|
|
3090
3095
|
id: o,
|
|
3091
3096
|
name: t,
|
|
3092
3097
|
"aria-required": e.required || void 0,
|
|
@@ -3097,7 +3102,7 @@ function Vn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3097
3102
|
onChange: (e) => {
|
|
3098
3103
|
e === "" ? i?.(null) : i?.(e);
|
|
3099
3104
|
}
|
|
3100
|
-
}) : /* @__PURE__ */ V(
|
|
3105
|
+
}) : /* @__PURE__ */ V(X, {
|
|
3101
3106
|
id: o,
|
|
3102
3107
|
name: t,
|
|
3103
3108
|
"aria-required": e.required || void 0,
|
|
@@ -3111,7 +3116,7 @@ function Vn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3111
3116
|
}
|
|
3112
3117
|
//#endregion
|
|
3113
3118
|
//#region src/hooks/useEntityData.ts
|
|
3114
|
-
function
|
|
3119
|
+
function Un(e, t) {
|
|
3115
3120
|
let n = {
|
|
3116
3121
|
...t,
|
|
3117
3122
|
count: "window"
|
|
@@ -3122,12 +3127,12 @@ function Hn(e, t) {
|
|
|
3122
3127
|
e,
|
|
3123
3128
|
n
|
|
3124
3129
|
],
|
|
3125
|
-
queryFn: ({ signal: t }) =>
|
|
3130
|
+
queryFn: ({ signal: t }) => an(e, n, { signal: t }),
|
|
3126
3131
|
enabled: !!e,
|
|
3127
3132
|
placeholderData: (t, n) => n?.queryKey?.[1] === e ? t : void 0
|
|
3128
3133
|
});
|
|
3129
3134
|
}
|
|
3130
|
-
function
|
|
3135
|
+
function Wn(e, t) {
|
|
3131
3136
|
let n = {
|
|
3132
3137
|
...t,
|
|
3133
3138
|
count: "only",
|
|
@@ -3143,7 +3148,7 @@ function Un(e, t) {
|
|
|
3143
3148
|
e,
|
|
3144
3149
|
n
|
|
3145
3150
|
],
|
|
3146
|
-
queryFn: ({ signal: t }) =>
|
|
3151
|
+
queryFn: ({ signal: t }) => an(e, n, { signal: t }),
|
|
3147
3152
|
enabled: !!e,
|
|
3148
3153
|
retry: 1,
|
|
3149
3154
|
staleTime: 3e4,
|
|
@@ -3152,14 +3157,14 @@ function Un(e, t) {
|
|
|
3152
3157
|
}
|
|
3153
3158
|
//#endregion
|
|
3154
3159
|
//#region src/hooks/useEntity.ts
|
|
3155
|
-
function
|
|
3156
|
-
let { data: t } =
|
|
3160
|
+
function Gn(e) {
|
|
3161
|
+
let { data: t } = Nt();
|
|
3157
3162
|
if (!(!t || !e)) return t.entities[e];
|
|
3158
3163
|
}
|
|
3159
3164
|
//#endregion
|
|
3160
3165
|
//#region src/components/fields/RefField.tsx
|
|
3161
|
-
function
|
|
3162
|
-
let s = e.ref?.entity, c =
|
|
3166
|
+
function Kn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, labelId: o }) {
|
|
3167
|
+
let s = e.ref?.entity, c = Gn(s), l = e.display?.ref_display_field ?? e.ref?.display?.field ?? c?.display?.display_field, u = I(() => c ? [...c.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [c]), { data: d, isLoading: f } = Un(n === "edit" ? s : void 0, {
|
|
3163
3168
|
per_page: 200,
|
|
3164
3169
|
sort: l ? `${l}:asc` : void 0
|
|
3165
3170
|
}), p = I(() => d?.data ?? [], [d?.data]), m = I(() => {
|
|
@@ -3169,12 +3174,12 @@ function Gn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, lab
|
|
|
3169
3174
|
let t = i[s];
|
|
3170
3175
|
if (t) {
|
|
3171
3176
|
let n = t[e];
|
|
3172
|
-
if (n) return
|
|
3177
|
+
if (n) return Xe(n, l, e);
|
|
3173
3178
|
}
|
|
3174
3179
|
}
|
|
3175
3180
|
if (p.length > 0) {
|
|
3176
3181
|
let n = p.find((t) => String(t[u]) === e);
|
|
3177
|
-
if (n) return
|
|
3182
|
+
if (n) return Xe(n, l, String(t));
|
|
3178
3183
|
}
|
|
3179
3184
|
return e;
|
|
3180
3185
|
}, [
|
|
@@ -3206,11 +3211,11 @@ function Gn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, lab
|
|
|
3206
3211
|
let t = String(e[u]);
|
|
3207
3212
|
return {
|
|
3208
3213
|
value: t,
|
|
3209
|
-
label:
|
|
3214
|
+
label: Xe(e, l, t)
|
|
3210
3215
|
};
|
|
3211
3216
|
})
|
|
3212
3217
|
];
|
|
3213
|
-
return /* @__PURE__ */ V(
|
|
3218
|
+
return /* @__PURE__ */ V(Ie, {
|
|
3214
3219
|
id: a,
|
|
3215
3220
|
"aria-labelledby": o,
|
|
3216
3221
|
"aria-required": e.required || void 0,
|
|
@@ -3222,29 +3227,29 @@ function Gn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, lab
|
|
|
3222
3227
|
}
|
|
3223
3228
|
//#endregion
|
|
3224
3229
|
//#region src/components/fields/JsonField.tsx
|
|
3225
|
-
var
|
|
3226
|
-
function
|
|
3230
|
+
var qn = M(() => import("./JsonEditor-KelPV-OQ.js").then((e) => ({ default: e.JsonEditor })));
|
|
3231
|
+
function Jn() {
|
|
3227
3232
|
return /* @__PURE__ */ V("div", { className: "h-20 rounded-md border border-border bg-muted animate-pulse" });
|
|
3228
3233
|
}
|
|
3229
|
-
function
|
|
3234
|
+
function Yn(e) {
|
|
3230
3235
|
return e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
3231
3236
|
}
|
|
3232
|
-
function
|
|
3233
|
-
return t === "display" ?
|
|
3237
|
+
function Xn({ value: e, mode: t, onChange: n, fieldId: r }) {
|
|
3238
|
+
return t === "display" ? Yn(e) ? /* @__PURE__ */ V("span", {
|
|
3234
3239
|
style: {
|
|
3235
3240
|
fontSize: 12.5,
|
|
3236
3241
|
color: "var(--text-4)"
|
|
3237
3242
|
},
|
|
3238
3243
|
children: "—"
|
|
3239
3244
|
}) : /* @__PURE__ */ V(A, {
|
|
3240
|
-
fallback: /* @__PURE__ */ V(
|
|
3241
|
-
children: /* @__PURE__ */ V(
|
|
3245
|
+
fallback: /* @__PURE__ */ V(Jn, {}),
|
|
3246
|
+
children: /* @__PURE__ */ V(qn, {
|
|
3242
3247
|
value: e,
|
|
3243
3248
|
readOnly: !0
|
|
3244
3249
|
})
|
|
3245
3250
|
}) : /* @__PURE__ */ V(A, {
|
|
3246
|
-
fallback: /* @__PURE__ */ V(
|
|
3247
|
-
children: /* @__PURE__ */ V(
|
|
3251
|
+
fallback: /* @__PURE__ */ V(Jn, {}),
|
|
3252
|
+
children: /* @__PURE__ */ V(qn, {
|
|
3248
3253
|
value: e,
|
|
3249
3254
|
onChange: n,
|
|
3250
3255
|
id: r
|
|
@@ -3253,14 +3258,14 @@ function Yn({ value: e, mode: t, onChange: n, fieldId: r }) {
|
|
|
3253
3258
|
}
|
|
3254
3259
|
//#endregion
|
|
3255
3260
|
//#region src/components/fields/MultilangField.tsx
|
|
3256
|
-
function
|
|
3261
|
+
function Zn(e) {
|
|
3257
3262
|
return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
|
|
3258
3263
|
}
|
|
3259
|
-
function
|
|
3260
|
-
let { data: o } =
|
|
3264
|
+
function Qn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3265
|
+
let { data: o } = Nt(), s = o?.languages?.length ? o.languages : [{
|
|
3261
3266
|
code: "en",
|
|
3262
3267
|
name: { en: "English" }
|
|
3263
|
-
}], c =
|
|
3268
|
+
}], c = Zn(n);
|
|
3264
3269
|
if (r === "display") return /* @__PURE__ */ V("span", {
|
|
3265
3270
|
style: { fontSize: 12.5 },
|
|
3266
3271
|
children: Object.values(c)[0] ?? "—"
|
|
@@ -3301,7 +3306,7 @@ function Zn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3301
3306
|
children: n.code
|
|
3302
3307
|
}), /* @__PURE__ */ V("div", {
|
|
3303
3308
|
style: { flex: 1 },
|
|
3304
|
-
children: /* @__PURE__ */ V(
|
|
3309
|
+
children: /* @__PURE__ */ V(X, {
|
|
3305
3310
|
id: i,
|
|
3306
3311
|
name: t ? `${t}.${n.code}` : void 0,
|
|
3307
3312
|
"aria-required": e.required && r === 0 ? !0 : void 0,
|
|
@@ -3316,14 +3321,14 @@ function Zn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3316
3321
|
}
|
|
3317
3322
|
//#endregion
|
|
3318
3323
|
//#region src/components/fields/MultilangTextField.tsx
|
|
3319
|
-
function
|
|
3324
|
+
function $n(e) {
|
|
3320
3325
|
return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
|
|
3321
3326
|
}
|
|
3322
|
-
function
|
|
3323
|
-
let { data: o } =
|
|
3327
|
+
function er({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3328
|
+
let { data: o } = Nt(), s = o?.languages?.length ? o.languages : [{
|
|
3324
3329
|
code: "en",
|
|
3325
3330
|
name: { en: "English" }
|
|
3326
|
-
}], c =
|
|
3331
|
+
}], c = $n(n);
|
|
3327
3332
|
if (r === "display") return /* @__PURE__ */ V("p", {
|
|
3328
3333
|
style: {
|
|
3329
3334
|
fontSize: 12.5,
|
|
@@ -3364,7 +3369,7 @@ function $n({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3364
3369
|
fontWeight: 500
|
|
3365
3370
|
},
|
|
3366
3371
|
children: n.code
|
|
3367
|
-
}), /* @__PURE__ */ V(
|
|
3372
|
+
}), /* @__PURE__ */ V(Me, {
|
|
3368
3373
|
id: i,
|
|
3369
3374
|
name: t ? `${t}.${n.code}` : void 0,
|
|
3370
3375
|
ariaRequired: e.required && r === 0,
|
|
@@ -3379,25 +3384,25 @@ function $n({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3379
3384
|
}
|
|
3380
3385
|
//#endregion
|
|
3381
3386
|
//#region src/components/fields/StructureField.tsx
|
|
3382
|
-
function
|
|
3383
|
-
let { field: t, value: n, mode: r, onChange: i, locale: a, fieldId: o } = e, { data: s } =
|
|
3384
|
-
return c ? t.array ? /* @__PURE__ */ V(
|
|
3387
|
+
function tr(e) {
|
|
3388
|
+
let { field: t, value: n, mode: r, onChange: i, locale: a, fieldId: o } = e, { data: s } = Nt(), c = t.structure ? s?.structures?.[t.structure] : void 0;
|
|
3389
|
+
return c ? t.array ? /* @__PURE__ */ V(rr, {
|
|
3385
3390
|
structDef: c,
|
|
3386
3391
|
value: n,
|
|
3387
3392
|
mode: r,
|
|
3388
3393
|
onChange: i,
|
|
3389
3394
|
locale: a,
|
|
3390
3395
|
fieldId: o
|
|
3391
|
-
}) : /* @__PURE__ */ V(
|
|
3396
|
+
}) : /* @__PURE__ */ V(nr, {
|
|
3392
3397
|
structDef: c,
|
|
3393
3398
|
value: n,
|
|
3394
3399
|
mode: r,
|
|
3395
3400
|
onChange: i,
|
|
3396
3401
|
locale: a,
|
|
3397
3402
|
fieldId: o
|
|
3398
|
-
}) : /* @__PURE__ */ V(
|
|
3403
|
+
}) : /* @__PURE__ */ V(Xn, { ...e });
|
|
3399
3404
|
}
|
|
3400
|
-
function
|
|
3405
|
+
function nr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
|
|
3401
3406
|
let o = typeof t == "object" && t && !Array.isArray(t) ? t : {}, s = e.fields.names(), c = {
|
|
3402
3407
|
display: "flex",
|
|
3403
3408
|
flexDirection: "column",
|
|
@@ -3427,13 +3432,13 @@ function tr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3427
3432
|
minWidth: 100,
|
|
3428
3433
|
flexShrink: 0
|
|
3429
3434
|
},
|
|
3430
|
-
children: n.display ?
|
|
3435
|
+
children: n.display ? Z(n.display.name) : t
|
|
3431
3436
|
}), /* @__PURE__ */ V("div", {
|
|
3432
3437
|
style: {
|
|
3433
3438
|
minWidth: 0,
|
|
3434
3439
|
flex: 1
|
|
3435
3440
|
},
|
|
3436
|
-
children: n.type === "structure" && n.structure ? /* @__PURE__ */ V(
|
|
3441
|
+
children: n.type === "structure" && n.structure ? /* @__PURE__ */ V(tr, {
|
|
3437
3442
|
field: n,
|
|
3438
3443
|
fieldName: t,
|
|
3439
3444
|
value: r,
|
|
@@ -3474,10 +3479,10 @@ function tr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3474
3479
|
flexDirection: "column",
|
|
3475
3480
|
gap: 2
|
|
3476
3481
|
},
|
|
3477
|
-
children: [/* @__PURE__ */ V(
|
|
3482
|
+
children: [/* @__PURE__ */ V(Ae, {
|
|
3478
3483
|
required: n.required,
|
|
3479
|
-
children: n.display ?
|
|
3480
|
-
}), n.type === "structure" && n.structure ? /* @__PURE__ */ V(
|
|
3484
|
+
children: n.display ? Z(n.display.name) : t
|
|
3485
|
+
}), n.type === "structure" && n.structure ? /* @__PURE__ */ V(tr, {
|
|
3481
3486
|
field: n,
|
|
3482
3487
|
fieldName: t,
|
|
3483
3488
|
value: o[t],
|
|
@@ -3496,7 +3501,7 @@ function tr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3496
3501
|
})
|
|
3497
3502
|
});
|
|
3498
3503
|
}
|
|
3499
|
-
function
|
|
3504
|
+
function rr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
|
|
3500
3505
|
let o = Array.isArray(t) ? t : [];
|
|
3501
3506
|
if (n === "display") return o.length === 0 ? /* @__PURE__ */ V("span", {
|
|
3502
3507
|
style: {
|
|
@@ -3510,7 +3515,7 @@ function nr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3510
3515
|
flexDirection: "column",
|
|
3511
3516
|
gap: 8
|
|
3512
3517
|
},
|
|
3513
|
-
children: o.map((t, n) => /* @__PURE__ */ V(
|
|
3518
|
+
children: o.map((t, n) => /* @__PURE__ */ V(nr, {
|
|
3514
3519
|
structDef: e,
|
|
3515
3520
|
value: t,
|
|
3516
3521
|
mode: "display",
|
|
@@ -3536,7 +3541,7 @@ function nr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3536
3541
|
role: "group",
|
|
3537
3542
|
children: [o.map((t, n) => /* @__PURE__ */ H("div", {
|
|
3538
3543
|
style: { position: "relative" },
|
|
3539
|
-
children: [/* @__PURE__ */ V(
|
|
3544
|
+
children: [/* @__PURE__ */ V(nr, {
|
|
3540
3545
|
structDef: e,
|
|
3541
3546
|
value: t,
|
|
3542
3547
|
mode: "edit",
|
|
@@ -3548,15 +3553,15 @@ function nr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3548
3553
|
top: 6,
|
|
3549
3554
|
right: 6
|
|
3550
3555
|
},
|
|
3551
|
-
children: /* @__PURE__ */ V(
|
|
3556
|
+
children: /* @__PURE__ */ V(J, {
|
|
3552
3557
|
size: 24,
|
|
3553
|
-
icon: /* @__PURE__ */ V(
|
|
3558
|
+
icon: /* @__PURE__ */ V(K.trash, { size: 12 }),
|
|
3554
3559
|
onClick: l(n),
|
|
3555
3560
|
title: "Remove"
|
|
3556
3561
|
})
|
|
3557
3562
|
})]
|
|
3558
|
-
}, n)), /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(
|
|
3559
|
-
icon: /* @__PURE__ */ V(
|
|
3563
|
+
}, n)), /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(q, {
|
|
3564
|
+
icon: /* @__PURE__ */ V(K.plus, { size: 13 }),
|
|
3560
3565
|
onClick: c,
|
|
3561
3566
|
children: "Add"
|
|
3562
3567
|
}) })]
|
|
@@ -3564,16 +3569,16 @@ function nr({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3564
3569
|
}
|
|
3565
3570
|
//#endregion
|
|
3566
3571
|
//#region src/components/fields/SecretField.tsx
|
|
3567
|
-
var
|
|
3568
|
-
function
|
|
3569
|
-
let [s, c] = R(""), l = a !== void 0, u = n ===
|
|
3572
|
+
var ir = "[SET]";
|
|
3573
|
+
function ar({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3574
|
+
let [s, c] = R(""), l = a !== void 0, u = n === ir || typeof n == "string" && n !== "";
|
|
3570
3575
|
return r === "display" ? u ? /* @__PURE__ */ V("span", {
|
|
3571
3576
|
className: "mono",
|
|
3572
3577
|
style: {
|
|
3573
3578
|
fontSize: 12.5,
|
|
3574
3579
|
color: "var(--text-3)"
|
|
3575
3580
|
},
|
|
3576
|
-
children:
|
|
3581
|
+
children: ir
|
|
3577
3582
|
}) : /* @__PURE__ */ V("span", {
|
|
3578
3583
|
style: {
|
|
3579
3584
|
fontSize: 12.5,
|
|
@@ -3581,29 +3586,29 @@ function ir({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3581
3586
|
fontStyle: "italic"
|
|
3582
3587
|
},
|
|
3583
3588
|
children: "Not set"
|
|
3584
|
-
}) : /* @__PURE__ */ V(
|
|
3589
|
+
}) : /* @__PURE__ */ V(Ve, {
|
|
3585
3590
|
id: o,
|
|
3586
3591
|
name: t,
|
|
3587
3592
|
ariaRequired: e.required,
|
|
3588
3593
|
value: s,
|
|
3589
3594
|
onChange: (e) => {
|
|
3590
|
-
c(e), l && e === "" ? i?.(u ?
|
|
3595
|
+
c(e), l && e === "" ? i?.(u ? ir : "") : i?.(e);
|
|
3591
3596
|
},
|
|
3592
3597
|
placeholder: l ? "Leave blank to keep existing value" : "Enter value"
|
|
3593
3598
|
});
|
|
3594
3599
|
}
|
|
3595
3600
|
//#endregion
|
|
3596
3601
|
//#region src/components/fields/PasswordField.tsx
|
|
3597
|
-
var
|
|
3598
|
-
function
|
|
3599
|
-
let [s, c] = R(""), l = a !== void 0, u = n ===
|
|
3602
|
+
var or = "[SET]";
|
|
3603
|
+
function sr({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3604
|
+
let [s, c] = R(""), l = a !== void 0, u = n === or || typeof n == "string" && n !== "";
|
|
3600
3605
|
return r === "display" ? u ? /* @__PURE__ */ V("span", {
|
|
3601
3606
|
className: "mono",
|
|
3602
3607
|
style: {
|
|
3603
3608
|
fontSize: 12.5,
|
|
3604
3609
|
color: "var(--text-3)"
|
|
3605
3610
|
},
|
|
3606
|
-
children:
|
|
3611
|
+
children: or
|
|
3607
3612
|
}) : /* @__PURE__ */ V("span", {
|
|
3608
3613
|
style: {
|
|
3609
3614
|
fontSize: 12.5,
|
|
@@ -3611,24 +3616,24 @@ function or({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3611
3616
|
fontStyle: "italic"
|
|
3612
3617
|
},
|
|
3613
3618
|
children: "Not set"
|
|
3614
|
-
}) : /* @__PURE__ */ V(
|
|
3619
|
+
}) : /* @__PURE__ */ V(Ve, {
|
|
3615
3620
|
id: o,
|
|
3616
3621
|
name: t,
|
|
3617
3622
|
ariaRequired: e.required,
|
|
3618
3623
|
value: s,
|
|
3619
3624
|
onChange: (e) => {
|
|
3620
|
-
c(e), l && e === "" ? i?.(u ?
|
|
3625
|
+
c(e), l && e === "" ? i?.(u ? or : "") : i?.(e);
|
|
3621
3626
|
},
|
|
3622
3627
|
placeholder: l ? "Leave blank to keep existing value" : "Enter password"
|
|
3623
3628
|
});
|
|
3624
3629
|
}
|
|
3625
3630
|
//#endregion
|
|
3626
3631
|
//#region src/components/fields/StringArrayField.tsx
|
|
3627
|
-
function
|
|
3632
|
+
function cr(e) {
|
|
3628
3633
|
return Array.isArray(e) ? e.filter((e) => e != null).map(String) : [];
|
|
3629
3634
|
}
|
|
3630
|
-
function
|
|
3631
|
-
let o =
|
|
3635
|
+
function lr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3636
|
+
let o = cr(n), [s, c] = R("");
|
|
3632
3637
|
if (r === "display") return o.length === 0 ? /* @__PURE__ */ V("span", {
|
|
3633
3638
|
style: {
|
|
3634
3639
|
fontSize: 12.5,
|
|
@@ -3641,7 +3646,7 @@ function cr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3641
3646
|
flexWrap: "wrap",
|
|
3642
3647
|
gap: 4
|
|
3643
3648
|
},
|
|
3644
|
-
children: o.map((e, t) => /* @__PURE__ */ V(
|
|
3649
|
+
children: o.map((e, t) => /* @__PURE__ */ V(ve, {
|
|
3645
3650
|
tone: "slate",
|
|
3646
3651
|
children: e
|
|
3647
3652
|
}, t))
|
|
@@ -3664,7 +3669,7 @@ function cr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3664
3669
|
flexWrap: "wrap",
|
|
3665
3670
|
gap: 4
|
|
3666
3671
|
},
|
|
3667
|
-
children: o.map((e, t) => /* @__PURE__ */ V(
|
|
3672
|
+
children: o.map((e, t) => /* @__PURE__ */ V(ve, {
|
|
3668
3673
|
tone: "slate",
|
|
3669
3674
|
onRemove: () => u(t),
|
|
3670
3675
|
children: e
|
|
@@ -3676,7 +3681,7 @@ function cr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3676
3681
|
},
|
|
3677
3682
|
children: [/* @__PURE__ */ V("div", {
|
|
3678
3683
|
style: { flex: 1 },
|
|
3679
|
-
children: /* @__PURE__ */ V(
|
|
3684
|
+
children: /* @__PURE__ */ V(X, {
|
|
3680
3685
|
id: a,
|
|
3681
3686
|
name: t,
|
|
3682
3687
|
"aria-required": e.required || void 0,
|
|
@@ -3687,8 +3692,8 @@ function cr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3687
3692
|
},
|
|
3688
3693
|
placeholder: "Add item…"
|
|
3689
3694
|
})
|
|
3690
|
-
}), /* @__PURE__ */ V(
|
|
3691
|
-
icon: /* @__PURE__ */ V(
|
|
3695
|
+
}), /* @__PURE__ */ V(q, {
|
|
3696
|
+
icon: /* @__PURE__ */ V(K.plus, { size: 13 }),
|
|
3692
3697
|
onClick: l,
|
|
3693
3698
|
children: "Add"
|
|
3694
3699
|
})]
|
|
@@ -3697,11 +3702,11 @@ function cr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3697
3702
|
}
|
|
3698
3703
|
//#endregion
|
|
3699
3704
|
//#region src/components/fields/IntArrayField.tsx
|
|
3700
|
-
function
|
|
3705
|
+
function ur(e) {
|
|
3701
3706
|
return Array.isArray(e) ? e.filter((e) => e != null).map(Number).filter((e) => !isNaN(e)) : [];
|
|
3702
3707
|
}
|
|
3703
|
-
function
|
|
3704
|
-
let o =
|
|
3708
|
+
function dr({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3709
|
+
let o = ur(n), [s, c] = R("");
|
|
3705
3710
|
if (r === "display") return o.length === 0 ? /* @__PURE__ */ V("span", {
|
|
3706
3711
|
style: {
|
|
3707
3712
|
fontSize: 12.5,
|
|
@@ -3714,7 +3719,7 @@ function ur({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3714
3719
|
flexWrap: "wrap",
|
|
3715
3720
|
gap: 4
|
|
3716
3721
|
},
|
|
3717
|
-
children: o.map((e, t) => /* @__PURE__ */ V(
|
|
3722
|
+
children: o.map((e, t) => /* @__PURE__ */ V(ve, {
|
|
3718
3723
|
tone: "slate",
|
|
3719
3724
|
children: e
|
|
3720
3725
|
}, t))
|
|
@@ -3739,7 +3744,7 @@ function ur({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3739
3744
|
flexWrap: "wrap",
|
|
3740
3745
|
gap: 4
|
|
3741
3746
|
},
|
|
3742
|
-
children: o.map((e, t) => /* @__PURE__ */ V(
|
|
3747
|
+
children: o.map((e, t) => /* @__PURE__ */ V(ve, {
|
|
3743
3748
|
tone: "slate",
|
|
3744
3749
|
onRemove: () => u(t),
|
|
3745
3750
|
children: e
|
|
@@ -3751,7 +3756,7 @@ function ur({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3751
3756
|
},
|
|
3752
3757
|
children: [/* @__PURE__ */ V("div", {
|
|
3753
3758
|
style: { flex: 1 },
|
|
3754
|
-
children: /* @__PURE__ */ V(
|
|
3759
|
+
children: /* @__PURE__ */ V(X, {
|
|
3755
3760
|
id: a,
|
|
3756
3761
|
name: t,
|
|
3757
3762
|
"aria-required": e.required || void 0,
|
|
@@ -3763,8 +3768,8 @@ function ur({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3763
3768
|
},
|
|
3764
3769
|
placeholder: "Add number…"
|
|
3765
3770
|
})
|
|
3766
|
-
}), /* @__PURE__ */ V(
|
|
3767
|
-
icon: /* @__PURE__ */ V(
|
|
3771
|
+
}), /* @__PURE__ */ V(q, {
|
|
3772
|
+
icon: /* @__PURE__ */ V(K.plus, { size: 13 }),
|
|
3768
3773
|
onClick: l,
|
|
3769
3774
|
children: "Add"
|
|
3770
3775
|
})]
|
|
@@ -3773,15 +3778,15 @@ function ur({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3773
3778
|
}
|
|
3774
3779
|
//#endregion
|
|
3775
3780
|
//#region src/components/file-widgets/registry.ts
|
|
3776
|
-
var
|
|
3777
|
-
function
|
|
3778
|
-
|
|
3781
|
+
var fr = /* @__PURE__ */ new Map();
|
|
3782
|
+
function Q(e, t) {
|
|
3783
|
+
fr.set(e, t);
|
|
3779
3784
|
}
|
|
3780
3785
|
function pr(e) {
|
|
3781
|
-
return
|
|
3786
|
+
return fr.get(e);
|
|
3782
3787
|
}
|
|
3783
3788
|
function mr(e) {
|
|
3784
|
-
return
|
|
3789
|
+
return fr.has(e);
|
|
3785
3790
|
}
|
|
3786
3791
|
//#endregion
|
|
3787
3792
|
//#region src/components/file-widgets/cropper.ts
|
|
@@ -3805,16 +3810,16 @@ function br(e) {
|
|
|
3805
3810
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
|
|
3806
3811
|
}
|
|
3807
3812
|
function xr(e) {
|
|
3808
|
-
let { field: t, fieldName: n, value: r, onChange: o, mode: s, alt: f, disabled: p, visual: _, uploadFieldCode: v, uploadSlotCode: y } = e, S = h(r), [C, w] = R("idle"), [T, E] = R(null), [D, O] = R(null), [k, A] = R(null), [j, M] = R(!1), F = L(null), z = L(!1), B = L(null), { register:
|
|
3813
|
+
let { field: t, fieldName: n, value: r, onChange: o, mode: s, alt: f, disabled: p, visual: _, uploadFieldCode: v, uploadSlotCode: y } = e, S = h(r), [C, w] = R("idle"), [T, E] = R(null), [D, O] = R(null), [k, A] = R(null), [j, M] = R(!1), F = L(null), z = L(!1), B = L(null), { register: te, unregister: U, isDraft: ne } = g();
|
|
3809
3814
|
P(() => () => {
|
|
3810
3815
|
F.current && F.current.abort();
|
|
3811
3816
|
}, []);
|
|
3812
|
-
let
|
|
3817
|
+
let W = I(() => u(S, f, t.display?.placeholder || n), [
|
|
3813
3818
|
f,
|
|
3814
3819
|
t.display?.placeholder,
|
|
3815
3820
|
n,
|
|
3816
3821
|
S
|
|
3817
|
-
]),
|
|
3822
|
+
]), re = (t.accepts ?? ["image/*"]).join(","), ie = N(async (r) => {
|
|
3818
3823
|
let s = ee(r, t.accepts, t.max_size_bytes);
|
|
3819
3824
|
if (s) {
|
|
3820
3825
|
O(s), w("error");
|
|
@@ -3851,10 +3856,10 @@ function xr(e) {
|
|
|
3851
3856
|
onProgress: E
|
|
3852
3857
|
});
|
|
3853
3858
|
if (z.current) {
|
|
3854
|
-
x(r.id).catch(() => {}),
|
|
3859
|
+
x(r.id).catch(() => {}), U(r.id);
|
|
3855
3860
|
return;
|
|
3856
3861
|
}
|
|
3857
|
-
S &&
|
|
3862
|
+
S && ne(S.id) && (x(S.id).catch(() => {}), U(S.id)), te(r.id, () => x(r.id)), A(r.id), w("idle"), E(null);
|
|
3858
3863
|
let i = {
|
|
3859
3864
|
id: r.id,
|
|
3860
3865
|
filename: r.filename,
|
|
@@ -3886,48 +3891,48 @@ function xr(e) {
|
|
|
3886
3891
|
n,
|
|
3887
3892
|
o,
|
|
3888
3893
|
e.entityCode,
|
|
3889
|
-
U,
|
|
3890
3894
|
te,
|
|
3895
|
+
ne,
|
|
3891
3896
|
S,
|
|
3892
|
-
|
|
3897
|
+
U,
|
|
3893
3898
|
v,
|
|
3894
3899
|
y
|
|
3895
|
-
]),
|
|
3896
|
-
C === "uploading" && F.current && (z.current = !0, F.current.abort(), F.current = null, w("idle"), E(null)), k && (x(k).catch(() => {}),
|
|
3900
|
+
]), ae = N(() => {
|
|
3901
|
+
C === "uploading" && F.current && (z.current = !0, F.current.abort(), F.current = null, w("idle"), E(null)), k && (x(k).catch(() => {}), U(k), A(null));
|
|
3897
3902
|
}, [
|
|
3898
3903
|
C,
|
|
3899
3904
|
k,
|
|
3900
|
-
|
|
3901
|
-
]),
|
|
3902
|
-
S &&
|
|
3905
|
+
U
|
|
3906
|
+
]), oe = N(() => {
|
|
3907
|
+
S && ne(S.id) && (x(S.id).catch(() => {}), U(S.id), A(null)), o?.(t.mode === "array" ? [] : null);
|
|
3903
3908
|
}, [
|
|
3904
3909
|
S,
|
|
3905
3910
|
t.mode,
|
|
3906
|
-
|
|
3911
|
+
ne,
|
|
3907
3912
|
o,
|
|
3908
|
-
|
|
3909
|
-
]),
|
|
3913
|
+
U
|
|
3914
|
+
]), G = N(() => {
|
|
3910
3915
|
O(null), w("idle"), B.current?.click();
|
|
3911
|
-
}, []),
|
|
3916
|
+
}, []), K = N(() => {
|
|
3912
3917
|
p || B.current?.click();
|
|
3913
|
-
}, [p]),
|
|
3914
|
-
p || (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
3915
|
-
}, [p,
|
|
3918
|
+
}, [p]), q = N((e) => {
|
|
3919
|
+
p || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), K());
|
|
3920
|
+
}, [p, K]), J = N((e) => {
|
|
3916
3921
|
p || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
|
|
3917
|
-
}, [p]),
|
|
3922
|
+
}, [p]), Y = N((e) => {
|
|
3918
3923
|
if (p) return;
|
|
3919
3924
|
e.preventDefault();
|
|
3920
3925
|
let t = e.dataTransfer.files?.[0];
|
|
3921
|
-
t &&
|
|
3922
|
-
}, [p,
|
|
3926
|
+
t && ie(t);
|
|
3927
|
+
}, [p, ie]), se = N((e) => {
|
|
3923
3928
|
let t = e.target.files?.[0];
|
|
3924
|
-
e.target.value = "", t &&
|
|
3925
|
-
}, [
|
|
3926
|
-
aspectRatio:
|
|
3929
|
+
e.target.value = "", t && ie(t);
|
|
3930
|
+
}, [ie]), ce = _.aspectRatio ?? wr(_.shape, t.display?.aspect_ratio), le = m(S), ue = {
|
|
3931
|
+
aspectRatio: ce,
|
|
3927
3932
|
width: _.width ?? (_.shape === "wide" ? "100%" : "120px")
|
|
3928
|
-
},
|
|
3933
|
+
}, de = !!S, fe = yr(S, t.display?.listable_thumbnail), pe = c(S, t.display?.listable_thumbnail), me = d(S?.id, pe, fe), he = s === "display", ge = N((e) => {
|
|
3929
3934
|
e.stopPropagation(), M((e) => !e);
|
|
3930
|
-
}, []),
|
|
3935
|
+
}, []), _e = N((e) => {
|
|
3931
3936
|
if (!S || !j) return;
|
|
3932
3937
|
let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, i = n.height > 0 ? (e.clientY - n.top) / n.height : .5, a = l(S, {
|
|
3933
3938
|
x: Math.max(0, Math.min(1, r)),
|
|
@@ -3940,54 +3945,54 @@ function xr(e) {
|
|
|
3940
3945
|
j,
|
|
3941
3946
|
o
|
|
3942
3947
|
]);
|
|
3943
|
-
return
|
|
3948
|
+
return he ? /* @__PURE__ */ V("div", {
|
|
3944
3949
|
className: Sr(_.shape, !1),
|
|
3945
|
-
style:
|
|
3946
|
-
"aria-label":
|
|
3947
|
-
children:
|
|
3948
|
-
src:
|
|
3949
|
-
alt:
|
|
3950
|
+
style: ue,
|
|
3951
|
+
"aria-label": W,
|
|
3952
|
+
children: de && me ? /* @__PURE__ */ V("img", {
|
|
3953
|
+
src: me,
|
|
3954
|
+
alt: W,
|
|
3950
3955
|
className: Cr(_.shape),
|
|
3951
|
-
style: { objectPosition: b(
|
|
3956
|
+
style: { objectPosition: b(le) },
|
|
3952
3957
|
loading: "lazy"
|
|
3953
3958
|
}) : /* @__PURE__ */ V(Er, {
|
|
3954
3959
|
shape: _.shape,
|
|
3955
|
-
label:
|
|
3960
|
+
label: W,
|
|
3956
3961
|
placeholder: t.display?.placeholder
|
|
3957
3962
|
})
|
|
3958
3963
|
}) : /* @__PURE__ */ H("div", {
|
|
3959
3964
|
className: Sr(_.shape, !p),
|
|
3960
|
-
style:
|
|
3965
|
+
style: ue,
|
|
3961
3966
|
tabIndex: p ? -1 : 0,
|
|
3962
3967
|
role: "button",
|
|
3963
|
-
"aria-label":
|
|
3968
|
+
"aria-label": W,
|
|
3964
3969
|
"aria-disabled": p || void 0,
|
|
3965
3970
|
"aria-busy": C === "uploading" || void 0,
|
|
3966
3971
|
"aria-invalid": C === "error" || void 0,
|
|
3967
|
-
onClick: C === "idle" && !
|
|
3968
|
-
onMouseDown: j ?
|
|
3969
|
-
onKeyDown:
|
|
3970
|
-
onDragOver:
|
|
3971
|
-
onDrop:
|
|
3972
|
+
onClick: C === "idle" && !de ? K : void 0,
|
|
3973
|
+
onMouseDown: j ? _e : void 0,
|
|
3974
|
+
onKeyDown: q,
|
|
3975
|
+
onDragOver: J,
|
|
3976
|
+
onDrop: Y,
|
|
3972
3977
|
"data-testid": j ? "focal-point-target" : `file-widget-${n}`,
|
|
3973
3978
|
children: [
|
|
3974
3979
|
/* @__PURE__ */ V("input", {
|
|
3975
3980
|
ref: B,
|
|
3976
3981
|
type: "file",
|
|
3977
|
-
accept:
|
|
3978
|
-
onChange:
|
|
3982
|
+
accept: re,
|
|
3983
|
+
onChange: se,
|
|
3979
3984
|
style: { display: "none" },
|
|
3980
3985
|
"data-testid": `file-input-${n}`
|
|
3981
3986
|
}),
|
|
3982
|
-
|
|
3983
|
-
src:
|
|
3984
|
-
alt:
|
|
3987
|
+
de && me ? /* @__PURE__ */ V("img", {
|
|
3988
|
+
src: me,
|
|
3989
|
+
alt: W,
|
|
3985
3990
|
className: Cr(_.shape),
|
|
3986
|
-
style: { objectPosition: b(
|
|
3991
|
+
style: { objectPosition: b(le) },
|
|
3987
3992
|
loading: "lazy"
|
|
3988
3993
|
}) : C === "uploading" ? null : /* @__PURE__ */ V(Er, {
|
|
3989
3994
|
shape: _.shape,
|
|
3990
|
-
label:
|
|
3995
|
+
label: W,
|
|
3991
3996
|
placeholder: t.display?.placeholder
|
|
3992
3997
|
}),
|
|
3993
3998
|
C === "uploading" && /* @__PURE__ */ V(Dr, { pct: T?.pct ?? 0 }),
|
|
@@ -3996,13 +4001,13 @@ function xr(e) {
|
|
|
3996
4001
|
"aria-hidden": "true",
|
|
3997
4002
|
"data-testid": "draft-indicator"
|
|
3998
4003
|
}),
|
|
3999
|
-
|
|
4004
|
+
de && C === "idle" && !p && /* @__PURE__ */ H("div", {
|
|
4000
4005
|
className: "absolute inset-0 flex items-center justify-center gap-2 bg-black/40 opacity-0 transition-opacity hover:opacity-100 focus-within:opacity-100",
|
|
4001
4006
|
children: [
|
|
4002
4007
|
t.display?.focal_point && /* @__PURE__ */ V("button", {
|
|
4003
4008
|
type: "button",
|
|
4004
4009
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
4005
|
-
onClick:
|
|
4010
|
+
onClick: ge,
|
|
4006
4011
|
"data-testid": "focal-point-toggle",
|
|
4007
4012
|
children: j ? "Cancel focus" : "Set focus"
|
|
4008
4013
|
}),
|
|
@@ -4010,7 +4015,7 @@ function xr(e) {
|
|
|
4010
4015
|
type: "button",
|
|
4011
4016
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
4012
4017
|
onClick: (e) => {
|
|
4013
|
-
e.stopPropagation(),
|
|
4018
|
+
e.stopPropagation(), K();
|
|
4014
4019
|
},
|
|
4015
4020
|
children: "Change"
|
|
4016
4021
|
}),
|
|
@@ -4018,17 +4023,17 @@ function xr(e) {
|
|
|
4018
4023
|
type: "button",
|
|
4019
4024
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-destructive hover:bg-surface-2",
|
|
4020
4025
|
onClick: (e) => {
|
|
4021
|
-
e.stopPropagation(),
|
|
4026
|
+
e.stopPropagation(), oe();
|
|
4022
4027
|
},
|
|
4023
4028
|
children: "Remove"
|
|
4024
4029
|
})
|
|
4025
4030
|
]
|
|
4026
4031
|
}),
|
|
4027
|
-
|
|
4032
|
+
le && de && /* @__PURE__ */ V("span", {
|
|
4028
4033
|
className: "absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full border border-white bg-black/70",
|
|
4029
4034
|
style: {
|
|
4030
|
-
left: `${
|
|
4031
|
-
top: `${
|
|
4035
|
+
left: `${le.x * 100}%`,
|
|
4036
|
+
top: `${le.y * 100}%`
|
|
4032
4037
|
},
|
|
4033
4038
|
"data-testid": "focal-point-marker"
|
|
4034
4039
|
}),
|
|
@@ -4036,7 +4041,7 @@ function xr(e) {
|
|
|
4036
4041
|
type: "button",
|
|
4037
4042
|
className: "absolute bottom-1 right-1 rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
|
|
4038
4043
|
onClick: (e) => {
|
|
4039
|
-
e.stopPropagation(),
|
|
4044
|
+
e.stopPropagation(), ae();
|
|
4040
4045
|
},
|
|
4041
4046
|
"data-testid": "cancel-upload",
|
|
4042
4047
|
children: "Cancel"
|
|
@@ -4052,7 +4057,7 @@ function xr(e) {
|
|
|
4052
4057
|
type: "button",
|
|
4053
4058
|
className: "underline",
|
|
4054
4059
|
onClick: (e) => {
|
|
4055
|
-
e.stopPropagation(),
|
|
4060
|
+
e.stopPropagation(), G();
|
|
4056
4061
|
},
|
|
4057
4062
|
"data-testid": "retry-upload",
|
|
4058
4063
|
children: "Retry"
|
|
@@ -4183,13 +4188,13 @@ function Pr({ contentType: e }) {
|
|
|
4183
4188
|
});
|
|
4184
4189
|
}
|
|
4185
4190
|
function Fr(e) {
|
|
4186
|
-
let { field: t, fieldName: n, value: r, onChange: s, mode: c, disabled: l, uploadFieldCode: u, uploadSlotCode: d } = e, f = h(r), [m, y] = R("idle"), [b, S] = R(null), [w, T] = R(null), [E, D] = R(!1), [O, k] = R(f?.filename ?? ""), A = L(null), j = L(!1), M = L(null), { register: F, unregister: I, isDraft: z } = g(), { open:
|
|
4191
|
+
let { field: t, fieldName: n, value: r, onChange: s, mode: c, disabled: l, uploadFieldCode: u, uploadSlotCode: d } = e, f = h(r), [m, y] = R("idle"), [b, S] = R(null), [w, T] = R(null), [E, D] = R(!1), [O, k] = R(f?.filename ?? ""), A = L(null), j = L(!1), M = L(null), { register: F, unregister: I, isDraft: z } = g(), { open: te } = v();
|
|
4187
4192
|
P(() => () => {
|
|
4188
4193
|
A.current && A.current.abort();
|
|
4189
4194
|
}, []), P(() => {
|
|
4190
4195
|
k(f?.filename ?? "");
|
|
4191
4196
|
}, [f?.filename]);
|
|
4192
|
-
let
|
|
4197
|
+
let U = (t.accepts ?? []).join(","), ne = N(async (r) => {
|
|
4193
4198
|
let o = ee(r, t.accepts, t.max_size_bytes);
|
|
4194
4199
|
if (o) {
|
|
4195
4200
|
T(o), y("error");
|
|
@@ -4251,12 +4256,12 @@ function Fr(e) {
|
|
|
4251
4256
|
I,
|
|
4252
4257
|
u,
|
|
4253
4258
|
d
|
|
4254
|
-
]),
|
|
4259
|
+
]), W = N(() => {
|
|
4255
4260
|
l || M.current?.click();
|
|
4256
|
-
}, [l]),
|
|
4261
|
+
}, [l]), re = N((e) => {
|
|
4257
4262
|
let t = e.target.files?.[0];
|
|
4258
|
-
e.target.value = "", t &&
|
|
4259
|
-
}, [
|
|
4263
|
+
e.target.value = "", t && ne(t);
|
|
4264
|
+
}, [ne]), ie = N(() => {
|
|
4260
4265
|
f && z(f.id) && (x(f.id).catch(() => {}), I(f.id)), s?.(t.mode === "array" ? [] : null);
|
|
4261
4266
|
}, [
|
|
4262
4267
|
f,
|
|
@@ -4264,13 +4269,13 @@ function Fr(e) {
|
|
|
4264
4269
|
z,
|
|
4265
4270
|
s,
|
|
4266
4271
|
I
|
|
4267
|
-
]),
|
|
4272
|
+
]), ae = N(() => {
|
|
4268
4273
|
m === "uploading" && A.current && (j.current = !0, A.current.abort(), A.current = null, y("idle"), S(null));
|
|
4269
|
-
}, [m]),
|
|
4270
|
-
f &&
|
|
4271
|
-
}, [f,
|
|
4272
|
-
!f || !o(f) ||
|
|
4273
|
-
}, [f,
|
|
4274
|
+
}, [m]), oe = N(() => {
|
|
4275
|
+
f && te(f.id, "download", p(f));
|
|
4276
|
+
}, [f, te]), G = f ? o(f) : !1, K = N(() => {
|
|
4277
|
+
!f || !o(f) || te(f.id, "preview", _(f));
|
|
4278
|
+
}, [f, te]), q = N(() => {
|
|
4274
4279
|
if (!f) {
|
|
4275
4280
|
D(!1);
|
|
4276
4281
|
return;
|
|
@@ -4290,7 +4295,7 @@ function Fr(e) {
|
|
|
4290
4295
|
f,
|
|
4291
4296
|
s,
|
|
4292
4297
|
t.mode
|
|
4293
|
-
]),
|
|
4298
|
+
]), J = c === "display";
|
|
4294
4299
|
return !f && m !== "uploading" ? /* @__PURE__ */ H("div", {
|
|
4295
4300
|
"data-testid": `file-widget-${n}`,
|
|
4296
4301
|
className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
|
|
@@ -4301,20 +4306,20 @@ function Fr(e) {
|
|
|
4301
4306
|
children: [/* @__PURE__ */ V("span", {
|
|
4302
4307
|
className: "text-sm text-foreground",
|
|
4303
4308
|
children: t.display?.placeholder || "No document attached"
|
|
4304
|
-
}), !
|
|
4309
|
+
}), !J && /* @__PURE__ */ V("button", {
|
|
4305
4310
|
type: "button",
|
|
4306
4311
|
className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
4307
|
-
onClick:
|
|
4312
|
+
onClick: W,
|
|
4308
4313
|
disabled: l,
|
|
4309
4314
|
"data-testid": "upload",
|
|
4310
4315
|
children: "Upload"
|
|
4311
4316
|
})]
|
|
4312
4317
|
}),
|
|
4313
|
-
!
|
|
4318
|
+
!J && /* @__PURE__ */ V("input", {
|
|
4314
4319
|
ref: M,
|
|
4315
4320
|
type: "file",
|
|
4316
|
-
accept:
|
|
4317
|
-
onChange:
|
|
4321
|
+
accept: U || void 0,
|
|
4322
|
+
onChange: re,
|
|
4318
4323
|
style: { display: "none" },
|
|
4319
4324
|
"data-testid": `file-input-${n}`
|
|
4320
4325
|
}),
|
|
@@ -4340,16 +4345,16 @@ function Fr(e) {
|
|
|
4340
4345
|
value: O,
|
|
4341
4346
|
autoFocus: !0,
|
|
4342
4347
|
onChange: (e) => k(e.target.value),
|
|
4343
|
-
onBlur:
|
|
4348
|
+
onBlur: q,
|
|
4344
4349
|
onKeyDown: (e) => {
|
|
4345
|
-
e.key === "Enter" ?
|
|
4350
|
+
e.key === "Enter" ? q() : e.key === "Escape" && (D(!1), k(f.filename));
|
|
4346
4351
|
},
|
|
4347
4352
|
"data-testid": "filename-input"
|
|
4348
4353
|
}) : /* @__PURE__ */ V("button", {
|
|
4349
4354
|
type: "button",
|
|
4350
4355
|
className: "truncate text-left text-sm font-medium text-foreground hover:underline",
|
|
4351
|
-
onClick: () => !
|
|
4352
|
-
disabled:
|
|
4356
|
+
onClick: () => !J && f && D(!0),
|
|
4357
|
+
disabled: J || l || !f,
|
|
4353
4358
|
title: f?.filename,
|
|
4354
4359
|
"data-testid": "filename",
|
|
4355
4360
|
children: f?.filename ?? "Uploading…"
|
|
@@ -4393,30 +4398,30 @@ function Fr(e) {
|
|
|
4393
4398
|
/* @__PURE__ */ V("button", {
|
|
4394
4399
|
type: "button",
|
|
4395
4400
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
4396
|
-
onClick:
|
|
4401
|
+
onClick: oe,
|
|
4397
4402
|
"data-testid": "download",
|
|
4398
4403
|
children: "Download"
|
|
4399
4404
|
}),
|
|
4400
4405
|
/* @__PURE__ */ V("button", {
|
|
4401
4406
|
type: "button",
|
|
4402
4407
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4403
|
-
onClick:
|
|
4404
|
-
disabled: !
|
|
4405
|
-
title:
|
|
4408
|
+
onClick: K,
|
|
4409
|
+
disabled: !G,
|
|
4410
|
+
title: G ? void 0 : "Preview is available only for images and PDFs",
|
|
4406
4411
|
"data-testid": "preview",
|
|
4407
4412
|
children: "Preview"
|
|
4408
4413
|
}),
|
|
4409
|
-
!
|
|
4414
|
+
!J && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("button", {
|
|
4410
4415
|
type: "button",
|
|
4411
4416
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
4412
|
-
onClick:
|
|
4417
|
+
onClick: W,
|
|
4413
4418
|
disabled: l,
|
|
4414
4419
|
"data-testid": "replace",
|
|
4415
4420
|
children: "Replace"
|
|
4416
4421
|
}), /* @__PURE__ */ V("button", {
|
|
4417
4422
|
type: "button",
|
|
4418
4423
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-destructive hover:bg-surface-2",
|
|
4419
|
-
onClick:
|
|
4424
|
+
onClick: ie,
|
|
4420
4425
|
disabled: l,
|
|
4421
4426
|
"data-testid": "remove",
|
|
4422
4427
|
children: "Remove"
|
|
@@ -4424,16 +4429,16 @@ function Fr(e) {
|
|
|
4424
4429
|
] }), m === "uploading" && /* @__PURE__ */ V("button", {
|
|
4425
4430
|
type: "button",
|
|
4426
4431
|
className: "rounded-sm border border-border bg-card px-2 py-1 text-xs",
|
|
4427
|
-
onClick:
|
|
4432
|
+
onClick: ae,
|
|
4428
4433
|
"data-testid": "cancel-upload",
|
|
4429
4434
|
children: "Cancel"
|
|
4430
4435
|
})]
|
|
4431
4436
|
}),
|
|
4432
|
-
!
|
|
4437
|
+
!J && /* @__PURE__ */ V("input", {
|
|
4433
4438
|
ref: M,
|
|
4434
4439
|
type: "file",
|
|
4435
|
-
accept:
|
|
4436
|
-
onChange:
|
|
4440
|
+
accept: U || void 0,
|
|
4441
|
+
onChange: re,
|
|
4437
4442
|
style: { display: "none" },
|
|
4438
4443
|
"data-testid": `file-input-${n}`
|
|
4439
4444
|
})
|
|
@@ -4743,7 +4748,7 @@ function Ur(e) {
|
|
|
4743
4748
|
//#region src/components/file-widgets/builtins.ts
|
|
4744
4749
|
var Wr = !1;
|
|
4745
4750
|
function Gr() {
|
|
4746
|
-
Wr ||= (
|
|
4751
|
+
Wr ||= (Q("square_image", Or), Q("circle_image", kr), Q("wide_banner", Ar), Q("grid", Nr), Q("document_card", Fr), Q("file_list", Rr), Q("labeled_slots", Ur), !0);
|
|
4747
4752
|
}
|
|
4748
4753
|
//#endregion
|
|
4749
4754
|
//#region src/components/file-widgets/host.tsx
|
|
@@ -4767,7 +4772,7 @@ function Xr(e, t, n) {
|
|
|
4767
4772
|
let r = Kr(e, t);
|
|
4768
4773
|
if (r) return r.name || t;
|
|
4769
4774
|
let i = e.fields.get(t);
|
|
4770
|
-
return i ?
|
|
4775
|
+
return i ? et(i, t, n) : t;
|
|
4771
4776
|
}
|
|
4772
4777
|
function Zr(e) {
|
|
4773
4778
|
let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, navigate: f, locale: p, fieldId: m, labelId: h } = e, g = Kr(t, r);
|
|
@@ -4965,7 +4970,7 @@ function ci(e) {
|
|
|
4965
4970
|
}
|
|
4966
4971
|
}
|
|
4967
4972
|
};
|
|
4968
|
-
return s === "display" ? j ? /* @__PURE__ */ V(
|
|
4973
|
+
return s === "display" ? j ? /* @__PURE__ */ V(bn, {
|
|
4969
4974
|
content: j,
|
|
4970
4975
|
files: A.files
|
|
4971
4976
|
}) : /* @__PURE__ */ V("span", {
|
|
@@ -4974,7 +4979,7 @@ function ci(e) {
|
|
|
4974
4979
|
color: "var(--text-4)"
|
|
4975
4980
|
},
|
|
4976
4981
|
children: "—"
|
|
4977
|
-
}) : u ? /* @__PURE__ */ V(
|
|
4982
|
+
}) : u ? /* @__PURE__ */ V(X, {
|
|
4978
4983
|
id: d,
|
|
4979
4984
|
name: r,
|
|
4980
4985
|
"aria-required": t.required || void 0,
|
|
@@ -4995,10 +5000,10 @@ function ci(e) {
|
|
|
4995
5000
|
flexWrap: "wrap"
|
|
4996
5001
|
},
|
|
4997
5002
|
children: [
|
|
4998
|
-
/* @__PURE__ */ V(
|
|
5003
|
+
/* @__PURE__ */ V(q, {
|
|
4999
5004
|
kind: "ghost",
|
|
5000
5005
|
size: "xs",
|
|
5001
|
-
icon: V(_ > 0 ?
|
|
5006
|
+
icon: V(_ > 0 ? Oe : K.plus, { size: 12 }),
|
|
5002
5007
|
onClick: () => p.current?.click(),
|
|
5003
5008
|
disabled: !n || !t.files || _ > 0,
|
|
5004
5009
|
children: _ > 0 ? "Uploading…" : "Insert file"
|
|
@@ -5080,7 +5085,7 @@ function ci(e) {
|
|
|
5080
5085
|
marginBottom: 8
|
|
5081
5086
|
},
|
|
5082
5087
|
children: "Preview"
|
|
5083
|
-
}), j ? /* @__PURE__ */ V(
|
|
5088
|
+
}), j ? /* @__PURE__ */ V(bn, {
|
|
5084
5089
|
content: j,
|
|
5085
5090
|
files: A.files
|
|
5086
5091
|
}) : /* @__PURE__ */ V("span", {
|
|
@@ -5125,7 +5130,7 @@ var di = () => (e) => {
|
|
|
5125
5130
|
return (e) => {
|
|
5126
5131
|
if (e == null) return "—";
|
|
5127
5132
|
let t = !!e;
|
|
5128
|
-
return /* @__PURE__ */ V(
|
|
5133
|
+
return /* @__PURE__ */ V(Y, {
|
|
5129
5134
|
tone: t ? "emerald" : "slate",
|
|
5130
5135
|
size: "xs",
|
|
5131
5136
|
children: t ? i.trueLabel : i.falseLabel
|
|
@@ -5134,10 +5139,10 @@ var di = () => (e) => {
|
|
|
5134
5139
|
};
|
|
5135
5140
|
function pi(e, t, n) {
|
|
5136
5141
|
if (e.display?.bool_labels) return {
|
|
5137
|
-
trueLabel:
|
|
5138
|
-
falseLabel:
|
|
5142
|
+
trueLabel: Z(e.display.bool_labels.true, n) || "Yes",
|
|
5143
|
+
falseLabel: Z(e.display.bool_labels.false, n) || "No"
|
|
5139
5144
|
};
|
|
5140
|
-
let r = e.display?.name ?
|
|
5145
|
+
let r = e.display?.name ? Z(e.display.name, n) : "";
|
|
5141
5146
|
if (r.startsWith("Is ")) {
|
|
5142
5147
|
let e = r.slice(3).trim();
|
|
5143
5148
|
return {
|
|
@@ -5193,10 +5198,10 @@ var _i = (e) => {
|
|
|
5193
5198
|
let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
5194
5199
|
if (t.values) for (let e of t.values) r.set(e.code, {
|
|
5195
5200
|
tone: gi(e.color),
|
|
5196
|
-
label:
|
|
5201
|
+
label: Z(e.name, n) || e.code
|
|
5197
5202
|
});
|
|
5198
5203
|
if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) {
|
|
5199
|
-
let t = r.get(e), a = i.color ? gi(i.color) : t?.tone ?? "slate", o = (i.label ?
|
|
5204
|
+
let t = r.get(e), a = i.color ? gi(i.color) : t?.tone ?? "slate", o = (i.label ? Z(i.label, n) : "") || t?.label || e;
|
|
5200
5205
|
r.set(e, {
|
|
5201
5206
|
tone: a,
|
|
5202
5207
|
label: o
|
|
@@ -5205,7 +5210,7 @@ var _i = (e) => {
|
|
|
5205
5210
|
return (e) => {
|
|
5206
5211
|
if (e == null || e === "") return "—";
|
|
5207
5212
|
let t = String(e), n = r.get(t);
|
|
5208
|
-
return /* @__PURE__ */ V(
|
|
5213
|
+
return /* @__PURE__ */ V(Y, {
|
|
5209
5214
|
tone: n?.tone ?? "slate",
|
|
5210
5215
|
size: "xs",
|
|
5211
5216
|
children: n?.label ?? t
|
|
@@ -5228,12 +5233,12 @@ var bi = (e) => {
|
|
|
5228
5233
|
let { entity: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
5229
5234
|
if (t?.status_groups) for (let e of Object.values(t.status_groups)) for (let t of e.statuses) r.set(t.code, {
|
|
5230
5235
|
tone: yi(t.color),
|
|
5231
|
-
label:
|
|
5236
|
+
label: Z(t.name, n) || t.code
|
|
5232
5237
|
});
|
|
5233
5238
|
return (e) => {
|
|
5234
5239
|
if (e == null || e === "") return "—";
|
|
5235
5240
|
let t = String(e), n = r.get(t);
|
|
5236
|
-
return /* @__PURE__ */ V(
|
|
5241
|
+
return /* @__PURE__ */ V(Y, {
|
|
5237
5242
|
tone: n?.tone ?? "slate",
|
|
5238
5243
|
size: "xs",
|
|
5239
5244
|
children: n?.label ?? t
|
|
@@ -5255,7 +5260,7 @@ function Si(e) {
|
|
|
5255
5260
|
var Ci = (e) => {
|
|
5256
5261
|
let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
5257
5262
|
if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) r.set(e, {
|
|
5258
|
-
label: i.label &&
|
|
5263
|
+
label: i.label && Z(i.label, n) || e,
|
|
5259
5264
|
tone: Si(i.color)
|
|
5260
5265
|
});
|
|
5261
5266
|
return (e) => !Array.isArray(e) || e.length === 0 ? "—" : /* @__PURE__ */ V("span", {
|
|
@@ -5266,41 +5271,41 @@ var Ci = (e) => {
|
|
|
5266
5271
|
},
|
|
5267
5272
|
children: e.map((e, t) => {
|
|
5268
5273
|
let n = String(e), i = r.get(n);
|
|
5269
|
-
return i?.tone ? /* @__PURE__ */ V(
|
|
5274
|
+
return i?.tone ? /* @__PURE__ */ V(Y, {
|
|
5270
5275
|
tone: i.tone,
|
|
5271
5276
|
size: "xs",
|
|
5272
5277
|
children: i.label
|
|
5273
|
-
}, `${n}-${t}`) : /* @__PURE__ */ V(
|
|
5278
|
+
}, `${n}-${t}`) : /* @__PURE__ */ V(ve, { children: i?.label ?? n }, `${n}-${t}`);
|
|
5274
5279
|
})
|
|
5275
5280
|
});
|
|
5276
5281
|
}, wi = () => (e) => {
|
|
5277
5282
|
if (e == null || e === "") return "—";
|
|
5278
|
-
let { text: t, absolute: n } =
|
|
5283
|
+
let { text: t, absolute: n } = Mn(typeof e == "string" ? e : String(e));
|
|
5279
5284
|
return /* @__PURE__ */ V("span", {
|
|
5280
5285
|
title: n,
|
|
5281
5286
|
children: t
|
|
5282
5287
|
});
|
|
5283
|
-
}, Ti = () => (e) => e == null || e === "" ? "—" :
|
|
5288
|
+
}, Ti = () => (e) => e == null || e === "" ? "—" : jn(typeof e == "string" ? e : String(e)), Ei = 60 * 1e3, Di = 300 * 1e3, Oi = () => (e) => {
|
|
5284
5289
|
if (e == null || e === "") return "—";
|
|
5285
5290
|
let t = typeof e == "string" ? e : String(e), n = new Date(t);
|
|
5286
5291
|
if (isNaN(n.getTime())) return t;
|
|
5287
|
-
let r =
|
|
5292
|
+
let r = jn(t), i = Date.now() - n.getTime();
|
|
5288
5293
|
if (i <= 0) return /* @__PURE__ */ H("span", {
|
|
5289
5294
|
title: r,
|
|
5290
|
-
children: ["in ",
|
|
5295
|
+
children: ["in ", re(n, /* @__PURE__ */ new Date(), { addSuffix: !1 })]
|
|
5291
5296
|
});
|
|
5292
5297
|
if (i <= Ei) return /* @__PURE__ */ V("span", {
|
|
5293
5298
|
title: r,
|
|
5294
|
-
children: /* @__PURE__ */ V(
|
|
5299
|
+
children: /* @__PURE__ */ V(Y, {
|
|
5295
5300
|
tone: "slate",
|
|
5296
5301
|
size: "xs",
|
|
5297
5302
|
children: "due"
|
|
5298
5303
|
})
|
|
5299
5304
|
});
|
|
5300
|
-
let a =
|
|
5305
|
+
let a = re(n, /* @__PURE__ */ new Date(), { addSuffix: !1 });
|
|
5301
5306
|
return /* @__PURE__ */ V("span", {
|
|
5302
5307
|
title: r,
|
|
5303
|
-
children: /* @__PURE__ */ H(
|
|
5308
|
+
children: /* @__PURE__ */ H(Y, {
|
|
5304
5309
|
tone: i <= Di ? "amber" : "rose",
|
|
5305
5310
|
size: "xs",
|
|
5306
5311
|
children: ["overdue ", a]
|
|
@@ -5338,7 +5343,7 @@ function ji(e, t, n) {
|
|
|
5338
5343
|
//#region src/components/fields/cells/factories/refLink.tsx
|
|
5339
5344
|
var Mi = (e) => {
|
|
5340
5345
|
let { field: t, entities: n, screens: r, refs: i, navigate: a, surface: o } = e, s = t.ref?.entity, c = s ? n?.[s] : void 0, l = typeof i == "function" ? i : () => i, u = o === "detail", d = c?.display?.icon, f = t.display?.ref_display_field ?? t.ref?.display?.field ?? c?.display?.display_field, p = c?.detail_screen, m = (p ? r?.[p] : void 0)?.route, h = (e) => (t) => {
|
|
5341
|
-
t.stopPropagation(), !
|
|
5346
|
+
t.stopPropagation(), !tn(t) && (t.preventDefault(), a?.(e));
|
|
5342
5347
|
};
|
|
5343
5348
|
return (e, t) => {
|
|
5344
5349
|
if (e == null || e === "") return "—";
|
|
@@ -5350,7 +5355,7 @@ var Mi = (e) => {
|
|
|
5350
5355
|
display: "flex",
|
|
5351
5356
|
flexShrink: 0
|
|
5352
5357
|
},
|
|
5353
|
-
children: /* @__PURE__ */ V(
|
|
5358
|
+
children: /* @__PURE__ */ V(nn, {
|
|
5354
5359
|
name: d,
|
|
5355
5360
|
size: 13
|
|
5356
5361
|
})
|
|
@@ -5402,7 +5407,7 @@ var Mi = (e) => {
|
|
|
5402
5407
|
};
|
|
5403
5408
|
function Ni(e, t, n, r) {
|
|
5404
5409
|
let i = t && n ? n[t]?.[e] : void 0;
|
|
5405
|
-
return i ?
|
|
5410
|
+
return i ? Xe(i, r, e) : e;
|
|
5406
5411
|
}
|
|
5407
5412
|
//#endregion
|
|
5408
5413
|
//#region src/components/fields/cells/factories/url-helpers.ts
|
|
@@ -5576,7 +5581,7 @@ var $i = {
|
|
|
5576
5581
|
objectFit: "contain"
|
|
5577
5582
|
};
|
|
5578
5583
|
function ea({ domain: e }) {
|
|
5579
|
-
let t =
|
|
5584
|
+
let t = $t((e) => e.faviconSource), n = e ? e.toLowerCase() : "", r = n ? Zi[n] : void 0;
|
|
5580
5585
|
if (r) return /* @__PURE__ */ V(r, {});
|
|
5581
5586
|
let i = Qi(n, t);
|
|
5582
5587
|
return i ? /* @__PURE__ */ V(ta, { src: i }) : /* @__PURE__ */ V(Ui, {});
|
|
@@ -5629,7 +5634,7 @@ var $ = /* @__PURE__ */ V("span", {
|
|
|
5629
5634
|
children: [
|
|
5630
5635
|
/* @__PURE__ */ V(ea, { domain: r }),
|
|
5631
5636
|
i,
|
|
5632
|
-
/* @__PURE__ */ V(
|
|
5637
|
+
/* @__PURE__ */ V(K.external, { size: 11 })
|
|
5633
5638
|
]
|
|
5634
5639
|
});
|
|
5635
5640
|
}, aa = {
|
|
@@ -5727,7 +5732,7 @@ var ha = (e) => {
|
|
|
5727
5732
|
title: t,
|
|
5728
5733
|
className: "mono",
|
|
5729
5734
|
style: va,
|
|
5730
|
-
children: [t, /* @__PURE__ */ V(
|
|
5735
|
+
children: [t, /* @__PURE__ */ V(K.external, { size: 11 })]
|
|
5731
5736
|
});
|
|
5732
5737
|
}, xa = 400, Sa = 2e3;
|
|
5733
5738
|
function Ca(e) {
|
|
@@ -5765,7 +5770,7 @@ function Ea(e, t) {
|
|
|
5765
5770
|
var Da = (e) => {
|
|
5766
5771
|
let t = e.surface ?? "detail", n = Ca(e.field.display?.list_preview?.max_chars);
|
|
5767
5772
|
return (r) => {
|
|
5768
|
-
if (
|
|
5773
|
+
if (Yn(r)) return $;
|
|
5769
5774
|
if (t === "list") {
|
|
5770
5775
|
let e = Ea(r, n);
|
|
5771
5776
|
return /* @__PURE__ */ V("span", {
|
|
@@ -5774,7 +5779,7 @@ var Da = (e) => {
|
|
|
5774
5779
|
children: e
|
|
5775
5780
|
});
|
|
5776
5781
|
}
|
|
5777
|
-
return /* @__PURE__ */ V(
|
|
5782
|
+
return /* @__PURE__ */ V(Xn, {
|
|
5778
5783
|
field: e.field,
|
|
5779
5784
|
fieldName: e.fieldName,
|
|
5780
5785
|
value: r,
|
|
@@ -5863,7 +5868,7 @@ function ka(e) {
|
|
|
5863
5868
|
//#endregion
|
|
5864
5869
|
//#region src/components/fields/cells/factories/markdown.tsx
|
|
5865
5870
|
function Aa(e) {
|
|
5866
|
-
return /* @__PURE__ */ V(
|
|
5871
|
+
return /* @__PURE__ */ V(bn, { content: e });
|
|
5867
5872
|
}
|
|
5868
5873
|
var ja = (e) => {
|
|
5869
5874
|
let t = e.surface === "list";
|
|
@@ -5875,7 +5880,7 @@ var ja = (e) => {
|
|
|
5875
5880
|
return i ? /* @__PURE__ */ V("span", {
|
|
5876
5881
|
title: r,
|
|
5877
5882
|
children: r
|
|
5878
|
-
}) : /* @__PURE__ */ V(
|
|
5883
|
+
}) : /* @__PURE__ */ V(_e, {
|
|
5879
5884
|
content: Aa(n),
|
|
5880
5885
|
children: /* @__PURE__ */ V("span", {
|
|
5881
5886
|
title: r,
|
|
@@ -5901,7 +5906,7 @@ var ja = (e) => {
|
|
|
5901
5906
|
//#endregion
|
|
5902
5907
|
//#region src/components/fields/cells/factories/richTextPreview.tsx
|
|
5903
5908
|
function Ia(e, t) {
|
|
5904
|
-
return /* @__PURE__ */ V(
|
|
5909
|
+
return /* @__PURE__ */ V(bn, {
|
|
5905
5910
|
content: e,
|
|
5906
5911
|
files: t
|
|
5907
5912
|
});
|
|
@@ -5916,7 +5921,7 @@ var La = (e) => {
|
|
|
5916
5921
|
return s ? /* @__PURE__ */ V("span", {
|
|
5917
5922
|
title: o,
|
|
5918
5923
|
children: o
|
|
5919
|
-
}) : /* @__PURE__ */ V(
|
|
5924
|
+
}) : /* @__PURE__ */ V(_e, {
|
|
5920
5925
|
content: Ia(a.markdown, a.files),
|
|
5921
5926
|
children: /* @__PURE__ */ V("span", {
|
|
5922
5927
|
title: o,
|
|
@@ -5995,37 +6000,37 @@ function Ua(e) {
|
|
|
5995
6000
|
//#endregion
|
|
5996
6001
|
//#region src/components/fields/index.tsx
|
|
5997
6002
|
var Wa = {
|
|
5998
|
-
string:
|
|
5999
|
-
text:
|
|
6003
|
+
string: Cn,
|
|
6004
|
+
text: wn,
|
|
6000
6005
|
rich_text: ci,
|
|
6001
|
-
int:
|
|
6002
|
-
float:
|
|
6003
|
-
decimal:
|
|
6004
|
-
bool:
|
|
6005
|
-
timestamp:
|
|
6006
|
-
date:
|
|
6007
|
-
time:
|
|
6008
|
-
enum:
|
|
6009
|
-
email:
|
|
6010
|
-
url:
|
|
6011
|
-
phone:
|
|
6012
|
-
uuid:
|
|
6013
|
-
bytes:
|
|
6014
|
-
ref:
|
|
6015
|
-
json:
|
|
6016
|
-
tags:
|
|
6017
|
-
string_array:
|
|
6018
|
-
int_array:
|
|
6019
|
-
uuid_array:
|
|
6020
|
-
multilang:
|
|
6021
|
-
multilang_text:
|
|
6022
|
-
structure:
|
|
6023
|
-
secret:
|
|
6024
|
-
password:
|
|
6006
|
+
int: Hn,
|
|
6007
|
+
float: Hn,
|
|
6008
|
+
decimal: Hn,
|
|
6009
|
+
bool: zn,
|
|
6010
|
+
timestamp: Rn,
|
|
6011
|
+
date: Rn,
|
|
6012
|
+
time: Rn,
|
|
6013
|
+
enum: En,
|
|
6014
|
+
email: Dn,
|
|
6015
|
+
url: On,
|
|
6016
|
+
phone: kn,
|
|
6017
|
+
uuid: Cn,
|
|
6018
|
+
bytes: Cn,
|
|
6019
|
+
ref: Kn,
|
|
6020
|
+
json: Xn,
|
|
6021
|
+
tags: Cn,
|
|
6022
|
+
string_array: lr,
|
|
6023
|
+
int_array: dr,
|
|
6024
|
+
uuid_array: lr,
|
|
6025
|
+
multilang: Qn,
|
|
6026
|
+
multilang_text: er,
|
|
6027
|
+
structure: tr,
|
|
6028
|
+
secret: ar,
|
|
6029
|
+
password: sr
|
|
6025
6030
|
};
|
|
6026
|
-
for (let e of
|
|
6031
|
+
for (let e of xn) if (!Wa[e]) throw Error(`editRegistry: missing entry for FieldType "${e}". The TS union (types/fieldType.ts) and editRegistry must stay in sync with golang/internal/engine/types.go.`);
|
|
6027
6032
|
function Ga(e) {
|
|
6028
|
-
if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ V(
|
|
6033
|
+
if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ V(tr, { ...e });
|
|
6029
6034
|
if (e.mode === "edit") {
|
|
6030
6035
|
let t = Wa[e.field.type];
|
|
6031
6036
|
if (!t) throw Error(`renderField: no edit-mode renderer for FieldType "${e.field.type}" (field "${e.fieldName}"). editRegistry must be total over FieldType; check types/fieldType.ts and components/fields/index.tsx.`);
|
|
@@ -6053,7 +6058,7 @@ function qa() {
|
|
|
6053
6058
|
if (e) return e.split("-")[0] || void 0;
|
|
6054
6059
|
}
|
|
6055
6060
|
function Ja() {
|
|
6056
|
-
let e =
|
|
6061
|
+
let e = Mt((e) => e.user), { data: t } = Nt(), n = e?.language;
|
|
6057
6062
|
if (n && n.trim()) return n;
|
|
6058
6063
|
let r = t?.languages?.[0]?.code;
|
|
6059
6064
|
return r && r.trim() ? r : qa() || Ka;
|
|
@@ -6080,6 +6085,6 @@ var Ya = {
|
|
|
6080
6085
|
verticalAlign: "middle"
|
|
6081
6086
|
};
|
|
6082
6087
|
//#endregion
|
|
6083
|
-
export {
|
|
6088
|
+
export { kt as $, K as $t, hn as A, We as At, cn as B, Te as Bt, Wn as C, $e as Ct, Sn as D, Ue as Dt, An as E, Ae as Et, fn as F, Ge as Ft, $t as G, _e as Gt, en as H, Ce as Ht, on as I, ke as It, jt as J, ce as Jt, Nt as K, ue as Kt, an as L, Oe as Lt, ln as M, He as Mt, un as N, Me as Nt, bn as O, Ve as Ot, gn as P, X as Pt, Ot as Q, q as Qt, _n as R, De as Rt, Gn as S, lt as St, jn as T, Le as Tt, tn as U, be as Ut, nn as V, we as Vt, Jt as W, ve as Wt, St as X, Y as Xt, yt as Y, se as Yt, At as Z, J as Zt, vr as _, at as _t, Ga as a, wt as at, mr as b, ot as bt, oi as c, dt as ct, Zr as d, it as dt, oe as en, Et as et, Xr as f, et as ft, Or as g, Z as gt, kr as h, pt as ht, Ja as i, Dt as it, sn as j, Ie as jt, pn as k, Ke as kt, Kr as l, ft as lt, Ar as m, rt as mt, Xa as n, bt as nt, Ua as o, Je as ot, Yr as p, Ye as pt, Mt as q, le as qt, Ya as r, xt as rt, ai as s, ut as st, Za as t, Ct as tt, Jr as u, nt as ut, _r as v, ct as vt, Un as w, qe as wt, Q as x, tt as xt, pr as y, st as yt, dn as z, Ee as zt };
|
|
6084
6089
|
|
|
6085
|
-
//# sourceMappingURL=dataTableStyles-
|
|
6090
|
+
//# sourceMappingURL=dataTableStyles-D3BsVlSi.js.map
|