@nocobase/client 1.6.32 → 1.6.33

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.
@@ -18,6 +18,11 @@ export declare const CurrentPageUidContext: React.Context<string>;
18
18
  * @internal
19
19
  */
20
20
  export declare const CurrentTabUidContext: React.Context<string>;
21
+ export declare const IsSubPageClosedByPageMenuContext: React.Context<{
22
+ isSubPageClosedByPageMenu: () => boolean;
23
+ setFieldSchema: React.Dispatch<React.SetStateAction<Schema>>;
24
+ reset: () => void;
25
+ }>;
21
26
  export declare const IsSubPageClosedByPageMenuProvider: FC;
22
27
  export declare const CurrentPageUidProvider: FC;
23
28
  export declare const CurrentTabUidProvider: FC;
@@ -34,8 +39,6 @@ export declare const useLocationNoUpdate: () => Location<any>;
34
39
  export declare const useLocationSearch: () => string;
35
40
  export declare const useIsAdminPage: () => boolean;
36
41
  export declare const useCurrentPageUid: () => string;
37
- export declare const useMatchAdmin: () => boolean;
38
- export declare const useMatchAdminName: () => boolean;
39
42
  export declare const useIsInSettingsPage: () => boolean;
40
43
  /**
41
44
  * @internal
package/es/index.mjs CHANGED
@@ -62,7 +62,7 @@ import _, { filter, capitalize, cloneDeep as cloneDeep$1, isArray, every, some,
62
62
  import template from "lodash/template";
63
63
  import React, { createContext, useContext, useMemo, Fragment, useCallback, useEffect, memo, useState, useRef, Suspense, useDeferredValue, createElement, isValidElement, lazy as lazy$1, startTransition, useLayoutEffect, forwardRef, useImperativeHandle, createRef } from "react";
64
64
  import * as ReactRouterDom from "react-router-dom";
65
- import { useParams, useHref, useSearchParams, useLocation, useMatch, useNavigate, UNSAFE_LocationContext, UNSAFE_RouteContext, Outlet, createHashRouter, createBrowserRouter, createMemoryRouter, useRouteError, RouterProvider, Link as Link$1, Navigate, NavLink, Router, useOutletContext } from "react-router-dom";
65
+ import { useParams, useHref, useSearchParams, useLocation, useNavigate, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Outlet, createHashRouter, createBrowserRouter, createMemoryRouter, useRouteError, RouterProvider, Link as Link$1, Navigate, NavLink, Router, useOutletContext } from "react-router-dom";
66
66
  import * as formilyShared from "@formily/shared";
67
67
  import { merge, uid, isArr, isFn, applyMiddleware, isNum as isNum$1, isStr, isBool, toArr as toArr$3, isReactElement, isValid, FormPath, each, isEmpty as isEmpty$2 } from "@formily/shared";
68
68
  import * as formilyJsonReactive from "@formily/reactive";
@@ -107,7 +107,7 @@ import { observer } from "@formily/reactive-react";
107
107
  import cronstrue from "cronstrue";
108
108
  import * as antdStyle from "antd-style";
109
109
  import { createGlobalStyle, useAntdToken, createStyles } from "antd-style";
110
- import { createStyles as yn } from "antd-style";
110
+ import { createStyles as vn } from "antd-style";
111
111
  import JSON5 from "json5";
112
112
  import { usePrefixCls as usePrefixCls$1, dayjsable, formatDayjsValue } from "@formily/antd-v5/esm/__builtins__";
113
113
  import * as dndKitAccessibility from "@dnd-kit/accessibility";
@@ -129,7 +129,8 @@ import { useHotkeys } from "react-hotkeys-hook";
129
129
  import { loadableResource } from "react-imported-component";
130
130
  import LRUCache from "lru-cache";
131
131
  import ignore from "ignore";
132
- import ProLayout, { PageHeader, RouteContext } from "@ant-design/pro-layout";
132
+ import ProLayout, { RouteContext, PageHeader } from "@ant-design/pro-layout";
133
+ import { Context } from "rc-motion/es/context";
133
134
  import { spliceArrayState, exchangeArrayState } from "@formily/core/esm/shared/internals";
134
135
  import relativeTime from "dayjs/plugin/relativeTime";
135
136
  import { useSchemaInitializer as useSchemaInitializer$1, SchemaInitializerItem as SchemaInitializerItem$1, ActionContextProvider as ActionContextProvider$1, SchemaComponent as SchemaComponent$1, Action as Action$2 } from "@nocobase/client";
@@ -1866,6 +1867,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1866
1867
  get IsInNocoBaseRecursionFieldContext() {
1867
1868
  return IsInNocoBaseRecursionFieldContext;
1868
1869
  },
1870
+ get IsSubPageClosedByPageMenuContext() {
1871
+ return IsSubPageClosedByPageMenuContext;
1872
+ },
1869
1873
  get IsSubPageClosedByPageMenuProvider() {
1870
1874
  return IsSubPageClosedByPageMenuProvider;
1871
1875
  },
@@ -3789,6 +3793,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3789
3793
  get useIsSubPageClosedByPageMenu() {
3790
3794
  return useIsSubPageClosedByPageMenu;
3791
3795
  },
3796
+ get useKeepAlive() {
3797
+ return useKeepAlive;
3798
+ },
3792
3799
  get useLabelUiSchema() {
3793
3800
  return useLabelUiSchema;
3794
3801
  },
@@ -3813,12 +3820,6 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3813
3820
  get useLocationSearch() {
3814
3821
  return useLocationSearch;
3815
3822
  },
3816
- get useMatchAdmin() {
3817
- return useMatchAdmin;
3818
- },
3819
- get useMatchAdminName() {
3820
- return useMatchAdminName;
3821
- },
3822
3823
  get useMenuDragEnd() {
3823
3824
  return useMenuDragEnd;
3824
3825
  },
@@ -6203,10 +6204,6 @@ const IsAdminPageContext = React.createContext(!1);
6203
6204
  IsAdminPageContext.displayName = "IsAdminPageContext";
6204
6205
  const CurrentPageUidContext = React.createContext("");
6205
6206
  CurrentPageUidContext.displayName = "CurrentPageUidContext";
6206
- const MatchAdminContext = React.createContext(!1);
6207
- MatchAdminContext.displayName = "MatchAdminContext";
6208
- const MatchAdminNameContext = React.createContext(!1);
6209
- MatchAdminNameContext.displayName = "MatchAdminNameContext";
6210
6207
  const IsInSettingsPageContext = React.createContext(!1);
6211
6208
  IsInSettingsPageContext.displayName = "IsInSettingsPageContext";
6212
6209
  const CurrentTabUidContext = React.createContext("");
@@ -6244,12 +6241,6 @@ const IsSubPageClosedByPageMenuProvider = ({ children: e }) => {
6244
6241
  }, IsInSettingsPageProvider = ({ children: e }) => {
6245
6242
  const t = useLocation().pathname.includes("/settings");
6246
6243
  return /* @__PURE__ */ jsx(IsInSettingsPageContext.Provider, { value: t, children: e });
