@nocobase/client 1.6.7 → 1.6.9

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.
Files changed (3) hide show
  1. package/es/index.mjs +42 -63
  2. package/lib/index.js +73 -79
  3. package/package.json +5 -5
package/es/index.mjs CHANGED
@@ -9161,7 +9161,7 @@ function addAppVersion(e, t) {
9161
9161
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9162
9162
  }), e;
9163
9163
  }
9164
- const name = "@nocobase/client", version = "1.6.7", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9164
+ const name = "@nocobase/client", version = "1.6.9", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9165
9165
  "@ahooksjs/use-url-state": "3.5.1",
9166
9166
  "@ant-design/cssinjs": "^1.11.1",
9167
9167
  "@ant-design/icons": "^5.6.1",
@@ -9183,9 +9183,9 @@ const name = "@nocobase/client", version = "1.6.7", license = "AGPL-3.0", main =
9183
9183
  "@formily/reactive-react": "^2.2.27",
9184
9184
  "@formily/shared": "^2.2.27",
9185
9185
  "@formily/validator": "^2.2.27",
9186
- "@nocobase/evaluators": "1.6.7",
9187
- "@nocobase/sdk": "1.6.7",
9188
- "@nocobase/utils": "1.6.7",
9186
+ "@nocobase/evaluators": "1.6.9",
9187
+ "@nocobase/sdk": "1.6.9",
9188
+ "@nocobase/utils": "1.6.9",
9189
9189
  ahooks: "^3.7.2",
9190
9190
  antd: "5.12.8",
9191
9191
  "antd-style": "3.7.1",
@@ -10973,7 +10973,7 @@ const InternalTableBlockProvider = (e) => {
10973
10973
  }
10974
10974
  }
10975
10975
  );
