@nocobase/client 1.7.3 → 1.7.4
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 +557 -549
- package/lib/index.js +3 -3
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -6284,7 +6284,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6284
6284
|
const B = i(R.interface);
|
|
6285
6285
|
if (!(B != null && B.filterable))
|
|
6286
6286
|
return;
|
|
6287
|
-
const { nested: N, children:
|
|
6287
|
+
const { nested: N, children: M, operators: L } = B.filterable, w = {
|
|
6288
6288
|
name: R.name,
|
|
6289
6289
|
title: ((O = R == null ? void 0 : R.uiSchema) == null ? void 0 : O.title) || R.name,
|
|
6290
6290
|
schema: R == null ? void 0 : R.uiSchema,
|
|
@@ -6294,17 +6294,17 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
6294
6294
|
if (!(R.target && D > 2)) {
|
|
6295
6295
|
if (D > 2)
|
|
6296
6296
|
return w;
|
|
6297
|
-
if (
|
|
6298
|
-
const k = n(R.target),
|
|
6299
|
-
w.children = w.children || [], w.children.push(
|
|
6297
|
+
if (M != null && M.length && (w.children = M), N) {
|
|
6298
|
+
const k = n(R.target), $ = I(k, D + 1).filter(Boolean);
|
|
6299
|
+
w.children = w.children || [], w.children.push(...$);
|
|
6300
6300
|
}
|
|
6301
6301
|
return w;
|
|
6302
6302
|
}
|
|
6303
6303
|
}, I = (R, D) => {
|
|
6304
6304
|
const B = [];
|
|
6305
6305
|
return R.forEach((N) => {
|
|
6306
|
-
const
|
|
6307
|
-
|
|
6306
|
+
const M = F(N, D);
|
|
6307
|
+
M && B.push(M);
|
|
6308
6308
|
}), B;
|
|
6309
6309
|
};
|
|
6310
6310
|
return I(v, 1);
|
|
@@ -7945,7 +7945,7 @@ function withInitializer(e) {
|
|
|
7945
7945
|
S ? S(y(O, { isInSubTable: a })) : r(d, y(O, { isInSubTable: a }), { onSuccess: p });
|
|
7946
7946
|
},
|
|
7947
7947
|
[S, y, a, r, d, p]
|
|
7948
|
-
), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: B } = theme.useToken(), N = useNiceDropdownMaxHeight([R]),
|
|
7948
|
+
), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: B } = theme.useToken(), N = useNiceDropdownMaxHeight([R]), M = useMemo(
|
|
7949
7949
|
() => x({
|
|
7950
7950
|
options: o,
|
|
7951
7951
|
style: C
|
|
@@ -7985,7 +7985,7 @@ function withInitializer(e) {
|
|
|
7985
7985
|
options: o,
|
|
7986
7986
|
insert: v
|
|
7987
7987
|
},
|
|
7988
|
-
children: f === !1 ? React.createElement(e,
|
|
7988
|
+
children: f === !1 ? React.createElement(e, M) : /* @__PURE__ */ jsx(
|
|
7989
7989
|
Popover,
|
|
7990
7990
|
P(x({
|
|
7991
7991
|
zIndex: 9999,
|
|
@@ -8013,7 +8013,7 @@ function withInitializer(e) {
|
|
|
8013
8013
|
}
|
|
8014
8014
|
) })
|
|
8015
8015
|
),
|
|
8016
|
-
children: React.createElement(e,
|
|
8016
|
+
children: React.createElement(e, M)
|
|
8017
8017
|
})
|
|
8018
8018
|
)
|
|
8019
8019
|
}
|
|
@@ -8385,7 +8385,7 @@ function addAppVersion(e, t) {
|
|
|
8385
8385
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
8386
8386
|
}), e;
|
|
8387
8387
|
}
|
|
8388
|
-
const name = "@nocobase/client", version = "1.7.
|
|
8388
|
+
const name = "@nocobase/client", version = "1.7.4", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8389
8389
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8390
8390
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8391
8391
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8406,9 +8406,9 @@ const name = "@nocobase/client", version = "1.7.3", license = "AGPL-3.0", main =
|
|
|
8406
8406
|
"@formily/reactive-react": "^2.2.27",
|
|
8407
8407
|
"@formily/shared": "^2.2.27",
|
|
8408
8408
|
"@formily/validator": "^2.2.27",
|
|
8409
|
-
"@nocobase/evaluators": "1.7.
|
|
8410
|
-
"@nocobase/sdk": "1.7.
|
|
8411
|
-
"@nocobase/utils": "1.7.
|
|
8409
|
+
"@nocobase/evaluators": "1.7.4",
|
|
8410
|
+
"@nocobase/sdk": "1.7.4",
|
|
8411
|
+
"@nocobase/utils": "1.7.4",
|
|
8412
8412
|
ahooks: "^3.7.2",
|
|
8413
8413
|
antd: "5.24.2",
|
|
8414
8414
|
"antd-style": "3.7.1",
|
|
@@ -9570,11 +9570,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9570
9570
|
}
|
|
9571
9571
|
`, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(
|
|
9572
9572
|
() => d == null ? void 0 : d.map((F) => {
|
|
9573
|
-
var
|
|
9573
|
+
var M, L, w, O;
|
|
9574
9574
|
const I = F.reduceProperties((j, k) => {
|
|
9575
9575
|
if (isCollectionFieldComponent(k))
|
|
9576
9576
|
return j.concat([k]);
|
|
9577
|
-
}, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!((
|
|
9577
|
+
}, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!((M = F["x-component-props"]) != null && M.columnHidden), { uiSchema: D, defaultValue: B, interface: N } = (b == null ? void 0 : b.getField(T)) || {};
|
|
9578
9578
|
return F.title = o(F == null ? void 0 : F.title, { ns: NAMESPACE_UI_SCHEMA }), D && (D.default = B), P(x({
|
|
9579
9579
|
title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
9580
9580
|
S,
|
|
@@ -9592,7 +9592,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9592
9592
|
columnHidden: R
|
|
9593
9593
|
}, F["x-component-props"]), {
|
|
9594
9594
|
width: R && !l ? 0 : ((O = F["x-component-props"]) == null ? void 0 : O.width) || 100,
|
|
9595
|
-
render: (j, k,
|
|
9595
|
+
render: (j, k, $) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
9596
9596
|
TableCellRender,
|
|
9597
9597
|
{
|
|
9598
9598
|
record: k,
|
|
@@ -9601,7 +9601,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
|
|
|
9601
9601
|
filterProperties: f,
|
|
9602
9602
|
schemaToolbarBigger: C,
|
|
9603
9603
|
field: r,
|
|
9604
|
-
index:
|
|
9604
|
+
index: $
|
|
9605
9605
|
}
|
|
9606
9606
|
) }),
|
|
9607
9607
|
onCell: (j, k) => ({
|
|
@@ -9971,8 +9971,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
9971
9971
|
"loading",
|
|
9972
9972
|
"onClickRow",
|
|
9973
9973
|
"value"
|
|
9974
|
-
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexÏColumn: N } = R,
|
|
9975
|
-
})), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k,
|
|
9974
|
+
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexÏColumn: N } = R, M = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
9975
|
+
})), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, $] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
9976
9976
|
& > td {
|
|
9977
9977
|
background-color: ${t.controlItemBgActive} !important;
|
|
9978
9978
|
}
|
|
@@ -9983,8 +9983,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
9983
9983
|
useEffect(() => {
|
|
9984
9984
|
var Z;
|
|
9985
9985
|
H != null && H.field && (H.field.data = ((Z = H.field) == null ? void 0 : Z.data) || {}, H.field.data.clearSelectedRowKeys = () => {
|
|
9986
|
-
H.field.data.selectedRowKeys = [],
|
|
9987
|
-
}, H.field.data.setSelectedRowKeys =
|
|
9986
|
+
H.field.data.selectedRowKeys = [], $([]);
|
|
9987
|
+
}, H.field.data.setSelectedRowKeys = $);
|
|
9988
9988
|
}, [H == null ? void 0 : H.field]);
|
|
9989
9989
|
const Y = useMemo(() => C ? U : "", [U, C]), J = useMemo(() => C ? (Z, ne) => ({
|
|
9990
9990
|
onClick: (re) => {
|
|
@@ -10026,10 +10026,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10026
10026
|
return;
|
|
10027
10027
|
}
|
|
10028
10028
|
const ae = (Pe = (ve = (ye = re.active) == null ? void 0 : ye.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, le = (Ae = (Ie = (Fe = re.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, ge = (b == null ? void 0 : b[ae]) || re.active, Re = (b == null ? void 0 : b[le]) || re.over;
|
|
10029
|
-
y.move(ae, le),
|
|
10029
|
+
y.move(ae, le), M({ from: ge, to: Re });
|
|
10030
10030
|
}, []);
|
|
10031
10031
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
|
|
10032
|
-
}, [y,
|
|
10032
|
+
}, [y, M]);
|
|
10033
10033
|
ee.displayName = "BodyWrapperComponent";
|
|
10034
10034
|
const oe = useMemo(() => ({
|
|
10035
10035
|
header: {
|
|
@@ -10047,7 +10047,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10047
10047
|
type: "checkbox",
|
|
10048
10048
|
selectedRowKeys: k,
|
|
10049
10049
|
onChange(Z, ne) {
|
|
10050
|
-
y.data = y.data || {}, y.data.selectedRowKeys = Z, y.data.selectedRowData = ne,
|
|
10050
|
+
y.data = y.data || {}, y.data.selectedRowKeys = Z, y.data.selectedRowData = ne, $(Z), u == null || u(Z, ne, $);
|
|
10051
10051
|
},
|
|
10052
10052
|
onSelect: (Z, ne, re, ae) => {
|
|
10053
10053
|
var le;
|
|
@@ -10351,11 +10351,11 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10351
10351
|
[t, p]
|
|
10352
10352
|
), b = useCallback(
|
|
10353
10353
|
(w, O) => {
|
|
10354
|
-
var k,
|
|
10354
|
+
var k, $;
|
|
10355
10355
|
if (!w)
|
|
10356
10356
|
return [];
|
|
10357
10357
|
const j = (k = p(O)) == null ? void 0 : k.getCollection(w);
|
|
10358
|
-
return ((
|
|
10358
|
+
return (($ = j == null ? void 0 : j.getAllFields) == null ? void 0 : $.call(j)) || (j == null ? void 0 : j.getFields()) || [];
|
|
10359
10359
|
},
|
|
10360
10360
|
[t, p]
|
|
10361
10361
|
), S = useCallback(
|
|
@@ -10390,7 +10390,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10390
10390
|
(w, O, j, k) => {
|
|
10391
10391
|
var Q;
|
|
10392
10392
|
const {
|
|
10393
|
-
association:
|
|
10393
|
+
association: $ = !1,
|
|
10394
10394
|
cached: q = {},
|
|
10395
10395
|
collectionNames: E = [w],
|
|
10396
10396
|
maxDepth: V = 1,
|
|
@@ -10406,14 +10406,14 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10406
10406
|
return _.cloneDeep(q[w]);
|
|
10407
10407
|
O && typeof O == "string" && (O = [O]), j && typeof j == "string" && (j = [j]);
|
|
10408
10408
|
const K = b(w, J), X = (Q = K == null ? void 0 : K.filter(
|
|
10409
|
-
(ee) => ee.interface && !U.includes(ee.interface) && (G || O && O.includes(ee.type) || j && j.includes(ee.interface) || (
|
|
10409
|
+
(ee) => ee.interface && !U.includes(ee.interface) && (G || O && O.includes(ee.type) || j && j.includes(ee.interface) || ($ && ee.target && ee.target !== w && Array.isArray($) ? $.includes(ee.interface) : !1))
|
|
10410
10410
|
)) == null ? void 0 : Q.map((ee) => {
|
|
10411
10411
|
var te, se;
|
|
10412
10412
|
const oe = x({
|
|
10413
10413
|
value: Y && H ? `${H}.${ee.name}` : ee.name,
|
|
10414
10414
|
label: f((te = ee == null ? void 0 : ee.uiSchema) == null ? void 0 : te.title) || ee.name
|
|
10415
10415
|
}, ee);
|
|
10416
|
-
return
|
|
10416
|
+
return $ && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, O, j, P(x({}, k), {
|
|
10417
10417
|
cached: q,
|
|
10418
10418
|
dataSource: J,
|
|
10419
10419
|
collectionNames: [...E, ee.target],
|
|
@@ -10451,10 +10451,10 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10451
10451
|
return (O = B(w.interface)) == null ? void 0 : O.titleUsable;
|
|
10452
10452
|
},
|
|
10453
10453
|
[B]
|
|
10454
|
-
),
|
|
10454
|
+
), M = useCallback(
|
|
10455
10455
|
(w, O, j) => {
|
|
10456
|
-
var k,
|
|
10457
|
-
return (
|
|
10456
|
+
var k, $;
|
|
10457
|
+
return ($ = (k = p(j)) == null ? void 0 : k.getCollection(O)) == null ? void 0 : $.getParentCollectionFields(w);
|
|
10458
10458
|
},
|
|
10459
10459
|
[t, p]
|
|
10460
10460
|
), L = useCallback(
|
|
@@ -10469,7 +10469,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10469
10469
|
getTemplate: L,
|
|
10470
10470
|
getInterface: B,
|
|
10471
10471
|
getCollections: d,
|
|
10472
|
-
getParentCollectionFields:
|
|
10472
|
+
getParentCollectionFields: M,
|
|
10473
10473
|
getInheritCollections: y,
|
|
10474
10474
|
getChildrenCollections: v,
|
|
10475
10475
|
refreshCM: g,
|
|
@@ -10690,14 +10690,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10690
10690
|
popupUid: O,
|
|
10691
10691
|
recordData: j,
|
|
10692
10692
|
sourceId: k,
|
|
10693
|
-
collection:
|
|
10693
|
+
collection: $,
|
|
10694
10694
|
puid: q
|
|
10695
10695
|
}) => {
|
|
10696
10696
|
const E = c.getFilterByTK(u || l, j);
|
|
10697
10697
|
return getPopupPathFromParams({
|
|
10698
10698
|
popupuid: O,
|
|
10699
10699
|
puid: q,
|
|
10700
|
-
collection:
|
|
10700
|
+
collection: $,
|
|
10701
10701
|
filterbytk: E,
|
|
10702
10702
|
sourceid: k,
|
|
10703
10703
|
tab: w
|
|
@@ -10717,11 +10717,11 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10717
10717
|
parentRecordData: O,
|
|
10718
10718
|
collectionNameUsedInURL: j,
|
|
10719
10719
|
popupUidUsedInURL: k,
|
|
10720
|
-
customActionSchema:
|
|
10720
|
+
customActionSchema: $
|
|
10721
10721
|
} = {}) => {
|
|
10722
10722
|
if (!f())
|
|
10723
10723
|
return I == null ? void 0 : I(!0);
|
|
10724
|
-
const q =
|
|
10724
|
+
const q = $ || n, E = q == null ? void 0 : q["x-uid"], V = y(O);
|
|
10725
10725
|
w = w || (a == null ? void 0 : a.data);
|
|
10726
10726
|
const G = T({
|
|
10727
10727
|
popupUid: E,
|
|
@@ -10741,7 +10741,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10741
10741
|
association: u,
|
|
10742
10742
|
sourceId: V,
|
|
10743
10743
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
10744
|
-
}), b(R(),
|
|
10744
|
+
}), b(R(), $), q.properties) {
|
|
10745
10745
|
const H = h + 1;
|
|
10746
10746
|
if (getPopupLayerState(H))
|
|
10747
10747
|
return;
|
|
@@ -10796,7 +10796,7 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
10796
10796
|
});
|
|
10797
10797
|
},
|
|
10798
10798
|
[T, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, o]
|
|
10799
|
-
),
|
|
10799
|
+
), M = useCallback((w, O) => {
|
|
10800
10800
|
O.__popup = w;
|
|
10801
10801
|
}, []), L = useCallback((w) => w.__popup, []);
|
|
10802
10802
|
return {
|
|
@@ -10808,7 +10808,7 @@ ${JSON.stringify(q, null, 2)}`
|
|
|
10808
10808
|
* used to close popup by changing the url
|
|
10809
10809
|
*/
|
|
10810
10810
|
closePopup: B,
|
|
10811
|
-
savePopupSchemaToSchema:
|
|
10811
|
+
savePopupSchemaToSchema: M,
|
|
10812
10812
|
getPopupSchemaFromSchema: L,
|
|
10813
10813
|
context: S,
|
|
10814
10814
|
/**
|
|
@@ -12049,14 +12049,14 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
12049
12049
|
action: l,
|
|
12050
12050
|
conditionType: c
|
|
12051
12051
|
}, u) => {
|
|
12052
|
-
var S, y, v, F, I, T, R, D, B, N,
|
|
12052
|
+
var S, y, v, F, I, T, R, D, B, N, M, L, w, O;
|
|
12053
12053
|
const d = ((S = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : S.required) || [(y = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : y.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) || [(T = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : T.pattern], h = ((R = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : R.value) || [(D = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : D.value], g = ((B = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : B.dataSource) || [(N = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : N.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
|
|
12054
12054
|
ruleGroup: n,
|
|
12055
12055
|
variables: r,
|
|
12056
12056
|
localVariables: a,
|
|
12057
12057
|
variableNameOfLeftCondition: i,
|
|
12058
12058
|
conditionType: c
|
|
12059
|
-
}, b = ((
|
|
12059
|
+
}, b = ((M = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : M.dateScope) || [(L = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : L.dateScope];
|
|
12060
12060
|
switch (e) {
|
|
12061
12061
|
case ActionType.Required:
|
|
12062
12062
|
d.push(getTempFieldState(conditionAnalyses(C, u), !0)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
|
|
@@ -12089,12 +12089,12 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
12089
12089
|
if ((t == null ? void 0 : t.mode) === "express") {
|
|
12090
12090
|
if ((t.value || t.result) == null)
|
|
12091
12091
|
return;
|
|
12092
|
-
const { exp:
|
|
12092
|
+
const { exp: $, scope: q } = yield replaceVariables(t.value || t.result, {
|
|
12093
12093
|
variables: r,
|
|
12094
12094
|
localVariables: a
|
|
12095
12095
|
});
|
|
12096
12096
|
try {
|
|
12097
|
-
return f(
|
|
12097
|
+
return f($, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
|
|
12098
12098
|
} catch (E) {
|
|
12099
12099
|
console.error(E);
|
|
12100
12100
|
}
|
|
@@ -12918,10 +12918,10 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
12918
12918
|
return {
|
|
12919
12919
|
disabledHours: () => {
|
|
12920
12920
|
const B = [];
|
|
12921
|
-
return F && B.push(...Array.from({ length: g.hour() }, (N,
|
|
12921
|
+
return F && B.push(...Array.from({ length: g.hour() }, (N, M) => M)), I && B.push(...Array.from({ length: 24 - f.hour() }, (N, M) => M + f.hour() + 1)), B;
|
|
12922
12922
|
},
|
|
12923
12923
|
disabledMinutes: (B) => F && B === g.hour() ? C.filter((N) => N < g.minute()) : I && B === f.hour() ? C.filter((N) => N > f.minute()) : [],
|
|
12924
|
-
disabledSeconds: (B, N) => F && B === g.hour() && N === g.minute() ? C.filter((
|
|
12924
|
+
disabledSeconds: (B, N) => F && B === g.hour() && N === g.minute() ? C.filter((M) => M < g.second()) : I && B === f.hour() && N === f.minute() ? C.filter((M) => M > f.second()) : []
|
|
12925
12925
|
};
|
|
12926
12926
|
};
|
|
12927
12927
|
i(() => b), c(() => S);
|
|
@@ -13828,7 +13828,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13828
13828
|
collectionField: e,
|
|
13829
13829
|
noDisabled: r,
|
|
13830
13830
|
targetFieldSchema: a
|
|
13831
|
-
}), { currentParentRecordSettings: N, shouldDisplayCurrentParentRecord:
|
|
13831
|
+
}), { currentParentRecordSettings: N, shouldDisplayCurrentParentRecord: M } = useCurrentParentRecordVariable({
|
|
13832
13832
|
schema: o,
|
|
13833
13833
|
collectionName: c,
|
|
13834
13834
|
collectionField: e,
|
|
@@ -13845,7 +13845,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13845
13845
|
S && b,
|
|
13846
13846
|
v && y,
|
|
13847
13847
|
I && F,
|
|
13848
|
-
|
|
13848
|
+
M && N,
|
|
13849
13849
|
R && T,
|
|
13850
13850
|
B && D,
|
|
13851
13851
|
w && L
|
|
@@ -13862,7 +13862,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13862
13862
|
y,
|
|
13863
13863
|
I,
|
|
13864
13864
|
F,
|
|
13865
|
-
|
|
13865
|
+
M,
|
|
13866
13866
|
N,
|
|
13867
13867
|
R,
|
|
13868
13868
|
T,
|
|
@@ -13914,20 +13914,20 @@ const ParentCollectionProvider = (e) => {
|
|
|
13914
13914
|
}));
|
|
13915
13915
|
},
|
|
13916
13916
|
[o, u]
|
|
13917
|
-
),
|
|
13917
|
+
), M = m(
|
|
13918
13918
|
B(_.isEmpty(F) ? R : F, {
|
|
13919
13919
|
value: t
|
|
13920
13920
|
})
|
|
13921
13921
|
);
|
|
13922
13922
|
return useEffect(() => {
|
|
13923
|
-
C == null || C(
|
|
13923
|
+
C == null || C(M);
|
|
13924
13924
|
}, [t, F]), /* @__PURE__ */ jsx(
|
|
13925
13925
|
Variable.Input,
|
|
13926
13926
|
{
|
|
13927
13927
|
className: i,
|
|
13928
13928
|
value: t,
|
|
13929
13929
|
onChange: N,
|
|
13930
|
-
scope:
|
|
13930
|
+
scope: M,
|
|
13931
13931
|
style: r,
|
|
13932
13932
|
changeOnSelect: y,
|
|
13933
13933
|
hideVariableButton: f,
|
|
@@ -14229,8 +14229,8 @@ const SchemaSettingsDateFormat = function(t) {
|
|
|
14229
14229
|
(n.componentProps.picker || "date") !== D.picker && !m && n.value && (n.value = void 0, n.initialValue = void 0, o.default = void 0, B.default = void 0), B["x-component-props"] = n.componentProps || {}, o["x-component-props"] = x(x({}, n.componentProps || {}), D), B["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
|
|
14230
14230
|
const N = n.path.entire.split(".");
|
|
14231
14231
|
N.pop();
|
|
14232
|
-
const
|
|
14233
|
-
n.query(`${
|
|
14232
|
+
const M = N.join(".");
|
|
14233
|
+
n.query(`${M}.*[0:].${o.name}`).forEach((L) => {
|
|
14234
14234
|
L.props.name === o.name && ((n.componentProps.picker || "date") !== D.picker && !m && (L.value = void 0, L.initialValue = void 0), L.setComponentProps(x({}, D)));
|
|
14235
14235
|
}), r.emit("patch", {
|
|
14236
14236
|
schema: B
|
|
@@ -14252,7 +14252,7 @@ const getActionContext = (e) => {
|
|
|
14252
14252
|
var o;
|
|
14253
14253
|
return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
|
|
14254
14254
|
}, SchemaSettingsDefaultValue = function(t) {
|
|
14255
|
-
var k,
|
|
14255
|
+
var k, $, q;
|
|
14256
14256
|
const o = useFieldSchema(), n = (k = t == null ? void 0 : t.fieldSchema) != null ? k : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
14257
14257
|
let u;
|
|
14258
14258
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, T = useMemo(
|
|
@@ -14260,9 +14260,9 @@ const getActionContext = (e) => {
|
|
|
14260
14260
|
[n, p, d]
|
|
14261
14261
|
), R = _.omit(n, "required");
|
|
14262
14262
|
T != null && T.target && (u = p(
|
|
14263
|
-
`${T.target}.${((q = (
|
|
14263
|
+
`${T.target}.${((q = ($ = n["x-component-props"]) == null ? void 0 : $.fieldNames) == null ? void 0 : q.label) || "id"}`
|
|
14264
14264
|
));
|
|
14265
|
-
const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = D && p(D == null ? void 0 : D["x-collection-field"]), N = useTableBlockContext(),
|
|
14265
|
+
const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = D && p(D == null ? void 0 : D["x-collection-field"]), N = useTableBlockContext(), M = (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", L = useCallback(
|
|
14266
14266
|
(E) => {
|
|
14267
14267
|
const V = E.find((U) => U.value === "$nForm"), G = m(I);
|
|
14268
14268
|
return !(G != null && G.length) && V && (V.children = formatVariableScop(y())), E;
|
|
@@ -14287,7 +14287,7 @@ const getActionContext = (e) => {
|
|
|
14287
14287
|
"x-component": "VariableInput",
|
|
14288
14288
|
"x-component-props": P(x({}, (n == null ? void 0 : n["x-component-props"]) || {}), {
|
|
14289
14289
|
collectionField: T,
|
|
14290
|
-
contextCollectionName:
|
|
14290
|
+
contextCollectionName: M ? c : "",
|
|
14291
14291
|
schema: T == null ? void 0 : T.uiSchema,
|
|
14292
14292
|
targetFieldSchema: n,
|
|
14293
14293
|
className: defaultInputStyle,
|
|
@@ -14335,7 +14335,7 @@ const getActionContext = (e) => {
|
|
|
14335
14335
|
R,
|
|
14336
14336
|
S,
|
|
14337
14337
|
h,
|
|
14338
|
-
|
|
14338
|
+
M,
|
|
14339
14339
|
f,
|
|
14340
14340
|
b,
|
|
14341
14341
|
L,
|
|
@@ -15230,8 +15230,8 @@ const useGetFilterOptions = () => {
|
|
|
15230
15230
|
};
|
|
15231
15231
|
});
|
|
15232
15232
|
}, TableColumnDesigner$1 = (e) => {
|
|
15233
|
-
var N,
|
|
15234
|
-
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 = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || ((
|
|
15233
|
+
var N, M, L, w, O, j, k, $, q, E, V, G;
|
|
15234
|
+
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 = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || ((M = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : M.fieldNames), m = useLabelFields$1((L = n == null ? void 0 : n.target) != null ? L : 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: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = 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(
|
|
15235
15235
|
n == null ? void 0 : n.interface
|
|
15236
15236
|
), I = useFieldModeOptions({ fieldSchema: o }), T = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.mode) || "Select";
|
|
15237
15237
|
let R = "editable";
|
|
@@ -15273,7 +15273,7 @@ const useGetFilterOptions = () => {
|
|
|
15273
15273
|
SchemaSettingsDataScope,
|
|
15274
15274
|
{
|
|
15275
15275
|
collectionName: n == null ? void 0 : n.target,
|
|
15276
|
-
defaultFilter: ((q = (
|
|
15276
|
+
defaultFilter: ((q = ($ = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : $.params) == null ? void 0 : q.filter) || {},
|
|
15277
15277
|
form: r,
|
|
15278
15278
|
onSubmit: ({ filter: U }) => {
|
|
15279
15279
|
var Y, J;
|
|
@@ -16591,8 +16591,8 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16591
16591
|
schema: S
|
|
16592
16592
|
};
|
|
16593
16593
|
return l == "Kanban" && (y.find = (D, B, N) => {
|
|
16594
|
-
const
|
|
16595
|
-
return findSchema(
|
|
16594
|
+
const M = findSchema(D, "x-component", l);
|
|
16595
|
+
return findSchema(M, B, N);
|
|
16596
16596
|
}), y;
|
|
16597
16597
|
});
|
|
16598
16598
|
}, useFilterFormItemInitializerFields = (e) => {
|
|
@@ -16971,7 +16971,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
16971
16971
|
]
|
|
16972
16972
|
})), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
|
|
16973
16973
|
return r ? useMemo(() => {
|
|
16974
|
-
var
|
|
16974
|
+
var M;
|
|
16975
16975
|
const I = {
|
|
16976
16976
|
name: "currentRecord",
|
|
16977
16977
|
collectionName: C.name,
|
|
@@ -17042,7 +17042,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17042
17042
|
else if (F[0].children.length)
|
|
17043
17043
|
if (l) {
|
|
17044
17044
|
if (F[0].children.length <= 1)
|
|
17045
|
-
return F[0].children = ((
|
|
17045
|
+
return F[0].children = ((M = F[0].children[0]) == null ? void 0 : M.children) || [], F;
|
|
17046
17046
|
B = [I];
|
|
17047
17047
|
} else
|
|
17048
17048
|
B = [I, D];
|
|
@@ -17810,10 +17810,10 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17810
17810
|
t["x-settings"] || a,
|
|
17811
17811
|
t["x-settings-props"]
|
|
17812
17812
|
), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(), T = (F == null ? void 0 : F.length) > 1 && I, R = ["FormItem", "ReadPrettyFormItem"].includes(r == null ? void 0 : r.componentName) ? `${r == null ? void 0 : r.name} ${m("(Fields only)")}` : r == null ? void 0 : r.name, D = useMemo(() => {
|
|
17813
|
-
var
|
|
17813
|
+
var M;
|
|
17814
17814
|
return {
|
|
17815
17815
|
insertPosition: "afterEnd",
|
|
17816
|
-
wrap: ((
|
|
17816
|
+
wrap: ((M = S == null ? void 0 : S.cols) == null ? void 0 : M.length) > 1 ? void 0 : gridRowColWrap,
|
|
17817
17817
|
Component: (L) => /* @__PURE__ */ jsx(
|
|
17818
17818
|
PlusOutlined,
|
|
17819
17819
|
P(x({}, L), {
|
|
@@ -17881,7 +17881,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17881
17881
|
container: g
|
|
17882
17882
|
} = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$g(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(), T = useDataSource(), R = (I == null ? void 0 : I.length) > 1 && T, D = useRefreshFieldSchema(), B = useRef(y("Reference template")), N = useCallback(() => {
|
|
17883
17883
|
D({ refreshParentSchema: !0 });
|
|
17884
|
-
}, [D]),
|
|
17884
|
+
}, [D]), M = useMemo(() => {
|
|
17885
17885
|
if (o) {
|
|
17886
17886
|
if (typeof o == "string")
|
|
17887
17887
|
return [f(o)];
|
|
@@ -17894,7 +17894,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17894
17894
|
), { render: O, exists: j } = useSchemaInitializerRender(
|
|
17895
17895
|
n || (t == null ? void 0 : t["x-initializer"]),
|
|
17896
17896
|
t == null ? void 0 : t["x-initializer-props"]
|
|
17897
|
-
), k = useGridRowContext(),
|
|
17897
|
+
), k = useGridRowContext(), $ = useGridContext(), q = useMemo(() => {
|
|
17898
17898
|
var K;
|
|
17899
17899
|
return {
|
|
17900
17900
|
insertPosition: "afterEnd",
|
|
@@ -17914,9 +17914,9 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17914
17914
|
return null;
|
|
17915
17915
|
if (j)
|
|
17916
17916
|
return O(q);
|
|
17917
|
-
if (
|
|
17918
|
-
return
|
|
17919
|
-
}, [
|
|
17917
|
+
if ($ != null && $.InitializerComponent || $ != null && $.renderSchemaInitializer)
|
|
17918
|
+
return $ != null && $.InitializerComponent ? /* @__PURE__ */ jsx($.InitializerComponent, x({}, q)) : (K = $.renderSchemaInitializer) == null ? void 0 : K.call($, q);
|
|
17919
|
+
}, [$, n, q, j, O]), G = useMemo(() => r !== !1 && w ? L() : null, [w, L, r]), U = useRef(null), H = "hidden";
|
|
17920
17920
|
useEffect(() => {
|
|
17921
17921
|
const K = U.current;
|
|
17922
17922
|
let X = K == null ? void 0 : K.parentElement;
|
|
@@ -17951,9 +17951,9 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17951
17951
|
className: cls(b, S, m, "schema-toolbar", H),
|
|
17952
17952
|
style: Y,
|
|
17953
17953
|
children: [
|
|
17954
|
-
|
|
17955
|
-
/* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${f(R == null ? void 0 : R.displayName)} > ${
|
|
17956
|
-
|
|
17954
|
+
M && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
|
|
17955
|
+
/* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${f(R == null ? void 0 : R.displayName)} > ${M[0]}` : M[0] }, M[0]),
|
|
17956
|
+
M[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${M[1]}` || y("Untitled")}` })
|
|
17957
17957
|
] }) }),
|
|
17958
17958
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
17959
17959
|
E,
|
|
@@ -18174,8 +18174,8 @@ const useDragEnd = (e) => {
|
|
|
18174
18174
|
const { refresh: t } = useDesignable(), o = useAPIClient(), { t: n } = useTranslation();
|
|
18175
18175
|
return useCallback(
|
|
18176
18176
|
(r) => {
|
|
18177
|
-
var f, C, b, S, y, v, F, I, T, R, D, B, N,
|
|
18178
|
-
const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = i == null ? void 0 : i.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (R = (T = i == null ? void 0 : i.data) == null ? void 0 : T.current) == null ? void 0 : R.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (L = (
|
|
18177
|
+
var f, C, b, S, y, v, F, I, T, R, D, B, N, M, L;
|
|
18178
|
+
const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = i == null ? void 0 : i.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (R = (T = i == null ? void 0 : i.data) == null ? void 0 : T.current) == null ? void 0 : R.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (L = (M = (N = i == null ? void 0 : i.data) == null ? void 0 : N.current) == null ? void 0 : M.removeParentsIfNoChildren) != null ? L : !0;
|
|
18179
18179
|
if (!l || !c) {
|
|
18180
18180
|
e == null || e(r);
|
|
18181
18181
|
return;
|
|
@@ -18332,23 +18332,23 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
18332
18332
|
if (!B || !r)
|
|
18333
18333
|
return;
|
|
18334
18334
|
o.current = D.active.id;
|
|
18335
|
-
const N = B.current,
|
|
18336
|
-
F([
|
|
18335
|
+
const N = B.current, M = N.previousElementSibling, L = N.nextElementSibling;
|
|
18336
|
+
F([M.clientWidth, L.clientWidth]);
|
|
18337
18337
|
},
|
|
18338
18338
|
onDragMove(D) {
|
|
18339
18339
|
if (!r || !y)
|
|
18340
18340
|
return;
|
|
18341
18341
|
o.current === D.active.id && (o.current = o.current + "_move");
|
|
18342
|
-
const B = l.current, N = B.previousElementSibling,
|
|
18343
|
-
N.style.width = `${v[0] + D.delta.x}px`,
|
|
18342
|
+
const B = l.current, N = B.previousElementSibling, M = B.nextElementSibling;
|
|
18343
|
+
N.style.width = `${v[0] + D.delta.x}px`, M.style.width = `${v[1] - D.delta.x}px`;
|
|
18344
18344
|
},
|
|
18345
18345
|
onDragEnd(D) {
|
|
18346
18346
|
var j;
|
|
18347
18347
|
if (!r || !o.current || (j = o.current) != null && j.startsWith(D.active.id) && !o.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (F([0, 0]), !h || !g))
|
|
18348
18348
|
return;
|
|
18349
|
-
const B = l.current, N = B.previousElementSibling,
|
|
18349
|
+
const B = l.current, N = B.previousElementSibling, M = B.nextElementSibling;
|
|
18350
18350
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
18351
|
-
const L = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (N.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2), O = (100 * (
|
|
18351
|
+
const L = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (N.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2), O = (100 * (M.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2);
|
|
18352
18352
|
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", O), n.emit("batchPatch", {
|
|
18353
18353
|
schemas: [
|
|
18354
18354
|
{
|
|
@@ -18663,8 +18663,8 @@ const useTableBlockProps = () => {
|
|
|
18663
18663
|
),
|
|
18664
18664
|
onChange: useCallback(
|
|
18665
18665
|
({ current: S, pageSize: y }, v, F) => {
|
|
18666
|
-
var B, N,
|
|
18667
|
-
const I = (
|
|
18666
|
+
var B, N, M, L, w, O, j, k, $, q;
|
|
18667
|
+
const I = (M = (N = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : N.params) == null ? void 0 : M.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((O = (w = (L = t.parent) == null ? void 0 : L["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, ($ = (k = (j = i.current) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : $[0]), { page: S || 1, pageSize: R });
|
|
18668
18668
|
T && (D.sort = T), (q = i.current) == null || q.service.run(D);
|
|
18669
18669
|
},
|
|
18670
18670
|
[t.parent]
|
|
@@ -18678,11 +18678,11 @@ const useTableBlockProps = () => {
|
|
|
18678
18678
|
}
|
|
18679
18679
|
const R = T.find((D) => D.uid === t.parent["x-uid"]);
|
|
18680
18680
|
T.forEach((D) => {
|
|
18681
|
-
var j, k,
|
|
18681
|
+
var j, k, $, q;
|
|
18682
18682
|
const B = F.find((E) => E.uid === D.uid);
|
|
18683
18683
|
if (!B)
|
|
18684
18684
|
return;
|
|
18685
|
-
const N = getSourceKey(R, B.field) || a.rowKey || "id",
|
|
18685
|
+
const N = getSourceKey(R, B.field) || a.rowKey || "id", M = [S[N]], L = ((j = D.service.params) == null ? void 0 : j[0]) || {}, w = (($ = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : $.filters) || {};
|
|
18686
18686
|
if (v.includes(S[a.rowKey])) {
|
|
18687
18687
|
if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
|
|
18688
18688
|
return D.clearData();
|
|
@@ -18692,7 +18692,7 @@ const useTableBlockProps = () => {
|
|
|
18692
18692
|
$and: [
|
|
18693
18693
|
{
|
|
18694
18694
|
[B.field || a.rowKey]: {
|
|
18695
|
-
[B.field ? "$in" : "$eq"]:
|
|
18695
|
+
[B.field ? "$in" : "$eq"]: M
|
|
18696
18696
|
}
|
|
18697
18697
|
}
|
|
18698
18698
|
]
|
|
@@ -19058,10 +19058,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19058
19058
|
var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
19059
19059
|
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"]);
|
|
19060
19060
|
return useEffect(() => {
|
|
19061
|
-
var T, R, D, B, N,
|
|
19061
|
+
var T, R, D, B, N, M, L, w, O, j, k, $, q;
|
|
19062
19062
|
if (!((T = t == null ? void 0 : t.service) != null && T.loading)) {
|
|
19063
19063
|
const E = (D = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : D.data.map((V) => V);
|
|
19064
|
-
e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (L = (
|
|
19064
|
+
e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (L = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : L.pageSize, e.componentProps.pagination.total = (j = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : j.count, e.componentProps.pagination.current = (q = ($ = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : $.meta) == null ? void 0 : q.page;
|
|
19065
19065
|
}
|
|
19066
19066
|
}, [
|
|
19067
19067
|
a == null ? void 0 : a.foreignKey,
|
|
@@ -20505,7 +20505,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
20505
20505
|
}, DateScopeComponent = (e) => {
|
|
20506
20506
|
var g, f, C, b, S, y, v, F, I, T, R, D, B, N;
|
|
20507
20507
|
const t = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), n = o(t == null ? void 0 : t["x-collection-field"]) || {}, r = ((g = n == null ? void 0 : n.uiSchema) == null ? void 0 : g["x-component-props"].gmt) || !1, a = ((f = n == null ? void 0 : n.uiSchema) == null ? void 0 : f["x-component-props"].utc) || !1, { form: i } = useFormBlockContext(), l = useRecord(), c = ((C = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : C.showTime) || ((S = (b = n == null ? void 0 : n.uiSchema) == null ? void 0 : b["x-component-props"]) == null ? void 0 : S.showTime) || !1, u = ((y = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : y.dateFormat) || ((F = (v = n == null ? void 0 : n.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : F.dateFormat) || "YYYY-MM-DD", d = ((I = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : I.timeFormat) || ((R = (T = n == null ? void 0 : n.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : R.timeFormat) || "HH:mm:ss", p = ((D = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : D.picker) || ((N = (B = n == null ? void 0 : n.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.picker) || "date", m = useCallback(
|
|
20508
|
-
(
|
|
20508
|
+
(M) => /* @__PURE__ */ jsx(
|
|
20509
20509
|
SchemaComponent,
|
|
20510
20510
|
{
|
|
20511
20511
|
schema: {
|
|
@@ -20531,9 +20531,9 @@ const DynamicComponent$1 = (e) => {
|
|
|
20531
20531
|
),
|
|
20532
20532
|
[u, r, p, c, d, a]
|
|
20533
20533
|
), h = useCallback(
|
|
20534
|
-
(
|
|
20534
|
+
(M) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: n, children: /* @__PURE__ */ jsx(
|
|
20535
20535
|
VariableInput,
|
|
20536
|
-
P(x({},
|
|
20536
|
+
P(x({}, M), {
|
|
20537
20537
|
form: i,
|
|
20538
20538
|
record: l,
|
|
20539
20539
|
noDisabled: !0,
|
|
@@ -21738,12 +21738,12 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21738
21738
|
}, [D]), N = useCallback(() => z(void 0, null, function* () {
|
|
21739
21739
|
yield D.submit();
|
|
21740
21740
|
try {
|
|
21741
|
-
const O = D.values, j = Object.keys(O).reduce((k,
|
|
21741
|
+
const O = D.values, j = Object.keys(O).reduce((k, $) => (D.query($).take() && (k[$] = O[$]), k), {});
|
|
21742
21742
|
h(!1), yield o == null ? void 0 : o(cloneDeep$1(j));
|
|
21743
21743
|
} catch (O) {
|
|
21744
21744
|
console.error(O);
|
|
21745
21745
|
}
|
|
21746
|
-
}), [D, o]),
|
|
21746
|
+
}), [D, o]), M = useCallback(() => z(void 0, null, function* () {
|
|
21747
21747
|
!g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), S.setVisible(!1), h(!0);
|
|
21748
21748
|
}), [F, S, y, b, i, g]), L = useCallback((O) => O.stopPropagation(), []);
|
|
21749
21749
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: R, children: [
|
|
@@ -21752,7 +21752,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21752
21752
|
P(x({
|
|
21753
21753
|
title: v(t)
|
|
21754
21754
|
}, p), {
|
|
21755
|
-
onClick:
|
|
21755
|
+
onClick: M,
|
|
21756
21756
|
onKeyDown: L,
|
|
21757
21757
|
children: e.children || e.title
|
|
21758
21758
|
})
|
|
@@ -21812,7 +21812,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21812
21812
|
"noRecord",
|
|
21813
21813
|
"ModalContextProvider",
|
|
21814
21814
|
"dialogRootClassName"
|
|
21815
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(),
|
|
21815
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: L } = useOperators(), w = useLocationSearch(), O = useVariables$1(), j = useContext(AllDataBlocksContext), { formValue: k, collection: $, parent: q } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
|
|
21816
21816
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21817
21817
|
SchemaSettingsItem,
|
|
21818
21818
|
P(x({
|
|
@@ -21822,7 +21822,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21822
21822
|
const U = l ? yield l() : c, H = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21823
21823
|
FormDialog(
|
|
21824
21824
|
{ title: H.title || o, width: u, rootClassName: m },
|
|
21825
|
-
() => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: j, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value:
|
|
21825
|
+
() => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: j, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: M, children: /* @__PURE__ */ jsx(
|
|
21826
21826
|
VariablePopupRecordProvider,
|
|
21827
21827
|
{
|
|
21828
21828
|
recordData: E == null ? void 0 : E.value,
|
|
@@ -21831,7 +21831,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21831
21831
|
recordData: V == null ? void 0 : V.value,
|
|
21832
21832
|
collection: V == null ? void 0 : V.collection
|
|
21833
21833
|
},
|
|
21834
|
-
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection:
|
|
21834
|
+
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: $, parent: q }, children: /* @__PURE__ */ jsx(
|
|
21835
21835
|
FormActiveFieldsProvider,
|
|
21836
21836
|
{
|
|
21837
21837
|
name: "form",
|
|
@@ -22026,7 +22026,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22026
22026
|
}
|
|
22027
22027
|
}),
|
|
22028
22028
|
[o, c, u, y, g, f, p, h, R, r]
|
|
22029
|
-
),
|
|
22029
|
+
), M = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), L = useCallback(
|
|
22030
22030
|
(O) => {
|
|
22031
22031
|
var E;
|
|
22032
22032
|
const j = [];
|
|
@@ -22045,7 +22045,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22045
22045
|
SchemaSettingsModalItem,
|
|
22046
22046
|
{
|
|
22047
22047
|
title: D,
|
|
22048
|
-
components:
|
|
22048
|
+
components: M,
|
|
22049
22049
|
width: 960,
|
|
22050
22050
|
schema: N,
|
|
22051
22051
|
onSubmit: L,
|
|
@@ -22918,7 +22918,7 @@ function Input$1(e) {
|
|
|
22918
22918
|
useAntdInputStyle(`${S}-input`);
|
|
22919
22919
|
const y = useCompile(), { t: v } = useTranslation(), F = useForm(), [I, T] = React.useState([]), [R, D] = React.useState([]), [B, N] = React.useState(
|
|
22920
22920
|
m || !!(n && t != null)
|
|
22921
|
-
),
|
|
22921
|
+
), M = useMemo(() => parseValue(t, p), [p, t]), L = typeof M == "string", w = L ? M : "", O = L ? null : M, j = Object.assign(
|
|
22922
22922
|
{
|
|
22923
22923
|
label: "label",
|
|
22924
22924
|
value: "value",
|
|
@@ -22930,7 +22930,7 @@ function Input$1(e) {
|
|
|
22930
22930
|
label: v("Constant"),
|
|
22931
22931
|
[j.value]: "$",
|
|
22932
22932
|
[j.label]: v("Constant")
|
|
22933
|
-
} : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]),
|
|
22933
|
+
} : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]), $ = (Y = k == null ? void 0 : k.component) != null ? Y : NullComponent, q = Array.isArray(a) ? (K = (J = a.find((X) => Array.isArray(X) && X[0] === w)) == null ? void 0 : J[1]) != null ? K : {} : {};
|
|
22934
22934
|
let E;
|
|
22935
22935
|
t == null ? i ? n && B ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", w] : E = n ? ["$"] : [" ", w], m && (E = ["$"]), useEffect(() => {
|
|
22936
22936
|
const oe = k != null ? k : {}, { component: X } = oe, Q = W(oe, ["component"]), ee = [
|
|
@@ -23069,8 +23069,8 @@ function Input$1(e) {
|
|
|
23069
23069
|
)
|
|
23070
23070
|
]
|
|
23071
23071
|
}
|
|
23072
|
-
) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (B || !i) ? n :
|
|
23073
|
-
|
|
23072
|
+
) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (B || !i) ? n : $ ? /* @__PURE__ */ jsx(
|
|
23073
|
+
$,
|
|
23074
23074
|
P(x({
|
|
23075
23075
|
role: "button",
|
|
23076
23076
|
"aria-label": "variable-constant"
|
|
@@ -23366,7 +23366,7 @@ function TextArea(e) {
|
|
|
23366
23366
|
[l, g]
|
|
23367
23367
|
), [S, y] = useState(!1), [v, F] = useState(!1), [I, T] = useState(() => renderHTML(p != null ? p : "", b, c)), [R, D] = useState([-1, 0, -1, 0]);
|
|
23368
23368
|
useAntdInputStyle("ant-input");
|
|
23369
|
-
const { token: B } = theme.useToken(), N = c.join(" "),
|
|
23369
|
+
const { token: B } = theme.useToken(), N = c.join(" "), M = useCallback(
|
|
23370
23370
|
(V) => {
|
|
23371
23371
|
var U;
|
|
23372
23372
|
const G = getValue(V, c);
|
|
@@ -23414,25 +23414,25 @@ function TextArea(e) {
|
|
|
23414
23414
|
const H = createVariableTagHTML(G.join("."), b);
|
|
23415
23415
|
pasteHTML(U, H, {
|
|
23416
23416
|
range: R
|
|
23417
|
-
}), F(!0), D(getCurrentRange(U)),
|
|
23417
|
+
}), F(!0), D(getCurrentRange(U)), M(U);
|
|
23418
23418
|
},
|
|
23419
|
-
[b,
|
|
23419
|
+
[b, M, R]
|
|
23420
23420
|
), w = useCallback(
|
|
23421
23421
|
function({ currentTarget: V }) {
|
|
23422
|
-
S || (F(!0), D(getCurrentRange(V)),
|
|
23422
|
+
S || (F(!0), D(getCurrentRange(V)), M(V));
|
|
23423
23423
|
},
|
|
23424
|
-
[S,
|
|
23424
|
+
[S, M]
|
|
23425
23425
|
), O = useCallback(function({ currentTarget: V }) {
|
|
23426
23426
|
D(getCurrentRange(V));
|
|
23427
23427
|
}, []), j = useCallback(function(V) {
|
|
23428
23428
|
V.key === "Enter" && V.preventDefault();
|
|
23429
23429
|
}, []), k = useCallback(function() {
|
|
23430
23430
|
y(!0);
|
|
23431
|
-
}, []),
|
|
23431
|
+
}, []), $ = useCallback(
|
|
23432
23432
|
({ currentTarget: V }) => {
|
|
23433
|
-
y(!1), F(!0), D(getCurrentRange(V)),
|
|
23433
|
+
y(!1), F(!0), D(getCurrentRange(V)), M(V);
|
|
23434
23434
|
},
|
|
23435
|
-
[
|
|
23435
|
+
[M]
|
|
23436
23436
|
), q = useCallback(
|
|
23437
23437
|
function(V) {
|
|
23438
23438
|
V.preventDefault();
|
|
@@ -23453,9 +23453,9 @@ function TextArea(e) {
|
|
|
23453
23453
|
}
|
|
23454
23454
|
}
|
|
23455
23455
|
}).replace(/\n/g, " ");
|
|
23456
|
-
F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)),
|
|
23456
|
+
F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), M(V.currentTarget);
|
|
23457
23457
|
},
|
|
23458
|
-
[
|
|
23458
|
+
[M]
|
|
23459
23459
|
), E = e.disabled || C.disabled;
|
|
23460
23460
|
return t(
|
|
23461
23461
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -23510,7 +23510,7 @@ function TextArea(e) {
|
|
|
23510
23510
|
onKeyDown: j,
|
|
23511
23511
|
onPaste: q,
|
|
23512
23512
|
onCompositionStart: k,
|
|
23513
|
-
onCompositionEnd:
|
|
23513
|
+
onCompositionEnd: $,
|
|
23514
23514
|
placeholder: e.placeholder,
|
|
23515
23515
|
style: i,
|
|
23516
23516
|
className: cx(
|
|
@@ -26422,18 +26422,18 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26422
26422
|
config: {}
|
|
26423
26423
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
26424
26424
|
function C(k) {
|
|
26425
|
-
var
|
|
26426
|
-
for (
|
|
26427
|
-
if (q = k[
|
|
26428
|
-
k.splice(
|
|
26425
|
+
var $, q;
|
|
26426
|
+
for ($ = 0; $ < k.length; $++)
|
|
26427
|
+
if (q = k[$], q === ".")
|
|
26428
|
+
k.splice($, 1), $ -= 1;
|
|
26429
26429
|
else if (q === "..") {
|
|
26430
|
-
if (
|
|
26430
|
+
if ($ === 0 || $ === 1 && k[2] === ".." || k[$ - 1] === "..")
|
|
26431
26431
|
continue;
|
|
26432
|
-
|
|
26432
|
+
$ > 0 && (k.splice($ - 1, 2), $ -= 2);
|
|
26433
26433
|
}
|
|
26434
26434
|
}
|
|
26435
|
-
function b(k,
|
|
26436
|
-
var E, V, G, U, H, Y, J, K, X, Q, ee, oe, te =
|
|
26435
|
+
function b(k, $, q) {
|
|
26436
|
+
var E, V, G, U, H, Y, J, K, X, Q, ee, oe, te = $ && $.split("/"), se = i.map, ie = se && se["*"];
|
|
26437
26437
|
if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), k = oe.concat(k)), C(k), k = k.join("/")), q && se && (te || ie)) {
|
|
26438
26438
|
G = k.split("/");
|
|
26439
26439
|
e:
|
|
@@ -26452,30 +26452,30 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26452
26452
|
return E = getOwn(i.pkgs, k), E || k;
|
|
26453
26453
|
}
|
|
26454
26454
|
function S(k) {
|
|
26455
|
-
isBrowser && each(scripts(), function(
|
|
26456
|
-
if (
|
|
26457
|
-
return
|
|
26455
|
+
isBrowser && each(scripts(), function($) {
|
|
26456
|
+
if ($.getAttribute("data-requiremodule") === k && $.getAttribute("data-requirecontext") === n.contextName)
|
|
26457
|
+
return $.parentNode.removeChild($), !0;
|
|
26458
26458
|
});
|
|
26459
26459
|
}
|
|
26460
26460
|
function y(k) {
|
|
26461
|
-
var
|
|
26462
|
-
if (
|
|
26463
|
-
return
|
|
26461
|
+
var $ = getOwn(i.paths, k);
|
|
26462
|
+
if ($ && isArray($) && $.length > 1)
|
|
26463
|
+
return $.shift(), n.require.undef(k), n.makeRequire(null, {
|
|
26464
26464
|
skipMap: !0
|
|
26465
26465
|
})([k]), !0;
|
|
26466
26466
|
}
|
|
26467
26467
|
function v(k) {
|
|
26468
|
-
var
|
|
26469
|
-
return q > -1 && (
|
|
26468
|
+
var $, q = k ? k.indexOf("!") : -1;
|
|
26469
|
+
return q > -1 && ($ = k.substring(0, q), k = k.substring(q + 1, k.length)), [$, k];
|
|
26470
26470
|
}
|
|
26471
|
-
function F(k,
|
|
26472
|
-
var V, G, U, H, Y = null, J =
|
|
26471
|
+
function F(k, $, q, E) {
|
|
26472
|
+
var V, G, U, H, Y = null, J = $ ? $.name : null, K = k, X = !0, Q = "";
|
|
26473
26473
|
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), Y = H[0], k = H[1], Y && (Y = b(Y, J, E), G = getOwn(p, Y)), k && (Y ? q ? Q = k : G && G.normalize ? Q = G.normalize(k, function(ee) {
|
|
26474
26474
|
return b(ee, J, E);
|
|
26475
26475
|
}) : Q = k.indexOf("!") === -1 ? b(k, J, E) : k : (Q = b(k, J, E), H = v(Q), Y = H[0], Q = H[1], q = !0, V = n.nameToUrl(Q))), U = Y && !G && !q ? "_unnormalized" + (f += 1) : "", {
|
|
26476
26476
|
prefix: Y,
|
|
26477
26477
|
name: Q,
|
|
26478
|
-
parentMap:
|
|
26478
|
+
parentMap: $,
|
|
26479
26479
|
unnormalized: !!U,
|
|
26480
26480
|
url: V,
|
|
26481
26481
|
originalName: K,
|
|
@@ -26484,24 +26484,24 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26484
26484
|
};
|
|
26485
26485
|
}
|
|
26486
26486
|
function I(k) {
|
|
26487
|
-
var
|
|
26488
|
-
return q || (q = l[
|
|
26487
|
+
var $ = k.id, q = getOwn(l, $);
|
|
26488
|
+
return q || (q = l[$] = new n.Module(k)), q;
|
|
26489
26489
|
}
|
|
26490
|
-
function T(k,
|
|
26490
|
+
function T(k, $, q) {
|
|
26491
26491
|
var E = k.id, V = getOwn(l, E);
|
|
26492
|
-
hasProp(p, E) && (!V || V.defineEmitComplete) ?
|
|
26492
|
+
hasProp(p, E) && (!V || V.defineEmitComplete) ? $ === "defined" && q(p[E]) : (V = I(k), V.error && $ === "error" ? q(V.error) : V.on($, q));
|
|
26493
26493
|
}
|
|
26494
|
-
function R(k,
|
|
26494
|
+
function R(k, $) {
|
|
26495
26495
|
var q = k.requireModules, E = !1;
|
|
26496
|
-
|
|
26496
|
+
$ ? $(k) : (each(q, function(V) {
|
|
26497
26497
|
var G = getOwn(l, V);
|
|
26498
26498
|
G && (G.error = k, G.events.error && (E = !0, G.emit("error", k)));
|
|
26499
26499
|
}), E || req.onError(k));
|
|
26500
26500
|
}
|
|
26501
26501
|
function D() {
|
|
26502
26502
|
globalDefQueue.length && (each(globalDefQueue, function(k) {
|
|
26503
|
-
var
|
|
26504
|
-
typeof
|
|
26503
|
+
var $ = k[0];
|
|
26504
|
+
typeof $ == "string" && (n.defQueueMap[$] = !0), d.push(k);
|
|
26505
26505
|
}), globalDefQueue = []);
|
|
26506
26506
|
}
|
|
26507
26507
|
r = {
|
|
@@ -26526,21 +26526,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26526
26526
|
function B(k) {
|
|
26527
26527
|
delete l[k], delete c[k];
|
|
26528
26528
|
}
|
|
26529
|
-
function N(k,
|
|
26529
|
+
function N(k, $, q) {
|
|
26530
26530
|
var E = k.map.id;
|
|
26531
|
-
k.error ? k.emit("error", k.error) : (
|
|
26531
|
+
k.error ? k.emit("error", k.error) : ($[E] = !0, each(k.depMaps, function(V, G) {
|
|
26532
26532
|
var U = V.id, H = getOwn(l, U);
|
|
26533
|
-
H && !k.depMatched[G] && !q[U] && (getOwn(
|
|
26533
|
+
H && !k.depMatched[G] && !q[U] && (getOwn($, U) ? (k.defineDep(G, p[U]), k.check()) : N(H, $, q));
|
|
26534
26534
|
}), q[E] = !0);
|
|
26535
26535
|
}
|
|
26536
|
-
function
|
|
26537
|
-
var k,
|
|
26536
|
+
function M() {
|
|
26537
|
+
var k, $, q = i.waitSeconds * 1e3, E = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], U = !1, H = !0;
|
|
26538
26538
|
if (!t) {
|
|
26539
26539
|
if (t = !0, eachProp(c, function(Y) {
|
|
26540
26540
|
var J = Y.map, K = J.id;
|
|
26541
26541
|
if (Y.enabled && (J.isDefine || G.push(Y), !Y.error)) {
|
|
26542
26542
|
if (!Y.inited && E)
|
|
26543
|
-
y(K) ? (
|
|
26543
|
+
y(K) ? ($ = !0, U = !0) : (V.push(K), S(K));
|
|
26544
26544
|
else if (!Y.inited && Y.fetched && J.isDefine && (U = !0, !J.prefix))
|
|
26545
26545
|
return H = !1;
|
|
26546
26546
|
}
|
|
@@ -26548,21 +26548,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26548
26548
|
return k = makeError("timeout", "Load timeout for modules: " + V, null, V), k.contextName = n.contextName, R(k);
|
|
26549
26549
|
H && each(G, function(Y) {
|
|
26550
26550
|
N(Y, {}, {});
|
|
26551
|
-
}), (!E ||
|
|
26552
|
-
a = 0,
|
|
26551
|
+
}), (!E || $) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
|
|
26552
|
+
a = 0, M();
|
|
26553
26553
|
}, 50)), t = !1;
|
|
26554
26554
|
}
|
|
26555
26555
|
}
|
|
26556
26556
|
o = function(k) {
|
|
26557
26557
|
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;
|
|
26558
26558
|
}, o.prototype = {
|
|
26559
|
-
init: function(k,
|
|
26560
|
-
E = E || {}, !this.inited && (this.factory =
|
|
26559
|
+
init: function(k, $, q, E) {
|
|
26560
|
+
E = E || {}, !this.inited && (this.factory = $, q ? this.on("error", q) : this.events.error && (q = bind(this, function(V) {
|
|
26561
26561
|
this.emit("error", V);
|
|
26562
26562
|
})), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = E.ignore, E.enabled || this.enabled ? this.enable() : this.check());
|
|
26563
26563
|
},
|
|
26564
|
-
defineDep: function(k,
|
|
26565
|
-
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] =
|
|
26564
|
+
defineDep: function(k, $) {
|
|
26565
|
+
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = $);
|
|
26566
26566
|
},
|
|
26567
26567
|
fetch: function() {
|
|
26568
26568
|
if (!this.fetched) {
|
|
@@ -26588,7 +26588,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26588
26588
|
*/
|
|
26589
26589
|
check: function() {
|
|
26590
26590
|
if (!(!this.enabled || this.enabling)) {
|
|
26591
|
-
var k,
|
|
26591
|
+
var k, $, q = this.map.id, E = this.depExports, V = this.exports, G = this.factory;
|
|
26592
26592
|
if (!this.inited)
|
|
26593
26593
|
hasProp(n.defQueueMap, q) || this.fetch();
|
|
26594
26594
|
else if (this.error)
|
|
@@ -26604,7 +26604,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26604
26604
|
}
|
|
26605
26605
|
else
|
|
26606
26606
|
V = n.execCb(q, G, E, V);
|
|
26607
|
-
if (this.map.isDefine && V === void 0 && (
|
|
26607
|
+
if (this.map.isDefine && V === void 0 && ($ = this.module, $ ? V = $.exports : this.usingExports && (V = this.exports)), k)
|
|
26608
26608
|
return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", R(this.error = k);
|
|
26609
26609
|
} else
|
|
26610
26610
|
V = G;
|
|
@@ -26621,7 +26621,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26621
26621
|
}
|
|
26622
26622
|
},
|
|
26623
26623
|
callPlugin: function() {
|
|
26624
|
-
var k = this.map,
|
|
26624
|
+
var k = this.map, $ = k.id, q = F(k.prefix);
|
|
26625
26625
|
this.depMaps.push(q), T(q, "defined", bind(this, function(E) {
|
|
26626
26626
|
var V, G, U, H = getOwn(h, this.map.id), Y = this.map.name, J = this.map.parentMap ? this.map.parentMap.name : null, K = n.makeRequire(k.parentMap, {
|
|
26627
26627
|
enableBuildCallback: !0
|
|
@@ -26660,20 +26660,20 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26660
26660
|
enabled: !0
|
|
26661
26661
|
});
|
|
26662
26662
|
}), V.error = bind(this, function(X) {
|
|
26663
|
-
this.inited = !0, this.error = X, X.requireModules = [
|
|
26664
|
-
Q.map.id.indexOf(
|
|
26663
|
+
this.inited = !0, this.error = X, X.requireModules = [$], eachProp(l, function(Q) {
|
|
26664
|
+
Q.map.id.indexOf($ + "_unnormalized") === 0 && B(Q.map.id);
|
|
26665
26665
|
}), R(X);
|
|
26666
26666
|
}), V.fromText = bind(this, function(X, Q) {
|
|
26667
26667
|
var ee = k.name, oe = F(ee), te = useInteractive;
|
|
26668
|
-
Q && (X = Q), te && (useInteractive = !1), I(oe), hasProp(i.config,
|
|
26668
|
+
Q && (X = Q), te && (useInteractive = !1), I(oe), hasProp(i.config, $) && (i.config[ee] = i.config[$]);
|
|
26669
26669
|
try {
|
|
26670
26670
|
req.exec(X);
|
|
26671
26671
|
} catch (se) {
|
|
26672
26672
|
return R(makeError(
|
|
26673
26673
|
"fromtexteval",
|
|
26674
|
-
"fromText eval for " +
|
|
26674
|
+
"fromText eval for " + $ + " failed: " + se,
|
|
26675
26675
|
se,
|
|
26676
|
-
[
|
|
26676
|
+
[$]
|
|
26677
26677
|
));
|
|
26678
26678
|
}
|
|
26679
26679
|
te && (useInteractive = !0), this.depMaps.push(oe), n.completeLoad(ee), K([ee], V);
|
|
@@ -26681,7 +26681,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26681
26681
|
})), n.enable(q, this), this.pluginMaps[q.id] = q;
|
|
26682
26682
|
},
|
|
26683
26683
|
enable: function() {
|
|
26684
|
-
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k,
|
|
26684
|
+
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, $) {
|
|
26685
26685
|
var q, E, V;
|
|
26686
26686
|
if (typeof k == "string") {
|
|
26687
26687
|
if (k = F(
|
|
@@ -26689,43 +26689,43 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26689
26689
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
26690
26690
|
!1,
|
|
26691
26691
|
!this.skipMap
|
|
26692
|
-
), this.depMaps[
|
|
26693
|
-
this.depExports[
|
|
26692
|
+
), this.depMaps[$] = k, V = getOwn(r, k.id), V) {
|
|
26693
|
+
this.depExports[$] = V(this);
|
|
26694
26694
|
return;
|
|
26695
26695
|
}
|
|
26696
26696
|
this.depCount += 1, T(k, "defined", bind(this, function(G) {
|
|
26697
|
-
this.undefed || (this.defineDep(
|
|
26697
|
+
this.undefed || (this.defineDep($, G), this.check());
|
|
26698
26698
|
})), this.errback ? T(k, "error", bind(this, this.errback)) : this.events.error && T(k, "error", bind(this, function(G) {
|
|
26699
26699
|
this.emit("error", G);
|
|
26700
26700
|
}));
|
|
26701
26701
|
}
|
|
26702
26702
|
q = k.id, E = l[q], !hasProp(r, q) && E && !E.enabled && n.enable(k, this);
|
|
26703
26703
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
26704
|
-
var
|
|
26705
|
-
|
|
26704
|
+
var $ = getOwn(l, k.id);
|
|
26705
|
+
$ && !$.enabled && n.enable(k, this);
|
|
26706
26706
|
})), this.enabling = !1, this.check();
|
|
26707
26707
|
},
|
|
26708
|
-
on: function(k,
|
|
26708
|
+
on: function(k, $) {
|
|
26709
26709
|
var q = this.events[k];
|
|
26710
|
-
q || (q = this.events[k] = []), q.push(
|
|
26710
|
+
q || (q = this.events[k] = []), q.push($);
|
|
26711
26711
|
},
|
|
26712
|
-
emit: function(k,
|
|
26712
|
+
emit: function(k, $) {
|
|
26713
26713
|
each(this.events[k], function(q) {
|
|
26714
|
-
q(
|
|
26714
|
+
q($);
|
|
26715
26715
|
}), k === "error" && delete this.events[k];
|
|
26716
26716
|
}
|
|
26717
26717
|
};
|
|
26718
26718
|
function L(k) {
|
|
26719
26719
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
26720
26720
|
}
|
|
26721
|
-
function w(k,
|
|
26722
|
-
k.detachEvent && !isOpera ? E && k.detachEvent(E,
|
|
26721
|
+
function w(k, $, q, E) {
|
|
26722
|
+
k.detachEvent && !isOpera ? E && k.detachEvent(E, $) : k.removeEventListener(q, $, !1);
|
|
26723
26723
|
}
|
|
26724
26724
|
function O(k) {
|
|
26725
|
-
var
|
|
26726
|
-
return w(
|
|
26727
|
-
node:
|
|
26728
|
-
id:
|
|
26725
|
+
var $ = k.currentTarget || k.srcElement;
|
|
26726
|
+
return w($, n.onScriptLoad, "load", "onreadystatechange"), w($, n.onScriptError, "error"), {
|
|
26727
|
+
node: $,
|
|
26728
|
+
id: $ && $.getAttribute("data-requiremodule")
|
|
26729
26729
|
};
|
|
26730
26730
|
}
|
|
26731
26731
|
function j() {
|
|
@@ -26755,9 +26755,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26755
26755
|
*/
|
|
26756
26756
|
configure: function(k) {
|
|
26757
26757
|
if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
|
|
26758
|
-
var
|
|
26758
|
+
var $ = k.urlArgs;
|
|
26759
26759
|
k.urlArgs = function(V, G) {
|
|
26760
|
-
return (G.indexOf("?") === -1 ? "?" : "&") +
|
|
26760
|
+
return (G.indexOf("?") === -1 ? "?" : "&") + $;
|
|
26761
26761
|
};
|
|
26762
26762
|
}
|
|
26763
26763
|
var q = i.shim, E = {
|
|
@@ -26784,20 +26784,20 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26784
26784
|
}), (k.deps || k.callback) && n.require(k.deps || [], k.callback);
|
|
26785
26785
|
},
|
|
26786
26786
|
makeShimExports: function(k) {
|
|
26787
|
-
function
|
|
26787
|
+
function $() {
|
|
26788
26788
|
var q;
|
|
26789
26789
|
return k.init && (q = k.init.apply(global, arguments)), q || k.exports && getGlobal(k.exports);
|
|
26790
26790
|
}
|
|
26791
|
-
return
|
|
26791
|
+
return $;
|
|
26792
26792
|
},
|
|
26793
|
-
makeRequire: function(k,
|
|
26794
|
-
|
|
26793
|
+
makeRequire: function(k, $) {
|
|
26794
|
+
$ = $ || {};
|
|
26795
26795
|
function q(E, V, G) {
|
|
26796
26796
|
var U, H, Y;
|
|
26797
|
-
return
|
|
26798
|
-
j(), Y = I(F(null, k)), Y.skipMap =
|
|
26797
|
+
return $.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? R(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(n, E, k, q) : (H = F(E, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : R(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (j(), n.nextTick(function() {
|
|
26798
|
+
j(), Y = I(F(null, k)), Y.skipMap = $.skipMap, Y.init(E, V, G, {
|
|
26799
26799
|
enabled: !0
|
|
26800
|
-
}),
|
|
26800
|
+
}), M();
|
|
26801
26801
|
}), q);
|
|
26802
26802
|
}
|
|
26803
26803
|
return mixin(q, {
|
|
@@ -26836,8 +26836,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26836
26836
|
* the optimizer. Not shown here to keep code compact.
|
|
26837
26837
|
*/
|
|
26838
26838
|
enable: function(k) {
|
|
26839
|
-
var
|
|
26840
|
-
|
|
26839
|
+
var $ = getOwn(l, k.id);
|
|
26840
|
+
$ && I(k).enable();
|
|
26841
26841
|
},
|
|
26842
26842
|
/**
|
|
26843
26843
|
* Internal method used by environment adapters to complete a load event.
|
|
@@ -26846,17 +26846,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26846
26846
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
26847
26847
|
*/
|
|
26848
26848
|
completeLoad: function(k) {
|
|
26849
|
-
var
|
|
26849
|
+
var $, q, E, V = getOwn(i.shim, k) || {}, G = V.exports;
|
|
26850
26850
|
for (D(); d.length; ) {
|
|
26851
26851
|
if (q = d.shift(), q[0] === null) {
|
|
26852
|
-
if (q[0] = k,
|
|
26852
|
+
if (q[0] = k, $)
|
|
26853
26853
|
break;
|
|
26854
|
-
|
|
26854
|
+
$ = !0;
|
|
26855
26855
|
} else
|
|
26856
|
-
q[0] === k && (
|
|
26856
|
+
q[0] === k && ($ = !0);
|
|
26857
26857
|
L(q);
|
|
26858
26858
|
}
|
|
26859
|
-
if (n.defQueueMap = {}, E = getOwn(l, k),
|
|
26859
|
+
if (n.defQueueMap = {}, E = getOwn(l, k), !$ && !hasProp(p, k) && E && !E.inited) {
|
|
26860
26860
|
if (i.enforceDefine && (!G || !getGlobal(G)))
|
|
26861
26861
|
return y(k) ? void 0 : R(makeError(
|
|
26862
26862
|
"nodefine",
|
|
@@ -26866,7 +26866,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26866
26866
|
));
|
|
26867
26867
|
L([k, V.deps || [], V.exportsFn]);
|
|
26868
26868
|
}
|
|
26869
|
-
|
|
26869
|
+
M();
|
|
26870
26870
|
},
|
|
26871
26871
|
/**
|
|
26872
26872
|
* Converts a module name to a file path. Supports cases where
|
|
@@ -26875,26 +26875,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26875
26875
|
* it is assumed to have already been normalized. This is an
|
|
26876
26876
|
* internal API, not a public one. Use toUrl for the public API.
|
|
26877
26877
|
*/
|
|
26878
|
-
nameToUrl: function(k,
|
|
26878
|
+
nameToUrl: function(k, $, q) {
|
|
26879
26879
|
var E, V, G, U, H, Y, J, K = getOwn(i.pkgs, k);
|
|
26880
26880
|
if (K && (k = K), J = getOwn(h, k), J)
|
|
26881
|
-
return n.nameToUrl(J,
|
|
26881
|
+
return n.nameToUrl(J, $, q);
|
|
26882
26882
|
if (req.jsExtRegExp.test(k))
|
|
26883
|
-
H = k + (
|
|
26883
|
+
H = k + ($ || "");
|
|
26884
26884
|
else {
|
|
26885
26885
|
for (E = i.paths, V = k.split("/"), G = V.length; G > 0; G -= 1)
|
|
26886
26886
|
if (U = V.slice(0, G).join("/"), Y = getOwn(E, U), Y) {
|
|
26887
26887
|
isArray(Y) && (Y = Y[0]), V.splice(0, G, Y);
|
|
26888
26888
|
break;
|
|
26889
26889
|
}
|
|
26890
|
-
H = V.join("/"), H +=
|
|
26890
|
+
H = V.join("/"), H += $ || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
|
|
26891
26891
|
}
|
|
26892
26892
|
return i.urlArgs && !/^blob\:/.test(H) ? H + i.urlArgs(k, H) : H;
|
|
26893
26893
|
},
|
|
26894
26894
|
//Delegates to req.load. Broken out as a separate function to
|
|
26895
26895
|
//allow overriding in the optimizer.
|
|
26896
|
-
load: function(k,
|
|
26897
|
-
req.load(n, k,
|
|
26896
|
+
load: function(k, $) {
|
|
26897
|
+
req.load(n, k, $);
|
|
26898
26898
|
},
|
|
26899
26899
|
/**
|
|
26900
26900
|
* Executes a module callback function. Broken out as a separate function
|
|
@@ -26903,8 +26903,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26903
26903
|
*
|
|
26904
26904
|
* @private
|
|
26905
26905
|
*/
|
|
26906
|
-
execCb: function(k,
|
|
26907
|
-
return
|
|
26906
|
+
execCb: function(k, $, q, E) {
|
|
26907
|
+
return $.apply(E, q);
|
|
26908
26908
|
},
|
|
26909
26909
|
/**
|
|
26910
26910
|
* callback for script loads, used to check status of loading.
|
|
@@ -26915,23 +26915,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26915
26915
|
onScriptLoad: function(k) {
|
|
26916
26916
|
if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
|
|
26917
26917
|
interactiveScript = null;
|
|
26918
|
-
var
|
|
26919
|
-
n.completeLoad(
|
|
26918
|
+
var $ = O(k);
|
|
26919
|
+
n.completeLoad($.id);
|
|
26920
26920
|
}
|
|
26921
26921
|
},
|
|
26922
26922
|
/**
|
|
26923
26923
|
* Callback for script errors.
|
|
26924
26924
|
*/
|
|
26925
26925
|
onScriptError: function(k) {
|
|
26926
|
-
var
|
|
26927
|
-
if (!y(
|
|
26926
|
+
var $ = O(k);
|
|
26927
|
+
if (!y($.id)) {
|
|
26928
26928
|
var q = [];
|
|
26929
26929
|
return eachProp(l, function(E, V) {
|
|
26930
26930
|
V.indexOf("_@r") !== 0 && each(E.depMaps, function(G) {
|
|
26931
|
-
if (G.id ===
|
|
26931
|
+
if (G.id === $.id)
|
|
26932
26932
|
return q.push(V), !0;
|
|
26933
26933
|
});
|
|
26934
|
-
}), R(makeError("scripterror", 'Script error for "' +
|
|
26934
|
+
}), R(makeError("scripterror", 'Script error for "' + $.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [$.id]));
|
|
26935
26935
|
}
|
|
26936
26936
|
}
|
|
26937
26937
|
}, n.require = n.makeRequire(), n;
|
|
@@ -28569,18 +28569,18 @@ const Markdown = connect(
|
|
|
28569
28569
|
Markdown.Void = MarkdownVoid;
|
|
28570
28570
|
const BlockItemCardContext = createContext({}), BlockItemCard = React.forwardRef((n, o) => {
|
|
28571
28571
|
var r = n, { children: e } = r, t = W(r, ["children"]);
|
|
28572
|
-
const { token: a } = useToken(),
|
|
28573
|
-
|
|
28574
|
-
const
|
|
28572
|
+
const { token: a } = useToken(), S = t, { title: i, description: l } = S, c = W(S, ["title", "description"]), u = useMemo(() => ({ marginBottom: a.marginBlock, height: "100%" }), [a.marginBlock]), [d, p] = useState(0), m = useRef(null), { t: h } = useTranslation(), f = useFieldSchema()["x-block-linkage-rules"];
|
|
28573
|
+
useEffect(() => {
|
|
28574
|
+
const y = setTimeout(() => {
|
|
28575
28575
|
if (m.current) {
|
|
28576
|
-
const
|
|
28577
|
-
p(
|
|
28576
|
+
const v = l ? m.current.parentElement.parentElement.parentElement.offsetHeight : a.fontSizeLG * a.lineHeightLG + a.padding * 2 - 1;
|
|
28577
|
+
p(v);
|
|
28578
28578
|
} else
|
|
28579
28579
|
d && p(0);
|
|
28580
28580
|
}, 500);
|
|
28581
|
-
return () => clearTimeout(
|
|
28581
|
+
return () => clearTimeout(y);
|
|
28582
28582
|
}, [i, l]);
|
|
28583
|
-
const
|
|
28583
|
+
const C = (i || l) && /* @__PURE__ */ jsxs("div", { ref: m, style: { padding: "8px 0px 8px" }, children: [
|
|
28584
28584
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
28585
28585
|
" ",
|
|
28586
28586
|
h(i, { ns: NAMESPACE_UI_SCHEMA })
|
|
@@ -28598,8 +28598,8 @@ const BlockItemCardContext = createContext({}), BlockItemCard = React.forwardRef
|
|
|
28598
28598
|
}
|
|
28599
28599
|
}
|
|
28600
28600
|
)
|
|
28601
|
-
] });
|
|
28602
|
-
return
|
|
28601
|
+
] }), b = /* @__PURE__ */ jsx(BlockItemCardContext.Provider, { value: { titleHeight: d }, children: /* @__PURE__ */ jsx(Card, P(x({ ref: o, bordered: !1, style: u }, c), { title: C, children: e })) });
|
|
28602
|
+
return f ? /* @__PURE__ */ jsx(BlockLinkageRuleProvider, { children: b }) : b;
|
|
28603
28603
|
});
|
|
28604
28604
|
BlockItemCard.displayName = "BlockItemCard";
|
|
28605
28605
|
const useBlockHeightProps = () => {
|
|
@@ -28689,8 +28689,8 @@ function useCollectValuesToSubmit() {
|
|
|
28689
28689
|
}), S = {}, y = Object.keys(f).map((D) => z(this, null, function* () {
|
|
28690
28690
|
const B = f[D], N = a(D);
|
|
28691
28691
|
if (isVariable$1(B)) {
|
|
28692
|
-
const { value:
|
|
28693
|
-
|
|
28692
|
+
const { value: M } = (yield p == null ? void 0 : p.parseVariable(B, m)) || {};
|
|
28693
|
+
M != null && (S[D] = transformVariableValue(M, { targetCollectionField: N }));
|
|
28694
28694
|
} else
|
|
28695
28695
|
B !== "" && (S[D] = B);
|
|
28696
28696
|
}));
|
|
@@ -28727,7 +28727,7 @@ const useCreateActionProps = () => {
|
|
|
28727
28727
|
manualClose: D,
|
|
28728
28728
|
redirecting: B,
|
|
28729
28729
|
redirectTo: N,
|
|
28730
|
-
successMessage:
|
|
28730
|
+
successMessage: M,
|
|
28731
28731
|
actionAfterSuccess: L
|
|
28732
28732
|
} = I || {};
|
|
28733
28733
|
T || (yield o.submit());
|
|
@@ -28742,20 +28742,20 @@ const useCreateActionProps = () => {
|
|
|
28742
28742
|
triggerWorkflows: R != null && R.length ? R.map((q) => [q.workflowKey, q.context].filter(Boolean).join("!")).join(",") : void 0,
|
|
28743
28743
|
updateAssociationValues: g
|
|
28744
28744
|
});
|
|
28745
|
-
let
|
|
28746
|
-
if (N && (
|
|
28745
|
+
let $ = N;
|
|
28746
|
+
if (N && ($ = yield getVariableValue(N, {
|
|
28747
28747
|
variables: y,
|
|
28748
28748
|
localVariables: [...S, { name: "$record", ctx: new Proxy((j = k == null ? void 0 : k.data) == null ? void 0 : j.data, {}) }]
|
|
28749
|
-
})), (L === "previous" || !L && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k,
|
|
28750
|
-
message.success(h("Saved successfully")), yield resetFormCorrectly(o), (B && !L || L === "redirect") &&
|
|
28749
|
+
})), (L === "previous" || !L && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !M) {
|
|
28750
|
+
message.success(h("Saved successfully")), yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($));
|
|
28751
28751
|
return;
|
|
28752
28752
|
}
|
|
28753
28753
|
D ? m.success({
|
|
28754
|
-
title: p(
|
|
28754
|
+
title: p(M),
|
|
28755
28755
|
onOk: () => z(this, null, function* () {
|
|
28756
|
-
yield resetFormCorrectly(o), (B && !L || L === "redirect") &&
|
|
28756
|
+
yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($));
|
|
28757
28757
|
})
|
|
28758
|
-
}) : (message.success(p(
|
|
28758
|
+
}) : (message.success(p(M)), yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($)));
|
|
28759
28759
|
} catch (k) {
|
|
28760
28760
|
d.data.loading = !1;
|
|
28761
28761
|
}
|
|
@@ -28768,14 +28768,14 @@ const useCreateActionProps = () => {
|
|
|
28768
28768
|
return {
|
|
28769
28769
|
onClick() {
|
|
28770
28770
|
return z(this, null, function* () {
|
|
28771
|
-
var
|
|
28771
|
+
var $, q, E, V, G, U;
|
|
28772
28772
|
const T = u.map((H) => H.name), {
|
|
28773
28773
|
assignedValues: R = {},
|
|
28774
28774
|
onSuccess: D,
|
|
28775
28775
|
overwriteValues: B,
|
|
28776
28776
|
skipValidator: N,
|
|
28777
|
-
triggerWorkflows:
|
|
28778
|
-
} = (
|
|
28777
|
+
triggerWorkflows: M
|
|
28778
|
+
} = ($ = l == null ? void 0 : l["x-action-settings"]) != null ? $ : {}, L = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, O = {}, j = Object.keys(R).map((H) => z(this, null, function* () {
|
|
28779
28779
|
const Y = R[H], J = d(H);
|
|
28780
28780
|
if (isVariable$1(Y)) {
|
|
28781
28781
|
const { value: K } = (yield C == null ? void 0 : C.parseVariable(Y, b)) || {};
|
|
@@ -28803,7 +28803,7 @@ const useCreateActionProps = () => {
|
|
|
28803
28803
|
values: x(x(x({}, k), B), O),
|
|
28804
28804
|
filterKeys: v,
|
|
28805
28805
|
// TODO(refactor): should change to inject by plugin
|
|
28806
|
-
triggerWorkflows:
|
|
28806
|
+
triggerWorkflows: M != null && M.length ? M.map((Y) => [Y.workflowKey, Y.context].filter(Boolean).join("!")).join(",") : void 0
|
|
28807
28807
|
});
|
|
28808
28808
|
if (c.data.loading = !1, c.data.data = H, (U = (G = n == null ? void 0 : n.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), i == null || i(!0), !w)
|
|
28809
28809
|
return;
|
|
@@ -28926,25 +28926,25 @@ const useCreateActionProps = () => {
|
|
|
28926
28926
|
redirectTo: T,
|
|
28927
28927
|
successMessage: R,
|
|
28928
28928
|
actionAfterSuccess: D
|
|
28929
|
-
} = S || {}, B = {}, N = Object.keys(b).map((
|
|
28930
|
-
const q = b[
|
|
28929
|
+
} = S || {}, B = {}, N = Object.keys(b).map(($) => z(this, null, function* () {
|
|
28930
|
+
const q = b[$], E = m($);
|
|
28931
28931
|
if (isVariable$1(q)) {
|
|
28932
28932
|
const { value: V } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
|
|
28933
|
-
V && (B[
|
|
28933
|
+
V && (B[$] = transformVariableValue(V, { targetCollectionField: E }));
|
|
28934
28934
|
} else
|
|
28935
|
-
q !== "" && (B[
|
|
28935
|
+
q !== "" && (B[$] = q);
|
|
28936
28936
|
}));
|
|
28937
28937
|
yield Promise.all(N), y === !1 && (yield l.submit());
|
|
28938
|
-
const
|
|
28938
|
+
const M = yield e.update({
|
|
28939
28939
|
filterByTk: n,
|
|
28940
28940
|
values: x({}, B),
|
|
28941
28941
|
// TODO(refactor): should change to inject by plugin
|
|
28942
|
-
triggerWorkflows: v != null && v.length ? v.map((
|
|
28942
|
+
triggerWorkflows: v != null && v.length ? v.map(($) => [$.workflowKey, $.context].filter(Boolean).join("!")).join(",") : void 0
|
|
28943
28943
|
});
|
|
28944
28944
|
let L = T;
|
|
28945
28945
|
T && (L = yield getVariableValue(T, {
|
|
28946
28946
|
variables: u,
|
|
28947
|
-
localVariables: [...d, { name: "$record", ctx: new Proxy((O =
|
|
28947
|
+
localVariables: [...d, { name: "$record", ctx: new Proxy((O = M == null ? void 0 : M.data) == null ? void 0 : O.data, {}) }]
|
|
28948
28948
|
})), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (j = t == null ? void 0 : t.service) == null ? void 0 : j.refresh) == null || k.call(j), R && (F ? c.success({
|
|
28949
28949
|
title: i(R),
|
|
28950
28950
|
onOk: () => z(this, null, function* () {
|
|
@@ -28962,12 +28962,12 @@ const useCreateActionProps = () => {
|
|
|
28962
28962
|
return {
|
|
28963
28963
|
onClick() {
|
|
28964
28964
|
return z(this, null, function* () {
|
|
28965
|
-
var
|
|
28965
|
+
var $;
|
|
28966
28966
|
const {
|
|
28967
28967
|
assignedValues: R = {},
|
|
28968
28968
|
onSuccess: D,
|
|
28969
28969
|
updateMode: B
|
|
28970
|
-
} = (
|
|
28970
|
+
} = ($ = a == null ? void 0 : a["x-action-settings"]) != null ? $ : {}, { manualClose: N, redirecting: M, redirectTo: L, successMessage: w, actionAfterSuccess: O } = D || {};
|
|
28971
28971
|
m.data = e.data || {}, m.data.loading = !0;
|
|
28972
28972
|
const j = {}, k = Object.keys(R).map((E) => z(this, null, function* () {
|
|
28973
28973
|
const V = R[E], G = C(E);
|
|
@@ -28977,7 +28977,7 @@ const useCreateActionProps = () => {
|
|
|
28977
28977
|
} else
|
|
28978
28978
|
V !== "" && (j[E] = V);
|
|
28979
28979
|
}));
|
|
28980
|
-
yield Promise.all(k), (O === "previous" || !O &&
|
|
28980
|
+
yield Promise.all(k), (O === "previous" || !O && M !== !0) && (S == null || S(!1)), h.confirm({
|
|
28981
28981
|
title: p("Bulk update"),
|
|
28982
28982
|
content: p(B === "selected" ? "Update selected data?" : "Update all data?"),
|
|
28983
28983
|
onOk() {
|
|
@@ -29005,9 +29005,9 @@ const useCreateActionProps = () => {
|
|
|
29005
29005
|
t instanceof TableFieldResource || (Y = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || Y.call(H), w && (N ? h.success({
|
|
29006
29006
|
title: d(w),
|
|
29007
29007
|
onOk: () => z(this, null, function* () {
|
|
29008
|
-
(
|
|
29008
|
+
(M && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L));
|
|
29009
29009
|
})
|
|
29010
|
-
}) : (message.success(d(w)), (
|
|
29010
|
+
}) : (message.success(d(w)), (M && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L))));
|
|
29011
29011
|
});
|
|
29012
29012
|
},
|
|
29013
29013
|
onCancel() {
|
|
@@ -29026,7 +29026,7 @@ const useCreateActionProps = () => {
|
|
|
29026
29026
|
onClick() {
|
|
29027
29027
|
return z(this, null, function* () {
|
|
29028
29028
|
var E, V, G, U;
|
|
29029
|
-
const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage:
|
|
29029
|
+
const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: L } = T || {}, w = n == null ? void 0 : n["x-action"];
|
|
29030
29030
|
if (!R.url)
|
|
29031
29031
|
return;
|
|
29032
29032
|
I !== !0 && w === "customize:form:request" && (yield a.submit());
|
|
@@ -29052,12 +29052,12 @@ const useCreateActionProps = () => {
|
|
|
29052
29052
|
};
|
|
29053
29053
|
f.data = c.data || {}, f.data.loading = !0;
|
|
29054
29054
|
try {
|
|
29055
|
-
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (L === "previous" || !L && B !== !0) && (b == null || b(!1)),
|
|
29056
|
-
title: r(
|
|
29055
|
+
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (L === "previous" || !L && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
|
|
29056
|
+
title: r(M),
|
|
29057
29057
|
onOk: () => z(this, null, function* () {
|
|
29058
29058
|
(B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
|
|
29059
29059
|
})
|
|
29060
|
-
}) : message.success(r(
|
|
29060
|
+
}) : message.success(r(M));
|
|
29061
29061
|
} finally {
|
|
29062
29062
|
f.data.loading = !1;
|
|
29063
29063
|
}
|
|
@@ -29077,12 +29077,12 @@ const useCreateActionProps = () => {
|
|
|
29077
29077
|
skipValidator: B,
|
|
29078
29078
|
triggerWorkflows: N
|
|
29079
29079
|
} = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
|
|
29080
|
-
manualClose:
|
|
29080
|
+
manualClose: M,
|
|
29081
29081
|
redirecting: L,
|
|
29082
29082
|
redirectTo: w,
|
|
29083
29083
|
successMessage: O,
|
|
29084
29084
|
actionAfterSuccess: j
|
|
29085
|
-
} = R || {}, k = {},
|
|
29085
|
+
} = R || {}, k = {}, $ = Object.keys(T).map((U) => z(this, null, function* () {
|
|
29086
29086
|
const H = T[U], Y = d(U);
|
|
29087
29087
|
if (isVariable$1(H)) {
|
|
29088
29088
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(H, S)) || {};
|
|
@@ -29090,7 +29090,7 @@ const useCreateActionProps = () => {
|
|
|
29090
29090
|
} else
|
|
29091
29091
|
H !== "" && (k[U] = H);
|
|
29092
29092
|
}));
|
|
29093
|
-
yield Promise.all(
|
|
29093
|
+
yield Promise.all($), B || (yield e.submit());
|
|
29094
29094
|
const q = u.map((U) => U.name), E = getFormValues({
|
|
29095
29095
|
filterByTk: t,
|
|
29096
29096
|
field: o,
|
|
@@ -29117,7 +29117,7 @@ const useCreateActionProps = () => {
|
|
|
29117
29117
|
localVariables: [...S, { name: "$record", ctx: new Proxy((G = U == null ? void 0 : U.data) == null ? void 0 : G.data, {}) }]
|
|
29118
29118
|
})), (j === "previous" || !j && L !== !0) && (a == null || a(!1)), i == null || i(!1), !O)
|
|
29119
29119
|
return;
|
|
29120
|
-
|
|
29120
|
+
M ? f.success({
|
|
29121
29121
|
title: m(O),
|
|
29122
29122
|
onOk: () => z(this, null, function* () {
|
|
29123
29123
|
yield e.reset(), (L && !j || j === "redirect") && H && (isURL(H) ? window.location.href = H : c(H));
|
|
@@ -29313,7 +29313,7 @@ const useCreateActionProps = () => {
|
|
|
29313
29313
|
var o;
|
|
29314
29314
|
return ["select", "multipleSelect", "checkbox", "checkboxGroup", "chinaRegion"].includes(e == null ? void 0 : e.interface) && ((o = e == null ? void 0 : e.uiSchema) == null ? void 0 : o.enum);
|
|
29315
29315
|
}, useAssociationFilterBlockProps = () => {
|
|
29316
|
-
var v, F, I, T, R, D, B, N,
|
|
29316
|
+
var v, F, I, T, R, D, B, N, M, L;
|
|
29317
29317
|
const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), o = useOptionalFieldList(), { getDataBlocks: n } = useFilterBlock(), r = e == null ? void 0 : e.name, a = useField(), { props: i } = useBlockRequestContext(), l = useDataSourceHeaders(i == null ? void 0 : i.dataSource), c = useCollectionManager(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (F = (v = a.componentProps) == null ? void 0 : v.params) == null ? void 0 : F.filter });
|
|
29318
29318
|
let p, m, h, g, f, C, b, S;
|
|
29319
29319
|
C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.getPrimaryKey() : "id", b = ((R = (T = t["x-component-props"]) == null ? void 0 : T.fieldNames) == null ? void 0 : R.label) || C, { data: f, params: h, run: g } = useRequest(
|
|
@@ -29342,7 +29342,7 @@ const useCreateActionProps = () => {
|
|
|
29342
29342
|
g,
|
|
29343
29343
|
C,
|
|
29344
29344
|
(B = a.componentProps) == null ? void 0 : B.params,
|
|
29345
|
-
(
|
|
29345
|
+
(M = (N = a.componentProps) == null ? void 0 : N.params) == null ? void 0 : M.sort,
|
|
29346
29346
|
d
|
|
29347
29347
|
]);
|
|
29348
29348
|
const y = useCallback(
|
|
@@ -29387,12 +29387,12 @@ const useCreateActionProps = () => {
|
|
|
29387
29387
|
}, j = ((L = w == null ? void 0 : w.uiSchema) == null ? void 0 : L.enum) || [];
|
|
29388
29388
|
C = "value", b = "label", p = j, h = {}, g = () => {
|
|
29389
29389
|
}, S = `${w.name}.${O[w.interface]}`, m = (k) => {
|
|
29390
|
-
const
|
|
29391
|
-
if (
|
|
29390
|
+
const $ = k.target.value;
|
|
29391
|
+
if (!$) {
|
|
29392
29392
|
p = j;
|
|
29393
29393
|
return;
|
|
29394
29394
|
}
|
|
29395
|
-
p = j.filter((q) => q.label.includes(
|
|
29395
|
+
p = j.filter((q) => q.label.includes($));
|
|
29396
29396
|
};
|
|
29397
29397
|
} else
|
|
29398
29398
|
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -29683,35 +29683,35 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
29683
29683
|
const N = {
|
|
29684
29684
|
type: "duplicate",
|
|
29685
29685
|
tag: c((w = B.uiSchema) == null ? void 0 : w.title) || B.name
|
|
29686
|
-
},
|
|
29686
|
+
}, M = P(x({}, N), {
|
|
29687
29687
|
title: React.createElement(TreeNode, N),
|
|
29688
29688
|
key: v ? `${v}.${B.name}` : B.name,
|
|
29689
29689
|
isLeaf: !0,
|
|
29690
29690
|
field: B,
|
|
29691
29691
|
disabled: F
|
|
29692
|
-
}), L = I.find((O) => O.name ===
|
|
29692
|
+
}), L = I.find((O) => O.name === M.key);
|
|
29693
29693
|
if (["belongsTo", "belongsToMany"].includes(B.type) && (!L || ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode)))
|
|
29694
|
-
N.type = "reference",
|
|
29694
|
+
N.type = "reference", M.type = "reference", M.title = React.createElement(TreeNode, P(x({}, N), { type: "reference" })), M.isLeaf = !1, M.children = m(B.target, {
|
|
29695
29695
|
depth: S + 1,
|
|
29696
29696
|
maxDepth: y,
|
|
29697
|
-
prefix:
|
|
29697
|
+
prefix: M.key,
|
|
29698
29698
|
exclude: systemKeys
|
|
29699
29699
|
});
|
|
29700
29700
|
else if (["hasOne", "hasMany"].includes(B.type) || ["Nester", "SubTable"].includes(L == null ? void 0 : L.fieldMode)) {
|
|
29701
29701
|
let O = !1;
|
|
29702
|
-
["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode) && (O = !0),
|
|
29702
|
+
["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode) && (O = !0), M.disabled = !0, M.isLeaf = !1, M.children = p(
|
|
29703
29703
|
B.target,
|
|
29704
29704
|
{
|
|
29705
29705
|
depth: S + 1,
|
|
29706
29706
|
maxDepth: y,
|
|
29707
|
-
prefix:
|
|
29707
|
+
prefix: M.key,
|
|
29708
29708
|
exclude: ["id", ...systemKeys],
|
|
29709
29709
|
disabled: O
|
|
29710
29710
|
},
|
|
29711
29711
|
I
|
|
29712
29712
|
);
|
|
29713
29713
|
}
|
|
29714
|
-
return
|
|
29714
|
+
return M;
|
|
29715
29715
|
}).filter(Boolean);
|
|
29716
29716
|
return f.set(T, D), D;
|
|
29717
29717
|
})(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
|
|
@@ -29721,7 +29721,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
29721
29721
|
if (y > S)
|
|
29722
29722
|
return [];
|
|
29723
29723
|
const T = r(C).map((R) => {
|
|
29724
|
-
var N,
|
|
29724
|
+
var N, M;
|
|
29725
29725
|
if (!R.target || !R.interface || v.includes(R.name))
|
|
29726
29726
|
return;
|
|
29727
29727
|
const D = {
|
|
@@ -29730,7 +29730,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
29730
29730
|
}, B = b ? `${b}.${R.name}` : R.name;
|
|
29731
29731
|
return {
|
|
29732
29732
|
type: "preloading",
|
|
29733
|
-
tag: c((
|
|
29733
|
+
tag: c((M = R.uiSchema) == null ? void 0 : M.title) || R.name,
|
|
29734
29734
|
title: React.createElement(TreeNode, D),
|
|
29735
29735
|
key: B,
|
|
29736
29736
|
isLeaf: !1,
|
|
@@ -29761,11 +29761,11 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
29761
29761
|
var I;
|
|
29762
29762
|
(I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (T, R) => {
|
|
29763
29763
|
var O, j, k;
|
|
29764
|
-
const D = T || F, B = R["x-collection-field"] && n(R["x-collection-field"]), N = R.name.includes("."),
|
|
29765
|
-
if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((O = R["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), B && (
|
|
29764
|
+
const D = T || F, B = R["x-collection-field"] && n(R["x-collection-field"]), N = R.name.includes("."), M = B && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(B.type), L = !M && N ? getAssociationPath(R.name) : R.name, w = D === "" || !D ? L : D + "." + L;
|
|
29765
|
+
if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((O = R["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), B && (M || N) && R["x-component"] !== "TableField") {
|
|
29766
29766
|
if (f.add({ name: w, fieldMode: ((j = R["x-component-props"]) == null ? void 0 : j.mode) || "Select" }), ["Nester", "SubTable"].includes((k = R["x-component-props"]) == null ? void 0 : k.mode)) {
|
|
29767
|
-
const
|
|
29768
|
-
b(R,
|
|
29767
|
+
const $ = D && D !== "" ? D + "." + R.name : R.name;
|
|
29768
|
+
b(R, $);
|
|
29769
29769
|
}
|
|
29770
29770
|
} else
|
|
29771
29771
|
[
|
|
@@ -30988,7 +30988,7 @@ const useParseDefaultValue = () => {
|
|
|
30988
30988
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
30989
30989
|
value: B,
|
|
30990
30990
|
collectionName: N,
|
|
30991
|
-
dataSource:
|
|
30991
|
+
dataSource: M = "main"
|
|
30992
30992
|
} = yield o.parseVariable(t.default, n, {
|
|
30993
30993
|
fieldOperator: C(t.name)
|
|
30994
30994
|
});
|
|
@@ -30996,7 +30996,7 @@ const useParseDefaultValue = () => {
|
|
|
30996
30996
|
collectionName: D.target,
|
|
30997
30997
|
targetCollectionName: N,
|
|
30998
30998
|
dm: b,
|
|
30999
|
-
dataSource:
|
|
30999
|
+
dataSource: M
|
|
31000
31000
|
})) {
|
|
31001
31001
|
e.loading = !1;
|
|
31002
31002
|
return;
|
|
@@ -31012,8 +31012,8 @@ const useParseDefaultValue = () => {
|
|
|
31012
31012
|
const T = getVariableName(t.default), R = S(T);
|
|
31013
31013
|
return R ? (y(), reaction(
|
|
31014
31014
|
() => {
|
|
31015
|
-
const B = { [T]: (R == null ? void 0 : R.ctx) || {} }, N = getPath(t.default),
|
|
31016
|
-
return
|
|
31015
|
+
const B = { [T]: (R == null ? void 0 : R.ctx) || {} }, N = getPath(t.default), M = getValuesByPath(B, N);
|
|
31016
|
+
return M === void 0 ? Math.random() : M;
|
|
31017
31017
|
},
|
|
31018
31018
|
() => v({ forceUpdate: !0 }),
|
|
31019
31019
|
{
|
|
@@ -36962,8 +36962,8 @@ const enabledIndexColumn$1 = {
|
|
|
36962
36962
|
name: "fieldSettings:component:CascadeSelect",
|
|
36963
36963
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
36964
36964
|
}), SchemaSettingsDateRange = function e(t) {
|
|
36965
|
-
var T, R, D, B, N,
|
|
36966
|
-
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 = ((T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.showTime) || ((D = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.dateFormat) || ((
|
|
36965
|
+
var T, R, D, B, N, M, L, w, O, j, k, $, q, E, V, G;
|
|
36966
|
+
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 = ((T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.showTime) || ((D = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.dateFormat) || ((M = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : M.dateFormat) || "YYYY-MM-DD", m = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.picker) || (($ = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : $.picker) || "date";
|
|
36967
36967
|
o["x-read-pretty"] || n.readOnly || n.readPretty;
|
|
36968
36968
|
const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (E = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : E._maxDate, C = ((V = u == null ? void 0 : u.uiSchema) == null ? void 0 : V["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
36969
36969
|
(U) => /* @__PURE__ */ jsx(
|
|
@@ -38449,7 +38449,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38449
38449
|
let I = mergeCtxWithLocalVariables(o.current, b);
|
|
38450
38450
|
const { fieldPath: T, dataSource: R, variableOption: D } = getFieldPath$1(v, F);
|
|
38451
38451
|
let B = T;
|
|
38452
|
-
const { fieldPath: N } = getFieldPath$1(C, F),
|
|
38452
|
+
const { fieldPath: N } = getFieldPath$1(C, F), M = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(N, R)) == null ? void 0 : w.target;
|
|
38453
38453
|
if (!(v in I))
|
|
38454
38454
|
throw new Error(`VariablesProvider: ${v} is not found`);
|
|
38455
38455
|
for (let j = 0; j < y.length; j++) {
|
|
@@ -38457,9 +38457,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38457
38457
|
return {
|
|
38458
38458
|
value: I === void 0 ? D == null ? void 0 : D.defaultValue : I,
|
|
38459
38459
|
dataSource: R,
|
|
38460
|
-
collectionName:
|
|
38460
|
+
collectionName: M
|
|
38461
38461
|
};
|
|
38462
|
-
const k = y[j],
|
|
38462
|
+
const k = y[j], $ = y.slice(0, j + 1).join("."), { fieldPath: q } = getFieldPath$1($, F), E = r(q, R), V = (O = a(B, R)) == null ? void 0 : O.getPrimaryKey();
|
|
38463
38463
|
if (Array.isArray(I)) {
|
|
38464
38464
|
const G = I.map((U) => {
|
|
38465
38465
|
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
|
|
@@ -38505,7 +38505,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38505
38505
|
return {
|
|
38506
38506
|
value: L === void 0 ? D.defaultValue : L,
|
|
38507
38507
|
dataSource: R,
|
|
38508
|
-
collectionName:
|
|
38508
|
+
collectionName: M
|
|
38509
38509
|
};
|
|
38510
38510
|
}),
|
|
38511
38511
|
[r]
|
|
@@ -38802,8 +38802,8 @@ const NocoBaseField = (e) => {
|
|
|
38802
38802
|
!y.parent && p && (y.parent = p, !((B = (D = y.parent) == null ? void 0 : D.properties) != null && B[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
|
|
38803
38803
|
const v = useCallback(() => {
|
|
38804
38804
|
const N = y.parent;
|
|
38805
|
-
h.current = new Schema(y.toJSON(), N), N != null && N.properties && Object.keys(N.properties).forEach((
|
|
38806
|
-
|
|
38805
|
+
h.current = new Schema(y.toJSON(), N), N != null && N.properties && Object.keys(N.properties).forEach((M) => {
|
|
38806
|
+
M === y.name && (N.properties[M] = h.current);
|
|
38807
38807
|
}), b(), S == null || S();
|
|
38808
38808
|
}, [y, S, b]), F = useMemo(() => d ? createMergedSchemaInstance(y, d, n) : f ? (f.default = C, createMergedSchemaInstance(y, f, n)) : y, [f, C, y, n, d]), I = useFieldProps(F), T = (N) => {
|
|
38809
38809
|
if (!r)
|
|
@@ -38959,7 +38959,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
38959
38959
|
return ((K = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : K.filter((X) => !X.disabled)) || [];
|
|
38960
38960
|
},
|
|
38961
38961
|
[I == null ? void 0 : I["x-linkage-rules"]]
|
|
38962
|
-
), { designable: N } = useDesignable(),
|
|
38962
|
+
), { designable: N } = useDesignable(), M = useComponent(n) || n, L = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: $ } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
|
|
38963
38963
|
useEffect(() => {
|
|
38964
38964
|
F.stateOfLinkageRules && setInitialActionState(F);
|
|
38965
38965
|
const K = uid(), X = [];
|
|
@@ -39023,7 +39023,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39023
39023
|
icon: i,
|
|
39024
39024
|
loading: d,
|
|
39025
39025
|
handleMouseEnter: U,
|
|
39026
|
-
tarComponent:
|
|
39026
|
+
tarComponent: M,
|
|
39027
39027
|
className: a,
|
|
39028
39028
|
type: e.type,
|
|
39029
39029
|
Designer: v,
|
|
@@ -39040,7 +39040,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39040
39040
|
visibleWithURL: O,
|
|
39041
39041
|
setVisibleWithURL: j,
|
|
39042
39042
|
setSubmitted: k,
|
|
39043
|
-
getAriaLabel:
|
|
39043
|
+
getAriaLabel: $,
|
|
39044
39044
|
parentRecordData: q,
|
|
39045
39045
|
actionCallback: h
|
|
39046
39046
|
}, y)
|
|
@@ -39076,7 +39076,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39076
39076
|
setVisibleWithURL: D,
|
|
39077
39077
|
setSubmitted: B,
|
|
39078
39078
|
getAriaLabel: N,
|
|
39079
|
-
parentRecordData:
|
|
39079
|
+
parentRecordData: M
|
|
39080
39080
|
} = xe, L = W(xe, [
|
|
39081
39081
|
"containerRefKey",
|
|
39082
39082
|
"fieldSchema",
|
|
@@ -39105,7 +39105,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39105
39105
|
"setSubmitted",
|
|
39106
39106
|
"getAriaLabel",
|
|
39107
39107
|
"parentRecordData"
|
|
39108
|
-
]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId:
|
|
39108
|
+
]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId: $ } = useStyles$8(), [q, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], G = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, U = (pe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : pe.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), { run: X, element: Q, disabled: ee } = (I == null ? void 0 : I(T)) || {}, oe = J.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
|
|
39109
39109
|
var ce;
|
|
39110
39110
|
return P(x({}, v), {
|
|
39111
39111
|
opacity: r && (((ce = a == null ? void 0 : a.data) == null ? void 0 : ce.hidden) || !K) && 0.1,
|
|
@@ -39123,7 +39123,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39123
39123
|
tarComponent: u,
|
|
39124
39124
|
designerProps: V,
|
|
39125
39125
|
componentCls: k,
|
|
39126
|
-
hashId:
|
|
39126
|
+
hashId: $,
|
|
39127
39127
|
className: d,
|
|
39128
39128
|
others: L,
|
|
39129
39129
|
getAriaLabel: N,
|
|
@@ -39236,7 +39236,7 @@ const RenderButton = ({
|
|
|
39236
39236
|
confirmTitle: D,
|
|
39237
39237
|
title: B
|
|
39238
39238
|
}) => {
|
|
39239
|
-
const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t:
|
|
39239
|
+
const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: L } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), j = useLocalVariables$1(), k = useRef(null), $ = useCompile(), q = useForm();
|
|
39240
39240
|
k.current = w;
|
|
39241
39241
|
const E = {
|
|
39242
39242
|
variables: O,
|
|
@@ -39247,7 +39247,7 @@ const RenderButton = ({
|
|
|
39247
39247
|
if (U && isPortalInBody(G.target))
|
|
39248
39248
|
return;
|
|
39249
39249
|
G.preventDefault(), G.stopPropagation();
|
|
39250
|
-
const H = yield getVariableValue(
|
|
39250
|
+
const H = yield getVariableValue(M(I == null ? void 0 : I.title, { title: $(y.title) }), E), Y = yield getVariableValue(M(I == null ? void 0 : I.content, { title: $(y.title) }), E);
|
|
39251
39251
|
if (!a && o) {
|
|
39252
39252
|
const K = () => {
|
|
39253
39253
|
b ? b(G, () => {
|
|
@@ -39256,8 +39256,8 @@ const RenderButton = ({
|
|
|
39256
39256
|
}) : isBulkEditAction(y) || !L() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? k.current() : (v(!0), F == null || F());
|
|
39257
39257
|
};
|
|
39258
39258
|
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (J = q == null ? void 0 : q.submit) == null ? void 0 : J.call(q), T.confirm({
|
|
39259
|
-
title:
|
|
39260
|
-
content:
|
|
39259
|
+
title: M(H, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
39260
|
+
content: M(Y, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
39261
39261
|
onOk: K
|
|
39262
39262
|
})) : K();
|
|
39263
39263
|
}
|
|
@@ -39278,7 +39278,7 @@ const RenderButton = ({
|
|
|
39278
39278
|
F,
|
|
39279
39279
|
R,
|
|
39280
39280
|
v,
|
|
39281
|
-
|
|
39281
|
+
M,
|
|
39282
39282
|
B,
|
|
39283
39283
|
N
|
|
39284
39284
|
]
|
|
@@ -39355,8 +39355,8 @@ const RenderButtonInner = observer$1(
|
|
|
39355
39355
|
"onlyIcon"
|
|
39356
39356
|
]), { t: I } = useTranslation(), T = useCallback(
|
|
39357
39357
|
debounce$1(
|
|
39358
|
-
(
|
|
39359
|
-
d(
|
|
39358
|
+
($, q = !0) => {
|
|
39359
|
+
d($, q);
|
|
39360
39360
|
},
|
|
39361
39361
|
300,
|
|
39362
39362
|
{ leading: !0, trailing: !1 }
|
|
@@ -39367,10 +39367,10 @@ const RenderButtonInner = observer$1(
|
|
|
39367
39367
|
T.cancel();
|
|
39368
39368
|
}, []), !t && ((O = o == null ? void 0 : o.data) != null && O.hidden || !n))
|
|
39369
39369
|
return null;
|
|
39370
|
-
const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, j = l, { opacity: B } = j, N = W(j, ["opacity"]),
|
|
39370
|
+
const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, j = l, { opacity: B } = j, N = W(j, ["opacity"]), M = y && B ? { opacity: B } : void 0, L = React.forwardRef(
|
|
39371
39371
|
(H, U) => {
|
|
39372
|
-
var Y = H, { component:
|
|
39373
|
-
return /* @__PURE__ */ jsxs(
|
|
39372
|
+
var Y = H, { component: $ = p || Button, icon: q, onlyIcon: E, children: V } = Y, G = W(Y, ["component", "icon", "onlyIcon", "children"]);
|
|
39373
|
+
return /* @__PURE__ */ jsxs($, P(x({ ref: U }, G), { children: [
|
|
39374
39374
|
E ? /* @__PURE__ */ jsx(Tooltip, { title: G.title, children: /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }) }) : /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }),
|
|
39375
39375
|
E ? V[1] : V
|
|
39376
39376
|
] }));
|
|
@@ -39384,7 +39384,7 @@ const RenderButtonInner = observer$1(
|
|
|
39384
39384
|
}, F), {
|
|
39385
39385
|
onMouseEnter: c,
|
|
39386
39386
|
loading: ((k = o == null ? void 0 : o.data) == null ? void 0 : k.loading) || a,
|
|
39387
|
-
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style:
|
|
39387
|
+
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: M }) : r,
|
|
39388
39388
|
disabled: i,
|
|
39389
39389
|
style: y ? N : l,
|
|
39390
39390
|
onClick: T,
|
|
@@ -39394,7 +39394,7 @@ const RenderButtonInner = observer$1(
|
|
|
39394
39394
|
title: D,
|
|
39395
39395
|
onlyIcon: v,
|
|
39396
39396
|
children: [
|
|
39397
|
-
!v && D && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style:
|
|
39397
|
+
!v && D && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: M, children: D }),
|
|
39398
39398
|
/* @__PURE__ */ jsx(C, x({}, b))
|
|
39399
39399
|
]
|
|
39400
39400
|
})
|
|
@@ -39850,30 +39850,30 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39850
39850
|
"toOptionsItem",
|
|
39851
39851
|
"popupMatchSelectWidth",
|
|
39852
39852
|
"onSuccess"
|
|
39853
|
-
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = I(B) || R(B),
|
|
39853
|
+
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = I(B) || R(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && R(`${N.target}.${t.label}`), L = useMemo(() => {
|
|
39854
39854
|
var K;
|
|
39855
|
-
if (
|
|
39856
|
-
const X = D(
|
|
39857
|
-
return
|
|
39855
|
+
if (M != null && M.interface) {
|
|
39856
|
+
const X = D(M.interface), Q = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
39857
|
+
return M.type === "string" ? "$includes" : Q;
|
|
39858
39858
|
}
|
|
39859
39859
|
return "$includes";
|
|
39860
|
-
}, [
|
|
39860
|
+
}, [M]), w = useCompile(), O = useCallback(
|
|
39861
39861
|
(K) => {
|
|
39862
39862
|
try {
|
|
39863
39863
|
return K.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
|
|
39864
39864
|
var ee;
|
|
39865
39865
|
let Q = w(X[t.label]);
|
|
39866
|
-
if ((ee =
|
|
39866
|
+
if ((ee = M == null ? void 0 : M.uiSchema) != null && ee.enum)
|
|
39867
39867
|
if (Array.isArray(Q))
|
|
39868
39868
|
Q = Q.map((oe, te) => {
|
|
39869
|
-
const se =
|
|
39869
|
+
const se = M.uiSchema.enum.find((ie) => ie.value === oe);
|
|
39870
39870
|
return se ? /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, style: { marginRight: 3 }, children: (se == null ? void 0 : se.label) || oe }, te) : /* @__PURE__ */ jsx(Tag, { role: "button", children: oe }, oe);
|
|
39871
39871
|
}).reverse();
|
|
39872
39872
|
else {
|
|
39873
|
-
const oe =
|
|
39873
|
+
const oe = M.uiSchema.enum.find((te) => te.value === Q);
|
|
39874
39874
|
oe && (Q = /* @__PURE__ */ jsx(Tag, { role: "button", color: oe.color, children: oe.label }));
|
|
39875
39875
|
}
|
|
39876
|
-
return (
|
|
39876
|
+
return (M == null ? void 0 : M.type) === "date" && (Q = dayjs(Q).format("YYYY-MM-DD")), c ? c({
|
|
39877
39877
|
[t.label]: Q || EMPTY$1,
|
|
39878
39878
|
[t.value]: X[t.value]
|
|
39879
39879
|
}) : P(x({}, omit(X, "style")), {
|
|
@@ -39885,8 +39885,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39885
39885
|
return console.error(X), K;
|
|
39886
39886
|
}
|
|
39887
39887
|
},
|
|
39888
|
-
[
|
|
39889
|
-
), { data: j, run: k, loading:
|
|
39888
|
+
[M == null ? void 0 : M.uiSchema, t]
|
|
39889
|
+
), { data: j, run: k, loading: $ } = useRequest(
|
|
39890
39890
|
P(x({
|
|
39891
39891
|
action: "list"
|
|
39892
39892
|
}, o), {
|
|
@@ -39956,7 +39956,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39956
39956
|
value: r,
|
|
39957
39957
|
defaultValue: a
|
|
39958
39958
|
}, C), {
|
|
39959
|
-
loading: j ?
|
|
39959
|
+
loading: j ? $ : !0,
|
|
39960
39960
|
options: h(O(G)),
|
|
39961
39961
|
rawOptions: G,
|
|
39962
39962
|
dropdownRender: (K) => {
|
|
@@ -40035,9 +40035,9 @@ const useFormDataTemplates = () => {
|
|
|
40035
40035
|
d(I), m(null), t == null || t.reset();
|
|
40036
40036
|
}), []), v = useCallback((I, T, R) => z(void 0, null, function* () {
|
|
40037
40037
|
const D = P(x({}, T), { dataId: I });
|
|
40038
|
-
m(T), fetchTemplateData(h, D, R).then((B) => (t && B && (t.reset(), t.__template = !0, forEach(B, (N,
|
|
40038
|
+
m(T), fetchTemplateData(h, D, R).then((B) => (t && B && (t.reset(), t.__template = !0, forEach(B, (N, M) => {
|
|
40039
40039
|
var L;
|
|
40040
|
-
N && (t.values[
|
|
40040
|
+
N && (t.values[M] = N, (L = t == null ? void 0 : t.setInitialValuesIn) == null || L.call(t, M, N));
|
|
40041
40041
|
})), B)).catch((B) => {
|
|
40042
40042
|
console.error(B);
|
|
40043
40043
|
});
|
|
@@ -40962,10 +40962,10 @@ const insertPositionToMethod = {
|
|
|
40962
40962
|
[(D = c == null ? void 0 : c["x-component-props"]) == null ? void 0 : D.onSelect]
|
|
40963
40963
|
), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
|
|
40964
40964
|
(N) => {
|
|
40965
|
-
onFieldChange("target", (
|
|
40965
|
+
onFieldChange("target", (M) => {
|
|
40966
40966
|
var w, O;
|
|
40967
|
-
const [, L] = ((O = (w =
|
|
40968
|
-
|
|
40967
|
+
const [, L] = ((O = (w = M == null ? void 0 : M.value) == null ? void 0 : w.split) == null ? void 0 : O.call(w, "||")) || [];
|
|
40968
|
+
M.query("position").take((j) => {
|
|
40969
40969
|
j.dataSource = L === "Menu.SubMenu" ? [
|
|
40970
40970
|
{ label: l("Before"), value: "beforeBegin" },
|
|
40971
40971
|
{ label: l("After"), value: "afterEnd" },
|
|
@@ -41013,7 +41013,7 @@ const insertPositionToMethod = {
|
|
|
41013
41013
|
}), [o.componentProps.tooltip]);
|
|
41014
41014
|
n["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = o.componentProps.href, C.params = o.componentProps.params);
|
|
41015
41015
|
const y = useCallback(
|
|
41016
|
-
({ title: N, icon:
|
|
41016
|
+
({ title: N, icon: M, href: L, params: w }) => {
|
|
41017
41017
|
var j;
|
|
41018
41018
|
const O = {
|
|
41019
41019
|
"x-uid": n["x-uid"],
|
|
@@ -41024,11 +41024,11 @@ const insertPositionToMethod = {
|
|
|
41024
41024
|
}
|
|
41025
41025
|
]
|
|
41026
41026
|
};
|
|
41027
|
-
N && (n.title = N, o.title = N, O.title = N, i()), o.componentProps.icon =
|
|
41027
|
+
N && (n.title = N, o.title = N, O.title = N, i()), o.componentProps.icon = M, o.componentProps.href = L, o.componentProps.params = w, O["x-component-props"] = { icon: M, href: L, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = M, n["x-component-props"].href = L, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
|
|
41028
41028
|
schema: O
|
|
41029
41029
|
}), (j = n.__route__) != null && j.id && e(n.__route__.id, {
|
|
41030
41030
|
title: N,
|
|
41031
|
-
icon:
|
|
41031
|
+
icon: M,
|
|
41032
41032
|
options: L || w ? {
|
|
41033
41033
|
href: L,
|
|
41034
41034
|
params: w
|
|
@@ -41038,8 +41038,8 @@ const insertPositionToMethod = {
|
|
|
41038
41038
|
[n, o, a, i, m]
|
|
41039
41039
|
), v = useCallback(
|
|
41040
41040
|
({ tooltip: N }) => {
|
|
41041
|
-
var
|
|
41042
|
-
(
|
|
41041
|
+
var M;
|
|
41042
|
+
(M = n.__route__) != null && M.id && e(n.__route__.id, {
|
|
41043
41043
|
tooltip: N
|
|
41044
41044
|
});
|
|
41045
41045
|
},
|
|
@@ -41069,7 +41069,7 @@ const insertPositionToMethod = {
|
|
|
41069
41069
|
}
|
|
41070
41070
|
}
|
|
41071
41071
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), T = useCallback(
|
|
41072
|
-
(L) => z(void 0, [L], function* ({ target: N, position:
|
|
41072
|
+
(L) => z(void 0, [L], function* ({ target: N, position: M }) {
|
|
41073
41073
|
var q;
|
|
41074
41074
|
const [w] = ((q = N == null ? void 0 : N.split) == null ? void 0 : q.call(N, "||")) || [];
|
|
41075
41075
|
if (!w)
|
|
@@ -41082,7 +41082,7 @@ const insertPositionToMethod = {
|
|
|
41082
41082
|
}), k = {
|
|
41083
41083
|
beforeBegin: "insertBefore",
|
|
41084
41084
|
afterEnd: "insertAfter"
|
|
41085
|
-
},
|
|
41085
|
+
}, $ = M === "beforeEnd" ? {
|
|
41086
41086
|
targetScope: {
|
|
41087
41087
|
parentId: O.__route__.id
|
|
41088
41088
|
}
|
|
@@ -41092,8 +41092,8 @@ const insertPositionToMethod = {
|
|
|
41092
41092
|
yield I(x({
|
|
41093
41093
|
sourceId: n.__route__.id,
|
|
41094
41094
|
sortField: "sort",
|
|
41095
|
-
method: k[
|
|
41096
|
-
},
|
|
41095
|
+
method: k[M]
|
|
41096
|
+
}, $)), j.loadAPIClientEvents(), j.insertAdjacent(M, n);
|
|
41097
41097
|
}),
|
|
41098
41098
|
[c, l, r, i, I, n]
|
|
41099
41099
|
), R = useMemo(() => ({
|
|
@@ -41547,14 +41547,14 @@ const useMenuDragEnd = () => {
|
|
|
41547
41547
|
theme: m
|
|
41548
41548
|
} = useProps(e), { t: h } = useTranslation(), g = useDesigner(), f = useFieldSchema(), C = useAPIClient(), { render: b } = useSchemaInitializerRender(f["x-initializer"], f["x-initializer-props"]), S = useSideMenuRef(), [y, v] = useState(), [F, I] = useState(() => a || (r ? findKeysByUid(f, r) : [])), [T, R] = useState(() => ["inline", "mix"].includes(o) ? i || F : i), D = useMemo(() => {
|
|
41549
41549
|
var L;
|
|
41550
|
-
let
|
|
41550
|
+
let M;
|
|
41551
41551
|
if (n) {
|
|
41552
41552
|
const w = findKeysByUid(f, n);
|
|
41553
|
-
|
|
41553
|
+
M = (w == null ? void 0 : w[0]) || null;
|
|
41554
41554
|
} else
|
|
41555
|
-
|
|
41556
|
-
if (o === "mix" &&
|
|
41557
|
-
const w = (L = f.properties) == null ? void 0 : L[
|
|
41555
|
+
M = (F == null ? void 0 : F[0]) || null;
|
|
41556
|
+
if (o === "mix" && M) {
|
|
41557
|
+
const w = (L = f.properties) == null ? void 0 : L[M];
|
|
41558
41558
|
if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
|
|
41559
41559
|
return w;
|
|
41560
41560
|
}
|
|
@@ -41565,8 +41565,8 @@ const useMenuDragEnd = () => {
|
|
|
41565
41565
|
v(void 0);
|
|
41566
41566
|
return;
|
|
41567
41567
|
}
|
|
41568
|
-
const
|
|
41569
|
-
v(
|
|
41568
|
+
const M = findKeysByUid(f, n);
|
|
41569
|
+
v(M), ["inline", "mix"].includes(o) && R(i || M);
|
|
41570
41570
|
}, [n]), useEffect(() => {
|
|
41571
41571
|
["inline", "mix"].includes(o) && R(F);
|
|
41572
41572
|
}, [F]);
|
|
@@ -42406,41 +42406,41 @@ const AppendsTreeSelect = (e) => {
|
|
|
42406
42406
|
"filter",
|
|
42407
42407
|
"rootOption",
|
|
42408
42408
|
"loadData"
|
|
42409
|
-
]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = a({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (
|
|
42410
|
-
const w = S.getCollection(
|
|
42409
|
+
]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = a({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (M, L) => {
|
|
42410
|
+
const w = S.getCollection(M);
|
|
42411
42411
|
return w ? w.getAllFields(L) : [];
|
|
42412
|
-
}, v = Object.values(m), F = useMemo(() => e.multiple ? (o || []).map((
|
|
42413
|
-
(
|
|
42412
|
+
}, v = Object.values(m), F = useMemo(() => e.multiple ? (o || []).map((M) => m[M]).filter(Boolean) : o, [o, e.multiple, m]), I = useCallback(
|
|
42413
|
+
(M) => z(void 0, null, function* () {
|
|
42414
42414
|
if (c != null)
|
|
42415
|
-
return c(
|
|
42416
|
-
if (
|
|
42417
|
-
const L =
|
|
42415
|
+
return c(M);
|
|
42416
|
+
if (!M.isLeaf && M.loadChildren) {
|
|
42417
|
+
const L = M.loadChildren(M);
|
|
42418
42418
|
h((w) => L.reduce((O, j) => Object.assign(O, { [j.value]: j }), x({}, w)));
|
|
42419
42419
|
}
|
|
42420
42420
|
}),
|
|
42421
42421
|
[c]
|
|
42422
42422
|
);
|
|
42423
42423
|
useEffect(() => {
|
|
42424
|
-
const
|
|
42424
|
+
const M = l ? P(x({}, l), {
|
|
42425
42425
|
id: l.value,
|
|
42426
42426
|
key: l.value,
|
|
42427
42427
|
title: l.label,
|
|
42428
42428
|
fullTitle: l.label,
|
|
42429
42429
|
isLeaf: !1
|
|
42430
|
-
}) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C,
|
|
42431
|
-
|
|
42430
|
+
}) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C, M)).reduce((O, j) => Object.assign(O, { [j.value]: j }), {});
|
|
42431
|
+
M && (w[M.value] = M), h(w);
|
|
42432
42432
|
}, [g, l, i, c]), useEffect(() => {
|
|
42433
|
-
const
|
|
42434
|
-
if (!(
|
|
42433
|
+
const M = e.multiple ? o : o ? [o] : [];
|
|
42434
|
+
if (!(M != null && M.length) || M.every((w) => !!m[w]))
|
|
42435
42435
|
return;
|
|
42436
42436
|
const L = [];
|
|
42437
|
-
|
|
42437
|
+
M.forEach((w) => {
|
|
42438
42438
|
const O = w.split(".");
|
|
42439
42439
|
let j = m[O[0]];
|
|
42440
42440
|
for (let k = 1; k < O.length && j; k++) {
|
|
42441
|
-
const
|
|
42442
|
-
if (m[
|
|
42443
|
-
j = m[
|
|
42441
|
+
const $ = O.slice(0, k + 1).join(".");
|
|
42442
|
+
if (m[$]) {
|
|
42443
|
+
j = m[$];
|
|
42444
42444
|
break;
|
|
42445
42445
|
}
|
|
42446
42446
|
if (!j.isLeaf && j.loadChildren) {
|
|
@@ -42451,12 +42451,12 @@ const AppendsTreeSelect = (e) => {
|
|
|
42451
42451
|
}), h((w) => L.reduce((O, j) => Object.assign(O, { [j.value]: j }), x({}, w)));
|
|
42452
42452
|
}, [o, v.length, e.multiple]);
|
|
42453
42453
|
const T = useCallback(
|
|
42454
|
-
(
|
|
42454
|
+
(M) => {
|
|
42455
42455
|
if (!e.multiple) {
|
|
42456
|
-
n(
|
|
42456
|
+
n(M);
|
|
42457
42457
|
return;
|
|
42458
42458
|
}
|
|
42459
|
-
const L =
|
|
42459
|
+
const L = M.map((j) => j.value).filter(Boolean), w = new Set(L), O = F.find((j) => !w.has(j.value));
|
|
42460
42460
|
if (O) {
|
|
42461
42461
|
const j = `${O.value}.`;
|
|
42462
42462
|
Object.keys(m).forEach((k) => {
|
|
@@ -42466,23 +42466,23 @@ const AppendsTreeSelect = (e) => {
|
|
|
42466
42466
|
L.forEach((j) => {
|
|
42467
42467
|
const k = j.split(".");
|
|
42468
42468
|
if (k.length)
|
|
42469
|
-
for (let
|
|
42470
|
-
w.add(k.slice(0,
|
|
42469
|
+
for (let $ = 1; $ <= k.length; $++)
|
|
42470
|
+
w.add(k.slice(0, $).join("."));
|
|
42471
42471
|
});
|
|
42472
42472
|
n(Array.from(w));
|
|
42473
42473
|
},
|
|
42474
42474
|
[e.multiple, F, n, m]
|
|
42475
42475
|
), R = useCallback(
|
|
42476
|
-
(
|
|
42477
|
-
var
|
|
42478
|
-
const { value: L, onClose: w, disabled: O, closable: j } =
|
|
42476
|
+
(M) => {
|
|
42477
|
+
var $;
|
|
42478
|
+
const { value: L, onClose: w, disabled: O, closable: j } = M;
|
|
42479
42479
|
if (!L)
|
|
42480
42480
|
return null;
|
|
42481
|
-
const { fullTitle: k } = (
|
|
42481
|
+
const { fullTitle: k } = ($ = m[L]) != null ? $ : {};
|
|
42482
42482
|
return /* @__PURE__ */ jsx(Tag, { closable: j && !O, onClose: w, children: k == null ? void 0 : k.join(" / ") });
|
|
42483
42483
|
},
|
|
42484
42484
|
[m]
|
|
42485
|
-
), D = Array.isArray(F) ? F.filter((
|
|
42485
|
+
), D = Array.isArray(F) ? F.filter((M) => M.value in m) : F, B = e.multiple ? o : o != null ? [o] : [];
|
|
42486
42486
|
return /* @__PURE__ */ jsx(
|
|
42487
42487
|
TreeSelect$2,
|
|
42488
42488
|
P(x({
|
|
@@ -42531,15 +42531,15 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
42531
42531
|
var B;
|
|
42532
42532
|
const D = e, { objectValue: t = !0, addMode: o } = D, n = W(D, ["objectValue", "addMode"]), r = useField(), a = useFieldSchema(), i = useServiceOptions$1((a == null ? void 0 : a["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (B = a["x-component-props"]) == null ? void 0 : B.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), F = v(l.target), { filterTargetKey: I } = F;
|
|
42533
42533
|
useEffect(() => {
|
|
42534
|
-
const N = isVariable$1(r.value) ? void 0 : r.value,
|
|
42534
|
+
const N = isVariable$1(r.value) ? void 0 : r.value, M = Array.isArray(N) ? N.filter(Boolean) : N, L = removeIfKeyEmpty(M, I);
|
|
42535
42535
|
p(L), isEqual(r.value, L) || (r.value = L);
|
|
42536
42536
|
}, [r.value, I]), useEffect(() => {
|
|
42537
42537
|
const N = uid();
|
|
42538
42538
|
return f.addEffects(N, () => {
|
|
42539
|
-
onFieldInputValueChange("*", (
|
|
42540
|
-
var j, k,
|
|
42541
|
-
const L = filterAnalyses((
|
|
42542
|
-
L.includes((q =
|
|
42539
|
+
onFieldInputValueChange("*", (M) => {
|
|
42540
|
+
var j, k, $, q, E, V;
|
|
42541
|
+
const L = filterAnalyses(($ = (k = (j = r.componentProps) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : $.filter) || [], w = getFieldPath(M.address.entire), O = getFieldPath(r.address.entire);
|
|
42542
|
+
L.includes((q = M == null ? void 0 : M.props) == null ? void 0 : q.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((E = M == null ? void 0 : M.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, O)) && (r.setValue(null), p(null));
|
|
42543
42543
|
});
|
|
42544
42544
|
}), () => {
|
|
42545
42545
|
f.removeEffects(N);
|
|
@@ -42547,11 +42547,11 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
42547
42547
|
}, []);
|
|
42548
42548
|
const T = (N) => z(void 0, null, function* () {
|
|
42549
42549
|
var O, j;
|
|
42550
|
-
const { search:
|
|
42550
|
+
const { search: M, callBack: L } = N, {
|
|
42551
42551
|
data: { data: w }
|
|
42552
42552
|
} = yield b.create({
|
|
42553
42553
|
values: {
|
|
42554
|
-
[((j = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : j.label) || "id"]:
|
|
42554
|
+
[((j = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : j.label) || "id"]: M
|
|
42555
42555
|
}
|
|
42556
42556
|
});
|
|
42557
42557
|
if (w) {
|
|
@@ -42585,8 +42585,8 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
42585
42585
|
service: i,
|
|
42586
42586
|
onChange: (N) => {
|
|
42587
42587
|
var L;
|
|
42588
|
-
const
|
|
42589
|
-
(L = e.onChange) == null || L.call(e,
|
|
42588
|
+
const M = Array.isArray(N) && N.length === 0 ? null : N;
|
|
42589
|
+
(L = e.onChange) == null || L.call(e, M);
|
|
42590
42590
|
},
|
|
42591
42591
|
CustomDropdownRender: m === "quickAdd" && R
|
|
42592
42592
|
})
|
|
@@ -43183,7 +43183,7 @@ function Uploader(o) {
|
|
|
43183
43183
|
}, [f, p, h]);
|
|
43184
43184
|
const S = useCallback(
|
|
43185
43185
|
(B) => {
|
|
43186
|
-
var
|
|
43186
|
+
var M;
|
|
43187
43187
|
const N = B.fileList.filter((L) => L.status !== "done").map(normalizeFile);
|
|
43188
43188
|
if (m(N), a) {
|
|
43189
43189
|
const L = B.fileList.filter((w) => w.status === "done");
|
|
@@ -43196,19 +43196,19 @@ function Uploader(o) {
|
|
|
43196
43196
|
}
|
|
43197
43197
|
} else {
|
|
43198
43198
|
const L = B.fileList.find((w) => w.uid === B.file.uid);
|
|
43199
|
-
L.status === "done" && (l == null || l(c((
|
|
43199
|
+
L.status === "done" && (l == null || l(c((M = L.response) == null ? void 0 : M.data)), m([]));
|
|
43200
43200
|
}
|
|
43201
43201
|
},
|
|
43202
43202
|
[a, i, u, c, l]
|
|
43203
43203
|
), y = useCallback((B) => {
|
|
43204
43204
|
m((N) => {
|
|
43205
|
-
const
|
|
43206
|
-
return N.splice(
|
|
43205
|
+
const M = N.indexOf(B);
|
|
43206
|
+
return N.splice(M, 1), [...N];
|
|
43207
43207
|
});
|
|
43208
43208
|
}, []), v = useCallback((B) => {
|
|
43209
43209
|
d((N) => {
|
|
43210
|
-
const
|
|
43211
|
-
return N.splice(
|
|
43210
|
+
const M = N.indexOf(B);
|
|
43211
|
+
return N.splice(M, 1), [...N];
|
|
43212
43212
|
});
|
|
43213
43213
|
}, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: T } = e != null ? e : {}, R = useSizeHint(T), D = !r && (a || (!i || Array.isArray(i) && !i.length) && !p.length);
|
|
43214
43214
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -43529,9 +43529,9 @@ const InternalFileManager = (e) => {
|
|
|
43529
43529
|
};
|
|
43530
43530
|
useEffect(() => {
|
|
43531
43531
|
if (t && Object.keys(t).length > 0) {
|
|
43532
|
-
const N = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
43533
|
-
const L =
|
|
43534
|
-
return P(x({},
|
|
43532
|
+
const N = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
|
|
43533
|
+
const L = M[p.label];
|
|
43534
|
+
return P(x({}, M), {
|
|
43535
43535
|
[p.label]: getLabelFormatValue$1(y(S), y(L))
|
|
43536
43536
|
});
|
|
43537
43537
|
});
|
|
@@ -43552,10 +43552,10 @@ const InternalFileManager = (e) => {
|
|
|
43552
43552
|
setSelectedRows: u,
|
|
43553
43553
|
collectionField: b
|
|
43554
43554
|
}, T = () => {
|
|
43555
|
-
const { setVisible: N } = useActionContext(), { multiple:
|
|
43555
|
+
const { setVisible: N } = useActionContext(), { multiple: M, selectedRows: L, onChange: w, options: O, collectionField: j } = useContext(RecordPickerContext);
|
|
43556
43556
|
return {
|
|
43557
43557
|
onClick() {
|
|
43558
|
-
w(
|
|
43558
|
+
w(M ? unionBy(L, O, (j == null ? void 0 : j.targetKey) || "id") : (L == null ? void 0 : L[0]) || null), N(!1);
|
|
43559
43559
|
}
|
|
43560
43560
|
};
|
|
43561
43561
|
};
|
|
@@ -43607,10 +43607,10 @@ const InternalFileManager = (e) => {
|
|
|
43607
43607
|
FormItem: FormItem$1
|
|
43608
43608
|
}
|
|
43609
43609
|
}), CascadeSelect = connect((e) => {
|
|
43610
|
-
var
|
|
43610
|
+
var M;
|
|
43611
43611
|
const { data: t, mapOptions: o, onChange: n, value: r } = e, [a, i] = useState([
|
|
43612
43612
|
{ key: void 0, children: [], value: null }
|
|
43613
|
-
]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = (
|
|
43613
|
+
]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = (M = f == null ? void 0 : f.componentProps) == null ? void 0 : M.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
|
|
43614
43614
|
var L, w;
|
|
43615
43615
|
return v != null && v.interface && ((w = (L = S(v.interface)) == null ? void 0 : L.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
|
|
43616
43616
|
}, [v]), I = useField();
|
|
@@ -43629,7 +43629,7 @@ const InternalFileManager = (e) => {
|
|
|
43629
43629
|
(L) => {
|
|
43630
43630
|
try {
|
|
43631
43631
|
return L == null ? void 0 : L.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
|
|
43632
|
-
var j, k,
|
|
43632
|
+
var j, k, $;
|
|
43633
43633
|
let O = p(w[y.label]);
|
|
43634
43634
|
if ((j = v == null ? void 0 : v.uiSchema) != null && j.enum)
|
|
43635
43635
|
if (Array.isArray(O))
|
|
@@ -43639,7 +43639,7 @@ const InternalFileManager = (e) => {
|
|
|
43639
43639
|
return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || q }, E) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
|
|
43640
43640
|
}).reverse();
|
|
43641
43641
|
else {
|
|
43642
|
-
const q = (
|
|
43642
|
+
const q = ($ = (k = v.uiSchema.enum).find) == null ? void 0 : $.call(k, (E) => E.value === O);
|
|
43643
43643
|
q && (O = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
|
|
43644
43644
|
}
|
|
43645
43645
|
return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), o ? o({
|
|
@@ -43667,19 +43667,19 @@ const InternalFileManager = (e) => {
|
|
|
43667
43667
|
}), D = (L, w, O) => z(void 0, null, function* () {
|
|
43668
43668
|
const j = yield R({ parentId: w == null ? void 0 : w.id }), k = [...a];
|
|
43669
43669
|
if (k.splice(O + 1), k[O] = P(x({}, k[O]), { value: w }), w != null && w.id && (k[O + 1] = { key: w == null ? void 0 : w.id, children: (j == null ? void 0 : j.length) > 0 ? j : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
43670
|
-
const
|
|
43671
|
-
|
|
43670
|
+
const $ = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
43671
|
+
$[I.index] = w, f.fieldValue = $;
|
|
43672
43672
|
} else
|
|
43673
43673
|
f.value = w;
|
|
43674
43674
|
k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
|
|
43675
43675
|
}), B = (L, w, O) => z(void 0, null, function* () {
|
|
43676
|
-
var j, k,
|
|
43676
|
+
var j, k, $;
|
|
43677
43677
|
if (L) {
|
|
43678
43678
|
d(!0);
|
|
43679
43679
|
const q = yield R({ parentId: w == null ? void 0 : w.key });
|
|
43680
43680
|
if (d(!1), c(q), O === (a == null ? void 0 : a.length) - 1 && ((j = w == null ? void 0 : w.value) != null && j.id)) {
|
|
43681
43681
|
const E = yield R({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
|
|
43682
|
-
V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: (
|
|
43682
|
+
V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: ($ = w == null ? void 0 : w.value) == null ? void 0 : $.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
|
|
43683
43683
|
}
|
|
43684
43684
|
}
|
|
43685
43685
|
}), N = (L, w) => z(void 0, null, function* () {
|
|
@@ -43710,12 +43710,12 @@ const InternalFileManager = (e) => {
|
|
|
43710
43710
|
value: (j = L == null ? void 0 : L.value) == null ? void 0 : j[y.value]
|
|
43711
43711
|
},
|
|
43712
43712
|
labelInValue: !0,
|
|
43713
|
-
onSearch: (
|
|
43713
|
+
onSearch: ($) => N($, L),
|
|
43714
43714
|
fieldNames: y,
|
|
43715
43715
|
style: { minWidth: 150 },
|
|
43716
|
-
onChange: (
|
|
43716
|
+
onChange: ($, q) => D($, q, w),
|
|
43717
43717
|
options: u ? [] : T(l),
|
|
43718
|
-
onDropdownVisibleChange: (
|
|
43718
|
+
onDropdownVisibleChange: ($) => B($, L, w),
|
|
43719
43719
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
43720
43720
|
},
|
|
43721
43721
|
`${(k = L.value) == null ? void 0 : k.id}+ ${L.key} + ${y.label}`
|
|
@@ -43956,9 +43956,9 @@ const InternalNesterCardCss = css`
|
|
|
43956
43956
|
}, InternalPicker = observer$1(
|
|
43957
43957
|
(e) => {
|
|
43958
43958
|
var j;
|
|
43959
|
-
const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = W(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
43960
|
-
const q =
|
|
43961
|
-
return P(x({},
|
|
43959
|
+
const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = W(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map(($) => {
|
|
43960
|
+
const q = $ == null ? void 0 : $[d.label];
|
|
43961
|
+
return P(x({}, $), {
|
|
43962
43962
|
[d.label]: getLabelFormatValue$1(b(S), b(q))
|
|
43963
43963
|
});
|
|
43964
43964
|
}) : [], [t, d == null ? void 0 : d.label]), R = {
|
|
@@ -43976,23 +43976,23 @@ const InternalNesterCardCss = css`
|
|
|
43976
43976
|
currentFormCollection: C
|
|
43977
43977
|
}, { isMobileLayout: D } = useMobileLayout(), B = () => {
|
|
43978
43978
|
var k;
|
|
43979
|
-
return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map((
|
|
43979
|
+
return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map(($) => $ == null ? void 0 : $[d.value]) : t == null ? void 0 : t[d.value];
|
|
43980
43980
|
}, N = () => {
|
|
43981
|
-
const k = (f == null ? void 0 : f.targetKey) || "id",
|
|
43982
|
-
return
|
|
43983
|
-
},
|
|
43984
|
-
const { setVisible: k } = useActionContext(), { multiple:
|
|
43981
|
+
const k = (f == null ? void 0 : f.targetKey) || "id", $ = T.map((E) => E[k]).filter(Boolean);
|
|
43982
|
+
return $.length ? { $and: [{ [`${k}.$ne`]: $ }] } : {};
|
|
43983
|
+
}, M = () => {
|
|
43984
|
+
const { setVisible: k } = useActionContext(), { multiple: $, selectedRows: q, onChange: E, options: V, collectionField: G } = useContext(RecordPickerContext);
|
|
43985
43985
|
return {
|
|
43986
43986
|
onClick() {
|
|
43987
|
-
E(
|
|
43987
|
+
E($ ? unionBy(q, V, (G == null ? void 0 : G.targetKey) || "id") : (q == null ? void 0 : q[0]) || null), k(!1);
|
|
43988
43988
|
},
|
|
43989
43989
|
style: {
|
|
43990
|
-
display:
|
|
43990
|
+
display: $ === !1 ? "none" : "block"
|
|
43991
43991
|
}
|
|
43992
43992
|
};
|
|
43993
43993
|
}, L = useMemo(
|
|
43994
43994
|
() => ({
|
|
43995
|
-
usePickActionProps:
|
|
43995
|
+
usePickActionProps: M,
|
|
43996
43996
|
useTableSelectorProps: useTableSelectorProps$2
|
|
43997
43997
|
}),
|
|
43998
43998
|
[]
|
|
@@ -44023,12 +44023,12 @@ const InternalNesterCardCss = css`
|
|
|
44023
44023
|
r([]), F([]);
|
|
44024
44024
|
return;
|
|
44025
44025
|
}
|
|
44026
|
-
const
|
|
44027
|
-
r(
|
|
44026
|
+
const $ = T == null ? void 0 : T.filter((q) => k.includes(q[d.value]));
|
|
44027
|
+
r($), F($);
|
|
44028
44028
|
}
|
|
44029
44029
|
} else {
|
|
44030
|
-
const
|
|
44031
|
-
r(
|
|
44030
|
+
const $ = o ? [] : null;
|
|
44031
|
+
r($), F($);
|
|
44032
44032
|
}
|
|
44033
44033
|
},
|
|
44034
44034
|
options: T,
|
|
@@ -44069,7 +44069,7 @@ const InternalNesterCardCss = css`
|
|
|
44069
44069
|
] });
|
|
44070
44070
|
},
|
|
44071
44071
|
{ displayName: "InternalPicker" }
|
|
44072
|
-
), toValue$4 = (e, t) => e == null ? t : e;
|
|
44072
|
+
), hasAddedViewer = (e) => e ? Object.values(e).some((t) => t["x-component"] === "AssociationField.Viewer") : !1, toValue$4 = (e, t) => e == null ? t : e;
|
|
44073
44073
|
function isObject(e) {
|
|
44074
44074
|
return typeof e == "object" && e !== null;
|
|
44075
44075
|
}
|
|
@@ -44098,7 +44098,7 @@ const RenderRecord = React.memo(
|
|
|
44098
44098
|
const T = useCallback(() => I.current, []);
|
|
44099
44099
|
return useEffect(() => {
|
|
44100
44100
|
const R = toArr$3(h).map((D, B, N) => {
|
|
44101
|
-
const
|
|
44101
|
+
const M = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], L = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(M) ? JSON.stringify(M) : M, w = toValue$4(o(L), "N/A"), O = n(
|
|
44102
44102
|
(D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
|
|
44103
44103
|
(e == null ? void 0 : e.label) || "label"
|
|
44104
44104
|
), j = getLabelFormatValue$1(o(O), w, !0);
|
|
@@ -44110,8 +44110,8 @@ const RenderRecord = React.memo(
|
|
|
44110
44110
|
g(!0);
|
|
44111
44111
|
},
|
|
44112
44112
|
onClick: (k) => {
|
|
44113
|
-
var
|
|
44114
|
-
g(!0), k.stopPropagation(), k.preventDefault(), l && !u.properties && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
|
|
44113
|
+
var $;
|
|
44114
|
+
g(!0), k.stopPropagation(), k.preventDefault(), l && !hasAddedViewer(u.properties) && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
|
|
44115
44115
|
f == null || f({ recordData: D }), d({
|
|
44116
44116
|
recordData: D,
|
|
44117
44117
|
parentRecordData: p,
|
|
@@ -44120,7 +44120,7 @@ const RenderRecord = React.memo(
|
|
|
44120
44120
|
}), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
|
|
44121
44121
|
recordData: D,
|
|
44122
44122
|
parentRecordData: p
|
|
44123
|
-
})), (
|
|
44123
|
+
})), ($ = m == null ? void 0 : m.current) == null || $.setPopoverVisible(!1);
|
|
44124
44124
|
},
|
|
44125
44125
|
children: j
|
|
44126
44126
|
}
|
|
@@ -44182,8 +44182,8 @@ const getSourceData = (e, t) => {
|
|
|
44182
44182
|
return o ? _.get(e, o) : e;
|
|
44183
44183
|
}, ReadPrettyInternalViewer = (e) => {
|
|
44184
44184
|
var B, N;
|
|
44185
|
-
const { value: t, ButtonList: o = ButtonLinkList } = e, n = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = n["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), F = useCollection(), I = useCallback((
|
|
44186
|
-
y(
|
|
44185
|
+
const { value: t, ButtonList: o = ButtonLinkList } = e, n = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = n["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), F = useCollection(), I = useCallback((M) => {
|
|
44186
|
+
y(M.recordData);
|
|
44187
44187
|
}, []), T = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: (B = e.ellipsis) != null ? B : !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(b, n), children: /* @__PURE__ */ jsx(
|
|
44188
44188
|
o,
|
|
44189
44189
|
{
|
|
@@ -44196,8 +44196,8 @@ const getSourceData = (e, t) => {
|
|
|
44196
44196
|
) }) }), R = useMemo(
|
|
44197
44197
|
() => ({
|
|
44198
44198
|
visible: c || m,
|
|
44199
|
-
setVisible: (
|
|
44200
|
-
u == null || u(
|
|
44199
|
+
setVisible: (M) => {
|
|
44200
|
+
u == null || u(M), h == null || h(M);
|
|
44201
44201
|
},
|
|
44202
44202
|
openMode: a || C,
|
|
44203
44203
|
snapshot: (d == null ? void 0 : d.interface) === "snapshot",
|
|
@@ -44216,7 +44216,7 @@ const getSourceData = (e, t) => {
|
|
|
44216
44216
|
schema: n,
|
|
44217
44217
|
onlyRenderProperties: !0,
|
|
44218
44218
|
basePath: l.address,
|
|
44219
|
-
filterProperties: (
|
|
44219
|
+
filterProperties: (M) => M["x-component"] === "AssociationField.Viewer"
|
|
44220
44220
|
}
|
|
44221
44221
|
) }) })
|
|
44222
44222
|
) : /* @__PURE__ */ jsx(
|
|
@@ -44229,7 +44229,15 @@ const getSourceData = (e, t) => {
|
|
|
44229
44229
|
record: S,
|
|
44230
44230
|
parentRecord: b,
|
|
44231
44231
|
action: "get",
|
|
44232
|
-
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: S, parentRecord: b, children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(
|
|
44232
|
+
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: S, parentRecord: b, children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(
|
|
44233
|
+
NocoBaseRecursionField,
|
|
44234
|
+
{
|
|
44235
|
+
schema: n,
|
|
44236
|
+
onlyRenderProperties: !0,
|
|
44237
|
+
basePath: l.address,
|
|
44238
|
+
filterProperties: (M) => M["x-component"] === "AssociationField.Viewer"
|
|
44239
|
+
}
|
|
44240
|
+
) }) }) })
|
|
44233
44241
|
}
|
|
44234
44242
|
))
|
|
44235
44243
|
] }) });
|
|
@@ -44829,8 +44837,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44829
44837
|
});
|
|
44830
44838
|
Array.isArray(n.value) || (n.value = []);
|
|
44831
44839
|
const D = useCallback(({ form: w, fieldSchema: O, collectionField: j, getInterface: k }) => {
|
|
44832
|
-
var
|
|
44833
|
-
return !j || j.target && ((
|
|
44840
|
+
var $;
|
|
44841
|
+
return !j || j.target && (($ = O["x-component-props"]) != null && $.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(j == null ? void 0 : j.interface) && !isSystemField(j, k);
|
|
44834
44842
|
}, []), B = () => {
|
|
44835
44843
|
const { setVisible: w } = useActionContext(), { selectedRows: O, setSelectedRows: j } = useContext(RecordPickerContext);
|
|
44836
44844
|
return {
|
|
@@ -44843,7 +44851,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44843
44851
|
return P(x({}, O), {
|
|
44844
44852
|
[F.label]: getLabelFormatValue$1(I(T), I(j))
|
|
44845
44853
|
});
|
|
44846
|
-
}) : [], [n.value, F == null ? void 0 : F.label]),
|
|
44854
|
+
}) : [], [n.value, F == null ? void 0 : F.label]), M = {
|
|
44847
44855
|
size: "small",
|
|
44848
44856
|
fieldNames: n.componentProps.fieldNames,
|
|
44849
44857
|
multiple: !0,
|
|
@@ -44941,7 +44949,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44941
44949
|
visible: b,
|
|
44942
44950
|
setVisible: S
|
|
44943
44951
|
},
|
|
44944
|
-
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({},
|
|
44952
|
+
children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, M), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: L() }, children: /* @__PURE__ */ jsx(
|
|
44945
44953
|
SchemaComponentOptions,
|
|
44946
44954
|
{
|
|
44947
44955
|
scope: {
|
|
@@ -44988,7 +44996,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44988
44996
|
S.current = t;
|
|
44989
44997
|
const y = useCallback(() => S.current, []);
|
|
44990
44998
|
return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, T) => {
|
|
44991
|
-
const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((
|
|
44999
|
+
const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((M) => M == null ? void 0 : M[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, B = toValue$3(l(D), "N/A"), N = getTabFormatValue(l(u), B, F[n]);
|
|
44992
45000
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
44993
45001
|
/* @__PURE__ */ jsx("span", { children: d ? N : o !== !1 ? /* @__PURE__ */ jsx(
|
|
44994
45002
|
"a",
|
|
@@ -44996,9 +45004,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44996
45004
|
onMouseEnter: () => {
|
|
44997
45005
|
e.setBtnHover(!0);
|
|
44998
45006
|
},
|
|
44999
|
-
onClick: (
|
|
45007
|
+
onClick: (M) => {
|
|
45000
45008
|
var L;
|
|
45001
|
-
e.setBtnHover(!0),
|
|
45009
|
+
e.setBtnHover(!0), M.stopPropagation(), M.preventDefault(), c && !t.properties && (a(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
|
|
45002
45010
|
f({
|
|
45003
45011
|
recordData: F,
|
|
45004
45012
|
parentRecordData: C,
|
|
@@ -45089,8 +45097,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
45089
45097
|
width: F && !i ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
|
|
45090
45098
|
render: (B, N) => {
|
|
45091
45099
|
var w;
|
|
45092
|
-
const
|
|
45093
|
-
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N.__index ||
|
|
45100
|
+
const M = (w = n.value) == null ? void 0 : w.indexOf(N), L = n.address.concat(N.__index || M);
|
|
45101
|
+
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N.__index || M, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(N), record: N, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }, M) }) }) }) });
|
|
45094
45102
|
},
|
|
45095
45103
|
onCell: (B, N) => ({
|
|
45096
45104
|
record: B,
|
|
@@ -45426,7 +45434,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45426
45434
|
"onClickRow",
|
|
45427
45435
|
"enableIndexÏColumn"
|
|
45428
45436
|
]), y = useArrayField(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = R, N = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
45429
|
-
})),
|
|
45437
|
+
})), M = usePaginationProps$2(o, a), L = useTableColumns$1(S, M), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [$, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
45430
45438
|
& > td {
|
|
45431
45439
|
background-color: ${t.controlItemBgActive} !important;
|
|
45432
45440
|
}
|
|
@@ -45435,10 +45443,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45435
45443
|
}
|
|
45436
45444
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (Z, ne) => ({
|
|
45437
45445
|
onClick: (re) => {
|
|
45438
|
-
isPortalInBody(re.target) || C(Z, q,
|
|
45446
|
+
isPortalInBody(re.target) || C(Z, q, $);
|
|
45439
45447
|
},
|
|
45440
45448
|
rowIndex: ne
|
|
45441
|
-
}) : null, [C,
|
|
45449
|
+
}) : null, [C, $]);
|
|
45442
45450
|
useDeepCompareEffect(() => {
|
|
45443
45451
|
const Z = D ? B : [];
|
|
45444
45452
|
_.isEqual(Z, w) || O(Z);
|
|
@@ -45500,7 +45508,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45500
45508
|
renderCell: (Z, ne, re, ae) => {
|
|
45501
45509
|
if (!l && !c)
|
|
45502
45510
|
return ae;
|
|
45503
|
-
const le =
|
|
45511
|
+
const le = M == null ? void 0 : M.current, ge = (M == null ? void 0 : M.pageSize) || 20;
|
|
45504
45512
|
return le ? re = re + (le - 1) * ge + 1 : re = re + 1, ne.__index && (re = extractIndex(ne.__index)), /* @__PURE__ */ jsxs(
|
|
45505
45513
|
"div",
|
|
45506
45514
|
{
|
|
@@ -45541,7 +45549,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45541
45549
|
J,
|
|
45542
45550
|
E,
|
|
45543
45551
|
ee,
|
|
45544
|
-
|
|
45552
|
+
M,
|
|
45545
45553
|
b
|
|
45546
45554
|
]
|
|
45547
45555
|
), te = useCallback(
|
|
@@ -45562,8 +45570,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45562
45570
|
x: "max-content",
|
|
45563
45571
|
y: K.length > 0 ? se : void 0
|
|
45564
45572
|
}), [se, ue, K]), fe = useCallback(
|
|
45565
|
-
(Z) =>
|
|
45566
|
-
[
|
|
45573
|
+
(Z) => $.includes(Z[m]) ? U : "",
|
|
45574
|
+
[$, U, JSON.stringify(m)]
|
|
45567
45575
|
), pe = useCallback(
|
|
45568
45576
|
(Z, ne) => {
|
|
45569
45577
|
const re = Z ? [...w, ne[I.getPrimaryKey()]] : w.filter((ae) => ne[I.getPrimaryKey()] !== ae);
|
|
@@ -45585,7 +45593,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45585
45593
|
defaultRowKey: Y,
|
|
45586
45594
|
dataSource: K
|
|
45587
45595
|
}, S), oe), {
|
|
45588
|
-
paginationProps:
|
|
45596
|
+
paginationProps: M,
|
|
45589
45597
|
components: Q,
|
|
45590
45598
|
onTableChange: d,
|
|
45591
45599
|
onRow: H,
|
|
@@ -45651,7 +45659,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45651
45659
|
}
|
|
45652
45660
|
`, SubTable = observer$1(
|
|
45653
45661
|
(e) => {
|
|
45654
|
-
var k,
|
|
45662
|
+
var k, $, q;
|
|
45655
45663
|
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: S, enableIndexÏColumn: y } = o.componentProps;
|
|
45656
45664
|
useSubTableSpecialCase({ rootField: o, rootSchema: r });
|
|
45657
45665
|
const v = (E, V) => {
|
|
@@ -45695,11 +45703,11 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45695
45703
|
}, R = () => {
|
|
45696
45704
|
const E = (n == null ? void 0 : n.targetKey) || "id", V = (o.value || []).map((U) => U == null ? void 0 : U[E]).filter(Boolean);
|
|
45697
45705
|
return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
|
|
45698
|
-
}, [D, B] = useState(1), [N,
|
|
45706
|
+
}, [D, B] = useState(1), [N, M] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: L } = useActionContext();
|
|
45699
45707
|
useEffect(() => {
|
|
45700
45708
|
var E;
|
|
45701
|
-
|
|
45702
|
-
}, [(
|
|
45709
|
+
M((E = o.componentProps) == null ? void 0 : E.pageSize);
|
|
45710
|
+
}, [($ = o.componentProps) == null ? void 0 : $.pageSize]);
|
|
45703
45711
|
const w = useMemo(() => {
|
|
45704
45712
|
var V;
|
|
45705
45713
|
const E = Math.ceil(((V = o.value) == null ? void 0 : V.length) / 10);
|
|
@@ -45708,7 +45716,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45708
45716
|
pageSize: N || 10,
|
|
45709
45717
|
total: o == null ? void 0 : o.value,
|
|
45710
45718
|
onChange: (G, U) => {
|
|
45711
|
-
B(G),
|
|
45719
|
+
B(G), M(U), o.componentProps.pageSize = U, o.onInput(o.value), L(!1);
|
|
45712
45720
|
},
|
|
45713
45721
|
showSizeChanger: !0,
|
|
45714
45722
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
@@ -45905,10 +45913,10 @@ const ReadPretty$7 = observer$1(
|
|
|
45905
45913
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
45906
45914
|
const AssociationSelect = InternalAssociationSelect;
|
|
45907
45915
|
AssociationSelect.Designer = function e() {
|
|
45908
|
-
var O, j, k,
|
|
45916
|
+
var O, j, k, $, q, E, V, G, U, H, Y;
|
|
45909
45917
|
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(), S = i(u.name) || n(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(S == null ? void 0 : S.interface), I = (O = F == null ? void 0 : F.validateSchema) == null ? void 0 : O.call(F, u), T = (j = S == null ? void 0 : S.uiSchema) == null ? void 0 : j.title, R = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
45910
45918
|
c.title === T || c.title;
|
|
45911
|
-
const D = useSortFields(S == null ? void 0 : S.target), B = ((q = (
|
|
45919
|
+
const D = useSortFields(S == null ? void 0 : S.target), B = ((q = ($ = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : $.params) == null ? void 0 : q.sort) || [];
|
|
45912
45920
|
useEffect(() => {
|
|
45913
45921
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
45914
45922
|
}, [u["x-read-pretty"]]);
|
|
@@ -45920,7 +45928,7 @@ AssociationSelect.Designer = function e() {
|
|
|
45920
45928
|
direction: "asc"
|
|
45921
45929
|
});
|
|
45922
45930
|
c.readPretty || c.required;
|
|
45923
|
-
const
|
|
45931
|
+
const M = R.filter((J) => a(J)).map((J) => {
|
|
45924
45932
|
var K;
|
|
45925
45933
|
return {
|
|
45926
45934
|
value: J == null ? void 0 : J.name,
|
|
@@ -46271,7 +46279,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46271
46279
|
SchemaSettingsSelectItem,
|
|
46272
46280
|
{
|
|
46273
46281
|
title: d("Title field"),
|
|
46274
|
-
options:
|
|
46282
|
+
options: M,
|
|
46275
46283
|
value: (Y = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : Y.label,
|
|
46276
46284
|
onChange: (J) => {
|
|
46277
46285
|
var Q, ee;
|
|
@@ -46304,7 +46312,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46304
46312
|
] });
|
|
46305
46313
|
};
|
|
46306
46314
|
AssociationSelect.FilterDesigner = function e() {
|
|
46307
|
-
var F, I, T, R, D, B, N,
|
|
46315
|
+
var F, I, T, R, D, B, N, M, L, w, O;
|
|
46308
46316
|
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) : [];
|
|
46309
46317
|
i.title === f || i.title;
|
|
46310
46318
|
const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (R = (T = i.componentProps) == null ? void 0 : T.service) == null ? void 0 : R.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map((j) => j.startsWith("-") ? {
|
|
@@ -46415,15 +46423,15 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46415
46423
|
const k = [];
|
|
46416
46424
|
for (const V of j.rules)
|
|
46417
46425
|
k.push(_.pickBy(V, _.identity));
|
|
46418
|
-
const
|
|
46426
|
+
const $ = {
|
|
46419
46427
|
"x-uid": l["x-uid"]
|
|
46420
46428
|
};
|
|
46421
46429
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
46422
46430
|
for (const V of k)
|
|
46423
46431
|
(V.maxValue || V.minValue) && (V.percentMode = !0), V.percentFormat && (V.percentFormats = !0);
|
|
46424
46432
|
const q = _.concat([], ((E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-validator"]) || [], k);
|
|
46425
|
-
i.validator = q, l["x-validator"] = k,
|
|
46426
|
-
schema:
|
|
46433
|
+
i.validator = q, l["x-validator"] = k, $["x-validator"] = k, u.emit("patch", {
|
|
46434
|
+
schema: $
|
|
46427
46435
|
}), d();
|
|
46428
46436
|
}
|
|
46429
46437
|
}
|
|
@@ -46459,7 +46467,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46459
46467
|
SchemaSettingsDataScope,
|
|
46460
46468
|
{
|
|
46461
46469
|
collectionName: m == null ? void 0 : m.target,
|
|
46462
|
-
defaultFilter: ((L = (
|
|
46470
|
+
defaultFilter: ((L = (M = (N = i.componentProps) == null ? void 0 : N.service) == null ? void 0 : M.params) == null ? void 0 : L.filter) || {},
|
|
46463
46471
|
form: a,
|
|
46464
46472
|
onSubmit: ({ filter: j }) => {
|
|
46465
46473
|
j = removeNullCondition(j), _.set(i.componentProps, "service.params.filter", j), l["x-component-props"] = i.componentProps, u.emit("patch", {
|
|
@@ -46546,7 +46554,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46546
46554
|
}
|
|
46547
46555
|
},
|
|
46548
46556
|
onSubmit: ({ sort: j }) => {
|
|
46549
|
-
const k = j.map((
|
|
46557
|
+
const k = j.map(($) => $.direction === "desc" ? `-${$.field}` : $.field);
|
|
46550
46558
|
_.set(i.componentProps, "service.params.sort", k), l["x-component-props"] = i.componentProps, u.emit("patch", {
|
|
46551
46559
|
schema: {
|
|
46552
46560
|
"x-uid": l["x-uid"],
|
|
@@ -46566,10 +46574,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46566
46574
|
var q, E;
|
|
46567
46575
|
const k = {
|
|
46568
46576
|
"x-uid": l["x-uid"]
|
|
46569
|
-
},
|
|
46577
|
+
}, $ = P(x(x({}, (E = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : E.fieldNames), i.componentProps.fieldNames), {
|
|
46570
46578
|
label: j
|
|
46571
46579
|
});
|
|
46572
|
-
i.componentProps.fieldNames =
|
|
46580
|
+
i.componentProps.fieldNames = $, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = $, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
46573
46581
|
schema: k
|
|
46574
46582
|
}), u.refresh();
|
|
46575
46583
|
}
|
|
@@ -48007,8 +48015,8 @@ const InternalListBlockProvider = (e) => {
|
|
|
48007
48015
|
}
|
|
48008
48016
|
},
|
|
48009
48017
|
onSubmit: ({ sort: N }) => {
|
|
48010
|
-
const
|
|
48011
|
-
_.set(i, "x-decorator-props.params.sort",
|
|
48018
|
+
const M = N.map((L) => L.direction === "desc" ? `-${L.field}` : L.field);
|
|
48019
|
+
_.set(i, "x-decorator-props.params.sort", M), c.decoratorProps.params = P(x({}, i["x-decorator-props"].params), { page: 1 }), u.emit("patch", {
|
|
48012
48020
|
schema: {
|
|
48013
48021
|
"x-uid": i["x-uid"],
|
|
48014
48022
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48154,10 +48162,10 @@ const InternalListBlockProvider = (e) => {
|
|
|
48154
48162
|
), m.get(k)),
|
|
48155
48163
|
[r.properties, m]
|
|
48156
48164
|
), y = [5, 10, 20, 50, 100, 200], v = useCallback(
|
|
48157
|
-
(k,
|
|
48165
|
+
(k, $) => {
|
|
48158
48166
|
o(P(x({}, n == null ? void 0 : n[0]), {
|
|
48159
48167
|
page: k,
|
|
48160
|
-
pageSize:
|
|
48168
|
+
pageSize: $
|
|
48161
48169
|
}));
|
|
48162
48170
|
},
|
|
48163
48171
|
[o, n]
|
|
@@ -48188,7 +48196,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
48188
48196
|
display: none !important;
|
|
48189
48197
|
}
|
|
48190
48198
|
`,
|
|
48191
|
-
itemRender: (
|
|
48199
|
+
itemRender: ($, q, E) => q === "prev" ? /* @__PURE__ */ jsxs(
|
|
48192
48200
|
"div",
|
|
48193
48201
|
{
|
|
48194
48202
|
style: { display: "flex" },
|
|
@@ -48205,7 +48213,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
48205
48213
|
}
|
|
48206
48214
|
) : E
|
|
48207
48215
|
};
|
|
48208
|
-
})(), { isMobileLayout:
|
|
48216
|
+
})(), { isMobileLayout: M } = useMobileLayout();
|
|
48209
48217
|
return h(
|
|
48210
48218
|
/* @__PURE__ */ jsx(
|
|
48211
48219
|
SchemaComponentOptions,
|
|
@@ -48245,15 +48253,15 @@ const InternalListBlockProvider = (e) => {
|
|
|
48245
48253
|
P(x({}, e), {
|
|
48246
48254
|
pagination: !i || !((w = p.value) != null && w.length) || c <= ((O = p.value) == null ? void 0 : O.length) ? !1 : N,
|
|
48247
48255
|
loading: t == null ? void 0 : t.loading,
|
|
48248
|
-
children: (j = p.value) != null && j.length ? p.value.map((k,
|
|
48256
|
+
children: (j = p.value) != null && j.length ? p.value.map((k, $) => /* @__PURE__ */ jsx(
|
|
48249
48257
|
NocoBaseRecursionField,
|
|
48250
48258
|
{
|
|
48251
48259
|
basePath: p.address,
|
|
48252
|
-
name:
|
|
48260
|
+
name: $,
|
|
48253
48261
|
onlyRenderProperties: !0,
|
|
48254
|
-
schema:
|
|
48262
|
+
schema: M ? transformMultiColumnToSingleColumn(S($)) : S($)
|
|
48255
48263
|
},
|
|
48256
|
-
|
|
48264
|
+
$
|
|
48257
48265
|
)) : null
|
|
48258
48266
|
})
|
|
48259
48267
|
)
|
|
@@ -48690,8 +48698,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
|
|
|
48690
48698
|
"a",
|
|
48691
48699
|
{
|
|
48692
48700
|
onClick: (N) => {
|
|
48693
|
-
var
|
|
48694
|
-
N.stopPropagation(), N.preventDefault(), l(!0), p(I), (
|
|
48701
|
+
var M;
|
|
48702
|
+
N.stopPropagation(), N.preventDefault(), l(!0), p(I), (M = C == null ? void 0 : C.current) == null || M.setPopoverVisible(!1);
|
|
48695
48703
|
},
|
|
48696
48704
|
children: B
|
|
48697
48705
|
}
|
|
@@ -50109,7 +50117,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50109
50117
|
"sort-field"
|
|
50110
50118
|
);
|
|
50111
50119
|
}, TableBlockDesigner = () => {
|
|
50112
|
-
var F, I, T, R, D, B, N,
|
|
50120
|
+
var F, I, T, R, D, B, N, M, L, w, O, j;
|
|
50113
50121
|
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();
|
|
50114
50122
|
useBlockTemplateContext();
|
|
50115
50123
|
const p = ((I = (F = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : F.params) == null ? void 0 : I.sort) || [];
|
|
@@ -50123,8 +50131,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50123
50131
|
}), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), S = C != null && C.includes(".") ? (B = n(b == null ? void 0 : b.target)) == null ? void 0 : B.tree : !!(g != null && g.tree), y = useCallback(
|
|
50124
50132
|
({ filter: k }) => {
|
|
50125
50133
|
k = removeNullCondition(k);
|
|
50126
|
-
const
|
|
50127
|
-
|
|
50134
|
+
const $ = r.decoratorProps.params || {};
|
|
50135
|
+
$.filter = k, r.decoratorProps.params = $, a["x-decorator-props"].params = $, d.emit("patch", {
|
|
50128
50136
|
schema: {
|
|
50129
50137
|
"x-uid": a["x-uid"],
|
|
50130
50138
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -50146,12 +50154,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50146
50154
|
onChange: (k) => {
|
|
50147
50155
|
var q;
|
|
50148
50156
|
r.decoratorProps.treeTable = k, a["x-decorator-props"].treeTable = k;
|
|
50149
|
-
const
|
|
50157
|
+
const $ = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
|
|
50150
50158
|
tree: k ? !0 : null
|
|
50151
50159
|
});
|
|
50152
50160
|
d.emit("patch", {
|
|
50153
50161
|
schema: a
|
|
50154
|
-
}), d.refresh(), c.run(
|
|
50162
|
+
}), d.refresh(), c.run($);
|
|
50155
50163
|
}
|
|
50156
50164
|
}
|
|
50157
50165
|
),
|
|
@@ -50195,7 +50203,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50195
50203
|
SchemaSettingsDataScope,
|
|
50196
50204
|
{
|
|
50197
50205
|
collectionName: e,
|
|
50198
|
-
defaultFilter: ((L = (
|
|
50206
|
+
defaultFilter: ((L = (M = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : M.params) == null ? void 0 : L.filter) || {},
|
|
50199
50207
|
form: i,
|
|
50200
50208
|
onSubmit: y
|
|
50201
50209
|
}
|
|
@@ -50277,13 +50285,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50277
50285
|
},
|
|
50278
50286
|
onSubmit: ({ sort: k }) => {
|
|
50279
50287
|
var E;
|
|
50280
|
-
const
|
|
50281
|
-
q.sort =
|
|
50288
|
+
const $ = k.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), q = r.decoratorProps.params || {};
|
|
50289
|
+
q.sort = $, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
|
|
50282
50290
|
schema: {
|
|
50283
50291
|
"x-uid": a["x-uid"],
|
|
50284
50292
|
"x-decorator-props": a["x-decorator-props"]
|
|
50285
50293
|
}
|
|
50286
|
-
}), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort:
|
|
50294
|
+
}), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort: $ }));
|
|
50287
50295
|
}
|
|
50288
50296
|
}
|
|
50289
50297
|
),
|
|
@@ -50303,8 +50311,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50303
50311
|
],
|
|
50304
50312
|
onChange: (k) => {
|
|
50305
50313
|
var q;
|
|
50306
|
-
const
|
|
50307
|
-
|
|
50314
|
+
const $ = r.decoratorProps.params || {};
|
|
50315
|
+
$.pageSize = k, r.decoratorProps.params = $, a["x-decorator-props"].params = $, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
|
|
50308
50316
|
schema: {
|
|
50309
50317
|
"x-uid": a["x-uid"],
|
|
50310
50318
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -50324,14 +50332,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50324
50332
|
{ label: u("Small"), value: "small" }
|
|
50325
50333
|
],
|
|
50326
50334
|
onChange: (k) => {
|
|
50327
|
-
const
|
|
50335
|
+
const $ = a.reduceProperties((q, E) => {
|
|
50328
50336
|
if (E["x-component"] === "TableV2")
|
|
50329
50337
|
return E;
|
|
50330
50338
|
}, null);
|
|
50331
|
-
|
|
50339
|
+
$["x-component-props"] = $["x-component-props"] || {}, $["x-component-props"].size = k, d.emit("patch", {
|
|
50332
50340
|
schema: {
|
|
50333
|
-
"x-uid":
|
|
50334
|
-
"x-decorator-props":
|
|
50341
|
+
"x-uid": $["x-uid"],
|
|
50342
|
+
"x-decorator-props": $["x-component-props"]
|
|
50335
50343
|
}
|
|
50336
50344
|
});
|
|
50337
50345
|
}
|
|
@@ -50366,7 +50374,7 @@ TableField.ActionBar = observer$1(
|
|
|
50366
50374
|
{ displayName: "TableField.ActionBar" }
|
|
50367
50375
|
);
|
|
50368
50376
|
const TableSelectorDesigner = () => {
|
|
50369
|
-
var T, R, D, B, N,
|
|
50377
|
+
var T, R, D, B, N, M;
|
|
50370
50378
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: o, getAllCollectionsInheritChain: n } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((R = (T = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : R.sort) || [], h = recursiveParent(a, "CollectionField"), g = o(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((L) => L.startsWith("-") ? {
|
|
50371
50379
|
field: L.substring(1),
|
|
50372
50380
|
direction: "desc"
|
|
@@ -50524,7 +50532,7 @@ const TableSelectorDesigner = () => {
|
|
|
50524
50532
|
SchemaSettingsSelectItem,
|
|
50525
50533
|
{
|
|
50526
50534
|
title: d("Records per page"),
|
|
50527
|
-
value: ((
|
|
50535
|
+
value: ((M = (N = r.decoratorProps) == null ? void 0 : N.params) == null ? void 0 : M.pageSize) || 20,
|
|
50528
50536
|
options: [
|
|
50529
50537
|
{ label: "5", value: 5 },
|
|
50530
50538
|
{ label: "10", value: 10 },
|
|
@@ -52335,11 +52343,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52335
52343
|
if (D && F) {
|
|
52336
52344
|
const N = ((B = r(D)) == null ? void 0 : B.fields) || [];
|
|
52337
52345
|
n(
|
|
52338
|
-
N == null ? void 0 : N.filter((
|
|
52346
|
+
N == null ? void 0 : N.filter((M) => supportTypes.includes(M.type)).map((M) => {
|
|
52339
52347
|
var L;
|
|
52340
52348
|
return {
|
|
52341
|
-
value:
|
|
52342
|
-
label: g(((L =
|
|
52349
|
+
value: M.name,
|
|
52350
|
+
label: g(((L = M.uiSchema) == null ? void 0 : L.title) || M.name)
|
|
52343
52351
|
};
|
|
52344
52352
|
})
|
|
52345
52353
|
);
|
|
@@ -52528,27 +52536,27 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52528
52536
|
const t = useRecord();
|
|
52529
52537
|
return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
|
|
52530
52538
|
}, AddFieldAction = (e) => {
|
|
52531
|
-
var
|
|
52532
|
-
const { scope: t, getContainer: o, item: n, children: r, trigger: a, align: i, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((L = (
|
|
52539
|
+
var M, L;
|
|
52540
|
+
const { scope: t, getContainer: o, item: n, children: r, trigger: a, align: i, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((L = (M = p(n.name)) == null ? void 0 : M.options) == null ? void 0 : L.fields) || n.fields || [], T = useMemo(() => d.map((w) => ({
|
|
52533
52541
|
label: S(w.title),
|
|
52534
52542
|
value: w.name
|
|
52535
52543
|
})), []), R = useCallback(() => {
|
|
52536
52544
|
const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: O, include: j } = w || {}, k = [];
|
|
52537
|
-
return F.forEach((
|
|
52545
|
+
return F.forEach(($) => {
|
|
52538
52546
|
var q;
|
|
52539
|
-
if (
|
|
52540
|
-
k.push(P(x({},
|
|
52541
|
-
children:
|
|
52547
|
+
if ($.key === "systemInfo")
|
|
52548
|
+
k.push(P(x({}, $), {
|
|
52549
|
+
children: $.children.filter((E) => E.hidden ? !1 : E.value === "tableoid" ? j != null && j.length ? j.includes(E.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[E.value] == "boolean" ? n[E.value] : !0)
|
|
52542
52550
|
}));
|
|
52543
52551
|
else {
|
|
52544
52552
|
let E = [];
|
|
52545
52553
|
j != null && j.length ? j.forEach((V) => {
|
|
52546
52554
|
var U;
|
|
52547
|
-
const G = (U =
|
|
52555
|
+
const G = (U = $ == null ? void 0 : $.children) == null ? void 0 : U.find((H) => [V, V.interface].includes(H.name));
|
|
52548
52556
|
G && E.push(P(x({}, G), {
|
|
52549
52557
|
targetScope: V == null ? void 0 : V.targetScope
|
|
52550
52558
|
}));
|
|
52551
|
-
}) : O != null && O.length ? E = (q =
|
|
52559
|
+
}) : O != null && O.length ? E = (q = $ == null ? void 0 : $.children) == null ? void 0 : q.filter((V) => !O.includes(V.name)) : E = $ == null ? void 0 : $.children, E != null && E.length && k.push(P(x({}, $), {
|
|
52552
52560
|
children: E
|
|
52553
52561
|
}));
|
|
52554
52562
|
}
|
|
@@ -52727,14 +52735,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52727
52735
|
"a",
|
|
52728
52736
|
P(x({}, i), {
|
|
52729
52737
|
onClick: () => z(void 0, null, function* () {
|
|
52730
|
-
var N,
|
|
52738
|
+
var N, M;
|
|
52731
52739
|
const { data: T } = yield g.resource("collections.fields", n.collectionName).get({
|
|
52732
52740
|
filterByTk: n.name,
|
|
52733
52741
|
appends: ["reverseField"]
|
|
52734
52742
|
});
|
|
52735
52743
|
S(T == null ? void 0 : T.data);
|
|
52736
52744
|
const R = l(n.interface), D = cloneDeep(T == null ? void 0 : T.data) || {};
|
|
52737
|
-
D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (N = R == null ? void 0 : R.default) == null ? void 0 : N.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (
|
|
52745
|
+
D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (N = R == null ? void 0 : R.default) == null ? void 0 : N.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (M = n.__parent) == null ? void 0 : M.title));
|
|
52738
52746
|
const B = getSchema$7(R, D, n, C);
|
|
52739
52747
|
h(B), p(!0);
|
|
52740
52748
|
}),
|
|
@@ -52858,7 +52866,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52858
52866
|
});
|
|
52859
52867
|
}
|
|
52860
52868
|
};
|
|
52861
|
-
},
|
|
52869
|
+
}, M = useMemo(() => {
|
|
52862
52870
|
var L;
|
|
52863
52871
|
return (n == null ? void 0 : n.fields) || ((L = d(n.collectionName)) == null ? void 0 : L.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
|
|
52864
52872
|
var O;
|
|
@@ -52911,7 +52919,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52911
52919
|
isOverride: !0,
|
|
52912
52920
|
targetScope: { target: F(l), through: F(c) },
|
|
52913
52921
|
collections: B,
|
|
52914
|
-
scopeKeyOptions:
|
|
52922
|
+
scopeKeyOptions: M
|
|
52915
52923
|
}, t)
|
|
52916
52924
|
}
|
|
52917
52925
|
)
|
|
@@ -53348,7 +53356,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53348
53356
|
const w = [];
|
|
53349
53357
|
g.forEach((O) => {
|
|
53350
53358
|
var E;
|
|
53351
|
-
const j = v(O),
|
|
53359
|
+
const j = v(O), $ = T(O).map((V) => {
|
|
53352
53360
|
const G = R(V, O);
|
|
53353
53361
|
return {
|
|
53354
53362
|
type: "group",
|
|
@@ -53365,7 +53373,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53365
53373
|
}), q = (E = j.fields.filter((V) => !["obo", "oho", "m2m", "o2m"].includes(V == null ? void 0 : V.interface))) == null ? void 0 : E.map((V) => {
|
|
53366
53374
|
var G;
|
|
53367
53375
|
return { value: V.name, key: V.name, label: l(((G = V.uiSchema) == null ? void 0 : G.title) || V.name) };
|
|
53368
|
-
}).concat(
|
|
53376
|
+
}).concat($);
|
|
53369
53377
|
w.push({
|
|
53370
53378
|
value: O,
|
|
53371
53379
|
label: l(j.title || j.name),
|
|
@@ -53377,31 +53385,31 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53377
53385
|
var O, j;
|
|
53378
53386
|
if (w) {
|
|
53379
53387
|
u(!1), p([]);
|
|
53380
|
-
const k = (j = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : j.map((
|
|
53388
|
+
const k = (j = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : j.map(($) => {
|
|
53381
53389
|
var q, E;
|
|
53382
|
-
if (
|
|
53383
|
-
const V = (a == null ? void 0 : a.data.find((G) => G.name ===
|
|
53384
|
-
return P(x({},
|
|
53390
|
+
if ($.source) {
|
|
53391
|
+
const V = (a == null ? void 0 : a.data.find((G) => G.name === $.name)) || $;
|
|
53392
|
+
return P(x({}, $), {
|
|
53385
53393
|
uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((q = V.uiSchema) == null ? void 0 : q.title) || V.name })
|
|
53386
53394
|
});
|
|
53387
53395
|
} else {
|
|
53388
|
-
const V = (a == null ? void 0 : a.data.find((G) => G.name ===
|
|
53396
|
+
const V = (a == null ? void 0 : a.data.find((G) => G.name === $.name)) || $;
|
|
53389
53397
|
return P(x({}, V), {
|
|
53390
53398
|
uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((E = V.uiSchema) == null ? void 0 : E.title) || V.name })
|
|
53391
53399
|
});
|
|
53392
53400
|
}
|
|
53393
53401
|
});
|
|
53394
53402
|
S.value = k, setTimeout(() => {
|
|
53395
|
-
var
|
|
53396
|
-
p(k), y.setValuesIn("sources", (
|
|
53403
|
+
var $, q, E;
|
|
53404
|
+
p(k), y.setValuesIn("sources", ($ = w.data) == null ? void 0 : $.sources), f((q = w.data) == null ? void 0 : q.sources), b((E = w == null ? void 0 : w.data) == null ? void 0 : E.unsupportedFields);
|
|
53397
53405
|
});
|
|
53398
53406
|
}
|
|
53399
53407
|
}).catch);
|
|
53400
53408
|
}, [t]);
|
|
53401
|
-
const
|
|
53409
|
+
const M = (w, O) => {
|
|
53402
53410
|
d.splice(O, 1, w), p(d), S.value = d.map((j) => {
|
|
53403
|
-
var
|
|
53404
|
-
const k = typeof j.source == "string" ? j.source : (E = (q = (
|
|
53411
|
+
var $, q, E;
|
|
53412
|
+
const k = typeof j.source == "string" ? j.source : (E = (q = ($ = j.source) == null ? void 0 : $.filter) == null ? void 0 : q.call($, Boolean)) == null ? void 0 : E.join(".");
|
|
53405
53413
|
return P(x({}, j), {
|
|
53406
53414
|
source: k
|
|
53407
53415
|
});
|
|
@@ -53425,10 +53433,10 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53425
53433
|
allowClear: !0,
|
|
53426
53434
|
style: { width: "100%" },
|
|
53427
53435
|
options: D(m),
|
|
53428
|
-
onChange: (k,
|
|
53436
|
+
onChange: (k, $) => {
|
|
53429
53437
|
var E;
|
|
53430
53438
|
const q = (E = I(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
|
|
53431
|
-
|
|
53439
|
+
M(P(x({}, O), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), j);
|
|
53432
53440
|
},
|
|
53433
53441
|
placeholder: l("Select field source")
|
|
53434
53442
|
}
|
|
@@ -53447,8 +53455,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53447
53455
|
defaultValue: w,
|
|
53448
53456
|
popupMatchSelectWidth: !1,
|
|
53449
53457
|
style: { width: "100%" },
|
|
53450
|
-
options: (k == null ? void 0 : k.possibleTypes.map((
|
|
53451
|
-
onChange: (
|
|
53458
|
+
options: (k == null ? void 0 : k.possibleTypes.map(($) => ({ label: $, value: $ }))) || [],
|
|
53459
|
+
onChange: ($) => M(P(x({}, k), { type: $ }), j)
|
|
53452
53460
|
}
|
|
53453
53461
|
);
|
|
53454
53462
|
}
|
|
@@ -53459,7 +53467,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53459
53467
|
key: "interface",
|
|
53460
53468
|
width: 150,
|
|
53461
53469
|
render: (w, O, j) => {
|
|
53462
|
-
const k = d[j],
|
|
53470
|
+
const k = d[j], $ = getInterfaceOptions(N, k.type);
|
|
53463
53471
|
return k.source ? w : /* @__PURE__ */ jsx(
|
|
53464
53472
|
Select$1,
|
|
53465
53473
|
{
|
|
@@ -53469,9 +53477,9 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53469
53477
|
onChange: (q) => {
|
|
53470
53478
|
var V;
|
|
53471
53479
|
const E = F(q);
|
|
53472
|
-
|
|
53480
|
+
M(P(x({}, k), { interface: q, uiSchema: (V = E == null ? void 0 : E.default) == null ? void 0 : V.uiSchema }), j);
|
|
53473
53481
|
},
|
|
53474
|
-
children:
|
|
53482
|
+
children: $.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
|
|
53475
53483
|
}
|
|
53476
53484
|
);
|
|
53477
53485
|
}
|
|
@@ -53482,13 +53490,13 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53482
53490
|
key: "title",
|
|
53483
53491
|
width: 180,
|
|
53484
53492
|
render: (w, O, j) => {
|
|
53485
|
-
var
|
|
53493
|
+
var $;
|
|
53486
53494
|
const k = d[j];
|
|
53487
53495
|
return /* @__PURE__ */ jsx(
|
|
53488
53496
|
Input$3,
|
|
53489
53497
|
{
|
|
53490
|
-
defaultValue: ((
|
|
53491
|
-
onChange: (q) =>
|
|
53498
|
+
defaultValue: (($ = k == null ? void 0 : k.uiSchema) == null ? void 0 : $.title) || w,
|
|
53499
|
+
onChange: (q) => M(
|
|
53492
53500
|
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
|
|
53493
53501
|
j
|
|
53494
53502
|
)
|
|
@@ -53543,14 +53551,14 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
53543
53551
|
}, S = (y) => {
|
|
53544
53552
|
var v;
|
|
53545
53553
|
return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
|
|
53546
|
-
var B, N,
|
|
53547
|
-
const I = typeof (F == null ? void 0 : F.source) == "string" ? (B = F == null ? void 0 : F.source) == null ? void 0 : B.split(".") : F == null ? void 0 : F.source, T = (
|
|
53554
|
+
var B, N, M, L, w, O;
|
|
53555
|
+
const I = typeof (F == null ? void 0 : F.source) == "string" ? (B = F == null ? void 0 : F.source) == null ? void 0 : B.split(".") : F == null ? void 0 : F.source, T = (M = (N = h(I == null ? void 0 : I[0])) == null ? void 0 : N.find((j) => j.name === (I == null ? void 0 : I[1]))) == null ? void 0 : M.uiSchema, R = ((L = F == null ? void 0 : F.uiSchema) == null ? void 0 : L.title) || (T == null ? void 0 : T.title) || F.name, D = F.source ? T : (O = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : O.uiSchema;
|
|
53548
53556
|
return {
|
|
53549
53557
|
title: u(R),
|
|
53550
53558
|
dataIndex: F.name,
|
|
53551
53559
|
key: F.name,
|
|
53552
53560
|
width: 200,
|
|
53553
|
-
render: (j, k,
|
|
53561
|
+
render: (j, k, $) => {
|
|
53554
53562
|
const q = k[F.name], E = {
|
|
53555
53563
|
type: "object",
|
|
53556
53564
|
properties: {
|
|
@@ -53563,7 +53571,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
53563
53571
|
}
|
|
53564
53572
|
}
|
|
53565
53573
|
};
|
|
53566
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name:
|
|
53574
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name: $, onlyRenderProperties: !0 }) });
|
|
53567
53575
|
}
|
|
53568
53576
|
};
|
|
53569
53577
|
});
|
|
@@ -53794,9 +53802,9 @@ const AsyncDataProvider = (e) => {
|
|
|
53794
53802
|
if (useEffect(() => {
|
|
53795
53803
|
var B;
|
|
53796
53804
|
const R = /* @__PURE__ */ new Map();
|
|
53797
|
-
a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([N,
|
|
53805
|
+
a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([N, M]) => {
|
|
53798
53806
|
var k;
|
|
53799
|
-
const L = l[N], w = inferInterface(N,
|
|
53807
|
+
const L = l[N], w = inferInterface(N, M), O = (k = C.current(w)) == null ? void 0 : k.default, j = (L == null ? void 0 : L.uiSchema) || (O == null ? void 0 : O.uiSchema) || {};
|
|
53800
53808
|
R.set(N, {
|
|
53801
53809
|
name: N,
|
|
53802
53810
|
interface: (L == null ? void 0 : L.interface) || w,
|
|
@@ -53807,13 +53815,13 @@ const AsyncDataProvider = (e) => {
|
|
|
53807
53815
|
}, j)
|
|
53808
53816
|
});
|
|
53809
53817
|
}) : Object.entries(l || {}).forEach(
|
|
53810
|
-
([N,
|
|
53818
|
+
([N, M]) => R.set(N, P(x({
|
|
53811
53819
|
name: N,
|
|
53812
53820
|
type: "string"
|
|
53813
|
-
},
|
|
53821
|
+
}, M), {
|
|
53814
53822
|
uiSchema: x({
|
|
53815
53823
|
title: N
|
|
53816
|
-
}, (
|
|
53824
|
+
}, (M == null ? void 0 : M.uiSchema) || {})
|
|
53817
53825
|
}))
|
|
53818
53826
|
)), (B = c.value) != null && B.length && c.value.forEach((N) => {
|
|
53819
53827
|
R.has(N.name) && R.set(N.name, N);
|
|
@@ -53834,9 +53842,9 @@ const AsyncDataProvider = (e) => {
|
|
|
53834
53842
|
const B = [...t];
|
|
53835
53843
|
B.splice(D, 1, R), o(B), c.setValue(
|
|
53836
53844
|
B.map((N) => {
|
|
53837
|
-
var
|
|
53845
|
+
var M, L, w;
|
|
53838
53846
|
return P(x({}, N), {
|
|
53839
|
-
source: typeof N.source == "string" ? N.source : ((w = (L = (
|
|
53847
|
+
source: typeof N.source == "string" ? N.source : ((w = (L = (M = N.source) == null ? void 0 : M.filter) == null ? void 0 : L.call(M, Boolean)) == null ? void 0 : w.join(".")) || null
|
|
53840
53848
|
});
|
|
53841
53849
|
})
|
|
53842
53850
|
);
|
|
@@ -53861,11 +53869,11 @@ const AsyncDataProvider = (e) => {
|
|
|
53861
53869
|
allowClear: !0,
|
|
53862
53870
|
options: d(f),
|
|
53863
53871
|
placeholder: e("Select field source"),
|
|
53864
|
-
onChange: (
|
|
53865
|
-
let L = l[
|
|
53866
|
-
L != null && L.interface || (L = m((
|
|
53872
|
+
onChange: (M) => {
|
|
53873
|
+
let L = l[M == null ? void 0 : M[1]];
|
|
53874
|
+
L != null && L.interface || (L = m((M == null ? void 0 : M.join(".")) || "")), S(
|
|
53867
53875
|
P(x({}, N), {
|
|
53868
|
-
source:
|
|
53876
|
+
source: M,
|
|
53869
53877
|
interface: L == null ? void 0 : L.interface,
|
|
53870
53878
|
type: L == null ? void 0 : L.type,
|
|
53871
53879
|
uiSchema: L == null ? void 0 : L.uiSchema
|
|
@@ -53883,22 +53891,22 @@ const AsyncDataProvider = (e) => {
|
|
|
53883
53891
|
key: "interface",
|
|
53884
53892
|
width: 150,
|
|
53885
53893
|
render: (R, D, B) => {
|
|
53886
|
-
var
|
|
53894
|
+
var M;
|
|
53887
53895
|
const N = t[B];
|
|
53888
|
-
return N.source ? /* @__PURE__ */ jsx(Tag, { children: d((
|
|
53896
|
+
return N.source ? /* @__PURE__ */ jsx(Tag, { children: d((M = p(R)) == null ? void 0 : M.title) || R }) : /* @__PURE__ */ jsx(
|
|
53889
53897
|
Select$1,
|
|
53890
53898
|
{
|
|
53891
53899
|
defaultValue: N.interface || "input",
|
|
53892
53900
|
style: { width: "100%" },
|
|
53893
53901
|
popupMatchSelectWidth: !1,
|
|
53894
53902
|
onChange: (L) => {
|
|
53895
|
-
var O, j, k,
|
|
53903
|
+
var O, j, k, $, q;
|
|
53896
53904
|
const w = p(L);
|
|
53897
53905
|
S(
|
|
53898
53906
|
P(x({}, N), {
|
|
53899
53907
|
interface: L || null,
|
|
53900
53908
|
uiSchema: P(x({}, (O = w == null ? void 0 : w.default) == null ? void 0 : O.uiSchema), {
|
|
53901
|
-
title: ((k = (j = w == null ? void 0 : w.default) == null ? void 0 : j.uiSchema) == null ? void 0 : k.title) || ((
|
|
53909
|
+
title: ((k = (j = w == null ? void 0 : w.default) == null ? void 0 : j.uiSchema) == null ? void 0 : k.title) || (($ = N.uiSchema) == null ? void 0 : $.title)
|
|
53902
53910
|
}),
|
|
53903
53911
|
type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
|
|
53904
53912
|
}),
|
|
@@ -53917,12 +53925,12 @@ const AsyncDataProvider = (e) => {
|
|
|
53917
53925
|
key: "title",
|
|
53918
53926
|
width: 180,
|
|
53919
53927
|
render: (R, D, B) => {
|
|
53920
|
-
var
|
|
53928
|
+
var M, L;
|
|
53921
53929
|
const N = t[B];
|
|
53922
53930
|
return /* @__PURE__ */ jsx(
|
|
53923
53931
|
Input$3,
|
|
53924
53932
|
{
|
|
53925
|
-
value: ((
|
|
53933
|
+
value: ((M = N.uiSchema) == null ? void 0 : M.title) || R,
|
|
53926
53934
|
defaultValue: ((L = N.uiSchema) == null ? void 0 : L.title) !== void 0 ? N.uiSchema.title : N == null ? void 0 : N.name,
|
|
53927
53935
|
onChange: (w) => S(P(x({}, N), { uiSchema: P(x({}, N == null ? void 0 : N.uiSchema), { title: w.target.value }) }), B)
|
|
53928
53936
|
}
|
|
@@ -59936,8 +59944,8 @@ const RolesResourcesActions = connect((e) => {
|
|
|
59936
59944
|
name: I.name
|
|
59937
59945
|
}, N = B.fields || [];
|
|
59938
59946
|
if (R) {
|
|
59939
|
-
const
|
|
59940
|
-
N.splice(
|
|
59947
|
+
const M = N.indexOf(D.name);
|
|
59948
|
+
N.splice(M, 1);
|
|
59941
59949
|
} else
|
|
59942
59950
|
N.push(D.name);
|
|
59943
59951
|
B.fields = N, p[I.name] = B, t(Object.values(p));
|
|
@@ -62429,16 +62437,16 @@ const ActionInitializerItem = (e) => {
|
|
|
62429
62437
|
), I = C || (a == null ? void 0 : a.targetKey) || "id", T = b || ((U = (G = i["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, R = {
|
|
62430
62438
|
title: T || I,
|
|
62431
62439
|
key: I
|
|
62432
|
-
}, [D, B] = useState([]), [N,
|
|
62440
|
+
}, [D, B] = useState([]), [N, M] = useState(i.default || []), [L, w] = useState(!0), O = useLabelUiSchema(a, (R == null ? void 0 : R.title) || "label");
|
|
62433
62441
|
if (useEffect(() => {
|
|
62434
|
-
i.default && (d(i.default),
|
|
62442
|
+
i.default && (d(i.default), M(i.default));
|
|
62435
62443
|
}, [i.default, d]), !a)
|
|
62436
62444
|
return null;
|
|
62437
62445
|
const j = (J) => {
|
|
62438
62446
|
B(J), w(!1);
|
|
62439
62447
|
}, k = (J) => {
|
|
62440
|
-
|
|
62441
|
-
},
|
|
62448
|
+
M(J), d(J), p == null || p(J);
|
|
62449
|
+
}, $ = (J) => {
|
|
62442
62450
|
var X;
|
|
62443
62451
|
const K = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
|
|
62444
62452
|
(y || K) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
@@ -62482,7 +62490,7 @@ const ActionInitializerItem = (e) => {
|
|
|
62482
62490
|
style: {
|
|
62483
62491
|
flex: "0 0 auto"
|
|
62484
62492
|
},
|
|
62485
|
-
children: y ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick:
|
|
62493
|
+
children: y ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: $ }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: $ })
|
|
62486
62494
|
}
|
|
62487
62495
|
)
|
|
62488
62496
|
]
|
|
@@ -62893,7 +62901,7 @@ function useMenuSearch({
|
|
|
62893
62901
|
})) : g, [e, c, u, g]);
|
|
62894
62902
|
}
|
|
62895
62903
|
const DataBlockInitializer = (e) => {
|
|
62896
|
-
var k,
|
|
62904
|
+
var k, $;
|
|
62897
62905
|
const {
|
|
62898
62906
|
templateWrap: t,
|
|
62899
62907
|
onCreateBlockSchema: o,
|
|
@@ -62957,7 +62965,7 @@ const DataBlockInitializer = (e) => {
|
|
|
62957
62965
|
onClick: D,
|
|
62958
62966
|
currentText: b,
|
|
62959
62967
|
otherText: S
|
|
62960
|
-
}), N = useGetSchemaInitializerMenuItems(D),
|
|
62968
|
+
}), N = useGetSchemaInitializerMenuItems(D), M = useMemo(() => N(B, a), [N, B, a]), [L, w] = useState([]), O = useMenuSearch({ data: M, openKeys: L, hideSearch: u }), j = useMemo(() => {
|
|
62961
62969
|
let q = O.filter((E) => E.key !== "search" && E.key !== "empty");
|
|
62962
62970
|
return p && q.length === 1 ? q = q[0].children : q = O, [
|
|
62963
62971
|
{
|
|
@@ -62971,7 +62979,7 @@ const DataBlockInitializer = (e) => {
|
|
|
62971
62979
|
}
|
|
62972
62980
|
];
|
|
62973
62981
|
}, [O, p, a, I, i, r, D, e]);
|
|
62974
|
-
return
|
|
62982
|
+
return M.length > 1 || M.length === 1 && (($ = (k = M[0]) == null ? void 0 : k.children) == null ? void 0 : $.length) > 0 || y ? /* @__PURE__ */ jsx(
|
|
62975
62983
|
SchemaInitializerMenu,
|
|
62976
62984
|
{
|
|
62977
62985
|
onOpenChange: (q) => {
|