@chaibuilder/pages 0.4.8-beta.7 → 0.4.9-beta.1
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/{B4MFY5CR-C-y1qMcz.js → B4MFY5CR-CPM2Nh-Q.js} +1 -1
- package/dist/{B4MFY5CR-CZIhZc_v.cjs → B4MFY5CR-DQuqriTv.cjs} +1 -1
- package/dist/{HO4MOOFI-iH74XHta.cjs → HO4MOOFI-C4-4G5qJ.cjs} +1 -1
- package/dist/{HO4MOOFI-D1WZ0Hg3.js → HO4MOOFI-C4C1eu_i.js} +2 -2
- package/dist/{HUY7CZI3-DABOTt0o.js → HUY7CZI3-D0DMRo6d.js} +2 -2
- package/dist/{HUY7CZI3-Bf9J-1mq.cjs → HUY7CZI3-DtDzQ_dl.cjs} +1 -1
- package/dist/{digital-asset-manager-ty2MhSyj.js → digital-asset-manager-B9r4C600.js} +1 -1
- package/dist/{digital-asset-manager-CI-fxUjE.cjs → digital-asset-manager-DflPdk2Q.cjs} +1 -1
- package/dist/{index-B9yYtFHS.js → index-BCGeOsps.js} +26 -24
- package/dist/{index-D6MzyrPC.cjs → index-BwLbexF2.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BwLbexF2.cjs"),t=require("@chaibuilder/sdk");exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiLoginComponent=e.registerLoginComponent;exports.useChaiAuth=e.useChaiAuth;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useCurrentPage=e.useCurrentPage;exports.useFetch=e.useFetch;exports.useFetchUpload=e.useFetchUpload;exports.useLanguagePages=e.useLanguagePages;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;Object.keys(t).forEach(s=>{s!=="default"&&!Object.prototype.hasOwnProperty.call(exports,s)&&Object.defineProperty(exports,s,{enumerable:!0,get:()=>t[s]})});
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ComponentType } from 'react';
|
|
|
3
3
|
import { DefinedUseQueryResult } from '@tanstack/react-query';
|
|
4
4
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
+
import { RESET } from 'jotai/utils';
|
|
6
7
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
7
8
|
|
|
8
9
|
declare const ChaiBuilderPages: (props: ChaiBuilderPagesProps) => JSX_2.Element;
|
|
@@ -31,6 +32,15 @@ declare interface LoggedInUser {
|
|
|
31
32
|
avatar?: string;
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
declare type LoggedInUser_2 = {
|
|
36
|
+
accessToken: string;
|
|
37
|
+
refreshToken: string;
|
|
38
|
+
id: string;
|
|
39
|
+
email: string;
|
|
40
|
+
name: string;
|
|
41
|
+
avatar?: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
34
44
|
export declare const PermissionChecker: ({ permission, permissions, children, fallback, }: {
|
|
35
45
|
permission?: string;
|
|
36
46
|
permissions?: string[];
|
|
@@ -42,6 +52,13 @@ export declare const registerChaiLoginComponent: (component: ComponentType<{
|
|
|
42
52
|
onLoginSuccess: (user: LoggedInUser) => void;
|
|
43
53
|
}>) => void;
|
|
44
54
|
|
|
55
|
+
export declare const useChaiAuth: () => {
|
|
56
|
+
readonly isLoggedIn: boolean;
|
|
57
|
+
readonly user: LoggedInUser_2 | null;
|
|
58
|
+
readonly setUser: (args_0: LoggedInUser_2 | RESET | ((prev: LoggedInUser_2 | null) => LoggedInUser_2 | RESET | null) | null) => void;
|
|
59
|
+
readonly logout: () => void;
|
|
60
|
+
};
|
|
61
|
+
|
|
45
62
|
export declare const useChaiUserInfo: (currentEditor: string) => UseQueryResult< {
|
|
46
63
|
id: string;
|
|
47
64
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { a0 as a, _ as r, a1 as t,
|
|
1
|
+
import { a0 as a, _ as r, a1 as t, a6 as u, a9 as i, a2 as o, X as n, a8 as g, a3 as h, a7 as C, a4 as m, a5 as P } from "./index-BCGeOsps.js";
|
|
2
2
|
export * from "@chaibuilder/sdk";
|
|
3
3
|
export {
|
|
4
4
|
a as PermissionChecker,
|
|
5
5
|
r as default,
|
|
6
6
|
t as registerChaiLoginComponent,
|
|
7
|
+
u as useChaiAuth,
|
|
7
8
|
i as useChaiUserInfo,
|
|
8
9
|
o as useCurrentPage,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
n as useFetch,
|
|
11
|
+
g as useFetchUpload,
|
|
12
|
+
h as useLanguagePages,
|
|
13
|
+
C as useUserPermissions,
|
|
13
14
|
m as useWebsitePages,
|
|
14
|
-
|
|
15
|
+
P as useWebsiteSetting
|
|
15
16
|
};
|