@nocobase/client 1.3.34-beta → 1.3.36-beta
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 +26 -26
- package/es/schema-component/antd/upload/shared.d.ts +1 -0
- package/lib/index.js +14 -14
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -4125,7 +4125,7 @@ function addAppVersion(e, t) {
|
|
|
4125
4125
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4126
4126
|
}), e;
|
|
4127
4127
|
}
|
|
4128
|
-
const name = "@nocobase/client", version$1 = "1.3.
|
|
4128
|
+
const name = "@nocobase/client", version$1 = "1.3.36-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4129
4129
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4130
4130
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4131
4131
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4146,9 +4146,9 @@ const name = "@nocobase/client", version$1 = "1.3.34-beta", license = "AGPL-3.0"
|
|
|
4146
4146
|
"@formily/reactive-react": "^2.2.27",
|
|
4147
4147
|
"@formily/shared": "^2.2.27",
|
|
4148
4148
|
"@formily/validator": "^2.2.27",
|
|
4149
|
-
"@nocobase/evaluators": "1.3.
|
|
4150
|
-
"@nocobase/sdk": "1.3.
|
|
4151
|
-
"@nocobase/utils": "1.3.
|
|
4149
|
+
"@nocobase/evaluators": "1.3.36-beta",
|
|
4150
|
+
"@nocobase/sdk": "1.3.36-beta",
|
|
4151
|
+
"@nocobase/utils": "1.3.36-beta",
|
|
4152
4152
|
ahooks: "^3.7.2",
|
|
4153
4153
|
antd: "5.12.8",
|
|
4154
4154
|
"antd-style": "3.4.5",
|
|
@@ -13968,7 +13968,7 @@ Grid.Col = observer$1(
|
|
|
13968
13968
|
}
|
|
13969
13969
|
}), /* @__PURE__ */ jsx(GridColContext.Provider, { value: { cols: t, schema: n }, children: /* @__PURE__ */ jsx("div", { ref: c, style: g(g({}, a), p), className: cls("nb-grid-col"), children: e.children }) });
|
|
13970
13970
|
},
|
|
13971
|
-
{ displayName: "Grid.
|
|
13971
|
+
{ displayName: "Grid.Col" }
|
|
13972
13972
|
);
|
|
13973
13973
|
Grid.wrap = (e) => ({
|
|
13974
13974
|
type: "void",
|
|
@@ -36222,15 +36222,15 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
36222
36222
|
const n = e, { index: t } = n, o = W(n, ["index"]);
|
|
36223
36223
|
return /* @__PURE__ */ jsx("div", F(g({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t }));
|
|
36224
36224
|
}, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
|
|
36225
|
-
var x;
|
|
36225
|
+
var x, f;
|
|
36226
36226
|
const { t: o } = useTranslation(), n = useField(), { token: r } = useToken(), { data: i } = useDataBlockRequest() || {}, { meta: a } = i || {}, { hasNext: l } = a || {}, c = useMemo(
|
|
36227
36227
|
() => g(g({}, e), t),
|
|
36228
36228
|
[JSON.stringify(g(g({}, e), t))]
|
|
36229
36229
|
), { total: u, current: d, pageSize: p } = c || {}, m = useCallback(
|
|
36230
|
-
(
|
|
36230
|
+
(C) => o("Total {{count}} items", { count: C }),
|
|
36231
36231
|
[o, u]
|
|
36232
36232
|
), h = useMemo(() => {
|
|
36233
|
-
var
|
|
36233
|
+
var C;
|
|
36234
36234
|
return u ? g({
|
|
36235
36235
|
pageSizeOptions: pageSizeOptions$1,
|
|
36236
36236
|
showTotal: m,
|
|
@@ -36243,13 +36243,13 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
36243
36243
|
showSizeChanger: !0,
|
|
36244
36244
|
hideOnSinglePage: !1
|
|
36245
36245
|
}, c), {
|
|
36246
|
-
total: ((
|
|
36246
|
+
total: ((C = n.value) == null ? void 0 : C.length) < p || !l ? p * d : p * d + 1,
|
|
36247
36247
|
className: css`
|
|
36248
36248
|
.ant-pagination-simple-pager {
|
|
36249
36249
|
display: none !important;
|
|
36250
36250
|
}
|
|
36251
36251
|
`,
|
|
36252
|
-
itemRender: (
|
|
36252
|
+
itemRender: (S, b, v) => b === "prev" ? /* @__PURE__ */ jsxs(
|
|
36253
36253
|
"div",
|
|
36254
36254
|
{
|
|
36255
36255
|
style: { display: "flex" },
|
|
@@ -36259,15 +36259,15 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
36259
36259
|
}
|
|
36260
36260
|
`,
|
|
36261
36261
|
children: [
|
|
36262
|
-
|
|
36262
|
+
v,
|
|
36263
36263
|
" ",
|
|
36264
36264
|
/* @__PURE__ */ jsx("div", { style: { marginLeft: "7px" }, children: d })
|
|
36265
36265
|
]
|
|
36266
36266
|
}
|
|
36267
|
-
) :
|
|
36267
|
+
) : v
|
|
36268
36268
|
});
|
|
36269
36269
|
}, [c, o, m, (x = n.value) == null ? void 0 : x.length]);
|
|
36270
|
-
return t === !1 || !t && e === !1
|
|
36270
|
+
return t === !1 || !t && e === !1 ? !1 : ((f = n.value) == null ? void 0 : f.length) > 0 ? h : !1;
|
|
36271
36271
|
}, headerClass = css`
|
|
36272
36272
|
max-width: 300px;
|
|
36273
36273
|
white-space: nowrap;
|
|
@@ -38969,23 +38969,23 @@ const InternalListBlockProvider = (e) => {
|
|
|
38969
38969
|
const d = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, m = Object.keys(((x = t.parent.properties.actionBar) == null ? void 0 : x.properties) || {}).length > 0 || n ? o.controlHeight + 2 * o.marginLG : o.marginLG, h = u ? o.controlHeight + o.paddingLG + o.marginLG : o.marginLG;
|
|
38970
38970
|
return e - m - h - d;
|
|
38971
38971
|
}, InternalList = (e) => {
|
|
38972
|
-
var S, b;
|
|
38972
|
+
var S, b, v;
|
|
38973
38973
|
const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), i = useDesigner(), a = (S = t == null ? void 0 : t.data) == null ? void 0 : S.meta, l = useField(), [c] = useState(/* @__PURE__ */ new Map()), { wrapSSR: u, componentCls: d, hashId: p } = useStyles$5(), m = useListBlockHeight(), { token: h } = theme.useToken(), x = useCallback(
|
|
38974
|
-
(
|
|
38975
|
-
|
|
38974
|
+
(y) => (c.has(y) || c.set(
|
|
38975
|
+
y,
|
|
38976
38976
|
new Schema({
|
|
38977
38977
|
type: "object",
|
|
38978
38978
|
properties: {
|
|
38979
|
-
[
|
|
38979
|
+
[y]: r.properties.item
|
|
38980
38980
|
}
|
|
38981
38981
|
})
|
|
38982
|
-
), c.get(
|
|
38982
|
+
), c.get(y)),
|
|
38983
38983
|
[r.properties, c]
|
|
38984
38984
|
), f = [5, 10, 20, 50, 100, 200], C = useCallback(
|
|
38985
|
-
(
|
|
38985
|
+
(y, P) => {
|
|
38986
38986
|
o(F(g({}, n == null ? void 0 : n[0]), {
|
|
38987
|
-
page:
|
|
38988
|
-
pageSize:
|
|
38987
|
+
page: y,
|
|
38988
|
+
pageSize: P
|
|
38989
38989
|
}));
|
|
38990
38990
|
},
|
|
38991
38991
|
[o, n]
|
|
@@ -39020,7 +39020,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
39020
39020
|
/* @__PURE__ */ jsx("div", { className: "nb-list-container", children: /* @__PURE__ */ jsx(
|
|
39021
39021
|
List$1,
|
|
39022
39022
|
F(g({}, e), {
|
|
39023
|
-
pagination: !a ||
|
|
39023
|
+
pagination: !a || !((b = l.value) != null && b.length) ? !1 : {
|
|
39024
39024
|
onChange: C,
|
|
39025
39025
|
total: (a == null ? void 0 : a.count) || 0,
|
|
39026
39026
|
pageSize: (a == null ? void 0 : a.pageSize) || 10,
|
|
@@ -39029,15 +39029,15 @@ const InternalListBlockProvider = (e) => {
|
|
|
39029
39029
|
pageSizeOptions: f
|
|
39030
39030
|
},
|
|
39031
39031
|
loading: t == null ? void 0 : t.loading,
|
|
39032
|
-
children: (
|
|
39032
|
+
children: (v = l.value) != null && v.length ? l.value.map((y, P) => /* @__PURE__ */ jsx(
|
|
39033
39033
|
RecursionField,
|
|
39034
39034
|
{
|
|
39035
39035
|
basePath: l.address,
|
|
39036
|
-
name:
|
|
39036
|
+
name: P,
|
|
39037
39037
|
onlyRenderProperties: !0,
|
|
39038
|
-
schema: x(
|
|
39038
|
+
schema: x(P)
|
|
39039
39039
|
},
|
|
39040
|
-
|
|
39040
|
+
P
|
|
39041
39041
|
)) : null
|
|
39042
39042
|
})
|
|
39043
39043
|
) }),
|
|
@@ -86,4 +86,5 @@ export declare function toValueItem(file: any): any;
|
|
|
86
86
|
export declare const toItem: (file: any) => any;
|
|
87
87
|
export declare const toFileList: (fileList: any) => any[];
|
|
88
88
|
export declare const toValue: (fileList: any) => any[];
|
|
89
|
+
export declare function validate(file: any, rules: Record<string, any>): string;
|
|
89
90
|
export declare function useBeforeUpload(rules: any): (file: any) => boolean;
|