@nocobase/client 1.2.2-alpha → 1.2.3-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
@@ -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.3-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.3-alpha",
3927
+ "@nocobase/sdk": "1.2.3-alpha",
3928
+ "@nocobase/utils": "1.2.3-alpha",
3929
3929
  ahooks: "^3.7.2",
3930
3930
  antd: "^5.12.8",
3931
3931
  "antd-style": "3.4.5",
@@ -11257,53 +11257,68 @@ const ColDivider = (e) => {
11257
11257
  return useMemo(() => e.reduceProperties((t, o) => (o["x-component"] === "Grid.Col" && !o["x-hidden"] && t.push(o), t), []), [Object.keys(e.properties || {}).join(",")]);
11258
11258
  }, 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
11259
  (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;
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((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
11261
  useEffect(() => {
11262
11262
  n.current && (d == null || d(n.current));
11263
11263
  }, [n.current]);
11264
- const h = useMemo(() => ({
11264
+ const f = useMemo(() => ({
11265
11265
  ref: n,
11266
11266
  fieldSchema: i,
11267
11267
  renderSchemaInitializer: a,
11268
11268
  InitializerComponent: l,
11269
11269
  showDivider: o
11270
11270
  }), [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
11271
+ return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: f, children: /* @__PURE__ */ jsx(
11272
+ "div",
11273
+ {
11274
+ className: cls(
11275
+ `nb-grid ${p.container}`,
11276
+ css`
11277
+ & {
11278
+ margin-bottom: ${h ? 0 : -m.marginLG}px;
11279
+ }
11280
+ `
11281
+ ),
11282
+ style: { position: "relative" },
11283
+ ref: n,
11284
+ children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11285
+ /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
11286
+ o ? /* @__PURE__ */ jsx(
11287
+ RowDivider,
11288
+ {
11289
+ rows: u,
11290
+ first: !0,
11291
+ id: `${c}_0`,
11292
+ data: {
11293
+ breakRemoveOn: breakRemoveOnGrid,
11294
+ wrapSchema: wrapRowSchema,
11295
+ insertAdjacent: "afterBegin",
11296
+ schema: i
11297
+ }
11300
11298
  }
11301
- }
11302
- ) : null
11303
- ] }, f))
11304
- ] }),
11305
- a()
11306
- ] }) }) }) });
11299
+ ) : null,
11300
+ u.map((C, S) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11301
+ x ? /* @__PURE__ */ jsx(SchemaComponent, { name: C.name, schema: C, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: C.name, schema: C }),
11302
+ o ? /* @__PURE__ */ jsx(
11303
+ RowDivider,
11304
+ {
11305
+ rows: u,
11306
+ index: S,
11307
+ id: `${c}_${S + 1}`,
11308
+ data: {
11309
+ breakRemoveOn: breakRemoveOnGrid,
11310
+ wrapSchema: wrapRowSchema,
11311
+ insertAdjacent: "afterEnd",
11312
+ schema: C
11313
+ }
11314
+ }
11315
+ ) : null
11316
+ ] }, S))
11317
+ ] }),
11318
+ a()
11319
+ ] })
11320
+ }
11321
+ ) }) });
11307
11322
  },
11308
11323
  { displayName: "Grid" }
11309
11324
  );
@@ -12503,29 +12518,11 @@ const useStyles$i = createStyles(({ css: e, token: t }) => e`
12503
12518
  }
12504
12519
  `), BlockItem = withDynamicSchemaProps(
12505
12520
  (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
- );
12521
+ 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]);
12522
+ return /* @__PURE__ */ jsxs(SortableItem, { role: "button", "aria-label": l, className: cls("nb-block-item", t, n), children: [
12523
+ i(),
12524
+ /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onError: (c) => console.log(c), children: o })
12525
+ ] });
12529
12526
  },
12530
12527
  { displayName: "BlockItem" }
12531
12528
  ), TestDesigner = () => {
@@ -36455,7 +36452,7 @@ const MarkdownEditor = (e) => {
36455
36452
  "div",
36456
36453
  {
36457
36454
  className: cls([o, n, "nb-markdown nb-markdown-default nb-markdown-table", i]),
36458
- style: F(g({}, e.style), { height: y || "100%", overflow: "auto" }),
36455
+ style: F(g({}, e.style), { height: y || "100%" }),
36459
36456
  dangerouslySetInnerHTML: { __html: h }
36460
36457
  }
36461
36458
  );