namirasoft-account-react 1.3.146 → 1.3.148

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 (52) hide show
  1. package/config-overrides.js +72 -72
  2. package/dist/IEntityInfo.d.ts +2 -2
  3. package/dist/assets/images/verify.png +0 -0
  4. package/dist/components/NSAAccessModel.module.css +100 -100
  5. package/dist/components/NSABoxOTP.d.ts +8 -0
  6. package/dist/components/NSABoxOTP.js +32 -0
  7. package/dist/components/NSABoxOTP.js.map +1 -0
  8. package/dist/components/NSAMessageDialog.module.css +148 -148
  9. package/dist/layouts/NSASectionEdit.js +2 -8
  10. package/dist/layouts/NSASectionEdit.js.map +1 -1
  11. package/dist/main.d.ts +1 -0
  12. package/dist/main.js +1 -0
  13. package/dist/main.js.map +1 -1
  14. package/dist/pages/NSALoginPage.module.css +19 -19
  15. package/dist/pages/NSAVerificationPage.d.ts +8 -0
  16. package/dist/pages/NSAVerificationPage.js +18 -0
  17. package/dist/pages/NSAVerificationPage.js.map +1 -0
  18. package/dist/pages/NSAVerificationPage.module.css +23 -0
  19. package/package.json +67 -67
  20. package/public/index.html +21 -21
  21. package/src/App.css +31 -31
  22. package/src/App.tsx +6 -6
  23. package/src/IEntityInfo.ts +28 -28
  24. package/src/INSARouterMaker.ts +8 -8
  25. package/src/INSARouterProps.ts +17 -17
  26. package/src/INSARouterState.ts +5 -5
  27. package/src/Info.ts +20 -20
  28. package/src/NSARouterMaker.tsx +138 -138
  29. package/src/assets/images/verify.png +0 -0
  30. package/src/components/NSAAccessModel.module.css +100 -100
  31. package/src/components/NSAAccessModel.tsx +139 -139
  32. package/src/components/NSABoxOTP.module.css +0 -0
  33. package/src/components/NSABoxOTP.tsx +64 -0
  34. package/src/components/NSADeleteModal.tsx +24 -24
  35. package/src/components/NSAMessageDialog.module.css +148 -148
  36. package/src/components/NSAMessageDialog.tsx +131 -131
  37. package/src/index.tsx +7 -7
  38. package/src/layouts/Actions.ts +119 -119
  39. package/src/layouts/Menus.ts +15 -15
  40. package/src/layouts/NSALayout.tsx +237 -237
  41. package/src/layouts/NSASectionEdit.tsx +106 -114
  42. package/src/layouts/NSASectionList.tsx +168 -168
  43. package/src/layouts/NSASectionTabs.tsx +36 -36
  44. package/src/layouts/NSASectionView.tsx +15 -15
  45. package/src/main.ts +17 -16
  46. package/src/pages/NSALoginPage.module.css +19 -19
  47. package/src/pages/NSALoginPage.tsx +37 -37
  48. package/src/pages/NSAVerificationPage.module.css +23 -0
  49. package/src/pages/NSAVerificationPage.tsx +43 -0
  50. package/tsconfig.json +43 -43
  51. package/dist/App.css +0 -32
  52. /package/dist/{index.css → components/NSABoxOTP.module.css} +0 -0
@@ -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
  };
@@ -25,8 +25,8 @@ export interface IEntityInfo<EntityType extends {
25
25
  getCopyURL: (id: string) => string;
26
26
  getEditURL: (id: string) => string;
27
27
  getViewURL: (id: string) => string;
28
- onCreate?: (entity: EntityTypeInput) => Promise<EntityType | null>;
29
- onUpdate?: (id: string, entity: EntityTypeInput) => Promise<EntityType | null>;
28
+ onCreate?: (entity: EntityTypeInput) => Promise<boolean>;
29
+ onUpdate?: (id: string, entity: EntityTypeInput) => Promise<boolean>;
30
30
  onSuccess?: (entity: EntityType) => void;
31
31
  };
32
32
  }
Binary file
@@ -1,101 +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
- }
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
101
  }
@@ -0,0 +1,8 @@
1
+ import { IBaseComponentProps } from 'namirasoft-site-react';
2
+ import React from 'react';
3
+ export interface INSABoxOTPProps extends IBaseComponentProps {
4
+ placeholder?: string;
5
+ defaultValue?: string;
6
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
+ }
8
+ export declare function NSABoxOTP(props: INSABoxOTPProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Styles from './NSBoxOTP.module.css';
3
+ import { useState, useRef } from 'react';
4
+ export function NSABoxOTP(props) {
5
+ var _a;
6
+ let [state, setState] = useState("");
7
+ const [values, setValues] = useState(Array(6).fill(''));
8
+ const inputsRef = useRef([]);
9
+ const handleChange = (index) => (event) => {
10
+ var _a;
11
+ const newValue = event.target.value;
12
+ setState(state + newValue);
13
+ if (/^\d?$/.test(newValue)) {
14
+ const updatedValues = [...values];
15
+ updatedValues[index] = newValue;
16
+ setValues(updatedValues);
17
+ if (newValue && index < 5) {
18
+ (_a = inputsRef.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
19
+ }
20
+ }
21
+ if (props.onChanged)
22
+ props.onChanged(event);
23
+ };
24
+ const handleKeyDown = (index) => (event) => {
25
+ var _a;
26
+ if (event.key === 'Backspace' && !values[index] && index > 0) {
27
+ (_a = inputsRef.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
28
+ }
29
+ };
30
+ return (_jsx("div", { id: props.id, className: `${Styles.ns_input_parent} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: Object.assign(Object.assign({}, props.style), { display: 'flex', gap: '10px' }), children: values.map((value, index) => (_jsx("input", { ref: el => inputsRef.current[index] = el, type: "text", value: value, onChange: handleChange(index), onKeyDown: handleKeyDown(index), maxLength: 1, style: { width: '30px', textAlign: 'center' }, className: Styles.ns_otp_input }, index + 10))) }));
31
+ }
32
+ //# sourceMappingURL=NSABoxOTP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSABoxOTP.js","sourceRoot":"","sources":["../../src/components/NSABoxOTP.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,OAAc,EAAE,QAAQ,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;AAS7D,MAAM,UAAU,SAAS,CAAC,KAAsB;;IAE5C,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAW,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,MAAM,CAA8B,EAAE,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,KAAoC,EAAE,EAAE;;QAE7E,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAA;QAC1B,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC1B;YACI,MAAM,aAAa,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;YAClC,aAAa,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;YAChC,SAAS,CAAC,aAAa,CAAC,CAAC;YACzB,IAAI,QAAQ,IAAI,KAAK,GAAG,CAAC,EACzB;gBACI,MAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,KAAK,EAAE,CAAC;aACzC;SACJ;QACD,IAAI,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,SA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