gomtm 0.0.258 → 0.0.259
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/dist/esm/ly/LayoutBase.js +24 -21
- package/dist/esm/validations/spContentModi.d.ts +8 -8
- package/dist/esm/validations/spRoute.d.ts +10 -10
- package/dist/esm/validations/user.d.ts +6 -6
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/esm/curd/CommonListViewV2.backup.d.ts +0 -7
- package/dist/esm/curd/CommonListViewV2.backup.js +0 -81
- package/dist/esm/curd/CommonListViewV2.d.ts +0 -29
- package/dist/esm/curd/CommonListViewV2.js +0 -180
- package/dist/esm/curd/curd-detail-page.d.ts +0 -10
- package/dist/esm/curd/curd-detail-page.js +0 -17
- package/dist/esm/curd/curd-detail.d.ts +0 -7
- package/dist/esm/curd/curd-detail.js +0 -63
- package/dist/esm/curd/curd.atoms.d.ts +0 -10
- package/dist/esm/curd/curd.atoms.js +0 -54
- package/dist/esm/curd/dlg/DlgCurdDebugInfo.d.ts +0 -3
- package/dist/esm/curd/dlg/DlgCurdDebugInfo.js +0 -24
- package/dist/esm/ly/DashLayout.d.ts +0 -2
- package/dist/esm/ly/DashLayout.js +0 -39
- package/dist/esm/ly--/DashLayout.d.ts +0 -2
- package/dist/esm/ly--/DashLayout.js +0 -39
- package/dist/esm/ly--/UserAvatorMenus.d.ts +0 -2
- package/dist/esm/ly--/UserAvatorMenus.js +0 -63
- package/dist/esm/ly--/dash5/aside.d.ts +0 -2
- package/dist/esm/ly--/dash5/aside.js +0 -40
- package/dist/esm/ly--/dash5/components/PageCreate.d.ts +0 -4
- package/dist/esm/ly--/dash5/components/PageCreate.js +0 -8
- package/dist/esm/ly--/dash5/components/PageEdit.d.ts +0 -4
- package/dist/esm/ly--/dash5/components/PageEdit.js +0 -8
- package/dist/esm/ly--/dash5/components/PageList.d.ts +0 -4
- package/dist/esm/ly--/dash5/components/PageList.js +0 -9
- package/dist/esm/ly--/dash5/components/PageShow.d.ts +0 -4
- package/dist/esm/ly--/dash5/components/PageShow.js +0 -8
- package/dist/esm/ly--/dash5/header.d.ts +0 -2
- package/dist/esm/ly--/dash5/header.js +0 -123
- package/dist/esm/ly--/dash5/index.d.ts +0 -2
- package/dist/esm/ly--/dash5/index.js +0 -21
- package/dist/esm/ly--/front-layout/PageCmds.d.ts +0 -2
- package/dist/esm/ly--/front-layout/PageCmds.js +0 -25
- package/dist/esm/ly--/front-layout/PageSearchCmd.d.ts +0 -2
- package/dist/esm/ly--/front-layout/PageSearchCmd.js +0 -63
- package/dist/esm/ly--/front-layout/header.d.ts +0 -2
- package/dist/esm/ly--/front-layout/header.js +0 -18
- package/dist/esm/ly--/front-layout/index.d.ts +0 -2
- package/dist/esm/ly--/front-layout/index.js +0 -13
- package/dist/esm/ly--/front-layout/main-nav.d.ts +0 -3
- package/dist/esm/ly--/front-layout/main-nav.js +0 -116
- package/dist/esm/mtmquery.d.ts +0 -0
- package/dist/esm/mtmquery.js +0 -1
- package/dist/esm/providers/logger.context.d.ts +0 -10
- package/dist/esm/providers/logger.context.js +0 -23
- package/dist/esm/store/auth.d.ts +0 -7
- package/dist/esm/store/auth.js +0 -35
- package/dist/esm/utils.d.ts +0 -1
- package/dist/esm/utils.js +0 -5
package/dist/esm/store/auth.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function isRoleMatch(currentRoles, allowRoles) {
|
|
3
|
-
if (!currentRoles) {
|
|
4
|
-
return true;
|
|
5
|
-
}
|
|
6
|
-
if (!(allowRoles == null ? void 0 : allowRoles.length)) {
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
for (const roleName of allowRoles) {
|
|
10
|
-
const ok = currentRoles.find((x) => x == roleName);
|
|
11
|
-
if (ok) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
import React, { useMemo } from "react";
|
|
18
|
-
import { useSuspenseQuery } from "../connectquery";
|
|
19
|
-
import { userinfo } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
20
|
-
function useAuth() {
|
|
21
|
-
const [auth, setAuth] = React.useState(null);
|
|
22
|
-
const isAdmin = useMemo(() => {
|
|
23
|
-
return (auth == null ? void 0 : auth.role) == "admin";
|
|
24
|
-
}, [auth]);
|
|
25
|
-
const userInfoQuery = useSuspenseQuery(userinfo);
|
|
26
|
-
const userId = useMemo(() => {
|
|
27
|
-
var _a;
|
|
28
|
-
return (_a = userInfoQuery.data.userInfo) == null ? void 0 : _a.ID;
|
|
29
|
-
}, [userInfoQuery.data]);
|
|
30
|
-
return { auth, userId, isAdmin };
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
isRoleMatch,
|
|
34
|
-
useAuth
|
|
35
|
-
};
|
package/dist/esm/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const projectRoot: string;
|