@argusoft/medplat-core 1.0.17 → 1.0.19

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.
Files changed (64) hide show
  1. package/dist/{AddMenuConfiguration-QWfpcnuP.js → AddMenuConfiguration-DsnY0Rws.js} +544 -544
  2. package/dist/AddMenuConfiguration-DsnY0Rws.js.map +1 -0
  3. package/dist/{AddRoleDrawer-SvntLdRu.js → AddRoleDrawer-Bc655LQU.js} +17 -17
  4. package/dist/{AddRoleDrawer-SvntLdRu.js.map → AddRoleDrawer-Bc655LQU.js.map} +1 -1
  5. package/dist/ChangePasswordModalCore-50EzprTk.js +5495 -0
  6. package/dist/ChangePasswordModalCore-50EzprTk.js.map +1 -0
  7. package/dist/{ConditionConfig-DB0FqwgG.js → ConditionConfig-D2hOAa4n.js} +2 -2
  8. package/dist/{ConditionConfig-DB0FqwgG.js.map → ConditionConfig-D2hOAa4n.js.map} +1 -1
  9. package/dist/{EntityManagement-DQKXnEzz.js → EntityManagement-D4nG7wUX.js} +2 -2
  10. package/dist/{EntityManagement-DQKXnEzz.js.map → EntityManagement-D4nG7wUX.js.map} +1 -1
  11. package/dist/ImmunizationConfigurationBase-C5wnjI_-.js +5706 -0
  12. package/dist/ImmunizationConfigurationBase-C5wnjI_-.js.map +1 -0
  13. package/dist/ImmunizationConfigurationBase.css +1 -1
  14. package/dist/{ManageDynamicFeature-CsIett5x.js → ManageDynamicFeature-i6ARKe36.js} +2 -2
  15. package/dist/{ManageDynamicFeature-CsIett5x.js.map → ManageDynamicFeature-i6ARKe36.js.map} +1 -1
  16. package/dist/{ManageEventConfiguration-0YBDaxOI.js → ManageEventConfiguration-CHugu2vQ.js} +92 -92
  17. package/dist/ManageEventConfiguration-CHugu2vQ.js.map +1 -0
  18. package/dist/{ManageUser-eBS0yC5k.js → ManageUser-C6dlK-Mr.js} +3 -4
  19. package/dist/{ManageUser-eBS0yC5k.js.map → ManageUser-C6dlK-Mr.js.map} +1 -1
  20. package/dist/{MobileMenuManagement-BmrO-7MN.js → MobileMenuManagement-CV6QCeos.js} +15 -15
  21. package/dist/MobileMenuManagement-CV6QCeos.js.map +1 -0
  22. package/dist/{MobileTypeEventConfigModal-Ltm529jG.js → MobileTypeEventConfigModal-2w0WQ3WY.js} +2 -2
  23. package/dist/{MobileTypeEventConfigModal-Ltm529jG.js.map → MobileTypeEventConfigModal-2w0WQ3WY.js.map} +1 -1
  24. package/dist/{NewServerManagement-5YcAtF-g.js → NewServerManagement-Cxe0dV0O.js} +5 -5
  25. package/dist/NewServerManagement-Cxe0dV0O.js.map +1 -0
  26. package/dist/{OtherTypeEventConfigModal-dXt2qDg_.js → OtherTypeEventConfigModal-D1p8M39y.js} +43 -43
  27. package/dist/{OtherTypeEventConfigModal-dXt2qDg_.js.map → OtherTypeEventConfigModal-D1p8M39y.js.map} +1 -1
  28. package/dist/{QueryManagement-DGHV_-d5.js → QueryManagement-CRykYGum.js} +3 -3
  29. package/dist/QueryManagement-CRykYGum.js.map +1 -0
  30. package/dist/SecurityAuditLogList-Dod711KT.js +874 -0
  31. package/dist/SecurityAuditLogList-Dod711KT.js.map +1 -0
  32. package/dist/{TableDetails-DztbjsIA.js → TableDetails-Cf_YfnY2.js} +235 -235
  33. package/dist/TableDetails-Cf_YfnY2.js.map +1 -0
  34. package/dist/{TableList-DYwotUDO.js → TableList-HGbEN4bv.js} +28 -28
  35. package/dist/TableList-HGbEN4bv.js.map +1 -0
  36. package/dist/{TypeConfiguration-DYbBG_hZ.js → TypeConfiguration-D-3xNcyd.js} +2 -2
  37. package/dist/{TypeConfiguration-DYbBG_hZ.js.map → TypeConfiguration-D-3xNcyd.js.map} +1 -1
  38. package/dist/{UserList-BAeAFeXZ.js → UserList-D7GL7jvO.js} +420 -421
  39. package/dist/UserList-D7GL7jvO.js.map +1 -0
  40. package/dist/{WidgetList-D-fIf3N2.js → WidgetList-B3Sm9weK.js} +2 -2
  41. package/dist/{WidgetList-D-fIf3N2.js.map → WidgetList-B3Sm9weK.js.map} +1 -1
  42. package/dist/index-D9YNFPn9.js +1439 -0
  43. package/dist/index-D9YNFPn9.js.map +1 -0
  44. package/dist/index.css +1 -1
  45. package/dist/index.js +189 -174
  46. package/dist/index.js.map +1 -1
  47. package/dist/{index-BFznsakV.js → pdfmake-Cf-381ou.js} +13951 -15385
  48. package/dist/pdfmake-Cf-381ou.js.map +1 -0
  49. package/package.json +1 -1
  50. package/dist/AddMenuConfiguration-QWfpcnuP.js.map +0 -1
  51. package/dist/ChangePasswordModalCore-ClND1mel.js +0 -181
  52. package/dist/ChangePasswordModalCore-ClND1mel.js.map +0 -1
  53. package/dist/ImmunizationConfigurationBase-VqVvVR57.js +0 -5389
  54. package/dist/ImmunizationConfigurationBase-VqVvVR57.js.map +0 -1
  55. package/dist/ManageEventConfiguration-0YBDaxOI.js.map +0 -1
  56. package/dist/MobileMenuManagement-BmrO-7MN.js.map +0 -1
  57. package/dist/NewServerManagement-5YcAtF-g.js.map +0 -1
  58. package/dist/QueryManagement-DGHV_-d5.js.map +0 -1
  59. package/dist/SecurityAuditLogList-DHTcOtbx.js +0 -748
  60. package/dist/SecurityAuditLogList-DHTcOtbx.js.map +0 -1
  61. package/dist/TableDetails-DztbjsIA.js.map +0 -1
  62. package/dist/TableList-DYwotUDO.js.map +0 -1
  63. package/dist/UserList-BAeAFeXZ.js.map +0 -1
  64. package/dist/index-BFznsakV.js.map +0 -1
@@ -4,20 +4,20 @@ import { showToast as V } from "@/common/toaster/toaster";
4
4
  import { useDebounceFn as mr } from "@/hooks/useDebounceFn";
5
5
  import hr from "@/views/custom-components/CustomConfirmationModal";
6
6
  import pr from "@/views/custom-components/CustomTextField";
7
- import C from "@/common/fontAwesomeIcons/FontAwesomeIcons";
7
+ import v from "@/common/fontAwesomeIcons/FontAwesomeIcons";
8
8
  import de from "@monaco-editor/react";
9
- import { Paper as ge, Typography as u, Tooltip as B, Button as O, FormControl as M, RadioGroup as xe, FormControlLabel as W, Radio as U, Autocomplete as ce, TextField as D, IconButton as _, InputAdornment as Ce, Popover as yr, Checkbox as fr, TableContainer as gr, Table as xr, TableHead as Cr, TableRow as ee, TableCell as re, TableBody as Ye, Modal as br, Switch as vr } from "@mui/material";
9
+ import { Paper as ge, Typography as u, Tooltip as B, Button as O, FormControl as M, RadioGroup as xe, FormControlLabel as W, Radio as U, Autocomplete as ce, TextField as D, IconButton as _, InputAdornment as ve, Popover as yr, Checkbox as fr, TableContainer as gr, Table as xr, TableHead as vr, TableRow as ee, TableCell as re, TableBody as Ye, Modal as Cr, Switch as br } from "@mui/material";
10
10
  import y from "@mui/material/Grid2";
