@nocobase/client 1.8.10 → 1.8.11
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/es/index.mjs +322 -318
- package/lib/index.js +16 -16
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var we = (e, t, n) => t in e ?
|
|
1
|
+
var Oe = Object.defineProperty, Le = Object.defineProperties;
|
|
2
|
+
var Ve = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Te = Object.getOwnPropertySymbols;
|
|
4
|
+
var Be = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var $e = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
|
|
6
|
+
var we = (e, t, n) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t) => {
|
|
7
7
|
for (var n in t || (t = {}))
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
for (var n of
|
|
11
|
-
|
|
8
|
+
Be.call(t, n) && we(e, n, t[n]);
|
|
9
|
+
if (Te)
|
|
10
|
+
for (var n of Te(t))
|
|
11
|
+
Ne.call(t, n) && we(e, n, t[n]);
|
|
12
12
|
return e;
|
|
13
|
-
}, P = (e, t) =>
|
|
13
|
+
}, P = (e, t) => Le(e, Ve(t));
|
|
14
14
|
var W = (e, t) => {
|
|
15
15
|
var n = {};
|
|
16
16
|
for (var o in e)
|
|
17
|
-
|
|
18
|
-
if (e != null &&
|
|
19
|
-
for (var o of
|
|
20
|
-
t.indexOf(o) < 0 &&
|
|
17
|
+
Be.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
18
|
+
if (e != null && Te)
|
|
19
|
+
for (var o of Te(e))
|
|
20
|
+
t.indexOf(o) < 0 && Ne.call(e, o) && (n[o] = e[o]);
|
|
21
21
|
return n;
|
|
22
22
|
};
|
|
23
23
|
var A = (e, t, n) => (we(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
@@ -37,7 +37,7 @@ var q = (e, t, n) => new Promise((o, r) => {
|
|
|
37
37
|
}, l = (c) => c.done ? o(c.value) : Promise.resolve(c.value).then(a, i);
|
|
38
38
|
l((n = n.apply(e, t)).next());
|
|
39
39
|
});
|
|
40
|
-
var
|
|
40
|
+
var Re = (e, t, n) => (t = e[$e("asyncIterator")]) ? t.call(e) : (e = e[$e("iterator")](), t = {}, n = (o, r) => (r = e[o]) && (t[o] = (a) => new Promise((i, l, c) => (a = r.call(e, a), c = a.done, Promise.resolve(a.value).then((u) => i({ value: u, done: c }), l)))), n("next"), n("return"), t);
|
|
41
41
|
import "./index.css";
|
|
42
42
|
import "dayjs/plugin/isBetween";
|
|
43
43
|
import "dayjs/plugin/isSameOrAfter";
|
|
@@ -113,7 +113,7 @@ import { loadableResource } from "react-imported-component";
|
|
|
113
113
|
import ProLayout, { RouteContext, PageHeader } from "@ant-design/pro-layout";
|
|
114
114
|
import * as antdStyle from "antd-style";
|
|
115
115
|
import { createStyles, createGlobalStyle, useAntdToken } from "antd-style";
|
|
116
|
-
import { createStyles as
|
|
116
|
+
import { createStyles as Rn } from "antd-style";
|
|
117
117
|
import * as dndKitCore from "@dnd-kit/core";
|
|
118
118
|
import { DndContext as DndContext$1, rectIntersection, DragOverlay, useDroppable, useDndContext, useDndMonitor, useDraggable } from "@dnd-kit/core";
|
|
119
119
|
import * as dndKitSortable from "@dnd-kit/sortable";
|
|
@@ -7683,7 +7683,7 @@ function getPlugins(e) {
|
|
|
7683
7683
|
const r = [], a = {};
|
|
7684
7684
|
if (o) {
|
|
7685
7685
|
try {
|
|
7686
|
-
for (var l =
|
|
7686
|
+
for (var l = Re(n), c, u, d; c = !(u = yield l.next()).done; c = !1) {
|
|
7687
7687
|
const p = u.value;
|
|
7688
7688
|
const m = yield o(p.packageName);
|
|
7689
7689
|
m && (r.push([p.name, m.default]), a[p.packageName] = m.default);
|
|
@@ -7728,7 +7728,7 @@ let PluginManager$1 = class {
|
|
|
7728
7728
|
initStaticPlugins() {
|
|
7729
7729
|
return q(this, arguments, function* (t = []) {
|
|
7730
7730
|
try {
|
|
7731
|
-
for (var n =
|
|
7731
|
+
for (var n = Re(t), o, r, a; o = !(r = yield n.next()).done; o = !1) {
|
|
7732
7732
|
const i = r.value;
|
|
7733
7733
|
const l = Array.isArray(i) ? i[0] : i, c = Array.isArray(i) ? i[1] : void 0;
|
|
7734
7734
|
yield this.add(l, c);
|
|
@@ -7754,7 +7754,7 @@ let PluginManager$1 = class {
|
|
|
7754
7754
|
devDynamicImport: this.app.devDynamicImport
|
|
7755
7755
|
});
|
|
7756
7756
|
try {
|
|
7757
|
-
for (var a =
|
|
7757
|
+
for (var a = Re(o), i, l, c; i = !(l = yield a.next()).done; i = !1) {
|
|
7758
7758
|
const [u, d] = l.value;
|
|
7759
7759
|
const p = n.find((m) => m.name === u);
|
|
7760
7760
|
yield this.add(d, p);
|
|
@@ -8769,7 +8769,7 @@ function addAppVersion(e, t) {
|
|
|
8769
8769
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8770
8770
|
}), e;
|
|
8771
8771
|
}
|
|
8772
|
-
const name = "@nocobase/client", version = "1.8.
|
|
8772
|
+
const name = "@nocobase/client", version = "1.8.11", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8773
8773
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8774
8774
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8775
8775
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8790,9 +8790,9 @@ const name = "@nocobase/client", version = "1.8.10", license = "AGPL-3.0", main
|
|
|
8790
8790
|
"@formily/reactive-react": "^2.2.27",
|
|
8791
8791
|
"@formily/shared": "^2.2.27",
|
|
8792
8792
|
"@formily/validator": "^2.2.27",
|
|
8793
|
-
"@nocobase/evaluators": "1.8.
|
|
8794
|
-
"@nocobase/sdk": "1.8.
|
|
8795
|
-
"@nocobase/utils": "1.8.
|
|
8793
|
+
"@nocobase/evaluators": "1.8.11",
|
|
8794
|
+
"@nocobase/sdk": "1.8.11",
|
|
8795
|
+
"@nocobase/utils": "1.8.11",
|
|
8796
8796
|
ahooks: "^3.7.2",
|
|
8797
8797
|
antd: "5.24.2",
|
|
8798
8798
|
"antd-style": "3.7.1",
|
|
@@ -10055,32 +10055,32 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10055
10055
|
}), adjustColumnOrder$1(I);
|
|
10056
10056
|
}, [S, c, r, u, e.showDel, l]);
|
|
10057
10057
|
}, SortableRow$1 = (e) => {
|
|
10058
|
-
var m, g, f
|
|
10058
|
+
var m, g, f;
|
|
10059
10059
|
const { token: t } = useToken$1(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o, active: r, over: a } = useSortable({
|
|
10060
10060
|
id: n
|
|
10061
|
-
}),
|
|
10062
|
-
const
|
|
10061
|
+
}), h = e, { rowIndex: i } = h, l = W(h, ["rowIndex"]), c = (a == null ? void 0 : a.id) == n, u = useMemo(() => {
|
|
10062
|
+
const C = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
|
|
10063
10063
|
return {
|
|
10064
10064
|
topActiveClass: css`
|
|
10065
10065
|
& > td {
|
|
10066
|
-
border-top: 2px solid ${
|
|
10066
|
+
border-top: 2px solid ${C} !important;
|
|
10067
10067
|
}
|
|
10068
10068
|
`,
|
|
10069
10069
|
bottomActiveClass: css`
|
|
10070
10070
|
& > td {
|
|
10071
|
-
border-bottom: 2px solid ${
|
|
10071
|
+
border-bottom: 2px solid ${C} !important;
|
|
10072
10072
|
}
|
|
10073
10073
|
`
|
|
10074
10074
|
};
|
|
10075
|
-
}, [t.colorSettings]), d = ((f = (g = r == null ? void 0 : r.data.current) == null ? void 0 : g.sortable.index) != null ? f : -1) >
|
|
10075
|
+
}, [t.colorSettings]), d = ((f = (g = r == null ? void 0 : r.data.current) == null ? void 0 : g.sortable.index) != null ? f : -1) > i ? u.topActiveClass : u.bottomActiveClass;
|
|
10076
10076
|
return /* @__PURE__ */ jsx(
|
|
10077
10077
|
"tr",
|
|
10078
10078
|
P(x({
|
|
10079
|
-
ref: (
|
|
10080
|
-
(r == null ? void 0 : r.id) !== n && o(
|
|
10079
|
+
ref: (C) => {
|
|
10080
|
+
(r == null ? void 0 : r.id) !== n && o(C);
|
|
10081
10081
|
}
|
|
10082
|
-
},
|
|
10083
|
-
className: cls(e.className, { [d]: r &&
|
|
10082
|
+
}, l), {
|
|
10083
|
+
className: cls(e.className, { [d]: r && c })
|
|
10084
10084
|
})
|
|
10085
10085
|
);
|
|
10086
10086
|
}, SortHandle$2 = (e) => {
|
|
@@ -10340,8 +10340,8 @@ InternalNocoBaseTable$1.displayName = "InternalNocoBaseTable";
|
|
|
10340
10340
|
const Table$2 = withDynamicSchemaProps(
|
|
10341
10341
|
withSkeletonComponent(
|
|
10342
10342
|
observer$1((e) => {
|
|
10343
|
-
var
|
|
10344
|
-
const { token: t } = useToken$1(),
|
|
10343
|
+
var Se, se;
|
|
10344
|
+
const { token: t } = useToken$1(), he = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = he, r = W(he, ["pagination", "useProps"]), de = (o == null ? void 0 : o()) || {}, { pagination: a } = de, i = W(de, ["pagination"]), be = x(x({}, r), i), {
|
|
10345
10345
|
dragSort: l = !1,
|
|
10346
10346
|
showIndex: c = !0,
|
|
10347
10347
|
onRowSelectionChange: u,
|
|
@@ -10353,7 +10353,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10353
10353
|
loading: f,
|
|
10354
10354
|
onClickRow: C,
|
|
10355
10355
|
value: b
|
|
10356
|
-
} =
|
|
10356
|
+
} = be, y = W(be, [
|
|
10357
10357
|
"dragSort",
|
|
10358
10358
|
"showIndex",
|
|
10359
10359
|
"onRowSelectionChange",
|
|
@@ -10365,188 +10365,188 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10365
10365
|
"loading",
|
|
10366
10366
|
"onClickRow",
|
|
10367
10367
|
"value"
|
|
10368
|
-
]), S = useArrayField$1(y), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((
|
|
10369
|
-
})), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(y, j), [L, $] = useState(() => D ? B : []), [k, M] = useState(((
|
|
10368
|
+
]), S = useArrayField$1(y), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((Se = v == null ? void 0 : v.parent) == null ? void 0 : Se["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, O = useMemoizedFn(y.onRowDragEnd || (() => {
|
|
10369
|
+
})), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(y, j), [L, $] = useState(() => D ? B : []), [k, M] = useState(((se = S == null ? void 0 : S.data) == null ? void 0 : se.selectedRowKeys) || []), [V, E] = useState([]), z = (p == null ? void 0 : p.type) !== "none", H = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
10370
10370
|
& > td {
|
|
10371
10371
|
background-color: ${t.controlItemBgActive} !important;
|
|
10372
10372
|
}
|
|
10373
10373
|
&:hover > td {
|
|
10374
10374
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
10375
10375
|
}
|
|
10376
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useTableBlockContextBasicValue();
|
|
10377
|
-
useEffect(() => {
|
|
10378
|
-
var
|
|
10379
|
-
G != null && G.field && (G.field.data = ((
|
|
10376
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useTableBlockContextBasicValue(), Y = useRef(b);
|
|
10377
|
+
Y.current = b, useEffect(() => {
|
|
10378
|
+
var te;
|
|
10379
|
+
G != null && G.field && (G.field.data = ((te = G.field) == null ? void 0 : te.data) || {}, G.field.data.clearSelectedRowKeys = () => {
|
|
10380
10380
|
G.field.data.selectedRowKeys = [], M([]);
|
|
10381
10381
|
}, G.field.data.setSelectedRowKeys = M);
|
|
10382
10382
|
}, [G == null ? void 0 : G.field]);
|
|
10383
|
-
const
|
|
10384
|
-
onClick: (
|
|
10385
|
-
isPortalInBody(
|
|
10383
|
+
const J = useMemo(() => C ? U : "", [U, C]), K = useMemo(() => C ? (te, oe) => ({
|
|
10384
|
+
onClick: (ae) => {
|
|
10385
|
+
isPortalInBody(ae.target) || C(te, E, V);
|
|
10386
10386
|
},
|
|
10387
10387
|
rowIndex: oe,
|
|
10388
|
-
record:
|
|
10389
|
-
}) : (
|
|
10388
|
+
record: te
|
|
10389
|
+
}) : (te, oe) => ({
|
|
10390
10390
|
rowIndex: oe,
|
|
10391
|
-
record:
|
|
10391
|
+
record: te
|
|
10392
10392
|
}), [C, V]);
|
|
10393
10393
|
useDeepCompareEffect(() => {
|
|
10394
|
-
const
|
|
10395
|
-
_.isEqual(
|
|
10394
|
+
const te = D ? B : [];
|
|
10395
|
+
_.isEqual(te, L) || $(te);
|
|
10396
10396
|
}, [D, B]);
|
|
10397
|
-
const
|
|
10397
|
+
const X = useCallback((te) => {
|
|
10398
10398
|
if (m)
|
|
10399
|
-
return
|
|
10400
|
-
if (
|
|
10401
|
-
return
|
|
10402
|
-
if (H.current.has(
|
|
10403
|
-
return H.current.get(
|
|
10399
|
+
return Z(te);
|
|
10400
|
+
if (te.key)
|
|
10401
|
+
return te.key;
|
|
10402
|
+
if (H.current.has(te))
|
|
10403
|
+
return H.current.get(te);
|
|
10404
10404
|
const oe = uid();
|
|
10405
|
-
return H.current.set(
|
|
10406
|
-
}, []),
|
|
10407
|
-
(
|
|
10405
|
+
return H.current.set(te, oe), oe;
|
|
10406
|
+
}, []), Z = useCallback(
|
|
10407
|
+
(te) => {
|
|
10408
10408
|
var oe;
|
|
10409
|
-
return Array.isArray(m) ? m.map((
|
|
10410
|
-
var
|
|
10411
|
-
return ((
|
|
10412
|
-
}).join("-") : typeof m == "string" ?
|
|
10409
|
+
return Array.isArray(m) ? m.map((ae) => {
|
|
10410
|
+
var le;
|
|
10411
|
+
return ((le = te[ae]) == null ? void 0 : le.toString()) || "";
|
|
10412
|
+
}).join("-") : typeof m == "string" ? te[m] : (oe = (m != null ? m : X)(te)) == null ? void 0 : oe.toString();
|
|
10413
10413
|
},
|
|
10414
|
-
[JSON.stringify(m),
|
|
10415
|
-
),
|
|
10416
|
-
const oe = useCallback((
|
|
10417
|
-
var
|
|
10418
|
-
if (!
|
|
10414
|
+
[JSON.stringify(m), X]
|
|
10415
|
+
), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ee = useMemo(() => (te) => {
|
|
10416
|
+
const oe = useCallback((ae) => {
|
|
10417
|
+
var ve, Pe, Fe, Ie, Ae, De, je, Me;
|
|
10418
|
+
if (!ae.active || !ae.over) {
|
|
10419
10419
|
console.warn("move cancel");
|
|
10420
10420
|
return;
|
|
10421
10421
|
}
|
|
10422
|
-
const
|
|
10423
|
-
S.move(
|
|
10422
|
+
const le = (Fe = (Pe = (ve = ae.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, ue = (De = (Ae = (Ie = ae.over) == null ? void 0 : Ie.data.current) == null ? void 0 : Ae.sortable) == null ? void 0 : De.index, ye = ((je = Y.current) == null ? void 0 : je[le]) || ae.active, ke = ((Me = Y.current) == null ? void 0 : Me[ue]) || ae.over;
|
|
10423
|
+
S.move(le, ue), O({ from: ye, to: ke });
|
|
10424
10424
|
}, []);
|
|
10425
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({},
|
|
10425
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, te)) });
|
|
10426
10426
|
}, [S, O]);
|
|
10427
|
-
|
|
10428
|
-
const
|
|
10427
|
+
ee.displayName = "BodyWrapperComponent";
|
|
10428
|
+
const ne = useMemo(() => ({
|
|
10429
10429
|
header: {
|
|
10430
10430
|
wrapper: HeaderWrapperComponent$1,
|
|
10431
10431
|
cell: HeaderCellComponent$1
|
|
10432
10432
|
},
|
|
10433
10433
|
body: {
|
|
10434
|
-
wrapper:
|
|
10434
|
+
wrapper: ee,
|
|
10435
10435
|
row: BodyRowComponent$1,
|
|
10436
10436
|
cell: BodyCellComponent$1
|
|
10437
10437
|
}
|
|
10438
|
-
}), [
|
|
10438
|
+
}), [ee]), re = useMemo(() => p, [JSON.stringify(p)]), ie = useMemo(
|
|
10439
10439
|
() => ({
|
|
10440
|
-
rowSelection: N !== !1 &&
|
|
10440
|
+
rowSelection: N !== !1 && re ? x({
|
|
10441
10441
|
type: "checkbox",
|
|
10442
10442
|
selectedRowKeys: k,
|
|
10443
|
-
onChange(
|
|
10444
|
-
S.data = S.data || {}, S.data.selectedRowKeys =
|
|
10443
|
+
onChange(te, oe) {
|
|
10444
|
+
S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = oe, M(te), u == null || u(te, oe, M);
|
|
10445
10445
|
},
|
|
10446
|
-
onSelect: (
|
|
10447
|
-
var
|
|
10448
|
-
G && (G.field.data = ((
|
|
10446
|
+
onSelect: (te, oe, ae, le) => {
|
|
10447
|
+
var ue;
|
|
10448
|
+
G && (G.field.data = ((ue = G.field) == null ? void 0 : ue.data) || {}, G.field.data.selectedRecord = te, G.field.data.selected = oe);
|
|
10449
10449
|
},
|
|
10450
|
-
getCheckboxProps(
|
|
10450
|
+
getCheckboxProps(te) {
|
|
10451
10451
|
return {
|
|
10452
10452
|
"aria-label": "checkbox"
|
|
10453
10453
|
};
|
|
10454
10454
|
},
|
|
10455
|
-
renderCell: (
|
|
10455
|
+
renderCell: (te, oe, ae, le) => {
|
|
10456
10456
|
if (!l && !c)
|
|
10457
|
-
return
|
|
10458
|
-
const
|
|
10459
|
-
return
|
|
10457
|
+
return le;
|
|
10458
|
+
const ue = j == null ? void 0 : j.current, ye = (j == null ? void 0 : j.pageSize) || 20;
|
|
10459
|
+
return ue ? ae = ae + (ue - 1) * ye + 1 : ae = ae + 1, oe.__index && (ae = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
|
|
10460
10460
|
"div",
|
|
10461
10461
|
{
|
|
10462
10462
|
role: "button",
|
|
10463
|
-
"aria-label": `table-index-${
|
|
10464
|
-
className: cls(
|
|
10463
|
+
"aria-label": `table-index-${ae}`,
|
|
10464
|
+
className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10465
10465
|
[rowSelectCheckboxWrapperClassHover$1]: z
|
|
10466
10466
|
}),
|
|
10467
10467
|
children: [
|
|
10468
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
10469
|
-
l && /* @__PURE__ */ jsx(SortHandle$2, { id:
|
|
10470
|
-
c && /* @__PURE__ */ jsx(TableIndex$3, { index:
|
|
10468
|
+
/* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10469
|
+
l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
|
|
10470
|
+
c && /* @__PURE__ */ jsx(TableIndex$3, { index: ae })
|
|
10471
10471
|
] }),
|
|
10472
10472
|
z && /* @__PURE__ */ jsx(
|
|
10473
10473
|
"div",
|
|
10474
10474
|
{
|
|
10475
10475
|
className: cls(
|
|
10476
10476
|
"nb-origin-node",
|
|
10477
|
-
|
|
10477
|
+
te ? "checked" : null,
|
|
10478
10478
|
rowSelectCheckboxCheckedClassHover$1
|
|
10479
10479
|
),
|
|
10480
|
-
children:
|
|
10480
|
+
children: le
|
|
10481
10481
|
}
|
|
10482
10482
|
)
|
|
10483
10483
|
]
|
|
10484
10484
|
}
|
|
10485
10485
|
);
|
|
10486
10486
|
}
|
|
10487
|
-
},
|
|
10487
|
+
}, re) : void 0
|
|
10488
10488
|
}),
|
|
10489
10489
|
[
|
|
10490
|
-
|
|
10490
|
+
re,
|
|
10491
10491
|
k,
|
|
10492
10492
|
u,
|
|
10493
10493
|
c,
|
|
10494
10494
|
l,
|
|
10495
10495
|
S,
|
|
10496
|
-
|
|
10496
|
+
Z,
|
|
10497
10497
|
z,
|
|
10498
|
-
|
|
10498
|
+
re,
|
|
10499
10499
|
j,
|
|
10500
10500
|
G,
|
|
10501
10501
|
N
|
|
10502
10502
|
]
|
|
10503
|
-
),
|
|
10504
|
-
({ children:
|
|
10505
|
-
var oe;
|
|
10503
|
+
), pe = useCallback(
|
|
10504
|
+
({ children: te }) => {
|
|
10505
|
+
var oe, ae;
|
|
10506
10506
|
return l ? React.createElement(
|
|
10507
10507
|
SortableContext$1,
|
|
10508
10508
|
{
|
|
10509
|
-
items: ((oe =
|
|
10509
|
+
items: ((ae = (oe = Y.current) == null ? void 0 : oe.map) == null ? void 0 : ae.call(oe, Z)) || []
|
|
10510
10510
|
},
|
|
10511
|
-
|
|
10512
|
-
) : React.createElement(React.Fragment, {},
|
|
10511
|
+
te
|
|
10512
|
+
) : React.createElement(React.Fragment, {}, te);
|
|
10513
10513
|
},
|
|
10514
|
-
[l,
|
|
10514
|
+
[l, Z]
|
|
10515
10515
|
// Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
|
|
10516
|
-
), { height:
|
|
10516
|
+
), { height: ce, tableSizeRefCallback: fe } = useTableSize(), ge = useMemo(() => ({
|
|
10517
10517
|
x: "max-content",
|
|
10518
|
-
y:
|
|
10519
|
-
}), [
|
|
10520
|
-
(
|
|
10521
|
-
[V,
|
|
10522
|
-
),
|
|
10523
|
-
(
|
|
10524
|
-
const
|
|
10525
|
-
$(
|
|
10518
|
+
y: ce
|
|
10519
|
+
}), [ce, Q]), Ce = useCallback(
|
|
10520
|
+
(te) => V.includes(te[m]) ? J : "",
|
|
10521
|
+
[V, J, JSON.stringify(m)]
|
|
10522
|
+
), me = useCallback(
|
|
10523
|
+
(te, oe) => {
|
|
10524
|
+
const ae = te ? [...L, oe[F.getPrimaryKey()]] : L.filter((le) => oe[F.getPrimaryKey()] !== le);
|
|
10525
|
+
$(ae), g == null || g(te, oe);
|
|
10526
10526
|
},
|
|
10527
10527
|
[L, g, F]
|
|
10528
10528
|
), xe = useMemo(() => ({
|
|
10529
|
-
onExpand:
|
|
10529
|
+
onExpand: me,
|
|
10530
10530
|
expandedRowKeys: L
|
|
10531
|
-
}), [L,
|
|
10531
|
+
}), [L, me]);
|
|
10532
10532
|
return (
|
|
10533
10533
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10534
10534
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
10535
10535
|
/* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
|
|
10536
10536
|
InternalNocoBaseTable$1,
|
|
10537
10537
|
P(x(x({
|
|
10538
|
-
tableHeight:
|
|
10539
|
-
SortableWrapper:
|
|
10540
|
-
tableSizeRefCallback:
|
|
10541
|
-
defaultRowKey:
|
|
10542
|
-
dataSource:
|
|
10543
|
-
}, y),
|
|
10538
|
+
tableHeight: ce,
|
|
10539
|
+
SortableWrapper: pe,
|
|
10540
|
+
tableSizeRefCallback: fe,
|
|
10541
|
+
defaultRowKey: X,
|
|
10542
|
+
dataSource: Q
|
|
10543
|
+
}, y), ie), {
|
|
10544
10544
|
paginationProps: j,
|
|
10545
|
-
components:
|
|
10545
|
+
components: ne,
|
|
10546
10546
|
onTableChange: d,
|
|
10547
|
-
onRow:
|
|
10548
|
-
rowClassName:
|
|
10549
|
-
scroll:
|
|
10547
|
+
onRow: K,
|
|
10548
|
+
rowClassName: Ce,
|
|
10549
|
+
scroll: ge,
|
|
10550
10550
|
columns: w,
|
|
10551
10551
|
expandable: xe,
|
|
10552
10552
|
field: S,
|
|
@@ -10782,7 +10782,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10782
10782
|
[t, p]
|
|
10783
10783
|
), F = useCallback(
|
|
10784
10784
|
(w, L, $, k) => {
|
|
10785
|
-
var
|
|
10785
|
+
var Z;
|
|
10786
10786
|
const {
|
|
10787
10787
|
association: M = !1,
|
|
10788
10788
|
cached: V = {},
|
|
@@ -10799,21 +10799,21 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10799
10799
|
if (V[w])
|
|
10800
10800
|
return _.cloneDeep(V[w]);
|
|
10801
10801
|
L && typeof L == "string" && (L = [L]), $ && typeof $ == "string" && ($ = [$]);
|
|
10802
|
-
const K = b(w, J), X = (
|
|
10802
|
+
const K = b(w, J), X = (Z = K == null ? void 0 : K.filter(
|
|
10803
10803
|
(Q) => Q.interface && !U.includes(Q.interface) && (H || L && L.includes(Q.type) || $ && $.includes(Q.interface) || (M && Q.target && Q.target !== w && Array.isArray(M) ? M.includes(Q.interface) : !1))
|
|
10804
|
-
)) == null ? void 0 :
|
|
10805
|
-
var ne,
|
|
10806
|
-
const
|
|
10804
|
+
)) == null ? void 0 : Z.map((Q) => {
|
|
10805
|
+
var ne, re;
|
|
10806
|
+
const ee = x({
|
|
10807
10807
|
value: Y && G ? `${G}.${Q.name}` : Q.name,
|
|
10808
10808
|
label: f((ne = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : ne.title) || Q.name
|
|
10809
10809
|
}, Q);
|
|
10810
|
-
return M && Q.target && (
|
|
10810
|
+
return M && Q.target && (ee.children = E.includes(Q.target) ? [] : F(Q.target, L, $, P(x({}, k), {
|
|
10811
10811
|
cached: V,
|
|
10812
10812
|
dataSource: J,
|
|
10813
10813
|
collectionNames: [...E, Q.target],
|
|
10814
10814
|
prefixFieldValue: Y ? G ? `${G}.${Q.name}` : Q.name : "",
|
|
10815
10815
|
usePrefix: Y
|
|
10816
|
-
})), !((
|
|
10816
|
+
})), !((re = ee.children) != null && re.length)) ? null : ee;
|
|
10817
10817
|
}).filter(Boolean);
|
|
10818
10818
|
return V[w] = X, X;
|
|
10819
10819
|
},
|
|
@@ -15473,14 +15473,14 @@ const useGetFilterOptions = () => {
|
|
|
15473
15473
|
options: m,
|
|
15474
15474
|
value: p == null ? void 0 : p.label,
|
|
15475
15475
|
onChange: (U) => {
|
|
15476
|
-
var J, K, X,
|
|
15476
|
+
var J, K, X, Z, Q;
|
|
15477
15477
|
const G = P(x(x({}, (K = (J = o == null ? void 0 : o.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : K.fieldNames), (X = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : X.fieldNames), {
|
|
15478
15478
|
label: U
|
|
15479
15479
|
});
|
|
15480
15480
|
_.set(n, "x-component-props.fieldNames", G);
|
|
15481
|
-
const Y = (Q = l.path) == null ? void 0 : Q.splice(((
|
|
15482
|
-
l.form.query(`${Y.concat("*." + n.name)}`).forEach((
|
|
15483
|
-
|
|
15481
|
+
const Y = (Q = l.path) == null ? void 0 : Q.splice(((Z = l.path) == null ? void 0 : Z.length) - 1, 1);
|
|
15482
|
+
l.form.query(`${Y.concat("*." + n.name)}`).forEach((ee) => {
|
|
15483
|
+
ee.componentProps.fieldNames = G;
|
|
15484
15484
|
}), d.emit("patch", {
|
|
15485
15485
|
schema: {
|
|
15486
15486
|
"x-uid": n["x-uid"],
|
|
@@ -18032,19 +18032,19 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18032
18032
|
let X = K == null ? void 0 : K.parentElement;
|
|
18033
18033
|
for (; X && X.clientHeight === 0; )
|
|
18034
18034
|
X = X.parentElement;
|
|
18035
|
-
const
|
|
18036
|
-
if (!
|
|
18035
|
+
const Z = g || X;
|
|
18036
|
+
if (!Z)
|
|
18037
18037
|
return;
|
|
18038
18038
|
function Q() {
|
|
18039
18039
|
var ne;
|
|
18040
18040
|
K && (K.classList.remove(G), (ne = e.onVisibleChange) == null || ne.call(e, !0));
|
|
18041
18041
|
}
|
|
18042
|
-
function
|
|
18042
|
+
function ee() {
|
|
18043
18043
|
var ne;
|
|
18044
18044
|
K && (K.classList.add(G), (ne = e.onVisibleChange) == null || ne.call(e, !1));
|
|
18045
18045
|
}
|
|
18046
|
-
return
|
|
18047
|
-
|
|
18046
|
+
return Z.addEventListener("mouseenter", Q), Z.addEventListener("mouseleave", ee), () => {
|
|
18047
|
+
Z.removeEventListener("mouseenter", Q), Z.removeEventListener("mouseleave", ee);
|
|
18048
18048
|
};
|
|
18049
18049
|
}, [e.onVisibleChange, g]);
|
|
18050
18050
|
const Y = useMemo(
|
|
@@ -23317,7 +23317,7 @@ function getTypedConstantOption(e, t, n) {
|
|
|
23317
23317
|
};
|
|
23318
23318
|
}
|
|
23319
23319
|
function Input$1(e) {
|
|
23320
|
-
var K, X,
|
|
23320
|
+
var K, X, Z;
|
|
23321
23321
|
const J = e, {
|
|
23322
23322
|
value: t = "",
|
|
23323
23323
|
onChange: n,
|
|
@@ -23362,10 +23362,10 @@ function Input$1(e) {
|
|
|
23362
23362
|
label: I("Constant"),
|
|
23363
23363
|
[k.value]: "$",
|
|
23364
23364
|
[k.label]: I("Constant")
|
|
23365
|
-
} : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), V = (K = M == null ? void 0 : M.component) != null ? K : NullComponent, E = Array.isArray(a) ? (
|
|
23365
|
+
} : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), V = (K = M == null ? void 0 : M.component) != null ? K : NullComponent, E = Array.isArray(a) ? (Z = (X = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : X[1]) != null ? Z : {} : {};
|
|
23366
23366
|
let z;
|
|
23367
23367
|
t == null ? i ? o && N ? z = ["$"] : z = [""] : o ? z = ["$"] : z = [" ", L] : z = o ? ["$"] : [" ", L], m && (z = ["$"]), useEffect(() => {
|
|
23368
|
-
const
|
|
23368
|
+
const re = M != null ? M : {}, { component: Q } = re, ee = W(re, ["component"]), ne = [
|
|
23369
23369
|
...i ? [
|
|
23370
23370
|
{
|
|
23371
23371
|
value: "",
|
|
@@ -23374,30 +23374,30 @@ function Input$1(e) {
|
|
|
23374
23374
|
[k.label]: I("Null")
|
|
23375
23375
|
}
|
|
23376
23376
|
] : [],
|
|
23377
|
-
...M ? [v(
|
|
23377
|
+
...M ? [v(ee)] : [],
|
|
23378
23378
|
...f ? [...f] : []
|
|
23379
|
-
].filter((
|
|
23379
|
+
].filter((ie) => !ie.deprecated || ($ == null ? void 0 : $[0]) === ie[k.value]);
|
|
23380
23380
|
T(ne);
|
|
23381
23381
|
}, [f, $, M, i]);
|
|
23382
23382
|
const H = (Q) => q(this, null, function* () {
|
|
23383
23383
|
var ne;
|
|
23384
|
-
const
|
|
23385
|
-
if (!((ne =
|
|
23386
|
-
let
|
|
23384
|
+
const ee = Q[Q.length - 1];
|
|
23385
|
+
if (!((ne = ee.children) != null && ne.length) && !ee.isLeaf && ee.loadChildren) {
|
|
23386
|
+
let re;
|
|
23387
23387
|
if ($ && $.length >= 2) {
|
|
23388
|
-
for (const
|
|
23389
|
-
if (
|
|
23390
|
-
|
|
23388
|
+
for (const ie of $)
|
|
23389
|
+
if (ie === ee[k.value]) {
|
|
23390
|
+
re = ie;
|
|
23391
23391
|
break;
|
|
23392
23392
|
}
|
|
23393
23393
|
}
|
|
23394
|
-
yield
|
|
23394
|
+
yield ee.loadChildren(ee, re, $), T((ie) => [...ie]);
|
|
23395
23395
|
}
|
|
23396
23396
|
}), U = useCallback(
|
|
23397
|
-
(Q,
|
|
23398
|
-
var ne,
|
|
23397
|
+
(Q, ee) => {
|
|
23398
|
+
var ne, re, ie;
|
|
23399
23399
|
if (Q[0] === "$") {
|
|
23400
|
-
O(!0), $ && n(null,
|
|
23400
|
+
O(!0), $ && n(null, ee);
|
|
23401
23401
|
return;
|
|
23402
23402
|
} else
|
|
23403
23403
|
O(!1);
|
|
@@ -23406,35 +23406,35 @@ function Input$1(e) {
|
|
|
23406
23406
|
return;
|
|
23407
23407
|
}
|
|
23408
23408
|
if (Q[0] === " ") {
|
|
23409
|
-
Q[1] ? Q[1] !== L && n((
|
|
23409
|
+
Q[1] ? Q[1] !== L && n((ie = (re = (ne = ConstantTypes[Q[1]]) == null ? void 0 : ne.default) == null ? void 0 : re.call(ne)) != null ? ie : null, ee) : $ && n(null, ee);
|
|
23410
23410
|
return;
|
|
23411
23411
|
}
|
|
23412
|
-
n(`{{${Q.join(".")}}}`,
|
|
23412
|
+
n(`{{${Q.join(".")}}}`, ee);
|
|
23413
23413
|
},
|
|
23414
23414
|
[L, $, n]
|
|
23415
23415
|
), G = useCallback(() => {
|
|
23416
23416
|
var Q;
|
|
23417
23417
|
if (O(!!o), (Q = M == null ? void 0 : M.children) != null && Q.length) {
|
|
23418
|
-
const
|
|
23419
|
-
return n(
|
|
23418
|
+
const ee = M.children[0].default();
|
|
23419
|
+
return n(ee);
|
|
23420
23420
|
}
|
|
23421
23421
|
n(null);
|
|
23422
23422
|
}, [M]);
|
|
23423
23423
|
useEffect(() => {
|
|
23424
23424
|
q(this, null, function* () {
|
|
23425
|
-
var
|
|
23425
|
+
var re;
|
|
23426
23426
|
if (!$ || R.length <= 1)
|
|
23427
23427
|
return;
|
|
23428
|
-
let
|
|
23428
|
+
let ee = null;
|
|
23429
23429
|
const ne = [];
|
|
23430
|
-
for (let
|
|
23431
|
-
const
|
|
23430
|
+
for (let ie = 0; ie < $.length; ie++) {
|
|
23431
|
+
const pe = $[ie];
|
|
23432
23432
|
try {
|
|
23433
|
-
if (
|
|
23433
|
+
if (ie === 0 ? ee = R.find((ce) => ce[k.value] === pe) : (ee.loadChildren && !((re = ee.children) != null && re.length) && (yield ee.loadChildren(ee, pe, $)), ee = ee.children.find((ce) => ce[k.value] === pe)), !ee)
|
|
23434
23434
|
return;
|
|
23435
|
-
ne.push(
|
|
23436
|
-
} catch (
|
|
23437
|
-
error(
|
|
23435
|
+
ne.push(ee[k.label]);
|
|
23436
|
+
} catch (ce) {
|
|
23437
|
+
error(ce);
|
|
23438
23438
|
}
|
|
23439
23439
|
}
|
|
23440
23440
|
T([...R]), B([...ne]);
|
|
@@ -23482,8 +23482,8 @@ function Input$1(e) {
|
|
|
23482
23482
|
"aria-label": "variable-tag",
|
|
23483
23483
|
style: { overflow: "hidden" },
|
|
23484
23484
|
className: cx("ant-input ant-input-outlined", { "ant-input-disabled": Y }, b),
|
|
23485
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((Q,
|
|
23486
|
-
|
|
23485
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((Q, ee) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
23486
|
+
ee ? " / " : "",
|
|
23487
23487
|
Q
|
|
23488
23488
|
] }, Q)) })
|
|
23489
23489
|
}
|
|
@@ -25298,6 +25298,10 @@ const LayoutContent = () => {
|
|
|
25298
25298
|
onCollapse: y,
|
|
25299
25299
|
collapsed: l,
|
|
25300
25300
|
onPageChange: S,
|
|
25301
|
+
menu: {
|
|
25302
|
+
// 1.x 暂默认禁用菜单手风琴效果,2.x 支持配置
|
|
25303
|
+
autoClose: !1
|
|
25304
|
+
},
|
|
25301
25305
|
menuProps: v,
|
|
25302
25306
|
children: /* @__PURE__ */ jsx(RouteContext.Consumer, { children: (I) => {
|
|
25303
25307
|
const { isMobile: F } = I;
|
|
@@ -26941,21 +26945,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26941
26945
|
}
|
|
26942
26946
|
}
|
|
26943
26947
|
function b(k, M, V) {
|
|
26944
|
-
var E, z, H, U, G, Y, J, K, X,
|
|
26945
|
-
if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && ne && (
|
|
26948
|
+
var E, z, H, U, G, Y, J, K, X, Z, Q, ee, ne = M && M.split("/"), re = i.map, ie = re && re["*"];
|
|
26949
|
+
if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && ne && (ee = ne.slice(0, ne.length - 1), k = ee.concat(k)), C(k), k = k.join("/")), V && re && (ne || ie)) {
|
|
26946
26950
|
H = k.split("/");
|
|
26947
26951
|
e:
|
|
26948
26952
|
for (U = H.length; U > 0; U -= 1) {
|
|
26949
26953
|
if (Y = H.slice(0, U).join("/"), ne) {
|
|
26950
26954
|
for (G = ne.length; G > 0; G -= 1)
|
|
26951
|
-
if (z = getOwn(
|
|
26955
|
+
if (z = getOwn(re, ne.slice(0, G).join("/")), z && (z = getOwn(z, Y), z)) {
|
|
26952
26956
|
K = z, X = U;
|
|
26953
26957
|
break e;
|
|
26954
26958
|
}
|
|
26955
26959
|
}
|
|
26956
|
-
!
|
|
26960
|
+
!Z && ie && getOwn(ie, Y) && (Z = getOwn(ie, Y), Q = U);
|
|
26957
26961
|
}
|
|
26958
|
-
!K &&
|
|
26962
|
+
!K && Z && (K = Z, X = Q), K && (H.splice(0, X, K), k = H.join("/"));
|
|
26959
26963
|
}
|
|
26960
26964
|
return E = getOwn(i.pkgs, k), E || k;
|
|
26961
26965
|
}
|
|
@@ -26977,18 +26981,18 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26977
26981
|
return V > -1 && (M = k.substring(0, V), k = k.substring(V + 1, k.length)), [M, k];
|
|
26978
26982
|
}
|
|
26979
26983
|
function I(k, M, V, E) {
|
|
26980
|
-
var z, H, U, G, Y = null, J = M ? M.name : null, K = k, X = !0,
|
|
26981
|
-
return k || (X = !1, k = "_@r" + (g += 1)), G = v(k), Y = G[0], k = G[1], Y && (Y = b(Y, J, E), H = getOwn(p, Y)), k && (Y ? V ?
|
|
26984
|
+
var z, H, U, G, Y = null, J = M ? M.name : null, K = k, X = !0, Z = "";
|
|
26985
|
+
return k || (X = !1, k = "_@r" + (g += 1)), G = v(k), Y = G[0], k = G[1], Y && (Y = b(Y, J, E), H = getOwn(p, Y)), k && (Y ? V ? Z = k : H && H.normalize ? Z = H.normalize(k, function(Q) {
|
|
26982
26986
|
return b(Q, J, E);
|
|
26983
|
-
}) :
|
|
26987
|
+
}) : Z = k.indexOf("!") === -1 ? b(k, J, E) : k : (Z = b(k, J, E), G = v(Z), Y = G[0], Z = G[1], V = !0, z = o.nameToUrl(Z))), U = Y && !H && !V ? "_unnormalized" + (f += 1) : "", {
|
|
26984
26988
|
prefix: Y,
|
|
26985
|
-
name:
|
|
26989
|
+
name: Z,
|
|
26986
26990
|
parentMap: M,
|
|
26987
26991
|
unnormalized: !!U,
|
|
26988
26992
|
url: z,
|
|
26989
26993
|
originalName: K,
|
|
26990
26994
|
isDefine: X,
|
|
26991
|
-
id: (Y ? Y + "!" +
|
|
26995
|
+
id: (Y ? Y + "!" + Z : Z) + U
|
|
26992
26996
|
};
|
|
26993
26997
|
}
|
|
26994
26998
|
function F(k) {
|
|
@@ -27168,23 +27172,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27168
27172
|
enabled: !0
|
|
27169
27173
|
});
|
|
27170
27174
|
}), z.error = bind(this, function(X) {
|
|
27171
|
-
this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(
|
|
27172
|
-
|
|
27175
|
+
this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(Z) {
|
|
27176
|
+
Z.map.id.indexOf(M + "_unnormalized") === 0 && B(Z.map.id);
|
|
27173
27177
|
}), T(X);
|
|
27174
|
-
}), z.fromText = bind(this, function(X,
|
|
27175
|
-
var Q = k.name,
|
|
27176
|
-
|
|
27178
|
+
}), z.fromText = bind(this, function(X, Z) {
|
|
27179
|
+
var Q = k.name, ee = I(Q), ne = useInteractive;
|
|
27180
|
+
Z && (X = Z), ne && (useInteractive = !1), F(ee), hasProp(i.config, M) && (i.config[Q] = i.config[M]);
|
|
27177
27181
|
try {
|
|
27178
27182
|
req.exec(X);
|
|
27179
|
-
} catch (
|
|
27183
|
+
} catch (re) {
|
|
27180
27184
|
return T(makeError(
|
|
27181
27185
|
"fromtexteval",
|
|
27182
|
-
"fromText eval for " + M + " failed: " +
|
|
27183
|
-
|
|
27186
|
+
"fromText eval for " + M + " failed: " + re,
|
|
27187
|
+
re,
|
|
27184
27188
|
[M]
|
|
27185
27189
|
));
|
|
27186
27190
|
}
|
|
27187
|
-
ne && (useInteractive = !0), this.depMaps.push(
|
|
27191
|
+
ne && (useInteractive = !0), this.depMaps.push(ee), o.completeLoad(Q), K([Q], z);
|
|
27188
27192
|
}), E.load(k.name, K, z, i);
|
|
27189
27193
|
})), o.enable(V, this), this.pluginMaps[V.id] = V;
|
|
27190
27194
|
},
|
|
@@ -31593,7 +31597,7 @@ const useParseDefaultValue = () => {
|
|
|
31593
31597
|
const j = transformVariableValue(B, {
|
|
31594
31598
|
targetCollectionField: D
|
|
31595
31599
|
});
|
|
31596
|
-
j == null || j === "" ? e.mounted &&
|
|
31600
|
+
j == null || j === "" ? e.mounted && e.setInitialValue(null) : p() ? h === 0 && m(j) : e.setInitialValue(j), e.loading = !1;
|
|
31597
31601
|
} else
|
|
31598
31602
|
!/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
|
|
31599
31603
|
}), v = _.debounce(S, DEBOUNCE_WAIT);
|
|
@@ -39770,14 +39774,14 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39770
39774
|
const K = uid(), X = [];
|
|
39771
39775
|
return setTimeout(() => {
|
|
39772
39776
|
H.addEffects(K, () => {
|
|
39773
|
-
forEachLinkageRule(B, (
|
|
39777
|
+
forEachLinkageRule(B, (Z, Q) => {
|
|
39774
39778
|
X.push(
|
|
39775
39779
|
reaction(
|
|
39776
|
-
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: w })].map((
|
|
39780
|
+
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: w })].map((re) => JSON.stringify(re)).join(","),
|
|
39777
39781
|
() => {
|
|
39778
39782
|
I.stateOfLinkageRules = {}, linkageAction(
|
|
39779
39783
|
{
|
|
39780
|
-
operator:
|
|
39784
|
+
operator: Z.operator,
|
|
39781
39785
|
field: I,
|
|
39782
39786
|
condition: Q.condition,
|
|
39783
39787
|
variables: j,
|
|
@@ -39794,8 +39798,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39794
39798
|
});
|
|
39795
39799
|
});
|
|
39796
39800
|
}), () => {
|
|
39797
|
-
H.removeEffects(K), X.forEach((
|
|
39798
|
-
|
|
39801
|
+
H.removeEffects(K), X.forEach((Z) => {
|
|
39802
|
+
Z();
|
|
39799
39803
|
});
|
|
39800
39804
|
};
|
|
39801
39805
|
}, [B, T]);
|
|
@@ -39805,16 +39809,16 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39805
39809
|
},
|
|
39806
39810
|
[C]
|
|
39807
39811
|
), G = useMemo(() => c && ((K, X) => q(void 0, null, function* () {
|
|
39808
|
-
var Q,
|
|
39812
|
+
var Q, ee;
|
|
39809
39813
|
yield c == null ? void 0 : c(K, X);
|
|
39810
|
-
const
|
|
39811
|
-
|
|
39812
|
-
var
|
|
39813
|
-
if (
|
|
39814
|
+
const Z = ((ee = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ee.blocksToRefresh) || [];
|
|
39815
|
+
Z.length > 0 && z().forEach((ne) => {
|
|
39816
|
+
var re;
|
|
39817
|
+
if (Z.includes(ne.uid))
|
|
39814
39818
|
try {
|
|
39815
|
-
(
|
|
39816
|
-
} catch (
|
|
39817
|
-
console.error("Failed to refresh block:", ne.uid,
|
|
39819
|
+
(re = ne.service) == null || re.refresh();
|
|
39820
|
+
} catch (ie) {
|
|
39821
|
+
console.error("Failed to refresh block:", ne.uid, ie);
|
|
39818
39822
|
}
|
|
39819
39823
|
});
|
|
39820
39824
|
})), [c, F, z]);
|
|
@@ -39853,8 +39857,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39853
39857
|
}),
|
|
39854
39858
|
{ displayName: "Action" }
|
|
39855
39859
|
), InternalAction = observer$1(function e(t) {
|
|
39856
|
-
var
|
|
39857
|
-
const
|
|
39860
|
+
var ge, Ce, me, xe, he;
|
|
39861
|
+
const fe = t, {
|
|
39858
39862
|
containerRefKey: n,
|
|
39859
39863
|
fieldSchema: o,
|
|
39860
39864
|
designable: r,
|
|
@@ -39882,7 +39886,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39882
39886
|
setSubmitted: B,
|
|
39883
39887
|
getAriaLabel: N,
|
|
39884
39888
|
parentRecordData: O
|
|
39885
|
-
} =
|
|
39889
|
+
} = fe, j = W(fe, [
|
|
39886
39890
|
"containerRefKey",
|
|
39887
39891
|
"fieldSchema",
|
|
39888
39892
|
"designable",
|
|
@@ -39910,25 +39914,25 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39910
39914
|
"setSubmitted",
|
|
39911
39915
|
"getAriaLabel",
|
|
39912
39916
|
"parentRecordData"
|
|
39913
|
-
]), [w, L] = useState(!1), { wrapSSR: $, componentCls: k, hashId: M } = useStyles$8(), [V, E] = useState(!1), z = o["x-toolbar-props"] || o["x-designer-props"], H = (
|
|
39917
|
+
]), [w, L] = useState(!1), { wrapSSR: $, componentCls: k, hashId: M } = useStyles$8(), [V, E] = useState(!1), z = o["x-toolbar-props"] || o["x-designer-props"], H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.openMode, U = (Ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Ce.openSize, G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), {
|
|
39914
39918
|
run: X,
|
|
39915
|
-
element:
|
|
39919
|
+
element: Z,
|
|
39916
39920
|
disabled: Q,
|
|
39917
|
-
loading:
|
|
39918
|
-
} = (F == null ? void 0 : F(R)) || {}, ne = J.disabled || a.disabled || ((
|
|
39921
|
+
loading: ee
|
|
39922
|
+
} = (F == null ? void 0 : F(R)) || {}, ne = J.disabled || a.disabled || ((xe = a.data) == null ? void 0 : xe.disabled) || I || Q, re = useMemo(() => {
|
|
39919
39923
|
var de;
|
|
39920
39924
|
return P(x({}, v), {
|
|
39921
39925
|
opacity: r && (((de = a == null ? void 0 : a.data) == null ? void 0 : de.hidden) || !K) && 0.1,
|
|
39922
39926
|
color: ne ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
|
|
39923
39927
|
});
|
|
39924
|
-
}, [K, r, (
|
|
39928
|
+
}, [K, r, (he = a == null ? void 0 : a.data) == null ? void 0 : he.hidden, v, ne]), ie = {
|
|
39925
39929
|
designable: r,
|
|
39926
39930
|
field: a,
|
|
39927
39931
|
aclCtx: K,
|
|
39928
39932
|
icon: i,
|
|
39929
|
-
loading: typeof
|
|
39933
|
+
loading: typeof ee == "boolean" ? ee : l,
|
|
39930
39934
|
disabled: ne,
|
|
39931
|
-
buttonStyle:
|
|
39935
|
+
buttonStyle: re,
|
|
39932
39936
|
handleMouseEnter: c,
|
|
39933
39937
|
tarComponent: u,
|
|
39934
39938
|
designerProps: z,
|
|
@@ -39949,18 +39953,18 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39949
39953
|
setSubmitted: B,
|
|
39950
39954
|
confirmTitle: f,
|
|
39951
39955
|
title: S
|
|
39952
|
-
},
|
|
39956
|
+
}, pe = useCallback(
|
|
39953
39957
|
(de) => {
|
|
39954
39958
|
L == null || L(de), D == null || D(de);
|
|
39955
39959
|
},
|
|
39956
39960
|
[D]
|
|
39957
39961
|
);
|
|
39958
|
-
let
|
|
39962
|
+
let ce = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
|
|
39959
39963
|
ActionContextProvider,
|
|
39960
39964
|
{
|
|
39961
|
-
button: RenderButton(
|
|
39965
|
+
button: RenderButton(ie),
|
|
39962
39966
|
visible: w || T,
|
|
39963
|
-
setVisible:
|
|
39967
|
+
setVisible: pe,
|
|
39964
39968
|
formValueChanged: V,
|
|
39965
39969
|
setFormValueChanged: E,
|
|
39966
39970
|
openMode: H,
|
|
@@ -39970,13 +39974,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39970
39974
|
setSubmitted: B,
|
|
39971
39975
|
children: [
|
|
39972
39976
|
C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
|
|
39973
|
-
!C && /* @__PURE__ */ jsx(RenderButton, x({},
|
|
39977
|
+
!C && /* @__PURE__ */ jsx(RenderButton, x({}, ie)),
|
|
39974
39978
|
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
|
|
39975
|
-
|
|
39979
|
+
Z
|
|
39976
39980
|
]
|
|
39977
39981
|
}
|
|
39978
39982
|
) });
|
|
39979
|
-
return isBulkEditAction(o) && (
|
|
39983
|
+
return isBulkEditAction(o) && (ce = /* @__PURE__ */ jsx(TabsContextProvider, { children: ce })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: y, children: ce }) : ce);
|
|
39980
39984
|
});
|
|
39981
39985
|
InternalAction.displayName = "InternalAction";
|
|
39982
39986
|
Action.Popover = function e(t) {
|
|
@@ -40065,8 +40069,8 @@ const RenderButton = ({
|
|
|
40065
40069
|
if (!a && n) {
|
|
40066
40070
|
const K = () => {
|
|
40067
40071
|
b ? b(H, () => {
|
|
40068
|
-
var X,
|
|
40069
|
-
y !== !1 && (T == null || T(!0), (
|
|
40072
|
+
var X, Z;
|
|
40073
|
+
y !== !1 && (T == null || T(!0), (Z = (X = N()) == null ? void 0 : X.refresh) == null || Z.call(X));
|
|
40070
40074
|
}) : isBulkEditAction(S) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(S["x-action"]) && S["x-uid"] ? k.current() : (v(!0), I == null || I());
|
|
40071
40075
|
};
|
|
40072
40076
|
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (J = V == null ? void 0 : V.submit) == null ? void 0 : J.call(V), R.confirm({
|
|
@@ -40683,8 +40687,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40683
40687
|
]), b = useDataSourceKey(), y = useDataSourceHeaders(m || b), S = useRef(!1), v = useFieldSchema(), I = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), O = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
|
|
40684
40688
|
var K;
|
|
40685
40689
|
if (O != null && O.interface) {
|
|
40686
|
-
const X = D(O.interface),
|
|
40687
|
-
return O.type === "string" || O.dataType === "string" ? "$includes" :
|
|
40690
|
+
const X = D(O.interface), Z = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
40691
|
+
return O.type === "string" || O.dataType === "string" ? "$includes" : Z;
|
|
40688
40692
|
}
|
|
40689
40693
|
return "$includes";
|
|
40690
40694
|
}, [O]), w = useCompile(), L = useCallback(
|
|
@@ -40692,22 +40696,22 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40692
40696
|
try {
|
|
40693
40697
|
return K.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
|
|
40694
40698
|
var Q;
|
|
40695
|
-
let
|
|
40699
|
+
let Z = w(X[t.label]);
|
|
40696
40700
|
if ((Q = O == null ? void 0 : O.uiSchema) != null && Q.enum)
|
|
40697
|
-
if (Array.isArray(
|
|
40698
|
-
|
|
40699
|
-
const
|
|
40700
|
-
return
|
|
40701
|
+
if (Array.isArray(Z))
|
|
40702
|
+
Z = Z.map((ee, ne) => {
|
|
40703
|
+
const re = O.uiSchema.enum.find((ie) => ie.value === ee);
|
|
40704
|
+
return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || ee }, ne) : /* @__PURE__ */ jsx(Tag, { role: "button", children: ee }, ee);
|
|
40701
40705
|
}).reverse();
|
|
40702
40706
|
else {
|
|
40703
|
-
const
|
|
40704
|
-
|
|
40707
|
+
const ee = O.uiSchema.enum.find((ne) => ne.value === Z);
|
|
40708
|
+
ee && (Z = /* @__PURE__ */ jsx(Tag, { role: "button", color: ee.color, children: ee.label }));
|
|
40705
40709
|
}
|
|
40706
|
-
return (O == null ? void 0 : O.type) === "date" && (
|
|
40707
|
-
[t.label]:
|
|
40710
|
+
return (O == null ? void 0 : O.type) === "date" && (Z = dayjs(Z).format("YYYY-MM-DD")), c ? c({
|
|
40711
|
+
[t.label]: Z || EMPTY$1,
|
|
40708
40712
|
[t.value]: X[t.value]
|
|
40709
40713
|
}) : P(x({}, omit(X, "style")), {
|
|
40710
|
-
[t.label]:
|
|
40714
|
+
[t.label]: Z || EMPTY$1,
|
|
40711
40715
|
[t.value]: X[t.value]
|
|
40712
40716
|
});
|
|
40713
40717
|
}).filter(Boolean);
|
|
@@ -40767,8 +40771,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40767
40771
|
const K = r || a;
|
|
40768
40772
|
if (!((Q = $ == null ? void 0 : $.data) != null && Q.length))
|
|
40769
40773
|
return K != null ? Array.isArray(K) ? K : [K] : [];
|
|
40770
|
-
const X = K != null && (Array.isArray(K) ? K.map((
|
|
40771
|
-
return uniqBy(
|
|
40774
|
+
const X = K != null && (Array.isArray(K) ? K.map((ee) => P(x({}, ee), { [t.value]: ee[t.value] || ee })) : [P(x({}, K), { [t.value]: K[t.value] || K })]) || [], Z = typeof p == "function" ? $.data.filter(p) : $.data;
|
|
40775
|
+
return uniqBy(Z.concat(X != null ? X : []), t.value);
|
|
40772
40776
|
}, [r, a, $ == null ? void 0 : $.data, t.value, p]);
|
|
40773
40777
|
return /* @__PURE__ */ jsx(
|
|
40774
40778
|
Select,
|
|
@@ -40790,7 +40794,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40790
40794
|
options: h(L(H)),
|
|
40791
40795
|
rawOptions: H,
|
|
40792
40796
|
dropdownRender: (K) => {
|
|
40793
|
-
const X = H.some((
|
|
40797
|
+
const X = H.some((Z) => Z[t.label] === R.current);
|
|
40794
40798
|
return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
40795
40799
|
!(($ == null ? void 0 : $.data.length) === 0 && (R != null && R.current)) && K,
|
|
40796
40800
|
($ == null ? void 0 : $.data.length) > 0 && (R == null ? void 0 : R.current) && !X && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
@@ -44917,7 +44921,7 @@ const InternalNesterCardCss = css`
|
|
|
44917
44921
|
visible: p,
|
|
44918
44922
|
setVisible: m
|
|
44919
44923
|
},
|
|
44920
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: O() }, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: w, children: /* @__PURE__ */ jsx(
|
|
44924
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: O() }, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: w, components: { CollectionField: CollectionField$1 }, children: /* @__PURE__ */ jsx(
|
|
44921
44925
|
NocoBaseRecursionField,
|
|
44922
44926
|
{
|
|
44923
44927
|
onlyRenderProperties: !0,
|
|
@@ -46306,7 +46310,7 @@ InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
|
|
|
46306
46310
|
const Table$1 = withDynamicSchemaProps(
|
|
46307
46311
|
observer$1((e) => {
|
|
46308
46312
|
var de, be, Se;
|
|
46309
|
-
const { token: t } = useToken$1(),
|
|
46313
|
+
const { token: t } = useToken$1(), me = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = me, r = W(me, ["pagination", "useProps"]), xe = (o == null ? void 0 : o()) || {}, { pagination: a } = xe, i = W(xe, ["pagination"]), he = x(x({}, r), i), {
|
|
46310
46314
|
dragSort: l = !1,
|
|
46311
46315
|
showIndex: c = !0,
|
|
46312
46316
|
onRowSelectionChange: u,
|
|
@@ -46318,7 +46322,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46318
46322
|
loading: f,
|
|
46319
46323
|
onClickRow: C,
|
|
46320
46324
|
enableIndexColumn: b
|
|
46321
|
-
} =
|
|
46325
|
+
} = he, y = W(he, [
|
|
46322
46326
|
"dragSort",
|
|
46323
46327
|
"showIndex",
|
|
46324
46328
|
"onRowSelectionChange",
|
|
@@ -46338,48 +46342,48 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46338
46342
|
&:hover > td {
|
|
46339
46343
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
46340
46344
|
}
|
|
46341
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? H : "", [H, C]), G = useMemo(() => C ? (
|
|
46342
|
-
onClick: (
|
|
46343
|
-
isPortalInBody(
|
|
46345
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? H : "", [H, C]), G = useMemo(() => C ? (se, te) => ({
|
|
46346
|
+
onClick: (oe) => {
|
|
46347
|
+
isPortalInBody(oe.target) || C(se, V, M);
|
|
46344
46348
|
},
|
|
46345
|
-
rowIndex:
|
|
46349
|
+
rowIndex: te
|
|
46346
46350
|
}) : null, [C, M]);
|
|
46347
46351
|
useDeepCompareEffect(() => {
|
|
46348
|
-
const
|
|
46349
|
-
_.isEqual(
|
|
46352
|
+
const se = D ? B : [];
|
|
46353
|
+
_.isEqual(se, w) || L(se);
|
|
46350
46354
|
}, [D, B]);
|
|
46351
|
-
const Y = useCallback((
|
|
46355
|
+
const Y = useCallback((se) => {
|
|
46352
46356
|
if (m)
|
|
46353
|
-
return J(
|
|
46354
|
-
if (
|
|
46355
|
-
return
|
|
46356
|
-
if (z.current.has(
|
|
46357
|
-
return z.current.get(
|
|
46358
|
-
const
|
|
46359
|
-
return z.current.set(
|
|
46357
|
+
return J(se);
|
|
46358
|
+
if (se.key)
|
|
46359
|
+
return se.key;
|
|
46360
|
+
if (z.current.has(se))
|
|
46361
|
+
return z.current.get(se);
|
|
46362
|
+
const te = uid();
|
|
46363
|
+
return z.current.set(se, te), te;
|
|
46360
46364
|
}, []), J = useCallback(
|
|
46361
|
-
(
|
|
46362
|
-
var
|
|
46363
|
-
return Array.isArray(m) ? m.map((
|
|
46364
|
-
var
|
|
46365
|
-
return ((
|
|
46366
|
-
}).join("-") : typeof m == "string" ?
|
|
46365
|
+
(se) => {
|
|
46366
|
+
var te;
|
|
46367
|
+
return Array.isArray(m) ? m.map((oe) => {
|
|
46368
|
+
var ae;
|
|
46369
|
+
return ((ae = se[oe]) == null ? void 0 : ae.toString()) || "";
|
|
46370
|
+
}).join("-") : typeof m == "string" ? se[m] : (te = (m != null ? m : Y)(se)) == null ? void 0 : te.toString();
|
|
46367
46371
|
},
|
|
46368
46372
|
[JSON.stringify(m), Y]
|
|
46369
|
-
), K = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]), X = useMemo(() => (
|
|
46370
|
-
const
|
|
46371
|
-
var
|
|
46372
|
-
if (!
|
|
46373
|
+
), K = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]), X = useMemo(() => (se) => {
|
|
46374
|
+
const te = useCallback((oe) => {
|
|
46375
|
+
var ke, ve, Pe, Fe, Ie, Ae;
|
|
46376
|
+
if (!oe.active || !oe.over) {
|
|
46373
46377
|
console.warn("move cancel");
|
|
46374
46378
|
return;
|
|
46375
46379
|
}
|
|
46376
|
-
const
|
|
46377
|
-
S.move(
|
|
46380
|
+
const ae = (Pe = (ve = (ke = oe.active) == null ? void 0 : ke.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, le = (Ae = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, ue = S.value[ae] || oe.active, ye = S.value[le] || oe.over;
|
|
46381
|
+
S.move(ae, le), N({ from: ue, to: ye });
|
|
46378
46382
|
}, []);
|
|
46379
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd:
|
|
46383
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, se)) });
|
|
46380
46384
|
}, [S, N]);
|
|
46381
46385
|
X.displayName = "BodyWrapperComponent";
|
|
46382
|
-
const
|
|
46386
|
+
const Z = useMemo(() => ({
|
|
46383
46387
|
header: {
|
|
46384
46388
|
wrapper: HeaderWrapperComponent,
|
|
46385
46389
|
cell: HeaderCellComponent
|
|
@@ -46389,45 +46393,45 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46389
46393
|
row: BodyRowComponent,
|
|
46390
46394
|
cell: BodyCellComponent
|
|
46391
46395
|
}
|
|
46392
|
-
}), [X]), Q = useMemo(() => p, [JSON.stringify(p)]),
|
|
46396
|
+
}), [X]), Q = useMemo(() => p, [JSON.stringify(p)]), ee = useMemo(
|
|
46393
46397
|
() => ({
|
|
46394
46398
|
rowSelection: b && Q ? x({
|
|
46395
46399
|
type: "checkbox",
|
|
46396
46400
|
selectedRowKeys: $,
|
|
46397
|
-
onChange(
|
|
46398
|
-
S.data = S.data || {}, S.data.selectedRowKeys =
|
|
46401
|
+
onChange(se, te) {
|
|
46402
|
+
S.data = S.data || {}, S.data.selectedRowKeys = se, S.data.selectedRowData = te, k(se), u == null || u(se, te);
|
|
46399
46403
|
},
|
|
46400
|
-
getCheckboxProps(
|
|
46404
|
+
getCheckboxProps(se) {
|
|
46401
46405
|
return {
|
|
46402
46406
|
"aria-label": "checkbox"
|
|
46403
46407
|
};
|
|
46404
46408
|
},
|
|
46405
|
-
renderCell: (
|
|
46409
|
+
renderCell: (se, te, oe, ae) => {
|
|
46406
46410
|
if (!l && !c)
|
|
46407
|
-
return
|
|
46408
|
-
const
|
|
46409
|
-
return
|
|
46411
|
+
return ae;
|
|
46412
|
+
const le = O == null ? void 0 : O.current, ue = (O == null ? void 0 : O.pageSize) || 20;
|
|
46413
|
+
return le ? oe = oe + (le - 1) * ue + 1 : oe = oe + 1, te.__index && (oe = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
|
|
46410
46414
|
"div",
|
|
46411
46415
|
{
|
|
46412
46416
|
role: "button",
|
|
46413
|
-
"aria-label": `table-index-${
|
|
46414
|
-
className: cls(
|
|
46417
|
+
"aria-label": `table-index-${oe}`,
|
|
46418
|
+
className: cls(se ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
46415
46419
|
[rowSelectCheckboxWrapperClassHover]: E
|
|
46416
46420
|
}),
|
|
46417
46421
|
children: [
|
|
46418
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
46419
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(
|
|
46420
|
-
c && /* @__PURE__ */ jsx(TableIndex$2, { index:
|
|
46422
|
+
/* @__PURE__ */ jsxs("div", { className: cls(se ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
46423
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(te) }),
|
|
46424
|
+
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
46421
46425
|
] }),
|
|
46422
46426
|
E && /* @__PURE__ */ jsx(
|
|
46423
46427
|
"div",
|
|
46424
46428
|
{
|
|
46425
46429
|
className: cls(
|
|
46426
46430
|
"nb-origin-node",
|
|
46427
|
-
|
|
46431
|
+
se ? "checked" : null,
|
|
46428
46432
|
rowSelectCheckboxCheckedClassHover
|
|
46429
46433
|
),
|
|
46430
|
-
children:
|
|
46434
|
+
children: ae
|
|
46431
46435
|
}
|
|
46432
46436
|
)
|
|
46433
46437
|
]
|
|
@@ -46450,54 +46454,54 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46450
46454
|
b
|
|
46451
46455
|
]
|
|
46452
46456
|
), ne = useCallback(
|
|
46453
|
-
({ children:
|
|
46454
|
-
var
|
|
46457
|
+
({ children: se }) => {
|
|
46458
|
+
var te, oe;
|
|
46455
46459
|
return l ? React.createElement(
|
|
46456
46460
|
SortableContext$1,
|
|
46457
46461
|
{
|
|
46458
|
-
items: ((
|
|
46462
|
+
items: ((oe = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : oe.call(te, J)) || []
|
|
46459
46463
|
},
|
|
46460
|
-
|
|
46461
|
-
) : React.createElement(React.Fragment, {},
|
|
46464
|
+
se
|
|
46465
|
+
) : React.createElement(React.Fragment, {}, se);
|
|
46462
46466
|
},
|
|
46463
46467
|
[S, l, J]
|
|
46464
|
-
), { height:
|
|
46468
|
+
), { height: re, tableSizeRefCallback: ie } = useTableSize(), pe = useMemo(() => ({
|
|
46465
46469
|
x: "max-content"
|
|
46466
|
-
}), []),
|
|
46470
|
+
}), []), ce = useMemo(() => ({
|
|
46467
46471
|
x: "max-content",
|
|
46468
|
-
y: K.length > 0 ?
|
|
46469
|
-
}), [
|
|
46470
|
-
(
|
|
46472
|
+
y: K.length > 0 ? re : void 0
|
|
46473
|
+
}), [re, pe, K]), fe = useCallback(
|
|
46474
|
+
(se) => M.includes(se[m]) ? U : "",
|
|
46471
46475
|
[M, U, JSON.stringify(m)]
|
|
46472
|
-
),
|
|
46473
|
-
(
|
|
46474
|
-
const
|
|
46475
|
-
L(
|
|
46476
|
+
), ge = useCallback(
|
|
46477
|
+
(se, te) => {
|
|
46478
|
+
const oe = se ? [...w, te[F.getPrimaryKey()]] : w.filter((ae) => te[F.getPrimaryKey()] !== ae);
|
|
46479
|
+
L(oe), g == null || g(se, te);
|
|
46476
46480
|
},
|
|
46477
46481
|
[w, g, F]
|
|
46478
|
-
),
|
|
46479
|
-
onExpand:
|
|
46482
|
+
), Ce = useMemo(() => ({
|
|
46483
|
+
onExpand: ge,
|
|
46480
46484
|
expandedRowKeys: w
|
|
46481
|
-
}), [w,
|
|
46485
|
+
}), [w, ge]);
|
|
46482
46486
|
return (
|
|
46483
46487
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
|
|
46484
46488
|
/* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
|
|
46485
46489
|
InternalNocoBaseTable,
|
|
46486
46490
|
P(x(x({
|
|
46487
|
-
tableHeight:
|
|
46491
|
+
tableHeight: re,
|
|
46488
46492
|
SortableWrapper: ne,
|
|
46489
|
-
tableSizeRefCallback:
|
|
46493
|
+
tableSizeRefCallback: ie,
|
|
46490
46494
|
defaultRowKey: Y,
|
|
46491
46495
|
dataSource: K
|
|
46492
|
-
}, y),
|
|
46496
|
+
}, y), ee), {
|
|
46493
46497
|
paginationProps: O,
|
|
46494
|
-
components:
|
|
46498
|
+
components: Z,
|
|
46495
46499
|
onTableChange: d,
|
|
46496
46500
|
onRow: G,
|
|
46497
|
-
rowClassName:
|
|
46498
|
-
scroll:
|
|
46501
|
+
rowClassName: fe,
|
|
46502
|
+
scroll: ce,
|
|
46499
46503
|
columns: j,
|
|
46500
|
-
expandable:
|
|
46504
|
+
expandable: Ce,
|
|
46501
46505
|
field: S,
|
|
46502
46506
|
size: I
|
|
46503
46507
|
})
|
|
@@ -46925,19 +46929,19 @@ AssociationSelect.Designer = function e() {
|
|
|
46925
46929
|
}
|
|
46926
46930
|
},
|
|
46927
46931
|
onSubmit: (J) => {
|
|
46928
|
-
var
|
|
46932
|
+
var ee;
|
|
46929
46933
|
const K = [], X = (ne) => ne != null && !Number.isNaN(ne);
|
|
46930
46934
|
for (const ne of J.rules)
|
|
46931
46935
|
K.push(_.pickBy(ne, X));
|
|
46932
|
-
const
|
|
46936
|
+
const Z = {
|
|
46933
46937
|
"x-uid": u["x-uid"]
|
|
46934
46938
|
};
|
|
46935
46939
|
if (["percent"].includes(y == null ? void 0 : y.interface))
|
|
46936
46940
|
for (const ne of K)
|
|
46937
46941
|
(ne.maxValue || ne.minValue) && (ne.percentMode = !0), ne.percentFormat && (ne.percentFormats = !0);
|
|
46938
|
-
const Q = _.concat([], ((
|
|
46939
|
-
c.validator = Q, u["x-validator"] = K,
|
|
46940
|
-
schema:
|
|
46942
|
+
const Q = _.concat([], ((ee = y == null ? void 0 : y.uiSchema) == null ? void 0 : ee["x-validator"]) || [], K);
|
|
46943
|
+
c.validator = Q, u["x-validator"] = K, Z["x-validator"] = K, m.emit("patch", {
|
|
46944
|
+
schema: Z
|
|
46941
46945
|
}), h();
|
|
46942
46946
|
}
|
|
46943
46947
|
}
|
|
@@ -46985,7 +46989,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46985
46989
|
options: S,
|
|
46986
46990
|
value: u["x-component"],
|
|
46987
46991
|
onChange: (J) => {
|
|
46988
|
-
var X,
|
|
46992
|
+
var X, Z;
|
|
46989
46993
|
const K = {
|
|
46990
46994
|
name: y == null ? void 0 : y.name,
|
|
46991
46995
|
type: "void",
|
|
@@ -47002,7 +47006,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47002
47006
|
"x-decorator-props": u["x-decorator-props"],
|
|
47003
47007
|
"x-component-props": x(x({}, (X = y == null ? void 0 : y.uiSchema) == null ? void 0 : X["x-component-props"]), u["x-component-props"])
|
|
47004
47008
|
};
|
|
47005
|
-
(
|
|
47009
|
+
(Z = I == null ? void 0 : I.schemaInitialize) == null || Z.call(I, K, {
|
|
47006
47010
|
field: y,
|
|
47007
47011
|
block: "Form",
|
|
47008
47012
|
readPretty: c.readPretty,
|
|
@@ -47180,10 +47184,10 @@ AssociationSelect.Designer = function e() {
|
|
|
47180
47184
|
options: O,
|
|
47181
47185
|
value: (Y = (G = c == null ? void 0 : c.componentProps) == null ? void 0 : G.fieldNames) == null ? void 0 : Y.label,
|
|
47182
47186
|
onChange: (J) => {
|
|
47183
|
-
var
|
|
47187
|
+
var Z, Q;
|
|
47184
47188
|
const K = {
|
|
47185
47189
|
"x-uid": u["x-uid"]
|
|
47186
|
-
}, X = P(x(x({}, (Q = (
|
|
47190
|
+
}, X = P(x(x({}, (Q = (Z = y == null ? void 0 : y.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
|
|
47187
47191
|
label: J
|
|
47188
47192
|
});
|
|
47189
47193
|
c.componentProps.fieldNames = X, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = X, K["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
@@ -68507,7 +68511,7 @@ export {
|
|
|
68507
68511
|
createReadPrettyFormBlockSchema,
|
|
68508
68512
|
createRouterManager,
|
|
68509
68513
|
createSelectSchemaSettingsItem,
|
|
68510
|
-
|
|
68514
|
+
Rn as createStyles,
|
|
68511
68515
|
createSwitchSettingsItem,
|
|
68512
68516
|
createTableBlockSchema,
|
|
68513
68517
|
createTableBlockUISchema,
|