@nocobase/client 1.5.20 → 1.5.22
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 +38 -19
- package/lib/index.js +7 -4
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -58,7 +58,7 @@ import * as ahooks from "ahooks";
|
|
|
58
58
|
import { useSetState, useRequest as useRequest$1, useBoolean, useUpdate, useMemoizedFn, useDeepCompareEffect, useLocalStorageState, useEventListener, useCreation, useDebounce } from "ahooks";
|
|
59
59
|
import * as antd from "antd";
|
|
60
60
|
import { notification, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, Select as Select$1, theme as theme$1, App, ConfigProvider, message, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Drawer as Drawer$1, Slider, Tree as Tree$2, Alert, Flex, Switch, Divider as Divider$1, Empty, DatePicker as DatePicker$1, Card, Collapse, Badge, Dropdown, Cascader as Cascader$1, Image, InputNumber as InputNumber$1, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, ColorPicker as ColorPicker$1, List as List$1, Col, QRCode, Pagination as Pagination$1, TimePicker as TimePicker$1, Row, Popconfirm, Layout as Layout$1 } from "antd";
|
|
61
|
-
import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
|
|
61
|
+
import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce as debounce$1, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
|
|
62
62
|
import template from "lodash/template";
|
|
63
63
|
import React, { createContext, useContext, useMemo, useRef, useEffect, isValidElement, useCallback, memo, useState, Suspense, useDeferredValue, createElement, Fragment as Fragment$1, startTransition, useLayoutEffect, forwardRef, useImperativeHandle, lazy as lazy$1, createRef } from "react";
|
|
64
64
|
import * as ReactRouterDom from "react-router-dom";
|
|
@@ -117,12 +117,13 @@ import * as formilyValidator from "@formily/validator";
|
|
|
117
117
|
import { registerValidateRules, setValidateLanguage } from "@formily/validator";
|
|
118
118
|
import * as antdStyle from "antd-style";
|
|
119
119
|
import { useAntdToken, createStyles, createGlobalStyle } from "antd-style";
|
|
120
|
-
import { createStyles as
|
|
120
|
+
import { createStyles as Cn } from "antd-style";
|
|
121
121
|
import axios from "axios";
|
|
122
122
|
import * as FileSaver from "file-saver";
|
|
123
123
|
import { saveAs } from "file-saver";
|
|
124
124
|
import * as ReactRouter from "react-router";
|
|
125
125
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
126
|
+
import debounce from "lodash/debounce";
|
|
126
127
|
import { loadableResource } from "react-imported-component";
|
|
127
128
|
import { PageHeader } from "@ant-design/pro-layout";
|
|
128
129
|
import LRUCache from "lru-cache";
|
|
@@ -12076,9 +12077,11 @@ const InternalDetailsBlockProvider = (e) => {
|
|
|
12076
12077
|
}
|
|
12077
12078
|
return { params: n, parseVariableLoading: o };
|
|
12078
12079
|
}, DetailsBlockProvider = withDynamicSchemaProps((e) => {
|
|
12079
|
-
const { params: t, parseVariableLoading: n } = useCompatDetailsBlockParams(e), o = useCollectionRecordData(), { association: r, dataSource: i
|
|
12080
|
+
const { params: t, parseVariableLoading: n } = useCompatDetailsBlockParams(e), o = useCollectionRecordData(), { association: r, dataSource: i, action: a } = e;
|
|
12081
|
+
useCollectionManager_deprecated(i);
|
|
12082
|
+
const { __collection: l } = o || {}, { designable: c } = useDesignable(), u = e.collection;
|
|
12080
12083
|
let d = !0;
|
|
12081
|
-
!c && l && (d = l === u);
|
|
12084
|
+
!c && l && a === "get" && !r && (d = l === u);
|
|
12082
12085
|
const p = useUpdate();
|
|
12083
12086
|
return !d || n ? null : /* @__PURE__ */ jsx(TemplateBlockProvider, { onTemplateLoaded: p, children: /* @__PURE__ */ jsx(BlockProvider, P(x({ name: "details" }, e), { params: t, children: /* @__PURE__ */ jsx(InternalDetailsBlockProvider, x({}, e)) })) });
|
|
12084
12087
|
}), useDetailsBlockContext = () => useContext(DetailsBlockContext), useDetailsBlockProps = () => {
|
|
@@ -16931,8 +16934,8 @@ const RenderButton = ({
|
|
|
16931
16934
|
RenderButton.displayName = "RenderButton";
|
|
16932
16935
|
const RenderButtonInner = observer$1(
|
|
16933
16936
|
(e) => {
|
|
16934
|
-
var
|
|
16935
|
-
const
|
|
16937
|
+
var R, k;
|
|
16938
|
+
const A = e, {
|
|
16936
16939
|
designable: t,
|
|
16937
16940
|
field: n,
|
|
16938
16941
|
aclCtx: o,
|
|
@@ -16951,7 +16954,7 @@ const RenderButtonInner = observer$1(
|
|
|
16951
16954
|
Designer: C,
|
|
16952
16955
|
designerProps: b,
|
|
16953
16956
|
title: S
|
|
16954
|
-
} =
|
|
16957
|
+
} = A, y = W(A, [
|
|
16955
16958
|
"designable",
|
|
16956
16959
|
"field",
|
|
16957
16960
|
"aclCtx",
|
|
@@ -16971,9 +16974,22 @@ const RenderButtonInner = observer$1(
|
|
|
16971
16974
|
"designerProps",
|
|
16972
16975
|
"title"
|
|
16973
16976
|
]);
|
|
16974
|
-
if (!t && ((
|
|
16977
|
+
if (!t && ((R = n == null ? void 0 : n.data) != null && R.hidden || !o))
|
|
16975
16978
|
return null;
|
|
16976
|
-
const v =
|
|
16979
|
+
const v = useCallback(
|
|
16980
|
+
debounce(
|
|
16981
|
+
(D, j = !0) => {
|
|
16982
|
+
d(D, j);
|
|
16983
|
+
},
|
|
16984
|
+
300,
|
|
16985
|
+
{ leading: !0, trailing: !1 }
|
|
16986
|
+
),
|
|
16987
|
+
[d]
|
|
16988
|
+
);
|
|
16989
|
+
useEffect(() => () => {
|
|
16990
|
+
v.cancel();
|
|
16991
|
+
}, []);
|
|
16992
|
+
const F = S || (n == null ? void 0 : n.title);
|
|
16977
16993
|
return /* @__PURE__ */ jsxs(
|
|
16978
16994
|
SortableItem,
|
|
16979
16995
|
P(x({
|
|
@@ -16981,16 +16997,16 @@ const RenderButtonInner = observer$1(
|
|
|
16981
16997
|
"aria-label": u()
|
|
16982
16998
|
}, y), {
|
|
16983
16999
|
onMouseEnter: c,
|
|
16984
|
-
loading: ((
|
|
17000
|
+
loading: ((k = n == null ? void 0 : n.data) == null ? void 0 : k.loading) || i,
|
|
16985
17001
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r }) : r,
|
|
16986
17002
|
disabled: a,
|
|
16987
17003
|
style: l,
|
|
16988
|
-
onClick:
|
|
17004
|
+
onClick: v,
|
|
16989
17005
|
component: p || Button,
|
|
16990
17006
|
className: cls(m, h, g, "nb-action"),
|
|
16991
17007
|
type: f === "danger" ? void 0 : f,
|
|
16992
17008
|
children: [
|
|
16993
|
-
|
|
17009
|
+
F && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, children: F }),
|
|
16994
17010
|
/* @__PURE__ */ jsx(C, x({}, b))
|
|
16995
17011
|
]
|
|
16996
17012
|
})
|
|
@@ -27590,6 +27606,9 @@ const formItemWrapCss = css`
|
|
|
27590
27606
|
max-width: 100%;
|
|
27591
27607
|
}
|
|
27592
27608
|
`, formItemLabelCss = css`
|
|
27609
|
+
.ant-card-body {
|
|
27610
|
+
padding: 0px !important;
|
|
27611
|
+
}
|
|
27593
27612
|
> .ant-formily-item-label {
|
|
27594
27613
|
display: none;
|
|
27595
27614
|
}
|
|
@@ -35211,7 +35230,7 @@ function addAppVersion(e, t) {
|
|
|
35211
35230
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
35212
35231
|
}), e;
|
|
35213
35232
|
}
|
|
35214
|
-
const name = "@nocobase/client", version = "1.5.
|
|
35233
|
+
const name = "@nocobase/client", version = "1.5.22", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
35215
35234
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
35216
35235
|
"@ant-design/cssinjs": "^1.11.1",
|
|
35217
35236
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -35233,9 +35252,9 @@ const name = "@nocobase/client", version = "1.5.20", license = "AGPL-3.0", main
|
|
|
35233
35252
|
"@formily/reactive-react": "^2.2.27",
|
|
35234
35253
|
"@formily/shared": "^2.2.27",
|
|
35235
35254
|
"@formily/validator": "^2.2.27",
|
|
35236
|
-
"@nocobase/evaluators": "1.5.
|
|
35237
|
-
"@nocobase/sdk": "1.5.
|
|
35238
|
-
"@nocobase/utils": "1.5.
|
|
35255
|
+
"@nocobase/evaluators": "1.5.22",
|
|
35256
|
+
"@nocobase/sdk": "1.5.22",
|
|
35257
|
+
"@nocobase/utils": "1.5.22",
|
|
35239
35258
|
ahooks: "^3.7.2",
|
|
35240
35259
|
antd: "5.12.8",
|
|
35241
35260
|
"antd-style": "3.7.1",
|
|
@@ -35905,7 +35924,7 @@ const useFieldComponentOptions = () => {
|
|
|
35905
35924
|
return l === HeightMode.FULL_HEIGHT ? window.innerHeight - a : c;
|
|
35906
35925
|
}, useTableSize = () => {
|
|
35907
35926
|
const [e, t] = useState(), n = useRef(null), o = useTableHeight(), r = useCallback(
|
|
35908
|
-
debounce(() => {
|
|
35927
|
+
debounce$1(() => {
|
|
35909
35928
|
var c;
|
|
35910
35929
|
if (!n.current)
|
|
35911
35930
|
return;
|
|
@@ -43074,7 +43093,7 @@ function IconField(e) {
|
|
|
43074
43093
|
width: "26em",
|
|
43075
43094
|
[`${c ? "height" : "maxHeight"}`]: "20em",
|
|
43076
43095
|
overflowY: "auto"
|
|
43077
|
-
}, f = debounce((C) => {
|
|
43096
|
+
}, f = debounce$1((C) => {
|
|
43078
43097
|
var S;
|
|
43079
43098
|
const b = (S = C == null ? void 0 : C.trim()) != null ? S : "";
|
|
43080
43099
|
m(
|
|
@@ -64209,7 +64228,7 @@ export {
|
|
|
64209
64228
|
createReadPrettyFormBlockSchema,
|
|
64210
64229
|
createRouterManager,
|
|
64211
64230
|
createSelectSchemaSettingsItem,
|
|
64212
|
-
|
|
64231
|
+
Cn as createStyles,
|
|
64213
64232
|
createSwitchSettingsItem,
|
|
64214
64233
|
createTableBlockSchema,
|
|
64215
64234
|
createTableBlockUISchema,
|