11
11
  import { Box as f } from "@mui/system";
12
12
  import S from "prop-types";
13
- import { useState as w, useEffect as be } from "react";
13
+ import { useState as w, useEffect as Ce } from "react";
14
14
  import { useForm as wr, useWatch as Nr, Controller as N } from "react-hook-form";
15
15
  import { useSelector as Sr } from "react-redux";
16
16
  function kr({
17
17
  tableInfo: d,
18
- table: b,
18
+ table: C,
19
19
  isEditMode: m,
20
- updateEditMode: ve,
20
+ updateEditMode: be,
21
21
  tableCompleteInfo: k,
22
22
  reloadComponents: Je,
23
23
  isCreateTableMode: i,
@@ -33,24 +33,24 @@ function kr({
33
33
  "Form Configurator",
34
34
  "Form Media Record",
35
35
  "LMS"
36
- ], ke = (e) => (e == null ? void 0 : e.toUpperCase().replace(/ /g, "_")) || "", Pe = (e) => Se.find((n) => ke(n) === e) || "", Me = (e) => {
37
- var n;
38
- return e != null && e.downloadType ? Pe(e.downloadType) || e.downloadType : (n = e == null ? void 0 : e.data) != null && n.downloadType ? Pe(e.data.downloadType) || e.data.downloadType : "";
39
- }, er = (e) => {
36
+ ], ke = (e) => (e == null ? void 0 : e.toUpperCase().replace(/ /g, "_")) || "", Pe = (e) => Se.find((a) => ke(a) === e) || "", Me = (e) => {
40
37
  var a;
41
- const n = e == null ? void 0 : e.downloadUrl;
42
- if (typeof n == "object" && n !== null)
43
- return n.apiEndpoint || "";
44
- const l = (a = e == null ? void 0 : e.data) == null ? void 0 : a.downloadUrl;
38
+ return e != null && e.downloadType ? Pe(e.downloadType) || e.downloadType : (a = e == null ? void 0 : e.data) != null && a.downloadType ? Pe(e.data.downloadType) || e.data.downloadType : "";
39
+ }, er = (e) => {
40
+ var n;
41
+ const a = e == null ? void 0 : e.downloadUrl;
42
+ if (typeof a == "object" && a !== null)
43
+ return a.apiEndpoint || "";
44
+ const l = (n = e == null ? void 0 : e.data) == null ? void 0 : n.downloadUrl;
45
45
  return typeof l == "object" && l !== null && l.apiEndpoint || "";
46
46
  }, ue = (e) => {
47
- var a;
48
- const n = e == null ? void 0 : e.downloadUrl;
49
- if (typeof n == "object" && n !== null)
50
- return n.requestParameters || [];
51
- const l = (a = e == null ? void 0 : e.data) == null ? void 0 : a.downloadUrl;
47
+ var n;
48
+ const a = e == null ? void 0 : e.downloadUrl;
49
+ if (typeof a == "object" && a !== null)
50
+ return a.requestParameters || [];
51
+ const l = (n = e == null ? void 0 : e.data) == null ? void 0 : n.downloadUrl;
52
52
  return typeof l == "object" && l !== null ? l.requestParameters || [] : [];
53
- }, [Ve, me] = w([]), [De, ne] = w(!1), [$, ae] = w(""), [rr, nr] = w({}), [te, I] = w(""), [v, K] = w([]), [Y, R] = w([]), [g, le] = w(0), [J, he] = w(0), [Ke, oe] = w(null), [X, ie] = w(null), [E, ar] = w({}), [L, A] = w(
53
+ }, [Ve, me] = w([]), [De, ae] = w(!1), [$, ne] = w(""), [rr, ar] = w({}), [te, I] = w(""), [b, K] = w([]), [Y, R] = w([]), [g, le] = w(0), [J, he] = w(0), [Ke, oe] = w(null), [X, ie] = w(null), [E, nr] = w({}), [L, q] = w(
54
54
  i ? [] : ue(d == null ? void 0 : d.mediaConfiguration)
55
55
  ), Te = !!Ke, tr = Te ? "simple-popover" : void 0, ze = ["TEXT", "INTEGER"], se = Sr((e) => e.Authenticate.user.id), T = {
56
56
  selectedColumns: i ? [] : [...d.columnInfo],
@@ -75,25 +75,25 @@ function kr({
75
75
  t.register("requestParameters", {
76
76
  validate: (e) => F !== "true" ? !0 : !e || e.length === 0 ? "At least one request parameter is required." : e.some(
77
77
  (l) => {
78
- var a, o;
79
- return !((a = l.key) != null && a.trim()) || !((o = l.value) != null && o.trim());
78
+ var n, o;
79
+ return !((n = l.key) != null && n.trim()) || !((o = l.value) != null && o.trim());
80
80
  }
81
81
  ) ? "Each parameter must have both a key and a value filled." : !0
82
82
  });
83
83
  const or = async (e) => {
84
84
  var l;
85
- const n = i ? t.getValues("createTableQuery") : await Ae(
85
+ const a = i ? t.getValues("createTableQuery") : await qe(
86
86
  [...d.columnInfo],
87
87
  e.selectedColumns,
88
88
  d.primaryKey,
89
89
  (l = e.primaryKey) == null ? void 0 : l.toString()
90
90
  );
91
- n ? (nr(() => e), ae(() => n), qe(), ne(!0)) : Le(e, !1);
92
- }, Le = async (e, n) => {
91
+ a ? (ar(() => e), ne(() => a), Ae(), ae(!0)) : Le(e, !1);
92
+ }, Le = async (e, a) => {
93
93
  var h;
94
94
  const l = {};
95
- let a, o = e || rr;
96
- if (n || ae(""), Object.keys(o).length > 0) {
95
+ let n, o = e || rr;
96
+ if (a || ne(""), Object.keys(o).length > 0) {
97
97
  o.selectedColumns.forEach((p) => {
98
98
  l[p.name] = p.type;
99
99
  }), o.columns = JSON.stringify(l), o.primaryKey = (h = o.primaryKey) == null ? void 0 : h.toString();
@@ -107,10 +107,10 @@ function kr({
107
107
  };
108
108
  c = JSON.stringify(c);
109
109
  try {
110
- if (a = (await H({
110
+ if (n = (await H({
111
111
  code: "update_mobile_entity",
112
112
  parameters: {
113
- tableName: (i ? t.getValues("tableName") : b) || "",
113
+ tableName: (i ? t.getValues("tableName") : C) || "",
114
114
  syncByDefault: o.syncByDefault === "true",
115
115
  columnInfo: o.columns || "",
116
116
  primaryKey: o.primaryKey || "",
@@ -122,7 +122,7 @@ function kr({
122
122
  modifiedBy: se || "",
123
123
  isUpdate: !0
124
124
  }
125
- })).data, a != null && a.result && n && $) {
125
+ })).data, n != null && n.result && a && $) {
126
126
  const p = (await H({
127
127
  code: "INSERT_MOBILE_MIGRATION",
128
128
  parameters: {
@@ -144,10 +144,10 @@ function kr({
144
144
  }
145
145
  } else
146
146
  try {
147
- if (a = (await H({
147
+ if (n = (await H({
148
148
  code: "update_mobile_entity",
149
149
  parameters: {
150
- tableName: (i ? t.getValues("tableName") : b) || "",
150
+ tableName: (i ? t.getValues("tableName") : C) || "",
151
151
  syncByDefault: !1,
152
152
  columnInfo: "",
153
153
  primaryKey: "",
@@ -159,7 +159,7 @@ function kr({
159
159
  modifiedBy: se || "",
160
160
  isUpdate: !1
161
161
  }
162
- })).data, a != null && a.result && $) {
162
+ })).data, n != null && n.result && $) {
163
163
  const c = (await H({
164
164
  code: "INSERT_MOBILE_MIGRATION",
165
165
  parameters: {
@@ -179,110 +179,110 @@ function kr({
179
179
  type: "error"
180
180
  });
181
181
  }
182
- a != null && a.result && (ve(!1), we(!1), Je((c) => !c), V({
182
+ n != null && n.result && (be(!1), we(!1), Je((c) => !c), V({
183
183
  message: "Table configuration saved successfully!",
184
184
  type: "success"
185
- })), ne(!1);
185
+ })), ae(!1);
186
186
  }, ir = () => {
187
- ne(!1);
188
- }, Ae = async (e, n, l, a) => {
187
+ ae(!1);
188
+ }, qe = async (e, a, l, n) => {
189
189
  let o = "";
190
190
  if (e.length > 0) {
191
191
  const h = Object.fromEntries(
192
192
  e.map((x) => [x.name, x.type])
193
193
  ), c = Object.fromEntries(
194
- n.map((x) => [x.name, x.type])
194
+ a.map((x) => [x.name, x.type])
195
195
  ), p = Object.keys(h), j = Object.keys(c), Z = e.filter(
196
196
  (x) => !j.includes(x.name)
197
- ), P = n.filter(
197
+ ), P = a.filter(
198
198
  (x) => !p.includes(x.name)
199
- ), q = e.filter((x) => {
199
+ ), A = e.filter((x) => {
200
200
  const Ie = c[x.name];
201
201
  return Ie !== void 0 && Ie !== x.type;
202
- }), z = Z.map((x) => `ALTER TABLE ${b} DROP COLUMN ${x.name};`).join(`
202
+ }), z = Z.map((x) => `ALTER TABLE ${C} DROP COLUMN ${x.name};`).join(`
203
203
  `), Ge = P.map(
204
- (x) => `ALTER TABLE ${b} ADD COLUMN ${x.name} ${x.type};`
204
+ (x) => `ALTER TABLE ${C} ADD COLUMN ${x.name} ${x.type};`
205
205
  ).join(`
206
206
  `);
207
207
  let fe = "";
208
- return q.length > 0 && (fe = Ze(
209
- b,
208
+ return A.length > 0 && (fe = Ze(
209
+ C,
210
210
  {
211
211
  columnInfo: e,
212
212
  primaryKey: l
213
213
  },
214
214
  {
215
- columnInfo: n,
216
- primaryKey: a
215
+ columnInfo: a,
216
+ primaryKey: n
217
217
  }
218
218
  )), fe ? fe.trim() : (z && (o += `${z}
219
219
  `), Ge && (o += `${Ge}
220
220
  `), o.trim());
221
221
  } else {
222
- const h = i ? t.getValues("tableName") : b;
222
+ const h = i ? t.getValues("tableName") : C;
223
223
  return o = `CREATE TABLE ${h} (
224
- `, o += n.map((c) => `${c.name} ${c.type}`).join(`,
225
- `), a && (o += `,
226
- CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
224
+ `, o += a.map((c) => `${c.name} ${c.type}`).join(`,
225
+ `), n && (o += `,
226
+ CONSTRAINT ${h}_pkey PRIMARY KEY (${n})`), o += ");", o;
227
227
  }
228
- }, qe = async () => {
229
- var n;
230
- const e = (n = await H({
228
+ }, Ae = async () => {
229
+ var a;
230
+ const e = (a = await H({
231
231
  code: "MFA_MIGRATION_MASTER_GET_LATEST_VERSIONS"
232
232
  }).catch((l) => {
233
233
  V({
234
234
  message: `Failed to fetch migration versions ${l}`,
235
235
  type: "error"
236
236
  });
237
- })) == null ? void 0 : n.data;
238
- ar(e == null ? void 0 : e.result[0]);
237
+ })) == null ? void 0 : a.data;
238
+ nr(e == null ? void 0 : e.result[0]);
239
239
  };
240
- be(() => {
241
- if (I(""), he(0), le(0), i && (me([]), K([]), R([]), A([]), t.reset({
240
+ Ce(() => {
241
+ if (I(""), he(0), le(0), i && (me([]), K([]), R([]), q([]), t.reset({
242
242
  ...T
243
- }), setTimeout(() => t.trigger(), 0)), b && d && !i) {
243
+ }), setTimeout(() => t.trigger(), 0)), C && d && !i) {
244
244
  me(k !== void 0 ? () => k.columnInfo : () => d.columnInfo);
245
- let e = k !== void 0 ? k.columnInfo.map((a) => a.name) : d.columnInfo.map((a) => a.name), n = {};
246
- k !== void 0 ? k.columnInfo.forEach((a) => {
247
- n[a.name] = a.type;
248
- }) : d.columnInfo.forEach((a) => {
249
- n[a.name] = a.type;
245
+ let e = k !== void 0 ? k.columnInfo.map((n) => n.name) : d.columnInfo.map((n) => n.name), a = {};
246
+ k !== void 0 ? k.columnInfo.forEach((n) => {
247
+ a[n.name] = n.type;
248
+ }) : d.columnInfo.forEach((n) => {
249
+ a[n.name] = n.type;
250
250
  });
251
251
  let l = {};
252
- d.columnInfo.forEach((a) => {
253
- l[a.name] = a.type;
254
- }), d.columnInfo.map((a) => {
255
- e.includes(a.name) || (a.onlyMobileDb = !0), l[a.name] !== n[a.name] && (a.isTypeChanged = !0), a.name === d.primaryKey && (a.isPrimaryKey = !0);
252
+ d.columnInfo.forEach((n) => {
253
+ l[n.name] = n.type;
254
+ }), d.columnInfo.map((n) => {
255
+ e.includes(n.name) || (n.onlyMobileDb = !0), l[n.name] !== a[n.name] && (n.isTypeChanged = !0), n.name === d.primaryKey && (n.isPrimaryKey = !0);
256
256
  }), t.reset({
257
257
  ...T
258
- }), setTimeout(() => t.trigger(), 0), A(ue(d == null ? void 0 : d.mediaConfiguration)), K(
259
- () => d.columnInfo.sort((a, o) => a.name === d.primaryKey ? (a.isPrimaryKey = !0, -1) : o.name === d.primaryKey ? (o.isPrimaryKey = !0, 1) : a.name.localeCompare(o.name))
258
+ }), setTimeout(() => t.trigger(), 0), q(ue(d == null ? void 0 : d.mediaConfiguration)), K(
259
+ () => d.columnInfo.sort((n, o) => n.name === d.primaryKey ? (n.isPrimaryKey = !0, -1) : o.name === d.primaryKey ? (o.isPrimaryKey = !0, 1) : n.name.localeCompare(o.name))
260
260
  ), R(k !== void 0 ? () => {
261
- const a = new Set(
261
+ const n = new Set(
262
262
  d.columnInfo.map((h) => h.name)
263
263
  );
264
264
  return k.columnInfo.map((h) => ({
265
265
  ...h,
266
- isSynced: a.has(h.name)
266
+ isSynced: n.has(h.name)
267
267
  })).sort((h, c) => h.name === d.primaryKey ? -1 : c.name === d.primaryKey ? 1 : h.name.localeCompare(c.name));
268
268
  } : []);
269
269
  }
270
- }, [d, k, b, i]), be(() => {
270
+ }, [d, k, C, i]), Ce(() => {
271
271
  const e = te.toLowerCase();
272
272
  if (g === 0) {
273
- const n = t.getValues("selectedColumns"), l = e ? n.filter(
274
- (a) => a.name.toLowerCase().includes(e)
275
- ) : n;
273
+ const a = t.getValues("selectedColumns"), l = e ? a.filter(
274
+ (n) => n.name.toLowerCase().includes(e)
275
+ ) : a;
276
276
  K(l);
277
277
  } else {
278
- const n = new Set(
279
- t.getValues("selectedColumns").map((a) => a.name)
280
- ), l = e ? Ve.filter((a) => a.name.toLowerCase().includes(e)).map((a) => ({
281
- ...a,
282
- isSynced: n.has(a.name)
283
- })) : Ve.map((a) => ({
284
- ...a,
285
- isSynced: n.has(a.name)
278
+ const a = new Set(
279
+ t.getValues("selectedColumns").map((n) => n.name)
280
+ ), l = e ? Ve.filter((n) => n.name.toLowerCase().includes(e)).map((n) => ({
281
+ ...n,
282
+ isSynced: a.has(n.name)
283
+ })) : Ve.map((n) => ({
284
+ ...n,
285
+ isSynced: a.has(n.name)
286
286
  }));
287
287
  R(l);
288
288
  }
@@ -291,33 +291,33 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
291
291
  control: t.control,
292
292
  name: "tableName"
293
293
  });
294
- be(() => {
294
+ Ce(() => {
295
295
  i && t.getValues("selectedColumns").length > 0 && Be && ye(t.getValues("selectedColumns"));
296
296
  }, [Be]);
297
297
  const sr = (e) => {
298
- ae(e);
298
+ ne(e);
299
299
  }, dr = () => {
300
- m && ve(!m), i && we(!i), t.reset({
300
+ m && be(!m), i && we(!i), t.reset({
301
301
  ...T,
302
302
  newColumnName: null,
303
303
  newColumnType: null
304
- }), A(T.requestParameters || []), K(T.selectedColumns || []);
304
+ }), q(T.requestParameters || []), K(T.selectedColumns || []);
305
305
  const e = new Set(
306
- (T.selectedColumns || []).map((n) => n.name)
306
+ (T.selectedColumns || []).map((a) => a.name)
307
307
  );
308
308
  R(
309
- (T.allColumns || []).map((n) => ({
310
- ...n,
311
- isSynced: e.has(n.name)
309
+ (T.allColumns || []).map((a) => ({
310
+ ...a,
311
+ isSynced: e.has(a.name)
312
312
  }))
313
313
  );
314
314
  }, cr = async () => {
315
- var l, a, o;
315
+ var l, n, o;
316
316
  Ne(() => !1);
317
317
  const e = await H({
318
318
  code: "DELETE_MOBILE_ENTITY",
319
319
  parameters: {
320
- tableName: b
320
+ tableName: C
321
321
  }
322
322
  }).catch((h) => {
323
323
  V({
@@ -325,11 +325,11 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
325
325
  type: "error"
326
326
  });
327
327
  });
328
- (o = (a = (l = e == null ? void 0 : e.data) == null ? void 0 : l.result) == null ? void 0 : a[0]) != null && o.table_name && V({ message: `${b} deleted successfully!`, type: "success" });
329
- let n = `DROP TABLE if exists ${b};`;
330
- ae(() => n), qe(), ne(!0);
328
+ (o = (n = (l = e == null ? void 0 : e.data) == null ? void 0 : l.result) == null ? void 0 : n[0]) != null && o.table_name && V({ message: `${C} deleted successfully!`, type: "success" });
329
+ let a = `DROP TABLE if exists ${C};`;
330
+ ne(() => a), Ae(), ae(!0);
331
331
  }, ur = mr(async (e) => {
332
- const n = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e);
332
+ const a = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e);
333
333
  if (e.trim().length === 0) {
334
334
  t.setError("newColumnName", {
335
335
  type: "manual",
@@ -337,26 +337,26 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
337
337
  });
338
338
  return;
339
339
  }
340
- if (!n) {
340
+ if (!a) {
341
341
  t.setError("newColumnName", {
342
342
  type: "manual",
343
343
  message: "Must start with a letter/underscore and contain only letters, numbers, and underscores."
344
344
  });
345
345
  return;
346
346
  }
347
- Y.some((l) => l.name === e) || v.some((l) => l.name === e) ? t.setError("newColumnName", {
347
+ Y.some((l) => l.name === e) || b.some((l) => l.name === e) ? t.setError("newColumnName", {
348
348
  type: "manual",
349
349
  message: "Column name already exists in the table."
350
350
  }) : t.clearErrors("newColumnName");
351
- }, 500), pe = v.some(
351
+ }, 500), pe = b.some(
352
352
  (e) => e.isPrimaryKey === !0
353
353
  ), ye = async (e) => {
354
- var a;
354
+ var n;
355
355
  if (J !== 2 && i && he(2), e.length === 0) {
356
356
  t.setValue("createTableQuery", "", { shouldDirty: !0 });
357
357
  return;
358
358
  }
359
- const n = ((a = e.find((o) => o.isPrimaryKey)) == null ? void 0 : a.name) || "", l = await Ae([], e, "", n);
359
+ const a = ((n = e.find((o) => o.isPrimaryKey)) == null ? void 0 : n.name) || "", l = await qe([], e, "", a);
360
360
  t.setValue("createTableQuery", l, { shouldDirty: !0 });
361
361
  };
362
362
  return /* @__PURE__ */ s(
@@ -375,7 +375,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
375
375
  variant: "outlined",
376
376
  sx: {
377
377
  p: 2.5,
378
- borderRadius: 2.5,
378
+ borderRadius: 1.5,
379
379
  backgroundColor: "background.paper"
380
380
  },
381
381
  children: /* @__PURE__ */ s(
@@ -436,10 +436,10 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
436
436
  {
437
437
  variant: "h6",
438
438
  sx: { fontWeight: 700, color: "text.primary" },
439
- children: b || "No Table Selected"
439
+ children: C || "No Table Selected"
440
440
  }
441
441
  ),
442
- /* @__PURE__ */ r(u, { variant: "caption", color: "text.secondary", children: b ? "View and manage table configuration" : "Select a table from the list" })
442
+ /* @__PURE__ */ r(u, { variant: "caption", color: "text.secondary", children: C ? "View and manage table configuration" : "Select a table from the list" })
443
443
  ] }),
444
444
  /* @__PURE__ */ r(
445
445
  hr,
@@ -473,7 +473,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
473
473
  px: 2.5
474
474
  },
475
475
  disabled: lr || !pe,
476
- startIcon: /* @__PURE__ */ r(C, { iconName: "faCheck" }),
476
+ startIcon: /* @__PURE__ */ r(v, { iconName: "faCheck" }),
477
477
  children: "Submit"
478
478
  }
479
479
  ) })
@@ -515,7 +515,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
515
515
  gap: 0.75,
516
516
  p: 0.75,
517
517
  backgroundColor: "action.hover",
518
- borderRadius: 2.5,
518
+ borderRadius: 1.5,
519
519
  border: "1px solid",
520
520
  borderColor: "divider",
521
521
  mb: 2
@@ -531,7 +531,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
531
531
  }
532
532
  ] : []
533
533
  ].map((e) => {
534
- const n = J === e.value;
534
+ const a = J === e.value;
535
535
  return /* @__PURE__ */ r(
536
536
  O,
537
537
  {
@@ -544,18 +544,18 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
544
544
  borderRadius: 2,
545
545
  textTransform: "none",
546
546
  fontSize: "0.8rem",
547
- fontWeight: n ? 700 : 500,
548
- color: n ? "primary.dark" : "text.secondary",
549
- backgroundColor: n ? "background.paper" : "transparent",
550
- boxShadow: n ? "0px 2px 6px rgba(0,0,0,0.06)" : "none",
547
+ fontWeight: a ? 700 : 500,
548
+ color: a ? "primary.dark" : "text.secondary",
549
+ backgroundColor: a ? "background.paper" : "transparent",
550
+ boxShadow: a ? "0px 2px 6px rgba(0,0,0,0.06)" : "none",
551
551
  border: "1px solid",
552
- borderColor: n ? "divider" : "transparent",
552
+ borderColor: a ? "divider" : "transparent",
553
553
  transition: "all 0.2s ease",
554
554
  "&:hover": {
555
- backgroundColor: n ? "background.paper" : "action.hover"
555
+ backgroundColor: a ? "background.paper" : "action.hover"
556
556
  }
557
557
  },
558
- startIcon: /* @__PURE__ */ r(C, { iconName: e.icon }),
558
+ startIcon: /* @__PURE__ */ r(v, { iconName: e.icon }),
559
559
  children: e.label
560
560
  },
561
561
  e.value
@@ -570,7 +570,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
570
570
  {
571
571
  name: "modifiedOnQuery",
572
572
  control: t.control,
573
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(Q, { children: [
573
+ render: ({ field: e, fieldState: { error: a } }) => /* @__PURE__ */ s(Q, { children: [
574
574
  /* @__PURE__ */ r(
575
575
  de,
576
576
  {
@@ -593,14 +593,14 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
593
593
  editorProps: { $blockScrolling: !0 }
594
594
  }
595
595
  ),
596
- (n == null ? void 0 : n.message) && /* @__PURE__ */ r(
596
+ (a == null ? void 0 : a.message) && /* @__PURE__ */ r(
597
597
  u,
598
598
  {
599
599
  variant: "subtitle1",
600
600
  color: "error",
601
601
  fontSize: "13px",
602
602
  className: "mt-1 ml-[13px]",
603
- children: n.message
603
+ children: a.message
604
604
  }
605
605
  )
606
606
  ] })
@@ -614,7 +614,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
614
614
  {
615
615
  name: "dataFetchQuery",
616
616
  control: t.control,
617
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(Q, { children: [
617
+ render: ({ field: e, fieldState: { error: a } }) => /* @__PURE__ */ s(Q, { children: [
618
618
  /* @__PURE__ */ r(
619
619
  de,
620
620
  {
@@ -637,14 +637,14 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
637
637
  editorProps: { $blockScrolling: !0 }
638
638
  }
639
639
  ),
640
- (n == null ? void 0 : n.message) && /* @__PURE__ */ r(
640
+ (a == null ? void 0 : a.message) && /* @__PURE__ */ r(
641
641
  u,
642
642
  {
643
643
  variant: "subtitle1",
644
644
  color: "error",
645
645
  fontSize: "13px",
646
646
  className: "mt-1 ml-[13px]",
647
- children: n.message
647
+ children: a.message
648
648
  }
649
649
  )
650
650
  ] })
@@ -658,7 +658,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
658
658
  {
659
659
  name: "createTableQuery",
660
660
  control: t.control,
661
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(Q, { children: [
661
+ render: ({ field: e, fieldState: { error: a } }) => /* @__PURE__ */ s(Q, { children: [
662
662
  /* @__PURE__ */ r(
663
663
  de,
664
664
  {
@@ -681,14 +681,14 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
681
681
  editorProps: { $blockScrolling: !0 }
682
682
  }
683
683
  ),
684
- (n == null ? void 0 : n.message) && /* @__PURE__ */ r(
684
+ (a == null ? void 0 : a.message) && /* @__PURE__ */ r(
685
685
  u,
686
686
  {
687
687
  variant: "subtitle1",
688
688
  color: "error",
689
689
  fontSize: "13px",
690
690
  className: "mt-1 ml-[13px]",
691
- children: n.message
691
+ children: a.message
692
692
  }
693
693
  )
694
694
  ] })
@@ -887,7 +887,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
887
887
  {
888
888
  variant: "h6",
889
889
  className: "mt-2",
890
- sx: { fontWeight: 600, color: "#566A79" },
890
+ sx: { fontWeight: 600, color: "var(--color-gray1)" },
891
891
  children: "Media Configuration:"
892
892
  }
893
893
  ),
@@ -914,19 +914,19 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
914
914
  validate: (e) => F !== "true" || !!e || "Download Type is required."
915
915
  },
916
916
  render: ({
917
- field: { onChange: e, value: n },
917
+ field: { onChange: e, value: a },
918
918
  fieldState: { error: l }
919
919
  }) => /* @__PURE__ */ r(
920
920
  ce,
921
921
  {
922
922
  options: Se,
923
- value: n || null,
923
+ value: a || null,
924
924
  disabled: !m && !i,
925
- onChange: (a, o) => e(o),
926
- renderInput: (a) => /* @__PURE__ */ r(
925
+ onChange: (n, o) => e(o),
926
+ renderInput: (n) => /* @__PURE__ */ r(
927
927
  D,
928
928
  {
929
- ...a,
929
+ ...n,
930
930
  size: "small",
931
931
  placeholder: "Select download type",
932
932
  error: !!l,
@@ -945,14 +945,14 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
945
945
  border: "1px solid #ddd",
946
946
  borderRadius: "8px",
947
947
  p: 2,
948
- backgroundColor: "#fafafa"
948
+ backgroundColor: "var(--color-gray4)"
949
949
  },
950
950
  children: [
951
951
  /* @__PURE__ */ r(
952
952
  u,
953
953
  {
954
954
  variant: "subtitle1",
955
- sx: { fontWeight: 600, mb: 1.5, color: "#374151" },
955
+ sx: { fontWeight: 600, mb: 1.5, color: "var(--color-text)" },
956
956
  children: "Download URL"
957
957
  }
958
958
  ),
@@ -976,7 +976,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
976
976
  rules: {
977
977
  validate: (e) => F !== "true" || !!(e != null && e.trim()) || "API Endpoint is required."
978
978
  },
979
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ r(
979
+ render: ({ field: e, fieldState: { error: a } }) => /* @__PURE__ */ r(
980
980
  D,
981
981
  {
982
982
  ...e,
@@ -985,8 +985,8 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
985
985
  variant: "outlined",
986
986
  fullWidth: !0,
987
987
  placeholder: "https://api.example.com/endpoint",
988
- error: !!n,
989
- helperText: n == null ? void 0 : n.message,
988
+ error: !!a,
989
+ helperText: a == null ? void 0 : a.message,
990
990
  slotProps: {
991
991
  input: {
992
992
  readOnly: !m && !i
@@ -1006,7 +1006,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1006
1006
  u,
1007
1007
  {
1008
1008
  variant: "subtitle2",
1009
- sx: { fontWeight: 600, color: "#374151", flex: 1 },
1009
+ sx: { fontWeight: 600, color: "var(--color-text)", flex: 1 },
1010
1010
  children: [
1011
1011
  "Request Parameters",
1012
1012
  /* @__PURE__ */ r("span", { style: { color: "red" }, children: "*" }),
@@ -1023,7 +1023,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1023
1023
  ...L,
1024
1024
  { key: "", value: "" }
1025
1025
  ];
1026
- A(e), t.setValue(
1026
+ q(e), t.setValue(
1027
1027
  "requestParameters",
1028
1028
  e,
1029
1029
  {
@@ -1033,7 +1033,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1033
1033
  );
1034
1034
  },
1035
1035
  sx: {
1036
- backgroundColor: "#566A79",
1036
+ backgroundColor: "var(--color-tableHeader)",
1037
1037
  color: "white",
1038
1038
  "&:hover": { backgroundColor: "#3d4f5c" },
1039
1039
  borderRadius: "6px",
@@ -1041,7 +1041,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1041
1041
  height: "28px"
1042
1042
  },
1043
1043
  children: /* @__PURE__ */ r(
1044
- C,
1044
+ v,
1045
1045
  {
1046
1046
  iconName: "faPlus",
1047
1047
  className: "text-[0.75rem]"
@@ -1056,11 +1056,11 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1056
1056
  u,
1057
1057
  {
1058
1058
  variant: "caption",
1059
- sx: { color: "#9ca3af", fontStyle: "italic" },
1059
+ sx: { color: "var(--color-gray1)", fontStyle: "italic" },
1060
1060
  children: "No request parameters added."
1061
1061
  }
1062
1062
  ),
1063
- L.map((e, n) => /* @__PURE__ */ s(
1063
+ L.map((e, a) => /* @__PURE__ */ s(
1064
1064
  f,
1065
1065
  {
1066
1066
  sx: {
@@ -1070,8 +1070,8 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1070
1070
  mb: 1,
1071
1071
  p: 1,
1072
1072
  borderRadius: "6px",
1073
- backgroundColor: "#f0f4f8",
1074
- border: "1px solid #e2e8f0"
1073
+ backgroundColor: "var(--color-gray4)",
1074
+ border: "1px solid var(--color-gray3)"
1075
1075
  },
1076
1076
  children: [
1077
1077
  /* @__PURE__ */ r(
@@ -1083,12 +1083,12 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1083
1083
  placeholder: "parameterKey",
1084
1084
  disabled: !m && !i,
1085
1085
  onChange: (l) => {
1086
- const a = L.map(
1087
- (o, h) => h === n ? { ...o, key: l.target.value } : o
1086
+ const n = L.map(
1087
+ (o, h) => h === a ? { ...o, key: l.target.value } : o
1088
1088
  );
1089
- A(a), t.setValue(
1089
+ q(n), t.setValue(
1090
1090
  "requestParameters",
1091
- a,
1091
+ n,
1092
1092
  {
1093
1093
  shouldDirty: !0,
1094
1094
  shouldValidate: !0
@@ -1102,17 +1102,17 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1102
1102
  ce,
1103
1103
  {
1104
1104
  size: "small",
1105
- options: v.map(
1105
+ options: b.map(
1106
1106
  (l) => l.name
1107
1107
  ),
1108
1108
  value: e.value || null,
1109
1109
  disabled: !m && !i,
1110
- noOptionsText: v.length === 0 ? "No synced columns yet" : "No match",
1111
- onChange: (l, a) => {
1110
+ noOptionsText: b.length === 0 ? "No synced columns yet" : "No match",
1111
+ onChange: (l, n) => {
1112
1112
  const o = L.map(
1113
- (h, c) => c === n ? { ...h, value: a || "" } : h
1113
+ (h, c) => c === a ? { ...h, value: n || "" } : h
1114
1114
  );
1115
- A(o), t.setValue(
1115
+ q(o), t.setValue(
1116
1116
  "requestParameters",
1117
1117
  o,
1118
1118
  {
@@ -1138,9 +1138,9 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1138
1138
  size: "small",
1139
1139
  onClick: () => {
1140
1140
  const l = L.filter(
1141
- (a, o) => o !== n
1141
+ (n, o) => o !== a
1142
1142
  );
1143
- A(l), t.setValue(
1143
+ q(l), t.setValue(
1144
1144
  "requestParameters",
1145
1145
  l,
1146
1146
  {
@@ -1151,7 +1151,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1151
1151
  },
1152
1152
  sx: { color: "#ef4444", alignSelf: "center" },
1153
1153
  children: /* @__PURE__ */ r(
1154
- C,
1154
+ v,
1155
1155
  {
1156
1156
  iconName: "faTrashCan",
1157
1157
  className: "text-[0.85rem]"
@@ -1161,7 +1161,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1161
1161
  ) })
1162
1162
  ]
1163
1163
  },
1164
- n
1164
+ a
1165
1165
  )),
1166
1166
  t.formState.errors.requestParameters && /* @__PURE__ */ r(
1167
1167
  u,
@@ -1196,20 +1196,20 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1196
1196
  rules: {
1197
1197
  validate: (e) => F !== "true" || !!(e != null && e.trim()) && e.trim().length > 0 || "Directory Path is required."
1198
1198
  },
1199
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ r(
1199
+ render: ({ field: e, fieldState: { error: a } }) => /* @__PURE__ */ r(
1200
1200
  D,
1201
1201
  {
1202
1202
  ...e,
1203
1203
  size: "small",
1204
1204
  variant: "outlined",
1205
1205
  fullWidth: !0,
1206
- error: !!n,
1207
- helperText: n == null ? void 0 : n.message,
1206
+ error: !!a,
1207
+ helperText: a == null ? void 0 : a.message,
1208
1208
  slotProps: {
1209
1209
  input: {
1210
1210
  readOnly: !m && !i,
1211
- startAdornment: /* @__PURE__ */ r(Ce, { position: "start", children: "#directoryPath#/" }),
1212
- endAdornment: /* @__PURE__ */ r(Ce, { position: "end", children: "/" })
1211
+ startAdornment: /* @__PURE__ */ r(ve, { position: "start", children: "#directoryPath#/" }),
1212
+ endAdornment: /* @__PURE__ */ r(ve, { position: "end", children: "/" })
1213
1213
  }
1214
1214
  }
1215
1215
  }
@@ -1224,7 +1224,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1224
1224
  ge,
1225
1225
  {
1226
1226
  variant: "outlined",
1227
- sx: { px: 2, borderRadius: 2.5, height: "100%", mb: 1 },
1227
+ sx: { px: 2, borderRadius: 1.5, height: "100%", mb: 1 },
1228
1228
  children: [
1229
1229
  /* @__PURE__ */ s(
1230
1230
  f,
@@ -1307,23 +1307,23 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1307
1307
  ]
1308
1308
  }
1309
1309
  ),
1310
- g === 0 && v.length > 0 && G && /* @__PURE__ */ r(f, { sx: { minWidth: 200, marginLeft: 2 }, children: /* @__PURE__ */ r(
1310
+ g === 0 && b.length > 0 && G && /* @__PURE__ */ r(f, { sx: { minWidth: 200, marginLeft: 2 }, children: /* @__PURE__ */ r(
1311
1311
  ce,
1312
1312
  {
1313
1313
  size: "small",
1314
- options: v.map((e) => e.name),
1314
+ options: b.map((e) => e.name),
1315
1315
  value: t.getValues("primaryKey") || "",
1316
1316
  readOnly: !m && !i,
1317
- onChange: (e, n) => {
1318
- const l = v.map(
1319
- (a) => ({
1320
- ...a,
1321
- isPrimaryKey: a.name === n
1317
+ onChange: (e, a) => {
1318
+ const l = b.map(
1319
+ (n) => ({
1320
+ ...n,
1321
+ isPrimaryKey: n.name === a
1322
1322
  })
1323
1323
  );
1324
1324
  K(l), t.setValue("selectedColumns", l, {
1325
1325
  shouldDirty: !0
1326
- }), t.setValue("primaryKey", n);
1326
+ }), t.setValue("primaryKey", a);
1327
1327
  },
1328
1328
  renderInput: (e) => /* @__PURE__ */ r(
1329
1329
  D,
@@ -1333,7 +1333,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1333
1333
  placeholder: "Select column"
1334
1334
  }
1335
1335
  ),
1336
- renderOption: (e, n) => /* @__PURE__ */ r("li", { ...e, children: /* @__PURE__ */ r(B, { title: n, placement: "left", arrow: !0, children: /* @__PURE__ */ r("span", { className: "truncate max-w-[250px]", children: n }) }) })
1336
+ renderOption: (e, a) => /* @__PURE__ */ r("li", { ...e, children: /* @__PURE__ */ r(B, { title: a, placement: "left", arrow: !0, children: /* @__PURE__ */ r("span", { className: "truncate max-w-[250px]", children: a }) }) })
1337
1337
  }
1338
1338
  ) }),
1339
1339
  (i || m) && /* @__PURE__ */ r(
@@ -1352,10 +1352,10 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1352
1352
  },
1353
1353
  disabled: !!t.formState.errors.tableName,
1354
1354
  onClick: async (e) => {
1355
- const n = e.currentTarget;
1356
- await t.trigger("tableName") && (ie(null), oe(n));
1355
+ const a = e.currentTarget;
1356
+ await t.trigger("tableName") && (ie(null), oe(a));
1357
1357
  },
1358
- startIcon: /* @__PURE__ */ r(C, { iconName: "faPlus" }),
1358
+ startIcon: /* @__PURE__ */ r(v, { iconName: "faPlus" }),
1359
1359
  children: "Column"
1360
1360
  }
1361
1361
  ),
@@ -1393,18 +1393,18 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1393
1393
  id: "newColumnName",
1394
1394
  control: t.control,
1395
1395
  render: ({
1396
- field: { onChange: e, value: n, ...l },
1397
- fieldState: { error: a }
1396
+ field: { onChange: e, value: a, ...l },
1397
+ fieldState: { error: n }
1398
1398
  }) => /* @__PURE__ */ r(
1399
1399
  D,
1400
1400
  {
1401
1401
  ...l,
1402
- value: (n == null ? void 0 : n.trim()) || "",
1402
+ value: (a == null ? void 0 : a.trim()) || "",
1403
1403
  variant: "outlined",
1404
1404
  fullWidth: !0,
1405
1405
  size: "small",
1406
- error: !!a,
1407
- helperText: a == null ? void 0 : a.message,
1406
+ error: !!n,
1407
+ helperText: n == null ? void 0 : n.message,
1408
1408
  label: "Column Name",
1409
1409
  sx: {
1410
1410
  "& .MuiInputLabel-root": {
@@ -1426,21 +1426,21 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1426
1426
  id: "newColumnType",
1427
1427
  control: t.control,
1428
1428
  render: ({
1429
- field: { onChange: e, value: n },
1429
+ field: { onChange: e, value: a },
1430
1430
  fieldState: { error: l }
1431
1431
  }) => /* @__PURE__ */ r(
1432
1432
  ce,
1433
1433
  {
1434
1434
  options: ze || [],
1435
- value: (n == null ? void 0 : n.trim()) || null,
1436
- getOptionLabel: (a) => a,
1437
- onChange: (a, o) => {
1435
+ value: (a == null ? void 0 : a.trim()) || null,
1436
+ getOptionLabel: (n) => n,
1437
+ onChange: (n, o) => {
1438
1438
  e(o);
1439
1439
  },
1440
- renderInput: (a) => /* @__PURE__ */ r(
1440
+ renderInput: (n) => /* @__PURE__ */ r(
1441
1441
  D,
1442
1442
  {
1443
- ...a,
1443
+ ...n,
1444
1444
  size: "small",
1445
1445
  error: !!l,
1446
1446
  helperText: l == null ? void 0 : l.message,
@@ -1475,11 +1475,11 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1475
1475
  name: "isPrimaryKey",
1476
1476
  control: t.control,
1477
1477
  render: ({
1478
- field: { onChange: e, value: n }
1478
+ field: { onChange: e, value: a }
1479
1479
  }) => /* @__PURE__ */ r(
1480
1480
  fr,
1481
1481
  {
1482
- checked: n || !1,
1482
+ checked: a || !1,
1483
1483
  onChange: (l) => e(l.target.checked),
1484
1484
  sx: {
1485
1485
  margin: "0px"
@@ -1500,19 +1500,19 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1500
1500
  Re.trim()
1501
1501
  ),
1502
1502
  onClick: async () => {
1503
- const e = t.getValues("isPrimaryKey"), n = t.getValues("newColumnName"), l = t.getValues("newColumnType"), a = t.getValues("selectedColumns").some((c) => c.isPrimaryKey);
1503
+ const e = t.getValues("isPrimaryKey"), a = t.getValues("newColumnName"), l = t.getValues("newColumnType"), n = t.getValues("selectedColumns").some((c) => c.isPrimaryKey);
1504
1504
  let o = [
1505
1505
  ...t.getValues("selectedColumns")
1506
1506
  ];
1507
1507
  if (X !== null)
1508
1508
  o[X] = {
1509
1509
  ...o[X],
1510
- name: n,
1510
+ name: a,
1511
1511
  type: l
1512
1512
  };
1513
1513
  else {
1514
1514
  if (o.some(
1515
- (p) => p.name === n
1515
+ (p) => p.name === a
1516
1516
  )) {
1517
1517
  V({
1518
1518
  message: "Column already exists",
@@ -1521,10 +1521,10 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1521
1521
  return;
1522
1522
  }
1523
1523
  const c = {
1524
- name: n,
1524
+ name: a,
1525
1525
  type: l
1526
1526
  };
1527
- !a && e && (t.setValue("primaryKey", n), c.isPrimaryKey = !0), o.push(c);
1527
+ !n && e && (t.setValue("primaryKey", a), c.isPrimaryKey = !0), o.push(c);
1528
1528
  }
1529
1529
  t.setValue(
1530
1530
  "selectedColumns",
@@ -1557,7 +1557,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1557
1557
  borderRadius: 2
1558
1558
  },
1559
1559
  children: /* @__PURE__ */ s(xr, { stickyHeader: !0, children: [
1560
- /* @__PURE__ */ r(Cr, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ s(
1560
+ /* @__PURE__ */ r(vr, { children: /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ s(
1561
1561
  re,
1562
1562
  {
1563
1563
  className: " px-3 ",
@@ -1575,8 +1575,8 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1575
1575
  },
1576
1576
  className: "w-full py-0.5 text-xs",
1577
1577
  InputProps: {
1578
- startAdornment: /* @__PURE__ */ r(Ce, { position: "start", children: /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(
1579
- C,
1578
+ startAdornment: /* @__PURE__ */ r(ve, { position: "start", children: /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(
1579
+ v,
1580
1580
  {
1581
1581
  iconName: "faMagnifyingGlass",
1582
1582
  className: "text-[1rem]"
@@ -1600,10 +1600,10 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1600
1600
  ]
1601
1601
  }
1602
1602
  ) }) }),
1603
- g === 0 && /* @__PURE__ */ r(Ye, { children: v.length ? v.map((e, n) => /* @__PURE__ */ r(
1603
+ g === 0 && /* @__PURE__ */ r(Ye, { children: b.length ? b.map((e, a) => /* @__PURE__ */ r(
1604
1604
  ee,
1605
1605
  {
1606
- className: `border-b ${n === v.length - 1 ? "border-none" : "border-[#ccc]"}`,
1606
+ className: `border-b ${a === b.length - 1 ? "border-none" : "border-[#ccc]"}`,
1607
1607
  sx: {
1608
1608
  backgroundColor: e.onlyMobileDb ? "#d3ecc7" : e.isTypeChanged ? "rgba(255, 0, 0, 0.1)" : "#fff",
1609
1609
  "&:hover": {
@@ -1643,7 +1643,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1643
1643
  paddingRight: 1
1644
1644
  },
1645
1645
  children: /* @__PURE__ */ r(
1646
- C,
1646
+ v,
1647
1647
  {
1648
1648
  iconName: "faKey",
1649
1649
  className: "text-[1rem] text-[#d3bb51]"
@@ -1673,17 +1673,17 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1673
1673
  "selectedColumns"
1674
1674
  );
1675
1675
  I("");
1676
- const a = l.filter(
1676
+ const n = l.filter(
1677
1677
  (c) => c.name !== e.name
1678
1678
  );
1679
1679
  t.setValue(
1680
1680
  "selectedColumns",
1681
- a,
1681
+ n,
1682
1682
  { shouldDirty: !0 }
1683
1683
  );
1684
- const o = te.trim().toLowerCase(), h = o ? a.filter(
1684
+ const o = te.trim().toLowerCase(), h = o ? n.filter(
1685
1685
  (c) => c.name.toLowerCase().includes(o)
1686
- ) : a;
1686
+ ) : n;
1687
1687
  K(
1688
1688
  h
1689
1689
  ), R(
@@ -1695,11 +1695,11 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1695
1695
  "primaryKey",
1696
1696
  ""
1697
1697
  ), i && await ye(
1698
- a
1698
+ n
1699
1699
  );
1700
1700
  },
1701
1701
  children: /* @__PURE__ */ r(
1702
- C,
1702
+ v,
1703
1703
  {
1704
1704
  iconName: "faTrashCan",
1705
1705
  className: "text-[1rem] text-[#df5f5f]"
@@ -1719,12 +1719,12 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1719
1719
  color: "success"
1720
1720
  },
1721
1721
  onClick: () => {
1722
- const a = t.getValues(
1722
+ const n = t.getValues(
1723
1723
  "selectedColumns"
1724
1724
  ).findIndex(
1725
1725
  (o) => o.name === e.name
1726
1726
  );
1727
- ie(a), t.setValue(
1727
+ ie(n), t.setValue(
1728
1728
  "newColumnName",
1729
1729
  e.name
1730
1730
  ), t.setValue(
@@ -1737,7 +1737,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1737
1737
  );
1738
1738
  },
1739
1739
  children: /* @__PURE__ */ r(
1740
- C,
1740
+ v,
1741
1741
  {
1742
1742
  iconName: "faPen",
1743
1743
  className: "text-[1rem] text-[#4f4f4f]"
@@ -1749,20 +1749,20 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1749
1749
  ] })
1750
1750
  ] })
1751
1751
  },
1752
- n + 1
1752
+ a + 1
1753
1753
  )) : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(re, { colSpan: 1, className: "p-2", children: /* @__PURE__ */ s(u, { variant: "body2", children: [
1754
1754
  " ",
1755
- t.getValues("selectedColumns").length === 0 ? "There are no columns to display." : v.length === 0 ? "No columns for search query." : null
1755
+ t.getValues("selectedColumns").length === 0 ? "There are no columns to display." : b.length === 0 ? "No columns for search query." : null
1756
1756
  ] }) }) }) }),
1757
- g === 1 && /* @__PURE__ */ r(Ye, { children: Y.length ? Y.map((e, n) => {
1758
- const l = e.name === d.primaryKey, a = e.isSynced || !1, o = /* @__PURE__ */ r(
1759
- vr,
1757
+ g === 1 && /* @__PURE__ */ r(Ye, { children: Y.length ? Y.map((e, a) => {
1758
+ const l = e.name === d.primaryKey, n = e.isSynced || !1, o = /* @__PURE__ */ r(
1759
+ br,
1760
1760
  {
1761
1761
  icon: /* @__PURE__ */ r(
1762
1762
  f,
1763
1763
  {
1764
1764
  sx: {
1765
- backgroundColor: "#001e3c",
1765
+ backgroundColor: "var(--color-tableHeader)",
1766
1766
  borderRadius: "50%",
1767
1767
  width: 20,
1768
1768
  height: 20,
@@ -1771,7 +1771,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1771
1771
  justifyContent: "center"
1772
1772
  },
1773
1773
  children: /* @__PURE__ */ r(
1774
- C,
1774
+ v,
1775
1775
  {
1776
1776
  iconName: "faBan",
1777
1777
  size: "sm",
@@ -1793,7 +1793,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1793
1793
  justifyContent: "center"
1794
1794
  },
1795
1795
  children: /* @__PURE__ */ r(
1796
- C,
1796
+ v,
1797
1797
  {
1798
1798
  iconName: "faRotate",
1799
1799
  className: "text-white text-xs"
@@ -1801,33 +1801,33 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1801
1801
  )
1802
1802
  }
1803
1803
  ),
1804
- checked: a,
1804
+ checked: n,
1805
1805
  disabled: !m,
1806
1806
  onChange: (c) => {
1807
1807
  const p = c.target.checked;
1808
1808
  if (!p && m && !G && !i && e.name === d.primaryKey)
1809
1809
  return;
1810
1810
  const j = [...Y], Z = {
1811
- ...j[n],
1811
+ ...j[a],
1812
1812
  isSynced: c.target.checked
1813
1813
  };
1814
- j[n] = Z, R(j);
1815
- const P = [...v];
1814
+ j[a] = Z, R(j);
1815
+ const P = [...b];
1816
1816
  if (p) {
1817
- const q = v.some(
1817
+ const A = b.some(
1818
1818
  (z) => z.isPrimaryKey
1819
1819
  );
1820
- e.name === d.primaryKey && !q ? (P.push({
1820
+ e.name === d.primaryKey && !A ? (P.push({
1821
1821
  ...Z,
1822
1822
  isPrimaryKey: !0
1823
1823
  }), t.setValue("primaryKey", e.name)) : P.push(Z);
1824
1824
  } else {
1825
- const q = P.findIndex(
1826
- (z) => z.name === j[n].name
1825
+ const A = P.findIndex(
1826
+ (z) => z.name === j[a].name
1827
1827
  );
1828
- if (q > -1) {
1829
- const z = P[q].isPrimaryKey;
1830
- P.splice(q, 1), z && t.setValue("primaryKey", "");
1828
+ if (A > -1) {
1829
+ const z = P[A].isPrimaryKey;
1830
+ P.splice(A, 1), z && t.setValue("primaryKey", "");
1831
1831
  }
1832
1832
  }
1833
1833
  K(P), t.setValue("selectedColumns", P, {
@@ -1844,7 +1844,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1844
1844
  paddingRight: m ? 1 : 0
1845
1845
  },
1846
1846
  children: /* @__PURE__ */ r(
1847
- C,
1847
+ v,
1848
1848
  {
1849
1849
  iconName: "faKey",
1850
1850
  className: "text-lg text-[#d3bb51]"
@@ -1855,7 +1855,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1855
1855
  return /* @__PURE__ */ r(
1856
1856
  ee,
1857
1857
  {
1858
- className: `border-b ${n === Y.length - 1 ? "border-none" : "border-[#ccc]"}`,
1858
+ className: `border-b ${a === Y.length - 1 ? "border-none" : "border-[#ccc]"}`,
1859
1859
  sx: {
1860
1860
  "&:hover": { backgroundColor: "#e9f3ff" }
1861
1861
  },
@@ -1903,7 +1903,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1903
1903
  )
1904
1904
  ]
1905
1905
  }
1906
- ) : o : a ? /* @__PURE__ */ r(
1906
+ ) : o : n ? /* @__PURE__ */ r(
1907
1907
  f,
1908
1908
  {
1909
1909
  sx: {
@@ -1917,7 +1917,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1917
1917
  margin: "9px 0px"
1918
1918
  },
1919
1919
  children: /* @__PURE__ */ r(
1920
- C,
1920
+ v,
1921
1921
  {
1922
1922
  iconName: "faRotate",
1923
1923
  className: "text-white text-xs"
@@ -1928,7 +1928,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1928
1928
  f,
1929
1929
  {
1930
1930
  sx: {
1931
- backgroundColor: "#001e3c",
1931
+ backgroundColor: "var(--color-tableHeader)",
1932
1932
  borderRadius: "50%",
1933
1933
  width: 20,
1934
1934
  height: 20,
@@ -1938,7 +1938,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1938
1938
  margin: "9px 0px"
1939
1939
  },
1940
1940
  children: /* @__PURE__ */ r(
1941
- C,
1941
+ v,
1942
1942
  {
1943
1943
  iconName: "faBan",
1944
1944
  className: "text-white pl-[0.5px]"
@@ -1950,7 +1950,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1950
1950
  }
1951
1951
  )
1952
1952
  },
1953
- n + 1
1953
+ a + 1
1954
1954
  );
1955
1955
  }) : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(re, { colSpan: 1, className: "p-2", children: /* @__PURE__ */ r(u, { variant: "body2", children: "No columns for search query." }) }) }) })
1956
1956
  ] })
@@ -1965,7 +1965,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1965
1965
  )
1966
1966
  }
1967
1967
  ),
1968
- De && /* @__PURE__ */ r(br, { open: De, onClose: ir, children: /* @__PURE__ */ s(f, { sx: { ...Pr }, children: [
1968
+ De && /* @__PURE__ */ r(Cr, { open: De, onClose: ir, children: /* @__PURE__ */ s(f, { sx: { ...Pr }, children: [
1969
1969
  /* @__PURE__ */ s(
1970
1970
  f,
1971
1971
  {
@@ -1985,7 +1985,7 @@ CONSTRAINT ${h}_pkey PRIMARY KEY (${a})`), o += ");", o;
1985
1985
  ] }),
1986
1986
  " ",
1987
1987
  /* @__PURE__ */ r(
1988
- C,
1988
+ v,
1989
1989
  {
1990
1990
  iconName: "faArrowRight",
1991
1991
  size: "sm",
@@ -2066,4 +2066,4 @@ kr.propTypes = {
2066
2066
  export {
2067
2067
  kr as default
2068
2068
  };
2069
- //# sourceMappingURL=TableDetails-DztbjsIA.js.map
2069
+ //# sourceMappingURL=TableDetails-Cf_YfnY2.js.map