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.
Files changed (76) hide show
  1. package/.env.template +10 -10
  2. package/config-overrides.js +72 -72
  3. package/dist/IEntityInfo.d.ts +11 -11
  4. package/dist/Messages.js.map +1 -1
  5. package/dist/NSARouterMaker.d.ts +0 -1
  6. package/dist/NSARouterMaker.js.map +1 -1
  7. package/dist/Router.d.ts +0 -1
  8. package/dist/components/NSAAccessListDialog.js.map +1 -1
  9. package/dist/components/NSAAccessListDialog.module.css +87 -0
  10. package/dist/components/NSABoxOTP.js.map +1 -1
  11. package/dist/components/NSABoxOTP.module.css +11 -0
  12. package/dist/components/NSAMessageListDialog.js.map +1 -1
  13. package/dist/components/NSAMessageListDialog.module.css +98 -0
  14. package/dist/components/NSAProductListDialog.js.map +1 -1
  15. package/dist/components/NSAProductListDialog.module.css +45 -0
  16. package/dist/components/NSAWorkspaceListDialog.js.map +1 -1
  17. package/dist/components/NSAWorkspaceListDialog.module.css +43 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/layouts/Actions.d.ts +2 -1
  20. package/dist/layouts/Actions.js +38 -17
  21. package/dist/layouts/Actions.js.map +1 -1
  22. package/dist/layouts/NSALayout.d.ts +2 -1
  23. package/dist/layouts/NSALayout.js +58 -37
  24. package/dist/layouts/NSALayout.js.map +1 -1
  25. package/dist/layouts/NSASectionEdit.d.ts +0 -1
  26. package/dist/layouts/NSASectionEdit.js +12 -8
  27. package/dist/layouts/NSASectionEdit.js.map +1 -1
  28. package/dist/layouts/NSASectionList.js +6 -4
  29. package/dist/layouts/NSASectionList.js.map +1 -1
  30. package/dist/layouts/NSASectionTabs.d.ts +0 -1
  31. package/dist/layouts/NSASectionTabs.js +4 -7
  32. package/dist/layouts/NSASectionTabs.js.map +1 -1
  33. package/dist/layouts/NSASectionView.js +4 -3
  34. package/dist/layouts/NSASectionView.js.map +1 -1
  35. package/dist/pages/NSAHomePage.module.css +23 -0
  36. package/dist/pages/NSALoginPage.module.css +20 -0
  37. package/dist/pages/NSAVerificationPage.module.css +23 -0
  38. package/package.json +70 -70
  39. package/public/index.html +21 -21
  40. package/src/App.css +31 -31
  41. package/src/App.tsx +18 -18
  42. package/src/IEntityInfo.ts +31 -31
  43. package/src/INSARouterMaker.ts +7 -7
  44. package/src/INSARouterProps.ts +17 -17
  45. package/src/INSARouterState.ts +5 -5
  46. package/src/Info.ts +20 -20
  47. package/src/Message.ts +6 -6
  48. package/src/Messages.ts +33 -33
  49. package/src/NSARouterMaker.tsx +142 -142
  50. package/src/Router.tsx +39 -39
  51. package/src/components/NSAAccessListDialog.module.css +86 -86
  52. package/src/components/NSAAccessListDialog.tsx +160 -160
  53. package/src/components/NSABoxOTP.module.css +10 -10
  54. package/src/components/NSABoxOTP.tsx +63 -63
  55. package/src/components/NSAMessageListDialog.module.css +97 -97
  56. package/src/components/NSAMessageListDialog.tsx +116 -116
  57. package/src/components/NSAProductListDialog.module.css +44 -44
  58. package/src/components/NSAProductListDialog.tsx +100 -100
  59. package/src/components/NSAWorkspaceListDialog.module.css +42 -42
  60. package/src/components/NSAWorkspaceListDialog.tsx +73 -73
  61. package/src/index.tsx +24 -24
  62. package/src/layouts/Actions.ts +147 -119
  63. package/src/layouts/Menus.ts +15 -15
  64. package/src/layouts/NSALayout.tsx +417 -387
  65. package/src/layouts/NSASectionEdit.tsx +144 -140
  66. package/src/layouts/NSASectionList.tsx +161 -158
  67. package/src/layouts/NSASectionTabs.tsx +152 -156
  68. package/src/layouts/NSASectionView.tsx +61 -60
  69. package/src/main.ts +19 -19
  70. package/src/pages/NSAHomePage.module.css +22 -22
  71. package/src/pages/NSAHomePage.tsx +27 -27
  72. package/src/pages/NSALoginPage.module.css +19 -19
  73. package/src/pages/NSALoginPage.tsx +65 -65
  74. package/src/pages/NSAVerificationPage.module.css +22 -22
  75. package/src/pages/NSAVerificationPage.tsx +59 -59
  76. package/tsconfig.json +43 -43
