andoncloud-sdk 1.3.5 → 1.3.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.
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "andoncloud-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "src/index.js",
|
|
@@ -15,14 +15,13 @@
|
|
|
15
15
|
"react-hot-toast": "^2.2.0"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"prepare": "
|
|
25
|
-
"predeploy": "cd example && yarn install && yarn run build"
|
|
18
|
+
"build": "library-scripts build",
|
|
19
|
+
"build:watch": "library-scripts build-watch",
|
|
20
|
+
"start:preview": "cd preview && npm run start",
|
|
21
|
+
"start": "run-p build:watch start:preview",
|
|
22
|
+
"lint": "eslint --ext .ts,.tsx --quiet --fix .",
|
|
23
|
+
"lint:ci": "eslint --ext .ts,.tsx --quiet .",
|
|
24
|
+
"prepare": "run-s build"
|
|
26
25
|
},
|
|
27
26
|
"browserslist": {
|
|
28
27
|
"production": [
|
|
@@ -37,26 +36,28 @@
|
|
|
37
36
|
]
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@babel/cli": "^7.17.
|
|
39
|
+
"@babel/cli": "^7.17.10",
|
|
41
40
|
"@emotion/react": "^11.9.0",
|
|
42
41
|
"@emotion/styled": "^11.8.1",
|
|
43
|
-
"@mui/icons-material": "^5.
|
|
44
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
45
|
-
"@mui/material": "^5.
|
|
42
|
+
"@mui/icons-material": "^5.8.0",
|
|
43
|
+
"@mui/lab": "^5.0.0-alpha.83",
|
|
44
|
+
"@mui/material": "^5.8.1",
|
|
46
45
|
"@testing-library/dom": "^8.13.0",
|
|
47
46
|
"@testing-library/jest-dom": "^5.16.4",
|
|
48
|
-
"@testing-library/react": "^13.
|
|
49
|
-
"@types/react": "^18.0.
|
|
50
|
-
"@types/react-dom": "^18.0.
|
|
47
|
+
"@testing-library/react": "^13.3.0",
|
|
48
|
+
"@types/react": "^18.0.9",
|
|
49
|
+
"@types/react-dom": "^18.0.5",
|
|
50
|
+
"andoncloud-library-scripts": "^1.0.0",
|
|
51
51
|
"babel-preset-react-app": "^10.0.1",
|
|
52
52
|
"cross-env": "^7.0.3",
|
|
53
53
|
"microbundle-crl": "^0.13.11",
|
|
54
|
-
"mobx": "^6.
|
|
55
|
-
"mobx-react-lite": "^3.
|
|
56
|
-
"
|
|
57
|
-
"react
|
|
54
|
+
"mobx": "^6.6.0",
|
|
55
|
+
"mobx-react-lite": "^3.4.0",
|
|
56
|
+
"npm-run-all": "^4.1.5",
|
|
57
|
+
"react": "^18.1.0",
|
|
58
|
+
"react-dom": "^18.1.0",
|
|
58
59
|
"react-router-dom": "^6.3.0",
|
|
59
|
-
"react-scripts": "^5.0.
|
|
60
|
+
"react-scripts": "^5.0.1"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
63
|
"@emotion/react": "^11.0.0",
|
|
@@ -72,8 +73,6 @@
|
|
|
72
73
|
"react-router-dom": "^6.0.0"
|
|
73
74
|
},
|
|
74
75
|
"files": [
|
|
75
|
-
"dist"
|
|
76
|
-
"src/index.d.ts",
|
|
77
|
-
"src/images"
|
|
76
|
+
"dist"
|
|
78
77
|
]
|
|
79
78
|
}
|
package/src/index.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import toast from "react-hot-toast";
|
|
2
|
-
|
|
3
|
-
declare module "andoncloud-sdk" {
|
|
4
|
-
interface NavItem {
|
|
5
|
-
label: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
action?: () => void;
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface MenuItem {
|
|
12
|
-
label: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
action?: () => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface AuthProps {
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
loginUrl?: string;
|
|
20
|
-
redirectUri?: string;
|
|
21
|
-
redirectPath?: string;
|
|
22
|
-
clientId: string;
|
|
23
|
-
grantType?: "authorization_code" | "password";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface AppProps {
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
baseUrl: string;
|
|
29
|
-
authProps: AuthProps;
|
|
30
|
-
muiTheme?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export const App: React.FC<AppProps>;
|
|
33
|
-
|
|
34
|
-
interface NavProps {
|
|
35
|
-
items?: NavItem[];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface UserProps {
|
|
39
|
-
show?: boolean;
|
|
40
|
-
showCompanyLogo?: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface MenuProps {
|
|
44
|
-
items?: MenuItem[];
|
|
45
|
-
buttonColor?: string;
|
|
46
|
-
dropdownStyles?: React.CSSProperties;
|
|
47
|
-
styles?: React.CSSProperties;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface HeaderProps {
|
|
51
|
-
position?: "absolute" | "fixed" | "relative" | "static" | "sticky";
|
|
52
|
-
showAcLogo?: boolean;
|
|
53
|
-
leadingText: string;
|
|
54
|
-
title?: string;
|
|
55
|
-
navProps?: NavProps;
|
|
56
|
-
userProps?: UserProps;
|
|
57
|
-
menuProps?: MenuProps;
|
|
58
|
-
styles?: React.CSSProperties;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface ContainerProps {
|
|
62
|
-
children: React.ReactNode;
|
|
63
|
-
headerProps: HeaderProps;
|
|
64
|
-
styles?: React.CSSProperties;
|
|
65
|
-
}
|
|
66
|
-
export const Container: React.FC<ContainerProps>;
|
|
67
|
-
|
|
68
|
-
interface UserData {
|
|
69
|
-
id: number;
|
|
70
|
-
companyId: number;
|
|
71
|
-
roleId: number;
|
|
72
|
-
username: string;
|
|
73
|
-
email: string;
|
|
74
|
-
name: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface Session {
|
|
78
|
-
user: UserData;
|
|
79
|
-
accessToken: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
interface LoginProps {
|
|
83
|
-
title?: string;
|
|
84
|
-
subtitle?: string;
|
|
85
|
-
redirectPath?: string;
|
|
86
|
-
storeSession?: boolean;
|
|
87
|
-
onSuccess?: (session: Session) => void;
|
|
88
|
-
onFailure?: () => void;
|
|
89
|
-
onCancel?: () => void;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export const useLogin: (scope: string, loginProps?: LoginProps) => () => void;
|
|
93
|
-
|
|
94
|
-
interface LoginStatus {
|
|
95
|
-
status: "connected" | "not_authorized" | "unknown";
|
|
96
|
-
authResponse?: {
|
|
97
|
-
user: UserData;
|
|
98
|
-
accessToken: string;
|
|
99
|
-
tokenType: string;
|
|
100
|
-
expiresIn: string;
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const useLoginStatus: () => LoginStatus;
|
|
105
|
-
|
|
106
|
-
export const logout: () => void;
|
|
107
|
-
|
|
108
|
-
export const setLocale: (lang: string) => void;
|
|
109
|
-
|
|
110
|
-
export const notify: typeof toast;
|
|
111
|
-
}
|