6247
- }, MatchAdminProvider = ({ children: e }) => {
6248
- const t = !!useMatch("/admin");
6249
- return /* @__PURE__ */ jsx(MatchAdminContext.Provider, { value: t, children: e });
6250
- }, MatchAdminNameProvider = ({ children: e }) => {
6251
- const t = !!useMatch("/admin/:name");
6252
- return /* @__PURE__ */ jsx(MatchAdminNameContext.Provider, { value: t, children: e });
6253
6244
  }, IsAdminPageProvider = ({ children: e }) => {
6254
6245
  const n = useLocation().pathname.startsWith("/admin");
6255
6246
  return /* @__PURE__ */ jsx(IsAdminPageContext.Provider, { value: n, children: e });
@@ -6274,12 +6265,12 @@ const IsSubPageClosedByPageMenuProvider = ({ children: e }) => {
6274
6265
  }, LocationSearchProvider = ({ children: e }) => {
6275
6266
  const t = useLocation();
6276
6267
  return /* @__PURE__ */ jsx(LocationSearchContext.Provider, { value: t.search, children: e });
6277
- }, useNavigateNoUpdate = () => React.useContext(NavigateNoUpdateContext), useLocationNoUpdate = () => React.useContext(LocationNoUpdateContext), useLocationSearch = () => React.useContext(LocationSearchContext), useIsAdminPage = () => React.useContext(IsAdminPageContext), useCurrentPageUid = () => React.useContext(CurrentPageUidContext), useMatchAdmin = () => React.useContext(MatchAdminContext), useMatchAdminName = () => React.useContext(MatchAdminNameContext), useIsInSettingsPage = () => React.useContext(IsInSettingsPageContext), useCurrentTabUid = () => React.useContext(CurrentTabUidContext), useCurrentSearchParams = () => React.useContext(SearchParamsContext), useRouterBasename = () => React.useContext(RouterBasenameContext), useIsSubPageClosedByPageMenu = (e) => {
6268
+ }, useNavigateNoUpdate = () => React.useContext(NavigateNoUpdateContext), useLocationNoUpdate = () => React.useContext(LocationNoUpdateContext), useLocationSearch = () => React.useContext(LocationSearchContext), useIsAdminPage = () => React.useContext(IsAdminPageContext), useCurrentPageUid = () => React.useContext(CurrentPageUidContext), useIsInSettingsPage = () => React.useContext(IsInSettingsPageContext), useCurrentTabUid = () => React.useContext(CurrentTabUidContext), useCurrentSearchParams = () => React.useContext(SearchParamsContext), useRouterBasename = () => React.useContext(RouterBasenameContext), useIsSubPageClosedByPageMenu = (e) => {
6278
6269
  const { isSubPageClosedByPageMenu: t, setFieldSchema: n, reset: o } = React.useContext(IsSubPageClosedByPageMenuContext);
6279
6270
  return useEffect(() => {
6280
6271
  n(e);
6281
6272
  }, [e, n]), { isSubPageClosedByPageMenu: t, reset: o };
6282
- }, CustomRouterContextProvider = ({ children: e }) => /* @__PURE__ */ jsx(NavigateNoUpdateProvider, { children: /* @__PURE__ */ jsx(LocationNoUpdateProvider, { children: /* @__PURE__ */ jsx(IsAdminPageProvider, { children: /* @__PURE__ */ jsx(LocationSearchProvider, { children: /* @__PURE__ */ jsx(MatchAdminProvider, { children: /* @__PURE__ */ jsx(MatchAdminNameProvider, { children: /* @__PURE__ */ jsx(SearchParamsProvider, { children: /* @__PURE__ */ jsx(RouterBasenameProvider, { children: /* @__PURE__ */ jsx(IsInSettingsPageProvider, { children: e }) }) }) }) }) }) }) }) }), useDefaultDynamicComponentProps = () => {
6273
+ }, CustomRouterContextProvider = ({ children: e }) => /* @__PURE__ */ jsx(NavigateNoUpdateProvider, { children: /* @__PURE__ */ jsx(LocationNoUpdateProvider, { children: /* @__PURE__ */ jsx(IsAdminPageProvider, { children: /* @__PURE__ */ jsx(LocationSearchProvider, { children: /* @__PURE__ */ jsx(SearchParamsProvider, { children: /* @__PURE__ */ jsx(RouterBasenameProvider, { children: /* @__PURE__ */ jsx(IsInSettingsPageProvider, { children: e }) }) }) }) }) }) }), useDefaultDynamicComponentProps = () => {
6283
6274
  }, getHook = (e, t, n) => {
6284
6275
  let o;
6285
6276
  return _.isFunction(e) ? o = e : (o = t[e], o || console.error(`${n} is not registered`)), o || useDefaultDynamicComponentProps;
@@ -6471,11 +6462,15 @@ function SetDataLoadingMode() {
6471
6462
  const useSourceKey = (e) => useCollectionManager().getSourceKeyByAssociation(e), KeepAliveContext = createContext(!0), DesignableInterceptor = ({ children: e, active: t }) => {
6472
6463
  const n = useContext(SchemaComponentContext), o = useContext(SchemaOptionsContext), r = useContext(SchemaComponentsContext), i = useContext(SchemaExpressionScopeContext), a = useContext(ACLContext), l = useRef(n), c = useRef(o), u = useRef(r), d = useRef(i), p = useRef(a);
6473
6464
  return t && (l.current = n, c.current = o, u.current = r, d.current = i, p.current = a), /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: l.current, children: /* @__PURE__ */ jsx(SchemaOptionsContext.Provider, { value: c.current, children: /* @__PURE__ */ jsx(SchemaComponentsContext.Provider, { value: u.current, children: /* @__PURE__ */ jsx(SchemaExpressionScopeContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(ACLContext.Provider, { value: p.current, children: e }) }) }) }) });
6474
- }, KeepAliveProvider = ({ children: e, active: t }) => {
6475
- const n = useContext(UNSAFE_LocationContext), o = useContext(UNSAFE_RouteContext), r = useRef(n), i = useRef(o);
6476
- return t && // Skip comparing location key to improve LocationContext rendering performance
6477
- !_.isEqual(_.omit(r.current.location, "key"), _.omit(n.location, "key")) && (r.current = n), t && !_.isEqual(i.current, o) && (i.current = o), /* @__PURE__ */ jsx(KeepAliveContext.Provider, { value: t, children: /* @__PURE__ */ jsx(DesignableInterceptor, { active: t, children: /* @__PURE__ */ jsx(UNSAFE_LocationContext.Provider, { value: r.current, children: /* @__PURE__ */ jsx(UNSAFE_RouteContext.Provider, { value: i.current, children: e }) }) }) });
6478
- }, useKeepAlive = () => ({ active: useContext(KeepAliveContext) }), getMaxPageCount = () => {
6465
+ }, hidden = { display: "none" }, KeepAliveProvider = memo(
6466
+ ({ children: e, active: t, parentActive: n }) => {
6467
+ const o = useContext(UNSAFE_LocationContext), r = useContext(UNSAFE_RouteContext), i = useContext(UNSAFE_DataRouterContext), a = useContext(UNSAFE_DataRouterStateContext), l = useContext(IsSubPageClosedByPageMenuContext), c = useContext(Context), u = useContext(RouteContext), d = useRef(o), p = useRef(r), m = useRef(i), h = useRef(a), g = useRef(l), f = useRef(c), C = useRef(u);
6468
+ t && (m.current = i, h.current = a, g.current = l, f.current = c, C.current = u), t && // Skip comparing location key to improve LocationContext rendering performance
6469
+ !_.isEqual(_.omit(d.current.location, "key"), _.omit(o.location, "key")) && (d.current = o), t && !_.isEqual(p.current, r) && (p.current = r);
6470
+ const b = /* @__PURE__ */ jsx(RouteContext.Provider, { value: C.current, children: /* @__PURE__ */ jsx(Context.Provider, { value: f.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterContext.Provider, { value: m.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterStateContext.Provider, { value: h.current, children: /* @__PURE__ */ jsx(UNSAFE_LocationContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(UNSAFE_RouteContext.Provider, { value: p.current, children: /* @__PURE__ */ jsx(KeepAliveContext.Provider, { value: n === !1 ? !1 : t, children: /* @__PURE__ */ jsx(DesignableInterceptor, { active: t, children: /* @__PURE__ */ jsx(IsSubPageClosedByPageMenuContext.Provider, { value: g.current, children: e }) }) }) }) }) }) }) }) });
6471
+ return /* @__PURE__ */ jsx("div", { style: t ? null : hidden, children: b });
6472
+ }
6473
+ ), useKeepAlive = () => ({ active: useContext(KeepAliveContext) }), getMaxPageCount = () => {
6479
6474
  let t = 5;
6480
6475
  try {
6481
6476
  const n = navigator.deviceMemory;
@@ -6495,8 +6490,8 @@ const useSourceKey = (e) => useCollectionManager().getSourceKeyByAssociation(e),
6495
6490
  return 5;
6496
6491
  }
6497
6492
  }, MAX_RENDERED_PAGE_COUNT = getMaxPageCount(), KeepAlive = React.memo(({ children: e, uid: t }) => {
6498
- const n = useRef([]);
6499
- return n.current.includes(t) || (n.current.push(t), n.current.length > MAX_RENDERED_PAGE_COUNT && (n.current = n.current.slice(-MAX_RENDERED_PAGE_COUNT))), /* @__PURE__ */ jsx(Fragment$1, { children: n.current.map((o) => /* @__PURE__ */ jsx(CurrentPageUidContext.Provider, { value: o, children: /* @__PURE__ */ jsx(KeepAliveProvider, { active: o === t, children: e(o) }) }, o)) });
6493
+ const { active: n } = useKeepAlive(), o = useRef([]);
6494
+ return o.current.includes(t) || (o.current.push(t), o.current.length > MAX_RENDERED_PAGE_COUNT && (o.current = o.current.slice(-MAX_RENDERED_PAGE_COUNT))), /* @__PURE__ */ jsx(Fragment$1, { children: o.current.map((r) => /* @__PURE__ */ jsx(KeepAliveProvider, { active: r === t, parentActive: n, children: e(r) }, r)) });
6500
6495
  });
