@nocobase/client 1.8.16 → 1.8.18

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 CHANGED
@@ -8771,7 +8771,7 @@ function addAppVersion(e, t) {
8771
8771
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
8772
8772
  }), e;
8773
8773
  }
8774
- const name = "@nocobase/client", version = "1.8.16", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8774
+ const name = "@nocobase/client", version = "1.8.18", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8775
8775
  "@ahooksjs/use-url-state": "3.5.1",
8776
8776
  "@ant-design/cssinjs": "^1.11.1",
8777
8777
  "@ant-design/icons": "^5.6.1",
@@ -8792,9 +8792,9 @@ const name = "@nocobase/client", version = "1.8.16", license = "AGPL-3.0", main
8792
8792
  "@formily/reactive-react": "^2.2.27",
8793
8793
  "@formily/shared": "^2.2.27",
8794
8794
  "@formily/validator": "^2.2.27",
8795
- "@nocobase/evaluators": "1.8.16",
8796
- "@nocobase/sdk": "1.8.16",
8797
- "@nocobase/utils": "1.8.16",
8795
+ "@nocobase/evaluators": "1.8.18",
8796
+ "@nocobase/sdk": "1.8.18",
8797
+ "@nocobase/utils": "1.8.18",
8798
8798
  ahooks: "^3.7.2",
8799
8799
  antd: "5.24.2",
8800
8800
  "antd-style": "3.7.1",
