@nocobase/client 1.2.11-alpha → 1.2.12-alpha

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 +63 -77
  2. package/lib/index.js +11 -12
  3. package/package.json +5 -5
package/es/index.mjs CHANGED
@@ -3929,7 +3929,7 @@ function addAppVersion(e, t) {
3929
3929
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
3930
3930
  }), e;
3931
3931
  }
3932
- const name = "@nocobase/client", version$1 = "1.2.11-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3932
+ const name = "@nocobase/client", version$1 = "1.2.12-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3933
3933
  "@ahooksjs/use-url-state": "3.5.1",
3934
3934
  "@ant-design/cssinjs": "^1.11.1",
3935
3935
  "@ant-design/icons": "^5.1.4",
@@ -3950,9 +3950,9 @@ const name = "@nocobase/client", version$1 = "1.2.11-alpha", license = "AGPL-3.0
3950
3950
  "@formily/reactive-react": "^2.2.27",
3951
3951
  "@formily/shared": "^2.2.27",
3952
3952
  "@formily/validator": "^2.2.27",
3953
- "@nocobase/evaluators": "1.2.11-alpha",
3954
- "@nocobase/sdk": "1.2.11-alpha",
3955
- "@nocobase/utils": "1.2.11-alpha",
3953
+ "@nocobase/evaluators": "1.2.12-alpha",
3954
+ "@nocobase/sdk": "1.2.12-alpha",
3955
+ "@nocobase/utils": "1.2.12-alpha",
3956
3956
  ahooks: "^3.7.2",
3957
3957
  antd: "^5.12.8",
3958
3958
  "antd-style": "3.4.5",
@@ -11370,59 +11370,46 @@ const ColDivider = (e) => {
11370
11370
  InitializerComponent: l,
11371
11371
  showDivider: o
11372
11372
  }), [i, a, l, o]);
11373
- return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: x, children: /* @__PURE__ */ jsx(
11374
- "div",
11375
- {
11376
- className: cls(
11377
- "nb-grid-container"
11378
- // css`
11379
- // & {
11380
- // margin-bottom: ${designable ? 0 : -token.marginLG}px;
11381
- // }
11382
- // `,
11383
- ),
11384
- children: /* @__PURE__ */ jsx("div", { className: cls(`nb-grid ${p.container}`), style: { position: "relative" }, ref: n, children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11385
- /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
11386
- o ? /* @__PURE__ */ jsx(
11387
- RowDivider,
11388
- {
11389
- rows: u,
11390
- first: !0,
11391
- id: `${c}_0`,
11392
- data: {
11393
- breakRemoveOn: breakRemoveOnGrid,
11394
- wrapSchema: wrapRowSchema,
11395
- insertAdjacent: "afterBegin",
11396
- schema: i
11397
- }
11373
+ return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: x, children: /* @__PURE__ */ jsx("div", { className: cls("nb-grid-container"), children: /* @__PURE__ */ jsx("div", { className: cls(`nb-grid ${p.container}`), style: { position: "relative" }, ref: n, children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11374
+ /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
11375
+ o ? /* @__PURE__ */ jsx(
11376
+ RowDivider,
11377
+ {
11378
+ rows: u,
11379
+ first: !0,
11380
+ id: `${c}_0`,
11381
+ data: {
11382
+ breakRemoveOn: breakRemoveOnGrid,
11383
+ wrapSchema: wrapRowSchema,
11384
+ insertAdjacent: "afterBegin",
11385
+ schema: i
11386
+ }
11387
+ }
11388
+ ) : null,
11389
+ u.map((f, C) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11390
+ h ? /* @__PURE__ */ jsx(SchemaComponent, { name: f.name, schema: f, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: f.name, schema: f }),
11391
+ o ? /* @__PURE__ */ jsx(
11392
+ RowDivider,
11393
+ {
11394
+ rows: u,
11395
+ index: C,
11396
+ id: `${c}_${C + 1}`,
11397
+ data: {
11398
+ breakRemoveOn: breakRemoveOnGrid,
11399
+ wrapSchema: wrapRowSchema,
11400
+ insertAdjacent: "afterEnd",
11401
+ schema: f
11398
11402
  }
11399
- ) : null,
11400
- u.map((f, C) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11401
- h ? /* @__PURE__ */ jsx(SchemaComponent, { name: f.name, schema: f, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: f.name, schema: f }),
11402
- o ? /* @__PURE__ */ jsx(
11403
- RowDivider,
11404
- {
11405
- rows: u,
11406
- index: C,
11407
- id: `${c}_${C + 1}`,
11408
- data: {
11409
- breakRemoveOn: breakRemoveOnGrid,
11410
- wrapSchema: wrapRowSchema,
11411
- insertAdjacent: "afterEnd",
11412
- schema: f
11413
- }
11414
- }
11415
- ) : null
11416
- ] }, C))
11417
- ] }),
11418
- a({
11419
- style: {
11420
- marginBottom: m.marginLG
11421
11403
  }
11422
- })
11423
- ] }) })
11424
- }
11425
- ) }) });
11404
+ ) : null
11405
+ ] }, C))
11406
+ ] }),
11407
+ a({
11408
+ style: {
11409
+ marginBottom: m.marginLG
11410
+ }
11411
+ })
11412
+ ] }) }) }) }) });
11426
11413
  },
