@nocobase/client 1.4.0-beta.7 → 1.4.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +247 -247
- package/lib/index.js +43 -43
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var be = (e, t, o) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
De.call(t, o) && be(e, o, t[o]);
|
|
12
12
|
return e;
|
|
13
13
|
}, F = (e, t) => Be(e, $e(t));
|
|
14
|
-
var
|
|
14
|
+
var K = (e, t) => {
|
|
15
15
|
var o = {};
|
|
16
16
|
for (var n in e)
|
|
17
17
|
Re.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
@@ -4287,7 +4287,7 @@ function addAppVersion(e, t) {
|
|
|
4287
4287
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4288
4288
|
}), e;
|
|
4289
4289
|
}
|
|
4290
|
-
const name = "@nocobase/client", version$1 = "1.4.0-beta.
|
|
4290
|
+
const name = "@nocobase/client", version$1 = "1.4.0-beta.8", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4291
4291
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4292
4292
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4293
4293
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4309,9 +4309,9 @@ const name = "@nocobase/client", version$1 = "1.4.0-beta.7", license = "AGPL-3.0
|
|
|
4309
4309
|
"@formily/reactive-react": "^2.2.27",
|
|
4310
4310
|
"@formily/shared": "^2.2.27",
|
|
4311
4311
|
"@formily/validator": "^2.2.27",
|
|
4312
|
-
"@nocobase/evaluators": "1.4.0-beta.
|
|
4313
|
-
"@nocobase/sdk": "1.4.0-beta.
|
|
4314
|
-
"@nocobase/utils": "1.4.0-beta.
|
|
4312
|
+
"@nocobase/evaluators": "1.4.0-beta.8",
|
|
4313
|
+
"@nocobase/sdk": "1.4.0-beta.8",
|
|
4314
|
+
"@nocobase/utils": "1.4.0-beta.8",
|
|
4315
4315
|
ahooks: "^3.7.2",
|
|
4316
4316
|
antd: "5.12.8",
|
|
4317
4317
|
"antd-style": "3.7.1",
|
|
@@ -6631,7 +6631,7 @@ const DataBlockResourceContext = createContext(null), RerenderDataBlockProvider
|
|
|
6631
6631
|
return /* @__PURE__ */ jsx(r.Component, { name: r.name, allowNull: n, children: e.children });
|
|
6632
6632
|
}, DataBlockProvider = withDynamicSchemaProps(
|
|
6633
6633
|
(e) => {
|
|
6634
|
-
const c = e, { collection: t, association: o, dataSource: n, children: r, hidden: i } = c, a =
|
|
6634
|
+
const c = e, { collection: t, association: o, dataSource: n, children: r, hidden: i } = c, a = K(c, ["collection", "association", "dataSource", "children", "hidden"]), { dn: l } = useDesignable();
|
|
6635
6635
|
return i ? null : /* @__PURE__ */ jsx(
|
|
6636
6636
|
DataBlockContext.Provider,
|
|
6637
6637
|
{
|
|
@@ -8716,7 +8716,7 @@ Object.keys(antIcons).forEach((e) => {
|
|
|
8716
8716
|
e.endsWith("Outlined") && registerIcon(e, antIcons[e]);
|
|
8717
8717
|
});
|
|
8718
8718
|
const Icon = (e) => {
|
|
8719
|
-
const r = e, { type: t = "", component: o } = r, n =
|
|
8719
|
+
const r = e, { type: t = "", component: o } = r, n = K(r, ["type", "component"]);
|
|
8720
8720
|
if (o)
|
|
8721
8721
|
return /* @__PURE__ */ jsx(antIcons__default, x({ component: o }, n));
|
|
8722
8722
|
if (t && icons.has(t.toLowerCase())) {
|
|
@@ -8788,7 +8788,7 @@ class PluginSettingsManager {
|
|
|
8788
8788
|
const n = this.hasAuth(t), r = this.getSetting(t);
|
|
8789
8789
|
if (o && !n || !r)
|
|
8790
8790
|
return null;
|
|
8791
|
-
const i = Object.keys(r.children || {}).sort((p, m) => p.localeCompare(m)).map((p) => this.get(r.children[p].name, o)).filter(Boolean).sort((p, m) => (p.sort || 0) - (m.sort || 0)), d = r, { title: a, icon: l, aclSnippet: c } = d, u =
|
|
8791
|
+
const i = Object.keys(r.children || {}).sort((p, m) => p.localeCompare(m)).map((p) => this.get(r.children[p].name, o)).filter(Boolean).sort((p, m) => (p.sort || 0) - (m.sort || 0)), d = r, { title: a, icon: l, aclSnippet: c } = d, u = K(d, ["title", "icon", "aclSnippet"]);
|
|
8792
8792
|
return F(x({
|
|
8793
8793
|
isTopLevel: t === r.topLevelName
|
|
8794
8794
|
}, u), {
|
|
@@ -8814,7 +8814,7 @@ class PluginSettingsManager {
|
|
|
8814
8814
|
}
|
|
8815
8815
|
const AppComponent = observer(
|
|
8816
8816
|
(o) => {
|
|
8817
|
-
var n = o, { children: e } = n, t =
|
|
8817
|
+
var n = o, { children: e } = n, t = K(n, ["children"]);
|
|
8818
8818
|
var l, c;
|
|
8819
8819
|
const { app: r } = t, i = useCallback((u, d) => {
|
|
8820
8820
|
console.error(u);
|
|
@@ -8886,7 +8886,7 @@ class RouterManager {
|
|
|
8886
8886
|
if (Object.keys(i).length === 1 && i.children)
|
|
8887
8887
|
r.push(...o(i.children));
|
|
8888
8888
|
else {
|
|
8889
|
-
const a = i, { Component: l, element: c, children: u } = a, d =
|
|
8889
|
+
const a = i, { Component: l, element: c, children: u } = a, d = K(a, ["Component", "element", "children"]);
|
|
8890
8890
|
let p = c;
|
|
8891
8891
|
l && (typeof l == "string" ? p = this.app.renderComponent(l) : p = React.createElement(l));
|
|
8892
8892
|
const m = F(x({}, d), {
|
|
@@ -8915,7 +8915,7 @@ class RouterManager {
|
|
|
8915
8915
|
* @internal
|
|
8916
8916
|
*/
|
|
8917
8917
|
getRouterComponent(t) {
|
|
8918
|
-
const u = this.options, { type: o = "browser" } = u, n =
|
|
8918
|
+
const u = this.options, { type: o = "browser" } = u, n = K(u, ["type"]), i = {
|
|
8919
8919
|
hash: HashRouter,
|
|
8920
8920
|
browser: BrowserRouter,
|
|
8921
8921
|
memory: MemoryRouter
|
|
@@ -9328,7 +9328,7 @@ function withInitializer(e) {
|
|
|
9328
9328
|
);
|
|
9329
9329
|
}
|
|
9330
9330
|
const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializerMenuProvider = (e) => /* @__PURE__ */ jsx(SchemaInitializerSubMenuContext.Provider, { value: { isInMenu: !0 }, children: e.children }), useSchemaInitializerSubMenuContext = () => React.useContext(SchemaInitializerSubMenuContext), SchemaInitializerMenu = (e) => {
|
|
9331
|
-
const { componentCls: t, hashId: o } = useSchemaInitializerStyles(), l = e, { items: n } = l, r =
|
|
9331
|
+
const { componentCls: t, hashId: o } = useSchemaInitializerStyles(), l = e, { items: n } = l, r = K(l, ["items"]), { token: i } = theme.useToken(), a = useMemo(
|
|
9332
9332
|
() => n.map((c) => F(x({}, c), {
|
|
9333
9333
|
popupClassName: `${o} ${t}-menu-sub`
|
|
9334
9334
|
})),
|
|
@@ -9377,7 +9377,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
9377
9377
|
) });
|
|
9378
9378
|
}, SchemaInitializerSubMenu = (e) => {
|
|
9379
9379
|
var f;
|
|
9380
|
-
const g = e, { children: t, items: o, title: n, name: r, onOpenChange: i, icon: a } = g, l =
|
|
9380
|
+
const g = e, { children: t, items: o, title: n, name: r, onOpenChange: i, icon: a } = g, l = K(g, ["children", "items", "title", "name", "onOpenChange", "icon"]), c = useCompile(), u = useSchemaInitializerItem(), d = useMemo(() => r || (u == null ? void 0 : u.name) || uid(), [r, u]), p = (f = o || t) == null ? void 0 : f.filter((C) => C.useVisible ? C.useVisible() : !0), m = useSchemaInitializerMenuItems(p, r), h = useMemo(() => [
|
|
9381
9381
|
F(x({}, l), {
|
|
9382
9382
|
key: d,
|
|
9383
9383
|
label: c(n),
|
|
@@ -9456,7 +9456,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
9456
9456
|
const e = useSchemaInitializerItem();
|
|
9457
9457
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, x({}, e));
|
|
9458
9458
|
}, SchemaInitializerSwitch = (e) => {
|
|
9459
|
-
const i = e, { title: t, checked: o } = i, n =
|
|
9459
|
+
const i = e, { title: t, checked: o } = i, n = K(i, ["title", "checked"]), r = useCompile();
|
|
9460
9460
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, F(x({}, n), { closeInitializerMenuWhenClick: !1, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
9461
9461
|
r(t),
|
|
9462
9462
|
/* @__PURE__ */ jsx(Switch, { disabled: e.disabled, style: { marginLeft: 20 }, size: "small", checked: o })
|
|
@@ -9488,7 +9488,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
9488
9488
|
hideIfNoChildren: c,
|
|
9489
9489
|
componentProps: u,
|
|
9490
9490
|
sort: d
|
|
9491
|
-
} = I, p =
|
|
9491
|
+
} = I, p = K(I, [
|
|
9492
9492
|
"type",
|
|
9493
9493
|
"Component",
|
|
9494
9494
|
"component",
|
|
@@ -9624,7 +9624,7 @@ const SearchFields = ({ value: e, onChange: t, name: o }) => {
|
|
|
9624
9624
|
const { items: t } = e;
|
|
9625
9625
|
return t.length === 0 ? null : /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: t });
|
|
9626
9626
|
}, SchemaInitializerActionModalItemComponent = React.forwardRef((e, t) => {
|
|
9627
|
-
const r = e, { onClick: o } = r, n =
|
|
9627
|
+
const r = e, { onClick: o } = r, n = K(r, ["onClick"]);
|
|
9628
9628
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, F(x({ ref: t }, n), { onClick: (i) => o == null ? void 0 : o(i.event, !1) }));
|
|
9629
9629
|
}), SchemaInitializerActionModal = (e) => {
|
|
9630
9630
|
const { title: t, icon: o, width: n, schema: r, buttonText: i, btnStyles: a, isItem: l, component: c, onCancel: u, onSubmit: d } = e, { setVisible: p } = useSchemaInitializer(), m = useCallback(() => {
|
|
@@ -9722,7 +9722,7 @@ const SearchFields = ({ value: e, onChange: t, name: o }) => {
|
|
|
9722
9722
|
const e = useSchemaInitializerItem();
|
|
9723
9723
|
return /* @__PURE__ */ jsx(SchemaInitializerActionModal, x({}, e));
|
|
9724
9724
|
}, SchemaInitializerSelect = (e) => {
|
|
9725
|
-
const h = e, { title: t, options: o, value: n, onChange: r, openOnHover: i, onClick: a } = h, l =
|
|
9725
|
+
const h = e, { title: t, options: o, value: n, onChange: r, openOnHover: i, onClick: a } = h, l = K(h, ["title", "options", "value", "onChange", "openOnHover", "onClick"]), [c, u] = useState(!1), d = useCallback(
|
|
9726
9726
|
(...g) => {
|
|
9727
9727
|
u(!1), a == null || a(...g);
|
|
9728
9728
|
},
|
|
@@ -9787,7 +9787,7 @@ const SearchFields = ({ value: e, onChange: t, name: o }) => {
|
|
|
9787
9787
|
[e, t]
|
|
9788
9788
|
) };
|
|
9789
9789
|
}, SchemaInitializerButton = React.memo((e) => {
|
|
9790
|
-
const a = e, { style: t, options: o } = a, n =
|
|
9790
|
+
const a = e, { style: t, options: o } = a, n = K(a, ["style", "options"]), r = useCompile(), { getAriaLabel: i } = useGetAriaLabelOfSchemaInitializer();
|
|
9791
9791
|
return /* @__PURE__ */ jsx(
|
|
9792
9792
|
Button,
|
|
9793
9793
|
F(x({
|
|
@@ -9919,10 +9919,10 @@ const DesignableSwitch = () => {
|
|
|
9919
9919
|
});
|
|
9920
9920
|
SchemaComponentOptions.displayName = "SchemaComponentOptions";
|
|
9921
9921
|
const WithForm$1 = (e) => {
|
|
9922
|
-
const c = e, { children: t, form: o } = c, n =
|
|
9922
|
+
const c = e, { children: t, form: o } = c, n = K(c, ["children", "form"]), r = useContext(SchemaOptionsContext), i = useContext(SchemaExpressionScopeContext), a = x(x({}, r == null ? void 0 : r.scope), i), l = x({}, r == null ? void 0 : r.components);
|
|
9923
9923
|
return /* @__PURE__ */ jsx(FormProvider$1, F(x({}, n), { form: o, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: l, scope: a, children: t }) }));
|
|
9924
9924
|
}, WithoutForm$1 = (e) => {
|
|
9925
|
-
const c = e, { children: t } = c, o =
|
|
9925
|
+
const c = e, { children: t } = c, o = K(c, ["children"]), n = useContext(SchemaOptionsContext), r = useContext(SchemaExpressionScopeContext), i = x(x({}, n == null ? void 0 : n.scope), r), a = x({}, n == null ? void 0 : n.components), l = useMemo(() => createForm(), []);
|
|
9926
9926
|
return /* @__PURE__ */ jsx(FormProvider$1, F(x({}, o), { form: l, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: a, scope: i, children: t }) }));
|
|
9927
9927
|
}, FormProvider = (e) => e.form ? /* @__PURE__ */ jsx(WithForm$1, x({}, e)) : /* @__PURE__ */ jsx(WithoutForm$1, x({}, e));
|
|
9928
9928
|
function toSchema(e) {
|
|
@@ -9934,7 +9934,7 @@ function toSchema(e) {
|
|
|
9934
9934
|
}) : new Schema(e);
|
|
9935
9935
|
}
|
|
9936
9936
|
const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), RecursionSchemaComponent = memo((e) => {
|
|
9937
|
-
const u = e, { components: t, scope: o, schema: n, distributed: r } = u, i =
|
|
9937
|
+
const u = e, { components: t, scope: o, schema: n, distributed: r } = u, i = K(u, ["components", "scope", "schema", "distributed"]), a = useContext(SchemaComponentContext), l = useMemo(() => toSchema(n), [n]), c = useUpdate();
|
|
9938
9938
|
return /* @__PURE__ */ jsx(
|
|
9939
9939
|
SchemaComponentContext.Provider,
|
|
9940
9940
|
{
|
|
@@ -9949,11 +9949,11 @@ const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), RecursionSchema
|
|
|
9949
9949
|
}
|
|
9950
9950
|
);
|
|
9951
9951
|
}), MemoizedSchemaComponent = memo((e) => {
|
|
9952
|
-
const r = e, { schema: t } = r, o =
|
|
9952
|
+
const r = e, { schema: t } = r, o = K(r, ["schema"]), n = useMemoizedSchema(t);
|
|
9953
9953
|
return /* @__PURE__ */ jsx(RecursionSchemaComponent, F(x({}, o), { schema: n }));
|
|
9954
9954
|
}), SchemaComponent = memo(
|
|
9955
9955
|
(e) => {
|
|
9956
|
-
const n = e, { memoized: t } = n, o =
|
|
9956
|
+
const n = e, { memoized: t } = n, o = K(n, ["memoized"]);
|
|
9957
9957
|
return t ? /* @__PURE__ */ jsx(MemoizedSchemaComponent, x({}, o)) : /* @__PURE__ */ jsx(RecursionSchemaComponent, x({}, o));
|
|
9958
9958
|
}
|
|
9959
9959
|
), useRequestSchema$1 = ({
|
|
@@ -10044,7 +10044,7 @@ class SchemaComponentPlugin extends Plugin {
|
|
|
10044
10044
|
}
|
|
10045
10045
|
}
|
|
10046
10046
|
const TabsContext = React.createContext({}), TabsContextProvider = (o) => {
|
|
10047
|
-
var n = o, { children: e } = n, t =
|
|
10047
|
+
var n = o, { children: e } = n, t = K(n, ["children"]);
|
|
10048
10048
|
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: t, children: e });
|
|
10049
10049
|
}, useTabsContext = () => React.useContext(TabsContext), PopupSettingsContext = React.createContext({
|
|
10050
10050
|
enableURL: !0
|
|
@@ -10467,14 +10467,14 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10467
10467
|
const G = `/${$}/${U[O.sourceKey || q]}/${k}:${getAction(O.type)}`;
|
|
10468
10468
|
if (hasRequested(G))
|
|
10469
10469
|
return getRequested(G);
|
|
10470
|
-
const
|
|
10470
|
+
const H = n.request({
|
|
10471
10471
|
headers: getDataSourceHeaders(A),
|
|
10472
10472
|
url: G,
|
|
10473
10473
|
params: {
|
|
10474
10474
|
appends: b == null ? void 0 : b.appends
|
|
10475
10475
|
}
|
|
10476
10476
|
}).then((W) => (clearRequested(G), U[k] = W.data.data, U[k]));
|
|
10477
|
-
return stashRequested(G,
|
|
10477
|
+
return stashRequested(G, H), H;
|
|
10478
10478
|
}
|
|
10479
10479
|
return U == null ? void 0 : U[k];
|
|
10480
10480
|
});
|
|
@@ -11695,7 +11695,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
11695
11695
|
childrenColumnName: i,
|
|
11696
11696
|
expandFlag: a = !1,
|
|
11697
11697
|
fieldNames: l
|
|
11698
|
-
} = b, c =
|
|
11698
|
+
} = b, c = K(b, [
|
|
11699
11699
|
"params",
|
|
11700
11700
|
"showIndex",
|
|
11701
11701
|
"dragSort",
|
|
@@ -12341,7 +12341,7 @@ const useStyles$j = genStyleHook("nb-action-drawer", (e) => {
|
|
|
12341
12341
|
["large", "70%"]
|
|
12342
12342
|
]), InternalActionDrawer = observer$1(
|
|
12343
12343
|
(e) => {
|
|
12344
|
-
const y = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: o } = y, n =
|
|
12344
|
+
const y = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: o } = y, n = K(y, ["footerNodeName", "zIndex"]), { visible: r, setVisible: i, openSize: a = "middle", drawerProps: l, modalProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$j(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((v, I) => I["x-component"] === t ? I : v), { hidden: C } = useCurrentPopupContext(), S = useMemo(() => F(x(x({}, l == null ? void 0 : l.style), n == null ? void 0 : n.style), {
|
|
12345
12345
|
display: C ? "none" : "block"
|
|
12346
12346
|
}), [C, l == null ? void 0 : l.style, n == null ? void 0 : n.style]), b = o || g + (e.level || 0);
|
|
12347
12347
|
return /* @__PURE__ */ jsx(zIndexContext.Provider, { value: b, children: /* @__PURE__ */ jsx(TabsContextProvider, F(x({}, h), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
|
|
@@ -12402,7 +12402,7 @@ const useGetAriaLabelOfModal = () => {
|
|
|
12402
12402
|
["large", "80%"]
|
|
12403
12403
|
]), InternalActionModal = observer$1(
|
|
12404
12404
|
(e) => {
|
|
12405
|
-
const v = e, { footerNodeName: t = "Action.Modal.Footer", width: o, zIndex: n } = v, r =
|
|
12405
|
+
const v = e, { footerNodeName: t = "Action.Modal.Footer", width: o, zIndex: n } = v, r = K(v, ["footerNodeName", "width", "zIndex"]), { visible: i, setVisible: a, openSize: l = "middle", modalProps: c } = useActionContext(), u = o != null ? o : openSizeWidthMap.get(l), d = useFieldSchema(), p = useField(), { token: m } = useToken$1(), h = useTabsContext(), g = useZIndexContext(), f = d.reduceProperties((I, w) => w["x-component"] === t ? w : I), { hidden: C } = useCurrentPopupContext(), S = useMemo(() => ({
|
|
12406
12406
|
mask: {
|
|
12407
12407
|
display: C ? "none" : "block"
|
|
12408
12408
|
},
|
|
@@ -12484,7 +12484,7 @@ ActionModal.Footer = observer$1(
|
|
|
12484
12484
|
{ displayName: "ActionModal.Footer" }
|
|
12485
12485
|
);
|
|
12486
12486
|
const useDef$3 = () => ({}), useProps = (e = {}) => {
|
|
12487
|
-
const i = e, { useProps: t = useDef$3 } = i, o =
|
|
12487
|
+
const i = e, { useProps: t = useDef$3 } = i, o = K(i, ["useProps"]);
|
|
12488
12488
|
let n = t;
|
|
12489
12489
|
typeof t != "function" && (n = useDef$3);
|
|
12490
12490
|
const r = n();
|
|
@@ -12506,7 +12506,7 @@ ActionContainer.Footer = observer$1(
|
|
|
12506
12506
|
const SchemaToolbarContext = createContext({});
|
|
12507
12507
|
SchemaToolbarContext.displayName = "SchemaToolbarContext";
|
|
12508
12508
|
const SchemaToolbarProvider = (e) => {
|
|
12509
|
-
const n = e, { children: t } = n, o =
|
|
12509
|
+
const n = e, { children: t } = n, o = K(n, ["children"]);
|
|
12510
12510
|
return /* @__PURE__ */ jsx(SchemaToolbarContext.Provider, { value: o, children: t });
|
|
12511
12511
|
};
|
|
12512
12512
|
function useSchemaToolbar() {
|
|
@@ -13643,7 +13643,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
13643
13643
|
return useEffect(() => {
|
|
13644
13644
|
var T, A, D, $, L, z, j, R, B, M, k, N, O;
|
|
13645
13645
|
if (!((T = t == null ? void 0 : t.service) != null && T.loading)) {
|
|
13646
|
-
const q = (D = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : D.data.map((E) =>
|
|
13646
|
+
const q = (D = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : D.data.map((E) => E);
|
|
13647
13647
|
e.value = q, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (z = (L = t == null ? void 0 : t.service) == null ? void 0 : L.data) == null ? void 0 : z.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (M = (B = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : B.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (O = (N = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : N.meta) == null ? void 0 : O.page;
|
|
13648
13648
|
}
|
|
13649
13649
|
}, [
|
|
@@ -14897,7 +14897,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14897
14897
|
template: a,
|
|
14898
14898
|
settings: l,
|
|
14899
14899
|
action: c = "list"
|
|
14900
|
-
} = m, u =
|
|
14900
|
+
} = m, u = K(m, [
|
|
14901
14901
|
"formItemInitializers",
|
|
14902
14902
|
"actionInitializers",
|
|
14903
14903
|
"collection",
|
|
@@ -14973,7 +14973,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14973
14973
|
template: d,
|
|
14974
14974
|
title: p,
|
|
14975
14975
|
settings: m
|
|
14976
|
-
} = C, h =
|
|
14976
|
+
} = C, h = K(C, [
|
|
14977
14977
|
"formItemInitializers",
|
|
14978
14978
|
"actionInitializers",
|
|
14979
14979
|
"collection",
|
|
@@ -15045,7 +15045,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
15045
15045
|
resource: a,
|
|
15046
15046
|
template: l,
|
|
15047
15047
|
settings: c
|
|
15048
|
-
} = m, u =
|
|
15048
|
+
} = m, u = K(m, [
|
|
15049
15049
|
"formItemInitializers",
|
|
15050
15050
|
"actionInitializers",
|
|
15051
15051
|
"collection",
|
|
@@ -15111,7 +15111,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
15111
15111
|
dataSource: c,
|
|
15112
15112
|
blockType: u,
|
|
15113
15113
|
pageSize: d = 20
|
|
15114
|
-
} = h, p =
|
|
15114
|
+
} = h, p = K(h, [
|
|
15115
15115
|
"collection",
|
|
15116
15116
|
"rowKey",
|
|
15117
15117
|
"tableActionInitializers",
|
|
@@ -16535,7 +16535,7 @@ function RemoveButton(e = {}) {
|
|
|
16535
16535
|
] });
|
|
16536
16536
|
}
|
|
16537
16537
|
function WorkflowSelect(r) {
|
|
16538
|
-
var i = r, { formAction: e, buttonAction: t, actionType: o } = i, n =
|
|
16538
|
+
var i = r, { formAction: e, buttonAction: t, actionType: o } = i, n = K(i, ["formAction", "buttonAction", "actionType"]);
|
|
16539
16539
|
const { t: a } = useTranslation(), l = ArrayTable.useIndex(), { setValuesIn: c } = useForm(), u = useCollection_deprecated(), { getCollection: d } = useCollectionManager_deprecated(), p = useDataSourceKey(), [m, h] = useState(joinCollectionName(p, u.name)), g = useCompile(), f = usePlugin("workflow"), C = f.useTriggersOptions(), S = useMemo(
|
|
16540
16540
|
() => C.filter((y) => typeof y.options.isActionTriggerable == "function" || y.options.isActionTriggerable === !0).map((y) => y.value),
|
|
16541
16541
|
[C]
|
|
@@ -17005,7 +17005,7 @@ const actionSettings = new SchemaSettings({
|
|
|
17005
17005
|
buttonEditorProps: r,
|
|
17006
17006
|
linkageRulesProps: i,
|
|
17007
17007
|
schemaSettings: a = "ActionSettings"
|
|
17008
|
-
} = g, l =
|
|
17008
|
+
} = g, l = K(g, [
|
|
17009
17009
|
"modalTip",
|
|
17010
17010
|
"linkageAction",
|
|
17011
17011
|
"removeButtonProps",
|
|
@@ -17109,7 +17109,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17109
17109
|
}
|
|
17110
17110
|
}), handleError = (e) => console.log(e), Action = withDynamicSchemaProps(
|
|
17111
17111
|
observer$1((e) => {
|
|
17112
|
-
var
|
|
17112
|
+
var H;
|
|
17113
17113
|
const G = useProps(e), {
|
|
17114
17114
|
popover: t,
|
|
17115
17115
|
containerRefKey: o,
|
|
@@ -17129,7 +17129,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17129
17129
|
onMouseEnter: C,
|
|
17130
17130
|
refreshDataBlockRequest: S,
|
|
17131
17131
|
confirmTitle: b
|
|
17132
|
-
} = G, y =
|
|
17132
|
+
} = G, y = K(G, [
|
|
17133
17133
|
"popover",
|
|
17134
17134
|
"containerRefKey",
|
|
17135
17135
|
"component",
|
|
@@ -17149,7 +17149,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17149
17149
|
"onMouseEnter",
|
|
17150
17150
|
"refreshDataBlockRequest",
|
|
17151
17151
|
"confirmTitle"
|
|
17152
|
-
]), { t: v } = useTranslation(), I = useDesigner(), w = useField(), T = useFieldSchema(), A = useCompile(), D = useCollectionRecordData(), $ = A((
|
|
17152
|
+
]), { t: v } = useTranslation(), I = useDesigner(), w = useField(), T = useFieldSchema(), A = useCompile(), D = useCollectionRecordData(), $ = A((H = T["x-component-props"]) == null ? void 0 : H.confirm) || g, L = useMemo(() => (T == null ? void 0 : T["x-linkage-rules"]) || [], [T == null ? void 0 : T["x-linkage-rules"]]), { designable: z } = useDesignable(), j = useComponent(n) || n, R = useVariables(), B = useLocalVariables({ currentForm: { values: D, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: k } = usePopupUtils(), { setSubmitted: N } = useActionContext(), { getAriaLabel: O } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useMemo(() => {
|
|
17153
17153
|
const W = l || A(T.title);
|
|
17154
17154
|
return _.isString(W) ? v(W) : W;
|
|
17155
17155
|
}, [l, T.title, v]);
|
|
@@ -17239,7 +17239,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17239
17239
|
setSubmitted: L,
|
|
17240
17240
|
getAriaLabel: z,
|
|
17241
17241
|
parentRecordData: j
|
|
17242
|
-
} = ge, R =
|
|
17242
|
+
} = ge, R = K(ge, [
|
|
17243
17243
|
"containerRefKey",
|
|
17244
17244
|
"fieldSchema",
|
|
17245
17245
|
"designable",
|
|
@@ -17268,7 +17268,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17268
17268
|
"setSubmitted",
|
|
17269
17269
|
"getAriaLabel",
|
|
17270
17270
|
"parentRecordData"
|
|
17271
|
-
]), [B, M] = useState(!1), { wrapSSR: k, componentCls: N, hashId: O } = useStyles$g(), [q, E] = useState(!1), U = n["x-toolbar-props"] || n["x-designer-props"], G = (ue = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ue.openMode,
|
|
17271
|
+
]), [B, M] = useState(!1), { wrapSSR: k, componentCls: N, hashId: O } = useStyles$g(), [q, E] = useState(!1), U = n["x-toolbar-props"] || n["x-designer-props"], G = (ue = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ue.openMode, H = (xe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : xe.openSize, W = (de = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : de.refreshDataBlockRequest, { modal: X } = App.useApp(), J = useForm(), Y = useACLActionParamsContext(), { run: Q, element: Z, disabled: te } = (T == null ? void 0 : T(A)) || {}, ee = J.disabled || i.disabled || ((pe = i.data) == null ? void 0 : pe.disabled) || w || te, se = useMemo(() => {
|
|
17272
17272
|
var ce;
|
|
17273
17273
|
return F(x({}, I), {
|
|
17274
17274
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !Y) && 0.1,
|
|
@@ -17315,7 +17315,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17315
17315
|
formValueChanged: q,
|
|
17316
17316
|
setFormValueChanged: E,
|
|
17317
17317
|
openMode: G,
|
|
17318
|
-
openSize:
|
|
17318
|
+
openSize: H,
|
|
17319
17319
|
containerRefKey: o,
|
|
17320
17320
|
fieldSchema: n,
|
|
17321
17321
|
setSubmitted: L,
|
|
@@ -17485,7 +17485,7 @@ const RenderButtonInner = observer$1(
|
|
|
17485
17485
|
type: C,
|
|
17486
17486
|
Designer: S,
|
|
17487
17487
|
designerProps: b
|
|
17488
|
-
} = v, y =
|
|
17488
|
+
} = v, y = K(v, [
|
|
17489
17489
|
"designable",
|
|
17490
17490
|
"field",
|
|
17491
17491
|
"aclCtx",
|
|
@@ -17532,7 +17532,7 @@ RenderButtonInner.displayName = "RenderButtonInner";
|
|
|
17532
17532
|
const ActionBarContext = React.createContext({
|
|
17533
17533
|
container: null
|
|
17534
17534
|
}), ActionBarProvider = (o) => {
|
|
17535
|
-
var n = o, { children: e } = n, t =
|
|
17535
|
+
var n = o, { children: e } = n, t = K(n, ["children"]);
|
|
17536
17536
|
return /* @__PURE__ */ jsx(ActionBarContext.Provider, { value: t, children: e });
|
|
17537
17537
|
}, useActionBarContext = () => useContext(ActionBarContext), Portal = (e) => {
|
|
17538
17538
|
const t = useFieldSchema(), { container: o, parentComponents: n = ["BlockItem", "CardItem"] } = useActionBarContext();
|
|
@@ -17542,7 +17542,7 @@ const ActionBarContext = React.createContext({
|
|
|
17542
17542
|
var p;
|
|
17543
17543
|
const { forceProps: t = {} } = useActionBarContext();
|
|
17544
17544
|
theme.useToken();
|
|
17545
|
-
const d = x(x({}, useProps(e)), t), { layout: o = "two-columns", style: n, spaceProps: r } = d, i =
|
|
17545
|
+
const d = x(x({}, useProps(e)), t), { layout: o = "two-columns", style: n, spaceProps: r } = d, i = K(d, ["layout", "style", "spaceProps"]), a = useFieldSchema(), { render: l } = useSchemaInitializerRender(a["x-initializer"], a["x-initializer-props"]), { designable: c } = useDesignable();
|
|
17546
17546
|
if (o === "one-column")
|
|
17547
17547
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsxs(
|
|
17548
17548
|
"div",
|
|
@@ -17751,7 +17751,7 @@ function useGetSchemaInitializerMenuItems(e) {
|
|
|
17751
17751
|
}
|
|
17752
17752
|
if (i.isMenuType) {
|
|
17753
17753
|
const f = i, { isMenuType: C } = f;
|
|
17754
|
-
return
|
|
17754
|
+
return K(f, ["isMenuType"]);
|
|
17755
17755
|
}
|
|
17756
17756
|
const d = c || u, p = i.key || `${r}-${u}-${a}`, m = (C) => {
|
|
17757
17757
|
C.domEvent.stopPropagation(), C.key === p && (i.onClick ? i.onClick(F(x({}, C), { item: i })) : e == null || e(F(x({}, C), { item: i })));
|
|
@@ -18047,14 +18047,14 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18047
18047
|
}
|
|
18048
18048
|
}
|
|
18049
18049
|
function S(k, N, O) {
|
|
18050
|
-
var q, E, U, G,
|
|
18050
|
+
var q, E, U, G, H, W, X, J, Y, Q, Z, te, ee = N && N.split("/"), se = a.map, ie = se && se["*"];
|
|
18051
18051
|
if (k && (k = k.split("/"), X = k.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(k[X]) && (k[X] = k[X].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && ee && (te = ee.slice(0, ee.length - 1), k = te.concat(k)), C(k), k = k.join("/")), O && se && (ee || ie)) {
|
|
18052
18052
|
U = k.split("/");
|
|
18053
18053
|
e:
|
|
18054
18054
|
for (G = U.length; G > 0; G -= 1) {
|
|
18055
18055
|
if (W = U.slice(0, G).join("/"), ee) {
|
|
18056
|
-
for (
|
|
18057
|
-
if (E = getOwn(se, ee.slice(0,
|
|
18056
|
+
for (H = ee.length; H > 0; H -= 1)
|
|
18057
|
+
if (E = getOwn(se, ee.slice(0, H).join("/")), E && (E = getOwn(E, W), E)) {
|
|
18058
18058
|
J = E, Y = G;
|
|
18059
18059
|
break e;
|
|
18060
18060
|
}
|
|
@@ -18083,10 +18083,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18083
18083
|
return O > -1 && (N = k.substring(0, O), k = k.substring(O + 1, k.length)), [N, k];
|
|
18084
18084
|
}
|
|
18085
18085
|
function I(k, N, O, q) {
|
|
18086
|
-
var E, U, G,
|
|
18087
|
-
return k || (Y = !1, k = "_@r" + (g += 1)),
|
|
18086
|
+
var E, U, G, H, W = null, X = N ? N.name : null, J = k, Y = !0, Q = "";
|
|
18087
|
+
return k || (Y = !1, k = "_@r" + (g += 1)), H = v(k), W = H[0], k = H[1], W && (W = S(W, X, q), U = getOwn(p, W)), k && (W ? O ? Q = k : U && U.normalize ? Q = U.normalize(k, function(Z) {
|
|
18088
18088
|
return S(Z, X, q);
|
|
18089
|
-
}) : Q = k.indexOf("!") === -1 ? S(k, X, q) : k : (Q = S(k, X, q),
|
|
18089
|
+
}) : Q = k.indexOf("!") === -1 ? S(k, X, q) : k : (Q = S(k, X, q), H = v(Q), W = H[0], Q = H[1], O = !0, E = n.nameToUrl(Q))), G = W && !U && !O ? "_unnormalized" + (f += 1) : "", {
|
|
18090
18090
|
prefix: W,
|
|
18091
18091
|
name: Q,
|
|
18092
18092
|
parentMap: N,
|
|
@@ -18143,12 +18143,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18143
18143
|
function L(k, N, O) {
|
|
18144
18144
|
var q = k.map.id;
|
|
18145
18145
|
k.error ? k.emit("error", k.error) : (N[q] = !0, each(k.depMaps, function(E, U) {
|
|
18146
|
-
var G = E.id,
|
|
18147
|
-
|
|
18146
|
+
var G = E.id, H = getOwn(l, G);
|
|
18147
|
+
H && !k.depMatched[U] && !O[G] && (getOwn(N, G) ? (k.defineDep(U, p[G]), k.check()) : L(H, N, O));
|
|
18148
18148
|
}), O[q] = !0);
|
|
18149
18149
|
}
|
|
18150
18150
|
function z() {
|
|
18151
|
-
var k, N, O = a.waitSeconds * 1e3, q = O && n.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], U = [], G = !1,
|
|
18151
|
+
var k, N, O = a.waitSeconds * 1e3, q = O && n.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], U = [], G = !1, H = !0;
|
|
18152
18152
|
if (!t) {
|
|
18153
18153
|
if (t = !0, eachProp(c, function(W) {
|
|
18154
18154
|
var X = W.map, J = X.id;
|
|
@@ -18156,11 +18156,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18156
18156
|
if (!W.inited && q)
|
|
18157
18157
|
y(J) ? (N = !0, G = !0) : (E.push(J), b(J));
|
|
18158
18158
|
else if (!W.inited && W.fetched && X.isDefine && (G = !0, !X.prefix))
|
|
18159
|
-
return
|
|
18159
|
+
return H = !1;
|
|
18160
18160
|
}
|
|
18161
18161
|
}), q && E.length)
|
|
18162
18162
|
return k = makeError("timeout", "Load timeout for modules: " + E, null, E), k.contextName = n.contextName, A(k);
|
|
18163
|
-
|
|
18163
|
+
H && each(U, function(W) {
|
|
18164
18164
|
L(W, {}, {});
|
|
18165
18165
|
}), (!q || N) && G && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
18166
18166
|
i = 0, z();
|
|
@@ -18213,8 +18213,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18213
18213
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
18214
18214
|
try {
|
|
18215
18215
|
E = n.execCb(O, U, q, E);
|
|
18216
|
-
} catch (
|
|
18217
|
-
k =
|
|
18216
|
+
} catch (H) {
|
|
18217
|
+
k = H;
|
|
18218
18218
|
}
|
|
18219
18219
|
else
|
|
18220
18220
|
E = n.execCb(O, U, q, E);
|
|
@@ -18224,8 +18224,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18224
18224
|
E = U;
|
|
18225
18225
|
if (this.exports = E, this.map.isDefine && !this.ignore && (p[O] = E, req.onResourceLoad)) {
|
|
18226
18226
|
var G = [];
|
|
18227
|
-
each(this.depMaps, function(
|
|
18228
|
-
G.push(
|
|
18227
|
+
each(this.depMaps, function(H) {
|
|
18228
|
+
G.push(H.normalizedMap || H);
|
|
18229
18229
|
}), req.onResourceLoad(n, this.map, G);
|
|
18230
18230
|
}
|
|
18231
18231
|
$(O), this.defined = !0;
|
|
@@ -18237,7 +18237,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18237
18237
|
callPlugin: function() {
|
|
18238
18238
|
var k = this.map, N = k.id, O = I(k.prefix);
|
|
18239
18239
|
this.depMaps.push(O), T(O, "defined", bind(this, function(q) {
|
|
18240
|
-
var E, U, G,
|
|
18240
|
+
var E, U, G, H = getOwn(h, this.map.id), W = this.map.name, X = this.map.parentMap ? this.map.parentMap.name : null, J = n.makeRequire(k.parentMap, {
|
|
18241
18241
|
enableBuildCallback: !0
|
|
18242
18242
|
});
|
|
18243
18243
|
if (this.map.unnormalized) {
|
|
@@ -18263,8 +18263,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18263
18263
|
})), G.enable());
|
|
18264
18264
|
return;
|
|
18265
18265
|
}
|
|
18266
|
-
if (
|
|
18267
|
-
this.map.url = n.nameToUrl(
|
|
18266
|
+
if (H) {
|
|
18267
|
+
this.map.url = n.nameToUrl(H), this.load();
|
|
18268
18268
|
return;
|
|
18269
18269
|
}
|
|
18270
18270
|
E = bind(this, function(Y) {
|
|
@@ -18407,8 +18407,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18407
18407
|
makeRequire: function(k, N) {
|
|
18408
18408
|
N = N || {};
|
|
18409
18409
|
function O(q, E, U) {
|
|
18410
|
-
var G,
|
|
18411
|
-
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? A(makeError("requireargs", "Invalid require call"), U) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(n, q, k, O) : (
|
|
18410
|
+
var G, H, W;
|
|
18411
|
+
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? A(makeError("requireargs", "Invalid require call"), U) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(n, q, k, O) : (H = I(q, k, !1, !0), G = H.id, hasProp(p, G) ? p[G] : A(makeError("notloaded", 'Module name "' + G + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (M(), n.nextTick(function() {
|
|
18412
18412
|
M(), W = w(I(null, k)), W.skipMap = N.skipMap, W.init(q, E, U, {
|
|
18413
18413
|
enabled: !0
|
|
18414
18414
|
}), z();
|
|
@@ -18422,8 +18422,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18422
18422
|
* plain URLs like nameToUrl.
|
|
18423
18423
|
*/
|
|
18424
18424
|
toUrl: function(q) {
|
|
18425
|
-
var E, U = q.lastIndexOf("."), G = q.split("/")[0],
|
|
18426
|
-
return U !== -1 && (!
|
|
18425
|
+
var E, U = q.lastIndexOf("."), G = q.split("/")[0], H = G === "." || G === "..";
|
|
18426
|
+
return U !== -1 && (!H || U > 1) && (E = q.substring(U, q.length), q = q.substring(0, U)), n.nameToUrl(S(
|
|
18427
18427
|
q,
|
|
18428
18428
|
k && k.id,
|
|
18429
18429
|
!0
|
|
@@ -18438,8 +18438,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18438
18438
|
}), k || (O.undef = function(q) {
|
|
18439
18439
|
D();
|
|
18440
18440
|
var E = I(q, k, !0), U = getOwn(l, q);
|
|
18441
|
-
U.undefed = !0, b(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(G,
|
|
18442
|
-
G[0] === q && d.splice(
|
|
18441
|
+
U.undefed = !0, b(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(G, H) {
|
|
18442
|
+
G[0] === q && d.splice(H, 1);
|
|
18443
18443
|
}), delete n.defQueueMap[q], U && (U.events.defined && (u[q] = U.events), $(q));
|
|
18444
18444
|
}), O;
|
|
18445
18445
|
},
|
|
@@ -18490,20 +18490,20 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18490
18490
|
* internal API, not a public one. Use toUrl for the public API.
|
|
18491
18491
|
*/
|
|
18492
18492
|
nameToUrl: function(k, N, O) {
|
|
18493
|
-
var q, E, U, G,
|
|
18493
|
+
var q, E, U, G, H, W, X, J = getOwn(a.pkgs, k);
|
|
18494
18494
|
if (J && (k = J), X = getOwn(h, k), X)
|
|
18495
18495
|
return n.nameToUrl(X, N, O);
|
|
18496
18496
|
if (req.jsExtRegExp.test(k))
|
|
18497
|
-
|
|
18497
|
+
H = k + (N || "");
|
|
18498
18498
|
else {
|
|
18499
18499
|
for (q = a.paths, E = k.split("/"), U = E.length; U > 0; U -= 1)
|
|
18500
18500
|
if (G = E.slice(0, U).join("/"), W = getOwn(q, G), W) {
|
|
18501
18501
|
isArray(W) && (W = W[0]), E.splice(0, U, W);
|
|
18502
18502
|
break;
|
|
18503
18503
|
}
|
|
18504
|
-
|
|
18504
|
+
H = E.join("/"), H += N || (/^data\:|^blob\:|\?/.test(H) || O ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
18505
18505
|
}
|
|
18506
|
-
return a.urlArgs && !/^blob\:/.test(
|
|
18506
|
+
return a.urlArgs && !/^blob\:/.test(H) ? H + a.urlArgs(k, H) : H;
|
|
18507
18507
|
},
|
|
18508
18508
|
//Delegates to req.load. Broken out as a separate function to
|
|
18509
18509
|
//allow overriding in the optimizer.
|
|
@@ -18659,7 +18659,7 @@ const DataSourceApplicationProvider = (n) => {
|
|
|
18659
18659
|
var r = n, {
|
|
18660
18660
|
children: e,
|
|
18661
18661
|
dataSourceManager: t
|
|
18662
|
-
} = r, o =
|
|
18662
|
+
} = r, o = K(r, [
|
|
18663
18663
|
"children",
|
|
18664
18664
|
"dataSourceManager"
|
|
18665
18665
|
]);
|
|
@@ -19111,7 +19111,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19111
19111
|
allowAllTypes: E = !1,
|
|
19112
19112
|
exceptInterfaces: U = [],
|
|
19113
19113
|
prefixFieldValue: G = "",
|
|
19114
|
-
usePrefix:
|
|
19114
|
+
usePrefix: H = !1,
|
|
19115
19115
|
dataSource: W
|
|
19116
19116
|
} = M || {};
|
|
19117
19117
|
if (O.length - 1 > q)
|
|
@@ -19124,15 +19124,15 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19124
19124
|
)) == null ? void 0 : Y.map((Q) => {
|
|
19125
19125
|
var te, ee;
|
|
19126
19126
|
const Z = x({
|
|
19127
|
-
value:
|
|
19127
|
+
value: H && G ? `${G}.${Q.name}` : Q.name,
|
|
19128
19128
|
label: f((te = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : te.title) || Q.name
|
|
19129
19129
|
}, Q);
|
|
19130
19130
|
return k && Q.target && (Z.children = O.includes(Q.target) ? [] : w(Q.target, B, F(x({}, M), {
|
|
19131
19131
|
cached: N,
|
|
19132
19132
|
dataSource: W,
|
|
19133
19133
|
collectionNames: [...O, Q.target],
|
|
19134
|
-
prefixFieldValue:
|
|
19135
|
-
usePrefix:
|
|
19134
|
+
prefixFieldValue: H ? G ? `${G}.${Q.name}` : Q.name : "",
|
|
19135
|
+
usePrefix: H
|
|
19136
19136
|
})), !((ee = Z.children) != null && ee.length)) ? null : Z;
|
|
19137
19137
|
}).filter(Boolean);
|
|
19138
19138
|
return N[R] = J, J;
|
|
@@ -20082,7 +20082,7 @@ function getSelectedIdFilter(e) {
|
|
|
20082
20082
|
} : null;
|
|
20083
20083
|
}
|
|
20084
20084
|
function SelectItem(e) {
|
|
20085
|
-
const a = e, { title: t, options: o, value: n, onChange: r } = a, i =
|
|
20085
|
+
const a = e, { title: t, options: o, value: n, onChange: r } = a, i = K(a, ["title", "options", "value", "onChange"]);
|
|
20086
20086
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, F(x({ title: t }, i), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
20087
20087
|
t,
|
|
20088
20088
|
/* @__PURE__ */ jsx(
|
|
@@ -20108,7 +20108,7 @@ const Tree = connect(
|
|
|
20108
20108
|
Tree.displayName = "Tree";
|
|
20109
20109
|
const compatibleDataId = (e, t) => e == null ? void 0 : e.map((o) => {
|
|
20110
20110
|
var l;
|
|
20111
|
-
const a = o, { dataId: n } = a, r =
|
|
20111
|
+
const a = o, { dataId: n } = a, r = K(a, ["dataId"]), i = x({}, r);
|
|
20112
20112
|
return n && (i.dataScope = { $and: [{ id: { $eq: n } }] }, i.titleField = (i == null ? void 0 : i.titleField) || ((l = t == null ? void 0 : t[o.collection]) == null ? void 0 : l.titleField) || "id"), i;
|
|
20113
20113
|
}), FormDataTemplates = withDynamicSchemaProps(
|
|
20114
20114
|
observer$1((e) => {
|
|
@@ -21204,10 +21204,10 @@ function useSchemaSettings() {
|
|
|
21204
21204
|
return useContext(SchemaSettingsContext);
|
|
21205
21205
|
}
|
|
21206
21206
|
const SchemaSettingsProvider = (e) => {
|
|
21207
|
-
const l = e, { children: t, fieldSchema: o } = l, n =
|
|
21207
|
+
const l = e, { children: t, fieldSchema: o } = l, n = K(l, ["children", "fieldSchema"]), { getTemplateBySchema: r } = useSchemaTemplateManager(), { name: i } = useCollection_deprecated(), a = r(o);
|
|
21208
21208
|
return /* @__PURE__ */ jsx(SchemaSettingsContext.Provider, { value: x({ collectionName: i, template: a, fieldSchema: o }, n), children: t });
|
|
21209
21209
|
}, SchemaSettingsDropdown = (e) => {
|
|
21210
|
-
const m = e, { title: t, dn: o } = m, n =
|
|
21210
|
+
const m = e, { title: t, dn: o } = m, n = K(m, ["title", "dn"]);
|
|
21211
21211
|
useApp();
|
|
21212
21212
|
const [r, i] = useState(!1), { Component: a, getMenuItems: l } = useMenuItem(), [, c] = useTransition(), u = useNiceDropdownMaxHeight([r]), d = useCallback((h, g) => {
|
|
21213
21213
|
(g.source === "trigger" || h) && c(() => {
|
|
@@ -21419,10 +21419,10 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21419
21419
|
}
|
|
21420
21420
|
);
|
|
21421
21421
|
}, SchemaSettingsSelectItem = (e) => {
|
|
21422
|
-
const a = e, { title: t, options: o, value: n, onChange: r } = a, i =
|
|
21422
|
+
const a = e, { title: t, options: o, value: n, onChange: r } = a, i = K(a, ["title", "options", "value", "onChange"]);
|
|
21423
21423
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, F(x({ title: t }, i), { children: /* @__PURE__ */ jsx(SelectWithTitle, { title: t, defaultValue: n, onChange: r, options: o }) }));
|
|
21424
21424
|
}, SchemaSettingsCascaderItem = (e) => {
|
|
21425
|
-
const a = e, { title: t, options: o, value: n, onChange: r } = a, i =
|
|
21425
|
+
const a = e, { title: t, options: o, value: n, onChange: r } = a, i = K(a, ["title", "options", "value", "onChange"]);
|
|
21426
21426
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, F(x({ title: t }, i), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
21427
21427
|
t,
|
|
21428
21428
|
/* @__PURE__ */ jsx(
|
|
@@ -21437,7 +21437,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21437
21437
|
)
|
|
21438
21438
|
] }) }));
|
|
21439
21439
|
}, SchemaSettingsSwitchItem = (e) => {
|
|
21440
|
-
const a = e, { title: t, onChange: o } = a, n =
|
|
21440
|
+
const a = e, { title: t, onChange: o } = a, n = K(a, ["title", "onChange"]), [r, i] = useState(!!e.checked);
|
|
21441
21441
|
return /* @__PURE__ */ jsx(
|
|
21442
21442
|
SchemaSettingsItem,
|
|
21443
21443
|
F(x({
|
|
@@ -21453,7 +21453,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21453
21453
|
})
|
|
21454
21454
|
);
|
|
21455
21455
|
}, SchemaSettingsPopupItem = (e) => {
|
|
21456
|
-
const a = e, { schema: t } = a, o =
|
|
21456
|
+
const a = e, { schema: t } = a, o = K(a, ["schema"]), [n, r] = useState(!1), i = useContext(SchemaSettingsContext);
|
|
21457
21457
|
return /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: n, setVisible: r }, children: [
|
|
21458
21458
|
/* @__PURE__ */ jsx(
|
|
21459
21459
|
SchemaSettingsItem,
|
|
@@ -21487,7 +21487,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21487
21487
|
modalTip: c,
|
|
21488
21488
|
components: u,
|
|
21489
21489
|
scope: d
|
|
21490
|
-
} = R, p =
|
|
21490
|
+
} = R, p = K(R, [
|
|
21491
21491
|
"title",
|
|
21492
21492
|
"onSubmit",
|
|
21493
21493
|
"width",
|
|
@@ -21573,7 +21573,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21573
21573
|
width: u = "fit-content",
|
|
21574
21574
|
noRecord: d = !1,
|
|
21575
21575
|
ModalContextProvider: p = (q) => /* @__PURE__ */ jsx(Fragment, { children: q.children })
|
|
21576
|
-
} = O, m =
|
|
21576
|
+
} = O, m = K(O, [
|
|
21577
21577
|
"hidden",
|
|
21578
21578
|
"title",
|
|
21579
21579
|
"components",
|
|
@@ -21962,7 +21962,7 @@ const typeComponentMap = {
|
|
|
21962
21962
|
actionModal: SchemaSettingsActionModalItem,
|
|
21963
21963
|
modal: SchemaSettingsModalItem
|
|
21964
21964
|
}, SchemaSettingsChildErrorFallback = (e) => {
|
|
21965
|
-
const n = e, { title: t } = n, o =
|
|
21965
|
+
const n = e, { title: t } = n, o = K(n, ["title"]);
|
|
21966
21966
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, { title: t, children: /* @__PURE__ */ jsx(ErrorFallback.Modal, x({}, o)) });
|
|
21967
21967
|
}, SchemaSettingsChildren = (e) => {
|
|
21968
21968
|
const { children: t } = e, { visible: o } = useSchemaSettings(), n = useRef(!1), r = useFieldComponentName();
|
|
@@ -22008,7 +22008,7 @@ const SchemaSettingsIcon = React.memo((e) => {
|
|
|
22008
22008
|
});
|
|
22009
22009
|
SchemaSettingsIcon.displayName = "SchemaSettingsIcon";
|
|
22010
22010
|
const SchemaSettingsWrapper = (e) => {
|
|
22011
|
-
const p = e, { items: t, Component: o = SchemaSettingsIcon, name: n, componentProps: r, style: i } = p, a =
|
|
22011
|
+
const p = e, { items: t, Component: o = SchemaSettingsIcon, name: n, componentProps: r, style: i } = p, a = K(p, ["items", "Component", "name", "componentProps", "style"]), { dn: l } = useDesignable(), c = useField(), u = useFieldSchema(), d = useMemo(
|
|
22012
22012
|
() => x({
|
|
22013
22013
|
options: e,
|
|
22014
22014
|
style: i
|
|
@@ -22547,7 +22547,7 @@ const getActionContext = (e) => {
|
|
|
22547
22547
|
U["x-read-pretty"] = !1, U["x-disabled"] = !1, _.set(U, "x-decorator-props.showTitle", !1);
|
|
22548
22548
|
const G = getFieldDefaultValue(U, T);
|
|
22549
22549
|
T.target && U["x-component-props"] && (U["x-component-props"].mode = "Select"), T != null && T.uiSchema.type && (U.type = T.uiSchema.type), (T == null ? void 0 : T.uiSchema["x-component"]) === "Checkbox" && (_.set(U, "x-component-props.defaultChecked", G), U.type = "void");
|
|
22550
|
-
const
|
|
22550
|
+
const H = useMemo(
|
|
22551
22551
|
() => F(x({}, U || {}), {
|
|
22552
22552
|
"x-decorator": "FormItem",
|
|
22553
22553
|
"x-component-props": F(x({}, U["x-component-props"]), {
|
|
@@ -22564,7 +22564,7 @@ const getActionContext = (e) => {
|
|
|
22564
22564
|
}),
|
|
22565
22565
|
[U, G]
|
|
22566
22566
|
);
|
|
22567
|
-
return _.set(
|
|
22567
|
+
return _.set(H, "x-component-props.onChange", E.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: H }) });
|
|
22568
22568
|
}
|
|
22569
22569
|
}),
|
|
22570
22570
|
title: a("Default value"),
|
|
@@ -22587,11 +22587,11 @@ const getActionContext = (e) => {
|
|
|
22587
22587
|
g
|
|
22588
22588
|
]), M = useCallback(
|
|
22589
22589
|
(q) => {
|
|
22590
|
-
var U, G,
|
|
22590
|
+
var U, G, H;
|
|
22591
22591
|
const E = {
|
|
22592
22592
|
"x-uid": n["x-uid"]
|
|
22593
22593
|
};
|
|
22594
|
-
n.default = (U = q.default) != null ? U : null, isVariable(q.default) || (G = r.setInitialValue) == null || G.call(r, q.default), E.default = (
|
|
22594
|
+
n.default = (U = q.default) != null ? U : null, isVariable(q.default) || (G = r.setInitialValue) == null || G.call(r, q.default), E.default = (H = q.default) != null ? H : null, i.emit("patch", {
|
|
22595
22595
|
schema: E,
|
|
22596
22596
|
currentSchema: o
|
|
22597
22597
|
});
|
|
@@ -22839,7 +22839,7 @@ const FilterActionContext = createContext(null);
|
|
|
22839
22839
|
FilterActionContext.displayName = "FilterActionContext";
|
|
22840
22840
|
const FilterAction = withDynamicSchemaProps(
|
|
22841
22841
|
observer$1((e) => {
|
|
22842
|
-
const { t } = useTranslation(), o = useField(), [n, r] = useState(!1), { designable: i, dn: a } = useDesignable(), l = useFieldSchema(), c = useCompile(), u = useMemo(() => e.form || createForm(), []), C = useProps(e), { options: d, onSubmit: p, onReset: m, Container: h = StablePopover } = C, g =
|
|
22842
|
+
const { t } = useTranslation(), o = useField(), [n, r] = useState(!1), { designable: i, dn: a } = useDesignable(), l = useFieldSchema(), c = useCompile(), u = useMemo(() => e.form || createForm(), []), C = useProps(e), { options: d, onSubmit: p, onReset: m, Container: h = StablePopover } = C, g = K(C, ["options", "onSubmit", "onReset", "Container"]), f = useCallback((S) => {
|
|
22843
22843
|
r(S);
|
|
22844
22844
|
}, []);
|
|
22845
22845
|
return /* @__PURE__ */ jsx(FilterActionContext.Provider, { value: { field: o, fieldSchema: l, designable: i, dn: a }, children: /* @__PURE__ */ jsx(
|
|
@@ -23359,8 +23359,8 @@ const useGetFilterOptions = () => {
|
|
|
23359
23359
|
let A = "editable";
|
|
23360
23360
|
o["x-disabled"] === !0 && (A = "readonly"), o["x-read-pretty"] === !0 && (A = "read-pretty");
|
|
23361
23361
|
const D = I && T === "Select", $ = () => {
|
|
23362
|
-
const { name: G } = useCollection(), { linkageRulesProps:
|
|
23363
|
-
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, F(x({},
|
|
23362
|
+
const { name: G } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
|
|
23363
|
+
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, F(x({}, H), { collectionName: G })));
|
|
23364
23364
|
};
|
|
23365
23365
|
return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { disableInitializer: !0, children: [
|
|
23366
23366
|
/* @__PURE__ */ jsx(
|
|
@@ -23400,8 +23400,8 @@ const useGetFilterOptions = () => {
|
|
|
23400
23400
|
onSubmit: ({ filter: G }) => {
|
|
23401
23401
|
var W, X;
|
|
23402
23402
|
G = removeNullCondition(G), set$1(l.componentProps, "service.params.filter", G), o["x-component-props"] = l.componentProps;
|
|
23403
|
-
const
|
|
23404
|
-
l.form.query(`${
|
|
23403
|
+
const H = (X = l.path) == null ? void 0 : X.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
|
|
23404
|
+
l.form.query(`${H.concat("*." + o.name)}`).forEach((J) => {
|
|
23405
23405
|
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.filter = G;
|
|
23406
23406
|
}), d.emit("patch", {
|
|
23407
23407
|
schema: {
|
|
@@ -23429,12 +23429,12 @@ const useGetFilterOptions = () => {
|
|
|
23429
23429
|
}
|
|
23430
23430
|
},
|
|
23431
23431
|
onSubmit: ({ width: G }) => {
|
|
23432
|
-
const
|
|
23433
|
-
|
|
23432
|
+
const H = u["x-component-props"] || {};
|
|
23433
|
+
H.width = G;
|
|
23434
23434
|
const W = {
|
|
23435
23435
|
"x-uid": u["x-uid"]
|
|
23436
23436
|
};
|
|
23437
|
-
W["x-component-props"] =
|
|
23437
|
+
W["x-component-props"] = H, u["x-component-props"] = H, l.componentProps.width = G, d.emit("patch", {
|
|
23438
23438
|
schema: W
|
|
23439
23439
|
}), d.refresh();
|
|
23440
23440
|
}
|
|
@@ -23447,13 +23447,13 @@ const useGetFilterOptions = () => {
|
|
|
23447
23447
|
title: c("Sortable"),
|
|
23448
23448
|
checked: l.componentProps.sorter,
|
|
23449
23449
|
onChange: (G) => {
|
|
23450
|
-
const
|
|
23450
|
+
const H = {
|
|
23451
23451
|
"x-uid": u["x-uid"]
|
|
23452
23452
|
};
|
|
23453
23453
|
u["x-component-props"] = F(x({}, u["x-component-props"]), {
|
|
23454
23454
|
sorter: G
|
|
23455
|
-
}),
|
|
23456
|
-
schema:
|
|
23455
|
+
}), H["x-component-props"] = u["x-component-props"], l.componentProps.sorter = G, d.emit("patch", {
|
|
23456
|
+
schema: H
|
|
23457
23457
|
}), d.refresh();
|
|
23458
23458
|
}
|
|
23459
23459
|
}
|
|
@@ -23487,13 +23487,13 @@ const useGetFilterOptions = () => {
|
|
|
23487
23487
|
value: p == null ? void 0 : p.label,
|
|
23488
23488
|
onChange: (G) => {
|
|
23489
23489
|
var X, J, Y, Q, Z;
|
|
23490
|
-
const
|
|
23490
|
+
const H = F(x(x({}, (J = (X = n == null ? void 0 : n.uiSchema) == null ? void 0 : X["x-component-props"]) == null ? void 0 : J.fieldNames), (Y = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Y.fieldNames), {
|
|
23491
23491
|
label: G
|
|
23492
23492
|
});
|
|
23493
|
-
_.set(o, "x-component-props.fieldNames",
|
|
23493
|
+
_.set(o, "x-component-props.fieldNames", H);
|
|
23494
23494
|
const W = (Z = l.path) == null ? void 0 : Z.splice(((Q = l.path) == null ? void 0 : Q.length) - 1, 1);
|
|
23495
23495
|
l.form.query(`${W.concat("*." + o.name)}`).forEach((te) => {
|
|
23496
|
-
te.componentProps.fieldNames =
|
|
23496
|
+
te.componentProps.fieldNames = H;
|
|
23497
23497
|
}), d.emit("patch", {
|
|
23498
23498
|
schema: {
|
|
23499
23499
|
"x-uid": o["x-uid"],
|
|
@@ -23514,11 +23514,11 @@ const useGetFilterOptions = () => {
|
|
|
23514
23514
|
].filter(Boolean) : w,
|
|
23515
23515
|
value: T,
|
|
23516
23516
|
onChange: (G) => {
|
|
23517
|
-
const
|
|
23517
|
+
const H = {
|
|
23518
23518
|
"x-uid": o["x-uid"]
|
|
23519
23519
|
};
|
|
23520
|
-
o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].mode = G,
|
|
23521
|
-
schema:
|
|
23520
|
+
o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].mode = G, H["x-component-props"] = o["x-component-props"], l.componentProps = l.componentProps || {}, l.componentProps.mode = G, d.emit("patch", {
|
|
23521
|
+
schema: H
|
|
23522
23522
|
}), d.refresh();
|
|
23523
23523
|
}
|
|
23524
23524
|
},
|
|
@@ -23531,11 +23531,11 @@ const useGetFilterOptions = () => {
|
|
|
23531
23531
|
options: h,
|
|
23532
23532
|
value: (U = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : U.tagColorField,
|
|
23533
23533
|
onChange: (G) => {
|
|
23534
|
-
const
|
|
23534
|
+
const H = {
|
|
23535
23535
|
"x-uid": o["x-uid"]
|
|
23536
23536
|
};
|
|
23537
|
-
o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].tagColorField = G,
|
|
23538
|
-
schema:
|
|
23537
|
+
o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].tagColorField = G, H["x-component-props"] = o["x-component-props"], l.componentProps.tagColorField = G, d.emit("patch", {
|
|
23538
|
+
schema: H
|
|
23539
23539
|
}), d.refresh();
|
|
23540
23540
|
}
|
|
23541
23541
|
},
|
|
@@ -23548,15 +23548,15 @@ const useGetFilterOptions = () => {
|
|
|
23548
23548
|
checked: o.required,
|
|
23549
23549
|
onChange: (G) => {
|
|
23550
23550
|
var X, J;
|
|
23551
|
-
const
|
|
23551
|
+
const H = {
|
|
23552
23552
|
"x-uid": o["x-uid"]
|
|
23553
23553
|
};
|
|
23554
|
-
o.required = G,
|
|
23554
|
+
o.required = G, H.required = G;
|
|
23555
23555
|
const W = (J = l.path) == null ? void 0 : J.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
|
|
23556
23556
|
l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
23557
23557
|
Y.required = G;
|
|
23558
23558
|
}), d.emit("patch", {
|
|
23559
|
-
schema:
|
|
23559
|
+
schema: H
|
|
23560
23560
|
}), d.refresh();
|
|
23561
23561
|
}
|
|
23562
23562
|
},
|
|
@@ -23574,31 +23574,31 @@ const useGetFilterOptions = () => {
|
|
|
23574
23574
|
value: A,
|
|
23575
23575
|
onChange: (G) => {
|
|
23576
23576
|
var X, J;
|
|
23577
|
-
const
|
|
23577
|
+
const H = {
|
|
23578
23578
|
"x-uid": o["x-uid"]
|
|
23579
23579
|
}, W = (J = l.path) == null ? void 0 : J.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
|
|
23580
23580
|
switch (G) {
|
|
23581
23581
|
case "readonly": {
|
|
23582
|
-
o["x-read-pretty"] = !1, o["x-disabled"] = !0,
|
|
23582
|
+
o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
23583
23583
|
Y.readonly = !0, Y.disabled = !0;
|
|
23584
23584
|
});
|
|
23585
23585
|
break;
|
|
23586
23586
|
}
|
|
23587
23587
|
case "read-pretty": {
|
|
23588
|
-
o["x-read-pretty"] = !0, o["x-disabled"] = !1,
|
|
23588
|
+
o["x-read-pretty"] = !0, o["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
23589
23589
|
Y.readPretty = !0;
|
|
23590
23590
|
});
|
|
23591
23591
|
break;
|
|
23592
23592
|
}
|
|
23593
23593
|
default: {
|
|
23594
|
-
o["x-read-pretty"] = !1, o["x-disabled"] = !1,
|
|
23594
|
+
o["x-read-pretty"] = !1, o["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
23595
23595
|
Y.readPretty = !1, Y.disabled + !1;
|
|
23596
23596
|
});
|
|
23597
23597
|
break;
|
|
23598
23598
|
}
|
|
23599
23599
|
}
|
|
23600
23600
|
d.emit("patch", {
|
|
23601
|
-
schema:
|
|
23601
|
+
schema: H
|
|
23602
23602
|
}), d.refresh();
|
|
23603
23603
|
}
|
|
23604
23604
|
},
|
|
@@ -23611,8 +23611,8 @@ const useGetFilterOptions = () => {
|
|
|
23611
23611
|
fieldSchema: o,
|
|
23612
23612
|
onSubmitCallBack: (G) => {
|
|
23613
23613
|
var W, X;
|
|
23614
|
-
const
|
|
23615
|
-
l.form.query(`${
|
|
23614
|
+
const H = (X = l.path) == null ? void 0 : X.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
|
|
23615
|
+
l.form.query(`${H.concat("*." + o.name)}`).forEach((J) => {
|
|
23616
23616
|
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.sort = G;
|
|
23617
23617
|
});
|
|
23618
23618
|
}
|
|
@@ -24659,19 +24659,19 @@ const useCreateActionProps = () => {
|
|
|
24659
24659
|
onClick() {
|
|
24660
24660
|
return V(this, null, function* () {
|
|
24661
24661
|
var N, O, q, E, U, G;
|
|
24662
|
-
const T = u.map((
|
|
24662
|
+
const T = u.map((H) => H.name), {
|
|
24663
24663
|
assignedValues: A = {},
|
|
24664
24664
|
onSuccess: D,
|
|
24665
24665
|
overwriteValues: $,
|
|
24666
24666
|
skipValidator: L,
|
|
24667
24667
|
triggerWorkflows: z
|
|
24668
|
-
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, j = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: R } = D || {}, B = {}, M = Object.keys(A).map((
|
|
24669
|
-
const W = A[
|
|
24668
|
+
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, j = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: R } = D || {}, B = {}, M = Object.keys(A).map((H) => V(this, null, function* () {
|
|
24669
|
+
const W = A[H], X = d(H);
|
|
24670
24670
|
if (isVariable(W)) {
|
|
24671
24671
|
const { value: J } = (yield C == null ? void 0 : C.parseVariable(W, S)) || {};
|
|
24672
|
-
J && (B[
|
|
24672
|
+
J && (B[H] = transformVariableValue(J, { targetCollectionField: X }));
|
|
24673
24673
|
} else
|
|
24674
|
-
W != null && W !== "" && (B[
|
|
24674
|
+
W != null && W !== "" && (B[H] = W);
|
|
24675
24675
|
}));
|
|
24676
24676
|
yield Promise.all(M), L || (yield e.submit());
|
|
24677
24677
|
const k = getFormValues({
|
|
@@ -24684,21 +24684,21 @@ const useCreateActionProps = () => {
|
|
|
24684
24684
|
actionFields: (b == null ? void 0 : b("form")) || []
|
|
24685
24685
|
});
|
|
24686
24686
|
if (j) {
|
|
24687
|
-
const
|
|
24688
|
-
k[(q =
|
|
24687
|
+
const H = p();
|
|
24688
|
+
k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(E = H == null ? void 0 : H.foreignKey) != null ? E : "parentId"] = f.id;
|
|
24689
24689
|
}
|
|
24690
24690
|
c.data = t.data || {}, c.data.loading = !0;
|
|
24691
24691
|
try {
|
|
24692
|
-
const
|
|
24692
|
+
const H = yield o[y]({
|
|
24693
24693
|
values: x(x(x({}, k), $), B),
|
|
24694
24694
|
filterKeys: v,
|
|
24695
24695
|
// TODO(refactor): should change to inject by plugin
|
|
24696
24696
|
triggerWorkflows: z != null && z.length ? z.map((W) => [W.workflowKey, W.context].filter(Boolean).join("!")).join(",") : void 0
|
|
24697
24697
|
});
|
|
24698
|
-
if (c.data.loading = !1, c.data.data =
|
|
24698
|
+
if (c.data.loading = !1, c.data.data = H, (G = (U = n == null ? void 0 : n.service) == null ? void 0 : U.refresh) == null || G.call(U), r == null || r(!1), a == null || a(!0), !R)
|
|
24699
24699
|
return;
|
|
24700
24700
|
message.success(h(R));
|
|
24701
|
-
} catch (
|
|
24701
|
+
} catch (H) {
|
|
24702
24702
|
c.data.data = null, c.data.loading = !1;
|
|
24703
24703
|
}
|
|
24704
24704
|
});
|
|
@@ -24856,7 +24856,7 @@ const useCreateActionProps = () => {
|
|
|
24856
24856
|
content: p($ === "selected" ? "Update selected data?" : "Update all data?"),
|
|
24857
24857
|
onOk() {
|
|
24858
24858
|
return V(this, null, function* () {
|
|
24859
|
-
var U, G,
|
|
24859
|
+
var U, G, H, W;
|
|
24860
24860
|
const { filter: q } = (G = (U = n.params) == null ? void 0 : U[0]) != null ? G : {}, E = {
|
|
24861
24861
|
values: x({}, M),
|
|
24862
24862
|
filter: q,
|
|
@@ -24876,7 +24876,7 @@ const useCreateActionProps = () => {
|
|
|
24876
24876
|
} finally {
|
|
24877
24877
|
m.data.loading = !1;
|
|
24878
24878
|
}
|
|
24879
|
-
t instanceof TableFieldResource || (W = (
|
|
24879
|
+
t instanceof TableFieldResource || (W = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || W.call(H), R && (L ? h.success({
|
|
24880
24880
|
title: d(R),
|
|
24881
24881
|
onOk: () => V(this, null, function* () {
|
|
24882
24882
|
(z && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
|
|
@@ -24906,11 +24906,11 @@ const useCreateActionProps = () => {
|
|
|
24906
24906
|
w !== !0 && R === "customize:form:request" && (yield i.submit());
|
|
24907
24907
|
const B = A.headers ? JSON.parse(A.headers) : {}, M = A.params ? JSON.parse(A.params) : {}, k = A.data ? JSON.parse(A.data) : {};
|
|
24908
24908
|
if (R === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(A.method)) {
|
|
24909
|
-
const
|
|
24909
|
+
const H = a.map((X) => X.name), W = getFormValues({
|
|
24910
24910
|
filterByTk: o,
|
|
24911
24911
|
field: c,
|
|
24912
24912
|
form: i,
|
|
24913
|
-
fieldNames:
|
|
24913
|
+
fieldNames: H,
|
|
24914
24914
|
getField: l,
|
|
24915
24915
|
resource: u,
|
|
24916
24916
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -24951,10 +24951,10 @@ const useCreateActionProps = () => {
|
|
|
24951
24951
|
skipValidator: $,
|
|
24952
24952
|
triggerWorkflows: L
|
|
24953
24953
|
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: z, redirecting: j, redirectTo: R, successMessage: B, actionAfterSuccess: M } = A || {}, k = {}, N = Object.keys(T).map((U) => V(this, null, function* () {
|
|
24954
|
-
const G = T[U],
|
|
24954
|
+
const G = T[U], H = d(U);
|
|
24955
24955
|
if (isVariable(G)) {
|
|
24956
24956
|
const { value: W } = (yield S == null ? void 0 : S.parseVariable(G, b)) || {};
|
|
24957
|
-
W && (k[U] = transformVariableValue(W, { targetCollectionField:
|
|
24957
|
+
W && (k[U] = transformVariableValue(W, { targetCollectionField: H }));
|
|
24958
24958
|
} else
|
|
24959
24959
|
G != null && G !== "" && (k[U] = G);
|
|
24960
24960
|
}));
|
|
@@ -25226,11 +25226,11 @@ const useCreateActionProps = () => {
|
|
|
25226
25226
|
(R) => {
|
|
25227
25227
|
const { targets: B, uid: M } = findFilterTargets(t);
|
|
25228
25228
|
n().forEach((k) => {
|
|
25229
|
-
var G,
|
|
25229
|
+
var G, H, W;
|
|
25230
25230
|
if (!B.find((X) => X.uid === k.uid))
|
|
25231
25231
|
return;
|
|
25232
25232
|
const O = `${M}${t.name}`, q = ((G = k.service.params) == null ? void 0 : G[0]) || {};
|
|
25233
|
-
(W = (
|
|
25233
|
+
(W = (H = k.service.params) == null ? void 0 : H[1]) != null && W.filters || _.set(k.service.params, "[1].filters", {});
|
|
25234
25234
|
const E = k.service.params[1].filters;
|
|
25235
25235
|
if (R.length)
|
|
25236
25236
|
E[O] = {
|
|
@@ -25993,7 +25993,7 @@ const UnitConversion = ({ unitConversionType: e }) => {
|
|
|
25993
25993
|
/* @__PURE__ */ jsx(DragHandler, {})
|
|
25994
25994
|
] });
|
|
25995
25995
|
}, BlockItemCard = React.forwardRef((n, o) => {
|
|
25996
|
-
var r = n, { children: e } = r, t =
|
|
25996
|
+
var r = n, { children: e } = r, t = K(r, ["children"]);
|
|
25997
25997
|
const { token: i } = useToken$1();
|
|
25998
25998
|
return /* @__PURE__ */ jsx(Card, F(x({ ref: o, bordered: !1, style: { marginBottom: i.marginBlock } }, t), { children: e }));
|
|
25999
25999
|
});
|
|
@@ -26577,7 +26577,7 @@ const jsonCss = css`
|
|
|
26577
26577
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
26578
26578
|
`, Json = React.forwardRef(
|
|
26579
26579
|
(a, i) => {
|
|
26580
|
-
var l = a, { value: e, onChange: t, space: o = 2, json5: n = !1 } = l, r =
|
|
26580
|
+
var l = a, { value: e, onChange: t, space: o = 2, json5: n = !1 } = l, r = K(l, ["value", "onChange", "space", "json5"]);
|
|
26581
26581
|
const c = n ? JSON5 : JSON, u = useField(), [d, p] = useState("");
|
|
26582
26582
|
return useEffect(() => {
|
|
26583
26583
|
try {
|
|
@@ -27777,7 +27777,7 @@ const ConstantTypes = {
|
|
|
27777
27777
|
label: '{{t("String")}}',
|
|
27778
27778
|
value: "string",
|
|
27779
27779
|
component: function e(r) {
|
|
27780
|
-
var i = r, { onChange: t, value: o } = i, n =
|
|
27780
|
+
var i = r, { onChange: t, value: o } = i, n = K(i, ["onChange", "value"]);
|
|
27781
27781
|
return /* @__PURE__ */ jsx(Input$3, x({ value: o, onChange: (a) => t(a.target.value) }, n));
|
|
27782
27782
|
},
|
|
27783
27783
|
default() {
|
|
@@ -27788,7 +27788,7 @@ const ConstantTypes = {
|
|
|
27788
27788
|
label: '{{t("Number")}}',
|
|
27789
27789
|
value: "number",
|
|
27790
27790
|
component: function e(r) {
|
|
27791
|
-
var i = r, { onChange: t, value: o } = i, n =
|
|
27791
|
+
var i = r, { onChange: t, value: o } = i, n = K(i, ["onChange", "value"]);
|
|
27792
27792
|
return /* @__PURE__ */ jsx(InputNumber$1, x({ value: o, onChange: t }, n));
|
|
27793
27793
|
},
|
|
27794
27794
|
default() {
|
|
@@ -27799,7 +27799,7 @@ const ConstantTypes = {
|
|
|
27799
27799
|
label: '{{t("Boolean")}}',
|
|
27800
27800
|
value: "boolean",
|
|
27801
27801
|
component: function e(r) {
|
|
27802
|
-
var i = r, { onChange: t, value: o } = i, n =
|
|
27802
|
+
var i = r, { onChange: t, value: o } = i, n = K(i, ["onChange", "value"]);
|
|
27803
27803
|
const { t: a } = useTranslation();
|
|
27804
27804
|
return /* @__PURE__ */ jsx(
|
|
27805
27805
|
Select$1,
|
|
@@ -27824,7 +27824,7 @@ const ConstantTypes = {
|
|
|
27824
27824
|
label: '{{t("Date")}}',
|
|
27825
27825
|
value: "date",
|
|
27826
27826
|
component: function e(r) {
|
|
27827
|
-
var i = r, { onChange: t, value: o } = i, n =
|
|
27827
|
+
var i = r, { onChange: t, value: o } = i, n = K(i, ["onChange", "value"]);
|
|
27828
27828
|
return /* @__PURE__ */ jsx(
|
|
27829
27829
|
DatePicker$1,
|
|
27830
27830
|
x({
|
|
@@ -27881,7 +27881,7 @@ function getTypedConstantOption(e, t, o) {
|
|
|
27881
27881
|
};
|
|
27882
27882
|
}
|
|
27883
27883
|
function Input$1(e) {
|
|
27884
|
-
var
|
|
27884
|
+
var H, W, X;
|
|
27885
27885
|
const {
|
|
27886
27886
|
value: t = "",
|
|
27887
27887
|
onChange: o,
|
|
@@ -27911,10 +27911,10 @@ function Input$1(e) {
|
|
|
27911
27911
|
label: y("Constant"),
|
|
27912
27912
|
[B.value]: "$",
|
|
27913
27913
|
[B.label]: y("Constant")
|
|
27914
|
-
} : i ? getTypedConstantOption(j, i, B) : null, [j, i]), k = (
|
|
27914
|
+
} : i ? getTypedConstantOption(j, i, B) : null, [j, i]), k = (H = M == null ? void 0 : M.component) != null ? H : NullComponent, N = Array.isArray(i) ? (X = (W = i.find((J) => Array.isArray(J) && J[0] === j)) == null ? void 0 : W[1]) != null ? X : {} : {};
|
|
27915
27915
|
let O;
|
|
27916
27916
|
t == null ? a ? n && D ? O = ["$"] : O = [""] : n ? O = ["$"] : O = [" ", j] : O = n ? ["$"] : [" ", j], m && (O = ["$"]), useEffect(() => {
|
|
27917
|
-
const Z = M != null ? M : {}, { component: J } = Z, Y =
|
|
27917
|
+
const Z = M != null ? M : {}, { component: J } = Z, Y = K(Z, ["component"]), Q = [
|
|
27918
27918
|
...a ? [
|
|
27919
27919
|
{
|
|
27920
27920
|
value: "",
|
|
@@ -28179,7 +28179,7 @@ function setNativeInputValue(e, t) {
|
|
|
28179
28179
|
);
|
|
28180
28180
|
}
|
|
28181
28181
|
function RawTextArea(e) {
|
|
28182
|
-
const t = useRef(null), m = e, { changeOnSelect: o, component: n = Input$3.TextArea, fieldNames: r, scope: i, buttonClass: a } = m, l =
|
|
28182
|
+
const t = useRef(null), m = e, { changeOnSelect: o, component: n = Input$3.TextArea, fieldNames: r, scope: i, buttonClass: a } = m, l = K(m, ["changeOnSelect", "component", "fieldNames", "scope", "buttonClass"]), c = typeof i == "function" ? i() : i, [u, d] = useState(c || []);
|
|
28183
28183
|
function p(h) {
|
|
28184
28184
|
if (!t.current)
|
|
28185
28185
|
return;
|
|
@@ -28368,8 +28368,8 @@ function TextArea(e) {
|
|
|
28368
28368
|
const { lastChild: E } = N;
|
|
28369
28369
|
if (E) {
|
|
28370
28370
|
O.setStartAfter(E), O.setEndAfter(E);
|
|
28371
|
-
const U = Array.from(N.childNodes), G = O.startContainer === N ? -1 : U.indexOf(E),
|
|
28372
|
-
A([G, O.startOffset,
|
|
28371
|
+
const U = Array.from(N.childNodes), G = O.startContainer === N ? -1 : U.indexOf(E), H = O.startContainer === N ? -1 : U.indexOf(E);
|
|
28372
|
+
A([G, O.startOffset, H, O.endOffset]);
|
|
28373
28373
|
}
|
|
28374
28374
|
}
|
|
28375
28375
|
}, [I]);
|
|
@@ -33641,7 +33641,7 @@ const SortableProvider = (e) => {
|
|
|
33641
33641
|
return /* @__PURE__ */ jsx(SortableContext.Provider, { value: { draggable: r, droppable: i }, children: n });
|
|
33642
33642
|
}, Sortable = (e) => {
|
|
33643
33643
|
var g, f;
|
|
33644
|
-
const h = e, { component: t, overStyle: o, style: n, children: r, openMode: i } = h, a =
|
|
33644
|
+
const h = e, { component: t, overStyle: o, style: n, children: r, openMode: i } = h, a = K(h, ["component", "overStyle", "style", "children", "openMode"]), { token: l } = useToken(), { draggable: c, droppable: u } = useContext(SortableContext), { isOver: d, setNodeRef: p } = u, m = x({}, n);
|
|
33645
33645
|
return d && ((g = c == null ? void 0 : c.active) == null ? void 0 : g.id) !== ((f = u == null ? void 0 : u.over) == null ? void 0 : f.id) && (m[t === "a" ? "color" : "background"] = new TinyColor(l.colorSettings).setAlpha(0.15).toHex8String(), Object.assign(m, o)), React.createElement(
|
|
33646
33646
|
t || "div",
|
|
33647
33647
|
F(x({
|
|
@@ -33661,7 +33661,7 @@ const SortableProvider = (e) => {
|
|
|
33661
33661
|
return e.id ? e.id : t.address.toString();
|
|
33662
33662
|
}, SortableItem = observer$1(
|
|
33663
33663
|
(e) => {
|
|
33664
|
-
const l = useSortableItemProps(e), { schema: t, id: o, eid: n, removeParentsIfNoChildren: r } = l, i =
|
|
33664
|
+
const l = useSortableItemProps(e), { schema: t, id: o, eid: n, removeParentsIfNoChildren: r } = l, i = K(l, ["schema", "id", "eid", "removeParentsIfNoChildren"]), a = useMemo(() => ({
|
|
33665
33665
|
insertAdjacent: "afterEnd",
|
|
33666
33666
|
schema: t,
|
|
33667
33667
|
removeParentsIfNoChildren: r != null ? r : !0
|
|
@@ -33729,10 +33729,10 @@ const SortableProvider = (e) => {
|
|
|
33729
33729
|
}
|
|
33730
33730
|
});
|
|
33731
33731
|
}, FormComponent$1 = (e) => {
|
|
33732
|
-
const l = e, { form: t, children: o } = l, n =
|
|
33732
|
+
const l = e, { form: t, children: o } = l, n = K(l, ["form", "children"]), r = useField(), i = useFieldSchema(), a = useAttach(t.createVoidField(F(x({}, r.props), { basePath: "" })));
|
|
33733
33733
|
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, F(x({ layout: "vertical" }, n), { children: /* @__PURE__ */ jsx(RecursionField, { basePath: a.address, schema: i, onlyRenderProperties: !0 }) })) }) });
|
|
33734
33734
|
}, Def$1 = (e) => e.children, FormDecorator$1 = (e) => {
|
|
33735
|
-
const u = e, { form: t, children: o, disabled: n } = u, r =
|
|
33735
|
+
const u = e, { form: t, children: o, disabled: n } = u, r = K(u, ["form", "children", "disabled"]), i = useField(), a = useFieldSchema(), l = useAttach(t.createVoidField(F(x({}, i.props), { basePath: "" }))), c = useComponent(a["x-component"], Def$1);
|
|
33736
33736
|
return useEffect(() => {
|
|
33737
33737
|
t.disabled = n || i.disabled;
|
|
33738
33738
|
}, [n, i.disabled]), /* @__PURE__ */ jsx(ConfigProvider, { componentDisabled: n, children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, F(x({ layout: "vertical" }, r), { children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: l, children: /* @__PURE__ */ jsx(c, F(x({}, i.componentProps), { children: /* @__PURE__ */ jsx(RecursionField, { basePath: l.address, schema: a, onlyRenderProperties: !0 }) })) }) })) }) }) });
|
|
@@ -33745,7 +33745,7 @@ const SortableProvider = (e) => {
|
|
|
33745
33745
|
FormBlockContext.displayName = "FormBlockContext";
|
|
33746
33746
|
const Form$1 = observer$1(
|
|
33747
33747
|
(e) => {
|
|
33748
|
-
const p = e, { request: t, effects: o, initialValue: n, useValues: r = useDefaultValues } = p, i =
|
|
33748
|
+
const p = e, { request: t, effects: o, initialValue: n, useValues: r = useDefaultValues } = p, i = K(p, ["request", "effects", "initialValue", "useValues"]), a = useFieldSchema(), l = useField(), c = useMemo(() => createForm({ effects: o }), []), u = r(
|
|
33749
33749
|
{
|
|
33750
33750
|
uid: a["x-uid"],
|
|
33751
33751
|
onSuccess(h) {
|
|
@@ -33900,7 +33900,7 @@ const ReadPretty$b = observer$1(
|
|
|
33900
33900
|
},
|
|
33901
33901
|
{ displayName: "SelectReadPretty" }
|
|
33902
33902
|
), isEmptyObject = (e) => !isValid(e) || typeof e == "object" && Object.keys(e).length === 0, ObjectSelect = (e) => {
|
|
33903
|
-
const p = e, { value: t, options: o, onChange: n, fieldNames: r, mode: i, loading: a, rawOptions: l, defaultValue: c } = p, u =
|
|
33903
|
+
const p = e, { value: t, options: o, onChange: n, fieldNames: r, mode: i, loading: a, rawOptions: l, defaultValue: c } = p, u = K(p, ["value", "options", "onChange", "fieldNames", "mode", "loading", "rawOptions", "defaultValue"]), d = (m) => {
|
|
33904
33904
|
var f;
|
|
33905
33905
|
if (isEmptyObject(m))
|
|
33906
33906
|
return;
|
|
@@ -33963,7 +33963,7 @@ const ReadPretty$b = observer$1(
|
|
|
33963
33963
|
return ((o = t == null ? void 0 : t.label) != null ? o : "").toLowerCase().includes((e || "").toLowerCase());
|
|
33964
33964
|
}, InternalSelect = connect(
|
|
33965
33965
|
(e) => {
|
|
33966
|
-
const u = e, { objectValue: t, loading: o, value: n, rawOptions: r, defaultValue: i } = u, a =
|
|
33966
|
+
const u = e, { objectValue: t, loading: o, value: n, rawOptions: r, defaultValue: i } = u, a = K(u, ["objectValue", "loading", "value", "rawOptions", "defaultValue"]);
|
|
33967
33967
|
let l = e.multiple ? "multiple" : e.mode;
|
|
33968
33968
|
if (l && !["multiple", "tags"].includes(l) && (l = void 0), t)
|
|
33969
33969
|
return /* @__PURE__ */ jsx(
|
|
@@ -34071,7 +34071,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34071
34071
|
dataSource: m,
|
|
34072
34072
|
toOptionsItem: h = (Y) => Y,
|
|
34073
34073
|
popupMatchSelectWidth: g = !1
|
|
34074
|
-
} = W, f =
|
|
34074
|
+
} = W, f = K(W, [
|
|
34075
34075
|
"fieldNames",
|
|
34076
34076
|
"service",
|
|
34077
34077
|
"wait",
|
|
@@ -34340,7 +34340,7 @@ const useFormBlockHeight = () => {
|
|
|
34340
34340
|
const e = useDataBlockHeight(), t = useFieldSchema(), { token: o } = theme.useToken(), { designable: n } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i } = r || {}, { display: a, enabled: l } = useFormDataTemplates(), c = t.reduceProperties((w, T) => T["x-component"] === "ActionBar" ? T : w), u = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0, d = (I = (v = (y = t == null ? void 0 : t.parent) == null ? void 0 : y["x-decorator"]) == null ? void 0 : v.includes) == null ? void 0 : I.call(v, "FormBlockProvider"), p = u || n ? o.controlHeight + (d ? 1 : 2) * o.marginLG : o.marginLG, m = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, { data: h } = useDataBlockRequest() || {}, { count: g, pageSize: f } = (h == null ? void 0 : h.meta) || {}, S = g > f ? o.controlHeightSM + 1 * o.paddingLG : 0, b = a && l ? o.controlHeight + 2 * o.padding + o.margin : 0;
|
|
34341
34341
|
return e - p - o.paddingLG - m - S - b;
|
|
34342
34342
|
}, FormComponent = (e) => {
|
|
34343
|
-
const g = e, { form: t, children: o } = g, n =
|
|
34343
|
+
const g = e, { form: t, children: o } = g, n = K(g, ["form", "children"]), r = useField(), i = useFieldSchema(), a = getCardItemSchema == null ? void 0 : getCardItemSchema(i), l = useAttach(t.createVoidField(F(x({}, r.props), { basePath: "" }))), c = useFormBlockHeight(), { token: u } = theme.useToken(), {
|
|
34344
34344
|
layout: d = "vertical",
|
|
34345
34345
|
labelAlign: p = "left",
|
|
34346
34346
|
labelWidth: m = 120,
|
|
@@ -34378,7 +34378,7 @@ const useFormBlockHeight = () => {
|
|
|
34378
34378
|
})
|
|
34379
34379
|
) }) });
|
|
34380
34380
|
}, Def = (e) => e.children, FormDecorator = (e) => {
|
|
34381
|
-
const u = e, { form: t, children: o, disabled: n } = u, r =
|
|
34381
|
+
const u = e, { form: t, children: o, disabled: n } = u, r = K(u, ["form", "children", "disabled"]), i = useField(), a = useFieldSchema(), l = useAttach(t.createVoidField(F(x({}, i.props), { basePath: "" }))), c = useComponent(a["x-component"], Def);
|
|
34382
34382
|
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, F(x({ layout: "vertical" }, r), { children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: l, children: /* @__PURE__ */ jsx(c, F(x({}, i.componentProps), { children: /* @__PURE__ */ jsx(RecursionField, { basePath: l.address, schema: a, onlyRenderProperties: !0 }) })) }) })) }) });
|
|
34383
34383
|
}, getLinkageRules = (e) => {
|
|
34384
34384
|
let t = null;
|
|
@@ -34444,7 +34444,7 @@ const useFormBlockHeight = () => {
|
|
|
34444
34444
|
}
|
|
34445
34445
|
`, Form = withDynamicSchemaProps(
|
|
34446
34446
|
observer$1((e) => {
|
|
34447
|
-
const t = useField(), { token: o } = useToken$1(), c = useProps(e), { form: n, disabled: r } = c, i =
|
|
34447
|
+
const t = useField(), { token: o } = useToken$1(), c = useProps(e), { form: n, disabled: r } = c, i = K(c, ["form", "disabled"]), a = useMemo(() => ({
|
|
34448
34448
|
token: {
|
|
34449
34449
|
// 这里是为了防止区块内部也收到 marginBlock 的影响(marginBlock:区块之间的间距)
|
|
34450
34450
|
// @ts-ignore
|
|
@@ -35158,7 +35158,7 @@ const useStyles$9 = genStyleHook("nb-page", (e) => {
|
|
|
35158
35158
|
] }) }) }) }) : null;
|
|
35159
35159
|
}, Page = (e) => {
|
|
35160
35160
|
var q, E, U;
|
|
35161
|
-
const O = e, { children: t } = O, o =
|
|
35161
|
+
const O = e, { children: t } = O, o = K(O, ["children"]), { t: n } = useTranslation(), r = useCompile(), { title: i, setTitle: a } = useDocumentTitle(), l = useFieldSchema(), c = useDesignable(), { theme: u } = useGlobalTheme(), { getAriaLabel: d } = useGetAriaLabelOfSchemaInitializer(), { tabUid: p, name: m } = useParams(), h = useRouterBasename(), [g, f] = useState(!1);
|
|
35162
35162
|
useEffect(() => {
|
|
35163
35163
|
setTimeout(() => {
|
|
35164
35164
|
f(!0);
|
|
@@ -35234,10 +35234,10 @@ const useStyles$9 = genStyleHook("nb-page", (e) => {
|
|
|
35234
35234
|
u
|
|
35235
35235
|
).open({
|
|
35236
35236
|
initialValues: {}
|
|
35237
|
-
}), { title:
|
|
35237
|
+
}), { title: H, icon: W } = G;
|
|
35238
35238
|
c.insertBeforeEnd({
|
|
35239
35239
|
type: "void",
|
|
35240
|
-
title:
|
|
35240
|
+
title: H,
|
|
35241
35241
|
"x-icon": W,
|
|
35242
35242
|
"x-component": "Grid",
|
|
35243
35243
|
"x-initializer": "page:addBlock",
|
|
@@ -35618,7 +35618,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
35618
35618
|
filter: a = trueFilter,
|
|
35619
35619
|
rootOption: l,
|
|
35620
35620
|
loadData: c
|
|
35621
|
-
} = L, u =
|
|
35621
|
+
} = L, u = K(L, [
|
|
35622
35622
|
"title",
|
|
35623
35623
|
"value",
|
|
35624
35624
|
"onChange",
|
|
@@ -35740,7 +35740,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
35740
35740
|
}, InternalAssociationSelect$1 = observer$1(
|
|
35741
35741
|
(e) => {
|
|
35742
35742
|
var w;
|
|
35743
|
-
const I = e, { objectValue: t = !0, addMode: o } = I, n =
|
|
35743
|
+
const I = e, { objectValue: t = !0, addMode: o } = I, n = K(I, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (w = i["x-component-props"]) == null ? void 0 : w.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), S = useAPIClient().resource(l.target), b = useCollectionRecordData();
|
|
35744
35744
|
useEffect(() => {
|
|
35745
35745
|
const T = isVariable(r.value) ? void 0 : r.value, A = Array.isArray(T) ? T.filter(Boolean) : T;
|
|
35746
35746
|
p(A);
|
|
@@ -36223,7 +36223,7 @@ function IframePreviewer({ index: e, list: t, onSwitchIndex: o }) {
|
|
|
36223
36223
|
);
|
|
36224
36224
|
}
|
|
36225
36225
|
function InternalUpload(e) {
|
|
36226
|
-
const r = e, { onChange: t } = r, o =
|
|
36226
|
+
const r = e, { onChange: t } = r, o = K(r, ["onChange"]), n = useCallback(
|
|
36227
36227
|
(i) => {
|
|
36228
36228
|
t == null || t(toFileList(i.fileList));
|
|
36229
36229
|
},
|
|
@@ -36342,7 +36342,7 @@ function AttachmentList(e) {
|
|
|
36342
36342
|
] });
|
|
36343
36343
|
}
|
|
36344
36344
|
function Uploader(o) {
|
|
36345
|
-
var n = o, { rules: e } = n, t =
|
|
36345
|
+
var n = o, { rules: e } = n, t = K(n, ["rules"]);
|
|
36346
36346
|
const { disabled: r, multiple: i, value: a, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), { t: p } = useTranslation(), { componentCls: m } = useStyles$8(), h = useField(), g = useUploadProps(t), f = useBeforeUpload(e);
|
|
36347
36347
|
console.log("----------", u), useEffect(() => {
|
|
36348
36348
|
u.length ? h.setFeedback({
|
|
@@ -36425,7 +36425,7 @@ Upload.Attachment = withDynamicSchemaProps(connect(Attachment, mapReadPretty(Att
|
|
|
36425
36425
|
});
|
|
36426
36426
|
Upload.Dragger = connect(
|
|
36427
36427
|
(e) => {
|
|
36428
|
-
const c = e, { tipContent: t, onChange: o } = c, n =
|
|
36428
|
+
const c = e, { tipContent: t, onChange: o } = c, n = K(c, ["tipContent", "onChange"]), { wrapSSR: r, hashId: i, componentCls: a } = useStyles$8(), l = useCallback(
|
|
36429
36429
|
(u) => {
|
|
36430
36430
|
o == null || o(toFileList(u.fileList));
|
|
36431
36431
|
},
|
|
@@ -36445,8 +36445,8 @@ Upload.Dragger = connect(
|
|
|
36445
36445
|
Upload.DraggerV2 = withDynamicSchemaProps(
|
|
36446
36446
|
connect(
|
|
36447
36447
|
(o) => {
|
|
36448
|
-
var n = o, { rules: e } = n, t =
|
|
36449
|
-
const { t: r } = useTranslation(), i = r("Click or drag file to this area to upload"), b = useProps(t), { title: a = i } = b, l =
|
|
36448
|
+
var n = o, { rules: e } = n, t = K(n, ["rules"]);
|
|
36449
|
+
const { t: r } = useTranslation(), i = r("Click or drag file to this area to upload"), b = useProps(t), { title: a = i } = b, l = K(b, ["title"]), [c, u] = useState(!1), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$8(), h = useBeforeUpload(e), { size: g, mimetype: f } = e != null ? e : {}, C = useSizeHint(g), S = useCallback(
|
|
36450
36450
|
({ fileList: y }) => {
|
|
36451
36451
|
const { onChange: v } = l;
|
|
36452
36452
|
v == null || v(y), y.some((I) => I.status === "uploading") ? u(!0) : u(!1);
|
|
@@ -36615,7 +36615,7 @@ const schema$1 = {
|
|
|
36615
36615
|
setSelectedRows: n,
|
|
36616
36616
|
selectedRows: r = [],
|
|
36617
36617
|
onChange: i
|
|
36618
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
36618
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = K(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
36619
36619
|
return F(x({}, c), {
|
|
36620
36620
|
rowKey: l,
|
|
36621
36621
|
rowSelection: {
|
|
@@ -36632,7 +36632,7 @@ const schema$1 = {
|
|
|
36632
36632
|
});
|
|
36633
36633
|
};
|
|
36634
36634
|
function FileSelector(e) {
|
|
36635
|
-
const S = e, { disabled: t, multiple: o, value: n, onChange: r, action: i, onSelect: a, quickUpload: l, selectFile: c } = S, u =
|
|
36635
|
+
const S = e, { disabled: t, multiple: o, value: n, onChange: r, action: i, onSelect: a, quickUpload: l, selectFile: c } = S, u = K(S, ["disabled", "multiple", "value", "onChange", "action", "onSelect", "quickUpload", "selectFile"]), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$8(), { useFileCollectionStorageRules: h } = useExpressionScope(), { t: g } = useTranslation(), f = h(), C = c === void 0 && l === void 0;
|
|
36636
36636
|
return d(
|
|
36637
36637
|
/* @__PURE__ */ jsx("div", { className: cls(`${m}-wrapper`, `${m}-picture-card-wrapper`, "nb-upload", p), children: /* @__PURE__ */ jsxs("div", { className: cls(`${m}-list`, `${m}-list-picture-card`), children: [
|
|
36638
36638
|
/* @__PURE__ */ jsx(AttachmentList, { disabled: t, multiple: o, value: n, onChange: r }),
|
|
@@ -36688,7 +36688,7 @@ function FileSelector(e) {
|
|
|
36688
36688
|
}
|
|
36689
36689
|
const InternalFileManager = (e) => {
|
|
36690
36690
|
var A, D;
|
|
36691
|
-
const T = e, { value: t, multiple: o, onChange: n } = T, r =
|
|
36691
|
+
const T = e, { value: t, multiple: o, onChange: n } = T, r = K(T, ["value", "multiple", "onChange"]), i = useFieldSchema(), [a, l] = useState(!1), [c, u] = useState([]), d = useInsertSchema("Selector"), p = useFieldNames$1(e), m = useField(), [h, g] = useState([]), { getField: f } = useCollection_deprecated(), C = f(m.props.name), S = useLabelUiSchema$1(C == null ? void 0 : C.target, (p == null ? void 0 : p.label) || "label"), b = useCompile(), { modalProps: y } = useActionContext(), v = ($) => {
|
|
36692
36692
|
$.stopPropagation(), $.preventDefault(), d(schema$1.Selector), l(!0), u([]);
|
|
36693
36693
|
};
|
|
36694
36694
|
useEffect(() => {
|
|
@@ -36799,7 +36799,7 @@ const InternalFileManager = (e) => {
|
|
|
36799
36799
|
if (Array.isArray(B))
|
|
36800
36800
|
B = B.map((O, q) => {
|
|
36801
36801
|
var U, G;
|
|
36802
|
-
const E = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (
|
|
36802
|
+
const E = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (H) => H.value === O);
|
|
36803
36803
|
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || O }, q) : /* @__PURE__ */ jsx(Tag, { children: O }, O);
|
|
36804
36804
|
}).reverse();
|
|
36805
36805
|
else {
|
|
@@ -36993,7 +36993,7 @@ function transformNestedData(e) {
|
|
|
36993
36993
|
const { parent: l } = n;
|
|
36994
36994
|
o(l);
|
|
36995
36995
|
}
|
|
36996
|
-
const a = n, { parent: r } = a, i =
|
|
36996
|
+
const a = n, { parent: r } = a, i = K(a, ["parent"]);
|
|
36997
36997
|
t.push(i);
|
|
36998
36998
|
}
|
|
36999
36999
|
return e && o(e), t;
|
|
@@ -37075,7 +37075,7 @@ const InternalNesterCss = css`
|
|
|
37075
37075
|
setSelectedRows: n,
|
|
37076
37076
|
selectedRows: r = [],
|
|
37077
37077
|
onChange: i
|
|
37078
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
37078
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = K(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
37079
37079
|
return F(x({}, c), {
|
|
37080
37080
|
rowKey: l,
|
|
37081
37081
|
rowSelection: {
|
|
@@ -37092,7 +37092,7 @@ const InternalNesterCss = css`
|
|
|
37092
37092
|
}, InternalPicker = observer$1(
|
|
37093
37093
|
(e) => {
|
|
37094
37094
|
var j;
|
|
37095
|
-
const z = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = z, c =
|
|
37095
|
+
const z = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = z, c = K(z, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), S = useCompile(), b = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), w = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((B) => {
|
|
37096
37096
|
const M = B == null ? void 0 : B[d.label];
|
|
37097
37097
|
return F(x({}, B), {
|
|
37098
37098
|
[d.label]: getLabelFormatValue$1(S(b), S(M))
|
|
@@ -38091,7 +38091,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38091
38091
|
var g, C, S, b, y, v;
|
|
38092
38092
|
const { isInSubTable: t } = useFlag(), { token: o } = useToken(), n = (g = e["data-row-key"]) == null ? void 0 : g.toString(), { setNodeRef: r, isOver: i, active: a, over: l } = useSortable({
|
|
38093
38093
|
id: n
|
|
38094
|
-
}), f = e, { rowIndex: c } = f, u =
|
|
38094
|
+
}), f = e, { rowIndex: c } = f, u = K(f, ["rowIndex"]), { ref: d, inView: p } = useInView({
|
|
38095
38095
|
threshold: 0,
|
|
38096
38096
|
triggerOnce: !0,
|
|
38097
38097
|
initialInView: t || (c || 0) < INITIAL_ROWS_NUMBER,
|
|
@@ -38122,12 +38122,12 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38122
38122
|
})
|
|
38123
38123
|
) });
|
|
38124
38124
|
}, SortHandle$1 = (e) => {
|
|
38125
|
-
const i = e, { id: t } = i, o =
|
|
38125
|
+
const i = e, { id: t } = i, o = K(i, ["id"]), { listeners: n, setNodeRef: r } = useSortable({
|
|
38126
38126
|
id: t
|
|
38127
38127
|
});
|
|
38128
38128
|
return /* @__PURE__ */ jsx(MenuOutlined, F(x(x({ ref: r }, o), n), { style: { cursor: "grab" } }));
|
|
38129
38129
|
}, TableIndex$2 = (e) => {
|
|
38130
|
-
const n = e, { index: t } = n, o =
|
|
38130
|
+
const n = e, { index: t } = n, o = K(n, ["index"]);
|
|
38131
38131
|
return /* @__PURE__ */ jsx("div", F(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t }));
|
|
38132
38132
|
}, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
|
|
38133
38133
|
var b, y, v, I, w, T;
|
|
@@ -38234,19 +38234,19 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38234
38234
|
}, columnOpacityStyle = {
|
|
38235
38235
|
opacity: 0.3
|
|
38236
38236
|
}, HeaderCellComponent = (o) => {
|
|
38237
|
-
var n = o, { columnHidden: e } = n, t =
|
|
38237
|
+
var n = o, { columnHidden: e } = n, t = K(n, ["columnHidden"]);
|
|
38238
38238
|
const { designable: r } = useDesignable();
|
|
38239
38239
|
return e ? /* @__PURE__ */ jsx("th", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : null }) : /* @__PURE__ */ jsx("th", F(x({}, t), { className: cls(t.className, headerClass) }));
|
|
38240
38240
|
}, BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, x({}, e)), InternalBodyCellComponent = (e) => {
|
|
38241
38241
|
var m;
|
|
38242
|
-
const { token: t } = useToken(), o = useContext(InViewContext), n = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: i, rowIndex: a, isSubTable: l } = h, c =
|
|
38242
|
+
const { token: t } = useToken(), o = useContext(InViewContext), n = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: i, rowIndex: a, isSubTable: l } = h, c = K(h, ["record", "schema", "rowIndex", "isSubTable"]), { valueMap: u } = useSatisfiedActionValues({ formValues: r, category: "style", schema: i }), d = useMemo(() => Object.assign(x({}, e.style), u), [e.style, u]), p = {
|
|
38243
38243
|
height: "1em",
|
|
38244
38244
|
backgroundColor: "rgba(0, 0, 0, 0.06)",
|
|
38245
38245
|
borderRadius: `${t.borderRadiusSM}px`
|
|
38246
38246
|
};
|
|
38247
38247
|
return /* @__PURE__ */ jsx("td", F(x({}, c), { className: cls(e.className, cellClass), style: d, children: l || o || n ? e.children : /* @__PURE__ */ jsx("div", { style: p }) }));
|
|
38248
38248
|
}, displayNone = { display: "none" }, BodyCellComponent = (o) => {
|
|
38249
|
-
var n = o, { columnHidden: e } = n, t =
|
|
38249
|
+
var n = o, { columnHidden: e } = n, t = K(n, ["columnHidden"]);
|
|
38250
38250
|
const { designable: r } = useDesignable();
|
|
38251
38251
|
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t));
|
|
38252
38252
|
}, InternalNocoBaseTable = React.memo(
|
|
@@ -38266,7 +38266,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38266
38266
|
columns: m,
|
|
38267
38267
|
expandable: h,
|
|
38268
38268
|
field: g
|
|
38269
|
-
} = C, f =
|
|
38269
|
+
} = C, f = K(C, [
|
|
38270
38270
|
"tableHeight",
|
|
38271
38271
|
"SortableWrapper",
|
|
38272
38272
|
"tableSizeRefCallback",
|
|
@@ -38348,7 +38348,7 @@ InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
|
|
|
38348
38348
|
const Table$1 = withDynamicSchemaProps(
|
|
38349
38349
|
observer$1((e) => {
|
|
38350
38350
|
var ce, ye, ve;
|
|
38351
|
-
const { token: t } = useToken(), de = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = de, r =
|
|
38351
|
+
const { token: t } = useToken(), de = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = de, r = K(de, ["pagination", "useProps"]), pe = (n == null ? void 0 : n()) || {}, { pagination: i } = pe, a = K(pe, ["pagination"]), me = x(x({}, r), a), {
|
|
38352
38352
|
dragSort: l = !1,
|
|
38353
38353
|
showIndex: c = !0,
|
|
38354
38354
|
onRowSelectionChange: u,
|
|
@@ -38359,7 +38359,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38359
38359
|
onExpand: g,
|
|
38360
38360
|
loading: f,
|
|
38361
38361
|
onClickRow: C
|
|
38362
|
-
} = me, S =
|
|
38362
|
+
} = me, S = K(me, [
|
|
38363
38363
|
"dragSort",
|
|
38364
38364
|
"showIndex",
|
|
38365
38365
|
"onRowSelectionChange",
|
|
@@ -38388,7 +38388,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38388
38388
|
const oe = A ? D : [];
|
|
38389
38389
|
_.isEqual(oe, j) || R(oe);
|
|
38390
38390
|
}, [A, D]);
|
|
38391
|
-
const
|
|
38391
|
+
const H = useCallback((oe) => {
|
|
38392
38392
|
if (m)
|
|
38393
38393
|
return W(oe);
|
|
38394
38394
|
if (oe.key)
|
|
@@ -38403,9 +38403,9 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38403
38403
|
return Array.isArray(m) ? m.map((re) => {
|
|
38404
38404
|
var ae;
|
|
38405
38405
|
return ((ae = oe[re]) == null ? void 0 : ae.toString()) || "";
|
|
38406
|
-
}).join("-") : typeof m == "string" ? oe[m] : (ne = (m != null ? m :
|
|
38406
|
+
}).join("-") : typeof m == "string" ? oe[m] : (ne = (m != null ? m : H)(oe)) == null ? void 0 : ne.toString();
|
|
38407
38407
|
},
|
|
38408
|
-
[JSON.stringify(m),
|
|
38408
|
+
[JSON.stringify(m), H]
|
|
38409
38409
|
), X = useMemo(() => (Array.isArray(b == null ? void 0 : b.value) ? b.value : []).filter(Boolean), [b == null ? void 0 : b.value, (ve = b == null ? void 0 : b.value) == null ? void 0 : ve.length]), J = useMemo(() => (oe) => {
|
|
38410
38410
|
const ne = useCallback((re) => {
|
|
38411
38411
|
var Fe, Pe, Ie, Ae, ke, Te;
|
|
@@ -38526,7 +38526,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38526
38526
|
tableHeight: ee,
|
|
38527
38527
|
SortableWrapper: te,
|
|
38528
38528
|
tableSizeRefCallback: se,
|
|
38529
|
-
defaultRowKey:
|
|
38529
|
+
defaultRowKey: H,
|
|
38530
38530
|
dataSource: X
|
|
38531
38531
|
}, S), Z), {
|
|
38532
38532
|
paginationProps: L,
|
|
@@ -38817,7 +38817,7 @@ const ReadPretty$7 = observer$1(
|
|
|
38817
38817
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
38818
38818
|
const AssociationSelect = InternalAssociationSelect;
|
|
38819
38819
|
AssociationSelect.Designer = function e() {
|
|
38820
|
-
var B, M, k, N, O, q, E, U, G,
|
|
38820
|
+
var B, M, k, N, O, q, E, U, G, H, W;
|
|
38821
38821
|
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, 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: S } = useIsAllowToSetDefaultValue(), b = a(u.name) || n(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = o(b == null ? void 0 : b.interface), w = (B = I == null ? void 0 : I.validateSchema) == null ? void 0 : B.call(I, u), T = (M = b == null ? void 0 : b.uiSchema) == null ? void 0 : M.title, A = b != null && b.target ? t(b == null ? void 0 : b.target) : [];
|
|
38822
38822
|
c.title === T || c.title;
|
|
38823
38823
|
const D = useSortFields(b == null ? void 0 : b.target), $ = ((O = (N = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : N.params) == null ? void 0 : O.sort) || [];
|
|
@@ -39184,7 +39184,7 @@ AssociationSelect.Designer = function e() {
|
|
|
39184
39184
|
{
|
|
39185
39185
|
title: d("Title field"),
|
|
39186
39186
|
options: z,
|
|
39187
|
-
value: (W = (
|
|
39187
|
+
value: (W = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : W.label,
|
|
39188
39188
|
onChange: (X) => {
|
|
39189
39189
|
var Q, Z;
|
|
39190
39190
|
const J = {
|
|
@@ -39539,7 +39539,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
39539
39539
|
}
|
|
39540
39540
|
};
|
|
39541
39541
|
}), CardItem = (e) => {
|
|
39542
|
-
const C = e, { children: t, name: o, lazyRender: n = {}, heightMode: r } = C, i =
|
|
39542
|
+
const C = e, { children: t, name: o, lazyRender: n = {}, heightMode: r } = C, i = K(C, ["children", "name", "lazyRender", "heightMode"]), a = useSchemaTemplate(), l = useFieldSchema(), c = l == null ? void 0 : l["x-template-key"], S = n, { element: u } = S, d = K(S, ["element"]), { ref: p, inView: m } = useInView(x({
|
|
39543
39543
|
threshold: 0,
|
|
39544
39544
|
initialInView: !0,
|
|
39545
39545
|
triggerOnce: !0,
|
|
@@ -39585,7 +39585,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
39585
39585
|
changeOnSelectLast: c,
|
|
39586
39586
|
changeOnSelect: u,
|
|
39587
39587
|
maxLevel: d
|
|
39588
|
-
} = y, p =
|
|
39588
|
+
} = y, p = K(y, [
|
|
39589
39589
|
"value",
|
|
39590
39590
|
"onChange",
|
|
39591
39591
|
"labelInValue",
|
|
@@ -39713,7 +39713,7 @@ function useCollectionOptions({ filter: e, isTableOid: t }) {
|
|
|
39713
39713
|
}
|
|
39714
39714
|
const CollectionSelect = connect(
|
|
39715
39715
|
(e) => {
|
|
39716
|
-
const a = e, { filter: t } = a, o =
|
|
39716
|
+
const a = e, { filter: t } = a, o = K(a, ["filter"]), n = useCollectionOptions(e), { t: r } = useTranslation(), i = useCallback(
|
|
39717
39717
|
(l, c) => {
|
|
39718
39718
|
var u, d;
|
|
39719
39719
|
return ((u = c == null ? void 0 : c.label.toLowerCase()) != null ? u : "").includes(l.toLocaleLowerCase()) || ((d = c == null ? void 0 : c.value.toString().toLowerCase()) != null ? d : "").includes(l.toLocaleLowerCase());
|
|
@@ -39758,7 +39758,7 @@ function useDataSourceOptions({ filter: e }) {
|
|
|
39758
39758
|
);
|
|
39759
39759
|
}
|
|
39760
39760
|
const DataSourceSelect = connect((e) => {
|
|
39761
|
-
const a = e, { filter: t } = a, o =
|
|
39761
|
+
const a = e, { filter: t } = a, o = K(a, ["filter"]), n = useDataSourceOptions(e), { t: r } = useTranslation(), i = useCallback(
|
|
39762
39762
|
(l, c) => {
|
|
39763
39763
|
var u, d;
|
|
39764
39764
|
return ((u = c == null ? void 0 : c.label.toLowerCase()) != null ? u : "").includes(l.toLocaleLowerCase()) || ((d = c == null ? void 0 : c.value.toString().toLowerCase()) != null ? d : "").includes(l.toLocaleLowerCase());
|
|
@@ -39779,7 +39779,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
39779
39779
|
})
|
|
39780
39780
|
);
|
|
39781
39781
|
}), DataSourceCollectionCascaderReadPretty = observer$1((e) => {
|
|
39782
|
-
const t = useDataSourceManager(), o = useCompile(), f = e, { value: n, onChange: r, dataSourceFilter: i, collectionFilter: a } = f, l =
|
|
39782
|
+
const t = useDataSourceManager(), o = useCompile(), f = e, { value: n, onChange: r, dataSourceFilter: i, collectionFilter: a } = f, l = K(f, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(n), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (i ? p.filter(i) : p).map((C) => ({
|
|
39783
39783
|
label: o(C.displayName),
|
|
39784
39784
|
value: C.key,
|
|
39785
39785
|
children: C.collectionManager.collectionInstancesArr.filter(a != null ? a : (S) => !S.hidden).map((S) => ({
|
|
@@ -39796,7 +39796,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
39796
39796
|
})(d, m);
|
|
39797
39797
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tag, { children: g.join(" / ") }) });
|
|
39798
39798
|
}), DataSourceCollectionCascader = connect((e) => {
|
|
39799
|
-
const t = useDataSourceManager(), o = useCompile(), g = e, { value: n, onChange: r, dataSourceFilter: i, collectionFilter: a } = g, l =
|
|
39799
|
+
const t = useDataSourceManager(), o = useCompile(), g = e, { value: n, onChange: r, dataSourceFilter: i, collectionFilter: a } = g, l = K(g, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(n), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (i ? p.filter(i) : p).map((f) => ({
|
|
39800
39800
|
label: o(f.displayName),
|
|
39801
39801
|
value: f.key,
|
|
39802
39802
|
children: f.collectionManager.collectionInstancesArr.filter(a != null ? a : (C) => !C.hidden).map((C) => ({
|
|
@@ -39814,7 +39814,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
39814
39814
|
return /* @__PURE__ */ jsx(Cascader$1, F(x({ showSearch: !0 }, l), { options: m, value: d, onChange: h }));
|
|
39815
39815
|
}, mapReadPretty(DataSourceCollectionCascaderReadPretty)), ColorPicker = connect(
|
|
39816
39816
|
(e) => {
|
|
39817
|
-
const r = e, { value: t, onChange: o } = r, n =
|
|
39817
|
+
const r = e, { value: t, onChange: o } = r, n = K(r, ["value", "onChange"]);
|
|
39818
39818
|
return /* @__PURE__ */ jsx("div", { role: "button", "aria-label": "color-picker-normal", style: { display: "inline-block" }, children: /* @__PURE__ */ jsx(
|
|
39819
39819
|
ColorPicker$1,
|
|
39820
39820
|
F(x({
|
|
@@ -39883,7 +39883,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
39883
39883
|
default: '{{t("Default")}}'
|
|
39884
39884
|
}, ColorSelect = connect(
|
|
39885
39885
|
(e) => {
|
|
39886
|
-
const t = useCompile(), r = e, { colors: o = defaultColors } = r, n =
|
|
39886
|
+
const t = useCompile(), r = e, { colors: o = defaultColors } = r, n = K(r, ["colors"]);
|
|
39887
39887
|
return /* @__PURE__ */ jsx(Select$1, F(x({}, n), { children: Object.keys(o).map((i) => /* @__PURE__ */ jsx(Select$1.Option, { value: i, children: /* @__PURE__ */ jsx(Tag, { color: i, children: t(o[i] || o.default) }) }, i)) }));
|
|
39888
39888
|
},
|
|
39889
39889
|
mapProps((e, t) => F(x({}, e), {
|
|
@@ -39894,7 +39894,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
39894
39894
|
return n[o] ? /* @__PURE__ */ jsx(Tag, { color: o, children: t(n[o] || n.default) }) : null;
|
|
39895
39895
|
})
|
|
39896
39896
|
), Input = (e) => {
|
|
39897
|
-
const n = e, { onChange: t } = n, o =
|
|
39897
|
+
const n = e, { onChange: t } = n, o = K(n, ["onChange"]);
|
|
39898
39898
|
return /* @__PURE__ */ jsx(
|
|
39899
39899
|
"fieldset",
|
|
39900
39900
|
{
|
|
@@ -40734,7 +40734,7 @@ function toSafeNumber(e) {
|
|
|
40734
40734
|
return e && (e > Number.MAX_SAFE_INTEGER || e < Number.MIN_SAFE_INTEGER ? new BigNumber(e).toString() : Number(e));
|
|
40735
40735
|
}
|
|
40736
40736
|
const InputNumber = connect((e) => {
|
|
40737
|
-
const r = e, { onChange: t } = r, o =
|
|
40737
|
+
const r = e, { onChange: t } = r, o = K(r, ["onChange"]);
|
|
40738
40738
|
return /* @__PURE__ */ jsx(InputNumber$1, x({ onChange: (i) => {
|
|
40739
40739
|
Number.isNaN(i) ? t(null) : t(toSafeNumber(i));
|
|
40740
40740
|
} }, o));
|
|
@@ -42167,7 +42167,7 @@ const Menu = observer$1(
|
|
|
42167
42167
|
defaultSelectedKeys: a,
|
|
42168
42168
|
defaultOpenKeys: l,
|
|
42169
42169
|
children: c
|
|
42170
|
-
} = L, u =
|
|
42170
|
+
} = L, u = K(L, [
|
|
42171
42171
|
"onSelect",
|
|
42172
42172
|
"mode",
|
|
42173
42173
|
"selectedUid",
|
|
@@ -42250,7 +42250,7 @@ const Menu = observer$1(
|
|
|
42250
42250
|
};
|
|
42251
42251
|
Menu.Item = observer$1(
|
|
42252
42252
|
(e) => {
|
|
42253
|
-
const { t } = useMenuTranslation(), { designable: o } = useDesignable(), { pushMenuItem: n } = useCollectMenuItems(), m = e, { icon: r, children: i, hidden: a } = m, l =
|
|
42253
|
+
const { t } = useMenuTranslation(), { designable: o } = useDesignable(), { pushMenuItem: n } = useCollectMenuItems(), m = e, { icon: r, children: i, hidden: a } = m, l = K(m, ["icon", "children", "hidden"]), c = useFieldSchema(), u = useField(), d = useContext(MenuItemDesignerContext), p = useMemo(() => F(x({}, l), {
|
|
42254
42254
|
hidden: o ? !1 : a,
|
|
42255
42255
|
className: menuItemClass,
|
|
42256
42256
|
key: c.name,
|
|
@@ -42316,7 +42316,7 @@ const MenuURLButton = ({ href: e, params: t, icon: o }) => {
|
|
|
42316
42316
|
};
|
|
42317
42317
|
Menu.URL = observer$1(
|
|
42318
42318
|
(e) => {
|
|
42319
|
-
const { pushMenuItem: t } = useCollectMenuItems(), { designable: o } = useDesignable(), d = e, { icon: n, children: r, hidden: i } = d, a =
|
|
42319
|
+
const { pushMenuItem: t } = useCollectMenuItems(), { designable: o } = useDesignable(), d = e, { icon: n, children: r, hidden: i } = d, a = K(d, ["icon", "children", "hidden"]), l = useFieldSchema(), c = useField();
|
|
42320
42320
|
if (useContext(MenuItemDesignerContext), !t)
|
|
42321
42321
|
return error("Menu.URL must be wrapped by GetMenuItemsContext.Provider"), null;
|
|
42322
42322
|
const u = useMemo(() => F(x({}, a), {
|
|
@@ -42335,7 +42335,7 @@ Menu.URL = observer$1(
|
|
|
42335
42335
|
);
|
|
42336
42336
|
Menu.SubMenu = observer$1(
|
|
42337
42337
|
(e) => {
|
|
42338
|
-
const { t } = useMenuTranslation(), { designable: o } = useDesignable(), { Component: n, getMenuItems: r } = useMenuItem(), { pushMenuItem: i } = useCollectMenuItems(), f = e, { icon: a, children: l, hidden: c } = f, u =
|
|
42338
|
+
const { t } = useMenuTranslation(), { designable: o } = useDesignable(), { Component: n, getMenuItems: r } = useMenuItem(), { pushMenuItem: i } = useCollectMenuItems(), f = e, { icon: a, children: l, hidden: c } = f, u = K(f, ["icon", "children", "hidden"]), d = useFieldSchema(), p = useField(), m = useContext(MenuModeContext), h = useContext(MenuItemDesignerContext), g = useMemo(() => F(x({}, u), {
|
|
42339
42339
|
hidden: o ? !1 : c,
|
|
42340
42340
|
className: menuItemClass,
|
|
42341
42341
|
key: d.name,
|
|
@@ -42368,7 +42368,7 @@ const useStyles$3 = createStyles(({ token: e }) => ({
|
|
|
42368
42368
|
})), Pagination = withDynamicSchemaProps(
|
|
42369
42369
|
observer$1(
|
|
42370
42370
|
(e) => {
|
|
42371
|
-
const r = useProps(e), { hidden: t } = r, o =
|
|
42371
|
+
const r = useProps(e), { hidden: t } = r, o = K(r, ["hidden"]);
|
|
42372
42372
|
return t ? null : /* @__PURE__ */ jsx("div", { onKeyPress: (i) => {
|
|
42373
42373
|
i.key === "Enter" && i.preventDefault();
|
|
42374
42374
|
}, children: /* @__PURE__ */ jsx(Pagination$1, x({}, o)) });
|
|
@@ -42420,7 +42420,7 @@ const useStyles$3 = createStyles(({ token: e }) => ({
|
|
|
42420
42420
|
return m += 4 * h, o > 0 && (m += 2 * (h - o)), n > 0 && (m += 2 * (h - n)), t !== h && (m += 4 * t), m += 6 * r, m += 2 * i, m += 2 * p(), h === o + n && (m -= h), h === t && (m -= t), m -= l, m -= 2 * c, m -= 3 * u, m = m < 0 ? 0 : m, m = m > 100 ? 100 : m, m >= 80 ? 100 : m >= 60 ? 80 : m >= 40 ? 60 : m >= 20 ? 40 : 20;
|
|
42421
42421
|
}, PasswordStrength = (e) => isFn(e.children) ? e.children(getStrength(String(e.value || ""))) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children }), Password = connect(
|
|
42422
42422
|
(e) => {
|
|
42423
|
-
const a = e, { value: t, className: o, checkStrength: n } = a, r =
|
|
42423
|
+
const a = e, { value: t, className: o, checkStrength: n } = a, r = K(a, ["value", "className", "checkStrength"]), i = {
|
|
42424
42424
|
position: "absolute",
|
|
42425
42425
|
zIndex: 1,
|
|
42426
42426
|
height: 8,
|
|
@@ -42605,7 +42605,7 @@ const useTableSelectorProps = () => {
|
|
|
42605
42605
|
setSelectedRows: n,
|
|
42606
42606
|
selectedRows: r = [],
|
|
42607
42607
|
onChange: i
|
|
42608
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
42608
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$3(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = K(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
42609
42609
|
return F(x({}, c), {
|
|
42610
42610
|
rowKey: l,
|
|
42611
42611
|
rowSelection: {
|
|
@@ -42631,7 +42631,7 @@ const useTableSelectorProps = () => {
|
|
|
42631
42631
|
const t = useFieldSchema(), { association: o } = e, { getField: n } = useCollection_deprecated();
|
|
42632
42632
|
return o || n(t.name);
|
|
42633
42633
|
}, InputRecordPicker = (e) => {
|
|
42634
|
-
const v = e, { value: t, multiple: o, onChange: n, quickUpload: r, selectFile: i } = v, a =
|
|
42634
|
+
const v = e, { value: t, multiple: o, onChange: n, quickUpload: r, selectFile: i } = v, a = K(v, ["value", "multiple", "onChange", "quickUpload", "selectFile"]), l = useFieldNames(e), [c, u] = useState(!1), d = useFieldSchema(), p = useAssociation(e), m = useCompile(), h = useLabelUiSchema(p, (l == null ? void 0 : l.label) || "label"), g = isShowFilePicker(h), [f, C] = useState([]), [S, b] = useState([]);
|
|
42635
42635
|
useEffect(() => {
|
|
42636
42636
|
if (t) {
|
|
42637
42637
|
const I = (Array.isArray(t) ? t : t ? [t] : []).map((w) => {
|
|
@@ -42699,7 +42699,7 @@ const useTableSelectorProps = () => {
|
|
|
42699
42699
|
})
|
|
42700
42700
|
] });
|
|
42701
42701
|
}, RecordPickerProvider = (e) => {
|
|
42702
|
-
const c = e, { multiple: t, onChange: o, selectedRows: n, setSelectedRows: r, options: i, collectionField: a } = c, l =
|
|
42702
|
+
const c = e, { multiple: t, onChange: o, selectedRows: n, setSelectedRows: r, options: i, collectionField: a } = c, l = K(c, ["multiple", "onChange", "selectedRows", "setSelectedRows", "options", "collectionField"]);
|
|
42703
42703
|
return /* @__PURE__ */ jsx(
|
|
42704
42704
|
RecordPickerContext.Provider,
|
|
42705
42705
|
{
|
|
@@ -43544,7 +43544,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
43544
43544
|
data: o.value
|
|
43545
43545
|
}), e);
|
|
43546
43546
|
}, SortHandle = (e) => /* @__PURE__ */ jsx(MenuOutlined, x({ className: "drag-handle", style: { cursor: "grab" } }, e)), TableIndex$1 = (e) => {
|
|
43547
|
-
const n = e, { index: t } = n, o =
|
|
43547
|
+
const n = e, { index: t } = n, o = K(n, ["index"]);
|
|
43548
43548
|
return /* @__PURE__ */ jsx("div", F(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t + 1 }));
|
|
43549
43549
|
}, useDefAction = () => ({
|
|
43550
43550
|
move() {
|
|
@@ -43561,7 +43561,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
43561
43561
|
useDataSource: l = useDefDataSource,
|
|
43562
43562
|
useAction: c = useDefAction,
|
|
43563
43563
|
onChange: u
|
|
43564
|
-
} = C, d =
|
|
43564
|
+
} = C, d = K(C, [
|
|
43565
43565
|
"dragSort",
|
|
43566
43566
|
"showIndex",
|
|
43567
43567
|
"useSelectedRowKeys",
|
|
@@ -44924,12 +44924,12 @@ const useCollectionFields = (e) => {
|
|
|
44924
44924
|
const t = useCollection();
|
|
44925
44925
|
return useMemo(() => t.getFields(e), [t, e]);
|
|
44926
44926
|
}, collectionTransform = (e, t) => {
|
|
44927
|
-
const a = e, { rawTitle: o, title: n, fields: r = [] } = a, i =
|
|
44927
|
+
const a = e, { rawTitle: o, title: n, fields: r = [] } = a, i = K(a, ["rawTitle", "title", "fields"]);
|
|
44928
44928
|
return F(x({}, i), {
|
|
44929
44929
|
title: o ? n : t.i18n.t(n, { ns: "lm-collections" }),
|
|
44930
44930
|
rawTitle: o || n,
|
|
44931
44931
|
fields: r == null ? void 0 : r.map((u) => {
|
|
44932
|
-
var d = u, { uiSchema: l } = d, c =
|
|
44932
|
+
var d = u, { uiSchema: l } = d, c = K(d, ["uiSchema"]);
|
|
44933
44933
|
if (l != null && l.title) {
|
|
44934
44934
|
const p = l.title;
|
|
44935
44935
|
l.title = l.rawTitle ? p : t.i18n.t(p, { ns: "lm-collections" }), l.rawTitle = l.rawTitle || p;
|
|
@@ -45211,7 +45211,7 @@ const SelfFields = (e) => {
|
|
|
45211
45211
|
});
|
|
45212
45212
|
return /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: a });
|
|
45213
45213
|
}, AssociationCollectionFields = (e) => {
|
|
45214
|
-
const m = e, { filterAssociationField: t, filterSelfField: o = () => !0, getSchema: n } = m, r =
|
|
45214
|
+
const m = e, { filterAssociationField: t, filterSelfField: o = () => !0, getSchema: n } = m, r = K(m, ["filterAssociationField", "filterSelfField", "getSchema"]), { collection: i, t: a, collectionManager: l } = e.context, c = i.getFields(), u = ["o2o", "oho", "obo", "m2o"], d = c.filter((h) => u.includes(h.interface)).filter((h) => o(h, e.context));
|
|
45215
45215
|
if (!d.length)
|
|
45216
45216
|
return null;
|
|
45217
45217
|
const p = d.map((h) => {
|
|
@@ -46547,7 +46547,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46547
46547
|
let q = [];
|
|
46548
46548
|
M != null && M.length ? M.forEach((E) => {
|
|
46549
46549
|
var G;
|
|
46550
|
-
const U = (G = N == null ? void 0 : N.children) == null ? void 0 : G.find((
|
|
46550
|
+
const U = (G = N == null ? void 0 : N.children) == null ? void 0 : G.find((H) => [E, E.interface].includes(H.name));
|
|
46551
46551
|
U && q.push(F(x({}, U), {
|
|
46552
46552
|
targetScope: E == null ? void 0 : E.targetScope
|
|
46553
46553
|
}));
|
|
@@ -46712,7 +46712,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46712
46712
|
const t = useRecord(), o = useCollectionParentRecordData();
|
|
46713
46713
|
return /* @__PURE__ */ jsx(EditFieldAction, x({ item: t, parentItem: o }, e));
|
|
46714
46714
|
}, EditFieldAction = (e) => {
|
|
46715
|
-
const w = e, { scope: t, getContainer: o, item: n, parentItem: r, children: i } = w, a =
|
|
46715
|
+
const w = e, { scope: t, getContainer: o, item: n, parentItem: r, children: i } = w, a = K(w, ["scope", "getContainer", "item", "parentItem", "children"]), { getInterface: l, collections: c, getCollection: u } = useCollectionManager_deprecated(), [d, p] = useState(!1), [m, h] = useState({}), g = useAPIClient(), { t: f } = useTranslation(), C = useCompile(), [S, b] = useState({}), { isDialect: y } = useDialect(), v = useMemo(() => {
|
|
46716
46716
|
var T;
|
|
46717
46717
|
return (n == null ? void 0 : n.fields) || ((T = u(n.collectionName)) == null ? void 0 : T.options.fields.filter((A) => ["string", "bigInt", "integer"].includes(A.type)).map((A) => {
|
|
46718
46718
|
var D;
|
|
@@ -47283,7 +47283,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47283
47283
|
const t = useRecord();
|
|
47284
47284
|
return /* @__PURE__ */ jsx(EditCollectionAction, x({ item: t }, e));
|
|
47285
47285
|
}, EditCollectionAction = (e) => {
|
|
47286
|
-
const h = e, { scope: t, getContainer: o, item: n, children: r } = h, i =
|
|
47286
|
+
const h = e, { scope: t, getContainer: o, item: n, children: r } = h, i = K(h, ["scope", "getContainer", "item", "children"]), { getTemplate: a } = useCollectionManager_deprecated(), [l, c] = useState(!1), [u, d] = useState({}), { t: p } = useTranslation(), m = useCompile();
|
|
47287
47287
|
return /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: l, setVisible: c }, children: [
|
|
47288
47288
|
/* @__PURE__ */ jsx(
|
|
47289
47289
|
"a",
|
|
@@ -47358,10 +47358,10 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47358
47358
|
key: E,
|
|
47359
47359
|
label: l("Parent collection fields") + l(`(${v(E).title})`),
|
|
47360
47360
|
children: U.filter((G) => !["hasOne", "hasMany", "belongsToMany"].includes(G == null ? void 0 : G.type)).map((G) => {
|
|
47361
|
-
var
|
|
47361
|
+
var H;
|
|
47362
47362
|
return {
|
|
47363
47363
|
value: G.name,
|
|
47364
|
-
label: l((
|
|
47364
|
+
label: l((H = G.uiSchema) == null ? void 0 : H.title)
|
|
47365
47365
|
};
|
|
47366
47366
|
})
|
|
47367
47367
|
};
|
|
@@ -47746,7 +47746,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
47746
47746
|
}, AsyncDataContext = createContext(null);
|
|
47747
47747
|
AsyncDataContext.displayName = "AsyncDataContext";
|
|
47748
47748
|
const AsyncDataProvider = (e) => {
|
|
47749
|
-
const a = e, { value: t, request: o, children: n } = a, r =
|
|
47749
|
+
const a = e, { value: t, request: o, children: n } = a, r = K(a, ["value", "request", "children"]), i = useRequest(o, x({}, r));
|
|
47750
47750
|
return t ? /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: t, children: n }) : /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: i, children: n });
|
|
47751
47751
|
}, useAsyncData = () => useContext(AsyncDataContext), inferInterface = (e, t) => e.toLowerCase().includes("id") ? "id" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "number" : typeof t == "boolean" ? "checkbox" : dayjs(t).isValid() ? "datetime" : "input", useSourceFieldsOptions = () => {
|
|
47752
47752
|
const e = useForm(), { sources: t = [] } = e.values, { t: o } = useTranslation(), { getCollection: n, getInheritCollections: r, getParentCollectionFields: i } = useCollectionManager_deprecated(), a = [];
|
|
@@ -48208,7 +48208,7 @@ const AsyncDataProvider = (e) => {
|
|
|
48208
48208
|
}
|
|
48209
48209
|
};
|
|
48210
48210
|
}, DeleteCollectionAction = (e) => {
|
|
48211
|
-
const h = e, { scope: t, getContainer: o, item: n, children: r, isBulk: i, useAction: a } = h, l =
|
|
48211
|
+
const h = e, { scope: t, getContainer: o, item: n, children: r, isBulk: i, useAction: a } = h, l = K(h, ["scope", "getContainer", "item", "children", "isBulk", "useAction"]), { t: c } = useTranslation(), [u, d] = useState(!1), p = () => i ? useBulkDestroyActionAndRefreshCM : a || useDestroyActionAndRefreshCM, m = () => /* @__PURE__ */ jsxs("span", { children: [
|
|
48212
48212
|
/* @__PURE__ */ jsx(ExclamationCircleFilled, { style: { color: "#faad14", marginRight: "12px", fontSize: "22px" } }),
|
|
48213
48213
|
/* @__PURE__ */ jsx("span", { style: { fontSize: "19px" }, children: c("Delete collection") })
|
|
48214
48214
|
] });
|
|
@@ -52794,7 +52794,7 @@ const useBlockContext = () => useContext(BlockContext), useCompatDataBlockParent
|
|
|
52794
52794
|
};
|
|
52795
52795
|
return t.__collection && i && !["oho", "m2o", "obo"].includes(i.interface) && (c.targetCollection = t.__collection), !e && Object.keys(l).length > 0 && (c.filter = l), c;
|
|
52796
52796
|
}, RecordLink = (e) => {
|
|
52797
|
-
const t = useField(), o = useRecord(), l = e, { title: n, to: r } = l, i =
|
|
52797
|
+
const t = useField(), o = useRecord(), l = e, { title: n, to: r } = l, i = K(l, ["title", "to"]), a = template(r || "");
|
|
52798
52798
|
return /* @__PURE__ */ jsx(Link$1, F(x({}, i), { to: a({ record: o || {} }), children: t.title }));
|
|
52799
52799
|
}, ACLContext = createContext({});
|
|
52800
52800
|
ACLContext.displayName = "ACLContext";
|
|
@@ -55757,7 +55757,7 @@ AppLangContext.displayName = "AppLangContext";
|
|
|
55757
55757
|
const useAppLangContext = () => useContext(AppLangContext);
|
|
55758
55758
|
function AntdConfigProvider(e) {
|
|
55759
55759
|
var c;
|
|
55760
|
-
const l = e, { remoteLocale: t } = l, o =
|
|
55760
|
+
const l = e, { remoteLocale: t } = l, o = K(l, ["remoteLocale"]), n = useAPIClient(), { i18n: r } = useTranslation(), { data: i, loading: a } = useRequest(
|
|
55761
55761
|
{
|
|
55762
55762
|
url: "app:getLang",
|
|
55763
55763
|
params: {
|
|
@@ -56945,7 +56945,7 @@ const ActionInitializerItem = (e) => {
|
|
|
56945
56945
|
};
|
|
56946
56946
|
}), { Panel } = Collapse, AssociationFilterItem = withDynamicSchemaProps(
|
|
56947
56947
|
(e) => {
|
|
56948
|
-
var E, U, G,
|
|
56948
|
+
var E, U, G, H;
|
|
56949
56949
|
const { wrapSSR: t, componentCls: o, hashId: n } = useStyles(), { token: r } = useToken(), i = AssociationFilter.useAssociationField(), a = useFieldSchema(), l = useDesigner(), c = useCompile(), {
|
|
56950
56950
|
list: u,
|
|
56951
56951
|
onSelected: d,
|
|
@@ -56982,7 +56982,7 @@ const ActionInitializerItem = (e) => {
|
|
|
56982
56982
|
W.stopPropagation();
|
|
56983
56983
|
}, O = (W) => {
|
|
56984
56984
|
m(W);
|
|
56985
|
-
}, q = (
|
|
56985
|
+
}, q = (H = a.title) != null ? H : (G = i == null ? void 0 : i.uiSchema) == null ? void 0 : G.title;
|
|
56986
56986
|
return t(
|
|
56987
56987
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(o, n, "nb-block-item", e.className, "SortableItem"), children: [
|
|
56988
56988
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -57249,7 +57249,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
57249
57249
|
}
|
|
57250
57250
|
);
|
|
57251
57251
|
}, BlockInitializer = (e) => {
|
|
57252
|
-
const i = e, { item: t, schema: o } = i, n =
|
|
57252
|
+
const i = e, { item: t, schema: o } = i, n = K(i, ["item", "schema"]), { insert: r } = useSchemaInitializer();
|
|
57253
57253
|
return /* @__PURE__ */ jsx(
|
|
57254
57254
|
SchemaInitializerItem,
|
|
57255
57255
|
F(x({}, n), {
|
|
@@ -57261,7 +57261,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
57261
57261
|
})
|
|
57262
57262
|
);
|
|
57263
57263
|
}, BlockItemInitializer = () => {
|
|
57264
|
-
const e = useSchemaInitializerItem(), n = e, { schema: t } = n, o =
|
|
57264
|
+
const e = useSchemaInitializerItem(), n = e, { schema: t } = n, o = K(n, ["schema"]);
|
|
57265
57265
|
return /* @__PURE__ */ jsx(BlockInitializer, F(x({}, o), { item: e }));
|
|
57266
57266
|
}, CreateFilterActionInitializer = (e) => {
|
|
57267
57267
|
const t = {
|
|
@@ -57571,7 +57571,7 @@ const DataBlockInitializer = (e) => {
|
|
|
57571
57571
|
}
|
|
57572
57572
|
};
|
|
57573
57573
|
}, RecordAssociationBlockInitializer = () => {
|
|
57574
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r =
|
|
57574
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r = K(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
57575
57575
|
return /* @__PURE__ */ jsx(
|
|
57576
57576
|
SchemaInitializerItem,
|
|
57577
57577
|
F(x({
|
|
@@ -57667,7 +57667,7 @@ function createDetailsWithPaginationUISchema(e) {
|
|
|
57667
57667
|
};
|
|
57668
57668
|
}
|
|
57669
57669
|
const RecordAssociationDetailsBlockInitializer = () => {
|
|
57670
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r =
|
|
57670
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r = K(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
57671
57671
|
return /* @__PURE__ */ jsx(
|
|
57672
57672
|
SchemaInitializerItem,
|
|
57673
57673
|
F(x({
|
|
@@ -57753,7 +57753,7 @@ function createCreateFormBlockUISchema(e) {
|
|
|
57753
57753
|
};
|
|
57754
57754
|
}
|
|
57755
57755
|
const RecordAssociationFormBlockInitializer = () => {
|
|
57756
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r =
|
|
57756
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r = K(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getCollection: a } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = useMemo(() => a(u), [u]);
|
|
57757
57757
|
return /* @__PURE__ */ jsx(
|
|
57758
57758
|
SchemaInitializerItem,
|
|
57759
57759
|
F(x({
|
|
@@ -57885,7 +57885,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
57885
57885
|
}
|
|
57886
57886
|
};
|
|
57887
57887
|
}, RecordAssociationGridCardBlockInitializer = () => {
|
|
57888
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r =
|
|
57888
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r = K(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
57889
57889
|
return /* @__PURE__ */ jsx(
|
|
57890
57890
|
SchemaInitializerItem,
|
|
57891
57891
|
F(x({
|
|
@@ -57990,7 +57990,7 @@ const createListBlockUISchema = (e) => {
|
|
|
57990
57990
|
}
|
|
57991
57991
|
};
|
|
57992
57992
|
}, RecordAssociationListBlockInitializer = () => {
|
|
57993
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r =
|
|
57993
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = p, r = K(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
57994
57994
|
return /* @__PURE__ */ jsx(
|
|
57995
57995
|
SchemaInitializerItem,
|
|
57996
57996
|
F(x({
|
|
@@ -58079,7 +58079,7 @@ function createDetailsUISchema(e) {
|
|
|
58079
58079
|
});
|
|
58080
58080
|
}
|
|
58081
58081
|
const RecordReadPrettyAssociationFormBlockInitializer = () => {
|
|
58082
|
-
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = m, r =
|
|
58082
|
+
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = m, r = K(m, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getCollection: a } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = a(u), p = `${c.collectionName}.${c.name}`;
|
|
58083
58083
|
return /* @__PURE__ */ jsx(
|
|
58084
58084
|
SchemaInitializerItem,
|
|
58085
58085
|
F(x({
|
|
@@ -58742,7 +58742,7 @@ const SelectActionInitializer = (e) => {
|
|
|
58742
58742
|
}, commonOptions$i),
|
|
58743
58743
|
readPrettyFormItemInitializers_deprecated
|
|
58744
58744
|
), RecordReadPrettyFormBlockInitializer = () => {
|
|
58745
|
-
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: o } = l, n =
|
|
58745
|
+
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: o } = l, n = K(l, ["icon", "targetCollection"]), r = useCollection_deprecated(), i = o || r, { createSingleDetailsSchema: a } = useCreateSingleDetailsSchema();
|
|
58746
58746
|
return /* @__PURE__ */ jsx(
|
|
58747
58747
|
SchemaInitializerItem,
|
|
58748
58748
|
F(x({
|
|
@@ -58943,7 +58943,7 @@ function createEditFormBlockUISchema(e) {
|
|
|
58943
58943
|
});
|
|
58944
58944
|
}
|
|
58945
58945
|
const RecordFormBlockInitializer = () => {
|
|
58946
|
-
const u = useSchemaInitializerItem(), { targetCollection: t } = u, o =
|
|
58946
|
+
const u = useSchemaInitializerItem(), { targetCollection: t } = u, o = K(u, ["targetCollection"]), { insert: n } = useSchemaInitializer(), { getTemplateSchemaByMode: r } = useSchemaTemplateManager(), i = useCollection_deprecated(), a = t || i, { createEditFormBlock: l, templateWrap: c } = useCreateEditFormBlock();
|
|
58947
58947
|
return /* @__PURE__ */ jsx(
|
|
58948
58948
|
SchemaInitializerItem,
|
|
58949
58949
|
F(x({
|
|
@@ -59615,7 +59615,7 @@ const commonOptions$h = {
|
|
|
59615
59615
|
}
|
|
59616
59616
|
};
|
|
59617
59617
|
}, TableSelectorInitializer = () => {
|
|
59618
|
-
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = l, r =
|
|
59618
|
+
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: o, createBlockSchema: n } = l, r = K(l, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), a = useCollection_deprecated();
|
|
59619
59619
|
return /* @__PURE__ */ jsx(
|
|
59620
59620
|
SchemaInitializerItem,
|
|
59621
59621
|
F(x({
|
|
@@ -59640,7 +59640,7 @@ const commonOptions$h = {
|
|
|
59640
59640
|
{
|
|
59641
59641
|
title: e("Column width"),
|
|
59642
59642
|
component: React.forwardRef((r, i) => {
|
|
59643
|
-
const u = r, { children: a, onClick: l } = u, c =
|
|
59643
|
+
const u = r, { children: a, onClick: l } = u, c = K(u, ["children", "onClick"]);
|
|
59644
59644
|
return /* @__PURE__ */ jsx(
|
|
59645
59645
|
SchemaInitializerItem,
|
|
59646
59646
|
F(x({
|