@@ -25257,10 +25257,10 @@ const LayoutContent = () => {
25257
25257
  const { isMobileLayout: e, setIsMobileLayout: t } = useContext(IsMobileLayoutContext);
25258
25258
  return { isMobileLayout: e, setIsMobileLayout: t };
25259
25259
  }, InternalAdminLayout = () => {
25260
- const { allAccessRoutes: e } = useAllAccessDesktopRoutes(), { designable: t } = useDesignable(), n = useLocation(), { onDragEnd: o } = useMenuDragEnd(), { token: r } = useToken(), { isMobileLayout: a, setIsMobileLayout: i } = useMobileLayout(), [l, c] = useState(a), u = useRef(!1), { t: d } = useMenuTranslation(), p = a ? !1 : t, { styles: m } = useHeaderStyle(), h = useMemo(() => ({
25260
+ const { allAccessRoutes: e } = useAllAccessDesktopRoutes(), { designable: t } = useDesignable(), n = useLocation(), { onDragEnd: o } = useMenuDragEnd(), { token: r } = useToken(), { isMobileLayout: a } = useMobileLayout(), [i, l] = useState(a), c = useRef(!1), { t: u } = useMenuTranslation(), d = a ? !1 : t, { styles: p } = useHeaderStyle(), m = useMemo(() => ({
25261
25261
  path: "/",
25262
- children: convertRoutesToLayout(e, { designable: p, isMobile: a, t: d })
25263
- }), [e, p, a, d]), g = useMemo(() => ({
25262
+ children: convertRoutesToLayout(e, { designable: d, isMobile: a, t: u })
25263
+ }), [e, d, a, u]), h = useMemo(() => ({
25264
25264
  header: {
25265
25265
  colorBgHeader: r.colorBgHeader,
25266
25266
  colorTextMenu: r.colorTextHeaderMenu,
@@ -25280,8 +25280,8 @@ const LayoutContent = () => {
25280
25280
  colorBgMenuItemHover: r.colorBgTextHover
25281
25281
  },
25282
25282
  bgLayout: r.colorBgLayout
25283
- }), [r]), { theme: f, isDarkTheme: C } = useGlobalTheme(), b = useMemo(() => P(x({}, f), {
25284
- token: P(x({}, f.token), {
25283
+ }), [r]), { theme: g, isDarkTheme: f } = useGlobalTheme(), C = useMemo(() => P(x({}, g), {
25284
+ token: P(x({}, g.token), {
25285
25285
  paddingPageHorizontal: 8,
25286
25286
  // Horizontal page padding
25287
25287
  paddingPageVertical: 8,
@@ -25293,17 +25293,17 @@ const LayoutContent = () => {
25293
25293
  fontSize: 16
25294
25294
  // Font size
25295
25295
  }),
25296
- algorithm: C ? [theme.compactAlgorithm, theme.darkAlgorithm] : theme.compactAlgorithm
25296
+ algorithm: f ? [theme.compactAlgorithm, theme.darkAlgorithm] : theme.compactAlgorithm
25297
25297
  // Set mobile mode to always use compact algorithm
25298
- }), [f, C]), y = useCallback((F) => {
25299
- u.current || c(F);
25300
- }, []), S = useCallback(() => {
25301
- u.current = !0, setTimeout(() => {
25302
- u.current = !1;
25298
+ }), [g, f]), b = useCallback((v) => {
25299
+ c.current || l(v);
25300
+ }, []), y = useCallback(() => {
25301
+ c.current = !0, setTimeout(() => {
25302
+ c.current = !1;
25303
25303
  });
25304
- }, []), v = useMemo(() => ({
25305
- overflowedIndicatorPopupClassName: m.headerPopup
25306
- }), [m.headerPopup]);
25304
+ }, []), S = useMemo(() => ({
25305
+ overflowedIndicatorPopupClassName: p.headerPopup
25306
+ }), [p.headerPopup]);
25307
25307
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: o, children: /* @__PURE__ */ jsx(
25308
25308
  ProLayout,
25309
25309
  {
@@ -25311,32 +25311,39 @@ const LayoutContent = () => {
25311
25311
  siderWidth: r.siderWidth || 200,
25312
25312
  className: resetStyle,
25313
25313
  location: n,
25314
- route: h,
25314
+ route: m,
25315
25315
  actionsRender,
25316
25316
  logo: /* @__PURE__ */ jsx(NocoBaseLogo, {}),
25317
25317
  title: "",
25318
25318
  layout: "mix",
25319
25319
  splitMenus: !0,
25320
- token: g,
25320
+ token: h,
25321
25321
  headerRender,
25322
25322
  menuItemRender,
25323
25323
  subMenuItemRender,
25324
25324
  collapsedButtonRender,
25325
- onCollapse: y,
25326
- collapsed: l,
25327
- onPageChange: S,
25325
+ onCollapse: b,
25326
+ collapsed: i,
25327
+ onPageChange: y,
25328
25328
  menu: {
25329
25329
  // 1.x 暂默认禁用菜单手风琴效果,2.x 支持配置
25330
25330
  autoClose: !1
25331
25331
  },
25332
- menuProps: v,
25333
- children: /* @__PURE__ */ jsx(RouteContext.Consumer, { children: (F) => {
25334
- const { isMobile: I } = F;
25335
- return I !== a && i(I), /* @__PURE__ */ jsx(ConfigProvider, { theme: I ? b : f, children: /* @__PURE__ */ jsx(LayoutContent, {}) });
25332
+ menuProps: S,
25333
+ children: /* @__PURE__ */ jsx(RouteContext.Consumer, { children: (v) => {
25334
+ const { isMobile: F } = v;
25335
+ return /* @__PURE__ */ jsx(SetIsMobileLayout, { isMobile: F, children: /* @__PURE__ */ jsx(ConfigProvider, { theme: F ? C : g, children: /* @__PURE__ */ jsx(LayoutContent, {}) }) });
25336
25336
  } })
25337
25337
  }
25338
25338
  ) });
25339
- }, NavigateToDefaultPage = (e) => {
25339
+ };
25340
+ function SetIsMobileLayout(e) {
25341
+ const { setIsMobileLayout: t } = useMobileLayout();
25342
+ return useEffect(() => {
25343
+ t(e.isMobile);
25344
+ }, [e.isMobile, t]), e.children;
25345
+ }
25346
+ const NavigateToDefaultPage = (e) => {
25340
25347
  var r;
25341
25348
  const { allAccessRoutes: t } = useAllAccessDesktopRoutes(), n = useLocationNoUpdate(), o = (r = findFirstPageRoute(t)) == null ? void 0 : r.schemaUid;
25342
25349
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -27654,7 +27661,7 @@ function getOperators() {
27654
27661
  return n.truthy(r);
27655
27662
  },
27656
27663
  $empty: function(r) {
27657
- return Array.isArray(r) ? r.length === 0 : !n.truthy(r);
27664
+ return Array.isArray(r) || typeof r == "string" ? r.length === 0 : r == null;
27658
27665
  },
27659
27666
  $notExists: function(r) {
27660
27667
  return !n.truthy(r);
@@ -39715,6 +39722,7 @@ const ActionLink = withDynamicSchemaProps(
39715
39722
  position: "relative",
39716
39723
  "&:hover": { "> .general-schema-designer": { display: "block" } },
39717
39724
  "&.nb-action-link": {
39725
+ textWrap: "nowrap",
39718
39726
  margin: "-12px",
39719
39727
  padding: "12px",
39720
39728
  ".nb-action-title": {