namirasoft-account-react 1.4.353 → 1.4.355

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 (66) hide show
  1. package/.env.template +15 -15
  2. package/config-overrides.js +72 -72
  3. package/dist/components/NSAAccessListDialog.module.css +71 -71
  4. package/dist/components/NSAMessageListDialog.module.css +99 -99
  5. package/dist/components/NSAProductListDialog.module.css +44 -44
  6. package/dist/components/NSAUserDialog.js +2 -2
  7. package/dist/components/NSAUserDialog.js.map +1 -1
  8. package/dist/components/NSAUserDialog.module.css +66 -61
  9. package/dist/components/NSAWorkspaceListDialog.module.css +41 -41
  10. package/dist/layouts/NSASectionEditTabPage.module.css +4 -4
  11. package/dist/layouts/NSASectionList.module.css +21 -21
  12. package/dist/layouts/NSASectionViewTabPage.module.css +47 -47
  13. package/dist/pages/NSAConsentPage.module.css +26 -26
  14. package/dist/pages/NSAHomePage.module.css +23 -23
  15. package/dist/pages/NSALoginPage.module.css +26 -26
  16. package/dist/pages/NSAVerificationPage.module.css +31 -31
  17. package/package.json +78 -78
  18. package/public/index.html +21 -21
  19. package/src/App.css +31 -31
  20. package/src/App.tsx +93 -93
  21. package/src/CTFRow.ts +7 -7
  22. package/src/ConsentCacheService.ts +25 -25
  23. package/src/IEntityInfo.ts +31 -31
  24. package/src/NSARouterMaker.tsx +129 -129
  25. package/src/NSARouterMakerComponent.ts +9 -9
  26. package/src/NSARouterMakerProps.ts +22 -22
  27. package/src/Router.tsx +39 -39
  28. package/src/UseParams.tsx +18 -18
  29. package/src/components/NSAAccessListDialog.module.css +71 -71
  30. package/src/components/NSAAccessListDialog.tsx +178 -178
  31. package/src/components/NSAMessageListDialog.module.css +99 -99
  32. package/src/components/NSAMessageListDialog.tsx +141 -141
  33. package/src/components/NSAProductListDialog.module.css +44 -44
  34. package/src/components/NSAProductListDialog.tsx +106 -106
  35. package/src/components/NSAUserDialog.module.css +66 -61
  36. package/src/components/NSAUserDialog.tsx +110 -99
  37. package/src/components/NSAWorkspaceListDialog.module.css +41 -41
  38. package/src/components/NSAWorkspaceListDialog.tsx +148 -148
  39. package/src/components/NSBoxSecret.tsx +106 -106
  40. package/src/index.tsx +24 -24
  41. package/src/layouts/Actions.ts +145 -145
  42. package/src/layouts/CFTUtil.ts +18 -18
  43. package/src/layouts/NSALayout.tsx +710 -710
  44. package/src/layouts/NSASectionEdit.tsx +218 -218
  45. package/src/layouts/NSASectionEditTabPage.module.css +4 -4
  46. package/src/layouts/NSASectionEditTabPage.tsx +250 -250
  47. package/src/layouts/NSASectionList.module.css +21 -21
  48. package/src/layouts/NSASectionList.tsx +500 -500
  49. package/src/layouts/NSASectionView.tsx +94 -94
  50. package/src/layouts/NSASectionViewTabMore.tsx +77 -77
  51. package/src/layouts/NSASectionViewTabPage.module.css +47 -47
  52. package/src/layouts/NSASectionViewTabPage.tsx +344 -344
  53. package/src/main.ts +19 -19
  54. package/src/pages/NSAConsentPage.module.css +26 -26
  55. package/src/pages/NSAConsentPage.tsx +120 -120
  56. package/src/pages/NSAEmailVerificationPage.tsx +30 -30
  57. package/src/pages/NSAHomePage.module.css +23 -23
  58. package/src/pages/NSAHomePage.tsx +76 -76
  59. package/src/pages/NSALoginPage.module.css +26 -26
  60. package/src/pages/NSALoginPage.tsx +87 -87
  61. package/src/pages/NSAVerificationPage.module.css +31 -31
  62. package/src/pages/NSAVerificationPage.tsx +172 -172
  63. package/src/pages/PaymentRequired.tsx +74 -74
  64. package/tsconfig.json +43 -43
  65. package/dist/App.css +0 -32
  66. package/dist/index.css +0 -0
