namirasoft-account-react 1.4.19 → 1.4.21
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/.env.template +10 -10
- package/config-overrides.js +72 -72
- package/dist/IEntityInfo.d.ts +11 -11
- package/dist/Messages.js.map +1 -1
- package/dist/NSARouterMaker.d.ts +0 -1
- package/dist/NSARouterMaker.js.map +1 -1
- package/dist/Router.d.ts +0 -1
- package/dist/components/NSAAccessListDialog.js.map +1 -1
- package/dist/components/NSAAccessListDialog.module.css +87 -0
- package/dist/components/NSABoxOTP.js.map +1 -1
- package/dist/components/NSABoxOTP.module.css +11 -0
- package/dist/components/NSAMessageListDialog.js.map +1 -1
- package/dist/components/NSAMessageListDialog.module.css +98 -0
- package/dist/components/NSAProductListDialog.js.map +1 -1
- package/dist/components/NSAProductListDialog.module.css +45 -0
- package/dist/components/NSAWorkspaceListDialog.js.map +1 -1
- package/dist/components/NSAWorkspaceListDialog.module.css +43 -0
- package/dist/index.js.map +1 -1
- package/dist/layouts/Actions.d.ts +2 -1
- package/dist/layouts/Actions.js +38 -17
- package/dist/layouts/Actions.js.map +1 -1
- package/dist/layouts/NSALayout.d.ts +2 -1
- package/dist/layouts/NSALayout.js +58 -37
- package/dist/layouts/NSALayout.js.map +1 -1
- package/dist/layouts/NSASectionEdit.d.ts +0 -1
- package/dist/layouts/NSASectionEdit.js +12 -8
- package/dist/layouts/NSASectionEdit.js.map +1 -1
- package/dist/layouts/NSASectionList.js +6 -4
- package/dist/layouts/NSASectionList.js.map +1 -1
- package/dist/layouts/NSASectionTabs.d.ts +0 -1
- package/dist/layouts/NSASectionTabs.js +4 -7
- package/dist/layouts/NSASectionTabs.js.map +1 -1
- package/dist/layouts/NSASectionView.js +4 -3
- package/dist/layouts/NSASectionView.js.map +1 -1
- package/dist/pages/NSAHomePage.module.css +23 -0
- package/dist/pages/NSALoginPage.module.css +20 -0
- package/dist/pages/NSAVerificationPage.module.css +23 -0
- package/package.json +70 -70
- package/public/index.html +21 -21
- package/src/App.css +31 -31
- package/src/App.tsx +18 -18
- package/src/IEntityInfo.ts +31 -31
- package/src/INSARouterMaker.ts +7 -7
- package/src/INSARouterProps.ts +17 -17
- package/src/INSARouterState.ts +5 -5
- package/src/Info.ts +20 -20
- package/src/Message.ts +6 -6
- package/src/Messages.ts +33 -33
- package/src/NSARouterMaker.tsx +142 -142
- package/src/Router.tsx +39 -39
- package/src/components/NSAAccessListDialog.module.css +86 -86
- package/src/components/NSAAccessListDialog.tsx +160 -160
- package/src/components/NSABoxOTP.module.css +10 -10
- package/src/components/NSABoxOTP.tsx +63 -63
- package/src/components/NSAMessageListDialog.module.css +97 -97
- package/src/components/NSAMessageListDialog.tsx +116 -116
- package/src/components/NSAProductListDialog.module.css +44 -44
- package/src/components/NSAProductListDialog.tsx +100 -100
- package/src/components/NSAWorkspaceListDialog.module.css +42 -42
- package/src/components/NSAWorkspaceListDialog.tsx +73 -73
- package/src/index.tsx +24 -24
- package/src/layouts/Actions.ts +147 -119
- package/src/layouts/Menus.ts +15 -15
- package/src/layouts/NSALayout.tsx +417 -387
- package/src/layouts/NSASectionEdit.tsx +144 -140
- package/src/layouts/NSASectionList.tsx +161 -158
- package/src/layouts/NSASectionTabs.tsx +152 -156
- package/src/layouts/NSASectionView.tsx +61 -60
- package/src/main.ts +19 -19
- package/src/pages/NSAHomePage.module.css +22 -22
- package/src/pages/NSAHomePage.tsx +27 -27
- package/src/pages/NSALoginPage.module.css +19 -19
- package/src/pages/NSALoginPage.tsx +65 -65
- package/src/pages/NSAVerificationPage.module.css +22 -22
- package/src/pages/NSAVerificationPage.tsx +59 -59
- package/tsconfig.json +43 -43
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.nsa_verification_container {
|
|
2
|
+
background-color: #FFF;
|
|
3
|
+
border: 1px solid #A1A4B0;
|
|
4
|
+
backdrop-filter: blur(5px);
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 594px;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
color: #141B5C !important;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 16px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.nsa_verification_container p {
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.nsa_verification_vector {
|
|
21
|
+
width: 224px;
|
|
22
|
+
height: 224px;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "namirasoft-account-react",
|
|
3
|
-
"title": "Namirasoft Account React NPM Package",
|
|
4
|
-
"description": "Namira Software Corporation Account React NPM Package",
|
|
5
|
-
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/image/namirasoft/account/logo/base.png",
|
|
7
|
-
"language": "ts",
|
|
8
|
-
"framework": "npm",
|
|
9
|
-
"application": "package",
|
|
10
|
-
"private": false,
|
|
11
|
-
"version": "1.4.
|
|
12
|
-
"author": "Amir Abolhasani",
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"main": "./dist/main.js",
|
|
15
|
-
"types": "./dist/main.d.ts",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"start": "react-app-rewired start",
|
|
18
|
-
"build": "npm run copy",
|
|
19
|
-
"test": "react-app-rewired test",
|
|
20
|
-
"eject": "react-app-rewired eject",
|
|
21
|
-
"copy": "copyfiles -u 1 src/**/*.html src/**/*.css src/**/*.svg src/**/*.png src/**/*.jpg dist/"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@types/device-uuid": "^1.0.3",
|
|
25
|
-
"@types/react": "^18.3.5",
|
|
26
|
-
"device-uuid": "^1.0.4",
|
|
27
|
-
"namirasoft-access": "^1.4.7",
|
|
28
|
-
"namirasoft-account": "^1.4.
|
|
29
|
-
"namirasoft-account-client": "^1.4.0",
|
|
30
|
-
"namirasoft-api-product": "^1.4.3",
|
|
31
|
-
"namirasoft-core": "^1.4.7",
|
|
32
|
-
"namirasoft-field": "^1.3.11",
|
|
33
|
-
"namirasoft-history": "^1.4.3",
|
|
34
|
-
"namirasoft-message": "^1.4.2",
|
|
35
|
-
"namirasoft-site-react": "^1.4.
|
|
36
|
-
"namirasoft-workspace": "^1.4.0",
|
|
37
|
-
"os-browserify": "^0.3.0",
|
|
38
|
-
"path-browserify": "^1.0.1",
|
|
39
|
-
"process": "^0.11.10",
|
|
40
|
-
"query-string": "^9.1.0",
|
|
41
|
-
"react": "^18.3.1",
|
|
42
|
-
"react-app-rewired": "^2.2.1",
|
|
43
|
-
"react-dom": "^18.3.1",
|
|
44
|
-
"react-router-dom": "^6.26.2",
|
|
45
|
-
"react-scripts": "5.0.1",
|
|
46
|
-
"run": "^1.5.0"
|
|
47
|
-
},
|
|
48
|
-
"eslintConfig": {
|
|
49
|
-
"extends": [
|
|
50
|
-
"react-app",
|
|
51
|
-
"react-app/jest"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"skip": {
|
|
55
|
-
"files": [
|
|
56
|
-
"/tsconfig.json"
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
"browserslist": {
|
|
60
|
-
"production": [
|
|
61
|
-
">0.2%",
|
|
62
|
-
"not dead",
|
|
63
|
-
"not op_mini all"
|
|
64
|
-
],
|
|
65
|
-
"development": [
|
|
66
|
-
"last 1 chrome version",
|
|
67
|
-
"last 1 firefox version",
|
|
68
|
-
"last 1 safari version"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-account-react",
|
|
3
|
+
"title": "Namirasoft Account React NPM Package",
|
|
4
|
+
"description": "Namira Software Corporation Account React NPM Package",
|
|
5
|
+
"icon": "logo.png",
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/account/logo/base.png",
|
|
7
|
+
"language": "ts",
|
|
8
|
+
"framework": "npm",
|
|
9
|
+
"application": "package",
|
|
10
|
+
"private": false,
|
|
11
|
+
"version": "1.4.21",
|
|
12
|
+
"author": "Amir Abolhasani",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "./dist/main.js",
|
|
15
|
+
"types": "./dist/main.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"start": "react-app-rewired start",
|
|
18
|
+
"build": "npm run copy",
|
|
19
|
+
"test": "react-app-rewired test",
|
|
20
|
+
"eject": "react-app-rewired eject",
|
|
21
|
+
"copy": "copyfiles -u 1 src/**/*.html src/**/*.css src/**/*.svg src/**/*.png src/**/*.jpg dist/"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@types/device-uuid": "^1.0.3",
|
|
25
|
+
"@types/react": "^18.3.5",
|
|
26
|
+
"device-uuid": "^1.0.4",
|
|
27
|
+
"namirasoft-access": "^1.4.7",
|
|
28
|
+
"namirasoft-account": "^1.4.11",
|
|
29
|
+
"namirasoft-account-client": "^1.4.0",
|
|
30
|
+
"namirasoft-api-product": "^1.4.3",
|
|
31
|
+
"namirasoft-core": "^1.4.7",
|
|
32
|
+
"namirasoft-field": "^1.3.11",
|
|
33
|
+
"namirasoft-history": "^1.4.3",
|
|
34
|
+
"namirasoft-message": "^1.4.2",
|
|
35
|
+
"namirasoft-site-react": "^1.4.1",
|
|
36
|
+
"namirasoft-workspace": "^1.4.0",
|
|
37
|
+
"os-browserify": "^0.3.0",
|
|
38
|
+
"path-browserify": "^1.0.1",
|
|
39
|
+
"process": "^0.11.10",
|
|
40
|
+
"query-string": "^9.1.0",
|
|
41
|
+
"react": "^18.3.1",
|
|
42
|
+
"react-app-rewired": "^2.2.1",
|
|
43
|
+
"react-dom": "^18.3.1",
|
|
44
|
+
"react-router-dom": "^6.26.2",
|
|
45
|
+
"react-scripts": "5.0.1",
|
|
46
|
+
"run": "^1.5.0"
|
|
47
|
+
},
|
|
48
|
+
"eslintConfig": {
|
|
49
|
+
"extends": [
|
|
50
|
+
"react-app",
|
|
51
|
+
"react-app/jest"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"skip": {
|
|
55
|
+
"files": [
|
|
56
|
+
"/tsconfig.json"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"browserslist": {
|
|
60
|
+
"production": [
|
|
61
|
+
">0.2%",
|
|
62
|
+
"not dead",
|
|
63
|
+
"not op_mini all"
|
|
64
|
+
],
|
|
65
|
+
"development": [
|
|
66
|
+
"last 1 chrome version",
|
|
67
|
+
"last 1 firefox version",
|
|
68
|
+
"last 1 safari version"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
71
|
}
|
package/public/index.html
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
-
<meta name="theme-color" content="#000000" />
|
|
9
|
-
<meta name="description" content="Web site created using create-react-app" />
|
|
10
|
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
11
|
-
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
|
|
12
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
-
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
|
14
|
-
<title>React App</title>
|
|
15
|
-
</head>
|
|
16
|
-
|
|
17
|
-
<body>
|
|
18
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
19
|
-
<div id="root"></div>
|
|
20
|
-
</body>
|
|
21
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<meta name="theme-color" content="#000000" />
|
|
9
|
+
<meta name="description" content="Web site created using create-react-app" />
|
|
10
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
11
|
+
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
|
14
|
+
<title>React App</title>
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
19
|
+
<div id="root"></div>
|
|
20
|
+
</body>
|
|
21
|
+
|
|
22
22
|
</html>
|
package/src/App.css
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: inter;
|
|
3
|
-
src: url("../src/assets/fonts/Inter-Regular.ttf");
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
body {
|
|
7
|
-
margin: 0;
|
|
8
|
-
font-family: inter;
|
|
9
|
-
-webkit-font-smoothing: antialiased;
|
|
10
|
-
-moz-osx-font-smoothing: grayscale;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.btn-close {
|
|
15
|
-
background: url(https://static.namirasoft.com/image/concept/close/blue.svg) center/1em auto no-repeat !important;
|
|
16
|
-
opacity: 1 !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.nsa_font_16_bold {
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nsa_font_13_normal {
|
|
25
|
-
font-size: 13px;
|
|
26
|
-
font-weight: 300;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nsa_font_12_normal {
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
font-weight: 300;
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: inter;
|
|
3
|
+
src: url("../src/assets/fonts/Inter-Regular.ttf");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
margin: 0;
|
|
8
|
+
font-family: inter;
|
|
9
|
+
-webkit-font-smoothing: antialiased;
|
|
10
|
+
-moz-osx-font-smoothing: grayscale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
.btn-close {
|
|
15
|
+
background: url(https://static.namirasoft.com/image/concept/close/blue.svg) center/1em auto no-repeat !important;
|
|
16
|
+
opacity: 1 !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.nsa_font_16_bold {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nsa_font_13_normal {
|
|
25
|
+
font-size: 13px;
|
|
26
|
+
font-weight: 300;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nsa_font_12_normal {
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
font-weight: 300;
|
|
32
32
|
}
|
package/src/App.tsx
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { NSAProductListDialog } from "./components/NSAProductListDialog";
|
|
2
|
-
import { INSARouterProps } from "./INSARouterProps";
|
|
3
|
-
import { NSALayout } from "./layouts/NSALayout";
|
|
4
|
-
export interface AppProps extends INSARouterProps
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export function App(props: AppProps)
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<>
|
|
13
|
-
<NSAProductListDialog {...props} onClose={() => { }}>
|
|
14
|
-
<></>
|
|
15
|
-
</NSAProductListDialog>
|
|
16
|
-
<NSALayout/>
|
|
17
|
-
</>
|
|
18
|
-
);
|
|
1
|
+
import { NSAProductListDialog } from "./components/NSAProductListDialog";
|
|
2
|
+
import { INSARouterProps } from "./INSARouterProps";
|
|
3
|
+
import { NSALayout } from "./layouts/NSALayout";
|
|
4
|
+
export interface AppProps extends INSARouterProps
|
|
5
|
+
{
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
export function App(props: AppProps)
|
|
9
|
+
{
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<NSAProductListDialog {...props} onClose={() => { }}>
|
|
14
|
+
<></>
|
|
15
|
+
</NSAProductListDialog>
|
|
16
|
+
<NSALayout/>
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
19
|
};
|
package/src/IEntityInfo.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { BaseMetaTable, FilterItem } from "namirasoft-core";
|
|
2
|
-
import { INSActionMenuProps, TableColumnInfo } from "namirasoft-site-react";
|
|
3
|
-
|
|
4
|
-
export interface IEntityInfo<EntityType extends { id: string }, EntityTypeInput = EntityType>
|
|
5
|
-
{
|
|
6
|
-
product_id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
tables: { table: BaseMetaTable, required: boolean }[];
|
|
9
|
-
server: {
|
|
10
|
-
value_list: (table: string, column: string) => Promise<string[]>;
|
|
11
|
-
get: (id: string) => Promise<EntityType
|
|
12
|
-
list: (filters: FilterItem[] | null, page: (number | null), size: (number | null)) => Promise<{
|
|
13
|
-
rows: EntityType[];
|
|
14
|
-
count: number;
|
|
15
|
-
}
|
|
16
|
-
create: (entity: EntityTypeInput) => Promise<EntityType
|
|
17
|
-
update: (id: string, entity: EntityTypeInput) => Promise<EntityType
|
|
18
|
-
delete: (id: string) => Promise<void
|
|
19
|
-
};
|
|
20
|
-
client: {
|
|
21
|
-
getListURL: () => string;
|
|
22
|
-
getNewURL: () => string;
|
|
23
|
-
getCopyURL: (id: string) => string;
|
|
24
|
-
getEditURL: (id: string) => string;
|
|
25
|
-
getViewURL: (id: string) => string;
|
|
26
|
-
getColumns: () => TableColumnInfo[];
|
|
27
|
-
onCreate?: (entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
28
|
-
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
29
|
-
onSuccess?: (entity: EntityType) => void;
|
|
30
|
-
getMenus?: (getIDs: () => string[]) => { [group: string]: INSActionMenuProps[]; }
|
|
31
|
-
}
|
|
1
|
+
import { BaseMetaTable, FilterItem } from "namirasoft-core";
|
|
2
|
+
import { INSActionMenuProps, TableColumnInfo } from "namirasoft-site-react";
|
|
3
|
+
|
|
4
|
+
export interface IEntityInfo<EntityType extends { id: string }, EntityTypeInput = EntityType>
|
|
5
|
+
{
|
|
6
|
+
product_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
tables: { table: BaseMetaTable, required: boolean }[];
|
|
9
|
+
server: {
|
|
10
|
+
value_list: (table: string, column: string) => Promise<string[]>;
|
|
11
|
+
get: null | ((id: string) => Promise<EntityType>);
|
|
12
|
+
list: null | ((filters: FilterItem[] | null, page: (number | null), size: (number | null)) => Promise<{
|
|
13
|
+
rows: EntityType[];
|
|
14
|
+
count: number;
|
|
15
|
+
}>);
|
|
16
|
+
create: null | ((entity: EntityTypeInput) => Promise<EntityType>);
|
|
17
|
+
update: null | ((id: string, entity: EntityTypeInput) => Promise<EntityType>);
|
|
18
|
+
delete: null | ((id: string) => Promise<void>);
|
|
19
|
+
};
|
|
20
|
+
client: {
|
|
21
|
+
getListURL: null | (() => string);
|
|
22
|
+
getNewURL: null | (() => string);
|
|
23
|
+
getCopyURL: null | ((id: string) => string);
|
|
24
|
+
getEditURL: null | ((id: string) => string);
|
|
25
|
+
getViewURL: null | ((id: string) => string);
|
|
26
|
+
getColumns: () => TableColumnInfo[];
|
|
27
|
+
onCreate?: (entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
28
|
+
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
29
|
+
onSuccess?: (entity: EntityType) => void;
|
|
30
|
+
getMenus?: (getIDs: () => string[]) => { [group: string]: INSActionMenuProps[]; }
|
|
31
|
+
}
|
|
32
32
|
}
|
package/src/INSARouterMaker.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { INSARouterProps } from "./INSARouterProps";
|
|
3
|
-
|
|
4
|
-
export interface INSARouterMaker
|
|
5
|
-
{
|
|
6
|
-
onRenderOnLogin(props: INSARouterProps): React.JSX.Element;
|
|
7
|
-
onRenderOnLogout(props: INSARouterProps, banned: boolean): React.JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { INSARouterProps } from "./INSARouterProps";
|
|
3
|
+
|
|
4
|
+
export interface INSARouterMaker
|
|
5
|
+
{
|
|
6
|
+
onRenderOnLogin(props: INSARouterProps): React.JSX.Element;
|
|
7
|
+
onRenderOnLogout(props: INSARouterProps, banned: boolean): React.JSX.Element;
|
|
8
8
|
}
|
package/src/INSARouterProps.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { NamirasoftAccountServer, TokenManager } from "namirasoft-account";
|
|
2
|
-
import { ParsedNameValue } from "namirasoft-core";
|
|
3
|
-
import { INSRouterProps } from "namirasoft-site-react";
|
|
4
|
-
import { ParsedQuery } from "query-string";
|
|
5
|
-
|
|
6
|
-
export interface INSARouterProps extends INSRouterProps
|
|
7
|
-
{
|
|
8
|
-
account: {
|
|
9
|
-
token_manager: TokenManager
|
|
10
|
-
server: NamirasoftAccountServer;
|
|
11
|
-
},
|
|
12
|
-
url: {
|
|
13
|
-
getQueryStrings(): ParsedQuery;
|
|
14
|
-
getQuery(name: string): string;
|
|
15
|
-
getLink(sub: string, customQuery: { [name: string]: ParsedNameValue }): string;
|
|
16
|
-
redirect(sub: string, customQuery: { [name: string]: ParsedNameValue }): void;
|
|
17
|
-
}
|
|
1
|
+
import { NamirasoftAccountServer, TokenManager } from "namirasoft-account";
|
|
2
|
+
import { ParsedNameValue } from "namirasoft-core";
|
|
3
|
+
import { INSRouterProps } from "namirasoft-site-react";
|
|
4
|
+
import { ParsedQuery } from "query-string";
|
|
5
|
+
|
|
6
|
+
export interface INSARouterProps extends INSRouterProps
|
|
7
|
+
{
|
|
8
|
+
account: {
|
|
9
|
+
token_manager: TokenManager
|
|
10
|
+
server: NamirasoftAccountServer;
|
|
11
|
+
},
|
|
12
|
+
url: {
|
|
13
|
+
getQueryStrings(): ParsedQuery;
|
|
14
|
+
getQuery(name: string): string;
|
|
15
|
+
getLink(sub: string, customQuery: { [name: string]: ParsedNameValue }): string;
|
|
16
|
+
redirect(sub: string, customQuery: { [name: string]: ParsedNameValue }): void;
|
|
17
|
+
}
|
|
18
18
|
}
|
package/src/INSARouterState.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { INSRouterState } from "namirasoft-site-react";
|
|
2
|
-
|
|
3
|
-
export interface INSARouterState extends INSRouterState
|
|
4
|
-
{
|
|
5
|
-
inited?: boolean;
|
|
1
|
+
import { INSRouterState } from "namirasoft-site-react";
|
|
2
|
+
|
|
3
|
+
export interface INSARouterState extends INSRouterState
|
|
4
|
+
{
|
|
5
|
+
inited?: boolean;
|
|
6
6
|
}
|
package/src/Info.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ParsedQuery } from 'query-string';
|
|
2
|
-
import DeviceUUID from "device-uuid";
|
|
3
|
-
|
|
4
|
-
export class Info
|
|
5
|
-
{
|
|
6
|
-
static getDeviceName(query: ParsedQuery)
|
|
7
|
-
{
|
|
8
|
-
var du = new DeviceUUID.DeviceUUID().parse();
|
|
9
|
-
return query.device ?? (du.platform + " " + du.version);
|
|
10
|
-
}
|
|
11
|
-
static getVersion()
|
|
12
|
-
{
|
|
13
|
-
var du = new DeviceUUID.DeviceUUID().parse();
|
|
14
|
-
return du.version;
|
|
15
|
-
}
|
|
16
|
-
static getOS(query: ParsedQuery)
|
|
17
|
-
{
|
|
18
|
-
var du = new DeviceUUID.DeviceUUID().parse();
|
|
19
|
-
return query.os ?? du.os;
|
|
20
|
-
}
|
|
1
|
+
import { ParsedQuery } from 'query-string';
|
|
2
|
+
import DeviceUUID from "device-uuid";
|
|
3
|
+
|
|
4
|
+
export class Info
|
|
5
|
+
{
|
|
6
|
+
static getDeviceName(query: ParsedQuery)
|
|
7
|
+
{
|
|
8
|
+
var du = new DeviceUUID.DeviceUUID().parse();
|
|
9
|
+
return query.device ?? (du.platform + " " + du.version);
|
|
10
|
+
}
|
|
11
|
+
static getVersion()
|
|
12
|
+
{
|
|
13
|
+
var du = new DeviceUUID.DeviceUUID().parse();
|
|
14
|
+
return du.version;
|
|
15
|
+
}
|
|
16
|
+
static getOS(query: ParsedQuery)
|
|
17
|
+
{
|
|
18
|
+
var du = new DeviceUUID.DeviceUUID().parse();
|
|
19
|
+
return query.os ?? du.os;
|
|
20
|
+
}
|
|
21
21
|
};
|
package/src/Message.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface Message
|
|
2
|
-
{
|
|
3
|
-
scope: string;
|
|
4
|
-
name: string;
|
|
5
|
-
action: string;
|
|
6
|
-
result: string;
|
|
1
|
+
export interface Message
|
|
2
|
+
{
|
|
3
|
+
scope: string;
|
|
4
|
+
name: string;
|
|
5
|
+
action: string;
|
|
6
|
+
result: string;
|
|
7
7
|
}
|
package/src/Messages.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Message } from "./Message";
|
|
2
|
-
|
|
3
|
-
export class Messages
|
|
4
|
-
{
|
|
5
|
-
static login(): Message
|
|
6
|
-
{
|
|
7
|
-
return {
|
|
8
|
-
scope: "namirasoft",
|
|
9
|
-
name: "account",
|
|
10
|
-
action: "login",
|
|
11
|
-
result: "successful",
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
static isTheSame(a: Message, b: Message)
|
|
15
|
-
{
|
|
16
|
-
if (a.scope === b.scope)
|
|
17
|
-
if (a.name === b.name)
|
|
18
|
-
if (a.action === b.action)
|
|
19
|
-
if (a.result === b.result)
|
|
20
|
-
return true;
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
static isLogin(message: string)
|
|
24
|
-
{
|
|
25
|
-
try
|
|
26
|
-
{
|
|
27
|
-
let value: Message = JSON.parse(message) as Message;
|
|
28
|
-
return Messages.isTheSame(Messages.login(), value);
|
|
29
|
-
} catch (error)
|
|
30
|
-
{
|
|
31
|
-
}
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
1
|
+
import { Message } from "./Message";
|
|
2
|
+
|
|
3
|
+
export class Messages
|
|
4
|
+
{
|
|
5
|
+
static login(): Message
|
|
6
|
+
{
|
|
7
|
+
return {
|
|
8
|
+
scope: "namirasoft",
|
|
9
|
+
name: "account",
|
|
10
|
+
action: "login",
|
|
11
|
+
result: "successful",
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
static isTheSame(a: Message, b: Message)
|
|
15
|
+
{
|
|
16
|
+
if (a.scope === b.scope)
|
|
17
|
+
if (a.name === b.name)
|
|
18
|
+
if (a.action === b.action)
|
|
19
|
+
if (a.result === b.result)
|
|
20
|
+
return true;
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
static isLogin(message: string)
|
|
24
|
+
{
|
|
25
|
+
try
|
|
26
|
+
{
|
|
27
|
+
let value: Message = JSON.parse(message) as Message;
|
|
28
|
+
return Messages.isTheSame(Messages.login(), value);
|
|
29
|
+
} catch (error)
|
|
30
|
+
{
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
34
|
}
|