sera-components 1.6.0 → 1.6.3
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/index.d.ts +8 -8
- package/dist/form/{Form.d.ts → form.d.ts} +42 -1
- package/dist/form/index.d.ts +3 -3
- package/dist/index.js +1086 -1162
- package/dist/index.umd.cjs +7 -7
- package/dist/misc/index.d.ts +5 -5
- package/dist/search/index.d.ts +2 -2
- package/dist/search/{Search.d.ts → search.d.ts} +1 -1
- package/dist/table/{EmbeddedTable.d.ts → embedded-table.d.ts} +2 -2
- package/dist/table/index.d.ts +4 -4
- package/dist/table/{Table.d.ts → table.d.ts} +2 -2
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/test-id.d.ts +62 -0
- package/dist/view/index.d.ts +2 -2
- package/dist/view/{ViewTab.d.ts → view-tab.d.ts} +1 -1
- package/package.json +2 -2
- /package/dist/data/display/{BooleanDisplay.d.ts → boolean-display.d.ts} +0 -0
- /package/dist/data/display/{DateTimeDisplay.d.ts → datetime-display.d.ts} +0 -0
- /package/dist/data/display/{EnumDisplay.d.ts → enum-display.d.ts} +0 -0
- /package/dist/data/display/{ForeignKeyDisplay.d.ts → foreign-key-display.d.ts} +0 -0
- /package/dist/data/display/{TextDisplay.d.ts → text-display.d.ts} +0 -0
- /package/dist/data/inputs/{BooleanInput.d.ts → boolean-input.d.ts} +0 -0
- /package/dist/data/inputs/{ConfirmationInput.d.ts → confirmation-input.d.ts} +0 -0
- /package/dist/data/inputs/{DateInput.d.ts → date-input.d.ts} +0 -0
- /package/dist/data/inputs/{DateRangeInput.d.ts → date-range-input.d.ts} +0 -0
- /package/dist/data/inputs/{EnumInput.d.ts → enum-input.d.ts} +0 -0
- /package/dist/data/inputs/{ForeignKeyInput.d.ts → foreign-key-input.d.ts} +0 -0
- /package/dist/data/inputs/{NumberInput.d.ts → number-input.d.ts} +0 -0
- /package/dist/data/inputs/{PhoneNumberInput.d.ts → phone-number-input.d.ts} +0 -0
- /package/dist/data/inputs/{TextInput.d.ts → text-input.d.ts} +0 -0
- /package/dist/form/{FormItemLabel.d.ts → form-item-label.d.ts} +0 -0
- /package/dist/form/{FormItem.d.ts → form-item.d.ts} +0 -0
- /package/dist/misc/{CountryFlag.d.ts → country-flag.d.ts} +0 -0
- /package/dist/misc/{Language.d.ts → language.d.ts} +0 -0
- /package/dist/misc/{Locale.d.ts → locale.d.ts} +0 -0
- /package/dist/misc/{Menu.d.ts → menu.d.ts} +0 -0
- /package/dist/misc/{Transition.d.ts → transition.d.ts} +0 -0
- /package/dist/search/{SearchForm.d.ts → search-form.d.ts} +0 -0
- /package/dist/table/{makeColumns.d.ts → make-columns.d.ts} +0 -0
- /package/dist/table/{TableAction.d.ts → table-action.d.ts} +0 -0
- /package/dist/table/{TableContent.d.ts → table-content.d.ts} +0 -0
- /package/dist/table/{TablePagination.d.ts → table-pagination.d.ts} +0 -0
- /package/dist/utils/{propertyUtils.d.ts → property-utils.d.ts} +0 -0
- /package/dist/view/{MultiTabView.d.ts → multi-tab-view.d.ts} +0 -0
- /package/dist/view/{ViewItem.d.ts → view-item.d.ts} +0 -0
- /package/dist/view/{View.d.ts → view.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var In = Object.defineProperty;
|
|
2
|
+
var Pn = (e, n, t) => n in e ? In(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var Q = (e, n, t) => Pn(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import * as Ye from "react";
|
|
5
|
-
import
|
|
6
|
-
import { Paper as
|
|
7
|
-
import { IconCheck as
|
|
8
|
-
import { observer as
|
|
9
|
-
import { isNestedProperty as
|
|
5
|
+
import En, { createContext as rt, useContext as W, useMemo as F, useState as M, useEffect as we } from "react";
|
|
6
|
+
import { Paper as oe, Image as $n, Text as P, Menu as le, Button as B, Container as Mn, Alert as it, Stack as te, Flex as q, Loader as $e, NavLink as wt, Checkbox as ue, Group as L, Input as K, useCombobox as Gt, Combobox as O, Grid as $, InputBase as Dn, PasswordInput as Ht, Select as bn, CloseButton as Vn, Divider as Tn, Tooltip as qt, Fieldset as Nn, Table as Bt, rem as ce, Pagination as An, MenuTarget as kn, MenuDropdown as Ln, MenuItem as On, TextInput as xt, Popover as Le, ActionIcon as Rt, Tabs as ye } from "@mantine/core";
|
|
7
|
+
import { IconCheck as zn, IconInfoCircle as st, IconChevronRight as Gn, IconSearch as lt, IconCalendar as Me, IconHelpOctagonFilled as Ut, IconPlus as Hn, IconPencil as qn, IconReload as Bn, IconDatabaseImport as Un, IconDownload as Kn, IconDatabaseOff as Yn, IconSelector as Wn, IconCircleX as Xn, IconAdjustmentsHorizontal as Jn, IconKeyboard as Qn } from "@tabler/icons-react";
|
|
8
|
+
import { observer as re } from "mobx-react-lite";
|
|
9
|
+
import { isNestedProperty as Kt, isObjectProperty as ie, DynamicMultiLingualString as Zn, isDraftRecord as Yt, NestedProperty as Y, I18NStore as eo, validators as yt } from "sera-db";
|
|
10
10
|
import { IMaskInput as to } from "react-imask";
|
|
11
|
-
import
|
|
12
|
-
import { DatePickerInput as We, DateTimePicker as
|
|
11
|
+
import J from "dayjs";
|
|
12
|
+
import { DatePickerInput as We, DateTimePicker as _t } from "@mantine/dates";
|
|
13
13
|
import { debounce as no } from "throttle-debounce";
|
|
14
|
-
var
|
|
14
|
+
var _e = { exports: {} }, fe = {};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-jsx-runtime.production.js
|
|
@@ -23,7 +23,7 @@ var je = { exports: {} }, ge = {};
|
|
|
23
23
|
*/
|
|
24
24
|
var jt;
|
|
25
25
|
function oo() {
|
|
26
|
-
if (jt) return
|
|
26
|
+
if (jt) return fe;
|
|
27
27
|
jt = 1;
|
|
28
28
|
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
29
29
|
function t(o, r, i) {
|
|
@@ -41,9 +41,9 @@ function oo() {
|
|
|
41
41
|
props: i
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return fe.Fragment = n, fe.jsx = t, fe.jsxs = t, fe;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var pe = {};
|
|
47
47
|
/**
|
|
48
48
|
* @license React
|
|
49
49
|
* react-jsx-runtime.development.js
|
|
@@ -53,243 +53,243 @@ var ce = {};
|
|
|
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 Ft;
|
|
57
57
|
function ro() {
|
|
58
|
-
return
|
|
59
|
-
function e(
|
|
60
|
-
if (
|
|
61
|
-
if (typeof
|
|
62
|
-
return
|
|
63
|
-
if (typeof
|
|
64
|
-
switch (
|
|
58
|
+
return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
59
|
+
function e(S) {
|
|
60
|
+
if (S == null) return null;
|
|
61
|
+
if (typeof S == "function")
|
|
62
|
+
return S.$$typeof === xe ? null : S.displayName || S.name || null;
|
|
63
|
+
if (typeof S == "string") return S;
|
|
64
|
+
switch (S) {
|
|
65
65
|
case C:
|
|
66
66
|
return "Fragment";
|
|
67
|
-
case
|
|
67
|
+
case _:
|
|
68
68
|
return "Profiler";
|
|
69
69
|
case v:
|
|
70
70
|
return "StrictMode";
|
|
71
|
-
case
|
|
71
|
+
case I:
|
|
72
72
|
return "Suspense";
|
|
73
|
-
case
|
|
73
|
+
case V:
|
|
74
74
|
return "SuspenseList";
|
|
75
75
|
case Ve:
|
|
76
76
|
return "Activity";
|
|
77
77
|
}
|
|
78
|
-
if (typeof
|
|
79
|
-
switch (typeof
|
|
78
|
+
if (typeof S == "object")
|
|
79
|
+
switch (typeof S.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
|
+
), S.$$typeof) {
|
|
82
82
|
case m:
|
|
83
83
|
return "Portal";
|
|
84
|
-
case
|
|
85
|
-
return
|
|
86
|
-
case
|
|
87
|
-
return (
|
|
88
|
-
case
|
|
89
|
-
var
|
|
90
|
-
return
|
|
91
|
-
case
|
|
92
|
-
return
|
|
93
|
-
case
|
|
94
|
-
|
|
84
|
+
case j:
|
|
85
|
+
return S.displayName || "Context";
|
|
86
|
+
case R:
|
|
87
|
+
return (S._context.displayName || "Context") + ".Consumer";
|
|
88
|
+
case A:
|
|
89
|
+
var y = S.render;
|
|
90
|
+
return S = S.displayName, S || (S = y.displayName || y.name || "", S = S !== "" ? "ForwardRef(" + S + ")" : "ForwardRef"), S;
|
|
91
|
+
case H:
|
|
92
|
+
return y = S.displayName || null, y !== null ? y : e(S.type) || "Memo";
|
|
93
|
+
case ge:
|
|
94
|
+
y = S._payload, S = S._init;
|
|
95
95
|
try {
|
|
96
|
-
return e(
|
|
96
|
+
return e(S(y));
|
|
97
97
|
} catch {
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
|
-
function n(
|
|
103
|
-
return "" +
|
|
102
|
+
function n(S) {
|
|
103
|
+
return "" + S;
|
|
104
104
|
}
|
|
105
|
-
function t(
|
|
105
|
+
function t(S) {
|
|
106
106
|
try {
|
|
107
|
-
n(
|
|
108
|
-
var
|
|
107
|
+
n(S);
|
|
108
|
+
var y = !1;
|
|
109
109
|
} catch {
|
|
110
|
-
|
|
110
|
+
y = !0;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
var E =
|
|
112
|
+
if (y) {
|
|
113
|
+
y = console;
|
|
114
|
+
var E = y.error, D = typeof Symbol == "function" && Symbol.toStringTag && S[Symbol.toStringTag] || S.constructor.name || "Object";
|
|
115
115
|
return E.call(
|
|
116
|
-
|
|
116
|
+
y,
|
|
117
117
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
118
|
-
|
|
119
|
-
), n(
|
|
118
|
+
D
|
|
119
|
+
), n(S);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function o(
|
|
123
|
-
if (
|
|
124
|
-
if (typeof
|
|
122
|
+
function o(S) {
|
|
123
|
+
if (S === C) return "<>";
|
|
124
|
+
if (typeof S == "object" && S !== null && S.$$typeof === ge)
|
|
125
125
|
return "<...>";
|
|
126
126
|
try {
|
|
127
|
-
var
|
|
128
|
-
return
|
|
127
|
+
var y = e(S);
|
|
128
|
+
return y ? "<" + y + ">" : "<...>";
|
|
129
129
|
} catch {
|
|
130
130
|
return "<...>";
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
function r() {
|
|
134
|
-
var
|
|
135
|
-
return
|
|
134
|
+
var S = Te.A;
|
|
135
|
+
return S === null ? null : S.getOwner();
|
|
136
136
|
}
|
|
137
137
|
function i() {
|
|
138
138
|
return Error("react-stack-top-frame");
|
|
139
139
|
}
|
|
140
|
-
function s(
|
|
141
|
-
if (pt.call(
|
|
142
|
-
var
|
|
143
|
-
if (
|
|
140
|
+
function s(S) {
|
|
141
|
+
if (pt.call(S, "key")) {
|
|
142
|
+
var y = Object.getOwnPropertyDescriptor(S, "key").get;
|
|
143
|
+
if (y && y.isReactWarning) return !1;
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return S.key !== void 0;
|
|
146
146
|
}
|
|
147
|
-
function a(
|
|
147
|
+
function a(S, y) {
|
|
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
|
+
y
|
|
152
152
|
));
|
|
153
153
|
}
|
|
154
|
-
E.isReactWarning = !0, Object.defineProperty(
|
|
154
|
+
E.isReactWarning = !0, Object.defineProperty(S, "key", {
|
|
155
155
|
get: E,
|
|
156
156
|
configurable: !0
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
function u() {
|
|
160
|
-
var
|
|
161
|
-
return ht[
|
|
160
|
+
var S = e(this.type);
|
|
161
|
+
return ht[S] || (ht[S] = !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
|
+
)), S = this.props.ref, S !== void 0 ? S : null;
|
|
164
164
|
}
|
|
165
|
-
function g(
|
|
166
|
-
var
|
|
167
|
-
return
|
|
165
|
+
function g(S, y, E, D, Re, Ae) {
|
|
166
|
+
var b = E.ref;
|
|
167
|
+
return S = {
|
|
168
168
|
$$typeof: p,
|
|
169
|
-
type:
|
|
170
|
-
key:
|
|
169
|
+
type: S,
|
|
170
|
+
key: y,
|
|
171
171
|
props: E,
|
|
172
|
-
_owner:
|
|
173
|
-
}, (
|
|
172
|
+
_owner: D
|
|
173
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(S, "ref", {
|
|
174
174
|
enumerable: !1,
|
|
175
175
|
get: u
|
|
176
|
-
}) : Object.defineProperty(
|
|
176
|
+
}) : Object.defineProperty(S, "ref", { enumerable: !1, value: null }), S._store = {}, Object.defineProperty(S._store, "validated", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
180
|
value: 0
|
|
181
|
-
}), Object.defineProperty(
|
|
181
|
+
}), Object.defineProperty(S, "_debugInfo", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
185
|
value: null
|
|
186
|
-
}), Object.defineProperty(
|
|
186
|
+
}), Object.defineProperty(S, "_debugStack", {
|
|
187
187
|
configurable: !1,
|
|
188
188
|
enumerable: !1,
|
|
189
189
|
writable: !0,
|
|
190
190
|
value: Re
|
|
191
|
-
}), Object.defineProperty(
|
|
191
|
+
}), Object.defineProperty(S, "_debugTask", {
|
|
192
192
|
configurable: !1,
|
|
193
193
|
enumerable: !1,
|
|
194
194
|
writable: !0,
|
|
195
|
-
value:
|
|
196
|
-
}), Object.freeze && (Object.freeze(
|
|
195
|
+
value: Ae
|
|
196
|
+
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
|
|
197
197
|
}
|
|
198
|
-
function c(
|
|
199
|
-
var
|
|
200
|
-
if (
|
|
201
|
-
if (
|
|
202
|
-
if (jn(
|
|
203
|
-
for (
|
|
204
|
-
|
|
205
|
-
Object.freeze && Object.freeze(
|
|
198
|
+
function c(S, y, E, D, Re, Ae) {
|
|
199
|
+
var b = y.children;
|
|
200
|
+
if (b !== void 0)
|
|
201
|
+
if (D)
|
|
202
|
+
if (jn(b)) {
|
|
203
|
+
for (D = 0; D < b.length; D++)
|
|
204
|
+
h(b[D]);
|
|
205
|
+
Object.freeze && Object.freeze(b);
|
|
206
206
|
} else
|
|
207
207
|
console.error(
|
|
208
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."
|
|
209
209
|
);
|
|
210
|
-
else
|
|
211
|
-
if (pt.call(
|
|
212
|
-
|
|
213
|
-
var
|
|
214
|
-
return
|
|
210
|
+
else h(b);
|
|
211
|
+
if (pt.call(y, "key")) {
|
|
212
|
+
b = e(S);
|
|
213
|
+
var se = Object.keys(y).filter(function(Fn) {
|
|
214
|
+
return Fn !== "key";
|
|
215
215
|
});
|
|
216
|
-
|
|
216
|
+
D = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", Ct[b + D] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
217
217
|
`A props object containing a "key" prop is being spread into JSX:
|
|
218
218
|
let props = %s;
|
|
219
219
|
<%s {...props} />
|
|
220
220
|
React keys must be passed directly to JSX without using spread:
|
|
221
221
|
let props = %s;
|
|
222
222
|
<%s key={someKey} {...props} />`,
|
|
223
|
-
b,
|
|
224
223
|
D,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
b,
|
|
225
|
+
se,
|
|
226
|
+
b
|
|
227
|
+
), Ct[b + D] = !0);
|
|
228
228
|
}
|
|
229
|
-
if (
|
|
229
|
+
if (b = null, E !== void 0 && (t(E), b = "" + E), s(y) && (t(y.key), b = "" + y.key), "key" in y) {
|
|
230
230
|
E = {};
|
|
231
|
-
for (var ke in
|
|
232
|
-
ke !== "key" && (E[ke] =
|
|
233
|
-
} else E =
|
|
234
|
-
return
|
|
231
|
+
for (var ke in y)
|
|
232
|
+
ke !== "key" && (E[ke] = y[ke]);
|
|
233
|
+
} else E = y;
|
|
234
|
+
return b && a(
|
|
235
235
|
E,
|
|
236
|
-
typeof
|
|
236
|
+
typeof S == "function" ? S.displayName || S.name || "Unknown" : S
|
|
237
237
|
), g(
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
S,
|
|
239
|
+
b,
|
|
240
240
|
E,
|
|
241
241
|
r(),
|
|
242
242
|
Re,
|
|
243
|
-
|
|
243
|
+
Ae
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
|
-
function S
|
|
247
|
-
f(
|
|
246
|
+
function h(S) {
|
|
247
|
+
f(S) ? S._store && (S._store.validated = 1) : typeof S == "object" && S !== null && S.$$typeof === ge && (S._payload.status === "fulfilled" ? f(S._payload.value) && S._payload.value._store && (S._payload.value._store.validated = 1) : S._store && (S._store.validated = 1));
|
|
248
248
|
}
|
|
249
|
-
function f(
|
|
250
|
-
return typeof
|
|
249
|
+
function f(S) {
|
|
250
|
+
return typeof S == "object" && S !== null && S.$$typeof === p;
|
|
251
251
|
}
|
|
252
|
-
var d =
|
|
252
|
+
var d = En, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), R = Symbol.for("react.consumer"), j = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), ge = 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, Ne = console.createTask ? console.createTask : function() {
|
|
253
253
|
return null;
|
|
254
254
|
};
|
|
255
255
|
d = {
|
|
256
|
-
react_stack_bottom_frame: function(
|
|
257
|
-
return
|
|
256
|
+
react_stack_bottom_frame: function(S) {
|
|
257
|
+
return S();
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
var mt, ht = {}, St = d.react_stack_bottom_frame.bind(
|
|
261
261
|
d,
|
|
262
262
|
i
|
|
263
|
-
)(), vt =
|
|
264
|
-
|
|
265
|
-
var
|
|
263
|
+
)(), vt = Ne(o(i)), Ct = {};
|
|
264
|
+
pe.Fragment = C, pe.jsx = function(S, y, E) {
|
|
265
|
+
var D = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
266
266
|
return c(
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
S,
|
|
268
|
+
y,
|
|
269
269
|
E,
|
|
270
270
|
!1,
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
D ? Error("react-stack-top-frame") : St,
|
|
272
|
+
D ? Ne(o(S)) : vt
|
|
273
273
|
);
|
|
274
|
-
},
|
|
275
|
-
var
|
|
274
|
+
}, pe.jsxs = function(S, y, E) {
|
|
275
|
+
var D = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
276
276
|
return c(
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
S,
|
|
278
|
+
y,
|
|
279
279
|
E,
|
|
280
280
|
!0,
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
D ? Error("react-stack-top-frame") : St,
|
|
282
|
+
D ? Ne(o(S)) : vt
|
|
283
283
|
);
|
|
284
284
|
};
|
|
285
|
-
})()),
|
|
285
|
+
})()), pe;
|
|
286
286
|
}
|
|
287
|
-
var
|
|
287
|
+
var It;
|
|
288
288
|
function io() {
|
|
289
|
-
return
|
|
289
|
+
return It || (It = 1, process.env.NODE_ENV === "production" ? _e.exports = oo() : _e.exports = ro()), _e.exports;
|
|
290
290
|
}
|
|
291
291
|
var l = io();
|
|
292
|
-
const
|
|
292
|
+
const T = {
|
|
293
293
|
UK: {
|
|
294
294
|
svgFlag: "https://flagcdn.com/gb.svg",
|
|
295
295
|
emojiFlag: "🇬🇧"
|
|
@@ -354,80 +354,80 @@ const V = {
|
|
|
354
354
|
svgFlag: "https://flagcdn.com/kh.svg",
|
|
355
355
|
emojiFlag: "🇰🇭"
|
|
356
356
|
}
|
|
357
|
-
}, so = ({ flag: e }) => /* @__PURE__ */ l.jsx(
|
|
357
|
+
}, so = ({ flag: e }) => /* @__PURE__ */ l.jsx(oe, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx($n, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), lo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
|
|
358
358
|
P,
|
|
359
359
|
{
|
|
360
360
|
component: "span",
|
|
361
361
|
style: (n) => ({ textShadow: n.shadows.xs }),
|
|
362
362
|
children: e.emojiFlag
|
|
363
363
|
}
|
|
364
|
-
), Xe = navigator.userAgent.includes("Windows") ? so : lo,
|
|
364
|
+
), Xe = navigator.userAgent.includes("Windows") ? so : lo, ne = rt(new Intl.Locale("en-US")), di = re(
|
|
365
365
|
({
|
|
366
366
|
value: e,
|
|
367
367
|
children: n
|
|
368
|
-
}) => /* @__PURE__ */ l.jsx(
|
|
368
|
+
}) => /* @__PURE__ */ l.jsx(ne.Provider, { value: e.locale, children: n })
|
|
369
369
|
), ao = {
|
|
370
370
|
lang2value: {
|
|
371
371
|
en: "Choose Language",
|
|
372
372
|
vi: "Chọn ngôn ngữ"
|
|
373
373
|
}
|
|
374
|
-
},
|
|
374
|
+
}, je = {
|
|
375
375
|
en: {
|
|
376
376
|
name: "English",
|
|
377
|
-
flag:
|
|
377
|
+
flag: T.US,
|
|
378
378
|
locale: new Intl.Locale("en-US")
|
|
379
379
|
},
|
|
380
380
|
vi: {
|
|
381
381
|
name: "Tiếng Việt",
|
|
382
|
-
flag:
|
|
382
|
+
flag: T.VN,
|
|
383
383
|
locale: new Intl.Locale("vi-VN")
|
|
384
384
|
}
|
|
385
|
-
},
|
|
385
|
+
}, gi = ({
|
|
386
386
|
locale: e,
|
|
387
387
|
setLocale: n
|
|
388
388
|
}) => {
|
|
389
|
-
const t =
|
|
389
|
+
const t = F(() => Object.entries(je).map(
|
|
390
390
|
([o, { flag: r, name: i, locale: s }]) => /* @__PURE__ */ l.jsx(
|
|
391
|
-
|
|
391
|
+
le.Item,
|
|
392
392
|
{
|
|
393
393
|
onClick: () => n(s),
|
|
394
394
|
leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: r }),
|
|
395
|
-
rightSection: e.language === o && /* @__PURE__ */ l.jsx(
|
|
395
|
+
rightSection: e.language === o && /* @__PURE__ */ l.jsx(zn, { size: "15", color: "#2986cc", stroke: 2 }),
|
|
396
396
|
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: i })
|
|
397
397
|
},
|
|
398
398
|
o
|
|
399
399
|
)
|
|
400
|
-
), [
|
|
401
|
-
return /* @__PURE__ */ l.jsxs(
|
|
402
|
-
/* @__PURE__ */ l.jsx(
|
|
403
|
-
|
|
400
|
+
), [je, e]);
|
|
401
|
+
return /* @__PURE__ */ l.jsxs(le, { width: 170, children: [
|
|
402
|
+
/* @__PURE__ */ l.jsx(le.Target, { children: /* @__PURE__ */ l.jsx(
|
|
403
|
+
B,
|
|
404
404
|
{
|
|
405
405
|
variant: "subtle",
|
|
406
406
|
size: "sm",
|
|
407
|
-
leftSection: /* @__PURE__ */ l.jsx(Xe, { flag:
|
|
408
|
-
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children:
|
|
407
|
+
leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: je[e.language].flag }),
|
|
408
|
+
children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: je[e.language].name })
|
|
409
409
|
}
|
|
410
410
|
) }),
|
|
411
|
-
/* @__PURE__ */ l.jsxs(
|
|
412
|
-
/* @__PURE__ */ l.jsx(
|
|
411
|
+
/* @__PURE__ */ l.jsxs(le.Dropdown, { children: [
|
|
412
|
+
/* @__PURE__ */ l.jsx(le.Label, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: ao.lang2value[e.language] }) }),
|
|
413
413
|
t
|
|
414
414
|
] })
|
|
415
415
|
] });
|
|
416
|
-
},
|
|
417
|
-
const n =
|
|
416
|
+
}, N = ({ value: e }) => {
|
|
417
|
+
const n = W(ne);
|
|
418
418
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
419
|
-
},
|
|
420
|
-
const n =
|
|
419
|
+
}, ci = (e) => {
|
|
420
|
+
const n = W(ne);
|
|
421
421
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
422
422
|
};
|
|
423
|
-
function
|
|
423
|
+
function he(e, n) {
|
|
424
424
|
return n.lang2value[e.language] || n.lang2value[n.lang];
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const fi = ({
|
|
427
427
|
message: e,
|
|
428
428
|
navigate: n
|
|
429
429
|
}) => /* @__PURE__ */ l.jsx(
|
|
430
|
-
|
|
430
|
+
Mn,
|
|
431
431
|
{
|
|
432
432
|
size: "xs",
|
|
433
433
|
style: {
|
|
@@ -443,14 +443,14 @@ const vi = ({
|
|
|
443
443
|
title: "Not Found",
|
|
444
444
|
variant: "404 - Not Found",
|
|
445
445
|
icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
|
|
446
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
446
|
+
children: /* @__PURE__ */ l.jsxs(te, { align: "flex-start", children: [
|
|
447
447
|
e || "Sorry, the page you are looking for does not exist.",
|
|
448
|
-
/* @__PURE__ */ l.jsx(
|
|
448
|
+
/* @__PURE__ */ l.jsx(B, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
|
|
449
449
|
] })
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
}
|
|
453
|
-
),
|
|
453
|
+
), pi = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
454
454
|
it,
|
|
455
455
|
{
|
|
456
456
|
color: "red",
|
|
@@ -459,8 +459,8 @@ const vi = ({
|
|
|
459
459
|
icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
|
|
460
460
|
children: e || "Sorry, the page you are looking for does not exist."
|
|
461
461
|
}
|
|
462
|
-
),
|
|
463
|
-
|
|
462
|
+
), Wt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }), mi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(q, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
|
|
463
|
+
q,
|
|
464
464
|
{
|
|
465
465
|
gap: "md",
|
|
466
466
|
direction: "column",
|
|
@@ -472,10 +472,10 @@ const vi = ({
|
|
|
472
472
|
e
|
|
473
473
|
]
|
|
474
474
|
}
|
|
475
|
-
),
|
|
475
|
+
), hi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(q, { gap: "md", direction: "column", justify: "center", align: "center", children: [
|
|
476
476
|
/* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }),
|
|
477
477
|
e
|
|
478
|
-
] }),
|
|
478
|
+
] }), Si = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
479
479
|
it,
|
|
480
480
|
{
|
|
481
481
|
color: "red",
|
|
@@ -485,13 +485,13 @@ const vi = ({
|
|
|
485
485
|
children: e || "Sorry, you are not authorized to access this page."
|
|
486
486
|
}
|
|
487
487
|
);
|
|
488
|
-
function
|
|
488
|
+
function vi(e, n) {
|
|
489
489
|
return e.reduce((t, o) => {
|
|
490
490
|
const r = n(o);
|
|
491
491
|
return t[r] || (t[r] = []), t[r].push(o), t;
|
|
492
492
|
}, {});
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Ci(e, n) {
|
|
495
495
|
const t = [];
|
|
496
496
|
let o;
|
|
497
497
|
return e.reduce((r, i) => {
|
|
@@ -499,17 +499,17 @@ function ji(e, n) {
|
|
|
499
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;
|
|
500
500
|
}, {}), t;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function wi(e, n) {
|
|
503
503
|
const t = /* @__PURE__ */ new Set();
|
|
504
504
|
return e.filter((o) => {
|
|
505
505
|
const r = n(o);
|
|
506
506
|
return t.has(r) ? !1 : (t.add(r), !0);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
class
|
|
509
|
+
class xi {
|
|
510
510
|
constructor() {
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
Q(this, "items", []);
|
|
512
|
+
Q(this, "seen", /* @__PURE__ */ new Set());
|
|
513
513
|
}
|
|
514
514
|
add(n, t) {
|
|
515
515
|
const o = t(n);
|
|
@@ -519,16 +519,16 @@ class Fi {
|
|
|
519
519
|
return this.items;
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
class
|
|
522
|
+
class Pt {
|
|
523
523
|
constructor() {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
Q(this, "children", /* @__PURE__ */ new Map());
|
|
525
|
+
Q(this, "isEndOfWord", !1);
|
|
526
|
+
Q(this, "value", "");
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
class
|
|
529
|
+
class Xt {
|
|
530
530
|
constructor() {
|
|
531
|
-
|
|
531
|
+
Q(this, "root", new Pt());
|
|
532
532
|
}
|
|
533
533
|
/**
|
|
534
534
|
* Inserts a word into the trie structure.
|
|
@@ -540,7 +540,7 @@ class Qt {
|
|
|
540
540
|
let t = this.root;
|
|
541
541
|
for (const o of n) {
|
|
542
542
|
let r = t.children.get(o);
|
|
543
|
-
r === void 0 && (r = new
|
|
543
|
+
r === void 0 && (r = new Pt(), t.children.set(o, r)), t = r;
|
|
544
544
|
}
|
|
545
545
|
t.isEndOfWord = !0, t.value = n;
|
|
546
546
|
}
|
|
@@ -565,11 +565,18 @@ class Qt {
|
|
|
565
565
|
return o;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
return
|
|
568
|
+
function Jt(e, n) {
|
|
569
|
+
return Kt(n) ? n.getValue(e) : e[n.tsName];
|
|
570
|
+
}
|
|
571
|
+
function Et(e, n, t) {
|
|
572
|
+
Kt(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
|
|
570
573
|
}
|
|
571
|
-
|
|
572
|
-
|
|
574
|
+
const Qt = rt(!1), Ri = Qt.Provider;
|
|
575
|
+
function z(e) {
|
|
576
|
+
return W(Qt) ? { "data-testid": e } : {};
|
|
577
|
+
}
|
|
578
|
+
function yi(e, n) {
|
|
579
|
+
return n ? { "data-testid": e } : {};
|
|
573
580
|
}
|
|
574
581
|
var Je = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Je || {});
|
|
575
582
|
function uo(e) {
|
|
@@ -604,16 +611,16 @@ function co(e, n) {
|
|
|
604
611
|
return t;
|
|
605
612
|
}).filter((t) => t !== null);
|
|
606
613
|
}
|
|
607
|
-
const
|
|
608
|
-
const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a =
|
|
614
|
+
const _i = (e) => {
|
|
615
|
+
const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = F(() => co(e.items, e.checkPermission), [e.items, e.checkPermission]), u = F(() => go(e.items), [e.items]), { key2fullpath: g, key2route: c } = F(
|
|
609
616
|
() => uo(a),
|
|
610
617
|
[a]
|
|
611
618
|
);
|
|
612
|
-
|
|
619
|
+
we(() => {
|
|
613
620
|
const f = window.location.pathname, d = u.findMatchingKey(f);
|
|
614
621
|
d !== void 0 && (r(new Set(g[d])), s(d));
|
|
615
622
|
}, [window.location.pathname, c]);
|
|
616
|
-
const
|
|
623
|
+
const h = F(() => {
|
|
617
624
|
function f(d, p) {
|
|
618
625
|
var C;
|
|
619
626
|
const m = d.children !== void 0 && d.children.length > 0;
|
|
@@ -622,14 +629,14 @@ const Ii = (e) => {
|
|
|
622
629
|
{
|
|
623
630
|
onMouseEnter: () => {
|
|
624
631
|
o.has(d.key) || t((v) => {
|
|
625
|
-
const
|
|
626
|
-
return
|
|
632
|
+
const _ = new Set(v);
|
|
633
|
+
return _.add(d.key), _;
|
|
627
634
|
});
|
|
628
635
|
},
|
|
629
636
|
onMouseLeave: () => {
|
|
630
637
|
o.has(d.key) || t((v) => {
|
|
631
|
-
const
|
|
632
|
-
return
|
|
638
|
+
const _ = new Set(v);
|
|
639
|
+
return _.delete(d.key), _;
|
|
633
640
|
});
|
|
634
641
|
},
|
|
635
642
|
children: [
|
|
@@ -648,7 +655,7 @@ const Ii = (e) => {
|
|
|
648
655
|
ml: p === 0 ? void 0 : p === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${p})`,
|
|
649
656
|
w: "unset",
|
|
650
657
|
rightSection: m ? /* @__PURE__ */ l.jsx(
|
|
651
|
-
|
|
658
|
+
Gn,
|
|
652
659
|
{
|
|
653
660
|
size: 12,
|
|
654
661
|
stroke: 1.5,
|
|
@@ -657,9 +664,9 @@ const Ii = (e) => {
|
|
|
657
664
|
) : void 0,
|
|
658
665
|
opened: n.has(d.key) || o.has(d.key),
|
|
659
666
|
onClick: (v) => {
|
|
660
|
-
v.preventDefault(), r((
|
|
661
|
-
const
|
|
662
|
-
return
|
|
667
|
+
v.preventDefault(), r((_) => {
|
|
668
|
+
const R = new Set(_);
|
|
669
|
+
return _.has(d.key) ? R.delete(d.key) : R.add(d.key), R;
|
|
663
670
|
});
|
|
664
671
|
}
|
|
665
672
|
},
|
|
@@ -693,12 +700,12 @@ const Ii = (e) => {
|
|
|
693
700
|
}
|
|
694
701
|
return a.map((d) => f(d, 0));
|
|
695
702
|
}, [a, i, o, n, e.navigate]);
|
|
696
|
-
return /* @__PURE__ */ l.jsx(l.Fragment, { children:
|
|
703
|
+
return /* @__PURE__ */ l.jsx(l.Fragment, { children: h });
|
|
697
704
|
};
|
|
698
|
-
class fo extends
|
|
705
|
+
class fo extends Xt {
|
|
699
706
|
constructor() {
|
|
700
707
|
super(...arguments);
|
|
701
|
-
|
|
708
|
+
Q(this, "pathToKey", /* @__PURE__ */ new Map());
|
|
702
709
|
}
|
|
703
710
|
/**
|
|
704
711
|
* Normalizes a URL path by removing trailing slashes
|
|
@@ -732,29 +739,29 @@ class fo extends Qt {
|
|
|
732
739
|
}
|
|
733
740
|
}
|
|
734
741
|
const Fe = ({ value: e }) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e });
|
|
735
|
-
function
|
|
742
|
+
function Ce(e, n) {
|
|
736
743
|
return n.toLocaleDateString(e.baseName, {
|
|
737
744
|
year: "numeric",
|
|
738
745
|
month: "short",
|
|
739
746
|
day: "2-digit"
|
|
740
747
|
});
|
|
741
748
|
}
|
|
742
|
-
function
|
|
749
|
+
function Zt(e, n, t = !0) {
|
|
743
750
|
const o = n.getHours().toString().padStart(2, "0"), r = n.getMinutes().toString().padStart(2, "0"), i = n.getSeconds().toString().padStart(2, "0");
|
|
744
|
-
return t ?
|
|
751
|
+
return t ? Ce(e, n) + ` ${o}:${r}:${i}` : Ce(e, n) + ` ${o}:${r}`;
|
|
745
752
|
}
|
|
746
753
|
const po = ({ value: e }) => {
|
|
747
|
-
const n =
|
|
748
|
-
() =>
|
|
754
|
+
const n = W(ne), t = F(
|
|
755
|
+
() => Zt(n, e),
|
|
749
756
|
[n, e]
|
|
750
757
|
);
|
|
751
758
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
|
|
752
759
|
}, mo = ({ value: e }) => {
|
|
753
|
-
const n =
|
|
760
|
+
const n = W(ne), t = F(() => Ce(n, e), [n, e]);
|
|
754
761
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
|
|
755
|
-
},
|
|
756
|
-
const n =
|
|
757
|
-
const r =
|
|
762
|
+
}, ji = ({ value: e }) => {
|
|
763
|
+
const n = W(ne), [t, o] = F(() => {
|
|
764
|
+
const r = Ce(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
|
|
758
765
|
return [r, `${i}:${s}:${a}`];
|
|
759
766
|
}, [n, e]);
|
|
760
767
|
return /* @__PURE__ */ l.jsx(P, { size: "sm", title: o, children: t });
|
|
@@ -774,27 +781,27 @@ const po = ({ value: e }) => {
|
|
|
774
781
|
lang: "en"
|
|
775
782
|
}
|
|
776
783
|
}, So = ({ value: e }) => /* @__PURE__ */ l.jsx(
|
|
777
|
-
|
|
784
|
+
ue,
|
|
778
785
|
{
|
|
779
786
|
checked: e,
|
|
780
|
-
label: /* @__PURE__ */ l.jsx(
|
|
787
|
+
label: /* @__PURE__ */ l.jsx(N, { value: ho[e ? "yes" : "no"] }),
|
|
781
788
|
readOnly: !0
|
|
782
789
|
}
|
|
783
790
|
), vo = ({ property: e, value: n }) => {
|
|
784
791
|
const t = e;
|
|
785
|
-
if (
|
|
792
|
+
if (ie(t) || t.enumType === void 0)
|
|
786
793
|
throw new Error(
|
|
787
794
|
"Invalid usage of EnumDisplay. Expect a property of type enum"
|
|
788
795
|
);
|
|
789
|
-
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(
|
|
790
|
-
}, at =
|
|
796
|
+
return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(N, { value: t.enumType.label[n] }) });
|
|
797
|
+
}, at = rt({ link: () => null, entityRoutes: {} }), Fi = ({
|
|
791
798
|
link: e,
|
|
792
799
|
entityRoutes: n,
|
|
793
800
|
children: t
|
|
794
801
|
}) => /* @__PURE__ */ l.jsx(at.Provider, { value: { link: e, entityRoutes: n }, children: t });
|
|
795
|
-
function
|
|
802
|
+
function en(e, n, t, o) {
|
|
796
803
|
const r = e.getByName(n.targetClass), i = o[n.targetClass];
|
|
797
|
-
|
|
804
|
+
we(() => {
|
|
798
805
|
r.fetchByIds(t);
|
|
799
806
|
}, [t]);
|
|
800
807
|
const s = {};
|
|
@@ -802,19 +809,19 @@ function tn(e, n, t, o) {
|
|
|
802
809
|
s[a] = r.get(a);
|
|
803
810
|
return [s, i.view];
|
|
804
811
|
}
|
|
805
|
-
const ut =
|
|
812
|
+
const ut = re(
|
|
806
813
|
({
|
|
807
814
|
db: e,
|
|
808
815
|
property: n,
|
|
809
816
|
value: t
|
|
810
817
|
}) => {
|
|
811
|
-
const { link: o, entityRoutes: r } =
|
|
818
|
+
const { link: o, entityRoutes: r } = W(at), i = F(() => [t], [t]), [s, a] = en(
|
|
812
819
|
e,
|
|
813
820
|
n,
|
|
814
821
|
i,
|
|
815
822
|
r
|
|
816
823
|
), u = s[t];
|
|
817
|
-
return u === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(
|
|
824
|
+
return u === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Wt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
|
|
818
825
|
o,
|
|
819
826
|
{
|
|
820
827
|
path: a,
|
|
@@ -825,21 +832,21 @@ const ut = ne(
|
|
|
825
832
|
}
|
|
826
833
|
);
|
|
827
834
|
}
|
|
828
|
-
), dt =
|
|
835
|
+
), dt = re(
|
|
829
836
|
({
|
|
830
837
|
db: e,
|
|
831
838
|
property: n,
|
|
832
839
|
value: t
|
|
833
840
|
}) => {
|
|
834
|
-
const { link: o, entityRoutes: r } =
|
|
841
|
+
const { link: o, entityRoutes: r } = W(at), [i, s] = en(
|
|
835
842
|
e,
|
|
836
843
|
n,
|
|
837
844
|
t,
|
|
838
845
|
r
|
|
839
846
|
);
|
|
840
|
-
return /* @__PURE__ */ l.jsx(
|
|
847
|
+
return /* @__PURE__ */ l.jsx(L, { gap: "xs", children: t.map((a, u) => {
|
|
841
848
|
const g = i[a];
|
|
842
|
-
return g === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }, a) : g === null ? /* @__PURE__ */ l.jsx(
|
|
849
|
+
return g === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }, a) : g === null ? /* @__PURE__ */ l.jsx(Wt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: g.name }, u) : /* @__PURE__ */ l.jsx(
|
|
843
850
|
o,
|
|
844
851
|
{
|
|
845
852
|
path: s,
|
|
@@ -852,7 +859,7 @@ const ut = ne(
|
|
|
852
859
|
);
|
|
853
860
|
}) });
|
|
854
861
|
}
|
|
855
|
-
),
|
|
862
|
+
), de = {
|
|
856
863
|
string: Fe,
|
|
857
864
|
integer: Fe,
|
|
858
865
|
float: Fe,
|
|
@@ -861,40 +868,48 @@ const ut = ne(
|
|
|
861
868
|
enum: vo,
|
|
862
869
|
datetime: po,
|
|
863
870
|
date: mo
|
|
864
|
-
},
|
|
871
|
+
}, tn = ({
|
|
865
872
|
property: e,
|
|
866
873
|
value: n,
|
|
867
874
|
onChange: t,
|
|
868
875
|
freeze: o = !1
|
|
869
|
-
}) =>
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
876
|
+
}) => {
|
|
877
|
+
const r = z(e.name);
|
|
878
|
+
return /* @__PURE__ */ l.jsx(
|
|
879
|
+
ue,
|
|
880
|
+
{
|
|
881
|
+
...r,
|
|
882
|
+
id: e.name,
|
|
883
|
+
checked: n,
|
|
884
|
+
onChange: (i) => {
|
|
885
|
+
const s = i.target.checked;
|
|
886
|
+
t(s);
|
|
887
|
+
},
|
|
888
|
+
disabled: o
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
}, De = ({
|
|
881
892
|
property: e,
|
|
882
893
|
value: n,
|
|
883
894
|
onChange: t,
|
|
884
895
|
freeze: o = !1
|
|
885
|
-
}) =>
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
}) => {
|
|
897
|
+
const r = z(e.name);
|
|
898
|
+
return /* @__PURE__ */ l.jsx(
|
|
899
|
+
K,
|
|
900
|
+
{
|
|
901
|
+
...r,
|
|
902
|
+
id: e.name,
|
|
903
|
+
type: "number",
|
|
904
|
+
value: n,
|
|
905
|
+
onChange: (i) => {
|
|
906
|
+
const s = i.target.value;
|
|
907
|
+
t(s === "" ? void 0 : Number(s));
|
|
908
|
+
},
|
|
909
|
+
disabled: o
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
}, Co = {
|
|
898
913
|
lang2value: {
|
|
899
914
|
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.",
|
|
900
915
|
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."
|
|
@@ -906,66 +921,66 @@ const ut = ne(
|
|
|
906
921
|
vi: "Không tìm thấy mã quốc gia hợp lệ. "
|
|
907
922
|
},
|
|
908
923
|
lang: "en"
|
|
909
|
-
},
|
|
924
|
+
}, ae = {
|
|
910
925
|
84: {
|
|
911
926
|
name: "Vietnam",
|
|
912
|
-
flags: [
|
|
927
|
+
flags: [T.VN]
|
|
913
928
|
},
|
|
914
929
|
1: {
|
|
915
930
|
name: "US, Canada",
|
|
916
|
-
flags: [
|
|
931
|
+
flags: [T.US, T.CA]
|
|
917
932
|
},
|
|
918
933
|
61: {
|
|
919
934
|
name: "Australia",
|
|
920
|
-
flags: [
|
|
935
|
+
flags: [T.AU]
|
|
921
936
|
},
|
|
922
937
|
81: {
|
|
923
938
|
name: "Japan",
|
|
924
|
-
flags: [
|
|
939
|
+
flags: [T.JP]
|
|
925
940
|
},
|
|
926
941
|
44: {
|
|
927
942
|
name: "UK",
|
|
928
|
-
flags: [
|
|
943
|
+
flags: [T.UK]
|
|
929
944
|
},
|
|
930
945
|
33: {
|
|
931
946
|
name: "France",
|
|
932
|
-
flags: [
|
|
947
|
+
flags: [T.FR]
|
|
933
948
|
},
|
|
934
949
|
49: {
|
|
935
950
|
name: "Germany",
|
|
936
|
-
flags: [
|
|
951
|
+
flags: [T.DE]
|
|
937
952
|
},
|
|
938
953
|
91: {
|
|
939
954
|
name: "India",
|
|
940
|
-
flags: [
|
|
955
|
+
flags: [T.IN]
|
|
941
956
|
},
|
|
942
957
|
55: {
|
|
943
958
|
name: "Brazil",
|
|
944
|
-
flags: [
|
|
959
|
+
flags: [T.BR]
|
|
945
960
|
},
|
|
946
961
|
34: {
|
|
947
962
|
name: "Spain",
|
|
948
|
-
flags: [
|
|
963
|
+
flags: [T.ES]
|
|
949
964
|
},
|
|
950
965
|
39: {
|
|
951
966
|
name: "Italy",
|
|
952
|
-
flags: [
|
|
967
|
+
flags: [T.IT]
|
|
953
968
|
},
|
|
954
969
|
64: {
|
|
955
970
|
name: "New Zealand",
|
|
956
|
-
flags: [
|
|
971
|
+
flags: [T.NZ]
|
|
957
972
|
},
|
|
958
973
|
52: {
|
|
959
974
|
name: "Mexico",
|
|
960
|
-
flags: [
|
|
975
|
+
flags: [T.MX]
|
|
961
976
|
},
|
|
962
977
|
86: {
|
|
963
978
|
name: "China",
|
|
964
|
-
flags: [
|
|
979
|
+
flags: [T.CN]
|
|
965
980
|
},
|
|
966
981
|
855: {
|
|
967
982
|
name: "Cambodia",
|
|
968
|
-
flags: [
|
|
983
|
+
flags: [T.CAM]
|
|
969
984
|
}
|
|
970
985
|
}, xo = (e, n) => {
|
|
971
986
|
if (e === "" || e === void 0)
|
|
@@ -974,15 +989,15 @@ const ut = ne(
|
|
|
974
989
|
if (o.match === "")
|
|
975
990
|
throw new Error(`No valid country code found for phone number: ${e}`);
|
|
976
991
|
return o;
|
|
977
|
-
},
|
|
978
|
-
const n =
|
|
992
|
+
}, $t = ({ value: e }) => {
|
|
993
|
+
const n = ae[e];
|
|
979
994
|
if (n !== void 0)
|
|
980
|
-
return /* @__PURE__ */ l.jsxs(
|
|
995
|
+
return /* @__PURE__ */ l.jsxs(L, { gap: "sm", wrap: "nowrap", align: "center", children: [
|
|
981
996
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", children: [
|
|
982
997
|
"+",
|
|
983
998
|
e
|
|
984
999
|
] }),
|
|
985
|
-
/* @__PURE__ */ l.jsx(
|
|
1000
|
+
/* @__PURE__ */ l.jsx(L, { gap: 4, wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(Xe, { flag: t }, o)) })
|
|
986
1001
|
] });
|
|
987
1002
|
}, Ro = ({
|
|
988
1003
|
value: e,
|
|
@@ -991,107 +1006,110 @@ const ut = ne(
|
|
|
991
1006
|
id: o,
|
|
992
1007
|
disabled: r = !1
|
|
993
1008
|
}) => {
|
|
994
|
-
const
|
|
995
|
-
const
|
|
996
|
-
return Object.keys(
|
|
997
|
-
|
|
998
|
-
}),
|
|
999
|
-
}, [
|
|
1009
|
+
const i = z(`${o}_country_code`), s = z(o), [a, u] = M(""), [g, c] = M(!1), [h, f] = M(""), [d, p] = M(!1), m = F(() => {
|
|
1010
|
+
const I = new Xt();
|
|
1011
|
+
return Object.keys(ae).forEach((V) => {
|
|
1012
|
+
I.insert(V);
|
|
1013
|
+
}), I;
|
|
1014
|
+
}, [ae]), { rawInput: C } = F(() => {
|
|
1000
1015
|
try {
|
|
1001
|
-
const { match:
|
|
1016
|
+
const { match: I, remaining: V } = xo(
|
|
1002
1017
|
e,
|
|
1003
|
-
|
|
1018
|
+
m
|
|
1004
1019
|
);
|
|
1005
|
-
return
|
|
1006
|
-
rawInput:
|
|
1020
|
+
return f(I), p(!1), {
|
|
1021
|
+
rawInput: V
|
|
1007
1022
|
};
|
|
1008
1023
|
} catch {
|
|
1009
|
-
return
|
|
1024
|
+
return p(!0), f(""), {
|
|
1010
1025
|
rawInput: e
|
|
1011
1026
|
};
|
|
1012
1027
|
}
|
|
1013
|
-
}, [e]),
|
|
1028
|
+
}, [e]), v = Gt({
|
|
1014
1029
|
onDropdownClose: () => {
|
|
1015
|
-
|
|
1030
|
+
v.resetSelectedOption(), u("");
|
|
1016
1031
|
},
|
|
1017
1032
|
onDropdownOpen: () => {
|
|
1018
|
-
|
|
1033
|
+
v.updateSelectedOptionIndex("active");
|
|
1019
1034
|
}
|
|
1020
|
-
}),
|
|
1021
|
-
if (
|
|
1022
|
-
return `+${
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1025
|
-
}, j =
|
|
1035
|
+
}), _ = F(() => Object.keys(ae), [ae]), R = (I, V) => {
|
|
1036
|
+
if (I === void 0)
|
|
1037
|
+
return `+${V}`;
|
|
1038
|
+
const H = I.replace(/[^\d]/g, "");
|
|
1039
|
+
return H.length === 0 ? `+${V}` : H.startsWith("0") ? (c(!0), `+${V}${H}`) : (c(!1), `+${V}${H}`);
|
|
1040
|
+
}, j = F(() => _.filter((I) => ae[I].name.toLowerCase().includes(a.toLowerCase()) || I.includes(a)), [a, _]), A = F(() => j.map((I, V) => /* @__PURE__ */ l.jsx(O.Option, { value: I, children: /* @__PURE__ */ l.jsx($t, { value: I }) }, V)), [j]);
|
|
1026
1041
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
1027
|
-
/* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsxs(
|
|
1042
|
+
/* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsxs(L, { gap: 5, children: [
|
|
1028
1043
|
/* @__PURE__ */ l.jsxs(
|
|
1029
|
-
|
|
1044
|
+
O,
|
|
1030
1045
|
{
|
|
1031
|
-
store:
|
|
1046
|
+
store: v,
|
|
1032
1047
|
position: "top-start",
|
|
1033
|
-
onOptionSubmit: (
|
|
1034
|
-
|
|
1035
|
-
target: { value:
|
|
1048
|
+
onOptionSubmit: (I) => {
|
|
1049
|
+
u(""), v.closeDropdown(), n({
|
|
1050
|
+
target: { value: R(C, I) }
|
|
1036
1051
|
});
|
|
1037
1052
|
},
|
|
1038
1053
|
disabled: r,
|
|
1039
1054
|
children: [
|
|
1040
|
-
/* @__PURE__ */ l.jsx(
|
|
1041
|
-
|
|
1055
|
+
/* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1056
|
+
Dn,
|
|
1042
1057
|
{
|
|
1058
|
+
...i,
|
|
1043
1059
|
component: "button",
|
|
1044
1060
|
type: "button",
|
|
1045
1061
|
pointer: !0,
|
|
1046
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
1047
|
-
onClick: () =>
|
|
1062
|
+
rightSection: /* @__PURE__ */ l.jsx(O.Chevron, {}),
|
|
1063
|
+
onClick: () => v.toggleDropdown(),
|
|
1048
1064
|
rightSectionPointerEvents: "none",
|
|
1049
1065
|
w: 110,
|
|
1050
1066
|
disabled: r,
|
|
1051
|
-
children: /* @__PURE__ */ l.jsx(
|
|
1067
|
+
children: /* @__PURE__ */ l.jsx($t, { value: h })
|
|
1052
1068
|
}
|
|
1053
1069
|
) }),
|
|
1054
|
-
/* @__PURE__ */ l.jsxs(
|
|
1070
|
+
/* @__PURE__ */ l.jsxs(O.Dropdown, { children: [
|
|
1055
1071
|
/* @__PURE__ */ l.jsx(
|
|
1056
|
-
|
|
1072
|
+
O.Search,
|
|
1057
1073
|
{
|
|
1058
1074
|
leftSection: /* @__PURE__ */ l.jsx(lt, { size: 14, stroke: 1.5 }),
|
|
1059
1075
|
placeholder: ".....",
|
|
1060
|
-
value:
|
|
1061
|
-
onChange: (
|
|
1062
|
-
|
|
1076
|
+
value: a,
|
|
1077
|
+
onChange: (I) => {
|
|
1078
|
+
u(I.currentTarget.value);
|
|
1063
1079
|
},
|
|
1064
1080
|
disabled: r
|
|
1065
1081
|
}
|
|
1066
1082
|
),
|
|
1067
|
-
/* @__PURE__ */ l.jsx(
|
|
1083
|
+
/* @__PURE__ */ l.jsx(O.Options, { children: A.length > 0 ? A : /* @__PURE__ */ l.jsx(O.Empty, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: "Nothing found" }) }) })
|
|
1068
1084
|
] })
|
|
1069
1085
|
]
|
|
1070
1086
|
}
|
|
1071
1087
|
),
|
|
1072
|
-
|
|
1073
|
-
|
|
1088
|
+
h === "" ? /* @__PURE__ */ l.jsx(
|
|
1089
|
+
K,
|
|
1074
1090
|
{
|
|
1091
|
+
...s,
|
|
1075
1092
|
id: o,
|
|
1076
|
-
value:
|
|
1093
|
+
value: C,
|
|
1077
1094
|
type: "phone_number",
|
|
1078
|
-
onChange: (
|
|
1079
|
-
n({ target: { value:
|
|
1095
|
+
onChange: (I) => {
|
|
1096
|
+
n({ target: { value: I.target.value } });
|
|
1080
1097
|
},
|
|
1081
1098
|
error: t,
|
|
1082
1099
|
flex: 1,
|
|
1083
1100
|
disabled: r
|
|
1084
1101
|
}
|
|
1085
1102
|
) : /* @__PURE__ */ l.jsx(
|
|
1086
|
-
|
|
1103
|
+
K,
|
|
1087
1104
|
{
|
|
1105
|
+
...s,
|
|
1088
1106
|
id: o,
|
|
1089
|
-
value:
|
|
1107
|
+
value: C,
|
|
1090
1108
|
type: "phone_number",
|
|
1091
|
-
onAccept: (
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
target: { value:
|
|
1109
|
+
onAccept: (I) => {
|
|
1110
|
+
const V = I.replace(/[^\d]/g, ""), H = R(V, h);
|
|
1111
|
+
H !== e && n({
|
|
1112
|
+
target: { value: H }
|
|
1095
1113
|
});
|
|
1096
1114
|
},
|
|
1097
1115
|
component: to,
|
|
@@ -1102,23 +1120,24 @@ const ut = ne(
|
|
|
1102
1120
|
}
|
|
1103
1121
|
)
|
|
1104
1122
|
] }) }) }),
|
|
1105
|
-
(
|
|
1123
|
+
(g || d || t && typeof t == "string") && /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsx(K.Error, { children: g ? /* @__PURE__ */ l.jsx(N, { value: Co }) : d ? /* @__PURE__ */ l.jsx(N, { value: wo }) : t }) }) })
|
|
1106
1124
|
] });
|
|
1107
|
-
},
|
|
1125
|
+
}, Se = ({
|
|
1108
1126
|
property: e,
|
|
1109
1127
|
error: n,
|
|
1110
1128
|
value: t,
|
|
1111
1129
|
onChange: o,
|
|
1112
1130
|
freeze: r = !1
|
|
1113
1131
|
}) => {
|
|
1114
|
-
const
|
|
1132
|
+
const i = z(e.name), [s, a] = F(() => e.constraints.includes("password") ? ["password", Ht] : e.constraints.includes("phone_number") ? ["phone_number", Ro] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", K], [e.constraints]);
|
|
1115
1133
|
return /* @__PURE__ */ l.jsx(
|
|
1116
|
-
|
|
1134
|
+
a,
|
|
1117
1135
|
{
|
|
1136
|
+
...i,
|
|
1118
1137
|
id: e.name,
|
|
1119
1138
|
value: t,
|
|
1120
|
-
type:
|
|
1121
|
-
onChange: (
|
|
1139
|
+
type: s,
|
|
1140
|
+
onChange: (u) => o(u.target.value),
|
|
1122
1141
|
error: n,
|
|
1123
1142
|
disabled: r
|
|
1124
1143
|
}
|
|
@@ -1128,101 +1147,107 @@ const ut = ne(
|
|
|
1128
1147
|
value: n,
|
|
1129
1148
|
onChange: t,
|
|
1130
1149
|
freeze: o = !1
|
|
1131
|
-
}) =>
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
)
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1150
|
+
}) => {
|
|
1151
|
+
const r = z(e.tsName);
|
|
1152
|
+
return /* @__PURE__ */ l.jsx(
|
|
1153
|
+
We,
|
|
1154
|
+
{
|
|
1155
|
+
...r,
|
|
1156
|
+
id: e.tsName,
|
|
1157
|
+
value: n || null,
|
|
1158
|
+
onChange: (i) => {
|
|
1159
|
+
t(
|
|
1160
|
+
i === null ? void 0 : J(i).startOf("day").toDate()
|
|
1161
|
+
);
|
|
1162
|
+
},
|
|
1163
|
+
valueFormat: "YYYY MMM DD",
|
|
1164
|
+
placeholder: "Pick date range",
|
|
1165
|
+
clearable: !0,
|
|
1166
|
+
popoverProps: { withinPortal: !1 },
|
|
1167
|
+
flex: 1,
|
|
1168
|
+
disabled: o
|
|
1169
|
+
}
|
|
1170
|
+
);
|
|
1171
|
+
}, _o = ({
|
|
1149
1172
|
property: e,
|
|
1150
1173
|
value: n,
|
|
1151
1174
|
onChange: t,
|
|
1152
1175
|
freeze: o = !1
|
|
1153
1176
|
}) => {
|
|
1154
|
-
const r =
|
|
1155
|
-
if (
|
|
1177
|
+
const r = W(ne), i = z(e.name);
|
|
1178
|
+
if (ie(e) || e.enumType === void 0)
|
|
1156
1179
|
throw new Error(
|
|
1157
1180
|
"Invalid usage of EnumInput. Expect a property of type enum"
|
|
1158
1181
|
);
|
|
1159
|
-
const
|
|
1160
|
-
const
|
|
1161
|
-
([
|
|
1162
|
-
const
|
|
1163
|
-
return
|
|
1164
|
-
value:
|
|
1165
|
-
label:
|
|
1182
|
+
const s = e.enumType, [a, u] = F(() => {
|
|
1183
|
+
const g = {}, c = Object.entries(s.label).map(
|
|
1184
|
+
([h, f]) => {
|
|
1185
|
+
const d = isNaN(Number(h)) ? h : Number(h);
|
|
1186
|
+
return g[h] = d, {
|
|
1187
|
+
value: h,
|
|
1188
|
+
label: he(r, f)
|
|
1166
1189
|
};
|
|
1167
1190
|
}
|
|
1168
1191
|
);
|
|
1169
|
-
return [
|
|
1170
|
-
}, [r,
|
|
1192
|
+
return [g, c];
|
|
1193
|
+
}, [r, s]);
|
|
1171
1194
|
return /* @__PURE__ */ l.jsx(
|
|
1172
1195
|
bn,
|
|
1173
1196
|
{
|
|
1174
|
-
|
|
1197
|
+
...i,
|
|
1198
|
+
data: u,
|
|
1175
1199
|
value: n === void 0 ? null : String(n),
|
|
1176
|
-
onChange: (
|
|
1177
|
-
if (
|
|
1200
|
+
onChange: (g) => {
|
|
1201
|
+
if (g === null) {
|
|
1178
1202
|
t(void 0);
|
|
1179
1203
|
return;
|
|
1180
1204
|
}
|
|
1181
|
-
t(
|
|
1205
|
+
t(a[g]);
|
|
1182
1206
|
},
|
|
1183
1207
|
disabled: o,
|
|
1184
1208
|
allowDeselect: !e.isRequired
|
|
1185
1209
|
}
|
|
1186
1210
|
);
|
|
1187
|
-
},
|
|
1211
|
+
}, jo = {
|
|
1188
1212
|
lang2value: {
|
|
1189
1213
|
en: "Confirm",
|
|
1190
1214
|
vi: "Xác Nhận"
|
|
1191
1215
|
},
|
|
1192
1216
|
lang: "en"
|
|
1193
|
-
}, Fo = new
|
|
1194
|
-
/* @__PURE__ */ l.jsx(
|
|
1217
|
+
}, Fo = new Zn("confirmation.valuesDoNotMatch"), Ii = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1218
|
+
/* @__PURE__ */ l.jsx(N, { value: jo }),
|
|
1195
1219
|
" ",
|
|
1196
|
-
/* @__PURE__ */ l.jsx(
|
|
1197
|
-
] }),
|
|
1220
|
+
/* @__PURE__ */ l.jsx(N, { value: e.label })
|
|
1221
|
+
] }), Pi = ({
|
|
1198
1222
|
property: e,
|
|
1199
1223
|
error: n,
|
|
1200
1224
|
value: t,
|
|
1201
1225
|
onChange: o,
|
|
1202
1226
|
freeze: r = !1
|
|
1203
1227
|
}) => {
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1228
|
+
const i = z(`${e.name}_confirm`), [s, a] = M(""), [u, g] = M(!1), [c, h] = F(() => e.constraints.includes("password") ? ["password", Ht] : ["text", K], [e.constraints]), f = F(() => {
|
|
1229
|
+
if (u && s !== t)
|
|
1206
1230
|
return Fo.t({ args: { name: e.label } });
|
|
1207
|
-
}, [
|
|
1231
|
+
}, [u, s, t, e.label]), d = n || f;
|
|
1208
1232
|
return /* @__PURE__ */ l.jsx(
|
|
1209
|
-
|
|
1233
|
+
h,
|
|
1210
1234
|
{
|
|
1235
|
+
...i,
|
|
1211
1236
|
id: `${e.name}-confirm`,
|
|
1212
|
-
value:
|
|
1213
|
-
type:
|
|
1214
|
-
onChange: (
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1237
|
+
value: s,
|
|
1238
|
+
type: c,
|
|
1239
|
+
onChange: (p) => {
|
|
1240
|
+
const m = p.target.value;
|
|
1241
|
+
a(m), g(!0), o(m);
|
|
1217
1242
|
},
|
|
1218
|
-
error:
|
|
1243
|
+
error: d,
|
|
1219
1244
|
disabled: r
|
|
1220
1245
|
}
|
|
1221
1246
|
);
|
|
1222
1247
|
};
|
|
1223
1248
|
function Io(e, n) {
|
|
1224
1249
|
const [t, o] = M(""), [r, i] = M([]);
|
|
1225
|
-
return
|
|
1250
|
+
return we(() => {
|
|
1226
1251
|
e.getByName(n.targetClass).fetch({ limit: 100, offset: 0 }).then((a) => i(a.records));
|
|
1227
1252
|
}, [n.name]), {
|
|
1228
1253
|
data: r,
|
|
@@ -1239,9 +1264,9 @@ function Io(e, n) {
|
|
|
1239
1264
|
table: e.getByName(n.targetClass)
|
|
1240
1265
|
};
|
|
1241
1266
|
}
|
|
1242
|
-
const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }),
|
|
1267
|
+
const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }), nn = re(
|
|
1243
1268
|
(e) => /* @__PURE__ */ l.jsx("h1", { children: "SingleForeignKey" })
|
|
1244
|
-
),
|
|
1269
|
+
), on = re(
|
|
1245
1270
|
({
|
|
1246
1271
|
db: e,
|
|
1247
1272
|
property: n,
|
|
@@ -1253,7 +1278,7 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1253
1278
|
e,
|
|
1254
1279
|
n
|
|
1255
1280
|
);
|
|
1256
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1281
|
+
return /* @__PURE__ */ l.jsxs(te, { gap: "sm", children: [
|
|
1257
1282
|
/* @__PURE__ */ l.jsx(
|
|
1258
1283
|
$o,
|
|
1259
1284
|
{
|
|
@@ -1292,38 +1317,39 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1292
1317
|
setQuery: s,
|
|
1293
1318
|
freeze: a = !1
|
|
1294
1319
|
}) => {
|
|
1295
|
-
const u =
|
|
1296
|
-
onDropdownClose: () =>
|
|
1297
|
-
}),
|
|
1320
|
+
const u = z(e || "search"), g = Gt({
|
|
1321
|
+
onDropdownClose: () => g.resetSelectedOption()
|
|
1322
|
+
}), c = F(() => n.map((h) => (
|
|
1298
1323
|
// value has to be a string
|
|
1299
|
-
/* @__PURE__ */ l.jsx(
|
|
1324
|
+
/* @__PURE__ */ l.jsx(O.Option, { value: h.id.toString(), children: o(h) }, h.id)
|
|
1300
1325
|
)), [n]);
|
|
1301
1326
|
return /* @__PURE__ */ l.jsxs(
|
|
1302
|
-
|
|
1327
|
+
O,
|
|
1303
1328
|
{
|
|
1304
|
-
store:
|
|
1305
|
-
onOptionSubmit: (
|
|
1306
|
-
t(r ? parseInt(
|
|
1329
|
+
store: g,
|
|
1330
|
+
onOptionSubmit: (h) => {
|
|
1331
|
+
t(r ? parseInt(h) : h), s(""), g.closeDropdown();
|
|
1307
1332
|
},
|
|
1308
1333
|
offset: 0,
|
|
1309
1334
|
shadow: "sm",
|
|
1310
1335
|
disabled: a,
|
|
1311
1336
|
children: [
|
|
1312
|
-
/* @__PURE__ */ l.jsx(
|
|
1313
|
-
|
|
1337
|
+
/* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1338
|
+
K,
|
|
1314
1339
|
{
|
|
1340
|
+
...u,
|
|
1315
1341
|
id: e,
|
|
1316
1342
|
pointer: !a,
|
|
1317
1343
|
rightSection: /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }),
|
|
1318
1344
|
rightSectionPointerEvents: "none",
|
|
1319
|
-
onClick: () =>
|
|
1345
|
+
onClick: () => g.toggleDropdown(),
|
|
1320
1346
|
placeholder: "Type to search...",
|
|
1321
1347
|
value: i,
|
|
1322
|
-
onChange: (
|
|
1348
|
+
onChange: (h) => s(h.currentTarget.value),
|
|
1323
1349
|
disabled: a
|
|
1324
1350
|
}
|
|
1325
1351
|
) }),
|
|
1326
|
-
/* @__PURE__ */ l.jsx(
|
|
1352
|
+
/* @__PURE__ */ l.jsx(O.Dropdown, { children: /* @__PURE__ */ l.jsx(O.Options, { children: c.length === 0 ? /* @__PURE__ */ l.jsx(O.Empty, { children: "Nothing found" }) : c }) })
|
|
1327
1353
|
]
|
|
1328
1354
|
}
|
|
1329
1355
|
);
|
|
@@ -1333,119 +1359,129 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1333
1359
|
render: t,
|
|
1334
1360
|
freeze: o = !1
|
|
1335
1361
|
}) => {
|
|
1336
|
-
const r =
|
|
1362
|
+
const r = F(() => {
|
|
1337
1363
|
const i = [];
|
|
1338
1364
|
for (let s = 0; s < e.length; s++) {
|
|
1339
1365
|
const a = e[s];
|
|
1340
1366
|
i.push(
|
|
1341
|
-
/* @__PURE__ */ l.jsxs(
|
|
1367
|
+
/* @__PURE__ */ l.jsxs(L, { justify: "space-between", p: "sm", children: [
|
|
1342
1368
|
t(a),
|
|
1343
|
-
!o && /* @__PURE__ */ l.jsx(
|
|
1369
|
+
!o && /* @__PURE__ */ l.jsx(Vn, { size: "sm", onClick: () => n(a) })
|
|
1344
1370
|
] }, s)
|
|
1345
|
-
), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(
|
|
1371
|
+
), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(Tn, {}, `divider-${s}`));
|
|
1346
1372
|
}
|
|
1347
1373
|
return i;
|
|
1348
1374
|
}, [e, o]);
|
|
1349
1375
|
if (r.length !== 0)
|
|
1350
|
-
return /* @__PURE__ */ l.jsx(
|
|
1351
|
-
},
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
{
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1376
|
+
return /* @__PURE__ */ l.jsx(oe, { bd: "1px solid #ddd", children: r });
|
|
1377
|
+
}, Do = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
|
|
1378
|
+
const r = z(`${e.tsName}_start`), i = z(`${e.tsName}_end`);
|
|
1379
|
+
return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1380
|
+
/* @__PURE__ */ l.jsx(
|
|
1381
|
+
We,
|
|
1382
|
+
{
|
|
1383
|
+
...r,
|
|
1384
|
+
id: e.tsName,
|
|
1385
|
+
value: (n == null ? void 0 : n.start) || null,
|
|
1386
|
+
onChange: (s) => {
|
|
1387
|
+
t({
|
|
1388
|
+
start: s === null ? void 0 : J(s).startOf("day").toDate(),
|
|
1389
|
+
end: n == null ? void 0 : n.end
|
|
1390
|
+
});
|
|
1391
|
+
},
|
|
1392
|
+
valueFormat: "YYYY MMM DD",
|
|
1393
|
+
placeholder: "Pick date range",
|
|
1394
|
+
clearable: !o,
|
|
1395
|
+
disabled: o,
|
|
1396
|
+
popoverProps: { withinPortal: !1 },
|
|
1397
|
+
flex: 1,
|
|
1398
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1399
|
+
}
|
|
1400
|
+
),
|
|
1401
|
+
/* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
|
|
1402
|
+
/* @__PURE__ */ l.jsx(
|
|
1403
|
+
We,
|
|
1404
|
+
{
|
|
1405
|
+
...i,
|
|
1406
|
+
id: e.tsName,
|
|
1407
|
+
value: (n == null ? void 0 : n.end) || null,
|
|
1408
|
+
onChange: (s) => {
|
|
1409
|
+
t({
|
|
1410
|
+
start: n == null ? void 0 : n.start,
|
|
1411
|
+
end: s === null ? void 0 : J(s).startOf("day").toDate()
|
|
1412
|
+
});
|
|
1413
|
+
},
|
|
1414
|
+
valueFormat: "YYYY MMM DD",
|
|
1415
|
+
placeholder: "Pick date range",
|
|
1416
|
+
clearable: !o,
|
|
1417
|
+
disabled: o,
|
|
1418
|
+
popoverProps: { withinPortal: !1 },
|
|
1419
|
+
flex: 1,
|
|
1420
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1421
|
+
}
|
|
1422
|
+
)
|
|
1423
|
+
] });
|
|
1424
|
+
}, bo = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
|
|
1425
|
+
const r = z(`${e.tsName}_start`), i = z(`${e.tsName}_end`);
|
|
1426
|
+
return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1427
|
+
/* @__PURE__ */ l.jsx(
|
|
1428
|
+
_t,
|
|
1429
|
+
{
|
|
1430
|
+
...r,
|
|
1431
|
+
id: e.tsName,
|
|
1432
|
+
value: (n == null ? void 0 : n.start) || null,
|
|
1433
|
+
onChange: (s) => {
|
|
1434
|
+
t({
|
|
1435
|
+
start: s === null ? void 0 : J(s).toDate(),
|
|
1436
|
+
end: n == null ? void 0 : n.end
|
|
1437
|
+
});
|
|
1438
|
+
},
|
|
1439
|
+
valueFormat: "YYYY MMM DD HH:mm",
|
|
1440
|
+
placeholder: "Pick date range",
|
|
1441
|
+
clearable: !o,
|
|
1442
|
+
disabled: o,
|
|
1443
|
+
popoverProps: { withinPortal: !1 },
|
|
1444
|
+
flex: 1,
|
|
1445
|
+
withSeconds: !1,
|
|
1446
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1447
|
+
}
|
|
1448
|
+
),
|
|
1449
|
+
/* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
|
|
1450
|
+
/* @__PURE__ */ l.jsx(
|
|
1451
|
+
_t,
|
|
1452
|
+
{
|
|
1453
|
+
...i,
|
|
1454
|
+
id: e.tsName,
|
|
1455
|
+
value: (n == null ? void 0 : n.end) || null,
|
|
1456
|
+
onChange: (s) => {
|
|
1457
|
+
t({
|
|
1458
|
+
start: n == null ? void 0 : n.start,
|
|
1459
|
+
end: s === null ? void 0 : J(s).toDate()
|
|
1460
|
+
});
|
|
1461
|
+
},
|
|
1462
|
+
valueFormat: "YYYY MMM DD HH:mm",
|
|
1463
|
+
placeholder: "Pick date range",
|
|
1464
|
+
clearable: !o,
|
|
1465
|
+
disabled: o,
|
|
1466
|
+
popoverProps: { withinPortal: !1 },
|
|
1467
|
+
flex: 1,
|
|
1468
|
+
withSeconds: !1,
|
|
1469
|
+
leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
|
|
1470
|
+
}
|
|
1471
|
+
)
|
|
1472
|
+
] });
|
|
1473
|
+
}, Mt = {
|
|
1474
|
+
integer: De,
|
|
1475
|
+
float: De,
|
|
1476
|
+
string: Se,
|
|
1477
|
+
boolean: tn,
|
|
1478
|
+
"string[]": Se,
|
|
1479
|
+
enum: _o,
|
|
1444
1480
|
date: yo
|
|
1445
|
-
}, Vo = "_requiredLabelLeft_l5p83_1", To = "_requiredLabelRight_l5p83_11",
|
|
1481
|
+
}, Vo = "_requiredLabelLeft_l5p83_1", To = "_requiredLabelRight_l5p83_11", Dt = {
|
|
1446
1482
|
requiredLabelLeft: Vo,
|
|
1447
1483
|
requiredLabelRight: To
|
|
1448
|
-
},
|
|
1484
|
+
}, rn = ({
|
|
1449
1485
|
label: e,
|
|
1450
1486
|
name: n,
|
|
1451
1487
|
required: t = !1,
|
|
@@ -1453,11 +1489,11 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1453
1489
|
style: r,
|
|
1454
1490
|
align: i = "left"
|
|
1455
1491
|
}) => {
|
|
1456
|
-
const s = t ? i === "left" ?
|
|
1457
|
-
return /* @__PURE__ */ l.jsx(
|
|
1492
|
+
const s = t ? i === "left" ? Dt.requiredLabelRight : Dt.requiredLabelLeft : "";
|
|
1493
|
+
return /* @__PURE__ */ l.jsx(q, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(L, { gap: 4, children: [
|
|
1458
1494
|
/* @__PURE__ */ l.jsx(P, { size: "sm", className: s, children: e }),
|
|
1459
|
-
o !== void 0 && /* @__PURE__ */ l.jsx(
|
|
1460
|
-
|
|
1495
|
+
o !== void 0 && /* @__PURE__ */ l.jsx(qt, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
|
|
1496
|
+
Ut,
|
|
1461
1497
|
{
|
|
1462
1498
|
size: 16,
|
|
1463
1499
|
stroke: 1.5,
|
|
@@ -1465,15 +1501,15 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1465
1501
|
}
|
|
1466
1502
|
) })
|
|
1467
1503
|
] }) }) });
|
|
1468
|
-
},
|
|
1504
|
+
}, No = {
|
|
1469
1505
|
type: "vertical",
|
|
1470
1506
|
helpAlwaysVisible: !1
|
|
1471
|
-
},
|
|
1507
|
+
}, sn = re(
|
|
1472
1508
|
({
|
|
1473
1509
|
store: e,
|
|
1474
1510
|
record: n,
|
|
1475
1511
|
property: t,
|
|
1476
|
-
layout: o =
|
|
1512
|
+
layout: o = No,
|
|
1477
1513
|
InputComponent: r,
|
|
1478
1514
|
freeze: i = !1,
|
|
1479
1515
|
label: s,
|
|
@@ -1483,28 +1519,28 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1483
1519
|
const [g, c] = M(void 0);
|
|
1484
1520
|
if (u !== void 0 && !u(n))
|
|
1485
1521
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
1486
|
-
const
|
|
1522
|
+
const h = Jt(n, t);
|
|
1487
1523
|
return a === void 0 && (a = (f) => {
|
|
1488
1524
|
var p;
|
|
1489
|
-
if (
|
|
1490
|
-
|
|
1525
|
+
if (Yt(n))
|
|
1526
|
+
Et(n, t, f);
|
|
1491
1527
|
else {
|
|
1492
1528
|
const m = n.toDraft();
|
|
1493
|
-
|
|
1529
|
+
Et(m, t, f), e.setDraft(m);
|
|
1494
1530
|
}
|
|
1495
1531
|
const d = t.validator(f);
|
|
1496
1532
|
d.isValid ? c(void 0) : c(
|
|
1497
1533
|
(p = d.errorMessage) == null ? void 0 : p.t({ args: { name: t.label } })
|
|
1498
1534
|
);
|
|
1499
1535
|
}), /* @__PURE__ */ l.jsx(
|
|
1500
|
-
|
|
1536
|
+
Ao,
|
|
1501
1537
|
{
|
|
1502
1538
|
db: e.db,
|
|
1503
1539
|
property: t,
|
|
1504
1540
|
layout: o,
|
|
1505
1541
|
InputComponent: r,
|
|
1506
1542
|
freeze: i,
|
|
1507
|
-
value:
|
|
1543
|
+
value: h,
|
|
1508
1544
|
error: g,
|
|
1509
1545
|
label: s,
|
|
1510
1546
|
onChange: a
|
|
@@ -1512,7 +1548,7 @@ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1512
1548
|
);
|
|
1513
1549
|
}
|
|
1514
1550
|
);
|
|
1515
|
-
function
|
|
1551
|
+
function Ao({
|
|
1516
1552
|
db: e,
|
|
1517
1553
|
layout: n,
|
|
1518
1554
|
property: t,
|
|
@@ -1523,7 +1559,7 @@ function No({
|
|
|
1523
1559
|
label: a,
|
|
1524
1560
|
onChange: u
|
|
1525
1561
|
}) {
|
|
1526
|
-
return ko(n) ? /* @__PURE__ */ l.jsxs(
|
|
1562
|
+
return ko(n) ? /* @__PURE__ */ l.jsxs(te, { gap: 5, children: [
|
|
1527
1563
|
/* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
1528
1564
|
/* @__PURE__ */ l.jsx(
|
|
1529
1565
|
$.Col,
|
|
@@ -1534,12 +1570,12 @@ function No({
|
|
|
1534
1570
|
justifyContent: n.align || "left"
|
|
1535
1571
|
},
|
|
1536
1572
|
children: /* @__PURE__ */ l.jsx(
|
|
1537
|
-
|
|
1573
|
+
rn,
|
|
1538
1574
|
{
|
|
1539
|
-
label: /* @__PURE__ */ l.jsx(
|
|
1575
|
+
label: /* @__PURE__ */ l.jsx(N, { value: t.label }),
|
|
1540
1576
|
name: t.name,
|
|
1541
1577
|
required: t.isRequired,
|
|
1542
|
-
tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1578
|
+
tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
|
|
1543
1579
|
align: n.align
|
|
1544
1580
|
}
|
|
1545
1581
|
)
|
|
@@ -1559,17 +1595,17 @@ function No({
|
|
|
1559
1595
|
] }),
|
|
1560
1596
|
s !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
1561
1597
|
/* @__PURE__ */ l.jsx($.Col, { span: n.labelCol }),
|
|
1562
|
-
/* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
1598
|
+
/* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(K.Error, { children: s }) })
|
|
1563
1599
|
] })
|
|
1564
|
-
] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(
|
|
1600
|
+
] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(N, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(L, { gap: 4, style: { display: "inline-flex" }, children: [
|
|
1565
1601
|
a,
|
|
1566
1602
|
/* @__PURE__ */ l.jsx(
|
|
1567
|
-
|
|
1603
|
+
qt,
|
|
1568
1604
|
{
|
|
1569
|
-
label: /* @__PURE__ */ l.jsx(
|
|
1605
|
+
label: /* @__PURE__ */ l.jsx(N, { value: t.description }),
|
|
1570
1606
|
withArrow: !0,
|
|
1571
1607
|
children: /* @__PURE__ */ l.jsx(
|
|
1572
|
-
|
|
1608
|
+
Ut,
|
|
1573
1609
|
{
|
|
1574
1610
|
size: 16,
|
|
1575
1611
|
stroke: 1.5,
|
|
@@ -1579,10 +1615,10 @@ function No({
|
|
|
1579
1615
|
}
|
|
1580
1616
|
)
|
|
1581
1617
|
] })), /* @__PURE__ */ l.jsx(
|
|
1582
|
-
|
|
1618
|
+
K.Wrapper,
|
|
1583
1619
|
{
|
|
1584
1620
|
label: a,
|
|
1585
|
-
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1621
|
+
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
|
|
1586
1622
|
required: t.isRequired,
|
|
1587
1623
|
children: /* @__PURE__ */ l.jsx(
|
|
1588
1624
|
o,
|
|
@@ -1601,8 +1637,8 @@ function No({
|
|
|
1601
1637
|
function ko(e) {
|
|
1602
1638
|
return e.type === "horizontal";
|
|
1603
1639
|
}
|
|
1604
|
-
const
|
|
1605
|
-
const n = e.schema, t =
|
|
1640
|
+
const bt = 12, Ei = (e) => {
|
|
1641
|
+
const n = e.schema, t = F(() => {
|
|
1606
1642
|
const o = Math.max(
|
|
1607
1643
|
...e.fieldGroups.map((r) => Math.max(...r.fields.map((i) => i.length)))
|
|
1608
1644
|
);
|
|
@@ -1620,12 +1656,12 @@ const Dt = 12, bi = (e) => {
|
|
|
1620
1656
|
"form",
|
|
1621
1657
|
{
|
|
1622
1658
|
onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
|
|
1623
|
-
o.preventDefault(), e.onSubmit !== void 0 &&
|
|
1659
|
+
o.preventDefault(), e.onSubmit !== void 0 && Yt(e.record) && e.onSubmit(e.record);
|
|
1624
1660
|
},
|
|
1625
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
1661
|
+
children: /* @__PURE__ */ l.jsxs(te, { gap: "sm", className: e.className, style: e.styles, children: [
|
|
1626
1662
|
t,
|
|
1627
|
-
/* @__PURE__ */ l.jsx(
|
|
1628
|
-
|
|
1663
|
+
/* @__PURE__ */ l.jsx(L, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
|
|
1664
|
+
B,
|
|
1629
1665
|
{
|
|
1630
1666
|
variant: o.variant,
|
|
1631
1667
|
onClick: () => {
|
|
@@ -1641,80 +1677,101 @@ const Dt = 12, bi = (e) => {
|
|
|
1641
1677
|
);
|
|
1642
1678
|
};
|
|
1643
1679
|
function Lo(e, n, t, o, r, i, s) {
|
|
1644
|
-
var c, S, f, d, p;
|
|
1645
1680
|
const a = r.fields, u = [];
|
|
1646
|
-
for (let
|
|
1647
|
-
const
|
|
1648
|
-
if (!Number.isInteger(
|
|
1649
|
-
throw new Error(`Span must be an integer, but got ${
|
|
1650
|
-
let
|
|
1651
|
-
s !== void 0 && typeof s == "object" && s.type === "horizontal" ?
|
|
1681
|
+
for (let c = 0; c < a.length; c++) {
|
|
1682
|
+
const h = bt / a[c].length;
|
|
1683
|
+
if (!Number.isInteger(h))
|
|
1684
|
+
throw new Error(`Span must be an integer, but got ${h} for row ${c}`);
|
|
1685
|
+
let f;
|
|
1686
|
+
s !== void 0 && typeof s == "object" && s.type === "horizontal" ? f = {
|
|
1652
1687
|
...s,
|
|
1653
1688
|
// the size of labelCol must match the minimum size of labelCol across different groups
|
|
1654
1689
|
// and rows -- if the result isn't a whole number, we may see unaligned labels
|
|
1655
1690
|
// but this is okay as users will need to adjust the layout anyway.
|
|
1656
1691
|
labelCol: Math.floor(
|
|
1657
|
-
s.labelCol * a[
|
|
1692
|
+
s.labelCol * a[c].length / i
|
|
1658
1693
|
),
|
|
1659
|
-
itemCol:
|
|
1660
|
-
} :
|
|
1661
|
-
for (let
|
|
1662
|
-
const
|
|
1663
|
-
let
|
|
1664
|
-
if (typeof
|
|
1665
|
-
|
|
1666
|
-
else
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
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,
|
|
1694
|
+
itemCol: bt - Math.floor(s.labelCol * a[c].length / i)
|
|
1695
|
+
} : f = s;
|
|
1696
|
+
for (let d = 0; d < a[c].length; d++) {
|
|
1697
|
+
const p = a[c][d];
|
|
1698
|
+
let m;
|
|
1699
|
+
if (typeof p == "function")
|
|
1700
|
+
m = p(n, t);
|
|
1701
|
+
else {
|
|
1702
|
+
let C, v = {};
|
|
1703
|
+
typeof p == "object" && "prop" in p ? (C = p.prop instanceof Y ? p.prop : e.allProperties[p.prop], p.args !== void 0 && (v = p.args)) : C = p instanceof Y ? p : e.allProperties[p], m = /* @__PURE__ */ l.jsx(
|
|
1704
|
+
sn,
|
|
1689
1705
|
{
|
|
1690
1706
|
store: n,
|
|
1691
1707
|
record: t,
|
|
1692
|
-
property:
|
|
1693
|
-
layout:
|
|
1694
|
-
InputComponent:
|
|
1695
|
-
freeze: !1
|
|
1708
|
+
property: C,
|
|
1709
|
+
layout: f,
|
|
1710
|
+
InputComponent: ln(C, v.input),
|
|
1711
|
+
freeze: v.freeze ?? !1,
|
|
1712
|
+
visible: v.visible,
|
|
1713
|
+
label: v.label,
|
|
1714
|
+
onChange: v.onChange
|
|
1696
1715
|
}
|
|
1697
1716
|
);
|
|
1698
1717
|
}
|
|
1699
1718
|
u.push(
|
|
1700
|
-
/* @__PURE__ */ l.jsx($.Col, { span:
|
|
1719
|
+
/* @__PURE__ */ l.jsx($.Col, { span: h, children: m }, `${c}-${d}`)
|
|
1701
1720
|
);
|
|
1702
1721
|
}
|
|
1703
1722
|
}
|
|
1704
1723
|
const g = /* @__PURE__ */ l.jsx($, { gutter: "sm", children: u }, o);
|
|
1705
|
-
return r.name !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1724
|
+
return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Nn, { legend: r.name, children: g }, o) : g;
|
|
1706
1725
|
}
|
|
1707
|
-
function
|
|
1726
|
+
function ln(e, n) {
|
|
1708
1727
|
if (n !== void 0)
|
|
1709
1728
|
return n;
|
|
1710
|
-
const t = e instanceof
|
|
1711
|
-
if (
|
|
1712
|
-
return t.cardinality === "N:N" || t.cardinality === "1:N" ?
|
|
1713
|
-
if (
|
|
1729
|
+
const t = e instanceof Y ? e.leafProperty : e;
|
|
1730
|
+
if (ie(t))
|
|
1731
|
+
return t.cardinality === "N:N" || t.cardinality === "1:N" ? on : nn;
|
|
1732
|
+
if (Mt[t.datatype] === void 0)
|
|
1714
1733
|
throw new Error(
|
|
1715
1734
|
`No input component found for datatype ${t.datatype}`
|
|
1716
1735
|
);
|
|
1717
|
-
return
|
|
1736
|
+
return Mt[t.datatype];
|
|
1737
|
+
}
|
|
1738
|
+
function $i(e, n, t = {}) {
|
|
1739
|
+
return (o, r) => {
|
|
1740
|
+
if (t.visible !== void 0 && !t.visible(r))
|
|
1741
|
+
return /* @__PURE__ */ l.jsx("div", {});
|
|
1742
|
+
const i = n.map((s, a) => {
|
|
1743
|
+
let u;
|
|
1744
|
+
if (typeof s == "function")
|
|
1745
|
+
u = s(o, r);
|
|
1746
|
+
else {
|
|
1747
|
+
let g, c = {};
|
|
1748
|
+
typeof s == "object" && "prop" in s ? (g = s.prop instanceof Y ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof Y ? s : e.allProperties[s], u = /* @__PURE__ */ l.jsx(
|
|
1749
|
+
sn,
|
|
1750
|
+
{
|
|
1751
|
+
store: o,
|
|
1752
|
+
record: r,
|
|
1753
|
+
property: g,
|
|
1754
|
+
layout: t.layout,
|
|
1755
|
+
InputComponent: ln(g, c.input),
|
|
1756
|
+
freeze: c.freeze ?? !1,
|
|
1757
|
+
visible: c.visible,
|
|
1758
|
+
label: c.label,
|
|
1759
|
+
onChange: c.onChange
|
|
1760
|
+
}
|
|
1761
|
+
);
|
|
1762
|
+
}
|
|
1763
|
+
return /* @__PURE__ */ l.jsx("div", { children: u }, a);
|
|
1764
|
+
});
|
|
1765
|
+
return /* @__PURE__ */ l.jsx(
|
|
1766
|
+
L,
|
|
1767
|
+
{
|
|
1768
|
+
gap: t.flexGap,
|
|
1769
|
+
grow: t.flexGrow ?? !0,
|
|
1770
|
+
align: "flex-start",
|
|
1771
|
+
children: i
|
|
1772
|
+
}
|
|
1773
|
+
);
|
|
1774
|
+
};
|
|
1718
1775
|
}
|
|
1719
1776
|
/**
|
|
1720
1777
|
* table-core
|
|
@@ -1726,18 +1783,18 @@ function Vt(e, n) {
|
|
|
1726
1783
|
*
|
|
1727
1784
|
* @license MIT
|
|
1728
1785
|
*/
|
|
1729
|
-
function
|
|
1786
|
+
function Z(e, n) {
|
|
1730
1787
|
return typeof e == "function" ? e(n) : e;
|
|
1731
1788
|
}
|
|
1732
|
-
function
|
|
1789
|
+
function G(e, n) {
|
|
1733
1790
|
return (t) => {
|
|
1734
1791
|
n.setState((o) => ({
|
|
1735
1792
|
...o,
|
|
1736
|
-
[e]:
|
|
1793
|
+
[e]: Z(t, o[e])
|
|
1737
1794
|
}));
|
|
1738
1795
|
};
|
|
1739
1796
|
}
|
|
1740
|
-
function
|
|
1797
|
+
function be(e) {
|
|
1741
1798
|
return e instanceof Function;
|
|
1742
1799
|
}
|
|
1743
1800
|
function Oo(e) {
|
|
@@ -1753,23 +1810,23 @@ function zo(e, n) {
|
|
|
1753
1810
|
};
|
|
1754
1811
|
return o(e), t;
|
|
1755
1812
|
}
|
|
1756
|
-
function
|
|
1813
|
+
function w(e, n, t) {
|
|
1757
1814
|
let o = [], r;
|
|
1758
1815
|
return (i) => {
|
|
1759
1816
|
let s;
|
|
1760
1817
|
t.key && t.debug && (s = Date.now());
|
|
1761
1818
|
const a = e(i);
|
|
1762
|
-
if (!(a.length !== o.length || a.some((c,
|
|
1819
|
+
if (!(a.length !== o.length || a.some((c, h) => o[h] !== c)))
|
|
1763
1820
|
return r;
|
|
1764
1821
|
o = a;
|
|
1765
1822
|
let g;
|
|
1766
1823
|
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()) {
|
|
1767
|
-
const c = Math.round((Date.now() - s) * 100) / 100,
|
|
1824
|
+
const c = Math.round((Date.now() - s) * 100) / 100, h = Math.round((Date.now() - g) * 100) / 100, f = h / 16, d = (p, m) => {
|
|
1768
1825
|
for (p = String(p); p.length < m; )
|
|
1769
1826
|
p = " " + p;
|
|
1770
1827
|
return p;
|
|
1771
1828
|
};
|
|
1772
|
-
console.info(`%c⏱ ${d(
|
|
1829
|
+
console.info(`%c⏱ ${d(h, 5)} /${d(c, 5)} ms`, `
|
|
1773
1830
|
font-size: .6rem;
|
|
1774
1831
|
font-weight: bold;
|
|
1775
1832
|
color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -1777,7 +1834,7 @@ function R(e, n, t) {
|
|
|
1777
1834
|
return r;
|
|
1778
1835
|
};
|
|
1779
1836
|
}
|
|
1780
|
-
function
|
|
1837
|
+
function x(e, n, t, o) {
|
|
1781
1838
|
return {
|
|
1782
1839
|
debug: () => {
|
|
1783
1840
|
var r;
|
|
@@ -1797,14 +1854,14 @@ function Go(e, n, t, o) {
|
|
|
1797
1854
|
column: t,
|
|
1798
1855
|
getValue: () => n.getValue(o),
|
|
1799
1856
|
renderValue: r,
|
|
1800
|
-
getContext:
|
|
1857
|
+
getContext: w(() => [e, t, n, i], (s, a, u, g) => ({
|
|
1801
1858
|
table: s,
|
|
1802
1859
|
column: a,
|
|
1803
1860
|
row: u,
|
|
1804
1861
|
cell: g,
|
|
1805
1862
|
getValue: g.getValue,
|
|
1806
1863
|
renderValue: g.renderValue
|
|
1807
|
-
}),
|
|
1864
|
+
}), x(e.options, "debugCells", "cell.getContext"))
|
|
1808
1865
|
};
|
|
1809
1866
|
return e._features.forEach((s) => {
|
|
1810
1867
|
s.createCell == null || s.createCell(i, t, n, e);
|
|
@@ -1826,32 +1883,32 @@ function Ho(e, n, t, o) {
|
|
|
1826
1883
|
return d;
|
|
1827
1884
|
} : c = (f) => f[a.accessorKey]), !g)
|
|
1828
1885
|
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();
|
|
1829
|
-
let
|
|
1886
|
+
let h = {
|
|
1830
1887
|
id: `${String(g)}`,
|
|
1831
1888
|
accessorFn: c,
|
|
1832
1889
|
parent: o,
|
|
1833
1890
|
depth: t,
|
|
1834
1891
|
columnDef: a,
|
|
1835
1892
|
columns: [],
|
|
1836
|
-
getFlatColumns:
|
|
1893
|
+
getFlatColumns: w(() => [!0], () => {
|
|
1837
1894
|
var f;
|
|
1838
|
-
return [
|
|
1839
|
-
},
|
|
1840
|
-
getLeafColumns:
|
|
1895
|
+
return [h, ...(f = h.columns) == null ? void 0 : f.flatMap((d) => d.getFlatColumns())];
|
|
1896
|
+
}, x(e.options, "debugColumns", "column.getFlatColumns")),
|
|
1897
|
+
getLeafColumns: w(() => [e._getOrderColumnsFn()], (f) => {
|
|
1841
1898
|
var d;
|
|
1842
|
-
if ((d =
|
|
1843
|
-
let p =
|
|
1899
|
+
if ((d = h.columns) != null && d.length) {
|
|
1900
|
+
let p = h.columns.flatMap((m) => m.getLeafColumns());
|
|
1844
1901
|
return f(p);
|
|
1845
1902
|
}
|
|
1846
|
-
return [
|
|
1847
|
-
},
|
|
1903
|
+
return [h];
|
|
1904
|
+
}, x(e.options, "debugColumns", "column.getLeafColumns"))
|
|
1848
1905
|
};
|
|
1849
1906
|
for (const f of e._features)
|
|
1850
|
-
f.createColumn == null || f.createColumn(
|
|
1851
|
-
return
|
|
1907
|
+
f.createColumn == null || f.createColumn(h, e);
|
|
1908
|
+
return h;
|
|
1852
1909
|
}
|
|
1853
|
-
const
|
|
1854
|
-
function
|
|
1910
|
+
const k = "debugHeaders";
|
|
1911
|
+
function Vt(e, n, t) {
|
|
1855
1912
|
var o;
|
|
1856
1913
|
let i = {
|
|
1857
1914
|
id: (o = t.id) != null ? o : n.id,
|
|
@@ -1882,31 +1939,31 @@ function Tt(e, n, t) {
|
|
|
1882
1939
|
}
|
|
1883
1940
|
const qo = {
|
|
1884
1941
|
createTable: (e) => {
|
|
1885
|
-
e.getHeaderGroups =
|
|
1942
|
+
e.getHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
1886
1943
|
var i, s;
|
|
1887
|
-
const a = (i = o == null ? void 0 : o.map((
|
|
1944
|
+
const a = (i = o == null ? void 0 : o.map((h) => t.find((f) => f.id === h)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((h) => t.find((f) => f.id === h)).filter(Boolean)) != null ? s : [], g = t.filter((h) => !(o != null && o.includes(h.id)) && !(r != null && r.includes(h.id)));
|
|
1888
1945
|
return Ie(n, [...a, ...g, ...u], e);
|
|
1889
|
-
},
|
|
1946
|
+
}, x(e.options, k, "getHeaderGroups")), e.getCenterHeaderGroups = w(() => [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")), x(e.options, k, "getCenterHeaderGroups")), e.getLeftHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
1890
1947
|
var r;
|
|
1891
1948
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
1892
1949
|
return Ie(n, i, e, "left");
|
|
1893
|
-
},
|
|
1950
|
+
}, x(e.options, k, "getLeftHeaderGroups")), e.getRightHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
|
|
1894
1951
|
var r;
|
|
1895
1952
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
1896
1953
|
return Ie(n, i, e, "right");
|
|
1897
|
-
},
|
|
1954
|
+
}, x(e.options, k, "getRightHeaderGroups")), e.getFooterGroups = w(() => [e.getHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getFooterGroups")), e.getLeftFooterGroups = w(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getLeftFooterGroups")), e.getCenterFooterGroups = w(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getCenterFooterGroups")), e.getRightFooterGroups = w(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getRightFooterGroups")), e.getFlatHeaders = w(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getFlatHeaders")), e.getLeftFlatHeaders = w(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getLeftFlatHeaders")), e.getCenterFlatHeaders = w(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getCenterFlatHeaders")), e.getRightFlatHeaders = w(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getRightFlatHeaders")), e.getCenterLeafHeaders = w(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
1898
1955
|
var o;
|
|
1899
1956
|
return !((o = t.subHeaders) != null && o.length);
|
|
1900
|
-
}),
|
|
1957
|
+
}), x(e.options, k, "getCenterLeafHeaders")), e.getLeftLeafHeaders = w(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
1901
1958
|
var o;
|
|
1902
1959
|
return !((o = t.subHeaders) != null && o.length);
|
|
1903
|
-
}),
|
|
1960
|
+
}), x(e.options, k, "getLeftLeafHeaders")), e.getRightLeafHeaders = w(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
1904
1961
|
var o;
|
|
1905
1962
|
return !((o = t.subHeaders) != null && o.length);
|
|
1906
|
-
}),
|
|
1963
|
+
}), x(e.options, k, "getRightLeafHeaders")), e.getLeafHeaders = w(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
1907
1964
|
var r, i, s, a, u, g;
|
|
1908
1965
|
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
|
-
},
|
|
1966
|
+
}, x(e.options, k, "getLeafHeaders"));
|
|
1910
1967
|
}
|
|
1911
1968
|
};
|
|
1912
1969
|
function Ie(e, n, t, o) {
|
|
@@ -1927,43 +1984,43 @@ function Ie(e, n, t, o) {
|
|
|
1927
1984
|
headers: []
|
|
1928
1985
|
}, m = [];
|
|
1929
1986
|
f.forEach((C) => {
|
|
1930
|
-
const v = [...m].reverse()[0],
|
|
1931
|
-
let
|
|
1932
|
-
if (
|
|
1987
|
+
const v = [...m].reverse()[0], _ = C.column.depth === p.depth;
|
|
1988
|
+
let R, j = !1;
|
|
1989
|
+
if (_ && C.column.parent ? R = C.column.parent : (R = C.column, j = !0), v && (v == null ? void 0 : v.column) === R)
|
|
1933
1990
|
v.subHeaders.push(C);
|
|
1934
1991
|
else {
|
|
1935
|
-
const
|
|
1936
|
-
id: [o, d,
|
|
1937
|
-
isPlaceholder:
|
|
1938
|
-
placeholderId:
|
|
1992
|
+
const A = Vt(t, R, {
|
|
1993
|
+
id: [o, d, R.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
|
|
1994
|
+
isPlaceholder: j,
|
|
1995
|
+
placeholderId: j ? `${m.filter((I) => I.column === R).length}` : void 0,
|
|
1939
1996
|
depth: d,
|
|
1940
1997
|
index: m.length
|
|
1941
1998
|
});
|
|
1942
|
-
|
|
1999
|
+
A.subHeaders.push(C), m.push(A);
|
|
1943
2000
|
}
|
|
1944
2001
|
p.headers.push(C), C.headerGroup = p;
|
|
1945
2002
|
}), u.push(p), d > 0 && g(m, d - 1);
|
|
1946
|
-
}, c = n.map((f, d) =>
|
|
2003
|
+
}, c = n.map((f, d) => Vt(t, f, {
|
|
1947
2004
|
depth: s,
|
|
1948
2005
|
index: d
|
|
1949
2006
|
}));
|
|
1950
2007
|
g(c, s - 1), u.reverse();
|
|
1951
|
-
const
|
|
2008
|
+
const h = (f) => f.filter((p) => p.column.getIsVisible()).map((p) => {
|
|
1952
2009
|
let m = 0, C = 0, v = [0];
|
|
1953
|
-
p.subHeaders && p.subHeaders.length ? (v = [],
|
|
2010
|
+
p.subHeaders && p.subHeaders.length ? (v = [], h(p.subHeaders).forEach((R) => {
|
|
1954
2011
|
let {
|
|
1955
|
-
colSpan:
|
|
1956
|
-
rowSpan:
|
|
1957
|
-
} =
|
|
1958
|
-
m +=
|
|
2012
|
+
colSpan: j,
|
|
2013
|
+
rowSpan: A
|
|
2014
|
+
} = R;
|
|
2015
|
+
m += j, v.push(A);
|
|
1959
2016
|
})) : m = 1;
|
|
1960
|
-
const
|
|
1961
|
-
return C = C +
|
|
2017
|
+
const _ = Math.min(...v);
|
|
2018
|
+
return C = C + _, p.colSpan = m, p.rowSpan = C, {
|
|
1962
2019
|
colSpan: m,
|
|
1963
2020
|
rowSpan: C
|
|
1964
2021
|
};
|
|
1965
2022
|
});
|
|
1966
|
-
return
|
|
2023
|
+
return h((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
|
|
1967
2024
|
}
|
|
1968
2025
|
const Bo = (e, n, t, o, r, i, s) => {
|
|
1969
2026
|
let a = {
|
|
@@ -2004,8 +2061,8 @@ const Bo = (e, n, t, o, r, i, s) => {
|
|
|
2004
2061
|
}
|
|
2005
2062
|
return u.reverse();
|
|
2006
2063
|
},
|
|
2007
|
-
getAllCells:
|
|
2008
|
-
_getAllCellsByColumnId:
|
|
2064
|
+
getAllCells: w(() => [e.getAllLeafColumns()], (u) => u.map((g) => Go(e, a, g, g.id)), x(e.options, "debugRows", "getAllCells")),
|
|
2065
|
+
_getAllCellsByColumnId: w(() => [a.getAllCells()], (u) => u.reduce((g, c) => (g[c.column.id] = c, g), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
2009
2066
|
};
|
|
2010
2067
|
for (let u = 0; u < e._features.length; u++) {
|
|
2011
2068
|
const g = e._features[u];
|
|
@@ -2019,41 +2076,41 @@ const Bo = (e, n, t, o, r, i, s) => {
|
|
|
2019
2076
|
return e._getFacetedMinMaxValues();
|
|
2020
2077
|
};
|
|
2021
2078
|
}
|
|
2022
|
-
},
|
|
2079
|
+
}, an = (e, n, t) => {
|
|
2023
2080
|
var o, r;
|
|
2024
2081
|
const i = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
|
|
2025
2082
|
return !!(!((r = e.getValue(n)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
|
|
2026
2083
|
};
|
|
2027
|
-
|
|
2028
|
-
const
|
|
2084
|
+
an.autoRemove = (e) => U(e);
|
|
2085
|
+
const un = (e, n, t) => {
|
|
2029
2086
|
var o;
|
|
2030
2087
|
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
|
|
2031
2088
|
};
|
|
2032
|
-
|
|
2033
|
-
const
|
|
2089
|
+
un.autoRemove = (e) => U(e);
|
|
2090
|
+
const dn = (e, n, t) => {
|
|
2034
2091
|
var o;
|
|
2035
2092
|
return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
2036
2093
|
};
|
|
2037
|
-
|
|
2038
|
-
const
|
|
2094
|
+
dn.autoRemove = (e) => U(e);
|
|
2095
|
+
const gn = (e, n, t) => {
|
|
2039
2096
|
var o;
|
|
2040
2097
|
return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
|
|
2041
2098
|
};
|
|
2042
|
-
|
|
2043
|
-
const
|
|
2099
|
+
gn.autoRemove = (e) => U(e);
|
|
2100
|
+
const cn = (e, n, t) => !t.some((o) => {
|
|
2044
2101
|
var r;
|
|
2045
2102
|
return !((r = e.getValue(n)) != null && r.includes(o));
|
|
2046
2103
|
});
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2104
|
+
cn.autoRemove = (e) => U(e) || !(e != null && e.length);
|
|
2105
|
+
const fn = (e, n, t) => t.some((o) => {
|
|
2049
2106
|
var r;
|
|
2050
2107
|
return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
|
|
2051
2108
|
});
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2054
|
-
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2109
|
+
fn.autoRemove = (e) => U(e) || !(e != null && e.length);
|
|
2110
|
+
const pn = (e, n, t) => e.getValue(n) === t;
|
|
2111
|
+
pn.autoRemove = (e) => U(e);
|
|
2112
|
+
const mn = (e, n, t) => e.getValue(n) == t;
|
|
2113
|
+
mn.autoRemove = (e) => U(e);
|
|
2057
2114
|
const gt = (e, n, t) => {
|
|
2058
2115
|
let [o, r] = t;
|
|
2059
2116
|
const i = e.getValue(n);
|
|
@@ -2067,19 +2124,19 @@ gt.resolveFilterValue = (e) => {
|
|
|
2067
2124
|
}
|
|
2068
2125
|
return [i, s];
|
|
2069
2126
|
};
|
|
2070
|
-
gt.autoRemove = (e) =>
|
|
2071
|
-
const
|
|
2072
|
-
includesString:
|
|
2073
|
-
includesStringSensitive:
|
|
2074
|
-
equalsString:
|
|
2075
|
-
arrIncludes:
|
|
2076
|
-
arrIncludesAll:
|
|
2077
|
-
arrIncludesSome:
|
|
2078
|
-
equals:
|
|
2079
|
-
weakEquals:
|
|
2127
|
+
gt.autoRemove = (e) => U(e) || U(e[0]) && U(e[1]);
|
|
2128
|
+
const X = {
|
|
2129
|
+
includesString: an,
|
|
2130
|
+
includesStringSensitive: un,
|
|
2131
|
+
equalsString: dn,
|
|
2132
|
+
arrIncludes: gn,
|
|
2133
|
+
arrIncludesAll: cn,
|
|
2134
|
+
arrIncludesSome: fn,
|
|
2135
|
+
equals: pn,
|
|
2136
|
+
weakEquals: mn,
|
|
2080
2137
|
inNumberRange: gt
|
|
2081
2138
|
};
|
|
2082
|
-
function
|
|
2139
|
+
function U(e) {
|
|
2083
2140
|
return e == null || e === "";
|
|
2084
2141
|
}
|
|
2085
2142
|
const Ko = {
|
|
@@ -2091,19 +2148,19 @@ const Ko = {
|
|
|
2091
2148
|
...e
|
|
2092
2149
|
}),
|
|
2093
2150
|
getDefaultOptions: (e) => ({
|
|
2094
|
-
onColumnFiltersChange:
|
|
2151
|
+
onColumnFiltersChange: G("columnFilters", e),
|
|
2095
2152
|
filterFromLeafRows: !1,
|
|
2096
2153
|
maxLeafRowFilterDepth: 100
|
|
2097
2154
|
}),
|
|
2098
2155
|
createColumn: (e, n) => {
|
|
2099
2156
|
e.getAutoFilterFn = () => {
|
|
2100
2157
|
const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
|
|
2101
|
-
return typeof o == "string" ?
|
|
2158
|
+
return typeof o == "string" ? X.includesString : typeof o == "number" ? X.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? X.equals : Array.isArray(o) ? X.arrIncludes : X.weakEquals;
|
|
2102
2159
|
}, e.getFilterFn = () => {
|
|
2103
2160
|
var t, o;
|
|
2104
|
-
return
|
|
2161
|
+
return be(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
2105
2162
|
// @ts-ignore
|
|
2106
|
-
(t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t :
|
|
2163
|
+
(t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : X[e.columnDef.filterFn]
|
|
2107
2164
|
);
|
|
2108
2165
|
}, e.getCanFilter = () => {
|
|
2109
2166
|
var t, o, r;
|
|
@@ -2116,8 +2173,8 @@ const Ko = {
|
|
|
2116
2173
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
2117
2174
|
}, e.setFilterValue = (t) => {
|
|
2118
2175
|
n.setColumnFilters((o) => {
|
|
2119
|
-
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((c) => c.id === e.id), s =
|
|
2120
|
-
if (
|
|
2176
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((c) => c.id === e.id), s = Z(t, i ? i.value : void 0);
|
|
2177
|
+
if (Tt(r, s, e)) {
|
|
2121
2178
|
var a;
|
|
2122
2179
|
return (a = o == null ? void 0 : o.filter((c) => c.id !== e.id)) != null ? a : [];
|
|
2123
2180
|
}
|
|
@@ -2140,11 +2197,11 @@ const Ko = {
|
|
|
2140
2197
|
e.setColumnFilters = (n) => {
|
|
2141
2198
|
const t = e.getAllLeafColumns(), o = (r) => {
|
|
2142
2199
|
var i;
|
|
2143
|
-
return (i =
|
|
2200
|
+
return (i = Z(n, r)) == null ? void 0 : i.filter((s) => {
|
|
2144
2201
|
const a = t.find((u) => u.id === s.id);
|
|
2145
2202
|
if (a) {
|
|
2146
2203
|
const u = a.getFilterFn();
|
|
2147
|
-
if (
|
|
2204
|
+
if (Tt(u, s.value, a))
|
|
2148
2205
|
return !1;
|
|
2149
2206
|
}
|
|
2150
2207
|
return !0;
|
|
@@ -2157,7 +2214,7 @@ const Ko = {
|
|
|
2157
2214
|
}, 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());
|
|
2158
2215
|
}
|
|
2159
2216
|
};
|
|
2160
|
-
function
|
|
2217
|
+
function Tt(e, n, t) {
|
|
2161
2218
|
return (e && e.autoRemove ? e.autoRemove(n, t) : !1) || typeof n > "u" || typeof n == "string" && !n;
|
|
2162
2219
|
}
|
|
2163
2220
|
const Yo = (e, n, t) => t.reduce((o, r) => {
|
|
@@ -2220,7 +2277,7 @@ const Yo = (e, n, t) => t.reduce((o, r) => {
|
|
|
2220
2277
|
...e
|
|
2221
2278
|
}),
|
|
2222
2279
|
getDefaultOptions: (e) => ({
|
|
2223
|
-
onGroupingChange:
|
|
2280
|
+
onGroupingChange: G("grouping", e),
|
|
2224
2281
|
groupedColumnMode: "reorder"
|
|
2225
2282
|
}),
|
|
2226
2283
|
createColumn: (e, n) => {
|
|
@@ -2250,7 +2307,7 @@ const Yo = (e, n, t) => t.reduce((o, r) => {
|
|
|
2250
2307
|
var t, o;
|
|
2251
2308
|
if (!e)
|
|
2252
2309
|
throw new Error();
|
|
2253
|
-
return
|
|
2310
|
+
return be(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];
|
|
2254
2311
|
};
|
|
2255
2312
|
},
|
|
2256
2313
|
createTable: (e) => {
|
|
@@ -2286,15 +2343,15 @@ const ir = {
|
|
|
2286
2343
|
...e
|
|
2287
2344
|
}),
|
|
2288
2345
|
getDefaultOptions: (e) => ({
|
|
2289
|
-
onColumnOrderChange:
|
|
2346
|
+
onColumnOrderChange: G("columnOrder", e)
|
|
2290
2347
|
}),
|
|
2291
2348
|
createColumn: (e, n) => {
|
|
2292
|
-
e.getIndex =
|
|
2349
|
+
e.getIndex = w((t) => [ve(n, t)], (t) => t.findIndex((o) => o.id === e.id), x(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
2293
2350
|
var o;
|
|
2294
|
-
return ((o =
|
|
2351
|
+
return ((o = ve(n, t)[0]) == null ? void 0 : o.id) === e.id;
|
|
2295
2352
|
}, e.getIsLastColumn = (t) => {
|
|
2296
2353
|
var o;
|
|
2297
|
-
const r =
|
|
2354
|
+
const r = ve(n, t);
|
|
2298
2355
|
return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
|
|
2299
2356
|
};
|
|
2300
2357
|
},
|
|
@@ -2302,7 +2359,7 @@ const ir = {
|
|
|
2302
2359
|
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
2303
2360
|
var t;
|
|
2304
2361
|
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
2305
|
-
}, e._getOrderColumnsFn =
|
|
2362
|
+
}, e._getOrderColumnsFn = w(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
|
|
2306
2363
|
let i = [];
|
|
2307
2364
|
if (!(n != null && n.length))
|
|
2308
2365
|
i = r;
|
|
@@ -2315,7 +2372,7 @@ const ir = {
|
|
|
2315
2372
|
i = [...i, ...a];
|
|
2316
2373
|
}
|
|
2317
2374
|
return rr(i, t, o);
|
|
2318
|
-
},
|
|
2375
|
+
}, x(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
2319
2376
|
}
|
|
2320
2377
|
}, ze = () => ({
|
|
2321
2378
|
left: [],
|
|
@@ -2326,7 +2383,7 @@ const ir = {
|
|
|
2326
2383
|
...e
|
|
2327
2384
|
}),
|
|
2328
2385
|
getDefaultOptions: (e) => ({
|
|
2329
|
-
onColumnPinningChange:
|
|
2386
|
+
onColumnPinningChange: G("columnPinning", e)
|
|
2330
2387
|
}),
|
|
2331
2388
|
createColumn: (e, n) => {
|
|
2332
2389
|
e.pin = (t) => {
|
|
@@ -2336,20 +2393,20 @@ const ir = {
|
|
|
2336
2393
|
if (t === "right") {
|
|
2337
2394
|
var a, u;
|
|
2338
2395
|
return {
|
|
2339
|
-
left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((
|
|
2340
|
-
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((
|
|
2396
|
+
left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((h) => !(o != null && o.includes(h))),
|
|
2397
|
+
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((h) => !(o != null && o.includes(h))), ...o]
|
|
2341
2398
|
};
|
|
2342
2399
|
}
|
|
2343
2400
|
if (t === "left") {
|
|
2344
2401
|
var g, c;
|
|
2345
2402
|
return {
|
|
2346
|
-
left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((
|
|
2347
|
-
right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((
|
|
2403
|
+
left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((h) => !(o != null && o.includes(h))), ...o],
|
|
2404
|
+
right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((h) => !(o != null && o.includes(h)))
|
|
2348
2405
|
};
|
|
2349
2406
|
}
|
|
2350
2407
|
return {
|
|
2351
|
-
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((
|
|
2352
|
-
right: ((s = r == null ? void 0 : r.right) != null ? s : []).filter((
|
|
2408
|
+
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((h) => !(o != null && o.includes(h))),
|
|
2409
|
+
right: ((s = r == null ? void 0 : r.right) != null ? s : []).filter((h) => !(o != null && o.includes(h)))
|
|
2353
2410
|
};
|
|
2354
2411
|
});
|
|
2355
2412
|
}, e.getCanPin = () => e.getLeafColumns().some((o) => {
|
|
@@ -2368,16 +2425,16 @@ const ir = {
|
|
|
2368
2425
|
};
|
|
2369
2426
|
},
|
|
2370
2427
|
createRow: (e, n) => {
|
|
2371
|
-
e.getCenterVisibleCells =
|
|
2428
|
+
e.getCenterVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
|
|
2372
2429
|
const i = [...o ?? [], ...r ?? []];
|
|
2373
2430
|
return t.filter((s) => !i.includes(s.column.id));
|
|
2374
|
-
},
|
|
2431
|
+
}, x(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
|
|
2375
2432
|
...i,
|
|
2376
2433
|
position: "left"
|
|
2377
|
-
})),
|
|
2434
|
+
})), x(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
|
|
2378
2435
|
...i,
|
|
2379
2436
|
position: "right"
|
|
2380
|
-
})),
|
|
2437
|
+
})), x(n.options, "debugRows", "getRightVisibleCells"));
|
|
2381
2438
|
},
|
|
2382
2439
|
createTable: (e) => {
|
|
2383
2440
|
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
@@ -2391,10 +2448,10 @@ const ir = {
|
|
|
2391
2448
|
return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
|
|
2392
2449
|
}
|
|
2393
2450
|
return !!((t = o[n]) != null && t.length);
|
|
2394
|
-
}, e.getLeftLeafColumns =
|
|
2451
|
+
}, e.getLeftLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
|
|
2395
2452
|
const r = [...t ?? [], ...o ?? []];
|
|
2396
2453
|
return n.filter((i) => !r.includes(i.id));
|
|
2397
|
-
},
|
|
2454
|
+
}, x(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
2398
2455
|
}
|
|
2399
2456
|
};
|
|
2400
2457
|
function lr(e) {
|
|
@@ -2421,15 +2478,15 @@ const Pe = {
|
|
|
2421
2478
|
getDefaultOptions: (e) => ({
|
|
2422
2479
|
columnResizeMode: "onEnd",
|
|
2423
2480
|
columnResizeDirection: "ltr",
|
|
2424
|
-
onColumnSizingChange:
|
|
2425
|
-
onColumnSizingInfoChange:
|
|
2481
|
+
onColumnSizingChange: G("columnSizing", e),
|
|
2482
|
+
onColumnSizingInfoChange: G("columnSizingInfo", e)
|
|
2426
2483
|
}),
|
|
2427
2484
|
createColumn: (e, n) => {
|
|
2428
2485
|
e.getSize = () => {
|
|
2429
2486
|
var t, o, r;
|
|
2430
2487
|
const i = n.getState().columnSizing[e.id];
|
|
2431
2488
|
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 =
|
|
2489
|
+
}, e.getStart = w((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getStart")), e.getAfter = w((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
2433
2490
|
n.setColumnSizing((t) => {
|
|
2434
2491
|
let {
|
|
2435
2492
|
[e.id]: o,
|
|
@@ -2465,25 +2522,25 @@ const Pe = {
|
|
|
2465
2522
|
return (i) => {
|
|
2466
2523
|
if (!o || !r || (i.persist == null || i.persist(), He(i) && i.touches && i.touches.length > 1))
|
|
2467
2524
|
return;
|
|
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,
|
|
2469
|
-
typeof
|
|
2470
|
-
var
|
|
2471
|
-
const
|
|
2472
|
-
return
|
|
2473
|
-
let [Ve, xe] =
|
|
2474
|
-
g[Ve] = Math.round(Math.max(xe + xe *
|
|
2525
|
+
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, _) => {
|
|
2526
|
+
typeof _ == "number" && (n.setColumnSizingInfo((R) => {
|
|
2527
|
+
var j, A;
|
|
2528
|
+
const I = n.options.columnResizeDirection === "rtl" ? -1 : 1, V = (_ - ((j = R == null ? void 0 : R.startOffset) != null ? j : 0)) * I, H = Math.max(V / ((A = R == null ? void 0 : R.startSize) != null ? A : 0), -0.999999);
|
|
2529
|
+
return R.columnSizingStart.forEach((ge) => {
|
|
2530
|
+
let [Ve, xe] = ge;
|
|
2531
|
+
g[Ve] = Math.round(Math.max(xe + xe * H, 0) * 100) / 100;
|
|
2475
2532
|
}), {
|
|
2476
|
-
...
|
|
2477
|
-
deltaOffset:
|
|
2478
|
-
deltaPercentage:
|
|
2533
|
+
...R,
|
|
2534
|
+
deltaOffset: V,
|
|
2535
|
+
deltaPercentage: H
|
|
2479
2536
|
};
|
|
2480
|
-
}), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((
|
|
2481
|
-
...
|
|
2537
|
+
}), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((R) => ({
|
|
2538
|
+
...R,
|
|
2482
2539
|
...g
|
|
2483
2540
|
})));
|
|
2484
|
-
},
|
|
2485
|
-
c("end", v), n.setColumnSizingInfo((
|
|
2486
|
-
...
|
|
2541
|
+
}, h = (v) => c("move", v), f = (v) => {
|
|
2542
|
+
c("end", v), n.setColumnSizingInfo((_) => ({
|
|
2543
|
+
..._,
|
|
2487
2544
|
isResizingColumn: !1,
|
|
2488
2545
|
startOffset: null,
|
|
2489
2546
|
startSize: null,
|
|
@@ -2492,15 +2549,15 @@ const Pe = {
|
|
|
2492
2549
|
columnSizingStart: []
|
|
2493
2550
|
}));
|
|
2494
2551
|
}, d = lr(t), p = {
|
|
2495
|
-
moveHandler: (v) =>
|
|
2552
|
+
moveHandler: (v) => h(v.clientX),
|
|
2496
2553
|
upHandler: (v) => {
|
|
2497
2554
|
d == null || d.removeEventListener("mousemove", p.moveHandler), d == null || d.removeEventListener("mouseup", p.upHandler), f(v.clientX);
|
|
2498
2555
|
}
|
|
2499
2556
|
}, m = {
|
|
2500
|
-
moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()),
|
|
2557
|
+
moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()), h(v.touches[0].clientX), !1),
|
|
2501
2558
|
upHandler: (v) => {
|
|
2502
|
-
var
|
|
2503
|
-
d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), v.cancelable && (v.preventDefault(), v.stopPropagation()), f((
|
|
2559
|
+
var _;
|
|
2560
|
+
d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), v.cancelable && (v.preventDefault(), v.stopPropagation()), f((_ = v.touches[0]) == null ? void 0 : _.clientX);
|
|
2504
2561
|
}
|
|
2505
2562
|
}, C = ur() ? {
|
|
2506
2563
|
passive: !1
|
|
@@ -2565,7 +2622,7 @@ const dr = {
|
|
|
2565
2622
|
...e
|
|
2566
2623
|
}),
|
|
2567
2624
|
getDefaultOptions: (e) => ({
|
|
2568
|
-
onColumnVisibilityChange:
|
|
2625
|
+
onColumnVisibilityChange: G("columnVisibility", e)
|
|
2569
2626
|
}),
|
|
2570
2627
|
createColumn: (e, n) => {
|
|
2571
2628
|
e.toggleVisibility = (t) => {
|
|
@@ -2585,10 +2642,10 @@ const dr = {
|
|
|
2585
2642
|
};
|
|
2586
2643
|
},
|
|
2587
2644
|
createRow: (e, n) => {
|
|
2588
|
-
e._getAllVisibleCells =
|
|
2645
|
+
e._getAllVisibleCells = w(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), x(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = w(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], x(n.options, "debugRows", "getVisibleCells"));
|
|
2589
2646
|
},
|
|
2590
2647
|
createTable: (e) => {
|
|
2591
|
-
const n = (t, o) =>
|
|
2648
|
+
const n = (t, o) => w(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), x(e.options, "debugColumns", t));
|
|
2592
2649
|
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) => {
|
|
2593
2650
|
var o;
|
|
2594
2651
|
e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
|
|
@@ -2604,7 +2661,7 @@ const dr = {
|
|
|
2604
2661
|
};
|
|
2605
2662
|
}
|
|
2606
2663
|
};
|
|
2607
|
-
function
|
|
2664
|
+
function ve(e, n) {
|
|
2608
2665
|
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
2609
2666
|
}
|
|
2610
2667
|
const gr = {
|
|
@@ -2620,7 +2677,7 @@ const gr = {
|
|
|
2620
2677
|
...e
|
|
2621
2678
|
}),
|
|
2622
2679
|
getDefaultOptions: (e) => ({
|
|
2623
|
-
onGlobalFilterChange:
|
|
2680
|
+
onGlobalFilterChange: G("globalFilter", e),
|
|
2624
2681
|
globalFilterFn: "auto",
|
|
2625
2682
|
getColumnCanGlobalFilter: (n) => {
|
|
2626
2683
|
var t;
|
|
@@ -2635,12 +2692,12 @@ const gr = {
|
|
|
2635
2692
|
};
|
|
2636
2693
|
},
|
|
2637
2694
|
createTable: (e) => {
|
|
2638
|
-
e.getGlobalAutoFilterFn = () =>
|
|
2695
|
+
e.getGlobalAutoFilterFn = () => X.includesString, e.getGlobalFilterFn = () => {
|
|
2639
2696
|
var n, t;
|
|
2640
2697
|
const {
|
|
2641
2698
|
globalFilterFn: o
|
|
2642
2699
|
} = e.options;
|
|
2643
|
-
return
|
|
2700
|
+
return be(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : X[o];
|
|
2644
2701
|
}, e.setGlobalFilter = (n) => {
|
|
2645
2702
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
|
|
2646
2703
|
}, e.resetGlobalFilter = (n) => {
|
|
@@ -2653,7 +2710,7 @@ const gr = {
|
|
|
2653
2710
|
...e
|
|
2654
2711
|
}),
|
|
2655
2712
|
getDefaultOptions: (e) => ({
|
|
2656
|
-
onExpandedChange:
|
|
2713
|
+
onExpandedChange: G("expanded", e),
|
|
2657
2714
|
paginateExpandedRows: !0
|
|
2658
2715
|
}),
|
|
2659
2716
|
createTable: (e) => {
|
|
@@ -2746,7 +2803,7 @@ const gr = {
|
|
|
2746
2803
|
}
|
|
2747
2804
|
}),
|
|
2748
2805
|
getDefaultOptions: (e) => ({
|
|
2749
|
-
onPaginationChange:
|
|
2806
|
+
onPaginationChange: G("pagination", e)
|
|
2750
2807
|
}),
|
|
2751
2808
|
createTable: (e) => {
|
|
2752
2809
|
let n = !1, t = !1;
|
|
@@ -2765,14 +2822,14 @@ const gr = {
|
|
|
2765
2822
|
});
|
|
2766
2823
|
}
|
|
2767
2824
|
}, e.setPagination = (o) => {
|
|
2768
|
-
const r = (i) =>
|
|
2825
|
+
const r = (i) => Z(o, i);
|
|
2769
2826
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
2770
2827
|
}, e.resetPagination = (o) => {
|
|
2771
2828
|
var r;
|
|
2772
2829
|
e.setPagination(o ? qe() : (r = e.initialState.pagination) != null ? r : qe());
|
|
2773
2830
|
}, e.setPageIndex = (o) => {
|
|
2774
2831
|
e.setPagination((r) => {
|
|
2775
|
-
let i =
|
|
2832
|
+
let i = Z(o, r.pageIndex);
|
|
2776
2833
|
const s = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
2777
2834
|
return i = Math.max(0, Math.min(i, s)), {
|
|
2778
2835
|
...r,
|
|
@@ -2787,7 +2844,7 @@ const gr = {
|
|
|
2787
2844
|
e.setPageSize(o ? Ze : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Ze);
|
|
2788
2845
|
}, e.setPageSize = (o) => {
|
|
2789
2846
|
e.setPagination((r) => {
|
|
2790
|
-
const i = Math.max(1,
|
|
2847
|
+
const i = Math.max(1, Z(o, r.pageSize)), s = r.pageSize * r.pageIndex, a = Math.floor(s / i);
|
|
2791
2848
|
return {
|
|
2792
2849
|
...r,
|
|
2793
2850
|
pageIndex: a,
|
|
@@ -2796,15 +2853,15 @@ const gr = {
|
|
|
2796
2853
|
});
|
|
2797
2854
|
}, e.setPageCount = (o) => e.setPagination((r) => {
|
|
2798
2855
|
var i;
|
|
2799
|
-
let s =
|
|
2856
|
+
let s = Z(o, (i = e.options.pageCount) != null ? i : -1);
|
|
2800
2857
|
return typeof s == "number" && (s = Math.max(-1, s)), {
|
|
2801
2858
|
...r,
|
|
2802
2859
|
pageCount: s
|
|
2803
2860
|
};
|
|
2804
|
-
}), e.getPageOptions =
|
|
2861
|
+
}), e.getPageOptions = w(() => [e.getPageCount()], (o) => {
|
|
2805
2862
|
let r = [];
|
|
2806
2863
|
return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, s) => s)), r;
|
|
2807
|
-
},
|
|
2864
|
+
}, x(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
2808
2865
|
const {
|
|
2809
2866
|
pageIndex: o
|
|
2810
2867
|
} = e.getState().pagination, r = e.getPageCount();
|
|
@@ -2826,7 +2883,7 @@ const gr = {
|
|
|
2826
2883
|
...e
|
|
2827
2884
|
}),
|
|
2828
2885
|
getDefaultOptions: (e) => ({
|
|
2829
|
-
onRowPinningChange:
|
|
2886
|
+
onRowPinningChange: G("rowPinning", e)
|
|
2830
2887
|
}),
|
|
2831
2888
|
createRow: (e, n) => {
|
|
2832
2889
|
e.pin = (t, o, r) => {
|
|
@@ -2844,9 +2901,9 @@ const gr = {
|
|
|
2844
2901
|
n.setRowPinning((u) => {
|
|
2845
2902
|
var g, c;
|
|
2846
2903
|
if (t === "bottom") {
|
|
2847
|
-
var
|
|
2904
|
+
var h, f;
|
|
2848
2905
|
return {
|
|
2849
|
-
top: ((
|
|
2906
|
+
top: ((h = u == null ? void 0 : u.top) != null ? h : []).filter((m) => !(a != null && a.has(m))),
|
|
2850
2907
|
bottom: [...((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((m) => !(a != null && a.has(m))), ...Array.from(a)]
|
|
2851
2908
|
};
|
|
2852
2909
|
}
|
|
@@ -2916,10 +2973,10 @@ const gr = {
|
|
|
2916
2973
|
...s,
|
|
2917
2974
|
position: o
|
|
2918
2975
|
}));
|
|
2919
|
-
}, e.getTopRows =
|
|
2976
|
+
}, e.getTopRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), x(e.options, "debugRows", "getTopRows")), e.getBottomRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), x(e.options, "debugRows", "getBottomRows")), e.getCenterRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
|
|
2920
2977
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
|
|
2921
2978
|
return n.filter((i) => !r.has(i.id));
|
|
2922
|
-
},
|
|
2979
|
+
}, x(e.options, "debugRows", "getCenterRows"));
|
|
2923
2980
|
}
|
|
2924
2981
|
}, hr = {
|
|
2925
2982
|
getInitialState: (e) => ({
|
|
@@ -2927,7 +2984,7 @@ const gr = {
|
|
|
2927
2984
|
...e
|
|
2928
2985
|
}),
|
|
2929
2986
|
getDefaultOptions: (e) => ({
|
|
2930
|
-
onRowSelectionChange:
|
|
2987
|
+
onRowSelectionChange: G("rowSelection", e),
|
|
2931
2988
|
enableRowSelection: !0,
|
|
2932
2989
|
enableMultiRowSelection: !0,
|
|
2933
2990
|
enableSubRowSelection: !0
|
|
@@ -2958,19 +3015,19 @@ const gr = {
|
|
|
2958
3015
|
return e.getRowModel().rows.forEach((i) => {
|
|
2959
3016
|
et(r, i.id, o, !0, e);
|
|
2960
3017
|
}), r;
|
|
2961
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
3018
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = w(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
2962
3019
|
rows: [],
|
|
2963
3020
|
flatRows: [],
|
|
2964
3021
|
rowsById: {}
|
|
2965
|
-
},
|
|
3022
|
+
}, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = w(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
2966
3023
|
rows: [],
|
|
2967
3024
|
flatRows: [],
|
|
2968
3025
|
rowsById: {}
|
|
2969
|
-
},
|
|
3026
|
+
}, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = w(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
|
|
2970
3027
|
rows: [],
|
|
2971
3028
|
flatRows: [],
|
|
2972
3029
|
rowsById: {}
|
|
2973
|
-
},
|
|
3030
|
+
}, x(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
2974
3031
|
const n = e.getFilteredRowModel().flatRows, {
|
|
2975
3032
|
rowSelection: t
|
|
2976
3033
|
} = e.getState();
|
|
@@ -3077,17 +3134,17 @@ function tt(e, n, t) {
|
|
|
3077
3134
|
}
|
|
3078
3135
|
}), r ? "all" : i ? "some" : !1;
|
|
3079
3136
|
}
|
|
3080
|
-
const nt = /([0-9]+)/gm, Sr = (e, n, t) =>
|
|
3137
|
+
const nt = /([0-9]+)/gm, Sr = (e, n, t) => hn(ee(e.getValue(t)).toLowerCase(), ee(n.getValue(t)).toLowerCase()), vr = (e, n, t) => hn(ee(e.getValue(t)), ee(n.getValue(t))), Cr = (e, n, t) => ft(ee(e.getValue(t)).toLowerCase(), ee(n.getValue(t)).toLowerCase()), wr = (e, n, t) => ft(ee(e.getValue(t)), ee(n.getValue(t))), xr = (e, n, t) => {
|
|
3081
3138
|
const o = e.getValue(t), r = n.getValue(t);
|
|
3082
3139
|
return o > r ? 1 : o < r ? -1 : 0;
|
|
3083
3140
|
}, Rr = (e, n, t) => ft(e.getValue(t), n.getValue(t));
|
|
3084
3141
|
function ft(e, n) {
|
|
3085
3142
|
return e === n ? 0 : e > n ? 1 : -1;
|
|
3086
3143
|
}
|
|
3087
|
-
function
|
|
3144
|
+
function ee(e) {
|
|
3088
3145
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
3089
3146
|
}
|
|
3090
|
-
function
|
|
3147
|
+
function hn(e, n) {
|
|
3091
3148
|
const t = e.split(nt).filter(Boolean), o = n.split(nt).filter(Boolean);
|
|
3092
3149
|
for (; t.length && o.length; ) {
|
|
3093
3150
|
const r = t.shift(), i = o.shift(), s = parseInt(r, 10), a = parseInt(i, 10), u = [s, a].sort();
|
|
@@ -3107,7 +3164,7 @@ function mn(e, n) {
|
|
|
3107
3164
|
}
|
|
3108
3165
|
return t.length - o.length;
|
|
3109
3166
|
}
|
|
3110
|
-
const
|
|
3167
|
+
const me = {
|
|
3111
3168
|
alphanumeric: Sr,
|
|
3112
3169
|
alphanumericCaseSensitive: vr,
|
|
3113
3170
|
text: Cr,
|
|
@@ -3124,7 +3181,7 @@ const fe = {
|
|
|
3124
3181
|
sortUndefined: 1
|
|
3125
3182
|
}),
|
|
3126
3183
|
getDefaultOptions: (e) => ({
|
|
3127
|
-
onSortingChange:
|
|
3184
|
+
onSortingChange: G("sorting", e),
|
|
3128
3185
|
isMultiSortEvent: (n) => n.shiftKey
|
|
3129
3186
|
}),
|
|
3130
3187
|
createColumn: (e, n) => {
|
|
@@ -3134,11 +3191,11 @@ const fe = {
|
|
|
3134
3191
|
for (const r of t) {
|
|
3135
3192
|
const i = r == null ? void 0 : r.getValue(e.id);
|
|
3136
3193
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
|
3137
|
-
return
|
|
3194
|
+
return me.datetime;
|
|
3138
3195
|
if (typeof i == "string" && (o = !0, i.split(nt).length > 1))
|
|
3139
|
-
return
|
|
3196
|
+
return me.alphanumeric;
|
|
3140
3197
|
}
|
|
3141
|
-
return o ?
|
|
3198
|
+
return o ? me.text : me.basic;
|
|
3142
3199
|
}, e.getAutoSortDir = () => {
|
|
3143
3200
|
const t = n.getFilteredRowModel().flatRows[0];
|
|
3144
3201
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -3146,24 +3203,24 @@ const fe = {
|
|
|
3146
3203
|
var t, o;
|
|
3147
3204
|
if (!e)
|
|
3148
3205
|
throw new Error();
|
|
3149
|
-
return
|
|
3206
|
+
return be(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 : me[e.columnDef.sortingFn];
|
|
3150
3207
|
}, e.toggleSorting = (t, o) => {
|
|
3151
3208
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
3152
3209
|
n.setSorting((s) => {
|
|
3153
3210
|
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);
|
|
3154
|
-
let g = [], c,
|
|
3211
|
+
let g = [], c, h = i ? t : r === "desc";
|
|
3155
3212
|
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
3213
|
var f;
|
|
3157
3214
|
g = [...s, {
|
|
3158
3215
|
id: e.id,
|
|
3159
|
-
desc:
|
|
3216
|
+
desc: h
|
|
3160
3217
|
}], g.splice(0, g.length - ((f = n.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
|
|
3161
3218
|
} else c === "toggle" ? g = s.map((d) => d.id === e.id ? {
|
|
3162
3219
|
...d,
|
|
3163
|
-
desc:
|
|
3220
|
+
desc: h
|
|
3164
3221
|
} : d) : c === "remove" ? g = s.filter((d) => d.id !== e.id) : g = [{
|
|
3165
3222
|
id: e.id,
|
|
3166
|
-
desc:
|
|
3223
|
+
desc: h
|
|
3167
3224
|
}];
|
|
3168
3225
|
return g;
|
|
3169
3226
|
});
|
|
@@ -3203,7 +3260,7 @@ const fe = {
|
|
|
3203
3260
|
e.setSorting(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.sorting) != null ? t : []);
|
|
3204
3261
|
}, 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());
|
|
3205
3262
|
}
|
|
3206
|
-
},
|
|
3263
|
+
}, _r = [
|
|
3207
3264
|
qo,
|
|
3208
3265
|
dr,
|
|
3209
3266
|
ir,
|
|
@@ -3223,10 +3280,10 @@ const fe = {
|
|
|
3223
3280
|
hr,
|
|
3224
3281
|
ar
|
|
3225
3282
|
];
|
|
3226
|
-
function
|
|
3283
|
+
function jr(e) {
|
|
3227
3284
|
var n, t;
|
|
3228
3285
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
3229
|
-
const o = [...
|
|
3286
|
+
const o = [..._r, ...(n = e._features) != null ? n : []];
|
|
3230
3287
|
let r = {
|
|
3231
3288
|
_features: o
|
|
3232
3289
|
};
|
|
@@ -3244,7 +3301,7 @@ function _r(e) {
|
|
|
3244
3301
|
});
|
|
3245
3302
|
const g = [];
|
|
3246
3303
|
let c = !1;
|
|
3247
|
-
const
|
|
3304
|
+
const h = {
|
|
3248
3305
|
_features: o,
|
|
3249
3306
|
options: {
|
|
3250
3307
|
...i,
|
|
@@ -3264,7 +3321,7 @@ function _r(e) {
|
|
|
3264
3321
|
r.setState(r.initialState);
|
|
3265
3322
|
},
|
|
3266
3323
|
setOptions: (f) => {
|
|
3267
|
-
const d =
|
|
3324
|
+
const d = Z(f, r.options);
|
|
3268
3325
|
r.options = s(d);
|
|
3269
3326
|
},
|
|
3270
3327
|
getState: () => r.options.state,
|
|
@@ -3286,7 +3343,7 @@ function _r(e) {
|
|
|
3286
3343
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
|
|
3287
3344
|
return p;
|
|
3288
3345
|
},
|
|
3289
|
-
_getDefaultColumnDef:
|
|
3346
|
+
_getDefaultColumnDef: w(() => [r.options.defaultColumn], (f) => {
|
|
3290
3347
|
var d;
|
|
3291
3348
|
return f = (d = f) != null ? d : {}, {
|
|
3292
3349
|
header: (p) => {
|
|
@@ -3301,37 +3358,37 @@ function _r(e) {
|
|
|
3301
3358
|
...r._features.reduce((p, m) => Object.assign(p, m.getDefaultColumnDef == null ? void 0 : m.getDefaultColumnDef()), {}),
|
|
3302
3359
|
...f
|
|
3303
3360
|
};
|
|
3304
|
-
},
|
|
3361
|
+
}, x(e, "debugColumns", "_getDefaultColumnDef")),
|
|
3305
3362
|
_getColumnDefs: () => r.options.columns,
|
|
3306
|
-
getAllColumns:
|
|
3363
|
+
getAllColumns: w(() => [r._getColumnDefs()], (f) => {
|
|
3307
3364
|
const d = function(p, m, C) {
|
|
3308
3365
|
return C === void 0 && (C = 0), p.map((v) => {
|
|
3309
|
-
const
|
|
3310
|
-
return
|
|
3366
|
+
const _ = Ho(r, v, C, m), R = v;
|
|
3367
|
+
return _.columns = R.columns ? d(R.columns, _, C + 1) : [], _;
|
|
3311
3368
|
});
|
|
3312
3369
|
};
|
|
3313
3370
|
return d(f);
|
|
3314
|
-
},
|
|
3315
|
-
getAllFlatColumns:
|
|
3316
|
-
_getAllFlatColumnsById:
|
|
3317
|
-
getAllLeafColumns:
|
|
3371
|
+
}, x(e, "debugColumns", "getAllColumns")),
|
|
3372
|
+
getAllFlatColumns: w(() => [r.getAllColumns()], (f) => f.flatMap((d) => d.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
|
|
3373
|
+
_getAllFlatColumnsById: w(() => [r.getAllFlatColumns()], (f) => f.reduce((d, p) => (d[p.id] = p, d), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
|
|
3374
|
+
getAllLeafColumns: w(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, d) => {
|
|
3318
3375
|
let p = f.flatMap((m) => m.getLeafColumns());
|
|
3319
3376
|
return d(p);
|
|
3320
|
-
},
|
|
3377
|
+
}, x(e, "debugColumns", "getAllLeafColumns")),
|
|
3321
3378
|
getColumn: (f) => {
|
|
3322
3379
|
const d = r._getAllFlatColumnsById()[f];
|
|
3323
3380
|
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${f}' does not exist.`), d;
|
|
3324
3381
|
}
|
|
3325
3382
|
};
|
|
3326
|
-
Object.assign(r,
|
|
3383
|
+
Object.assign(r, h);
|
|
3327
3384
|
for (let f = 0; f < r._features.length; f++) {
|
|
3328
3385
|
const d = r._features[f];
|
|
3329
3386
|
d == null || d.createTable == null || d.createTable(r);
|
|
3330
3387
|
}
|
|
3331
3388
|
return r;
|
|
3332
3389
|
}
|
|
3333
|
-
function
|
|
3334
|
-
return (e) =>
|
|
3390
|
+
function Sn() {
|
|
3391
|
+
return (e) => w(() => [e.options.data], (n) => {
|
|
3335
3392
|
const t = {
|
|
3336
3393
|
rows: [],
|
|
3337
3394
|
flatRows: [],
|
|
@@ -3349,7 +3406,7 @@ function hn() {
|
|
|
3349
3406
|
return a;
|
|
3350
3407
|
};
|
|
3351
3408
|
return t.rows = o(n), t;
|
|
3352
|
-
},
|
|
3409
|
+
}, x(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
3353
3410
|
}
|
|
3354
3411
|
function Fr(e) {
|
|
3355
3412
|
const n = [], t = (o) => {
|
|
@@ -3363,7 +3420,7 @@ function Fr(e) {
|
|
|
3363
3420
|
};
|
|
3364
3421
|
}
|
|
3365
3422
|
function Ir(e) {
|
|
3366
|
-
return (n) =>
|
|
3423
|
+
return (n) => w(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
|
|
3367
3424
|
if (!o.rows.length)
|
|
3368
3425
|
return o;
|
|
3369
3426
|
const {
|
|
@@ -3377,21 +3434,21 @@ function Ir(e) {
|
|
|
3377
3434
|
} = o;
|
|
3378
3435
|
const g = r * i, c = g + r;
|
|
3379
3436
|
s = s.slice(g, c);
|
|
3380
|
-
let
|
|
3381
|
-
n.options.paginateExpandedRows ?
|
|
3437
|
+
let h;
|
|
3438
|
+
n.options.paginateExpandedRows ? h = {
|
|
3382
3439
|
rows: s,
|
|
3383
3440
|
flatRows: a,
|
|
3384
3441
|
rowsById: u
|
|
3385
|
-
} :
|
|
3442
|
+
} : h = Fr({
|
|
3386
3443
|
rows: s,
|
|
3387
3444
|
flatRows: a,
|
|
3388
3445
|
rowsById: u
|
|
3389
|
-
}),
|
|
3446
|
+
}), h.flatRows = [];
|
|
3390
3447
|
const f = (d) => {
|
|
3391
|
-
|
|
3448
|
+
h.flatRows.push(d), d.subRows.length && d.subRows.forEach(f);
|
|
3392
3449
|
};
|
|
3393
|
-
return
|
|
3394
|
-
},
|
|
3450
|
+
return h.rows.forEach(f), h;
|
|
3451
|
+
}, x(n.options, "debugTable", "getPaginationRowModel"));
|
|
3395
3452
|
}
|
|
3396
3453
|
/**
|
|
3397
3454
|
* react-table
|
|
@@ -3418,7 +3475,7 @@ function Er(e) {
|
|
|
3418
3475
|
function $r(e) {
|
|
3419
3476
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
3420
3477
|
}
|
|
3421
|
-
function
|
|
3478
|
+
function vn(e) {
|
|
3422
3479
|
const n = {
|
|
3423
3480
|
state: {},
|
|
3424
3481
|
// Dummy state
|
|
@@ -3428,7 +3485,7 @@ function Sn(e) {
|
|
|
3428
3485
|
renderFallbackValue: null,
|
|
3429
3486
|
...e
|
|
3430
3487
|
}, [t] = Ye.useState(() => ({
|
|
3431
|
-
current:
|
|
3488
|
+
current: jr(n)
|
|
3432
3489
|
})), [o, r] = Ye.useState(() => t.current.initialState);
|
|
3433
3490
|
return t.current.setOptions((i) => ({
|
|
3434
3491
|
...i,
|
|
@@ -3444,26 +3501,26 @@ function Sn(e) {
|
|
|
3444
3501
|
}
|
|
3445
3502
|
})), t.current;
|
|
3446
3503
|
}
|
|
3447
|
-
const
|
|
3504
|
+
const Cn = ({
|
|
3448
3505
|
actions: e,
|
|
3449
3506
|
reloadData: n,
|
|
3450
3507
|
selectedRowKeys: t,
|
|
3451
3508
|
size: o = "xs"
|
|
3452
|
-
}) => /* @__PURE__ */ l.jsxs(
|
|
3509
|
+
}) => /* @__PURE__ */ l.jsxs(L, { gap: o, children: [
|
|
3453
3510
|
(e == null ? void 0 : e.add) && /* @__PURE__ */ l.jsx(
|
|
3454
|
-
|
|
3511
|
+
B,
|
|
3455
3512
|
{
|
|
3456
3513
|
variant: "light",
|
|
3457
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3514
|
+
leftSection: /* @__PURE__ */ l.jsx(Hn, { size: 16, stroke: 1.5 }),
|
|
3458
3515
|
size: o,
|
|
3459
3516
|
onClick: e.add,
|
|
3460
3517
|
children: "Add"
|
|
3461
3518
|
}
|
|
3462
3519
|
),
|
|
3463
3520
|
(e == null ? void 0 : e.edit) && /* @__PURE__ */ l.jsx(
|
|
3464
|
-
|
|
3521
|
+
B,
|
|
3465
3522
|
{
|
|
3466
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3523
|
+
leftSection: /* @__PURE__ */ l.jsx(qn, { size: 16, stroke: 1.5 }),
|
|
3467
3524
|
size: o,
|
|
3468
3525
|
variant: "light",
|
|
3469
3526
|
onClick: () => e.edit !== void 0 && e.edit(t[0]),
|
|
@@ -3472,9 +3529,9 @@ const vn = ({
|
|
|
3472
3529
|
}
|
|
3473
3530
|
),
|
|
3474
3531
|
(e == null ? void 0 : e.reload) && /* @__PURE__ */ l.jsx(
|
|
3475
|
-
|
|
3532
|
+
B,
|
|
3476
3533
|
{
|
|
3477
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3534
|
+
leftSection: /* @__PURE__ */ l.jsx(Bn, { size: 16, stroke: 1.5 }),
|
|
3478
3535
|
size: o,
|
|
3479
3536
|
onClick: n,
|
|
3480
3537
|
variant: "light",
|
|
@@ -3482,9 +3539,9 @@ const vn = ({
|
|
|
3482
3539
|
}
|
|
3483
3540
|
),
|
|
3484
3541
|
(e == null ? void 0 : e.import) && /* @__PURE__ */ l.jsx(
|
|
3485
|
-
|
|
3542
|
+
B,
|
|
3486
3543
|
{
|
|
3487
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3544
|
+
leftSection: /* @__PURE__ */ l.jsx(Un, { size: 16, stroke: 1.5 }),
|
|
3488
3545
|
size: o,
|
|
3489
3546
|
variant: "light",
|
|
3490
3547
|
onClick: e.import,
|
|
@@ -3492,38 +3549,38 @@ const vn = ({
|
|
|
3492
3549
|
}
|
|
3493
3550
|
),
|
|
3494
3551
|
(e == null ? void 0 : e.export) && /* @__PURE__ */ l.jsx(
|
|
3495
|
-
|
|
3552
|
+
B,
|
|
3496
3553
|
{
|
|
3497
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
3554
|
+
leftSection: /* @__PURE__ */ l.jsx(Kn, { size: 16, stroke: 1.5 }),
|
|
3498
3555
|
size: o,
|
|
3499
3556
|
variant: "light",
|
|
3500
3557
|
onClick: e.export,
|
|
3501
3558
|
children: "Export"
|
|
3502
3559
|
}
|
|
3503
3560
|
)
|
|
3504
|
-
] }),
|
|
3561
|
+
] }), wn = (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: Dr, Tr: Ke, Th: br, Tbody: Vr, Td: At } = Bt, xn = (e) => {
|
|
3505
3562
|
let n;
|
|
3506
|
-
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(Ke, { children: /* @__PURE__ */ l.jsx(
|
|
3507
|
-
/* @__PURE__ */ l.jsx(
|
|
3563
|
+
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(Ke, { children: /* @__PURE__ */ l.jsx(At, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(te, { justify: "center", align: "center", gap: "xs", children: [
|
|
3564
|
+
/* @__PURE__ */ l.jsx(Yn, { color: "var(--mantine-color-dimmed)" }),
|
|
3508
3565
|
/* @__PURE__ */ l.jsx(P, { c: "dimmed", fz: "sm", children: "No records found." })
|
|
3509
3566
|
] }) }) }, "empty-row") : n = e.table.getRowModel().rows.map((r) => /* @__PURE__ */ l.jsx(
|
|
3510
3567
|
Ke,
|
|
3511
3568
|
{
|
|
3512
3569
|
bg: e.selectedRowKeys[r.id] ? "var(--mantine-color-blue-light)" : void 0,
|
|
3513
|
-
children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(
|
|
3570
|
+
children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(At, { children: Nt(i.column.columnDef.cell, i.getContext()) }, i.id))
|
|
3514
3571
|
},
|
|
3515
3572
|
r.id
|
|
3516
3573
|
));
|
|
3517
3574
|
const t = /* @__PURE__ */ l.jsxs(
|
|
3518
|
-
|
|
3575
|
+
Bt,
|
|
3519
3576
|
{
|
|
3520
3577
|
striped: !0,
|
|
3521
3578
|
highlightOnHover: !0,
|
|
3522
3579
|
verticalSpacing: "xs",
|
|
3523
3580
|
tabularNums: !0,
|
|
3524
3581
|
children: [
|
|
3525
|
-
/* @__PURE__ */ l.jsx(
|
|
3526
|
-
|
|
3582
|
+
/* @__PURE__ */ l.jsx(Dr, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(Ke, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
|
|
3583
|
+
br,
|
|
3527
3584
|
{
|
|
3528
3585
|
w: i.id === Mr ? "1%" : void 0,
|
|
3529
3586
|
children: i.isPlaceholder ? null : Nt(
|
|
@@ -3539,10 +3596,10 @@ const vn = ({
|
|
|
3539
3596
|
);
|
|
3540
3597
|
if (!e.bordered) return t;
|
|
3541
3598
|
const o = {};
|
|
3542
|
-
return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(
|
|
3543
|
-
}, Tr = "_pageSizeSelectorActive_1wv6j_1",
|
|
3599
|
+
return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(oe, { withBorder: !0, p: 0, style: o, children: t });
|
|
3600
|
+
}, Tr = "_pageSizeSelectorActive_1wv6j_1", Nr = {
|
|
3544
3601
|
pageSizeSelectorActive: Tr
|
|
3545
|
-
},
|
|
3602
|
+
}, Rn = ({
|
|
3546
3603
|
total: e,
|
|
3547
3604
|
pageIndex: n,
|
|
3548
3605
|
pageSize: t,
|
|
@@ -3558,11 +3615,11 @@ const vn = ({
|
|
|
3558
3615
|
onChange: (s) => r(s - 1, t)
|
|
3559
3616
|
}
|
|
3560
3617
|
);
|
|
3561
|
-
return o ? /* @__PURE__ */ l.jsxs(
|
|
3618
|
+
return o ? /* @__PURE__ */ l.jsxs(L, { gap: "sm", children: [
|
|
3562
3619
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
3563
3620
|
/* @__PURE__ */ l.jsx(P, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
|
|
3564
3621
|
/* @__PURE__ */ l.jsx(
|
|
3565
|
-
|
|
3622
|
+
Ar,
|
|
3566
3623
|
{
|
|
3567
3624
|
size: "sm",
|
|
3568
3625
|
values: ["10", "20", "50", "100"],
|
|
@@ -3575,30 +3632,30 @@ const vn = ({
|
|
|
3575
3632
|
] }),
|
|
3576
3633
|
i
|
|
3577
3634
|
] }) : i;
|
|
3578
|
-
},
|
|
3579
|
-
xs:
|
|
3580
|
-
sm:
|
|
3581
|
-
md:
|
|
3582
|
-
lg:
|
|
3583
|
-
xl:
|
|
3635
|
+
}, kt = {
|
|
3636
|
+
xs: ce(22),
|
|
3637
|
+
sm: ce(26),
|
|
3638
|
+
md: ce(32),
|
|
3639
|
+
lg: ce(38),
|
|
3640
|
+
xl: ce(44)
|
|
3584
3641
|
};
|
|
3585
|
-
function
|
|
3642
|
+
function Ar({
|
|
3586
3643
|
size: e,
|
|
3587
3644
|
values: n,
|
|
3588
3645
|
value: t,
|
|
3589
3646
|
onChange: o
|
|
3590
3647
|
}) {
|
|
3591
|
-
return /* @__PURE__ */ l.jsxs(
|
|
3592
|
-
/* @__PURE__ */ l.jsx(
|
|
3593
|
-
|
|
3648
|
+
return /* @__PURE__ */ l.jsxs(le, { withinPortal: !0, withArrow: !0, offset: 2, children: [
|
|
3649
|
+
/* @__PURE__ */ l.jsx(kn, { children: /* @__PURE__ */ l.jsx(
|
|
3650
|
+
B,
|
|
3594
3651
|
{
|
|
3595
3652
|
size: e,
|
|
3596
3653
|
variant: "default",
|
|
3597
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
3654
|
+
rightSection: /* @__PURE__ */ l.jsx(Wn, { size: 16, stroke: 1.5 }),
|
|
3598
3655
|
style: [
|
|
3599
3656
|
{ fontWeight: "normal" },
|
|
3600
3657
|
(r) => ({
|
|
3601
|
-
height:
|
|
3658
|
+
height: kt[e],
|
|
3602
3659
|
paddingLeft: r.spacing[e],
|
|
3603
3660
|
paddingRight: r.spacing[e]
|
|
3604
3661
|
})
|
|
@@ -3611,14 +3668,14 @@ function Nr({
|
|
|
3611
3668
|
children: t
|
|
3612
3669
|
}
|
|
3613
3670
|
) }),
|
|
3614
|
-
/* @__PURE__ */ l.jsx(
|
|
3671
|
+
/* @__PURE__ */ l.jsx(Ln, { children: n.map((r) => {
|
|
3615
3672
|
const i = r === t;
|
|
3616
3673
|
return /* @__PURE__ */ l.jsx(
|
|
3617
|
-
|
|
3674
|
+
On,
|
|
3618
3675
|
{
|
|
3619
|
-
className: i ?
|
|
3676
|
+
className: i ? Nr.pageSizeSelectorActive : void 0,
|
|
3620
3677
|
style: [
|
|
3621
|
-
{ height:
|
|
3678
|
+
{ height: kt[e] }
|
|
3622
3679
|
// isCurrent
|
|
3623
3680
|
// ? {
|
|
3624
3681
|
// color: "var(--mantine-color-text)",
|
|
@@ -3636,35 +3693,35 @@ function Nr({
|
|
|
3636
3693
|
}) })
|
|
3637
3694
|
] });
|
|
3638
3695
|
}
|
|
3639
|
-
const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]),
|
|
3640
|
-
var v,
|
|
3696
|
+
const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
|
|
3697
|
+
var v, _;
|
|
3641
3698
|
const [n, t] = M({
|
|
3642
3699
|
records: [],
|
|
3643
3700
|
total: 0
|
|
3644
3701
|
}), [o, r] = M(!1), [i, s] = M(
|
|
3645
3702
|
{}
|
|
3646
|
-
), a = (
|
|
3647
|
-
r(!0), e.getData(
|
|
3648
|
-
t(
|
|
3703
|
+
), a = (R) => {
|
|
3704
|
+
r(!0), e.getData(R).then((j) => {
|
|
3705
|
+
t(j), r(!1);
|
|
3649
3706
|
});
|
|
3650
|
-
}, u = (
|
|
3651
|
-
const
|
|
3707
|
+
}, u = (R, j) => {
|
|
3708
|
+
const A = {
|
|
3652
3709
|
...e.query.query,
|
|
3653
|
-
limit:
|
|
3654
|
-
offset:
|
|
3710
|
+
limit: j,
|
|
3711
|
+
offset: R * j
|
|
3655
3712
|
};
|
|
3656
|
-
e.query.update(
|
|
3657
|
-
}, [g, c,
|
|
3658
|
-
const
|
|
3713
|
+
e.query.update(A);
|
|
3714
|
+
}, [g, c, h] = F(() => {
|
|
3715
|
+
const R = e.query.query.limit, j = Math.floor(
|
|
3659
3716
|
(e.query.query.offset || 0) / e.query.query.limit
|
|
3660
|
-
),
|
|
3661
|
-
return [
|
|
3717
|
+
), A = Math.ceil(n.total / e.query.query.limit);
|
|
3718
|
+
return [R, j, A];
|
|
3662
3719
|
}, [e.query.query.limit, e.query.query.offset, n.total]);
|
|
3663
|
-
|
|
3664
|
-
const f =
|
|
3720
|
+
we(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
|
|
3721
|
+
const f = F(() => Object.keys(i).filter((R) => i[R]).map((R) => e.normalizeRowId(R)), [i]);
|
|
3665
3722
|
let d, p;
|
|
3666
|
-
|
|
3667
|
-
|
|
3723
|
+
wn(e.actions) && (d = /* @__PURE__ */ l.jsx(
|
|
3724
|
+
Cn,
|
|
3668
3725
|
{
|
|
3669
3726
|
actions: e.actions,
|
|
3670
3727
|
reloadData: () => a(e.query.query),
|
|
@@ -3673,21 +3730,21 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3673
3730
|
));
|
|
3674
3731
|
const m = ((v = e.pagination) == null ? void 0 : v.positions) || kr;
|
|
3675
3732
|
if (m.size > 0) {
|
|
3676
|
-
const
|
|
3677
|
-
|
|
3733
|
+
const R = /* @__PURE__ */ l.jsx(
|
|
3734
|
+
Rn,
|
|
3678
3735
|
{
|
|
3679
|
-
total:
|
|
3736
|
+
total: h,
|
|
3680
3737
|
pageIndex: c,
|
|
3681
3738
|
pageSize: g,
|
|
3682
3739
|
onUpdatePagination: u,
|
|
3683
|
-
allowPageSizeChange: (
|
|
3740
|
+
allowPageSizeChange: (_ = e.pagination) == null ? void 0 : _.showSizeChanger
|
|
3684
3741
|
}
|
|
3685
3742
|
);
|
|
3686
|
-
m.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(
|
|
3743
|
+
m.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
|
|
3687
3744
|
d,
|
|
3688
|
-
|
|
3689
|
-
] }) : d = /* @__PURE__ */ l.jsx(
|
|
3690
|
-
|
|
3745
|
+
R
|
|
3746
|
+
] }) : d = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: R })), (m.has("bottomRight") || m.has("bottomLeft") || m.has("bottomCenter")) && (m.has("bottomLeft") ? p = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
|
|
3747
|
+
R,
|
|
3691
3748
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3692
3749
|
"Showing ",
|
|
3693
3750
|
Math.min(c * g + 1, n.total),
|
|
@@ -3699,7 +3756,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3699
3756
|
" ",
|
|
3700
3757
|
"records"
|
|
3701
3758
|
] })
|
|
3702
|
-
] }) : p = /* @__PURE__ */ l.jsxs(
|
|
3759
|
+
] }) : p = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
|
|
3703
3760
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3704
3761
|
"Showing ",
|
|
3705
3762
|
Math.min(c * g + 1, n.total),
|
|
@@ -3711,10 +3768,10 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3711
3768
|
" ",
|
|
3712
3769
|
"records"
|
|
3713
3770
|
] }),
|
|
3714
|
-
|
|
3771
|
+
R
|
|
3715
3772
|
] }));
|
|
3716
3773
|
}
|
|
3717
|
-
const C =
|
|
3774
|
+
const C = F(() => /* @__PURE__ */ l.jsx(
|
|
3718
3775
|
Lr,
|
|
3719
3776
|
{
|
|
3720
3777
|
data: n,
|
|
@@ -3738,7 +3795,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3738
3795
|
]);
|
|
3739
3796
|
return d === void 0 || p === void 0 ? C : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
3740
3797
|
d !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3741
|
-
|
|
3798
|
+
oe,
|
|
3742
3799
|
{
|
|
3743
3800
|
withBorder: !0,
|
|
3744
3801
|
p: "xs",
|
|
@@ -3752,7 +3809,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3752
3809
|
),
|
|
3753
3810
|
C,
|
|
3754
3811
|
p !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3755
|
-
|
|
3812
|
+
oe,
|
|
3756
3813
|
{
|
|
3757
3814
|
withBorder: !0,
|
|
3758
3815
|
p: "xs",
|
|
@@ -3766,12 +3823,12 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3766
3823
|
)
|
|
3767
3824
|
] });
|
|
3768
3825
|
}, Lr = (e) => {
|
|
3769
|
-
const n =
|
|
3826
|
+
const n = F(() => {
|
|
3770
3827
|
const o = [
|
|
3771
3828
|
{
|
|
3772
3829
|
id: "selection",
|
|
3773
3830
|
header: ({ table: r }) => /* @__PURE__ */ l.jsx(
|
|
3774
|
-
|
|
3831
|
+
ue,
|
|
3775
3832
|
{
|
|
3776
3833
|
checked: r.getIsAllRowsSelected(),
|
|
3777
3834
|
indeterminate: r.getIsSomeRowsSelected(),
|
|
@@ -3779,7 +3836,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3779
3836
|
}
|
|
3780
3837
|
),
|
|
3781
3838
|
cell: ({ row: r }) => /* @__PURE__ */ l.jsx(
|
|
3782
|
-
|
|
3839
|
+
ue,
|
|
3783
3840
|
{
|
|
3784
3841
|
checked: r.getIsSelected(),
|
|
3785
3842
|
disabled: !r.getCanSelect(),
|
|
@@ -3796,10 +3853,10 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3796
3853
|
cell: ({ row: i }) => r.render(i.original)
|
|
3797
3854
|
});
|
|
3798
3855
|
}), o;
|
|
3799
|
-
}, [e.columns]), t =
|
|
3856
|
+
}, [e.columns]), t = vn({
|
|
3800
3857
|
data: e.data.records,
|
|
3801
3858
|
columns: n,
|
|
3802
|
-
getCoreRowModel:
|
|
3859
|
+
getCoreRowModel: Sn(),
|
|
3803
3860
|
// convert to string, but we actually can get away with number
|
|
3804
3861
|
getRowId: (o) => e.getRowId(o).toString(),
|
|
3805
3862
|
state: {
|
|
@@ -3809,7 +3866,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3809
3866
|
manualPagination: !0
|
|
3810
3867
|
});
|
|
3811
3868
|
return /* @__PURE__ */ l.jsx(
|
|
3812
|
-
|
|
3869
|
+
xn,
|
|
3813
3870
|
{
|
|
3814
3871
|
table: t,
|
|
3815
3872
|
selectedRowKeys: e.selectedRowKeys,
|
|
@@ -3819,7 +3876,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Di = (e) => {
|
|
|
3819
3876
|
}
|
|
3820
3877
|
);
|
|
3821
3878
|
};
|
|
3822
|
-
function
|
|
3879
|
+
function yn(e, n, {
|
|
3823
3880
|
title: t,
|
|
3824
3881
|
nestedKey: o,
|
|
3825
3882
|
component: r
|
|
@@ -3827,18 +3884,18 @@ function Rn(e, n, {
|
|
|
3827
3884
|
let i;
|
|
3828
3885
|
if (r !== void 0)
|
|
3829
3886
|
i = r;
|
|
3830
|
-
else if (
|
|
3887
|
+
else if (ie(n))
|
|
3831
3888
|
n.cardinality === "1:N" || n.cardinality === "N:N" ? i = dt : i = ut;
|
|
3832
3889
|
else {
|
|
3833
|
-
if (
|
|
3890
|
+
if (de[n.datatype] === void 0)
|
|
3834
3891
|
throw new Error(
|
|
3835
3892
|
`No display component found for datatype ${n.datatype}`
|
|
3836
3893
|
);
|
|
3837
|
-
i =
|
|
3894
|
+
i = de[n.datatype];
|
|
3838
3895
|
}
|
|
3839
3896
|
const s = {
|
|
3840
3897
|
key: n.name,
|
|
3841
|
-
title: t || /* @__PURE__ */ l.jsx(
|
|
3898
|
+
title: t || /* @__PURE__ */ l.jsx(N, { value: n.label }),
|
|
3842
3899
|
accessorFn: (a) => a[n.tsName],
|
|
3843
3900
|
render: (a) => {
|
|
3844
3901
|
const u = a[n.tsName];
|
|
@@ -3850,7 +3907,7 @@ function Rn(e, n, {
|
|
|
3850
3907
|
return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
|
|
3851
3908
|
}), s;
|
|
3852
3909
|
}
|
|
3853
|
-
function
|
|
3910
|
+
function Di(e, n, t, {
|
|
3854
3911
|
title: o,
|
|
3855
3912
|
nestedKey: r,
|
|
3856
3913
|
component: i
|
|
@@ -3858,18 +3915,18 @@ function Vi(e, n, t, {
|
|
|
3858
3915
|
let s;
|
|
3859
3916
|
if (i !== void 0)
|
|
3860
3917
|
s = i;
|
|
3861
|
-
else if (
|
|
3918
|
+
else if (ie(t))
|
|
3862
3919
|
t.cardinality === "1:N" || t.cardinality === "N:N" ? s = dt : s = ut;
|
|
3863
3920
|
else {
|
|
3864
|
-
if (
|
|
3921
|
+
if (de[t.datatype] === void 0)
|
|
3865
3922
|
throw new Error(
|
|
3866
3923
|
`No display component found for datatype ${t.datatype}`
|
|
3867
3924
|
);
|
|
3868
|
-
s =
|
|
3925
|
+
s = de[t.datatype];
|
|
3869
3926
|
}
|
|
3870
3927
|
const a = {
|
|
3871
3928
|
key: n + "." + t.name,
|
|
3872
|
-
title: o || /* @__PURE__ */ l.jsx(
|
|
3929
|
+
title: o || /* @__PURE__ */ l.jsx(N, { value: t.label }),
|
|
3873
3930
|
accessorFn: (u) => u[n.tsName][t.tsName],
|
|
3874
3931
|
render: (u) => {
|
|
3875
3932
|
const g = u[n.tsName][t.tsName];
|
|
@@ -3881,25 +3938,25 @@ function Vi(e, n, t, {
|
|
|
3881
3938
|
return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: g });
|
|
3882
3939
|
}), a;
|
|
3883
3940
|
}
|
|
3884
|
-
function
|
|
3885
|
-
return t.map((r) =>
|
|
3941
|
+
function bi(e, n, t, o = {}) {
|
|
3942
|
+
return t.map((r) => _n(r) ? r : yn(e, n.publicProperties[r], o));
|
|
3886
3943
|
}
|
|
3887
|
-
function
|
|
3888
|
-
return t.map((r) =>
|
|
3944
|
+
function Vi(e, n, t = [], o = {}) {
|
|
3945
|
+
return t.map((r) => _n(r) ? r : yn(e, n.publicProperties[r], o));
|
|
3889
3946
|
}
|
|
3890
|
-
function
|
|
3947
|
+
function _n(e) {
|
|
3891
3948
|
return typeof e == "object" && "key" in e && "title" in e;
|
|
3892
3949
|
}
|
|
3893
|
-
const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]),
|
|
3894
|
-
var c,
|
|
3950
|
+
const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ti = (e) => {
|
|
3951
|
+
var c, h;
|
|
3895
3952
|
const [n, t] = M(
|
|
3896
3953
|
{}
|
|
3897
|
-
), o =
|
|
3954
|
+
), o = F(() => {
|
|
3898
3955
|
const f = [
|
|
3899
3956
|
{
|
|
3900
3957
|
id: "selection",
|
|
3901
3958
|
header: ({ table: d }) => /* @__PURE__ */ l.jsx(
|
|
3902
|
-
|
|
3959
|
+
ue,
|
|
3903
3960
|
{
|
|
3904
3961
|
checked: d.getIsAllRowsSelected(),
|
|
3905
3962
|
indeterminate: d.getIsSomeRowsSelected(),
|
|
@@ -3907,7 +3964,7 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
3907
3964
|
}
|
|
3908
3965
|
),
|
|
3909
3966
|
cell: ({ row: d }) => /* @__PURE__ */ l.jsx(
|
|
3910
|
-
|
|
3967
|
+
ue,
|
|
3911
3968
|
{
|
|
3912
3969
|
checked: d.getIsSelected(),
|
|
3913
3970
|
disabled: !d.getCanSelect(),
|
|
@@ -3924,19 +3981,19 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
3924
3981
|
cell: ({ row: p }) => d.render(p.original)
|
|
3925
3982
|
});
|
|
3926
3983
|
}), f;
|
|
3927
|
-
}, [e.columns]), r =
|
|
3984
|
+
}, [e.columns]), r = vn({
|
|
3928
3985
|
data: e.data,
|
|
3929
3986
|
columns: o,
|
|
3930
|
-
getCoreRowModel:
|
|
3987
|
+
getCoreRowModel: Sn(),
|
|
3931
3988
|
getPaginationRowModel: Ir(),
|
|
3932
3989
|
state: {
|
|
3933
3990
|
rowSelection: n
|
|
3934
3991
|
},
|
|
3935
3992
|
onRowSelectionChange: t
|
|
3936
|
-
}), i =
|
|
3993
|
+
}), i = F(() => Object.keys(n).filter((f) => n[f]).map(Number), [n]);
|
|
3937
3994
|
let s, a;
|
|
3938
|
-
|
|
3939
|
-
|
|
3995
|
+
wn(e.actions) && (s = /* @__PURE__ */ l.jsx(
|
|
3996
|
+
Cn,
|
|
3940
3997
|
{
|
|
3941
3998
|
actions: e.actions,
|
|
3942
3999
|
selectedRowKeys: i
|
|
@@ -3945,19 +4002,19 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
3945
4002
|
const u = ((c = e.pagination) == null ? void 0 : c.positions) || Or;
|
|
3946
4003
|
if (u.size > 0) {
|
|
3947
4004
|
const f = r.getState().pagination, d = /* @__PURE__ */ l.jsx(
|
|
3948
|
-
|
|
4005
|
+
Rn,
|
|
3949
4006
|
{
|
|
3950
4007
|
total: r.getPageCount(),
|
|
3951
4008
|
pageIndex: f.pageIndex,
|
|
3952
4009
|
pageSize: f.pageSize,
|
|
3953
4010
|
onUpdatePagination: (p, m) => r.setPagination({ pageIndex: p, pageSize: m }),
|
|
3954
|
-
allowPageSizeChange: (
|
|
4011
|
+
allowPageSizeChange: (h = e.pagination) == null ? void 0 : h.showSizeChanger
|
|
3955
4012
|
}
|
|
3956
4013
|
);
|
|
3957
|
-
u.has("topRight") && (s !== void 0 ? s = /* @__PURE__ */ l.jsxs(
|
|
4014
|
+
u.has("topRight") && (s !== void 0 ? s = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
|
|
3958
4015
|
s,
|
|
3959
4016
|
d
|
|
3960
|
-
] }) : s = /* @__PURE__ */ l.jsx(
|
|
4017
|
+
] }) : s = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: d })), (u.has("bottomRight") || u.has("bottomLeft") || u.has("bottomCenter")) && (u.has("bottomLeft") ? a = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
|
|
3961
4018
|
d,
|
|
3962
4019
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3963
4020
|
"Showing ",
|
|
@@ -3973,7 +4030,7 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
3973
4030
|
e.data.length,
|
|
3974
4031
|
" records"
|
|
3975
4032
|
] })
|
|
3976
|
-
] }) : a = /* @__PURE__ */ l.jsxs(
|
|
4033
|
+
] }) : a = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
|
|
3977
4034
|
/* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
|
|
3978
4035
|
"Showing ",
|
|
3979
4036
|
f.pageIndex * f.pageSize + 1,
|
|
@@ -3992,7 +4049,7 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
3992
4049
|
] }));
|
|
3993
4050
|
}
|
|
3994
4051
|
const g = /* @__PURE__ */ l.jsx(
|
|
3995
|
-
|
|
4052
|
+
xn,
|
|
3996
4053
|
{
|
|
3997
4054
|
selectedRowKeys: n,
|
|
3998
4055
|
table: r,
|
|
@@ -4003,7 +4060,7 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
4003
4060
|
);
|
|
4004
4061
|
return s === void 0 && a === void 0 ? g : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4005
4062
|
s !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4006
|
-
|
|
4063
|
+
oe,
|
|
4007
4064
|
{
|
|
4008
4065
|
withBorder: !0,
|
|
4009
4066
|
p: "xs",
|
|
@@ -4017,7 +4074,7 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
4017
4074
|
),
|
|
4018
4075
|
g,
|
|
4019
4076
|
a !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4020
|
-
|
|
4077
|
+
oe,
|
|
4021
4078
|
{
|
|
4022
4079
|
withBorder: !0,
|
|
4023
4080
|
p: "xs",
|
|
@@ -4030,166 +4087,28 @@ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ni = (e) => {
|
|
|
4030
4087
|
}
|
|
4031
4088
|
)
|
|
4032
4089
|
] });
|
|
4033
|
-
},
|
|
4034
|
-
integer:
|
|
4035
|
-
float:
|
|
4036
|
-
string:
|
|
4037
|
-
boolean:
|
|
4038
|
-
"string[]":
|
|
4039
|
-
enum:
|
|
4040
|
-
date:
|
|
4041
|
-
datetime:
|
|
4042
|
-
},
|
|
4043
|
-
/**
|
|
4044
|
-
* Creates a new I18N instance.
|
|
4045
|
-
* @param initialLocale - The initial locale to use
|
|
4046
|
-
* @param initialTranslations - Initial set of translations
|
|
4047
|
-
*/
|
|
4048
|
-
constructor(n, t) {
|
|
4049
|
-
/**
|
|
4050
|
-
* The current active locale for the application.
|
|
4051
|
-
* @private
|
|
4052
|
-
*/
|
|
4053
|
-
G(this, "locale", new Intl.Locale("en-US"));
|
|
4054
|
-
/**
|
|
4055
|
-
* Store for translation key-value pairs by locale.
|
|
4056
|
-
* @private
|
|
4057
|
-
*/
|
|
4058
|
-
G(this, "translations", {});
|
|
4059
|
-
n && (this.locale = new Intl.Locale(n)), t && (this.translations = t);
|
|
4060
|
-
}
|
|
4061
|
-
/**
|
|
4062
|
-
* Gets the singleton instance of the I18NStore.
|
|
4063
|
-
* If it doesn't exist, it initializes it with default values.
|
|
4064
|
-
* @returns The singleton instance of I18NStore
|
|
4065
|
-
*/
|
|
4066
|
-
static getInstance() {
|
|
4067
|
-
return ee.instance || (ee.instance = new ee()), ee.instance;
|
|
4068
|
-
}
|
|
4069
|
-
/**
|
|
4070
|
-
* Gets the current locale.
|
|
4071
|
-
* @returns The current locale code
|
|
4072
|
-
*/
|
|
4073
|
-
getLocale() {
|
|
4074
|
-
return this.locale;
|
|
4075
|
-
}
|
|
4076
|
-
/**
|
|
4077
|
-
* Sets the active locale.
|
|
4078
|
-
* @param locale - The locale code to set as active
|
|
4079
|
-
*/
|
|
4080
|
-
setLocale(n) {
|
|
4081
|
-
this.locale = n;
|
|
4082
|
-
}
|
|
4083
|
-
/**
|
|
4084
|
-
* Registers one or more translations for different languages.
|
|
4085
|
-
*
|
|
4086
|
-
* @param translations - An object containing translations mapped by language code.
|
|
4087
|
-
* The format is { [languageCode: string]: { [key: string]: string } }
|
|
4088
|
-
* where each language code points to an object of translation keys and values.
|
|
4089
|
-
*
|
|
4090
|
-
* @example
|
|
4091
|
-
* // Add translations for English and Spanish
|
|
4092
|
-
* i18n.registerTranslations({
|
|
4093
|
-
* en: {
|
|
4094
|
-
* greeting: 'Hello',
|
|
4095
|
-
* farewell: 'Goodbye'
|
|
4096
|
-
* },
|
|
4097
|
-
* es: {
|
|
4098
|
-
* greeting: 'Hola',
|
|
4099
|
-
* farewell: 'Adiós'
|
|
4100
|
-
* }
|
|
4101
|
-
* });
|
|
4102
|
-
*/
|
|
4103
|
-
registerTranslations(n) {
|
|
4104
|
-
Object.entries(n).forEach(([t, o]) => {
|
|
4105
|
-
this.translations[t] || (this.translations[t] = {}), Object.entries(o).forEach(([r, i]) => {
|
|
4106
|
-
this.translations[t][r] = i;
|
|
4107
|
-
});
|
|
4108
|
-
});
|
|
4109
|
-
}
|
|
4110
|
-
/**
|
|
4111
|
-
* Translates a key into a localized string with support for pluralization and interpolation.
|
|
4112
|
-
*
|
|
4113
|
-
* @param key - The translation key to look up
|
|
4114
|
-
* @param options - Configuration options for the translation
|
|
4115
|
-
* @param options.language - Optional language to use instead of the current locale's language
|
|
4116
|
-
* @param options.count - Optional count for pluralization
|
|
4117
|
-
* @param options.ordinal - Whether to use ordinal pluralization rules
|
|
4118
|
-
* @param options.args - Optional arguments for string interpolation
|
|
4119
|
-
* @returns The translated string or undefined if no translation is found
|
|
4120
|
-
*
|
|
4121
|
-
* @example
|
|
4122
|
-
* // Basic usage
|
|
4123
|
-
* t('greeting'); // => "Hello"
|
|
4124
|
-
*
|
|
4125
|
-
* @example
|
|
4126
|
-
* // With pluralization
|
|
4127
|
-
* t('item', { count: 1 }); // Uses 'item_one'
|
|
4128
|
-
* t('item', { count: 5 }); // Uses 'item_other'
|
|
4129
|
-
*
|
|
4130
|
-
* @example
|
|
4131
|
-
* // With interpolation
|
|
4132
|
-
* t('welcome', { args: { name: 'John' } }); // => "Welcome, John!"
|
|
4133
|
-
*
|
|
4134
|
-
* @example
|
|
4135
|
-
* // With count interpolation
|
|
4136
|
-
* t('count', { count: 5 }); // => "Count: 5"
|
|
4137
|
-
*
|
|
4138
|
-
* @example
|
|
4139
|
-
* // With ordinal pluralization
|
|
4140
|
-
* t('position', { count: 1, ordinal: true }); // Uses 'position_ordinal_one'
|
|
4141
|
-
*/
|
|
4142
|
-
t(n, t = {}) {
|
|
4143
|
-
var i;
|
|
4144
|
-
let o = n;
|
|
4145
|
-
if (t.count !== void 0) {
|
|
4146
|
-
const s = t.count === 1 ? "one" : "other", a = t.ordinal ? `ordinal_${s}` : s;
|
|
4147
|
-
o = `${n}_${a}`;
|
|
4148
|
-
}
|
|
4149
|
-
let r = (i = this.translations[t.language || this.locale.language]) == null ? void 0 : i[o];
|
|
4150
|
-
if (r !== void 0) {
|
|
4151
|
-
if (t.count !== void 0) {
|
|
4152
|
-
const s = new RegExp("{{\\s*count\\s*}}", "g");
|
|
4153
|
-
r = r.replace(s, String(t.count));
|
|
4154
|
-
}
|
|
4155
|
-
return t.args !== void 0 && Object.entries(t.args).forEach(([s, a]) => {
|
|
4156
|
-
const u = new RegExp(`{{\\s*${s}\\s*}}`, "g");
|
|
4157
|
-
let g;
|
|
4158
|
-
zr(a) ? g = a.lang2value[this.locale.language] || a.lang2value[a.lang] : g = a, r = r.replace(u, g);
|
|
4159
|
-
}), r;
|
|
4160
|
-
}
|
|
4161
|
-
}
|
|
4162
|
-
};
|
|
4163
|
-
/**
|
|
4164
|
-
* Singleton instance of the I18NStore.
|
|
4165
|
-
* @private
|
|
4166
|
-
*/
|
|
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
|
|
4175
|
-
};
|
|
4176
|
-
ot.getInstance().registerTranslations(qr);
|
|
4177
|
-
function Br(e) {
|
|
4178
|
-
return e === void 0 || typeof e == "string" && e.trim() === "";
|
|
4179
|
-
}
|
|
4180
|
-
const Ur = {
|
|
4090
|
+
}, Lt = {
|
|
4091
|
+
integer: De,
|
|
4092
|
+
float: De,
|
|
4093
|
+
string: Se,
|
|
4094
|
+
boolean: tn,
|
|
4095
|
+
"string[]": Se,
|
|
4096
|
+
enum: Se,
|
|
4097
|
+
date: Do,
|
|
4098
|
+
datetime: bo
|
|
4099
|
+
}, zr = {
|
|
4181
4100
|
lang2value: {
|
|
4182
4101
|
en: "Update",
|
|
4183
4102
|
vi: "Cập Nhật"
|
|
4184
4103
|
},
|
|
4185
4104
|
lang: "en"
|
|
4186
|
-
},
|
|
4105
|
+
}, Gr = {
|
|
4187
4106
|
lang2value: {
|
|
4188
4107
|
en: "Clear",
|
|
4189
4108
|
vi: "Xóa"
|
|
4190
4109
|
},
|
|
4191
4110
|
lang: "en"
|
|
4192
|
-
},
|
|
4111
|
+
}, Hr = ({
|
|
4193
4112
|
db: e,
|
|
4194
4113
|
property: n,
|
|
4195
4114
|
InputComponent: t,
|
|
@@ -4199,22 +4118,22 @@ const Ur = {
|
|
|
4199
4118
|
onChange: s
|
|
4200
4119
|
}) => {
|
|
4201
4120
|
if (t === void 0)
|
|
4202
|
-
if (
|
|
4121
|
+
if (ie(n)) {
|
|
4203
4122
|
if (n.isEmbedded)
|
|
4204
4123
|
throw new Error("You should use nested property for embedded object");
|
|
4205
|
-
t = n.cardinality === "N:N" || n.cardinality === "1:N" ?
|
|
4124
|
+
t = n.cardinality === "N:N" || n.cardinality === "1:N" ? on : nn;
|
|
4206
4125
|
} else {
|
|
4207
|
-
if (
|
|
4126
|
+
if (Lt[n.datatype] === void 0)
|
|
4208
4127
|
throw new Error(
|
|
4209
4128
|
`No input component found for datatype ${n.datatype}`
|
|
4210
4129
|
);
|
|
4211
|
-
t =
|
|
4130
|
+
t = Lt[n.datatype];
|
|
4212
4131
|
}
|
|
4213
|
-
const a =
|
|
4132
|
+
const a = F(() => {
|
|
4214
4133
|
var g;
|
|
4215
4134
|
return r === void 0 || (g = r(i).errorMessage) == null ? void 0 : g.t({ args: { name: n.label } });
|
|
4216
4135
|
}, [r, i, n.label]);
|
|
4217
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4136
|
+
return /* @__PURE__ */ l.jsxs(te, { gap: 5, children: [
|
|
4218
4137
|
/* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
4219
4138
|
/* @__PURE__ */ l.jsx(
|
|
4220
4139
|
$.Col,
|
|
@@ -4225,12 +4144,12 @@ const Ur = {
|
|
|
4225
4144
|
justifyContent: o.align || "left"
|
|
4226
4145
|
},
|
|
4227
4146
|
children: /* @__PURE__ */ l.jsx(
|
|
4228
|
-
|
|
4147
|
+
rn,
|
|
4229
4148
|
{
|
|
4230
|
-
label: /* @__PURE__ */ l.jsx(
|
|
4149
|
+
label: /* @__PURE__ */ l.jsx(N, { value: n.label }),
|
|
4231
4150
|
name: n.name,
|
|
4232
4151
|
required: n.isRequired,
|
|
4233
|
-
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
4152
|
+
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: n.description }) : void 0,
|
|
4234
4153
|
align: o.align
|
|
4235
4154
|
}
|
|
4236
4155
|
)
|
|
@@ -4248,34 +4167,34 @@ const Ur = {
|
|
|
4248
4167
|
] }),
|
|
4249
4168
|
a !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
|
|
4250
4169
|
/* @__PURE__ */ l.jsx($.Col, { span: o.labelCol }),
|
|
4251
|
-
/* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
4170
|
+
/* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(K.Error, { children: a }) })
|
|
4252
4171
|
] })
|
|
4253
4172
|
] });
|
|
4254
4173
|
};
|
|
4255
|
-
function
|
|
4174
|
+
function qr({
|
|
4256
4175
|
properties: e,
|
|
4257
4176
|
queryConditions: n
|
|
4258
4177
|
}) {
|
|
4259
4178
|
return e.reduce((t, o) => n[o.property.tsName] === void 0 ? t : t + 1, 0);
|
|
4260
4179
|
}
|
|
4261
|
-
const
|
|
4262
|
-
function
|
|
4180
|
+
const Br = (e, n) => Zt(e, n, !1);
|
|
4181
|
+
function Ur({
|
|
4263
4182
|
properties: e,
|
|
4264
4183
|
queryConditions: n
|
|
4265
4184
|
}) {
|
|
4266
|
-
const t =
|
|
4185
|
+
const t = eo.getInstance().getLocale(), o = [];
|
|
4267
4186
|
for (const r of e) {
|
|
4268
4187
|
const i = n[r.property.tsName];
|
|
4269
4188
|
if (i !== void 0)
|
|
4270
4189
|
if (o.length > 0 && o.push(" & "), r.property.datatype === "date" || r.property.datatype === "datetime") {
|
|
4271
|
-
const s = r.property.datatype === "date" ?
|
|
4272
|
-
i.op === "bti" ? (o.push(s(t,
|
|
4190
|
+
const s = r.property.datatype === "date" ? Ce : Br;
|
|
4191
|
+
i.op === "bti" ? (o.push(s(t, J(i.value[0]).toDate())), o.push(" ≤ "), o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, J(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(he(t, r.property.label)), o.push(" ≥ "), o.push(s(t, J(i.value).toDate()))) : i.op === "lte" && (o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, J(i.value).toDate())));
|
|
4273
4192
|
} else
|
|
4274
|
-
o.push(
|
|
4193
|
+
o.push(he(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
|
|
4275
4194
|
}
|
|
4276
4195
|
return o.join("");
|
|
4277
4196
|
}
|
|
4278
|
-
const
|
|
4197
|
+
const Kr = ({
|
|
4279
4198
|
db: e,
|
|
4280
4199
|
properties: n,
|
|
4281
4200
|
styles: t,
|
|
@@ -4285,7 +4204,7 @@ const Qr = ({
|
|
|
4285
4204
|
queryConditions: s
|
|
4286
4205
|
}) => {
|
|
4287
4206
|
const [a, u] = M({});
|
|
4288
|
-
|
|
4207
|
+
we(() => {
|
|
4289
4208
|
const p = {};
|
|
4290
4209
|
for (const m of n) {
|
|
4291
4210
|
const C = s[m.property.tsName];
|
|
@@ -4302,29 +4221,29 @@ const Qr = ({
|
|
|
4302
4221
|
}
|
|
4303
4222
|
u(p);
|
|
4304
4223
|
}, [n, s]);
|
|
4305
|
-
const [g, c,
|
|
4224
|
+
const [g, c, h] = F(() => {
|
|
4306
4225
|
const p = [], m = {}, C = {};
|
|
4307
4226
|
for (const v of n) {
|
|
4308
|
-
let
|
|
4309
|
-
if (!
|
|
4310
|
-
return { op: "eq", value:
|
|
4227
|
+
let _, R = (j) => {
|
|
4228
|
+
if (!yt.isEmpty(j))
|
|
4229
|
+
return { op: "eq", value: j };
|
|
4311
4230
|
};
|
|
4312
|
-
(v.property.datatype === "date" || v.property.datatype === "datetime") && (
|
|
4231
|
+
(v.property.datatype === "date" || v.property.datatype === "datetime") && (_ = yt.validateTimeRange, R = (j) => j.start !== void 0 && j.end !== void 0 ? {
|
|
4313
4232
|
op: "bti",
|
|
4314
|
-
value: [
|
|
4315
|
-
} :
|
|
4233
|
+
value: [j.start.toISOString(), j.end.toISOString()]
|
|
4234
|
+
} : j.start !== void 0 ? { op: "gte", value: j.start.toISOString() } : j.end !== void 0 ? { op: "lte", value: j.end.toISOString() } : void 0), m[v.property.tsName] = R, C[v.property.tsName] = _, p.push(
|
|
4316
4235
|
/* @__PURE__ */ l.jsx(
|
|
4317
|
-
|
|
4236
|
+
Hr,
|
|
4318
4237
|
{
|
|
4319
4238
|
db: e,
|
|
4320
4239
|
property: v.property,
|
|
4321
4240
|
InputComponent: v.InputComponent,
|
|
4322
4241
|
value: a[v.property.tsName],
|
|
4323
|
-
onChange: (
|
|
4324
|
-
u({ ...a, [v.property.tsName]:
|
|
4242
|
+
onChange: (j) => {
|
|
4243
|
+
u({ ...a, [v.property.tsName]: j });
|
|
4325
4244
|
},
|
|
4326
4245
|
layout: r,
|
|
4327
|
-
validator:
|
|
4246
|
+
validator: _
|
|
4328
4247
|
},
|
|
4329
4248
|
v.property.name
|
|
4330
4249
|
)
|
|
@@ -4339,19 +4258,19 @@ const Qr = ({
|
|
|
4339
4258
|
v !== void 0 && (m[C.property.tsName] = v);
|
|
4340
4259
|
}
|
|
4341
4260
|
i(m);
|
|
4342
|
-
}, d =
|
|
4261
|
+
}, d = F(() => (p) => {
|
|
4343
4262
|
for (const m of n) {
|
|
4344
|
-
const C =
|
|
4263
|
+
const C = h[m.property.tsName];
|
|
4345
4264
|
if (C !== void 0 && !C(p[m.property.tsName]).isValid)
|
|
4346
4265
|
return !1;
|
|
4347
4266
|
}
|
|
4348
4267
|
return !0;
|
|
4349
|
-
}, [n,
|
|
4350
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4268
|
+
}, [n, h]);
|
|
4269
|
+
return /* @__PURE__ */ l.jsxs(te, { gap: "sm", className: o, style: t, children: [
|
|
4351
4270
|
g,
|
|
4352
|
-
/* @__PURE__ */ l.jsxs(
|
|
4271
|
+
/* @__PURE__ */ l.jsxs(L, { gap: "sm", justify: "flex-end", children: [
|
|
4353
4272
|
/* @__PURE__ */ l.jsx(
|
|
4354
|
-
|
|
4273
|
+
B,
|
|
4355
4274
|
{
|
|
4356
4275
|
variant: "light",
|
|
4357
4276
|
size: "xs",
|
|
@@ -4360,28 +4279,28 @@ const Qr = ({
|
|
|
4360
4279
|
u({}), f({});
|
|
4361
4280
|
},
|
|
4362
4281
|
disabled: Object.keys(a).length === 0,
|
|
4363
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4282
|
+
children: /* @__PURE__ */ l.jsx(N, { value: Gr })
|
|
4364
4283
|
}
|
|
4365
4284
|
),
|
|
4366
4285
|
/* @__PURE__ */ l.jsx(
|
|
4367
|
-
|
|
4286
|
+
B,
|
|
4368
4287
|
{
|
|
4369
4288
|
variant: "light",
|
|
4370
4289
|
size: "xs",
|
|
4371
4290
|
onClick: () => f(a),
|
|
4372
4291
|
disabled: !d(a),
|
|
4373
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4292
|
+
children: /* @__PURE__ */ l.jsx(N, { value: zr })
|
|
4374
4293
|
}
|
|
4375
4294
|
)
|
|
4376
4295
|
] })
|
|
4377
4296
|
] });
|
|
4378
|
-
},
|
|
4297
|
+
}, Ot = /* @__PURE__ */ l.jsx(Qn, { size: 16, stroke: 1.5 }), zt = /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }), Yr = {
|
|
4379
4298
|
lang2value: {
|
|
4380
4299
|
en: "Search By",
|
|
4381
4300
|
vi: "Tìm Kiếm Theo"
|
|
4382
4301
|
},
|
|
4383
4302
|
lang: "en"
|
|
4384
|
-
},
|
|
4303
|
+
}, Ni = ({
|
|
4385
4304
|
query: e,
|
|
4386
4305
|
onChange: n,
|
|
4387
4306
|
debounceTime: t = 250,
|
|
@@ -4389,16 +4308,16 @@ const Qr = ({
|
|
|
4389
4308
|
searchField: r,
|
|
4390
4309
|
advancedSearch: i
|
|
4391
4310
|
}) => {
|
|
4392
|
-
const s =
|
|
4311
|
+
const s = W(ne), [a, u] = M(e), [g, c] = M(!1), [h, f] = M([!1, Date.now()]), d = F(() => no(
|
|
4393
4312
|
t,
|
|
4394
4313
|
(v) => {
|
|
4395
4314
|
c(!1), n(v);
|
|
4396
4315
|
},
|
|
4397
4316
|
{ atBegin: !1 }
|
|
4398
|
-
), [t, n]), p =
|
|
4317
|
+
), [t, n]), p = F(() => (v) => {
|
|
4399
4318
|
u(v.target.value), c(!0), d(v.target.value);
|
|
4400
4319
|
}, [u, c, d]);
|
|
4401
|
-
o === void 0 && r !== void 0 && (o =
|
|
4320
|
+
o === void 0 && r !== void 0 && (o = Yr);
|
|
4402
4321
|
let m = "";
|
|
4403
4322
|
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)
|
|
4404
4323
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -4407,12 +4326,12 @@ const Qr = ({
|
|
|
4407
4326
|
flex: 1,
|
|
4408
4327
|
label: "Search",
|
|
4409
4328
|
placeholder: m,
|
|
4410
|
-
leftSection: g ?
|
|
4329
|
+
leftSection: g ? Ot : zt,
|
|
4411
4330
|
value: a,
|
|
4412
4331
|
onChange: p
|
|
4413
4332
|
}
|
|
4414
4333
|
);
|
|
4415
|
-
const C =
|
|
4334
|
+
const C = qr(i);
|
|
4416
4335
|
return /* @__PURE__ */ l.jsxs(
|
|
4417
4336
|
Le,
|
|
4418
4337
|
{
|
|
@@ -4421,7 +4340,7 @@ const Qr = ({
|
|
|
4421
4340
|
position: "bottom",
|
|
4422
4341
|
withArrow: !0,
|
|
4423
4342
|
shadow: "md",
|
|
4424
|
-
opened:
|
|
4343
|
+
opened: h[0],
|
|
4425
4344
|
onDismiss: () => {
|
|
4426
4345
|
f([!1, Date.now()]);
|
|
4427
4346
|
},
|
|
@@ -4432,7 +4351,7 @@ const Qr = ({
|
|
|
4432
4351
|
flex: 1,
|
|
4433
4352
|
label: "Search",
|
|
4434
4353
|
placeholder: m,
|
|
4435
|
-
leftSection: g ?
|
|
4354
|
+
leftSection: g ? Ot : zt,
|
|
4436
4355
|
rightSection: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4437
4356
|
/* @__PURE__ */ l.jsx(
|
|
4438
4357
|
Rt,
|
|
@@ -4442,7 +4361,7 @@ const Qr = ({
|
|
|
4442
4361
|
onClick: () => {
|
|
4443
4362
|
u(""), n("");
|
|
4444
4363
|
},
|
|
4445
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4364
|
+
children: /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5, cursor: "pointer" })
|
|
4446
4365
|
}
|
|
4447
4366
|
),
|
|
4448
4367
|
/* @__PURE__ */ l.jsx(
|
|
@@ -4452,10 +4371,10 @@ const Qr = ({
|
|
|
4452
4371
|
"aria-label": "Extra Filters",
|
|
4453
4372
|
color: C > 0 ? "orange" : void 0,
|
|
4454
4373
|
onClick: () => {
|
|
4455
|
-
|
|
4374
|
+
h[1] + 200 >= Date.now() || f([!0, Date.now()]);
|
|
4456
4375
|
},
|
|
4457
4376
|
children: /* @__PURE__ */ l.jsx(
|
|
4458
|
-
|
|
4377
|
+
Jn,
|
|
4459
4378
|
{
|
|
4460
4379
|
size: 16,
|
|
4461
4380
|
stroke: C > 0 ? 2 : 1.5,
|
|
@@ -4471,12 +4390,12 @@ const Qr = ({
|
|
|
4471
4390
|
rightSectionWidth: 68,
|
|
4472
4391
|
value: a,
|
|
4473
4392
|
onChange: p,
|
|
4474
|
-
description:
|
|
4393
|
+
description: Ur(i),
|
|
4475
4394
|
inputWrapperOrder: ["label", "input", "description", "error"]
|
|
4476
4395
|
}
|
|
4477
4396
|
) }),
|
|
4478
4397
|
/* @__PURE__ */ l.jsx(Le.Dropdown, { children: /* @__PURE__ */ l.jsx(
|
|
4479
|
-
|
|
4398
|
+
Kr,
|
|
4480
4399
|
{
|
|
4481
4400
|
db: i.db,
|
|
4482
4401
|
properties: i.properties,
|
|
@@ -4490,7 +4409,7 @@ const Qr = ({
|
|
|
4490
4409
|
]
|
|
4491
4410
|
}
|
|
4492
4411
|
);
|
|
4493
|
-
},
|
|
4412
|
+
}, Wr = re(
|
|
4494
4413
|
({
|
|
4495
4414
|
store: e,
|
|
4496
4415
|
record: n,
|
|
@@ -4500,42 +4419,42 @@ const Qr = ({
|
|
|
4500
4419
|
}) => {
|
|
4501
4420
|
if (r !== void 0 && !r(n))
|
|
4502
4421
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
4503
|
-
const i =
|
|
4422
|
+
const i = Jt(n, t);
|
|
4504
4423
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4505
|
-
/* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(
|
|
4424
|
+
/* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(N, { value: t.label }) }),
|
|
4506
4425
|
i !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: t, value: i })
|
|
4507
4426
|
] });
|
|
4508
4427
|
}
|
|
4509
|
-
),
|
|
4510
|
-
const n = e.schema, t =
|
|
4511
|
-
return /* @__PURE__ */ l.jsx(
|
|
4428
|
+
), Xr = 12, Jr = (e) => {
|
|
4429
|
+
const n = e.schema, t = F(() => e.fieldGroups.map((o, r) => Qr(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
|
|
4430
|
+
return /* @__PURE__ */ l.jsx(te, { gap: "sm", className: e.className, style: e.styles, children: t });
|
|
4512
4431
|
};
|
|
4513
|
-
function
|
|
4432
|
+
function Qr(e, n, t, o, r) {
|
|
4514
4433
|
const i = r.fields, s = [];
|
|
4515
4434
|
for (let a = 0; a < i.length; a++) {
|
|
4516
|
-
const u =
|
|
4435
|
+
const u = Xr / i[a].length;
|
|
4517
4436
|
if (!Number.isInteger(u))
|
|
4518
4437
|
throw new Error(`Span must be an integer, but got ${u} for row ${a}`);
|
|
4519
4438
|
for (let g = 0; g < i[a].length; g++) {
|
|
4520
4439
|
const c = i[a][g];
|
|
4521
|
-
let
|
|
4522
|
-
typeof c == "function" ?
|
|
4440
|
+
let h;
|
|
4441
|
+
typeof c == "function" ? h = c(n, t) : typeof c == "object" && "prop" in c ? h = ot(
|
|
4523
4442
|
n,
|
|
4524
4443
|
t,
|
|
4525
|
-
c.prop instanceof
|
|
4444
|
+
c.prop instanceof Y ? c.prop : e.allProperties[c.prop],
|
|
4526
4445
|
c.args
|
|
4527
|
-
) :
|
|
4446
|
+
) : h = ot(
|
|
4528
4447
|
n,
|
|
4529
4448
|
t,
|
|
4530
|
-
c instanceof
|
|
4449
|
+
c instanceof Y ? c : e.allProperties[c]
|
|
4531
4450
|
), s.push(
|
|
4532
|
-
/* @__PURE__ */ l.jsx($.Col, { span: u, children:
|
|
4451
|
+
/* @__PURE__ */ l.jsx($.Col, { span: u, children: h }, `${a}-${g}`)
|
|
4533
4452
|
);
|
|
4534
4453
|
}
|
|
4535
4454
|
}
|
|
4536
4455
|
return /* @__PURE__ */ l.jsx($, { gutter: "sm", children: s }, o);
|
|
4537
4456
|
}
|
|
4538
|
-
function
|
|
4457
|
+
function Ai(e, n, t = {}) {
|
|
4539
4458
|
return (o, r) => {
|
|
4540
4459
|
if (t.visible !== void 0 && !t.visible(r))
|
|
4541
4460
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
@@ -4545,12 +4464,12 @@ function Li(e, n, t = {}) {
|
|
|
4545
4464
|
u = s(o, r);
|
|
4546
4465
|
else {
|
|
4547
4466
|
let g, c = {};
|
|
4548
|
-
typeof s == "object" && "prop" in s ? (g = s.prop instanceof
|
|
4467
|
+
typeof s == "object" && "prop" in s ? (g = s.prop instanceof Y ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof Y ? s : e.allProperties[s], u = ot(o, r, g, c);
|
|
4549
4468
|
}
|
|
4550
4469
|
return /* @__PURE__ */ l.jsx("div", { children: u }, a);
|
|
4551
4470
|
});
|
|
4552
4471
|
return /* @__PURE__ */ l.jsx(
|
|
4553
|
-
|
|
4472
|
+
L,
|
|
4554
4473
|
{
|
|
4555
4474
|
gap: t.flexGap,
|
|
4556
4475
|
grow: t.flexGrow ?? !0,
|
|
@@ -4560,19 +4479,19 @@ function Li(e, n, t = {}) {
|
|
|
4560
4479
|
);
|
|
4561
4480
|
};
|
|
4562
4481
|
}
|
|
4563
|
-
function
|
|
4564
|
-
if (
|
|
4482
|
+
function Zr(e) {
|
|
4483
|
+
if (ie(e))
|
|
4565
4484
|
return e.cardinality === "N:N" || e.cardinality === "1:N" ? dt : ut;
|
|
4566
|
-
if (
|
|
4485
|
+
if (de[e.datatype] === void 0)
|
|
4567
4486
|
throw new Error(
|
|
4568
4487
|
`No display component found for datatype ${e.datatype}`
|
|
4569
4488
|
);
|
|
4570
|
-
return
|
|
4489
|
+
return de[e.datatype];
|
|
4571
4490
|
}
|
|
4572
|
-
function
|
|
4491
|
+
function ot(e, n, t, o = {}) {
|
|
4573
4492
|
let r;
|
|
4574
|
-
return o.display !== void 0 ? r = o.display : r =
|
|
4575
|
-
|
|
4493
|
+
return o.display !== void 0 ? r = o.display : r = Zr(t instanceof Y ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
|
|
4494
|
+
Wr,
|
|
4576
4495
|
{
|
|
4577
4496
|
store: e,
|
|
4578
4497
|
record: n,
|
|
@@ -4582,10 +4501,10 @@ function rt(e, n, t, o = {}) {
|
|
|
4582
4501
|
}
|
|
4583
4502
|
);
|
|
4584
4503
|
}
|
|
4585
|
-
const
|
|
4504
|
+
const ki = (e) => /* @__PURE__ */ l.jsxs(ye, { defaultValue: e.fieldTabs[0].tabName, children: [
|
|
4586
4505
|
/* @__PURE__ */ l.jsx(ye.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Tab, { value: n.tabName, children: n.tabName }, t)) }),
|
|
4587
4506
|
e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
|
|
4588
|
-
|
|
4507
|
+
Jr,
|
|
4589
4508
|
{
|
|
4590
4509
|
schema: e.schema,
|
|
4591
4510
|
store: e.store,
|
|
@@ -4597,75 +4516,80 @@ const Oi = (e) => /* @__PURE__ */ l.jsxs(ye, { defaultValue: e.fieldTabs[0].tabN
|
|
|
4597
4516
|
) }, t))
|
|
4598
4517
|
] });
|
|
4599
4518
|
export {
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4519
|
+
tn as BooleanInput,
|
|
4520
|
+
Pi as ConfirmationInput,
|
|
4521
|
+
Ii as ConfirmationLabel,
|
|
4603
4522
|
Xe as CountryFlagComponent,
|
|
4604
|
-
|
|
4523
|
+
No as DEFAULT_LAYOUT,
|
|
4605
4524
|
kr as DEFAULT_PAGINATION_POSITIONS,
|
|
4606
|
-
|
|
4607
|
-
|
|
4525
|
+
de as DataType2DisplayComponent,
|
|
4526
|
+
Mt as DataType2InputComponent,
|
|
4608
4527
|
mo as DateDisplay,
|
|
4609
4528
|
yo as DateInput,
|
|
4610
|
-
|
|
4529
|
+
Do as DateRangeInput,
|
|
4611
4530
|
po as DateTimeDisplay,
|
|
4612
|
-
|
|
4613
|
-
|
|
4531
|
+
ji as DateTimeHideTimeDisplay,
|
|
4532
|
+
bo as DateTimeRangeInput,
|
|
4614
4533
|
lo as EmojiCountryFlag,
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4534
|
+
_o as EnumInput,
|
|
4535
|
+
sn as FormItem,
|
|
4536
|
+
Ao as FormItemInner,
|
|
4537
|
+
rn as FormItemLabel,
|
|
4538
|
+
gi as LanguageSelector,
|
|
4539
|
+
mi as Loading,
|
|
4540
|
+
hi as LoadingInline,
|
|
4541
|
+
ne as LocaleContext,
|
|
4542
|
+
di as LocaleProvider,
|
|
4624
4543
|
fo as MenuTrie,
|
|
4625
4544
|
dt as MultiForeignKeyDisplay,
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4545
|
+
on as MultiForeignKeyInput,
|
|
4546
|
+
N as MultiLingualString,
|
|
4547
|
+
Si as NotAuthorized,
|
|
4548
|
+
fi as NotFound,
|
|
4549
|
+
Wt as NotFoundInline,
|
|
4550
|
+
pi as NotFoundSubPage,
|
|
4551
|
+
De as NumberInput,
|
|
4552
|
+
xi as OrderedUniqueList,
|
|
4634
4553
|
Je as Permission,
|
|
4635
4554
|
so as SVGCountryFlag,
|
|
4636
|
-
|
|
4637
|
-
|
|
4555
|
+
Kr as SearchForm,
|
|
4556
|
+
Hr as SearchFormItem,
|
|
4638
4557
|
at as SeraContext,
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4558
|
+
Fi as SeraContextProvider,
|
|
4559
|
+
Ti as SeraEmbeddedTable,
|
|
4560
|
+
Ei as SeraForm,
|
|
4561
|
+
Ni as SeraSearch,
|
|
4562
|
+
Mi as SeraTable,
|
|
4563
|
+
_i as SeraVerticalMenu,
|
|
4564
|
+
Jr as SeraView,
|
|
4565
|
+
ki as SeraViewTab,
|
|
4647
4566
|
ut as SingleForeignKeyDisplay,
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4567
|
+
nn as SingleForeignKeyInput,
|
|
4568
|
+
Qt as TestIdContext,
|
|
4569
|
+
Ri as TestIdProvider,
|
|
4570
|
+
Se as TextInput,
|
|
4571
|
+
Xt as Trie,
|
|
4572
|
+
Pt as TrieNode,
|
|
4652
4573
|
uo as buildMenuItemIndex,
|
|
4653
|
-
|
|
4574
|
+
T as countryFlags,
|
|
4654
4575
|
co as filterAllowedItems,
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
yi as
|
|
4659
|
-
|
|
4660
|
-
|
|
4576
|
+
qr as getNumberOfFilters,
|
|
4577
|
+
Jt as getPropertyValue,
|
|
4578
|
+
Ur as getReadableFilters,
|
|
4579
|
+
yi as getTestIdProps,
|
|
4580
|
+
vi as groupBy,
|
|
4581
|
+
Ci as groupByAsList,
|
|
4582
|
+
Ai as groupFields,
|
|
4583
|
+
$i as groupFormFields,
|
|
4661
4584
|
ko as isHorizontalLayout,
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4585
|
+
_n as isSeraColumn,
|
|
4586
|
+
Vi as makeEmbeddedTableColumns,
|
|
4587
|
+
yn as makeTableColumn,
|
|
4588
|
+
Di as makeTableColumnFromNestedProperty,
|
|
4589
|
+
bi as makeTableColumns,
|
|
4590
|
+
Et as setPropertyValue,
|
|
4591
|
+
he as translateMultiLingualString,
|
|
4592
|
+
wi as uniqueList,
|
|
4593
|
+
ci as useMultiLingualString,
|
|
4594
|
+
z as useTestId
|
|
4671
4595
|
};
|