master-data-management-react 0.1.5 → 0.1.6

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