@nocobase/client 1.2.2-alpha → 1.2.4-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.
package/es/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  var $e = Object.defineProperty, Ne = Object.defineProperties;
2
2
  var ze = Object.getOwnPropertyDescriptors;
3
- var ye = Object.getOwnPropertySymbols;
3
+ var ve = Object.getOwnPropertySymbols;
4
4
  var Me = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
5
5
  var je = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
6
6
  var ke = (e, t, o) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, g = (e, t) => {
7
7
  for (var o in t || (t = {}))
8
8
  Me.call(t, o) && ke(e, o, t[o]);
9
- if (ye)
10
- for (var o of ye(t))
9
+ if (ve)
10
+ for (var o of ve(t))
11
11
  Be.call(t, o) && ke(e, o, t[o]);
12
12
  return e;
13
13
  }, F = (e, t) => Ne(e, ze(t));
@@ -15,8 +15,8 @@ var H = (e, t) => {
15
15
  var o = {};
16
16
  for (var n in e)
17
17
  Me.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
18
- if (e != null && ye)
19
- for (var n of ye(e))
18
+ if (e != null && ve)
19
+ for (var n of ve(e))
20
20
  t.indexOf(n) < 0 && Be.call(e, n) && (o[n] = e[n]);
21
21
  return o;
22
22
  };
@@ -37,7 +37,7 @@ var V = (e, t, o) => new Promise((n, r) => {
37
37
  }, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(i, a);
38
38
  l((o = o.apply(e, t)).next());
39
39
  });
40
- var ve = (e, t, o) => (t = e[je("asyncIterator")]) ? t.call(e) : (e = e[je("iterator")](), t = {}, o = (n, r) => (r = e[n]) && (t[n] = (i) => new Promise((a, l, c) => (i = r.call(e, i), c = i.done, Promise.resolve(i.value).then((u) => a({ value: u, done: c }), l)))), o("next"), o("return"), t);
40
+ var Fe = (e, t, o) => (t = e[je("asyncIterator")]) ? t.call(e) : (e = e[je("iterator")](), t = {}, o = (n, r) => (r = e[n]) && (t[n] = (i) => new Promise((a, l, c) => (i = r.call(e, i), c = i.done, Promise.resolve(i.value).then((u) => a({ value: u, done: c }), l)))), o("next"), o("return"), t);
41
41
  import "./index.css";
42
42
  import "dayjs/plugin/isBetween";
43
43
  import "dayjs/plugin/isSameOrAfter";
@@ -3902,7 +3902,7 @@ function addAppVersion(e, t) {
3902
3902
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
3903
3903
  }), e;
3904
3904
  }
3905
- const name = "@nocobase/client", version$1 = "1.2.2-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3905
+ const name = "@nocobase/client", version$1 = "1.2.4-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3906
3906
  "@ahooksjs/use-url-state": "3.5.1",
3907
3907
  "@ant-design/cssinjs": "^1.11.1",
3908
3908
  "@ant-design/icons": "^5.1.4",
@@ -3923,9 +3923,9 @@ const name = "@nocobase/client", version$1 = "1.2.2-alpha", license = "AGPL-3.0"
3923
3923
  "@formily/reactive-react": "^2.2.27",
3924
3924
  "@formily/shared": "^2.2.27",
3925
3925
  "@formily/validator": "^2.2.27",
3926
- "@nocobase/evaluators": "1.2.2-alpha",
3927
- "@nocobase/sdk": "1.2.2-alpha",
3928
- "@nocobase/utils": "1.2.2-alpha",
3926
+ "@nocobase/evaluators": "1.2.4-alpha",
3927
+ "@nocobase/sdk": "1.2.4-alpha",
3928
+ "@nocobase/utils": "1.2.4-alpha",
3929
3929
  ahooks: "^3.7.2",
3930
3930
  antd: "^5.12.8",
3931
3931
  "antd-style": "3.4.5",