@@ -1,66 +1,66 @@
1
- import { useEffect } from 'react';
2
- import Styles from './NSALoginPage.module.css';
3
-
4
- import { NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
5
- import { Messages } from '../Messages';
6
- import { PackageService } from 'namirasoft-core';
7
- import { EnvService } from "namirasoft-core/dist/EnvService";
8
-
9
- export interface NSALoginPageProps
10
- {
11
- title: string;
12
- logo: string;
13
- background: string;
14
- }
15
-
16
- export function NSALoginPage(props: NSALoginPageProps)
17
- {
18
- let REACT_APP_BASE_URL_ACCOUNT_CONSOLE = new EnvService("REACT_APP_BASE_URL_ACCOUNT_CONSOLE").getString();
19
- useEffect(() =>
20
- {
21
- const handleLoginSuccess = (event: any) =>
22
- {
23
- if (event.origin === REACT_APP_BASE_URL_ACCOUNT_CONSOLE)
24
- if (Messages.isLogin(event.data))
25
- window.location.reload();
26
- };
27
-
28
- window.addEventListener("message", handleLoginSuccess);
29
-
30
- return () =>
31
- {
32
- window.removeEventListener("message", handleLoginSuccess);
33
- };
34
- // eslint-disable-next-line react-hooks/exhaustive-deps
35
- }, []);
36
-
37
- return (
38
- <div
39
- style={{
40
- backgroundImage: `url(${props.background})`,
41
- width: '100%',
42
- backgroundSize: 'cover',
43
- backgroundAttachment: 'fixed'
44
- }}
45
- >
46
- <div className={Styles.ns_login_container} style={{ minHeight: '100vh' }}>
47
- <div className={Styles.ns_logo}>
48
- <img width={256} height={256} src={props.logo} alt={`${props.title} Logo`} />
49
- </div>
50
- <NSSpace size={NSSpaceSizeType.SMALL} />
51
- <div>
52
- <h1 className={Styles.ns_title}>{props.title}</h1>
53
- </div>
54
- <NSSpace size={NSSpaceSizeType.SMALL} />
55
- <span> Version: {PackageService.MainJson?.version} </span>
56
- <NSSpace size={NSSpaceSizeType.SMALL} />
57
- <div className={Styles.ns_button}>
58
- <NSButtonBlue title="Login" onClick={() =>
59
- {
60
- window.open(REACT_APP_BASE_URL_ACCOUNT_CONSOLE, "_blank", "");
61
- }} />
62
- </div>
63
- </div>
64
- </div>
65
- );
1
+ import { useEffect } from 'react';
2
+ import Styles from './NSALoginPage.module.css';
3
+
4
+ import { NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
5
+ import { Messages } from '../Messages';
6
+ import { PackageService } from 'namirasoft-core';
7
+ import { EnvService } from "namirasoft-core/dist/EnvService";
8
+
9
+ export interface NSALoginPageProps
10
+ {
11
+ title: string;
12
+ logo: string;
13
+ background: string;
14
+ }
15
+
16
+ export function NSALoginPage(props: NSALoginPageProps)
17
+ {
18
+ let REACT_APP_BASE_URL_ACCOUNT_CONSOLE = new EnvService("REACT_APP_BASE_URL_ACCOUNT_CONSOLE").getString();
19
+ useEffect(() =>
20
+ {
21
+ const handleLoginSuccess = (event: any) =>
22
+ {
23
+ if (event.origin === REACT_APP_BASE_URL_ACCOUNT_CONSOLE)
24
+ if (Messages.isLogin(event.data))
25
+ window.location.reload();
26
+ };
27
+
28
+ window.addEventListener("message", handleLoginSuccess);
29
+
30
+ return () =>
31
+ {
32
+ window.removeEventListener("message", handleLoginSuccess);
33
+ };
34
+ // eslint-disable-next-line react-hooks/exhaustive-deps
35
+ }, []);
36
+
37
+ return (
38
+ <div
39
+ style={{
40
+ backgroundImage: `url(${props.background})`,
41
+ width: '100%',
42
+ backgroundSize: 'cover',
43
+ backgroundAttachment: 'fixed'
44
+ }}
45
+ >
46
+ <div className={Styles.ns_login_container} style={{ minHeight: '100vh' }}>
47
+ <div className={Styles.ns_logo}>
48
+ <img width={256} height={256} src={props.logo} alt={`${props.title} Logo`} />
49
+ </div>
50
+ <NSSpace size={NSSpaceSizeType.SMALL} />
51
+ <div>
52
+ <h1 className={Styles.ns_title}>{props.title}</h1>
53
+ </div>
54
+ <NSSpace size={NSSpaceSizeType.SMALL} />
55
+ <span> Version: {PackageService.MainJson?.version} </span>
56
+ <NSSpace size={NSSpaceSizeType.SMALL} />
57
+ <div className={Styles.ns_button}>
58
+ <NSButtonBlue title="Login" onClick={() =>
59
+ {
60
+ window.open(REACT_APP_BASE_URL_ACCOUNT_CONSOLE, "_blank", "");
61
+ }} />
62
+ </div>
63
+ </div>
64
+ </div>
65
+ );
66
66
  }
@@ -1,23 +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;
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
23
  }
@@ -1,60 +1,60 @@
1
- import Styles from './NSAVerificationPage.module.css';
2
- import { IBaseComponentProps } from 'namirasoft-site-react';
3
- import { NSABoxOTP } from '../components/NSABoxOTP';
4
- import React, { useState } from "react";
5
- import { NSSection, NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
6
-
7
- export interface INSAVerificationPageProps extends IBaseComponentProps
8
- {
9
- contact_type: string;
10
- contact_value: string;
11
- onApply: (code: string) => void
12
- onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
- }
14
-
15
- export function NSAVerificationPage(props: INSAVerificationPageProps)
16
- {
17
- const [values, setValue] = useState<string>('');
18
- const [sendCode, setSendCode] = useState<boolean>(true);
19
-
20
- function onChanged(event: React.ChangeEvent<HTMLInputElement>): void
21
- {
22
- if (/^\d?$/.test(event.target.value))
23
- setValue(prevValues => [...prevValues, event.target.value].join(''));
24
- }
25
- function onApply(){
26
- props.onApply(values);
27
- setSendCode(false);
28
- setTimeout(() => setSendCode(true), 3000);
29
- }
30
- return (
31
- <>
32
- <NSSection center_items={true}>
33
- <div
34
- className={`${Styles.nsa_verification_container} ${props.classList?.join(" ")}`}
35
- style={props.style}
36
- >
37
- <img
38
- src={"https://static.namirasoft.com/image/concept/verification/purple.png"}
39
- alt={'verification vector'}
40
- className={Styles.nsa_verification_vector}
41
- />
42
- <div className='m-0'>
43
- <p className='m-2'>Type: {props.contact_type}</p>
44
- <p className='m-2'>Address: {props.contact_value}</p>
45
- </div>
46
- <p>Please enter code sent to {props.contact_value}</p>
47
- <NSABoxOTP onChanged={onChanged} />
48
- </div>
49
- <NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
50
- {
51
- sendCode ?
52
- <NSButtonBlue title="Apply" onClick={() => onApply()} />
53
- : <p className="nsa-color-blue">Please Wait</p>
54
- }
55
- <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
56
- <div className="nsa-font-16-normal ">Resend Code</div>
57
- </NSSection>
58
- </>
59
- );
1
+ import Styles from './NSAVerificationPage.module.css';
2
+ import { IBaseComponentProps } from 'namirasoft-site-react';
3
+ import { NSABoxOTP } from '../components/NSABoxOTP';
4
+ import React, { useState } from "react";
5
+ import { NSSection, NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
6
+
7
+ export interface INSAVerificationPageProps extends IBaseComponentProps
8
+ {
9
+ contact_type: string;
10
+ contact_value: string;
11
+ onApply: (code: string) => void
12
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ }
14
+
15
+ export function NSAVerificationPage(props: INSAVerificationPageProps)
16
+ {
17
+ const [values, setValue] = useState<string>('');
18
+ const [sendCode, setSendCode] = useState<boolean>(true);
19
+
20
+ function onChanged(event: React.ChangeEvent<HTMLInputElement>): void
21
+ {
22
+ if (/^\d?$/.test(event.target.value))
23
+ setValue(prevValues => [...prevValues, event.target.value].join(''));
24
+ }
25
+ function onApply(){
26
+ props.onApply(values);
27
+ setSendCode(false);
28
+ setTimeout(() => setSendCode(true), 3000);
29
+ }
30
+ return (
31
+ <>
32
+ <NSSection center_items={true}>
33
+ <div
34
+ className={`${Styles.nsa_verification_container} ${props.classList?.join(" ")}`}
35
+ style={props.style}
36
+ >
37
+ <img
38
+ src={"https://static.namirasoft.com/image/concept/verification/purple.png"}
39
+ alt={'verification vector'}
40
+ className={Styles.nsa_verification_vector}
41
+ />
42
+ <div className='m-0'>
43
+ <p className='m-2'>Type: {props.contact_type}</p>
44
+ <p className='m-2'>Address: {props.contact_value}</p>
45
+ </div>
46
+ <p>Please enter code sent to {props.contact_value}</p>
47
+ <NSABoxOTP onChanged={onChanged} />
48
+ </div>
49
+ <NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
50
+ {
51
+ sendCode ?
52
+ <NSButtonBlue title="Apply" onClick={() => onApply()} />
53
+ : <p className="nsa-color-blue">Please Wait</p>
54
+ }
55
+ <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
56
+ <div className="nsa-font-16-normal ">Resend Code</div>
57
+ </NSSection>
58
+ </>
59
+ );
60
60
  }
package/tsconfig.json CHANGED
@@ -1,44 +1,44 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- "jsx": "react-jsx",
5
- "moduleResolution": "node",
6
- "rootDir": "./src",
7
- "outDir": "./dist",
8
- "lib": [
9
- "dom",
10
- "dom.iterable",
11
- "esnext"
12
- ],
13
- "allowJs": false,
14
- "checkJs": false,
15
- "strict": true,
16
- "esModuleInterop": true,
17
- "sourceMap": true,
18
- "resolveJsonModule": true,
19
- "declaration": true,
20
- "noUnusedLocals": true,
21
- "noUnusedParameters": true,
22
- "noImplicitAny": true,
23
- "noImplicitOverride": true,
24
- "noImplicitReturns": true,
25
- "noImplicitThis": true,
26
- "skipLibCheck": true,
27
- "allowSyntheticDefaultImports": true,
28
- "forceConsistentCasingInFileNames": true,
29
- "noFallthroughCasesInSwitch": true,
30
- "isolatedModules": false,
31
- "removeComments": true
32
- },
33
- "include": [
34
- "src",
35
- "build/types/**/*.ts"
36
- ],
37
- "exclude": [
38
- "node_modules",
39
- "build",
40
- "dist",
41
- "static",
42
- "public"
43
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "jsx": "react-jsx",
5
+ "moduleResolution": "node",
6
+ "rootDir": "./src",
7
+ "outDir": "./dist",
8
+ "lib": [
9
+ "dom",
10
+ "dom.iterable",
11
+ "esnext"
12
+ ],
13
+ "allowJs": false,
14
+ "checkJs": false,
15
+ "strict": true,
16
+ "esModuleInterop": true,
17
+ "sourceMap": true,
18
+ "resolveJsonModule": true,
19
+ "declaration": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "noImplicitAny": true,
23
+ "noImplicitOverride": true,
24
+ "noImplicitReturns": true,
25
+ "noImplicitThis": true,
26
+ "skipLibCheck": true,
27
+ "allowSyntheticDefaultImports": true,
28
+ "forceConsistentCasingInFileNames": true,
29
+ "noFallthroughCasesInSwitch": true,
30
+ "isolatedModules": false,
31
+ "removeComments": true
32
+ },
33
+ "include": [
34
+ "src",
35
+ "build/types/**/*.ts"
36
+ ],
37
+ "exclude": [
38
+ "node_modules",
39
+ "build",
40
+ "dist",
41
+ "static",
42
+ "public"
43
+ ]
44
44
  }