11427
11414
  { displayName: "Grid" }
11428
11415
  );
@@ -28880,22 +28867,22 @@ const useFieldComponentOptions = () => {
28880
28867
  if (!(!(i != null && i.heightMode) || l === HeightMode.DEFAULT))
28881
28868
  return l === HeightMode.FULL_HEIGHT ? window.innerHeight - a : c;
28882
28869
  }, useTableSize = () => {
28883
- const [e, t] = useState(), [o, n] = useState(), r = useRef(null), i = useTableHeight(), a = useCallback(
28870
+ const [e, t] = useState(), o = useRef(null), n = useTableHeight(), r = useCallback(
28884
28871
  debounce(() => {
28885
- var d;
28886
- if (!r.current)
28872
+ var c;
28873
+ if (!o.current)
28887
28874
  return;
28888
- const c = r.current.getBoundingClientRect();
28889
- (d = r.current.querySelector(".ant-table")) != null && d.getBoundingClientRect() && (n(c.width), t(i));
28875
+ const a = o.current.getBoundingClientRect();
28876
+ (c = o.current.querySelector(".ant-table")) != null && c.getBoundingClientRect() && t(a.width);
28890
28877
  }, 100),
28891
- [i]
28892
- ), l = useCallback(
28893
- (c) => {
28894
- r.current = c && c.children ? c.children[0] : null, a();
28878
+ [n]
28879
+ ), i = useCallback(
28880
+ (a) => {
28881
+ o.current = a && a.children ? a.children[0] : null, r();
28895
28882
  },
28896
- [a]
28883
+ [r]
28897
28884
  );
28898
- return useEventListener("resize", a), { height: e, width: o, tableSizeRefCallback: l };
28885
+ return useEventListener("resize", r), { height: n, width: e, tableSizeRefCallback: i };
28899
28886
  }, hasActionContainerInParentChain = (e) => e ? e["x-component"] === "Action.Container" ? !0 : hasActionContainerInParentChain(e.parent) : null, useFieldModeOptions = (e) => {
28900
28887
  var x;
28901
28888
  const { t } = useTranslation(), { getCollectionJoinField: o, getCollection: n } = useCollectionManager_deprecated(), r = useFieldSchema(), i = (e == null ? void 0 : e.fieldSchema) || r, a = useField(), l = useForm(), c = (i == null ? void 0 : i["x-read-pretty"]) || a.readPretty || l.readPretty, u = e == null ? void 0 : e.fieldSchema, { getField: d } = useCollection_deprecated(), p = (e == null ? void 0 : e.collectionField) || d(i.name) || o(i["x-collection-field"]), { label: m } = ((x = i["x-component-props"]) == null ? void 0 : x.fieldNames) || {};
@@ -32448,7 +32435,7 @@ const InternalNesterCss = css`
32448
32435
  const e = useField(), t = useFieldSchema(), o = useInsertSchema("Nester"), { options: n } = useAssociationFieldContext(), r = (l = (a = t["x-decorator-props"]) == null ? void 0 : a.showTitle) != null ? l : !0, { actionName: i } = useACLActionParamsContext();
32449
32436
  return useEffect(() => {
32450
32437
  o(schema$1.Nester);
32451
- }, []), /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: n.target, children: /* @__PURE__ */ jsx(ACLCollectionProvider, { actionPath: `${n.target}:${i}`, children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
32438
+ }, []), /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: n.target, children: /* @__PURE__ */ jsx(ACLCollectionProvider, { actionPath: `${n.target}:${i || "view"}`, children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
32452
32439
  "div",
32453
32440
  {
32454
32441
  className: cx(
@@ -35704,7 +35691,7 @@ const { Search } = Input$3, useStyle = (e) => createStyles(({ css: t }) => ({
35704
35691
  `
35705
35692
  }))();
