@nocobase/client 1.8.24 → 1.8.26
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 +1005 -998
- package/es/schema-component/antd/popover/Popover.d.ts +1 -0
- package/lib/index.js +54 -54
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Oe = Object.defineProperty, Le = Object.defineProperties;
|
|
2
|
+
var Ee = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Te = Object.getOwnPropertySymbols;
|
|
4
4
|
var Be = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var $e = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
|
|
6
|
-
var we = (e, t, o) => t in e ?
|
|
6
|
+
var we = (e, t, o) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, x = (e, t) => {
|
|
7
7
|
for (var o in t || (t = {}))
|
|
8
8
|
Be.call(t, o) && we(e, o, t[o]);
|
|
9
9
|
if (Te)
|
|
10
10
|
for (var o of Te(t))
|
|
11
11
|
Ne.call(t, o) && we(e, o, t[o]);
|
|
12
12
|
return e;
|
|
13
|
-
}, P = (e, t) =>
|
|
13
|
+
}, P = (e, t) => Le(e, Ee(t));
|
|
14
14
|
var Y = (e, t) => {
|
|
15
15
|
var o = {};
|
|
16
16
|
for (var n in e)
|
|
@@ -537,6 +537,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
537
537
|
get HTMLEncode() {
|
|
538
538
|
return HTMLEncode;
|
|
539
539
|
},
|
|
540
|
+
get ICON_POPUP_Z_INDEX() {
|
|
541
|
+
return ICON_POPUP_Z_INDEX;
|
|
542
|
+
},
|
|
540
543
|
get IconPicker() {
|
|
541
544
|
return IconPicker;
|
|
542
545
|
},
|
|
@@ -1879,6 +1882,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1879
1882
|
get HeightMode() {
|
|
1880
1883
|
return HeightMode;
|
|
1881
1884
|
},
|
|
1885
|
+
get ICON_POPUP_Z_INDEX() {
|
|
1886
|
+
return ICON_POPUP_Z_INDEX;
|
|
1887
|
+
},
|
|
1882
1888
|
get Icon() {
|
|
1883
1889
|
return Icon;
|
|
1884
1890
|
},
|
|
@@ -6313,7 +6319,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6313
6319
|
getOnCheck: C,
|
|
6314
6320
|
getScopeDataSource: (S) => {
|
|
6315
6321
|
const v = n(S), F = (T, D) => {
|
|
6316
|
-
var
|
|
6322
|
+
var L, M;
|
|
6317
6323
|
if (!T.interface)
|
|
6318
6324
|
return;
|
|
6319
6325
|
const $ = i(T.interface);
|
|
@@ -6321,7 +6327,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6321
6327
|
return;
|
|
6322
6328
|
const { nested: B, children: N, operators: j } = $.filterable, w = {
|
|
6323
6329
|
name: T.name,
|
|
6324
|
-
title: ((
|
|
6330
|
+
title: ((L = T == null ? void 0 : T.uiSchema) == null ? void 0 : L.title) || T.name,
|
|
6325
6331
|
schema: T == null ? void 0 : T.uiSchema,
|
|
6326
6332
|
operators: ((M = j == null ? void 0 : j.filter) == null ? void 0 : M.call(j, (k) => !(k != null && k.visible) || k.visible(T))) || [],
|
|
6327
6333
|
interface: T.interface
|
|
@@ -6330,8 +6336,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6330
6336
|
if (D > 2)
|
|
6331
6337
|
return w;
|
|
6332
6338
|
if (N != null && N.length && (w.children = N), B) {
|
|
6333
|
-
const k = n(T.target),
|
|
6334
|
-
w.children = w.children || [], w.children.push(...
|
|
6339
|
+
const k = n(T.target), O = I(k, D + 1).filter(Boolean);
|
|
6340
|
+
w.children = w.children || [], w.children.push(...O);
|
|
6335
6341
|
}
|
|
6336
6342
|
return w;
|
|
6337
6343
|
}
|
|
@@ -7089,7 +7095,7 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7089
7095
|
action: l,
|
|
7090
7096
|
conditionType: c
|
|
7091
7097
|
}, u) => {
|
|
7092
|
-
var y, S, v, F, I, R, T, D, $, B, N, j, w,
|
|
7098
|
+
var y, S, v, F, I, R, T, D, $, B, N, j, w, L;
|
|
7093
7099
|
const d = ((y = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : y.required) || [(S = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : S.required], p = ((v = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : v.display) || [(F = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : F.display], m = ((I = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : I.pattern) || [(R = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : R.pattern], h = ((T = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : T.value) || [(D = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : D.value], g = (($ = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : $.dataSource) || [(B = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : B.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
|
|
7094
7100
|
ruleGroup: n,
|
|
7095
7101
|
variables: r,
|
|
@@ -7129,14 +7135,14 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7129
7135
|
if ((t == null ? void 0 : t.mode) === "express") {
|
|
7130
7136
|
if ((t.value || t.result) == null)
|
|
7131
7137
|
return;
|
|
7132
|
-
const { exp:
|
|
7138
|
+
const { exp: O, scope: q } = yield replaceVariables(t.value || t.result, {
|
|
7133
7139
|
variables: r,
|
|
7134
7140
|
localVariables: a
|
|
7135
7141
|
});
|
|
7136
7142
|
try {
|
|
7137
|
-
return f(
|
|
7138
|
-
} catch (
|
|
7139
|
-
console.error(
|
|
7143
|
+
return f(O, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
|
|
7144
|
+
} catch (V) {
|
|
7145
|
+
console.error(V);
|
|
7140
7146
|
}
|
|
7141
7147
|
} else
|
|
7142
7148
|
return (t == null ? void 0 : t.mode) === "constant" ? (k = t == null ? void 0 : t.value) != null ? k : t : null;
|
|
@@ -7148,7 +7154,7 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7148
7154
|
break;
|
|
7149
7155
|
case ActionType.Options:
|
|
7150
7156
|
{
|
|
7151
|
-
const M = (
|
|
7157
|
+
const M = (L = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : L.filter((k) => t.value.includes(k.value));
|
|
7152
7158
|
g.push(getTempFieldState(conditionAnalyses(C, u), M || [])), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
|
|
7153
7159
|
dataSource: g
|
|
7154
7160
|
});
|
|
@@ -8315,8 +8321,8 @@ function withInitializer(e) {
|
|
|
8315
8321
|
style: C,
|
|
8316
8322
|
componentProps: b
|
|
8317
8323
|
} = o, y = l ? l() : i, S = c(u), v = useCallback(
|
|
8318
|
-
(
|
|
8319
|
-
y ? y(S(
|
|
8324
|
+
(L) => {
|
|
8325
|
+
y ? y(S(L, { isInSubTable: a })) : r(d, S(L, { isInSubTable: a }), { onSuccess: p });
|
|
8320
8326
|
},
|
|
8321
8327
|
[y, S, a, r, d, p]
|
|
8322
8328
|
), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: $ } = theme.useToken(), B = useNiceDropdownMaxHeight([T]), N = useMemo(
|
|
@@ -8779,7 +8785,7 @@ function addAppVersion(e, t) {
|
|
|
8779
8785
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
8780
8786
|
}), e;
|
|
8781
8787
|
}
|
|
8782
|
-
const name = "@nocobase/client", version = "1.8.
|
|
8788
|
+
const name = "@nocobase/client", version = "1.8.26", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8783
8789
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8784
8790
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8785
8791
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8800,9 +8806,9 @@ const name = "@nocobase/client", version = "1.8.24", license = "AGPL-3.0", main
|
|
|
8800
8806
|
"@formily/reactive-react": "^2.2.27",
|
|
8801
8807
|
"@formily/shared": "^2.2.27",
|
|
8802
8808
|
"@formily/validator": "^2.2.27",
|
|
8803
|
-
"@nocobase/evaluators": "1.8.
|
|
8804
|
-
"@nocobase/sdk": "1.8.
|
|
8805
|
-
"@nocobase/utils": "1.8.
|
|
8809
|
+
"@nocobase/evaluators": "1.8.26",
|
|
8810
|
+
"@nocobase/sdk": "1.8.26",
|
|
8811
|
+
"@nocobase/utils": "1.8.26",
|
|
8806
8812
|
ahooks: "^3.7.2",
|
|
8807
8813
|
antd: "5.24.2",
|
|
8808
8814
|
"antd-style": "3.7.1",
|
|
@@ -9971,7 +9977,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9971
9977
|
}
|
|
9972
9978
|
`, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), y = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
|
|
9973
9979
|
() => d == null ? void 0 : d.map((F) => {
|
|
9974
|
-
var N, j, w,
|
|
9980
|
+
var N, j, w, L;
|
|
9975
9981
|
const I = F.reduceProperties((M, k) => {
|
|
9976
9982
|
if (isCollectionFieldComponent(k))
|
|
9977
9983
|
return M.concat([k]);
|
|
@@ -9984,7 +9990,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9984
9990
|
schema: F,
|
|
9985
9991
|
onlyRenderSelf: !0,
|
|
9986
9992
|
isUseFormilyField: !1,
|
|
9987
|
-
tooltip: (j = F == null ? void 0 : F["x-component-props"]) == null ? void 0 : j.tooltip
|
|
9993
|
+
tooltip: o((j = F == null ? void 0 : F["x-component-props"]) == null ? void 0 : j.tooltip, { ns: NAMESPACE_UI_SCHEMA })
|
|
9988
9994
|
}
|
|
9989
9995
|
) }),
|
|
9990
9996
|
dataIndex: R,
|
|
@@ -9992,8 +9998,8 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9992
9998
|
sorter: (w = F["x-component-props"]) == null ? void 0 : w.sorter,
|
|
9993
9999
|
columnHidden: T
|
|
9994
10000
|
}, F["x-component-props"]), {
|
|
9995
|
-
width: T && !l ? 0 : ((
|
|
9996
|
-
render: (M, k,
|
|
10001
|
+
width: T && !l ? 0 : ((L = F["x-component-props"]) == null ? void 0 : L.width) || 100,
|
|
10002
|
+
render: (M, k, O) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
9997
10003
|
TableCellRender,
|
|
9998
10004
|
{
|
|
9999
10005
|
record: k,
|
|
@@ -10002,7 +10008,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
10002
10008
|
filterProperties: f,
|
|
10003
10009
|
schemaToolbarBigger: C,
|
|
10004
10010
|
field: r,
|
|
10005
|
-
index:
|
|
10011
|
+
index: O
|
|
10006
10012
|
}
|
|
10007
10013
|
) }),
|
|
10008
10014
|
onCell: (M, k) => ({
|
|
@@ -10376,7 +10382,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10376
10382
|
"onClickRow",
|
|
10377
10383
|
"value"
|
|
10378
10384
|
]), S = useArrayField$1(y), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Se = v == null ? void 0 : v.parent) == null ? void 0 : Se["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: $, enableIndexColumn: B } = T, N = useMemoizedFn(y.onRowDragEnd || (() => {
|
|
10379
|
-
})), j = usePaginationProps$3(o, a, e), w = useTableColumns$2(y, j), [
|
|
10385
|
+
})), j = usePaginationProps$3(o, a, e), w = useTableColumns$2(y, j), [L, M] = useState(() => D ? $ : []), [k, O] = useState(((se = S == null ? void 0 : S.data) == null ? void 0 : se.selectedRowKeys) || []), [q, V] = useState([]), E = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
10380
10386
|
& > td {
|
|
10381
10387
|
background-color: ${t.controlItemBgActive} !important;
|
|
10382
10388
|
}
|
|
@@ -10387,12 +10393,12 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10387
10393
|
K.current = b, useEffect(() => {
|
|
10388
10394
|
var te;
|
|
10389
10395
|
H != null && H.field && (H.field.data = ((te = H.field) == null ? void 0 : te.data) || {}, H.field.data.clearSelectedRowKeys = () => {
|
|
10390
|
-
H.field.data.selectedRowKeys = [],
|
|
10391
|
-
}, H.field.data.setSelectedRowKeys =
|
|
10396
|
+
H.field.data.selectedRowKeys = [], O([]);
|
|
10397
|
+
}, H.field.data.setSelectedRowKeys = O);
|
|
10392
10398
|
}, [H == null ? void 0 : H.field]);
|
|
10393
|
-
const
|
|
10399
|
+
const X = useMemo(() => C ? U : "", [U, C]), W = useMemo(() => C ? (te, ne) => ({
|
|
10394
10400
|
onClick: (ae) => {
|
|
10395
|
-
isPortalInBody(ae.target) || C(te,
|
|
10401
|
+
isPortalInBody(ae.target) || C(te, V, q);
|
|
10396
10402
|
},
|
|
10397
10403
|
rowIndex: ne,
|
|
10398
10404
|
record: te
|
|
@@ -10402,9 +10408,9 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10402
10408
|
}), [C, q]);
|
|
10403
10409
|
useDeepCompareEffect(() => {
|
|
10404
10410
|
const te = D ? $ : [];
|
|
10405
|
-
_.isEqual(te,
|
|
10411
|
+
_.isEqual(te, L) || M(te);
|
|
10406
10412
|
}, [D, $]);
|
|
10407
|
-
const
|
|
10413
|
+
const J = useCallback((te) => {
|
|
10408
10414
|
if (m)
|
|
10409
10415
|
return Z(te);
|
|
10410
10416
|
if (te.key)
|
|
@@ -10419,9 +10425,9 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10419
10425
|
return Array.isArray(m) ? m.map((ae) => {
|
|
10420
10426
|
var le;
|
|
10421
10427
|
return ((le = te[ae]) == null ? void 0 : le.toString()) || "";
|
|
10422
|
-
}).join("-") : typeof m == "string" ? te[m] : (ne = (m != null ? m :
|
|
10428
|
+
}).join("-") : typeof m == "string" ? te[m] : (ne = (m != null ? m : J)(te)) == null ? void 0 : ne.toString();
|
|
10423
10429
|
},
|
|
10424
|
-
[JSON.stringify(m),
|
|
10430
|
+
[JSON.stringify(m), J]
|
|
10425
10431
|
), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ee = useMemo(() => (te) => {
|
|
10426
10432
|
const ne = useCallback((ae) => {
|
|
10427
10433
|
var ve, Pe, Fe, Ie, Ae, De, je, Me;
|
|
@@ -10451,7 +10457,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10451
10457
|
type: "checkbox",
|
|
10452
10458
|
selectedRowKeys: k,
|
|
10453
10459
|
onChange(te, ne) {
|
|
10454
|
-
S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = ne,
|
|
10460
|
+
S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = ne, O(te), u == null || u(te, ne, O);
|
|
10455
10461
|
},
|
|
10456
10462
|
onSelect: (te, ne, ae, le) => {
|
|
10457
10463
|
var ue;
|
|
@@ -10472,14 +10478,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10472
10478
|
role: "button",
|
|
10473
10479
|
"aria-label": `table-index-${ae}`,
|
|
10474
10480
|
className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10475
|
-
[rowSelectCheckboxWrapperClassHover$1]:
|
|
10481
|
+
[rowSelectCheckboxWrapperClassHover$1]: E
|
|
10476
10482
|
}),
|
|
10477
10483
|
children: [
|
|
10478
10484
|
/* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10479
10485
|
l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(ne) }),
|
|
10480
10486
|
c && /* @__PURE__ */ jsx(TableIndex$3, { index: ae })
|
|
10481
10487
|
] }),
|
|
10482
|
-
|
|
10488
|
+
E && /* @__PURE__ */ jsx(
|
|
10483
10489
|
"div",
|
|
10484
10490
|
{
|
|
10485
10491
|
className: cls(
|
|
@@ -10504,7 +10510,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10504
10510
|
l,
|
|
10505
10511
|
S,
|
|
10506
10512
|
Z,
|
|
10507
|
-
|
|
10513
|
+
E,
|
|
10508
10514
|
re,
|
|
10509
10515
|
j,
|
|
10510
10516
|
H,
|
|
@@ -10527,18 +10533,18 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10527
10533
|
x: "max-content",
|
|
10528
10534
|
y: ce
|
|
10529
10535
|
}), [ce, Q]), Ce = useCallback(
|
|
10530
|
-
(te) => q.includes(te[m]) ?
|
|
10531
|
-
[q,
|
|
10536
|
+
(te) => q.includes(te[m]) ? X : "",
|
|
10537
|
+
[q, X, JSON.stringify(m)]
|
|
10532
10538
|
), me = useCallback(
|
|
10533
10539
|
(te, ne) => {
|
|
10534
|
-
const ae = te ? [...
|
|
10540
|
+
const ae = te ? [...L, ne[I.getPrimaryKey()]] : L.filter((le) => ne[I.getPrimaryKey()] !== le);
|
|
10535
10541
|
M(ae), g == null || g(te, ne);
|
|
10536
10542
|
},
|
|
10537
|
-
[
|
|
10543
|
+
[L, g, I]
|
|
10538
10544
|
), xe = useMemo(() => ({
|
|
10539
10545
|
onExpand: me,
|
|
10540
|
-
expandedRowKeys:
|
|
10541
|
-
}), [
|
|
10546
|
+
expandedRowKeys: L
|
|
10547
|
+
}), [L, me]);
|
|
10542
10548
|
return (
|
|
10543
10549
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10544
10550
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
@@ -10548,7 +10554,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10548
10554
|
tableHeight: ce,
|
|
10549
10555
|
SortableWrapper: pe,
|
|
10550
10556
|
tableSizeRefCallback: fe,
|
|
10551
|
-
defaultRowKey:
|
|
10557
|
+
defaultRowKey: J,
|
|
10552
10558
|
dataSource: Q
|
|
10553
10559
|
}, y), ie), {
|
|
10554
10560
|
paginationProps: j,
|
|
@@ -10719,22 +10725,22 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10719
10725
|
const t = useDataSourceManager(), o = useDataSource(), n = useCollectionManager(), r = e || (o == null ? void 0 : o.key) || void 0, [a, i] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
|
|
10720
10726
|
() => {
|
|
10721
10727
|
var w;
|
|
10722
|
-
return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((
|
|
10728
|
+
return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((L, M) => (L[M.name] = M, L), {});
|
|
10723
10729
|
},
|
|
10724
10730
|
[t, a]
|
|
10725
10731
|
), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, a]), d = useCallback(() => {
|
|
10726
|
-
var w,
|
|
10727
|
-
return (
|
|
10732
|
+
var w, L;
|
|
10733
|
+
return (L = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections().map((M) => M.getOptions());
|
|
10728
10734
|
}, [t, o]), p = useCallback(
|
|
10729
10735
|
(w) => {
|
|
10730
|
-
var
|
|
10731
|
-
return n && !w ? n : (
|
|
10736
|
+
var L;
|
|
10737
|
+
return n && !w ? n : (L = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : L.collectionManager;
|
|
10732
10738
|
},
|
|
10733
10739
|
[n, t, r]
|
|
10734
10740
|
), m = useMemo(
|
|
10735
10741
|
() => {
|
|
10736
|
-
var w,
|
|
10737
|
-
return (
|
|
10742
|
+
var w, L;
|
|
10743
|
+
return (L = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections();
|
|
10738
10744
|
},
|
|
10739
10745
|
[t, a]
|
|
10740
10746
|
), h = useCallback(
|
|
@@ -10748,102 +10754,102 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10748
10754
|
}),
|
|
10749
10755
|
[t]
|
|
10750
10756
|
), f = useCompile(), C = useCallback(
|
|
10751
|
-
(w,
|
|
10757
|
+
(w, L) => {
|
|
10752
10758
|
var M, k;
|
|
10753
|
-
return ((k = (M = p(
|
|
10759
|
+
return ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
|
|
10754
10760
|
},
|
|
10755
10761
|
[t, p]
|
|
10756
10762
|
), b = useCallback(
|
|
10757
|
-
(w,
|
|
10758
|
-
var k,
|
|
10763
|
+
(w, L) => {
|
|
10764
|
+
var k, O;
|
|
10759
10765
|
if (!w)
|
|
10760
10766
|
return [];
|
|
10761
|
-
const M = (k = p(
|
|
10762
|
-
return ((
|
|
10767
|
+
const M = (k = p(L)) == null ? void 0 : k.getCollection(w);
|
|
10768
|
+
return ((O = M == null ? void 0 : M.getAllFields) == null ? void 0 : O.call(M)) || (M == null ? void 0 : M.getFields()) || [];
|
|
10763
10769
|
},
|
|
10764
10770
|
[t, p]
|
|
10765
10771
|
), y = useCallback(
|
|
10766
|
-
(w,
|
|
10772
|
+
(w, L) => {
|
|
10767
10773
|
var M;
|
|
10768
10774
|
if (!(!w || w.split(".").length < 2))
|
|
10769
|
-
return (M = p(
|
|
10775
|
+
return (M = p(L)) == null ? void 0 : M.getCollectionField(w);
|
|
10770
10776
|
},
|
|
10771
10777
|
[t, p]
|
|
10772
10778
|
), S = useCallback(
|
|
10773
|
-
(w,
|
|
10779
|
+
(w, L) => {
|
|
10774
10780
|
var M, k;
|
|
10775
|
-
return w ? ((k = (M = p(
|
|
10781
|
+
return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
|
|
10776
10782
|
},
|
|
10777
10783
|
[t, p]
|
|
10778
10784
|
), v = useCallback(
|
|
10779
|
-
(w,
|
|
10785
|
+
(w, L = !1, M) => {
|
|
10780
10786
|
var q;
|
|
10781
10787
|
if (!w)
|
|
10782
10788
|
return [];
|
|
10783
10789
|
const k = (q = p(M)) == null ? void 0 : q.getCollection(w);
|
|
10784
|
-
return (k == null ? void 0 : k.getChildrenCollections(
|
|
10790
|
+
return (k == null ? void 0 : k.getChildrenCollections(L)) || [];
|
|
10785
10791
|
},
|
|
10786
10792
|
[t, p]
|
|
10787
10793
|
), F = useCallback(
|
|
10788
|
-
(w,
|
|
10794
|
+
(w, L) => {
|
|
10789
10795
|
var M, k;
|
|
10790
|
-
return w ? ((k = (M = p(
|
|
10796
|
+
return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
|
|
10791
10797
|
},
|
|
10792
10798
|
[t, p]
|
|
10793
10799
|
), I = useCallback(
|
|
10794
|
-
(w,
|
|
10800
|
+
(w, L, M, k) => {
|
|
10795
10801
|
var Z;
|
|
10796
10802
|
const {
|
|
10797
|
-
association:
|
|
10803
|
+
association: O = !1,
|
|
10798
10804
|
cached: q = {},
|
|
10799
|
-
collectionNames:
|
|
10800
|
-
maxDepth:
|
|
10805
|
+
collectionNames: V = [w],
|
|
10806
|
+
maxDepth: E = 1,
|
|
10801
10807
|
allowAllTypes: G = !1,
|
|
10802
10808
|
exceptInterfaces: U = [],
|
|
10803
10809
|
prefixFieldValue: H = "",
|
|
10804
10810
|
usePrefix: K = !1,
|
|
10805
|
-
dataSource:
|
|
10811
|
+
dataSource: X
|
|
10806
10812
|
} = k || {};
|
|
10807
|
-
if (
|
|
10813
|
+
if (V.length - 1 > E)
|
|
10808
10814
|
return;
|
|
10809
10815
|
if (q[w])
|
|
10810
10816
|
return _.cloneDeep(q[w]);
|
|
10811
|
-
|
|
10812
|
-
const W = b(w,
|
|
10813
|
-
(Q) => Q.interface && !U.includes(Q.interface) && (G ||
|
|
10817
|
+
L && typeof L == "string" && (L = [L]), M && typeof M == "string" && (M = [M]);
|
|
10818
|
+
const W = b(w, X), J = (Z = W == null ? void 0 : W.filter(
|
|
10819
|
+
(Q) => Q.interface && !U.includes(Q.interface) && (G || L && L.includes(Q.type) || M && M.includes(Q.interface) || (O && Q.target && Q.target !== w && Array.isArray(O) ? O.includes(Q.interface) : !1))
|
|
10814
10820
|
)) == null ? void 0 : Z.map((Q) => {
|
|
10815
10821
|
var oe, re;
|
|
10816
10822
|
const ee = x({
|
|
10817
10823
|
value: K && H ? `${H}.${Q.name}` : Q.name,
|
|
10818
10824
|
label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
|
|
10819
10825
|
}, Q);
|
|
10820
|
-
return
|
|
10826
|
+
return O && Q.target && (ee.children = V.includes(Q.target) ? [] : I(Q.target, L, M, P(x({}, k), {
|
|
10821
10827
|
cached: q,
|
|
10822
|
-
dataSource:
|
|
10823
|
-
collectionNames: [...
|
|
10828
|
+
dataSource: X,
|
|
10829
|
+
collectionNames: [...V, Q.target],
|
|
10824
10830
|
prefixFieldValue: K ? H ? `${H}.${Q.name}` : Q.name : "",
|
|
10825
10831
|
usePrefix: K
|
|
10826
10832
|
})), !((re = ee.children) != null && re.length)) ? null : ee;
|
|
10827
10833
|
}).filter(Boolean);
|
|
10828
|
-
return q[w] =
|
|
10834
|
+
return q[w] = J, J;
|
|
10829
10835
|
},
|
|
10830
10836
|
[b]
|
|
10831
10837
|
), R = useCallback(
|
|
10832
|
-
(w,
|
|
10838
|
+
(w, L) => {
|
|
10833
10839
|
var M;
|
|
10834
|
-
return (M = p(
|
|
10840
|
+
return (M = p(L)) == null ? void 0 : M.getCollection(w);
|
|
10835
10841
|
},
|
|
10836
10842
|
[t, p]
|
|
10837
10843
|
), T = useCallback(
|
|
10838
|
-
(w,
|
|
10844
|
+
(w, L) => {
|
|
10839
10845
|
var M, k;
|
|
10840
|
-
return (k = (M = p(
|
|
10846
|
+
return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
|
|
10841
10847
|
},
|
|
10842
10848
|
[t, p]
|
|
10843
10849
|
), D = useCallback(
|
|
10844
|
-
(w,
|
|
10850
|
+
(w, L) => () => {
|
|
10845
10851
|
var M, k;
|
|
10846
|
-
return (k = (M = p(
|
|
10852
|
+
return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
|
|
10847
10853
|
},
|
|
10848
10854
|
[t, p]
|
|
10849
10855
|
), $ = useCallback(
|
|
@@ -10851,14 +10857,14 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10851
10857
|
[t]
|
|
10852
10858
|
), B = useCallback(
|
|
10853
10859
|
(w) => {
|
|
10854
|
-
var
|
|
10855
|
-
return (
|
|
10860
|
+
var L;
|
|
10861
|
+
return (L = $(w.interface)) == null ? void 0 : L.titleUsable;
|
|
10856
10862
|
},
|
|
10857
10863
|
[$]
|
|
10858
10864
|
), N = useCallback(
|
|
10859
|
-
(w,
|
|
10860
|
-
var k,
|
|
10861
|
-
return (
|
|
10865
|
+
(w, L, M) => {
|
|
10866
|
+
var k, O;
|
|
10867
|
+
return (O = (k = p(M)) == null ? void 0 : k.getCollection(L)) == null ? void 0 : O.getParentCollectionFields(w);
|
|
10862
10868
|
},
|
|
10863
10869
|
[t, p]
|
|
10864
10870
|
), j = useCallback(
|
|
@@ -11088,25 +11094,25 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
|
|
|
11088
11094
|
}, usePopupUtils = (e = {}) => {
|
|
11089
11095
|
const t = useNavigateNoUpdate(), o = useLocationNoUpdate(), n = 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(), y = useCurrentPopupContext(), S = useCallback(
|
|
11090
11096
|
(w) => {
|
|
11091
|
-
var
|
|
11092
|
-
return (
|
|
11097
|
+
var L;
|
|
11098
|
+
return (L = w || (i == null ? void 0 : i.data)) == null ? void 0 : L[c.getSourceKeyByAssociation(u)];
|
|
11093
11099
|
},
|
|
11094
11100
|
[i, u]
|
|
11095
11101
|
), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, R = useCallback(
|
|
11096
11102
|
({
|
|
11097
11103
|
tabKey: w,
|
|
11098
|
-
popupUid:
|
|
11104
|
+
popupUid: L,
|
|
11099
11105
|
recordData: M,
|
|
11100
11106
|
sourceId: k,
|
|
11101
|
-
collection:
|
|
11107
|
+
collection: O,
|
|
11102
11108
|
puid: q
|
|
11103
11109
|
}) => {
|
|
11104
|
-
const
|
|
11110
|
+
const V = c.getFilterByTK(u || l, M);
|
|
11105
11111
|
return getPopupPathFromParams({
|
|
11106
|
-
popupuid:
|
|
11112
|
+
popupuid: L,
|
|
11107
11113
|
puid: q,
|
|
11108
|
-
collection:
|
|
11109
|
-
filterbytk:
|
|
11114
|
+
collection: O,
|
|
11115
|
+
filterbytk: V,
|
|
11110
11116
|
sourceid: k,
|
|
11111
11117
|
tab: w
|
|
11112
11118
|
});
|
|
@@ -11122,34 +11128,34 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
|
|
|
11122
11128
|
}, [r, l, u]), D = useCallback(
|
|
11123
11129
|
({
|
|
11124
11130
|
recordData: w,
|
|
11125
|
-
parentRecordData:
|
|
11131
|
+
parentRecordData: L,
|
|
11126
11132
|
collectionNameUsedInURL: M,
|
|
11127
11133
|
popupUidUsedInURL: k,
|
|
11128
|
-
customActionSchema:
|
|
11134
|
+
customActionSchema: O
|
|
11129
11135
|
} = {}) => {
|
|
11130
11136
|
if (!f())
|
|
11131
11137
|
return I == null ? void 0 : I(!0);
|
|
11132
|
-
const q =
|
|
11138
|
+
const q = O || n, V = q == null ? void 0 : q["x-uid"], E = S(L);
|
|
11133
11139
|
w = w || (a == null ? void 0 : a.data);
|
|
11134
11140
|
const G = R({
|
|
11135
|
-
popupUid:
|
|
11141
|
+
popupUid: V,
|
|
11136
11142
|
recordData: w,
|
|
11137
|
-
sourceId:
|
|
11143
|
+
sourceId: E,
|
|
11138
11144
|
collection: M,
|
|
11139
11145
|
puid: k
|
|
11140
11146
|
});
|
|
11141
11147
|
let U = o.pathname;
|
|
11142
|
-
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(
|
|
11148
|
+
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
|
|
11143
11149
|
schema: q,
|
|
11144
11150
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
11145
|
-
parentRecord:
|
|
11151
|
+
parentRecord: L ? new CollectionRecord({ isNew: !1, data: L }) : i,
|
|
11146
11152
|
service: g(),
|
|
11147
11153
|
dataSource: r,
|
|
11148
11154
|
collection: l == null ? void 0 : l.name,
|
|
11149
11155
|
association: u,
|
|
11150
|
-
sourceId:
|
|
11156
|
+
sourceId: E,
|
|
11151
11157
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
11152
|
-
}), b(T(),
|
|
11158
|
+
}), b(T(), O), q.properties) {
|
|
11153
11159
|
const H = h + 1;
|
|
11154
11160
|
if (getPopupLayerState(H))
|
|
11155
11161
|
return;
|
|
@@ -11192,11 +11198,11 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
11192
11198
|
m == null ? void 0 : m.popupuid
|
|
11193
11199
|
]), B = useCallback(
|
|
11194
11200
|
(w) => {
|
|
11195
|
-
const
|
|
11201
|
+
const L = S(), M = R({
|
|
11196
11202
|
tabKey: w,
|
|
11197
11203
|
popupUid: m == null ? void 0 : m.popupuid,
|
|
11198
11204
|
recordData: a == null ? void 0 : a.data,
|
|
11199
|
-
sourceId:
|
|
11205
|
+
sourceId: L
|
|
11200
11206
|
});
|
|
11201
11207
|
let k = removeLastPopupPath(o.pathname);
|
|
11202
11208
|
_.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${M}`, {
|
|
@@ -11204,8 +11210,8 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
11204
11210
|
});
|
|
11205
11211
|
},
|
|
11206
11212
|
[R, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, o]
|
|
11207
|
-
), N = useCallback((w,
|
|
11208
|
-
|
|
11213
|
+
), N = useCallback((w, L) => {
|
|
11214
|
+
L.__popup = w;
|
|
11209
11215
|
}, []), j = useCallback((w) => w.__popup, []);
|
|
11210
11216
|
return {
|
|
11211
11217
|
/**
|
|
@@ -13915,14 +13921,14 @@ const ParentCollectionProvider = (e) => {
|
|
|
13915
13921
|
targetFieldSchema: a,
|
|
13916
13922
|
record: i
|
|
13917
13923
|
}) => {
|
|
13918
|
-
var
|
|
13919
|
-
const l = useApp(), c = ((
|
|
13920
|
-
const { visible:
|
|
13924
|
+
var O, q;
|
|
13925
|
+
const l = useApp(), c = ((O = l == null ? void 0 : l.getVariables) == null ? void 0 : O.call(l).map((V) => {
|
|
13926
|
+
const { visible: E = !0, option: G } = V.useOption();
|
|
13921
13927
|
return {
|
|
13922
|
-
visible:
|
|
13928
|
+
visible: E,
|
|
13923
13929
|
option: G
|
|
13924
13930
|
};
|
|
13925
|
-
}).filter(({ visible:
|
|
13931
|
+
}).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (q = i == null ? void 0 : i.__parent) == null ? void 0 : q.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
|
|
13926
13932
|
maxDepth: 3,
|
|
13927
13933
|
uiSchema: o,
|
|
13928
13934
|
collectionField: e,
|
|
@@ -13975,7 +13981,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13975
13981
|
collectionField: e,
|
|
13976
13982
|
noDisabled: r,
|
|
13977
13983
|
targetFieldSchema: a
|
|
13978
|
-
}), { urlSearchParamsSettings:
|
|
13984
|
+
}), { urlSearchParamsSettings: L, shouldDisplay: M } = useURLSearchParamsVariable();
|
|
13979
13985
|
return [...useMemo(() => [
|
|
13980
13986
|
p,
|
|
13981
13987
|
m,
|
|
@@ -13989,7 +13995,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13989
13995
|
w && j,
|
|
13990
13996
|
$ && D,
|
|
13991
13997
|
N && B,
|
|
13992
|
-
M &&
|
|
13998
|
+
M && L
|
|
13993
13999
|
].filter(Boolean).filter(u), [
|
|
13994
14000
|
p,
|
|
13995
14001
|
m,
|
|
@@ -14008,8 +14014,8 @@ const ParentCollectionProvider = (e) => {
|
|
|
14008
14014
|
$,
|
|
14009
14015
|
D,
|
|
14010
14016
|
M,
|
|
14011
|
-
|
|
14012
|
-
]), ...c.map(({ option:
|
|
14017
|
+
L
|
|
14018
|
+
]), ...c.map(({ option: V }) => V)];
|
|
14013
14019
|
}, VariableInput = (e) => {
|
|
14014
14020
|
const {
|
|
14015
14021
|
value: t,
|
|
@@ -14393,29 +14399,29 @@ const getActionContext = (e) => {
|
|
|
14393
14399
|
var o;
|
|
14394
14400
|
return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
|
|
14395
14401
|
}, SchemaSettingsDefaultValue = function(t) {
|
|
14396
|
-
var
|
|
14397
|
-
const o = useFieldSchema(), n = (
|
|
14402
|
+
var O, q, V;
|
|
14403
|
+
const o = useFieldSchema(), n = (O = t == null ? void 0 : t.fieldSchema) != null ? O : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
14398
14404
|
let u;
|
|
14399
14405
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: y, type: S } = useFormBlockContext(), { getFields: v } = useCollectionFilterOptionsV2(C), { isInSubForm: F, isInSubTable: I } = useFlag() || {}, { name: R } = C, T = useMemo(
|
|
14400
14406
|
() => d(n.name) || p(n["x-collection-field"]),
|
|
14401
14407
|
[n, p, d]
|
|
14402
14408
|
), D = _.omit(n, "required");
|
|
14403
14409
|
T != null && T.target && (u = p(
|
|
14404
|
-
`${T.target}.${((
|
|
14410
|
+
`${T.target}.${((V = (q = n["x-component-props"]) == null ? void 0 : q.fieldNames) == null ? void 0 : V.label) || "id"}`
|
|
14405
14411
|
));
|
|
14406
14412
|
const $ = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = $ && p($ == null ? void 0 : $["x-collection-field"]), N = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (B == null ? void 0 : B.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", w = useCallback(
|
|
14407
|
-
(
|
|
14408
|
-
const G =
|
|
14409
|
-
return !(U != null && U.length) && G && (G.children = formatVariableScop(v())),
|
|
14413
|
+
(E) => {
|
|
14414
|
+
const G = E.find((H) => H.value === "$nForm"), U = m(R);
|
|
14415
|
+
return !(U != null && U.length) && G && (G.children = formatVariableScop(v())), E;
|
|
14410
14416
|
},
|
|
14411
14417
|
[v, R]
|
|
14412
|
-
),
|
|
14418
|
+
), L = useMemo(() => ({
|
|
14413
14419
|
ArrayCollapse: ArrayCollapse$2,
|
|
14414
14420
|
FormLayout,
|
|
14415
|
-
VariableInput: (
|
|
14421
|
+
VariableInput: (E) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
|
|
14416
14422
|
VariableInput,
|
|
14417
|
-
P(x({},
|
|
14418
|
-
value:
|
|
14423
|
+
P(x({}, E), {
|
|
14424
|
+
value: E.value || void 0,
|
|
14419
14425
|
hideVariableButton: t == null ? void 0 : t.hideVariableButton
|
|
14420
14426
|
})
|
|
14421
14427
|
) })
|
|
@@ -14485,12 +14491,12 @@ const getActionContext = (e) => {
|
|
|
14485
14491
|
u,
|
|
14486
14492
|
g
|
|
14487
14493
|
]), k = useCallback(
|
|
14488
|
-
(
|
|
14494
|
+
(E) => {
|
|
14489
14495
|
var U, H, K;
|
|
14490
14496
|
const G = {
|
|
14491
14497
|
"x-uid": n["x-uid"]
|
|
14492
14498
|
};
|
|
14493
|
-
n.default = (U =
|
|
14499
|
+
n.default = (U = E.default) != null ? U : null, isVariable$1(E.default) || (b.__isNewRecord__ || S === "create") && ((H = r.setInitialValue) == null || H.call(r, E.default)), G.default = (K = E.default) != null ? K : null, a.emit("patch", {
|
|
14494
14500
|
schema: G,
|
|
14495
14501
|
currentSchema: o
|
|
14496
14502
|
});
|
|
@@ -14501,18 +14507,18 @@ const getActionContext = (e) => {
|
|
|
14501
14507
|
SchemaSettingsModalItem,
|
|
14502
14508
|
{
|
|
14503
14509
|
title: i("Set default value"),
|
|
14504
|
-
components:
|
|
14510
|
+
components: L,
|
|
14505
14511
|
width: 800,
|
|
14506
14512
|
schema: M,
|
|
14507
14513
|
onSubmit: k,
|
|
14508
|
-
ModalContextProvider: (
|
|
14514
|
+
ModalContextProvider: (E) => /* @__PURE__ */ jsx(
|
|
14509
14515
|
FlagProvider,
|
|
14510
14516
|
{
|
|
14511
14517
|
isInSubForm: F,
|
|
14512
14518
|
isInSubTable: I,
|
|
14513
14519
|
isInSetDefaultValueDialog: !0,
|
|
14514
14520
|
collectionField: T,
|
|
14515
|
-
children:
|
|
14521
|
+
children: E.children
|
|
14516
14522
|
}
|
|
14517
14523
|
)
|
|
14518
14524
|
}
|
|
@@ -14778,7 +14784,7 @@ const useFilterableFields = (e) => {
|
|
|
14778
14784
|
}, zIndexContext = React.createContext(100), useZIndexContext = () => React.useContext(zIndexContext), getZIndex = (e, t, o) => {
|
|
14779
14785
|
let n = t;
|
|
14780
14786
|
return e === "page" && !window.location.pathname.includes("/embed/") ? (n = t + o, n > 200 ? n - 200 : n) : (n = t + o, n < 200 ? n + 200 : n);
|
|
14781
|
-
}, StablePopover = (e) => {
|
|
14787
|
+
}, ICON_POPUP_Z_INDEX = 2e3, StablePopover = (e) => {
|
|
14782
14788
|
const t = useZIndexContext(), o = getZIndex("drawer", t, 1), n = useRef(null), r = useCallback((i) => {
|
|
14783
14789
|
n.current = i.target;
|
|
14784
14790
|
}, []), a = useCallback(
|
|
@@ -15374,10 +15380,10 @@ const useGetFilterOptions = () => {
|
|
|
15374
15380
|
};
|
|
15375
15381
|
});
|
|
15376
15382
|
}, TableColumnDesigner$1 = (e) => {
|
|
15377
|
-
var B, N, j, w,
|
|
15383
|
+
var B, N, j, w, L, M, k, O, q, V, E, G;
|
|
15378
15384
|
const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((j = n == null ? void 0 : n.target) != null ? j : n == null ? void 0 : n.targetCollection), h = useColorFields((w = n == null ? void 0 : n.target) != null ? w : n == null ? void 0 : n.targetCollection), g = a(n == null ? void 0 : n.interface), f = i(n == null ? void 0 : n.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: y } = useAssociationFieldContext(), { isAllowToSetDefaultValue: S } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
15379
15385
|
n == null ? void 0 : n.interface
|
|
15380
|
-
), I = useFieldModeOptions({ fieldSchema: o }), R = ((
|
|
15386
|
+
), I = useFieldModeOptions({ fieldSchema: o }), R = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.mode) || "Select";
|
|
15381
15387
|
let T = "editable";
|
|
15382
15388
|
o["x-disabled"] === !0 && (T = "readonly"), o["x-read-pretty"] === !0 && (T = "read-pretty");
|
|
15383
15389
|
const D = F && R === "Select", $ = () => {
|
|
@@ -15417,12 +15423,12 @@ const useGetFilterOptions = () => {
|
|
|
15417
15423
|
SchemaSettingsDataScope,
|
|
15418
15424
|
{
|
|
15419
15425
|
collectionName: n == null ? void 0 : n.target,
|
|
15420
|
-
defaultFilter: ((q = (
|
|
15426
|
+
defaultFilter: ((q = (O = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : O.params) == null ? void 0 : q.filter) || {},
|
|
15421
15427
|
form: r,
|
|
15422
15428
|
onSubmit: ({ filter: U }) => {
|
|
15423
|
-
var K,
|
|
15429
|
+
var K, X;
|
|
15424
15430
|
U = removeNullCondition(U), set(l.componentProps, "service.params.filter", U), o["x-component-props"] = l.componentProps;
|
|
15425
|
-
const H = (
|
|
15431
|
+
const H = (X = l.path) == null ? void 0 : X.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
15426
15432
|
l.form.query(`${H.concat("*." + o.name)}`).forEach((W) => {
|
|
15427
15433
|
W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.filter = U;
|
|
15428
15434
|
}), d.emit("patch", {
|
|
@@ -15443,7 +15449,7 @@ const useGetFilterOptions = () => {
|
|
|
15443
15449
|
title: c("Column width"),
|
|
15444
15450
|
properties: {
|
|
15445
15451
|
width: {
|
|
15446
|
-
default: ((
|
|
15452
|
+
default: ((V = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : V.width) || 100,
|
|
15447
15453
|
"x-decorator": "FormItem",
|
|
15448
15454
|
"x-component": "InputNumber",
|
|
15449
15455
|
"x-component-props": {}
|
|
@@ -15486,7 +15492,7 @@ const useGetFilterOptions = () => {
|
|
|
15486
15492
|
SchemaSettingsSwitchItem,
|
|
15487
15493
|
{
|
|
15488
15494
|
title: c("Enable link"),
|
|
15489
|
-
checked: ((
|
|
15495
|
+
checked: ((E = o["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
|
|
15490
15496
|
onChange: (U) => {
|
|
15491
15497
|
o["x-component-props"] = P(x({}, o == null ? void 0 : o["x-component-props"]), {
|
|
15492
15498
|
enableLink: U
|
|
@@ -15508,8 +15514,8 @@ const useGetFilterOptions = () => {
|
|
|
15508
15514
|
options: m,
|
|
15509
15515
|
value: p == null ? void 0 : p.label,
|
|
15510
15516
|
onChange: (U) => {
|
|
15511
|
-
var
|
|
15512
|
-
const H = P(x(x({}, (W = (
|
|
15517
|
+
var X, W, J, Z, Q;
|
|
15518
|
+
const H = P(x(x({}, (W = (X = n == null ? void 0 : n.uiSchema) == null ? void 0 : X["x-component-props"]) == null ? void 0 : W.fieldNames), (J = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : J.fieldNames), {
|
|
15513
15519
|
label: U
|
|
15514
15520
|
});
|
|
15515
15521
|
_.set(o, "x-component-props.fieldNames", H);
|
|
@@ -15569,14 +15575,14 @@ const useGetFilterOptions = () => {
|
|
|
15569
15575
|
title: c("Required"),
|
|
15570
15576
|
checked: o.required,
|
|
15571
15577
|
onChange: (U) => {
|
|
15572
|
-
var
|
|
15578
|
+
var X, W;
|
|
15573
15579
|
const H = {
|
|
15574
15580
|
"x-uid": o["x-uid"]
|
|
15575
15581
|
};
|
|
15576
15582
|
o.required = U, H.required = U;
|
|
15577
|
-
const K = (W = l.path) == null ? void 0 : W.splice(((
|
|
15578
|
-
l.form.query(`${K.concat("*." + o.name)}`).forEach((
|
|
15579
|
-
|
|
15583
|
+
const K = (W = l.path) == null ? void 0 : W.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
|
|
15584
|
+
l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
|
|
15585
|
+
J.required = U;
|
|
15580
15586
|
}), d.emit("patch", {
|
|
15581
15587
|
schema: H
|
|
15582
15588
|
}), d.refresh();
|
|
@@ -15595,26 +15601,26 @@ const useGetFilterOptions = () => {
|
|
|
15595
15601
|
],
|
|
15596
15602
|
value: T,
|
|
15597
15603
|
onChange: (U) => {
|
|
15598
|
-
var
|
|
15604
|
+
var X, W;
|
|
15599
15605
|
const H = {
|
|
15600
15606
|
"x-uid": o["x-uid"]
|
|
15601
|
-
}, K = (W = l.path) == null ? void 0 : W.splice(((
|
|
15607
|
+
}, K = (W = l.path) == null ? void 0 : W.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
|
|
15602
15608
|
switch (U) {
|
|
15603
15609
|
case "readonly": {
|
|
15604
|
-
o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${K.concat("*." + o.name)}`).forEach((
|
|
15605
|
-
|
|
15610
|
+
o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
|
|
15611
|
+
J.readonly = !0, J.disabled = !0;
|
|
15606
15612
|
});
|
|
15607
15613
|
break;
|
|
15608
15614
|
}
|
|
15609
15615
|
case "read-pretty": {
|
|
15610
|
-
o["x-read-pretty"] = !0, o["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((
|
|
15611
|
-
|
|
15616
|
+
o["x-read-pretty"] = !0, o["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
|
|
15617
|
+
J.readPretty = !0;
|
|
15612
15618
|
});
|
|
15613
15619
|
break;
|
|
15614
15620
|
}
|
|
15615
15621
|
default: {
|
|
15616
|
-
o["x-read-pretty"] = !1, o["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((
|
|
15617
|
-
|
|
15622
|
+
o["x-read-pretty"] = !1, o["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
|
|
15623
|
+
J.readPretty = !1, J.disabled + !1;
|
|
15618
15624
|
});
|
|
15619
15625
|
break;
|
|
15620
15626
|
}
|
|
@@ -15632,8 +15638,8 @@ const useGetFilterOptions = () => {
|
|
|
15632
15638
|
{
|
|
15633
15639
|
fieldSchema: o,
|
|
15634
15640
|
onSubmitCallBack: (U) => {
|
|
15635
|
-
var K,
|
|
15636
|
-
const H = (
|
|
15641
|
+
var K, X;
|
|
15642
|
+
const H = (X = l.path) == null ? void 0 : X.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
15637
15643
|
l.form.query(`${H.concat("*." + o.name)}`).forEach((W) => {
|
|
15638
15644
|
W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.sort = U;
|
|
15639
15645
|
});
|
|
@@ -18009,7 +18015,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18009
18015
|
}
|
|
18010
18016
|
) })) : null;
|
|
18011
18017
|
}, InternalSchemaToolbar = React.memo((e) => {
|
|
18012
|
-
var
|
|
18018
|
+
var X;
|
|
18013
18019
|
const t = useFieldSchema(), {
|
|
18014
18020
|
title: o,
|
|
18015
18021
|
initializer: n,
|
|
@@ -18036,38 +18042,38 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18036
18042
|
}, [o, t]), { render: j, exists: w } = useSchemaSettingsRender(
|
|
18037
18043
|
r || (t == null ? void 0 : t["x-settings"]),
|
|
18038
18044
|
t == null ? void 0 : t["x-settings-props"]
|
|
18039
|
-
), { render:
|
|
18045
|
+
), { render: L, exists: M } = useSchemaInitializerRender(
|
|
18040
18046
|
n || (t == null ? void 0 : t["x-initializer"]),
|
|
18041
18047
|
t == null ? void 0 : t["x-initializer-props"]
|
|
18042
|
-
), k = useGridRowContext(),
|
|
18048
|
+
), k = useGridRowContext(), O = useGridContext(), q = useMemo(() => {
|
|
18043
18049
|
var W;
|
|
18044
18050
|
return {
|
|
18045
18051
|
insertPosition: "afterEnd",
|
|
18046
18052
|
wrap: ((W = k == null ? void 0 : k.cols) == null ? void 0 : W.length) === 1 ? gridRowColWrap : void 0,
|
|
18047
|
-
Component: (
|
|
18053
|
+
Component: (J) => /* @__PURE__ */ jsx(
|
|
18048
18054
|
PlusOutlined,
|
|
18049
|
-
P(x({},
|
|
18055
|
+
P(x({}, J), {
|
|
18050
18056
|
role: "button",
|
|
18051
18057
|
"aria-label": v("schema-initializer"),
|
|
18052
18058
|
style: { cursor: "pointer", fontSize: 14 }
|
|
18053
18059
|
})
|
|
18054
18060
|
)
|
|
18055
18061
|
};
|
|
18056
|
-
}, [v, (
|
|
18062
|
+
}, [v, (X = k == null ? void 0 : k.cols) == null ? void 0 : X.length]), V = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), E = useMemo(() => {
|
|
18057
18063
|
var W;
|
|
18058
18064
|
if (n === !1)
|
|
18059
18065
|
return null;
|
|
18060
18066
|
if (M)
|
|
18061
|
-
return
|
|
18062
|
-
if (
|
|
18063
|
-
return
|
|
18064
|
-
}, [
|
|
18067
|
+
return L(q);
|
|
18068
|
+
if (O != null && O.InitializerComponent || O != null && O.renderSchemaInitializer)
|
|
18069
|
+
return O != null && O.InitializerComponent ? /* @__PURE__ */ jsx(O.InitializerComponent, x({}, q)) : (W = O.renderSchemaInitializer) == null ? void 0 : W.call(O, q);
|
|
18070
|
+
}, [O, n, q, M, L]), G = useMemo(() => r !== !1 && w ? j() : null, [w, j, r]), U = useRef(null), H = "hidden";
|
|
18065
18071
|
useEffect(() => {
|
|
18066
18072
|
const W = U.current;
|
|
18067
|
-
let
|
|
18068
|
-
for (;
|
|
18069
|
-
|
|
18070
|
-
const Z = g ||
|
|
18073
|
+
let J = W == null ? void 0 : W.parentElement;
|
|
18074
|
+
for (; J && J.clientHeight === 0; )
|
|
18075
|
+
J = J.parentElement;
|
|
18076
|
+
const Z = g || J;
|
|
18071
18077
|
if (!Z)
|
|
18072
18078
|
return;
|
|
18073
18079
|
function Q() {
|
|
@@ -18101,8 +18107,8 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18101
18107
|
N[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${$.current}: ${`${N[1]}` || S("Untitled")}` })
|
|
18102
18108
|
] }) }),
|
|
18103
18109
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18104
|
-
|
|
18105
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: B, children:
|
|
18110
|
+
V,
|
|
18111
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: B, children: E }),
|
|
18106
18112
|
G
|
|
18107
18113
|
] }) })
|
|
18108
18114
|
]
|
|
@@ -18482,8 +18488,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
18482
18488
|
}), [v, F] = useState([0, 0]);
|
|
18483
18489
|
return useDndMonitor({
|
|
18484
18490
|
onDragStart(D) {
|
|
18485
|
-
var w,
|
|
18486
|
-
const $ = (M = (
|
|
18491
|
+
var w, L, M;
|
|
18492
|
+
const $ = (M = (L = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : L.current) == null ? void 0 : M.dividerRef;
|
|
18487
18493
|
if (!$ || !r)
|
|
18488
18494
|
return;
|
|
18489
18495
|
o.current = D.active.id;
|
|
@@ -18503,8 +18509,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
18503
18509
|
return;
|
|
18504
18510
|
const $ = l.current, B = $.previousElementSibling, N = $.nextElementSibling;
|
|
18505
18511
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
18506
|
-
const j = $.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (B.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2),
|
|
18507
|
-
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width",
|
|
18512
|
+
const j = $.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (B.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2), L = (100 * (N.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2);
|
|
18513
|
+
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", L), n.emit("batchPatch", {
|
|
18508
18514
|
schemas: [
|
|
18509
18515
|
{
|
|
18510
18516
|
"x-uid": h["x-uid"],
|
|
@@ -18818,8 +18824,8 @@ const useTableBlockProps = () => {
|
|
|
18818
18824
|
),
|
|
18819
18825
|
onChange: useCallback(
|
|
18820
18826
|
({ current: y, pageSize: S }, v, F) => {
|
|
18821
|
-
var $, B, N, j, w,
|
|
18822
|
-
const I = (N = (B = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : B.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, T = S || ((
|
|
18827
|
+
var $, B, N, j, w, L, M, k, O, q;
|
|
18828
|
+
const I = (N = (B = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : B.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, T = S || ((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({}, (O = (k = (M = i.current) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : O[0]), { page: y || 1, pageSize: T });
|
|
18823
18829
|
R && (D.sort = R), (q = i.current) == null || q.service.run(D);
|
|
18824
18830
|
},
|
|
18825
18831
|
[t.parent]
|
|
@@ -18833,11 +18839,11 @@ const useTableBlockProps = () => {
|
|
|
18833
18839
|
}
|
|
18834
18840
|
const T = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
18835
18841
|
R.forEach((D) => {
|
|
18836
|
-
var M, k,
|
|
18837
|
-
const $ = F.find((
|
|
18842
|
+
var M, k, O, q;
|
|
18843
|
+
const $ = F.find((V) => V.uid === D.uid);
|
|
18838
18844
|
if (!$)
|
|
18839
18845
|
return;
|
|
18840
|
-
const B = getSourceKey(T, $.field) || a.rowKey || "id", N = [y[B]], j = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((
|
|
18846
|
+
const B = getSourceKey(T, $.field) || a.rowKey || "id", N = [y[B]], j = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((O = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : O.filters) || {};
|
|
18841
18847
|
if (v.includes(y[a.rowKey])) {
|
|
18842
18848
|
if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
|
|
18843
18849
|
return D.clearData();
|
|
@@ -18852,14 +18858,14 @@ const useTableBlockProps = () => {
|
|
|
18852
18858
|
}
|
|
18853
18859
|
]
|
|
18854
18860
|
};
|
|
18855
|
-
const
|
|
18856
|
-
...Object.values(w).map((
|
|
18861
|
+
const L = mergeFilter([
|
|
18862
|
+
...Object.values(w).map((V) => removeNullCondition(V)),
|
|
18857
18863
|
D.defaultFilter
|
|
18858
18864
|
]);
|
|
18859
18865
|
return D.doFilter(
|
|
18860
18866
|
P(x({}, j), {
|
|
18861
18867
|
page: 1,
|
|
18862
|
-
filter:
|
|
18868
|
+
filter: L
|
|
18863
18869
|
}),
|
|
18864
18870
|
{ filters: w }
|
|
18865
18871
|
);
|
|
@@ -19216,10 +19222,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19216
19222
|
var i, l, c, u, d, p, m, h, g, f, C, b, y, S, v, F;
|
|
19217
19223
|
const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent(o, "CollectionField"), a = n(r == null ? void 0 : r["x-collection-field"]);
|
|
19218
19224
|
return useEffect(() => {
|
|
19219
|
-
var R, T, D, $, B, N, j, w,
|
|
19225
|
+
var R, T, D, $, B, N, j, w, L, M, k, O, q;
|
|
19220
19226
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
19221
|
-
const
|
|
19222
|
-
e.value =
|
|
19227
|
+
const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
|
|
19228
|
+
e.value = V, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (N = (B = t == null ? void 0 : t.service) == null ? void 0 : B.data) == null ? void 0 : N.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (M = (L = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : L.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (q = (O = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : O.meta) == null ? void 0 : q.page;
|
|
19223
19229
|
}
|
|
19224
19230
|
}, [
|
|
19225
19231
|
a == null ? void 0 : a.foreignKey,
|
|
@@ -19771,7 +19777,28 @@ const CollectionTitle = (e) => {
|
|
|
19771
19777
|
/* @__PURE__ */ jsx(PageHeader, { style: { backgroundColor: "white" }, ghost: !1, title: e("Block templates") }),
|
|
19772
19778
|
/* @__PURE__ */ jsx("div", { style: { margin: "var(--nb-spacing)" }, children: /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }) })
|
|
19773
19779
|
] });
|
|
19774
|
-
}, BlockTemplatesPane = () => /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }),
|
|
19780
|
+
}, BlockTemplatesPane = () => /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }), VariableScopeContext$1 = createContext({
|
|
19781
|
+
scopeId: "",
|
|
19782
|
+
type: ""
|
|
19783
|
+
}), VariableScope = (e) => {
|
|
19784
|
+
const t = React.useContext(VariableScopeContext$1), o = useMemo(() => ({
|
|
19785
|
+
scopeId: e.scopeId,
|
|
19786
|
+
type: e.type,
|
|
19787
|
+
parent: t
|
|
19788
|
+
}), [e.scopeId, e.type, t]);
|
|
19789
|
+
return /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: o, children: e.children });
|
|
19790
|
+
}, useVariableScopeInfo = () => {
|
|
19791
|
+
let e = React.useContext(VariableScopeContext$1);
|
|
19792
|
+
return {
|
|
19793
|
+
getVariableScopeInfo: useCallback(() => {
|
|
19794
|
+
if (e.scopeId)
|
|
19795
|
+
return e;
|
|
19796
|
+
for (; e.parent && !e.scopeId; )
|
|
19797
|
+
e = e.parent;
|
|
19798
|
+
return e;
|
|
19799
|
+
}, [e])
|
|
19800
|
+
};
|
|
19801
|
+
}, useSystemSettingsVariable = () => {
|
|
19775
19802
|
const { t: e } = useTranslation();
|
|
19776
19803
|
return {
|
|
19777
19804
|
/** 变量的配置项 */
|
|
@@ -21575,27 +21602,6 @@ const transformDefaultValue = (e, t) => e.map((o) => {
|
|
|
21575
21602
|
h && p.push(h);
|
|
21576
21603
|
}), p;
|
|
21577
21604
|
})(r, 1);
|
|
21578
|
-
}, VariableScopeContext$1 = createContext({
|
|
21579
|
-
scopeId: "",
|
|
21580
|
-
type: ""
|
|
21581
|
-
}), VariableScope = (e) => {
|
|
21582
|
-
const t = React.useContext(VariableScopeContext$1), o = useMemo(() => ({
|
|
21583
|
-
scopeId: e.scopeId,
|
|
21584
|
-
type: e.type,
|
|
21585
|
-
parent: t
|
|
21586
|
-
}), [e.scopeId, e.type, t]);
|
|
21587
|
-
return /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: o, children: e.children });
|
|
21588
|
-
}, useVariableScopeInfo = () => {
|
|
21589
|
-
let e = React.useContext(VariableScopeContext$1);
|
|
21590
|
-
return {
|
|
21591
|
-
getVariableScopeInfo: useCallback(() => {
|
|
21592
|
-
if (e.scopeId)
|
|
21593
|
-
return e;
|
|
21594
|
-
for (; e.parent && !e.scopeId; )
|
|
21595
|
-
e = e.parent;
|
|
21596
|
-
return e;
|
|
21597
|
-
}, [e])
|
|
21598
|
-
};
|
|
21599
21605
|
}, SchemaSettingsContext = createContext(null);
|
|
21600
21606
|
SchemaSettingsContext.displayName = "SchemaSettingsContext";
|
|
21601
21607
|
function useSchemaSettings() {
|
|
@@ -21938,14 +21944,14 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21938
21944
|
}, [D]), B = useCallback(() => z(void 0, null, function* () {
|
|
21939
21945
|
yield D.submit();
|
|
21940
21946
|
try {
|
|
21941
|
-
const
|
|
21947
|
+
const L = D.values, M = Object.keys(L).reduce((k, O) => (D.query(O).take() && (k[O] = L[O]), k), {});
|
|
21942
21948
|
h(!1), yield o == null ? void 0 : o(cloneDeep$1(M));
|
|
21943
|
-
} catch (
|
|
21944
|
-
console.error(
|
|
21949
|
+
} catch (L) {
|
|
21950
|
+
console.error(L);
|
|
21945
21951
|
}
|
|
21946
21952
|
}), [D, o]), N = useCallback(() => z(void 0, null, function* () {
|
|
21947
21953
|
!g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], S.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), y.setVisible(!1), h(!0);
|
|
21948
|
-
}), [F, y, S, b, i, g]), j = useCallback((
|
|
21954
|
+
}), [F, y, S, b, i, g]), j = useCallback((L) => L.stopPropagation(), []);
|
|
21949
21955
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
|
|
21950
21956
|
/* @__PURE__ */ jsx(
|
|
21951
21957
|
SchemaSettingsItem,
|
|
@@ -22012,17 +22018,17 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22012
22018
|
"noRecord",
|
|
22013
22019
|
"ModalContextProvider",
|
|
22014
22020
|
"dialogRootClassName"
|
|
22015
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: y } = useGlobalTheme(), S = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, $ = useCurrentRecord(), B = useFormBlockContext(), N = useBlockContext(), { getOperators: j } = useOperators(), w = useLocationSearch(),
|
|
22021
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: y } = useGlobalTheme(), S = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, $ = useCurrentRecord(), B = useFormBlockContext(), N = useBlockContext(), { getOperators: j } = useOperators(), w = useLocationSearch(), L = useVariables$1(), M = useContext(AllDataBlocksContext), k = useContext(SchemaComponentContext), O = useContext(VariableScopeContext$1), { formValue: q, collection: V, parent: E } = useSubFormValue(), G = useCurrentPopupRecord(), U = useParentPopupRecord();
|
|
22016
22022
|
return t ? null : /* @__PURE__ */ jsx(
|
|
22017
22023
|
SchemaSettingsItem,
|
|
22018
22024
|
P(x({
|
|
22019
22025
|
title: o
|
|
22020
22026
|
}, h), {
|
|
22021
22027
|
onClick: () => z(void 0, null, function* () {
|
|
22022
|
-
const K = l ? yield l() : c,
|
|
22028
|
+
const K = l ? yield l() : c, X = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
22023
22029
|
FormDialog(
|
|
22024
|
-
{ title:
|
|
22025
|
-
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value:
|
|
22030
|
+
{ title: X.title || o, width: u, rootClassName: m },
|
|
22031
|
+
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: k, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: M, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: L, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: N, children: /* @__PURE__ */ jsx(
|
|
22026
22032
|
VariablePopupRecordProvider,
|
|
22027
22033
|
{
|
|
22028
22034
|
recordData: G == null ? void 0 : G.value,
|
|
@@ -22034,7 +22040,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22034
22040
|
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : T, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, $), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: B, children: /* @__PURE__ */ jsx(
|
|
22035
22041
|
SubFormProvider,
|
|
22036
22042
|
{
|
|
22037
|
-
value: { value: q, collection:
|
|
22043
|
+
value: { value: q, collection: V, parent: E },
|
|
22038
22044
|
children: /* @__PURE__ */ jsx(
|
|
22039
22045
|
FormActiveFieldsProvider,
|
|
22040
22046
|
{
|
|
@@ -22071,14 +22077,14 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22071
22077
|
min-width: 320px;
|
|
22072
22078
|
}
|
|
22073
22079
|
`,
|
|
22074
|
-
children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: C, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: F, children: /* @__PURE__ */ jsx(
|
|
22080
|
+
children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: C, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: F, children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
|
|
22075
22081
|
SchemaComponent,
|
|
22076
22082
|
{
|
|
22077
22083
|
components: n,
|
|
22078
22084
|
scope: r,
|
|
22079
|
-
schema:
|
|
22085
|
+
schema: X
|
|
22080
22086
|
}
|
|
22081
|
-
) }) }) })
|
|
22087
|
+
) }) }) }) })
|
|
22082
22088
|
}
|
|
22083
22089
|
)
|
|
22084
22090
|
}
|
|
@@ -22233,12 +22239,12 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22233
22239
|
}),
|
|
22234
22240
|
[o, c, u, S, g, f, p, h, T, r]
|
|
22235
22241
|
), N = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), j = useCallback(
|
|
22236
|
-
(
|
|
22237
|
-
var
|
|
22242
|
+
(L) => {
|
|
22243
|
+
var V;
|
|
22238
22244
|
const M = [];
|
|
22239
|
-
for (const
|
|
22240
|
-
M.push(_.omit(_.pickBy(
|
|
22241
|
-
const k = S["x-component"] === "BlockTemplate" && ((
|
|
22245
|
+
for (const E of L.fieldReaction.rules)
|
|
22246
|
+
M.push(_.omit(_.pickBy(E, _.identity), ["conditionBasic", "conditionAdvanced"]));
|
|
22247
|
+
const k = S["x-component"] === "BlockTemplate" && ((V = S["x-component-props"]) == null ? void 0 : V.templateId), q = {
|
|
22242
22248
|
"x-uid": b !== LinkageRuleCategory.block ? k && m(k).uid || S["x-uid"] : c["x-uid"]
|
|
22243
22249
|
};
|
|
22244
22250
|
S[R] = M, q[R] = M, c[R] = M, d.emit("patch", {
|
|
@@ -22255,7 +22261,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22255
22261
|
width: 960,
|
|
22256
22262
|
schema: B,
|
|
22257
22263
|
onSubmit: j,
|
|
22258
|
-
ModalContextProvider: (
|
|
22264
|
+
ModalContextProvider: (L) => /* @__PURE__ */ jsx(FlagProvider, P(x({}, $), { children: L.children }))
|
|
22259
22265
|
}
|
|
22260
22266
|
);
|
|
22261
22267
|
}, useDataTemplates = (e) => {
|
|
@@ -23355,8 +23361,8 @@ function getTypedConstantOption(e, t, o) {
|
|
|
23355
23361
|
};
|
|
23356
23362
|
}
|
|
23357
23363
|
function Input$1(e) {
|
|
23358
|
-
var W,
|
|
23359
|
-
const
|
|
23364
|
+
var W, J, Z;
|
|
23365
|
+
const X = e, {
|
|
23360
23366
|
value: t = "",
|
|
23361
23367
|
onChange: o,
|
|
23362
23368
|
children: n,
|
|
@@ -23370,7 +23376,7 @@ function Input$1(e) {
|
|
|
23370
23376
|
parseOptions: p,
|
|
23371
23377
|
hideVariableButton: m,
|
|
23372
23378
|
constantAbel: h = !0
|
|
23373
|
-
} =
|
|
23379
|
+
} = X, g = Y(X, [
|
|
23374
23380
|
"value",
|
|
23375
23381
|
"onChange",
|
|
23376
23382
|
"children",
|
|
@@ -23388,22 +23394,22 @@ function Input$1(e) {
|
|
|
23388
23394
|
useAntdInputStyle(`${S}-input`);
|
|
23389
23395
|
const v = useCompile(), { t: F } = useTranslation(), I = useForm(), [R, T] = React.useState([]), [D, $] = React.useState([]), [B, N] = React.useState(
|
|
23390
23396
|
m || !!(n && t != null)
|
|
23391
|
-
), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string",
|
|
23397
|
+
), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string", L = w ? j : "", M = w ? null : j, k = Object.assign(
|
|
23392
23398
|
{
|
|
23393
23399
|
label: "label",
|
|
23394
23400
|
value: "value",
|
|
23395
23401
|
children: "children"
|
|
23396
23402
|
},
|
|
23397
23403
|
d != null ? d : {}
|
|
23398
|
-
),
|
|
23404
|
+
), O = useMemo(() => h ? n ? {
|
|
23399
23405
|
value: "$",
|
|
23400
23406
|
label: F("Constant"),
|
|
23401
23407
|
[k.value]: "$",
|
|
23402
23408
|
[k.label]: F("Constant")
|
|
23403
|
-
} : a ? getTypedConstantOption(
|
|
23404
|
-
let
|
|
23405
|
-
t == null ? i ? n && B ?
|
|
23406
|
-
const re =
|
|
23409
|
+
} : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), q = (W = O == null ? void 0 : O.component) != null ? W : NullComponent, V = Array.isArray(a) ? (Z = (J = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : J[1]) != null ? Z : {} : {};
|
|
23410
|
+
let E;
|
|
23411
|
+
t == null ? i ? n && B ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", L] : E = n ? ["$"] : [" ", L], m && (E = ["$"]), useEffect(() => {
|
|
23412
|
+
const re = O != null ? O : {}, { component: Q } = re, ee = Y(re, ["component"]), oe = [
|
|
23407
23413
|
...i ? [
|
|
23408
23414
|
{
|
|
23409
23415
|
value: "",
|
|
@@ -23412,11 +23418,11 @@ function Input$1(e) {
|
|
|
23412
23418
|
[k.label]: F("Null")
|
|
23413
23419
|
}
|
|
23414
23420
|
] : [],
|
|
23415
|
-
...
|
|
23421
|
+
...O ? [v(ee)] : [],
|
|
23416
23422
|
...f ? [...f] : []
|
|
23417
23423
|
].filter((ie) => !ie.deprecated || (M == null ? void 0 : M[0]) === ie[k.value]);
|
|
23418
23424
|
T(oe);
|
|
23419
|
-
}, [f, M,
|
|
23425
|
+
}, [f, M, O, i]);
|
|
23420
23426
|
const G = (Q) => z(this, null, function* () {
|
|
23421
23427
|
var oe;
|
|
23422
23428
|
const ee = Q[Q.length - 1];
|
|
@@ -23444,20 +23450,20 @@ function Input$1(e) {
|
|
|
23444
23450
|
return;
|
|
23445
23451
|
}
|
|
23446
23452
|
if (Q[0] === " ") {
|
|
23447
|
-
Q[1] ? Q[1] !==
|
|
23453
|
+
Q[1] ? Q[1] !== L && o((ie = (re = (oe = ConstantTypes[Q[1]]) == null ? void 0 : oe.default) == null ? void 0 : re.call(oe)) != null ? ie : null, ee) : M && o(null, ee);
|
|
23448
23454
|
return;
|
|
23449
23455
|
}
|
|
23450
23456
|
o(`{{${Q.join(".")}}}`, ee);
|
|
23451
23457
|
},
|
|
23452
|
-
[
|
|
23458
|
+
[L, M, o]
|
|
23453
23459
|
), H = useCallback(() => {
|
|
23454
23460
|
var Q;
|
|
23455
|
-
if (N(!!n), (Q =
|
|
23456
|
-
const ee =
|
|
23461
|
+
if (N(!!n), (Q = O == null ? void 0 : O.children) != null && Q.length) {
|
|
23462
|
+
const ee = O.children[0].default();
|
|
23457
23463
|
return o(ee);
|
|
23458
23464
|
}
|
|
23459
23465
|
o(null);
|
|
23460
|
-
}, [
|
|
23466
|
+
}, [O]);
|
|
23461
23467
|
useEffect(() => {
|
|
23462
23468
|
z(this, null, function* () {
|
|
23463
23469
|
var re;
|
|
@@ -23544,7 +23550,7 @@ function Input$1(e) {
|
|
|
23544
23550
|
P(x({
|
|
23545
23551
|
role: "button",
|
|
23546
23552
|
"aria-label": "variable-constant"
|
|
23547
|
-
},
|
|
23553
|
+
}, V), {
|
|
23548
23554
|
value: t,
|
|
23549
23555
|
onChange: o
|
|
23550
23556
|
})
|
|
@@ -23553,7 +23559,7 @@ function Input$1(e) {
|
|
|
23553
23559
|
Cascader$1,
|
|
23554
23560
|
{
|
|
23555
23561
|
options: R,
|
|
23556
|
-
value: M != null ? M :
|
|
23562
|
+
value: M != null ? M : E,
|
|
23557
23563
|
onChange: U,
|
|
23558
23564
|
loadData: G,
|
|
23559
23565
|
changeOnSelect: u != null ? u : !0,
|
|
@@ -23837,23 +23843,23 @@ function TextArea(e) {
|
|
|
23837
23843
|
), [y, S] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
23838
23844
|
useAntdInputStyle("ant-input");
|
|
23839
23845
|
const { token: $ } = theme.useToken(), B = c.join(" "), N = useCallback(
|
|
23840
|
-
(
|
|
23846
|
+
(E) => {
|
|
23841
23847
|
var U;
|
|
23842
|
-
const G = getValue(
|
|
23848
|
+
const G = getValue(E, c);
|
|
23843
23849
|
(U = e.onChange) == null || U.call(e, d ? G.trim() : G);
|
|
23844
23850
|
},
|
|
23845
23851
|
[B, e.onChange, d]
|
|
23846
23852
|
);
|
|
23847
23853
|
useEffect(() => {
|
|
23848
|
-
preloadOptions(r, m).then((
|
|
23849
|
-
f(
|
|
23854
|
+
preloadOptions(r, m).then((E) => {
|
|
23855
|
+
f(E);
|
|
23850
23856
|
}).catch(console.error);
|
|
23851
23857
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
23852
23858
|
R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
23853
23859
|
}, [p, b, B]), useEffect(() => {
|
|
23854
23860
|
var U;
|
|
23855
|
-
const { current:
|
|
23856
|
-
if (!
|
|
23861
|
+
const { current: E } = h;
|
|
23862
|
+
if (!E)
|
|
23857
23863
|
return;
|
|
23858
23864
|
const G = new Range();
|
|
23859
23865
|
if (v) {
|
|
@@ -23862,22 +23868,22 @@ function TextArea(e) {
|
|
|
23862
23868
|
const H = (U = window.getSelection) == null ? void 0 : U.call(window);
|
|
23863
23869
|
if (H)
|
|
23864
23870
|
try {
|
|
23865
|
-
const K = Array.from(
|
|
23871
|
+
const K = Array.from(E.childNodes);
|
|
23866
23872
|
K.length && (T[0] === -1 ? T[1] && G.setStartAfter(K[T[1] - 1]) : G.setStart(K[T[0]], T[1]), T[2] === -1 ? T[3] && G.setEndAfter(K[T[3] - 1]) : G.setEnd(K[T[2]], T[3])), G.collapse(!0), H.removeAllRanges(), H.addRange(G);
|
|
23867
23873
|
} catch (K) {
|
|
23868
23874
|
}
|
|
23869
23875
|
} else {
|
|
23870
|
-
const { lastChild: H } =
|
|
23876
|
+
const { lastChild: H } = E;
|
|
23871
23877
|
if (H) {
|
|
23872
23878
|
G.setStartAfter(H), G.setEndAfter(H);
|
|
23873
|
-
const K = Array.from(
|
|
23874
|
-
D([
|
|
23879
|
+
const K = Array.from(E.childNodes), X = G.startContainer === E ? -1 : K.indexOf(H), W = G.startContainer === E ? -1 : K.indexOf(H);
|
|
23880
|
+
D([X, G.startOffset, W, G.endOffset]);
|
|
23875
23881
|
}
|
|
23876
23882
|
}
|
|
23877
23883
|
}, [I]);
|
|
23878
23884
|
const j = useCallback(
|
|
23879
|
-
function(
|
|
23880
|
-
const G =
|
|
23885
|
+
function(E) {
|
|
23886
|
+
const G = E.filter((K) => !!K.trim()), { current: U } = h;
|
|
23881
23887
|
if (!U || !G)
|
|
23882
23888
|
return;
|
|
23883
23889
|
U.focus();
|
|
@@ -23888,25 +23894,25 @@ function TextArea(e) {
|
|
|
23888
23894
|
},
|
|
23889
23895
|
[b, N, T]
|
|
23890
23896
|
), w = useCallback(
|
|
23891
|
-
function({ currentTarget:
|
|
23892
|
-
y || (F(!0), D(getCurrentRange(
|
|
23897
|
+
function({ currentTarget: E }) {
|
|
23898
|
+
y || (F(!0), D(getCurrentRange(E)), N(E));
|
|
23893
23899
|
},
|
|
23894
23900
|
[y, N]
|
|
23895
|
-
),
|
|
23896
|
-
D(getCurrentRange(
|
|
23897
|
-
}, []), M = useCallback(function(
|
|
23898
|
-
|
|
23901
|
+
), L = useCallback(function({ currentTarget: E }) {
|
|
23902
|
+
D(getCurrentRange(E));
|
|
23903
|
+
}, []), M = useCallback(function(E) {
|
|
23904
|
+
E.key === "Enter" && E.preventDefault();
|
|
23899
23905
|
}, []), k = useCallback(function() {
|
|
23900
23906
|
S(!0);
|
|
23901
|
-
}, []),
|
|
23902
|
-
({ currentTarget:
|
|
23903
|
-
S(!1), F(!0), D(getCurrentRange(
|
|
23907
|
+
}, []), O = useCallback(
|
|
23908
|
+
({ currentTarget: E }) => {
|
|
23909
|
+
S(!1), F(!0), D(getCurrentRange(E)), N(E);
|
|
23904
23910
|
},
|
|
23905
23911
|
[N]
|
|
23906
23912
|
), q = useCallback(
|
|
23907
|
-
function(
|
|
23908
|
-
|
|
23909
|
-
const G =
|
|
23913
|
+
function(E) {
|
|
23914
|
+
E.preventDefault();
|
|
23915
|
+
const G = E.clipboardData.getData("text/html") || E.clipboardData.getData("text"), U = sanitizeHTML(G, {
|
|
23910
23916
|
allowedTags: ["span"],
|
|
23911
23917
|
allowedAttributes: {
|
|
23912
23918
|
span: ["data-variable", "contenteditable"]
|
|
@@ -23923,10 +23929,10 @@ function TextArea(e) {
|
|
|
23923
23929
|
}
|
|
23924
23930
|
}
|
|
23925
23931
|
}).replace(/\n/g, " ");
|
|
23926
|
-
F(!0), pasteHTML(
|
|
23932
|
+
F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), N(E.currentTarget);
|
|
23927
23933
|
},
|
|
23928
23934
|
[N]
|
|
23929
|
-
),
|
|
23935
|
+
), V = e.disabled || C.disabled;
|
|
23930
23936
|
return t(
|
|
23931
23937
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
23932
23938
|
/* @__PURE__ */ jsxs(
|
|
@@ -23976,17 +23982,17 @@ function TextArea(e) {
|
|
|
23976
23982
|
role: "button",
|
|
23977
23983
|
"aria-label": "textbox",
|
|
23978
23984
|
onInput: w,
|
|
23979
|
-
onBlur:
|
|
23985
|
+
onBlur: L,
|
|
23980
23986
|
onKeyDown: M,
|
|
23981
23987
|
onPaste: q,
|
|
23982
23988
|
onCompositionStart: k,
|
|
23983
|
-
onCompositionEnd:
|
|
23989
|
+
onCompositionEnd: O,
|
|
23984
23990
|
placeholder: e.placeholder,
|
|
23985
23991
|
style: i,
|
|
23986
23992
|
className: cx(
|
|
23987
23993
|
o,
|
|
23988
23994
|
"ant-input ant-input-outlined",
|
|
23989
|
-
{ "ant-input-disabled":
|
|
23995
|
+
{ "ant-input-disabled": V },
|
|
23990
23996
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
23991
23997
|
css`
|
|
23992
23998
|
min-height: ${$.controlHeight}px;
|
|
@@ -24008,7 +24014,7 @@ function TextArea(e) {
|
|
|
24008
24014
|
`
|
|
24009
24015
|
),
|
|
24010
24016
|
ref: h,
|
|
24011
|
-
contentEditable: !
|
|
24017
|
+
contentEditable: !V,
|
|
24012
24018
|
dangerouslySetInnerHTML: { __html: I }
|
|
24013
24019
|
}
|
|
24014
24020
|
),
|
|
@@ -24020,7 +24026,7 @@ function TextArea(e) {
|
|
|
24020
24026
|
onInsert: j,
|
|
24021
24027
|
changeOnSelect: a,
|
|
24022
24028
|
fieldNames: l || defaultFieldNames$2,
|
|
24023
|
-
disabled:
|
|
24029
|
+
disabled: V
|
|
24024
24030
|
}
|
|
24025
24031
|
)
|
|
24026
24032
|
]
|
|
@@ -24240,7 +24246,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
24240
24246
|
() => {
|
|
24241
24247
|
var v;
|
|
24242
24248
|
const S = createMemoryHistory();
|
|
24243
|
-
return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: d, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: p, dataSource: (v = p == null ? void 0 : p.dataSource) == null ? void 0 : v.key, children: /* @__PURE__ */ jsx(Router, { location: S.location, navigator: S, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
24249
|
+
return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: d, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: p, dataSource: (v = p == null ? void 0 : p.dataSource) == null ? void 0 : v.key, children: /* @__PURE__ */ jsx(Router, { location: S.location, navigator: S, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
|
|
24244
24250
|
SchemaComponent,
|
|
24245
24251
|
{
|
|
24246
24252
|
schema: {
|
|
@@ -24262,7 +24268,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
24262
24268
|
}
|
|
24263
24269
|
}
|
|
24264
24270
|
}
|
|
24265
|
-
) }) }) }) }) });
|
|
24271
|
+
) }) }) }) }) }) });
|
|
24266
24272
|
},
|
|
24267
24273
|
o
|
|
24268
24274
|
).open({
|
|
@@ -24297,7 +24303,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
24297
24303
|
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => z(void 0, null, function* () {
|
|
24298
24304
|
const u = yield FormDialog(
|
|
24299
24305
|
e("Add page"),
|
|
24300
|
-
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
24306
|
+
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
|
|
24301
24307
|
SchemaComponent,
|
|
24302
24308
|
{
|
|
24303
24309
|
schema: {
|
|
@@ -24316,7 +24322,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
24316
24322
|
}
|
|
24317
24323
|
}
|
|
24318
24324
|
}
|
|
24319
|
-
) }) }),
|
|
24325
|
+
) }) }) }),
|
|
24320
24326
|
o
|
|
24321
24327
|
).open({
|
|
24322
24328
|
initialValues: {}
|
|
@@ -24362,7 +24368,7 @@ const GroupItem$1 = () => {
|
|
|
24362
24368
|
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useCallback(() => z(void 0, null, function* () {
|
|
24363
24369
|
const c = yield FormDialog(
|
|
24364
24370
|
e("Add group"),
|
|
24365
|
-
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
24371
|
+
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
|
|
24366
24372
|
SchemaComponent,
|
|
24367
24373
|
{
|
|
24368
24374
|
schema: {
|
|
@@ -24381,7 +24387,7 @@ const GroupItem$1 = () => {
|
|
|
24381
24387
|
}
|
|
24382
24388
|
}
|
|
24383
24389
|
}
|
|
24384
|
-
) }) }),
|
|
24390
|
+
) }) }) }),
|
|
24385
24391
|
o
|
|
24386
24392
|
).open({
|
|
24387
24393
|
initialValues: {}
|
|
@@ -26976,86 +26982,86 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26976
26982
|
config: {}
|
|
26977
26983
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
26978
26984
|
function C(k) {
|
|
26979
|
-
var
|
|
26980
|
-
for (
|
|
26981
|
-
if (q = k[
|
|
26982
|
-
k.splice(
|
|
26985
|
+
var O, q;
|
|
26986
|
+
for (O = 0; O < k.length; O++)
|
|
26987
|
+
if (q = k[O], q === ".")
|
|
26988
|
+
k.splice(O, 1), O -= 1;
|
|
26983
26989
|
else if (q === "..") {
|
|
26984
|
-
if (
|
|
26990
|
+
if (O === 0 || O === 1 && k[2] === ".." || k[O - 1] === "..")
|
|
26985
26991
|
continue;
|
|
26986
|
-
|
|
26992
|
+
O > 0 && (k.splice(O - 1, 2), O -= 2);
|
|
26987
26993
|
}
|
|
26988
26994
|
}
|
|
26989
|
-
function b(k,
|
|
26990
|
-
var
|
|
26991
|
-
if (k && (k = k.split("/"),
|
|
26995
|
+
function b(k, O, q) {
|
|
26996
|
+
var V, E, G, U, H, K, X, W, J, Z, Q, ee, oe = O && O.split("/"), re = i.map, ie = re && re["*"];
|
|
26997
|
+
if (k && (k = k.split("/"), X = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[X]) && (k[X] = k[X].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && oe && (ee = oe.slice(0, oe.length - 1), k = ee.concat(k)), C(k), k = k.join("/")), q && re && (oe || ie)) {
|
|
26992
26998
|
G = k.split("/");
|
|
26993
26999
|
e:
|
|
26994
27000
|
for (U = G.length; U > 0; U -= 1) {
|
|
26995
27001
|
if (K = G.slice(0, U).join("/"), oe) {
|
|
26996
27002
|
for (H = oe.length; H > 0; H -= 1)
|
|
26997
|
-
if (
|
|
26998
|
-
W =
|
|
27003
|
+
if (E = getOwn(re, oe.slice(0, H).join("/")), E && (E = getOwn(E, K), E)) {
|
|
27004
|
+
W = E, J = U;
|
|
26999
27005
|
break e;
|
|
27000
27006
|
}
|
|
27001
27007
|
}
|
|
27002
27008
|
!Z && ie && getOwn(ie, K) && (Z = getOwn(ie, K), Q = U);
|
|
27003
27009
|
}
|
|
27004
|
-
!W && Z && (W = Z,
|
|
27010
|
+
!W && Z && (W = Z, J = Q), W && (G.splice(0, J, W), k = G.join("/"));
|
|
27005
27011
|
}
|
|
27006
|
-
return
|
|
27012
|
+
return V = getOwn(i.pkgs, k), V || k;
|
|
27007
27013
|
}
|
|
27008
27014
|
function y(k) {
|
|
27009
|
-
isBrowser && each(scripts(), function(
|
|
27010
|
-
if (
|
|
27011
|
-
return
|
|
27015
|
+
isBrowser && each(scripts(), function(O) {
|
|
27016
|
+
if (O.getAttribute("data-requiremodule") === k && O.getAttribute("data-requirecontext") === n.contextName)
|
|
27017
|
+
return O.parentNode.removeChild(O), !0;
|
|
27012
27018
|
});
|
|
27013
27019
|
}
|
|
27014
27020
|
function S(k) {
|
|
27015
|
-
var
|
|
27016
|
-
if (
|
|
27017
|
-
return
|
|
27021
|
+
var O = getOwn(i.paths, k);
|
|
27022
|
+
if (O && isArray(O) && O.length > 1)
|
|
27023
|
+
return O.shift(), n.require.undef(k), n.makeRequire(null, {
|
|
27018
27024
|
skipMap: !0
|
|
27019
27025
|
})([k]), !0;
|
|
27020
27026
|
}
|
|
27021
27027
|
function v(k) {
|
|
27022
|
-
var
|
|
27023
|
-
return q > -1 && (
|
|
27024
|
-
}
|
|
27025
|
-
function F(k,
|
|
27026
|
-
var
|
|
27027
|
-
return k || (
|
|
27028
|
-
return b(Q,
|
|
27029
|
-
}) : Z = k.indexOf("!") === -1 ? b(k,
|
|
27028
|
+
var O, q = k ? k.indexOf("!") : -1;
|
|
27029
|
+
return q > -1 && (O = k.substring(0, q), k = k.substring(q + 1, k.length)), [O, k];
|
|
27030
|
+
}
|
|
27031
|
+
function F(k, O, q, V) {
|
|
27032
|
+
var E, G, U, H, K = null, X = O ? O.name : null, W = k, J = !0, Z = "";
|
|
27033
|
+
return k || (J = !1, k = "_@r" + (g += 1)), H = v(k), K = H[0], k = H[1], K && (K = b(K, X, V), G = getOwn(p, K)), k && (K ? q ? Z = k : G && G.normalize ? Z = G.normalize(k, function(Q) {
|
|
27034
|
+
return b(Q, X, V);
|
|
27035
|
+
}) : Z = k.indexOf("!") === -1 ? b(k, X, V) : k : (Z = b(k, X, V), H = v(Z), K = H[0], Z = H[1], q = !0, E = n.nameToUrl(Z))), U = K && !G && !q ? "_unnormalized" + (f += 1) : "", {
|
|
27030
27036
|
prefix: K,
|
|
27031
27037
|
name: Z,
|
|
27032
|
-
parentMap:
|
|
27038
|
+
parentMap: O,
|
|
27033
27039
|
unnormalized: !!U,
|
|
27034
|
-
url:
|
|
27040
|
+
url: E,
|
|
27035
27041
|
originalName: W,
|
|
27036
|
-
isDefine:
|
|
27042
|
+
isDefine: J,
|
|
27037
27043
|
id: (K ? K + "!" + Z : Z) + U
|
|
27038
27044
|
};
|
|
27039
27045
|
}
|
|
27040
27046
|
function I(k) {
|
|
27041
|
-
var
|
|
27042
|
-
return q || (q = l[
|
|
27047
|
+
var O = k.id, q = getOwn(l, O);
|
|
27048
|
+
return q || (q = l[O] = new n.Module(k)), q;
|
|
27043
27049
|
}
|
|
27044
|
-
function R(k,
|
|
27045
|
-
var
|
|
27046
|
-
hasProp(p,
|
|
27050
|
+
function R(k, O, q) {
|
|
27051
|
+
var V = k.id, E = getOwn(l, V);
|
|
27052
|
+
hasProp(p, V) && (!E || E.defineEmitComplete) ? O === "defined" && q(p[V]) : (E = I(k), E.error && O === "error" ? q(E.error) : E.on(O, q));
|
|
27047
27053
|
}
|
|
27048
|
-
function T(k,
|
|
27049
|
-
var q = k.requireModules,
|
|
27050
|
-
|
|
27051
|
-
var G = getOwn(l,
|
|
27052
|
-
G && (G.error = k, G.events.error && (
|
|
27053
|
-
}),
|
|
27054
|
+
function T(k, O) {
|
|
27055
|
+
var q = k.requireModules, V = !1;
|
|
27056
|
+
O ? O(k) : (each(q, function(E) {
|
|
27057
|
+
var G = getOwn(l, E);
|
|
27058
|
+
G && (G.error = k, G.events.error && (V = !0, G.emit("error", k)));
|
|
27059
|
+
}), V || req.onError(k));
|
|
27054
27060
|
}
|
|
27055
27061
|
function D() {
|
|
27056
27062
|
globalDefQueue.length && (each(globalDefQueue, function(k) {
|
|
27057
|
-
var
|
|
27058
|
-
typeof
|
|
27063
|
+
var O = k[0];
|
|
27064
|
+
typeof O == "string" && (n.defQueueMap[O] = !0), d.push(k);
|
|
27059
27065
|
}), globalDefQueue = []);
|
|
27060
27066
|
}
|
|
27061
27067
|
r = {
|
|
@@ -27080,29 +27086,29 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27080
27086
|
function $(k) {
|
|
27081
27087
|
delete l[k], delete c[k];
|
|
27082
27088
|
}
|
|
27083
|
-
function B(k,
|
|
27084
|
-
var
|
|
27085
|
-
k.error ? k.emit("error", k.error) : (
|
|
27086
|
-
var U =
|
|
27087
|
-
H && !k.depMatched[G] && !q[U] && (getOwn(
|
|
27088
|
-
}), q[
|
|
27089
|
+
function B(k, O, q) {
|
|
27090
|
+
var V = k.map.id;
|
|
27091
|
+
k.error ? k.emit("error", k.error) : (O[V] = !0, each(k.depMaps, function(E, G) {
|
|
27092
|
+
var U = E.id, H = getOwn(l, U);
|
|
27093
|
+
H && !k.depMatched[G] && !q[U] && (getOwn(O, U) ? (k.defineDep(G, p[U]), k.check()) : B(H, O, q));
|
|
27094
|
+
}), q[V] = !0);
|
|
27089
27095
|
}
|
|
27090
27096
|
function N() {
|
|
27091
|
-
var k,
|
|
27097
|
+
var k, O, q = i.waitSeconds * 1e3, V = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
|
|
27092
27098
|
if (!t) {
|
|
27093
27099
|
if (t = !0, eachProp(c, function(K) {
|
|
27094
|
-
var
|
|
27095
|
-
if (K.enabled && (
|
|
27096
|
-
if (!K.inited &&
|
|
27097
|
-
S(W) ? (
|
|
27098
|
-
else if (!K.inited && K.fetched &&
|
|
27100
|
+
var X = K.map, W = X.id;
|
|
27101
|
+
if (K.enabled && (X.isDefine || G.push(K), !K.error)) {
|
|
27102
|
+
if (!K.inited && V)
|
|
27103
|
+
S(W) ? (O = !0, U = !0) : (E.push(W), y(W));
|
|
27104
|
+
else if (!K.inited && K.fetched && X.isDefine && (U = !0, !X.prefix))
|
|
27099
27105
|
return H = !1;
|
|
27100
27106
|
}
|
|
27101
|
-
}),
|
|
27102
|
-
return k = makeError("timeout", "Load timeout for modules: " +
|
|
27107
|
+
}), V && E.length)
|
|
27108
|
+
return k = makeError("timeout", "Load timeout for modules: " + E, null, E), k.contextName = n.contextName, T(k);
|
|
27103
27109
|
H && each(G, function(K) {
|
|
27104
27110
|
B(K, {}, {});
|
|
27105
|
-
}), (!
|
|
27111
|
+
}), (!V || O) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
|
|
27106
27112
|
a = 0, N();
|
|
27107
27113
|
}, 50)), t = !1;
|
|
27108
27114
|
}
|
|
@@ -27110,13 +27116,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27110
27116
|
o = function(k) {
|
|
27111
27117
|
this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(i.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
27112
27118
|
}, o.prototype = {
|
|
27113
|
-
init: function(k,
|
|
27114
|
-
|
|
27115
|
-
this.emit("error",
|
|
27116
|
-
})), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore =
|
|
27119
|
+
init: function(k, O, q, V) {
|
|
27120
|
+
V = V || {}, !this.inited && (this.factory = O, q ? this.on("error", q) : this.events.error && (q = bind(this, function(E) {
|
|
27121
|
+
this.emit("error", E);
|
|
27122
|
+
})), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
|
|
27117
27123
|
},
|
|
27118
|
-
defineDep: function(k,
|
|
27119
|
-
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] =
|
|
27124
|
+
defineDep: function(k, O) {
|
|
27125
|
+
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = O);
|
|
27120
27126
|
},
|
|
27121
27127
|
fetch: function() {
|
|
27122
27128
|
if (!this.fetched) {
|
|
@@ -27142,7 +27148,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27142
27148
|
*/
|
|
27143
27149
|
check: function() {
|
|
27144
27150
|
if (!(!this.enabled || this.enabling)) {
|
|
27145
|
-
var k,
|
|
27151
|
+
var k, O, q = this.map.id, V = this.depExports, E = this.exports, G = this.factory;
|
|
27146
27152
|
if (!this.inited)
|
|
27147
27153
|
hasProp(n.defQueueMap, q) || this.fetch();
|
|
27148
27154
|
else if (this.error)
|
|
@@ -27152,17 +27158,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27152
27158
|
if (isFunction(G)) {
|
|
27153
27159
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
27154
27160
|
try {
|
|
27155
|
-
|
|
27161
|
+
E = n.execCb(q, G, V, E);
|
|
27156
27162
|
} catch (H) {
|
|
27157
27163
|
k = H;
|
|
27158
27164
|
}
|
|
27159
27165
|
else
|
|
27160
|
-
|
|
27161
|
-
if (this.map.isDefine &&
|
|
27166
|
+
E = n.execCb(q, G, V, E);
|
|
27167
|
+
if (this.map.isDefine && E === void 0 && (O = this.module, O ? E = O.exports : this.usingExports && (E = this.exports)), k)
|
|
27162
27168
|
return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", T(this.error = k);
|
|
27163
27169
|
} else
|
|
27164
|
-
|
|
27165
|
-
if (this.exports =
|
|
27170
|
+
E = G;
|
|
27171
|
+
if (this.exports = E, this.map.isDefine && !this.ignore && (p[q] = E, req.onResourceLoad)) {
|
|
27166
27172
|
var U = [];
|
|
27167
27173
|
each(this.depMaps, function(H) {
|
|
27168
27174
|
U.push(H.normalizedMap || H);
|
|
@@ -27175,14 +27181,14 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27175
27181
|
}
|
|
27176
27182
|
},
|
|
27177
27183
|
callPlugin: function() {
|
|
27178
|
-
var k = this.map,
|
|
27179
|
-
this.depMaps.push(q), R(q, "defined", bind(this, function(
|
|
27180
|
-
var
|
|
27184
|
+
var k = this.map, O = k.id, q = F(k.prefix);
|
|
27185
|
+
this.depMaps.push(q), R(q, "defined", bind(this, function(V) {
|
|
27186
|
+
var E, G, U, H = getOwn(h, this.map.id), K = this.map.name, X = this.map.parentMap ? this.map.parentMap.name : null, W = n.makeRequire(k.parentMap, {
|
|
27181
27187
|
enableBuildCallback: !0
|
|
27182
27188
|
});
|
|
27183
27189
|
if (this.map.unnormalized) {
|
|
27184
|
-
|
|
27185
|
-
return b(
|
|
27190
|
+
V.normalize && (K = V.normalize(K, function(J) {
|
|
27191
|
+
return b(J, X, !0);
|
|
27186
27192
|
}) || ""), G = F(
|
|
27187
27193
|
k.prefix + "!" + K,
|
|
27188
27194
|
this.map.parentMap,
|
|
@@ -27190,16 +27196,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27190
27196
|
), R(
|
|
27191
27197
|
G,
|
|
27192
27198
|
"defined",
|
|
27193
|
-
bind(this, function(
|
|
27199
|
+
bind(this, function(J) {
|
|
27194
27200
|
this.map.normalizedMap = G, this.init([], function() {
|
|
27195
|
-
return
|
|
27201
|
+
return J;
|
|
27196
27202
|
}, null, {
|
|
27197
27203
|
enabled: !0,
|
|
27198
27204
|
ignore: !0
|
|
27199
27205
|
});
|
|
27200
27206
|
})
|
|
27201
|
-
), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(
|
|
27202
|
-
this.emit("error",
|
|
27207
|
+
), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(J) {
|
|
27208
|
+
this.emit("error", J);
|
|
27203
27209
|
})), U.enable());
|
|
27204
27210
|
return;
|
|
27205
27211
|
}
|
|
@@ -27207,79 +27213,79 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27207
27213
|
this.map.url = n.nameToUrl(H), this.load();
|
|
27208
27214
|
return;
|
|
27209
27215
|
}
|
|
27210
|
-
|
|
27216
|
+
E = bind(this, function(J) {
|
|
27211
27217
|
this.init([], function() {
|
|
27212
|
-
return
|
|
27218
|
+
return J;
|
|
27213
27219
|
}, null, {
|
|
27214
27220
|
enabled: !0
|
|
27215
27221
|
});
|
|
27216
|
-
}),
|
|
27217
|
-
this.inited = !0, this.error =
|
|
27218
|
-
Z.map.id.indexOf(
|
|
27219
|
-
}), T(
|
|
27220
|
-
}),
|
|
27222
|
+
}), E.error = bind(this, function(J) {
|
|
27223
|
+
this.inited = !0, this.error = J, J.requireModules = [O], eachProp(l, function(Z) {
|
|
27224
|
+
Z.map.id.indexOf(O + "_unnormalized") === 0 && $(Z.map.id);
|
|
27225
|
+
}), T(J);
|
|
27226
|
+
}), E.fromText = bind(this, function(J, Z) {
|
|
27221
27227
|
var Q = k.name, ee = F(Q), oe = useInteractive;
|
|
27222
|
-
Z && (
|
|
27228
|
+
Z && (J = Z), oe && (useInteractive = !1), I(ee), hasProp(i.config, O) && (i.config[Q] = i.config[O]);
|
|
27223
27229
|
try {
|
|
27224
|
-
req.exec(
|
|
27230
|
+
req.exec(J);
|
|
27225
27231
|
} catch (re) {
|
|
27226
27232
|
return T(makeError(
|
|
27227
27233
|
"fromtexteval",
|
|
27228
|
-
"fromText eval for " +
|
|
27234
|
+
"fromText eval for " + O + " failed: " + re,
|
|
27229
27235
|
re,
|
|
27230
|
-
[
|
|
27236
|
+
[O]
|
|
27231
27237
|
));
|
|
27232
27238
|
}
|
|
27233
|
-
oe && (useInteractive = !0), this.depMaps.push(ee), n.completeLoad(Q), W([Q],
|
|
27234
|
-
}),
|
|
27239
|
+
oe && (useInteractive = !0), this.depMaps.push(ee), n.completeLoad(Q), W([Q], E);
|
|
27240
|
+
}), V.load(k.name, W, E, i);
|
|
27235
27241
|
})), n.enable(q, this), this.pluginMaps[q.id] = q;
|
|
27236
27242
|
},
|
|
27237
27243
|
enable: function() {
|
|
27238
|
-
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k,
|
|
27239
|
-
var q,
|
|
27244
|
+
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, O) {
|
|
27245
|
+
var q, V, E;
|
|
27240
27246
|
if (typeof k == "string") {
|
|
27241
27247
|
if (k = F(
|
|
27242
27248
|
k,
|
|
27243
27249
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
27244
27250
|
!1,
|
|
27245
27251
|
!this.skipMap
|
|
27246
|
-
), this.depMaps[
|
|
27247
|
-
this.depExports[
|
|
27252
|
+
), this.depMaps[O] = k, E = getOwn(r, k.id), E) {
|
|
27253
|
+
this.depExports[O] = E(this);
|
|
27248
27254
|
return;
|
|
27249
27255
|
}
|
|
27250
27256
|
this.depCount += 1, R(k, "defined", bind(this, function(G) {
|
|
27251
|
-
this.undefed || (this.defineDep(
|
|
27257
|
+
this.undefed || (this.defineDep(O, G), this.check());
|
|
27252
27258
|
})), this.errback ? R(k, "error", bind(this, this.errback)) : this.events.error && R(k, "error", bind(this, function(G) {
|
|
27253
27259
|
this.emit("error", G);
|
|
27254
27260
|
}));
|
|
27255
27261
|
}
|
|
27256
|
-
q = k.id,
|
|
27262
|
+
q = k.id, V = l[q], !hasProp(r, q) && V && !V.enabled && n.enable(k, this);
|
|
27257
27263
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
27258
|
-
var
|
|
27259
|
-
|
|
27264
|
+
var O = getOwn(l, k.id);
|
|
27265
|
+
O && !O.enabled && n.enable(k, this);
|
|
27260
27266
|
})), this.enabling = !1, this.check();
|
|
27261
27267
|
},
|
|
27262
|
-
on: function(k,
|
|
27268
|
+
on: function(k, O) {
|
|
27263
27269
|
var q = this.events[k];
|
|
27264
|
-
q || (q = this.events[k] = []), q.push(
|
|
27270
|
+
q || (q = this.events[k] = []), q.push(O);
|
|
27265
27271
|
},
|
|
27266
|
-
emit: function(k,
|
|
27272
|
+
emit: function(k, O) {
|
|
27267
27273
|
each(this.events[k], function(q) {
|
|
27268
|
-
q(
|
|
27274
|
+
q(O);
|
|
27269
27275
|
}), k === "error" && delete this.events[k];
|
|
27270
27276
|
}
|
|
27271
27277
|
};
|
|
27272
27278
|
function j(k) {
|
|
27273
27279
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
27274
27280
|
}
|
|
27275
|
-
function w(k,
|
|
27276
|
-
k.detachEvent && !isOpera ?
|
|
27281
|
+
function w(k, O, q, V) {
|
|
27282
|
+
k.detachEvent && !isOpera ? V && k.detachEvent(V, O) : k.removeEventListener(q, O, !1);
|
|
27277
27283
|
}
|
|
27278
|
-
function
|
|
27279
|
-
var
|
|
27280
|
-
return w(
|
|
27281
|
-
node:
|
|
27282
|
-
id:
|
|
27284
|
+
function L(k) {
|
|
27285
|
+
var O = k.currentTarget || k.srcElement;
|
|
27286
|
+
return w(O, n.onScriptLoad, "load", "onreadystatechange"), w(O, n.onScriptError, "error"), {
|
|
27287
|
+
node: O,
|
|
27288
|
+
id: O && O.getAttribute("data-requiremodule")
|
|
27283
27289
|
};
|
|
27284
27290
|
}
|
|
27285
27291
|
function M() {
|
|
@@ -27309,47 +27315,47 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27309
27315
|
*/
|
|
27310
27316
|
configure: function(k) {
|
|
27311
27317
|
if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
|
|
27312
|
-
var
|
|
27313
|
-
k.urlArgs = function(
|
|
27314
|
-
return (G.indexOf("?") === -1 ? "?" : "&") +
|
|
27318
|
+
var O = k.urlArgs;
|
|
27319
|
+
k.urlArgs = function(E, G) {
|
|
27320
|
+
return (G.indexOf("?") === -1 ? "?" : "&") + O;
|
|
27315
27321
|
};
|
|
27316
27322
|
}
|
|
27317
|
-
var q = i.shim,
|
|
27323
|
+
var q = i.shim, V = {
|
|
27318
27324
|
paths: !0,
|
|
27319
27325
|
bundles: !0,
|
|
27320
27326
|
config: !0,
|
|
27321
27327
|
map: !0
|
|
27322
27328
|
};
|
|
27323
|
-
eachProp(k, function(
|
|
27324
|
-
|
|
27325
|
-
}), k.bundles && eachProp(k.bundles, function(
|
|
27326
|
-
each(
|
|
27329
|
+
eachProp(k, function(E, G) {
|
|
27330
|
+
V[G] ? (i[G] || (i[G] = {}), mixin(i[G], E, !0, !0)) : i[G] = E;
|
|
27331
|
+
}), k.bundles && eachProp(k.bundles, function(E, G) {
|
|
27332
|
+
each(E, function(U) {
|
|
27327
27333
|
U !== G && (h[U] = G);
|
|
27328
27334
|
});
|
|
27329
|
-
}), k.shim && (eachProp(k.shim, function(
|
|
27330
|
-
isArray(
|
|
27331
|
-
deps:
|
|
27332
|
-
}), (
|
|
27333
|
-
}), i.shim = q), k.packages && each(k.packages, function(
|
|
27335
|
+
}), k.shim && (eachProp(k.shim, function(E, G) {
|
|
27336
|
+
isArray(E) && (E = {
|
|
27337
|
+
deps: E
|
|
27338
|
+
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = n.makeShimExports(E)), q[G] = E;
|
|
27339
|
+
}), i.shim = q), k.packages && each(k.packages, function(E) {
|
|
27334
27340
|
var G, U;
|
|
27335
|
-
|
|
27336
|
-
}), eachProp(l, function(
|
|
27337
|
-
!
|
|
27341
|
+
E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (i.paths[U] = E.location), i.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
27342
|
+
}), eachProp(l, function(E, G) {
|
|
27343
|
+
!E.inited && !E.map.unnormalized && (E.map = F(G, null, !0));
|
|
27338
27344
|
}), (k.deps || k.callback) && n.require(k.deps || [], k.callback);
|
|
27339
27345
|
},
|
|
27340
27346
|
makeShimExports: function(k) {
|
|
27341
|
-
function
|
|
27347
|
+
function O() {
|
|
27342
27348
|
var q;
|
|
27343
27349
|
return k.init && (q = k.init.apply(global, arguments)), q || k.exports && getGlobal(k.exports);
|
|
27344
27350
|
}
|
|
27345
|
-
return
|
|
27351
|
+
return O;
|
|
27346
27352
|
},
|
|
27347
|
-
makeRequire: function(k,
|
|
27348
|
-
|
|
27349
|
-
function q(
|
|
27353
|
+
makeRequire: function(k, O) {
|
|
27354
|
+
O = O || {};
|
|
27355
|
+
function q(V, E, G) {
|
|
27350
27356
|
var U, H, K;
|
|
27351
|
-
return
|
|
27352
|
-
M(), K = I(F(null, k)), K.skipMap =
|
|
27357
|
+
return O.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, V) ? r[V](l[k.id]) : req.get ? req.get(n, V, k, q) : (H = F(V, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (M(), n.nextTick(function() {
|
|
27358
|
+
M(), K = I(F(null, k)), K.skipMap = O.skipMap, K.init(V, E, G, {
|
|
27353
27359
|
enabled: !0
|
|
27354
27360
|
}), N();
|
|
27355
27361
|
}), q);
|
|
@@ -27361,26 +27367,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27361
27367
|
* *Requires* the use of a module name. It does not support using
|
|
27362
27368
|
* plain URLs like nameToUrl.
|
|
27363
27369
|
*/
|
|
27364
|
-
toUrl: function(
|
|
27365
|
-
var
|
|
27366
|
-
return G !== -1 && (!H || G > 1) && (
|
|
27367
|
-
|
|
27370
|
+
toUrl: function(V) {
|
|
27371
|
+
var E, G = V.lastIndexOf("."), U = V.split("/")[0], H = U === "." || U === "..";
|
|
27372
|
+
return G !== -1 && (!H || G > 1) && (E = V.substring(G, V.length), V = V.substring(0, G)), n.nameToUrl(b(
|
|
27373
|
+
V,
|
|
27368
27374
|
k && k.id,
|
|
27369
27375
|
!0
|
|
27370
|
-
),
|
|
27376
|
+
), E, !0);
|
|
27371
27377
|
},
|
|
27372
|
-
defined: function(
|
|
27373
|
-
return hasProp(p, F(
|
|
27378
|
+
defined: function(V) {
|
|
27379
|
+
return hasProp(p, F(V, k, !1, !0).id);
|
|
27374
27380
|
},
|
|
27375
|
-
specified: function(
|
|
27376
|
-
return
|
|
27381
|
+
specified: function(V) {
|
|
27382
|
+
return V = F(V, k, !1, !0).id, hasProp(p, V) || hasProp(l, V);
|
|
27377
27383
|
}
|
|
27378
|
-
}), k || (q.undef = function(
|
|
27384
|
+
}), k || (q.undef = function(V) {
|
|
27379
27385
|
D();
|
|
27380
|
-
var
|
|
27381
|
-
G.undefed = !0, y(
|
|
27382
|
-
U[0] ===
|
|
27383
|
-
}), delete n.defQueueMap[
|
|
27386
|
+
var E = F(V, k, !0), G = getOwn(l, V);
|
|
27387
|
+
G.undefed = !0, y(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(U, H) {
|
|
27388
|
+
U[0] === V && d.splice(H, 1);
|
|
27389
|
+
}), delete n.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), $(V));
|
|
27384
27390
|
}), q;
|
|
27385
27391
|
},
|
|
27386
27392
|
/**
|
|
@@ -27390,8 +27396,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27390
27396
|
* the optimizer. Not shown here to keep code compact.
|
|
27391
27397
|
*/
|
|
27392
27398
|
enable: function(k) {
|
|
27393
|
-
var
|
|
27394
|
-
|
|
27399
|
+
var O = getOwn(l, k.id);
|
|
27400
|
+
O && I(k).enable();
|
|
27395
27401
|
},
|
|
27396
27402
|
/**
|
|
27397
27403
|
* Internal method used by environment adapters to complete a load event.
|
|
@@ -27400,17 +27406,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27400
27406
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
27401
27407
|
*/
|
|
27402
27408
|
completeLoad: function(k) {
|
|
27403
|
-
var
|
|
27409
|
+
var O, q, V, E = getOwn(i.shim, k) || {}, G = E.exports;
|
|
27404
27410
|
for (D(); d.length; ) {
|
|
27405
27411
|
if (q = d.shift(), q[0] === null) {
|
|
27406
|
-
if (q[0] = k,
|
|
27412
|
+
if (q[0] = k, O)
|
|
27407
27413
|
break;
|
|
27408
|
-
|
|
27414
|
+
O = !0;
|
|
27409
27415
|
} else
|
|
27410
|
-
q[0] === k && (
|
|
27416
|
+
q[0] === k && (O = !0);
|
|
27411
27417
|
j(q);
|
|
27412
27418
|
}
|
|
27413
|
-
if (n.defQueueMap = {},
|
|
27419
|
+
if (n.defQueueMap = {}, V = getOwn(l, k), !O && !hasProp(p, k) && V && !V.inited) {
|
|
27414
27420
|
if (i.enforceDefine && (!G || !getGlobal(G)))
|
|
27415
27421
|
return S(k) ? void 0 : T(makeError(
|
|
27416
27422
|
"nodefine",
|
|
@@ -27418,7 +27424,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27418
27424
|
null,
|
|
27419
27425
|
[k]
|
|
27420
27426
|
));
|
|
27421
|
-
j([k,
|
|
27427
|
+
j([k, E.deps || [], E.exportsFn]);
|
|
27422
27428
|
}
|
|
27423
27429
|
N();
|
|
27424
27430
|
},
|
|
@@ -27429,26 +27435,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27429
27435
|
* it is assumed to have already been normalized. This is an
|
|
27430
27436
|
* internal API, not a public one. Use toUrl for the public API.
|
|
27431
27437
|
*/
|
|
27432
|
-
nameToUrl: function(k,
|
|
27433
|
-
var
|
|
27434
|
-
if (W && (k = W),
|
|
27435
|
-
return n.nameToUrl(
|
|
27438
|
+
nameToUrl: function(k, O, q) {
|
|
27439
|
+
var V, E, G, U, H, K, X, W = getOwn(i.pkgs, k);
|
|
27440
|
+
if (W && (k = W), X = getOwn(h, k), X)
|
|
27441
|
+
return n.nameToUrl(X, O, q);
|
|
27436
27442
|
if (req.jsExtRegExp.test(k))
|
|
27437
|
-
H = k + (
|
|
27443
|
+
H = k + (O || "");
|
|
27438
27444
|
else {
|
|
27439
|
-
for (
|
|
27440
|
-
if (U =
|
|
27441
|
-
isArray(K) && (K = K[0]),
|
|
27445
|
+
for (V = i.paths, E = k.split("/"), G = E.length; G > 0; G -= 1)
|
|
27446
|
+
if (U = E.slice(0, G).join("/"), K = getOwn(V, U), K) {
|
|
27447
|
+
isArray(K) && (K = K[0]), E.splice(0, G, K);
|
|
27442
27448
|
break;
|
|
27443
27449
|
}
|
|
27444
|
-
H =
|
|
27450
|
+
H = E.join("/"), H += O || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
|
|
27445
27451
|
}
|
|
27446
27452
|
return i.urlArgs && !/^blob\:/.test(H) ? H + i.urlArgs(k, H) : H;
|
|
27447
27453
|
},
|
|
27448
27454
|
//Delegates to req.load. Broken out as a separate function to
|
|
27449
27455
|
//allow overriding in the optimizer.
|
|
27450
|
-
load: function(k,
|
|
27451
|
-
req.load(n, k,
|
|
27456
|
+
load: function(k, O) {
|
|
27457
|
+
req.load(n, k, O);
|
|
27452
27458
|
},
|
|
27453
27459
|
/**
|
|
27454
27460
|
* Executes a module callback function. Broken out as a separate function
|
|
@@ -27457,8 +27463,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27457
27463
|
*
|
|
27458
27464
|
* @private
|
|
27459
27465
|
*/
|
|
27460
|
-
execCb: function(k,
|
|
27461
|
-
return
|
|
27466
|
+
execCb: function(k, O, q, V) {
|
|
27467
|
+
return O.apply(V, q);
|
|
27462
27468
|
},
|
|
27463
27469
|
/**
|
|
27464
27470
|
* callback for script loads, used to check status of loading.
|
|
@@ -27469,23 +27475,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27469
27475
|
onScriptLoad: function(k) {
|
|
27470
27476
|
if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
|
|
27471
27477
|
interactiveScript = null;
|
|
27472
|
-
var
|
|
27473
|
-
n.completeLoad(
|
|
27478
|
+
var O = L(k);
|
|
27479
|
+
n.completeLoad(O.id);
|
|
27474
27480
|
}
|
|
27475
27481
|
},
|
|
27476
27482
|
/**
|
|
27477
27483
|
* Callback for script errors.
|
|
27478
27484
|
*/
|
|
27479
27485
|
onScriptError: function(k) {
|
|
27480
|
-
var
|
|
27481
|
-
if (!S(
|
|
27486
|
+
var O = L(k);
|
|
27487
|
+
if (!S(O.id)) {
|
|
27482
27488
|
var q = [];
|
|
27483
|
-
return eachProp(l, function(
|
|
27484
|
-
|
|
27485
|
-
if (G.id ===
|
|
27486
|
-
return q.push(
|
|
27489
|
+
return eachProp(l, function(V, E) {
|
|
27490
|
+
E.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
|
|
27491
|
+
if (G.id === O.id)
|
|
27492
|
+
return q.push(E), !0;
|
|
27487
27493
|
});
|
|
27488
|
-
}), T(makeError("scripterror", 'Script error for "' +
|
|
27494
|
+
}), T(makeError("scripterror", 'Script error for "' + O.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [O.id]));
|
|
27489
27495
|
}
|
|
27490
27496
|
}
|
|
27491
27497
|
}, n.require = n.makeRequire(), n;
|
|
@@ -29340,8 +29346,8 @@ const useCreateActionProps = () => {
|
|
|
29340
29346
|
return {
|
|
29341
29347
|
onClick() {
|
|
29342
29348
|
return z(this, null, function* () {
|
|
29343
|
-
var
|
|
29344
|
-
const { onSuccess: I, skipValidator: R, triggerWorkflows: T } = (
|
|
29349
|
+
var L, M;
|
|
29350
|
+
const { onSuccess: I, skipValidator: R, triggerWorkflows: T } = (L = u == null ? void 0 : u["x-action-settings"]) != null ? L : {}, {
|
|
29345
29351
|
manualClose: D,
|
|
29346
29352
|
redirecting: $,
|
|
29347
29353
|
redirectTo: B,
|
|
@@ -29360,20 +29366,20 @@ const useCreateActionProps = () => {
|
|
|
29360
29366
|
triggerWorkflows: T != null && T.length ? T.map((q) => [q.workflowKey, q.context].filter(Boolean).join("!")).join(",") : void 0,
|
|
29361
29367
|
updateAssociationValues: g
|
|
29362
29368
|
});
|
|
29363
|
-
let
|
|
29364
|
-
if (B && (
|
|
29369
|
+
let O = B;
|
|
29370
|
+
if (B && (O = yield getVariableValue(B, {
|
|
29365
29371
|
variables: S,
|
|
29366
29372
|
localVariables: [...y, { name: "$record", ctx: new Proxy((M = k == null ? void 0 : k.data) == null ? void 0 : M.data, {}) }]
|
|
29367
29373
|
})), (j === "previous" || !j && $ !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !N) {
|
|
29368
|
-
message.success(h("Saved successfully")), yield resetFormCorrectly(o), ($ && !j || j === "redirect") &&
|
|
29374
|
+
message.success(h("Saved successfully")), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O));
|
|
29369
29375
|
return;
|
|
29370
29376
|
}
|
|
29371
29377
|
D ? m.success({
|
|
29372
29378
|
title: p(N),
|
|
29373
29379
|
onOk: () => z(this, null, function* () {
|
|
29374
|
-
yield resetFormCorrectly(o), ($ && !j || j === "redirect") &&
|
|
29380
|
+
yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O));
|
|
29375
29381
|
})
|
|
29376
|
-
}) : (message.success(p(N)), yield resetFormCorrectly(o), ($ && !j || j === "redirect") &&
|
|
29382
|
+
}) : (message.success(p(N)), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O)));
|
|
29377
29383
|
} catch (k) {
|
|
29378
29384
|
d.data.loading = !1;
|
|
29379
29385
|
}
|
|
@@ -29386,20 +29392,20 @@ const useCreateActionProps = () => {
|
|
|
29386
29392
|
return {
|
|
29387
29393
|
onClick() {
|
|
29388
29394
|
return z(this, null, function* () {
|
|
29389
|
-
var
|
|
29395
|
+
var O, q, V, E, G, U;
|
|
29390
29396
|
const R = u.map((H) => H.name), {
|
|
29391
29397
|
assignedValues: T = {},
|
|
29392
29398
|
onSuccess: D,
|
|
29393
29399
|
overwriteValues: $,
|
|
29394
29400
|
skipValidator: B,
|
|
29395
29401
|
triggerWorkflows: N
|
|
29396
|
-
} = (
|
|
29397
|
-
const K = T[H],
|
|
29402
|
+
} = (O = l == null ? void 0 : l["x-action-settings"]) != null ? O : {}, j = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, L = {}, M = Object.keys(T).map((H) => z(this, null, function* () {
|
|
29403
|
+
const K = T[H], X = d(H);
|
|
29398
29404
|
if (isVariable$1(K)) {
|
|
29399
29405
|
const { value: W } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
|
|
29400
|
-
|
|
29406
|
+
L[H] = transformVariableValue(W, { targetCollectionField: X });
|
|
29401
29407
|
} else
|
|
29402
|
-
K !== "" && (
|
|
29408
|
+
K !== "" && (L[H] = K);
|
|
29403
29409
|
}));
|
|
29404
29410
|
yield Promise.all(M), B || (yield e.submit());
|
|
29405
29411
|
const k = getFormValues({
|
|
@@ -29413,12 +29419,12 @@ const useCreateActionProps = () => {
|
|
|
29413
29419
|
});
|
|
29414
29420
|
if (j) {
|
|
29415
29421
|
const H = p();
|
|
29416
|
-
k[(
|
|
29422
|
+
k[(V = H == null ? void 0 : H.name) != null ? V : "parent"] = f, k[(E = H == null ? void 0 : H.foreignKey) != null ? E : "parentId"] = f.id;
|
|
29417
29423
|
}
|
|
29418
29424
|
c.data = t.data || {}, c.data.loading = !0;
|
|
29419
29425
|
try {
|
|
29420
29426
|
const H = yield o[S]({
|
|
29421
|
-
values: x(x(x({}, k), $),
|
|
29427
|
+
values: x(x(x({}, k), $), L),
|
|
29422
29428
|
filterKeys: v,
|
|
29423
29429
|
// TODO(refactor): should change to inject by plugin
|
|
29424
29430
|
triggerWorkflows: N != null && N.length ? N.map((K) => [K.workflowKey, K.context].filter(Boolean).join("!")).join(",") : void 0
|
|
@@ -29530,7 +29536,7 @@ const useCreateActionProps = () => {
|
|
|
29530
29536
|
return {
|
|
29531
29537
|
onClick(f, C) {
|
|
29532
29538
|
return z(this, null, function* () {
|
|
29533
|
-
var w,
|
|
29539
|
+
var w, L, M, k;
|
|
29534
29540
|
const {
|
|
29535
29541
|
assignedValues: b = {},
|
|
29536
29542
|
onSuccess: y,
|
|
@@ -29542,25 +29548,25 @@ const useCreateActionProps = () => {
|
|
|
29542
29548
|
redirectTo: R,
|
|
29543
29549
|
successMessage: T,
|
|
29544
29550
|
actionAfterSuccess: D
|
|
29545
|
-
} = y || {}, $ = {}, B = Object.keys(b).map((
|
|
29546
|
-
const q = b[
|
|
29551
|
+
} = y || {}, $ = {}, B = Object.keys(b).map((O) => z(this, null, function* () {
|
|
29552
|
+
const q = b[O], V = m(O);
|
|
29547
29553
|
if (isVariable$1(q)) {
|
|
29548
|
-
const { value:
|
|
29549
|
-
$[
|
|
29554
|
+
const { value: E } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
|
|
29555
|
+
$[O] = transformVariableValue(E, { targetCollectionField: V });
|
|
29550
29556
|
} else
|
|
29551
|
-
q !== "" && ($[
|
|
29557
|
+
q !== "" && ($[O] = q);
|
|
29552
29558
|
}));
|
|
29553
29559
|
yield Promise.all(B), S === !1 && (yield l.submit());
|
|
29554
29560
|
const N = yield e.update({
|
|
29555
29561
|
filterByTk: n,
|
|
29556
29562
|
values: x({}, $),
|
|
29557
29563
|
// TODO(refactor): should change to inject by plugin
|
|
29558
|
-
triggerWorkflows: v != null && v.length ? v.map((
|
|
29564
|
+
triggerWorkflows: v != null && v.length ? v.map((O) => [O.workflowKey, O.context].filter(Boolean).join("!")).join(",") : void 0
|
|
29559
29565
|
});
|
|
29560
29566
|
let j = R;
|
|
29561
29567
|
R && (j = yield getVariableValue(R, {
|
|
29562
29568
|
variables: u,
|
|
29563
|
-
localVariables: [...d, { name: "$record", ctx: new Proxy((
|
|
29569
|
+
localVariables: [...d, { name: "$record", ctx: new Proxy((L = N == null ? void 0 : N.data) == null ? void 0 : L.data, {}) }]
|
|
29564
29570
|
})), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (M = t == null ? void 0 : t.service) == null ? void 0 : M.refresh) == null || k.call(M), T && (F ? c.success({
|
|
29565
29571
|
title: i(T),
|
|
29566
29572
|
onOk: () => z(this, null, function* () {
|
|
@@ -29578,30 +29584,30 @@ const useCreateActionProps = () => {
|
|
|
29578
29584
|
return {
|
|
29579
29585
|
onClick() {
|
|
29580
29586
|
return z(this, null, function* () {
|
|
29581
|
-
var
|
|
29587
|
+
var O;
|
|
29582
29588
|
const {
|
|
29583
29589
|
assignedValues: T = {},
|
|
29584
29590
|
onSuccess: D,
|
|
29585
29591
|
updateMode: $
|
|
29586
|
-
} = (
|
|
29592
|
+
} = (O = a == null ? void 0 : a["x-action-settings"]) != null ? O : {}, { manualClose: B, redirecting: N, redirectTo: j, successMessage: w, actionAfterSuccess: L } = D || {};
|
|
29587
29593
|
m.data = e.data || {}, m.data.loading = !0;
|
|
29588
|
-
const M = {}, k = Object.keys(T).map((
|
|
29589
|
-
const
|
|
29590
|
-
if (isVariable$1(
|
|
29591
|
-
const { value: U } = (yield g == null ? void 0 : g.parseVariable(
|
|
29592
|
-
M[
|
|
29594
|
+
const M = {}, k = Object.keys(T).map((V) => z(this, null, function* () {
|
|
29595
|
+
const E = T[V], G = C(V);
|
|
29596
|
+
if (isVariable$1(E)) {
|
|
29597
|
+
const { value: U } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
|
|
29598
|
+
M[V] = transformVariableValue(U, { targetCollectionField: G });
|
|
29593
29599
|
} else
|
|
29594
|
-
|
|
29600
|
+
E !== "" && (M[V] = E);
|
|
29595
29601
|
}));
|
|
29596
|
-
yield Promise.all(k), (
|
|
29602
|
+
yield Promise.all(k), (L === "previous" || !L && N !== !0) && (y == null || y(!1)), h.confirm({
|
|
29597
29603
|
title: p("Bulk update"),
|
|
29598
29604
|
content: p($ === "selected" ? "Update selected data?" : "Update all data?"),
|
|
29599
29605
|
onOk() {
|
|
29600
29606
|
return z(this, null, function* () {
|
|
29601
29607
|
var G, U, H, K;
|
|
29602
|
-
const { filter:
|
|
29608
|
+
const { filter: V } = (U = (G = n.params) == null ? void 0 : G[0]) != null ? U : {}, E = {
|
|
29603
29609
|
values: x({}, M),
|
|
29604
|
-
filter:
|
|
29610
|
+
filter: V,
|
|
29605
29611
|
forceUpdate: !1
|
|
29606
29612
|
};
|
|
29607
29613
|
if ($ === "selected") {
|
|
@@ -29609,21 +29615,21 @@ const useCreateActionProps = () => {
|
|
|
29609
29615
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
29610
29616
|
return;
|
|
29611
29617
|
}
|
|
29612
|
-
|
|
29618
|
+
E.filter = { $and: [{ [l || "id"]: { $in: c } }] };
|
|
29613
29619
|
}
|
|
29614
|
-
|
|
29620
|
+
E.filter || (E.forceUpdate = !0);
|
|
29615
29621
|
try {
|
|
29616
|
-
yield t.update(
|
|
29617
|
-
} catch (
|
|
29622
|
+
yield t.update(E);
|
|
29623
|
+
} catch (X) {
|
|
29618
29624
|
} finally {
|
|
29619
29625
|
m.data.loading = !1;
|
|
29620
29626
|
}
|
|
29621
29627
|
t instanceof TableFieldResource || (K = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || K.call(H), w && (B ? h.success({
|
|
29622
29628
|
title: d(w),
|
|
29623
29629
|
onOk: () => z(this, null, function* () {
|
|
29624
|
-
(N && !
|
|
29630
|
+
(N && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
|
|
29625
29631
|
})
|
|
29626
|
-
}) : (message.success(d(w)), (N && !
|
|
29632
|
+
}) : (message.success(d(w)), (N && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j))));
|
|
29627
29633
|
});
|
|
29628
29634
|
},
|
|
29629
29635
|
onCancel() {
|
|
@@ -29641,14 +29647,14 @@ const useCreateActionProps = () => {
|
|
|
29641
29647
|
return {
|
|
29642
29648
|
onClick() {
|
|
29643
29649
|
return z(this, null, function* () {
|
|
29644
|
-
var
|
|
29645
|
-
const { skipValidator: I, onSuccess: R, requestSettings: T } = (
|
|
29650
|
+
var V, E, G, U;
|
|
29651
|
+
const { skipValidator: I, onSuccess: R, requestSettings: T } = (V = n == null ? void 0 : n["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: $, redirectTo: B, successMessage: N, actionAfterSuccess: j } = R || {}, w = n == null ? void 0 : n["x-action"];
|
|
29646
29652
|
if (!T.url)
|
|
29647
29653
|
return;
|
|
29648
29654
|
I !== !0 && w === "customize:form:request" && (yield a.submit());
|
|
29649
|
-
const
|
|
29655
|
+
const L = T.headers ? JSON.parse(T.headers) : {}, M = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
|
|
29650
29656
|
if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
|
|
29651
|
-
const H = i.map((
|
|
29657
|
+
const H = i.map((X) => X.name), K = getFormValues({
|
|
29652
29658
|
filterByTk: o,
|
|
29653
29659
|
field: c,
|
|
29654
29660
|
form: a,
|
|
@@ -29662,13 +29668,13 @@ const useCreateActionProps = () => {
|
|
|
29662
29668
|
const q = {
|
|
29663
29669
|
url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
|
|
29664
29670
|
method: T.method,
|
|
29665
|
-
headers: parse(
|
|
29671
|
+
headers: parse(L)({ currentRecord: m, currentUser: g }),
|
|
29666
29672
|
params: parse(M)({ currentRecord: m, currentUser: g }),
|
|
29667
29673
|
data: parse(k)({ currentRecord: m, currentUser: g })
|
|
29668
29674
|
};
|
|
29669
29675
|
f.data = c.data || {}, f.data.loading = !0;
|
|
29670
29676
|
try {
|
|
29671
|
-
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (
|
|
29677
|
+
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (j === "previous" || !j && $ !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), ($ && !j || j === "redirect") && B && (isURL(B) ? window.location.href = B : t(B))), D ? y.success({
|
|
29672
29678
|
title: r(N),
|
|
29673
29679
|
onOk: () => z(this, null, function* () {
|
|
29674
29680
|
($ && !j || j === "redirect") && B && (isURL(B) ? window.location.href = B : t(B));
|
|
@@ -29685,29 +29691,29 @@ const useCreateActionProps = () => {
|
|
|
29685
29691
|
return {
|
|
29686
29692
|
onClick(F, I) {
|
|
29687
29693
|
return z(this, null, function* () {
|
|
29688
|
-
var
|
|
29694
|
+
var E, G;
|
|
29689
29695
|
const {
|
|
29690
29696
|
assignedValues: R = {},
|
|
29691
29697
|
onSuccess: T,
|
|
29692
29698
|
overwriteValues: D,
|
|
29693
29699
|
skipValidator: $,
|
|
29694
29700
|
triggerWorkflows: B
|
|
29695
|
-
} = (
|
|
29701
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, {
|
|
29696
29702
|
manualClose: N,
|
|
29697
29703
|
redirecting: j,
|
|
29698
29704
|
redirectTo: w,
|
|
29699
|
-
successMessage:
|
|
29705
|
+
successMessage: L,
|
|
29700
29706
|
actionAfterSuccess: M
|
|
29701
|
-
} = T || {}, k = {},
|
|
29707
|
+
} = T || {}, k = {}, O = Object.keys(R).map((U) => z(this, null, function* () {
|
|
29702
29708
|
const H = R[U], K = d(U);
|
|
29703
29709
|
if (isVariable$1(H)) {
|
|
29704
|
-
const { value:
|
|
29705
|
-
k[U] = transformVariableValue(
|
|
29710
|
+
const { value: X } = (yield b == null ? void 0 : b.parseVariable(H, y)) || {};
|
|
29711
|
+
k[U] = transformVariableValue(X, { targetCollectionField: K });
|
|
29706
29712
|
} else
|
|
29707
29713
|
H !== "" && (k[U] = H);
|
|
29708
29714
|
}));
|
|
29709
|
-
yield Promise.all(
|
|
29710
|
-
const q = u.map((U) => U.name),
|
|
29715
|
+
yield Promise.all(O), $ || (yield e.submit());
|
|
29716
|
+
const q = u.map((U) => U.name), V = getFormValues({
|
|
29711
29717
|
filterByTk: t,
|
|
29712
29718
|
field: o,
|
|
29713
29719
|
form: e,
|
|
@@ -29720,7 +29726,7 @@ const useCreateActionProps = () => {
|
|
|
29720
29726
|
try {
|
|
29721
29727
|
const U = yield n.update(P(x({
|
|
29722
29728
|
filterByTk: t,
|
|
29723
|
-
values: x(x(x({},
|
|
29729
|
+
values: x(x(x({}, V), D), k)
|
|
29724
29730
|
}, C), {
|
|
29725
29731
|
updateAssociationValues: g,
|
|
29726
29732
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -29731,14 +29737,14 @@ const useCreateActionProps = () => {
|
|
|
29731
29737
|
if (w && (H = yield getVariableValue(w, {
|
|
29732
29738
|
variables: b,
|
|
29733
29739
|
localVariables: [...y, { name: "$record", ctx: new Proxy((G = U == null ? void 0 : U.data) == null ? void 0 : G.data, {}) }]
|
|
29734
|
-
})), (M === "previous" || !M && j !== !0) && (a == null || a(!1)), i == null || i(!1), !
|
|
29740
|
+
})), (M === "previous" || !M && j !== !0) && (a == null || a(!1)), i == null || i(!1), !L)
|
|
29735
29741
|
return;
|
|
29736
29742
|
N ? f.success({
|
|
29737
|
-
title: m(
|
|
29743
|
+
title: m(L),
|
|
29738
29744
|
onOk: () => z(this, null, function* () {
|
|
29739
29745
|
yield e.reset(), (j && !M || M === "redirect") && H && (isURL(H) ? window.location.href = H : c(H));
|
|
29740
29746
|
})
|
|
29741
|
-
}) : (message.success(m(
|
|
29747
|
+
}) : (message.success(m(L)), (j && !M || M === "redirect" || M === "redirect") && H && (isURL(H) ? window.location.href = H : c(H)));
|
|
29742
29748
|
} catch (U) {
|
|
29743
29749
|
h.data.loading = !1;
|
|
29744
29750
|
}
|
|
@@ -29963,30 +29969,30 @@ const useCreateActionProps = () => {
|
|
|
29963
29969
|
]);
|
|
29964
29970
|
const S = useCallback(
|
|
29965
29971
|
(w) => {
|
|
29966
|
-
const { targets:
|
|
29972
|
+
const { targets: L, uid: M } = findFilterTargets(t);
|
|
29967
29973
|
n().forEach((k) => {
|
|
29968
|
-
var U, H, K,
|
|
29969
|
-
if (!
|
|
29974
|
+
var U, H, K, X;
|
|
29975
|
+
if (!L.find((W) => W.uid === k.uid))
|
|
29970
29976
|
return;
|
|
29971
|
-
const q = `${M}${t.name}`,
|
|
29977
|
+
const q = `${M}${t.name}`, V = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
29972
29978
|
(K = (H = k.service.params) == null ? void 0 : H[1]) != null && K.filters || _.set(k.service.params, "[1].filters", {});
|
|
29973
|
-
const
|
|
29979
|
+
const E = k.service.params[1].filters;
|
|
29974
29980
|
if (w.length)
|
|
29975
|
-
|
|
29981
|
+
E[q] = {
|
|
29976
29982
|
[y]: w
|
|
29977
29983
|
};
|
|
29978
29984
|
else {
|
|
29979
|
-
if ((
|
|
29985
|
+
if ((X = k.clearSelection) == null || X.call(k), k.dataLoadingMode === "manual")
|
|
29980
29986
|
return k.clearData();
|
|
29981
|
-
delete
|
|
29987
|
+
delete E[q];
|
|
29982
29988
|
}
|
|
29983
|
-
const G = mergeFilter([...Object.values(
|
|
29989
|
+
const G = mergeFilter([...Object.values(E), k.defaultFilter]);
|
|
29984
29990
|
return k.doFilter(
|
|
29985
|
-
P(x({},
|
|
29991
|
+
P(x({}, V), {
|
|
29986
29992
|
page: 1,
|
|
29987
29993
|
filter: G
|
|
29988
29994
|
}),
|
|
29989
|
-
{ filters:
|
|
29995
|
+
{ filters: E }
|
|
29990
29996
|
);
|
|
29991
29997
|
});
|
|
29992
29998
|
},
|
|
@@ -29995,20 +30001,20 @@ const useCreateActionProps = () => {
|
|
|
29995
30001
|
if (!e)
|
|
29996
30002
|
return {};
|
|
29997
30003
|
if (isOptionalField(e)) {
|
|
29998
|
-
const w = o.find((k) => k.name === t.name),
|
|
30004
|
+
const w = o.find((k) => k.name === t.name), L = {
|
|
29999
30005
|
select: "$in",
|
|
30000
30006
|
multipleSelect: "$anyOf",
|
|
30001
30007
|
checkbox: "$in",
|
|
30002
30008
|
checkboxGroup: "$anyOf"
|
|
30003
30009
|
}, M = ((j = w == null ? void 0 : w.uiSchema) == null ? void 0 : j.enum) || [];
|
|
30004
30010
|
C = "value", b = "label", p = M, h = {}, g = () => {
|
|
30005
|
-
}, y = `${w.name}.${
|
|
30006
|
-
const
|
|
30007
|
-
if (!
|
|
30011
|
+
}, y = `${w.name}.${L[w.interface]}`, m = (k) => {
|
|
30012
|
+
const O = k.target.value;
|
|
30013
|
+
if (!O) {
|
|
30008
30014
|
p = M;
|
|
30009
30015
|
return;
|
|
30010
30016
|
}
|
|
30011
|
-
p = M.filter((q) => q.label.includes(
|
|
30017
|
+
p = M.filter((q) => q.label.includes(O));
|
|
30012
30018
|
};
|
|
30013
30019
|
} else
|
|
30014
30020
|
y = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -30305,7 +30311,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
30305
30311
|
isLeaf: !0,
|
|
30306
30312
|
field: $,
|
|
30307
30313
|
disabled: F
|
|
30308
|
-
}), j = I.find((
|
|
30314
|
+
}), j = I.find((L) => L.name === N.key);
|
|
30309
30315
|
if (["belongsTo", "belongsToMany"].includes($.type) && (!j || ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode)))
|
|
30310
30316
|
B.type = "reference", N.type = "reference", N.title = React.createElement(TreeNode, P(x({}, B), { type: "reference" })), N.isLeaf = !1, N.children = m($.target, {
|
|
30311
30317
|
depth: y + 1,
|
|
@@ -30314,15 +30320,15 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
30314
30320
|
exclude: systemKeys
|
|
30315
30321
|
});
|
|
30316
30322
|
else if (["hasOne", "hasMany"].includes($.type) || ["Nester", "SubTable"].includes(j == null ? void 0 : j.fieldMode)) {
|
|
30317
|
-
let
|
|
30318
|
-
["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (
|
|
30323
|
+
let L = !1;
|
|
30324
|
+
["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (L = !0), N.disabled = !0, N.isLeaf = !1, N.children = p(
|
|
30319
30325
|
$.target,
|
|
30320
30326
|
{
|
|
30321
30327
|
depth: y + 1,
|
|
30322
30328
|
maxDepth: S,
|
|
30323
30329
|
prefix: N.key,
|
|
30324
30330
|
exclude: ["id", ...systemKeys],
|
|
30325
|
-
disabled:
|
|
30331
|
+
disabled: L
|
|
30326
30332
|
},
|
|
30327
30333
|
I
|
|
30328
30334
|
);
|
|
@@ -30376,12 +30382,12 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
30376
30382
|
const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
|
|
30377
30383
|
var I;
|
|
30378
30384
|
(I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
|
|
30379
|
-
var
|
|
30385
|
+
var L, M, k;
|
|
30380
30386
|
const D = R || F, $ = T["x-collection-field"] && n(T["x-collection-field"]), B = T.name.includes("."), N = $ && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes($.type), j = !N && B ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? j : D + "." + j;
|
|
30381
|
-
if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((
|
|
30387
|
+
if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((L = T["x-component-props"]) == null ? void 0 : L.mode)) && C.add(w), $ && (N || B) && T["x-component"] !== "TableField") {
|
|
30382
30388
|
if (f.add({ name: w, fieldMode: ((M = T["x-component-props"]) == null ? void 0 : M.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
|
|
30383
|
-
const
|
|
30384
|
-
b(T,
|
|
30389
|
+
const O = D && D !== "" ? D + "." + T.name : T.name;
|
|
30390
|
+
b(T, O);
|
|
30385
30391
|
}
|
|
30386
30392
|
} else
|
|
30387
30393
|
[
|
|
@@ -37704,10 +37710,10 @@ const enabledIndexColumn$1 = {
|
|
|
37704
37710
|
name: "fieldSettings:component:CascadeSelect",
|
|
37705
37711
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
37706
37712
|
}), SchemaSettingsDateRange = function e(t) {
|
|
37707
|
-
var R, T, D, $, B, N, j, w,
|
|
37708
|
-
const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = (($ = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : $.dateFormat) || ((N = (B = u == null ? void 0 : u.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.timeFormat) || ((
|
|
37713
|
+
var R, T, D, $, B, N, j, w, L, M, k, O, q, V, E, G;
|
|
37714
|
+
const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = (($ = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : $.dateFormat) || ((N = (B = u == null ? void 0 : u.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((j = o == null ? void 0 : o["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 = ((M = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : M.picker) || ((O = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : O.picker) || "date";
|
|
37709
37715
|
o["x-read-pretty"] || n.readOnly || n.readPretty;
|
|
37710
|
-
const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (
|
|
37716
|
+
const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (V = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, y = useRecord(), { form: S } = useFormBlockContext(), v = useCallback(
|
|
37711
37717
|
(U) => /* @__PURE__ */ jsx(
|
|
37712
37718
|
SchemaComponent,
|
|
37713
37719
|
{
|
|
@@ -37794,8 +37800,8 @@ const enabledIndexColumn$1 = {
|
|
|
37794
37800
|
}), H["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
|
|
37795
37801
|
const K = n.path.entire.split(".");
|
|
37796
37802
|
K.pop();
|
|
37797
|
-
const
|
|
37798
|
-
n.query(`${
|
|
37803
|
+
const X = K.join(".");
|
|
37804
|
+
n.query(`${X}.*[0:].${o.name}`).forEach((W) => {
|
|
37799
37805
|
W.props.name === o.name && W.setComponentProps({
|
|
37800
37806
|
_maxDate: I(U == null ? void 0 : U._maxDate),
|
|
37801
37807
|
_minDate: I(U == null ? void 0 : U._minDate)
|
|
@@ -39187,7 +39193,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39187
39193
|
_.isFunction(C) ? o.current = C(o.current) : o.current = C;
|
|
39188
39194
|
}, []), u = useCallback(
|
|
39189
39195
|
(C, b, y) => z(void 0, null, function* () {
|
|
39190
|
-
var w,
|
|
39196
|
+
var w, L;
|
|
39191
39197
|
const S = C.split("."), v = S[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
39192
39198
|
let I = mergeCtxWithLocalVariables(o.current, b);
|
|
39193
39199
|
const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
|
|
@@ -39204,11 +39210,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39204
39210
|
};
|
|
39205
39211
|
if (_.isFunction(I))
|
|
39206
39212
|
break;
|
|
39207
|
-
const k = S[M],
|
|
39213
|
+
const k = S[M], O = S.slice(0, M + 1).join("."), { fieldPath: q } = getFieldPath$1(O, F), V = r(q, T), E = (L = a($, T)) == null ? void 0 : L.getPrimaryKey();
|
|
39208
39214
|
if (Array.isArray(I)) {
|
|
39209
39215
|
const G = I.map((U) => {
|
|
39210
|
-
if (!(y != null && y.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U,
|
|
39211
|
-
const H = `/${$}/${U[
|
|
39216
|
+
if (!(y != null && y.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U, O) && (U == null ? void 0 : U[E]) != null && V != null && V.target) {
|
|
39217
|
+
const H = `/${$}/${U[V.sourceKey || E]}/${k}:${getAction(V.type)}`;
|
|
39212
39218
|
if (hasRequested(H))
|
|
39213
39219
|
return getRequested(H);
|
|
39214
39220
|
const K = n.request({
|
|
@@ -39217,14 +39223,14 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39217
39223
|
params: {
|
|
39218
39224
|
appends: y == null ? void 0 : y.appends
|
|
39219
39225
|
}
|
|
39220
|
-
}).then((
|
|
39226
|
+
}).then((X) => (clearRequested(H), X.data.data));
|
|
39221
39227
|
return stashRequested(H, K), K;
|
|
39222
39228
|
}
|
|
39223
39229
|
return U == null ? void 0 : U[k];
|
|
39224
39230
|
});
|
|
39225
|
-
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)),
|
|
39226
|
-
} else if (!(y != null && y.doNotRequest) && shouldToRequest(I[k], I,
|
|
39227
|
-
const G = `/${$}/${I[
|
|
39231
|
+
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
|
|
39232
|
+
} else if (!(y != null && y.doNotRequest) && shouldToRequest(I[k], I, O) && I[E] != null && (V != null && V.target)) {
|
|
39233
|
+
const G = `/${$}/${I[V.sourceKey || E]}/${k}:${getAction(V.type)}`;
|
|
39228
39234
|
let U = null;
|
|
39229
39235
|
if (hasRequested(G))
|
|
39230
39236
|
U = yield getRequested(G);
|
|
@@ -39239,10 +39245,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39239
39245
|
stashRequested(G, K), U = yield K, clearRequested(G);
|
|
39240
39246
|
}
|
|
39241
39247
|
const H = U.data.data;
|
|
39242
|
-
I = removeThroughCollectionFields(H,
|
|
39248
|
+
I = removeThroughCollectionFields(H, V);
|
|
39243
39249
|
} else
|
|
39244
|
-
I = removeThroughCollectionFields(getValuesByPath(I, k),
|
|
39245
|
-
|
|
39250
|
+
I = removeThroughCollectionFields(getValuesByPath(I, k), V);
|
|
39251
|
+
V != null && V.target && ($ = V.target);
|
|
39246
39252
|
}
|
|
39247
39253
|
const j = i(
|
|
39248
39254
|
_.isFunction(I) ? yield I({
|
|
@@ -39791,7 +39797,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39791
39797
|
}
|
|
39792
39798
|
}), handleError = console.log, Action = withDynamicSchemaProps(
|
|
39793
39799
|
React.memo((e) => {
|
|
39794
|
-
var
|
|
39800
|
+
var X;
|
|
39795
39801
|
const K = useProps(e), {
|
|
39796
39802
|
popover: t,
|
|
39797
39803
|
containerRefKey: o,
|
|
@@ -39831,20 +39837,20 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39831
39837
|
"onMouseEnter",
|
|
39832
39838
|
"refreshDataBlockRequest",
|
|
39833
39839
|
"confirmTitle"
|
|
39834
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((
|
|
39840
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((X = I["x-component-props"]) == null ? void 0 : X.confirm) || g, $ = useMemo(
|
|
39835
39841
|
() => {
|
|
39836
39842
|
var W;
|
|
39837
|
-
return ((W = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : W.filter((
|
|
39843
|
+
return ((W = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : W.filter((J) => !J.disabled)) || [];
|
|
39838
39844
|
},
|
|
39839
39845
|
[I == null ? void 0 : I["x-linkage-rules"]]
|
|
39840
|
-
), { designable: B } = useDesignable(), N = useComponent(n) || n, j = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL:
|
|
39846
|
+
), { designable: B } = useDesignable(), N = useComponent(n) || n, j = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: L, setVisibleWithURL: M } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: O } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: E } = useAllDataBlocks(), G = useForm();
|
|
39841
39847
|
useEffect(() => {
|
|
39842
39848
|
F.stateOfLinkageRules && setInitialActionState(F);
|
|
39843
|
-
const W = uid(),
|
|
39849
|
+
const W = uid(), J = [];
|
|
39844
39850
|
return setTimeout(() => {
|
|
39845
39851
|
G.addEffects(W, () => {
|
|
39846
39852
|
forEachLinkageRule($, (Z, Q) => {
|
|
39847
|
-
|
|
39853
|
+
J.push(
|
|
39848
39854
|
reaction(
|
|
39849
39855
|
() => [getVariableValuesInCondition({ linkageRules: $, localVariables: w })].map((re) => JSON.stringify(re)).join(","),
|
|
39850
39856
|
() => {
|
|
@@ -39858,7 +39864,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39858
39864
|
conditionType: Q.conditionType,
|
|
39859
39865
|
variableNameOfLeftCondition: "$nRecord"
|
|
39860
39866
|
},
|
|
39861
|
-
|
|
39867
|
+
V.jsonLogic
|
|
39862
39868
|
);
|
|
39863
39869
|
},
|
|
39864
39870
|
{ fireImmediately: !0, equals: isEqual }
|
|
@@ -39867,7 +39873,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39867
39873
|
});
|
|
39868
39874
|
});
|
|
39869
39875
|
}), () => {
|
|
39870
|
-
G.removeEffects(W),
|
|
39876
|
+
G.removeEffects(W), J.forEach((Z) => {
|
|
39871
39877
|
Z();
|
|
39872
39878
|
});
|
|
39873
39879
|
};
|
|
@@ -39877,11 +39883,11 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39877
39883
|
C == null || C(W);
|
|
39878
39884
|
},
|
|
39879
39885
|
[C]
|
|
39880
|
-
), H = useMemo(() => c && ((W,
|
|
39886
|
+
), H = useMemo(() => c && ((W, J) => z(void 0, null, function* () {
|
|
39881
39887
|
var Q, ee;
|
|
39882
|
-
yield c == null ? void 0 : c(W,
|
|
39888
|
+
yield c == null ? void 0 : c(W, J);
|
|
39883
39889
|
const Z = ((ee = (Q = I["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ee.blocksToRefresh) || [];
|
|
39884
|
-
Z.length > 0 &&
|
|
39890
|
+
Z.length > 0 && E().forEach((oe) => {
|
|
39885
39891
|
var re;
|
|
39886
39892
|
if (Z.includes(oe.uid))
|
|
39887
39893
|
try {
|
|
@@ -39890,7 +39896,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39890
39896
|
console.error("Failed to refresh block:", oe.uid, ie);
|
|
39891
39897
|
}
|
|
39892
39898
|
});
|
|
39893
|
-
})), [c, I,
|
|
39899
|
+
})), [c, I, E]);
|
|
39894
39900
|
return /* @__PURE__ */ jsx(VariableScope, { scopeId: I == null ? void 0 : I["x-uid"], type: "action", children: /* @__PURE__ */ jsx(
|
|
39895
39901
|
InternalAction,
|
|
39896
39902
|
x({
|
|
@@ -39915,10 +39921,10 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39915
39921
|
style: u,
|
|
39916
39922
|
propsDisabled: m,
|
|
39917
39923
|
useAction: r,
|
|
39918
|
-
visibleWithURL:
|
|
39924
|
+
visibleWithURL: L,
|
|
39919
39925
|
setVisibleWithURL: M,
|
|
39920
39926
|
setSubmitted: k,
|
|
39921
|
-
getAriaLabel:
|
|
39927
|
+
getAriaLabel: O,
|
|
39922
39928
|
parentRecordData: q,
|
|
39923
39929
|
actionCallback: h
|
|
39924
39930
|
}, S)
|
|
@@ -39983,12 +39989,12 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39983
39989
|
"setSubmitted",
|
|
39984
39990
|
"getAriaLabel",
|
|
39985
39991
|
"parentRecordData"
|
|
39986
|
-
]), [w,
|
|
39987
|
-
run:
|
|
39992
|
+
]), [w, L] = useState(!1), { wrapSSR: M, componentCls: k, hashId: O } = useStyles$8(), [q, V] = useState(!1), E = n["x-toolbar-props"] || n["x-designer-props"], G = (ge = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ge.openMode, U = (Ce = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : Ce.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: K } = App.useApp(), X = useForm(), W = useACLActionParamsContext(), {
|
|
39993
|
+
run: J,
|
|
39988
39994
|
element: Z,
|
|
39989
39995
|
disabled: Q,
|
|
39990
39996
|
loading: ee
|
|
39991
|
-
} = (I == null ? void 0 : I(R)) || {}, oe =
|
|
39997
|
+
} = (I == null ? void 0 : I(R)) || {}, oe = X.disabled || a.disabled || ((xe = a.data) == null ? void 0 : xe.disabled) || F || Q, re = useMemo(() => {
|
|
39992
39998
|
var de;
|
|
39993
39999
|
return P(x({}, v), {
|
|
39994
40000
|
opacity: r && (((de = a == null ? void 0 : a.data) == null ? void 0 : de.hidden) || !W) && 0.1,
|
|
@@ -40004,9 +40010,9 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40004
40010
|
buttonStyle: re,
|
|
40005
40011
|
handleMouseEnter: c,
|
|
40006
40012
|
tarComponent: u,
|
|
40007
|
-
designerProps:
|
|
40013
|
+
designerProps: E,
|
|
40008
40014
|
componentCls: k,
|
|
40009
|
-
hashId:
|
|
40015
|
+
hashId: O,
|
|
40010
40016
|
className: d,
|
|
40011
40017
|
others: j,
|
|
40012
40018
|
getAriaLabel: B,
|
|
@@ -40015,8 +40021,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40015
40021
|
onClick: h,
|
|
40016
40022
|
refreshDataBlockRequest: H,
|
|
40017
40023
|
fieldSchema: n,
|
|
40018
|
-
setVisible:
|
|
40019
|
-
run:
|
|
40024
|
+
setVisible: L,
|
|
40025
|
+
run: J,
|
|
40020
40026
|
confirm: g,
|
|
40021
40027
|
modal: K,
|
|
40022
40028
|
setSubmitted: $,
|
|
@@ -40024,7 +40030,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40024
40030
|
title: S
|
|
40025
40031
|
}, pe = useCallback(
|
|
40026
40032
|
(de) => {
|
|
40027
|
-
|
|
40033
|
+
L == null || L(de), D == null || D(de);
|
|
40028
40034
|
},
|
|
40029
40035
|
[D]
|
|
40030
40036
|
);
|
|
@@ -40035,7 +40041,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40035
40041
|
visible: w || T,
|
|
40036
40042
|
setVisible: pe,
|
|
40037
40043
|
formValueChanged: q,
|
|
40038
|
-
setFormValueChanged:
|
|
40044
|
+
setFormValueChanged: V,
|
|
40039
40045
|
openMode: G,
|
|
40040
40046
|
openSize: U,
|
|
40041
40047
|
containerRefKey: o,
|
|
@@ -40123,26 +40129,26 @@ const RenderButton = ({
|
|
|
40123
40129
|
confirmTitle: D,
|
|
40124
40130
|
title: $
|
|
40125
40131
|
}) => {
|
|
40126
|
-
const { getDataBlockRequest: B } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: w } = usePopupUtils(),
|
|
40132
|
+
const { getDataBlockRequest: B } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: w } = usePopupUtils(), L = useVariables$1(), M = useLocalVariables$1(), k = useRef(null), O = useCompile(), q = useForm();
|
|
40127
40133
|
k.current = w;
|
|
40128
|
-
const
|
|
40129
|
-
variables:
|
|
40134
|
+
const V = {
|
|
40135
|
+
variables: L,
|
|
40130
40136
|
localVariables: M
|
|
40131
|
-
},
|
|
40137
|
+
}, E = useCallback(
|
|
40132
40138
|
(G, U = !0) => z(void 0, null, function* () {
|
|
40133
|
-
var
|
|
40139
|
+
var X;
|
|
40134
40140
|
if (U && isPortalInBody(G.target))
|
|
40135
40141
|
return;
|
|
40136
40142
|
G.preventDefault(), G.stopPropagation();
|
|
40137
|
-
const H = yield getVariableValue(N(I == null ? void 0 : I.title, { title:
|
|
40143
|
+
const H = yield getVariableValue(N(I == null ? void 0 : I.title, { title: O(S.title) }), V), K = yield getVariableValue(N(I == null ? void 0 : I.content, { title: O(S.title) }), V);
|
|
40138
40144
|
if (!a && o) {
|
|
40139
40145
|
const W = () => {
|
|
40140
40146
|
b ? b(G, () => {
|
|
40141
|
-
var
|
|
40142
|
-
y !== !1 && (T == null || T(!0), (Z = (
|
|
40147
|
+
var J, Z;
|
|
40148
|
+
y !== !1 && (T == null || T(!0), (Z = (J = B()) == null ? void 0 : J.refresh) == null || Z.call(J));
|
|
40143
40149
|
}) : isBulkEditAction(S) || !j() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(S["x-action"]) && S["x-uid"] ? k.current() : (v(!0), F == null || F());
|
|
40144
40150
|
};
|
|
40145
|
-
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (
|
|
40151
|
+
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (X = q == null ? void 0 : q.submit) == null ? void 0 : X.call(q), R.confirm({
|
|
40146
40152
|
title: N(H, { title: D || $ || (t == null ? void 0 : t.title) }),
|
|
40147
40153
|
content: N(K, { title: D || $ || (t == null ? void 0 : t.title) }),
|
|
40148
40154
|
onOk: W
|
|
@@ -40182,7 +40188,7 @@ const RenderButton = ({
|
|
|
40182
40188
|
buttonStyle: i,
|
|
40183
40189
|
handleMouseEnter: l,
|
|
40184
40190
|
getAriaLabel: g,
|
|
40185
|
-
handleButtonClick:
|
|
40191
|
+
handleButtonClick: E,
|
|
40186
40192
|
tarComponent: c,
|
|
40187
40193
|
componentCls: d,
|
|
40188
40194
|
hashId: p,
|
|
@@ -40197,8 +40203,8 @@ const RenderButton = ({
|
|
|
40197
40203
|
RenderButton.displayName = "RenderButton";
|
|
40198
40204
|
const RenderButtonInner = observer$1(
|
|
40199
40205
|
(e) => {
|
|
40200
|
-
var M,
|
|
40201
|
-
const
|
|
40206
|
+
var M, O;
|
|
40207
|
+
const L = e, {
|
|
40202
40208
|
designable: t,
|
|
40203
40209
|
field: o,
|
|
40204
40210
|
aclCtx: n,
|
|
@@ -40219,7 +40225,7 @@ const RenderButtonInner = observer$1(
|
|
|
40219
40225
|
title: y,
|
|
40220
40226
|
isLink: S,
|
|
40221
40227
|
onlyIcon: v
|
|
40222
|
-
} =
|
|
40228
|
+
} = L, F = Y(L, [
|
|
40223
40229
|
"designable",
|
|
40224
40230
|
"field",
|
|
40225
40231
|
"aclCtx",
|
|
@@ -40242,8 +40248,8 @@ const RenderButtonInner = observer$1(
|
|
|
40242
40248
|
"onlyIcon"
|
|
40243
40249
|
]), { t: I } = useTranslation(), R = useCallback(
|
|
40244
40250
|
debounce$1(
|
|
40245
|
-
(q,
|
|
40246
|
-
d(q,
|
|
40251
|
+
(q, V = !0) => {
|
|
40252
|
+
d(q, V);
|
|
40247
40253
|
},
|
|
40248
40254
|
300,
|
|
40249
40255
|
{ leading: !0, trailing: !1 }
|
|
@@ -40256,9 +40262,9 @@ const RenderButtonInner = observer$1(
|
|
|
40256
40262
|
const T = useMemo(
|
|
40257
40263
|
() => React.forwardRef(
|
|
40258
40264
|
(K, H) => {
|
|
40259
|
-
var
|
|
40265
|
+
var X = K, { component: q = p || Button, icon: V, onlyIcon: E, children: G } = X, U = Y(X, ["component", "icon", "onlyIcon", "children"]);
|
|
40260
40266
|
return /* @__PURE__ */ jsxs(q, P(x({ ref: H }, U), { children: [
|
|
40261
|
-
v ? /* @__PURE__ */ jsx(Tooltip, { title: U.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children:
|
|
40267
|
+
v ? /* @__PURE__ */ jsx(Tooltip, { title: U.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }),
|
|
40262
40268
|
v ? G[1] : G
|
|
40263
40269
|
] }));
|
|
40264
40270
|
}
|
|
@@ -40275,7 +40281,7 @@ const RenderButtonInner = observer$1(
|
|
|
40275
40281
|
"aria-label": u()
|
|
40276
40282
|
}, F), {
|
|
40277
40283
|
onMouseEnter: c,
|
|
40278
|
-
loading: ((
|
|
40284
|
+
loading: ((O = o == null ? void 0 : o.data) == null ? void 0 : O.loading) || a,
|
|
40279
40285
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: j }) : r,
|
|
40280
40286
|
disabled: i,
|
|
40281
40287
|
style: S ? N : l,
|
|
@@ -40727,7 +40733,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40727
40733
|
), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
|
|
40728
40734
|
connect(
|
|
40729
40735
|
(e) => {
|
|
40730
|
-
var K,
|
|
40736
|
+
var K, X;
|
|
40731
40737
|
const H = e, {
|
|
40732
40738
|
fieldNames: t = {},
|
|
40733
40739
|
service: o = {},
|
|
@@ -40763,16 +40769,16 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40763
40769
|
]), b = useDataSourceKey(), y = useDataSourceHeaders(m || b), S = useRef(!1), v = useFieldSchema(), F = ((K = v["x-component-props"]) == null ? void 0 : K.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), $ = v["x-collection-field"] || v.name, B = I($) || T($), N = u || (B == null ? void 0 : B.target) && (t == null ? void 0 : t.label) && T(`${B.target}.${t.label}`), j = useMemo(() => {
|
|
40764
40770
|
var W;
|
|
40765
40771
|
if (N != null && N.interface) {
|
|
40766
|
-
const
|
|
40772
|
+
const J = D(N.interface), Z = ((W = J == null ? void 0 : J.filterable) == null ? void 0 : W.operators[0].value) || "$includes";
|
|
40767
40773
|
return N.type === "string" || N.dataType === "string" ? "$includes" : Z;
|
|
40768
40774
|
}
|
|
40769
40775
|
return "$includes";
|
|
40770
|
-
}, [N]), w = useCompile(),
|
|
40776
|
+
}, [N]), w = useCompile(), L = useCallback(
|
|
40771
40777
|
(W) => {
|
|
40772
40778
|
try {
|
|
40773
|
-
return W.filter((
|
|
40779
|
+
return W.filter((J) => ["number", "string"].includes(typeof J[t.value]) || !J[t.value]).map((J) => {
|
|
40774
40780
|
var Q;
|
|
40775
|
-
let Z = w(
|
|
40781
|
+
let Z = w(J[t.label]);
|
|
40776
40782
|
if ((Q = N == null ? void 0 : N.uiSchema) != null && Q.enum)
|
|
40777
40783
|
if (Array.isArray(Z))
|
|
40778
40784
|
Z = Z.map((ee, oe) => {
|
|
@@ -40785,18 +40791,18 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40785
40791
|
}
|
|
40786
40792
|
return (N == null ? void 0 : N.type) === "date" && (Z = dayjs(Z).format("YYYY-MM-DD")), c ? c({
|
|
40787
40793
|
[t.label]: Z || EMPTY$1,
|
|
40788
|
-
[t.value]:
|
|
40789
|
-
}) : P(x({}, omit(
|
|
40794
|
+
[t.value]: J[t.value]
|
|
40795
|
+
}) : P(x({}, omit(J, "style")), {
|
|
40790
40796
|
[t.label]: Z || EMPTY$1,
|
|
40791
|
-
[t.value]:
|
|
40797
|
+
[t.value]: J[t.value]
|
|
40792
40798
|
});
|
|
40793
40799
|
}).filter(Boolean);
|
|
40794
|
-
} catch (
|
|
40795
|
-
return console.error(
|
|
40800
|
+
} catch (J) {
|
|
40801
|
+
return console.error(J), W;
|
|
40796
40802
|
}
|
|
40797
40803
|
},
|
|
40798
40804
|
[N == null ? void 0 : N.uiSchema, t]
|
|
40799
|
-
), { data: M, run: k, loading:
|
|
40805
|
+
), { data: M, run: k, loading: O } = useRequest(
|
|
40800
40806
|
P(x({
|
|
40801
40807
|
action: "list"
|
|
40802
40808
|
}, o), {
|
|
@@ -40804,7 +40810,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40804
40810
|
params: P(x({
|
|
40805
40811
|
pageSize: 200
|
|
40806
40812
|
}, o == null ? void 0 : o.params), {
|
|
40807
|
-
filter: (
|
|
40813
|
+
filter: (X = o == null ? void 0 : o.params) == null ? void 0 : X.filter
|
|
40808
40814
|
})
|
|
40809
40815
|
}),
|
|
40810
40816
|
x({
|
|
@@ -40818,7 +40824,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40818
40824
|
fieldNames: t
|
|
40819
40825
|
}),
|
|
40820
40826
|
[o, t]
|
|
40821
|
-
),
|
|
40827
|
+
), V = useCallback(() => R.current && d ? /* @__PURE__ */ jsx(
|
|
40822
40828
|
d,
|
|
40823
40829
|
{
|
|
40824
40830
|
search: R.current,
|
|
@@ -40830,8 +40836,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40830
40836
|
useEffect(() => {
|
|
40831
40837
|
S.current && k();
|
|
40832
40838
|
}, [q]);
|
|
40833
|
-
const
|
|
40834
|
-
var
|
|
40839
|
+
const E = (W) => z(void 0, null, function* () {
|
|
40840
|
+
var J;
|
|
40835
40841
|
k({
|
|
40836
40842
|
filter: mergeFilter([
|
|
40837
40843
|
W ? {
|
|
@@ -40839,7 +40845,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40839
40845
|
[j]: W
|
|
40840
40846
|
}
|
|
40841
40847
|
} : {},
|
|
40842
|
-
(
|
|
40848
|
+
(J = o == null ? void 0 : o.params) == null ? void 0 : J.filter
|
|
40843
40849
|
])
|
|
40844
40850
|
}), R.current = W;
|
|
40845
40851
|
}), G = useMemo(() => {
|
|
@@ -40847,8 +40853,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40847
40853
|
const W = r || a;
|
|
40848
40854
|
if (!((Q = M == null ? void 0 : M.data) != null && Q.length))
|
|
40849
40855
|
return W != null ? Array.isArray(W) ? W : [W] : [];
|
|
40850
|
-
const
|
|
40851
|
-
return uniqBy(Z.concat(
|
|
40856
|
+
const J = W != null && (Array.isArray(W) ? W.map((ee) => P(x({}, ee), { [t.value]: ee[t.value] || ee })) : [P(x({}, W), { [t.value]: W[t.value] || W })]) || [], Z = typeof p == "function" ? M.data.filter(p) : M.data;
|
|
40857
|
+
return uniqBy(Z.concat(J != null ? J : []), t.value);
|
|
40852
40858
|
}, [r, a, M == null ? void 0 : M.data, t.value, p]);
|
|
40853
40859
|
return /* @__PURE__ */ jsx(
|
|
40854
40860
|
Select,
|
|
@@ -40858,7 +40864,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40858
40864
|
filterOption: !1,
|
|
40859
40865
|
filterSort: null,
|
|
40860
40866
|
fieldNames: t,
|
|
40861
|
-
onSearch:
|
|
40867
|
+
onSearch: E,
|
|
40862
40868
|
onDropdownVisibleChange: (W) => {
|
|
40863
40869
|
R.current = null, W && k(), S.current = !0;
|
|
40864
40870
|
},
|
|
@@ -40866,15 +40872,15 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
40866
40872
|
value: r,
|
|
40867
40873
|
defaultValue: a
|
|
40868
40874
|
}, C), {
|
|
40869
|
-
loading: M ?
|
|
40870
|
-
options: h(
|
|
40875
|
+
loading: M ? O : !0,
|
|
40876
|
+
options: h(L(G)),
|
|
40871
40877
|
rawOptions: G,
|
|
40872
40878
|
dropdownRender: (W) => {
|
|
40873
|
-
const
|
|
40879
|
+
const J = G.some((Z) => Z[t.label] === R.current);
|
|
40874
40880
|
return /* @__PURE__ */ jsx(Fragment$1, { children: F ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
40875
40881
|
!((M == null ? void 0 : M.data.length) === 0 && (R != null && R.current)) && W,
|
|
40876
|
-
(M == null ? void 0 : M.data.length) > 0 && (R == null ? void 0 : R.current) && !
|
|
40877
|
-
!
|
|
40882
|
+
(M == null ? void 0 : M.data.length) > 0 && (R == null ? void 0 : R.current) && !J && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
40883
|
+
!J && /* @__PURE__ */ jsx(V, {})
|
|
40878
40884
|
] }) : W });
|
|
40879
40885
|
}
|
|
40880
40886
|
})
|
|
@@ -41885,8 +41891,8 @@ const insertPositionToMethod = {
|
|
|
41885
41891
|
), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
|
|
41886
41892
|
(B) => {
|
|
41887
41893
|
onFieldChange("target", (N) => {
|
|
41888
|
-
var w,
|
|
41889
|
-
const [, j] = ((
|
|
41894
|
+
var w, L;
|
|
41895
|
+
const [, j] = ((L = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : L.call(w, "||")) || [];
|
|
41890
41896
|
N.query("position").take((M) => {
|
|
41891
41897
|
M.dataSource = j === "Menu.SubMenu" ? [
|
|
41892
41898
|
{ label: l("Before"), value: "beforeBegin" },
|
|
@@ -41937,7 +41943,7 @@ const insertPositionToMethod = {
|
|
|
41937
41943
|
const S = useCallback(
|
|
41938
41944
|
({ title: B, icon: N, href: j, params: w }) => {
|
|
41939
41945
|
var M;
|
|
41940
|
-
const
|
|
41946
|
+
const L = {
|
|
41941
41947
|
"x-uid": n["x-uid"],
|
|
41942
41948
|
"x-server-hooks": [
|
|
41943
41949
|
{
|
|
@@ -41946,8 +41952,8 @@ const insertPositionToMethod = {
|
|
|
41946
41952
|
}
|
|
41947
41953
|
]
|
|
41948
41954
|
};
|
|
41949
|
-
B && (n.title = B, o.title = B,
|
|
41950
|
-
schema:
|
|
41955
|
+
B && (n.title = B, o.title = B, L.title = B, i()), o.componentProps.icon = N, o.componentProps.href = j, o.componentProps.params = w, L["x-component-props"] = { icon: N, href: j, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = N, n["x-component-props"].href = j, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
|
|
41956
|
+
schema: L
|
|
41951
41957
|
}), (M = n.__route__) != null && M.id && e(n.__route__.id, {
|
|
41952
41958
|
title: B,
|
|
41953
41959
|
icon: N,
|
|
@@ -41996,26 +42002,26 @@ const insertPositionToMethod = {
|
|
|
41996
42002
|
const [w] = ((q = B == null ? void 0 : B.split) == null ? void 0 : q.call(B, "||")) || [];
|
|
41997
42003
|
if (!w)
|
|
41998
42004
|
return;
|
|
41999
|
-
const
|
|
42005
|
+
const L = findByUid(c, w), M = createDesignable({
|
|
42000
42006
|
t: l,
|
|
42001
42007
|
api: r,
|
|
42002
42008
|
refresh: i,
|
|
42003
|
-
current:
|
|
42009
|
+
current: L
|
|
42004
42010
|
}), k = {
|
|
42005
42011
|
beforeBegin: "insertBefore",
|
|
42006
42012
|
afterEnd: "insertAfter"
|
|
42007
|
-
},
|
|
42013
|
+
}, O = N === "beforeEnd" ? {
|
|
42008
42014
|
targetScope: {
|
|
42009
|
-
parentId:
|
|
42015
|
+
parentId: L.__route__.id
|
|
42010
42016
|
}
|
|
42011
42017
|
} : {
|
|
42012
|
-
targetId:
|
|
42018
|
+
targetId: L.__route__.id
|
|
42013
42019
|
};
|
|
42014
42020
|
yield I(x({
|
|
42015
42021
|
sourceId: n.__route__.id,
|
|
42016
42022
|
sortField: "sort",
|
|
42017
42023
|
method: k[N]
|
|
42018
|
-
},
|
|
42024
|
+
}, O)), M.loadAPIClientEvents(), M.insertAdjacent(N, n);
|
|
42019
42025
|
}),
|
|
42020
42026
|
[c, l, r, i, I, n]
|
|
42021
42027
|
), T = useMemo(() => ({
|
|
@@ -43342,15 +43348,15 @@ const FieldsTreeSelect = (e) => {
|
|
|
43342
43348
|
"loadData",
|
|
43343
43349
|
"includeFieldPaths"
|
|
43344
43350
|
]), p = useCompile(), { t: m } = useTranslation(), [h, g] = useState({}), f = a({ collection: r }), [C, b] = parseCollectionName(f), y = useApp(), { collectionManager: S } = y.dataSourceManager.getDataSource(C), v = (j, w) => {
|
|
43345
|
-
const
|
|
43346
|
-
return
|
|
43351
|
+
const L = S.getCollection(j);
|
|
43352
|
+
return L ? L.getAllFields(w) : [];
|
|
43347
43353
|
}, F = Object.values(h), I = useMemo(() => e.multiple ? (o || []).map((j) => h[j]).filter(Boolean) : o, [o, e.multiple, h]), R = useCallback(
|
|
43348
43354
|
(j) => z(void 0, null, function* () {
|
|
43349
43355
|
if (c != null)
|
|
43350
43356
|
return c(j);
|
|
43351
43357
|
if (!j.isLeaf && j.loadChildren) {
|
|
43352
43358
|
const w = j.loadChildren(j);
|
|
43353
|
-
g((
|
|
43359
|
+
g((L) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, L)));
|
|
43354
43360
|
}
|
|
43355
43361
|
}),
|
|
43356
43362
|
[c]
|
|
@@ -43362,28 +43368,28 @@ const FieldsTreeSelect = (e) => {
|
|
|
43362
43368
|
title: l.label,
|
|
43363
43369
|
fullTitle: l.label,
|
|
43364
43370
|
isLeaf: !1
|
|
43365
|
-
}) : null,
|
|
43366
|
-
j && (
|
|
43371
|
+
}) : null, L = (c === null ? [] : getCollectionFieldOptions.call({ compile: p, getCollectionFields: v, filter: i }, b, j)).reduce((M, k) => Object.assign(M, { [k.value]: k }), {});
|
|
43372
|
+
j && (L[j.value] = j), g(L);
|
|
43367
43373
|
}, [f, l, i, c]), useEffect(() => {
|
|
43368
43374
|
const j = e.multiple ? o : o ? [o] : [];
|
|
43369
|
-
if (!(j != null && j.length) || j.every((
|
|
43375
|
+
if (!(j != null && j.length) || j.every((L) => !!h[L]))
|
|
43370
43376
|
return;
|
|
43371
43377
|
const w = [];
|
|
43372
|
-
j.forEach((
|
|
43373
|
-
const M =
|
|
43378
|
+
j.forEach((L) => {
|
|
43379
|
+
const M = L.split(".");
|
|
43374
43380
|
let k = h[M[0]];
|
|
43375
|
-
for (let
|
|
43376
|
-
const q = M.slice(0,
|
|
43381
|
+
for (let O = 1; O < M.length && k; O++) {
|
|
43382
|
+
const q = M.slice(0, O + 1).join(".");
|
|
43377
43383
|
if (h[q]) {
|
|
43378
43384
|
k = h[q];
|
|
43379
43385
|
break;
|
|
43380
43386
|
}
|
|
43381
43387
|
if (!k.isLeaf && k.loadChildren) {
|
|
43382
|
-
const
|
|
43383
|
-
|
|
43388
|
+
const V = k.loadChildren(k);
|
|
43389
|
+
V != null && V.length && (w.push(...V), k = V.find((E) => E.value === M.slice(0, O + 1).join(".")));
|
|
43384
43390
|
}
|
|
43385
43391
|
}
|
|
43386
|
-
}), g((
|
|
43392
|
+
}), g((L) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, L)));
|
|
43387
43393
|
}, [o, F.length, e.multiple]);
|
|
43388
43394
|
const T = useCallback(
|
|
43389
43395
|
(j) => {
|
|
@@ -43391,30 +43397,30 @@ const FieldsTreeSelect = (e) => {
|
|
|
43391
43397
|
n(j);
|
|
43392
43398
|
return;
|
|
43393
43399
|
}
|
|
43394
|
-
const w = j.map((k) => k.value).filter(Boolean),
|
|
43400
|
+
const w = j.map((k) => k.value).filter(Boolean), L = new Set(w), M = I.find((k) => !L.has(k.value));
|
|
43395
43401
|
if (M) {
|
|
43396
43402
|
const k = `${M.value}.`;
|
|
43397
|
-
Object.keys(h).forEach((
|
|
43398
|
-
|
|
43403
|
+
Object.keys(h).forEach((O) => {
|
|
43404
|
+
O.startsWith(k) && L.delete(O);
|
|
43399
43405
|
});
|
|
43400
43406
|
} else
|
|
43401
43407
|
u && w.forEach((k) => {
|
|
43402
|
-
const
|
|
43403
|
-
if (
|
|
43404
|
-
for (let q = 1; q <=
|
|
43405
|
-
|
|
43408
|
+
const O = k.split(".");
|
|
43409
|
+
if (O.length)
|
|
43410
|
+
for (let q = 1; q <= O.length; q++)
|
|
43411
|
+
L.add(O.slice(0, q).join("."));
|
|
43406
43412
|
});
|
|
43407
|
-
n(Array.from(
|
|
43413
|
+
n(Array.from(L));
|
|
43408
43414
|
},
|
|
43409
43415
|
[e.multiple, I, n, h]
|
|
43410
43416
|
), D = useCallback(
|
|
43411
43417
|
(j) => {
|
|
43412
43418
|
var q;
|
|
43413
|
-
const { value: w, onClose:
|
|
43419
|
+
const { value: w, onClose: L, disabled: M, closable: k } = j;
|
|
43414
43420
|
if (!w)
|
|
43415
43421
|
return null;
|
|
43416
|
-
const { fullTitle:
|
|
43417
|
-
return /* @__PURE__ */ jsx(Tag, { closable: k && !M, onClose:
|
|
43422
|
+
const { fullTitle: O } = (q = h[w]) != null ? q : {};
|
|
43423
|
+
return /* @__PURE__ */ jsx(Tag, { closable: k && !M, onClose: L, children: O == null ? void 0 : O.join(" / ") });
|
|
43418
43424
|
},
|
|
43419
43425
|
[h]
|
|
43420
43426
|
), $ = Array.isArray(I) ? I.filter((j) => j.value in h) : I, B = e.multiple ? o : o != null ? [o] : [];
|
|
@@ -43472,21 +43478,21 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
43472
43478
|
const B = uid();
|
|
43473
43479
|
return f.addEffects(B, () => {
|
|
43474
43480
|
onFieldInputValueChange("*", (N) => {
|
|
43475
|
-
var M, k,
|
|
43476
|
-
const j = filterAnalyses((
|
|
43477
|
-
j.includes((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((
|
|
43481
|
+
var M, k, O, q, V, E;
|
|
43482
|
+
const j = filterAnalyses((O = (k = (M = r.componentProps) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : O.filter) || [], w = getFieldPath(N.address.entire), L = getFieldPath(r.address.entire);
|
|
43483
|
+
j.includes((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((V = N == null ? void 0 : N.props) == null ? void 0 : V.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, L)) && (r.setValue(null), p(null));
|
|
43478
43484
|
});
|
|
43479
43485
|
}), () => {
|
|
43480
43486
|
f.removeEffects(B);
|
|
43481
43487
|
};
|
|
43482
43488
|
}, []);
|
|
43483
43489
|
const R = (B) => z(void 0, null, function* () {
|
|
43484
|
-
var
|
|
43490
|
+
var L, M;
|
|
43485
43491
|
const { search: N, callBack: j } = B, {
|
|
43486
43492
|
data: { data: w }
|
|
43487
43493
|
} = yield b.create({
|
|
43488
43494
|
values: {
|
|
43489
|
-
[((M = (
|
|
43495
|
+
[((M = (L = r == null ? void 0 : r.componentProps) == null ? void 0 : L.fieldNames) == null ? void 0 : M.label) || "id"]: N
|
|
43490
43496
|
}
|
|
43491
43497
|
});
|
|
43492
43498
|
if (w) {
|
|
@@ -44134,9 +44140,9 @@ function Uploader(o) {
|
|
|
44134
44140
|
if (m(B), a) {
|
|
44135
44141
|
const j = $.fileList.filter((w) => w.status === "done");
|
|
44136
44142
|
if (j.length) {
|
|
44137
|
-
const w = [...u, ...j.map((
|
|
44143
|
+
const w = [...u, ...j.map((L) => {
|
|
44138
44144
|
var M;
|
|
44139
|
-
return c((M =
|
|
44145
|
+
return c((M = L.response) == null ? void 0 : M.data);
|
|
44140
44146
|
})];
|
|
44141
44147
|
B.length ? d(w) : (l == null || l([...i || [], ...w]), d([]));
|
|
44142
44148
|
}
|
|
@@ -44498,10 +44504,10 @@ const InternalFileManager = (e) => {
|
|
|
44498
44504
|
setSelectedRows: u,
|
|
44499
44505
|
collectionField: b
|
|
44500
44506
|
}, R = () => {
|
|
44501
|
-
const { setVisible: B } = useActionContext(), { multiple: N, selectedRows: j, onChange: w, options:
|
|
44507
|
+
const { setVisible: B } = useActionContext(), { multiple: N, selectedRows: j, onChange: w, options: L, collectionField: M } = useContext(RecordPickerContext);
|
|
44502
44508
|
return {
|
|
44503
44509
|
onClick() {
|
|
44504
|
-
w(N ? unionBy(j,
|
|
44510
|
+
w(N ? unionBy(j, L, (M == null ? void 0 : M.targetKey) || "id") : (j == null ? void 0 : j[0]) || null), B(!1);
|
|
44505
44511
|
}
|
|
44506
44512
|
};
|
|
44507
44513
|
};
|
|
@@ -44563,36 +44569,36 @@ const InternalFileManager = (e) => {
|
|
|
44563
44569
|
useEffect(() => {
|
|
44564
44570
|
var j;
|
|
44565
44571
|
if (r) {
|
|
44566
|
-
const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r),
|
|
44572
|
+
const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r), L = (j = w == null ? void 0 : w.map) == null ? void 0 : j.call(w, (M) => ({
|
|
44567
44573
|
key: M.parentId,
|
|
44568
44574
|
children: [],
|
|
44569
44575
|
value: M
|
|
44570
44576
|
}));
|
|
44571
|
-
i(
|
|
44577
|
+
i(L);
|
|
44572
44578
|
}
|
|
44573
44579
|
}, []);
|
|
44574
44580
|
const R = useCallback(
|
|
44575
44581
|
(j) => {
|
|
44576
44582
|
try {
|
|
44577
44583
|
return j == null ? void 0 : j.filter((w) => ["number", "string"].includes(typeof w[S.value])).map((w) => {
|
|
44578
|
-
var M, k,
|
|
44579
|
-
let
|
|
44584
|
+
var M, k, O;
|
|
44585
|
+
let L = p(w[S.label]);
|
|
44580
44586
|
if ((M = v == null ? void 0 : v.uiSchema) != null && M.enum)
|
|
44581
|
-
if (Array.isArray(
|
|
44582
|
-
|
|
44587
|
+
if (Array.isArray(L))
|
|
44588
|
+
L = L.map((q, V) => {
|
|
44583
44589
|
var G, U;
|
|
44584
|
-
const
|
|
44585
|
-
return
|
|
44590
|
+
const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === q);
|
|
44591
|
+
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || q }, V) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
|
|
44586
44592
|
}).reverse();
|
|
44587
44593
|
else {
|
|
44588
|
-
const q = (
|
|
44589
|
-
q && (
|
|
44594
|
+
const q = (O = (k = v.uiSchema.enum).find) == null ? void 0 : O.call(k, (V) => V.value === L);
|
|
44595
|
+
q && (L = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
|
|
44590
44596
|
}
|
|
44591
|
-
return (v == null ? void 0 : v.type) === "date" && (
|
|
44592
|
-
[S.label]:
|
|
44597
|
+
return (v == null ? void 0 : v.type) === "date" && (L = dayjs(L).format("YYYY-MM-DD")), o ? o({
|
|
44598
|
+
[S.label]: L || EMPTY,
|
|
44593
44599
|
[S.value]: w[S.value]
|
|
44594
44600
|
}) : P(x({}, w), {
|
|
44595
|
-
[S.label]:
|
|
44601
|
+
[S.label]: L || EMPTY,
|
|
44596
44602
|
[S.value]: w[S.value]
|
|
44597
44603
|
});
|
|
44598
44604
|
}).filter(Boolean);
|
|
@@ -44602,46 +44608,46 @@ const InternalFileManager = (e) => {
|
|
|
44602
44608
|
},
|
|
44603
44609
|
[v == null ? void 0 : v.uiSchema, S]
|
|
44604
44610
|
), T = (j) => z(void 0, null, function* () {
|
|
44605
|
-
var
|
|
44611
|
+
var L, M;
|
|
44606
44612
|
const w = yield C.list({
|
|
44607
44613
|
pageSize: 200,
|
|
44608
44614
|
params: h == null ? void 0 : h.params,
|
|
44609
|
-
filter: mergeFilter([j, (
|
|
44615
|
+
filter: mergeFilter([j, (L = h == null ? void 0 : h.params) == null ? void 0 : L.filter]),
|
|
44610
44616
|
tree: j.parentId ? void 0 : !0
|
|
44611
44617
|
});
|
|
44612
44618
|
return (M = w == null ? void 0 : w.data) == null ? void 0 : M.data;
|
|
44613
|
-
}), D = (j, w,
|
|
44619
|
+
}), D = (j, w, L) => z(void 0, null, function* () {
|
|
44614
44620
|
const M = yield T({ parentId: w == null ? void 0 : w.id }), k = [...a];
|
|
44615
|
-
if (k.splice(
|
|
44616
|
-
const
|
|
44617
|
-
|
|
44621
|
+
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: (M == null ? void 0 : M.length) > 0 ? M : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
44622
|
+
const O = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
44623
|
+
O[I.index] = w, f.fieldValue = O;
|
|
44618
44624
|
} else
|
|
44619
44625
|
f.value = w;
|
|
44620
44626
|
k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
|
|
44621
|
-
}), $ = (j, w,
|
|
44622
|
-
var M, k,
|
|
44627
|
+
}), $ = (j, w, L) => z(void 0, null, function* () {
|
|
44628
|
+
var M, k, O;
|
|
44623
44629
|
if (j) {
|
|
44624
44630
|
d(!0);
|
|
44625
44631
|
const q = yield T({ parentId: w == null ? void 0 : w.key });
|
|
44626
|
-
if (d(!1), c(q),
|
|
44627
|
-
const
|
|
44628
|
-
|
|
44632
|
+
if (d(!1), c(q), L === (a == null ? void 0 : a.length) - 1 && ((M = w == null ? void 0 : w.value) != null && M.id)) {
|
|
44633
|
+
const V = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), E = [...a];
|
|
44634
|
+
E.splice(L + 1), E[L] = P(x({}, E[L]), { value: w == null ? void 0 : w.value }), E[L + 1] = { key: (O = w == null ? void 0 : w.value) == null ? void 0 : O.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(E), n == null || n(E);
|
|
44629
44635
|
}
|
|
44630
44636
|
}
|
|
44631
44637
|
}), B = (j, w) => z(void 0, null, function* () {
|
|
44632
|
-
const
|
|
44638
|
+
const L = j ? {
|
|
44633
44639
|
[S.label]: {
|
|
44634
44640
|
[F]: j
|
|
44635
44641
|
}
|
|
44636
44642
|
} : {};
|
|
44637
44643
|
d(!0);
|
|
44638
|
-
const M = yield T(P(x({},
|
|
44644
|
+
const M = yield T(P(x({}, L), {
|
|
44639
44645
|
parentId: w == null ? void 0 : w.key
|
|
44640
44646
|
}));
|
|
44641
44647
|
d(!1), c(M);
|
|
44642
44648
|
});
|
|
44643
44649
|
return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: a.map((j, w) => {
|
|
44644
|
-
var
|
|
44650
|
+
var L, M, k;
|
|
44645
44651
|
return j.children && /* @__PURE__ */ jsx(
|
|
44646
44652
|
Select$1,
|
|
44647
44653
|
{
|
|
@@ -44652,16 +44658,16 @@ const InternalFileManager = (e) => {
|
|
|
44652
44658
|
filterOption: !1,
|
|
44653
44659
|
filterSort: null,
|
|
44654
44660
|
defaultValue: {
|
|
44655
|
-
label: (
|
|
44661
|
+
label: (L = j == null ? void 0 : j.value) == null ? void 0 : L[S.label],
|
|
44656
44662
|
value: (M = j == null ? void 0 : j.value) == null ? void 0 : M[S.value]
|
|
44657
44663
|
},
|
|
44658
44664
|
labelInValue: !0,
|
|
44659
|
-
onSearch: (
|
|
44665
|
+
onSearch: (O) => B(O, j),
|
|
44660
44666
|
fieldNames: S,
|
|
44661
44667
|
style: { minWidth: 150 },
|
|
44662
|
-
onChange: (
|
|
44668
|
+
onChange: (O, q) => D(O, q, w),
|
|
44663
44669
|
options: u ? [] : R(l),
|
|
44664
|
-
onDropdownVisibleChange: (
|
|
44670
|
+
onDropdownVisibleChange: (O) => $(O, j, w),
|
|
44665
44671
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
44666
44672
|
},
|
|
44667
44673
|
`${(k = j.value) == null ? void 0 : k.id}+ ${j.key} + ${S.label}`
|
|
@@ -44962,9 +44968,9 @@ const useTableSelectorProps$2 = () => {
|
|
|
44962
44968
|
}, InternalPicker = observer$1(
|
|
44963
44969
|
(e) => {
|
|
44964
44970
|
var q;
|
|
44965
|
-
const
|
|
44966
|
-
const G =
|
|
44967
|
-
return P(x({},
|
|
44971
|
+
const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = Y(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), y = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), S = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((E) => {
|
|
44972
|
+
const G = E == null ? void 0 : E[d.label];
|
|
44973
|
+
return P(x({}, E), {
|
|
44968
44974
|
[d.label]: getLabelFormatValue$1(b(y), b(G))
|
|
44969
44975
|
});
|
|
44970
44976
|
}) : [], [t == null ? void 0 : t.length, d.label]), T = {
|
|
@@ -44981,29 +44987,29 @@ const useTableSelectorProps$2 = () => {
|
|
|
44981
44987
|
collectionField: f,
|
|
44982
44988
|
currentFormCollection: C
|
|
44983
44989
|
}, { isMobileLayout: D } = useMobileLayout(), $ = () => {
|
|
44984
|
-
var
|
|
44985
|
-
return o == null ? null : Array.isArray(t) ? (
|
|
44990
|
+
var V;
|
|
44991
|
+
return o == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((E) => E == null ? void 0 : E[d.value]) : t == null ? void 0 : t[d.value];
|
|
44986
44992
|
}, B = () => {
|
|
44987
|
-
var
|
|
44988
|
-
return o == null ? null : Array.isArray(t) ? (
|
|
44989
|
-
[d.label]: b(
|
|
44990
|
-
[d.value]:
|
|
44993
|
+
var V;
|
|
44994
|
+
return o == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((E) => ({
|
|
44995
|
+
[d.label]: b(E == null ? void 0 : E[d.label]),
|
|
44996
|
+
[d.value]: E == null ? void 0 : E[d.value]
|
|
44991
44997
|
})) : [{ [d.label]: b(t == null ? void 0 : t[d.label]), [d.value]: t == null ? void 0 : t[d.value] }];
|
|
44992
44998
|
}, N = () => {
|
|
44993
|
-
const
|
|
44994
|
-
return
|
|
44999
|
+
const V = (f == null ? void 0 : f.targetKey) || "id", E = R.map((U) => U[V]).filter(Boolean);
|
|
45000
|
+
return E.length ? { $and: [{ [`${V}.$ne`]: E }] } : {};
|
|
44995
45001
|
};
|
|
44996
45002
|
useEffect(() => {
|
|
44997
45003
|
t || F([]);
|
|
44998
45004
|
}, [t]);
|
|
44999
45005
|
const j = () => {
|
|
45000
|
-
const { setVisible:
|
|
45006
|
+
const { setVisible: V } = useActionContext(), { multiple: E, selectedRows: G, onChange: U, options: H, collectionField: K } = useContext(RecordPickerContext);
|
|
45001
45007
|
return {
|
|
45002
45008
|
onClick() {
|
|
45003
|
-
U(
|
|
45009
|
+
U(E ? unionBy(G, H, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
|
|
45004
45010
|
},
|
|
45005
45011
|
style: {
|
|
45006
|
-
display:
|
|
45012
|
+
display: E === !1 ? "none" : "block"
|
|
45007
45013
|
}
|
|
45008
45014
|
};
|
|
45009
45015
|
}, w = useMemo(
|
|
@@ -45012,7 +45018,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45012
45018
|
useTableSelectorProps: useTableSelectorProps$2
|
|
45013
45019
|
}),
|
|
45014
45020
|
[]
|
|
45015
|
-
),
|
|
45021
|
+
), L = useMemo(
|
|
45016
45022
|
() => D ? transformMultiColumnToSingleColumn(h) : h,
|
|
45017
45023
|
[D, h]
|
|
45018
45024
|
), M = useSchemaOptionsContext(), k = P(x({}, M.components), {
|
|
@@ -45032,23 +45038,23 @@ const useTableSelectorProps$2 = () => {
|
|
|
45032
45038
|
}, c), {
|
|
45033
45039
|
mode: o ? "multiple" : e.mode,
|
|
45034
45040
|
fieldNames: d,
|
|
45035
|
-
onDropdownVisibleChange: (
|
|
45041
|
+
onDropdownVisibleChange: (V) => {
|
|
45036
45042
|
g(schema$1.Selector), m(!0);
|
|
45037
45043
|
},
|
|
45038
45044
|
allowClear: !0,
|
|
45039
|
-
onChange: (
|
|
45040
|
-
if (
|
|
45041
|
-
if (Array.isArray(
|
|
45042
|
-
if (!
|
|
45045
|
+
onChange: (V) => {
|
|
45046
|
+
if (V) {
|
|
45047
|
+
if (Array.isArray(V)) {
|
|
45048
|
+
if (!V.length) {
|
|
45043
45049
|
r([]), F([]);
|
|
45044
45050
|
return;
|
|
45045
45051
|
}
|
|
45046
|
-
const
|
|
45047
|
-
r(
|
|
45052
|
+
const E = R == null ? void 0 : R.filter((G) => V.includes(G[d.value]));
|
|
45053
|
+
r(E), F(E);
|
|
45048
45054
|
}
|
|
45049
45055
|
} else {
|
|
45050
|
-
const
|
|
45051
|
-
r(
|
|
45056
|
+
const E = o ? [] : null;
|
|
45057
|
+
r(E), F(E);
|
|
45052
45058
|
}
|
|
45053
45059
|
},
|
|
45054
45060
|
options: B(),
|
|
@@ -45062,7 +45068,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45062
45068
|
onlyRenderProperties: !0,
|
|
45063
45069
|
basePath: u.address,
|
|
45064
45070
|
schema: h,
|
|
45065
|
-
filterProperties: (
|
|
45071
|
+
filterProperties: (V) => V["x-component"] === "Action"
|
|
45066
45072
|
}
|
|
45067
45073
|
) }) })
|
|
45068
45074
|
] }),
|
|
@@ -45080,8 +45086,8 @@ const useTableSelectorProps$2 = () => {
|
|
|
45080
45086
|
{
|
|
45081
45087
|
onlyRenderProperties: !0,
|
|
45082
45088
|
basePath: u.address,
|
|
45083
|
-
schema:
|
|
45084
|
-
filterProperties: (
|
|
45089
|
+
schema: L,
|
|
45090
|
+
filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
|
|
45085
45091
|
}
|
|
45086
45092
|
) }) }) }) }) }))
|
|
45087
45093
|
}
|
|
@@ -45118,10 +45124,10 @@ const RenderRecord = React.memo(
|
|
|
45118
45124
|
const R = useCallback(() => I.current, []);
|
|
45119
45125
|
return useEffect(() => {
|
|
45120
45126
|
const T = toArr$3(h).map((D, $, B) => {
|
|
45121
|
-
const N = 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(N) ? JSON.stringify(N) : N, w = toValue$4(o(j), "N/A"),
|
|
45127
|
+
const N = 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(N) ? JSON.stringify(N) : N, w = toValue$4(o(j), "N/A"), L = n(
|
|
45122
45128
|
(D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
|
|
45123
45129
|
(e == null ? void 0 : e.label) || "label"
|
|
45124
|
-
), M = getLabelFormatValue$1(o(
|
|
45130
|
+
), M = getLabelFormatValue$1(o(L), w, !0);
|
|
45125
45131
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45126
45132
|
/* @__PURE__ */ jsx("span", { children: a ? M : i !== !1 ? /* @__PURE__ */ jsx(
|
|
45127
45133
|
"a",
|
|
@@ -45130,7 +45136,7 @@ const RenderRecord = React.memo(
|
|
|
45130
45136
|
g(!0);
|
|
45131
45137
|
},
|
|
45132
45138
|
onClick: (k) => {
|
|
45133
|
-
var
|
|
45139
|
+
var O;
|
|
45134
45140
|
g(!0), k.stopPropagation(), k.preventDefault(), l && !hasAddedViewer(u.properties) && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
|
|
45135
45141
|
f == null || f({ recordData: D }), d({
|
|
45136
45142
|
recordData: D,
|
|
@@ -45140,7 +45146,7 @@ const RenderRecord = React.memo(
|
|
|
45140
45146
|
}), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
|
|
45141
45147
|
recordData: D,
|
|
45142
45148
|
parentRecordData: p
|
|
45143
|
-
})), (
|
|
45149
|
+
})), (O = m == null ? void 0 : m.current) == null || O.setPopoverVisible(!1);
|
|
45144
45150
|
},
|
|
45145
45151
|
children: M
|
|
45146
45152
|
}
|
|
@@ -45912,19 +45918,19 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45912
45918
|
}
|
|
45913
45919
|
});
|
|
45914
45920
|
Array.isArray(n.value) || (n.value = []);
|
|
45915
|
-
const D = useCallback(({ form: w, fieldSchema:
|
|
45916
|
-
var
|
|
45917
|
-
return !M || M.target && ((
|
|
45921
|
+
const D = useCallback(({ form: w, fieldSchema: L, collectionField: M, getInterface: k }) => {
|
|
45922
|
+
var O;
|
|
45923
|
+
return !M || M.target && ((O = L["x-component-props"]) != null && O.mode) && !["Picker", "Select"].includes(L["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(L) && !interfacesOfUnsupportedDefaultValue.includes(M == null ? void 0 : M.interface) && !isSystemField(M, k);
|
|
45918
45924
|
}, []), $ = () => {
|
|
45919
|
-
const { setVisible: w } = useActionContext(), { selectedRows:
|
|
45925
|
+
const { setVisible: w } = useActionContext(), { selectedRows: L, setSelectedRows: M } = useContext(RecordPickerContext);
|
|
45920
45926
|
return {
|
|
45921
45927
|
onClick() {
|
|
45922
|
-
|
|
45928
|
+
L.map((k) => n.value.push(markRecordAsNew(k))), n.onInput(n.value), n.initialValue = n.value, M([]), w(!1);
|
|
45923
45929
|
}
|
|
45924
45930
|
};
|
|
45925
|
-
}, B = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((
|
|
45926
|
-
const M =
|
|
45927
|
-
return P(x({},
|
|
45931
|
+
}, B = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
|
|
45932
|
+
const M = L == null ? void 0 : L[F.label];
|
|
45933
|
+
return P(x({}, L), {
|
|
45928
45934
|
[F.label]: getLabelFormatValue$1(I(R), I(M))
|
|
45929
45935
|
});
|
|
45930
45936
|
}) : [], [n.value, F == null ? void 0 : F.label]), N = {
|
|
@@ -45940,8 +45946,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45940
45946
|
setSelectedRows: v,
|
|
45941
45947
|
collectionField: o
|
|
45942
45948
|
}, j = () => {
|
|
45943
|
-
const w = (o == null ? void 0 : o.targetKey) || "id",
|
|
45944
|
-
return
|
|
45949
|
+
const w = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
|
|
45950
|
+
return L.length ? { $and: [{ [`${w}.$ne`]: L }] } : {};
|
|
45945
45951
|
};
|
|
45946
45952
|
return n.value.length > 0 ? /* @__PURE__ */ jsxs(
|
|
45947
45953
|
Card,
|
|
@@ -45955,31 +45961,31 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45955
45961
|
`,
|
|
45956
45962
|
children: [
|
|
45957
45963
|
/* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: C, children: [
|
|
45958
|
-
n.value.map((w,
|
|
45964
|
+
n.value.map((w, L) => {
|
|
45959
45965
|
let M = a;
|
|
45960
45966
|
return a || (M = !(w != null && w[o.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
45961
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] ||
|
|
45967
|
+
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] || L > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
|
|
45962
45968
|
CloseOutlined,
|
|
45963
45969
|
{
|
|
45964
45970
|
style: { zIndex: 1e3, color: "#a8a3a3" },
|
|
45965
45971
|
onClick: () => {
|
|
45966
45972
|
action(() => (spliceArrayState(n, {
|
|
45967
|
-
startIndex:
|
|
45973
|
+
startIndex: L,
|
|
45968
45974
|
deleteCount: 1
|
|
45969
|
-
}), n.value.splice(
|
|
45975
|
+
}), n.value.splice(L, 1), Array.isArray(n.initialValue) && n.initialValue.splice(L, 1), n.onInput(n.value)));
|
|
45970
45976
|
}
|
|
45971
45977
|
}
|
|
45972
45978
|
) }, "remove") }),
|
|
45973
|
-
/* @__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:
|
|
45979
|
+
/* @__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(
|
|
45974
45980
|
NocoBaseRecursionField,
|
|
45975
45981
|
{
|
|
45976
45982
|
onlyRenderProperties: !0,
|
|
45977
|
-
basePath: n.address.concat(
|
|
45983
|
+
basePath: n.address.concat(L),
|
|
45978
45984
|
schema: h
|
|
45979
45985
|
}
|
|
45980
45986
|
) }) }) }) }) }),
|
|
45981
45987
|
/* @__PURE__ */ jsx(Divider$1, {})
|
|
45982
|
-
] },
|
|
45988
|
+
] }, L);
|
|
45983
45989
|
}),
|
|
45984
45990
|
/* @__PURE__ */ jsxs(Space$1, { children: [
|
|
45985
45991
|
n.editable && r && /* @__PURE__ */ jsx(
|
|
@@ -45990,8 +45996,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
45990
45996
|
action(() => {
|
|
45991
45997
|
Array.isArray(n.value) || (n.value = []);
|
|
45992
45998
|
const w = n.value.length;
|
|
45993
|
-
return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (
|
|
45994
|
-
|
|
45999
|
+
return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (L, M) => {
|
|
46000
|
+
L || delete n.form.fields[M];
|
|
45995
46001
|
}), n.onInput(n.value);
|
|
45996
46002
|
});
|
|
45997
46003
|
}
|
|
@@ -46144,8 +46150,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46144
46150
|
width: I && !l ? 0 : ((B = S["x-component-props"]) == null ? void 0 : B.width) || 100,
|
|
46145
46151
|
render: (N, j) => {
|
|
46146
46152
|
var M;
|
|
46147
|
-
const w = (M = r.value) == null ? void 0 : M.indexOf(j),
|
|
46148
|
-
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: C, fieldSchema: a.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || w, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: d, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath:
|
|
46153
|
+
const w = (M = r.value) == null ? void 0 : M.indexOf(j), L = r.address.concat(j.__index || w);
|
|
46154
|
+
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: C, fieldSchema: a.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || w, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: d, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: f, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }, w) }) }) }) });
|
|
46149
46155
|
},
|
|
46150
46156
|
onCell: (N, j) => ({
|
|
46151
46157
|
record: N,
|
|
@@ -46484,7 +46490,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46484
46490
|
"onClickRow",
|
|
46485
46491
|
"enableIndexColumn"
|
|
46486
46492
|
]), S = useArrayField(y), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((de = v == null ? void 0 : v.parent) == null ? void 0 : de["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: $ } = T, B = useMemoizedFn(y.onRowDragEnd || (() => {
|
|
46487
|
-
})), N = usePaginationProps$2(o, a), j = useTableColumns$1(y, N), [w,
|
|
46493
|
+
})), N = usePaginationProps$2(o, a), j = useTableColumns$1(y, N), [w, L] = useState(() => D ? $ : []), [M, k] = useState(((be = S == null ? void 0 : S.data) == null ? void 0 : be.selectedRowKeys) || []), [O, q] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
46488
46494
|
& > td {
|
|
46489
46495
|
background-color: ${t.controlItemBgActive} !important;
|
|
46490
46496
|
}
|
|
@@ -46493,24 +46499,24 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46493
46499
|
}
|
|
46494
46500
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (se, te) => ({
|
|
46495
46501
|
onClick: (ne) => {
|
|
46496
|
-
isPortalInBody(ne.target) || C(se, q,
|
|
46502
|
+
isPortalInBody(ne.target) || C(se, q, O);
|
|
46497
46503
|
},
|
|
46498
46504
|
rowIndex: te
|
|
46499
|
-
}) : null, [C,
|
|
46505
|
+
}) : null, [C, O]);
|
|
46500
46506
|
useDeepCompareEffect(() => {
|
|
46501
46507
|
const se = D ? $ : [];
|
|
46502
|
-
_.isEqual(se, w) ||
|
|
46508
|
+
_.isEqual(se, w) || L(se);
|
|
46503
46509
|
}, [D, $]);
|
|
46504
46510
|
const K = useCallback((se) => {
|
|
46505
46511
|
if (m)
|
|
46506
|
-
return
|
|
46512
|
+
return X(se);
|
|
46507
46513
|
if (se.key)
|
|
46508
46514
|
return se.key;
|
|
46509
|
-
if (
|
|
46510
|
-
return
|
|
46515
|
+
if (E.current.has(se))
|
|
46516
|
+
return E.current.get(se);
|
|
46511
46517
|
const te = uid();
|
|
46512
|
-
return
|
|
46513
|
-
}, []),
|
|
46518
|
+
return E.current.set(se, te), te;
|
|
46519
|
+
}, []), X = useCallback(
|
|
46514
46520
|
(se) => {
|
|
46515
46521
|
var te;
|
|
46516
46522
|
return Array.isArray(m) ? m.map((ne) => {
|
|
@@ -46519,7 +46525,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46519
46525
|
}).join("-") : typeof m == "string" ? se[m] : (te = (m != null ? m : K)(se)) == null ? void 0 : te.toString();
|
|
46520
46526
|
},
|
|
46521
46527
|
[JSON.stringify(m), K]
|
|
46522
|
-
), W = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]),
|
|
46528
|
+
), W = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]), J = useMemo(() => (se) => {
|
|
46523
46529
|
const te = useCallback((ne) => {
|
|
46524
46530
|
var ke, ve, Pe, Fe, Ie, Ae;
|
|
46525
46531
|
if (!ne.active || !ne.over) {
|
|
@@ -46531,18 +46537,18 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46531
46537
|
}, []);
|
|
46532
46538
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, se)) });
|
|
46533
46539
|
}, [S, B]);
|
|
46534
|
-
|
|
46540
|
+
J.displayName = "BodyWrapperComponent";
|
|
46535
46541
|
const Z = useMemo(() => ({
|
|
46536
46542
|
header: {
|
|
46537
46543
|
wrapper: HeaderWrapperComponent,
|
|
46538
46544
|
cell: HeaderCellComponent
|
|
46539
46545
|
},
|
|
46540
46546
|
body: {
|
|
46541
|
-
wrapper:
|
|
46547
|
+
wrapper: J,
|
|
46542
46548
|
row: BodyRowComponent,
|
|
46543
46549
|
cell: BodyCellComponent
|
|
46544
46550
|
}
|
|
46545
|
-
}), [
|
|
46551
|
+
}), [J]), Q = useMemo(() => p, [JSON.stringify(p)]), ee = useMemo(
|
|
46546
46552
|
() => ({
|
|
46547
46553
|
rowSelection: b && Q ? x({
|
|
46548
46554
|
type: "checkbox",
|
|
@@ -46565,14 +46571,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46565
46571
|
role: "button",
|
|
46566
46572
|
"aria-label": `table-index-${ne}`,
|
|
46567
46573
|
className: cls(se ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
46568
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
46574
|
+
[rowSelectCheckboxWrapperClassHover]: V
|
|
46569
46575
|
}),
|
|
46570
46576
|
children: [
|
|
46571
46577
|
/* @__PURE__ */ jsxs("div", { className: cls(se ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
46572
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id:
|
|
46578
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: X(te) }),
|
|
46573
46579
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: ne })
|
|
46574
46580
|
] }),
|
|
46575
|
-
|
|
46581
|
+
V && /* @__PURE__ */ jsx(
|
|
46576
46582
|
"div",
|
|
46577
46583
|
{
|
|
46578
46584
|
className: cls(
|
|
@@ -46596,8 +46602,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46596
46602
|
c,
|
|
46597
46603
|
l,
|
|
46598
46604
|
S,
|
|
46599
|
-
|
|
46600
|
-
|
|
46605
|
+
X,
|
|
46606
|
+
V,
|
|
46601
46607
|
Q,
|
|
46602
46608
|
N,
|
|
46603
46609
|
b
|
|
@@ -46608,24 +46614,24 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46608
46614
|
return l ? React.createElement(
|
|
46609
46615
|
SortableContext$1,
|
|
46610
46616
|
{
|
|
46611
|
-
items: ((ne = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : ne.call(te,
|
|
46617
|
+
items: ((ne = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : ne.call(te, X)) || []
|
|
46612
46618
|
},
|
|
46613
46619
|
se
|
|
46614
46620
|
) : React.createElement(React.Fragment, {}, se);
|
|
46615
46621
|
},
|
|
46616
|
-
[S, l,
|
|
46622
|
+
[S, l, X]
|
|
46617
46623
|
), { height: re, tableSizeRefCallback: ie } = useTableSize(), pe = useMemo(() => ({
|
|
46618
46624
|
x: "max-content"
|
|
46619
46625
|
}), []), ce = useMemo(() => ({
|
|
46620
46626
|
x: "max-content",
|
|
46621
46627
|
y: W.length > 0 ? re : void 0
|
|
46622
46628
|
}), [re, pe, W]), fe = useCallback(
|
|
46623
|
-
(se) =>
|
|
46624
|
-
[
|
|
46629
|
+
(se) => O.includes(se[m]) ? U : "",
|
|
46630
|
+
[O, U, JSON.stringify(m)]
|
|
46625
46631
|
), ge = useCallback(
|
|
46626
46632
|
(se, te) => {
|
|
46627
46633
|
const ne = se ? [...w, te[I.getPrimaryKey()]] : w.filter((ae) => te[I.getPrimaryKey()] !== ae);
|
|
46628
|
-
|
|
46634
|
+
L(ne), g == null || g(se, te);
|
|
46629
46635
|
},
|
|
46630
46636
|
[w, g, I]
|
|
46631
46637
|
), Ce = useMemo(() => ({
|
|
@@ -46710,23 +46716,23 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46710
46716
|
}
|
|
46711
46717
|
`, SubTable = observer$1(
|
|
46712
46718
|
(e) => {
|
|
46713
|
-
var k,
|
|
46719
|
+
var k, O, q;
|
|
46714
46720
|
const { openSize: t } = e, { field: o, options: n, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(n, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: y, enableIndexColumn: S } = o.componentProps;
|
|
46715
46721
|
useSubTableSpecialCase({ rootField: o, rootSchema: r });
|
|
46716
|
-
const v = (
|
|
46717
|
-
if (
|
|
46722
|
+
const v = (V, E) => {
|
|
46723
|
+
if (E !== void 0 && isArr(o.value) && V !== E)
|
|
46718
46724
|
return action(() => {
|
|
46719
|
-
const G = o.value[
|
|
46720
|
-
return o.value.splice(
|
|
46721
|
-
fromIndex:
|
|
46722
|
-
toIndex:
|
|
46725
|
+
const G = o.value[V];
|
|
46726
|
+
return o.value.splice(V, 1), o.value.splice(E, 0, G), exchangeArrayState(o, {
|
|
46727
|
+
fromIndex: V,
|
|
46728
|
+
toIndex: E
|
|
46723
46729
|
}), o.onInput(o.value);
|
|
46724
46730
|
});
|
|
46725
46731
|
};
|
|
46726
46732
|
o.move = v;
|
|
46727
|
-
const F = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((
|
|
46728
|
-
const G =
|
|
46729
|
-
return P(x({},
|
|
46733
|
+
const F = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((E) => {
|
|
46734
|
+
const G = E == null ? void 0 : E[d.label];
|
|
46735
|
+
return P(x({}, E), {
|
|
46730
46736
|
[d.label]: getLabelFormatValue$1(m(h), m(G))
|
|
46731
46737
|
});
|
|
46732
46738
|
}) : [], [o.value, d == null ? void 0 : d.label]), I = {
|
|
@@ -46742,28 +46748,28 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46742
46748
|
setSelectedRows: u,
|
|
46743
46749
|
collectionField: n
|
|
46744
46750
|
}, R = () => {
|
|
46745
|
-
const { setVisible:
|
|
46751
|
+
const { setVisible: V } = useActionContext(), { selectedRows: E, setSelectedRows: G } = useContext(RecordPickerContext);
|
|
46746
46752
|
return {
|
|
46747
46753
|
onClick() {
|
|
46748
46754
|
var H;
|
|
46749
|
-
Array.isArray(o.value) || (o.value = []),
|
|
46755
|
+
Array.isArray(o.value) || (o.value = []), E.forEach((K) => o.value.push(markRecordAsNew(K))), o.onInput(o.value), o.initialValue = o.value, G([]), V(!1);
|
|
46750
46756
|
const U = Math.ceil(o.value.length / (((H = o.componentProps) == null ? void 0 : H.pageSize) || 10));
|
|
46751
46757
|
$(U);
|
|
46752
46758
|
}
|
|
46753
46759
|
};
|
|
46754
46760
|
}, T = () => {
|
|
46755
|
-
const
|
|
46756
|
-
return
|
|
46761
|
+
const V = (n == null ? void 0 : n.targetKey) || "id", E = (o.value || []).map((U) => U == null ? void 0 : U[V]).filter(Boolean);
|
|
46762
|
+
return E.length ? { $and: [{ [`${V}.$ne`]: E }] } : {};
|
|
46757
46763
|
}, [D, $] = useState(1), [B, N] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
|
|
46758
46764
|
useEffect(() => {
|
|
46759
|
-
var E;
|
|
46760
|
-
N((E = o.componentProps) == null ? void 0 : E.pageSize);
|
|
46761
|
-
}, [(L = o.componentProps) == null ? void 0 : L.pageSize]);
|
|
46762
|
-
const w = useMemo(() => {
|
|
46763
46765
|
var V;
|
|
46764
|
-
|
|
46766
|
+
N((V = o.componentProps) == null ? void 0 : V.pageSize);
|
|
46767
|
+
}, [(O = o.componentProps) == null ? void 0 : O.pageSize]);
|
|
46768
|
+
const w = useMemo(() => {
|
|
46769
|
+
var E;
|
|
46770
|
+
const V = Math.ceil(((E = o.value) == null ? void 0 : E.length) / 10);
|
|
46765
46771
|
return {
|
|
46766
|
-
current: D >
|
|
46772
|
+
current: D > V ? V : D,
|
|
46767
46773
|
pageSize: B || 10,
|
|
46768
46774
|
total: o == null ? void 0 : o.value,
|
|
46769
46775
|
onChange: (G, U) => {
|
|
@@ -46773,14 +46779,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46773
46779
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
46774
46780
|
hideOnSinglePage: !1
|
|
46775
46781
|
};
|
|
46776
|
-
}, [(q = o.value) == null ? void 0 : q.length, B, D]),
|
|
46777
|
-
const { field:
|
|
46782
|
+
}, [(q = o.value) == null ? void 0 : q.length, B, D]), L = () => {
|
|
46783
|
+
const { field: V } = useAssociationFieldContext();
|
|
46778
46784
|
return {
|
|
46779
46785
|
run() {
|
|
46780
46786
|
var G;
|
|
46781
|
-
|
|
46782
|
-
const
|
|
46783
|
-
return $(
|
|
46787
|
+
V.value = V.value || [], V.value.push(markRecordAsNew({}));
|
|
46788
|
+
const E = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
|
|
46789
|
+
return $(E), V.onInput(V.value);
|
|
46784
46790
|
}
|
|
46785
46791
|
};
|
|
46786
46792
|
}, M = () => ({
|
|
@@ -46797,7 +46803,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46797
46803
|
field: o,
|
|
46798
46804
|
showIndex: !0,
|
|
46799
46805
|
dragSort: !1,
|
|
46800
|
-
showDel: o.editable && (b !== !1 || C !== !1 || y !== !1) ? (
|
|
46806
|
+
showDel: o.editable && (b !== !1 || C !== !1 || y !== !1) ? (V) => o.editable ? y !== !1 ? !0 : V == null ? void 0 : V.__isNewRecord__ : !1 : !1,
|
|
46801
46807
|
pagination: w,
|
|
46802
46808
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
46803
46809
|
isSubTable: !0,
|
|
@@ -46818,7 +46824,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46818
46824
|
b !== !1 && /* @__PURE__ */ jsx(
|
|
46819
46825
|
Action.Link,
|
|
46820
46826
|
{
|
|
46821
|
-
useAction:
|
|
46827
|
+
useAction: L,
|
|
46822
46828
|
title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, className: "nb-sub-table-addNew", children: [
|
|
46823
46829
|
/* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
46824
46830
|
" ",
|
|
@@ -46865,7 +46871,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46865
46871
|
onlyRenderProperties: !0,
|
|
46866
46872
|
basePath: o.address,
|
|
46867
46873
|
schema: p.parent,
|
|
46868
|
-
filterProperties: (
|
|
46874
|
+
filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
|
|
46869
46875
|
}
|
|
46870
46876
|
)
|
|
46871
46877
|
}
|
|
@@ -46964,26 +46970,26 @@ const ReadPretty$6 = observer$1(
|
|
|
46964
46970
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
46965
46971
|
const AssociationSelect = InternalAssociationSelect;
|
|
46966
46972
|
AssociationSelect.Designer = function e() {
|
|
46967
|
-
var
|
|
46968
|
-
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, 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(), y = i(u.name) || n(u["x-collection-field"]), S = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(y == null ? void 0 : y.interface), I = (
|
|
46973
|
+
var L, M, k, O, q, V, E, G, U, H, K;
|
|
46974
|
+
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, 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(), y = i(u.name) || n(u["x-collection-field"]), S = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(y == null ? void 0 : y.interface), I = (L = F == null ? void 0 : F.validateSchema) == null ? void 0 : L.call(F, u), R = (M = y == null ? void 0 : y.uiSchema) == null ? void 0 : M.title, T = y != null && y.target ? t(y == null ? void 0 : y.target) : [];
|
|
46969
46975
|
c.title === R || c.title;
|
|
46970
|
-
const D = useSortFields(y == null ? void 0 : y.target), $ = ((q = (
|
|
46976
|
+
const D = useSortFields(y == null ? void 0 : y.target), $ = ((q = (O = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : O.params) == null ? void 0 : q.sort) || [];
|
|
46971
46977
|
useEffect(() => {
|
|
46972
46978
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
46973
46979
|
}, [u["x-read-pretty"]]);
|
|
46974
|
-
const B = $ == null ? void 0 : $.map((
|
|
46975
|
-
field:
|
|
46980
|
+
const B = $ == null ? void 0 : $.map((X) => X.startsWith("-") ? {
|
|
46981
|
+
field: X.substring(1),
|
|
46976
46982
|
direction: "desc"
|
|
46977
46983
|
} : {
|
|
46978
|
-
field:
|
|
46984
|
+
field: X,
|
|
46979
46985
|
direction: "asc"
|
|
46980
46986
|
});
|
|
46981
46987
|
c.readPretty || c.required;
|
|
46982
|
-
const N = T.filter((
|
|
46988
|
+
const N = T.filter((X) => a(X)).map((X) => {
|
|
46983
46989
|
var W;
|
|
46984
46990
|
return {
|
|
46985
|
-
value:
|
|
46986
|
-
label: f((W =
|
|
46991
|
+
value: X == null ? void 0 : X.name,
|
|
46992
|
+
label: f((W = X == null ? void 0 : X.uiSchema) == null ? void 0 : W.title) || (X == null ? void 0 : X.name)
|
|
46987
46993
|
};
|
|
46988
46994
|
});
|
|
46989
46995
|
let j = "editable";
|
|
@@ -47077,11 +47083,11 @@ AssociationSelect.Designer = function e() {
|
|
|
47077
47083
|
}
|
|
47078
47084
|
}
|
|
47079
47085
|
},
|
|
47080
|
-
onSubmit: (
|
|
47086
|
+
onSubmit: (X) => {
|
|
47081
47087
|
var ee;
|
|
47082
|
-
const W = [],
|
|
47083
|
-
for (const oe of
|
|
47084
|
-
W.push(_.pickBy(oe,
|
|
47088
|
+
const W = [], J = (oe) => oe != null && !Number.isNaN(oe);
|
|
47089
|
+
for (const oe of X.rules)
|
|
47090
|
+
W.push(_.pickBy(oe, J));
|
|
47085
47091
|
const Z = {
|
|
47086
47092
|
"x-uid": u["x-uid"]
|
|
47087
47093
|
};
|
|
@@ -47121,11 +47127,11 @@ AssociationSelect.Designer = function e() {
|
|
|
47121
47127
|
})
|
|
47122
47128
|
}
|
|
47123
47129
|
},
|
|
47124
|
-
onSubmit: (
|
|
47130
|
+
onSubmit: (X) => {
|
|
47125
47131
|
const W = {
|
|
47126
47132
|
"x-uid": u["x-uid"]
|
|
47127
47133
|
};
|
|
47128
|
-
c.value !==
|
|
47134
|
+
c.value !== X.default && (c.value = X.default), u.default = X.default, W.default = X.default, m.emit("patch", {
|
|
47129
47135
|
schema: W
|
|
47130
47136
|
}), h();
|
|
47131
47137
|
}
|
|
@@ -47137,8 +47143,8 @@ AssociationSelect.Designer = function e() {
|
|
|
47137
47143
|
title: d("Field component"),
|
|
47138
47144
|
options: S,
|
|
47139
47145
|
value: u["x-component"],
|
|
47140
|
-
onChange: (
|
|
47141
|
-
var
|
|
47146
|
+
onChange: (X) => {
|
|
47147
|
+
var J, Z;
|
|
47142
47148
|
const W = {
|
|
47143
47149
|
name: y == null ? void 0 : y.name,
|
|
47144
47150
|
type: "void",
|
|
@@ -47149,11 +47155,11 @@ AssociationSelect.Designer = function e() {
|
|
|
47149
47155
|
// 'x-designer': 'FormItem.Designer',
|
|
47150
47156
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
47151
47157
|
"x-settings": "fieldSettings:FormItem",
|
|
47152
|
-
"x-component":
|
|
47158
|
+
"x-component": X,
|
|
47153
47159
|
"x-validator": u["x-validator"],
|
|
47154
47160
|
"x-collection-field": u["x-collection-field"],
|
|
47155
47161
|
"x-decorator-props": u["x-decorator-props"],
|
|
47156
|
-
"x-component-props": x(x({}, (
|
|
47162
|
+
"x-component-props": x(x({}, (J = y == null ? void 0 : y.uiSchema) == null ? void 0 : J["x-component-props"]), u["x-component-props"])
|
|
47157
47163
|
};
|
|
47158
47164
|
(Z = F == null ? void 0 : F.schemaInitialize) == null || Z.call(F, W, {
|
|
47159
47165
|
field: y,
|
|
@@ -47161,7 +47167,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47161
47167
|
readPretty: c.readPretty,
|
|
47162
47168
|
action: p ? "get" : null,
|
|
47163
47169
|
targetCollection: r(y == null ? void 0 : y.target)
|
|
47164
|
-
}),
|
|
47170
|
+
}), X === "CollectionField" && (W.type = "string"), g("beforeBegin", divWrap(W), {
|
|
47165
47171
|
onSuccess: () => {
|
|
47166
47172
|
m.remove(null, {
|
|
47167
47173
|
removeParentsIfNoChildren: !0,
|
|
@@ -47178,12 +47184,12 @@ AssociationSelect.Designer = function e() {
|
|
|
47178
47184
|
SchemaSettingsSwitchItem,
|
|
47179
47185
|
{
|
|
47180
47186
|
title: d("Allow multiple"),
|
|
47181
|
-
checked: ((
|
|
47182
|
-
onChange: (
|
|
47187
|
+
checked: ((V = u["x-component-props"]) == null ? void 0 : V.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
47188
|
+
onChange: (X) => {
|
|
47183
47189
|
const W = {
|
|
47184
47190
|
"x-uid": u["x-uid"]
|
|
47185
47191
|
};
|
|
47186
|
-
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple =
|
|
47192
|
+
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = X, c.componentProps.multiple = X, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
47187
47193
|
schema: W
|
|
47188
47194
|
}), h();
|
|
47189
47195
|
}
|
|
@@ -47194,10 +47200,10 @@ AssociationSelect.Designer = function e() {
|
|
|
47194
47200
|
SchemaSettingsDataScope,
|
|
47195
47201
|
{
|
|
47196
47202
|
collectionName: y == null ? void 0 : y.target,
|
|
47197
|
-
defaultFilter: ((U = (G = (
|
|
47203
|
+
defaultFilter: ((U = (G = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
|
|
47198
47204
|
form: l,
|
|
47199
|
-
onSubmit: ({ filter:
|
|
47200
|
-
|
|
47205
|
+
onSubmit: ({ filter: X }) => {
|
|
47206
|
+
X = removeNullCondition(X), _.set(c.componentProps, "service.params.filter", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
47201
47207
|
schema: {
|
|
47202
47208
|
"x-uid": u["x-uid"],
|
|
47203
47209
|
"x-component-props": c.componentProps
|
|
@@ -47280,8 +47286,8 @@ AssociationSelect.Designer = function e() {
|
|
|
47280
47286
|
}
|
|
47281
47287
|
}
|
|
47282
47288
|
},
|
|
47283
|
-
onSubmit: ({ sort:
|
|
47284
|
-
const W =
|
|
47289
|
+
onSubmit: ({ sort: X }) => {
|
|
47290
|
+
const W = X.map((J) => J.direction === "desc" ? `-${J.field}` : J.field);
|
|
47285
47291
|
_.set(c.componentProps, "service.params.sort", W), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
47286
47292
|
schema: {
|
|
47287
47293
|
"x-uid": u["x-uid"],
|
|
@@ -47301,11 +47307,11 @@ AssociationSelect.Designer = function e() {
|
|
|
47301
47307
|
{ label: d("Easy-reading"), value: "read-pretty" }
|
|
47302
47308
|
],
|
|
47303
47309
|
value: j,
|
|
47304
|
-
onChange: (
|
|
47310
|
+
onChange: (X) => {
|
|
47305
47311
|
const W = {
|
|
47306
47312
|
"x-uid": u["x-uid"]
|
|
47307
47313
|
};
|
|
47308
|
-
switch (
|
|
47314
|
+
switch (X) {
|
|
47309
47315
|
case "readonly": {
|
|
47310
47316
|
u["x-read-pretty"] = !1, u["x-disabled"] = !0, W["x-read-pretty"] = !1, W["x-disabled"] = !0, c.readPretty = !1, c.disabled = !0;
|
|
47311
47317
|
break;
|
|
@@ -47332,14 +47338,14 @@ AssociationSelect.Designer = function e() {
|
|
|
47332
47338
|
title: d("Title field"),
|
|
47333
47339
|
options: N,
|
|
47334
47340
|
value: (K = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : K.label,
|
|
47335
|
-
onChange: (
|
|
47341
|
+
onChange: (X) => {
|
|
47336
47342
|
var Z, Q;
|
|
47337
47343
|
const W = {
|
|
47338
47344
|
"x-uid": u["x-uid"]
|
|
47339
|
-
},
|
|
47340
|
-
label:
|
|
47345
|
+
}, J = P(x(x({}, (Q = (Z = y == null ? void 0 : y.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
|
|
47346
|
+
label: X
|
|
47341
47347
|
});
|
|
47342
|
-
c.componentProps.fieldNames =
|
|
47348
|
+
c.componentProps.fieldNames = J, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = J, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
47343
47349
|
schema: W
|
|
47344
47350
|
}), m.refresh();
|
|
47345
47351
|
}
|
|
@@ -47363,7 +47369,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47363
47369
|
] });
|
|
47364
47370
|
};
|
|
47365
47371
|
AssociationSelect.FilterDesigner = function e() {
|
|
47366
|
-
var F, I, R, T, D, $, B, N, j, w,
|
|
47372
|
+
var F, I, R, T, D, $, B, N, j, w, L;
|
|
47367
47373
|
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n } = 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) || n(l["x-collection-field"]), h = o(m == null ? void 0 : m.interface), g = (F = h == null ? void 0 : h.validateSchema) == null ? void 0 : F.call(h, l), f = (I = m == null ? void 0 : m.uiSchema) == null ? void 0 : I.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
|
|
47368
47374
|
i.title === f || i.title;
|
|
47369
47375
|
const b = useSortFields(m == null ? void 0 : m.target), y = ((D = (T = (R = i.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], S = y == null ? void 0 : y.map((M) => M.startsWith("-") ? {
|
|
@@ -47470,19 +47476,19 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47470
47476
|
}
|
|
47471
47477
|
},
|
|
47472
47478
|
onSubmit: (M) => {
|
|
47473
|
-
var
|
|
47479
|
+
var V;
|
|
47474
47480
|
const k = [];
|
|
47475
|
-
for (const
|
|
47476
|
-
k.push(_.pickBy(
|
|
47477
|
-
const
|
|
47481
|
+
for (const E of M.rules)
|
|
47482
|
+
k.push(_.pickBy(E, _.identity));
|
|
47483
|
+
const O = {
|
|
47478
47484
|
"x-uid": l["x-uid"]
|
|
47479
47485
|
};
|
|
47480
47486
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
47481
|
-
for (const
|
|
47482
|
-
(
|
|
47483
|
-
const q = _.concat([], ((
|
|
47484
|
-
i.validator = q, l["x-validator"] = k,
|
|
47485
|
-
schema:
|
|
47487
|
+
for (const E of k)
|
|
47488
|
+
(E.maxValue || E.minValue) && (E.percentMode = !0), E.percentFormat && (E.percentFormats = !0);
|
|
47489
|
+
const q = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], k);
|
|
47490
|
+
i.validator = q, l["x-validator"] = k, O["x-validator"] = k, u.emit("patch", {
|
|
47491
|
+
schema: O
|
|
47486
47492
|
}), d();
|
|
47487
47493
|
}
|
|
47488
47494
|
}
|
|
@@ -47605,7 +47611,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47605
47611
|
}
|
|
47606
47612
|
},
|
|
47607
47613
|
onSubmit: ({ sort: M }) => {
|
|
47608
|
-
const k = M.map((
|
|
47614
|
+
const k = M.map((O) => O.direction === "desc" ? `-${O.field}` : O.field);
|
|
47609
47615
|
_.set(i.componentProps, "service.params.sort", k), l["x-component-props"] = i.componentProps, u.emit("patch", {
|
|
47610
47616
|
schema: {
|
|
47611
47617
|
"x-uid": l["x-uid"],
|
|
@@ -47620,15 +47626,15 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47620
47626
|
{
|
|
47621
47627
|
title: c("Title field"),
|
|
47622
47628
|
options: v,
|
|
47623
|
-
value: (
|
|
47629
|
+
value: (L = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : L.label,
|
|
47624
47630
|
onChange: (M) => {
|
|
47625
|
-
var q,
|
|
47631
|
+
var q, V;
|
|
47626
47632
|
const k = {
|
|
47627
47633
|
"x-uid": l["x-uid"]
|
|
47628
|
-
},
|
|
47634
|
+
}, O = P(x(x({}, (V = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
|
|
47629
47635
|
label: M
|
|
47630
47636
|
});
|
|
47631
|
-
i.componentProps.fieldNames =
|
|
47637
|
+
i.componentProps.fieldNames = O, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = O, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
47632
47638
|
schema: k
|
|
47633
47639
|
}), u.refresh();
|
|
47634
47640
|
}
|
|
@@ -48109,8 +48115,8 @@ const CronSetInternal = (e) => {
|
|
|
48109
48115
|
{ displayName: "NocoBaseDetails" }
|
|
48110
48116
|
), Divider = connect(
|
|
48111
48117
|
(e) => {
|
|
48112
|
-
const { color: t, borderColor: o } = e;
|
|
48113
|
-
return /* @__PURE__ */ jsx(Divider$1, P(x({}, e), { type: "horizontal", style: { color: t, borderColor: o }, orientationMargin: "0" }));
|
|
48118
|
+
const { color: t, borderColor: o } = e, { t: n } = useTranslation(), r = useFieldSchema(), a = useCompile(), i = (r == null ? void 0 : r["x-component-props"].children) || e.children, l = typeof i == "string" ? n(a(i), { ns: NAMESPACE_UI_SCHEMA }) : i;
|
|
48119
|
+
return /* @__PURE__ */ jsx(Divider$1, P(x({}, e), { type: "horizontal", style: { color: t, borderColor: o }, orientationMargin: "0", children: l }));
|
|
48114
48120
|
},
|
|
48115
48121
|
mapProps((e) => x({
|
|
48116
48122
|
orientation: "left"
|
|
@@ -49173,7 +49179,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49173
49179
|
return e - u - o.paddingLG - l;
|
|
49174
49180
|
}, InternalList = withSkeletonComponent(
|
|
49175
49181
|
(e) => {
|
|
49176
|
-
var N, j, w,
|
|
49182
|
+
var N, j, w, L;
|
|
49177
49183
|
const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), a = useDesigner(), i = (N = t == null ? void 0 : t.data) == null ? void 0 : N.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(), y = useCallback(
|
|
49178
49184
|
(M) => (m.has(M) || m.set(
|
|
49179
49185
|
M,
|
|
@@ -49220,7 +49226,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49220
49226
|
display: none !important;
|
|
49221
49227
|
}
|
|
49222
49228
|
`,
|
|
49223
|
-
itemRender: (k,
|
|
49229
|
+
itemRender: (k, O, q) => O === "prev" ? /* @__PURE__ */ jsxs(
|
|
49224
49230
|
"div",
|
|
49225
49231
|
{
|
|
49226
49232
|
style: { display: "flex" },
|
|
@@ -49277,7 +49283,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
49277
49283
|
P(x({}, e), {
|
|
49278
49284
|
pagination: !i || !((j = p.value) != null && j.length) || c <= ((w = p.value) == null ? void 0 : w.length) ? !1 : B,
|
|
49279
49285
|
loading: t == null ? void 0 : t.loading,
|
|
49280
|
-
children: (
|
|
49286
|
+
children: (L = p.value) != null && L.length ? p.value.map((M, k) => /* @__PURE__ */ jsx(ListItemField, { field: p, index: k, schema: y(k) }, k)) : null
|
|
49281
49287
|
})
|
|
49282
49288
|
)
|
|
49283
49289
|
}
|
|
@@ -51131,7 +51137,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51131
51137
|
"sort-field"
|
|
51132
51138
|
);
|
|
51133
51139
|
}, TableBlockDesigner = () => {
|
|
51134
|
-
var F, I, R, T, D, $, B, N, j, w,
|
|
51140
|
+
var F, I, R, T, D, $, B, N, j, w, L, M;
|
|
51135
51141
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable();
|
|
51136
51142
|
useBlockTemplateContext();
|
|
51137
51143
|
const p = ((I = (F = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : F.params) == null ? void 0 : I.sort) || [];
|
|
@@ -51145,8 +51151,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51145
51151
|
}), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), y = C != null && C.includes(".") ? ($ = n(b == null ? void 0 : b.target)) == null ? void 0 : $.tree : !!(g != null && g.tree), S = useCallback(
|
|
51146
51152
|
({ filter: k }) => {
|
|
51147
51153
|
k = removeNullCondition(k);
|
|
51148
|
-
const
|
|
51149
|
-
|
|
51154
|
+
const O = r.decoratorProps.params || {};
|
|
51155
|
+
O.filter = k, r.decoratorProps.params = O, a["x-decorator-props"].params = O, d.emit("patch", {
|
|
51150
51156
|
schema: {
|
|
51151
51157
|
"x-uid": a["x-uid"],
|
|
51152
51158
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51168,12 +51174,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51168
51174
|
onChange: (k) => {
|
|
51169
51175
|
var q;
|
|
51170
51176
|
r.decoratorProps.treeTable = k, a["x-decorator-props"].treeTable = k;
|
|
51171
|
-
const
|
|
51177
|
+
const O = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
|
|
51172
51178
|
tree: k ? !0 : null
|
|
51173
51179
|
});
|
|
51174
51180
|
d.emit("patch", {
|
|
51175
51181
|
schema: a
|
|
51176
|
-
}), d.refresh(), c.run(
|
|
51182
|
+
}), d.refresh(), c.run(O);
|
|
51177
51183
|
}
|
|
51178
51184
|
}
|
|
51179
51185
|
),
|
|
@@ -51298,14 +51304,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51298
51304
|
}
|
|
51299
51305
|
},
|
|
51300
51306
|
onSubmit: ({ sort: k }) => {
|
|
51301
|
-
var
|
|
51302
|
-
const
|
|
51303
|
-
q.sort =
|
|
51307
|
+
var V;
|
|
51308
|
+
const O = k.map((E) => E.direction === "desc" ? `-${E.field}` : E.field), q = r.decoratorProps.params || {};
|
|
51309
|
+
q.sort = O, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
|
|
51304
51310
|
schema: {
|
|
51305
51311
|
"x-uid": a["x-uid"],
|
|
51306
51312
|
"x-decorator-props": a["x-decorator-props"]
|
|
51307
51313
|
}
|
|
51308
|
-
}), c.run(P(x({}, (
|
|
51314
|
+
}), c.run(P(x({}, (V = c.params) == null ? void 0 : V[0]), { sort: O }));
|
|
51309
51315
|
}
|
|
51310
51316
|
}
|
|
51311
51317
|
),
|
|
@@ -51314,7 +51320,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51314
51320
|
SchemaSettingsSelectItem,
|
|
51315
51321
|
{
|
|
51316
51322
|
title: u("Records per page"),
|
|
51317
|
-
value: ((
|
|
51323
|
+
value: ((L = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : L.pageSize) || 20,
|
|
51318
51324
|
options: [
|
|
51319
51325
|
{ label: "5", value: 5 },
|
|
51320
51326
|
{ label: "10", value: 10 },
|
|
@@ -51325,8 +51331,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51325
51331
|
],
|
|
51326
51332
|
onChange: (k) => {
|
|
51327
51333
|
var q;
|
|
51328
|
-
const
|
|
51329
|
-
|
|
51334
|
+
const O = r.decoratorProps.params || {};
|
|
51335
|
+
O.pageSize = k, r.decoratorProps.params = O, a["x-decorator-props"].params = O, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
|
|
51330
51336
|
schema: {
|
|
51331
51337
|
"x-uid": a["x-uid"],
|
|
51332
51338
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51346,14 +51352,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
51346
51352
|
{ label: u("Small"), value: "small" }
|
|
51347
51353
|
],
|
|
51348
51354
|
onChange: (k) => {
|
|
51349
|
-
const
|
|
51350
|
-
if (
|
|
51351
|
-
return
|
|
51355
|
+
const O = a.reduceProperties((q, V) => {
|
|
51356
|
+
if (V["x-component"] === "TableV2")
|
|
51357
|
+
return V;
|
|
51352
51358
|
}, null);
|
|
51353
|
-
|
|
51359
|
+
O["x-component-props"] = O["x-component-props"] || {}, O["x-component-props"].size = k, d.emit("patch", {
|
|
51354
51360
|
schema: {
|
|
51355
|
-
"x-uid":
|
|
51356
|
-
"x-decorator-props":
|
|
51361
|
+
"x-uid": O["x-uid"],
|
|
51362
|
+
"x-decorator-props": O["x-component-props"]
|
|
51357
51363
|
}
|
|
51358
51364
|
});
|
|
51359
51365
|
}
|
|
@@ -51407,10 +51413,10 @@ const TableSelectorDesigner = () => {
|
|
|
51407
51413
|
j = removeNullCondition(j);
|
|
51408
51414
|
const w = r.decoratorProps.params || {};
|
|
51409
51415
|
w.filter = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w;
|
|
51410
|
-
let
|
|
51411
|
-
u && (
|
|
51412
|
-
$and: [u,
|
|
51413
|
-
} :
|
|
51416
|
+
let L = _.cloneDeep(j);
|
|
51417
|
+
u && (L ? L = {
|
|
51418
|
+
$and: [u, L]
|
|
51419
|
+
} : L = u), c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { filter: L, page: 1 })), p.emit("patch", {
|
|
51414
51420
|
schema: {
|
|
51415
51421
|
"x-uid": a["x-uid"],
|
|
51416
51422
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51443,9 +51449,9 @@ const TableSelectorDesigner = () => {
|
|
|
51443
51449
|
defaultChecked: !0,
|
|
51444
51450
|
checked: r.decoratorProps.treeTable,
|
|
51445
51451
|
onChange: (j) => {
|
|
51446
|
-
var
|
|
51452
|
+
var L;
|
|
51447
51453
|
r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = j, a["x-decorator-props"].treeTable = j;
|
|
51448
|
-
const w = P(x({}, (
|
|
51454
|
+
const w = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
|
|
51449
51455
|
tree: j ? !0 : null
|
|
51450
51456
|
});
|
|
51451
51457
|
p.emit("patch", {
|
|
@@ -51532,8 +51538,8 @@ const TableSelectorDesigner = () => {
|
|
|
51532
51538
|
},
|
|
51533
51539
|
onSubmit: ({ sort: j }) => {
|
|
51534
51540
|
var M;
|
|
51535
|
-
const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field),
|
|
51536
|
-
|
|
51541
|
+
const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), L = r.decoratorProps.params || {};
|
|
51542
|
+
L.sort = w, r.decoratorProps.params = L, a["x-decorator-props"].params = L, p.emit("patch", {
|
|
51537
51543
|
schema: {
|
|
51538
51544
|
"x-uid": a["x-uid"],
|
|
51539
51545
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -51556,9 +51562,9 @@ const TableSelectorDesigner = () => {
|
|
|
51556
51562
|
{ label: "200", value: 200 }
|
|
51557
51563
|
],
|
|
51558
51564
|
onChange: (j) => {
|
|
51559
|
-
var
|
|
51565
|
+
var L;
|
|
51560
51566
|
const w = r.decoratorProps.params || {};
|
|
51561
|
-
w.pageSize = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (
|
|
51567
|
+
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", {
|
|
51562
51568
|
schema: {
|
|
51563
51569
|
"x-uid": a["x-uid"],
|
|
51564
51570
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -53557,29 +53563,29 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53557
53563
|
label: y(w.title),
|
|
53558
53564
|
value: w.name
|
|
53559
53565
|
})), []), T = useCallback(() => {
|
|
53560
|
-
const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude:
|
|
53561
|
-
return F.forEach((
|
|
53566
|
+
const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: L, include: M } = w || {}, k = [];
|
|
53567
|
+
return F.forEach((O) => {
|
|
53562
53568
|
var q;
|
|
53563
|
-
if (
|
|
53564
|
-
k.push(P(x({},
|
|
53565
|
-
children:
|
|
53569
|
+
if (O.key === "systemInfo")
|
|
53570
|
+
k.push(P(x({}, O), {
|
|
53571
|
+
children: O.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? M != null && M.length ? M.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[V.value] == "boolean" ? n[V.value] : !0)
|
|
53566
53572
|
}));
|
|
53567
53573
|
else {
|
|
53568
|
-
let
|
|
53569
|
-
M != null && M.length ? M.forEach((
|
|
53574
|
+
let V = [];
|
|
53575
|
+
M != null && M.length ? M.forEach((E) => {
|
|
53570
53576
|
var U;
|
|
53571
|
-
const G = (U =
|
|
53572
|
-
G &&
|
|
53573
|
-
targetScope:
|
|
53577
|
+
const G = (U = O == null ? void 0 : O.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
|
|
53578
|
+
G && V.push(P(x({}, G), {
|
|
53579
|
+
targetScope: E == null ? void 0 : E.targetScope
|
|
53574
53580
|
}));
|
|
53575
|
-
}) :
|
|
53576
|
-
children:
|
|
53581
|
+
}) : L != null && L.length ? V = (q = O == null ? void 0 : O.children) == null ? void 0 : q.filter((E) => !L.includes(E.name)) : V = O == null ? void 0 : O.children, V != null && V.length && k.push(P(x({}, O), {
|
|
53582
|
+
children: V
|
|
53577
53583
|
}));
|
|
53578
53584
|
}
|
|
53579
53585
|
}), k;
|
|
53580
53586
|
}, [u, n]), D = useMemo(() => T().map((w) => {
|
|
53581
|
-
var
|
|
53582
|
-
return ((
|
|
53587
|
+
var L;
|
|
53588
|
+
return ((L = w == null ? void 0 : w.children) == null ? void 0 : L.length) === 0 ? null : n.template === "view" ? {
|
|
53583
53589
|
type: "group",
|
|
53584
53590
|
label: y(w.label),
|
|
53585
53591
|
title: y(w.label),
|
|
@@ -53603,25 +53609,25 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53603
53609
|
}))
|
|
53604
53610
|
};
|
|
53605
53611
|
}).filter((w) => {
|
|
53606
|
-
var
|
|
53607
|
-
return (
|
|
53612
|
+
var L;
|
|
53613
|
+
return (L = w == null ? void 0 : w.children) == null ? void 0 : L.length;
|
|
53608
53614
|
}), [T]), $ = useMemo(() => ({
|
|
53609
53615
|
style: {
|
|
53610
53616
|
maxHeight: "60vh",
|
|
53611
53617
|
overflow: "auto"
|
|
53612
53618
|
},
|
|
53613
53619
|
onClick: (w) => {
|
|
53614
|
-
const
|
|
53615
|
-
|
|
53620
|
+
const L = w.item.props["data-targetScope"];
|
|
53621
|
+
L && f(L);
|
|
53616
53622
|
const M = getSchema$8(c(w.key), n, y);
|
|
53617
53623
|
M && (b(M), h(!0));
|
|
53618
53624
|
},
|
|
53619
53625
|
items: D
|
|
53620
53626
|
}), [c, D, n]), B = useMemo(() => I.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
53621
|
-
var
|
|
53627
|
+
var L;
|
|
53622
53628
|
return {
|
|
53623
53629
|
value: w.name,
|
|
53624
|
-
label: y((
|
|
53630
|
+
label: y((L = w.uiSchema) == null ? void 0 : L.title)
|
|
53625
53631
|
};
|
|
53626
53632
|
}), [I == null ? void 0 : I.length]);
|
|
53627
53633
|
return n.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
|
|
@@ -53853,18 +53859,18 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53853
53859
|
return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: o }, e));
|
|
53854
53860
|
}, getIsOverriding = (e, t, o) => t.find((r) => r.name === o.name).collectionName === e, OverridingFieldAction = (e) => {
|
|
53855
53861
|
const { scope: t, getContainer: o, item: n, parentItem: r, children: a, currentCollection: i } = e, { target: l, through: c } = n, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), y = useAPIClient(), { t: S } = useTranslation(), v = useCompile(), F = (j) => {
|
|
53856
|
-
var
|
|
53857
|
-
return j && ((
|
|
53862
|
+
var L;
|
|
53863
|
+
return j && ((L = m(j)) == null ? void 0 : L.map((M) => M.name).concat([j]));
|
|
53858
53864
|
}, [I, R] = useState({}), T = p(i), D = getIsOverriding(i, T, n), $ = useMemo(() => h.map((j) => ({
|
|
53859
53865
|
label: v(j.title),
|
|
53860
53866
|
value: j.name
|
|
53861
53867
|
})), []), B = () => {
|
|
53862
|
-
const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM:
|
|
53868
|
+
const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: L } = useCollectionManager_deprecated(), M = useActionContext(), { resource: k } = useResourceContext();
|
|
53863
53869
|
return {
|
|
53864
53870
|
run() {
|
|
53865
53871
|
return z(this, null, function* () {
|
|
53866
53872
|
yield j.submit();
|
|
53867
|
-
const q = cloneDeep(j.values),
|
|
53873
|
+
const q = cloneDeep(j.values), V = omit(q, [
|
|
53868
53874
|
"key",
|
|
53869
53875
|
"uiSchemaUid",
|
|
53870
53876
|
"collectionName",
|
|
@@ -53877,18 +53883,18 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53877
53883
|
// 'reverseField.uiSchemaUid',
|
|
53878
53884
|
]);
|
|
53879
53885
|
yield k.create({
|
|
53880
|
-
values:
|
|
53881
|
-
}), yield j.reset(), yield
|
|
53886
|
+
values: V
|
|
53887
|
+
}), yield j.reset(), yield L(), yield w(), M.setVisible(!1);
|
|
53882
53888
|
});
|
|
53883
53889
|
}
|
|
53884
53890
|
};
|
|
53885
53891
|
}, N = useMemo(() => {
|
|
53886
53892
|
var j;
|
|
53887
53893
|
return (n == null ? void 0 : n.fields) || ((j = d(n.collectionName)) == null ? void 0 : j.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
53888
|
-
var
|
|
53894
|
+
var L;
|
|
53889
53895
|
return {
|
|
53890
53896
|
value: w.name,
|
|
53891
|
-
label: v((
|
|
53897
|
+
label: v((L = w.uiSchema) == null ? void 0 : L.title)
|
|
53892
53898
|
};
|
|
53893
53899
|
}));
|
|
53894
53900
|
}, [n.name]);
|
|
@@ -53905,10 +53911,10 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
53905
53911
|
appends: ["reverseField"]
|
|
53906
53912
|
});
|
|
53907
53913
|
R(w == null ? void 0 : w.data);
|
|
53908
|
-
const
|
|
53909
|
-
M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (j =
|
|
53914
|
+
const L = u(n.interface), M = cloneDeep(w == null ? void 0 : w.data) || {};
|
|
53915
|
+
M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (j = L.default) == null ? void 0 : j.reverseField, set(M.reverseField, "name", `f_${uid()}`), set(M.reverseField, "uiSchema.title", n.__parent.title));
|
|
53910
53916
|
const k = getSchema$6(
|
|
53911
|
-
P(x({},
|
|
53917
|
+
P(x({}, L), {
|
|
53912
53918
|
default: M
|
|
53913
53919
|
}),
|
|
53914
53920
|
n,
|
|
@@ -54370,14 +54376,14 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54370
54376
|
const { databaseView: t, viewName: o, sources: n, 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(n), [C, b] = useState([]), y = useField(), S = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: R, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), B = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
|
|
54371
54377
|
useEffect(() => {
|
|
54372
54378
|
const w = [];
|
|
54373
|
-
g.forEach((
|
|
54374
|
-
var
|
|
54375
|
-
const M = v(
|
|
54376
|
-
const G = T(
|
|
54379
|
+
g.forEach((L) => {
|
|
54380
|
+
var V;
|
|
54381
|
+
const M = v(L), O = R(L).map((E) => {
|
|
54382
|
+
const G = T(E, L);
|
|
54377
54383
|
return {
|
|
54378
54384
|
type: "group",
|
|
54379
|
-
key:
|
|
54380
|
-
label: l("Parent collection fields") + l(`(${v(
|
|
54385
|
+
key: E,
|
|
54386
|
+
label: l("Parent collection fields") + l(`(${v(E).title})`),
|
|
54381
54387
|
children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
|
|
54382
54388
|
var H;
|
|
54383
54389
|
return {
|
|
@@ -54386,48 +54392,48 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54386
54392
|
};
|
|
54387
54393
|
})
|
|
54388
54394
|
};
|
|
54389
|
-
}), q = (
|
|
54395
|
+
}), q = (V = M.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : V.map((E) => {
|
|
54390
54396
|
var G;
|
|
54391
|
-
return { value:
|
|
54392
|
-
}).concat(
|
|
54397
|
+
return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
|
|
54398
|
+
}).concat(O);
|
|
54393
54399
|
w.push({
|
|
54394
|
-
value:
|
|
54400
|
+
value: L,
|
|
54395
54401
|
label: l(M.title || M.name),
|
|
54396
54402
|
children: q
|
|
54397
54403
|
});
|
|
54398
54404
|
}), h(w);
|
|
54399
54405
|
}, [g, t]), useEffect(() => {
|
|
54400
54406
|
t && (u(!0), i.resource("dbViews").get({ filterByTk: o, schema: r }).then(({ data: w }) => {
|
|
54401
|
-
var
|
|
54407
|
+
var L, M;
|
|
54402
54408
|
if (w) {
|
|
54403
54409
|
u(!1), p([]);
|
|
54404
|
-
const k = (M = Object.values((
|
|
54405
|
-
var
|
|
54406
|
-
const q = (a == null ? void 0 : a.data.find((G) => G.name ===
|
|
54410
|
+
const k = (M = Object.values((L = w == null ? void 0 : w.data) == null ? void 0 : L.fields)) == null ? void 0 : M.map((O) => {
|
|
54411
|
+
var V, E;
|
|
54412
|
+
const q = (a == null ? void 0 : a.data.find((G) => G.name === O.name)) || O;
|
|
54407
54413
|
if (!(q != null && q.uiSchema)) {
|
|
54408
|
-
const G = F(
|
|
54414
|
+
const G = F(O.interface);
|
|
54409
54415
|
q.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
|
|
54410
54416
|
}
|
|
54411
|
-
return
|
|
54412
|
-
uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((E = q.uiSchema) == null ? void 0 : E.title) || q.name })
|
|
54413
|
-
}) : P(x({}, q), {
|
|
54417
|
+
return O.source ? P(x({}, O), {
|
|
54414
54418
|
uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((V = q.uiSchema) == null ? void 0 : V.title) || q.name })
|
|
54419
|
+
}) : P(x({}, q), {
|
|
54420
|
+
uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((E = q.uiSchema) == null ? void 0 : E.title) || q.name })
|
|
54415
54421
|
});
|
|
54416
54422
|
});
|
|
54417
54423
|
y.value = k, setTimeout(() => {
|
|
54418
|
-
var
|
|
54419
|
-
p(k), S.setValuesIn("sources", (
|
|
54424
|
+
var O, q, V;
|
|
54425
|
+
p(k), S.setValuesIn("sources", (O = w.data) == null ? void 0 : O.sources), f((q = w.data) == null ? void 0 : q.sources), b((V = w == null ? void 0 : w.data) == null ? void 0 : V.unsupportedFields);
|
|
54420
54426
|
});
|
|
54421
54427
|
}
|
|
54422
54428
|
}).catch);
|
|
54423
54429
|
}, [t]);
|
|
54424
|
-
const N = (w,
|
|
54430
|
+
const N = (w, L) => {
|
|
54425
54431
|
const M = _.cloneDeep(d);
|
|
54426
|
-
M[
|
|
54427
|
-
var q,
|
|
54428
|
-
const
|
|
54432
|
+
M[L] = w, p(M), y.value = M.map((k) => {
|
|
54433
|
+
var q, V, E;
|
|
54434
|
+
const O = typeof k.source == "string" ? k.source : (E = (V = (q = k.source) == null ? void 0 : q.filter) == null ? void 0 : V.call(q, Boolean)) == null ? void 0 : E.join(".");
|
|
54429
54435
|
return P(x({}, k), {
|
|
54430
|
-
source:
|
|
54436
|
+
source: O
|
|
54431
54437
|
});
|
|
54432
54438
|
});
|
|
54433
54439
|
}, j = [
|
|
@@ -54442,17 +54448,17 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54442
54448
|
dataIndex: "source",
|
|
54443
54449
|
key: "source",
|
|
54444
54450
|
width: 200,
|
|
54445
|
-
render: (w,
|
|
54451
|
+
render: (w, L, M) => /* @__PURE__ */ jsx(
|
|
54446
54452
|
Cascader$1,
|
|
54447
54453
|
{
|
|
54448
54454
|
defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
|
|
54449
54455
|
allowClear: !0,
|
|
54450
54456
|
style: { width: "100%" },
|
|
54451
54457
|
options: D(m),
|
|
54452
|
-
onChange: (k,
|
|
54453
|
-
var
|
|
54454
|
-
const q = (
|
|
54455
|
-
N(P(x({},
|
|
54458
|
+
onChange: (k, O) => {
|
|
54459
|
+
var V;
|
|
54460
|
+
const q = (V = I(k == null ? void 0 : k[0])) == null ? void 0 : V.find((E) => E.name === last(k));
|
|
54461
|
+
N(P(x({}, L), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), M);
|
|
54456
54462
|
},
|
|
54457
54463
|
placeholder: l("Select field source")
|
|
54458
54464
|
}
|
|
@@ -54463,7 +54469,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54463
54469
|
dataIndex: "type",
|
|
54464
54470
|
width: 140,
|
|
54465
54471
|
key: "type",
|
|
54466
|
-
render: (w,
|
|
54472
|
+
render: (w, L, M) => {
|
|
54467
54473
|
const k = d[M];
|
|
54468
54474
|
return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
|
|
54469
54475
|
Select$1,
|
|
@@ -54471,8 +54477,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54471
54477
|
defaultValue: w,
|
|
54472
54478
|
popupMatchSelectWidth: !1,
|
|
54473
54479
|
style: { width: "100%" },
|
|
54474
|
-
options: (k == null ? void 0 : k.possibleTypes.map((
|
|
54475
|
-
onChange: (
|
|
54480
|
+
options: (k == null ? void 0 : k.possibleTypes.map((O) => ({ label: O, value: O }))) || [],
|
|
54481
|
+
onChange: (O) => N(P(x({}, k), { type: O }), M)
|
|
54476
54482
|
}
|
|
54477
54483
|
);
|
|
54478
54484
|
}
|
|
@@ -54482,8 +54488,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54482
54488
|
dataIndex: "interface",
|
|
54483
54489
|
key: "interface",
|
|
54484
54490
|
width: 150,
|
|
54485
|
-
render: (w,
|
|
54486
|
-
const k = d[M],
|
|
54491
|
+
render: (w, L, M) => {
|
|
54492
|
+
const k = d[M], O = getInterfaceOptions(B, k.type);
|
|
54487
54493
|
return k.source ? w : /* @__PURE__ */ jsx(
|
|
54488
54494
|
Select$1,
|
|
54489
54495
|
{
|
|
@@ -54493,7 +54499,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54493
54499
|
onChange: (q) => {
|
|
54494
54500
|
N(P(x({}, k), { interface: q }), M);
|
|
54495
54501
|
},
|
|
54496
|
-
children:
|
|
54502
|
+
children: O.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, q.key))
|
|
54497
54503
|
}
|
|
54498
54504
|
);
|
|
54499
54505
|
}
|
|
@@ -54503,13 +54509,13 @@ const getSchema$4 = (e, t, o) => {
|
|
|
54503
54509
|
dataIndex: "title",
|
|
54504
54510
|
key: "title",
|
|
54505
54511
|
width: 180,
|
|
54506
|
-
render: (w,
|
|
54507
|
-
var
|
|
54512
|
+
render: (w, L, M) => {
|
|
54513
|
+
var O;
|
|
54508
54514
|
const k = d[M];
|
|
54509
54515
|
return /* @__PURE__ */ jsx(
|
|
54510
54516
|
Input$3,
|
|
54511
54517
|
{
|
|
54512
|
-
defaultValue: ((
|
|
54518
|
+
defaultValue: ((O = k == null ? void 0 : k.uiSchema) == null ? void 0 : O.title) || w,
|
|
54513
54519
|
onChange: (q) => N(
|
|
54514
54520
|
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
|
|
54515
54521
|
M
|
|
@@ -54565,15 +54571,15 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
54565
54571
|
}, y = (S) => {
|
|
54566
54572
|
var v;
|
|
54567
54573
|
return (v = S.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
|
|
54568
|
-
var $, B, N, j, w,
|
|
54569
|
-
const I = typeof (F == null ? void 0 : F.source) == "string" ? ($ = F == null ? void 0 : F.source) == null ? void 0 : $.split(".") : F == null ? void 0 : F.source, R = (N = (B = h(I == null ? void 0 : I[0])) == null ? void 0 : B.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.uiSchema, T = ((j = F == null ? void 0 : F.uiSchema) == null ? void 0 : j.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (
|
|
54574
|
+
var $, B, N, j, w, L;
|
|
54575
|
+
const I = typeof (F == null ? void 0 : F.source) == "string" ? ($ = F == null ? void 0 : F.source) == null ? void 0 : $.split(".") : F == null ? void 0 : F.source, R = (N = (B = h(I == null ? void 0 : I[0])) == null ? void 0 : B.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.uiSchema, T = ((j = F == null ? void 0 : F.uiSchema) == null ? void 0 : j.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (L = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : L.uiSchema;
|
|
54570
54576
|
return {
|
|
54571
54577
|
title: u(T),
|
|
54572
54578
|
dataIndex: F.name,
|
|
54573
54579
|
key: F.name,
|
|
54574
54580
|
width: 200,
|
|
54575
|
-
render: (M, k,
|
|
54576
|
-
const q = k[F.name],
|
|
54581
|
+
render: (M, k, O) => {
|
|
54582
|
+
const q = k[F.name], V = {
|
|
54577
54583
|
type: "object",
|
|
54578
54584
|
properties: {
|
|
54579
54585
|
[F.name]: {
|
|
@@ -54585,7 +54591,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
54585
54591
|
}
|
|
54586
54592
|
}
|
|
54587
54593
|
};
|
|
54588
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema:
|
|
54594
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: O, onlyRenderProperties: !0 }) });
|
|
54589
54595
|
}
|
|
54590
54596
|
};
|
|
54591
54597
|
});
|
|
@@ -54818,11 +54824,11 @@ const AsyncDataProvider = (e) => {
|
|
|
54818
54824
|
const T = /* @__PURE__ */ new Map();
|
|
54819
54825
|
a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([B, N]) => {
|
|
54820
54826
|
var k;
|
|
54821
|
-
const j = l[B], w = inferInterface(B, N),
|
|
54827
|
+
const j = l[B], w = inferInterface(B, N), L = (k = C.current(w)) == null ? void 0 : k.default, M = (j == null ? void 0 : j.uiSchema) || (L == null ? void 0 : L.uiSchema) || {};
|
|
54822
54828
|
T.set(B, {
|
|
54823
54829
|
name: B,
|
|
54824
54830
|
interface: (j == null ? void 0 : j.interface) || w,
|
|
54825
|
-
type: (j == null ? void 0 : j.type) || (
|
|
54831
|
+
type: (j == null ? void 0 : j.type) || (L == null ? void 0 : L.type),
|
|
54826
54832
|
source: j == null ? void 0 : j.source,
|
|
54827
54833
|
uiSchema: x({
|
|
54828
54834
|
title: B
|
|
@@ -54914,13 +54920,13 @@ const AsyncDataProvider = (e) => {
|
|
|
54914
54920
|
style: { width: "100%" },
|
|
54915
54921
|
popupMatchSelectWidth: !1,
|
|
54916
54922
|
onChange: (j) => {
|
|
54917
|
-
var
|
|
54923
|
+
var L, M, k, O, q;
|
|
54918
54924
|
const w = p(j);
|
|
54919
54925
|
y(
|
|
54920
54926
|
P(x({}, B), {
|
|
54921
54927
|
interface: j || null,
|
|
54922
|
-
uiSchema: P(x({}, (
|
|
54923
|
-
title: ((k = (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema) == null ? void 0 : k.title) || ((
|
|
54928
|
+
uiSchema: P(x({}, (L = w == null ? void 0 : w.default) == null ? void 0 : L.uiSchema), {
|
|
54929
|
+
title: ((k = (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema) == null ? void 0 : k.title) || ((O = B.uiSchema) == null ? void 0 : O.title)
|
|
54924
54930
|
}),
|
|
54925
54931
|
type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
|
|
54926
54932
|
}),
|
|
@@ -56046,7 +56052,7 @@ const isValidateEmpty = (e) => {
|
|
|
56046
56052
|
};
|
|
56047
56053
|
registerValidateRules({
|
|
56048
56054
|
username(e) {
|
|
56049
|
-
return /^[
|
|
56055
|
+
return /^[^@<>"'/]{1,50}$/.test(e) || i18n.t(`Must be 1-50 characters in length (excluding @<>"'/)`);
|
|
56050
56056
|
},
|
|
56051
56057
|
required(e, t) {
|
|
56052
56058
|
return t.required === !1 ? "" : (typeof e == "string" && (e = e.trim()), isValidateEmpty(e) ? t.message : "");
|
|
@@ -63452,28 +63458,28 @@ const ActionInitializerItem = (e) => {
|
|
|
63452
63458
|
), I = C || (a == null ? void 0 : a.targetKey) || "id", R = b || ((U = (G = i["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, T = {
|
|
63453
63459
|
title: R || I,
|
|
63454
63460
|
key: I
|
|
63455
|
-
}, [D, $] = useState([]), [B, N] = useState(i.default || []), [j, w] = useState(!0),
|
|
63461
|
+
}, [D, $] = useState([]), [B, N] = useState(i.default || []), [j, w] = useState(!0), L = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
|
|
63456
63462
|
if (useEffect(() => {
|
|
63457
63463
|
i.default && setTimeout(() => {
|
|
63458
63464
|
d(i.default), N(i.default);
|
|
63459
63465
|
}, 100);
|
|
63460
63466
|
}, [i.default, d]), !a)
|
|
63461
63467
|
return null;
|
|
63462
|
-
const M = (
|
|
63463
|
-
$(
|
|
63464
|
-
}, k = (
|
|
63465
|
-
N(
|
|
63466
|
-
},
|
|
63467
|
-
var
|
|
63468
|
-
const W = (
|
|
63468
|
+
const M = (X) => {
|
|
63469
|
+
$(X), w(!1);
|
|
63470
|
+
}, k = (X) => {
|
|
63471
|
+
N(X), d(X), p == null || p(X);
|
|
63472
|
+
}, O = (X) => {
|
|
63473
|
+
var J;
|
|
63474
|
+
const W = (J = h == null ? void 0 : h[0]) == null ? void 0 : J.filter;
|
|
63469
63475
|
(S || W) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
63470
63476
|
filter: f
|
|
63471
|
-
})), v(!S),
|
|
63472
|
-
}, q = (
|
|
63473
|
-
|
|
63474
|
-
},
|
|
63475
|
-
m(
|
|
63476
|
-
},
|
|
63477
|
+
})), v(!S), X.stopPropagation();
|
|
63478
|
+
}, q = (X) => {
|
|
63479
|
+
X.stopPropagation();
|
|
63480
|
+
}, V = (X) => {
|
|
63481
|
+
m(X);
|
|
63482
|
+
}, E = (K = i.title) != null ? K : (H = a == null ? void 0 : a.uiSchema) == null ? void 0 : H.title;
|
|
63477
63483
|
return t(
|
|
63478
63484
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(o, n, "nb-block-item", e.className, "SortableItem"), children: [
|
|
63479
63485
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -63490,7 +63496,7 @@ const ActionInitializerItem = (e) => {
|
|
|
63490
63496
|
},
|
|
63491
63497
|
gutter: 5,
|
|
63492
63498
|
children: [
|
|
63493
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
63499
|
+
/* @__PURE__ */ jsx(Col, { title: c(E), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
|
|
63494
63500
|
Input$3,
|
|
63495
63501
|
{
|
|
63496
63502
|
bordered: !1,
|
|
@@ -63498,16 +63504,16 @@ const ActionInitializerItem = (e) => {
|
|
|
63498
63504
|
placeholder: "Search...",
|
|
63499
63505
|
className: "search",
|
|
63500
63506
|
onClick: q,
|
|
63501
|
-
onChange:
|
|
63507
|
+
onChange: V
|
|
63502
63508
|
}
|
|
63503
|
-
) : c(
|
|
63509
|
+
) : c(E) }),
|
|
63504
63510
|
/* @__PURE__ */ jsx(
|
|
63505
63511
|
Col,
|
|
63506
63512
|
{
|
|
63507
63513
|
style: {
|
|
63508
63514
|
flex: "0 0 auto"
|
|
63509
63515
|
},
|
|
63510
|
-
children: S ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick:
|
|
63516
|
+
children: S ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: O }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: O })
|
|
63511
63517
|
}
|
|
63512
63518
|
)
|
|
63513
63519
|
]
|
|
@@ -63523,7 +63529,7 @@ const ActionInitializerItem = (e) => {
|
|
|
63523
63529
|
treeData: u,
|
|
63524
63530
|
onSelect: k,
|
|
63525
63531
|
fieldNames: T,
|
|
63526
|
-
titleRender: (
|
|
63532
|
+
titleRender: (X) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(L, c(X[R])) }),
|
|
63527
63533
|
selectedKeys: B,
|
|
63528
63534
|
blockNode: !0
|
|
63529
63535
|
}
|
|
@@ -63918,7 +63924,7 @@ function useMenuSearch({
|
|
|
63918
63924
|
})) : g, [e, c, u, g]);
|
|
63919
63925
|
}
|
|
63920
63926
|
const DataBlockInitializer = (e) => {
|
|
63921
|
-
var k,
|
|
63927
|
+
var k, O;
|
|
63922
63928
|
const {
|
|
63923
63929
|
templateWrap: t,
|
|
63924
63930
|
onCreateBlockSchema: o,
|
|
@@ -63947,14 +63953,14 @@ const DataBlockInitializer = (e) => {
|
|
|
63947
63953
|
componentType: n,
|
|
63948
63954
|
menuName: a
|
|
63949
63955
|
});
|
|
63950
|
-
const { item:
|
|
63956
|
+
const { item: V, fromOthersInPopup: E } = q;
|
|
63951
63957
|
if (f)
|
|
63952
63958
|
return f(q);
|
|
63953
|
-
if (
|
|
63954
|
-
const G = yield R(
|
|
63955
|
-
v(t ? t(G, { item:
|
|
63959
|
+
if (V.template) {
|
|
63960
|
+
const G = yield R(V);
|
|
63961
|
+
v(t ? t(G, { item: V, fromOthersInPopup: E }) : G);
|
|
63956
63962
|
} else
|
|
63957
|
-
|
|
63963
|
+
V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: E }) : o && o({ item: V, fromOthersInPopup: E });
|
|
63958
63964
|
F(!1);
|
|
63959
63965
|
}),
|
|
63960
63966
|
[
|
|
@@ -63982,21 +63988,21 @@ const DataBlockInitializer = (e) => {
|
|
|
63982
63988
|
onClick: D,
|
|
63983
63989
|
currentText: b,
|
|
63984
63990
|
otherText: y
|
|
63985
|
-
}), B = useGetSchemaInitializerMenuItems(D), N = useMemo(() => B($, a), [B, $, a]), [j, w] = useState([]),
|
|
63986
|
-
let q =
|
|
63987
|
-
return p && q.length === 1 ? q = q[0].children : q =
|
|
63991
|
+
}), B = useGetSchemaInitializerMenuItems(D), N = useMemo(() => B($, a), [B, $, a]), [j, w] = useState([]), L = useMenuSearch({ data: N, openKeys: j, hideSearch: u }), M = useMemo(() => {
|
|
63992
|
+
let q = L.filter((V) => V.key !== "search" && V.key !== "empty");
|
|
63993
|
+
return p && q.length === 1 ? q = q[0].children : q = L, [
|
|
63988
63994
|
{
|
|
63989
63995
|
key: a,
|
|
63990
63996
|
label: I(i),
|
|
63991
63997
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
63992
|
-
onClick: (
|
|
63993
|
-
|
|
63998
|
+
onClick: (V) => {
|
|
63999
|
+
V.key === a && D(P(x({}, V), { item: e }));
|
|
63994
64000
|
},
|
|
63995
64001
|
children: q
|
|
63996
64002
|
}
|
|
63997
64003
|
];
|
|
63998
|
-
}, [
|
|
63999
|
-
return N.length > 1 || N.length === 1 && ((
|
|
64004
|
+
}, [L, p, a, I, i, r, D, e]);
|
|
64005
|
+
return N.length > 1 || N.length === 1 && ((O = (k = N[0]) == null ? void 0 : k.children) == null ? void 0 : O.length) > 0 || S ? /* @__PURE__ */ jsx(
|
|
64000
64006
|
SchemaInitializerMenu,
|
|
64001
64007
|
{
|
|
64002
64008
|
onOpenChange: (q) => {
|
|
@@ -68296,6 +68302,7 @@ export {
|
|
|
68296
68302
|
GridRowContext,
|
|
68297
68303
|
HTMLEncode,
|
|
68298
68304
|
HeightMode,
|
|
68305
|
+
ICON_POPUP_Z_INDEX,
|
|
68299
68306
|
Icon,
|
|
68300
68307
|
IconFieldInterface,
|
|
68301
68308
|
IconPicker,
|