@nocobase/client 1.5.18 → 1.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/application/Application.d.ts +2 -0
- package/es/index.mjs +432 -418
- package/es/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
- package/lib/index.js +52 -52
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -5946,8 +5946,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
|
|
|
5946
5946
|
if (D > 2)
|
|
5947
5947
|
return w;
|
|
5948
5948
|
if (L != null && L.length && (w.children = L), z) {
|
|
5949
|
-
const T = o(k.target),
|
|
5950
|
-
w.children = w.children || [], w.children.push(...
|
|
5949
|
+
const T = o(k.target), O = A(T, D + 1).filter(Boolean);
|
|
5950
|
+
w.children = w.children || [], w.children.push(...O);
|
|
5951
5951
|
}
|
|
5952
5952
|
return w;
|
|
5953
5953
|
}
|
|
@@ -10500,7 +10500,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10500
10500
|
"onClickRow",
|
|
10501
10501
|
"value"
|
|
10502
10502
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, A = useCollection(), k = ((ce = v == null ? void 0 : v.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: j } = k, z = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10503
|
-
})), L = usePaginationProps$3(n, i, e), M = useTableColumns$2(S, L), [w, B] = useState(() => D ? j : []), [$, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [
|
|
10503
|
+
})), L = usePaginationProps$3(n, i, e), M = useTableColumns$2(S, L), [w, B] = useState(() => D ? j : []), [$, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [O, N] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10504
10504
|
& > td {
|
|
10505
10505
|
background-color: ${t.controlItemBgActive} !important;
|
|
10506
10506
|
}
|
|
@@ -10509,14 +10509,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10509
10509
|
}
|
|
10510
10510
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (re, ee) => ({
|
|
10511
10511
|
onClick: (ne) => {
|
|
10512
|
-
isPortalInBody(ne.target) || C(re,
|
|
10512
|
+
isPortalInBody(ne.target) || C(re, N, O);
|
|
10513
10513
|
},
|
|
10514
10514
|
rowIndex: ee,
|
|
10515
10515
|
record: re
|
|
10516
10516
|
}) : (re, ee) => ({
|
|
10517
10517
|
rowIndex: ee,
|
|
10518
10518
|
record: re
|
|
10519
|
-
}), [C,
|
|
10519
|
+
}), [C, O]);
|
|
10520
10520
|
useDeepCompareEffect(() => {
|
|
10521
10521
|
const re = D ? j : [];
|
|
10522
10522
|
_.isEqual(re, w) || B(re);
|
|
@@ -10638,8 +10638,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10638
10638
|
x: "max-content",
|
|
10639
10639
|
y: ie
|
|
10640
10640
|
}), [ie, J]), xe = useCallback(
|
|
10641
|
-
(re) =>
|
|
10642
|
-
[
|
|
10641
|
+
(re) => O.includes(re[m]) ? U : "",
|
|
10642
|
+
[O, U, JSON.stringify(m)]
|
|
10643
10643
|
), pe = useCallback(
|
|
10644
10644
|
(re, ee) => {
|
|
10645
10645
|
const ne = re ? [...w, ee[A.getPrimaryKey()]] : w.filter((se) => ee[A.getPrimaryKey()] !== se);
|
|
@@ -10884,14 +10884,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10884
10884
|
popupUid: B,
|
|
10885
10885
|
recordData: $,
|
|
10886
10886
|
sourceId: T,
|
|
10887
|
-
collection:
|
|
10888
|
-
puid:
|
|
10887
|
+
collection: O,
|
|
10888
|
+
puid: N
|
|
10889
10889
|
}) => {
|
|
10890
10890
|
const V = c.getFilterByTK(u || l, $);
|
|
10891
10891
|
return getPopupPathFromParams({
|
|
10892
10892
|
popupuid: B,
|
|
10893
|
-
puid:
|
|
10894
|
-
collection:
|
|
10893
|
+
puid: N,
|
|
10894
|
+
collection: O,
|
|
10895
10895
|
filterbytk: V,
|
|
10896
10896
|
sourceid: T,
|
|
10897
10897
|
tab: w
|
|
@@ -10911,11 +10911,11 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10911
10911
|
parentRecordData: B,
|
|
10912
10912
|
collectionNameUsedInURL: $,
|
|
10913
10913
|
popupUidUsedInURL: T,
|
|
10914
|
-
customActionSchema:
|
|
10914
|
+
customActionSchema: O
|
|
10915
10915
|
} = {}) => {
|
|
10916
10916
|
if (!f())
|
|
10917
10917
|
return A == null ? void 0 : A(!0);
|
|
10918
|
-
const
|
|
10918
|
+
const N = O || o, V = N == null ? void 0 : N["x-uid"], E = y(B);
|
|
10919
10919
|
w = w || (i == null ? void 0 : i.data);
|
|
10920
10920
|
const G = R({
|
|
10921
10921
|
popupUid: V,
|
|
@@ -10926,7 +10926,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10926
10926
|
});
|
|
10927
10927
|
let U = n.pathname;
|
|
10928
10928
|
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
|
|
10929
|
-
schema:
|
|
10929
|
+
schema: N,
|
|
10930
10930
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
10931
10931
|
parentRecord: B ? new CollectionRecord({ isNew: !1, data: B }) : a,
|
|
10932
10932
|
service: g(),
|
|
@@ -10935,7 +10935,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10935
10935
|
association: u,
|
|
10936
10936
|
sourceId: E,
|
|
10937
10937
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
10938
|
-
}), b(k(),
|
|
10938
|
+
}), b(k(), O), N.properties) {
|
|
10939
10939
|
const H = h + 1;
|
|
10940
10940
|
if (getPopupLayerState(H))
|
|
10941
10941
|
return;
|
|
@@ -10943,7 +10943,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10943
10943
|
} else
|
|
10944
10944
|
console.error(
|
|
10945
10945
|
`[NocoBase] The popup schema is invalid, please check the schema:
|
|
10946
|
-
${JSON.stringify(
|
|
10946
|
+
${JSON.stringify(N, null, 2)}`
|
|
10947
10947
|
);
|
|
10948
10948
|
},
|
|
10949
10949
|
[
|
|
@@ -12612,9 +12612,9 @@ const useTableBlockProps = () => {
|
|
|
12612
12612
|
),
|
|
12613
12613
|
onChange: useCallback(
|
|
12614
12614
|
({ current: S, pageSize: y }, v, F) => {
|
|
12615
|
-
var j, z, L, M, w, B, $, T,
|
|
12616
|
-
const A = (L = (z = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : z.params) == null ? void 0 : L.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : A || i.dragSortBy, k = y || ((B = (w = (M = t.parent) == null ? void 0 : M["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : B.pageSize), D = P(x({}, (
|
|
12617
|
-
R && (D.sort = R), (
|
|
12615
|
+
var j, z, L, M, w, B, $, T, O, N;
|
|
12616
|
+
const A = (L = (z = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : z.params) == null ? void 0 : L.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : A || i.dragSortBy, k = y || ((B = (w = (M = t.parent) == null ? void 0 : M["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : B.pageSize), D = P(x({}, (O = (T = ($ = a.current) == null ? void 0 : $.service) == null ? void 0 : T.params) == null ? void 0 : O[0]), { page: S || 1, pageSize: k });
|
|
12617
|
+
R && (D.sort = R), (N = a.current) == null || N.service.run(D);
|
|
12618
12618
|
},
|
|
12619
12619
|
[t.parent]
|
|
12620
12620
|
),
|
|
@@ -12627,11 +12627,11 @@ const useTableBlockProps = () => {
|
|
|
12627
12627
|
}
|
|
12628
12628
|
const k = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
12629
12629
|
R.forEach((D) => {
|
|
12630
|
-
var $, T,
|
|
12631
|
-
const j = F.find((
|
|
12630
|
+
var $, T, O;
|
|
12631
|
+
const j = F.find((N) => N.uid === D.uid);
|
|
12632
12632
|
if (!j)
|
|
12633
12633
|
return;
|
|
12634
|
-
const z = getSourceKey(k, j.field) || i.rowKey || "id", L = [S[z]], M = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((
|
|
12634
|
+
const z = getSourceKey(k, j.field) || i.rowKey || "id", L = [S[z]], M = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((O = (T = D.service.params) == null ? void 0 : T[1]) == null ? void 0 : O.filters) || {};
|
|
12635
12635
|
if (v.includes(S[i.rowKey])) {
|
|
12636
12636
|
if (D.dataLoadingMode === "manual")
|
|
12637
12637
|
return D.clearData();
|
|
@@ -12647,7 +12647,7 @@ const useTableBlockProps = () => {
|
|
|
12647
12647
|
]
|
|
12648
12648
|
};
|
|
12649
12649
|
const B = mergeFilter([
|
|
12650
|
-
...Object.values(w).map((
|
|
12650
|
+
...Object.values(w).map((N) => removeNullCondition(N)),
|
|
12651
12651
|
D.defaultFilter
|
|
12652
12652
|
]);
|
|
12653
12653
|
return D.doFilter(
|
|
@@ -13113,10 +13113,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
13113
13113
|
var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
13114
13114
|
const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent$1(n, "CollectionField"), i = o(r == null ? void 0 : r["x-collection-field"]);
|
|
13115
13115
|
return useEffect(() => {
|
|
13116
|
-
var R, k, D, j, z, L, M, w, B, $, T,
|
|
13116
|
+
var R, k, D, j, z, L, M, w, B, $, T, O, N;
|
|
13117
13117
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
13118
13118
|
const V = (D = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : D.data.map((E) => E);
|
|
13119
|
-
e.value = V, (j = e == null ? void 0 : e.setInitialValue) == null || j.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (M = (L = (z = t == null ? void 0 : t.service) == null ? void 0 : z.data) == null ? void 0 : L.meta) == null ? void 0 : M.pageSize, e.componentProps.pagination.total = ($ = (B = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : B.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (
|
|
13119
|
+
e.value = V, (j = e == null ? void 0 : e.setInitialValue) == null || j.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (M = (L = (z = t == null ? void 0 : t.service) == null ? void 0 : z.data) == null ? void 0 : L.meta) == null ? void 0 : M.pageSize, e.componentProps.pagination.total = ($ = (B = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : B.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (N = (O = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : O.meta) == null ? void 0 : N.page;
|
|
13120
13120
|
}
|
|
13121
13121
|
}, [
|
|
13122
13122
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -15175,7 +15175,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15175
15175
|
})
|
|
15176
15176
|
)
|
|
15177
15177
|
};
|
|
15178
|
-
}, [y, (H = B == null ? void 0 : B.cols) == null ? void 0 : H.length]),
|
|
15178
|
+
}, [y, (H = B == null ? void 0 : B.cols) == null ? void 0 : H.length]), O = useMemo(() => u === !1 || f === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": y("drag-handler") }) }), [u, y, f]), N = useMemo(() => {
|
|
15179
15179
|
var K;
|
|
15180
15180
|
if (o === !1)
|
|
15181
15181
|
return null;
|
|
@@ -15222,8 +15222,8 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15222
15222
|
j[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${S("Reference template")}: ${`${j[1]}` || S("Untitled")}` })
|
|
15223
15223
|
] }) }),
|
|
15224
15224
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
15225
|
-
|
|
15226
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: D, children:
|
|
15225
|
+
O,
|
|
15226
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: D, children: N }),
|
|
15227
15227
|
V
|
|
15228
15228
|
] }) })
|
|
15229
15229
|
]
|
|
@@ -16619,7 +16619,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16619
16619
|
"onMouseEnter",
|
|
16620
16620
|
"refreshDataBlockRequest",
|
|
16621
16621
|
"confirmTitle"
|
|
16622
|
-
]), v = useDesigner(), F = useField(), A = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((G = A["x-component-props"]) == null ? void 0 : G.confirm) || g, j = useMemo(() => (A == null ? void 0 : A["x-linkage-rules"]) || [], [A == null ? void 0 : A["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, M = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: k, readPretty: !1 } }), { visibleWithURL: B, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: T } = useActionContext(), { getAriaLabel:
|
|
16622
|
+
]), v = useDesigner(), F = useField(), A = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((G = A["x-component-props"]) == null ? void 0 : G.confirm) || g, j = useMemo(() => (A == null ? void 0 : A["x-linkage-rules"]) || [], [A == null ? void 0 : A["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, M = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: k, readPretty: !1 } }), { visibleWithURL: B, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: T } = useActionContext(), { getAriaLabel: O } = useGetAriaLabelOfAction(l), N = useCollectionParentRecordData();
|
|
16623
16623
|
useEffect(() => {
|
|
16624
16624
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, j.filter((U) => !U.disabled).forEach((U) => {
|
|
16625
16625
|
var H;
|
|
@@ -16667,8 +16667,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16667
16667
|
visibleWithURL: B,
|
|
16668
16668
|
setVisibleWithURL: $,
|
|
16669
16669
|
setSubmitted: T,
|
|
16670
|
-
getAriaLabel:
|
|
16671
|
-
parentRecordData:
|
|
16670
|
+
getAriaLabel: O,
|
|
16671
|
+
parentRecordData: N,
|
|
16672
16672
|
actionCallback: h
|
|
16673
16673
|
}, y)
|
|
16674
16674
|
);
|
|
@@ -16732,7 +16732,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16732
16732
|
"setSubmitted",
|
|
16733
16733
|
"getAriaLabel",
|
|
16734
16734
|
"parentRecordData"
|
|
16735
|
-
]), [w, B] = useState(!1), { wrapSSR: $, componentCls: T, hashId:
|
|
16735
|
+
]), [w, B] = useState(!1), { wrapSSR: $, componentCls: T, hashId: O } = useStyles$e(), [N, V] = useState(!1), E = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, U = (fe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : fe.openSize, H = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), J = useACLActionParamsContext(), { run: X, element: Q, disabled: Z } = (A == null ? void 0 : A(R)) || {}, oe = Y.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || Z, te = useMemo(() => {
|
|
16736
16736
|
var ce;
|
|
16737
16737
|
return P(x({}, v), {
|
|
16738
16738
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !J) && 0.1,
|
|
@@ -16750,7 +16750,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16750
16750
|
tarComponent: u,
|
|
16751
16751
|
designerProps: E,
|
|
16752
16752
|
componentCls: T,
|
|
16753
|
-
hashId:
|
|
16753
|
+
hashId: O,
|
|
16754
16754
|
className: d,
|
|
16755
16755
|
others: M,
|
|
16756
16756
|
getAriaLabel: z,
|
|
@@ -16778,7 +16778,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16778
16778
|
button: RenderButton(ie),
|
|
16779
16779
|
visible: w || k,
|
|
16780
16780
|
setVisible: ae,
|
|
16781
|
-
formValueChanged:
|
|
16781
|
+
formValueChanged: N,
|
|
16782
16782
|
setFormValueChanged: V,
|
|
16783
16783
|
openMode: G,
|
|
16784
16784
|
openSize: U,
|
|
@@ -16868,9 +16868,9 @@ const RenderButton = ({
|
|
|
16868
16868
|
const { getDataBlockRequest: z } = useDataBlockRequestGetter(), { t: L } = useTranslation(), { isPopupVisibleControlledByURL: M } = usePopupSettings(), { openPopup: w } = usePopupUtils(), B = useRef(null);
|
|
16869
16869
|
B.current = w;
|
|
16870
16870
|
const $ = useCallback(
|
|
16871
|
-
(T,
|
|
16872
|
-
if (!(
|
|
16873
|
-
const
|
|
16871
|
+
(T, O = !0) => {
|
|
16872
|
+
if (!(O && isPortalInBody(T.target)) && (T.preventDefault(), T.stopPropagation(), !i && n)) {
|
|
16873
|
+
const N = () => {
|
|
16874
16874
|
b ? b(T, () => {
|
|
16875
16875
|
var V, E;
|
|
16876
16876
|
S !== !1 && (k == null || k(!0), (E = (V = z()) == null ? void 0 : V.refresh) == null || E.call(V));
|
|
@@ -16879,8 +16879,8 @@ const RenderButton = ({
|
|
|
16879
16879
|
(A == null ? void 0 : A.enable) !== !1 && (A != null && A.content) ? R.confirm({
|
|
16880
16880
|
title: L(A.title, { title: D || j || (t == null ? void 0 : t.title) }),
|
|
16881
16881
|
content: L(A.content, { title: D || j || (t == null ? void 0 : t.title) }),
|
|
16882
|
-
onOk:
|
|
16883
|
-
}) :
|
|
16882
|
+
onOk: N
|
|
16883
|
+
}) : N();
|
|
16884
16884
|
}
|
|
16885
16885
|
},
|
|
16886
16886
|
[
|
|
@@ -17933,19 +17933,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
17933
17933
|
config: {}
|
|
17934
17934
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
17935
17935
|
function C(T) {
|
|
17936
|
-
var
|
|
17937
|
-
for (
|
|
17938
|
-
if (
|
|
17939
|
-
T.splice(
|
|
17940
|
-
else if (
|
|
17941
|
-
if (
|
|
17936
|
+
var O, N;
|
|
17937
|
+
for (O = 0; O < T.length; O++)
|
|
17938
|
+
if (N = T[O], N === ".")
|
|
17939
|
+
T.splice(O, 1), O -= 1;
|
|
17940
|
+
else if (N === "..") {
|
|
17941
|
+
if (O === 0 || O === 1 && T[2] === ".." || T[O - 1] === "..")
|
|
17942
17942
|
continue;
|
|
17943
|
-
|
|
17943
|
+
O > 0 && (T.splice(O - 1, 2), O -= 2);
|
|
17944
17944
|
}
|
|
17945
17945
|
}
|
|
17946
|
-
function b(T,
|
|
17947
|
-
var V, E, G, U, H, K, Y, J, X, Q, Z, oe, te =
|
|
17948
|
-
if (T && (T = T.split("/"), Y = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[Y]) && (T[Y] = T[Y].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), T = oe.concat(T)), C(T), T = T.join("/")),
|
|
17946
|
+
function b(T, O, N) {
|
|
17947
|
+
var V, E, G, U, H, K, Y, J, X, Q, Z, oe, te = O && O.split("/"), ie = a.map, ae = ie && ie["*"];
|
|
17948
|
+
if (T && (T = T.split("/"), Y = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[Y]) && (T[Y] = T[Y].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), T = oe.concat(T)), C(T), T = T.join("/")), N && ie && (te || ae)) {
|
|
17949
17949
|
G = T.split("/");
|
|
17950
17950
|
e:
|
|
17951
17951
|
for (U = G.length; U > 0; U -= 1) {
|
|
@@ -17963,30 +17963,30 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
17963
17963
|
return V = getOwn(a.pkgs, T), V || T;
|
|
17964
17964
|
}
|
|
17965
17965
|
function S(T) {
|
|
17966
|
-
isBrowser && each(scripts(), function(
|
|
17967
|
-
if (
|
|
17968
|
-
return
|
|
17966
|
+
isBrowser && each(scripts(), function(O) {
|
|
17967
|
+
if (O.getAttribute("data-requiremodule") === T && O.getAttribute("data-requirecontext") === o.contextName)
|
|
17968
|
+
return O.parentNode.removeChild(O), !0;
|
|
17969
17969
|
});
|
|
17970
17970
|
}
|
|
17971
17971
|
function y(T) {
|
|
17972
|
-
var
|
|
17973
|
-
if (
|
|
17974
|
-
return
|
|
17972
|
+
var O = getOwn(a.paths, T);
|
|
17973
|
+
if (O && isArray(O) && O.length > 1)
|
|
17974
|
+
return O.shift(), o.require.undef(T), o.makeRequire(null, {
|
|
17975
17975
|
skipMap: !0
|
|
17976
17976
|
})([T]), !0;
|
|
17977
17977
|
}
|
|
17978
17978
|
function v(T) {
|
|
17979
|
-
var
|
|
17980
|
-
return
|
|
17979
|
+
var O, N = T ? T.indexOf("!") : -1;
|
|
17980
|
+
return N > -1 && (O = T.substring(0, N), T = T.substring(N + 1, T.length)), [O, T];
|
|
17981
17981
|
}
|
|
17982
|
-
function F(T,
|
|
17983
|
-
var E, G, U, H, K = null, Y =
|
|
17984
|
-
return T || (X = !1, T = "_@r" + (g += 1)), H = v(T), K = H[0], T = H[1], K && (K = b(K, Y, V), G = getOwn(p, K)), T && (K ?
|
|
17982
|
+
function F(T, O, N, V) {
|
|
17983
|
+
var E, G, U, H, K = null, Y = O ? O.name : null, J = T, X = !0, Q = "";
|
|
17984
|
+
return T || (X = !1, T = "_@r" + (g += 1)), H = v(T), K = H[0], T = H[1], K && (K = b(K, Y, V), G = getOwn(p, K)), T && (K ? N ? Q = T : G && G.normalize ? Q = G.normalize(T, function(Z) {
|
|
17985
17985
|
return b(Z, Y, V);
|
|
17986
|
-
}) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q), K = H[0], Q = H[1],
|
|
17986
|
+
}) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q), K = H[0], Q = H[1], N = !0, E = o.nameToUrl(Q))), U = K && !G && !N ? "_unnormalized" + (f += 1) : "", {
|
|
17987
17987
|
prefix: K,
|
|
17988
17988
|
name: Q,
|
|
17989
|
-
parentMap:
|
|
17989
|
+
parentMap: O,
|
|
17990
17990
|
unnormalized: !!U,
|
|
17991
17991
|
url: E,
|
|
17992
17992
|
originalName: J,
|
|
@@ -17995,24 +17995,24 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
17995
17995
|
};
|
|
17996
17996
|
}
|
|
17997
17997
|
function A(T) {
|
|
17998
|
-
var
|
|
17999
|
-
return
|
|
17998
|
+
var O = T.id, N = getOwn(l, O);
|
|
17999
|
+
return N || (N = l[O] = new o.Module(T)), N;
|
|
18000
18000
|
}
|
|
18001
|
-
function R(T,
|
|
18001
|
+
function R(T, O, N) {
|
|
18002
18002
|
var V = T.id, E = getOwn(l, V);
|
|
18003
|
-
hasProp(p, V) && (!E || E.defineEmitComplete) ?
|
|
18003
|
+
hasProp(p, V) && (!E || E.defineEmitComplete) ? O === "defined" && N(p[V]) : (E = A(T), E.error && O === "error" ? N(E.error) : E.on(O, N));
|
|
18004
18004
|
}
|
|
18005
|
-
function k(T,
|
|
18006
|
-
var
|
|
18007
|
-
|
|
18005
|
+
function k(T, O) {
|
|
18006
|
+
var N = T.requireModules, V = !1;
|
|
18007
|
+
O ? O(T) : (each(N, function(E) {
|
|
18008
18008
|
var G = getOwn(l, E);
|
|
18009
18009
|
G && (G.error = T, G.events.error && (V = !0, G.emit("error", T)));
|
|
18010
18010
|
}), V || req.onError(T));
|
|
18011
18011
|
}
|
|
18012
18012
|
function D() {
|
|
18013
18013
|
globalDefQueue.length && (each(globalDefQueue, function(T) {
|
|
18014
|
-
var
|
|
18015
|
-
typeof
|
|
18014
|
+
var O = T[0];
|
|
18015
|
+
typeof O == "string" && (o.defQueueMap[O] = !0), d.push(T);
|
|
18016
18016
|
}), globalDefQueue = []);
|
|
18017
18017
|
}
|
|
18018
18018
|
r = {
|
|
@@ -18037,21 +18037,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18037
18037
|
function j(T) {
|
|
18038
18038
|
delete l[T], delete c[T];
|
|
18039
18039
|
}
|
|
18040
|
-
function z(T,
|
|
18040
|
+
function z(T, O, N) {
|
|
18041
18041
|
var V = T.map.id;
|
|
18042
|
-
T.error ? T.emit("error", T.error) : (
|
|
18042
|
+
T.error ? T.emit("error", T.error) : (O[V] = !0, each(T.depMaps, function(E, G) {
|
|
18043
18043
|
var U = E.id, H = getOwn(l, U);
|
|
18044
|
-
H && !T.depMatched[G] && !
|
|
18045
|
-
}),
|
|
18044
|
+
H && !T.depMatched[G] && !N[U] && (getOwn(O, U) ? (T.defineDep(G, p[U]), T.check()) : z(H, O, N));
|
|
18045
|
+
}), N[V] = !0);
|
|
18046
18046
|
}
|
|
18047
18047
|
function L() {
|
|
18048
|
-
var T,
|
|
18048
|
+
var T, O, N = a.waitSeconds * 1e3, V = N && o.startTime + N < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
|
|
18049
18049
|
if (!t) {
|
|
18050
18050
|
if (t = !0, eachProp(c, function(K) {
|
|
18051
18051
|
var Y = K.map, J = Y.id;
|
|
18052
18052
|
if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
|
|
18053
18053
|
if (!K.inited && V)
|
|
18054
|
-
y(J) ? (
|
|
18054
|
+
y(J) ? (O = !0, U = !0) : (E.push(J), S(J));
|
|
18055
18055
|
else if (!K.inited && K.fetched && Y.isDefine && (U = !0, !Y.prefix))
|
|
18056
18056
|
return H = !1;
|
|
18057
18057
|
}
|
|
@@ -18059,7 +18059,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18059
18059
|
return T = makeError("timeout", "Load timeout for modules: " + E, null, E), T.contextName = o.contextName, k(T);
|
|
18060
18060
|
H && each(G, function(K) {
|
|
18061
18061
|
z(K, {}, {});
|
|
18062
|
-
}), (!V ||
|
|
18062
|
+
}), (!V || O) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
18063
18063
|
i = 0, L();
|
|
18064
18064
|
}, 50)), t = !1;
|
|
18065
18065
|
}
|
|
@@ -18067,13 +18067,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18067
18067
|
n = function(T) {
|
|
18068
18068
|
this.events = getOwn(u, T.id) || {}, this.map = T, this.shim = getOwn(a.shim, T.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
18069
18069
|
}, n.prototype = {
|
|
18070
|
-
init: function(T,
|
|
18071
|
-
V = V || {}, !this.inited && (this.factory =
|
|
18070
|
+
init: function(T, O, N, V) {
|
|
18071
|
+
V = V || {}, !this.inited && (this.factory = O, N ? this.on("error", N) : this.events.error && (N = bind(this, function(E) {
|
|
18072
18072
|
this.emit("error", E);
|
|
18073
|
-
})), this.depMaps = T && T.slice(0), this.errback =
|
|
18073
|
+
})), this.depMaps = T && T.slice(0), this.errback = N, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
|
|
18074
18074
|
},
|
|
18075
|
-
defineDep: function(T,
|
|
18076
|
-
this.depMatched[T] || (this.depMatched[T] = !0, this.depCount -= 1, this.depExports[T] =
|
|
18075
|
+
defineDep: function(T, O) {
|
|
18076
|
+
this.depMatched[T] || (this.depMatched[T] = !0, this.depCount -= 1, this.depExports[T] = O);
|
|
18077
18077
|
},
|
|
18078
18078
|
fetch: function() {
|
|
18079
18079
|
if (!this.fetched) {
|
|
@@ -18099,9 +18099,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18099
18099
|
*/
|
|
18100
18100
|
check: function() {
|
|
18101
18101
|
if (!(!this.enabled || this.enabling)) {
|
|
18102
|
-
var T,
|
|
18102
|
+
var T, O, N = this.map.id, V = this.depExports, E = this.exports, G = this.factory;
|
|
18103
18103
|
if (!this.inited)
|
|
18104
|
-
hasProp(o.defQueueMap,
|
|
18104
|
+
hasProp(o.defQueueMap, N) || this.fetch();
|
|
18105
18105
|
else if (this.error)
|
|
18106
18106
|
this.emit("error", this.error);
|
|
18107
18107
|
else if (!this.defining) {
|
|
@@ -18109,31 +18109,31 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18109
18109
|
if (isFunction(G)) {
|
|
18110
18110
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
18111
18111
|
try {
|
|
18112
|
-
E = o.execCb(
|
|
18112
|
+
E = o.execCb(N, G, V, E);
|
|
18113
18113
|
} catch (H) {
|
|
18114
18114
|
T = H;
|
|
18115
18115
|
}
|
|
18116
18116
|
else
|
|
18117
|
-
E = o.execCb(
|
|
18118
|
-
if (this.map.isDefine && E === void 0 && (
|
|
18117
|
+
E = o.execCb(N, G, V, E);
|
|
18118
|
+
if (this.map.isDefine && E === void 0 && (O = this.module, O ? E = O.exports : this.usingExports && (E = this.exports)), T)
|
|
18119
18119
|
return T.requireMap = this.map, T.requireModules = this.map.isDefine ? [this.map.id] : null, T.requireType = this.map.isDefine ? "define" : "require", k(this.error = T);
|
|
18120
18120
|
} else
|
|
18121
18121
|
E = G;
|
|
18122
|
-
if (this.exports = E, this.map.isDefine && !this.ignore && (p[
|
|
18122
|
+
if (this.exports = E, this.map.isDefine && !this.ignore && (p[N] = E, req.onResourceLoad)) {
|
|
18123
18123
|
var U = [];
|
|
18124
18124
|
each(this.depMaps, function(H) {
|
|
18125
18125
|
U.push(H.normalizedMap || H);
|
|
18126
18126
|
}), req.onResourceLoad(o, this.map, U);
|
|
18127
18127
|
}
|
|
18128
|
-
j(
|
|
18128
|
+
j(N), this.defined = !0;
|
|
18129
18129
|
}
|
|
18130
18130
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
18131
18131
|
}
|
|
18132
18132
|
}
|
|
18133
18133
|
},
|
|
18134
18134
|
callPlugin: function() {
|
|
18135
|
-
var T = this.map,
|
|
18136
|
-
this.depMaps.push(
|
|
18135
|
+
var T = this.map, O = T.id, N = F(T.prefix);
|
|
18136
|
+
this.depMaps.push(N), R(N, "defined", bind(this, function(V) {
|
|
18137
18137
|
var E, G, U, H = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, J = o.makeRequire(T.parentMap, {
|
|
18138
18138
|
enableBuildCallback: !0
|
|
18139
18139
|
});
|
|
@@ -18171,72 +18171,72 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18171
18171
|
enabled: !0
|
|
18172
18172
|
});
|
|
18173
18173
|
}), E.error = bind(this, function(X) {
|
|
18174
|
-
this.inited = !0, this.error = X, X.requireModules = [
|
|
18175
|
-
Q.map.id.indexOf(
|
|
18174
|
+
this.inited = !0, this.error = X, X.requireModules = [O], eachProp(l, function(Q) {
|
|
18175
|
+
Q.map.id.indexOf(O + "_unnormalized") === 0 && j(Q.map.id);
|
|
18176
18176
|
}), k(X);
|
|
18177
18177
|
}), E.fromText = bind(this, function(X, Q) {
|
|
18178
18178
|
var Z = T.name, oe = F(Z), te = useInteractive;
|
|
18179
|
-
Q && (X = Q), te && (useInteractive = !1), A(oe), hasProp(a.config,
|
|
18179
|
+
Q && (X = Q), te && (useInteractive = !1), A(oe), hasProp(a.config, O) && (a.config[Z] = a.config[O]);
|
|
18180
18180
|
try {
|
|
18181
18181
|
req.exec(X);
|
|
18182
18182
|
} catch (ie) {
|
|
18183
18183
|
return k(makeError(
|
|
18184
18184
|
"fromtexteval",
|
|
18185
|
-
"fromText eval for " +
|
|
18185
|
+
"fromText eval for " + O + " failed: " + ie,
|
|
18186
18186
|
ie,
|
|
18187
|
-
[
|
|
18187
|
+
[O]
|
|
18188
18188
|
));
|
|
18189
18189
|
}
|
|
18190
18190
|
te && (useInteractive = !0), this.depMaps.push(oe), o.completeLoad(Z), J([Z], E);
|
|
18191
18191
|
}), V.load(T.name, J, E, a);
|
|
18192
|
-
})), o.enable(
|
|
18192
|
+
})), o.enable(N, this), this.pluginMaps[N.id] = N;
|
|
18193
18193
|
},
|
|
18194
18194
|
enable: function() {
|
|
18195
|
-
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(T,
|
|
18196
|
-
var
|
|
18195
|
+
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(T, O) {
|
|
18196
|
+
var N, V, E;
|
|
18197
18197
|
if (typeof T == "string") {
|
|
18198
18198
|
if (T = F(
|
|
18199
18199
|
T,
|
|
18200
18200
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
18201
18201
|
!1,
|
|
18202
18202
|
!this.skipMap
|
|
18203
|
-
), this.depMaps[
|
|
18204
|
-
this.depExports[
|
|
18203
|
+
), this.depMaps[O] = T, E = getOwn(r, T.id), E) {
|
|
18204
|
+
this.depExports[O] = E(this);
|
|
18205
18205
|
return;
|
|
18206
18206
|
}
|
|
18207
18207
|
this.depCount += 1, R(T, "defined", bind(this, function(G) {
|
|
18208
|
-
this.undefed || (this.defineDep(
|
|
18208
|
+
this.undefed || (this.defineDep(O, G), this.check());
|
|
18209
18209
|
})), this.errback ? R(T, "error", bind(this, this.errback)) : this.events.error && R(T, "error", bind(this, function(G) {
|
|
18210
18210
|
this.emit("error", G);
|
|
18211
18211
|
}));
|
|
18212
18212
|
}
|
|
18213
|
-
|
|
18213
|
+
N = T.id, V = l[N], !hasProp(r, N) && V && !V.enabled && o.enable(T, this);
|
|
18214
18214
|
})), eachProp(this.pluginMaps, bind(this, function(T) {
|
|
18215
|
-
var
|
|
18216
|
-
|
|
18215
|
+
var O = getOwn(l, T.id);
|
|
18216
|
+
O && !O.enabled && o.enable(T, this);
|
|
18217
18217
|
})), this.enabling = !1, this.check();
|
|
18218
18218
|
},
|
|
18219
|
-
on: function(T,
|
|
18220
|
-
var
|
|
18221
|
-
|
|
18219
|
+
on: function(T, O) {
|
|
18220
|
+
var N = this.events[T];
|
|
18221
|
+
N || (N = this.events[T] = []), N.push(O);
|
|
18222
18222
|
},
|
|
18223
|
-
emit: function(T,
|
|
18224
|
-
each(this.events[T], function(
|
|
18225
|
-
O
|
|
18223
|
+
emit: function(T, O) {
|
|
18224
|
+
each(this.events[T], function(N) {
|
|
18225
|
+
N(O);
|
|
18226
18226
|
}), T === "error" && delete this.events[T];
|
|
18227
18227
|
}
|
|
18228
18228
|
};
|
|
18229
18229
|
function M(T) {
|
|
18230
18230
|
hasProp(p, T[0]) || A(F(T[0], null, !0)).init(T[1], T[2]);
|
|
18231
18231
|
}
|
|
18232
|
-
function w(T,
|
|
18233
|
-
T.detachEvent && !isOpera ? V && T.detachEvent(V,
|
|
18232
|
+
function w(T, O, N, V) {
|
|
18233
|
+
T.detachEvent && !isOpera ? V && T.detachEvent(V, O) : T.removeEventListener(N, O, !1);
|
|
18234
18234
|
}
|
|
18235
18235
|
function B(T) {
|
|
18236
|
-
var
|
|
18237
|
-
return w(
|
|
18238
|
-
node:
|
|
18239
|
-
id:
|
|
18236
|
+
var O = T.currentTarget || T.srcElement;
|
|
18237
|
+
return w(O, o.onScriptLoad, "load", "onreadystatechange"), w(O, o.onScriptError, "error"), {
|
|
18238
|
+
node: O,
|
|
18239
|
+
id: O && O.getAttribute("data-requiremodule")
|
|
18240
18240
|
};
|
|
18241
18241
|
}
|
|
18242
18242
|
function $() {
|
|
@@ -18266,12 +18266,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18266
18266
|
*/
|
|
18267
18267
|
configure: function(T) {
|
|
18268
18268
|
if (T.baseUrl && T.baseUrl.charAt(T.baseUrl.length - 1) !== "/" && (T.baseUrl += "/"), typeof T.urlArgs == "string") {
|
|
18269
|
-
var
|
|
18269
|
+
var O = T.urlArgs;
|
|
18270
18270
|
T.urlArgs = function(E, G) {
|
|
18271
|
-
return (G.indexOf("?") === -1 ? "?" : "&") +
|
|
18271
|
+
return (G.indexOf("?") === -1 ? "?" : "&") + O;
|
|
18272
18272
|
};
|
|
18273
18273
|
}
|
|
18274
|
-
var
|
|
18274
|
+
var N = a.shim, V = {
|
|
18275
18275
|
paths: !0,
|
|
18276
18276
|
bundles: !0,
|
|
18277
18277
|
config: !0,
|
|
@@ -18286,8 +18286,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18286
18286
|
}), T.shim && (eachProp(T.shim, function(E, G) {
|
|
18287
18287
|
isArray(E) && (E = {
|
|
18288
18288
|
deps: E
|
|
18289
|
-
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)),
|
|
18290
|
-
}), a.shim =
|
|
18289
|
+
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), N[G] = E;
|
|
18290
|
+
}), a.shim = N), T.packages && each(T.packages, function(E) {
|
|
18291
18291
|
var G, U;
|
|
18292
18292
|
E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (a.paths[U] = E.location), a.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
18293
18293
|
}), eachProp(l, function(E, G) {
|
|
@@ -18295,23 +18295,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18295
18295
|
}), (T.deps || T.callback) && o.require(T.deps || [], T.callback);
|
|
18296
18296
|
},
|
|
18297
18297
|
makeShimExports: function(T) {
|
|
18298
|
-
function
|
|
18299
|
-
var
|
|
18300
|
-
return T.init && (
|
|
18298
|
+
function O() {
|
|
18299
|
+
var N;
|
|
18300
|
+
return T.init && (N = T.init.apply(global, arguments)), N || T.exports && getGlobal(T.exports);
|
|
18301
18301
|
}
|
|
18302
|
-
return
|
|
18302
|
+
return O;
|
|
18303
18303
|
},
|
|
18304
|
-
makeRequire: function(T,
|
|
18305
|
-
|
|
18306
|
-
function
|
|
18304
|
+
makeRequire: function(T, O) {
|
|
18305
|
+
O = O || {};
|
|
18306
|
+
function N(V, E, G) {
|
|
18307
18307
|
var U, H, K;
|
|
18308
|
-
return
|
|
18309
|
-
$(), K = A(F(null, T)), K.skipMap =
|
|
18308
|
+
return O.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? k(makeError("requireargs", "Invalid require call"), G) : T && hasProp(r, V) ? r[V](l[T.id]) : req.get ? req.get(o, V, T, N) : (H = F(V, T, !1, !0), U = H.id, hasProp(p, U) ? p[U] : k(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (T ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
|
|
18309
|
+
$(), K = A(F(null, T)), K.skipMap = O.skipMap, K.init(V, E, G, {
|
|
18310
18310
|
enabled: !0
|
|
18311
18311
|
}), L();
|
|
18312
|
-
}),
|
|
18312
|
+
}), N);
|
|
18313
18313
|
}
|
|
18314
|
-
return mixin(
|
|
18314
|
+
return mixin(N, {
|
|
18315
18315
|
isBrowser,
|
|
18316
18316
|
/**
|
|
18317
18317
|
* Converts a module name + .extension into an URL path.
|
|
@@ -18332,13 +18332,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18332
18332
|
specified: function(V) {
|
|
18333
18333
|
return V = F(V, T, !1, !0).id, hasProp(p, V) || hasProp(l, V);
|
|
18334
18334
|
}
|
|
18335
|
-
}), T || (
|
|
18335
|
+
}), T || (N.undef = function(V) {
|
|
18336
18336
|
D();
|
|
18337
18337
|
var E = F(V, T, !0), G = getOwn(l, V);
|
|
18338
18338
|
G.undefed = !0, S(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(U, H) {
|
|
18339
18339
|
U[0] === V && d.splice(H, 1);
|
|
18340
18340
|
}), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), j(V));
|
|
18341
|
-
}),
|
|
18341
|
+
}), N;
|
|
18342
18342
|
},
|
|
18343
18343
|
/**
|
|
18344
18344
|
* Called to enable a module if it is still in the registry
|
|
@@ -18347,8 +18347,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18347
18347
|
* the optimizer. Not shown here to keep code compact.
|
|
18348
18348
|
*/
|
|
18349
18349
|
enable: function(T) {
|
|
18350
|
-
var
|
|
18351
|
-
|
|
18350
|
+
var O = getOwn(l, T.id);
|
|
18351
|
+
O && A(T).enable();
|
|
18352
18352
|
},
|
|
18353
18353
|
/**
|
|
18354
18354
|
* Internal method used by environment adapters to complete a load event.
|
|
@@ -18357,17 +18357,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18357
18357
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
18358
18358
|
*/
|
|
18359
18359
|
completeLoad: function(T) {
|
|
18360
|
-
var
|
|
18360
|
+
var O, N, V, E = getOwn(a.shim, T) || {}, G = E.exports;
|
|
18361
18361
|
for (D(); d.length; ) {
|
|
18362
|
-
if (
|
|
18363
|
-
if (
|
|
18362
|
+
if (N = d.shift(), N[0] === null) {
|
|
18363
|
+
if (N[0] = T, O)
|
|
18364
18364
|
break;
|
|
18365
|
-
|
|
18365
|
+
O = !0;
|
|
18366
18366
|
} else
|
|
18367
|
-
|
|
18368
|
-
M(
|
|
18367
|
+
N[0] === T && (O = !0);
|
|
18368
|
+
M(N);
|
|
18369
18369
|
}
|
|
18370
|
-
if (o.defQueueMap = {}, V = getOwn(l, T), !
|
|
18370
|
+
if (o.defQueueMap = {}, V = getOwn(l, T), !O && !hasProp(p, T) && V && !V.inited) {
|
|
18371
18371
|
if (a.enforceDefine && (!G || !getGlobal(G)))
|
|
18372
18372
|
return y(T) ? void 0 : k(makeError(
|
|
18373
18373
|
"nodefine",
|
|
@@ -18386,26 +18386,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18386
18386
|
* it is assumed to have already been normalized. This is an
|
|
18387
18387
|
* internal API, not a public one. Use toUrl for the public API.
|
|
18388
18388
|
*/
|
|
18389
|
-
nameToUrl: function(T,
|
|
18389
|
+
nameToUrl: function(T, O, N) {
|
|
18390
18390
|
var V, E, G, U, H, K, Y, J = getOwn(a.pkgs, T);
|
|
18391
18391
|
if (J && (T = J), Y = getOwn(h, T), Y)
|
|
18392
|
-
return o.nameToUrl(Y,
|
|
18392
|
+
return o.nameToUrl(Y, O, N);
|
|
18393
18393
|
if (req.jsExtRegExp.test(T))
|
|
18394
|
-
H = T + (
|
|
18394
|
+
H = T + (O || "");
|
|
18395
18395
|
else {
|
|
18396
18396
|
for (V = a.paths, E = T.split("/"), G = E.length; G > 0; G -= 1)
|
|
18397
18397
|
if (U = E.slice(0, G).join("/"), K = getOwn(V, U), K) {
|
|
18398
18398
|
isArray(K) && (K = K[0]), E.splice(0, G, K);
|
|
18399
18399
|
break;
|
|
18400
18400
|
}
|
|
18401
|
-
H = E.join("/"), H +=
|
|
18401
|
+
H = E.join("/"), H += O || (/^data\:|^blob\:|\?/.test(H) || N ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
18402
18402
|
}
|
|
18403
18403
|
return a.urlArgs && !/^blob\:/.test(H) ? H + a.urlArgs(T, H) : H;
|
|
18404
18404
|
},
|
|
18405
18405
|
//Delegates to req.load. Broken out as a separate function to
|
|
18406
18406
|
//allow overriding in the optimizer.
|
|
18407
|
-
load: function(T,
|
|
18408
|
-
req.load(o, T,
|
|
18407
|
+
load: function(T, O) {
|
|
18408
|
+
req.load(o, T, O);
|
|
18409
18409
|
},
|
|
18410
18410
|
/**
|
|
18411
18411
|
* Executes a module callback function. Broken out as a separate function
|
|
@@ -18414,8 +18414,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18414
18414
|
*
|
|
18415
18415
|
* @private
|
|
18416
18416
|
*/
|
|
18417
|
-
execCb: function(T,
|
|
18418
|
-
return
|
|
18417
|
+
execCb: function(T, O, N, V) {
|
|
18418
|
+
return O.apply(V, N);
|
|
18419
18419
|
},
|
|
18420
18420
|
/**
|
|
18421
18421
|
* callback for script loads, used to check status of loading.
|
|
@@ -18426,23 +18426,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18426
18426
|
onScriptLoad: function(T) {
|
|
18427
18427
|
if (T.type === "load" || readyRegExp.test((T.currentTarget || T.srcElement).readyState)) {
|
|
18428
18428
|
interactiveScript = null;
|
|
18429
|
-
var
|
|
18430
|
-
o.completeLoad(
|
|
18429
|
+
var O = B(T);
|
|
18430
|
+
o.completeLoad(O.id);
|
|
18431
18431
|
}
|
|
18432
18432
|
},
|
|
18433
18433
|
/**
|
|
18434
18434
|
* Callback for script errors.
|
|
18435
18435
|
*/
|
|
18436
18436
|
onScriptError: function(T) {
|
|
18437
|
-
var
|
|
18438
|
-
if (!y(
|
|
18439
|
-
var
|
|
18437
|
+
var O = B(T);
|
|
18438
|
+
if (!y(O.id)) {
|
|
18439
|
+
var N = [];
|
|
18440
18440
|
return eachProp(l, function(V, E) {
|
|
18441
18441
|
E.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
|
|
18442
|
-
if (G.id ===
|
|
18443
|
-
return
|
|
18442
|
+
if (G.id === O.id)
|
|
18443
|
+
return N.push(E), !0;
|
|
18444
18444
|
});
|
|
18445
|
-
}), k(makeError("scripterror", 'Script error for "' +
|
|
18445
|
+
}), k(makeError("scripterror", 'Script error for "' + O.id + (N.length ? '", needed by: ' + N.join(", ") : '"'), T, [O.id]));
|
|
18446
18446
|
}
|
|
18447
18447
|
}
|
|
18448
18448
|
}, o.require = o.makeRequire(), o;
|
|
@@ -18606,6 +18606,7 @@ class Application {
|
|
|
18606
18606
|
I(this, "schemaSettingsManager");
|
|
18607
18607
|
I(this, "dataSourceManager");
|
|
18608
18608
|
I(this, "name");
|
|
18609
|
+
I(this, "favicon");
|
|
18609
18610
|
I(this, "loading", !0);
|
|
18610
18611
|
I(this, "maintained", !1);
|
|
18611
18612
|
I(this, "maintaining", !1);
|
|
@@ -18630,6 +18631,10 @@ class Application {
|
|
|
18630
18631
|
get isWsAuthorized() {
|
|
18631
18632
|
return this.wsAuthorized;
|
|
18632
18633
|
}
|
|
18634
|
+
updateFavicon(t) {
|
|
18635
|
+
let n = document.querySelector('link[rel="shortcut icon"]');
|
|
18636
|
+
t && (this.favicon = t), n ? n.href = this.favicon || "/favicon/favicon.ico" : (n = document.createElement("link"), n.rel = "shortcut icon", n.href = this.favicon || "/favicon/favicon.ico", document.head.appendChild(n));
|
|
18637
|
+
}
|
|
18633
18638
|
setWsAuthorized(t) {
|
|
18634
18639
|
this.wsAuthorized = t;
|
|
18635
18640
|
}
|
|
@@ -18749,7 +18754,7 @@ class Application {
|
|
|
18749
18754
|
code: "LOAD_ERROR"
|
|
18750
18755
|
}, n(t)), console.error(t, this.error);
|
|
18751
18756
|
}
|
|
18752
|
-
this.loading = !1;
|
|
18757
|
+
this.loading = !1, this.updateFavicon();
|
|
18753
18758
|
});
|
|
18754
18759
|
}
|
|
18755
18760
|
loadWebSocket() {
|
|
@@ -19017,11 +19022,11 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19017
19022
|
[t, p]
|
|
19018
19023
|
), b = useCallback(
|
|
19019
19024
|
(w, B) => {
|
|
19020
|
-
var T,
|
|
19025
|
+
var T, O;
|
|
19021
19026
|
if (!w)
|
|
19022
19027
|
return [];
|
|
19023
19028
|
const $ = (T = p(B)) == null ? void 0 : T.getCollection(w);
|
|
19024
|
-
return ((
|
|
19029
|
+
return ((O = $ == null ? void 0 : $.getAllFields) == null ? void 0 : O.call($)) || ($ == null ? void 0 : $.getFields()) || [];
|
|
19025
19030
|
},
|
|
19026
19031
|
[t, p]
|
|
19027
19032
|
), S = useCallback(
|
|
@@ -19039,10 +19044,10 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19039
19044
|
[t, p]
|
|
19040
19045
|
), v = useCallback(
|
|
19041
19046
|
(w, B = !1, $) => {
|
|
19042
|
-
var
|
|
19047
|
+
var N;
|
|
19043
19048
|
if (!w)
|
|
19044
19049
|
return [];
|
|
19045
|
-
const T = (
|
|
19050
|
+
const T = (N = p($)) == null ? void 0 : N.getCollection(w);
|
|
19046
19051
|
return (T == null ? void 0 : T.getChildrenCollections(B)) || [];
|
|
19047
19052
|
},
|
|
19048
19053
|
[t, p]
|
|
@@ -19057,8 +19062,8 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19057
19062
|
var X;
|
|
19058
19063
|
const {
|
|
19059
19064
|
association: T = !1,
|
|
19060
|
-
cached:
|
|
19061
|
-
collectionNames:
|
|
19065
|
+
cached: O = {},
|
|
19066
|
+
collectionNames: N = [w],
|
|
19062
19067
|
maxDepth: V = 1,
|
|
19063
19068
|
allowAllTypes: E = !1,
|
|
19064
19069
|
exceptInterfaces: G = [],
|
|
@@ -19066,10 +19071,10 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19066
19071
|
usePrefix: H = !1,
|
|
19067
19072
|
dataSource: K
|
|
19068
19073
|
} = $ || {};
|
|
19069
|
-
if (
|
|
19074
|
+
if (N.length - 1 > V)
|
|
19070
19075
|
return;
|
|
19071
|
-
if (
|
|
19072
|
-
return _.cloneDeep(
|
|
19076
|
+
if (O[w])
|
|
19077
|
+
return _.cloneDeep(O[w]);
|
|
19073
19078
|
typeof B == "string" && (B = [B]);
|
|
19074
19079
|
const Y = b(w, K), J = (X = Y == null ? void 0 : Y.filter(
|
|
19075
19080
|
(Q) => Q.interface && !G.includes(Q.interface) && (E || B.includes(Q.type) || (T && Q.target && Q.target !== w && Array.isArray(T) ? T.includes(Q.interface) : !1))
|
|
@@ -19079,15 +19084,15 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19079
19084
|
value: H && U ? `${U}.${Q.name}` : Q.name,
|
|
19080
19085
|
label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
|
|
19081
19086
|
}, Q);
|
|
19082
|
-
return T && Q.target && (Z.children =
|
|
19083
|
-
cached:
|
|
19087
|
+
return T && Q.target && (Z.children = N.includes(Q.target) ? [] : A(Q.target, B, P(x({}, $), {
|
|
19088
|
+
cached: O,
|
|
19084
19089
|
dataSource: K,
|
|
19085
|
-
collectionNames: [...
|
|
19090
|
+
collectionNames: [...N, Q.target],
|
|
19086
19091
|
prefixFieldValue: H ? U ? `${U}.${Q.name}` : Q.name : "",
|
|
19087
19092
|
usePrefix: H
|
|
19088
19093
|
})), !((te = Z.children) != null && te.length)) ? null : Z;
|
|
19089
19094
|
}).filter(Boolean);
|
|
19090
|
-
return
|
|
19095
|
+
return O[w] = J, J;
|
|
19091
19096
|
},
|
|
19092
19097
|
[b]
|
|
19093
19098
|
), R = useCallback(
|
|
@@ -19119,8 +19124,8 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19119
19124
|
[j]
|
|
19120
19125
|
), L = useCallback(
|
|
19121
19126
|
(w, B, $) => {
|
|
19122
|
-
var T,
|
|
19123
|
-
return (
|
|
19127
|
+
var T, O;
|
|
19128
|
+
return (O = (T = p($)) == null ? void 0 : T.getCollection(B)) == null ? void 0 : O.getParentCollectionFields(w);
|
|
19124
19129
|
},
|
|
19125
19130
|
[t, p]
|
|
19126
19131
|
), M = useCallback(
|
|
@@ -22399,7 +22404,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
22399
22404
|
}, [D]), z = useCallback(() => q(void 0, null, function* () {
|
|
22400
22405
|
yield D.submit();
|
|
22401
22406
|
try {
|
|
22402
|
-
const B = D.values, $ = Object.keys(B).reduce((T,
|
|
22407
|
+
const B = D.values, $ = Object.keys(B).reduce((T, O) => (D.query(O).take() && (T[O] = B[O]), T), {});
|
|
22403
22408
|
yield n == null ? void 0 : n(cloneDeep$1($)), h(!1);
|
|
22404
22409
|
} catch (B) {
|
|
22405
22410
|
console.error(B);
|
|
@@ -22471,7 +22476,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22471
22476
|
"width",
|
|
22472
22477
|
"noRecord",
|
|
22473
22478
|
"ModalContextProvider"
|
|
22474
|
-
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), A = useDataSourceKey(), R = useCollectionRecord(), { association: k } = useDataBlockProps() || {}, D = useCurrentRecord(), j = useFormBlockContext(), z = useBlockContext(), { getOperators: L } = useOperators(), M = useLocationSearch(), w = useVariables$1(), { formValue: B, collection: $, parent: T } = useSubFormValue(),
|
|
22479
|
+
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), A = useDataSourceKey(), R = useCollectionRecord(), { association: k } = useDataBlockProps() || {}, D = useCurrentRecord(), j = useFormBlockContext(), z = useBlockContext(), { getOperators: L } = useOperators(), M = useLocationSearch(), w = useVariables$1(), { formValue: B, collection: $, parent: T } = useSubFormValue(), O = useCurrentPopupRecord(), N = useParentPopupRecord();
|
|
22475
22480
|
return t ? null : /* @__PURE__ */ jsx(
|
|
22476
22481
|
SchemaSettingsItem,
|
|
22477
22482
|
P(x({
|
|
@@ -22484,11 +22489,11 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22484
22489
|
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: z, children: /* @__PURE__ */ jsx(
|
|
22485
22490
|
VariablePopupRecordProvider,
|
|
22486
22491
|
{
|
|
22487
|
-
recordData:
|
|
22488
|
-
collection:
|
|
22492
|
+
recordData: O == null ? void 0 : O.value,
|
|
22493
|
+
collection: O == null ? void 0 : O.collection,
|
|
22489
22494
|
parent: {
|
|
22490
|
-
recordData:
|
|
22491
|
-
collection:
|
|
22495
|
+
recordData: N == null ? void 0 : N.value,
|
|
22496
|
+
collection: N == null ? void 0 : N.collection
|
|
22492
22497
|
},
|
|
22493
22498
|
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: j, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: B, collection: $, parent: T }, children: /* @__PURE__ */ jsx(
|
|
22494
22499
|
FormActiveFieldsProvider,
|
|
@@ -22674,8 +22679,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22674
22679
|
(L) => {
|
|
22675
22680
|
var T;
|
|
22676
22681
|
const M = [];
|
|
22677
|
-
for (const
|
|
22678
|
-
M.push(_.pickBy(
|
|
22682
|
+
for (const O of L.fieldReaction.rules)
|
|
22683
|
+
M.push(_.pickBy(O, _.identity));
|
|
22679
22684
|
const w = b["x-component"] === "BlockTemplate" && ((T = b["x-component-props"]) == null ? void 0 : T.templateId), $ = {
|
|
22680
22685
|
"x-uid": w && d(w).uid || b["x-uid"]
|
|
22681
22686
|
};
|
|
@@ -23372,7 +23377,7 @@ const getActionContext = (e) => {
|
|
|
23372
23377
|
var n;
|
|
23373
23378
|
return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
|
|
23374
23379
|
}, SchemaSettingsDefaultValue = function e(t) {
|
|
23375
|
-
var T,
|
|
23380
|
+
var T, O, N;
|
|
23376
23381
|
const n = useFieldSchema(), o = (T = t == null ? void 0 : t.fieldSchema) != null ? T : n, r = useField(), { dn: i } = useDesignable(), { t: a } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
23377
23382
|
let u;
|
|
23378
23383
|
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: A } = C, R = useMemo(
|
|
@@ -23380,7 +23385,7 @@ const getActionContext = (e) => {
|
|
|
23380
23385
|
[o, p, d]
|
|
23381
23386
|
), k = _.omit(o, "required");
|
|
23382
23387
|
R != null && R.target && (u = p(
|
|
23383
|
-
`${R.target}.${((
|
|
23388
|
+
`${R.target}.${((N = (O = o["x-component-props"]) == null ? void 0 : O.fieldNames) == null ? void 0 : N.label) || "id"}`
|
|
23384
23389
|
));
|
|
23385
23390
|
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), j = D && p(D == null ? void 0 : D["x-collection-field"]), z = useTableBlockContext(), L = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (j == null ? void 0 : j.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", M = useCallback(
|
|
23386
23391
|
(V) => {
|
|
@@ -24252,7 +24257,7 @@ const useGetFilterOptions = () => {
|
|
|
24252
24257
|
};
|
|
24253
24258
|
});
|
|
24254
24259
|
}, TableColumnDesigner$1 = (e) => {
|
|
24255
|
-
var z, L, M, w, B, $, T,
|
|
24260
|
+
var z, L, M, w, B, $, T, O, N, V, E, G;
|
|
24256
24261
|
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z.fieldNames) || ((L = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : L.fieldNames), m = useLabelFields$1((M = o == null ? void 0 : o.target) != null ? M : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
24257
24262
|
o == null ? void 0 : o.interface
|
|
24258
24263
|
), A = useFieldModeOptions({ fieldSchema: n }), R = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.mode) || "Select";
|
|
@@ -24295,7 +24300,7 @@ const useGetFilterOptions = () => {
|
|
|
24295
24300
|
SchemaSettingsDataScope,
|
|
24296
24301
|
{
|
|
24297
24302
|
collectionName: o == null ? void 0 : o.target,
|
|
24298
|
-
defaultFilter: ((
|
|
24303
|
+
defaultFilter: ((N = (O = (T = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : T.service) == null ? void 0 : O.params) == null ? void 0 : N.filter) || {},
|
|
24299
24304
|
form: r,
|
|
24300
24305
|
onSubmit: ({ filter: U }) => {
|
|
24301
24306
|
var K, Y;
|
|
@@ -25561,14 +25566,14 @@ const useCreateActionProps = () => {
|
|
|
25561
25566
|
return {
|
|
25562
25567
|
onClick() {
|
|
25563
25568
|
return q(this, null, function* () {
|
|
25564
|
-
var
|
|
25569
|
+
var O, N, V, E, G, U;
|
|
25565
25570
|
const R = u.map((H) => H.name), {
|
|
25566
25571
|
assignedValues: k = {},
|
|
25567
25572
|
onSuccess: D,
|
|
25568
25573
|
overwriteValues: j,
|
|
25569
25574
|
skipValidator: z,
|
|
25570
25575
|
triggerWorkflows: L
|
|
25571
|
-
} = (
|
|
25576
|
+
} = (O = l == null ? void 0 : l["x-action-settings"]) != null ? O : {}, M = (N = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : N.addChild, { successMessage: w } = D || {}, B = {}, $ = Object.keys(k).map((H) => q(this, null, function* () {
|
|
25572
25577
|
const K = k[H], Y = d(H);
|
|
25573
25578
|
if (isVariable(K)) {
|
|
25574
25579
|
const { value: J } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
|
|
@@ -25714,8 +25719,8 @@ const useCreateActionProps = () => {
|
|
|
25714
25719
|
} = (L = r == null ? void 0 : r["x-action-settings"]) != null ? L : {}, { manualClose: F, redirecting: A, redirectTo: R, successMessage: k, actionAfterSuccess: D } = S || {}, j = {}, z = Object.keys(b).map((B) => q(this, null, function* () {
|
|
25715
25720
|
const $ = b[B], T = m(B);
|
|
25716
25721
|
if (isVariable($)) {
|
|
25717
|
-
const { value:
|
|
25718
|
-
|
|
25722
|
+
const { value: O } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
|
|
25723
|
+
O && (j[B] = transformVariableValue(O, { targetCollectionField: T }));
|
|
25719
25724
|
} else
|
|
25720
25725
|
$ != null && $ !== "" && (j[B] = $);
|
|
25721
25726
|
}));
|
|
@@ -25741,12 +25746,12 @@ const useCreateActionProps = () => {
|
|
|
25741
25746
|
return {
|
|
25742
25747
|
onClick() {
|
|
25743
25748
|
return q(this, null, function* () {
|
|
25744
|
-
var
|
|
25749
|
+
var O;
|
|
25745
25750
|
const {
|
|
25746
25751
|
assignedValues: k = {},
|
|
25747
25752
|
onSuccess: D,
|
|
25748
25753
|
updateMode: j
|
|
25749
|
-
} = (
|
|
25754
|
+
} = (O = i == null ? void 0 : i["x-action-settings"]) != null ? O : {}, { manualClose: z, redirecting: L, redirectTo: M, successMessage: w, actionAfterSuccess: B } = D || {};
|
|
25750
25755
|
m.data = e.data || {}, m.data.loading = !0;
|
|
25751
25756
|
const $ = {}, T = Object.keys(k).map((V) => q(this, null, function* () {
|
|
25752
25757
|
const E = k[V], G = C(V);
|
|
@@ -25822,7 +25827,7 @@ const useCreateActionProps = () => {
|
|
|
25822
25827
|
});
|
|
25823
25828
|
Object.assign(T, K);
|
|
25824
25829
|
}
|
|
25825
|
-
const
|
|
25830
|
+
const N = {
|
|
25826
25831
|
url: renderTemplate(k.url, { currentRecord: m, currentUser: g }),
|
|
25827
25832
|
method: k.method,
|
|
25828
25833
|
headers: parse(B)({ currentRecord: m, currentUser: g }),
|
|
@@ -25831,7 +25836,7 @@ const useCreateActionProps = () => {
|
|
|
25831
25836
|
};
|
|
25832
25837
|
f.data = c.data || {}, f.data.loading = !0;
|
|
25833
25838
|
try {
|
|
25834
|
-
yield e.request(x({},
|
|
25839
|
+
yield e.request(x({}, N)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (M === "previous" || !M && j !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (j && !M || M === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
|
|
25835
25840
|
title: r(L),
|
|
25836
25841
|
onOk: () => q(this, null, function* () {
|
|
25837
25842
|
(j && !M || M === "redirect") && z && (isURL(z) ? window.location.href = z : t(z));
|
|
@@ -25855,7 +25860,7 @@ const useCreateActionProps = () => {
|
|
|
25855
25860
|
overwriteValues: D,
|
|
25856
25861
|
skipValidator: j,
|
|
25857
25862
|
triggerWorkflows: z
|
|
25858
|
-
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: M, redirectTo: w, successMessage: B, actionAfterSuccess: $ } = k || {}, T = {},
|
|
25863
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: M, redirectTo: w, successMessage: B, actionAfterSuccess: $ } = k || {}, T = {}, O = Object.keys(R).map((G) => q(this, null, function* () {
|
|
25859
25864
|
const U = R[G], H = d(G);
|
|
25860
25865
|
if (isVariable(U)) {
|
|
25861
25866
|
const { value: K } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
@@ -25863,12 +25868,12 @@ const useCreateActionProps = () => {
|
|
|
25863
25868
|
} else
|
|
25864
25869
|
U != null && U !== "" && (T[G] = U);
|
|
25865
25870
|
}));
|
|
25866
|
-
yield Promise.all(
|
|
25867
|
-
const
|
|
25871
|
+
yield Promise.all(O), j || (yield e.submit());
|
|
25872
|
+
const N = u.map((G) => G.name), V = getFormValues({
|
|
25868
25873
|
filterByTk: t,
|
|
25869
25874
|
field: n,
|
|
25870
25875
|
form: e,
|
|
25871
|
-
fieldNames:
|
|
25876
|
+
fieldNames: N,
|
|
25872
25877
|
getField: d,
|
|
25873
25878
|
resource: o,
|
|
25874
25879
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -26115,17 +26120,17 @@ const useCreateActionProps = () => {
|
|
|
26115
26120
|
var U, H, K;
|
|
26116
26121
|
if (!B.find((Y) => Y.uid === T.uid))
|
|
26117
26122
|
return;
|
|
26118
|
-
const
|
|
26123
|
+
const N = `${$}${t.name}`, V = ((U = T.service.params) == null ? void 0 : U[0]) || {};
|
|
26119
26124
|
(K = (H = T.service.params) == null ? void 0 : H[1]) != null && K.filters || _.set(T.service.params, "[1].filters", {});
|
|
26120
26125
|
const E = T.service.params[1].filters;
|
|
26121
26126
|
if (w.length)
|
|
26122
|
-
E[
|
|
26127
|
+
E[N] = {
|
|
26123
26128
|
[S]: w
|
|
26124
26129
|
};
|
|
26125
26130
|
else {
|
|
26126
26131
|
if (T.dataLoadingMode === "manual")
|
|
26127
26132
|
return T.clearData();
|
|
26128
|
-
delete E[
|
|
26133
|
+
delete E[N];
|
|
26129
26134
|
}
|
|
26130
26135
|
const G = mergeFilter([...Object.values(E), T.defaultFilter]);
|
|
26131
26136
|
return T.doFilter(
|
|
@@ -26150,12 +26155,12 @@ const useCreateActionProps = () => {
|
|
|
26150
26155
|
}, $ = ((M = w == null ? void 0 : w.uiSchema) == null ? void 0 : M.enum) || [];
|
|
26151
26156
|
C = "value", b = "label", p = $, h = {}, g = () => {
|
|
26152
26157
|
}, S = `${w.name}.${B[w.interface]}`, m = (T) => {
|
|
26153
|
-
const
|
|
26154
|
-
if (!
|
|
26158
|
+
const O = T.target.value;
|
|
26159
|
+
if (!O) {
|
|
26155
26160
|
p = $;
|
|
26156
26161
|
return;
|
|
26157
26162
|
}
|
|
26158
|
-
p = $.filter((
|
|
26163
|
+
p = $.filter((N) => N.label.includes(O));
|
|
26159
26164
|
};
|
|
26160
26165
|
} else
|
|
26161
26166
|
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -26526,8 +26531,8 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
26526
26531
|
const D = R || F, j = k["x-collection-field"] && o(k["x-collection-field"]), z = k.name.includes("."), L = j && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(j.type), M = !L && z ? getAssociationPath(k.name) : k.name, w = D === "" || !D ? M : D + "." + M;
|
|
26527
26532
|
if (j && !(["hasOne", "hasMany"].includes(j.type) || ["SubForm", "Nester"].includes((B = k["x-component-props"]) == null ? void 0 : B.mode)) && C.add(w), j && (L || z) && k["x-component"] !== "TableField") {
|
|
26528
26533
|
if (f.add({ name: w, fieldMode: (($ = k["x-component-props"]) == null ? void 0 : $.mode) || "Select" }), ["Nester", "SubTable"].includes((T = k["x-component-props"]) == null ? void 0 : T.mode)) {
|
|
26529
|
-
const
|
|
26530
|
-
b(k,
|
|
26534
|
+
const O = D && D !== "" ? D + "." + k.name : k.name;
|
|
26535
|
+
b(k, O);
|
|
26531
26536
|
}
|
|
26532
26537
|
} else
|
|
26533
26538
|
[
|
|
@@ -29006,9 +29011,9 @@ function Input$1(e) {
|
|
|
29006
29011
|
label: y("Constant"),
|
|
29007
29012
|
[B.value]: "$",
|
|
29008
29013
|
[B.label]: y("Constant")
|
|
29009
|
-
} : i ? getTypedConstantOption(M, i, B) : null, [M, i]), T = (H = $ == null ? void 0 : $.component) != null ? H : NullComponent,
|
|
29010
|
-
let
|
|
29011
|
-
t == null ? a ? o && D ?
|
|
29014
|
+
} : i ? getTypedConstantOption(M, i, B) : null, [M, i]), T = (H = $ == null ? void 0 : $.component) != null ? H : NullComponent, O = Array.isArray(i) ? (Y = (K = i.find((J) => Array.isArray(J) && J[0] === M)) == null ? void 0 : K[1]) != null ? Y : {} : {};
|
|
29015
|
+
let N;
|
|
29016
|
+
t == null ? a ? o && D ? N = ["$"] : N = [""] : o ? N = ["$"] : N = [" ", M] : N = o ? ["$"] : [" ", M], m && (N = ["$"]), useEffect(() => {
|
|
29012
29017
|
const Z = $ != null ? $ : {}, { component: J } = Z, X = W(Z, ["component"]), Q = [
|
|
29013
29018
|
...a ? [
|
|
29014
29019
|
{
|
|
@@ -29149,7 +29154,7 @@ function Input$1(e) {
|
|
|
29149
29154
|
P(x({
|
|
29150
29155
|
role: "button",
|
|
29151
29156
|
"aria-label": "variable-constant"
|
|
29152
|
-
},
|
|
29157
|
+
}, O), {
|
|
29153
29158
|
value: t,
|
|
29154
29159
|
onChange: n
|
|
29155
29160
|
})
|
|
@@ -29158,7 +29163,7 @@ function Input$1(e) {
|
|
|
29158
29163
|
Cascader$1,
|
|
29159
29164
|
{
|
|
29160
29165
|
options: F,
|
|
29161
|
-
value: w != null ? w :
|
|
29166
|
+
value: w != null ? w : N,
|
|
29162
29167
|
onChange: E,
|
|
29163
29168
|
loadData: V,
|
|
29164
29169
|
changeOnSelect: u,
|
|
@@ -29440,15 +29445,15 @@ function TextArea(e) {
|
|
|
29440
29445
|
useAntdInputStyle("ant-input");
|
|
29441
29446
|
const { token: D } = theme$1.useToken(), j = u.join(" ");
|
|
29442
29447
|
useEffect(() => {
|
|
29443
|
-
preloadOptions(r, p).then((
|
|
29444
|
-
g(
|
|
29448
|
+
preloadOptions(r, p).then((N) => {
|
|
29449
|
+
g(N);
|
|
29445
29450
|
}).catch(console.error);
|
|
29446
29451
|
}, [r, JSON.stringify(p)]), useEffect(() => {
|
|
29447
29452
|
A(renderHTML(d != null ? d : "", C, u)), y || k([-1, 0, -1, 0]);
|
|
29448
29453
|
}, [d, C, j]), useEffect(() => {
|
|
29449
29454
|
var E;
|
|
29450
|
-
const { current:
|
|
29451
|
-
if (!
|
|
29455
|
+
const { current: N } = m;
|
|
29456
|
+
if (!N)
|
|
29452
29457
|
return;
|
|
29453
29458
|
const V = new Range();
|
|
29454
29459
|
if (y) {
|
|
@@ -29457,22 +29462,22 @@ function TextArea(e) {
|
|
|
29457
29462
|
const G = (E = window.getSelection) == null ? void 0 : E.call(window);
|
|
29458
29463
|
if (G)
|
|
29459
29464
|
try {
|
|
29460
|
-
const U = Array.from(
|
|
29465
|
+
const U = Array.from(N.childNodes);
|
|
29461
29466
|
U.length && (R[0] === -1 ? R[1] && V.setStartAfter(U[R[1] - 1]) : V.setStart(U[R[0]], R[1]), R[2] === -1 ? R[3] && V.setEndAfter(U[R[3] - 1]) : V.setEnd(U[R[2]], R[3])), V.collapse(!0), G.removeAllRanges(), G.addRange(V);
|
|
29462
29467
|
} catch (U) {
|
|
29463
29468
|
}
|
|
29464
29469
|
} else {
|
|
29465
|
-
const { lastChild: G } =
|
|
29470
|
+
const { lastChild: G } = N;
|
|
29466
29471
|
if (G) {
|
|
29467
29472
|
V.setStartAfter(G), V.setEndAfter(G);
|
|
29468
|
-
const U = Array.from(
|
|
29473
|
+
const U = Array.from(N.childNodes), H = V.startContainer === N ? -1 : U.indexOf(G), K = V.startContainer === N ? -1 : U.indexOf(G);
|
|
29469
29474
|
k([H, V.startOffset, K, V.endOffset]);
|
|
29470
29475
|
}
|
|
29471
29476
|
}
|
|
29472
29477
|
}, [F]);
|
|
29473
29478
|
const z = useCallback(
|
|
29474
|
-
function(
|
|
29475
|
-
const V =
|
|
29479
|
+
function(N) {
|
|
29480
|
+
const V = N.filter((U) => !!U.trim()), { current: E } = m;
|
|
29476
29481
|
if (!E || !V)
|
|
29477
29482
|
return;
|
|
29478
29483
|
E.focus();
|
|
@@ -29483,25 +29488,25 @@ function TextArea(e) {
|
|
|
29483
29488
|
},
|
|
29484
29489
|
[C, i, R, j]
|
|
29485
29490
|
), L = useCallback(
|
|
29486
|
-
function({ currentTarget:
|
|
29487
|
-
b || (v(!0), k(getCurrentRange(
|
|
29491
|
+
function({ currentTarget: N }) {
|
|
29492
|
+
b || (v(!0), k(getCurrentRange(N)), i(getValue(N, u)));
|
|
29488
29493
|
},
|
|
29489
29494
|
[b, i, j]
|
|
29490
|
-
), M = useCallback(function({ currentTarget:
|
|
29491
|
-
k(getCurrentRange(
|
|
29492
|
-
}, []), w = useCallback(function(
|
|
29493
|
-
|
|
29495
|
+
), M = useCallback(function({ currentTarget: N }) {
|
|
29496
|
+
k(getCurrentRange(N));
|
|
29497
|
+
}, []), w = useCallback(function(N) {
|
|
29498
|
+
N.key === "Enter" && N.preventDefault();
|
|
29494
29499
|
}, []), B = useCallback(function() {
|
|
29495
29500
|
S(!0);
|
|
29496
29501
|
}, []), $ = useCallback(
|
|
29497
|
-
({ currentTarget:
|
|
29498
|
-
S(!1), v(!0), k(getCurrentRange(
|
|
29502
|
+
({ currentTarget: N }) => {
|
|
29503
|
+
S(!1), v(!0), k(getCurrentRange(N)), i(getValue(N, u));
|
|
29499
29504
|
},
|
|
29500
29505
|
[i, j]
|
|
29501
29506
|
), T = useCallback(
|
|
29502
|
-
function(
|
|
29503
|
-
|
|
29504
|
-
const V =
|
|
29507
|
+
function(N) {
|
|
29508
|
+
N.preventDefault();
|
|
29509
|
+
const V = N.clipboardData.getData("text/html") || N.clipboardData.getData("text"), E = sanitizeHTML(V, {
|
|
29505
29510
|
allowedTags: ["span"],
|
|
29506
29511
|
allowedAttributes: {
|
|
29507
29512
|
span: ["data-variable", "contenteditable"]
|
|
@@ -29518,10 +29523,10 @@ function TextArea(e) {
|
|
|
29518
29523
|
}
|
|
29519
29524
|
}
|
|
29520
29525
|
}).replace(/\n/g, " ");
|
|
29521
|
-
v(!0), pasteHTML(
|
|
29526
|
+
v(!0), pasteHTML(N.currentTarget, E), k(getCurrentRange(N.currentTarget)), i(getValue(N.currentTarget, u));
|
|
29522
29527
|
},
|
|
29523
29528
|
[i, j]
|
|
29524
|
-
),
|
|
29529
|
+
), O = e.disabled || f.disabled;
|
|
29525
29530
|
return t(
|
|
29526
29531
|
/* @__PURE__ */ jsxs(
|
|
29527
29532
|
Space$1.Compact,
|
|
@@ -29565,7 +29570,7 @@ function TextArea(e) {
|
|
|
29565
29570
|
className: cx(
|
|
29566
29571
|
n,
|
|
29567
29572
|
"ant-input",
|
|
29568
|
-
{ "ant-input-disabled":
|
|
29573
|
+
{ "ant-input-disabled": O },
|
|
29569
29574
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
29570
29575
|
css`
|
|
29571
29576
|
min-height: ${D.controlHeight}px;
|
|
@@ -29587,7 +29592,7 @@ function TextArea(e) {
|
|
|
29587
29592
|
`
|
|
29588
29593
|
),
|
|
29589
29594
|
ref: m,
|
|
29590
|
-
contentEditable: !
|
|
29595
|
+
contentEditable: !O,
|
|
29591
29596
|
dangerouslySetInnerHTML: { __html: F }
|
|
29592
29597
|
}
|
|
29593
29598
|
),
|
|
@@ -29599,7 +29604,7 @@ function TextArea(e) {
|
|
|
29599
29604
|
onInsert: z,
|
|
29600
29605
|
changeOnSelect: a,
|
|
29601
29606
|
fieldNames: c || defaultFieldNames$2,
|
|
29602
|
-
disabled:
|
|
29607
|
+
disabled: O
|
|
29603
29608
|
}
|
|
29604
29609
|
)
|
|
29605
29610
|
]
|
|
@@ -33159,10 +33164,10 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33159
33164
|
name: "fieldSettings:component:CascadeSelect",
|
|
33160
33165
|
items: [fieldComponent$7, titleField$2, ellipsisSettingsItem]
|
|
33161
33166
|
}), SchemaSettingsDateRange = function e(t) {
|
|
33162
|
-
var R, k, D, j, z, L, M, w, B, $, T,
|
|
33163
|
-
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.dateFormat) || ((L = (z = u == null ? void 0 : u.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : L.dateFormat) || "YYYY-MM-DD", m = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.timeFormat) || ((B = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : B.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((
|
|
33167
|
+
var R, k, D, j, z, L, M, w, B, $, T, O, N, V, E, G;
|
|
33168
|
+
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.dateFormat) || ((L = (z = u == null ? void 0 : u.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : L.dateFormat) || "YYYY-MM-DD", m = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.timeFormat) || ((B = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : B.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((O = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : O.picker) || "date";
|
|
33164
33169
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
33165
|
-
const g = (
|
|
33170
|
+
const g = (N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
33166
33171
|
(U) => /* @__PURE__ */ jsx(
|
|
33167
33172
|
SchemaComponent,
|
|
33168
33173
|
{
|
|
@@ -34798,10 +34803,10 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34798
34803
|
dataSource: k,
|
|
34799
34804
|
collectionName: L
|
|
34800
34805
|
};
|
|
34801
|
-
const T = y[$],
|
|
34806
|
+
const T = y[$], O = y.slice(0, $ + 1).join("."), { fieldPath: N } = getFieldPath(O, F), V = r(N, k), E = (B = i(j, k)) == null ? void 0 : B.getPrimaryKey();
|
|
34802
34807
|
if (Array.isArray(A)) {
|
|
34803
34808
|
const G = A.map((U) => {
|
|
34804
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T], U,
|
|
34809
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T], U, O) && (U == null ? void 0 : U[E]) != null && V != null && V.target) {
|
|
34805
34810
|
const H = `/${j}/${U[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
|
|
34806
34811
|
if (hasRequested(H))
|
|
34807
34812
|
return getRequested(H);
|
|
@@ -34814,14 +34819,14 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34814
34819
|
}).then((Y) => {
|
|
34815
34820
|
clearRequested(H);
|
|
34816
34821
|
const J = Y.data.data;
|
|
34817
|
-
return cacheLazyLoadedValues(U,
|
|
34822
|
+
return cacheLazyLoadedValues(U, O, J), J;
|
|
34818
34823
|
});
|
|
34819
34824
|
return stashRequested(H, K), K;
|
|
34820
34825
|
}
|
|
34821
|
-
return getCachedLazyLoadedValues(U,
|
|
34826
|
+
return getCachedLazyLoadedValues(U, O) || (U == null ? void 0 : U[T]);
|
|
34822
34827
|
});
|
|
34823
34828
|
A = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
|
|
34824
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(A[T], A,
|
|
34829
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(A[T], A, O) && A[E] != null && (V != null && V.target)) {
|
|
34825
34830
|
const G = `/${j}/${A[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
|
|
34826
34831
|
let U = null;
|
|
34827
34832
|
if (hasRequested(G))
|
|
@@ -34837,10 +34842,10 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34837
34842
|
stashRequested(G, K), U = yield K, clearRequested(G);
|
|
34838
34843
|
}
|
|
34839
34844
|
const H = U.data.data;
|
|
34840
|
-
getCachedLazyLoadedValues(A,
|
|
34845
|
+
getCachedLazyLoadedValues(A, O) || cacheLazyLoadedValues(A, O, H), A = removeThroughCollectionFields(H, V);
|
|
34841
34846
|
} else
|
|
34842
34847
|
A = removeThroughCollectionFields(
|
|
34843
|
-
getCachedLazyLoadedValues(A,
|
|
34848
|
+
getCachedLazyLoadedValues(A, O) || getValuesByPath(A, T),
|
|
34844
34849
|
V
|
|
34845
34850
|
);
|
|
34846
34851
|
V != null && V.target && (j = V.target);
|
|
@@ -35206,7 +35211,7 @@ function addAppVersion(e, t) {
|
|
|
35206
35211
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
35207
35212
|
}), e;
|
|
35208
35213
|
}
|
|
35209
|
-
const name = "@nocobase/client", version = "1.5.
|
|
35214
|
+
const name = "@nocobase/client", version = "1.5.20", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
35210
35215
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
35211
35216
|
"@ant-design/cssinjs": "^1.11.1",
|
|
35212
35217
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -35228,9 +35233,9 @@ const name = "@nocobase/client", version = "1.5.18", license = "AGPL-3.0", main
|
|
|
35228
35233
|
"@formily/reactive-react": "^2.2.27",
|
|
35229
35234
|
"@formily/shared": "^2.2.27",
|
|
35230
35235
|
"@formily/validator": "^2.2.27",
|
|
35231
|
-
"@nocobase/evaluators": "1.5.
|
|
35232
|
-
"@nocobase/sdk": "1.5.
|
|
35233
|
-
"@nocobase/utils": "1.5.
|
|
35236
|
+
"@nocobase/evaluators": "1.5.20",
|
|
35237
|
+
"@nocobase/sdk": "1.5.20",
|
|
35238
|
+
"@nocobase/utils": "1.5.20",
|
|
35234
35239
|
ahooks: "^3.7.2",
|
|
35235
35240
|
antd: "5.12.8",
|
|
35236
35241
|
"antd-style": "3.7.1",
|
|
@@ -36579,7 +36584,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36579
36584
|
}
|
|
36580
36585
|
},
|
|
36581
36586
|
[M == null ? void 0 : M.uiSchema, t]
|
|
36582
|
-
), { data: T, run:
|
|
36587
|
+
), { data: T, run: O, loading: N } = useRequest(
|
|
36583
36588
|
P(x({
|
|
36584
36589
|
action: "list"
|
|
36585
36590
|
}, n), {
|
|
@@ -36610,11 +36615,11 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36610
36615
|
}
|
|
36611
36616
|
) : null, [k.current]);
|
|
36612
36617
|
useEffect(() => {
|
|
36613
|
-
v.current &&
|
|
36618
|
+
v.current && O();
|
|
36614
36619
|
}, [V]);
|
|
36615
36620
|
const G = (X) => q(void 0, null, function* () {
|
|
36616
36621
|
var Q;
|
|
36617
|
-
|
|
36622
|
+
O({
|
|
36618
36623
|
filter: mergeFilter([
|
|
36619
36624
|
X ? {
|
|
36620
36625
|
[t.label]: {
|
|
@@ -36643,13 +36648,13 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36643
36648
|
fieldNames: t,
|
|
36644
36649
|
onSearch: G,
|
|
36645
36650
|
onDropdownVisibleChange: (X) => {
|
|
36646
|
-
y(X), k.current = null, X &&
|
|
36651
|
+
y(X), k.current = null, X && O(), v.current = !0;
|
|
36647
36652
|
},
|
|
36648
36653
|
objectValue: a,
|
|
36649
36654
|
value: r,
|
|
36650
36655
|
defaultValue: i
|
|
36651
36656
|
}, f), {
|
|
36652
|
-
loading: T ?
|
|
36657
|
+
loading: T ? N : !0,
|
|
36653
36658
|
options: h($(U)),
|
|
36654
36659
|
rawOptions: U,
|
|
36655
36660
|
dropdownRender: (X) => {
|
|
@@ -38065,14 +38070,14 @@ const AppendsTreeSelect = (e) => {
|
|
|
38065
38070
|
const B = w.split(".");
|
|
38066
38071
|
let $ = m[B[0]];
|
|
38067
38072
|
for (let T = 1; T < B.length && $; T++) {
|
|
38068
|
-
const
|
|
38069
|
-
if (m[
|
|
38070
|
-
$ = m[
|
|
38073
|
+
const O = B.slice(0, T + 1).join(".");
|
|
38074
|
+
if (m[O]) {
|
|
38075
|
+
$ = m[O];
|
|
38071
38076
|
break;
|
|
38072
38077
|
}
|
|
38073
38078
|
if (!$.isLeaf && $.loadChildren) {
|
|
38074
|
-
const
|
|
38075
|
-
|
|
38079
|
+
const N = $.loadChildren($);
|
|
38080
|
+
N != null && N.length && (M.push(...N), $ = N.find((V) => V.value === B.slice(0, T + 1).join(".")));
|
|
38076
38081
|
}
|
|
38077
38082
|
}
|
|
38078
38083
|
}), h((w) => M.reduce((B, $) => Object.assign(B, { [$.value]: $ }), x({}, w)));
|
|
@@ -38093,19 +38098,19 @@ const AppendsTreeSelect = (e) => {
|
|
|
38093
38098
|
M.forEach(($) => {
|
|
38094
38099
|
const T = $.split(".");
|
|
38095
38100
|
if (T.length)
|
|
38096
|
-
for (let
|
|
38097
|
-
w.add(T.slice(0,
|
|
38101
|
+
for (let O = 1; O <= T.length; O++)
|
|
38102
|
+
w.add(T.slice(0, O).join("."));
|
|
38098
38103
|
});
|
|
38099
38104
|
o(Array.from(w));
|
|
38100
38105
|
},
|
|
38101
38106
|
[e.multiple, F, o, m]
|
|
38102
38107
|
), k = useCallback(
|
|
38103
38108
|
(L) => {
|
|
38104
|
-
var
|
|
38109
|
+
var O;
|
|
38105
38110
|
const { value: M, onClose: w, disabled: B, closable: $ } = L;
|
|
38106
38111
|
if (!M)
|
|
38107
38112
|
return null;
|
|
38108
|
-
const { fullTitle: T } = (
|
|
38113
|
+
const { fullTitle: T } = (O = m[M]) != null ? O : {};
|
|
38109
38114
|
return /* @__PURE__ */ jsx(Tag, { closable: $ && !B, onClose: w, children: T == null ? void 0 : T.join(" / ") });
|
|
38110
38115
|
},
|
|
38111
38116
|
[m]
|
|
@@ -39211,18 +39216,18 @@ const InternalFileManager = (e) => {
|
|
|
39211
39216
|
(M) => {
|
|
39212
39217
|
try {
|
|
39213
39218
|
return M == null ? void 0 : M.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
|
|
39214
|
-
var $, T,
|
|
39219
|
+
var $, T, O;
|
|
39215
39220
|
let B = p(w[y.label]);
|
|
39216
39221
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
39217
39222
|
if (Array.isArray(B))
|
|
39218
|
-
B = B.map((
|
|
39223
|
+
B = B.map((N, V) => {
|
|
39219
39224
|
var G, U;
|
|
39220
|
-
const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value ===
|
|
39221
|
-
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) ||
|
|
39225
|
+
const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === N);
|
|
39226
|
+
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || N }, V) : /* @__PURE__ */ jsx(Tag, { children: N }, N);
|
|
39222
39227
|
}).reverse();
|
|
39223
39228
|
else {
|
|
39224
|
-
const
|
|
39225
|
-
|
|
39229
|
+
const N = (O = (T = v.uiSchema.enum).find) == null ? void 0 : O.call(T, (V) => V.value === B);
|
|
39230
|
+
N && (B = /* @__PURE__ */ jsx(Tag, { color: N.color, children: N.label }));
|
|
39226
39231
|
}
|
|
39227
39232
|
return (v == null ? void 0 : v.type) === "date" && (B = dayjs(B).format("YYYY-MM-DD")), n ? n({
|
|
39228
39233
|
[y.label]: B || EMPTY,
|
|
@@ -39249,19 +39254,19 @@ const InternalFileManager = (e) => {
|
|
|
39249
39254
|
}), D = (M, w, B) => q(void 0, null, function* () {
|
|
39250
39255
|
const $ = yield k({ parentId: w == null ? void 0 : w.id }), T = [...i];
|
|
39251
39256
|
if (T.splice(B + 1), T[B] = P(x({}, T[B]), { value: w }), w != null && w.id && (T[B + 1] = { key: w == null ? void 0 : w.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(T), ["o2m", "m2m"].includes(g.interface)) {
|
|
39252
|
-
const
|
|
39253
|
-
|
|
39257
|
+
const O = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
39258
|
+
O[A.index] = w, f.fieldValue = O;
|
|
39254
39259
|
} else
|
|
39255
39260
|
f.value = w;
|
|
39256
39261
|
o == null || o(T);
|
|
39257
39262
|
}), j = (M, w, B) => q(void 0, null, function* () {
|
|
39258
|
-
var $, T,
|
|
39263
|
+
var $, T, O;
|
|
39259
39264
|
if (M) {
|
|
39260
39265
|
d(!0);
|
|
39261
|
-
const
|
|
39262
|
-
if (d(!1), c(
|
|
39266
|
+
const N = yield k({ parentId: w == null ? void 0 : w.key });
|
|
39267
|
+
if (d(!1), c(N), B === (i == null ? void 0 : i.length) - 1 && (($ = w == null ? void 0 : w.value) != null && $.id)) {
|
|
39263
39268
|
const V = yield k({ parentId: (T = w == null ? void 0 : w.value) == null ? void 0 : T.id }), E = [...i];
|
|
39264
|
-
E.splice(B + 1), E[B] = P(x({}, E[B]), { value: w == null ? void 0 : w.value }), E[B + 1] = { key: (
|
|
39269
|
+
E.splice(B + 1), E[B] = P(x({}, E[B]), { value: w == null ? void 0 : w.value }), E[B + 1] = { key: (O = w == null ? void 0 : w.value) == null ? void 0 : O.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, a(E), o == null || o(E);
|
|
39265
39270
|
}
|
|
39266
39271
|
}
|
|
39267
39272
|
}), z = (M, w) => q(void 0, null, function* () {
|
|
@@ -39292,12 +39297,12 @@ const InternalFileManager = (e) => {
|
|
|
39292
39297
|
value: ($ = M == null ? void 0 : M.value) == null ? void 0 : $[y.value]
|
|
39293
39298
|
},
|
|
39294
39299
|
labelInValue: !0,
|
|
39295
|
-
onSearch: (
|
|
39300
|
+
onSearch: (O) => z(O, M),
|
|
39296
39301
|
fieldNames: y,
|
|
39297
39302
|
style: { minWidth: 150 },
|
|
39298
|
-
onChange: (
|
|
39303
|
+
onChange: (O, N) => D(O, N, w),
|
|
39299
39304
|
options: u ? [] : R(l),
|
|
39300
|
-
onDropdownVisibleChange: (
|
|
39305
|
+
onDropdownVisibleChange: (O) => j(O, M, w),
|
|
39301
39306
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
39302
39307
|
},
|
|
39303
39308
|
`${(T = M.value) == null ? void 0 : T.id}+ ${M.key} + ${y.label}`
|
|
@@ -39538,13 +39543,13 @@ const InternalNesterCardCss = css`
|
|
|
39538
39543
|
const w = (f == null ? void 0 : f.targetKey) || "id", B = R.map((T) => T[w]).filter(Boolean);
|
|
39539
39544
|
return B.length ? { $and: [{ [`${w}.$ne`]: B }] } : {};
|
|
39540
39545
|
}, z = () => {
|
|
39541
|
-
const { setVisible: w } = useActionContext(), { multiple: B, selectedRows: $, onChange: T, options:
|
|
39546
|
+
const { setVisible: w } = useActionContext(), { multiple: B, selectedRows: $, onChange: T, options: O, collectionField: N } = useContext(RecordPickerContext);
|
|
39542
39547
|
return {
|
|
39543
39548
|
onClick() {
|
|
39544
|
-
T(B ? unionBy($,
|
|
39549
|
+
T(B ? unionBy($, O, (N == null ? void 0 : N.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), w(!1);
|
|
39545
39550
|
},
|
|
39546
39551
|
style: {
|
|
39547
|
-
display: B !== !1 && ["o2m", "m2m", "mbm"].includes(
|
|
39552
|
+
display: B !== !1 && ["o2m", "m2m", "mbm"].includes(N == null ? void 0 : N.interface) ? "block" : "none"
|
|
39548
39553
|
}
|
|
39549
39554
|
};
|
|
39550
39555
|
};
|
|
@@ -39754,7 +39759,15 @@ const getSourceData = (e, t) => {
|
|
|
39754
39759
|
F,
|
|
39755
39760
|
h && (y() ? (
|
|
39756
39761
|
// The recordData here is only provided when the popup is opened, not the current row record
|
|
39757
|
-
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(
|
|
39762
|
+
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(
|
|
39763
|
+
NocoBaseRecursionField,
|
|
39764
|
+
{
|
|
39765
|
+
schema: o,
|
|
39766
|
+
onlyRenderProperties: !0,
|
|
39767
|
+
basePath: l.address,
|
|
39768
|
+
filterProperties: (k) => k["x-component"] !== "Action"
|
|
39769
|
+
}
|
|
39770
|
+
) }) })
|
|
39758
39771
|
) : /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: b, parentRecord: C, children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { schema: o, onlyRenderProperties: !0, basePath: l.address }) }) }) }))
|
|
39759
39772
|
] }) });
|
|
39760
39773
|
}, InternalPopoverNesterContentCss = css`
|
|
@@ -40833,7 +40846,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40833
40846
|
"loading",
|
|
40834
40847
|
"onClickRow"
|
|
40835
40848
|
]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), R = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: k, allIncludesChildren: D } = R, j = useMemoizedFn(b.onRowDragEnd || (() => {
|
|
40836
|
-
})), z = usePaginationProps$2(n, i), L = useTableColumns$1(b, z), [M, w] = useState(() => k ? D : []), [B, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [T,
|
|
40849
|
+
})), z = usePaginationProps$2(n, i), L = useTableColumns$1(b, z), [M, w] = useState(() => k ? D : []), [B, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [T, O] = useState([]), N = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
|
|
40837
40850
|
& > td {
|
|
40838
40851
|
background-color: ${t.controlItemBgActive} !important;
|
|
40839
40852
|
}
|
|
@@ -40842,7 +40855,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40842
40855
|
}
|
|
40843
40856
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? E : "", [E, C]), U = useMemo(() => C ? (ee, ne) => ({
|
|
40844
40857
|
onClick: (se) => {
|
|
40845
|
-
isPortalInBody(se.target) || C(ee,
|
|
40858
|
+
isPortalInBody(se.target) || C(ee, O, T);
|
|
40846
40859
|
},
|
|
40847
40860
|
rowIndex: ne
|
|
40848
40861
|
}) : null, [C, T]);
|
|
@@ -40914,14 +40927,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40914
40927
|
role: "button",
|
|
40915
40928
|
"aria-label": `table-index-${se}`,
|
|
40916
40929
|
className: cls(ee ? "checked" : floatLeftClass, rowSelectCheckboxWrapperClass, {
|
|
40917
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
40930
|
+
[rowSelectCheckboxWrapperClassHover]: N
|
|
40918
40931
|
}),
|
|
40919
40932
|
children: [
|
|
40920
40933
|
/* @__PURE__ */ jsxs("div", { className: cls(ee ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
40921
40934
|
l && /* @__PURE__ */ jsx(SortHandle$1, { id: K(ne) }),
|
|
40922
40935
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: se })
|
|
40923
40936
|
] }),
|
|
40924
|
-
|
|
40937
|
+
N && /* @__PURE__ */ jsx(
|
|
40925
40938
|
"div",
|
|
40926
40939
|
{
|
|
40927
40940
|
className: cls(
|
|
@@ -40946,7 +40959,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40946
40959
|
l,
|
|
40947
40960
|
S,
|
|
40948
40961
|
K,
|
|
40949
|
-
|
|
40962
|
+
N,
|
|
40950
40963
|
Q,
|
|
40951
40964
|
z
|
|
40952
40965
|
]
|
|
@@ -41047,15 +41060,15 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41047
41060
|
}
|
|
41048
41061
|
`, SubTable = observer$1(
|
|
41049
41062
|
(e) => {
|
|
41050
|
-
var B, $, T,
|
|
41063
|
+
var B, $, T, O;
|
|
41051
41064
|
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: i } = useTranslation(), [a, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S } = n.componentProps;
|
|
41052
41065
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
41053
|
-
const y = (
|
|
41054
|
-
if (V !== void 0 && isArr(n.value) &&
|
|
41066
|
+
const y = (N, V) => {
|
|
41067
|
+
if (V !== void 0 && isArr(n.value) && N !== V)
|
|
41055
41068
|
return action(() => {
|
|
41056
|
-
const E = n.value[
|
|
41057
|
-
return n.value.splice(
|
|
41058
|
-
fromIndex:
|
|
41069
|
+
const E = n.value[N];
|
|
41070
|
+
return n.value.splice(N, 1), n.value.splice(V, 0, E), exchangeArrayState(n, {
|
|
41071
|
+
fromIndex: N,
|
|
41059
41072
|
toIndex: V
|
|
41060
41073
|
}), n.onInput(n.value);
|
|
41061
41074
|
});
|
|
@@ -41079,28 +41092,28 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41079
41092
|
setSelectedRows: u,
|
|
41080
41093
|
collectionField: o
|
|
41081
41094
|
}, A = () => {
|
|
41082
|
-
const { setVisible:
|
|
41095
|
+
const { setVisible: N } = useActionContext(), { selectedRows: V, setSelectedRows: E } = useContext(RecordPickerContext);
|
|
41083
41096
|
return {
|
|
41084
41097
|
onClick() {
|
|
41085
41098
|
var U;
|
|
41086
|
-
Array.isArray(n.value) || (n.value = []), V.forEach((H) => n.value.push(markRecordAsNew(H))), n.onInput(n.value), n.initialValue = n.value, E([]),
|
|
41099
|
+
Array.isArray(n.value) || (n.value = []), V.forEach((H) => n.value.push(markRecordAsNew(H))), n.onInput(n.value), n.initialValue = n.value, E([]), N(!1);
|
|
41087
41100
|
const G = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
|
|
41088
41101
|
D(G);
|
|
41089
41102
|
}
|
|
41090
41103
|
};
|
|
41091
41104
|
}, R = () => {
|
|
41092
|
-
const
|
|
41093
|
-
return V.length ? { $and: [{ [`${
|
|
41105
|
+
const N = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((G) => G == null ? void 0 : G[N]).filter(Boolean);
|
|
41106
|
+
return V.length ? { $and: [{ [`${N}.$ne`]: V }] } : {};
|
|
41094
41107
|
}, [k, D] = useState(1), [j, z] = useState(((B = n.componentProps) == null ? void 0 : B.pageSize) || 10);
|
|
41095
41108
|
useEffect(() => {
|
|
41096
|
-
var
|
|
41097
|
-
z((
|
|
41109
|
+
var N;
|
|
41110
|
+
z((N = n.componentProps) == null ? void 0 : N.pageSize);
|
|
41098
41111
|
}, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
|
|
41099
41112
|
const L = useMemo(() => {
|
|
41100
41113
|
var V;
|
|
41101
|
-
const
|
|
41114
|
+
const N = Math.ceil(((V = n.value) == null ? void 0 : V.length) / 10);
|
|
41102
41115
|
return {
|
|
41103
|
-
current: k >
|
|
41116
|
+
current: k > N ? N : k,
|
|
41104
41117
|
pageSize: j || 10,
|
|
41105
41118
|
total: n == null ? void 0 : n.value,
|
|
41106
41119
|
onChange: (E, G) => {
|
|
@@ -41111,13 +41124,13 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41111
41124
|
hideOnSinglePage: !1
|
|
41112
41125
|
};
|
|
41113
41126
|
}, [(T = n.value) == null ? void 0 : T.length, j, k]), M = () => {
|
|
41114
|
-
const { field:
|
|
41127
|
+
const { field: N } = useAssociationFieldContext();
|
|
41115
41128
|
return {
|
|
41116
41129
|
run() {
|
|
41117
41130
|
var E;
|
|
41118
|
-
|
|
41119
|
-
const V = Math.ceil(
|
|
41120
|
-
return D(V),
|
|
41131
|
+
N.value = N.value || [], N.value.push(markRecordAsNew({}));
|
|
41132
|
+
const V = Math.ceil(N.value.length / (((E = N.componentProps) == null ? void 0 : E.pageSize) || 10));
|
|
41133
|
+
return D(V), N.onInput(N.value);
|
|
41121
41134
|
}
|
|
41122
41135
|
};
|
|
41123
41136
|
}, w = () => ({
|
|
@@ -41135,7 +41148,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41135
41148
|
field: n,
|
|
41136
41149
|
showIndex: !0,
|
|
41137
41150
|
dragSort: !1,
|
|
41138
|
-
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (
|
|
41151
|
+
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (N) => n.editable ? S !== !1 ? !0 : N == null ? void 0 : N.__isNewRecord__ : !1 : !1,
|
|
41139
41152
|
pagination: L,
|
|
41140
41153
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
41141
41154
|
isSubTable: !0,
|
|
@@ -41152,7 +41165,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41152
41165
|
{
|
|
41153
41166
|
style: {
|
|
41154
41167
|
marginTop: "10px",
|
|
41155
|
-
position: (
|
|
41168
|
+
position: (O = n.value) != null && O.length ? "absolute" : "relative",
|
|
41156
41169
|
bottom: "0",
|
|
41157
41170
|
gap: 15
|
|
41158
41171
|
},
|
|
@@ -41206,7 +41219,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41206
41219
|
onlyRenderProperties: !0,
|
|
41207
41220
|
basePath: n.address,
|
|
41208
41221
|
schema: p.parent,
|
|
41209
|
-
filterProperties: (
|
|
41222
|
+
filterProperties: (N) => N["x-component"] === "AssociationField.Selector"
|
|
41210
41223
|
}
|
|
41211
41224
|
)
|
|
41212
41225
|
}
|
|
@@ -41305,10 +41318,10 @@ const ReadPretty$7 = observer$1(
|
|
|
41305
41318
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
41306
41319
|
const AssociationSelect = InternalAssociationSelect;
|
|
41307
41320
|
AssociationSelect.Designer = function e() {
|
|
41308
|
-
var B, $, T,
|
|
41321
|
+
var B, $, T, O, N, V, E, G, U, H, K;
|
|
41309
41322
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), A = (B = F == null ? void 0 : F.validateSchema) == null ? void 0 : B.call(F, u), R = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, k = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
41310
41323
|
c.title === R || c.title;
|
|
41311
|
-
const D = useSortFields(S == null ? void 0 : S.target), j = ((
|
|
41324
|
+
const D = useSortFields(S == null ? void 0 : S.target), j = ((N = (O = (T = c.componentProps) == null ? void 0 : T.service) == null ? void 0 : O.params) == null ? void 0 : N.sort) || [];
|
|
41312
41325
|
useEffect(() => {
|
|
41313
41326
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
41314
41327
|
}, [u["x-read-pretty"]]);
|
|
@@ -41815,15 +41828,15 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
41815
41828
|
const T = [];
|
|
41816
41829
|
for (const E of $.rules)
|
|
41817
41830
|
T.push(_.pickBy(E, _.identity));
|
|
41818
|
-
const
|
|
41831
|
+
const O = {
|
|
41819
41832
|
"x-uid": l["x-uid"]
|
|
41820
41833
|
};
|
|
41821
41834
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
41822
41835
|
for (const E of T)
|
|
41823
41836
|
(E.maxValue || E.minValue) && (E.percentMode = !0), E.percentFormat && (E.percentFormats = !0);
|
|
41824
|
-
const
|
|
41825
|
-
a.validator =
|
|
41826
|
-
schema:
|
|
41837
|
+
const N = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], T);
|
|
41838
|
+
a.validator = N, l["x-validator"] = T, O["x-validator"] = T, u.emit("patch", {
|
|
41839
|
+
schema: O
|
|
41827
41840
|
}), d();
|
|
41828
41841
|
}
|
|
41829
41842
|
}
|
|
@@ -41946,7 +41959,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
41946
41959
|
}
|
|
41947
41960
|
},
|
|
41948
41961
|
onSubmit: ({ sort: $ }) => {
|
|
41949
|
-
const T = $.map((
|
|
41962
|
+
const T = $.map((O) => O.direction === "desc" ? `-${O.field}` : O.field);
|
|
41950
41963
|
_.set(a.componentProps, "service.params.sort", T), l["x-component-props"] = a.componentProps, u.emit("patch", {
|
|
41951
41964
|
schema: {
|
|
41952
41965
|
"x-uid": l["x-uid"],
|
|
@@ -41963,13 +41976,13 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
41963
41976
|
options: v,
|
|
41964
41977
|
value: (B = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : B.label,
|
|
41965
41978
|
onChange: ($) => {
|
|
41966
|
-
var
|
|
41979
|
+
var N, V;
|
|
41967
41980
|
const T = {
|
|
41968
41981
|
"x-uid": l["x-uid"]
|
|
41969
|
-
},
|
|
41982
|
+
}, O = P(x(x({}, (V = (N = m == null ? void 0 : m.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : V.fieldNames), a.componentProps.fieldNames), {
|
|
41970
41983
|
label: $
|
|
41971
41984
|
});
|
|
41972
|
-
a.componentProps.fieldNames =
|
|
41985
|
+
a.componentProps.fieldNames = O, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = O, T["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
41973
41986
|
schema: T
|
|
41974
41987
|
}), u.refresh();
|
|
41975
41988
|
}
|
|
@@ -43541,7 +43554,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
43541
43554
|
display: none !important;
|
|
43542
43555
|
}
|
|
43543
43556
|
`,
|
|
43544
|
-
itemRender: ($, T,
|
|
43557
|
+
itemRender: ($, T, O) => T === "prev" ? /* @__PURE__ */ jsxs(
|
|
43545
43558
|
"div",
|
|
43546
43559
|
{
|
|
43547
43560
|
style: { display: "flex" },
|
|
@@ -43551,12 +43564,12 @@ const InternalListBlockProvider = (e) => {
|
|
|
43551
43564
|
}
|
|
43552
43565
|
`,
|
|
43553
43566
|
children: [
|
|
43554
|
-
|
|
43567
|
+
O,
|
|
43555
43568
|
" ",
|
|
43556
43569
|
/* @__PURE__ */ jsx("div", { style: { marginLeft: "7px" }, children: d })
|
|
43557
43570
|
]
|
|
43558
43571
|
}
|
|
43559
|
-
) :
|
|
43572
|
+
) : O
|
|
43560
43573
|
};
|
|
43561
43574
|
})();
|
|
43562
43575
|
return h(
|
|
@@ -46656,18 +46669,18 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46656
46669
|
"sort-field"
|
|
46657
46670
|
);
|
|
46658
46671
|
}, TableBlockDesigner = () => {
|
|
46659
|
-
var k, D, j, z, L, M, w, B, $, T,
|
|
46660
|
-
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (k = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : k.params) == null ? void 0 : D.sort) || [], h = ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.resource) || ((z = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : z.association), g = !((L = i == null ? void 0 : i["x-decorator-props"]) != null && L.disableTemplate), f = m == null ? void 0 : m.map((
|
|
46661
|
-
field:
|
|
46672
|
+
var k, D, j, z, L, M, w, B, $, T, O;
|
|
46673
|
+
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (k = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : k.params) == null ? void 0 : D.sort) || [], h = ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.resource) || ((z = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : z.association), g = !((L = i == null ? void 0 : i["x-decorator-props"]) != null && L.disableTemplate), f = m == null ? void 0 : m.map((N) => N != null && N.startsWith("-") ? {
|
|
46674
|
+
field: N.substring(1),
|
|
46662
46675
|
direction: "desc"
|
|
46663
46676
|
} : {
|
|
46664
|
-
field:
|
|
46677
|
+
field: N,
|
|
46665
46678
|
direction: "asc"
|
|
46666
46679
|
}), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? (M = o(v == null ? void 0 : v.target)) == null ? void 0 : M.tree : !!(b != null && b.tree), A = useCallback(
|
|
46667
|
-
({ filter:
|
|
46668
|
-
|
|
46680
|
+
({ filter: N }) => {
|
|
46681
|
+
N = removeNullCondition(N);
|
|
46669
46682
|
const V = r.decoratorProps.params || {};
|
|
46670
|
-
V.filter =
|
|
46683
|
+
V.filter = N, r.decoratorProps.params = V, i["x-decorator-props"].params = V, d.emit("patch", {
|
|
46671
46684
|
schema: {
|
|
46672
46685
|
"x-uid": i["x-uid"],
|
|
46673
46686
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -46685,11 +46698,11 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46685
46698
|
title: u("Tree table"),
|
|
46686
46699
|
defaultChecked: !0,
|
|
46687
46700
|
checked: F ? r.decoratorProps.treeTable : !1,
|
|
46688
|
-
onChange: (
|
|
46701
|
+
onChange: (N) => {
|
|
46689
46702
|
var E;
|
|
46690
|
-
r.decoratorProps.treeTable =
|
|
46703
|
+
r.decoratorProps.treeTable = N, i["x-decorator-props"].treeTable = N;
|
|
46691
46704
|
const V = P(x({}, (E = c.params) == null ? void 0 : E[0]), {
|
|
46692
|
-
tree:
|
|
46705
|
+
tree: N ? !0 : null
|
|
46693
46706
|
});
|
|
46694
46707
|
d.emit("patch", {
|
|
46695
46708
|
schema: i
|
|
@@ -46702,13 +46715,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46702
46715
|
{
|
|
46703
46716
|
title: u("Enable drag and drop sorting"),
|
|
46704
46717
|
checked: r.decoratorProps.dragSort,
|
|
46705
|
-
onChange: (
|
|
46706
|
-
|
|
46718
|
+
onChange: (N) => q(void 0, null, function* () {
|
|
46719
|
+
N && v && (yield R.resource("collections.fields", v.collectionName).update({
|
|
46707
46720
|
filterByTk: v.name,
|
|
46708
46721
|
values: {
|
|
46709
46722
|
sortable: !0
|
|
46710
46723
|
}
|
|
46711
|
-
})), r.decoratorProps.dragSort =
|
|
46724
|
+
})), r.decoratorProps.dragSort = N, i["x-decorator-props"].dragSort = N, d.emit("patch", {
|
|
46712
46725
|
schema: {
|
|
46713
46726
|
"x-uid": i["x-uid"],
|
|
46714
46727
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -46802,9 +46815,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46802
46815
|
}
|
|
46803
46816
|
}
|
|
46804
46817
|
},
|
|
46805
|
-
onSubmit: ({ sort:
|
|
46818
|
+
onSubmit: ({ sort: N }) => {
|
|
46806
46819
|
var G;
|
|
46807
|
-
const V =
|
|
46820
|
+
const V = N.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), E = r.decoratorProps.params || {};
|
|
46808
46821
|
E.sort = V, r.decoratorProps.params = E, i["x-decorator-props"].params = E, d.emit("patch", {
|
|
46809
46822
|
schema: {
|
|
46810
46823
|
"x-uid": i["x-uid"],
|
|
@@ -46828,10 +46841,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46828
46841
|
{ label: "100", value: 100 },
|
|
46829
46842
|
{ label: "200", value: 200 }
|
|
46830
46843
|
],
|
|
46831
|
-
onChange: (
|
|
46844
|
+
onChange: (N) => {
|
|
46832
46845
|
var E;
|
|
46833
46846
|
const V = r.decoratorProps.params || {};
|
|
46834
|
-
V.pageSize =
|
|
46847
|
+
V.pageSize = N, r.decoratorProps.params = V, i["x-decorator-props"].params = V, c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { pageSize: N, page: 1 })), d.emit("patch", {
|
|
46835
46848
|
schema: {
|
|
46836
46849
|
"x-uid": i["x-uid"],
|
|
46837
46850
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -46844,18 +46857,18 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46844
46857
|
SchemaSettingsSelectItem,
|
|
46845
46858
|
{
|
|
46846
46859
|
title: u("Table size"),
|
|
46847
|
-
value: ((
|
|
46860
|
+
value: ((O = r.componentProps) == null ? void 0 : O.size) || "middle",
|
|
46848
46861
|
options: [
|
|
46849
46862
|
{ label: u("Large"), value: "large" },
|
|
46850
46863
|
{ label: u("Middle"), value: "middle" },
|
|
46851
46864
|
{ label: u("Small"), value: "small" }
|
|
46852
46865
|
],
|
|
46853
|
-
onChange: (
|
|
46866
|
+
onChange: (N) => {
|
|
46854
46867
|
const V = i.reduceProperties((E, G) => {
|
|
46855
46868
|
if (G["x-component"] === "TableV2")
|
|
46856
46869
|
return G;
|
|
46857
46870
|
}, null);
|
|
46858
|
-
V["x-component-props"] = V["x-component-props"] || {}, V["x-component-props"].size =
|
|
46871
|
+
V["x-component-props"] = V["x-component-props"] || {}, V["x-component-props"].size = N, d.emit("patch", {
|
|
46859
46872
|
schema: {
|
|
46860
46873
|
"x-uid": V["x-uid"],
|
|
46861
46874
|
"x-decorator-props": V["x-component-props"]
|
|
@@ -48705,21 +48718,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
48705
48718
|
value: w.name
|
|
48706
48719
|
})), []), k = useCallback(() => {
|
|
48707
48720
|
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: B, include: $ } = w || {}, T = [];
|
|
48708
|
-
return F.forEach((
|
|
48709
|
-
var
|
|
48710
|
-
if (
|
|
48711
|
-
T.push(P(x({},
|
|
48712
|
-
children:
|
|
48721
|
+
return F.forEach((O) => {
|
|
48722
|
+
var N;
|
|
48723
|
+
if (O.key === "systemInfo")
|
|
48724
|
+
T.push(P(x({}, O), {
|
|
48725
|
+
children: O.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? $ != null && $.length ? $.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[V.value] == "boolean" ? o[V.value] : !0)
|
|
48713
48726
|
}));
|
|
48714
48727
|
else {
|
|
48715
48728
|
let V = [];
|
|
48716
48729
|
$ != null && $.length ? $.forEach((E) => {
|
|
48717
48730
|
var U;
|
|
48718
|
-
const G = (U =
|
|
48731
|
+
const G = (U = O == null ? void 0 : O.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
|
|
48719
48732
|
G && V.push(P(x({}, G), {
|
|
48720
48733
|
targetScope: E == null ? void 0 : E.targetScope
|
|
48721
48734
|
}));
|
|
48722
|
-
}) : B != null && B.length ? V = (
|
|
48735
|
+
}) : B != null && B.length ? V = (N = O == null ? void 0 : O.children) == null ? void 0 : N.filter((E) => !B.includes(E.name)) : V = O == null ? void 0 : O.children, V != null && V.length && T.push(P(x({}, O), {
|
|
48723
48736
|
children: V
|
|
48724
48737
|
}));
|
|
48725
48738
|
}
|
|
@@ -49011,7 +49024,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
49011
49024
|
run() {
|
|
49012
49025
|
return q(this, null, function* () {
|
|
49013
49026
|
yield M.submit();
|
|
49014
|
-
const
|
|
49027
|
+
const N = cloneDeep(M.values), V = omit(N, [
|
|
49015
49028
|
"key",
|
|
49016
49029
|
"uiSchemaUid",
|
|
49017
49030
|
"collectionName",
|
|
@@ -49519,7 +49532,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49519
49532
|
const w = [];
|
|
49520
49533
|
g.forEach((B) => {
|
|
49521
49534
|
var V;
|
|
49522
|
-
const $ = v(B),
|
|
49535
|
+
const $ = v(B), O = R(B).map((E) => {
|
|
49523
49536
|
const G = k(E, B);
|
|
49524
49537
|
return {
|
|
49525
49538
|
type: "group",
|
|
@@ -49533,14 +49546,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49533
49546
|
};
|
|
49534
49547
|
})
|
|
49535
49548
|
};
|
|
49536
|
-
}),
|
|
49549
|
+
}), N = (V = $.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : V.map((E) => {
|
|
49537
49550
|
var G;
|
|
49538
49551
|
return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
|
|
49539
|
-
}).concat(
|
|
49552
|
+
}).concat(O);
|
|
49540
49553
|
w.push({
|
|
49541
49554
|
value: B,
|
|
49542
49555
|
label: l($.title || $.name),
|
|
49543
|
-
children:
|
|
49556
|
+
children: N
|
|
49544
49557
|
});
|
|
49545
49558
|
}), h(w);
|
|
49546
49559
|
}, [g, t]), useEffect(() => {
|
|
@@ -49548,31 +49561,31 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49548
49561
|
var B, $;
|
|
49549
49562
|
if (w) {
|
|
49550
49563
|
u(!1), p([]);
|
|
49551
|
-
const T = ($ = Object.values((B = w == null ? void 0 : w.data) == null ? void 0 : B.fields)) == null ? void 0 : $.map((
|
|
49552
|
-
var
|
|
49553
|
-
if (
|
|
49554
|
-
const E = (i == null ? void 0 : i.data.find((G) => G.name ===
|
|
49555
|
-
return P(x({},
|
|
49556
|
-
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((
|
|
49564
|
+
const T = ($ = Object.values((B = w == null ? void 0 : w.data) == null ? void 0 : B.fields)) == null ? void 0 : $.map((O) => {
|
|
49565
|
+
var N, V;
|
|
49566
|
+
if (O.source) {
|
|
49567
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === O.name)) || O;
|
|
49568
|
+
return P(x({}, O), {
|
|
49569
|
+
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((N = E.uiSchema) == null ? void 0 : N.title) || E.name })
|
|
49557
49570
|
});
|
|
49558
49571
|
} else {
|
|
49559
|
-
const E = (i == null ? void 0 : i.data.find((G) => G.name ===
|
|
49572
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === O.name)) || O;
|
|
49560
49573
|
return P(x({}, E), {
|
|
49561
49574
|
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((V = E.uiSchema) == null ? void 0 : V.title) || E.name })
|
|
49562
49575
|
});
|
|
49563
49576
|
}
|
|
49564
49577
|
});
|
|
49565
49578
|
S.value = T, setTimeout(() => {
|
|
49566
|
-
var
|
|
49567
|
-
p(T), y.setValuesIn("sources", (
|
|
49579
|
+
var O, N, V;
|
|
49580
|
+
p(T), y.setValuesIn("sources", (O = w.data) == null ? void 0 : O.sources), f((N = w.data) == null ? void 0 : N.sources), b((V = w == null ? void 0 : w.data) == null ? void 0 : V.unsupportedFields);
|
|
49568
49581
|
});
|
|
49569
49582
|
}
|
|
49570
49583
|
}).catch);
|
|
49571
49584
|
}, [t]);
|
|
49572
49585
|
const L = (w, B) => {
|
|
49573
49586
|
d.splice(B, 1, w), p(d), S.value = d.map(($) => {
|
|
49574
|
-
var
|
|
49575
|
-
const T = typeof $.source == "string" ? $.source : (V = (
|
|
49587
|
+
var O, N, V;
|
|
49588
|
+
const T = typeof $.source == "string" ? $.source : (V = (N = (O = $.source) == null ? void 0 : O.filter) == null ? void 0 : N.call(O, Boolean)) == null ? void 0 : V.join(".");
|
|
49576
49589
|
return P(x({}, $), {
|
|
49577
49590
|
source: T
|
|
49578
49591
|
});
|
|
@@ -49596,10 +49609,10 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49596
49609
|
allowClear: !0,
|
|
49597
49610
|
style: { width: "100%" },
|
|
49598
49611
|
options: D(m),
|
|
49599
|
-
onChange: (T,
|
|
49612
|
+
onChange: (T, O) => {
|
|
49600
49613
|
var V;
|
|
49601
|
-
const
|
|
49602
|
-
L(P(x({}, B), { source: T, uiSchema:
|
|
49614
|
+
const N = (V = A(T == null ? void 0 : T[0])) == null ? void 0 : V.find((E) => E.name === last(T));
|
|
49615
|
+
L(P(x({}, B), { source: T, uiSchema: N == null ? void 0 : N.uiSchema }), $);
|
|
49603
49616
|
},
|
|
49604
49617
|
placeholder: l("Select field source")
|
|
49605
49618
|
}
|
|
@@ -49618,8 +49631,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49618
49631
|
defaultValue: w,
|
|
49619
49632
|
popupMatchSelectWidth: !1,
|
|
49620
49633
|
style: { width: "100%" },
|
|
49621
|
-
options: (T == null ? void 0 : T.possibleTypes.map((
|
|
49622
|
-
onChange: (
|
|
49634
|
+
options: (T == null ? void 0 : T.possibleTypes.map((O) => ({ label: O, value: O }))) || [],
|
|
49635
|
+
onChange: (O) => L(P(x({}, T), { type: O }), $)
|
|
49623
49636
|
}
|
|
49624
49637
|
);
|
|
49625
49638
|
}
|
|
@@ -49630,19 +49643,19 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49630
49643
|
key: "interface",
|
|
49631
49644
|
width: 150,
|
|
49632
49645
|
render: (w, B, $) => {
|
|
49633
|
-
const T = d[$],
|
|
49646
|
+
const T = d[$], O = getInterfaceOptions(z, T.type);
|
|
49634
49647
|
return T.source ? w : /* @__PURE__ */ jsx(
|
|
49635
49648
|
Select$1,
|
|
49636
49649
|
{
|
|
49637
49650
|
defaultValue: w,
|
|
49638
49651
|
style: { width: "100%" },
|
|
49639
49652
|
popupMatchSelectWidth: !1,
|
|
49640
|
-
onChange: (
|
|
49653
|
+
onChange: (N) => {
|
|
49641
49654
|
var E;
|
|
49642
|
-
const V = F(
|
|
49643
|
-
L(P(x({}, T), { interface:
|
|
49655
|
+
const V = F(N);
|
|
49656
|
+
L(P(x({}, T), { interface: N, uiSchema: (E = V == null ? void 0 : V.default) == null ? void 0 : E.uiSchema }), $);
|
|
49644
49657
|
},
|
|
49645
|
-
children:
|
|
49658
|
+
children: O.map((N) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(N.label), children: N.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, N.key))
|
|
49646
49659
|
}
|
|
49647
49660
|
);
|
|
49648
49661
|
}
|
|
@@ -49653,14 +49666,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49653
49666
|
key: "title",
|
|
49654
49667
|
width: 180,
|
|
49655
49668
|
render: (w, B, $) => {
|
|
49656
|
-
var
|
|
49669
|
+
var O;
|
|
49657
49670
|
const T = d[$];
|
|
49658
49671
|
return /* @__PURE__ */ jsx(
|
|
49659
49672
|
Input$3,
|
|
49660
49673
|
{
|
|
49661
|
-
defaultValue: ((
|
|
49662
|
-
onChange: (
|
|
49663
|
-
P(x({}, T), { uiSchema: P(x({}, omit(T == null ? void 0 : T.uiSchema, "rawTitle")), { title:
|
|
49674
|
+
defaultValue: ((O = T == null ? void 0 : T.uiSchema) == null ? void 0 : O.title) || w,
|
|
49675
|
+
onChange: (N) => L(
|
|
49676
|
+
P(x({}, T), { uiSchema: P(x({}, omit(T == null ? void 0 : T.uiSchema, "rawTitle")), { title: N.target.value }) }),
|
|
49664
49677
|
$
|
|
49665
49678
|
)
|
|
49666
49679
|
}
|
|
@@ -49721,8 +49734,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
49721
49734
|
dataIndex: F.name,
|
|
49722
49735
|
key: F.name,
|
|
49723
49736
|
width: 200,
|
|
49724
|
-
render: ($, T,
|
|
49725
|
-
const
|
|
49737
|
+
render: ($, T, O) => {
|
|
49738
|
+
const N = T[F.name], V = {
|
|
49726
49739
|
type: "object",
|
|
49727
49740
|
properties: {
|
|
49728
49741
|
[F.name]: {
|
|
@@ -49730,11 +49743,11 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
49730
49743
|
"x-component": D && A ? "CollectionField" : "Input",
|
|
49731
49744
|
"x-read-pretty": !0,
|
|
49732
49745
|
"x-collection-field": A == null ? void 0 : A.join("."),
|
|
49733
|
-
default: F.interface === "json" ? JSON.stringify(
|
|
49746
|
+
default: F.interface === "json" ? JSON.stringify(N) : N
|
|
49734
49747
|
}
|
|
49735
49748
|
}
|
|
49736
49749
|
};
|
|
49737
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name:
|
|
49750
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: O, onlyRenderProperties: !0 }) });
|
|
49738
49751
|
}
|
|
49739
49752
|
};
|
|
49740
49753
|
});
|
|
@@ -50063,15 +50076,15 @@ const AsyncDataProvider = (e) => {
|
|
|
50063
50076
|
style: { width: "100%" },
|
|
50064
50077
|
popupMatchSelectWidth: !1,
|
|
50065
50078
|
onChange: (M) => {
|
|
50066
|
-
var B, $, T,
|
|
50079
|
+
var B, $, T, O, N;
|
|
50067
50080
|
const w = p(M);
|
|
50068
50081
|
S(
|
|
50069
50082
|
P(x({}, z), {
|
|
50070
50083
|
interface: M || null,
|
|
50071
50084
|
uiSchema: P(x({}, (B = w == null ? void 0 : w.default) == null ? void 0 : B.uiSchema), {
|
|
50072
|
-
title: ((T = ($ = w == null ? void 0 : w.default) == null ? void 0 : $.uiSchema) == null ? void 0 : T.title) || ((
|
|
50085
|
+
title: ((T = ($ = w == null ? void 0 : w.default) == null ? void 0 : $.uiSchema) == null ? void 0 : T.title) || ((O = z.uiSchema) == null ? void 0 : O.title)
|
|
50073
50086
|
}),
|
|
50074
|
-
type: (
|
|
50087
|
+
type: (N = w == null ? void 0 : w.default) == null ? void 0 : N.type
|
|
50075
50088
|
}),
|
|
50076
50089
|
j
|
|
50077
50090
|
);
|
|
@@ -58976,9 +58989,9 @@ const ActionInitializerItem = (e) => {
|
|
|
58976
58989
|
(S || Y) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
58977
58990
|
filter: void 0
|
|
58978
58991
|
})), y(!S), K.stopPropagation();
|
|
58979
|
-
}, N = (K) => {
|
|
58980
|
-
K.stopPropagation();
|
|
58981
58992
|
}, O = (K) => {
|
|
58993
|
+
K.stopPropagation();
|
|
58994
|
+
}, N = (K) => {
|
|
58982
58995
|
m(K);
|
|
58983
58996
|
}, V = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
|
|
58984
58997
|
return t(
|
|
@@ -59004,8 +59017,8 @@ const ActionInitializerItem = (e) => {
|
|
|
59004
59017
|
autoFocus: !0,
|
|
59005
59018
|
placeholder: "Search...",
|
|
59006
59019
|
className: "search",
|
|
59007
|
-
onClick:
|
|
59008
|
-
onChange:
|
|
59020
|
+
onClick: O,
|
|
59021
|
+
onChange: N
|
|
59009
59022
|
}
|
|
59010
59023
|
) : c(V) }),
|
|
59011
59024
|
/* @__PURE__ */ jsx(
|
|
@@ -59412,7 +59425,7 @@ function useMenuSearch({
|
|
|
59412
59425
|
})) : g, [e, c, u, g]);
|
|
59413
59426
|
}
|
|
59414
59427
|
const DataBlockInitializer = (e) => {
|
|
59415
|
-
var
|
|
59428
|
+
var $, T;
|
|
59416
59429
|
const {
|
|
59417
59430
|
templateWrap: t,
|
|
59418
59431
|
onCreateBlockSchema: n,
|
|
@@ -59431,21 +59444,22 @@ const DataBlockInitializer = (e) => {
|
|
|
59431
59444
|
onClick: f,
|
|
59432
59445
|
filterOtherRecordsCollection: C,
|
|
59433
59446
|
currentText: b,
|
|
59434
|
-
otherText: S
|
|
59435
|
-
|
|
59436
|
-
|
|
59437
|
-
|
|
59447
|
+
otherText: S,
|
|
59448
|
+
alwaysRenderMenu: y
|
|
59449
|
+
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), A = useCompile(), { getTemplateSchemaByMode: R } = useSchemaTemplateManager(), k = useCallback(
|
|
59450
|
+
(O) => q(void 0, null, function* () {
|
|
59451
|
+
const { item: N, fromOthersInPopup: V } = O;
|
|
59438
59452
|
if (f)
|
|
59439
|
-
return f(
|
|
59453
|
+
return f(O);
|
|
59440
59454
|
if (N.template) {
|
|
59441
|
-
const
|
|
59442
|
-
|
|
59455
|
+
const E = yield R(N);
|
|
59456
|
+
v(t ? t(E, { item: N, fromOthersInPopup: V }) : E);
|
|
59443
59457
|
} else
|
|
59444
|
-
n && n({ item: N, fromOthersInPopup:
|
|
59445
|
-
|
|
59458
|
+
n && n({ item: N, fromOthersInPopup: V });
|
|
59459
|
+
F(!1);
|
|
59446
59460
|
}),
|
|
59447
|
-
[
|
|
59448
|
-
),
|
|
59461
|
+
[R, v, F, n, f, t]
|
|
59462
|
+
), D = h || // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
59449
59463
|
useCollectionDataSourceItems({
|
|
59450
59464
|
name: i,
|
|
59451
59465
|
componentName: o,
|
|
@@ -59456,32 +59470,32 @@ const DataBlockInitializer = (e) => {
|
|
|
59456
59470
|
showAssociationFields: d,
|
|
59457
59471
|
dataBlockInitializerProps: e,
|
|
59458
59472
|
hideOtherRecordsInPopup: g,
|
|
59459
|
-
onClick:
|
|
59473
|
+
onClick: k,
|
|
59460
59474
|
currentText: b,
|
|
59461
59475
|
otherText: S
|
|
59462
|
-
}),
|
|
59463
|
-
let
|
|
59464
|
-
return p &&
|
|
59476
|
+
}), j = useGetSchemaInitializerMenuItems(k), z = useMemo(() => j(D, i), [j, D, i]), [L, M] = useState([]), w = useMenuSearch({ data: z, openKeys: L, hideSearch: u }), B = useMemo(() => {
|
|
59477
|
+
let O = w.filter((N) => N.key !== "search" && N.key !== "empty");
|
|
59478
|
+
return p && O.length === 1 ? O = O[0].children : O = w, [
|
|
59465
59479
|
{
|
|
59466
59480
|
key: i,
|
|
59467
|
-
label:
|
|
59481
|
+
label: A(a),
|
|
59468
59482
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
59469
59483
|
onClick: (N) => {
|
|
59470
|
-
N.key === i &&
|
|
59484
|
+
N.key === i && k(P(x({}, N), { item: e }));
|
|
59471
59485
|
},
|
|
59472
|
-
children:
|
|
59486
|
+
children: O
|
|
59473
59487
|
}
|
|
59474
59488
|
];
|
|
59475
|
-
}, [
|
|
59476
|
-
return
|
|
59489
|
+
}, [w, p, i, A, a, r, k, e]);
|
|
59490
|
+
return z.length > 1 || z.length === 1 && ((T = ($ = z[0]) == null ? void 0 : $.children) == null ? void 0 : T.length) > 0 || y ? /* @__PURE__ */ jsx(
|
|
59477
59491
|
SchemaInitializerMenu,
|
|
59478
59492
|
{
|
|
59479
|
-
onOpenChange: (
|
|
59480
|
-
|
|
59493
|
+
onOpenChange: (O) => {
|
|
59494
|
+
M(O);
|
|
59481
59495
|
},
|
|
59482
|
-
items:
|
|
59496
|
+
items: B
|
|
59483
59497
|
}
|
|
59484
|
-
) : /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({}, e), { onClick:
|
|
59498
|
+
) : /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({}, e), { onClick: k }));
|
|
59485
59499
|
}, G2PlotInitializer = () => {
|
|
59486
59500
|
const e = useSchemaInitializerItem(), { insert: t } = useSchemaInitializer();
|
|
59487
59501
|
return /* @__PURE__ */ jsx(
|