namirasoft-account-react 1.5.37 → 1.5.39

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 (147) hide show
  1. package/.env.template +15 -15
  2. package/SKILL.md +514 -514
  3. package/config-overrides.js +72 -72
  4. package/dist/App.d.ts +1 -1
  5. package/dist/FieldCacheService.js +4 -0
  6. package/dist/FieldCacheService.js.map +1 -1
  7. package/dist/NSARouterMaker.js +1 -1
  8. package/dist/NSARouterMaker.js.map +1 -1
  9. package/dist/Router.d.ts +1 -1
  10. package/dist/UseParams.d.ts +1 -1
  11. package/dist/components/NSAAccessListDialog.d.ts +2 -2
  12. package/dist/components/NSAAccessListDialog.module.css +71 -71
  13. package/dist/components/NSABoxSecret.d.ts +1 -1
  14. package/dist/components/NSABoxSecret.module.css +23 -23
  15. package/dist/components/NSAMasterMenu.d.ts +1 -1
  16. package/dist/components/NSAMasterMenu.js +4 -0
  17. package/dist/components/NSAMasterMenu.js.map +1 -1
  18. package/dist/components/NSAMasterMenu.module.css +250 -250
  19. package/dist/components/NSAMasterMenuItem.d.ts +1 -1
  20. package/dist/components/NSAMessageListDialog.d.ts +1 -1
  21. package/dist/components/NSAMessageListDialog.module.css +99 -99
  22. package/dist/components/NSANavigationGuard.d.ts +1 -1
  23. package/dist/components/NSAProductListDialog.d.ts +1 -1
  24. package/dist/components/NSAProductListDialog.module.css +44 -44
  25. package/dist/components/NSATaskBar.d.ts +1 -1
  26. package/dist/components/NSATaskBar.module.css +57 -57
  27. package/dist/components/NSAUserDialog.d.ts +1 -1
  28. package/dist/components/NSAUserDialog.module.css +67 -67
  29. package/dist/components/NSAWorkspaceListDialog.d.ts +1 -1
  30. package/dist/components/NSAWorkspaceListDialog.module.css +41 -41
  31. package/dist/components/NSFBoxCategoryScope.d.ts +1 -1
  32. package/dist/components/NSFBoxField.d.ts +1 -1
  33. package/dist/components/NSFBoxSlot.d.ts +1 -1
  34. package/dist/components/NSFBoxWrapper.d.ts +1 -1
  35. package/dist/components/NSLabelSecret.d.ts +1 -1
  36. package/dist/components/quickfilter/NSAFilterBoxEnum.module.css +51 -51
  37. package/dist/components/quickfilter/NSAQuickFilterBar.d.ts +1 -1
  38. package/dist/components/quickfilter/NSAQuickFilterBar.module.css +20 -20
  39. package/dist/components/quickfilter/NSAQuickFilterDialog.d.ts +1 -1
  40. package/dist/components/quickfilter/NSAQuickFilterDialog.module.css +74 -74
  41. package/dist/layouts/NSALayout.d.ts +1 -1
  42. package/dist/layouts/NSASectionEdit.d.ts +1 -1
  43. package/dist/layouts/NSASectionEditTabPage.d.ts +1 -1
  44. package/dist/layouts/NSASectionEditTabPage.module.css +4 -4
  45. package/dist/layouts/NSASectionList.d.ts +1 -1
  46. package/dist/layouts/NSASectionList.module.css +24 -24
  47. package/dist/layouts/NSASectionView.d.ts +1 -1
  48. package/dist/layouts/NSASectionViewTabMore.d.ts +1 -1
  49. package/dist/layouts/NSASectionViewTabPage.d.ts +1 -1
  50. package/dist/layouts/NSASectionViewTabPage.module.css +47 -47
  51. package/dist/pages/NSAConsentPage.module.css +26 -26
  52. package/dist/pages/NSAEmailVerificationPage.d.ts +1 -1
  53. package/dist/pages/NSAHomePage.d.ts +1 -1
  54. package/dist/pages/NSAHomePage.module.css +41 -41
  55. package/dist/pages/NSALoginPage.d.ts +1 -1
  56. package/dist/pages/NSALoginPage.module.css +26 -26
  57. package/dist/pages/NSAPhoneVerificationPage.d.ts +1 -1
  58. package/dist/pages/NSAPhoneVerificationPage.js +11 -3
  59. package/dist/pages/NSAPhoneVerificationPage.js.map +1 -1
  60. package/dist/pages/NSAVerificationPage.d.ts +1 -1
  61. package/dist/pages/NSAVerificationPage.module.css +31 -31
  62. package/package.json +94 -94
  63. package/public/index.html +21 -21
  64. package/src/App.tsx +72 -72
  65. package/src/CTFRow.ts +7 -7
  66. package/src/FieldCacheService.tsx +113 -108
  67. package/src/IEntityInfo.ts +33 -33
  68. package/src/NSACacheService.ts +126 -126
  69. package/src/NSAFilterOperators.ts +94 -94
  70. package/src/NSARouterMaker.tsx +141 -141
  71. package/src/NSARouterMakerProps.ts +23 -23
  72. package/src/NSARouterMakerResult.ts +24 -24
  73. package/src/NSFRouterMaker.tsx +35 -35
  74. package/src/NSFRouterProps.ts +7 -7
  75. package/src/NSFRoutes.ts +30 -30
  76. package/src/Router.tsx +48 -48
  77. package/src/UseParams.tsx +17 -17
  78. package/src/components/NSAAccessListDialog.module.css +71 -71
  79. package/src/components/NSAAccessListDialog.tsx +178 -178
  80. package/src/components/NSABoxSecret.module.css +23 -23
  81. package/src/components/NSABoxSecret.tsx +264 -264
  82. package/src/components/NSAMasterMenu.module.css +250 -250
  83. package/src/components/NSAMasterMenu.tsx +174 -169
  84. package/src/components/NSAMasterMenuItem.tsx +250 -250
  85. package/src/components/NSAMessageListDialog.module.css +99 -99
  86. package/src/components/NSAMessageListDialog.tsx +144 -144
  87. package/src/components/NSANavigationGuard.tsx +79 -79
  88. package/src/components/NSAProductListDialog.module.css +44 -44
  89. package/src/components/NSAProductListDialog.tsx +88 -88
  90. package/src/components/NSATable.tsx +494 -494
  91. package/src/components/NSATaskBar.module.css +57 -57
  92. package/src/components/NSATaskBar.tsx +193 -193
  93. package/src/components/NSAUserDialog.module.css +67 -67
  94. package/src/components/NSAUserDialog.tsx +122 -122
  95. package/src/components/NSAWorkspaceListDialog.module.css +41 -41
  96. package/src/components/NSAWorkspaceListDialog.tsx +147 -147
  97. package/src/components/NSFBoxCategoryScope.tsx +52 -52
  98. package/src/components/NSFBoxField.tsx +37 -37
  99. package/src/components/NSFBoxSlot.tsx +73 -73
  100. package/src/components/NSFBoxWrapper.tsx +69 -69
  101. package/src/components/NSLabelSecret.tsx +37 -37
  102. package/src/components/quickfilter/NSAFilterBoxBase.tsx +110 -110
  103. package/src/components/quickfilter/NSAFilterBoxBoolean.tsx +72 -72
  104. package/src/components/quickfilter/NSAFilterBoxDate.tsx +110 -110
  105. package/src/components/quickfilter/NSAFilterBoxDateTime.tsx +110 -110
  106. package/src/components/quickfilter/NSAFilterBoxEnum.module.css +51 -51
  107. package/src/components/quickfilter/NSAFilterBoxEnum.tsx +103 -103
  108. package/src/components/quickfilter/NSAFilterBoxNumber.tsx +145 -145
  109. package/src/components/quickfilter/NSAFilterBoxString.tsx +83 -83
  110. package/src/components/quickfilter/NSAFilterBoxTime.tsx +106 -106
  111. package/src/components/quickfilter/NSAQuickFilterBar.module.css +20 -20
  112. package/src/components/quickfilter/NSAQuickFilterBar.tsx +142 -142
  113. package/src/components/quickfilter/NSAQuickFilterDialog.module.css +74 -74
  114. package/src/components/quickfilter/NSAQuickFilterDialog.tsx +297 -297
  115. package/src/css.d.ts +13 -13
  116. package/src/formatters/SecretFormatter.tsx +24 -24
  117. package/src/index.tsx +27 -27
  118. package/src/layouts/Actions.ts +146 -146
  119. package/src/layouts/CFTUtil.ts +18 -18
  120. package/src/layouts/NSALayout.tsx +750 -750
  121. package/src/layouts/NSALayout_Field.ts +125 -125
  122. package/src/layouts/NSASectionEdit.tsx +279 -279
  123. package/src/layouts/NSASectionEditTabPage.module.css +4 -4
  124. package/src/layouts/NSASectionEditTabPage.tsx +256 -256
  125. package/src/layouts/NSASectionList.module.css +24 -24
  126. package/src/layouts/NSASectionList.tsx +165 -165
  127. package/src/layouts/NSASectionView.tsx +98 -98
  128. package/src/layouts/NSASectionViewTabMore.tsx +78 -78
  129. package/src/layouts/NSASectionViewTabPage.module.css +47 -47
  130. package/src/layouts/NSASectionViewTabPage.tsx +400 -400
  131. package/src/main.ts +52 -52
  132. package/src/pages/NSAConsentPage.module.css +26 -26
  133. package/src/pages/NSAConsentPage.tsx +120 -120
  134. package/src/pages/NSAEmailVerificationPage.tsx +30 -30
  135. package/src/pages/NSAHomePage.module.css +41 -41
  136. package/src/pages/NSAHomePage.tsx +113 -113
  137. package/src/pages/NSALoginPage.module.css +26 -26
  138. package/src/pages/NSALoginPage.tsx +87 -87
  139. package/src/pages/NSAPhoneVerificationPage.tsx +106 -94
  140. package/src/pages/NSAVerificationPage.module.css +31 -31
  141. package/src/pages/NSAVerificationPage.tsx +185 -185
  142. package/src/pages/NSFCategoryEditPage.tsx +87 -87
  143. package/src/pages/NSFCategoryListPage.tsx +23 -23
  144. package/src/pages/NSFCategoryViewPage.tsx +23 -23
  145. package/src/pages/NSFEntities.ts +58 -58
  146. package/src/pages/PaymentRequired.tsx +80 -80
  147. package/tsconfig.json +43 -43
