@standardbeagle/edit-db 0.4.688 → 0.4.709
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/components/bulk-edit-dialog.d.ts +1 -1
- package/dist/components/confirm-dialog.d.ts +1 -1
- package/dist/components/content-editor.d.ts +1 -1
- package/dist/components/content-panel.d.ts +1 -1
- package/dist/components/content-viewer.d.ts +1 -1
- package/dist/components/data-table-column-header.d.ts +1 -1
- package/dist/components/data-table.d.ts +1 -1
- package/dist/components/detail-panel.d.ts +1 -1
- package/dist/components/empty-value.d.ts +1 -1
- package/dist/components/export-button.d.ts +1 -1
- package/dist/components/filters/boolean-filter.d.ts +1 -1
- package/dist/components/filters/date-filter.d.ts +1 -1
- package/dist/components/filters/fk-filter.d.ts +1 -1
- package/dist/components/filters/number-filter.d.ts +1 -1
- package/dist/components/filters/text-filter.d.ts +1 -1
- package/dist/components/fk-cell-popover.d.ts +1 -1
- package/dist/components/form-runner-host.d.ts +1 -1
- package/dist/components/form-runner.d.ts +2 -2
- package/dist/components/form-subform.d.ts +1 -1
- package/dist/components/grouped-grid-summary.d.ts +1 -1
- package/dist/components/m2m-panel.d.ts +1 -1
- package/dist/components/row-actions.d.ts +1 -1
- package/dist/data-panel.d.ts +1 -1
- package/dist/edit-db.css +2 -2
- package/dist/editor.d.ts +1 -1
- package/dist/editor.es.js +188 -179
- package/dist/editor.umd.cjs +8 -8
- package/dist/header.d.ts +1 -1
- package/dist/hooks/useColumnNav.d.ts +1 -1
- package/dist/hooks/useEditorConfig.d.ts +1 -1
- package/dist/hooks/useSchema.d.ts +1 -1
- package/dist/hooks/useToast.d.ts +1 -1
- package/dist/main-frame.d.ts +1 -1
- package/dist/table-list.d.ts +1 -1
- package/package.json +19 -19
package/dist/editor.es.js
CHANGED
|
@@ -183,29 +183,28 @@ var pt = (e, t) => {
|
|
|
183
183
|
let i = {}, a = "", o = "";
|
|
184
184
|
for (let e = 0; e < n.length; ++e) {
|
|
185
185
|
let t = n[e], s = [...r[e].matchAll(/([?#]?)((?:(?![?#]).)*)/g)], c = s?.find((e) => e[1] === "")?.[2] ?? "";
|
|
186
|
-
if (a = s?.find((e) => e[1] === "?")?.[2] ?? "", o = s?.find((e) => e[1] === "#")?.[2] ?? "", t.startsWith(":") && c && c !== "")
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
186
|
+
if (a = s?.find((e) => e[1] === "?")?.[2] ?? "", o = s?.find((e) => e[1] === "#")?.[2] ?? "", t.startsWith(":") && c && c !== "") i[t.substring(1)] = c;
|
|
187
|
+
else {
|
|
188
|
+
if (t === "*") {
|
|
189
|
+
let t = [...r.slice(e).join("/").matchAll(/([?#]?)((?:(?![?#]).)*)/g)];
|
|
190
|
+
return {
|
|
191
|
+
isMatch: !0,
|
|
192
|
+
data: i,
|
|
193
|
+
remainer: t.find((e) => e[1] === "")?.[2] ?? "",
|
|
194
|
+
query: t.find((e) => e[1] === "?")?.[2] ?? "",
|
|
195
|
+
hash: t.find((e) => e[1] === "#")?.[2] ?? "",
|
|
196
|
+
path: r.slice(0, e).join("/")
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (t !== c) return {
|
|
200
|
+
isMatch: !1,
|
|
201
|
+
data: {},
|
|
202
|
+
remainer: "",
|
|
203
|
+
query: "",
|
|
204
|
+
hash: "",
|
|
205
|
+
path: ""
|
|
199
206
|
};
|
|
200
207
|
}
|
|
201
|
-
if (t !== c) return {
|
|
202
|
-
isMatch: !1,
|
|
203
|
-
data: {},
|
|
204
|
-
remainer: "",
|
|
205
|
-
query: "",
|
|
206
|
-
hash: "",
|
|
207
|
-
path: ""
|
|
208
|
-
};
|
|
209
208
|
}
|
|
210
209
|
return {
|
|
211
210
|
isMatch: !0,
|
|
@@ -487,24 +486,12 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
487
486
|
rn(i, t, n, r);
|
|
488
487
|
}
|
|
489
488
|
}, rn = (e, t, n, r) => {
|
|
490
|
-
|
|
491
|
-
an(e, t, n);
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
if (typeof e == "function") {
|
|
495
|
-
on(e, t, n, r);
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
sn(e, t, n, r);
|
|
489
|
+
typeof e == "string" ? an(e, t, n) : typeof e == "function" ? on(e, t, n, r) : sn(e, t, n, r);
|
|
499
490
|
}, an = (e, t, n) => {
|
|
500
491
|
let r = e === "" ? t : cn(t, e);
|
|
501
492
|
r.classGroupId = n;
|
|
502
493
|
}, on = (e, t, n, r) => {
|
|
503
|
-
|
|
504
|
-
nn(e(r), t, n, r);
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
t.validators === null && (t.validators = []), t.validators.push(Kt(n, e));
|
|
494
|
+
ln(e) ? nn(e(r), t, n, r) : (t.validators === null && (t.validators = []), t.validators.push(Kt(n, e)));
|
|
508
495
|
}, sn = (e, t, n, r) => {
|
|
509
496
|
let i = Object.entries(e), a = i.length;
|
|
510
497
|
for (let e = 0; e < a; e++) {
|
|
@@ -613,11 +600,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
613
600
|
e && e !== g && (g = e, h = !1);
|
|
614
601
|
} else g = r(p);
|
|
615
602
|
if (!g) {
|
|
616
|
-
if (!h) {
|
|
617
|
-
l = t + (l.length > 0 ? " " + l : l);
|
|
618
|
-
continue;
|
|
619
|
-
}
|
|
620
|
-
if (g = r(p), !g) {
|
|
603
|
+
if (!h || (g = r(p), !g)) {
|
|
621
604
|
l = t + (l.length > 0 ? " " + l : l);
|
|
622
605
|
continue;
|
|
623
606
|
}
|
|
@@ -653,8 +636,8 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
653
636
|
return a = o, (...e) => a(xn(...e));
|
|
654
637
|
}, wn = [], Tn = (e) => {
|
|
655
638
|
let t = (t) => t[e] || wn;
|
|
656
|
-
return t.isThemeGetter = !0, t;
|
|
657
|
-
}, En = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Dn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, On = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, kn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, An = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, jn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Mn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Nn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Pn = (e) => On.test(e), K = (e) => !!e && !Number.isNaN(Number(e)), Fn = (e) => !!e && Number.isInteger(Number(e)), In = (e) => e.endsWith("%") && K(e.slice(0, -1)), Ln = (e) => kn.test(e), Rn = () => !0, zn = (e) => An.test(e) && !jn.test(e), Bn = () => !1, Vn = (e) => Mn.test(e), Hn = (e) => Nn.test(e), Un = (e) => !q(e) && !J(e), Wn = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Gn = (e) => or(e, ur, Bn), q = (e) => En.test(e), Kn = (e) => or(e, dr, zn), qn = (e) => or(e, fr, K), Jn = (e) => or(e, mr, Rn), Yn = (e) => or(e, pr, Bn), Xn = (e) => or(e, cr, Bn), Zn = (e) => or(e, lr, Hn), Qn = (e) => or(e, hr, Vn), J = (e) => Dn.test(e), $n = (e) => sr(e, dr), er = (e) => sr(e, pr), tr = (e) => sr(e, cr), nr = (e) => sr(e, ur), rr = (e) => sr(e, lr), ir = (e) => sr(e, hr, !0), ar = (e) => sr(e, mr, !0), or = (e, t, n) => {
|
|
639
|
+
return t.isThemeGetter = !0, t.themeKey = e, t;
|
|
640
|
+
}, En = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Dn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, On = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, kn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, An = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, jn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Mn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Nn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Pn = (e) => On.test(e), K = (e) => !!e && !Number.isNaN(Number(e)), Fn = (e) => !!e && Number.isInteger(Number(e)), In = (e) => e.endsWith("%") && K(e.slice(0, -1)), Ln = (e) => kn.test(e), Rn = () => !0, zn = (e) => An.test(e) && !jn.test(e), Bn = () => !1, Vn = (e) => Mn.test(e), Hn = (e) => Nn.test(e), Un = (e) => !q(e) && !J(e), Wn = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Gn = (e) => or(e, ur, Bn), q = (e) => En.test(e), Kn = (e) => or(e, dr, zn), qn = (e) => or(e, fr, K), Jn = (e) => or(e, mr, Rn), Yn = (e) => or(e, pr, Bn), Xn = (e) => or(e, cr, Bn), Zn = (e) => or(e, lr, Hn), Qn = (e) => or(e, hr, Vn), J = (e) => Dn.test(e), $n = (e) => sr(e, dr), er = (e) => sr(e, pr), tr = (e) => sr(e, cr), nr = (e) => sr(e, ur), rr = (e) => sr(e, lr), ir = (e) => sr(e, hr, !0), ar = (e) => sr(e, mr, !0), or = (e, t, n) => {
|
|
658
641
|
let r = En.exec(e);
|
|
659
642
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
660
643
|
}, sr = (e, t, n = !1) => {
|
|
@@ -769,6 +752,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
769
752
|
"fit",
|
|
770
753
|
...w()
|
|
771
754
|
], P = () => [
|
|
755
|
+
s,
|
|
772
756
|
Pn,
|
|
773
757
|
"screen",
|
|
774
758
|
"full",
|
|
@@ -964,6 +948,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
964
948
|
"container-named": [Wn],
|
|
965
949
|
columns: [{ columns: [
|
|
966
950
|
K,
|
|
951
|
+
"auto",
|
|
967
952
|
q,
|
|
968
953
|
J,
|
|
969
954
|
s
|
|
@@ -1212,6 +1197,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1212
1197
|
"max-h": [{ "max-h": [
|
|
1213
1198
|
"screen",
|
|
1214
1199
|
"lh",
|
|
1200
|
+
"none",
|
|
1215
1201
|
...N()
|
|
1216
1202
|
] }],
|
|
1217
1203
|
"font-size": [{ text: [
|
|
@@ -1263,7 +1249,11 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1263
1249
|
J,
|
|
1264
1250
|
qn
|
|
1265
1251
|
] }],
|
|
1266
|
-
leading: [{ leading: [
|
|
1252
|
+
leading: [{ leading: [
|
|
1253
|
+
"none",
|
|
1254
|
+
a,
|
|
1255
|
+
...w()
|
|
1256
|
+
] }],
|
|
1267
1257
|
"list-image": [{ "list-image": [
|
|
1268
1258
|
"none",
|
|
1269
1259
|
J,
|
|
@@ -1415,6 +1405,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1415
1405
|
q
|
|
1416
1406
|
],
|
|
1417
1407
|
conic: [
|
|
1408
|
+
"",
|
|
1418
1409
|
Fn,
|
|
1419
1410
|
J,
|
|
1420
1411
|
q
|
|
@@ -1501,6 +1492,7 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1501
1492
|
"outline-color": [{ outline: I() }],
|
|
1502
1493
|
shadow: [{ shadow: [
|
|
1503
1494
|
"",
|
|
1495
|
+
"inner",
|
|
1504
1496
|
"none",
|
|
1505
1497
|
u,
|
|
1506
1498
|
ir,
|
|
@@ -1968,8 +1960,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1968
1960
|
"bottom",
|
|
1969
1961
|
"left"
|
|
1970
1962
|
],
|
|
1971
|
-
"inset-x": [
|
|
1972
|
-
|
|
1963
|
+
"inset-x": [
|
|
1964
|
+
"start",
|
|
1965
|
+
"end",
|
|
1966
|
+
"right",
|
|
1967
|
+
"left"
|
|
1968
|
+
],
|
|
1969
|
+
"inset-y": [
|
|
1970
|
+
"inset-bs",
|
|
1971
|
+
"inset-be",
|
|
1972
|
+
"top",
|
|
1973
|
+
"bottom"
|
|
1974
|
+
],
|
|
1973
1975
|
flex: [
|
|
1974
1976
|
"basis",
|
|
1975
1977
|
"grow",
|
|
@@ -1988,8 +1990,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
1988
1990
|
"pb",
|
|
1989
1991
|
"pl"
|
|
1990
1992
|
],
|
|
1991
|
-
px: [
|
|
1992
|
-
|
|
1993
|
+
px: [
|
|
1994
|
+
"ps",
|
|
1995
|
+
"pe",
|
|
1996
|
+
"pr",
|
|
1997
|
+
"pl"
|
|
1998
|
+
],
|
|
1999
|
+
py: [
|
|
2000
|
+
"pbs",
|
|
2001
|
+
"pbe",
|
|
2002
|
+
"pt",
|
|
2003
|
+
"pb"
|
|
2004
|
+
],
|
|
1993
2005
|
m: [
|
|
1994
2006
|
"mx",
|
|
1995
2007
|
"my",
|
|
@@ -2002,8 +2014,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
2002
2014
|
"mb",
|
|
2003
2015
|
"ml"
|
|
2004
2016
|
],
|
|
2005
|
-
mx: [
|
|
2006
|
-
|
|
2017
|
+
mx: [
|
|
2018
|
+
"ms",
|
|
2019
|
+
"me",
|
|
2020
|
+
"mr",
|
|
2021
|
+
"ml"
|
|
2022
|
+
],
|
|
2023
|
+
my: [
|
|
2024
|
+
"mbs",
|
|
2025
|
+
"mbe",
|
|
2026
|
+
"mt",
|
|
2027
|
+
"mb"
|
|
2028
|
+
],
|
|
2007
2029
|
size: ["w", "h"],
|
|
2008
2030
|
"font-size": ["leading"],
|
|
2009
2031
|
"fvn-normal": [
|
|
@@ -2054,8 +2076,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
2054
2076
|
"border-w-b",
|
|
2055
2077
|
"border-w-l"
|
|
2056
2078
|
],
|
|
2057
|
-
"border-w-x": [
|
|
2058
|
-
|
|
2079
|
+
"border-w-x": [
|
|
2080
|
+
"border-w-s",
|
|
2081
|
+
"border-w-e",
|
|
2082
|
+
"border-w-r",
|
|
2083
|
+
"border-w-l"
|
|
2084
|
+
],
|
|
2085
|
+
"border-w-y": [
|
|
2086
|
+
"border-w-bs",
|
|
2087
|
+
"border-w-be",
|
|
2088
|
+
"border-w-t",
|
|
2089
|
+
"border-w-b"
|
|
2090
|
+
],
|
|
2059
2091
|
"border-color": [
|
|
2060
2092
|
"border-color-x",
|
|
2061
2093
|
"border-color-y",
|
|
@@ -2068,8 +2100,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
2068
2100
|
"border-color-b",
|
|
2069
2101
|
"border-color-l"
|
|
2070
2102
|
],
|
|
2071
|
-
"border-color-x": [
|
|
2072
|
-
|
|
2103
|
+
"border-color-x": [
|
|
2104
|
+
"border-color-s",
|
|
2105
|
+
"border-color-e",
|
|
2106
|
+
"border-color-r",
|
|
2107
|
+
"border-color-l"
|
|
2108
|
+
],
|
|
2109
|
+
"border-color-y": [
|
|
2110
|
+
"border-color-bs",
|
|
2111
|
+
"border-color-be",
|
|
2112
|
+
"border-color-t",
|
|
2113
|
+
"border-color-b"
|
|
2114
|
+
],
|
|
2073
2115
|
translate: [
|
|
2074
2116
|
"translate-x",
|
|
2075
2117
|
"translate-y",
|
|
@@ -2093,8 +2135,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
2093
2135
|
"scroll-mb",
|
|
2094
2136
|
"scroll-ml"
|
|
2095
2137
|
],
|
|
2096
|
-
"scroll-mx": [
|
|
2097
|
-
|
|
2138
|
+
"scroll-mx": [
|
|
2139
|
+
"scroll-ms",
|
|
2140
|
+
"scroll-me",
|
|
2141
|
+
"scroll-mr",
|
|
2142
|
+
"scroll-ml"
|
|
2143
|
+
],
|
|
2144
|
+
"scroll-my": [
|
|
2145
|
+
"scroll-mbs",
|
|
2146
|
+
"scroll-mbe",
|
|
2147
|
+
"scroll-mt",
|
|
2148
|
+
"scroll-mb"
|
|
2149
|
+
],
|
|
2098
2150
|
"scroll-p": [
|
|
2099
2151
|
"scroll-px",
|
|
2100
2152
|
"scroll-py",
|
|
@@ -2107,8 +2159,18 @@ var Ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ut = Vt, Wt
|
|
|
2107
2159
|
"scroll-pb",
|
|
2108
2160
|
"scroll-pl"
|
|
2109
2161
|
],
|
|
2110
|
-
"scroll-px": [
|
|
2111
|
-
|
|
2162
|
+
"scroll-px": [
|
|
2163
|
+
"scroll-ps",
|
|
2164
|
+
"scroll-pe",
|
|
2165
|
+
"scroll-pr",
|
|
2166
|
+
"scroll-pl"
|
|
2167
|
+
],
|
|
2168
|
+
"scroll-py": [
|
|
2169
|
+
"scroll-pbs",
|
|
2170
|
+
"scroll-pbe",
|
|
2171
|
+
"scroll-pt",
|
|
2172
|
+
"scroll-pb"
|
|
2173
|
+
],
|
|
2112
2174
|
touch: [
|
|
2113
2175
|
"touch-x",
|
|
2114
2176
|
"touch-y",
|
|
@@ -2687,9 +2749,7 @@ function zi(e, t) {
|
|
|
2687
2749
|
}
|
|
2688
2750
|
let t = `${u}_lo`, o = `${u}_hi`;
|
|
2689
2751
|
n[t] = Ur(e[0], d), n[o] = Ur(e[1], d), r.push(`$${t}: ${d}`, `$${o}: ${d}`), i.push(`{${s.id}: {${f.operator}: [$${t}, $${o}]}}`);
|
|
2690
|
-
|
|
2691
|
-
}
|
|
2692
|
-
n[u] = Ur(f.value, d), r.push(`$${u}: ${d}`), i.push(`{${s.id}: {${f.operator}: $${u}}}`);
|
|
2752
|
+
} else n[u] = Ur(f.value, d), r.push(`$${u}: ${d}`), i.push(`{${s.id}: {${f.operator}: $${u}}}`);
|
|
2693
2753
|
}
|
|
2694
2754
|
return {
|
|
2695
2755
|
variables: n,
|
|
@@ -2967,11 +3027,7 @@ function _a(e, t) {
|
|
|
2967
3027
|
}
|
|
2968
3028
|
function va(e) {
|
|
2969
3029
|
if (e instanceof Date) return isNaN(e.getTime()) ? null : e;
|
|
2970
|
-
if (typeof e == "number") {
|
|
2971
|
-
let t = new Date(e);
|
|
2972
|
-
return isNaN(t.getTime()) ? null : t;
|
|
2973
|
-
}
|
|
2974
|
-
if (typeof e == "string") {
|
|
3030
|
+
if (typeof e == "number" || typeof e == "string") {
|
|
2975
3031
|
let t = new Date(e);
|
|
2976
3032
|
return isNaN(t.getTime()) ? null : t;
|
|
2977
3033
|
}
|
|
@@ -3148,15 +3204,11 @@ function qa(e, t, n) {
|
|
|
3148
3204
|
function Ja() {
|
|
3149
3205
|
let { saveFile: e } = kt();
|
|
3150
3206
|
return c(async (t, n, r) => {
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
});
|
|
3157
|
-
return;
|
|
3158
|
-
}
|
|
3159
|
-
Ka(n, t, r);
|
|
3207
|
+
e ? await e({
|
|
3208
|
+
filename: t,
|
|
3209
|
+
content: n,
|
|
3210
|
+
mime: r
|
|
3211
|
+
}) : Ka(n, t, r);
|
|
3160
3212
|
}, [e]);
|
|
3161
3213
|
}
|
|
3162
3214
|
//#endregion
|
|
@@ -3758,21 +3810,13 @@ var So = {
|
|
|
3758
3810
|
}, Co = 300;
|
|
3759
3811
|
function wo({ column: e }) {
|
|
3760
3812
|
let t = (e.columnDef.meta?.filterOperators ?? []).filter((e) => e in So), n = e.getFilterValue(), [r, i] = m(n?.operator ?? "_contains"), [a, o] = m(n?.operator === "_null" ? "" : String(n?.value ?? "")), { schedule: s, cancel: c } = xo(Co), l = r === "_null", u = (t, n) => {
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
});
|
|
3766
|
-
return;
|
|
3767
|
-
}
|
|
3768
|
-
if (!n) {
|
|
3769
|
-
c(), e.setFilterValue(void 0);
|
|
3770
|
-
return;
|
|
3771
|
-
}
|
|
3772
|
-
s(() => e.setFilterValue({
|
|
3813
|
+
t === "_null" ? (c(), e.setFilterValue({
|
|
3814
|
+
operator: "_null",
|
|
3815
|
+
value: !0
|
|
3816
|
+
})) : n ? s(() => e.setFilterValue({
|
|
3773
3817
|
operator: t,
|
|
3774
3818
|
value: n
|
|
3775
|
-
}));
|
|
3819
|
+
})) : (c(), e.setFilterValue(void 0));
|
|
3776
3820
|
}, d = (t) => {
|
|
3777
3821
|
i(t), t === "_null" ? (o(""), u("_null", "")) : a ? u(t, a) : (c(), e.setFilterValue(void 0));
|
|
3778
3822
|
}, f = (e) => {
|
|
@@ -3840,21 +3884,13 @@ function ko({ column: e }) {
|
|
|
3840
3884
|
return;
|
|
3841
3885
|
}
|
|
3842
3886
|
let i = Oo(r, n);
|
|
3843
|
-
|
|
3844
|
-
_(), e.setFilterValue(void 0);
|
|
3845
|
-
return;
|
|
3846
|
-
}
|
|
3847
|
-
g(() => e.setFilterValue({
|
|
3887
|
+
i === null ? (_(), e.setFilterValue(void 0)) : g(() => e.setFilterValue({
|
|
3848
3888
|
operator: t,
|
|
3849
3889
|
value: i
|
|
3850
3890
|
}));
|
|
3851
3891
|
}, y = (t, r) => {
|
|
3852
3892
|
let i = Oo(t, n), a = Oo(r, n);
|
|
3853
|
-
|
|
3854
|
-
_(), e.setFilterValue(void 0);
|
|
3855
|
-
return;
|
|
3856
|
-
}
|
|
3857
|
-
g(() => e.setFilterValue({
|
|
3893
|
+
i === null || a === null ? (_(), e.setFilterValue(void 0)) : g(() => e.setFilterValue({
|
|
3858
3894
|
operator: "_between",
|
|
3859
3895
|
value: [i, a]
|
|
3860
3896
|
}));
|
|
@@ -3938,27 +3974,15 @@ var Ao = {
|
|
|
3938
3974
|
};
|
|
3939
3975
|
function jo({ column: e }) {
|
|
3940
3976
|
let t = (e.columnDef.meta?.filterOperators ?? []).filter((e) => e in Ao), n = e.getFilterValue(), r = n?.operator ?? "_eq", [i, a] = m(r), [o, s] = m(() => !n || n.operator === "_null" || n.operator === "_between" ? "" : String(n.value ?? "")), [c, l] = m(() => n?.operator === "_between" && Array.isArray(n.value) ? String(n.value[0] ?? "") : ""), [u, d] = m(() => n?.operator === "_between" && Array.isArray(n.value) ? String(n.value[1] ?? "") : ""), f = (t, n) => {
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
});
|
|
3946
|
-
return;
|
|
3947
|
-
}
|
|
3948
|
-
if (!n) {
|
|
3949
|
-
e.setFilterValue(void 0);
|
|
3950
|
-
return;
|
|
3951
|
-
}
|
|
3952
|
-
e.setFilterValue({
|
|
3977
|
+
t === "_null" ? e.setFilterValue({
|
|
3978
|
+
operator: "_null",
|
|
3979
|
+
value: !0
|
|
3980
|
+
}) : n ? e.setFilterValue({
|
|
3953
3981
|
operator: t,
|
|
3954
3982
|
value: n
|
|
3955
|
-
});
|
|
3983
|
+
}) : e.setFilterValue(void 0);
|
|
3956
3984
|
}, p = (t, n) => {
|
|
3957
|
-
|
|
3958
|
-
e.setFilterValue(void 0);
|
|
3959
|
-
return;
|
|
3960
|
-
}
|
|
3961
|
-
e.setFilterValue({
|
|
3985
|
+
!t || !n ? e.setFilterValue(void 0) : e.setFilterValue({
|
|
3962
3986
|
operator: "_between",
|
|
3963
3987
|
value: [t, n]
|
|
3964
3988
|
});
|
|
@@ -4113,11 +4137,7 @@ function Io({ column: e, joinTable: t, joinLabelColumn: n, joinFkColumn: r }) {
|
|
|
4113
4137
|
children: [/* @__PURE__ */ S(ho, {
|
|
4114
4138
|
value: d,
|
|
4115
4139
|
onValueChange: (t) => {
|
|
4116
|
-
|
|
4117
|
-
e.setFilterValue(void 0);
|
|
4118
|
-
return;
|
|
4119
|
-
}
|
|
4120
|
-
e.setFilterValue({
|
|
4140
|
+
t === "all" ? e.setFilterValue(void 0) : e.setFilterValue({
|
|
4121
4141
|
operator: "_eq",
|
|
4122
4142
|
value: Ur(t, s)
|
|
4123
4143
|
});
|
|
@@ -4604,7 +4624,7 @@ function fs(e, t, n) {
|
|
|
4604
4624
|
} catch {}
|
|
4605
4625
|
for (let n of e) {
|
|
4606
4626
|
let e = n.value, i = t.columns.find((e) => e.name === n.id);
|
|
4607
|
-
|
|
4627
|
+
i && ki(i.paramType).includes(e.operator) && (e.operator === "_null" || e.value !== void 0 && e.value !== null && e.value !== "") && r.push({ [i.graphQlName]: { [e.operator]: e.operator === "_null" ? !!e.value : e.value } });
|
|
4608
4628
|
}
|
|
4609
4629
|
return r.length === 0 ? void 0 : r.length === 1 ? r[0] : { and: r };
|
|
4610
4630
|
}
|
|
@@ -5354,27 +5374,27 @@ function Ys(e, t, n) {
|
|
|
5354
5374
|
if (!Number.isNaN(i) && n < i) return `${r} must be on or after ${e.min}`;
|
|
5355
5375
|
if (!Number.isNaN(a) && n > a) return `${r} must be on or before ${e.max}`;
|
|
5356
5376
|
}
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5377
|
+
} else {
|
|
5378
|
+
if (Mr(e.paramType) === "BigInt" && typeof t == "string" && t.trim() !== "") {
|
|
5379
|
+
let e = t.trim();
|
|
5380
|
+
if (!/^[+-]?\d+$/.test(e)) return `${r} must be a whole number`;
|
|
5381
|
+
let n = BigInt(e);
|
|
5382
|
+
return n < Hs || n > Us ? `${r} is out of range for a 64-bit integer` : void 0;
|
|
5383
|
+
}
|
|
5384
|
+
if (e.precision != null && (typeof t == "string" || typeof t == "number")) {
|
|
5385
|
+
let n = Math.max(e.precision - (e.scale ?? 0), 0), i = Gs(String(t));
|
|
5386
|
+
if (i !== void 0 && i > n) return `${r} must have at most ${n} digits before the decimal point`;
|
|
5387
|
+
}
|
|
5388
|
+
if (zs(e)) {
|
|
5389
|
+
let n = Number(t);
|
|
5390
|
+
if (!Number.isFinite(n)) return `${r} must be a number`;
|
|
5391
|
+
if (Bs(e) && !Number.isInteger(n)) return `${r} must be a whole number`;
|
|
5392
|
+
let i = Vs[Mr(e.paramType)];
|
|
5393
|
+
if (i && (n < i.min || n > i.max)) return `${r} must be between ${i.min} and ${i.max}`;
|
|
5394
|
+
let a = e.min == null ? NaN : Number(e.min), o = e.max == null ? NaN : Number(e.max);
|
|
5395
|
+
if (!Number.isNaN(a) && n < a) return `${r} must be at least ${e.min}`;
|
|
5396
|
+
if (!Number.isNaN(o) && n > o) return `${r} must be at most ${e.max}`;
|
|
5397
|
+
}
|
|
5378
5398
|
}
|
|
5379
5399
|
}
|
|
5380
5400
|
function Xs(e, t) {
|
|
@@ -5404,11 +5424,8 @@ function $s(e, t, n) {
|
|
|
5404
5424
|
}
|
|
5405
5425
|
function ec(e, t, n, r, i) {
|
|
5406
5426
|
let a = { ...e };
|
|
5407
|
-
for (let { column: e } of t)
|
|
5408
|
-
|
|
5409
|
-
a[e.name] = i ? void 0 : null;
|
|
5410
|
-
continue;
|
|
5411
|
-
}
|
|
5427
|
+
for (let { column: e } of t) if (a[e.name] === null) a[e.name] = i ? void 0 : null;
|
|
5428
|
+
else {
|
|
5412
5429
|
if (Zs(e.paramType)) {
|
|
5413
5430
|
let t = a[e.name];
|
|
5414
5431
|
a[e.name] = t == null ? void 0 : t === "" ? i ? void 0 : null : $s(t, e.paramType, e.name);
|
|
@@ -6932,7 +6949,7 @@ function vl(e) {
|
|
|
6932
6949
|
function yl(e) {
|
|
6933
6950
|
if (typeof e != "object" || !e || Array.isArray(e)) return {};
|
|
6934
6951
|
let t = {};
|
|
6935
|
-
for (let [n, r] of Object.entries(e)) typeof r
|
|
6952
|
+
for (let [n, r] of Object.entries(e)) typeof r == "number" && Number.isFinite(r) && (t[n] = Math.min(Math.max(r, 60), 450));
|
|
6936
6953
|
return t;
|
|
6937
6954
|
}
|
|
6938
6955
|
function bl(e, t) {
|
|
@@ -7706,11 +7723,7 @@ function Bl({ row: e, isSelected: t, checked: n, pending: r, editingColumnId: i,
|
|
|
7706
7723
|
className: u ? "cursor-pointer group/row focus-visible:outline-2 focus-visible:outline-primary" : "group/row focus-visible:outline-2 focus-visible:outline-primary",
|
|
7707
7724
|
tabIndex: y ? 0 : void 0,
|
|
7708
7725
|
onClick: u ? () => {
|
|
7709
|
-
|
|
7710
|
-
p.current = !1;
|
|
7711
|
-
return;
|
|
7712
|
-
}
|
|
7713
|
-
window.getSelection()?.toString() || u(t ? null : e.id);
|
|
7726
|
+
p.current ? p.current = !1 : window.getSelection()?.toString() || u(t ? null : e.id);
|
|
7714
7727
|
} : void 0,
|
|
7715
7728
|
onKeyDown: y ? (n) => {
|
|
7716
7729
|
n.target === n.currentTarget && ((n.key === "Enter" || n.key === " ") && u ? (n.preventDefault(), u(t ? null : e.id)) : (n.key === "e" || n.key === "E") && d ? (n.preventDefault(), d(e.id)) : (n.key === "Delete" || n.key === "Backspace") && f && (n.preventDefault(), f(e.id)));
|
|
@@ -7883,25 +7896,24 @@ function Ul({ table: e, pks: t, onClose: n }) {
|
|
|
7883
7896
|
children: "Cancel"
|
|
7884
7897
|
}), /* @__PURE__ */ x(Z, {
|
|
7885
7898
|
onClick: async () => {
|
|
7886
|
-
if (l(null), _.length === 0)
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
f(!1);
|
|
7899
|
+
if (l(null), _.length === 0) l("Choose at least one field to change.");
|
|
7900
|
+
else {
|
|
7901
|
+
f(!0);
|
|
7902
|
+
try {
|
|
7903
|
+
let i = {};
|
|
7904
|
+
for (let e of _) i[e.name] = b(e);
|
|
7905
|
+
let o = p.filter((e) => !e.isNullable || i[e.name] !== void 0), s = Yi(e, t, [.../* @__PURE__ */ new Set([...e.primaryKeys ?? [], ...o.map((e) => e.name)])]);
|
|
7906
|
+
if (!s) throw Error("The selected rows have no resolvable primary keys.");
|
|
7907
|
+
let c = (await r.query(s.query, s.variables))?.value?.data ?? [];
|
|
7908
|
+
if (c.length !== t.length) throw Error(`Only ${c.length} of ${t.length} selected rows still exist. Refresh and retry.`);
|
|
7909
|
+
let l = tc(e, o, g, c, i);
|
|
7910
|
+
await a.saveDelta({ updated: l }), n();
|
|
7911
|
+
} catch (e) {
|
|
7912
|
+
let t = e.message ?? String(e);
|
|
7913
|
+
l(t), i(`Bulk edit failed: ${t}`, "error");
|
|
7914
|
+
} finally {
|
|
7915
|
+
f(!1);
|
|
7916
|
+
}
|
|
7905
7917
|
}
|
|
7906
7918
|
},
|
|
7907
7919
|
disabled: v || h,
|
|
@@ -7995,7 +8007,7 @@ function $l(e, t) {
|
|
|
7995
8007
|
}
|
|
7996
8008
|
function eu({ target: e, onClose: t, onNavigate: n, onSave: r, canNavigatePrev: i, canNavigateNext: a }) {
|
|
7997
8009
|
let { toast: o } = $a(), [s, l] = m(!1), [d, f] = m(!1), [h, g] = m(""), [_, v] = m(!1), [y, C] = m(!1), w = p(null), T = e?.value ?? "", E = mi(T, e?.dbType), D = Zl[E], O = $l(T, E), k = E === "binary" && T ? _i(T) : null, j = c(() => {
|
|
7998
|
-
|
|
8010
|
+
e && k && qa(T, `${e.columnName}${k.extension}`, k.mime);
|
|
7999
8011
|
}, [
|
|
8000
8012
|
e,
|
|
8001
8013
|
k,
|
|
@@ -8033,11 +8045,8 @@ function eu({ target: e, onClose: t, onNavigate: n, onSave: r, canNavigatePrev:
|
|
|
8033
8045
|
}, [O]), I = c(() => {
|
|
8034
8046
|
f(!1), g("");
|
|
8035
8047
|
}, []), L = c(async () => {
|
|
8036
|
-
if (h === O)
|
|
8037
|
-
|
|
8038
|
-
return;
|
|
8039
|
-
}
|
|
8040
|
-
if (!(!r || y)) {
|
|
8048
|
+
if (h === O) f(!1);
|
|
8049
|
+
else if (r && !y) {
|
|
8041
8050
|
C(!0);
|
|
8042
8051
|
try {
|
|
8043
8052
|
await r(h), f(!1);
|
|
@@ -8229,7 +8238,7 @@ function tu(e, t) {
|
|
|
8229
8238
|
let n = [];
|
|
8230
8239
|
for (let r of e) {
|
|
8231
8240
|
let e = r.value, i = t.columns.find((e) => e.name === r.id);
|
|
8232
|
-
|
|
8241
|
+
i && ki(i.paramType).includes(e.operator) && (e.value === void 0 || e.value === "" && e.operator !== "_null" || n.push({ [i.graphQlName]: { [e.operator]: e.value } }));
|
|
8233
8242
|
}
|
|
8234
8243
|
return n.length === 1 ? n[0] : n.length > 1 ? { and: n } : void 0;
|
|
8235
8244
|
}
|