6501
6496
  KeepAlive.displayName = "KeepAlive";
6502
6497
  const DEBOUNCE_WAIT = 100, LOADING_DELAY = void 0, EMPTY_OBJECT = Object.freeze({});
@@ -9218,7 +9213,7 @@ function addAppVersion(e, t) {
9218
9213
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9219
9214
  }), e;
9220
9215
  }
9221
- const name = "@nocobase/client", version = "1.6.32", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9216
+ const name = "@nocobase/client", version = "1.6.33", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9222
9217
  "@ahooksjs/use-url-state": "3.5.1",
9223
9218
  "@ant-design/cssinjs": "^1.11.1",
9224
9219
  "@ant-design/icons": "^5.6.1",
@@ -9240,9 +9235,9 @@ const name = "@nocobase/client", version = "1.6.32", license = "AGPL-3.0", main
9240
9235
  "@formily/reactive-react": "^2.2.27",
9241
9236
  "@formily/shared": "^2.2.27",
9242
9237
  "@formily/validator": "^2.2.27",
9243
- "@nocobase/evaluators": "1.6.32",
9244
- "@nocobase/sdk": "1.6.32",
9245
- "@nocobase/utils": "1.6.32",
9238
+ "@nocobase/evaluators": "1.6.33",
9239
+ "@nocobase/sdk": "1.6.33",
9240
+ "@nocobase/utils": "1.6.33",
9246
9241
  ahooks: "^3.7.2",
