master-data-management-react 0.1.4 → 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,8 +1,8 @@
1
- import Rt, { useRef as We, useMemo as Re, useState as j, 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
7
  const d = await a.get(u.entities);
8
8
  return {
@@ -10,129 +10,129 @@ const vt = (a, u) => ({
10
10
  };
11
11
  },
12
12
  getMetadata: async (d) => {
13
- const f = await a.get(u.metadata(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 (d, f) => {
19
- const s = await a.get(u.records(d), { 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 (d, f) => {
26
- const s = await a.get(u.recordById(d, 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 (d, f) => {
32
- const s = await a.post(u.records(d), 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 (d, f, s) => {
38
- const k = await a.put(u.recordById(d, 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 (d, f) => {
44
- const s = await a.delete(u.recordById(d, 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 (d, f) => await a.get(u.exportCSV(d), {
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 (d, f) => await a.get(u.exportExcel(d), {
54
- params: f,
53
+ exportExcel: async (d, E) => await a.get(u.exportExcel(d), {
54
+ params: E,
55
55
  responseType: "blob"
56
56
  }),
57
57
  getDropdownOptions: async (d) => {
58
- const f = u.dropdownOptions ? u.dropdownOptions(d) : d, s = await a.get(f);
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 = Rt, u = /* @__PURE__ */ Symbol.for("react.element"), d = /* @__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 = d, 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 = Rt, u = /* @__PURE__ */ Symbol.for("react.element"), d = /* @__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
93
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
94
94
  n[c - 1] = arguments[c];
95
- P("error", e, n);
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 c = V.ReactDebugCurrentFrame, A = c.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 R(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) {
117
+ function T(e, t, n) {
118
118
  var c = e.displayName;
119
119
  if (c)
120
120
  return c;
121
- var A = t.displayName || t.name || "";
122
- return A !== "" ? n + "(" + A + ")" : n;
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
137
  case d:
138
138
  return "Portal";
@@ -140,7 +140,7 @@ function tr() {
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:
155
+ return l(n._context) + ".Provider";
156
+ case v:
157
+ return T(e, e.render, "ForwardRef");
158
+ case A:
159
159
  var c = e.displayName || null;
160
- return c !== null ? c : T(e.type) || "Memo";
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 w = 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 we() {
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: w({}, e, {
209
- value: J
208
+ log: F({}, e, {
209
+ value: ee
210
210
  }),
211
- info: w({}, e, {
212
- value: U
211
+ info: F({}, e, {
212
+ value: $
213
213
  }),
214
- warn: w({}, e, {
215
- value: Q
214
+ warn: F({}, e, {
215
+ value: oe
216
216
  }),
217
- error: w({}, e, {
218
- value: fe
219
- }),
220
- group: w({}, e, {
217
+ error: F({}, e, {
221
218
  value: Te
222
219
  }),
223
- groupCollapsed: w({}, e, {
224
- value: ae
220
+ group: F({}, e, {
221
+ value: he
222
+ }),
223
+ groupCollapsed: F({}, e, {
224
+ value: se
225
225
  }),
226
- groupEnd: w({}, 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 l = 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 c = A.stack.trim().match(/\n( *(at )?)/);
242
- v = c && c[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
261
  var c;
262
- O = !0;
263
- var A = Error.prepareStackTrace;
262
+ m = !0;
263
+ var I = Error.prepareStackTrace;
264
264
  Error.prepareStackTrace = void 0;
265
265
  var y;
266
- y = l.current, l.current = null, we();
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
- c = 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
- c = 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
- c = B;
294
+ } catch (H) {
295
+ c = H;
296
296
  }
297
297
  e();
298
298
  }
299
- } catch (B) {
300
- if (B && c && typeof B.stack == "string") {
301
- for (var m = B.stack.split(`
302
- `), $ = c.stack.split(`
303
- `), L = m.length - 1, M = $.length - 1; L >= 1 && M >= 0 && m[L] !== $[M]; )
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
304
  M--;
305
- for (; L >= 1 && M >= 0; L--, M--)
306
- if (m[L] !== $[M]) {
307
- if (L !== 1 || M !== 1)
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--, M--, M < 0 || m[L] !== $[M]) {
310
- var z = `
311
- ` + m[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 && M >= 0);
314
+ while (P >= 1 && M >= 0);
315
315
  break;
316
316
  }
317
317
  }
318
318
  } finally {
319
- O = !1, l.current = y, o(), Error.prepareStackTrace = A;
319
+ m = !1, i.current = y, o(), Error.prepareStackTrace = I;
320
320
  }
321
- var me = e ? e.displayName || e.name : "", Ee = me ? x(me) : "";
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 c = e, A = c._payload, y = c._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, c, 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, _)) {
373
- var m = void 0;
370
+ var y = Function.call.bind(q);
371
+ for (var g in e)
372
+ if (y(e, g)) {
373
+ var R = void 0;
374
374
  try {
375
- if (typeof e[_] != "function") {
376
- var $ = Error((c || "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
- m = e[_](t, _, c, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
380
- } catch (L) {
381
- m = 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
- m && !(m 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).", c || "React class", n, _, typeof m), xe(null)), m instanceof Error && !(m.message in He) && (He[m.message] = !0, xe(A), D("Failed %s type: %s", n, m.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 Me(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,70 +455,70 @@ function tr() {
455
455
  });
456
456
  }
457
457
  }
458
- var wt = function(e, t, n, c, A, y, _) {
459
- var m = {
458
+ var jt = function(e, t, n, c, I, y, g) {
459
+ var R = {
460
460
  // This tag allows us to uniquely identify this as a React Element
461
461
  $$typeof: u,
462
462
  // Built-in properties that belong on the element
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
  };
470
- return m._store = {}, Object.defineProperty(m._store, "validated", {
470
+ return R._store = {}, Object.defineProperty(R._store, "validated", {
471
471
  configurable: !1,
472
472
  enumerable: !1,
473
473
  writable: !0,
474
474
  value: !1
475
- }), Object.defineProperty(m, "_self", {
475
+ }), Object.defineProperty(R, "_self", {
476
476
  configurable: !1,
477
477
  enumerable: !1,
478
478
  writable: !1,
479
479
  value: c
480
- }), Object.defineProperty(m, "_source", {
480
+ }), Object.defineProperty(R, "_source", {
481
481
  configurable: !1,
482
482
  enumerable: !1,
483
483
  writable: !1,
484
- value: A
485
- }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
484
+ value: I
485
+ }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
486
486
  };
487
- function Mt(e, t, n, c, A) {
487
+ function Ft(e, t, n, c, I) {
488
488
  {
489
- var y, _ = {}, m = null, $ = null;
490
- n !== void 0 && (qe(n), m = "" + n), bt(t) && (qe(t.key), m = "" + 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 (m || $) {
498
+ if (R || W) {
499
499
  var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
500
- m && Lt(_, M), $ && Pt(_, M);
500
+ R && Lt(g, M), W && Pt(g, M);
501
501
  }
502
- return wt(e, m, $, A, c, Ke.current, _);
502
+ return jt(e, R, W, I, c, et.current, g);
503
503
  }
504
504
  }
505
- var je = 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 (je.current) {
521
- var e = T(je.current.type);
520
+ if (Ve.current) {
521
+ var e = f(Ve.current.type);
522
522
  if (e)
523
523
  return `
524
524
 
@@ -527,13 +527,13 @@ Check the render method of \`` + e + "`.";
527
527
  return "";
528
528
  }
529
529
  }
530
- function jt(e) {
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;
554
+ ot[n] = !0;
555
555
  var c = "";
556
- e && e._owner && e._owner !== je.current && (c = " 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, c), pe(null);
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 (Me(e))
563
+ if (ke(e))
564
564
  for (var n = 0; n < e.length; n++) {
565
565
  var c = e[n];
566
- Ue(c) && rt(c, t);
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 c = T(t);
594
- Ot(n, e.props, "prop", c, 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
606
  var c = t[n];
607
607
  if (c !== "children" && c !== "key") {
608
- pe(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), pe(null);
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, c, A, y) {
615
+ var lt = {};
616
+ function ct(e, t, n, c, I, y) {
617
617
  {
618
- var _ = R(e);
619
- if (!_) {
620
- var m = "";
621
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (m += " 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 $ = jt();
623
- $ ? m += $ : m += et();
624
- var L;
625
- e === null ? L = "null" : Me(e) ? L = "array" : e !== void 0 && e.$$typeof === u ? (L = "<" + (T(e.type) || "Unknown") + " />", m = " 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, m);
618
+ var g = _(e);
619
+ if (!g) {
620
+ var R = "";
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 = 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 M = Mt(e, t, n, A, y);
627
+ var M = Ft(e, t, n, I, y);
628
628
  if (M == null)
629
629
  return M;
630
- if (_) {
631
- var z = t.children;
632
- if (z !== void 0)
630
+ if (g) {
631
+ var K = t.children;
632
+ if (K !== void 0)
633
633
  if (c)
634
- if (Me(z)) {
635
- for (var me = 0; me < z.length; me++)
636
- at(z[me], e);
637
- Object.freeze && Object.freeze(z);
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(M) : Ut(M), M;
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,87 +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
857
  currentPage: d,
858
- loading: f,
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,
918
- multiSortKey: "ctrl",
919
- alwaysMultiSort: !0,
917
+ onSortChanged: ne,
920
918
  defaultColDef: {
921
919
  width: 170,
922
920
  sortable: !0,
923
921
  unSortIcon: !0,
924
- tooltipValueGetter: (F) => F.value ?? dr.NO_DATA
922
+ tooltipValueGetter: (U) => U.value ?? dr.NO_DATA
925
923
  },
926
924
  suppressRowTransform: !0,
927
- getRowHeight: W ?? (() => 54),
925
+ getRowHeight: B ?? (() => 54),
928
926
  maintainColumnOrder: !0,
929
927
  initialState: S && S.length > 0 ? {
930
928
  sort: {
931
- sortModel: S.map((F) => ({
932
- colId: F.colId,
933
- sort: F.sort
929
+ sortModel: S.map((U) => ({
930
+ colId: U.colId,
931
+ sort: U.sort
934
932
  }))
935
933
  }
936
934
  } : void 0
@@ -944,41 +942,41 @@ const Er = ({
944
942
  totalRecords: a,
945
943
  currentPage: u,
946
944
  pageSize: d,
947
- onPageChange: f
945
+ onPageChange: E
948
946
  }) => {
949
947
  const s = Math.ceil(a / d);
950
- return /* @__PURE__ */ r.jsxs(N, { sx: { display: "flex", gap: 2, alignItems: "center" }, children: [
948
+ return /* @__PURE__ */ r.jsxs(L, { sx: { display: "flex", gap: 2, alignItems: "center" }, children: [
951
949
  /* @__PURE__ */ r.jsx(
952
- ne,
950
+ ie,
953
951
  {
954
952
  size: "small",
955
953
  disabled: u === 1,
956
- onClick: () => f(u - 1),
954
+ onClick: () => E(u - 1),
957
955
  children: "Previous"
958
956
  }
959
957
  ),
960
- /* @__PURE__ */ r.jsxs(_e, { variant: "body2", children: [
958
+ /* @__PURE__ */ r.jsxs(Ie, { variant: "body2", children: [
961
959
  "Page ",
962
960
  u,
963
961
  " of ",
964
962
  s || 1
965
963
  ] }),
966
964
  /* @__PURE__ */ r.jsx(
967
- ne,
965
+ ie,
968
966
  {
969
967
  size: "small",
970
968
  disabled: u >= s,
971
- onClick: () => f(u + 1),
969
+ onClick: () => E(u + 1),
972
970
  children: "Next"
973
971
  }
974
972
  )
975
973
  ] });
976
- }, Pe = {
974
+ }, $e = {
977
975
  MASTER_DATA_MANAGEMENT: "Master Data Management",
978
976
  ADD_NEW_RECORD: "Add New Record",
979
977
  EDIT_RECORD: "Edit Record",
980
978
  VIEW_RECORD: "View Record"
981
- }, le = {
979
+ }, de = {
982
980
  VIEW: "View",
983
981
  ADD_NEW_RECORD: "Add New Record",
984
982
  EDIT: "Edit",
@@ -987,22 +985,22 @@ const Er = ({
987
985
  CANCEL: "Cancel",
988
986
  BACK: "Back",
989
987
  EXPORT: "Export"
990
- }, Ye = {
988
+ }, Xe = {
991
989
  SELECT_ENTITY: "Select Entity",
992
990
  ACTIONS: "Actions",
993
991
  FROM: "From",
994
992
  TO: "To"
995
- }, ye = {
993
+ }, Le = {
996
994
  SELECT_ENTITY: "Select Entity",
997
995
  SELECT: (a) => `Select ${a}`,
998
996
  FILTER_BY: (a) => `Filter by ${a}`
999
- }, ft = {
997
+ }, mt = {
1000
998
  CSV: "CSV Format",
1001
999
  EXCEL: "Excel Format"
1002
- }, Et = {
1000
+ }, Rt = {
1003
1001
  CSV: "csv",
1004
1002
  EXCEL: "xlsx"
1005
- }, ie = {
1003
+ }, ce = {
1006
1004
  FAILED_LOAD_ENTITIES: "Failed to load entities",
1007
1005
  FAILED_LOAD_METADATA: "Failed to load metadata",
1008
1006
  FAILED_LOAD_RECORD: "Failed to load record",
@@ -1028,7 +1026,7 @@ const Er = ({
1028
1026
  }, Dr = {
1029
1027
  LOADING: "Loading...",
1030
1028
  PLEASE_WAIT: "Please wait..."
1031
- }, Ve = {
1029
+ }, ze = {
1032
1030
  SHOWING: "Showing",
1033
1031
  OF: "of",
1034
1032
  ENTRIES: "entries"
@@ -1053,7 +1051,7 @@ const Er = ({
1053
1051
  ACTION_BUTTON_GAP: 1,
1054
1052
  FORM_MARGIN_TOP: 3,
1055
1053
  FORM_MARGIN_BOTTOM: 2
1056
- }, Tt = [10, 20, 50, 100], pr = " *", mr = "red", Rr = "_display", Nr = {
1054
+ }, _t = [10, 20, 50, 100], pr = " *", mr = "red", Rr = "_display", Nr = {
1057
1055
  ISO_DATE: "YYYY-MM-DD",
1058
1056
  DISPLAY_DATE: "DD/MM/YYYY",
1059
1057
  FILE_DATE: "YYYY-MM-DD"
@@ -1065,9 +1063,9 @@ const Er = ({
1065
1063
  HEADERS: {
1066
1064
  CONTENT_TYPE: "application/json"
1067
1065
  }
1068
- }, wr = {
1066
+ }, jr = {
1069
1067
  MASTER: "/master"
1070
- }, Mr = {
1068
+ }, Fr = {
1071
1069
  // Entity endpoints
1072
1070
  ENTITIES: "/master/entities",
1073
1071
  ENTITY_METADATA: (a) => `/master/${a}/metadata`,
@@ -1077,40 +1075,40 @@ const Er = ({
1077
1075
  // Export endpoints
1078
1076
  EXPORT_CSV: (a) => `/master/${a}/export/csv`,
1079
1077
  EXPORT_EXCEL: (a) => `/master/${a}/export/excel`
1080
- }, jr = {
1078
+ }, Mr = {
1081
1079
  GET: "GET",
1082
1080
  POST: "POST",
1083
1081
  PUT: "PUT",
1084
1082
  DELETE: "DELETE",
1085
1083
  PATCH: "PATCH"
1086
- }, Fr = {
1084
+ }, wr = {
1087
1085
  PAGE: "page",
1088
1086
  LIMIT: "limit",
1089
1087
  SEARCH: "search",
1090
1088
  SEARCH_BY: "searchBy",
1091
1089
  SORT_BY: "sortBy",
1092
1090
  SORT_ORDER: "sortOrder"
1093
- }, pt = {
1091
+ }, we = {
1094
1092
  ASC: "ASC",
1095
1093
  DESC: "DESC"
1096
1094
  }, Ur = {
1097
1095
  JSON: "json",
1098
1096
  BLOB: "blob",
1099
1097
  TEXT: "text"
1100
- }, mt = {
1098
+ }, gt = {
1101
1099
  CSV: "text/csv;charset=utf-8;",
1102
1100
  EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1103
1101
  JSON: "application/json"
1104
- }, Gr = {
1102
+ }, $r = {
1105
1103
  DATA: "data",
1106
1104
  COUNT: "count",
1107
1105
  MESSAGE: "message",
1108
1106
  ERROR: "error"
1109
- }, H = {
1107
+ }, X = {
1110
1108
  CREATE: "create",
1111
1109
  EDIT: "edit",
1112
1110
  VIEW: "view"
1113
- }, $e = {
1111
+ }, qe = {
1114
1112
  TEXT: "text",
1115
1113
  DROPDOWN: "dropdown",
1116
1114
  DATEPICKER: "datepicker",
@@ -1118,7 +1116,7 @@ const Er = ({
1118
1116
  TEXTAREA: "textarea",
1119
1117
  CHECKBOX: "checkbox",
1120
1118
  RADIO: "radio"
1121
- }, Ne = {
1119
+ }, be = {
1122
1120
  STRING: "string",
1123
1121
  NUMBER: "number",
1124
1122
  FLOAT: "float",
@@ -1127,11 +1125,11 @@ const Er = ({
1127
1125
  BOOLEAN: "boolean",
1128
1126
  ARRAY: "array",
1129
1127
  OBJECT: "object"
1130
- }, kr = {
1128
+ }, Gr = {
1131
1129
  API: "API",
1132
1130
  RAW: "Raw",
1133
1131
  STATIC: "Static"
1134
- }, Yr = {
1132
+ }, kr = {
1135
1133
  ID: "id",
1136
1134
  NAME: "name",
1137
1135
  LABEL: "label",
@@ -1147,10 +1145,10 @@ const Er = ({
1147
1145
  PATTERN: "pattern",
1148
1146
  EMAIL: "email",
1149
1147
  URL: "url"
1150
- }, se = {
1148
+ }, J = {
1151
1149
  FROM: "From",
1152
1150
  TO: "To"
1153
- }, $r = {
1151
+ }, Yr = {
1154
1152
  TEXT: "text",
1155
1153
  NUMBER: "number",
1156
1154
  DATE: "date",
@@ -1167,237 +1165,260 @@ const Er = ({
1167
1165
  apiClient: a,
1168
1166
  apiEndpoints: u,
1169
1167
  onNavigateToNew: d,
1170
- onNavigateToEdit: f
1168
+ onNavigateToEdit: E
1171
1169
  }) => {
1172
- const s = Re(() => vt(a, u), [a, u]), [k, X] = j([]), [p, g] = j(null), [Y, S] = j([]), [I, C] = j({}), [W, te] = j([]), [de, q] = j([]), [V, D] = j(0), [P, re] = j(10), [F, G] = j(1), [ue, K] = j(!1), [oe, R] = j(!1), [E, i] = j({}), [T, w] = j([]), [h, J] = j(null), U = We(!0);
1173
- 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(() => {
1174
1172
  (async () => {
1175
1173
  try {
1176
- const x = ((await s.getEntities()).data || []).map((O) => ({
1177
- name: O.tableName || O.name,
1178
- 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
1179
1177
  }));
1180
- X(x), x.length > 0 && g(x[0]);
1181
- } catch (l) {
1182
- console.error(ie.FAILED_LOAD_ENTITIES, l);
1178
+ z(x), x.length > 0 && v(x[0]);
1179
+ } catch (i) {
1180
+ console.error(ce.FAILED_LOAD_ENTITIES, i);
1183
1181
  }
1184
1182
  })();
1185
- }, []), Ce(() => {
1183
+ }, []), Pe(() => {
1186
1184
  if (!p) return;
1187
1185
  (async () => {
1188
1186
  try {
1189
- const v = (await s.getMetadata(p.name)).data || {};
1190
- S(v.parameterList || []), te(v.resultsList || []);
1187
+ const h = (await s.getMetadata(p.name)).data || {};
1188
+ S(h.parameterList || []), re(h.resultsList || []);
1191
1189
  const x = {};
1192
- (v.parameterList || []).forEach((b) => {
1193
- x[b.name] = null;
1190
+ (h.parameterList || []).forEach((N) => {
1191
+ x[N.name] = null;
1194
1192
  }), C(x);
1195
- const O = {};
1196
- for (const b of v.parameterList || [])
1197
- b.options && Array.isArray(b.options) && (O[b.name] = b.options);
1198
- i(O), q([]), R(!1);
1199
- } catch (l) {
1200
- console.error(ie.FAILED_LOAD_METADATA, l);
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);
1201
1199
  }
1202
1200
  })();
1203
1201
  }, [p]);
1204
- const Q = Re(() => {
1205
- const o = {}, l = [], v = [];
1206
- Y.forEach((O) => {
1207
- if (O.dataType === Ne.DATERANGE) {
1208
- const Z = I[`${O.name}${se.FROM}`], Se = I[`${O.name}${se.TO}`];
1209
- 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);
1210
1208
  return;
1211
1209
  }
1212
- const b = I[O.name];
1213
- b == null || b === "" || (O.options ? o[O.name] = b : (l.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())));
1214
1212
  });
1215
1213
  const x = {
1216
- page: F,
1217
- limit: P
1214
+ page: U,
1215
+ limit: j
1218
1216
  };
1219
- return Object.keys(o).length > 0 && Object.entries(o).forEach(([O, b]) => {
1220
- x[`filters[${O}]`] = b;
1221
- }), l.length > 0 && (x.search = v.join(","), x.searchBy = l.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;
1222
- }, [Y, I, F, P, T]), fe = Ie(async () => {
1223
- if (!(!p || !U.current)) {
1224
- 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);
1225
1223
  try {
1226
- console.log("Fetching with params:", Q);
1227
- const o = await s.getRecords(p.name, Q), l = o.data || [], v = o.total || 0;
1228
- q(l), 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);
1229
1227
  } catch (o) {
1230
- 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);
1231
1229
  } finally {
1232
- K(!1), U.current = !0;
1230
+ Z(!1), $.current = !0;
1233
1231
  }
1234
1232
  }
1235
- }, [p, Q]);
1236
- Ce(() => {
1237
- oe && (F > 1 || T.length > 0) && fe();
1238
- }, [F, P, T, oe, fe]);
1239
- const Te = () => {
1240
- G(1), R(!0), setTimeout(() => {
1241
- 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();
1242
1240
  }, 0);
1243
- }, ae = (o) => {
1244
- J(o.currentTarget);
1245
- }, ge = () => {
1246
- J(null);
1247
- }, ve = async (o) => {
1241
+ }, se = (o) => {
1242
+ ee(o.currentTarget);
1243
+ }, ye = () => {
1244
+ ee(null);
1245
+ }, Ce = async (o) => {
1248
1246
  if (p)
1249
1247
  try {
1250
- const l = o === "csv" ? await s.exportCSV(p.name, Q) : await s.exportExcel(p.name, Q), v = o === "csv" ? mt.CSV : mt.EXCEL, x = o === "csv" ? Et.CSV : Et.EXCEL, O = l.data instanceof Blob ? l.data : new Blob([l.data], { type: v }), b = URL.createObjectURL(O), Z = document.createElement("a");
1251
- 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);
1252
- } catch (l) {
1253
- console.error(`Failed to export ${o.toUpperCase()}:`, l);
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.`);
1254
1275
  } finally {
1255
- ge();
1276
+ ye();
1256
1277
  }
1257
- }, we = Re(() => {
1258
- const o = W.map((l) => ({
1259
- field: l.name,
1260
- headerName: l.label,
1278
+ }, Ge = Oe(() => {
1279
+ const o = B.map((i) => ({
1280
+ field: i.name,
1281
+ headerName: i.label,
1261
1282
  sortable: !0,
1262
1283
  filter: !1,
1263
1284
  flex: 1
1264
1285
  }));
1265
1286
  return o.push({
1266
1287
  field: "actions",
1267
- headerName: Ye.ACTIONS,
1288
+ headerName: Xe.ACTIONS,
1268
1289
  sortable: !1,
1269
1290
  filter: !1,
1270
1291
  width: 150,
1271
- cellRenderer: (l) => {
1272
- const v = l.data;
1273
- return !v || !p ? null : /* @__PURE__ */ r.jsx(N, { sx: { display: "flex", gap: 1, py: 1 }, children: /* @__PURE__ */ r.jsx(
1274
- 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,
1275
1296
  {
1276
1297
  size: "small",
1277
1298
  variant: "outlined",
1278
- onClick: () => f?.(p.name, v.id),
1279
- children: le.EDIT
1299
+ onClick: () => E?.(p.name, h.id),
1300
+ children: de.EDIT
1280
1301
  }
1281
1302
  ) });
1282
1303
  }
1283
1304
  }), o;
1284
- }, [W, p, f]);
1285
- return /* @__PURE__ */ r.jsxs(N, { className: "master-view", children: [
1286
- /* @__PURE__ */ r.jsxs(_t, { className: "filter-section", children: [
1287
- /* @__PURE__ */ r.jsx(_e, { variant: "h5", gutterBottom: !0, children: Pe.MASTER_DATA_MANAGEMENT }),
1288
- /* @__PURE__ */ r.jsxs(N, { className: "filters", children: [
1289
- /* @__PURE__ */ r.jsxs(N, { className: "filter-field", children: [
1290
- /* @__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 }),
1291
1312
  /* @__PURE__ */ r.jsx(
1292
- Be,
1313
+ Je,
1293
1314
  {
1294
1315
  options: k,
1295
1316
  getOptionLabel: (o) => o.label,
1296
1317
  value: p,
1297
- onChange: (o, l) => g(l),
1298
- 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 }),
1299
1320
  className: "field-input"
1300
1321
  }
1301
1322
  )
1302
1323
  ] }),
1303
- Y.filter((o) => o.name.toLowerCase() !== "id").map((o) => /* @__PURE__ */ r.jsxs(N, { className: "filter-field", children: [
1304
- /* @__PURE__ */ r.jsx(_e, { variant: "body2", className: "field-label", children: o.label }),
1305
- 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: [
1306
1327
  /* @__PURE__ */ r.jsx(
1307
- ee,
1328
+ te,
1308
1329
  {
1309
1330
  type: "date",
1310
1331
  size: "small",
1311
- value: I[`${o.name}${se.FROM}`] || "",
1312
- onChange: (l) => C((v) => ({ ...v, [`${o.name}${se.FROM}`]: l.target.value })),
1332
+ value: A[`${o.name}${J.FROM}`] || "",
1333
+ onChange: (i) => C((h) => ({ ...h, [`${o.name}${J.FROM}`]: i.target.value })),
1313
1334
  sx: { flex: 1 }
1314
1335
  }
1315
1336
  ),
1316
1337
  /* @__PURE__ */ r.jsx(
1317
- ee,
1338
+ te,
1318
1339
  {
1319
1340
  type: "date",
1320
1341
  size: "small",
1321
- label: Ye.TO,
1322
- value: I[`${o.name}${se.TO}`] || "",
1323
- onChange: (l) => C((v) => ({ ...v, [`${o.name}${se.TO}`]: l.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 })),
1324
1345
  sx: { flex: 1 }
1325
1346
  }
1326
1347
  )
1327
- ] }) : o.dataType === Ne.DATE ? /* @__PURE__ */ r.jsx(
1328
- ee,
1348
+ ] }) : o.dataType === be.DATE ? /* @__PURE__ */ r.jsx(
1349
+ te,
1329
1350
  {
1330
1351
  type: "date",
1331
1352
  size: "small",
1332
- value: I[o.name] || "",
1333
- onChange: (l) => C((v) => ({ ...v, [o.name]: l.target.value })),
1353
+ value: A[o.name] || "",
1354
+ onChange: (i) => C((h) => ({ ...h, [o.name]: i.target.value })),
1334
1355
  className: "field-input"
1335
1356
  }
1336
1357
  ) : o.options ? /* @__PURE__ */ r.jsx(
1337
- Be,
1358
+ Je,
1338
1359
  {
1339
- options: E[o.name] || o.options,
1340
- getOptionLabel: (l) => l.label || String(l.value),
1341
- value: E[o.name]?.find((l) => l.value === I[o.name]) || null,
1342
- onChange: (l, v) => C((x) => ({ ...x, [o.name]: v?.value || null })),
1343
- renderInput: (l) => /* @__PURE__ */ r.jsx(ee, { ...l, 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) }),
1344
1365
  className: "field-input"
1345
1366
  }
1346
- ) : o.dataType === Ne.NUMBER ? /* @__PURE__ */ r.jsx(
1347
- ee,
1367
+ ) : o.dataType === be.NUMBER ? /* @__PURE__ */ r.jsx(
1368
+ te,
1348
1369
  {
1349
1370
  type: "number",
1350
1371
  size: "small",
1351
- value: I[o.name] || "",
1352
- onChange: (l) => C((v) => ({ ...v, [o.name]: l.target.value })),
1353
- 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),
1354
1375
  className: "field-input"
1355
1376
  }
1356
1377
  ) : /* @__PURE__ */ r.jsx(
1357
- ee,
1378
+ te,
1358
1379
  {
1359
1380
  size: "small",
1360
- value: I[o.name] || "",
1361
- onChange: (l) => C((v) => ({ ...v, [o.name]: l.target.value })),
1362
- 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),
1363
1384
  className: "field-input"
1364
1385
  }
1365
1386
  )
1366
1387
  ] }, o.name))
1367
1388
  ] }),
1368
- /* @__PURE__ */ r.jsxs(N, { className: "action-buttons", children: [
1369
- /* @__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 }),
1370
1391
  /* @__PURE__ */ r.jsx(
1371
- ne,
1392
+ ie,
1372
1393
  {
1373
1394
  variant: "contained",
1374
1395
  disabled: !p,
1375
1396
  onClick: () => p && d?.(p.name),
1376
- children: le.ADD_NEW_RECORD
1397
+ children: de.ADD_NEW_RECORD
1377
1398
  }
1378
1399
  )
1379
1400
  ] })
1380
1401
  ] }),
1381
- oe && /* @__PURE__ */ r.jsxs(N, { mt: 4, width: "100%", children: [
1382
- /* @__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: [
1383
1404
  /* @__PURE__ */ r.jsx(
1384
- ne,
1405
+ ie,
1385
1406
  {
1386
1407
  variant: "outlined",
1387
- onClick: ae,
1408
+ onClick: se,
1388
1409
  disabled: !p,
1389
- children: le.EXPORT
1410
+ children: de.EXPORT
1390
1411
  }
1391
1412
  ),
1392
1413
  /* @__PURE__ */ r.jsxs(
1393
1414
  qt,
1394
1415
  {
1395
- anchorEl: h,
1396
- open: !!h,
1397
- onClose: ge,
1416
+ anchorEl: O,
1417
+ open: !!O,
1418
+ onClose: ye,
1398
1419
  children: [
1399
- /* @__PURE__ */ r.jsx(ke, { onClick: () => ve("csv"), children: ft.CSV }),
1400
- /* @__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 })
1401
1422
  ]
1402
1423
  }
1403
1424
  )
@@ -1405,56 +1426,56 @@ const Er = ({
1405
1426
  /* @__PURE__ */ r.jsx(
1406
1427
  Er,
1407
1428
  {
1408
- rows: de,
1409
- columns: we,
1410
- totalRecords: V,
1411
- currentPage: F,
1412
- loading: ue,
1413
- rowModelType: St.CLIENT_SIDE,
1429
+ rows: fe,
1430
+ columns: Ge,
1431
+ totalRecords: Y,
1432
+ currentPage: U,
1433
+ loading: Ee,
1434
+ rowModelType: Ot.CLIENT_SIDE,
1414
1435
  onPageChange: G,
1415
- pageSize: P,
1416
- pageSizeOptions: [...Tt],
1436
+ pageSize: j,
1437
+ pageSizeOptions: [..._t],
1417
1438
  onPageSizeChange: (o) => {
1418
- re(o), G(1);
1439
+ ne(o), G(1);
1419
1440
  },
1420
- setSort: w,
1421
- sortModel: T,
1441
+ setSort: F,
1442
+ sortModel: f,
1422
1443
  height: 500
1423
1444
  },
1424
1445
  p?.name
1425
1446
  ),
1426
1447
  /* @__PURE__ */ r.jsxs(nr, { children: [
1427
- /* @__PURE__ */ r.jsx(N, { display: "flex", alignItems: "center", gap: 1, children: /* @__PURE__ */ r.jsxs(ir, { variant: "outlined", size: "small", children: [
1428
- /* @__PURE__ */ r.jsxs(dt, { children: [
1429
- 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,
1430
1451
  " "
1431
1452
  ] }),
1432
1453
  /* @__PURE__ */ r.jsx(
1433
1454
  or,
1434
1455
  {
1435
- value: P,
1456
+ value: j,
1436
1457
  inputProps: { "aria-label": "Page size" },
1437
1458
  onChange: (o) => {
1438
- re(Number(o.target.value)), G(1);
1459
+ ne(Number(o.target.value)), G(1);
1439
1460
  },
1440
- 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))
1441
1462
  }
1442
1463
  ),
1443
- /* @__PURE__ */ r.jsxs(dt, { children: [
1444
- Ve.OF,
1464
+ /* @__PURE__ */ r.jsxs(Tt, { children: [
1465
+ ze.OF,
1445
1466
  " ",
1446
- V,
1467
+ Y,
1447
1468
  " ",
1448
- Ve.ENTRIES
1469
+ ze.ENTRIES
1449
1470
  ] })
1450
1471
  ] }) }),
1451
1472
  /* @__PURE__ */ r.jsx(
1452
1473
  Tr,
1453
1474
  {
1454
- totalRecords: V,
1455
- currentPage: F,
1475
+ totalRecords: Y,
1476
+ currentPage: U,
1456
1477
  onPageChange: G,
1457
- pageSize: P
1478
+ pageSize: j
1458
1479
  }
1459
1480
  )
1460
1481
  ] })
@@ -1464,211 +1485,211 @@ const Er = ({
1464
1485
  apiClient: a,
1465
1486
  apiEndpoints: u,
1466
1487
  entity: d,
1467
- id: f,
1488
+ id: E,
1468
1489
  mode: s,
1469
1490
  onBack: k,
1470
- onSuccess: X
1491
+ onSuccess: z
1471
1492
  }) => {
1472
- const p = Re(() => vt(a, u), [a, u]), [g, Y] = j({}), [S, I] = j({}), [C, W] = j(!1), [te, de] = j({}), [q, V] = j(!0), [D, P] = j(null), re = Re(() => Object.keys(g), [g]), F = Re(() => re.sort((R, E) => {
1473
- const i = g[R], T = g[E];
1474
- return i?.validation?.required && !T?.validation?.required ? -1 : !i?.validation?.required && T?.validation?.required ? 1 : R.localeCompare(E);
1475
- }), [re, g]);
1476
- Ce(() => {
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(() => {
1477
1498
  if (!d) return;
1478
- let R = !0;
1499
+ let _ = !0;
1479
1500
  return (async () => {
1480
- V(!0), P(null);
1501
+ Y(!0), j(null);
1481
1502
  try {
1482
- const i = await p.getMetadata(d);
1483
- if (!R) return;
1484
- const w = (i.data?.data || i.data || {}).formConfig || {};
1485
- Y(w);
1486
- const h = {};
1487
- for (const [J, U] of Object.entries(w))
1488
- if (U.fieldType === $e.DROPDOWN)
1489
- 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")
1490
1511
  try {
1491
- const Te = ((await p.getDropdownOptions(U.option)).data || []).map((ae) => ({
1492
- value: ae.id,
1493
- 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)
1494
1515
  }));
1495
- h[U.fieldName] = Te;
1496
- } catch (Q) {
1497
- 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] = [];
1498
1519
  }
1499
- else U.optionType === "Raw" && Array.isArray(U.option) && (h[U.fieldName] = U.option);
1500
- R && de(h);
1501
- } catch (i) {
1502
- console.error(ie.FAILED_LOAD_METADATA, i), R && 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);
1503
1524
  } finally {
1504
- R && V(!1);
1525
+ _ && Y(!1);
1505
1526
  }
1506
1527
  })(), () => {
1507
- R = !1;
1528
+ _ = !1;
1508
1529
  };
1509
- }, [d, p, a]), Ce(() => {
1510
- if (!d || !f || s === H.CREATE) {
1511
- I({});
1530
+ }, [d, p, a]), Pe(() => {
1531
+ if (!d || !E || s === X.CREATE) {
1532
+ A({});
1512
1533
  return;
1513
1534
  }
1514
- let R = !0;
1535
+ let _ = !0;
1515
1536
  return (async () => {
1516
- W(!0), P(null);
1537
+ B(!0), j(null);
1517
1538
  try {
1518
- const i = await p.getRecord(d, f);
1519
- if (!R) return;
1520
- const T = i.data?.data || i.data || {}, w = {};
1521
- for (const [h, J] of Object.entries(T))
1522
- h.endsWith(Rr) || (w[h] = J);
1523
- I(w);
1524
- } catch (i) {
1525
- console.error(ie.FAILED_LOAD_RECORD, i), R && 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);
1526
1547
  } finally {
1527
- R && W(!1);
1548
+ _ && B(!1);
1528
1549
  }
1529
1550
  })(), () => {
1530
- R = !1;
1551
+ _ = !1;
1531
1552
  };
1532
- }, [d, f, s, p]);
1533
- const G = Ie((R, E) => {
1534
- I((i) => ({ ...i, [R]: E }));
1535
- }, []), ue = Ie(() => {
1536
- const R = [];
1537
- for (const [E, i] of Object.entries(g))
1538
- i.validation?.required && !S[i.fieldName] && R.push(ie.FIELD_REQUIRED(E)), i.validation?.min !== void 0 && S[i.fieldName] < i.validation.min && R.push(`${E} must be at least ${i.validation.min}`), i.validation?.max !== void 0 && S[i.fieldName] > i.validation.max && R.push(`${E} must be at most ${i.validation.max}`);
1539
- return R;
1540
- }, [g, S]), K = Ie(async () => {
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 () => {
1541
1562
  if (!d) return;
1542
- const R = ue();
1543
- if (R.length > 0) {
1544
- P(R.join(", "));
1563
+ const _ = Ee();
1564
+ if (_.length > 0) {
1565
+ j(_.join(", "));
1545
1566
  return;
1546
1567
  }
1547
- W(!0), P(null);
1568
+ B(!0), j(null);
1548
1569
  try {
1549
- const E = {};
1550
- for (const i of Object.values(g)) {
1551
- const T = i.fieldName;
1552
- 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]);
1553
1574
  }
1554
- if (s === H.CREATE) {
1555
- const i = await p.createRecord(d, { data: E });
1556
- X?.(i);
1557
- } else if (f) {
1558
- const i = await p.updateRecord(d, f, { data: E });
1559
- 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);
1560
1581
  }
1561
1582
  k?.();
1562
- } catch (E) {
1563
- console.error("Failed to save record:", E);
1564
- const i = E?.response?.data?.message || (Array.isArray(E?.response?.data?.message) ? E.response.data.message.join(", ") : "Failed to save record. Please try again.");
1565
- 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);
1566
1587
  } finally {
1567
- W(!1);
1588
+ B(!1);
1568
1589
  }
1569
- }, [d, g, S, ue, s, f, p, k, X]), oe = Ie((R) => {
1570
- const E = g[R], i = E?.fieldName;
1571
- if (!E || i === "id") return null;
1572
- const T = S[i] ?? "", w = s === H.VIEW || C;
1573
- return /* @__PURE__ */ r.jsxs(N, { className: "form-field", children: [
1574
- /* @__PURE__ */ r.jsxs(_e, { variant: "body2", className: "field-label", children: [
1575
- R,
1576
- E.validation?.required && s !== H.VIEW && /* @__PURE__ */ r.jsx("span", { style: { color: mr }, 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 })
1577
1598
  ] }),
1578
- E.fieldType === $e.DROPDOWN ? /* @__PURE__ */ r.jsx(
1579
- Be,
1599
+ T.fieldType === qe.DROPDOWN ? /* @__PURE__ */ r.jsx(
1600
+ Je,
1580
1601
  {
1581
- options: te[i] || [],
1582
- getOptionLabel: (h) => h.label || String(h.value),
1583
- value: te[i]?.find((h) => h.value === T) || null,
1584
- onChange: (h, J) => G(i, J?.value ?? null),
1585
- disabled: w,
1586
- loading: q,
1587
- renderInput: (h) => /* @__PURE__ */ r.jsx(
1588
- 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,
1589
1610
  {
1590
- ...h,
1611
+ ...O,
1591
1612
  size: "small",
1592
- placeholder: ye.SELECT(R),
1593
- error: E.validation?.required && !T && s !== H.VIEW
1613
+ placeholder: Le.SELECT(_),
1614
+ error: T.validation?.required && !f && s !== X.VIEW
1594
1615
  }
1595
1616
  ),
1596
1617
  className: "field-input"
1597
1618
  }
1598
- ) : E.fieldType === $e.DATEPICKER ? /* @__PURE__ */ r.jsx(
1599
- ee,
1619
+ ) : T.fieldType === qe.DATEPICKER ? /* @__PURE__ */ r.jsx(
1620
+ te,
1600
1621
  {
1601
1622
  type: "date",
1602
1623
  size: "small",
1603
- value: T ? String(T).slice(0, 10) : "",
1604
- onChange: (h) => G(i, h.target.value),
1605
- disabled: w,
1606
- 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,
1607
1628
  className: "field-input",
1608
1629
  InputLabelProps: { shrink: !0 }
1609
1630
  }
1610
- ) : E.dataType === "number" || E.dataType === "float" ? /* @__PURE__ */ r.jsx(
1611
- ee,
1631
+ ) : T.dataType === "number" || T.dataType === "float" ? /* @__PURE__ */ r.jsx(
1632
+ te,
1612
1633
  {
1613
1634
  type: "number",
1614
1635
  size: "small",
1615
- value: T,
1616
- onChange: (h) => G(i, h.target.value),
1617
- disabled: w,
1618
- placeholder: R,
1619
- 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,
1620
1641
  inputProps: {
1621
- max: E.validation?.max,
1622
- min: E.validation?.min,
1623
- 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
1624
1645
  },
1625
1646
  className: "field-input"
1626
1647
  }
1627
1648
  ) : /* @__PURE__ */ r.jsx(
1628
- ee,
1649
+ te,
1629
1650
  {
1630
1651
  size: "small",
1631
- value: T,
1632
- onChange: (h) => G(i, h.target.value),
1633
- disabled: w,
1634
- placeholder: R,
1635
- 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,
1636
1657
  inputProps: {
1637
- maxLength: E.validation?.max
1658
+ maxLength: T.validation?.max
1638
1659
  },
1639
1660
  className: "field-input"
1640
1661
  }
1641
1662
  )
1642
- ] }, R);
1643
- }, [g, S, te, G, s, C, q]);
1644
- 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: [
1645
- /* @__PURE__ */ r.jsxs(_e, { variant: "h5", gutterBottom: !0, children: [
1646
- s === H.CREATE ? Pe.ADD_NEW_RECORD : s === H.EDIT ? Pe.EDIT_RECORD : Pe.VIEW_RECORD,
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,
1647
1668
  d && ` - ${d.charAt(0).toUpperCase() + d.slice(1)}`
1648
1669
  ] }),
1649
- D && /* @__PURE__ */ r.jsx(Kt, { severity: "error", onClose: () => P(null), sx: { mb: 2 }, children: D }),
1650
- C && s !== H.VIEW && /* @__PURE__ */ r.jsx(N, { display: "flex", justifyContent: "center", my: 2, children: /* @__PURE__ */ r.jsx(Le, { size: 24 }) }),
1651
- /* @__PURE__ */ r.jsx(N, { className: "form-fields", children: F.map(oe) }),
1652
- /* @__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: [
1653
1674
  /* @__PURE__ */ r.jsx(
1654
- ne,
1675
+ ie,
1655
1676
  {
1656
1677
  variant: "contained",
1657
- onClick: K,
1678
+ onClick: Z,
1658
1679
  disabled: C,
1659
- 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
1660
1681
  }
1661
1682
  ),
1662
1683
  /* @__PURE__ */ r.jsx(
1663
- ne,
1684
+ ie,
1664
1685
  {
1665
1686
  variant: "outlined",
1666
1687
  onClick: () => k?.(),
1667
1688
  disabled: C,
1668
- children: le.CANCEL
1689
+ children: de.CANCEL
1669
1690
  }
1670
1691
  )
1671
- ] }) : /* @__PURE__ */ r.jsx(ne, { variant: "outlined", onClick: () => k?.(), children: le.BACK }) })
1692
+ ] }) : /* @__PURE__ */ r.jsx(ie, { variant: "outlined", onClick: () => k?.(), children: de.BACK }) })
1672
1693
  ] }) });
1673
1694
  }, zr = {
1674
1695
  ROOT: "/",
@@ -1694,57 +1715,57 @@ const Er = ({
1694
1715
  EDIT: "/edit"
1695
1716
  };
1696
1717
  export {
1697
- wr as API_BASE_PATHS,
1718
+ jr as API_BASE_PATHS,
1698
1719
  Pr as API_CONFIG,
1699
- Mr as API_ENDPOINTS,
1720
+ Fr as API_ENDPOINTS,
1700
1721
  Lr as ARIA_LABELS,
1701
- le as BUTTON_LABELS,
1722
+ de as BUTTON_LABELS,
1702
1723
  Or as COLUMN_PROPERTIES,
1703
1724
  xr as CSS_CLASSES,
1704
- Ne as DATA_TYPES,
1725
+ be as DATA_TYPES,
1705
1726
  Nr as DATE_FORMATS,
1706
- se as DATE_RANGE_SUFFIXES,
1727
+ J as DATE_RANGE_SUFFIXES,
1707
1728
  Rr as DISPLAY_FIELD_SUFFIX,
1708
1729
  Cr as EMPTY_STATE_MESSAGES,
1709
- ie as ERROR_MESSAGES,
1710
- ft as EXPORT_OPTIONS,
1711
- Ye as FIELD_LABELS,
1712
- Yr as FIELD_NAMES,
1713
- $e as FIELD_TYPES,
1714
- Et as FILE_EXTENSIONS,
1715
- 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,
1716
1737
  ur as GRID_CSS_CLASSES,
1717
1738
  cr as GRID_EVENT_SOURCES,
1718
- ut as GRID_LAYOUT,
1739
+ pt as GRID_LAYOUT,
1719
1740
  dr as GRID_MESSAGES,
1720
1741
  lr as GRID_SETTINGS,
1721
- Ve as GRID_TEXT,
1742
+ ze as GRID_TEXT,
1722
1743
  fr as GRID_TIMEOUTS,
1723
- jr as HTTP_METHODS,
1724
- $r as INPUT_TYPES,
1744
+ Mr as HTTP_METHODS,
1745
+ Yr as INPUT_TYPES,
1725
1746
  Dr as LOADING_MESSAGES,
1726
- mt as MIME_TYPES,
1747
+ gt as MIME_TYPES,
1727
1748
  Xr as MasterForm,
1728
1749
  Hr as MasterView,
1729
1750
  Wr as NUMBER_INPUT,
1730
- kr as OPTION_TYPES,
1731
- Tt as PAGE_SIZE_OPTIONS,
1732
- Pe as PAGE_TITLES,
1733
- hr as PAGINATION_SETTINGS,
1734
- 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,
1735
1756
  Tr as Pagination,
1736
- Fr as QUERY_PARAMS,
1757
+ wr as QUERY_PARAMS,
1737
1758
  Br as REGEX_PATTERNS,
1738
1759
  pr as REQUIRED_INDICATOR,
1739
1760
  mr as REQUIRED_INDICATOR_COLOR,
1740
- Gr as RESPONSE_KEYS,
1761
+ $r as RESPONSE_KEYS,
1741
1762
  Ur as RESPONSE_TYPES,
1742
1763
  zr as ROUTES,
1743
1764
  Kr as ROUTE_KEYS,
1744
1765
  qr as ROUTE_PATTERNS,
1745
1766
  Qr as ROUTE_SUFFIXES,
1746
- St as ROW_MODEL_TYPES,
1747
- pt as SORT_ORDER,
1767
+ Ot as ROW_MODEL_TYPES,
1768
+ we as SORT_ORDER,
1748
1769
  Ar as SORT_SETTINGS,
1749
1770
  br as STYLE_CONSTANTS,
1750
1771
  Ir as SUCCESS_MESSAGES,
@@ -1752,5 +1773,5 @@ export {
1752
1773
  Jr as URL_PARAMS,
1753
1774
  yr as VALIDATION_MESSAGES,
1754
1775
  Vr as VALIDATION_RULES,
1755
- vt as createApiService
1776
+ At as createApiService
1756
1777
  };