@@ -6360,7 +6360,7 @@ function getPlugins(e) {
6360
6360
  const r = [], i = {};
6361
6361
  if (n) {
6362
6362
  try {
6363
- for (var c = ve(o), u, d, p; u = !(d = yield c.next()).done; u = !1) {
6363
+ for (var c = Fe(o), u, d, p; u = !(d = yield c.next()).done; u = !1) {
6364
6364
  const m = d.value;
6365
6365
  const h = yield n(m.packageName);
6366
6366
  h && (r.push([m.name, h.default]), i[m.packageName] = h.default);
@@ -6402,7 +6402,7 @@ let PluginManager$1 = class {
6402
6402
  initStaticPlugins() {
6403
6403
  return V(this, arguments, function* (t = []) {
6404
6404
  try {
6405
- for (var o = ve(t), n, r, i; n = !(r = yield o.next()).done; n = !1) {
6405
+ for (var o = Fe(t), n, r, i; n = !(r = yield o.next()).done; n = !1) {
6406
6406
  const a = r.value;
6407
6407
  const l = Array.isArray(a) ? a[0] : a, c = Array.isArray(a) ? a[1] : void 0;
6408
6408
  yield this.add(l, c);
@@ -6428,7 +6428,7 @@ let PluginManager$1 = class {
6428
6428
  devDynamicImport: this.app.devDynamicImport
6429
6429
  });
6430
6430
  try {
6431
- for (var i = ve(n), a, l, c; a = !(l = yield i.next()).done; a = !1) {
6431
+ for (var i = Fe(n), a, l, c; a = !(l = yield i.next()).done; a = !1) {
6432
6432
  const [u, d] = l.value;
6433
6433
  const p = o.find((m) => m.name === u);
6434
6434
  yield this.add(d, p);
@@ -7146,37 +7146,48 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
7146
7146
  };
7147
7147
  }, SchemaInitializerItem = memo(
7148
7148
  React.forwardRef((e, t) => {
7149
- const { style: o, name: n = uid(), applyMenuStyle: r = !0, className: i, items: a, icon: l, title: c, onClick: u, children: d } = e, p = useCompile(), m = useSchemaInitializerMenuItems(a, n, u), { componentCls: h, hashId: x } = useSchemaInitializerStyles(), { attribute: f } = useAriaAttributeOfMenuItem(), C = useMemo(() => {
7150
- if (a && a.length > 0)
7149
+ const {
7150
+ style: o,
7151
+ closeInitializerMenuWhenClick: n = !0,
7152
+ name: r = uid(),
7153
+ applyMenuStyle: i = !0,
7154
+ className: a,
7155
+ items: l,
7156
+ icon: c,
7157
+ title: u,
7158
+ onClick: d,
7159
+ children: p
7160
+ } = e, m = useCompile(), h = useSchemaInitializerMenuItems(l, r, d), { componentCls: x, hashId: f } = useSchemaInitializerStyles(), { attribute: C } = useAriaAttributeOfMenuItem(), { setVisible: S } = useSchemaInitializer(), b = useMemo(() => {
7161
+ if (l && l.length > 0)
7151
7162
  return [
7152
7163
  {
7153
- key: n,
7164
+ key: r,
7154
7165
  style: o,
7155
- className: i,
7156
- label: d || p(c),
7157
- onClick: (S) => {
7158
- S.key === n && (u == null || u(F(g({}, S), { item: e })));
7166
+ className: a,
7167
+ label: p || m(u),
7168
+ onClick: (y) => {
7169
+ y.key === r && (n && (S == null || S(!1)), d == null || d(F(g({}, y), { item: e })));
7159
7170
  },
7160
- icon: typeof l == "string" ? /* @__PURE__ */ jsx(Icon, { type: l }) : l,
7161
- children: m
7171
+ icon: typeof c == "string" ? /* @__PURE__ */ jsx(Icon, { type: c }) : c,
7172
+ children: h
7162
7173
  }
7163
7174
  ];
7164
- }, [n, o, i, d, c, u, l, m]);
7165
- return a && a.length > 0 ? /* @__PURE__ */ jsx(SchemaInitializerMenu, { items: C }) : /* @__PURE__ */ jsx(
7175
+ }, [r, o, a, p, u, d, c, h]);
7176
+ return l && l.length > 0 ? /* @__PURE__ */ jsx(SchemaInitializerMenu, { items: b }) : /* @__PURE__ */ jsx(
7166
7177
  "div",
7167
7178
  {
7168
7179
  ref: t,
7169
- onClick: (S) => {
7170
- S.stopPropagation(), u == null || u({ event: S, item: e });
7180
+ onClick: (y) => {
7181
+ y.stopPropagation(), n && (S == null || S(!1)), d == null || d({ event: y, item: e });
7171
7182
  },
7172
7183
  children: /* @__PURE__ */ jsx(
7173
7184
  "div",
7174
- F(g({}, f), {
7175
- className: cls({ [`${h}-menu-item`]: r }, i),
7185
+ F(g({}, C), {
7186
+ className: cls({ [`${x}-menu-item`]: i }, a),
7176
7187
  style: o,
7177
- children: d || /* @__PURE__ */ jsxs(Fragment, { children: [
7178
- l && typeof l == "string" ? /* @__PURE__ */ jsx(Icon, { type: l }) : l,
7179
- /* @__PURE__ */ jsx("span", { className: cls({ [`${x} ${h}-item-content`]: l }), children: p(c) })
7188
+ children: p || /* @__PURE__ */ jsxs(Fragment, { children: [
7189
+ typeof c == "string" ? /* @__PURE__ */ jsx(Icon, { type: c }) : c,
7190
+ /* @__PURE__ */ jsx("span", { className: cls({ [`${f} ${x}-item-content`]: !!c }), children: m(u) })
7180
7191
  ] })
7181
7192
  })
7182
7193
  )
@@ -7190,7 +7201,7 @@ const SchemaInitializerItemInternal = () => {
7190
7201
  return /* @__PURE__ */ jsx(SchemaInitializerItem, g({}, e));
7191
7202
  }, SchemaInitializerSwitch = (e) => {
7192
7203
  const i = e, { title: t, checked: o } = i, n = H(i, ["title", "checked"]), r = useCompile();
7193
- return /* @__PURE__ */ jsx(SchemaInitializerItem, F(g({}, n), { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
7204
+ return /* @__PURE__ */ jsx(SchemaInitializerItem, F(g({}, n), { closeInitializerMenuWhenClick: !1, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
7194
7205
  r(t),
7195
7206
  " ",
7196
7207
  /* @__PURE__ */ jsx(Switch, { style: { marginLeft: 20 }, size: "small", checked: o })
@@ -7267,54 +7278,48 @@ const SchemaInitializerDivider = () => {
7267
7278
  const { items: t } = e;
7268
7279
  return t.length === 0 ? null : /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: t });
7269
7280
  }, SchemaInitializerActionModalItemComponent = React.forwardRef((e, t) => {
7270
- const i = e, { onClick: o, title: n } = i, r = H(i, ["onClick", "title"]);
7271
- return /* @__PURE__ */ jsx(
7272
- SchemaInitializerItem,
7273
- F(g({
7274
- ref: t
7275
- }, r), {
7276
- onClick: (a) => {
7277
- o == null || o(a.event);
7278
- }
7279
- })
7280
- );
7281
+ const r = e, { onClick: o } = r, n = H(r, ["onClick"]);
7282
+ return /* @__PURE__ */ jsx(SchemaInitializerItem, F(g({ ref: t }, n), { onClick: (i) => o == null ? void 0 : o(i.event, !1) }));
7281
7283
  }), SchemaInitializerActionModal = (e) => {
7282
- const { title: t, schema: o, buttonText: n, isItem: r, component: i, onCancel: a, onSubmit: l } = e, c = useCallback(() => {
7283
- const p = useForm(), m = useActionContext();
7284
+ const { title: t, icon: o, schema: n, buttonText: r, isItem: i, component: a, onCancel: l, onSubmit: c } = e, u = useCallback(() => {
7285
+ const x = useForm(), f = useActionContext();
7284
7286
  return {
7285
7287
  run() {
7286
7288
  return V(this, null, function* () {
7287
- yield a == null ? void 0 : a(), m.setVisible(!1), p.reset();
7289
+ yield l == null ? void 0 : l(), f.setVisible(!1), x.reset();
7288
7290
  });
7289
7291
  }
7290
7292
  };
7291
- }, [a]), u = useCallback(() => {
7292
- const p = useForm(), m = useActionContext();
7293
+ }, [l]), d = useCallback(() => {
7294
+ const x = useForm(), f = useActionContext();
7293
7295
  return {
7294
7296
  run() {
7295
7297
  return V(this, null, function* () {
7296
- yield p.validate(), yield l == null ? void 0 : l(p.values), m.setVisible(!1), p.reset();
7298
+ yield x.validate(), yield c == null ? void 0 : c(x.values), f.setVisible(!1), x.reset();
7297
7299
  });
7298
7300
  }
7299
7301
  };
7300
- }, [l]), d = useMemo(() => ({
7302
+ }, [c]), p = useMemo(
7303
+ () => React.forwardRef(({ onClick: x }, f) => /* @__PURE__ */ jsx(SchemaInitializerActionModalItemComponent, { onClick: x, ref: f, title: r, icon: o })),
7304
+ [r, o]
7305
+ ), m = useMemo(() => uid(), []), h = useMemo(() => ({
7301
7306
  type: "void",
7302
7307
  properties: {
7303
- action1: {
7308
+ [m]: {
7304
7309
  type: "void",
7305
7310
  "x-component": "Action",
7306
- "x-component-props": i ? {
7307
- component: i
7308
- } : r ? {
7309
- title: n,
7310
- component: SchemaInitializerActionModalItemComponent
7311
+ "x-component-props": a ? {
7312
+ component: a,
7313
+ icon: o
7314
+ } : i ? {
7315
+ component: p
7311
7316
  } : {
7312
- icon: "PlusOutlined",
7317
+ icon: o || "PlusOutlined",
7313
7318
  style: {
7314
7319
  borderColor: "var(--colorSettings)",
7315
7320
  color: "var(--colorSettings)"
7316
7321
  },
7317
- title: n,
7322
+ title: r,
7318
7323
  type: "dashed"
7319
7324
  },
7320
7325
  properties: {
@@ -7329,7 +7334,7 @@ const SchemaInitializerDivider = () => {
7329
7334
  },
7330
7335
  type: "void",
7331
7336
  title: t,
7332
- properties: F(g({}, (o == null ? void 0 : o.properties) || o), {
7337
+ properties: F(g({}, (n == null ? void 0 : n.properties) || n), {
7333
7338
  footer: {
7334
7339
  "x-component": "Action.Modal.Footer",
7335
7340
  type: "void",
@@ -7338,7 +7343,7 @@ const SchemaInitializerDivider = () => {
7338
7343
  title: '{{t("Cancel")}}',
7339
7344
  "x-component": "Action",
7340
7345
  "x-component-props": {
7341
- useAction: c
7346
+ useAction: u
7342
7347
  }
7343
7348
  },
7344
7349
  submit: {
@@ -7346,7 +7351,7 @@ const SchemaInitializerDivider = () => {
7346
7351
  "x-component": "Action",
7347
7352
  "x-component-props": {
7348
7353
  type: "primary",
7349
- useAction: u
7354
+ useAction: d
7350
7355
  }
7351
7356
  }
7352
7357
  }
@@ -7356,8 +7361,8 @@ const SchemaInitializerDivider = () => {
7356
7361
  }
7357
7362
  }
7358
7363
  }
7359
- }), [n, i, o, t, c, u]);
7360
- return /* @__PURE__ */ jsx(SchemaComponent, { schema: d });
7364
+ }), [r, a, m, n, t, u, d]);
7365
+ return /* @__PURE__ */ jsx(SchemaComponent, { schema: h });
7361
7366
  }, SchemaInitializerActionModalInternal = () => {
7362
7367
  const e = useSchemaInitializerItem();
7363
7368
  return /* @__PURE__ */ jsx(SchemaInitializerActionModal, g({}, e));
@@ -11257,53 +11262,68 @@ const ColDivider = (e) => {
11257
11262
  return useMemo(() => e.reduceProperties((t, o) => (o["x-component"] === "Grid.Col" && !o["x-hidden"] && t.push(o), t), []), [Object.keys(e.properties || {}).join(",")]);
11258
11263
  }, DndWrapper = (e) => e.dndContext === !1 ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : /* @__PURE__ */ jsx(DndContext, F(g({}, e.dndContext), { children: e.children })), useGridContext = () => useContext(GridContext), useGridRowContext = () => useContext(GridRowContext), Grid = observer$1(
11259
11264
  (e) => {
11260
- const { distributed: t, showDivider: o = !0 } = e, n = useRef(null), r = useField(), i = useFieldSchema(), { render: a } = useSchemaInitializerRender(i["x-initializer"], i["x-initializer-props"]), l = useCallback((x) => a(x), []), c = r.address.toString(), u = useRowProperties(), { setPrintContent: d } = useFormBlockContext(), { styles: p } = useStyles$j(), m = t === void 0 ? (i == null ? void 0 : i.parent["x-component"]) === "Page" || (i == null ? void 0 : i.parent["x-component"]) === "Tabs.TabPane" : t;
11265
+ const { distributed: t, showDivider: o = !0 } = e, n = useRef(null), r = useField(), i = useFieldSchema(), { render: a } = useSchemaInitializerRender(i["x-initializer"], i["x-initializer-props"]), l = useCallback((C) => a(C), []), c = r.address.toString(), u = useRowProperties(), { setPrintContent: d } = useFormBlockContext(), { styles: p } = useStyles$j(), { token: m } = theme.useToken(), { designable: h } = useDesignable(), x = t === void 0 ? (i == null ? void 0 : i.parent["x-component"]) === "Page" || (i == null ? void 0 : i.parent["x-component"]) === "Tabs.TabPane" : t;
11261
11266
  useEffect(() => {
11262
11267
  n.current && (d == null || d(n.current));
11263
11268
  }, [n.current]);
11264
- const h = useMemo(() => ({
11269
+ const f = useMemo(() => ({
11265
11270
  ref: n,
11266
11271
  fieldSchema: i,
11267
11272
  renderSchemaInitializer: a,
11268
11273
  InitializerComponent: l,
11269
11274
  showDivider: o
11270
11275
  }), [i, a, l, o]);
11271
- return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: h, children: /* @__PURE__ */ jsx("div", { className: `nb-grid ${p.container}`, style: { position: "relative" }, ref: n, children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11272
- /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
11273
- o ? /* @__PURE__ */ jsx(
11274
- RowDivider,
11275
- {
11276
- rows: u,
11277
- first: !0,
11278
- id: `${c}_0`,
11279
- data: {
11280
- breakRemoveOn: breakRemoveOnGrid,
11281
- wrapSchema: wrapRowSchema,
11282
- insertAdjacent: "afterBegin",
11283
- schema: i
11284
- }
11285
- }
11286
- ) : null,
11287
- u.map((x, f) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11288
- m ? /* @__PURE__ */ jsx(SchemaComponent, { name: x.name, schema: x, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: x.name, schema: x }),
11289
- o ? /* @__PURE__ */ jsx(
11290
- RowDivider,
11291
- {
11292
- rows: u,
11293
- index: f,
11294
- id: `${c}_${f + 1}`,
11295
- data: {
11296
- breakRemoveOn: breakRemoveOnGrid,
11297
- wrapSchema: wrapRowSchema,
11298
- insertAdjacent: "afterEnd",
11299
- schema: x
11276
+ return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: f, children: /* @__PURE__ */ jsx(
11277
+ "div",
11278
+ {
11279
+ className: cls(
11280
+ `nb-grid ${p.container}`,
11281
+ css`
11282
+ & {
11283
+ margin-bottom: ${h ? 0 : -m.marginLG}px;
11284
+ }
11285
+ `
11286
+ ),
11287
+ style: { position: "relative" },
11288
+ ref: n,
11289
+ children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11290
+ /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
11291
+ o ? /* @__PURE__ */ jsx(
11292
+ RowDivider,
11293
+ {
11294
+ rows: u,
11295
+ first: !0,
11296
+ id: `${c}_0`,
11297
+ data: {
11298
+ breakRemoveOn: breakRemoveOnGrid,
11299
+ wrapSchema: wrapRowSchema,
11300
+ insertAdjacent: "afterBegin",
11301
+ schema: i
11302
+ }
11300
11303
  }
11301
- }
11302
- ) : null
11303
- ] }, f))
11304
- ] }),
11305
- a()
11306
- ] }) }) }) });
11304
+ ) : null,
11305
+ u.map((C, S) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11306
+ x ? /* @__PURE__ */ jsx(SchemaComponent, { name: C.name, schema: C, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: C.name, schema: C }),
11307
+ o ? /* @__PURE__ */ jsx(
11308
+ RowDivider,
11309
+ {
11310
+ rows: u,
11311
+ index: S,
11312
+ id: `${c}_${S + 1}`,
11313
+ data: {
11314
+ breakRemoveOn: breakRemoveOnGrid,
11315
+ wrapSchema: wrapRowSchema,
11316
+ insertAdjacent: "afterEnd",
11317
+ schema: C
11318
+ }
11319
+ }
11320
+ ) : null
11321
+ ] }, S))
11322
+ ] }),
11323
+ a()
11324
+ ] })
11325
+ }
11326
+ ) }) });
11307
11327
  },
11308
11328
  { displayName: "Grid" }
11309
11329
  );
@@ -11460,13 +11480,13 @@ const useGetAriaLabelOfDesigner = () => {
11460
11480
  {
11461
11481
  title: e("Column width"),
11462
11482
  component: React.forwardRef((r, i) => {
11463
- const d = r, { children: a, onClick: l } = d, c = H(d, ["children", "onClick"]), { setVisible: u } = useSchemaInitializer();
11483
+ const u = r, { children: a, onClick: l } = u, c = H(u, ["children", "onClick"]);
11464
11484
  return /* @__PURE__ */ jsx(
11465
11485
  SchemaInitializerItem,
11466
11486
  F(g({
11467
11487
  ref: i,
11468
- onClick: ({ event: p }) => {
11469
- u(!1), l(p);
11488
+ onClick: ({ event: d }) => {
11489
+ l(d);
11470
11490
  }
11471
11491
  }, c), {
11472
11492
  title: e("Column width")
@@ -11920,7 +11940,7 @@ const DataBlockInitializer = (e) => {
11920
11940
  o && o({ item: k, fromOthersInPopup: D });
11921
11941
  v(!1);
11922
11942
  }),
11923
- [A, y, o, f, v, t]
11943
+ [A, y, v, o, f, t]
11924
11944
  ), w = h || // eslint-disable-next-line react-hooks/rules-of-hooks
11925
11945
  useCollectionDataSourceItems({
11926
11946
  componentName: n,
@@ -12503,29 +12523,11 @@ const useStyles$i = createStyles(({ css: e, token: t }) => e`
12503
12523
  }
12504
12524
  `), BlockItem = withDynamicSchemaProps(
12505
12525
  (e) => {
12506
- const { className: t, children: o } = useProps(e), { styles: n } = useStyles$i(), r = useFieldSchema(), { render: i } = useSchemaToolbarRender(r), { getAriaLabel: a } = useGetAriaLabelOfBlockItem(e.name), { token: l } = theme.useToken(), { designable: c } = useDesignable(), u = useMemo(() => a(), [a]);
12507
- return /* @__PURE__ */ jsxs(
12508
- SortableItem,
12509
- {
12510
- role: "button",
12511
- "aria-label": u,
12512
- className: cls(
12513
- "nb-block-item",
12514
- t,
12515
- n,
12516
- css`
12517
- margin-bottom: ${c ? l.marginLG : 0}px !important;
12518
- .ant-card {
12519
- margin-bottom: ${c ? l.marginLG : 0}px !important;
12520
- }
12521
- `
12522
- ),
12523
- children: [
12524
- i(),
12525
- /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onError: (d) => console.log(d), children: o })
12526
- ]
12527
- }
12528
- );
12526
+ const { className: t, children: o } = useProps(e), { styles: n } = useStyles$i(), r = useFieldSchema(), { render: i } = useSchemaToolbarRender(r), { getAriaLabel: a } = useGetAriaLabelOfBlockItem(e.name), l = useMemo(() => a(), [a]);
12527
+ return /* @__PURE__ */ jsxs(SortableItem, { role: "button", "aria-label": l, className: cls("nb-block-item", t, n), children: [
12528
+ i(),
12529
+ /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onError: (c) => console.log(c), children: o })
12530
+ ] });
12529
12531
  },
12530
12532
  { displayName: "BlockItem" }
12531
12533
  ), TestDesigner = () => {
@@ -21361,8 +21363,8 @@ const ActionLink = withDynamicSchemaProps(
21361
21363
  };
21362
21364
  }, handleError = (e) => console.log(e), Action = withDynamicSchemaProps(
21363
21365
  observer$1((e) => {
21364
- var he, ge, xe, Z, te;
21365
- const me = useProps(e), {
21366
+ var ge, xe, fe, Z, te;
21367
+ const he = useProps(e), {
21366
21368
  popover: t,
21367
21369
  confirm: o,
21368
21370
  openMode: n,
@@ -21381,7 +21383,7 @@ const ActionLink = withDynamicSchemaProps(
21381
21383
  addChild: C,
21382
21384
  onMouseEnter: S,
21383
21385
  refreshDataBlockRequest: b
21384
- } = me, y = H(me, [
21386
+ } = he, y = H(he, [
21385
21387
  "popover",
21386
21388
  "confirm",
21387
21389
  "openMode",
@@ -21401,7 +21403,7 @@ const ActionLink = withDynamicSchemaProps(
21401
21403
  "addChild",
21402
21404
  "onMouseEnter",
21403
21405
  "refreshDataBlockRequest"
21404
- ]), v = useACLActionParamsContext(), { wrapSSR: I, componentCls: A, hashId: T } = useStyles$d(), { t: w } = useTranslation(), [M, $] = useState(!1), [E, z] = useState(!1), O = useDesigner(), R = useField(), { run: j, element: B, disabled: k } = a(f), D = useFieldSchema(), N = useCompile(), q = useForm(), L = useCollectionRecordData(), G = useCollectionParentRecordData(), U = useCollection(), K = D["x-toolbar-props"] || D["x-designer-props"], Y = (he = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : he.openMode, W = (ge = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : ge.openSize, X = (xe = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : xe.refreshDataBlockRequest, Q = q.disabled || R.disabled || ((Z = R.data) == null ? void 0 : Z.disabled) || x || k, J = useMemo(() => (D == null ? void 0 : D["x-linkage-rules"]) || [], [D == null ? void 0 : D["x-linkage-rules"]]), { designable: oe } = useDesignable(), ne = useComponent(i) || i, { modal: re } = App.useApp(), ie = useVariables(), le = useLocalVariables({ currentForm: { values: L } }), { getAriaLabel: Fe } = useGetAriaLabelOfAction(u), ce = useDataBlockRequest(), ue = useMemo(() => {
21406
+ ]), v = useACLActionParamsContext(), { wrapSSR: I, componentCls: A, hashId: T } = useStyles$d(), { t: w } = useTranslation(), [M, $] = useState(!1), [E, z] = useState(!1), O = useDesigner(), R = useField(), { run: j, element: B, disabled: k } = a(f), D = useFieldSchema(), N = useCompile(), q = useForm(), L = useCollectionRecordData(), G = useCollectionParentRecordData(), U = useCollection(), K = D["x-toolbar-props"] || D["x-designer-props"], Y = (ge = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : ge.openMode, W = (xe = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : xe.openSize, X = (fe = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : fe.refreshDataBlockRequest, Q = q.disabled || R.disabled || ((Z = R.data) == null ? void 0 : Z.disabled) || x || k, J = useMemo(() => (D == null ? void 0 : D["x-linkage-rules"]) || [], [D == null ? void 0 : D["x-linkage-rules"]]), { designable: oe } = useDesignable(), ne = useComponent(i) || i, { modal: re } = App.useApp(), ie = useVariables(), le = useLocalVariables({ currentForm: { values: L } }), { getAriaLabel: Pe } = useGetAriaLabelOfAction(u), ce = useDataBlockRequest(), de = useMemo(() => {
21405
21407
  const ee = u || N(D.title);
21406
21408
  return _.isString(ee) ? w(ee) : ee;
21407
21409
  }, [u, D.title, w]);
@@ -21419,60 +21421,60 @@ const ActionLink = withDynamicSchemaProps(
21419
21421
  });
21420
21422
  });
21421
21423
  }, [R, J, le, ie]);
21422
- const Pe = useCallback(
21423
- (ee) => {
21424
- if (!isPortalInBody(ee.target) && (ee.preventDefault(), ee.stopPropagation(), !Q && v)) {
21425
- const se = () => {
21424
+ const Ie = useCallback(
21425
+ (ee, se = !0) => {
21426
+ if (!(se && isPortalInBody(ee.target)) && (ee.preventDefault(), ee.stopPropagation(), !Q && v)) {
21427
+ const ae = () => {
21426
21428
  d ? d(ee, () => {
21427
- var ae;
21428
- X !== !1 && ((ae = ce == null ? void 0 : ce.refresh) == null || ae.call(ce));
21429
+ var ue;
21430
+ X !== !1 && ((ue = ce == null ? void 0 : ce.refresh) == null || ue.call(ce));
21429
21431
  }) : ($(!0), j());
21430
21432
  };
21431
21433
  o != null && o.content ? re.confirm({
21432
- title: w(o.title, { title: ue }),
21433
- content: w(o.content, { title: ue }),
21434
- onOk: se
21435
- }) : se();
21434
+ title: w(o.title, { title: de }),
21435
+ content: w(o.content, { title: de }),
21436
+ onOk: ae
21437
+ }) : ae();
21436
21438
  }
21437
21439
  },
21438
21440
  [o, Q, re, d, j]
21439
- ), Se = useMemo(() => {
21441
+ ), be = useMemo(() => {
21440
21442
  var ee;
21441
21443
  return F(g({}, p), {
21442
21444
  opacity: oe && (((ee = R == null ? void 0 : R.data) == null ? void 0 : ee.hidden) || !v) && 0.1
21443
21445
  });
21444
- }, [oe, (te = R == null ? void 0 : R.data) == null ? void 0 : te.hidden, p]), Ie = useCallback(
21446
+ }, [oe, (te = R == null ? void 0 : R.data) == null ? void 0 : te.hidden, p]), Ae = useCallback(
21445
21447
  (ee) => {
21446
21448
  S == null || S(ee);
21447
21449
  },
21448
21450
  [S]
21449
- ), de = () => {
21451
+ ), pe = () => {
21450
21452
  var ee, se;
21451
21453
  return !oe && ((ee = R == null ? void 0 : R.data) != null && ee.hidden || !v) ? null : /* @__PURE__ */ jsxs(
21452
21454
  SortableItem,
21453
21455
  F(g({
21454
21456
  role: "button",
21455
- "aria-label": Fe()
21457
+ "aria-label": Pe()
21456
21458
  }, y), {
21457
- onMouseEnter: Ie,
21459
+ onMouseEnter: Ae,
21458
21460
  loading: ((se = R == null ? void 0 : R.data) == null ? void 0 : se.loading) || m,
21459
- icon: c ? /* @__PURE__ */ jsx(Icon, { type: c }) : null,
21461
+ icon: typeof c == "string" ? /* @__PURE__ */ jsx(Icon, { type: c }) : c,
21460
21462
  disabled: Q,
21461
- style: Se,
21462
- onClick: Pe,
21463
+ style: be,
21464
+ onClick: Ie,
21463
21465
  component: ne || Button,
21464
21466
  className: cls(A, T, l, "nb-action"),
21465
21467
  type: e.type === "danger" ? void 0 : e.type,
21466
21468
  children: [
21467
- ue,
21469
+ de,
21468
21470
  /* @__PURE__ */ jsx(O, g({}, K))
21469
21471
  ]
21470
21472
  })
21471
21473
  );
21472
- }, be = de(), pe = /* @__PURE__ */ jsxs(
21474
+ }, ye = pe(), me = /* @__PURE__ */ jsxs(
21473
21475
  ActionContextProvider,
21474
21476
  {
21475
- button: be,
21477
+ button: ye,
21476
21478
  visible: M,
21477
21479
  setVisible: $,
21478
21480
  formValueChanged: E,
@@ -21483,7 +21485,7 @@ const ActionLink = withDynamicSchemaProps(
21483
21485
  fieldSchema: D,
21484
21486
  children: [
21485
21487
  t && /* @__PURE__ */ jsx(RecursionField, { basePath: R.address, onlyRenderProperties: !0, schema: D }),
21486
- !t && de(),
21488
+ !t && pe(),
21487
21489
  /* @__PURE__ */ jsx(
21488
21490
  DeclareVariable,
21489
21491
  {
@@ -21501,8 +21503,8 @@ const ActionLink = withDynamicSchemaProps(
21501
21503
  return I(
21502
21504
  C ? (
21503
21505
  // fix https://nocobase.height.app/T-3966
21504
- /* @__PURE__ */ jsx(RecordProvider, { record: null, parent: G, children: /* @__PURE__ */ jsx(TreeRecordProvider, { parent: L, children: pe }) })
21505
- ) : pe
21506
+ /* @__PURE__ */ jsx(RecordProvider, { record: null, parent: G, children: /* @__PURE__ */ jsx(TreeRecordProvider, { parent: L, children: me }) })
21507
+ ) : me
21506
21508
  );
21507
21509
  }),
21508
21510
  { displayName: "Action" }
@@ -21555,34 +21557,34 @@ const Action$1 = Action, ActionBarContext = React.createContext({
21555
21557
  return /* @__PURE__ */ jsx(Fragment, { children: o && n.includes(t.parent["x-component"]) ? createPortal(e.children, o) : e.children });
21556
21558
  }, ActionBar = withDynamicSchemaProps(
21557
21559
  observer$1((e) => {
21558
- var p;
21559
- const { forceProps: t = {} } = useActionBarContext(), d = g(g({}, useProps(e)), t), { layout: o = "two-columns", style: n, spaceProps: r } = d, i = H(d, ["layout", "style", "spaceProps"]), a = useFieldSchema(), { render: l } = useSchemaInitializerRender(a["x-initializer"], a["x-initializer-props"]), { designable: c } = useDesignable();
21560
- if (o === "one-column")
21560
+ var m;
21561
+ const { forceProps: t = {} } = useActionBarContext(), { token: o } = theme.useToken(), p = g(g({}, useProps(e)), t), { layout: n = "two-columns", style: r, spaceProps: i } = p, a = H(p, ["layout", "style", "spaceProps"]), l = useFieldSchema(), { render: c } = useSchemaInitializerRender(l["x-initializer"], l["x-initializer-props"]), { designable: u } = useDesignable();
21562
+ if (n === "one-column")
21561
21563
  return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsxs(
21562
21564
  "div",
21563
21565
  F(g({
21564
- style: g({ display: "flex", alignItems: "center", gap: 8 }, n)
21565
- }, i), {
21566
- className: cx(i.className, "nb-action-bar"),
21566
+ style: F(g({ display: "flex", alignItems: "center", gap: 8 }, r), { marginTop: o.marginLG })
21567
+ }, a), {
21568
+ className: cx(a.className, "nb-action-bar"),
21567
21569
  children: [
21568
- e.children && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Space$1, F(g({}, r), { style: { flexWrap: "wrap" }, children: a.mapProperties((m, h) => /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) })) }),
21569
- l({ style: { margin: "0 !important" } })
21570
+ e.children && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Space$1, F(g({}, i), { style: { flexWrap: "wrap" }, children: l.mapProperties((h, x) => /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) })) }),
21571
+ c({ style: { margin: "0 !important" } })
21570
21572
  ]
21571
21573
  })
21572
21574
  ) }) });
21573
- const u = Object.keys((p = a.properties) != null ? p : {}).length > 0;
21575
+ const d = Object.keys((m = l.properties) != null ? m : {}).length > 0;
21574
21576
  return /* @__PURE__ */ jsxs(
21575
21577
  "div",
21576
21578
  F(g({
21577
- style: !c && !u ? void 0 : g({
21579
+ style: !u && !d ? void 0 : g({
21578
21580
  display: "flex",
21579
21581
  justifyContent: "space-between",
21580
21582
  alignItems: "center",
21581
21583
  overflowX: "auto",
21582
21584
  flexShrink: 0
21583
- }, n)
21584
- }, i), {
21585
- className: cx(i.className, "nb-action-bar"),
21585
+ }, r)
21586
+ }, a), {
21587
+ className: cx(a.className, "nb-action-bar"),
21586
21588
  children: [
21587
21589
  /* @__PURE__ */ jsx(
21588
21590
  "div",
@@ -21596,12 +21598,12 @@ const Action$1 = Action, ActionBarContext = React.createContext({
21596
21598
  flexWrap: "wrap"
21597
21599
  },
21598
21600
  children: /* @__PURE__ */ jsxs(DndContext, { children: [
21599
- /* @__PURE__ */ jsx(Space$1, F(g({}, r), { children: a.mapProperties((m, h) => m["x-align"] !== "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) })),
21600
- /* @__PURE__ */ jsx(Space$1, F(g({}, r), { style: { flexWrap: "wrap" }, children: a.mapProperties((m, h) => m["x-align"] === "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) }))
21601
+ /* @__PURE__ */ jsx(Space$1, F(g({}, i), { children: l.mapProperties((h, x) => h["x-align"] !== "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) })),
21602
+ /* @__PURE__ */ jsx(Space$1, F(g({}, i), { style: { flexWrap: "wrap" }, children: l.mapProperties((h, x) => h["x-align"] === "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) }))
21601
21603
  ] })
21602
21604
  }
21603
21605
  ),
21604
- l()
21606
+ c()
21605
21607
  ]
21606
21608
  })
21607
21609
  );
@@ -29618,9 +29620,9 @@ function fetchTemplateData(e, t, o) {
29618
29620
  });
29619
29621
  }
29620
29622
  const useFormBlockHeight = () => {
29621
- var y;
29622
- 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((v, I) => I["x-component"] === "ActionBar" ? I : v), u = ((y = t.parent) == null ? void 0 : y["x-decorator"]) === "FilterFormBlockProvider", p = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0 || n ? o.controlHeight + (u ? o.marginLG : 2 * o.marginLG) : u ? o.marginLG : 2 * o.marginLG, m = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, { data: h } = useDataBlockRequest() || {}, { count: x, pageSize: f } = (h == null ? void 0 : h.meta) || {}, S = x > f ? o.controlHeightSM + o.paddingLG : 0, b = a && l ? o.controlHeight + 2 * o.padding + o.margin : 0;
29623
- return e - p - o.paddingLG - m - S - b;
29623
+ var I, A;
29624
+ 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((T, w) => w["x-component"] === "ActionBar" ? w : T), u = ((I = t.parent) == null ? void 0 : I["x-decorator"]) === "FilterFormBlockProvider", d = ((A = t.parent) == null ? void 0 : A["x-decorator"]) === "DetailsBlockProvider", h = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0 || n ? o.controlHeight + (u || !d ? (n ? 2 : 1) * o.marginLG : 2 * o.marginLG) : o.marginLG, x = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, { data: f } = useDataBlockRequest() || {}, { count: C, pageSize: S } = (f == null ? void 0 : f.meta) || {}, y = C > S ? o.controlHeightSM + (n ? 1 : 0) * o.paddingLG : 0, v = a && l ? o.controlHeight + 2 * o.padding + o.margin : 0;
29625
+ return e - h - o.paddingLG - x - y - v;
29624
29626
  }, FormComponent = (e) => {
29625
29627
  const u = e, { form: t, children: o } = u, n = H(u, ["form", "children"]), r = useField(), i = useFieldSchema(), a = useAttach(t.createVoidField(F(g({}, r.props), { basePath: "" }))), l = useFormBlockHeight(), { token: c } = theme.useToken();
29626
29628
  return /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, F(g({ layout: "vertical" }, n), { children: /* @__PURE__ */ jsx(
@@ -31652,9 +31654,9 @@ function Uploader(o) {
31652
31654
  var n = o, { rules: e } = n, t = H(n, ["rules"]);
31653
31655
  const { disabled: r, multiple: i, value: a, onChange: l } = t, [c, u] = useState([]), { t: d } = useTranslation(), { componentCls: p } = useStyles$a(), m = useField(), h = useUploadProps(t), x = useBeforeUpload(e);
31654
31656
  useEffect(() => {
31655
- c.find((A) => A.status === "error") ? m.setFeedback({
31657
+ c.length ? m.setFeedback({
31656
31658
  type: "error",
31657
- code: "UploadError",
31659
+ code: "ValidateError",
31658
31660
  messages: [d("Incomplete uploading files need to be resolved")]
31659
31661
  }) : m.setFeedback({});
31660
31662
  }, [m, c]);
@@ -33329,8 +33331,8 @@ const useTableColumns$1 = (e) => {
33329
33331
  }
33330
33332
  `, HeaderWrapperComponent = (e) => /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsx("thead", g({}, e)) }), HeaderCellComponent = (e) => /* @__PURE__ */ jsx("th", F(g({}, e), { className: cls(e.className, headerClass) })), BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, g({}, e)), Table$1 = withDynamicSchemaProps(
33331
33333
  observer$1((e) => {
33332
- var me, he, ge, xe;
33333
- const { token: t } = useToken(), de = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = de, r = H(de, ["pagination", "useProps"]), be = (n == null ? void 0 : n()) || {}, { pagination: i } = be, a = H(be, ["pagination"]), pe = g(g({}, r), a), {
33334
+ var he, ge, xe, fe;
33335
+ const { token: t } = useToken(), pe = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = pe, r = H(pe, ["pagination", "useProps"]), ye = (n == null ? void 0 : n()) || {}, { pagination: i } = ye, a = H(ye, ["pagination"]), me = g(g({}, r), a), {
33334
33336
  dragSort: l = !1,
33335
33337
  showIndex: c = !0,
33336
33338
  onRowSelectionChange: u,
@@ -33341,7 +33343,7 @@ const useTableColumns$1 = (e) => {
33341
33343
  onExpand: x,
33342
33344
  loading: f,
33343
33345
  onClickRow: C
33344
- } = pe, S = H(pe, [
33346
+ } = me, S = H(me, [
33345
33347
  "dragSort",
33346
33348
  "showIndex",
33347
33349
  "onRowSelectionChange",
@@ -33352,8 +33354,8 @@ const useTableColumns$1 = (e) => {
33352
33354
  "onExpand",
33353
33355
  "loading",
33354
33356
  "onClickRow"
33355
- ]), b = useArrayField(S), y = useTableColumns$1(S), v = useFieldSchema(), I = useCollection(), T = ((me = v == null ? void 0 : v.parent) == null ? void 0 : me["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: w, allIncludesChildren: M } = T, $ = useMemoizedFn(S.onRowDragEnd || (() => {
33356
- })), E = usePaginationProps$1(o, i), [z, O] = useState(() => w ? M : []), [R, j] = useState(((he = b == null ? void 0 : b.data) == null ? void 0 : he.selectedRowKeys) || []), [B, k] = useState([]), D = (p == null ? void 0 : p.type) !== "none", N = useRef(/* @__PURE__ */ new Map()), q = useMemo(() => css`
33357
+ ]), b = useArrayField(S), y = useTableColumns$1(S), v = useFieldSchema(), I = useCollection(), T = ((he = v == null ? void 0 : v.parent) == null ? void 0 : he["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: w, allIncludesChildren: M } = T, $ = useMemoizedFn(S.onRowDragEnd || (() => {
33358
+ })), E = usePaginationProps$1(o, i), [z, O] = useState(() => w ? M : []), [R, j] = useState(((ge = b == null ? void 0 : b.data) == null ? void 0 : ge.selectedRowKeys) || []), [B, k] = useState([]), D = (p == null ? void 0 : p.type) !== "none", N = useRef(/* @__PURE__ */ new Map()), q = useMemo(() => css`
33357
33359
  & > td {
33358
33360
  background-color: ${t.controlItemBgActiveHover} !important;
33359
33361
  }
@@ -33385,20 +33387,20 @@ const useTableColumns$1 = (e) => {
33385
33387
  return typeof m == "string" ? (te = Z[m]) == null ? void 0 : te.toString() : (ee = (m != null ? m : U)(Z)) == null ? void 0 : ee.toString();
33386
33388
  },
33387
33389
  [m, U]
33388
- ), Y = (ge = b == null ? void 0 : b.value) == null ? void 0 : ge.map(K), W = useMemo(() => Y, [JSON.stringify(Y)]), X = useMemo(
33390
+ ), Y = (xe = b == null ? void 0 : b.value) == null ? void 0 : xe.map(K), W = useMemo(() => Y, [JSON.stringify(Y)]), X = useMemo(
33389
33391
  () => [...(b == null ? void 0 : b.value) || []].filter(Boolean),
33390
- [b == null ? void 0 : b.value, (xe = b == null ? void 0 : b.value) == null ? void 0 : xe.length, W]
33392
+ [b == null ? void 0 : b.value, (fe = b == null ? void 0 : b.value) == null ? void 0 : fe.length, W]
33391
33393
  ), Q = useMemo(() => (Z) => /* @__PURE__ */ jsx(
33392
33394
  DndContext,
33393
33395
  {
33394
33396
  onDragEnd: (te) => {
33395
- var fe, Ce, Te, we, Re, De;
33397
+ var Ce, Se, Te, we, Re, De;
33396
33398
  if (!te.active || !te.over) {
33397
33399
  console.warn("move cancel");
33398
33400
  return;
33399
33401
  }
33400
- const ee = (Te = (Ce = (fe = te.active) == null ? void 0 : fe.data.current) == null ? void 0 : Ce.sortable) == null ? void 0 : Te.index, se = (De = (Re = (we = te.over) == null ? void 0 : we.data.current) == null ? void 0 : Re.sortable) == null ? void 0 : De.index, ae = b.value[ee] || te.active, Ae = b.value[se] || te.over;
33401
- b.move(ee, se), $({ from: ae, to: Ae });
33402
+ const ee = (Te = (Se = (Ce = te.active) == null ? void 0 : Ce.data.current) == null ? void 0 : Se.sortable) == null ? void 0 : Te.index, se = (De = (Re = (we = te.over) == null ? void 0 : we.data.current) == null ? void 0 : Re.sortable) == null ? void 0 : De.index, ae = b.value[ee] || te.active, ue = b.value[se] || te.over;
33403
+ b.move(ee, se), $({ from: ae, to: ue });
33402
33404
  },
33403
33405
  children: /* @__PURE__ */ jsx("tbody", g({}, Z))
33404
33406
  }
@@ -33438,11 +33440,11 @@ const useTableColumns$1 = (e) => {
33438
33440
  };
33439
33441
  },
33440
33442
  renderCell: (Z, te, ee, se) => {
33441
- var fe, Ce;
33443
+ var Ce, Se;
33442
33444
  if (!l && !c)
33443
33445
  return se;
33444
- const ae = (fe = e == null ? void 0 : e.pagination) == null ? void 0 : fe.current, Ae = ((Ce = e == null ? void 0 : e.pagination) == null ? void 0 : Ce.pageSize) || 20;
33445
- return ae ? ee = ee + (ae - 1) * Ae + 1 : ee = ee + 1, te.__index && (ee = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
33446
+ const ae = (Ce = e == null ? void 0 : e.pagination) == null ? void 0 : Ce.current, ue = ((Se = e == null ? void 0 : e.pagination) == null ? void 0 : Se.pageSize) || 20;
33447
+ return ae ? ee = ee + (ae - 1) * ue + 1 : ee = ee + 1, te.__index && (ee = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
33446
33448
  "div",
33447
33449
  {
33448
33450
  role: "button",
@@ -33495,24 +33497,24 @@ const useTableColumns$1 = (e) => {
33495
33497
  ) : React.createElement(React.Fragment, {}, Z);
33496
33498
  },
33497
33499
  [b, l, K]
33498
- ), { height: le, tableSizeRefCallback: Fe } = useTableSize(), ce = useMemo(() => ({
33500
+ ), { height: le, tableSizeRefCallback: Pe } = useTableSize(), ce = useMemo(() => ({
33499
33501
  x: "max-content"
33500
- }), []), ue = useMemo(() => ({
33502
+ }), []), de = useMemo(() => ({
33501
33503
  x: "max-content",
33502
33504
  y: le
33503
- }), [le, ce]), Pe = useCallback(
33505
+ }), [le, ce]), Ie = useCallback(
33504
33506
  (Z) => B.includes(Z[m]) ? L : "",
33505
33507
  [B, L, m]
33506
- ), Se = useCallback(
33508
+ ), be = useCallback(
33507
33509
  (Z, te) => {
33508
33510
  const ee = Z ? [...z, te[I.getPrimaryKey()]] : z.filter((se) => te[I.getPrimaryKey()] !== se);
33509
33511
  O(ee), x == null || x(Z, te);
33510
33512
  },
33511
33513
  [z, x, I]
33512
- ), Ie = useMemo(() => ({
33513
- onExpand: Se,
33514
+ ), Ae = useMemo(() => ({
33515
+ onExpand: be,
33514
33516
  expandedRowKeys: z
33515
- }), [z, Se]);
33517
+ }), [z, be]);
33516
33518
  return /* @__PURE__ */ jsxs(
33517
33519
  "div",
33518
33520
  {
@@ -33542,7 +33544,7 @@ const useTableColumns$1 = (e) => {
33542
33544
  /* @__PURE__ */ jsx(ie, { children: /* @__PURE__ */ jsx(
33543
33545
  MemoizedAntdTable,
33544
33546
  F(g(g({
33545
- ref: Fe,
33547
+ ref: Pe,
33546
33548
  rowKey: m != null ? m : U,
33547
33549
  dataSource: X,
33548
33550
  tableLayout: "auto"
@@ -33552,10 +33554,10 @@ const useTableColumns$1 = (e) => {
33552
33554
  components: oe,
33553
33555
  onChange: d,
33554
33556
  onRow: G,
33555
- rowClassName: Pe,
33556
- scroll: ue,
33557
+ rowClassName: Ie,
33558
+ scroll: de,
33557
33559
  columns: y,
33558
- expandable: Ie
33560
+ expandable: Ae
33559
33561
  })
33560
33562
  ) }),
33561
33563
  b.errors.length > 0 && /* @__PURE__ */ jsx("div", { className: "ant-formily-item-error-help ant-formily-item-help ant-formily-item-help-enter ant-formily-item-help-enter-active", children: b.errors.map((Z) => Z.messages.map((te) => /* @__PURE__ */ jsx("div", { children: te }, te))) })
@@ -35432,12 +35434,12 @@ const InternalGridCardBlockProvider = (e) => {
35432
35434
  }, useGridCardActionBarProps = () => ({
35433
35435
  spaceProps: spaceProps$1
35434
35436
  }), useGridCardBodyHeight = () => {
35435
- var l;
35436
- const { token: e } = theme.useToken(), { designable: t } = useDesignable(), o = useDataBlockHeight(), n = useFieldSchema(), r = Object.keys(((l = n.parent.properties.actionBar) == null ? void 0 : l.properties) || {}).length > 0;
35437
+ var p;
35438
+ const { token: e } = theme.useToken(), { designable: t } = useDesignable(), o = useDataBlockHeight(), n = useFieldSchema(), r = Object.keys(((p = n.parent.properties.actionBar) == null ? void 0 : p.properties) || {}).length > 0, { data: i } = useDataBlockRequest() || {}, { count: a, pageSize: l } = (i == null ? void 0 : i.meta) || {}, c = a > l;
35437
35439
  if (!o)
35438
35440
  return;
35439
- const i = t || r ? e.controlHeight + 2 * e.paddingLG + e.marginLG : 0, a = e.controlHeight + 2 * e.paddingLG + e.marginLG;
35440
- return o - i - a;
35441
+ const u = t || r ? e.controlHeight + 2 * e.paddingLG + e.marginLG : 0, d = c ? e.controlHeight + 2 * e.paddingLG + e.marginLG : 0;
35442
+ return o - u - d;
35441
35443
  }, rowGutter = {
35442
35444
  md: 12,
35443
35445
  sm: 5,
@@ -35517,6 +35519,9 @@ const InternalGridCardBlockProvider = (e) => {
35517
35519
  height: ${m ? m + "px" : "100%"};
35518
35520
  overflow-y: ${m ? "auto" : null};
35519
35521
  overflow-x: clip;
35522
+ .nb-action-bar {
35523
+ margin-top: 0px !important;
35524
+ }
35520
35525
  }
35521
35526
  `
35522
35527
  ),
@@ -36003,7 +36008,7 @@ const InternalListBlockProvider = (e) => {
36003
36008
  css`
36004
36009
  .ant-spin-nested-loading {
36005
36010
  height: ${m ? m + "px" : "100%"};
36006
- overflow-y: auto;
36011
+ overflow-y: ${m ? "auto" : "null"};
36007
36012
  .ant-spin-container {
36008
36013
  width: 100%;
36009
36014
  overflow-x: clip;
@@ -36455,7 +36460,7 @@ const MarkdownEditor = (e) => {
36455
36460
  "div",
36456
36461
  {
36457
36462
  className: cls([o, n, "nb-markdown nb-markdown-default nb-markdown-table", i]),
36458
- style: F(g({}, e.style), { height: y || "100%", overflow: "auto" }),
36463
+ style: F(g({}, e.style), { height: y || "100%" }),
36459
36464
  dangerouslySetInnerHTML: { __html: h }
36460
36465
  }
36461
36466
  );
@@ -53478,7 +53483,10 @@ const createListBlockUISchema = (e) => {
53478
53483
  "x-component": "ActionBar",
53479
53484
  "x-use-component-props": "useListActionBarProps",
53480
53485
  "x-component-props": {
53481
- layout: "one-column"
53486
+ layout: "one-column",
53487
+ style: {
53488
+ marginTop: "var(--nb-spacing)"
53489
+ }
53482
53490
  }
53483
53491
  }
53484
53492
  }
@@ -55225,7 +55233,8 @@ const commonOptions$e = {
55225
55233
  "x-component-props": {
55226
55234
  layout: "one-column",
55227
55235
  style: {
55228
- float: "right"
55236
+ float: "right",
55237
+ marginTop: "var(--nb-spacing)"
55229
55238
  }
55230
55239
  }
55231
55240
  }