namirasoft-account-react 1.3.237 → 1.3.239
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/config-overrides.js +72 -72
- package/dist/App.css +32 -0
- package/dist/assets/images/verify.png +0 -0
- package/dist/components/NSAAccessModal.module.css +119 -119
- package/dist/components/NSAAccessModel.d.ts +17 -0
- package/dist/components/NSAAccessModel.js +73 -0
- package/dist/components/NSAAccessModel.js.map +1 -0
- package/dist/components/NSAAccessModel.module.css +101 -0
- package/dist/components/NSABoxOTP.module.css +10 -10
- package/dist/components/NSAHomePage.module.css +22 -22
- package/dist/components/NSAMessageDialog.module.css +147 -147
- package/dist/components/NSAProductListModal.module.css +76 -76
- package/dist/components/NSAProjectListModal.module.css +67 -67
- package/dist/index.css +0 -0
- package/dist/layouts/NSASectionList.d.ts +3 -0
- package/dist/layouts/NSASectionList.js +1 -9
- package/dist/layouts/NSASectionList.js.map +1 -1
- package/dist/pages/NSALoginPage.module.css +19 -19
- package/dist/pages/NSAVerificationPage.module.css +22 -22
- package/package.json +69 -69
- package/public/index.html +21 -21
- package/src/App.css +31 -31
- package/src/App.tsx +6 -6
- package/src/IEntityInfo.ts +30 -30
- 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 +138 -138
- package/src/components/NSAAccessModal.module.css +119 -119
- package/src/components/NSAAccessModal.tsx +136 -136
- package/src/components/NSABoxOTP.module.css +10 -10
- package/src/components/NSABoxOTP.tsx +63 -63
- package/src/components/NSADeleteModal.tsx +24 -24
- package/src/components/NSAHomePage.module.css +22 -22
- package/src/components/NSAHomePage.tsx +27 -27
- package/src/components/NSAMessageDialog.module.css +147 -147
- package/src/components/NSAMessageDialog.tsx +138 -138
- package/src/components/NSAProductListModal.module.css +76 -76
- package/src/components/NSAProductListModal.tsx +123 -123
- package/src/components/NSAProjectListModal.module.css +67 -67
- package/src/components/NSAProjectListModal.tsx +101 -101
- package/src/index.tsx +7 -7
- package/src/layouts/Actions.ts +119 -119
- package/src/layouts/Menus.ts +15 -15
- package/src/layouts/NSALayout.tsx +354 -354
- package/src/layouts/NSASectionEdit.tsx +137 -137
- package/src/layouts/NSASectionList.tsx +158 -167
- package/src/layouts/NSASectionTabs.tsx +50 -50
- package/src/layouts/NSASectionView.tsx +58 -58
- package/src/main.ts +20 -20
- package/src/pages/NSALoginPage.module.css +19 -19
- package/src/pages/NSALoginPage.tsx +61 -61
- package/src/pages/NSAVerificationPage.module.css +22 -22
- package/src/pages/NSAVerificationPage.tsx +58 -58
- package/tsconfig.json +43 -43
package/config-overrides.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
|
|
2
|
-
const webpack = require('webpack');
|
|
3
|
-
|
|
4
|
-
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
|
5
|
-
|
|
6
|
-
module.exports = function config_overrides(config, webpackEnv)
|
|
7
|
-
{
|
|
8
|
-
console.log('overriding webpack config...');
|
|
9
|
-
const isEnvDevelopment = webpackEnv === 'development';
|
|
10
|
-
const isEnvProduction = webpackEnv === 'production';
|
|
11
|
-
const loaders = config.module.rules[1].oneOf;
|
|
12
|
-
|
|
13
|
-
loaders.splice(loaders.length - 1, 0, {
|
|
14
|
-
test: /\.(js|mjs|cjs)$/,
|
|
15
|
-
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
|
16
|
-
loader: require.resolve('babel-loader'),
|
|
17
|
-
options: {
|
|
18
|
-
babelrc: false,
|
|
19
|
-
configFile: false,
|
|
20
|
-
compact: false,
|
|
21
|
-
presets: [
|
|
22
|
-
[
|
|
23
|
-
require.resolve('babel-preset-react-app/dependencies'),
|
|
24
|
-
{ helpers: true },
|
|
25
|
-
],
|
|
26
|
-
],
|
|
27
|
-
cacheDirectory: true,
|
|
28
|
-
// See #6846 for context on why cacheCompression is disabled
|
|
29
|
-
cacheCompression: false,
|
|
30
|
-
// @remove-on-eject-begin
|
|
31
|
-
cacheIdentifier: getCacheIdentifier(
|
|
32
|
-
isEnvProduction
|
|
33
|
-
? 'production'
|
|
34
|
-
: isEnvDevelopment && 'development',
|
|
35
|
-
[
|
|
36
|
-
'babel-plugin-named-asset-import',
|
|
37
|
-
'babel-preset-react-app',
|
|
38
|
-
'react-dev-utils',
|
|
39
|
-
'react-scripts',
|
|
40
|
-
]
|
|
41
|
-
),
|
|
42
|
-
// @remove-on-eject-end
|
|
43
|
-
// Babel sourcemaps are needed for debugging into node_modules
|
|
44
|
-
// code. Without the options below, debuggers like VSCode
|
|
45
|
-
// show incorrect code and set breakpoints on the wrong lines.
|
|
46
|
-
sourceMaps: shouldUseSourceMap,
|
|
47
|
-
inputSourceMap: shouldUseSourceMap,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
config.resolve.fallback = {
|
|
52
|
-
"fs": false,
|
|
53
|
-
"tls": false,
|
|
54
|
-
"net": false,
|
|
55
|
-
"https": false,
|
|
56
|
-
// "http": require.resolve("stream-http"),
|
|
57
|
-
// "zlib": require.resolve("browserify-zlib"),
|
|
58
|
-
"path": require.resolve("path-browserify"),
|
|
59
|
-
// "stream": require.resolve("stream-browserify"),
|
|
60
|
-
// "util": require.resolve("util/"),
|
|
61
|
-
// "crypto": require.resolve("crypto-browserify")
|
|
62
|
-
"child_process": false,
|
|
63
|
-
"os": false,
|
|
64
|
-
"crypto": false
|
|
65
|
-
}
|
|
66
|
-
config.plugins = (config.plugins || []).concat([
|
|
67
|
-
new webpack.NormalModuleReplacementPlugin(/node:/, (resource) =>
|
|
68
|
-
{
|
|
69
|
-
resource.request = resource.request.replace(/^node:/, "");
|
|
70
|
-
})
|
|
71
|
-
]);
|
|
72
|
-
return config;
|
|
1
|
+
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
|
|
4
|
+
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
|
5
|
+
|
|
6
|
+
module.exports = function config_overrides(config, webpackEnv)
|
|
7
|
+
{
|
|
8
|
+
console.log('overriding webpack config...');
|
|
9
|
+
const isEnvDevelopment = webpackEnv === 'development';
|
|
10
|
+
const isEnvProduction = webpackEnv === 'production';
|
|
11
|
+
const loaders = config.module.rules[1].oneOf;
|
|
12
|
+
|
|
13
|
+
loaders.splice(loaders.length - 1, 0, {
|
|
14
|
+
test: /\.(js|mjs|cjs)$/,
|
|
15
|
+
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
|
16
|
+
loader: require.resolve('babel-loader'),
|
|
17
|
+
options: {
|
|
18
|
+
babelrc: false,
|
|
19
|
+
configFile: false,
|
|
20
|
+
compact: false,
|
|
21
|
+
presets: [
|
|
22
|
+
[
|
|
23
|
+
require.resolve('babel-preset-react-app/dependencies'),
|
|
24
|
+
{ helpers: true },
|
|
25
|
+
],
|
|
26
|
+
],
|
|
27
|
+
cacheDirectory: true,
|
|
28
|
+
// See #6846 for context on why cacheCompression is disabled
|
|
29
|
+
cacheCompression: false,
|
|
30
|
+
// @remove-on-eject-begin
|
|
31
|
+
cacheIdentifier: getCacheIdentifier(
|
|
32
|
+
isEnvProduction
|
|
33
|
+
? 'production'
|
|
34
|
+
: isEnvDevelopment && 'development',
|
|
35
|
+
[
|
|
36
|
+
'babel-plugin-named-asset-import',
|
|
37
|
+
'babel-preset-react-app',
|
|
38
|
+
'react-dev-utils',
|
|
39
|
+
'react-scripts',
|
|
40
|
+
]
|
|
41
|
+
),
|
|
42
|
+
// @remove-on-eject-end
|
|
43
|
+
// Babel sourcemaps are needed for debugging into node_modules
|
|
44
|
+
// code. Without the options below, debuggers like VSCode
|
|
45
|
+
// show incorrect code and set breakpoints on the wrong lines.
|
|
46
|
+
sourceMaps: shouldUseSourceMap,
|
|
47
|
+
inputSourceMap: shouldUseSourceMap,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
config.resolve.fallback = {
|
|
52
|
+
"fs": false,
|
|
53
|
+
"tls": false,
|
|
54
|
+
"net": false,
|
|
55
|
+
"https": false,
|
|
56
|
+
// "http": require.resolve("stream-http"),
|
|
57
|
+
// "zlib": require.resolve("browserify-zlib"),
|
|
58
|
+
"path": require.resolve("path-browserify"),
|
|
59
|
+
// "stream": require.resolve("stream-browserify"),
|
|
60
|
+
// "util": require.resolve("util/"),
|
|
61
|
+
// "crypto": require.resolve("crypto-browserify")
|
|
62
|
+
"child_process": false,
|
|
63
|
+
"os": false,
|
|
64
|
+
"crypto": false
|
|
65
|
+
}
|
|
66
|
+
config.plugins = (config.plugins || []).concat([
|
|
67
|
+
new webpack.NormalModuleReplacementPlugin(/node:/, (resource) =>
|
|
68
|
+
{
|
|
69
|
+
resource.request = resource.request.replace(/^node:/, "");
|
|
70
|
+
})
|
|
71
|
+
]);
|
|
72
|
+
return config;
|
|
73
73
|
};
|
package/dist/App.css
ADDED
|
@@ -0,0 +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(./assets/images/icon-close.png) 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
|
+
}
|
|
Binary file
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
.ns_access_container {
|
|
2
|
-
width: max-content;
|
|
3
|
-
position: relative;
|
|
4
|
-
background-color: rgba(255, 255, 255, 1);
|
|
5
|
-
border-radius: 16px;
|
|
6
|
-
border: 0.2px solid rgb(210, 210, 210);
|
|
7
|
-
padding: 16px;
|
|
8
|
-
position: absolute;
|
|
9
|
-
right: 0;
|
|
10
|
-
z-index: 1;
|
|
11
|
-
top: 0;
|
|
12
|
-
left: auto;
|
|
13
|
-
transform: translate(30%, 50%);
|
|
14
|
-
cursor: default;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ns_access_container h6 {
|
|
18
|
-
color: rgba(20, 27, 92, 1);
|
|
19
|
-
text-align: left;
|
|
20
|
-
font-weight: 300;
|
|
21
|
-
font-size: 16px;
|
|
22
|
-
cursor: default;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ns_access_container h2 {
|
|
26
|
-
color: rgba(3, 119, 255, 1);
|
|
27
|
-
text-align: center;
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
font-size: 16px;
|
|
30
|
-
cursor: default;
|
|
31
|
-
margin: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ns_access_container h4 {
|
|
35
|
-
color: rgba(20, 27, 92, 1);
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
font-size: 16px;
|
|
38
|
-
text-align: left;
|
|
39
|
-
cursor: default;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ns_access_account_container h4 {
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ns_access_container h5 {
|
|
47
|
-
color: rgba(20, 27, 92, 1);
|
|
48
|
-
font-weight: 300;
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
text-align: left;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ns_access_content h6 {
|
|
54
|
-
text-align: center;
|
|
55
|
-
padding: 0;
|
|
56
|
-
margin: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.ns_access_account_container {
|
|
61
|
-
display: flex;
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
border: none;
|
|
64
|
-
background-color: rgba(244, 246, 255, 1);
|
|
65
|
-
border-radius: 8px;
|
|
66
|
-
align-items: center;
|
|
67
|
-
gap: 10px;
|
|
68
|
-
width: 326px;
|
|
69
|
-
max-width: 100%;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.ns_access_account_container:hover {
|
|
73
|
-
background-color: rgba(178, 187, 217, 1);
|
|
74
|
-
transition: all 0.3s ease-in-out;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.ns_access_account_container img {
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.ns_access_account_info {
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: row;
|
|
85
|
-
justify-content: left;
|
|
86
|
-
align-items: flex-start;
|
|
87
|
-
padding: 8px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.nsa_close_icon {
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.nsa_toast_background {
|
|
95
|
-
width: 100vw;
|
|
96
|
-
height: 100vh;
|
|
97
|
-
background-color: #00000059;
|
|
98
|
-
position: fixed;
|
|
99
|
-
top: 0;
|
|
100
|
-
left: 0;
|
|
101
|
-
display: flex;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
align-items: center;
|
|
104
|
-
cursor: default;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
@media only screen and (min-width: 500px) {
|
|
109
|
-
.ns_access_container {
|
|
110
|
-
padding: 16px;
|
|
111
|
-
position: absolute;
|
|
112
|
-
right: 0;
|
|
113
|
-
z-index: 1;
|
|
114
|
-
top: 30px;
|
|
115
|
-
left: auto;
|
|
116
|
-
transform: translate(0%, 0%);
|
|
117
|
-
width: 275px;
|
|
118
|
-
min-height: 250px;
|
|
119
|
-
}
|
|
1
|
+
.ns_access_container {
|
|
2
|
+
width: max-content;
|
|
3
|
+
position: relative;
|
|
4
|
+
background-color: rgba(255, 255, 255, 1);
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
border: 0.2px solid rgb(210, 210, 210);
|
|
7
|
+
padding: 16px;
|
|
8
|
+
position: absolute;
|
|
9
|
+
right: 0;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: auto;
|
|
13
|
+
transform: translate(30%, 50%);
|
|
14
|
+
cursor: default;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ns_access_container h6 {
|
|
18
|
+
color: rgba(20, 27, 92, 1);
|
|
19
|
+
text-align: left;
|
|
20
|
+
font-weight: 300;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
cursor: default;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ns_access_container h2 {
|
|
26
|
+
color: rgba(3, 119, 255, 1);
|
|
27
|
+
text-align: center;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
cursor: default;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ns_access_container h4 {
|
|
35
|
+
color: rgba(20, 27, 92, 1);
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
text-align: left;
|
|
39
|
+
cursor: default;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ns_access_account_container h4 {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ns_access_container h5 {
|
|
47
|
+
color: rgba(20, 27, 92, 1);
|
|
48
|
+
font-weight: 300;
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
text-align: left;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ns_access_content h6 {
|
|
54
|
+
text-align: center;
|
|
55
|
+
padding: 0;
|
|
56
|
+
margin: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
.ns_access_account_container {
|
|
61
|
+
display: flex;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
border: none;
|
|
64
|
+
background-color: rgba(244, 246, 255, 1);
|
|
65
|
+
border-radius: 8px;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 10px;
|
|
68
|
+
width: 326px;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ns_access_account_container:hover {
|
|
73
|
+
background-color: rgba(178, 187, 217, 1);
|
|
74
|
+
transition: all 0.3s ease-in-out;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
.ns_access_account_container img {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ns_access_account_info {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: row;
|
|
85
|
+
justify-content: left;
|
|
86
|
+
align-items: flex-start;
|
|
87
|
+
padding: 8px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nsa_close_icon {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.nsa_toast_background {
|
|
95
|
+
width: 100vw;
|
|
96
|
+
height: 100vh;
|
|
97
|
+
background-color: #00000059;
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
align-items: center;
|
|
104
|
+
cursor: default;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@media only screen and (min-width: 500px) {
|
|
109
|
+
.ns_access_container {
|
|
110
|
+
padding: 16px;
|
|
111
|
+
position: absolute;
|
|
112
|
+
right: 0;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
top: 30px;
|
|
115
|
+
left: auto;
|
|
116
|
+
transform: translate(0%, 0%);
|
|
117
|
+
width: 275px;
|
|
118
|
+
min-height: 250px;
|
|
119
|
+
}
|
|
120
120
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { INSARouterProps } from '../INSARouterProps';
|
|
3
|
+
import { PermissionRow } from 'namirasoft-access';
|
|
4
|
+
export interface NSAAccessModelProps extends INSARouterProps {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface NSAAccessModelState {
|
|
8
|
+
permissions: PermissionRow[] | null;
|
|
9
|
+
}
|
|
10
|
+
export default class NSAAccessModel extends Component<NSAAccessModelProps, NSAAccessModelState> {
|
|
11
|
+
private toastRef;
|
|
12
|
+
constructor(props: NSAAccessModelProps);
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
15
|
+
private handleClickOutside;
|
|
16
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Component, createRef } from 'react';
|
|
3
|
+
import Styles from './NSAAccessModel.module.css';
|
|
4
|
+
import ProfileAccount from '../assets/images/icon-close.png';
|
|
5
|
+
import CloseToast from '../assets/images/icon-close.png';
|
|
6
|
+
import { NamirasoftAccessServer } from 'namirasoft-access';
|
|
7
|
+
import { NSLoading } from 'namirasoft-site-react';
|
|
8
|
+
export default class NSAAccessModel extends Component {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.state = { permissions: null };
|
|
12
|
+
this.toastRef = createRef();
|
|
13
|
+
this.handleClickOutside = this.handleClickOutside.bind(this);
|
|
14
|
+
}
|
|
15
|
+
componentDidMount() {
|
|
16
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
|
17
|
+
let server = new NamirasoftAccessServer(this.props.account.token_manager, this.props.notifier.onError);
|
|
18
|
+
server.permission.ListIncoming([], null, null).then(res => {
|
|
19
|
+
this.setState({ permissions: res.rows });
|
|
20
|
+
}).catch(() => { });
|
|
21
|
+
}
|
|
22
|
+
componentWillUnmount() {
|
|
23
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
24
|
+
}
|
|
25
|
+
handleClickOutside(event) {
|
|
26
|
+
if (this.toastRef.current && !this.toastRef.current.contains(event.target))
|
|
27
|
+
this.props.onClose();
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
let profile = null;
|
|
31
|
+
let content = null;
|
|
32
|
+
if (this.state.permissions == null)
|
|
33
|
+
content =
|
|
34
|
+
_jsx("div", { style: { width: "250px", height: "263px" }, children: _jsx(NSLoading, {}) });
|
|
35
|
+
else {
|
|
36
|
+
let user_id = this.props.account.token_manager.getUserData(u => u.id, "");
|
|
37
|
+
let first_name = this.props.account.token_manager.getUserData(u => u.first_name, "");
|
|
38
|
+
let last_name = this.props.account.token_manager.getUserData(u => u.last_name, "");
|
|
39
|
+
let email = this.props.account.token_manager.getUserData(u => u.email, "");
|
|
40
|
+
let generate = (permission) => {
|
|
41
|
+
return _jsxs("div", { className: Styles.ns_access_account_container, onClick: () => {
|
|
42
|
+
let server = new NamirasoftAccessServer(this.props.account.token_manager, this.props.notifier.onError);
|
|
43
|
+
if (permission.id)
|
|
44
|
+
server.access.SetOwner({ owner_id: permission.user_id }).then(() => {
|
|
45
|
+
this.props.onClose();
|
|
46
|
+
}).catch(() => { });
|
|
47
|
+
else
|
|
48
|
+
server.access.SetOwner({ owner_id: null }).then(() => {
|
|
49
|
+
this.props.onClose();
|
|
50
|
+
}).catch(() => { });
|
|
51
|
+
}, children: [_jsx("div", { className: Styles.ns_access_account_info, children: _jsx("img", { src: ProfileAccount, alt: 'User Profile', width: 48, height: 48, className: 'rounded-circle' }) }), _jsxs("div", { className: 'd-flex flex-column', children: [_jsx("h4", { children: `${permission.firstName} ${permission.lastName}`.trim() }), _jsx("h5", { children: permission.user_id })] })] });
|
|
52
|
+
};
|
|
53
|
+
let me = {
|
|
54
|
+
id: "",
|
|
55
|
+
user_id,
|
|
56
|
+
to_user_id: user_id,
|
|
57
|
+
firstName: first_name,
|
|
58
|
+
lastName: last_name,
|
|
59
|
+
email: email,
|
|
60
|
+
default: this.state.permissions.filter(x => x.default).length == 0
|
|
61
|
+
};
|
|
62
|
+
let permissions = [me, ...this.state.permissions];
|
|
63
|
+
let current = permissions.filter(x => x.default)[0];
|
|
64
|
+
content = permissions.filter(x => !x.default).map(generate);
|
|
65
|
+
profile = _jsxs(_Fragment, { children: [_jsx("div", { className: 'text-center pb-2', children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/no-profile/grey.svg", alt: 'No Profile', width: 103, height: 103, className: 'rounded-circle' }) }), _jsx("h2", { className: 'text-center', children: current.user_id }), _jsx("h6", { className: 'text-center pb-2', children: `${current.firstName} ${current.lastName}`.trim() })] });
|
|
66
|
+
}
|
|
67
|
+
return (_jsxs(_Fragment, { children: [_jsxs("section", { className: Styles.ns_access_container, ref: this.toastRef, children: [_jsxs("div", { className: Styles.ns_access_content, children: [_jsx("div", { className: 'd-flex justify-content-end', children: _jsx("img", { src: CloseToast, alt: "Close", width: 18, height: 18, onClick: (e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
this.props.onClose();
|
|
70
|
+
}, className: Styles.nsa_close_icon }) }), profile] }), content] }), _jsx("div", { className: Styles.nsa_toast_background })] }));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=NSAAccessModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSAAccessModel.js","sourceRo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AC,EAAE,EAAE;4CAEX,CAAC,CAAC,eAAe,EAAE,CAAC;4CACpB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;wCACzB,CAAC,EACD,SAAS,EAAE,MAAM,CAAC,cAAc,GAClC,GACA,EACL,OAAO,IACN,EACL,OAAO,IACF,EACV,cAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,GACpC,IACR,CACN,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
.ns_access_container {
|
|
2
|
+
width: max-content;
|
|
3
|
+
position: relative;
|
|
4
|
+
background-color: rgba(255, 255, 255, 1);
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
border: 0.2px solid rgb(210, 210, 210);
|
|
7
|
+
padding: 16px;
|
|
8
|
+
position: absolute;
|
|
9
|
+
right: 0;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: auto;
|
|
13
|
+
transform: translate(30%, 50%);
|
|
14
|
+
cursor: default;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ns_access_container h6 {
|
|
18
|
+
color: rgba(20, 27, 92, 1);
|
|
19
|
+
text-align: center;
|
|
20
|
+
font-weight: 300;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ns_access_container h2 {
|
|
26
|
+
color: rgba(3, 119, 255, 1);
|
|
27
|
+
text-align: center;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ns_access_container h4 {
|
|
34
|
+
color: rgba(20, 27, 92, 1);
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
text-align: left;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ns_access_container h5 {
|
|
42
|
+
color: rgba(20, 27, 92, 1);
|
|
43
|
+
font-weight: 300;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ns_access_account_container {
|
|
49
|
+
display: flex;
|
|
50
|
+
border: none;
|
|
51
|
+
background-color: rgba(244, 246, 255, 1);
|
|
52
|
+
border-radius: 50px;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 10px;
|
|
55
|
+
width: 326px;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ns_access_account_container:hover {
|
|
60
|
+
background-color: rgba(178, 187, 217, 1);
|
|
61
|
+
transition: all 0.4s ease-in-out;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ns_access_account_info {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
justify-content: left;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
padding: 8px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.nsa_close_icon {
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.nsa_toast_background {
|
|
77
|
+
width: 100vw;
|
|
78
|
+
height: 100vh;
|
|
79
|
+
background-color: #00000059;
|
|
80
|
+
position: fixed;
|
|
81
|
+
top: 0;
|
|
82
|
+
left: 0;
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
cursor: default;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@media only screen and (min-width: 500px) {
|
|
91
|
+
.ns_access_container {
|
|
92
|
+
width: fit-content;
|
|
93
|
+
padding: 16px;
|
|
94
|
+
position: absolute;
|
|
95
|
+
right: 0;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
top: 0;
|
|
98
|
+
left: auto;
|
|
99
|
+
transform: translate(0%, 0%);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.nsa_otp_input {
|
|
2
|
-
border: none;
|
|
3
|
-
background-color: transparent;
|
|
4
|
-
border-bottom: 2px solid #141B5C;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.nsa_otp_input:focus {
|
|
8
|
-
border: none;
|
|
9
|
-
outline: none;
|
|
10
|
-
border-bottom: 2px solid #141B5C;
|
|
1
|
+
.nsa_otp_input {
|
|
2
|
+
border: none;
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
border-bottom: 2px solid #141B5C;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.nsa_otp_input:focus {
|
|
8
|
+
border: none;
|
|
9
|
+
outline: none;
|
|
10
|
+
border-bottom: 2px solid #141B5C;
|
|
11
11
|
}
|