@@ -1,32 +1,32 @@
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
- }
24
-
25
- .nsa_resend_button {
26
- border: 0;
27
- outline: 0;
28
- background: none;
29
- color: #141B5C;
30
- font-size: 16px;
31
- font-weight: 500;
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
+ }
24
+
25
+ .nsa_resend_button {
26
+ border: 0;
27
+ outline: 0;
28
+ background: none;
29
+ color: #141B5C;
30
+ font-size: 16px;
31
+ font-weight: 500;
32
32
  }
@@ -1,186 +1,186 @@
1
- import { BaseServer } from "namirasoft-core";
2
- import { IBaseComponentProps, NSBoxString, NSButtonBlue, NSRouterMakerResult, NSSection, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
3
- import React, { createRef, ReactNode } from "react";
4
- import { NSARouterMakerResult } from '../NSARouterMakerResult';
5
- import Styles from './NSAVerificationPage.module.css';
6
-
7
- export interface NSAVerificationPageProps extends IBaseComponentProps, NSRouterMakerResult, NSARouterMakerResult
8
- {
9
- contact_type: string;
10
- contact_value_name: string;
11
- getContactValue: (checkErrors: boolean) => string;
12
- onRequest: (address: string) => Promise<void>;
13
- onVerify: (code: string) => Promise<void>;
14
- onFinished: () => void;
15
- onChange?: () => void;
16
- children?: ReactNode;
17
- }
18
-
19
- export interface NSAVerificationPageState
20
- {
21
- isSendCode: boolean;
22
- }
23
-
24
- export class NSAVerificationPage extends React.Component<NSAVerificationPageProps, NSAVerificationPageState>
25
- {
26
- private NSButtonBlue_Verify = createRef<NSButtonBlue>();
27
- private NSBoxString_Code = createRef<NSBoxString>();
28
- constructor(props: NSAVerificationPageProps)
29
- {
30
- super(props);
31
- this.state = { isSendCode: false };
32
- this.onRequest = this.onRequest.bind(this);
33
- this.onVerify = this.onVerify.bind(this);
34
- }
35
- private async onRequest(onFinshied: () => void)
36
- {
37
- try
38
- {
39
- this.props.onRequest(this.props.getContactValue(true)).then(() =>
40
- {
41
- this.setState({ isSendCode: true });
42
- this.props.notifier.onSuccess(`Verification code has been sent successfully.`);
43
- onFinshied();
44
- }).catch(onFinshied);
45
- } catch (error)
46
- {
47
- this.props.notifier.onError(error as Error);
48
- onFinshied();
49
- }
50
- }
51
- private async onVerify(onFinshied: () => void)
52
- {
53
- try
54
- {
55
- let code = this.NSBoxString_Code.current?.getValue() ?? "";
56
- this.props.onVerify(code).then(() =>
57
- {
58
- this.props.notifier.onSuccess("Verification has been done successfully.");
59
- this.props.notifier.onSuccess("Redirecting ...", 2000);
60
- setTimeout(() =>
61
- {
62
- this.props.onFinished();
63
- onFinshied();
64
- }, 2000);
65
- }).catch(e =>
66
- {
67
- onFinshied();
68
- if (BaseServer.isErrorCode(e, 410) || BaseServer.isErrorCode(e, 404))
69
- this.setState({ isSendCode: false });
70
- });
71
- } catch (error)
72
- {
73
- this.props.notifier.onError(error as Error);
74
- onFinshied();
75
- }
76
- }
77
- override componentDidMount(): void
78
- {
79
- let code = this.props.url.getQuery("code", false, true) ?? "";
80
- if (code)
81
- {
82
- this.setState({ isSendCode: true }, () =>
83
- {
84
- this.NSBoxString_Code.current?.setValue(code, () =>
85
- {
86
- this.NSButtonBlue_Verify.current?.performClick();
87
- });
88
- });
89
- }
90
- }
91
- override render()
92
- {
93
- return (
94
- <NSSection>
95
- <div
96
- className={`${Styles.nsa_verification_container} ${this.props.classList?.join(" ") ?? ""}`}
97
- style={this.props.style}
98
- >
99
- <img
100
- src={"https://static.namirasoft.com/image/concept/verification/purple.png"}
101
- alt={'verification vector'}
102
- className={Styles.nsa_verification_vector}
103
- />
104
- <div className='m-0'>
105
- <p className='m-2'>Type: {this.props.contact_type}</p>
106
- {
107
- ((this.state.isSendCode || !this.props.children) && this.props.getContactValue(false)) &&
108
- <p className='m-2'>{this.props.contact_value_name}: {this.props.getContactValue(false)}</p>
109
- }
110
- {
111
- this.props.children &&
112
- <div style={{ display: this.state.isSendCode ? "none" : undefined }}>
113
- {this.props.children}
114
- </div>
115
- }
116
- </div>
117
- {
118
- this.state.isSendCode ?
119
- <>
120
- <p style={{ margin: 0 }}>
121
- Please enter the code you received
122
- </p>
123
- <NSBoxString
124
- ref={this.NSBoxString_Code}
125
- title='Verification Code'
126
- placeholder='Enter the code'
127
- hideHeader={true}
128
- required={true}
129
- min_length={6}
130
- max_length={6}
131
- input={{ style: { fontSize: '24px', fontWeight: "bold", textAlign: "center" } }}
132
- />
133
- </>
134
- :
135
- <>
136
- {
137
- this.props.onChange &&
138
- <>
139
- <button
140
- onClick={this.props.onChange}
141
- className={Styles.nsa_resend_button}
142
- style={{ marginTop: "8px" }}
143
- >Change {this.props.contact_value_name}</button>
144
- <NSSpace size={NSSpaceSizeType.NANO} />
145
- </>
146
- }
147
- <NSButtonBlue
148
- title='Send Code'
149
- onClick={{
150
- action: (onFinished) =>
151
- {
152
- this.onRequest(onFinished);
153
- },
154
- }}
155
- />
156
- </>
157
- }
158
- </div>
159
- <NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
160
- {
161
- this.state.isSendCode &&
162
- <>
163
- <NSButtonBlue
164
- ref={this.NSButtonBlue_Verify}
165
- title="Verify"
166
- onClick={{
167
- action: (onFinished) =>
168
- {
169
- this.onVerify(onFinished);
170
- },
171
- }}
172
- />
173
- <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
174
- <button
175
- onClick={() =>
176
- {
177
- this.setState(prev => ({ ...prev, isSendCode: false }));
178
- }}
179
- className={Styles.nsa_resend_button}
180
- >Resend Code</button>
181
- </>
182
- }
183
- </NSSection>
184
- );
185
- }
1
+ import { BaseServer } from "namirasoft-core";
2
+ import { IBaseComponentProps, NSBoxString, NSButtonBlue, NSRouterMakerResult, NSSection, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
3
+ import React, { createRef, ReactNode } from "react";
4
+ import { NSARouterMakerResult } from '../NSARouterMakerResult';
5
+ import Styles from './NSAVerificationPage.module.css';
6
+
7
+ export interface NSAVerificationPageProps extends IBaseComponentProps, NSRouterMakerResult, NSARouterMakerResult
8
+ {
9
+ contact_type: string;
10
+ contact_value_name: string;
11
+ getContactValue: (checkErrors: boolean) => string;
12
+ onRequest: (address: string) => Promise<void>;
13
+ onVerify: (code: string) => Promise<void>;
14
+ onFinished: () => void;
15
+ onChange?: () => void;
16
+ children?: ReactNode;
17
+ }
18
+
19
+ export interface NSAVerificationPageState
20
+ {
21
+ isSendCode: boolean;
22
+ }
23
+
24
+ export class NSAVerificationPage extends React.Component<NSAVerificationPageProps, NSAVerificationPageState>
25
+ {
26
+ private NSButtonBlue_Verify = createRef<NSButtonBlue>();
27
+ private NSBoxString_Code = createRef<NSBoxString>();
28
+ constructor(props: NSAVerificationPageProps)
29
+ {
30
+ super(props);
31
+ this.state = { isSendCode: false };
32
+ this.onRequest = this.onRequest.bind(this);
33
+ this.onVerify = this.onVerify.bind(this);
34
+ }
35
+ private async onRequest(onFinshied: () => void)
36
+ {
37
+ try
38
+ {
39
+ this.props.onRequest(this.props.getContactValue(true)).then(() =>
40
+ {
41
+ this.setState({ isSendCode: true });
42
+ this.props.notifier.onSuccess(`Verification code has been sent successfully.`);
43
+ onFinshied();
44
+ }).catch(onFinshied);
45
+ } catch (error)
46
+ {
47
+ this.props.notifier.onError(error as Error);
48
+ onFinshied();
49
+ }
50
+ }
51
+ private async onVerify(onFinshied: () => void)
52
+ {
53
+ try
54
+ {
55
+ let code = this.NSBoxString_Code.current?.getValue() ?? "";
56
+ this.props.onVerify(code).then(() =>
57
+ {
58
+ this.props.notifier.onSuccess("Verification has been done successfully.");
59
+ this.props.notifier.onSuccess("Redirecting ...", 2000);
60
+ setTimeout(() =>
61
+ {
62
+ this.props.onFinished();
63
+ onFinshied();
64
+ }, 2000);
65
+ }).catch(e =>
66
+ {
67
+ onFinshied();
68
+ if (BaseServer.isErrorCode(e, 410) || BaseServer.isErrorCode(e, 404))
69
+ this.setState({ isSendCode: false });
70
+ });
71
+ } catch (error)
72
+ {
73
+ this.props.notifier.onError(error as Error);
74
+ onFinshied();
75
+ }
76
+ }
77
+ override componentDidMount(): void
78
+ {
79
+ let code = this.props.url.getQuery("code", false, true) ?? "";
80
+ if (code)
81
+ {
82
+ this.setState({ isSendCode: true }, () =>
83
+ {
84
+ this.NSBoxString_Code.current?.setValue(code, () =>
85
+ {
86
+ this.NSButtonBlue_Verify.current?.performClick();
87
+ });
88
+ });
89
+ }
90
+ }
91
+ override render()
92
+ {
93
+ return (
94
+ <NSSection>
95
+ <div
96
+ className={`${Styles.nsa_verification_container} ${this.props.classList?.join(" ") ?? ""}`}
97
+ style={this.props.style}
98
+ >
99
+ <img
100
+ src={"https://static.namirasoft.com/image/concept/verification/purple.png"}
101
+ alt={'verification vector'}
102
+ className={Styles.nsa_verification_vector}
103
+ />
104
+ <div className='m-0'>
105
+ <p className='m-2'>Type: {this.props.contact_type}</p>
106
+ {
107
+ ((this.state.isSendCode || !this.props.children) && this.props.getContactValue(false)) &&
108
+ <p className='m-2'>{this.props.contact_value_name}: {this.props.getContactValue(false)}</p>
109
+ }
110
+ {
111
+ this.props.children &&
112
+ <div style={{ display: this.state.isSendCode ? "none" : undefined }}>
113
+ {this.props.children}
114
+ </div>
115
+ }
116
+ </div>
117
+ {
118
+ this.state.isSendCode ?
119
+ <>
120
+ <p style={{ margin: 0 }}>
121
+ Please enter the code you received
122
+ </p>
123
+ <NSBoxString
124
+ ref={this.NSBoxString_Code}
125
+ title='Verification Code'
126
+ placeholder='Enter the code'
127
+ hideHeader={true}
128
+ required={true}
129
+ min_length={6}
130
+ max_length={6}
131
+ input={{ style: { fontSize: '24px', fontWeight: "bold", textAlign: "center" } }}
132
+ />
133
+ </>
134
+ :
135
+ <>
136
+ {
137
+ this.props.onChange &&
138
+ <>
139
+ <button
140
+ onClick={this.props.onChange}
141
+ className={Styles.nsa_resend_button}
142
+ style={{ marginTop: "8px" }}
143
+ >Change {this.props.contact_value_name}</button>
144
+ <NSSpace size={NSSpaceSizeType.NANO} />
145
+ </>
146
+ }
147
+ <NSButtonBlue
148
+ title='Send Code'
149
+ onClick={{
150
+ action: (onFinished) =>
151
+ {
152
+ this.onRequest(onFinished);
153
+ },
154
+ }}
155
+ />
156
+ </>
157
+ }
158
+ </div>
159
+ <NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
160
+ {
161
+ this.state.isSendCode &&
162
+ <>
163
+ <NSButtonBlue
164
+ ref={this.NSButtonBlue_Verify}
165
+ title="Verify"
166
+ onClick={{
167
+ action: (onFinished) =>
168
+ {
169
+ this.onVerify(onFinished);
170
+ },
171
+ }}
172
+ />
173
+ <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
174
+ <button
175
+ onClick={() =>
176
+ {
177
+ this.setState(prev => ({ ...prev, isSendCode: false }));
178
+ }}
179
+ className={Styles.nsa_resend_button}
180
+ >Resend Code</button>
181
+ </>
182
+ }
183
+ </NSSection>
184
+ );
185
+ }
186
186
  }
@@ -1,88 +1,88 @@
1
- import { CategoryInputRow, CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
2
- import { NSBox, NSBoxString, NSBoxTextArea, NSColumn, NSRow } from "namirasoft-site-react";
3
- import { Component, createRef } from "react";
4
- import { NSALayoutCustomProps } from "../layouts/NSALayout";
5
- import { NSFRouterProps } from "../NSFRouterProps";
6
- import { NSFEntities } from "./NSFEntities";
7
-
8
- export interface NSFCategoryEditPageProps extends NSALayoutCustomProps<CategoryRow>, NSFRouterProps
9
- {
10
- slot: SlotRow;
11
- category_scope: CategoryScopeRow;
12
- isEdit: boolean;
13
- }
14
-
15
- interface NSFCategoryEditPageState { }
16
-
17
- export class NSFCategoryEditPage extends Component<NSFCategoryEditPageProps, NSFCategoryEditPageState>
18
- {
19
- NSBoxString_Name = createRef<NSBoxString>();
20
- NSBoxTexArea_Description = createRef<NSBoxTextArea>();
21
-
22
- constructor(props: NSFCategoryEditPageProps)
23
- {
24
- super(props);
25
- this.state = {};
26
- }
27
-
28
- override render()
29
- {
30
- return this.props.layout.getNSALayout<CategoryRow, CategoryInputRow>({
31
- ...this.props,
32
- action: {
33
- description: this.props.isEdit ? "This section allows you to update the details of an existing category." : "This section allows you to add a new category by entering its details."
34
- },
35
- pages: {
36
- entity: NSFEntities.category(this.props, this.props.slot, this.props.category_scope),
37
- edit: {
38
- ...this.props,
39
- ui: {
40
- tab_page_edit: {
41
- editor: {
42
- getInputRow: () =>
43
- {
44
- let category_scope_id = this.props.category_scope.id;
45
- let name = this.NSBoxString_Name.current?.getValue() ?? "";
46
- let description = this.NSBoxTexArea_Description.current?.getValue() ?? "";
47
-
48
- return {
49
- workspace_id: "",
50
- category_scope_id,
51
- name,
52
- description,
53
- category_category: [],
54
- category_field: [],
55
- category_tag: [],
56
- };
57
- },
58
- setRow: (row) =>
59
- {
60
- this.NSBoxString_Name.current?.setValue(row.name);
61
- this.NSBoxTexArea_Description.current?.setValue(row.description ?? "");
62
- }
63
- }
64
- }
65
- }
66
- }
67
- },
68
- children: <NSColumn>
69
- <NSRow>
70
- <NSBoxString
71
- ref={this.NSBoxString_Name}
72
- title="Name"
73
- required
74
- style={{ width: NSBox.width.double }}
75
- info={{ link: "https://namirasoft.com/field/console-guide/category/#field-name" }}
76
- />
77
- </NSRow>
78
- <NSBoxTextArea
79
- ref={this.NSBoxTexArea_Description}
80
- title="Description"
81
- required={false}
82
- style={{ width: NSBox.width.double }}
83
- info={{ link: "https://namirasoft.com/field/console-guide/category/#field-description" }}
84
- />
85
- </NSColumn>
86
- }, "nsf-page-category-view");
87
- }
1
+ import { CategoryInputRow, CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSBox, NSBoxString, NSBoxTextArea, NSColumn, NSRow } from "namirasoft-site-react";
3
+ import { Component, createRef } from "react";
4
+ import { NSALayoutCustomProps } from "../layouts/NSALayout";
5
+ import { NSFRouterProps } from "../NSFRouterProps";
6
+ import { NSFEntities } from "./NSFEntities";
7
+
8
+ export interface NSFCategoryEditPageProps extends NSALayoutCustomProps<CategoryRow>, NSFRouterProps
9
+ {
10
+ slot: SlotRow;
11
+ category_scope: CategoryScopeRow;
12
+ isEdit: boolean;
13
+ }
14
+
15
+ interface NSFCategoryEditPageState { }
16
+
17
+ export class NSFCategoryEditPage extends Component<NSFCategoryEditPageProps, NSFCategoryEditPageState>
18
+ {
19
+ NSBoxString_Name = createRef<NSBoxString>();
20
+ NSBoxTexArea_Description = createRef<NSBoxTextArea>();
21
+
22
+ constructor(props: NSFCategoryEditPageProps)
23
+ {
24
+ super(props);
25
+ this.state = {};
26
+ }
27
+
28
+ override render()
29
+ {
30
+ return this.props.layout.getNSALayout<CategoryRow, CategoryInputRow>({
31
+ ...this.props,
32
+ action: {
33
+ description: this.props.isEdit ? "This section allows you to update the details of an existing category." : "This section allows you to add a new category by entering its details."
34
+ },
35
+ pages: {
36
+ entity: NSFEntities.category(this.props, this.props.slot, this.props.category_scope),
37
+ edit: {
38
+ ...this.props,
39
+ ui: {
40
+ tab_page_edit: {
41
+ editor: {
42
+ getInputRow: () =>
43
+ {
44
+ let category_scope_id = this.props.category_scope.id;
45
+ let name = this.NSBoxString_Name.current?.getValue() ?? "";
46
+ let description = this.NSBoxTexArea_Description.current?.getValue() ?? "";
47
+
48
+ return {
49
+ workspace_id: "",
50
+ category_scope_id,
51
+ name,
52
+ description,
53
+ category_category: [],
54
+ category_field: [],
55
+ category_tag: [],
56
+ };
57
+ },
58
+ setRow: (row) =>
59
+ {
60
+ this.NSBoxString_Name.current?.setValue(row.name);
61
+ this.NSBoxTexArea_Description.current?.setValue(row.description ?? "");
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ },
68
+ children: <NSColumn>
69
+ <NSRow>
70
+ <NSBoxString
71
+ ref={this.NSBoxString_Name}
72
+ title="Name"
73
+ required
74
+ style={{ width: NSBox.width.double }}
75
+ info={{ link: "https://namirasoft.com/field/console-guide/category/#field-name" }}
76
+ />
77
+ </NSRow>
78
+ <NSBoxTextArea
79
+ ref={this.NSBoxTexArea_Description}
80
+ title="Description"
81
+ required={false}
82
+ style={{ width: NSBox.width.double }}
83
+ info={{ link: "https://namirasoft.com/field/console-guide/category/#field-description" }}
84
+ />
85
+ </NSColumn>
86
+ }, "nsf-page-category-view");
87
+ }
88
88
  }
@@ -1,24 +1,24 @@
1
- import { CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
2
- import { NSALayoutCustomProps } from "../layouts/NSALayout";
3
- import { NSFRouterProps } from "../NSFRouterProps";
4
- import { NSFEntities } from "./NSFEntities";
5
-
6
- export interface NSFCategoryListPageProps extends NSALayoutCustomProps<CategoryRow>, NSFRouterProps
7
- {
8
- slot: SlotRow;
9
- category_scope: CategoryScopeRow;
10
- }
11
-
12
- export function NSFCategoryListPage(props: NSFCategoryListPageProps)
13
- {
14
- return props.layout.getNSALayout({
15
- ...props,
16
- action: {
17
- description: "This section displays all categories you have created with their basic information."
18
- },
19
- pages: {
20
- entity: NSFEntities.category(props, props.slot, props.category_scope),
21
- list: {}
22
- }
23
- }, "nsf-page-category-list");
1
+ import { CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSALayoutCustomProps } from "../layouts/NSALayout";
3
+ import { NSFRouterProps } from "../NSFRouterProps";
4
+ import { NSFEntities } from "./NSFEntities";
5
+
6
+ export interface NSFCategoryListPageProps extends NSALayoutCustomProps<CategoryRow>, NSFRouterProps
7
+ {
8
+ slot: SlotRow;
9
+ category_scope: CategoryScopeRow;
10
+ }
11
+
12
+ export function NSFCategoryListPage(props: NSFCategoryListPageProps)
13
+ {
14
+ return props.layout.getNSALayout({
15
+ ...props,
16
+ action: {
17
+ description: "This section displays all categories you have created with their basic information."
18
+ },
19
+ pages: {
20
+ entity: NSFEntities.category(props, props.slot, props.category_scope),
21
+ list: {}
22
+ }
23
+ }, "nsf-page-category-list");
24
24
  }