@nocobase/client 1.9.23 → 1.9.25
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 +261 -258
- package/lib/index.js +62 -62
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -8857,7 +8857,7 @@ function addAppVersion(e, t) {
|
|
|
8857
8857
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8858
8858
|
}), e;
|
|
8859
8859
|
}
|
|
8860
|
-
const name = "@nocobase/client", version = "1.9.
|
|
8860
|
+
const name = "@nocobase/client", version = "1.9.25", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8861
8861
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8862
8862
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8863
8863
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8878,9 +8878,9 @@ const name = "@nocobase/client", version = "1.9.23", license = "AGPL-3.0", main
|
|
|
8878
8878
|
"@formily/reactive-react": "^2.2.27",
|
|
8879
8879
|
"@formily/shared": "^2.2.27",
|
|
8880
8880
|
"@formily/validator": "^2.2.27",
|
|
8881
|
-
"@nocobase/evaluators": "1.9.
|
|
8882
|
-
"@nocobase/sdk": "1.9.
|
|
8883
|
-
"@nocobase/utils": "1.9.
|
|
8881
|
+
"@nocobase/evaluators": "1.9.25",
|
|
8882
|
+
"@nocobase/sdk": "1.9.25",
|
|
8883
|
+
"@nocobase/utils": "1.9.25",
|
|
8884
8884
|
ahooks: "^3.7.2",
|
|
8885
8885
|
antd: "5.24.2",
|
|
8886
8886
|
"antd-mobile": "^5.41.1",
|
|
@@ -10539,7 +10539,7 @@ InternalNocoBaseTable$1.displayName = "InternalNocoBaseTable";
|
|
|
10539
10539
|
const Table$2 = withDynamicSchemaProps(
|
|
10540
10540
|
withSkeletonComponent(
|
|
10541
10541
|
observer$1((e) => {
|
|
10542
|
-
var ye,
|
|
10542
|
+
var ye, ie;
|
|
10543
10543
|
const { token: t } = useToken$1(), Ce = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = Ce, r = W(Ce, ["pagination", "useProps"]), fe = (o == null ? void 0 : o()) || {}, { pagination: a } = fe, i = W(fe, ["pagination"]), be = x(x({}, r), i), {
|
|
10544
10544
|
dragSort: l = !1,
|
|
10545
10545
|
showIndex: c = !0,
|
|
@@ -10565,7 +10565,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10565
10565
|
"onClickRow",
|
|
10566
10566
|
"value"
|
|
10567
10567
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((ye = v == null ? void 0 : v.parent) == null ? void 0 : ye["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, M = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10568
|
-
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((
|
|
10568
|
+
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ie = y == null ? void 0 : y.data) == null ? void 0 : ie.selectedRowKeys) || []), [z, V] = useState([]), L = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
|
|
10569
10569
|
& > td {
|
|
10570
10570
|
background-color: ${t.controlItemBgActive} !important;
|
|
10571
10571
|
}
|
|
@@ -10574,44 +10574,44 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10574
10574
|
}
|
|
10575
10575
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useTableBlockContextBasicValue(), K = useRef(b);
|
|
10576
10576
|
K.current = b, useEffect(() => {
|
|
10577
|
-
var
|
|
10578
|
-
U != null && U.field && (U.field.data = ((
|
|
10577
|
+
var te;
|
|
10578
|
+
U != null && U.field && (U.field.data = ((te = U.field) == null ? void 0 : te.data) || {}, U.field.data.clearSelectedRowKeys = () => {
|
|
10579
10579
|
U.field.data.selectedRowKeys = [], E([]);
|
|
10580
10580
|
}, U.field.data.setSelectedRowKeys = E);
|
|
10581
10581
|
}, [U == null ? void 0 : U.field]);
|
|
10582
|
-
const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (
|
|
10582
|
+
const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (te, oe) => ({
|
|
10583
10583
|
onClick: (le) => {
|
|
10584
|
-
isPortalInBody(le.target) || C(
|
|
10584
|
+
isPortalInBody(le.target) || C(te, V, z);
|
|
10585
10585
|
},
|
|
10586
10586
|
rowIndex: oe,
|
|
10587
|
-
record:
|
|
10588
|
-
}) : (
|
|
10587
|
+
record: te
|
|
10588
|
+
}) : (te, oe) => ({
|
|
10589
10589
|
rowIndex: oe,
|
|
10590
|
-
record:
|
|
10590
|
+
record: te
|
|
10591
10591
|
}), [C, z]);
|
|
10592
10592
|
useDeepCompareEffect(() => {
|
|
10593
|
-
const
|
|
10594
|
-
_.isEqual(
|
|
10593
|
+
const te = D ? B : [];
|
|
10594
|
+
_.isEqual(te, O) || $(te);
|
|
10595
10595
|
}, [D, B]);
|
|
10596
|
-
const J = useCallback((
|
|
10596
|
+
const J = useCallback((te) => {
|
|
10597
10597
|
if (m)
|
|
10598
|
-
return Z(
|
|
10599
|
-
if (
|
|
10600
|
-
return
|
|
10601
|
-
if (G.current.has(
|
|
10602
|
-
return G.current.get(
|
|
10598
|
+
return Z(te);
|
|
10599
|
+
if (te.key)
|
|
10600
|
+
return te.key;
|
|
10601
|
+
if (G.current.has(te))
|
|
10602
|
+
return G.current.get(te);
|
|
10603
10603
|
const oe = uid();
|
|
10604
|
-
return G.current.set(
|
|
10604
|
+
return G.current.set(te, oe), oe;
|
|
10605
10605
|
}, []), Z = useCallback(
|
|
10606
|
-
(
|
|
10606
|
+
(te) => {
|
|
10607
10607
|
var oe;
|
|
10608
10608
|
return Array.isArray(m) ? m.map((le) => {
|
|
10609
10609
|
var me;
|
|
10610
|
-
return ((me =
|
|
10611
|
-
}).join("-") : typeof m == "string" ?
|
|
10610
|
+
return ((me = te[le]) == null ? void 0 : me.toString()) || "";
|
|
10611
|
+
}).join("-") : typeof m == "string" ? te[m] : (oe = (m != null ? m : J)(te)) == null ? void 0 : oe.toString();
|
|
10612
10612
|
},
|
|
10613
10613
|
[JSON.stringify(m), J]
|
|
10614
|
-
), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ne = useMemo(() => (
|
|
10614
|
+
), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ne = useMemo(() => (te) => {
|
|
10615
10615
|
const oe = useCallback((le) => {
|
|
10616
10616
|
var ve, Pe, Fe, Ie, ke, De, je, Me;
|
|
10617
10617
|
if (!le.active || !le.over) {
|
|
@@ -10621,10 +10621,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10621
10621
|
const me = (Fe = (Pe = (ve = le.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, xe = (De = (ke = (Ie = le.over) == null ? void 0 : Ie.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : De.index, Se = ((je = K.current) == null ? void 0 : je[me]) || le.active, Ae = ((Me = K.current) == null ? void 0 : Me[xe]) || le.over;
|
|
10622
10622
|
y.move(me, xe), M({ from: Se, to: Ae });
|
|
10623
10623
|
}, []);
|
|
10624
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({},
|
|
10624
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, te)) });
|
|
10625
10625
|
}, [y, M]);
|
|
10626
10626
|
ne.displayName = "BodyWrapperComponent";
|
|
10627
|
-
const
|
|
10627
|
+
const ee = useMemo(() => ({
|
|
10628
10628
|
header: {
|
|
10629
10629
|
wrapper: HeaderWrapperComponent$1,
|
|
10630
10630
|
cell: HeaderCellComponent$1
|
|
@@ -10634,24 +10634,24 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10634
10634
|
row: BodyRowComponent$1,
|
|
10635
10635
|
cell: BodyCellComponent$1
|
|
10636
10636
|
}
|
|
10637
|
-
}), [ne]),
|
|
10637
|
+
}), [ne]), re = useMemo(() => p, [JSON.stringify(p)]), de = useMemo(
|
|
10638
10638
|
() => ({
|
|
10639
|
-
rowSelection: N !== !1 &&
|
|
10639
|
+
rowSelection: N !== !1 && re ? x({
|
|
10640
10640
|
type: "checkbox",
|
|
10641
10641
|
selectedRowKeys: A,
|
|
10642
|
-
onChange(
|
|
10643
|
-
y.data = y.data || {}, y.data.selectedRowKeys =
|
|
10642
|
+
onChange(te, oe) {
|
|
10643
|
+
y.data = y.data || {}, y.data.selectedRowKeys = te, y.data.selectedRowData = oe, E(te), u == null || u(te, oe, E);
|
|
10644
10644
|
},
|
|
10645
|
-
onSelect: (
|
|
10645
|
+
onSelect: (te, oe, le, me) => {
|
|
10646
10646
|
var xe;
|
|
10647
|
-
U && (U.field.data = ((xe = U.field) == null ? void 0 : xe.data) || {}, U.field.data.selectedRecord =
|
|
10647
|
+
U && (U.field.data = ((xe = U.field) == null ? void 0 : xe.data) || {}, U.field.data.selectedRecord = te, U.field.data.selected = oe);
|
|
10648
10648
|
},
|
|
10649
|
-
getCheckboxProps(
|
|
10649
|
+
getCheckboxProps(te) {
|
|
10650
10650
|
return {
|
|
10651
10651
|
"aria-label": "checkbox"
|
|
10652
10652
|
};
|
|
10653
10653
|
},
|
|
10654
|
-
renderCell: (
|
|
10654
|
+
renderCell: (te, oe, le, me) => {
|
|
10655
10655
|
if (!l && !c)
|
|
10656
10656
|
return me;
|
|
10657
10657
|
const xe = j == null ? void 0 : j.current, Se = (j == null ? void 0 : j.pageSize) || 20;
|
|
@@ -10660,11 +10660,11 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10660
10660
|
{
|
|
10661
10661
|
role: "button",
|
|
10662
10662
|
"aria-label": `table-index-${le}`,
|
|
10663
|
-
className: cls(
|
|
10663
|
+
className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10664
10664
|
[rowSelectCheckboxWrapperClassHover$1]: L
|
|
10665
10665
|
}),
|
|
10666
10666
|
children: [
|
|
10667
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
10667
|
+
/* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10668
10668
|
l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
|
|
10669
10669
|
c && /* @__PURE__ */ jsx(TableIndex$3, { index: le })
|
|
10670
10670
|
] }),
|
|
@@ -10673,7 +10673,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10673
10673
|
{
|
|
10674
10674
|
className: cls(
|
|
10675
10675
|
"nb-origin-node",
|
|
10676
|
-
|
|
10676
|
+
te ? "checked" : null,
|
|
10677
10677
|
rowSelectCheckboxCheckedClassHover$1
|
|
10678
10678
|
),
|
|
10679
10679
|
children: me
|
|
@@ -10683,10 +10683,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10683
10683
|
}
|
|
10684
10684
|
);
|
|
10685
10685
|
}
|
|
10686
|
-
},
|
|
10686
|
+
}, re) : void 0
|
|
10687
10687
|
}),
|
|
10688
10688
|
[
|
|
10689
|
-
|
|
10689
|
+
re,
|
|
10690
10690
|
A,
|
|
10691
10691
|
u,
|
|
10692
10692
|
c,
|
|
@@ -10694,34 +10694,34 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10694
10694
|
y,
|
|
10695
10695
|
Z,
|
|
10696
10696
|
L,
|
|
10697
|
-
|
|
10697
|
+
re,
|
|
10698
10698
|
j,
|
|
10699
10699
|
U,
|
|
10700
10700
|
N
|
|
10701
10701
|
]
|
|
10702
|
-
),
|
|
10703
|
-
({ children:
|
|
10702
|
+
), se = useCallback(
|
|
10703
|
+
({ children: te }) => {
|
|
10704
10704
|
var oe, le;
|
|
10705
10705
|
return l ? React.createElement(
|
|
10706
10706
|
SortableContext$1,
|
|
10707
10707
|
{
|
|
10708
10708
|
items: ((le = (oe = K.current) == null ? void 0 : oe.map) == null ? void 0 : le.call(oe, Z)) || []
|
|
10709
10709
|
},
|
|
10710
|
-
|
|
10711
|
-
) : React.createElement(React.Fragment, {},
|
|
10710
|
+
te
|
|
10711
|
+
) : React.createElement(React.Fragment, {}, te);
|
|
10712
10712
|
},
|
|
10713
10713
|
[l, Z]
|
|
10714
10714
|
// Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
|
|
10715
|
-
), { height:
|
|
10715
|
+
), { height: ae, tableSizeRefCallback: ue } = useTableSize(), pe = useMemo(() => ({
|
|
10716
10716
|
x: "max-content",
|
|
10717
|
-
y:
|
|
10718
|
-
}), [
|
|
10719
|
-
(
|
|
10717
|
+
y: ae
|
|
10718
|
+
}), [ae, Q]), ce = useCallback(
|
|
10719
|
+
(te) => z.includes(te[m]) ? Y : "",
|
|
10720
10720
|
[z, Y, JSON.stringify(m)]
|
|
10721
10721
|
), ge = useCallback(
|
|
10722
|
-
(
|
|
10723
|
-
const le =
|
|
10724
|
-
$(le), g == null || g(
|
|
10722
|
+
(te, oe) => {
|
|
10723
|
+
const le = te ? [...O, oe[F.getPrimaryKey()]] : O.filter((me) => oe[F.getPrimaryKey()] !== me);
|
|
10724
|
+
$(le), g == null || g(te, oe);
|
|
10725
10725
|
},
|
|
10726
10726
|
[O, g, F]
|
|
10727
10727
|
), he = useMemo(() => ({
|
|
@@ -10734,17 +10734,17 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10734
10734
|
/* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
|
|
10735
10735
|
InternalNocoBaseTable$1,
|
|
10736
10736
|
P(x(x({
|
|
10737
|
-
tableHeight:
|
|
10738
|
-
SortableWrapper:
|
|
10739
|
-
tableSizeRefCallback:
|
|
10737
|
+
tableHeight: ae,
|
|
10738
|
+
SortableWrapper: se,
|
|
10739
|
+
tableSizeRefCallback: ue,
|
|
10740
10740
|
defaultRowKey: J,
|
|
10741
10741
|
dataSource: Q
|
|
10742
|
-
}, S),
|
|
10742
|
+
}, S), de), {
|
|
10743
10743
|
paginationProps: j,
|
|
10744
|
-
components:
|
|
10744
|
+
components: ee,
|
|
10745
10745
|
onTableChange: d,
|
|
10746
10746
|
onRow: X,
|
|
10747
|
-
rowClassName:
|
|
10747
|
+
rowClassName: ce,
|
|
10748
10748
|
scroll: pe,
|
|
10749
10749
|
columns: R,
|
|
10750
10750
|
expandable: he,
|
|
@@ -11001,10 +11001,10 @@ const InternalTableBlockProvider = (e) => {
|
|
|
11001
11001
|
const X = b(R, Y), J = (Z = X == null ? void 0 : X.filter(
|
|
11002
11002
|
(Q) => Q.interface && !H.includes(Q.interface) && (G || O && O.includes(Q.type) || $ && $.includes(Q.interface) || (E && Q.target && Q.target !== R && Array.isArray(E) ? E.includes(Q.interface) : !1))
|
|
11003
11003
|
)) == null ? void 0 : Z.map((Q) => {
|
|
11004
|
-
var
|
|
11004
|
+
var ee, re;
|
|
11005
11005
|
const ne = x({
|
|
11006
11006
|
value: K && U ? `${U}.${Q.name}` : Q.name,
|
|
11007
|
-
label: f((
|
|
11007
|
+
label: f((ee = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : ee.title) || Q.name
|
|
11008
11008
|
}, Q);
|
|
11009
11009
|
return E && Q.target && (ne.children = V.includes(Q.target) ? [] : F(Q.target, O, $, P(x({}, A), {
|
|
11010
11010
|
cached: z,
|
|
@@ -11012,7 +11012,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
11012
11012
|
collectionNames: [...V, Q.target],
|
|
11013
11013
|
prefixFieldValue: K ? U ? `${U}.${Q.name}` : Q.name : "",
|
|
11014
11014
|
usePrefix: K
|
|
11015
|
-
})), !((
|
|
11015
|
+
})), !((re = ne.children) != null && re.length)) ? null : ne;
|
|
11016
11016
|
}).filter(Boolean);
|
|
11017
11017
|
return z[R] = J, J;
|
|
11018
11018
|
},
|
|
@@ -18247,12 +18247,12 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18247
18247
|
if (!Z)
|
|
18248
18248
|
return;
|
|
18249
18249
|
function Q() {
|
|
18250
|
-
var
|
|
18251
|
-
X && (X.classList.remove(U), (
|
|
18250
|
+
var ee;
|
|
18251
|
+
X && (X.classList.remove(U), (ee = e.onVisibleChange) == null || ee.call(e, !0));
|
|
18252
18252
|
}
|
|
18253
18253
|
function ne() {
|
|
18254
|
-
var
|
|
18255
|
-
X && (X.classList.add(U), (
|
|
18254
|
+
var ee;
|
|
18255
|
+
X && (X.classList.add(U), (ee = e.onVisibleChange) == null || ee.call(e, !1));
|
|
18256
18256
|
}
|
|
18257
18257
|
return Z.addEventListener("mouseenter", Q), Z.addEventListener("mouseleave", ne), () => {
|
|
18258
18258
|
Z.removeEventListener("mouseenter", Q), Z.removeEventListener("mouseleave", ne);
|
|
@@ -23527,7 +23527,7 @@ function getTypedConstantOption(e, t, n) {
|
|
|
23527
23527
|
};
|
|
23528
23528
|
}
|
|
23529
23529
|
function Input$1(e) {
|
|
23530
|
-
var ne,
|
|
23530
|
+
var ne, ee, re, de;
|
|
23531
23531
|
const Q = e, {
|
|
23532
23532
|
value: t = "",
|
|
23533
23533
|
onChange: n,
|
|
@@ -23572,10 +23572,10 @@ function Input$1(e) {
|
|
|
23572
23572
|
label: I("Constant"),
|
|
23573
23573
|
[z.value]: "$",
|
|
23574
23574
|
[z.label]: I("Constant")
|
|
23575
|
-
} : a ? getTypedConstantOption(A, a, z) : null : null, [A, a]), L = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (
|
|
23575
|
+
} : a ? getTypedConstantOption(A, a, z) : null : null, [A, a]), L = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (re = (ee = a.find((se) => Array.isArray(se) && se[0] === A)) == null ? void 0 : ee[1]) != null ? re : {} : {};
|
|
23576
23576
|
let H;
|
|
23577
23577
|
t == null ? i ? o && N ? H = ["$"] : H = [""] : o ? H = ["$"] : H = [" ", A] : H = o ? ["$"] : [" ", A], m && (H = ["$"]), useEffect(() => {
|
|
23578
|
-
const pe = V != null ? V : {}, { component:
|
|
23578
|
+
const pe = V != null ? V : {}, { component: se } = pe, ae = W(pe, ["component"]), ue = [
|
|
23579
23579
|
...i ? [
|
|
23580
23580
|
{
|
|
23581
23581
|
value: "",
|
|
@@ -23584,76 +23584,76 @@ function Input$1(e) {
|
|
|
23584
23584
|
[z.label]: I("Null")
|
|
23585
23585
|
}
|
|
23586
23586
|
] : [],
|
|
23587
|
-
...V ? [v(
|
|
23587
|
+
...V ? [v(ae)] : [],
|
|
23588
23588
|
...f ? [...f] : []
|
|
23589
|
-
].filter((
|
|
23590
|
-
T(
|
|
23589
|
+
].filter((ce) => !ce.deprecated || (E == null ? void 0 : E[0]) === ce[z.value]);
|
|
23590
|
+
T(ue);
|
|
23591
23591
|
}, [f, E, V, i]);
|
|
23592
|
-
const U = (
|
|
23593
|
-
var
|
|
23594
|
-
const
|
|
23595
|
-
if (!((
|
|
23596
|
-
|
|
23592
|
+
const U = (se) => q(this, null, function* () {
|
|
23593
|
+
var ue;
|
|
23594
|
+
const ae = se[se.length - 1];
|
|
23595
|
+
if (!((ue = ae.children) != null && ue.length) && !ae.isLeaf && ae.loadChildren) {
|
|
23596
|
+
se.length && R(se.map((ce) => ce == null ? void 0 : ce[z.value]));
|
|
23597
23597
|
let pe;
|
|
23598
23598
|
if (E && E.length >= 2) {
|
|
23599
|
-
for (const
|
|
23600
|
-
if (
|
|
23601
|
-
pe =
|
|
23599
|
+
for (const ce of E)
|
|
23600
|
+
if (ce === ae[z.value]) {
|
|
23601
|
+
pe = ce;
|
|
23602
23602
|
break;
|
|
23603
23603
|
}
|
|
23604
23604
|
}
|
|
23605
|
-
yield
|
|
23605
|
+
yield ae.loadChildren(ae, pe, E), T((ce) => [...ce]);
|
|
23606
23606
|
}
|
|
23607
23607
|
}), K = useCallback(
|
|
23608
|
-
(
|
|
23609
|
-
var
|
|
23610
|
-
if (R(null),
|
|
23611
|
-
M(!0), E && n(null,
|
|
23608
|
+
(se, ae) => {
|
|
23609
|
+
var ue, pe, ce;
|
|
23610
|
+
if (R(null), se[0] === "$") {
|
|
23611
|
+
M(!0), E && n(null, ae);
|
|
23612
23612
|
return;
|
|
23613
23613
|
} else
|
|
23614
23614
|
M(!1);
|
|
23615
|
-
if (
|
|
23615
|
+
if (se[0] === "") {
|
|
23616
23616
|
n(null);
|
|
23617
23617
|
return;
|
|
23618
23618
|
}
|
|
23619
|
-
if (
|
|
23620
|
-
|
|
23619
|
+
if (se[0] === " ") {
|
|
23620
|
+
se[1] ? se[1] !== A && n((ce = (pe = (ue = ConstantTypes[se[1]]) == null ? void 0 : ue.default) == null ? void 0 : pe.call(ue)) != null ? ce : null, ae) : E && n(null, ae);
|
|
23621
23621
|
return;
|
|
23622
23622
|
}
|
|
23623
|
-
n(`{{${
|
|
23623
|
+
n(`{{${se.join(".")}}}`, ae);
|
|
23624
23624
|
},
|
|
23625
23625
|
[A, E, n]
|
|
23626
23626
|
), Y = useCallback(() => {
|
|
23627
|
-
var
|
|
23628
|
-
if (M(!!o), (
|
|
23629
|
-
const
|
|
23630
|
-
return n(
|
|
23627
|
+
var se;
|
|
23628
|
+
if (M(!!o), (se = V == null ? void 0 : V.children) != null && se.length) {
|
|
23629
|
+
const ae = V.children[0].default();
|
|
23630
|
+
return n(ae);
|
|
23631
23631
|
}
|
|
23632
23632
|
n(null), R(null);
|
|
23633
|
-
}, [V]), X = useCallback((
|
|
23634
|
-
|
|
23633
|
+
}, [V]), X = useCallback((se) => {
|
|
23634
|
+
se || R(null);
|
|
23635
23635
|
}, []);
|
|
23636
23636
|
useEffect(() => {
|
|
23637
23637
|
q(this, null, function* () {
|
|
23638
23638
|
var pe;
|
|
23639
23639
|
if (!E || w.length <= 1)
|
|
23640
23640
|
return;
|
|
23641
|
-
let
|
|
23642
|
-
const
|
|
23643
|
-
for (let
|
|
23644
|
-
const ge = E[
|
|
23641
|
+
let ae = null;
|
|
23642
|
+
const ue = [];
|
|
23643
|
+
for (let ce = 0; ce < E.length; ce++) {
|
|
23644
|
+
const ge = E[ce];
|
|
23645
23645
|
try {
|
|
23646
|
-
if (
|
|
23646
|
+
if (ce === 0 ? ae = w.find((he) => he[z.value] === ge) : (ae.loadChildren && !((pe = ae.children) != null && pe.length) && (yield ae.loadChildren(ae, ge, E)), ae = ae.children.find((he) => he[z.value] === ge)), !ae)
|
|
23647
23647
|
return;
|
|
23648
|
-
|
|
23648
|
+
ue.push(ae[z.label]);
|
|
23649
23649
|
} catch (he) {
|
|
23650
23650
|
error(he);
|
|
23651
23651
|
}
|
|
23652
23652
|
}
|
|
23653
|
-
T([...w]), B([...
|
|
23653
|
+
T([...w]), B([...ue]);
|
|
23654
23654
|
});
|
|
23655
23655
|
}, [E, w.length]);
|
|
23656
|
-
const J = e.disabled || F.disabled, Z = (
|
|
23656
|
+
const J = e.disabled || F.disabled, Z = (de = E != null ? E : j) != null ? de : H;
|
|
23657
23657
|
return C(
|
|
23658
23658
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
23659
23659
|
/* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(S, b, c), children: [
|
|
@@ -23695,10 +23695,10 @@ function Input$1(e) {
|
|
|
23695
23695
|
"aria-label": "variable-tag",
|
|
23696
23696
|
style: { overflow: "hidden" },
|
|
23697
23697
|
className: cx("ant-input ant-input-outlined", { "ant-input-disabled": J }, b),
|
|
23698
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((
|
|
23699
|
-
|
|
23700
|
-
|
|
23701
|
-
] },
|
|
23698
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((se, ae) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
23699
|
+
ae ? " / " : "",
|
|
23700
|
+
se
|
|
23701
|
+
] }, se)) })
|
|
23702
23702
|
}
|
|
23703
23703
|
),
|
|
23704
23704
|
J ? null : /* @__PURE__ */ jsx(
|
|
@@ -27177,19 +27177,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27177
27177
|
}
|
|
27178
27178
|
}
|
|
27179
27179
|
function b(A, E, z) {
|
|
27180
|
-
var V, L, G, H, U, K, Y, X, J, Z, Q, ne,
|
|
27181
|
-
if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." &&
|
|
27180
|
+
var V, L, G, H, U, K, Y, X, J, Z, Q, ne, ee = E && E.split("/"), re = i.map, de = re && re["*"];
|
|
27181
|
+
if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && ee && (ne = ee.slice(0, ee.length - 1), A = ne.concat(A)), C(A), A = A.join("/")), z && re && (ee || de)) {
|
|
27182
27182
|
G = A.split("/");
|
|
27183
27183
|
e:
|
|
27184
27184
|
for (H = G.length; H > 0; H -= 1) {
|
|
27185
|
-
if (K = G.slice(0, H).join("/"),
|
|
27186
|
-
for (U =
|
|
27187
|
-
if (L = getOwn(
|
|
27185
|
+
if (K = G.slice(0, H).join("/"), ee) {
|
|
27186
|
+
for (U = ee.length; U > 0; U -= 1)
|
|
27187
|
+
if (L = getOwn(re, ee.slice(0, U).join("/")), L && (L = getOwn(L, K), L)) {
|
|
27188
27188
|
X = L, J = H;
|
|
27189
27189
|
break e;
|
|
27190
27190
|
}
|
|
27191
27191
|
}
|
|
27192
|
-
!Z &&
|
|
27192
|
+
!Z && de && getOwn(de, K) && (Z = getOwn(de, K), Q = H);
|
|
27193
27193
|
}
|
|
27194
27194
|
!X && Z && (X = Z, J = Q), X && (G.splice(0, J, X), A = G.join("/"));
|
|
27195
27195
|
}
|
|
@@ -27408,19 +27408,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27408
27408
|
Z.map.id.indexOf(E + "_unnormalized") === 0 && B(Z.map.id);
|
|
27409
27409
|
}), T(J);
|
|
27410
27410
|
}), L.fromText = bind(this, function(J, Z) {
|
|
27411
|
-
var Q = A.name, ne = I(Q),
|
|
27412
|
-
Z && (J = Z),
|
|
27411
|
+
var Q = A.name, ne = I(Q), ee = useInteractive;
|
|
27412
|
+
Z && (J = Z), ee && (useInteractive = !1), F(ne), hasProp(i.config, E) && (i.config[Q] = i.config[E]);
|
|
27413
27413
|
try {
|
|
27414
27414
|
req.exec(J);
|
|
27415
|
-
} catch (
|
|
27415
|
+
} catch (re) {
|
|
27416
27416
|
return T(makeError(
|
|
27417
27417
|
"fromtexteval",
|
|
27418
|
-
"fromText eval for " + E + " failed: " +
|
|
27419
|
-
|
|
27418
|
+
"fromText eval for " + E + " failed: " + re,
|
|
27419
|
+
re,
|
|
27420
27420
|
[E]
|
|
27421
27421
|
));
|
|
27422
27422
|
}
|
|
27423
|
-
|
|
27423
|
+
ee && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Q), X([Q], L);
|
|
27424
27424
|
}), V.load(A.name, X, L, i);
|
|
27425
27425
|
})), o.enable(z, this), this.pluginMaps[z.id] = z;
|
|
27426
27426
|
},
|
|
@@ -40211,7 +40211,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40211
40211
|
forEachLinkageRule(B, (Z, Q) => {
|
|
40212
40212
|
J.push(
|
|
40213
40213
|
reaction(
|
|
40214
|
-
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((
|
|
40214
|
+
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((re) => JSON.stringify(re)).join(","),
|
|
40215
40215
|
() => {
|
|
40216
40216
|
I.stateOfLinkageRules = {}, linkageAction(
|
|
40217
40217
|
{
|
|
@@ -40246,13 +40246,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40246
40246
|
var Q, ne;
|
|
40247
40247
|
yield c == null ? void 0 : c(X, J);
|
|
40248
40248
|
const Z = ((ne = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ne.blocksToRefresh) || [];
|
|
40249
|
-
Z.length > 0 && L().forEach((
|
|
40250
|
-
var
|
|
40251
|
-
if (Z.includes(
|
|
40249
|
+
Z.length > 0 && L().forEach((ee) => {
|
|
40250
|
+
var re;
|
|
40251
|
+
if (Z.includes(ee.uid))
|
|
40252
40252
|
try {
|
|
40253
|
-
(
|
|
40254
|
-
} catch (
|
|
40255
|
-
console.error("Failed to refresh block:",
|
|
40253
|
+
(re = ee.service) == null || re.refresh();
|
|
40254
|
+
} catch (de) {
|
|
40255
|
+
console.error("Failed to refresh block:", ee.uid, de);
|
|
40256
40256
|
}
|
|
40257
40257
|
});
|
|
40258
40258
|
})), [c, F, L]);
|
|
@@ -40291,8 +40291,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40291
40291
|
}),
|
|
40292
40292
|
{ displayName: "Action" }
|
|
40293
40293
|
), InternalAction = observer$1(function e(t) {
|
|
40294
|
-
var pe,
|
|
40295
|
-
const
|
|
40294
|
+
var pe, ce, ge, he, Ce;
|
|
40295
|
+
const ue = t, {
|
|
40296
40296
|
containerRefKey: n,
|
|
40297
40297
|
fieldSchema: o,
|
|
40298
40298
|
designable: r,
|
|
@@ -40320,7 +40320,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40320
40320
|
setSubmitted: B,
|
|
40321
40321
|
getAriaLabel: N,
|
|
40322
40322
|
parentRecordData: M
|
|
40323
|
-
} =
|
|
40323
|
+
} = ue, j = W(ue, [
|
|
40324
40324
|
"containerRefKey",
|
|
40325
40325
|
"fieldSchema",
|
|
40326
40326
|
"designable",
|
|
@@ -40348,25 +40348,25 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40348
40348
|
"setSubmitted",
|
|
40349
40349
|
"getAriaLabel",
|
|
40350
40350
|
"parentRecordData"
|
|
40351
|
-
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (
|
|
40351
|
+
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ce.openSize, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
|
|
40352
40352
|
run: J,
|
|
40353
40353
|
element: Z,
|
|
40354
40354
|
disabled: Q,
|
|
40355
40355
|
loading: ne
|
|
40356
|
-
} = (F == null ? void 0 : F(w)) || {},
|
|
40356
|
+
} = (F == null ? void 0 : F(w)) || {}, ee = Y.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || I || Q, re = useMemo(() => {
|
|
40357
40357
|
var fe;
|
|
40358
40358
|
return P(x({}, v), {
|
|
40359
40359
|
opacity: r && (((fe = a == null ? void 0 : a.data) == null ? void 0 : fe.hidden) || !X) && 0.1,
|
|
40360
|
-
color:
|
|
40360
|
+
color: ee ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
|
|
40361
40361
|
});
|
|
40362
|
-
}, [X, r, (Ce = a == null ? void 0 : a.data) == null ? void 0 : Ce.hidden, v,
|
|
40362
|
+
}, [X, r, (Ce = a == null ? void 0 : a.data) == null ? void 0 : Ce.hidden, v, ee]), de = {
|
|
40363
40363
|
designable: r,
|
|
40364
40364
|
field: a,
|
|
40365
40365
|
aclCtx: X,
|
|
40366
40366
|
icon: i,
|
|
40367
40367
|
loading: typeof ne == "boolean" ? ne : l,
|
|
40368
|
-
disabled:
|
|
40369
|
-
buttonStyle:
|
|
40368
|
+
disabled: ee,
|
|
40369
|
+
buttonStyle: re,
|
|
40370
40370
|
handleMouseEnter: c,
|
|
40371
40371
|
tarComponent: u,
|
|
40372
40372
|
designerProps: L,
|
|
@@ -40387,18 +40387,18 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40387
40387
|
setSubmitted: B,
|
|
40388
40388
|
confirmTitle: f,
|
|
40389
40389
|
title: y
|
|
40390
|
-
},
|
|
40390
|
+
}, se = useCallback(
|
|
40391
40391
|
(fe) => {
|
|
40392
40392
|
O == null || O(fe), D == null || D(fe);
|
|
40393
40393
|
},
|
|
40394
40394
|
[D]
|
|
40395
40395
|
);
|
|
40396
|
-
let
|
|
40396
|
+
let ae = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
|
|
40397
40397
|
ActionContextProvider,
|
|
40398
40398
|
{
|
|
40399
|
-
button: RenderButton(
|
|
40399
|
+
button: RenderButton(de),
|
|
40400
40400
|
visible: R || T,
|
|
40401
|
-
setVisible:
|
|
40401
|
+
setVisible: se,
|
|
40402
40402
|
formValueChanged: z,
|
|
40403
40403
|
setFormValueChanged: V,
|
|
40404
40404
|
openMode: G,
|
|
@@ -40408,13 +40408,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40408
40408
|
setSubmitted: B,
|
|
40409
40409
|
children: [
|
|
40410
40410
|
C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
|
|
40411
|
-
!C && /* @__PURE__ */ jsx(RenderButton, x({},
|
|
40411
|
+
!C && /* @__PURE__ */ jsx(RenderButton, x({}, de)),
|
|
40412
40412
|
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
|
|
40413
40413
|
Z
|
|
40414
40414
|
]
|
|
40415
40415
|
}
|
|
40416
40416
|
) });
|
|
40417
|
-
return isBulkEditAction(o) && (
|
|
40417
|
+
return isBulkEditAction(o) && (ae = /* @__PURE__ */ jsx(TabsContextProvider, { children: ae })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: ae }) : ae);
|
|
40418
40418
|
});
|
|
40419
40419
|
InternalAction.displayName = "InternalAction";
|
|
40420
40420
|
Action.Popover = function e(t) {
|
|
@@ -41186,8 +41186,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41186
41186
|
), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
|
|
41187
41187
|
connect(
|
|
41188
41188
|
(e) => {
|
|
41189
|
-
var
|
|
41190
|
-
const
|
|
41189
|
+
var Z, Q;
|
|
41190
|
+
const J = e, {
|
|
41191
41191
|
fieldNames: t = {},
|
|
41192
41192
|
service: n = {},
|
|
41193
41193
|
wait: o = 300,
|
|
@@ -41200,10 +41200,10 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41200
41200
|
CustomDropdownRender: d,
|
|
41201
41201
|
optionFilter: p,
|
|
41202
41202
|
dataSource: m,
|
|
41203
|
-
toOptionsItem: h = (
|
|
41203
|
+
toOptionsItem: h = (ne) => ne,
|
|
41204
41204
|
popupMatchSelectWidth: g = !1,
|
|
41205
41205
|
onSuccess: f
|
|
41206
|
-
} =
|
|
41206
|
+
} = J, C = W(J, [
|
|
41207
41207
|
"fieldNames",
|
|
41208
41208
|
"service",
|
|
41209
41209
|
"wait",
|
|
@@ -41219,42 +41219,42 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41219
41219
|
"toOptionsItem",
|
|
41220
41220
|
"popupMatchSelectWidth",
|
|
41221
41221
|
"onSuccess"
|
|
41222
|
-
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((
|
|
41223
|
-
var
|
|
41222
|
+
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((Z = v["x-component-props"]) == null ? void 0 : Z.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), w = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
|
|
41223
|
+
var ne;
|
|
41224
41224
|
if (M != null && M.interface) {
|
|
41225
|
-
const
|
|
41226
|
-
return M.type === "string" || M.dataType === "string" ? "$includes" :
|
|
41225
|
+
const ee = D(M.interface), re = ((ne = ee == null ? void 0 : ee.filterable) == null ? void 0 : ne.operators[0].value) || "$includes";
|
|
41226
|
+
return M.type === "string" || M.dataType === "string" ? "$includes" : re;
|
|
41227
41227
|
}
|
|
41228
41228
|
return "$includes";
|
|
41229
|
-
}, [M]), R = useCompile(), O = useCallback(
|
|
41230
|
-
(
|
|
41229
|
+
}, [D, M == null ? void 0 : M.dataType, M == null ? void 0 : M.interface, M == null ? void 0 : M.type]), R = useCompile(), O = useCallback(
|
|
41230
|
+
(ne) => {
|
|
41231
41231
|
try {
|
|
41232
|
-
return
|
|
41233
|
-
var
|
|
41234
|
-
let
|
|
41235
|
-
if ((
|
|
41236
|
-
if (Array.isArray(
|
|
41237
|
-
|
|
41238
|
-
const
|
|
41239
|
-
return
|
|
41232
|
+
return ne.filter((ee) => ["number", "string"].includes(typeof ee[t.value]) || !ee[t.value]).map((ee) => {
|
|
41233
|
+
var de;
|
|
41234
|
+
let re = R(ee[t.label]);
|
|
41235
|
+
if ((de = M == null ? void 0 : M.uiSchema) != null && de.enum)
|
|
41236
|
+
if (Array.isArray(re))
|
|
41237
|
+
re = re.map((se, ae) => {
|
|
41238
|
+
const ue = M.uiSchema.enum.find((pe) => pe.value === se);
|
|
41239
|
+
return ue ? /* @__PURE__ */ jsx(Tag, { role: "button", color: ue.color, style: { marginRight: 3 }, children: (ue == null ? void 0 : ue.label) || se }, ae) : /* @__PURE__ */ jsx(Tag, { role: "button", children: se }, se);
|
|
41240
41240
|
}).reverse();
|
|
41241
41241
|
else {
|
|
41242
|
-
const
|
|
41243
|
-
|
|
41242
|
+
const se = M.uiSchema.enum.find((ae) => ae.value === re);
|
|
41243
|
+
se && (re = /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, children: se.label }));
|
|
41244
41244
|
}
|
|
41245
|
-
return (M == null ? void 0 : M.type) === "date" && (
|
|
41246
|
-
[t.label]:
|
|
41247
|
-
[t.value]:
|
|
41248
|
-
}) : P(x({}, omit(
|
|
41249
|
-
[t.label]:
|
|
41250
|
-
[t.value]:
|
|
41245
|
+
return (M == null ? void 0 : M.type) === "date" && (re = dayjs(re).format("YYYY-MM-DD")), c ? c({
|
|
41246
|
+
[t.label]: re || EMPTY$1,
|
|
41247
|
+
[t.value]: ee[t.value]
|
|
41248
|
+
}) : P(x({}, omit(ee, "style")), {
|
|
41249
|
+
[t.label]: re || EMPTY$1,
|
|
41250
|
+
[t.value]: ee[t.value]
|
|
41251
41251
|
});
|
|
41252
41252
|
}).filter(Boolean);
|
|
41253
|
-
} catch (
|
|
41254
|
-
return console.error(
|
|
41253
|
+
} catch (ee) {
|
|
41254
|
+
return console.error(ee), ne;
|
|
41255
41255
|
}
|
|
41256
41256
|
},
|
|
41257
|
-
[M == null ? void 0 : M.uiSchema,
|
|
41257
|
+
[t.value, t.label, R, M == null ? void 0 : M.uiSchema.enum, M == null ? void 0 : M.type, c]
|
|
41258
41258
|
), { data: $, run: A, loading: E } = useRequest(
|
|
41259
41259
|
P(x({
|
|
41260
41260
|
action: "list"
|
|
@@ -41263,7 +41263,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41263
41263
|
params: P(x({
|
|
41264
41264
|
pageSize: 200
|
|
41265
41265
|
}, n == null ? void 0 : n.params), {
|
|
41266
|
-
filter: (
|
|
41266
|
+
filter: (Q = n == null ? void 0 : n.params) == null ? void 0 : Q.filter
|
|
41267
41267
|
})
|
|
41268
41268
|
}),
|
|
41269
41269
|
x({
|
|
@@ -41299,34 +41299,39 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41299
41299
|
w.current = null;
|
|
41300
41300
|
}
|
|
41301
41301
|
}
|
|
41302
|
-
) : null, [
|
|
41302
|
+
) : null, [d]);
|
|
41303
41303
|
useEffect(() => {
|
|
41304
41304
|
y.current && A();
|
|
41305
|
-
}, [G]), useEffect(() => {
|
|
41306
|
-
!i && ($ != null && $.data) && ($ != null && $.data.some((
|
|
41305
|
+
}, [A, G]), useEffect(() => {
|
|
41306
|
+
!i && ($ != null && $.data) && (Array.isArray(r) ? r.length : r != null) && !($ != null && $.data.some((ne) => ne[t.value] === r)) && V({
|
|
41307
41307
|
filterByTk: r
|
|
41308
|
-
})
|
|
41309
|
-
}, [r, $ == null ? void 0 : $.data]);
|
|
41310
|
-
const U = (
|
|
41311
|
-
var
|
|
41308
|
+
});
|
|
41309
|
+
}, [r, $ == null ? void 0 : $.data, i, t.value, V]);
|
|
41310
|
+
const U = (ne) => q(void 0, null, function* () {
|
|
41311
|
+
var ee;
|
|
41312
41312
|
A({
|
|
41313
41313
|
filter: mergeFilter([
|
|
41314
|
-
|
|
41314
|
+
ne ? {
|
|
41315
41315
|
[t.label]: {
|
|
41316
|
-
[j]:
|
|
41316
|
+
[j]: ne
|
|
41317
41317
|
}
|
|
41318
41318
|
} : {},
|
|
41319
|
-
(
|
|
41319
|
+
(ee = n == null ? void 0 : n.params) == null ? void 0 : ee.filter
|
|
41320
41320
|
])
|
|
41321
|
-
}), w.current =
|
|
41321
|
+
}), w.current = ne;
|
|
41322
41322
|
}), K = useMemo(() => {
|
|
41323
|
-
var
|
|
41324
|
-
const
|
|
41325
|
-
if (!((
|
|
41326
|
-
return
|
|
41327
|
-
const
|
|
41328
|
-
return uniqBy(
|
|
41329
|
-
}, [r, a,
|
|
41323
|
+
var de;
|
|
41324
|
+
const ne = i ? r || a : z == null ? void 0 : z.data;
|
|
41325
|
+
if (!((de = $ == null ? void 0 : $.data) != null && de.length))
|
|
41326
|
+
return ne != null ? Array.isArray(ne) ? ne : [ne] : [];
|
|
41327
|
+
const ee = ne != null && (Array.isArray(ne) ? ne.map((se) => P(x({}, se), { [t.value]: se[t.value] || se })) : [P(x({}, ne), { [t.value]: ne[t.value] || ne })]) || [], re = typeof p == "function" ? $.data.filter(p) : $.data;
|
|
41328
|
+
return uniqBy(re.concat(ee != null ? ee : []), t.value);
|
|
41329
|
+
}, [i, r, a, z == null ? void 0 : z.data, $ == null ? void 0 : $.data, t.value, p]), Y = (ne) => {
|
|
41330
|
+
w.current = null, ne && A(), y.current = !0;
|
|
41331
|
+
}, X = useMemo(
|
|
41332
|
+
() => h(O(K)),
|
|
41333
|
+
[O, K, h]
|
|
41334
|
+
);
|
|
41330
41335
|
return /* @__PURE__ */ jsx(
|
|
41331
41336
|
Select,
|
|
41332
41337
|
P(x({
|
|
@@ -41336,23 +41341,21 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41336
41341
|
filterSort: null,
|
|
41337
41342
|
fieldNames: t,
|
|
41338
41343
|
onSearch: U,
|
|
41339
|
-
onDropdownVisibleChange:
|
|
41340
|
-
w.current = null, Q && A(), y.current = !0;
|
|
41341
|
-
},
|
|
41344
|
+
onDropdownVisibleChange: Y,
|
|
41342
41345
|
objectValue: i,
|
|
41343
41346
|
value: r,
|
|
41344
41347
|
defaultValue: a
|
|
41345
41348
|
}, C), {
|
|
41346
41349
|
loading: $ ? E : !0,
|
|
41347
|
-
options:
|
|
41350
|
+
options: X,
|
|
41348
41351
|
rawOptions: K,
|
|
41349
|
-
dropdownRender: (
|
|
41350
|
-
const
|
|
41352
|
+
dropdownRender: (ne) => {
|
|
41353
|
+
const ee = K.some((re) => re[t.label] === w.current);
|
|
41351
41354
|
return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41352
|
-
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) &&
|
|
41353
|
-
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !
|
|
41354
|
-
!
|
|
41355
|
-
] }) :
|
|
41355
|
+
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) && ne,
|
|
41356
|
+
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !ee && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
41357
|
+
!ee && /* @__PURE__ */ jsx(H, {})
|
|
41358
|
+
] }) : ne });
|
|
41356
41359
|
}
|
|
41357
41360
|
})
|
|
41358
41361
|
);
|
|
@@ -47039,36 +47042,36 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47039
47042
|
&:hover > td {
|
|
47040
47043
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
47041
47044
|
}
|
|
47042
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (
|
|
47045
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ie, te) => ({
|
|
47043
47046
|
onClick: (oe) => {
|
|
47044
|
-
isPortalInBody(oe.target) || C(
|
|
47047
|
+
isPortalInBody(oe.target) || C(ie, z, E);
|
|
47045
47048
|
},
|
|
47046
|
-
rowIndex:
|
|
47049
|
+
rowIndex: te
|
|
47047
47050
|
}) : null, [C, E]);
|
|
47048
47051
|
useDeepCompareEffect(() => {
|
|
47049
|
-
const
|
|
47050
|
-
_.isEqual(
|
|
47052
|
+
const ie = D ? B : [];
|
|
47053
|
+
_.isEqual(ie, R) || O(ie);
|
|
47051
47054
|
}, [D, B]);
|
|
47052
|
-
const K = useCallback((
|
|
47055
|
+
const K = useCallback((ie) => {
|
|
47053
47056
|
if (m)
|
|
47054
|
-
return Y(
|
|
47055
|
-
if (
|
|
47056
|
-
return
|
|
47057
|
-
if (L.current.has(
|
|
47058
|
-
return L.current.get(
|
|
47059
|
-
const
|
|
47060
|
-
return L.current.set(
|
|
47057
|
+
return Y(ie);
|
|
47058
|
+
if (ie.key)
|
|
47059
|
+
return ie.key;
|
|
47060
|
+
if (L.current.has(ie))
|
|
47061
|
+
return L.current.get(ie);
|
|
47062
|
+
const te = uid();
|
|
47063
|
+
return L.current.set(ie, te), te;
|
|
47061
47064
|
}, []), Y = useCallback(
|
|
47062
|
-
(
|
|
47063
|
-
var
|
|
47065
|
+
(ie) => {
|
|
47066
|
+
var te;
|
|
47064
47067
|
return Array.isArray(m) ? m.map((oe) => {
|
|
47065
47068
|
var le;
|
|
47066
|
-
return ((le =
|
|
47067
|
-
}).join("-") : typeof m == "string" ?
|
|
47069
|
+
return ((le = ie[oe]) == null ? void 0 : le.toString()) || "";
|
|
47070
|
+
}).join("-") : typeof m == "string" ? ie[m] : (te = (m != null ? m : K)(ie)) == null ? void 0 : te.toString();
|
|
47068
47071
|
},
|
|
47069
47072
|
[JSON.stringify(m), K]
|
|
47070
|
-
), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), J = useMemo(() => (
|
|
47071
|
-
const
|
|
47073
|
+
), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), J = useMemo(() => (ie) => {
|
|
47074
|
+
const te = useCallback((oe) => {
|
|
47072
47075
|
var Ae, ve, Pe, Fe, Ie, ke;
|
|
47073
47076
|
if (!oe.active || !oe.over) {
|
|
47074
47077
|
console.warn("move cancel");
|
|
@@ -47077,7 +47080,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47077
47080
|
const le = (Pe = (ve = (Ae = oe.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, me = (ke = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : ke.index, xe = y.value[le] || oe.active, Se = y.value[me] || oe.over;
|
|
47078
47081
|
y.move(le, me), N({ from: xe, to: Se });
|
|
47079
47082
|
}, []);
|
|
47080
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd:
|
|
47083
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, ie)) });
|
|
47081
47084
|
}, [y, N]);
|
|
47082
47085
|
J.displayName = "BodyWrapperComponent";
|
|
47083
47086
|
const Z = useMemo(() => ({
|
|
@@ -47095,29 +47098,29 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47095
47098
|
rowSelection: b && Q ? x({
|
|
47096
47099
|
type: "checkbox",
|
|
47097
47100
|
selectedRowKeys: $,
|
|
47098
|
-
onChange(
|
|
47099
|
-
y.data = y.data || {}, y.data.selectedRowKeys =
|
|
47101
|
+
onChange(ie, te) {
|
|
47102
|
+
y.data = y.data || {}, y.data.selectedRowKeys = ie, y.data.selectedRowData = te, A(ie), u == null || u(ie, te);
|
|
47100
47103
|
},
|
|
47101
|
-
getCheckboxProps(
|
|
47104
|
+
getCheckboxProps(ie) {
|
|
47102
47105
|
return {
|
|
47103
47106
|
"aria-label": "checkbox"
|
|
47104
47107
|
};
|
|
47105
47108
|
},
|
|
47106
|
-
renderCell: (
|
|
47109
|
+
renderCell: (ie, te, oe, le) => {
|
|
47107
47110
|
if (!l && !c)
|
|
47108
47111
|
return le;
|
|
47109
47112
|
const me = M == null ? void 0 : M.current, xe = (M == null ? void 0 : M.pageSize) || 20;
|
|
47110
|
-
return me ? oe = oe + (me - 1) * xe + 1 : oe = oe + 1,
|
|
47113
|
+
return me ? oe = oe + (me - 1) * xe + 1 : oe = oe + 1, te.__index && (oe = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
|
|
47111
47114
|
"div",
|
|
47112
47115
|
{
|
|
47113
47116
|
role: "button",
|
|
47114
47117
|
"aria-label": `table-index-${oe}`,
|
|
47115
|
-
className: cls(
|
|
47118
|
+
className: cls(ie ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
47116
47119
|
[rowSelectCheckboxWrapperClassHover]: V
|
|
47117
47120
|
}),
|
|
47118
47121
|
children: [
|
|
47119
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
47120
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(
|
|
47122
|
+
/* @__PURE__ */ jsxs("div", { className: cls(ie ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
47123
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(te) }),
|
|
47121
47124
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
47122
47125
|
] }),
|
|
47123
47126
|
V && /* @__PURE__ */ jsx(
|
|
@@ -47125,7 +47128,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47125
47128
|
{
|
|
47126
47129
|
className: cls(
|
|
47127
47130
|
"nb-origin-node",
|
|
47128
|
-
|
|
47131
|
+
ie ? "checked" : null,
|
|
47129
47132
|
rowSelectCheckboxCheckedClassHover
|
|
47130
47133
|
),
|
|
47131
47134
|
children: le
|
|
@@ -47150,33 +47153,33 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47150
47153
|
M,
|
|
47151
47154
|
b
|
|
47152
47155
|
]
|
|
47153
|
-
),
|
|
47154
|
-
({ children:
|
|
47155
|
-
var
|
|
47156
|
+
), ee = useCallback(
|
|
47157
|
+
({ children: ie }) => {
|
|
47158
|
+
var te, oe;
|
|
47156
47159
|
return l ? React.createElement(
|
|
47157
47160
|
SortableContext$1,
|
|
47158
47161
|
{
|
|
47159
|
-
items: ((oe = (
|
|
47162
|
+
items: ((oe = (te = y.value) == null ? void 0 : te.map) == null ? void 0 : oe.call(te, Y)) || []
|
|
47160
47163
|
},
|
|
47161
|
-
|
|
47162
|
-
) : React.createElement(React.Fragment, {},
|
|
47164
|
+
ie
|
|
47165
|
+
) : React.createElement(React.Fragment, {}, ie);
|
|
47163
47166
|
},
|
|
47164
47167
|
[y, l, Y]
|
|
47165
|
-
), { height:
|
|
47168
|
+
), { height: re, tableSizeRefCallback: de } = useTableSize(), se = useMemo(() => ({
|
|
47166
47169
|
x: "max-content"
|
|
47167
|
-
}), []),
|
|
47170
|
+
}), []), ae = useMemo(() => ({
|
|
47168
47171
|
x: "max-content",
|
|
47169
|
-
y: X.length > 0 ?
|
|
47170
|
-
}), [
|
|
47171
|
-
(
|
|
47172
|
+
y: X.length > 0 ? re : void 0
|
|
47173
|
+
}), [re, se, X]), ue = useCallback(
|
|
47174
|
+
(ie) => E.includes(ie[m]) ? H : "",
|
|
47172
47175
|
[E, H, JSON.stringify(m)]
|
|
47173
47176
|
), pe = useCallback(
|
|
47174
|
-
(
|
|
47175
|
-
const oe =
|
|
47176
|
-
O(oe), g == null || g(
|
|
47177
|
+
(ie, te) => {
|
|
47178
|
+
const oe = ie ? [...R, te[F.getPrimaryKey()]] : R.filter((le) => te[F.getPrimaryKey()] !== le);
|
|
47179
|
+
O(oe), g == null || g(ie, te);
|
|
47177
47180
|
},
|
|
47178
47181
|
[R, g, F]
|
|
47179
|
-
),
|
|
47182
|
+
), ce = useMemo(() => ({
|
|
47180
47183
|
onExpand: pe,
|
|
47181
47184
|
expandedRowKeys: R
|
|
47182
47185
|
}), [R, pe]);
|
|
@@ -47185,9 +47188,9 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47185
47188
|
/* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
|
|
47186
47189
|
InternalNocoBaseTable,
|
|
47187
47190
|
P(x(x({
|
|
47188
|
-
tableHeight:
|
|
47189
|
-
SortableWrapper:
|
|
47190
|
-
tableSizeRefCallback:
|
|
47191
|
+
tableHeight: re,
|
|
47192
|
+
SortableWrapper: ee,
|
|
47193
|
+
tableSizeRefCallback: de,
|
|
47191
47194
|
defaultRowKey: K,
|
|
47192
47195
|
dataSource: X
|
|
47193
47196
|
}, S), ne), {
|
|
@@ -47195,10 +47198,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47195
47198
|
components: Z,
|
|
47196
47199
|
onTableChange: d,
|
|
47197
47200
|
onRow: U,
|
|
47198
|
-
rowClassName:
|
|
47199
|
-
scroll:
|
|
47201
|
+
rowClassName: ue,
|
|
47202
|
+
scroll: ae,
|
|
47200
47203
|
columns: j,
|
|
47201
|
-
expandable:
|
|
47204
|
+
expandable: ce,
|
|
47202
47205
|
field: y,
|
|
47203
47206
|
size: I
|
|
47204
47207
|
})
|
|
@@ -47627,15 +47630,15 @@ AssociationSelect.Designer = function e() {
|
|
|
47627
47630
|
},
|
|
47628
47631
|
onSubmit: (Y) => {
|
|
47629
47632
|
var ne;
|
|
47630
|
-
const X = [], J = (
|
|
47631
|
-
for (const
|
|
47632
|
-
X.push(_.pickBy(
|
|
47633
|
+
const X = [], J = (ee) => ee != null && !Number.isNaN(ee);
|
|
47634
|
+
for (const ee of Y.rules)
|
|
47635
|
+
X.push(_.pickBy(ee, J));
|
|
47633
47636
|
const Z = {
|
|
47634
47637
|
"x-uid": u["x-uid"]
|
|
47635
47638
|
};
|
|
47636
47639
|
if (["percent"].includes(S == null ? void 0 : S.interface))
|
|
47637
|
-
for (const
|
|
47638
|
-
(
|
|
47640
|
+
for (const ee of X)
|
|
47641
|
+
(ee.maxValue || ee.minValue) && (ee.percentMode = !0), ee.percentFormat && (ee.percentFormats = !0);
|
|
47639
47642
|
const Q = _.concat([], ((ne = S == null ? void 0 : S.uiSchema) == null ? void 0 : ne["x-validator"]) || [], X);
|
|
47640
47643
|
c.validator = Q, u["x-validator"] = X, Z["x-validator"] = X, m.emit("patch", {
|
|
47641
47644
|
schema: Z
|
|
@@ -54726,11 +54729,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54726
54729
|
{
|
|
54727
54730
|
mode: "tags",
|
|
54728
54731
|
value: ne,
|
|
54729
|
-
onChange: (
|
|
54730
|
-
const
|
|
54731
|
-
new Set(
|
|
54732
|
+
onChange: (ee) => {
|
|
54733
|
+
const re = Array.from(
|
|
54734
|
+
new Set(ee.map((de) => String(de).trim()).filter(Boolean))
|
|
54732
54735
|
);
|
|
54733
|
-
U.value === "allow" ? F(M.key, "tlds", { allow:
|
|
54736
|
+
U.value === "allow" ? F(M.key, "tlds", { allow: re }) : F(M.key, "tlds", { deny: re });
|
|
54734
54737
|
},
|
|
54735
54738
|
tokenSeparators: [",", " ", `
|
|
54736
54739
|
`, " "],
|