sera-components 1.5.0 → 1.6.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/data/display/index.d.ts +2 -2
- package/dist/data/inputs/ConfirmationInput.d.ts +72 -0
- package/dist/data/inputs/EnumInput.d.ts +3 -1
- package/dist/data/inputs/index.d.ts +5 -4
- package/dist/form/Form.d.ts +12 -12
- package/dist/form/FormItem.d.ts +9 -7
- package/dist/form/index.d.ts +0 -1
- package/dist/index.js +1259 -1326
- package/dist/index.umd.cjs +7 -7
- package/dist/misc/Menu.d.ts +7 -6
- package/dist/table/makeColumns.d.ts +3 -3
- package/dist/types.d.ts +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/propertyUtils.d.ts +33 -0
- package/dist/view/View.d.ts +11 -30
- package/dist/view/ViewItem.d.ts +2 -2
- package/dist/view/ViewTab.d.ts +3 -3
- package/dist/view/index.d.ts +1 -1
- package/package.json +10 -9
- package/dist/form/FormNestedPropertyItem.d.ts +0 -38
- package/dist/view/ViewNestedPropertyItem.d.ts +0 -43
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var Fn = Object.defineProperty;
|
|
2
2
|
var In = (e, n, t) => n in e ? Fn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var G = (e, n, t) => In(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import * as
|
|
5
|
-
import Pn, { createContext as
|
|
6
|
-
import { Paper as
|
|
7
|
-
import { IconCheck as
|
|
8
|
-
import { observer as
|
|
9
|
-
import { isObjectProperty as
|
|
4
|
+
import * as Ye from "react";
|
|
5
|
+
import Pn, { createContext as Ht, useContext as Y, useMemo as I, useState as M, useEffect as ve } from "react";
|
|
6
|
+
import { Paper as te, Image as En, Text as P, Menu as ie, Button as H, Container as $n, Alert as it, Stack as Q, Flex as z, Loader as $e, NavLink as wt, Checkbox as le, Group as k, Input as B, useCombobox as qt, Combobox as N, Grid as $, InputBase as Mn, PasswordInput as Bt, Select as bn, CloseButton as Dn, Divider as Vn, Tooltip as Ut, Fieldset as Tn, Table as Kt, rem as de, Pagination as An, MenuTarget as Nn, MenuDropdown as kn, MenuItem as Ln, TextInput as xt, Popover as Le, ActionIcon as Rt, Tabs as ye } from "@mantine/core";
|
|
7
|
+
import { IconCheck as On, IconInfoCircle as st, IconChevronRight as zn, IconSearch as lt, IconCalendar as Me, IconHelpOctagonFilled as Yt, IconPlus as Gn, IconPencil as Hn, IconReload as qn, IconDatabaseImport as Bn, IconDownload as Un, IconDatabaseOff as Kn, IconSelector as Yn, IconCircleX as Wn, IconAdjustmentsHorizontal as Xn, IconKeyboard as Jn } from "@tabler/icons-react";
|
|
8
|
+
import { observer as ne } from "mobx-react-lite";
|
|
9
|
+
import { isNestedProperty as Wt, isObjectProperty as oe, DynamicMultiLingualString as Qn, isDraftRecord as Xt, NestedProperty as X, I18NStore as Zn, validators as eo } from "sera-db";
|
|
10
10
|
import { IMaskInput as to } from "react-imask";
|
|
11
11
|
import K from "dayjs";
|
|
12
|
-
import { DatePickerInput as
|
|
12
|
+
import { DatePickerInput as We, DateTimePicker as yt } from "@mantine/dates";
|
|
13
13
|
import { debounce as no } from "throttle-debounce";
|
|
14
|
-
var
|
|
14
|
+
var je = { exports: {} }, ge = {};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-jsx-runtime.production.js
|
|
@@ -21,10 +21,10 @@ var Re = { exports: {} }, fe = {};
|
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
var
|
|
24
|
+
var jt;
|
|
25
25
|
function oo() {
|
|
26
|
-
if (
|
|
27
|
-
|
|
26
|
+
if (jt) return ge;
|
|
27
|
+
jt = 1;
|
|
28
28
|
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
29
29
|
function t(o, r, i) {
|
|
30
30
|
var s = null;
|
|
@@ -41,9 +41,9 @@ function oo() {
|
|
|
41
41
|
props: i
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return ge.Fragment = n, ge.jsx = t, ge.jsxs = t, ge;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var ce = {};
|
|
47
47
|
/**
|
|
48
48
|
* @license React
|
|
49
49
|
* react-jsx-runtime.development.js
|
|
@@ -53,47 +53,47 @@ var pe = {};
|
|
|
53
53
|
* This source code is licensed under the MIT license found in the
|
|
54
54
|
* LICENSE file in the root directory of this source tree.
|
|
55
55
|
*/
|
|
56
|
-
var
|
|
56
|
+
var _t;
|
|
57
57
|
function ro() {
|
|
58
|
-
return
|
|
58
|
+
return _t || (_t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
59
59
|
function e(h) {
|
|
60
60
|
if (h == null) return null;
|
|
61
61
|
if (typeof h == "function")
|
|
62
|
-
return h.$$typeof ===
|
|
62
|
+
return h.$$typeof === xe ? null : h.displayName || h.name || null;
|
|
63
63
|
if (typeof h == "string") return h;
|
|
64
64
|
switch (h) {
|
|
65
|
-
case m:
|
|
66
|
-
return "Fragment";
|
|
67
65
|
case C:
|
|
66
|
+
return "Fragment";
|
|
67
|
+
case j:
|
|
68
68
|
return "Profiler";
|
|
69
69
|
case v:
|
|
70
70
|
return "StrictMode";
|
|
71
|
-
case I:
|
|
72
|
-
return "Suspense";
|
|
73
71
|
case L:
|
|
72
|
+
return "Suspense";
|
|
73
|
+
case Ce:
|
|
74
74
|
return "SuspenseList";
|
|
75
|
-
case
|
|
75
|
+
case Ve:
|
|
76
76
|
return "Activity";
|
|
77
77
|
}
|
|
78
78
|
if (typeof h == "object")
|
|
79
79
|
switch (typeof h.tag == "number" && console.error(
|
|
80
80
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
81
81
|
), h.$$typeof) {
|
|
82
|
-
case
|
|
82
|
+
case m:
|
|
83
83
|
return "Portal";
|
|
84
|
-
case
|
|
85
|
-
return
|
|
86
|
-
case _:
|
|
87
|
-
return (h._context.displayName || "Context") + ".Consumer";
|
|
84
|
+
case x:
|
|
85
|
+
return h.displayName || "Context";
|
|
88
86
|
case w:
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
return (h._context.displayName || "Context") + ".Consumer";
|
|
88
|
+
case F:
|
|
89
|
+
var _ = h.render;
|
|
90
|
+
return h = h.displayName, h || (h = _.displayName || _.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
91
91
|
case we:
|
|
92
|
-
return
|
|
93
|
-
case
|
|
94
|
-
|
|
92
|
+
return _ = h.displayName || null, _ !== null ? _ : e(h.type) || "Memo";
|
|
93
|
+
case ue:
|
|
94
|
+
_ = h._payload, h = h._init;
|
|
95
95
|
try {
|
|
96
|
-
return e(h(
|
|
96
|
+
return e(h(_));
|
|
97
97
|
} catch {
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -105,50 +105,50 @@ function ro() {
|
|
|
105
105
|
function t(h) {
|
|
106
106
|
try {
|
|
107
107
|
n(h);
|
|
108
|
-
var
|
|
108
|
+
var _ = !1;
|
|
109
109
|
} catch {
|
|
110
|
-
|
|
110
|
+
_ = !0;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
var E =
|
|
112
|
+
if (_) {
|
|
113
|
+
_ = console;
|
|
114
|
+
var E = _.error, b = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
115
115
|
return E.call(
|
|
116
|
-
|
|
116
|
+
_,
|
|
117
117
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
118
|
-
|
|
118
|
+
b
|
|
119
119
|
), n(h);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function o(h) {
|
|
123
|
-
if (h ===
|
|
124
|
-
if (typeof h == "object" && h !== null && h.$$typeof ===
|
|
123
|
+
if (h === C) return "<>";
|
|
124
|
+
if (typeof h == "object" && h !== null && h.$$typeof === ue)
|
|
125
125
|
return "<...>";
|
|
126
126
|
try {
|
|
127
|
-
var
|
|
128
|
-
return
|
|
127
|
+
var _ = e(h);
|
|
128
|
+
return _ ? "<" + _ + ">" : "<...>";
|
|
129
129
|
} catch {
|
|
130
130
|
return "<...>";
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
function r() {
|
|
134
|
-
var h =
|
|
134
|
+
var h = Te.A;
|
|
135
135
|
return h === null ? null : h.getOwner();
|
|
136
136
|
}
|
|
137
137
|
function i() {
|
|
138
138
|
return Error("react-stack-top-frame");
|
|
139
139
|
}
|
|
140
140
|
function s(h) {
|
|
141
|
-
if (
|
|
142
|
-
var
|
|
143
|
-
if (
|
|
141
|
+
if (pt.call(h, "key")) {
|
|
142
|
+
var _ = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
143
|
+
if (_ && _.isReactWarning) return !1;
|
|
144
144
|
}
|
|
145
145
|
return h.key !== void 0;
|
|
146
146
|
}
|
|
147
|
-
function a(h,
|
|
147
|
+
function a(h, _) {
|
|
148
148
|
function E() {
|
|
149
|
-
|
|
149
|
+
mt || (mt = !0, console.error(
|
|
150
150
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
151
|
-
|
|
151
|
+
_
|
|
152
152
|
));
|
|
153
153
|
}
|
|
154
154
|
E.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
@@ -158,18 +158,19 @@ function ro() {
|
|
|
158
158
|
}
|
|
159
159
|
function u() {
|
|
160
160
|
var h = e(this.type);
|
|
161
|
-
return
|
|
161
|
+
return ht[h] || (ht[h] = !0, console.error(
|
|
162
162
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
163
163
|
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
164
164
|
}
|
|
165
|
-
function g(h,
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
function g(h, _, E, b, Re, Ne) {
|
|
166
|
+
var D = E.ref;
|
|
167
|
+
return h = {
|
|
168
|
+
$$typeof: p,
|
|
168
169
|
type: h,
|
|
169
|
-
key:
|
|
170
|
-
props:
|
|
171
|
-
_owner:
|
|
172
|
-
}, (
|
|
170
|
+
key: _,
|
|
171
|
+
props: E,
|
|
172
|
+
_owner: b
|
|
173
|
+
}, (D !== void 0 ? D : null) !== null ? Object.defineProperty(h, "ref", {
|
|
173
174
|
enumerable: !1,
|
|
174
175
|
get: u
|
|
175
176
|
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
@@ -186,112 +187,109 @@ function ro() {
|
|
|
186
187
|
configurable: !1,
|
|
187
188
|
enumerable: !1,
|
|
188
189
|
writable: !0,
|
|
189
|
-
value:
|
|
190
|
+
value: Re
|
|
190
191
|
}), Object.defineProperty(h, "_debugTask", {
|
|
191
192
|
configurable: !1,
|
|
192
193
|
enumerable: !1,
|
|
193
194
|
writable: !0,
|
|
194
|
-
value:
|
|
195
|
+
value: Ne
|
|
195
196
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
-
var
|
|
199
|
-
if (
|
|
200
|
-
if (
|
|
201
|
-
if (jn(
|
|
202
|
-
for (
|
|
203
|
-
S(
|
|
204
|
-
Object.freeze && Object.freeze(
|
|
198
|
+
function c(h, _, E, b, Re, Ne) {
|
|
199
|
+
var D = _.children;
|
|
200
|
+
if (D !== void 0)
|
|
201
|
+
if (b)
|
|
202
|
+
if (jn(D)) {
|
|
203
|
+
for (b = 0; b < D.length; b++)
|
|
204
|
+
S(D[b]);
|
|
205
|
+
Object.freeze && Object.freeze(D);
|
|
205
206
|
} else
|
|
206
207
|
console.error(
|
|
207
208
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
208
209
|
);
|
|
209
|
-
else S(
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
var
|
|
210
|
+
else S(D);
|
|
211
|
+
if (pt.call(_, "key")) {
|
|
212
|
+
D = e(h);
|
|
213
|
+
var re = Object.keys(_).filter(function(_n) {
|
|
213
214
|
return _n !== "key";
|
|
214
215
|
});
|
|
215
|
-
|
|
216
|
+
b = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", Ct[D + b] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
216
217
|
`A props object containing a "key" prop is being spread into JSX:
|
|
217
218
|
let props = %s;
|
|
218
219
|
<%s {...props} />
|
|
219
220
|
React keys must be passed directly to JSX without using spread:
|
|
220
221
|
let props = %s;
|
|
221
222
|
<%s key={someKey} {...props} />`,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
),
|
|
223
|
+
b,
|
|
224
|
+
D,
|
|
225
|
+
re,
|
|
226
|
+
D
|
|
227
|
+
), Ct[D + b] = !0);
|
|
227
228
|
}
|
|
228
|
-
if (
|
|
229
|
+
if (D = null, E !== void 0 && (t(E), D = "" + E), s(_) && (t(_.key), D = "" + _.key), "key" in _) {
|
|
229
230
|
E = {};
|
|
230
|
-
for (var
|
|
231
|
-
|
|
232
|
-
} else E =
|
|
233
|
-
return
|
|
231
|
+
for (var ke in _)
|
|
232
|
+
ke !== "key" && (E[ke] = _[ke]);
|
|
233
|
+
} else E = _;
|
|
234
|
+
return D && a(
|
|
234
235
|
E,
|
|
235
236
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
236
237
|
), g(
|
|
237
238
|
h,
|
|
238
|
-
|
|
239
|
-
B,
|
|
240
|
-
J,
|
|
241
|
-
r(),
|
|
239
|
+
D,
|
|
242
240
|
E,
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
r(),
|
|
242
|
+
Re,
|
|
243
|
+
Ne
|
|
245
244
|
);
|
|
246
245
|
}
|
|
247
246
|
function S(h) {
|
|
248
|
-
typeof h == "object" && h !== null && h.$$typeof ===
|
|
247
|
+
f(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === ue && (h._payload.status === "fulfilled" ? f(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
|
|
248
|
+
}
|
|
249
|
+
function f(h) {
|
|
250
|
+
return typeof h == "object" && h !== null && h.$$typeof === p;
|
|
249
251
|
}
|
|
250
|
-
var
|
|
252
|
+
var d = Pn, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), x = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), Ce = Symbol.for("react.suspense_list"), we = Symbol.for("react.memo"), ue = Symbol.for("react.lazy"), Ve = Symbol.for("react.activity"), xe = Symbol.for("react.client.reference"), Te = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, pt = Object.prototype.hasOwnProperty, jn = Array.isArray, Ae = console.createTask ? console.createTask : function() {
|
|
251
253
|
return null;
|
|
252
254
|
};
|
|
253
|
-
|
|
255
|
+
d = {
|
|
254
256
|
react_stack_bottom_frame: function(h) {
|
|
255
257
|
return h();
|
|
256
258
|
}
|
|
257
259
|
};
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
+
var mt, ht = {}, St = d.react_stack_bottom_frame.bind(
|
|
261
|
+
d,
|
|
260
262
|
i
|
|
261
|
-
)(),
|
|
262
|
-
|
|
263
|
-
var
|
|
264
|
-
return
|
|
263
|
+
)(), vt = Ae(o(i)), Ct = {};
|
|
264
|
+
ce.Fragment = C, ce.jsx = function(h, _, E) {
|
|
265
|
+
var b = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return c(
|
|
265
267
|
h,
|
|
266
|
-
|
|
268
|
+
_,
|
|
267
269
|
E,
|
|
268
270
|
!1,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
B ? Error("react-stack-top-frame") : Rt,
|
|
272
|
-
B ? Ve(o(h)) : yt
|
|
271
|
+
b ? Error("react-stack-top-frame") : St,
|
|
272
|
+
b ? Ae(o(h)) : vt
|
|
273
273
|
);
|
|
274
|
-
},
|
|
275
|
-
var
|
|
276
|
-
return
|
|
274
|
+
}, ce.jsxs = function(h, _, E) {
|
|
275
|
+
var b = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
276
|
+
return c(
|
|
277
277
|
h,
|
|
278
|
-
|
|
278
|
+
_,
|
|
279
279
|
E,
|
|
280
280
|
!0,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
B ? Error("react-stack-top-frame") : Rt,
|
|
284
|
-
B ? Ve(o(h)) : yt
|
|
281
|
+
b ? Error("react-stack-top-frame") : St,
|
|
282
|
+
b ? Ae(o(h)) : vt
|
|
285
283
|
);
|
|
286
284
|
};
|
|
287
|
-
})()),
|
|
285
|
+
})()), ce;
|
|
288
286
|
}
|
|
289
|
-
var
|
|
287
|
+
var Ft;
|
|
290
288
|
function io() {
|
|
291
|
-
return
|
|
289
|
+
return Ft || (Ft = 1, process.env.NODE_ENV === "production" ? je.exports = oo() : je.exports = ro()), je.exports;
|
|
292
290
|
}
|
|
293
291
|
var l = io();
|
|
294
|
-
const
|
|
292
|
+
const V = {
|
|
295
293
|
UK: {
|
|
296
294
|
svgFlag: "https://flagcdn.com/gb.svg",
|
|
297
295
|
emojiFlag: "🇬🇧"
|
|
@@ -356,76 +354,76 @@ const b = {
|
|
|
356
354
|
svgFlag: "https://flagcdn.com/kh.svg",
|
|
357
355
|
emojiFlag: "🇰🇭"
|
|
358
356
|
}
|
|
359
|
-
}, so = ({ flag: e }) => /* @__PURE__ */ l.jsx(
|
|
357
|
+
}, so = ({ flag: e }) => /* @__PURE__ */ l.jsx(te, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(En, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), lo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
|
|
360
358
|
P,
|
|
361
359
|
{
|
|
362
360
|
component: "span",
|
|
363
361
|
style: (n) => ({ textShadow: n.shadows.xs }),
|
|
364
362
|
children: e.emojiFlag
|
|
365
363
|
}
|
|
366
|
-
),
|
|
364
|
+
), Xe = navigator.userAgent.includes("Windows") ? so : lo, Z = Ht(new Intl.Locale("en-US")), mi = ne(
|
|
367
365
|
({
|
|
368
366
|
value: e,
|
|
369
367
|
children: n
|
|
370
|
-
}) => /* @__PURE__ */ l.jsx(
|
|
368
|
+
}) => /* @__PURE__ */ l.jsx(Z.Provider, { value: e.locale, children: n })
|
|
371
369
|
), ao = {
|
|
372
370
|
lang2value: {
|
|
373
371
|
en: "Choose Language",
|
|
374
372
|
vi: "Chọn ngôn ngữ"
|
|
375
373
|
}
|
|
376
|
-
},
|
|
374
|
+
}, _e = {
|
|
377
375
|
en: {
|
|
378
376
|
name: "English",
|
|
379
|
-
flag:
|
|
377
|
+
flag: V.US,
|
|
380
378
|
locale: new Intl.Locale("en-US")
|
|
381
379
|
},
|
|
382
380
|
vi: {
|
|
383
381
|
name: "Tiếng Việt",
|
|
384
|
-
flag:
|
|
382
|
+
flag: V.VN,
|
|
385
383
|
locale: new Intl.Locale("vi-VN")
|
|
386
384
|
}
|
|
387
|
-
},
|
|
385
|
+
}, hi = ({
|
|
388
386
|
locale: e,
|
|
389
387
|
setLocale: n
|
|
390
388
|
}) => {
|
|
391
|
-
const t =
|
|
389
|
+
const t = I(() => Object.entries(_e).map(
|
|
392
390
|
([o, { flag: r, name: i, locale: s }]) => /* @__PURE__ */ l.jsx(
|
|
393
|
-
|
|
391
|
+
ie.Item,
|
|
394
392
|
{
|
|
395
393
|
onClick: () => n(s),
|
|
396
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
397
|
-
rightSection: e.language === o && /* @__PURE__ */ l.jsx(
|
|
394
|
+
leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: r }),
|
|
395
|
+
rightSection: e.language === o && /* @__PURE__ */ l.jsx(On, { size: "15", color: "#2986cc", stroke: 2 }),
|
|
398
396
|
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: i })
|
|
399
397
|
},
|
|
400
398
|
o
|
|
401
399
|
)
|
|
402
|
-
), [
|
|
403
|
-
return /* @__PURE__ */ l.jsxs(
|
|
404
|
-
/* @__PURE__ */ l.jsx(
|
|
400
|
+
), [_e, e]);
|
|
401
|
+
return /* @__PURE__ */ l.jsxs(ie, { width: 170, children: [
|
|
402
|
+
/* @__PURE__ */ l.jsx(ie.Target, { children: /* @__PURE__ */ l.jsx(
|
|
405
403
|
H,
|
|
406
404
|
{
|
|
407
405
|
variant: "subtle",
|
|
408
406
|
size: "sm",
|
|
409
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
410
|
-
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children:
|
|
407
|
+
leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: _e[e.language].flag }),
|
|
408
|
+
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: _e[e.language].name })
|
|
411
409
|
}
|
|
412
410
|
) }),
|
|
413
|
-
/* @__PURE__ */ l.jsxs(
|
|
414
|
-
/* @__PURE__ */ l.jsx(
|
|
411
|
+
/* @__PURE__ */ l.jsxs(ie.Dropdown, { children: [
|
|
412
|
+
/* @__PURE__ */ l.jsx(ie.Label, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: ao.lang2value[e.language] }) }),
|
|
415
413
|
t
|
|
416
414
|
] })
|
|
417
415
|
] });
|
|
418
|
-
},
|
|
419
|
-
const n =
|
|
416
|
+
}, T = ({ value: e }) => {
|
|
417
|
+
const n = Y(Z);
|
|
420
418
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
421
|
-
},
|
|
422
|
-
const n =
|
|
419
|
+
}, Si = (e) => {
|
|
420
|
+
const n = Y(Z);
|
|
423
421
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
424
422
|
};
|
|
425
|
-
function
|
|
423
|
+
function pe(e, n) {
|
|
426
424
|
return n.lang2value[e.language] || n.lang2value[n.lang];
|
|
427
425
|
}
|
|
428
|
-
const
|
|
426
|
+
const vi = ({
|
|
429
427
|
message: e,
|
|
430
428
|
navigate: n
|
|
431
429
|
}) => /* @__PURE__ */ l.jsx(
|
|
@@ -439,29 +437,29 @@ const mi = ({
|
|
|
439
437
|
justifyContent: "center"
|
|
440
438
|
},
|
|
441
439
|
children: /* @__PURE__ */ l.jsx(
|
|
442
|
-
|
|
440
|
+
it,
|
|
443
441
|
{
|
|
444
442
|
color: "red",
|
|
445
443
|
title: "Not Found",
|
|
446
444
|
variant: "404 - Not Found",
|
|
447
|
-
icon: /* @__PURE__ */ l.jsx(
|
|
448
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
445
|
+
icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
|
|
446
|
+
children: /* @__PURE__ */ l.jsxs(Q, { align: "flex-start", children: [
|
|
449
447
|
e || "Sorry, the page you are looking for does not exist.",
|
|
450
448
|
/* @__PURE__ */ l.jsx(H, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
|
|
451
449
|
] })
|
|
452
450
|
}
|
|
453
451
|
)
|
|
454
452
|
}
|
|
455
|
-
),
|
|
456
|
-
|
|
453
|
+
), Ci = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
454
|
+
it,
|
|
457
455
|
{
|
|
458
456
|
color: "red",
|
|
459
457
|
title: "Not Found",
|
|
460
458
|
variant: "404 - Not Found",
|
|
461
|
-
icon: /* @__PURE__ */ l.jsx(
|
|
459
|
+
icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
|
|
462
460
|
children: e || "Sorry, the page you are looking for does not exist."
|
|
463
461
|
}
|
|
464
|
-
), Jt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }),
|
|
462
|
+
), Jt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }), wi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(z, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
|
|
465
463
|
z,
|
|
466
464
|
{
|
|
467
465
|
gap: "md",
|
|
@@ -470,30 +468,30 @@ const mi = ({
|
|
|
470
468
|
align: "center",
|
|
471
469
|
style: { height: "100%" },
|
|
472
470
|
children: [
|
|
473
|
-
/* @__PURE__ */ l.jsx(
|
|
471
|
+
/* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }),
|
|
474
472
|
e
|
|
475
473
|
]
|
|
476
474
|
}
|
|
477
|
-
),
|
|
478
|
-
/* @__PURE__ */ l.jsx(
|
|
475
|
+
), xi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(z, { gap: "md", direction: "column", justify: "center", align: "center", children: [
|
|
476
|
+
/* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }),
|
|
479
477
|
e
|
|
480
|
-
] }),
|
|
481
|
-
|
|
478
|
+
] }), Ri = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
479
|
+
it,
|
|
482
480
|
{
|
|
483
481
|
color: "red",
|
|
484
482
|
title: "Not Found",
|
|
485
483
|
variant: "403 - Not Authorized",
|
|
486
|
-
icon: /* @__PURE__ */ l.jsx(
|
|
484
|
+
icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
|
|
487
485
|
children: e || "Sorry, you are not authorized to access this page."
|
|
488
486
|
}
|
|
489
487
|
);
|
|
490
|
-
function
|
|
488
|
+
function yi(e, n) {
|
|
491
489
|
return e.reduce((t, o) => {
|
|
492
490
|
const r = n(o);
|
|
493
491
|
return t[r] || (t[r] = []), t[r].push(o), t;
|
|
494
492
|
}, {});
|
|
495
493
|
}
|
|
496
|
-
function
|
|
494
|
+
function ji(e, n) {
|
|
497
495
|
const t = [];
|
|
498
496
|
let o;
|
|
499
497
|
return e.reduce((r, i) => {
|
|
@@ -501,14 +499,14 @@ function xi(e, n) {
|
|
|
501
499
|
return s === void 0 ? (o === void 0 && (o = t.length, t.push([])), t[o].push(i)) : (r[s] === void 0 && (r[s] = t.length, t.push([])), t[r[s]].push(i)), r;
|
|
502
500
|
}, {}), t;
|
|
503
501
|
}
|
|
504
|
-
function
|
|
502
|
+
function _i(e, n) {
|
|
505
503
|
const t = /* @__PURE__ */ new Set();
|
|
506
504
|
return e.filter((o) => {
|
|
507
505
|
const r = n(o);
|
|
508
506
|
return t.has(r) ? !1 : (t.add(r), !0);
|
|
509
507
|
});
|
|
510
508
|
}
|
|
511
|
-
class
|
|
509
|
+
class Fi {
|
|
512
510
|
constructor() {
|
|
513
511
|
G(this, "items", []);
|
|
514
512
|
G(this, "seen", /* @__PURE__ */ new Set());
|
|
@@ -521,7 +519,7 @@ class yi {
|
|
|
521
519
|
return this.items;
|
|
522
520
|
}
|
|
523
521
|
}
|
|
524
|
-
class
|
|
522
|
+
class It {
|
|
525
523
|
constructor() {
|
|
526
524
|
G(this, "children", /* @__PURE__ */ new Map());
|
|
527
525
|
G(this, "isEndOfWord", !1);
|
|
@@ -530,7 +528,7 @@ class bt {
|
|
|
530
528
|
}
|
|
531
529
|
class Qt {
|
|
532
530
|
constructor() {
|
|
533
|
-
G(this, "root", new
|
|
531
|
+
G(this, "root", new It());
|
|
534
532
|
}
|
|
535
533
|
/**
|
|
536
534
|
* Inserts a word into the trie structure.
|
|
@@ -542,7 +540,7 @@ class Qt {
|
|
|
542
540
|
let t = this.root;
|
|
543
541
|
for (const o of n) {
|
|
544
542
|
let r = t.children.get(o);
|
|
545
|
-
r === void 0 && (r = new
|
|
543
|
+
r === void 0 && (r = new It(), t.children.set(o, r)), t = r;
|
|
546
544
|
}
|
|
547
545
|
t.isEndOfWord = !0, t.value = n;
|
|
548
546
|
}
|
|
@@ -567,8 +565,14 @@ class Qt {
|
|
|
567
565
|
return o;
|
|
568
566
|
}
|
|
569
567
|
}
|
|
570
|
-
|
|
571
|
-
|
|
568
|
+
function Zt(e, n) {
|
|
569
|
+
return Wt(n) ? n.getValue(e) : e[n.tsName];
|
|
570
|
+
}
|
|
571
|
+
function Pt(e, n, t) {
|
|
572
|
+
Wt(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
|
|
573
|
+
}
|
|
574
|
+
var Je = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Je || {});
|
|
575
|
+
function uo(e) {
|
|
572
576
|
const n = {}, t = {}, o = {}, r = (i, s = []) => {
|
|
573
577
|
i.forEach((a) => {
|
|
574
578
|
const u = [...s, a.key];
|
|
@@ -577,11 +581,11 @@ function go(e) {
|
|
|
577
581
|
};
|
|
578
582
|
return r(e), { key2item: n, key2fullpath: t, key2route: o };
|
|
579
583
|
}
|
|
580
|
-
function
|
|
581
|
-
const n = new
|
|
584
|
+
function go(e) {
|
|
585
|
+
const n = new fo(), t = (o) => {
|
|
582
586
|
o.forEach((r) => {
|
|
583
587
|
if (r.route !== void 0) {
|
|
584
|
-
const i = r.route.path.
|
|
588
|
+
const i = r.route.path.pathDef;
|
|
585
589
|
n.insertRoute(i, r.key);
|
|
586
590
|
}
|
|
587
591
|
r.children !== void 0 && r.children.length > 0 && t(r.children);
|
|
@@ -589,48 +593,48 @@ function co(e) {
|
|
|
589
593
|
};
|
|
590
594
|
return t(e), n;
|
|
591
595
|
}
|
|
592
|
-
function
|
|
596
|
+
function co(e, n) {
|
|
593
597
|
return e.map((t) => {
|
|
594
598
|
if (t.route !== void 0)
|
|
595
|
-
return n(t.route.role) ===
|
|
599
|
+
return n(t.route.role) === Je.Allow ? t : null;
|
|
596
600
|
if (t.children !== void 0) {
|
|
597
|
-
const o = t.children.filter((r) => r.route !== void 0 ? n(r.route.role) ===
|
|
601
|
+
const o = t.children.filter((r) => r.route !== void 0 ? n(r.route.role) === Je.Allow : !0);
|
|
598
602
|
return o.length > 0 ? { ...t, children: o } : null;
|
|
599
603
|
}
|
|
600
604
|
return t;
|
|
601
605
|
}).filter((t) => t !== null);
|
|
602
606
|
}
|
|
603
|
-
const
|
|
604
|
-
const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a =
|
|
605
|
-
() =>
|
|
607
|
+
const Ii = (e) => {
|
|
608
|
+
const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = I(() => co(e.items, e.checkPermission), [e.items, e.checkPermission]), u = I(() => go(e.items), [e.items]), { key2fullpath: g, key2route: c } = I(
|
|
609
|
+
() => uo(a),
|
|
606
610
|
[a]
|
|
607
611
|
);
|
|
608
|
-
|
|
609
|
-
const
|
|
612
|
+
ve(() => {
|
|
613
|
+
const f = window.location.pathname, d = u.findMatchingKey(f);
|
|
610
614
|
d !== void 0 && (r(new Set(g[d])), s(d));
|
|
611
|
-
}, [window.location.pathname,
|
|
612
|
-
const S =
|
|
613
|
-
function
|
|
614
|
-
var
|
|
615
|
+
}, [window.location.pathname, c]);
|
|
616
|
+
const S = I(() => {
|
|
617
|
+
function f(d, p) {
|
|
618
|
+
var C;
|
|
615
619
|
const m = d.children !== void 0 && d.children.length > 0;
|
|
616
620
|
return m ? /* @__PURE__ */ l.jsxs(
|
|
617
621
|
"div",
|
|
618
622
|
{
|
|
619
623
|
onMouseEnter: () => {
|
|
620
|
-
o.has(d.key) || t((
|
|
621
|
-
const
|
|
622
|
-
return
|
|
624
|
+
o.has(d.key) || t((v) => {
|
|
625
|
+
const j = new Set(v);
|
|
626
|
+
return j.add(d.key), j;
|
|
623
627
|
});
|
|
624
628
|
},
|
|
625
629
|
onMouseLeave: () => {
|
|
626
|
-
o.has(d.key) || t((
|
|
627
|
-
const
|
|
628
|
-
return
|
|
630
|
+
o.has(d.key) || t((v) => {
|
|
631
|
+
const j = new Set(v);
|
|
632
|
+
return j.delete(d.key), j;
|
|
629
633
|
});
|
|
630
634
|
},
|
|
631
635
|
children: [
|
|
632
636
|
/* @__PURE__ */ l.jsx(
|
|
633
|
-
|
|
637
|
+
wt,
|
|
634
638
|
{
|
|
635
639
|
active: i === d.key,
|
|
636
640
|
label: d.label,
|
|
@@ -644,7 +648,7 @@ const ji = (e) => {
|
|
|
644
648
|
ml: p === 0 ? void 0 : p === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${p})`,
|
|
645
649
|
w: "unset",
|
|
646
650
|
rightSection: m ? /* @__PURE__ */ l.jsx(
|
|
647
|
-
|
|
651
|
+
zn,
|
|
648
652
|
{
|
|
649
653
|
size: 12,
|
|
650
654
|
stroke: 1.5,
|
|
@@ -652,24 +656,24 @@ const ji = (e) => {
|
|
|
652
656
|
}
|
|
653
657
|
) : void 0,
|
|
654
658
|
opened: n.has(d.key) || o.has(d.key),
|
|
655
|
-
onClick: (
|
|
656
|
-
|
|
657
|
-
const
|
|
658
|
-
return
|
|
659
|
+
onClick: (v) => {
|
|
660
|
+
v.preventDefault(), r((j) => {
|
|
661
|
+
const w = new Set(j);
|
|
662
|
+
return j.has(d.key) ? w.delete(d.key) : w.add(d.key), w;
|
|
659
663
|
});
|
|
660
664
|
}
|
|
661
665
|
},
|
|
662
666
|
d.key
|
|
663
667
|
),
|
|
664
|
-
(o.has(d.key) || n.has(d.key)) && d.children.map((
|
|
668
|
+
(o.has(d.key) || n.has(d.key)) && d.children.map((v) => f(v, p + 1))
|
|
665
669
|
]
|
|
666
670
|
},
|
|
667
671
|
`container-${d.key}`
|
|
668
672
|
) : /* @__PURE__ */ l.jsx(
|
|
669
|
-
|
|
673
|
+
wt,
|
|
670
674
|
{
|
|
671
675
|
active: i === d.key,
|
|
672
|
-
href: (
|
|
676
|
+
href: (C = d.route) == null ? void 0 : C.path.getURL({ queryArgs: d.route.defaultPathArgs }),
|
|
673
677
|
label: d.label,
|
|
674
678
|
leftSection: d.icon,
|
|
675
679
|
styles: {
|
|
@@ -680,18 +684,18 @@ const ji = (e) => {
|
|
|
680
684
|
},
|
|
681
685
|
ml: p === 0 ? void 0 : p === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${p})`,
|
|
682
686
|
w: "unset",
|
|
683
|
-
onClick: (
|
|
684
|
-
|
|
687
|
+
onClick: (v) => {
|
|
688
|
+
v.ctrlKey || v.metaKey || (v.preventDefault(), d.route != null && d.route.path.path({ queryArgs: d.route.defaultPathArgs }).open(e.navigate));
|
|
685
689
|
}
|
|
686
690
|
},
|
|
687
691
|
d.key
|
|
688
692
|
);
|
|
689
693
|
}
|
|
690
|
-
return a.map((d) =>
|
|
694
|
+
return a.map((d) => f(d, 0));
|
|
691
695
|
}, [a, i, o, n, e.navigate]);
|
|
692
696
|
return /* @__PURE__ */ l.jsx(l.Fragment, { children: S });
|
|
693
697
|
};
|
|
694
|
-
class
|
|
698
|
+
class fo extends Qt {
|
|
695
699
|
constructor() {
|
|
696
700
|
super(...arguments);
|
|
697
701
|
G(this, "pathToKey", /* @__PURE__ */ new Map());
|
|
@@ -727,34 +731,34 @@ class po extends Qt {
|
|
|
727
731
|
return this.pathToKey.get(r.match);
|
|
728
732
|
}
|
|
729
733
|
}
|
|
730
|
-
const
|
|
731
|
-
function
|
|
734
|
+
const Fe = ({ value: e }) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e });
|
|
735
|
+
function Se(e, n) {
|
|
732
736
|
return n.toLocaleDateString(e.baseName, {
|
|
733
737
|
year: "numeric",
|
|
734
738
|
month: "short",
|
|
735
739
|
day: "2-digit"
|
|
736
740
|
});
|
|
737
741
|
}
|
|
738
|
-
function
|
|
742
|
+
function en(e, n, t = !0) {
|
|
739
743
|
const o = n.getHours().toString().padStart(2, "0"), r = n.getMinutes().toString().padStart(2, "0"), i = n.getSeconds().toString().padStart(2, "0");
|
|
740
|
-
return t ?
|
|
744
|
+
return t ? Se(e, n) + ` ${o}:${r}:${i}` : Se(e, n) + ` ${o}:${r}`;
|
|
741
745
|
}
|
|
742
|
-
const
|
|
743
|
-
const n =
|
|
744
|
-
() =>
|
|
746
|
+
const po = ({ value: e }) => {
|
|
747
|
+
const n = Y(Z), t = I(
|
|
748
|
+
() => en(n, e),
|
|
745
749
|
[n, e]
|
|
746
750
|
);
|
|
747
751
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
|
|
748
|
-
},
|
|
749
|
-
const n =
|
|
752
|
+
}, mo = ({ value: e }) => {
|
|
753
|
+
const n = Y(Z), t = I(() => Se(n, e), [n, e]);
|
|
750
754
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
|
|
751
|
-
},
|
|
752
|
-
const n =
|
|
753
|
-
const r =
|
|
755
|
+
}, Pi = ({ value: e }) => {
|
|
756
|
+
const n = Y(Z), [t, o] = I(() => {
|
|
757
|
+
const r = Se(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
|
|
754
758
|
return [r, `${i}:${s}:${a}`];
|
|
755
759
|
}, [n, e]);
|
|
756
760
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", title: o, children: t });
|
|
757
|
-
},
|
|
761
|
+
}, ho = {
|
|
758
762
|
yes: {
|
|
759
763
|
lang2value: {
|
|
760
764
|
en: "Yes",
|
|
@@ -769,28 +773,28 @@ const mo = ({ value: e }) => {
|
|
|
769
773
|
},
|
|
770
774
|
lang: "en"
|
|
771
775
|
}
|
|
772
|
-
},
|
|
773
|
-
|
|
776
|
+
}, So = ({ value: e }) => /* @__PURE__ */ l.jsx(
|
|
777
|
+
le,
|
|
774
778
|
{
|
|
775
779
|
checked: e,
|
|
776
|
-
label: /* @__PURE__ */ l.jsx(
|
|
780
|
+
label: /* @__PURE__ */ l.jsx(T, { value: ho[e ? "yes" : "no"] }),
|
|
777
781
|
readOnly: !0
|
|
778
782
|
}
|
|
779
|
-
),
|
|
783
|
+
), vo = ({ property: e, value: n }) => {
|
|
780
784
|
const t = e;
|
|
781
|
-
if (
|
|
785
|
+
if (oe(t) || t.enumType === void 0)
|
|
782
786
|
throw new Error(
|
|
783
787
|
"Invalid usage of EnumDisplay. Expect a property of type enum"
|
|
784
788
|
);
|
|
785
|
-
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(
|
|
786
|
-
},
|
|
789
|
+
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(T, { value: t.enumType.label[n] }) });
|
|
790
|
+
}, at = Ht({ link: () => null, entityRoutes: {} }), Ei = ({
|
|
787
791
|
link: e,
|
|
788
792
|
entityRoutes: n,
|
|
789
793
|
children: t
|
|
790
|
-
}) => /* @__PURE__ */ l.jsx(
|
|
791
|
-
function
|
|
794
|
+
}) => /* @__PURE__ */ l.jsx(at.Provider, { value: { link: e, entityRoutes: n }, children: t });
|
|
795
|
+
function tn(e, n, t, o) {
|
|
792
796
|
const r = e.getByName(n.targetClass), i = o[n.targetClass];
|
|
793
|
-
|
|
797
|
+
ve(() => {
|
|
794
798
|
r.fetchByIds(t);
|
|
795
799
|
}, [t]);
|
|
796
800
|
const s = {};
|
|
@@ -798,13 +802,13 @@ function en(e, n, t, o) {
|
|
|
798
802
|
s[a] = r.get(a);
|
|
799
803
|
return [s, i.view];
|
|
800
804
|
}
|
|
801
|
-
const
|
|
805
|
+
const ut = ne(
|
|
802
806
|
({
|
|
803
807
|
db: e,
|
|
804
808
|
property: n,
|
|
805
809
|
value: t
|
|
806
810
|
}) => {
|
|
807
|
-
const { link: o, entityRoutes: r } =
|
|
811
|
+
const { link: o, entityRoutes: r } = Y(at), i = I(() => [t], [t]), [s, a] = tn(
|
|
808
812
|
e,
|
|
809
813
|
n,
|
|
810
814
|
i,
|
|
@@ -821,13 +825,13 @@ const ct = W(
|
|
|
821
825
|
}
|
|
822
826
|
);
|
|
823
827
|
}
|
|
824
|
-
),
|
|
828
|
+
), dt = ne(
|
|
825
829
|
({
|
|
826
830
|
db: e,
|
|
827
831
|
property: n,
|
|
828
832
|
value: t
|
|
829
833
|
}) => {
|
|
830
|
-
const { link: o, entityRoutes: r } =
|
|
834
|
+
const { link: o, entityRoutes: r } = Y(at), [i, s] = tn(
|
|
831
835
|
e,
|
|
832
836
|
n,
|
|
833
837
|
t,
|
|
@@ -848,22 +852,22 @@ const ct = W(
|
|
|
848
852
|
);
|
|
849
853
|
}) });
|
|
850
854
|
}
|
|
851
|
-
),
|
|
852
|
-
string:
|
|
853
|
-
integer:
|
|
854
|
-
float:
|
|
855
|
-
boolean:
|
|
856
|
-
"string[]":
|
|
857
|
-
enum:
|
|
858
|
-
datetime:
|
|
859
|
-
date:
|
|
860
|
-
},
|
|
855
|
+
), ae = {
|
|
856
|
+
string: Fe,
|
|
857
|
+
integer: Fe,
|
|
858
|
+
float: Fe,
|
|
859
|
+
boolean: So,
|
|
860
|
+
"string[]": Fe,
|
|
861
|
+
enum: vo,
|
|
862
|
+
datetime: po,
|
|
863
|
+
date: mo
|
|
864
|
+
}, nn = ({
|
|
861
865
|
property: e,
|
|
862
866
|
value: n,
|
|
863
867
|
onChange: t,
|
|
864
868
|
freeze: o = !1
|
|
865
869
|
}) => /* @__PURE__ */ l.jsx(
|
|
866
|
-
|
|
870
|
+
le,
|
|
867
871
|
{
|
|
868
872
|
id: e.name,
|
|
869
873
|
checked: n,
|
|
@@ -873,13 +877,13 @@ const ct = W(
|
|
|
873
877
|
},
|
|
874
878
|
disabled: o
|
|
875
879
|
}
|
|
876
|
-
),
|
|
880
|
+
), be = ({
|
|
877
881
|
property: e,
|
|
878
882
|
value: n,
|
|
879
883
|
onChange: t,
|
|
880
884
|
freeze: o = !1
|
|
881
885
|
}) => /* @__PURE__ */ l.jsx(
|
|
882
|
-
|
|
886
|
+
B,
|
|
883
887
|
{
|
|
884
888
|
id: e.name,
|
|
885
889
|
type: "number",
|
|
@@ -890,202 +894,202 @@ const ct = W(
|
|
|
890
894
|
},
|
|
891
895
|
disabled: o
|
|
892
896
|
}
|
|
893
|
-
),
|
|
897
|
+
), Co = {
|
|
894
898
|
lang2value: {
|
|
895
899
|
en: "The leading zero is not necessary in international phone number format. For example, if your phone number is 0123456789, you should enter it as 123-456-789.",
|
|
896
900
|
vi: "Số 0 đầu tiên không cần thiết trong định dạng điện thoại quốc tế. Ví dụ, nếu số điện thoại của bạn là 0123456789, bạn nên nhập nó là 123-456-789."
|
|
897
901
|
},
|
|
898
902
|
lang: "en"
|
|
899
|
-
},
|
|
903
|
+
}, wo = {
|
|
900
904
|
lang2value: {
|
|
901
905
|
en: "No valid country code found.",
|
|
902
906
|
vi: "Không tìm thấy mã quốc gia hợp lệ. "
|
|
903
907
|
},
|
|
904
908
|
lang: "en"
|
|
905
|
-
},
|
|
909
|
+
}, se = {
|
|
906
910
|
84: {
|
|
907
911
|
name: "Vietnam",
|
|
908
|
-
flags: [
|
|
912
|
+
flags: [V.VN]
|
|
909
913
|
},
|
|
910
914
|
1: {
|
|
911
915
|
name: "US, Canada",
|
|
912
|
-
flags: [
|
|
916
|
+
flags: [V.US, V.CA]
|
|
913
917
|
},
|
|
914
918
|
61: {
|
|
915
919
|
name: "Australia",
|
|
916
|
-
flags: [
|
|
920
|
+
flags: [V.AU]
|
|
917
921
|
},
|
|
918
922
|
81: {
|
|
919
923
|
name: "Japan",
|
|
920
|
-
flags: [
|
|
924
|
+
flags: [V.JP]
|
|
921
925
|
},
|
|
922
926
|
44: {
|
|
923
927
|
name: "UK",
|
|
924
|
-
flags: [
|
|
928
|
+
flags: [V.UK]
|
|
925
929
|
},
|
|
926
930
|
33: {
|
|
927
931
|
name: "France",
|
|
928
|
-
flags: [
|
|
932
|
+
flags: [V.FR]
|
|
929
933
|
},
|
|
930
934
|
49: {
|
|
931
935
|
name: "Germany",
|
|
932
|
-
flags: [
|
|
936
|
+
flags: [V.DE]
|
|
933
937
|
},
|
|
934
938
|
91: {
|
|
935
939
|
name: "India",
|
|
936
|
-
flags: [
|
|
940
|
+
flags: [V.IN]
|
|
937
941
|
},
|
|
938
942
|
55: {
|
|
939
943
|
name: "Brazil",
|
|
940
|
-
flags: [
|
|
944
|
+
flags: [V.BR]
|
|
941
945
|
},
|
|
942
946
|
34: {
|
|
943
947
|
name: "Spain",
|
|
944
|
-
flags: [
|
|
948
|
+
flags: [V.ES]
|
|
945
949
|
},
|
|
946
950
|
39: {
|
|
947
951
|
name: "Italy",
|
|
948
|
-
flags: [
|
|
952
|
+
flags: [V.IT]
|
|
949
953
|
},
|
|
950
954
|
64: {
|
|
951
955
|
name: "New Zealand",
|
|
952
|
-
flags: [
|
|
956
|
+
flags: [V.NZ]
|
|
953
957
|
},
|
|
954
958
|
52: {
|
|
955
959
|
name: "Mexico",
|
|
956
|
-
flags: [
|
|
960
|
+
flags: [V.MX]
|
|
957
961
|
},
|
|
958
962
|
86: {
|
|
959
963
|
name: "China",
|
|
960
|
-
flags: [
|
|
964
|
+
flags: [V.CN]
|
|
961
965
|
},
|
|
962
966
|
855: {
|
|
963
967
|
name: "Cambodia",
|
|
964
|
-
flags: [
|
|
968
|
+
flags: [V.CAM]
|
|
965
969
|
}
|
|
966
|
-
},
|
|
970
|
+
}, xo = (e, n) => {
|
|
967
971
|
if (e === "" || e === void 0)
|
|
968
972
|
return { match: "84", remaining: "" };
|
|
969
973
|
const t = e.replace(/[^\d]/g, ""), o = n.findLongestPrefix(t);
|
|
970
974
|
if (o.match === "")
|
|
971
975
|
throw new Error(`No valid country code found for phone number: ${e}`);
|
|
972
976
|
return o;
|
|
973
|
-
},
|
|
974
|
-
const n =
|
|
977
|
+
}, Et = ({ value: e }) => {
|
|
978
|
+
const n = se[e];
|
|
975
979
|
if (n !== void 0)
|
|
976
980
|
return /* @__PURE__ */ l.jsxs(k, { gap: "sm", wrap: "nowrap", align: "center", children: [
|
|
977
981
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", children: [
|
|
978
982
|
"+",
|
|
979
983
|
e
|
|
980
984
|
] }),
|
|
981
|
-
/* @__PURE__ */ l.jsx(k, { gap: 4, wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(
|
|
985
|
+
/* @__PURE__ */ l.jsx(k, { gap: 4, wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(Xe, { flag: t }, o)) })
|
|
982
986
|
] });
|
|
983
|
-
},
|
|
987
|
+
}, Ro = ({
|
|
984
988
|
value: e,
|
|
985
989
|
onChange: n,
|
|
986
990
|
error: t,
|
|
987
991
|
id: o,
|
|
988
992
|
disabled: r = !1
|
|
989
993
|
}) => {
|
|
990
|
-
const [i, s] = M(""), [a, u] = M(!1), [g,
|
|
991
|
-
const
|
|
992
|
-
return Object.keys(
|
|
993
|
-
|
|
994
|
-
}),
|
|
995
|
-
}, [
|
|
994
|
+
const [i, s] = M(""), [a, u] = M(!1), [g, c] = M(""), [S, f] = M(!1), d = I(() => {
|
|
995
|
+
const x = new Qt();
|
|
996
|
+
return Object.keys(se).forEach((F) => {
|
|
997
|
+
x.insert(F);
|
|
998
|
+
}), x;
|
|
999
|
+
}, [se]), { rawInput: p } = I(() => {
|
|
996
1000
|
try {
|
|
997
|
-
const { match:
|
|
1001
|
+
const { match: x, remaining: F } = xo(
|
|
998
1002
|
e,
|
|
999
1003
|
d
|
|
1000
1004
|
);
|
|
1001
|
-
return
|
|
1002
|
-
rawInput:
|
|
1005
|
+
return c(x), f(!1), {
|
|
1006
|
+
rawInput: F
|
|
1003
1007
|
};
|
|
1004
1008
|
} catch {
|
|
1005
|
-
return
|
|
1009
|
+
return f(!0), c(""), {
|
|
1006
1010
|
rawInput: e
|
|
1007
1011
|
};
|
|
1008
1012
|
}
|
|
1009
|
-
}, [e]), m =
|
|
1013
|
+
}, [e]), m = qt({
|
|
1010
1014
|
onDropdownClose: () => {
|
|
1011
1015
|
m.resetSelectedOption(), s("");
|
|
1012
1016
|
},
|
|
1013
1017
|
onDropdownOpen: () => {
|
|
1014
1018
|
m.updateSelectedOptionIndex("active");
|
|
1015
1019
|
}
|
|
1016
|
-
}),
|
|
1017
|
-
if (
|
|
1018
|
-
return `+${
|
|
1019
|
-
const L =
|
|
1020
|
-
return L.length === 0 ? `+${
|
|
1021
|
-
},
|
|
1020
|
+
}), C = I(() => Object.keys(se), [se]), v = (x, F) => {
|
|
1021
|
+
if (x === void 0)
|
|
1022
|
+
return `+${F}`;
|
|
1023
|
+
const L = x.replace(/[^\d]/g, "");
|
|
1024
|
+
return L.length === 0 ? `+${F}` : L.startsWith("0") ? (u(!0), `+${F}${L}`) : (u(!1), `+${F}${L}`);
|
|
1025
|
+
}, j = I(() => C.filter((x) => se[x].name.toLowerCase().includes(i.toLowerCase()) || x.includes(i)), [i, C]), w = I(() => j.map((x, F) => /* @__PURE__ */ l.jsx(N.Option, { value: x, children: /* @__PURE__ */ l.jsx(Et, { value: x }) }, F)), [j]);
|
|
1022
1026
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
1023
1027
|
/* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsxs(k, { gap: 5, children: [
|
|
1024
1028
|
/* @__PURE__ */ l.jsxs(
|
|
1025
|
-
|
|
1029
|
+
N,
|
|
1026
1030
|
{
|
|
1027
1031
|
store: m,
|
|
1028
1032
|
position: "top-start",
|
|
1029
|
-
onOptionSubmit: (
|
|
1033
|
+
onOptionSubmit: (x) => {
|
|
1030
1034
|
s(""), m.closeDropdown(), n({
|
|
1031
|
-
target: { value:
|
|
1035
|
+
target: { value: v(p, x) }
|
|
1032
1036
|
});
|
|
1033
1037
|
},
|
|
1034
1038
|
disabled: r,
|
|
1035
1039
|
children: [
|
|
1036
|
-
/* @__PURE__ */ l.jsx(
|
|
1040
|
+
/* @__PURE__ */ l.jsx(N.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1037
1041
|
Mn,
|
|
1038
1042
|
{
|
|
1039
1043
|
component: "button",
|
|
1040
1044
|
type: "button",
|
|
1041
1045
|
pointer: !0,
|
|
1042
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
1046
|
+
rightSection: /* @__PURE__ */ l.jsx(N.Chevron, {}),
|
|
1043
1047
|
onClick: () => m.toggleDropdown(),
|
|
1044
1048
|
rightSectionPointerEvents: "none",
|
|
1045
1049
|
w: 110,
|
|
1046
1050
|
disabled: r,
|
|
1047
|
-
children: /* @__PURE__ */ l.jsx(
|
|
1051
|
+
children: /* @__PURE__ */ l.jsx(Et, { value: g })
|
|
1048
1052
|
}
|
|
1049
1053
|
) }),
|
|
1050
|
-
/* @__PURE__ */ l.jsxs(
|
|
1054
|
+
/* @__PURE__ */ l.jsxs(N.Dropdown, { children: [
|
|
1051
1055
|
/* @__PURE__ */ l.jsx(
|
|
1052
|
-
|
|
1056
|
+
N.Search,
|
|
1053
1057
|
{
|
|
1054
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
1058
|
+
leftSection: /* @__PURE__ */ l.jsx(lt, { size: 14, stroke: 1.5 }),
|
|
1055
1059
|
placeholder: ".....",
|
|
1056
1060
|
value: i,
|
|
1057
|
-
onChange: (
|
|
1058
|
-
s(
|
|
1061
|
+
onChange: (x) => {
|
|
1062
|
+
s(x.currentTarget.value);
|
|
1059
1063
|
},
|
|
1060
1064
|
disabled: r
|
|
1061
1065
|
}
|
|
1062
1066
|
),
|
|
1063
|
-
/* @__PURE__ */ l.jsx(
|
|
1067
|
+
/* @__PURE__ */ l.jsx(N.Options, { children: w.length > 0 ? w : /* @__PURE__ */ l.jsx(N.Empty, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: "Nothing found" }) }) })
|
|
1064
1068
|
] })
|
|
1065
1069
|
]
|
|
1066
1070
|
}
|
|
1067
1071
|
),
|
|
1068
1072
|
g === "" ? /* @__PURE__ */ l.jsx(
|
|
1069
|
-
|
|
1073
|
+
B,
|
|
1070
1074
|
{
|
|
1071
1075
|
id: o,
|
|
1072
1076
|
value: p,
|
|
1073
1077
|
type: "phone_number",
|
|
1074
|
-
onChange: (
|
|
1075
|
-
n({ target: { value:
|
|
1078
|
+
onChange: (x) => {
|
|
1079
|
+
n({ target: { value: x.target.value } });
|
|
1076
1080
|
},
|
|
1077
1081
|
error: t,
|
|
1078
1082
|
flex: 1,
|
|
1079
1083
|
disabled: r
|
|
1080
1084
|
}
|
|
1081
1085
|
) : /* @__PURE__ */ l.jsx(
|
|
1082
|
-
|
|
1086
|
+
B,
|
|
1083
1087
|
{
|
|
1084
1088
|
id: o,
|
|
1085
1089
|
value: p,
|
|
1086
1090
|
type: "phone_number",
|
|
1087
|
-
onAccept: (
|
|
1088
|
-
const
|
|
1091
|
+
onAccept: (x) => {
|
|
1092
|
+
const F = x.replace(/[^\d]/g, ""), L = v(F, g);
|
|
1089
1093
|
L !== e && n({
|
|
1090
1094
|
target: { value: L }
|
|
1091
1095
|
});
|
|
@@ -1098,16 +1102,16 @@ const ct = W(
|
|
|
1098
1102
|
}
|
|
1099
1103
|
)
|
|
1100
1104
|
] }) }) }),
|
|
1101
|
-
(a || S || t && typeof t == "string") && /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsx(
|
|
1105
|
+
(a || S || t && typeof t == "string") && /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsx(B.Error, { children: a ? /* @__PURE__ */ l.jsx(T, { value: Co }) : S ? /* @__PURE__ */ l.jsx(T, { value: wo }) : t }) }) })
|
|
1102
1106
|
] });
|
|
1103
|
-
},
|
|
1107
|
+
}, me = ({
|
|
1104
1108
|
property: e,
|
|
1105
1109
|
error: n,
|
|
1106
1110
|
value: t,
|
|
1107
1111
|
onChange: o,
|
|
1108
1112
|
freeze: r = !1
|
|
1109
1113
|
}) => {
|
|
1110
|
-
const [i, s] =
|
|
1114
|
+
const [i, s] = I(() => e.constraints.includes("password") ? ["password", Bt] : e.constraints.includes("phone_number") ? ["phone_number", Ro] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", B], [e.constraints]);
|
|
1111
1115
|
return /* @__PURE__ */ l.jsx(
|
|
1112
1116
|
s,
|
|
1113
1117
|
{
|
|
@@ -1119,13 +1123,13 @@ const ct = W(
|
|
|
1119
1123
|
disabled: r
|
|
1120
1124
|
}
|
|
1121
1125
|
);
|
|
1122
|
-
},
|
|
1126
|
+
}, yo = ({
|
|
1123
1127
|
property: e,
|
|
1124
1128
|
value: n,
|
|
1125
1129
|
onChange: t,
|
|
1126
1130
|
freeze: o = !1
|
|
1127
1131
|
}) => /* @__PURE__ */ l.jsx(
|
|
1128
|
-
|
|
1132
|
+
We,
|
|
1129
1133
|
{
|
|
1130
1134
|
id: e.tsName,
|
|
1131
1135
|
value: n || null,
|
|
@@ -1141,45 +1145,84 @@ const ct = W(
|
|
|
1141
1145
|
flex: 1,
|
|
1142
1146
|
disabled: o
|
|
1143
1147
|
}
|
|
1144
|
-
),
|
|
1148
|
+
), jo = ({
|
|
1145
1149
|
property: e,
|
|
1146
1150
|
value: n,
|
|
1147
1151
|
onChange: t,
|
|
1148
1152
|
freeze: o = !1
|
|
1149
1153
|
}) => {
|
|
1150
|
-
|
|
1151
|
-
if (
|
|
1154
|
+
const r = Y(Z);
|
|
1155
|
+
if (oe(e) || e.enumType === void 0)
|
|
1152
1156
|
throw new Error(
|
|
1153
1157
|
"Invalid usage of EnumInput. Expect a property of type enum"
|
|
1154
1158
|
);
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
}
|
|
1159
|
+
const i = e.enumType, [s, a] = I(() => {
|
|
1160
|
+
const u = {}, g = Object.entries(i.label).map(
|
|
1161
|
+
([c, S]) => {
|
|
1162
|
+
const f = isNaN(Number(c)) ? c : Number(c);
|
|
1163
|
+
return u[c] = f, {
|
|
1164
|
+
value: c,
|
|
1165
|
+
label: pe(r, S)
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1168
|
+
);
|
|
1169
|
+
return [u, g];
|
|
1170
|
+
}, [r, i]);
|
|
1171
|
+
return /* @__PURE__ */ l.jsx(
|
|
1172
|
+
bn,
|
|
1173
|
+
{
|
|
1174
|
+
data: a,
|
|
1175
|
+
value: n === void 0 ? null : String(n),
|
|
1176
|
+
onChange: (u) => {
|
|
1177
|
+
if (u === null) {
|
|
1178
|
+
t(void 0);
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
t(s[u]);
|
|
1182
|
+
},
|
|
1183
|
+
disabled: o,
|
|
1184
|
+
allowDeselect: !e.isRequired
|
|
1164
1185
|
}
|
|
1165
|
-
)
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1186
|
+
);
|
|
1187
|
+
}, _o = {
|
|
1188
|
+
lang2value: {
|
|
1189
|
+
en: "Confirm",
|
|
1190
|
+
vi: "Xác Nhận"
|
|
1191
|
+
},
|
|
1192
|
+
lang: "en"
|
|
1193
|
+
}, Fo = new Qn("confirmation.valuesDoNotMatch"), $i = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1194
|
+
/* @__PURE__ */ l.jsx(T, { value: _o }),
|
|
1195
|
+
" ",
|
|
1196
|
+
/* @__PURE__ */ l.jsx(T, { value: e.label })
|
|
1197
|
+
] }), Mi = ({
|
|
1198
|
+
property: e,
|
|
1199
|
+
error: n,
|
|
1200
|
+
value: t,
|
|
1201
|
+
onChange: o,
|
|
1202
|
+
freeze: r = !1
|
|
1203
|
+
}) => {
|
|
1204
|
+
const [i, s] = M(""), [a, u] = M(!1), [g, c] = I(() => e.constraints.includes("password") ? ["password", Bt] : ["text", B], [e.constraints]), S = I(() => {
|
|
1205
|
+
if (a && i !== t)
|
|
1206
|
+
return Fo.t({ args: { name: e.label } });
|
|
1207
|
+
}, [a, i, t, e.label]), f = n || S;
|
|
1170
1208
|
return /* @__PURE__ */ l.jsx(
|
|
1171
|
-
|
|
1209
|
+
c,
|
|
1172
1210
|
{
|
|
1173
|
-
|
|
1174
|
-
value:
|
|
1175
|
-
|
|
1176
|
-
|
|
1211
|
+
id: `${e.name}-confirm`,
|
|
1212
|
+
value: i,
|
|
1213
|
+
type: g,
|
|
1214
|
+
onChange: (d) => {
|
|
1215
|
+
const p = d.target.value;
|
|
1216
|
+
s(p), u(!0), o(p);
|
|
1217
|
+
},
|
|
1218
|
+
error: f,
|
|
1219
|
+
disabled: r
|
|
1177
1220
|
}
|
|
1178
1221
|
);
|
|
1179
1222
|
};
|
|
1180
|
-
function
|
|
1223
|
+
function Io(e, n) {
|
|
1181
1224
|
const [t, o] = M(""), [r, i] = M([]);
|
|
1182
|
-
return
|
|
1225
|
+
return ve(() => {
|
|
1183
1226
|
e.getByName(n.targetClass).fetch({ limit: 100, offset: 0 }).then((a) => i(a.records));
|
|
1184
1227
|
}, [n.name]), {
|
|
1185
1228
|
data: r,
|
|
@@ -1196,9 +1239,9 @@ function Fo(e, n) {
|
|
|
1196
1239
|
table: e.getByName(n.targetClass)
|
|
1197
1240
|
};
|
|
1198
1241
|
}
|
|
1199
|
-
const
|
|
1242
|
+
const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }), on = ne(
|
|
1200
1243
|
(e) => /* @__PURE__ */ l.jsx("h1", { children: "SingleForeignKey" })
|
|
1201
|
-
),
|
|
1244
|
+
), rn = ne(
|
|
1202
1245
|
({
|
|
1203
1246
|
db: e,
|
|
1204
1247
|
property: n,
|
|
@@ -1206,13 +1249,13 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1206
1249
|
onChange: o,
|
|
1207
1250
|
freeze: r = !1
|
|
1208
1251
|
}) => {
|
|
1209
|
-
const { table: i, data: s, query: a, setQuery: u } =
|
|
1252
|
+
const { table: i, data: s, query: a, setQuery: u } = Io(
|
|
1210
1253
|
e,
|
|
1211
1254
|
n
|
|
1212
1255
|
);
|
|
1213
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1256
|
+
return /* @__PURE__ */ l.jsxs(Q, { gap: "sm", children: [
|
|
1214
1257
|
/* @__PURE__ */ l.jsx(
|
|
1215
|
-
|
|
1258
|
+
$o,
|
|
1216
1259
|
{
|
|
1217
1260
|
name: n.name,
|
|
1218
1261
|
query: a,
|
|
@@ -1221,25 +1264,25 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1221
1264
|
onSelect: (g) => {
|
|
1222
1265
|
t.includes(g) || o([...t, g]);
|
|
1223
1266
|
},
|
|
1224
|
-
renderOption:
|
|
1267
|
+
renderOption: Po,
|
|
1225
1268
|
isIdInteger: n.datatype === "integer",
|
|
1226
1269
|
freeze: r
|
|
1227
1270
|
}
|
|
1228
1271
|
),
|
|
1229
1272
|
/* @__PURE__ */ l.jsx(
|
|
1230
|
-
|
|
1273
|
+
Mo,
|
|
1231
1274
|
{
|
|
1232
1275
|
items: t.map((g) => i.get(g)),
|
|
1233
1276
|
onDelete: (g) => {
|
|
1234
|
-
o(t.filter((
|
|
1277
|
+
o(t.filter((c) => c !== g.id));
|
|
1235
1278
|
},
|
|
1236
|
-
render:
|
|
1279
|
+
render: Eo,
|
|
1237
1280
|
freeze: r
|
|
1238
1281
|
}
|
|
1239
1282
|
)
|
|
1240
1283
|
] });
|
|
1241
1284
|
}
|
|
1242
|
-
),
|
|
1285
|
+
), $o = ({
|
|
1243
1286
|
name: e,
|
|
1244
1287
|
data: n,
|
|
1245
1288
|
onSelect: t,
|
|
@@ -1249,65 +1292,65 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1249
1292
|
setQuery: s,
|
|
1250
1293
|
freeze: a = !1
|
|
1251
1294
|
}) => {
|
|
1252
|
-
const u =
|
|
1295
|
+
const u = qt({
|
|
1253
1296
|
onDropdownClose: () => u.resetSelectedOption()
|
|
1254
|
-
}), g =
|
|
1297
|
+
}), g = I(() => n.map((c) => (
|
|
1255
1298
|
// value has to be a string
|
|
1256
|
-
/* @__PURE__ */ l.jsx(
|
|
1299
|
+
/* @__PURE__ */ l.jsx(N.Option, { value: c.id.toString(), children: o(c) }, c.id)
|
|
1257
1300
|
)), [n]);
|
|
1258
1301
|
return /* @__PURE__ */ l.jsxs(
|
|
1259
|
-
|
|
1302
|
+
N,
|
|
1260
1303
|
{
|
|
1261
1304
|
store: u,
|
|
1262
|
-
onOptionSubmit: (
|
|
1263
|
-
t(r ? parseInt(
|
|
1305
|
+
onOptionSubmit: (c) => {
|
|
1306
|
+
t(r ? parseInt(c) : c), s(""), u.closeDropdown();
|
|
1264
1307
|
},
|
|
1265
1308
|
offset: 0,
|
|
1266
1309
|
shadow: "sm",
|
|
1267
1310
|
disabled: a,
|
|
1268
1311
|
children: [
|
|
1269
|
-
/* @__PURE__ */ l.jsx(
|
|
1270
|
-
|
|
1312
|
+
/* @__PURE__ */ l.jsx(N.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1313
|
+
B,
|
|
1271
1314
|
{
|
|
1272
1315
|
id: e,
|
|
1273
1316
|
pointer: !a,
|
|
1274
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
1317
|
+
rightSection: /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }),
|
|
1275
1318
|
rightSectionPointerEvents: "none",
|
|
1276
1319
|
onClick: () => u.toggleDropdown(),
|
|
1277
1320
|
placeholder: "Type to search...",
|
|
1278
1321
|
value: i,
|
|
1279
|
-
onChange: (
|
|
1322
|
+
onChange: (c) => s(c.currentTarget.value),
|
|
1280
1323
|
disabled: a
|
|
1281
1324
|
}
|
|
1282
1325
|
) }),
|
|
1283
|
-
/* @__PURE__ */ l.jsx(
|
|
1326
|
+
/* @__PURE__ */ l.jsx(N.Dropdown, { children: /* @__PURE__ */ l.jsx(N.Options, { children: g.length === 0 ? /* @__PURE__ */ l.jsx(N.Empty, { children: "Nothing found" }) : g }) })
|
|
1284
1327
|
]
|
|
1285
1328
|
}
|
|
1286
1329
|
);
|
|
1287
|
-
},
|
|
1330
|
+
}, Mo = ({
|
|
1288
1331
|
items: e,
|
|
1289
1332
|
onDelete: n,
|
|
1290
1333
|
render: t,
|
|
1291
1334
|
freeze: o = !1
|
|
1292
1335
|
}) => {
|
|
1293
|
-
const r =
|
|
1336
|
+
const r = I(() => {
|
|
1294
1337
|
const i = [];
|
|
1295
1338
|
for (let s = 0; s < e.length; s++) {
|
|
1296
1339
|
const a = e[s];
|
|
1297
1340
|
i.push(
|
|
1298
1341
|
/* @__PURE__ */ l.jsxs(k, { justify: "space-between", p: "sm", children: [
|
|
1299
1342
|
t(a),
|
|
1300
|
-
!o && /* @__PURE__ */ l.jsx(
|
|
1343
|
+
!o && /* @__PURE__ */ l.jsx(Dn, { size: "sm", onClick: () => n(a) })
|
|
1301
1344
|
] }, s)
|
|
1302
|
-
), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(
|
|
1345
|
+
), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(Vn, {}, `divider-${s}`));
|
|
1303
1346
|
}
|
|
1304
1347
|
return i;
|
|
1305
1348
|
}, [e, o]);
|
|
1306
1349
|
if (r.length !== 0)
|
|
1307
|
-
return /* @__PURE__ */ l.jsx(
|
|
1308
|
-
},
|
|
1350
|
+
return /* @__PURE__ */ l.jsx(te, { bd: "1px solid #ddd", children: r });
|
|
1351
|
+
}, bo = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => /* @__PURE__ */ l.jsxs(z, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1309
1352
|
/* @__PURE__ */ l.jsx(
|
|
1310
|
-
|
|
1353
|
+
We,
|
|
1311
1354
|
{
|
|
1312
1355
|
id: e.tsName,
|
|
1313
1356
|
value: (n == null ? void 0 : n.start) || null,
|
|
@@ -1323,12 +1366,12 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1323
1366
|
disabled: o,
|
|
1324
1367
|
popoverProps: { withinPortal: !1 },
|
|
1325
1368
|
flex: 1,
|
|
1326
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
1369
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1327
1370
|
}
|
|
1328
1371
|
),
|
|
1329
1372
|
/* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
|
|
1330
1373
|
/* @__PURE__ */ l.jsx(
|
|
1331
|
-
|
|
1374
|
+
We,
|
|
1332
1375
|
{
|
|
1333
1376
|
id: e.tsName,
|
|
1334
1377
|
value: (n == null ? void 0 : n.end) || null,
|
|
@@ -1344,12 +1387,12 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1344
1387
|
disabled: o,
|
|
1345
1388
|
popoverProps: { withinPortal: !1 },
|
|
1346
1389
|
flex: 1,
|
|
1347
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
1390
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1348
1391
|
}
|
|
1349
1392
|
)
|
|
1350
|
-
] }),
|
|
1393
|
+
] }), Do = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => /* @__PURE__ */ l.jsxs(z, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1351
1394
|
/* @__PURE__ */ l.jsx(
|
|
1352
|
-
|
|
1395
|
+
yt,
|
|
1353
1396
|
{
|
|
1354
1397
|
id: e.tsName,
|
|
1355
1398
|
value: (n == null ? void 0 : n.start) || null,
|
|
@@ -1366,12 +1409,12 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1366
1409
|
popoverProps: { withinPortal: !1 },
|
|
1367
1410
|
flex: 1,
|
|
1368
1411
|
withSeconds: !1,
|
|
1369
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
1412
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1370
1413
|
}
|
|
1371
1414
|
),
|
|
1372
1415
|
/* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
|
|
1373
1416
|
/* @__PURE__ */ l.jsx(
|
|
1374
|
-
|
|
1417
|
+
yt,
|
|
1375
1418
|
{
|
|
1376
1419
|
id: e.tsName,
|
|
1377
1420
|
value: (n == null ? void 0 : n.end) || null,
|
|
@@ -1388,21 +1431,21 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1388
1431
|
popoverProps: { withinPortal: !1 },
|
|
1389
1432
|
flex: 1,
|
|
1390
1433
|
withSeconds: !1,
|
|
1391
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
1434
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1392
1435
|
}
|
|
1393
1436
|
)
|
|
1394
|
-
] }),
|
|
1395
|
-
integer:
|
|
1396
|
-
float:
|
|
1397
|
-
string:
|
|
1398
|
-
boolean:
|
|
1399
|
-
"string[]":
|
|
1400
|
-
enum:
|
|
1401
|
-
date:
|
|
1402
|
-
},
|
|
1403
|
-
requiredLabelLeft:
|
|
1404
|
-
requiredLabelRight:
|
|
1405
|
-
},
|
|
1437
|
+
] }), $t = {
|
|
1438
|
+
integer: be,
|
|
1439
|
+
float: be,
|
|
1440
|
+
string: me,
|
|
1441
|
+
boolean: nn,
|
|
1442
|
+
"string[]": me,
|
|
1443
|
+
enum: jo,
|
|
1444
|
+
date: yo
|
|
1445
|
+
}, Vo = "_requiredLabelLeft_l5p83_1", To = "_requiredLabelRight_l5p83_11", Mt = {
|
|
1446
|
+
requiredLabelLeft: Vo,
|
|
1447
|
+
requiredLabelRight: To
|
|
1448
|
+
}, sn = ({
|
|
1406
1449
|
label: e,
|
|
1407
1450
|
name: n,
|
|
1408
1451
|
required: t = !1,
|
|
@@ -1410,11 +1453,11 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1410
1453
|
style: r,
|
|
1411
1454
|
align: i = "left"
|
|
1412
1455
|
}) => {
|
|
1413
|
-
const s = t ? i === "left" ?
|
|
1456
|
+
const s = t ? i === "left" ? Mt.requiredLabelRight : Mt.requiredLabelLeft : "";
|
|
1414
1457
|
return /* @__PURE__ */ l.jsx(z, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(k, { gap: 4, children: [
|
|
1415
1458
|
/* @__PURE__ */ l.jsx(P, { size: "sm", className: s, children: e }),
|
|
1416
|
-
o !== void 0 && /* @__PURE__ */ l.jsx(
|
|
1417
|
-
|
|
1459
|
+
o !== void 0 && /* @__PURE__ */ l.jsx(Ut, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
|
|
1460
|
+
Yt,
|
|
1418
1461
|
{
|
|
1419
1462
|
size: 16,
|
|
1420
1463
|
stroke: 1.5,
|
|
@@ -1422,49 +1465,54 @@ const Io = (e) => e.name, Po = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1422
1465
|
}
|
|
1423
1466
|
) })
|
|
1424
1467
|
] }) }) });
|
|
1425
|
-
},
|
|
1468
|
+
}, Ao = {
|
|
1426
1469
|
type: "vertical",
|
|
1427
1470
|
helpAlwaysVisible: !1
|
|
1428
|
-
},
|
|
1471
|
+
}, bt = ne(
|
|
1429
1472
|
({
|
|
1430
1473
|
store: e,
|
|
1431
1474
|
record: n,
|
|
1432
1475
|
property: t,
|
|
1433
|
-
layout: o =
|
|
1476
|
+
layout: o = Ao,
|
|
1434
1477
|
InputComponent: r,
|
|
1435
|
-
|
|
1436
|
-
|
|
1478
|
+
freeze: i = !1,
|
|
1479
|
+
label: s,
|
|
1480
|
+
onChange: a,
|
|
1481
|
+
visible: u
|
|
1437
1482
|
}) => {
|
|
1438
|
-
const [
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1483
|
+
const [g, c] = M(void 0);
|
|
1484
|
+
if (u !== void 0 && !u(n))
|
|
1485
|
+
return /* @__PURE__ */ l.jsx("div", {});
|
|
1486
|
+
const S = Zt(n, t);
|
|
1487
|
+
return a === void 0 && (a = (f) => {
|
|
1488
|
+
var p;
|
|
1489
|
+
if (Xt(n))
|
|
1490
|
+
Pt(n, t, f);
|
|
1442
1491
|
else {
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1492
|
+
const m = n.toDraft();
|
|
1493
|
+
Pt(m, t, f), e.setDraft(m);
|
|
1445
1494
|
}
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
(
|
|
1495
|
+
const d = t.validator(f);
|
|
1496
|
+
d.isValid ? c(void 0) : c(
|
|
1497
|
+
(p = d.errorMessage) == null ? void 0 : p.t({ args: { name: t.label } })
|
|
1449
1498
|
);
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
rn,
|
|
1499
|
+
}), /* @__PURE__ */ l.jsx(
|
|
1500
|
+
No,
|
|
1453
1501
|
{
|
|
1454
1502
|
db: e.db,
|
|
1455
1503
|
property: t,
|
|
1456
1504
|
layout: o,
|
|
1457
1505
|
InputComponent: r,
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
onChange:
|
|
1506
|
+
freeze: i,
|
|
1507
|
+
value: S,
|
|
1508
|
+
error: g,
|
|
1509
|
+
label: s,
|
|
1510
|
+
onChange: a
|
|
1463
1511
|
}
|
|
1464
1512
|
);
|
|
1465
1513
|
}
|
|
1466
1514
|
);
|
|
1467
|
-
function
|
|
1515
|
+
function No({
|
|
1468
1516
|
db: e,
|
|
1469
1517
|
layout: n,
|
|
1470
1518
|
property: t,
|
|
@@ -1472,58 +1520,56 @@ function rn({
|
|
|
1472
1520
|
freeze: r,
|
|
1473
1521
|
value: i,
|
|
1474
1522
|
error: s,
|
|
1475
|
-
|
|
1523
|
+
label: a,
|
|
1524
|
+
onChange: u
|
|
1476
1525
|
}) {
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
/* @__PURE__ */ l.
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
{
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
let u = /* @__PURE__ */ l.jsx(D, { value: t.label });
|
|
1518
|
-
return !n.helpAlwaysVisible && t.description !== void 0 && (u = /* @__PURE__ */ l.jsxs(k, { gap: 4, style: { display: "inline-flex" }, children: [
|
|
1519
|
-
u,
|
|
1526
|
+
return ko(n) ? /* @__PURE__ */ l.jsxs(Q, { gap: 5, children: [
|
|
1527
|
+
/* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
1528
|
+
/* @__PURE__ */ l.jsx(
|
|
1529
|
+
$.Col,
|
|
1530
|
+
{
|
|
1531
|
+
span: n.labelCol,
|
|
1532
|
+
style: {
|
|
1533
|
+
display: "flex",
|
|
1534
|
+
justifyContent: n.align || "left"
|
|
1535
|
+
},
|
|
1536
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1537
|
+
sn,
|
|
1538
|
+
{
|
|
1539
|
+
label: /* @__PURE__ */ l.jsx(T, { value: t.label }),
|
|
1540
|
+
name: t.name,
|
|
1541
|
+
required: t.isRequired,
|
|
1542
|
+
tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: t.description }) : void 0,
|
|
1543
|
+
align: n.align
|
|
1544
|
+
}
|
|
1545
|
+
)
|
|
1546
|
+
}
|
|
1547
|
+
),
|
|
1548
|
+
/* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
1549
|
+
o,
|
|
1550
|
+
{
|
|
1551
|
+
db: e,
|
|
1552
|
+
property: t,
|
|
1553
|
+
value: i,
|
|
1554
|
+
error: s !== void 0,
|
|
1555
|
+
onChange: u,
|
|
1556
|
+
freeze: r
|
|
1557
|
+
}
|
|
1558
|
+
) })
|
|
1559
|
+
] }),
|
|
1560
|
+
s !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
1561
|
+
/* @__PURE__ */ l.jsx($.Col, { span: n.labelCol }),
|
|
1562
|
+
/* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(B.Error, { children: s }) })
|
|
1563
|
+
] })
|
|
1564
|
+
] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(T, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(k, { gap: 4, style: { display: "inline-flex" }, children: [
|
|
1565
|
+
a,
|
|
1520
1566
|
/* @__PURE__ */ l.jsx(
|
|
1521
|
-
|
|
1567
|
+
Ut,
|
|
1522
1568
|
{
|
|
1523
|
-
label: /* @__PURE__ */ l.jsx(
|
|
1569
|
+
label: /* @__PURE__ */ l.jsx(T, { value: t.description }),
|
|
1524
1570
|
withArrow: !0,
|
|
1525
1571
|
children: /* @__PURE__ */ l.jsx(
|
|
1526
|
-
|
|
1572
|
+
Yt,
|
|
1527
1573
|
{
|
|
1528
1574
|
size: 16,
|
|
1529
1575
|
stroke: 1.5,
|
|
@@ -1533,10 +1579,10 @@ function rn({
|
|
|
1533
1579
|
}
|
|
1534
1580
|
)
|
|
1535
1581
|
] })), /* @__PURE__ */ l.jsx(
|
|
1536
|
-
|
|
1582
|
+
B.Wrapper,
|
|
1537
1583
|
{
|
|
1538
|
-
label:
|
|
1539
|
-
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1584
|
+
label: a,
|
|
1585
|
+
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: t.description }) : void 0,
|
|
1540
1586
|
required: t.isRequired,
|
|
1541
1587
|
children: /* @__PURE__ */ l.jsx(
|
|
1542
1588
|
o,
|
|
@@ -1545,22 +1591,22 @@ function rn({
|
|
|
1545
1591
|
property: t,
|
|
1546
1592
|
value: i,
|
|
1547
1593
|
error: s,
|
|
1548
|
-
onChange:
|
|
1594
|
+
onChange: u,
|
|
1549
1595
|
freeze: r
|
|
1550
1596
|
}
|
|
1551
1597
|
)
|
|
1552
1598
|
}
|
|
1553
|
-
);
|
|
1599
|
+
));
|
|
1554
1600
|
}
|
|
1555
|
-
function
|
|
1601
|
+
function ko(e) {
|
|
1556
1602
|
return e.type === "horizontal";
|
|
1557
1603
|
}
|
|
1558
|
-
const
|
|
1559
|
-
const n = e.schema, t =
|
|
1604
|
+
const Dt = 12, bi = (e) => {
|
|
1605
|
+
const n = e.schema, t = I(() => {
|
|
1560
1606
|
const o = Math.max(
|
|
1561
1607
|
...e.fieldGroups.map((r) => Math.max(...r.fields.map((i) => i.length)))
|
|
1562
1608
|
);
|
|
1563
|
-
return e.fieldGroups.map((r, i) =>
|
|
1609
|
+
return e.fieldGroups.map((r, i) => Lo(
|
|
1564
1610
|
n,
|
|
1565
1611
|
e.store,
|
|
1566
1612
|
e.record,
|
|
@@ -1574,9 +1620,9 @@ const Vt = 12, Ii = (e) => {
|
|
|
1574
1620
|
"form",
|
|
1575
1621
|
{
|
|
1576
1622
|
onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
|
|
1577
|
-
o.preventDefault(), e.onSubmit !== void 0 &&
|
|
1623
|
+
o.preventDefault(), e.onSubmit !== void 0 && Xt(e.record) && e.onSubmit(e.record);
|
|
1578
1624
|
},
|
|
1579
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
1625
|
+
children: /* @__PURE__ */ l.jsxs(Q, { gap: "sm", className: e.className, style: e.styles, children: [
|
|
1580
1626
|
t,
|
|
1581
1627
|
/* @__PURE__ */ l.jsx(k, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
|
|
1582
1628
|
H,
|
|
@@ -1594,161 +1640,81 @@ const Vt = 12, Ii = (e) => {
|
|
|
1594
1640
|
}
|
|
1595
1641
|
);
|
|
1596
1642
|
};
|
|
1597
|
-
function
|
|
1598
|
-
var f,
|
|
1643
|
+
function Lo(e, n, t, o, r, i, s) {
|
|
1644
|
+
var c, S, f, d, p;
|
|
1599
1645
|
const a = r.fields, u = [];
|
|
1600
|
-
for (let
|
|
1601
|
-
const
|
|
1602
|
-
if (!Number.isInteger(
|
|
1603
|
-
throw new Error(`Span must be an integer, but got ${
|
|
1604
|
-
let
|
|
1605
|
-
s !== void 0 && typeof s == "object" && s.type === "horizontal" ?
|
|
1646
|
+
for (let m = 0; m < a.length; m++) {
|
|
1647
|
+
const C = Dt / a[m].length;
|
|
1648
|
+
if (!Number.isInteger(C))
|
|
1649
|
+
throw new Error(`Span must be an integer, but got ${C} for row ${m}`);
|
|
1650
|
+
let v;
|
|
1651
|
+
s !== void 0 && typeof s == "object" && s.type === "horizontal" ? v = {
|
|
1606
1652
|
...s,
|
|
1607
1653
|
// the size of labelCol must match the minimum size of labelCol across different groups
|
|
1608
1654
|
// and rows -- if the result isn't a whole number, we may see unaligned labels
|
|
1609
1655
|
// but this is okay as users will need to adjust the layout anyway.
|
|
1610
1656
|
labelCol: Math.floor(
|
|
1611
|
-
s.labelCol * a[
|
|
1657
|
+
s.labelCol * a[m].length / i
|
|
1612
1658
|
),
|
|
1613
|
-
itemCol:
|
|
1614
|
-
} :
|
|
1615
|
-
for (let
|
|
1616
|
-
const
|
|
1617
|
-
let
|
|
1618
|
-
typeof
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1659
|
+
itemCol: Dt - Math.floor(s.labelCol * a[m].length / i)
|
|
1660
|
+
} : v = s;
|
|
1661
|
+
for (let j = 0; j < a[m].length; j++) {
|
|
1662
|
+
const w = a[m][j];
|
|
1663
|
+
let x;
|
|
1664
|
+
if (typeof w == "function")
|
|
1665
|
+
x = w(n, t);
|
|
1666
|
+
else if (typeof w == "object" && "prop" in w) {
|
|
1667
|
+
const F = w.prop instanceof X ? w.prop : e.allProperties[w.prop];
|
|
1668
|
+
x = /* @__PURE__ */ l.jsx(
|
|
1669
|
+
bt,
|
|
1670
|
+
{
|
|
1671
|
+
store: n,
|
|
1672
|
+
record: t,
|
|
1673
|
+
property: F,
|
|
1674
|
+
layout: v,
|
|
1675
|
+
InputComponent: Vt(
|
|
1676
|
+
F,
|
|
1677
|
+
(c = w.args) == null ? void 0 : c.input
|
|
1678
|
+
),
|
|
1679
|
+
freeze: ((S = w.args) == null ? void 0 : S.freeze) ?? !1,
|
|
1680
|
+
visible: (f = w.args) == null ? void 0 : f.visible,
|
|
1681
|
+
label: (d = w.args) == null ? void 0 : d.label,
|
|
1682
|
+
onChange: (p = w.args) == null ? void 0 : p.onChange
|
|
1683
|
+
}
|
|
1684
|
+
);
|
|
1685
|
+
} else {
|
|
1686
|
+
const F = w instanceof X ? w : e.allProperties[w];
|
|
1687
|
+
x = /* @__PURE__ */ l.jsx(
|
|
1688
|
+
bt,
|
|
1689
|
+
{
|
|
1690
|
+
store: n,
|
|
1691
|
+
record: t,
|
|
1692
|
+
property: F,
|
|
1693
|
+
layout: v,
|
|
1694
|
+
InputComponent: Vt(F),
|
|
1695
|
+
freeze: !1
|
|
1696
|
+
}
|
|
1697
|
+
);
|
|
1698
|
+
}
|
|
1699
|
+
u.push(
|
|
1700
|
+
/* @__PURE__ */ l.jsx($.Col, { span: C, children: x }, `${m}-${j}`)
|
|
1645
1701
|
);
|
|
1646
1702
|
}
|
|
1647
1703
|
}
|
|
1648
1704
|
const g = /* @__PURE__ */ l.jsx($, { gutter: "sm", children: u }, o);
|
|
1649
|
-
return r.name !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1705
|
+
return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Tn, { legend: r.name, children: g }, o) : g;
|
|
1650
1706
|
}
|
|
1651
|
-
function
|
|
1707
|
+
function Vt(e, n) {
|
|
1652
1708
|
if (n !== void 0)
|
|
1653
1709
|
return n;
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1710
|
+
const t = e instanceof X ? e.leafProperty : e;
|
|
1711
|
+
if (oe(t))
|
|
1712
|
+
return t.cardinality === "N:N" || t.cardinality === "1:N" ? rn : on;
|
|
1713
|
+
if ($t[t.datatype] === void 0)
|
|
1657
1714
|
throw new Error(
|
|
1658
|
-
`No input component found for datatype ${
|
|
1715
|
+
`No input component found for datatype ${t.datatype}`
|
|
1659
1716
|
);
|
|
1660
|
-
return
|
|
1661
|
-
}
|
|
1662
|
-
const Ao = W(
|
|
1663
|
-
({
|
|
1664
|
-
store: e,
|
|
1665
|
-
record: n,
|
|
1666
|
-
properties: t,
|
|
1667
|
-
layout: o = on,
|
|
1668
|
-
InputComponent: r,
|
|
1669
|
-
validator: i,
|
|
1670
|
-
freeze: s = !1
|
|
1671
|
-
}) => {
|
|
1672
|
-
const [a, u] = M(void 0);
|
|
1673
|
-
if (t.length < 2)
|
|
1674
|
-
throw new Error(
|
|
1675
|
-
"FormNestedPropertyItem requires at least two properties to form a nested path."
|
|
1676
|
-
);
|
|
1677
|
-
const g = t[t.length - 1], f = t.reduce((c, d) => {
|
|
1678
|
-
if (c != null)
|
|
1679
|
-
return c[d.tsName];
|
|
1680
|
-
}, n), S = (c) => {
|
|
1681
|
-
var p;
|
|
1682
|
-
if (dt(n))
|
|
1683
|
-
Ze(t, 0, n, c);
|
|
1684
|
-
else {
|
|
1685
|
-
const m = n.toDraft();
|
|
1686
|
-
Ze(t, 0, m, c), e.setDraft(m);
|
|
1687
|
-
}
|
|
1688
|
-
const d = i(c);
|
|
1689
|
-
d.isValid ? u(void 0) : u(
|
|
1690
|
-
(p = d.errorMessage) == null ? void 0 : p.t({ args: { name: g.label } })
|
|
1691
|
-
);
|
|
1692
|
-
};
|
|
1693
|
-
return /* @__PURE__ */ l.jsx(
|
|
1694
|
-
rn,
|
|
1695
|
-
{
|
|
1696
|
-
db: e.db,
|
|
1697
|
-
property: g,
|
|
1698
|
-
layout: o,
|
|
1699
|
-
InputComponent: r,
|
|
1700
|
-
validator: i,
|
|
1701
|
-
freeze: s,
|
|
1702
|
-
value: f,
|
|
1703
|
-
error: a,
|
|
1704
|
-
onChange: S
|
|
1705
|
-
}
|
|
1706
|
-
);
|
|
1707
|
-
}
|
|
1708
|
-
);
|
|
1709
|
-
function Ze(e, n, t, o) {
|
|
1710
|
-
if (!X(e[n]))
|
|
1711
|
-
throw new Error(
|
|
1712
|
-
"All properties except the last one must be object properties in updateNestedProperty."
|
|
1713
|
-
);
|
|
1714
|
-
if (n === e.length - 2) {
|
|
1715
|
-
t[e[n].updateFuncName](
|
|
1716
|
-
(r, i) => (i === void 0 && (i = new r()), i[e[n + 1].updateFuncName](o), i)
|
|
1717
|
-
);
|
|
1718
|
-
return;
|
|
1719
|
-
} else {
|
|
1720
|
-
if (n > e.length - 2)
|
|
1721
|
-
throw new Error("Invalid index in updateProperties");
|
|
1722
|
-
t[e[n].updateFuncName](
|
|
1723
|
-
(r, i) => (i === void 0 && (i = new r()), Ze(e, n + 1, i, o), i)
|
|
1724
|
-
);
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
function Pi(e, n, t) {
|
|
1728
|
-
const o = e[e.length - 1];
|
|
1729
|
-
let r;
|
|
1730
|
-
if ((t == null ? void 0 : t.input) !== void 0)
|
|
1731
|
-
r = t.input;
|
|
1732
|
-
else if (X(o))
|
|
1733
|
-
r = o.cardinality === "N:N" || o.cardinality === "1:N" ? mt : pt;
|
|
1734
|
-
else {
|
|
1735
|
-
if (be[o.datatype] === void 0)
|
|
1736
|
-
throw new Error(
|
|
1737
|
-
`No input component found for datatype ${o.datatype}`
|
|
1738
|
-
);
|
|
1739
|
-
r = be[o.datatype];
|
|
1740
|
-
}
|
|
1741
|
-
return (i, s) => /* @__PURE__ */ l.jsx(
|
|
1742
|
-
Ao,
|
|
1743
|
-
{
|
|
1744
|
-
store: i,
|
|
1745
|
-
record: s,
|
|
1746
|
-
properties: e,
|
|
1747
|
-
InputComponent: r,
|
|
1748
|
-
validator: n,
|
|
1749
|
-
freeze: (t == null ? void 0 : t.freeze) ?? !1
|
|
1750
|
-
}
|
|
1751
|
-
);
|
|
1717
|
+
return $t[t.datatype];
|
|
1752
1718
|
}
|
|
1753
1719
|
/**
|
|
1754
1720
|
* table-core
|
|
@@ -1760,24 +1726,24 @@ function Pi(e, n, t) {
|
|
|
1760
1726
|
*
|
|
1761
1727
|
* @license MIT
|
|
1762
1728
|
*/
|
|
1763
|
-
function
|
|
1729
|
+
function W(e, n) {
|
|
1764
1730
|
return typeof e == "function" ? e(n) : e;
|
|
1765
1731
|
}
|
|
1766
1732
|
function O(e, n) {
|
|
1767
1733
|
return (t) => {
|
|
1768
1734
|
n.setState((o) => ({
|
|
1769
1735
|
...o,
|
|
1770
|
-
[e]:
|
|
1736
|
+
[e]: W(t, o[e])
|
|
1771
1737
|
}));
|
|
1772
1738
|
};
|
|
1773
1739
|
}
|
|
1774
1740
|
function De(e) {
|
|
1775
1741
|
return e instanceof Function;
|
|
1776
1742
|
}
|
|
1777
|
-
function
|
|
1743
|
+
function Oo(e) {
|
|
1778
1744
|
return Array.isArray(e) && e.every((n) => typeof n == "number");
|
|
1779
1745
|
}
|
|
1780
|
-
function
|
|
1746
|
+
function zo(e, n) {
|
|
1781
1747
|
const t = [], o = (r) => {
|
|
1782
1748
|
r.forEach((i) => {
|
|
1783
1749
|
t.push(i);
|
|
@@ -1787,31 +1753,31 @@ function Lo(e, n) {
|
|
|
1787
1753
|
};
|
|
1788
1754
|
return o(e), t;
|
|
1789
1755
|
}
|
|
1790
|
-
function
|
|
1756
|
+
function R(e, n, t) {
|
|
1791
1757
|
let o = [], r;
|
|
1792
1758
|
return (i) => {
|
|
1793
1759
|
let s;
|
|
1794
1760
|
t.key && t.debug && (s = Date.now());
|
|
1795
1761
|
const a = e(i);
|
|
1796
|
-
if (!(a.length !== o.length || a.some((
|
|
1762
|
+
if (!(a.length !== o.length || a.some((c, S) => o[S] !== c)))
|
|
1797
1763
|
return r;
|
|
1798
1764
|
o = a;
|
|
1799
1765
|
let g;
|
|
1800
1766
|
if (t.key && t.debug && (g = Date.now()), r = n(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
1801
|
-
const
|
|
1767
|
+
const c = Math.round((Date.now() - s) * 100) / 100, S = Math.round((Date.now() - g) * 100) / 100, f = S / 16, d = (p, m) => {
|
|
1802
1768
|
for (p = String(p); p.length < m; )
|
|
1803
1769
|
p = " " + p;
|
|
1804
1770
|
return p;
|
|
1805
1771
|
};
|
|
1806
|
-
console.info(`%c⏱ ${d(S, 5)} /${d(
|
|
1772
|
+
console.info(`%c⏱ ${d(S, 5)} /${d(c, 5)} ms`, `
|
|
1807
1773
|
font-size: .6rem;
|
|
1808
1774
|
font-weight: bold;
|
|
1809
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
1775
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
1810
1776
|
}
|
|
1811
1777
|
return r;
|
|
1812
1778
|
};
|
|
1813
1779
|
}
|
|
1814
|
-
function
|
|
1780
|
+
function y(e, n, t, o) {
|
|
1815
1781
|
return {
|
|
1816
1782
|
debug: () => {
|
|
1817
1783
|
var r;
|
|
@@ -1821,7 +1787,7 @@ function R(e, n, t, o) {
|
|
|
1821
1787
|
onChange: o
|
|
1822
1788
|
};
|
|
1823
1789
|
}
|
|
1824
|
-
function
|
|
1790
|
+
function Go(e, n, t, o) {
|
|
1825
1791
|
const r = () => {
|
|
1826
1792
|
var s;
|
|
1827
1793
|
return (s = i.getValue()) != null ? s : e.options.renderFallbackValue;
|
|
@@ -1831,61 +1797,61 @@ function Oo(e, n, t, o) {
|
|
|
1831
1797
|
column: t,
|
|
1832
1798
|
getValue: () => n.getValue(o),
|
|
1833
1799
|
renderValue: r,
|
|
1834
|
-
getContext:
|
|
1800
|
+
getContext: R(() => [e, t, n, i], (s, a, u, g) => ({
|
|
1835
1801
|
table: s,
|
|
1836
1802
|
column: a,
|
|
1837
1803
|
row: u,
|
|
1838
1804
|
cell: g,
|
|
1839
1805
|
getValue: g.getValue,
|
|
1840
1806
|
renderValue: g.renderValue
|
|
1841
|
-
}),
|
|
1807
|
+
}), y(e.options, "debugCells", "cell.getContext"))
|
|
1842
1808
|
};
|
|
1843
1809
|
return e._features.forEach((s) => {
|
|
1844
1810
|
s.createCell == null || s.createCell(i, t, n, e);
|
|
1845
1811
|
}, {}), i;
|
|
1846
1812
|
}
|
|
1847
|
-
function
|
|
1813
|
+
function Ho(e, n, t, o) {
|
|
1848
1814
|
var r, i;
|
|
1849
1815
|
const a = {
|
|
1850
1816
|
...e._getDefaultColumnDef(),
|
|
1851
1817
|
...n
|
|
1852
1818
|
}, u = a.accessorKey;
|
|
1853
|
-
let g = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0,
|
|
1854
|
-
if (a.accessorFn ?
|
|
1855
|
-
let d =
|
|
1819
|
+
let g = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, c;
|
|
1820
|
+
if (a.accessorFn ? c = a.accessorFn : u && (u.includes(".") ? c = (f) => {
|
|
1821
|
+
let d = f;
|
|
1856
1822
|
for (const m of u.split(".")) {
|
|
1857
1823
|
var p;
|
|
1858
1824
|
d = (p = d) == null ? void 0 : p[m], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${m}" in deeply nested key "${u}" returned undefined.`);
|
|
1859
1825
|
}
|
|
1860
1826
|
return d;
|
|
1861
|
-
} :
|
|
1827
|
+
} : c = (f) => f[a.accessorKey]), !g)
|
|
1862
1828
|
throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
1863
1829
|
let S = {
|
|
1864
1830
|
id: `${String(g)}`,
|
|
1865
|
-
accessorFn:
|
|
1831
|
+
accessorFn: c,
|
|
1866
1832
|
parent: o,
|
|
1867
1833
|
depth: t,
|
|
1868
1834
|
columnDef: a,
|
|
1869
1835
|
columns: [],
|
|
1870
|
-
getFlatColumns:
|
|
1871
|
-
var
|
|
1872
|
-
return [S, ...(
|
|
1873
|
-
},
|
|
1874
|
-
getLeafColumns:
|
|
1836
|
+
getFlatColumns: R(() => [!0], () => {
|
|
1837
|
+
var f;
|
|
1838
|
+
return [S, ...(f = S.columns) == null ? void 0 : f.flatMap((d) => d.getFlatColumns())];
|
|
1839
|
+
}, y(e.options, "debugColumns", "column.getFlatColumns")),
|
|
1840
|
+
getLeafColumns: R(() => [e._getOrderColumnsFn()], (f) => {
|
|
1875
1841
|
var d;
|
|
1876
1842
|
if ((d = S.columns) != null && d.length) {
|
|
1877
1843
|
let p = S.columns.flatMap((m) => m.getLeafColumns());
|
|
1878
|
-
return
|
|
1844
|
+
return f(p);
|
|
1879
1845
|
}
|
|
1880
1846
|
return [S];
|
|
1881
|
-
},
|
|
1847
|
+
}, y(e.options, "debugColumns", "column.getLeafColumns"))
|
|
1882
1848
|
};
|
|
1883
|
-
for (const
|
|
1884
|
-
|
|
1849
|
+
for (const f of e._features)
|
|
1850
|
+
f.createColumn == null || f.createColumn(S, e);
|
|
1885
1851
|
return S;
|
|
1886
1852
|
}
|
|
1887
|
-
const
|
|
1888
|
-
function
|
|
1853
|
+
const A = "debugHeaders";
|
|
1854
|
+
function Tt(e, n, t) {
|
|
1889
1855
|
var o;
|
|
1890
1856
|
let i = {
|
|
1891
1857
|
id: (o = t.id) != null ? o : n.id,
|
|
@@ -1914,92 +1880,92 @@ function kt(e, n, t) {
|
|
|
1914
1880
|
s.createHeader == null || s.createHeader(i, e);
|
|
1915
1881
|
}), i;
|
|
1916
1882
|
}
|
|
1917
|
-
const
|
|
1883
|
+
const qo = {
|
|
1918
1884
|
createTable: (e) => {
|
|
1919
|
-
e.getHeaderGroups =
|
|
1885
|
+
e.getHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
1920
1886
|
var i, s;
|
|
1921
|
-
const a = (i = o == null ? void 0 : o.map((S) => t.find((
|
|
1922
|
-
return
|
|
1923
|
-
},
|
|
1887
|
+
const a = (i = o == null ? void 0 : o.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? s : [], g = t.filter((S) => !(o != null && o.includes(S.id)) && !(r != null && r.includes(S.id)));
|
|
1888
|
+
return Ie(n, [...a, ...g, ...u], e);
|
|
1889
|
+
}, y(e.options, A, "getHeaderGroups")), e.getCenterHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), Ie(n, t, e, "center")), y(e.options, A, "getCenterHeaderGroups")), e.getLeftHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
1924
1890
|
var r;
|
|
1925
1891
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
1926
|
-
return
|
|
1927
|
-
},
|
|
1892
|
+
return Ie(n, i, e, "left");
|
|
1893
|
+
}, y(e.options, A, "getLeftHeaderGroups")), e.getRightHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
|
|
1928
1894
|
var r;
|
|
1929
1895
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
1930
|
-
return
|
|
1931
|
-
},
|
|
1896
|
+
return Ie(n, i, e, "right");
|
|
1897
|
+
}, y(e.options, A, "getRightHeaderGroups")), e.getFooterGroups = R(() => [e.getHeaderGroups()], (n) => [...n].reverse(), y(e.options, A, "getFooterGroups")), e.getLeftFooterGroups = R(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), y(e.options, A, "getLeftFooterGroups")), e.getCenterFooterGroups = R(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), y(e.options, A, "getCenterFooterGroups")), e.getRightFooterGroups = R(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), y(e.options, A, "getRightFooterGroups")), e.getFlatHeaders = R(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), y(e.options, A, "getFlatHeaders")), e.getLeftFlatHeaders = R(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), y(e.options, A, "getLeftFlatHeaders")), e.getCenterFlatHeaders = R(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), y(e.options, A, "getCenterFlatHeaders")), e.getRightFlatHeaders = R(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), y(e.options, A, "getRightFlatHeaders")), e.getCenterLeafHeaders = R(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
1932
1898
|
var o;
|
|
1933
1899
|
return !((o = t.subHeaders) != null && o.length);
|
|
1934
|
-
}),
|
|
1900
|
+
}), y(e.options, A, "getCenterLeafHeaders")), e.getLeftLeafHeaders = R(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
1935
1901
|
var o;
|
|
1936
1902
|
return !((o = t.subHeaders) != null && o.length);
|
|
1937
|
-
}),
|
|
1903
|
+
}), y(e.options, A, "getLeftLeafHeaders")), e.getRightLeafHeaders = R(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
1938
1904
|
var o;
|
|
1939
1905
|
return !((o = t.subHeaders) != null && o.length);
|
|
1940
|
-
}),
|
|
1906
|
+
}), y(e.options, A, "getRightLeafHeaders")), e.getLeafHeaders = R(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
1941
1907
|
var r, i, s, a, u, g;
|
|
1942
|
-
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (g = o[0]) == null ? void 0 : g.headers) != null ? u : []].map((
|
|
1943
|
-
},
|
|
1908
|
+
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (g = o[0]) == null ? void 0 : g.headers) != null ? u : []].map((c) => c.getLeafHeaders()).flat();
|
|
1909
|
+
}, y(e.options, A, "getLeafHeaders"));
|
|
1944
1910
|
}
|
|
1945
1911
|
};
|
|
1946
|
-
function
|
|
1912
|
+
function Ie(e, n, t, o) {
|
|
1947
1913
|
var r, i;
|
|
1948
1914
|
let s = 0;
|
|
1949
|
-
const a = function(
|
|
1950
|
-
d === void 0 && (d = 1), s = Math.max(s, d),
|
|
1915
|
+
const a = function(f, d) {
|
|
1916
|
+
d === void 0 && (d = 1), s = Math.max(s, d), f.filter((p) => p.getIsVisible()).forEach((p) => {
|
|
1951
1917
|
var m;
|
|
1952
1918
|
(m = p.columns) != null && m.length && a(p.columns, d + 1);
|
|
1953
1919
|
}, 0);
|
|
1954
1920
|
};
|
|
1955
1921
|
a(e);
|
|
1956
1922
|
let u = [];
|
|
1957
|
-
const g = (
|
|
1923
|
+
const g = (f, d) => {
|
|
1958
1924
|
const p = {
|
|
1959
1925
|
depth: d,
|
|
1960
1926
|
id: [o, `${d}`].filter(Boolean).join("_"),
|
|
1961
1927
|
headers: []
|
|
1962
1928
|
}, m = [];
|
|
1963
|
-
|
|
1964
|
-
const
|
|
1965
|
-
let
|
|
1966
|
-
if (
|
|
1967
|
-
|
|
1929
|
+
f.forEach((C) => {
|
|
1930
|
+
const v = [...m].reverse()[0], j = C.column.depth === p.depth;
|
|
1931
|
+
let w, x = !1;
|
|
1932
|
+
if (j && C.column.parent ? w = C.column.parent : (w = C.column, x = !0), v && (v == null ? void 0 : v.column) === w)
|
|
1933
|
+
v.subHeaders.push(C);
|
|
1968
1934
|
else {
|
|
1969
|
-
const
|
|
1970
|
-
id: [o, d,
|
|
1971
|
-
isPlaceholder:
|
|
1972
|
-
placeholderId:
|
|
1935
|
+
const F = Tt(t, w, {
|
|
1936
|
+
id: [o, d, w.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
|
|
1937
|
+
isPlaceholder: x,
|
|
1938
|
+
placeholderId: x ? `${m.filter((L) => L.column === w).length}` : void 0,
|
|
1973
1939
|
depth: d,
|
|
1974
1940
|
index: m.length
|
|
1975
1941
|
});
|
|
1976
|
-
|
|
1942
|
+
F.subHeaders.push(C), m.push(F);
|
|
1977
1943
|
}
|
|
1978
|
-
p.headers.push(
|
|
1944
|
+
p.headers.push(C), C.headerGroup = p;
|
|
1979
1945
|
}), u.push(p), d > 0 && g(m, d - 1);
|
|
1980
|
-
},
|
|
1946
|
+
}, c = n.map((f, d) => Tt(t, f, {
|
|
1981
1947
|
depth: s,
|
|
1982
1948
|
index: d
|
|
1983
1949
|
}));
|
|
1984
|
-
g(
|
|
1985
|
-
const S = (
|
|
1986
|
-
let m = 0,
|
|
1987
|
-
p.subHeaders && p.subHeaders.length ? (
|
|
1950
|
+
g(c, s - 1), u.reverse();
|
|
1951
|
+
const S = (f) => f.filter((p) => p.column.getIsVisible()).map((p) => {
|
|
1952
|
+
let m = 0, C = 0, v = [0];
|
|
1953
|
+
p.subHeaders && p.subHeaders.length ? (v = [], S(p.subHeaders).forEach((w) => {
|
|
1988
1954
|
let {
|
|
1989
|
-
colSpan:
|
|
1990
|
-
rowSpan:
|
|
1991
|
-
} =
|
|
1992
|
-
m +=
|
|
1955
|
+
colSpan: x,
|
|
1956
|
+
rowSpan: F
|
|
1957
|
+
} = w;
|
|
1958
|
+
m += x, v.push(F);
|
|
1993
1959
|
})) : m = 1;
|
|
1994
|
-
const
|
|
1995
|
-
return
|
|
1960
|
+
const j = Math.min(...v);
|
|
1961
|
+
return C = C + j, p.colSpan = m, p.rowSpan = C, {
|
|
1996
1962
|
colSpan: m,
|
|
1997
|
-
rowSpan:
|
|
1963
|
+
rowSpan: C
|
|
1998
1964
|
};
|
|
1999
1965
|
});
|
|
2000
1966
|
return S((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
|
|
2001
1967
|
}
|
|
2002
|
-
const
|
|
1968
|
+
const Bo = (e, n, t, o, r, i, s) => {
|
|
2003
1969
|
let a = {
|
|
2004
1970
|
id: n,
|
|
2005
1971
|
index: o,
|
|
@@ -2027,73 +1993,73 @@ const Ho = (e, n, t, o, r, i, s) => {
|
|
|
2027
1993
|
return (g = a.getValue(u)) != null ? g : e.options.renderFallbackValue;
|
|
2028
1994
|
},
|
|
2029
1995
|
subRows: [],
|
|
2030
|
-
getLeafRows: () =>
|
|
1996
|
+
getLeafRows: () => zo(a.subRows, (u) => u.subRows),
|
|
2031
1997
|
getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
|
|
2032
1998
|
getParentRows: () => {
|
|
2033
1999
|
let u = [], g = a;
|
|
2034
2000
|
for (; ; ) {
|
|
2035
|
-
const
|
|
2036
|
-
if (!
|
|
2037
|
-
u.push(
|
|
2001
|
+
const c = g.getParentRow();
|
|
2002
|
+
if (!c) break;
|
|
2003
|
+
u.push(c), g = c;
|
|
2038
2004
|
}
|
|
2039
2005
|
return u.reverse();
|
|
2040
2006
|
},
|
|
2041
|
-
getAllCells:
|
|
2042
|
-
_getAllCellsByColumnId:
|
|
2007
|
+
getAllCells: R(() => [e.getAllLeafColumns()], (u) => u.map((g) => Go(e, a, g, g.id)), y(e.options, "debugRows", "getAllCells")),
|
|
2008
|
+
_getAllCellsByColumnId: R(() => [a.getAllCells()], (u) => u.reduce((g, c) => (g[c.column.id] = c, g), {}), y(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
2043
2009
|
};
|
|
2044
2010
|
for (let u = 0; u < e._features.length; u++) {
|
|
2045
2011
|
const g = e._features[u];
|
|
2046
2012
|
g == null || g.createRow == null || g.createRow(a, e);
|
|
2047
2013
|
}
|
|
2048
2014
|
return a;
|
|
2049
|
-
},
|
|
2015
|
+
}, Uo = {
|
|
2050
2016
|
createColumn: (e, n) => {
|
|
2051
2017
|
e._getFacetedRowModel = n.options.getFacetedRowModel && n.options.getFacetedRowModel(n, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : n.getPreFilteredRowModel(), e._getFacetedUniqueValues = n.options.getFacetedUniqueValues && n.options.getFacetedUniqueValues(n, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = n.options.getFacetedMinMaxValues && n.options.getFacetedMinMaxValues(n, e.id), e.getFacetedMinMaxValues = () => {
|
|
2052
2018
|
if (e._getFacetedMinMaxValues)
|
|
2053
2019
|
return e._getFacetedMinMaxValues();
|
|
2054
2020
|
};
|
|
2055
2021
|
}
|
|
2056
|
-
},
|
|
2022
|
+
}, ln = (e, n, t) => {
|
|
2057
2023
|
var o, r;
|
|
2058
2024
|
const i = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
|
|
2059
2025
|
return !!(!((r = e.getValue(n)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
|
|
2060
2026
|
};
|
|
2061
|
-
sn.autoRemove = (e) => q(e);
|
|
2062
|
-
const ln = (e, n, t) => {
|
|
2063
|
-
var o;
|
|
2064
|
-
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
|
|
2065
|
-
};
|
|
2066
2027
|
ln.autoRemove = (e) => q(e);
|
|
2067
2028
|
const an = (e, n, t) => {
|
|
2068
2029
|
var o;
|
|
2069
|
-
return ((o = e.getValue(n)) == null || (o = o.toString()) == null
|
|
2030
|
+
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
|
|
2070
2031
|
};
|
|
2071
2032
|
an.autoRemove = (e) => q(e);
|
|
2072
2033
|
const un = (e, n, t) => {
|
|
2073
2034
|
var o;
|
|
2074
|
-
return (o = e.getValue(n)) == null ? void 0 : o.
|
|
2035
|
+
return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
2075
2036
|
};
|
|
2076
2037
|
un.autoRemove = (e) => q(e);
|
|
2077
|
-
const dn = (e, n, t) =>
|
|
2038
|
+
const dn = (e, n, t) => {
|
|
2039
|
+
var o;
|
|
2040
|
+
return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
|
|
2041
|
+
};
|
|
2042
|
+
dn.autoRemove = (e) => q(e);
|
|
2043
|
+
const gn = (e, n, t) => !t.some((o) => {
|
|
2078
2044
|
var r;
|
|
2079
2045
|
return !((r = e.getValue(n)) != null && r.includes(o));
|
|
2080
2046
|
});
|
|
2081
|
-
|
|
2082
|
-
const
|
|
2047
|
+
gn.autoRemove = (e) => q(e) || !(e != null && e.length);
|
|
2048
|
+
const cn = (e, n, t) => t.some((o) => {
|
|
2083
2049
|
var r;
|
|
2084
2050
|
return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
|
|
2085
2051
|
});
|
|
2086
|
-
|
|
2087
|
-
const
|
|
2088
|
-
cn.autoRemove = (e) => q(e);
|
|
2089
|
-
const fn = (e, n, t) => e.getValue(n) == t;
|
|
2052
|
+
cn.autoRemove = (e) => q(e) || !(e != null && e.length);
|
|
2053
|
+
const fn = (e, n, t) => e.getValue(n) === t;
|
|
2090
2054
|
fn.autoRemove = (e) => q(e);
|
|
2091
|
-
const
|
|
2055
|
+
const pn = (e, n, t) => e.getValue(n) == t;
|
|
2056
|
+
pn.autoRemove = (e) => q(e);
|
|
2057
|
+
const gt = (e, n, t) => {
|
|
2092
2058
|
let [o, r] = t;
|
|
2093
2059
|
const i = e.getValue(n);
|
|
2094
2060
|
return i >= o && i <= r;
|
|
2095
2061
|
};
|
|
2096
|
-
|
|
2062
|
+
gt.resolveFilterValue = (e) => {
|
|
2097
2063
|
let [n, t] = e, o = typeof n != "number" ? parseFloat(n) : n, r = typeof t != "number" ? parseFloat(t) : t, i = n === null || Number.isNaN(o) ? -1 / 0 : o, s = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
2098
2064
|
if (i > s) {
|
|
2099
2065
|
const a = i;
|
|
@@ -2101,22 +2067,22 @@ ht.resolveFilterValue = (e) => {
|
|
|
2101
2067
|
}
|
|
2102
2068
|
return [i, s];
|
|
2103
2069
|
};
|
|
2104
|
-
|
|
2070
|
+
gt.autoRemove = (e) => q(e) || q(e[0]) && q(e[1]);
|
|
2105
2071
|
const U = {
|
|
2106
|
-
includesString:
|
|
2107
|
-
includesStringSensitive:
|
|
2108
|
-
equalsString:
|
|
2109
|
-
arrIncludes:
|
|
2110
|
-
arrIncludesAll:
|
|
2111
|
-
arrIncludesSome:
|
|
2112
|
-
equals:
|
|
2113
|
-
weakEquals:
|
|
2114
|
-
inNumberRange:
|
|
2072
|
+
includesString: ln,
|
|
2073
|
+
includesStringSensitive: an,
|
|
2074
|
+
equalsString: un,
|
|
2075
|
+
arrIncludes: dn,
|
|
2076
|
+
arrIncludesAll: gn,
|
|
2077
|
+
arrIncludesSome: cn,
|
|
2078
|
+
equals: fn,
|
|
2079
|
+
weakEquals: pn,
|
|
2080
|
+
inNumberRange: gt
|
|
2115
2081
|
};
|
|
2116
2082
|
function q(e) {
|
|
2117
2083
|
return e == null || e === "";
|
|
2118
2084
|
}
|
|
2119
|
-
const
|
|
2085
|
+
const Ko = {
|
|
2120
2086
|
getDefaultColumnDef: () => ({
|
|
2121
2087
|
filterFn: "auto"
|
|
2122
2088
|
}),
|
|
@@ -2150,10 +2116,10 @@ const Bo = {
|
|
|
2150
2116
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
2151
2117
|
}, e.setFilterValue = (t) => {
|
|
2152
2118
|
n.setColumnFilters((o) => {
|
|
2153
|
-
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((
|
|
2154
|
-
if (
|
|
2119
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((c) => c.id === e.id), s = W(t, i ? i.value : void 0);
|
|
2120
|
+
if (At(r, s, e)) {
|
|
2155
2121
|
var a;
|
|
2156
|
-
return (a = o == null ? void 0 : o.filter((
|
|
2122
|
+
return (a = o == null ? void 0 : o.filter((c) => c.id !== e.id)) != null ? a : [];
|
|
2157
2123
|
}
|
|
2158
2124
|
const u = {
|
|
2159
2125
|
id: e.id,
|
|
@@ -2161,7 +2127,7 @@ const Bo = {
|
|
|
2161
2127
|
};
|
|
2162
2128
|
if (i) {
|
|
2163
2129
|
var g;
|
|
2164
|
-
return (g = o == null ? void 0 : o.map((
|
|
2130
|
+
return (g = o == null ? void 0 : o.map((c) => c.id === e.id ? u : c)) != null ? g : [];
|
|
2165
2131
|
}
|
|
2166
2132
|
return o != null && o.length ? [...o, u] : [u];
|
|
2167
2133
|
});
|
|
@@ -2174,11 +2140,11 @@ const Bo = {
|
|
|
2174
2140
|
e.setColumnFilters = (n) => {
|
|
2175
2141
|
const t = e.getAllLeafColumns(), o = (r) => {
|
|
2176
2142
|
var i;
|
|
2177
|
-
return (i =
|
|
2143
|
+
return (i = W(n, r)) == null ? void 0 : i.filter((s) => {
|
|
2178
2144
|
const a = t.find((u) => u.id === s.id);
|
|
2179
2145
|
if (a) {
|
|
2180
2146
|
const u = a.getFilterFn();
|
|
2181
|
-
if (
|
|
2147
|
+
if (At(u, s.value, a))
|
|
2182
2148
|
return !1;
|
|
2183
2149
|
}
|
|
2184
2150
|
return !0;
|
|
@@ -2191,57 +2157,57 @@ const Bo = {
|
|
|
2191
2157
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
2192
2158
|
}
|
|
2193
2159
|
};
|
|
2194
|
-
function
|
|
2160
|
+
function At(e, n, t) {
|
|
2195
2161
|
return (e && e.autoRemove ? e.autoRemove(n, t) : !1) || typeof n > "u" || typeof n == "string" && !n;
|
|
2196
2162
|
}
|
|
2197
|
-
const
|
|
2163
|
+
const Yo = (e, n, t) => t.reduce((o, r) => {
|
|
2198
2164
|
const i = r.getValue(e);
|
|
2199
2165
|
return o + (typeof i == "number" ? i : 0);
|
|
2200
|
-
}, 0),
|
|
2166
|
+
}, 0), Wo = (e, n, t) => {
|
|
2201
2167
|
let o;
|
|
2202
2168
|
return t.forEach((r) => {
|
|
2203
2169
|
const i = r.getValue(e);
|
|
2204
2170
|
i != null && (o > i || o === void 0 && i >= i) && (o = i);
|
|
2205
2171
|
}), o;
|
|
2206
|
-
},
|
|
2172
|
+
}, Xo = (e, n, t) => {
|
|
2207
2173
|
let o;
|
|
2208
2174
|
return t.forEach((r) => {
|
|
2209
2175
|
const i = r.getValue(e);
|
|
2210
2176
|
i != null && (o < i || o === void 0 && i >= i) && (o = i);
|
|
2211
2177
|
}), o;
|
|
2212
|
-
},
|
|
2178
|
+
}, Jo = (e, n, t) => {
|
|
2213
2179
|
let o, r;
|
|
2214
2180
|
return t.forEach((i) => {
|
|
2215
2181
|
const s = i.getValue(e);
|
|
2216
2182
|
s != null && (o === void 0 ? s >= s && (o = r = s) : (o > s && (o = s), r < s && (r = s)));
|
|
2217
2183
|
}), [o, r];
|
|
2218
|
-
},
|
|
2184
|
+
}, Qo = (e, n) => {
|
|
2219
2185
|
let t = 0, o = 0;
|
|
2220
2186
|
if (n.forEach((r) => {
|
|
2221
2187
|
let i = r.getValue(e);
|
|
2222
2188
|
i != null && (i = +i) >= i && (++t, o += i);
|
|
2223
2189
|
}), t) return o / t;
|
|
2224
|
-
},
|
|
2190
|
+
}, Zo = (e, n) => {
|
|
2225
2191
|
if (!n.length)
|
|
2226
2192
|
return;
|
|
2227
2193
|
const t = n.map((i) => i.getValue(e));
|
|
2228
|
-
if (!
|
|
2194
|
+
if (!Oo(t))
|
|
2229
2195
|
return;
|
|
2230
2196
|
if (t.length === 1)
|
|
2231
2197
|
return t[0];
|
|
2232
2198
|
const o = Math.floor(t.length / 2), r = t.sort((i, s) => i - s);
|
|
2233
2199
|
return t.length % 2 !== 0 ? r[o] : (r[o - 1] + r[o]) / 2;
|
|
2234
|
-
},
|
|
2235
|
-
sum:
|
|
2236
|
-
min:
|
|
2237
|
-
max:
|
|
2238
|
-
extent:
|
|
2239
|
-
mean:
|
|
2240
|
-
median:
|
|
2241
|
-
unique:
|
|
2242
|
-
uniqueCount:
|
|
2243
|
-
count:
|
|
2244
|
-
},
|
|
2200
|
+
}, er = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), tr = (e, n) => new Set(n.map((t) => t.getValue(e))).size, nr = (e, n) => n.length, Oe = {
|
|
2201
|
+
sum: Yo,
|
|
2202
|
+
min: Wo,
|
|
2203
|
+
max: Xo,
|
|
2204
|
+
extent: Jo,
|
|
2205
|
+
mean: Qo,
|
|
2206
|
+
median: Zo,
|
|
2207
|
+
unique: er,
|
|
2208
|
+
uniqueCount: tr,
|
|
2209
|
+
count: nr
|
|
2210
|
+
}, or = {
|
|
2245
2211
|
getDefaultColumnDef: () => ({
|
|
2246
2212
|
aggregatedCell: (e) => {
|
|
2247
2213
|
var n, t;
|
|
@@ -2277,14 +2243,14 @@ const Uo = (e, n, t) => t.reduce((o, r) => {
|
|
|
2277
2243
|
}, e.getAutoAggregationFn = () => {
|
|
2278
2244
|
const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
|
|
2279
2245
|
if (typeof o == "number")
|
|
2280
|
-
return
|
|
2246
|
+
return Oe.sum;
|
|
2281
2247
|
if (Object.prototype.toString.call(o) === "[object Date]")
|
|
2282
|
-
return
|
|
2248
|
+
return Oe.extent;
|
|
2283
2249
|
}, e.getAggregationFn = () => {
|
|
2284
2250
|
var t, o;
|
|
2285
2251
|
if (!e)
|
|
2286
2252
|
throw new Error();
|
|
2287
|
-
return De(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t :
|
|
2253
|
+
return De(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Oe[e.columnDef.aggregationFn];
|
|
2288
2254
|
};
|
|
2289
2255
|
},
|
|
2290
2256
|
createTable: (e) => {
|
|
@@ -2308,13 +2274,13 @@ const Uo = (e, n, t) => t.reduce((o, r) => {
|
|
|
2308
2274
|
};
|
|
2309
2275
|
}
|
|
2310
2276
|
};
|
|
2311
|
-
function
|
|
2277
|
+
function rr(e, n, t) {
|
|
2312
2278
|
if (!(n != null && n.length) || !t)
|
|
2313
2279
|
return e;
|
|
2314
2280
|
const o = e.filter((i) => !n.includes(i.id));
|
|
2315
2281
|
return t === "remove" ? o : [...n.map((i) => e.find((s) => s.id === i)).filter(Boolean), ...o];
|
|
2316
2282
|
}
|
|
2317
|
-
const
|
|
2283
|
+
const ir = {
|
|
2318
2284
|
getInitialState: (e) => ({
|
|
2319
2285
|
columnOrder: [],
|
|
2320
2286
|
...e
|
|
@@ -2323,12 +2289,12 @@ const or = {
|
|
|
2323
2289
|
onColumnOrderChange: O("columnOrder", e)
|
|
2324
2290
|
}),
|
|
2325
2291
|
createColumn: (e, n) => {
|
|
2326
|
-
e.getIndex =
|
|
2292
|
+
e.getIndex = R((t) => [he(n, t)], (t) => t.findIndex((o) => o.id === e.id), y(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
2327
2293
|
var o;
|
|
2328
|
-
return ((o =
|
|
2294
|
+
return ((o = he(n, t)[0]) == null ? void 0 : o.id) === e.id;
|
|
2329
2295
|
}, e.getIsLastColumn = (t) => {
|
|
2330
2296
|
var o;
|
|
2331
|
-
const r =
|
|
2297
|
+
const r = he(n, t);
|
|
2332
2298
|
return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
|
|
2333
2299
|
};
|
|
2334
2300
|
},
|
|
@@ -2336,27 +2302,27 @@ const or = {
|
|
|
2336
2302
|
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
2337
2303
|
var t;
|
|
2338
2304
|
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
2339
|
-
}, e._getOrderColumnsFn =
|
|
2305
|
+
}, e._getOrderColumnsFn = R(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
|
|
2340
2306
|
let i = [];
|
|
2341
2307
|
if (!(n != null && n.length))
|
|
2342
2308
|
i = r;
|
|
2343
2309
|
else {
|
|
2344
2310
|
const s = [...n], a = [...r];
|
|
2345
2311
|
for (; a.length && s.length; ) {
|
|
2346
|
-
const u = s.shift(), g = a.findIndex((
|
|
2312
|
+
const u = s.shift(), g = a.findIndex((c) => c.id === u);
|
|
2347
2313
|
g > -1 && i.push(a.splice(g, 1)[0]);
|
|
2348
2314
|
}
|
|
2349
2315
|
i = [...i, ...a];
|
|
2350
2316
|
}
|
|
2351
|
-
return
|
|
2352
|
-
},
|
|
2317
|
+
return rr(i, t, o);
|
|
2318
|
+
}, y(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
2353
2319
|
}
|
|
2354
|
-
},
|
|
2320
|
+
}, ze = () => ({
|
|
2355
2321
|
left: [],
|
|
2356
2322
|
right: []
|
|
2357
|
-
}),
|
|
2323
|
+
}), sr = {
|
|
2358
2324
|
getInitialState: (e) => ({
|
|
2359
|
-
columnPinning:
|
|
2325
|
+
columnPinning: ze(),
|
|
2360
2326
|
...e
|
|
2361
2327
|
}),
|
|
2362
2328
|
getDefaultOptions: (e) => ({
|
|
@@ -2375,10 +2341,10 @@ const or = {
|
|
|
2375
2341
|
};
|
|
2376
2342
|
}
|
|
2377
2343
|
if (t === "left") {
|
|
2378
|
-
var g,
|
|
2344
|
+
var g, c;
|
|
2379
2345
|
return {
|
|
2380
2346
|
left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((S) => !(o != null && o.includes(S))), ...o],
|
|
2381
|
-
right: ((
|
|
2347
|
+
right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((S) => !(o != null && o.includes(S)))
|
|
2382
2348
|
};
|
|
2383
2349
|
}
|
|
2384
2350
|
return {
|
|
@@ -2402,21 +2368,21 @@ const or = {
|
|
|
2402
2368
|
};
|
|
2403
2369
|
},
|
|
2404
2370
|
createRow: (e, n) => {
|
|
2405
|
-
e.getCenterVisibleCells =
|
|
2371
|
+
e.getCenterVisibleCells = R(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
|
|
2406
2372
|
const i = [...o ?? [], ...r ?? []];
|
|
2407
2373
|
return t.filter((s) => !i.includes(s.column.id));
|
|
2408
|
-
},
|
|
2374
|
+
}, y(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = R(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
|
|
2409
2375
|
...i,
|
|
2410
2376
|
position: "left"
|
|
2411
|
-
})),
|
|
2377
|
+
})), y(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = R(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
|
|
2412
2378
|
...i,
|
|
2413
2379
|
position: "right"
|
|
2414
|
-
})),
|
|
2380
|
+
})), y(n.options, "debugRows", "getRightVisibleCells"));
|
|
2415
2381
|
},
|
|
2416
2382
|
createTable: (e) => {
|
|
2417
2383
|
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
2418
2384
|
var t, o;
|
|
2419
|
-
return e.setColumnPinning(n ?
|
|
2385
|
+
return e.setColumnPinning(n ? ze() : (t = (o = e.initialState) == null ? void 0 : o.columnPinning) != null ? t : ze());
|
|
2420
2386
|
}, e.getIsSomeColumnsPinned = (n) => {
|
|
2421
2387
|
var t;
|
|
2422
2388
|
const o = e.getState().columnPinning;
|
|
@@ -2425,31 +2391,31 @@ const or = {
|
|
|
2425
2391
|
return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
|
|
2426
2392
|
}
|
|
2427
2393
|
return !!((t = o[n]) != null && t.length);
|
|
2428
|
-
}, e.getLeftLeafColumns =
|
|
2394
|
+
}, e.getLeftLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), y(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), y(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
|
|
2429
2395
|
const r = [...t ?? [], ...o ?? []];
|
|
2430
2396
|
return n.filter((i) => !r.includes(i.id));
|
|
2431
|
-
},
|
|
2397
|
+
}, y(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
2432
2398
|
}
|
|
2433
2399
|
};
|
|
2434
|
-
function
|
|
2400
|
+
function lr(e) {
|
|
2435
2401
|
return e || (typeof document < "u" ? document : null);
|
|
2436
2402
|
}
|
|
2437
|
-
const
|
|
2403
|
+
const Pe = {
|
|
2438
2404
|
size: 150,
|
|
2439
2405
|
minSize: 20,
|
|
2440
2406
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
2441
|
-
},
|
|
2407
|
+
}, Ge = () => ({
|
|
2442
2408
|
startOffset: null,
|
|
2443
2409
|
startSize: null,
|
|
2444
2410
|
deltaOffset: null,
|
|
2445
2411
|
deltaPercentage: null,
|
|
2446
2412
|
isResizingColumn: !1,
|
|
2447
2413
|
columnSizingStart: []
|
|
2448
|
-
}),
|
|
2449
|
-
getDefaultColumnDef: () =>
|
|
2414
|
+
}), ar = {
|
|
2415
|
+
getDefaultColumnDef: () => Pe,
|
|
2450
2416
|
getInitialState: (e) => ({
|
|
2451
2417
|
columnSizing: {},
|
|
2452
|
-
columnSizingInfo:
|
|
2418
|
+
columnSizingInfo: Ge(),
|
|
2453
2419
|
...e
|
|
2454
2420
|
}),
|
|
2455
2421
|
getDefaultOptions: (e) => ({
|
|
@@ -2462,8 +2428,8 @@ const Ie = {
|
|
|
2462
2428
|
e.getSize = () => {
|
|
2463
2429
|
var t, o, r;
|
|
2464
2430
|
const i = n.getState().columnSizing[e.id];
|
|
2465
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
2466
|
-
}, e.getStart =
|
|
2431
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Pe.minSize, (o = i ?? e.columnDef.size) != null ? o : Pe.size), (r = e.columnDef.maxSize) != null ? r : Pe.maxSize);
|
|
2432
|
+
}, e.getStart = R((t) => [t, he(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), y(n.options, "debugColumns", "getStart")), e.getAfter = R((t) => [t, he(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), y(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
2467
2433
|
n.setColumnSizing((t) => {
|
|
2468
2434
|
let {
|
|
2469
2435
|
[e.id]: o,
|
|
@@ -2497,27 +2463,27 @@ const Ie = {
|
|
|
2497
2463
|
}, e.getResizeHandler = (t) => {
|
|
2498
2464
|
const o = n.getColumn(e.column.id), r = o == null ? void 0 : o.getCanResize();
|
|
2499
2465
|
return (i) => {
|
|
2500
|
-
if (!o || !r || (i.persist == null || i.persist(),
|
|
2466
|
+
if (!o || !r || (i.persist == null || i.persist(), He(i) && i.touches && i.touches.length > 1))
|
|
2501
2467
|
return;
|
|
2502
|
-
const s = e.getSize(), a = e ? e.getLeafHeaders().map((
|
|
2503
|
-
typeof
|
|
2504
|
-
var
|
|
2505
|
-
const L = n.options.columnResizeDirection === "rtl" ? -1 : 1,
|
|
2506
|
-
return
|
|
2507
|
-
let [
|
|
2508
|
-
g[
|
|
2468
|
+
const s = e.getSize(), a = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], u = He(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, c = (v, j) => {
|
|
2469
|
+
typeof j == "number" && (n.setColumnSizingInfo((w) => {
|
|
2470
|
+
var x, F;
|
|
2471
|
+
const L = n.options.columnResizeDirection === "rtl" ? -1 : 1, Ce = (j - ((x = w == null ? void 0 : w.startOffset) != null ? x : 0)) * L, we = Math.max(Ce / ((F = w == null ? void 0 : w.startSize) != null ? F : 0), -0.999999);
|
|
2472
|
+
return w.columnSizingStart.forEach((ue) => {
|
|
2473
|
+
let [Ve, xe] = ue;
|
|
2474
|
+
g[Ve] = Math.round(Math.max(xe + xe * we, 0) * 100) / 100;
|
|
2509
2475
|
}), {
|
|
2510
|
-
...
|
|
2511
|
-
deltaOffset:
|
|
2512
|
-
deltaPercentage:
|
|
2476
|
+
...w,
|
|
2477
|
+
deltaOffset: Ce,
|
|
2478
|
+
deltaPercentage: we
|
|
2513
2479
|
};
|
|
2514
|
-
}), (n.options.columnResizeMode === "onChange" ||
|
|
2515
|
-
...
|
|
2480
|
+
}), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((w) => ({
|
|
2481
|
+
...w,
|
|
2516
2482
|
...g
|
|
2517
2483
|
})));
|
|
2518
|
-
}, S = (
|
|
2519
|
-
|
|
2520
|
-
...
|
|
2484
|
+
}, S = (v) => c("move", v), f = (v) => {
|
|
2485
|
+
c("end", v), n.setColumnSizingInfo((j) => ({
|
|
2486
|
+
...j,
|
|
2521
2487
|
isResizingColumn: !1,
|
|
2522
2488
|
startOffset: null,
|
|
2523
2489
|
startSize: null,
|
|
@@ -2525,22 +2491,22 @@ const Ie = {
|
|
|
2525
2491
|
deltaPercentage: null,
|
|
2526
2492
|
columnSizingStart: []
|
|
2527
2493
|
}));
|
|
2528
|
-
}, d =
|
|
2529
|
-
moveHandler: (
|
|
2530
|
-
upHandler: (
|
|
2531
|
-
d == null || d.removeEventListener("mousemove", p.moveHandler), d == null || d.removeEventListener("mouseup", p.upHandler),
|
|
2494
|
+
}, d = lr(t), p = {
|
|
2495
|
+
moveHandler: (v) => S(v.clientX),
|
|
2496
|
+
upHandler: (v) => {
|
|
2497
|
+
d == null || d.removeEventListener("mousemove", p.moveHandler), d == null || d.removeEventListener("mouseup", p.upHandler), f(v.clientX);
|
|
2532
2498
|
}
|
|
2533
2499
|
}, m = {
|
|
2534
|
-
moveHandler: (
|
|
2535
|
-
upHandler: (
|
|
2536
|
-
var
|
|
2537
|
-
d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler),
|
|
2500
|
+
moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()), S(v.touches[0].clientX), !1),
|
|
2501
|
+
upHandler: (v) => {
|
|
2502
|
+
var j;
|
|
2503
|
+
d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), v.cancelable && (v.preventDefault(), v.stopPropagation()), f((j = v.touches[0]) == null ? void 0 : j.clientX);
|
|
2538
2504
|
}
|
|
2539
|
-
},
|
|
2505
|
+
}, C = ur() ? {
|
|
2540
2506
|
passive: !1
|
|
2541
2507
|
} : !1;
|
|
2542
|
-
|
|
2543
|
-
...
|
|
2508
|
+
He(i) ? (d == null || d.addEventListener("touchmove", m.moveHandler, C), d == null || d.addEventListener("touchend", m.upHandler, C)) : (d == null || d.addEventListener("mousemove", p.moveHandler, C), d == null || d.addEventListener("mouseup", p.upHandler, C)), n.setColumnSizingInfo((v) => ({
|
|
2509
|
+
...v,
|
|
2544
2510
|
startOffset: u,
|
|
2545
2511
|
startSize: s,
|
|
2546
2512
|
deltaOffset: 0,
|
|
@@ -2557,7 +2523,7 @@ const Ie = {
|
|
|
2557
2523
|
e.setColumnSizing(n ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
2558
2524
|
}, e.resetHeaderSizeInfo = (n) => {
|
|
2559
2525
|
var t;
|
|
2560
|
-
e.setColumnSizingInfo(n ?
|
|
2526
|
+
e.setColumnSizingInfo(n ? Ge() : (t = e.initialState.columnSizingInfo) != null ? t : Ge());
|
|
2561
2527
|
}, e.getTotalSize = () => {
|
|
2562
2528
|
var n, t;
|
|
2563
2529
|
return (n = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? n : 0;
|
|
@@ -2573,9 +2539,9 @@ const Ie = {
|
|
|
2573
2539
|
};
|
|
2574
2540
|
}
|
|
2575
2541
|
};
|
|
2576
|
-
let
|
|
2577
|
-
function
|
|
2578
|
-
if (typeof
|
|
2542
|
+
let Ee = null;
|
|
2543
|
+
function ur() {
|
|
2544
|
+
if (typeof Ee == "boolean") return Ee;
|
|
2579
2545
|
let e = !1;
|
|
2580
2546
|
try {
|
|
2581
2547
|
const n = {
|
|
@@ -2588,12 +2554,12 @@ function lr() {
|
|
|
2588
2554
|
} catch {
|
|
2589
2555
|
e = !1;
|
|
2590
2556
|
}
|
|
2591
|
-
return
|
|
2557
|
+
return Ee = e, Ee;
|
|
2592
2558
|
}
|
|
2593
|
-
function
|
|
2559
|
+
function He(e) {
|
|
2594
2560
|
return e.type === "touchstart";
|
|
2595
2561
|
}
|
|
2596
|
-
const
|
|
2562
|
+
const dr = {
|
|
2597
2563
|
getInitialState: (e) => ({
|
|
2598
2564
|
columnVisibility: {},
|
|
2599
2565
|
...e
|
|
@@ -2619,10 +2585,10 @@ const ar = {
|
|
|
2619
2585
|
};
|
|
2620
2586
|
},
|
|
2621
2587
|
createRow: (e, n) => {
|
|
2622
|
-
e._getAllVisibleCells =
|
|
2588
|
+
e._getAllVisibleCells = R(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), y(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = R(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], y(n.options, "debugRows", "getVisibleCells"));
|
|
2623
2589
|
},
|
|
2624
2590
|
createTable: (e) => {
|
|
2625
|
-
const n = (t, o) =>
|
|
2591
|
+
const n = (t, o) => R(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), y(e.options, "debugColumns", t));
|
|
2626
2592
|
e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
2627
2593
|
var o;
|
|
2628
2594
|
e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
|
|
@@ -2638,17 +2604,17 @@ const ar = {
|
|
|
2638
2604
|
};
|
|
2639
2605
|
}
|
|
2640
2606
|
};
|
|
2641
|
-
function
|
|
2607
|
+
function he(e, n) {
|
|
2642
2608
|
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
2643
2609
|
}
|
|
2644
|
-
const
|
|
2610
|
+
const gr = {
|
|
2645
2611
|
createTable: (e) => {
|
|
2646
2612
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
2647
2613
|
if (e._getGlobalFacetedMinMaxValues)
|
|
2648
2614
|
return e._getGlobalFacetedMinMaxValues();
|
|
2649
2615
|
};
|
|
2650
2616
|
}
|
|
2651
|
-
},
|
|
2617
|
+
}, cr = {
|
|
2652
2618
|
getInitialState: (e) => ({
|
|
2653
2619
|
globalFilter: void 0,
|
|
2654
2620
|
...e
|
|
@@ -2681,7 +2647,7 @@ const ur = {
|
|
|
2681
2647
|
e.setGlobalFilter(n ? void 0 : e.initialState.globalFilter);
|
|
2682
2648
|
};
|
|
2683
2649
|
}
|
|
2684
|
-
},
|
|
2650
|
+
}, fr = {
|
|
2685
2651
|
getInitialState: (e) => ({
|
|
2686
2652
|
expanded: {},
|
|
2687
2653
|
...e
|
|
@@ -2768,14 +2734,14 @@ const ur = {
|
|
|
2768
2734
|
};
|
|
2769
2735
|
};
|
|
2770
2736
|
}
|
|
2771
|
-
},
|
|
2772
|
-
pageIndex:
|
|
2773
|
-
pageSize:
|
|
2774
|
-
}),
|
|
2737
|
+
}, Qe = 0, Ze = 10, qe = () => ({
|
|
2738
|
+
pageIndex: Qe,
|
|
2739
|
+
pageSize: Ze
|
|
2740
|
+
}), pr = {
|
|
2775
2741
|
getInitialState: (e) => ({
|
|
2776
2742
|
...e,
|
|
2777
2743
|
pagination: {
|
|
2778
|
-
...
|
|
2744
|
+
...qe(),
|
|
2779
2745
|
...e == null ? void 0 : e.pagination
|
|
2780
2746
|
}
|
|
2781
2747
|
}),
|
|
@@ -2799,14 +2765,14 @@ const ur = {
|
|
|
2799
2765
|
});
|
|
2800
2766
|
}
|
|
2801
2767
|
}, e.setPagination = (o) => {
|
|
2802
|
-
const r = (i) =>
|
|
2768
|
+
const r = (i) => W(o, i);
|
|
2803
2769
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
2804
2770
|
}, e.resetPagination = (o) => {
|
|
2805
2771
|
var r;
|
|
2806
|
-
e.setPagination(o ?
|
|
2772
|
+
e.setPagination(o ? qe() : (r = e.initialState.pagination) != null ? r : qe());
|
|
2807
2773
|
}, e.setPageIndex = (o) => {
|
|
2808
2774
|
e.setPagination((r) => {
|
|
2809
|
-
let i =
|
|
2775
|
+
let i = W(o, r.pageIndex);
|
|
2810
2776
|
const s = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
2811
2777
|
return i = Math.max(0, Math.min(i, s)), {
|
|
2812
2778
|
...r,
|
|
@@ -2815,13 +2781,13 @@ const ur = {
|
|
|
2815
2781
|
});
|
|
2816
2782
|
}, e.resetPageIndex = (o) => {
|
|
2817
2783
|
var r, i;
|
|
2818
|
-
e.setPageIndex(o ?
|
|
2784
|
+
e.setPageIndex(o ? Qe : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Qe);
|
|
2819
2785
|
}, e.resetPageSize = (o) => {
|
|
2820
2786
|
var r, i;
|
|
2821
|
-
e.setPageSize(o ?
|
|
2787
|
+
e.setPageSize(o ? Ze : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Ze);
|
|
2822
2788
|
}, e.setPageSize = (o) => {
|
|
2823
2789
|
e.setPagination((r) => {
|
|
2824
|
-
const i = Math.max(1,
|
|
2790
|
+
const i = Math.max(1, W(o, r.pageSize)), s = r.pageSize * r.pageIndex, a = Math.floor(s / i);
|
|
2825
2791
|
return {
|
|
2826
2792
|
...r,
|
|
2827
2793
|
pageIndex: a,
|
|
@@ -2830,15 +2796,15 @@ const ur = {
|
|
|
2830
2796
|
});
|
|
2831
2797
|
}, e.setPageCount = (o) => e.setPagination((r) => {
|
|
2832
2798
|
var i;
|
|
2833
|
-
let s =
|
|
2799
|
+
let s = W(o, (i = e.options.pageCount) != null ? i : -1);
|
|
2834
2800
|
return typeof s == "number" && (s = Math.max(-1, s)), {
|
|
2835
2801
|
...r,
|
|
2836
2802
|
pageCount: s
|
|
2837
2803
|
};
|
|
2838
|
-
}), e.getPageOptions =
|
|
2804
|
+
}), e.getPageOptions = R(() => [e.getPageCount()], (o) => {
|
|
2839
2805
|
let r = [];
|
|
2840
2806
|
return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, s) => s)), r;
|
|
2841
|
-
},
|
|
2807
|
+
}, y(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
2842
2808
|
const {
|
|
2843
2809
|
pageIndex: o
|
|
2844
2810
|
} = e.getState().pagination, r = e.getPageCount();
|
|
@@ -2851,12 +2817,12 @@ const ur = {
|
|
|
2851
2817
|
return (o = e.options.rowCount) != null ? o : e.getPrePaginationRowModel().rows.length;
|
|
2852
2818
|
};
|
|
2853
2819
|
}
|
|
2854
|
-
},
|
|
2820
|
+
}, Be = () => ({
|
|
2855
2821
|
top: [],
|
|
2856
2822
|
bottom: []
|
|
2857
|
-
}),
|
|
2823
|
+
}), mr = {
|
|
2858
2824
|
getInitialState: (e) => ({
|
|
2859
|
-
rowPinning:
|
|
2825
|
+
rowPinning: Be(),
|
|
2860
2826
|
...e
|
|
2861
2827
|
}),
|
|
2862
2828
|
getDefaultOptions: (e) => ({
|
|
@@ -2876,12 +2842,12 @@ const ur = {
|
|
|
2876
2842
|
return g;
|
|
2877
2843
|
}) : [], a = /* @__PURE__ */ new Set([...s, e.id, ...i]);
|
|
2878
2844
|
n.setRowPinning((u) => {
|
|
2879
|
-
var g,
|
|
2845
|
+
var g, c;
|
|
2880
2846
|
if (t === "bottom") {
|
|
2881
|
-
var S,
|
|
2847
|
+
var S, f;
|
|
2882
2848
|
return {
|
|
2883
2849
|
top: ((S = u == null ? void 0 : u.top) != null ? S : []).filter((m) => !(a != null && a.has(m))),
|
|
2884
|
-
bottom: [...((
|
|
2850
|
+
bottom: [...((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((m) => !(a != null && a.has(m))), ...Array.from(a)]
|
|
2885
2851
|
};
|
|
2886
2852
|
}
|
|
2887
2853
|
if (t === "top") {
|
|
@@ -2893,7 +2859,7 @@ const ur = {
|
|
|
2893
2859
|
}
|
|
2894
2860
|
return {
|
|
2895
2861
|
top: ((g = u == null ? void 0 : u.top) != null ? g : []).filter((m) => !(a != null && a.has(m))),
|
|
2896
|
-
bottom: ((
|
|
2862
|
+
bottom: ((c = u == null ? void 0 : u.bottom) != null ? c : []).filter((m) => !(a != null && a.has(m)))
|
|
2897
2863
|
};
|
|
2898
2864
|
});
|
|
2899
2865
|
}, e.getCanPin = () => {
|
|
@@ -2925,7 +2891,7 @@ const ur = {
|
|
|
2925
2891
|
createTable: (e) => {
|
|
2926
2892
|
e.setRowPinning = (n) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(n), e.resetRowPinning = (n) => {
|
|
2927
2893
|
var t, o;
|
|
2928
|
-
return e.setRowPinning(n ?
|
|
2894
|
+
return e.setRowPinning(n ? Be() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : Be());
|
|
2929
2895
|
}, e.getIsSomeRowsPinned = (n) => {
|
|
2930
2896
|
var t;
|
|
2931
2897
|
const o = e.getState().rowPinning;
|
|
@@ -2950,12 +2916,12 @@ const ur = {
|
|
|
2950
2916
|
...s,
|
|
2951
2917
|
position: o
|
|
2952
2918
|
}));
|
|
2953
|
-
}, e.getTopRows =
|
|
2919
|
+
}, e.getTopRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), y(e.options, "debugRows", "getTopRows")), e.getBottomRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), y(e.options, "debugRows", "getBottomRows")), e.getCenterRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
|
|
2954
2920
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
|
|
2955
2921
|
return n.filter((i) => !r.has(i.id));
|
|
2956
|
-
},
|
|
2922
|
+
}, y(e.options, "debugRows", "getCenterRows"));
|
|
2957
2923
|
}
|
|
2958
|
-
},
|
|
2924
|
+
}, hr = {
|
|
2959
2925
|
getInitialState: (e) => ({
|
|
2960
2926
|
rowSelection: {},
|
|
2961
2927
|
...e
|
|
@@ -2990,21 +2956,21 @@ const ur = {
|
|
|
2990
2956
|
...t
|
|
2991
2957
|
};
|
|
2992
2958
|
return e.getRowModel().rows.forEach((i) => {
|
|
2993
|
-
|
|
2959
|
+
et(r, i.id, o, !0, e);
|
|
2994
2960
|
}), r;
|
|
2995
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
2961
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = R(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
2996
2962
|
rows: [],
|
|
2997
2963
|
flatRows: [],
|
|
2998
2964
|
rowsById: {}
|
|
2999
|
-
},
|
|
2965
|
+
}, y(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = R(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
3000
2966
|
rows: [],
|
|
3001
2967
|
flatRows: [],
|
|
3002
2968
|
rowsById: {}
|
|
3003
|
-
},
|
|
2969
|
+
}, y(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = R(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
3004
2970
|
rows: [],
|
|
3005
2971
|
flatRows: [],
|
|
3006
2972
|
rowsById: {}
|
|
3007
|
-
},
|
|
2973
|
+
}, y(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
3008
2974
|
const n = e.getFilteredRowModel().flatRows, {
|
|
3009
2975
|
rowSelection: t
|
|
3010
2976
|
} = e.getState();
|
|
@@ -3039,23 +3005,23 @@ const ur = {
|
|
|
3039
3005
|
const a = {
|
|
3040
3006
|
...i
|
|
3041
3007
|
};
|
|
3042
|
-
return
|
|
3008
|
+
return et(a, e.id, t, (s = o == null ? void 0 : o.selectChildren) != null ? s : !0, n), a;
|
|
3043
3009
|
});
|
|
3044
3010
|
}, e.getIsSelected = () => {
|
|
3045
3011
|
const {
|
|
3046
3012
|
rowSelection: t
|
|
3047
3013
|
} = n.getState();
|
|
3048
|
-
return
|
|
3014
|
+
return ct(e, t);
|
|
3049
3015
|
}, e.getIsSomeSelected = () => {
|
|
3050
3016
|
const {
|
|
3051
3017
|
rowSelection: t
|
|
3052
3018
|
} = n.getState();
|
|
3053
|
-
return
|
|
3019
|
+
return tt(e, t) === "some";
|
|
3054
3020
|
}, e.getIsAllSubRowsSelected = () => {
|
|
3055
3021
|
const {
|
|
3056
3022
|
rowSelection: t
|
|
3057
3023
|
} = n.getState();
|
|
3058
|
-
return
|
|
3024
|
+
return tt(e, t) === "all";
|
|
3059
3025
|
}, e.getCanSelect = () => {
|
|
3060
3026
|
var t;
|
|
3061
3027
|
return typeof n.options.enableRowSelection == "function" ? n.options.enableRowSelection(e) : (t = n.options.enableRowSelection) != null ? t : !0;
|
|
@@ -3073,20 +3039,20 @@ const ur = {
|
|
|
3073
3039
|
};
|
|
3074
3040
|
};
|
|
3075
3041
|
}
|
|
3076
|
-
},
|
|
3042
|
+
}, et = (e, n, t, o, r) => {
|
|
3077
3043
|
var i;
|
|
3078
3044
|
const s = r.getRow(n, !0);
|
|
3079
|
-
t ? (s.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), s.getCanSelect() && (e[n] = !0)) : delete e[n], o && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((a) =>
|
|
3045
|
+
t ? (s.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), s.getCanSelect() && (e[n] = !0)) : delete e[n], o && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((a) => et(e, a.id, t, o, r));
|
|
3080
3046
|
};
|
|
3081
|
-
function
|
|
3047
|
+
function Ue(e, n) {
|
|
3082
3048
|
const t = e.getState().rowSelection, o = [], r = {}, i = function(s, a) {
|
|
3083
3049
|
return s.map((u) => {
|
|
3084
3050
|
var g;
|
|
3085
|
-
const
|
|
3086
|
-
if (
|
|
3051
|
+
const c = ct(u, t);
|
|
3052
|
+
if (c && (o.push(u), r[u.id] = u), (g = u.subRows) != null && g.length && (u = {
|
|
3087
3053
|
...u,
|
|
3088
3054
|
subRows: i(u.subRows)
|
|
3089
|
-
}),
|
|
3055
|
+
}), c)
|
|
3090
3056
|
return u;
|
|
3091
3057
|
}).filter(Boolean);
|
|
3092
3058
|
};
|
|
@@ -3096,33 +3062,33 @@ function Ke(e, n) {
|
|
|
3096
3062
|
rowsById: r
|
|
3097
3063
|
};
|
|
3098
3064
|
}
|
|
3099
|
-
function
|
|
3065
|
+
function ct(e, n) {
|
|
3100
3066
|
var t;
|
|
3101
3067
|
return (t = n[e.id]) != null ? t : !1;
|
|
3102
3068
|
}
|
|
3103
|
-
function
|
|
3069
|
+
function tt(e, n, t) {
|
|
3104
3070
|
var o;
|
|
3105
3071
|
if (!((o = e.subRows) != null && o.length)) return !1;
|
|
3106
3072
|
let r = !0, i = !1;
|
|
3107
3073
|
return e.subRows.forEach((s) => {
|
|
3108
|
-
if (!(i && !r) && (s.getCanSelect() && (
|
|
3109
|
-
const a =
|
|
3074
|
+
if (!(i && !r) && (s.getCanSelect() && (ct(s, n) ? i = !0 : r = !1), s.subRows && s.subRows.length)) {
|
|
3075
|
+
const a = tt(s, n);
|
|
3110
3076
|
a === "all" ? i = !0 : (a === "some" && (i = !0), r = !1);
|
|
3111
3077
|
}
|
|
3112
3078
|
}), r ? "all" : i ? "some" : !1;
|
|
3113
3079
|
}
|
|
3114
|
-
const
|
|
3080
|
+
const nt = /([0-9]+)/gm, Sr = (e, n, t) => mn(J(e.getValue(t)).toLowerCase(), J(n.getValue(t)).toLowerCase()), vr = (e, n, t) => mn(J(e.getValue(t)), J(n.getValue(t))), Cr = (e, n, t) => ft(J(e.getValue(t)).toLowerCase(), J(n.getValue(t)).toLowerCase()), wr = (e, n, t) => ft(J(e.getValue(t)), J(n.getValue(t))), xr = (e, n, t) => {
|
|
3115
3081
|
const o = e.getValue(t), r = n.getValue(t);
|
|
3116
3082
|
return o > r ? 1 : o < r ? -1 : 0;
|
|
3117
|
-
},
|
|
3118
|
-
function
|
|
3083
|
+
}, Rr = (e, n, t) => ft(e.getValue(t), n.getValue(t));
|
|
3084
|
+
function ft(e, n) {
|
|
3119
3085
|
return e === n ? 0 : e > n ? 1 : -1;
|
|
3120
3086
|
}
|
|
3121
|
-
function
|
|
3087
|
+
function J(e) {
|
|
3122
3088
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
3123
3089
|
}
|
|
3124
|
-
function
|
|
3125
|
-
const t = e.split(
|
|
3090
|
+
function mn(e, n) {
|
|
3091
|
+
const t = e.split(nt).filter(Boolean), o = n.split(nt).filter(Boolean);
|
|
3126
3092
|
for (; t.length && o.length; ) {
|
|
3127
3093
|
const r = t.shift(), i = o.shift(), s = parseInt(r, 10), a = parseInt(i, 10), u = [s, a].sort();
|
|
3128
3094
|
if (isNaN(u[0])) {
|
|
@@ -3141,14 +3107,14 @@ function pn(e, n) {
|
|
|
3141
3107
|
}
|
|
3142
3108
|
return t.length - o.length;
|
|
3143
3109
|
}
|
|
3144
|
-
const
|
|
3145
|
-
alphanumeric:
|
|
3146
|
-
alphanumericCaseSensitive:
|
|
3147
|
-
text:
|
|
3148
|
-
textCaseSensitive:
|
|
3149
|
-
datetime:
|
|
3150
|
-
basic:
|
|
3151
|
-
},
|
|
3110
|
+
const fe = {
|
|
3111
|
+
alphanumeric: Sr,
|
|
3112
|
+
alphanumericCaseSensitive: vr,
|
|
3113
|
+
text: Cr,
|
|
3114
|
+
textCaseSensitive: wr,
|
|
3115
|
+
datetime: xr,
|
|
3116
|
+
basic: Rr
|
|
3117
|
+
}, yr = {
|
|
3152
3118
|
getInitialState: (e) => ({
|
|
3153
3119
|
sorting: [],
|
|
3154
3120
|
...e
|
|
@@ -3168,11 +3134,11 @@ const me = {
|
|
|
3168
3134
|
for (const r of t) {
|
|
3169
3135
|
const i = r == null ? void 0 : r.getValue(e.id);
|
|
3170
3136
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
|
3171
|
-
return
|
|
3172
|
-
if (typeof i == "string" && (o = !0, i.split(
|
|
3173
|
-
return
|
|
3137
|
+
return fe.datetime;
|
|
3138
|
+
if (typeof i == "string" && (o = !0, i.split(nt).length > 1))
|
|
3139
|
+
return fe.alphanumeric;
|
|
3174
3140
|
}
|
|
3175
|
-
return o ?
|
|
3141
|
+
return o ? fe.text : fe.basic;
|
|
3176
3142
|
}, e.getAutoSortDir = () => {
|
|
3177
3143
|
const t = n.getFilteredRowModel().flatRows[0];
|
|
3178
3144
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -3180,22 +3146,22 @@ const me = {
|
|
|
3180
3146
|
var t, o;
|
|
3181
3147
|
if (!e)
|
|
3182
3148
|
throw new Error();
|
|
3183
|
-
return De(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t :
|
|
3149
|
+
return De(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : fe[e.columnDef.sortingFn];
|
|
3184
3150
|
}, e.toggleSorting = (t, o) => {
|
|
3185
3151
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
3186
3152
|
n.setSorting((s) => {
|
|
3187
3153
|
const a = s == null ? void 0 : s.find((d) => d.id === e.id), u = s == null ? void 0 : s.findIndex((d) => d.id === e.id);
|
|
3188
|
-
let g = [],
|
|
3189
|
-
if (s != null && s.length && e.getCanMultiSort() && o ? a ?
|
|
3190
|
-
var
|
|
3154
|
+
let g = [], c, S = i ? t : r === "desc";
|
|
3155
|
+
if (s != null && s.length && e.getCanMultiSort() && o ? a ? c = "toggle" : c = "add" : s != null && s.length && u !== s.length - 1 ? c = "replace" : a ? c = "toggle" : c = "replace", c === "toggle" && (i || r || (c = "remove")), c === "add") {
|
|
3156
|
+
var f;
|
|
3191
3157
|
g = [...s, {
|
|
3192
3158
|
id: e.id,
|
|
3193
3159
|
desc: S
|
|
3194
|
-
}], g.splice(0, g.length - ((
|
|
3195
|
-
} else
|
|
3160
|
+
}], g.splice(0, g.length - ((f = n.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
|
|
3161
|
+
} else c === "toggle" ? g = s.map((d) => d.id === e.id ? {
|
|
3196
3162
|
...d,
|
|
3197
3163
|
desc: S
|
|
3198
|
-
} : d) :
|
|
3164
|
+
} : d) : c === "remove" ? g = s.filter((d) => d.id !== e.id) : g = [{
|
|
3199
3165
|
id: e.id,
|
|
3200
3166
|
desc: S
|
|
3201
3167
|
}];
|
|
@@ -3237,47 +3203,47 @@ const me = {
|
|
|
3237
3203
|
e.setSorting(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.sorting) != null ? t : []);
|
|
3238
3204
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
3239
3205
|
}
|
|
3240
|
-
},
|
|
3241
|
-
Go,
|
|
3242
|
-
ar,
|
|
3243
|
-
or,
|
|
3244
|
-
rr,
|
|
3206
|
+
}, jr = [
|
|
3245
3207
|
qo,
|
|
3246
|
-
Bo,
|
|
3247
|
-
ur,
|
|
3248
|
-
//depends on ColumnFaceting
|
|
3249
3208
|
dr,
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3209
|
+
ir,
|
|
3210
|
+
sr,
|
|
3211
|
+
Uo,
|
|
3212
|
+
Ko,
|
|
3254
3213
|
gr,
|
|
3214
|
+
//depends on ColumnFaceting
|
|
3255
3215
|
cr,
|
|
3216
|
+
//depends on ColumnFiltering
|
|
3217
|
+
yr,
|
|
3218
|
+
or,
|
|
3219
|
+
//depends on RowSorting
|
|
3256
3220
|
fr,
|
|
3257
3221
|
pr,
|
|
3258
|
-
|
|
3222
|
+
mr,
|
|
3223
|
+
hr,
|
|
3224
|
+
ar
|
|
3259
3225
|
];
|
|
3260
|
-
function
|
|
3226
|
+
function _r(e) {
|
|
3261
3227
|
var n, t;
|
|
3262
3228
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
3263
|
-
const o = [...
|
|
3229
|
+
const o = [...jr, ...(n = e._features) != null ? n : []];
|
|
3264
3230
|
let r = {
|
|
3265
3231
|
_features: o
|
|
3266
3232
|
};
|
|
3267
|
-
const i = r._features.reduce((
|
|
3233
|
+
const i = r._features.reduce((f, d) => Object.assign(f, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(r)), {}), s = (f) => r.options.mergeOptions ? r.options.mergeOptions(i, f) : {
|
|
3268
3234
|
...i,
|
|
3269
|
-
...
|
|
3235
|
+
...f
|
|
3270
3236
|
};
|
|
3271
3237
|
let u = {
|
|
3272
3238
|
...{},
|
|
3273
3239
|
...(t = e.initialState) != null ? t : {}
|
|
3274
3240
|
};
|
|
3275
|
-
r._features.forEach((
|
|
3241
|
+
r._features.forEach((f) => {
|
|
3276
3242
|
var d;
|
|
3277
|
-
u = (d =
|
|
3243
|
+
u = (d = f.getInitialState == null ? void 0 : f.getInitialState(u)) != null ? d : u;
|
|
3278
3244
|
});
|
|
3279
3245
|
const g = [];
|
|
3280
|
-
let
|
|
3246
|
+
let c = !1;
|
|
3281
3247
|
const S = {
|
|
3282
3248
|
_features: o,
|
|
3283
3249
|
options: {
|
|
@@ -3285,11 +3251,11 @@ function yr(e) {
|
|
|
3285
3251
|
...e
|
|
3286
3252
|
},
|
|
3287
3253
|
initialState: u,
|
|
3288
|
-
_queue: (
|
|
3289
|
-
g.push(
|
|
3254
|
+
_queue: (f) => {
|
|
3255
|
+
g.push(f), c || (c = !0, Promise.resolve().then(() => {
|
|
3290
3256
|
for (; g.length; )
|
|
3291
3257
|
g.shift()();
|
|
3292
|
-
|
|
3258
|
+
c = !1;
|
|
3293
3259
|
}).catch((d) => setTimeout(() => {
|
|
3294
3260
|
throw d;
|
|
3295
3261
|
})));
|
|
@@ -3297,75 +3263,75 @@ function yr(e) {
|
|
|
3297
3263
|
reset: () => {
|
|
3298
3264
|
r.setState(r.initialState);
|
|
3299
3265
|
},
|
|
3300
|
-
setOptions: (
|
|
3301
|
-
const d =
|
|
3266
|
+
setOptions: (f) => {
|
|
3267
|
+
const d = W(f, r.options);
|
|
3302
3268
|
r.options = s(d);
|
|
3303
3269
|
},
|
|
3304
3270
|
getState: () => r.options.state,
|
|
3305
|
-
setState: (
|
|
3306
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
|
3271
|
+
setState: (f) => {
|
|
3272
|
+
r.options.onStateChange == null || r.options.onStateChange(f);
|
|
3307
3273
|
},
|
|
3308
|
-
_getRowId: (
|
|
3274
|
+
_getRowId: (f, d, p) => {
|
|
3309
3275
|
var m;
|
|
3310
|
-
return (m = r.options.getRowId == null ? void 0 : r.options.getRowId(
|
|
3276
|
+
return (m = r.options.getRowId == null ? void 0 : r.options.getRowId(f, d, p)) != null ? m : `${p ? [p.id, d].join(".") : d}`;
|
|
3311
3277
|
},
|
|
3312
3278
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
3313
3279
|
// The final calls start at the bottom of the model,
|
|
3314
3280
|
// expanded rows, which then work their way up
|
|
3315
3281
|
getRowModel: () => r.getPaginationRowModel(),
|
|
3316
3282
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
3317
|
-
getRow: (
|
|
3318
|
-
let p = (d ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[
|
|
3319
|
-
if (!p && (p = r.getCoreRowModel().rowsById[
|
|
3320
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
3283
|
+
getRow: (f, d) => {
|
|
3284
|
+
let p = (d ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[f];
|
|
3285
|
+
if (!p && (p = r.getCoreRowModel().rowsById[f], !p))
|
|
3286
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
|
|
3321
3287
|
return p;
|
|
3322
3288
|
},
|
|
3323
|
-
_getDefaultColumnDef:
|
|
3289
|
+
_getDefaultColumnDef: R(() => [r.options.defaultColumn], (f) => {
|
|
3324
3290
|
var d;
|
|
3325
|
-
return
|
|
3291
|
+
return f = (d = f) != null ? d : {}, {
|
|
3326
3292
|
header: (p) => {
|
|
3327
3293
|
const m = p.header.column.columnDef;
|
|
3328
3294
|
return m.accessorKey ? m.accessorKey : m.accessorFn ? m.id : null;
|
|
3329
3295
|
},
|
|
3330
3296
|
// footer: props => props.header.column.id,
|
|
3331
3297
|
cell: (p) => {
|
|
3332
|
-
var m,
|
|
3333
|
-
return (m = (
|
|
3298
|
+
var m, C;
|
|
3299
|
+
return (m = (C = p.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? m : null;
|
|
3334
3300
|
},
|
|
3335
3301
|
...r._features.reduce((p, m) => Object.assign(p, m.getDefaultColumnDef == null ? void 0 : m.getDefaultColumnDef()), {}),
|
|
3336
|
-
...
|
|
3302
|
+
...f
|
|
3337
3303
|
};
|
|
3338
|
-
},
|
|
3304
|
+
}, y(e, "debugColumns", "_getDefaultColumnDef")),
|
|
3339
3305
|
_getColumnDefs: () => r.options.columns,
|
|
3340
|
-
getAllColumns:
|
|
3341
|
-
const d = function(p, m,
|
|
3342
|
-
return
|
|
3343
|
-
const
|
|
3344
|
-
return
|
|
3306
|
+
getAllColumns: R(() => [r._getColumnDefs()], (f) => {
|
|
3307
|
+
const d = function(p, m, C) {
|
|
3308
|
+
return C === void 0 && (C = 0), p.map((v) => {
|
|
3309
|
+
const j = Ho(r, v, C, m), w = v;
|
|
3310
|
+
return j.columns = w.columns ? d(w.columns, j, C + 1) : [], j;
|
|
3345
3311
|
});
|
|
3346
3312
|
};
|
|
3347
|
-
return d(
|
|
3348
|
-
},
|
|
3349
|
-
getAllFlatColumns:
|
|
3350
|
-
_getAllFlatColumnsById:
|
|
3351
|
-
getAllLeafColumns:
|
|
3352
|
-
let p =
|
|
3313
|
+
return d(f);
|
|
3314
|
+
}, y(e, "debugColumns", "getAllColumns")),
|
|
3315
|
+
getAllFlatColumns: R(() => [r.getAllColumns()], (f) => f.flatMap((d) => d.getFlatColumns()), y(e, "debugColumns", "getAllFlatColumns")),
|
|
3316
|
+
_getAllFlatColumnsById: R(() => [r.getAllFlatColumns()], (f) => f.reduce((d, p) => (d[p.id] = p, d), {}), y(e, "debugColumns", "getAllFlatColumnsById")),
|
|
3317
|
+
getAllLeafColumns: R(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, d) => {
|
|
3318
|
+
let p = f.flatMap((m) => m.getLeafColumns());
|
|
3353
3319
|
return d(p);
|
|
3354
|
-
},
|
|
3355
|
-
getColumn: (
|
|
3356
|
-
const d = r._getAllFlatColumnsById()[
|
|
3357
|
-
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${
|
|
3320
|
+
}, y(e, "debugColumns", "getAllLeafColumns")),
|
|
3321
|
+
getColumn: (f) => {
|
|
3322
|
+
const d = r._getAllFlatColumnsById()[f];
|
|
3323
|
+
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${f}' does not exist.`), d;
|
|
3358
3324
|
}
|
|
3359
3325
|
};
|
|
3360
3326
|
Object.assign(r, S);
|
|
3361
|
-
for (let
|
|
3362
|
-
const d = r._features[
|
|
3327
|
+
for (let f = 0; f < r._features.length; f++) {
|
|
3328
|
+
const d = r._features[f];
|
|
3363
3329
|
d == null || d.createTable == null || d.createTable(r);
|
|
3364
3330
|
}
|
|
3365
3331
|
return r;
|
|
3366
3332
|
}
|
|
3367
|
-
function
|
|
3368
|
-
return (e) =>
|
|
3333
|
+
function hn() {
|
|
3334
|
+
return (e) => R(() => [e.options.data], (n) => {
|
|
3369
3335
|
const t = {
|
|
3370
3336
|
rows: [],
|
|
3371
3337
|
flatRows: [],
|
|
@@ -3374,18 +3340,18 @@ function mn() {
|
|
|
3374
3340
|
i === void 0 && (i = 0);
|
|
3375
3341
|
const a = [];
|
|
3376
3342
|
for (let g = 0; g < r.length; g++) {
|
|
3377
|
-
const
|
|
3378
|
-
if (t.flatRows.push(
|
|
3343
|
+
const c = Bo(e, e._getRowId(r[g], g, s), r[g], g, i, void 0, s == null ? void 0 : s.id);
|
|
3344
|
+
if (t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows) {
|
|
3379
3345
|
var u;
|
|
3380
|
-
|
|
3346
|
+
c.originalSubRows = e.options.getSubRows(r[g], g), (u = c.originalSubRows) != null && u.length && (c.subRows = o(c.originalSubRows, i + 1, c));
|
|
3381
3347
|
}
|
|
3382
3348
|
}
|
|
3383
3349
|
return a;
|
|
3384
3350
|
};
|
|
3385
3351
|
return t.rows = o(n), t;
|
|
3386
|
-
},
|
|
3352
|
+
}, y(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
3387
3353
|
}
|
|
3388
|
-
function
|
|
3354
|
+
function Fr(e) {
|
|
3389
3355
|
const n = [], t = (o) => {
|
|
3390
3356
|
var r;
|
|
3391
3357
|
n.push(o), (r = o.subRows) != null && r.length && o.getIsExpanded() && o.subRows.forEach(t);
|
|
@@ -3396,8 +3362,8 @@ function jr(e) {
|
|
|
3396
3362
|
rowsById: e.rowsById
|
|
3397
3363
|
};
|
|
3398
3364
|
}
|
|
3399
|
-
function
|
|
3400
|
-
return (n) =>
|
|
3365
|
+
function Ir(e) {
|
|
3366
|
+
return (n) => R(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
|
|
3401
3367
|
if (!o.rows.length)
|
|
3402
3368
|
return o;
|
|
3403
3369
|
const {
|
|
@@ -3409,23 +3375,23 @@ function _r(e) {
|
|
|
3409
3375
|
flatRows: a,
|
|
3410
3376
|
rowsById: u
|
|
3411
3377
|
} = o;
|
|
3412
|
-
const g = r * i,
|
|
3413
|
-
s = s.slice(g,
|
|
3378
|
+
const g = r * i, c = g + r;
|
|
3379
|
+
s = s.slice(g, c);
|
|
3414
3380
|
let S;
|
|
3415
3381
|
n.options.paginateExpandedRows ? S = {
|
|
3416
3382
|
rows: s,
|
|
3417
3383
|
flatRows: a,
|
|
3418
3384
|
rowsById: u
|
|
3419
|
-
} : S =
|
|
3385
|
+
} : S = Fr({
|
|
3420
3386
|
rows: s,
|
|
3421
3387
|
flatRows: a,
|
|
3422
3388
|
rowsById: u
|
|
3423
3389
|
}), S.flatRows = [];
|
|
3424
|
-
const
|
|
3425
|
-
S.flatRows.push(d), d.subRows.length && d.subRows.forEach(
|
|
3390
|
+
const f = (d) => {
|
|
3391
|
+
S.flatRows.push(d), d.subRows.length && d.subRows.forEach(f);
|
|
3426
3392
|
};
|
|
3427
|
-
return S.rows.forEach(
|
|
3428
|
-
},
|
|
3393
|
+
return S.rows.forEach(f), S;
|
|
3394
|
+
}, y(n.options, "debugTable", "getPaginationRowModel"));
|
|
3429
3395
|
}
|
|
3430
3396
|
/**
|
|
3431
3397
|
* react-table
|
|
@@ -3437,22 +3403,22 @@ function _r(e) {
|
|
|
3437
3403
|
*
|
|
3438
3404
|
* @license MIT
|
|
3439
3405
|
*/
|
|
3440
|
-
function
|
|
3441
|
-
return e ?
|
|
3406
|
+
function Nt(e, n) {
|
|
3407
|
+
return e ? Pr(e) ? /* @__PURE__ */ Ye.createElement(e, n) : e : null;
|
|
3442
3408
|
}
|
|
3443
|
-
function
|
|
3444
|
-
return
|
|
3409
|
+
function Pr(e) {
|
|
3410
|
+
return Er(e) || typeof e == "function" || $r(e);
|
|
3445
3411
|
}
|
|
3446
|
-
function
|
|
3412
|
+
function Er(e) {
|
|
3447
3413
|
return typeof e == "function" && (() => {
|
|
3448
3414
|
const n = Object.getPrototypeOf(e);
|
|
3449
3415
|
return n.prototype && n.prototype.isReactComponent;
|
|
3450
3416
|
})();
|
|
3451
3417
|
}
|
|
3452
|
-
function
|
|
3418
|
+
function $r(e) {
|
|
3453
3419
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
3454
3420
|
}
|
|
3455
|
-
function
|
|
3421
|
+
function Sn(e) {
|
|
3456
3422
|
const n = {
|
|
3457
3423
|
state: {},
|
|
3458
3424
|
// Dummy state
|
|
@@ -3461,9 +3427,9 @@ function hn(e) {
|
|
|
3461
3427
|
// noop
|
|
3462
3428
|
renderFallbackValue: null,
|
|
3463
3429
|
...e
|
|
3464
|
-
}, [t] =
|
|
3465
|
-
current:
|
|
3466
|
-
})), [o, r] =
|
|
3430
|
+
}, [t] = Ye.useState(() => ({
|
|
3431
|
+
current: _r(n)
|
|
3432
|
+
})), [o, r] = Ye.useState(() => t.current.initialState);
|
|
3467
3433
|
return t.current.setOptions((i) => ({
|
|
3468
3434
|
...i,
|
|
3469
3435
|
...e,
|
|
@@ -3478,7 +3444,7 @@ function hn(e) {
|
|
|
3478
3444
|
}
|
|
3479
3445
|
})), t.current;
|
|
3480
3446
|
}
|
|
3481
|
-
const
|
|
3447
|
+
const vn = ({
|
|
3482
3448
|
actions: e,
|
|
3483
3449
|
reloadData: n,
|
|
3484
3450
|
selectedRowKeys: t,
|
|
@@ -3488,7 +3454,7 @@ const Sn = ({
|
|
|
3488
3454
|
H,
|
|
3489
3455
|
{
|
|
3490
3456
|
variant: "light",
|
|
3491
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3457
|
+
leftSection: /* @__PURE__ */ l.jsx(Gn, { size: 16, stroke: 1.5 }),
|
|
3492
3458
|
size: o,
|
|
3493
3459
|
onClick: e.add,
|
|
3494
3460
|
children: "Add"
|
|
@@ -3497,7 +3463,7 @@ const Sn = ({
|
|
|
3497
3463
|
(e == null ? void 0 : e.edit) && /* @__PURE__ */ l.jsx(
|
|
3498
3464
|
H,
|
|
3499
3465
|
{
|
|
3500
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3466
|
+
leftSection: /* @__PURE__ */ l.jsx(Hn, { size: 16, stroke: 1.5 }),
|
|
3501
3467
|
size: o,
|
|
3502
3468
|
variant: "light",
|
|
3503
3469
|
onClick: () => e.edit !== void 0 && e.edit(t[0]),
|
|
@@ -3508,7 +3474,7 @@ const Sn = ({
|
|
|
3508
3474
|
(e == null ? void 0 : e.reload) && /* @__PURE__ */ l.jsx(
|
|
3509
3475
|
H,
|
|
3510
3476
|
{
|
|
3511
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3477
|
+
leftSection: /* @__PURE__ */ l.jsx(qn, { size: 16, stroke: 1.5 }),
|
|
3512
3478
|
size: o,
|
|
3513
3479
|
onClick: n,
|
|
3514
3480
|
variant: "light",
|
|
@@ -3518,7 +3484,7 @@ const Sn = ({
|
|
|
3518
3484
|
(e == null ? void 0 : e.import) && /* @__PURE__ */ l.jsx(
|
|
3519
3485
|
H,
|
|
3520
3486
|
{
|
|
3521
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3487
|
+
leftSection: /* @__PURE__ */ l.jsx(Bn, { size: 16, stroke: 1.5 }),
|
|
3522
3488
|
size: o,
|
|
3523
3489
|
variant: "light",
|
|
3524
3490
|
onClick: e.import,
|
|
@@ -3528,55 +3494,55 @@ const Sn = ({
|
|
|
3528
3494
|
(e == null ? void 0 : e.export) && /* @__PURE__ */ l.jsx(
|
|
3529
3495
|
H,
|
|
3530
3496
|
{
|
|
3531
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3497
|
+
leftSection: /* @__PURE__ */ l.jsx(Un, { size: 16, stroke: 1.5 }),
|
|
3532
3498
|
size: o,
|
|
3533
3499
|
variant: "light",
|
|
3534
3500
|
onClick: e.export,
|
|
3535
3501
|
children: "Export"
|
|
3536
3502
|
}
|
|
3537
3503
|
)
|
|
3538
|
-
] }),
|
|
3504
|
+
] }), Cn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), Mr = "__selectcol__", { Thead: br, Tr: Ke, Th: Dr, Tbody: Vr, Td: kt } = Kt, wn = (e) => {
|
|
3539
3505
|
let n;
|
|
3540
|
-
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(
|
|
3541
|
-
/* @__PURE__ */ l.jsx(
|
|
3506
|
+
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(Ke, { children: /* @__PURE__ */ l.jsx(kt, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(Q, { justify: "center", align: "center", gap: "xs", children: [
|
|
3507
|
+
/* @__PURE__ */ l.jsx(Kn, { color: "var(--mantine-color-dimmed)" }),
|
|
3542
3508
|
/* @__PURE__ */ l.jsx(P, { c: "dimmed", fz: "sm", children: "No records found." })
|
|
3543
3509
|
] }) }) }, "empty-row") : n = e.table.getRowModel().rows.map((r) => /* @__PURE__ */ l.jsx(
|
|
3544
|
-
|
|
3510
|
+
Ke,
|
|
3545
3511
|
{
|
|
3546
3512
|
bg: e.selectedRowKeys[r.id] ? "var(--mantine-color-blue-light)" : void 0,
|
|
3547
|
-
children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(
|
|
3513
|
+
children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(kt, { children: Nt(i.column.columnDef.cell, i.getContext()) }, i.id))
|
|
3548
3514
|
},
|
|
3549
3515
|
r.id
|
|
3550
3516
|
));
|
|
3551
3517
|
const t = /* @__PURE__ */ l.jsxs(
|
|
3552
|
-
|
|
3518
|
+
Kt,
|
|
3553
3519
|
{
|
|
3554
3520
|
striped: !0,
|
|
3555
3521
|
highlightOnHover: !0,
|
|
3556
3522
|
verticalSpacing: "xs",
|
|
3557
3523
|
tabularNums: !0,
|
|
3558
3524
|
children: [
|
|
3559
|
-
/* @__PURE__ */ l.jsx(
|
|
3560
|
-
|
|
3525
|
+
/* @__PURE__ */ l.jsx(br, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(Ke, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
|
|
3526
|
+
Dr,
|
|
3561
3527
|
{
|
|
3562
|
-
w: i.id ===
|
|
3563
|
-
children: i.isPlaceholder ? null :
|
|
3528
|
+
w: i.id === Mr ? "1%" : void 0,
|
|
3529
|
+
children: i.isPlaceholder ? null : Nt(
|
|
3564
3530
|
i.column.columnDef.header,
|
|
3565
3531
|
i.getContext()
|
|
3566
3532
|
)
|
|
3567
3533
|
},
|
|
3568
3534
|
i.id
|
|
3569
3535
|
)) }, r.id)) }),
|
|
3570
|
-
/* @__PURE__ */ l.jsx(
|
|
3536
|
+
/* @__PURE__ */ l.jsx(Vr, { pos: "relative", children: n })
|
|
3571
3537
|
]
|
|
3572
3538
|
}
|
|
3573
3539
|
);
|
|
3574
3540
|
if (!e.bordered) return t;
|
|
3575
3541
|
const o = {};
|
|
3576
|
-
return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(
|
|
3577
|
-
},
|
|
3578
|
-
pageSizeSelectorActive:
|
|
3579
|
-
},
|
|
3542
|
+
return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(te, { withBorder: !0, p: 0, style: o, children: t });
|
|
3543
|
+
}, Tr = "_pageSizeSelectorActive_1wv6j_1", Ar = {
|
|
3544
|
+
pageSizeSelectorActive: Tr
|
|
3545
|
+
}, xn = ({
|
|
3580
3546
|
total: e,
|
|
3581
3547
|
pageIndex: n,
|
|
3582
3548
|
pageSize: t,
|
|
@@ -3596,7 +3562,7 @@ const Sn = ({
|
|
|
3596
3562
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
3597
3563
|
/* @__PURE__ */ l.jsx(P, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
|
|
3598
3564
|
/* @__PURE__ */ l.jsx(
|
|
3599
|
-
|
|
3565
|
+
Nr,
|
|
3600
3566
|
{
|
|
3601
3567
|
size: "sm",
|
|
3602
3568
|
values: ["10", "20", "50", "100"],
|
|
@@ -3609,30 +3575,30 @@ const Sn = ({
|
|
|
3609
3575
|
] }),
|
|
3610
3576
|
i
|
|
3611
3577
|
] }) : i;
|
|
3612
|
-
},
|
|
3613
|
-
xs:
|
|
3614
|
-
sm:
|
|
3615
|
-
md:
|
|
3616
|
-
lg:
|
|
3617
|
-
xl:
|
|
3578
|
+
}, Lt = {
|
|
3579
|
+
xs: de(22),
|
|
3580
|
+
sm: de(26),
|
|
3581
|
+
md: de(32),
|
|
3582
|
+
lg: de(38),
|
|
3583
|
+
xl: de(44)
|
|
3618
3584
|
};
|
|
3619
|
-
function
|
|
3585
|
+
function Nr({
|
|
3620
3586
|
size: e,
|
|
3621
3587
|
values: n,
|
|
3622
3588
|
value: t,
|
|
3623
3589
|
onChange: o
|
|
3624
3590
|
}) {
|
|
3625
|
-
return /* @__PURE__ */ l.jsxs(
|
|
3626
|
-
/* @__PURE__ */ l.jsx(
|
|
3591
|
+
return /* @__PURE__ */ l.jsxs(ie, { withinPortal: !0, withArrow: !0, offset: 2, children: [
|
|
3592
|
+
/* @__PURE__ */ l.jsx(Nn, { children: /* @__PURE__ */ l.jsx(
|
|
3627
3593
|
H,
|
|
3628
3594
|
{
|
|
3629
3595
|
size: e,
|
|
3630
3596
|
variant: "default",
|
|
3631
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
3597
|
+
rightSection: /* @__PURE__ */ l.jsx(Yn, { size: 16, stroke: 1.5 }),
|
|
3632
3598
|
style: [
|
|
3633
3599
|
{ fontWeight: "normal" },
|
|
3634
3600
|
(r) => ({
|
|
3635
|
-
height:
|
|
3601
|
+
height: Lt[e],
|
|
3636
3602
|
paddingLeft: r.spacing[e],
|
|
3637
3603
|
paddingRight: r.spacing[e]
|
|
3638
3604
|
})
|
|
@@ -3645,14 +3611,14 @@ function Tr({
|
|
|
3645
3611
|
children: t
|
|
3646
3612
|
}
|
|
3647
3613
|
) }),
|
|
3648
|
-
/* @__PURE__ */ l.jsx(
|
|
3614
|
+
/* @__PURE__ */ l.jsx(kn, { children: n.map((r) => {
|
|
3649
3615
|
const i = r === t;
|
|
3650
3616
|
return /* @__PURE__ */ l.jsx(
|
|
3651
|
-
|
|
3617
|
+
Ln,
|
|
3652
3618
|
{
|
|
3653
|
-
className: i ?
|
|
3619
|
+
className: i ? Ar.pageSizeSelectorActive : void 0,
|
|
3654
3620
|
style: [
|
|
3655
|
-
{ height:
|
|
3621
|
+
{ height: Lt[e] }
|
|
3656
3622
|
// isCurrent
|
|
3657
3623
|
// ? {
|
|
3658
3624
|
// color: "var(--mantine-color-text)",
|
|
@@ -3670,64 +3636,64 @@ function Tr({
|
|
|
3670
3636
|
}) })
|
|
3671
3637
|
] });
|
|
3672
3638
|
}
|
|
3673
|
-
const
|
|
3674
|
-
var
|
|
3639
|
+
const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
3640
|
+
var v, j;
|
|
3675
3641
|
const [n, t] = M({
|
|
3676
3642
|
records: [],
|
|
3677
3643
|
total: 0
|
|
3678
3644
|
}), [o, r] = M(!1), [i, s] = M(
|
|
3679
3645
|
{}
|
|
3680
|
-
), a = (
|
|
3681
|
-
r(!0), e.getData(
|
|
3682
|
-
t(
|
|
3646
|
+
), a = (w) => {
|
|
3647
|
+
r(!0), e.getData(w).then((x) => {
|
|
3648
|
+
t(x), r(!1);
|
|
3683
3649
|
});
|
|
3684
|
-
}, u = (
|
|
3685
|
-
const
|
|
3650
|
+
}, u = (w, x) => {
|
|
3651
|
+
const F = {
|
|
3686
3652
|
...e.query.query,
|
|
3687
|
-
limit:
|
|
3688
|
-
offset:
|
|
3653
|
+
limit: x,
|
|
3654
|
+
offset: w * x
|
|
3689
3655
|
};
|
|
3690
|
-
e.query.update(
|
|
3691
|
-
}, [g,
|
|
3692
|
-
const
|
|
3656
|
+
e.query.update(F);
|
|
3657
|
+
}, [g, c, S] = I(() => {
|
|
3658
|
+
const w = e.query.query.limit, x = Math.floor(
|
|
3693
3659
|
(e.query.query.offset || 0) / e.query.query.limit
|
|
3694
|
-
),
|
|
3695
|
-
return [
|
|
3660
|
+
), F = Math.ceil(n.total / e.query.query.limit);
|
|
3661
|
+
return [w, x, F];
|
|
3696
3662
|
}, [e.query.query.limit, e.query.query.offset, n.total]);
|
|
3697
|
-
|
|
3698
|
-
const
|
|
3663
|
+
ve(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
|
|
3664
|
+
const f = I(() => Object.keys(i).filter((w) => i[w]).map((w) => e.normalizeRowId(w)), [i]);
|
|
3699
3665
|
let d, p;
|
|
3700
|
-
|
|
3701
|
-
|
|
3666
|
+
Cn(e.actions) && (d = /* @__PURE__ */ l.jsx(
|
|
3667
|
+
vn,
|
|
3702
3668
|
{
|
|
3703
3669
|
actions: e.actions,
|
|
3704
3670
|
reloadData: () => a(e.query.query),
|
|
3705
|
-
selectedRowKeys:
|
|
3671
|
+
selectedRowKeys: f
|
|
3706
3672
|
}
|
|
3707
3673
|
));
|
|
3708
|
-
const m = ((
|
|
3674
|
+
const m = ((v = e.pagination) == null ? void 0 : v.positions) || kr;
|
|
3709
3675
|
if (m.size > 0) {
|
|
3710
|
-
const
|
|
3711
|
-
|
|
3676
|
+
const w = /* @__PURE__ */ l.jsx(
|
|
3677
|
+
xn,
|
|
3712
3678
|
{
|
|
3713
3679
|
total: S,
|
|
3714
|
-
pageIndex:
|
|
3680
|
+
pageIndex: c,
|
|
3715
3681
|
pageSize: g,
|
|
3716
3682
|
onUpdatePagination: u,
|
|
3717
|
-
allowPageSizeChange: (
|
|
3683
|
+
allowPageSizeChange: (j = e.pagination) == null ? void 0 : j.showSizeChanger
|
|
3718
3684
|
}
|
|
3719
3685
|
);
|
|
3720
3686
|
m.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(k, { justify: "space-between", gap: "sm", children: [
|
|
3721
3687
|
d,
|
|
3722
|
-
|
|
3723
|
-
] }) : d = /* @__PURE__ */ l.jsx(z, { justify: "flex-end", children:
|
|
3724
|
-
|
|
3688
|
+
w
|
|
3689
|
+
] }) : d = /* @__PURE__ */ l.jsx(z, { justify: "flex-end", children: w })), (m.has("bottomRight") || m.has("bottomLeft") || m.has("bottomCenter")) && (m.has("bottomLeft") ? p = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
|
|
3690
|
+
w,
|
|
3725
3691
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3726
3692
|
"Showing ",
|
|
3727
|
-
Math.min(
|
|
3693
|
+
Math.min(c * g + 1, n.total),
|
|
3728
3694
|
" to",
|
|
3729
3695
|
" ",
|
|
3730
|
-
Math.min((
|
|
3696
|
+
Math.min((c + 1) * g, n.total),
|
|
3731
3697
|
" of ",
|
|
3732
3698
|
n.total,
|
|
3733
3699
|
" ",
|
|
@@ -3736,20 +3702,20 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3736
3702
|
] }) : p = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
|
|
3737
3703
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3738
3704
|
"Showing ",
|
|
3739
|
-
Math.min(
|
|
3705
|
+
Math.min(c * g + 1, n.total),
|
|
3740
3706
|
" to",
|
|
3741
3707
|
" ",
|
|
3742
|
-
Math.min((
|
|
3708
|
+
Math.min((c + 1) * g, n.total),
|
|
3743
3709
|
" of ",
|
|
3744
3710
|
n.total,
|
|
3745
3711
|
" ",
|
|
3746
3712
|
"records"
|
|
3747
3713
|
] }),
|
|
3748
|
-
|
|
3714
|
+
w
|
|
3749
3715
|
] }));
|
|
3750
3716
|
}
|
|
3751
|
-
const
|
|
3752
|
-
|
|
3717
|
+
const C = I(() => /* @__PURE__ */ l.jsx(
|
|
3718
|
+
Lr,
|
|
3753
3719
|
{
|
|
3754
3720
|
data: n,
|
|
3755
3721
|
loading: o,
|
|
@@ -3770,9 +3736,9 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3770
3736
|
d !== void 0,
|
|
3771
3737
|
p !== void 0
|
|
3772
3738
|
]);
|
|
3773
|
-
return d === void 0 || p === void 0 ?
|
|
3739
|
+
return d === void 0 || p === void 0 ? C : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
3774
3740
|
d !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3775
|
-
|
|
3741
|
+
te,
|
|
3776
3742
|
{
|
|
3777
3743
|
withBorder: !0,
|
|
3778
3744
|
p: "xs",
|
|
@@ -3784,9 +3750,9 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3784
3750
|
children: d
|
|
3785
3751
|
}
|
|
3786
3752
|
),
|
|
3787
|
-
|
|
3753
|
+
C,
|
|
3788
3754
|
p !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3789
|
-
|
|
3755
|
+
te,
|
|
3790
3756
|
{
|
|
3791
3757
|
withBorder: !0,
|
|
3792
3758
|
p: "xs",
|
|
@@ -3799,13 +3765,13 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3799
3765
|
}
|
|
3800
3766
|
)
|
|
3801
3767
|
] });
|
|
3802
|
-
},
|
|
3803
|
-
const n =
|
|
3768
|
+
}, Lr = (e) => {
|
|
3769
|
+
const n = I(() => {
|
|
3804
3770
|
const o = [
|
|
3805
3771
|
{
|
|
3806
3772
|
id: "selection",
|
|
3807
3773
|
header: ({ table: r }) => /* @__PURE__ */ l.jsx(
|
|
3808
|
-
|
|
3774
|
+
le,
|
|
3809
3775
|
{
|
|
3810
3776
|
checked: r.getIsAllRowsSelected(),
|
|
3811
3777
|
indeterminate: r.getIsSomeRowsSelected(),
|
|
@@ -3813,7 +3779,7 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3813
3779
|
}
|
|
3814
3780
|
),
|
|
3815
3781
|
cell: ({ row: r }) => /* @__PURE__ */ l.jsx(
|
|
3816
|
-
|
|
3782
|
+
le,
|
|
3817
3783
|
{
|
|
3818
3784
|
checked: r.getIsSelected(),
|
|
3819
3785
|
disabled: !r.getCanSelect(),
|
|
@@ -3830,10 +3796,10 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3830
3796
|
cell: ({ row: i }) => r.render(i.original)
|
|
3831
3797
|
});
|
|
3832
3798
|
}), o;
|
|
3833
|
-
}, [e.columns]), t =
|
|
3799
|
+
}, [e.columns]), t = Sn({
|
|
3834
3800
|
data: e.data.records,
|
|
3835
3801
|
columns: n,
|
|
3836
|
-
getCoreRowModel:
|
|
3802
|
+
getCoreRowModel: hn(),
|
|
3837
3803
|
// convert to string, but we actually can get away with number
|
|
3838
3804
|
getRowId: (o) => e.getRowId(o).toString(),
|
|
3839
3805
|
state: {
|
|
@@ -3843,7 +3809,7 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3843
3809
|
manualPagination: !0
|
|
3844
3810
|
});
|
|
3845
3811
|
return /* @__PURE__ */ l.jsx(
|
|
3846
|
-
|
|
3812
|
+
wn,
|
|
3847
3813
|
{
|
|
3848
3814
|
table: t,
|
|
3849
3815
|
selectedRowKeys: e.selectedRowKeys,
|
|
@@ -3853,7 +3819,7 @@ const Vr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ei = (e) => {
|
|
|
3853
3819
|
}
|
|
3854
3820
|
);
|
|
3855
3821
|
};
|
|
3856
|
-
function
|
|
3822
|
+
function Rn(e, n, {
|
|
3857
3823
|
title: t,
|
|
3858
3824
|
nestedKey: o,
|
|
3859
3825
|
component: r
|
|
@@ -3861,18 +3827,18 @@ function xn(e, n, {
|
|
|
3861
3827
|
let i;
|
|
3862
3828
|
if (r !== void 0)
|
|
3863
3829
|
i = r;
|
|
3864
|
-
else if (
|
|
3865
|
-
n.cardinality === "1:N" || n.cardinality === "N:N" ? i =
|
|
3830
|
+
else if (oe(n))
|
|
3831
|
+
n.cardinality === "1:N" || n.cardinality === "N:N" ? i = dt : i = ut;
|
|
3866
3832
|
else {
|
|
3867
|
-
if (
|
|
3833
|
+
if (ae[n.datatype] === void 0)
|
|
3868
3834
|
throw new Error(
|
|
3869
3835
|
`No display component found for datatype ${n.datatype}`
|
|
3870
3836
|
);
|
|
3871
|
-
i =
|
|
3837
|
+
i = ae[n.datatype];
|
|
3872
3838
|
}
|
|
3873
3839
|
const s = {
|
|
3874
3840
|
key: n.name,
|
|
3875
|
-
title: t || /* @__PURE__ */ l.jsx(
|
|
3841
|
+
title: t || /* @__PURE__ */ l.jsx(T, { value: n.label }),
|
|
3876
3842
|
accessorFn: (a) => a[n.tsName],
|
|
3877
3843
|
render: (a) => {
|
|
3878
3844
|
const u = a[n.tsName];
|
|
@@ -3884,7 +3850,7 @@ function xn(e, n, {
|
|
|
3884
3850
|
return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
|
|
3885
3851
|
}), s;
|
|
3886
3852
|
}
|
|
3887
|
-
function
|
|
3853
|
+
function Vi(e, n, t, {
|
|
3888
3854
|
title: o,
|
|
3889
3855
|
nestedKey: r,
|
|
3890
3856
|
component: i
|
|
@@ -3892,18 +3858,18 @@ function $i(e, n, t, {
|
|
|
3892
3858
|
let s;
|
|
3893
3859
|
if (i !== void 0)
|
|
3894
3860
|
s = i;
|
|
3895
|
-
else if (
|
|
3896
|
-
t.cardinality === "1:N" || t.cardinality === "N:N" ? s =
|
|
3861
|
+
else if (oe(t))
|
|
3862
|
+
t.cardinality === "1:N" || t.cardinality === "N:N" ? s = dt : s = ut;
|
|
3897
3863
|
else {
|
|
3898
|
-
if (
|
|
3864
|
+
if (ae[t.datatype] === void 0)
|
|
3899
3865
|
throw new Error(
|
|
3900
3866
|
`No display component found for datatype ${t.datatype}`
|
|
3901
3867
|
);
|
|
3902
|
-
s =
|
|
3868
|
+
s = ae[t.datatype];
|
|
3903
3869
|
}
|
|
3904
3870
|
const a = {
|
|
3905
3871
|
key: n + "." + t.name,
|
|
3906
|
-
title: o || /* @__PURE__ */ l.jsx(
|
|
3872
|
+
title: o || /* @__PURE__ */ l.jsx(T, { value: t.label }),
|
|
3907
3873
|
accessorFn: (u) => u[n.tsName][t.tsName],
|
|
3908
3874
|
render: (u) => {
|
|
3909
3875
|
const g = u[n.tsName][t.tsName];
|
|
@@ -3915,25 +3881,25 @@ function $i(e, n, t, {
|
|
|
3915
3881
|
return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: g });
|
|
3916
3882
|
}), a;
|
|
3917
3883
|
}
|
|
3918
|
-
function
|
|
3919
|
-
return t.map((r) =>
|
|
3884
|
+
function Ti(e, n, t, o = {}) {
|
|
3885
|
+
return t.map((r) => yn(r) ? r : Rn(e, n.publicProperties[r], o));
|
|
3920
3886
|
}
|
|
3921
|
-
function
|
|
3922
|
-
return t.map((r) =>
|
|
3887
|
+
function Ai(e, n, t = [], o = {}) {
|
|
3888
|
+
return t.map((r) => yn(r) ? r : Rn(e, n.publicProperties[r], o));
|
|
3923
3889
|
}
|
|
3924
|
-
function
|
|
3890
|
+
function yn(e) {
|
|
3925
3891
|
return typeof e == "object" && "key" in e && "title" in e;
|
|
3926
3892
|
}
|
|
3927
|
-
const
|
|
3928
|
-
var
|
|
3893
|
+
const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
3894
|
+
var c, S;
|
|
3929
3895
|
const [n, t] = M(
|
|
3930
3896
|
{}
|
|
3931
|
-
), o =
|
|
3932
|
-
const
|
|
3897
|
+
), o = I(() => {
|
|
3898
|
+
const f = [
|
|
3933
3899
|
{
|
|
3934
3900
|
id: "selection",
|
|
3935
3901
|
header: ({ table: d }) => /* @__PURE__ */ l.jsx(
|
|
3936
|
-
|
|
3902
|
+
le,
|
|
3937
3903
|
{
|
|
3938
3904
|
checked: d.getIsAllRowsSelected(),
|
|
3939
3905
|
indeterminate: d.getIsSomeRowsSelected(),
|
|
@@ -3941,7 +3907,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3941
3907
|
}
|
|
3942
3908
|
),
|
|
3943
3909
|
cell: ({ row: d }) => /* @__PURE__ */ l.jsx(
|
|
3944
|
-
|
|
3910
|
+
le,
|
|
3945
3911
|
{
|
|
3946
3912
|
checked: d.getIsSelected(),
|
|
3947
3913
|
disabled: !d.getCanSelect(),
|
|
@@ -3951,39 +3917,39 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3951
3917
|
}
|
|
3952
3918
|
];
|
|
3953
3919
|
return e.columns.forEach((d) => {
|
|
3954
|
-
|
|
3920
|
+
f.push({
|
|
3955
3921
|
id: d.key,
|
|
3956
3922
|
header: d.title,
|
|
3957
3923
|
accessorFn: d.render,
|
|
3958
3924
|
cell: ({ row: p }) => d.render(p.original)
|
|
3959
3925
|
});
|
|
3960
|
-
}),
|
|
3961
|
-
}, [e.columns]), r =
|
|
3926
|
+
}), f;
|
|
3927
|
+
}, [e.columns]), r = Sn({
|
|
3962
3928
|
data: e.data,
|
|
3963
3929
|
columns: o,
|
|
3964
|
-
getCoreRowModel:
|
|
3965
|
-
getPaginationRowModel:
|
|
3930
|
+
getCoreRowModel: hn(),
|
|
3931
|
+
getPaginationRowModel: Ir(),
|
|
3966
3932
|
state: {
|
|
3967
3933
|
rowSelection: n
|
|
3968
3934
|
},
|
|
3969
3935
|
onRowSelectionChange: t
|
|
3970
|
-
}), i =
|
|
3936
|
+
}), i = I(() => Object.keys(n).filter((f) => n[f]).map(Number), [n]);
|
|
3971
3937
|
let s, a;
|
|
3972
|
-
|
|
3973
|
-
|
|
3938
|
+
Cn(e.actions) && (s = /* @__PURE__ */ l.jsx(
|
|
3939
|
+
vn,
|
|
3974
3940
|
{
|
|
3975
3941
|
actions: e.actions,
|
|
3976
3942
|
selectedRowKeys: i
|
|
3977
3943
|
}
|
|
3978
3944
|
));
|
|
3979
|
-
const u = ((
|
|
3945
|
+
const u = ((c = e.pagination) == null ? void 0 : c.positions) || Or;
|
|
3980
3946
|
if (u.size > 0) {
|
|
3981
|
-
const
|
|
3982
|
-
|
|
3947
|
+
const f = r.getState().pagination, d = /* @__PURE__ */ l.jsx(
|
|
3948
|
+
xn,
|
|
3983
3949
|
{
|
|
3984
3950
|
total: r.getPageCount(),
|
|
3985
|
-
pageIndex:
|
|
3986
|
-
pageSize:
|
|
3951
|
+
pageIndex: f.pageIndex,
|
|
3952
|
+
pageSize: f.pageSize,
|
|
3987
3953
|
onUpdatePagination: (p, m) => r.setPagination({ pageIndex: p, pageSize: m }),
|
|
3988
3954
|
allowPageSizeChange: (S = e.pagination) == null ? void 0 : S.showSizeChanger
|
|
3989
3955
|
}
|
|
@@ -3995,11 +3961,11 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3995
3961
|
d,
|
|
3996
3962
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3997
3963
|
"Showing ",
|
|
3998
|
-
|
|
3964
|
+
f.pageIndex * f.pageSize + 1,
|
|
3999
3965
|
" to",
|
|
4000
3966
|
" ",
|
|
4001
3967
|
Math.min(
|
|
4002
|
-
(
|
|
3968
|
+
(f.pageIndex + 1) * f.pageSize,
|
|
4003
3969
|
e.data.length
|
|
4004
3970
|
),
|
|
4005
3971
|
" ",
|
|
@@ -4010,11 +3976,11 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
4010
3976
|
] }) : a = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
|
|
4011
3977
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
4012
3978
|
"Showing ",
|
|
4013
|
-
|
|
3979
|
+
f.pageIndex * f.pageSize + 1,
|
|
4014
3980
|
" to",
|
|
4015
3981
|
" ",
|
|
4016
3982
|
Math.min(
|
|
4017
|
-
(
|
|
3983
|
+
(f.pageIndex + 1) * f.pageSize,
|
|
4018
3984
|
e.data.length
|
|
4019
3985
|
),
|
|
4020
3986
|
" ",
|
|
@@ -4026,7 +3992,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
4026
3992
|
] }));
|
|
4027
3993
|
}
|
|
4028
3994
|
const g = /* @__PURE__ */ l.jsx(
|
|
4029
|
-
|
|
3995
|
+
wn,
|
|
4030
3996
|
{
|
|
4031
3997
|
selectedRowKeys: n,
|
|
4032
3998
|
table: r,
|
|
@@ -4037,7 +4003,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
4037
4003
|
);
|
|
4038
4004
|
return s === void 0 && a === void 0 ? g : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4039
4005
|
s !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4040
|
-
|
|
4006
|
+
te,
|
|
4041
4007
|
{
|
|
4042
4008
|
withBorder: !0,
|
|
4043
4009
|
p: "xs",
|
|
@@ -4051,7 +4017,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
4051
4017
|
),
|
|
4052
4018
|
g,
|
|
4053
4019
|
a !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4054
|
-
|
|
4020
|
+
te,
|
|
4055
4021
|
{
|
|
4056
4022
|
withBorder: !0,
|
|
4057
4023
|
p: "xs",
|
|
@@ -4064,20 +4030,16 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
4064
4030
|
}
|
|
4065
4031
|
)
|
|
4066
4032
|
] });
|
|
4067
|
-
},
|
|
4068
|
-
integer:
|
|
4069
|
-
float:
|
|
4070
|
-
string:
|
|
4071
|
-
boolean:
|
|
4072
|
-
"string[]":
|
|
4073
|
-
enum:
|
|
4074
|
-
date:
|
|
4075
|
-
datetime:
|
|
4076
|
-
}
|
|
4077
|
-
function Lr(e) {
|
|
4078
|
-
return typeof e == "object" && e !== null && "lang" in e && "lang2value" in e;
|
|
4079
|
-
}
|
|
4080
|
-
const ne = class ne {
|
|
4033
|
+
}, Ot = {
|
|
4034
|
+
integer: be,
|
|
4035
|
+
float: be,
|
|
4036
|
+
string: me,
|
|
4037
|
+
boolean: nn,
|
|
4038
|
+
"string[]": me,
|
|
4039
|
+
enum: me,
|
|
4040
|
+
date: bo,
|
|
4041
|
+
datetime: Do
|
|
4042
|
+
}, ee = class ee {
|
|
4081
4043
|
/**
|
|
4082
4044
|
* Creates a new I18N instance.
|
|
4083
4045
|
* @param initialLocale - The initial locale to use
|
|
@@ -4102,7 +4064,7 @@ const ne = class ne {
|
|
|
4102
4064
|
* @returns The singleton instance of I18NStore
|
|
4103
4065
|
*/
|
|
4104
4066
|
static getInstance() {
|
|
4105
|
-
return
|
|
4067
|
+
return ee.instance || (ee.instance = new ee()), ee.instance;
|
|
4106
4068
|
}
|
|
4107
4069
|
/**
|
|
4108
4070
|
* Gets the current locale.
|
|
@@ -4193,7 +4155,7 @@ const ne = class ne {
|
|
|
4193
4155
|
return t.args !== void 0 && Object.entries(t.args).forEach(([s, a]) => {
|
|
4194
4156
|
const u = new RegExp(`{{\\s*${s}\\s*}}`, "g");
|
|
4195
4157
|
let g;
|
|
4196
|
-
|
|
4158
|
+
zr(a) ? g = a.lang2value[this.locale.language] || a.lang2value[a.lang] : g = a, r = r.replace(u, g);
|
|
4197
4159
|
}), r;
|
|
4198
4160
|
}
|
|
4199
4161
|
}
|
|
@@ -4202,29 +4164,32 @@ const ne = class ne {
|
|
|
4202
4164
|
* Singleton instance of the I18NStore.
|
|
4203
4165
|
* @private
|
|
4204
4166
|
*/
|
|
4205
|
-
G(
|
|
4206
|
-
let
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4167
|
+
G(ee, "instance");
|
|
4168
|
+
let ot = ee;
|
|
4169
|
+
function zr(e) {
|
|
4170
|
+
return typeof e == "object" && e !== null && "lang" in e && "lang2value" in e;
|
|
4171
|
+
}
|
|
4172
|
+
const Gr = { "validator.not_empty": "This field cannot be empty.", "validator.password": "Password must be between 8 and 32 characters and contain at least one uppercase letter and one number", "validator.email": "Email is invalid", "validator.username": "Username must be between 3 and 20 characters, start with a letter, and contain only alphanumeric characters, hyphens, underscores, or periods", "validator.url": "URL is invalid", "validator.phone_number": "Phone number is invalid", "validator.time_range": "The start time must be before the end time", "confirmation.valuesDoNotMatch": "Values do not match with {{name}}" }, Hr = { "validator.not_empty": "Trường này không được để trống.", "validator.password": "Mật khẩu phải từ 8 đến 32 ký tự và chứa ít nhất một chữ hoa và một số", "validator.email": "Email không hợp lệ", "validator.username": "Tên người dùng phải từ 3 đến 20 ký tự, bắt đầu bằng một chữ cái và chỉ chứa các ký tự chữ và số, dấu gạch ngang, dấu gạch dưới hoặc dấu chấm", "validator.url": "URL không hợp lệ", "validator.phone_number": "Số điện thoại không hợp lệ", "validator.time_range": "Thời gian bắt đầu phải trước thời gian kết thúc", "confirmation.valuesDoNotMatch": "Giá trị không khớp với {{name}}" }, qr = {
|
|
4173
|
+
en: Gr,
|
|
4174
|
+
vi: Hr
|
|
4210
4175
|
};
|
|
4211
|
-
|
|
4212
|
-
function
|
|
4176
|
+
ot.getInstance().registerTranslations(qr);
|
|
4177
|
+
function Br(e) {
|
|
4213
4178
|
return e === void 0 || typeof e == "string" && e.trim() === "";
|
|
4214
4179
|
}
|
|
4215
|
-
const
|
|
4180
|
+
const Ur = {
|
|
4216
4181
|
lang2value: {
|
|
4217
4182
|
en: "Update",
|
|
4218
4183
|
vi: "Cập Nhật"
|
|
4219
4184
|
},
|
|
4220
4185
|
lang: "en"
|
|
4221
|
-
},
|
|
4186
|
+
}, Kr = {
|
|
4222
4187
|
lang2value: {
|
|
4223
4188
|
en: "Clear",
|
|
4224
4189
|
vi: "Xóa"
|
|
4225
4190
|
},
|
|
4226
4191
|
lang: "en"
|
|
4227
|
-
},
|
|
4192
|
+
}, Yr = ({
|
|
4228
4193
|
db: e,
|
|
4229
4194
|
property: n,
|
|
4230
4195
|
InputComponent: t,
|
|
@@ -4234,22 +4199,22 @@ const qr = {
|
|
|
4234
4199
|
onChange: s
|
|
4235
4200
|
}) => {
|
|
4236
4201
|
if (t === void 0)
|
|
4237
|
-
if (
|
|
4202
|
+
if (oe(n)) {
|
|
4238
4203
|
if (n.isEmbedded)
|
|
4239
4204
|
throw new Error("You should use nested property for embedded object");
|
|
4240
|
-
t = n.cardinality === "N:N" || n.cardinality === "1:N" ?
|
|
4205
|
+
t = n.cardinality === "N:N" || n.cardinality === "1:N" ? rn : on;
|
|
4241
4206
|
} else {
|
|
4242
|
-
if (
|
|
4207
|
+
if (Ot[n.datatype] === void 0)
|
|
4243
4208
|
throw new Error(
|
|
4244
4209
|
`No input component found for datatype ${n.datatype}`
|
|
4245
4210
|
);
|
|
4246
|
-
t =
|
|
4211
|
+
t = Ot[n.datatype];
|
|
4247
4212
|
}
|
|
4248
|
-
const a =
|
|
4213
|
+
const a = I(() => {
|
|
4249
4214
|
var g;
|
|
4250
4215
|
return r === void 0 || (g = r(i).errorMessage) == null ? void 0 : g.t({ args: { name: n.label } });
|
|
4251
4216
|
}, [r, i, n.label]);
|
|
4252
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4217
|
+
return /* @__PURE__ */ l.jsxs(Q, { gap: 5, children: [
|
|
4253
4218
|
/* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
4254
4219
|
/* @__PURE__ */ l.jsx(
|
|
4255
4220
|
$.Col,
|
|
@@ -4260,12 +4225,12 @@ const qr = {
|
|
|
4260
4225
|
justifyContent: o.align || "left"
|
|
4261
4226
|
},
|
|
4262
4227
|
children: /* @__PURE__ */ l.jsx(
|
|
4263
|
-
|
|
4228
|
+
sn,
|
|
4264
4229
|
{
|
|
4265
|
-
label: /* @__PURE__ */ l.jsx(
|
|
4230
|
+
label: /* @__PURE__ */ l.jsx(T, { value: n.label }),
|
|
4266
4231
|
name: n.name,
|
|
4267
4232
|
required: n.isRequired,
|
|
4268
|
-
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
4233
|
+
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: n.description }) : void 0,
|
|
4269
4234
|
align: o.align
|
|
4270
4235
|
}
|
|
4271
4236
|
)
|
|
@@ -4283,18 +4248,18 @@ const qr = {
|
|
|
4283
4248
|
] }),
|
|
4284
4249
|
a !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
4285
4250
|
/* @__PURE__ */ l.jsx($.Col, { span: o.labelCol }),
|
|
4286
|
-
/* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
4251
|
+
/* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(B.Error, { children: a }) })
|
|
4287
4252
|
] })
|
|
4288
4253
|
] });
|
|
4289
4254
|
};
|
|
4290
|
-
function
|
|
4255
|
+
function Wr({
|
|
4291
4256
|
properties: e,
|
|
4292
4257
|
queryConditions: n
|
|
4293
4258
|
}) {
|
|
4294
4259
|
return e.reduce((t, o) => n[o.property.tsName] === void 0 ? t : t + 1, 0);
|
|
4295
4260
|
}
|
|
4296
|
-
const
|
|
4297
|
-
function
|
|
4261
|
+
const Xr = (e, n) => en(e, n, !1);
|
|
4262
|
+
function Jr({
|
|
4298
4263
|
properties: e,
|
|
4299
4264
|
queryConditions: n
|
|
4300
4265
|
}) {
|
|
@@ -4303,14 +4268,14 @@ function Wr({
|
|
|
4303
4268
|
const i = n[r.property.tsName];
|
|
4304
4269
|
if (i !== void 0)
|
|
4305
4270
|
if (o.length > 0 && o.push(" & "), r.property.datatype === "date" || r.property.datatype === "datetime") {
|
|
4306
|
-
const s = r.property.datatype === "date" ?
|
|
4307
|
-
i.op === "bti" ? (o.push(s(t, K(i.value[0]).toDate())), o.push(" ≤ "), o.push(
|
|
4271
|
+
const s = r.property.datatype === "date" ? Se : Xr;
|
|
4272
|
+
i.op === "bti" ? (o.push(s(t, K(i.value[0]).toDate())), o.push(" ≤ "), o.push(pe(t, r.property.label)), o.push(" ≤ "), o.push(s(t, K(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(pe(t, r.property.label)), o.push(" ≥ "), o.push(s(t, K(i.value).toDate()))) : i.op === "lte" && (o.push(pe(t, r.property.label)), o.push(" ≤ "), o.push(s(t, K(i.value).toDate())));
|
|
4308
4273
|
} else
|
|
4309
|
-
o.push(
|
|
4274
|
+
o.push(pe(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
|
|
4310
4275
|
}
|
|
4311
4276
|
return o.join("");
|
|
4312
4277
|
}
|
|
4313
|
-
const
|
|
4278
|
+
const Qr = ({
|
|
4314
4279
|
db: e,
|
|
4315
4280
|
properties: n,
|
|
4316
4281
|
styles: t,
|
|
@@ -4320,69 +4285,69 @@ const Xr = ({
|
|
|
4320
4285
|
queryConditions: s
|
|
4321
4286
|
}) => {
|
|
4322
4287
|
const [a, u] = M({});
|
|
4323
|
-
|
|
4288
|
+
ve(() => {
|
|
4324
4289
|
const p = {};
|
|
4325
4290
|
for (const m of n) {
|
|
4326
|
-
const
|
|
4327
|
-
|
|
4328
|
-
start:
|
|
4329
|
-
end:
|
|
4330
|
-
} :
|
|
4331
|
-
start:
|
|
4291
|
+
const C = s[m.property.tsName];
|
|
4292
|
+
C !== void 0 && (m.property.datatype === "date" || m.property.datatype === "datetime" ? C.op === "bti" ? p[m.property.tsName] = {
|
|
4293
|
+
start: C.value[0] ? new Date(C.value[0]) : void 0,
|
|
4294
|
+
end: C.value[1] ? new Date(C.value[1]) : void 0
|
|
4295
|
+
} : C.op === "gte" ? p[m.property.tsName] = {
|
|
4296
|
+
start: C.value ? new Date(C.value) : void 0,
|
|
4332
4297
|
end: void 0
|
|
4333
|
-
} :
|
|
4298
|
+
} : C.op === "lte" && (p[m.property.tsName] = {
|
|
4334
4299
|
start: void 0,
|
|
4335
|
-
end:
|
|
4336
|
-
}) : p[m.property.tsName] =
|
|
4300
|
+
end: C.value ? new Date(C.value) : void 0
|
|
4301
|
+
}) : p[m.property.tsName] = C.value);
|
|
4337
4302
|
}
|
|
4338
4303
|
u(p);
|
|
4339
4304
|
}, [n, s]);
|
|
4340
|
-
const [g,
|
|
4341
|
-
const p = [], m = {},
|
|
4342
|
-
for (const
|
|
4343
|
-
let
|
|
4344
|
-
if (!
|
|
4345
|
-
return { op: "eq", value:
|
|
4305
|
+
const [g, c, S] = I(() => {
|
|
4306
|
+
const p = [], m = {}, C = {};
|
|
4307
|
+
for (const v of n) {
|
|
4308
|
+
let j, w = (x) => {
|
|
4309
|
+
if (!Br(x))
|
|
4310
|
+
return { op: "eq", value: x };
|
|
4346
4311
|
};
|
|
4347
|
-
(
|
|
4312
|
+
(v.property.datatype === "date" || v.property.datatype === "datetime") && (j = eo.validateTimeRange, w = (x) => x.start !== void 0 && x.end !== void 0 ? {
|
|
4348
4313
|
op: "bti",
|
|
4349
|
-
value: [
|
|
4350
|
-
} :
|
|
4314
|
+
value: [x.start.toISOString(), x.end.toISOString()]
|
|
4315
|
+
} : x.start !== void 0 ? { op: "gte", value: x.start.toISOString() } : x.end !== void 0 ? { op: "lte", value: x.end.toISOString() } : void 0), m[v.property.tsName] = w, C[v.property.tsName] = j, p.push(
|
|
4351
4316
|
/* @__PURE__ */ l.jsx(
|
|
4352
|
-
|
|
4317
|
+
Yr,
|
|
4353
4318
|
{
|
|
4354
4319
|
db: e,
|
|
4355
|
-
property:
|
|
4356
|
-
InputComponent:
|
|
4357
|
-
value: a[
|
|
4358
|
-
onChange: (
|
|
4359
|
-
u({ ...a, [
|
|
4320
|
+
property: v.property,
|
|
4321
|
+
InputComponent: v.InputComponent,
|
|
4322
|
+
value: a[v.property.tsName],
|
|
4323
|
+
onChange: (x) => {
|
|
4324
|
+
u({ ...a, [v.property.tsName]: x });
|
|
4360
4325
|
},
|
|
4361
4326
|
layout: r,
|
|
4362
|
-
validator:
|
|
4327
|
+
validator: j
|
|
4363
4328
|
},
|
|
4364
|
-
|
|
4329
|
+
v.property.name
|
|
4365
4330
|
)
|
|
4366
4331
|
);
|
|
4367
4332
|
}
|
|
4368
|
-
return [p, m,
|
|
4369
|
-
}, [n, a, u]),
|
|
4333
|
+
return [p, m, C];
|
|
4334
|
+
}, [n, a, u]), f = (p) => {
|
|
4370
4335
|
const m = {};
|
|
4371
|
-
for (const
|
|
4372
|
-
if (p[
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4336
|
+
for (const C of n) {
|
|
4337
|
+
if (p[C.property.tsName] === void 0) continue;
|
|
4338
|
+
const v = c[C.property.tsName](p[C.property.tsName]);
|
|
4339
|
+
v !== void 0 && (m[C.property.tsName] = v);
|
|
4375
4340
|
}
|
|
4376
4341
|
i(m);
|
|
4377
|
-
}, d =
|
|
4342
|
+
}, d = I(() => (p) => {
|
|
4378
4343
|
for (const m of n) {
|
|
4379
|
-
const
|
|
4380
|
-
if (
|
|
4344
|
+
const C = S[m.property.tsName];
|
|
4345
|
+
if (C !== void 0 && !C(p[m.property.tsName]).isValid)
|
|
4381
4346
|
return !1;
|
|
4382
4347
|
}
|
|
4383
4348
|
return !0;
|
|
4384
4349
|
}, [n, S]);
|
|
4385
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4350
|
+
return /* @__PURE__ */ l.jsxs(Q, { gap: "sm", className: o, style: t, children: [
|
|
4386
4351
|
g,
|
|
4387
4352
|
/* @__PURE__ */ l.jsxs(k, { gap: "sm", justify: "flex-end", children: [
|
|
4388
4353
|
/* @__PURE__ */ l.jsx(
|
|
@@ -4392,10 +4357,10 @@ const Xr = ({
|
|
|
4392
4357
|
size: "xs",
|
|
4393
4358
|
color: "gray",
|
|
4394
4359
|
onClick: () => {
|
|
4395
|
-
u({}),
|
|
4360
|
+
u({}), f({});
|
|
4396
4361
|
},
|
|
4397
4362
|
disabled: Object.keys(a).length === 0,
|
|
4398
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4363
|
+
children: /* @__PURE__ */ l.jsx(T, { value: Kr })
|
|
4399
4364
|
}
|
|
4400
4365
|
),
|
|
4401
4366
|
/* @__PURE__ */ l.jsx(
|
|
@@ -4403,20 +4368,20 @@ const Xr = ({
|
|
|
4403
4368
|
{
|
|
4404
4369
|
variant: "light",
|
|
4405
4370
|
size: "xs",
|
|
4406
|
-
onClick: () =>
|
|
4371
|
+
onClick: () => f(a),
|
|
4407
4372
|
disabled: !d(a),
|
|
4408
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4373
|
+
children: /* @__PURE__ */ l.jsx(T, { value: Ur })
|
|
4409
4374
|
}
|
|
4410
4375
|
)
|
|
4411
4376
|
] })
|
|
4412
4377
|
] });
|
|
4413
|
-
},
|
|
4378
|
+
}, zt = /* @__PURE__ */ l.jsx(Jn, { size: 16, stroke: 1.5 }), Gt = /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }), Zr = {
|
|
4414
4379
|
lang2value: {
|
|
4415
4380
|
en: "Search By",
|
|
4416
4381
|
vi: "Tìm Kiếm Theo"
|
|
4417
4382
|
},
|
|
4418
4383
|
lang: "en"
|
|
4419
|
-
},
|
|
4384
|
+
}, ki = ({
|
|
4420
4385
|
query: e,
|
|
4421
4386
|
onChange: n,
|
|
4422
4387
|
debounceTime: t = 250,
|
|
@@ -4424,32 +4389,32 @@ const Xr = ({
|
|
|
4424
4389
|
searchField: r,
|
|
4425
4390
|
advancedSearch: i
|
|
4426
4391
|
}) => {
|
|
4427
|
-
const s =
|
|
4392
|
+
const s = Y(Z), [a, u] = M(e), [g, c] = M(!1), [S, f] = M([!1, Date.now()]), d = I(() => no(
|
|
4428
4393
|
t,
|
|
4429
|
-
(
|
|
4430
|
-
|
|
4394
|
+
(v) => {
|
|
4395
|
+
c(!1), n(v);
|
|
4431
4396
|
},
|
|
4432
4397
|
{ atBegin: !1 }
|
|
4433
|
-
), [t, n]), p =
|
|
4434
|
-
u(
|
|
4435
|
-
}, [u,
|
|
4436
|
-
o === void 0 && r !== void 0 && (o =
|
|
4398
|
+
), [t, n]), p = I(() => (v) => {
|
|
4399
|
+
u(v.target.value), c(!0), d(v.target.value);
|
|
4400
|
+
}, [u, c, d]);
|
|
4401
|
+
o === void 0 && r !== void 0 && (o = Zr);
|
|
4437
4402
|
let m = "";
|
|
4438
4403
|
if (o !== void 0 && (m = o.lang2value[s.language] || o.lang2value[o.lang]), r !== void 0 && (m.length > 0 && (m += " "), m += r.lang2value[s.language] || r.lang2value[r.lang]), i === void 0)
|
|
4439
4404
|
return /* @__PURE__ */ l.jsx(
|
|
4440
|
-
|
|
4405
|
+
xt,
|
|
4441
4406
|
{
|
|
4442
4407
|
flex: 1,
|
|
4443
4408
|
label: "Search",
|
|
4444
4409
|
placeholder: m,
|
|
4445
|
-
leftSection: g ?
|
|
4410
|
+
leftSection: g ? zt : Gt,
|
|
4446
4411
|
value: a,
|
|
4447
4412
|
onChange: p
|
|
4448
4413
|
}
|
|
4449
4414
|
);
|
|
4450
|
-
const
|
|
4415
|
+
const C = Wr(i);
|
|
4451
4416
|
return /* @__PURE__ */ l.jsxs(
|
|
4452
|
-
|
|
4417
|
+
Le,
|
|
4453
4418
|
{
|
|
4454
4419
|
width: "target",
|
|
4455
4420
|
trapFocus: !0,
|
|
@@ -4458,42 +4423,42 @@ const Xr = ({
|
|
|
4458
4423
|
shadow: "md",
|
|
4459
4424
|
opened: S[0],
|
|
4460
4425
|
onDismiss: () => {
|
|
4461
|
-
|
|
4426
|
+
f([!1, Date.now()]);
|
|
4462
4427
|
},
|
|
4463
4428
|
children: [
|
|
4464
|
-
/* @__PURE__ */ l.jsx(
|
|
4465
|
-
|
|
4429
|
+
/* @__PURE__ */ l.jsx(Le.Target, { children: /* @__PURE__ */ l.jsx(
|
|
4430
|
+
xt,
|
|
4466
4431
|
{
|
|
4467
4432
|
flex: 1,
|
|
4468
4433
|
label: "Search",
|
|
4469
4434
|
placeholder: m,
|
|
4470
|
-
leftSection: g ?
|
|
4435
|
+
leftSection: g ? zt : Gt,
|
|
4471
4436
|
rightSection: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4472
4437
|
/* @__PURE__ */ l.jsx(
|
|
4473
|
-
|
|
4438
|
+
Rt,
|
|
4474
4439
|
{
|
|
4475
4440
|
variant: "transparent",
|
|
4476
4441
|
"aria-label": "Clear Query",
|
|
4477
4442
|
onClick: () => {
|
|
4478
4443
|
u(""), n("");
|
|
4479
4444
|
},
|
|
4480
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4445
|
+
children: /* @__PURE__ */ l.jsx(Wn, { size: 16, stroke: 1.5, cursor: "pointer" })
|
|
4481
4446
|
}
|
|
4482
4447
|
),
|
|
4483
4448
|
/* @__PURE__ */ l.jsx(
|
|
4484
|
-
|
|
4449
|
+
Rt,
|
|
4485
4450
|
{
|
|
4486
4451
|
variant: "transparent",
|
|
4487
4452
|
"aria-label": "Extra Filters",
|
|
4488
|
-
color:
|
|
4453
|
+
color: C > 0 ? "orange" : void 0,
|
|
4489
4454
|
onClick: () => {
|
|
4490
|
-
S[1] + 200 >= Date.now() ||
|
|
4455
|
+
S[1] + 200 >= Date.now() || f([!0, Date.now()]);
|
|
4491
4456
|
},
|
|
4492
4457
|
children: /* @__PURE__ */ l.jsx(
|
|
4493
|
-
|
|
4458
|
+
Xn,
|
|
4494
4459
|
{
|
|
4495
4460
|
size: 16,
|
|
4496
|
-
stroke:
|
|
4461
|
+
stroke: C > 0 ? 2 : 1.5,
|
|
4497
4462
|
cursor: "pointer",
|
|
4498
4463
|
style: {
|
|
4499
4464
|
position: "relative"
|
|
@@ -4506,12 +4471,12 @@ const Xr = ({
|
|
|
4506
4471
|
rightSectionWidth: 68,
|
|
4507
4472
|
value: a,
|
|
4508
4473
|
onChange: p,
|
|
4509
|
-
description:
|
|
4474
|
+
description: Jr(i),
|
|
4510
4475
|
inputWrapperOrder: ["label", "input", "description", "error"]
|
|
4511
4476
|
}
|
|
4512
4477
|
) }),
|
|
4513
|
-
/* @__PURE__ */ l.jsx(
|
|
4514
|
-
|
|
4478
|
+
/* @__PURE__ */ l.jsx(Le.Dropdown, { children: /* @__PURE__ */ l.jsx(
|
|
4479
|
+
Qr,
|
|
4515
4480
|
{
|
|
4516
4481
|
db: i.db,
|
|
4517
4482
|
properties: i.properties,
|
|
@@ -4525,7 +4490,7 @@ const Xr = ({
|
|
|
4525
4490
|
]
|
|
4526
4491
|
}
|
|
4527
4492
|
);
|
|
4528
|
-
},
|
|
4493
|
+
}, ei = ne(
|
|
4529
4494
|
({
|
|
4530
4495
|
store: e,
|
|
4531
4496
|
record: n,
|
|
@@ -4535,53 +4500,34 @@ const Xr = ({
|
|
|
4535
4500
|
}) => {
|
|
4536
4501
|
if (r !== void 0 && !r(n))
|
|
4537
4502
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
4538
|
-
const i = n
|
|
4503
|
+
const i = Zt(n, t);
|
|
4539
4504
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4540
|
-
/* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(
|
|
4505
|
+
/* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(T, { value: t.label }) }),
|
|
4541
4506
|
i !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: t, value: i })
|
|
4542
4507
|
] });
|
|
4543
4508
|
}
|
|
4544
|
-
),
|
|
4545
|
-
(
|
|
4546
|
-
|
|
4547
|
-
record: n,
|
|
4548
|
-
properties: t,
|
|
4549
|
-
DisplayComponent: o,
|
|
4550
|
-
visible: r
|
|
4551
|
-
}) => {
|
|
4552
|
-
if (r !== void 0 && !r(n))
|
|
4553
|
-
return /* @__PURE__ */ l.jsx("div", {});
|
|
4554
|
-
const i = t[t.length - 1], s = t.reduce((a, u) => {
|
|
4555
|
-
if (a != null)
|
|
4556
|
-
return a[u.tsName];
|
|
4557
|
-
}, n);
|
|
4558
|
-
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4559
|
-
/* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(D, { value: i.label }) }),
|
|
4560
|
-
s !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: i, value: s })
|
|
4561
|
-
] });
|
|
4562
|
-
}
|
|
4563
|
-
), ei = 12, ti = (e) => {
|
|
4564
|
-
const n = e.schema, t = F(() => e.fieldGroups.map((o, r) => ni(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
|
|
4565
|
-
return /* @__PURE__ */ l.jsx(te, { gap: "sm", className: e.className, style: e.styles, children: t });
|
|
4509
|
+
), ti = 12, ni = (e) => {
|
|
4510
|
+
const n = e.schema, t = I(() => e.fieldGroups.map((o, r) => oi(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
|
|
4511
|
+
return /* @__PURE__ */ l.jsx(Q, { gap: "sm", className: e.className, style: e.styles, children: t });
|
|
4566
4512
|
};
|
|
4567
|
-
function
|
|
4513
|
+
function oi(e, n, t, o, r) {
|
|
4568
4514
|
const i = r.fields, s = [];
|
|
4569
4515
|
for (let a = 0; a < i.length; a++) {
|
|
4570
|
-
const u =
|
|
4516
|
+
const u = ti / i[a].length;
|
|
4571
4517
|
if (!Number.isInteger(u))
|
|
4572
4518
|
throw new Error(`Span must be an integer, but got ${u} for row ${a}`);
|
|
4573
4519
|
for (let g = 0; g < i[a].length; g++) {
|
|
4574
|
-
const
|
|
4520
|
+
const c = i[a][g];
|
|
4575
4521
|
let S;
|
|
4576
|
-
typeof
|
|
4522
|
+
typeof c == "function" ? S = c(n, t) : typeof c == "object" && "prop" in c ? S = rt(
|
|
4577
4523
|
n,
|
|
4578
4524
|
t,
|
|
4579
|
-
e.allProperties[
|
|
4580
|
-
|
|
4581
|
-
) : S =
|
|
4525
|
+
c.prop instanceof X ? c.prop : e.allProperties[c.prop],
|
|
4526
|
+
c.args
|
|
4527
|
+
) : S = rt(
|
|
4582
4528
|
n,
|
|
4583
4529
|
t,
|
|
4584
|
-
e.allProperties[
|
|
4530
|
+
c instanceof X ? c : e.allProperties[c]
|
|
4585
4531
|
), s.push(
|
|
4586
4532
|
/* @__PURE__ */ l.jsx($.Col, { span: u, children: S }, `${a}-${g}`)
|
|
4587
4533
|
);
|
|
@@ -4589,43 +4535,7 @@ function ni(e, n, t, o, r) {
|
|
|
4589
4535
|
}
|
|
4590
4536
|
return /* @__PURE__ */ l.jsx($, { gutter: "sm", children: s }, o);
|
|
4591
4537
|
}
|
|
4592
|
-
function
|
|
4593
|
-
if (X(e))
|
|
4594
|
-
return e.cardinality === "N:N" || e.cardinality === "1:N" ? ft : ct;
|
|
4595
|
-
if (de[e.datatype] === void 0)
|
|
4596
|
-
throw new Error(
|
|
4597
|
-
`No display component found for datatype ${e.datatype}`
|
|
4598
|
-
);
|
|
4599
|
-
return de[e.datatype];
|
|
4600
|
-
}
|
|
4601
|
-
function st(e, n, t, o = {}) {
|
|
4602
|
-
let r;
|
|
4603
|
-
return o.display !== void 0 ? r = o.display : r = yn(t), /* @__PURE__ */ l.jsx(
|
|
4604
|
-
Qr,
|
|
4605
|
-
{
|
|
4606
|
-
store: e,
|
|
4607
|
-
record: n,
|
|
4608
|
-
property: t,
|
|
4609
|
-
DisplayComponent: r,
|
|
4610
|
-
visible: o == null ? void 0 : o.visible
|
|
4611
|
-
}
|
|
4612
|
-
);
|
|
4613
|
-
}
|
|
4614
|
-
function Ti(e, n = {}) {
|
|
4615
|
-
const t = e[e.length - 1];
|
|
4616
|
-
let o;
|
|
4617
|
-
return n.display !== void 0 ? o = n.display : o = yn(t), (r, i) => /* @__PURE__ */ l.jsx(
|
|
4618
|
-
Zr,
|
|
4619
|
-
{
|
|
4620
|
-
store: r,
|
|
4621
|
-
record: i,
|
|
4622
|
-
properties: e,
|
|
4623
|
-
DisplayComponent: o,
|
|
4624
|
-
visible: n.visible
|
|
4625
|
-
}
|
|
4626
|
-
);
|
|
4627
|
-
}
|
|
4628
|
-
function Vi(e, n, t = {}) {
|
|
4538
|
+
function Li(e, n, t = {}) {
|
|
4629
4539
|
return (o, r) => {
|
|
4630
4540
|
if (t.visible !== void 0 && !t.visible(r))
|
|
4631
4541
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
@@ -4634,8 +4544,8 @@ function Vi(e, n, t = {}) {
|
|
|
4634
4544
|
if (typeof s == "function")
|
|
4635
4545
|
u = s(o, r);
|
|
4636
4546
|
else {
|
|
4637
|
-
let g,
|
|
4638
|
-
typeof s == "object" && "prop" in s ? (g = e.allProperties[s.prop], s.args !== void 0 && (
|
|
4547
|
+
let g, c = {};
|
|
4548
|
+
typeof s == "object" && "prop" in s ? (g = s.prop instanceof X ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof X ? s : e.allProperties[s], u = rt(o, r, g, c);
|
|
4639
4549
|
}
|
|
4640
4550
|
return /* @__PURE__ */ l.jsx("div", { children: u }, a);
|
|
4641
4551
|
});
|
|
@@ -4650,10 +4560,32 @@ function Vi(e, n, t = {}) {
|
|
|
4650
4560
|
);
|
|
4651
4561
|
};
|
|
4652
4562
|
}
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4563
|
+
function ri(e) {
|
|
4564
|
+
if (oe(e))
|
|
4565
|
+
return e.cardinality === "N:N" || e.cardinality === "1:N" ? dt : ut;
|
|
4566
|
+
if (ae[e.datatype] === void 0)
|
|
4567
|
+
throw new Error(
|
|
4568
|
+
`No display component found for datatype ${e.datatype}`
|
|
4569
|
+
);
|
|
4570
|
+
return ae[e.datatype];
|
|
4571
|
+
}
|
|
4572
|
+
function rt(e, n, t, o = {}) {
|
|
4573
|
+
let r;
|
|
4574
|
+
return o.display !== void 0 ? r = o.display : r = ri(t instanceof X ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
|
|
4575
|
+
ei,
|
|
4576
|
+
{
|
|
4577
|
+
store: e,
|
|
4578
|
+
record: n,
|
|
4579
|
+
property: t,
|
|
4580
|
+
DisplayComponent: r,
|
|
4581
|
+
visible: o == null ? void 0 : o.visible
|
|
4582
|
+
}
|
|
4583
|
+
);
|
|
4584
|
+
}
|
|
4585
|
+
const Oi = (e) => /* @__PURE__ */ l.jsxs(ye, { defaultValue: e.fieldTabs[0].tabName, children: [
|
|
4586
|
+
/* @__PURE__ */ l.jsx(ye.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Tab, { value: n.tabName, children: n.tabName }, t)) }),
|
|
4587
|
+
e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
|
|
4588
|
+
ni,
|
|
4657
4589
|
{
|
|
4658
4590
|
schema: e.schema,
|
|
4659
4591
|
store: e.store,
|
|
@@ -4665,74 +4597,75 @@ const Ai = (e) => /* @__PURE__ */ l.jsxs(xe, { defaultValue: e.fieldTabs[0].tabN
|
|
|
4665
4597
|
) }, t))
|
|
4666
4598
|
] });
|
|
4667
4599
|
export {
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4600
|
+
nn as BooleanInput,
|
|
4601
|
+
Mi as ConfirmationInput,
|
|
4602
|
+
$i as ConfirmationLabel,
|
|
4603
|
+
Xe as CountryFlagComponent,
|
|
4604
|
+
Ao as DEFAULT_LAYOUT,
|
|
4605
|
+
kr as DEFAULT_PAGINATION_POSITIONS,
|
|
4606
|
+
ae as DataType2DisplayComponent,
|
|
4607
|
+
$t as DataType2InputComponent,
|
|
4608
|
+
mo as DateDisplay,
|
|
4609
|
+
yo as DateInput,
|
|
4610
|
+
bo as DateRangeInput,
|
|
4611
|
+
po as DateTimeDisplay,
|
|
4612
|
+
Pi as DateTimeHideTimeDisplay,
|
|
4613
|
+
Do as DateTimeRangeInput,
|
|
4680
4614
|
lo as EmojiCountryFlag,
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
mi as NotFound,
|
|
4615
|
+
jo as EnumInput,
|
|
4616
|
+
bt as FormItem,
|
|
4617
|
+
No as FormItemInner,
|
|
4618
|
+
sn as FormItemLabel,
|
|
4619
|
+
hi as LanguageSelector,
|
|
4620
|
+
wi as Loading,
|
|
4621
|
+
xi as LoadingInline,
|
|
4622
|
+
Z as LocaleContext,
|
|
4623
|
+
mi as LocaleProvider,
|
|
4624
|
+
fo as MenuTrie,
|
|
4625
|
+
dt as MultiForeignKeyDisplay,
|
|
4626
|
+
rn as MultiForeignKeyInput,
|
|
4627
|
+
T as MultiLingualString,
|
|
4628
|
+
Ri as NotAuthorized,
|
|
4629
|
+
vi as NotFound,
|
|
4697
4630
|
Jt as NotFoundInline,
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4631
|
+
Ci as NotFoundSubPage,
|
|
4632
|
+
be as NumberInput,
|
|
4633
|
+
Fi as OrderedUniqueList,
|
|
4634
|
+
Je as Permission,
|
|
4702
4635
|
so as SVGCountryFlag,
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4636
|
+
Qr as SearchForm,
|
|
4637
|
+
Yr as SearchFormItem,
|
|
4638
|
+
at as SeraContext,
|
|
4639
|
+
Ei as SeraContextProvider,
|
|
4640
|
+
Ni as SeraEmbeddedTable,
|
|
4641
|
+
bi as SeraForm,
|
|
4642
|
+
ki as SeraSearch,
|
|
4643
|
+
Di as SeraTable,
|
|
4644
|
+
Ii as SeraVerticalMenu,
|
|
4645
|
+
ni as SeraView,
|
|
4646
|
+
Oi as SeraViewTab,
|
|
4647
|
+
ut as SingleForeignKeyDisplay,
|
|
4648
|
+
on as SingleForeignKeyInput,
|
|
4649
|
+
me as TextInput,
|
|
4717
4650
|
Qt as Trie,
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4651
|
+
It as TrieNode,
|
|
4652
|
+
uo as buildMenuItemIndex,
|
|
4653
|
+
V as countryFlags,
|
|
4654
|
+
co as filterAllowedItems,
|
|
4655
|
+
Wr as getNumberOfFilters,
|
|
4656
|
+
Zt as getPropertyValue,
|
|
4657
|
+
Jr as getReadableFilters,
|
|
4658
|
+
yi as groupBy,
|
|
4659
|
+
ji as groupByAsList,
|
|
4660
|
+
Li as groupFields,
|
|
4661
|
+
ko as isHorizontalLayout,
|
|
4662
|
+
yn as isSeraColumn,
|
|
4663
|
+
Ai as makeEmbeddedTableColumns,
|
|
4664
|
+
Rn as makeTableColumn,
|
|
4665
|
+
Vi as makeTableColumnFromNestedProperty,
|
|
4666
|
+
Ti as makeTableColumns,
|
|
4667
|
+
Pt as setPropertyValue,
|
|
4668
|
+
pe as translateMultiLingualString,
|
|
4669
|
+
_i as uniqueList,
|
|
4670
|
+
Si as useMultiLingualString
|
|
4738
4671
|
};
|