@nocobase/client 1.6.30 → 1.6.31
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/application/RouterManager.d.ts +1 -1
- package/es/index.mjs +751 -742
- package/lib/index.js +6 -6
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -6047,7 +6047,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6047
6047
|
return { label: (F = i(v)) == null ? void 0 : F.title, value: v };
|
|
6048
6048
|
});
|
|
6049
6049
|
}
|
|
6050
|
-
const p = (y, { exclude: v = [], depth: F = 0, maxDepth: I, prefix:
|
|
6050
|
+
const p = (y, { exclude: v = [], depth: F = 0, maxDepth: I, prefix: R = "" }) => F > I ? [] : o(y).map((T) => {
|
|
6051
6051
|
var j;
|
|
6052
6052
|
if (v.includes(T.name) || !T.interface || ["sort", "password", "sequence"].includes(T.type) || n && n(T))
|
|
6053
6053
|
return;
|
|
@@ -6057,7 +6057,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6057
6057
|
}, O = P(x({}, D), {
|
|
6058
6058
|
role: "button",
|
|
6059
6059
|
title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
|
|
6060
|
-
key:
|
|
6060
|
+
key: R ? `${R}.${T.name}` : T.name,
|
|
6061
6061
|
isLeaf: !0,
|
|
6062
6062
|
field: T
|
|
6063
6063
|
});
|
|
@@ -6072,9 +6072,9 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6072
6072
|
prefix: O.key,
|
|
6073
6073
|
exclude: ["id", ...systemKeys]
|
|
6074
6074
|
})), O;
|
|
6075
|
-
}).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude:
|
|
6075
|
+
}).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: R = [] }) => I > F ? [] : o(y).map((T) => {
|
|
6076
6076
|
var j;
|
|
6077
|
-
if (!T.target || !T.interface ||
|
|
6077
|
+
if (!T.target || !T.interface || R.includes(T.name))
|
|
6078
6078
|
return;
|
|
6079
6079
|
const D = {
|
|
6080
6080
|
type: "preloading",
|
|
@@ -6090,7 +6090,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6090
6090
|
prefix: O,
|
|
6091
6091
|
depth: I + 1,
|
|
6092
6092
|
maxDepth: F,
|
|
6093
|
-
exclude:
|
|
6093
|
+
exclude: R
|
|
6094
6094
|
})
|
|
6095
6095
|
};
|
|
6096
6096
|
}).filter(Boolean), h = (y) => y.map((v) => P(x({}, v), {
|
|
@@ -6099,11 +6099,11 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6099
6099
|
children: v.children ? h(v.children) : null
|
|
6100
6100
|
})), g = useCallback((y, v, F) => {
|
|
6101
6101
|
var T, D;
|
|
6102
|
-
const I = v.index,
|
|
6102
|
+
const I = v.index, R = (D = (T = u.initialValue) == null ? void 0 : T.items) == null ? void 0 : D[I];
|
|
6103
6103
|
if (!y)
|
|
6104
6104
|
return [];
|
|
6105
|
-
if (
|
|
6106
|
-
return h(F ||
|
|
6105
|
+
if (R != null && R.treeData || F)
|
|
6106
|
+
return h(F || R.treeData);
|
|
6107
6107
|
try {
|
|
6108
6108
|
return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
|
|
6109
6109
|
} catch (O) {
|
|
@@ -6131,7 +6131,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6131
6131
|
const O = a(T.interface);
|
|
6132
6132
|
if (!(O != null && O.filterable))
|
|
6133
6133
|
return;
|
|
6134
|
-
const { nested: j, children: N, operators: B } = O.filterable,
|
|
6134
|
+
const { nested: j, children: N, operators: B } = O.filterable, w = {
|
|
6135
6135
|
name: T.name,
|
|
6136
6136
|
title: ((M = T == null ? void 0 : T.uiSchema) == null ? void 0 : M.title) || T.name,
|
|
6137
6137
|
schema: T == null ? void 0 : T.uiSchema,
|
|
@@ -6140,12 +6140,12 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6140
6140
|
};
|
|
6141
6141
|
if (!(T.target && D > 2)) {
|
|
6142
6142
|
if (D > 2)
|
|
6143
|
-
return
|
|
6144
|
-
if (N != null && N.length && (
|
|
6143
|
+
return w;
|
|
6144
|
+
if (N != null && N.length && (w.children = N), j) {
|
|
6145
6145
|
const k = o(T.target), z = I(k, D + 1).filter(Boolean);
|
|
6146
|
-
|
|
6146
|
+
w.children = w.children || [], w.children.push(...z);
|
|
6147
6147
|
}
|
|
6148
|
-
return
|
|
6148
|
+
return w;
|
|
6149
6149
|
}
|
|
6150
6150
|
}, I = (T, D) => {
|
|
6151
6151
|
const O = [];
|
|
@@ -6157,7 +6157,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6157
6157
|
return I(v, 1);
|
|
6158
6158
|
},
|
|
6159
6159
|
useTitleFieldDataSource: (y) => {
|
|
6160
|
-
const v = y.path.entire.replace("titleField", "collection"), F = y.query(v).get("value"),
|
|
6160
|
+
const v = y.path.entire.replace("titleField", "collection"), F = y.query(v).get("value"), R = o(F).filter((T) => {
|
|
6161
6161
|
var D;
|
|
6162
6162
|
return (D = a(T.interface)) == null ? void 0 : D.titleUsable;
|
|
6163
6163
|
}).map((T) => {
|
|
@@ -6167,7 +6167,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6167
6167
|
label: c((D = T == null ? void 0 : T.uiSchema) == null ? void 0 : D.title) || (T == null ? void 0 : T.name)
|
|
6168
6168
|
};
|
|
6169
6169
|
});
|
|
6170
|
-
y.dataSource =
|
|
6170
|
+
y.dataSource = R;
|
|
6171
6171
|
}
|
|
6172
6172
|
};
|
|
6173
6173
|
};
|
|
@@ -6636,7 +6636,7 @@ function useRecordRequest(e) {
|
|
|
6636
6636
|
'[nocobase]: The "filterByTk" parameter is missing in the "DataBlockRequestProvider" component'
|
|
6637
6637
|
);
|
|
6638
6638
|
const F = r.filterByTk === void 0 ? _.omit(r, "filterByTk") : r;
|
|
6639
|
-
return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((
|
|
6639
|
+
return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((R) => R.data);
|
|
6640
6640
|
};
|
|
6641
6641
|
return useRequest((...v) => V(this, null, function* () {
|
|
6642
6642
|
const [F, I] = yield Promise.all([
|
|
@@ -6802,7 +6802,7 @@ const mergeFilter = (e, t = "$and") => {
|
|
|
6802
6802
|
r.forEach((h) => {
|
|
6803
6803
|
var y, v, F, I;
|
|
6804
6804
|
let g = d;
|
|
6805
|
-
const f = n.find((
|
|
6805
|
+
const f = n.find((R) => R.uid === h.uid);
|
|
6806
6806
|
if (!f)
|
|
6807
6807
|
return;
|
|
6808
6808
|
_.isFunction(u) && (u = u(f, h, getSourceKey$1(m, f.field))), _.isFunction(d) && (g = d(f, h)), _.isFunction(p) && (p = p(f));
|
|
@@ -6820,7 +6820,7 @@ const mergeFilter = (e, t = "$and") => {
|
|
|
6820
6820
|
else if ((I = h.clearSelection) == null || I.call(h), delete b[o], h.dataLoadingMode === "manual")
|
|
6821
6821
|
return h.clearData();
|
|
6822
6822
|
const S = mergeFilter([
|
|
6823
|
-
...Object.values(b).map((
|
|
6823
|
+
...Object.values(b).map((R) => removeNullCondition(R)),
|
|
6824
6824
|
h.defaultFilter
|
|
6825
6825
|
]);
|
|
6826
6826
|
h.doFilter(
|
|
@@ -7423,7 +7423,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
|
|
|
7423
7423
|
case ActionType.Value:
|
|
7424
7424
|
{
|
|
7425
7425
|
const I = () => V(void 0, null, function* () {
|
|
7426
|
-
var
|
|
7426
|
+
var R;
|
|
7427
7427
|
if ((t == null ? void 0 : t.mode) === "express") {
|
|
7428
7428
|
if ((t.value || t.result) == null)
|
|
7429
7429
|
return;
|
|
@@ -7437,7 +7437,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
|
|
|
7437
7437
|
console.error(O);
|
|
7438
7438
|
}
|
|
7439
7439
|
} else
|
|
7440
|
-
return (t == null ? void 0 : t.mode) === "constant" ? (
|
|
7440
|
+
return (t == null ? void 0 : t.mode) === "constant" ? (R = t == null ? void 0 : t.value) != null ? R : t : null;
|
|
7441
7441
|
});
|
|
7442
7442
|
isConditionEmpty(o) ? p.push(getTempFieldState(!0, I())) : p.push(getTempFieldState(conditionAnalyses(h, l), I())), n.stateOfLinkageRules = P(x({}, n.stateOfLinkageRules), {
|
|
7443
7443
|
value: p
|
|
@@ -8553,7 +8553,7 @@ function withInitializer(e) {
|
|
|
8553
8553
|
S ? S(y(M, { isInSubTable: i })) : r(d, y(M, { isInSubTable: i }), { onSuccess: p });
|
|
8554
8554
|
},
|
|
8555
8555
|
[S, y, i, r, d, p]
|
|
8556
|
-
), { wrapSSR: F, hashId: I, componentCls:
|
|
8556
|
+
), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: O } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), N = useMemo(
|
|
8557
8557
|
() => x({
|
|
8558
8558
|
options: n,
|
|
8559
8559
|
style: C
|
|
@@ -8569,7 +8569,7 @@ function withInitializer(e) {
|
|
|
8569
8569
|
padding: 0;
|
|
8570
8570
|
}
|
|
8571
8571
|
}
|
|
8572
|
-
`, [O.paddingXXS]),
|
|
8572
|
+
`, [O.paddingXXS]), w = useMemo(
|
|
8573
8573
|
() => ({
|
|
8574
8574
|
maxHeight: j,
|
|
8575
8575
|
overflowY: "auto"
|
|
@@ -8604,7 +8604,7 @@ function withInitializer(e) {
|
|
|
8604
8604
|
open: T,
|
|
8605
8605
|
onOpenChange: D,
|
|
8606
8606
|
content: F(
|
|
8607
|
-
/* @__PURE__ */ jsx("div", { className: `${
|
|
8607
|
+
/* @__PURE__ */ jsx("div", { className: `${R} ${I}`, style: w, children: /* @__PURE__ */ jsx(
|
|
8608
8608
|
ConfigProvider,
|
|
8609
8609
|
{
|
|
8610
8610
|
theme: {
|
|
@@ -9218,7 +9218,7 @@ function addAppVersion(e, t) {
|
|
|
9218
9218
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9219
9219
|
}), e;
|
|
9220
9220
|
}
|
|
9221
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9221
|
+
const name = "@nocobase/client", version = "1.6.31", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9222
9222
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9223
9223
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9224
9224
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9240,9 +9240,9 @@ const name = "@nocobase/client", version = "1.6.30", license = "AGPL-3.0", main
|
|
|
9240
9240
|
"@formily/reactive-react": "^2.2.27",
|
|
9241
9241
|
"@formily/shared": "^2.2.27",
|
|
9242
9242
|
"@formily/validator": "^2.2.27",
|
|
9243
|
-
"@nocobase/evaluators": "1.6.
|
|
9244
|
-
"@nocobase/sdk": "1.6.
|
|
9245
|
-
"@nocobase/utils": "1.6.
|
|
9243
|
+
"@nocobase/evaluators": "1.6.31",
|
|
9244
|
+
"@nocobase/sdk": "1.6.31",
|
|
9245
|
+
"@nocobase/utils": "1.6.31",
|
|
9246
9246
|
ahooks: "^3.7.2",
|
|
9247
9247
|
antd: "5.12.8",
|
|
9248
9248
|
"antd-style": "3.7.1",
|
|
@@ -10055,8 +10055,8 @@ function useAssociationFieldContext() {
|
|
|
10055
10055
|
return useContext(AssociationFieldContext);
|
|
10056
10056
|
}
|
|
10057
10057
|
function useServiceOptions$1(e) {
|
|
10058
|
-
var g, f, C, b, S, y, v, F, I,
|
|
10059
|
-
const { action: t = "list", service: n, useOriginalFilter: o } = e, r = useFieldSchema(), i = useField(), { getField: a } = useCollection_deprecated(), { getCollectionJoinField: l } = useCollectionManager_deprecated(), c = useRecord(), u = (isString((C = (f = (g = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : g.service) == null ? void 0 : f.params) == null ? void 0 : C.filter) ? (y = (S = (b = i.componentProps) == null ? void 0 : b.service) == null ? void 0 : S.params) == null ? void 0 : y.filter : (I = (F = (v = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : v.service) == null ? void 0 : F.params) == null ? void 0 : I.filter) || ((
|
|
10058
|
+
var g, f, C, b, S, y, v, F, I, R;
|
|
10059
|
+
const { action: t = "list", service: n, useOriginalFilter: o } = e, r = useFieldSchema(), i = useField(), { getField: a } = useCollection_deprecated(), { getCollectionJoinField: l } = useCollectionManager_deprecated(), c = useRecord(), u = (isString((C = (f = (g = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : g.service) == null ? void 0 : f.params) == null ? void 0 : C.filter) ? (y = (S = (b = i.componentProps) == null ? void 0 : b.service) == null ? void 0 : S.params) == null ? void 0 : y.filter : (I = (F = (v = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : v.service) == null ? void 0 : F.params) == null ? void 0 : I.filter) || ((R = n == null ? void 0 : n.params) == null ? void 0 : R.filter), { filter: d } = useParsedFilter({ filterOption: u }), p = useMemo(() => a(r.name) || l(r == null ? void 0 : r["x-collection-field"]), [r]), m = c == null ? void 0 : c[p == null ? void 0 : p.sourceKey], h = useMemo(() => {
|
|
10060
10060
|
const T = ["oho", "o2m"].includes(p == null ? void 0 : p.interface);
|
|
10061
10061
|
return mergeFilter(
|
|
10062
10062
|
[
|
|
@@ -10265,11 +10265,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10265
10265
|
}
|
|
10266
10266
|
`, [n.paddingContentVerticalLG, n.marginSM, n.margin]), C = useCollection(), b = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
|
|
10267
10267
|
() => u == null ? void 0 : u.map((v) => {
|
|
10268
|
-
var j, N, B,
|
|
10268
|
+
var j, N, B, w;
|
|
10269
10269
|
const F = v.reduceProperties((M, $) => {
|
|
10270
10270
|
if (isCollectionFieldComponent($))
|
|
10271
10271
|
return M.concat([$]);
|
|
10272
|
-
}, []), I = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name,
|
|
10272
|
+
}, []), I = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, R = !!((j = v["x-component-props"]) != null && j.columnHidden), { uiSchema: T, defaultValue: D, interface: O } = (C == null ? void 0 : C.getField(I)) || {};
|
|
10273
10273
|
return T && (T.default = D), P(x({
|
|
10274
10274
|
title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
|
|
10275
10275
|
b,
|
|
@@ -10284,9 +10284,9 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10284
10284
|
dataIndex: I,
|
|
10285
10285
|
key: v.name,
|
|
10286
10286
|
sorter: (B = v["x-component-props"]) == null ? void 0 : B.sorter,
|
|
10287
|
-
columnHidden:
|
|
10287
|
+
columnHidden: R
|
|
10288
10288
|
}, v["x-component-props"]), {
|
|
10289
|
-
width:
|
|
10289
|
+
width: R && !a ? 0 : ((w = v["x-component-props"]) == null ? void 0 : w.width) || 100,
|
|
10290
10290
|
render: (M, $, k) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
|
|
10291
10291
|
TableCellRender,
|
|
10292
10292
|
{
|
|
@@ -10303,10 +10303,10 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10303
10303
|
record: M,
|
|
10304
10304
|
schema: v,
|
|
10305
10305
|
rowIndex: $,
|
|
10306
|
-
columnHidden:
|
|
10306
|
+
columnHidden: R
|
|
10307
10307
|
}),
|
|
10308
10308
|
onHeaderCell: () => ({
|
|
10309
|
-
columnHidden:
|
|
10309
|
+
columnHidden: R
|
|
10310
10310
|
})
|
|
10311
10311
|
});
|
|
10312
10312
|
}),
|
|
@@ -10340,13 +10340,13 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10340
10340
|
width: 60,
|
|
10341
10341
|
align: "center",
|
|
10342
10342
|
fixed: "right",
|
|
10343
|
-
render: (F, I,
|
|
10343
|
+
render: (F, I, R) => {
|
|
10344
10344
|
if (e.showDel(I))
|
|
10345
10345
|
return /* @__PURE__ */ jsx(
|
|
10346
10346
|
"div",
|
|
10347
10347
|
{
|
|
10348
10348
|
onClick: () => action(() => {
|
|
10349
|
-
const T = (d - 1) * p +
|
|
10349
|
+
const T = (d - 1) * p + R, D = o.value[T] ? 1 : 2;
|
|
10350
10350
|
return spliceArrayState(o, {
|
|
10351
10351
|
startIndex: T,
|
|
10352
10352
|
deleteCount: D
|
|
@@ -10396,7 +10396,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10396
10396
|
const o = e, { index: t } = o, n = Y(o, ["index"]);
|
|
10397
10397
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
10398
10398
|
}, pageSizeOptions$3 = [5, 10, 20, 50, 100, 200], usePaginationProps$3 = (e, t, n) => {
|
|
10399
|
-
var S, y, v, F, I,
|
|
10399
|
+
var S, y, v, F, I, R;
|
|
10400
10400
|
const { t: o } = useTranslation();
|
|
10401
10401
|
useField();
|
|
10402
10402
|
const { token: r } = useToken$1(), { meta: i } = useDataBlockRequestData() || {}, { hasNext: a } = i || {}, l = useMemo(
|
|
@@ -10443,7 +10443,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10443
10443
|
) : j
|
|
10444
10444
|
});
|
|
10445
10445
|
}, [l, o, f, (I = n.value) == null ? void 0 : I.length, C]);
|
|
10446
|
-
return t === !1 || !t && e === !1 ? !1 : ((
|
|
10446
|
+
return t === !1 || !t && e === !1 ? !1 : ((R = n.value) == null ? void 0 : R.length) > 0 || b.total ? b : !1;
|
|
10447
10447
|
}, headerClass$1 = css`
|
|
10448
10448
|
max-width: 300px;
|
|
10449
10449
|
white-space: nowrap;
|
|
@@ -10667,7 +10667,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10667
10667
|
"onClickRow",
|
|
10668
10668
|
"value"
|
|
10669
10669
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: O } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10670
|
-
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [
|
|
10670
|
+
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [w, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]), q = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10671
10671
|
& > td {
|
|
10672
10672
|
background-color: ${t.controlItemBgActive} !important;
|
|
10673
10673
|
}
|
|
@@ -10693,7 +10693,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10693
10693
|
}), [C, z]);
|
|
10694
10694
|
useDeepCompareEffect(() => {
|
|
10695
10695
|
const Q = D ? O : [];
|
|
10696
|
-
_.isEqual(Q,
|
|
10696
|
+
_.isEqual(Q, w) || M(Q);
|
|
10697
10697
|
}, [D, O]);
|
|
10698
10698
|
const K = useCallback((Q) => {
|
|
10699
10699
|
if (m)
|
|
@@ -10821,14 +10821,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10821
10821
|
[z, H, JSON.stringify(m)]
|
|
10822
10822
|
), he = useCallback(
|
|
10823
10823
|
(Q, te) => {
|
|
10824
|
-
const oe = Q ? [...
|
|
10824
|
+
const oe = Q ? [...w, te[I.getPrimaryKey()]] : w.filter((ie) => te[I.getPrimaryKey()] !== ie);
|
|
10825
10825
|
M(oe), g == null || g(Q, te);
|
|
10826
10826
|
},
|
|
10827
|
-
[
|
|
10827
|
+
[w, g, I]
|
|
10828
10828
|
), ge = useMemo(() => ({
|
|
10829
10829
|
onExpand: he,
|
|
10830
|
-
expandedRowKeys:
|
|
10831
|
-
}), [
|
|
10830
|
+
expandedRowKeys: w
|
|
10831
|
+
}), [w, he]);
|
|
10832
10832
|
return (
|
|
10833
10833
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10834
10834
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
@@ -10884,64 +10884,67 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10884
10884
|
childrenColumnName: i,
|
|
10885
10885
|
expandFlag: a = !1,
|
|
10886
10886
|
fieldNames: l,
|
|
10887
|
-
collection: c
|
|
10888
|
-
|
|
10887
|
+
collection: c,
|
|
10888
|
+
association: u
|
|
10889
|
+
} = e, d = useField(), { resource: p, service: m } = useBlockRequestContext(), h = useFieldSchema(), [g, f] = useState(!!(l || a)), { heightProps: C } = useBlockHeightProps(), b = useRef(null);
|
|
10889
10890
|
useEffect(() => {
|
|
10890
|
-
|
|
10891
|
+
f(l || a);
|
|
10891
10892
|
}, [l || a]);
|
|
10892
|
-
const
|
|
10893
|
-
var
|
|
10894
|
-
const { treeTable:
|
|
10895
|
-
if (
|
|
10896
|
-
return getIdsWithChildren(
|
|
10897
|
-
}, [
|
|
10898
|
-
(
|
|
10899
|
-
|
|
10893
|
+
const S = useMemo(() => {
|
|
10894
|
+
var T;
|
|
10895
|
+
const { treeTable: I } = (h == null ? void 0 : h["x-decorator-props"]) || {}, R = (T = m == null ? void 0 : m.data) == null ? void 0 : T.data;
|
|
10896
|
+
if (I)
|
|
10897
|
+
return getIdsWithChildren(R);
|
|
10898
|
+
}, [m == null ? void 0 : m.loading, h]), y = useCallback(
|
|
10899
|
+
(I) => {
|
|
10900
|
+
f(I || !g);
|
|
10900
10901
|
},
|
|
10901
|
-
[
|
|
10902
|
-
),
|
|
10902
|
+
[g]
|
|
10903
|
+
), v = useMemo(
|
|
10903
10904
|
() => ({
|
|
10904
|
-
field:
|
|
10905
|
+
field: d,
|
|
10905
10906
|
rowKey: r,
|
|
10906
10907
|
childrenColumnName: i,
|
|
10907
10908
|
showIndex: n,
|
|
10908
10909
|
dragSort: o,
|
|
10909
10910
|
dragSortBy: e.dragSortBy
|
|
10910
10911
|
}),
|
|
10911
|
-
[
|
|
10912
|
-
),
|
|
10912
|
+
[d, r, i, n, o, e.dragSortBy]
|
|
10913
|
+
), F = useMemo(
|
|
10913
10914
|
() => ({
|
|
10914
10915
|
collection: c,
|
|
10915
|
-
field:
|
|
10916
|
-
service:
|
|
10917
|
-
resource:
|
|
10916
|
+
field: d,
|
|
10917
|
+
service: m,
|
|
10918
|
+
resource: p,
|
|
10918
10919
|
params: t,
|
|
10919
10920
|
showIndex: n,
|
|
10920
10921
|
dragSort: o,
|
|
10921
10922
|
rowKey: r,
|
|
10922
|
-
expandFlag:
|
|
10923
|
+
expandFlag: g,
|
|
10923
10924
|
childrenColumnName: i,
|
|
10924
|
-
allIncludesChildren:
|
|
10925
|
-
setExpandFlag:
|
|
10926
|
-
heightProps:
|
|
10925
|
+
allIncludesChildren: S,
|
|
10926
|
+
setExpandFlag: y,
|
|
10927
|
+
heightProps: C,
|
|
10928
|
+
association: u
|
|
10927
10929
|
}),
|
|
10928
10930
|
[
|
|
10929
|
-
|
|
10931
|
+
S,
|
|
10930
10932
|
i,
|
|
10931
10933
|
c,
|
|
10932
10934
|
o,
|
|
10933
|
-
|
|
10934
|
-
u,
|
|
10935
|
-
f,
|
|
10936
|
-
t,
|
|
10935
|
+
g,
|
|
10937
10936
|
d,
|
|
10938
|
-
|
|
10937
|
+
C,
|
|
10938
|
+
t,
|
|
10939
10939
|
p,
|
|
10940
|
-
|
|
10941
|
-
|
|
10940
|
+
r,
|
|
10941
|
+
m,
|
|
10942
|
+
y,
|
|
10943
|
+
n,
|
|
10944
|
+
u
|
|
10942
10945
|
]
|
|
10943
10946
|
);
|
|
10944
|
-
return /* @__PURE__ */ jsx(TableElementRefContext.Provider, { value:
|
|
10947
|
+
return /* @__PURE__ */ jsx(TableElementRefContext.Provider, { value: b, children: /* @__PURE__ */ jsx(TableBlockContext.Provider, { value: F, children: /* @__PURE__ */ jsx(TableBlockContextBasicValue.Provider, { value: v, children: e.children }) }) });
|
|
10945
10948
|
}, useTableBlockParamsCompat = (e) => {
|
|
10946
10949
|
const t = useFieldSchema();
|
|
10947
10950
|
let n, o = !1;
|
|
@@ -11419,14 +11422,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11419
11422
|
].filter(Boolean).map((c) => encodePathValue(c)).join("/")}`;
|
|
11420
11423
|
}, usePopupUtils = (e = {}) => {
|
|
11421
11424
|
const t = useNavigateNoUpdate(), n = useLocationNoUpdate(), o = useFieldSchema(), r = useDataSourceKey(), i = useCollectionRecord(), a = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m, currentLevel: h = 0 } = useCurrentPopupContext(), { getDataBlockRequest: g } = useDataBlockRequestGetter(), { isPopupVisibleControlledByURL: f } = usePopupSettings(), { setVisible: C } = useContext(ActionContext), { updatePopupContext: b } = usePopupContextInActionOrAssociationField(), S = useCurrentPopupContext(), y = useCallback(
|
|
11422
|
-
(
|
|
11425
|
+
(w) => {
|
|
11423
11426
|
var M;
|
|
11424
|
-
return (M =
|
|
11427
|
+
return (M = w || (a == null ? void 0 : a.data)) == null ? void 0 : M[c.getSourceKeyByAssociation(u)];
|
|
11425
11428
|
},
|
|
11426
11429
|
[a, u]
|
|
11427
|
-
), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C,
|
|
11430
|
+
), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, R = useCallback(
|
|
11428
11431
|
({
|
|
11429
|
-
tabKey:
|
|
11432
|
+
tabKey: w,
|
|
11430
11433
|
popupUid: M,
|
|
11431
11434
|
recordData: $,
|
|
11432
11435
|
sourceId: k,
|
|
@@ -11440,20 +11443,20 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11440
11443
|
collection: z,
|
|
11441
11444
|
filterbytk: q,
|
|
11442
11445
|
sourceid: k,
|
|
11443
|
-
tab:
|
|
11446
|
+
tab: w
|
|
11444
11447
|
});
|
|
11445
11448
|
},
|
|
11446
11449
|
[u, c, l, r, a == null ? void 0 : a.data, u]
|
|
11447
11450
|
), T = useCallback(() => {
|
|
11448
|
-
const
|
|
11451
|
+
const w = {
|
|
11449
11452
|
dataSource: r,
|
|
11450
11453
|
collection: u || l == null ? void 0 : l.name,
|
|
11451
11454
|
association: u
|
|
11452
11455
|
};
|
|
11453
|
-
return _.omitBy(
|
|
11456
|
+
return _.omitBy(w, _.isNil);
|
|
11454
11457
|
}, [r, l, u]), D = useCallback(
|
|
11455
11458
|
({
|
|
11456
|
-
recordData:
|
|
11459
|
+
recordData: w,
|
|
11457
11460
|
parentRecordData: M,
|
|
11458
11461
|
collectionNameUsedInURL: $,
|
|
11459
11462
|
popupUidUsedInURL: k,
|
|
@@ -11462,10 +11465,10 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11462
11465
|
if (!f())
|
|
11463
11466
|
return I == null ? void 0 : I(!0);
|
|
11464
11467
|
const E = z || o, q = E == null ? void 0 : E["x-uid"], L = y(M);
|
|
11465
|
-
|
|
11466
|
-
const G =
|
|
11468
|
+
w = w || (i == null ? void 0 : i.data);
|
|
11469
|
+
const G = R({
|
|
11467
11470
|
popupUid: q,
|
|
11468
|
-
recordData:
|
|
11471
|
+
recordData: w,
|
|
11469
11472
|
sourceId: L,
|
|
11470
11473
|
collection: $,
|
|
11471
11474
|
puid: k
|
|
@@ -11473,7 +11476,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11473
11476
|
let U = n.pathname;
|
|
11474
11477
|
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
|
|
11475
11478
|
schema: E,
|
|
11476
|
-
record: new CollectionRecord({ isNew: !1, data:
|
|
11479
|
+
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
11477
11480
|
parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
|
|
11478
11481
|
service: g(),
|
|
11479
11482
|
dataSource: r,
|
|
@@ -11498,7 +11501,7 @@ ${JSON.stringify(E, null, 2)}`
|
|
|
11498
11501
|
l,
|
|
11499
11502
|
r,
|
|
11500
11503
|
o,
|
|
11501
|
-
|
|
11504
|
+
R,
|
|
11502
11505
|
t,
|
|
11503
11506
|
a,
|
|
11504
11507
|
i,
|
|
@@ -11523,9 +11526,9 @@ ${JSON.stringify(E, null, 2)}`
|
|
|
11523
11526
|
h,
|
|
11524
11527
|
m == null ? void 0 : m.popupuid
|
|
11525
11528
|
]), j = useCallback(
|
|
11526
|
-
(
|
|
11527
|
-
const M = y(), $ =
|
|
11528
|
-
tabKey:
|
|
11529
|
+
(w) => {
|
|
11530
|
+
const M = y(), $ = R({
|
|
11531
|
+
tabKey: w,
|
|
11529
11532
|
popupUid: m == null ? void 0 : m.popupuid,
|
|
11530
11533
|
recordData: i == null ? void 0 : i.data,
|
|
11531
11534
|
sourceId: M
|
|
@@ -11535,10 +11538,10 @@ ${JSON.stringify(E, null, 2)}`
|
|
|
11535
11538
|
replace: !0
|
|
11536
11539
|
});
|
|
11537
11540
|
},
|
|
11538
|
-
[
|
|
11539
|
-
), N = useCallback((
|
|
11540
|
-
M.__popup =
|
|
11541
|
-
}, []), B = useCallback((
|
|
11541
|
+
[R, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
|
|
11542
|
+
), N = useCallback((w, M) => {
|
|
11543
|
+
M.__popup = w;
|
|
11544
|
+
}, []), B = useCallback((w) => w.__popup, []);
|
|
11542
11545
|
return {
|
|
11543
11546
|
/**
|
|
11544
11547
|
* used to open popup by changing the url
|
|
@@ -12001,7 +12004,7 @@ const DrawerErrorFallback = (e) => {
|
|
|
12001
12004
|
ActionDrawerContent.displayName = "ActionDrawerContent";
|
|
12002
12005
|
const InternalActionDrawer = observer$1(
|
|
12003
12006
|
(e) => {
|
|
12004
|
-
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = Y(F, ["footerNodeName", "zIndex", "onClose"]), { visible: i, setVisible: a, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$h(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((I,
|
|
12007
|
+
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = Y(F, ["footerNodeName", "zIndex", "onClose"]), { visible: i, setVisible: a, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$h(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((I, R) => R["x-component"] === t ? R : I), { hidden: C } = useCurrentPopupContext(), b = useMemo(() => P(x(x({}, c == null ? void 0 : c.style), r == null ? void 0 : r.style), {
|
|
12005
12008
|
display: C ? "none" : "block"
|
|
12006
12009
|
}), [C, c == null ? void 0 : c.style, r == null ? void 0 : r.style]), S = getZIndex("drawer", n || g, e.level || 0), y = useCallback(
|
|
12007
12010
|
(I) => {
|
|
@@ -12111,7 +12114,7 @@ function useDelayedVisible(e, t = 200) {
|
|
|
12111
12114
|
}
|
|
12112
12115
|
const InternalActionModal = observer$1(
|
|
12113
12116
|
(e) => {
|
|
12114
|
-
const F = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = F, i = Y(F, ["footerNodeName", "width", "zIndex", "delay"]), { visible: a, setVisible: l, openSize: c = "middle", modalProps: u } = useActionContext(), d = n != null ? n : openSizeWidthMap.get(c), p = useFieldSchema(), m = useField(), { token: h } = useToken(), g = useTabsContext(), f = useZIndexContext(), C = p.reduceProperties((I,
|
|
12117
|
+
const F = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = F, i = Y(F, ["footerNodeName", "width", "zIndex", "delay"]), { visible: a, setVisible: l, openSize: c = "middle", modalProps: u } = useActionContext(), d = n != null ? n : openSizeWidthMap.get(c), p = useFieldSchema(), m = useField(), { token: h } = useToken(), g = useTabsContext(), f = useZIndexContext(), C = p.reduceProperties((I, R) => R["x-component"] === t ? R : I), { hidden: b } = useCurrentPopupContext(), S = !!C, y = getZIndex("modal", o || f, e.level || 0), v = useDelayedVisible(a, r);
|
|
12115
12118
|
return /* @__PURE__ */ jsx(ActionContextNoRerender, { children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: y, children: /* @__PURE__ */ jsx(TabsContextProvider, P(x({}, g), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
|
|
12116
12119
|
Modal,
|
|
12117
12120
|
P(x(x({
|
|
@@ -13105,7 +13108,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13105
13108
|
var z = k.id, E = getOwn(l, z);
|
|
13106
13109
|
return E || (E = l[z] = new o.Module(k)), E;
|
|
13107
13110
|
}
|
|
13108
|
-
function
|
|
13111
|
+
function R(k, z, E) {
|
|
13109
13112
|
var q = k.id, L = getOwn(l, q);
|
|
13110
13113
|
hasProp(p, q) && (!L || L.defineEmitComplete) ? z === "defined" && E(p[q]) : (L = I(k), L.error && z === "error" ? E(L.error) : L.on(z, E));
|
|
13111
13114
|
}
|
|
@@ -13240,7 +13243,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13240
13243
|
},
|
|
13241
13244
|
callPlugin: function() {
|
|
13242
13245
|
var k = this.map, z = k.id, E = F(k.prefix);
|
|
13243
|
-
this.depMaps.push(E),
|
|
13246
|
+
this.depMaps.push(E), R(E, "defined", bind(this, function(q) {
|
|
13244
13247
|
var L, G, U, H = getOwn(h, this.map.id), J = this.map.name, K = this.map.parentMap ? this.map.parentMap.name : null, W = o.makeRequire(k.parentMap, {
|
|
13245
13248
|
enableBuildCallback: !0
|
|
13246
13249
|
});
|
|
@@ -13251,7 +13254,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13251
13254
|
k.prefix + "!" + J,
|
|
13252
13255
|
this.map.parentMap,
|
|
13253
13256
|
!0
|
|
13254
|
-
),
|
|
13257
|
+
), R(
|
|
13255
13258
|
G,
|
|
13256
13259
|
"defined",
|
|
13257
13260
|
bind(this, function(X) {
|
|
@@ -13311,9 +13314,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13311
13314
|
this.depExports[z] = L(this);
|
|
13312
13315
|
return;
|
|
13313
13316
|
}
|
|
13314
|
-
this.depCount += 1,
|
|
13317
|
+
this.depCount += 1, R(k, "defined", bind(this, function(G) {
|
|
13315
13318
|
this.undefed || (this.defineDep(z, G), this.check());
|
|
13316
|
-
})), this.errback ?
|
|
13319
|
+
})), this.errback ? R(k, "error", bind(this, this.errback)) : this.events.error && R(k, "error", bind(this, function(G) {
|
|
13317
13320
|
this.emit("error", G);
|
|
13318
13321
|
}));
|
|
13319
13322
|
}
|
|
@@ -13336,12 +13339,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13336
13339
|
function B(k) {
|
|
13337
13340
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
13338
13341
|
}
|
|
13339
|
-
function
|
|
13342
|
+
function w(k, z, E, q) {
|
|
13340
13343
|
k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(E, z, !1);
|
|
13341
13344
|
}
|
|
13342
13345
|
function M(k) {
|
|
13343
13346
|
var z = k.currentTarget || k.srcElement;
|
|
13344
|
-
return
|
|
13347
|
+
return w(z, o.onScriptLoad, "load", "onreadystatechange"), w(z, o.onScriptError, "error"), {
|
|
13345
13348
|
node: z,
|
|
13346
13349
|
id: z && z.getAttribute("data-requiremodule")
|
|
13347
13350
|
};
|
|
@@ -15060,8 +15063,8 @@ const useDragEnd = (e) => {
|
|
|
15060
15063
|
const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
|
|
15061
15064
|
return useCallback(
|
|
15062
15065
|
(r) => {
|
|
15063
|
-
var f, C, b, S, y, v, F, I,
|
|
15064
|
-
const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = a == null ? void 0 : a.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (T = (
|
|
15066
|
+
var f, C, b, S, y, v, F, I, R, T, D, O, j, N, B;
|
|
15067
|
+
const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = a == null ? void 0 : a.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (T = (R = a == null ? void 0 : a.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = (O = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : O.onSuccess, h = (B = (N = (j = a == null ? void 0 : a.data) == null ? void 0 : j.current) == null ? void 0 : N.removeParentsIfNoChildren) != null ? B : !0;
|
|
15065
15068
|
if (!l || !c) {
|
|
15066
15069
|
e == null || e(r);
|
|
15067
15070
|
return;
|
|
@@ -15077,7 +15080,7 @@ const useDragEnd = (e) => {
|
|
|
15077
15080
|
const g = createDesignable({
|
|
15078
15081
|
t: o,
|
|
15079
15082
|
api: n,
|
|
15080
|
-
refresh: ({ refreshParentSchema:
|
|
15083
|
+
refresh: ({ refreshParentSchema: w = !0 } = {}) => t({ refreshParentSchema: w }),
|
|
15081
15084
|
current: c
|
|
15082
15085
|
});
|
|
15083
15086
|
if (g.loadAPIClientEvents(), l.parent === c.parent) {
|
|
@@ -15175,14 +15178,14 @@ GridColContext.displayName = "GridColContext";
|
|
|
15175
15178
|
const GridContext = createContext({});
|
|
15176
15179
|
GridContext.displayName = "GridContext";
|
|
15177
15180
|
const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow = (e) => e["x-component"] === "Grid.Row", ColDivider = (e) => {
|
|
15178
|
-
var F, I,
|
|
15181
|
+
var F, I, R;
|
|
15179
15182
|
const { token: t } = useToken$1(), n = useRef(null), { dn: o, designable: r } = useDesignable(), { isOver: i, setNodeRef: a } = useDroppable({
|
|
15180
15183
|
id: e.id,
|
|
15181
15184
|
data: e.data,
|
|
15182
15185
|
disabled: !r
|
|
15183
15186
|
}), l = useRef(), c = useMemo(() => i ? {
|
|
15184
15187
|
backgroundColor: new TinyColor(t.colorSettings).setAlpha(0.1).toHex8String()
|
|
15185
|
-
} : {}, [i]), d = (
|
|
15188
|
+
} : {}, [i]), d = (R = (I = (F = useDndContext().active) == null ? void 0 : F.data.current) == null ? void 0 : I.schema) == null ? void 0 : R.parent, p = useMemo(
|
|
15186
15189
|
() => d ? Object.keys(d.properties).length : 0,
|
|
15187
15190
|
[d]
|
|
15188
15191
|
);
|
|
@@ -15229,8 +15232,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15229
15232
|
return;
|
|
15230
15233
|
const D = l.current, O = D.previousElementSibling, j = D.nextElementSibling;
|
|
15231
15234
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
15232
|
-
const N = D.clientWidth * (e.cols.length + 1) / e.cols.length, B = (100 * (O.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2),
|
|
15233
|
-
_.set(h, "x-component-props.width", B), _.set(g, "x-component-props.width",
|
|
15235
|
+
const N = D.clientWidth * (e.cols.length + 1) / e.cols.length, B = (100 * (O.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2), w = (100 * (j.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2);
|
|
15236
|
+
_.set(h, "x-component-props.width", B), _.set(g, "x-component-props.width", w), o.emit("batchPatch", {
|
|
15234
15237
|
schemas: [
|
|
15235
15238
|
{
|
|
15236
15239
|
"x-uid": h["x-uid"],
|
|
@@ -15544,32 +15547,32 @@ const useTableBlockProps = () => {
|
|
|
15544
15547
|
),
|
|
15545
15548
|
onChange: useCallback(
|
|
15546
15549
|
({ current: S, pageSize: y }, v, F) => {
|
|
15547
|
-
var O, j, N, B,
|
|
15548
|
-
const I = (N = (j = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : N.sort,
|
|
15549
|
-
|
|
15550
|
+
var O, j, N, B, w, M, $, k, z, E;
|
|
15551
|
+
const I = (N = (j = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || i.dragSortBy, T = y || ((M = (w = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.pageSize), D = P(x({}, (z = (k = ($ = a.current) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z[0]), { page: S || 1, pageSize: T });
|
|
15552
|
+
R && (D.sort = R), (E = a.current) == null || E.service.run(D);
|
|
15550
15553
|
},
|
|
15551
15554
|
[t.parent]
|
|
15552
15555
|
),
|
|
15553
15556
|
onClickRow: useCallback(
|
|
15554
15557
|
(S, y, v) => {
|
|
15555
|
-
const { targets: F, uid: I } = findFilterTargets(t),
|
|
15556
|
-
if (!F || !F.some((D) =>
|
|
15558
|
+
const { targets: F, uid: I } = findFilterTargets(t), R = r();
|
|
15559
|
+
if (!F || !F.some((D) => R.some((O) => O.uid === D.uid))) {
|
|
15557
15560
|
y((D) => D.length ? [] : D);
|
|
15558
15561
|
return;
|
|
15559
15562
|
}
|
|
15560
|
-
const T =
|
|
15561
|
-
|
|
15563
|
+
const T = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
15564
|
+
R.forEach((D) => {
|
|
15562
15565
|
var $, k, z, E;
|
|
15563
15566
|
const O = F.find((q) => q.uid === D.uid);
|
|
15564
15567
|
if (!O)
|
|
15565
15568
|
return;
|
|
15566
|
-
const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {},
|
|
15569
|
+
const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
|
|
15567
15570
|
if (v.includes(S[i.rowKey])) {
|
|
15568
15571
|
if ((E = D.clearSelection) == null || E.call(D), D.dataLoadingMode === "manual")
|
|
15569
15572
|
return D.clearData();
|
|
15570
|
-
delete
|
|
15573
|
+
delete w[I];
|
|
15571
15574
|
} else
|
|
15572
|
-
|
|
15575
|
+
w[I] = {
|
|
15573
15576
|
$and: [
|
|
15574
15577
|
{
|
|
15575
15578
|
[O.field || i.rowKey]: {
|
|
@@ -15579,7 +15582,7 @@ const useTableBlockProps = () => {
|
|
|
15579
15582
|
]
|
|
15580
15583
|
};
|
|
15581
15584
|
const M = mergeFilter([
|
|
15582
|
-
...Object.values(
|
|
15585
|
+
...Object.values(w).map((q) => removeNullCondition(q)),
|
|
15583
15586
|
D.defaultFilter
|
|
15584
15587
|
]);
|
|
15585
15588
|
return D.doFilter(
|
|
@@ -15587,7 +15590,7 @@ const useTableBlockProps = () => {
|
|
|
15587
15590
|
page: 1,
|
|
15588
15591
|
filter: M
|
|
15589
15592
|
}),
|
|
15590
|
-
{ filters:
|
|
15593
|
+
{ filters: w }
|
|
15591
15594
|
);
|
|
15592
15595
|
}), y(
|
|
15593
15596
|
(D) => D != null && D.includes(S[i.rowKey]) ? [] : [S[i.rowKey]]
|
|
@@ -15670,12 +15673,12 @@ const NOOP = () => {
|
|
|
15670
15673
|
return;
|
|
15671
15674
|
const v = t(i);
|
|
15672
15675
|
if (setFieldProps(n, "content", v["x-content"]), setFieldProps(n, "title", v.title), setFieldProps(n, "description", v.description), m != null && m.form) {
|
|
15673
|
-
const
|
|
15674
|
-
|
|
15676
|
+
const R = c() ? o.default || a : void 0;
|
|
15677
|
+
R != null && setFieldProps(n, "initialValue", R);
|
|
15675
15678
|
}
|
|
15676
15679
|
if (!n.validator && (v["x-validator"] || o["x-validator"])) {
|
|
15677
|
-
const
|
|
15678
|
-
n.validator =
|
|
15680
|
+
const R = concat([], v["x-validator"] || [], o["x-validator"] || []);
|
|
15681
|
+
n.validator = R;
|
|
15679
15682
|
}
|
|
15680
15683
|
o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired(n, o, v), n.dataSource = v.enum;
|
|
15681
15684
|
const F = t(x(x(x({}, ((I = d == null ? void 0 : d.schema) == null ? void 0 : I["x-component-props"]) || {}), v["x-component-props"] || {}), (o == null ? void 0 : o["x-component-props"]) || {})) || {};
|
|
@@ -15971,10 +15974,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15971
15974
|
var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
15972
15975
|
const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent$1(n, "CollectionField"), i = o(r == null ? void 0 : r["x-collection-field"]);
|
|
15973
15976
|
return useEffect(() => {
|
|
15974
|
-
var
|
|
15975
|
-
if (!((
|
|
15977
|
+
var R, T, D, O, j, N, B, w, M, $, k, z, E;
|
|
15978
|
+
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
15976
15979
|
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
|
|
15977
|
-
e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (
|
|
15980
|
+
e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
|
|
15978
15981
|
}
|
|
15979
15982
|
}, [
|
|
15980
15983
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -15991,21 +15994,21 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15991
15994
|
dragSort: !1,
|
|
15992
15995
|
rowKey: t.rowKey || "id",
|
|
15993
15996
|
pagination: ((F = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : F.pagination) === !1 ? !1 : e.componentProps.pagination,
|
|
15994
|
-
onRowSelectionChange(
|
|
15997
|
+
onRowSelectionChange(R, T) {
|
|
15995
15998
|
var D;
|
|
15996
|
-
t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys =
|
|
15999
|
+
t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = R, t.field.data.selectedRowData = T;
|
|
15997
16000
|
},
|
|
15998
16001
|
onRowDragEnd(D) {
|
|
15999
|
-
return V(this, arguments, function* ({ from:
|
|
16002
|
+
return V(this, arguments, function* ({ from: R, to: T }) {
|
|
16000
16003
|
yield t.resource.move({
|
|
16001
|
-
sourceId:
|
|
16004
|
+
sourceId: R[t.rowKey || "id"],
|
|
16002
16005
|
targetId: T[t.rowKey || "id"]
|
|
16003
16006
|
}), t.service.refresh();
|
|
16004
16007
|
});
|
|
16005
16008
|
},
|
|
16006
|
-
onChange({ current:
|
|
16009
|
+
onChange({ current: R, pageSize: T }) {
|
|
16007
16010
|
var D;
|
|
16008
|
-
t.service.run(P(x({}, (D = t.service.params) == null ? void 0 : D[0]), { page:
|
|
16011
|
+
t.service.run(P(x({}, (D = t.service.params) == null ? void 0 : D[0]), { page: R, pageSize: T }));
|
|
16009
16012
|
}
|
|
16010
16013
|
};
|
|
16011
16014
|
}, BlockSchemaComponentProvider = (e) => /* @__PURE__ */ jsx(
|
|
@@ -16757,7 +16760,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16757
16760
|
var d, p;
|
|
16758
16761
|
const { name: t, currentFields: n } = useCollection_deprecated(), { getInterface: o, getCollection: r } = useCollectionManager_deprecated(), i = useForm(), { readPretty: a = i.readPretty, block: l = "Form" } = e || {}, { fieldSchema: c } = useActionContext(), u = c == null ? void 0 : c["x-action"];
|
|
16759
16762
|
return (p = (d = n.filter((m) => !m.collectionName || m.collectionName === t)) == null ? void 0 : d.filter((m) => (m == null ? void 0 : m.interface) && !(m != null && m.treeChildren))) == null ? void 0 : p.map((m) => {
|
|
16760
|
-
var v, F, I,
|
|
16763
|
+
var v, F, I, R, T;
|
|
16761
16764
|
const h = o(m.interface), g = r(m.target), f = (m == null ? void 0 : m.target) && ((v = r(m == null ? void 0 : m.target)) == null ? void 0 : v.template) === "file", C = g, b = (I = (F = m == null ? void 0 : m.uiSchema) == null ? void 0 : F["x-component-props"]) == null ? void 0 : I.fieldNames, S = {
|
|
16762
16765
|
type: "string",
|
|
16763
16766
|
name: m.name,
|
|
@@ -16774,7 +16777,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16774
16777
|
} : C && b ? {
|
|
16775
16778
|
fieldNames: P(x({}, b), { label: (g == null ? void 0 : g.titleField) || b.label })
|
|
16776
16779
|
} : {},
|
|
16777
|
-
"x-read-pretty": (
|
|
16780
|
+
"x-read-pretty": (R = m == null ? void 0 : m.uiSchema) == null ? void 0 : R["x-read-pretty"]
|
|
16778
16781
|
}, y = {
|
|
16779
16782
|
type: "item",
|
|
16780
16783
|
name: m.name,
|
|
@@ -16943,9 +16946,9 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16943
16946
|
title: ((I = f == null ? void 0 : f.uiSchema) == null ? void 0 : I.title) || f.name,
|
|
16944
16947
|
Component: "CollectionFieldInitializer",
|
|
16945
16948
|
remove: removeGridFormItem,
|
|
16946
|
-
schemaInitialize: (
|
|
16949
|
+
schemaInitialize: (R) => {
|
|
16947
16950
|
var T;
|
|
16948
|
-
(T = C == null ? void 0 : C.schemaInitialize) == null || T.call(C,
|
|
16951
|
+
(T = C == null ? void 0 : C.schemaInitialize) == null || T.call(C, R, {
|
|
16949
16952
|
field: f,
|
|
16950
16953
|
block: p,
|
|
16951
16954
|
readPretty: d,
|
|
@@ -16991,8 +16994,8 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16991
16994
|
Component: "CollectionFieldInitializer",
|
|
16992
16995
|
remove: removeGridFormItem,
|
|
16993
16996
|
schemaInitialize: (I) => {
|
|
16994
|
-
var
|
|
16995
|
-
(
|
|
16997
|
+
var R;
|
|
16998
|
+
(R = f == null ? void 0 : f.schemaInitialize) == null || R.call(f, I, {
|
|
16996
16999
|
field: g,
|
|
16997
17000
|
block: p,
|
|
16998
17001
|
readPretty: d,
|
|
@@ -17141,9 +17144,9 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17141
17144
|
filterDataSource: i
|
|
17142
17145
|
});
|
|
17143
17146
|
o && (y = y.filter((I) => I.key === f));
|
|
17144
|
-
const { getTemplatesByCollection: v } = useSchemaTemplateManager(), F = useMemo(() => y.map(({ key: I, displayName:
|
|
17147
|
+
const { getTemplatesByCollection: v } = useSchemaTemplateManager(), F = useMemo(() => y.map(({ key: I, displayName: R, collections: T }) => ({
|
|
17145
17148
|
name: I,
|
|
17146
|
-
label:
|
|
17149
|
+
label: R,
|
|
17147
17150
|
type: "subMenu",
|
|
17148
17151
|
children: [
|
|
17149
17152
|
...getChildren$1({
|
|
@@ -17181,7 +17184,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17181
17184
|
hideChildrenIfSingleCollection: !0,
|
|
17182
17185
|
items: F
|
|
17183
17186
|
})
|
|
17184
|
-
},
|
|
17187
|
+
}, R = {
|
|
17185
17188
|
name: "associationRecords",
|
|
17186
17189
|
Component: DataBlockInitializer,
|
|
17187
17190
|
// 目的是使点击无效
|
|
@@ -17220,7 +17223,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17220
17223
|
hideChildrenIfSingleCollection: !1,
|
|
17221
17224
|
fromOthersInPopup: !0,
|
|
17222
17225
|
componentType: T[t] || t,
|
|
17223
|
-
filter({ collection: B, associationField:
|
|
17226
|
+
filter({ collection: B, associationField: w }) {
|
|
17224
17227
|
return u ? u(B) : !0;
|
|
17225
17228
|
},
|
|
17226
17229
|
onClick(B) {
|
|
@@ -17229,7 +17232,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17229
17232
|
})
|
|
17230
17233
|
};
|
|
17231
17234
|
let O;
|
|
17232
|
-
const j = b.length ?
|
|
17235
|
+
const j = b.length ? R : null;
|
|
17233
17236
|
if (F[0].children.length && b.length)
|
|
17234
17237
|
l ? O = [I, j] : O = [I, j, D];
|
|
17235
17238
|
else if (F[0].children.length)
|
|
@@ -17704,9 +17707,9 @@ function getGroupItemForForm({
|
|
|
17704
17707
|
title: ((I = C == null ? void 0 : C.uiSchema) == null ? void 0 : I.title) || C.name,
|
|
17705
17708
|
Component: "CollectionFieldInitializer",
|
|
17706
17709
|
remove: removeGridFormItem,
|
|
17707
|
-
schemaInitialize: (
|
|
17710
|
+
schemaInitialize: (R) => {
|
|
17708
17711
|
var T;
|
|
17709
|
-
(T = b == null ? void 0 : b.schemaInitialize) == null || T.call(b,
|
|
17712
|
+
(T = b == null ? void 0 : b.schemaInitialize) == null || T.call(b, R, {
|
|
17710
17713
|
field: C,
|
|
17711
17714
|
block: i,
|
|
17712
17715
|
readPretty: r,
|
|
@@ -17977,7 +17980,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17977
17980
|
}, { render: C, exists: b } = useSchemaSettingsRender(
|
|
17978
17981
|
t["x-settings"] || i,
|
|
17979
17982
|
t["x-settings-props"]
|
|
17980
|
-
), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(),
|
|
17983
|
+
), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(), R = (F == null ? void 0 : F.length) > 1 && I, T = ["FormItem", "ReadPrettyFormItem"].includes(r == null ? void 0 : r.componentName) ? `${r == null ? void 0 : r.name} ${m("(Fields only)")}` : r == null ? void 0 : r.name, D = useMemo(() => {
|
|
17981
17984
|
var N;
|
|
17982
17985
|
return {
|
|
17983
17986
|
insertPosition: "afterEnd",
|
|
@@ -17994,7 +17997,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17994
17997
|
}, [g, (O = S == null ? void 0 : S.cols) == null ? void 0 : O.length]);
|
|
17995
17998
|
return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, a), { children: /* @__PURE__ */ jsxs("div", { className: cls("general-schema-designer", overrideAntdCSS), children: [
|
|
17996
17999
|
o && /* @__PURE__ */ jsx("div", { className: cls("general-schema-designer-title", titleCss), children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
|
|
17997
|
-
/* @__PURE__ */ jsx("span", { className: "title-tag", children: c &&
|
|
18000
|
+
/* @__PURE__ */ jsx("span", { className: "title-tag", children: c && R ? `${h(R == null ? void 0 : R.displayName)} > ${h(o)}` : h(o) }),
|
|
17998
18001
|
r && /* @__PURE__ */ jsxs("span", { className: "title-tag", children: [
|
|
17999
18002
|
m("Reference template"),
|
|
18000
18003
|
": ",
|
|
@@ -18037,7 +18040,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18037
18040
|
toolbarClassName: m,
|
|
18038
18041
|
toolbarStyle: h = {},
|
|
18039
18042
|
container: g
|
|
18040
|
-
} = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$f(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(),
|
|
18043
|
+
} = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$f(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(), R = useDataSource(), T = (I == null ? void 0 : I.length) > 1 && R, D = useRefreshFieldSchema(), O = useCallback(() => {
|
|
18041
18044
|
D({ refreshParentSchema: !0 });
|
|
18042
18045
|
}, [D]), j = useMemo(() => {
|
|
18043
18046
|
if (n) {
|
|
@@ -18049,7 +18052,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18049
18052
|
}, [n]), { render: N, exists: B } = useSchemaSettingsRender(
|
|
18050
18053
|
r || (t == null ? void 0 : t["x-settings"]),
|
|
18051
18054
|
t == null ? void 0 : t["x-settings-props"]
|
|
18052
|
-
), { render:
|
|
18055
|
+
), { render: w, exists: M } = useSchemaInitializerRender(
|
|
18053
18056
|
o || (t == null ? void 0 : t["x-initializer"]),
|
|
18054
18057
|
t == null ? void 0 : t["x-initializer-props"]
|
|
18055
18058
|
), $ = useGridRowContext(), k = useGridContext(), z = useMemo(() => {
|
|
@@ -18071,10 +18074,10 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18071
18074
|
if (o === !1)
|
|
18072
18075
|
return null;
|
|
18073
18076
|
if (M)
|
|
18074
|
-
return
|
|
18077
|
+
return w(z);
|
|
18075
18078
|
if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
|
|
18076
18079
|
return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
|
|
18077
|
-
}, [k, o, z, M,
|
|
18080
|
+
}, [k, o, z, M, w]), L = useMemo(() => r !== !1 && B ? N() : null, [B, N, r]), G = useRef(null), U = "hidden";
|
|
18078
18081
|
useEffect(() => {
|
|
18079
18082
|
const K = G.current;
|
|
18080
18083
|
let W = K == null ? void 0 : K.parentElement;
|
|
@@ -18151,23 +18154,23 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18151
18154
|
}, useCollectionManager_deprecated = (e) => {
|
|
18152
18155
|
const t = useDataSourceManager(), n = useDataSource(), o = useCollectionManager(), r = e || (n == null ? void 0 : n.key) || void 0, [i, a] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
|
|
18153
18156
|
() => {
|
|
18154
|
-
var
|
|
18155
|
-
return (
|
|
18157
|
+
var w;
|
|
18158
|
+
return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((M, $) => (M[$.name] = $, M), {});
|
|
18156
18159
|
},
|
|
18157
18160
|
[t, i]
|
|
18158
18161
|
), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, i]), d = useCallback(() => {
|
|
18159
|
-
var
|
|
18160
|
-
return (M = (
|
|
18162
|
+
var w, M;
|
|
18163
|
+
return (M = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections().map(($) => $.getOptions());
|
|
18161
18164
|
}, [t, n]), p = useCallback(
|
|
18162
|
-
(
|
|
18165
|
+
(w) => {
|
|
18163
18166
|
var M;
|
|
18164
|
-
return o && !
|
|
18167
|
+
return o && !w ? o : (M = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : M.collectionManager;
|
|
18165
18168
|
},
|
|
18166
18169
|
[o, t, r]
|
|
18167
18170
|
), m = useMemo(
|
|
18168
18171
|
() => {
|
|
18169
|
-
var
|
|
18170
|
-
return (M = (
|
|
18172
|
+
var w, M;
|
|
18173
|
+
return (M = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections();
|
|
18171
18174
|
},
|
|
18172
18175
|
[t, i]
|
|
18173
18176
|
), h = useCallback(
|
|
@@ -18181,55 +18184,55 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18181
18184
|
}),
|
|
18182
18185
|
[t]
|
|
18183
18186
|
), f = useCompile(), C = useCallback(
|
|
18184
|
-
(
|
|
18187
|
+
(w, M) => {
|
|
18185
18188
|
var $, k;
|
|
18186
|
-
return ((k = ($ = p(M)) == null ? void 0 : $.getCollection(
|
|
18189
|
+
return ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
|
|
18187
18190
|
},
|
|
18188
18191
|
[t, p]
|
|
18189
18192
|
), b = useCallback(
|
|
18190
|
-
(
|
|
18193
|
+
(w, M) => {
|
|
18191
18194
|
var k, z;
|
|
18192
|
-
if (!
|
|
18195
|
+
if (!w)
|
|
18193
18196
|
return [];
|
|
18194
|
-
const $ = (k = p(M)) == null ? void 0 : k.getCollection(
|
|
18197
|
+
const $ = (k = p(M)) == null ? void 0 : k.getCollection(w);
|
|
18195
18198
|
return ((z = $ == null ? void 0 : $.getAllFields) == null ? void 0 : z.call($)) || ($ == null ? void 0 : $.getFields()) || [];
|
|
18196
18199
|
},
|
|
18197
18200
|
[t, p]
|
|
18198
18201
|
), S = useCallback(
|
|
18199
|
-
(
|
|
18202
|
+
(w, M) => {
|
|
18200
18203
|
var $;
|
|
18201
|
-
if (!(!
|
|
18202
|
-
return ($ = p(M)) == null ? void 0 : $.getCollectionField(
|
|
18204
|
+
if (!(!w || w.split(".").length < 2))
|
|
18205
|
+
return ($ = p(M)) == null ? void 0 : $.getCollectionField(w);
|
|
18203
18206
|
},
|
|
18204
18207
|
[t, p]
|
|
18205
18208
|
), y = useCallback(
|
|
18206
|
-
(
|
|
18209
|
+
(w, M) => {
|
|
18207
18210
|
var $, k;
|
|
18208
|
-
return
|
|
18211
|
+
return w ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
|
|
18209
18212
|
},
|
|
18210
18213
|
[t, p]
|
|
18211
18214
|
), v = useCallback(
|
|
18212
|
-
(
|
|
18215
|
+
(w, M = !1, $) => {
|
|
18213
18216
|
var E;
|
|
18214
|
-
if (!
|
|
18217
|
+
if (!w)
|
|
18215
18218
|
return [];
|
|
18216
|
-
const k = (E = p($)) == null ? void 0 : E.getCollection(
|
|
18219
|
+
const k = (E = p($)) == null ? void 0 : E.getCollection(w);
|
|
18217
18220
|
return (k == null ? void 0 : k.getChildrenCollections(M)) || [];
|
|
18218
18221
|
},
|
|
18219
18222
|
[t, p]
|
|
18220
18223
|
), F = useCallback(
|
|
18221
|
-
(
|
|
18224
|
+
(w, M) => {
|
|
18222
18225
|
var $, k;
|
|
18223
|
-
return
|
|
18226
|
+
return w ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
|
|
18224
18227
|
},
|
|
18225
18228
|
[t, p]
|
|
18226
18229
|
), I = useCallback(
|
|
18227
|
-
(
|
|
18230
|
+
(w, M, $, k) => {
|
|
18228
18231
|
var ee;
|
|
18229
18232
|
const {
|
|
18230
18233
|
association: z = !1,
|
|
18231
18234
|
cached: E = {},
|
|
18232
|
-
collectionNames: q = [
|
|
18235
|
+
collectionNames: q = [w],
|
|
18233
18236
|
maxDepth: L = 1,
|
|
18234
18237
|
allowAllTypes: G = !1,
|
|
18235
18238
|
exceptInterfaces: U = [],
|
|
@@ -18239,11 +18242,11 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18239
18242
|
} = k || {};
|
|
18240
18243
|
if (q.length - 1 > L)
|
|
18241
18244
|
return;
|
|
18242
|
-
if (E[
|
|
18243
|
-
return _.cloneDeep(E[
|
|
18245
|
+
if (E[w])
|
|
18246
|
+
return _.cloneDeep(E[w]);
|
|
18244
18247
|
M && typeof M == "string" && (M = [M]), $ && typeof $ == "string" && ($ = [$]);
|
|
18245
|
-
const W = b(
|
|
18246
|
-
(Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !==
|
|
18248
|
+
const W = b(w, K), X = (ee = W == null ? void 0 : W.filter(
|
|
18249
|
+
(Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !== w && Array.isArray(z) ? z.includes(Z.interface) : !1))
|
|
18247
18250
|
)) == null ? void 0 : ee.map((Z) => {
|
|
18248
18251
|
var re, se;
|
|
18249
18252
|
const ne = x({
|
|
@@ -18258,44 +18261,44 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18258
18261
|
usePrefix: J
|
|
18259
18262
|
})), !((se = ne.children) != null && se.length)) ? null : ne;
|
|
18260
18263
|
}).filter(Boolean);
|
|
18261
|
-
return E[
|
|
18264
|
+
return E[w] = X, X;
|
|
18262
18265
|
},
|
|
18263
18266
|
[b]
|
|
18264
|
-
),
|
|
18265
|
-
(
|
|
18267
|
+
), R = useCallback(
|
|
18268
|
+
(w, M) => {
|
|
18266
18269
|
var $;
|
|
18267
|
-
return ($ = p(M)) == null ? void 0 : $.getCollection(
|
|
18270
|
+
return ($ = p(M)) == null ? void 0 : $.getCollection(w);
|
|
18268
18271
|
},
|
|
18269
18272
|
[t, p]
|
|
18270
18273
|
), T = useCallback(
|
|
18271
|
-
(
|
|
18274
|
+
(w, M) => {
|
|
18272
18275
|
var $, k;
|
|
18273
|
-
return (k = ($ = p(M)) == null ? void 0 : $.getCollection(
|
|
18276
|
+
return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
|
|
18274
18277
|
},
|
|
18275
18278
|
[t, p]
|
|
18276
18279
|
), D = useCallback(
|
|
18277
|
-
(
|
|
18280
|
+
(w, M) => () => {
|
|
18278
18281
|
var $, k;
|
|
18279
|
-
return (k = ($ = p(M)) == null ? void 0 : $.getCollection(
|
|
18282
|
+
return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
|
|
18280
18283
|
},
|
|
18281
18284
|
[t, p]
|
|
18282
18285
|
), O = useCallback(
|
|
18283
|
-
(
|
|
18286
|
+
(w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
|
|
18284
18287
|
[t]
|
|
18285
18288
|
), j = useCallback(
|
|
18286
|
-
(
|
|
18289
|
+
(w) => {
|
|
18287
18290
|
var M;
|
|
18288
|
-
return (M = O(
|
|
18291
|
+
return (M = O(w.interface)) == null ? void 0 : M.titleUsable;
|
|
18289
18292
|
},
|
|
18290
18293
|
[O]
|
|
18291
18294
|
), N = useCallback(
|
|
18292
|
-
(
|
|
18295
|
+
(w, M, $) => {
|
|
18293
18296
|
var k, z;
|
|
18294
|
-
return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(
|
|
18297
|
+
return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(w);
|
|
18295
18298
|
},
|
|
18296
18299
|
[t, p]
|
|
18297
18300
|
), B = useCallback(
|
|
18298
|
-
(
|
|
18301
|
+
(w = "general") => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplate(w),
|
|
18299
18302
|
[t]
|
|
18300
18303
|
);
|
|
18301
18304
|
return {
|
|
@@ -18310,13 +18313,13 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18310
18313
|
getInheritCollections: y,
|
|
18311
18314
|
getChildrenCollections: v,
|
|
18312
18315
|
refreshCM: g,
|
|
18313
|
-
get:
|
|
18316
|
+
get: R,
|
|
18314
18317
|
getInheritedFields: C,
|
|
18315
18318
|
getCollectionField: S,
|
|
18316
18319
|
getCollectionFields: b,
|
|
18317
18320
|
getCollectionFieldsOptions: I,
|
|
18318
18321
|
getCurrentCollectionFields: F,
|
|
18319
|
-
getCollection:
|
|
18322
|
+
getCollection: R,
|
|
18320
18323
|
getCollectionJoinField: S,
|
|
18321
18324
|
getAllCollectionsInheritChain: T,
|
|
18322
18325
|
getInheritCollectionsChain: D,
|
|
@@ -19470,7 +19473,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
19470
19473
|
collectionField: e,
|
|
19471
19474
|
noDisabled: r,
|
|
19472
19475
|
targetFieldSchema: i
|
|
19473
|
-
}), { settings:
|
|
19476
|
+
}), { settings: R, shouldDisplayParentPopupRecord: T } = useParentPopupVariable({
|
|
19474
19477
|
schema: n,
|
|
19475
19478
|
collectionField: e,
|
|
19476
19479
|
noDisabled: r,
|
|
@@ -19493,7 +19496,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
19493
19496
|
v && y,
|
|
19494
19497
|
O && D,
|
|
19495
19498
|
I && F,
|
|
19496
|
-
T &&
|
|
19499
|
+
T && R,
|
|
19497
19500
|
N && j
|
|
19498
19501
|
].filter(Boolean).filter(l), [
|
|
19499
19502
|
u,
|
|
@@ -19546,8 +19549,8 @@ const findOption$1 = (e = [], t) => {
|
|
|
19546
19549
|
if (n.data.dataIndex = b, (b == null ? void 0 : b.length) > 1) {
|
|
19547
19550
|
const I = b.concat();
|
|
19548
19551
|
I.pop();
|
|
19549
|
-
const
|
|
19550
|
-
i.collectionName =
|
|
19552
|
+
const R = t(`${e}.${I.join(".")}`);
|
|
19553
|
+
i.collectionName = R == null ? void 0 : R.target;
|
|
19551
19554
|
} else
|
|
19552
19555
|
i.collectionName = null;
|
|
19553
19556
|
n.data.operators = y, n.data.operator = v, n.data.schema = merge(S == null ? void 0 : S.schema, v == null ? void 0 : v.schema), n.data.value = get$1(unflatten(n.value), `${g}.$${C}`);
|
|
@@ -19701,7 +19704,7 @@ const findOption$1 = (e = [], t) => {
|
|
|
19701
19704
|
blockCollectionName: C
|
|
19702
19705
|
});
|
|
19703
19706
|
l && v.every((T) => T.value !== F.value) && v.push(F);
|
|
19704
|
-
const
|
|
19707
|
+
const R = useCallback(
|
|
19705
19708
|
(T, D) => {
|
|
19706
19709
|
if (!u)
|
|
19707
19710
|
return n(T);
|
|
@@ -19716,7 +19719,7 @@ const findOption$1 = (e = [], t) => {
|
|
|
19716
19719
|
{
|
|
19717
19720
|
className: a,
|
|
19718
19721
|
value: t,
|
|
19719
|
-
onChange:
|
|
19722
|
+
onChange: R,
|
|
19720
19723
|
scope: m(
|
|
19721
19724
|
I(_.isEmpty(b) ? v : b, {
|
|
19722
19725
|
value: t
|
|
@@ -20191,22 +20194,22 @@ const compatibleDataId = (e, t) => e == null ? void 0 : e.map((n) => {
|
|
|
20191
20194
|
),
|
|
20192
20195
|
[]
|
|
20193
20196
|
), f = (F) => {
|
|
20194
|
-
var
|
|
20197
|
+
var R;
|
|
20195
20198
|
const I = p(F);
|
|
20196
20199
|
return m(
|
|
20197
|
-
`${F}.${((
|
|
20200
|
+
`${F}.${((R = g == null ? void 0 : g.config[F]) == null ? void 0 : R.titleField) || (I == null ? void 0 : I.titleField) || "id"}`
|
|
20198
20201
|
);
|
|
20199
20202
|
}, C = (F) => {
|
|
20200
|
-
var
|
|
20203
|
+
var R, T;
|
|
20201
20204
|
const I = p(F);
|
|
20202
20205
|
return {
|
|
20203
|
-
label: getLabel(((T = (
|
|
20206
|
+
label: getLabel(((T = (R = g.config) == null ? void 0 : R[F]) == null ? void 0 : T.titleField) || (I == null ? void 0 : I.titleField) || "id"),
|
|
20204
20207
|
value: "id"
|
|
20205
20208
|
};
|
|
20206
20209
|
}, b = (F, I) => {
|
|
20207
20210
|
var T, D;
|
|
20208
|
-
const
|
|
20209
|
-
return _.isEmpty(
|
|
20211
|
+
const R = (D = (T = g.config) == null ? void 0 : T[F]) == null ? void 0 : D.filter;
|
|
20212
|
+
return _.isEmpty(R) ? {} : removeNullCondition(mergeFilter([R, getSelectedIdFilter(I)], "$or"));
|
|
20210
20213
|
}, S = useMemo(() => ({ ArrayCollapse: ArrayCollapse$1 }), []), y = useMemo(
|
|
20211
20214
|
() => ({
|
|
20212
20215
|
getEnableFieldTree: a,
|
|
@@ -20579,11 +20582,11 @@ const DynamicComponent$1 = (e) => {
|
|
|
20579
20582
|
[a, o]
|
|
20580
20583
|
), f = useMemo(() => ({ minWidth: 150, maxWidth: 430, fontSize: 13 }), []), C = useCallback(
|
|
20581
20584
|
(I) => {
|
|
20582
|
-
const
|
|
20585
|
+
const R = I.replaceAll(`${r}.`, "").replaceAll("$system.", "").trim();
|
|
20583
20586
|
o({
|
|
20584
20587
|
mode: a,
|
|
20585
20588
|
value: I,
|
|
20586
|
-
result:
|
|
20589
|
+
result: R
|
|
20587
20590
|
});
|
|
20588
20591
|
},
|
|
20589
20592
|
[r, a, o]
|
|
@@ -21578,7 +21581,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21578
21581
|
)
|
|
21579
21582
|
] });
|
|
21580
21583
|
}, SchemaSettingsActionModalItem = React.memo((e) => {
|
|
21581
|
-
const
|
|
21584
|
+
const w = e, {
|
|
21582
21585
|
title: t,
|
|
21583
21586
|
onSubmit: n,
|
|
21584
21587
|
width: o = "50%",
|
|
@@ -21589,7 +21592,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21589
21592
|
modalTip: c,
|
|
21590
21593
|
components: u,
|
|
21591
21594
|
scope: d
|
|
21592
|
-
} =
|
|
21595
|
+
} = w, p = Y(w, [
|
|
21593
21596
|
"title",
|
|
21594
21597
|
"onSubmit",
|
|
21595
21598
|
"width",
|
|
@@ -21600,7 +21603,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21600
21603
|
"modalTip",
|
|
21601
21604
|
"components",
|
|
21602
21605
|
"scope"
|
|
21603
|
-
]), [m, h] = useState(!1), [g, f] = useState(e.uid), { t: C } = useTranslation(), b = useFieldSchema(), S = useContext(SchemaSettingsContext), { dn: y } = useSchemaSettings(), v = useCompile(), F = useAPIClient(), I = useFormActiveFields(),
|
|
21606
|
+
]), [m, h] = useState(!1), [g, f] = useState(e.uid), { t: C } = useTranslation(), b = useFieldSchema(), S = useContext(SchemaSettingsContext), { dn: y } = useSchemaSettings(), v = useCompile(), F = useAPIClient(), I = useFormActiveFields(), R = useZIndexContext(), T = getZIndex("modal", R + 10, 0), D = useMemo(
|
|
21604
21607
|
() => createForm({
|
|
21605
21608
|
initialValues: cloneDeep$1(r),
|
|
21606
21609
|
values: cloneDeep$1(r)
|
|
@@ -21687,7 +21690,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21687
21690
|
"width",
|
|
21688
21691
|
"noRecord",
|
|
21689
21692
|
"ModalContextProvider"
|
|
21690
|
-
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(),
|
|
21693
|
+
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), O = useFormBlockContext(), j = useBlockContext(), { getOperators: N } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), E = useParentPopupRecord();
|
|
21691
21694
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21692
21695
|
SchemaSettingsItem,
|
|
21693
21696
|
P(x({
|
|
@@ -21697,7 +21700,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21697
21700
|
const L = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21698
21701
|
FormDialog(
|
|
21699
21702
|
{ title: G.title || n, width: u },
|
|
21700
|
-
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value:
|
|
21703
|
+
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
|
|
21701
21704
|
VariablePopupRecordProvider,
|
|
21702
21705
|
{
|
|
21703
21706
|
recordData: z == null ? void 0 : z.value,
|
|
@@ -21706,7 +21709,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21706
21709
|
recordData: E == null ? void 0 : E.value,
|
|
21707
21710
|
collection: E == null ? void 0 : E.collection
|
|
21708
21711
|
},
|
|
21709
|
-
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null :
|
|
21712
|
+
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: M, collection: $, parent: k }, children: /* @__PURE__ */ jsx(
|
|
21710
21713
|
FormActiveFieldsProvider,
|
|
21711
21714
|
{
|
|
21712
21715
|
name: "form",
|
|
@@ -21862,10 +21865,10 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21862
21865
|
const { collectionName: n, readPretty: o, Component: r, afterSubmit: i } = t, a = useFieldSchema(), { form: l } = useFormBlockContext(), { dn: c } = useDesignable(), { t: u } = useTranslation(), { getTemplateById: d } = useSchemaTemplateManager(), p = useVariables$1(), m = useLocalVariables$1(), h = useRecord(), { type: g } = useFormBlockType(), f = (j = t == null ? void 0 : t.category) != null ? j : LinkageRuleCategory.default, C = (t == null ? void 0 : t.type) || (a != null && a["x-action"] || ["Action", "Action.Link"].includes(a["x-component"]) ? "button" : "field"), b = findGridSchema(a) || a, S = useLinkageCollectionFilterOptions(n), y = useLinkageCollectionFieldOptions(n, o), v = {
|
|
21863
21866
|
[LinkageRuleCategory.default]: u("Linkage rules"),
|
|
21864
21867
|
[LinkageRuleCategory.style]: u("Style")
|
|
21865
|
-
}, F = LinkageRuleDataKeyMap[f], I = useCallback(() => (b == null ? void 0 : b[F]) || (a == null ? void 0 : a[F]) || [], [b, a, F]),
|
|
21868
|
+
}, F = LinkageRuleDataKeyMap[f], I = useCallback(() => (b == null ? void 0 : b[F]) || (a == null ? void 0 : a[F]) || [], [b, a, F]), R = v[f], T = useMemo(
|
|
21866
21869
|
() => ({
|
|
21867
21870
|
type: "object",
|
|
21868
|
-
title:
|
|
21871
|
+
title: R,
|
|
21869
21872
|
properties: {
|
|
21870
21873
|
fieldReaction: {
|
|
21871
21874
|
"x-component": r || FormLinkageRules,
|
|
@@ -21892,8 +21895,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21892
21895
|
const B = [];
|
|
21893
21896
|
for (const z of N.fieldReaction.rules)
|
|
21894
21897
|
B.push(_.pickBy(z, _.identity));
|
|
21895
|
-
const
|
|
21896
|
-
"x-uid":
|
|
21898
|
+
const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), $ = {
|
|
21899
|
+
"x-uid": w && d(w).uid || b["x-uid"]
|
|
21897
21900
|
};
|
|
21898
21901
|
b[F] = B, $[F] = B, c.emit("patch", {
|
|
21899
21902
|
schema: $
|
|
@@ -21901,7 +21904,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21901
21904
|
},
|
|
21902
21905
|
[c, d, b, F, i]
|
|
21903
21906
|
);
|
|
21904
|
-
return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title:
|
|
21907
|
+
return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: O });
|
|
21905
21908
|
}, useDataTemplates = (e) => {
|
|
21906
21909
|
const t = useFieldSchema();
|
|
21907
21910
|
if (e)
|
|
@@ -22395,7 +22398,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
|
|
|
22395
22398
|
}
|
|
22396
22399
|
}
|
|
22397
22400
|
], SchemaSettingsDateFormat = function e(t) {
|
|
22398
|
-
var h, g, f, C, b, S, y, v, F, I,
|
|
22401
|
+
var h, g, f, C, b, S, y, v, F, I, R, T;
|
|
22399
22402
|
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), l = a(n == null ? void 0 : n["x-collection-field"]) || {}, c = (h = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : h.showTime, u = ((g = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : g.dateFormat) || ((C = (f = l == null ? void 0 : l.uiSchema) == null ? void 0 : f["x-component-props"]) == null ? void 0 : C.dateFormat) || "YYYY-MM-DD", d = ((b = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : b.timeFormat) || ((y = (S = l == null ? void 0 : l.uiSchema) == null ? void 0 : S["x-component-props"]) == null ? void 0 : y.timeFormat) || "HH:mm:ss", p = ((v = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : v.picker) || ((I = (F = l == null ? void 0 : l.uiSchema) == null ? void 0 : F["x-component-props"]) == null ? void 0 : I.picker) || "date", m = n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
22400
22403
|
return /* @__PURE__ */ jsx(
|
|
22401
22404
|
SchemaSettingsModalItem,
|
|
@@ -22489,7 +22492,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
|
|
|
22489
22492
|
}
|
|
22490
22493
|
},
|
|
22491
22494
|
showTime: {
|
|
22492
|
-
default: c === void 0 ? (T = (
|
|
22495
|
+
default: c === void 0 ? (T = (R = l == null ? void 0 : l.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : T.showTime : c,
|
|
22493
22496
|
type: "boolean",
|
|
22494
22497
|
"x-decorator": "FormItem",
|
|
22495
22498
|
"x-component": "Checkbox",
|
|
@@ -22591,20 +22594,20 @@ const getActionContext = (e) => {
|
|
|
22591
22594
|
var k, z, E;
|
|
22592
22595
|
const n = useFieldSchema(), o = (k = t == null ? void 0 : t.fieldSchema) != null ? k : n, r = useField(), { dn: i } = useDesignable(), { t: a } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
22593
22596
|
let u;
|
|
22594
|
-
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C,
|
|
22597
|
+
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, R = useMemo(
|
|
22595
22598
|
() => d(o.name) || p(o["x-collection-field"]),
|
|
22596
22599
|
[o, p, d]
|
|
22597
22600
|
), T = _.omit(o, "required");
|
|
22598
|
-
|
|
22599
|
-
`${
|
|
22601
|
+
R != null && R.target && (u = p(
|
|
22602
|
+
`${R.target}.${((E = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : E.label) || "id"}`
|
|
22600
22603
|
));
|
|
22601
|
-
const D = (
|
|
22604
|
+
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
|
|
22602
22605
|
(q) => {
|
|
22603
22606
|
const L = q.find((U) => U.value === "$nForm"), G = m(I);
|
|
22604
22607
|
return !(G != null && G.length) && L && (L.children = formatVariableScop(y())), q;
|
|
22605
22608
|
},
|
|
22606
22609
|
[y, I]
|
|
22607
|
-
),
|
|
22610
|
+
), w = useMemo(() => ({
|
|
22608
22611
|
ArrayCollapse: ArrayCollapse$2,
|
|
22609
22612
|
FormLayout,
|
|
22610
22613
|
VariableInput: (q) => /* @__PURE__ */ jsx(
|
|
@@ -22622,16 +22625,16 @@ const getActionContext = (e) => {
|
|
|
22622
22625
|
"x-decorator": "FormItem",
|
|
22623
22626
|
"x-component": "VariableInput",
|
|
22624
22627
|
"x-component-props": P(x({}, (o == null ? void 0 : o["x-component-props"]) || {}), {
|
|
22625
|
-
collectionField:
|
|
22628
|
+
collectionField: R,
|
|
22626
22629
|
contextCollectionName: N ? c : "",
|
|
22627
|
-
schema:
|
|
22630
|
+
schema: R == null ? void 0 : R.uiSchema,
|
|
22628
22631
|
targetFieldSchema: o,
|
|
22629
22632
|
className: defaultInputStyle,
|
|
22630
22633
|
form: S,
|
|
22631
22634
|
record: b,
|
|
22632
22635
|
returnScope: B,
|
|
22633
22636
|
shouldChange: getShouldChange({
|
|
22634
|
-
collectionField:
|
|
22637
|
+
collectionField: R,
|
|
22635
22638
|
variables: g,
|
|
22636
22639
|
localVariables: f,
|
|
22637
22640
|
getAllCollectionsInheritChain: h
|
|
@@ -22639,13 +22642,13 @@ const getActionContext = (e) => {
|
|
|
22639
22642
|
renderSchemaComponent: function(L) {
|
|
22640
22643
|
const G = useMemo(() => _.cloneDeep(T) || {}, []);
|
|
22641
22644
|
G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
|
|
22642
|
-
const U = getFieldDefaultValue(G,
|
|
22643
|
-
|
|
22645
|
+
const U = getFieldDefaultValue(G, R);
|
|
22646
|
+
R.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), R != null && R.uiSchema.type && (G.type = R.uiSchema.type), (R == null ? void 0 : R.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", U), G.type = "void");
|
|
22644
22647
|
const H = useMemo(
|
|
22645
22648
|
() => P(x({}, G || {}), {
|
|
22646
22649
|
"x-decorator": "FormItem",
|
|
22647
22650
|
"x-component-props": P(x({}, G["x-component-props"]), {
|
|
22648
|
-
collectionName:
|
|
22651
|
+
collectionName: R == null ? void 0 : R.collectionName,
|
|
22649
22652
|
targetField: u,
|
|
22650
22653
|
defaultValue: isVariable$1(U) ? "" : U,
|
|
22651
22654
|
style: {
|
|
@@ -22662,11 +22665,11 @@ const getActionContext = (e) => {
|
|
|
22662
22665
|
}
|
|
22663
22666
|
}),
|
|
22664
22667
|
title: a("Default value"),
|
|
22665
|
-
default: getFieldDefaultValue(o,
|
|
22668
|
+
default: getFieldDefaultValue(o, R)
|
|
22666
22669
|
}
|
|
22667
22670
|
}
|
|
22668
22671
|
}), [
|
|
22669
|
-
|
|
22672
|
+
R,
|
|
22670
22673
|
o,
|
|
22671
22674
|
T,
|
|
22672
22675
|
S,
|
|
@@ -22696,7 +22699,7 @@ const getActionContext = (e) => {
|
|
|
22696
22699
|
SchemaSettingsModalItem,
|
|
22697
22700
|
{
|
|
22698
22701
|
title: a("Set default value"),
|
|
22699
|
-
components:
|
|
22702
|
+
components: w,
|
|
22700
22703
|
width: 800,
|
|
22701
22704
|
schema: M,
|
|
22702
22705
|
onSubmit: $,
|
|
@@ -23474,13 +23477,13 @@ const useGetFilterOptions = () => {
|
|
|
23474
23477
|
};
|
|
23475
23478
|
});
|
|
23476
23479
|
}, TableColumnDesigner$1 = (e) => {
|
|
23477
|
-
var j, N, B,
|
|
23478
|
-
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((B = o == null ? void 0 : o.target) != null ? B : o == null ? void 0 : o.targetCollection), h = useColorFields((
|
|
23480
|
+
var j, N, B, w, M, $, k, z, E, q, L, G;
|
|
23481
|
+
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((B = o == null ? void 0 : o.target) != null ? B : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
23479
23482
|
o == null ? void 0 : o.interface
|
|
23480
|
-
), I = useFieldModeOptions({ fieldSchema: n }),
|
|
23483
|
+
), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
|
|
23481
23484
|
let T = "editable";
|
|
23482
23485
|
n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
|
|
23483
|
-
const D = F &&
|
|
23486
|
+
const D = F && R === "Select", O = () => {
|
|
23484
23487
|
const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
|
|
23485
23488
|
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
|
|
23486
23489
|
};
|
|
@@ -23634,7 +23637,7 @@ const useGetFilterOptions = () => {
|
|
|
23634
23637
|
C && { label: c("File manager"), value: "FileManager" },
|
|
23635
23638
|
{ label: c("Tag"), value: "Tag" }
|
|
23636
23639
|
].filter(Boolean) : I,
|
|
23637
|
-
value:
|
|
23640
|
+
value: R,
|
|
23638
23641
|
onChange: (U) => {
|
|
23639
23642
|
const H = {
|
|
23640
23643
|
"x-uid": n["x-uid"]
|
|
@@ -23646,7 +23649,7 @@ const useGetFilterOptions = () => {
|
|
|
23646
23649
|
},
|
|
23647
23650
|
"field-mode"
|
|
23648
23651
|
),
|
|
23649
|
-
["Tag"].includes(
|
|
23652
|
+
["Tag"].includes(R) && /* @__PURE__ */ jsx(
|
|
23650
23653
|
SchemaSettingsSelectItem,
|
|
23651
23654
|
{
|
|
23652
23655
|
title: c("Tag color field"),
|
|
@@ -25207,8 +25210,8 @@ const MarkdownEditor = (e) => {
|
|
|
25207
25210
|
useCompile(), useEffect(() => {
|
|
25208
25211
|
y(!0), V(void 0, null, function* () {
|
|
25209
25212
|
setTimeout(() => V(void 0, null, function* () {
|
|
25210
|
-
const
|
|
25211
|
-
g(
|
|
25213
|
+
const R = yield getRenderContent(b, r, f, C, parseMarkdown);
|
|
25214
|
+
g(R);
|
|
25212
25215
|
})), y(!1);
|
|
25213
25216
|
});
|
|
25214
25217
|
}, [r, f, C, b]);
|
|
@@ -25232,8 +25235,8 @@ const MarkdownEditor = (e) => {
|
|
|
25232
25235
|
a.editable = !1, d == null || d();
|
|
25233
25236
|
},
|
|
25234
25237
|
onSubmit: (I) => V(void 0, null, function* () {
|
|
25235
|
-
var
|
|
25236
|
-
a.editable = !1, (
|
|
25238
|
+
var R;
|
|
25239
|
+
a.editable = !1, (R = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, a.componentProps.content = I, u == null || u(l), c.emit("patch", {
|
|
25237
25240
|
schema: {
|
|
25238
25241
|
"x-uid": l["x-uid"],
|
|
25239
25242
|
"x-component-props": {
|
|
@@ -25543,9 +25546,9 @@ function Input$1(e) {
|
|
|
25543
25546
|
hideVariableButton: m
|
|
25544
25547
|
} = e, h = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: g, hashId: f, componentCls: C, rootPrefixCls: b } = useStyles$a({ hideVariableButton: m });
|
|
25545
25548
|
useAntdInputStyle(`${b}-input`);
|
|
25546
|
-
const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [
|
|
25549
|
+
const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D, O] = React.useState(
|
|
25547
25550
|
m || !!(o && t != null)
|
|
25548
|
-
), j = useMemo(() => parseValue(t, p), [p, t]), N = typeof j == "string", B = N ? j : "",
|
|
25551
|
+
), j = useMemo(() => parseValue(t, p), [p, t]), N = typeof j == "string", B = N ? j : "", w = N ? null : j, M = Object.assign(
|
|
25549
25552
|
{
|
|
25550
25553
|
label: "label",
|
|
25551
25554
|
value: "value",
|
|
@@ -25571,28 +25574,28 @@ function Input$1(e) {
|
|
|
25571
25574
|
] : [],
|
|
25572
25575
|
...$ ? [S(X)] : [],
|
|
25573
25576
|
...h ? [...h] : []
|
|
25574
|
-
].filter((ne) => !ne.deprecated || (
|
|
25577
|
+
].filter((ne) => !ne.deprecated || (w == null ? void 0 : w[0]) === ne[M.value]);
|
|
25575
25578
|
I(ee);
|
|
25576
|
-
}, [h,
|
|
25579
|
+
}, [h, w, $, a]);
|
|
25577
25580
|
const q = (W) => V(this, null, function* () {
|
|
25578
25581
|
var ee;
|
|
25579
25582
|
const X = W[W.length - 1];
|
|
25580
25583
|
if (!((ee = X.children) != null && ee.length) && !X.isLeaf && X.loadChildren) {
|
|
25581
25584
|
let Z;
|
|
25582
|
-
if (
|
|
25583
|
-
for (const ne of
|
|
25585
|
+
if (w && w.length >= 2) {
|
|
25586
|
+
for (const ne of w)
|
|
25584
25587
|
if (ne === X[M.value]) {
|
|
25585
25588
|
Z = ne;
|
|
25586
25589
|
break;
|
|
25587
25590
|
}
|
|
25588
25591
|
}
|
|
25589
|
-
yield X.loadChildren(X, Z,
|
|
25592
|
+
yield X.loadChildren(X, Z, w), I((ne) => [...ne]);
|
|
25590
25593
|
}
|
|
25591
25594
|
}), L = useCallback(
|
|
25592
25595
|
(W, X) => {
|
|
25593
25596
|
var ee, Z, ne;
|
|
25594
25597
|
if (W[0] === "$") {
|
|
25595
|
-
O(!0),
|
|
25598
|
+
O(!0), w && n(null, X);
|
|
25596
25599
|
return;
|
|
25597
25600
|
} else
|
|
25598
25601
|
O(!1);
|
|
@@ -25601,12 +25604,12 @@ function Input$1(e) {
|
|
|
25601
25604
|
return;
|
|
25602
25605
|
}
|
|
25603
25606
|
if (W[0] === " ") {
|
|
25604
|
-
W[1] ? W[1] !== B && n((ne = (Z = (ee = ConstantTypes[W[1]]) == null ? void 0 : ee.default) == null ? void 0 : Z.call(ee)) != null ? ne : null, X) :
|
|
25607
|
+
W[1] ? W[1] !== B && n((ne = (Z = (ee = ConstantTypes[W[1]]) == null ? void 0 : ee.default) == null ? void 0 : Z.call(ee)) != null ? ne : null, X) : w && n(null, X);
|
|
25605
25608
|
return;
|
|
25606
25609
|
}
|
|
25607
25610
|
n(`{{${W.join(".")}}}`, X);
|
|
25608
25611
|
},
|
|
25609
|
-
[B,
|
|
25612
|
+
[B, w, n]
|
|
25610
25613
|
), G = useCallback(() => {
|
|
25611
25614
|
var W;
|
|
25612
25615
|
if (O(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
|
|
@@ -25618,14 +25621,14 @@ function Input$1(e) {
|
|
|
25618
25621
|
useEffect(() => {
|
|
25619
25622
|
V(this, null, function* () {
|
|
25620
25623
|
var Z;
|
|
25621
|
-
if (!
|
|
25624
|
+
if (!w || F.length <= 1)
|
|
25622
25625
|
return;
|
|
25623
25626
|
let X = null;
|
|
25624
25627
|
const ee = [];
|
|
25625
|
-
for (let ne = 0; ne <
|
|
25626
|
-
const re =
|
|
25628
|
+
for (let ne = 0; ne < w.length; ne++) {
|
|
25629
|
+
const re = w[ne];
|
|
25627
25630
|
try {
|
|
25628
|
-
if (ne === 0 ? X = F.find((se) => se[M.value] === re) : (X.loadChildren && !((Z = X.children) != null && Z.length) && (yield X.loadChildren(X, re,
|
|
25631
|
+
if (ne === 0 ? X = F.find((se) => se[M.value] === re) : (X.loadChildren && !((Z = X.children) != null && Z.length) && (yield X.loadChildren(X, re, w)), X = X.children.find((se) => se[M.value] === re)), !X)
|
|
25629
25632
|
return;
|
|
25630
25633
|
ee.push(X[M.label]);
|
|
25631
25634
|
} catch (se) {
|
|
@@ -25634,11 +25637,11 @@ function Input$1(e) {
|
|
|
25634
25637
|
}
|
|
25635
25638
|
I([...F]), T([...ee]);
|
|
25636
25639
|
});
|
|
25637
|
-
}, [
|
|
25640
|
+
}, [w, F.length]);
|
|
25638
25641
|
const U = e.disabled || v.disabled;
|
|
25639
25642
|
return g(
|
|
25640
25643
|
/* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(C, f, c), children: [
|
|
25641
|
-
|
|
25644
|
+
w ? /* @__PURE__ */ jsxs(
|
|
25642
25645
|
"div",
|
|
25643
25646
|
{
|
|
25644
25647
|
className: cx(
|
|
@@ -25676,7 +25679,7 @@ function Input$1(e) {
|
|
|
25676
25679
|
"aria-label": "variable-tag",
|
|
25677
25680
|
style: { overflow: "hidden" },
|
|
25678
25681
|
className: cx("ant-input", { "ant-input-disabled": U }, f),
|
|
25679
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children:
|
|
25682
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: R.map((W, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
25680
25683
|
X ? " / " : "",
|
|
25681
25684
|
W
|
|
25682
25685
|
] }, W)) })
|
|
@@ -25709,7 +25712,7 @@ function Input$1(e) {
|
|
|
25709
25712
|
Cascader$1,
|
|
25710
25713
|
{
|
|
25711
25714
|
options: F,
|
|
25712
|
-
value:
|
|
25715
|
+
value: w != null ? w : E,
|
|
25713
25716
|
onChange: L,
|
|
25714
25717
|
loadData: q,
|
|
25715
25718
|
changeOnSelect: u,
|
|
@@ -25721,7 +25724,7 @@ function Input$1(e) {
|
|
|
25721
25724
|
className: css(`
|
|
25722
25725
|
margin-left: -1px;
|
|
25723
25726
|
`),
|
|
25724
|
-
type:
|
|
25727
|
+
type: w ? "primary" : "default",
|
|
25725
25728
|
disabled: U
|
|
25726
25729
|
}
|
|
25727
25730
|
)
|
|
@@ -25901,7 +25904,7 @@ function TextArea(e) {
|
|
|
25901
25904
|
const { wrapSSR: t, hashId: n, componentCls: o } = useStyles$a(), { scope: r, changeOnSelect: i, style: a, fieldNames: l, delimiters: c = ["{{", "}}"], addonBefore: u, trim: d = !0 } = e, p = typeof e.value == "string" ? e.value : e.value == null ? "" : e.value.toString(), m = useVariablesFromValue(p, c), h = useRef(null), [g, f] = useState([]), C = useForm(), b = useMemo(
|
|
25902
25905
|
() => createOptionsValueLabelMap(g, l || defaultFieldNames$2),
|
|
25903
25906
|
[l, g]
|
|
25904
|
-
), [S, y] = useState(!1), [v, F] = useState(!1), [I,
|
|
25907
|
+
), [S, y] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
25905
25908
|
useAntdInputStyle("ant-input");
|
|
25906
25909
|
const { token: O } = theme.useToken(), j = c.join(" "), N = useCallback(
|
|
25907
25910
|
(L) => {
|
|
@@ -25916,7 +25919,7 @@ function TextArea(e) {
|
|
|
25916
25919
|
f(L);
|
|
25917
25920
|
}).catch(console.error);
|
|
25918
25921
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
25919
|
-
|
|
25922
|
+
R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
25920
25923
|
}, [p, b, j]), useEffect(() => {
|
|
25921
25924
|
var U;
|
|
25922
25925
|
const { current: L } = h;
|
|
@@ -25954,7 +25957,7 @@ function TextArea(e) {
|
|
|
25954
25957
|
}), F(!0), D(getCurrentRange(U)), N(U);
|
|
25955
25958
|
},
|
|
25956
25959
|
[b, N, T]
|
|
25957
|
-
),
|
|
25960
|
+
), w = useCallback(
|
|
25958
25961
|
function({ currentTarget: L }) {
|
|
25959
25962
|
S || (F(!0), D(getCurrentRange(L)), N(L));
|
|
25960
25963
|
},
|
|
@@ -26041,7 +26044,7 @@ function TextArea(e) {
|
|
|
26041
26044
|
{
|
|
26042
26045
|
role: "button",
|
|
26043
26046
|
"aria-label": "textbox",
|
|
26044
|
-
onInput:
|
|
26047
|
+
onInput: w,
|
|
26045
26048
|
onBlur: M,
|
|
26046
26049
|
onKeyDown: $,
|
|
26047
26050
|
onPaste: E,
|
|
@@ -27456,8 +27459,9 @@ function getFilteredFormValues(e) {
|
|
|
27456
27459
|
r && n.push(r);
|
|
27457
27460
|
}), _.uniq(
|
|
27458
27461
|
n.filter((r) => {
|
|
27459
|
-
var
|
|
27460
|
-
|
|
27462
|
+
var l, c;
|
|
27463
|
+
const i = ((l = r.path) == null ? void 0 : l.segments) || [], a = i.length <= 1 ? i.join(".") : i.slice(0, -1).join(".");
|
|
27464
|
+
return ((c = r == null ? void 0 : r.componentProps) == null ? void 0 : c.readOnlySubmit) && !get$1(t, a)[r == null ? void 0 : r.componentProps.filterTargetKey];
|
|
27461
27465
|
}).map((r) => {
|
|
27462
27466
|
var a;
|
|
27463
27467
|
const i = ((a = r.path) == null ? void 0 : a.segments) || [];
|
|
@@ -27488,7 +27492,7 @@ function getFormValues({
|
|
|
27488
27492
|
function useCollectValuesToSubmit() {
|
|
27489
27493
|
const e = useForm(), t = useFilterByTk(), { field: n, resource: o } = useBlockRequestContext(), { fields: r, getField: i, getTreeParentField: a, name: l } = useCollection_deprecated(), c = r.map((f) => f.name), { fieldSchema: u } = useActionContext(), { getActiveFieldsName: d } = useFormActiveFields() || {}, p = useVariables$1(), m = useLocalVariables$1({ currentForm: e }), h = useFieldSchema(), g = useTreeParentRecord();
|
|
27490
27494
|
return useCallback(() => V(this, null, function* () {
|
|
27491
|
-
var F, I,
|
|
27495
|
+
var F, I, R, T;
|
|
27492
27496
|
const { assignedValues: f = {}, overwriteValues: C } = (F = h == null ? void 0 : h["x-action-settings"]) != null ? F : {}, b = getFormValues({
|
|
27493
27497
|
filterByTk: t,
|
|
27494
27498
|
field: n,
|
|
@@ -27507,7 +27511,7 @@ function useCollectValuesToSubmit() {
|
|
|
27507
27511
|
}));
|
|
27508
27512
|
if (yield Promise.all(y), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
|
|
27509
27513
|
const D = a();
|
|
27510
|
-
b[(
|
|
27514
|
+
b[(R = D == null ? void 0 : D.name) != null ? R : "parent"] = g, b[(T = D == null ? void 0 : D.foreignKey) != null ? T : "parentId"] = g == null ? void 0 : g.id;
|
|
27511
27515
|
}
|
|
27512
27516
|
return x(x(x({}, b), C), S);
|
|
27513
27517
|
}), [
|
|
@@ -27534,12 +27538,12 @@ const useCreateActionProps = () => {
|
|
|
27534
27538
|
onClick() {
|
|
27535
27539
|
return V(this, null, function* () {
|
|
27536
27540
|
var B;
|
|
27537
|
-
const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose:
|
|
27541
|
+
const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: R, redirecting: T, redirectTo: D, successMessage: O, actionAfterSuccess: j } = v || {};
|
|
27538
27542
|
F || (yield n.submit());
|
|
27539
27543
|
const N = yield f();
|
|
27540
27544
|
d.data = o.data || {}, d.data.loading = !0;
|
|
27541
27545
|
try {
|
|
27542
|
-
const
|
|
27546
|
+
const w = yield r[C]({
|
|
27543
27547
|
values: N,
|
|
27544
27548
|
filterKeys: b,
|
|
27545
27549
|
filterByTk: e,
|
|
@@ -27547,17 +27551,17 @@ const useCreateActionProps = () => {
|
|
|
27547
27551
|
triggerWorkflows: I != null && I.length ? I.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0,
|
|
27548
27552
|
updateAssociationValues: g
|
|
27549
27553
|
});
|
|
27550
|
-
if ((j === "previous" || !j && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data =
|
|
27554
|
+
if ((j === "previous" || !j && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data = w, !O) {
|
|
27551
27555
|
message.success(h("Saved successfully")), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
|
|
27552
27556
|
return;
|
|
27553
27557
|
}
|
|
27554
|
-
|
|
27558
|
+
R ? m.success({
|
|
27555
27559
|
title: p(O),
|
|
27556
27560
|
onOk: () => V(this, null, function* () {
|
|
27557
27561
|
yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
|
|
27558
27562
|
})
|
|
27559
27563
|
}) : (message.success(p(O)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
|
|
27560
|
-
} catch (
|
|
27564
|
+
} catch (w) {
|
|
27561
27565
|
d.data.loading = !1;
|
|
27562
27566
|
}
|
|
27563
27567
|
});
|
|
@@ -27570,13 +27574,13 @@ const useCreateActionProps = () => {
|
|
|
27570
27574
|
onClick() {
|
|
27571
27575
|
return V(this, null, function* () {
|
|
27572
27576
|
var z, E, q, L, G, U;
|
|
27573
|
-
const
|
|
27577
|
+
const R = u.map((H) => H.name), {
|
|
27574
27578
|
assignedValues: T = {},
|
|
27575
27579
|
onSuccess: D,
|
|
27576
27580
|
overwriteValues: O,
|
|
27577
27581
|
skipValidator: j,
|
|
27578
27582
|
triggerWorkflows: N
|
|
27579
|
-
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage:
|
|
27583
|
+
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: w } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
|
|
27580
27584
|
const J = T[H], K = d(H);
|
|
27581
27585
|
if (isVariable$1(J)) {
|
|
27582
27586
|
const { value: W } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
|
|
@@ -27589,7 +27593,7 @@ const useCreateActionProps = () => {
|
|
|
27589
27593
|
filterByTk: g,
|
|
27590
27594
|
field: t,
|
|
27591
27595
|
form: e,
|
|
27592
|
-
fieldNames:
|
|
27596
|
+
fieldNames: R,
|
|
27593
27597
|
getField: d,
|
|
27594
27598
|
resource: n,
|
|
27595
27599
|
actionFields: (S == null ? void 0 : S("form")) || []
|
|
@@ -27606,9 +27610,9 @@ const useCreateActionProps = () => {
|
|
|
27606
27610
|
// TODO(refactor): should change to inject by plugin
|
|
27607
27611
|
triggerWorkflows: N != null && N.length ? N.map((J) => [J.workflowKey, J.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27608
27612
|
});
|
|
27609
|
-
if (c.data.loading = !1, c.data.data = H, (U = (G = o == null ? void 0 : o.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), a == null || a(!0), !
|
|
27613
|
+
if (c.data.loading = !1, c.data.data = H, (U = (G = o == null ? void 0 : o.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), a == null || a(!0), !w)
|
|
27610
27614
|
return;
|
|
27611
|
-
message.success(h(
|
|
27615
|
+
message.success(h(w));
|
|
27612
27616
|
} catch (H) {
|
|
27613
27617
|
c.data.data = null, c.data.loading = !1;
|
|
27614
27618
|
}
|
|
@@ -27715,13 +27719,13 @@ const useCreateActionProps = () => {
|
|
|
27715
27719
|
return {
|
|
27716
27720
|
onClick(f, C) {
|
|
27717
27721
|
return V(this, null, function* () {
|
|
27718
|
-
var N, B,
|
|
27722
|
+
var N, B, w;
|
|
27719
27723
|
const {
|
|
27720
27724
|
assignedValues: b = {},
|
|
27721
27725
|
onSuccess: S,
|
|
27722
27726
|
skipValidator: y,
|
|
27723
27727
|
triggerWorkflows: v
|
|
27724
|
-
} = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo:
|
|
27728
|
+
} = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
|
|
27725
27729
|
const $ = b[M], k = m(M);
|
|
27726
27730
|
if (isVariable$1($)) {
|
|
27727
27731
|
const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
|
|
@@ -27734,12 +27738,12 @@ const useCreateActionProps = () => {
|
|
|
27734
27738
|
values: x({}, O),
|
|
27735
27739
|
// TODO(refactor): should change to inject by plugin
|
|
27736
27740
|
triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27737
|
-
}), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (
|
|
27741
|
+
}), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (w = (B = t == null ? void 0 : t.service) == null ? void 0 : B.refresh) == null || w.call(B), T && (F ? c.success({
|
|
27738
27742
|
title: a(T),
|
|
27739
27743
|
onOk: () => V(this, null, function* () {
|
|
27740
|
-
(I && !D || D === "redirect") &&
|
|
27744
|
+
(I && !D || D === "redirect") && R && (isURL(R) ? window.location.href = R : i(R));
|
|
27741
27745
|
})
|
|
27742
|
-
}) : (message.success(a(T)), (I && !D || D === "redirect") &&
|
|
27746
|
+
}) : (message.success(a(T)), (I && !D || D === "redirect") && R && (isURL(R) ? window.location.href = R : i(R))));
|
|
27743
27747
|
});
|
|
27744
27748
|
}
|
|
27745
27749
|
};
|
|
@@ -27756,7 +27760,7 @@ const useCreateActionProps = () => {
|
|
|
27756
27760
|
assignedValues: T = {},
|
|
27757
27761
|
onSuccess: D,
|
|
27758
27762
|
updateMode: O
|
|
27759
|
-
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage:
|
|
27763
|
+
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
|
|
27760
27764
|
m.data = e.data || {}, m.data.loading = !0;
|
|
27761
27765
|
const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
|
|
27762
27766
|
const L = T[q], G = C(q);
|
|
@@ -27791,12 +27795,12 @@ const useCreateActionProps = () => {
|
|
|
27791
27795
|
} finally {
|
|
27792
27796
|
m.data.loading = !1;
|
|
27793
27797
|
}
|
|
27794
|
-
t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H),
|
|
27795
|
-
title: d(
|
|
27798
|
+
t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), w && (j ? h.success({
|
|
27799
|
+
title: d(w),
|
|
27796
27800
|
onOk: () => V(this, null, function* () {
|
|
27797
27801
|
(N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
|
|
27798
27802
|
})
|
|
27799
|
-
}) : (message.success(d(
|
|
27803
|
+
}) : (message.success(d(w)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
|
|
27800
27804
|
});
|
|
27801
27805
|
},
|
|
27802
27806
|
onCancel() {
|
|
@@ -27815,12 +27819,12 @@ const useCreateActionProps = () => {
|
|
|
27815
27819
|
onClick() {
|
|
27816
27820
|
return V(this, null, function* () {
|
|
27817
27821
|
var q, L, G, U;
|
|
27818
|
-
const { skipValidator: I, onSuccess:
|
|
27822
|
+
const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
|
|
27819
27823
|
if (!T.url)
|
|
27820
27824
|
return;
|
|
27821
|
-
I !== !0 &&
|
|
27825
|
+
I !== !0 && w === "customize:form:request" && (yield i.submit());
|
|
27822
27826
|
const M = T.headers ? JSON.parse(T.headers) : {}, $ = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
|
|
27823
|
-
if (
|
|
27827
|
+
if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
|
|
27824
27828
|
const H = a.map((K) => K.name), J = getFormValues({
|
|
27825
27829
|
filterByTk: n,
|
|
27826
27830
|
field: c,
|
|
@@ -27841,7 +27845,7 @@ const useCreateActionProps = () => {
|
|
|
27841
27845
|
};
|
|
27842
27846
|
f.data = c.data || {}, f.data.loading = !0;
|
|
27843
27847
|
try {
|
|
27844
|
-
yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (U = p == null ? void 0 : p.refresh) == null || U.call(p),
|
|
27848
|
+
yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B && O !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
|
|
27845
27849
|
title: r(N),
|
|
27846
27850
|
onOk: () => V(this, null, function* () {
|
|
27847
27851
|
(O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
|
|
@@ -27860,13 +27864,13 @@ const useCreateActionProps = () => {
|
|
|
27860
27864
|
return V(this, null, function* () {
|
|
27861
27865
|
var L;
|
|
27862
27866
|
const {
|
|
27863
|
-
assignedValues:
|
|
27867
|
+
assignedValues: R = {},
|
|
27864
27868
|
onSuccess: T,
|
|
27865
27869
|
overwriteValues: D,
|
|
27866
27870
|
skipValidator: O,
|
|
27867
27871
|
triggerWorkflows: j
|
|
27868
|
-
} = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo:
|
|
27869
|
-
const U =
|
|
27872
|
+
} = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
|
|
27873
|
+
const U = R[G], H = d(G);
|
|
27870
27874
|
if (isVariable$1(U)) {
|
|
27871
27875
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
27872
27876
|
J && (k[G] = transformVariableValue(J, { targetCollectionField: H }));
|
|
@@ -27897,9 +27901,9 @@ const useCreateActionProps = () => {
|
|
|
27897
27901
|
N ? f.success({
|
|
27898
27902
|
title: m(M),
|
|
27899
27903
|
onOk: () => V(this, null, function* () {
|
|
27900
|
-
yield e.reset(), (B && !$ || $ === "redirect") &&
|
|
27904
|
+
yield e.reset(), (B && !$ || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
|
|
27901
27905
|
})
|
|
27902
|
-
}) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") &&
|
|
27906
|
+
}) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
|
|
27903
27907
|
} catch (G) {
|
|
27904
27908
|
h.data.loading = !1;
|
|
27905
27909
|
}
|
|
@@ -27996,8 +28000,8 @@ const useCreateActionProps = () => {
|
|
|
27996
28000
|
showSizeChanger: !1,
|
|
27997
28001
|
onChange(v) {
|
|
27998
28002
|
return V(this, null, function* () {
|
|
27999
|
-
var I,
|
|
28000
|
-
const F = (
|
|
28003
|
+
var I, R;
|
|
28004
|
+
const F = (R = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : R[0];
|
|
28001
28005
|
e.service.run(P(x({}, F), { page: v }));
|
|
28002
28006
|
});
|
|
28003
28007
|
},
|
|
@@ -28056,8 +28060,8 @@ const useCreateActionProps = () => {
|
|
|
28056
28060
|
/** 渲染 Collapse 的列表数据 */
|
|
28057
28061
|
list: (d == null ? void 0 : d.data) || [],
|
|
28058
28062
|
onSelected: (F) => {
|
|
28059
|
-
var
|
|
28060
|
-
const I = ((T = (
|
|
28063
|
+
var R, T, D, O;
|
|
28064
|
+
const I = ((T = (R = t.params) == null ? void 0 : R[1]) == null ? void 0 : T.filters) || {};
|
|
28061
28065
|
F.length ? I[`af.${c}`] = {
|
|
28062
28066
|
[`${c}.${i}.$in`]: F
|
|
28063
28067
|
} : delete I[`af.${c}`], t.run(
|
|
@@ -28086,10 +28090,10 @@ const useCreateActionProps = () => {
|
|
|
28086
28090
|
var n;
|
|
28087
28091
|
return ["select", "multipleSelect", "checkbox", "checkboxGroup", "chinaRegion"].includes(e == null ? void 0 : e.interface) && ((n = e == null ? void 0 : e.uiSchema) == null ? void 0 : n.enum);
|
|
28088
28092
|
}, useAssociationFilterBlockProps = () => {
|
|
28089
|
-
var v, F, I,
|
|
28093
|
+
var v, F, I, R, T, D, O, j, N, B;
|
|
28090
28094
|
const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), n = useOptionalFieldList(), { getDataBlocks: o } = useFilterBlock(), r = e == null ? void 0 : e.name, i = useField(), { props: a } = useBlockRequestContext(), l = useDataSourceHeaders(a == null ? void 0 : a.dataSource), c = useCollectionManager(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (F = (v = i.componentProps) == null ? void 0 : v.params) == null ? void 0 : F.filter });
|
|
28091
28095
|
let p, m, h, g, f, C, b, S;
|
|
28092
|
-
C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.getPrimaryKey() : "id", b = ((T = (
|
|
28096
|
+
C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.getPrimaryKey() : "id", b = ((T = (R = t["x-component-props"]) == null ? void 0 : R.fieldNames) == null ? void 0 : T.label) || C, { data: f, params: h, run: g } = useRequest(
|
|
28093
28097
|
{
|
|
28094
28098
|
headers: l,
|
|
28095
28099
|
resource: e == null ? void 0 : e.target,
|
|
@@ -28119,7 +28123,7 @@ const useCreateActionProps = () => {
|
|
|
28119
28123
|
d
|
|
28120
28124
|
]);
|
|
28121
28125
|
const y = useCallback(
|
|
28122
|
-
(
|
|
28126
|
+
(w) => {
|
|
28123
28127
|
const { targets: M, uid: $ } = findFilterTargets(t);
|
|
28124
28128
|
o().forEach((k) => {
|
|
28125
28129
|
var U, H, J, K;
|
|
@@ -28128,9 +28132,9 @@ const useCreateActionProps = () => {
|
|
|
28128
28132
|
const E = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
28129
28133
|
(J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
|
|
28130
28134
|
const L = k.service.params[1].filters;
|
|
28131
|
-
if (
|
|
28135
|
+
if (w.length)
|
|
28132
28136
|
L[E] = {
|
|
28133
|
-
[S]:
|
|
28137
|
+
[S]: w
|
|
28134
28138
|
};
|
|
28135
28139
|
else {
|
|
28136
28140
|
if ((K = k.clearSelection) == null || K.call(k), k.dataLoadingMode === "manual")
|
|
@@ -28152,14 +28156,14 @@ const useCreateActionProps = () => {
|
|
|
28152
28156
|
if (!e)
|
|
28153
28157
|
return {};
|
|
28154
28158
|
if (isOptionalField(e)) {
|
|
28155
|
-
const
|
|
28159
|
+
const w = n.find((k) => k.name === t.name), M = {
|
|
28156
28160
|
select: "$in",
|
|
28157
28161
|
multipleSelect: "$anyOf",
|
|
28158
28162
|
checkbox: "$in",
|
|
28159
28163
|
checkboxGroup: "$anyOf"
|
|
28160
|
-
}, $ = ((B =
|
|
28164
|
+
}, $ = ((B = w == null ? void 0 : w.uiSchema) == null ? void 0 : B.enum) || [];
|
|
28161
28165
|
C = "value", b = "label", p = $, h = {}, g = () => {
|
|
28162
|
-
}, S = `${
|
|
28166
|
+
}, S = `${w.name}.${M[w.interface]}`, m = (k) => {
|
|
28163
28167
|
const z = k.target.value;
|
|
28164
28168
|
if (!z) {
|
|
28165
28169
|
p = $;
|
|
@@ -28168,10 +28172,10 @@ const useCreateActionProps = () => {
|
|
|
28168
28172
|
p = $.filter((E) => E.label.includes(z));
|
|
28169
28173
|
};
|
|
28170
28174
|
} else
|
|
28171
|
-
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (
|
|
28175
|
+
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
28172
28176
|
g(P(x({}, h == null ? void 0 : h[0]), {
|
|
28173
28177
|
filter: {
|
|
28174
|
-
[`${b}.$includes`]:
|
|
28178
|
+
[`${b}.$includes`]: w.target.value
|
|
28175
28179
|
}
|
|
28176
28180
|
}));
|
|
28177
28181
|
};
|
|
@@ -28240,8 +28244,8 @@ const getAppends = ({
|
|
|
28240
28244
|
y[v].forEach((I) => {
|
|
28241
28245
|
if ("$and" in I || "$or" in I)
|
|
28242
28246
|
return b(I);
|
|
28243
|
-
const
|
|
28244
|
-
|
|
28247
|
+
const R = getTargetField(I);
|
|
28248
|
+
R.length > 1 && o.add(R.join("."));
|
|
28245
28249
|
});
|
|
28246
28250
|
};
|
|
28247
28251
|
c["x-linkage-rules"].forEach(({ condition: y }) => {
|
|
@@ -28444,18 +28448,18 @@ function fillParentFields(e) {
|
|
|
28444
28448
|
}
|
|
28445
28449
|
const useSyncFromForm = (e, t, n) => {
|
|
28446
28450
|
const { getCollectionJoinField: o, getCollectionFields: r } = useCollectionManager_deprecated(), i = ArrayBase.useArray(), a = ArrayBase.useIndex(), l = ArrayBase.useRecord(), c = useCompile(), { t: u } = useTranslation(), d = useForm(), p = /* @__PURE__ */ ((f) => (C, { exclude: b = [], depth: S = 0, maxDepth: y, prefix: v = "", disabled: F = !1 }, I) => {
|
|
28447
|
-
const
|
|
28451
|
+
const R = `${C}-${b.join(",")}-${S}-${y}-${v}`, T = f.get(R);
|
|
28448
28452
|
if (T)
|
|
28449
28453
|
return T;
|
|
28450
28454
|
if (S > y)
|
|
28451
28455
|
return [];
|
|
28452
28456
|
const D = r(C).map((O) => {
|
|
28453
|
-
var
|
|
28457
|
+
var w;
|
|
28454
28458
|
if (b.includes(O.name) || !O.interface || ["sort", "password", "sequence"].includes(O.type))
|
|
28455
28459
|
return;
|
|
28456
28460
|
const j = {
|
|
28457
28461
|
type: "duplicate",
|
|
28458
|
-
tag: c((
|
|
28462
|
+
tag: c((w = O.uiSchema) == null ? void 0 : w.title) || O.name
|
|
28459
28463
|
}, N = P(x({}, j), {
|
|
28460
28464
|
title: React.createElement(TreeNode, j),
|
|
28461
28465
|
key: v ? `${v}.${O.name}` : O.name,
|
|
@@ -28486,14 +28490,14 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28486
28490
|
}
|
|
28487
28491
|
return N;
|
|
28488
28492
|
}).filter(Boolean);
|
|
28489
|
-
return f.set(
|
|
28493
|
+
return f.set(R, D), D;
|
|
28490
28494
|
})(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
|
|
28491
28495
|
const F = `${C}-${v.join(",")}-${y}-${S}-${b}`, I = f.get(F);
|
|
28492
28496
|
if (I)
|
|
28493
28497
|
return I;
|
|
28494
28498
|
if (y > S)
|
|
28495
28499
|
return [];
|
|
28496
|
-
const
|
|
28500
|
+
const R = r(C).map((T) => {
|
|
28497
28501
|
var j, N;
|
|
28498
28502
|
if (!T.target || !T.interface || v.includes(T.name))
|
|
28499
28503
|
return;
|
|
@@ -28516,7 +28520,7 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28516
28520
|
})
|
|
28517
28521
|
};
|
|
28518
28522
|
}).filter(Boolean);
|
|
28519
|
-
return f.set(F,
|
|
28523
|
+
return f.set(F, R), R;
|
|
28520
28524
|
})(new LRUCache({ max: 100 })), h = useCallback((f, C) => {
|
|
28521
28525
|
if (!f)
|
|
28522
28526
|
return [];
|
|
@@ -28532,11 +28536,11 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28532
28536
|
var y;
|
|
28533
28537
|
const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
|
|
28534
28538
|
var I;
|
|
28535
|
-
(I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (
|
|
28539
|
+
(I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
|
|
28536
28540
|
var M, $, k;
|
|
28537
|
-
const D =
|
|
28538
|
-
if (O && !(["hasOne", "hasMany"].includes(O.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(
|
|
28539
|
-
if (f.add({ name:
|
|
28541
|
+
const D = R || F, O = T["x-collection-field"] && o(T["x-collection-field"]), j = T.name.includes("."), N = O && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(O.type), B = !N && j ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? B : D + "." + B;
|
|
28542
|
+
if (O && !(["hasOne", "hasMany"].includes(O.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), O && (N || j) && T["x-component"] !== "TableField") {
|
|
28543
|
+
if (f.add({ name: w, fieldMode: (($ = T["x-component-props"]) == null ? void 0 : $.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
|
|
28540
28544
|
const z = D && D !== "" ? D + "." + T.name : T.name;
|
|
28541
28545
|
b(T, z);
|
|
28542
28546
|
}
|
|
@@ -29401,32 +29405,34 @@ const DragHandler = (e) => {
|
|
|
29401
29405
|
"title-field"
|
|
29402
29406
|
) : null;
|
|
29403
29407
|
}, isDisplayField = (e) => e.includes("."), useLazyLoadDisplayAssociationFieldsOfForm = () => {
|
|
29404
|
-
var
|
|
29405
|
-
const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t } = useCollectionManager_deprecated(),
|
|
29406
|
-
|
|
29407
|
-
const
|
|
29408
|
+
var b;
|
|
29409
|
+
const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t, getCollection: n } = useCollectionManager_deprecated(), o = useForm(), r = useFieldSchema(), i = useVariables$1(), a = useField(), { formValue: l } = useSubFormValue(), { isInSubForm: c, isInSubTable: u } = useFlag() || {}, { getAssociationAppends: d } = useAssociationNames(), p = r.name.toString(), m = useRef(null), h = useRef(null);
|
|
29410
|
+
m.current == null && isDisplayField(p) && (m.current = t(`${e}.${p}`)), h.current == null && isDisplayField(p) && (h.current = t(`${e}.${p.split(".")[0]}`));
|
|
29411
|
+
const g = useMemo(() => !isDisplayField(p) || !i || e === "fields" || !m.current, [p, i, e, m.current]), f = g ? {} : untracked(() => _.cloneDeep(c || u ? l : o.values)), C = isDisplayField(p) && h.current ? _.get(f, `${p.split(".")[0]}.${((b = h.current) == null ? void 0 : b.targetKey) || "id"}`) : void 0;
|
|
29408
29412
|
useEffect(() => {
|
|
29409
|
-
|
|
29413
|
+
var I;
|
|
29414
|
+
if (g || _.isEmpty(f))
|
|
29410
29415
|
return;
|
|
29411
|
-
const
|
|
29416
|
+
const S = {
|
|
29412
29417
|
name: "$nForm",
|
|
29413
|
-
ctx:
|
|
29418
|
+
ctx: f,
|
|
29414
29419
|
collectionName: e
|
|
29415
|
-
},
|
|
29416
|
-
if (
|
|
29420
|
+
}, y = `{{ $nForm.${p} }}`;
|
|
29421
|
+
if (C == null)
|
|
29417
29422
|
return;
|
|
29418
|
-
const { appends:
|
|
29419
|
-
|
|
29423
|
+
const { appends: v } = d(), F = n((I = m.current) == null ? void 0 : I.collectionName);
|
|
29424
|
+
i.parseVariable(y, S, { appends: v }).then(({ value: R }) => {
|
|
29420
29425
|
nextTick(() => {
|
|
29421
|
-
const
|
|
29422
|
-
_.isEmpty(
|
|
29423
|
-
readOnlySubmit: !0
|
|
29426
|
+
const T = transformVariableValue(R, { targetCollectionField: m.current });
|
|
29427
|
+
_.isEmpty(T) && !_.isNumber(T) ? a.value = null : (a.value = T, a.componentProps = P(x({}, a.componentProps), {
|
|
29428
|
+
readOnlySubmit: !0,
|
|
29429
|
+
filterTargetKey: (F == null ? void 0 : F.filterTargetKey) || "id"
|
|
29424
29430
|
}));
|
|
29425
29431
|
});
|
|
29426
|
-
}).catch((
|
|
29427
|
-
console.error(
|
|
29432
|
+
}).catch((R) => {
|
|
29433
|
+
console.error(R);
|
|
29428
29434
|
});
|
|
29429
|
-
}, [
|
|
29435
|
+
}, [C, g]);
|
|
29430
29436
|
};
|
|
29431
29437
|
function forEachLinkageRule(e, t) {
|
|
29432
29438
|
e.forEach((n) => {
|
|
@@ -29476,8 +29482,8 @@ const useContextVariable = () => {
|
|
|
29476
29482
|
dataSource: b,
|
|
29477
29483
|
defaultValue: S
|
|
29478
29484
|
} = useParentPopupVariableContext(), { datetimeCtx: y } = useDatetimeVariableContext(), { currentFormCtx: v } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: F } = useCollection_deprecated(), I = useContextVariable();
|
|
29479
|
-
let { name:
|
|
29480
|
-
return e != null && e.collectionName && (
|
|
29485
|
+
let { name: R } = useBlockCollection();
|
|
29486
|
+
return e != null && e.collectionName && (R = e.collectionName), useMemo(() => [
|
|
29481
29487
|
/**
|
|
29482
29488
|
* @deprecated
|
|
29483
29489
|
* 兼容老版本
|
|
@@ -29492,9 +29498,9 @@ const useContextVariable = () => {
|
|
|
29492
29498
|
* 兼容旧版本的以数据表名称命名的变量,新版本已更名为 `$nForm`
|
|
29493
29499
|
*/
|
|
29494
29500
|
{
|
|
29495
|
-
name:
|
|
29501
|
+
name: R,
|
|
29496
29502
|
ctx: v || a,
|
|
29497
|
-
collectionName:
|
|
29503
|
+
collectionName: R
|
|
29498
29504
|
},
|
|
29499
29505
|
/**
|
|
29500
29506
|
* @deprecated
|
|
@@ -29503,7 +29509,7 @@ const useContextVariable = () => {
|
|
|
29503
29509
|
{
|
|
29504
29510
|
name: "$form",
|
|
29505
29511
|
ctx: v,
|
|
29506
|
-
collectionName:
|
|
29512
|
+
collectionName: R
|
|
29507
29513
|
},
|
|
29508
29514
|
{
|
|
29509
29515
|
name: "$nRecord",
|
|
@@ -29534,7 +29540,7 @@ const useContextVariable = () => {
|
|
|
29534
29540
|
{
|
|
29535
29541
|
name: "$nForm",
|
|
29536
29542
|
ctx: v,
|
|
29537
|
-
collectionName:
|
|
29543
|
+
collectionName: R
|
|
29538
29544
|
},
|
|
29539
29545
|
{
|
|
29540
29546
|
name: "$nDate",
|
|
@@ -29562,7 +29568,7 @@ const useContextVariable = () => {
|
|
|
29562
29568
|
].filter(Boolean), [
|
|
29563
29569
|
a,
|
|
29564
29570
|
l,
|
|
29565
|
-
|
|
29571
|
+
R,
|
|
29566
29572
|
v,
|
|
29567
29573
|
c,
|
|
29568
29574
|
u,
|
|
@@ -29650,8 +29656,8 @@ const useParseDefaultValue = () => {
|
|
|
29650
29656
|
var F, I;
|
|
29651
29657
|
if (g === "update" && t.default && e.form === f && ((I = e.setValue) == null || I.call(e, (F = r == null ? void 0 : r.data) == null ? void 0 : F[t.name])), t.default == null || a || l || isSubMode(t) || !(r != null && r.isNew) && !i)
|
|
29652
29658
|
return;
|
|
29653
|
-
const y = (...T) => V(void 0, [...T], function* ({ forceUpdate:
|
|
29654
|
-
if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default ||
|
|
29659
|
+
const y = (...T) => V(void 0, [...T], function* ({ forceUpdate: R = !1 } = {}) {
|
|
29660
|
+
if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || R)) {
|
|
29655
29661
|
e.loading = !0;
|
|
29656
29662
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
29657
29663
|
value: O,
|
|
@@ -29677,17 +29683,17 @@ const useParseDefaultValue = () => {
|
|
|
29677
29683
|
!/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
|
|
29678
29684
|
}), v = _.debounce(y, DEBOUNCE_WAIT);
|
|
29679
29685
|
if (isVariable$1(t.default)) {
|
|
29680
|
-
const
|
|
29686
|
+
const R = getVariableName(t.default), T = S(R);
|
|
29681
29687
|
return T ? (y(), reaction(
|
|
29682
29688
|
() => {
|
|
29683
|
-
const O = { [
|
|
29689
|
+
const O = { [R]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), N = getValuesByPath(O, j);
|
|
29684
29690
|
return N === void 0 ? Math.random() : N;
|
|
29685
29691
|
},
|
|
29686
29692
|
() => v({ forceUpdate: !0 }),
|
|
29687
29693
|
{
|
|
29688
29694
|
equals: _.isEqual
|
|
29689
29695
|
}
|
|
29690
|
-
)) : console.error(`useParseDefaultValue: can not find variable ${
|
|
29696
|
+
)) : console.error(`useParseDefaultValue: can not find variable ${R}`);
|
|
29691
29697
|
} else
|
|
29692
29698
|
e.value == null && (c || u) && e.setValue(t.default);
|
|
29693
29699
|
}, [t.default, o, g, C, b, d]);
|
|
@@ -32985,7 +32991,7 @@ const expendableActionSettings = new SchemaSettings({
|
|
|
32985
32991
|
}
|
|
32986
32992
|
},
|
|
32987
32993
|
onSubmit: ({ sort: F }) => {
|
|
32988
|
-
const I = F.map((
|
|
32994
|
+
const I = F.map((R) => R.direction === "desc" ? `-${R.field}` : R.field);
|
|
32989
32995
|
_.set(r, "x-decorator-props.params.sort", I), a.decoratorProps.params = x({}, r["x-decorator-props"].params), l.emit("patch", {
|
|
32990
32996
|
schema: {
|
|
32991
32997
|
"x-uid": r["x-uid"],
|
|
@@ -35001,14 +35007,14 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35001
35007
|
options: o,
|
|
35002
35008
|
value: p == null ? void 0 : p.label,
|
|
35003
35009
|
onChange(C) {
|
|
35004
|
-
var v, F, I,
|
|
35010
|
+
var v, F, I, R, T;
|
|
35005
35011
|
const b = {
|
|
35006
35012
|
"x-uid": c["x-uid"]
|
|
35007
35013
|
}, S = P(x(x({}, (F = (v = d == null ? void 0 : d.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : F.fieldNames), (I = c["x-component-props"]) == null ? void 0 : I.fieldNames), {
|
|
35008
35014
|
label: C
|
|
35009
35015
|
});
|
|
35010
35016
|
c["x-component-props"] = c["x-component-props"] || {}, c["x-component-props"].fieldNames = S, b["x-component-props"] = c["x-component-props"], t.componentProps.fieldNames = c["x-component-props"].fieldNames;
|
|
35011
|
-
const y = (T = t.path) == null ? void 0 : T.splice(((
|
|
35017
|
+
const y = (T = t.path) == null ? void 0 : T.splice(((R = t.path) == null ? void 0 : R.length) - 1, 1);
|
|
35012
35018
|
t.form.query(`${y.concat("*." + c.name)}`).forEach((D) => {
|
|
35013
35019
|
D.componentProps.fieldNames = p;
|
|
35014
35020
|
}), n.emit("patch", {
|
|
@@ -35282,8 +35288,8 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35282
35288
|
name: "fieldSettings:component:CascadeSelect",
|
|
35283
35289
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
35284
35290
|
}), SchemaSettingsDateRange = function e(t) {
|
|
35285
|
-
var
|
|
35286
|
-
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((
|
|
35291
|
+
var R, T, D, O, j, N, B, w, M, $, k, z, E, q, L, G;
|
|
35292
|
+
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.dateFormat) || ((N = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.timeFormat) || ((M = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : M.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
|
|
35287
35293
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
35288
35294
|
const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
35289
35295
|
(U) => /* @__PURE__ */ jsx(
|
|
@@ -36731,12 +36737,12 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36731
36737
|
_.isFunction(C) ? n.current = C(n.current) : n.current = C;
|
|
36732
36738
|
}, []), u = useCallback(
|
|
36733
36739
|
(C, b, S) => V(void 0, null, function* () {
|
|
36734
|
-
var
|
|
36740
|
+
var w, M;
|
|
36735
36741
|
const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
36736
36742
|
let I = mergeCtxWithLocalVariables(n.current, b);
|
|
36737
|
-
const { fieldPath:
|
|
36738
|
-
let O =
|
|
36739
|
-
const { fieldPath: j } = getFieldPath$1(C, F), N = y.length === 1 ? D == null ? void 0 : D.collectionName : (
|
|
36743
|
+
const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
|
|
36744
|
+
let O = R;
|
|
36745
|
+
const { fieldPath: j } = getFieldPath$1(C, F), N = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(j, T)) == null ? void 0 : w.target;
|
|
36740
36746
|
if (!(v in I))
|
|
36741
36747
|
throw new Error(`VariablesProvider: ${v} is not found`);
|
|
36742
36748
|
for (let $ = 0; $ < y.length; $++) {
|
|
@@ -36834,7 +36840,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36834
36840
|
[u]
|
|
36835
36841
|
), g = useCallback(
|
|
36836
36842
|
(C, b) => V(void 0, null, function* () {
|
|
36837
|
-
var
|
|
36843
|
+
var R;
|
|
36838
36844
|
if (!isVariable$1(C))
|
|
36839
36845
|
throw new Error(`VariablesProvider: ${C} is not a variable string`);
|
|
36840
36846
|
b && (b = _.isArray(b) ? b : [b]);
|
|
@@ -36844,7 +36850,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36844
36850
|
), y = getPath(C), { fieldPath: v, dataSource: F } = getFieldPath$1(y, S);
|
|
36845
36851
|
let I = r(v, F);
|
|
36846
36852
|
return !I && !y.includes(".") && (I = {
|
|
36847
|
-
target: (
|
|
36853
|
+
target: (R = S[y]) == null ? void 0 : R.collectionName
|
|
36848
36854
|
}), I;
|
|
36849
36855
|
}),
|
|
36850
36856
|
[r]
|
|
@@ -37092,7 +37098,7 @@ const NocoBaseField = (e) => {
|
|
|
37092
37098
|
h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((N) => {
|
|
37093
37099
|
N === y.name && (j.properties[N] = h.current);
|
|
37094
37100
|
}), b(), S == null || S();
|
|
37095
|
-
}, [y, S, b]), F = useMemo(() => d ? createMergedSchemaInstance(y, d, o) : f ? (f.default = C, createMergedSchemaInstance(y, f, o)) : y, [f, C, y, o, d]), I = useFieldProps(F),
|
|
37101
|
+
}, [y, S, b]), F = useMemo(() => d ? createMergedSchemaInstance(y, d, o) : f ? (f.default = C, createMergedSchemaInstance(y, f, o)) : y, [f, C, y, o, d]), I = useFieldProps(F), R = (j) => {
|
|
37096
37102
|
if (!r)
|
|
37097
37103
|
return propertiesToReactElement({
|
|
37098
37104
|
schema: y,
|
|
@@ -37104,7 +37110,7 @@ const NocoBaseField = (e) => {
|
|
|
37104
37110
|
values: c,
|
|
37105
37111
|
isUseFormilyField: u
|
|
37106
37112
|
});
|
|
37107
|
-
}, T = () => isValid(n) ? F.type === "object" ? o ?
|
|
37113
|
+
}, T = () => isValid(n) ? F.type === "object" ? o ? R() : /* @__PURE__ */ jsx(ObjectField, P(x({}, I), { name: n, basePath: m, children: R })) : F.type === "array" ? /* @__PURE__ */ jsx(ArrayField, P(x({}, I), { name: n, basePath: m })) : F.type === "void" ? o ? R() : /* @__PURE__ */ jsx(VoidField, P(x({}, I), { name: n, basePath: m, children: R })) : u ? /* @__PURE__ */ jsx(Field, P(x({}, I), { name: n, basePath: m })) : /* @__PURE__ */ jsx(NocoBaseField, { name: n, value: c, initialValue: c, basePath: m, schema: F }) : R();
|
|
37108
37114
|
return y ? /* @__PURE__ */ jsx(SchemaContext.Provider, { value: y, children: /* @__PURE__ */ jsx(RefreshFieldSchemaProvider, { refresh: v, children: T() }) }) : /* @__PURE__ */ jsx(Fragment, {});
|
|
37109
37115
|
});
|
|
37110
37116
|
NocoBaseRecursionField.displayName = "NocoBaseRecursionField";
|
|
@@ -37237,7 +37243,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37237
37243
|
"onMouseEnter",
|
|
37238
37244
|
"refreshDataBlockRequest",
|
|
37239
37245
|
"confirmTitle"
|
|
37240
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(),
|
|
37246
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(), q = useApp();
|
|
37241
37247
|
useEffect(() => {
|
|
37242
37248
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
|
|
37243
37249
|
var J;
|
|
@@ -37248,13 +37254,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37248
37254
|
field: F,
|
|
37249
37255
|
condition: H.condition,
|
|
37250
37256
|
variables: B,
|
|
37251
|
-
localVariables:
|
|
37257
|
+
localVariables: w
|
|
37252
37258
|
},
|
|
37253
37259
|
q.jsonLogic
|
|
37254
37260
|
);
|
|
37255
37261
|
});
|
|
37256
37262
|
});
|
|
37257
|
-
}, [F, O,
|
|
37263
|
+
}, [F, O, w, B]);
|
|
37258
37264
|
const L = useCallback(
|
|
37259
37265
|
(H) => {
|
|
37260
37266
|
C == null || C(H);
|
|
@@ -37319,7 +37325,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37319
37325
|
style: v,
|
|
37320
37326
|
propsDisabled: F,
|
|
37321
37327
|
useAction: I,
|
|
37322
|
-
actionCallback:
|
|
37328
|
+
actionCallback: R,
|
|
37323
37329
|
visibleWithURL: T,
|
|
37324
37330
|
setVisibleWithURL: D,
|
|
37325
37331
|
setSubmitted: O,
|
|
@@ -37353,7 +37359,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37353
37359
|
"setSubmitted",
|
|
37354
37360
|
"getAriaLabel",
|
|
37355
37361
|
"parentRecordData"
|
|
37356
|
-
]), [
|
|
37362
|
+
]), [w, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, q] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), K = useForm(), W = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(R)) || {}, ne = K.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
|
|
37357
37363
|
var ce;
|
|
37358
37364
|
return P(x({}, v), {
|
|
37359
37365
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
|
|
@@ -37397,7 +37403,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37397
37403
|
ActionContextProvider,
|
|
37398
37404
|
{
|
|
37399
37405
|
button: RenderButton(se),
|
|
37400
|
-
visible:
|
|
37406
|
+
visible: w || T,
|
|
37401
37407
|
setVisible: le,
|
|
37402
37408
|
formValueChanged: E,
|
|
37403
37409
|
setFormValueChanged: q,
|
|
@@ -37479,13 +37485,13 @@ const RenderButton = ({
|
|
|
37479
37485
|
setVisible: v,
|
|
37480
37486
|
run: F,
|
|
37481
37487
|
confirm: I,
|
|
37482
|
-
modal:
|
|
37488
|
+
modal: R,
|
|
37483
37489
|
setSubmitted: T,
|
|
37484
37490
|
confirmTitle: D,
|
|
37485
37491
|
title: O
|
|
37486
37492
|
}) => {
|
|
37487
|
-
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup:
|
|
37488
|
-
M.current =
|
|
37493
|
+
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
|
|
37494
|
+
M.current = w;
|
|
37489
37495
|
const $ = useCallback(
|
|
37490
37496
|
(k, z = !0) => {
|
|
37491
37497
|
if (!(z && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !i && n)) {
|
|
@@ -37495,7 +37501,7 @@ const RenderButton = ({
|
|
|
37495
37501
|
S !== !1 && (T == null || T(!0), (L = (q = j()) == null ? void 0 : q.refresh) == null || L.call(q));
|
|
37496
37502
|
}) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
|
|
37497
37503
|
};
|
|
37498
|
-
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ?
|
|
37504
|
+
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? R.confirm({
|
|
37499
37505
|
title: N(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37500
37506
|
content: N(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37501
37507
|
onOk: E
|
|
@@ -37512,7 +37518,7 @@ const RenderButton = ({
|
|
|
37512
37518
|
t,
|
|
37513
37519
|
y,
|
|
37514
37520
|
B,
|
|
37515
|
-
|
|
37521
|
+
R,
|
|
37516
37522
|
b,
|
|
37517
37523
|
S,
|
|
37518
37524
|
F,
|
|
@@ -37593,8 +37599,8 @@ const RenderButtonInner = observer$1(
|
|
|
37593
37599
|
"isLink"
|
|
37594
37600
|
]), F = useCallback(
|
|
37595
37601
|
debounce$1(
|
|
37596
|
-
(
|
|
37597
|
-
d(
|
|
37602
|
+
(w, M = !0) => {
|
|
37603
|
+
d(w, M);
|
|
37598
37604
|
},
|
|
37599
37605
|
300,
|
|
37600
37606
|
{ leading: !0, trailing: !1 }
|
|
@@ -37605,7 +37611,7 @@ const RenderButtonInner = observer$1(
|
|
|
37605
37611
|
F.cancel();
|
|
37606
37612
|
}, []), !t && ((j = n == null ? void 0 : n.data) != null && j.hidden || !o))
|
|
37607
37613
|
return null;
|
|
37608
|
-
const I = S || (n == null ? void 0 : n.title), N = l, { opacity:
|
|
37614
|
+
const I = S || (n == null ? void 0 : n.title), N = l, { opacity: R } = N, T = Y(N, ["opacity"]), D = y && R ? { opacity: R } : void 0;
|
|
37609
37615
|
return /* @__PURE__ */ jsxs(
|
|
37610
37616
|
SortableItem,
|
|
37611
37617
|
P(x({
|
|
@@ -38071,14 +38077,14 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38071
38077
|
"dataSource",
|
|
38072
38078
|
"toOptionsItem",
|
|
38073
38079
|
"popupMatchSelectWidth"
|
|
38074
|
-
]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), S = useRef(!1), y = useFieldSchema(), v = ((H = y["x-component-props"]) == null ? void 0 : H.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), I = useRef(null), { getCollectionJoinField:
|
|
38080
|
+
]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), S = useRef(!1), y = useFieldSchema(), v = ((H = y["x-component-props"]) == null ? void 0 : H.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), I = useRef(null), { getCollectionJoinField: R, getInterface: T } = useCollectionManager_deprecated(), D = y["x-collection-field"] || y.name, O = F(D) || R(D), j = u || (O == null ? void 0 : O.target) && (t == null ? void 0 : t.label) && R(`${O.target}.${t.label}`), N = useMemo(() => {
|
|
38075
38081
|
var K;
|
|
38076
38082
|
if (j != null && j.interface) {
|
|
38077
38083
|
const W = T(j.interface), X = ((K = W == null ? void 0 : W.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
38078
38084
|
return j.type === "string" ? "$includes" : X;
|
|
38079
38085
|
}
|
|
38080
38086
|
return "$includes";
|
|
38081
|
-
}, [j]), B = useCompile(),
|
|
38087
|
+
}, [j]), B = useCompile(), w = useCallback(
|
|
38082
38088
|
(K) => {
|
|
38083
38089
|
try {
|
|
38084
38090
|
return K.filter((W) => ["number", "string"].includes(typeof W[t.value]) || !W[t.value]).map((W) => {
|
|
@@ -38177,7 +38183,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38177
38183
|
defaultValue: i
|
|
38178
38184
|
}, f), {
|
|
38179
38185
|
loading: M ? k : !0,
|
|
38180
|
-
options: h(
|
|
38186
|
+
options: h(w(L)),
|
|
38181
38187
|
rawOptions: L,
|
|
38182
38188
|
dropdownRender: (K) => {
|
|
38183
38189
|
const W = L.some((X) => X[t.label] === I.current);
|
|
@@ -38253,9 +38259,9 @@ const useFormDataTemplates = () => {
|
|
|
38253
38259
|
padding: n.padding
|
|
38254
38260
|
}, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) => V(void 0, null, function* () {
|
|
38255
38261
|
d(I), m(null), t == null || t.reset();
|
|
38256
|
-
}), []), v = useCallback((I,
|
|
38257
|
-
const D = P(x({},
|
|
38258
|
-
m(
|
|
38262
|
+
}), []), v = useCallback((I, R, T) => V(void 0, null, function* () {
|
|
38263
|
+
const D = P(x({}, R), { dataId: I });
|
|
38264
|
+
m(R), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
|
|
38259
38265
|
var B;
|
|
38260
38266
|
j && (t.values[N] = j, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, N, j));
|
|
38261
38267
|
})), O)).catch((O) => {
|
|
@@ -38322,7 +38328,7 @@ function fetchTemplateData(e, t, n) {
|
|
|
38322
38328
|
}
|
|
38323
38329
|
const useFormBlockHeight = () => {
|
|
38324
38330
|
var v, F, I;
|
|
38325
|
-
const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i, titleHeight: a } = r || {}, { display: l, enabled: c } = useFormDataTemplates(), u = t.reduceProperties((
|
|
38331
|
+
const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i, titleHeight: a } = r || {}, { display: l, enabled: c } = useFormDataTemplates(), u = t.reduceProperties((R, T) => T["x-component"] === "ActionBar" ? T : R), d = Object.keys((u == null ? void 0 : u.properties) || {}).length > 0, p = (I = (F = (v = t == null ? void 0 : t.parent) == null ? void 0 : v["x-decorator"]) == null ? void 0 : F.includes) == null ? void 0 : I.call(F, "FormBlockProvider"), m = d || o ? n.controlHeight + (p ? 1 * n.marginLG : 24 + n.paddingLG) : n.marginLG, h = i ? a : 0, g = useDataBlockRequestData(), { count: f, pageSize: C } = (g == null ? void 0 : g.meta) || {}, S = f > C ? n.controlHeightSM + 24 : 0, y = l && c ? n.controlHeight + 2 * n.padding + n.margin : 0;
|
|
38326
38332
|
return e - m - n.paddingLG - h - S - y;
|
|
38327
38333
|
}, FormComponent = (e) => {
|
|
38328
38334
|
const g = e, { form: t, children: n } = g, o = Y(g, ["form", "children"]), r = useField(), i = useFieldSchema(), a = getCardItemSchema == null ? void 0 : getCardItemSchema(i), l = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" }))), c = useFormBlockHeight(), { token: u } = theme.useToken(), {
|
|
@@ -39090,7 +39096,7 @@ const insertPositionToMethod = {
|
|
|
39090
39096
|
}
|
|
39091
39097
|
},
|
|
39092
39098
|
onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
|
|
39093
|
-
var I,
|
|
39099
|
+
var I, R;
|
|
39094
39100
|
const f = i.__route__, C = (I = i.parent) == null ? void 0 : I.__route__, b = uid(), S = uid(), y = uid(), v = uid(), { data: F } = yield u({
|
|
39095
39101
|
type: NocoBaseDesktopRouteType.page,
|
|
39096
39102
|
title: m,
|
|
@@ -39110,7 +39116,7 @@ const insertPositionToMethod = {
|
|
|
39110
39116
|
]
|
|
39111
39117
|
});
|
|
39112
39118
|
insertPositionToMethod[o] && (yield d({
|
|
39113
|
-
sourceId: (
|
|
39119
|
+
sourceId: (R = F == null ? void 0 : F.data) == null ? void 0 : R.id,
|
|
39114
39120
|
targetId: f == null ? void 0 : f.id,
|
|
39115
39121
|
sortField: "sort",
|
|
39116
39122
|
method: insertPositionToMethod[o]
|
|
@@ -39180,8 +39186,8 @@ const insertPositionToMethod = {
|
|
|
39180
39186
|
), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
|
|
39181
39187
|
(j) => {
|
|
39182
39188
|
onFieldChange("target", (N) => {
|
|
39183
|
-
var
|
|
39184
|
-
const [, B] = ((M = (
|
|
39189
|
+
var w, M;
|
|
39190
|
+
const [, B] = ((M = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : M.call(w, "||")) || [];
|
|
39185
39191
|
N.query("position").take(($) => {
|
|
39186
39192
|
$.dataSource = B === "Menu.SubMenu" ? [
|
|
39187
39193
|
{ label: l("Before"), value: "beforeBegin" },
|
|
@@ -39230,7 +39236,7 @@ const insertPositionToMethod = {
|
|
|
39230
39236
|
}), [n.componentProps.tooltip]);
|
|
39231
39237
|
o["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = n.componentProps.href, C.params = n.componentProps.params);
|
|
39232
39238
|
const y = useCallback(
|
|
39233
|
-
({ title: j, icon: N, href: B, params:
|
|
39239
|
+
({ title: j, icon: N, href: B, params: w }) => {
|
|
39234
39240
|
var $;
|
|
39235
39241
|
const M = {
|
|
39236
39242
|
"x-uid": o["x-uid"],
|
|
@@ -39241,14 +39247,14 @@ const insertPositionToMethod = {
|
|
|
39241
39247
|
}
|
|
39242
39248
|
]
|
|
39243
39249
|
};
|
|
39244
|
-
j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = N, n.componentProps.href = B, n.componentProps.params =
|
|
39250
|
+
j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = N, n.componentProps.href = B, n.componentProps.params = w, M["x-component-props"] = { icon: N, href: B, params: w }, o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].icon = N, o["x-component-props"].href = B, o["x-component-props"].params = w, m == null || m({ item: { props: { schema: o } } }), i.emit("patch", {
|
|
39245
39251
|
schema: M
|
|
39246
39252
|
}), ($ = o.__route__) != null && $.id && e(o.__route__.id, {
|
|
39247
39253
|
title: j,
|
|
39248
39254
|
icon: N,
|
|
39249
|
-
options: B ||
|
|
39255
|
+
options: B || w ? {
|
|
39250
39256
|
href: B,
|
|
39251
|
-
params:
|
|
39257
|
+
params: w
|
|
39252
39258
|
} : void 0
|
|
39253
39259
|
});
|
|
39254
39260
|
},
|
|
@@ -39285,13 +39291,13 @@ const insertPositionToMethod = {
|
|
|
39285
39291
|
"x-decorator": "FormItem"
|
|
39286
39292
|
}
|
|
39287
39293
|
}
|
|
39288
|
-
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(),
|
|
39294
|
+
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
|
|
39289
39295
|
(B) => V(void 0, [B], function* ({ target: j, position: N }) {
|
|
39290
39296
|
var E;
|
|
39291
|
-
const [
|
|
39292
|
-
if (!
|
|
39297
|
+
const [w] = ((E = j == null ? void 0 : j.split) == null ? void 0 : E.call(j, "||")) || [];
|
|
39298
|
+
if (!w)
|
|
39293
39299
|
return;
|
|
39294
|
-
const M = findByUid(c,
|
|
39300
|
+
const M = findByUid(c, w), $ = createDesignable({
|
|
39295
39301
|
t: l,
|
|
39296
39302
|
api: r,
|
|
39297
39303
|
refresh: a,
|
|
@@ -39378,7 +39384,7 @@ const insertPositionToMethod = {
|
|
|
39378
39384
|
components: components$4,
|
|
39379
39385
|
effects: g,
|
|
39380
39386
|
schema: F,
|
|
39381
|
-
onSubmit:
|
|
39387
|
+
onSubmit: R
|
|
39382
39388
|
}
|
|
39383
39389
|
),
|
|
39384
39390
|
/* @__PURE__ */ jsx(SchemaSettingsDivider, {}),
|
|
@@ -39622,8 +39628,8 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
39622
39628
|
const I = findMenuItem(v);
|
|
39623
39629
|
if (!I)
|
|
39624
39630
|
return n == null ? void 0 : n(y);
|
|
39625
|
-
const
|
|
39626
|
-
o(
|
|
39631
|
+
const R = findKeysByUid(e, I["x-uid"]);
|
|
39632
|
+
o(R), n == null || n({
|
|
39627
39633
|
key: I.name,
|
|
39628
39634
|
item: {
|
|
39629
39635
|
props: {
|
|
@@ -39762,18 +39768,18 @@ const useMenuDragEnd = () => {
|
|
|
39762
39768
|
onChange: d,
|
|
39763
39769
|
onFocus: p,
|
|
39764
39770
|
theme: m
|
|
39765
|
-
} = useProps(e), { t: h } = useTranslation(), g = useDesigner(), f = useFieldSchema(), C = useAPIClient(), { render: b } = useSchemaInitializerRender(f["x-initializer"], f["x-initializer-props"]), S = useSideMenuRef(), [y, v] = useState(), [F, I] = useState(() => i || (r ? findKeysByUid(f, r) : [])), [
|
|
39771
|
+
} = useProps(e), { t: h } = useTranslation(), g = useDesigner(), f = useFieldSchema(), C = useAPIClient(), { render: b } = useSchemaInitializerRender(f["x-initializer"], f["x-initializer-props"]), S = useSideMenuRef(), [y, v] = useState(), [F, I] = useState(() => i || (r ? findKeysByUid(f, r) : [])), [R, T] = useState(() => ["inline", "mix"].includes(n) ? a || F : a), D = useMemo(() => {
|
|
39766
39772
|
var B;
|
|
39767
39773
|
let N;
|
|
39768
39774
|
if (o) {
|
|
39769
|
-
const
|
|
39770
|
-
N = (
|
|
39775
|
+
const w = findKeysByUid(f, o);
|
|
39776
|
+
N = (w == null ? void 0 : w[0]) || null;
|
|
39771
39777
|
} else
|
|
39772
39778
|
N = (F == null ? void 0 : F[0]) || null;
|
|
39773
39779
|
if (n === "mix" && N) {
|
|
39774
|
-
const
|
|
39775
|
-
if ((
|
|
39776
|
-
return
|
|
39780
|
+
const w = (B = f.properties) == null ? void 0 : B[N];
|
|
39781
|
+
if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
|
|
39782
|
+
return w;
|
|
39777
39783
|
}
|
|
39778
39784
|
return null;
|
|
39779
39785
|
}, [F, n, f, o]);
|
|
@@ -39802,7 +39808,7 @@ const useMenuDragEnd = () => {
|
|
|
39802
39808
|
onSelect: t,
|
|
39803
39809
|
setDefaultSelectedKeys: I,
|
|
39804
39810
|
defaultSelectedKeys: F,
|
|
39805
|
-
defaultOpenKeys:
|
|
39811
|
+
defaultOpenKeys: R,
|
|
39806
39812
|
selectedKeys: y,
|
|
39807
39813
|
designable: O.designable,
|
|
39808
39814
|
render: b,
|
|
@@ -39815,7 +39821,7 @@ const useMenuDragEnd = () => {
|
|
|
39815
39821
|
mode: n,
|
|
39816
39822
|
sideMenuSchema: D,
|
|
39817
39823
|
sideMenuRef: S,
|
|
39818
|
-
openKeys:
|
|
39824
|
+
openKeys: R,
|
|
39819
39825
|
setOpenKeys: T,
|
|
39820
39826
|
selectedKeys: y,
|
|
39821
39827
|
onSelect: t,
|
|
@@ -40206,15 +40212,15 @@ const className1 = css`
|
|
|
40206
40212
|
m
|
|
40207
40213
|
).open({
|
|
40208
40214
|
initialValues: {}
|
|
40209
|
-
}), { title: I, icon:
|
|
40215
|
+
}), { title: I, icon: R } = F, T = uid(), D = uid();
|
|
40210
40216
|
yield g({
|
|
40211
40217
|
type: NocoBaseDesktopRouteType.tabs,
|
|
40212
40218
|
schemaUid: T,
|
|
40213
40219
|
title: I || '{{t("Unnamed")}}',
|
|
40214
|
-
icon:
|
|
40220
|
+
icon: R,
|
|
40215
40221
|
parentId: h.id,
|
|
40216
40222
|
tabSchemaName: D
|
|
40217
|
-
}), u.insertBeforeEnd(getTabSchema({ title: I, icon:
|
|
40223
|
+
}), u.insertBeforeEnd(getTabSchema({ title: I, icon: R, schemaUid: T, tabSchemaName: D }));
|
|
40218
40224
|
}),
|
|
40219
40225
|
children: o("Add tab")
|
|
40220
40226
|
}
|
|
@@ -40231,14 +40237,14 @@ const className1 = css`
|
|
|
40231
40237
|
return (F = h == null ? void 0 : h.children) == null ? void 0 : F.map((I) => {
|
|
40232
40238
|
if (!I || I.hideInMenu)
|
|
40233
40239
|
return null;
|
|
40234
|
-
const
|
|
40240
|
+
const R = { __route__: I };
|
|
40235
40241
|
return {
|
|
40236
40242
|
label: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: I, children: /* @__PURE__ */ jsxs(
|
|
40237
40243
|
SortableItem,
|
|
40238
40244
|
{
|
|
40239
40245
|
id: String(I.id),
|
|
40240
40246
|
className: cls("nb-action-link", "designerCss", e),
|
|
40241
|
-
schema:
|
|
40247
|
+
schema: R,
|
|
40242
40248
|
children: [
|
|
40243
40249
|
I.icon && /* @__PURE__ */ jsx(Icon, { style: { marginRight: 8 }, type: I.icon }),
|
|
40244
40250
|
/* @__PURE__ */ jsx("span", { children: I.title && r(f(I.title)) || o("Unnamed") }),
|
|
@@ -40621,15 +40627,15 @@ const AppendsTreeSelect = (e) => {
|
|
|
40621
40627
|
"rootOption",
|
|
40622
40628
|
"loadData"
|
|
40623
40629
|
]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = i({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (N, B) => {
|
|
40624
|
-
const
|
|
40625
|
-
return
|
|
40630
|
+
const w = S.getCollection(N);
|
|
40631
|
+
return w ? w.getAllFields(B) : [];
|
|
40626
40632
|
}, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((N) => m[N]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
|
|
40627
40633
|
(N) => V(void 0, null, function* () {
|
|
40628
40634
|
if (c != null)
|
|
40629
40635
|
return c(N);
|
|
40630
40636
|
if (!N.isLeaf && N.loadChildren) {
|
|
40631
40637
|
const B = N.loadChildren(N);
|
|
40632
|
-
h((
|
|
40638
|
+
h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
40633
40639
|
}
|
|
40634
40640
|
}),
|
|
40635
40641
|
[c]
|
|
@@ -40641,15 +40647,15 @@ const AppendsTreeSelect = (e) => {
|
|
|
40641
40647
|
title: l.label,
|
|
40642
40648
|
fullTitle: l.label,
|
|
40643
40649
|
isLeaf: !1
|
|
40644
|
-
}) : null,
|
|
40645
|
-
N && (
|
|
40650
|
+
}) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, N)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
|
|
40651
|
+
N && (w[N.value] = N), h(w);
|
|
40646
40652
|
}, [g, l, a, c]), useEffect(() => {
|
|
40647
40653
|
const N = e.multiple ? n : n ? [n] : [];
|
|
40648
|
-
if (!(N != null && N.length) || N.every((
|
|
40654
|
+
if (!(N != null && N.length) || N.every((w) => !!m[w]))
|
|
40649
40655
|
return;
|
|
40650
40656
|
const B = [];
|
|
40651
|
-
N.forEach((
|
|
40652
|
-
const M =
|
|
40657
|
+
N.forEach((w) => {
|
|
40658
|
+
const M = w.split(".");
|
|
40653
40659
|
let $ = m[M[0]];
|
|
40654
40660
|
for (let k = 1; k < M.length && $; k++) {
|
|
40655
40661
|
const z = M.slice(0, k + 1).join(".");
|
|
@@ -40662,38 +40668,38 @@ const AppendsTreeSelect = (e) => {
|
|
|
40662
40668
|
E != null && E.length && (B.push(...E), $ = E.find((q) => q.value === M.slice(0, k + 1).join(".")));
|
|
40663
40669
|
}
|
|
40664
40670
|
}
|
|
40665
|
-
}), h((
|
|
40671
|
+
}), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
40666
40672
|
}, [n, v.length, e.multiple]);
|
|
40667
|
-
const
|
|
40673
|
+
const R = useCallback(
|
|
40668
40674
|
(N) => {
|
|
40669
40675
|
if (!e.multiple) {
|
|
40670
40676
|
o(N);
|
|
40671
40677
|
return;
|
|
40672
40678
|
}
|
|
40673
|
-
const B = N.map(($) => $.value).filter(Boolean),
|
|
40679
|
+
const B = N.map(($) => $.value).filter(Boolean), w = new Set(B), M = F.find(($) => !w.has($.value));
|
|
40674
40680
|
if (M) {
|
|
40675
40681
|
const $ = `${M.value}.`;
|
|
40676
40682
|
Object.keys(m).forEach((k) => {
|
|
40677
|
-
k.startsWith($) &&
|
|
40683
|
+
k.startsWith($) && w.delete(k);
|
|
40678
40684
|
});
|
|
40679
40685
|
} else
|
|
40680
40686
|
B.forEach(($) => {
|
|
40681
40687
|
const k = $.split(".");
|
|
40682
40688
|
if (k.length)
|
|
40683
40689
|
for (let z = 1; z <= k.length; z++)
|
|
40684
|
-
|
|
40690
|
+
w.add(k.slice(0, z).join("."));
|
|
40685
40691
|
});
|
|
40686
|
-
o(Array.from(
|
|
40692
|
+
o(Array.from(w));
|
|
40687
40693
|
},
|
|
40688
40694
|
[e.multiple, F, o, m]
|
|
40689
40695
|
), T = useCallback(
|
|
40690
40696
|
(N) => {
|
|
40691
40697
|
var z;
|
|
40692
|
-
const { value: B, onClose:
|
|
40698
|
+
const { value: B, onClose: w, disabled: M, closable: $ } = N;
|
|
40693
40699
|
if (!B)
|
|
40694
40700
|
return null;
|
|
40695
40701
|
const { fullTitle: k } = (z = m[B]) != null ? z : {};
|
|
40696
|
-
return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose:
|
|
40702
|
+
return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
|
|
40697
40703
|
},
|
|
40698
40704
|
[m]
|
|
40699
40705
|
), D = Array.isArray(F) ? F.filter((N) => N.value in m) : F, O = e.multiple ? n : n != null ? [n] : [];
|
|
@@ -40712,7 +40718,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
40712
40718
|
treeCheckStrictly: e.multiple,
|
|
40713
40719
|
treeCheckable: e.multiple,
|
|
40714
40720
|
tagRender: T,
|
|
40715
|
-
onChange:
|
|
40721
|
+
onChange: R,
|
|
40716
40722
|
treeDataSimpleMode: !0,
|
|
40717
40723
|
treeData: v,
|
|
40718
40724
|
loadData: I
|
|
@@ -40750,34 +40756,34 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
40750
40756
|
return f.addEffects(j, () => {
|
|
40751
40757
|
onFieldInputValueChange("*", (N) => {
|
|
40752
40758
|
var $, k, z, E, q, L;
|
|
40753
|
-
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [],
|
|
40754
|
-
B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(
|
|
40759
|
+
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
|
|
40760
|
+
B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(w, M)) && (r.setValue(null), p(null));
|
|
40755
40761
|
});
|
|
40756
40762
|
}), () => {
|
|
40757
40763
|
f.removeEffects(j);
|
|
40758
40764
|
};
|
|
40759
40765
|
}, []);
|
|
40760
|
-
const
|
|
40766
|
+
const R = (j) => V(void 0, null, function* () {
|
|
40761
40767
|
var M, $;
|
|
40762
40768
|
const { search: N, callBack: B } = j, {
|
|
40763
|
-
data: { data:
|
|
40769
|
+
data: { data: w }
|
|
40764
40770
|
} = yield b.create({
|
|
40765
40771
|
values: {
|
|
40766
40772
|
[(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]: N
|
|
40767
40773
|
}
|
|
40768
40774
|
});
|
|
40769
|
-
if (
|
|
40775
|
+
if (w) {
|
|
40770
40776
|
if (["m2m", "o2m"].includes(l == null ? void 0 : l.interface) && g !== !1) {
|
|
40771
40777
|
const k = f.getValuesIn(r.path) || [];
|
|
40772
|
-
k.push(
|
|
40778
|
+
k.push(w), f.setValuesIn(r.path, k), r.onInput(k);
|
|
40773
40779
|
} else
|
|
40774
|
-
f.setValuesIn(r.path,
|
|
40780
|
+
f.setValuesIn(r.path, w), r.onInput(w);
|
|
40775
40781
|
isFunction$1(B) && (B == null || B()), message.success(h("Saved successfully"));
|
|
40776
40782
|
}
|
|
40777
40783
|
}), T = (j) => /* @__PURE__ */ jsxs(
|
|
40778
40784
|
"div",
|
|
40779
40785
|
{
|
|
40780
|
-
onClick: () =>
|
|
40786
|
+
onClick: () => R(j),
|
|
40781
40787
|
style: { cursor: "pointer", padding: "5px 12px", color: "#0d0c0c" },
|
|
40782
40788
|
children: [
|
|
40783
40789
|
/* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
@@ -41398,16 +41404,16 @@ function Uploader(n) {
|
|
|
41398
41404
|
var N;
|
|
41399
41405
|
const j = O.fileList.filter((B) => B.status !== "done").map(normalizeFile);
|
|
41400
41406
|
if (m(j), i) {
|
|
41401
|
-
const B = O.fileList.filter((
|
|
41407
|
+
const B = O.fileList.filter((w) => w.status === "done");
|
|
41402
41408
|
if (B.length) {
|
|
41403
|
-
const
|
|
41409
|
+
const w = [...u, ...B.map((M) => {
|
|
41404
41410
|
var $;
|
|
41405
41411
|
return c(($ = M.response) == null ? void 0 : $.data);
|
|
41406
41412
|
})];
|
|
41407
|
-
j.length ? d(
|
|
41413
|
+
j.length ? d(w) : (l == null || l([...a || [], ...w]), d([]));
|
|
41408
41414
|
}
|
|
41409
41415
|
} else {
|
|
41410
|
-
const B = O.fileList.find((
|
|
41416
|
+
const B = O.fileList.find((w) => w.uid === O.file.uid);
|
|
41411
41417
|
B.status === "done" && (l == null || l(c((N = B.response) == null ? void 0 : N.data)), m([]));
|
|
41412
41418
|
}
|
|
41413
41419
|
},
|
|
@@ -41422,7 +41428,7 @@ function Uploader(n) {
|
|
|
41422
41428
|
const N = j.indexOf(O);
|
|
41423
41429
|
return j.splice(N, 1), [...j];
|
|
41424
41430
|
});
|
|
41425
|
-
}, []), F = useComponent("QRCodeUploader"), { mimetype: I, size:
|
|
41431
|
+
}, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: R } = e != null ? e : {}, T = useSizeHint(R), D = !r && (i || (!a || Array.isArray(a) && !a.length) && !p.length);
|
|
41426
41432
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41427
41433
|
u.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: v }, O.id)),
|
|
41428
41434
|
p.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: y }, O.uid)),
|
|
@@ -41737,7 +41743,7 @@ function FileSelector(e) {
|
|
|
41737
41743
|
const InternalFileManager = (e) => {
|
|
41738
41744
|
var D, O;
|
|
41739
41745
|
const T = e, { value: t, multiple: n, onChange: o } = T, r = Y(T, ["value", "multiple", "onChange"]), i = useFieldSchema(), [a, l] = useState(!1), [c, u] = useState([]), d = useInsertSchema$1("Selector"), p = useFieldNames$1(e), { designable: m } = useDesignable(), h = useField(), [g, f] = useState([]), { getField: C } = useCollection_deprecated(), b = C(h.props.name), S = useLabelUiSchema$1(b == null ? void 0 : b.target, (p == null ? void 0 : p.label) || "label"), y = useCompile(), { modalProps: v } = useActionContext(), F = (j) => {
|
|
41740
|
-
j.stopPropagation(), j.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties((B,
|
|
41746
|
+
j.stopPropagation(), j.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties((B, w) => w["x-component"] === "AssociationField.Selector" ? w : B, null) || i.addProperty("selector", schema$1.Selector), l(!0), u([]);
|
|
41741
41747
|
};
|
|
41742
41748
|
useEffect(() => {
|
|
41743
41749
|
if (t && Object.keys(t).length > 0) {
|
|
@@ -41763,11 +41769,11 @@ const InternalFileManager = (e) => {
|
|
|
41763
41769
|
selectedRows: c,
|
|
41764
41770
|
setSelectedRows: u,
|
|
41765
41771
|
collectionField: b
|
|
41766
|
-
},
|
|
41767
|
-
const { setVisible: j } = useActionContext(), { multiple: N, selectedRows: B, onChange:
|
|
41772
|
+
}, R = () => {
|
|
41773
|
+
const { setVisible: j } = useActionContext(), { multiple: N, selectedRows: B, onChange: w, options: M, collectionField: $ } = useContext(RecordPickerContext);
|
|
41768
41774
|
return {
|
|
41769
41775
|
onClick() {
|
|
41770
|
-
|
|
41776
|
+
w(N ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
|
|
41771
41777
|
}
|
|
41772
41778
|
};
|
|
41773
41779
|
};
|
|
@@ -41796,7 +41802,7 @@ const InternalFileManager = (e) => {
|
|
|
41796
41802
|
},
|
|
41797
41803
|
formValueChanged: !1
|
|
41798
41804
|
},
|
|
41799
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, I), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: b == null ? void 0 : b.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: {}, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { usePickActionProps:
|
|
41805
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, I), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: b == null ? void 0 : b.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: {}, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { usePickActionProps: R, useTableSelectorProps: useTableSelectorProps$3 }, children: /* @__PURE__ */ jsx(
|
|
41800
41806
|
NocoBaseRecursionField,
|
|
41801
41807
|
{
|
|
41802
41808
|
onlyRenderProperties: !0,
|
|
@@ -41823,13 +41829,13 @@ const InternalFileManager = (e) => {
|
|
|
41823
41829
|
const { data: t, mapOptions: n, onChange: o, value: r } = e, [i, a] = useState([
|
|
41824
41830
|
{ key: void 0, children: [], value: null }
|
|
41825
41831
|
]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = (N = f == null ? void 0 : f.componentProps) == null ? void 0 : N.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
|
|
41826
|
-
var B,
|
|
41827
|
-
return v != null && v.interface && ((
|
|
41832
|
+
var B, w;
|
|
41833
|
+
return v != null && v.interface && ((w = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
|
|
41828
41834
|
}, [v]), I = useField();
|
|
41829
41835
|
useEffect(() => {
|
|
41830
41836
|
var B;
|
|
41831
41837
|
if (r) {
|
|
41832
|
-
const
|
|
41838
|
+
const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter(($) => $.value), !0) : transformNestedData(r), M = (B = w == null ? void 0 : w.map) == null ? void 0 : B.call(w, ($) => ({
|
|
41833
41839
|
key: $.parentId,
|
|
41834
41840
|
children: [],
|
|
41835
41841
|
value: $
|
|
@@ -41837,12 +41843,12 @@ const InternalFileManager = (e) => {
|
|
|
41837
41843
|
a(M);
|
|
41838
41844
|
}
|
|
41839
41845
|
}, []);
|
|
41840
|
-
const
|
|
41846
|
+
const R = useCallback(
|
|
41841
41847
|
(B) => {
|
|
41842
41848
|
try {
|
|
41843
|
-
return B == null ? void 0 : B.filter((
|
|
41849
|
+
return B == null ? void 0 : B.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
|
|
41844
41850
|
var $, k, z;
|
|
41845
|
-
let M = p(
|
|
41851
|
+
let M = p(w[y.label]);
|
|
41846
41852
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
41847
41853
|
if (Array.isArray(M))
|
|
41848
41854
|
M = M.map((E, q) => {
|
|
@@ -41856,45 +41862,45 @@ const InternalFileManager = (e) => {
|
|
|
41856
41862
|
}
|
|
41857
41863
|
return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
|
|
41858
41864
|
[y.label]: M || EMPTY,
|
|
41859
|
-
[y.value]:
|
|
41860
|
-
}) : P(x({},
|
|
41865
|
+
[y.value]: w[y.value]
|
|
41866
|
+
}) : P(x({}, w), {
|
|
41861
41867
|
[y.label]: M || EMPTY,
|
|
41862
|
-
[y.value]:
|
|
41868
|
+
[y.value]: w[y.value]
|
|
41863
41869
|
});
|
|
41864
41870
|
}).filter(Boolean);
|
|
41865
|
-
} catch (
|
|
41866
|
-
return console.error(
|
|
41871
|
+
} catch (w) {
|
|
41872
|
+
return console.error(w), B;
|
|
41867
41873
|
}
|
|
41868
41874
|
},
|
|
41869
41875
|
[v == null ? void 0 : v.uiSchema, y]
|
|
41870
41876
|
), T = (B) => V(void 0, null, function* () {
|
|
41871
41877
|
var M, $;
|
|
41872
|
-
const
|
|
41878
|
+
const w = yield C.list({
|
|
41873
41879
|
pageSize: 200,
|
|
41874
41880
|
params: h == null ? void 0 : h.params,
|
|
41875
41881
|
filter: mergeFilter([B, (M = h == null ? void 0 : h.params) == null ? void 0 : M.filter]),
|
|
41876
41882
|
tree: B.parentId ? void 0 : !0
|
|
41877
41883
|
});
|
|
41878
|
-
return ($ =
|
|
41879
|
-
}), D = (B,
|
|
41880
|
-
const $ = yield T({ parentId:
|
|
41881
|
-
if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value:
|
|
41884
|
+
return ($ = w == null ? void 0 : w.data) == null ? void 0 : $.data;
|
|
41885
|
+
}), D = (B, w, M) => V(void 0, null, function* () {
|
|
41886
|
+
const $ = yield T({ parentId: w == null ? void 0 : w.id }), k = [...i];
|
|
41887
|
+
if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: w }), w != null && w.id && (k[M + 1] = { key: w == null ? void 0 : w.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
41882
41888
|
const z = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
41883
|
-
z[I.index] =
|
|
41889
|
+
z[I.index] = w, f.fieldValue = z;
|
|
41884
41890
|
} else
|
|
41885
|
-
f.value =
|
|
41891
|
+
f.value = w;
|
|
41886
41892
|
k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
|
|
41887
|
-
}), O = (B,
|
|
41893
|
+
}), O = (B, w, M) => V(void 0, null, function* () {
|
|
41888
41894
|
var $, k, z;
|
|
41889
41895
|
if (B) {
|
|
41890
41896
|
d(!0);
|
|
41891
|
-
const E = yield T({ parentId:
|
|
41892
|
-
if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ =
|
|
41893
|
-
const q = yield T({ parentId: (k =
|
|
41894
|
-
L.splice(M + 1), L[M] = P(x({}, L[M]), { value:
|
|
41897
|
+
const E = yield T({ parentId: w == null ? void 0 : w.key });
|
|
41898
|
+
if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ = w == null ? void 0 : w.value) != null && $.id)) {
|
|
41899
|
+
const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), L = [...i];
|
|
41900
|
+
L.splice(M + 1), L[M] = P(x({}, L[M]), { value: w == null ? void 0 : w.value }), L[M + 1] = { key: (z = w == null ? void 0 : w.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), o == null || o(L);
|
|
41895
41901
|
}
|
|
41896
41902
|
}
|
|
41897
|
-
}), j = (B,
|
|
41903
|
+
}), j = (B, w) => V(void 0, null, function* () {
|
|
41898
41904
|
const M = B ? {
|
|
41899
41905
|
[y.label]: {
|
|
41900
41906
|
[F]: B
|
|
@@ -41902,11 +41908,11 @@ const InternalFileManager = (e) => {
|
|
|
41902
41908
|
} : {};
|
|
41903
41909
|
d(!0);
|
|
41904
41910
|
const $ = yield T(P(x({}, M), {
|
|
41905
|
-
parentId:
|
|
41911
|
+
parentId: w == null ? void 0 : w.key
|
|
41906
41912
|
}));
|
|
41907
41913
|
d(!1), c($);
|
|
41908
41914
|
});
|
|
41909
|
-
return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((B,
|
|
41915
|
+
return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((B, w) => {
|
|
41910
41916
|
var M, $, k;
|
|
41911
41917
|
return B.children && /* @__PURE__ */ jsx(
|
|
41912
41918
|
Select$1,
|
|
@@ -41925,9 +41931,9 @@ const InternalFileManager = (e) => {
|
|
|
41925
41931
|
onSearch: (z) => j(z, B),
|
|
41926
41932
|
fieldNames: y,
|
|
41927
41933
|
style: { minWidth: 150 },
|
|
41928
|
-
onChange: (z, E) => D(z, E,
|
|
41929
|
-
options: u ? [] :
|
|
41930
|
-
onDropdownVisibleChange: (z) => O(z, B,
|
|
41934
|
+
onChange: (z, E) => D(z, E, w),
|
|
41935
|
+
options: u ? [] : R(l),
|
|
41936
|
+
onDropdownVisibleChange: (z) => O(z, B, w),
|
|
41931
41937
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
41932
41938
|
},
|
|
41933
41939
|
`${(k = B.value) == null ? void 0 : k.id}+ ${B.key} + ${y.label}`
|
|
@@ -42166,7 +42172,7 @@ const InternalNesterCardCss = css`
|
|
|
42166
42172
|
}, InternalPicker = observer$1(
|
|
42167
42173
|
(e) => {
|
|
42168
42174
|
var B;
|
|
42169
|
-
const N = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = N, c = Y(N, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(),
|
|
42175
|
+
const N = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = N, c = Y(N, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
|
|
42170
42176
|
const $ = M == null ? void 0 : M[d.label];
|
|
42171
42177
|
return P(x({}, M), {
|
|
42172
42178
|
[d.label]: getLabelFormatValue$1(b(S), b($))
|
|
@@ -42178,23 +42184,23 @@ const InternalNesterCardCss = css`
|
|
|
42178
42184
|
association: {
|
|
42179
42185
|
target: f == null ? void 0 : f.target
|
|
42180
42186
|
},
|
|
42181
|
-
options:
|
|
42187
|
+
options: R,
|
|
42182
42188
|
onChange: e == null ? void 0 : e.onChange,
|
|
42183
42189
|
selectedRows: v,
|
|
42184
42190
|
setSelectedRows: F,
|
|
42185
42191
|
collectionField: f,
|
|
42186
42192
|
currentFormCollection: C
|
|
42187
42193
|
}, D = () => {
|
|
42188
|
-
var
|
|
42189
|
-
return n == null ? null : Array.isArray(t) ? (
|
|
42194
|
+
var w;
|
|
42195
|
+
return n == null ? null : Array.isArray(t) ? (w = t.filter(Boolean)) == null ? void 0 : w.map((M) => M == null ? void 0 : M[d.value]) : t == null ? void 0 : t[d.value];
|
|
42190
42196
|
}, O = () => {
|
|
42191
|
-
const
|
|
42192
|
-
return M.length ? { $and: [{ [`${
|
|
42197
|
+
const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
|
|
42198
|
+
return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
|
|
42193
42199
|
}, j = () => {
|
|
42194
|
-
const { setVisible:
|
|
42200
|
+
const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: $, onChange: k, options: z, collectionField: E } = useContext(RecordPickerContext);
|
|
42195
42201
|
return {
|
|
42196
42202
|
onClick() {
|
|
42197
|
-
k(M ? unionBy($, z, (E == null ? void 0 : E.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null),
|
|
42203
|
+
k(M ? unionBy($, z, (E == null ? void 0 : E.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), w(!1);
|
|
42198
42204
|
},
|
|
42199
42205
|
style: {
|
|
42200
42206
|
display: M === !1 ? "none" : "block"
|
|
@@ -42213,18 +42219,18 @@ const InternalNesterCardCss = css`
|
|
|
42213
42219
|
}, c), {
|
|
42214
42220
|
mode: n ? "multiple" : e.mode,
|
|
42215
42221
|
fieldNames: d,
|
|
42216
|
-
onDropdownVisibleChange: (
|
|
42222
|
+
onDropdownVisibleChange: (w) => {
|
|
42217
42223
|
g(schema$1.Selector), m(!0);
|
|
42218
42224
|
},
|
|
42219
42225
|
allowClear: !0,
|
|
42220
|
-
onChange: (
|
|
42221
|
-
if (
|
|
42222
|
-
if (Array.isArray(
|
|
42223
|
-
if (!
|
|
42226
|
+
onChange: (w) => {
|
|
42227
|
+
if (w) {
|
|
42228
|
+
if (Array.isArray(w)) {
|
|
42229
|
+
if (!w.length) {
|
|
42224
42230
|
r([]), F([]);
|
|
42225
42231
|
return;
|
|
42226
42232
|
}
|
|
42227
|
-
const M =
|
|
42233
|
+
const M = R == null ? void 0 : R.filter(($) => w.includes($[d.value]));
|
|
42228
42234
|
r(M), F(M);
|
|
42229
42235
|
}
|
|
42230
42236
|
} else {
|
|
@@ -42232,7 +42238,7 @@ const InternalNesterCardCss = css`
|
|
|
42232
42238
|
r(M), F(M);
|
|
42233
42239
|
}
|
|
42234
42240
|
},
|
|
42235
|
-
options:
|
|
42241
|
+
options: R,
|
|
42236
42242
|
value: D(),
|
|
42237
42243
|
open: !1
|
|
42238
42244
|
})
|
|
@@ -42243,7 +42249,7 @@ const InternalNesterCardCss = css`
|
|
|
42243
42249
|
onlyRenderProperties: !0,
|
|
42244
42250
|
basePath: u.address,
|
|
42245
42251
|
schema: h,
|
|
42246
|
-
filterProperties: (
|
|
42252
|
+
filterProperties: (w) => w["x-component"] === "Action"
|
|
42247
42253
|
}
|
|
42248
42254
|
) }) })
|
|
42249
42255
|
] }),
|
|
@@ -42269,7 +42275,7 @@ const InternalNesterCardCss = css`
|
|
|
42269
42275
|
onlyRenderProperties: !0,
|
|
42270
42276
|
basePath: u.address,
|
|
42271
42277
|
schema: h,
|
|
42272
|
-
filterProperties: (
|
|
42278
|
+
filterProperties: (w) => w["x-component"] === "AssociationField.Selector"
|
|
42273
42279
|
}
|
|
42274
42280
|
)
|
|
42275
42281
|
}
|
|
@@ -42306,11 +42312,11 @@ const RenderRecord = React.memo(
|
|
|
42306
42312
|
F.current = u;
|
|
42307
42313
|
const I = useCallback(() => F.current, []);
|
|
42308
42314
|
return useEffect(() => {
|
|
42309
|
-
const
|
|
42310
|
-
const j = T == null ? void 0 : T[(e == null ? void 0 : e.label) || "label"], N = t ? transformNestedData(T).map(($) => $ == null ? void 0 : $[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(j) ? JSON.stringify(j) : j, B = toValue$4(n(N), "N/A"),
|
|
42315
|
+
const R = toArr$3(h).map((T, D, O) => {
|
|
42316
|
+
const j = T == null ? void 0 : T[(e == null ? void 0 : e.label) || "label"], N = t ? transformNestedData(T).map(($) => $ == null ? void 0 : $[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(j) ? JSON.stringify(j) : j, B = toValue$4(n(N), "N/A"), w = o(
|
|
42311
42317
|
(T == null ? void 0 : T.__collection) || (r == null ? void 0 : r.target),
|
|
42312
42318
|
(e == null ? void 0 : e.label) || "label"
|
|
42313
|
-
), M = getLabelFormatValue$1(n(
|
|
42319
|
+
), M = getLabelFormatValue$1(n(w), B, !0);
|
|
42314
42320
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42315
42321
|
/* @__PURE__ */ jsx("span", { children: i ? M : a !== !1 ? /* @__PURE__ */ jsx(
|
|
42316
42322
|
"a",
|
|
@@ -42337,7 +42343,7 @@ const RenderRecord = React.memo(
|
|
|
42337
42343
|
D < O.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
|
|
42338
42344
|
] }, `${T == null ? void 0 : T.id}_${D}`);
|
|
42339
42345
|
});
|
|
42340
|
-
y(
|
|
42346
|
+
y(R), b(!1);
|
|
42341
42347
|
}, [
|
|
42342
42348
|
r == null ? void 0 : r.target,
|
|
42343
42349
|
n,
|
|
@@ -42776,7 +42782,7 @@ const CreateAction = observer$1(
|
|
|
42776
42782
|
key: D.name,
|
|
42777
42783
|
label: S(D.title),
|
|
42778
42784
|
onClick: () => t == null ? void 0 : t(D)
|
|
42779
|
-
})), [g, t]),
|
|
42785
|
+
})), [g, t]), R = useMemo(() => ({
|
|
42780
42786
|
items: I
|
|
42781
42787
|
}), [I]);
|
|
42782
42788
|
return useEffect(() => {
|
|
@@ -42803,7 +42809,7 @@ const CreateAction = observer$1(
|
|
|
42803
42809
|
allowAddToCurrent: u,
|
|
42804
42810
|
props: e,
|
|
42805
42811
|
componentType: p,
|
|
42806
|
-
menu:
|
|
42812
|
+
menu: R,
|
|
42807
42813
|
onClick: t,
|
|
42808
42814
|
collection: n,
|
|
42809
42815
|
icon: v,
|
|
@@ -42846,8 +42852,8 @@ function FinallyButton({
|
|
|
42846
42852
|
danger: o.danger,
|
|
42847
42853
|
icon: c,
|
|
42848
42854
|
onClick: (v) => {
|
|
42849
|
-
const F = getLinkageCollection(t, d, u), I = e.find((T) => T.name === F) ? F : l.name,
|
|
42850
|
-
a == null || a(
|
|
42855
|
+
const F = getLinkageCollection(t, d, u), I = e.find((T) => T.name === F) ? F : l.name, R = m(I);
|
|
42856
|
+
a == null || a(R);
|
|
42851
42857
|
},
|
|
42852
42858
|
style: x({
|
|
42853
42859
|
display: !p && ((C = u == null ? void 0 : u.data) == null ? void 0 : C.hidden) && "none",
|
|
@@ -42991,14 +42997,14 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
42991
42997
|
}
|
|
42992
42998
|
});
|
|
42993
42999
|
Array.isArray(o.value) || (o.value = []);
|
|
42994
|
-
const I = useCallback(({ form: j, fieldSchema: N, collectionField: B, getInterface:
|
|
43000
|
+
const I = useCallback(({ form: j, fieldSchema: N, collectionField: B, getInterface: w }) => {
|
|
42995
43001
|
var M;
|
|
42996
|
-
return !B || B.target && ((M = N["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(N["x-component-props"].mode) ? !1 : !(j != null && j.readPretty) && !isPatternDisabled(N) && !interfacesOfUnsupportedDefaultValue.includes(B == null ? void 0 : B.interface) && !isSystemField(B,
|
|
42997
|
-
}, []),
|
|
43002
|
+
return !B || B.target && ((M = N["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(N["x-component-props"].mode) ? !1 : !(j != null && j.readPretty) && !isPatternDisabled(N) && !interfacesOfUnsupportedDefaultValue.includes(B == null ? void 0 : B.interface) && !isSystemField(B, w);
|
|
43003
|
+
}, []), R = () => {
|
|
42998
43004
|
const { setVisible: j } = useActionContext(), { selectedRows: N, setSelectedRows: B } = useContext(RecordPickerContext);
|
|
42999
43005
|
return {
|
|
43000
43006
|
onClick() {
|
|
43001
|
-
N.map((
|
|
43007
|
+
N.map((w) => o.value.push(markRecordAsNew(w))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
|
|
43002
43008
|
}
|
|
43003
43009
|
};
|
|
43004
43010
|
}, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((N) => {
|
|
@@ -43019,7 +43025,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43019
43025
|
setSelectedRows: b,
|
|
43020
43026
|
collectionField: n
|
|
43021
43027
|
}, O = () => {
|
|
43022
|
-
const j = (n == null ? void 0 : n.targetKey) || "id", N = (o.value || []).map((
|
|
43028
|
+
const j = (n == null ? void 0 : n.targetKey) || "id", N = (o.value || []).map((w) => w == null ? void 0 : w[j]).filter(Boolean);
|
|
43023
43029
|
return N.length ? { $and: [{ [`${j}.$ne`]: N }] } : {};
|
|
43024
43030
|
};
|
|
43025
43031
|
return o.value.length > 0 ? /* @__PURE__ */ jsxs(
|
|
@@ -43108,7 +43114,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43108
43114
|
SchemaComponentOptions,
|
|
43109
43115
|
{
|
|
43110
43116
|
scope: {
|
|
43111
|
-
usePickActionProps:
|
|
43117
|
+
usePickActionProps: R,
|
|
43112
43118
|
useTableSelectorProps: useTableSelectorProps$2,
|
|
43113
43119
|
useCreateActionProps
|
|
43114
43120
|
},
|
|
@@ -43150,7 +43156,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43150
43156
|
const t = useFieldSchema(), { enableLink: n, tagColorField: o } = t["x-component-props"], r = useFieldNames$1({ fieldNames: e.fieldNames }), i = useInsertSchema$1("Viewer"), { options: a } = useAssociationFieldContext(), l = useCompile(), { designable: c } = useDesignable(), u = useLabelUiSchema$1(a, (r == null ? void 0 : r.label) || "label"), { snapshot: d } = useActionContext(), p = useRef(), { getCollection: m } = useCollectionManager_deprecated(), h = m(a == null ? void 0 : a.target), g = (h == null ? void 0 : h.template) === "tree", { openPopup: f } = usePopupUtils(), C = useCollectionRecordData(), b = useRef(!1), S = useRef(t);
|
|
43151
43157
|
S.current = t;
|
|
43152
43158
|
const y = useCallback(() => S.current, []);
|
|
43153
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I,
|
|
43159
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, R) => {
|
|
43154
43160
|
const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((N) => N == null ? void 0 : N[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, O = toValue$3(l(D), "N/A"), j = getTabFormatValue(l(u), O, F[o]);
|
|
43155
43161
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43156
43162
|
/* @__PURE__ */ jsx("span", { children: d ? j : n !== !1 ? /* @__PURE__ */ jsx(
|
|
@@ -43175,7 +43181,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43175
43181
|
children: j
|
|
43176
43182
|
}
|
|
43177
43183
|
) : j }),
|
|
43178
|
-
I <
|
|
43184
|
+
I < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
|
|
43179
43185
|
] }, `${F == null ? void 0 : F[r.value]}_${I}`);
|
|
43180
43186
|
}) });
|
|
43181
43187
|
},
|
|
@@ -43237,13 +43243,13 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43237
43243
|
}
|
|
43238
43244
|
`, [n.paddingContentVerticalLG, n.marginSM]), f = useCollection(), C = useMemo(
|
|
43239
43245
|
() => d == null ? void 0 : d.map((S) => {
|
|
43240
|
-
var I,
|
|
43246
|
+
var I, R, T, D;
|
|
43241
43247
|
const y = S.reduceProperties((O, j) => {
|
|
43242
43248
|
if (isCollectionFieldComponent(j))
|
|
43243
43249
|
return O.concat([j]);
|
|
43244
43250
|
}, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((I = S["x-component-props"]) != null && I.columnHidden);
|
|
43245
43251
|
return P(x({
|
|
43246
|
-
title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (
|
|
43252
|
+
title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (R = S["x-component-props"]) == null ? void 0 : R.tooltip }),
|
|
43247
43253
|
dataIndex: v,
|
|
43248
43254
|
key: S.name,
|
|
43249
43255
|
sorter: (T = S["x-component-props"]) == null ? void 0 : T.sorter,
|
|
@@ -43251,8 +43257,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43251
43257
|
}, S["x-component-props"]), {
|
|
43252
43258
|
width: F && !a ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
|
|
43253
43259
|
render: (O, j) => {
|
|
43254
|
-
var
|
|
43255
|
-
const N = (
|
|
43260
|
+
var w;
|
|
43261
|
+
const N = (w = o.value) == null ? void 0 : w.indexOf(j), B = o.address.concat(j.__index || N);
|
|
43256
43262
|
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || N, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: B, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: B, schema: S, onlyRenderProperties: !0 }) }, N) }) }) }) });
|
|
43257
43263
|
},
|
|
43258
43264
|
onCell: (O, j) => ({
|
|
@@ -43296,11 +43302,11 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43296
43302
|
"div",
|
|
43297
43303
|
{
|
|
43298
43304
|
onClick: () => action(() => {
|
|
43299
|
-
const I = (p - 1) * m + F,
|
|
43305
|
+
const I = (p - 1) * m + F, R = o.value[I] ? 1 : 2;
|
|
43300
43306
|
return spliceArrayState(o, {
|
|
43301
43307
|
startIndex: I,
|
|
43302
|
-
deleteCount:
|
|
43303
|
-
}), o.value.splice(I,
|
|
43308
|
+
deleteCount: R
|
|
43309
|
+
}), o.value.splice(I, R), o.setInitialValue(o.value), o.onInput(o.value);
|
|
43304
43310
|
}),
|
|
43305
43311
|
children: /* @__PURE__ */ jsx(CloseOutlined, { style: { cursor: "pointer", color: "gray" } })
|
|
43306
43312
|
}
|
|
@@ -43351,7 +43357,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43351
43357
|
const o = e, { index: t } = o, n = Y(o, ["index"]);
|
|
43352
43358
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
43353
43359
|
}, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
|
|
43354
|
-
var S, y, v, F, I,
|
|
43360
|
+
var S, y, v, F, I, R;
|
|
43355
43361
|
const { t: n } = useTranslation(), o = useField(), { token: r } = useToken$1(), { data: i } = useDataBlockRequest() || {}, { meta: a } = i || {}, { hasNext: l } = a || {}, c = useMemo(
|
|
43356
43362
|
() => x(x({}, e), t),
|
|
43357
43363
|
[JSON.stringify(x(x({}, e), t))]
|
|
@@ -43396,7 +43402,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43396
43402
|
) : j
|
|
43397
43403
|
});
|
|
43398
43404
|
}, [c, n, C, (I = o.value) == null ? void 0 : I.length]);
|
|
43399
|
-
return t === !1 || !t && e === !1 ? !1 : ((
|
|
43405
|
+
return t === !1 || !t && e === !1 ? !1 : ((R = o.value) == null ? void 0 : R.length) > 0 || b.total ? b : !1;
|
|
43400
43406
|
}, headerClass = css`
|
|
43401
43407
|
max-width: 300px;
|
|
43402
43408
|
white-space: nowrap;
|
|
@@ -43586,8 +43592,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43586
43592
|
"onExpand",
|
|
43587
43593
|
"loading",
|
|
43588
43594
|
"onClickRow"
|
|
43589
|
-
]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(),
|
|
43590
|
-
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B,
|
|
43595
|
+
]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), R = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = R, O = useMemoizedFn(b.onRowDragEnd || (() => {
|
|
43596
|
+
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, w] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
|
|
43591
43597
|
& > td {
|
|
43592
43598
|
background-color: ${t.controlItemBgActive} !important;
|
|
43593
43599
|
}
|
|
@@ -43602,7 +43608,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43602
43608
|
}) : null, [C, k]);
|
|
43603
43609
|
useDeepCompareEffect(() => {
|
|
43604
43610
|
const Q = T ? D : [];
|
|
43605
|
-
_.isEqual(Q, B) ||
|
|
43611
|
+
_.isEqual(Q, B) || w(Q);
|
|
43606
43612
|
}, [T, D]);
|
|
43607
43613
|
const H = useCallback((Q) => {
|
|
43608
43614
|
if (m)
|
|
@@ -43727,7 +43733,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43727
43733
|
), me = useCallback(
|
|
43728
43734
|
(Q, te) => {
|
|
43729
43735
|
const oe = Q ? [...B, te[F.getPrimaryKey()]] : B.filter((ie) => te[F.getPrimaryKey()] !== ie);
|
|
43730
|
-
|
|
43736
|
+
w(oe), g == null || g(Q, te);
|
|
43731
43737
|
},
|
|
43732
43738
|
[B, g, F]
|
|
43733
43739
|
), he = useMemo(() => ({
|
|
@@ -43852,7 +43858,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43852
43858
|
D(L);
|
|
43853
43859
|
}
|
|
43854
43860
|
};
|
|
43855
|
-
},
|
|
43861
|
+
}, R = () => {
|
|
43856
43862
|
const z = (o == null ? void 0 : o.targetKey) || "id", E = (n.value || []).map((L) => L == null ? void 0 : L[z]).filter(Boolean);
|
|
43857
43863
|
return E.length ? { $and: [{ [`${z}.$ne`]: E }] } : {};
|
|
43858
43864
|
}, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
|
|
@@ -43884,7 +43890,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43884
43890
|
return D(E), z.onInput(z.value);
|
|
43885
43891
|
}
|
|
43886
43892
|
};
|
|
43887
|
-
},
|
|
43893
|
+
}, w = () => ({
|
|
43888
43894
|
run() {
|
|
43889
43895
|
l(!0);
|
|
43890
43896
|
}
|
|
@@ -43929,7 +43935,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43929
43935
|
C && /* @__PURE__ */ jsx(
|
|
43930
43936
|
Action.Link,
|
|
43931
43937
|
{
|
|
43932
|
-
useAction:
|
|
43938
|
+
useAction: w,
|
|
43933
43939
|
title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, children: [
|
|
43934
43940
|
/* @__PURE__ */ jsx(ZoomInOutlined, {}),
|
|
43935
43941
|
" ",
|
|
@@ -43951,7 +43957,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43951
43957
|
visible: a,
|
|
43952
43958
|
setVisible: l
|
|
43953
43959
|
},
|
|
43954
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, F), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter:
|
|
43960
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, F), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: R() }, children: /* @__PURE__ */ jsx(
|
|
43955
43961
|
SchemaComponentOptions,
|
|
43956
43962
|
{
|
|
43957
43963
|
scope: {
|
|
@@ -44065,8 +44071,8 @@ InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
|
44065
44071
|
const AssociationSelect = InternalAssociationSelect;
|
|
44066
44072
|
AssociationSelect.Designer = function e() {
|
|
44067
44073
|
var M, $, k, z, E, q, L, G, U, H, J;
|
|
44068
|
-
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u),
|
|
44069
|
-
c.title ===
|
|
44074
|
+
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), R = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
44075
|
+
c.title === R || c.title;
|
|
44070
44076
|
const D = useSortFields(S == null ? void 0 : S.target), O = ((E = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : E.sort) || [];
|
|
44071
44077
|
useEffect(() => {
|
|
44072
44078
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
@@ -44088,7 +44094,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44088
44094
|
});
|
|
44089
44095
|
let B = "editable";
|
|
44090
44096
|
u["x-disabled"] === !0 && (B = "readonly"), u["x-read-pretty"] === !0 && (B = "read-pretty");
|
|
44091
|
-
const
|
|
44097
|
+
const w = _.omit(u, "required");
|
|
44092
44098
|
return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { children: [
|
|
44093
44099
|
/* @__PURE__ */ jsx(GeneralSchemaItems, {}),
|
|
44094
44100
|
l && !(l != null && l.readPretty) && I && /* @__PURE__ */ jsx(
|
|
@@ -44205,9 +44211,9 @@ AssociationSelect.Designer = function e() {
|
|
|
44205
44211
|
type: "object",
|
|
44206
44212
|
title: d("Set default value"),
|
|
44207
44213
|
properties: {
|
|
44208
|
-
default: P(x({},
|
|
44214
|
+
default: P(x({}, w || {}), {
|
|
44209
44215
|
"x-decorator": "FormItem",
|
|
44210
|
-
"x-component-props": P(x({},
|
|
44216
|
+
"x-component-props": P(x({}, w["x-component-props"]), {
|
|
44211
44217
|
component: S != null && S.target ? "AssociationSelect" : void 0,
|
|
44212
44218
|
service: {
|
|
44213
44219
|
resource: S == null ? void 0 : S.target
|
|
@@ -44463,10 +44469,10 @@ AssociationSelect.Designer = function e() {
|
|
|
44463
44469
|
] });
|
|
44464
44470
|
};
|
|
44465
44471
|
AssociationSelect.FilterDesigner = function e() {
|
|
44466
|
-
var F, I,
|
|
44472
|
+
var F, I, R, T, D, O, j, N, B, w, M;
|
|
44467
44473
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: i } = useFormBlockContext(), a = useField(), l = useFieldSchema(), { t: c } = useTranslation(), { dn: u, refresh: d } = useDesignable(), p = useCompile(), m = r(l.name) || o(l["x-collection-field"]), h = n(m == null ? void 0 : m.interface), g = (F = h == null ? void 0 : h.validateSchema) == null ? void 0 : F.call(h, l), f = (I = m == null ? void 0 : m.uiSchema) == null ? void 0 : I.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
|
|
44468
44474
|
a.title === f || a.title;
|
|
44469
|
-
const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (
|
|
44475
|
+
const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (R = a.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map(($) => $.startsWith("-") ? {
|
|
44470
44476
|
field: $.substring(1),
|
|
44471
44477
|
direction: "desc"
|
|
44472
44478
|
} : {
|
|
@@ -44720,7 +44726,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44720
44726
|
{
|
|
44721
44727
|
title: c("Title field"),
|
|
44722
44728
|
options: v,
|
|
44723
|
-
value: (M = (
|
|
44729
|
+
value: (M = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : M.label,
|
|
44724
44730
|
onChange: ($) => {
|
|
44725
44731
|
var E, q;
|
|
44726
44732
|
const k = {
|
|
@@ -44843,11 +44849,11 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
44843
44849
|
}
|
|
44844
44850
|
},
|
|
44845
44851
|
e
|
|
44846
|
-
) : {}, C = () => toArr$3(n).map((v) => typeof v == "object" ? v[m.value] : v), b = (v, F) => /* @__PURE__ */ jsx(Space$1, { split: "/", children: v.map((I,
|
|
44847
|
-
if (F[
|
|
44848
|
-
return /* @__PURE__ */ jsx("span", { children: I },
|
|
44852
|
+
) : {}, C = () => toArr$3(n).map((v) => typeof v == "object" ? v[m.value] : v), b = (v, F) => /* @__PURE__ */ jsx(Space$1, { split: "/", children: v.map((I, R) => {
|
|
44853
|
+
if (F[R])
|
|
44854
|
+
return /* @__PURE__ */ jsx("span", { children: I }, R);
|
|
44849
44855
|
const T = toArr$3(n).filter(Boolean).find((D) => D[m.value] === I);
|
|
44850
|
-
return /* @__PURE__ */ jsx("span", { children: (T == null ? void 0 : T[m.label]) || I },
|
|
44856
|
+
return /* @__PURE__ */ jsx("span", { children: (T == null ? void 0 : T[m.label]) || I }, R);
|
|
44851
44857
|
}) }), S = (v) => {
|
|
44852
44858
|
var F;
|
|
44853
44859
|
v && !((F = t.dataSource) != null && F.length) && (f == null || f());
|
|
@@ -45728,17 +45734,17 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
45728
45734
|
(e) => {
|
|
45729
45735
|
var I;
|
|
45730
45736
|
const { columnCount: t, pagination: n } = useProps(e), { service: o, columnCount: r = defaultColumnCount } = useGridCardBlockContext(), i = t || r, { run: a, params: l } = o, c = (I = o == null ? void 0 : o.data) == null ? void 0 : I.meta, u = useFieldSchema(), d = useField(), p = useDesigner(), m = useGridCardBodyHeight(), h = useCallback(
|
|
45731
|
-
(
|
|
45737
|
+
(R) => new Schema({
|
|
45732
45738
|
type: "object",
|
|
45733
45739
|
properties: {
|
|
45734
|
-
[
|
|
45740
|
+
[R]: x({}, u.properties.item)
|
|
45735
45741
|
}
|
|
45736
45742
|
}),
|
|
45737
45743
|
[u.properties]
|
|
45738
45744
|
), { token: g } = useToken(), f = useCallback(
|
|
45739
|
-
(
|
|
45745
|
+
(R, T) => {
|
|
45740
45746
|
a(P(x({}, l == null ? void 0 : l[0]), {
|
|
45741
|
-
page:
|
|
45747
|
+
page: R,
|
|
45742
45748
|
pageSize: T
|
|
45743
45749
|
}));
|
|
45744
45750
|
},
|
|
@@ -45793,7 +45799,7 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
45793
45799
|
xl: i.lg,
|
|
45794
45800
|
gutter: [g.marginBlock / 2, g.marginBlock / 2]
|
|
45795
45801
|
}),
|
|
45796
|
-
renderItem: (
|
|
45802
|
+
renderItem: (R, T) => /* @__PURE__ */ jsx(Col, { style: { height: "100%" }, className: "nb-card-item-warper", children: /* @__PURE__ */ jsx(
|
|
45797
45803
|
NocoBaseRecursionField,
|
|
45798
45804
|
{
|
|
45799
45805
|
basePath: d.address,
|
|
@@ -45839,7 +45845,7 @@ function IconField(e) {
|
|
|
45839
45845
|
var I;
|
|
45840
45846
|
const F = (I = v == null ? void 0 : v.trim()) != null ? I : "";
|
|
45841
45847
|
m(
|
|
45842
|
-
F.length ? n.filter((
|
|
45848
|
+
F.length ? n.filter((R) => R.split(" ").some((T) => T.includes(F))) : n
|
|
45843
45849
|
);
|
|
45844
45850
|
}, 250), y = () => /* @__PURE__ */ jsxs(Flex, { vertical: !0, gap: "middle", children: [
|
|
45845
45851
|
/* @__PURE__ */ jsx(
|
|
@@ -46160,7 +46166,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
46160
46166
|
}
|
|
46161
46167
|
},
|
|
46162
46168
|
onSubmit: ({ sort: F }) => {
|
|
46163
|
-
const I = F.map((
|
|
46169
|
+
const I = F.map((R) => R.direction === "desc" ? `-${R.field}` : R.field);
|
|
46164
46170
|
_.set(r, "x-decorator-props.params.sort", I), a.decoratorProps.params = P(x({}, r["x-decorator-props"].params), { page: 1 }), l.emit("patch", {
|
|
46165
46171
|
schema: {
|
|
46166
46172
|
"x-uid": r["x-uid"],
|
|
@@ -46292,7 +46298,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
46292
46298
|
return e - u - n.paddingLG - l;
|
|
46293
46299
|
}, InternalList = withSkeletonComponent(
|
|
46294
46300
|
(e) => {
|
|
46295
|
-
var N, B,
|
|
46301
|
+
var N, B, w;
|
|
46296
46302
|
const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (N = t == null ? void 0 : t.data) == null ? void 0 : N.meta, { pageSize: l, count: c, hasNext: u, page: d } = a || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$3(), C = useListBlockHeight(), { token: b } = theme.useToken(), S = useCallback(
|
|
46297
46303
|
(M) => (m.has(M) || m.set(
|
|
46298
46304
|
M,
|
|
@@ -46314,7 +46320,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
46314
46320
|
[n, o]
|
|
46315
46321
|
), F = getCardItemSchema == null ? void 0 : getCardItemSchema(r), {
|
|
46316
46322
|
layout: I = "vertical",
|
|
46317
|
-
labelAlign:
|
|
46323
|
+
labelAlign: R = "left",
|
|
46318
46324
|
labelWidth: T = 120,
|
|
46319
46325
|
labelWrap: D = !0
|
|
46320
46326
|
} = (F == null ? void 0 : F["x-component-props"]) || {}, j = (() => {
|
|
@@ -46388,7 +46394,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
46388
46394
|
FormLayout,
|
|
46389
46395
|
{
|
|
46390
46396
|
layout: I,
|
|
46391
|
-
labelAlign:
|
|
46397
|
+
labelAlign: R,
|
|
46392
46398
|
labelWidth: I === "horizontal" ? T : null,
|
|
46393
46399
|
labelWrap: D,
|
|
46394
46400
|
children: /* @__PURE__ */ jsx(
|
|
@@ -46396,7 +46402,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
46396
46402
|
P(x({}, e), {
|
|
46397
46403
|
pagination: !a || !((B = p.value) != null && B.length) ? !1 : j,
|
|
46398
46404
|
loading: t == null ? void 0 : t.loading,
|
|
46399
|
-
children: (
|
|
46405
|
+
children: (w = p.value) != null && w.length ? p.value.map((M, $) => /* @__PURE__ */ jsx(
|
|
46400
46406
|
NocoBaseRecursionField,
|
|
46401
46407
|
{
|
|
46402
46408
|
basePath: p.address,
|
|
@@ -46722,9 +46728,9 @@ const useTableSelectorProps$1 = () => {
|
|
|
46722
46728
|
useEffect(() => {
|
|
46723
46729
|
if (t) {
|
|
46724
46730
|
const F = (Array.isArray(t) ? t : t ? [t] : []).map((I) => {
|
|
46725
|
-
const
|
|
46731
|
+
const R = I[l.label];
|
|
46726
46732
|
return P(x({}, I), {
|
|
46727
|
-
[l.label]: getLabelFormatValue(h, m(
|
|
46733
|
+
[l.label]: getLabelFormatValue(h, m(R))
|
|
46728
46734
|
});
|
|
46729
46735
|
});
|
|
46730
46736
|
S(F);
|
|
@@ -46740,7 +46746,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
46740
46746
|
action: `${p == null ? void 0 : p.target}:create`,
|
|
46741
46747
|
onChange: (F) => {
|
|
46742
46748
|
let I = toArr$3(F);
|
|
46743
|
-
I.every((
|
|
46749
|
+
I.every((R) => R.status !== "uploading") && (I = I.filter((R) => R.status === "done").map((R) => R.response.data), o(n ? [...b, ...I] : I[0]));
|
|
46744
46750
|
}
|
|
46745
46751
|
}
|
|
46746
46752
|
) : /* @__PURE__ */ jsx(
|
|
@@ -46760,7 +46766,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
46760
46766
|
o([]), C([]);
|
|
46761
46767
|
return;
|
|
46762
46768
|
}
|
|
46763
|
-
const I = b == null ? void 0 : b.filter((
|
|
46769
|
+
const I = b == null ? void 0 : b.filter((R) => F.includes(R[l.value]));
|
|
46764
46770
|
o(I), C(I);
|
|
46765
46771
|
}
|
|
46766
46772
|
} else {
|
|
@@ -46834,7 +46840,7 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
46834
46840
|
const { ellipsis: t } = e, n = useFieldSchema(), o = useRecord(), r = useCollectionManager(), i = useFieldNames(e), [a, l] = useState(!1), c = useCollection(), u = (c == null ? void 0 : c.getField(n.name)) || (r == null ? void 0 : r.getCollectionField(n == null ? void 0 : n["x-collection-field"])), [d, p] = useState({}), m = useCompile(), h = useLabelUiSchema(u, (i == null ? void 0 : i.label) || "label"), { snapshot: g } = useActionContext(), f = ((v = n["x-component-props"]) == null ? void 0 : v.mode) === "tags", C = useRef();
|
|
46835
46841
|
if (isShowFilePicker(h))
|
|
46836
46842
|
return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
|
|
46837
|
-
const b = () => toArr$3(e.value).map((I,
|
|
46843
|
+
const b = () => toArr$3(e.value).map((I, R, T) => {
|
|
46838
46844
|
const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"), O = getLabelFormatValue(h, D, !0);
|
|
46839
46845
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46840
46846
|
/* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? O : /* @__PURE__ */ jsx(
|
|
@@ -46847,8 +46853,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
46847
46853
|
children: O
|
|
46848
46854
|
}
|
|
46849
46855
|
) }),
|
|
46850
|
-
|
|
46851
|
-
] }, `${I[i.value]}_${
|
|
46856
|
+
R < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
|
|
46857
|
+
] }, `${I[i.value]}_${R}`);
|
|
46852
46858
|
}), S = () => /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(
|
|
46853
46859
|
NocoBaseRecursionField,
|
|
46854
46860
|
{
|
|
@@ -46857,8 +46863,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
46857
46863
|
filterProperties: (I) => I["x-component"] === "RecordPicker.Viewer"
|
|
46858
46864
|
}
|
|
46859
46865
|
) }) }), y = () => {
|
|
46860
|
-
var
|
|
46861
|
-
const I = (
|
|
46866
|
+
var R;
|
|
46867
|
+
const I = (R = n == null ? void 0 : n["x-collection-field"]) == null ? void 0 : R.split(".");
|
|
46862
46868
|
return I && I.length > 2 ? /* @__PURE__ */ jsx(RecordProvider, { record: d, parent: o[I[1]], children: S() }) : /* @__PURE__ */ jsx(RecordProvider, { record: d, parent: o, children: S() });
|
|
46863
46869
|
};
|
|
46864
46870
|
return u ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(BlockAssociationContext.Provider, { value: `${u.collectionName}.${u.name}`, children: /* @__PURE__ */ jsxs(CollectionProvider_deprecated, { name: (F = u.target) != null ? F : u.targetCollection, children: [
|
|
@@ -47675,8 +47681,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
47675
47681
|
}),
|
|
47676
47682
|
renderCell: (y, v, F, I) => {
|
|
47677
47683
|
var D, O;
|
|
47678
|
-
const
|
|
47679
|
-
return
|
|
47684
|
+
const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = ((O = e == null ? void 0 : e.pagination) == null ? void 0 : O.pageSize) || 20;
|
|
47685
|
+
return R && (F = F + (R - 1) * T), /* @__PURE__ */ jsxs(
|
|
47680
47686
|
"div",
|
|
47681
47687
|
{
|
|
47682
47688
|
className: cls(
|
|
@@ -48069,9 +48075,9 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
48069
48075
|
}
|
|
48070
48076
|
},
|
|
48071
48077
|
onSubmit: ({ filter: F }) => {
|
|
48072
|
-
var
|
|
48078
|
+
var R;
|
|
48073
48079
|
const I = n.decoratorProps.request.params || {};
|
|
48074
|
-
I.filter = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (
|
|
48080
|
+
I.filter = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (R = a.params) == null ? void 0 : R[0]), { filter: F })), c.emit("patch", {
|
|
48075
48081
|
schema: {
|
|
48076
48082
|
"x-uid": o["x-uid"],
|
|
48077
48083
|
"x-decorator-props": o["x-decorator-props"]
|
|
@@ -48157,8 +48163,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
48157
48163
|
},
|
|
48158
48164
|
onSubmit: ({ sort: F }) => {
|
|
48159
48165
|
var T;
|
|
48160
|
-
const I = F.map((D) => D.direction === "desc" ? `-${D.field}` : D.field),
|
|
48161
|
-
|
|
48166
|
+
const I = F.map((D) => D.direction === "desc" ? `-${D.field}` : D.field), R = n.decoratorProps.request.params || {};
|
|
48167
|
+
R.sort = I, n.decoratorProps.request.params = R, o["x-decorator-props"].request.params = R, c.emit("patch", {
|
|
48162
48168
|
schema: {
|
|
48163
48169
|
"x-uid": o["x-uid"],
|
|
48164
48170
|
"x-decorator-props": o["x-decorator-props"]
|
|
@@ -48181,9 +48187,9 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
48181
48187
|
{ label: "200", value: 200 }
|
|
48182
48188
|
],
|
|
48183
48189
|
onChange: (F) => {
|
|
48184
|
-
var
|
|
48190
|
+
var R;
|
|
48185
48191
|
const I = n.decoratorProps.request.params || {};
|
|
48186
|
-
I.pageSize = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (
|
|
48192
|
+
I.pageSize = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (R = a.params) == null ? void 0 : R[0]), { pageSize: F })), c.emit("patch", {
|
|
48187
48193
|
schema: {
|
|
48188
48194
|
"x-uid": o["x-uid"],
|
|
48189
48195
|
"x-decorator-props": o["x-decorator-props"]
|
|
@@ -48260,7 +48266,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48260
48266
|
"sort-field"
|
|
48261
48267
|
);
|
|
48262
48268
|
}, TableBlockDesigner = () => {
|
|
48263
|
-
var T, D, O, j, N, B,
|
|
48269
|
+
var T, D, O, j, N, B, w, M, $, k, z;
|
|
48264
48270
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (T = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], h = ((O = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : O.resource) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((N = i == null ? void 0 : i["x-decorator-props"]) != null && N.disableTemplate), f = m == null ? void 0 : m.map((E) => E != null && E.startsWith("-") ? {
|
|
48265
48271
|
field: E.substring(1),
|
|
48266
48272
|
direction: "desc"
|
|
@@ -48279,7 +48285,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48279
48285
|
}), c.params[0].page = 1;
|
|
48280
48286
|
},
|
|
48281
48287
|
[d, r.decoratorProps, i, c]
|
|
48282
|
-
),
|
|
48288
|
+
), R = useAPIClient();
|
|
48283
48289
|
return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { template: C, title: t || e, children: [
|
|
48284
48290
|
/* @__PURE__ */ jsx(SchemaSettingsBlockTitleItem, {}),
|
|
48285
48291
|
/* @__PURE__ */ jsx(SchemaSettingsBlockHeightItem, {}),
|
|
@@ -48307,7 +48313,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48307
48313
|
title: u("Enable drag and drop sorting"),
|
|
48308
48314
|
checked: r.decoratorProps.dragSort,
|
|
48309
48315
|
onChange: (E) => V(void 0, null, function* () {
|
|
48310
|
-
E && v && (yield
|
|
48316
|
+
E && v && (yield R.resource("collections.fields", v.collectionName).update({
|
|
48311
48317
|
filterByTk: v.name,
|
|
48312
48318
|
values: {
|
|
48313
48319
|
sortable: !0
|
|
@@ -48326,7 +48332,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48326
48332
|
SchemaSettingsDataScope,
|
|
48327
48333
|
{
|
|
48328
48334
|
collectionName: e,
|
|
48329
|
-
defaultFilter: ((M = (
|
|
48335
|
+
defaultFilter: ((M = (w = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.filter) || {},
|
|
48330
48336
|
form: a,
|
|
48331
48337
|
onSubmit: I
|
|
48332
48338
|
}
|
|
@@ -48506,8 +48512,8 @@ TableField.ActionBar = observer$1(
|
|
|
48506
48512
|
{ displayName: "TableField.ActionBar" }
|
|
48507
48513
|
);
|
|
48508
48514
|
const TableSelectorDesigner = () => {
|
|
48509
|
-
var
|
|
48510
|
-
const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: n, getAllCollectionsInheritChain: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((T = (
|
|
48515
|
+
var R, T, D, O, j, N;
|
|
48516
|
+
const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: n, getAllCollectionsInheritChain: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((T = (R = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : T.sort) || [], h = recursiveParent$1(i, "CollectionField"), g = n(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((B) => B.startsWith("-") ? {
|
|
48511
48517
|
field: B.substring(1),
|
|
48512
48518
|
direction: "desc"
|
|
48513
48519
|
} : {
|
|
@@ -48523,8 +48529,8 @@ const TableSelectorDesigner = () => {
|
|
|
48523
48529
|
onSubmit: ({ filter: B }) => {
|
|
48524
48530
|
var $;
|
|
48525
48531
|
B = removeNullCondition(B);
|
|
48526
|
-
const
|
|
48527
|
-
|
|
48532
|
+
const w = r.decoratorProps.params || {};
|
|
48533
|
+
w.filter = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w;
|
|
48528
48534
|
let M = _.cloneDeep(B);
|
|
48529
48535
|
u && (M ? M = {
|
|
48530
48536
|
$and: [u, M]
|
|
@@ -48563,12 +48569,12 @@ const TableSelectorDesigner = () => {
|
|
|
48563
48569
|
onChange: (B) => {
|
|
48564
48570
|
var M;
|
|
48565
48571
|
r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = B, i["x-decorator-props"].treeTable = B;
|
|
48566
|
-
const
|
|
48572
|
+
const w = P(x({}, (M = c.params) == null ? void 0 : M[0]), {
|
|
48567
48573
|
tree: B ? !0 : null
|
|
48568
48574
|
});
|
|
48569
48575
|
p.emit("patch", {
|
|
48570
48576
|
schema: i
|
|
48571
|
-
}), p.refresh(), c.run(
|
|
48577
|
+
}), p.refresh(), c.run(w);
|
|
48572
48578
|
}
|
|
48573
48579
|
}
|
|
48574
48580
|
),
|
|
@@ -48650,13 +48656,13 @@ const TableSelectorDesigner = () => {
|
|
|
48650
48656
|
},
|
|
48651
48657
|
onSubmit: ({ sort: B }) => {
|
|
48652
48658
|
var $;
|
|
48653
|
-
const
|
|
48654
|
-
M.sort =
|
|
48659
|
+
const w = B.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), M = r.decoratorProps.params || {};
|
|
48660
|
+
M.sort = w, r.decoratorProps.params = M, i["x-decorator-props"].params = M, p.emit("patch", {
|
|
48655
48661
|
schema: {
|
|
48656
48662
|
"x-uid": i["x-uid"],
|
|
48657
48663
|
"x-decorator-props": i["x-decorator-props"]
|
|
48658
48664
|
}
|
|
48659
|
-
}), c.run(P(x({}, ($ = c.params) == null ? void 0 : $[0]), { sort:
|
|
48665
|
+
}), c.run(P(x({}, ($ = c.params) == null ? void 0 : $[0]), { sort: w }));
|
|
48660
48666
|
}
|
|
48661
48667
|
}
|
|
48662
48668
|
),
|
|
@@ -48675,8 +48681,8 @@ const TableSelectorDesigner = () => {
|
|
|
48675
48681
|
],
|
|
48676
48682
|
onChange: (B) => {
|
|
48677
48683
|
var M;
|
|
48678
|
-
const
|
|
48679
|
-
|
|
48684
|
+
const w = r.decoratorProps.params || {};
|
|
48685
|
+
w.pageSize = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w, c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { pageSize: B, page: 1 })), p.emit("patch", {
|
|
48680
48686
|
schema: {
|
|
48681
48687
|
"x-uid": i["x-uid"],
|
|
48682
48688
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -50124,8 +50130,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50124
50130
|
(e) => {
|
|
50125
50131
|
const { disabled: t } = e, [n, o] = useState([]), { getCollection: r } = useCollectionManager_deprecated(), i = useRecord(), a = useField(), { collectionName: l, target: c, type: u, through: d, name: p, template: m } = i, h = i[a.props.name], g = useCompile(), f = useForm(), [C, b] = useState(h || (m === "view" ? null : a.initialValue)), [S, y] = useState([]);
|
|
50126
50132
|
return useEffect(() => {
|
|
50127
|
-
var
|
|
50128
|
-
const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (
|
|
50133
|
+
var R;
|
|
50134
|
+
const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (R = r(F)) == null ? void 0 : R.fields;
|
|
50129
50135
|
if (I) {
|
|
50130
50136
|
const T = I == null ? void 0 : I.filter((D) => supportTypes.includes(D.type)).map((D) => {
|
|
50131
50137
|
var O;
|
|
@@ -50148,7 +50154,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50148
50154
|
showSearch: !0,
|
|
50149
50155
|
onDropdownVisibleChange: (F) => V(void 0, null, function* () {
|
|
50150
50156
|
var O;
|
|
50151
|
-
const { target: I, type:
|
|
50157
|
+
const { target: I, type: R, through: T } = f.values, D = ["belongsTo"].includes(R) ? l || p : ["belongsToMany"].includes(R) ? T : I;
|
|
50152
50158
|
if (D && F) {
|
|
50153
50159
|
const j = ((O = r(D)) == null ? void 0 : O.fields) || [];
|
|
50154
50160
|
o(
|
|
@@ -50163,13 +50169,13 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50163
50169
|
}
|
|
50164
50170
|
}),
|
|
50165
50171
|
onChange: (F, I) => {
|
|
50166
|
-
var
|
|
50167
|
-
(
|
|
50172
|
+
var R;
|
|
50173
|
+
(R = e == null ? void 0 : e.onChange) == null || R.call(e, F), b(I.label || F);
|
|
50168
50174
|
},
|
|
50169
50175
|
onSearch: (F) => {
|
|
50170
50176
|
if (F) {
|
|
50171
|
-
const I = F.toLocaleLowerCase(),
|
|
50172
|
-
o(
|
|
50177
|
+
const I = F.toLocaleLowerCase(), R = n.filter((T) => T.label.toLocaleLowerCase().includes(I));
|
|
50178
|
+
o(R);
|
|
50173
50179
|
} else
|
|
50174
50180
|
o(S);
|
|
50175
50181
|
}
|
|
@@ -50346,11 +50352,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50346
50352
|
return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
|
|
50347
50353
|
}, AddFieldAction = (e) => {
|
|
50348
50354
|
var N, B;
|
|
50349
|
-
const { scope: t, getContainer: n, item: o, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((B = (N = p(o.name)) == null ? void 0 : N.options) == null ? void 0 : B.fields) || o.fields || [],
|
|
50350
|
-
label: S(
|
|
50351
|
-
value:
|
|
50355
|
+
const { scope: t, getContainer: n, item: o, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((B = (N = p(o.name)) == null ? void 0 : N.options) == null ? void 0 : B.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
|
|
50356
|
+
label: S(w.title),
|
|
50357
|
+
value: w.name
|
|
50352
50358
|
})), []), T = useCallback(() => {
|
|
50353
|
-
const { availableFieldInterfaces:
|
|
50359
|
+
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: $ } = w || {}, k = [];
|
|
50354
50360
|
return F.forEach((z) => {
|
|
50355
50361
|
var E;
|
|
50356
50362
|
if (z.key === "systemInfo")
|
|
@@ -50370,14 +50376,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50370
50376
|
}));
|
|
50371
50377
|
}
|
|
50372
50378
|
}), k;
|
|
50373
|
-
}, [u, o]), D = useMemo(() => T().map((
|
|
50379
|
+
}, [u, o]), D = useMemo(() => T().map((w) => {
|
|
50374
50380
|
var M;
|
|
50375
|
-
return ((M =
|
|
50381
|
+
return ((M = w == null ? void 0 : w.children) == null ? void 0 : M.length) === 0 ? null : o.template === "view" ? {
|
|
50376
50382
|
type: "group",
|
|
50377
|
-
label: S(
|
|
50378
|
-
title: S(
|
|
50379
|
-
key:
|
|
50380
|
-
children:
|
|
50383
|
+
label: S(w.label),
|
|
50384
|
+
title: S(w.label),
|
|
50385
|
+
key: w.label,
|
|
50386
|
+
children: w.children.filter(($) => ["m2o"].includes($.name)).map(($) => ({
|
|
50381
50387
|
label: S($.title),
|
|
50382
50388
|
title: S($.title),
|
|
50383
50389
|
key: $.name,
|
|
@@ -50385,36 +50391,36 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50385
50391
|
}))
|
|
50386
50392
|
} : {
|
|
50387
50393
|
type: "group",
|
|
50388
|
-
label: S(
|
|
50389
|
-
title: S(
|
|
50390
|
-
key:
|
|
50391
|
-
children:
|
|
50394
|
+
label: S(w.label),
|
|
50395
|
+
title: S(w.label),
|
|
50396
|
+
key: w.label,
|
|
50397
|
+
children: w == null ? void 0 : w.children.filter(($) => !["o2o", "subTable", "linkTo"].includes($.name)).map(($) => ({
|
|
50392
50398
|
label: S($.title),
|
|
50393
50399
|
title: S($.title),
|
|
50394
50400
|
key: $.name,
|
|
50395
50401
|
dataTargetScope: $.targetScope
|
|
50396
50402
|
}))
|
|
50397
50403
|
};
|
|
50398
|
-
}).filter((
|
|
50404
|
+
}).filter((w) => {
|
|
50399
50405
|
var M;
|
|
50400
|
-
return (M =
|
|
50406
|
+
return (M = w == null ? void 0 : w.children) == null ? void 0 : M.length;
|
|
50401
50407
|
}), [T]), O = useMemo(() => ({
|
|
50402
50408
|
style: {
|
|
50403
50409
|
maxHeight: "60vh",
|
|
50404
50410
|
overflow: "auto"
|
|
50405
50411
|
},
|
|
50406
|
-
onClick: (
|
|
50407
|
-
const M =
|
|
50412
|
+
onClick: (w) => {
|
|
50413
|
+
const M = w.item.props["data-targetScope"];
|
|
50408
50414
|
M && f(M);
|
|
50409
|
-
const $ = getSchema$8(c(
|
|
50415
|
+
const $ = getSchema$8(c(w.key), o, S);
|
|
50410
50416
|
$ && (b($), h(!0));
|
|
50411
50417
|
},
|
|
50412
50418
|
items: D
|
|
50413
|
-
}), [c, D, o]), j = useMemo(() => I.filter((
|
|
50419
|
+
}), [c, D, o]), j = useMemo(() => I.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
50414
50420
|
var M;
|
|
50415
50421
|
return {
|
|
50416
|
-
value:
|
|
50417
|
-
label: S((M =
|
|
50422
|
+
value: w.name,
|
|
50423
|
+
label: S((M = w.uiSchema) == null ? void 0 : M.title)
|
|
50418
50424
|
};
|
|
50419
50425
|
}), [I == null ? void 0 : I.length]);
|
|
50420
50426
|
return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
|
|
@@ -50435,7 +50441,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50435
50441
|
record: o,
|
|
50436
50442
|
showReverseFieldConfig: !0,
|
|
50437
50443
|
targetScope: g,
|
|
50438
|
-
collections:
|
|
50444
|
+
collections: R,
|
|
50439
50445
|
isDialect: v,
|
|
50440
50446
|
disabledJSONB: !1,
|
|
50441
50447
|
scopeKeyOptions: j,
|
|
@@ -50527,17 +50533,17 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50527
50533
|
return /* @__PURE__ */ jsx(EditFieldAction, x({ item: t, parentItem: n }, e));
|
|
50528
50534
|
}, EditFieldAction = (e) => {
|
|
50529
50535
|
const I = e, { scope: t, getContainer: n, item: o, parentItem: r, children: i } = I, a = Y(I, ["scope", "getContainer", "item", "parentItem", "children"]), { getInterface: l, collections: c, getCollection: u } = useCollectionManager_deprecated(), [d, p] = useState(!1), [m, h] = useState({}), g = useAPIClient(), { t: f } = useTranslation(), C = useCompile(), [b, S] = useState({}), { isDialect: y } = useDialect(), v = useMemo(() => {
|
|
50530
|
-
var
|
|
50531
|
-
return (o == null ? void 0 : o.fields) || ((
|
|
50536
|
+
var R;
|
|
50537
|
+
return (o == null ? void 0 : o.fields) || ((R = u(o.collectionName)) == null ? void 0 : R.options.fields.filter((T) => ["string", "bigInt", "integer"].includes(T.type)).map((T) => {
|
|
50532
50538
|
var D;
|
|
50533
50539
|
return {
|
|
50534
50540
|
value: T.name,
|
|
50535
50541
|
label: C((D = T.uiSchema) == null ? void 0 : D.title)
|
|
50536
50542
|
};
|
|
50537
50543
|
}));
|
|
50538
|
-
}, [o.name]), F = useMemo(() => c.map((
|
|
50539
|
-
label: C(
|
|
50540
|
-
value:
|
|
50544
|
+
}, [o.name]), F = useMemo(() => c.map((R) => ({
|
|
50545
|
+
label: C(R.title),
|
|
50546
|
+
value: R.name
|
|
50541
50547
|
})), []);
|
|
50542
50548
|
return /* @__PURE__ */ jsx(RecordProvider, { record: o, parent: r, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: d, setVisible: p }, children: [
|
|
50543
50549
|
/* @__PURE__ */ jsx(
|
|
@@ -50545,12 +50551,12 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50545
50551
|
P(x({}, a), {
|
|
50546
50552
|
onClick: () => V(void 0, null, function* () {
|
|
50547
50553
|
var j, N;
|
|
50548
|
-
const { data:
|
|
50554
|
+
const { data: R } = yield g.resource("collections.fields", o.collectionName).get({
|
|
50549
50555
|
filterByTk: o.name,
|
|
50550
50556
|
appends: ["reverseField"]
|
|
50551
50557
|
});
|
|
50552
|
-
S(
|
|
50553
|
-
const T = l(o.interface), D = cloneDeep(
|
|
50558
|
+
S(R == null ? void 0 : R.data);
|
|
50559
|
+
const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
|
|
50554
50560
|
D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (j = T == null ? void 0 : T.default) == null ? void 0 : j.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (N = o.__parent) == null ? void 0 : N.title));
|
|
50555
50561
|
const O = getSchema$7(T, D, o, C);
|
|
50556
50562
|
h(O), p(!0);
|
|
@@ -50648,11 +50654,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50648
50654
|
const { scope: t, getContainer: n, item: o, parentItem: r, children: i, currentCollection: a } = e, { target: l, through: c } = o, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), S = useAPIClient(), { t: y } = useTranslation(), v = useCompile(), F = (B) => {
|
|
50649
50655
|
var M;
|
|
50650
50656
|
return B && ((M = m(B)) == null ? void 0 : M.map(($) => $.name).concat([B]));
|
|
50651
|
-
}, [I,
|
|
50657
|
+
}, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), O = useMemo(() => h.map((B) => ({
|
|
50652
50658
|
label: v(B.title),
|
|
50653
50659
|
value: B.name
|
|
50654
50660
|
})), []), j = () => {
|
|
50655
|
-
const B = useForm(), { refresh:
|
|
50661
|
+
const B = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), $ = useActionContext(), { resource: k } = useResourceContext();
|
|
50656
50662
|
return {
|
|
50657
50663
|
run() {
|
|
50658
50664
|
return V(this, null, function* () {
|
|
@@ -50671,17 +50677,17 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50671
50677
|
]);
|
|
50672
50678
|
yield k.create({
|
|
50673
50679
|
values: q
|
|
50674
|
-
}), yield B.reset(), yield M(), yield
|
|
50680
|
+
}), yield B.reset(), yield M(), yield w(), $.setVisible(!1);
|
|
50675
50681
|
});
|
|
50676
50682
|
}
|
|
50677
50683
|
};
|
|
50678
50684
|
}, N = useMemo(() => {
|
|
50679
50685
|
var B;
|
|
50680
|
-
return (o == null ? void 0 : o.fields) || ((B = d(o.collectionName)) == null ? void 0 : B.options.fields.filter((
|
|
50686
|
+
return (o == null ? void 0 : o.fields) || ((B = d(o.collectionName)) == null ? void 0 : B.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
50681
50687
|
var M;
|
|
50682
50688
|
return {
|
|
50683
|
-
value:
|
|
50684
|
-
label: v((M =
|
|
50689
|
+
value: w.name,
|
|
50690
|
+
label: v((M = w.uiSchema) == null ? void 0 : M.title)
|
|
50685
50691
|
};
|
|
50686
50692
|
}));
|
|
50687
50693
|
}, [o.name]);
|
|
@@ -50693,12 +50699,12 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50693
50699
|
onClick: () => V(void 0, null, function* () {
|
|
50694
50700
|
var B;
|
|
50695
50701
|
if (!D) {
|
|
50696
|
-
const { data:
|
|
50702
|
+
const { data: w } = yield S.resource("collections.fields", o.collectionName).get({
|
|
50697
50703
|
filterByTk: o.name,
|
|
50698
50704
|
appends: ["reverseField"]
|
|
50699
50705
|
});
|
|
50700
|
-
w
|
|
50701
|
-
const M = u(o.interface), $ = cloneDeep(
|
|
50706
|
+
R(w == null ? void 0 : w.data);
|
|
50707
|
+
const M = u(o.interface), $ = cloneDeep(w == null ? void 0 : w.data) || {};
|
|
50702
50708
|
$ != null && $.reverseField || ($.autoCreateReverseField = !1, $.reverseField = (B = M.default) == null ? void 0 : B.reverseField, set($.reverseField, "name", `f_${uid()}`), set($.reverseField, "uiSchema.title", o.__parent.title));
|
|
50703
50709
|
const k = getSchema$6(
|
|
50704
50710
|
P(x({}, M), {
|
|
@@ -51160,12 +51166,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51160
51166
|
});
|
|
51161
51167
|
}), n.filter((o) => o.children.length > 0);
|
|
51162
51168
|
}, PreviewCom = (e) => {
|
|
51163
|
-
const { databaseView: t, viewName: n, sources: o, schema: r } = e, { data: i } = useContext(ResourceActionContext), a = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(o), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections:
|
|
51169
|
+
const { databaseView: t, viewName: n, sources: o, schema: r } = e, { data: i } = useContext(ResourceActionContext), a = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(o), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: R, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), j = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
|
|
51164
51170
|
useEffect(() => {
|
|
51165
|
-
const
|
|
51171
|
+
const w = [];
|
|
51166
51172
|
g.forEach((M) => {
|
|
51167
51173
|
var q;
|
|
51168
|
-
const $ = v(M), z =
|
|
51174
|
+
const $ = v(M), z = R(M).map((L) => {
|
|
51169
51175
|
const G = T(L, M);
|
|
51170
51176
|
return {
|
|
51171
51177
|
type: "group",
|
|
@@ -51183,18 +51189,18 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51183
51189
|
var G;
|
|
51184
51190
|
return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
|
|
51185
51191
|
}).concat(z);
|
|
51186
|
-
|
|
51192
|
+
w.push({
|
|
51187
51193
|
value: M,
|
|
51188
51194
|
label: l($.title || $.name),
|
|
51189
51195
|
children: E
|
|
51190
51196
|
});
|
|
51191
|
-
}), h(
|
|
51197
|
+
}), h(w);
|
|
51192
51198
|
}, [g, t]), useEffect(() => {
|
|
51193
|
-
t && (u(!0), a.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data:
|
|
51199
|
+
t && (u(!0), a.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data: w }) => {
|
|
51194
51200
|
var M, $;
|
|
51195
|
-
if (
|
|
51201
|
+
if (w) {
|
|
51196
51202
|
u(!1), p([]);
|
|
51197
|
-
const k = ($ = Object.values((M =
|
|
51203
|
+
const k = ($ = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
|
|
51198
51204
|
var E, q;
|
|
51199
51205
|
if (z.source) {
|
|
51200
51206
|
const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
@@ -51210,13 +51216,13 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51210
51216
|
});
|
|
51211
51217
|
S.value = k, setTimeout(() => {
|
|
51212
51218
|
var z, E, q;
|
|
51213
|
-
p(k), y.setValuesIn("sources", (z =
|
|
51219
|
+
p(k), y.setValuesIn("sources", (z = w.data) == null ? void 0 : z.sources), f((E = w.data) == null ? void 0 : E.sources), b((q = w == null ? void 0 : w.data) == null ? void 0 : q.unsupportedFields);
|
|
51214
51220
|
});
|
|
51215
51221
|
}
|
|
51216
51222
|
}).catch);
|
|
51217
51223
|
}, [t]);
|
|
51218
|
-
const N = (
|
|
51219
|
-
d.splice(M, 1,
|
|
51224
|
+
const N = (w, M) => {
|
|
51225
|
+
d.splice(M, 1, w), p(d), S.value = d.map(($) => {
|
|
51220
51226
|
var z, E, q;
|
|
51221
51227
|
const k = typeof $.source == "string" ? $.source : (q = (E = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : E.call(z, Boolean)) == null ? void 0 : q.join(".");
|
|
51222
51228
|
return P(x({}, $), {
|
|
@@ -51235,10 +51241,10 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51235
51241
|
dataIndex: "source",
|
|
51236
51242
|
key: "source",
|
|
51237
51243
|
width: 200,
|
|
51238
|
-
render: (
|
|
51244
|
+
render: (w, M, $) => /* @__PURE__ */ jsx(
|
|
51239
51245
|
Cascader$1,
|
|
51240
51246
|
{
|
|
51241
|
-
defaultValue: typeof
|
|
51247
|
+
defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
|
|
51242
51248
|
allowClear: !0,
|
|
51243
51249
|
style: { width: "100%" },
|
|
51244
51250
|
options: D(m),
|
|
@@ -51256,12 +51262,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51256
51262
|
dataIndex: "type",
|
|
51257
51263
|
width: 140,
|
|
51258
51264
|
key: "type",
|
|
51259
|
-
render: (
|
|
51265
|
+
render: (w, M, $) => {
|
|
51260
51266
|
const k = d[$];
|
|
51261
|
-
return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children:
|
|
51267
|
+
return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
|
|
51262
51268
|
Select$1,
|
|
51263
51269
|
{
|
|
51264
|
-
defaultValue:
|
|
51270
|
+
defaultValue: w,
|
|
51265
51271
|
popupMatchSelectWidth: !1,
|
|
51266
51272
|
style: { width: "100%" },
|
|
51267
51273
|
options: (k == null ? void 0 : k.possibleTypes.map((z) => ({ label: z, value: z }))) || [],
|
|
@@ -51275,12 +51281,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51275
51281
|
dataIndex: "interface",
|
|
51276
51282
|
key: "interface",
|
|
51277
51283
|
width: 150,
|
|
51278
|
-
render: (
|
|
51284
|
+
render: (w, M, $) => {
|
|
51279
51285
|
const k = d[$], z = getInterfaceOptions(j, k.type);
|
|
51280
|
-
return k.source ?
|
|
51286
|
+
return k.source ? w : /* @__PURE__ */ jsx(
|
|
51281
51287
|
Select$1,
|
|
51282
51288
|
{
|
|
51283
|
-
defaultValue:
|
|
51289
|
+
defaultValue: w,
|
|
51284
51290
|
style: { width: "100%" },
|
|
51285
51291
|
popupMatchSelectWidth: !1,
|
|
51286
51292
|
onChange: (E) => {
|
|
@@ -51298,13 +51304,13 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51298
51304
|
dataIndex: "title",
|
|
51299
51305
|
key: "title",
|
|
51300
51306
|
width: 180,
|
|
51301
|
-
render: (
|
|
51307
|
+
render: (w, M, $) => {
|
|
51302
51308
|
var z;
|
|
51303
51309
|
const k = d[$];
|
|
51304
51310
|
return /* @__PURE__ */ jsx(
|
|
51305
51311
|
Input$3,
|
|
51306
51312
|
{
|
|
51307
|
-
defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) ||
|
|
51313
|
+
defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
|
|
51308
51314
|
onChange: (E) => N(
|
|
51309
51315
|
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: E.target.value }) }),
|
|
51310
51316
|
$
|
|
@@ -51360,8 +51366,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51360
51366
|
}, S = (y) => {
|
|
51361
51367
|
var v;
|
|
51362
51368
|
return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
|
|
51363
|
-
var O, j, N, B,
|
|
51364
|
-
const I = typeof (F == null ? void 0 : F.source) == "string" ? (O = F == null ? void 0 : F.source) == null ? void 0 : O.split(".") : F == null ? void 0 : F.source,
|
|
51369
|
+
var O, j, N, B, w, M;
|
|
51370
|
+
const I = typeof (F == null ? void 0 : F.source) == "string" ? (O = F == null ? void 0 : F.source) == null ? void 0 : O.split(".") : F == null ? void 0 : F.source, R = (N = (j = h(I == null ? void 0 : I[0])) == null ? void 0 : j.find(($) => $.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.uiSchema, T = ((B = F == null ? void 0 : F.uiSchema) == null ? void 0 : B.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (M = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : M.uiSchema;
|
|
51365
51371
|
return {
|
|
51366
51372
|
title: u(T),
|
|
51367
51373
|
dataIndex: F.name,
|
|
@@ -51595,7 +51601,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51595
51601
|
}), a;
|
|
51596
51602
|
}, FieldsConfigure = observer$1(
|
|
51597
51603
|
() => {
|
|
51598
|
-
var v, F, I,
|
|
51604
|
+
var v, F, I, R;
|
|
51599
51605
|
const { t: e } = useTranslation(), [t, n] = useState([]), { data: o, error: r, loading: i } = useAsyncData(), { data: a, fields: l } = o || {}, c = useField(), { data: u } = useContext(ResourceActionContext), d = useCompile(), { getInterface: p, getCollectionField: m } = useCollectionManager_deprecated(), h = useFieldInterfaceOptions(), g = useMemo(
|
|
51600
51606
|
() => h.filter((T) => !["relation"].includes(T.key)).map((T, D) => ({
|
|
51601
51607
|
key: D,
|
|
@@ -51613,10 +51619,10 @@ const AsyncDataProvider = (e) => {
|
|
|
51613
51619
|
const T = /* @__PURE__ */ new Map();
|
|
51614
51620
|
i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j, N]) => {
|
|
51615
51621
|
var k;
|
|
51616
|
-
const B = l[j],
|
|
51622
|
+
const B = l[j], w = inferInterface(j, N), M = (k = C.current(w)) == null ? void 0 : k.default, $ = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
|
|
51617
51623
|
T.set(j, {
|
|
51618
51624
|
name: j,
|
|
51619
|
-
interface: (B == null ? void 0 : B.interface) ||
|
|
51625
|
+
interface: (B == null ? void 0 : B.interface) || w,
|
|
51620
51626
|
type: (B == null ? void 0 : B.type) || (M == null ? void 0 : M.type),
|
|
51621
51627
|
source: B == null ? void 0 : B.source,
|
|
51622
51628
|
uiSchema: x({
|
|
@@ -51643,7 +51649,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51643
51649
|
return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: e("Please use a valid SELECT or WITH AS statement") });
|
|
51644
51650
|
const b = r;
|
|
51645
51651
|
if (b) {
|
|
51646
|
-
const T = ((
|
|
51652
|
+
const T = ((R = (I = (F = (v = b == null ? void 0 : b.response) == null ? void 0 : v.data) == null ? void 0 : F.errors) == null ? void 0 : I.map) == null ? void 0 : R.call(I, (D) => D.message).join(`
|
|
51647
51653
|
`)) || b.message;
|
|
51648
51654
|
return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${T}`, type: "error" });
|
|
51649
51655
|
}
|
|
@@ -51651,9 +51657,9 @@ const AsyncDataProvider = (e) => {
|
|
|
51651
51657
|
const O = [...t];
|
|
51652
51658
|
O.splice(D, 1, T), n(O), c.setValue(
|
|
51653
51659
|
O.map((j) => {
|
|
51654
|
-
var N, B,
|
|
51660
|
+
var N, B, w;
|
|
51655
51661
|
return P(x({}, j), {
|
|
51656
|
-
source: typeof j.source == "string" ? j.source : ((
|
|
51662
|
+
source: typeof j.source == "string" ? j.source : ((w = (B = (N = j.source) == null ? void 0 : N.filter) == null ? void 0 : B.call(N, Boolean)) == null ? void 0 : w.join(".")) || null
|
|
51657
51663
|
});
|
|
51658
51664
|
})
|
|
51659
51665
|
);
|
|
@@ -51710,14 +51716,14 @@ const AsyncDataProvider = (e) => {
|
|
|
51710
51716
|
popupMatchSelectWidth: !1,
|
|
51711
51717
|
onChange: (B) => {
|
|
51712
51718
|
var M, $, k, z, E;
|
|
51713
|
-
const
|
|
51719
|
+
const w = p(B);
|
|
51714
51720
|
S(
|
|
51715
51721
|
P(x({}, j), {
|
|
51716
51722
|
interface: B || null,
|
|
51717
|
-
uiSchema: P(x({}, (M =
|
|
51718
|
-
title: ((k = ($ =
|
|
51723
|
+
uiSchema: P(x({}, (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema), {
|
|
51724
|
+
title: ((k = ($ = w == null ? void 0 : w.default) == null ? void 0 : $.uiSchema) == null ? void 0 : k.title) || ((z = j.uiSchema) == null ? void 0 : z.title)
|
|
51719
51725
|
}),
|
|
51720
|
-
type: (E =
|
|
51726
|
+
type: (E = w == null ? void 0 : w.default) == null ? void 0 : E.type
|
|
51721
51727
|
}),
|
|
51722
51728
|
O
|
|
51723
51729
|
);
|
|
@@ -51741,7 +51747,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51741
51747
|
{
|
|
51742
51748
|
value: ((N = j.uiSchema) == null ? void 0 : N.title) || T,
|
|
51743
51749
|
defaultValue: ((B = j.uiSchema) == null ? void 0 : B.title) !== void 0 ? j.uiSchema.title : j == null ? void 0 : j.name,
|
|
51744
|
-
onChange: (
|
|
51750
|
+
onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }), O)
|
|
51745
51751
|
}
|
|
51746
51752
|
);
|
|
51747
51753
|
}
|
|
@@ -56505,6 +56511,7 @@ function useACLRoleContext() {
|
|
|
56505
56511
|
[i, t]
|
|
56506
56512
|
);
|
|
56507
56513
|
return P(x({}, e), {
|
|
56514
|
+
snippets: (e == null ? void 0 : e.snippets) || [],
|
|
56508
56515
|
parseAction: useCallback(
|
|
56509
56516
|
(c, u = {}) => {
|
|
56510
56517
|
var h;
|
|
@@ -57623,32 +57630,32 @@ RoleResourceCollectionContext.displayName = "RoleResourceCollectionContext";
|
|
|
57623
57630
|
const RolesResourcesActions = connect((e) => {
|
|
57624
57631
|
var S, y, v, F;
|
|
57625
57632
|
const t = (I) => {
|
|
57626
|
-
const
|
|
57633
|
+
const R = I.map((T) => P(x({}, T), {
|
|
57627
57634
|
scope: isEmpty$1(T.scope) ? null : T.scope
|
|
57628
57635
|
}));
|
|
57629
|
-
e.onChange(
|
|
57636
|
+
e.onChange(R);
|
|
57630
57637
|
};
|
|
57631
57638
|
useForm();
|
|
57632
|
-
const n = useRecord(), o = useAvailableActions(), { getCollection: r, getCollectionFields: i } = useCollectionManager_deprecated(), a = r(n.collectionName), l = i(n.collectionName), c = useCompile(), { t: u } = useTranslation(), d = useField(), p = toActionMap(d.value || []), m = (I,
|
|
57639
|
+
const n = useRecord(), o = useAvailableActions(), { getCollection: r, getCollectionFields: i } = useCollectionManager_deprecated(), a = r(n.collectionName), l = i(n.collectionName), c = useCompile(), { t: u } = useTranslation(), d = useField(), p = toActionMap(d.value || []), m = (I, R) => {
|
|
57633
57640
|
var D;
|
|
57634
57641
|
const T = p == null ? void 0 : p[I];
|
|
57635
|
-
return T ? (D = T == null ? void 0 : T.fields) == null ? void 0 : D.includes(
|
|
57642
|
+
return T ? (D = T == null ? void 0 : T.fields) == null ? void 0 : D.includes(R) : !1;
|
|
57636
57643
|
}, h = o.filter((I) => I.allowConfigureFields), g = (S = l == null ? void 0 : l.filter((I) => I.interface)) == null ? void 0 : S.map((I) => {
|
|
57637
|
-
const
|
|
57644
|
+
const R = x({}, I);
|
|
57638
57645
|
for (const T of h)
|
|
57639
|
-
|
|
57640
|
-
return
|
|
57646
|
+
R[T.name] = m(T.name, I.name);
|
|
57647
|
+
return R;
|
|
57641
57648
|
}), f = (I) => {
|
|
57642
|
-
var
|
|
57649
|
+
var R, T;
|
|
57643
57650
|
p[I] ? delete p[I] : p[I] = {
|
|
57644
57651
|
name: I,
|
|
57645
|
-
fields: (T = (
|
|
57652
|
+
fields: (T = (R = l == null ? void 0 : l.filter((D) => D.interface)) == null ? void 0 : R.map) == null ? void 0 : T.call(R, (D) => D.name)
|
|
57646
57653
|
}, t(Object.values(p));
|
|
57647
|
-
}, C = (I,
|
|
57648
|
-
p[I] ? (p[I].scope =
|
|
57654
|
+
}, C = (I, R) => {
|
|
57655
|
+
p[I] ? (p[I].scope = R, t(Object.values(p))) : (f(I), p[I].scope = R);
|
|
57649
57656
|
}, b = {};
|
|
57650
57657
|
for (const I of h)
|
|
57651
|
-
b[I.name] = ((y = l == null ? void 0 : l.filter((
|
|
57658
|
+
b[I.name] = ((y = l == null ? void 0 : l.filter((R) => R.interface)) == null ? void 0 : y.length) === ((F = (v = p == null ? void 0 : p[I.name]) == null ? void 0 : v.fields) == null ? void 0 : F.length);
|
|
57652
57659
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(RoleResourceCollectionContext.Provider, { value: a, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
|
|
57653
57660
|
/* @__PURE__ */ jsx(FormItem$1, { label: u("Action permission"), children: /* @__PURE__ */ jsx(
|
|
57654
57661
|
Table$3,
|
|
@@ -57670,12 +57677,12 @@ const RolesResourcesActions = connect((e) => {
|
|
|
57670
57677
|
{
|
|
57671
57678
|
dataIndex: "enabled",
|
|
57672
57679
|
title: u("Allow"),
|
|
57673
|
-
render: (I,
|
|
57680
|
+
render: (I, R) => /* @__PURE__ */ jsx(
|
|
57674
57681
|
Checkbox$1,
|
|
57675
57682
|
{
|
|
57676
57683
|
checked: I,
|
|
57677
57684
|
onChange: () => {
|
|
57678
|
-
f(
|
|
57685
|
+
f(R.name);
|
|
57679
57686
|
}
|
|
57680
57687
|
}
|
|
57681
57688
|
)
|
|
@@ -57683,21 +57690,21 @@ const RolesResourcesActions = connect((e) => {
|
|
|
57683
57690
|
{
|
|
57684
57691
|
dataIndex: "scope",
|
|
57685
57692
|
title: u("Data scope"),
|
|
57686
|
-
render: (I,
|
|
57693
|
+
render: (I, R) => !R.onNewRecord && /* @__PURE__ */ jsx(
|
|
57687
57694
|
ScopeSelect,
|
|
57688
57695
|
{
|
|
57689
57696
|
value: I,
|
|
57690
57697
|
onChange: (T) => {
|
|
57691
|
-
C(
|
|
57698
|
+
C(R.name, T);
|
|
57692
57699
|
}
|
|
57693
57700
|
}
|
|
57694
57701
|
)
|
|
57695
57702
|
}
|
|
57696
57703
|
],
|
|
57697
57704
|
dataSource: o == null ? void 0 : o.map((I) => {
|
|
57698
|
-
let
|
|
57699
|
-
return p[I.name] && (
|
|
57700
|
-
enabled:
|
|
57705
|
+
let R = !1, T = null;
|
|
57706
|
+
return p[I.name] && (R = !0, I.onNewRecord || (T = p[I.name].scope)), P(x({}, I), {
|
|
57707
|
+
enabled: R,
|
|
57701
57708
|
scope: T
|
|
57702
57709
|
});
|
|
57703
57710
|
})
|
|
@@ -57716,20 +57723,20 @@ const RolesResourcesActions = connect((e) => {
|
|
|
57716
57723
|
render: (I) => c(I)
|
|
57717
57724
|
},
|
|
57718
57725
|
...h.map((I) => {
|
|
57719
|
-
const
|
|
57726
|
+
const R = b == null ? void 0 : b[I.name];
|
|
57720
57727
|
return {
|
|
57721
57728
|
dataIndex: I.name,
|
|
57722
57729
|
title: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
57723
57730
|
/* @__PURE__ */ jsx(
|
|
57724
57731
|
Checkbox$1,
|
|
57725
57732
|
{
|
|
57726
|
-
checked:
|
|
57733
|
+
checked: R,
|
|
57727
57734
|
onChange: () => {
|
|
57728
57735
|
var D;
|
|
57729
57736
|
const T = p[I.name] || {
|
|
57730
57737
|
name: I.name
|
|
57731
57738
|
};
|
|
57732
|
-
|
|
57739
|
+
R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (O) => O.name), p[I.name] = T, t(Object.values(p));
|
|
57733
57740
|
}
|
|
57734
57741
|
}
|
|
57735
57742
|
),
|
|
@@ -57971,10 +57978,10 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
|
|
|
57971
57978
|
ready: !!e.name
|
|
57972
57979
|
}
|
|
57973
57980
|
), a = useMemo(() => {
|
|
57974
|
-
var F, I,
|
|
57981
|
+
var F, I, R;
|
|
57975
57982
|
if (!((I = (F = r == null ? void 0 : r.data) == null ? void 0 : F.packageJson) != null && I.repository))
|
|
57976
57983
|
return null;
|
|
57977
|
-
const y = (
|
|
57984
|
+
const y = (R = r == null ? void 0 : r.data) == null ? void 0 : R.packageJson.repository;
|
|
57978
57985
|
return (typeof y == "string" ? y : y.url).replace(/\.git$/, "").replace(/^git\+/, "");
|
|
57979
57986
|
}, [r]), l = useMemo(() => {
|
|
57980
57987
|
var v;
|
|
@@ -58383,7 +58390,7 @@ function PluginInfo(e) {
|
|
|
58383
58390
|
description: m,
|
|
58384
58391
|
error: h,
|
|
58385
58392
|
homepage: g
|
|
58386
|
-
} = t, { styles: f, theme: C } = useStyles$1(), b = useNavigate(), { t: S } = useTranslation(), y = useAPIClient(), { modal: v } = App.useApp(), [F, I] = useState(!1),
|
|
58393
|
+
} = t, { styles: f, theme: C } = useStyles$1(), b = useNavigate(), { t: S } = useTranslation(), y = useAPIClient(), { modal: v } = App.useApp(), [F, I] = useState(!1), R = i || r || l;
|
|
58387
58394
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
58388
58395
|
F && /* @__PURE__ */ jsx(
|
|
58389
58396
|
PluginUpgradeModal,
|
|
@@ -58399,7 +58406,7 @@ function PluginInfo(e) {
|
|
|
58399
58406
|
Card,
|
|
58400
58407
|
{
|
|
58401
58408
|
role: "button",
|
|
58402
|
-
"aria-label":
|
|
58409
|
+
"aria-label": R,
|
|
58403
58410
|
size: "small",
|
|
58404
58411
|
bordered: !1,
|
|
58405
58412
|
onClick: () => {
|
|
@@ -58407,7 +58414,7 @@ function PluginInfo(e) {
|
|
|
58407
58414
|
},
|
|
58408
58415
|
headStyle: { border: "none", minHeight: "inherit", paddingTop: 14 },
|
|
58409
58416
|
bodyStyle: { paddingTop: 10 },
|
|
58410
|
-
title: /* @__PURE__ */ jsx("div", { children:
|
|
58417
|
+
title: /* @__PURE__ */ jsx("div", { children: R }),
|
|
58411
58418
|
hoverable: !0,
|
|
58412
58419
|
className: css`
|
|
58413
58420
|
.ant-card-actions {
|
|
@@ -58756,15 +58763,15 @@ const LocalPlugins = () => {
|
|
|
58756
58763
|
"Others"
|
|
58757
58764
|
], C = useMemo(() => f.map((v) => {
|
|
58758
58765
|
if (v === "Others") {
|
|
58759
|
-
const I = n == null ? void 0 : n.data.filter((
|
|
58766
|
+
const I = n == null ? void 0 : n.data.filter((R) => !hasIntersection(R.keywords, f));
|
|
58760
58767
|
return {
|
|
58761
58768
|
key: v,
|
|
58762
58769
|
list: I
|
|
58763
58770
|
};
|
|
58764
58771
|
}
|
|
58765
58772
|
const F = n == null ? void 0 : n.data.filter((I) => {
|
|
58766
|
-
var
|
|
58767
|
-
return (
|
|
58773
|
+
var R;
|
|
58774
|
+
return (R = I.keywords) == null ? void 0 : R.includes(v);
|
|
58768
58775
|
});
|
|
58769
58776
|
return {
|
|
58770
58777
|
key: v,
|
|
@@ -58773,12 +58780,12 @@ const LocalPlugins = () => {
|
|
|
58773
58780
|
}), [f]), b = useMemo(() => {
|
|
58774
58781
|
var F;
|
|
58775
58782
|
let y = ((F = i[a]) == null ? void 0 : F.list) || [];
|
|
58776
|
-
!a && m ? y = C.find((I) => I.key === m).list : a && m && (y = C.find((
|
|
58783
|
+
!a && m ? y = C.find((I) => I.key === m).list : a && m && (y = C.find((R) => R.key === m).list.filter((R) => y.find((T) => T.name === R.name)));
|
|
58777
58784
|
const v = g.toLocaleLowerCase().trim();
|
|
58778
58785
|
return v && (y = _.filter(
|
|
58779
58786
|
y,
|
|
58780
58787
|
(I) => String(I.displayName || "").toLocaleLowerCase().includes(v) || String(I.description || "").toLocaleLowerCase().includes(v)
|
|
58781
|
-
)), y.sort((I,
|
|
58788
|
+
)), y.sort((I, R) => I.displayName.localeCompare(R.displayName));
|
|
58782
58789
|
}, [a, i, g, m]), S = (y) => {
|
|
58783
58790
|
p(y);
|
|
58784
58791
|
};
|
|
@@ -60277,16 +60284,16 @@ const ActionInitializerItem = (e) => {
|
|
|
60277
60284
|
} = useProps(e), [y, v] = useState(!1), F = useMemo(
|
|
60278
60285
|
() => S && (i != null && i.name) ? [i.name] : [],
|
|
60279
60286
|
[i == null ? void 0 : i.name, S]
|
|
60280
|
-
), I = C || (i == null ? void 0 : i.targetKey) || "id",
|
|
60281
|
-
title:
|
|
60287
|
+
), I = C || (i == null ? void 0 : i.targetKey) || "id", R = b || ((U = (G = a["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, T = {
|
|
60288
|
+
title: R || I,
|
|
60282
60289
|
key: I
|
|
60283
|
-
}, [D, O] = useState([]), [j, N] = useState(a.default || []), [B,
|
|
60290
|
+
}, [D, O] = useState([]), [j, N] = useState(a.default || []), [B, w] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
|
|
60284
60291
|
if (useEffect(() => {
|
|
60285
60292
|
a.default && (d(a.default), N(a.default));
|
|
60286
60293
|
}, [a.default, d]), !i)
|
|
60287
60294
|
return null;
|
|
60288
60295
|
const $ = (K) => {
|
|
60289
|
-
O(K),
|
|
60296
|
+
O(K), w(!1);
|
|
60290
60297
|
}, k = (K) => {
|
|
60291
60298
|
N(K), d(K), p == null || p(K);
|
|
60292
60299
|
}, z = (K) => {
|
|
@@ -60349,7 +60356,7 @@ const ActionInitializerItem = (e) => {
|
|
|
60349
60356
|
treeData: u,
|
|
60350
60357
|
onSelect: k,
|
|
60351
60358
|
fieldNames: T,
|
|
60352
|
-
titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(M, c(K[
|
|
60359
|
+
titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(M, c(K[R])) }),
|
|
60353
60360
|
selectedKeys: j,
|
|
60354
60361
|
blockNode: !0
|
|
60355
60362
|
}
|
|
@@ -60370,10 +60377,10 @@ const ActionInitializerItem = (e) => {
|
|
|
60370
60377
|
label: u((v = y == null ? void 0 : y.uiSchema) == null ? void 0 : v.title) || (y == null ? void 0 : y.name)
|
|
60371
60378
|
};
|
|
60372
60379
|
}), h = (y) => {
|
|
60373
|
-
var I,
|
|
60380
|
+
var I, R, T;
|
|
60374
60381
|
const v = {
|
|
60375
60382
|
"x-uid": t["x-uid"]
|
|
60376
|
-
}, F = P(x(x({}, (
|
|
60383
|
+
}, F = P(x(x({}, (R = (I = l == null ? void 0 : l.uiSchema) == null ? void 0 : I["x-component-props"]) == null ? void 0 : R.fieldNames), (T = t["x-component-props"]) == null ? void 0 : T.fieldNames), {
|
|
60377
60384
|
label: y
|
|
60378
60385
|
});
|
|
60379
60386
|
t["x-component-props"] = t["x-component-props"] || {}, t["x-component-props"].fieldNames = F, v["x-component-props"] = t["x-component-props"], d.emit("patch", {
|
|
@@ -60752,19 +60759,19 @@ const DataBlockInitializer = (e) => {
|
|
|
60752
60759
|
currentText: b,
|
|
60753
60760
|
otherText: S,
|
|
60754
60761
|
alwaysRenderMenu: y
|
|
60755
|
-
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode:
|
|
60762
|
+
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: R } = useSchemaTemplateManager(), T = useCallback(
|
|
60756
60763
|
(z) => V(void 0, null, function* () {
|
|
60757
60764
|
const { item: E, fromOthersInPopup: q } = z;
|
|
60758
60765
|
if (f)
|
|
60759
60766
|
return f(z);
|
|
60760
60767
|
if (E.template) {
|
|
60761
|
-
const L = yield
|
|
60768
|
+
const L = yield R(E);
|
|
60762
60769
|
v(t ? t(L, { item: E, fromOthersInPopup: q }) : L);
|
|
60763
60770
|
} else
|
|
60764
60771
|
n && n({ item: E, fromOthersInPopup: q });
|
|
60765
60772
|
F(!1);
|
|
60766
60773
|
}),
|
|
60767
|
-
[
|
|
60774
|
+
[R, v, F, n, f, t]
|
|
60768
60775
|
), D = h || // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
60769
60776
|
useCollectionDataSourceItems({
|
|
60770
60777
|
name: i,
|
|
@@ -60779,9 +60786,9 @@ const DataBlockInitializer = (e) => {
|
|
|
60779
60786
|
onClick: T,
|
|
60780
60787
|
currentText: b,
|
|
60781
60788
|
otherText: S
|
|
60782
|
-
}), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]),
|
|
60783
|
-
let z =
|
|
60784
|
-
return p && z.length === 1 ? z = z[0].children : z =
|
|
60789
|
+
}), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]), w = useMenuSearch({ data: j, openKeys: N, hideSearch: u }), M = useMemo(() => {
|
|
60790
|
+
let z = w.filter((E) => E.key !== "search" && E.key !== "empty");
|
|
60791
|
+
return p && z.length === 1 ? z = z[0].children : z = w, [
|
|
60785
60792
|
{
|
|
60786
60793
|
key: i,
|
|
60787
60794
|
label: I(a),
|
|
@@ -60792,7 +60799,7 @@ const DataBlockInitializer = (e) => {
|
|
|
60792
60799
|
children: z
|
|
60793
60800
|
}
|
|
60794
60801
|
];
|
|
60795
|
-
}, [
|
|
60802
|
+
}, [w, p, i, I, a, r, T, e]);
|
|
60796
60803
|
return j.length > 1 || j.length === 1 && ((k = ($ = j[0]) == null ? void 0 : $.children) == null ? void 0 : k.length) > 0 || y ? /* @__PURE__ */ jsx(
|
|
60797
60804
|
SchemaInitializerMenu,
|
|
60798
60805
|
{
|
|
@@ -63960,46 +63967,48 @@ const commonOptions$h = {
|
|
|
63960
63967
|
}
|
|
63961
63968
|
});
|
|
63962
63969
|
}, AssociateActionProvider = (e) => {
|
|
63963
|
-
const [t, n] = useState([]), o = useCollection(), { resource: r, block: i, __parent: a } = useBlockRequestContext(),
|
|
63970
|
+
const [t, n] = useState([]), o = useCollection(), { resource: r, block: i, __parent: a, service: l } = useBlockRequestContext(), c = useActionContext(), { isMobile: u } = useOpenModeContext() || {}, [d, p] = useState([]), { data: m } = l || {};
|
|
63964
63971
|
useEffect(() => {
|
|
63965
|
-
var
|
|
63966
|
-
(
|
|
63967
|
-
|
|
63968
|
-
|
|
63972
|
+
var C;
|
|
63973
|
+
(C = r == null ? void 0 : r.list) == null || C.call(r, {
|
|
63974
|
+
paginate: !1
|
|
63975
|
+
}).then((b) => {
|
|
63976
|
+
var S;
|
|
63977
|
+
p(((S = b.data) == null ? void 0 : S.data) || []);
|
|
63969
63978
|
});
|
|
63970
|
-
}, [r]);
|
|
63971
|
-
const
|
|
63979
|
+
}, [r, m == null ? void 0 : m.meta.count]);
|
|
63980
|
+
const h = {
|
|
63972
63981
|
size: "small",
|
|
63973
63982
|
onChange: e == null ? void 0 : e.onChange,
|
|
63974
63983
|
selectedRows: t,
|
|
63975
63984
|
setSelectedRows: n
|
|
63976
|
-
},
|
|
63977
|
-
const { selectedRows:
|
|
63985
|
+
}, g = () => {
|
|
63986
|
+
const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
|
|
63978
63987
|
return {
|
|
63979
|
-
onClick(
|
|
63988
|
+
onClick(F, I) {
|
|
63980
63989
|
return V(this, null, function* () {
|
|
63981
|
-
var
|
|
63990
|
+
var R, T;
|
|
63982
63991
|
yield r.add({
|
|
63983
|
-
values:
|
|
63984
|
-
}),
|
|
63992
|
+
values: C
|
|
63993
|
+
}), I && (I == null || I()), b == null || b(!1), S == null || S(!0), i && i !== "TableField" && ((T = (R = a == null ? void 0 : a.service) == null ? void 0 : R.refresh) == null || T.call(R), b == null || b(!1), y == null || y(!1));
|
|
63985
63994
|
});
|
|
63986
63995
|
}
|
|
63987
63996
|
};
|
|
63988
|
-
},
|
|
63989
|
-
const
|
|
63990
|
-
if (
|
|
63991
|
-
const
|
|
63992
|
-
return
|
|
63997
|
+
}, f = () => {
|
|
63998
|
+
const C = (o == null ? void 0 : o.filterTargetKey) || "id";
|
|
63999
|
+
if (d) {
|
|
64000
|
+
const b = d.map((y) => y[C]).filter(Boolean);
|
|
64001
|
+
return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
|
|
63993
64002
|
}
|
|
63994
64003
|
return {};
|
|
63995
64004
|
};
|
|
63996
64005
|
return /* @__PURE__ */ jsx(
|
|
63997
64006
|
ActionContextProvider,
|
|
63998
64007
|
{
|
|
63999
|
-
value: P(x({},
|
|
64000
|
-
openMode:
|
|
64008
|
+
value: P(x({}, c), {
|
|
64009
|
+
openMode: u ? "drawer" : c.openMode
|
|
64001
64010
|
}),
|
|
64002
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({},
|
|
64011
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, h), { children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { useTableSelectorProps, usePickActionProps: g }, children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: f() }, children: e.children }) }) }))
|
|
64003
64012
|
}
|
|
64004
64013
|
);
|
|
64005
64014
|
}, ParentCollectionFields = () => {
|