9247
9242
  antd: "5.12.8",
9248
9243
  "antd-style": "3.7.1",
@@ -10035,10 +10030,10 @@ const opacityStyle = {
10035
10030
  height: "100%",
10036
10031
  maxHeight: 400,
10037
10032
  zIndex: 1e3
10038
- }, displayNone$4 = {
10033
+ }, displayNone$3 = {
10039
10034
  display: "none"
10040
10035
  }, HighPerformanceSpin = React.memo((e) => /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
10041
- /* @__PURE__ */ jsx(Spin, P(x({}, _.omit(e, "children")), { style: e.spinning ? spinStyle : displayNone$4 })),
10036
+ /* @__PURE__ */ jsx(Spin, P(x({}, _.omit(e, "children")), { style: e.spinning ? spinStyle : displayNone$3 })),
10042
10037
  /* @__PURE__ */ jsx("div", { style: e.spinning ? opacityStyle : null, children: e.children })
10043
10038
  ] })), AssociationFieldContext = createContext({});
10044
10039
  AssociationFieldContext.displayName = "AssociationFieldContext";
@@ -10526,9 +10521,9 @@ const InternalBodyCellComponent$1 = React.memo((e) => {
10526
10521
  ] });
10527
10522
  });
10528
10523
  InternalBodyCellComponent$1.displayName = "InternalBodyCellComponent";
