@nocobase/client 1.6.37 → 1.6.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs
CHANGED
|
@@ -6052,24 +6052,24 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6052
6052
|
const D = {
|
|
6053
6053
|
type: "duplicate",
|
|
6054
6054
|
tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
|
|
6055
|
-
},
|
|
6055
|
+
}, N = P(x({}, D), {
|
|
6056
6056
|
role: "button",
|
|
6057
6057
|
title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
|
|
6058
6058
|
key: R ? `${R}.${T.name}` : T.name,
|
|
6059
6059
|
isLeaf: !0,
|
|
6060
6060
|
field: T
|
|
6061
6061
|
});
|
|
6062
|
-
return ["belongsTo", "belongsToMany"].includes(T.type) ? (D.type = "reference",
|
|
6062
|
+
return ["belongsTo", "belongsToMany"].includes(T.type) ? (D.type = "reference", N.type = "reference", N.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), N.isLeaf = !1, N.children = m(T.target, {
|
|
6063
6063
|
depth: F + 1,
|
|
6064
6064
|
maxDepth: I,
|
|
6065
|
-
prefix:
|
|
6065
|
+
prefix: N.key,
|
|
6066
6066
|
exclude: systemKeys
|
|
6067
|
-
})) : ["hasOne", "hasMany"].includes(T.type) && (
|
|
6067
|
+
})) : ["hasOne", "hasMany"].includes(T.type) && (N.isLeaf = !1, N.children = p(T.target, {
|
|
6068
6068
|
depth: F + 1,
|
|
6069
6069
|
maxDepth: I,
|
|
6070
|
-
prefix:
|
|
6070
|
+
prefix: N.key,
|
|
6071
6071
|
exclude: ["id", ...systemKeys]
|
|
6072
|
-
})),
|
|
6072
|
+
})), N;
|
|
6073
6073
|
}).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: R = [] }) => I > F ? [] : o(y).map((T) => {
|
|
6074
6074
|
var j;
|
|
6075
6075
|
if (!T.target || !T.interface || R.includes(T.name))
|
|
@@ -6077,15 +6077,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6077
6077
|
const D = {
|
|
6078
6078
|
type: "preloading",
|
|
6079
6079
|
tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
|
|
6080
|
-
},
|
|
6080
|
+
}, N = v ? `${v}.${T.name}` : T.name;
|
|
6081
6081
|
return {
|
|
6082
6082
|
role: "button",
|
|
6083
6083
|
title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
|
|
6084
|
-
key:
|
|
6084
|
+
key: N,
|
|
6085
6085
|
isLeaf: !1,
|
|
6086
6086
|
field: T,
|
|
6087
6087
|
children: m(T.target, {
|
|
6088
|
-
prefix:
|
|
6088
|
+
prefix: N,
|
|
6089
6089
|
depth: I + 1,
|
|
6090
6090
|
maxDepth: F,
|
|
6091
6091
|
exclude: R
|
|
@@ -6104,8 +6104,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6104
6104
|
return h(F || R.treeData);
|
|
6105
6105
|
try {
|
|
6106
6106
|
return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
|
|
6107
|
-
} catch (
|
|
6108
|
-
return console.error(
|
|
6107
|
+
} catch (N) {
|
|
6108
|
+
return console.error(N), [];
|
|
6109
6109
|
}
|
|
6110
6110
|
}, []), f = useCallback((y) => (v) => new Promise((F) => {
|
|
6111
6111
|
if (v.children.length)
|
|
@@ -6126,10 +6126,10 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6126
6126
|
var M, $;
|
|
6127
6127
|
if (!T.interface)
|
|
6128
6128
|
return;
|
|
6129
|
-
const
|
|
6130
|
-
if (!(
|
|
6129
|
+
const N = a(T.interface);
|
|
6130
|
+
if (!(N != null && N.filterable))
|
|
6131
6131
|
return;
|
|
6132
|
-
const { nested: j, children:
|
|
6132
|
+
const { nested: j, children: O, operators: B } = N.filterable, w = {
|
|
6133
6133
|
name: T.name,
|
|
6134
6134
|
title: ((M = T == null ? void 0 : T.uiSchema) == null ? void 0 : M.title) || T.name,
|
|
6135
6135
|
schema: T == null ? void 0 : T.uiSchema,
|
|
@@ -6139,18 +6139,18 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6139
6139
|
if (!(T.target && D > 2)) {
|
|
6140
6140
|
if (D > 2)
|
|
6141
6141
|
return w;
|
|
6142
|
-
if (
|
|
6142
|
+
if (O != null && O.length && (w.children = O), j) {
|
|
6143
6143
|
const k = o(T.target), z = I(k, D + 1).filter(Boolean);
|
|
6144
6144
|
w.children = w.children || [], w.children.push(...z);
|
|
6145
6145
|
}
|
|
6146
6146
|
return w;
|
|
6147
6147
|
}
|
|
6148
6148
|
}, I = (T, D) => {
|
|
6149
|
-
const
|
|
6149
|
+
const N = [];
|
|
6150
6150
|
return T.forEach((j) => {
|
|
6151
|
-
const
|
|
6152
|
-
|
|
6153
|
-
}),
|
|
6151
|
+
const O = F(j, D);
|
|
6152
|
+
O && N.push(O);
|
|
6153
|
+
}), N;
|
|
6154
6154
|
};
|
|
6155
6155
|
return I(v, 1);
|
|
6156
6156
|
},
|
|
@@ -7425,8 +7425,8 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
|
|
|
7425
7425
|
});
|
|
7426
7426
|
try {
|
|
7427
7427
|
return m(T, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, D));
|
|
7428
|
-
} catch (
|
|
7429
|
-
console.error(
|
|
7428
|
+
} catch (N) {
|
|
7429
|
+
console.error(N);
|
|
7430
7430
|
}
|
|
7431
7431
|
} else
|
|
7432
7432
|
return (t == null ? void 0 : t.mode) === "constant" ? (R = t == null ? void 0 : t.value) != null ? R : t : null;
|
|
@@ -8545,7 +8545,7 @@ function withInitializer(e) {
|
|
|
8545
8545
|
S ? S(y(M, { isInSubTable: i })) : r(d, y(M, { isInSubTable: i }), { onSuccess: p });
|
|
8546
8546
|
},
|
|
8547
8547
|
[S, y, i, r, d, p]
|
|
8548
|
-
), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token:
|
|
8548
|
+
), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: N } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), O = useMemo(
|
|
8549
8549
|
() => x({
|
|
8550
8550
|
options: n,
|
|
8551
8551
|
style: C
|
|
@@ -8553,7 +8553,7 @@ function withInitializer(e) {
|
|
|
8553
8553
|
[b, n, C]
|
|
8554
8554
|
), B = useMemo(() => css`
|
|
8555
8555
|
.ant-popover-inner {
|
|
8556
|
-
padding: ${`${
|
|
8556
|
+
padding: ${`${N.paddingXXS}px 0`};
|
|
8557
8557
|
.ant-menu-submenu-title {
|
|
8558
8558
|
margin-block: 0;
|
|
8559
8559
|
}
|
|
@@ -8561,7 +8561,7 @@ function withInitializer(e) {
|
|
|
8561
8561
|
padding: 0;
|
|
8562
8562
|
}
|
|
8563
8563
|
}
|
|
8564
|
-
`, [
|
|
8564
|
+
`, [N.paddingXXS]), w = useMemo(
|
|
8565
8565
|
() => ({
|
|
8566
8566
|
maxHeight: j,
|
|
8567
8567
|
overflowY: "auto"
|
|
@@ -8585,7 +8585,7 @@ function withInitializer(e) {
|
|
|
8585
8585
|
options: n,
|
|
8586
8586
|
insert: v
|
|
8587
8587
|
},
|
|
8588
|
-
children: f === !1 ? React.createElement(e,
|
|
8588
|
+
children: f === !1 ? React.createElement(e, O) : /* @__PURE__ */ jsx(
|
|
8589
8589
|
Popover,
|
|
8590
8590
|
P(x({
|
|
8591
8591
|
zIndex: 9999,
|
|
@@ -8602,10 +8602,10 @@ function withInitializer(e) {
|
|
|
8602
8602
|
theme: {
|
|
8603
8603
|
components: {
|
|
8604
8604
|
Menu: {
|
|
8605
|
-
itemHeight:
|
|
8606
|
-
borderRadius:
|
|
8607
|
-
itemBorderRadius:
|
|
8608
|
-
subMenuItemBorderRadius:
|
|
8605
|
+
itemHeight: N.marginXL,
|
|
8606
|
+
borderRadius: N.borderRadiusSM,
|
|
8607
|
+
itemBorderRadius: N.borderRadiusSM,
|
|
8608
|
+
subMenuItemBorderRadius: N.borderRadiusSM
|
|
8609
8609
|
}
|
|
8610
8610
|
}
|
|
8611
8611
|
},
|
|
@@ -8613,7 +8613,7 @@ function withInitializer(e) {
|
|
|
8613
8613
|
}
|
|
8614
8614
|
) })
|
|
8615
8615
|
),
|
|
8616
|
-
children: React.createElement(e,
|
|
8616
|
+
children: React.createElement(e, O)
|
|
8617
8617
|
})
|
|
8618
8618
|
)
|
|
8619
8619
|
}
|
|
@@ -9210,7 +9210,7 @@ function addAppVersion(e, t) {
|
|
|
9210
9210
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9211
9211
|
}), e;
|
|
9212
9212
|
}
|
|
9213
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9213
|
+
const name = "@nocobase/client", version = "1.6.38", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9214
9214
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9215
9215
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9216
9216
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9231,9 +9231,9 @@ const name = "@nocobase/client", version = "1.6.37", license = "AGPL-3.0", main
|
|
|
9231
9231
|
"@formily/reactive-react": "^2.2.27",
|
|
9232
9232
|
"@formily/shared": "^2.2.27",
|
|
9233
9233
|
"@formily/validator": "^2.2.27",
|
|
9234
|
-
"@nocobase/evaluators": "1.6.
|
|
9235
|
-
"@nocobase/sdk": "1.6.
|
|
9236
|
-
"@nocobase/utils": "1.6.
|
|
9234
|
+
"@nocobase/evaluators": "1.6.38",
|
|
9235
|
+
"@nocobase/sdk": "1.6.38",
|
|
9236
|
+
"@nocobase/utils": "1.6.38",
|
|
9237
9237
|
ahooks: "^3.7.2",
|
|
9238
9238
|
antd: "5.12.8",
|
|
9239
9239
|
"antd-style": "3.7.1",
|
|
@@ -10256,11 +10256,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10256
10256
|
}
|
|
10257
10257
|
`, [n.paddingContentVerticalLG, n.marginSM, n.margin]), C = useCollection(), b = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
|
|
10258
10258
|
() => u == null ? void 0 : u.map((v) => {
|
|
10259
|
-
var j,
|
|
10259
|
+
var j, O, B, w;
|
|
10260
10260
|
const F = v.reduceProperties((M, $) => {
|
|
10261
10261
|
if (isCollectionFieldComponent($))
|
|
10262
10262
|
return M.concat([$]);
|
|
10263
|
-
}, []), 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:
|
|
10263
|
+
}, []), 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: N } = (C == null ? void 0 : C.getField(I)) || {};
|
|
10264
10264
|
return T && (T.default = D), P(x({
|
|
10265
10265
|
title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
|
|
10266
10266
|
b,
|
|
@@ -10269,7 +10269,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10269
10269
|
schema: v,
|
|
10270
10270
|
onlyRenderSelf: !0,
|
|
10271
10271
|
isUseFormilyField: !1,
|
|
10272
|
-
tooltip: (
|
|
10272
|
+
tooltip: (O = v == null ? void 0 : v["x-component-props"]) == null ? void 0 : O.tooltip
|
|
10273
10273
|
}
|
|
10274
10274
|
) }),
|
|
10275
10275
|
dataIndex: I,
|
|
@@ -10416,7 +10416,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10416
10416
|
display: none !important;
|
|
10417
10417
|
}
|
|
10418
10418
|
`,
|
|
10419
|
-
itemRender: (D,
|
|
10419
|
+
itemRender: (D, N, j) => N === "prev" ? /* @__PURE__ */ jsxs(
|
|
10420
10420
|
"div",
|
|
10421
10421
|
{
|
|
10422
10422
|
style: { display: "flex" },
|
|
@@ -10657,8 +10657,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10657
10657
|
"loading",
|
|
10658
10658
|
"onClickRow",
|
|
10659
10659
|
"value"
|
|
10660
|
-
]), 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:
|
|
10661
|
-
})),
|
|
10660
|
+
]), 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: N } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10661
|
+
})), O = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, O), [w, M] = useState(() => D ? N : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, L] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10662
10662
|
& > td {
|
|
10663
10663
|
background-color: ${t.controlItemBgActive} !important;
|
|
10664
10664
|
}
|
|
@@ -10683,9 +10683,9 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10683
10683
|
record: Q
|
|
10684
10684
|
}), [C, z]);
|
|
10685
10685
|
useDeepCompareEffect(() => {
|
|
10686
|
-
const Q = D ?
|
|
10686
|
+
const Q = D ? N : [];
|
|
10687
10687
|
_.isEqual(Q, w) || M(Q);
|
|
10688
|
-
}, [D,
|
|
10688
|
+
}, [D, N]);
|
|
10689
10689
|
const K = useCallback((Q) => {
|
|
10690
10690
|
if (m)
|
|
10691
10691
|
return W(Q);
|
|
@@ -10747,7 +10747,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10747
10747
|
renderCell: (Q, te, oe, ie) => {
|
|
10748
10748
|
if (!l && !c)
|
|
10749
10749
|
return ie;
|
|
10750
|
-
const ae =
|
|
10750
|
+
const ae = O == null ? void 0 : O.current, xe = (O == null ? void 0 : O.pageSize) || 20;
|
|
10751
10751
|
return ae ? oe = oe + (ae - 1) * xe + 1 : oe = oe + 1, te.__index && (oe = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
|
|
10752
10752
|
"div",
|
|
10753
10753
|
{
|
|
@@ -10788,7 +10788,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10788
10788
|
W,
|
|
10789
10789
|
q,
|
|
10790
10790
|
ne,
|
|
10791
|
-
|
|
10791
|
+
O,
|
|
10792
10792
|
U
|
|
10793
10793
|
]
|
|
10794
10794
|
), se = useCallback(
|
|
@@ -10832,7 +10832,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10832
10832
|
defaultRowKey: K,
|
|
10833
10833
|
dataSource: X
|
|
10834
10834
|
}, S), re), {
|
|
10835
|
-
paginationProps:
|
|
10835
|
+
paginationProps: O,
|
|
10836
10836
|
components: Z,
|
|
10837
10837
|
onTableChange: d,
|
|
10838
10838
|
onRow: J,
|
|
@@ -11505,7 +11505,7 @@ ${JSON.stringify(L, null, 2)}`
|
|
|
11505
11505
|
F,
|
|
11506
11506
|
h
|
|
11507
11507
|
]
|
|
11508
|
-
),
|
|
11508
|
+
), N = useCallback(() => {
|
|
11509
11509
|
if (!f())
|
|
11510
11510
|
return I == null ? void 0 : I(!1);
|
|
11511
11511
|
t(withSearchParams(removeLastPopupPath(n.pathname)), { replace: !0 }), removePopupLayerState(h), m != null && m.popupuid && deletePopupContext(m.popupuid);
|
|
@@ -11530,7 +11530,7 @@ ${JSON.stringify(L, null, 2)}`
|
|
|
11530
11530
|
});
|
|
11531
11531
|
},
|
|
11532
11532
|
[R, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
|
|
11533
|
-
),
|
|
11533
|
+
), O = useCallback((w, M) => {
|
|
11534
11534
|
M.__popup = w;
|
|
11535
11535
|
}, []), B = useCallback((w) => w.__popup, []);
|
|
11536
11536
|
return {
|
|
@@ -11541,8 +11541,8 @@ ${JSON.stringify(L, null, 2)}`
|
|
|
11541
11541
|
/**
|
|
11542
11542
|
* used to close popup by changing the url
|
|
11543
11543
|
*/
|
|
11544
|
-
closePopup:
|
|
11545
|
-
savePopupSchemaToSchema:
|
|
11544
|
+
closePopup: N,
|
|
11545
|
+
savePopupSchemaToSchema: O,
|
|
11546
11546
|
getPopupSchemaFromSchema: B,
|
|
11547
11547
|
context: S,
|
|
11548
11548
|
/**
|
|
@@ -13135,7 +13135,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13135
13135
|
};
|
|
13136
13136
|
}
|
|
13137
13137
|
};
|
|
13138
|
-
function
|
|
13138
|
+
function N(k) {
|
|
13139
13139
|
delete l[k], delete c[k];
|
|
13140
13140
|
}
|
|
13141
13141
|
function j(k, z, L) {
|
|
@@ -13145,7 +13145,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13145
13145
|
H && !k.depMatched[G] && !L[U] && (getOwn(z, U) ? (k.defineDep(G, p[U]), k.check()) : j(H, z, L));
|
|
13146
13146
|
}), L[q] = !0);
|
|
13147
13147
|
}
|
|
13148
|
-
function
|
|
13148
|
+
function O() {
|
|
13149
13149
|
var k, z, L = a.waitSeconds * 1e3, q = L && o.startTime + L < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
|
|
13150
13150
|
if (!t) {
|
|
13151
13151
|
if (t = !0, eachProp(c, function(J) {
|
|
@@ -13161,7 +13161,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13161
13161
|
H && each(G, function(J) {
|
|
13162
13162
|
j(J, {}, {});
|
|
13163
13163
|
}), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
13164
|
-
i = 0,
|
|
13164
|
+
i = 0, O();
|
|
13165
13165
|
}, 50)), t = !1;
|
|
13166
13166
|
}
|
|
13167
13167
|
}
|
|
@@ -13226,7 +13226,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13226
13226
|
U.push(H.normalizedMap || H);
|
|
13227
13227
|
}), req.onResourceLoad(o, this.map, U);
|
|
13228
13228
|
}
|
|
13229
|
-
|
|
13229
|
+
N(L), this.defined = !0;
|
|
13230
13230
|
}
|
|
13231
13231
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
13232
13232
|
}
|
|
@@ -13273,7 +13273,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13273
13273
|
});
|
|
13274
13274
|
}), E.error = bind(this, function(X) {
|
|
13275
13275
|
this.inited = !0, this.error = X, X.requireModules = [z], eachProp(l, function(ee) {
|
|
13276
|
-
ee.map.id.indexOf(z + "_unnormalized") === 0 &&
|
|
13276
|
+
ee.map.id.indexOf(z + "_unnormalized") === 0 && N(ee.map.id);
|
|
13277
13277
|
}), T(X);
|
|
13278
13278
|
}), E.fromText = bind(this, function(X, ee) {
|
|
13279
13279
|
var Z = k.name, ne = F(Z), re = useInteractive;
|
|
@@ -13409,7 +13409,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13409
13409
|
return z.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, L) : (H = F(q, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
|
|
13410
13410
|
$(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q, E, G, {
|
|
13411
13411
|
enabled: !0
|
|
13412
|
-
}),
|
|
13412
|
+
}), O();
|
|
13413
13413
|
}), L);
|
|
13414
13414
|
}
|
|
13415
13415
|
return mixin(L, {
|
|
@@ -13438,7 +13438,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13438
13438
|
var E = F(q, k, !0), G = getOwn(l, q);
|
|
13439
13439
|
G.undefed = !0, S(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(U, H) {
|
|
13440
13440
|
U[0] === q && d.splice(H, 1);
|
|
13441
|
-
}), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events),
|
|
13441
|
+
}), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), N(q));
|
|
13442
13442
|
}), L;
|
|
13443
13443
|
},
|
|
13444
13444
|
/**
|
|
@@ -13478,7 +13478,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13478
13478
|
));
|
|
13479
13479
|
B([k, E.deps || [], E.exportsFn]);
|
|
13480
13480
|
}
|
|
13481
|
-
|
|
13481
|
+
O();
|
|
13482
13482
|
},
|
|
13483
13483
|
/**
|
|
13484
13484
|
* Converts a module name to a file path. Supports cases where
|
|
@@ -14830,7 +14830,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
|
|
|
14830
14830
|
isDisabled: f || isDisabledDefault,
|
|
14831
14831
|
getCollectionField: C.getCollectionField,
|
|
14832
14832
|
deprecated: p
|
|
14833
|
-
}) || []).sort((D,
|
|
14833
|
+
}) || []).sort((D, N) => D.isLeaf && !N.isLeaf ? -1 : !D.isLeaf && N.isLeaf ? 1 : 0).sort((D, N) => D.disabled && !N.disabled ? 1 : !D.disabled && N.disabled ? -1 : 0);
|
|
14834
14834
|
if (T.length === 0) {
|
|
14835
14835
|
y.disabled = !0, y.isLeaf = !0, I();
|
|
14836
14836
|
return;
|
|
@@ -15054,8 +15054,8 @@ const useDragEnd = (e) => {
|
|
|
15054
15054
|
const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
|
|
15055
15055
|
return useCallback(
|
|
15056
15056
|
(r) => {
|
|
15057
|
-
var f, C, b, S, y, v, F, I, R, T, D,
|
|
15058
|
-
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 = (
|
|
15057
|
+
var f, C, b, S, y, v, F, I, R, T, D, N, j, O, B;
|
|
15058
|
+
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 = (N = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : N.onSuccess, h = (B = (O = (j = a == null ? void 0 : a.data) == null ? void 0 : j.current) == null ? void 0 : O.removeParentsIfNoChildren) != null ? B : !0;
|
|
15059
15059
|
if (!l || !c) {
|
|
15060
15060
|
e == null || e(r);
|
|
15061
15061
|
return;
|
|
@@ -15185,8 +15185,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15185
15185
|
if (e.first)
|
|
15186
15186
|
m = d !== e.cols[0];
|
|
15187
15187
|
else {
|
|
15188
|
-
const D = e.cols[e.index],
|
|
15189
|
-
m = d !== D &&
|
|
15188
|
+
const D = e.cols[e.index], N = e.cols[e.index + 1];
|
|
15189
|
+
m = d !== D && N !== d;
|
|
15190
15190
|
}
|
|
15191
15191
|
const h = e.cols[e.index], g = e.cols[e.index + 1], f = e.first || e.last || !r, {
|
|
15192
15192
|
attributes: C,
|
|
@@ -15208,27 +15208,27 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15208
15208
|
return useDndMonitor({
|
|
15209
15209
|
onDragStart(D) {
|
|
15210
15210
|
var w, M, $;
|
|
15211
|
-
const
|
|
15212
|
-
if (!
|
|
15211
|
+
const N = ($ = (M = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : M.current) == null ? void 0 : $.dividerRef;
|
|
15212
|
+
if (!N || !r)
|
|
15213
15213
|
return;
|
|
15214
15214
|
n.current = D.active.id;
|
|
15215
|
-
const j =
|
|
15216
|
-
F([
|
|
15215
|
+
const j = N.current, O = j.previousElementSibling, B = j.nextElementSibling;
|
|
15216
|
+
F([O.clientWidth, B.clientWidth]);
|
|
15217
15217
|
},
|
|
15218
15218
|
onDragMove(D) {
|
|
15219
15219
|
if (!r || !y)
|
|
15220
15220
|
return;
|
|
15221
15221
|
n.current === D.active.id && (n.current = n.current + "_move");
|
|
15222
|
-
const
|
|
15223
|
-
j.style.width = `${v[0] + D.delta.x}px`,
|
|
15222
|
+
const N = l.current, j = N.previousElementSibling, O = N.nextElementSibling;
|
|
15223
|
+
j.style.width = `${v[0] + D.delta.x}px`, O.style.width = `${v[1] - D.delta.x}px`;
|
|
15224
15224
|
},
|
|
15225
15225
|
onDragEnd(D) {
|
|
15226
15226
|
var $;
|
|
15227
15227
|
if (!r || !n.current || ($ = n.current) != null && $.startsWith(D.active.id) && !n.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (F([0, 0]), !h || !g))
|
|
15228
15228
|
return;
|
|
15229
|
-
const
|
|
15229
|
+
const N = l.current, j = N.previousElementSibling, O = N.nextElementSibling;
|
|
15230
15230
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
15231
|
-
const B =
|
|
15231
|
+
const B = N.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (j.getBoundingClientRect().width + B) / N.parentElement.clientWidth).toFixed(2), M = (100 * (O.getBoundingClientRect().width + B) / N.parentElement.clientWidth).toFixed(2);
|
|
15232
15232
|
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", M), o.emit("batchPatch", {
|
|
15233
15233
|
schemas: [
|
|
15234
15234
|
{
|
|
@@ -15543,8 +15543,8 @@ const useTableBlockProps = () => {
|
|
|
15543
15543
|
),
|
|
15544
15544
|
onChange: useCallback(
|
|
15545
15545
|
({ current: S, pageSize: y }, v, F) => {
|
|
15546
|
-
var
|
|
15547
|
-
const I = (
|
|
15546
|
+
var N, j, O, B, w, M, $, k, z, L;
|
|
15547
|
+
const I = (O = (j = (N = t.parent) == null ? void 0 : N["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : O.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 });
|
|
15548
15548
|
R && (D.sort = R), (L = a.current) == null || L.service.run(D);
|
|
15549
15549
|
},
|
|
15550
15550
|
[t.parent]
|
|
@@ -15552,17 +15552,17 @@ const useTableBlockProps = () => {
|
|
|
15552
15552
|
onClickRow: useCallback(
|
|
15553
15553
|
(S, y, v) => {
|
|
15554
15554
|
const { targets: F, uid: I } = findFilterTargets(t), R = r();
|
|
15555
|
-
if (!F || !F.some((D) => R.some((
|
|
15555
|
+
if (!F || !F.some((D) => R.some((N) => N.uid === D.uid))) {
|
|
15556
15556
|
y((D) => D.length ? [] : D);
|
|
15557
15557
|
return;
|
|
15558
15558
|
}
|
|
15559
15559
|
const T = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
15560
15560
|
R.forEach((D) => {
|
|
15561
15561
|
var $, k, z, L;
|
|
15562
|
-
const
|
|
15563
|
-
if (!
|
|
15562
|
+
const N = F.find((q) => q.uid === D.uid);
|
|
15563
|
+
if (!N)
|
|
15564
15564
|
return;
|
|
15565
|
-
const j = getSourceKey(T,
|
|
15565
|
+
const j = getSourceKey(T, N.field) || i.rowKey || "id", O = [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) || {};
|
|
15566
15566
|
if (v.includes(S[i.rowKey])) {
|
|
15567
15567
|
if ((L = D.clearSelection) == null || L.call(D), D.dataLoadingMode === "manual")
|
|
15568
15568
|
return D.clearData();
|
|
@@ -15571,8 +15571,8 @@ const useTableBlockProps = () => {
|
|
|
15571
15571
|
w[I] = {
|
|
15572
15572
|
$and: [
|
|
15573
15573
|
{
|
|
15574
|
-
[
|
|
15575
|
-
[
|
|
15574
|
+
[N.field || i.rowKey]: {
|
|
15575
|
+
[N.field ? "$in" : "$eq"]: O
|
|
15576
15576
|
}
|
|
15577
15577
|
}
|
|
15578
15578
|
]
|
|
@@ -15970,10 +15970,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15970
15970
|
var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
15971
15971
|
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"]);
|
|
15972
15972
|
return useEffect(() => {
|
|
15973
|
-
var R, T, D,
|
|
15973
|
+
var R, T, D, N, j, O, B, w, M, $, k, z, L;
|
|
15974
15974
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
15975
15975
|
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
|
|
15976
|
-
e.value = q, (
|
|
15976
|
+
e.value = q, (N = e == null ? void 0 : e.setInitialValue) == null || N.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (O = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : O.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 = (L = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : L.page;
|
|
15977
15977
|
}
|
|
15978
15978
|
}, [
|
|
15979
15979
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -16781,8 +16781,8 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16781
16781
|
Component: "CollectionFieldInitializer",
|
|
16782
16782
|
remove: removeGridFormItem,
|
|
16783
16783
|
schemaInitialize: (D) => {
|
|
16784
|
-
var
|
|
16785
|
-
(
|
|
16784
|
+
var N;
|
|
16785
|
+
(N = h == null ? void 0 : h.schemaInitialize) == null || N.call(h, D, {
|
|
16786
16786
|
field: m,
|
|
16787
16787
|
block: l,
|
|
16788
16788
|
readPretty: a,
|
|
@@ -16792,9 +16792,9 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16792
16792
|
},
|
|
16793
16793
|
schema: S
|
|
16794
16794
|
};
|
|
16795
|
-
return l == "Kanban" && (y.find = (D,
|
|
16796
|
-
const
|
|
16797
|
-
return findSchema(
|
|
16795
|
+
return l == "Kanban" && (y.find = (D, N, j) => {
|
|
16796
|
+
const O = findSchema(D, "x-component", l);
|
|
16797
|
+
return findSchema(O, N, j);
|
|
16798
16798
|
}), y;
|
|
16799
16799
|
});
|
|
16800
16800
|
}, useFilterFormItemInitializerFields = (e) => {
|
|
@@ -17155,14 +17155,14 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17155
17155
|
t: h,
|
|
17156
17156
|
componentNamePrefix: m
|
|
17157
17157
|
}).sort((D) => {
|
|
17158
|
-
const
|
|
17159
|
-
if (D.name === (C == null ? void 0 : C.name) ||
|
|
17158
|
+
const N = _.toArray((C == null ? void 0 : C.inherits) || []);
|
|
17159
|
+
if (D.name === (C == null ? void 0 : C.name) || N.some((j) => j === D.name))
|
|
17160
17160
|
return -1;
|
|
17161
17161
|
})
|
|
17162
17162
|
]
|
|
17163
17163
|
})), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
|
|
17164
17164
|
return r ? useMemo(() => {
|
|
17165
|
-
var
|
|
17165
|
+
var O;
|
|
17166
17166
|
const I = {
|
|
17167
17167
|
name: "currentRecord",
|
|
17168
17168
|
collectionName: C.name,
|
|
@@ -17226,25 +17226,25 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17226
17226
|
}
|
|
17227
17227
|
})
|
|
17228
17228
|
};
|
|
17229
|
-
let
|
|
17229
|
+
let N;
|
|
17230
17230
|
const j = b.length ? R : null;
|
|
17231
17231
|
if (F[0].children.length && b.length)
|
|
17232
|
-
l ?
|
|
17232
|
+
l ? N = [I, j] : N = [I, j, D];
|
|
17233
17233
|
else if (F[0].children.length)
|
|
17234
17234
|
if (l) {
|
|
17235
17235
|
if (F[0].children.length <= 1)
|
|
17236
|
-
return F[0].children = ((
|
|
17237
|
-
|
|
17236
|
+
return F[0].children = ((O = F[0].children[0]) == null ? void 0 : O.children) || [], F;
|
|
17237
|
+
N = [I];
|
|
17238
17238
|
} else
|
|
17239
|
-
|
|
17239
|
+
N = [I, D];
|
|
17240
17240
|
else
|
|
17241
|
-
l ?
|
|
17241
|
+
l ? N = [j] : N = [j, D];
|
|
17242
17242
|
return [
|
|
17243
17243
|
{
|
|
17244
17244
|
name: "records",
|
|
17245
17245
|
label: h("Records"),
|
|
17246
17246
|
type: "subMenu",
|
|
17247
|
-
children:
|
|
17247
|
+
children: N.filter(Boolean)
|
|
17248
17248
|
}
|
|
17249
17249
|
];
|
|
17250
17250
|
}, [
|
|
@@ -17959,7 +17959,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17959
17959
|
display: block !important;
|
|
17960
17960
|
}
|
|
17961
17961
|
`, GeneralSchemaDesigner = (e) => {
|
|
17962
|
-
var
|
|
17962
|
+
var N, j;
|
|
17963
17963
|
const t = useFieldSchema(), {
|
|
17964
17964
|
disableInitializer: n,
|
|
17965
17965
|
title: o,
|
|
@@ -17976,10 +17976,10 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17976
17976
|
t["x-settings"] || i,
|
|
17977
17977
|
t["x-settings-props"]
|
|
17978
17978
|
), 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(() => {
|
|
17979
|
-
var
|
|
17979
|
+
var O;
|
|
17980
17980
|
return {
|
|
17981
17981
|
insertPosition: "afterEnd",
|
|
17982
|
-
wrap: ((
|
|
17982
|
+
wrap: ((O = S == null ? void 0 : S.cols) == null ? void 0 : O.length) > 1 ? void 0 : gridRowColWrap,
|
|
17983
17983
|
Component: (B) => /* @__PURE__ */ jsx(
|
|
17984
17984
|
PlusOutlined,
|
|
17985
17985
|
P(x({}, B), {
|
|
@@ -17989,7 +17989,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17989
17989
|
})
|
|
17990
17990
|
)
|
|
17991
17991
|
};
|
|
17992
|
-
}, [g, (
|
|
17992
|
+
}, [g, (N = S == null ? void 0 : S.cols) == null ? void 0 : N.length]);
|
|
17993
17993
|
return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, a), { children: /* @__PURE__ */ jsxs("div", { className: cls("general-schema-designer", overrideAntdCSS), children: [
|
|
17994
17994
|
o && /* @__PURE__ */ jsx("div", { className: cls("general-schema-designer-title", titleCss), children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
|
|
17995
17995
|
/* @__PURE__ */ jsx("span", { className: "title-tag", children: c && R ? `${h(R == null ? void 0 : R.displayName)} > ${h(o)}` : h(o) }),
|
|
@@ -18035,7 +18035,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18035
18035
|
toolbarClassName: m,
|
|
18036
18036
|
toolbarStyle: h = {},
|
|
18037
18037
|
container: g
|
|
18038
|
-
} = 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(),
|
|
18038
|
+
} = 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(), N = useCallback(() => {
|
|
18039
18039
|
D({ refreshParentSchema: !0 });
|
|
18040
18040
|
}, [D]), j = useMemo(() => {
|
|
18041
18041
|
if (n) {
|
|
@@ -18044,7 +18044,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18044
18044
|
if (Array.isArray(n))
|
|
18045
18045
|
return f(n);
|
|
18046
18046
|
}
|
|
18047
|
-
}, [n]), { render:
|
|
18047
|
+
}, [n]), { render: O, exists: B } = useSchemaSettingsRender(
|
|
18048
18048
|
r || (t == null ? void 0 : t["x-settings"]),
|
|
18049
18049
|
t == null ? void 0 : t["x-settings-props"]
|
|
18050
18050
|
), { render: w, exists: M } = useSchemaInitializerRender(
|
|
@@ -18072,7 +18072,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18072
18072
|
return w(z);
|
|
18073
18073
|
if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
|
|
18074
18074
|
return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
|
|
18075
|
-
}, [k, o, z, M, w]), E = useMemo(() => r !== !1 && B ?
|
|
18075
|
+
}, [k, o, z, M, w]), E = useMemo(() => r !== !1 && B ? O() : null, [B, O, r]), G = useRef(null), U = "hidden";
|
|
18076
18076
|
useEffect(() => {
|
|
18077
18077
|
const K = G.current;
|
|
18078
18078
|
let W = K == null ? void 0 : K.parentElement;
|
|
@@ -18113,7 +18113,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18113
18113
|
] }) }),
|
|
18114
18114
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18115
18115
|
L,
|
|
18116
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh:
|
|
18116
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: q }),
|
|
18117
18117
|
E
|
|
18118
18118
|
] }) })
|
|
18119
18119
|
]
|
|
@@ -18277,16 +18277,16 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18277
18277
|
return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
|
|
18278
18278
|
},
|
|
18279
18279
|
[t, p]
|
|
18280
|
-
),
|
|
18280
|
+
), N = useCallback(
|
|
18281
18281
|
(w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
|
|
18282
18282
|
[t]
|
|
18283
18283
|
), j = useCallback(
|
|
18284
18284
|
(w) => {
|
|
18285
18285
|
var M;
|
|
18286
|
-
return (M =
|
|
18286
|
+
return (M = N(w.interface)) == null ? void 0 : M.titleUsable;
|
|
18287
18287
|
},
|
|
18288
|
-
[
|
|
18289
|
-
),
|
|
18288
|
+
[N]
|
|
18289
|
+
), O = useCallback(
|
|
18290
18290
|
(w, M, $) => {
|
|
18291
18291
|
var k, z;
|
|
18292
18292
|
return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(w);
|
|
@@ -18302,9 +18302,9 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18302
18302
|
collections: m,
|
|
18303
18303
|
templates: u,
|
|
18304
18304
|
getTemplate: B,
|
|
18305
|
-
getInterface:
|
|
18305
|
+
getInterface: N,
|
|
18306
18306
|
getCollections: d,
|
|
18307
|
-
getParentCollectionFields:
|
|
18307
|
+
getParentCollectionFields: O,
|
|
18308
18308
|
getInheritCollections: y,
|
|
18309
18309
|
getChildrenCollections: v,
|
|
18310
18310
|
refreshCM: g,
|
|
@@ -18627,11 +18627,11 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
18627
18627
|
const v = dayjs(y), F = v.isSame(g, "day"), I = v.isSame(f, "day");
|
|
18628
18628
|
return {
|
|
18629
18629
|
disabledHours: () => {
|
|
18630
|
-
const
|
|
18631
|
-
return F &&
|
|
18630
|
+
const N = [];
|
|
18631
|
+
return F && N.push(...Array.from({ length: g.hour() }, (j, O) => O)), I && N.push(...Array.from({ length: 24 - f.hour() }, (j, O) => O + f.hour() + 1)), N;
|
|
18632
18632
|
},
|
|
18633
|
-
disabledMinutes: (
|
|
18634
|
-
disabledSeconds: (
|
|
18633
|
+
disabledMinutes: (N) => F && N === g.hour() ? C.filter((j) => j < g.minute()) : I && N === f.hour() ? C.filter((j) => j > f.minute()) : [],
|
|
18634
|
+
disabledSeconds: (N, j) => F && N === g.hour() && j === g.minute() ? C.filter((O) => O < g.second()) : I && N === f.hour() && j === f.minute() ? C.filter((O) => O > f.second()) : []
|
|
18635
18635
|
};
|
|
18636
18636
|
};
|
|
18637
18637
|
a(() => b), c(() => S);
|
|
@@ -19473,13 +19473,13 @@ const ParentCollectionProvider = (e) => {
|
|
|
19473
19473
|
collectionField: e,
|
|
19474
19474
|
noDisabled: r,
|
|
19475
19475
|
targetFieldSchema: i
|
|
19476
|
-
}), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord:
|
|
19476
|
+
}), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: N } = useCurrentParentRecordVariable({
|
|
19477
19477
|
schema: n,
|
|
19478
19478
|
collectionName: c,
|
|
19479
19479
|
collectionField: e,
|
|
19480
19480
|
noDisabled: r,
|
|
19481
19481
|
targetFieldSchema: i
|
|
19482
|
-
}), { urlSearchParamsSettings: j, shouldDisplay:
|
|
19482
|
+
}), { urlSearchParamsSettings: j, shouldDisplay: O } = useURLSearchParamsVariable();
|
|
19483
19483
|
return useMemo(() => [
|
|
19484
19484
|
u,
|
|
19485
19485
|
d,
|
|
@@ -19489,10 +19489,10 @@ const ParentCollectionProvider = (e) => {
|
|
|
19489
19489
|
C && f,
|
|
19490
19490
|
S && b,
|
|
19491
19491
|
v && y,
|
|
19492
|
-
|
|
19492
|
+
N && D,
|
|
19493
19493
|
I && F,
|
|
19494
19494
|
T && R,
|
|
19495
|
-
|
|
19495
|
+
O && j
|
|
19496
19496
|
].filter(Boolean).filter(l), [
|
|
19497
19497
|
u,
|
|
19498
19498
|
d,
|
|
@@ -19506,11 +19506,11 @@ const ParentCollectionProvider = (e) => {
|
|
|
19506
19506
|
b,
|
|
19507
19507
|
v,
|
|
19508
19508
|
y,
|
|
19509
|
-
|
|
19509
|
+
N,
|
|
19510
19510
|
D,
|
|
19511
19511
|
I,
|
|
19512
19512
|
F,
|
|
19513
|
-
|
|
19513
|
+
O,
|
|
19514
19514
|
j
|
|
19515
19515
|
]);
|
|
19516
19516
|
}, RemoveConditionContext = createContext(null);
|
|
@@ -21608,7 +21608,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21608
21608
|
useEffect(() => {
|
|
21609
21609
|
D.setInitialValues(cloneDeep$1(r));
|
|
21610
21610
|
}, [JSON.stringify(r || {})]);
|
|
21611
|
-
const
|
|
21611
|
+
const N = useCallback(() => {
|
|
21612
21612
|
h(!1), D.reset();
|
|
21613
21613
|
}, [D]), j = useCallback(() => V(void 0, null, function* () {
|
|
21614
21614
|
yield D.submit();
|
|
@@ -21618,7 +21618,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21618
21618
|
} catch (M) {
|
|
21619
21619
|
console.error(M);
|
|
21620
21620
|
}
|
|
21621
|
-
}), [D, n]),
|
|
21621
|
+
}), [D, n]), O = useCallback(() => V(void 0, null, function* () {
|
|
21622
21622
|
!g && (a != null && a["x-uid"]) && (b["x-action-settings"].schemaUid = a["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: a }), f(a["x-uid"])), typeof i == "function" && (i == null || i()), S.setVisible(!1), h(!0);
|
|
21623
21623
|
}), [F, S, y, b, a, g]), B = useCallback((M) => M.stopPropagation(), []);
|
|
21624
21624
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
|
|
@@ -21627,7 +21627,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21627
21627
|
P(x({
|
|
21628
21628
|
title: v(t)
|
|
21629
21629
|
}, p), {
|
|
21630
|
-
onClick:
|
|
21630
|
+
onClick: O,
|
|
21631
21631
|
onKeyDown: B,
|
|
21632
21632
|
children: e.children || e.title
|
|
21633
21633
|
})
|
|
@@ -21641,10 +21641,10 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21641
21641
|
}, p), {
|
|
21642
21642
|
destroyOnClose: !0,
|
|
21643
21643
|
open: m,
|
|
21644
|
-
onCancel:
|
|
21644
|
+
onCancel: N,
|
|
21645
21645
|
zIndex: T,
|
|
21646
21646
|
footer: /* @__PURE__ */ jsxs(Space$1, { children: [
|
|
21647
|
-
/* @__PURE__ */ jsx(Button, { onClick:
|
|
21647
|
+
/* @__PURE__ */ jsx(Button, { onClick: N, children: C("Cancel") }),
|
|
21648
21648
|
/* @__PURE__ */ jsx(Button, { type: "primary", onClick: j, children: C("Submit") })
|
|
21649
21649
|
] }),
|
|
21650
21650
|
children: /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "form", getActiveFieldsName: I == null ? void 0 : I.getActiveFieldsName, children: /* @__PURE__ */ jsx(FormProvider, { form: D, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
|
|
@@ -21685,7 +21685,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21685
21685
|
"width",
|
|
21686
21686
|
"noRecord",
|
|
21687
21687
|
"ModalContextProvider"
|
|
21688
|
-
]), 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(),
|
|
21688
|
+
]), 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(), N = useFormBlockContext(), j = useBlockContext(), { getOperators: O } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), L = useParentPopupRecord();
|
|
21689
21689
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21690
21690
|
SchemaSettingsItem,
|
|
21691
21691
|
P(x({
|
|
@@ -21695,7 +21695,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21695
21695
|
const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21696
21696
|
FormDialog(
|
|
21697
21697
|
{ title: G.title || n, width: u },
|
|
21698
|
-
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators:
|
|
21698
|
+
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: O(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
|
|
21699
21699
|
VariablePopupRecordProvider,
|
|
21700
21700
|
{
|
|
21701
21701
|
recordData: z == null ? void 0 : z.value,
|
|
@@ -21704,7 +21704,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21704
21704
|
recordData: L == null ? void 0 : L.value,
|
|
21705
21705
|
collection: L == null ? void 0 : L.collection
|
|
21706
21706
|
},
|
|
21707
|
-
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value:
|
|
21707
|
+
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: M, collection: $, parent: k }, children: /* @__PURE__ */ jsx(
|
|
21708
21708
|
FormActiveFieldsProvider,
|
|
21709
21709
|
{
|
|
21710
21710
|
name: "form",
|
|
@@ -21884,11 +21884,11 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21884
21884
|
}
|
|
21885
21885
|
}),
|
|
21886
21886
|
[n, a, l, b, m, h, u, p, I, r]
|
|
21887
|
-
), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []),
|
|
21888
|
-
(
|
|
21887
|
+
), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), N = useCallback(
|
|
21888
|
+
(O) => {
|
|
21889
21889
|
var k;
|
|
21890
21890
|
const B = [];
|
|
21891
|
-
for (const z of
|
|
21891
|
+
for (const z of O.fieldReaction.rules)
|
|
21892
21892
|
B.push(_.pickBy(z, _.identity));
|
|
21893
21893
|
const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), $ = {
|
|
21894
21894
|
"x-uid": w && d(w).uid || b["x-uid"]
|
|
@@ -21899,7 +21899,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21899
21899
|
},
|
|
21900
21900
|
[c, d, b, F, i]
|
|
21901
21901
|
);
|
|
21902
|
-
return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit:
|
|
21902
|
+
return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: N });
|
|
21903
21903
|
}, useDataTemplates = (e) => {
|
|
21904
21904
|
const t = useFieldSchema();
|
|
21905
21905
|
if (e)
|
|
@@ -22557,17 +22557,17 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
|
|
|
22557
22557
|
}
|
|
22558
22558
|
},
|
|
22559
22559
|
onSubmit: (D) => {
|
|
22560
|
-
const
|
|
22560
|
+
const N = {
|
|
22561
22561
|
"x-uid": n["x-uid"]
|
|
22562
22562
|
};
|
|
22563
|
-
(o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0,
|
|
22563
|
+
(o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0, N.default = void 0), N["x-component-props"] = o.componentProps || {}, n["x-component-props"] = x(x({}, o.componentProps || {}), D), N["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
|
|
22564
22564
|
const j = o.path.entire.split(".");
|
|
22565
22565
|
j.pop();
|
|
22566
|
-
const
|
|
22567
|
-
o.query(`${
|
|
22566
|
+
const O = j.join(".");
|
|
22567
|
+
o.query(`${O}.*[0:].${n.name}`).forEach((B) => {
|
|
22568
22568
|
B.props.name === n.name && ((o.componentProps.picker || "date") !== D.picker && !m && (B.value = void 0, B.initialValue = void 0), B.setComponentProps(x({}, D)));
|
|
22569
22569
|
}), r.emit("patch", {
|
|
22570
|
-
schema:
|
|
22570
|
+
schema: N
|
|
22571
22571
|
}), r.refresh();
|
|
22572
22572
|
}
|
|
22573
22573
|
}
|
|
@@ -22596,7 +22596,7 @@ const getActionContext = (e) => {
|
|
|
22596
22596
|
R != null && R.target && (u = p(
|
|
22597
22597
|
`${R.target}.${((L = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"}`
|
|
22598
22598
|
));
|
|
22599
|
-
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o),
|
|
22599
|
+
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), N = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), O = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
|
|
22600
22600
|
(q) => {
|
|
22601
22601
|
const E = q.find((U) => U.value === "$nForm"), G = m(I);
|
|
22602
22602
|
return !(G != null && G.length) && E && (E.children = formatVariableScop(y())), q;
|
|
@@ -22621,7 +22621,7 @@ const getActionContext = (e) => {
|
|
|
22621
22621
|
"x-component": "VariableInput",
|
|
22622
22622
|
"x-component-props": P(x({}, (o == null ? void 0 : o["x-component-props"]) || {}), {
|
|
22623
22623
|
collectionField: R,
|
|
22624
|
-
contextCollectionName:
|
|
22624
|
+
contextCollectionName: O ? c : "",
|
|
22625
22625
|
schema: R == null ? void 0 : R.uiSchema,
|
|
22626
22626
|
targetFieldSchema: o,
|
|
22627
22627
|
className: defaultInputStyle,
|
|
@@ -22669,7 +22669,7 @@ const getActionContext = (e) => {
|
|
|
22669
22669
|
T,
|
|
22670
22670
|
S,
|
|
22671
22671
|
h,
|
|
22672
|
-
|
|
22672
|
+
O,
|
|
22673
22673
|
f,
|
|
22674
22674
|
b,
|
|
22675
22675
|
B,
|
|
@@ -23390,7 +23390,7 @@ const useGetFilterOptions = () => {
|
|
|
23390
23390
|
if (t > 2)
|
|
23391
23391
|
return u;
|
|
23392
23392
|
if (l != null && l.length && (u.children = l), a) {
|
|
23393
|
-
const m =
|
|
23393
|
+
const m = o.getDataSource(e.dataSourceKey).collectionManager.getCollectionFields(e.target), h = getOptions$1(m, t + 1, n, o).filter(
|
|
23394
23394
|
Boolean
|
|
23395
23395
|
);
|
|
23396
23396
|
u.children = u.children || [], u.children.push(...h);
|
|
@@ -23400,13 +23400,15 @@ const useGetFilterOptions = () => {
|
|
|
23400
23400
|
}, getOptions$1 = (e, t, n, o, r) => {
|
|
23401
23401
|
const i = [];
|
|
23402
23402
|
return e.forEach((a) => {
|
|
23403
|
-
const l = field2option(a, t, n, o
|
|
23403
|
+
const l = field2option(a, t, n, o);
|
|
23404
23404
|
l && i.push(l);
|
|
23405
23405
|
}), i;
|
|
23406
23406
|
}, useFilterFieldOptions = (e) => {
|
|
23407
|
-
var
|
|
23408
|
-
const t = useFieldSchema(), n = ((
|
|
23409
|
-
|
|
23407
|
+
var r;
|
|
23408
|
+
const t = useFieldSchema(), n = ((r = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : r.nonfilterable) || [];
|
|
23409
|
+
useCollectionManager();
|
|
23410
|
+
const o = useDataSourceManager();
|
|
23411
|
+
return getOptions$1(e, 1, n, o);
|
|
23410
23412
|
}, isEmpty = (e) => Array.isArray(e) && e.length === 0 || e && Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype, removeNullCondition = (e, t = flat) => {
|
|
23411
23413
|
const n = t(e || {}), o = {};
|
|
23412
23414
|
for (const r in n) {
|
|
@@ -23480,13 +23482,13 @@ const useGetFilterOptions = () => {
|
|
|
23480
23482
|
};
|
|
23481
23483
|
});
|
|
23482
23484
|
}, TableColumnDesigner$1 = (e) => {
|
|
23483
|
-
var j,
|
|
23484
|
-
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) || ((
|
|
23485
|
+
var j, O, B, w, M, $, k, z, L, q, E, G;
|
|
23486
|
+
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) || ((O = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : O.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(
|
|
23485
23487
|
o == null ? void 0 : o.interface
|
|
23486
23488
|
), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
|
|
23487
23489
|
let T = "editable";
|
|
23488
23490
|
n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
|
|
23489
|
-
const D = F && R === "Select",
|
|
23491
|
+
const D = F && R === "Select", N = () => {
|
|
23490
23492
|
const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
|
|
23491
23493
|
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
|
|
23492
23494
|
};
|
|
@@ -23568,7 +23570,7 @@ const useGetFilterOptions = () => {
|
|
|
23568
23570
|
}
|
|
23569
23571
|
}
|
|
23570
23572
|
),
|
|
23571
|
-
/* @__PURE__ */ jsx(
|
|
23573
|
+
/* @__PURE__ */ jsx(N, {}),
|
|
23572
23574
|
g && g.sortable === !0 && !S && /* @__PURE__ */ jsx(
|
|
23573
23575
|
SchemaSettingsSwitchItem,
|
|
23574
23576
|
{
|
|
@@ -24660,10 +24662,7 @@ function HTMLEncode(e) {
|
|
|
24660
24662
|
}
|
|
24661
24663
|
const ReadPretty$c = () => null;
|
|
24662
24664
|
ReadPretty$c.Input = (e) => {
|
|
24663
|
-
const t = usePrefixCls$1("description-input", e), n = useCompile(), o = useMemo(
|
|
24664
|
-
() => e.value && typeof e.value == "object" ? JSON.stringify(e.value) : n(e.value),
|
|
24665
|
-
[e.value]
|
|
24666
|
-
);
|
|
24665
|
+
const t = usePrefixCls$1("description-input", e), n = useCompile(), o = useMemo(() => Array.isArray(e.value) ? e.value.join(",") : e.value && typeof e.value == "object" ? JSON.stringify(e.value) : n(e.value), [e.value]);
|
|
24667
24666
|
return /* @__PURE__ */ jsxs(
|
|
24668
24667
|
"div",
|
|
24669
24668
|
{
|
|
@@ -25549,9 +25548,9 @@ function Input$1(e) {
|
|
|
25549
25548
|
hideVariableButton: m
|
|
25550
25549
|
} = e, h = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: g, hashId: f, componentCls: C, rootPrefixCls: b } = useStyles$a({ hideVariableButton: m });
|
|
25551
25550
|
useAntdInputStyle(`${b}-input`);
|
|
25552
|
-
const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D,
|
|
25551
|
+
const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D, N] = React.useState(
|
|
25553
25552
|
m || !!(o && t != null)
|
|
25554
|
-
), j = useMemo(() => parseValue(t, p), [p, t]),
|
|
25553
|
+
), j = useMemo(() => parseValue(t, p), [p, t]), O = typeof j == "string", B = O ? j : "", w = O ? null : j, M = Object.assign(
|
|
25555
25554
|
{
|
|
25556
25555
|
label: "label",
|
|
25557
25556
|
value: "value",
|
|
@@ -25598,10 +25597,10 @@ function Input$1(e) {
|
|
|
25598
25597
|
(W, X) => {
|
|
25599
25598
|
var ee, Z, ne;
|
|
25600
25599
|
if (W[0] === "$") {
|
|
25601
|
-
|
|
25600
|
+
N(!0), w && n(null, X);
|
|
25602
25601
|
return;
|
|
25603
25602
|
} else
|
|
25604
|
-
|
|
25603
|
+
N(!1);
|
|
25605
25604
|
if (W[0] === "") {
|
|
25606
25605
|
n(null);
|
|
25607
25606
|
return;
|
|
@@ -25615,7 +25614,7 @@ function Input$1(e) {
|
|
|
25615
25614
|
[B, w, n]
|
|
25616
25615
|
), G = useCallback(() => {
|
|
25617
25616
|
var W;
|
|
25618
|
-
if (
|
|
25617
|
+
if (N(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
|
|
25619
25618
|
const X = $.children[0].default();
|
|
25620
25619
|
return n(X);
|
|
25621
25620
|
}
|
|
@@ -25909,7 +25908,7 @@ function TextArea(e) {
|
|
|
25909
25908
|
[l, g]
|
|
25910
25909
|
), [S, y] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
25911
25910
|
useAntdInputStyle("ant-input");
|
|
25912
|
-
const { token:
|
|
25911
|
+
const { token: N } = theme.useToken(), j = c.join(" "), O = useCallback(
|
|
25913
25912
|
(E) => {
|
|
25914
25913
|
var U;
|
|
25915
25914
|
const G = getValue(E, c);
|
|
@@ -25957,14 +25956,14 @@ function TextArea(e) {
|
|
|
25957
25956
|
const H = createVariableTagHTML(G.join("."), b);
|
|
25958
25957
|
pasteHTML(U, H, {
|
|
25959
25958
|
range: T
|
|
25960
|
-
}), F(!0), D(getCurrentRange(U)),
|
|
25959
|
+
}), F(!0), D(getCurrentRange(U)), O(U);
|
|
25961
25960
|
},
|
|
25962
|
-
[b,
|
|
25961
|
+
[b, O, T]
|
|
25963
25962
|
), w = useCallback(
|
|
25964
25963
|
function({ currentTarget: E }) {
|
|
25965
|
-
S || (F(!0), D(getCurrentRange(E)),
|
|
25964
|
+
S || (F(!0), D(getCurrentRange(E)), O(E));
|
|
25966
25965
|
},
|
|
25967
|
-
[S,
|
|
25966
|
+
[S, O]
|
|
25968
25967
|
), M = useCallback(function({ currentTarget: E }) {
|
|
25969
25968
|
D(getCurrentRange(E));
|
|
25970
25969
|
}, []), $ = useCallback(function(E) {
|
|
@@ -25973,9 +25972,9 @@ function TextArea(e) {
|
|
|
25973
25972
|
y(!0);
|
|
25974
25973
|
}, []), z = useCallback(
|
|
25975
25974
|
({ currentTarget: E }) => {
|
|
25976
|
-
y(!1), F(!0), D(getCurrentRange(E)),
|
|
25975
|
+
y(!1), F(!0), D(getCurrentRange(E)), O(E);
|
|
25977
25976
|
},
|
|
25978
|
-
[
|
|
25977
|
+
[O]
|
|
25979
25978
|
), L = useCallback(
|
|
25980
25979
|
function(E) {
|
|
25981
25980
|
E.preventDefault();
|
|
@@ -25996,9 +25995,9 @@ function TextArea(e) {
|
|
|
25996
25995
|
}
|
|
25997
25996
|
}
|
|
25998
25997
|
}).replace(/\n/g, " ");
|
|
25999
|
-
F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)),
|
|
25998
|
+
F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), O(E.currentTarget);
|
|
26000
25999
|
},
|
|
26001
|
-
[
|
|
26000
|
+
[O]
|
|
26002
26001
|
), q = e.disabled || C.disabled;
|
|
26003
26002
|
return t(
|
|
26004
26003
|
/* @__PURE__ */ jsxs(
|
|
@@ -26061,7 +26060,7 @@ function TextArea(e) {
|
|
|
26061
26060
|
{ "ant-input-disabled": q },
|
|
26062
26061
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
26063
26062
|
css`
|
|
26064
|
-
min-height: ${
|
|
26063
|
+
min-height: ${N.controlHeight}px;
|
|
26065
26064
|
overflow: auto;
|
|
26066
26065
|
white-space: pre-wrap;
|
|
26067
26066
|
|
|
@@ -27510,12 +27509,12 @@ function useCollectValuesToSubmit() {
|
|
|
27510
27509
|
resource: o,
|
|
27511
27510
|
actionFields: (d == null ? void 0 : d("form")) || []
|
|
27512
27511
|
}), S = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
|
|
27513
|
-
const
|
|
27514
|
-
if (isVariable$1(
|
|
27515
|
-
const { value:
|
|
27516
|
-
|
|
27512
|
+
const N = f[D], j = i(D);
|
|
27513
|
+
if (isVariable$1(N)) {
|
|
27514
|
+
const { value: O } = (yield p == null ? void 0 : p.parseVariable(N, m)) || {};
|
|
27515
|
+
O != null && (S[D] = transformVariableValue(O, { targetCollectionField: j }));
|
|
27517
27516
|
} else
|
|
27518
|
-
|
|
27517
|
+
N !== "" && (S[D] = N);
|
|
27519
27518
|
}));
|
|
27520
27519
|
if (yield Promise.all(y), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
|
|
27521
27520
|
const D = a();
|
|
@@ -27546,29 +27545,29 @@ const useCreateActionProps = () => {
|
|
|
27546
27545
|
onClick() {
|
|
27547
27546
|
return V(this, null, function* () {
|
|
27548
27547
|
var B;
|
|
27549
|
-
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:
|
|
27548
|
+
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: N, actionAfterSuccess: j } = v || {};
|
|
27550
27549
|
F || (yield n.submit());
|
|
27551
|
-
const
|
|
27550
|
+
const O = yield f();
|
|
27552
27551
|
d.data = o.data || {}, d.data.loading = !0;
|
|
27553
27552
|
try {
|
|
27554
27553
|
const w = yield r[C]({
|
|
27555
|
-
values:
|
|
27554
|
+
values: O,
|
|
27556
27555
|
filterKeys: b,
|
|
27557
27556
|
filterByTk: e,
|
|
27558
27557
|
// TODO(refactor): should change to inject by plugin
|
|
27559
27558
|
triggerWorkflows: I != null && I.length ? I.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0,
|
|
27560
27559
|
updateAssociationValues: g
|
|
27561
27560
|
});
|
|
27562
|
-
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, !
|
|
27561
|
+
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, !N) {
|
|
27563
27562
|
message.success(h("Saved successfully")), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
|
|
27564
27563
|
return;
|
|
27565
27564
|
}
|
|
27566
27565
|
R ? m.success({
|
|
27567
|
-
title: p(
|
|
27566
|
+
title: p(N),
|
|
27568
27567
|
onOk: () => V(this, null, function* () {
|
|
27569
27568
|
yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
|
|
27570
27569
|
})
|
|
27571
|
-
}) : (message.success(p(
|
|
27570
|
+
}) : (message.success(p(N)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
|
|
27572
27571
|
} catch (w) {
|
|
27573
27572
|
d.data.loading = !1;
|
|
27574
27573
|
}
|
|
@@ -27585,9 +27584,9 @@ const useCreateActionProps = () => {
|
|
|
27585
27584
|
const R = u.map((H) => H.name), {
|
|
27586
27585
|
assignedValues: T = {},
|
|
27587
27586
|
onSuccess: D,
|
|
27588
|
-
overwriteValues:
|
|
27587
|
+
overwriteValues: N,
|
|
27589
27588
|
skipValidator: j,
|
|
27590
|
-
triggerWorkflows:
|
|
27589
|
+
triggerWorkflows: O
|
|
27591
27590
|
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (L = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : L.addChild, { successMessage: w } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
|
|
27592
27591
|
const J = T[H], K = d(H);
|
|
27593
27592
|
if (isVariable$1(J)) {
|
|
@@ -27613,10 +27612,10 @@ const useCreateActionProps = () => {
|
|
|
27613
27612
|
c.data = t.data || {}, c.data.loading = !0;
|
|
27614
27613
|
try {
|
|
27615
27614
|
const H = yield n[y]({
|
|
27616
|
-
values: x(x(x({}, k),
|
|
27615
|
+
values: x(x(x({}, k), N), M),
|
|
27617
27616
|
filterKeys: v,
|
|
27618
27617
|
// TODO(refactor): should change to inject by plugin
|
|
27619
|
-
triggerWorkflows:
|
|
27618
|
+
triggerWorkflows: O != null && O.length ? O.map((J) => [J.workflowKey, J.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27620
27619
|
});
|
|
27621
27620
|
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)
|
|
27622
27621
|
return;
|
|
@@ -27679,8 +27678,8 @@ const useCreateActionProps = () => {
|
|
|
27679
27678
|
return useEffect(() => {
|
|
27680
27679
|
setTimeout(() => {
|
|
27681
27680
|
u({ doNothingWhenFilterIsEmpty: !0 });
|
|
27682
|
-
},
|
|
27683
|
-
}, [
|
|
27681
|
+
}, 500);
|
|
27682
|
+
}, [u]), {
|
|
27684
27683
|
/**
|
|
27685
27684
|
* 用于执行筛选表单的筛选操作
|
|
27686
27685
|
*/
|
|
@@ -27727,23 +27726,23 @@ const useCreateActionProps = () => {
|
|
|
27727
27726
|
return {
|
|
27728
27727
|
onClick(f, C) {
|
|
27729
27728
|
return V(this, null, function* () {
|
|
27730
|
-
var
|
|
27729
|
+
var O, B, w;
|
|
27731
27730
|
const {
|
|
27732
27731
|
assignedValues: b = {},
|
|
27733
27732
|
onSuccess: S,
|
|
27734
27733
|
skipValidator: y,
|
|
27735
27734
|
triggerWorkflows: v
|
|
27736
|
-
} = (
|
|
27735
|
+
} = (O = r == null ? void 0 : r["x-action-settings"]) != null ? O : {}, { manualClose: F, redirecting: I, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, N = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
|
|
27737
27736
|
const $ = b[M], k = m(M);
|
|
27738
27737
|
if (isVariable$1($)) {
|
|
27739
27738
|
const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
|
|
27740
|
-
z && (
|
|
27739
|
+
z && (N[M] = transformVariableValue(z, { targetCollectionField: k }));
|
|
27741
27740
|
} else
|
|
27742
|
-
$ !== "" && (
|
|
27741
|
+
$ !== "" && (N[M] = $);
|
|
27743
27742
|
}));
|
|
27744
27743
|
yield Promise.all(j), y === !1 && (yield l.submit()), yield e.update({
|
|
27745
27744
|
filterByTk: o,
|
|
27746
|
-
values: x({},
|
|
27745
|
+
values: x({}, N),
|
|
27747
27746
|
// TODO(refactor): should change to inject by plugin
|
|
27748
27747
|
triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27749
27748
|
}), (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({
|
|
@@ -27767,8 +27766,8 @@ const useCreateActionProps = () => {
|
|
|
27767
27766
|
const {
|
|
27768
27767
|
assignedValues: T = {},
|
|
27769
27768
|
onSuccess: D,
|
|
27770
|
-
updateMode:
|
|
27771
|
-
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting:
|
|
27769
|
+
updateMode: N
|
|
27770
|
+
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: O, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
|
|
27772
27771
|
m.data = e.data || {}, m.data.loading = !0;
|
|
27773
27772
|
const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
|
|
27774
27773
|
const E = T[q], G = C(q);
|
|
@@ -27778,9 +27777,9 @@ const useCreateActionProps = () => {
|
|
|
27778
27777
|
} else
|
|
27779
27778
|
E !== "" && ($[q] = E);
|
|
27780
27779
|
}));
|
|
27781
|
-
yield Promise.all(k), (M === "previous" || !M &&
|
|
27780
|
+
yield Promise.all(k), (M === "previous" || !M && O !== !0) && (S == null || S(!1)), h.confirm({
|
|
27782
27781
|
title: p("Bulk update"),
|
|
27783
|
-
content: p(
|
|
27782
|
+
content: p(N === "selected" ? "Update selected data?" : "Update all data?"),
|
|
27784
27783
|
onOk() {
|
|
27785
27784
|
return V(this, null, function* () {
|
|
27786
27785
|
var G, U, H, J;
|
|
@@ -27789,7 +27788,7 @@ const useCreateActionProps = () => {
|
|
|
27789
27788
|
filter: q,
|
|
27790
27789
|
forceUpdate: !1
|
|
27791
27790
|
};
|
|
27792
|
-
if (
|
|
27791
|
+
if (N === "selected") {
|
|
27793
27792
|
if (!(c != null && c.length)) {
|
|
27794
27793
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
27795
27794
|
return;
|
|
@@ -27806,9 +27805,9 @@ const useCreateActionProps = () => {
|
|
|
27806
27805
|
t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), w && (j ? h.success({
|
|
27807
27806
|
title: d(w),
|
|
27808
27807
|
onOk: () => V(this, null, function* () {
|
|
27809
|
-
(
|
|
27808
|
+
(O && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
|
|
27810
27809
|
})
|
|
27811
|
-
}) : (message.success(d(w)), (
|
|
27810
|
+
}) : (message.success(d(w)), (O && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
|
|
27812
27811
|
});
|
|
27813
27812
|
},
|
|
27814
27813
|
onCancel() {
|
|
@@ -27827,7 +27826,7 @@ const useCreateActionProps = () => {
|
|
|
27827
27826
|
onClick() {
|
|
27828
27827
|
return V(this, null, function* () {
|
|
27829
27828
|
var q, E, G, U;
|
|
27830
|
-
const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting:
|
|
27829
|
+
const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: N, redirectTo: j, successMessage: O, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
|
|
27831
27830
|
if (!T.url)
|
|
27832
27831
|
return;
|
|
27833
27832
|
I !== !0 && w === "customize:form:request" && (yield i.submit());
|
|
@@ -27853,12 +27852,12 @@ const useCreateActionProps = () => {
|
|
|
27853
27852
|
};
|
|
27854
27853
|
f.data = c.data || {}, f.data.loading = !0;
|
|
27855
27854
|
try {
|
|
27856
|
-
yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B &&
|
|
27857
|
-
title: r(
|
|
27855
|
+
yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B && N !== !0) && (b == null || b(!1)), O || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (N && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
|
|
27856
|
+
title: r(O),
|
|
27858
27857
|
onOk: () => V(this, null, function* () {
|
|
27859
|
-
(
|
|
27858
|
+
(N && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
|
|
27860
27859
|
})
|
|
27861
|
-
}) : message.success(r(
|
|
27860
|
+
}) : message.success(r(O));
|
|
27862
27861
|
} finally {
|
|
27863
27862
|
f.data.loading = !1;
|
|
27864
27863
|
}
|
|
@@ -27875,9 +27874,9 @@ const useCreateActionProps = () => {
|
|
|
27875
27874
|
assignedValues: R = {},
|
|
27876
27875
|
onSuccess: T,
|
|
27877
27876
|
overwriteValues: D,
|
|
27878
|
-
skipValidator:
|
|
27877
|
+
skipValidator: N,
|
|
27879
27878
|
triggerWorkflows: j
|
|
27880
|
-
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose:
|
|
27879
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: O, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
|
|
27881
27880
|
const U = R[G], H = d(G);
|
|
27882
27881
|
if (isVariable$1(U)) {
|
|
27883
27882
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
@@ -27885,7 +27884,7 @@ const useCreateActionProps = () => {
|
|
|
27885
27884
|
} else
|
|
27886
27885
|
U !== "" && (k[G] = U);
|
|
27887
27886
|
}));
|
|
27888
|
-
yield Promise.all(z),
|
|
27887
|
+
yield Promise.all(z), N || (yield e.submit());
|
|
27889
27888
|
const L = u.map((G) => G.name), q = getFormValues({
|
|
27890
27889
|
filterByTk: t,
|
|
27891
27890
|
field: n,
|
|
@@ -27906,7 +27905,7 @@ const useCreateActionProps = () => {
|
|
|
27906
27905
|
triggerWorkflows: j != null && j.length ? j.map((G) => [G.workflowKey, G.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27907
27906
|
})), h.data.loading = !1, I && (I == null || I()), ($ === "previous" || !$ && B !== !0) && (i == null || i(!1)), a == null || a(!1), !M)
|
|
27908
27907
|
return;
|
|
27909
|
-
|
|
27908
|
+
O ? f.success({
|
|
27910
27909
|
title: m(M),
|
|
27911
27910
|
onOk: () => V(this, null, function* () {
|
|
27912
27911
|
yield e.reset(), (B && !$ || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
|
|
@@ -28070,7 +28069,7 @@ const useCreateActionProps = () => {
|
|
|
28070
28069
|
/** 渲染 Collapse 的列表数据 */
|
|
28071
28070
|
list: (d == null ? void 0 : d.data) || [],
|
|
28072
28071
|
onSelected: (F) => {
|
|
28073
|
-
var R, T, D,
|
|
28072
|
+
var R, T, D, N;
|
|
28074
28073
|
const I = ((T = (R = t.params) == null ? void 0 : R[1]) == null ? void 0 : T.filters) || {};
|
|
28075
28074
|
F.length ? I[`af.${c}`] = {
|
|
28076
28075
|
[`${c}.${i}.$in`]: F
|
|
@@ -28078,7 +28077,7 @@ const useCreateActionProps = () => {
|
|
|
28078
28077
|
P(x({}, (D = t.params) == null ? void 0 : D[0]), {
|
|
28079
28078
|
pageSize: 200,
|
|
28080
28079
|
page: 1,
|
|
28081
|
-
filter: mergeFilter([...Object.values(I), (
|
|
28080
|
+
filter: mergeFilter([...Object.values(I), (N = n == null ? void 0 : n.params) == null ? void 0 : N.filter])
|
|
28082
28081
|
}),
|
|
28083
28082
|
{ filters: I }
|
|
28084
28083
|
);
|
|
@@ -28100,7 +28099,7 @@ const useCreateActionProps = () => {
|
|
|
28100
28099
|
var n;
|
|
28101
28100
|
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);
|
|
28102
28101
|
}, useAssociationFilterBlockProps = () => {
|
|
28103
|
-
var v, F, I, R, T, D,
|
|
28102
|
+
var v, F, I, R, T, D, N, j, O, B;
|
|
28104
28103
|
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 });
|
|
28105
28104
|
let p, m, h, g, f, C, b, S;
|
|
28106
28105
|
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(
|
|
@@ -28128,8 +28127,8 @@ const useCreateActionProps = () => {
|
|
|
28128
28127
|
b,
|
|
28129
28128
|
g,
|
|
28130
28129
|
C,
|
|
28131
|
-
(
|
|
28132
|
-
(
|
|
28130
|
+
(N = i.componentProps) == null ? void 0 : N.params,
|
|
28131
|
+
(O = (j = i.componentProps) == null ? void 0 : j.params) == null ? void 0 : O.sort,
|
|
28133
28132
|
d
|
|
28134
28133
|
]);
|
|
28135
28134
|
const y = useCallback(
|
|
@@ -28463,42 +28462,42 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28463
28462
|
return T;
|
|
28464
28463
|
if (S > y)
|
|
28465
28464
|
return [];
|
|
28466
|
-
const D = r(C).map((
|
|
28465
|
+
const D = r(C).map((N) => {
|
|
28467
28466
|
var w;
|
|
28468
|
-
if (b.includes(
|
|
28467
|
+
if (b.includes(N.name) || !N.interface || ["sort", "password", "sequence"].includes(N.type))
|
|
28469
28468
|
return;
|
|
28470
28469
|
const j = {
|
|
28471
28470
|
type: "duplicate",
|
|
28472
|
-
tag: c((w =
|
|
28473
|
-
},
|
|
28471
|
+
tag: c((w = N.uiSchema) == null ? void 0 : w.title) || N.name
|
|
28472
|
+
}, O = P(x({}, j), {
|
|
28474
28473
|
title: React.createElement(TreeNode, j),
|
|
28475
|
-
key: v ? `${v}.${
|
|
28474
|
+
key: v ? `${v}.${N.name}` : N.name,
|
|
28476
28475
|
isLeaf: !0,
|
|
28477
|
-
field:
|
|
28476
|
+
field: N,
|
|
28478
28477
|
disabled: F
|
|
28479
|
-
}), B = I.find((M) => M.name ===
|
|
28480
|
-
if (["belongsTo", "belongsToMany"].includes(
|
|
28481
|
-
j.type = "reference",
|
|
28478
|
+
}), B = I.find((M) => M.name === O.key);
|
|
28479
|
+
if (["belongsTo", "belongsToMany"].includes(N.type) && (!B || ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode)))
|
|
28480
|
+
j.type = "reference", O.type = "reference", O.title = React.createElement(TreeNode, P(x({}, j), { type: "reference" })), O.isLeaf = !1, O.children = m(N.target, {
|
|
28482
28481
|
depth: S + 1,
|
|
28483
28482
|
maxDepth: y,
|
|
28484
|
-
prefix:
|
|
28483
|
+
prefix: O.key,
|
|
28485
28484
|
exclude: systemKeys
|
|
28486
28485
|
});
|
|
28487
|
-
else if (["hasOne", "hasMany"].includes(
|
|
28486
|
+
else if (["hasOne", "hasMany"].includes(N.type) || ["Nester", "SubTable"].includes(B == null ? void 0 : B.fieldMode)) {
|
|
28488
28487
|
let M = !1;
|
|
28489
|
-
["hasOne", "hasMany"].includes(
|
|
28490
|
-
|
|
28488
|
+
["hasOne", "hasMany"].includes(N.type) && ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode) && (M = !0), O.disabled = !0, O.isLeaf = !1, O.children = p(
|
|
28489
|
+
N.target,
|
|
28491
28490
|
{
|
|
28492
28491
|
depth: S + 1,
|
|
28493
28492
|
maxDepth: y,
|
|
28494
|
-
prefix:
|
|
28493
|
+
prefix: O.key,
|
|
28495
28494
|
exclude: ["id", ...systemKeys],
|
|
28496
28495
|
disabled: M
|
|
28497
28496
|
},
|
|
28498
28497
|
I
|
|
28499
28498
|
);
|
|
28500
28499
|
}
|
|
28501
|
-
return
|
|
28500
|
+
return O;
|
|
28502
28501
|
}).filter(Boolean);
|
|
28503
28502
|
return f.set(R, D), D;
|
|
28504
28503
|
})(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
|
|
@@ -28508,22 +28507,22 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28508
28507
|
if (y > S)
|
|
28509
28508
|
return [];
|
|
28510
28509
|
const R = r(C).map((T) => {
|
|
28511
|
-
var j,
|
|
28510
|
+
var j, O;
|
|
28512
28511
|
if (!T.target || !T.interface || v.includes(T.name))
|
|
28513
28512
|
return;
|
|
28514
28513
|
const D = {
|
|
28515
28514
|
type: "preloading",
|
|
28516
28515
|
tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
|
|
28517
|
-
},
|
|
28516
|
+
}, N = b ? `${b}.${T.name}` : T.name;
|
|
28518
28517
|
return {
|
|
28519
28518
|
type: "preloading",
|
|
28520
|
-
tag: c((
|
|
28519
|
+
tag: c((O = T.uiSchema) == null ? void 0 : O.title) || T.name,
|
|
28521
28520
|
title: React.createElement(TreeNode, D),
|
|
28522
|
-
key:
|
|
28521
|
+
key: N,
|
|
28523
28522
|
isLeaf: !1,
|
|
28524
28523
|
field: T,
|
|
28525
28524
|
children: m(T.target, {
|
|
28526
|
-
prefix:
|
|
28525
|
+
prefix: N,
|
|
28527
28526
|
depth: y + 1,
|
|
28528
28527
|
maxDepth: S,
|
|
28529
28528
|
exclude: v
|
|
@@ -28548,8 +28547,8 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28548
28547
|
var I;
|
|
28549
28548
|
(I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
|
|
28550
28549
|
var M, $, k;
|
|
28551
|
-
const D = R || F,
|
|
28552
|
-
if (
|
|
28550
|
+
const D = R || F, N = T["x-collection-field"] && o(T["x-collection-field"]), j = T.name.includes("."), O = N && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(N.type), B = !O && j ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? B : D + "." + B;
|
|
28551
|
+
if (N && !(["hasOne", "hasMany"].includes(N.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), N && (O || j) && T["x-component"] !== "TableField") {
|
|
28553
28552
|
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)) {
|
|
28554
28553
|
const z = D && D !== "" ? D + "." + T.name : T.name;
|
|
28555
28554
|
b(T, z);
|
|
@@ -29670,9 +29669,9 @@ const useParseDefaultValue = () => {
|
|
|
29670
29669
|
if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || R)) {
|
|
29671
29670
|
e.loading = !0;
|
|
29672
29671
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
29673
|
-
value:
|
|
29672
|
+
value: N,
|
|
29674
29673
|
collectionName: j,
|
|
29675
|
-
dataSource:
|
|
29674
|
+
dataSource: O = "main"
|
|
29676
29675
|
} = yield n.parseVariable(t.default, o, {
|
|
29677
29676
|
fieldOperator: C(t.name)
|
|
29678
29677
|
});
|
|
@@ -29680,12 +29679,12 @@ const useParseDefaultValue = () => {
|
|
|
29680
29679
|
collectionName: D.target,
|
|
29681
29680
|
targetCollectionName: j,
|
|
29682
29681
|
dm: b,
|
|
29683
|
-
dataSource:
|
|
29682
|
+
dataSource: O
|
|
29684
29683
|
})) {
|
|
29685
29684
|
e.loading = !1;
|
|
29686
29685
|
return;
|
|
29687
29686
|
}
|
|
29688
|
-
const B = transformVariableValue(
|
|
29687
|
+
const B = transformVariableValue(N, {
|
|
29689
29688
|
targetCollectionField: D
|
|
29690
29689
|
});
|
|
29691
29690
|
B == null || B === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m(B) : e.setInitialValue(B), e.loading = !1;
|
|
@@ -29696,8 +29695,8 @@ const useParseDefaultValue = () => {
|
|
|
29696
29695
|
const R = getVariableName(t.default), T = S(R);
|
|
29697
29696
|
return T ? (y(), reaction(
|
|
29698
29697
|
() => {
|
|
29699
|
-
const
|
|
29700
|
-
return
|
|
29698
|
+
const N = { [R]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), O = getValuesByPath(N, j);
|
|
29699
|
+
return O === void 0 ? Math.random() : O;
|
|
29701
29700
|
},
|
|
29702
29701
|
() => v({ forceUpdate: !0 }),
|
|
29703
29702
|
{
|
|
@@ -35298,8 +35297,8 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35298
35297
|
name: "fieldSettings:component:CascadeSelect",
|
|
35299
35298
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
35300
35299
|
}), SchemaSettingsDateRange = function e(t) {
|
|
35301
|
-
var R, T, D,
|
|
35302
|
-
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 = ((
|
|
35300
|
+
var R, T, D, N, j, O, B, w, M, $, k, z, L, q, E, G;
|
|
35301
|
+
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 = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.dateFormat) || ((O = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : O.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";
|
|
35303
35302
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
35304
35303
|
const g = (L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["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(
|
|
35305
35304
|
(U) => /* @__PURE__ */ jsx(
|
|
@@ -36751,8 +36750,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36751
36750
|
const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
36752
36751
|
let I = mergeCtxWithLocalVariables(n.current, b);
|
|
36753
36752
|
const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
|
|
36754
|
-
let
|
|
36755
|
-
const { fieldPath: j } = getFieldPath$1(C, F),
|
|
36753
|
+
let N = R;
|
|
36754
|
+
const { fieldPath: j } = getFieldPath$1(C, F), O = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(j, T)) == null ? void 0 : w.target;
|
|
36756
36755
|
if (!(v in I))
|
|
36757
36756
|
throw new Error(`VariablesProvider: ${v} is not found`);
|
|
36758
36757
|
for (let $ = 0; $ < y.length; $++) {
|
|
@@ -36760,13 +36759,13 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36760
36759
|
return {
|
|
36761
36760
|
value: I === void 0 ? D == null ? void 0 : D.defaultValue : I,
|
|
36762
36761
|
dataSource: T,
|
|
36763
|
-
collectionName:
|
|
36762
|
+
collectionName: O
|
|
36764
36763
|
};
|
|
36765
|
-
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(z, F), q = r(L, T), E = (M = i(
|
|
36764
|
+
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(z, F), q = r(L, T), E = (M = i(N, T)) == null ? void 0 : M.getPrimaryKey();
|
|
36766
36765
|
if (Array.isArray(I)) {
|
|
36767
36766
|
const G = I.map((U) => {
|
|
36768
36767
|
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[E]) != null && q != null && q.target) {
|
|
36769
|
-
const H = `/${
|
|
36768
|
+
const H = `/${N}/${U[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
|
|
36770
36769
|
if (hasRequested(H))
|
|
36771
36770
|
return getRequested(H);
|
|
36772
36771
|
const J = o.request({
|
|
@@ -36782,7 +36781,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36782
36781
|
});
|
|
36783
36782
|
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
|
|
36784
36783
|
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[E] != null && (q != null && q.target)) {
|
|
36785
|
-
const G = `/${
|
|
36784
|
+
const G = `/${N}/${I[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
|
|
36786
36785
|
let U = null;
|
|
36787
36786
|
if (hasRequested(G))
|
|
36788
36787
|
U = yield getRequested(G);
|
|
@@ -36800,7 +36799,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36800
36799
|
I = removeThroughCollectionFields(H, q);
|
|
36801
36800
|
} else
|
|
36802
36801
|
I = removeThroughCollectionFields(getValuesByPath(I, k), q);
|
|
36803
|
-
q != null && q.target && (
|
|
36802
|
+
q != null && q.target && (N = q.target);
|
|
36804
36803
|
}
|
|
36805
36804
|
const B = a(
|
|
36806
36805
|
_.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
|
|
@@ -36808,7 +36807,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36808
36807
|
return {
|
|
36809
36808
|
value: B === void 0 ? D.defaultValue : B,
|
|
36810
36809
|
dataSource: T,
|
|
36811
|
-
collectionName:
|
|
36810
|
+
collectionName: O
|
|
36812
36811
|
};
|
|
36813
36812
|
}),
|
|
36814
36813
|
[r]
|
|
@@ -37088,7 +37087,7 @@ const NocoBaseField = (e) => {
|
|
|
37088
37087
|
return h["x-component"] === "CollectionField" ? /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !0, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaProvider, { fieldSchema: h, children: g }) }, `${p}-${d}`) : /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaContext.Provider, { value: EMPTY_OBJECT, children: g }) }, `${p}-${d}`);
|
|
37089
37088
|
}) }) : null;
|
|
37090
37089
|
}, IsInNocoBaseRecursionFieldContext = React.createContext(!1), useIsInNocoBaseRecursionFieldContext = () => React.useContext(IsInNocoBaseRecursionFieldContext), NocoBaseRecursionField = React.memo((e) => {
|
|
37091
|
-
var D,
|
|
37090
|
+
var D, N;
|
|
37092
37091
|
const {
|
|
37093
37092
|
schema: t,
|
|
37094
37093
|
name: n,
|
|
@@ -37102,11 +37101,11 @@ const NocoBaseField = (e) => {
|
|
|
37102
37101
|
uiSchema: d,
|
|
37103
37102
|
parentSchema: p
|
|
37104
37103
|
} = e, m = useBasePath(e), h = useRef(null), g = useMemo(() => (h.current = null, new Schema(t)), [t]), { uiSchema: f, defaultValue: C } = useCollectionFieldUISchema(), b = useUpdate(), { onChange: S } = useContext(SchemaComponentOnChangeContext), y = h.current || g;
|
|
37105
|
-
!y.parent && p && (y.parent = p, !((
|
|
37104
|
+
!y.parent && p && (y.parent = p, !((N = (D = y.parent) == null ? void 0 : D.properties) != null && N[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
|
|
37106
37105
|
const v = useCallback(() => {
|
|
37107
37106
|
const j = y.parent;
|
|
37108
|
-
h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((
|
|
37109
|
-
|
|
37107
|
+
h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((O) => {
|
|
37108
|
+
O === y.name && (j.properties[O] = h.current);
|
|
37110
37109
|
}), b(), S == null || S();
|
|
37111
37110
|
}, [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) => {
|
|
37112
37111
|
if (!r)
|
|
@@ -37253,9 +37252,9 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37253
37252
|
"onMouseEnter",
|
|
37254
37253
|
"refreshDataBlockRequest",
|
|
37255
37254
|
"confirmTitle"
|
|
37256
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g,
|
|
37255
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, N = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), O = 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), L = useCollectionParentRecordData(), q = useApp();
|
|
37257
37256
|
useEffect(() => {
|
|
37258
|
-
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {},
|
|
37257
|
+
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, N.filter((H) => !H.disabled).forEach((H) => {
|
|
37259
37258
|
var J;
|
|
37260
37259
|
(J = H.actions) == null || J.forEach((K) => {
|
|
37261
37260
|
linkageAction(
|
|
@@ -37270,7 +37269,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37270
37269
|
);
|
|
37271
37270
|
});
|
|
37272
37271
|
});
|
|
37273
|
-
}, [F,
|
|
37272
|
+
}, [F, N, w, B]);
|
|
37274
37273
|
const E = useCallback(
|
|
37275
37274
|
(H) => {
|
|
37276
37275
|
C == null || C(H);
|
|
@@ -37287,7 +37286,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37287
37286
|
icon: a,
|
|
37288
37287
|
loading: d,
|
|
37289
37288
|
handleMouseEnter: E,
|
|
37290
|
-
tarComponent:
|
|
37289
|
+
tarComponent: O,
|
|
37291
37290
|
className: i,
|
|
37292
37291
|
type: e.type,
|
|
37293
37292
|
Designer: v,
|
|
@@ -37338,9 +37337,9 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37338
37337
|
actionCallback: R,
|
|
37339
37338
|
visibleWithURL: T,
|
|
37340
37339
|
setVisibleWithURL: D,
|
|
37341
|
-
setSubmitted:
|
|
37340
|
+
setSubmitted: N,
|
|
37342
37341
|
getAriaLabel: j,
|
|
37343
|
-
parentRecordData:
|
|
37342
|
+
parentRecordData: O
|
|
37344
37343
|
} = fe, B = Y(fe, [
|
|
37345
37344
|
"containerRefKey",
|
|
37346
37345
|
"fieldSchema",
|
|
@@ -37400,7 +37399,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37400
37399
|
run: X,
|
|
37401
37400
|
confirm: g,
|
|
37402
37401
|
modal: J,
|
|
37403
|
-
setSubmitted:
|
|
37402
|
+
setSubmitted: N,
|
|
37404
37403
|
confirmTitle: f,
|
|
37405
37404
|
title: y
|
|
37406
37405
|
}, le = useCallback(
|
|
@@ -37421,7 +37420,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37421
37420
|
openSize: U,
|
|
37422
37421
|
containerRefKey: n,
|
|
37423
37422
|
fieldSchema: o,
|
|
37424
|
-
setSubmitted:
|
|
37423
|
+
setSubmitted: N,
|
|
37425
37424
|
children: [
|
|
37426
37425
|
C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: i.address, onlyRenderProperties: !0, schema: o }),
|
|
37427
37426
|
!C && /* @__PURE__ */ jsx(RenderButton, x({}, se)),
|
|
@@ -37498,9 +37497,9 @@ const RenderButton = ({
|
|
|
37498
37497
|
modal: R,
|
|
37499
37498
|
setSubmitted: T,
|
|
37500
37499
|
confirmTitle: D,
|
|
37501
|
-
title:
|
|
37500
|
+
title: N
|
|
37502
37501
|
}) => {
|
|
37503
|
-
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t:
|
|
37502
|
+
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: O } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useForm(), $ = useRef(null);
|
|
37504
37503
|
$.current = w;
|
|
37505
37504
|
const k = useCallback(
|
|
37506
37505
|
(z, L = !0) => V(void 0, null, function* () {
|
|
@@ -37513,8 +37512,8 @@ const RenderButton = ({
|
|
|
37513
37512
|
}) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? $.current() : (v(!0), F == null || F());
|
|
37514
37513
|
};
|
|
37515
37514
|
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (q = M == null ? void 0 : M.submit) == null ? void 0 : q.call(M), R.confirm({
|
|
37516
|
-
title:
|
|
37517
|
-
content:
|
|
37515
|
+
title: O(I.title, { title: D || N || (t == null ? void 0 : t.title) }),
|
|
37516
|
+
content: O(I.content, { title: D || N || (t == null ? void 0 : t.title) }),
|
|
37518
37517
|
onOk: E
|
|
37519
37518
|
})) : E();
|
|
37520
37519
|
}
|
|
@@ -37535,8 +37534,8 @@ const RenderButton = ({
|
|
|
37535
37534
|
F,
|
|
37536
37535
|
T,
|
|
37537
37536
|
v,
|
|
37538
|
-
N,
|
|
37539
37537
|
O,
|
|
37538
|
+
N,
|
|
37540
37539
|
j
|
|
37541
37540
|
]
|
|
37542
37541
|
);
|
|
@@ -37560,7 +37559,7 @@ const RenderButton = ({
|
|
|
37560
37559
|
type: f,
|
|
37561
37560
|
Designer: C,
|
|
37562
37561
|
designerProps: u,
|
|
37563
|
-
title:
|
|
37562
|
+
title: N
|
|
37564
37563
|
}, h)
|
|
37565
37564
|
);
|
|
37566
37565
|
};
|
|
@@ -37568,7 +37567,7 @@ RenderButton.displayName = "RenderButton";
|
|
|
37568
37567
|
const RenderButtonInner = observer$1(
|
|
37569
37568
|
(e) => {
|
|
37570
37569
|
var j, B;
|
|
37571
|
-
const
|
|
37570
|
+
const N = e, {
|
|
37572
37571
|
designable: t,
|
|
37573
37572
|
field: n,
|
|
37574
37573
|
aclCtx: o,
|
|
@@ -37588,7 +37587,7 @@ const RenderButtonInner = observer$1(
|
|
|
37588
37587
|
designerProps: b,
|
|
37589
37588
|
title: S,
|
|
37590
37589
|
isLink: y
|
|
37591
|
-
} =
|
|
37590
|
+
} = N, v = Y(N, [
|
|
37592
37591
|
"designable",
|
|
37593
37592
|
"field",
|
|
37594
37593
|
"aclCtx",
|
|
@@ -37622,7 +37621,7 @@ const RenderButtonInner = observer$1(
|
|
|
37622
37621
|
F.cancel();
|
|
37623
37622
|
}, []), !t && ((j = n == null ? void 0 : n.data) != null && j.hidden || !o))
|
|
37624
37623
|
return null;
|
|
37625
|
-
const I = S || (n == null ? void 0 : n.title),
|
|
37624
|
+
const I = S || (n == null ? void 0 : n.title), O = l, { opacity: R } = O, T = Y(O, ["opacity"]), D = y && R ? { opacity: R } : void 0;
|
|
37626
37625
|
return /* @__PURE__ */ jsxs(
|
|
37627
37626
|
SortableItem,
|
|
37628
37627
|
P(x({
|
|
@@ -38088,7 +38087,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38088
38087
|
"dataSource",
|
|
38089
38088
|
"toOptionsItem",
|
|
38090
38089
|
"popupMatchSelectWidth"
|
|
38091
|
-
]), 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,
|
|
38090
|
+
]), 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, N = F(D) || R(D), j = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && R(`${N.target}.${t.label}`), O = useMemo(() => {
|
|
38092
38091
|
var K;
|
|
38093
38092
|
if (j != null && j.interface) {
|
|
38094
38093
|
const W = T(j.interface), X = ((K = W == null ? void 0 : W.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
@@ -38163,7 +38162,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38163
38162
|
filter: mergeFilter([
|
|
38164
38163
|
K ? {
|
|
38165
38164
|
[t.label]: {
|
|
38166
|
-
[
|
|
38165
|
+
[O]: K
|
|
38167
38166
|
}
|
|
38168
38167
|
} : {},
|
|
38169
38168
|
(W = n == null ? void 0 : n.params) == null ? void 0 : W.filter
|
|
@@ -38272,11 +38271,11 @@ const useFormDataTemplates = () => {
|
|
|
38272
38271
|
d(I), m(null), t == null || t.reset();
|
|
38273
38272
|
}), []), v = useCallback((I, R, T) => V(void 0, null, function* () {
|
|
38274
38273
|
const D = P(x({}, R), { dataId: I });
|
|
38275
|
-
m(R), fetchTemplateData(h, D, T).then((
|
|
38274
|
+
m(R), fetchTemplateData(h, D, T).then((N) => (t && N && (t.reset(), t.__template = !0, forEach(N, (j, O) => {
|
|
38276
38275
|
var B;
|
|
38277
|
-
j && (t.values[
|
|
38278
|
-
})),
|
|
38279
|
-
console.error(
|
|
38276
|
+
j && (t.values[O] = j, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, O, j));
|
|
38277
|
+
})), N)).catch((N) => {
|
|
38278
|
+
console.error(N);
|
|
38280
38279
|
});
|
|
38281
38280
|
}), []);
|
|
38282
38281
|
if (!i || !r)
|
|
@@ -39187,7 +39186,7 @@ const insertPositionToMethod = {
|
|
|
39187
39186
|
)
|
|
39188
39187
|
] });
|
|
39189
39188
|
}, components$4 = { TreeSelect: TreeSelect$1 }, MenuDesigner = () => {
|
|
39190
|
-
var D,
|
|
39189
|
+
var D, N;
|
|
39191
39190
|
const { updateRoute: e, deleteRoute: t } = useNocoBaseRoutes(), n = useField(), o = useFieldSchema(), r = useAPIClient(), { dn: i, refresh: a } = useDesignable(), { t: l } = useTranslation(), c = findMenuSchema(o), u = useCompile(), { urlSchema: d, paramsSchema: p } = useURLAndHTMLSchema(), m = useMemo(
|
|
39192
39191
|
() => {
|
|
39193
39192
|
var j;
|
|
@@ -39196,10 +39195,10 @@ const insertPositionToMethod = {
|
|
|
39196
39195
|
[(D = c == null ? void 0 : c["x-component-props"]) == null ? void 0 : D.onSelect]
|
|
39197
39196
|
), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
|
|
39198
39197
|
(j) => {
|
|
39199
|
-
onFieldChange("target", (
|
|
39198
|
+
onFieldChange("target", (O) => {
|
|
39200
39199
|
var w, M;
|
|
39201
|
-
const [, B] = ((M = (w =
|
|
39202
|
-
|
|
39200
|
+
const [, B] = ((M = (w = O == null ? void 0 : O.value) == null ? void 0 : w.split) == null ? void 0 : M.call(w, "||")) || [];
|
|
39201
|
+
O.query("position").take(($) => {
|
|
39203
39202
|
$.dataSource = B === "Menu.SubMenu" ? [
|
|
39204
39203
|
{ label: l("Before"), value: "beforeBegin" },
|
|
39205
39204
|
{ label: l("After"), value: "afterEnd" },
|
|
@@ -39247,7 +39246,7 @@ const insertPositionToMethod = {
|
|
|
39247
39246
|
}), [n.componentProps.tooltip]);
|
|
39248
39247
|
o["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = n.componentProps.href, C.params = n.componentProps.params);
|
|
39249
39248
|
const y = useCallback(
|
|
39250
|
-
({ title: j, icon:
|
|
39249
|
+
({ title: j, icon: O, href: B, params: w }) => {
|
|
39251
39250
|
var $;
|
|
39252
39251
|
const M = {
|
|
39253
39252
|
"x-uid": o["x-uid"],
|
|
@@ -39258,11 +39257,11 @@ const insertPositionToMethod = {
|
|
|
39258
39257
|
}
|
|
39259
39258
|
]
|
|
39260
39259
|
};
|
|
39261
|
-
j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon =
|
|
39260
|
+
j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = O, n.componentProps.href = B, n.componentProps.params = w, M["x-component-props"] = { icon: O, href: B, params: w }, o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].icon = O, o["x-component-props"].href = B, o["x-component-props"].params = w, m == null || m({ item: { props: { schema: o } } }), i.emit("patch", {
|
|
39262
39261
|
schema: M
|
|
39263
39262
|
}), ($ = o.__route__) != null && $.id && e(o.__route__.id, {
|
|
39264
39263
|
title: j,
|
|
39265
|
-
icon:
|
|
39264
|
+
icon: O,
|
|
39266
39265
|
options: B || w ? {
|
|
39267
39266
|
href: B,
|
|
39268
39267
|
params: w
|
|
@@ -39272,8 +39271,8 @@ const insertPositionToMethod = {
|
|
|
39272
39271
|
[o, n, i, a, m]
|
|
39273
39272
|
), v = useCallback(
|
|
39274
39273
|
({ tooltip: j }) => {
|
|
39275
|
-
var
|
|
39276
|
-
(
|
|
39274
|
+
var O;
|
|
39275
|
+
(O = o.__route__) != null && O.id && e(o.__route__.id, {
|
|
39277
39276
|
tooltip: j
|
|
39278
39277
|
});
|
|
39279
39278
|
},
|
|
@@ -39303,7 +39302,7 @@ const insertPositionToMethod = {
|
|
|
39303
39302
|
}
|
|
39304
39303
|
}
|
|
39305
39304
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
|
|
39306
|
-
(B) => V(void 0, [B], function* ({ target: j, position:
|
|
39305
|
+
(B) => V(void 0, [B], function* ({ target: j, position: O }) {
|
|
39307
39306
|
var L;
|
|
39308
39307
|
const [w] = ((L = j == null ? void 0 : j.split) == null ? void 0 : L.call(j, "||")) || [];
|
|
39309
39308
|
if (!w)
|
|
@@ -39316,7 +39315,7 @@ const insertPositionToMethod = {
|
|
|
39316
39315
|
}), k = {
|
|
39317
39316
|
beforeBegin: "insertBefore",
|
|
39318
39317
|
afterEnd: "insertAfter"
|
|
39319
|
-
}, z =
|
|
39318
|
+
}, z = O === "beforeEnd" ? {
|
|
39320
39319
|
targetScope: {
|
|
39321
39320
|
parentId: M.__route__.id
|
|
39322
39321
|
}
|
|
@@ -39326,8 +39325,8 @@ const insertPositionToMethod = {
|
|
|
39326
39325
|
yield I(x({
|
|
39327
39326
|
sourceId: o.__route__.id,
|
|
39328
39327
|
sortField: "sort",
|
|
39329
|
-
method: k[
|
|
39330
|
-
}, z)), $.loadAPIClientEvents(), $.insertAdjacent(
|
|
39328
|
+
method: k[O]
|
|
39329
|
+
}, z)), $.loadAPIClientEvents(), $.insertAdjacent(O, o);
|
|
39331
39330
|
}),
|
|
39332
39331
|
[c, l, r, a, I, o]
|
|
39333
39332
|
), T = useMemo(() => ({
|
|
@@ -39362,7 +39361,7 @@ const insertPositionToMethod = {
|
|
|
39362
39361
|
SchemaSettingsSwitchItem,
|
|
39363
39362
|
{
|
|
39364
39363
|
title: l("Hidden"),
|
|
39365
|
-
checked: (
|
|
39364
|
+
checked: (N = o["x-component-props"]) == null ? void 0 : N.hidden,
|
|
39366
39365
|
onChange: (j) => {
|
|
39367
39366
|
Modal.confirm({
|
|
39368
39367
|
title: l("Are you sure you want to hide this menu?"),
|
|
@@ -39781,14 +39780,14 @@ const useMenuDragEnd = () => {
|
|
|
39781
39780
|
theme: m
|
|
39782
39781
|
} = 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(() => {
|
|
39783
39782
|
var B;
|
|
39784
|
-
let
|
|
39783
|
+
let O;
|
|
39785
39784
|
if (o) {
|
|
39786
39785
|
const w = findKeysByUid(f, o);
|
|
39787
|
-
|
|
39786
|
+
O = (w == null ? void 0 : w[0]) || null;
|
|
39788
39787
|
} else
|
|
39789
|
-
|
|
39790
|
-
if (n === "mix" &&
|
|
39791
|
-
const w = (B = f.properties) == null ? void 0 : B[
|
|
39788
|
+
O = (F == null ? void 0 : F[0]) || null;
|
|
39789
|
+
if (n === "mix" && O) {
|
|
39790
|
+
const w = (B = f.properties) == null ? void 0 : B[O];
|
|
39792
39791
|
if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
|
|
39793
39792
|
return w;
|
|
39794
39793
|
}
|
|
@@ -39799,12 +39798,12 @@ const useMenuDragEnd = () => {
|
|
|
39799
39798
|
v(void 0);
|
|
39800
39799
|
return;
|
|
39801
39800
|
}
|
|
39802
|
-
const
|
|
39803
|
-
v(
|
|
39801
|
+
const O = findKeysByUid(f, o);
|
|
39802
|
+
v(O), ["inline", "mix"].includes(n) && T(a || O);
|
|
39804
39803
|
}, [o]), useEffect(() => {
|
|
39805
39804
|
["inline", "mix"].includes(n) && T(F);
|
|
39806
39805
|
}, [F]);
|
|
39807
|
-
const
|
|
39806
|
+
const N = useContext(SchemaComponentContext), { onDragEnd: j } = useMenuDragEnd();
|
|
39808
39807
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: j, children: /* @__PURE__ */ jsx(MenuItemDesignerContext.Provider, { value: g, children: /* @__PURE__ */ jsxs(MenuModeContext.Provider, { value: n, children: [
|
|
39809
39808
|
/* @__PURE__ */ jsx(
|
|
39810
39809
|
HeaderMenu,
|
|
@@ -39821,7 +39820,7 @@ const useMenuDragEnd = () => {
|
|
|
39821
39820
|
defaultSelectedKeys: F,
|
|
39822
39821
|
defaultOpenKeys: R,
|
|
39823
39822
|
selectedKeys: y,
|
|
39824
|
-
designable:
|
|
39823
|
+
designable: N.designable,
|
|
39825
39824
|
render: b,
|
|
39826
39825
|
children: l
|
|
39827
39826
|
}
|
|
@@ -39839,7 +39838,7 @@ const useMenuDragEnd = () => {
|
|
|
39839
39838
|
render: b,
|
|
39840
39839
|
t: h,
|
|
39841
39840
|
api: C,
|
|
39842
|
-
designable:
|
|
39841
|
+
designable: N.designable
|
|
39843
39842
|
}
|
|
39844
39843
|
) })
|
|
39845
39844
|
] }) }) });
|
|
@@ -40628,35 +40627,35 @@ const AppendsTreeSelect = (e) => {
|
|
|
40628
40627
|
"filter",
|
|
40629
40628
|
"rootOption",
|
|
40630
40629
|
"loadData"
|
|
40631
|
-
]), 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 = (
|
|
40632
|
-
const w = S.getCollection(
|
|
40630
|
+
]), 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 = (O, B) => {
|
|
40631
|
+
const w = S.getCollection(O);
|
|
40633
40632
|
return w ? w.getAllFields(B) : [];
|
|
40634
|
-
}, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((
|
|
40635
|
-
(
|
|
40633
|
+
}, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((O) => m[O]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
|
|
40634
|
+
(O) => V(void 0, null, function* () {
|
|
40636
40635
|
if (c != null)
|
|
40637
|
-
return c(
|
|
40638
|
-
if (!
|
|
40639
|
-
const B =
|
|
40636
|
+
return c(O);
|
|
40637
|
+
if (!O.isLeaf && O.loadChildren) {
|
|
40638
|
+
const B = O.loadChildren(O);
|
|
40640
40639
|
h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
40641
40640
|
}
|
|
40642
40641
|
}),
|
|
40643
40642
|
[c]
|
|
40644
40643
|
);
|
|
40645
40644
|
useEffect(() => {
|
|
40646
|
-
const
|
|
40645
|
+
const O = l ? P(x({}, l), {
|
|
40647
40646
|
id: l.value,
|
|
40648
40647
|
key: l.value,
|
|
40649
40648
|
title: l.label,
|
|
40650
40649
|
fullTitle: l.label,
|
|
40651
40650
|
isLeaf: !1
|
|
40652
|
-
}) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C,
|
|
40653
|
-
|
|
40651
|
+
}) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, O)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
|
|
40652
|
+
O && (w[O.value] = O), h(w);
|
|
40654
40653
|
}, [g, l, a, c]), useEffect(() => {
|
|
40655
|
-
const
|
|
40656
|
-
if (!(
|
|
40654
|
+
const O = e.multiple ? n : n ? [n] : [];
|
|
40655
|
+
if (!(O != null && O.length) || O.every((w) => !!m[w]))
|
|
40657
40656
|
return;
|
|
40658
40657
|
const B = [];
|
|
40659
|
-
|
|
40658
|
+
O.forEach((w) => {
|
|
40660
40659
|
const M = w.split(".");
|
|
40661
40660
|
let $ = m[M[0]];
|
|
40662
40661
|
for (let k = 1; k < M.length && $; k++) {
|
|
@@ -40673,12 +40672,12 @@ const AppendsTreeSelect = (e) => {
|
|
|
40673
40672
|
}), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
40674
40673
|
}, [n, v.length, e.multiple]);
|
|
40675
40674
|
const R = useCallback(
|
|
40676
|
-
(
|
|
40675
|
+
(O) => {
|
|
40677
40676
|
if (!e.multiple) {
|
|
40678
|
-
o(
|
|
40677
|
+
o(O);
|
|
40679
40678
|
return;
|
|
40680
40679
|
}
|
|
40681
|
-
const B =
|
|
40680
|
+
const B = O.map(($) => $.value).filter(Boolean), w = new Set(B), M = F.find(($) => !w.has($.value));
|
|
40682
40681
|
if (M) {
|
|
40683
40682
|
const $ = `${M.value}.`;
|
|
40684
40683
|
Object.keys(m).forEach((k) => {
|
|
@@ -40695,16 +40694,16 @@ const AppendsTreeSelect = (e) => {
|
|
|
40695
40694
|
},
|
|
40696
40695
|
[e.multiple, F, o, m]
|
|
40697
40696
|
), T = useCallback(
|
|
40698
|
-
(
|
|
40697
|
+
(O) => {
|
|
40699
40698
|
var z;
|
|
40700
|
-
const { value: B, onClose: w, disabled: M, closable: $ } =
|
|
40699
|
+
const { value: B, onClose: w, disabled: M, closable: $ } = O;
|
|
40701
40700
|
if (!B)
|
|
40702
40701
|
return null;
|
|
40703
40702
|
const { fullTitle: k } = (z = m[B]) != null ? z : {};
|
|
40704
40703
|
return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
|
|
40705
40704
|
},
|
|
40706
40705
|
[m]
|
|
40707
|
-
), D = Array.isArray(F) ? F.filter((
|
|
40706
|
+
), D = Array.isArray(F) ? F.filter((O) => O.value in m) : F, N = e.multiple ? n : n != null ? [n] : [];
|
|
40708
40707
|
return /* @__PURE__ */ jsx(
|
|
40709
40708
|
TreeSelect$2,
|
|
40710
40709
|
x({
|
|
@@ -40713,7 +40712,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
40713
40712
|
value: D,
|
|
40714
40713
|
placeholder: p("Select field"),
|
|
40715
40714
|
showCheckedStrategy: TreeSelect$2.SHOW_ALL,
|
|
40716
|
-
treeDefaultExpandedKeys:
|
|
40715
|
+
treeDefaultExpandedKeys: N,
|
|
40717
40716
|
allowClear: {
|
|
40718
40717
|
clearIcon: /* @__PURE__ */ jsx(CloseCircleFilled, { role: "button", "aria-label": "icon-close" })
|
|
40719
40718
|
},
|
|
@@ -40748,18 +40747,18 @@ function getFieldPath(e) {
|
|
|
40748
40747
|
}
|
|
40749
40748
|
const InternalAssociationSelect$1 = observer$1(
|
|
40750
40749
|
(e) => {
|
|
40751
|
-
var
|
|
40752
|
-
const D = e, { objectValue: t = !0, addMode: n } = D, o = Y(D, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (
|
|
40750
|
+
var N;
|
|
40751
|
+
const D = e, { objectValue: t = !0, addMode: n } = D, o = Y(D, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (N = i["x-component-props"]) == null ? void 0 : N.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), F = v(l.target), { filterTargetKey: I } = F;
|
|
40753
40752
|
useEffect(() => {
|
|
40754
|
-
const j = isVariable$1(r.value) ? void 0 : r.value,
|
|
40753
|
+
const j = isVariable$1(r.value) ? void 0 : r.value, O = Array.isArray(j) ? j.filter(Boolean) : j, B = removeIfKeyEmpty(O, I);
|
|
40755
40754
|
p(B), isEqual(r.value, B) || (r.value = B);
|
|
40756
40755
|
}, [r.value, I]), useEffect(() => {
|
|
40757
40756
|
const j = uid();
|
|
40758
40757
|
return f.addEffects(j, () => {
|
|
40759
|
-
onFieldInputValueChange("*", (
|
|
40758
|
+
onFieldInputValueChange("*", (O) => {
|
|
40760
40759
|
var $, k, z, L, q, E;
|
|
40761
|
-
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(
|
|
40762
|
-
B.includes((L =
|
|
40760
|
+
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(O.address.entire), M = getFieldPath(r.address.entire);
|
|
40761
|
+
B.includes((L = O == null ? void 0 : O.props) == null ? void 0 : L.name) && r.value && isEqual(O == null ? void 0 : O.indexes, r == null ? void 0 : r.indexes) && ((q = O == null ? void 0 : O.props) == null ? void 0 : q.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, M)) && (r.setValue(null), p(null));
|
|
40763
40762
|
});
|
|
40764
40763
|
}), () => {
|
|
40765
40764
|
f.removeEffects(j);
|
|
@@ -40767,11 +40766,11 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
40767
40766
|
}, []);
|
|
40768
40767
|
const R = (j) => V(void 0, null, function* () {
|
|
40769
40768
|
var M, $;
|
|
40770
|
-
const { search:
|
|
40769
|
+
const { search: O, callBack: B } = j, {
|
|
40771
40770
|
data: { data: w }
|
|
40772
40771
|
} = yield b.create({
|
|
40773
40772
|
values: {
|
|
40774
|
-
[(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]:
|
|
40773
|
+
[(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]: O
|
|
40775
40774
|
}
|
|
40776
40775
|
});
|
|
40777
40776
|
if (w) {
|
|
@@ -40805,8 +40804,8 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
40805
40804
|
service: a,
|
|
40806
40805
|
onChange: (j) => {
|
|
40807
40806
|
var B;
|
|
40808
|
-
const
|
|
40809
|
-
(B = e.onChange) == null || B.call(e,
|
|
40807
|
+
const O = Array.isArray(j) && j.length === 0 ? null : j;
|
|
40808
|
+
(B = e.onChange) == null || B.call(e, O);
|
|
40810
40809
|
},
|
|
40811
40810
|
CustomDropdownRender: m === "quickAdd" && T
|
|
40812
40811
|
})
|
|
@@ -41392,21 +41391,21 @@ function Uploader(n) {
|
|
|
41392
41391
|
const { disabled: r, multiple: i, value: a, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), [p, m] = useState([]), { t: h } = useTranslation(), { componentCls: g } = useStyles$6(), f = useField(), C = useUploadProps(t), b = useBeforeUpload(e);
|
|
41393
41392
|
useEffect(() => {
|
|
41394
41393
|
if (p.length) {
|
|
41395
|
-
const
|
|
41394
|
+
const N = p.filter((j) => j.status === "error");
|
|
41396
41395
|
f.setFeedback({
|
|
41397
41396
|
type: "error",
|
|
41398
41397
|
code: "ValidateError",
|
|
41399
|
-
messages: [
|
|
41398
|
+
messages: [N.length ? h("Some files are not uploaded correctly, please check.") : " "]
|
|
41400
41399
|
});
|
|
41401
41400
|
} else
|
|
41402
41401
|
f.setFeedback({});
|
|
41403
41402
|
}, [f, p, h]);
|
|
41404
41403
|
const S = useCallback(
|
|
41405
|
-
(
|
|
41406
|
-
var
|
|
41407
|
-
const j =
|
|
41404
|
+
(N) => {
|
|
41405
|
+
var O;
|
|
41406
|
+
const j = N.fileList.filter((B) => B.status !== "done").map(normalizeFile);
|
|
41408
41407
|
if (m(j), i) {
|
|
41409
|
-
const B =
|
|
41408
|
+
const B = N.fileList.filter((w) => w.status === "done");
|
|
41410
41409
|
if (B.length) {
|
|
41411
41410
|
const w = [...u, ...B.map((M) => {
|
|
41412
41411
|
var $;
|
|
@@ -41415,25 +41414,25 @@ function Uploader(n) {
|
|
|
41415
41414
|
j.length ? d(w) : (l == null || l([...a || [], ...w]), d([]));
|
|
41416
41415
|
}
|
|
41417
41416
|
} else {
|
|
41418
|
-
const B =
|
|
41419
|
-
B.status === "done" && (l == null || l(c((
|
|
41417
|
+
const B = N.fileList.find((w) => w.uid === N.file.uid);
|
|
41418
|
+
B.status === "done" && (l == null || l(c((O = B.response) == null ? void 0 : O.data)), m([]));
|
|
41420
41419
|
}
|
|
41421
41420
|
},
|
|
41422
41421
|
[i, a, u, c, l]
|
|
41423
|
-
), y = useCallback((
|
|
41422
|
+
), y = useCallback((N) => {
|
|
41424
41423
|
m((j) => {
|
|
41425
|
-
const
|
|
41426
|
-
return j.splice(
|
|
41424
|
+
const O = j.indexOf(N);
|
|
41425
|
+
return j.splice(O, 1), [...j];
|
|
41427
41426
|
});
|
|
41428
|
-
}, []), v = useCallback((
|
|
41427
|
+
}, []), v = useCallback((N) => {
|
|
41429
41428
|
d((j) => {
|
|
41430
|
-
const
|
|
41431
|
-
return j.splice(
|
|
41429
|
+
const O = j.indexOf(N);
|
|
41430
|
+
return j.splice(O, 1), [...j];
|
|
41432
41431
|
});
|
|
41433
41432
|
}, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: R } = e != null ? e : {}, T = useSizeHint(R), D = !r && (i || (!a || Array.isArray(a) && !a.length) && !p.length);
|
|
41434
41433
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41435
|
-
u.map((
|
|
41436
|
-
p.map((
|
|
41434
|
+
u.map((N, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: N, index: j, disabled: r, onDelete: v }, N.id)),
|
|
41435
|
+
p.map((N, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: N, index: j, disabled: r, onDelete: y }, N.uid)),
|
|
41437
41436
|
/* @__PURE__ */ jsx(
|
|
41438
41437
|
"div",
|
|
41439
41438
|
{
|
|
@@ -41743,15 +41742,15 @@ function FileSelector(e) {
|
|
|
41743
41742
|
);
|
|
41744
41743
|
}
|
|
41745
41744
|
const InternalFileManager = (e) => {
|
|
41746
|
-
var D,
|
|
41745
|
+
var D, N;
|
|
41747
41746
|
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) => {
|
|
41748
41747
|
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([]);
|
|
41749
41748
|
};
|
|
41750
41749
|
useEffect(() => {
|
|
41751
41750
|
if (t && Object.keys(t).length > 0) {
|
|
41752
|
-
const j = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
41753
|
-
const B =
|
|
41754
|
-
return P(x({},
|
|
41751
|
+
const j = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((O) => {
|
|
41752
|
+
const B = O[p.label];
|
|
41753
|
+
return P(x({}, O), {
|
|
41755
41754
|
[p.label]: getLabelFormatValue$1(y(S), y(B))
|
|
41756
41755
|
});
|
|
41757
41756
|
});
|
|
@@ -41772,10 +41771,10 @@ const InternalFileManager = (e) => {
|
|
|
41772
41771
|
setSelectedRows: u,
|
|
41773
41772
|
collectionField: b
|
|
41774
41773
|
}, R = () => {
|
|
41775
|
-
const { setVisible: j } = useActionContext(), { multiple:
|
|
41774
|
+
const { setVisible: j } = useActionContext(), { multiple: O, selectedRows: B, onChange: w, options: M, collectionField: $ } = useContext(RecordPickerContext);
|
|
41776
41775
|
return {
|
|
41777
41776
|
onClick() {
|
|
41778
|
-
w(
|
|
41777
|
+
w(O ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
|
|
41779
41778
|
}
|
|
41780
41779
|
};
|
|
41781
41780
|
};
|
|
@@ -41786,7 +41785,7 @@ const InternalFileManager = (e) => {
|
|
|
41786
41785
|
value: n ? g : g == null ? void 0 : g[0],
|
|
41787
41786
|
multiple: n,
|
|
41788
41787
|
quickUpload: ((D = i["x-component-props"]) == null ? void 0 : D.quickUpload) !== !1,
|
|
41789
|
-
selectFile: ((
|
|
41788
|
+
selectFile: ((N = i["x-component-props"]) == null ? void 0 : N.selectFile) !== !1,
|
|
41790
41789
|
action: `${b == null ? void 0 : b.target}:create`,
|
|
41791
41790
|
onSelect: F,
|
|
41792
41791
|
onChange: o
|
|
@@ -41827,10 +41826,10 @@ const InternalFileManager = (e) => {
|
|
|
41827
41826
|
FormItem: FormItem$1
|
|
41828
41827
|
}
|
|
41829
41828
|
}), CascadeSelect = connect((e) => {
|
|
41830
|
-
var
|
|
41829
|
+
var O;
|
|
41831
41830
|
const { data: t, mapOptions: n, onChange: o, value: r } = e, [i, a] = useState([
|
|
41832
41831
|
{ key: void 0, children: [], value: null }
|
|
41833
|
-
]), [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 = (
|
|
41832
|
+
]), [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 = (O = f == null ? void 0 : f.componentProps) == null ? void 0 : O.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
|
|
41834
41833
|
var B, w;
|
|
41835
41834
|
return v != null && v.interface && ((w = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
|
|
41836
41835
|
}, [v]), I = useField();
|
|
@@ -41892,7 +41891,7 @@ const InternalFileManager = (e) => {
|
|
|
41892
41891
|
} else
|
|
41893
41892
|
f.value = w;
|
|
41894
41893
|
k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
|
|
41895
|
-
}),
|
|
41894
|
+
}), N = (B, w, M) => V(void 0, null, function* () {
|
|
41896
41895
|
var $, k, z;
|
|
41897
41896
|
if (B) {
|
|
41898
41897
|
d(!0);
|
|
@@ -41935,7 +41934,7 @@ const InternalFileManager = (e) => {
|
|
|
41935
41934
|
style: { minWidth: 150 },
|
|
41936
41935
|
onChange: (z, L) => D(z, L, w),
|
|
41937
41936
|
options: u ? [] : R(l),
|
|
41938
|
-
onDropdownVisibleChange: (z) =>
|
|
41937
|
+
onDropdownVisibleChange: (z) => N(z, B, w),
|
|
41939
41938
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
41940
41939
|
},
|
|
41941
41940
|
`${(k = B.value) == null ? void 0 : k.id}+ ${B.key} + ${y.label}`
|
|
@@ -42176,7 +42175,7 @@ const InternalNesterCardCss = css`
|
|
|
42176
42175
|
}, InternalPicker = observer$1(
|
|
42177
42176
|
(e) => {
|
|
42178
42177
|
var B;
|
|
42179
|
-
const
|
|
42178
|
+
const O = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = O, c = Y(O, ["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) => {
|
|
42180
42179
|
const $ = M == null ? void 0 : M[d.label];
|
|
42181
42180
|
return P(x({}, M), {
|
|
42182
42181
|
[d.label]: getLabelFormatValue$1(b(S), b($))
|
|
@@ -42197,7 +42196,7 @@ const InternalNesterCardCss = css`
|
|
|
42197
42196
|
}, D = () => {
|
|
42198
42197
|
var w;
|
|
42199
42198
|
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];
|
|
42200
|
-
},
|
|
42199
|
+
}, N = () => {
|
|
42201
42200
|
const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
|
|
42202
42201
|
return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
|
|
42203
42202
|
}, j = () => {
|
|
@@ -42266,7 +42265,7 @@ const InternalNesterCardCss = css`
|
|
|
42266
42265
|
visible: p,
|
|
42267
42266
|
setVisible: m
|
|
42268
42267
|
},
|
|
42269
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter:
|
|
42268
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: N() }, children: /* @__PURE__ */ jsx(
|
|
42270
42269
|
SchemaComponentOptions,
|
|
42271
42270
|
{
|
|
42272
42271
|
scope: {
|
|
@@ -42310,44 +42309,45 @@ const RenderRecord = React.memo(
|
|
|
42310
42309
|
ellipsisWithTooltipRef: m,
|
|
42311
42310
|
value: h,
|
|
42312
42311
|
setBtnHover: g,
|
|
42313
|
-
onClick: f
|
|
42312
|
+
onClick: f,
|
|
42313
|
+
ellipsis: C
|
|
42314
42314
|
}) => {
|
|
42315
|
-
const [
|
|
42316
|
-
|
|
42317
|
-
const
|
|
42315
|
+
const [b, S] = useState(!0), [y, v] = useState([]), F = useRef(!1), I = useRef(u);
|
|
42316
|
+
I.current = u;
|
|
42317
|
+
const R = useCallback(() => I.current, []);
|
|
42318
42318
|
return useEffect(() => {
|
|
42319
|
-
const
|
|
42320
|
-
const
|
|
42321
|
-
(
|
|
42319
|
+
const T = toArr$3(h).map((D, N, j) => {
|
|
42320
|
+
const O = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], B = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(O) ? JSON.stringify(O) : O, w = toValue$4(n(B), "N/A"), M = o(
|
|
42321
|
+
(D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
|
|
42322
42322
|
(e == null ? void 0 : e.label) || "label"
|
|
42323
|
-
),
|
|
42323
|
+
), $ = getLabelFormatValue$1(n(M), w, !0);
|
|
42324
42324
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42325
|
-
/* @__PURE__ */ jsx("span", { children: i ?
|
|
42325
|
+
/* @__PURE__ */ jsx("span", { children: i ? $ : a !== !1 ? /* @__PURE__ */ jsx(
|
|
42326
42326
|
"a",
|
|
42327
42327
|
{
|
|
42328
42328
|
onMouseEnter: () => {
|
|
42329
42329
|
g(!0);
|
|
42330
42330
|
},
|
|
42331
|
-
onClick: (
|
|
42332
|
-
var
|
|
42333
|
-
g(!0),
|
|
42334
|
-
f == null || f({ recordData:
|
|
42335
|
-
recordData:
|
|
42331
|
+
onClick: (k) => {
|
|
42332
|
+
var z;
|
|
42333
|
+
g(!0), k.stopPropagation(), k.preventDefault(), l && !u.properties && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
|
|
42334
|
+
f == null || f({ recordData: D }), d({
|
|
42335
|
+
recordData: D,
|
|
42336
42336
|
parentRecordData: p,
|
|
42337
|
-
customActionSchema:
|
|
42337
|
+
customActionSchema: R()
|
|
42338
42338
|
});
|
|
42339
|
-
}),
|
|
42340
|
-
recordData:
|
|
42339
|
+
}), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
|
|
42340
|
+
recordData: D,
|
|
42341
42341
|
parentRecordData: p
|
|
42342
|
-
})), (
|
|
42342
|
+
})), (z = m == null ? void 0 : m.current) == null || z.setPopoverVisible(!1);
|
|
42343
42343
|
},
|
|
42344
|
-
children:
|
|
42344
|
+
children: $
|
|
42345
42345
|
}
|
|
42346
|
-
) :
|
|
42347
|
-
|
|
42348
|
-
] }, `${
|
|
42346
|
+
) : $ }),
|
|
42347
|
+
N < j.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
|
|
42348
|
+
] }, `${D == null ? void 0 : D.id}_${N}`);
|
|
42349
42349
|
});
|
|
42350
|
-
|
|
42350
|
+
v(T), S(!1);
|
|
42351
42351
|
}, [
|
|
42352
42352
|
r == null ? void 0 : r.target,
|
|
42353
42353
|
n,
|
|
@@ -42364,12 +42364,13 @@ const RenderRecord = React.memo(
|
|
|
42364
42364
|
g,
|
|
42365
42365
|
i,
|
|
42366
42366
|
h,
|
|
42367
|
-
|
|
42368
|
-
]),
|
|
42367
|
+
R
|
|
42368
|
+
]), b ? null : /* @__PURE__ */ jsx("span", { style: C ? null : { whiteSpace: "normal" }, children: y });
|
|
42369
42369
|
}
|
|
42370
42370
|
);
|
|
42371
42371
|
RenderRecord.displayName = "RenderRecord";
|
|
42372
42372
|
const ButtonLinkList = observer$1((e) => {
|
|
42373
|
+
var C;
|
|
42373
42374
|
const t = useFieldSchema(), n = useCollectionManager(), { enableLink: o } = t["x-component-props"] || {}, r = useFieldNames$1({ fieldNames: e.fieldNames }), i = useInsertSchema$1("Viewer"), { options: a } = useAssociationFieldContext(), l = useCompile(), { designable: c } = useDesignable(), { snapshot: u } = useActionContext(), d = n.getCollection(a == null ? void 0 : a.target), p = (d == null ? void 0 : d.template) === "tree", m = useRef(), h = useLabelUiSchemaV2(), { openPopup: g } = usePopupUtils(), f = useCollectionRecordData();
|
|
42374
42375
|
return /* @__PURE__ */ jsx(
|
|
42375
42376
|
RenderRecord,
|
|
@@ -42389,7 +42390,8 @@ const ButtonLinkList = observer$1((e) => {
|
|
|
42389
42390
|
ellipsisWithTooltipRef: m,
|
|
42390
42391
|
value: e.value,
|
|
42391
42392
|
setBtnHover: e.setBtnHover,
|
|
42392
|
-
onClick: e.onClick
|
|
42393
|
+
onClick: e.onClick,
|
|
42394
|
+
ellipsis: (C = e.ellipsis) != null ? C : !0
|
|
42393
42395
|
}
|
|
42394
42396
|
);
|
|
42395
42397
|
});
|
|
@@ -42398,13 +42400,23 @@ const getSourceData = (e, t) => {
|
|
|
42398
42400
|
const n = t.name.split(".").filter((o, r, i) => r < i.length - 1).join(".");
|
|
42399
42401
|
return n ? _.get(e, n) : e;
|
|
42400
42402
|
}, ReadPrettyInternalViewer = (e) => {
|
|
42401
|
-
|
|
42402
|
-
|
|
42403
|
-
|
|
42403
|
+
var T, D;
|
|
42404
|
+
const { value: t, ButtonList: n = ButtonLinkList } = e, o = useFieldSchema(), { enableLink: r, openMode: i, openSize: a } = o["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), { visibleWithURL: p, setVisibleWithURL: m } = usePopupUtils(), [h, g] = useState(!!p), { defaultOpenMode: f } = useOpenModeContext(), C = useCollectionRecordData(), [b, S] = useState(null), { isPopupVisibleControlledByURL: y } = usePopupSettings(), v = useCallback((N) => {
|
|
42405
|
+
S(N.recordData);
|
|
42406
|
+
}, []), F = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: (T = e.ellipsis) != null ? T : !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(C, o), children: /* @__PURE__ */ jsx(
|
|
42407
|
+
n,
|
|
42408
|
+
{
|
|
42409
|
+
setBtnHover: g,
|
|
42410
|
+
value: t,
|
|
42411
|
+
fieldNames: e.fieldNames,
|
|
42412
|
+
onClick: v,
|
|
42413
|
+
ellipsis: (D = e.ellipsis) != null ? D : !0
|
|
42414
|
+
}
|
|
42415
|
+
) }) }), I = useMemo(
|
|
42404
42416
|
() => ({
|
|
42405
42417
|
visible: c || p,
|
|
42406
|
-
setVisible: (
|
|
42407
|
-
u == null || u(
|
|
42418
|
+
setVisible: (N) => {
|
|
42419
|
+
u == null || u(N), m == null || m(N);
|
|
42408
42420
|
},
|
|
42409
42421
|
openMode: i || f,
|
|
42410
42422
|
snapshot: (d == null ? void 0 : d.interface) === "snapshot",
|
|
@@ -42423,7 +42435,7 @@ const getSourceData = (e, t) => {
|
|
|
42423
42435
|
schema: o,
|
|
42424
42436
|
onlyRenderProperties: !0,
|
|
42425
42437
|
basePath: l.address,
|
|
42426
|
-
filterProperties: (
|
|
42438
|
+
filterProperties: (N) => N["x-component"] !== "Action"
|
|
42427
42439
|
}
|
|
42428
42440
|
) }) })
|
|
42429
42441
|
) : /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: b, parentRecord: C, children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { schema: o, onlyRenderProperties: !0, basePath: l.address }) }) }) }))
|
|
@@ -42777,10 +42789,10 @@ const CreateAction = observer$1(
|
|
|
42777
42789
|
const { onClick: t } = e, n = useCollection_deprecated(), o = useFieldSchema(), r = useField(), i = useForm(), a = useVariables$1(), l = useAclCheckFn(), c = o["x-enable-children"] || [], u = o == null ? void 0 : o["x-allow-add-to-current"], d = (T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.linkageFromForm, p = r.componentProps.type === "danger" ? void 0 : r.componentProps.type || "primary", { getChildrenCollections: m } = useCollectionManager_deprecated(), h = m(n.name), g = useMemo(() => c.map((D) => {
|
|
42778
42790
|
if (!D)
|
|
42779
42791
|
return;
|
|
42780
|
-
const
|
|
42781
|
-
if (
|
|
42782
|
-
return P(x({},
|
|
42783
|
-
title: D.title ||
|
|
42792
|
+
const N = h.find((j) => j.name === D.collection);
|
|
42793
|
+
if (N)
|
|
42794
|
+
return P(x({}, N.getOptions()), {
|
|
42795
|
+
title: D.title || N.title
|
|
42784
42796
|
});
|
|
42785
42797
|
}).filter((D) => D && l(`${D.name}:create`)), [c, h]), f = (o == null ? void 0 : o["x-linkage-rules"]) || [], C = useRecord(), b = useLocalVariables$1({ currentForm: { values: C } }), S = useCompile(), { designable: y } = useDesignable(), v = e.icon || null, F = useApp(), I = useMemo(() => g.map((D) => ({
|
|
42786
42798
|
key: D.name,
|
|
@@ -42791,8 +42803,8 @@ const CreateAction = observer$1(
|
|
|
42791
42803
|
}), [I]);
|
|
42792
42804
|
return useEffect(() => {
|
|
42793
42805
|
r.stateOfLinkageRules = {}, f.filter((D) => !D.disabled).forEach((D) => {
|
|
42794
|
-
var
|
|
42795
|
-
(
|
|
42806
|
+
var N;
|
|
42807
|
+
(N = D.actions) == null || N.forEach((j) => {
|
|
42796
42808
|
linkageAction(
|
|
42797
42809
|
{
|
|
42798
42810
|
operator: j.operator,
|
|
@@ -43001,19 +43013,19 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43001
43013
|
}
|
|
43002
43014
|
});
|
|
43003
43015
|
Array.isArray(o.value) || (o.value = []);
|
|
43004
|
-
const I = useCallback(({ form: j, fieldSchema:
|
|
43016
|
+
const I = useCallback(({ form: j, fieldSchema: O, collectionField: B, getInterface: w }) => {
|
|
43005
43017
|
var M;
|
|
43006
|
-
return !B || B.target && ((M =
|
|
43018
|
+
return !B || B.target && ((M = O["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(j != null && j.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(B == null ? void 0 : B.interface) && !isSystemField(B, w);
|
|
43007
43019
|
}, []), R = () => {
|
|
43008
|
-
const { setVisible: j } = useActionContext(), { selectedRows:
|
|
43020
|
+
const { setVisible: j } = useActionContext(), { selectedRows: O, setSelectedRows: B } = useContext(RecordPickerContext);
|
|
43009
43021
|
return {
|
|
43010
43022
|
onClick() {
|
|
43011
|
-
|
|
43023
|
+
O.map((w) => o.value.push(markRecordAsNew(w))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
|
|
43012
43024
|
}
|
|
43013
43025
|
};
|
|
43014
|
-
}, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((
|
|
43015
|
-
const B =
|
|
43016
|
-
return P(x({},
|
|
43026
|
+
}, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((O) => {
|
|
43027
|
+
const B = O == null ? void 0 : O[S.label];
|
|
43028
|
+
return P(x({}, O), {
|
|
43017
43029
|
[S.label]: getLabelFormatValue$1(y(v), y(B))
|
|
43018
43030
|
});
|
|
43019
43031
|
}) : [], [o.value, S == null ? void 0 : S.label]), D = {
|
|
@@ -43028,9 +43040,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43028
43040
|
selectedRows: C,
|
|
43029
43041
|
setSelectedRows: b,
|
|
43030
43042
|
collectionField: n
|
|
43031
|
-
},
|
|
43032
|
-
const j = (n == null ? void 0 : n.targetKey) || "id",
|
|
43033
|
-
return
|
|
43043
|
+
}, N = () => {
|
|
43044
|
+
const j = (n == null ? void 0 : n.targetKey) || "id", O = (o.value || []).map((w) => w == null ? void 0 : w[j]).filter(Boolean);
|
|
43045
|
+
return O.length ? { $and: [{ [`${j}.$ne`]: O }] } : {};
|
|
43034
43046
|
};
|
|
43035
43047
|
return o.value.length > 0 ? /* @__PURE__ */ jsxs(
|
|
43036
43048
|
Card,
|
|
@@ -43044,7 +43056,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43044
43056
|
`,
|
|
43045
43057
|
children: [
|
|
43046
43058
|
/* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: h, children: [
|
|
43047
|
-
o.value.map((j,
|
|
43059
|
+
o.value.map((j, O) => {
|
|
43048
43060
|
let B = i;
|
|
43049
43061
|
return i || (B = !(j != null && j[n.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
43050
43062
|
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !o.readPretty && B && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
|
|
@@ -43053,22 +43065,22 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43053
43065
|
style: { zIndex: 1e3, color: "#a8a3a3" },
|
|
43054
43066
|
onClick: () => {
|
|
43055
43067
|
action(() => (spliceArrayState(o, {
|
|
43056
|
-
startIndex:
|
|
43068
|
+
startIndex: O,
|
|
43057
43069
|
deleteCount: 1
|
|
43058
|
-
}), o.value.splice(
|
|
43070
|
+
}), o.value.splice(O, 1), o.onInput(o.value)));
|
|
43059
43071
|
}
|
|
43060
43072
|
}
|
|
43061
43073
|
) }, "remove") }),
|
|
43062
|
-
/* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index:
|
|
43074
|
+
/* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: O, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: I, children: /* @__PURE__ */ jsx(
|
|
43063
43075
|
NocoBaseRecursionField,
|
|
43064
43076
|
{
|
|
43065
43077
|
onlyRenderProperties: !0,
|
|
43066
|
-
basePath: o.address.concat(
|
|
43078
|
+
basePath: o.address.concat(O),
|
|
43067
43079
|
schema: t
|
|
43068
43080
|
}
|
|
43069
43081
|
) }) }) }) }) }),
|
|
43070
43082
|
/* @__PURE__ */ jsx(Divider$1, {})
|
|
43071
|
-
] },
|
|
43083
|
+
] }, O);
|
|
43072
43084
|
}),
|
|
43073
43085
|
/* @__PURE__ */ jsxs(Space$1, { children: [
|
|
43074
43086
|
o.editable && r && /* @__PURE__ */ jsx(
|
|
@@ -43079,8 +43091,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43079
43091
|
action(() => {
|
|
43080
43092
|
Array.isArray(o.value) || (o.value = []);
|
|
43081
43093
|
const j = o.value.length;
|
|
43082
|
-
return o.value.splice(j, 0, markRecordAsNew({})), each(o.form.fields, (
|
|
43083
|
-
|
|
43094
|
+
return o.value.splice(j, 0, markRecordAsNew({})), each(o.form.fields, (O, B) => {
|
|
43095
|
+
O || delete o.form.fields[B];
|
|
43084
43096
|
}), o.onInput(o.value);
|
|
43085
43097
|
});
|
|
43086
43098
|
}
|
|
@@ -43114,7 +43126,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43114
43126
|
visible: g,
|
|
43115
43127
|
setVisible: f
|
|
43116
43128
|
},
|
|
43117
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: n == null ? void 0 : n.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter:
|
|
43129
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: n == null ? void 0 : n.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: N() }, children: /* @__PURE__ */ jsx(
|
|
43118
43130
|
SchemaComponentOptions,
|
|
43119
43131
|
{
|
|
43120
43132
|
scope: {
|
|
@@ -43161,7 +43173,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43161
43173
|
S.current = t;
|
|
43162
43174
|
const y = useCallback(() => S.current, []);
|
|
43163
43175
|
return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, R) => {
|
|
43164
|
-
const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((
|
|
43176
|
+
const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((O) => O == null ? void 0 : O[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, N = toValue$3(l(D), "N/A"), j = getTabFormatValue(l(u), N, F[o]);
|
|
43165
43177
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43166
43178
|
/* @__PURE__ */ jsx("span", { children: d ? j : n !== !1 ? /* @__PURE__ */ jsx(
|
|
43167
43179
|
"a",
|
|
@@ -43169,9 +43181,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
43169
43181
|
onMouseEnter: () => {
|
|
43170
43182
|
e.setBtnHover(!0);
|
|
43171
43183
|
},
|
|
43172
|
-
onClick: (
|
|
43184
|
+
onClick: (O) => {
|
|
43173
43185
|
var B;
|
|
43174
|
-
e.setBtnHover(!0),
|
|
43186
|
+
e.setBtnHover(!0), O.stopPropagation(), O.preventDefault(), c && !t.properties && (i(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
|
|
43175
43187
|
f({
|
|
43176
43188
|
recordData: F,
|
|
43177
43189
|
parentRecordData: C,
|
|
@@ -43248,9 +43260,9 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43248
43260
|
`, [n.paddingContentVerticalLG, n.marginSM]), f = useCollection(), C = useMemo(
|
|
43249
43261
|
() => d == null ? void 0 : d.map((S) => {
|
|
43250
43262
|
var I, R, T, D;
|
|
43251
|
-
const y = S.reduceProperties((
|
|
43263
|
+
const y = S.reduceProperties((N, j) => {
|
|
43252
43264
|
if (isCollectionFieldComponent(j))
|
|
43253
|
-
return
|
|
43265
|
+
return N.concat([j]);
|
|
43254
43266
|
}, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((I = S["x-component-props"]) != null && I.columnHidden);
|
|
43255
43267
|
return P(x({
|
|
43256
43268
|
title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (R = S["x-component-props"]) == null ? void 0 : R.tooltip }),
|
|
@@ -43260,13 +43272,13 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43260
43272
|
columnHidden: F
|
|
43261
43273
|
}, S["x-component-props"]), {
|
|
43262
43274
|
width: F && !a ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
|
|
43263
|
-
render: (
|
|
43275
|
+
render: (N, j) => {
|
|
43264
43276
|
var w;
|
|
43265
|
-
const
|
|
43266
|
-
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index ||
|
|
43277
|
+
const O = (w = o.value) == null ? void 0 : w.indexOf(j), B = o.address.concat(j.__index || O);
|
|
43278
|
+
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || O, 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 }) }, O) }) }) }) });
|
|
43267
43279
|
},
|
|
43268
|
-
onCell: (
|
|
43269
|
-
record:
|
|
43280
|
+
onCell: (N, j) => ({
|
|
43281
|
+
record: N,
|
|
43270
43282
|
schema: S,
|
|
43271
43283
|
rowIndex: j,
|
|
43272
43284
|
isSubTable: e.isSubTable,
|
|
@@ -43388,7 +43400,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
43388
43400
|
display: none !important;
|
|
43389
43401
|
}
|
|
43390
43402
|
`,
|
|
43391
|
-
itemRender: (D,
|
|
43403
|
+
itemRender: (D, N, j) => N === "prev" ? /* @__PURE__ */ jsxs(
|
|
43392
43404
|
"div",
|
|
43393
43405
|
{
|
|
43394
43406
|
style: { display: "flex" },
|
|
@@ -43596,8 +43608,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43596
43608
|
"onExpand",
|
|
43597
43609
|
"loading",
|
|
43598
43610
|
"onClickRow"
|
|
43599
|
-
]), 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,
|
|
43600
|
-
})), j = usePaginationProps$2(n, i),
|
|
43611
|
+
]), 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, N = useMemoizedFn(b.onRowDragEnd || (() => {
|
|
43612
|
+
})), j = usePaginationProps$2(n, i), O = 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([]), L = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
|
|
43601
43613
|
& > td {
|
|
43602
43614
|
background-color: ${t.controlItemBgActive} !important;
|
|
43603
43615
|
}
|
|
@@ -43640,10 +43652,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43640
43652
|
return;
|
|
43641
43653
|
}
|
|
43642
43654
|
const ie = (ve = (ye = (Se = oe.active) == null ? void 0 : Se.data.current) == null ? void 0 : ye.sortable) == null ? void 0 : ve.index, ae = (Ie = (Fe = (Pe = oe.over) == null ? void 0 : Pe.data.current) == null ? void 0 : Fe.sortable) == null ? void 0 : Ie.index, xe = S.value[ie] || oe.active, Te = S.value[ae] || oe.over;
|
|
43643
|
-
S.move(ie, ae),
|
|
43655
|
+
S.move(ie, ae), N({ from: xe, to: Te });
|
|
43644
43656
|
}, []);
|
|
43645
43657
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, Q)) });
|
|
43646
|
-
}, [S,
|
|
43658
|
+
}, [S, N]);
|
|
43647
43659
|
W.displayName = "BodyWrapperComponent";
|
|
43648
43660
|
const X = useMemo(() => ({
|
|
43649
43661
|
header: {
|
|
@@ -43761,7 +43773,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43761
43773
|
onRow: U,
|
|
43762
43774
|
rowClassName: fe,
|
|
43763
43775
|
scroll: ue,
|
|
43764
|
-
columns:
|
|
43776
|
+
columns: O,
|
|
43765
43777
|
expandable: he,
|
|
43766
43778
|
field: S,
|
|
43767
43779
|
size: v
|
|
@@ -43865,17 +43877,17 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43865
43877
|
}, R = () => {
|
|
43866
43878
|
const z = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((E) => E == null ? void 0 : E[z]).filter(Boolean);
|
|
43867
43879
|
return L.length ? { $and: [{ [`${z}.$ne`]: L }] } : {};
|
|
43868
|
-
}, [T, D] = useState(1), [
|
|
43880
|
+
}, [T, D] = useState(1), [N, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
|
|
43869
43881
|
useEffect(() => {
|
|
43870
43882
|
var z;
|
|
43871
43883
|
j((z = n.componentProps) == null ? void 0 : z.pageSize);
|
|
43872
43884
|
}, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
|
|
43873
|
-
const
|
|
43885
|
+
const O = useMemo(() => {
|
|
43874
43886
|
var L;
|
|
43875
43887
|
const z = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
|
|
43876
43888
|
return {
|
|
43877
43889
|
current: T > z ? z : T,
|
|
43878
|
-
pageSize:
|
|
43890
|
+
pageSize: N || 10,
|
|
43879
43891
|
total: n == null ? void 0 : n.value,
|
|
43880
43892
|
onChange: (q, E) => {
|
|
43881
43893
|
D(q), j(E), n.componentProps.pageSize = E, n.onInput(n.value);
|
|
@@ -43884,7 +43896,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43884
43896
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
43885
43897
|
hideOnSinglePage: !1
|
|
43886
43898
|
};
|
|
43887
|
-
}, [(k = n.value) == null ? void 0 : k.length,
|
|
43899
|
+
}, [(k = n.value) == null ? void 0 : k.length, N, T]), B = () => {
|
|
43888
43900
|
const { field: z } = useAssociationFieldContext();
|
|
43889
43901
|
return {
|
|
43890
43902
|
run() {
|
|
@@ -43909,7 +43921,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43909
43921
|
showIndex: !0,
|
|
43910
43922
|
dragSort: !1,
|
|
43911
43923
|
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (z) => n.editable ? S !== !1 ? !0 : z == null ? void 0 : z.__isNewRecord__ : !1 : !1,
|
|
43912
|
-
pagination:
|
|
43924
|
+
pagination: O,
|
|
43913
43925
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
43914
43926
|
isSubTable: !0,
|
|
43915
43927
|
locale: {
|
|
@@ -44077,11 +44089,11 @@ AssociationSelect.Designer = function e() {
|
|
|
44077
44089
|
var M, $, k, z, L, q, E, G, U, H, J;
|
|
44078
44090
|
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) : [];
|
|
44079
44091
|
c.title === R || c.title;
|
|
44080
|
-
const D = useSortFields(S == null ? void 0 : S.target),
|
|
44092
|
+
const D = useSortFields(S == null ? void 0 : S.target), N = ((L = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : L.sort) || [];
|
|
44081
44093
|
useEffect(() => {
|
|
44082
44094
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
44083
44095
|
}, [u["x-read-pretty"]]);
|
|
44084
|
-
const j =
|
|
44096
|
+
const j = N == null ? void 0 : N.map((K) => K.startsWith("-") ? {
|
|
44085
44097
|
field: K.substring(1),
|
|
44086
44098
|
direction: "desc"
|
|
44087
44099
|
} : {
|
|
@@ -44089,7 +44101,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44089
44101
|
direction: "asc"
|
|
44090
44102
|
});
|
|
44091
44103
|
c.readPretty || c.required;
|
|
44092
|
-
const
|
|
44104
|
+
const O = T.filter((K) => i(K)).map((K) => {
|
|
44093
44105
|
var W;
|
|
44094
44106
|
return {
|
|
44095
44107
|
value: K == null ? void 0 : K.name,
|
|
@@ -44440,7 +44452,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44440
44452
|
SchemaSettingsSelectItem,
|
|
44441
44453
|
{
|
|
44442
44454
|
title: d("Title field"),
|
|
44443
|
-
options:
|
|
44455
|
+
options: O,
|
|
44444
44456
|
value: (J = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : J.label,
|
|
44445
44457
|
onChange: (K) => {
|
|
44446
44458
|
var ee, Z;
|
|
@@ -44473,7 +44485,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44473
44485
|
] });
|
|
44474
44486
|
};
|
|
44475
44487
|
AssociationSelect.FilterDesigner = function e() {
|
|
44476
|
-
var F, I, R, T, D,
|
|
44488
|
+
var F, I, R, T, D, N, j, O, B, w, M;
|
|
44477
44489
|
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) : [];
|
|
44478
44490
|
a.title === f || a.title;
|
|
44479
44491
|
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("-") ? {
|
|
@@ -44597,7 +44609,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44597
44609
|
}
|
|
44598
44610
|
}
|
|
44599
44611
|
),
|
|
44600
|
-
i && !(i != null && i.readPretty) && ((
|
|
44612
|
+
i && !(i != null && i.readPretty) && ((N = m == null ? void 0 : m.uiSchema) == null ? void 0 : N.type) && /* @__PURE__ */ jsx(
|
|
44601
44613
|
SchemaSettingsModalItem,
|
|
44602
44614
|
{
|
|
44603
44615
|
title: c("Set default value"),
|
|
@@ -44628,7 +44640,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44628
44640
|
SchemaSettingsDataScope,
|
|
44629
44641
|
{
|
|
44630
44642
|
collectionName: m == null ? void 0 : m.target,
|
|
44631
|
-
defaultFilter: ((B = (
|
|
44643
|
+
defaultFilter: ((B = (O = (j = a.componentProps) == null ? void 0 : j.service) == null ? void 0 : O.params) == null ? void 0 : B.filter) || {},
|
|
44632
44644
|
form: i,
|
|
44633
44645
|
onSubmit: ({ filter: $ }) => {
|
|
44634
44646
|
$ = removeNullCondition($), _.set(a.componentProps, "service.params.filter", $), l["x-component-props"] = a.componentProps, u.emit("patch", {
|
|
@@ -46302,8 +46314,8 @@ const InternalListBlockProvider = (e) => {
|
|
|
46302
46314
|
return e - u - n.paddingLG - l;
|
|
46303
46315
|
}, InternalList = withSkeletonComponent(
|
|
46304
46316
|
(e) => {
|
|
46305
|
-
var
|
|
46306
|
-
const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (
|
|
46317
|
+
var O, B, w;
|
|
46318
|
+
const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (O = t == null ? void 0 : t.data) == null ? void 0 : O.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(
|
|
46307
46319
|
(M) => (m.has(M) || m.set(
|
|
46308
46320
|
M,
|
|
46309
46321
|
new Schema({
|
|
@@ -46845,16 +46857,16 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
46845
46857
|
if (isShowFilePicker(h))
|
|
46846
46858
|
return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
|
|
46847
46859
|
const b = () => toArr$3(e.value).map((I, R, T) => {
|
|
46848
|
-
const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"),
|
|
46860
|
+
const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"), N = getLabelFormatValue(h, D, !0);
|
|
46849
46861
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46850
|
-
/* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ?
|
|
46862
|
+
/* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? N : /* @__PURE__ */ jsx(
|
|
46851
46863
|
"a",
|
|
46852
46864
|
{
|
|
46853
46865
|
onClick: (j) => {
|
|
46854
|
-
var
|
|
46855
|
-
j.stopPropagation(), j.preventDefault(), l(!0), p(I), (
|
|
46866
|
+
var O;
|
|
46867
|
+
j.stopPropagation(), j.preventDefault(), l(!0), p(I), (O = C == null ? void 0 : C.current) == null || O.setPopoverVisible(!1);
|
|
46856
46868
|
},
|
|
46857
|
-
children:
|
|
46869
|
+
children: N
|
|
46858
46870
|
}
|
|
46859
46871
|
) }),
|
|
46860
46872
|
R < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
|
|
@@ -47684,8 +47696,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
47684
47696
|
"aria-label": `checkbox-${y.name}`
|
|
47685
47697
|
}),
|
|
47686
47698
|
renderCell: (y, v, F, I) => {
|
|
47687
|
-
var D,
|
|
47688
|
-
const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = ((
|
|
47699
|
+
var D, N;
|
|
47700
|
+
const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = ((N = e == null ? void 0 : e.pagination) == null ? void 0 : N.pageSize) || 20;
|
|
47689
47701
|
return R && (F = F + (R - 1) * T), /* @__PURE__ */ jsxs(
|
|
47690
47702
|
"div",
|
|
47691
47703
|
{
|
|
@@ -48270,8 +48282,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48270
48282
|
"sort-field"
|
|
48271
48283
|
);
|
|
48272
48284
|
}, TableBlockDesigner = () => {
|
|
48273
|
-
var T, D,
|
|
48274
|
-
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 = ((
|
|
48285
|
+
var T, D, N, j, O, B, w, M, $, k, z;
|
|
48286
|
+
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 = ((N = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : N.resource) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((O = i == null ? void 0 : i["x-decorator-props"]) != null && O.disableTemplate), f = m == null ? void 0 : m.map((L) => L != null && L.startsWith("-") ? {
|
|
48275
48287
|
field: L.substring(1),
|
|
48276
48288
|
direction: "desc"
|
|
48277
48289
|
} : {
|
|
@@ -48516,7 +48528,7 @@ TableField.ActionBar = observer$1(
|
|
|
48516
48528
|
{ displayName: "TableField.ActionBar" }
|
|
48517
48529
|
);
|
|
48518
48530
|
const TableSelectorDesigner = () => {
|
|
48519
|
-
var R, T, D,
|
|
48531
|
+
var R, T, D, N, j, O;
|
|
48520
48532
|
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("-") ? {
|
|
48521
48533
|
field: B.substring(1),
|
|
48522
48534
|
direction: "desc"
|
|
@@ -48528,7 +48540,7 @@ const TableSelectorDesigner = () => {
|
|
|
48528
48540
|
/* @__PURE__ */ jsx(
|
|
48529
48541
|
SchemaSettingsDataScope,
|
|
48530
48542
|
{
|
|
48531
|
-
defaultFilter: ((
|
|
48543
|
+
defaultFilter: ((N = (D = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : N.filter) || {},
|
|
48532
48544
|
form: a,
|
|
48533
48545
|
onSubmit: ({ filter: B }) => {
|
|
48534
48546
|
var $;
|
|
@@ -48674,7 +48686,7 @@ const TableSelectorDesigner = () => {
|
|
|
48674
48686
|
SchemaSettingsSelectItem,
|
|
48675
48687
|
{
|
|
48676
48688
|
title: d("Records per page"),
|
|
48677
|
-
value: ((
|
|
48689
|
+
value: ((O = (j = r.decoratorProps) == null ? void 0 : j.params) == null ? void 0 : O.pageSize) || 20,
|
|
48678
48690
|
options: [
|
|
48679
48691
|
{ label: "5", value: 5 },
|
|
48680
48692
|
{ label: "10", value: 10 },
|
|
@@ -50138,14 +50150,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50138
50150
|
const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (R = r(F)) == null ? void 0 : R.fields;
|
|
50139
50151
|
if (I) {
|
|
50140
50152
|
const T = I == null ? void 0 : I.filter((D) => supportTypes.includes(D.type)).map((D) => {
|
|
50141
|
-
var
|
|
50153
|
+
var N;
|
|
50142
50154
|
return {
|
|
50143
50155
|
value: D.name,
|
|
50144
|
-
label: g(((
|
|
50156
|
+
label: g(((N = D.uiSchema) == null ? void 0 : N.title) || D.name)
|
|
50145
50157
|
};
|
|
50146
50158
|
});
|
|
50147
50159
|
if (o(T), y(T), h) {
|
|
50148
|
-
const D = T.find((
|
|
50160
|
+
const D = T.find((N) => N.value === h);
|
|
50149
50161
|
b((D == null ? void 0 : D.label) || h);
|
|
50150
50162
|
}
|
|
50151
50163
|
}
|
|
@@ -50157,16 +50169,16 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50157
50169
|
options: n,
|
|
50158
50170
|
showSearch: !0,
|
|
50159
50171
|
onDropdownVisibleChange: (F) => V(void 0, null, function* () {
|
|
50160
|
-
var
|
|
50172
|
+
var N;
|
|
50161
50173
|
const { target: I, type: R, through: T } = f.values, D = ["belongsTo"].includes(R) ? l || p : ["belongsToMany"].includes(R) ? T : I;
|
|
50162
50174
|
if (D && F) {
|
|
50163
|
-
const j = ((
|
|
50175
|
+
const j = ((N = r(D)) == null ? void 0 : N.fields) || [];
|
|
50164
50176
|
o(
|
|
50165
|
-
j == null ? void 0 : j.filter((
|
|
50177
|
+
j == null ? void 0 : j.filter((O) => supportTypes.includes(O.type)).map((O) => {
|
|
50166
50178
|
var B;
|
|
50167
50179
|
return {
|
|
50168
|
-
value:
|
|
50169
|
-
label: g(((B =
|
|
50180
|
+
value: O.name,
|
|
50181
|
+
label: g(((B = O.uiSchema) == null ? void 0 : B.title) || O.name)
|
|
50170
50182
|
};
|
|
50171
50183
|
})
|
|
50172
50184
|
);
|
|
@@ -50355,8 +50367,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50355
50367
|
const t = useRecord();
|
|
50356
50368
|
return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
|
|
50357
50369
|
}, AddFieldAction = (e) => {
|
|
50358
|
-
var
|
|
50359
|
-
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 = (
|
|
50370
|
+
var O, B;
|
|
50371
|
+
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 = (O = p(o.name)) == null ? void 0 : O.options) == null ? void 0 : B.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
|
|
50360
50372
|
label: S(w.title),
|
|
50361
50373
|
value: w.name
|
|
50362
50374
|
})), []), T = useCallback(() => {
|
|
@@ -50408,7 +50420,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50408
50420
|
}).filter((w) => {
|
|
50409
50421
|
var M;
|
|
50410
50422
|
return (M = w == null ? void 0 : w.children) == null ? void 0 : M.length;
|
|
50411
|
-
}), [T]),
|
|
50423
|
+
}), [T]), N = useMemo(() => ({
|
|
50412
50424
|
style: {
|
|
50413
50425
|
maxHeight: "60vh",
|
|
50414
50426
|
overflow: "auto"
|
|
@@ -50428,7 +50440,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50428
50440
|
};
|
|
50429
50441
|
}), [I == null ? void 0 : I.length]);
|
|
50430
50442
|
return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
|
|
50431
|
-
/* @__PURE__ */ jsx(Dropdown, { getPopupContainer: n, trigger: i, align: a, menu:
|
|
50443
|
+
/* @__PURE__ */ jsx(Dropdown, { getPopupContainer: n, trigger: i, align: a, menu: N, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
|
|
50432
50444
|
/* @__PURE__ */ jsx(
|
|
50433
50445
|
SchemaComponent,
|
|
50434
50446
|
{
|
|
@@ -50554,16 +50566,16 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50554
50566
|
"a",
|
|
50555
50567
|
P(x({}, a), {
|
|
50556
50568
|
onClick: () => V(void 0, null, function* () {
|
|
50557
|
-
var j,
|
|
50569
|
+
var j, O;
|
|
50558
50570
|
const { data: R } = yield g.resource("collections.fields", o.collectionName).get({
|
|
50559
50571
|
filterByTk: o.name,
|
|
50560
50572
|
appends: ["reverseField"]
|
|
50561
50573
|
});
|
|
50562
50574
|
S(R == null ? void 0 : R.data);
|
|
50563
50575
|
const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
|
|
50564
|
-
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", (
|
|
50565
|
-
const
|
|
50566
|
-
h(
|
|
50576
|
+
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", (O = o.__parent) == null ? void 0 : O.title));
|
|
50577
|
+
const N = getSchema$7(T, D, o, C);
|
|
50578
|
+
h(N), p(!0);
|
|
50567
50579
|
}),
|
|
50568
50580
|
children: i || f("Edit")
|
|
50569
50581
|
})
|
|
@@ -50658,7 +50670,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50658
50670
|
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) => {
|
|
50659
50671
|
var M;
|
|
50660
50672
|
return B && ((M = m(B)) == null ? void 0 : M.map(($) => $.name).concat([B]));
|
|
50661
|
-
}, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o),
|
|
50673
|
+
}, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), N = useMemo(() => h.map((B) => ({
|
|
50662
50674
|
label: v(B.title),
|
|
50663
50675
|
value: B.name
|
|
50664
50676
|
})), []), j = () => {
|
|
@@ -50685,7 +50697,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50685
50697
|
});
|
|
50686
50698
|
}
|
|
50687
50699
|
};
|
|
50688
|
-
},
|
|
50700
|
+
}, O = useMemo(() => {
|
|
50689
50701
|
var B;
|
|
50690
50702
|
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) => {
|
|
50691
50703
|
var M;
|
|
@@ -50737,8 +50749,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50737
50749
|
override: !0,
|
|
50738
50750
|
isOverride: !0,
|
|
50739
50751
|
targetScope: { target: F(l), through: F(c) },
|
|
50740
|
-
collections:
|
|
50741
|
-
scopeKeyOptions:
|
|
50752
|
+
collections: N,
|
|
50753
|
+
scopeKeyOptions: O
|
|
50742
50754
|
}, t)
|
|
50743
50755
|
}
|
|
50744
50756
|
)
|
|
@@ -51225,7 +51237,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51225
51237
|
}
|
|
51226
51238
|
}).catch);
|
|
51227
51239
|
}, [t]);
|
|
51228
|
-
const
|
|
51240
|
+
const O = (w, M) => {
|
|
51229
51241
|
d.splice(M, 1, w), p(d), S.value = d.map(($) => {
|
|
51230
51242
|
var z, L, q;
|
|
51231
51243
|
const k = typeof $.source == "string" ? $.source : (q = (L = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : L.call(z, Boolean)) == null ? void 0 : q.join(".");
|
|
@@ -51255,7 +51267,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51255
51267
|
onChange: (k, z) => {
|
|
51256
51268
|
var q;
|
|
51257
51269
|
const L = (q = I(k == null ? void 0 : k[0])) == null ? void 0 : q.find((E) => E.name === last(k));
|
|
51258
|
-
|
|
51270
|
+
O(P(x({}, M), { source: k, uiSchema: L == null ? void 0 : L.uiSchema }), $);
|
|
51259
51271
|
},
|
|
51260
51272
|
placeholder: l("Select field source")
|
|
51261
51273
|
}
|
|
@@ -51275,7 +51287,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51275
51287
|
popupMatchSelectWidth: !1,
|
|
51276
51288
|
style: { width: "100%" },
|
|
51277
51289
|
options: (k == null ? void 0 : k.possibleTypes.map((z) => ({ label: z, value: z }))) || [],
|
|
51278
|
-
onChange: (z) =>
|
|
51290
|
+
onChange: (z) => O(P(x({}, k), { type: z }), $)
|
|
51279
51291
|
}
|
|
51280
51292
|
);
|
|
51281
51293
|
}
|
|
@@ -51296,7 +51308,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51296
51308
|
onChange: (L) => {
|
|
51297
51309
|
var E;
|
|
51298
51310
|
const q = F(L);
|
|
51299
|
-
|
|
51311
|
+
O(P(x({}, k), { interface: L, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), $);
|
|
51300
51312
|
},
|
|
51301
51313
|
children: z.map((L) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(L.label), children: L.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, L.key))
|
|
51302
51314
|
}
|
|
@@ -51315,7 +51327,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51315
51327
|
Input$3,
|
|
51316
51328
|
{
|
|
51317
51329
|
defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
|
|
51318
|
-
onChange: (L) =>
|
|
51330
|
+
onChange: (L) => O(
|
|
51319
51331
|
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: L.target.value }) }),
|
|
51320
51332
|
$
|
|
51321
51333
|
)
|
|
@@ -51370,8 +51382,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51370
51382
|
}, S = (y) => {
|
|
51371
51383
|
var v;
|
|
51372
51384
|
return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
|
|
51373
|
-
var
|
|
51374
|
-
const I = typeof (F == null ? void 0 : F.source) == "string" ? (
|
|
51385
|
+
var N, j, O, B, w, M;
|
|
51386
|
+
const I = typeof (F == null ? void 0 : F.source) == "string" ? (N = F == null ? void 0 : F.source) == null ? void 0 : N.split(".") : F == null ? void 0 : F.source, R = (O = (j = h(I == null ? void 0 : I[0])) == null ? void 0 : j.find(($) => $.name === (I == null ? void 0 : I[1]))) == null ? void 0 : O.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;
|
|
51375
51387
|
return {
|
|
51376
51388
|
title: u(T),
|
|
51377
51389
|
dataIndex: F.name,
|
|
@@ -51610,20 +51622,20 @@ const AsyncDataProvider = (e) => {
|
|
|
51610
51622
|
() => h.filter((T) => !["relation"].includes(T.key)).map((T, D) => ({
|
|
51611
51623
|
key: D,
|
|
51612
51624
|
label: d(T.label),
|
|
51613
|
-
options: T.children.map((
|
|
51614
|
-
value:
|
|
51625
|
+
options: T.children.map((N, j) => ({
|
|
51626
|
+
value: N.name,
|
|
51615
51627
|
key: `${D}-${j}`,
|
|
51616
|
-
label: d(
|
|
51628
|
+
label: d(N.label)
|
|
51617
51629
|
}))
|
|
51618
51630
|
})),
|
|
51619
51631
|
[d]
|
|
51620
51632
|
), f = useSourceFieldsOptions(), C = useRef(p);
|
|
51621
51633
|
if (useEffect(() => {
|
|
51622
|
-
var
|
|
51634
|
+
var N;
|
|
51623
51635
|
const T = /* @__PURE__ */ new Map();
|
|
51624
|
-
i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j,
|
|
51636
|
+
i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j, O]) => {
|
|
51625
51637
|
var k;
|
|
51626
|
-
const B = l[j], w = inferInterface(j,
|
|
51638
|
+
const B = l[j], w = inferInterface(j, O), M = (k = C.current(w)) == null ? void 0 : k.default, $ = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
|
|
51627
51639
|
T.set(j, {
|
|
51628
51640
|
name: j,
|
|
51629
51641
|
interface: (B == null ? void 0 : B.interface) || w,
|
|
@@ -51634,15 +51646,15 @@ const AsyncDataProvider = (e) => {
|
|
|
51634
51646
|
}, $)
|
|
51635
51647
|
});
|
|
51636
51648
|
}) : Object.entries(l || {}).forEach(
|
|
51637
|
-
([j,
|
|
51649
|
+
([j, O]) => T.set(j, P(x({
|
|
51638
51650
|
name: j,
|
|
51639
51651
|
type: "string"
|
|
51640
|
-
},
|
|
51652
|
+
}, O), {
|
|
51641
51653
|
uiSchema: x({
|
|
51642
51654
|
title: j
|
|
51643
|
-
}, (
|
|
51655
|
+
}, (O == null ? void 0 : O.uiSchema) || {})
|
|
51644
51656
|
}))
|
|
51645
|
-
)), (
|
|
51657
|
+
)), (N = c.value) != null && N.length && c.value.forEach((j) => {
|
|
51646
51658
|
T.has(j.name) && T.set(j.name, j);
|
|
51647
51659
|
});
|
|
51648
51660
|
const D = Array.from(T.values());
|
|
@@ -51658,12 +51670,12 @@ const AsyncDataProvider = (e) => {
|
|
|
51658
51670
|
return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${T}`, type: "error" });
|
|
51659
51671
|
}
|
|
51660
51672
|
const S = (T, D) => {
|
|
51661
|
-
const
|
|
51662
|
-
|
|
51663
|
-
|
|
51664
|
-
var
|
|
51673
|
+
const N = [...t];
|
|
51674
|
+
N.splice(D, 1, T), n(N), c.setValue(
|
|
51675
|
+
N.map((j) => {
|
|
51676
|
+
var O, B, w;
|
|
51665
51677
|
return P(x({}, j), {
|
|
51666
|
-
source: typeof j.source == "string" ? j.source : ((w = (B = (
|
|
51678
|
+
source: typeof j.source == "string" ? j.source : ((w = (B = (O = j.source) == null ? void 0 : O.filter) == null ? void 0 : B.call(O, Boolean)) == null ? void 0 : w.join(".")) || null
|
|
51667
51679
|
});
|
|
51668
51680
|
})
|
|
51669
51681
|
);
|
|
@@ -51679,8 +51691,8 @@ const AsyncDataProvider = (e) => {
|
|
|
51679
51691
|
dataIndex: "source",
|
|
51680
51692
|
key: "source",
|
|
51681
51693
|
width: 200,
|
|
51682
|
-
render: (T, D,
|
|
51683
|
-
const j = t[
|
|
51694
|
+
render: (T, D, N) => {
|
|
51695
|
+
const j = t[N];
|
|
51684
51696
|
return /* @__PURE__ */ jsx(
|
|
51685
51697
|
Cascader$1,
|
|
51686
51698
|
{
|
|
@@ -51688,16 +51700,16 @@ const AsyncDataProvider = (e) => {
|
|
|
51688
51700
|
allowClear: !0,
|
|
51689
51701
|
options: d(f),
|
|
51690
51702
|
placeholder: e("Select field source"),
|
|
51691
|
-
onChange: (
|
|
51692
|
-
let B = l[
|
|
51693
|
-
B != null && B.interface || (B = m((
|
|
51703
|
+
onChange: (O) => {
|
|
51704
|
+
let B = l[O == null ? void 0 : O[1]];
|
|
51705
|
+
B != null && B.interface || (B = m((O == null ? void 0 : O.join(".")) || "")), S(
|
|
51694
51706
|
P(x({}, j), {
|
|
51695
|
-
source:
|
|
51707
|
+
source: O,
|
|
51696
51708
|
interface: B == null ? void 0 : B.interface,
|
|
51697
51709
|
type: B == null ? void 0 : B.type,
|
|
51698
51710
|
uiSchema: B == null ? void 0 : B.uiSchema
|
|
51699
51711
|
}),
|
|
51700
|
-
|
|
51712
|
+
N
|
|
51701
51713
|
);
|
|
51702
51714
|
}
|
|
51703
51715
|
}
|
|
@@ -51709,10 +51721,10 @@ const AsyncDataProvider = (e) => {
|
|
|
51709
51721
|
dataIndex: "interface",
|
|
51710
51722
|
key: "interface",
|
|
51711
51723
|
width: 150,
|
|
51712
|
-
render: (T, D,
|
|
51713
|
-
var
|
|
51714
|
-
const j = t[
|
|
51715
|
-
return j.source ? /* @__PURE__ */ jsx(Tag, { children: d((
|
|
51724
|
+
render: (T, D, N) => {
|
|
51725
|
+
var O;
|
|
51726
|
+
const j = t[N];
|
|
51727
|
+
return j.source ? /* @__PURE__ */ jsx(Tag, { children: d((O = p(T)) == null ? void 0 : O.title) || T }) : /* @__PURE__ */ jsx(
|
|
51716
51728
|
Select$1,
|
|
51717
51729
|
{
|
|
51718
51730
|
defaultValue: j.interface || "input",
|
|
@@ -51729,7 +51741,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51729
51741
|
}),
|
|
51730
51742
|
type: (L = w == null ? void 0 : w.default) == null ? void 0 : L.type
|
|
51731
51743
|
}),
|
|
51732
|
-
|
|
51744
|
+
N
|
|
51733
51745
|
);
|
|
51734
51746
|
},
|
|
51735
51747
|
allowClear: !0,
|
|
@@ -51743,15 +51755,15 @@ const AsyncDataProvider = (e) => {
|
|
|
51743
51755
|
dataIndex: "title",
|
|
51744
51756
|
key: "title",
|
|
51745
51757
|
width: 180,
|
|
51746
|
-
render: (T, D,
|
|
51747
|
-
var
|
|
51748
|
-
const j = t[
|
|
51758
|
+
render: (T, D, N) => {
|
|
51759
|
+
var O, B;
|
|
51760
|
+
const j = t[N];
|
|
51749
51761
|
return /* @__PURE__ */ jsx(
|
|
51750
51762
|
Input$3,
|
|
51751
51763
|
{
|
|
51752
|
-
value: ((
|
|
51764
|
+
value: ((O = j.uiSchema) == null ? void 0 : O.title) || T,
|
|
51753
51765
|
defaultValue: ((B = j.uiSchema) == null ? void 0 : B.title) !== void 0 ? j.uiSchema.title : j == null ? void 0 : j.name,
|
|
51754
|
-
onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }),
|
|
51766
|
+
onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }), N)
|
|
51755
51767
|
}
|
|
51756
51768
|
);
|
|
51757
51769
|
}
|
|
@@ -57740,7 +57752,7 @@ const RolesResourcesActions = connect((e) => {
|
|
|
57740
57752
|
const T = p[I.name] || {
|
|
57741
57753
|
name: I.name
|
|
57742
57754
|
};
|
|
57743
|
-
R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (
|
|
57755
|
+
R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (N) => N.name), p[I.name] = T, t(Object.values(p));
|
|
57744
57756
|
}
|
|
57745
57757
|
}
|
|
57746
57758
|
),
|
|
@@ -57753,15 +57765,15 @@ const RolesResourcesActions = connect((e) => {
|
|
|
57753
57765
|
checked: T,
|
|
57754
57766
|
"aria-label": `${I.name}_checkbox`,
|
|
57755
57767
|
onChange: () => {
|
|
57756
|
-
const
|
|
57768
|
+
const N = p[I.name] || {
|
|
57757
57769
|
name: I.name
|
|
57758
|
-
}, j =
|
|
57770
|
+
}, j = N.fields || [];
|
|
57759
57771
|
if (T) {
|
|
57760
|
-
const
|
|
57761
|
-
j.splice(
|
|
57772
|
+
const O = j.indexOf(D.name);
|
|
57773
|
+
j.splice(O, 1);
|
|
57762
57774
|
} else
|
|
57763
57775
|
j.push(D.name);
|
|
57764
|
-
|
|
57776
|
+
N.fields = j, p[I.name] = N, t(Object.values(p));
|
|
57765
57777
|
}
|
|
57766
57778
|
}
|
|
57767
57779
|
)
|
|
@@ -58516,9 +58528,9 @@ function PluginInfo(e) {
|
|
|
58516
58528
|
y.silent().request({
|
|
58517
58529
|
url: "__health_check",
|
|
58518
58530
|
method: "get"
|
|
58519
|
-
}).then((
|
|
58520
|
-
(
|
|
58521
|
-
}).catch((
|
|
58531
|
+
}).then((N) => {
|
|
58532
|
+
(N == null ? void 0 : N.data) === "ok" && window.location.reload();
|
|
58533
|
+
}).catch((N) => {
|
|
58522
58534
|
});
|
|
58523
58535
|
}
|
|
58524
58536
|
setInterval(D, 1e3);
|
|
@@ -59963,48 +59975,6 @@ const ActionInitializerItem = (e) => {
|
|
|
59963
59975
|
}
|
|
59964
59976
|
};
|
|
59965
59977
|
return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
|
|
59966
|
-
}, RefreshActionInitializer = (e) => {
|
|
59967
|
-
const t = {
|
|
59968
|
-
title: '{{ t("Refresh") }}',
|
|
59969
|
-
"x-action": "refresh",
|
|
59970
|
-
"x-component": "Action",
|
|
59971
|
-
"x-use-component-props": "useRefreshActionProps",
|
|
59972
|
-
"x-toolbar": "ActionSchemaToolbar",
|
|
59973
|
-
"x-settings": "actionSettings:refresh",
|
|
59974
|
-
"x-component-props": {
|
|
59975
|
-
icon: "ReloadOutlined"
|
|
59976
|
-
}
|
|
59977
|
-
};
|
|
59978
|
-
return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
|
|
59979
|
-
}, CreateSubmitActionInitializer = (e) => {
|
|
59980
|
-
const t = {
|
|
59981
|
-
title: '{{ t("Submit") }}',
|
|
59982
|
-
"x-action": "submit",
|
|
59983
|
-
"x-component": "Action",
|
|
59984
|
-
"x-use-component-props": "useCreateActionProps",
|
|
59985
|
-
"x-toolbar": "ActionSchemaToolbar",
|
|
59986
|
-
"x-settings": "actionSettings:createSubmit",
|
|
59987
|
-
"x-component-props": {
|
|
59988
|
-
type: "primary",
|
|
59989
|
-
htmlType: "submit"
|
|
59990
|
-
}
|
|
59991
|
-
};
|
|
59992
|
-
return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
|
|
59993
|
-
}, UpdateSubmitActionInitializer = (e) => {
|
|
59994
|
-
const t = {
|
|
59995
|
-
title: '{{ t("Submit") }}',
|
|
59996
|
-
"x-action": "submit",
|
|
59997
|
-
"x-component": "Action",
|
|
59998
|
-
"x-use-component-props": "useUpdateActionProps",
|
|
59999
|
-
// 'x-designer': 'Action.Designer',
|
|
60000
|
-
"x-toolbar": "ActionSchemaToolbar",
|
|
60001
|
-
"x-settings": "actionSettings:updateSubmit",
|
|
60002
|
-
"x-component-props": {
|
|
60003
|
-
type: "primary",
|
|
60004
|
-
htmlType: "submit"
|
|
60005
|
-
}
|
|
60006
|
-
};
|
|
60007
|
-
return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
|
|
60008
59978
|
}, ActionBarAssociationFilterAction = (e) => {
|
|
60009
59979
|
const t = useRefreshFieldSchema(), n = useFieldSchema(), o = useAPIClient(), { t: r } = useTranslation(), i = createDesignable({ t: r, api: o, refresh: t, current: n }), { service: a, props: l } = useBlockRequestContext();
|
|
60010
59980
|
i.loadAPIClientEvents();
|
|
@@ -60291,15 +60261,15 @@ const ActionInitializerItem = (e) => {
|
|
|
60291
60261
|
), 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 = {
|
|
60292
60262
|
title: R || I,
|
|
60293
60263
|
key: I
|
|
60294
|
-
}, [D,
|
|
60264
|
+
}, [D, N] = useState([]), [j, O] = useState(a.default || []), [B, w] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
|
|
60295
60265
|
if (useEffect(() => {
|
|
60296
|
-
a.default && (d(a.default),
|
|
60266
|
+
a.default && (d(a.default), O(a.default));
|
|
60297
60267
|
}, [a.default, d]), !i)
|
|
60298
60268
|
return null;
|
|
60299
60269
|
const $ = (K) => {
|
|
60300
|
-
|
|
60270
|
+
N(K), w(!1);
|
|
60301
60271
|
}, k = (K) => {
|
|
60302
|
-
|
|
60272
|
+
O(K), d(K), p == null || p(K);
|
|
60303
60273
|
}, z = (K) => {
|
|
60304
60274
|
var X;
|
|
60305
60275
|
const W = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
|
|
@@ -60790,7 +60760,7 @@ const DataBlockInitializer = (e) => {
|
|
|
60790
60760
|
onClick: T,
|
|
60791
60761
|
currentText: b,
|
|
60792
60762
|
otherText: S
|
|
60793
|
-
}),
|
|
60763
|
+
}), N = useGetSchemaInitializerMenuItems(T), j = useMemo(() => N(D, i), [N, D, i]), [O, B] = useState([]), w = useMenuSearch({ data: j, openKeys: O, hideSearch: u }), M = useMemo(() => {
|
|
60794
60764
|
let z = w.filter((L) => L.key !== "search" && L.key !== "empty");
|
|
60795
60765
|
return p && z.length === 1 ? z = z[0].children : z = w, [
|
|
60796
60766
|
{
|
|
@@ -61660,7 +61630,61 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
61660
61630
|
useCreateAssociationListBlock,
|
|
61661
61631
|
useCreateAssociationTableBlock,
|
|
61662
61632
|
useMenuSearch
|
|
61663
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
61633
|
+
}, Symbol.toStringTag, { value: "Module" })), LinkActionInitializer = (e) => {
|
|
61634
|
+
const t = {
|
|
61635
|
+
type: "void",
|
|
61636
|
+
title: '{{ t("Link") }}',
|
|
61637
|
+
"x-action": "customize:link",
|
|
61638
|
+
"x-toolbar": "ActionSchemaToolbar",
|
|
61639
|
+
"x-settings": "actionSettings:link",
|
|
61640
|
+
"x-component": (e == null ? void 0 : e["x-component"]) || "Action.Link",
|
|
61641
|
+
"x-use-component-props": "useLinkActionProps",
|
|
61642
|
+
"x-decorator": "ACLActionProvider"
|
|
61643
|
+
}, n = useSchemaInitializerItem();
|
|
61644
|
+
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { schema: t, item: n }));
|
|
61645
|
+
}, RefreshActionInitializer = (e) => {
|
|
61646
|
+
const t = {
|
|
61647
|
+
title: '{{ t("Refresh") }}',
|
|
61648
|
+
"x-action": "refresh",
|
|
61649
|
+
"x-component": "Action",
|
|
61650
|
+
"x-use-component-props": "useRefreshActionProps",
|
|
61651
|
+
"x-toolbar": "ActionSchemaToolbar",
|
|
61652
|
+
"x-settings": "actionSettings:refresh",
|
|
61653
|
+
"x-component-props": {
|
|
61654
|
+
icon: "ReloadOutlined"
|
|
61655
|
+
}
|
|
61656
|
+
};
|
|
61657
|
+
return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
|
|
61658
|
+
}, CreateSubmitActionInitializer = (e) => {
|
|
61659
|
+
const t = {
|
|
61660
|
+
title: '{{ t("Submit") }}',
|
|
61661
|
+
"x-action": "submit",
|
|
61662
|
+
"x-component": "Action",
|
|
61663
|
+
"x-use-component-props": "useCreateActionProps",
|
|
61664
|
+
"x-toolbar": "ActionSchemaToolbar",
|
|
61665
|
+
"x-settings": "actionSettings:createSubmit",
|
|
61666
|
+
"x-component-props": {
|
|
61667
|
+
type: "primary",
|
|
61668
|
+
htmlType: "submit"
|
|
61669
|
+
}
|
|
61670
|
+
};
|
|
61671
|
+
return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
|
|
61672
|
+
}, UpdateSubmitActionInitializer = (e) => {
|
|
61673
|
+
const t = {
|
|
61674
|
+
title: '{{ t("Submit") }}',
|
|
61675
|
+
"x-action": "submit",
|
|
61676
|
+
"x-component": "Action",
|
|
61677
|
+
"x-use-component-props": "useUpdateActionProps",
|
|
61678
|
+
// 'x-designer': 'Action.Designer',
|
|
61679
|
+
"x-toolbar": "ActionSchemaToolbar",
|
|
61680
|
+
"x-settings": "actionSettings:updateSubmit",
|
|
61681
|
+
"x-component-props": {
|
|
61682
|
+
type: "primary",
|
|
61683
|
+
htmlType: "submit"
|
|
61684
|
+
}
|
|
61685
|
+
};
|
|
61686
|
+
return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
|
|
61687
|
+
}, UpdateRecordActionInitializer = (e) => {
|
|
61664
61688
|
const t = {
|
|
61665
61689
|
title: '{{ t("Update record") }}',
|
|
61666
61690
|
"x-component": (e == null ? void 0 : e["x-component"]) || "Action.Link",
|
|
@@ -61682,7 +61706,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
61682
61706
|
}
|
|
61683
61707
|
}, n = useSchemaInitializerItem();
|
|
61684
61708
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { schema: t, item: n }));
|
|
61685
|
-
}, PopupActionInitializer = (e) => {
|
|
61709
|
+
}, PopupActionDecorator = (e) => /* @__PURE__ */ jsx(ClearCollectionFieldContext, { children: /* @__PURE__ */ jsx(ACLActionProvider, { children: e.children }) }), PopupActionInitializer = (e) => {
|
|
61686
61710
|
const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
|
|
61687
61711
|
type: "void",
|
|
61688
61712
|
title: '{{ t("Popup") }}',
|
|
@@ -61694,7 +61718,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
61694
61718
|
openMode: t,
|
|
61695
61719
|
refreshDataBlockRequest: !0
|
|
61696
61720
|
},
|
|
61697
|
-
"x-decorator": "
|
|
61721
|
+
"x-decorator": "PopupActionDecorator",
|
|
61698
61722
|
properties: {
|
|
61699
61723
|
drawer: {
|
|
61700
61724
|
type: "void",
|
|
@@ -61733,18 +61757,121 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
61733
61757
|
[CONTEXT_SCHEMA_KEY]: n()
|
|
61734
61758
|
}, r = useSchemaInitializerItem();
|
|
61735
61759
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
|
|
61736
|
-
},
|
|
61737
|
-
const t = {
|
|
61760
|
+
}, AssociateActionInitializer = (e) => {
|
|
61761
|
+
const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
|
|
61738
61762
|
type: "void",
|
|
61739
|
-
title: '{{ t("
|
|
61740
|
-
"x-action": "
|
|
61763
|
+
title: '{{ t("Associate") }}',
|
|
61764
|
+
"x-action": "associate",
|
|
61741
61765
|
"x-toolbar": "ActionSchemaToolbar",
|
|
61742
|
-
"x-settings": "actionSettings:
|
|
61743
|
-
"x-component":
|
|
61744
|
-
"x-
|
|
61745
|
-
|
|
61746
|
-
|
|
61747
|
-
|
|
61766
|
+
"x-settings": "actionSettings:popup",
|
|
61767
|
+
"x-component": "Action",
|
|
61768
|
+
"x-component-props": {
|
|
61769
|
+
openMode: t,
|
|
61770
|
+
refreshDataBlockRequest: !0
|
|
61771
|
+
},
|
|
61772
|
+
properties: {
|
|
61773
|
+
drawer: {
|
|
61774
|
+
type: "void",
|
|
61775
|
+
"x-component": "Action.Container",
|
|
61776
|
+
title: '{{ t("Select record") }}',
|
|
61777
|
+
"x-component-props": {
|
|
61778
|
+
className: "nb-record-picker-selector"
|
|
61779
|
+
},
|
|
61780
|
+
"x-decorator": "AssociateActionProvider",
|
|
61781
|
+
properties: {
|
|
61782
|
+
grid: {
|
|
61783
|
+
type: "void",
|
|
61784
|
+
"x-component": "Grid",
|
|
61785
|
+
"x-initializer": "popup:tableSelector:addBlock",
|
|
61786
|
+
properties: {}
|
|
61787
|
+
},
|
|
61788
|
+
footer: {
|
|
61789
|
+
"x-component": "Action.Container.Footer",
|
|
61790
|
+
"x-component-props": {},
|
|
61791
|
+
properties: {
|
|
61792
|
+
actions: {
|
|
61793
|
+
type: "void",
|
|
61794
|
+
"x-component": "ActionBar",
|
|
61795
|
+
"x-component-props": {},
|
|
61796
|
+
properties: {
|
|
61797
|
+
submit: {
|
|
61798
|
+
title: '{{ t("Submit") }}',
|
|
61799
|
+
"x-action": "submit",
|
|
61800
|
+
"x-component": "Action",
|
|
61801
|
+
"x-use-component-props": "usePickActionProps",
|
|
61802
|
+
"x-toolbar": "ActionSchemaToolbar",
|
|
61803
|
+
"x-settings": "actionSettings:submit",
|
|
61804
|
+
"x-component-props": {
|
|
61805
|
+
type: "primary",
|
|
61806
|
+
htmlType: "submit"
|
|
61807
|
+
}
|
|
61808
|
+
}
|
|
61809
|
+
}
|
|
61810
|
+
}
|
|
61811
|
+
}
|
|
61812
|
+
}
|
|
61813
|
+
}
|
|
61814
|
+
}
|
|
61815
|
+
},
|
|
61816
|
+
[CONTEXT_SCHEMA_KEY]: n()
|
|
61817
|
+
}, r = useSchemaInitializerItem();
|
|
61818
|
+
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
|
|
61819
|
+
}, useTableSelectorProps = () => {
|
|
61820
|
+
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = Y(r, ["onRowSelectionChange", "rowKey"]);
|
|
61821
|
+
return P(x({}, o), {
|
|
61822
|
+
rowKey: n,
|
|
61823
|
+
rowSelection: {
|
|
61824
|
+
type: "checkbox"
|
|
61825
|
+
},
|
|
61826
|
+
onRowSelectionChange(i, a) {
|
|
61827
|
+
e == null || e(i), t == null || t(i, a);
|
|
61828
|
+
}
|
|
61829
|
+
});
|
|
61830
|
+
}, AssociateActionProvider = (e) => {
|
|
61831
|
+
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 || {};
|
|
61832
|
+
useEffect(() => {
|
|
61833
|
+
var C;
|
|
61834
|
+
(C = r == null ? void 0 : r.list) == null || C.call(r, {
|
|
61835
|
+
paginate: !1
|
|
61836
|
+
}).then((b) => {
|
|
61837
|
+
var S;
|
|
61838
|
+
p(((S = b.data) == null ? void 0 : S.data) || []);
|
|
61839
|
+
});
|
|
61840
|
+
}, [r, m == null ? void 0 : m.meta.count]);
|
|
61841
|
+
const h = {
|
|
61842
|
+
size: "small",
|
|
61843
|
+
onChange: e == null ? void 0 : e.onChange,
|
|
61844
|
+
selectedRows: t,
|
|
61845
|
+
setSelectedRows: n
|
|
61846
|
+
}, g = () => {
|
|
61847
|
+
const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
|
|
61848
|
+
return {
|
|
61849
|
+
onClick(F, I) {
|
|
61850
|
+
return V(this, null, function* () {
|
|
61851
|
+
var R, T;
|
|
61852
|
+
yield r.add({
|
|
61853
|
+
values: C
|
|
61854
|
+
}), 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));
|
|
61855
|
+
});
|
|
61856
|
+
}
|
|
61857
|
+
};
|
|
61858
|
+
}, f = () => {
|
|
61859
|
+
const C = (o == null ? void 0 : o.filterTargetKey) || "id";
|
|
61860
|
+
if (d) {
|
|
61861
|
+
const b = d.map((y) => y[C]).filter(Boolean);
|
|
61862
|
+
return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
|
|
61863
|
+
}
|
|
61864
|
+
return {};
|
|
61865
|
+
};
|
|
61866
|
+
return /* @__PURE__ */ jsx(
|
|
61867
|
+
ActionContextProvider,
|
|
61868
|
+
{
|
|
61869
|
+
value: P(x({}, c), {
|
|
61870
|
+
openMode: u ? "drawer" : c.openMode
|
|
61871
|
+
}),
|
|
61872
|
+
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 }) }) }))
|
|
61873
|
+
}
|
|
61874
|
+
);
|
|
61748
61875
|
}, recordFormBlockInitializers = new SchemaInitializer({
|
|
61749
61876
|
name: "RecordFormBlockInitializers",
|
|
61750
61877
|
title: '{{ t("Add block") }}',
|
|
@@ -63673,7 +63800,27 @@ const commonOptions$h = {
|
|
|
63673
63800
|
name: "filterForm:configureFields"
|
|
63674
63801
|
}, commonOptions$6),
|
|
63675
63802
|
filterFormItemInitializers_deprecated
|
|
63676
|
-
),
|
|
63803
|
+
), DividerFormItemInitializer = () => {
|
|
63804
|
+
const { insert: e } = useSchemaInitializer(), t = useSchemaInitializerItem();
|
|
63805
|
+
return /* @__PURE__ */ jsx(
|
|
63806
|
+
SchemaInitializerItem,
|
|
63807
|
+
P(x({}, t), {
|
|
63808
|
+
icon: /* @__PURE__ */ jsx(LineOutlined, {}),
|
|
63809
|
+
onClick: () => {
|
|
63810
|
+
e({
|
|
63811
|
+
type: "void",
|
|
63812
|
+
"x-decorator": "FormItem",
|
|
63813
|
+
"x-toolbar": "FormItemSchemaToolbar",
|
|
63814
|
+
"x-settings": "blockSettings:divider",
|
|
63815
|
+
"x-component": "Divider",
|
|
63816
|
+
"x-component-props": {
|
|
63817
|
+
children: '{{t("Group")}}'
|
|
63818
|
+
}
|
|
63819
|
+
});
|
|
63820
|
+
}
|
|
63821
|
+
})
|
|
63822
|
+
);
|
|
63823
|
+
}, MarkdownBlockInitializer = () => {
|
|
63677
63824
|
const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), n = useSchemaInitializerItem();
|
|
63678
63825
|
return /* @__PURE__ */ jsx(
|
|
63679
63826
|
SchemaInitializerItem,
|
|
@@ -63880,142 +64027,7 @@ const commonOptions$h = {
|
|
|
63880
64027
|
name: "page:addBlock"
|
|
63881
64028
|
}, commonOptions$4),
|
|
63882
64029
|
blockInitializers_deprecated
|
|
63883
|
-
),
|
|
63884
|
-
const { insert: e } = useSchemaInitializer(), t = useSchemaInitializerItem();
|
|
63885
|
-
return /* @__PURE__ */ jsx(
|
|
63886
|
-
SchemaInitializerItem,
|
|
63887
|
-
P(x({}, t), {
|
|
63888
|
-
icon: /* @__PURE__ */ jsx(LineOutlined, {}),
|
|
63889
|
-
onClick: () => {
|
|
63890
|
-
e({
|
|
63891
|
-
type: "void",
|
|
63892
|
-
"x-decorator": "FormItem",
|
|
63893
|
-
"x-toolbar": "FormItemSchemaToolbar",
|
|
63894
|
-
"x-settings": "blockSettings:divider",
|
|
63895
|
-
"x-component": "Divider",
|
|
63896
|
-
"x-component-props": {
|
|
63897
|
-
children: '{{t("Group")}}'
|
|
63898
|
-
}
|
|
63899
|
-
});
|
|
63900
|
-
}
|
|
63901
|
-
})
|
|
63902
|
-
);
|
|
63903
|
-
}, AssociateActionInitializer = (e) => {
|
|
63904
|
-
const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
|
|
63905
|
-
type: "void",
|
|
63906
|
-
title: '{{ t("Associate") }}',
|
|
63907
|
-
"x-action": "associate",
|
|
63908
|
-
"x-toolbar": "ActionSchemaToolbar",
|
|
63909
|
-
"x-settings": "actionSettings:popup",
|
|
63910
|
-
"x-component": "Action",
|
|
63911
|
-
"x-component-props": {
|
|
63912
|
-
openMode: t,
|
|
63913
|
-
refreshDataBlockRequest: !0
|
|
63914
|
-
},
|
|
63915
|
-
properties: {
|
|
63916
|
-
drawer: {
|
|
63917
|
-
type: "void",
|
|
63918
|
-
"x-component": "Action.Container",
|
|
63919
|
-
title: '{{ t("Select record") }}',
|
|
63920
|
-
"x-component-props": {
|
|
63921
|
-
className: "nb-record-picker-selector"
|
|
63922
|
-
},
|
|
63923
|
-
"x-decorator": "AssociateActionProvider",
|
|
63924
|
-
properties: {
|
|
63925
|
-
grid: {
|
|
63926
|
-
type: "void",
|
|
63927
|
-
"x-component": "Grid",
|
|
63928
|
-
"x-initializer": "popup:tableSelector:addBlock",
|
|
63929
|
-
properties: {}
|
|
63930
|
-
},
|
|
63931
|
-
footer: {
|
|
63932
|
-
"x-component": "Action.Container.Footer",
|
|
63933
|
-
"x-component-props": {},
|
|
63934
|
-
properties: {
|
|
63935
|
-
actions: {
|
|
63936
|
-
type: "void",
|
|
63937
|
-
"x-component": "ActionBar",
|
|
63938
|
-
"x-component-props": {},
|
|
63939
|
-
properties: {
|
|
63940
|
-
submit: {
|
|
63941
|
-
title: '{{ t("Submit") }}',
|
|
63942
|
-
"x-action": "submit",
|
|
63943
|
-
"x-component": "Action",
|
|
63944
|
-
"x-use-component-props": "usePickActionProps",
|
|
63945
|
-
"x-toolbar": "ActionSchemaToolbar",
|
|
63946
|
-
"x-settings": "actionSettings:submit",
|
|
63947
|
-
"x-component-props": {
|
|
63948
|
-
type: "primary",
|
|
63949
|
-
htmlType: "submit"
|
|
63950
|
-
}
|
|
63951
|
-
}
|
|
63952
|
-
}
|
|
63953
|
-
}
|
|
63954
|
-
}
|
|
63955
|
-
}
|
|
63956
|
-
}
|
|
63957
|
-
}
|
|
63958
|
-
},
|
|
63959
|
-
[CONTEXT_SCHEMA_KEY]: n()
|
|
63960
|
-
}, r = useSchemaInitializerItem();
|
|
63961
|
-
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
|
|
63962
|
-
}, useTableSelectorProps = () => {
|
|
63963
|
-
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = Y(r, ["onRowSelectionChange", "rowKey"]);
|
|
63964
|
-
return P(x({}, o), {
|
|
63965
|
-
rowKey: n,
|
|
63966
|
-
rowSelection: {
|
|
63967
|
-
type: "checkbox"
|
|
63968
|
-
},
|
|
63969
|
-
onRowSelectionChange(i, a) {
|
|
63970
|
-
e == null || e(i), t == null || t(i, a);
|
|
63971
|
-
}
|
|
63972
|
-
});
|
|
63973
|
-
}, AssociateActionProvider = (e) => {
|
|
63974
|
-
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 || {};
|
|
63975
|
-
useEffect(() => {
|
|
63976
|
-
var C;
|
|
63977
|
-
(C = r == null ? void 0 : r.list) == null || C.call(r, {
|
|
63978
|
-
paginate: !1
|
|
63979
|
-
}).then((b) => {
|
|
63980
|
-
var S;
|
|
63981
|
-
p(((S = b.data) == null ? void 0 : S.data) || []);
|
|
63982
|
-
});
|
|
63983
|
-
}, [r, m == null ? void 0 : m.meta.count]);
|
|
63984
|
-
const h = {
|
|
63985
|
-
size: "small",
|
|
63986
|
-
onChange: e == null ? void 0 : e.onChange,
|
|
63987
|
-
selectedRows: t,
|
|
63988
|
-
setSelectedRows: n
|
|
63989
|
-
}, g = () => {
|
|
63990
|
-
const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
|
|
63991
|
-
return {
|
|
63992
|
-
onClick(F, I) {
|
|
63993
|
-
return V(this, null, function* () {
|
|
63994
|
-
var R, T;
|
|
63995
|
-
yield r.add({
|
|
63996
|
-
values: C
|
|
63997
|
-
}), 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));
|
|
63998
|
-
});
|
|
63999
|
-
}
|
|
64000
|
-
};
|
|
64001
|
-
}, f = () => {
|
|
64002
|
-
const C = (o == null ? void 0 : o.filterTargetKey) || "id";
|
|
64003
|
-
if (d) {
|
|
64004
|
-
const b = d.map((y) => y[C]).filter(Boolean);
|
|
64005
|
-
return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
|
|
64006
|
-
}
|
|
64007
|
-
return {};
|
|
64008
|
-
};
|
|
64009
|
-
return /* @__PURE__ */ jsx(
|
|
64010
|
-
ActionContextProvider,
|
|
64011
|
-
{
|
|
64012
|
-
value: P(x({}, c), {
|
|
64013
|
-
openMode: u ? "drawer" : c.openMode
|
|
64014
|
-
}),
|
|
64015
|
-
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 }) }) }))
|
|
64016
|
-
}
|
|
64017
|
-
);
|
|
64018
|
-
}, ParentCollectionFields = () => {
|
|
64030
|
+
), ParentCollectionFields = () => {
|
|
64019
64031
|
const e = useInheritsFormItemInitializerFields({ component: "AssignedField" }), { t } = useTranslation(), n = useCompile();
|
|
64020
64032
|
if (!(e != null && e.length))
|
|
64021
64033
|
return null;
|
|
@@ -64460,7 +64472,8 @@ class SchemaInitializerPlugin extends Plugin {
|
|
|
64460
64472
|
RefreshActionInitializer,
|
|
64461
64473
|
DividerFormItemInitializer,
|
|
64462
64474
|
AssociateActionInitializer,
|
|
64463
|
-
AssociateActionProvider
|
|
64475
|
+
AssociateActionProvider,
|
|
64476
|
+
PopupActionDecorator
|
|
64464
64477
|
})), this.app.schemaInitializerManager.add(blockInitializers_deprecated), this.app.schemaInitializerManager.add(blockInitializers), this.app.schemaInitializerManager.add(tableActionInitializers_deprecated), this.app.schemaInitializerManager.add(tableActionInitializers), this.app.schemaInitializerManager.add(tableColumnInitializers_deprecated), this.app.schemaInitializerManager.add(tableColumnInitializers), this.app.schemaInitializerManager.add(tableActionColumnInitializers_deprecated), this.app.schemaInitializerManager.add(tableActionColumnInitializers), this.app.schemaInitializerManager.add(formItemInitializers_deprecated), this.app.schemaInitializerManager.add(formItemInitializers), this.app.schemaInitializerManager.add(formActionInitializers), this.app.schemaInitializerManager.add(detailsActionInitializers_deprecated), this.app.schemaInitializerManager.add(detailsActionInitializers), this.app.schemaInitializerManager.add(readPrettyFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(readPrettyFormItemInitializers), this.app.schemaInitializerManager.add(readPrettyFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(readPrettyFormActionInitializers), this.app.schemaInitializerManager.add(createFormBlockInitializers_deprecated), this.app.schemaInitializerManager.add(createFormBlockInitializers), this.app.schemaInitializerManager.add(customizeCreateFormBlockInitializers_deprecated), this.app.schemaInitializerManager.add(customizeCreateFormBlockInitializers), this.app.schemaInitializerManager.add(customFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(customFormItemInitializers), this.app.schemaInitializerManager.add(filterFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(filterFormActionInitializers), this.app.schemaInitializerManager.add(createFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(createFormActionInitializers), this.app.schemaInitializerManager.add(updateFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(updateFormActionInitializers), this.app.schemaInitializerManager.add(filterFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(filterFormItemInitializers), this.app.schemaInitializerManager.add(gridCardActionInitializers_deprecated), this.app.schemaInitializerManager.add(gridCardActionInitializers), this.app.schemaInitializerManager.add(gridCardItemActionInitializers_deprecated), this.app.schemaInitializerManager.add(gridCardItemActionInitializers), this.app.schemaInitializerManager.add(listActionInitializers_deprecated), this.app.schemaInitializerManager.add(listActionInitializers), this.app.schemaInitializerManager.add(listItemActionInitializers_deprecated), this.app.schemaInitializerManager.add(listItemActionInitializers), this.app.schemaInitializerManager.add(recordBlockInitializers_deprecated), this.app.schemaInitializerManager.add(recordBlockInitializers), this.app.schemaInitializerManager.add(recordFormBlockInitializers), this.app.schemaInitializerManager.add(subTableActionInitializers_deprecated), this.app.schemaInitializerManager.add(subTableActionInitializers), this.app.schemaInitializerManager.add(tableSelectorInitializers_deprecated), this.app.schemaInitializerManager.add(tableSelectorInitializers), this.app.schemaInitializerManager.add(tabPaneInitializers_deprecated), this.app.schemaInitializerManager.add(tabPaneInitializers), this.app.schemaInitializerManager.add(tabPaneInitializersForRecordBlock), this.app.schemaInitializerManager.add(tabPaneInitializersForBulkEditFormBlock), this.app.schemaInitializerManager.add(menuItemInitializer_deprecated), this.app.schemaInitializerManager.add(menuItemInitializer);
|
|
64465
64478
|
});
|
|
64466
64479
|
}
|