@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 +62 -65
- package/lib/index.js +8 -9
- package/package.json +5 -5
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.
|
|
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.
|
|
3927
|
-
"@nocobase/sdk": "1.2.
|
|
3928
|
-
"@nocobase/utils": "1.2.
|
|
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((
|
|
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
|
|
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:
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
{
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
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
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
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),
|
|
12507
|
-
return /* @__PURE__ */ jsxs(
|
|
12508
|
-
|
|
12509
|
-
{
|
|
12510
|
-
|
|
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%"
|
|
36455
|
+
style: F(g({}, e.style), { height: y || "100%" }),
|
|
36459
36456
|
dangerouslySetInnerHTML: { __html: h }
|
|
36460
36457
|
}
|
|
36461
36458
|
);
|