@nocobase/client 1.5.14 → 1.5.16
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 +72 -70
- package/lib/index.js +24 -27
- package/lib/locale/it-IT.js +861 -0
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -9033,7 +9033,8 @@ const genCommonStyle = (e, t) => {
|
|
|
9033
9033
|
}
|
|
9034
9034
|
},
|
|
9035
9035
|
[`${t}-item-content`]: {
|
|
9036
|
-
|
|
9036
|
+
// 相当于 Menu 的 iconMarginInlineEnd,参见:https://github.com/ant-design/ant-design/blob/6a62d9e7eaf3e683c673091e39fe65ba3204d94b/components/menu/style/index.ts#L942
|
|
9037
|
+
marginLeft: e.controlHeightSM - e.fontSize
|
|
9037
9038
|
}
|
|
9038
9039
|
};
|
|
9039
9040
|
}), SchemaInitializerContext = createContext({});
|
|
@@ -35211,7 +35212,7 @@ function addAppVersion(e, t) {
|
|
|
35211
35212
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
35212
35213
|
}), e;
|
|
35213
35214
|
}
|
|
35214
|
-
const name = "@nocobase/client", version = "1.5.
|
|
35215
|
+
const name = "@nocobase/client", version = "1.5.16", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
35215
35216
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
35216
35217
|
"@ant-design/cssinjs": "^1.11.1",
|
|
35217
35218
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -35233,9 +35234,9 @@ const name = "@nocobase/client", version = "1.5.14", license = "AGPL-3.0", main
|
|
|
35233
35234
|
"@formily/reactive-react": "^2.2.27",
|
|
35234
35235
|
"@formily/shared": "^2.2.27",
|
|
35235
35236
|
"@formily/validator": "^2.2.27",
|
|
35236
|
-
"@nocobase/evaluators": "1.5.
|
|
35237
|
-
"@nocobase/sdk": "1.5.
|
|
35238
|
-
"@nocobase/utils": "1.5.
|
|
35237
|
+
"@nocobase/evaluators": "1.5.16",
|
|
35238
|
+
"@nocobase/sdk": "1.5.16",
|
|
35239
|
+
"@nocobase/utils": "1.5.16",
|
|
35239
35240
|
ahooks: "^3.7.2",
|
|
35240
35241
|
antd: "5.12.8",
|
|
35241
35242
|
"antd-style": "3.7.1",
|
|
@@ -38779,7 +38780,7 @@ function Uploader(n) {
|
|
|
38779
38780
|
var M;
|
|
38780
38781
|
return c((M = B.response) == null ? void 0 : M.data);
|
|
38781
38782
|
})];
|
|
38782
|
-
z.length ? d(w) : (l == null || l([...a, ...w]), d([]));
|
|
38783
|
+
z.length ? d(w) : (l == null || l([...a || [], ...w]), d([]));
|
|
38783
38784
|
}
|
|
38784
38785
|
} else {
|
|
38785
38786
|
const $ = j.fileList.find((w) => w.uid === j.file.uid);
|
|
@@ -39421,32 +39422,34 @@ function transformNestedData(e) {
|
|
|
39421
39422
|
}
|
|
39422
39423
|
return e && n(e), t;
|
|
39423
39424
|
}
|
|
39424
|
-
const
|
|
39425
|
-
& .ant-formily-item-layout-vertical {
|
|
39426
|
-
margin-bottom: 10px;
|
|
39427
|
-
}
|
|
39428
|
-
.ant-card-body {
|
|
39429
|
-
padding: 15px 20px 5px;
|
|
39430
|
-
}
|
|
39431
|
-
.ant-divider-horizontal {
|
|
39432
|
-
margin: 10px 0;
|
|
39433
|
-
}
|
|
39434
|
-
`, InternalNesterCardCss = css`
|
|
39425
|
+
const InternalNesterCardCss = css`
|
|
39435
39426
|
.ant-card-bordered {
|
|
39436
39427
|
border: none;
|
|
39437
39428
|
}
|
|
39438
39429
|
.ant-card-body {
|
|
39439
|
-
padding: 0px 20px
|
|
39430
|
+
padding: 0px 20px 0px 0px;
|
|
39440
39431
|
}
|
|
39441
39432
|
`, InternalNester = observer$1(
|
|
39442
39433
|
() => {
|
|
39443
|
-
var
|
|
39444
|
-
const e = useField(), t = useFieldSchema(), n = useInsertSchema$1("Nester"), { options: o } = useAssociationFieldContext(), r = (
|
|
39434
|
+
var m, h;
|
|
39435
|
+
const e = useField(), t = useFieldSchema(), n = useInsertSchema$1("Nester"), { options: o } = useAssociationFieldContext(), r = (h = (m = t["x-decorator-props"]) == null ? void 0 : m.showTitle) != null ? h : !0, { actionName: i } = useACLActionParamsContext(), { token: a } = theme$1.useToken(), {
|
|
39445
39436
|
layout: l = "vertical",
|
|
39446
39437
|
labelAlign: c = "left",
|
|
39447
39438
|
labelWidth: u = 120,
|
|
39448
39439
|
labelWrap: d = !0
|
|
39449
|
-
} = (t == null ? void 0 : t["x-component-props"]) || {}
|
|
39440
|
+
} = (t == null ? void 0 : t["x-component-props"]) || {}, p = css`
|
|
39441
|
+
margin-top: 0.4em;
|
|
39442
|
+
|
|
39443
|
+
& .ant-formily-item-layout-vertical {
|
|
39444
|
+
margin-bottom: 10px;
|
|
39445
|
+
}
|
|
39446
|
+
.ant-card-body {
|
|
39447
|
+
padding: ${a.padding}px ${a.paddingLG}px;
|
|
39448
|
+
}
|
|
39449
|
+
.ant-divider-horizontal {
|
|
39450
|
+
margin: 10px 0;
|
|
39451
|
+
}
|
|
39452
|
+
`;
|
|
39450
39453
|
return useEffect(() => {
|
|
39451
39454
|
n(schema$1.Nester);
|
|
39452
39455
|
}, []), /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: o.target, children: /* @__PURE__ */ jsx(ACLCollectionProvider, { actionPath: `${o.target}:${i || "view"}`, children: /* @__PURE__ */ jsx(
|
|
@@ -39460,7 +39463,7 @@ const InternalNesterCss = css`
|
|
|
39460
39463
|
"div",
|
|
39461
39464
|
{
|
|
39462
39465
|
className: cx(
|
|
39463
|
-
|
|
39466
|
+
p,
|
|
39464
39467
|
{
|
|
39465
39468
|
[InternalNesterCardCss]: r === !1
|
|
39466
39469
|
},
|
|
@@ -39482,7 +39485,7 @@ const InternalNesterCss = css`
|
|
|
39482
39485
|
onlyRenderProperties: !0,
|
|
39483
39486
|
basePath: e.address,
|
|
39484
39487
|
schema: t,
|
|
39485
|
-
filterProperties: (
|
|
39488
|
+
filterProperties: (g) => g["x-component"] === "AssociationField.Nester"
|
|
39486
39489
|
}
|
|
39487
39490
|
)
|
|
39488
39491
|
}
|
|
@@ -42817,6 +42820,14 @@ const Block = observer$1(
|
|
|
42817
42820
|
const { componentCls: t } = e;
|
|
42818
42821
|
return {
|
|
42819
42822
|
[t]: {
|
|
42823
|
+
".nb-action-bar": {
|
|
42824
|
+
borderRadius: e.borderRadiusBlock,
|
|
42825
|
+
marginBottom: `${e.marginBlock / 2}px !important`
|
|
42826
|
+
},
|
|
42827
|
+
".ant-list-pagination": {
|
|
42828
|
+
borderRadius: e.borderRadiusBlock,
|
|
42829
|
+
marginTop: `${e.marginBlock / 2}px !important`
|
|
42830
|
+
},
|
|
42820
42831
|
"& > .nb-block-item": {
|
|
42821
42832
|
marginBottom: e.marginLG,
|
|
42822
42833
|
"& > .nb-action-bar:has(:first-child:not(:empty))": {
|
|
@@ -42867,15 +42878,10 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
42867
42878
|
`, gridCardCss = css`
|
|
42868
42879
|
height: 100%;
|
|
42869
42880
|
> .ant-card-body {
|
|
42870
|
-
padding: 24px 24px 0px;
|
|
42871
42881
|
height: 100%;
|
|
42872
|
-
button {
|
|
42873
|
-
margin-bottom: 0px !important;
|
|
42874
|
-
margin-top: 5px;
|
|
42875
|
-
}
|
|
42876
42882
|
}
|
|
42877
42883
|
.nb-action-bar {
|
|
42878
|
-
padding: 5px
|
|
42884
|
+
padding-top: 5px;
|
|
42879
42885
|
}
|
|
42880
42886
|
`, GridCardItem = withDynamicSchemaProps(
|
|
42881
42887
|
(e) => {
|
|
@@ -42895,10 +42901,6 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
42895
42901
|
return;
|
|
42896
42902
|
const u = t || r ? e.controlHeight + 2 * e.paddingLG + e.marginLG : 0, d = c ? e.controlHeight + 2 * e.paddingLG + e.marginLG : 0;
|
|
42897
42903
|
return n - u - d;
|
|
42898
|
-
}, rowGutter = {
|
|
42899
|
-
md: 12,
|
|
42900
|
-
sm: 5,
|
|
42901
|
-
xs: 5
|
|
42902
42904
|
}, designerCss$2 = css`
|
|
42903
42905
|
width: 100%;
|
|
42904
42906
|
&:hover {
|
|
@@ -42963,31 +42965,31 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
42963
42965
|
};
|
|
42964
42966
|
}, InternalGridCard = withSkeletonComponent(
|
|
42965
42967
|
(e) => {
|
|
42966
|
-
var
|
|
42967
|
-
const { columnCount: t, pagination: n } = useProps(e), { service: o, columnCount: r = defaultColumnCount } = useGridCardBlockContext(), i = t || r, { run: a, params: l } = o, c = (
|
|
42968
|
-
(
|
|
42968
|
+
var I;
|
|
42969
|
+
const { columnCount: t, pagination: n } = useProps(e), { service: o, columnCount: r = defaultColumnCount } = useGridCardBlockContext(), i = t || r, { run: a, params: l } = o, c = (I = o == null ? void 0 : o.data) == null ? void 0 : I.meta, u = useFieldSchema(), d = useField(), p = useDesigner(), m = useGridCardBodyHeight(), h = useCallback(
|
|
42970
|
+
(R) => new Schema({
|
|
42969
42971
|
type: "object",
|
|
42970
42972
|
properties: {
|
|
42971
|
-
[
|
|
42973
|
+
[R]: x({}, u.properties.item)
|
|
42972
42974
|
}
|
|
42973
42975
|
}),
|
|
42974
42976
|
[u.properties]
|
|
42975
|
-
), g = useCallback(
|
|
42976
|
-
(
|
|
42977
|
+
), { token: g } = useToken$1(), f = useCallback(
|
|
42978
|
+
(R, k) => {
|
|
42977
42979
|
a(P(x({}, l == null ? void 0 : l[0]), {
|
|
42978
|
-
page:
|
|
42979
|
-
pageSize:
|
|
42980
|
+
page: R,
|
|
42981
|
+
pageSize: k
|
|
42980
42982
|
}));
|
|
42981
42983
|
},
|
|
42982
42984
|
[a, l]
|
|
42983
|
-
),
|
|
42984
|
-
onChange:
|
|
42985
|
-
}),
|
|
42986
|
-
layout:
|
|
42987
|
-
labelAlign:
|
|
42988
|
-
labelWidth:
|
|
42989
|
-
labelWrap:
|
|
42990
|
-
} = (
|
|
42985
|
+
), C = P(x(x({}, usePaginationProps$1()), n), {
|
|
42986
|
+
onChange: f
|
|
42987
|
+
}), b = getCardItemSchema == null ? void 0 : getCardItemSchema(u), {
|
|
42988
|
+
layout: S = "vertical",
|
|
42989
|
+
labelAlign: y = "left",
|
|
42990
|
+
labelWidth: v = 120,
|
|
42991
|
+
labelWrap: F = !0
|
|
42992
|
+
} = (b == null ? void 0 : b["x-component-props"]) || {};
|
|
42991
42993
|
return /* @__PURE__ */ jsx(
|
|
42992
42994
|
SchemaComponentOptions,
|
|
42993
42995
|
{
|
|
@@ -43016,29 +43018,29 @@ const InternalGridCardBlockProvider = (e) => {
|
|
|
43016
43018
|
/* @__PURE__ */ jsx(
|
|
43017
43019
|
FormLayout,
|
|
43018
43020
|
{
|
|
43019
|
-
layout:
|
|
43020
|
-
labelAlign:
|
|
43021
|
-
labelWidth:
|
|
43022
|
-
labelWrap:
|
|
43021
|
+
layout: S,
|
|
43022
|
+
labelAlign: y,
|
|
43023
|
+
labelWidth: S === "horizontal" ? v : null,
|
|
43024
|
+
labelWrap: F,
|
|
43023
43025
|
children: /* @__PURE__ */ jsx(
|
|
43024
43026
|
List$1,
|
|
43025
43027
|
{
|
|
43026
|
-
pagination: !c || c.count <= c.pageSize ? !1 : x({},
|
|
43028
|
+
pagination: !c || c.count <= c.pageSize ? !1 : x({}, C),
|
|
43027
43029
|
dataSource: d.value,
|
|
43028
43030
|
grid: P(x({}, i), {
|
|
43029
43031
|
sm: i.xs,
|
|
43030
43032
|
xl: i.lg,
|
|
43031
|
-
gutter: [
|
|
43033
|
+
gutter: [g.marginBlock / 2, g.marginBlock / 2]
|
|
43032
43034
|
}),
|
|
43033
|
-
renderItem: (
|
|
43035
|
+
renderItem: (R, k) => /* @__PURE__ */ jsx(Col, { style: { height: "100%" }, className: "nb-card-item-warper", children: /* @__PURE__ */ jsx(
|
|
43034
43036
|
NocoBaseRecursionField,
|
|
43035
43037
|
{
|
|
43036
43038
|
basePath: d.address,
|
|
43037
|
-
name:
|
|
43039
|
+
name: k,
|
|
43038
43040
|
onlyRenderProperties: !0,
|
|
43039
|
-
schema: h(
|
|
43041
|
+
schema: h(k)
|
|
43040
43042
|
},
|
|
43041
|
-
|
|
43043
|
+
k
|
|
43042
43044
|
) }),
|
|
43043
43045
|
loading: o == null ? void 0 : o.loading
|
|
43044
43046
|
}
|
|
@@ -45914,9 +45916,9 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
45914
45916
|
};
|
|
45915
45917
|
}), ReactQuill = lazy(() => import("react-quill")), RichText = connect(
|
|
45916
45918
|
(e) => {
|
|
45917
|
-
const {
|
|
45919
|
+
const { wrapSSR: t, hashId: n, componentCls: o } = useStyles$2(), r = {
|
|
45918
45920
|
toolbar: [["bold", "italic", "underline", "link"], [{ list: "ordered" }, { list: "bullet" }], ["clean"]]
|
|
45919
|
-
},
|
|
45921
|
+
}, i = [
|
|
45920
45922
|
"header",
|
|
45921
45923
|
"bold",
|
|
45922
45924
|
"italic",
|
|
@@ -45928,19 +45930,19 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
45928
45930
|
"indent",
|
|
45929
45931
|
"link",
|
|
45930
45932
|
"image"
|
|
45931
|
-
], { value:
|
|
45932
|
-
return t
|
|
45933
|
+
], { value: a, defaultValue: l, onChange: c, disabled: u } = e, d = isVariable(a || l) ? void 0 : a || "";
|
|
45934
|
+
return t(
|
|
45933
45935
|
/* @__PURE__ */ jsx(
|
|
45934
45936
|
ReactQuill,
|
|
45935
45937
|
{
|
|
45936
|
-
className: `${
|
|
45937
|
-
modules:
|
|
45938
|
-
formats:
|
|
45939
|
-
value:
|
|
45940
|
-
onChange: (
|
|
45941
|
-
|
|
45938
|
+
className: `${o} ${n}`,
|
|
45939
|
+
modules: r,
|
|
45940
|
+
formats: i,
|
|
45941
|
+
value: d,
|
|
45942
|
+
onChange: (p) => {
|
|
45943
|
+
c(p === "<p><br></p>" ? void 0 : p);
|
|
45942
45944
|
},
|
|
45943
|
-
readOnly:
|
|
45945
|
+
readOnly: u
|
|
45944
45946
|
}
|
|
45945
45947
|
)
|
|
45946
45948
|
);
|