10976
- }, getPageHeaderHeight = (e, t, n, o, r) => r.includes("/popups/") ? 2 * o.paddingContentVertical + 22 + o.paddingPageVertical : e ? o.paddingContentHorizontalLG : n ? t ? o.controlPaddingHorizontal + 3 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.paddingContentHorizontalLG + 12 : t ? o.paddingSM + o.controlHeight + o.marginXS + 2 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.controlHeight + o.marginXS + (o.paddingXXS + 2) * 2 + o.paddingContentHorizontalLG, usePageFullScreenHeight = (e) => {
10976
+ }, getPageHeaderHeight = (e, t, n, o, r) => r.includes("/popups/") ? 2 * o.paddingContentVertical + 22 + o.paddingPageVertical : e ? o.paddingContentHorizontalLG : n ? t ? o.controlPaddingHorizontal + 3 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.paddingContentHorizontalLG + 12 : t ? o.paddingSM + o.controlHeight + o.marginXS + 2 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.controlHeight + o.marginXS + (o.paddingContentVertical + 2) * 2 + o.paddingContentHorizontalLG, usePageFullScreenHeight = (e) => {
10977
10977
  const { token: t } = theme.useToken(), { designable: n } = useDesignable(), { heightProps: o } = useBlockHeightProps(), r = useLocation(), { disablePageHeader: i, enablePageTabs: a, hidePageTitle: l } = e || o || {}, c = t.sizeXXL - 2, u = n ? t.controlHeight + 2 * t.paddingContentHorizontalLG : 1 * t.paddingContentHorizontalLG, d = getPageHeaderHeight(
10978
10978
  i,
10979
10979
  a,
@@ -11000,7 +11000,7 @@ const InternalTableBlockProvider = (e) => {
11000
11000
  if (!(!(t != null && t.heightMode) || o === HeightMode.DEFAULT)) {
11001
11001
  if (o === HeightMode.FULL_HEIGHT) {
11002
11002
  let c = window.innerHeight - n;
11003
- return console.log(c), e != null && e.removeBlockHeaderHeight && (c = c - l), e != null && e.innerExtraHeight && (c = c - e.innerExtraHeight), c;
11003
+ return e != null && e.removeBlockHeaderHeight && (c = c - l), e != null && e.innerExtraHeight && (c = c - e.innerExtraHeight), c;
11004
11004
  }
11005
11005
  return r;
11006
11006
  }
@@ -37404,8 +37404,8 @@ const RenderButton = ({
37404
37404
  RenderButton.displayName = "RenderButton";
37405
37405
  const RenderButtonInner = observer$1(
37406
37406
  (e) => {
37407
- var w, k;
37408
- const I = e, {
37407
+ var D, j;
37408
+ const k = e, {
37409
37409
  designable: t,
37410
37410
  field: n,
37411
37411
  aclCtx: o,
@@ -37424,7 +37424,7 @@ const RenderButtonInner = observer$1(
37424
37424
  Designer: C,
37425
37425
  designerProps: b,
37426
37426
  title: S
37427
- } = I, v = Y(I, [
37427
+ } = k, v = Y(k, [
37428
37428
  "designable",
37429
37429
  "field",
37430
37430
  "aclCtx",
@@ -37445,8 +37445,8 @@ const RenderButtonInner = observer$1(
37445
37445
  "title"
37446
37446
  ]), y = useCallback(
37447
37447
  debounce$1(
37448
- (D, N = !0) => {
37449
- d(D, N);
37448
+ (O, B = !0) => {
37449
+ d(O, B);
37450
37450
  },
37451
37451
  300,
37452
37452
  { leading: !0, trailing: !1 }
@@ -37455,9 +37455,9 @@ const RenderButtonInner = observer$1(
37455
37455
  );
37456
37456
  if (useEffect(() => () => {
37457
37457
  y.cancel();
37458
- }, []), !t && ((w = n == null ? void 0 : n.data) != null && w.hidden || !o))
37458
+ }, []), !t && ((D = n == null ? void 0 : n.data) != null && D.hidden || !o))
37459
37459
  return null;
37460
- const F = S || (n == null ? void 0 : n.title);
37460
+ const F = S || (n == null ? void 0 : n.title), N = l, { opacity: I } = N, w = Y(N, ["opacity"]);
37461
37461
  return /* @__PURE__ */ jsxs(
37462
37462
  SortableItem,
37463
37463
  P(x({
@@ -37465,16 +37465,16 @@ const RenderButtonInner = observer$1(
37465
37465
  "aria-label": u()
37466
37466
  }, v), {
37467
37467
  onMouseEnter: c,
37468
- loading: ((k = n == null ? void 0 : n.data) == null ? void 0 : k.loading) || i,
37469
- icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r }) : r,
37468
+ loading: ((j = n == null ? void 0 : n.data) == null ? void 0 : j.loading) || i,
37469
+ icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { style: { opacity: I }, type: r }) : r,
37470
37470
  disabled: a,
37471
- style: l,
37471
+ style: w,
37472
37472
  onClick: y,
37473
37473
  component: p || Button,
37474
37474
  className: cls(m, h, g, "nb-action"),
37475
37475
  type: f === "danger" ? void 0 : f,
37476
37476
  children: [
37477
- F && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, children: F }),
37477
+ F && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: { opacity: I }, children: F }),
37478
37478
  /* @__PURE__ */ jsx(C, x({}, b))
37479
37479
  ]
37480
37480
  })
@@ -46153,14 +46153,9 @@ function FinallyButton({
46153
46153
  form: d,
46154
46154
  designable: p
46155
46155
  }) {
46156
- var f, C, b, S, v;
46157
- const { getCollection: m } = useCollectionManager_deprecated(), h = useACLActionParamsContext(), g = useMemo(() => {
46158
- var y;
46159
- return {
46160
- opacity: p && (((y = u == null ? void 0 : u.data) == null ? void 0 : y.hidden) || !h) && 0.1
46161
- };
46162
- }, [p, (f = u == null ? void 0 : u.data) == null ? void 0 : f.hidden]);
46163
- return (e == null ? void 0 : e.length) > 0 ? t ? /* @__PURE__ */ jsx(
46156
+ var h, g, f, C;
46157
+ const { getCollection: m } = useCollectionManager_deprecated();
46158
+ return useACLActionParamsContext(), (e == null ? void 0 : e.length) > 0 ? t ? /* @__PURE__ */ jsx(
46164
46159
  Button,
46165
46160
  {
46166
46161
  "aria-label": o["aria-label"],
@@ -46168,14 +46163,14 @@ function FinallyButton({
46168
46163
  disabled: u.disabled,
46169
46164
  danger: o.danger,
46170
46165
  icon: c,
46171
- onClick: (y) => {
46172
- const F = getLinkageCollection(t, d, u), I = e.find((k) => k.name === F) ? F : l.name, w = m(I);
46173
- a == null || a(w);
46166
+ onClick: (b) => {
46167
+ const S = getLinkageCollection(t, d, u), v = e.find((F) => F.name === S) ? S : l.name, y = m(v);
46168
+ a == null || a(y);
46169
+ },
46170
+ style: {
46171
+ display: !p && ((h = u == null ? void 0 : u.data) == null ? void 0 : h.hidden) && "none",
46172
+ opacity: p && ((g = u == null ? void 0 : u.data) == null ? void 0 : g.hidden) && 0.1
46174
46173
  },
46175
- style: x({
46176
- display: !p && ((C = u == null ? void 0 : u.data) == null ? void 0 : C.hidden) && "none",
46177
- opacity: p && ((b = u == null ? void 0 : u.data) == null ? void 0 : b.hidden) && 0.1
46178
- }, g),
46179
46174
  children: o.children
46180
46175
  }
46181
46176
  ) : n === void 0 || n ? /* @__PURE__ */ jsxs(
@@ -46185,18 +46180,17 @@ function FinallyButton({
46185
46180
  danger: o.danger,
46186
46181
  type: r,
46187
46182
  icon: /* @__PURE__ */ jsx(DownOutlined, {}),
46188
- style: x(x({}, o == null ? void 0 : o.style), g),
46189
- buttonsRender: ([y, F]) => [
46190
- React.cloneElement(y, {
46183
+ buttonsRender: ([b, S]) => [
46184
+ React.cloneElement(b, {
46191
46185
  style: o == null ? void 0 : o.style
46192
46186
  }),
46193
- React.cloneElement(F, {
46187
+ React.cloneElement(S, {
46194
46188
  loading: !1,
46195
46189
  style: P(x({}, o == null ? void 0 : o.style), { justifyContent: "center" })
46196
46190
  })
46197
46191
  ],
46198
46192
  menu: i,
46199
- onClick: (y) => {
46193
+ onClick: (b) => {
46200
46194
  a == null || a(l);
46201
46195
  },
46202
46196
  children: [
@@ -46204,21 +46198,11 @@ function FinallyButton({
46204
46198
  o.children
46205
46199
  ]
46206
46200
  }
46207
- ) : /* @__PURE__ */ jsx(Dropdown, { menu: i, children: /* @__PURE__ */ jsxs(
46208
- Button,
46209
- {
46210
- "aria-label": o["aria-label"],
46211
- icon: c,
46212
- type: r,
46213
- danger: o.danger,
46214
- style: x(x({}, o == null ? void 0 : o.style), g),
46215
- children: [
46216
- o.children,
46217
- " ",
46218
- /* @__PURE__ */ jsx(DownOutlined, {})
46219
- ]
46220
- }
46221
- ) }) : /* @__PURE__ */ jsx(
46201
+ ) : /* @__PURE__ */ jsx(Dropdown, { menu: i, children: /* @__PURE__ */ jsxs(Button, { "aria-label": o["aria-label"], icon: c, type: r, danger: o.danger, children: [
46202
+ o.children,
46203
+ " ",
46204
+ /* @__PURE__ */ jsx(DownOutlined, {})
46205
+ ] }) }) : /* @__PURE__ */ jsx(
46222
46206
  Button,
46223
46207
  P(x({}, o), {
46224
46208
  "aria-label": o["aria-label"],
@@ -46226,13 +46210,14 @@ function FinallyButton({
46226
46210
  disabled: u.disabled,
46227
46211
  danger: o.danger,
46228
46212
  icon: c,
46229
- onClick: (y) => {
46213
+ onClick: (b) => {
46230
46214
  a == null || a(l);
46231
46215
  },
46232
- style: x(P(x({}, o == null ? void 0 : o.style), {
46233
- display: !p && ((S = u == null ? void 0 : u.data) == null ? void 0 : S.hidden) && "none",
46234
- opacity: p && ((v = u == null ? void 0 : u.data) == null ? void 0 : v.hidden) && 0.1
46235
- }), g),
46216
+ style: P(x({}, o == null ? void 0 : o.style), {
46217
+ display: !p && ((f = u == null ? void 0 : u.data) == null ? void 0 : f.hidden) && "none",
46218
+ opacity: p && ((C = u == null ? void 0 : u.data) == null ? void 0 : C.hidden) && 0.1,
46219
+ height: "100%"
46220
+ }),
46236
46221
  children: o.children
46237
46222
  })
46238
46223
  );
@@ -50294,12 +50279,6 @@ const useColumnsDeepMemoized = (e) => {
50294
50279
  height: 100%;
50295
50280
  display: flex;
50296
50281
  flex-direction: column;
50297
- .ant-table-expanded-row-fixed {
50298
- min-height: ${t}px;
50299
- }
50300
- .ant-table-body {
50301
- min-height: ${t}px;
50302
- }
50303
50282
  .ant-table-cell {
50304
50283
  padding: 16px 8px;
50305
50284
  }