@nocobase/client 1.8.6 → 1.8.7
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
|
@@ -3676,6 +3676,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3676
3676
|
get useDatetimeVariableContext() {
|
|
3677
3677
|
return useDatetimeVariableContext;
|
|
3678
3678
|
},
|
|
3679
|
+
get useDeleteRouteSchema() {
|
|
3680
|
+
return useDeleteRouteSchema;
|
|
3681
|
+
},
|
|
3679
3682
|
get useDesignable() {
|
|
3680
3683
|
return useDesignable;
|
|
3681
3684
|
},
|
|
@@ -6255,7 +6258,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6255
6258
|
depth: I + 1,
|
|
6256
6259
|
maxDepth: F,
|
|
6257
6260
|
prefix: B.key,
|
|
6258
|
-
exclude: ["id", ...systemKeys.filter((
|
|
6261
|
+
exclude: ["id", ...systemKeys.filter((O) => O !== "sort")]
|
|
6259
6262
|
})), B;
|
|
6260
6263
|
}).filter(Boolean), m = (y, { prefix: v, maxDepth: I, depth: F = 0, exclude: R = [] }) => F > I ? [] : o(y).map((T) => {
|
|
6261
6264
|
var $;
|
|
@@ -6310,15 +6313,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6310
6313
|
getOnCheck: C,
|
|
6311
6314
|
getScopeDataSource: (y) => {
|
|
6312
6315
|
const v = o(y), I = (T, D) => {
|
|
6313
|
-
var
|
|
6316
|
+
var L, N;
|
|
6314
6317
|
if (!T.interface)
|
|
6315
6318
|
return;
|
|
6316
6319
|
const B = i(T.interface);
|
|
6317
6320
|
if (!(B != null && B.filterable))
|
|
6318
6321
|
return;
|
|
6319
|
-
const { nested: $, children:
|
|
6322
|
+
const { nested: $, children: O, operators: j } = B.filterable, w = {
|
|
6320
6323
|
name: T.name,
|
|
6321
|
-
title: ((
|
|
6324
|
+
title: ((L = T == null ? void 0 : T.uiSchema) == null ? void 0 : L.title) || T.name,
|
|
6322
6325
|
schema: T == null ? void 0 : T.uiSchema,
|
|
6323
6326
|
operators: ((N = j == null ? void 0 : j.filter) == null ? void 0 : N.call(j, (k) => !(k != null && k.visible) || k.visible(T))) || [],
|
|
6324
6327
|
interface: T.interface
|
|
@@ -6326,7 +6329,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6326
6329
|
if (!(T.target && D > 2)) {
|
|
6327
6330
|
if (D > 2)
|
|
6328
6331
|
return w;
|
|
6329
|
-
if (
|
|
6332
|
+
if (O != null && O.length && (w.children = O), $) {
|
|
6330
6333
|
const k = o(T.target), M = F(k, D + 1).filter(Boolean);
|
|
6331
6334
|
w.children = w.children || [], w.children.push(...M);
|
|
6332
6335
|
}
|
|
@@ -6335,8 +6338,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6335
6338
|
}, F = (T, D) => {
|
|
6336
6339
|
const B = [];
|
|
6337
6340
|
return T.forEach(($) => {
|
|
6338
|
-
const
|
|
6339
|
-
|
|
6341
|
+
const O = I($, D);
|
|
6342
|
+
O && B.push(O);
|
|
6340
6343
|
}), B;
|
|
6341
6344
|
};
|
|
6342
6345
|
return F(v, 1);
|
|
@@ -7084,14 +7087,14 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7084
7087
|
action: l,
|
|
7085
7088
|
conditionType: c
|
|
7086
7089
|
}, u) => {
|
|
7087
|
-
var S, y, v, I, F, R, T, D, B, $,
|
|
7090
|
+
var S, y, v, I, F, R, T, D, B, $, O, j, w, L;
|
|
7088
7091
|
const d = ((S = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : S.required) || [(y = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : y.required], p = ((v = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : v.display) || [(I = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : I.display], m = ((F = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : F.pattern) || [(R = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : R.pattern], h = ((T = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : T.value) || [(D = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : D.value], g = ((B = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : B.dataSource) || [($ = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : $.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
|
|
7089
7092
|
ruleGroup: o,
|
|
7090
7093
|
variables: r,
|
|
7091
7094
|
localVariables: a,
|
|
7092
7095
|
variableNameOfLeftCondition: i,
|
|
7093
7096
|
conditionType: c
|
|
7094
|
-
}, b = ((
|
|
7097
|
+
}, b = ((O = n == null ? void 0 : n.stateOfLinkageRules) == null ? void 0 : O.dateScope) || [(j = n == null ? void 0 : n.initStateOfLinkageRules) == null ? void 0 : j.dateScope];
|
|
7095
7098
|
switch (e) {
|
|
7096
7099
|
case ActionType.Required:
|
|
7097
7100
|
d.push(getTempFieldState(conditionAnalyses(C, u), !0)), n.stateOfLinkageRules = P(x({}, n.stateOfLinkageRules), {
|
|
@@ -7143,7 +7146,7 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7143
7146
|
break;
|
|
7144
7147
|
case ActionType.Options:
|
|
7145
7148
|
{
|
|
7146
|
-
const N = (
|
|
7149
|
+
const N = (L = (w = n.data) == null ? void 0 : w.dataSource) == null ? void 0 : L.filter((k) => t.value.includes(k.value));
|
|
7147
7150
|
g.push(getTempFieldState(conditionAnalyses(C, u), N || [])), n.stateOfLinkageRules = P(x({}, n.stateOfLinkageRules), {
|
|
7148
7151
|
dataSource: g
|
|
7149
7152
|
});
|
|
@@ -8302,11 +8305,11 @@ function withInitializer(e) {
|
|
|
8302
8305
|
style: C,
|
|
8303
8306
|
componentProps: b
|
|
8304
8307
|
} = n, S = l ? l() : i, y = c(u), v = useCallback(
|
|
8305
|
-
(
|
|
8306
|
-
S ? S(y(
|
|
8308
|
+
(L) => {
|
|
8309
|
+
S ? S(y(L, { isInSubTable: a })) : r(d, y(L, { isInSubTable: a }), { onSuccess: p });
|
|
8307
8310
|
},
|
|
8308
8311
|
[S, y, a, r, d, p]
|
|
8309
|
-
), { wrapSSR: I, hashId: F, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: B } = theme.useToken(), $ = useNiceDropdownMaxHeight([T]),
|
|
8312
|
+
), { wrapSSR: I, hashId: F, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: B } = theme.useToken(), $ = useNiceDropdownMaxHeight([T]), O = useMemo(
|
|
8310
8313
|
() => x({
|
|
8311
8314
|
options: n,
|
|
8312
8315
|
style: C
|
|
@@ -8346,7 +8349,7 @@ function withInitializer(e) {
|
|
|
8346
8349
|
options: n,
|
|
8347
8350
|
insert: v
|
|
8348
8351
|
},
|
|
8349
|
-
children: f === !1 ? React.createElement(e,
|
|
8352
|
+
children: f === !1 ? React.createElement(e, O) : /* @__PURE__ */ jsx(
|
|
8350
8353
|
Popover,
|
|
8351
8354
|
P(x({
|
|
8352
8355
|
zIndex: 9999,
|
|
@@ -8374,7 +8377,7 @@ function withInitializer(e) {
|
|
|
8374
8377
|
}
|
|
8375
8378
|
) })
|
|
8376
8379
|
),
|
|
8377
|
-
children: React.createElement(e,
|
|
8380
|
+
children: React.createElement(e, O)
|
|
8378
8381
|
})
|
|
8379
8382
|
)
|
|
8380
8383
|
}
|
|
@@ -8597,6 +8600,26 @@ const titleWrapperStyle = {
|
|
|
8597
8600
|
/* @__PURE__ */ jsx(e, x({}, t)),
|
|
8598
8601
|
/* @__PURE__ */ jsx(Tooltip, { title: n, children: /* @__PURE__ */ jsx(QuestionCircleOutlined, { style: { zIndex: 1 } }) })
|
|
8599
8602
|
] }) : /* @__PURE__ */ jsx(e, x({}, t));
|
|
8603
|
+
}, { evaluate } = evaluators.get("formula.js"), useEvaluatedExpression = (e) => {
|
|
8604
|
+
const t = useVariables$1(), n = useLocalVariables$1(), [o, r] = useState();
|
|
8605
|
+
return useEffect(() => {
|
|
8606
|
+
z(void 0, null, function* () {
|
|
8607
|
+
if (e == null || e === "") {
|
|
8608
|
+
r(void 0);
|
|
8609
|
+
return;
|
|
8610
|
+
}
|
|
8611
|
+
const { exp: i, scope: l } = yield replaceVariables(e, {
|
|
8612
|
+
variables: t,
|
|
8613
|
+
localVariables: n
|
|
8614
|
+
});
|
|
8615
|
+
try {
|
|
8616
|
+
const c = evaluate(i, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, l));
|
|
8617
|
+
r(c);
|
|
8618
|
+
} catch (c) {
|
|
8619
|
+
console.error(c);
|
|
8620
|
+
}
|
|
8621
|
+
});
|
|
8622
|
+
}, [t.parseVariable, e, n]), o;
|
|
8600
8623
|
};
|
|
8601
8624
|
class SchemaInitializer {
|
|
8602
8625
|
constructor(t) {
|
|
@@ -8746,7 +8769,7 @@ function addAppVersion(e, t) {
|
|
|
8746
8769
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8747
8770
|
}), e;
|
|
8748
8771
|
}
|
|
8749
|
-
const name = "@nocobase/client", version = "1.8.
|
|
8772
|
+
const name = "@nocobase/client", version = "1.8.7", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8750
8773
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8751
8774
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8752
8775
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8767,9 +8790,9 @@ const name = "@nocobase/client", version = "1.8.6", license = "AGPL-3.0", main =
|
|
|
8767
8790
|
"@formily/reactive-react": "^2.2.27",
|
|
8768
8791
|
"@formily/shared": "^2.2.27",
|
|
8769
8792
|
"@formily/validator": "^2.2.27",
|
|
8770
|
-
"@nocobase/evaluators": "1.8.
|
|
8771
|
-
"@nocobase/sdk": "1.8.
|
|
8772
|
-
"@nocobase/utils": "1.8.
|
|
8793
|
+
"@nocobase/evaluators": "1.8.7",
|
|
8794
|
+
"@nocobase/sdk": "1.8.7",
|
|
8795
|
+
"@nocobase/utils": "1.8.7",
|
|
8773
8796
|
ahooks: "^3.7.2",
|
|
8774
8797
|
antd: "5.24.2",
|
|
8775
8798
|
"antd-style": "3.7.1",
|
|
@@ -9938,11 +9961,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
9938
9961
|
}
|
|
9939
9962
|
`, [o.paddingContentVerticalLG, o.marginSM, o.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(
|
|
9940
9963
|
() => d == null ? void 0 : d.map((I) => {
|
|
9941
|
-
var
|
|
9964
|
+
var O, j, w, L;
|
|
9942
9965
|
const F = I.reduceProperties((N, k) => {
|
|
9943
9966
|
if (isCollectionFieldComponent(k))
|
|
9944
9967
|
return N.concat([k]);
|
|
9945
|
-
}, []), R = (F == null ? void 0 : F.length) > 0 ? F[0].name : I.name, T = !!((
|
|
9968
|
+
}, []), R = (F == null ? void 0 : F.length) > 0 ? F[0].name : I.name, T = !!((O = I["x-component-props"]) != null && O.columnHidden), { uiSchema: D, defaultValue: B, interface: $ } = (b == null ? void 0 : b.getField(R)) || {};
|
|
9946
9969
|
return I.title = n(I == null ? void 0 : I.title, { ns: NAMESPACE_UI_SCHEMA }), D && (D.default = B), P(x({
|
|
9947
9970
|
title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
9948
9971
|
S,
|
|
@@ -9959,7 +9982,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
9959
9982
|
sorter: (w = I["x-component-props"]) == null ? void 0 : w.sorter,
|
|
9960
9983
|
columnHidden: T
|
|
9961
9984
|
}, I["x-component-props"]), {
|
|
9962
|
-
width: T && !l ? 0 : ((
|
|
9985
|
+
width: T && !l ? 0 : ((L = I["x-component-props"]) == null ? void 0 : L.width) || 100,
|
|
9963
9986
|
render: (N, k, M) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
9964
9987
|
TableCellRender,
|
|
9965
9988
|
{
|
|
@@ -10192,7 +10215,7 @@ const BodyRowComponent$1 = React.memo((e) => {
|
|
|
10192
10215
|
});
|
|
10193
10216
|
BodyRowComponent$1.displayName = "BodyRowComponent";
|
|
10194
10217
|
const InternalBodyCellComponent$1 = React.memo((e) => {
|
|
10195
|
-
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, a = W(p, ["record", "schema", "rowIndex", "isSubTable"]), i = n == null ? void 0 : n[LinkageRuleDataKeyMap.style], [l, c] = useState({}), u = !!(n != null && n.properties) && Object.values(n.properties).some((m) => m["x-read-pretty"] === !0), d = useMemo(
|
|
10218
|
+
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, a = W(p, ["record", "schema", "rowIndex", "isSubTable"]), i = n == null ? void 0 : n[LinkageRuleDataKeyMap.style], [l, c] = useState({}), u = !!(n != null && n.properties) && Object.values(n.properties).some((m) => m["x-read-pretty"] === !0) || (n == null ? void 0 : n["x-action-column"]) === "actions", d = useMemo(
|
|
10196
10219
|
() => x(x({ overflow: "hidden" }, e.style), l),
|
|
10197
10220
|
[e.style, l]
|
|
10198
10221
|
);
|
|
@@ -10342,8 +10365,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10342
10365
|
"loading",
|
|
10343
10366
|
"onClickRow",
|
|
10344
10367
|
"value"
|
|
10345
|
-
]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: $ } = T,
|
|
10346
|
-
})), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(S, j), [
|
|
10368
|
+
]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: $ } = T, O = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10369
|
+
})), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(S, j), [L, N] = useState(() => D ? B : []), [k, M] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", H = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
10347
10370
|
& > td {
|
|
10348
10371
|
background-color: ${t.controlItemBgActive} !important;
|
|
10349
10372
|
}
|
|
@@ -10369,7 +10392,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10369
10392
|
}), [C, q]);
|
|
10370
10393
|
useDeepCompareEffect(() => {
|
|
10371
10394
|
const Z = D ? B : [];
|
|
10372
|
-
_.isEqual(Z,
|
|
10395
|
+
_.isEqual(Z, L) || N(Z);
|
|
10373
10396
|
}, [D, B]);
|
|
10374
10397
|
const K = useCallback((Z) => {
|
|
10375
10398
|
if (m)
|
|
@@ -10397,10 +10420,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10397
10420
|
return;
|
|
10398
10421
|
}
|
|
10399
10422
|
const ie = (Pe = (ve = (ye = re.active) == null ? void 0 : ye.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, ce = (Ae = (Ie = (Fe = re.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, fe = (b == null ? void 0 : b[ie]) || re.active, Re = (b == null ? void 0 : b[ce]) || re.over;
|
|
10400
|
-
y.move(ie, ce),
|
|
10423
|
+
y.move(ie, ce), O({ from: fe, to: Re });
|
|
10401
10424
|
}, []);
|
|
10402
10425
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
|
|
10403
|
-
}, [y,
|
|
10426
|
+
}, [y, O]);
|
|
10404
10427
|
Q.displayName = "BodyWrapperComponent";
|
|
10405
10428
|
const te = useMemo(() => ({
|
|
10406
10429
|
header: {
|
|
@@ -10498,14 +10521,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10498
10521
|
[q, Y, JSON.stringify(m)]
|
|
10499
10522
|
), ge = useCallback(
|
|
10500
10523
|
(Z, oe) => {
|
|
10501
|
-
const re = Z ? [...
|
|
10524
|
+
const re = Z ? [...L, oe[F.getPrimaryKey()]] : L.filter((ie) => oe[F.getPrimaryKey()] !== ie);
|
|
10502
10525
|
N(re), g == null || g(Z, oe);
|
|
10503
10526
|
},
|
|
10504
|
-
[
|
|
10527
|
+
[L, g, F]
|
|
10505
10528
|
), xe = useMemo(() => ({
|
|
10506
10529
|
onExpand: ge,
|
|
10507
|
-
expandedRowKeys:
|
|
10508
|
-
}), [
|
|
10530
|
+
expandedRowKeys: L
|
|
10531
|
+
}), [L, ge]);
|
|
10509
10532
|
return (
|
|
10510
10533
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10511
10534
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
@@ -10686,22 +10709,22 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10686
10709
|
const t = useDataSourceManager(), n = useDataSource(), o = useCollectionManager(), r = e || (n == null ? void 0 : n.key) || void 0, [a, i] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
|
|
10687
10710
|
() => {
|
|
10688
10711
|
var w;
|
|
10689
|
-
return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((
|
|
10712
|
+
return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((L, N) => (L[N.name] = N, L), {});
|
|
10690
10713
|
},
|
|
10691
10714
|
[t, a]
|
|
10692
10715
|
), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, a]), d = useCallback(() => {
|
|
10693
|
-
var w,
|
|
10694
|
-
return (
|
|
10716
|
+
var w, L;
|
|
10717
|
+
return (L = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections().map((N) => N.getOptions());
|
|
10695
10718
|
}, [t, n]), p = useCallback(
|
|
10696
10719
|
(w) => {
|
|
10697
|
-
var
|
|
10698
|
-
return o && !w ? o : (
|
|
10720
|
+
var L;
|
|
10721
|
+
return o && !w ? o : (L = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : L.collectionManager;
|
|
10699
10722
|
},
|
|
10700
10723
|
[o, t, r]
|
|
10701
10724
|
), m = useMemo(
|
|
10702
10725
|
() => {
|
|
10703
|
-
var w,
|
|
10704
|
-
return (
|
|
10726
|
+
var w, L;
|
|
10727
|
+
return (L = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections();
|
|
10705
10728
|
},
|
|
10706
10729
|
[t, a]
|
|
10707
10730
|
), h = useCallback(
|
|
@@ -10715,50 +10738,50 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10715
10738
|
}),
|
|
10716
10739
|
[t]
|
|
10717
10740
|
), f = useCompile(), C = useCallback(
|
|
10718
|
-
(w,
|
|
10741
|
+
(w, L) => {
|
|
10719
10742
|
var N, k;
|
|
10720
|
-
return ((k = (N = p(
|
|
10743
|
+
return ((k = (N = p(L)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
|
|
10721
10744
|
},
|
|
10722
10745
|
[t, p]
|
|
10723
10746
|
), b = useCallback(
|
|
10724
|
-
(w,
|
|
10747
|
+
(w, L) => {
|
|
10725
10748
|
var k, M;
|
|
10726
10749
|
if (!w)
|
|
10727
10750
|
return [];
|
|
10728
|
-
const N = (k = p(
|
|
10751
|
+
const N = (k = p(L)) == null ? void 0 : k.getCollection(w);
|
|
10729
10752
|
return ((M = N == null ? void 0 : N.getAllFields) == null ? void 0 : M.call(N)) || (N == null ? void 0 : N.getFields()) || [];
|
|
10730
10753
|
},
|
|
10731
10754
|
[t, p]
|
|
10732
10755
|
), S = useCallback(
|
|
10733
|
-
(w,
|
|
10756
|
+
(w, L) => {
|
|
10734
10757
|
var N;
|
|
10735
10758
|
if (!(!w || w.split(".").length < 2))
|
|
10736
|
-
return (N = p(
|
|
10759
|
+
return (N = p(L)) == null ? void 0 : N.getCollectionField(w);
|
|
10737
10760
|
},
|
|
10738
10761
|
[t, p]
|
|
10739
10762
|
), y = useCallback(
|
|
10740
|
-
(w,
|
|
10763
|
+
(w, L) => {
|
|
10741
10764
|
var N, k;
|
|
10742
|
-
return w ? ((k = (N = p(
|
|
10765
|
+
return w ? ((k = (N = p(L)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
|
|
10743
10766
|
},
|
|
10744
10767
|
[t, p]
|
|
10745
10768
|
), v = useCallback(
|
|
10746
|
-
(w,
|
|
10769
|
+
(w, L = !1, N) => {
|
|
10747
10770
|
var q;
|
|
10748
10771
|
if (!w)
|
|
10749
10772
|
return [];
|
|
10750
10773
|
const k = (q = p(N)) == null ? void 0 : q.getCollection(w);
|
|
10751
|
-
return (k == null ? void 0 : k.getChildrenCollections(
|
|
10774
|
+
return (k == null ? void 0 : k.getChildrenCollections(L)) || [];
|
|
10752
10775
|
},
|
|
10753
10776
|
[t, p]
|
|
10754
10777
|
), I = useCallback(
|
|
10755
|
-
(w,
|
|
10778
|
+
(w, L) => {
|
|
10756
10779
|
var N, k;
|
|
10757
|
-
return w ? ((k = (N = p(
|
|
10780
|
+
return w ? ((k = (N = p(L)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
|
|
10758
10781
|
},
|
|
10759
10782
|
[t, p]
|
|
10760
10783
|
), F = useCallback(
|
|
10761
|
-
(w,
|
|
10784
|
+
(w, L, N, k) => {
|
|
10762
10785
|
var ee;
|
|
10763
10786
|
const {
|
|
10764
10787
|
association: M = !1,
|
|
@@ -10775,16 +10798,16 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10775
10798
|
return;
|
|
10776
10799
|
if (q[w])
|
|
10777
10800
|
return _.cloneDeep(q[w]);
|
|
10778
|
-
|
|
10801
|
+
L && typeof L == "string" && (L = [L]), N && typeof N == "string" && (N = [N]);
|
|
10779
10802
|
const K = b(w, J), X = (ee = K == null ? void 0 : K.filter(
|
|
10780
|
-
(Q) => Q.interface && !U.includes(Q.interface) && (H ||
|
|
10803
|
+
(Q) => Q.interface && !U.includes(Q.interface) && (H || L && L.includes(Q.type) || N && N.includes(Q.interface) || (M && Q.target && Q.target !== w && Array.isArray(M) ? M.includes(Q.interface) : !1))
|
|
10781
10804
|
)) == null ? void 0 : ee.map((Q) => {
|
|
10782
10805
|
var ne, se;
|
|
10783
10806
|
const te = x({
|
|
10784
10807
|
value: Y && G ? `${G}.${Q.name}` : Q.name,
|
|
10785
10808
|
label: f((ne = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : ne.title) || Q.name
|
|
10786
10809
|
}, Q);
|
|
10787
|
-
return M && Q.target && (te.children = E.includes(Q.target) ? [] : F(Q.target,
|
|
10810
|
+
return M && Q.target && (te.children = E.includes(Q.target) ? [] : F(Q.target, L, N, P(x({}, k), {
|
|
10788
10811
|
cached: q,
|
|
10789
10812
|
dataSource: J,
|
|
10790
10813
|
collectionNames: [...E, Q.target],
|
|
@@ -10796,21 +10819,21 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10796
10819
|
},
|
|
10797
10820
|
[b]
|
|
10798
10821
|
), R = useCallback(
|
|
10799
|
-
(w,
|
|
10822
|
+
(w, L) => {
|
|
10800
10823
|
var N;
|
|
10801
|
-
return (N = p(
|
|
10824
|
+
return (N = p(L)) == null ? void 0 : N.getCollection(w);
|
|
10802
10825
|
},
|
|
10803
10826
|
[t, p]
|
|
10804
10827
|
), T = useCallback(
|
|
10805
|
-
(w,
|
|
10828
|
+
(w, L) => {
|
|
10806
10829
|
var N, k;
|
|
10807
|
-
return (k = (N = p(
|
|
10830
|
+
return (k = (N = p(L)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
|
|
10808
10831
|
},
|
|
10809
10832
|
[t, p]
|
|
10810
10833
|
), D = useCallback(
|
|
10811
|
-
(w,
|
|
10834
|
+
(w, L) => () => {
|
|
10812
10835
|
var N, k;
|
|
10813
|
-
return (k = (N = p(
|
|
10836
|
+
return (k = (N = p(L)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
|
|
10814
10837
|
},
|
|
10815
10838
|
[t, p]
|
|
10816
10839
|
), B = useCallback(
|
|
@@ -10818,14 +10841,14 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10818
10841
|
[t]
|
|
10819
10842
|
), $ = useCallback(
|
|
10820
10843
|
(w) => {
|
|
10821
|
-
var
|
|
10822
|
-
return (
|
|
10844
|
+
var L;
|
|
10845
|
+
return (L = B(w.interface)) == null ? void 0 : L.titleUsable;
|
|
10823
10846
|
},
|
|
10824
10847
|
[B]
|
|
10825
|
-
),
|
|
10826
|
-
(w,
|
|
10848
|
+
), O = useCallback(
|
|
10849
|
+
(w, L, N) => {
|
|
10827
10850
|
var k, M;
|
|
10828
|
-
return (M = (k = p(N)) == null ? void 0 : k.getCollection(
|
|
10851
|
+
return (M = (k = p(N)) == null ? void 0 : k.getCollection(L)) == null ? void 0 : M.getParentCollectionFields(w);
|
|
10829
10852
|
},
|
|
10830
10853
|
[t, p]
|
|
10831
10854
|
), j = useCallback(
|
|
@@ -10840,7 +10863,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10840
10863
|
getTemplate: j,
|
|
10841
10864
|
getInterface: B,
|
|
10842
10865
|
getCollections: d,
|
|
10843
|
-
getParentCollectionFields:
|
|
10866
|
+
getParentCollectionFields: O,
|
|
10844
10867
|
getInheritCollections: y,
|
|
10845
10868
|
getChildrenCollections: v,
|
|
10846
10869
|
refreshCM: g,
|
|
@@ -11051,14 +11074,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11051
11074
|
}, usePopupUtils = (e = {}) => {
|
|
11052
11075
|
const t = useNavigateNoUpdate(), n = useLocationNoUpdate(), o = useFieldSchema(), r = useDataSourceKey(), a = useCollectionRecord(), i = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m, currentLevel: h = 0 } = useCurrentPopupContext(), { getDataBlockRequest: g } = useDataBlockRequestGetter(), { isPopupVisibleControlledByURL: f } = usePopupSettings(), { setVisible: C } = useContext(ActionContext), { updatePopupContext: b } = usePopupContextInActionOrAssociationField(), S = useCurrentPopupContext(), y = useCallback(
|
|
11053
11076
|
(w) => {
|
|
11054
|
-
var
|
|
11055
|
-
return (
|
|
11077
|
+
var L;
|
|
11078
|
+
return (L = w || (i == null ? void 0 : i.data)) == null ? void 0 : L[c.getSourceKeyByAssociation(u)];
|
|
11056
11079
|
},
|
|
11057
11080
|
[i, u]
|
|
11058
11081
|
), v = useDataBlockRequestData(), I = useTableBlockContextBasicValue() || {}, F = e.setVisible || C, R = useCallback(
|
|
11059
11082
|
({
|
|
11060
11083
|
tabKey: w,
|
|
11061
|
-
popupUid:
|
|
11084
|
+
popupUid: L,
|
|
11062
11085
|
recordData: N,
|
|
11063
11086
|
sourceId: k,
|
|
11064
11087
|
collection: M,
|
|
@@ -11066,7 +11089,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11066
11089
|
}) => {
|
|
11067
11090
|
const E = c.getFilterByTK(u || l, N);
|
|
11068
11091
|
return getPopupPathFromParams({
|
|
11069
|
-
popupuid:
|
|
11092
|
+
popupuid: L,
|
|
11070
11093
|
puid: q,
|
|
11071
11094
|
collection: M,
|
|
11072
11095
|
filterbytk: E,
|
|
@@ -11085,14 +11108,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11085
11108
|
}, [r, l, u]), D = useCallback(
|
|
11086
11109
|
({
|
|
11087
11110
|
recordData: w,
|
|
11088
|
-
parentRecordData:
|
|
11111
|
+
parentRecordData: L,
|
|
11089
11112
|
collectionNameUsedInURL: N,
|
|
11090
11113
|
popupUidUsedInURL: k,
|
|
11091
11114
|
customActionSchema: M
|
|
11092
11115
|
} = {}) => {
|
|
11093
11116
|
if (!f())
|
|
11094
11117
|
return F == null ? void 0 : F(!0);
|
|
11095
|
-
const q = M || o, E = q == null ? void 0 : q["x-uid"], V = y(
|
|
11118
|
+
const q = M || o, E = q == null ? void 0 : q["x-uid"], V = y(L);
|
|
11096
11119
|
w = w || (a == null ? void 0 : a.data);
|
|
11097
11120
|
const H = R({
|
|
11098
11121
|
popupUid: E,
|
|
@@ -11105,7 +11128,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11105
11128
|
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(E, {
|
|
11106
11129
|
schema: q,
|
|
11107
11130
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
11108
|
-
parentRecord:
|
|
11131
|
+
parentRecord: L ? new CollectionRecord({ isNew: !1, data: L }) : i,
|
|
11109
11132
|
service: g(),
|
|
11110
11133
|
dataSource: r,
|
|
11111
11134
|
collection: l == null ? void 0 : l.name,
|
|
@@ -11155,11 +11178,11 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
11155
11178
|
m == null ? void 0 : m.popupuid
|
|
11156
11179
|
]), $ = useCallback(
|
|
11157
11180
|
(w) => {
|
|
11158
|
-
const
|
|
11181
|
+
const L = y(), N = R({
|
|
11159
11182
|
tabKey: w,
|
|
11160
11183
|
popupUid: m == null ? void 0 : m.popupuid,
|
|
11161
11184
|
recordData: a == null ? void 0 : a.data,
|
|
11162
|
-
sourceId:
|
|
11185
|
+
sourceId: L
|
|
11163
11186
|
});
|
|
11164
11187
|
let k = removeLastPopupPath(n.pathname);
|
|
11165
11188
|
_.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${N}`, {
|
|
@@ -11167,8 +11190,8 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
11167
11190
|
});
|
|
11168
11191
|
},
|
|
11169
11192
|
[R, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, n]
|
|
11170
|
-
),
|
|
11171
|
-
|
|
11193
|
+
), O = useCallback((w, L) => {
|
|
11194
|
+
L.__popup = w;
|
|
11172
11195
|
}, []), j = useCallback((w) => w.__popup, []);
|
|
11173
11196
|
return {
|
|
11174
11197
|
/**
|
|
@@ -11179,7 +11202,7 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
11179
11202
|
* used to close popup by changing the url
|
|
11180
11203
|
*/
|
|
11181
11204
|
closePopup: B,
|
|
11182
|
-
savePopupSchemaToSchema:
|
|
11205
|
+
savePopupSchemaToSchema: O,
|
|
11183
11206
|
getPopupSchemaFromSchema: j,
|
|
11184
11207
|
context: S,
|
|
11185
11208
|
/**
|
|
@@ -11975,20 +11998,18 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
|
|
|
11975
11998
|
}
|
|
11976
11999
|
`, TableColumnActionBar$1 = observer$1(
|
|
11977
12000
|
(e) => {
|
|
11978
|
-
const t = useDesigner();
|
|
11979
|
-
|
|
11980
|
-
const { designable: n } = useSchemaComponentContext(), { token: o } = useToken$1();
|
|
11981
|
-
return !n || t.isNullComponent ? e.children : /* @__PURE__ */ jsxs(
|
|
12001
|
+
const t = useDesigner(), { isInSubTable: n } = useFlag() || {}, { designable: o } = useSchemaComponentContext(), { token: r } = useToken$1(), { name: a } = (useBlockContext == null ? void 0 : useBlockContext()) || {};
|
|
12002
|
+
return !o || t.isNullComponent ? e.children : /* @__PURE__ */ jsx(
|
|
11982
12003
|
SortableItem,
|
|
11983
12004
|
{
|
|
11984
12005
|
className: designerCss$4({
|
|
11985
|
-
margin: `-${
|
|
11986
|
-
padding: `${
|
|
12006
|
+
margin: `-${r.margin}px -${r.marginXS}px`,
|
|
12007
|
+
padding: `${r.margin}px ${r.marginXS}px`
|
|
11987
12008
|
}),
|
|
11988
|
-
children: [
|
|
12009
|
+
children: /* @__PURE__ */ jsxs(BlockContext.Provider, { value: { name: n ? a : "taleColumn" }, children: [
|
|
11989
12010
|
/* @__PURE__ */ jsx(t, {}),
|
|
11990
12011
|
e.children
|
|
11991
|
-
]
|
|
12012
|
+
] })
|
|
11992
12013
|
}
|
|
11993
12014
|
);
|
|
11994
12015
|
},
|
|
@@ -12640,7 +12661,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
|
|
|
12640
12661
|
isDisabled: C || isDisabledDefault,
|
|
12641
12662
|
getCollectionField: S.getCollectionField,
|
|
12642
12663
|
deprecated: p
|
|
12643
|
-
}) || []).sort((
|
|
12664
|
+
}) || []).sort((O, j) => O.isLeaf && !j.isLeaf ? -1 : !O.isLeaf && j.isLeaf ? 1 : 0).sort((O, j) => O.disabled && !j.disabled ? 1 : !O.disabled && j.disabled ? -1 : 0);
|
|
12644
12665
|
if (B.length === 0) {
|
|
12645
12666
|
I.disabled = !0, I.isLeaf = !0, T();
|
|
12646
12667
|
return;
|
|
@@ -12999,7 +13020,7 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
12999
13020
|
return B;
|
|
13000
13021
|
},
|
|
13001
13022
|
disabledMinutes: (B) => I && B === g.hour() ? C.filter(($) => $ < g.minute()) : F && B === f.hour() ? C.filter(($) => $ > f.minute()) : [],
|
|
13002
|
-
disabledSeconds: (B, $) => I && B === g.hour() && $ === g.minute() ? C.filter((
|
|
13023
|
+
disabledSeconds: (B, $) => I && B === g.hour() && $ === g.minute() ? C.filter((O) => O < g.second()) : F && B === f.hour() && $ === f.minute() ? C.filter((O) => O > f.second()) : []
|
|
13003
13024
|
};
|
|
13004
13025
|
};
|
|
13005
13026
|
i(() => b), c(() => S);
|
|
@@ -13907,7 +13928,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13907
13928
|
collectionField: e,
|
|
13908
13929
|
noDisabled: r,
|
|
13909
13930
|
targetFieldSchema: a
|
|
13910
|
-
}), { settings: $, shouldDisplayParentPopupRecord:
|
|
13931
|
+
}), { settings: $, shouldDisplayParentPopupRecord: O } = useParentPopupVariable({
|
|
13911
13932
|
schema: n,
|
|
13912
13933
|
collectionField: e,
|
|
13913
13934
|
noDisabled: r,
|
|
@@ -13918,7 +13939,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13918
13939
|
collectionField: e,
|
|
13919
13940
|
noDisabled: r,
|
|
13920
13941
|
targetFieldSchema: a
|
|
13921
|
-
}), { urlSearchParamsSettings:
|
|
13942
|
+
}), { urlSearchParamsSettings: L, shouldDisplay: N } = useURLSearchParamsVariable();
|
|
13922
13943
|
return [...useMemo(() => [
|
|
13923
13944
|
p,
|
|
13924
13945
|
m,
|
|
@@ -13931,8 +13952,8 @@ const ParentCollectionProvider = (e) => {
|
|
|
13931
13952
|
T && R,
|
|
13932
13953
|
w && j,
|
|
13933
13954
|
B && D,
|
|
13934
|
-
|
|
13935
|
-
N &&
|
|
13955
|
+
O && $,
|
|
13956
|
+
N && L
|
|
13936
13957
|
].filter(Boolean).filter(u), [
|
|
13937
13958
|
p,
|
|
13938
13959
|
m,
|
|
@@ -13951,7 +13972,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13951
13972
|
B,
|
|
13952
13973
|
D,
|
|
13953
13974
|
N,
|
|
13954
|
-
|
|
13975
|
+
L
|
|
13955
13976
|
]), ...c.map(({ option: E }) => E)];
|
|
13956
13977
|
}, VariableInput = (e) => {
|
|
13957
13978
|
const {
|
|
@@ -13998,20 +14019,20 @@ const ParentCollectionProvider = (e) => {
|
|
|
13998
14019
|
}));
|
|
13999
14020
|
},
|
|
14000
14021
|
[n, u]
|
|
14001
|
-
),
|
|
14022
|
+
), O = m(
|
|
14002
14023
|
B(_.isEmpty(I) ? T : I, {
|
|
14003
14024
|
value: t
|
|
14004
14025
|
})
|
|
14005
14026
|
);
|
|
14006
14027
|
return useEffect(() => {
|
|
14007
|
-
C == null || C(
|
|
14028
|
+
C == null || C(O);
|
|
14008
14029
|
}, [t, I]), /* @__PURE__ */ jsx(
|
|
14009
14030
|
Variable.Input,
|
|
14010
14031
|
{
|
|
14011
14032
|
className: i,
|
|
14012
14033
|
value: t,
|
|
14013
14034
|
onChange: $,
|
|
14014
|
-
scope:
|
|
14035
|
+
scope: O,
|
|
14015
14036
|
style: r,
|
|
14016
14037
|
changeOnSelect: y,
|
|
14017
14038
|
hideVariableButton: f,
|
|
@@ -14313,8 +14334,8 @@ const SchemaSettingsDateFormat = function(t) {
|
|
|
14313
14334
|
(o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0, B.default = void 0), B["x-component-props"] = o.componentProps || {}, n["x-component-props"] = x(x({}, o.componentProps || {}), D), B["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
|
|
14314
14335
|
const $ = o.path.entire.split(".");
|
|
14315
14336
|
$.pop();
|
|
14316
|
-
const
|
|
14317
|
-
o.query(`${
|
|
14337
|
+
const O = $.join(".");
|
|
14338
|
+
o.query(`${O}.*[0:].${n.name}`).forEach((j) => {
|
|
14318
14339
|
j.props.name === n.name && ((o.componentProps.picker || "date") !== D.picker && !m && (j.value = void 0, j.initialValue = void 0), j.setComponentProps(x({}, D)));
|
|
14319
14340
|
}), r.emit("patch", {
|
|
14320
14341
|
schema: B
|
|
@@ -14346,13 +14367,13 @@ const getActionContext = (e) => {
|
|
|
14346
14367
|
T != null && T.target && (u = p(
|
|
14347
14368
|
`${T.target}.${((E = (q = o["x-component-props"]) == null ? void 0 : q.fieldNames) == null ? void 0 : E.label) || "id"}`
|
|
14348
14369
|
));
|
|
14349
|
-
const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), $ = B && p(B == null ? void 0 : B["x-collection-field"]),
|
|
14370
|
+
const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), $ = B && p(B == null ? void 0 : B["x-collection-field"]), O = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || ($ == null ? void 0 : $.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", w = useCallback(
|
|
14350
14371
|
(V) => {
|
|
14351
14372
|
const H = V.find((G) => G.value === "$nForm"), U = m(R);
|
|
14352
14373
|
return !(U != null && U.length) && H && (H.children = formatVariableScop(v())), V;
|
|
14353
14374
|
},
|
|
14354
14375
|
[v, R]
|
|
14355
|
-
),
|
|
14376
|
+
), L = useMemo(() => ({
|
|
14356
14377
|
ArrayCollapse: ArrayCollapse$2,
|
|
14357
14378
|
FormLayout,
|
|
14358
14379
|
VariableInput: (V) => /* @__PURE__ */ jsx(
|
|
@@ -14424,7 +14445,7 @@ const getActionContext = (e) => {
|
|
|
14424
14445
|
b,
|
|
14425
14446
|
w,
|
|
14426
14447
|
i,
|
|
14427
|
-
|
|
14448
|
+
O.collection,
|
|
14428
14449
|
u,
|
|
14429
14450
|
g
|
|
14430
14451
|
]), k = useCallback(
|
|
@@ -14444,7 +14465,7 @@ const getActionContext = (e) => {
|
|
|
14444
14465
|
SchemaSettingsModalItem,
|
|
14445
14466
|
{
|
|
14446
14467
|
title: i("Set default value"),
|
|
14447
|
-
components:
|
|
14468
|
+
components: L,
|
|
14448
14469
|
width: 800,
|
|
14449
14470
|
schema: N,
|
|
14450
14471
|
onSubmit: k,
|
|
@@ -15314,10 +15335,10 @@ const useGetFilterOptions = () => {
|
|
|
15314
15335
|
};
|
|
15315
15336
|
});
|
|
15316
15337
|
}, TableColumnDesigner$1 = (e) => {
|
|
15317
|
-
var $,
|
|
15318
|
-
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.fieldNames) || ((
|
|
15338
|
+
var $, O, j, w, L, N, k, M, q, E, V, H;
|
|
15339
|
+
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.fieldNames) || ((O = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : O.fieldNames), m = useLabelFields$1((j = o == null ? void 0 : o.target) != null ? j : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = a(o == null ? void 0 : o.interface), f = i(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), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
15319
15340
|
o == null ? void 0 : o.interface
|
|
15320
|
-
), F = useFieldModeOptions({ fieldSchema: n }), R = ((
|
|
15341
|
+
), F = useFieldModeOptions({ fieldSchema: n }), R = ((L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L.mode) || "Select";
|
|
15321
15342
|
let T = "editable";
|
|
15322
15343
|
n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
|
|
15323
15344
|
const D = I && R === "Select", B = () => {
|
|
@@ -16676,8 +16697,8 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16676
16697
|
schema: S
|
|
16677
16698
|
};
|
|
16678
16699
|
return l == "Kanban" && (y.find = (D, B, $) => {
|
|
16679
|
-
const
|
|
16680
|
-
return findSchema(
|
|
16700
|
+
const O = findSchema(D, "x-component", l);
|
|
16701
|
+
return findSchema(O, B, $);
|
|
16681
16702
|
}), y;
|
|
16682
16703
|
});
|
|
16683
16704
|
}, useFilterFormItemInitializerFields = (e) => {
|
|
@@ -17056,7 +17077,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17056
17077
|
]
|
|
17057
17078
|
})), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
|
|
17058
17079
|
return r ? useMemo(() => {
|
|
17059
|
-
var
|
|
17080
|
+
var O;
|
|
17060
17081
|
const F = {
|
|
17061
17082
|
name: "currentRecord",
|
|
17062
17083
|
collectionName: C.name,
|
|
@@ -17127,7 +17148,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17127
17148
|
else if (I[0].children.length)
|
|
17128
17149
|
if (l) {
|
|
17129
17150
|
if (I[0].children.length <= 1)
|
|
17130
|
-
return I[0].children = ((
|
|
17151
|
+
return I[0].children = ((O = I[0].children[0]) == null ? void 0 : O.children) || [], I;
|
|
17131
17152
|
B = [F];
|
|
17132
17153
|
} else
|
|
17133
17154
|
B = [F, D];
|
|
@@ -17895,10 +17916,10 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17895
17916
|
t["x-settings"] || a,
|
|
17896
17917
|
t["x-settings-props"]
|
|
17897
17918
|
), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), I = v == null ? void 0 : v.getDataSources(), F = useDataSource(), R = (I == null ? void 0 : I.length) > 1 && F, 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(() => {
|
|
17898
|
-
var
|
|
17919
|
+
var O;
|
|
17899
17920
|
return {
|
|
17900
17921
|
insertPosition: "afterEnd",
|
|
17901
|
-
wrap: ((
|
|
17922
|
+
wrap: ((O = S == null ? void 0 : S.cols) == null ? void 0 : O.length) > 1 ? void 0 : gridRowColWrap,
|
|
17902
17923
|
Component: (j) => /* @__PURE__ */ jsx(
|
|
17903
17924
|
PlusOutlined,
|
|
17904
17925
|
P(x({}, j), {
|
|
@@ -17966,7 +17987,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17966
17987
|
container: g
|
|
17967
17988
|
} = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$g(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), I = useDataSourceManager(), F = I == null ? void 0 : I.getDataSources(), R = useDataSource(), T = (F == null ? void 0 : F.length) > 1 && R, D = useRefreshFieldSchema(), B = useRef(y("Reference template")), $ = useCallback(() => {
|
|
17968
17989
|
D({ refreshParentSchema: !0 });
|
|
17969
|
-
}, [D]),
|
|
17990
|
+
}, [D]), O = useMemo(() => {
|
|
17970
17991
|
if (n) {
|
|
17971
17992
|
if (typeof n == "string")
|
|
17972
17993
|
return [f(n)];
|
|
@@ -17976,7 +17997,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17976
17997
|
}, [n, t]), { render: j, exists: w } = useSchemaSettingsRender(
|
|
17977
17998
|
r || (t == null ? void 0 : t["x-settings"]),
|
|
17978
17999
|
t == null ? void 0 : t["x-settings-props"]
|
|
17979
|
-
), { render:
|
|
18000
|
+
), { render: L, exists: N } = useSchemaInitializerRender(
|
|
17980
18001
|
o || (t == null ? void 0 : t["x-initializer"]),
|
|
17981
18002
|
t == null ? void 0 : t["x-initializer-props"]
|
|
17982
18003
|
), k = useGridRowContext(), M = useGridContext(), q = useMemo(() => {
|
|
@@ -17998,10 +18019,10 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17998
18019
|
if (o === !1)
|
|
17999
18020
|
return null;
|
|
18000
18021
|
if (N)
|
|
18001
|
-
return
|
|
18022
|
+
return L(q);
|
|
18002
18023
|
if (M != null && M.InitializerComponent || M != null && M.renderSchemaInitializer)
|
|
18003
18024
|
return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({}, q)) : (K = M.renderSchemaInitializer) == null ? void 0 : K.call(M, q);
|
|
18004
|
-
}, [M, o, q, N,
|
|
18025
|
+
}, [M, o, q, N, L]), H = useMemo(() => r !== !1 && w ? j() : null, [w, j, r]), U = useRef(null), G = "hidden";
|
|
18005
18026
|
useEffect(() => {
|
|
18006
18027
|
const K = U.current;
|
|
18007
18028
|
let X = K == null ? void 0 : K.parentElement;
|
|
@@ -18036,9 +18057,9 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18036
18057
|
className: cls(b, S, m, "schema-toolbar", G),
|
|
18037
18058
|
style: Y,
|
|
18038
18059
|
children: [
|
|
18039
|
-
|
|
18040
|
-
/* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: T ? `${f(T == null ? void 0 : T.displayName)} > ${
|
|
18041
|
-
|
|
18060
|
+
O && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
|
|
18061
|
+
/* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: T ? `${f(T == null ? void 0 : T.displayName)} > ${O[0]}` : O[0] }, O[0]),
|
|
18062
|
+
O[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${O[1]}` || y("Untitled")}` })
|
|
18042
18063
|
] }) }),
|
|
18043
18064
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18044
18065
|
E,
|
|
@@ -18269,8 +18290,8 @@ const useDragEnd = (e) => {
|
|
|
18269
18290
|
const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
|
|
18270
18291
|
return useCallback(
|
|
18271
18292
|
(r) => {
|
|
18272
|
-
var f, C, b, S, y, v, I, F, R, T, D, B, $,
|
|
18273
|
-
const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (F = (I = i == null ? void 0 : i.data) == null ? void 0 : I.current) == null ? void 0 : F.breakRemoveOn, p = (T = (R = i == null ? void 0 : i.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (j = (
|
|
18293
|
+
var f, C, b, S, y, v, I, F, R, T, D, B, $, O, j;
|
|
18294
|
+
const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (F = (I = i == null ? void 0 : i.data) == null ? void 0 : I.current) == null ? void 0 : F.breakRemoveOn, p = (T = (R = i == null ? void 0 : i.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (j = (O = ($ = i == null ? void 0 : i.data) == null ? void 0 : $.current) == null ? void 0 : O.removeParentsIfNoChildren) != null ? j : !0;
|
|
18274
18295
|
if (!l || !c) {
|
|
18275
18296
|
e == null || e(r);
|
|
18276
18297
|
return;
|
|
@@ -18422,29 +18443,29 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
18422
18443
|
}), [v, I] = useState([0, 0]);
|
|
18423
18444
|
return useDndMonitor({
|
|
18424
18445
|
onDragStart(D) {
|
|
18425
|
-
var w,
|
|
18426
|
-
const B = (N = (
|
|
18446
|
+
var w, L, N;
|
|
18447
|
+
const B = (N = (L = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : L.current) == null ? void 0 : N.dividerRef;
|
|
18427
18448
|
if (!B || !r)
|
|
18428
18449
|
return;
|
|
18429
18450
|
n.current = D.active.id;
|
|
18430
|
-
const $ = B.current,
|
|
18431
|
-
I([
|
|
18451
|
+
const $ = B.current, O = $.previousElementSibling, j = $.nextElementSibling;
|
|
18452
|
+
I([O.clientWidth, j.clientWidth]);
|
|
18432
18453
|
},
|
|
18433
18454
|
onDragMove(D) {
|
|
18434
18455
|
if (!r || !y)
|
|
18435
18456
|
return;
|
|
18436
18457
|
n.current === D.active.id && (n.current = n.current + "_move");
|
|
18437
|
-
const B = l.current, $ = B.previousElementSibling,
|
|
18438
|
-
$.style.width = `${v[0] + D.delta.x}px`,
|
|
18458
|
+
const B = l.current, $ = B.previousElementSibling, O = B.nextElementSibling;
|
|
18459
|
+
$.style.width = `${v[0] + D.delta.x}px`, O.style.width = `${v[1] - D.delta.x}px`;
|
|
18439
18460
|
},
|
|
18440
18461
|
onDragEnd(D) {
|
|
18441
18462
|
var N;
|
|
18442
18463
|
if (!r || !n.current || (N = n.current) != null && N.startsWith(D.active.id) && !n.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (I([0, 0]), !h || !g))
|
|
18443
18464
|
return;
|
|
18444
|
-
const B = l.current, $ = B.previousElementSibling,
|
|
18465
|
+
const B = l.current, $ = B.previousElementSibling, O = B.nextElementSibling;
|
|
18445
18466
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
18446
|
-
const j = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * ($.getBoundingClientRect().width + j) / B.parentElement.clientWidth).toFixed(2),
|
|
18447
|
-
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width",
|
|
18467
|
+
const j = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * ($.getBoundingClientRect().width + j) / B.parentElement.clientWidth).toFixed(2), L = (100 * (O.getBoundingClientRect().width + j) / B.parentElement.clientWidth).toFixed(2);
|
|
18468
|
+
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", L), o.emit("batchPatch", {
|
|
18448
18469
|
schemas: [
|
|
18449
18470
|
{
|
|
18450
18471
|
"x-uid": h["x-uid"],
|
|
@@ -18758,8 +18779,8 @@ const useTableBlockProps = () => {
|
|
|
18758
18779
|
),
|
|
18759
18780
|
onChange: useCallback(
|
|
18760
18781
|
({ current: S, pageSize: y }, v, I) => {
|
|
18761
|
-
var B, $,
|
|
18762
|
-
const F = (
|
|
18782
|
+
var B, $, O, j, w, L, N, k, M, q;
|
|
18783
|
+
const F = (O = ($ = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : $.params) == null ? void 0 : O.sort, R = I.order ? I.order === "ascend" ? [I.field] : [`-${I.field}`] : F || a.dragSortBy, T = y || ((L = (w = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : L.pageSize), D = P(x({}, (M = (k = (N = i.current) == null ? void 0 : N.service) == null ? void 0 : k.params) == null ? void 0 : M[0]), { page: S || 1, pageSize: T });
|
|
18763
18784
|
R && (D.sort = R), (q = i.current) == null || q.service.run(D);
|
|
18764
18785
|
},
|
|
18765
18786
|
[t.parent]
|
|
@@ -18777,7 +18798,7 @@ const useTableBlockProps = () => {
|
|
|
18777
18798
|
const B = I.find((E) => E.uid === D.uid);
|
|
18778
18799
|
if (!B)
|
|
18779
18800
|
return;
|
|
18780
|
-
const $ = getSourceKey(T, B.field) || a.rowKey || "id",
|
|
18801
|
+
const $ = getSourceKey(T, B.field) || a.rowKey || "id", O = [S[$]], j = ((N = D.service.params) == null ? void 0 : N[0]) || {}, w = ((M = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : M.filters) || {};
|
|
18781
18802
|
if (v.includes(S[a.rowKey])) {
|
|
18782
18803
|
if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
|
|
18783
18804
|
return D.clearData();
|
|
@@ -18787,19 +18808,19 @@ const useTableBlockProps = () => {
|
|
|
18787
18808
|
$and: [
|
|
18788
18809
|
{
|
|
18789
18810
|
[B.field || a.rowKey]: {
|
|
18790
|
-
[B.field ? "$in" : "$eq"]:
|
|
18811
|
+
[B.field ? "$in" : "$eq"]: O
|
|
18791
18812
|
}
|
|
18792
18813
|
}
|
|
18793
18814
|
]
|
|
18794
18815
|
};
|
|
18795
|
-
const
|
|
18816
|
+
const L = mergeFilter([
|
|
18796
18817
|
...Object.values(w).map((E) => removeNullCondition(E)),
|
|
18797
18818
|
D.defaultFilter
|
|
18798
18819
|
]);
|
|
18799
18820
|
return D.doFilter(
|
|
18800
18821
|
P(x({}, j), {
|
|
18801
18822
|
page: 1,
|
|
18802
|
-
filter:
|
|
18823
|
+
filter: L
|
|
18803
18824
|
}),
|
|
18804
18825
|
{ filters: w }
|
|
18805
18826
|
);
|
|
@@ -19153,10 +19174,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19153
19174
|
var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, I;
|
|
19154
19175
|
const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent(n, "CollectionField"), a = o(r == null ? void 0 : r["x-collection-field"]);
|
|
19155
19176
|
return useEffect(() => {
|
|
19156
|
-
var R, T, D, B, $,
|
|
19177
|
+
var R, T, D, B, $, O, j, w, L, N, k, M, q;
|
|
19157
19178
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
19158
19179
|
const E = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((V) => V);
|
|
19159
|
-
e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (
|
|
19180
|
+
e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (O = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.data) == null ? void 0 : O.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (N = (L = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : L.meta) == null ? void 0 : N.count, e.componentProps.pagination.current = (q = (M = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : M.meta) == null ? void 0 : q.page;
|
|
19160
19181
|
}
|
|
19161
19182
|
}, [
|
|
19162
19183
|
a == null ? void 0 : a.foreignKey,
|
|
@@ -20621,7 +20642,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
20621
20642
|
}, DateScopeComponent = (e) => {
|
|
20622
20643
|
var g, f, C, b, S, y, v, I, F, R, T, D, B, $;
|
|
20623
20644
|
const t = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), o = n(t == null ? void 0 : t["x-collection-field"]) || {}, r = ((g = o == null ? void 0 : o.uiSchema) == null ? void 0 : g["x-component-props"].gmt) || !1, a = ((f = o == null ? void 0 : o.uiSchema) == null ? void 0 : f["x-component-props"].utc) || !1, { form: i } = useFormBlockContext(), l = useRecord(), c = ((C = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : C.showTime) || ((S = (b = o == null ? void 0 : o.uiSchema) == null ? void 0 : b["x-component-props"]) == null ? void 0 : S.showTime) || !1, u = ((y = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : y.dateFormat) || ((I = (v = o == null ? void 0 : o.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : I.dateFormat) || "YYYY-MM-DD", d = ((F = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : F.timeFormat) || ((T = (R = o == null ? void 0 : o.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : T.timeFormat) || "HH:mm:ss", p = ((D = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : D.picker) || (($ = (B = o == null ? void 0 : o.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : $.picker) || "date", m = useCallback(
|
|
20624
|
-
(
|
|
20645
|
+
(O) => /* @__PURE__ */ jsx(
|
|
20625
20646
|
SchemaComponent,
|
|
20626
20647
|
{
|
|
20627
20648
|
schema: {
|
|
@@ -20647,9 +20668,9 @@ const DynamicComponent$1 = (e) => {
|
|
|
20647
20668
|
),
|
|
20648
20669
|
[u, r, p, c, d, a]
|
|
20649
20670
|
), h = useCallback(
|
|
20650
|
-
(
|
|
20671
|
+
(O) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: o, children: /* @__PURE__ */ jsx(
|
|
20651
20672
|
VariableInput,
|
|
20652
|
-
P(x({},
|
|
20673
|
+
P(x({}, O), {
|
|
20653
20674
|
form: i,
|
|
20654
20675
|
record: l,
|
|
20655
20676
|
noDisabled: !0,
|
|
@@ -21875,21 +21896,21 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21875
21896
|
}, [D]), $ = useCallback(() => z(void 0, null, function* () {
|
|
21876
21897
|
yield D.submit();
|
|
21877
21898
|
try {
|
|
21878
|
-
const
|
|
21899
|
+
const L = D.values, N = Object.keys(L).reduce((k, M) => (D.query(M).take() && (k[M] = L[M]), k), {});
|
|
21879
21900
|
h(!1), yield n == null ? void 0 : n(cloneDeep$1(N));
|
|
21880
|
-
} catch (
|
|
21881
|
-
console.error(
|
|
21901
|
+
} catch (L) {
|
|
21902
|
+
console.error(L);
|
|
21882
21903
|
}
|
|
21883
|
-
}), [D, n]),
|
|
21904
|
+
}), [D, n]), O = useCallback(() => z(void 0, null, function* () {
|
|
21884
21905
|
!g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], y.emit("patch", { schema: b }), yield I.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), S.setVisible(!1), h(!0);
|
|
21885
|
-
}), [I, S, y, b, i, g]), j = useCallback((
|
|
21906
|
+
}), [I, S, y, b, i, g]), j = useCallback((L) => L.stopPropagation(), []);
|
|
21886
21907
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
|
|
21887
21908
|
/* @__PURE__ */ jsx(
|
|
21888
21909
|
SchemaSettingsItem,
|
|
21889
21910
|
P(x({
|
|
21890
21911
|
title: v(t)
|
|
21891
21912
|
}, p), {
|
|
21892
|
-
onClick:
|
|
21913
|
+
onClick: O,
|
|
21893
21914
|
onKeyDown: j,
|
|
21894
21915
|
children: e.children || e.title
|
|
21895
21916
|
})
|
|
@@ -21949,7 +21970,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21949
21970
|
"noRecord",
|
|
21950
21971
|
"ModalContextProvider",
|
|
21951
21972
|
"dialogRootClassName"
|
|
21952
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), $ = useFormBlockContext(),
|
|
21973
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), $ = useFormBlockContext(), O = useBlockContext(), { getOperators: j } = useOperators(), w = useLocationSearch(), L = useVariables$1(), N = useContext(AllDataBlocksContext), k = useContext(SchemaComponentContext), M = useContext(VariableScopeContext$1), { formValue: q, collection: E, parent: V } = useSubFormValue(), H = useCurrentPopupRecord(), U = useParentPopupRecord();
|
|
21953
21974
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21954
21975
|
SchemaSettingsItem,
|
|
21955
21976
|
P(x({
|
|
@@ -21959,7 +21980,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21959
21980
|
const Y = l ? yield l() : c, J = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21960
21981
|
FormDialog(
|
|
21961
21982
|
{ title: J.title || n, width: u, rootClassName: m },
|
|
21962
|
-
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: M, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: k, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: N, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value:
|
|
21983
|
+
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: M, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: k, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: N, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: L, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: O, children: /* @__PURE__ */ jsx(
|
|
21963
21984
|
VariablePopupRecordProvider,
|
|
21964
21985
|
{
|
|
21965
21986
|
recordData: H == null ? void 0 : H.value,
|
|
@@ -22169,11 +22190,11 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22169
22190
|
}
|
|
22170
22191
|
}),
|
|
22171
22192
|
[n, c, u, y, g, f, p, h, T, r]
|
|
22172
|
-
),
|
|
22173
|
-
(
|
|
22193
|
+
), O = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), j = useCallback(
|
|
22194
|
+
(L) => {
|
|
22174
22195
|
var E;
|
|
22175
22196
|
const N = [];
|
|
22176
|
-
for (const V of
|
|
22197
|
+
for (const V of L.fieldReaction.rules)
|
|
22177
22198
|
N.push(_.omit(_.pickBy(V, _.identity), ["conditionBasic", "conditionAdvanced"]));
|
|
22178
22199
|
const k = y["x-component"] === "BlockTemplate" && ((E = y["x-component-props"]) == null ? void 0 : E.templateId), q = {
|
|
22179
22200
|
"x-uid": b !== LinkageRuleCategory.block ? k && m(k).uid || y["x-uid"] : c["x-uid"]
|
|
@@ -22188,11 +22209,11 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22188
22209
|
SchemaSettingsModalItem,
|
|
22189
22210
|
{
|
|
22190
22211
|
title: D,
|
|
22191
|
-
components:
|
|
22212
|
+
components: O,
|
|
22192
22213
|
width: 960,
|
|
22193
22214
|
schema: $,
|
|
22194
22215
|
onSubmit: j,
|
|
22195
|
-
ModalContextProvider: (
|
|
22216
|
+
ModalContextProvider: (L) => /* @__PURE__ */ jsx(FlagProvider, P(x({}, B), { children: L.children }))
|
|
22196
22217
|
}
|
|
22197
22218
|
);
|
|
22198
22219
|
}, useDataTemplates = (e) => {
|
|
@@ -23323,9 +23344,9 @@ function Input$1(e) {
|
|
|
23323
23344
|
"constantAbel"
|
|
23324
23345
|
]), f = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: C, hashId: b, componentCls: S, rootPrefixCls: y } = useStyles$d({ hideVariableButton: m });
|
|
23325
23346
|
useAntdInputStyle(`${y}-input`);
|
|
23326
|
-
const v = useCompile(), { t: I } = useTranslation(), F = useForm(), [R, T] = React.useState([]), [D, B] = React.useState([]), [$,
|
|
23347
|
+
const v = useCompile(), { t: I } = useTranslation(), F = useForm(), [R, T] = React.useState([]), [D, B] = React.useState([]), [$, O] = React.useState(
|
|
23327
23348
|
m || !!(o && t != null)
|
|
23328
|
-
), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string",
|
|
23349
|
+
), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string", L = w ? j : "", N = w ? null : j, k = Object.assign(
|
|
23329
23350
|
{
|
|
23330
23351
|
label: "label",
|
|
23331
23352
|
value: "value",
|
|
@@ -23337,9 +23358,9 @@ function Input$1(e) {
|
|
|
23337
23358
|
label: I("Constant"),
|
|
23338
23359
|
[k.value]: "$",
|
|
23339
23360
|
[k.label]: I("Constant")
|
|
23340
|
-
} : a ? getTypedConstantOption(
|
|
23361
|
+
} : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), q = (K = M == null ? void 0 : M.component) != null ? K : NullComponent, E = Array.isArray(a) ? (ee = (X = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : X[1]) != null ? ee : {} : {};
|
|
23341
23362
|
let V;
|
|
23342
|
-
t == null ? i ? o && $ ? V = ["$"] : V = [""] : o ? V = ["$"] : V = [" ",
|
|
23363
|
+
t == null ? i ? o && $ ? V = ["$"] : V = [""] : o ? V = ["$"] : V = [" ", L] : V = o ? ["$"] : [" ", L], m && (V = ["$"]), useEffect(() => {
|
|
23343
23364
|
const se = M != null ? M : {}, { component: Q } = se, te = W(se, ["component"]), ne = [
|
|
23344
23365
|
...i ? [
|
|
23345
23366
|
{
|
|
@@ -23372,24 +23393,24 @@ function Input$1(e) {
|
|
|
23372
23393
|
(Q, te) => {
|
|
23373
23394
|
var ne, se, ae;
|
|
23374
23395
|
if (Q[0] === "$") {
|
|
23375
|
-
|
|
23396
|
+
O(!0), N && n(null, te);
|
|
23376
23397
|
return;
|
|
23377
23398
|
} else
|
|
23378
|
-
|
|
23399
|
+
O(!1);
|
|
23379
23400
|
if (Q[0] === "") {
|
|
23380
23401
|
n(null);
|
|
23381
23402
|
return;
|
|
23382
23403
|
}
|
|
23383
23404
|
if (Q[0] === " ") {
|
|
23384
|
-
Q[1] ? Q[1] !==
|
|
23405
|
+
Q[1] ? Q[1] !== L && n((ae = (se = (ne = ConstantTypes[Q[1]]) == null ? void 0 : ne.default) == null ? void 0 : se.call(ne)) != null ? ae : null, te) : N && n(null, te);
|
|
23385
23406
|
return;
|
|
23386
23407
|
}
|
|
23387
23408
|
n(`{{${Q.join(".")}}}`, te);
|
|
23388
23409
|
},
|
|
23389
|
-
[
|
|
23410
|
+
[L, N, n]
|
|
23390
23411
|
), G = useCallback(() => {
|
|
23391
23412
|
var Q;
|
|
23392
|
-
if (
|
|
23413
|
+
if (O(!!o), (Q = M == null ? void 0 : M.children) != null && Q.length) {
|
|
23393
23414
|
const te = M.children[0].default();
|
|
23394
23415
|
return n(te);
|
|
23395
23416
|
}
|
|
@@ -23773,7 +23794,7 @@ function TextArea(e) {
|
|
|
23773
23794
|
[l, g]
|
|
23774
23795
|
), [S, y] = useState(!1), [v, I] = useState(!1), [F, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
23775
23796
|
useAntdInputStyle("ant-input");
|
|
23776
|
-
const { token: B } = theme.useToken(), $ = c.join(" "),
|
|
23797
|
+
const { token: B } = theme.useToken(), $ = c.join(" "), O = useCallback(
|
|
23777
23798
|
(V) => {
|
|
23778
23799
|
var U;
|
|
23779
23800
|
const H = getValue(V, c);
|
|
@@ -23821,15 +23842,15 @@ function TextArea(e) {
|
|
|
23821
23842
|
const G = createVariableTagHTML(H.join("."), b);
|
|
23822
23843
|
pasteHTML(U, G, {
|
|
23823
23844
|
range: T
|
|
23824
|
-
}), I(!0), D(getCurrentRange(U)),
|
|
23845
|
+
}), I(!0), D(getCurrentRange(U)), O(U);
|
|
23825
23846
|
},
|
|
23826
|
-
[b,
|
|
23847
|
+
[b, O, T]
|
|
23827
23848
|
), w = useCallback(
|
|
23828
23849
|
function({ currentTarget: V }) {
|
|
23829
|
-
S || (I(!0), D(getCurrentRange(V)),
|
|
23850
|
+
S || (I(!0), D(getCurrentRange(V)), O(V));
|
|
23830
23851
|
},
|
|
23831
|
-
[S,
|
|
23832
|
-
),
|
|
23852
|
+
[S, O]
|
|
23853
|
+
), L = useCallback(function({ currentTarget: V }) {
|
|
23833
23854
|
D(getCurrentRange(V));
|
|
23834
23855
|
}, []), N = useCallback(function(V) {
|
|
23835
23856
|
V.key === "Enter" && V.preventDefault();
|
|
@@ -23837,9 +23858,9 @@ function TextArea(e) {
|
|
|
23837
23858
|
y(!0);
|
|
23838
23859
|
}, []), M = useCallback(
|
|
23839
23860
|
({ currentTarget: V }) => {
|
|
23840
|
-
y(!1), I(!0), D(getCurrentRange(V)),
|
|
23861
|
+
y(!1), I(!0), D(getCurrentRange(V)), O(V);
|
|
23841
23862
|
},
|
|
23842
|
-
[
|
|
23863
|
+
[O]
|
|
23843
23864
|
), q = useCallback(
|
|
23844
23865
|
function(V) {
|
|
23845
23866
|
V.preventDefault();
|
|
@@ -23860,9 +23881,9 @@ function TextArea(e) {
|
|
|
23860
23881
|
}
|
|
23861
23882
|
}
|
|
23862
23883
|
}).replace(/\n/g, " ");
|
|
23863
|
-
I(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)),
|
|
23884
|
+
I(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), O(V.currentTarget);
|
|
23864
23885
|
},
|
|
23865
|
-
[
|
|
23886
|
+
[O]
|
|
23866
23887
|
), E = e.disabled || C.disabled;
|
|
23867
23888
|
return t(
|
|
23868
23889
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -23913,7 +23934,7 @@ function TextArea(e) {
|
|
|
23913
23934
|
role: "button",
|
|
23914
23935
|
"aria-label": "textbox",
|
|
23915
23936
|
onInput: w,
|
|
23916
|
-
onBlur:
|
|
23937
|
+
onBlur: L,
|
|
23917
23938
|
onKeyDown: N,
|
|
23918
23939
|
onPaste: q,
|
|
23919
23940
|
onCompositionStart: k,
|
|
@@ -24373,7 +24394,20 @@ const GroupItem$1 = () => {
|
|
|
24373
24394
|
Component: LinkMenuItem
|
|
24374
24395
|
}
|
|
24375
24396
|
]
|
|
24376
|
-
}), useMenuTranslation = () => useTranslation("lm-desktop-routes")
|
|
24397
|
+
}), useMenuTranslation = () => useTranslation("lm-desktop-routes");
|
|
24398
|
+
function useDeleteRouteSchema(e = "uiSchemas") {
|
|
24399
|
+
const t = useAPIClient(), n = useMemo(() => t.resource(e), [t, e]), { refresh: o } = useAllAccessDesktopRoutes();
|
|
24400
|
+
return { deleteRouteSchema: useCallback(
|
|
24401
|
+
(a) => z(this, null, function* () {
|
|
24402
|
+
if (!a)
|
|
24403
|
+
return;
|
|
24404
|
+
const i = yield n[`remove/${a}`]();
|
|
24405
|
+
return o(), i;
|
|
24406
|
+
}),
|
|
24407
|
+
[n, o]
|
|
24408
|
+
) };
|
|
24409
|
+
}
|
|
24410
|
+
const components$5 = { TreeSelect: TreeSelect$1 }, toItems$2 = (e, { t, compile: n }) => {
|
|
24377
24411
|
var r;
|
|
24378
24412
|
const o = [];
|
|
24379
24413
|
for (const a of e) {
|
|
@@ -24414,7 +24448,7 @@ const GroupItem$1 = () => {
|
|
|
24414
24448
|
}
|
|
24415
24449
|
}
|
|
24416
24450
|
}, RemoveRoute = () => {
|
|
24417
|
-
const { t: e } = useTranslation(), { modal: t } = App.useApp(), { deleteRoute: n } = useNocoBaseRoutes(), o = useCurrentRoute(), { allAccessRoutes:
|
|
24451
|
+
const { t: e } = useTranslation(), { modal: t } = App.useApp(), { deleteRoute: n } = useNocoBaseRoutes(), { deleteRouteSchema: o } = useDeleteRouteSchema(), r = useCurrentRoute(), { allAccessRoutes: a } = useAllAccessDesktopRoutes(), i = useNavigateNoUpdate(), l = useCurrentPageUid();
|
|
24418
24452
|
return /* @__PURE__ */ jsx(
|
|
24419
24453
|
SchemaSettingsItem,
|
|
24420
24454
|
{
|
|
@@ -24425,10 +24459,10 @@ const GroupItem$1 = () => {
|
|
|
24425
24459
|
title: e("Delete menu item"),
|
|
24426
24460
|
content: e("Are you sure you want to delete it?"),
|
|
24427
24461
|
onOk: () => z(void 0, null, function* () {
|
|
24428
|
-
if ((
|
|
24462
|
+
if ((r == null ? void 0 : r.id) != null && (yield Promise.all([n(r.id), o(r.schemaUid)])), l !== (r == null ? void 0 : r.schemaUid) && !findRouteBySchemaUid(l, r == null ? void 0 : r.children))
|
|
24429
24463
|
return;
|
|
24430
|
-
const
|
|
24431
|
-
|
|
24464
|
+
const c = findPrevSibling(a, r), u = findNextSibling(a, r);
|
|
24465
|
+
i(c || u ? `/admin/${(c == null ? void 0 : c.schemaUid) || (u == null ? void 0 : u.schemaUid)}` : "/");
|
|
24432
24466
|
})
|
|
24433
24467
|
});
|
|
24434
24468
|
},
|
|
@@ -24910,27 +24944,7 @@ const LanguageSettings = () => {
|
|
|
24910
24944
|
sort: 350
|
|
24911
24945
|
}
|
|
24912
24946
|
]
|
|
24913
|
-
}),
|
|
24914
|
-
const t = useVariables$1(), n = useLocalVariables$1(), [o, r] = useState();
|
|
24915
|
-
return useEffect(() => {
|
|
24916
|
-
z(void 0, null, function* () {
|
|
24917
|
-
if (e == null || e === "") {
|
|
24918
|
-
r(void 0);
|
|
24919
|
-
return;
|
|
24920
|
-
}
|
|
24921
|
-
const { exp: i, scope: l } = yield replaceVariables(e, {
|
|
24922
|
-
variables: t,
|
|
24923
|
-
localVariables: n
|
|
24924
|
-
});
|
|
24925
|
-
try {
|
|
24926
|
-
const c = evaluate(i, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, l));
|
|
24927
|
-
r(c);
|
|
24928
|
-
} catch (c) {
|
|
24929
|
-
console.error(c);
|
|
24930
|
-
}
|
|
24931
|
-
});
|
|
24932
|
-
}, [t.parseVariable, e, n]), o;
|
|
24933
|
-
}, NocoBaseRouteContext = createContext(null);
|
|
24947
|
+
}), NocoBaseRouteContext = createContext(null);
|
|
24934
24948
|
NocoBaseRouteContext.displayName = "NocoBaseRouteContext";
|
|
24935
24949
|
const CurrentRouteProvider = memo(({ children: e, uid: t }) => {
|
|
24936
24950
|
const { allAccessRoutes: n } = useAllAccessDesktopRoutes(), o = useMemo(() => findRouteBySchemaUid(t, n), [t, n]);
|
|
@@ -25064,10 +25078,10 @@ const LayoutContent = () => {
|
|
|
25064
25078
|
const F = (D = t._route.options) == null ? void 0 : D.href, R = (B = t._route.options) == null ? void 0 : B.params, T = ($ = t._route.options) == null ? void 0 : $.openInNewWindow;
|
|
25065
25079
|
I.preventDefault(), I.stopPropagation();
|
|
25066
25080
|
try {
|
|
25067
|
-
const
|
|
25068
|
-
T !== !1 ? window.open(
|
|
25069
|
-
} catch (
|
|
25070
|
-
console.error(
|
|
25081
|
+
const O = yield n(F, R || []);
|
|
25082
|
+
T !== !1 ? window.open(O, "_blank") : navigateWithinSelf(F, i, window.location.origin + l);
|
|
25083
|
+
} catch (O) {
|
|
25084
|
+
console.error(O), window.open(F, "_blank");
|
|
25071
25085
|
}
|
|
25072
25086
|
}),
|
|
25073
25087
|
[n, t]
|
|
@@ -27023,7 +27037,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27023
27037
|
G && !k.depMatched[H] && !q[U] && (getOwn(M, U) ? (k.defineDep(H, p[U]), k.check()) : $(G, M, q));
|
|
27024
27038
|
}), q[E] = !0);
|
|
27025
27039
|
}
|
|
27026
|
-
function
|
|
27040
|
+
function O() {
|
|
27027
27041
|
var k, M, q = i.waitSeconds * 1e3, E = q && o.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], H = [], U = !1, G = !0;
|
|
27028
27042
|
if (!t) {
|
|
27029
27043
|
if (t = !0, eachProp(c, function(Y) {
|
|
@@ -27039,7 +27053,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27039
27053
|
G && each(H, function(Y) {
|
|
27040
27054
|
$(Y, {}, {});
|
|
27041
27055
|
}), (!E || M) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
|
|
27042
|
-
a = 0,
|
|
27056
|
+
a = 0, O();
|
|
27043
27057
|
}, 50)), t = !1;
|
|
27044
27058
|
}
|
|
27045
27059
|
}
|
|
@@ -27211,7 +27225,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27211
27225
|
function w(k, M, q, E) {
|
|
27212
27226
|
k.detachEvent && !isOpera ? E && k.detachEvent(E, M) : k.removeEventListener(q, M, !1);
|
|
27213
27227
|
}
|
|
27214
|
-
function
|
|
27228
|
+
function L(k) {
|
|
27215
27229
|
var M = k.currentTarget || k.srcElement;
|
|
27216
27230
|
return w(M, o.onScriptLoad, "load", "onreadystatechange"), w(M, o.onScriptError, "error"), {
|
|
27217
27231
|
node: M,
|
|
@@ -27287,7 +27301,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27287
27301
|
return M.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? T(makeError("requireargs", "Invalid require call"), H) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(o, E, k, q) : (G = I(E, k, !1, !0), U = G.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (N(), o.nextTick(function() {
|
|
27288
27302
|
N(), Y = F(I(null, k)), Y.skipMap = M.skipMap, Y.init(E, V, H, {
|
|
27289
27303
|
enabled: !0
|
|
27290
|
-
}),
|
|
27304
|
+
}), O();
|
|
27291
27305
|
}), q);
|
|
27292
27306
|
}
|
|
27293
27307
|
return mixin(q, {
|
|
@@ -27356,7 +27370,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27356
27370
|
));
|
|
27357
27371
|
j([k, V.deps || [], V.exportsFn]);
|
|
27358
27372
|
}
|
|
27359
|
-
|
|
27373
|
+
O();
|
|
27360
27374
|
},
|
|
27361
27375
|
/**
|
|
27362
27376
|
* Converts a module name to a file path. Supports cases where
|
|
@@ -27405,7 +27419,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27405
27419
|
onScriptLoad: function(k) {
|
|
27406
27420
|
if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
|
|
27407
27421
|
interactiveScript = null;
|
|
27408
|
-
var M =
|
|
27422
|
+
var M = L(k);
|
|
27409
27423
|
o.completeLoad(M.id);
|
|
27410
27424
|
}
|
|
27411
27425
|
},
|
|
@@ -27413,7 +27427,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27413
27427
|
* Callback for script errors.
|
|
27414
27428
|
*/
|
|
27415
27429
|
onScriptError: function(k) {
|
|
27416
|
-
var M =
|
|
27430
|
+
var M = L(k);
|
|
27417
27431
|
if (!y(M.id)) {
|
|
27418
27432
|
var q = [];
|
|
27419
27433
|
return eachProp(l, function(E, V) {
|
|
@@ -29026,9 +29040,9 @@ const MarkdownVoidInner = withDynamicSchemaProps(
|
|
|
29026
29040
|
const { isDarkTheme: t } = useGlobalTheme(), { componentCls: n, hashId: o } = useStyles$a({ isDarkTheme: t }), { content: r, className: a } = e, i = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables$1(), C = useLocalVariables$1(), { engine: b } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [S, y] = useState(!1), { t: v, i18n: I } = useTranslation(), F = useForm(), R = extractNFormPaths(r), [T, D] = useState(null);
|
|
29027
29041
|
useEffect(() => {
|
|
29028
29042
|
if (R.length > 0) {
|
|
29029
|
-
const
|
|
29043
|
+
const O = uid();
|
|
29030
29044
|
return setTimeout(() => {
|
|
29031
|
-
F.addEffects(
|
|
29045
|
+
F.addEffects(O, () => reaction(
|
|
29032
29046
|
() => {
|
|
29033
29047
|
const j = getValuesByPaths(F.values, R);
|
|
29034
29048
|
return JSON.stringify(j);
|
|
@@ -29039,7 +29053,7 @@ const MarkdownVoidInner = withDynamicSchemaProps(
|
|
|
29039
29053
|
{ fireImmediately: !0, equals: isEqual }
|
|
29040
29054
|
));
|
|
29041
29055
|
}), () => {
|
|
29042
|
-
F.removeEffects(
|
|
29056
|
+
F.removeEffects(O);
|
|
29043
29057
|
};
|
|
29044
29058
|
}
|
|
29045
29059
|
}, []), useEffect(() => {
|
|
@@ -29069,13 +29083,13 @@ const MarkdownVoidInner = withDynamicSchemaProps(
|
|
|
29069
29083
|
onCancel: () => {
|
|
29070
29084
|
i.editable = !1, d == null || d();
|
|
29071
29085
|
},
|
|
29072
|
-
onSubmit: (
|
|
29086
|
+
onSubmit: (O) => z(void 0, null, function* () {
|
|
29073
29087
|
var j;
|
|
29074
|
-
i.editable = !1, (j = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content =
|
|
29088
|
+
i.editable = !1, (j = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = O, i.componentProps.content = O, u == null || u(l), c.emit("patch", {
|
|
29075
29089
|
schema: {
|
|
29076
29090
|
"x-uid": l["x-uid"],
|
|
29077
29091
|
"x-component-props": {
|
|
29078
|
-
content:
|
|
29092
|
+
content: O
|
|
29079
29093
|
}
|
|
29080
29094
|
}
|
|
29081
29095
|
});
|
|
@@ -29243,8 +29257,8 @@ function useCollectValuesToSubmit() {
|
|
|
29243
29257
|
}), S = {}, y = Object.keys(f).map((D) => z(this, null, function* () {
|
|
29244
29258
|
const B = f[D], $ = a(D);
|
|
29245
29259
|
if (isVariable$1(B)) {
|
|
29246
|
-
const { value:
|
|
29247
|
-
S[D] = transformVariableValue(
|
|
29260
|
+
const { value: O } = (yield p == null ? void 0 : p.parseVariable(B, m)) || {};
|
|
29261
|
+
S[D] = transformVariableValue(O, { targetCollectionField: $ });
|
|
29248
29262
|
} else
|
|
29249
29263
|
B !== "" && (S[D] = B);
|
|
29250
29264
|
}));
|
|
@@ -29276,12 +29290,12 @@ const useCreateActionProps = () => {
|
|
|
29276
29290
|
return {
|
|
29277
29291
|
onClick() {
|
|
29278
29292
|
return z(this, null, function* () {
|
|
29279
|
-
var
|
|
29280
|
-
const { onSuccess: F, skipValidator: R, triggerWorkflows: T } = (
|
|
29293
|
+
var L, N;
|
|
29294
|
+
const { onSuccess: F, skipValidator: R, triggerWorkflows: T } = (L = u == null ? void 0 : u["x-action-settings"]) != null ? L : {}, {
|
|
29281
29295
|
manualClose: D,
|
|
29282
29296
|
redirecting: B,
|
|
29283
29297
|
redirectTo: $,
|
|
29284
|
-
successMessage:
|
|
29298
|
+
successMessage: O,
|
|
29285
29299
|
actionAfterSuccess: j
|
|
29286
29300
|
} = F || {};
|
|
29287
29301
|
R || (yield n.submit());
|
|
@@ -29300,16 +29314,16 @@ const useCreateActionProps = () => {
|
|
|
29300
29314
|
if ($ && (M = yield getVariableValue($, {
|
|
29301
29315
|
variables: y,
|
|
29302
29316
|
localVariables: [...S, { name: "$record", ctx: new Proxy((N = k == null ? void 0 : k.data) == null ? void 0 : N.data, {}) }]
|
|
29303
|
-
})), (j === "previous" || !j && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !
|
|
29317
|
+
})), (j === "previous" || !j && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !O) {
|
|
29304
29318
|
message.success(h("Saved successfully")), yield resetFormCorrectly(n), (B && !j || j === "redirect") && M && (isURL(M) ? window.location.href = M : c(M));
|
|
29305
29319
|
return;
|
|
29306
29320
|
}
|
|
29307
29321
|
D ? m.success({
|
|
29308
|
-
title: p(
|
|
29322
|
+
title: p(O),
|
|
29309
29323
|
onOk: () => z(this, null, function* () {
|
|
29310
29324
|
yield resetFormCorrectly(n), (B && !j || j === "redirect") && M && (isURL(M) ? window.location.href = M : c(M));
|
|
29311
29325
|
})
|
|
29312
|
-
}) : (message.success(p(
|
|
29326
|
+
}) : (message.success(p(O)), yield resetFormCorrectly(n), (B && !j || j === "redirect") && M && (isURL(M) ? window.location.href = M : c(M)));
|
|
29313
29327
|
} catch (k) {
|
|
29314
29328
|
d.data.loading = !1;
|
|
29315
29329
|
}
|
|
@@ -29328,14 +29342,14 @@ const useCreateActionProps = () => {
|
|
|
29328
29342
|
onSuccess: D,
|
|
29329
29343
|
overwriteValues: B,
|
|
29330
29344
|
skipValidator: $,
|
|
29331
|
-
triggerWorkflows:
|
|
29332
|
-
} = (M = l == null ? void 0 : l["x-action-settings"]) != null ? M : {}, j = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {},
|
|
29345
|
+
triggerWorkflows: O
|
|
29346
|
+
} = (M = l == null ? void 0 : l["x-action-settings"]) != null ? M : {}, j = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, L = {}, N = Object.keys(T).map((G) => z(this, null, function* () {
|
|
29333
29347
|
const Y = T[G], J = d(G);
|
|
29334
29348
|
if (isVariable$1(Y)) {
|
|
29335
29349
|
const { value: K } = (yield C == null ? void 0 : C.parseVariable(Y, b)) || {};
|
|
29336
|
-
|
|
29350
|
+
L[G] = transformVariableValue(K, { targetCollectionField: J });
|
|
29337
29351
|
} else
|
|
29338
|
-
Y !== "" && (
|
|
29352
|
+
Y !== "" && (L[G] = Y);
|
|
29339
29353
|
}));
|
|
29340
29354
|
yield Promise.all(N), $ || (yield e.submit());
|
|
29341
29355
|
const k = getFormValues({
|
|
@@ -29354,10 +29368,10 @@ const useCreateActionProps = () => {
|
|
|
29354
29368
|
c.data = t.data || {}, c.data.loading = !0;
|
|
29355
29369
|
try {
|
|
29356
29370
|
const G = yield n[y]({
|
|
29357
|
-
values: x(x(x({}, k), B),
|
|
29371
|
+
values: x(x(x({}, k), B), L),
|
|
29358
29372
|
filterKeys: v,
|
|
29359
29373
|
// TODO(refactor): should change to inject by plugin
|
|
29360
|
-
triggerWorkflows:
|
|
29374
|
+
triggerWorkflows: O != null && O.length ? O.map((Y) => [Y.workflowKey, Y.context].filter(Boolean).join("!")).join(",") : void 0
|
|
29361
29375
|
});
|
|
29362
29376
|
if (c.data.loading = !1, c.data.data = G, (U = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || U.call(H), r == null || r(!1), i == null || i(!0), !w)
|
|
29363
29377
|
return;
|
|
@@ -29466,7 +29480,7 @@ const useCreateActionProps = () => {
|
|
|
29466
29480
|
return {
|
|
29467
29481
|
onClick(f, C) {
|
|
29468
29482
|
return z(this, null, function* () {
|
|
29469
|
-
var w,
|
|
29483
|
+
var w, L, N, k;
|
|
29470
29484
|
const {
|
|
29471
29485
|
assignedValues: b = {},
|
|
29472
29486
|
onSuccess: S,
|
|
@@ -29487,7 +29501,7 @@ const useCreateActionProps = () => {
|
|
|
29487
29501
|
q !== "" && (B[M] = q);
|
|
29488
29502
|
}));
|
|
29489
29503
|
yield Promise.all($), y === !1 && (yield l.submit());
|
|
29490
|
-
const
|
|
29504
|
+
const O = yield e.update({
|
|
29491
29505
|
filterByTk: o,
|
|
29492
29506
|
values: x({}, B),
|
|
29493
29507
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -29496,7 +29510,7 @@ const useCreateActionProps = () => {
|
|
|
29496
29510
|
let j = R;
|
|
29497
29511
|
R && (j = yield getVariableValue(R, {
|
|
29498
29512
|
variables: u,
|
|
29499
|
-
localVariables: [...d, { name: "$record", ctx: new Proxy((
|
|
29513
|
+
localVariables: [...d, { name: "$record", ctx: new Proxy((L = O == null ? void 0 : O.data) == null ? void 0 : L.data, {}) }]
|
|
29500
29514
|
})), (D === "previous" || !D && F !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (N = t == null ? void 0 : t.service) == null ? void 0 : N.refresh) == null || k.call(N), T && (I ? c.success({
|
|
29501
29515
|
title: i(T),
|
|
29502
29516
|
onOk: () => z(this, null, function* () {
|
|
@@ -29519,7 +29533,7 @@ const useCreateActionProps = () => {
|
|
|
29519
29533
|
assignedValues: T = {},
|
|
29520
29534
|
onSuccess: D,
|
|
29521
29535
|
updateMode: B
|
|
29522
|
-
} = (M = a == null ? void 0 : a["x-action-settings"]) != null ? M : {}, { manualClose: $, redirecting:
|
|
29536
|
+
} = (M = a == null ? void 0 : a["x-action-settings"]) != null ? M : {}, { manualClose: $, redirecting: O, redirectTo: j, successMessage: w, actionAfterSuccess: L } = D || {};
|
|
29523
29537
|
m.data = e.data || {}, m.data.loading = !0;
|
|
29524
29538
|
const N = {}, k = Object.keys(T).map((E) => z(this, null, function* () {
|
|
29525
29539
|
const V = T[E], H = C(E);
|
|
@@ -29529,7 +29543,7 @@ const useCreateActionProps = () => {
|
|
|
29529
29543
|
} else
|
|
29530
29544
|
V !== "" && (N[E] = V);
|
|
29531
29545
|
}));
|
|
29532
|
-
yield Promise.all(k), (
|
|
29546
|
+
yield Promise.all(k), (L === "previous" || !L && O !== !0) && (S == null || S(!1)), h.confirm({
|
|
29533
29547
|
title: p("Bulk update"),
|
|
29534
29548
|
content: p(B === "selected" ? "Update selected data?" : "Update all data?"),
|
|
29535
29549
|
onOk() {
|
|
@@ -29557,9 +29571,9 @@ const useCreateActionProps = () => {
|
|
|
29557
29571
|
t instanceof TableFieldResource || (Y = (G = n == null ? void 0 : n.service) == null ? void 0 : G.refresh) == null || Y.call(G), w && ($ ? h.success({
|
|
29558
29572
|
title: d(w),
|
|
29559
29573
|
onOk: () => z(this, null, function* () {
|
|
29560
|
-
(
|
|
29574
|
+
(O && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
|
|
29561
29575
|
})
|
|
29562
|
-
}) : (message.success(d(w)), (
|
|
29576
|
+
}) : (message.success(d(w)), (O && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j))));
|
|
29563
29577
|
});
|
|
29564
29578
|
},
|
|
29565
29579
|
onCancel() {
|
|
@@ -29578,11 +29592,11 @@ const useCreateActionProps = () => {
|
|
|
29578
29592
|
onClick() {
|
|
29579
29593
|
return z(this, null, function* () {
|
|
29580
29594
|
var E, V, H, U;
|
|
29581
|
-
const { skipValidator: F, onSuccess: R, requestSettings: T } = (E = o == null ? void 0 : o["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: $, successMessage:
|
|
29595
|
+
const { skipValidator: F, onSuccess: R, requestSettings: T } = (E = o == null ? void 0 : o["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: $, successMessage: O, actionAfterSuccess: j } = R || {}, w = o == null ? void 0 : o["x-action"];
|
|
29582
29596
|
if (!T.url)
|
|
29583
29597
|
return;
|
|
29584
29598
|
F !== !0 && w === "customize:form:request" && (yield a.submit());
|
|
29585
|
-
const
|
|
29599
|
+
const L = T.headers ? JSON.parse(T.headers) : {}, N = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
|
|
29586
29600
|
if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
|
|
29587
29601
|
const G = i.map((J) => J.name), Y = getFormValues({
|
|
29588
29602
|
filterByTk: n,
|
|
@@ -29598,18 +29612,18 @@ const useCreateActionProps = () => {
|
|
|
29598
29612
|
const q = {
|
|
29599
29613
|
url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
|
|
29600
29614
|
method: T.method,
|
|
29601
|
-
headers: parse(
|
|
29615
|
+
headers: parse(L)({ currentRecord: m, currentUser: g }),
|
|
29602
29616
|
params: parse(N)({ currentRecord: m, currentUser: g }),
|
|
29603
29617
|
data: parse(k)({ currentRecord: m, currentUser: g })
|
|
29604
29618
|
};
|
|
29605
29619
|
f.data = c.data || {}, f.data.loading = !0;
|
|
29606
29620
|
try {
|
|
29607
|
-
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (H = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || H.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)),
|
|
29608
|
-
title: r(
|
|
29621
|
+
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (H = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || H.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), O || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && $ && (isURL($) ? window.location.href = $ : t($))), D ? S.success({
|
|
29622
|
+
title: r(O),
|
|
29609
29623
|
onOk: () => z(this, null, function* () {
|
|
29610
29624
|
(B && !j || j === "redirect") && $ && (isURL($) ? window.location.href = $ : t($));
|
|
29611
29625
|
})
|
|
29612
|
-
}) : message.success(r(
|
|
29626
|
+
}) : message.success(r(O));
|
|
29613
29627
|
} finally {
|
|
29614
29628
|
f.data.loading = !1;
|
|
29615
29629
|
}
|
|
@@ -29629,10 +29643,10 @@ const useCreateActionProps = () => {
|
|
|
29629
29643
|
skipValidator: B,
|
|
29630
29644
|
triggerWorkflows: $
|
|
29631
29645
|
} = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
|
|
29632
|
-
manualClose:
|
|
29646
|
+
manualClose: O,
|
|
29633
29647
|
redirecting: j,
|
|
29634
29648
|
redirectTo: w,
|
|
29635
|
-
successMessage:
|
|
29649
|
+
successMessage: L,
|
|
29636
29650
|
actionAfterSuccess: N
|
|
29637
29651
|
} = T || {}, k = {}, M = Object.keys(R).map((U) => z(this, null, function* () {
|
|
29638
29652
|
const G = R[U], Y = d(U);
|
|
@@ -29667,14 +29681,14 @@ const useCreateActionProps = () => {
|
|
|
29667
29681
|
if (w && (G = yield getVariableValue(w, {
|
|
29668
29682
|
variables: b,
|
|
29669
29683
|
localVariables: [...S, { name: "$record", ctx: new Proxy((H = U == null ? void 0 : U.data) == null ? void 0 : H.data, {}) }]
|
|
29670
|
-
})), (N === "previous" || !N && j !== !0) && (a == null || a(!1)), i == null || i(!1), !
|
|
29684
|
+
})), (N === "previous" || !N && j !== !0) && (a == null || a(!1)), i == null || i(!1), !L)
|
|
29671
29685
|
return;
|
|
29672
|
-
|
|
29673
|
-
title: m(
|
|
29686
|
+
O ? f.success({
|
|
29687
|
+
title: m(L),
|
|
29674
29688
|
onOk: () => z(this, null, function* () {
|
|
29675
29689
|
yield e.reset(), (j && !N || N === "redirect") && G && (isURL(G) ? window.location.href = G : c(G));
|
|
29676
29690
|
})
|
|
29677
|
-
}) : (message.success(m(
|
|
29691
|
+
}) : (message.success(m(L)), (j && !N || N === "redirect" || N === "redirect") && G && (isURL(G) ? window.location.href = G : c(G)));
|
|
29678
29692
|
} catch (U) {
|
|
29679
29693
|
h.data.loading = !1;
|
|
29680
29694
|
}
|
|
@@ -29865,7 +29879,7 @@ const useCreateActionProps = () => {
|
|
|
29865
29879
|
var n;
|
|
29866
29880
|
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);
|
|
29867
29881
|
}, useAssociationFilterBlockProps = () => {
|
|
29868
|
-
var v, I, F, R, T, D, B, $,
|
|
29882
|
+
var v, I, F, R, T, D, B, $, O, j;
|
|
29869
29883
|
const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), n = useOptionalFieldList(), { getDataBlocks: o } = useFilterBlock(), r = e == null ? void 0 : e.name, a = useField(), { props: i } = useBlockRequestContext(), l = useDataSourceHeaders(i == null ? void 0 : i.dataSource), c = useCollectionManager(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (I = (v = a.componentProps) == null ? void 0 : v.params) == null ? void 0 : I.filter });
|
|
29870
29884
|
let p, m, h, g, f, C, b, S;
|
|
29871
29885
|
C = e != null && e.target ? (F = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : F.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(
|
|
@@ -29894,15 +29908,15 @@ const useCreateActionProps = () => {
|
|
|
29894
29908
|
g,
|
|
29895
29909
|
C,
|
|
29896
29910
|
(B = a.componentProps) == null ? void 0 : B.params,
|
|
29897
|
-
(
|
|
29911
|
+
(O = ($ = a.componentProps) == null ? void 0 : $.params) == null ? void 0 : O.sort,
|
|
29898
29912
|
d
|
|
29899
29913
|
]);
|
|
29900
29914
|
const y = useCallback(
|
|
29901
29915
|
(w) => {
|
|
29902
|
-
const { targets:
|
|
29916
|
+
const { targets: L, uid: N } = findFilterTargets(t);
|
|
29903
29917
|
o().forEach((k) => {
|
|
29904
29918
|
var U, G, Y, J;
|
|
29905
|
-
if (!
|
|
29919
|
+
if (!L.find((K) => K.uid === k.uid))
|
|
29906
29920
|
return;
|
|
29907
29921
|
const q = `${N}${t.name}`, E = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
29908
29922
|
(Y = (G = k.service.params) == null ? void 0 : G[1]) != null && Y.filters || _.set(k.service.params, "[1].filters", {});
|
|
@@ -29931,14 +29945,14 @@ const useCreateActionProps = () => {
|
|
|
29931
29945
|
if (!e)
|
|
29932
29946
|
return {};
|
|
29933
29947
|
if (isOptionalField(e)) {
|
|
29934
|
-
const w = n.find((k) => k.name === t.name),
|
|
29948
|
+
const w = n.find((k) => k.name === t.name), L = {
|
|
29935
29949
|
select: "$in",
|
|
29936
29950
|
multipleSelect: "$anyOf",
|
|
29937
29951
|
checkbox: "$in",
|
|
29938
29952
|
checkboxGroup: "$anyOf"
|
|
29939
29953
|
}, N = ((j = w == null ? void 0 : w.uiSchema) == null ? void 0 : j.enum) || [];
|
|
29940
29954
|
C = "value", b = "label", p = N, h = {}, g = () => {
|
|
29941
|
-
}, S = `${w.name}.${
|
|
29955
|
+
}, S = `${w.name}.${L[w.interface]}`, m = (k) => {
|
|
29942
29956
|
const M = k.target.value;
|
|
29943
29957
|
if (!M) {
|
|
29944
29958
|
p = N;
|
|
@@ -30235,35 +30249,35 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
30235
30249
|
const $ = {
|
|
30236
30250
|
type: "duplicate",
|
|
30237
30251
|
tag: c((w = B.uiSchema) == null ? void 0 : w.title) || B.name
|
|
30238
|
-
},
|
|
30252
|
+
}, O = P(x({}, $), {
|
|
30239
30253
|
title: React.createElement(TreeNode, $),
|
|
30240
30254
|
key: v ? `${v}.${B.name}` : B.name,
|
|
30241
30255
|
isLeaf: !0,
|
|
30242
30256
|
field: B,
|
|
30243
30257
|
disabled: I
|
|
30244
|
-
}), j = F.find((
|
|
30258
|
+
}), j = F.find((L) => L.name === O.key);
|
|
30245
30259
|
if (["belongsTo", "belongsToMany"].includes(B.type) && (!j || ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode)))
|
|
30246
|
-
$.type = "reference",
|
|
30260
|
+
$.type = "reference", O.type = "reference", O.title = React.createElement(TreeNode, P(x({}, $), { type: "reference" })), O.isLeaf = !1, O.children = m(B.target, {
|
|
30247
30261
|
depth: S + 1,
|
|
30248
30262
|
maxDepth: y,
|
|
30249
|
-
prefix:
|
|
30263
|
+
prefix: O.key,
|
|
30250
30264
|
exclude: systemKeys
|
|
30251
30265
|
});
|
|
30252
30266
|
else if (["hasOne", "hasMany"].includes(B.type) || ["Nester", "SubTable"].includes(j == null ? void 0 : j.fieldMode)) {
|
|
30253
|
-
let
|
|
30254
|
-
["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (
|
|
30267
|
+
let L = !1;
|
|
30268
|
+
["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (L = !0), O.disabled = !0, O.isLeaf = !1, O.children = p(
|
|
30255
30269
|
B.target,
|
|
30256
30270
|
{
|
|
30257
30271
|
depth: S + 1,
|
|
30258
30272
|
maxDepth: y,
|
|
30259
|
-
prefix:
|
|
30273
|
+
prefix: O.key,
|
|
30260
30274
|
exclude: ["id", ...systemKeys],
|
|
30261
|
-
disabled:
|
|
30275
|
+
disabled: L
|
|
30262
30276
|
},
|
|
30263
30277
|
F
|
|
30264
30278
|
);
|
|
30265
30279
|
}
|
|
30266
|
-
return
|
|
30280
|
+
return O;
|
|
30267
30281
|
}).filter(Boolean);
|
|
30268
30282
|
return f.set(R, D), D;
|
|
30269
30283
|
})(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
|
|
@@ -30273,7 +30287,7 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
30273
30287
|
if (y > S)
|
|
30274
30288
|
return [];
|
|
30275
30289
|
const R = r(C).map((T) => {
|
|
30276
|
-
var $,
|
|
30290
|
+
var $, O;
|
|
30277
30291
|
if (!T.target || !T.interface || v.includes(T.name))
|
|
30278
30292
|
return;
|
|
30279
30293
|
const D = {
|
|
@@ -30282,7 +30296,7 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
30282
30296
|
}, B = b ? `${b}.${T.name}` : T.name;
|
|
30283
30297
|
return {
|
|
30284
30298
|
type: "preloading",
|
|
30285
|
-
tag: c((
|
|
30299
|
+
tag: c((O = T.uiSchema) == null ? void 0 : O.title) || T.name,
|
|
30286
30300
|
title: React.createElement(TreeNode, D),
|
|
30287
30301
|
key: B,
|
|
30288
30302
|
isLeaf: !1,
|
|
@@ -30312,9 +30326,9 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
30312
30326
|
const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, I) => {
|
|
30313
30327
|
var F;
|
|
30314
30328
|
(F = v == null ? void 0 : v.reduceProperties) == null || F.call(v, (R, T) => {
|
|
30315
|
-
var
|
|
30316
|
-
const D = R || I, B = T["x-collection-field"] && o(T["x-collection-field"]), $ = T.name.includes("."),
|
|
30317
|
-
if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((
|
|
30329
|
+
var L, N, k;
|
|
30330
|
+
const D = R || I, B = T["x-collection-field"] && o(T["x-collection-field"]), $ = T.name.includes("."), O = B && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(B.type), j = !O && $ ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? j : D + "." + j;
|
|
30331
|
+
if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((L = T["x-component-props"]) == null ? void 0 : L.mode)) && C.add(w), B && (O || $) && T["x-component"] !== "TableField") {
|
|
30318
30332
|
if (f.add({ name: w, fieldMode: ((N = T["x-component-props"]) == null ? void 0 : N.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
|
|
30319
30333
|
const M = D && D !== "" ? D + "." + T.name : T.name;
|
|
30320
30334
|
b(T, M);
|
|
@@ -31368,7 +31382,7 @@ const DragHandler = (e) => {
|
|
|
31368
31382
|
} = useURLSearchParamsVariable(), { datetimeCtx: F } = useDatetimeVariableContext(), { currentFormCtx: R } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: T } = useCollection_deprecated(), D = useContextVariable();
|
|
31369
31383
|
let { name: B } = useBlockCollection();
|
|
31370
31384
|
e != null && e.collectionName && (B = e.collectionName);
|
|
31371
|
-
const $ = useApp(),
|
|
31385
|
+
const $ = useApp(), O = ((j = $.getVariables) == null ? void 0 : j.call($).map((w) => ({
|
|
31372
31386
|
name: w.name,
|
|
31373
31387
|
ctx: w.useCtx()
|
|
31374
31388
|
}))) || [];
|
|
@@ -31459,7 +31473,7 @@ const DragHandler = (e) => {
|
|
|
31459
31473
|
ctx: y,
|
|
31460
31474
|
defaultValue: I
|
|
31461
31475
|
},
|
|
31462
|
-
...
|
|
31476
|
+
...O
|
|
31463
31477
|
].filter(Boolean), [
|
|
31464
31478
|
i,
|
|
31465
31479
|
l,
|
|
@@ -31483,7 +31497,7 @@ const DragHandler = (e) => {
|
|
|
31483
31497
|
o,
|
|
31484
31498
|
D,
|
|
31485
31499
|
y,
|
|
31486
|
-
...
|
|
31500
|
+
...O.map((w) => w.ctx)
|
|
31487
31501
|
]);
|
|
31488
31502
|
}, useLocalVariables$1 = useLocalVariables, useVariables = () => useContext(VariablesContext), useVariables$1 = useVariables, isSubFormOrSubTableField = (e) => {
|
|
31489
31503
|
for (; e; ) {
|
|
@@ -31559,7 +31573,7 @@ const useParseDefaultValue = () => {
|
|
|
31559
31573
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
31560
31574
|
value: B,
|
|
31561
31575
|
collectionName: $,
|
|
31562
|
-
dataSource:
|
|
31576
|
+
dataSource: O = "main"
|
|
31563
31577
|
} = yield n.parseVariable(t.default, o, {
|
|
31564
31578
|
fieldOperator: C(t.name)
|
|
31565
31579
|
});
|
|
@@ -31567,7 +31581,7 @@ const useParseDefaultValue = () => {
|
|
|
31567
31581
|
collectionName: D.target,
|
|
31568
31582
|
targetCollectionName: $,
|
|
31569
31583
|
dm: b,
|
|
31570
|
-
dataSource:
|
|
31584
|
+
dataSource: O
|
|
31571
31585
|
})) {
|
|
31572
31586
|
e.loading = !1;
|
|
31573
31587
|
return;
|
|
@@ -31583,8 +31597,8 @@ const useParseDefaultValue = () => {
|
|
|
31583
31597
|
const R = getVariableName(t.default), T = S(R);
|
|
31584
31598
|
return T ? (y({ forceUpdate: !0 }), reaction(
|
|
31585
31599
|
() => {
|
|
31586
|
-
const B = { [R]: (T == null ? void 0 : T.ctx) || {} }, $ = getPath(t.default),
|
|
31587
|
-
return
|
|
31600
|
+
const B = { [R]: (T == null ? void 0 : T.ctx) || {} }, $ = getPath(t.default), O = getValuesByPath(B, $);
|
|
31601
|
+
return O === void 0 ? Math.random() : O;
|
|
31588
31602
|
},
|
|
31589
31603
|
() => v({ forceUpdate: !0 }),
|
|
31590
31604
|
{
|
|
@@ -37615,8 +37629,8 @@ const enabledIndexColumn$1 = {
|
|
|
37615
37629
|
name: "fieldSettings:component:CascadeSelect",
|
|
37616
37630
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
37617
37631
|
}), SchemaSettingsDateRange = function e(t) {
|
|
37618
|
-
var R, T, D, B, $,
|
|
37619
|
-
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(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 = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.dateFormat) || ((
|
|
37632
|
+
var R, T, D, B, $, O, j, w, L, N, k, M, q, E, V, H;
|
|
37633
|
+
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(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 = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.dateFormat) || ((O = ($ = u == null ? void 0 : u.uiSchema) == null ? void 0 : $["x-component-props"]) == null ? void 0 : O.dateFormat) || "YYYY-MM-DD", m = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.timeFormat) || ((L = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : L.timeFormat) || "HH:mm:ss", h = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.picker) || ((M = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : M.picker) || "date";
|
|
37620
37634
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
37621
37635
|
const g = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._minDate, f = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._maxDate, C = ((V = u == null ? void 0 : u.uiSchema) == null ? void 0 : V["x-component-props"].gmt) || !1, b = ((H = u == null ? void 0 : u.uiSchema) == null ? void 0 : H["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
37622
37636
|
(U) => /* @__PURE__ */ jsx(
|
|
@@ -39097,12 +39111,12 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39097
39111
|
_.isFunction(C) ? n.current = C(n.current) : n.current = C;
|
|
39098
39112
|
}, []), u = useCallback(
|
|
39099
39113
|
(C, b, S) => z(void 0, null, function* () {
|
|
39100
|
-
var w,
|
|
39114
|
+
var w, L;
|
|
39101
39115
|
const y = C.split("."), v = y[0], I = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
39102
39116
|
let F = mergeCtxWithLocalVariables(n.current, b);
|
|
39103
39117
|
const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, I);
|
|
39104
39118
|
let B = R;
|
|
39105
|
-
const { fieldPath: $ } = getFieldPath$1(C, I),
|
|
39119
|
+
const { fieldPath: $ } = getFieldPath$1(C, I), O = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r($, T)) == null ? void 0 : w.target;
|
|
39106
39120
|
if (!(v in F))
|
|
39107
39121
|
throw new Error(`VariablesProvider: ${v} is not found`);
|
|
39108
39122
|
for (let N = 0; N < y.length; N++) {
|
|
@@ -39110,11 +39124,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39110
39124
|
return {
|
|
39111
39125
|
value: F === void 0 ? D == null ? void 0 : D.defaultValue : F,
|
|
39112
39126
|
dataSource: T,
|
|
39113
|
-
collectionName:
|
|
39127
|
+
collectionName: O
|
|
39114
39128
|
};
|
|
39115
39129
|
if (_.isFunction(F))
|
|
39116
39130
|
break;
|
|
39117
|
-
const k = y[N], M = y.slice(0, N + 1).join("."), { fieldPath: q } = getFieldPath$1(M, I), E = r(q, T), V = (
|
|
39131
|
+
const k = y[N], M = y.slice(0, N + 1).join("."), { fieldPath: q } = getFieldPath$1(M, I), E = r(q, T), V = (L = a(B, T)) == null ? void 0 : L.getPrimaryKey();
|
|
39118
39132
|
if (Array.isArray(F)) {
|
|
39119
39133
|
const H = F.map((U) => {
|
|
39120
39134
|
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U, M) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
|
|
@@ -39164,7 +39178,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39164
39178
|
return {
|
|
39165
39179
|
value: j === void 0 ? D.defaultValue : j,
|
|
39166
39180
|
dataSource: T,
|
|
39167
|
-
collectionName:
|
|
39181
|
+
collectionName: O
|
|
39168
39182
|
};
|
|
39169
39183
|
}),
|
|
39170
39184
|
[r]
|
|
@@ -39589,8 +39603,8 @@ const NocoBaseField = (e) => {
|
|
|
39589
39603
|
!y.parent && p && (y.parent = p, !((B = (D = y.parent) == null ? void 0 : D.properties) != null && B[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
|
|
39590
39604
|
const v = useCallback(() => {
|
|
39591
39605
|
const $ = y.parent;
|
|
39592
|
-
h.current = new Schema(y.toJSON(), $), $ != null && $.properties && Object.keys($.properties).forEach((
|
|
39593
|
-
|
|
39606
|
+
h.current = new Schema(y.toJSON(), $), $ != null && $.properties && Object.keys($.properties).forEach((O) => {
|
|
39607
|
+
O === y.name && ($.properties[O] = h.current);
|
|
39594
39608
|
}), b(), S == null || S();
|
|
39595
39609
|
}, [y, S, b]), I = useMemo(() => d ? createMergedSchemaInstance(y, d, o) : f ? (f.default = C, createMergedSchemaInstance(y, f, o)) : y, [f, C, y, o, d]), F = useFieldProps(I), R = ($) => {
|
|
39596
39610
|
if (!r)
|
|
@@ -39746,7 +39760,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39746
39760
|
return ((K = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : K.filter((X) => !X.disabled)) || [];
|
|
39747
39761
|
},
|
|
39748
39762
|
[F == null ? void 0 : F["x-linkage-rules"]]
|
|
39749
|
-
), { designable: $ } = useDesignable(),
|
|
39763
|
+
), { designable: $ } = useDesignable(), O = useComponent(o) || o, j = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: L, setVisibleWithURL: N } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: M } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), H = useForm();
|
|
39750
39764
|
useEffect(() => {
|
|
39751
39765
|
I.stateOfLinkageRules && setInitialActionState(I);
|
|
39752
39766
|
const K = uid(), X = [];
|
|
@@ -39810,7 +39824,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39810
39824
|
icon: i,
|
|
39811
39825
|
loading: d,
|
|
39812
39826
|
handleMouseEnter: U,
|
|
39813
|
-
tarComponent:
|
|
39827
|
+
tarComponent: O,
|
|
39814
39828
|
className: a,
|
|
39815
39829
|
type: e.type,
|
|
39816
39830
|
Designer: v,
|
|
@@ -39824,7 +39838,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39824
39838
|
style: u,
|
|
39825
39839
|
propsDisabled: m,
|
|
39826
39840
|
useAction: r,
|
|
39827
|
-
visibleWithURL:
|
|
39841
|
+
visibleWithURL: L,
|
|
39828
39842
|
setVisibleWithURL: N,
|
|
39829
39843
|
setSubmitted: k,
|
|
39830
39844
|
getAriaLabel: M,
|
|
@@ -39863,7 +39877,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39863
39877
|
setVisibleWithURL: D,
|
|
39864
39878
|
setSubmitted: B,
|
|
39865
39879
|
getAriaLabel: $,
|
|
39866
|
-
parentRecordData:
|
|
39880
|
+
parentRecordData: O
|
|
39867
39881
|
} = Ce, j = W(Ce, [
|
|
39868
39882
|
"containerRefKey",
|
|
39869
39883
|
"fieldSchema",
|
|
@@ -39892,7 +39906,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39892
39906
|
"setSubmitted",
|
|
39893
39907
|
"getAriaLabel",
|
|
39894
39908
|
"parentRecordData"
|
|
39895
|
-
]), [w,
|
|
39909
|
+
]), [w, L] = useState(!1), { wrapSSR: N, componentCls: k, hashId: M } = useStyles$8(), [q, E] = useState(!1), V = o["x-toolbar-props"] || o["x-designer-props"], H = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openMode, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.openSize, G = (xe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : xe.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), {
|
|
39896
39910
|
run: X,
|
|
39897
39911
|
element: ee,
|
|
39898
39912
|
disabled: Q,
|
|
@@ -39924,7 +39938,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39924
39938
|
onClick: h,
|
|
39925
39939
|
refreshDataBlockRequest: G,
|
|
39926
39940
|
fieldSchema: o,
|
|
39927
|
-
setVisible:
|
|
39941
|
+
setVisible: L,
|
|
39928
39942
|
run: X,
|
|
39929
39943
|
confirm: g,
|
|
39930
39944
|
modal: Y,
|
|
@@ -39933,7 +39947,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39933
39947
|
title: y
|
|
39934
39948
|
}, ue = useCallback(
|
|
39935
39949
|
(de) => {
|
|
39936
|
-
|
|
39950
|
+
L == null || L(de), D == null || D(de);
|
|
39937
39951
|
},
|
|
39938
39952
|
[D]
|
|
39939
39953
|
);
|
|
@@ -40032,10 +40046,10 @@ const RenderButton = ({
|
|
|
40032
40046
|
confirmTitle: D,
|
|
40033
40047
|
title: B
|
|
40034
40048
|
}) => {
|
|
40035
|
-
const { getDataBlockRequest: $ } = useDataBlockRequestGetter(), { t:
|
|
40049
|
+
const { getDataBlockRequest: $ } = useDataBlockRequestGetter(), { t: O } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: w } = usePopupUtils(), L = useVariables$1(), N = useLocalVariables$1(), k = useRef(null), M = useCompile(), q = useForm();
|
|
40036
40050
|
k.current = w;
|
|
40037
40051
|
const E = {
|
|
40038
|
-
variables:
|
|
40052
|
+
variables: L,
|
|
40039
40053
|
localVariables: N
|
|
40040
40054
|
}, V = useCallback(
|
|
40041
40055
|
(H, U = !0) => z(void 0, null, function* () {
|
|
@@ -40043,7 +40057,7 @@ const RenderButton = ({
|
|
|
40043
40057
|
if (U && isPortalInBody(H.target))
|
|
40044
40058
|
return;
|
|
40045
40059
|
H.preventDefault(), H.stopPropagation();
|
|
40046
|
-
const G = yield getVariableValue(
|
|
40060
|
+
const G = yield getVariableValue(O(F == null ? void 0 : F.title, { title: M(y.title) }), E), Y = yield getVariableValue(O(F == null ? void 0 : F.content, { title: M(y.title) }), E);
|
|
40047
40061
|
if (!a && n) {
|
|
40048
40062
|
const K = () => {
|
|
40049
40063
|
b ? b(H, () => {
|
|
@@ -40052,8 +40066,8 @@ const RenderButton = ({
|
|
|
40052
40066
|
}) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? k.current() : (v(!0), I == null || I());
|
|
40053
40067
|
};
|
|
40054
40068
|
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (J = q == null ? void 0 : q.submit) == null ? void 0 : J.call(q), R.confirm({
|
|
40055
|
-
title:
|
|
40056
|
-
content:
|
|
40069
|
+
title: O(G, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40070
|
+
content: O(Y, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40057
40071
|
onOk: K
|
|
40058
40072
|
})) : K();
|
|
40059
40073
|
}
|
|
@@ -40074,7 +40088,7 @@ const RenderButton = ({
|
|
|
40074
40088
|
I,
|
|
40075
40089
|
T,
|
|
40076
40090
|
v,
|
|
40077
|
-
|
|
40091
|
+
O,
|
|
40078
40092
|
B,
|
|
40079
40093
|
$
|
|
40080
40094
|
]
|
|
@@ -40107,7 +40121,7 @@ RenderButton.displayName = "RenderButton";
|
|
|
40107
40121
|
const RenderButtonInner = observer$1(
|
|
40108
40122
|
(e) => {
|
|
40109
40123
|
var N, M;
|
|
40110
|
-
const
|
|
40124
|
+
const L = e, {
|
|
40111
40125
|
designable: t,
|
|
40112
40126
|
field: n,
|
|
40113
40127
|
aclCtx: o,
|
|
@@ -40128,7 +40142,7 @@ const RenderButtonInner = observer$1(
|
|
|
40128
40142
|
title: S,
|
|
40129
40143
|
isLink: y,
|
|
40130
40144
|
onlyIcon: v
|
|
40131
|
-
} =
|
|
40145
|
+
} = L, I = W(L, [
|
|
40132
40146
|
"designable",
|
|
40133
40147
|
"field",
|
|
40134
40148
|
"aclCtx",
|
|
@@ -40176,7 +40190,7 @@ const RenderButtonInner = observer$1(
|
|
|
40176
40190
|
);
|
|
40177
40191
|
if (!t && ((N = n == null ? void 0 : n.data) != null && N.hidden || !o))
|
|
40178
40192
|
return null;
|
|
40179
|
-
const D = S != null ? S : n == null ? void 0 : n.title, B = typeof D == "string" ? F(D, { ns: NAMESPACE_UI_SCHEMA }) : D, k = l, { opacity: $ } = k,
|
|
40193
|
+
const D = S != null ? S : n == null ? void 0 : n.title, B = typeof D == "string" ? F(D, { ns: NAMESPACE_UI_SCHEMA }) : D, k = l, { opacity: $ } = k, O = W(k, ["opacity"]), j = y && $ ? { opacity: $ } : void 0, w = v || p ? T : p || Button;
|
|
40180
40194
|
return /* @__PURE__ */ jsxs(
|
|
40181
40195
|
SortableItem,
|
|
40182
40196
|
P(x({
|
|
@@ -40187,7 +40201,7 @@ const RenderButtonInner = observer$1(
|
|
|
40187
40201
|
loading: ((M = n == null ? void 0 : n.data) == null ? void 0 : M.loading) || a,
|
|
40188
40202
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: j }) : r,
|
|
40189
40203
|
disabled: i,
|
|
40190
|
-
style: y ?
|
|
40204
|
+
style: y ? O : l,
|
|
40191
40205
|
onClick: R,
|
|
40192
40206
|
component: w,
|
|
40193
40207
|
className: cls(m, h, g, "nb-action"),
|
|
@@ -40662,30 +40676,30 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40662
40676
|
"toOptionsItem",
|
|
40663
40677
|
"popupMatchSelectWidth",
|
|
40664
40678
|
"onSuccess"
|
|
40665
|
-
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, $ = F(B) || T(B),
|
|
40679
|
+
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, $ = F(B) || T(B), O = u || ($ == null ? void 0 : $.target) && (t == null ? void 0 : t.label) && T(`${$.target}.${t.label}`), j = useMemo(() => {
|
|
40666
40680
|
var K;
|
|
40667
|
-
if (
|
|
40668
|
-
const X = D(
|
|
40669
|
-
return
|
|
40681
|
+
if (O != null && O.interface) {
|
|
40682
|
+
const X = D(O.interface), ee = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
40683
|
+
return O.type === "string" ? "$includes" : ee;
|
|
40670
40684
|
}
|
|
40671
40685
|
return "$includes";
|
|
40672
|
-
}, [
|
|
40686
|
+
}, [O]), w = useCompile(), L = useCallback(
|
|
40673
40687
|
(K) => {
|
|
40674
40688
|
try {
|
|
40675
40689
|
return K.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
|
|
40676
40690
|
var Q;
|
|
40677
40691
|
let ee = w(X[t.label]);
|
|
40678
|
-
if ((Q =
|
|
40692
|
+
if ((Q = O == null ? void 0 : O.uiSchema) != null && Q.enum)
|
|
40679
40693
|
if (Array.isArray(ee))
|
|
40680
40694
|
ee = ee.map((te, ne) => {
|
|
40681
|
-
const se =
|
|
40695
|
+
const se = O.uiSchema.enum.find((ae) => ae.value === te);
|
|
40682
40696
|
return se ? /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, style: { marginRight: 3 }, children: (se == null ? void 0 : se.label) || te }, ne) : /* @__PURE__ */ jsx(Tag, { role: "button", children: te }, te);
|
|
40683
40697
|
}).reverse();
|
|
40684
40698
|
else {
|
|
40685
|
-
const te =
|
|
40699
|
+
const te = O.uiSchema.enum.find((ne) => ne.value === ee);
|
|
40686
40700
|
te && (ee = /* @__PURE__ */ jsx(Tag, { role: "button", color: te.color, children: te.label }));
|
|
40687
40701
|
}
|
|
40688
|
-
return (
|
|
40702
|
+
return (O == null ? void 0 : O.type) === "date" && (ee = dayjs(ee).format("YYYY-MM-DD")), c ? c({
|
|
40689
40703
|
[t.label]: ee || EMPTY$1,
|
|
40690
40704
|
[t.value]: X[t.value]
|
|
40691
40705
|
}) : P(x({}, omit(X, "style")), {
|
|
@@ -40697,7 +40711,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40697
40711
|
return console.error(X), K;
|
|
40698
40712
|
}
|
|
40699
40713
|
},
|
|
40700
|
-
[
|
|
40714
|
+
[O == null ? void 0 : O.uiSchema, t]
|
|
40701
40715
|
), { data: N, run: k, loading: M } = useRequest(
|
|
40702
40716
|
P(x({
|
|
40703
40717
|
action: "list"
|
|
@@ -40769,7 +40783,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
40769
40783
|
defaultValue: a
|
|
40770
40784
|
}, C), {
|
|
40771
40785
|
loading: N ? M : !0,
|
|
40772
|
-
options: h(
|
|
40786
|
+
options: h(L(H)),
|
|
40773
40787
|
rawOptions: H,
|
|
40774
40788
|
dropdownRender: (K) => {
|
|
40775
40789
|
const X = H.some((ee) => ee[t.label] === R.current);
|
|
@@ -40847,9 +40861,9 @@ const useFormDataTemplates = () => {
|
|
|
40847
40861
|
d(R), m(null), t == null || t.reset();
|
|
40848
40862
|
}), []), I = useCallback((R, T, D) => z(void 0, null, function* () {
|
|
40849
40863
|
const B = P(x({}, T), { dataId: R });
|
|
40850
|
-
m(T), fetchTemplateData(h, B, D).then(($) => (t && $ && (t.reset(), t.__template = !0, forEach($, (
|
|
40864
|
+
m(T), fetchTemplateData(h, B, D).then(($) => (t && $ && (t.reset(), t.__template = !0, forEach($, (O, j) => {
|
|
40851
40865
|
var w;
|
|
40852
|
-
|
|
40866
|
+
O && (t.values[j] = O, (w = t == null ? void 0 : t.setInitialValuesIn) == null || w.call(t, j, O));
|
|
40853
40867
|
})), $)).catch(($) => {
|
|
40854
40868
|
console.error($);
|
|
40855
40869
|
});
|
|
@@ -41780,10 +41794,10 @@ const insertPositionToMethod = {
|
|
|
41780
41794
|
[(D = c == null ? void 0 : c["x-component-props"]) == null ? void 0 : D.onSelect]
|
|
41781
41795
|
), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
|
|
41782
41796
|
($) => {
|
|
41783
|
-
onFieldChange("target", (
|
|
41784
|
-
var w,
|
|
41785
|
-
const [, j] = ((
|
|
41786
|
-
|
|
41797
|
+
onFieldChange("target", (O) => {
|
|
41798
|
+
var w, L;
|
|
41799
|
+
const [, j] = ((L = (w = O == null ? void 0 : O.value) == null ? void 0 : w.split) == null ? void 0 : L.call(w, "||")) || [];
|
|
41800
|
+
O.query("position").take((N) => {
|
|
41787
41801
|
N.dataSource = j === "Menu.SubMenu" ? [
|
|
41788
41802
|
{ label: l("Before"), value: "beforeBegin" },
|
|
41789
41803
|
{ label: l("After"), value: "afterEnd" },
|
|
@@ -41831,9 +41845,9 @@ const insertPositionToMethod = {
|
|
|
41831
41845
|
}), [n.componentProps.tooltip]);
|
|
41832
41846
|
o["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = n.componentProps.href, C.params = n.componentProps.params);
|
|
41833
41847
|
const y = useCallback(
|
|
41834
|
-
({ title: $, icon:
|
|
41848
|
+
({ title: $, icon: O, href: j, params: w }) => {
|
|
41835
41849
|
var N;
|
|
41836
|
-
const
|
|
41850
|
+
const L = {
|
|
41837
41851
|
"x-uid": o["x-uid"],
|
|
41838
41852
|
"x-server-hooks": [
|
|
41839
41853
|
{
|
|
@@ -41842,11 +41856,11 @@ const insertPositionToMethod = {
|
|
|
41842
41856
|
}
|
|
41843
41857
|
]
|
|
41844
41858
|
};
|
|
41845
|
-
$ && (o.title = $, n.title = $,
|
|
41846
|
-
schema:
|
|
41859
|
+
$ && (o.title = $, n.title = $, L.title = $, i()), n.componentProps.icon = O, n.componentProps.href = j, n.componentProps.params = w, L["x-component-props"] = { icon: O, href: j, params: w }, o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].icon = O, o["x-component-props"].href = j, o["x-component-props"].params = w, m == null || m({ item: { props: { schema: o } } }), a.emit("patch", {
|
|
41860
|
+
schema: L
|
|
41847
41861
|
}), (N = o.__route__) != null && N.id && e(o.__route__.id, {
|
|
41848
41862
|
title: $,
|
|
41849
|
-
icon:
|
|
41863
|
+
icon: O,
|
|
41850
41864
|
options: j || w ? {
|
|
41851
41865
|
href: j,
|
|
41852
41866
|
params: w
|
|
@@ -41856,8 +41870,8 @@ const insertPositionToMethod = {
|
|
|
41856
41870
|
[o, n, a, i, m]
|
|
41857
41871
|
), v = useCallback(
|
|
41858
41872
|
({ tooltip: $ }) => {
|
|
41859
|
-
var
|
|
41860
|
-
(
|
|
41873
|
+
var O;
|
|
41874
|
+
(O = o.__route__) != null && O.id && e(o.__route__.id, {
|
|
41861
41875
|
tooltip: $
|
|
41862
41876
|
});
|
|
41863
41877
|
},
|
|
@@ -41887,31 +41901,31 @@ const insertPositionToMethod = {
|
|
|
41887
41901
|
}
|
|
41888
41902
|
}
|
|
41889
41903
|
}), [h, l]), { moveRoute: F } = useNocoBaseRoutes(), R = useCallback(
|
|
41890
|
-
(j) => z(void 0, [j], function* ({ target: $, position:
|
|
41904
|
+
(j) => z(void 0, [j], function* ({ target: $, position: O }) {
|
|
41891
41905
|
var q;
|
|
41892
41906
|
const [w] = ((q = $ == null ? void 0 : $.split) == null ? void 0 : q.call($, "||")) || [];
|
|
41893
41907
|
if (!w)
|
|
41894
41908
|
return;
|
|
41895
|
-
const
|
|
41909
|
+
const L = findByUid(c, w), N = createDesignable({
|
|
41896
41910
|
t: l,
|
|
41897
41911
|
api: r,
|
|
41898
41912
|
refresh: i,
|
|
41899
|
-
current:
|
|
41913
|
+
current: L
|
|
41900
41914
|
}), k = {
|
|
41901
41915
|
beforeBegin: "insertBefore",
|
|
41902
41916
|
afterEnd: "insertAfter"
|
|
41903
|
-
}, M =
|
|
41917
|
+
}, M = O === "beforeEnd" ? {
|
|
41904
41918
|
targetScope: {
|
|
41905
|
-
parentId:
|
|
41919
|
+
parentId: L.__route__.id
|
|
41906
41920
|
}
|
|
41907
41921
|
} : {
|
|
41908
|
-
targetId:
|
|
41922
|
+
targetId: L.__route__.id
|
|
41909
41923
|
};
|
|
41910
41924
|
yield F(x({
|
|
41911
41925
|
sourceId: o.__route__.id,
|
|
41912
41926
|
sortField: "sort",
|
|
41913
|
-
method: k[
|
|
41914
|
-
}, M)), N.loadAPIClientEvents(), N.insertAdjacent(
|
|
41927
|
+
method: k[O]
|
|
41928
|
+
}, M)), N.loadAPIClientEvents(), N.insertAdjacent(O, o);
|
|
41915
41929
|
}),
|
|
41916
41930
|
[c, l, r, i, F, o]
|
|
41917
41931
|
), T = useMemo(() => ({
|
|
@@ -42365,14 +42379,14 @@ const useMenuDragEnd = () => {
|
|
|
42365
42379
|
theme: m
|
|
42366
42380
|
} = 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(), [I, F] = useState(() => a || (r ? findKeysByUid(f, r) : [])), [R, T] = useState(() => ["inline", "mix"].includes(n) ? i || I : i), D = useMemo(() => {
|
|
42367
42381
|
var j;
|
|
42368
|
-
let
|
|
42382
|
+
let O;
|
|
42369
42383
|
if (o) {
|
|
42370
42384
|
const w = findKeysByUid(f, o);
|
|
42371
|
-
|
|
42385
|
+
O = (w == null ? void 0 : w[0]) || null;
|
|
42372
42386
|
} else
|
|
42373
|
-
|
|
42374
|
-
if (n === "mix" &&
|
|
42375
|
-
const w = (j = f.properties) == null ? void 0 : j[
|
|
42387
|
+
O = (I == null ? void 0 : I[0]) || null;
|
|
42388
|
+
if (n === "mix" && O) {
|
|
42389
|
+
const w = (j = f.properties) == null ? void 0 : j[O];
|
|
42376
42390
|
if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
|
|
42377
42391
|
return w;
|
|
42378
42392
|
}
|
|
@@ -42383,8 +42397,8 @@ const useMenuDragEnd = () => {
|
|
|
42383
42397
|
v(void 0);
|
|
42384
42398
|
return;
|
|
42385
42399
|
}
|
|
42386
|
-
const
|
|
42387
|
-
v(
|
|
42400
|
+
const O = findKeysByUid(f, o);
|
|
42401
|
+
v(O), ["inline", "mix"].includes(n) && T(i || O);
|
|
42388
42402
|
}, [o]), useEffect(() => {
|
|
42389
42403
|
["inline", "mix"].includes(n) && T(I);
|
|
42390
42404
|
}, [I]);
|
|
@@ -43193,7 +43207,7 @@ function loadChildren(e) {
|
|
|
43193
43207
|
return t.length && t.some((n) => isAssociation(n.field)) || (e.isLeaf = !0), t;
|
|
43194
43208
|
}
|
|
43195
43209
|
function isAssociation(e) {
|
|
43196
|
-
return e.target && e.interface;
|
|
43210
|
+
return ["belongsTo", "hasMany", "hasOne", "belongsToMany", "belongsToArray"].includes(e.type) && e.target && e.interface;
|
|
43197
43211
|
}
|
|
43198
43212
|
function trueFilter(e) {
|
|
43199
43213
|
return !0;
|
|
@@ -43217,7 +43231,7 @@ function getCollectionFieldOptions(e, t) {
|
|
|
43217
43231
|
});
|
|
43218
43232
|
}
|
|
43219
43233
|
const FieldsTreeSelect = (e) => {
|
|
43220
|
-
const
|
|
43234
|
+
const O = e, {
|
|
43221
43235
|
title: t,
|
|
43222
43236
|
value: n,
|
|
43223
43237
|
onChange: o,
|
|
@@ -43227,7 +43241,7 @@ const FieldsTreeSelect = (e) => {
|
|
|
43227
43241
|
rootOption: l,
|
|
43228
43242
|
loadData: c,
|
|
43229
43243
|
includeFieldPaths: u
|
|
43230
|
-
} =
|
|
43244
|
+
} = O, d = W(O, [
|
|
43231
43245
|
"title",
|
|
43232
43246
|
"value",
|
|
43233
43247
|
"onChange",
|
|
@@ -43238,15 +43252,15 @@ const FieldsTreeSelect = (e) => {
|
|
|
43238
43252
|
"loadData",
|
|
43239
43253
|
"includeFieldPaths"
|
|
43240
43254
|
]), p = useCompile(), { t: m } = useTranslation(), [h, g] = useState({}), f = a({ collection: r }), [C, b] = parseCollectionName(f), S = useApp(), { collectionManager: y } = S.dataSourceManager.getDataSource(C), v = (j, w) => {
|
|
43241
|
-
const
|
|
43242
|
-
return
|
|
43255
|
+
const L = y.getCollection(j);
|
|
43256
|
+
return L ? L.getAllFields(w) : [];
|
|
43243
43257
|
}, I = Object.values(h), F = useMemo(() => e.multiple ? (n || []).map((j) => h[j]).filter(Boolean) : n, [n, e.multiple, h]), R = useCallback(
|
|
43244
43258
|
(j) => z(void 0, null, function* () {
|
|
43245
43259
|
if (c != null)
|
|
43246
43260
|
return c(j);
|
|
43247
43261
|
if (!j.isLeaf && j.loadChildren) {
|
|
43248
43262
|
const w = j.loadChildren(j);
|
|
43249
|
-
g((
|
|
43263
|
+
g((L) => w.reduce((N, k) => Object.assign(N, { [k.value]: k }), x({}, L)));
|
|
43250
43264
|
}
|
|
43251
43265
|
}),
|
|
43252
43266
|
[c]
|
|
@@ -43258,15 +43272,15 @@ const FieldsTreeSelect = (e) => {
|
|
|
43258
43272
|
title: l.label,
|
|
43259
43273
|
fullTitle: l.label,
|
|
43260
43274
|
isLeaf: !1
|
|
43261
|
-
}) : null,
|
|
43262
|
-
j && (
|
|
43275
|
+
}) : null, L = (c === null ? [] : getCollectionFieldOptions.call({ compile: p, getCollectionFields: v, filter: i }, b, j)).reduce((N, k) => Object.assign(N, { [k.value]: k }), {});
|
|
43276
|
+
j && (L[j.value] = j), g(L);
|
|
43263
43277
|
}, [f, l, i, c]), useEffect(() => {
|
|
43264
43278
|
const j = e.multiple ? n : n ? [n] : [];
|
|
43265
|
-
if (!(j != null && j.length) || j.every((
|
|
43279
|
+
if (!(j != null && j.length) || j.every((L) => !!h[L]))
|
|
43266
43280
|
return;
|
|
43267
43281
|
const w = [];
|
|
43268
|
-
j.forEach((
|
|
43269
|
-
const N =
|
|
43282
|
+
j.forEach((L) => {
|
|
43283
|
+
const N = L.split(".");
|
|
43270
43284
|
let k = h[N[0]];
|
|
43271
43285
|
for (let M = 1; M < N.length && k; M++) {
|
|
43272
43286
|
const q = N.slice(0, M + 1).join(".");
|
|
@@ -43279,7 +43293,7 @@ const FieldsTreeSelect = (e) => {
|
|
|
43279
43293
|
E != null && E.length && (w.push(...E), k = E.find((V) => V.value === N.slice(0, M + 1).join(".")));
|
|
43280
43294
|
}
|
|
43281
43295
|
}
|
|
43282
|
-
}), g((
|
|
43296
|
+
}), g((L) => w.reduce((N, k) => Object.assign(N, { [k.value]: k }), x({}, L)));
|
|
43283
43297
|
}, [n, I.length, e.multiple]);
|
|
43284
43298
|
const T = useCallback(
|
|
43285
43299
|
(j) => {
|
|
@@ -43287,30 +43301,30 @@ const FieldsTreeSelect = (e) => {
|
|
|
43287
43301
|
o(j);
|
|
43288
43302
|
return;
|
|
43289
43303
|
}
|
|
43290
|
-
const w = j.map((k) => k.value).filter(Boolean),
|
|
43304
|
+
const w = j.map((k) => k.value).filter(Boolean), L = new Set(w), N = F.find((k) => !L.has(k.value));
|
|
43291
43305
|
if (N) {
|
|
43292
43306
|
const k = `${N.value}.`;
|
|
43293
43307
|
Object.keys(h).forEach((M) => {
|
|
43294
|
-
M.startsWith(k) &&
|
|
43308
|
+
M.startsWith(k) && L.delete(M);
|
|
43295
43309
|
});
|
|
43296
43310
|
} else
|
|
43297
43311
|
u && w.forEach((k) => {
|
|
43298
43312
|
const M = k.split(".");
|
|
43299
43313
|
if (M.length)
|
|
43300
43314
|
for (let q = 1; q <= M.length; q++)
|
|
43301
|
-
|
|
43315
|
+
L.add(M.slice(0, q).join("."));
|
|
43302
43316
|
});
|
|
43303
|
-
o(Array.from(
|
|
43317
|
+
o(Array.from(L));
|
|
43304
43318
|
},
|
|
43305
43319
|
[e.multiple, F, o, h]
|
|
43306
43320
|
), D = useCallback(
|
|
43307
43321
|
(j) => {
|
|
43308
43322
|
var q;
|
|
43309
|
-
const { value: w, onClose:
|
|
43323
|
+
const { value: w, onClose: L, disabled: N, closable: k } = j;
|
|
43310
43324
|
if (!w)
|
|
43311
43325
|
return null;
|
|
43312
43326
|
const { fullTitle: M } = (q = h[w]) != null ? q : {};
|
|
43313
|
-
return /* @__PURE__ */ jsx(Tag, { closable: k && !N, onClose:
|
|
43327
|
+
return /* @__PURE__ */ jsx(Tag, { closable: k && !N, onClose: L, children: M == null ? void 0 : M.join(" / ") });
|
|
43314
43328
|
},
|
|
43315
43329
|
[h]
|
|
43316
43330
|
), B = Array.isArray(F) ? F.filter((j) => j.value in h) : F, $ = e.multiple ? n : n != null ? [n] : [];
|
|
@@ -43362,27 +43376,27 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
43362
43376
|
var B;
|
|
43363
43377
|
const D = e, { objectValue: t = !0, addMode: n } = D, o = W(D, ["objectValue", "addMode"]), r = useField(), a = useFieldSchema(), i = useServiceOptions$1((a == null ? void 0 : a["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 = (B = a["x-component-props"]) == null ? void 0 : B.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), I = v(l.target), { filterTargetKey: F } = I;
|
|
43364
43378
|
useEffect(() => {
|
|
43365
|
-
const $ = isVariable$1(r.value) ? void 0 : r.value,
|
|
43379
|
+
const $ = isVariable$1(r.value) ? void 0 : r.value, O = Array.isArray($) ? $.filter(Boolean) : $, j = removeIfKeyEmpty(O, F);
|
|
43366
43380
|
p(j), isEqual(r.value, j) || (r.value = j);
|
|
43367
43381
|
}, [r.value, F]), useEffect(() => {
|
|
43368
43382
|
const $ = uid();
|
|
43369
43383
|
return f.addEffects($, () => {
|
|
43370
|
-
onFieldInputValueChange("*", (
|
|
43384
|
+
onFieldInputValueChange("*", (O) => {
|
|
43371
43385
|
var N, k, M, q, E, V;
|
|
43372
|
-
const j = filterAnalyses((M = (k = (N = r.componentProps) == null ? void 0 : N.service) == null ? void 0 : k.params) == null ? void 0 : M.filter) || [], w = getFieldPath(
|
|
43373
|
-
j.includes((q =
|
|
43386
|
+
const j = filterAnalyses((M = (k = (N = r.componentProps) == null ? void 0 : N.service) == null ? void 0 : k.params) == null ? void 0 : M.filter) || [], w = getFieldPath(O.address.entire), L = getFieldPath(r.address.entire);
|
|
43387
|
+
j.includes((q = O == null ? void 0 : O.props) == null ? void 0 : q.name) && r.value && isEqual(O == null ? void 0 : O.indexes, r == null ? void 0 : r.indexes) && ((E = O == null ? void 0 : O.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, L)) && (r.setValue(null), p(null));
|
|
43374
43388
|
});
|
|
43375
43389
|
}), () => {
|
|
43376
43390
|
f.removeEffects($);
|
|
43377
43391
|
};
|
|
43378
43392
|
}, []);
|
|
43379
43393
|
const R = ($) => z(void 0, null, function* () {
|
|
43380
|
-
var
|
|
43381
|
-
const { search:
|
|
43394
|
+
var L, N;
|
|
43395
|
+
const { search: O, callBack: j } = $, {
|
|
43382
43396
|
data: { data: w }
|
|
43383
43397
|
} = yield b.create({
|
|
43384
43398
|
values: {
|
|
43385
|
-
[((N = (
|
|
43399
|
+
[((N = (L = r == null ? void 0 : r.componentProps) == null ? void 0 : L.fieldNames) == null ? void 0 : N.label) || "id"]: O
|
|
43386
43400
|
}
|
|
43387
43401
|
});
|
|
43388
43402
|
if (w) {
|
|
@@ -43416,8 +43430,8 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
43416
43430
|
service: i,
|
|
43417
43431
|
onChange: ($) => {
|
|
43418
43432
|
var j;
|
|
43419
|
-
const
|
|
43420
|
-
(j = e.onChange) == null || j.call(e,
|
|
43433
|
+
const O = Array.isArray($) && $.length === 0 ? null : $;
|
|
43434
|
+
(j = e.onChange) == null || j.call(e, O);
|
|
43421
43435
|
},
|
|
43422
43436
|
CustomDropdownRender: m === "quickAdd" && T
|
|
43423
43437
|
})
|
|
@@ -44017,32 +44031,32 @@ function Uploader(n) {
|
|
|
44017
44031
|
}, [f, p, h]);
|
|
44018
44032
|
const S = useCallback(
|
|
44019
44033
|
(B) => {
|
|
44020
|
-
var
|
|
44034
|
+
var O;
|
|
44021
44035
|
const $ = B.fileList.filter((j) => j.status !== "done").map(normalizeFile);
|
|
44022
44036
|
if (m($), a) {
|
|
44023
44037
|
const j = B.fileList.filter((w) => w.status === "done");
|
|
44024
44038
|
if (j.length) {
|
|
44025
|
-
const w = [...u, ...j.map((
|
|
44039
|
+
const w = [...u, ...j.map((L) => {
|
|
44026
44040
|
var N;
|
|
44027
|
-
return c((N =
|
|
44041
|
+
return c((N = L.response) == null ? void 0 : N.data);
|
|
44028
44042
|
})];
|
|
44029
44043
|
$.length ? d(w) : (l == null || l([...i || [], ...w]), d([]));
|
|
44030
44044
|
}
|
|
44031
44045
|
} else {
|
|
44032
44046
|
const j = B.fileList.find((w) => w.uid === B.file.uid);
|
|
44033
|
-
j.status === "done" && (l == null || l(c((
|
|
44047
|
+
j.status === "done" && (l == null || l(c((O = j.response) == null ? void 0 : O.data)), m([]));
|
|
44034
44048
|
}
|
|
44035
44049
|
},
|
|
44036
44050
|
[a, i, u, c, l]
|
|
44037
44051
|
), y = useCallback((B) => {
|
|
44038
44052
|
m(($) => {
|
|
44039
|
-
const
|
|
44040
|
-
return $.splice(
|
|
44053
|
+
const O = $.indexOf(B);
|
|
44054
|
+
return $.splice(O, 1), [...$];
|
|
44041
44055
|
});
|
|
44042
44056
|
}, []), v = useCallback((B) => {
|
|
44043
44057
|
d(($) => {
|
|
44044
|
-
const
|
|
44045
|
-
return $.splice(
|
|
44058
|
+
const O = $.indexOf(B);
|
|
44059
|
+
return $.splice(O, 1), [...$];
|
|
44046
44060
|
});
|
|
44047
44061
|
}, []), I = useComponent("QRCodeUploader"), { mimetype: F, size: R } = e != null ? e : {}, T = useSizeHint(R), D = !r && (a || (!i || Array.isArray(i) && !i.length) && !p.length);
|
|
44048
44062
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -44363,9 +44377,9 @@ const InternalFileManager = (e) => {
|
|
|
44363
44377
|
};
|
|
44364
44378
|
useEffect(() => {
|
|
44365
44379
|
if (t && Object.keys(t).length > 0) {
|
|
44366
|
-
const $ = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
44367
|
-
const j =
|
|
44368
|
-
return P(x({},
|
|
44380
|
+
const $ = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((O) => {
|
|
44381
|
+
const j = O[p.label];
|
|
44382
|
+
return P(x({}, O), {
|
|
44369
44383
|
[p.label]: getLabelFormatValue$1(y(S), y(j))
|
|
44370
44384
|
});
|
|
44371
44385
|
});
|
|
@@ -44386,10 +44400,10 @@ const InternalFileManager = (e) => {
|
|
|
44386
44400
|
setSelectedRows: u,
|
|
44387
44401
|
collectionField: b
|
|
44388
44402
|
}, R = () => {
|
|
44389
|
-
const { setVisible: $ } = useActionContext(), { multiple:
|
|
44403
|
+
const { setVisible: $ } = useActionContext(), { multiple: O, selectedRows: j, onChange: w, options: L, collectionField: N } = useContext(RecordPickerContext);
|
|
44390
44404
|
return {
|
|
44391
44405
|
onClick() {
|
|
44392
|
-
w(
|
|
44406
|
+
w(O ? unionBy(j, L, (N == null ? void 0 : N.targetKey) || "id") : (j == null ? void 0 : j[0]) || null), $(!1);
|
|
44393
44407
|
}
|
|
44394
44408
|
};
|
|
44395
44409
|
};
|
|
@@ -44441,22 +44455,22 @@ const InternalFileManager = (e) => {
|
|
|
44441
44455
|
FormItem: FormItem$1
|
|
44442
44456
|
}
|
|
44443
44457
|
}), CascadeSelect = connect((e) => {
|
|
44444
|
-
var
|
|
44458
|
+
var O;
|
|
44445
44459
|
const { data: t, mapOptions: n, onChange: o, value: r } = e, [a, i] = useState([
|
|
44446
44460
|
{ key: void 0, children: [], value: null }
|
|
44447
|
-
]), [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 = (
|
|
44461
|
+
]), [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}`), I = useMemo(() => {
|
|
44448
44462
|
var j, w;
|
|
44449
44463
|
return v != null && v.interface && ((w = (j = S(v.interface)) == null ? void 0 : j.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
|
|
44450
44464
|
}, [v]), F = useField();
|
|
44451
44465
|
useEffect(() => {
|
|
44452
44466
|
var j;
|
|
44453
44467
|
if (r) {
|
|
44454
|
-
const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((N) => N.value), !0) : transformNestedData(r),
|
|
44468
|
+
const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((N) => N.value), !0) : transformNestedData(r), L = (j = w == null ? void 0 : w.map) == null ? void 0 : j.call(w, (N) => ({
|
|
44455
44469
|
key: N.parentId,
|
|
44456
44470
|
children: [],
|
|
44457
44471
|
value: N
|
|
44458
44472
|
}));
|
|
44459
|
-
i(
|
|
44473
|
+
i(L);
|
|
44460
44474
|
}
|
|
44461
44475
|
}, []);
|
|
44462
44476
|
const R = useCallback(
|
|
@@ -44464,23 +44478,23 @@ const InternalFileManager = (e) => {
|
|
|
44464
44478
|
try {
|
|
44465
44479
|
return j == null ? void 0 : j.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
|
|
44466
44480
|
var N, k, M;
|
|
44467
|
-
let
|
|
44481
|
+
let L = p(w[y.label]);
|
|
44468
44482
|
if ((N = v == null ? void 0 : v.uiSchema) != null && N.enum)
|
|
44469
|
-
if (Array.isArray(
|
|
44470
|
-
|
|
44483
|
+
if (Array.isArray(L))
|
|
44484
|
+
L = L.map((q, E) => {
|
|
44471
44485
|
var H, U;
|
|
44472
44486
|
const V = (U = (H = v.uiSchema.enum).find) == null ? void 0 : U.call(H, (G) => G.value === q);
|
|
44473
44487
|
return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || q }, E) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
|
|
44474
44488
|
}).reverse();
|
|
44475
44489
|
else {
|
|
44476
|
-
const q = (M = (k = v.uiSchema.enum).find) == null ? void 0 : M.call(k, (E) => E.value ===
|
|
44477
|
-
q && (
|
|
44490
|
+
const q = (M = (k = v.uiSchema.enum).find) == null ? void 0 : M.call(k, (E) => E.value === L);
|
|
44491
|
+
q && (L = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
|
|
44478
44492
|
}
|
|
44479
|
-
return (v == null ? void 0 : v.type) === "date" && (
|
|
44480
|
-
[y.label]:
|
|
44493
|
+
return (v == null ? void 0 : v.type) === "date" && (L = dayjs(L).format("YYYY-MM-DD")), n ? n({
|
|
44494
|
+
[y.label]: L || EMPTY,
|
|
44481
44495
|
[y.value]: w[y.value]
|
|
44482
44496
|
}) : P(x({}, w), {
|
|
44483
|
-
[y.label]:
|
|
44497
|
+
[y.label]: L || EMPTY,
|
|
44484
44498
|
[y.value]: w[y.value]
|
|
44485
44499
|
});
|
|
44486
44500
|
}).filter(Boolean);
|
|
@@ -44490,46 +44504,46 @@ const InternalFileManager = (e) => {
|
|
|
44490
44504
|
},
|
|
44491
44505
|
[v == null ? void 0 : v.uiSchema, y]
|
|
44492
44506
|
), T = (j) => z(void 0, null, function* () {
|
|
44493
|
-
var
|
|
44507
|
+
var L, N;
|
|
44494
44508
|
const w = yield C.list({
|
|
44495
44509
|
pageSize: 200,
|
|
44496
44510
|
params: h == null ? void 0 : h.params,
|
|
44497
|
-
filter: mergeFilter([j, (
|
|
44511
|
+
filter: mergeFilter([j, (L = h == null ? void 0 : h.params) == null ? void 0 : L.filter]),
|
|
44498
44512
|
tree: j.parentId ? void 0 : !0
|
|
44499
44513
|
});
|
|
44500
44514
|
return (N = w == null ? void 0 : w.data) == null ? void 0 : N.data;
|
|
44501
|
-
}), D = (j, w,
|
|
44515
|
+
}), D = (j, w, L) => z(void 0, null, function* () {
|
|
44502
44516
|
const N = yield T({ parentId: w == null ? void 0 : w.id }), k = [...a];
|
|
44503
|
-
if (k.splice(
|
|
44517
|
+
if (k.splice(L + 1), k[L] = P(x({}, k[L]), { value: w }), w != null && w.id && (k[L + 1] = { key: w == null ? void 0 : w.id, children: (N == null ? void 0 : N.length) > 0 ? N : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
44504
44518
|
const M = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
44505
44519
|
M[F.index] = w, f.fieldValue = M;
|
|
44506
44520
|
} else
|
|
44507
44521
|
f.value = w;
|
|
44508
44522
|
k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
|
|
44509
|
-
}), B = (j, w,
|
|
44523
|
+
}), B = (j, w, L) => z(void 0, null, function* () {
|
|
44510
44524
|
var N, k, M;
|
|
44511
44525
|
if (j) {
|
|
44512
44526
|
d(!0);
|
|
44513
44527
|
const q = yield T({ parentId: w == null ? void 0 : w.key });
|
|
44514
|
-
if (d(!1), c(q),
|
|
44528
|
+
if (d(!1), c(q), L === (a == null ? void 0 : a.length) - 1 && ((N = w == null ? void 0 : w.value) != null && N.id)) {
|
|
44515
44529
|
const E = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
|
|
44516
|
-
V.splice(
|
|
44530
|
+
V.splice(L + 1), V[L] = P(x({}, V[L]), { value: w == null ? void 0 : w.value }), V[L + 1] = { key: (M = w == null ? void 0 : w.value) == null ? void 0 : M.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), o == null || o(V);
|
|
44517
44531
|
}
|
|
44518
44532
|
}
|
|
44519
44533
|
}), $ = (j, w) => z(void 0, null, function* () {
|
|
44520
|
-
const
|
|
44534
|
+
const L = j ? {
|
|
44521
44535
|
[y.label]: {
|
|
44522
44536
|
[I]: j
|
|
44523
44537
|
}
|
|
44524
44538
|
} : {};
|
|
44525
44539
|
d(!0);
|
|
44526
|
-
const N = yield T(P(x({},
|
|
44540
|
+
const N = yield T(P(x({}, L), {
|
|
44527
44541
|
parentId: w == null ? void 0 : w.key
|
|
44528
44542
|
}));
|
|
44529
44543
|
d(!1), c(N);
|
|
44530
44544
|
});
|
|
44531
44545
|
return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: a.map((j, w) => {
|
|
44532
|
-
var
|
|
44546
|
+
var L, N, k;
|
|
44533
44547
|
return j.children && /* @__PURE__ */ jsx(
|
|
44534
44548
|
Select$1,
|
|
44535
44549
|
{
|
|
@@ -44540,7 +44554,7 @@ const InternalFileManager = (e) => {
|
|
|
44540
44554
|
filterOption: !1,
|
|
44541
44555
|
filterSort: null,
|
|
44542
44556
|
defaultValue: {
|
|
44543
|
-
label: (
|
|
44557
|
+
label: (L = j == null ? void 0 : j.value) == null ? void 0 : L[y.label],
|
|
44544
44558
|
value: (N = j == null ? void 0 : j.value) == null ? void 0 : N[y.value]
|
|
44545
44559
|
},
|
|
44546
44560
|
labelInValue: !0,
|
|
@@ -44790,7 +44804,7 @@ const InternalNesterCardCss = css`
|
|
|
44790
44804
|
}, InternalPicker = observer$1(
|
|
44791
44805
|
(e) => {
|
|
44792
44806
|
var N;
|
|
44793
|
-
const
|
|
44807
|
+
const L = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = L, c = W(L, ["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, I] = useState([]), F = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
|
|
44794
44808
|
const q = M == null ? void 0 : M[d.label];
|
|
44795
44809
|
return P(x({}, M), {
|
|
44796
44810
|
[d.label]: getLabelFormatValue$1(b(S), b(q))
|
|
@@ -44818,7 +44832,7 @@ const InternalNesterCardCss = css`
|
|
|
44818
44832
|
useEffect(() => {
|
|
44819
44833
|
t || I([]);
|
|
44820
44834
|
}, [t]);
|
|
44821
|
-
const
|
|
44835
|
+
const O = () => {
|
|
44822
44836
|
const { setVisible: k } = useActionContext(), { multiple: M, selectedRows: q, onChange: E, options: V, collectionField: H } = useContext(RecordPickerContext);
|
|
44823
44837
|
return {
|
|
44824
44838
|
onClick() {
|
|
@@ -44830,7 +44844,7 @@ const InternalNesterCardCss = css`
|
|
|
44830
44844
|
};
|
|
44831
44845
|
}, j = useMemo(
|
|
44832
44846
|
() => ({
|
|
44833
|
-
usePickActionProps:
|
|
44847
|
+
usePickActionProps: O,
|
|
44834
44848
|
useTableSelectorProps: useTableSelectorProps$2
|
|
44835
44849
|
}),
|
|
44836
44850
|
[]
|
|
@@ -44936,10 +44950,10 @@ const RenderRecord = React.memo(
|
|
|
44936
44950
|
const R = useCallback(() => F.current, []);
|
|
44937
44951
|
return useEffect(() => {
|
|
44938
44952
|
const T = toArr$3(h).map((D, B, $) => {
|
|
44939
|
-
const
|
|
44953
|
+
const O = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], j = 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(j), "N/A"), L = o(
|
|
44940
44954
|
(D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
|
|
44941
44955
|
(e == null ? void 0 : e.label) || "label"
|
|
44942
|
-
), N = getLabelFormatValue$1(n(
|
|
44956
|
+
), N = getLabelFormatValue$1(n(L), w, !0);
|
|
44943
44957
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
44944
44958
|
/* @__PURE__ */ jsx("span", { children: a ? N : i !== !1 ? /* @__PURE__ */ jsx(
|
|
44945
44959
|
"a",
|
|
@@ -45020,8 +45034,8 @@ const getSourceData = (e, t) => {
|
|
|
45020
45034
|
return n ? _.get(e, n) : e;
|
|
45021
45035
|
}, ReadPrettyInternalViewer = (e) => {
|
|
45022
45036
|
var B, $;
|
|
45023
|
-
const { value: t, ButtonList: n = ButtonLinkList } = e, o = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = o["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), I = useCollection(), F = useCallback((
|
|
45024
|
-
y(
|
|
45037
|
+
const { value: t, ButtonList: n = ButtonLinkList } = e, o = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = o["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), I = useCollection(), F = useCallback((O) => {
|
|
45038
|
+
y(O.recordData);
|
|
45025
45039
|
}, []), R = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: (B = e.ellipsis) != null ? B : !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(b, o), children: /* @__PURE__ */ jsx(
|
|
45026
45040
|
n,
|
|
45027
45041
|
{
|
|
@@ -45034,8 +45048,8 @@ const getSourceData = (e, t) => {
|
|
|
45034
45048
|
) }) }), T = useMemo(
|
|
45035
45049
|
() => ({
|
|
45036
45050
|
visible: c || m,
|
|
45037
|
-
setVisible: (
|
|
45038
|
-
u == null || u(
|
|
45051
|
+
setVisible: (O) => {
|
|
45052
|
+
u == null || u(O), h == null || h(O);
|
|
45039
45053
|
},
|
|
45040
45054
|
openMode: a || C,
|
|
45041
45055
|
snapshot: (d == null ? void 0 : d.interface) === "snapshot",
|
|
@@ -45054,7 +45068,7 @@ const getSourceData = (e, t) => {
|
|
|
45054
45068
|
schema: o,
|
|
45055
45069
|
onlyRenderProperties: !0,
|
|
45056
45070
|
basePath: l.address,
|
|
45057
|
-
filterProperties: (
|
|
45071
|
+
filterProperties: (O) => O["x-component"] === "AssociationField.Viewer"
|
|
45058
45072
|
}
|
|
45059
45073
|
) }) })
|
|
45060
45074
|
) : /* @__PURE__ */ jsx(
|
|
@@ -45073,7 +45087,7 @@ const getSourceData = (e, t) => {
|
|
|
45073
45087
|
schema: o,
|
|
45074
45088
|
onlyRenderProperties: !0,
|
|
45075
45089
|
basePath: l.address,
|
|
45076
|
-
filterProperties: (
|
|
45090
|
+
filterProperties: (O) => O["x-component"] === "AssociationField.Viewer"
|
|
45077
45091
|
}
|
|
45078
45092
|
) }) }) })
|
|
45079
45093
|
}
|
|
@@ -45520,8 +45534,8 @@ function FinallyButton(h) {
|
|
|
45520
45534
|
} = g;
|
|
45521
45535
|
var v, I, F, R, T, D;
|
|
45522
45536
|
const { getCollection: b } = useCollectionManager_deprecated(), S = useACLActionParamsContext(), y = useMemo(() => {
|
|
45523
|
-
var
|
|
45524
|
-
const B = m && (((
|
|
45537
|
+
var O;
|
|
45538
|
+
const B = m && (((O = d == null ? void 0 : d.data) == null ? void 0 : O.hidden) || !S);
|
|
45525
45539
|
return {
|
|
45526
45540
|
opacity: a !== "link" && B ? 0.1 : 1
|
|
45527
45541
|
};
|
|
@@ -45535,7 +45549,7 @@ function FinallyButton(h) {
|
|
|
45535
45549
|
danger: r.danger,
|
|
45536
45550
|
icon: u,
|
|
45537
45551
|
onClick: (B) => {
|
|
45538
|
-
const $ = getLinkageCollection(t, p, d),
|
|
45552
|
+
const $ = getLinkageCollection(t, p, d), O = e.find((w) => w.name === $) ? $ : c.name, j = b(O);
|
|
45539
45553
|
l == null || l(j);
|
|
45540
45554
|
},
|
|
45541
45555
|
style: x({
|
|
@@ -45698,22 +45712,22 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45698
45712
|
}
|
|
45699
45713
|
});
|
|
45700
45714
|
Array.isArray(o.value) || (o.value = []);
|
|
45701
|
-
const D = useCallback(({ form: w, fieldSchema:
|
|
45715
|
+
const D = useCallback(({ form: w, fieldSchema: L, collectionField: N, getInterface: k }) => {
|
|
45702
45716
|
var M;
|
|
45703
|
-
return !N || N.target && ((M =
|
|
45717
|
+
return !N || N.target && ((M = L["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(L["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(L) && !interfacesOfUnsupportedDefaultValue.includes(N == null ? void 0 : N.interface) && !isSystemField(N, k);
|
|
45704
45718
|
}, []), B = () => {
|
|
45705
|
-
const { setVisible: w } = useActionContext(), { selectedRows:
|
|
45719
|
+
const { setVisible: w } = useActionContext(), { selectedRows: L, setSelectedRows: N } = useContext(RecordPickerContext);
|
|
45706
45720
|
return {
|
|
45707
45721
|
onClick() {
|
|
45708
|
-
|
|
45722
|
+
L.map((k) => o.value.push(markRecordAsNew(k))), o.onInput(o.value), o.initialValue = o.value, N([]), w(!1);
|
|
45709
45723
|
}
|
|
45710
45724
|
};
|
|
45711
|
-
}, $ = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((
|
|
45712
|
-
const N =
|
|
45713
|
-
return P(x({},
|
|
45725
|
+
}, $ = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((L) => {
|
|
45726
|
+
const N = L == null ? void 0 : L[I.label];
|
|
45727
|
+
return P(x({}, L), {
|
|
45714
45728
|
[I.label]: getLabelFormatValue$1(F(R), F(N))
|
|
45715
45729
|
});
|
|
45716
|
-
}) : [], [o.value, I == null ? void 0 : I.label]),
|
|
45730
|
+
}) : [], [o.value, I == null ? void 0 : I.label]), O = {
|
|
45717
45731
|
size: "small",
|
|
45718
45732
|
fieldNames: o.componentProps.fieldNames,
|
|
45719
45733
|
multiple: !0,
|
|
@@ -45726,8 +45740,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45726
45740
|
setSelectedRows: v,
|
|
45727
45741
|
collectionField: n
|
|
45728
45742
|
}, j = () => {
|
|
45729
|
-
const w = (n == null ? void 0 : n.targetKey) || "id",
|
|
45730
|
-
return
|
|
45743
|
+
const w = (n == null ? void 0 : n.targetKey) || "id", L = (o.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
|
|
45744
|
+
return L.length ? { $and: [{ [`${w}.$ne`]: L }] } : {};
|
|
45731
45745
|
};
|
|
45732
45746
|
return o.value.length > 0 ? /* @__PURE__ */ jsxs(
|
|
45733
45747
|
Card,
|
|
@@ -45741,31 +45755,31 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45741
45755
|
`,
|
|
45742
45756
|
children: [
|
|
45743
45757
|
/* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: C, children: [
|
|
45744
|
-
o.value.map((w,
|
|
45758
|
+
o.value.map((w, L) => {
|
|
45745
45759
|
let N = a;
|
|
45746
45760
|
return a || (N = !(w != null && w[n.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
45747
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !o.readPretty && N && (!t["x-template-uid"] ||
|
|
45761
|
+
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !o.readPretty && N && (!t["x-template-uid"] || L > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
|
|
45748
45762
|
CloseOutlined,
|
|
45749
45763
|
{
|
|
45750
45764
|
style: { zIndex: 1e3, color: "#a8a3a3" },
|
|
45751
45765
|
onClick: () => {
|
|
45752
45766
|
action(() => (spliceArrayState(o, {
|
|
45753
|
-
startIndex:
|
|
45767
|
+
startIndex: L,
|
|
45754
45768
|
deleteCount: 1
|
|
45755
|
-
}), o.value.splice(
|
|
45769
|
+
}), o.value.splice(L, 1), Array.isArray(o.initialValue) && o.initialValue.splice(L, 1), o.onInput(o.value)));
|
|
45756
45770
|
}
|
|
45757
45771
|
}
|
|
45758
45772
|
) }, "remove") }),
|
|
45759
|
-
/* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index:
|
|
45773
|
+
/* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: L, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: D, children: /* @__PURE__ */ jsx(
|
|
45760
45774
|
NocoBaseRecursionField,
|
|
45761
45775
|
{
|
|
45762
45776
|
onlyRenderProperties: !0,
|
|
45763
|
-
basePath: o.address.concat(
|
|
45777
|
+
basePath: o.address.concat(L),
|
|
45764
45778
|
schema: h
|
|
45765
45779
|
}
|
|
45766
45780
|
) }) }) }) }) }),
|
|
45767
45781
|
/* @__PURE__ */ jsx(Divider$1, {})
|
|
45768
|
-
] },
|
|
45782
|
+
] }, L);
|
|
45769
45783
|
}),
|
|
45770
45784
|
/* @__PURE__ */ jsxs(Space$1, { children: [
|
|
45771
45785
|
o.editable && r && /* @__PURE__ */ jsx(
|
|
@@ -45776,8 +45790,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45776
45790
|
action(() => {
|
|
45777
45791
|
Array.isArray(o.value) || (o.value = []);
|
|
45778
45792
|
const w = o.value.length;
|
|
45779
|
-
return o.value.splice(w, 0, markRecordAsNew({})), each(o.form.fields, (
|
|
45780
|
-
|
|
45793
|
+
return o.value.splice(w, 0, markRecordAsNew({})), each(o.form.fields, (L, N) => {
|
|
45794
|
+
L || delete o.form.fields[N];
|
|
45781
45795
|
}), o.onInput(o.value);
|
|
45782
45796
|
});
|
|
45783
45797
|
}
|
|
@@ -45811,7 +45825,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45811
45825
|
visible: b,
|
|
45812
45826
|
setVisible: S
|
|
45813
45827
|
},
|
|
45814
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({},
|
|
45828
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, O), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: n == null ? void 0 : n.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: j() }, children: /* @__PURE__ */ jsx(
|
|
45815
45829
|
SchemaComponentOptions,
|
|
45816
45830
|
{
|
|
45817
45831
|
scope: {
|
|
@@ -45858,7 +45872,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45858
45872
|
S.current = t;
|
|
45859
45873
|
const y = useCallback(() => S.current, []);
|
|
45860
45874
|
return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((I, F, R) => {
|
|
45861
|
-
const T = I == null ? void 0 : I[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(I).map((
|
|
45875
|
+
const T = I == null ? void 0 : I[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(I).map((O) => O == null ? void 0 : O[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, B = toValue$3(l(D), "N/A"), $ = getTabFormatValue(l(u), B, I[o]);
|
|
45862
45876
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45863
45877
|
/* @__PURE__ */ jsx("span", { children: d ? $ : n !== !1 ? /* @__PURE__ */ jsx(
|
|
45864
45878
|
"a",
|
|
@@ -45866,9 +45880,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45866
45880
|
onMouseEnter: () => {
|
|
45867
45881
|
e.setBtnHover(!0);
|
|
45868
45882
|
},
|
|
45869
|
-
onClick: (
|
|
45883
|
+
onClick: (O) => {
|
|
45870
45884
|
var j;
|
|
45871
|
-
e.setBtnHover(!0),
|
|
45885
|
+
e.setBtnHover(!0), O.stopPropagation(), O.preventDefault(), c && !t.properties && (a(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
|
|
45872
45886
|
f({
|
|
45873
45887
|
recordData: I,
|
|
45874
45888
|
parentRecordData: C,
|
|
@@ -45959,8 +45973,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
45959
45973
|
width: I && !i ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
|
|
45960
45974
|
render: (B, $) => {
|
|
45961
45975
|
var w;
|
|
45962
|
-
const
|
|
45963
|
-
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index ||
|
|
45976
|
+
const O = (w = o.value) == null ? void 0 : w.indexOf($), j = o.address.concat($.__index || O);
|
|
45977
|
+
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index || O, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord($), record: $, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: j, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: j, schema: S, onlyRenderProperties: !0 }) }, O) }) }) }) });
|
|
45964
45978
|
},
|
|
45965
45979
|
onCell: (B, $) => ({
|
|
45966
45980
|
record: B,
|
|
@@ -46299,7 +46313,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46299
46313
|
"onClickRow",
|
|
46300
46314
|
"enableIndexColumn"
|
|
46301
46315
|
]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((de = v == null ? void 0 : v.parent) == null ? void 0 : de["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, $ = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
46302
|
-
})),
|
|
46316
|
+
})), O = usePaginationProps$2(n, a), j = useTableColumns$1(S, O), [w, L] = useState(() => D ? B : []), [N, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [M, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
|
|
46303
46317
|
& > td {
|
|
46304
46318
|
background-color: ${t.controlItemBgActive} !important;
|
|
46305
46319
|
}
|
|
@@ -46314,7 +46328,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46314
46328
|
}) : null, [C, M]);
|
|
46315
46329
|
useDeepCompareEffect(() => {
|
|
46316
46330
|
const Z = D ? B : [];
|
|
46317
|
-
_.isEqual(Z, w) ||
|
|
46331
|
+
_.isEqual(Z, w) || L(Z);
|
|
46318
46332
|
}, [D, B]);
|
|
46319
46333
|
const Y = useCallback((Z) => {
|
|
46320
46334
|
if (m)
|
|
@@ -46373,7 +46387,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46373
46387
|
renderCell: (Z, oe, re, ie) => {
|
|
46374
46388
|
if (!l && !c)
|
|
46375
46389
|
return ie;
|
|
46376
|
-
const ce =
|
|
46390
|
+
const ce = O == null ? void 0 : O.current, fe = (O == null ? void 0 : O.pageSize) || 20;
|
|
46377
46391
|
return ce ? re = re + (ce - 1) * fe + 1 : re = re + 1, oe.__index && (re = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
|
|
46378
46392
|
"div",
|
|
46379
46393
|
{
|
|
@@ -46414,7 +46428,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46414
46428
|
J,
|
|
46415
46429
|
E,
|
|
46416
46430
|
Q,
|
|
46417
|
-
|
|
46431
|
+
O,
|
|
46418
46432
|
b
|
|
46419
46433
|
]
|
|
46420
46434
|
), ne = useCallback(
|
|
@@ -46440,7 +46454,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46440
46454
|
), he = useCallback(
|
|
46441
46455
|
(Z, oe) => {
|
|
46442
46456
|
const re = Z ? [...w, oe[F.getPrimaryKey()]] : w.filter((ie) => oe[F.getPrimaryKey()] !== ie);
|
|
46443
|
-
|
|
46457
|
+
L(re), g == null || g(Z, oe);
|
|
46444
46458
|
},
|
|
46445
46459
|
[w, g, F]
|
|
46446
46460
|
), ge = useMemo(() => ({
|
|
@@ -46458,7 +46472,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46458
46472
|
defaultRowKey: Y,
|
|
46459
46473
|
dataSource: K
|
|
46460
46474
|
}, S), te), {
|
|
46461
|
-
paginationProps:
|
|
46475
|
+
paginationProps: O,
|
|
46462
46476
|
components: ee,
|
|
46463
46477
|
onTableChange: d,
|
|
46464
46478
|
onRow: G,
|
|
@@ -46569,10 +46583,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46569
46583
|
}, T = () => {
|
|
46570
46584
|
const E = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((U) => U == null ? void 0 : U[E]).filter(Boolean);
|
|
46571
46585
|
return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
|
|
46572
|
-
}, [D, B] = useState(1), [$,
|
|
46586
|
+
}, [D, B] = useState(1), [$, O] = useState(((k = n.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
|
|
46573
46587
|
useEffect(() => {
|
|
46574
46588
|
var E;
|
|
46575
|
-
|
|
46589
|
+
O((E = n.componentProps) == null ? void 0 : E.pageSize);
|
|
46576
46590
|
}, [(M = n.componentProps) == null ? void 0 : M.pageSize]);
|
|
46577
46591
|
const w = useMemo(() => {
|
|
46578
46592
|
var V;
|
|
@@ -46582,13 +46596,13 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46582
46596
|
pageSize: $ || 10,
|
|
46583
46597
|
total: n == null ? void 0 : n.value,
|
|
46584
46598
|
onChange: (H, U) => {
|
|
46585
|
-
B(H),
|
|
46599
|
+
B(H), O(U), n.componentProps.pageSize = U, n.onInput(n.value), j == null || j(!1);
|
|
46586
46600
|
},
|
|
46587
46601
|
showSizeChanger: !0,
|
|
46588
46602
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
46589
46603
|
hideOnSinglePage: !1
|
|
46590
46604
|
};
|
|
46591
|
-
}, [(q = n.value) == null ? void 0 : q.length, $, D]),
|
|
46605
|
+
}, [(q = n.value) == null ? void 0 : q.length, $, D]), L = () => {
|
|
46592
46606
|
const { field: E } = useAssociationFieldContext();
|
|
46593
46607
|
return {
|
|
46594
46608
|
run() {
|
|
@@ -46633,7 +46647,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46633
46647
|
b !== !1 && /* @__PURE__ */ jsx(
|
|
46634
46648
|
Action.Link,
|
|
46635
46649
|
{
|
|
46636
|
-
useAction:
|
|
46650
|
+
useAction: L,
|
|
46637
46651
|
title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, className: "nb-sub-table-addNew", children: [
|
|
46638
46652
|
/* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
46639
46653
|
" ",
|
|
@@ -46779,8 +46793,8 @@ const ReadPretty$7 = observer$1(
|
|
|
46779
46793
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
46780
46794
|
const AssociationSelect = InternalAssociationSelect;
|
|
46781
46795
|
AssociationSelect.Designer = function e() {
|
|
46782
|
-
var
|
|
46783
|
-
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = 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 = i(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = n(S == null ? void 0 : S.interface), F = (
|
|
46796
|
+
var L, N, k, M, q, E, V, H, U, G, Y;
|
|
46797
|
+
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = 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 = i(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = n(S == null ? void 0 : S.interface), F = (L = I == null ? void 0 : I.validateSchema) == null ? void 0 : L.call(I, u), R = (N = S == null ? void 0 : S.uiSchema) == null ? void 0 : N.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
46784
46798
|
c.title === R || c.title;
|
|
46785
46799
|
const D = useSortFields(S == null ? void 0 : S.target), B = ((q = (M = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : M.params) == null ? void 0 : q.sort) || [];
|
|
46786
46800
|
useEffect(() => {
|
|
@@ -46794,7 +46808,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46794
46808
|
direction: "asc"
|
|
46795
46809
|
});
|
|
46796
46810
|
c.readPretty || c.required;
|
|
46797
|
-
const
|
|
46811
|
+
const O = T.filter((J) => a(J)).map((J) => {
|
|
46798
46812
|
var K;
|
|
46799
46813
|
return {
|
|
46800
46814
|
value: J == null ? void 0 : J.name,
|
|
@@ -47145,7 +47159,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47145
47159
|
SchemaSettingsSelectItem,
|
|
47146
47160
|
{
|
|
47147
47161
|
title: d("Title field"),
|
|
47148
|
-
options:
|
|
47162
|
+
options: O,
|
|
47149
47163
|
value: (Y = (G = c == null ? void 0 : c.componentProps) == null ? void 0 : G.fieldNames) == null ? void 0 : Y.label,
|
|
47150
47164
|
onChange: (J) => {
|
|
47151
47165
|
var ee, Q;
|
|
@@ -47178,7 +47192,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47178
47192
|
] });
|
|
47179
47193
|
};
|
|
47180
47194
|
AssociationSelect.FilterDesigner = function e() {
|
|
47181
|
-
var I, F, R, T, D, B, $,
|
|
47195
|
+
var I, F, R, T, D, B, $, O, j, w, L;
|
|
47182
47196
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: a } = useFormBlockContext(), i = 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 = (I = h == null ? void 0 : h.validateSchema) == null ? void 0 : I.call(h, l), f = (F = m == null ? void 0 : m.uiSchema) == null ? void 0 : F.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
|
|
47183
47197
|
i.title === f || i.title;
|
|
47184
47198
|
const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (R = i.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map((N) => N.startsWith("-") ? {
|
|
@@ -47333,7 +47347,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47333
47347
|
SchemaSettingsDataScope,
|
|
47334
47348
|
{
|
|
47335
47349
|
collectionName: m == null ? void 0 : m.target,
|
|
47336
|
-
defaultFilter: ((j = (
|
|
47350
|
+
defaultFilter: ((j = (O = ($ = i.componentProps) == null ? void 0 : $.service) == null ? void 0 : O.params) == null ? void 0 : j.filter) || {},
|
|
47337
47351
|
form: a,
|
|
47338
47352
|
onSubmit: ({ filter: N }) => {
|
|
47339
47353
|
N = removeNullCondition(N), _.set(i.componentProps, "service.params.filter", N), l["x-component-props"] = i.componentProps, u.emit("patch", {
|
|
@@ -47435,7 +47449,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47435
47449
|
{
|
|
47436
47450
|
title: c("Title field"),
|
|
47437
47451
|
options: v,
|
|
47438
|
-
value: (
|
|
47452
|
+
value: (L = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : L.label,
|
|
47439
47453
|
onChange: (N) => {
|
|
47440
47454
|
var q, E;
|
|
47441
47455
|
const k = {
|
|
@@ -47788,13 +47802,16 @@ const DataSourceSelect = connect((e) => {
|
|
|
47788
47802
|
"#1677FF",
|
|
47789
47803
|
"#F5222D",
|
|
47790
47804
|
"#FADB14",
|
|
47805
|
+
"#E6F4FF",
|
|
47806
|
+
"#fff1f0",
|
|
47807
|
+
"#F6FFED",
|
|
47808
|
+
"#E6FFFB",
|
|
47791
47809
|
"#FA8C164D",
|
|
47792
47810
|
"#FADB144D",
|
|
47793
47811
|
"#52C41A4D",
|
|
47794
47812
|
"#1677FF4D",
|
|
47795
47813
|
"#2F54EB4D",
|
|
47796
|
-
"#722ED14D"
|
|
47797
|
-
"#EB2F964D"
|
|
47814
|
+
"#722ED14D"
|
|
47798
47815
|
]
|
|
47799
47816
|
}
|
|
47800
47817
|
],
|
|
@@ -48884,8 +48901,8 @@ const InternalListBlockProvider = (e) => {
|
|
|
48884
48901
|
}
|
|
48885
48902
|
},
|
|
48886
48903
|
onSubmit: ({ sort: $ }) => {
|
|
48887
|
-
const
|
|
48888
|
-
_.set(i, "x-decorator-props.params.sort",
|
|
48904
|
+
const O = $.map((j) => j.direction === "desc" ? `-${j.field}` : j.field);
|
|
48905
|
+
_.set(i, "x-decorator-props.params.sort", O), c.decoratorProps.params = P(x({}, i["x-decorator-props"].params), { page: 1 }), u.emit("patch", {
|
|
48889
48906
|
schema: {
|
|
48890
48907
|
"x-uid": i["x-uid"],
|
|
48891
48908
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -49018,7 +49035,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49018
49035
|
return e - u - n.paddingLG - l;
|
|
49019
49036
|
}, InternalList = withSkeletonComponent(
|
|
49020
49037
|
(e) => {
|
|
49021
|
-
var j, w,
|
|
49038
|
+
var j, w, L, N;
|
|
49022
49039
|
const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), a = useDesigner(), i = (j = t == null ? void 0 : t.data) == null ? void 0 : j.meta, { pageSize: l, count: c, hasNext: u, page: d } = i || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$3(), C = useListBlockHeight(), { token: b } = theme.useToken(), S = useCallback(
|
|
49023
49040
|
(k) => (m.has(k) || m.set(
|
|
49024
49041
|
k,
|
|
@@ -49082,7 +49099,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49082
49099
|
}
|
|
49083
49100
|
) : E
|
|
49084
49101
|
};
|
|
49085
|
-
})(), { isMobileLayout:
|
|
49102
|
+
})(), { isMobileLayout: O } = useMobileLayout();
|
|
49086
49103
|
return h(
|
|
49087
49104
|
/* @__PURE__ */ jsx(
|
|
49088
49105
|
SchemaComponentOptions,
|
|
@@ -49120,7 +49137,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49120
49137
|
children: /* @__PURE__ */ jsx(
|
|
49121
49138
|
List$1,
|
|
49122
49139
|
P(x({}, e), {
|
|
49123
|
-
pagination: !i || !((w = p.value) != null && w.length) || c <= ((
|
|
49140
|
+
pagination: !i || !((w = p.value) != null && w.length) || c <= ((L = p.value) == null ? void 0 : L.length) ? !1 : $,
|
|
49124
49141
|
loading: t == null ? void 0 : t.loading,
|
|
49125
49142
|
children: (N = p.value) != null && N.length ? p.value.map((k, M) => /* @__PURE__ */ jsx(
|
|
49126
49143
|
NocoBaseRecursionField,
|
|
@@ -49128,7 +49145,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49128
49145
|
basePath: p.address,
|
|
49129
49146
|
name: M,
|
|
49130
49147
|
onlyRenderProperties: !0,
|
|
49131
|
-
schema:
|
|
49148
|
+
schema: O ? transformMultiColumnToSingleColumn(S(M)) : S(M)
|
|
49132
49149
|
},
|
|
49133
49150
|
M
|
|
49134
49151
|
)) : null
|
|
@@ -49567,8 +49584,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
49567
49584
|
"a",
|
|
49568
49585
|
{
|
|
49569
49586
|
onClick: ($) => {
|
|
49570
|
-
var
|
|
49571
|
-
$.stopPropagation(), $.preventDefault(), l(!0), p(F), (
|
|
49587
|
+
var O;
|
|
49588
|
+
$.stopPropagation(), $.preventDefault(), l(!0), p(F), (O = C == null ? void 0 : C.current) == null || O.setPopoverVisible(!1);
|
|
49572
49589
|
},
|
|
49573
49590
|
children: B
|
|
49574
49591
|
}
|
|
@@ -50986,7 +51003,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50986
51003
|
"sort-field"
|
|
50987
51004
|
);
|
|
50988
51005
|
}, TableBlockDesigner = () => {
|
|
50989
|
-
var I, F, R, T, D, B, $,
|
|
51006
|
+
var I, F, R, T, D, B, $, O, j, w, L, N;
|
|
50990
51007
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable();
|
|
50991
51008
|
useBlockTemplateContext();
|
|
50992
51009
|
const p = ((F = (I = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : I.params) == null ? void 0 : F.sort) || [];
|
|
@@ -51072,7 +51089,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51072
51089
|
SchemaSettingsDataScope,
|
|
51073
51090
|
{
|
|
51074
51091
|
collectionName: e,
|
|
51075
|
-
defaultFilter: ((j = (
|
|
51092
|
+
defaultFilter: ((j = (O = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : O.params) == null ? void 0 : j.filter) || {},
|
|
51076
51093
|
form: i,
|
|
51077
51094
|
onSubmit: y
|
|
51078
51095
|
}
|
|
@@ -51169,7 +51186,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51169
51186
|
SchemaSettingsSelectItem,
|
|
51170
51187
|
{
|
|
51171
51188
|
title: u("Records per page"),
|
|
51172
|
-
value: ((
|
|
51189
|
+
value: ((L = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : L.pageSize) || 20,
|
|
51173
51190
|
options: [
|
|
51174
51191
|
{ label: "5", value: 5 },
|
|
51175
51192
|
{ label: "10", value: 10 },
|
|
@@ -51243,7 +51260,7 @@ TableField.ActionBar = observer$1(
|
|
|
51243
51260
|
{ displayName: "TableField.ActionBar" }
|
|
51244
51261
|
);
|
|
51245
51262
|
const TableSelectorDesigner = () => {
|
|
51246
|
-
var R, T, D, B, $,
|
|
51263
|
+
var R, T, D, B, $, O;
|
|
51247
51264
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: n, getAllCollectionsInheritChain: o } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((T = (R = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : T.sort) || [], h = recursiveParent(a, "CollectionField"), g = n(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((j) => j.startsWith("-") ? {
|
|
51248
51265
|
field: j.substring(1),
|
|
51249
51266
|
direction: "desc"
|
|
@@ -51262,10 +51279,10 @@ const TableSelectorDesigner = () => {
|
|
|
51262
51279
|
j = removeNullCondition(j);
|
|
51263
51280
|
const w = r.decoratorProps.params || {};
|
|
51264
51281
|
w.filter = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w;
|
|
51265
|
-
let
|
|
51266
|
-
u && (
|
|
51267
|
-
$and: [u,
|
|
51268
|
-
} :
|
|
51282
|
+
let L = _.cloneDeep(j);
|
|
51283
|
+
u && (L ? L = {
|
|
51284
|
+
$and: [u, L]
|
|
51285
|
+
} : L = u), c.run(P(x({}, (N = c.params) == null ? void 0 : N[0]), { filter: L, page: 1 })), p.emit("patch", {
|
|
51269
51286
|
schema: {
|
|
51270
51287
|
"x-uid": a["x-uid"],
|
|
51271
51288
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51298,9 +51315,9 @@ const TableSelectorDesigner = () => {
|
|
|
51298
51315
|
defaultChecked: !0,
|
|
51299
51316
|
checked: r.decoratorProps.treeTable,
|
|
51300
51317
|
onChange: (j) => {
|
|
51301
|
-
var
|
|
51318
|
+
var L;
|
|
51302
51319
|
r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = j, a["x-decorator-props"].treeTable = j;
|
|
51303
|
-
const w = P(x({}, (
|
|
51320
|
+
const w = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
|
|
51304
51321
|
tree: j ? !0 : null
|
|
51305
51322
|
});
|
|
51306
51323
|
p.emit("patch", {
|
|
@@ -51387,8 +51404,8 @@ const TableSelectorDesigner = () => {
|
|
|
51387
51404
|
},
|
|
51388
51405
|
onSubmit: ({ sort: j }) => {
|
|
51389
51406
|
var N;
|
|
51390
|
-
const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field),
|
|
51391
|
-
|
|
51407
|
+
const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), L = r.decoratorProps.params || {};
|
|
51408
|
+
L.sort = w, r.decoratorProps.params = L, a["x-decorator-props"].params = L, p.emit("patch", {
|
|
51392
51409
|
schema: {
|
|
51393
51410
|
"x-uid": a["x-uid"],
|
|
51394
51411
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51401,7 +51418,7 @@ const TableSelectorDesigner = () => {
|
|
|
51401
51418
|
SchemaSettingsSelectItem,
|
|
51402
51419
|
{
|
|
51403
51420
|
title: d("Records per page"),
|
|
51404
|
-
value: ((
|
|
51421
|
+
value: ((O = ($ = r.decoratorProps) == null ? void 0 : $.params) == null ? void 0 : O.pageSize) || 20,
|
|
51405
51422
|
options: [
|
|
51406
51423
|
{ label: "5", value: 5 },
|
|
51407
51424
|
{ label: "10", value: 10 },
|
|
@@ -51411,9 +51428,9 @@ const TableSelectorDesigner = () => {
|
|
|
51411
51428
|
{ label: "200", value: 200 }
|
|
51412
51429
|
],
|
|
51413
51430
|
onChange: (j) => {
|
|
51414
|
-
var
|
|
51431
|
+
var L;
|
|
51415
51432
|
const w = r.decoratorProps.params || {};
|
|
51416
|
-
w.pageSize = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (
|
|
51433
|
+
w.pageSize = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: j, page: 1 })), p.emit("patch", {
|
|
51417
51434
|
schema: {
|
|
51418
51435
|
"x-uid": a["x-uid"],
|
|
51419
51436
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -53214,11 +53231,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53214
53231
|
if (D && I) {
|
|
53215
53232
|
const $ = ((B = r(D)) == null ? void 0 : B.fields) || [];
|
|
53216
53233
|
o(
|
|
53217
|
-
$ == null ? void 0 : $.filter((
|
|
53234
|
+
$ == null ? void 0 : $.filter((O) => supportTypes.includes(O.type)).map((O) => {
|
|
53218
53235
|
var j;
|
|
53219
53236
|
return {
|
|
53220
|
-
value:
|
|
53221
|
-
label: g(((j =
|
|
53237
|
+
value: O.name,
|
|
53238
|
+
label: g(((j = O.uiSchema) == null ? void 0 : j.title) || O.name)
|
|
53222
53239
|
};
|
|
53223
53240
|
})
|
|
53224
53241
|
);
|
|
@@ -53407,12 +53424,12 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53407
53424
|
const t = useRecord();
|
|
53408
53425
|
return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
|
|
53409
53426
|
}, AddFieldAction = (e) => {
|
|
53410
|
-
var
|
|
53411
|
-
const { scope: t, getContainer: n, item: o, children: r, trigger: a, align: i, 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(), I = useFieldInterfaceOptions(), F = ((j = (
|
|
53427
|
+
var O, j;
|
|
53428
|
+
const { scope: t, getContainer: n, item: o, children: r, trigger: a, align: i, 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(), I = useFieldInterfaceOptions(), F = ((j = (O = p(o.name)) == null ? void 0 : O.options) == null ? void 0 : j.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
|
|
53412
53429
|
label: S(w.title),
|
|
53413
53430
|
value: w.name
|
|
53414
53431
|
})), []), T = useCallback(() => {
|
|
53415
|
-
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude:
|
|
53432
|
+
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: L, include: N } = w || {}, k = [];
|
|
53416
53433
|
return I.forEach((M) => {
|
|
53417
53434
|
var q;
|
|
53418
53435
|
if (M.key === "systemInfo")
|
|
@@ -53427,14 +53444,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53427
53444
|
H && E.push(P(x({}, H), {
|
|
53428
53445
|
targetScope: V == null ? void 0 : V.targetScope
|
|
53429
53446
|
}));
|
|
53430
|
-
}) :
|
|
53447
|
+
}) : L != null && L.length ? E = (q = M == null ? void 0 : M.children) == null ? void 0 : q.filter((V) => !L.includes(V.name)) : E = M == null ? void 0 : M.children, E != null && E.length && k.push(P(x({}, M), {
|
|
53431
53448
|
children: E
|
|
53432
53449
|
}));
|
|
53433
53450
|
}
|
|
53434
53451
|
}), k;
|
|
53435
53452
|
}, [u, o]), D = useMemo(() => T().map((w) => {
|
|
53436
|
-
var
|
|
53437
|
-
return ((
|
|
53453
|
+
var L;
|
|
53454
|
+
return ((L = w == null ? void 0 : w.children) == null ? void 0 : L.length) === 0 ? null : o.template === "view" ? {
|
|
53438
53455
|
type: "group",
|
|
53439
53456
|
label: S(w.label),
|
|
53440
53457
|
title: S(w.label),
|
|
@@ -53458,25 +53475,25 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53458
53475
|
}))
|
|
53459
53476
|
};
|
|
53460
53477
|
}).filter((w) => {
|
|
53461
|
-
var
|
|
53462
|
-
return (
|
|
53478
|
+
var L;
|
|
53479
|
+
return (L = w == null ? void 0 : w.children) == null ? void 0 : L.length;
|
|
53463
53480
|
}), [T]), B = useMemo(() => ({
|
|
53464
53481
|
style: {
|
|
53465
53482
|
maxHeight: "60vh",
|
|
53466
53483
|
overflow: "auto"
|
|
53467
53484
|
},
|
|
53468
53485
|
onClick: (w) => {
|
|
53469
|
-
const
|
|
53470
|
-
|
|
53486
|
+
const L = w.item.props["data-targetScope"];
|
|
53487
|
+
L && f(L);
|
|
53471
53488
|
const N = getSchema$8(c(w.key), o, S);
|
|
53472
53489
|
N && (b(N), h(!0));
|
|
53473
53490
|
},
|
|
53474
53491
|
items: D
|
|
53475
53492
|
}), [c, D, o]), $ = useMemo(() => F.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
53476
|
-
var
|
|
53493
|
+
var L;
|
|
53477
53494
|
return {
|
|
53478
53495
|
value: w.name,
|
|
53479
|
-
label: S((
|
|
53496
|
+
label: S((L = w.uiSchema) == null ? void 0 : L.title)
|
|
53480
53497
|
};
|
|
53481
53498
|
}), [F == null ? void 0 : F.length]);
|
|
53482
53499
|
return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
|
|
@@ -53606,14 +53623,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53606
53623
|
"a",
|
|
53607
53624
|
P(x({}, i), {
|
|
53608
53625
|
onClick: () => z(void 0, null, function* () {
|
|
53609
|
-
var $,
|
|
53626
|
+
var $, O;
|
|
53610
53627
|
const { data: R } = yield g.resource("collections.fields", o.collectionName).get({
|
|
53611
53628
|
filterByTk: o.name,
|
|
53612
53629
|
appends: ["reverseField"]
|
|
53613
53630
|
});
|
|
53614
53631
|
S(R == null ? void 0 : R.data);
|
|
53615
53632
|
const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
|
|
53616
|
-
D != null && D.reverseField ? D.autoCreateReverseField = !0 : (D.autoCreateReverseField = !1, D.reverseField = ($ = T == null ? void 0 : T.default) == null ? void 0 : $.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (
|
|
53633
|
+
D != null && D.reverseField ? D.autoCreateReverseField = !0 : (D.autoCreateReverseField = !1, D.reverseField = ($ = T == null ? void 0 : T.default) == null ? void 0 : $.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (O = o.__parent) == null ? void 0 : O.title));
|
|
53617
53634
|
const B = getSchema$7(T, D, o, C);
|
|
53618
53635
|
h(B), p(!0);
|
|
53619
53636
|
}),
|
|
@@ -53708,13 +53725,13 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53708
53725
|
return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: n }, e));
|
|
53709
53726
|
}, getIsOverriding = (e, t, n) => t.find((r) => r.name === n.name).collectionName === e, OverridingFieldAction = (e) => {
|
|
53710
53727
|
const { scope: t, getContainer: n, item: o, parentItem: r, children: a, currentCollection: i } = 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(), I = (j) => {
|
|
53711
|
-
var
|
|
53712
|
-
return j && ((
|
|
53728
|
+
var L;
|
|
53729
|
+
return j && ((L = m(j)) == null ? void 0 : L.map((N) => N.name).concat([j]));
|
|
53713
53730
|
}, [F, R] = useState({}), T = p(i), D = getIsOverriding(i, T, o), B = useMemo(() => h.map((j) => ({
|
|
53714
53731
|
label: v(j.title),
|
|
53715
53732
|
value: j.name
|
|
53716
53733
|
})), []), $ = () => {
|
|
53717
|
-
const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM:
|
|
53734
|
+
const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: L } = useCollectionManager_deprecated(), N = useActionContext(), { resource: k } = useResourceContext();
|
|
53718
53735
|
return {
|
|
53719
53736
|
run() {
|
|
53720
53737
|
return z(this, null, function* () {
|
|
@@ -53733,17 +53750,17 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53733
53750
|
]);
|
|
53734
53751
|
yield k.create({
|
|
53735
53752
|
values: E
|
|
53736
|
-
}), yield j.reset(), yield
|
|
53753
|
+
}), yield j.reset(), yield L(), yield w(), N.setVisible(!1);
|
|
53737
53754
|
});
|
|
53738
53755
|
}
|
|
53739
53756
|
};
|
|
53740
|
-
},
|
|
53757
|
+
}, O = useMemo(() => {
|
|
53741
53758
|
var j;
|
|
53742
53759
|
return (o == null ? void 0 : o.fields) || ((j = d(o.collectionName)) == null ? void 0 : j.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
53743
|
-
var
|
|
53760
|
+
var L;
|
|
53744
53761
|
return {
|
|
53745
53762
|
value: w.name,
|
|
53746
|
-
label: v((
|
|
53763
|
+
label: v((L = w.uiSchema) == null ? void 0 : L.title)
|
|
53747
53764
|
};
|
|
53748
53765
|
}));
|
|
53749
53766
|
}, [o.name]);
|
|
@@ -53760,10 +53777,10 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53760
53777
|
appends: ["reverseField"]
|
|
53761
53778
|
});
|
|
53762
53779
|
R(w == null ? void 0 : w.data);
|
|
53763
|
-
const
|
|
53764
|
-
N != null && N.reverseField || (N.autoCreateReverseField = !1, N.reverseField = (j =
|
|
53780
|
+
const L = u(o.interface), N = cloneDeep(w == null ? void 0 : w.data) || {};
|
|
53781
|
+
N != null && N.reverseField || (N.autoCreateReverseField = !1, N.reverseField = (j = L.default) == null ? void 0 : j.reverseField, set(N.reverseField, "name", `f_${uid()}`), set(N.reverseField, "uiSchema.title", o.__parent.title));
|
|
53765
53782
|
const k = getSchema$6(
|
|
53766
|
-
P(x({},
|
|
53783
|
+
P(x({}, L), {
|
|
53767
53784
|
default: N
|
|
53768
53785
|
}),
|
|
53769
53786
|
o,
|
|
@@ -53790,7 +53807,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53790
53807
|
isOverride: !0,
|
|
53791
53808
|
targetScope: { target: I(l), through: I(c) },
|
|
53792
53809
|
collections: B,
|
|
53793
|
-
scopeKeyOptions:
|
|
53810
|
+
scopeKeyOptions: O
|
|
53794
53811
|
}, t)
|
|
53795
53812
|
}
|
|
53796
53813
|
)
|
|
@@ -54225,10 +54242,10 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54225
54242
|
const { databaseView: t, viewName: n, sources: o, schema: r } = e, { data: a } = useContext(ResourceActionContext), i = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(o), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: I, getCollectionFields: F, getInheritCollections: R, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), $ = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
|
|
54226
54243
|
useEffect(() => {
|
|
54227
54244
|
const w = [];
|
|
54228
|
-
g.forEach((
|
|
54245
|
+
g.forEach((L) => {
|
|
54229
54246
|
var E;
|
|
54230
|
-
const N = v(
|
|
54231
|
-
const H = T(V,
|
|
54247
|
+
const N = v(L), M = R(L).map((V) => {
|
|
54248
|
+
const H = T(V, L);
|
|
54232
54249
|
return {
|
|
54233
54250
|
type: "group",
|
|
54234
54251
|
key: V,
|
|
@@ -54246,17 +54263,17 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54246
54263
|
return { value: V.name, key: V.name, label: l(((H = V.uiSchema) == null ? void 0 : H.title) || V.name) };
|
|
54247
54264
|
}).concat(M);
|
|
54248
54265
|
w.push({
|
|
54249
|
-
value:
|
|
54266
|
+
value: L,
|
|
54250
54267
|
label: l(N.title || N.name),
|
|
54251
54268
|
children: q
|
|
54252
54269
|
});
|
|
54253
54270
|
}), h(w);
|
|
54254
54271
|
}, [g, t]), useEffect(() => {
|
|
54255
54272
|
t && (u(!0), i.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data: w }) => {
|
|
54256
|
-
var
|
|
54273
|
+
var L, N;
|
|
54257
54274
|
if (w) {
|
|
54258
54275
|
u(!1), p([]);
|
|
54259
|
-
const k = (N = Object.values((
|
|
54276
|
+
const k = (N = Object.values((L = w == null ? void 0 : w.data) == null ? void 0 : L.fields)) == null ? void 0 : N.map((M) => {
|
|
54260
54277
|
var q, E;
|
|
54261
54278
|
if (M.source) {
|
|
54262
54279
|
const V = (a == null ? void 0 : a.data.find((H) => H.name === M.name)) || M;
|
|
@@ -54277,9 +54294,9 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54277
54294
|
}
|
|
54278
54295
|
}).catch);
|
|
54279
54296
|
}, [t]);
|
|
54280
|
-
const
|
|
54297
|
+
const O = (w, L) => {
|
|
54281
54298
|
const N = _.cloneDeep(d);
|
|
54282
|
-
N[
|
|
54299
|
+
N[L] = w, p(N), S.value = N.map((k) => {
|
|
54283
54300
|
var q, E, V;
|
|
54284
54301
|
const M = typeof k.source == "string" ? k.source : (V = (E = (q = k.source) == null ? void 0 : q.filter) == null ? void 0 : E.call(q, Boolean)) == null ? void 0 : V.join(".");
|
|
54285
54302
|
return P(x({}, k), {
|
|
@@ -54298,7 +54315,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54298
54315
|
dataIndex: "source",
|
|
54299
54316
|
key: "source",
|
|
54300
54317
|
width: 200,
|
|
54301
|
-
render: (w,
|
|
54318
|
+
render: (w, L, N) => /* @__PURE__ */ jsx(
|
|
54302
54319
|
Cascader$1,
|
|
54303
54320
|
{
|
|
54304
54321
|
defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
|
|
@@ -54308,7 +54325,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54308
54325
|
onChange: (k, M) => {
|
|
54309
54326
|
var E;
|
|
54310
54327
|
const q = (E = F(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
|
|
54311
|
-
|
|
54328
|
+
O(P(x({}, L), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), N);
|
|
54312
54329
|
},
|
|
54313
54330
|
placeholder: l("Select field source")
|
|
54314
54331
|
}
|
|
@@ -54319,7 +54336,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54319
54336
|
dataIndex: "type",
|
|
54320
54337
|
width: 140,
|
|
54321
54338
|
key: "type",
|
|
54322
|
-
render: (w,
|
|
54339
|
+
render: (w, L, N) => {
|
|
54323
54340
|
const k = d[N];
|
|
54324
54341
|
return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
|
|
54325
54342
|
Select$1,
|
|
@@ -54328,7 +54345,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54328
54345
|
popupMatchSelectWidth: !1,
|
|
54329
54346
|
style: { width: "100%" },
|
|
54330
54347
|
options: (k == null ? void 0 : k.possibleTypes.map((M) => ({ label: M, value: M }))) || [],
|
|
54331
|
-
onChange: (M) =>
|
|
54348
|
+
onChange: (M) => O(P(x({}, k), { type: M }), N)
|
|
54332
54349
|
}
|
|
54333
54350
|
);
|
|
54334
54351
|
}
|
|
@@ -54338,7 +54355,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54338
54355
|
dataIndex: "interface",
|
|
54339
54356
|
key: "interface",
|
|
54340
54357
|
width: 150,
|
|
54341
|
-
render: (w,
|
|
54358
|
+
render: (w, L, N) => {
|
|
54342
54359
|
const k = d[N], M = getInterfaceOptions($, k.type);
|
|
54343
54360
|
return k.source ? w : /* @__PURE__ */ jsx(
|
|
54344
54361
|
Select$1,
|
|
@@ -54347,7 +54364,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54347
54364
|
style: { width: "100%" },
|
|
54348
54365
|
popupMatchSelectWidth: !1,
|
|
54349
54366
|
onChange: (q) => {
|
|
54350
|
-
|
|
54367
|
+
O(P(x({}, k), { interface: q }), N);
|
|
54351
54368
|
},
|
|
54352
54369
|
children: M.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
|
|
54353
54370
|
}
|
|
@@ -54359,14 +54376,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
54359
54376
|
dataIndex: "title",
|
|
54360
54377
|
key: "title",
|
|
54361
54378
|
width: 180,
|
|
54362
|
-
render: (w,
|
|
54379
|
+
render: (w, L, N) => {
|
|
54363
54380
|
var M;
|
|
54364
54381
|
const k = d[N];
|
|
54365
54382
|
return /* @__PURE__ */ jsx(
|
|
54366
54383
|
Input$3,
|
|
54367
54384
|
{
|
|
54368
54385
|
defaultValue: ((M = k == null ? void 0 : k.uiSchema) == null ? void 0 : M.title) || w,
|
|
54369
|
-
onChange: (q) =>
|
|
54386
|
+
onChange: (q) => O(
|
|
54370
54387
|
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
|
|
54371
54388
|
N
|
|
54372
54389
|
)
|
|
@@ -54421,8 +54438,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
54421
54438
|
}, S = (y) => {
|
|
54422
54439
|
var v;
|
|
54423
54440
|
return (v = y.filter((I) => I.source || I.interface)) == null ? void 0 : v.map((I) => {
|
|
54424
|
-
var B, $,
|
|
54425
|
-
const F = typeof (I == null ? void 0 : I.source) == "string" ? (B = I == null ? void 0 : I.source) == null ? void 0 : B.split(".") : I == null ? void 0 : I.source, R = (
|
|
54441
|
+
var B, $, O, j, w, L;
|
|
54442
|
+
const F = typeof (I == null ? void 0 : I.source) == "string" ? (B = I == null ? void 0 : I.source) == null ? void 0 : B.split(".") : I == null ? void 0 : I.source, R = (O = ($ = h(F == null ? void 0 : F[0])) == null ? void 0 : $.find((N) => N.name === (F == null ? void 0 : F[1]))) == null ? void 0 : O.uiSchema, T = ((j = I == null ? void 0 : I.uiSchema) == null ? void 0 : j.title) || (R == null ? void 0 : R.title) || I.name, D = I.source ? R : (L = (w = m(I.interface)) == null ? void 0 : w.default) == null ? void 0 : L.uiSchema;
|
|
54426
54443
|
return {
|
|
54427
54444
|
title: u(T),
|
|
54428
54445
|
dataIndex: I.name,
|
|
@@ -54672,26 +54689,26 @@ const AsyncDataProvider = (e) => {
|
|
|
54672
54689
|
if (useEffect(() => {
|
|
54673
54690
|
var B;
|
|
54674
54691
|
const T = /* @__PURE__ */ new Map();
|
|
54675
|
-
a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([$,
|
|
54692
|
+
a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([$, O]) => {
|
|
54676
54693
|
var k;
|
|
54677
|
-
const j = l[$], w = inferInterface($,
|
|
54694
|
+
const j = l[$], w = inferInterface($, O), L = (k = C.current(w)) == null ? void 0 : k.default, N = (j == null ? void 0 : j.uiSchema) || (L == null ? void 0 : L.uiSchema) || {};
|
|
54678
54695
|
T.set($, {
|
|
54679
54696
|
name: $,
|
|
54680
54697
|
interface: (j == null ? void 0 : j.interface) || w,
|
|
54681
|
-
type: (j == null ? void 0 : j.type) || (
|
|
54698
|
+
type: (j == null ? void 0 : j.type) || (L == null ? void 0 : L.type),
|
|
54682
54699
|
source: j == null ? void 0 : j.source,
|
|
54683
54700
|
uiSchema: x({
|
|
54684
54701
|
title: $
|
|
54685
54702
|
}, N)
|
|
54686
54703
|
});
|
|
54687
54704
|
}) : Object.entries(l || {}).forEach(
|
|
54688
|
-
([$,
|
|
54705
|
+
([$, O]) => T.set($, P(x({
|
|
54689
54706
|
name: $,
|
|
54690
54707
|
type: "string"
|
|
54691
|
-
},
|
|
54708
|
+
}, O), {
|
|
54692
54709
|
uiSchema: x({
|
|
54693
54710
|
title: $
|
|
54694
|
-
}, (
|
|
54711
|
+
}, (O == null ? void 0 : O.uiSchema) || {})
|
|
54695
54712
|
}))
|
|
54696
54713
|
)), (B = c.value) != null && B.length && c.value.forEach(($) => {
|
|
54697
54714
|
T.has($.name) && T.set($.name, $);
|
|
@@ -54712,9 +54729,9 @@ const AsyncDataProvider = (e) => {
|
|
|
54712
54729
|
const B = [...t];
|
|
54713
54730
|
B.splice(D, 1, T), n(B), c.setValue(
|
|
54714
54731
|
B.map(($) => {
|
|
54715
|
-
var
|
|
54732
|
+
var O, j, w;
|
|
54716
54733
|
return P(x({}, $), {
|
|
54717
|
-
source: typeof $.source == "string" ? $.source : ((w = (j = (
|
|
54734
|
+
source: typeof $.source == "string" ? $.source : ((w = (j = (O = $.source) == null ? void 0 : O.filter) == null ? void 0 : j.call(O, Boolean)) == null ? void 0 : w.join(".")) || null
|
|
54718
54735
|
});
|
|
54719
54736
|
})
|
|
54720
54737
|
);
|
|
@@ -54739,11 +54756,11 @@ const AsyncDataProvider = (e) => {
|
|
|
54739
54756
|
allowClear: !0,
|
|
54740
54757
|
options: d(f),
|
|
54741
54758
|
placeholder: e("Select field source"),
|
|
54742
|
-
onChange: (
|
|
54743
|
-
let j = l[
|
|
54744
|
-
j != null && j.interface || (j = m((
|
|
54759
|
+
onChange: (O) => {
|
|
54760
|
+
let j = l[O == null ? void 0 : O[1]];
|
|
54761
|
+
j != null && j.interface || (j = m((O == null ? void 0 : O.join(".")) || "")), S(
|
|
54745
54762
|
P(x({}, $), {
|
|
54746
|
-
source:
|
|
54763
|
+
source: O,
|
|
54747
54764
|
interface: j == null ? void 0 : j.interface,
|
|
54748
54765
|
type: j == null ? void 0 : j.type,
|
|
54749
54766
|
uiSchema: j == null ? void 0 : j.uiSchema
|
|
@@ -54761,21 +54778,21 @@ const AsyncDataProvider = (e) => {
|
|
|
54761
54778
|
key: "interface",
|
|
54762
54779
|
width: 150,
|
|
54763
54780
|
render: (T, D, B) => {
|
|
54764
|
-
var
|
|
54781
|
+
var O;
|
|
54765
54782
|
const $ = t[B];
|
|
54766
|
-
return $.source ? /* @__PURE__ */ jsx(Tag, { children: d((
|
|
54783
|
+
return $.source ? /* @__PURE__ */ jsx(Tag, { children: d((O = p(T)) == null ? void 0 : O.title) || T }) : /* @__PURE__ */ jsx(
|
|
54767
54784
|
Select$1,
|
|
54768
54785
|
{
|
|
54769
54786
|
defaultValue: $.interface || "input",
|
|
54770
54787
|
style: { width: "100%" },
|
|
54771
54788
|
popupMatchSelectWidth: !1,
|
|
54772
54789
|
onChange: (j) => {
|
|
54773
|
-
var
|
|
54790
|
+
var L, N, k, M, q;
|
|
54774
54791
|
const w = p(j);
|
|
54775
54792
|
S(
|
|
54776
54793
|
P(x({}, $), {
|
|
54777
54794
|
interface: j || null,
|
|
54778
|
-
uiSchema: P(x({}, (
|
|
54795
|
+
uiSchema: P(x({}, (L = w == null ? void 0 : w.default) == null ? void 0 : L.uiSchema), {
|
|
54779
54796
|
title: ((k = (N = w == null ? void 0 : w.default) == null ? void 0 : N.uiSchema) == null ? void 0 : k.title) || ((M = $.uiSchema) == null ? void 0 : M.title)
|
|
54780
54797
|
}),
|
|
54781
54798
|
type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
|
|
@@ -54795,12 +54812,12 @@ const AsyncDataProvider = (e) => {
|
|
|
54795
54812
|
key: "title",
|
|
54796
54813
|
width: 180,
|
|
54797
54814
|
render: (T, D, B) => {
|
|
54798
|
-
var
|
|
54815
|
+
var O, j;
|
|
54799
54816
|
const $ = t[B];
|
|
54800
54817
|
return /* @__PURE__ */ jsx(
|
|
54801
54818
|
Input$3,
|
|
54802
54819
|
{
|
|
54803
|
-
value: ((
|
|
54820
|
+
value: ((O = $.uiSchema) == null ? void 0 : O.title) || T,
|
|
54804
54821
|
defaultValue: ((j = $.uiSchema) == null ? void 0 : j.title) !== void 0 ? $.uiSchema.title : $ == null ? void 0 : $.name,
|
|
54805
54822
|
onChange: (w) => S(P(x({}, $), { uiSchema: P(x({}, $ == null ? void 0 : $.uiSchema), { title: w.target.value }) }), B)
|
|
54806
54823
|
}
|
|
@@ -60817,8 +60834,8 @@ const RolesResourcesActions = connect((e) => {
|
|
|
60817
60834
|
name: F.name
|
|
60818
60835
|
}, $ = B.fields || [];
|
|
60819
60836
|
if (T) {
|
|
60820
|
-
const
|
|
60821
|
-
$.splice(
|
|
60837
|
+
const O = $.indexOf(D.name);
|
|
60838
|
+
$.splice(O, 1);
|
|
60822
60839
|
} else
|
|
60823
60840
|
$.push(D.name);
|
|
60824
60841
|
B.fields = $, p[F.name] = B, t(Object.values(p));
|
|
@@ -63310,17 +63327,17 @@ const ActionInitializerItem = (e) => {
|
|
|
63310
63327
|
), F = C || (a == null ? void 0 : a.targetKey) || "id", R = b || ((U = (H = i["x-component-props"]) == null ? void 0 : H.fieldNames) == null ? void 0 : U.label) || F, T = {
|
|
63311
63328
|
title: R || F,
|
|
63312
63329
|
key: F
|
|
63313
|
-
}, [D, B] = useState([]), [$,
|
|
63330
|
+
}, [D, B] = useState([]), [$, O] = useState(i.default || []), [j, w] = useState(!0), L = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
|
|
63314
63331
|
if (useEffect(() => {
|
|
63315
63332
|
i.default && setTimeout(() => {
|
|
63316
|
-
d(i.default),
|
|
63333
|
+
d(i.default), O(i.default);
|
|
63317
63334
|
}, 100);
|
|
63318
63335
|
}, [i.default, d]), !a)
|
|
63319
63336
|
return null;
|
|
63320
63337
|
const N = (J) => {
|
|
63321
63338
|
B(J), w(!1);
|
|
63322
63339
|
}, k = (J) => {
|
|
63323
|
-
|
|
63340
|
+
O(J), d(J), p == null || p(J);
|
|
63324
63341
|
}, M = (J) => {
|
|
63325
63342
|
var X;
|
|
63326
63343
|
const K = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
|
|
@@ -63381,7 +63398,7 @@ const ActionInitializerItem = (e) => {
|
|
|
63381
63398
|
treeData: u,
|
|
63382
63399
|
onSelect: k,
|
|
63383
63400
|
fieldNames: T,
|
|
63384
|
-
titleRender: (J) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(
|
|
63401
|
+
titleRender: (J) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(L, c(J[R])) }),
|
|
63385
63402
|
selectedKeys: $,
|
|
63386
63403
|
blockNode: !0
|
|
63387
63404
|
}
|
|
@@ -63840,9 +63857,9 @@ const DataBlockInitializer = (e) => {
|
|
|
63840
63857
|
onClick: D,
|
|
63841
63858
|
currentText: b,
|
|
63842
63859
|
otherText: S
|
|
63843
|
-
}), $ = useGetSchemaInitializerMenuItems(D),
|
|
63844
|
-
let q =
|
|
63845
|
-
return p && q.length === 1 ? q = q[0].children : q =
|
|
63860
|
+
}), $ = useGetSchemaInitializerMenuItems(D), O = useMemo(() => $(B, a), [$, B, a]), [j, w] = useState([]), L = useMenuSearch({ data: O, openKeys: j, hideSearch: u }), N = useMemo(() => {
|
|
63861
|
+
let q = L.filter((E) => E.key !== "search" && E.key !== "empty");
|
|
63862
|
+
return p && q.length === 1 ? q = q[0].children : q = L, [
|
|
63846
63863
|
{
|
|
63847
63864
|
key: a,
|
|
63848
63865
|
label: F(i),
|
|
@@ -63853,8 +63870,8 @@ const DataBlockInitializer = (e) => {
|
|
|
63853
63870
|
children: q
|
|
63854
63871
|
}
|
|
63855
63872
|
];
|
|
63856
|
-
}, [
|
|
63857
|
-
return
|
|
63873
|
+
}, [L, p, a, F, i, r, D, e]);
|
|
63874
|
+
return O.length > 1 || O.length === 1 && ((M = (k = O[0]) == null ? void 0 : k.children) == null ? void 0 : M.length) > 0 || y ? /* @__PURE__ */ jsx(
|
|
63858
63875
|
SchemaInitializerMenu,
|
|
63859
63876
|
{
|
|
63860
63877
|
onOpenChange: (q) => {
|
|
@@ -68753,6 +68770,7 @@ export {
|
|
|
68753
68770
|
useDateVariable,
|
|
68754
68771
|
useDatetimeVariable,
|
|
68755
68772
|
useDatetimeVariableContext,
|
|
68773
|
+
useDeleteRouteSchema,
|
|
68756
68774
|
useDesignable,
|
|
68757
68775
|
useDesigner,
|
|
68758
68776
|
useDestroyAction,
|