sera-components 1.6.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form/embedded-form.d.ts +1 -0
- package/dist/form/form.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +801 -794
- package/dist/index.umd.cjs +6 -6
- package/dist/misc/menu.d.ts +4 -4
- package/dist/sera-context.d.ts +4 -4
- package/dist/table/embedded-table.d.ts +7 -0
- package/dist/table/table-pagination.d.ts +3 -1
- package/dist/table/table.d.ts +5 -0
- package/dist/types.d.ts +8 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@ var Dn = Object.defineProperty;
|
|
|
2
2
|
var Vn = (e, n, t) => n in e ? Dn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var ee = (e, n, t) => Vn(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import * as Xe from "react";
|
|
5
|
-
import
|
|
6
|
-
import { Paper as ie, Image as
|
|
5
|
+
import Tn, { createContext as be, useContext as U, useMemo as _, useState as M, useEffect as De } from "react";
|
|
6
|
+
import { Paper as ie, Image as An, Text as E, Menu as ae, Button as q, Container as Nn, Alert as lt, Stack as X, Flex as B, Loader as Ee, NavLink as jt, Checkbox as de, Group as L, Input as J, useCombobox as qt, Combobox as z, Grid as A, InputBase as kn, PasswordInput as Bt, Select as On, CloseButton as Ln, Divider as zn, Tooltip as Ut, Fieldset as Kt, Table as Yt, rem as ge, Pagination as Gn, MenuTarget as Hn, MenuDropdown as qn, MenuItem as Bn, TextInput as _t, Popover as Le, ActionIcon as Ft, Tabs as Re } from "@mantine/core";
|
|
7
7
|
import { IconCheck as Un, IconInfoCircle as at, IconChevronRight as Kn, IconSearch as ut, IconCalendar as $e, IconHelpCircle as Wt, IconPlus as Yn, IconPencil as Wn, IconReload as Xn, IconDatabaseImport as Jn, IconDownload as Qn, IconDatabaseOff as Zn, IconSelector as eo, IconCircleX as to, IconAdjustmentsHorizontal as no, IconKeyboard as oo } from "@tabler/icons-react";
|
|
8
8
|
import { observer as oe } from "mobx-react-lite";
|
|
9
|
-
import { isNestedProperty as Xt, NestedProperty as
|
|
9
|
+
import { isNestedProperty as Xt, NestedProperty as Y, isObjectProperty as se, DynamicMultiLingualString as ro, isDraftRecord as Jt, I18NStore as io, validators as It } from "sera-db";
|
|
10
10
|
import { IMaskInput as so } from "react-imask";
|
|
11
|
-
import
|
|
11
|
+
import Z from "dayjs";
|
|
12
12
|
import { DatePickerInput as Je, DateTimePicker as Pt } from "@mantine/dates";
|
|
13
13
|
import { debounce as lo } from "throttle-debounce";
|
|
14
14
|
var ye = { exports: {} }, fe = {};
|
|
@@ -56,230 +56,230 @@ var me = {};
|
|
|
56
56
|
var $t;
|
|
57
57
|
function uo() {
|
|
58
58
|
return $t || ($t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
59
|
-
function e(
|
|
60
|
-
if (
|
|
61
|
-
if (typeof
|
|
62
|
-
return
|
|
63
|
-
if (typeof
|
|
64
|
-
switch (
|
|
59
|
+
function e(C) {
|
|
60
|
+
if (C == null) return null;
|
|
61
|
+
if (typeof C == "function")
|
|
62
|
+
return C.$$typeof === we ? null : C.displayName || C.name || null;
|
|
63
|
+
if (typeof C == "string") return C;
|
|
64
|
+
switch (C) {
|
|
65
65
|
case v:
|
|
66
66
|
return "Fragment";
|
|
67
|
-
case
|
|
67
|
+
case R:
|
|
68
68
|
return "Profiler";
|
|
69
|
-
case
|
|
69
|
+
case S:
|
|
70
70
|
return "StrictMode";
|
|
71
|
-
case
|
|
71
|
+
case k:
|
|
72
72
|
return "Suspense";
|
|
73
|
-
case
|
|
73
|
+
case F:
|
|
74
74
|
return "SuspenseList";
|
|
75
|
-
case
|
|
75
|
+
case Te:
|
|
76
76
|
return "Activity";
|
|
77
77
|
}
|
|
78
|
-
if (typeof
|
|
79
|
-
switch (typeof
|
|
78
|
+
if (typeof C == "object")
|
|
79
|
+
switch (typeof C.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
|
+
), C.$$typeof) {
|
|
82
82
|
case h:
|
|
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 I:
|
|
85
|
+
return C.displayName || "Context";
|
|
86
|
+
case j:
|
|
87
|
+
return (C._context.displayName || "Context") + ".Consumer";
|
|
88
|
+
case P:
|
|
89
|
+
var y = C.render;
|
|
90
|
+
return C = C.displayName, C || (C = y.displayName || y.name || "", C = C !== "" ? "ForwardRef(" + C + ")" : "ForwardRef"), C;
|
|
91
|
+
case V:
|
|
92
|
+
return y = C.displayName || null, y !== null ? y : e(C.type) || "Memo";
|
|
93
|
+
case G:
|
|
94
|
+
y = C._payload, C = C._init;
|
|
95
95
|
try {
|
|
96
|
-
return e(
|
|
96
|
+
return e(C(y));
|
|
97
97
|
} catch {
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
|
-
function n(
|
|
103
|
-
return "" +
|
|
102
|
+
function n(C) {
|
|
103
|
+
return "" + C;
|
|
104
104
|
}
|
|
105
|
-
function t(
|
|
105
|
+
function t(C) {
|
|
106
106
|
try {
|
|
107
|
-
n(
|
|
108
|
-
var
|
|
107
|
+
n(C);
|
|
108
|
+
var y = !1;
|
|
109
109
|
} catch {
|
|
110
|
-
|
|
110
|
+
y = !0;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
var
|
|
115
|
-
return
|
|
116
|
-
|
|
112
|
+
if (y) {
|
|
113
|
+
y = console;
|
|
114
|
+
var $ = y.error, b = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
|
|
115
|
+
return $.call(
|
|
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
|
+
b
|
|
119
|
+
), n(C);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function o(
|
|
123
|
-
if (
|
|
124
|
-
if (typeof
|
|
122
|
+
function o(C) {
|
|
123
|
+
if (C === v) return "<>";
|
|
124
|
+
if (typeof C == "object" && C !== null && C.$$typeof === G)
|
|
125
125
|
return "<...>";
|
|
126
126
|
try {
|
|
127
|
-
var
|
|
128
|
-
return
|
|
127
|
+
var y = e(C);
|
|
128
|
+
return y ? "<" + y + ">" : "<...>";
|
|
129
129
|
} catch {
|
|
130
130
|
return "<...>";
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
function r() {
|
|
134
|
-
var
|
|
135
|
-
return
|
|
134
|
+
var C = Ae.A;
|
|
135
|
+
return C === null ? null : C.getOwner();
|
|
136
136
|
}
|
|
137
137
|
function i() {
|
|
138
138
|
return Error("react-stack-top-frame");
|
|
139
139
|
}
|
|
140
|
-
function s(
|
|
141
|
-
if (vt.call(
|
|
142
|
-
var
|
|
143
|
-
if (
|
|
140
|
+
function s(C) {
|
|
141
|
+
if (vt.call(C, "key")) {
|
|
142
|
+
var y = Object.getOwnPropertyDescriptor(C, "key").get;
|
|
143
|
+
if (y && y.isReactWarning) return !1;
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return C.key !== void 0;
|
|
146
146
|
}
|
|
147
|
-
function a(
|
|
148
|
-
function
|
|
147
|
+
function a(C, y) {
|
|
148
|
+
function $() {
|
|
149
149
|
Ct || (Ct = !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
|
-
|
|
155
|
-
get:
|
|
154
|
+
$.isReactWarning = !0, Object.defineProperty(C, "key", {
|
|
155
|
+
get: $,
|
|
156
156
|
configurable: !0
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
function u() {
|
|
160
|
-
var
|
|
161
|
-
return wt[
|
|
160
|
+
var C = e(this.type);
|
|
161
|
+
return wt[C] || (wt[C] = !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
|
+
)), C = this.props.ref, C !== void 0 ? C : null;
|
|
164
164
|
}
|
|
165
|
-
function c(
|
|
166
|
-
var
|
|
167
|
-
return
|
|
168
|
-
$$typeof:
|
|
169
|
-
type:
|
|
170
|
-
key:
|
|
171
|
-
props:
|
|
172
|
-
_owner:
|
|
173
|
-
}, (
|
|
165
|
+
function c(C, y, $, b, xe, ke) {
|
|
166
|
+
var D = $.ref;
|
|
167
|
+
return C = {
|
|
168
|
+
$$typeof: f,
|
|
169
|
+
type: C,
|
|
170
|
+
key: y,
|
|
171
|
+
props: $,
|
|
172
|
+
_owner: b
|
|
173
|
+
}, (D !== void 0 ? D : null) !== null ? Object.defineProperty(C, "ref", {
|
|
174
174
|
enumerable: !1,
|
|
175
175
|
get: u
|
|
176
|
-
}) : Object.defineProperty(
|
|
176
|
+
}) : Object.defineProperty(C, "ref", { enumerable: !1, value: null }), C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
180
|
value: 0
|
|
181
|
-
}), Object.defineProperty(
|
|
181
|
+
}), Object.defineProperty(C, "_debugInfo", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
185
|
value: null
|
|
186
|
-
}), Object.defineProperty(
|
|
186
|
+
}), Object.defineProperty(C, "_debugStack", {
|
|
187
187
|
configurable: !1,
|
|
188
188
|
enumerable: !1,
|
|
189
189
|
writable: !0,
|
|
190
190
|
value: xe
|
|
191
|
-
}), Object.defineProperty(
|
|
191
|
+
}), Object.defineProperty(C, "_debugTask", {
|
|
192
192
|
configurable: !1,
|
|
193
193
|
enumerable: !1,
|
|
194
194
|
writable: !0,
|
|
195
195
|
value: ke
|
|
196
|
-
}), Object.freeze && (Object.freeze(
|
|
196
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
var
|
|
200
|
-
if (
|
|
201
|
-
if (
|
|
202
|
-
if (Mn(
|
|
203
|
-
for (
|
|
204
|
-
m(b
|
|
205
|
-
Object.freeze && Object.freeze(
|
|
198
|
+
function g(C, y, $, b, xe, ke) {
|
|
199
|
+
var D = y.children;
|
|
200
|
+
if (D !== void 0)
|
|
201
|
+
if (b)
|
|
202
|
+
if (Mn(D)) {
|
|
203
|
+
for (b = 0; b < D.length; b++)
|
|
204
|
+
m(D[b]);
|
|
205
|
+
Object.freeze && Object.freeze(D);
|
|
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 m(
|
|
211
|
-
if (vt.call(
|
|
212
|
-
|
|
213
|
-
var le = Object.keys(
|
|
210
|
+
else m(D);
|
|
211
|
+
if (vt.call(y, "key")) {
|
|
212
|
+
D = e(C);
|
|
213
|
+
var le = Object.keys(y).filter(function(bn) {
|
|
214
214
|
return bn !== "key";
|
|
215
215
|
});
|
|
216
|
-
|
|
216
|
+
b = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", yt[D + b] || (le = 0 < le.length ? "{" + le.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
|
-
M,
|
|
224
223
|
b,
|
|
224
|
+
D,
|
|
225
225
|
le,
|
|
226
|
-
|
|
227
|
-
), yt[
|
|
226
|
+
D
|
|
227
|
+
), yt[D + b] = !0);
|
|
228
228
|
}
|
|
229
|
-
if (
|
|
230
|
-
|
|
231
|
-
for (var
|
|
232
|
-
|
|
233
|
-
} else
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
typeof
|
|
229
|
+
if (D = null, $ !== void 0 && (t($), D = "" + $), s(y) && (t(y.key), D = "" + y.key), "key" in y) {
|
|
230
|
+
$ = {};
|
|
231
|
+
for (var Oe in y)
|
|
232
|
+
Oe !== "key" && ($[Oe] = y[Oe]);
|
|
233
|
+
} else $ = y;
|
|
234
|
+
return D && a(
|
|
235
|
+
$,
|
|
236
|
+
typeof C == "function" ? C.displayName || C.name || "Unknown" : C
|
|
237
237
|
), c(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
C,
|
|
239
|
+
D,
|
|
240
|
+
$,
|
|
241
241
|
r(),
|
|
242
242
|
xe,
|
|
243
243
|
ke
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
|
-
function m(
|
|
247
|
-
p(
|
|
246
|
+
function m(C) {
|
|
247
|
+
p(C) ? C._store && (C._store.validated = 1) : typeof C == "object" && C !== null && C.$$typeof === G && (C._payload.status === "fulfilled" ? p(C._payload.value) && C._payload.value._store && (C._payload.value._store.validated = 1) : C._store && (C._store.validated = 1));
|
|
248
248
|
}
|
|
249
|
-
function p(
|
|
250
|
-
return typeof
|
|
249
|
+
function p(C) {
|
|
250
|
+
return typeof C == "object" && C !== null && C.$$typeof === f;
|
|
251
251
|
}
|
|
252
|
-
var d =
|
|
252
|
+
var d = Tn, f = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), I = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), Te = Symbol.for("react.activity"), we = Symbol.for("react.client.reference"), Ae = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, vt = Object.prototype.hasOwnProperty, Mn = 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(C) {
|
|
257
|
+
return C();
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
var Ct, wt = {}, xt = d.react_stack_bottom_frame.bind(
|
|
261
261
|
d,
|
|
262
262
|
i
|
|
263
263
|
)(), Rt = Ne(o(i)), yt = {};
|
|
264
|
-
me.Fragment = v, me.jsx = function(
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
me.Fragment = v, me.jsx = function(C, y, $) {
|
|
265
|
+
var b = 1e4 > Ae.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return g(
|
|
267
|
+
C,
|
|
268
|
+
y,
|
|
269
|
+
$,
|
|
270
270
|
!1,
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
b ? Error("react-stack-top-frame") : xt,
|
|
272
|
+
b ? Ne(o(C)) : Rt
|
|
273
273
|
);
|
|
274
|
-
}, me.jsxs = function(
|
|
275
|
-
var
|
|
276
|
-
return
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
}, me.jsxs = function(C, y, $) {
|
|
275
|
+
var b = 1e4 > Ae.recentlyCreatedOwnerStacks++;
|
|
276
|
+
return g(
|
|
277
|
+
C,
|
|
278
|
+
y,
|
|
279
|
+
$,
|
|
280
280
|
!0,
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
b ? Error("react-stack-top-frame") : xt,
|
|
282
|
+
b ? Ne(o(C)) : Rt
|
|
283
283
|
);
|
|
284
284
|
};
|
|
285
285
|
})()), me;
|
|
@@ -289,7 +289,7 @@ function co() {
|
|
|
289
289
|
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? ye.exports = ao() : ye.exports = uo()), ye.exports;
|
|
290
290
|
}
|
|
291
291
|
var l = co();
|
|
292
|
-
const
|
|
292
|
+
const T = {
|
|
293
293
|
UK: {
|
|
294
294
|
svgFlag: "https://flagcdn.com/gb.svg",
|
|
295
295
|
emojiFlag: "🇬🇧"
|
|
@@ -354,14 +354,14 @@ const V = {
|
|
|
354
354
|
svgFlag: "https://flagcdn.com/kh.svg",
|
|
355
355
|
emojiFlag: "🇰🇭"
|
|
356
356
|
}
|
|
357
|
-
}, go = ({ flag: e }) => /* @__PURE__ */ l.jsx(ie, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(
|
|
358
|
-
|
|
357
|
+
}, go = ({ flag: e }) => /* @__PURE__ */ l.jsx(ie, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(An, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), fo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
|
|
358
|
+
E,
|
|
359
359
|
{
|
|
360
360
|
component: "span",
|
|
361
361
|
style: (n) => ({ textShadow: n.shadows.xs }),
|
|
362
362
|
children: e.emojiFlag
|
|
363
363
|
}
|
|
364
|
-
), Qe = navigator.userAgent.includes("Windows") ? go : fo, re = be(new Intl.Locale("en-US")),
|
|
364
|
+
), Qe = navigator.userAgent.includes("Windows") ? go : fo, re = be(new Intl.Locale("en-US")), Si = oe(
|
|
365
365
|
({
|
|
366
366
|
value: e,
|
|
367
367
|
children: n
|
|
@@ -374,15 +374,15 @@ const V = {
|
|
|
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
|
+
}, vi = ({
|
|
386
386
|
locale: e,
|
|
387
387
|
setLocale: n
|
|
388
388
|
}) => {
|
|
@@ -393,37 +393,37 @@ const V = {
|
|
|
393
393
|
onClick: () => n(s),
|
|
394
394
|
leftSection: /* @__PURE__ */ l.jsx(Qe, { flag: r }),
|
|
395
395
|
rightSection: e.language === o && /* @__PURE__ */ l.jsx(Un, { size: "15", color: "#2986cc", stroke: 2 }),
|
|
396
|
-
children: /* @__PURE__ */ l.jsx(
|
|
396
|
+
children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: i })
|
|
397
397
|
},
|
|
398
398
|
o
|
|
399
399
|
)
|
|
400
400
|
), [je, e]);
|
|
401
401
|
return /* @__PURE__ */ l.jsxs(ae, { width: 170, children: [
|
|
402
402
|
/* @__PURE__ */ l.jsx(ae.Target, { children: /* @__PURE__ */ l.jsx(
|
|
403
|
-
|
|
403
|
+
q,
|
|
404
404
|
{
|
|
405
405
|
variant: "subtle",
|
|
406
406
|
size: "sm",
|
|
407
407
|
leftSection: /* @__PURE__ */ l.jsx(Qe, { flag: je[e.language].flag }),
|
|
408
|
-
children: /* @__PURE__ */ l.jsx(
|
|
408
|
+
children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: je[e.language].name })
|
|
409
409
|
}
|
|
410
410
|
) }),
|
|
411
411
|
/* @__PURE__ */ l.jsxs(ae.Dropdown, { children: [
|
|
412
|
-
/* @__PURE__ */ l.jsx(ae.Label, { children: /* @__PURE__ */ l.jsx(
|
|
412
|
+
/* @__PURE__ */ l.jsx(ae.Label, { children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: mo.lang2value[e.language] }) }),
|
|
413
413
|
t
|
|
414
414
|
] })
|
|
415
415
|
] });
|
|
416
|
-
},
|
|
417
|
-
const n =
|
|
416
|
+
}, N = ({ value: e }) => {
|
|
417
|
+
const n = U(re);
|
|
418
418
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
419
|
-
},
|
|
420
|
-
const n =
|
|
419
|
+
}, Ci = (e) => {
|
|
420
|
+
const n = U(re);
|
|
421
421
|
return e.lang2value[n.language] || e.lang2value[e.lang];
|
|
422
422
|
};
|
|
423
423
|
function he(e, n) {
|
|
424
424
|
return n.lang2value[e.language] || n.lang2value[n.lang];
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const wi = ({
|
|
427
427
|
message: e,
|
|
428
428
|
navigate: n
|
|
429
429
|
}) => /* @__PURE__ */ l.jsx(
|
|
@@ -443,14 +443,14 @@ const Ci = ({
|
|
|
443
443
|
title: "Not Found",
|
|
444
444
|
variant: "404 - Not Found",
|
|
445
445
|
icon: /* @__PURE__ */ l.jsx(at, { size: 12, stroke: 1.5 }),
|
|
446
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
446
|
+
children: /* @__PURE__ */ l.jsxs(X, { 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(q, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
|
|
449
449
|
] })
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
}
|
|
453
|
-
),
|
|
453
|
+
), xi = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
454
454
|
lt,
|
|
455
455
|
{
|
|
456
456
|
color: "red",
|
|
@@ -459,8 +459,8 @@ const Ci = ({
|
|
|
459
459
|
icon: /* @__PURE__ */ l.jsx(at, { size: 12, stroke: 1.5 }),
|
|
460
460
|
children: e || "Sorry, the page you are looking for does not exist."
|
|
461
461
|
}
|
|
462
|
-
), Qt = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
463
|
-
|
|
462
|
+
), Qt = ({ message: e }) => /* @__PURE__ */ l.jsx(E, { c: "red", size: "sm", children: e || "Not Found" }), Ri = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(B, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
|
|
463
|
+
B,
|
|
464
464
|
{
|
|
465
465
|
gap: "md",
|
|
466
466
|
direction: "column",
|
|
@@ -472,10 +472,10 @@ const Ci = ({
|
|
|
472
472
|
e
|
|
473
473
|
]
|
|
474
474
|
}
|
|
475
|
-
),
|
|
475
|
+
), yi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(B, { gap: "md", direction: "column", justify: "center", align: "center", children: [
|
|
476
476
|
/* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }),
|
|
477
477
|
e
|
|
478
|
-
] }),
|
|
478
|
+
] }), ji = ({ message: e }) => /* @__PURE__ */ l.jsx(
|
|
479
479
|
lt,
|
|
480
480
|
{
|
|
481
481
|
color: "red",
|
|
@@ -485,13 +485,13 @@ const Ci = ({
|
|
|
485
485
|
children: e || "Sorry, you are not authorized to access this page."
|
|
486
486
|
}
|
|
487
487
|
);
|
|
488
|
-
function
|
|
488
|
+
function _i(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 Fi(e, n) {
|
|
495
495
|
const t = [];
|
|
496
496
|
let o;
|
|
497
497
|
return e.reduce((r, i) => {
|
|
@@ -499,14 +499,14 @@ function _i(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 Ii(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 Pi {
|
|
510
510
|
constructor() {
|
|
511
511
|
ee(this, "items", []);
|
|
512
512
|
ee(this, "seen", /* @__PURE__ */ new Set());
|
|
@@ -571,15 +571,15 @@ function dt(e, n) {
|
|
|
571
571
|
function Ze(e, n, t) {
|
|
572
572
|
Xt(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
|
|
573
573
|
}
|
|
574
|
-
const ct = be(!1),
|
|
575
|
-
function
|
|
576
|
-
return
|
|
574
|
+
const ct = be(!1), Ei = ct.Provider;
|
|
575
|
+
function $i(e) {
|
|
576
|
+
return U(ct) ? { "data-testid": e } : {};
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Mi(e, n) {
|
|
579
579
|
return n ? { "data-testid": e } : {};
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
const t =
|
|
581
|
+
function W(e, n = "") {
|
|
582
|
+
const t = U(ct), o = _(() => (n !== "" && (n = `_${n}`), e instanceof Y ? `${e.allProperties.map((r) => r.name).join(".")}${n}` : `${e.name}${n}`), [e, n]);
|
|
583
583
|
return t ? { "data-testid": o } : {};
|
|
584
584
|
}
|
|
585
585
|
var et = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(et || {});
|
|
@@ -615,32 +615,32 @@ function So(e, n) {
|
|
|
615
615
|
return t;
|
|
616
616
|
}).filter((t) => t !== null);
|
|
617
617
|
}
|
|
618
|
-
const
|
|
619
|
-
const [n, t] =
|
|
618
|
+
const bi = (e) => {
|
|
619
|
+
const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = _(() => So(e.items, e.checkPermission), [e.items, e.checkPermission]), u = _(() => ho(e.items), [e.items]), { key2fullpath: c, key2route: g } = _(
|
|
620
620
|
() => po(a),
|
|
621
621
|
[a]
|
|
622
622
|
);
|
|
623
623
|
De(() => {
|
|
624
624
|
const p = window.location.pathname, d = u.findMatchingKey(p);
|
|
625
625
|
d !== void 0 && (r(new Set(c[d])), s(d));
|
|
626
|
-
}, [window.location.pathname,
|
|
626
|
+
}, [window.location.pathname, g]);
|
|
627
627
|
const m = _(() => {
|
|
628
|
-
function p(d,
|
|
628
|
+
function p(d, f) {
|
|
629
629
|
var v;
|
|
630
630
|
const h = d.children !== void 0 && d.children.length > 0;
|
|
631
631
|
return h ? /* @__PURE__ */ l.jsxs(
|
|
632
632
|
"div",
|
|
633
633
|
{
|
|
634
634
|
onMouseEnter: () => {
|
|
635
|
-
o.has(d.key) || t((
|
|
636
|
-
const
|
|
637
|
-
return
|
|
635
|
+
o.has(d.key) || t((S) => {
|
|
636
|
+
const R = new Set(S);
|
|
637
|
+
return R.add(d.key), R;
|
|
638
638
|
});
|
|
639
639
|
},
|
|
640
640
|
onMouseLeave: () => {
|
|
641
|
-
o.has(d.key) || t((
|
|
642
|
-
const
|
|
643
|
-
return
|
|
641
|
+
o.has(d.key) || t((S) => {
|
|
642
|
+
const R = new Set(S);
|
|
643
|
+
return R.delete(d.key), R;
|
|
644
644
|
});
|
|
645
645
|
},
|
|
646
646
|
children: [
|
|
@@ -656,7 +656,7 @@ const Mi = (e) => {
|
|
|
656
656
|
borderRadius: "var(--mantine-radius-sm)"
|
|
657
657
|
}
|
|
658
658
|
},
|
|
659
|
-
ml:
|
|
659
|
+
ml: f === 0 ? void 0 : f === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${f})`,
|
|
660
660
|
w: "unset",
|
|
661
661
|
rightSection: h ? /* @__PURE__ */ l.jsx(
|
|
662
662
|
Kn,
|
|
@@ -667,16 +667,16 @@ const Mi = (e) => {
|
|
|
667
667
|
}
|
|
668
668
|
) : void 0,
|
|
669
669
|
opened: n.has(d.key) || o.has(d.key),
|
|
670
|
-
onClick: (
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
return
|
|
670
|
+
onClick: (S) => {
|
|
671
|
+
S.preventDefault(), r((R) => {
|
|
672
|
+
const j = new Set(R);
|
|
673
|
+
return R.has(d.key) ? j.delete(d.key) : j.add(d.key), j;
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
},
|
|
677
677
|
d.key
|
|
678
678
|
),
|
|
679
|
-
(o.has(d.key) || n.has(d.key)) && d.children.map((
|
|
679
|
+
(o.has(d.key) || n.has(d.key)) && d.children.map((S) => p(S, f + 1))
|
|
680
680
|
]
|
|
681
681
|
},
|
|
682
682
|
`container-${d.key}`
|
|
@@ -684,7 +684,7 @@ const Mi = (e) => {
|
|
|
684
684
|
jt,
|
|
685
685
|
{
|
|
686
686
|
active: i === d.key,
|
|
687
|
-
href: (v = d.route) == null ? void 0 : v.path.getURL(
|
|
687
|
+
href: (v = d.route) == null ? void 0 : v.path.getURL(d.route.defaultPathArgs ?? {}),
|
|
688
688
|
label: d.label,
|
|
689
689
|
leftSection: d.icon,
|
|
690
690
|
styles: {
|
|
@@ -693,10 +693,10 @@ const Mi = (e) => {
|
|
|
693
693
|
borderRadius: "var(--mantine-radius-sm)"
|
|
694
694
|
}
|
|
695
695
|
},
|
|
696
|
-
ml:
|
|
696
|
+
ml: f === 0 ? void 0 : f === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${f})`,
|
|
697
697
|
w: "unset",
|
|
698
|
-
onClick: (
|
|
699
|
-
|
|
698
|
+
onClick: (S) => {
|
|
699
|
+
S.ctrlKey || S.metaKey || (S.preventDefault(), d.route != null && d.route.path.path(d.route.defaultPathArgs ?? {}).open(e.navigate));
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
702
|
d.key
|
|
@@ -769,17 +769,17 @@ const ze = 12, en = be({ gap: "sm" }), tn = ({
|
|
|
769
769
|
className: o,
|
|
770
770
|
style: r
|
|
771
771
|
}) => {
|
|
772
|
-
const { gap: i } =
|
|
772
|
+
const { gap: i } = U(en);
|
|
773
773
|
let s = {
|
|
774
774
|
minWidth: 0,
|
|
775
775
|
...r
|
|
776
776
|
};
|
|
777
777
|
if (n !== void 0) {
|
|
778
|
-
const a = n / ze * 100, u = `var(--mantine-spacing-${i})`, c = (ze - n) / ze,
|
|
778
|
+
const a = n / ze * 100, u = `var(--mantine-spacing-${i})`, c = (ze - n) / ze, g = `calc(${a}% - ${c} * ${u})`;
|
|
779
779
|
s = {
|
|
780
780
|
...s,
|
|
781
|
-
flex: `0 0 ${
|
|
782
|
-
maxWidth:
|
|
781
|
+
flex: `0 0 ${g}`,
|
|
782
|
+
maxWidth: g
|
|
783
783
|
};
|
|
784
784
|
} else
|
|
785
785
|
s = {
|
|
@@ -787,7 +787,7 @@ const ze = 12, en = be({ gap: "sm" }), tn = ({
|
|
|
787
787
|
flex: `${t ?? 1} 1 0px`
|
|
788
788
|
};
|
|
789
789
|
return /* @__PURE__ */ l.jsx("div", { className: o, style: s, children: e });
|
|
790
|
-
}, _e = ({ value: e }) => /* @__PURE__ */ l.jsx(
|
|
790
|
+
}, _e = ({ value: e }) => /* @__PURE__ */ l.jsx(E, { size: "sm", children: e });
|
|
791
791
|
function Ce(e, n) {
|
|
792
792
|
return n.toLocaleDateString(e.baseName, {
|
|
793
793
|
year: "numeric",
|
|
@@ -800,20 +800,20 @@ function on(e, n, t = !0) {
|
|
|
800
800
|
return t ? Ce(e, n) + ` ${o}:${r}:${i}` : Ce(e, n) + ` ${o}:${r}`;
|
|
801
801
|
}
|
|
802
802
|
const Co = ({ value: e }) => {
|
|
803
|
-
const n =
|
|
803
|
+
const n = U(re), t = _(
|
|
804
804
|
() => on(n, e),
|
|
805
805
|
[n, e]
|
|
806
806
|
);
|
|
807
|
-
return /* @__PURE__ */ l.jsx(
|
|
807
|
+
return /* @__PURE__ */ l.jsx(E, { size: "sm", children: t });
|
|
808
808
|
}, wo = ({ value: e }) => {
|
|
809
|
-
const n =
|
|
810
|
-
return /* @__PURE__ */ l.jsx(
|
|
811
|
-
},
|
|
812
|
-
const n =
|
|
809
|
+
const n = U(re), t = _(() => Ce(n, e), [n, e]);
|
|
810
|
+
return /* @__PURE__ */ l.jsx(E, { size: "sm", children: t });
|
|
811
|
+
}, Di = ({ value: e }) => {
|
|
812
|
+
const n = U(re), [t, o] = _(() => {
|
|
813
813
|
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");
|
|
814
814
|
return [r, `${i}:${s}:${a}`];
|
|
815
815
|
}, [n, e]);
|
|
816
|
-
return /* @__PURE__ */ l.jsx(
|
|
816
|
+
return /* @__PURE__ */ l.jsx(E, { size: "sm", title: o, children: t });
|
|
817
817
|
}, xo = {
|
|
818
818
|
yes: {
|
|
819
819
|
lang2value: {
|
|
@@ -833,7 +833,7 @@ const Co = ({ value: e }) => {
|
|
|
833
833
|
de,
|
|
834
834
|
{
|
|
835
835
|
checked: e,
|
|
836
|
-
label: /* @__PURE__ */ l.jsx(
|
|
836
|
+
label: /* @__PURE__ */ l.jsx(N, { value: xo[e ? "yes" : "no"] }),
|
|
837
837
|
readOnly: !0
|
|
838
838
|
}
|
|
839
839
|
), yo = ({ property: e, value: n }) => {
|
|
@@ -842,12 +842,12 @@ const Co = ({ value: e }) => {
|
|
|
842
842
|
throw new Error(
|
|
843
843
|
"Invalid usage of EnumDisplay. Expect a property of type enum"
|
|
844
844
|
);
|
|
845
|
-
return /* @__PURE__ */ l.jsx(
|
|
846
|
-
}, gt = be({
|
|
847
|
-
|
|
845
|
+
return /* @__PURE__ */ l.jsx(E, { size: "sm", children: /* @__PURE__ */ l.jsx(N, { value: t.enumType.label[n] }) });
|
|
846
|
+
}, gt = be({ EntityLink: () => null, entityRoutes: {} }), Vi = ({
|
|
847
|
+
EntityLink: e,
|
|
848
848
|
entityRoutes: n,
|
|
849
849
|
children: t
|
|
850
|
-
}) => /* @__PURE__ */ l.jsx(gt.Provider, { value: {
|
|
850
|
+
}) => /* @__PURE__ */ l.jsx(gt.Provider, { value: { EntityLink: e, entityRoutes: n }, children: t });
|
|
851
851
|
function rn(e, n, t, o) {
|
|
852
852
|
const r = e.getByName(n.targetClass), i = o[n.targetClass];
|
|
853
853
|
De(() => {
|
|
@@ -864,19 +864,18 @@ const ft = oe(
|
|
|
864
864
|
property: n,
|
|
865
865
|
value: t
|
|
866
866
|
}) => {
|
|
867
|
-
const {
|
|
867
|
+
const { EntityLink: o, entityRoutes: r } = U(gt), i = _(() => [t], [t]), [s, a] = rn(
|
|
868
868
|
e,
|
|
869
869
|
n,
|
|
870
870
|
i,
|
|
871
871
|
r
|
|
872
872
|
), u = s[t];
|
|
873
|
-
return u === void 0 ? /* @__PURE__ */ l.jsx(
|
|
873
|
+
return u === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Qt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
|
|
874
874
|
o,
|
|
875
875
|
{
|
|
876
876
|
path: a,
|
|
877
877
|
openInNewPage: !1,
|
|
878
|
-
|
|
879
|
-
queryArgs: {},
|
|
878
|
+
args: { id: u.id },
|
|
880
879
|
children: u.name
|
|
881
880
|
}
|
|
882
881
|
);
|
|
@@ -887,7 +886,7 @@ const ft = oe(
|
|
|
887
886
|
property: n,
|
|
888
887
|
value: t
|
|
889
888
|
}) => {
|
|
890
|
-
const {
|
|
889
|
+
const { EntityLink: o, entityRoutes: r } = U(gt), [i, s] = rn(
|
|
891
890
|
e,
|
|
892
891
|
n,
|
|
893
892
|
t,
|
|
@@ -895,13 +894,12 @@ const ft = oe(
|
|
|
895
894
|
);
|
|
896
895
|
return /* @__PURE__ */ l.jsx(L, { gap: "xs", children: t.map((a, u) => {
|
|
897
896
|
const c = i[a];
|
|
898
|
-
return c === void 0 ? /* @__PURE__ */ l.jsx(
|
|
897
|
+
return c === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: t }, a) : c === null ? /* @__PURE__ */ l.jsx(Qt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: c.name }, u) : /* @__PURE__ */ l.jsx(
|
|
899
898
|
o,
|
|
900
899
|
{
|
|
901
900
|
path: s,
|
|
902
901
|
openInNewPage: !1,
|
|
903
|
-
|
|
904
|
-
queryArgs: {},
|
|
902
|
+
args: { id: c.id },
|
|
905
903
|
children: c.name
|
|
906
904
|
},
|
|
907
905
|
u
|
|
@@ -923,7 +921,7 @@ const ft = oe(
|
|
|
923
921
|
onChange: t,
|
|
924
922
|
freeze: o = !1
|
|
925
923
|
}) => {
|
|
926
|
-
const r =
|
|
924
|
+
const r = W(e);
|
|
927
925
|
return /* @__PURE__ */ l.jsx(
|
|
928
926
|
de,
|
|
929
927
|
{
|
|
@@ -943,9 +941,9 @@ const ft = oe(
|
|
|
943
941
|
onChange: t,
|
|
944
942
|
freeze: o = !1
|
|
945
943
|
}) => {
|
|
946
|
-
const r =
|
|
944
|
+
const r = W(e);
|
|
947
945
|
return /* @__PURE__ */ l.jsx(
|
|
948
|
-
|
|
946
|
+
J,
|
|
949
947
|
{
|
|
950
948
|
...r,
|
|
951
949
|
id: e.name,
|
|
@@ -973,63 +971,63 @@ const ft = oe(
|
|
|
973
971
|
}, ue = {
|
|
974
972
|
84: {
|
|
975
973
|
name: "Vietnam",
|
|
976
|
-
flags: [
|
|
974
|
+
flags: [T.VN]
|
|
977
975
|
},
|
|
978
976
|
1: {
|
|
979
977
|
name: "US, Canada",
|
|
980
|
-
flags: [
|
|
978
|
+
flags: [T.US, T.CA]
|
|
981
979
|
},
|
|
982
980
|
61: {
|
|
983
981
|
name: "Australia",
|
|
984
|
-
flags: [
|
|
982
|
+
flags: [T.AU]
|
|
985
983
|
},
|
|
986
984
|
81: {
|
|
987
985
|
name: "Japan",
|
|
988
|
-
flags: [
|
|
986
|
+
flags: [T.JP]
|
|
989
987
|
},
|
|
990
988
|
44: {
|
|
991
989
|
name: "UK",
|
|
992
|
-
flags: [
|
|
990
|
+
flags: [T.UK]
|
|
993
991
|
},
|
|
994
992
|
33: {
|
|
995
993
|
name: "France",
|
|
996
|
-
flags: [
|
|
994
|
+
flags: [T.FR]
|
|
997
995
|
},
|
|
998
996
|
49: {
|
|
999
997
|
name: "Germany",
|
|
1000
|
-
flags: [
|
|
998
|
+
flags: [T.DE]
|
|
1001
999
|
},
|
|
1002
1000
|
91: {
|
|
1003
1001
|
name: "India",
|
|
1004
|
-
flags: [
|
|
1002
|
+
flags: [T.IN]
|
|
1005
1003
|
},
|
|
1006
1004
|
55: {
|
|
1007
1005
|
name: "Brazil",
|
|
1008
|
-
flags: [
|
|
1006
|
+
flags: [T.BR]
|
|
1009
1007
|
},
|
|
1010
1008
|
34: {
|
|
1011
1009
|
name: "Spain",
|
|
1012
|
-
flags: [
|
|
1010
|
+
flags: [T.ES]
|
|
1013
1011
|
},
|
|
1014
1012
|
39: {
|
|
1015
1013
|
name: "Italy",
|
|
1016
|
-
flags: [
|
|
1014
|
+
flags: [T.IT]
|
|
1017
1015
|
},
|
|
1018
1016
|
64: {
|
|
1019
1017
|
name: "New Zealand",
|
|
1020
|
-
flags: [
|
|
1018
|
+
flags: [T.NZ]
|
|
1021
1019
|
},
|
|
1022
1020
|
52: {
|
|
1023
1021
|
name: "Mexico",
|
|
1024
|
-
flags: [
|
|
1022
|
+
flags: [T.MX]
|
|
1025
1023
|
},
|
|
1026
1024
|
86: {
|
|
1027
1025
|
name: "China",
|
|
1028
|
-
flags: [
|
|
1026
|
+
flags: [T.CN]
|
|
1029
1027
|
},
|
|
1030
1028
|
855: {
|
|
1031
1029
|
name: "Cambodia",
|
|
1032
|
-
flags: [
|
|
1030
|
+
flags: [T.CAM]
|
|
1033
1031
|
}
|
|
1034
1032
|
}, Fo = (e, n) => {
|
|
1035
1033
|
if (e === "" || e === void 0)
|
|
@@ -1042,7 +1040,7 @@ const ft = oe(
|
|
|
1042
1040
|
const n = ue[e];
|
|
1043
1041
|
if (n !== void 0)
|
|
1044
1042
|
return /* @__PURE__ */ l.jsxs(L, { gap: "xs", wrap: "nowrap", align: "center", children: [
|
|
1045
|
-
/* @__PURE__ */ l.jsxs(
|
|
1043
|
+
/* @__PURE__ */ l.jsxs(E, { size: "sm", children: [
|
|
1046
1044
|
"+",
|
|
1047
1045
|
e
|
|
1048
1046
|
] }),
|
|
@@ -1058,109 +1056,109 @@ const ft = oe(
|
|
|
1058
1056
|
}) => {
|
|
1059
1057
|
let s = {}, a = {};
|
|
1060
1058
|
i !== void 0 && (s = { "data-testid": `${i}_country_code` }, a = { "data-testid": i });
|
|
1061
|
-
const [u, c] =
|
|
1062
|
-
const
|
|
1063
|
-
return Object.keys(ue).forEach((
|
|
1064
|
-
|
|
1065
|
-
}),
|
|
1066
|
-
}, [ue]), { rawInput:
|
|
1059
|
+
const [u, c] = M(""), [g, m] = M(!1), [p, d] = M(""), [f, h] = M(!1), v = _(() => {
|
|
1060
|
+
const F = new Zt();
|
|
1061
|
+
return Object.keys(ue).forEach((V) => {
|
|
1062
|
+
F.insert(V);
|
|
1063
|
+
}), F;
|
|
1064
|
+
}, [ue]), { rawInput: S } = _(() => {
|
|
1067
1065
|
try {
|
|
1068
|
-
const { match:
|
|
1066
|
+
const { match: F, remaining: V } = Fo(
|
|
1069
1067
|
e,
|
|
1070
1068
|
v
|
|
1071
1069
|
);
|
|
1072
|
-
return d(
|
|
1073
|
-
rawInput:
|
|
1070
|
+
return d(F), h(!1), {
|
|
1071
|
+
rawInput: V
|
|
1074
1072
|
};
|
|
1075
1073
|
} catch {
|
|
1076
1074
|
return h(!0), d(""), {
|
|
1077
1075
|
rawInput: e
|
|
1078
1076
|
};
|
|
1079
1077
|
}
|
|
1080
|
-
}, [e]),
|
|
1078
|
+
}, [e]), R = qt({
|
|
1081
1079
|
onDropdownClose: () => {
|
|
1082
|
-
|
|
1080
|
+
R.resetSelectedOption(), c("");
|
|
1083
1081
|
},
|
|
1084
1082
|
onDropdownOpen: () => {
|
|
1085
|
-
|
|
1083
|
+
R.updateSelectedOptionIndex("active");
|
|
1086
1084
|
}
|
|
1087
|
-
}),
|
|
1088
|
-
if (
|
|
1089
|
-
return `+${
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1092
|
-
},
|
|
1085
|
+
}), j = _(() => Object.keys(ue), [ue]), I = (F, V) => {
|
|
1086
|
+
if (F === void 0)
|
|
1087
|
+
return `+${V}`;
|
|
1088
|
+
const G = F.replace(/[^\d]/g, "");
|
|
1089
|
+
return G.length === 0 ? `+${V}` : G.startsWith("0") ? (m(!0), `+${V}${G}`) : (m(!1), `+${V}${G}`);
|
|
1090
|
+
}, P = _(() => j.filter((F) => ue[F].name.toLowerCase().includes(u.toLowerCase()) || F.includes(u)), [u, j]), k = _(() => P.map((F, V) => /* @__PURE__ */ l.jsx(z.Option, { value: F, children: /* @__PURE__ */ l.jsx(Dt, { value: F }) }, V)), [P]);
|
|
1093
1091
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
1094
1092
|
/* @__PURE__ */ l.jsx(A, { gutter: "xs", children: /* @__PURE__ */ l.jsx(A.Col, { children: /* @__PURE__ */ l.jsxs(L, { gap: 5, children: [
|
|
1095
1093
|
/* @__PURE__ */ l.jsxs(
|
|
1096
|
-
|
|
1094
|
+
z,
|
|
1097
1095
|
{
|
|
1098
|
-
store:
|
|
1096
|
+
store: R,
|
|
1099
1097
|
position: "top-start",
|
|
1100
|
-
onOptionSubmit: (
|
|
1101
|
-
c(""),
|
|
1102
|
-
target: { value:
|
|
1098
|
+
onOptionSubmit: (F) => {
|
|
1099
|
+
c(""), R.closeDropdown(), n({
|
|
1100
|
+
target: { value: I(S, F) }
|
|
1103
1101
|
});
|
|
1104
1102
|
},
|
|
1105
1103
|
disabled: r,
|
|
1106
1104
|
children: [
|
|
1107
|
-
/* @__PURE__ */ l.jsx(
|
|
1105
|
+
/* @__PURE__ */ l.jsx(z.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1108
1106
|
kn,
|
|
1109
1107
|
{
|
|
1110
1108
|
...s,
|
|
1111
1109
|
component: "button",
|
|
1112
1110
|
type: "button",
|
|
1113
1111
|
pointer: !0,
|
|
1114
|
-
rightSection: /* @__PURE__ */ l.jsx(
|
|
1115
|
-
onClick: () =>
|
|
1112
|
+
rightSection: /* @__PURE__ */ l.jsx(z.Chevron, {}),
|
|
1113
|
+
onClick: () => R.toggleDropdown(),
|
|
1116
1114
|
rightSectionPointerEvents: "none",
|
|
1117
1115
|
disabled: r,
|
|
1118
1116
|
children: /* @__PURE__ */ l.jsx(Dt, { value: p })
|
|
1119
1117
|
}
|
|
1120
1118
|
) }),
|
|
1121
|
-
/* @__PURE__ */ l.jsxs(
|
|
1119
|
+
/* @__PURE__ */ l.jsxs(z.Dropdown, { children: [
|
|
1122
1120
|
/* @__PURE__ */ l.jsx(
|
|
1123
|
-
|
|
1121
|
+
z.Search,
|
|
1124
1122
|
{
|
|
1125
1123
|
leftSection: /* @__PURE__ */ l.jsx(ut, { size: 14, stroke: 1.5 }),
|
|
1126
1124
|
placeholder: ".....",
|
|
1127
1125
|
value: u,
|
|
1128
|
-
onChange: (
|
|
1129
|
-
c(
|
|
1126
|
+
onChange: (F) => {
|
|
1127
|
+
c(F.currentTarget.value);
|
|
1130
1128
|
},
|
|
1131
1129
|
disabled: r
|
|
1132
1130
|
}
|
|
1133
1131
|
),
|
|
1134
|
-
/* @__PURE__ */ l.jsx(
|
|
1132
|
+
/* @__PURE__ */ l.jsx(z.Options, { children: k.length > 0 ? k : /* @__PURE__ */ l.jsx(z.Empty, { children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: "Nothing found" }) }) })
|
|
1135
1133
|
] })
|
|
1136
1134
|
]
|
|
1137
1135
|
}
|
|
1138
1136
|
),
|
|
1139
1137
|
p === "" ? /* @__PURE__ */ l.jsx(
|
|
1140
|
-
|
|
1138
|
+
J,
|
|
1141
1139
|
{
|
|
1142
1140
|
...a,
|
|
1143
1141
|
id: o,
|
|
1144
|
-
value:
|
|
1142
|
+
value: S,
|
|
1145
1143
|
type: "phone_number",
|
|
1146
|
-
onChange: (
|
|
1147
|
-
n({ target: { value:
|
|
1144
|
+
onChange: (F) => {
|
|
1145
|
+
n({ target: { value: F.target.value } });
|
|
1148
1146
|
},
|
|
1149
1147
|
error: t,
|
|
1150
1148
|
flex: 1,
|
|
1151
1149
|
disabled: r
|
|
1152
1150
|
}
|
|
1153
1151
|
) : /* @__PURE__ */ l.jsx(
|
|
1154
|
-
|
|
1152
|
+
J,
|
|
1155
1153
|
{
|
|
1156
1154
|
...a,
|
|
1157
1155
|
id: o,
|
|
1158
|
-
value:
|
|
1156
|
+
value: S,
|
|
1159
1157
|
type: "phone_number",
|
|
1160
|
-
onAccept: (
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
target: { value:
|
|
1158
|
+
onAccept: (F) => {
|
|
1159
|
+
const V = F.replace(/[^\d]/g, ""), G = I(V, p);
|
|
1160
|
+
G !== e && n({
|
|
1161
|
+
target: { value: G }
|
|
1164
1162
|
});
|
|
1165
1163
|
},
|
|
1166
1164
|
component: so,
|
|
@@ -1171,7 +1169,7 @@ const ft = oe(
|
|
|
1171
1169
|
}
|
|
1172
1170
|
)
|
|
1173
1171
|
] }) }) }),
|
|
1174
|
-
(
|
|
1172
|
+
(g || f || t && typeof t == "string") && /* @__PURE__ */ l.jsx(A, { gutter: "xs", children: /* @__PURE__ */ l.jsx(A.Col, { children: /* @__PURE__ */ l.jsx(J.Error, { children: g ? /* @__PURE__ */ l.jsx(N, { value: jo }) : f ? /* @__PURE__ */ l.jsx(N, { value: _o }) : t }) }) })
|
|
1175
1173
|
] });
|
|
1176
1174
|
}, Se = ({
|
|
1177
1175
|
property: e,
|
|
@@ -1180,7 +1178,7 @@ const ft = oe(
|
|
|
1180
1178
|
onChange: o,
|
|
1181
1179
|
freeze: r = !1
|
|
1182
1180
|
}) => {
|
|
1183
|
-
const i =
|
|
1181
|
+
const i = W(e), [s, a] = _(() => e.constraints.includes("password") ? ["password", Bt] : e.constraints.includes("phone_number") ? ["phone_number", Io] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", J], [e.constraints]);
|
|
1184
1182
|
return /* @__PURE__ */ l.jsx(
|
|
1185
1183
|
a,
|
|
1186
1184
|
{
|
|
@@ -1199,7 +1197,7 @@ const ft = oe(
|
|
|
1199
1197
|
onChange: t,
|
|
1200
1198
|
freeze: o = !1
|
|
1201
1199
|
}) => {
|
|
1202
|
-
const r =
|
|
1200
|
+
const r = W(e);
|
|
1203
1201
|
return /* @__PURE__ */ l.jsx(
|
|
1204
1202
|
Je,
|
|
1205
1203
|
{
|
|
@@ -1208,7 +1206,7 @@ const ft = oe(
|
|
|
1208
1206
|
value: n || null,
|
|
1209
1207
|
onChange: (i) => {
|
|
1210
1208
|
t(
|
|
1211
|
-
i === null ? void 0 :
|
|
1209
|
+
i === null ? void 0 : Z(i).startOf("day").toDate()
|
|
1212
1210
|
);
|
|
1213
1211
|
},
|
|
1214
1212
|
valueFormat: "YYYY MMM DD",
|
|
@@ -1225,13 +1223,13 @@ const ft = oe(
|
|
|
1225
1223
|
onChange: t,
|
|
1226
1224
|
freeze: o = !1
|
|
1227
1225
|
}) => {
|
|
1228
|
-
const r =
|
|
1226
|
+
const r = U(re), i = W(e);
|
|
1229
1227
|
if (se(e) || e.enumType === void 0)
|
|
1230
1228
|
throw new Error(
|
|
1231
1229
|
"Invalid usage of EnumInput. Expect a property of type enum"
|
|
1232
1230
|
);
|
|
1233
1231
|
const s = e.enumType, [a, u] = _(() => {
|
|
1234
|
-
const c = {},
|
|
1232
|
+
const c = {}, g = Object.entries(s.label).map(
|
|
1235
1233
|
([m, p]) => {
|
|
1236
1234
|
const d = isNaN(Number(m)) ? m : Number(m);
|
|
1237
1235
|
return c[m] = d, {
|
|
@@ -1240,10 +1238,10 @@ const ft = oe(
|
|
|
1240
1238
|
};
|
|
1241
1239
|
}
|
|
1242
1240
|
);
|
|
1243
|
-
return [c,
|
|
1241
|
+
return [c, g];
|
|
1244
1242
|
}, [r, s]);
|
|
1245
1243
|
return /* @__PURE__ */ l.jsx(
|
|
1246
|
-
|
|
1244
|
+
On,
|
|
1247
1245
|
{
|
|
1248
1246
|
...i,
|
|
1249
1247
|
data: u,
|
|
@@ -1267,10 +1265,10 @@ const ft = oe(
|
|
|
1267
1265
|
lang: "en"
|
|
1268
1266
|
}, Mo = new ro(
|
|
1269
1267
|
"confirmation.valuesDoNotMatch"
|
|
1270
|
-
),
|
|
1271
|
-
/* @__PURE__ */ l.jsx(
|
|
1268
|
+
), Ti = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1269
|
+
/* @__PURE__ */ l.jsx(N, { value: $o }),
|
|
1272
1270
|
" ",
|
|
1273
|
-
/* @__PURE__ */ l.jsx(
|
|
1271
|
+
/* @__PURE__ */ l.jsx(N, { value: e.label })
|
|
1274
1272
|
] }), Ai = ({
|
|
1275
1273
|
property: e,
|
|
1276
1274
|
error: n,
|
|
@@ -1278,7 +1276,7 @@ const ft = oe(
|
|
|
1278
1276
|
onChange: o,
|
|
1279
1277
|
freeze: r = !1
|
|
1280
1278
|
}) => {
|
|
1281
|
-
const i =
|
|
1279
|
+
const i = W(e, "confirm"), [s, a] = M(""), [u, c] = M(!1), [g, m] = _(() => e.constraints.includes("password") ? ["password", Bt] : ["text", J], [e.constraints]), p = _(() => {
|
|
1282
1280
|
if (u && s !== t)
|
|
1283
1281
|
return Mo.t({ args: { name: e.label } });
|
|
1284
1282
|
}, [u, s, t, e.label]), d = n || p;
|
|
@@ -1288,9 +1286,9 @@ const ft = oe(
|
|
|
1288
1286
|
...i,
|
|
1289
1287
|
id: `${e.name}-confirm`,
|
|
1290
1288
|
value: s,
|
|
1291
|
-
type:
|
|
1292
|
-
onChange: (
|
|
1293
|
-
const h =
|
|
1289
|
+
type: g,
|
|
1290
|
+
onChange: (f) => {
|
|
1291
|
+
const h = f.target.value;
|
|
1294
1292
|
a(h), c(!0), o(h);
|
|
1295
1293
|
},
|
|
1296
1294
|
error: d,
|
|
@@ -1299,7 +1297,7 @@ const ft = oe(
|
|
|
1299
1297
|
);
|
|
1300
1298
|
};
|
|
1301
1299
|
function bo(e, n) {
|
|
1302
|
-
const [t, o] =
|
|
1300
|
+
const [t, o] = M(""), [r, i] = M([]);
|
|
1303
1301
|
return {
|
|
1304
1302
|
data: r,
|
|
1305
1303
|
query: t,
|
|
@@ -1317,7 +1315,7 @@ function bo(e, n) {
|
|
|
1317
1315
|
table: e.getByName(n.targetClass)
|
|
1318
1316
|
};
|
|
1319
1317
|
}
|
|
1320
|
-
const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(
|
|
1318
|
+
const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(E, { size: "sm", children: e.name }), ln = oe(
|
|
1321
1319
|
(e) => /* @__PURE__ */ l.jsx("h1", { children: "SingleForeignKey" })
|
|
1322
1320
|
), an = oe(
|
|
1323
1321
|
({
|
|
@@ -1331,9 +1329,9 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1331
1329
|
e,
|
|
1332
1330
|
n
|
|
1333
1331
|
);
|
|
1334
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1332
|
+
return /* @__PURE__ */ l.jsxs(X, { gap: "sm", children: [
|
|
1335
1333
|
/* @__PURE__ */ l.jsx(
|
|
1336
|
-
|
|
1334
|
+
To,
|
|
1337
1335
|
{
|
|
1338
1336
|
property: n,
|
|
1339
1337
|
query: a,
|
|
@@ -1348,11 +1346,11 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1348
1346
|
}
|
|
1349
1347
|
),
|
|
1350
1348
|
/* @__PURE__ */ l.jsx(
|
|
1351
|
-
|
|
1349
|
+
Ao,
|
|
1352
1350
|
{
|
|
1353
1351
|
items: t.map((c) => i.get(c)).filter((c) => c != null),
|
|
1354
1352
|
onDelete: (c) => {
|
|
1355
|
-
o(t.filter((
|
|
1353
|
+
o(t.filter((g) => g !== c.id));
|
|
1356
1354
|
},
|
|
1357
1355
|
render: Vo,
|
|
1358
1356
|
freeze: r
|
|
@@ -1360,7 +1358,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1360
1358
|
)
|
|
1361
1359
|
] });
|
|
1362
1360
|
}
|
|
1363
|
-
),
|
|
1361
|
+
), To = ({
|
|
1364
1362
|
property: e,
|
|
1365
1363
|
data: n,
|
|
1366
1364
|
onSelect: t,
|
|
@@ -1370,14 +1368,14 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1370
1368
|
setQuery: s,
|
|
1371
1369
|
freeze: a = !1
|
|
1372
1370
|
}) => {
|
|
1373
|
-
const u =
|
|
1371
|
+
const u = W(e), c = qt({
|
|
1374
1372
|
onDropdownClose: () => c.resetSelectedOption()
|
|
1375
|
-
}),
|
|
1373
|
+
}), g = _(() => n.map((m) => (
|
|
1376
1374
|
// value has to be a string
|
|
1377
|
-
/* @__PURE__ */ l.jsx(
|
|
1375
|
+
/* @__PURE__ */ l.jsx(z.Option, { value: m.id.toString(), children: o(m) }, m.id)
|
|
1378
1376
|
)), [n]);
|
|
1379
1377
|
return /* @__PURE__ */ l.jsxs(
|
|
1380
|
-
|
|
1378
|
+
z,
|
|
1381
1379
|
{
|
|
1382
1380
|
store: c,
|
|
1383
1381
|
onOptionSubmit: (m) => {
|
|
@@ -1387,8 +1385,8 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1387
1385
|
shadow: "sm",
|
|
1388
1386
|
disabled: a,
|
|
1389
1387
|
children: [
|
|
1390
|
-
/* @__PURE__ */ l.jsx(
|
|
1391
|
-
|
|
1388
|
+
/* @__PURE__ */ l.jsx(z.Target, { children: /* @__PURE__ */ l.jsx(
|
|
1389
|
+
J,
|
|
1392
1390
|
{
|
|
1393
1391
|
...u,
|
|
1394
1392
|
id: e.name,
|
|
@@ -1402,11 +1400,11 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1402
1400
|
disabled: a
|
|
1403
1401
|
}
|
|
1404
1402
|
) }),
|
|
1405
|
-
/* @__PURE__ */ l.jsx(
|
|
1403
|
+
/* @__PURE__ */ l.jsx(z.Dropdown, { children: /* @__PURE__ */ l.jsx(z.Options, { children: g.length === 0 ? /* @__PURE__ */ l.jsx(z.Empty, { children: "Nothing found" }) : g }) })
|
|
1406
1404
|
]
|
|
1407
1405
|
}
|
|
1408
1406
|
);
|
|
1409
|
-
},
|
|
1407
|
+
}, Ao = ({
|
|
1410
1408
|
items: e,
|
|
1411
1409
|
onDelete: n,
|
|
1412
1410
|
render: t,
|
|
@@ -1419,7 +1417,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1419
1417
|
i.push(
|
|
1420
1418
|
/* @__PURE__ */ l.jsxs(L, { justify: "space-between", p: "sm", children: [
|
|
1421
1419
|
t(a),
|
|
1422
|
-
!o && /* @__PURE__ */ l.jsx(
|
|
1420
|
+
!o && /* @__PURE__ */ l.jsx(Ln, { size: "sm", onClick: () => n(a) })
|
|
1423
1421
|
] }, s)
|
|
1424
1422
|
), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(zn, {}, `divider-${s}`));
|
|
1425
1423
|
}
|
|
@@ -1428,8 +1426,8 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1428
1426
|
if (r.length !== 0)
|
|
1429
1427
|
return /* @__PURE__ */ l.jsx(ie, { bd: "1px solid #ddd", children: r });
|
|
1430
1428
|
}, No = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
|
|
1431
|
-
const r =
|
|
1432
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1429
|
+
const r = W(e, "start"), i = W(e, "end");
|
|
1430
|
+
return /* @__PURE__ */ l.jsxs(B, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1433
1431
|
/* @__PURE__ */ l.jsx(
|
|
1434
1432
|
Je,
|
|
1435
1433
|
{
|
|
@@ -1438,7 +1436,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1438
1436
|
value: (n == null ? void 0 : n.start) || null,
|
|
1439
1437
|
onChange: (s) => {
|
|
1440
1438
|
t({
|
|
1441
|
-
start: s === null ? void 0 :
|
|
1439
|
+
start: s === null ? void 0 : Z(s).startOf("day").toDate(),
|
|
1442
1440
|
end: n == null ? void 0 : n.end
|
|
1443
1441
|
});
|
|
1444
1442
|
},
|
|
@@ -1461,7 +1459,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1461
1459
|
onChange: (s) => {
|
|
1462
1460
|
t({
|
|
1463
1461
|
start: n == null ? void 0 : n.start,
|
|
1464
|
-
end: s === null ? void 0 :
|
|
1462
|
+
end: s === null ? void 0 : Z(s).startOf("day").toDate()
|
|
1465
1463
|
});
|
|
1466
1464
|
},
|
|
1467
1465
|
valueFormat: "YYYY MMM DD",
|
|
@@ -1475,8 +1473,8 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1475
1473
|
)
|
|
1476
1474
|
] });
|
|
1477
1475
|
}, ko = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
|
|
1478
|
-
const r =
|
|
1479
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1476
|
+
const r = W(e, "start"), i = W(e, "end");
|
|
1477
|
+
return /* @__PURE__ */ l.jsxs(B, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
|
|
1480
1478
|
/* @__PURE__ */ l.jsx(
|
|
1481
1479
|
Pt,
|
|
1482
1480
|
{
|
|
@@ -1485,7 +1483,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1485
1483
|
value: (n == null ? void 0 : n.start) || null,
|
|
1486
1484
|
onChange: (s) => {
|
|
1487
1485
|
t({
|
|
1488
|
-
start: s === null ? void 0 :
|
|
1486
|
+
start: s === null ? void 0 : Z(s).toDate(),
|
|
1489
1487
|
end: n == null ? void 0 : n.end
|
|
1490
1488
|
});
|
|
1491
1489
|
},
|
|
@@ -1509,7 +1507,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1509
1507
|
onChange: (s) => {
|
|
1510
1508
|
t({
|
|
1511
1509
|
start: n == null ? void 0 : n.start,
|
|
1512
|
-
end: s === null ? void 0 :
|
|
1510
|
+
end: s === null ? void 0 : Z(s).toDate()
|
|
1513
1511
|
});
|
|
1514
1512
|
},
|
|
1515
1513
|
valueFormat: "YYYY MMM DD HH:mm",
|
|
@@ -1531,9 +1529,9 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1531
1529
|
"string[]": Se,
|
|
1532
1530
|
enum: Eo,
|
|
1533
1531
|
date: Po
|
|
1534
|
-
},
|
|
1535
|
-
requiredLabelLeft:
|
|
1536
|
-
requiredLabelRight:
|
|
1532
|
+
}, Oo = "_requiredLabelLeft_l5p83_1", Lo = "_requiredLabelRight_l5p83_11", Tt = {
|
|
1533
|
+
requiredLabelLeft: Oo,
|
|
1534
|
+
requiredLabelRight: Lo
|
|
1537
1535
|
}, un = ({
|
|
1538
1536
|
label: e,
|
|
1539
1537
|
name: n,
|
|
@@ -1542,9 +1540,9 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1542
1540
|
style: r,
|
|
1543
1541
|
align: i = "left"
|
|
1544
1542
|
}) => {
|
|
1545
|
-
const s = t ? i === "left" ?
|
|
1546
|
-
return /* @__PURE__ */ l.jsx(
|
|
1547
|
-
/* @__PURE__ */ l.jsx(
|
|
1543
|
+
const s = t ? i === "left" ? Tt.requiredLabelRight : Tt.requiredLabelLeft : "";
|
|
1544
|
+
return /* @__PURE__ */ l.jsx(B, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(L, { gap: 4, children: [
|
|
1545
|
+
/* @__PURE__ */ l.jsx(E, { size: "sm", className: s, children: e }),
|
|
1548
1546
|
o !== void 0 && /* @__PURE__ */ l.jsx(Ut, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
|
|
1549
1547
|
Wt,
|
|
1550
1548
|
{
|
|
@@ -1569,12 +1567,12 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1569
1567
|
onChange: a,
|
|
1570
1568
|
visible: u
|
|
1571
1569
|
}) => {
|
|
1572
|
-
const [c,
|
|
1570
|
+
const [c, g] = M(void 0);
|
|
1573
1571
|
if (u !== void 0 && !u(n))
|
|
1574
1572
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
1575
1573
|
const m = dt(n, t);
|
|
1576
1574
|
return a === void 0 && (a = (p) => {
|
|
1577
|
-
var
|
|
1575
|
+
var f;
|
|
1578
1576
|
if (Jt(n))
|
|
1579
1577
|
Ze(n, t, p);
|
|
1580
1578
|
else {
|
|
@@ -1582,8 +1580,8 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
|
|
|
1582
1580
|
Ze(h, t, p), e.setDraft(h);
|
|
1583
1581
|
}
|
|
1584
1582
|
const d = t.validator(p);
|
|
1585
|
-
d.isValid ?
|
|
1586
|
-
(
|
|
1583
|
+
d.isValid ? g(void 0) : g(
|
|
1584
|
+
(f = d.errorMessage) == null ? void 0 : f.t({ args: { name: t.label } })
|
|
1587
1585
|
);
|
|
1588
1586
|
}), /* @__PURE__ */ l.jsx(
|
|
1589
1587
|
cn,
|
|
@@ -1612,7 +1610,7 @@ function cn({
|
|
|
1612
1610
|
label: a,
|
|
1613
1611
|
onChange: u
|
|
1614
1612
|
}) {
|
|
1615
|
-
return Go(n) ? /* @__PURE__ */ l.jsxs(
|
|
1613
|
+
return Go(n) ? /* @__PURE__ */ l.jsxs(X, { gap: 5, children: [
|
|
1616
1614
|
/* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
|
|
1617
1615
|
/* @__PURE__ */ l.jsx(
|
|
1618
1616
|
A.Col,
|
|
@@ -1625,10 +1623,10 @@ function cn({
|
|
|
1625
1623
|
children: /* @__PURE__ */ l.jsx(
|
|
1626
1624
|
un,
|
|
1627
1625
|
{
|
|
1628
|
-
label: /* @__PURE__ */ l.jsx(
|
|
1626
|
+
label: /* @__PURE__ */ l.jsx(N, { value: t.label }),
|
|
1629
1627
|
name: t.name,
|
|
1630
1628
|
required: t.isRequired,
|
|
1631
|
-
tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1629
|
+
tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
|
|
1632
1630
|
align: n.align
|
|
1633
1631
|
}
|
|
1634
1632
|
)
|
|
@@ -1648,14 +1646,14 @@ function cn({
|
|
|
1648
1646
|
] }),
|
|
1649
1647
|
s !== void 0 && /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
|
|
1650
1648
|
/* @__PURE__ */ l.jsx(A.Col, { span: n.labelCol }),
|
|
1651
|
-
/* @__PURE__ */ l.jsx(A.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
1649
|
+
/* @__PURE__ */ l.jsx(A.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(J.Error, { children: s }) })
|
|
1652
1650
|
] })
|
|
1653
|
-
] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(
|
|
1651
|
+
] }) : (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: [
|
|
1654
1652
|
a,
|
|
1655
1653
|
/* @__PURE__ */ l.jsx(
|
|
1656
1654
|
Ut,
|
|
1657
1655
|
{
|
|
1658
|
-
label: /* @__PURE__ */ l.jsx(
|
|
1656
|
+
label: /* @__PURE__ */ l.jsx(N, { value: t.description }),
|
|
1659
1657
|
withArrow: !0,
|
|
1660
1658
|
children: /* @__PURE__ */ l.jsx(
|
|
1661
1659
|
Wt,
|
|
@@ -1668,10 +1666,10 @@ function cn({
|
|
|
1668
1666
|
}
|
|
1669
1667
|
)
|
|
1670
1668
|
] })), /* @__PURE__ */ l.jsx(
|
|
1671
|
-
|
|
1669
|
+
J.Wrapper,
|
|
1672
1670
|
{
|
|
1673
1671
|
label: a,
|
|
1674
|
-
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
1672
|
+
description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
|
|
1675
1673
|
required: t.isRequired,
|
|
1676
1674
|
children: /* @__PURE__ */ l.jsx(
|
|
1677
1675
|
o,
|
|
@@ -1690,7 +1688,7 @@ function cn({
|
|
|
1690
1688
|
function Go(e) {
|
|
1691
1689
|
return e.type === "horizontal";
|
|
1692
1690
|
}
|
|
1693
|
-
const
|
|
1691
|
+
const Ni = 12, ki = (e) => {
|
|
1694
1692
|
const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Ho(
|
|
1695
1693
|
n,
|
|
1696
1694
|
e.store,
|
|
@@ -1705,10 +1703,10 @@ const Ti = 12, Ni = (e) => {
|
|
|
1705
1703
|
onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
|
|
1706
1704
|
o.preventDefault(), e.onSubmit !== void 0 && Jt(e.record) && e.record.stale && e.record.isValid() && e.onSubmit(e.record);
|
|
1707
1705
|
},
|
|
1708
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
1706
|
+
children: /* @__PURE__ */ l.jsxs(X, { gap: "sm", className: e.className, style: e.styles, children: [
|
|
1709
1707
|
t,
|
|
1710
|
-
/* @__PURE__ */ l.jsx(L, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
|
|
1711
|
-
|
|
1708
|
+
/* @__PURE__ */ l.jsx(L, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
|
|
1709
|
+
q,
|
|
1712
1710
|
{
|
|
1713
1711
|
variant: o.variant,
|
|
1714
1712
|
onClick: () => {
|
|
@@ -1724,25 +1722,25 @@ const Ti = 12, Ni = (e) => {
|
|
|
1724
1722
|
);
|
|
1725
1723
|
};
|
|
1726
1724
|
function Ho(e, n, t, o, r, i) {
|
|
1727
|
-
var c,
|
|
1725
|
+
var c, g;
|
|
1728
1726
|
const s = r.fields, a = [];
|
|
1729
1727
|
for (let m = 0; m < s.length; m++) {
|
|
1730
1728
|
const p = [];
|
|
1731
1729
|
for (let d = 0; d < s[m].length; d++) {
|
|
1732
|
-
const
|
|
1730
|
+
const f = s[m][d];
|
|
1733
1731
|
let h, v = {};
|
|
1734
|
-
if (typeof
|
|
1735
|
-
h =
|
|
1732
|
+
if (typeof f == "function")
|
|
1733
|
+
h = f(n, t);
|
|
1736
1734
|
else {
|
|
1737
|
-
let
|
|
1738
|
-
typeof
|
|
1735
|
+
let S;
|
|
1736
|
+
typeof f == "object" && "prop" in f ? (S = f.prop instanceof Y ? f.prop : e.allProperties[f.prop], f.args !== void 0 && (v = f.args)) : S = f instanceof Y ? f : e.allProperties[f], h = /* @__PURE__ */ l.jsx(
|
|
1739
1737
|
zo,
|
|
1740
1738
|
{
|
|
1741
1739
|
store: n,
|
|
1742
1740
|
record: t,
|
|
1743
|
-
property:
|
|
1741
|
+
property: S,
|
|
1744
1742
|
layout: i,
|
|
1745
|
-
InputComponent: gn(
|
|
1743
|
+
InputComponent: gn(S, v.input),
|
|
1746
1744
|
freeze: v.freeze ?? !1,
|
|
1747
1745
|
visible: v.visible,
|
|
1748
1746
|
label: v.label,
|
|
@@ -1755,7 +1753,7 @@ function Ho(e, n, t, o, r, i) {
|
|
|
1755
1753
|
nn,
|
|
1756
1754
|
{
|
|
1757
1755
|
span: (c = v.colsize) == null ? void 0 : c.span,
|
|
1758
|
-
grow: (
|
|
1756
|
+
grow: (g = v.colsize) == null ? void 0 : g.grow,
|
|
1759
1757
|
children: h
|
|
1760
1758
|
},
|
|
1761
1759
|
`${m}-${d}`
|
|
@@ -1766,13 +1764,13 @@ function Ho(e, n, t, o, r, i) {
|
|
|
1766
1764
|
/* @__PURE__ */ l.jsx(tn, { children: p }, m)
|
|
1767
1765
|
);
|
|
1768
1766
|
}
|
|
1769
|
-
const u = /* @__PURE__ */ l.jsx(
|
|
1767
|
+
const u = /* @__PURE__ */ l.jsx(X, { gap: "sm", children: a }, o);
|
|
1770
1768
|
return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Kt, { legend: r.name, children: u }, o) : u;
|
|
1771
1769
|
}
|
|
1772
1770
|
function gn(e, n) {
|
|
1773
1771
|
if (n !== void 0)
|
|
1774
1772
|
return n;
|
|
1775
|
-
const t = e instanceof
|
|
1773
|
+
const t = e instanceof Y ? e.leafProperty : e;
|
|
1776
1774
|
if (se(t))
|
|
1777
1775
|
return t.cardinality === "N:N" || t.cardinality === "1:N" ? an : ln;
|
|
1778
1776
|
if (Vt[t.datatype] === void 0)
|
|
@@ -1793,16 +1791,16 @@ const qo = oe(
|
|
|
1793
1791
|
onChange: a,
|
|
1794
1792
|
visible: u
|
|
1795
1793
|
}) => {
|
|
1796
|
-
const [c,
|
|
1794
|
+
const [c, g] = M(void 0);
|
|
1797
1795
|
if (u !== void 0 && !u(n))
|
|
1798
1796
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
1799
1797
|
const m = dt(n, t);
|
|
1800
1798
|
return a === void 0 && (a = (p) => {
|
|
1801
|
-
var
|
|
1799
|
+
var f;
|
|
1802
1800
|
Ze(n, t, p);
|
|
1803
1801
|
const d = t.validator(p);
|
|
1804
|
-
d.isValid ?
|
|
1805
|
-
(
|
|
1802
|
+
d.isValid ? g(void 0) : g(
|
|
1803
|
+
(f = d.errorMessage) == null ? void 0 : f.t({ args: { name: t.label } })
|
|
1806
1804
|
);
|
|
1807
1805
|
}), /* @__PURE__ */ l.jsx(
|
|
1808
1806
|
cn,
|
|
@@ -1819,7 +1817,7 @@ const qo = oe(
|
|
|
1819
1817
|
}
|
|
1820
1818
|
);
|
|
1821
1819
|
}
|
|
1822
|
-
),
|
|
1820
|
+
), Oi = (e) => {
|
|
1823
1821
|
const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Bo(
|
|
1824
1822
|
n,
|
|
1825
1823
|
e.record,
|
|
@@ -1834,10 +1832,10 @@ const qo = oe(
|
|
|
1834
1832
|
onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
|
|
1835
1833
|
o.preventDefault(), e.onSubmit !== void 0 && e.record.stale && e.record.isValid() && e.onSubmit(e.record);
|
|
1836
1834
|
},
|
|
1837
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
1835
|
+
children: /* @__PURE__ */ l.jsxs(X, { gap: "sm", className: e.className, style: e.styles, children: [
|
|
1838
1836
|
t,
|
|
1839
|
-
e.actions && e.actions.length > 0 && /* @__PURE__ */ l.jsx(L, { gap: "sm", justify:
|
|
1840
|
-
|
|
1837
|
+
e.actions && e.actions.length > 0 && /* @__PURE__ */ l.jsx(L, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
|
|
1838
|
+
q,
|
|
1841
1839
|
{
|
|
1842
1840
|
variant: o.variant,
|
|
1843
1841
|
onClick: () => {
|
|
@@ -1853,25 +1851,25 @@ const qo = oe(
|
|
|
1853
1851
|
);
|
|
1854
1852
|
};
|
|
1855
1853
|
function Bo(e, n, t, o, r, i) {
|
|
1856
|
-
var c,
|
|
1854
|
+
var c, g;
|
|
1857
1855
|
const s = o.fields, a = [];
|
|
1858
1856
|
for (let m = 0; m < s.length; m++) {
|
|
1859
1857
|
const p = [];
|
|
1860
1858
|
for (let d = 0; d < s[m].length; d++) {
|
|
1861
|
-
const
|
|
1859
|
+
const f = s[m][d];
|
|
1862
1860
|
let h, v = {};
|
|
1863
|
-
if (typeof
|
|
1864
|
-
h =
|
|
1861
|
+
if (typeof f == "function")
|
|
1862
|
+
h = f(n);
|
|
1865
1863
|
else {
|
|
1866
|
-
let
|
|
1867
|
-
typeof
|
|
1864
|
+
let S;
|
|
1865
|
+
typeof f == "object" && "prop" in f ? (S = f.prop instanceof Y ? f.prop : e.allProperties[f.prop], f.args !== void 0 && (v = f.args)) : S = f instanceof Y ? f : e.allProperties[f], h = /* @__PURE__ */ l.jsx(
|
|
1868
1866
|
qo,
|
|
1869
1867
|
{
|
|
1870
1868
|
db: i,
|
|
1871
1869
|
record: n,
|
|
1872
|
-
property:
|
|
1870
|
+
property: S,
|
|
1873
1871
|
layout: r,
|
|
1874
|
-
InputComponent: gn(
|
|
1872
|
+
InputComponent: gn(S, v.input),
|
|
1875
1873
|
freeze: v.freeze ?? !1,
|
|
1876
1874
|
visible: v.visible,
|
|
1877
1875
|
label: v.label,
|
|
@@ -1884,7 +1882,7 @@ function Bo(e, n, t, o, r, i) {
|
|
|
1884
1882
|
nn,
|
|
1885
1883
|
{
|
|
1886
1884
|
span: (c = v.colsize) == null ? void 0 : c.span,
|
|
1887
|
-
grow: (
|
|
1885
|
+
grow: (g = v.colsize) == null ? void 0 : g.grow,
|
|
1888
1886
|
children: h
|
|
1889
1887
|
},
|
|
1890
1888
|
`${m}-${d}`
|
|
@@ -1895,7 +1893,7 @@ function Bo(e, n, t, o, r, i) {
|
|
|
1895
1893
|
/* @__PURE__ */ l.jsx(tn, { children: p }, m)
|
|
1896
1894
|
);
|
|
1897
1895
|
}
|
|
1898
|
-
const u = /* @__PURE__ */ l.jsx(
|
|
1896
|
+
const u = /* @__PURE__ */ l.jsx(X, { gap: "sm", children: a }, t);
|
|
1899
1897
|
return o.name !== void 0 ? /* @__PURE__ */ l.jsx(Kt, { legend: o.name, children: u }, t) : u;
|
|
1900
1898
|
}
|
|
1901
1899
|
/**
|
|
@@ -1911,7 +1909,7 @@ function Bo(e, n, t, o, r, i) {
|
|
|
1911
1909
|
function te(e, n) {
|
|
1912
1910
|
return typeof e == "function" ? e(n) : e;
|
|
1913
1911
|
}
|
|
1914
|
-
function
|
|
1912
|
+
function H(e, n) {
|
|
1915
1913
|
return (t) => {
|
|
1916
1914
|
n.setState((o) => ({
|
|
1917
1915
|
...o,
|
|
@@ -1935,23 +1933,23 @@ function Ko(e, n) {
|
|
|
1935
1933
|
};
|
|
1936
1934
|
return o(e), t;
|
|
1937
1935
|
}
|
|
1938
|
-
function
|
|
1936
|
+
function w(e, n, t) {
|
|
1939
1937
|
let o = [], r;
|
|
1940
1938
|
return (i) => {
|
|
1941
1939
|
let s;
|
|
1942
1940
|
t.key && t.debug && (s = Date.now());
|
|
1943
1941
|
const a = e(i);
|
|
1944
|
-
if (!(a.length !== o.length || a.some((
|
|
1942
|
+
if (!(a.length !== o.length || a.some((g, m) => o[m] !== g)))
|
|
1945
1943
|
return r;
|
|
1946
1944
|
o = a;
|
|
1947
1945
|
let c;
|
|
1948
1946
|
if (t.key && t.debug && (c = Date.now()), r = n(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
1949
|
-
const
|
|
1950
|
-
for (
|
|
1951
|
-
|
|
1952
|
-
return
|
|
1947
|
+
const g = Math.round((Date.now() - s) * 100) / 100, m = Math.round((Date.now() - c) * 100) / 100, p = m / 16, d = (f, h) => {
|
|
1948
|
+
for (f = String(f); f.length < h; )
|
|
1949
|
+
f = " " + f;
|
|
1950
|
+
return f;
|
|
1953
1951
|
};
|
|
1954
|
-
console.info(`%c⏱ ${d(m, 5)} /${d(
|
|
1952
|
+
console.info(`%c⏱ ${d(m, 5)} /${d(g, 5)} ms`, `
|
|
1955
1953
|
font-size: .6rem;
|
|
1956
1954
|
font-weight: bold;
|
|
1957
1955
|
color: hsl(${Math.max(0, Math.min(120 - 120 * p, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -1959,7 +1957,7 @@ function x(e, n, t) {
|
|
|
1959
1957
|
return r;
|
|
1960
1958
|
};
|
|
1961
1959
|
}
|
|
1962
|
-
function
|
|
1960
|
+
function x(e, n, t, o) {
|
|
1963
1961
|
return {
|
|
1964
1962
|
debug: () => {
|
|
1965
1963
|
var r;
|
|
@@ -1979,14 +1977,14 @@ function Yo(e, n, t, o) {
|
|
|
1979
1977
|
column: t,
|
|
1980
1978
|
getValue: () => n.getValue(o),
|
|
1981
1979
|
renderValue: r,
|
|
1982
|
-
getContext:
|
|
1980
|
+
getContext: w(() => [e, t, n, i], (s, a, u, c) => ({
|
|
1983
1981
|
table: s,
|
|
1984
1982
|
column: a,
|
|
1985
1983
|
row: u,
|
|
1986
1984
|
cell: c,
|
|
1987
1985
|
getValue: c.getValue,
|
|
1988
1986
|
renderValue: c.renderValue
|
|
1989
|
-
}),
|
|
1987
|
+
}), x(e.options, "debugCells", "cell.getContext"))
|
|
1990
1988
|
};
|
|
1991
1989
|
return e._features.forEach((s) => {
|
|
1992
1990
|
s.createCell == null || s.createCell(i, t, n, e);
|
|
@@ -1998,42 +1996,42 @@ function Wo(e, n, t, o) {
|
|
|
1998
1996
|
...e._getDefaultColumnDef(),
|
|
1999
1997
|
...n
|
|
2000
1998
|
}, u = a.accessorKey;
|
|
2001
|
-
let c = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0,
|
|
2002
|
-
if (a.accessorFn ?
|
|
1999
|
+
let c = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, g;
|
|
2000
|
+
if (a.accessorFn ? g = a.accessorFn : u && (u.includes(".") ? g = (p) => {
|
|
2003
2001
|
let d = p;
|
|
2004
2002
|
for (const h of u.split(".")) {
|
|
2005
|
-
var
|
|
2006
|
-
d = (
|
|
2003
|
+
var f;
|
|
2004
|
+
d = (f = d) == null ? void 0 : f[h], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
|
|
2007
2005
|
}
|
|
2008
2006
|
return d;
|
|
2009
|
-
} :
|
|
2007
|
+
} : g = (p) => p[a.accessorKey]), !c)
|
|
2010
2008
|
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();
|
|
2011
2009
|
let m = {
|
|
2012
2010
|
id: `${String(c)}`,
|
|
2013
|
-
accessorFn:
|
|
2011
|
+
accessorFn: g,
|
|
2014
2012
|
parent: o,
|
|
2015
2013
|
depth: t,
|
|
2016
2014
|
columnDef: a,
|
|
2017
2015
|
columns: [],
|
|
2018
|
-
getFlatColumns:
|
|
2016
|
+
getFlatColumns: w(() => [!0], () => {
|
|
2019
2017
|
var p;
|
|
2020
2018
|
return [m, ...(p = m.columns) == null ? void 0 : p.flatMap((d) => d.getFlatColumns())];
|
|
2021
|
-
},
|
|
2022
|
-
getLeafColumns:
|
|
2019
|
+
}, x(e.options, "debugColumns", "column.getFlatColumns")),
|
|
2020
|
+
getLeafColumns: w(() => [e._getOrderColumnsFn()], (p) => {
|
|
2023
2021
|
var d;
|
|
2024
2022
|
if ((d = m.columns) != null && d.length) {
|
|
2025
|
-
let
|
|
2026
|
-
return p(
|
|
2023
|
+
let f = m.columns.flatMap((h) => h.getLeafColumns());
|
|
2024
|
+
return p(f);
|
|
2027
2025
|
}
|
|
2028
2026
|
return [m];
|
|
2029
|
-
},
|
|
2027
|
+
}, x(e.options, "debugColumns", "column.getLeafColumns"))
|
|
2030
2028
|
};
|
|
2031
2029
|
for (const p of e._features)
|
|
2032
2030
|
p.createColumn == null || p.createColumn(m, e);
|
|
2033
2031
|
return m;
|
|
2034
2032
|
}
|
|
2035
|
-
const
|
|
2036
|
-
function
|
|
2033
|
+
const O = "debugHeaders";
|
|
2034
|
+
function At(e, n, t) {
|
|
2037
2035
|
var o;
|
|
2038
2036
|
let i = {
|
|
2039
2037
|
id: (o = t.id) != null ? o : n.id,
|
|
@@ -2064,83 +2062,83 @@ function Tt(e, n, t) {
|
|
|
2064
2062
|
}
|
|
2065
2063
|
const Xo = {
|
|
2066
2064
|
createTable: (e) => {
|
|
2067
|
-
e.getHeaderGroups =
|
|
2065
|
+
e.getHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
2068
2066
|
var i, s;
|
|
2069
2067
|
const a = (i = o == null ? void 0 : o.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? s : [], c = t.filter((m) => !(o != null && o.includes(m.id)) && !(r != null && r.includes(m.id)));
|
|
2070
2068
|
return Fe(n, [...a, ...c, ...u], e);
|
|
2071
|
-
},
|
|
2069
|
+
}, x(e.options, O, "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))), Fe(n, t, e, "center")), x(e.options, O, "getCenterHeaderGroups")), e.getLeftHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
2072
2070
|
var r;
|
|
2073
2071
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
2074
2072
|
return Fe(n, i, e, "left");
|
|
2075
|
-
},
|
|
2073
|
+
}, x(e.options, O, "getLeftHeaderGroups")), e.getRightHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
|
|
2076
2074
|
var r;
|
|
2077
2075
|
const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
|
|
2078
2076
|
return Fe(n, i, e, "right");
|
|
2079
|
-
},
|
|
2077
|
+
}, x(e.options, O, "getRightHeaderGroups")), e.getFooterGroups = w(() => [e.getHeaderGroups()], (n) => [...n].reverse(), x(e.options, O, "getFooterGroups")), e.getLeftFooterGroups = w(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), x(e.options, O, "getLeftFooterGroups")), e.getCenterFooterGroups = w(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), x(e.options, O, "getCenterFooterGroups")), e.getRightFooterGroups = w(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), x(e.options, O, "getRightFooterGroups")), e.getFlatHeaders = w(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, O, "getFlatHeaders")), e.getLeftFlatHeaders = w(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, O, "getLeftFlatHeaders")), e.getCenterFlatHeaders = w(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, O, "getCenterFlatHeaders")), e.getRightFlatHeaders = w(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, O, "getRightFlatHeaders")), e.getCenterLeafHeaders = w(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
2080
2078
|
var o;
|
|
2081
2079
|
return !((o = t.subHeaders) != null && o.length);
|
|
2082
|
-
}),
|
|
2080
|
+
}), x(e.options, O, "getCenterLeafHeaders")), e.getLeftLeafHeaders = w(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
2083
2081
|
var o;
|
|
2084
2082
|
return !((o = t.subHeaders) != null && o.length);
|
|
2085
|
-
}),
|
|
2083
|
+
}), x(e.options, O, "getLeftLeafHeaders")), e.getRightLeafHeaders = w(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
2086
2084
|
var o;
|
|
2087
2085
|
return !((o = t.subHeaders) != null && o.length);
|
|
2088
|
-
}),
|
|
2086
|
+
}), x(e.options, O, "getRightLeafHeaders")), e.getLeafHeaders = w(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
2089
2087
|
var r, i, s, a, u, c;
|
|
2090
|
-
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (c = o[0]) == null ? void 0 : c.headers) != null ? u : []].map((
|
|
2091
|
-
},
|
|
2088
|
+
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (c = o[0]) == null ? void 0 : c.headers) != null ? u : []].map((g) => g.getLeafHeaders()).flat();
|
|
2089
|
+
}, x(e.options, O, "getLeafHeaders"));
|
|
2092
2090
|
}
|
|
2093
2091
|
};
|
|
2094
2092
|
function Fe(e, n, t, o) {
|
|
2095
2093
|
var r, i;
|
|
2096
2094
|
let s = 0;
|
|
2097
2095
|
const a = function(p, d) {
|
|
2098
|
-
d === void 0 && (d = 1), s = Math.max(s, d), p.filter((
|
|
2096
|
+
d === void 0 && (d = 1), s = Math.max(s, d), p.filter((f) => f.getIsVisible()).forEach((f) => {
|
|
2099
2097
|
var h;
|
|
2100
|
-
(h =
|
|
2098
|
+
(h = f.columns) != null && h.length && a(f.columns, d + 1);
|
|
2101
2099
|
}, 0);
|
|
2102
2100
|
};
|
|
2103
2101
|
a(e);
|
|
2104
2102
|
let u = [];
|
|
2105
2103
|
const c = (p, d) => {
|
|
2106
|
-
const
|
|
2104
|
+
const f = {
|
|
2107
2105
|
depth: d,
|
|
2108
2106
|
id: [o, `${d}`].filter(Boolean).join("_"),
|
|
2109
2107
|
headers: []
|
|
2110
2108
|
}, h = [];
|
|
2111
2109
|
p.forEach((v) => {
|
|
2112
|
-
const
|
|
2113
|
-
let
|
|
2114
|
-
if (
|
|
2115
|
-
|
|
2110
|
+
const S = [...h].reverse()[0], R = v.column.depth === f.depth;
|
|
2111
|
+
let j, I = !1;
|
|
2112
|
+
if (R && v.column.parent ? j = v.column.parent : (j = v.column, I = !0), S && (S == null ? void 0 : S.column) === j)
|
|
2113
|
+
S.subHeaders.push(v);
|
|
2116
2114
|
else {
|
|
2117
|
-
const
|
|
2118
|
-
id: [o, d,
|
|
2119
|
-
isPlaceholder:
|
|
2120
|
-
placeholderId:
|
|
2115
|
+
const P = At(t, j, {
|
|
2116
|
+
id: [o, d, j.id, v == null ? void 0 : v.id].filter(Boolean).join("_"),
|
|
2117
|
+
isPlaceholder: I,
|
|
2118
|
+
placeholderId: I ? `${h.filter((k) => k.column === j).length}` : void 0,
|
|
2121
2119
|
depth: d,
|
|
2122
2120
|
index: h.length
|
|
2123
2121
|
});
|
|
2124
|
-
|
|
2122
|
+
P.subHeaders.push(v), h.push(P);
|
|
2125
2123
|
}
|
|
2126
|
-
|
|
2127
|
-
}), u.push(
|
|
2128
|
-
},
|
|
2124
|
+
f.headers.push(v), v.headerGroup = f;
|
|
2125
|
+
}), u.push(f), d > 0 && c(h, d - 1);
|
|
2126
|
+
}, g = n.map((p, d) => At(t, p, {
|
|
2129
2127
|
depth: s,
|
|
2130
2128
|
index: d
|
|
2131
2129
|
}));
|
|
2132
|
-
c(
|
|
2133
|
-
const m = (p) => p.filter((
|
|
2134
|
-
let h = 0, v = 0,
|
|
2135
|
-
|
|
2130
|
+
c(g, s - 1), u.reverse();
|
|
2131
|
+
const m = (p) => p.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
2132
|
+
let h = 0, v = 0, S = [0];
|
|
2133
|
+
f.subHeaders && f.subHeaders.length ? (S = [], m(f.subHeaders).forEach((j) => {
|
|
2136
2134
|
let {
|
|
2137
|
-
colSpan:
|
|
2138
|
-
rowSpan:
|
|
2139
|
-
} =
|
|
2140
|
-
h +=
|
|
2135
|
+
colSpan: I,
|
|
2136
|
+
rowSpan: P
|
|
2137
|
+
} = j;
|
|
2138
|
+
h += I, S.push(P);
|
|
2141
2139
|
})) : h = 1;
|
|
2142
|
-
const
|
|
2143
|
-
return v = v +
|
|
2140
|
+
const R = Math.min(...S);
|
|
2141
|
+
return v = v + R, f.colSpan = h, f.rowSpan = v, {
|
|
2144
2142
|
colSpan: h,
|
|
2145
2143
|
rowSpan: v
|
|
2146
2144
|
};
|
|
@@ -2180,14 +2178,14 @@ const Jo = (e, n, t, o, r, i, s) => {
|
|
|
2180
2178
|
getParentRows: () => {
|
|
2181
2179
|
let u = [], c = a;
|
|
2182
2180
|
for (; ; ) {
|
|
2183
|
-
const
|
|
2184
|
-
if (!
|
|
2185
|
-
u.push(
|
|
2181
|
+
const g = c.getParentRow();
|
|
2182
|
+
if (!g) break;
|
|
2183
|
+
u.push(g), c = g;
|
|
2186
2184
|
}
|
|
2187
2185
|
return u.reverse();
|
|
2188
2186
|
},
|
|
2189
|
-
getAllCells:
|
|
2190
|
-
_getAllCellsByColumnId:
|
|
2187
|
+
getAllCells: w(() => [e.getAllLeafColumns()], (u) => u.map((c) => Yo(e, a, c, c.id)), x(e.options, "debugRows", "getAllCells")),
|
|
2188
|
+
_getAllCellsByColumnId: w(() => [a.getAllCells()], (u) => u.reduce((c, g) => (c[g.column.id] = g, c), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
2191
2189
|
};
|
|
2192
2190
|
for (let u = 0; u < e._features.length; u++) {
|
|
2193
2191
|
const c = e._features[u];
|
|
@@ -2206,36 +2204,36 @@ const Jo = (e, n, t, o, r, i, s) => {
|
|
|
2206
2204
|
const i = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
|
|
2207
2205
|
return !!(!((r = e.getValue(n)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
|
|
2208
2206
|
};
|
|
2209
|
-
fn.autoRemove = (e) =>
|
|
2207
|
+
fn.autoRemove = (e) => K(e);
|
|
2210
2208
|
const mn = (e, n, t) => {
|
|
2211
2209
|
var o;
|
|
2212
2210
|
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
|
|
2213
2211
|
};
|
|
2214
|
-
mn.autoRemove = (e) =>
|
|
2212
|
+
mn.autoRemove = (e) => K(e);
|
|
2215
2213
|
const pn = (e, n, t) => {
|
|
2216
2214
|
var o;
|
|
2217
2215
|
return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
2218
2216
|
};
|
|
2219
|
-
pn.autoRemove = (e) =>
|
|
2217
|
+
pn.autoRemove = (e) => K(e);
|
|
2220
2218
|
const hn = (e, n, t) => {
|
|
2221
2219
|
var o;
|
|
2222
2220
|
return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
|
|
2223
2221
|
};
|
|
2224
|
-
hn.autoRemove = (e) =>
|
|
2222
|
+
hn.autoRemove = (e) => K(e);
|
|
2225
2223
|
const Sn = (e, n, t) => !t.some((o) => {
|
|
2226
2224
|
var r;
|
|
2227
2225
|
return !((r = e.getValue(n)) != null && r.includes(o));
|
|
2228
2226
|
});
|
|
2229
|
-
Sn.autoRemove = (e) =>
|
|
2227
|
+
Sn.autoRemove = (e) => K(e) || !(e != null && e.length);
|
|
2230
2228
|
const vn = (e, n, t) => t.some((o) => {
|
|
2231
2229
|
var r;
|
|
2232
2230
|
return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
|
|
2233
2231
|
});
|
|
2234
|
-
vn.autoRemove = (e) =>
|
|
2232
|
+
vn.autoRemove = (e) => K(e) || !(e != null && e.length);
|
|
2235
2233
|
const Cn = (e, n, t) => e.getValue(n) === t;
|
|
2236
|
-
Cn.autoRemove = (e) =>
|
|
2234
|
+
Cn.autoRemove = (e) => K(e);
|
|
2237
2235
|
const wn = (e, n, t) => e.getValue(n) == t;
|
|
2238
|
-
wn.autoRemove = (e) =>
|
|
2236
|
+
wn.autoRemove = (e) => K(e);
|
|
2239
2237
|
const pt = (e, n, t) => {
|
|
2240
2238
|
let [o, r] = t;
|
|
2241
2239
|
const i = e.getValue(n);
|
|
@@ -2249,8 +2247,8 @@ pt.resolveFilterValue = (e) => {
|
|
|
2249
2247
|
}
|
|
2250
2248
|
return [i, s];
|
|
2251
2249
|
};
|
|
2252
|
-
pt.autoRemove = (e) =>
|
|
2253
|
-
const
|
|
2250
|
+
pt.autoRemove = (e) => K(e) || K(e[0]) && K(e[1]);
|
|
2251
|
+
const Q = {
|
|
2254
2252
|
includesString: fn,
|
|
2255
2253
|
includesStringSensitive: mn,
|
|
2256
2254
|
equalsString: pn,
|
|
@@ -2261,7 +2259,7 @@ const J = {
|
|
|
2261
2259
|
weakEquals: wn,
|
|
2262
2260
|
inNumberRange: pt
|
|
2263
2261
|
};
|
|
2264
|
-
function
|
|
2262
|
+
function K(e) {
|
|
2265
2263
|
return e == null || e === "";
|
|
2266
2264
|
}
|
|
2267
2265
|
const Zo = {
|
|
@@ -2273,19 +2271,19 @@ const Zo = {
|
|
|
2273
2271
|
...e
|
|
2274
2272
|
}),
|
|
2275
2273
|
getDefaultOptions: (e) => ({
|
|
2276
|
-
onColumnFiltersChange:
|
|
2274
|
+
onColumnFiltersChange: H("columnFilters", e),
|
|
2277
2275
|
filterFromLeafRows: !1,
|
|
2278
2276
|
maxLeafRowFilterDepth: 100
|
|
2279
2277
|
}),
|
|
2280
2278
|
createColumn: (e, n) => {
|
|
2281
2279
|
e.getAutoFilterFn = () => {
|
|
2282
2280
|
const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
|
|
2283
|
-
return typeof o == "string" ?
|
|
2281
|
+
return typeof o == "string" ? Q.includesString : typeof o == "number" ? Q.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? Q.equals : Array.isArray(o) ? Q.arrIncludes : Q.weakEquals;
|
|
2284
2282
|
}, e.getFilterFn = () => {
|
|
2285
2283
|
var t, o;
|
|
2286
2284
|
return Ve(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
2287
2285
|
// @ts-ignore
|
|
2288
|
-
(t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t :
|
|
2286
|
+
(t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : Q[e.columnDef.filterFn]
|
|
2289
2287
|
);
|
|
2290
2288
|
}, e.getCanFilter = () => {
|
|
2291
2289
|
var t, o, r;
|
|
@@ -2298,10 +2296,10 @@ const Zo = {
|
|
|
2298
2296
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
2299
2297
|
}, e.setFilterValue = (t) => {
|
|
2300
2298
|
n.setColumnFilters((o) => {
|
|
2301
|
-
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((
|
|
2299
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((g) => g.id === e.id), s = te(t, i ? i.value : void 0);
|
|
2302
2300
|
if (Nt(r, s, e)) {
|
|
2303
2301
|
var a;
|
|
2304
|
-
return (a = o == null ? void 0 : o.filter((
|
|
2302
|
+
return (a = o == null ? void 0 : o.filter((g) => g.id !== e.id)) != null ? a : [];
|
|
2305
2303
|
}
|
|
2306
2304
|
const u = {
|
|
2307
2305
|
id: e.id,
|
|
@@ -2309,7 +2307,7 @@ const Zo = {
|
|
|
2309
2307
|
};
|
|
2310
2308
|
if (i) {
|
|
2311
2309
|
var c;
|
|
2312
|
-
return (c = o == null ? void 0 : o.map((
|
|
2310
|
+
return (c = o == null ? void 0 : o.map((g) => g.id === e.id ? u : g)) != null ? c : [];
|
|
2313
2311
|
}
|
|
2314
2312
|
return o != null && o.length ? [...o, u] : [u];
|
|
2315
2313
|
});
|
|
@@ -2402,7 +2400,7 @@ const er = (e, n, t) => t.reduce((o, r) => {
|
|
|
2402
2400
|
...e
|
|
2403
2401
|
}),
|
|
2404
2402
|
getDefaultOptions: (e) => ({
|
|
2405
|
-
onGroupingChange:
|
|
2403
|
+
onGroupingChange: H("grouping", e),
|
|
2406
2404
|
groupedColumnMode: "reorder"
|
|
2407
2405
|
}),
|
|
2408
2406
|
createColumn: (e, n) => {
|
|
@@ -2468,10 +2466,10 @@ const cr = {
|
|
|
2468
2466
|
...e
|
|
2469
2467
|
}),
|
|
2470
2468
|
getDefaultOptions: (e) => ({
|
|
2471
|
-
onColumnOrderChange:
|
|
2469
|
+
onColumnOrderChange: H("columnOrder", e)
|
|
2472
2470
|
}),
|
|
2473
2471
|
createColumn: (e, n) => {
|
|
2474
|
-
e.getIndex =
|
|
2472
|
+
e.getIndex = w((t) => [ve(n, t)], (t) => t.findIndex((o) => o.id === e.id), x(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
2475
2473
|
var o;
|
|
2476
2474
|
return ((o = ve(n, t)[0]) == null ? void 0 : o.id) === e.id;
|
|
2477
2475
|
}, e.getIsLastColumn = (t) => {
|
|
@@ -2484,20 +2482,20 @@ const cr = {
|
|
|
2484
2482
|
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
2485
2483
|
var t;
|
|
2486
2484
|
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
2487
|
-
}, e._getOrderColumnsFn =
|
|
2485
|
+
}, e._getOrderColumnsFn = w(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
|
|
2488
2486
|
let i = [];
|
|
2489
2487
|
if (!(n != null && n.length))
|
|
2490
2488
|
i = r;
|
|
2491
2489
|
else {
|
|
2492
2490
|
const s = [...n], a = [...r];
|
|
2493
2491
|
for (; a.length && s.length; ) {
|
|
2494
|
-
const u = s.shift(), c = a.findIndex((
|
|
2492
|
+
const u = s.shift(), c = a.findIndex((g) => g.id === u);
|
|
2495
2493
|
c > -1 && i.push(a.splice(c, 1)[0]);
|
|
2496
2494
|
}
|
|
2497
2495
|
i = [...i, ...a];
|
|
2498
2496
|
}
|
|
2499
2497
|
return dr(i, t, o);
|
|
2500
|
-
},
|
|
2498
|
+
}, x(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
2501
2499
|
}
|
|
2502
2500
|
}, He = () => ({
|
|
2503
2501
|
left: [],
|
|
@@ -2508,7 +2506,7 @@ const cr = {
|
|
|
2508
2506
|
...e
|
|
2509
2507
|
}),
|
|
2510
2508
|
getDefaultOptions: (e) => ({
|
|
2511
|
-
onColumnPinningChange:
|
|
2509
|
+
onColumnPinningChange: H("columnPinning", e)
|
|
2512
2510
|
}),
|
|
2513
2511
|
createColumn: (e, n) => {
|
|
2514
2512
|
e.pin = (t) => {
|
|
@@ -2523,10 +2521,10 @@ const cr = {
|
|
|
2523
2521
|
};
|
|
2524
2522
|
}
|
|
2525
2523
|
if (t === "left") {
|
|
2526
|
-
var c,
|
|
2524
|
+
var c, g;
|
|
2527
2525
|
return {
|
|
2528
2526
|
left: [...((c = r == null ? void 0 : r.left) != null ? c : []).filter((m) => !(o != null && o.includes(m))), ...o],
|
|
2529
|
-
right: ((
|
|
2527
|
+
right: ((g = r == null ? void 0 : r.right) != null ? g : []).filter((m) => !(o != null && o.includes(m)))
|
|
2530
2528
|
};
|
|
2531
2529
|
}
|
|
2532
2530
|
return {
|
|
@@ -2550,16 +2548,16 @@ const cr = {
|
|
|
2550
2548
|
};
|
|
2551
2549
|
},
|
|
2552
2550
|
createRow: (e, n) => {
|
|
2553
|
-
e.getCenterVisibleCells =
|
|
2551
|
+
e.getCenterVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
|
|
2554
2552
|
const i = [...o ?? [], ...r ?? []];
|
|
2555
2553
|
return t.filter((s) => !i.includes(s.column.id));
|
|
2556
|
-
},
|
|
2554
|
+
}, 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) => ({
|
|
2557
2555
|
...i,
|
|
2558
2556
|
position: "left"
|
|
2559
|
-
})),
|
|
2557
|
+
})), 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) => ({
|
|
2560
2558
|
...i,
|
|
2561
2559
|
position: "right"
|
|
2562
|
-
})),
|
|
2560
|
+
})), x(n.options, "debugRows", "getRightVisibleCells"));
|
|
2563
2561
|
},
|
|
2564
2562
|
createTable: (e) => {
|
|
2565
2563
|
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
@@ -2573,10 +2571,10 @@ const cr = {
|
|
|
2573
2571
|
return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
|
|
2574
2572
|
}
|
|
2575
2573
|
return !!((t = o[n]) != null && t.length);
|
|
2576
|
-
}, e.getLeftLeafColumns =
|
|
2574
|
+
}, 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) => {
|
|
2577
2575
|
const r = [...t ?? [], ...o ?? []];
|
|
2578
2576
|
return n.filter((i) => !r.includes(i.id));
|
|
2579
|
-
},
|
|
2577
|
+
}, x(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
2580
2578
|
}
|
|
2581
2579
|
};
|
|
2582
2580
|
function fr(e) {
|
|
@@ -2603,15 +2601,15 @@ const Ie = {
|
|
|
2603
2601
|
getDefaultOptions: (e) => ({
|
|
2604
2602
|
columnResizeMode: "onEnd",
|
|
2605
2603
|
columnResizeDirection: "ltr",
|
|
2606
|
-
onColumnSizingChange:
|
|
2607
|
-
onColumnSizingInfoChange:
|
|
2604
|
+
onColumnSizingChange: H("columnSizing", e),
|
|
2605
|
+
onColumnSizingInfoChange: H("columnSizingInfo", e)
|
|
2608
2606
|
}),
|
|
2609
2607
|
createColumn: (e, n) => {
|
|
2610
2608
|
e.getSize = () => {
|
|
2611
2609
|
var t, o, r;
|
|
2612
2610
|
const i = n.getState().columnSizing[e.id];
|
|
2613
2611
|
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Ie.minSize, (o = i ?? e.columnDef.size) != null ? o : Ie.size), (r = e.columnDef.maxSize) != null ? r : Ie.maxSize);
|
|
2614
|
-
}, e.getStart =
|
|
2612
|
+
}, 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 = () => {
|
|
2615
2613
|
n.setColumnSizing((t) => {
|
|
2616
2614
|
let {
|
|
2617
2615
|
[e.id]: o,
|
|
@@ -2647,25 +2645,25 @@ const Ie = {
|
|
|
2647
2645
|
return (i) => {
|
|
2648
2646
|
if (!o || !r || (i.persist == null || i.persist(), Be(i) && i.touches && i.touches.length > 1))
|
|
2649
2647
|
return;
|
|
2650
|
-
const s = e.getSize(), a = e ? e.getLeafHeaders().map((
|
|
2651
|
-
typeof
|
|
2652
|
-
var
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2655
|
-
let [
|
|
2656
|
-
c[
|
|
2648
|
+
const s = e.getSize(), a = e ? e.getLeafHeaders().map((S) => [S.column.id, S.column.getSize()]) : [[o.id, o.getSize()]], u = Be(i) ? Math.round(i.touches[0].clientX) : i.clientX, c = {}, g = (S, R) => {
|
|
2649
|
+
typeof R == "number" && (n.setColumnSizingInfo((j) => {
|
|
2650
|
+
var I, P;
|
|
2651
|
+
const k = n.options.columnResizeDirection === "rtl" ? -1 : 1, F = (R - ((I = j == null ? void 0 : j.startOffset) != null ? I : 0)) * k, V = Math.max(F / ((P = j == null ? void 0 : j.startSize) != null ? P : 0), -0.999999);
|
|
2652
|
+
return j.columnSizingStart.forEach((G) => {
|
|
2653
|
+
let [Te, we] = G;
|
|
2654
|
+
c[Te] = Math.round(Math.max(we + we * V, 0) * 100) / 100;
|
|
2657
2655
|
}), {
|
|
2658
|
-
...
|
|
2659
|
-
deltaOffset:
|
|
2660
|
-
deltaPercentage:
|
|
2656
|
+
...j,
|
|
2657
|
+
deltaOffset: F,
|
|
2658
|
+
deltaPercentage: V
|
|
2661
2659
|
};
|
|
2662
|
-
}), (n.options.columnResizeMode === "onChange" ||
|
|
2663
|
-
...
|
|
2660
|
+
}), (n.options.columnResizeMode === "onChange" || S === "end") && n.setColumnSizing((j) => ({
|
|
2661
|
+
...j,
|
|
2664
2662
|
...c
|
|
2665
2663
|
})));
|
|
2666
|
-
}, m = (
|
|
2667
|
-
|
|
2668
|
-
...
|
|
2664
|
+
}, m = (S) => g("move", S), p = (S) => {
|
|
2665
|
+
g("end", S), n.setColumnSizingInfo((R) => ({
|
|
2666
|
+
...R,
|
|
2669
2667
|
isResizingColumn: !1,
|
|
2670
2668
|
startOffset: null,
|
|
2671
2669
|
startSize: null,
|
|
@@ -2673,22 +2671,22 @@ const Ie = {
|
|
|
2673
2671
|
deltaPercentage: null,
|
|
2674
2672
|
columnSizingStart: []
|
|
2675
2673
|
}));
|
|
2676
|
-
}, d = fr(t),
|
|
2677
|
-
moveHandler: (
|
|
2678
|
-
upHandler: (
|
|
2679
|
-
d == null || d.removeEventListener("mousemove",
|
|
2674
|
+
}, d = fr(t), f = {
|
|
2675
|
+
moveHandler: (S) => m(S.clientX),
|
|
2676
|
+
upHandler: (S) => {
|
|
2677
|
+
d == null || d.removeEventListener("mousemove", f.moveHandler), d == null || d.removeEventListener("mouseup", f.upHandler), p(S.clientX);
|
|
2680
2678
|
}
|
|
2681
2679
|
}, h = {
|
|
2682
|
-
moveHandler: (
|
|
2683
|
-
upHandler: (
|
|
2684
|
-
var
|
|
2685
|
-
d == null || d.removeEventListener("touchmove", h.moveHandler), d == null || d.removeEventListener("touchend", h.upHandler),
|
|
2680
|
+
moveHandler: (S) => (S.cancelable && (S.preventDefault(), S.stopPropagation()), m(S.touches[0].clientX), !1),
|
|
2681
|
+
upHandler: (S) => {
|
|
2682
|
+
var R;
|
|
2683
|
+
d == null || d.removeEventListener("touchmove", h.moveHandler), d == null || d.removeEventListener("touchend", h.upHandler), S.cancelable && (S.preventDefault(), S.stopPropagation()), p((R = S.touches[0]) == null ? void 0 : R.clientX);
|
|
2686
2684
|
}
|
|
2687
2685
|
}, v = pr() ? {
|
|
2688
2686
|
passive: !1
|
|
2689
2687
|
} : !1;
|
|
2690
|
-
Be(i) ? (d == null || d.addEventListener("touchmove", h.moveHandler, v), d == null || d.addEventListener("touchend", h.upHandler, v)) : (d == null || d.addEventListener("mousemove",
|
|
2691
|
-
...
|
|
2688
|
+
Be(i) ? (d == null || d.addEventListener("touchmove", h.moveHandler, v), d == null || d.addEventListener("touchend", h.upHandler, v)) : (d == null || d.addEventListener("mousemove", f.moveHandler, v), d == null || d.addEventListener("mouseup", f.upHandler, v)), n.setColumnSizingInfo((S) => ({
|
|
2689
|
+
...S,
|
|
2692
2690
|
startOffset: u,
|
|
2693
2691
|
startSize: s,
|
|
2694
2692
|
deltaOffset: 0,
|
|
@@ -2747,7 +2745,7 @@ const hr = {
|
|
|
2747
2745
|
...e
|
|
2748
2746
|
}),
|
|
2749
2747
|
getDefaultOptions: (e) => ({
|
|
2750
|
-
onColumnVisibilityChange:
|
|
2748
|
+
onColumnVisibilityChange: H("columnVisibility", e)
|
|
2751
2749
|
}),
|
|
2752
2750
|
createColumn: (e, n) => {
|
|
2753
2751
|
e.toggleVisibility = (t) => {
|
|
@@ -2767,10 +2765,10 @@ const hr = {
|
|
|
2767
2765
|
};
|
|
2768
2766
|
},
|
|
2769
2767
|
createRow: (e, n) => {
|
|
2770
|
-
e._getAllVisibleCells =
|
|
2768
|
+
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"));
|
|
2771
2769
|
},
|
|
2772
2770
|
createTable: (e) => {
|
|
2773
|
-
const n = (t, o) =>
|
|
2771
|
+
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));
|
|
2774
2772
|
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) => {
|
|
2775
2773
|
var o;
|
|
2776
2774
|
e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
|
|
@@ -2802,7 +2800,7 @@ const Sr = {
|
|
|
2802
2800
|
...e
|
|
2803
2801
|
}),
|
|
2804
2802
|
getDefaultOptions: (e) => ({
|
|
2805
|
-
onGlobalFilterChange:
|
|
2803
|
+
onGlobalFilterChange: H("globalFilter", e),
|
|
2806
2804
|
globalFilterFn: "auto",
|
|
2807
2805
|
getColumnCanGlobalFilter: (n) => {
|
|
2808
2806
|
var t;
|
|
@@ -2817,12 +2815,12 @@ const Sr = {
|
|
|
2817
2815
|
};
|
|
2818
2816
|
},
|
|
2819
2817
|
createTable: (e) => {
|
|
2820
|
-
e.getGlobalAutoFilterFn = () =>
|
|
2818
|
+
e.getGlobalAutoFilterFn = () => Q.includesString, e.getGlobalFilterFn = () => {
|
|
2821
2819
|
var n, t;
|
|
2822
2820
|
const {
|
|
2823
2821
|
globalFilterFn: o
|
|
2824
2822
|
} = e.options;
|
|
2825
|
-
return Ve(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n :
|
|
2823
|
+
return Ve(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : Q[o];
|
|
2826
2824
|
}, e.setGlobalFilter = (n) => {
|
|
2827
2825
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
|
|
2828
2826
|
}, e.resetGlobalFilter = (n) => {
|
|
@@ -2835,7 +2833,7 @@ const Sr = {
|
|
|
2835
2833
|
...e
|
|
2836
2834
|
}),
|
|
2837
2835
|
getDefaultOptions: (e) => ({
|
|
2838
|
-
onExpandedChange:
|
|
2836
|
+
onExpandedChange: H("expanded", e),
|
|
2839
2837
|
paginateExpandedRows: !0
|
|
2840
2838
|
}),
|
|
2841
2839
|
createTable: (e) => {
|
|
@@ -2928,7 +2926,7 @@ const Sr = {
|
|
|
2928
2926
|
}
|
|
2929
2927
|
}),
|
|
2930
2928
|
getDefaultOptions: (e) => ({
|
|
2931
|
-
onPaginationChange:
|
|
2929
|
+
onPaginationChange: H("pagination", e)
|
|
2932
2930
|
}),
|
|
2933
2931
|
createTable: (e) => {
|
|
2934
2932
|
let n = !1, t = !1;
|
|
@@ -2983,10 +2981,10 @@ const Sr = {
|
|
|
2983
2981
|
...r,
|
|
2984
2982
|
pageCount: s
|
|
2985
2983
|
};
|
|
2986
|
-
}), e.getPageOptions =
|
|
2984
|
+
}), e.getPageOptions = w(() => [e.getPageCount()], (o) => {
|
|
2987
2985
|
let r = [];
|
|
2988
2986
|
return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, s) => s)), r;
|
|
2989
|
-
},
|
|
2987
|
+
}, x(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
2990
2988
|
const {
|
|
2991
2989
|
pageIndex: o
|
|
2992
2990
|
} = e.getState().pagination, r = e.getPageCount();
|
|
@@ -3008,7 +3006,7 @@ const Sr = {
|
|
|
3008
3006
|
...e
|
|
3009
3007
|
}),
|
|
3010
3008
|
getDefaultOptions: (e) => ({
|
|
3011
|
-
onRowPinningChange:
|
|
3009
|
+
onRowPinningChange: H("rowPinning", e)
|
|
3012
3010
|
}),
|
|
3013
3011
|
createRow: (e, n) => {
|
|
3014
3012
|
e.pin = (t, o, r) => {
|
|
@@ -3024,7 +3022,7 @@ const Sr = {
|
|
|
3024
3022
|
return c;
|
|
3025
3023
|
}) : [], a = /* @__PURE__ */ new Set([...s, e.id, ...i]);
|
|
3026
3024
|
n.setRowPinning((u) => {
|
|
3027
|
-
var c,
|
|
3025
|
+
var c, g;
|
|
3028
3026
|
if (t === "bottom") {
|
|
3029
3027
|
var m, p;
|
|
3030
3028
|
return {
|
|
@@ -3033,15 +3031,15 @@ const Sr = {
|
|
|
3033
3031
|
};
|
|
3034
3032
|
}
|
|
3035
3033
|
if (t === "top") {
|
|
3036
|
-
var d,
|
|
3034
|
+
var d, f;
|
|
3037
3035
|
return {
|
|
3038
3036
|
top: [...((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
|
|
3039
|
-
bottom: ((
|
|
3037
|
+
bottom: ((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(a != null && a.has(h)))
|
|
3040
3038
|
};
|
|
3041
3039
|
}
|
|
3042
3040
|
return {
|
|
3043
3041
|
top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(a != null && a.has(h))),
|
|
3044
|
-
bottom: ((
|
|
3042
|
+
bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((h) => !(a != null && a.has(h)))
|
|
3045
3043
|
};
|
|
3046
3044
|
});
|
|
3047
3045
|
}, e.getCanPin = () => {
|
|
@@ -3098,10 +3096,10 @@ const Sr = {
|
|
|
3098
3096
|
...s,
|
|
3099
3097
|
position: o
|
|
3100
3098
|
}));
|
|
3101
|
-
}, e.getTopRows =
|
|
3099
|
+
}, 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) => {
|
|
3102
3100
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
|
|
3103
3101
|
return n.filter((i) => !r.has(i.id));
|
|
3104
|
-
},
|
|
3102
|
+
}, x(e.options, "debugRows", "getCenterRows"));
|
|
3105
3103
|
}
|
|
3106
3104
|
}, Rr = {
|
|
3107
3105
|
getInitialState: (e) => ({
|
|
@@ -3109,7 +3107,7 @@ const Sr = {
|
|
|
3109
3107
|
...e
|
|
3110
3108
|
}),
|
|
3111
3109
|
getDefaultOptions: (e) => ({
|
|
3112
|
-
onRowSelectionChange:
|
|
3110
|
+
onRowSelectionChange: H("rowSelection", e),
|
|
3113
3111
|
enableRowSelection: !0,
|
|
3114
3112
|
enableMultiRowSelection: !0,
|
|
3115
3113
|
enableSubRowSelection: !0
|
|
@@ -3140,19 +3138,19 @@ const Sr = {
|
|
|
3140
3138
|
return e.getRowModel().rows.forEach((i) => {
|
|
3141
3139
|
ot(r, i.id, o, !0, e);
|
|
3142
3140
|
}), r;
|
|
3143
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
3141
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = w(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
|
|
3144
3142
|
rows: [],
|
|
3145
3143
|
flatRows: [],
|
|
3146
3144
|
rowsById: {}
|
|
3147
|
-
},
|
|
3145
|
+
}, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = w(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
|
|
3148
3146
|
rows: [],
|
|
3149
3147
|
flatRows: [],
|
|
3150
3148
|
rowsById: {}
|
|
3151
|
-
},
|
|
3149
|
+
}, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = w(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
|
|
3152
3150
|
rows: [],
|
|
3153
3151
|
flatRows: [],
|
|
3154
3152
|
rowsById: {}
|
|
3155
|
-
},
|
|
3153
|
+
}, x(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
3156
3154
|
const n = e.getFilteredRowModel().flatRows, {
|
|
3157
3155
|
rowSelection: t
|
|
3158
3156
|
} = e.getState();
|
|
@@ -3230,11 +3228,11 @@ function Ye(e, n) {
|
|
|
3230
3228
|
const t = e.getState().rowSelection, o = [], r = {}, i = function(s, a) {
|
|
3231
3229
|
return s.map((u) => {
|
|
3232
3230
|
var c;
|
|
3233
|
-
const
|
|
3234
|
-
if (
|
|
3231
|
+
const g = ht(u, t);
|
|
3232
|
+
if (g && (o.push(u), r[u.id] = u), (c = u.subRows) != null && c.length && (u = {
|
|
3235
3233
|
...u,
|
|
3236
3234
|
subRows: i(u.subRows)
|
|
3237
|
-
}),
|
|
3235
|
+
}), g)
|
|
3238
3236
|
return u;
|
|
3239
3237
|
}).filter(Boolean);
|
|
3240
3238
|
};
|
|
@@ -3306,7 +3304,7 @@ const pe = {
|
|
|
3306
3304
|
sortUndefined: 1
|
|
3307
3305
|
}),
|
|
3308
3306
|
getDefaultOptions: (e) => ({
|
|
3309
|
-
onSortingChange:
|
|
3307
|
+
onSortingChange: H("sorting", e),
|
|
3310
3308
|
isMultiSortEvent: (n) => n.shiftKey
|
|
3311
3309
|
}),
|
|
3312
3310
|
createColumn: (e, n) => {
|
|
@@ -3333,17 +3331,17 @@ const pe = {
|
|
|
3333
3331
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
3334
3332
|
n.setSorting((s) => {
|
|
3335
3333
|
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);
|
|
3336
|
-
let c = [],
|
|
3337
|
-
if (s != null && s.length && e.getCanMultiSort() && o ? a ?
|
|
3334
|
+
let c = [], g, m = i ? t : r === "desc";
|
|
3335
|
+
if (s != null && s.length && e.getCanMultiSort() && o ? a ? g = "toggle" : g = "add" : s != null && s.length && u !== s.length - 1 ? g = "replace" : a ? g = "toggle" : g = "replace", g === "toggle" && (i || r || (g = "remove")), g === "add") {
|
|
3338
3336
|
var p;
|
|
3339
3337
|
c = [...s, {
|
|
3340
3338
|
id: e.id,
|
|
3341
3339
|
desc: m
|
|
3342
3340
|
}], c.splice(0, c.length - ((p = n.options.maxMultiSortColCount) != null ? p : Number.MAX_SAFE_INTEGER));
|
|
3343
|
-
} else
|
|
3341
|
+
} else g === "toggle" ? c = s.map((d) => d.id === e.id ? {
|
|
3344
3342
|
...d,
|
|
3345
3343
|
desc: m
|
|
3346
|
-
} : d) :
|
|
3344
|
+
} : d) : g === "remove" ? c = s.filter((d) => d.id !== e.id) : c = [{
|
|
3347
3345
|
id: e.id,
|
|
3348
3346
|
desc: m
|
|
3349
3347
|
}];
|
|
@@ -3425,7 +3423,7 @@ function Mr(e) {
|
|
|
3425
3423
|
u = (d = p.getInitialState == null ? void 0 : p.getInitialState(u)) != null ? d : u;
|
|
3426
3424
|
});
|
|
3427
3425
|
const c = [];
|
|
3428
|
-
let
|
|
3426
|
+
let g = !1;
|
|
3429
3427
|
const m = {
|
|
3430
3428
|
_features: o,
|
|
3431
3429
|
options: {
|
|
@@ -3434,10 +3432,10 @@ function Mr(e) {
|
|
|
3434
3432
|
},
|
|
3435
3433
|
initialState: u,
|
|
3436
3434
|
_queue: (p) => {
|
|
3437
|
-
c.push(p),
|
|
3435
|
+
c.push(p), g || (g = !0, Promise.resolve().then(() => {
|
|
3438
3436
|
for (; c.length; )
|
|
3439
3437
|
c.shift()();
|
|
3440
|
-
|
|
3438
|
+
g = !1;
|
|
3441
3439
|
}).catch((d) => setTimeout(() => {
|
|
3442
3440
|
throw d;
|
|
3443
3441
|
})));
|
|
@@ -3453,9 +3451,9 @@ function Mr(e) {
|
|
|
3453
3451
|
setState: (p) => {
|
|
3454
3452
|
r.options.onStateChange == null || r.options.onStateChange(p);
|
|
3455
3453
|
},
|
|
3456
|
-
_getRowId: (p, d,
|
|
3454
|
+
_getRowId: (p, d, f) => {
|
|
3457
3455
|
var h;
|
|
3458
|
-
return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(p, d,
|
|
3456
|
+
return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(p, d, f)) != null ? h : `${f ? [f.id, d].join(".") : d}`;
|
|
3459
3457
|
},
|
|
3460
3458
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
3461
3459
|
// The final calls start at the bottom of the model,
|
|
@@ -3463,43 +3461,43 @@ function Mr(e) {
|
|
|
3463
3461
|
getRowModel: () => r.getPaginationRowModel(),
|
|
3464
3462
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
3465
3463
|
getRow: (p, d) => {
|
|
3466
|
-
let
|
|
3467
|
-
if (!
|
|
3464
|
+
let f = (d ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[p];
|
|
3465
|
+
if (!f && (f = r.getCoreRowModel().rowsById[p], !f))
|
|
3468
3466
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${p}`) : new Error();
|
|
3469
|
-
return
|
|
3467
|
+
return f;
|
|
3470
3468
|
},
|
|
3471
|
-
_getDefaultColumnDef:
|
|
3469
|
+
_getDefaultColumnDef: w(() => [r.options.defaultColumn], (p) => {
|
|
3472
3470
|
var d;
|
|
3473
3471
|
return p = (d = p) != null ? d : {}, {
|
|
3474
|
-
header: (
|
|
3475
|
-
const h =
|
|
3472
|
+
header: (f) => {
|
|
3473
|
+
const h = f.header.column.columnDef;
|
|
3476
3474
|
return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
|
|
3477
3475
|
},
|
|
3478
3476
|
// footer: props => props.header.column.id,
|
|
3479
|
-
cell: (
|
|
3477
|
+
cell: (f) => {
|
|
3480
3478
|
var h, v;
|
|
3481
|
-
return (h = (v =
|
|
3479
|
+
return (h = (v = f.renderValue()) == null || v.toString == null ? void 0 : v.toString()) != null ? h : null;
|
|
3482
3480
|
},
|
|
3483
|
-
...r._features.reduce((
|
|
3481
|
+
...r._features.reduce((f, h) => Object.assign(f, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
|
|
3484
3482
|
...p
|
|
3485
3483
|
};
|
|
3486
|
-
},
|
|
3484
|
+
}, x(e, "debugColumns", "_getDefaultColumnDef")),
|
|
3487
3485
|
_getColumnDefs: () => r.options.columns,
|
|
3488
|
-
getAllColumns:
|
|
3489
|
-
const d = function(
|
|
3490
|
-
return v === void 0 && (v = 0),
|
|
3491
|
-
const
|
|
3492
|
-
return
|
|
3486
|
+
getAllColumns: w(() => [r._getColumnDefs()], (p) => {
|
|
3487
|
+
const d = function(f, h, v) {
|
|
3488
|
+
return v === void 0 && (v = 0), f.map((S) => {
|
|
3489
|
+
const R = Wo(r, S, v, h), j = S;
|
|
3490
|
+
return R.columns = j.columns ? d(j.columns, R, v + 1) : [], R;
|
|
3493
3491
|
});
|
|
3494
3492
|
};
|
|
3495
3493
|
return d(p);
|
|
3496
|
-
},
|
|
3497
|
-
getAllFlatColumns:
|
|
3498
|
-
_getAllFlatColumnsById:
|
|
3499
|
-
getAllLeafColumns:
|
|
3500
|
-
let
|
|
3501
|
-
return d(
|
|
3502
|
-
},
|
|
3494
|
+
}, x(e, "debugColumns", "getAllColumns")),
|
|
3495
|
+
getAllFlatColumns: w(() => [r.getAllColumns()], (p) => p.flatMap((d) => d.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
|
|
3496
|
+
_getAllFlatColumnsById: w(() => [r.getAllFlatColumns()], (p) => p.reduce((d, f) => (d[f.id] = f, d), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
|
|
3497
|
+
getAllLeafColumns: w(() => [r.getAllColumns(), r._getOrderColumnsFn()], (p, d) => {
|
|
3498
|
+
let f = p.flatMap((h) => h.getLeafColumns());
|
|
3499
|
+
return d(f);
|
|
3500
|
+
}, x(e, "debugColumns", "getAllLeafColumns")),
|
|
3503
3501
|
getColumn: (p) => {
|
|
3504
3502
|
const d = r._getAllFlatColumnsById()[p];
|
|
3505
3503
|
return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${p}' does not exist.`), d;
|
|
@@ -3513,7 +3511,7 @@ function Mr(e) {
|
|
|
3513
3511
|
return r;
|
|
3514
3512
|
}
|
|
3515
3513
|
function Rn() {
|
|
3516
|
-
return (e) =>
|
|
3514
|
+
return (e) => w(() => [e.options.data], (n) => {
|
|
3517
3515
|
const t = {
|
|
3518
3516
|
rows: [],
|
|
3519
3517
|
flatRows: [],
|
|
@@ -3522,16 +3520,16 @@ function Rn() {
|
|
|
3522
3520
|
i === void 0 && (i = 0);
|
|
3523
3521
|
const a = [];
|
|
3524
3522
|
for (let c = 0; c < r.length; c++) {
|
|
3525
|
-
const
|
|
3526
|
-
if (t.flatRows.push(
|
|
3523
|
+
const g = Jo(e, e._getRowId(r[c], c, s), r[c], c, i, void 0, s == null ? void 0 : s.id);
|
|
3524
|
+
if (t.flatRows.push(g), t.rowsById[g.id] = g, a.push(g), e.options.getSubRows) {
|
|
3527
3525
|
var u;
|
|
3528
|
-
|
|
3526
|
+
g.originalSubRows = e.options.getSubRows(r[c], c), (u = g.originalSubRows) != null && u.length && (g.subRows = o(g.originalSubRows, i + 1, g));
|
|
3529
3527
|
}
|
|
3530
3528
|
}
|
|
3531
3529
|
return a;
|
|
3532
3530
|
};
|
|
3533
3531
|
return t.rows = o(n), t;
|
|
3534
|
-
},
|
|
3532
|
+
}, x(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
3535
3533
|
}
|
|
3536
3534
|
function br(e) {
|
|
3537
3535
|
const n = [], t = (o) => {
|
|
@@ -3545,7 +3543,7 @@ function br(e) {
|
|
|
3545
3543
|
};
|
|
3546
3544
|
}
|
|
3547
3545
|
function Dr(e) {
|
|
3548
|
-
return (n) =>
|
|
3546
|
+
return (n) => w(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
|
|
3549
3547
|
if (!o.rows.length)
|
|
3550
3548
|
return o;
|
|
3551
3549
|
const {
|
|
@@ -3557,8 +3555,8 @@ function Dr(e) {
|
|
|
3557
3555
|
flatRows: a,
|
|
3558
3556
|
rowsById: u
|
|
3559
3557
|
} = o;
|
|
3560
|
-
const c = r * i,
|
|
3561
|
-
s = s.slice(c,
|
|
3558
|
+
const c = r * i, g = c + r;
|
|
3559
|
+
s = s.slice(c, g);
|
|
3562
3560
|
let m;
|
|
3563
3561
|
n.options.paginateExpandedRows ? m = {
|
|
3564
3562
|
rows: s,
|
|
@@ -3573,7 +3571,7 @@ function Dr(e) {
|
|
|
3573
3571
|
m.flatRows.push(d), d.subRows.length && d.subRows.forEach(p);
|
|
3574
3572
|
};
|
|
3575
3573
|
return m.rows.forEach(p), m;
|
|
3576
|
-
},
|
|
3574
|
+
}, x(n.options, "debugTable", "getPaginationRowModel"));
|
|
3577
3575
|
}
|
|
3578
3576
|
/**
|
|
3579
3577
|
* react-table
|
|
@@ -3589,15 +3587,15 @@ function kt(e, n) {
|
|
|
3589
3587
|
return e ? Vr(e) ? /* @__PURE__ */ Xe.createElement(e, n) : e : null;
|
|
3590
3588
|
}
|
|
3591
3589
|
function Vr(e) {
|
|
3592
|
-
return
|
|
3590
|
+
return Tr(e) || typeof e == "function" || Ar(e);
|
|
3593
3591
|
}
|
|
3594
|
-
function
|
|
3592
|
+
function Tr(e) {
|
|
3595
3593
|
return typeof e == "function" && (() => {
|
|
3596
3594
|
const n = Object.getPrototypeOf(e);
|
|
3597
3595
|
return n.prototype && n.prototype.isReactComponent;
|
|
3598
3596
|
})();
|
|
3599
3597
|
}
|
|
3600
|
-
function
|
|
3598
|
+
function Ar(e) {
|
|
3601
3599
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
3602
3600
|
}
|
|
3603
3601
|
function yn(e) {
|
|
@@ -3633,7 +3631,7 @@ const jn = ({
|
|
|
3633
3631
|
size: o = "xs"
|
|
3634
3632
|
}) => /* @__PURE__ */ l.jsxs(L, { gap: o, children: [
|
|
3635
3633
|
(e == null ? void 0 : e.add) && /* @__PURE__ */ l.jsx(
|
|
3636
|
-
|
|
3634
|
+
q,
|
|
3637
3635
|
{
|
|
3638
3636
|
variant: "light",
|
|
3639
3637
|
leftSection: /* @__PURE__ */ l.jsx(Yn, { size: 16, stroke: 1.5 }),
|
|
@@ -3643,7 +3641,7 @@ const jn = ({
|
|
|
3643
3641
|
}
|
|
3644
3642
|
),
|
|
3645
3643
|
(e == null ? void 0 : e.edit) && /* @__PURE__ */ l.jsx(
|
|
3646
|
-
|
|
3644
|
+
q,
|
|
3647
3645
|
{
|
|
3648
3646
|
leftSection: /* @__PURE__ */ l.jsx(Wn, { size: 16, stroke: 1.5 }),
|
|
3649
3647
|
size: o,
|
|
@@ -3654,7 +3652,7 @@ const jn = ({
|
|
|
3654
3652
|
}
|
|
3655
3653
|
),
|
|
3656
3654
|
(e == null ? void 0 : e.reload) && /* @__PURE__ */ l.jsx(
|
|
3657
|
-
|
|
3655
|
+
q,
|
|
3658
3656
|
{
|
|
3659
3657
|
leftSection: /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5 }),
|
|
3660
3658
|
size: o,
|
|
@@ -3664,7 +3662,7 @@ const jn = ({
|
|
|
3664
3662
|
}
|
|
3665
3663
|
),
|
|
3666
3664
|
(e == null ? void 0 : e.import) && /* @__PURE__ */ l.jsx(
|
|
3667
|
-
|
|
3665
|
+
q,
|
|
3668
3666
|
{
|
|
3669
3667
|
leftSection: /* @__PURE__ */ l.jsx(Jn, { size: 16, stroke: 1.5 }),
|
|
3670
3668
|
size: o,
|
|
@@ -3674,7 +3672,7 @@ const jn = ({
|
|
|
3674
3672
|
}
|
|
3675
3673
|
),
|
|
3676
3674
|
(e == null ? void 0 : e.export) && /* @__PURE__ */ l.jsx(
|
|
3677
|
-
|
|
3675
|
+
q,
|
|
3678
3676
|
{
|
|
3679
3677
|
leftSection: /* @__PURE__ */ l.jsx(Qn, { size: 16, stroke: 1.5 }),
|
|
3680
3678
|
size: o,
|
|
@@ -3683,25 +3681,25 @@ const jn = ({
|
|
|
3683
3681
|
children: "Export"
|
|
3684
3682
|
}
|
|
3685
3683
|
)
|
|
3686
|
-
] }), _n = (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), Fn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0), Nr = "__selectcol__", { Thead: kr, Tr: We, Th:
|
|
3684
|
+
] }), _n = (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), Fn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0), Nr = "__selectcol__", { Thead: kr, Tr: We, Th: Or, Tbody: Lr, Td: Ot } = Yt, In = (e) => {
|
|
3687
3685
|
let n;
|
|
3688
|
-
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(We, { children: /* @__PURE__ */ l.jsx(
|
|
3686
|
+
e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(We, { children: /* @__PURE__ */ l.jsx(Ot, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(X, { justify: "center", align: "center", gap: "xs", children: [
|
|
3689
3687
|
/* @__PURE__ */ l.jsx(Zn, { color: "var(--mantine-color-dimmed)" }),
|
|
3690
|
-
/* @__PURE__ */ l.jsx(
|
|
3688
|
+
/* @__PURE__ */ l.jsx(E, { c: "dimmed", fz: "sm", children: "No records found." })
|
|
3691
3689
|
] }) }) }, "empty-row") : n = e.table.getRowModel().rows.map((i, s) => {
|
|
3692
3690
|
var u, c;
|
|
3693
3691
|
const a = [];
|
|
3694
|
-
for (const
|
|
3695
|
-
const m =
|
|
3692
|
+
for (const g of i.getVisibleCells()) {
|
|
3693
|
+
const m = g.column.columnDef.meta, p = (u = m == null ? void 0 : m.rowSpan) == null ? void 0 : u.call(m, i.original, s), d = (c = m == null ? void 0 : m.colSpan) == null ? void 0 : c.call(m, i.original, s);
|
|
3696
3694
|
p === 0 || d === 0 || a.push(
|
|
3697
3695
|
/* @__PURE__ */ l.jsx(
|
|
3698
|
-
|
|
3696
|
+
Ot,
|
|
3699
3697
|
{
|
|
3700
3698
|
rowSpan: p,
|
|
3701
3699
|
colSpan: d,
|
|
3702
|
-
children: kt(
|
|
3700
|
+
children: kt(g.column.columnDef.cell, g.getContext())
|
|
3703
3701
|
},
|
|
3704
|
-
|
|
3702
|
+
g.id
|
|
3705
3703
|
)
|
|
3706
3704
|
);
|
|
3707
3705
|
}
|
|
@@ -3723,7 +3721,7 @@ const jn = ({
|
|
|
3723
3721
|
tabularNums: !0,
|
|
3724
3722
|
children: [
|
|
3725
3723
|
/* @__PURE__ */ l.jsx(kr, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(We, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
|
|
3726
|
-
|
|
3724
|
+
Or,
|
|
3727
3725
|
{
|
|
3728
3726
|
w: i.id === Nr ? "1%" : void 0,
|
|
3729
3727
|
children: i.isPlaceholder ? null : kt(
|
|
@@ -3733,7 +3731,7 @@ const jn = ({
|
|
|
3733
3731
|
},
|
|
3734
3732
|
i.id
|
|
3735
3733
|
)) }, r.id)) }),
|
|
3736
|
-
/* @__PURE__ */ l.jsx(
|
|
3734
|
+
/* @__PURE__ */ l.jsx(Lr, { pos: "relative", children: n })
|
|
3737
3735
|
]
|
|
3738
3736
|
}
|
|
3739
3737
|
);
|
|
@@ -3742,47 +3740,48 @@ const jn = ({
|
|
|
3742
3740
|
return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(ie, { withBorder: !0, p: 0, style: o, children: t });
|
|
3743
3741
|
}, zr = "_pageSizeSelectorActive_1wv6j_1", Gr = {
|
|
3744
3742
|
pageSizeSelectorActive: zr
|
|
3745
|
-
}, Pn = ({
|
|
3743
|
+
}, Hr = ["10", "20", "50", "100"], Pn = ({
|
|
3746
3744
|
total: e,
|
|
3747
3745
|
pageIndex: n,
|
|
3748
3746
|
pageSize: t,
|
|
3749
3747
|
allowPageSizeChange: o = !0,
|
|
3750
|
-
|
|
3748
|
+
pageSizeOptions: r = Hr,
|
|
3749
|
+
onUpdatePagination: i
|
|
3751
3750
|
}) => {
|
|
3752
|
-
const
|
|
3751
|
+
const s = /* @__PURE__ */ l.jsx(
|
|
3753
3752
|
Gn,
|
|
3754
3753
|
{
|
|
3755
3754
|
size: "sm",
|
|
3756
3755
|
total: e,
|
|
3757
3756
|
value: n + 1,
|
|
3758
|
-
onChange: (
|
|
3757
|
+
onChange: (a) => i(a - 1, t)
|
|
3759
3758
|
}
|
|
3760
3759
|
);
|
|
3761
3760
|
return o ? /* @__PURE__ */ l.jsxs(L, { gap: "sm", children: [
|
|
3762
3761
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
3763
|
-
/* @__PURE__ */ l.jsx(
|
|
3762
|
+
/* @__PURE__ */ l.jsx(E, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
|
|
3764
3763
|
/* @__PURE__ */ l.jsx(
|
|
3765
|
-
|
|
3764
|
+
qr,
|
|
3766
3765
|
{
|
|
3767
3766
|
size: "sm",
|
|
3768
|
-
values:
|
|
3767
|
+
values: r,
|
|
3769
3768
|
value: t.toString(),
|
|
3770
|
-
onChange: (
|
|
3771
|
-
|
|
3769
|
+
onChange: (a) => {
|
|
3770
|
+
i(0, parseInt(a, 10));
|
|
3772
3771
|
}
|
|
3773
3772
|
}
|
|
3774
3773
|
)
|
|
3775
3774
|
] }),
|
|
3776
|
-
|
|
3777
|
-
] }) :
|
|
3778
|
-
},
|
|
3775
|
+
s
|
|
3776
|
+
] }) : s;
|
|
3777
|
+
}, Lt = {
|
|
3779
3778
|
xs: ge(22),
|
|
3780
3779
|
sm: ge(26),
|
|
3781
3780
|
md: ge(32),
|
|
3782
3781
|
lg: ge(38),
|
|
3783
3782
|
xl: ge(44)
|
|
3784
3783
|
};
|
|
3785
|
-
function
|
|
3784
|
+
function qr({
|
|
3786
3785
|
size: e,
|
|
3787
3786
|
values: n,
|
|
3788
3787
|
value: t,
|
|
@@ -3790,7 +3789,7 @@ function Hr({
|
|
|
3790
3789
|
}) {
|
|
3791
3790
|
return /* @__PURE__ */ l.jsxs(ae, { withinPortal: !0, withArrow: !0, offset: 2, children: [
|
|
3792
3791
|
/* @__PURE__ */ l.jsx(Hn, { children: /* @__PURE__ */ l.jsx(
|
|
3793
|
-
|
|
3792
|
+
q,
|
|
3794
3793
|
{
|
|
3795
3794
|
size: e,
|
|
3796
3795
|
variant: "default",
|
|
@@ -3798,7 +3797,7 @@ function Hr({
|
|
|
3798
3797
|
style: [
|
|
3799
3798
|
{ fontWeight: "normal" },
|
|
3800
3799
|
(r) => ({
|
|
3801
|
-
height:
|
|
3800
|
+
height: Lt[e],
|
|
3802
3801
|
paddingLeft: r.spacing[e],
|
|
3803
3802
|
paddingRight: r.spacing[e]
|
|
3804
3803
|
})
|
|
@@ -3818,7 +3817,7 @@ function Hr({
|
|
|
3818
3817
|
{
|
|
3819
3818
|
className: i ? Gr.pageSizeSelectorActive : void 0,
|
|
3820
3819
|
style: [
|
|
3821
|
-
{ height:
|
|
3820
|
+
{ height: Lt[e] }
|
|
3822
3821
|
// isCurrent
|
|
3823
3822
|
// ? {
|
|
3824
3823
|
// color: "var(--mantine-color-text)",
|
|
@@ -3829,40 +3828,40 @@ function Hr({
|
|
|
3829
3828
|
],
|
|
3830
3829
|
disabled: i,
|
|
3831
3830
|
onClick: () => o(r),
|
|
3832
|
-
children: /* @__PURE__ */ l.jsx(
|
|
3831
|
+
children: /* @__PURE__ */ l.jsx(E, { component: "div", size: e, children: r })
|
|
3833
3832
|
},
|
|
3834
3833
|
r
|
|
3835
3834
|
);
|
|
3836
3835
|
}) })
|
|
3837
3836
|
] });
|
|
3838
3837
|
}
|
|
3839
|
-
const
|
|
3840
|
-
var
|
|
3841
|
-
const [n, t] =
|
|
3838
|
+
const Br = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
|
|
3839
|
+
var S, R, j, I;
|
|
3840
|
+
const [n, t] = M({
|
|
3842
3841
|
records: [],
|
|
3843
3842
|
total: 0
|
|
3844
|
-
}), [o, r] =
|
|
3843
|
+
}), [o, r] = M(!1), [i, s] = M(
|
|
3845
3844
|
{}
|
|
3846
|
-
), a = (
|
|
3847
|
-
r(!0), e.getData(
|
|
3848
|
-
t(
|
|
3845
|
+
), a = (P) => {
|
|
3846
|
+
r(!0), e.getData(P).then((k) => {
|
|
3847
|
+
t(k), r(!1);
|
|
3849
3848
|
});
|
|
3850
|
-
}, u = (
|
|
3851
|
-
const
|
|
3849
|
+
}, u = (P, k) => {
|
|
3850
|
+
const F = {
|
|
3852
3851
|
...e.query.query,
|
|
3853
|
-
limit:
|
|
3854
|
-
offset:
|
|
3852
|
+
limit: k,
|
|
3853
|
+
offset: P * k
|
|
3855
3854
|
};
|
|
3856
|
-
e.query.update(
|
|
3857
|
-
}, [c,
|
|
3858
|
-
const
|
|
3855
|
+
e.query.update(F);
|
|
3856
|
+
}, [c, g, m] = _(() => {
|
|
3857
|
+
const P = e.query.query.limit, k = Math.floor(
|
|
3859
3858
|
(e.query.query.offset || 0) / e.query.query.limit
|
|
3860
|
-
),
|
|
3861
|
-
return [
|
|
3859
|
+
), F = Math.ceil(n.total / e.query.query.limit);
|
|
3860
|
+
return [P, k, F];
|
|
3862
3861
|
}, [e.query.query.limit, e.query.query.offset, n.total]);
|
|
3863
3862
|
De(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
|
|
3864
|
-
const p = _(() => Object.keys(i).filter((
|
|
3865
|
-
let d,
|
|
3863
|
+
const p = _(() => Object.keys(i).filter((P) => i[P]).map((P) => e.normalizeRowId(P)), [i]);
|
|
3864
|
+
let d, f;
|
|
3866
3865
|
_n(e.actions) && (d = /* @__PURE__ */ l.jsx(
|
|
3867
3866
|
jn,
|
|
3868
3867
|
{
|
|
@@ -3871,63 +3870,64 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
|
|
|
3871
3870
|
selectedRowKeys: p
|
|
3872
3871
|
}
|
|
3873
3872
|
));
|
|
3874
|
-
const h = ((
|
|
3873
|
+
const h = ((S = e.pagination) == null ? void 0 : S.positions) || Br;
|
|
3875
3874
|
if (h.size > 0) {
|
|
3876
|
-
const
|
|
3875
|
+
const P = /* @__PURE__ */ l.jsx(
|
|
3877
3876
|
Pn,
|
|
3878
3877
|
{
|
|
3879
3878
|
total: m,
|
|
3880
|
-
pageIndex:
|
|
3879
|
+
pageIndex: g,
|
|
3881
3880
|
pageSize: c,
|
|
3882
3881
|
onUpdatePagination: u,
|
|
3883
|
-
allowPageSizeChange: (
|
|
3882
|
+
allowPageSizeChange: (R = e.pagination) == null ? void 0 : R.showSizeChanger,
|
|
3883
|
+
pageSizeOptions: (I = (j = e.pagination) == null ? void 0 : j.pageSizeOptions) == null ? void 0 : I.map((k) => k.toString())
|
|
3884
3884
|
}
|
|
3885
3885
|
);
|
|
3886
3886
|
h.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
|
|
3887
3887
|
d,
|
|
3888
|
-
|
|
3889
|
-
] }) : d = /* @__PURE__ */ l.jsx(
|
|
3890
|
-
|
|
3891
|
-
/* @__PURE__ */ l.jsxs(
|
|
3888
|
+
P
|
|
3889
|
+
] }) : d = /* @__PURE__ */ l.jsx(B, { justify: "flex-end", children: P })), (h.has("bottomRight") || h.has("bottomLeft") || h.has("bottomCenter")) && (h.has("bottomLeft") ? f = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
|
|
3890
|
+
P,
|
|
3891
|
+
/* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
|
|
3892
3892
|
"Showing ",
|
|
3893
|
-
Math.min(
|
|
3893
|
+
Math.min(g * c + 1, n.total),
|
|
3894
3894
|
" to",
|
|
3895
3895
|
" ",
|
|
3896
|
-
Math.min((
|
|
3896
|
+
Math.min((g + 1) * c, n.total),
|
|
3897
3897
|
" of ",
|
|
3898
3898
|
n.total,
|
|
3899
3899
|
" ",
|
|
3900
3900
|
"records"
|
|
3901
3901
|
] })
|
|
3902
|
-
] }) :
|
|
3903
|
-
/* @__PURE__ */ l.jsxs(
|
|
3902
|
+
] }) : f = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
|
|
3903
|
+
/* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
|
|
3904
3904
|
"Showing ",
|
|
3905
|
-
Math.min(
|
|
3905
|
+
Math.min(g * c + 1, n.total),
|
|
3906
3906
|
" to",
|
|
3907
3907
|
" ",
|
|
3908
|
-
Math.min((
|
|
3908
|
+
Math.min((g + 1) * c, n.total),
|
|
3909
3909
|
" of ",
|
|
3910
3910
|
n.total,
|
|
3911
3911
|
" ",
|
|
3912
3912
|
"records"
|
|
3913
3913
|
] }),
|
|
3914
|
-
|
|
3914
|
+
P
|
|
3915
3915
|
] }));
|
|
3916
3916
|
}
|
|
3917
3917
|
const v = _(() => {
|
|
3918
|
-
const
|
|
3918
|
+
const P = e.selectable ?? Fn(e.actions);
|
|
3919
3919
|
return /* @__PURE__ */ l.jsx(
|
|
3920
|
-
|
|
3920
|
+
Ur,
|
|
3921
3921
|
{
|
|
3922
3922
|
data: n,
|
|
3923
3923
|
loading: o,
|
|
3924
3924
|
columns: e.columns,
|
|
3925
|
-
isSelectable:
|
|
3925
|
+
isSelectable: P,
|
|
3926
3926
|
getRowId: e.getRowId,
|
|
3927
3927
|
selectedRowKeys: i,
|
|
3928
3928
|
setSelectedRowKeys: s,
|
|
3929
3929
|
hasTopSection: d !== void 0,
|
|
3930
|
-
hasBottomSection:
|
|
3930
|
+
hasBottomSection: f !== void 0
|
|
3931
3931
|
}
|
|
3932
3932
|
);
|
|
3933
3933
|
}, [
|
|
@@ -3939,9 +3939,9 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
|
|
|
3939
3939
|
i,
|
|
3940
3940
|
s,
|
|
3941
3941
|
d !== void 0,
|
|
3942
|
-
|
|
3942
|
+
f !== void 0
|
|
3943
3943
|
]);
|
|
3944
|
-
return d === void 0 ||
|
|
3944
|
+
return d === void 0 || f === void 0 ? v : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
3945
3945
|
d !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3946
3946
|
ie,
|
|
3947
3947
|
{
|
|
@@ -3956,7 +3956,7 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
|
|
|
3956
3956
|
}
|
|
3957
3957
|
),
|
|
3958
3958
|
v,
|
|
3959
|
-
|
|
3959
|
+
f !== void 0 && /* @__PURE__ */ l.jsx(
|
|
3960
3960
|
ie,
|
|
3961
3961
|
{
|
|
3962
3962
|
withBorder: !0,
|
|
@@ -3966,11 +3966,11 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
|
|
|
3966
3966
|
borderTopRightRadius: 0,
|
|
3967
3967
|
borderTop: "none"
|
|
3968
3968
|
},
|
|
3969
|
-
children:
|
|
3969
|
+
children: f
|
|
3970
3970
|
}
|
|
3971
3971
|
)
|
|
3972
3972
|
] });
|
|
3973
|
-
},
|
|
3973
|
+
}, Ur = (e) => {
|
|
3974
3974
|
const n = _(() => {
|
|
3975
3975
|
const o = [];
|
|
3976
3976
|
e.isSelectable && o.push({
|
|
@@ -4043,7 +4043,7 @@ function En(e, n, {
|
|
|
4043
4043
|
}
|
|
4044
4044
|
const s = {
|
|
4045
4045
|
key: n.name,
|
|
4046
|
-
title: t || /* @__PURE__ */ l.jsx(
|
|
4046
|
+
title: t || /* @__PURE__ */ l.jsx(N, { value: n.label }),
|
|
4047
4047
|
accessorFn: (a) => a[n.tsName],
|
|
4048
4048
|
render: (a) => {
|
|
4049
4049
|
const u = a[n.tsName];
|
|
@@ -4055,7 +4055,7 @@ function En(e, n, {
|
|
|
4055
4055
|
return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
|
|
4056
4056
|
}), s;
|
|
4057
4057
|
}
|
|
4058
|
-
function
|
|
4058
|
+
function zi(e, n, t, {
|
|
4059
4059
|
title: o,
|
|
4060
4060
|
nestedKey: r,
|
|
4061
4061
|
component: i
|
|
@@ -4074,7 +4074,7 @@ function Oi(e, n, t, {
|
|
|
4074
4074
|
}
|
|
4075
4075
|
const a = {
|
|
4076
4076
|
key: n + "." + t.name,
|
|
4077
|
-
title: o || /* @__PURE__ */ l.jsx(
|
|
4077
|
+
title: o || /* @__PURE__ */ l.jsx(N, { value: t.label }),
|
|
4078
4078
|
accessorFn: (u) => u[n.tsName][t.tsName],
|
|
4079
4079
|
render: (u) => {
|
|
4080
4080
|
const c = u[n.tsName][t.tsName];
|
|
@@ -4086,63 +4086,69 @@ function Oi(e, n, t, {
|
|
|
4086
4086
|
return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: c });
|
|
4087
4087
|
}), a;
|
|
4088
4088
|
}
|
|
4089
|
-
function
|
|
4089
|
+
function Gi(e, n, t, o = {}) {
|
|
4090
4090
|
return t.map((r) => $n(r) ? r : En(e, n.publicProperties[r], o));
|
|
4091
4091
|
}
|
|
4092
|
-
function
|
|
4092
|
+
function Hi(e, n, t = [], o = {}) {
|
|
4093
4093
|
return t.map((r) => $n(r) ? r : En(e, n.publicProperties[r], o));
|
|
4094
4094
|
}
|
|
4095
4095
|
function $n(e) {
|
|
4096
4096
|
return typeof e == "object" && "key" in e && "title" in e;
|
|
4097
4097
|
}
|
|
4098
|
-
const
|
|
4099
|
-
var m, p;
|
|
4100
|
-
const [n, t] =
|
|
4098
|
+
const Kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), qi = (e) => {
|
|
4099
|
+
var m, p, d, f, h;
|
|
4100
|
+
const [n, t] = M(
|
|
4101
4101
|
{}
|
|
4102
4102
|
), o = e.selectable ?? Fn(e.actions), r = _(() => {
|
|
4103
|
-
const
|
|
4104
|
-
o &&
|
|
4103
|
+
const v = [];
|
|
4104
|
+
o && v.push({
|
|
4105
4105
|
id: "selection",
|
|
4106
|
-
header: ({ table:
|
|
4106
|
+
header: ({ table: S }) => /* @__PURE__ */ l.jsx(
|
|
4107
4107
|
de,
|
|
4108
4108
|
{
|
|
4109
|
-
checked:
|
|
4110
|
-
indeterminate:
|
|
4111
|
-
onChange:
|
|
4109
|
+
checked: S.getIsAllRowsSelected(),
|
|
4110
|
+
indeterminate: S.getIsSomeRowsSelected(),
|
|
4111
|
+
onChange: S.getToggleAllRowsSelectedHandler()
|
|
4112
4112
|
}
|
|
4113
4113
|
),
|
|
4114
|
-
cell: ({ row:
|
|
4114
|
+
cell: ({ row: S }) => /* @__PURE__ */ l.jsx(
|
|
4115
4115
|
de,
|
|
4116
4116
|
{
|
|
4117
|
-
checked:
|
|
4118
|
-
disabled: !
|
|
4119
|
-
onChange:
|
|
4117
|
+
checked: S.getIsSelected(),
|
|
4118
|
+
disabled: !S.getCanSelect(),
|
|
4119
|
+
onChange: S.getToggleSelectedHandler()
|
|
4120
4120
|
}
|
|
4121
4121
|
)
|
|
4122
4122
|
});
|
|
4123
|
-
for (const
|
|
4124
|
-
|
|
4125
|
-
id:
|
|
4126
|
-
header:
|
|
4127
|
-
accessorFn:
|
|
4128
|
-
cell: ({ row:
|
|
4123
|
+
for (const S of e.columns)
|
|
4124
|
+
v.push({
|
|
4125
|
+
id: S.key,
|
|
4126
|
+
header: S.title,
|
|
4127
|
+
accessorFn: S.render,
|
|
4128
|
+
cell: ({ row: R }) => S.render(R.original),
|
|
4129
4129
|
meta: {
|
|
4130
|
-
rowSpan:
|
|
4131
|
-
colSpan:
|
|
4130
|
+
rowSpan: S.rowSpan,
|
|
4131
|
+
colSpan: S.colSpan
|
|
4132
4132
|
}
|
|
4133
4133
|
});
|
|
4134
|
-
return
|
|
4134
|
+
return v;
|
|
4135
4135
|
}, [e.columns, o]), i = yn({
|
|
4136
4136
|
data: e.data,
|
|
4137
4137
|
columns: r,
|
|
4138
4138
|
enableRowSelection: o,
|
|
4139
4139
|
getCoreRowModel: Rn(),
|
|
4140
4140
|
getPaginationRowModel: Dr(),
|
|
4141
|
+
initialState: {
|
|
4142
|
+
pagination: {
|
|
4143
|
+
pageSize: ((m = e.pagination) == null ? void 0 : m.pageSize) ?? 10,
|
|
4144
|
+
pageIndex: 0
|
|
4145
|
+
}
|
|
4146
|
+
},
|
|
4141
4147
|
state: {
|
|
4142
4148
|
rowSelection: n
|
|
4143
4149
|
},
|
|
4144
4150
|
onRowSelectionChange: t
|
|
4145
|
-
}), s = _(() => Object.keys(n).filter((
|
|
4151
|
+
}), s = _(() => Object.keys(n).filter((v) => n[v]).map(Number), [n]);
|
|
4146
4152
|
let a, u;
|
|
4147
4153
|
_n(e.actions) && (a = /* @__PURE__ */ l.jsx(
|
|
4148
4154
|
jn,
|
|
@@ -4151,30 +4157,31 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4151
4157
|
selectedRowKeys: s
|
|
4152
4158
|
}
|
|
4153
4159
|
));
|
|
4154
|
-
const c = ((
|
|
4160
|
+
const c = ((p = e.pagination) == null ? void 0 : p.positions) || Kr;
|
|
4155
4161
|
if (c.size > 0) {
|
|
4156
|
-
const
|
|
4162
|
+
const v = i.getState().pagination, S = /* @__PURE__ */ l.jsx(
|
|
4157
4163
|
Pn,
|
|
4158
4164
|
{
|
|
4159
4165
|
total: i.getPageCount(),
|
|
4160
|
-
pageIndex:
|
|
4161
|
-
pageSize:
|
|
4162
|
-
onUpdatePagination: (
|
|
4163
|
-
allowPageSizeChange: (
|
|
4166
|
+
pageIndex: v.pageIndex,
|
|
4167
|
+
pageSize: v.pageSize,
|
|
4168
|
+
onUpdatePagination: (R, j) => i.setPagination({ pageIndex: R, pageSize: j }),
|
|
4169
|
+
allowPageSizeChange: (d = e.pagination) == null ? void 0 : d.showSizeChanger,
|
|
4170
|
+
pageSizeOptions: (h = (f = e.pagination) == null ? void 0 : f.pageSizeOptions) == null ? void 0 : h.map((R) => R.toString())
|
|
4164
4171
|
}
|
|
4165
4172
|
);
|
|
4166
4173
|
c.has("topRight") && (a !== void 0 ? a = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
|
|
4167
4174
|
a,
|
|
4168
|
-
|
|
4169
|
-
] }) : a = /* @__PURE__ */ l.jsx(
|
|
4170
|
-
|
|
4171
|
-
/* @__PURE__ */ l.jsxs(
|
|
4175
|
+
S
|
|
4176
|
+
] }) : a = /* @__PURE__ */ l.jsx(B, { justify: "flex-end", children: S })), (c.has("bottomRight") || c.has("bottomLeft") || c.has("bottomCenter")) && (c.has("bottomLeft") ? u = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
|
|
4177
|
+
S,
|
|
4178
|
+
/* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
|
|
4172
4179
|
"Showing ",
|
|
4173
|
-
|
|
4180
|
+
v.pageIndex * v.pageSize + 1,
|
|
4174
4181
|
" to",
|
|
4175
4182
|
" ",
|
|
4176
4183
|
Math.min(
|
|
4177
|
-
(
|
|
4184
|
+
(v.pageIndex + 1) * v.pageSize,
|
|
4178
4185
|
e.data.length
|
|
4179
4186
|
),
|
|
4180
4187
|
" ",
|
|
@@ -4182,14 +4189,14 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4182
4189
|
e.data.length,
|
|
4183
4190
|
" records"
|
|
4184
4191
|
] })
|
|
4185
|
-
] }) : u = /* @__PURE__ */ l.jsxs(
|
|
4186
|
-
/* @__PURE__ */ l.jsxs(
|
|
4192
|
+
] }) : u = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
|
|
4193
|
+
/* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
|
|
4187
4194
|
"Showing ",
|
|
4188
|
-
|
|
4195
|
+
v.pageIndex * v.pageSize + 1,
|
|
4189
4196
|
" to",
|
|
4190
4197
|
" ",
|
|
4191
4198
|
Math.min(
|
|
4192
|
-
(
|
|
4199
|
+
(v.pageIndex + 1) * v.pageSize,
|
|
4193
4200
|
e.data.length
|
|
4194
4201
|
),
|
|
4195
4202
|
" ",
|
|
@@ -4197,10 +4204,10 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4197
4204
|
e.data.length,
|
|
4198
4205
|
" records"
|
|
4199
4206
|
] }),
|
|
4200
|
-
|
|
4207
|
+
S
|
|
4201
4208
|
] }));
|
|
4202
4209
|
}
|
|
4203
|
-
const
|
|
4210
|
+
const g = /* @__PURE__ */ l.jsx(
|
|
4204
4211
|
In,
|
|
4205
4212
|
{
|
|
4206
4213
|
selectedRowKeys: n,
|
|
@@ -4211,7 +4218,7 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4211
4218
|
striped: e.striped
|
|
4212
4219
|
}
|
|
4213
4220
|
);
|
|
4214
|
-
return a === void 0 && u === void 0 ?
|
|
4221
|
+
return a === void 0 && u === void 0 ? g : /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4215
4222
|
a !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4216
4223
|
ie,
|
|
4217
4224
|
{
|
|
@@ -4225,7 +4232,7 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4225
4232
|
children: a
|
|
4226
4233
|
}
|
|
4227
4234
|
),
|
|
4228
|
-
|
|
4235
|
+
g,
|
|
4229
4236
|
u !== void 0 && /* @__PURE__ */ l.jsx(
|
|
4230
4237
|
ie,
|
|
4231
4238
|
{
|
|
@@ -4249,19 +4256,19 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4249
4256
|
enum: Se,
|
|
4250
4257
|
date: No,
|
|
4251
4258
|
datetime: ko
|
|
4252
|
-
},
|
|
4259
|
+
}, Yr = {
|
|
4253
4260
|
lang2value: {
|
|
4254
4261
|
en: "Update",
|
|
4255
4262
|
vi: "Cập Nhật"
|
|
4256
4263
|
},
|
|
4257
4264
|
lang: "en"
|
|
4258
|
-
},
|
|
4265
|
+
}, Wr = {
|
|
4259
4266
|
lang2value: {
|
|
4260
4267
|
en: "Clear",
|
|
4261
4268
|
vi: "Xóa"
|
|
4262
4269
|
},
|
|
4263
4270
|
lang: "en"
|
|
4264
|
-
},
|
|
4271
|
+
}, Xr = ({
|
|
4265
4272
|
db: e,
|
|
4266
4273
|
property: n,
|
|
4267
4274
|
InputComponent: t,
|
|
@@ -4286,7 +4293,7 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4286
4293
|
var c;
|
|
4287
4294
|
return r === void 0 || (c = r(i).errorMessage) == null ? void 0 : c.t({ args: { name: n.label } });
|
|
4288
4295
|
}, [r, i, n.label]);
|
|
4289
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4296
|
+
return /* @__PURE__ */ l.jsxs(X, { gap: 5, children: [
|
|
4290
4297
|
/* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
|
|
4291
4298
|
/* @__PURE__ */ l.jsx(
|
|
4292
4299
|
A.Col,
|
|
@@ -4299,10 +4306,10 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4299
4306
|
children: /* @__PURE__ */ l.jsx(
|
|
4300
4307
|
un,
|
|
4301
4308
|
{
|
|
4302
|
-
label: /* @__PURE__ */ l.jsx(
|
|
4309
|
+
label: /* @__PURE__ */ l.jsx(N, { value: n.label }),
|
|
4303
4310
|
name: n.name,
|
|
4304
4311
|
required: n.isRequired,
|
|
4305
|
-
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
4312
|
+
tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: n.description }) : void 0,
|
|
4306
4313
|
align: o.align
|
|
4307
4314
|
}
|
|
4308
4315
|
)
|
|
@@ -4320,18 +4327,18 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
|
|
|
4320
4327
|
] }),
|
|
4321
4328
|
a !== void 0 && /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
|
|
4322
4329
|
/* @__PURE__ */ l.jsx(A.Col, { span: o.labelCol }),
|
|
4323
|
-
/* @__PURE__ */ l.jsx(A.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(
|
|
4330
|
+
/* @__PURE__ */ l.jsx(A.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(J.Error, { children: a }) })
|
|
4324
4331
|
] })
|
|
4325
4332
|
] });
|
|
4326
4333
|
};
|
|
4327
|
-
function
|
|
4334
|
+
function Jr({
|
|
4328
4335
|
properties: e,
|
|
4329
4336
|
queryConditions: n
|
|
4330
4337
|
}) {
|
|
4331
4338
|
return e.reduce((t, o) => n[o.property.tsName] === void 0 ? t : t + 1, 0);
|
|
4332
4339
|
}
|
|
4333
|
-
const
|
|
4334
|
-
function
|
|
4340
|
+
const Qr = (e, n) => on(e, n, !1);
|
|
4341
|
+
function Zr({
|
|
4335
4342
|
properties: e,
|
|
4336
4343
|
queryConditions: n
|
|
4337
4344
|
}) {
|
|
@@ -4340,14 +4347,14 @@ function Qr({
|
|
|
4340
4347
|
const i = n[r.property.tsName];
|
|
4341
4348
|
if (i !== void 0)
|
|
4342
4349
|
if (o.length > 0 && o.push(" & "), r.property.datatype === "date" || r.property.datatype === "datetime") {
|
|
4343
|
-
const s = r.property.datatype === "date" ? Ce :
|
|
4344
|
-
i.op === "bti" ? (o.push(s(t,
|
|
4350
|
+
const s = r.property.datatype === "date" ? Ce : Qr;
|
|
4351
|
+
i.op === "bti" ? (o.push(s(t, Z(i.value[0]).toDate())), o.push(" ≤ "), o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Z(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(he(t, r.property.label)), o.push(" ≥ "), o.push(s(t, Z(i.value).toDate()))) : i.op === "lte" && (o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Z(i.value).toDate())));
|
|
4345
4352
|
} else
|
|
4346
4353
|
o.push(he(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
|
|
4347
4354
|
}
|
|
4348
4355
|
return o.join("");
|
|
4349
4356
|
}
|
|
4350
|
-
const
|
|
4357
|
+
const ei = ({
|
|
4351
4358
|
db: e,
|
|
4352
4359
|
properties: n,
|
|
4353
4360
|
styles: t,
|
|
@@ -4356,74 +4363,74 @@ const Zr = ({
|
|
|
4356
4363
|
onChange: i,
|
|
4357
4364
|
queryConditions: s
|
|
4358
4365
|
}) => {
|
|
4359
|
-
const [a, u] =
|
|
4366
|
+
const [a, u] = M({});
|
|
4360
4367
|
De(() => {
|
|
4361
|
-
const
|
|
4368
|
+
const f = {};
|
|
4362
4369
|
for (const h of n) {
|
|
4363
4370
|
const v = s[h.property.tsName];
|
|
4364
|
-
v !== void 0 && (h.property.datatype === "date" || h.property.datatype === "datetime" ? v.op === "bti" ?
|
|
4371
|
+
v !== void 0 && (h.property.datatype === "date" || h.property.datatype === "datetime" ? v.op === "bti" ? f[h.property.tsName] = {
|
|
4365
4372
|
start: v.value[0] ? new Date(v.value[0]) : void 0,
|
|
4366
4373
|
end: v.value[1] ? new Date(v.value[1]) : void 0
|
|
4367
|
-
} : v.op === "gte" ?
|
|
4374
|
+
} : v.op === "gte" ? f[h.property.tsName] = {
|
|
4368
4375
|
start: v.value ? new Date(v.value) : void 0,
|
|
4369
4376
|
end: void 0
|
|
4370
|
-
} : v.op === "lte" && (
|
|
4377
|
+
} : v.op === "lte" && (f[h.property.tsName] = {
|
|
4371
4378
|
start: void 0,
|
|
4372
4379
|
end: v.value ? new Date(v.value) : void 0
|
|
4373
|
-
}) :
|
|
4380
|
+
}) : f[h.property.tsName] = v.value);
|
|
4374
4381
|
}
|
|
4375
|
-
u(
|
|
4382
|
+
u(f);
|
|
4376
4383
|
}, [n, s]);
|
|
4377
|
-
const [c,
|
|
4378
|
-
const
|
|
4379
|
-
for (const
|
|
4380
|
-
let
|
|
4381
|
-
if (!It.isEmpty(
|
|
4382
|
-
return { op: "eq", value:
|
|
4384
|
+
const [c, g, m] = _(() => {
|
|
4385
|
+
const f = [], h = {}, v = {};
|
|
4386
|
+
for (const S of n) {
|
|
4387
|
+
let R, j = (I) => {
|
|
4388
|
+
if (!It.isEmpty(I))
|
|
4389
|
+
return { op: "eq", value: I };
|
|
4383
4390
|
};
|
|
4384
|
-
(
|
|
4391
|
+
(S.property.datatype === "date" || S.property.datatype === "datetime") && (R = It.validateTimeRange, j = (I) => I.start !== void 0 && I.end !== void 0 ? {
|
|
4385
4392
|
op: "bti",
|
|
4386
|
-
value: [
|
|
4387
|
-
} :
|
|
4393
|
+
value: [I.start.toISOString(), I.end.toISOString()]
|
|
4394
|
+
} : I.start !== void 0 ? { op: "gte", value: I.start.toISOString() } : I.end !== void 0 ? { op: "lte", value: I.end.toISOString() } : void 0), h[S.property.tsName] = j, v[S.property.tsName] = R, f.push(
|
|
4388
4395
|
/* @__PURE__ */ l.jsx(
|
|
4389
|
-
|
|
4396
|
+
Xr,
|
|
4390
4397
|
{
|
|
4391
4398
|
db: e,
|
|
4392
|
-
property:
|
|
4393
|
-
InputComponent:
|
|
4394
|
-
value: a[
|
|
4395
|
-
onChange: (
|
|
4396
|
-
u({ ...a, [
|
|
4399
|
+
property: S.property,
|
|
4400
|
+
InputComponent: S.InputComponent,
|
|
4401
|
+
value: a[S.property.tsName],
|
|
4402
|
+
onChange: (I) => {
|
|
4403
|
+
u({ ...a, [S.property.tsName]: I });
|
|
4397
4404
|
},
|
|
4398
4405
|
layout: r,
|
|
4399
|
-
validator:
|
|
4406
|
+
validator: R
|
|
4400
4407
|
},
|
|
4401
|
-
|
|
4408
|
+
S.property.name
|
|
4402
4409
|
)
|
|
4403
4410
|
);
|
|
4404
4411
|
}
|
|
4405
|
-
return [
|
|
4406
|
-
}, [n, a, u]), p = (
|
|
4412
|
+
return [f, h, v];
|
|
4413
|
+
}, [n, a, u]), p = (f) => {
|
|
4407
4414
|
const h = {};
|
|
4408
4415
|
for (const v of n) {
|
|
4409
|
-
if (
|
|
4410
|
-
const
|
|
4411
|
-
|
|
4416
|
+
if (f[v.property.tsName] === void 0) continue;
|
|
4417
|
+
const S = g[v.property.tsName](f[v.property.tsName]);
|
|
4418
|
+
S !== void 0 && (h[v.property.tsName] = S);
|
|
4412
4419
|
}
|
|
4413
4420
|
i(h);
|
|
4414
|
-
}, d = _(() => (
|
|
4421
|
+
}, d = _(() => (f) => {
|
|
4415
4422
|
for (const h of n) {
|
|
4416
4423
|
const v = m[h.property.tsName];
|
|
4417
|
-
if (v !== void 0 && !v(
|
|
4424
|
+
if (v !== void 0 && !v(f[h.property.tsName]).isValid)
|
|
4418
4425
|
return !1;
|
|
4419
4426
|
}
|
|
4420
4427
|
return !0;
|
|
4421
4428
|
}, [n, m]);
|
|
4422
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4429
|
+
return /* @__PURE__ */ l.jsxs(X, { gap: "sm", className: o, style: t, children: [
|
|
4423
4430
|
c,
|
|
4424
4431
|
/* @__PURE__ */ l.jsxs(L, { gap: "sm", justify: "flex-end", children: [
|
|
4425
4432
|
/* @__PURE__ */ l.jsx(
|
|
4426
|
-
|
|
4433
|
+
q,
|
|
4427
4434
|
{
|
|
4428
4435
|
variant: "light",
|
|
4429
4436
|
size: "xs",
|
|
@@ -4432,28 +4439,28 @@ const Zr = ({
|
|
|
4432
4439
|
u({}), p({});
|
|
4433
4440
|
},
|
|
4434
4441
|
disabled: Object.keys(a).length === 0,
|
|
4435
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4442
|
+
children: /* @__PURE__ */ l.jsx(N, { value: Wr })
|
|
4436
4443
|
}
|
|
4437
4444
|
),
|
|
4438
4445
|
/* @__PURE__ */ l.jsx(
|
|
4439
|
-
|
|
4446
|
+
q,
|
|
4440
4447
|
{
|
|
4441
4448
|
variant: "light",
|
|
4442
4449
|
size: "xs",
|
|
4443
4450
|
onClick: () => p(a),
|
|
4444
4451
|
disabled: !d(a),
|
|
4445
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4452
|
+
children: /* @__PURE__ */ l.jsx(N, { value: Yr })
|
|
4446
4453
|
}
|
|
4447
4454
|
)
|
|
4448
4455
|
] })
|
|
4449
4456
|
] });
|
|
4450
|
-
}, Gt = /* @__PURE__ */ l.jsx(oo, { size: 16, stroke: 1.5 }), Ht = /* @__PURE__ */ l.jsx(ut, { size: 16, stroke: 1.5 }),
|
|
4457
|
+
}, Gt = /* @__PURE__ */ l.jsx(oo, { size: 16, stroke: 1.5 }), Ht = /* @__PURE__ */ l.jsx(ut, { size: 16, stroke: 1.5 }), ti = {
|
|
4451
4458
|
lang2value: {
|
|
4452
4459
|
en: "Search By",
|
|
4453
4460
|
vi: "Tìm Kiếm Theo"
|
|
4454
4461
|
},
|
|
4455
4462
|
lang: "en"
|
|
4456
|
-
},
|
|
4463
|
+
}, Bi = ({
|
|
4457
4464
|
query: e,
|
|
4458
4465
|
onChange: n,
|
|
4459
4466
|
debounceTime: t = 250,
|
|
@@ -4461,16 +4468,16 @@ const Zr = ({
|
|
|
4461
4468
|
searchField: r,
|
|
4462
4469
|
advancedSearch: i
|
|
4463
4470
|
}) => {
|
|
4464
|
-
const s =
|
|
4471
|
+
const s = U(re), [a, u] = M(e), [c, g] = M(!1), [m, p] = M([!1, Date.now()]), d = _(() => lo(
|
|
4465
4472
|
t,
|
|
4466
|
-
(
|
|
4467
|
-
|
|
4473
|
+
(S) => {
|
|
4474
|
+
g(!1), n(S);
|
|
4468
4475
|
},
|
|
4469
4476
|
{ atBegin: !1 }
|
|
4470
|
-
), [t, n]),
|
|
4471
|
-
u(
|
|
4472
|
-
}, [u,
|
|
4473
|
-
o === void 0 && r !== void 0 && (o =
|
|
4477
|
+
), [t, n]), f = _(() => (S) => {
|
|
4478
|
+
u(S.target.value), g(!0), d(S.target.value);
|
|
4479
|
+
}, [u, g, d]);
|
|
4480
|
+
o === void 0 && r !== void 0 && (o = ti);
|
|
4474
4481
|
let h = "";
|
|
4475
4482
|
if (o !== void 0 && (h = o.lang2value[s.language] || o.lang2value[o.lang]), r !== void 0 && (h.length > 0 && (h += " "), h += r.lang2value[s.language] || r.lang2value[r.lang]), i === void 0)
|
|
4476
4483
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -4481,12 +4488,12 @@ const Zr = ({
|
|
|
4481
4488
|
placeholder: h,
|
|
4482
4489
|
leftSection: c ? Gt : Ht,
|
|
4483
4490
|
value: a,
|
|
4484
|
-
onChange:
|
|
4491
|
+
onChange: f
|
|
4485
4492
|
}
|
|
4486
4493
|
);
|
|
4487
|
-
const v =
|
|
4494
|
+
const v = Jr(i);
|
|
4488
4495
|
return /* @__PURE__ */ l.jsxs(
|
|
4489
|
-
|
|
4496
|
+
Le,
|
|
4490
4497
|
{
|
|
4491
4498
|
width: "target",
|
|
4492
4499
|
trapFocus: !0,
|
|
@@ -4498,7 +4505,7 @@ const Zr = ({
|
|
|
4498
4505
|
p([!1, Date.now()]);
|
|
4499
4506
|
},
|
|
4500
4507
|
children: [
|
|
4501
|
-
/* @__PURE__ */ l.jsx(
|
|
4508
|
+
/* @__PURE__ */ l.jsx(Le.Target, { children: /* @__PURE__ */ l.jsx(
|
|
4502
4509
|
_t,
|
|
4503
4510
|
{
|
|
4504
4511
|
flex: 1,
|
|
@@ -4542,13 +4549,13 @@ const Zr = ({
|
|
|
4542
4549
|
] }),
|
|
4543
4550
|
rightSectionWidth: 68,
|
|
4544
4551
|
value: a,
|
|
4545
|
-
onChange:
|
|
4546
|
-
description:
|
|
4552
|
+
onChange: f,
|
|
4553
|
+
description: Zr(i),
|
|
4547
4554
|
inputWrapperOrder: ["label", "input", "description", "error"]
|
|
4548
4555
|
}
|
|
4549
4556
|
) }),
|
|
4550
|
-
/* @__PURE__ */ l.jsx(
|
|
4551
|
-
|
|
4557
|
+
/* @__PURE__ */ l.jsx(Le.Dropdown, { children: /* @__PURE__ */ l.jsx(
|
|
4558
|
+
ei,
|
|
4552
4559
|
{
|
|
4553
4560
|
db: i.db,
|
|
4554
4561
|
properties: i.properties,
|
|
@@ -4562,7 +4569,7 @@ const Zr = ({
|
|
|
4562
4569
|
]
|
|
4563
4570
|
}
|
|
4564
4571
|
);
|
|
4565
|
-
},
|
|
4572
|
+
}, ni = oe(
|
|
4566
4573
|
({
|
|
4567
4574
|
store: e,
|
|
4568
4575
|
record: n,
|
|
@@ -4574,32 +4581,32 @@ const Zr = ({
|
|
|
4574
4581
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
4575
4582
|
const i = dt(n, t);
|
|
4576
4583
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
4577
|
-
/* @__PURE__ */ l.jsx(
|
|
4584
|
+
/* @__PURE__ */ l.jsx(E, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(N, { value: t.label }) }),
|
|
4578
4585
|
i !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: t, value: i })
|
|
4579
4586
|
] });
|
|
4580
4587
|
}
|
|
4581
|
-
),
|
|
4582
|
-
const n = e.schema, t = _(() => e.fieldGroups.map((o, r) =>
|
|
4583
|
-
return /* @__PURE__ */ l.jsx(
|
|
4588
|
+
), oi = 12, ri = (e) => {
|
|
4589
|
+
const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => ii(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
|
|
4590
|
+
return /* @__PURE__ */ l.jsx(X, { gap: "sm", className: e.className, style: e.styles, children: t });
|
|
4584
4591
|
};
|
|
4585
|
-
function
|
|
4592
|
+
function ii(e, n, t, o, r) {
|
|
4586
4593
|
const i = r.fields, s = [];
|
|
4587
4594
|
for (let a = 0; a < i.length; a++) {
|
|
4588
|
-
const u =
|
|
4595
|
+
const u = oi / i[a].length;
|
|
4589
4596
|
if (!Number.isInteger(u))
|
|
4590
4597
|
throw new Error(`Span must be an integer, but got ${u} for row ${a}`);
|
|
4591
4598
|
for (let c = 0; c < i[a].length; c++) {
|
|
4592
|
-
const
|
|
4599
|
+
const g = i[a][c];
|
|
4593
4600
|
let m;
|
|
4594
|
-
typeof
|
|
4601
|
+
typeof g == "function" ? m = g(n, t) : typeof g == "object" && "prop" in g ? m = st(
|
|
4595
4602
|
n,
|
|
4596
4603
|
t,
|
|
4597
|
-
|
|
4598
|
-
|
|
4604
|
+
g.prop instanceof Y ? g.prop : e.allProperties[g.prop],
|
|
4605
|
+
g.args
|
|
4599
4606
|
) : m = st(
|
|
4600
4607
|
n,
|
|
4601
4608
|
t,
|
|
4602
|
-
|
|
4609
|
+
g instanceof Y ? g : e.allProperties[g]
|
|
4603
4610
|
), s.push(
|
|
4604
4611
|
/* @__PURE__ */ l.jsx(A.Col, { span: u, children: m }, `${a}-${c}`)
|
|
4605
4612
|
);
|
|
@@ -4607,7 +4614,7 @@ function ri(e, n, t, o, r) {
|
|
|
4607
4614
|
}
|
|
4608
4615
|
return /* @__PURE__ */ l.jsx(A, { gutter: "sm", children: s }, o);
|
|
4609
4616
|
}
|
|
4610
|
-
function
|
|
4617
|
+
function Ui(e, n, t = {}) {
|
|
4611
4618
|
return (o, r) => {
|
|
4612
4619
|
if (t.visible !== void 0 && !t.visible(r))
|
|
4613
4620
|
return /* @__PURE__ */ l.jsx("div", {});
|
|
@@ -4616,8 +4623,8 @@ function Bi(e, n, t = {}) {
|
|
|
4616
4623
|
if (typeof s == "function")
|
|
4617
4624
|
u = s(o, r);
|
|
4618
4625
|
else {
|
|
4619
|
-
let c,
|
|
4620
|
-
typeof s == "object" && "prop" in s ? (c = s.prop instanceof
|
|
4626
|
+
let c, g = {};
|
|
4627
|
+
typeof s == "object" && "prop" in s ? (c = s.prop instanceof Y ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (g = s.args)) : c = s instanceof Y ? s : e.allProperties[s], u = st(o, r, c, g);
|
|
4621
4628
|
}
|
|
4622
4629
|
return /* @__PURE__ */ l.jsx("div", { children: u }, a);
|
|
4623
4630
|
});
|
|
@@ -4632,7 +4639,7 @@ function Bi(e, n, t = {}) {
|
|
|
4632
4639
|
);
|
|
4633
4640
|
};
|
|
4634
4641
|
}
|
|
4635
|
-
function
|
|
4642
|
+
function si(e) {
|
|
4636
4643
|
if (se(e))
|
|
4637
4644
|
return e.cardinality === "N:N" || e.cardinality === "1:N" ? mt : ft;
|
|
4638
4645
|
if (ce[e.datatype] === void 0)
|
|
@@ -4643,8 +4650,8 @@ function ii(e) {
|
|
|
4643
4650
|
}
|
|
4644
4651
|
function st(e, n, t, o = {}) {
|
|
4645
4652
|
let r;
|
|
4646
|
-
return o.display !== void 0 ? r = o.display : r =
|
|
4647
|
-
|
|
4653
|
+
return o.display !== void 0 ? r = o.display : r = si(t instanceof Y ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
|
|
4654
|
+
ni,
|
|
4648
4655
|
{
|
|
4649
4656
|
store: e,
|
|
4650
4657
|
record: n,
|
|
@@ -4654,10 +4661,10 @@ function st(e, n, t, o = {}) {
|
|
|
4654
4661
|
}
|
|
4655
4662
|
);
|
|
4656
4663
|
}
|
|
4657
|
-
const
|
|
4664
|
+
const Ki = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabName, children: [
|
|
4658
4665
|
/* @__PURE__ */ l.jsx(Re.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Tab, { value: n.tabName, children: n.tabName }, t)) }),
|
|
4659
4666
|
e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
|
|
4660
|
-
|
|
4667
|
+
ri,
|
|
4661
4668
|
{
|
|
4662
4669
|
schema: e.schema,
|
|
4663
4670
|
store: e.store,
|
|
@@ -4671,17 +4678,17 @@ const Ui = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabN
|
|
|
4671
4678
|
export {
|
|
4672
4679
|
sn as BooleanInput,
|
|
4673
4680
|
Ai as ConfirmationInput,
|
|
4674
|
-
|
|
4681
|
+
Ti as ConfirmationLabel,
|
|
4675
4682
|
Qe as CountryFlagComponent,
|
|
4676
4683
|
dn as DEFAULT_LAYOUT,
|
|
4677
|
-
|
|
4684
|
+
Br as DEFAULT_PAGINATION_POSITIONS,
|
|
4678
4685
|
ce as DataType2DisplayComponent,
|
|
4679
4686
|
Vt as DataType2InputComponent,
|
|
4680
4687
|
wo as DateDisplay,
|
|
4681
4688
|
Po as DateInput,
|
|
4682
4689
|
No as DateRangeInput,
|
|
4683
4690
|
Co as DateTimeDisplay,
|
|
4684
|
-
|
|
4691
|
+
Di as DateTimeHideTimeDisplay,
|
|
4685
4692
|
ko as DateTimeRangeInput,
|
|
4686
4693
|
qo as EmbeddedFormItem,
|
|
4687
4694
|
fo as EmojiCountryFlag,
|
|
@@ -4689,66 +4696,66 @@ export {
|
|
|
4689
4696
|
zo as FormItem,
|
|
4690
4697
|
cn as FormItemInner,
|
|
4691
4698
|
un as FormItemLabel,
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4699
|
+
vi as LanguageSelector,
|
|
4700
|
+
Ri as Loading,
|
|
4701
|
+
yi as LoadingInline,
|
|
4695
4702
|
re as LocaleContext,
|
|
4696
|
-
|
|
4703
|
+
Si as LocaleProvider,
|
|
4697
4704
|
vo as MenuTrie,
|
|
4698
4705
|
mt as MultiForeignKeyDisplay,
|
|
4699
4706
|
an as MultiForeignKeyInput,
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4707
|
+
N as MultiLingualString,
|
|
4708
|
+
ji as NotAuthorized,
|
|
4709
|
+
wi as NotFound,
|
|
4703
4710
|
Qt as NotFoundInline,
|
|
4704
|
-
|
|
4711
|
+
xi as NotFoundSubPage,
|
|
4705
4712
|
Me as NumberInput,
|
|
4706
|
-
|
|
4713
|
+
Pi as OrderedUniqueList,
|
|
4707
4714
|
et as Permission,
|
|
4708
|
-
|
|
4715
|
+
Ni as SPAN_COL,
|
|
4709
4716
|
go as SVGCountryFlag,
|
|
4710
|
-
|
|
4711
|
-
|
|
4717
|
+
ei as SearchForm,
|
|
4718
|
+
Xr as SearchFormItem,
|
|
4712
4719
|
nn as SeraCol,
|
|
4713
4720
|
gt as SeraContext,
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4721
|
+
Vi as SeraContextProvider,
|
|
4722
|
+
Oi as SeraEmbeddedForm,
|
|
4723
|
+
qi as SeraEmbeddedTable,
|
|
4724
|
+
ki as SeraForm,
|
|
4718
4725
|
tn as SeraRow,
|
|
4719
|
-
|
|
4726
|
+
Bi as SeraSearch,
|
|
4720
4727
|
Li as SeraTable,
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4728
|
+
bi as SeraVerticalMenu,
|
|
4729
|
+
ri as SeraView,
|
|
4730
|
+
Ki as SeraViewTab,
|
|
4724
4731
|
ft as SingleForeignKeyDisplay,
|
|
4725
4732
|
ln as SingleForeignKeyInput,
|
|
4726
4733
|
ct as TestIdContext,
|
|
4727
|
-
|
|
4734
|
+
Ei as TestIdProvider,
|
|
4728
4735
|
Se as TextInput,
|
|
4729
4736
|
Zt as Trie,
|
|
4730
4737
|
bt as TrieNode,
|
|
4731
4738
|
po as buildMenuItemIndex,
|
|
4732
|
-
|
|
4739
|
+
T as countryFlags,
|
|
4733
4740
|
So as filterAllowedItems,
|
|
4734
4741
|
gn as getInputComponent,
|
|
4735
|
-
|
|
4742
|
+
Jr as getNumberOfFilters,
|
|
4736
4743
|
dt as getPropertyValue,
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4744
|
+
Zr as getReadableFilters,
|
|
4745
|
+
Mi as getTestIdProps,
|
|
4746
|
+
_i as groupBy,
|
|
4747
|
+
Fi as groupByAsList,
|
|
4748
|
+
Ui as groupFields,
|
|
4742
4749
|
Go as isHorizontalLayout,
|
|
4743
4750
|
$n as isSeraColumn,
|
|
4744
|
-
|
|
4751
|
+
Hi as makeEmbeddedTableColumns,
|
|
4745
4752
|
En as makeTableColumn,
|
|
4746
|
-
|
|
4747
|
-
|
|
4753
|
+
zi as makeTableColumnFromNestedProperty,
|
|
4754
|
+
Gi as makeTableColumns,
|
|
4748
4755
|
Ze as setPropertyValue,
|
|
4749
4756
|
he as translateMultiLingualString,
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4757
|
+
Ii as uniqueList,
|
|
4758
|
+
Ci as useMultiLingualString,
|
|
4759
|
+
W as usePropertyTestId,
|
|
4760
|
+
$i as useTestId
|
|
4754
4761
|
};
|