@argusoft/medplat-core 1.0.18 → 1.0.20
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/{AccessRights-Bvd5Bm5K.js → AccessRights-CupmTG3T.js} +2 -2
- package/dist/{AccessRights-Bvd5Bm5K.js.map → AccessRights-CupmTG3T.js.map} +1 -1
- package/dist/{AddEditQueryBuilder-Bcjl5mXE.js → AddEditQueryBuilder-C8ZSkOF0.js} +60 -60
- package/dist/AddEditQueryBuilder-C8ZSkOF0.js.map +1 -0
- package/dist/{AddFeatures-CE5rBxEG.js → AddFeatures-CiZZZ0GL.js} +2 -2
- package/dist/{AddFeatures-CE5rBxEG.js.map → AddFeatures-CiZZZ0GL.js.map} +1 -1
- package/dist/{AddMenuConfiguration-QWfpcnuP.js → AddMenuConfiguration-DsnY0Rws.js} +544 -544
- package/dist/AddMenuConfiguration-DsnY0Rws.js.map +1 -0
- package/dist/{AddRoleDrawer-SvntLdRu.js → AddRoleDrawer-CQdzQZLb.js} +39 -39
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +1 -0
- package/dist/ChangePasswordModalCore-50EzprTk.js +5495 -0
- package/dist/ChangePasswordModalCore-50EzprTk.js.map +1 -0
- package/dist/{ConditionConfig-DB0FqwgG.js → ConditionConfig-C3rF2wXU.js} +2 -2
- package/dist/{ConditionConfig-DB0FqwgG.js.map → ConditionConfig-C3rF2wXU.js.map} +1 -1
- package/dist/{EntityManagement-DQKXnEzz.js → EntityManagement-D4nG7wUX.js} +2 -2
- package/dist/{EntityManagement-DQKXnEzz.js.map → EntityManagement-D4nG7wUX.js.map} +1 -1
- package/dist/{EventConfigurations-D8juDb29.js → EventConfigurations-BGffjVC7.js} +3 -3
- package/dist/{EventConfigurations-D8juDb29.js.map → EventConfigurations-BGffjVC7.js.map} +1 -1
- package/dist/{EventsExceptionModal-DsvngLi8.js → EventsExceptionModal-D4Bf1ilS.js} +2 -2
- package/dist/{EventsExceptionModal-DsvngLi8.js.map → EventsExceptionModal-D4Bf1ilS.js.map} +1 -1
- package/dist/EventsSkeleton-8iiETGcf.js +76 -0
- package/dist/EventsSkeleton-8iiETGcf.js.map +1 -0
- package/dist/{FeatureMenu-CLX8VNZ-.js → FeatureMenu-DUZL32RI.js} +3 -3
- package/dist/{FeatureMenu-CLX8VNZ-.js.map → FeatureMenu-DUZL32RI.js.map} +1 -1
- package/dist/Features-CObdzJp_.js +13 -0
- package/dist/Features-CObdzJp_.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-C5wnjI_-.js +5706 -0
- package/dist/ImmunizationConfigurationBase-C5wnjI_-.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/{ManageDynamicFeature-CsIett5x.js → ManageDynamicFeature-BhONvfC_.js} +3 -3
- package/dist/{ManageDynamicFeature-CsIett5x.js.map → ManageDynamicFeature-BhONvfC_.js.map} +1 -1
- package/dist/{ManageEventConfiguration-0YBDaxOI.js → ManageEventConfiguration-BntUc_YI.js} +93 -93
- package/dist/ManageEventConfiguration-BntUc_YI.js.map +1 -0
- package/dist/{ManageNotification-BUAvg5Ge.js → ManageNotification-CSl02Wq7.js} +2 -2
- package/dist/{ManageNotification-BUAvg5Ge.js.map → ManageNotification-CSl02Wq7.js.map} +1 -1
- package/dist/{ManageRole-Cbs9dUhc.js → ManageRole-tdzAiCOE.js} +222 -229
- package/dist/ManageRole-tdzAiCOE.js.map +1 -0
- package/dist/{ManageUser-eBS0yC5k.js → ManageUser-C6dlK-Mr.js} +3 -4
- package/dist/{ManageUser-eBS0yC5k.js.map → ManageUser-C6dlK-Mr.js.map} +1 -1
- package/dist/{MobileMenuManagement-BmrO-7MN.js → MobileMenuManagement-CV6QCeos.js} +15 -15
- package/dist/MobileMenuManagement-CV6QCeos.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-Ltm529jG.js → MobileTypeEventConfigModal-BNjZ8pnq.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-Ltm529jG.js.map → MobileTypeEventConfigModal-BNjZ8pnq.js.map} +1 -1
- package/dist/{NewServerManagement-5YcAtF-g.js → NewServerManagement-Cxe0dV0O.js} +5 -5
- package/dist/NewServerManagement-Cxe0dV0O.js.map +1 -0
- package/dist/{NotificationList-CUZSWp2J.js → NotificationList-D1U1LYnz.js} +140 -139
- package/dist/NotificationList-D1U1LYnz.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-dXt2qDg_.js → OtherTypeEventConfigModal-DiVhWDpG.js} +43 -43
- package/dist/{OtherTypeEventConfigModal-dXt2qDg_.js.map → OtherTypeEventConfigModal-DiVhWDpG.js.map} +1 -1
- package/dist/{QueryBuilder-DXexUIe8.js → QueryBuilder-DI0wCJbz.js} +85 -84
- package/dist/QueryBuilder-DI0wCJbz.js.map +1 -0
- package/dist/{QueryManagement-DGHV_-d5.js → QueryManagement-CRykYGum.js} +3 -3
- package/dist/QueryManagement-CRykYGum.js.map +1 -0
- package/dist/{RoleManagement-BThAL5LO.js → RoleManagement-Cg8-EiVr.js} +83 -82
- package/dist/RoleManagement-Cg8-EiVr.js.map +1 -0
- package/dist/SecurityAuditLogList-Dod711KT.js +874 -0
- package/dist/SecurityAuditLogList-Dod711KT.js.map +1 -0
- package/dist/{ShowFlywayQuery-BkyA6QaA.js → ShowFlywayQuery-tj42YQAS.js} +33 -33
- package/dist/ShowFlywayQuery-tj42YQAS.js.map +1 -0
- package/dist/{SubMenu-BGznOP2a.js → SubMenu-CM_4wNCR.js} +2 -2
- package/dist/{SubMenu-BGznOP2a.js.map → SubMenu-CM_4wNCR.js.map} +1 -1
- package/dist/{TableDetails-DztbjsIA.js → TableDetails-Cf_YfnY2.js} +235 -235
- package/dist/TableDetails-Cf_YfnY2.js.map +1 -0
- package/dist/{TableList-DYwotUDO.js → TableList-HGbEN4bv.js} +28 -28
- package/dist/TableList-HGbEN4bv.js.map +1 -0
- package/dist/{TypeConfiguration-DYbBG_hZ.js → TypeConfiguration-CupQxH9Y.js} +28 -28
- package/dist/TypeConfiguration-CupQxH9Y.js.map +1 -0
- package/dist/{UserList-BAeAFeXZ.js → UserList-BzHsbYel.js} +423 -423
- package/dist/UserList-BzHsbYel.js.map +1 -0
- package/dist/{WidgetList-D-fIf3N2.js → WidgetList-B7X8Awkg.js} +2 -2
- package/dist/{WidgetList-D-fIf3N2.js.map → WidgetList-B7X8Awkg.js.map} +1 -1
- package/dist/index-D9YNFPn9.js +1439 -0
- package/dist/index-D9YNFPn9.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +102 -100
- package/dist/index.js.map +1 -1
- package/dist/{index-BFznsakV.js → pdfmake-Cf-381ou.js} +13951 -15385
- package/dist/pdfmake-Cf-381ou.js.map +1 -0
- package/package.json +1 -1
- package/dist/AddEditQueryBuilder-Bcjl5mXE.js.map +0 -1
- package/dist/AddMenuConfiguration-QWfpcnuP.js.map +0 -1
- package/dist/AddRoleDrawer-SvntLdRu.js.map +0 -1
- package/dist/ChangePasswordModalCore-ClND1mel.js +0 -181
- package/dist/ChangePasswordModalCore-ClND1mel.js.map +0 -1
- package/dist/EventsSkeleton-DCXwwPbb.js +0 -76
- package/dist/EventsSkeleton-DCXwwPbb.js.map +0 -1
- package/dist/Features-Cpf1PDx0.js +0 -13
- package/dist/Features-Cpf1PDx0.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-BqPTExSk.js +0 -5653
- package/dist/ImmunizationConfigurationBase-BqPTExSk.js.map +0 -1
- package/dist/ManageEventConfiguration-0YBDaxOI.js.map +0 -1
- package/dist/ManageRole-Cbs9dUhc.js.map +0 -1
- package/dist/MobileMenuManagement-BmrO-7MN.js.map +0 -1
- package/dist/NewServerManagement-5YcAtF-g.js.map +0 -1
- package/dist/NotificationList-CUZSWp2J.js.map +0 -1
- package/dist/QueryBuilder-DXexUIe8.js.map +0 -1
- package/dist/QueryManagement-DGHV_-d5.js.map +0 -1
- package/dist/RoleManagement-BThAL5LO.js.map +0 -1
- package/dist/SecurityAuditLogList-DHTcOtbx.js +0 -748
- package/dist/SecurityAuditLogList-DHTcOtbx.js.map +0 -1
- package/dist/ShowFlywayQuery-BkyA6QaA.js.map +0 -1
- package/dist/TableDetails-DztbjsIA.js.map +0 -1
- package/dist/TableList-DYwotUDO.js.map +0 -1
- package/dist/TypeConfiguration-DYbBG_hZ.js.map +0 -1
- package/dist/UserList-BAeAFeXZ.js.map +0 -1
- 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
|
|
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
|
|
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
|
|
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:
|
|
18
|
+
table: C,
|
|
19
19
|
isEditMode: m,
|
|
20
|
-
updateEditMode:
|
|
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((
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
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
|
|
48
|
-
const
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
const l = (
|
|
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,
|
|
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
|
|
79
|
-
return !((
|
|
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
|
|
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
|
-
|
|
92
|
-
}, Le = async (e,
|
|
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
|
|
96
|
-
if (
|
|
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 (
|
|
110
|
+
if (n = (await H({
|
|
111
111
|
code: "update_mobile_entity",
|
|
112
112
|
parameters: {
|
|
113
|
-
tableName: (i ? t.getValues("tableName") :
|
|
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,
|
|
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 (
|
|
147
|
+
if (n = (await H({
|
|
148
148
|
code: "update_mobile_entity",
|
|
149
149
|
parameters: {
|
|
150
|
-
tableName: (i ? t.getValues("tableName") :
|
|
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,
|
|
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
|
-
|
|
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
|
-
})),
|
|
185
|
+
})), ae(!1);
|
|
186
186
|
}, ir = () => {
|
|
187
|
-
|
|
188
|
-
},
|
|
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
|
-
|
|
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 =
|
|
197
|
+
), P = a.filter(
|
|
198
198
|
(x) => !p.includes(x.name)
|
|
199
|
-
),
|
|
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 ${
|
|
202
|
+
}), z = Z.map((x) => `ALTER TABLE ${C} DROP COLUMN ${x.name};`).join(`
|
|
203
203
|
`), Ge = P.map(
|
|
204
|
-
(x) => `ALTER TABLE ${
|
|
204
|
+
(x) => `ALTER TABLE ${C} ADD COLUMN ${x.name} ${x.type};`
|
|
205
205
|
).join(`
|
|
206
206
|
`);
|
|
207
207
|
let fe = "";
|
|
208
|
-
return
|
|
209
|
-
|
|
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:
|
|
216
|
-
primaryKey:
|
|
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") :
|
|
222
|
+
const h = i ? t.getValues("tableName") : C;
|
|
223
223
|
return o = `CREATE TABLE ${h} (
|
|
224
|
-
`, o +=
|
|
225
|
-
`),
|
|
226
|
-
CONSTRAINT ${h}_pkey PRIMARY KEY (${
|
|
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
|
-
},
|
|
229
|
-
var
|
|
230
|
-
const e = (
|
|
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 :
|
|
238
|
-
|
|
237
|
+
})) == null ? void 0 : a.data;
|
|
238
|
+
nr(e == null ? void 0 : e.result[0]);
|
|
239
239
|
};
|
|
240
|
-
|
|
241
|
-
if (I(""), he(0), le(0), i && (me([]), K([]), R([]),
|
|
240
|
+
Ce(() => {
|
|
241
|
+
if (I(""), he(0), le(0), i && (me([]), K([]), R([]), q([]), t.reset({
|
|
242
242
|
...T
|
|
243
|
-
}), setTimeout(() => t.trigger(), 0)),
|
|
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((
|
|
246
|
-
k !== void 0 ? k.columnInfo.forEach((
|
|
247
|
-
n
|
|
248
|
-
}) : d.columnInfo.forEach((
|
|
249
|
-
n
|
|
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((
|
|
253
|
-
l[
|
|
254
|
-
}), d.columnInfo.map((
|
|
255
|
-
e.includes(
|
|
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),
|
|
259
|
-
() => d.columnInfo.sort((
|
|
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
|
|
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:
|
|
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,
|
|
270
|
+
}, [d, k, C, i]), Ce(() => {
|
|
271
271
|
const e = te.toLowerCase();
|
|
272
272
|
if (g === 0) {
|
|
273
|
-
const
|
|
274
|
-
(
|
|
275
|
-
) :
|
|
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
|
|
279
|
-
t.getValues("selectedColumns").map((
|
|
280
|
-
), l = e ? Ve.filter((
|
|
281
|
-
...
|
|
282
|
-
isSynced:
|
|
283
|
-
})) : Ve.map((
|
|
284
|
-
...
|
|
285
|
-
isSynced:
|
|
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
|
-
|
|
294
|
+
Ce(() => {
|
|
295
295
|
i && t.getValues("selectedColumns").length > 0 && Be && ye(t.getValues("selectedColumns"));
|
|
296
296
|
}, [Be]);
|
|
297
297
|
const sr = (e) => {
|
|
298
|
-
|
|
298
|
+
ne(e);
|
|
299
299
|
}, dr = () => {
|
|
300
|
-
m &&
|
|
300
|
+
m && be(!m), i && we(!i), t.reset({
|
|
301
301
|
...T,
|
|
302
302
|
newColumnName: null,
|
|
303
303
|
newColumnType: null
|
|
304
|
-
}),
|
|
304
|
+
}), q(T.requestParameters || []), K(T.selectedColumns || []);
|
|
305
305
|
const e = new Set(
|
|
306
|
-
(T.selectedColumns || []).map((
|
|
306
|
+
(T.selectedColumns || []).map((a) => a.name)
|
|
307
307
|
);
|
|
308
308
|
R(
|
|
309
|
-
(T.allColumns || []).map((
|
|
310
|
-
...
|
|
311
|
-
isSynced: e.has(
|
|
309
|
+
(T.allColumns || []).map((a) => ({
|
|
310
|
+
...a,
|
|
311
|
+
isSynced: e.has(a.name)
|
|
312
312
|
}))
|
|
313
313
|
);
|
|
314
314
|
}, cr = async () => {
|
|
315
|
-
var l,
|
|
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:
|
|
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 = (
|
|
329
|
-
let
|
|
330
|
-
|
|
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
|
|
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 (!
|
|
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) ||
|
|
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 =
|
|
351
|
+
}, 500), pe = b.some(
|
|
352
352
|
(e) => e.isPrimaryKey === !0
|
|
353
353
|
), ye = async (e) => {
|
|
354
|
-
var
|
|
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
|
|
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:
|
|
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:
|
|
439
|
+
children: C || "No Table Selected"
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
|
-
/* @__PURE__ */ r(u, { variant: "caption", color: "text.secondary", children:
|
|
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(
|
|
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:
|
|
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
|
|
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:
|
|
548
|
-
color:
|
|
549
|
-
backgroundColor:
|
|
550
|
-
boxShadow:
|
|
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:
|
|
552
|
+
borderColor: a ? "divider" : "transparent",
|
|
553
553
|
transition: "all 0.2s ease",
|
|
554
554
|
"&:hover": {
|
|
555
|
-
backgroundColor:
|
|
555
|
+
backgroundColor: a ? "background.paper" : "action.hover"
|
|
556
556
|
}
|
|
557
557
|
},
|
|
558
|
-
startIcon: /* @__PURE__ */ r(
|
|
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:
|
|
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
|
-
(
|
|
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:
|
|
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:
|
|
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
|
-
(
|
|
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:
|
|
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:
|
|
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
|
-
(
|
|
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:
|
|
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: "
|
|
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:
|
|
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:
|
|
923
|
+
value: a || null,
|
|
924
924
|
disabled: !m && !i,
|
|
925
|
-
onChange: (
|
|
926
|
-
renderInput: (
|
|
925
|
+
onChange: (n, o) => e(o),
|
|
926
|
+
renderInput: (n) => /* @__PURE__ */ r(
|
|
927
927
|
D,
|
|
928
928
|
{
|
|
929
|
-
...
|
|
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: "
|
|
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: "
|
|
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:
|
|
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: !!
|
|
989
|
-
helperText:
|
|
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: "
|
|
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
|
-
|
|
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: "
|
|
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
|
-
|
|
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: "
|
|
1059
|
+
sx: { color: "var(--color-gray1)", fontStyle: "italic" },
|
|
1060
1060
|
children: "No request parameters added."
|
|
1061
1061
|
}
|
|
1062
1062
|
),
|
|
1063
|
-
L.map((e,
|
|
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: "
|
|
1074
|
-
border: "1px solid
|
|
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
|
|
1087
|
-
(o, h) => h ===
|
|
1086
|
+
const n = L.map(
|
|
1087
|
+
(o, h) => h === a ? { ...o, key: l.target.value } : o
|
|
1088
1088
|
);
|
|
1089
|
-
|
|
1089
|
+
q(n), t.setValue(
|
|
1090
1090
|
"requestParameters",
|
|
1091
|
-
|
|
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:
|
|
1105
|
+
options: b.map(
|
|
1106
1106
|
(l) => l.name
|
|
1107
1107
|
),
|
|
1108
1108
|
value: e.value || null,
|
|
1109
1109
|
disabled: !m && !i,
|
|
1110
|
-
noOptionsText:
|
|
1111
|
-
onChange: (l,
|
|
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 ===
|
|
1113
|
+
(h, c) => c === a ? { ...h, value: n || "" } : h
|
|
1114
1114
|
);
|
|
1115
|
-
|
|
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
|
-
(
|
|
1141
|
+
(n, o) => o !== a
|
|
1142
1142
|
);
|
|
1143
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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: !!
|
|
1207
|
-
helperText:
|
|
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(
|
|
1212
|
-
endAdornment: /* @__PURE__ */ r(
|
|
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:
|
|
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 &&
|
|
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:
|
|
1314
|
+
options: b.map((e) => e.name),
|
|
1315
1315
|
value: t.getValues("primaryKey") || "",
|
|
1316
1316
|
readOnly: !m && !i,
|
|
1317
|
-
onChange: (e,
|
|
1318
|
-
const l =
|
|
1319
|
-
(
|
|
1320
|
-
...
|
|
1321
|
-
isPrimaryKey:
|
|
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",
|
|
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,
|
|
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
|
|
1356
|
-
await t.trigger("tableName") && (ie(null), oe(
|
|
1355
|
+
const a = e.currentTarget;
|
|
1356
|
+
await t.trigger("tableName") && (ie(null), oe(a));
|
|
1357
1357
|
},
|
|
1358
|
-
startIcon: /* @__PURE__ */ r(
|
|
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:
|
|
1397
|
-
fieldState: { error:
|
|
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: (
|
|
1402
|
+
value: (a == null ? void 0 : a.trim()) || "",
|
|
1403
1403
|
variant: "outlined",
|
|
1404
1404
|
fullWidth: !0,
|
|
1405
1405
|
size: "small",
|
|
1406
|
-
error: !!
|
|
1407
|
-
helperText:
|
|
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:
|
|
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: (
|
|
1436
|
-
getOptionLabel: (
|
|
1437
|
-
onChange: (
|
|
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: (
|
|
1440
|
+
renderInput: (n) => /* @__PURE__ */ r(
|
|
1441
1441
|
D,
|
|
1442
1442
|
{
|
|
1443
|
-
...
|
|
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:
|
|
1478
|
+
field: { onChange: e, value: a }
|
|
1479
1479
|
}) => /* @__PURE__ */ r(
|
|
1480
1480
|
fr,
|
|
1481
1481
|
{
|
|
1482
|
-
checked:
|
|
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"),
|
|
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:
|
|
1510
|
+
name: a,
|
|
1511
1511
|
type: l
|
|
1512
1512
|
};
|
|
1513
1513
|
else {
|
|
1514
1514
|
if (o.some(
|
|
1515
|
-
(p) => p.name ===
|
|
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:
|
|
1524
|
+
name: a,
|
|
1525
1525
|
type: l
|
|
1526
1526
|
};
|
|
1527
|
-
!
|
|
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(
|
|
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(
|
|
1579
|
-
|
|
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:
|
|
1603
|
+
g === 0 && /* @__PURE__ */ r(Ye, { children: b.length ? b.map((e, a) => /* @__PURE__ */ r(
|
|
1604
1604
|
ee,
|
|
1605
1605
|
{
|
|
1606
|
-
className: `border-b ${
|
|
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
|
-
|
|
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
|
|
1676
|
+
const n = l.filter(
|
|
1677
1677
|
(c) => c.name !== e.name
|
|
1678
1678
|
);
|
|
1679
1679
|
t.setValue(
|
|
1680
1680
|
"selectedColumns",
|
|
1681
|
-
|
|
1681
|
+
n,
|
|
1682
1682
|
{ shouldDirty: !0 }
|
|
1683
1683
|
);
|
|
1684
|
-
const o = te.trim().toLowerCase(), h = o ?
|
|
1684
|
+
const o = te.trim().toLowerCase(), h = o ? n.filter(
|
|
1685
1685
|
(c) => c.name.toLowerCase().includes(o)
|
|
1686
|
-
) :
|
|
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
|
-
|
|
1698
|
+
n
|
|
1699
1699
|
);
|
|
1700
1700
|
},
|
|
1701
1701
|
children: /* @__PURE__ */ r(
|
|
1702
|
-
|
|
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
|
|
1722
|
+
const n = t.getValues(
|
|
1723
1723
|
"selectedColumns"
|
|
1724
1724
|
).findIndex(
|
|
1725
1725
|
(o) => o.name === e.name
|
|
1726
1726
|
);
|
|
1727
|
-
ie(
|
|
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
|
-
|
|
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
|
-
|
|
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." :
|
|
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,
|
|
1758
|
-
const l = e.name === d.primaryKey,
|
|
1759
|
-
|
|
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: "
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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[
|
|
1811
|
+
...j[a],
|
|
1812
1812
|
isSynced: c.target.checked
|
|
1813
1813
|
};
|
|
1814
|
-
j[
|
|
1815
|
-
const P = [...
|
|
1814
|
+
j[a] = Z, R(j);
|
|
1815
|
+
const P = [...b];
|
|
1816
1816
|
if (p) {
|
|
1817
|
-
const
|
|
1817
|
+
const A = b.some(
|
|
1818
1818
|
(z) => z.isPrimaryKey
|
|
1819
1819
|
);
|
|
1820
|
-
e.name === d.primaryKey && !
|
|
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
|
|
1826
|
-
(z) => z.name === j[
|
|
1825
|
+
const A = P.findIndex(
|
|
1826
|
+
(z) => z.name === j[a].name
|
|
1827
1827
|
);
|
|
1828
|
-
if (
|
|
1829
|
-
const z = P[
|
|
1830
|
-
P.splice(
|
|
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
|
-
|
|
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 ${
|
|
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 :
|
|
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
|
-
|
|
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: "
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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-
|
|
2069
|
+
//# sourceMappingURL=TableDetails-Cf_YfnY2.js.map
|