master-data-management-react 0.1.7 → 0.1.8
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/index.js
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { styled as
|
|
3
|
-
import { AgGridReact as
|
|
4
|
-
import { ModuleRegistry as Qt, ClientSideRowModelModule as
|
|
5
|
-
const
|
|
1
|
+
import St, { useRef as ke, useMemo as be, useState as $, useEffect as Ne, useCallback as Oe } from "react";
|
|
2
|
+
import { styled as pe, Box as P, Select as Ht, FormControl as zt, CircularProgress as $e, Divider as Xt, Button as ue, Typography as Le, Paper as vt, Autocomplete as Qe, TextField as ae, Menu as qt, MenuItem as ze, Alert as Jt } from "@mui/material";
|
|
3
|
+
import { AgGridReact as Kt } from "ag-grid-react";
|
|
4
|
+
import { ModuleRegistry as Qt, ClientSideRowModelModule as At, AllCommunityModule as Zt } from "ag-grid-community";
|
|
5
|
+
const Ot = (n, f) => ({
|
|
6
6
|
getEntities: async () => {
|
|
7
|
-
const
|
|
7
|
+
const u = await n.get(f.entities);
|
|
8
8
|
return {
|
|
9
|
-
data:
|
|
9
|
+
data: u.data.data ?? u.data
|
|
10
10
|
};
|
|
11
11
|
},
|
|
12
|
-
getMetadata: async (
|
|
13
|
-
const E = await
|
|
12
|
+
getMetadata: async (u) => {
|
|
13
|
+
const E = await n.get(f.metadata(u));
|
|
14
14
|
return {
|
|
15
15
|
data: E.data.data ?? E.data
|
|
16
16
|
};
|
|
17
17
|
},
|
|
18
|
-
getRecords: async (
|
|
19
|
-
const
|
|
18
|
+
getRecords: async (u, E) => {
|
|
19
|
+
const i = await n.get(f.records(u), { params: E });
|
|
20
20
|
return {
|
|
21
|
-
data:
|
|
22
|
-
total:
|
|
21
|
+
data: i.data.data ?? i.data,
|
|
22
|
+
total: i.data.total ?? i.data.count ?? 0
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
|
-
getRecord: async (
|
|
26
|
-
const
|
|
25
|
+
getRecord: async (u, E) => {
|
|
26
|
+
const i = await n.get(f.recordById(u, E));
|
|
27
27
|
return {
|
|
28
|
-
data:
|
|
28
|
+
data: i.data.data ?? i.data
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
|
-
createRecord: async (
|
|
32
|
-
const
|
|
31
|
+
createRecord: async (u, E) => {
|
|
32
|
+
const i = await n.post(f.records(u), E);
|
|
33
33
|
return {
|
|
34
|
-
data:
|
|
34
|
+
data: i.data.data ?? i.data
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
|
-
updateRecord: async (
|
|
38
|
-
const
|
|
37
|
+
updateRecord: async (u, E, i) => {
|
|
38
|
+
const G = await n.put(f.recordById(u, E), i);
|
|
39
39
|
return {
|
|
40
|
-
data:
|
|
40
|
+
data: G.data.data ?? G.data
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
|
-
deleteRecord: async (
|
|
44
|
-
const
|
|
43
|
+
deleteRecord: async (u, E) => {
|
|
44
|
+
const i = await n.delete(f.recordById(u, E));
|
|
45
45
|
return {
|
|
46
|
-
data:
|
|
46
|
+
data: i.data.data ?? i.data
|
|
47
47
|
};
|
|
48
48
|
},
|
|
49
|
-
exportCSV: async (
|
|
49
|
+
exportCSV: async (u, E) => await n.get(f.exportCSV(u), {
|
|
50
50
|
params: E,
|
|
51
51
|
responseType: "blob"
|
|
52
52
|
}),
|
|
53
|
-
exportExcel: async (
|
|
53
|
+
exportExcel: async (u, E) => await n.get(f.exportExcel(u), {
|
|
54
54
|
params: E,
|
|
55
55
|
responseType: "blob"
|
|
56
56
|
}),
|
|
57
|
-
getDropdownOptions: async (
|
|
58
|
-
const E =
|
|
57
|
+
getDropdownOptions: async (u) => {
|
|
58
|
+
const E = f.dropdownOptions ? f.dropdownOptions(u) : u, i = await n.get(E);
|
|
59
59
|
return {
|
|
60
|
-
data:
|
|
60
|
+
data: i.data.data ?? i.data
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
var Me = { exports: {} },
|
|
64
|
+
var Me = { exports: {} }, ye = {};
|
|
65
65
|
var dt;
|
|
66
66
|
function er() {
|
|
67
|
-
if (dt) return
|
|
67
|
+
if (dt) return ye;
|
|
68
68
|
dt = 1;
|
|
69
|
-
var
|
|
70
|
-
function
|
|
71
|
-
var S,
|
|
72
|
-
V !== void 0 && (
|
|
73
|
-
for (S in
|
|
74
|
-
if (
|
|
75
|
-
return { $$typeof:
|
|
69
|
+
var n = St, f = /* @__PURE__ */ Symbol.for("react.element"), u = /* @__PURE__ */ Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, G = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
70
|
+
function J(T, h, V) {
|
|
71
|
+
var S, v = {}, D = null, B = null;
|
|
72
|
+
V !== void 0 && (D = "" + V), h.key !== void 0 && (D = "" + h.key), h.ref !== void 0 && (B = h.ref);
|
|
73
|
+
for (S in h) E.call(h, S) && !G.hasOwnProperty(S) && (v[S] = h[S]);
|
|
74
|
+
if (T && T.defaultProps) for (S in h = T.defaultProps, h) v[S] === void 0 && (v[S] = h[S]);
|
|
75
|
+
return { $$typeof: f, type: T, key: D, ref: B, props: v, _owner: i.current };
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return ye.Fragment = u, ye.jsx = J, ye.jsxs = J, ye;
|
|
78
78
|
}
|
|
79
|
-
var
|
|
80
|
-
var
|
|
79
|
+
var Ce = {};
|
|
80
|
+
var ft;
|
|
81
81
|
function tr() {
|
|
82
|
-
return
|
|
83
|
-
var
|
|
84
|
-
function
|
|
82
|
+
return ft || (ft = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
83
|
+
var n = St, f = /* @__PURE__ */ Symbol.for("react.element"), u = /* @__PURE__ */ Symbol.for("react.portal"), E = /* @__PURE__ */ Symbol.for("react.fragment"), i = /* @__PURE__ */ Symbol.for("react.strict_mode"), G = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.provider"), T = /* @__PURE__ */ Symbol.for("react.context"), h = /* @__PURE__ */ Symbol.for("react.forward_ref"), V = /* @__PURE__ */ Symbol.for("react.suspense"), S = /* @__PURE__ */ Symbol.for("react.suspense_list"), v = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.offscreen"), ne = Symbol.iterator, Te = "@@iterator";
|
|
84
|
+
function z(e) {
|
|
85
85
|
if (e === null || typeof e != "object")
|
|
86
86
|
return null;
|
|
87
|
-
var t =
|
|
87
|
+
var t = ne && e[ne] || e[Te];
|
|
88
88
|
return typeof t == "function" ? t : null;
|
|
89
89
|
}
|
|
90
|
-
var Y =
|
|
91
|
-
function
|
|
90
|
+
var Y = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
91
|
+
function x(e) {
|
|
92
92
|
{
|
|
93
|
-
for (var t = arguments.length,
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
|
|
94
|
+
o[c - 1] = arguments[c];
|
|
95
|
+
N("error", e, o);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function N(e, t, o) {
|
|
99
99
|
{
|
|
100
|
-
var c = Y.ReactDebugCurrentFrame,
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return String(
|
|
100
|
+
var c = Y.ReactDebugCurrentFrame, O = c.getStackAddendum();
|
|
101
|
+
O !== "" && (t += "%s", o = o.concat([O]));
|
|
102
|
+
var C = o.map(function(_) {
|
|
103
|
+
return String(_);
|
|
104
104
|
});
|
|
105
|
-
|
|
105
|
+
C.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, C);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
function
|
|
111
|
-
return !!(typeof e == "string" || typeof e == "function" || e === E || e ===
|
|
108
|
+
var se = !1, w = !1, k = !1, me = !1, X = !1, de;
|
|
109
|
+
de = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
110
|
+
function g(e) {
|
|
111
|
+
return !!(typeof e == "string" || typeof e == "function" || e === E || e === G || X || e === i || e === V || e === S || me || e === B || se || w || k || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === v || e.$$typeof === J || e.$$typeof === T || e.$$typeof === h || // This needs to include all possible module reference object
|
|
112
112
|
// types supported by any Flight configuration anywhere since
|
|
113
113
|
// we don't know which Flight build this will end up being used
|
|
114
114
|
// with.
|
|
115
|
-
e.$$typeof ===
|
|
115
|
+
e.$$typeof === de || e.getModuleId !== void 0));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function p(e, t, o) {
|
|
118
118
|
var c = e.displayName;
|
|
119
119
|
if (c)
|
|
120
120
|
return c;
|
|
121
|
-
var
|
|
122
|
-
return
|
|
121
|
+
var O = t.displayName || t.name || "";
|
|
122
|
+
return O !== "" ? o + "(" + O + ")" : o;
|
|
123
123
|
}
|
|
124
124
|
function l(e) {
|
|
125
125
|
return e.displayName || "Context";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function d(e) {
|
|
128
128
|
if (e == null)
|
|
129
129
|
return null;
|
|
130
|
-
if (typeof e.tag == "number" &&
|
|
130
|
+
if (typeof e.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
131
131
|
return e.displayName || e.name || null;
|
|
132
132
|
if (typeof e == "string")
|
|
133
133
|
return e;
|
|
134
134
|
switch (e) {
|
|
135
135
|
case E:
|
|
136
136
|
return "Fragment";
|
|
137
|
-
case
|
|
137
|
+
case u:
|
|
138
138
|
return "Portal";
|
|
139
|
-
case
|
|
139
|
+
case G:
|
|
140
140
|
return "Profiler";
|
|
141
|
-
case
|
|
141
|
+
case i:
|
|
142
142
|
return "StrictMode";
|
|
143
143
|
case V:
|
|
144
144
|
return "Suspense";
|
|
@@ -147,21 +147,21 @@ function tr() {
|
|
|
147
147
|
}
|
|
148
148
|
if (typeof e == "object")
|
|
149
149
|
switch (e.$$typeof) {
|
|
150
|
-
case
|
|
150
|
+
case T:
|
|
151
151
|
var t = e;
|
|
152
152
|
return l(t) + ".Consumer";
|
|
153
|
-
case
|
|
154
|
-
var
|
|
155
|
-
return l(
|
|
153
|
+
case J:
|
|
154
|
+
var o = e;
|
|
155
|
+
return l(o._context) + ".Provider";
|
|
156
|
+
case h:
|
|
157
|
+
return p(e, e.render, "ForwardRef");
|
|
156
158
|
case v:
|
|
157
|
-
return T(e, e.render, "ForwardRef");
|
|
158
|
-
case A:
|
|
159
159
|
var c = e.displayName || null;
|
|
160
|
-
return c !== null ? c :
|
|
161
|
-
case
|
|
162
|
-
var
|
|
160
|
+
return c !== null ? c : d(e.type) || "Memo";
|
|
161
|
+
case D: {
|
|
162
|
+
var O = e, C = O._payload, _ = O._init;
|
|
163
163
|
try {
|
|
164
|
-
return
|
|
164
|
+
return d(_(C));
|
|
165
165
|
} catch {
|
|
166
166
|
return null;
|
|
167
167
|
}
|
|
@@ -169,18 +169,18 @@ function tr() {
|
|
|
169
169
|
}
|
|
170
170
|
return null;
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
172
|
+
var M = Object.assign, A = 0, re, F, K, Re, ge, ie, Pe;
|
|
173
|
+
function Ie() {
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
function
|
|
175
|
+
Ie.__reactDisabledLog = !0;
|
|
176
|
+
function Fe() {
|
|
177
177
|
{
|
|
178
|
-
if (
|
|
179
|
-
|
|
178
|
+
if (A === 0) {
|
|
179
|
+
re = console.log, F = console.info, K = console.warn, Re = console.error, ge = console.group, ie = console.groupCollapsed, Pe = console.groupEnd;
|
|
180
180
|
var e = {
|
|
181
181
|
configurable: !0,
|
|
182
182
|
enumerable: !0,
|
|
183
|
-
value:
|
|
183
|
+
value: Ie,
|
|
184
184
|
writable: !0
|
|
185
185
|
};
|
|
186
186
|
Object.defineProperties(console, {
|
|
@@ -193,100 +193,100 @@ function tr() {
|
|
|
193
193
|
groupEnd: e
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
A++;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ge() {
|
|
200
200
|
{
|
|
201
|
-
if (
|
|
201
|
+
if (A--, A === 0) {
|
|
202
202
|
var e = {
|
|
203
203
|
configurable: !0,
|
|
204
204
|
enumerable: !0,
|
|
205
205
|
writable: !0
|
|
206
206
|
};
|
|
207
207
|
Object.defineProperties(console, {
|
|
208
|
-
log:
|
|
209
|
-
value:
|
|
208
|
+
log: M({}, e, {
|
|
209
|
+
value: re
|
|
210
210
|
}),
|
|
211
|
-
info:
|
|
212
|
-
value:
|
|
211
|
+
info: M({}, e, {
|
|
212
|
+
value: F
|
|
213
213
|
}),
|
|
214
|
-
warn:
|
|
215
|
-
value:
|
|
214
|
+
warn: M({}, e, {
|
|
215
|
+
value: K
|
|
216
216
|
}),
|
|
217
|
-
error:
|
|
218
|
-
value:
|
|
217
|
+
error: M({}, e, {
|
|
218
|
+
value: Re
|
|
219
219
|
}),
|
|
220
|
-
group:
|
|
221
|
-
value:
|
|
220
|
+
group: M({}, e, {
|
|
221
|
+
value: ge
|
|
222
222
|
}),
|
|
223
|
-
groupCollapsed:
|
|
224
|
-
value:
|
|
223
|
+
groupCollapsed: M({}, e, {
|
|
224
|
+
value: ie
|
|
225
225
|
}),
|
|
226
|
-
groupEnd:
|
|
227
|
-
value:
|
|
226
|
+
groupEnd: M({}, e, {
|
|
227
|
+
value: Pe
|
|
228
228
|
})
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
A < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
234
|
+
var r = Y.ReactCurrentDispatcher, s;
|
|
235
|
+
function m(e, t, o) {
|
|
236
236
|
{
|
|
237
|
-
if (
|
|
237
|
+
if (s === void 0)
|
|
238
238
|
try {
|
|
239
239
|
throw Error();
|
|
240
|
-
} catch (
|
|
241
|
-
var c =
|
|
242
|
-
|
|
240
|
+
} catch (O) {
|
|
241
|
+
var c = O.stack.trim().match(/\n( *(at )?)/);
|
|
242
|
+
s = c && c[1] || "";
|
|
243
243
|
}
|
|
244
244
|
return `
|
|
245
|
-
` +
|
|
245
|
+
` + s + e;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
var
|
|
248
|
+
var L = !1, I;
|
|
249
249
|
{
|
|
250
|
-
var
|
|
251
|
-
|
|
250
|
+
var y = typeof WeakMap == "function" ? WeakMap : Map;
|
|
251
|
+
I = new y();
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
if (!e ||
|
|
253
|
+
function Q(e, t) {
|
|
254
|
+
if (!e || L)
|
|
255
255
|
return "";
|
|
256
256
|
{
|
|
257
|
-
var
|
|
258
|
-
if (
|
|
259
|
-
return
|
|
257
|
+
var o = I.get(e);
|
|
258
|
+
if (o !== void 0)
|
|
259
|
+
return o;
|
|
260
260
|
}
|
|
261
261
|
var c;
|
|
262
|
-
|
|
263
|
-
var
|
|
262
|
+
L = !0;
|
|
263
|
+
var O = Error.prepareStackTrace;
|
|
264
264
|
Error.prepareStackTrace = void 0;
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var C;
|
|
266
|
+
C = r.current, r.current = null, Fe();
|
|
267
267
|
try {
|
|
268
268
|
if (t) {
|
|
269
|
-
var
|
|
269
|
+
var _ = function() {
|
|
270
270
|
throw Error();
|
|
271
271
|
};
|
|
272
|
-
if (Object.defineProperty(
|
|
272
|
+
if (Object.defineProperty(_.prototype, "props", {
|
|
273
273
|
set: function() {
|
|
274
274
|
throw Error();
|
|
275
275
|
}
|
|
276
276
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
277
277
|
try {
|
|
278
|
-
Reflect.construct(
|
|
278
|
+
Reflect.construct(_, []);
|
|
279
279
|
} catch (H) {
|
|
280
280
|
c = H;
|
|
281
281
|
}
|
|
282
|
-
Reflect.construct(e, [],
|
|
282
|
+
Reflect.construct(e, [], _);
|
|
283
283
|
} else {
|
|
284
284
|
try {
|
|
285
|
-
|
|
285
|
+
_.call();
|
|
286
286
|
} catch (H) {
|
|
287
287
|
c = H;
|
|
288
288
|
}
|
|
289
|
-
e.call(
|
|
289
|
+
e.call(_.prototype);
|
|
290
290
|
}
|
|
291
291
|
} else {
|
|
292
292
|
try {
|
|
@@ -300,122 +300,122 @@ function tr() {
|
|
|
300
300
|
if (H && c && typeof H.stack == "string") {
|
|
301
301
|
for (var R = H.stack.split(`
|
|
302
302
|
`), W = c.stack.split(`
|
|
303
|
-
`),
|
|
304
|
-
|
|
305
|
-
for (;
|
|
306
|
-
if (R[
|
|
307
|
-
if (
|
|
303
|
+
`), j = R.length - 1, U = W.length - 1; j >= 1 && U >= 0 && R[j] !== W[U]; )
|
|
304
|
+
U--;
|
|
305
|
+
for (; j >= 1 && U >= 0; j--, U--)
|
|
306
|
+
if (R[j] !== W[U]) {
|
|
307
|
+
if (j !== 1 || U !== 1)
|
|
308
308
|
do
|
|
309
|
-
if (
|
|
310
|
-
var
|
|
311
|
-
` + R[
|
|
312
|
-
return e.displayName &&
|
|
309
|
+
if (j--, U--, U < 0 || R[j] !== W[U]) {
|
|
310
|
+
var ee = `
|
|
311
|
+
` + R[j].replace(" at new ", " at ");
|
|
312
|
+
return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" && I.set(e, ee), ee;
|
|
313
313
|
}
|
|
314
|
-
while (
|
|
314
|
+
while (j >= 1 && U >= 0);
|
|
315
315
|
break;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
} finally {
|
|
319
|
-
|
|
319
|
+
L = !1, r.current = C, Ge(), Error.prepareStackTrace = O;
|
|
320
320
|
}
|
|
321
|
-
var Ae = e ? e.displayName || e.name : "",
|
|
322
|
-
return typeof e == "function" &&
|
|
321
|
+
var Ae = e ? e.displayName || e.name : "", he = Ae ? m(Ae) : "";
|
|
322
|
+
return typeof e == "function" && I.set(e, he), he;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
return
|
|
324
|
+
function Se(e, t, o) {
|
|
325
|
+
return Q(e, !1);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function _e(e) {
|
|
328
328
|
var t = e.prototype;
|
|
329
329
|
return !!(t && t.isReactComponent);
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function oe(e, t, o) {
|
|
332
332
|
if (e == null)
|
|
333
333
|
return "";
|
|
334
334
|
if (typeof e == "function")
|
|
335
|
-
return
|
|
335
|
+
return Q(e, _e(e));
|
|
336
336
|
if (typeof e == "string")
|
|
337
|
-
return
|
|
337
|
+
return m(e);
|
|
338
338
|
switch (e) {
|
|
339
339
|
case V:
|
|
340
|
-
return
|
|
340
|
+
return m("Suspense");
|
|
341
341
|
case S:
|
|
342
|
-
return
|
|
342
|
+
return m("SuspenseList");
|
|
343
343
|
}
|
|
344
344
|
if (typeof e == "object")
|
|
345
345
|
switch (e.$$typeof) {
|
|
346
|
+
case h:
|
|
347
|
+
return Se(e.render);
|
|
346
348
|
case v:
|
|
347
|
-
return
|
|
348
|
-
case
|
|
349
|
-
|
|
350
|
-
case C: {
|
|
351
|
-
var c = e, I = c._payload, y = c._init;
|
|
349
|
+
return oe(e.type, t, o);
|
|
350
|
+
case D: {
|
|
351
|
+
var c = e, O = c._payload, C = c._init;
|
|
352
352
|
try {
|
|
353
|
-
return
|
|
353
|
+
return oe(C(O), t, o);
|
|
354
354
|
} catch {
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
return "";
|
|
359
359
|
}
|
|
360
|
-
var
|
|
361
|
-
function
|
|
360
|
+
var fe = Object.prototype.hasOwnProperty, le = {}, b = Y.ReactDebugCurrentFrame;
|
|
361
|
+
function Z(e) {
|
|
362
362
|
if (e) {
|
|
363
|
-
var t = e._owner,
|
|
364
|
-
|
|
363
|
+
var t = e._owner, o = oe(e.type, e._source, t ? t.type : null);
|
|
364
|
+
b.setExtraStackFrame(o);
|
|
365
365
|
} else
|
|
366
|
-
|
|
366
|
+
b.setExtraStackFrame(null);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function je(e, t, o, c, O) {
|
|
369
369
|
{
|
|
370
|
-
var
|
|
371
|
-
for (var
|
|
372
|
-
if (
|
|
370
|
+
var C = Function.call.bind(fe);
|
|
371
|
+
for (var _ in e)
|
|
372
|
+
if (C(e, _)) {
|
|
373
373
|
var R = void 0;
|
|
374
374
|
try {
|
|
375
|
-
if (typeof e[
|
|
376
|
-
var W = Error((c || "React class") + ": " +
|
|
375
|
+
if (typeof e[_] != "function") {
|
|
376
|
+
var W = Error((c || "React class") + ": " + o + " type `" + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[_] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
377
377
|
throw W.name = "Invariant Violation", W;
|
|
378
378
|
}
|
|
379
|
-
R = e[
|
|
380
|
-
} catch (
|
|
381
|
-
R =
|
|
379
|
+
R = e[_](t, _, c, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
380
|
+
} catch (j) {
|
|
381
|
+
R = j;
|
|
382
382
|
}
|
|
383
|
-
R && !(R instanceof Error) && (
|
|
383
|
+
R && !(R instanceof Error) && (Z(O), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", o, _, typeof R), Z(null)), R instanceof Error && !(R.message in le) && (le[R.message] = !0, Z(O), x("Failed %s type: %s", o, R.message), Z(null));
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
function
|
|
389
|
-
return
|
|
387
|
+
var we = Array.isArray;
|
|
388
|
+
function Ve(e) {
|
|
389
|
+
return we(e);
|
|
390
390
|
}
|
|
391
391
|
function yt(e) {
|
|
392
392
|
{
|
|
393
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag,
|
|
394
|
-
return
|
|
393
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, o = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
394
|
+
return o;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
function Ct(e) {
|
|
398
398
|
try {
|
|
399
|
-
return
|
|
399
|
+
return Ze(e), !1;
|
|
400
400
|
} catch {
|
|
401
401
|
return !0;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Ze(e) {
|
|
405
405
|
return "" + e;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function et(e) {
|
|
408
408
|
if (Ct(e))
|
|
409
|
-
return
|
|
409
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(e)), Ze(e);
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var tt = Y.ReactCurrentOwner, Dt = {
|
|
412
412
|
key: !0,
|
|
413
413
|
ref: !0,
|
|
414
414
|
__self: !0,
|
|
415
415
|
__source: !0
|
|
416
|
-
},
|
|
416
|
+
}, rt, at;
|
|
417
417
|
function xt(e) {
|
|
418
|
-
if (
|
|
418
|
+
if (fe.call(e, "ref")) {
|
|
419
419
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
420
420
|
if (t && t.isReactWarning)
|
|
421
421
|
return !1;
|
|
@@ -423,7 +423,7 @@ function tr() {
|
|
|
423
423
|
return e.ref !== void 0;
|
|
424
424
|
}
|
|
425
425
|
function bt(e) {
|
|
426
|
-
if (
|
|
426
|
+
if (fe.call(e, "key")) {
|
|
427
427
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
428
428
|
if (t && t.isReactWarning)
|
|
429
429
|
return !1;
|
|
@@ -431,41 +431,41 @@ function tr() {
|
|
|
431
431
|
return e.key !== void 0;
|
|
432
432
|
}
|
|
433
433
|
function Nt(e, t) {
|
|
434
|
-
typeof e.ref == "string" &&
|
|
434
|
+
typeof e.ref == "string" && tt.current;
|
|
435
435
|
}
|
|
436
436
|
function Lt(e, t) {
|
|
437
437
|
{
|
|
438
|
-
var
|
|
439
|
-
|
|
438
|
+
var o = function() {
|
|
439
|
+
rt || (rt = !0, x("%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://reactjs.org/link/special-props)", t));
|
|
440
440
|
};
|
|
441
|
-
|
|
442
|
-
get:
|
|
441
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
442
|
+
get: o,
|
|
443
443
|
configurable: !0
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
function Pt(e, t) {
|
|
448
448
|
{
|
|
449
|
-
var
|
|
450
|
-
|
|
449
|
+
var o = function() {
|
|
450
|
+
at || (at = !0, x("%s: `ref` 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://reactjs.org/link/special-props)", t));
|
|
451
451
|
};
|
|
452
|
-
|
|
453
|
-
get:
|
|
452
|
+
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
453
|
+
get: o,
|
|
454
454
|
configurable: !0
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
var
|
|
458
|
+
var Ft = function(e, t, o, c, O, C, _) {
|
|
459
459
|
var R = {
|
|
460
460
|
// This tag allows us to uniquely identify this as a React Element
|
|
461
|
-
$$typeof:
|
|
461
|
+
$$typeof: f,
|
|
462
462
|
// Built-in properties that belong on the element
|
|
463
463
|
type: e,
|
|
464
464
|
key: t,
|
|
465
|
-
ref:
|
|
466
|
-
props:
|
|
465
|
+
ref: o,
|
|
466
|
+
props: _,
|
|
467
467
|
// Record the component responsible for creating this element.
|
|
468
|
-
_owner:
|
|
468
|
+
_owner: C
|
|
469
469
|
};
|
|
470
470
|
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
471
471
|
configurable: !1,
|
|
@@ -481,44 +481,44 @@ function tr() {
|
|
|
481
481
|
configurable: !1,
|
|
482
482
|
enumerable: !1,
|
|
483
483
|
writable: !1,
|
|
484
|
-
value:
|
|
484
|
+
value: O
|
|
485
485
|
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
486
486
|
};
|
|
487
|
-
function
|
|
487
|
+
function jt(e, t, o, c, O) {
|
|
488
488
|
{
|
|
489
|
-
var
|
|
490
|
-
|
|
491
|
-
for (
|
|
492
|
-
|
|
489
|
+
var C, _ = {}, R = null, W = null;
|
|
490
|
+
o !== void 0 && (et(o), R = "" + o), bt(t) && (et(t.key), R = "" + t.key), xt(t) && (W = t.ref, Nt(t, O));
|
|
491
|
+
for (C in t)
|
|
492
|
+
fe.call(t, C) && !Dt.hasOwnProperty(C) && (_[C] = t[C]);
|
|
493
493
|
if (e && e.defaultProps) {
|
|
494
|
-
var
|
|
495
|
-
for (
|
|
496
|
-
|
|
494
|
+
var j = e.defaultProps;
|
|
495
|
+
for (C in j)
|
|
496
|
+
_[C] === void 0 && (_[C] = j[C]);
|
|
497
497
|
}
|
|
498
498
|
if (R || W) {
|
|
499
|
-
var
|
|
500
|
-
R && Lt(
|
|
499
|
+
var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
500
|
+
R && Lt(_, U), W && Pt(_, U);
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return Ft(e, R, W, O, c, tt.current, _);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var
|
|
506
|
-
function
|
|
505
|
+
var Ye = Y.ReactCurrentOwner, nt = Y.ReactDebugCurrentFrame;
|
|
506
|
+
function ve(e) {
|
|
507
507
|
if (e) {
|
|
508
|
-
var t = e._owner,
|
|
509
|
-
|
|
508
|
+
var t = e._owner, o = oe(e.type, e._source, t ? t.type : null);
|
|
509
|
+
nt.setExtraStackFrame(o);
|
|
510
510
|
} else
|
|
511
|
-
|
|
511
|
+
nt.setExtraStackFrame(null);
|
|
512
512
|
}
|
|
513
|
-
var
|
|
514
|
-
|
|
515
|
-
function
|
|
516
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
513
|
+
var We;
|
|
514
|
+
We = !1;
|
|
515
|
+
function Be(e) {
|
|
516
|
+
return typeof e == "object" && e !== null && e.$$typeof === f;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function ot() {
|
|
519
519
|
{
|
|
520
|
-
if (
|
|
521
|
-
var e =
|
|
520
|
+
if (Ye.current) {
|
|
521
|
+
var e = d(Ye.current.type);
|
|
522
522
|
if (e)
|
|
523
523
|
return `
|
|
524
524
|
|
|
@@ -527,51 +527,51 @@ Check the render method of \`` + e + "`.";
|
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function wt(e) {
|
|
531
531
|
return "";
|
|
532
532
|
}
|
|
533
|
-
var
|
|
534
|
-
function
|
|
533
|
+
var st = {};
|
|
534
|
+
function Mt(e) {
|
|
535
535
|
{
|
|
536
|
-
var t =
|
|
536
|
+
var t = ot();
|
|
537
537
|
if (!t) {
|
|
538
|
-
var
|
|
539
|
-
|
|
538
|
+
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
539
|
+
o && (t = `
|
|
540
540
|
|
|
541
|
-
Check the top-level render call using <` +
|
|
541
|
+
Check the top-level render call using <` + o + ">.");
|
|
542
542
|
}
|
|
543
543
|
return t;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function it(e, t) {
|
|
547
547
|
{
|
|
548
548
|
if (!e._store || e._store.validated || e.key != null)
|
|
549
549
|
return;
|
|
550
550
|
e._store.validated = !0;
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
551
|
+
var o = Mt(t);
|
|
552
|
+
if (st[o])
|
|
553
553
|
return;
|
|
554
|
-
|
|
554
|
+
st[o] = !0;
|
|
555
555
|
var c = "";
|
|
556
|
-
e && e._owner && e._owner !==
|
|
556
|
+
e && e._owner && e._owner !== Ye.current && (c = " It was passed a child from " + d(e._owner.type) + "."), ve(e), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, c), ve(null);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function lt(e, t) {
|
|
560
560
|
{
|
|
561
561
|
if (typeof e != "object")
|
|
562
562
|
return;
|
|
563
|
-
if (
|
|
564
|
-
for (var
|
|
565
|
-
var c = e[
|
|
566
|
-
|
|
563
|
+
if (Ve(e))
|
|
564
|
+
for (var o = 0; o < e.length; o++) {
|
|
565
|
+
var c = e[o];
|
|
566
|
+
Be(c) && it(c, t);
|
|
567
567
|
}
|
|
568
|
-
else if (
|
|
568
|
+
else if (Be(e))
|
|
569
569
|
e._store && (e._store.validated = !0);
|
|
570
570
|
else if (e) {
|
|
571
|
-
var
|
|
572
|
-
if (typeof
|
|
573
|
-
for (var
|
|
574
|
-
|
|
571
|
+
var O = z(e);
|
|
572
|
+
if (typeof O == "function" && O !== e.entries)
|
|
573
|
+
for (var C = O.call(e), _; !(_ = C.next()).done; )
|
|
574
|
+
Be(_.value) && it(_.value, t);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
}
|
|
@@ -580,108 +580,108 @@ Check the top-level render call using <` + n + ">.");
|
|
|
580
580
|
var t = e.type;
|
|
581
581
|
if (t == null || typeof t == "string")
|
|
582
582
|
return;
|
|
583
|
-
var
|
|
583
|
+
var o;
|
|
584
584
|
if (typeof t == "function")
|
|
585
|
-
|
|
586
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
585
|
+
o = t.propTypes;
|
|
586
|
+
else if (typeof t == "object" && (t.$$typeof === h || // Note: Memo only checks outer props here.
|
|
587
587
|
// Inner props are checked in the reconciler.
|
|
588
|
-
t.$$typeof ===
|
|
589
|
-
|
|
588
|
+
t.$$typeof === v))
|
|
589
|
+
o = t.propTypes;
|
|
590
590
|
else
|
|
591
591
|
return;
|
|
592
|
-
if (
|
|
593
|
-
var c =
|
|
594
|
-
|
|
595
|
-
} else if (t.PropTypes !== void 0 && !
|
|
596
|
-
|
|
597
|
-
var
|
|
598
|
-
|
|
592
|
+
if (o) {
|
|
593
|
+
var c = d(t);
|
|
594
|
+
je(o, e.props, "prop", c, e);
|
|
595
|
+
} else if (t.PropTypes !== void 0 && !We) {
|
|
596
|
+
We = !0;
|
|
597
|
+
var O = d(t);
|
|
598
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
599
599
|
}
|
|
600
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
600
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
function $t(e) {
|
|
604
604
|
{
|
|
605
|
-
for (var t = Object.keys(e.props),
|
|
606
|
-
var c = t[
|
|
605
|
+
for (var t = Object.keys(e.props), o = 0; o < t.length; o++) {
|
|
606
|
+
var c = t[o];
|
|
607
607
|
if (c !== "children" && c !== "key") {
|
|
608
|
-
|
|
608
|
+
ve(e), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), ve(null);
|
|
609
609
|
break;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
e.ref !== null && (
|
|
612
|
+
e.ref !== null && (ve(e), x("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
var
|
|
616
|
-
function
|
|
615
|
+
var ct = {};
|
|
616
|
+
function ut(e, t, o, c, O, C) {
|
|
617
617
|
{
|
|
618
|
-
var
|
|
619
|
-
if (!
|
|
618
|
+
var _ = g(e);
|
|
619
|
+
if (!_) {
|
|
620
620
|
var R = "";
|
|
621
621
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
622
|
-
var W =
|
|
623
|
-
W ? R += W : R +=
|
|
624
|
-
var
|
|
625
|
-
e === null ?
|
|
622
|
+
var W = wt();
|
|
623
|
+
W ? R += W : R += ot();
|
|
624
|
+
var j;
|
|
625
|
+
e === null ? j = "null" : Ve(e) ? j = "array" : e !== void 0 && e.$$typeof === f ? (j = "<" + (d(e.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : j = typeof e, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, R);
|
|
626
626
|
}
|
|
627
|
-
var
|
|
628
|
-
if (
|
|
629
|
-
return
|
|
630
|
-
if (
|
|
631
|
-
var
|
|
632
|
-
if (
|
|
627
|
+
var U = jt(e, t, o, O, C);
|
|
628
|
+
if (U == null)
|
|
629
|
+
return U;
|
|
630
|
+
if (_) {
|
|
631
|
+
var ee = t.children;
|
|
632
|
+
if (ee !== void 0)
|
|
633
633
|
if (c)
|
|
634
|
-
if (
|
|
635
|
-
for (var Ae = 0; Ae <
|
|
636
|
-
|
|
637
|
-
Object.freeze && Object.freeze(
|
|
634
|
+
if (Ve(ee)) {
|
|
635
|
+
for (var Ae = 0; Ae < ee.length; Ae++)
|
|
636
|
+
lt(ee[Ae], e);
|
|
637
|
+
Object.freeze && Object.freeze(ee);
|
|
638
638
|
} else
|
|
639
|
-
|
|
639
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
640
640
|
else
|
|
641
|
-
|
|
641
|
+
lt(ee, e);
|
|
642
642
|
}
|
|
643
|
-
if (
|
|
644
|
-
var
|
|
643
|
+
if (fe.call(t, "key")) {
|
|
644
|
+
var he = d(e), H = Object.keys(t).filter(function(Bt) {
|
|
645
645
|
return Bt !== "key";
|
|
646
|
-
}),
|
|
647
|
-
if (!
|
|
646
|
+
}), He = H.length > 0 ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
647
|
+
if (!ct[he + He]) {
|
|
648
648
|
var Wt = H.length > 0 ? "{" + H.join(": ..., ") + ": ...}" : "{}";
|
|
649
|
-
|
|
649
|
+
x(`A props object containing a "key" prop is being spread into JSX:
|
|
650
650
|
let props = %s;
|
|
651
651
|
<%s {...props} />
|
|
652
652
|
React keys must be passed directly to JSX without using spread:
|
|
653
653
|
let props = %s;
|
|
654
|
-
<%s key={someKey} {...props} />`,
|
|
654
|
+
<%s key={someKey} {...props} />`, He, he, Wt, he), ct[he + He] = !0;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
return e === E ? $t(
|
|
657
|
+
return e === E ? $t(U) : Ut(U), U;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
660
|
+
function kt(e, t, o) {
|
|
661
|
+
return ut(e, t, o, !0);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function Gt(e, t, o) {
|
|
664
|
+
return ut(e, t, o, !1);
|
|
665
665
|
}
|
|
666
|
-
var Vt =
|
|
667
|
-
|
|
668
|
-
})()),
|
|
666
|
+
var Vt = Gt, Yt = kt;
|
|
667
|
+
Ce.Fragment = E, Ce.jsx = Vt, Ce.jsxs = Yt;
|
|
668
|
+
})()), Ce;
|
|
669
669
|
}
|
|
670
|
-
var
|
|
670
|
+
var Et;
|
|
671
671
|
function rr() {
|
|
672
|
-
return
|
|
672
|
+
return Et || (Et = 1, process.env.NODE_ENV === "production" ? Me.exports = er() : Me.exports = tr()), Me.exports;
|
|
673
673
|
}
|
|
674
|
-
var
|
|
675
|
-
const ar =
|
|
674
|
+
var a = rr();
|
|
675
|
+
const ar = pe(P)(({ theme: n }) => ({
|
|
676
676
|
width: "100%",
|
|
677
|
-
fontFamily:
|
|
678
|
-
})),
|
|
677
|
+
fontFamily: n.typography.fontFamily
|
|
678
|
+
})), pt = pe("div")(({ theme: n }) => ({
|
|
679
679
|
width: "100%",
|
|
680
680
|
"& .ag-header": {
|
|
681
681
|
borderRadius: "8px 8px 0 0"
|
|
682
682
|
},
|
|
683
683
|
"& .ag-theme-alpine": {
|
|
684
|
-
fontFamily:
|
|
684
|
+
fontFamily: n.typography.fontFamily
|
|
685
685
|
},
|
|
686
686
|
"& .ag-header-cell-text": {
|
|
687
687
|
fontSize: "14px",
|
|
@@ -692,7 +692,9 @@ const ar = ue(L)(({ theme: a }) => ({
|
|
|
692
692
|
fontSize: "14px",
|
|
693
693
|
fontWeight: 400,
|
|
694
694
|
color: "#000",
|
|
695
|
-
padding: "12px 16px"
|
|
695
|
+
padding: "12px 16px",
|
|
696
|
+
display: "flex",
|
|
697
|
+
alignItems: "center"
|
|
696
698
|
},
|
|
697
699
|
"& .right-aligned-cell": {
|
|
698
700
|
textAlign: "right"
|
|
@@ -715,7 +717,7 @@ const ar = ue(L)(({ theme: a }) => ({
|
|
|
715
717
|
border: "1px solid transparent !important"
|
|
716
718
|
}
|
|
717
719
|
}));
|
|
718
|
-
|
|
720
|
+
pe(P)(() => ({
|
|
719
721
|
position: "fixed",
|
|
720
722
|
inset: 0,
|
|
721
723
|
display: "flex",
|
|
@@ -724,22 +726,22 @@ ue(L)(() => ({
|
|
|
724
726
|
zIndex: 1301,
|
|
725
727
|
background: "rgba(255, 255, 255, 0.5)"
|
|
726
728
|
}));
|
|
727
|
-
const nr =
|
|
729
|
+
const nr = pe(P)(({ theme: n }) => ({
|
|
728
730
|
display: "flex",
|
|
729
731
|
justifyContent: "flex-end",
|
|
730
732
|
marginTop: "16px",
|
|
731
733
|
gap: "16px",
|
|
732
|
-
[
|
|
734
|
+
[n.breakpoints.down("md")]: {
|
|
733
735
|
flexWrap: "wrap",
|
|
734
736
|
justifyContent: "center",
|
|
735
737
|
gap: "12px"
|
|
736
738
|
},
|
|
737
|
-
[
|
|
739
|
+
[n.breakpoints.down("sm")]: {
|
|
738
740
|
flexDirection: "column",
|
|
739
741
|
alignItems: "center",
|
|
740
742
|
gap: "16px"
|
|
741
743
|
}
|
|
742
|
-
})), or =
|
|
744
|
+
})), or = pe(Ht)(() => ({
|
|
743
745
|
fontSize: "14px",
|
|
744
746
|
border: "none",
|
|
745
747
|
boxShadow: "none",
|
|
@@ -755,10 +757,10 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
755
757
|
paddingLeft: "8px",
|
|
756
758
|
paddingRight: "32px !important"
|
|
757
759
|
}
|
|
758
|
-
})), sr =
|
|
759
|
-
({ height:
|
|
760
|
-
...
|
|
761
|
-
height: `${
|
|
760
|
+
})), sr = pe(P)(
|
|
761
|
+
({ height: n }) => ({
|
|
762
|
+
...n !== void 0 && {
|
|
763
|
+
height: `${n}px`
|
|
762
764
|
},
|
|
763
765
|
"&.ag-theme-alpine": {
|
|
764
766
|
border: "none !important"
|
|
@@ -791,21 +793,21 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
791
793
|
justifyContent: "space-between"
|
|
792
794
|
}
|
|
793
795
|
})
|
|
794
|
-
), ir =
|
|
795
|
-
({ theme:
|
|
796
|
+
), ir = pe(zt)(
|
|
797
|
+
({ theme: n }) => ({
|
|
796
798
|
display: "flex",
|
|
797
799
|
flexDirection: "row",
|
|
798
800
|
alignItems: "center",
|
|
799
|
-
[
|
|
801
|
+
[n.breakpoints.down("sm")]: {
|
|
800
802
|
flexWrap: "wrap",
|
|
801
803
|
justifyContent: "center",
|
|
802
804
|
gap: "8px"
|
|
803
805
|
}
|
|
804
806
|
})
|
|
805
|
-
), Tt =
|
|
807
|
+
), Tt = pe(P)(({ theme: n }) => ({
|
|
806
808
|
fontWeight: 300,
|
|
807
809
|
fontSize: "14px",
|
|
808
|
-
[
|
|
810
|
+
[n.breakpoints.down("sm")]: {
|
|
809
811
|
fontSize: "12px"
|
|
810
812
|
}
|
|
811
813
|
})), lr = {
|
|
@@ -813,7 +815,7 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
813
815
|
MIN_HEIGHT: 300,
|
|
814
816
|
MAX_HEIGHT: 800,
|
|
815
817
|
DEFAULT_ROW_HEIGHT: 50
|
|
816
|
-
},
|
|
818
|
+
}, vr = {
|
|
817
819
|
DEFAULT_PAGE: 1,
|
|
818
820
|
DEFAULT_PAGE_SIZE: 10,
|
|
819
821
|
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
|
|
@@ -825,10 +827,10 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
825
827
|
UI_COLUMN_SORTED: "uiColumnSorted",
|
|
826
828
|
API: "api",
|
|
827
829
|
COLUMN_MOVED: "columnMoved"
|
|
828
|
-
},
|
|
830
|
+
}, mt = {
|
|
829
831
|
NORMAL: "normal",
|
|
830
832
|
AUTO_HEIGHT: "autoHeight"
|
|
831
|
-
},
|
|
833
|
+
}, It = {
|
|
832
834
|
CLIENT_SIDE: "clientSide",
|
|
833
835
|
SERVER_SIDE: "serverSide",
|
|
834
836
|
INFINITE: "infinite",
|
|
@@ -838,11 +840,11 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
838
840
|
ACTION_COLUMN_WIDTH: 150,
|
|
839
841
|
SORTABLE: !0,
|
|
840
842
|
FILTER: !1
|
|
841
|
-
},
|
|
843
|
+
}, ur = {
|
|
842
844
|
NO_DATA: "N/A",
|
|
843
845
|
LOADING: "Loading...",
|
|
844
846
|
NO_RECORDS: "No records found"
|
|
845
|
-
},
|
|
847
|
+
}, dr = {
|
|
846
848
|
AG_THEME_ALPINE: "ag-theme-alpine",
|
|
847
849
|
AG_THEME_BALHAM: "ag-theme-balham",
|
|
848
850
|
AG_THEME_MATERIAL: "ag-theme-material"
|
|
@@ -850,85 +852,95 @@ const nr = ue(L)(({ theme: a }) => ({
|
|
|
850
852
|
URL_REVOKE: 100
|
|
851
853
|
// milliseconds to wait before revoking blob URL
|
|
852
854
|
};
|
|
853
|
-
Qt.registerModules([
|
|
855
|
+
Qt.registerModules([At, Zt]);
|
|
854
856
|
const Er = ({
|
|
855
|
-
rows:
|
|
856
|
-
totalRecords:
|
|
857
|
-
currentPage:
|
|
857
|
+
rows: n,
|
|
858
|
+
totalRecords: f,
|
|
859
|
+
currentPage: u,
|
|
858
860
|
loading: E,
|
|
859
|
-
onPageChange:
|
|
860
|
-
columns:
|
|
861
|
-
pageSize:
|
|
862
|
-
pageSizeOptions:
|
|
863
|
-
onPageSizeChange:
|
|
861
|
+
onPageChange: i,
|
|
862
|
+
columns: G,
|
|
863
|
+
pageSize: J,
|
|
864
|
+
pageSizeOptions: T,
|
|
865
|
+
onPageSizeChange: h,
|
|
864
866
|
setSort: V,
|
|
865
867
|
sortModel: S,
|
|
866
|
-
height:
|
|
867
|
-
domLayout:
|
|
868
|
+
height: v = lr.DEFAULT_HEIGHT,
|
|
869
|
+
domLayout: D = mt.NORMAL,
|
|
868
870
|
getRowHeight: B,
|
|
869
|
-
pinnedBottomRowData:
|
|
870
|
-
showLoader:
|
|
871
|
-
emptyDataMessage:
|
|
871
|
+
pinnedBottomRowData: ne,
|
|
872
|
+
showLoader: Te = !0,
|
|
873
|
+
emptyDataMessage: z,
|
|
872
874
|
...Y
|
|
873
875
|
}) => {
|
|
874
|
-
const
|
|
875
|
-
if (
|
|
876
|
-
const
|
|
877
|
-
colId:
|
|
878
|
-
sort:
|
|
876
|
+
const x = ke(null), N = ke([]), se = (w) => {
|
|
877
|
+
if (w.source !== cr.UI_COLUMN_SORTED || (console.log("Sort Changed Event (User Initiated):", w), !V)) return;
|
|
878
|
+
const k = w.api.getColumnState().filter((X) => X.sort).map((X) => ({
|
|
879
|
+
colId: X.colId,
|
|
880
|
+
sort: X.sort
|
|
879
881
|
}));
|
|
880
|
-
console.log("New Sort Model:",
|
|
882
|
+
console.log("New Sort Model:", k), JSON.stringify(k) !== JSON.stringify(N.current) && (N.current = k, V(k));
|
|
881
883
|
};
|
|
882
|
-
return
|
|
883
|
-
|
|
884
|
+
return Te && E ? /* @__PURE__ */ a.jsx(
|
|
885
|
+
pt,
|
|
884
886
|
{
|
|
885
887
|
style: {
|
|
886
888
|
display: "flex",
|
|
887
889
|
alignItems: "center",
|
|
888
890
|
justifyContent: "center",
|
|
889
|
-
height:
|
|
891
|
+
height: v,
|
|
890
892
|
minHeight: 120
|
|
891
893
|
},
|
|
892
|
-
children: /* @__PURE__ */
|
|
894
|
+
children: /* @__PURE__ */ a.jsx($e, {})
|
|
893
895
|
}
|
|
894
|
-
) : /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
+
) : /* @__PURE__ */ a.jsx(pt, { "data-testid": "ServerSideGrid", className: dr.AG_THEME_ALPINE, children: /* @__PURE__ */ a.jsxs(ar, { children: [
|
|
897
|
+
/* @__PURE__ */ a.jsx(
|
|
896
898
|
sr,
|
|
897
899
|
{
|
|
898
|
-
height:
|
|
899
|
-
children: /* @__PURE__ */
|
|
900
|
-
|
|
900
|
+
height: D === mt.AUTO_HEIGHT ? void 0 : v,
|
|
901
|
+
children: /* @__PURE__ */ a.jsx(
|
|
902
|
+
Kt,
|
|
901
903
|
{
|
|
902
|
-
ref:
|
|
904
|
+
ref: x,
|
|
903
905
|
theme: "legacy",
|
|
904
|
-
columnDefs:
|
|
905
|
-
rowData:
|
|
906
|
-
pinnedBottomRowData:
|
|
907
|
-
domLayout:
|
|
908
|
-
rowModelType:
|
|
909
|
-
modules: [
|
|
906
|
+
columnDefs: G,
|
|
907
|
+
rowData: n,
|
|
908
|
+
pinnedBottomRowData: ne,
|
|
909
|
+
domLayout: D,
|
|
910
|
+
rowModelType: It.CLIENT_SIDE,
|
|
911
|
+
modules: [At],
|
|
910
912
|
localeText: {
|
|
911
|
-
noRowsToShow:
|
|
913
|
+
noRowsToShow: z || "No data to show"
|
|
912
914
|
},
|
|
913
915
|
...Y,
|
|
914
916
|
enableBrowserTooltips: !0,
|
|
915
917
|
suppressMovableColumns: !0,
|
|
916
918
|
suppressMenuHide: !0,
|
|
917
|
-
onSortChanged:
|
|
919
|
+
onSortChanged: se,
|
|
920
|
+
suppressAutoSize: !0,
|
|
921
|
+
suppressColumnMoveAnimation: !0,
|
|
918
922
|
defaultColDef: {
|
|
919
923
|
width: 170,
|
|
920
924
|
sortable: !0,
|
|
921
925
|
unSortIcon: !0,
|
|
922
|
-
tooltipValueGetter: (
|
|
926
|
+
tooltipValueGetter: (w) => w.value ?? ur.NO_DATA,
|
|
927
|
+
suppressSizeToFit: !0,
|
|
928
|
+
suppressAutoSize: !0,
|
|
929
|
+
resizable: !0,
|
|
930
|
+
lockPosition: !0,
|
|
931
|
+
lockPinned: !0
|
|
923
932
|
},
|
|
924
933
|
suppressRowTransform: !0,
|
|
925
934
|
getRowHeight: B ?? (() => 54),
|
|
926
935
|
maintainColumnOrder: !0,
|
|
936
|
+
suppressColumnVirtualisation: !1,
|
|
937
|
+
suppressAnimationFrame: !1,
|
|
938
|
+
skipHeaderOnAutoSize: !0,
|
|
927
939
|
initialState: S && S.length > 0 ? {
|
|
928
940
|
sort: {
|
|
929
|
-
sortModel: S.map((
|
|
930
|
-
colId:
|
|
931
|
-
sort:
|
|
941
|
+
sortModel: S.map((w) => ({
|
|
942
|
+
colId: w.colId,
|
|
943
|
+
sort: w.sort
|
|
932
944
|
}))
|
|
933
945
|
}
|
|
934
946
|
} : void 0
|
|
@@ -936,47 +948,47 @@ const Er = ({
|
|
|
936
948
|
)
|
|
937
949
|
}
|
|
938
950
|
),
|
|
939
|
-
|
|
951
|
+
f === 0 && /* @__PURE__ */ a.jsx(Xt, {})
|
|
940
952
|
] }) });
|
|
941
|
-
},
|
|
942
|
-
totalRecords:
|
|
943
|
-
currentPage:
|
|
944
|
-
pageSize:
|
|
953
|
+
}, pr = ({
|
|
954
|
+
totalRecords: n,
|
|
955
|
+
currentPage: f,
|
|
956
|
+
pageSize: u,
|
|
945
957
|
onPageChange: E
|
|
946
958
|
}) => {
|
|
947
|
-
const
|
|
948
|
-
return /* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
|
|
959
|
+
const i = Math.ceil(n / u);
|
|
960
|
+
return /* @__PURE__ */ a.jsxs(P, { sx: { display: "flex", gap: 2, alignItems: "center" }, children: [
|
|
961
|
+
/* @__PURE__ */ a.jsx(
|
|
962
|
+
ue,
|
|
951
963
|
{
|
|
952
964
|
size: "small",
|
|
953
|
-
disabled:
|
|
954
|
-
onClick: () => E(
|
|
965
|
+
disabled: f === 1,
|
|
966
|
+
onClick: () => E(f - 1),
|
|
955
967
|
children: "Previous"
|
|
956
968
|
}
|
|
957
969
|
),
|
|
958
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ a.jsxs(Le, { variant: "body2", children: [
|
|
959
971
|
"Page ",
|
|
960
|
-
|
|
972
|
+
f,
|
|
961
973
|
" of ",
|
|
962
|
-
|
|
974
|
+
i || 1
|
|
963
975
|
] }),
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
|
|
976
|
+
/* @__PURE__ */ a.jsx(
|
|
977
|
+
ue,
|
|
966
978
|
{
|
|
967
979
|
size: "small",
|
|
968
|
-
disabled:
|
|
969
|
-
onClick: () => E(
|
|
980
|
+
disabled: f >= i,
|
|
981
|
+
onClick: () => E(f + 1),
|
|
970
982
|
children: "Next"
|
|
971
983
|
}
|
|
972
984
|
)
|
|
973
985
|
] });
|
|
974
|
-
},
|
|
986
|
+
}, Xe = {
|
|
975
987
|
MASTER_DATA_MANAGEMENT: "Master Data Management",
|
|
976
988
|
ADD_NEW_RECORD: "Add New Record",
|
|
977
989
|
EDIT_RECORD: "Edit Record",
|
|
978
990
|
VIEW_RECORD: "View Record"
|
|
979
|
-
},
|
|
991
|
+
}, Ee = {
|
|
980
992
|
VIEW: "View",
|
|
981
993
|
ADD_NEW_RECORD: "Add New Record",
|
|
982
994
|
EDIT: "Edit",
|
|
@@ -985,19 +997,19 @@ const Er = ({
|
|
|
985
997
|
CANCEL: "Cancel",
|
|
986
998
|
BACK: "Back",
|
|
987
999
|
EXPORT: "Export"
|
|
988
|
-
},
|
|
1000
|
+
}, qe = {
|
|
989
1001
|
SELECT_ENTITY: "Select Entity",
|
|
990
1002
|
ACTIONS: "Actions",
|
|
991
1003
|
FROM: "From",
|
|
992
1004
|
TO: "To"
|
|
993
|
-
},
|
|
1005
|
+
}, xe = {
|
|
994
1006
|
SELECT_ENTITY: "Select Entity",
|
|
995
|
-
SELECT: (
|
|
996
|
-
FILTER_BY: (
|
|
997
|
-
},
|
|
1007
|
+
SELECT: (n) => `Select ${n}`,
|
|
1008
|
+
FILTER_BY: (n) => `Filter by ${n}`
|
|
1009
|
+
}, Rt = {
|
|
998
1010
|
CSV: "CSV Format",
|
|
999
1011
|
EXCEL: "Excel Format"
|
|
1000
|
-
},
|
|
1012
|
+
}, gt = {
|
|
1001
1013
|
CSV: "csv",
|
|
1002
1014
|
EXCEL: "xlsx"
|
|
1003
1015
|
}, ce = {
|
|
@@ -1008,11 +1020,11 @@ const Er = ({
|
|
|
1008
1020
|
FAILED_SAVE_RECORD: "Failed to save record. Please try again.",
|
|
1009
1021
|
FAILED_EXPORT_CSV: "Failed to export CSV",
|
|
1010
1022
|
FAILED_EXPORT_EXCEL: "Failed to export Excel",
|
|
1011
|
-
FAILED_LOAD_OPTIONS: (
|
|
1023
|
+
FAILED_LOAD_OPTIONS: (n) => `Failed to load options for ${n}`,
|
|
1012
1024
|
FAILED_LOAD_FORM_CONFIG: "Failed to load form configuration",
|
|
1013
|
-
FIELD_REQUIRED: (
|
|
1014
|
-
FIELD_MIN_VALUE: (
|
|
1015
|
-
FIELD_MAX_VALUE: (
|
|
1025
|
+
FIELD_REQUIRED: (n) => `${n} is required`,
|
|
1026
|
+
FIELD_MIN_VALUE: (n, f) => `${n} must be at least ${f}`,
|
|
1027
|
+
FIELD_MAX_VALUE: (n, f) => `${n} must be at most ${f}`
|
|
1016
1028
|
}, Ir = {
|
|
1017
1029
|
RECORD_CREATED: "Record created successfully",
|
|
1018
1030
|
RECORD_UPDATED: "Record updated successfully",
|
|
@@ -1026,7 +1038,7 @@ const Er = ({
|
|
|
1026
1038
|
}, Dr = {
|
|
1027
1039
|
LOADING: "Loading...",
|
|
1028
1040
|
PLEASE_WAIT: "Please wait..."
|
|
1029
|
-
},
|
|
1041
|
+
}, Je = {
|
|
1030
1042
|
SHOWING: "Showing",
|
|
1031
1043
|
OF: "of",
|
|
1032
1044
|
ENTRIES: "entries"
|
|
@@ -1051,7 +1063,7 @@ const Er = ({
|
|
|
1051
1063
|
ACTION_BUTTON_GAP: 1,
|
|
1052
1064
|
FORM_MARGIN_TOP: 3,
|
|
1053
1065
|
FORM_MARGIN_BOTTOM: 2
|
|
1054
|
-
}, _t = [10, 20, 50, 100],
|
|
1066
|
+
}, _t = [10, 20, 50, 100], Tr = " *", mr = "red", Rr = "_display", Nr = {
|
|
1055
1067
|
ISO_DATE: "YYYY-MM-DD",
|
|
1056
1068
|
DISPLAY_DATE: "DD/MM/YYYY",
|
|
1057
1069
|
FILE_DATE: "YYYY-MM-DD"
|
|
@@ -1063,39 +1075,39 @@ const Er = ({
|
|
|
1063
1075
|
HEADERS: {
|
|
1064
1076
|
CONTENT_TYPE: "application/json"
|
|
1065
1077
|
}
|
|
1066
|
-
}, jr = {
|
|
1067
|
-
MASTER: "/master"
|
|
1068
1078
|
}, Fr = {
|
|
1079
|
+
MASTER: "/master"
|
|
1080
|
+
}, jr = {
|
|
1069
1081
|
// Entity endpoints
|
|
1070
1082
|
ENTITIES: "/master/entities",
|
|
1071
|
-
ENTITY_METADATA: (
|
|
1072
|
-
ENTITY_RECORDS: (
|
|
1073
|
-
ENTITY_RECORD_BY_ID: (
|
|
1074
|
-
ENTITY_OPTIONS: (
|
|
1083
|
+
ENTITY_METADATA: (n) => `/master/${n}/metadata`,
|
|
1084
|
+
ENTITY_RECORDS: (n) => `/master/${n}/records`,
|
|
1085
|
+
ENTITY_RECORD_BY_ID: (n, f) => `/master/${n}/records/${f}`,
|
|
1086
|
+
ENTITY_OPTIONS: (n) => `/master/${n}/options`,
|
|
1075
1087
|
// Export endpoints
|
|
1076
|
-
EXPORT_CSV: (
|
|
1077
|
-
EXPORT_EXCEL: (
|
|
1078
|
-
},
|
|
1088
|
+
EXPORT_CSV: (n) => `/master/${n}/export/csv`,
|
|
1089
|
+
EXPORT_EXCEL: (n) => `/master/${n}/export/excel`
|
|
1090
|
+
}, wr = {
|
|
1079
1091
|
GET: "GET",
|
|
1080
1092
|
POST: "POST",
|
|
1081
1093
|
PUT: "PUT",
|
|
1082
1094
|
DELETE: "DELETE",
|
|
1083
1095
|
PATCH: "PATCH"
|
|
1084
|
-
},
|
|
1096
|
+
}, Mr = {
|
|
1085
1097
|
PAGE: "page",
|
|
1086
1098
|
LIMIT: "limit",
|
|
1087
1099
|
SEARCH: "search",
|
|
1088
1100
|
SEARCH_BY: "searchBy",
|
|
1089
1101
|
SORT_BY: "sortBy",
|
|
1090
1102
|
SORT_ORDER: "sortOrder"
|
|
1091
|
-
},
|
|
1103
|
+
}, Ue = {
|
|
1092
1104
|
ASC: "ASC",
|
|
1093
1105
|
DESC: "DESC"
|
|
1094
1106
|
}, Ur = {
|
|
1095
1107
|
JSON: "json",
|
|
1096
1108
|
BLOB: "blob",
|
|
1097
1109
|
TEXT: "text"
|
|
1098
|
-
},
|
|
1110
|
+
}, ht = {
|
|
1099
1111
|
CSV: "text/csv;charset=utf-8;",
|
|
1100
1112
|
EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
1101
1113
|
JSON: "application/json"
|
|
@@ -1104,11 +1116,11 @@ const Er = ({
|
|
|
1104
1116
|
COUNT: "count",
|
|
1105
1117
|
MESSAGE: "message",
|
|
1106
1118
|
ERROR: "error"
|
|
1107
|
-
},
|
|
1119
|
+
}, q = {
|
|
1108
1120
|
CREATE: "create",
|
|
1109
1121
|
EDIT: "edit",
|
|
1110
1122
|
VIEW: "view"
|
|
1111
|
-
},
|
|
1123
|
+
}, Ke = {
|
|
1112
1124
|
TEXT: "text",
|
|
1113
1125
|
DROPDOWN: "dropdown",
|
|
1114
1126
|
DATEPICKER: "datepicker",
|
|
@@ -1116,7 +1128,7 @@ const Er = ({
|
|
|
1116
1128
|
TEXTAREA: "textarea",
|
|
1117
1129
|
CHECKBOX: "checkbox",
|
|
1118
1130
|
RADIO: "radio"
|
|
1119
|
-
},
|
|
1131
|
+
}, De = {
|
|
1120
1132
|
STRING: "string",
|
|
1121
1133
|
NUMBER: "number",
|
|
1122
1134
|
FLOAT: "float",
|
|
@@ -1125,11 +1137,11 @@ const Er = ({
|
|
|
1125
1137
|
BOOLEAN: "boolean",
|
|
1126
1138
|
ARRAY: "array",
|
|
1127
1139
|
OBJECT: "object"
|
|
1128
|
-
},
|
|
1140
|
+
}, kr = {
|
|
1129
1141
|
API: "API",
|
|
1130
1142
|
RAW: "Raw",
|
|
1131
1143
|
STATIC: "Static"
|
|
1132
|
-
},
|
|
1144
|
+
}, Gr = {
|
|
1133
1145
|
ID: "id",
|
|
1134
1146
|
NAME: "name",
|
|
1135
1147
|
LABEL: "label",
|
|
@@ -1145,7 +1157,7 @@ const Er = ({
|
|
|
1145
1157
|
PATTERN: "pattern",
|
|
1146
1158
|
EMAIL: "email",
|
|
1147
1159
|
URL: "url"
|
|
1148
|
-
},
|
|
1160
|
+
}, te = {
|
|
1149
1161
|
FROM: "From",
|
|
1150
1162
|
TO: "To"
|
|
1151
1163
|
}, Yr = {
|
|
@@ -1162,552 +1174,578 @@ const Er = ({
|
|
|
1162
1174
|
}, Br = {
|
|
1163
1175
|
ENTITY_MATCH: /\/master\/([^\/]+)\/options/
|
|
1164
1176
|
}, Hr = ({
|
|
1165
|
-
apiClient:
|
|
1166
|
-
apiEndpoints:
|
|
1167
|
-
onNavigateToNew:
|
|
1177
|
+
apiClient: n,
|
|
1178
|
+
apiEndpoints: f,
|
|
1179
|
+
onNavigateToNew: u,
|
|
1168
1180
|
onNavigateToEdit: E
|
|
1169
1181
|
}) => {
|
|
1170
|
-
const
|
|
1171
|
-
|
|
1182
|
+
const i = be(() => Ot(n, f), [n, f]), [G, J] = $([]), [T, h] = $(null), [V, S] = $([]), [v, D] = $({}), [B, ne] = $([]), [Te, z] = $([]), [Y, x] = $(0), [N, se] = $(10), [w, k] = $(1), [me, X] = $(!1), [de, g] = $(!1), [p, l] = $({}), [d, M] = $([]), [A, re] = $(null), F = ke(!0), K = ke({
|
|
1183
|
+
page: 0,
|
|
1184
|
+
pageSize: 0,
|
|
1185
|
+
sort: ""
|
|
1186
|
+
});
|
|
1187
|
+
Ne(() => {
|
|
1172
1188
|
(async () => {
|
|
1173
1189
|
try {
|
|
1174
|
-
const
|
|
1175
|
-
name:
|
|
1176
|
-
label:
|
|
1190
|
+
const L = ((await i.getEntities()).data || []).map((I) => ({
|
|
1191
|
+
name: I.tableName || I.name,
|
|
1192
|
+
label: I.displayName || I.label
|
|
1177
1193
|
}));
|
|
1178
|
-
|
|
1179
|
-
} catch (
|
|
1180
|
-
console.error(ce.FAILED_LOAD_ENTITIES,
|
|
1194
|
+
J(L), L.length > 0 && h(L[0]);
|
|
1195
|
+
} catch (s) {
|
|
1196
|
+
console.error(ce.FAILED_LOAD_ENTITIES, s);
|
|
1181
1197
|
}
|
|
1182
1198
|
})();
|
|
1183
|
-
}, []),
|
|
1184
|
-
if (!
|
|
1199
|
+
}, []), Ne(() => {
|
|
1200
|
+
if (!T) return;
|
|
1185
1201
|
(async () => {
|
|
1186
1202
|
try {
|
|
1187
|
-
const
|
|
1188
|
-
S(
|
|
1189
|
-
const
|
|
1190
|
-
(
|
|
1191
|
-
|
|
1192
|
-
}),
|
|
1193
|
-
const
|
|
1194
|
-
for (const
|
|
1195
|
-
|
|
1196
|
-
l(
|
|
1197
|
-
} catch (
|
|
1198
|
-
console.error(ce.FAILED_LOAD_METADATA,
|
|
1203
|
+
const m = (await i.getMetadata(T.name)).data || {};
|
|
1204
|
+
S(m.parameterList || []), ne(m.resultsList || []);
|
|
1205
|
+
const L = {};
|
|
1206
|
+
(m.parameterList || []).forEach((y) => {
|
|
1207
|
+
L[y.name] = null;
|
|
1208
|
+
}), D(L);
|
|
1209
|
+
const I = {};
|
|
1210
|
+
for (const y of m.parameterList || [])
|
|
1211
|
+
y.options && Array.isArray(y.options) && (I[y.name] = y.options);
|
|
1212
|
+
l(I), z([]), g(!1);
|
|
1213
|
+
} catch (s) {
|
|
1214
|
+
console.error(ce.FAILED_LOAD_METADATA, s);
|
|
1199
1215
|
}
|
|
1200
1216
|
})();
|
|
1201
|
-
}, [
|
|
1202
|
-
const
|
|
1203
|
-
const
|
|
1204
|
-
V.forEach((
|
|
1205
|
-
if (
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1217
|
+
}, [T]);
|
|
1218
|
+
const Re = Oe((r) => {
|
|
1219
|
+
const s = {}, m = [], L = [];
|
|
1220
|
+
V.forEach((y) => {
|
|
1221
|
+
if (y.dataType === De.DATERANGE) {
|
|
1222
|
+
const Se = v[`${y.name}${te.FROM}`], _e = v[`${y.name}${te.TO}`];
|
|
1223
|
+
Se && (s[`${y.name}${te.FROM}`] = Se), _e && (s[`${y.name}${te.TO}`] = _e);
|
|
1208
1224
|
return;
|
|
1209
1225
|
}
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1226
|
+
const Q = v[y.name];
|
|
1227
|
+
Q == null || Q === "" || (y.options ? s[y.name] = Q : (m.push(y.name), L.push(String(Q).trim())));
|
|
1212
1228
|
});
|
|
1213
|
-
const
|
|
1214
|
-
page:
|
|
1215
|
-
limit:
|
|
1229
|
+
const I = {
|
|
1230
|
+
page: r !== void 0 ? r : w,
|
|
1231
|
+
limit: N
|
|
1216
1232
|
};
|
|
1217
|
-
return Object.keys(
|
|
1218
|
-
|
|
1219
|
-
}),
|
|
1220
|
-
}, [V,
|
|
1221
|
-
if (!(!
|
|
1222
|
-
|
|
1233
|
+
return Object.keys(s).length > 0 && Object.entries(s).forEach(([y, Q]) => {
|
|
1234
|
+
I[`filters[${y}]`] = Q;
|
|
1235
|
+
}), m.length > 0 && (I.search = L.join(","), I.searchBy = m.join(",")), d.length > 0 && (I.sortBy = d.map((y) => y.colId).join(","), I.sortOrder = d.map((y) => y.sort === "desc" ? Ue.DESC : Ue.ASC).join(",")), console.log("Query params:", I), I;
|
|
1236
|
+
}, [V, v, w, N, d]), ge = Oe(async () => {
|
|
1237
|
+
if (!(!T || !F.current)) {
|
|
1238
|
+
F.current = !1, X(!0);
|
|
1239
|
+
try {
|
|
1240
|
+
const r = Re();
|
|
1241
|
+
console.log("Fetching with params:", r);
|
|
1242
|
+
const s = await i.getRecords(T.name, r), m = s.data || [], L = s.total || 0;
|
|
1243
|
+
z(m), x(L);
|
|
1244
|
+
} catch (r) {
|
|
1245
|
+
console.error(ce.FAILED_FETCH_LIST, r), console.error("Full error:", r), z([]), x(0);
|
|
1246
|
+
} finally {
|
|
1247
|
+
X(!1), F.current = !0;
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}, [T, i, Re]);
|
|
1251
|
+
Ne(() => {
|
|
1252
|
+
if (!de) return;
|
|
1253
|
+
const r = JSON.stringify(d);
|
|
1254
|
+
(K.current.page !== w || K.current.pageSize !== N || K.current.sort !== r) && K.current.page !== 0 && (K.current = { page: w, pageSize: N, sort: r }, F.current = !0, ge());
|
|
1255
|
+
}, [w, N, d, de, ge]);
|
|
1256
|
+
const ie = async () => {
|
|
1257
|
+
if (k(1), g(!0), K.current = {
|
|
1258
|
+
page: 1,
|
|
1259
|
+
pageSize: N,
|
|
1260
|
+
sort: JSON.stringify(d)
|
|
1261
|
+
}, !!T) {
|
|
1262
|
+
X(!0), F.current = !1;
|
|
1223
1263
|
try {
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1264
|
+
const r = Re(1);
|
|
1265
|
+
console.log("Fetching with params:", r);
|
|
1266
|
+
const s = await i.getRecords(T.name, r), m = s.data || [], L = s.total || 0;
|
|
1267
|
+
z(m), x(L);
|
|
1268
|
+
} catch (r) {
|
|
1269
|
+
console.error(ce.FAILED_FETCH_LIST, r), console.error("Full error:", r), z([]), x(0);
|
|
1229
1270
|
} finally {
|
|
1230
|
-
|
|
1271
|
+
X(!1), F.current = !0;
|
|
1231
1272
|
}
|
|
1232
1273
|
}
|
|
1233
|
-
},
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
$.current = !0, Te();
|
|
1240
|
-
}, 0);
|
|
1241
|
-
}, se = (o) => {
|
|
1242
|
-
ee(o.currentTarget);
|
|
1243
|
-
}, ye = () => {
|
|
1244
|
-
ee(null);
|
|
1245
|
-
}, Ce = async (o) => {
|
|
1246
|
-
if (p)
|
|
1274
|
+
}, Pe = (r) => {
|
|
1275
|
+
re(r.currentTarget);
|
|
1276
|
+
}, Ie = () => {
|
|
1277
|
+
re(null);
|
|
1278
|
+
}, Fe = async (r) => {
|
|
1279
|
+
if (T)
|
|
1247
1280
|
try {
|
|
1248
|
-
const
|
|
1249
|
-
V.forEach((
|
|
1250
|
-
if (
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1281
|
+
const s = {}, m = [], L = [];
|
|
1282
|
+
V.forEach((b) => {
|
|
1283
|
+
if (b.dataType === De.DATERANGE) {
|
|
1284
|
+
const je = v[`${b.name}${te.FROM}`], we = v[`${b.name}${te.TO}`];
|
|
1285
|
+
je && (s[`${b.name}${te.FROM}`] = je), we && (s[`${b.name}${te.TO}`] = we);
|
|
1253
1286
|
return;
|
|
1254
1287
|
}
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1288
|
+
const Z = v[b.name];
|
|
1289
|
+
Z == null || Z === "" || (b.options ? s[b.name] = Z : (m.push(b.name), L.push(String(Z).trim())));
|
|
1257
1290
|
});
|
|
1258
|
-
const
|
|
1259
|
-
Object.keys(
|
|
1260
|
-
|
|
1261
|
-
}),
|
|
1262
|
-
const
|
|
1263
|
-
let
|
|
1264
|
-
if (
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1291
|
+
const I = {};
|
|
1292
|
+
Object.keys(s).length > 0 && Object.entries(s).forEach(([b, Z]) => {
|
|
1293
|
+
I[`filters[${b}]`] = Z;
|
|
1294
|
+
}), m.length > 0 && (I.search = L.join(","), I.searchBy = m.join(",")), d.length > 0 && (I.sortBy = d.map((b) => b.colId).join(","), I.sortOrder = d.map((b) => b.sort === "desc" ? Ue.DESC : Ue.ASC).join(",")), console.log("Export params:", I);
|
|
1295
|
+
const y = r === "csv" ? await i.exportCSV(T.name, I) : await i.exportExcel(T.name, I), Q = y.headers["content-type"] || (r === "csv" ? ht.CSV : ht.EXCEL), Se = new Blob([y.data], { type: Q }), _e = y.headers["content-disposition"];
|
|
1296
|
+
let oe = `${T.name}_${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`;
|
|
1297
|
+
if (_e) {
|
|
1298
|
+
const b = _e.match(/filename="?(.+)"?/i);
|
|
1299
|
+
b && b[1] && (oe = b[1].replace(/["]/g, ""));
|
|
1267
1300
|
} else {
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1301
|
+
const b = r === "csv" ? gt.CSV : gt.EXCEL;
|
|
1302
|
+
oe.endsWith(`.${b}`) || (oe += `.${b}`);
|
|
1270
1303
|
}
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
} catch (
|
|
1274
|
-
console.error(`Failed to export ${
|
|
1304
|
+
const fe = URL.createObjectURL(Se), le = document.createElement("a");
|
|
1305
|
+
le.href = fe, le.download = oe, le.style.display = "none", document.body.appendChild(le), le.click(), document.body.removeChild(le), setTimeout(() => URL.revokeObjectURL(fe), fr.URL_REVOKE), console.log(`${r.toUpperCase()} export successful:`, oe);
|
|
1306
|
+
} catch (s) {
|
|
1307
|
+
console.error(`Failed to export ${r.toUpperCase()}:`, s), alert(`Failed to export ${r.toUpperCase()}. Please try again.`);
|
|
1275
1308
|
} finally {
|
|
1276
|
-
|
|
1309
|
+
Ie();
|
|
1277
1310
|
}
|
|
1278
|
-
}, Ge =
|
|
1279
|
-
const
|
|
1280
|
-
field:
|
|
1281
|
-
headerName:
|
|
1311
|
+
}, Ge = be(() => {
|
|
1312
|
+
const r = B.map((s) => ({
|
|
1313
|
+
field: s.name,
|
|
1314
|
+
headerName: s.label,
|
|
1282
1315
|
sortable: !0,
|
|
1283
1316
|
filter: !1,
|
|
1284
|
-
|
|
1317
|
+
width: 200,
|
|
1318
|
+
suppressSizeToFit: !0,
|
|
1319
|
+
suppressAutoSize: !0,
|
|
1320
|
+
resizable: !0
|
|
1285
1321
|
}));
|
|
1286
|
-
return
|
|
1322
|
+
return r.push({
|
|
1287
1323
|
field: "actions",
|
|
1288
|
-
headerName:
|
|
1324
|
+
headerName: qe.ACTIONS,
|
|
1289
1325
|
sortable: !1,
|
|
1290
1326
|
filter: !1,
|
|
1291
1327
|
width: 150,
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1328
|
+
suppressSizeToFit: !0,
|
|
1329
|
+
suppressAutoSize: !0,
|
|
1330
|
+
resizable: !1,
|
|
1331
|
+
cellRenderer: (s) => {
|
|
1332
|
+
const m = s.data;
|
|
1333
|
+
return !m || !T ? null : /* @__PURE__ */ a.jsx(P, { sx: { display: "flex", gap: 1, alignItems: "center", height: "100%" }, children: /* @__PURE__ */ a.jsx(
|
|
1334
|
+
ue,
|
|
1296
1335
|
{
|
|
1297
1336
|
size: "small",
|
|
1298
1337
|
variant: "outlined",
|
|
1299
|
-
onClick: () => E?.(
|
|
1300
|
-
children:
|
|
1338
|
+
onClick: () => E?.(T.name, m.id),
|
|
1339
|
+
children: Ee.EDIT
|
|
1301
1340
|
}
|
|
1302
1341
|
) });
|
|
1303
1342
|
}
|
|
1304
|
-
}),
|
|
1305
|
-
}, [B,
|
|
1306
|
-
return /* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
/* @__PURE__ */
|
|
1312
|
-
|
|
1313
|
-
Je,
|
|
1343
|
+
}), r;
|
|
1344
|
+
}, [B, T, E]);
|
|
1345
|
+
return /* @__PURE__ */ a.jsxs(P, { className: "master-view", children: [
|
|
1346
|
+
/* @__PURE__ */ a.jsxs(vt, { className: "filter-section", children: [
|
|
1347
|
+
/* @__PURE__ */ a.jsxs(P, { className: "filters", children: [
|
|
1348
|
+
/* @__PURE__ */ a.jsxs(P, { className: "filter-field", children: [
|
|
1349
|
+
/* @__PURE__ */ a.jsx(Le, { variant: "body2", className: "field-label", children: qe.SELECT_ENTITY }),
|
|
1350
|
+
/* @__PURE__ */ a.jsx(
|
|
1351
|
+
Qe,
|
|
1314
1352
|
{
|
|
1315
|
-
options:
|
|
1316
|
-
getOptionLabel: (
|
|
1317
|
-
value:
|
|
1318
|
-
onChange: (
|
|
1319
|
-
renderInput: (
|
|
1353
|
+
options: G,
|
|
1354
|
+
getOptionLabel: (r) => r.label,
|
|
1355
|
+
value: T,
|
|
1356
|
+
onChange: (r, s) => h(s),
|
|
1357
|
+
renderInput: (r) => /* @__PURE__ */ a.jsx(ae, { ...r, size: "small", placeholder: xe.SELECT_ENTITY }),
|
|
1320
1358
|
className: "field-input"
|
|
1321
1359
|
}
|
|
1322
1360
|
)
|
|
1323
1361
|
] }),
|
|
1324
|
-
V.filter((
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
|
|
1362
|
+
V.filter((r) => r.name.toLowerCase() !== "id").map((r) => /* @__PURE__ */ a.jsxs(P, { className: "filter-field", children: [
|
|
1363
|
+
/* @__PURE__ */ a.jsx(Le, { variant: "body2", className: "field-label", children: r.label }),
|
|
1364
|
+
r.dataType === De.DATERANGE ? /* @__PURE__ */ a.jsxs(P, { sx: { display: "flex", gap: 1, width: "100%" }, children: [
|
|
1365
|
+
/* @__PURE__ */ a.jsx(
|
|
1366
|
+
ae,
|
|
1329
1367
|
{
|
|
1330
1368
|
type: "date",
|
|
1331
1369
|
size: "small",
|
|
1332
|
-
value:
|
|
1333
|
-
onChange: (
|
|
1370
|
+
value: v[`${r.name}${te.FROM}`] || "",
|
|
1371
|
+
onChange: (s) => D((m) => ({ ...m, [`${r.name}${te.FROM}`]: s.target.value })),
|
|
1334
1372
|
sx: { flex: 1 }
|
|
1335
1373
|
}
|
|
1336
1374
|
),
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
|
|
1375
|
+
/* @__PURE__ */ a.jsx(
|
|
1376
|
+
ae,
|
|
1339
1377
|
{
|
|
1340
1378
|
type: "date",
|
|
1341
1379
|
size: "small",
|
|
1342
|
-
label:
|
|
1343
|
-
value:
|
|
1344
|
-
onChange: (
|
|
1380
|
+
label: qe.TO,
|
|
1381
|
+
value: v[`${r.name}${te.TO}`] || "",
|
|
1382
|
+
onChange: (s) => D((m) => ({ ...m, [`${r.name}${te.TO}`]: s.target.value })),
|
|
1345
1383
|
sx: { flex: 1 }
|
|
1346
1384
|
}
|
|
1347
1385
|
)
|
|
1348
|
-
] }) :
|
|
1349
|
-
|
|
1386
|
+
] }) : r.dataType === De.DATE ? /* @__PURE__ */ a.jsx(
|
|
1387
|
+
ae,
|
|
1350
1388
|
{
|
|
1351
1389
|
type: "date",
|
|
1352
1390
|
size: "small",
|
|
1353
|
-
value:
|
|
1354
|
-
onChange: (
|
|
1391
|
+
value: v[r.name] || "",
|
|
1392
|
+
onChange: (s) => D((m) => ({ ...m, [r.name]: s.target.value })),
|
|
1355
1393
|
className: "field-input"
|
|
1356
1394
|
}
|
|
1357
|
-
) :
|
|
1358
|
-
|
|
1395
|
+
) : r.options ? /* @__PURE__ */ a.jsx(
|
|
1396
|
+
Qe,
|
|
1359
1397
|
{
|
|
1360
|
-
options:
|
|
1361
|
-
getOptionLabel: (
|
|
1362
|
-
value:
|
|
1363
|
-
onChange: (
|
|
1364
|
-
renderInput: (
|
|
1398
|
+
options: p[r.name] || r.options,
|
|
1399
|
+
getOptionLabel: (s) => s.label || String(s.value),
|
|
1400
|
+
value: p[r.name]?.find((s) => s.value === v[r.name]) || null,
|
|
1401
|
+
onChange: (s, m) => D((L) => ({ ...L, [r.name]: m?.value || null })),
|
|
1402
|
+
renderInput: (s) => /* @__PURE__ */ a.jsx(ae, { ...s, size: "small", placeholder: xe.SELECT(r.label) }),
|
|
1365
1403
|
className: "field-input"
|
|
1366
1404
|
}
|
|
1367
|
-
) :
|
|
1368
|
-
|
|
1405
|
+
) : r.dataType === De.NUMBER ? /* @__PURE__ */ a.jsx(
|
|
1406
|
+
ae,
|
|
1369
1407
|
{
|
|
1370
1408
|
type: "number",
|
|
1371
1409
|
size: "small",
|
|
1372
|
-
value:
|
|
1373
|
-
onChange: (
|
|
1374
|
-
placeholder:
|
|
1410
|
+
value: v[r.name] || "",
|
|
1411
|
+
onChange: (s) => D((m) => ({ ...m, [r.name]: s.target.value })),
|
|
1412
|
+
placeholder: xe.FILTER_BY(r.label),
|
|
1375
1413
|
className: "field-input"
|
|
1376
1414
|
}
|
|
1377
|
-
) : /* @__PURE__ */
|
|
1378
|
-
|
|
1415
|
+
) : /* @__PURE__ */ a.jsx(
|
|
1416
|
+
ae,
|
|
1379
1417
|
{
|
|
1380
1418
|
size: "small",
|
|
1381
|
-
value:
|
|
1382
|
-
onChange: (
|
|
1383
|
-
placeholder:
|
|
1419
|
+
value: v[r.name] || "",
|
|
1420
|
+
onChange: (s) => D((m) => ({ ...m, [r.name]: s.target.value })),
|
|
1421
|
+
placeholder: xe.FILTER_BY(r.label),
|
|
1384
1422
|
className: "field-input"
|
|
1385
1423
|
}
|
|
1386
1424
|
)
|
|
1387
|
-
] },
|
|
1425
|
+
] }, r.name))
|
|
1388
1426
|
] }),
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
|
|
1427
|
+
/* @__PURE__ */ a.jsxs(P, { className: "action-buttons", children: [
|
|
1428
|
+
/* @__PURE__ */ a.jsx(ue, { variant: "contained", onClick: ie, children: Ee.VIEW }),
|
|
1429
|
+
/* @__PURE__ */ a.jsx(
|
|
1430
|
+
ue,
|
|
1393
1431
|
{
|
|
1394
1432
|
variant: "contained",
|
|
1395
|
-
disabled: !
|
|
1396
|
-
onClick: () =>
|
|
1397
|
-
children:
|
|
1433
|
+
disabled: !T,
|
|
1434
|
+
onClick: () => T && u?.(T.name),
|
|
1435
|
+
children: Ee.ADD_NEW_RECORD
|
|
1398
1436
|
}
|
|
1399
1437
|
)
|
|
1400
1438
|
] })
|
|
1401
1439
|
] }),
|
|
1402
|
-
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */
|
|
1405
|
-
|
|
1440
|
+
de && /* @__PURE__ */ a.jsxs(P, { mt: 4, width: "100%", children: [
|
|
1441
|
+
/* @__PURE__ */ a.jsxs(P, { display: "flex", justifyContent: "flex-end", mb: 2, children: [
|
|
1442
|
+
/* @__PURE__ */ a.jsx(
|
|
1443
|
+
ue,
|
|
1406
1444
|
{
|
|
1407
1445
|
variant: "outlined",
|
|
1408
|
-
onClick:
|
|
1409
|
-
disabled: !
|
|
1410
|
-
children:
|
|
1446
|
+
onClick: Pe,
|
|
1447
|
+
disabled: !T,
|
|
1448
|
+
children: Ee.EXPORT
|
|
1411
1449
|
}
|
|
1412
1450
|
),
|
|
1413
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ a.jsxs(
|
|
1414
1452
|
qt,
|
|
1415
1453
|
{
|
|
1416
|
-
anchorEl:
|
|
1417
|
-
open: !!
|
|
1418
|
-
onClose:
|
|
1454
|
+
anchorEl: A,
|
|
1455
|
+
open: !!A,
|
|
1456
|
+
onClose: Ie,
|
|
1419
1457
|
children: [
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
/* @__PURE__ */
|
|
1458
|
+
/* @__PURE__ */ a.jsx(ze, { onClick: () => Fe("csv"), children: Rt.CSV }),
|
|
1459
|
+
/* @__PURE__ */ a.jsx(ze, { onClick: () => Fe("excel"), children: Rt.EXCEL })
|
|
1422
1460
|
]
|
|
1423
1461
|
}
|
|
1424
1462
|
)
|
|
1425
1463
|
] }),
|
|
1426
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ a.jsx(
|
|
1427
1465
|
Er,
|
|
1428
1466
|
{
|
|
1429
|
-
rows:
|
|
1467
|
+
rows: Te,
|
|
1430
1468
|
columns: Ge,
|
|
1431
1469
|
totalRecords: Y,
|
|
1432
|
-
currentPage:
|
|
1433
|
-
loading:
|
|
1434
|
-
rowModelType:
|
|
1435
|
-
onPageChange:
|
|
1436
|
-
pageSize:
|
|
1470
|
+
currentPage: w,
|
|
1471
|
+
loading: me,
|
|
1472
|
+
rowModelType: It.CLIENT_SIDE,
|
|
1473
|
+
onPageChange: k,
|
|
1474
|
+
pageSize: N,
|
|
1437
1475
|
pageSizeOptions: [..._t],
|
|
1438
|
-
onPageSizeChange: (
|
|
1439
|
-
|
|
1476
|
+
onPageSizeChange: (r) => {
|
|
1477
|
+
se(r), k(1);
|
|
1440
1478
|
},
|
|
1441
|
-
setSort:
|
|
1442
|
-
sortModel:
|
|
1479
|
+
setSort: M,
|
|
1480
|
+
sortModel: d,
|
|
1443
1481
|
height: 500
|
|
1444
1482
|
},
|
|
1445
|
-
|
|
1483
|
+
T?.name
|
|
1446
1484
|
),
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
|
|
1485
|
+
/* @__PURE__ */ a.jsxs(nr, { children: [
|
|
1486
|
+
/* @__PURE__ */ a.jsx(P, { display: "flex", alignItems: "center", gap: 1, children: /* @__PURE__ */ a.jsxs(ir, { variant: "outlined", size: "small", children: [
|
|
1487
|
+
/* @__PURE__ */ a.jsxs(Tt, { children: [
|
|
1488
|
+
Je.SHOWING,
|
|
1451
1489
|
" "
|
|
1452
1490
|
] }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ a.jsx(
|
|
1454
1492
|
or,
|
|
1455
1493
|
{
|
|
1456
|
-
value:
|
|
1494
|
+
value: N,
|
|
1457
1495
|
inputProps: { "aria-label": "Page size" },
|
|
1458
|
-
onChange: (
|
|
1459
|
-
|
|
1496
|
+
onChange: (r) => {
|
|
1497
|
+
se(Number(r.target.value)), k(1);
|
|
1460
1498
|
},
|
|
1461
|
-
children: _t.map((
|
|
1499
|
+
children: _t.map((r) => /* @__PURE__ */ a.jsx(ze, { value: r, children: r }, r))
|
|
1462
1500
|
}
|
|
1463
1501
|
),
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
|
|
1502
|
+
/* @__PURE__ */ a.jsxs(Tt, { children: [
|
|
1503
|
+
Je.OF,
|
|
1466
1504
|
" ",
|
|
1467
1505
|
Y,
|
|
1468
1506
|
" ",
|
|
1469
|
-
|
|
1507
|
+
Je.ENTRIES
|
|
1470
1508
|
] })
|
|
1471
1509
|
] }) }),
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
|
|
1510
|
+
/* @__PURE__ */ a.jsx(
|
|
1511
|
+
pr,
|
|
1474
1512
|
{
|
|
1475
1513
|
totalRecords: Y,
|
|
1476
|
-
currentPage:
|
|
1477
|
-
onPageChange:
|
|
1478
|
-
pageSize:
|
|
1514
|
+
currentPage: w,
|
|
1515
|
+
onPageChange: k,
|
|
1516
|
+
pageSize: N
|
|
1479
1517
|
}
|
|
1480
1518
|
)
|
|
1481
1519
|
] })
|
|
1482
1520
|
] })
|
|
1483
1521
|
] });
|
|
1484
|
-
},
|
|
1485
|
-
apiClient:
|
|
1486
|
-
apiEndpoints:
|
|
1487
|
-
entity:
|
|
1522
|
+
}, zr = ({
|
|
1523
|
+
apiClient: n,
|
|
1524
|
+
apiEndpoints: f,
|
|
1525
|
+
entity: u,
|
|
1488
1526
|
id: E,
|
|
1489
|
-
mode:
|
|
1490
|
-
onBack:
|
|
1491
|
-
onSuccess:
|
|
1527
|
+
mode: i,
|
|
1528
|
+
onBack: G,
|
|
1529
|
+
onSuccess: J
|
|
1492
1530
|
}) => {
|
|
1493
|
-
const
|
|
1494
|
-
const l =
|
|
1495
|
-
return l?.validation?.required && !
|
|
1496
|
-
}), [
|
|
1497
|
-
|
|
1498
|
-
if (!
|
|
1499
|
-
let
|
|
1531
|
+
const T = be(() => Ot(n, f), [n, f]), [h, V] = $({}), [S, v] = $({}), [D, B] = $(!1), [ne, Te] = $({}), [z, Y] = $(!0), [x, N] = $(null), se = be(() => Object.keys(h), [h]), w = be(() => se.sort((g, p) => {
|
|
1532
|
+
const l = h[g], d = h[p];
|
|
1533
|
+
return l?.validation?.required && !d?.validation?.required ? -1 : !l?.validation?.required && d?.validation?.required ? 1 : g.localeCompare(p);
|
|
1534
|
+
}), [se, h]);
|
|
1535
|
+
Ne(() => {
|
|
1536
|
+
if (!u) return;
|
|
1537
|
+
let g = !0;
|
|
1500
1538
|
return (async () => {
|
|
1501
|
-
Y(!0),
|
|
1539
|
+
Y(!0), N(null);
|
|
1502
1540
|
try {
|
|
1503
|
-
const l = await
|
|
1504
|
-
if (!
|
|
1505
|
-
const
|
|
1506
|
-
V(
|
|
1507
|
-
const
|
|
1508
|
-
for (const [
|
|
1509
|
-
if (
|
|
1510
|
-
if (
|
|
1541
|
+
const l = await T.getMetadata(u);
|
|
1542
|
+
if (!g) return;
|
|
1543
|
+
const M = (l.data?.data || l.data || {}).formConfig || {};
|
|
1544
|
+
V(M);
|
|
1545
|
+
const A = {};
|
|
1546
|
+
for (const [re, F] of Object.entries(M))
|
|
1547
|
+
if (F.fieldType === Ke.DROPDOWN)
|
|
1548
|
+
if (F.optionType === "API" && F.option && typeof F.option == "string")
|
|
1511
1549
|
try {
|
|
1512
|
-
const
|
|
1513
|
-
value:
|
|
1514
|
-
label:
|
|
1550
|
+
const ge = ((await T.getDropdownOptions(F.option)).data || []).map((ie) => ({
|
|
1551
|
+
value: ie.id,
|
|
1552
|
+
label: ie.name || ie.displayName || String(ie.id)
|
|
1515
1553
|
}));
|
|
1516
|
-
|
|
1517
|
-
} catch (
|
|
1518
|
-
console.error(`Failed to load options for ${
|
|
1554
|
+
A[F.fieldName] = ge;
|
|
1555
|
+
} catch (K) {
|
|
1556
|
+
console.error(`Failed to load options for ${re}:`, K), A[F.fieldName] = [];
|
|
1519
1557
|
}
|
|
1520
|
-
else
|
|
1521
|
-
|
|
1558
|
+
else F.optionType === "Raw" && Array.isArray(F.option) && (A[F.fieldName] = F.option);
|
|
1559
|
+
g && Te(A);
|
|
1522
1560
|
} catch (l) {
|
|
1523
|
-
console.error(ce.FAILED_LOAD_METADATA, l),
|
|
1561
|
+
console.error(ce.FAILED_LOAD_METADATA, l), g && N(ce.FAILED_LOAD_FORM_CONFIG);
|
|
1524
1562
|
} finally {
|
|
1525
|
-
|
|
1563
|
+
g && Y(!1);
|
|
1526
1564
|
}
|
|
1527
1565
|
})(), () => {
|
|
1528
|
-
|
|
1566
|
+
g = !1;
|
|
1529
1567
|
};
|
|
1530
|
-
}, [
|
|
1531
|
-
if (!
|
|
1532
|
-
|
|
1568
|
+
}, [u, T, n]), Ne(() => {
|
|
1569
|
+
if (!u || !E || i === q.CREATE) {
|
|
1570
|
+
v({});
|
|
1533
1571
|
return;
|
|
1534
1572
|
}
|
|
1535
|
-
let
|
|
1573
|
+
let g = !0;
|
|
1536
1574
|
return (async () => {
|
|
1537
|
-
B(!0),
|
|
1575
|
+
B(!0), N(null);
|
|
1538
1576
|
try {
|
|
1539
|
-
const l = await
|
|
1540
|
-
if (!
|
|
1541
|
-
const
|
|
1542
|
-
for (const [
|
|
1543
|
-
|
|
1544
|
-
|
|
1577
|
+
const l = await T.getRecord(u, E);
|
|
1578
|
+
if (!g) return;
|
|
1579
|
+
const d = l.data?.data || l.data || {}, M = {};
|
|
1580
|
+
for (const [A, re] of Object.entries(d))
|
|
1581
|
+
A.endsWith(Rr) || (M[A] = re);
|
|
1582
|
+
v(M);
|
|
1545
1583
|
} catch (l) {
|
|
1546
|
-
console.error(ce.FAILED_LOAD_RECORD, l),
|
|
1584
|
+
console.error(ce.FAILED_LOAD_RECORD, l), g && N(ce.FAILED_LOAD_RECORD);
|
|
1547
1585
|
} finally {
|
|
1548
|
-
|
|
1586
|
+
g && B(!1);
|
|
1549
1587
|
}
|
|
1550
1588
|
})(), () => {
|
|
1551
|
-
|
|
1589
|
+
g = !1;
|
|
1552
1590
|
};
|
|
1553
|
-
}, [
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
}, []),
|
|
1557
|
-
const
|
|
1558
|
-
for (const [
|
|
1559
|
-
l.validation?.required && !S[l.fieldName] &&
|
|
1560
|
-
return
|
|
1561
|
-
}, [
|
|
1562
|
-
if (!
|
|
1563
|
-
const
|
|
1564
|
-
if (
|
|
1565
|
-
|
|
1591
|
+
}, [u, E, i, T]);
|
|
1592
|
+
const k = Oe((g, p) => {
|
|
1593
|
+
v((l) => ({ ...l, [g]: p }));
|
|
1594
|
+
}, []), me = Oe(() => {
|
|
1595
|
+
const g = [];
|
|
1596
|
+
for (const [p, l] of Object.entries(h))
|
|
1597
|
+
l.validation?.required && !S[l.fieldName] && g.push(ce.FIELD_REQUIRED(p)), l.validation?.min !== void 0 && S[l.fieldName] < l.validation.min && g.push(`${p} must be at least ${l.validation.min}`), l.validation?.max !== void 0 && S[l.fieldName] > l.validation.max && g.push(`${p} must be at most ${l.validation.max}`);
|
|
1598
|
+
return g;
|
|
1599
|
+
}, [h, S]), X = Oe(async () => {
|
|
1600
|
+
if (!u) return;
|
|
1601
|
+
const g = me();
|
|
1602
|
+
if (g.length > 0) {
|
|
1603
|
+
N(g.join(", "));
|
|
1566
1604
|
return;
|
|
1567
1605
|
}
|
|
1568
|
-
B(!0),
|
|
1606
|
+
B(!0), N(null);
|
|
1569
1607
|
try {
|
|
1570
|
-
const
|
|
1571
|
-
for (const l of Object.values(
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1608
|
+
const p = {};
|
|
1609
|
+
for (const l of Object.values(h)) {
|
|
1610
|
+
const d = l.fieldName;
|
|
1611
|
+
d && S[d] !== void 0 && S[d] !== "" && (p[d] = S[d]);
|
|
1574
1612
|
}
|
|
1575
|
-
if (
|
|
1576
|
-
const l = await
|
|
1577
|
-
|
|
1613
|
+
if (i === q.CREATE) {
|
|
1614
|
+
const l = await T.createRecord(u, { data: p });
|
|
1615
|
+
J?.(l);
|
|
1578
1616
|
} else if (E) {
|
|
1579
|
-
const l = await
|
|
1580
|
-
|
|
1617
|
+
const l = await T.updateRecord(u, E, { data: p });
|
|
1618
|
+
J?.(l);
|
|
1581
1619
|
}
|
|
1582
|
-
|
|
1583
|
-
} catch (
|
|
1584
|
-
console.error("Failed to save record:",
|
|
1585
|
-
const l =
|
|
1586
|
-
|
|
1620
|
+
G?.();
|
|
1621
|
+
} catch (p) {
|
|
1622
|
+
console.error("Failed to save record:", p);
|
|
1623
|
+
const l = p?.response?.data?.message || (Array.isArray(p?.response?.data?.message) ? p.response.data.message.join(", ") : "Failed to save record. Please try again.");
|
|
1624
|
+
N(l);
|
|
1587
1625
|
} finally {
|
|
1588
1626
|
B(!1);
|
|
1589
1627
|
}
|
|
1590
|
-
}, [
|
|
1591
|
-
const
|
|
1592
|
-
if (!
|
|
1593
|
-
const
|
|
1594
|
-
return /* @__PURE__ */
|
|
1595
|
-
/* @__PURE__ */
|
|
1596
|
-
|
|
1597
|
-
|
|
1628
|
+
}, [u, h, S, me, i, E, T, G, J]), de = Oe((g) => {
|
|
1629
|
+
const p = h[g], l = p?.fieldName;
|
|
1630
|
+
if (!p || l === "id") return null;
|
|
1631
|
+
const d = S[l] ?? "", M = i === q.VIEW || D;
|
|
1632
|
+
return /* @__PURE__ */ a.jsxs(P, { className: "form-field", children: [
|
|
1633
|
+
/* @__PURE__ */ a.jsxs(Le, { variant: "body2", className: "field-label", children: [
|
|
1634
|
+
g,
|
|
1635
|
+
p.validation?.required && i !== q.VIEW && /* @__PURE__ */ a.jsx("span", { style: { color: mr }, children: Tr })
|
|
1598
1636
|
] }),
|
|
1599
|
-
|
|
1600
|
-
|
|
1637
|
+
p.fieldType === Ke.DROPDOWN ? /* @__PURE__ */ a.jsx(
|
|
1638
|
+
Qe,
|
|
1601
1639
|
{
|
|
1602
|
-
options:
|
|
1603
|
-
getOptionLabel: (
|
|
1604
|
-
value:
|
|
1605
|
-
onChange: (
|
|
1606
|
-
disabled:
|
|
1607
|
-
loading:
|
|
1608
|
-
renderInput: (
|
|
1609
|
-
|
|
1640
|
+
options: ne[l] || [],
|
|
1641
|
+
getOptionLabel: (A) => A.label || String(A.value),
|
|
1642
|
+
value: ne[l]?.find((A) => A.value === d) || null,
|
|
1643
|
+
onChange: (A, re) => k(l, re?.value ?? null),
|
|
1644
|
+
disabled: M,
|
|
1645
|
+
loading: z,
|
|
1646
|
+
renderInput: (A) => /* @__PURE__ */ a.jsx(
|
|
1647
|
+
ae,
|
|
1610
1648
|
{
|
|
1611
|
-
...
|
|
1649
|
+
...A,
|
|
1612
1650
|
size: "small",
|
|
1613
|
-
placeholder:
|
|
1614
|
-
error:
|
|
1651
|
+
placeholder: xe.SELECT(g),
|
|
1652
|
+
error: p.validation?.required && !d && i !== q.VIEW
|
|
1615
1653
|
}
|
|
1616
1654
|
),
|
|
1617
1655
|
className: "field-input"
|
|
1618
1656
|
}
|
|
1619
|
-
) :
|
|
1620
|
-
|
|
1657
|
+
) : p.fieldType === Ke.DATEPICKER ? /* @__PURE__ */ a.jsx(
|
|
1658
|
+
ae,
|
|
1621
1659
|
{
|
|
1622
1660
|
type: "date",
|
|
1623
1661
|
size: "small",
|
|
1624
|
-
value:
|
|
1625
|
-
onChange: (
|
|
1626
|
-
disabled:
|
|
1627
|
-
error:
|
|
1662
|
+
value: d ? String(d).slice(0, 10) : "",
|
|
1663
|
+
onChange: (A) => k(l, A.target.value),
|
|
1664
|
+
disabled: M,
|
|
1665
|
+
error: p.validation?.required && !d && i !== q.VIEW,
|
|
1628
1666
|
className: "field-input",
|
|
1629
1667
|
InputLabelProps: { shrink: !0 }
|
|
1630
1668
|
}
|
|
1631
|
-
) :
|
|
1632
|
-
|
|
1669
|
+
) : p.dataType === "number" || p.dataType === "float" ? /* @__PURE__ */ a.jsx(
|
|
1670
|
+
ae,
|
|
1633
1671
|
{
|
|
1634
1672
|
type: "number",
|
|
1635
1673
|
size: "small",
|
|
1636
|
-
value:
|
|
1637
|
-
onChange: (
|
|
1638
|
-
disabled:
|
|
1639
|
-
placeholder:
|
|
1640
|
-
error:
|
|
1674
|
+
value: d,
|
|
1675
|
+
onChange: (A) => k(l, A.target.value),
|
|
1676
|
+
disabled: M,
|
|
1677
|
+
placeholder: g,
|
|
1678
|
+
error: p.validation?.required && !d && i !== q.VIEW,
|
|
1641
1679
|
inputProps: {
|
|
1642
|
-
max:
|
|
1643
|
-
min:
|
|
1644
|
-
step:
|
|
1680
|
+
max: p.validation?.max,
|
|
1681
|
+
min: p.validation?.min,
|
|
1682
|
+
step: p.dataType === "float" ? 0.01 : 1
|
|
1645
1683
|
},
|
|
1646
1684
|
className: "field-input"
|
|
1647
1685
|
}
|
|
1648
|
-
) : /* @__PURE__ */
|
|
1649
|
-
|
|
1686
|
+
) : /* @__PURE__ */ a.jsx(
|
|
1687
|
+
ae,
|
|
1650
1688
|
{
|
|
1651
1689
|
size: "small",
|
|
1652
|
-
value:
|
|
1653
|
-
onChange: (
|
|
1654
|
-
disabled:
|
|
1655
|
-
placeholder:
|
|
1656
|
-
error:
|
|
1690
|
+
value: d,
|
|
1691
|
+
onChange: (A) => k(l, A.target.value),
|
|
1692
|
+
disabled: M,
|
|
1693
|
+
placeholder: g,
|
|
1694
|
+
error: p.validation?.required && !d && i !== q.VIEW,
|
|
1657
1695
|
inputProps: {
|
|
1658
|
-
maxLength:
|
|
1696
|
+
maxLength: p.validation?.max
|
|
1659
1697
|
},
|
|
1660
1698
|
className: "field-input"
|
|
1661
1699
|
}
|
|
1662
1700
|
)
|
|
1663
|
-
] },
|
|
1664
|
-
}, [
|
|
1665
|
-
return
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
|
|
1668
|
-
|
|
1701
|
+
] }, g);
|
|
1702
|
+
}, [h, S, ne, k, i, D, z]);
|
|
1703
|
+
return z ? /* @__PURE__ */ a.jsx(P, { className: "loading-container", display: "flex", justifyContent: "center", alignItems: "center", minHeight: "400px", children: /* @__PURE__ */ a.jsx($e, {}) }) : /* @__PURE__ */ a.jsx(P, { className: "master-form", children: /* @__PURE__ */ a.jsxs(vt, { className: "form-section", children: [
|
|
1704
|
+
/* @__PURE__ */ a.jsxs(Le, { variant: "h5", gutterBottom: !0, children: [
|
|
1705
|
+
i === q.CREATE ? Xe.ADD_NEW_RECORD : i === q.EDIT ? Xe.EDIT_RECORD : Xe.VIEW_RECORD,
|
|
1706
|
+
u && ` - ${u.charAt(0).toUpperCase() + u.slice(1)}`
|
|
1669
1707
|
] }),
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
/* @__PURE__ */
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
|
|
1708
|
+
x && /* @__PURE__ */ a.jsx(Jt, { severity: "error", onClose: () => N(null), sx: { mb: 2 }, children: x }),
|
|
1709
|
+
D && i !== q.VIEW && /* @__PURE__ */ a.jsx(P, { display: "flex", justifyContent: "center", my: 2, children: /* @__PURE__ */ a.jsx($e, { size: 24 }) }),
|
|
1710
|
+
/* @__PURE__ */ a.jsx(P, { className: "form-fields", children: w.map(de) }),
|
|
1711
|
+
/* @__PURE__ */ a.jsx(P, { className: "action-buttons", mt: 3, children: i !== q.VIEW ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1712
|
+
/* @__PURE__ */ a.jsx(
|
|
1713
|
+
ue,
|
|
1676
1714
|
{
|
|
1677
1715
|
variant: "contained",
|
|
1678
|
-
onClick:
|
|
1679
|
-
disabled:
|
|
1680
|
-
children:
|
|
1716
|
+
onClick: X,
|
|
1717
|
+
disabled: D,
|
|
1718
|
+
children: D ? /* @__PURE__ */ a.jsx($e, { size: 24 }) : i === q.CREATE ? Ee.CREATE : Ee.UPDATE
|
|
1681
1719
|
}
|
|
1682
1720
|
),
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
|
|
1721
|
+
/* @__PURE__ */ a.jsx(
|
|
1722
|
+
ue,
|
|
1685
1723
|
{
|
|
1686
1724
|
variant: "outlined",
|
|
1687
|
-
onClick: () =>
|
|
1688
|
-
disabled:
|
|
1689
|
-
children:
|
|
1725
|
+
onClick: () => G?.(),
|
|
1726
|
+
disabled: D,
|
|
1727
|
+
children: Ee.CANCEL
|
|
1690
1728
|
}
|
|
1691
1729
|
)
|
|
1692
|
-
] }) : /* @__PURE__ */
|
|
1730
|
+
] }) : /* @__PURE__ */ a.jsx(ue, { variant: "outlined", onClick: () => G?.(), children: Ee.BACK }) })
|
|
1693
1731
|
] }) });
|
|
1694
|
-
},
|
|
1732
|
+
}, Xr = {
|
|
1695
1733
|
ROOT: "/",
|
|
1696
1734
|
MASTER: "/master",
|
|
1697
|
-
MASTER_ENTITY_NEW: (
|
|
1698
|
-
MASTER_ENTITY_VIEW: (
|
|
1699
|
-
MASTER_ENTITY_EDIT: (
|
|
1735
|
+
MASTER_ENTITY_NEW: (n) => `/master/${n}/new`,
|
|
1736
|
+
MASTER_ENTITY_VIEW: (n, f) => `/master/${n}/${f}`,
|
|
1737
|
+
MASTER_ENTITY_EDIT: (n, f) => `/master/${n}/${f}/edit`
|
|
1700
1738
|
}, qr = {
|
|
1701
1739
|
ROOT: "/",
|
|
1702
1740
|
MASTER: "/master",
|
|
1703
1741
|
MASTER_ENTITY_NEW: "/master/:entity/new",
|
|
1704
1742
|
MASTER_ENTITY_VIEW: "/master/:entity/:id",
|
|
1705
1743
|
MASTER_ENTITY_EDIT: "/master/:entity/:id/edit"
|
|
1706
|
-
},
|
|
1744
|
+
}, Jr = {
|
|
1707
1745
|
NEW: "new",
|
|
1708
1746
|
EDIT: "edit",
|
|
1709
1747
|
VIEW: "view"
|
|
1710
|
-
},
|
|
1748
|
+
}, Kr = {
|
|
1711
1749
|
ENTITY: "entity",
|
|
1712
1750
|
ID: "id"
|
|
1713
1751
|
}, Qr = {
|
|
@@ -1715,63 +1753,63 @@ const Er = ({
|
|
|
1715
1753
|
EDIT: "/edit"
|
|
1716
1754
|
};
|
|
1717
1755
|
export {
|
|
1718
|
-
|
|
1756
|
+
Fr as API_BASE_PATHS,
|
|
1719
1757
|
Pr as API_CONFIG,
|
|
1720
|
-
|
|
1758
|
+
jr as API_ENDPOINTS,
|
|
1721
1759
|
Lr as ARIA_LABELS,
|
|
1722
|
-
|
|
1760
|
+
Ee as BUTTON_LABELS,
|
|
1723
1761
|
Or as COLUMN_PROPERTIES,
|
|
1724
1762
|
xr as CSS_CLASSES,
|
|
1725
|
-
|
|
1763
|
+
De as DATA_TYPES,
|
|
1726
1764
|
Nr as DATE_FORMATS,
|
|
1727
|
-
|
|
1765
|
+
te as DATE_RANGE_SUFFIXES,
|
|
1728
1766
|
Rr as DISPLAY_FIELD_SUFFIX,
|
|
1729
1767
|
Cr as EMPTY_STATE_MESSAGES,
|
|
1730
1768
|
ce as ERROR_MESSAGES,
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1769
|
+
Rt as EXPORT_OPTIONS,
|
|
1770
|
+
qe as FIELD_LABELS,
|
|
1771
|
+
Gr as FIELD_NAMES,
|
|
1772
|
+
Ke as FIELD_TYPES,
|
|
1773
|
+
gt as FILE_EXTENSIONS,
|
|
1774
|
+
q as FORM_MODES,
|
|
1775
|
+
dr as GRID_CSS_CLASSES,
|
|
1738
1776
|
cr as GRID_EVENT_SOURCES,
|
|
1739
|
-
|
|
1740
|
-
|
|
1777
|
+
mt as GRID_LAYOUT,
|
|
1778
|
+
ur as GRID_MESSAGES,
|
|
1741
1779
|
lr as GRID_SETTINGS,
|
|
1742
|
-
|
|
1780
|
+
Je as GRID_TEXT,
|
|
1743
1781
|
fr as GRID_TIMEOUTS,
|
|
1744
|
-
|
|
1782
|
+
wr as HTTP_METHODS,
|
|
1745
1783
|
Yr as INPUT_TYPES,
|
|
1746
1784
|
Dr as LOADING_MESSAGES,
|
|
1747
|
-
|
|
1748
|
-
|
|
1785
|
+
ht as MIME_TYPES,
|
|
1786
|
+
zr as MasterForm,
|
|
1749
1787
|
Hr as MasterView,
|
|
1750
1788
|
Wr as NUMBER_INPUT,
|
|
1751
|
-
|
|
1789
|
+
kr as OPTION_TYPES,
|
|
1752
1790
|
_t as PAGE_SIZE_OPTIONS,
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1791
|
+
Xe as PAGE_TITLES,
|
|
1792
|
+
vr as PAGINATION_SETTINGS,
|
|
1793
|
+
xe as PLACEHOLDERS,
|
|
1794
|
+
pr as Pagination,
|
|
1795
|
+
Mr as QUERY_PARAMS,
|
|
1758
1796
|
Br as REGEX_PATTERNS,
|
|
1759
|
-
|
|
1797
|
+
Tr as REQUIRED_INDICATOR,
|
|
1760
1798
|
mr as REQUIRED_INDICATOR_COLOR,
|
|
1761
1799
|
$r as RESPONSE_KEYS,
|
|
1762
1800
|
Ur as RESPONSE_TYPES,
|
|
1763
|
-
|
|
1764
|
-
|
|
1801
|
+
Xr as ROUTES,
|
|
1802
|
+
Jr as ROUTE_KEYS,
|
|
1765
1803
|
qr as ROUTE_PATTERNS,
|
|
1766
1804
|
Qr as ROUTE_SUFFIXES,
|
|
1767
|
-
|
|
1768
|
-
|
|
1805
|
+
It as ROW_MODEL_TYPES,
|
|
1806
|
+
Ue as SORT_ORDER,
|
|
1769
1807
|
Ar as SORT_SETTINGS,
|
|
1770
1808
|
br as STYLE_CONSTANTS,
|
|
1771
1809
|
Ir as SUCCESS_MESSAGES,
|
|
1772
1810
|
Er as ServerSideGrid,
|
|
1773
|
-
|
|
1811
|
+
Kr as URL_PARAMS,
|
|
1774
1812
|
yr as VALIDATION_MESSAGES,
|
|
1775
1813
|
Vr as VALIDATION_RULES,
|
|
1776
|
-
|
|
1814
|
+
Ot as createApiService
|
|
1777
1815
|
};
|