@materialui-reactjs/admin 1.0.4 → 1.0.5
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/chunks/{HeaderUpdate-lrSYWsKp.js → HeaderUpdate-CYN7fndV.js} +1 -1
- package/dist/chunks/{Validator-DjZz2bJs.js → Validator-CXYkI7vJ.js} +62 -59
- package/dist/chunks/{form-C8gzkYMW.js → form-DirVyglJ.js} +176 -130
- package/dist/chunks/{meta-k8MmuQjS.js → meta-BkJxF49g.js} +12 -12
- package/dist/chunks/{single-DyPwG6ZR.js → single-DfnwtW2f.js} +209 -209
- package/dist/components/form/DateTimeInput.d.ts +2 -1
- package/dist/components/form/UFile.d.ts +1 -1
- package/dist/components/form/UFiles.d.ts +1 -0
- package/dist/components/form/index.js +3 -3
- package/dist/components/meta/index.js +2 -2
- package/dist/components/single/Detail.d.ts +1 -0
- package/dist/components/single/Fields.d.ts +1 -0
- package/dist/components/single/Update.d.ts +2 -1
- package/dist/components/single/index.js +1 -1
- package/dist/hook/detail.d.ts +5 -1
- package/dist/hook/detail.js +7 -7
- package/dist/hook/fields.d.ts +5 -1
- package/dist/hook/fields.js +7 -7
- package/dist/hook/index.d.ts +1 -1
- package/dist/hook/index.js +1 -1
- package/dist/hook/update.d.ts +12 -3
- package/dist/hook/update.js +25 -22
- package/dist/index.js +11 -11
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, b as t, d as n, o as r, t as i, v as a, y as o } from "./Common-C_ZhT4L6.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { i as s, t as c } from "./Validator-CXYkI7vJ.js";
|
|
3
|
+
import { d as l, l as u, s as d, u as f } from "./HeaderUpdate-CYN7fndV.js";
|
|
4
4
|
import { useEffect as p, useLayoutEffect as m, useRef as h, useState as g } from "react";
|
|
5
5
|
import _ from "react-select";
|
|
6
6
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
@@ -10,7 +10,7 @@ import { Helmet as T } from "react-helmet-async";
|
|
|
10
10
|
//#region src/components/meta/BtnGroup.tsx
|
|
11
11
|
var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) => /* @__PURE__ */ b("div", {
|
|
12
12
|
className: "btn-group",
|
|
13
|
-
children: [n && /* @__PURE__ */ y(
|
|
13
|
+
children: [n && /* @__PURE__ */ y(l, {
|
|
14
14
|
title: "Chỉnh sửa",
|
|
15
15
|
children: /* @__PURE__ */ y(C, {
|
|
16
16
|
to: e + "/edit/" + t,
|
|
@@ -20,7 +20,7 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
20
20
|
children: "drive_file_rename_outline"
|
|
21
21
|
})
|
|
22
22
|
})
|
|
23
|
-
}), r && /* @__PURE__ */ y(
|
|
23
|
+
}), r && /* @__PURE__ */ y(l, {
|
|
24
24
|
title: "Xóa",
|
|
25
25
|
children: /* @__PURE__ */ y("button", {
|
|
26
26
|
type: "button",
|
|
@@ -111,11 +111,11 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
111
111
|
className: `modal-body rounded-bottom pb-0 ${C}`,
|
|
112
112
|
style: { overflowY: "auto" },
|
|
113
113
|
children: a(D, async (e) => {
|
|
114
|
-
let { name: t, value: n } = s(e
|
|
115
|
-
O({
|
|
116
|
-
...
|
|
114
|
+
let { name: t, value: n } = s(e);
|
|
115
|
+
O((e) => ({
|
|
116
|
+
...e,
|
|
117
117
|
[t]: n
|
|
118
|
-
});
|
|
118
|
+
}));
|
|
119
119
|
})
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ b("div", {
|
|
@@ -404,7 +404,7 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
404
404
|
})
|
|
405
405
|
]
|
|
406
406
|
});
|
|
407
|
-
}, L = ({ frmBody: n, service: s, apiOption: c, options:
|
|
407
|
+
}, L = ({ frmBody: n, service: s, apiOption: c, options: l, tbOption: m, roleOption: _, clsWidth: S = "xl", btnTxt: C = "Lưu lại" }) => {
|
|
408
408
|
let T = h(null), E = w(), [k, A] = g(0), [j, M] = g({
|
|
409
409
|
items: [],
|
|
410
410
|
page: 1,
|
|
@@ -439,7 +439,7 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
439
439
|
}, L = async (e) => {
|
|
440
440
|
try {
|
|
441
441
|
e.preventDefault();
|
|
442
|
-
let t = await
|
|
442
|
+
let t = await d(e, j?.filter || {}, c?.cUri, E);
|
|
443
443
|
M({
|
|
444
444
|
...j,
|
|
445
445
|
filter: t
|
|
@@ -449,7 +449,7 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
449
449
|
}
|
|
450
450
|
}, R = async (e) => {
|
|
451
451
|
e.preventDefault();
|
|
452
|
-
let t =
|
|
452
|
+
let t = u(e, j?.filter || {});
|
|
453
453
|
M({
|
|
454
454
|
...j,
|
|
455
455
|
filter: t
|
|
@@ -571,7 +571,7 @@ var E = ({ cUri: e, itemId: t, isEdit: n = !1, isDel: r = !1, onDelete: i }) =>
|
|
|
571
571
|
/* @__PURE__ */ y(I, {
|
|
572
572
|
ftfield: m.ftfield,
|
|
573
573
|
service: s,
|
|
574
|
-
options:
|
|
574
|
+
options: l,
|
|
575
575
|
filter: j?.filter || {},
|
|
576
576
|
handleChange: R,
|
|
577
577
|
handleSearchForm: z
|