@nocobase/client 1.7.9 → 1.7.10
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 +39 -30
- package/lib/index.js +20 -20
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -4251,13 +4251,14 @@ class APIClient extends APIClient$1 {
|
|
|
4251
4251
|
A(this, "notification", notification);
|
|
4252
4252
|
}
|
|
4253
4253
|
cloneInstance() {
|
|
4254
|
+
var r;
|
|
4254
4255
|
const n = new APIClient(this.options);
|
|
4255
4256
|
n.options = this.options, n.services = this.services, n.storage = this.storage, n.app = this.app, n.auth = this.auth, n.storagePrefix = this.storagePrefix, n.notification = this.notification;
|
|
4256
4257
|
const o = [];
|
|
4257
|
-
for (const
|
|
4258
|
-
r.rejected._name === "handleNotificationError" ? o.push(P(x({},
|
|
4258
|
+
for (const a of this.axios.interceptors.response.handlers)
|
|
4259
|
+
((r = a == null ? void 0 : a.rejected) == null ? void 0 : r._name) === "handleNotificationError" ? o.push(P(x({}, a), {
|
|
4259
4260
|
rejected: n.handleNotificationError.bind(n)
|
|
4260
|
-
})) : o.push(
|
|
4261
|
+
})) : o.push(a);
|
|
4261
4262
|
return n.axios.interceptors.response.handlers = o, n;
|
|
4262
4263
|
}
|
|
4263
4264
|
getHeaders() {
|
|
@@ -6882,7 +6883,10 @@ function bindLinkageRulesToFiled({
|
|
|
6882
6883
|
// 1. 条件中的字段值;
|
|
6883
6884
|
// 2. 条件中的变量值;
|
|
6884
6885
|
// 3. value 表达式中的变量值;
|
|
6885
|
-
() =>
|
|
6886
|
+
() => {
|
|
6887
|
+
const f = getFieldValuesInCondition({ linkageRules: t, formValues: n }), C = getVariableValuesInCondition({ linkageRules: t, localVariables: o }), b = getVariableValuesInExpression({ action: r, localVariables: o });
|
|
6888
|
+
return [f, C, b].map((y) => JSON.stringify(y)).join(",");
|
|
6889
|
+
},
|
|
6886
6890
|
getSubscriber({ action: r, field: e, rule: a, variables: i, localVariables: o, variableNameOfLeftCondition: l }, c),
|
|
6887
6891
|
{ fireImmediately: !0, equals: _.isEqual }
|
|
6888
6892
|
);
|
|
@@ -8705,7 +8709,7 @@ function addAppVersion(e, t) {
|
|
|
8705
8709
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8706
8710
|
}), e;
|
|
8707
8711
|
}
|
|
8708
|
-
const name = "@nocobase/client", version = "1.7.
|
|
8712
|
+
const name = "@nocobase/client", version = "1.7.10", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8709
8713
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8710
8714
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8711
8715
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8726,9 +8730,9 @@ const name = "@nocobase/client", version = "1.7.9", license = "AGPL-3.0", main =
|
|
|
8726
8730
|
"@formily/reactive-react": "^2.2.27",
|
|
8727
8731
|
"@formily/shared": "^2.2.27",
|
|
8728
8732
|
"@formily/validator": "^2.2.27",
|
|
8729
|
-
"@nocobase/evaluators": "1.7.
|
|
8730
|
-
"@nocobase/sdk": "1.7.
|
|
8731
|
-
"@nocobase/utils": "1.7.
|
|
8733
|
+
"@nocobase/evaluators": "1.7.10",
|
|
8734
|
+
"@nocobase/sdk": "1.7.10",
|
|
8735
|
+
"@nocobase/utils": "1.7.10",
|
|
8732
8736
|
ahooks: "^3.7.2",
|
|
8733
8737
|
antd: "5.24.2",
|
|
8734
8738
|
"antd-style": "3.7.1",
|
|
@@ -39351,8 +39355,8 @@ const RenderButton = ({
|
|
|
39351
39355
|
RenderButton.displayName = "RenderButton";
|
|
39352
39356
|
const RenderButtonInner = observer$1(
|
|
39353
39357
|
(e) => {
|
|
39354
|
-
var
|
|
39355
|
-
const
|
|
39358
|
+
var j, M;
|
|
39359
|
+
const O = e, {
|
|
39356
39360
|
designable: t,
|
|
39357
39361
|
field: n,
|
|
39358
39362
|
aclCtx: o,
|
|
@@ -39373,7 +39377,7 @@ const RenderButtonInner = observer$1(
|
|
|
39373
39377
|
title: S,
|
|
39374
39378
|
isLink: y,
|
|
39375
39379
|
onlyIcon: v
|
|
39376
|
-
} =
|
|
39380
|
+
} = O, F = W(O, [
|
|
39377
39381
|
"designable",
|
|
39378
39382
|
"field",
|
|
39379
39383
|
"aclCtx",
|
|
@@ -39396,27 +39400,32 @@ const RenderButtonInner = observer$1(
|
|
|
39396
39400
|
"onlyIcon"
|
|
39397
39401
|
]), { t: I } = useTranslation(), T = useCallback(
|
|
39398
39402
|
debounce$1(
|
|
39399
|
-
(
|
|
39400
|
-
d(
|
|
39403
|
+
(q, E = !0) => {
|
|
39404
|
+
d(q, E);
|
|
39401
39405
|
},
|
|
39402
39406
|
300,
|
|
39403
39407
|
{ leading: !0, trailing: !1 }
|
|
39404
39408
|
),
|
|
39405
39409
|
[d]
|
|
39406
39410
|
);
|
|
39407
|
-
|
|
39411
|
+
useEffect(() => () => {
|
|
39408
39412
|
T.cancel();
|
|
39409
|
-
}, [])
|
|
39410
|
-
|
|
39411
|
-
|
|
39412
|
-
|
|
39413
|
-
|
|
39414
|
-
|
|
39415
|
-
|
|
39416
|
-
|
|
39417
|
-
|
|
39418
|
-
|
|
39413
|
+
}, []);
|
|
39414
|
+
const R = useMemo(
|
|
39415
|
+
() => React.forwardRef(
|
|
39416
|
+
(Y, H) => {
|
|
39417
|
+
var J = Y, { component: q = p || Button, icon: E, onlyIcon: V, children: G } = J, U = W(J, ["component", "icon", "onlyIcon", "children"]);
|
|
39418
|
+
return /* @__PURE__ */ jsxs(q, P(x({ ref: H }, U), { children: [
|
|
39419
|
+
V ? /* @__PURE__ */ jsx(Tooltip, { title: U.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: E && typeof E == "string" ? /* @__PURE__ */ jsx(Icon, { type: E }) : E }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: E && typeof E == "string" ? /* @__PURE__ */ jsx(Icon, { type: E }) : E }),
|
|
39420
|
+
V ? G[1] : G
|
|
39421
|
+
] }));
|
|
39422
|
+
}
|
|
39423
|
+
),
|
|
39424
|
+
[v]
|
|
39419
39425
|
);
|
|
39426
|
+
if (!t && ((j = n == null ? void 0 : n.data) != null && j.hidden || !o))
|
|
39427
|
+
return null;
|
|
39428
|
+
const D = S != null ? S : n == null ? void 0 : n.title, B = typeof D == "string" ? I(D, { ns: NAMESPACE_UI_SCHEMA }) : D, k = l, { opacity: N } = k, $ = W(k, ["opacity"]), L = y && N ? { opacity: N } : void 0, w = v || p ? R : p || Button;
|
|
39420
39429
|
return /* @__PURE__ */ jsxs(
|
|
39421
39430
|
SortableItem,
|
|
39422
39431
|
P(x({
|
|
@@ -39424,18 +39433,18 @@ const RenderButtonInner = observer$1(
|
|
|
39424
39433
|
"aria-label": u()
|
|
39425
39434
|
}, F), {
|
|
39426
39435
|
onMouseEnter: c,
|
|
39427
|
-
loading: ((
|
|
39428
|
-
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style:
|
|
39436
|
+
loading: ((M = n == null ? void 0 : n.data) == null ? void 0 : M.loading) || a,
|
|
39437
|
+
icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: L }) : r,
|
|
39429
39438
|
disabled: i,
|
|
39430
|
-
style: y ?
|
|
39439
|
+
style: y ? $ : l,
|
|
39431
39440
|
onClick: T,
|
|
39432
|
-
component:
|
|
39441
|
+
component: w,
|
|
39433
39442
|
className: cls(m, h, g, "nb-action"),
|
|
39434
39443
|
type: f === "danger" ? void 0 : f,
|
|
39435
|
-
title:
|
|
39444
|
+
title: B,
|
|
39436
39445
|
onlyIcon: v,
|
|
39437
39446
|
children: [
|
|
39438
|
-
!v &&
|
|
39447
|
+
!v && B && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: L, children: B }),
|
|
39439
39448
|
/* @__PURE__ */ jsx(C, x({}, b))
|
|
39440
39449
|
]
|
|
39441
39450
|
})
|