10529
- const displayNone$3 = { display: "none" }, BodyCellComponent$1 = React.memo((e) => {
10524
+ const displayNone$2 = { display: "none" }, BodyCellComponent$1 = React.memo((e) => {
10530
10525
  const { designable: t } = useDesignable();
10531
- return e.columnHidden ? /* @__PURE__ */ jsx("td", { style: t ? columnOpacityStyle$1 : columnHiddenStyle$1, children: t ? e.children : /* @__PURE__ */ jsx("span", { style: displayNone$3, children: e.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent$1, x({}, _.omit(e, "columnHidden")));
10526
+ return e.columnHidden ? /* @__PURE__ */ jsx("td", { style: t ? columnOpacityStyle$1 : columnHiddenStyle$1, children: t ? e.children : /* @__PURE__ */ jsx("span", { style: displayNone$2, children: e.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent$1, x({}, _.omit(e, "columnHidden")));
10532
10527
  });
10533
10528
  BodyCellComponent$1.displayName = "BodyCellComponent";
10534
10529
  const TableElementRefContext = createContext(null), useTableElementRef = () => useContext(TableElementRefContext), InternalNocoBaseTable$1 = React.memo(
@@ -11631,7 +11626,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
11631
11626
  [n]
11632
11627
  ), { isPopupVisibleControlledByURL: r } = usePopupSettings();
11633
11628
  return r() ? /* @__PURE__ */ jsx(TabsContextProvider, { activeKey: t == null ? void 0 : t.tab, onChange: o, children: e }) : /* @__PURE__ */ jsx(Fragment$1, { children: e });
11634
- }, displayNone$2 = { display: "none" }, PagePopupsItemProvider = ({ params: e, context: t, currentLevel: n, children: o }) => {
11629
+ }, displayNone$1 = { display: "none" }, PagePopupsItemProvider = ({ params: e, context: t, currentLevel: n, children: o }) => {
11635
11630
  const r = x({}, getStoredPopupContext(e.popupuid));
11636
11631
  return useEffect(() => (setPopupLayerState(n, !0), () => {
11637
11632
  removePopupLayerState(n);
@@ -11642,7 +11637,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
11642
11637
  association: r.association
11643
11638
  },
11644
11639
  _.isNil
11645
- )), _.isEmpty(t) ? /* @__PURE__ */ jsx(PopupParamsProvider, { params: e, context: t, currentLevel: n, children: /* @__PURE__ */ jsx(VisibleProvider, { popupuid: e.popupuid, children: /* @__PURE__ */ jsx("div", { style: displayNone$2, children: o }) }) }) : /* @__PURE__ */ jsx(PopupParamsProvider, { params: e, context: t, currentLevel: n, children: /* @__PURE__ */ jsx(
11640
+ )), _.isEmpty(t) ? /* @__PURE__ */ jsx(PopupParamsProvider, { params: e, context: t, currentLevel: n, children: /* @__PURE__ */ jsx(VisibleProvider, { popupuid: e.popupuid, children: /* @__PURE__ */ jsx("div", { style: displayNone$1, children: o }) }) }) : /* @__PURE__ */ jsx(PopupParamsProvider, { params: e, context: t, currentLevel: n, children: /* @__PURE__ */ jsx(
11646
11641
  DataBlockProvider,
11647
11642
  {
11648
11643
  dataSource: t.dataSource,
@@ -11653,7 +11648,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
11653
11648
  record: r.record,
11654
11649
  parentRecord: r.parentRecord,
11655
11650
  action: "get",
11656
- children: /* @__PURE__ */ jsx(BlockRequestContextProvider, { recordRequest: r.service, children: /* @__PURE__ */ jsx(PopupTabsPropsProvider, { children: /* @__PURE__ */ jsx(VisibleProvider, { popupuid: e.popupuid, children: /* @__PURE__ */ jsx("div", { style: displayNone$2, children: o }) }) }) })
11651
+ children: /* @__PURE__ */ jsx(BlockRequestContextProvider, { recordRequest: r.service, children: /* @__PURE__ */ jsx(PopupTabsPropsProvider, { children: /* @__PURE__ */ jsx(VisibleProvider, { popupuid: e.popupuid, children: /* @__PURE__ */ jsx("div", { style: displayNone$1, children: o }) }) }) })
11657
11652
  }
11658
11653
  ) });
11659
11654
  }, insertChildToParentSchema = ({
@@ -13807,7 +13802,7 @@ function getOperators() {
13807
13802
  return n.truthy(r);
13808
13803
  },
13809
13804
  $empty: function(r) {
13810
- return Array.isArray(r) ? r.some((i) => !n.truthy(i)) : !n.truthy(r);
13805
+ return Array.isArray(r) ? r.length === 0 : !n.truthy(r);
13811
13806
  },
13812
13807
  $notExists: function(r) {
13813
13808
  return !n.truthy(r);
@@ -27019,10 +27014,10 @@ const LanguageSettings = () => {
27019
27014
  ]
27020
27015
  }), NocoBaseRouteContext = createContext(null);
27021
27016
  NocoBaseRouteContext.displayName = "NocoBaseRouteContext";
27022
- const CurrentRouteProvider = ({ children: e, uid: t }) => {
27017
+ const CurrentRouteProvider = memo(({ children: e, uid: t }) => {
27023
27018
  const { allAccessRoutes: n } = useAllAccessDesktopRoutes(), o = useMemo(() => findRouteBySchemaUid(t, n), [t, n]);
27024
27019
  return /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: o, children: e });
27025
- }, useCurrentRoute = () => useContext(NocoBaseRouteContext) || {}, emptyArray = [], AllAccessDesktopRoutesContext = createContext({
27020
+ }), useCurrentRoute = () => useContext(NocoBaseRouteContext) || {}, emptyArray = [], AllAccessDesktopRoutesContext = createContext({
27026
27021
  allAccessRoutes: emptyArray,
27027
27022
  refresh: () => {
27028
27023
  }
@@ -27039,7 +27034,7 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
27039
27034
  return r && !t.current ? null : (t.current = !0, /* @__PURE__ */ jsx(AllAccessDesktopRoutesContext.Provider, { value: i, children: e }));
27040
27035
  }, noAccessPermission = (e, t) => e ? !findRouteBySchemaUid(e, t) : !1, AdminDynamicPage = () => {
27041
27036
  const e = useCurrentPageUid(), { allAccessRoutes: t } = useAllAccessDesktopRoutes();
27042
- return isGroup(e, t) ? null : noAccessPermission(e, t) ? /* @__PURE__ */ jsx(AppNotFound$1, {}) : /* @__PURE__ */ jsx(KeepAlive, { uid: e, children: (n) => /* @__PURE__ */ jsx(CurrentRouteProvider, { uid: n, children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: n }) }) });
27037
+ return isGroup(e, t) ? null : noAccessPermission(e, t) ? /* @__PURE__ */ jsx(AppNotFound$1, {}) : /* @__PURE__ */ jsx(KeepAlive, { uid: e, children: (n) => /* @__PURE__ */ jsx(CurrentPageUidContext.Provider, { value: n, children: /* @__PURE__ */ jsx(CurrentRouteProvider, { uid: n, children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: n }) }) }) });
27043
27038
  }, layoutContentClass = css`
27044
27039
  display: flex;
27045
27040
  flex-direction: column;
@@ -38105,7 +38100,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38105
38100
  return (j == null ? void 0 : j.type) === "date" && (X = dayjs(X).format("YYYY-MM-DD")), c ? c({
38106
38101
  [t.label]: X || EMPTY$1,
38107
38102
  [t.value]: W[t.value]
38108
- }) : P(x({}, W), {
38103
+ }) : P(x({}, omit(W, "style")), {
38109
38104
  [t.label]: X || EMPTY$1,
38110
38105
  [t.value]: W[t.value]
38111
38106
  });
@@ -38121,7 +38116,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38121
38116
  }, n), {
38122
38117
  headers: b,
38123
38118
  params: P(x({
38124
- pageSize: 200
38119
+ paginate: !1
38125
38120
  }, n == null ? void 0 : n.params), {
38126
38121
  filter: (J = n == null ? void 0 : n.params) == null ? void 0 : J.filter
38127
38122
  })
@@ -40123,14 +40118,9 @@ const useRouteTranslation = () => useTranslation("lm-desktop-routes"), InternalP
40123
40118
  /* @__PURE__ */ jsx(Outlet, {})
40124
40119
  ] }) }) })
40125
40120
  ] });
40126
- }), hiddenStyle = {
40127
- // Visually hide the element while keeping it in document flow to prevent reflow/repaint
40128
- transform: "scale(0)",
40129
- // Prevent element from receiving any pointer events (clicks, hovers etc) to avoid interfering with other elements
40130
- pointerEvents: "none"
40131
- }, Page = React.memo((e) => {
40121
+ }), Page = React.memo((e) => {
40132
40122
  const { hashId: t, componentCls: n } = useStyles$7(), { active: o } = useKeepAlive(), r = useCurrentTabUid(), i = useRef(r);
40133
- return o && (i.current = r), /* @__PURE__ */ jsx("div", { className: `${n} ${t} ${antTableCell}`, style: o ? null : hiddenStyle, children: /* @__PURE__ */ jsx(CurrentTabUidContext.Provider, { value: "", children: /* @__PURE__ */ jsx(InternalPage, { currentTabUid: i.current, className: e.className }) }) });
40123
+ return o && (i.current = r), /* @__PURE__ */ jsx("div", { className: `${n} ${t} ${antTableCell}`, children: /* @__PURE__ */ jsx(CurrentTabUidContext.Provider, { value: "", children: /* @__PURE__ */ jsx(InternalPage, { currentTabUid: i.current, className: e.className }) }) });
40134
40124
  });
40135
40125
  Page.displayName = "NocoBasePage";
40136
40126
  const PageTabs = () => {
@@ -40155,26 +40145,22 @@ const className1 = css`
40155
40145
  display: none;
40156
40146
  }
40157
40147
  }
40158
- `, displayBlock = {
40159
- display: "block"
40160
- }, displayNone$1 = {
40161
- display: "none"
40162
- }, TabPane = React.memo(({ active: e, uid: t }) => {
40163
- const n = useRef(!1), { active: o } = useKeepAlive();
40164
- return e && !n.current && (n.current = !0), n.current ? /* @__PURE__ */ jsx("div", { style: e ? displayBlock : displayNone$1, children: /* @__PURE__ */ jsx(KeepAliveProvider, { active: o && e, children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: t }) }) }) : null;
40165
- }), InternalPageContent = (e) => {
40166
- var p, m, h, g;
40167
- const { loading: t, disablePageHeader: n, enablePageTabs: o, activeKey: r } = e, i = useCurrentRoute(), a = useNavigateNoUpdate(), l = useLocationNoUpdate(), u = ((i == null ? void 0 : i.children) || []).every((f) => f.schemaUid !== r && f.tabSchemaName !== r);
40148
+ `, InternalPageContent = (e) => {
40149
+ var p, m, h;
40150
+ const { loading: t, disablePageHeader: n, enablePageTabs: o, activeKey: r } = e, i = useCurrentRoute(), a = useNavigateNoUpdate(), l = useLocationNoUpdate(), u = ((i == null ? void 0 : i.children) || []).every((g) => g.schemaUid !== r && g.tabSchemaName !== r);
40168
40151
  if (r && u)
40169
40152
  return /* @__PURE__ */ jsx(AppNotFound$1, {});
40170
- const d = (p = i == null ? void 0 : i.children) == null ? void 0 : p.find((f) => f.tabSchemaName === r);
40153
+ const d = (p = i == null ? void 0 : i.children) == null ? void 0 : p.find((g) => g.tabSchemaName === r);
40171
40154
  if (d) {
40172
- const f = new URLSearchParams(l.search);
40173
- f.has("tab") && f.get("tab") === r && f.delete("tab");
40174
- const C = f.toString() ? `?${f.toString()}` : "", b = l.pathname + (l.pathname.endsWith("/") ? `tabs/${d.schemaUid}` : `/tabs/${d.schemaUid}`);
40175
- return a(b + C), null;
40155
+ const g = new URLSearchParams(l.search);
40156
+ g.has("tab") && g.get("tab") === r && g.delete("tab");
40157
+ const f = g.toString() ? `?${g.toString()}` : "", C = l.pathname + (l.pathname.endsWith("/") ? `tabs/${d.schemaUid}` : `/tabs/${d.schemaUid}`);
40158
+ return a(C + f), null;
40176
40159
  }
40177
- return !n && o ? /* @__PURE__ */ jsx(Fragment$1, { children: (m = i.children) == null ? void 0 : m.map((f) => /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: f, children: /* @__PURE__ */ jsx(TabPane, { active: f.schemaUid === r, uid: f.schemaUid }) }, f.schemaUid)) }) : /* @__PURE__ */ jsx("div", { className: className1, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: (h = i == null ? void 0 : i.children) == null ? void 0 : h[0], children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: (g = i == null ? void 0 : i.children) == null ? void 0 : g[0].schemaUid }) }) });
40160
+ return !n && o ? /* @__PURE__ */ jsx(KeepAlive, { uid: r, children: (g) => {
40161
+ var f;
40162
+ return /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: (f = i.children) == null ? void 0 : f.find((C) => C.schemaUid === g), children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: g }) });
40163
+ } }) : /* @__PURE__ */ jsx("div", { className: className1, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: (m = i == null ? void 0 : i.children) == null ? void 0 : m[0], children: /* @__PURE__ */ jsx(RemoteSchemaComponent, { uid: (h = i == null ? void 0 : i.children) == null ? void 0 : h[0].schemaUid }) }) });
40178
40164
  }, PageContent = memo((e) => /* @__PURE__ */ jsx(PopupRouteContextResetter, { children: /* @__PURE__ */ jsx(InternalPageContent, x({}, e)) })), NocoBasePageHeaderTabs = ({ className: e, activeKey: t }) => {
40179
40165
  const n = useFieldSchema(), { t: o } = useTranslation(), { t: r } = useRouteTranslation(), { token: i } = useToken$1(), a = useRouterBasename(), l = useNavigateNoUpdate(), c = useCallback(
40180
40166
  (F) => {
@@ -65072,6 +65058,7 @@ export {
65072
65058
  IntegerFieldInterface,
65073
65059
  InternalAdminLayout,
65074
65060
  IsInNocoBaseRecursionFieldContext,
65061
+ IsSubPageClosedByPageMenuContext,
65075
65062
  IsSubPageClosedByPageMenuProvider,
65076
65063
  Json,
65077
65064
  JsonFieldInterface,
@@ -65372,7 +65359,7 @@ export {
65372
65359
  createReadPrettyFormBlockSchema,
65373
65360
  createRouterManager,
65374
65361
  createSelectSchemaSettingsItem,
65375
- yn as createStyles,
65362
+ vn as createStyles,
65376
65363
  createSwitchSettingsItem,
65377
65364
  createTableBlockSchema,
65378
65365
  createTableBlockUISchema,
@@ -65713,6 +65700,7 @@ export {
65713
65700
  useIsLoggedIn,
65714
65701
  useIsSelectFieldMode,
65715
65702
  useIsSubPageClosedByPageMenu,
65703
+ useKeepAlive,
65716
65704
  useLabelUiSchema,
65717
65705
  useLazy,
65718
65706
  useLinkActionProps,
@@ -65721,8 +65709,6 @@ export {
65721
65709
  useLocalVariables$1 as useLocalVariables,
65722
65710
  useLocationNoUpdate,
65723
65711
  useLocationSearch,
65724
- useMatchAdmin,
65725
- useMatchAdminName,
65726
65712
  useMenuDragEnd,
65727
65713
  useMenuSearch,
65728
65714
  useMenuTranslation,
@@ -9,6 +9,7 @@
9
9
  import React, { FC } from 'react';
10
10
  export declare const KeepAliveProvider: FC<{
11
11
  active: boolean;
12
+ parentActive: boolean;
12
13
  }>;
13
14
  /**
14
15
  * Used on components that don't need KeepAlive context, to improve performance when Context values change
@@ -8,9 +8,9 @@
8
8
  */
9
9
  import React, { FC } from 'react';
10
10
  import { Plugin } from '../../../application/Plugin';
11
- import { KeepAlive } from './KeepAlive';
11
+ import { KeepAlive, useKeepAlive } from './KeepAlive';
12
12
  import { NocoBaseDesktopRoute, NocoBaseDesktopRouteType } from './convertRoutesToSchema';
13
- export { KeepAlive, NocoBaseDesktopRouteType };
13
+ export { KeepAlive, NocoBaseDesktopRouteType, useKeepAlive };
14
14
  export declare const NocoBaseRouteContext: React.Context<NocoBaseDesktopRoute>;
15
15
  export declare const CurrentRouteProvider: FC<{
16
16
  uid: string;