@nocobase/client 1.6.6 → 1.6.8
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 +23 -19
- package/es/user/CurrentUserProvider.d.ts +1 -0
- package/lib/index.js +6 -12
- package/lib/locale/it-IT.js +269 -46
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -3777,6 +3777,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3777
3777
|
get useIsInSettingsPage() {
|
|
3778
3778
|
return useIsInSettingsPage;
|
|
3779
3779
|
},
|
|
3780
|
+
get useIsLoggedIn() {
|
|
3781
|
+
return useIsLoggedIn;
|
|
3782
|
+
},
|
|
3780
3783
|
get useIsSelectFieldMode() {
|
|
3781
3784
|
return useIsSelectFieldMode;
|
|
3782
3785
|
},
|
|
@@ -9158,7 +9161,7 @@ function addAppVersion(e, t) {
|
|
|
9158
9161
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9159
9162
|
}), e;
|
|
9160
9163
|
}
|
|
9161
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9164
|
+
const name = "@nocobase/client", version = "1.6.8", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9162
9165
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9163
9166
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9164
9167
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9180,9 +9183,9 @@ const name = "@nocobase/client", version = "1.6.6", license = "AGPL-3.0", main =
|
|
|
9180
9183
|
"@formily/reactive-react": "^2.2.27",
|
|
9181
9184
|
"@formily/shared": "^2.2.27",
|
|
9182
9185
|
"@formily/validator": "^2.2.27",
|
|
9183
|
-
"@nocobase/evaluators": "1.6.
|
|
9184
|
-
"@nocobase/sdk": "1.6.
|
|
9185
|
-
"@nocobase/utils": "1.6.
|
|
9186
|
+
"@nocobase/evaluators": "1.6.8",
|
|
9187
|
+
"@nocobase/sdk": "1.6.8",
|
|
9188
|
+
"@nocobase/utils": "1.6.8",
|
|
9186
9189
|
ahooks: "^3.7.2",
|
|
9187
9190
|
antd: "5.12.8",
|
|
9188
9191
|
"antd-style": "3.7.1",
|
|
@@ -10970,7 +10973,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10970
10973
|
}
|
|
10971
10974
|
}
|
|
10972
10975
|
);
|
|
10973
|
-
}, getPageHeaderHeight = (e, t, n, o, r) => r.includes("/popups/") ? 2 * o.paddingContentVertical + 22 + o.paddingPageVertical : e ? o.paddingContentHorizontalLG : n ? t ? o.controlPaddingHorizontal + 3 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.paddingContentHorizontalLG + 12 : t ? o.paddingSM + o.controlHeight + o.marginXS + 2 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.controlHeight + o.marginXS + (o.
|
|
10976
|
+
}, getPageHeaderHeight = (e, t, n, o, r) => r.includes("/popups/") ? 2 * o.paddingContentVertical + 22 + o.paddingPageVertical : e ? o.paddingContentHorizontalLG : n ? t ? o.controlPaddingHorizontal + 3 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.paddingContentHorizontalLG + 12 : t ? o.paddingSM + o.controlHeight + o.marginXS + 2 * o.controlPaddingHorizontalSM + 22 + o.paddingContentHorizontalLG : o.controlHeight + o.marginXS + (o.paddingContentVertical + 2) * 2 + o.paddingContentHorizontalLG, usePageFullScreenHeight = (e) => {
|
|
10974
10977
|
const { token: t } = theme.useToken(), { designable: n } = useDesignable(), { heightProps: o } = useBlockHeightProps(), r = useLocation(), { disablePageHeader: i, enablePageTabs: a, hidePageTitle: l } = e || o || {}, c = t.sizeXXL - 2, u = n ? t.controlHeight + 2 * t.paddingContentHorizontalLG : 1 * t.paddingContentHorizontalLG, d = getPageHeaderHeight(
|
|
10975
10978
|
i,
|
|
10976
10979
|
a,
|
|
@@ -10997,7 +11000,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10997
11000
|
if (!(!(t != null && t.heightMode) || o === HeightMode.DEFAULT)) {
|
|
10998
11001
|
if (o === HeightMode.FULL_HEIGHT) {
|
|
10999
11002
|
let c = window.innerHeight - n;
|
|
11000
|
-
return
|
|
11003
|
+
return e != null && e.removeBlockHeaderHeight && (c = c - l), e != null && e.innerExtraHeight && (c = c - e.innerExtraHeight), c;
|
|
11001
11004
|
}
|
|
11002
11005
|
return r;
|
|
11003
11006
|
}
|
|
@@ -24329,9 +24332,7 @@ function useFormItemCollectionField() {
|
|
|
24329
24332
|
}
|
|
24330
24333
|
function useIsAssociationField() {
|
|
24331
24334
|
const e = useFormItemCollectionField();
|
|
24332
|
-
return
|
|
24333
|
-
e == null ? void 0 : e.interface
|
|
24334
|
-
);
|
|
24335
|
+
return e && ["hasOne", "hasMany", "belongsTo", "belongsToMany", "belongsToArray"].includes(e.type);
|
|
24335
24336
|
}
|
|
24336
24337
|
function useIsFileField() {
|
|
24337
24338
|
const e = useCollectionManager(), t = useFormItemCollectionField(), n = e.getCollection(t == null ? void 0 : t.target);
|
|
@@ -24378,7 +24379,11 @@ const SettingsMenuProvider = (e) => SelectWithTitle, DropdownVisibleContext = cr
|
|
|
24378
24379
|
DropdownVisibleContext.displayName = "DropdownVisibleContext";
|
|
24379
24380
|
const CurrentUserContext = createContext(null);
|
|
24380
24381
|
CurrentUserContext.displayName = "CurrentUserContext";
|
|
24381
|
-
const useCurrentUserContext = () => useContext(CurrentUserContext),
|
|
24382
|
+
const useCurrentUserContext = () => useContext(CurrentUserContext), useIsLoggedIn = () => {
|
|
24383
|
+
var t;
|
|
24384
|
+
const e = useContext(CurrentUserContext);
|
|
24385
|
+
return !!((t = e == null ? void 0 : e.data) != null && t.data);
|
|
24386
|
+
}, useCurrentRoles = () => {
|
|
24382
24387
|
var r;
|
|
24383
24388
|
const { allowAnonymous: e } = useACLRoleContext(), { data: t } = useCurrentUserContext(), n = useCompile();
|
|
24384
24389
|
return useMemo(() => {
|
|
@@ -24395,7 +24400,10 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
|
|
|
24395
24400
|
url: "/auth:check",
|
|
24396
24401
|
skipNotify: !0,
|
|
24397
24402
|
skipAuth: !0
|
|
24398
|
-
}).then((r) => r == null ? void 0 : r.data)
|
|
24403
|
+
}).then((r) => r == null ? void 0 : r.data),
|
|
24404
|
+
{
|
|
24405
|
+
manual: !t.auth.token
|
|
24406
|
+
}
|
|
24399
24407
|
), { render: o } = useAppSpin();
|
|
24400
24408
|
return n.loading ? o() : /* @__PURE__ */ jsx(CurrentUserContext.Provider, { value: n, children: e.children });
|
|
24401
24409
|
}, CurrentUserSettingsMenuContext = createContext(null);
|
|
@@ -50286,12 +50294,6 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
50286
50294
|
height: 100%;
|
|
50287
50295
|
display: flex;
|
|
50288
50296
|
flex-direction: column;
|
|
50289
|
-
.ant-table-expanded-row-fixed {
|
|
50290
|
-
min-height: ${t}px;
|
|
50291
|
-
}
|
|
50292
|
-
.ant-table-body {
|
|
50293
|
-
min-height: ${t}px;
|
|
50294
|
-
}
|
|
50295
50297
|
.ant-table-cell {
|
|
50296
50298
|
padding: 16px 8px;
|
|
50297
50299
|
}
|
|
@@ -55387,9 +55389,9 @@ const ReadPretty$1 = (e) => {
|
|
|
55387
55389
|
return P(x({}, e), {
|
|
55388
55390
|
format: n,
|
|
55389
55391
|
inputReadOnly: !0,
|
|
55390
|
-
value: dayjsable(e.value,
|
|
55392
|
+
value: dayjsable(e.value, "HH:mm:ss"),
|
|
55391
55393
|
onChange: (r) => {
|
|
55392
|
-
o && o(formatDayjsValue(r,
|
|
55394
|
+
o && o(formatDayjsValue(r, "HH:mm:ss") || null);
|
|
55393
55395
|
}
|
|
55394
55396
|
});
|
|
55395
55397
|
};
|
|
@@ -62925,6 +62927,7 @@ const ACLProvider = (e) => /* @__PURE__ */ jsx(
|
|
|
62925
62927
|
url: "roles:check"
|
|
62926
62928
|
},
|
|
62927
62929
|
{
|
|
62930
|
+
manual: !o.auth.token,
|
|
62928
62931
|
onSuccess(a) {
|
|
62929
62932
|
var l, c, u, d;
|
|
62930
62933
|
(l = a == null ? void 0 : a.data) != null && l.snippets.includes("ui.*") || t(!1), ((c = a == null ? void 0 : a.data) == null ? void 0 : c.role) !== o.auth.role && o.auth.setRole((u = a == null ? void 0 : a.data) == null ? void 0 : u.role), r.pluginSettingsManager.setAclSnippets(((d = a == null ? void 0 : a.data) == null ? void 0 : d.snippets) || []);
|
|
@@ -65486,6 +65489,7 @@ export {
|
|
|
65486
65489
|
useIsFileField,
|
|
65487
65490
|
useIsFormReadPretty,
|
|
65488
65491
|
useIsInSettingsPage,
|
|
65492
|
+
useIsLoggedIn,
|
|
65489
65493
|
useIsSelectFieldMode,
|
|
65490
65494
|
useIsSubPageClosedByPageMenu,
|
|
65491
65495
|
useLabelUiSchema,
|
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
export declare const CurrentUserContext: React.Context<import("../api-client").UseRequestResult<any>>;
|
|
11
11
|
export declare const useCurrentUserContext: () => import("../api-client").UseRequestResult<any>;
|
|
12
|
+
export declare const useIsLoggedIn: () => boolean;
|
|
12
13
|
export declare const useCurrentRoles: () => any;
|
|
13
14
|
export declare const CurrentUserProvider: (props: any) => React.JSX.Element;
|