@nocobase/client 1.8.19 → 1.8.20
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 +25 -17
- package/lib/index.js +9 -9
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -8771,7 +8771,7 @@ function addAppVersion(e, t) {
|
|
|
8771
8771
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8772
8772
|
}), e;
|
|
8773
8773
|
}
|
|
8774
|
-
const name = "@nocobase/client", version = "1.8.
|
|
8774
|
+
const name = "@nocobase/client", version = "1.8.20", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8775
8775
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8776
8776
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8777
8777
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8792,9 +8792,9 @@ const name = "@nocobase/client", version = "1.8.19", license = "AGPL-3.0", main
|
|
|
8792
8792
|
"@formily/reactive-react": "^2.2.27",
|
|
8793
8793
|
"@formily/shared": "^2.2.27",
|
|
8794
8794
|
"@formily/validator": "^2.2.27",
|
|
8795
|
-
"@nocobase/evaluators": "1.8.
|
|
8796
|
-
"@nocobase/sdk": "1.8.
|
|
8797
|
-
"@nocobase/utils": "1.8.
|
|
8795
|
+
"@nocobase/evaluators": "1.8.20",
|
|
8796
|
+
"@nocobase/sdk": "1.8.20",
|
|
8797
|
+
"@nocobase/utils": "1.8.20",
|
|
8798
8798
|
ahooks: "^3.7.2",
|
|
8799
8799
|
antd: "5.24.2",
|
|
8800
8800
|
"antd-style": "3.7.1",
|
|
@@ -22514,8 +22514,8 @@ const HeightMode = {
|
|
|
22514
22514
|
);
|
|
22515
22515
|
return useEventListener("resize", r), { height: o, width: e, tableSizeRefCallback: a };
|
|
22516
22516
|
}, hasActionContainerInParentChain = (e) => {
|
|
22517
|
-
var t;
|
|
22518
|
-
return e ? e["x-component"] === "Action.Container" ? ((t = e == null ? void 0 : e.parent["x-component-props"]) == null ? void 0 :
|
|
22517
|
+
var t, n;
|
|
22518
|
+
return e ? e["x-component"] === "Action.Container" ? ((n = (t = e == null ? void 0 : e.parent) == null ? void 0 : t["x-component-props"]) == null ? void 0 : n.openMode) !== "page" : hasActionContainerInParentChain(e.parent) : null;
|
|
22519
22519
|
}, useFieldModeOptions = (e) => {
|
|
22520
22520
|
var g;
|
|
22521
22521
|
const { t } = useTranslation(), { getCollectionJoinField: n, getCollection: o } = useCollectionManager_deprecated(), r = useFieldSchema(), a = (e == null ? void 0 : e.fieldSchema) || r, i = useField(), l = useForm(), c = (a == null ? void 0 : a["x-read-pretty"]) || i.readPretty || l.readPretty, u = e == null ? void 0 : e.fieldSchema, { getField: d } = useCollection_deprecated(), p = (e == null ? void 0 : e.collectionField) || d(a.name) || n(a["x-collection-field"]), { label: m } = ((g = a["x-component-props"]) == null ? void 0 : g.fieldNames) || {};
|
|
@@ -23681,7 +23681,7 @@ function RawTextArea(e) {
|
|
|
23681
23681
|
children: [
|
|
23682
23682
|
/* @__PURE__ */ jsx(o, P(x({}, l), { ref: t })),
|
|
23683
23683
|
/* @__PURE__ */ jsx(
|
|
23684
|
-
|
|
23684
|
+
Space$1.Compact,
|
|
23685
23685
|
{
|
|
23686
23686
|
className: css`
|
|
23687
23687
|
position: absolute;
|
|
@@ -29208,7 +29208,7 @@ const BlockItemCardContext = createContext({}), BlockItemCard = React.forwardRef
|
|
|
29208
29208
|
}
|
|
29209
29209
|
}
|
|
29210
29210
|
)
|
|
29211
|
-
] }), b = /* @__PURE__ */ jsx(BlockItemCardContext.Provider, { value: { titleHeight: d }, children: /* @__PURE__ */ jsx(Card, P(x({ ref: n,
|
|
29211
|
+
] }), b = /* @__PURE__ */ jsx(BlockItemCardContext.Provider, { value: { titleHeight: d }, children: /* @__PURE__ */ jsx(Card, P(x({ ref: n, variant: "borderless", style: u }, c), { title: C, children: e })) });
|
|
29212
29212
|
return f ? /* @__PURE__ */ jsx(BlockLinkageRuleProvider, { children: b }) : b;
|
|
29213
29213
|
});
|
|
29214
29214
|
BlockItemCard.displayName = "BlockItemCard";
|
|
@@ -30671,8 +30671,8 @@ const SortableProvider = (e) => {
|
|
|
30671
30671
|
}, i), {
|
|
30672
30672
|
className: cx("nb-sortable-designer", e.className),
|
|
30673
30673
|
ref: p,
|
|
30674
|
-
style: m
|
|
30675
|
-
setNodeRef
|
|
30674
|
+
style: m
|
|
30675
|
+
// setNodeRef,
|
|
30676
30676
|
}),
|
|
30677
30677
|
r
|
|
30678
30678
|
);
|
|
@@ -40251,12 +40251,12 @@ const RenderButtonInner = observer$1(
|
|
|
40251
40251
|
(Y, G) => {
|
|
40252
40252
|
var J = Y, { component: V = p || Button, icon: E, onlyIcon: z, children: H } = J, U = W(J, ["component", "icon", "onlyIcon", "children"]);
|
|
40253
40253
|
return /* @__PURE__ */ jsxs(V, P(x({ ref: G }, U), { children: [
|
|
40254
|
-
|
|
40255
|
-
|
|
40254
|
+
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 }),
|
|
40255
|
+
v ? H[1] : H
|
|
40256
40256
|
] }));
|
|
40257
40257
|
}
|
|
40258
40258
|
),
|
|
40259
|
-
[v]
|
|
40259
|
+
[v, p]
|
|
40260
40260
|
);
|
|
40261
40261
|
if (!t && ((M = n == null ? void 0 : n.data) != null && M.hidden || !o))
|
|
40262
40262
|
return null;
|
|
@@ -40277,7 +40277,6 @@ const RenderButtonInner = observer$1(
|
|
|
40277
40277
|
className: cls(m, h, g, "nb-action"),
|
|
40278
40278
|
type: f === "danger" ? void 0 : f,
|
|
40279
40279
|
title: typeof B == "string" ? B : null,
|
|
40280
|
-
onlyIcon: v,
|
|
40281
40280
|
children: [
|
|
40282
40281
|
!v && B && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: j, children: B }),
|
|
40283
40282
|
/* @__PURE__ */ jsx(C, x({}, b))
|
|
@@ -43637,9 +43636,13 @@ function matchMimetype(e, t) {
|
|
|
43637
43636
|
}
|
|
43638
43637
|
const toArr$1 = (e) => isValid(e) ? Object.keys(e).length === 0 ? [] : toArr$3(e) : [], testOpts = (e, t) => t && isArr(t.include) ? t.include.some((n) => e.test(n)) : t && isArr(t.exclude) ? !t.exclude.some((n) => e.test(n)) : !0;
|
|
43639
43638
|
function getThumbnailPlaceholderURL(e, t = {}) {
|
|
43640
|
-
for (let n = 0; n < UPLOAD_PLACEHOLDER.length; n++)
|
|
43641
|
-
|
|
43639
|
+
for (let n = 0; n < UPLOAD_PLACEHOLDER.length; n++) {
|
|
43640
|
+
const o = e.url ? new URL(
|
|
43641
|
+
e.url.startsWith("http://") || e.url.startsWith("https://") ? e.url : `${location.origin}/${e.url.replace(/^\//, "")}`
|
|
43642
|
+
) : { pathname: e.filename };
|
|
43643
|
+
if (UPLOAD_PLACEHOLDER[n].ext.test(e.extname || e.filename || o.pathname || e.name))
|
|
43642
43644
|
return testOpts(UPLOAD_PLACEHOLDER[n].ext, t) ? UPLOAD_PLACEHOLDER[n].icon || UNKNOWN_FILE_ICON : e.name;
|
|
43645
|
+
}
|
|
43643
43646
|
return UNKNOWN_FILE_ICON;
|
|
43644
43647
|
}
|
|
43645
43648
|
function getResponseMessage({ error: e, response: t }) {
|
|
@@ -49410,7 +49413,9 @@ const NanoIDInput = Object.assign(
|
|
|
49410
49413
|
return /* @__PURE__ */ jsx(Upload.ReadPretty, P(x({}, e), { value: t }));
|
|
49411
49414
|
}), Editable = observer$1(
|
|
49412
49415
|
(e) => {
|
|
49413
|
-
const t = useField(), n = useRef(null), o = useFieldSchema(), r = t.value, { token: a } = useToken()
|
|
49416
|
+
const t = useField(), n = useRef(null), o = useFieldSchema(), r = t.value, { token: a } = useToken();
|
|
49417
|
+
o.required = t.required;
|
|
49418
|
+
const i = {
|
|
49414
49419
|
name: o.name,
|
|
49415
49420
|
"x-collection-field": o["x-collection-field"],
|
|
49416
49421
|
"x-component": "CollectionField",
|
|
@@ -49437,6 +49442,9 @@ const NanoIDInput = Object.assign(
|
|
|
49437
49442
|
display: none;
|
|
49438
49443
|
}
|
|
49439
49444
|
`,
|
|
49445
|
+
onOpenChange: (d) => {
|
|
49446
|
+
d && t.validate();
|
|
49447
|
+
},
|
|
49440
49448
|
children: /* @__PURE__ */ jsx(
|
|
49441
49449
|
"div",
|
|
49442
49450
|
{
|