package/package.json CHANGED
@@ -1,79 +1,79 @@
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.353",
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
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
25
- "@babel/plugin-transform-private-property-in-object": "^7.27.1",
26
- "@types/platform": "^1.3.6",
27
- "@types/react": "^18.3.13",
28
- "namirasoft-access": "^1.4.70",
29
- "namirasoft-account": "^1.4.85",
30
- "namirasoft-account-client": "^1.4.6",
31
- "namirasoft-api-product": "^1.4.37",
32
- "namirasoft-core": "^1.4.80",
33
- "namirasoft-field": "^1.4.25",
34
- "namirasoft-history": "^1.4.17",
35
- "namirasoft-message": "^1.4.20",
36
- "namirasoft-payment": "^1.4.104",
37
- "namirasoft-schema": "^1.4.25",
38
- "namirasoft-secret": "^1.4.38",
39
- "namirasoft-site": "^1.4.39",
40
- "namirasoft-site-map": "^1.4.31",
41
- "namirasoft-site-react": "^1.4.438",
42
- "namirasoft-workspace": "^1.4.23",
43
- "os-browserify": "^0.3.0",
44
- "path-browserify": "^1.0.1",
45
- "process": "^0.11.10",
46
- "query-string": "^9.2.2",
47
- "react": "^18.3.1",
48
- "react-app-rewired": "^2.2.1",
49
- "react-dom": "^18.3.1",
50
- "react-router-dom": "7.6.3",
51
- "react-scripts": "5.0.1",
52
- "run": "^1.5.0"
53
- },
54
- "eslintConfig": {
55
- "extends": [
56
- "react-app",
57
- "react-app/jest"
58
- ]
59
- },
60
- "browserslist": {
61
- "production": [
62
- ">0.2%",
63
- "not dead",
64
- "not op_mini all"
65
- ],
66
- "development": [
67
- "last 1 chrome version",
68
- "last 1 firefox version",
69
- "last 1 safari version"
70
- ]
71
- },
72
- "ns-psc": {
73
- "skip": {
74
- "files": [
75
- "/tsconfig.json"
76
- ]
77
- }
78
- }
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.355",
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
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
25
+ "@babel/plugin-transform-private-property-in-object": "^7.27.1",
26
+ "@types/platform": "^1.3.6",
27
+ "@types/react": "^18.3.13",
28
+ "namirasoft-access": "^1.4.70",
29
+ "namirasoft-account": "^1.4.85",
30
+ "namirasoft-account-client": "^1.4.6",
31
+ "namirasoft-api-product": "^1.4.37",
32
+ "namirasoft-core": "^1.4.87",
33
+ "namirasoft-field": "^1.4.25",
34
+ "namirasoft-history": "^1.4.17",
35
+ "namirasoft-message": "^1.4.20",
36
+ "namirasoft-payment": "^1.4.116",
37
+ "namirasoft-schema": "^1.4.25",
38
+ "namirasoft-secret": "^1.4.39",
39
+ "namirasoft-site": "^1.4.39",
40
+ "namirasoft-site-map": "^1.4.33",
41
+ "namirasoft-site-react": "^1.4.445",
42
+ "namirasoft-workspace": "^1.4.23",
43
+ "os-browserify": "^0.3.0",
44
+ "path-browserify": "^1.0.1",
45
+ "process": "^0.11.10",
46
+ "query-string": "^9.2.2",
47
+ "react": "^18.3.1",
48
+ "react-app-rewired": "^2.2.1",
49
+ "react-dom": "^18.3.1",
50
+ "react-router-dom": "7.6.3",
51
+ "react-scripts": "5.0.1",
52
+ "run": "^1.5.0"
53
+ },
54
+ "eslintConfig": {
55
+ "extends": [
56
+ "react-app",
57
+ "react-app/jest"
58
+ ]
59
+ },
60
+ "browserslist": {
61
+ "production": [
62
+ ">0.2%",
63
+ "not dead",
64
+ "not op_mini all"
65
+ ],
66
+ "development": [
67
+ "last 1 chrome version",
68
+ "last 1 firefox version",
69
+ "last 1 safari version"
70
+ ]
71
+ },
72
+ "ns-psc": {
73
+ "skip": {
74
+ "files": [
75
+ "/tsconfig.json"
76
+ ]
77
+ }
78
+ }
79
79
  }
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,94 +1,94 @@
1
- import { NSARouterMakerProps } from "./NSARouterMakerProps";
2
- import { BaseColumnFormatter, DateTimeFormatter, IDFormatter, StringFormatter, StringFormatterSizeType } from "namirasoft-site-react";
3
- import { NamirasoftMap } from "namirasoft-site-map";
4
- import { NamirasoftAccountServer } from "namirasoft-account";
5
- import { NSALoginPage } from "./pages/NSALoginPage";
6
- import { NSAHomePage } from "./pages/NSAHomePage";
7
- import { NSALayout } from "./layouts/NSALayout";
8
-
9
- export interface AppProps extends NSARouterMakerProps
10
- { }
11
-
12
- export function App(props: AppProps)
13
- {
14
- // let server = new NamirasoftFieldServer("https://field.namirasoft.dev/api/v1", props.account.token_manager, props.notifier.onError);
15
- let server = new NamirasoftAccountServer("https://account.namirasoft.dev/api/v1", props.account.token_manager, props.notifier.onError);
16
- if (!props.account)
17
- return <NSALoginPage
18
- product_id={props.product_id}
19
- />
20
-
21
- let namirasoft = new NamirasoftMap(props.account.token_manager, props.notifier.onError);
22
- if (12 < 20)
23
- return <NSALayout
24
- {...props}
25
- >
26
- <NSAHomePage
27
- {...props}
28
- notifier={props.notifier}
29
- />
30
- </NSALayout>
31
- return (
32
- <>
33
- <NSALayout {...props}
34
- pages={
35
- {
36
- entity: {
37
- product_id: props.product_id,
38
- name: "session",
39
- tables: [{ table: namirasoft.account.tables.session, required: false }],
40
- client: {
41
- getListURL: () => "",
42
- getNewURL: null,
43
- getCopyURL: null,
44
- getEditURL: null,
45
- getViewURL: null,
46
- getColumns: () =>
47
- {
48
- return [
49
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.id, new IDFormatter(namirasoft, null)),
50
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.user_id, new IDFormatter(namirasoft, null)),
51
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.name, new StringFormatter(StringFormatterSizeType.TwoWords)),
52
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.group, new StringFormatter(StringFormatterSizeType.TwoWords)),
53
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.entity, new StringFormatter(StringFormatterSizeType.TwoWords)),
54
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.created_at, new DateTimeFormatter()),
55
- BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.updated_at, new DateTimeFormatter()),
56
- ];
57
- }
58
- },
59
- server: {
60
- value_list: server.value.List,
61
- get: server.session.Get,
62
- list: server.session.List,
63
- create: null,
64
- update: null,
65
- delete: server.session.Delete,
66
- }
67
- },
68
- ui: {
69
- action: {
70
- menus: {
71
- view_history: false
72
- }
73
- },
74
- },
75
- list: {
76
- },
77
- // list: {
78
- // ui: {
79
- // tabs: {
80
- // enabled: true,
81
- // items: {
82
- // history: false
83
- // }
84
- // }
85
- // }
86
- // }
87
- }
88
- }
89
- >
90
- <></>
91
- </NSALayout >
92
- </>
93
- );
1
+ import { NSARouterMakerProps } from "./NSARouterMakerProps";
2
+ import { BaseColumnFormatter, DateTimeFormatter, IDFormatter, StringFormatter, StringFormatterSizeType } from "namirasoft-site-react";
3
+ import { NamirasoftMap } from "namirasoft-site-map";
4
+ import { NamirasoftAccountServer } from "namirasoft-account";
5
+ import { NSALoginPage } from "./pages/NSALoginPage";
6
+ import { NSAHomePage } from "./pages/NSAHomePage";
7
+ import { NSALayout } from "./layouts/NSALayout";
8
+
9
+ export interface AppProps extends NSARouterMakerProps
10
+ { }
11
+
12
+ export function App(props: AppProps)
13
+ {
14
+ // let server = new NamirasoftFieldServer("https://field.namirasoft.dev/api/v1", props.account.token_manager, props.notifier.onError);
15
+ let server = new NamirasoftAccountServer("https://account.namirasoft.dev/api/v1", props.account.token_manager, props.notifier.onError);
16
+ if (!props.account)
17
+ return <NSALoginPage
18
+ product_id={props.product_id}
19
+ />
20
+
21
+ let namirasoft = new NamirasoftMap(props.account.token_manager, props.notifier.onError);
22
+ if (12 < 20)
23
+ return <NSALayout
24
+ {...props}
25
+ >
26
+ <NSAHomePage
27
+ {...props}
28
+ notifier={props.notifier}
29
+ />
30
+ </NSALayout>
31
+ return (
32
+ <>
33
+ <NSALayout {...props}
34
+ pages={
35
+ {
36
+ entity: {
37
+ product_id: props.product_id,
38
+ name: "session",
39
+ tables: [{ table: namirasoft.account.tables.session, required: false }],
40
+ client: {
41
+ getListURL: () => "",
42
+ getNewURL: null,
43
+ getCopyURL: null,
44
+ getEditURL: null,
45
+ getViewURL: null,
46
+ getColumns: () =>
47
+ {
48
+ return [
49
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.id, new IDFormatter(namirasoft, null)),
50
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.user_id, new IDFormatter(namirasoft, null)),
51
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.name, new StringFormatter(StringFormatterSizeType.TwoWords)),
52
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.group, new StringFormatter(StringFormatterSizeType.TwoWords)),
53
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.entity, new StringFormatter(StringFormatterSizeType.TwoWords)),
54
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.created_at, new DateTimeFormatter()),
55
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.updated_at, new DateTimeFormatter()),
56
+ ];
57
+ }
58
+ },
59
+ server: {
60
+ value_list: server.value.List,
61
+ get: server.session.Get,
62
+ list: server.session.List,
63
+ create: null,
64
+ update: null,
65
+ delete: server.session.Delete,
66
+ }
67
+ },
68
+ ui: {
69
+ action: {
70
+ menus: {
71
+ view_history: false
72
+ }
73
+ },
74
+ },
75
+ list: {
76
+ },
77
+ // list: {
78
+ // ui: {
79
+ // tabs: {
80
+ // enabled: true,
81
+ // items: {
82
+ // history: false
83
+ // }
84
+ // }
85
+ // }
86
+ // }
87
+ }
88
+ }
89
+ >
90
+ <></>
91
+ </NSALayout >
92
+ </>
93
+ );
94
94
  };