35706
35693
  function IconField(e) {
35707
- const { fontSizeHeading3: t } = theme.useToken().token, o = [...icons.keys()], n = useFormLayout(), { value: r, onChange: i, disabled: a, iconSize: l = t, searchable: c = !0 } = e, [u, d] = useState(!1), [p, m] = useState(o), { t: h } = useTranslation(), { styles: x } = useStyle(c), f = debounce((C) => {
35694
+ const { fontSizeXL: t } = theme.useToken().token, o = [...icons.keys()], n = useFormLayout(), { value: r, onChange: i, disabled: a, iconSize: l = t, searchable: c = !0 } = e, [u, d] = useState(!1), [p, m] = useState(o), { t: h } = useTranslation(), { styles: x } = useStyle(c), f = debounce((C) => {
35708
35695
  var b;
35709
35696
  const S = (b = C == null ? void 0 : C.trim()) != null ? b : "";
35710
35697
  m(
@@ -36168,19 +36155,18 @@ const InternalListBlockProvider = (e) => {
36168
36155
  d,
36169
36156
  p,
36170
36157
  css`
36171
- .ant-spin-nested-loading {
36158
+ .nb-list-container {
36172
36159
  height: ${m ? m + "px" : "100%"};
36173
- overflow-y: ${m ? "auto" : "null"};
36174
- .ant-spin-container {
36175
- width: 100%;
36176
- overflow-x: clip;
36177
- padding-right: ${h.paddingSM + "px"};
36178
- }
36160
+ overflow-y: ${m ? "auto" : null};
36161
+ margin-left: -${h.marginLG}px;
36162
+ margin-right: -${h.marginLG}px;
36163
+ padding-left: ${h.marginLG}px;
36164
+ padding-right: ${h.marginLG}px;
36179
36165
  }
36180
36166
  `
36181
36167
  ),
36182
36168
  children: [
36183
- /* @__PURE__ */ jsx(
36169
+ /* @__PURE__ */ jsx("div", { className: "nb-list-container", children: /* @__PURE__ */ jsx(
36184
36170
  List$1,
36185
36171
  v(g({}, e), {
36186
36172
  pagination: !a || a.count <= a.pageSize ? !1 : {
@@ -36201,7 +36187,7 @@ const InternalListBlockProvider = (e) => {
36201
36187
  y
36202
36188
  )) : null
36203
36189
  })
36204
- ),
36190
+ ) }),
36205
36191
  /* @__PURE__ */ jsx(i, {})
36206
36192
  ]
36207
36193
  }