package/src/CTFRow.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { EntityCategoryInputRow, EntityFieldInputRow, EntityTagInputRow } from "namirasoft-field";
2
-
3
- export interface CTFRow
4
- {
5
- categories: EntityCategoryInputRow[];
6
- fields: EntityFieldInputRow[];
7
- tags: EntityTagInputRow[];
1
+ import { EntityCategoryInputRow, EntityFieldInputRow, EntityTagInputRow } from "namirasoft-field";
2
+
3
+ export interface CTFRow
4
+ {
5
+ categories: EntityCategoryInputRow[];
6
+ fields: EntityFieldInputRow[];
7
+ tags: EntityTagInputRow[];
8
8
  }
@@ -1,26 +1,26 @@
1
- import { ConsentRow, NamirasoftAccountServer, TokenManager } from "namirasoft-account";
2
- import { CacheService, EnvService, IStorageLocal } from "namirasoft-core";
3
-
4
- export class ConsentCacheService
5
- {
6
- static get(manager: TokenManager, product_id: string, onError: (error: Error | string, timout?: number) => void)
7
- {
8
- let user_id = manager.getUserData(user => user.id, "");
9
- let key = `ns-account-consent-user-${user_id}-product-${product_id}`;
10
- return new CacheService<ConsentRow | null>(key, new IStorageLocal(), 7 * 24 * 60, async () => "1.0.0", async () =>
11
- {
12
- let REACT_APP_BASE_URL_ACCOUNT = new EnvService("REACT_APP_BASE_URL_ACCOUNT", true).getString();
13
- let server = new NamirasoftAccountServer(REACT_APP_BASE_URL_ACCOUNT, manager, onError);
14
- try
15
- {
16
- debugger;
17
- let ans = await server.consent.GetByProduct(product_id);
18
- return ans;
19
- } catch (error)
20
- {
21
- debugger;
22
- return null;
23
- }
24
- });
25
- }
1
+ import { ConsentRow, NamirasoftAccountServer, TokenManager } from "namirasoft-account";
2
+ import { CacheService, EnvService, IStorageLocal } from "namirasoft-core";
3
+
4
+ export class ConsentCacheService
5
+ {
6
+ static get(manager: TokenManager, product_id: string, onError: (error: Error | string, timout?: number) => void)
7
+ {
8
+ let user_id = manager.getUserData(user => user.id, "");
9
+ let key = `ns-account-consent-user-${user_id}-product-${product_id}`;
10
+ return new CacheService<ConsentRow | null>(key, new IStorageLocal(), 7 * 24 * 60, async () => "1.0.0", async () =>
11
+ {
12
+ let REACT_APP_BASE_URL_ACCOUNT = new EnvService("REACT_APP_BASE_URL_ACCOUNT", true).getString();
13
+ let server = new NamirasoftAccountServer(REACT_APP_BASE_URL_ACCOUNT, manager, onError);
14
+ try
15
+ {
16
+ debugger;
17
+ let ans = await server.consent.GetByProduct(product_id);
18
+ return ans;
19
+ } catch (error)
20
+ {
21
+ debugger;
22
+ return null;
23
+ }
24
+ });
25
+ }
26
26
  }
@@ -1,32 +1,32 @@
1
- import { BaseMetaTable, FilterItem, SortItem } from "namirasoft-core";
2
- import { NSMenuActionProps, 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, search: string | null, field_id: string | null, limit: number | null) => Promise<string[]>;
11
- get: null | ((id: string) => Promise<EntityType>);
12
- list: null | ((filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) => 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[], getRows: (() => EntityType[])) => { [group: string]: NSMenuActionProps[]; }
31
- }
1
+ import { BaseMetaTable, FilterItem, SortItem } from "namirasoft-core";
2
+ import { NSMenuActionProps, 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, search: string | null, field_id: string | null, limit: number | null) => Promise<string[]>;
11
+ get: null | ((id: string) => Promise<EntityType>);
12
+ list: null | ((filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) => 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[], getRows: (() => EntityType[])) => { [group: string]: NSMenuActionProps[]; }
31
+ }
32
32
  }