namirasoft-account-react 1.4.424 → 1.4.425

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 (124) hide show
  1. package/.env.template +15 -15
  2. package/SKILLS.md +514 -514
  3. package/config-overrides.js +72 -72
  4. package/dist/App.css +32 -0
  5. package/dist/App.d.ts +1 -1
  6. package/dist/UseParams.d.ts +1 -1
  7. package/dist/components/NSAAccessListDialog.d.ts +2 -2
  8. package/dist/components/NSAAccessListDialog.module.css +71 -71
  9. package/dist/components/NSAMasterMenu.d.ts +1 -1
  10. package/dist/components/NSAMasterMenu.module.css +248 -248
  11. package/dist/components/NSAMasterMenuItem.d.ts +1 -1
  12. package/dist/components/NSAMessageListDialog.d.ts +1 -1
  13. package/dist/components/NSAMessageListDialog.module.css +99 -99
  14. package/dist/components/NSAProductListDialog.d.ts +1 -1
  15. package/dist/components/NSAProductListDialog.module.css +44 -44
  16. package/dist/components/NSAReorderDialog.d.ts +1 -1
  17. package/dist/components/NSAReorderDialog.module.css +49 -49
  18. package/dist/components/NSASortDialog.d.ts +1 -1
  19. package/dist/components/NSAUserDialog.d.ts +1 -1
  20. package/dist/components/NSAUserDialog.module.css +67 -67
  21. package/dist/components/NSAWorkspaceListDialog.d.ts +1 -1
  22. package/dist/components/NSAWorkspaceListDialog.module.css +41 -41
  23. package/dist/components/NSBoxSecret.d.ts +1 -1
  24. package/dist/components/NSBoxSecret.module.css +23 -23
  25. package/dist/components/NSLabelSecret.d.ts +1 -1
  26. package/dist/components/quickfilter/NSAFilterBoxEnum.module.css +45 -0
  27. package/dist/components/quickfilter/NSAQuickFilterBar.d.ts +1 -1
  28. package/dist/components/quickfilter/NSAQuickFilterBar.module.css +20 -0
  29. package/dist/components/quickfilter/NSAQuickFilterDialog.d.ts +1 -1
  30. package/dist/components/quickfilter/NSAQuickFilterDialog.module.css +75 -0
  31. package/dist/index.css +0 -0
  32. package/dist/layouts/NSALayout.d.ts +1 -1
  33. package/dist/layouts/NSASectionEdit.d.ts +1 -1
  34. package/dist/layouts/NSASectionEditTabPage.d.ts +1 -1
  35. package/dist/layouts/NSASectionEditTabPage.module.css +4 -4
  36. package/dist/layouts/NSASectionList.d.ts +1 -1
  37. package/dist/layouts/NSASectionList.module.css +18 -18
  38. package/dist/layouts/NSASectionView.d.ts +1 -1
  39. package/dist/layouts/NSASectionViewTabMore.d.ts +1 -1
  40. package/dist/layouts/NSASectionViewTabPage.d.ts +1 -1
  41. package/dist/layouts/NSASectionViewTabPage.module.css +47 -47
  42. package/dist/pages/NSAConsentPage.module.css +26 -26
  43. package/dist/pages/NSAEmailVerificationPage.d.ts +1 -1
  44. package/dist/pages/NSAHomePage.d.ts +1 -1
  45. package/dist/pages/NSAHomePage.module.css +41 -41
  46. package/dist/pages/NSALoginPage.d.ts +1 -1
  47. package/dist/pages/NSALoginPage.module.css +26 -26
  48. package/dist/pages/NSAPhoneVerificationPage.d.ts +1 -1
  49. package/dist/pages/NSAVerificationPage.d.ts +1 -1
  50. package/dist/pages/NSAVerificationPage.module.css +31 -31
  51. package/package.json +94 -94
  52. package/public/index.html +21 -21
  53. package/src/App.css +31 -31
  54. package/src/App.tsx +19 -19
  55. package/src/CTFRow.ts +7 -7
  56. package/src/IEntityInfo.ts +33 -33
  57. package/src/NSACacheService.ts +120 -120
  58. package/src/NSAFilterOperators.ts +92 -92
  59. package/src/NSARouterMaker.tsx +139 -139
  60. package/src/NSARouterMakerConfig.ts +15 -15
  61. package/src/NSARouterMakerProps.ts +22 -22
  62. package/src/Router.tsx +45 -45
  63. package/src/UseParams.tsx +18 -18
  64. package/src/components/NSAAccessListDialog.module.css +71 -71
  65. package/src/components/NSAAccessListDialog.tsx +178 -178
  66. package/src/components/NSAMasterMenu.module.css +248 -248
  67. package/src/components/NSAMasterMenu.tsx +169 -169
  68. package/src/components/NSAMasterMenuItem.tsx +250 -250
  69. package/src/components/NSAMessageListDialog.module.css +99 -99
  70. package/src/components/NSAMessageListDialog.tsx +141 -141
  71. package/src/components/NSAProductListDialog.module.css +44 -44
  72. package/src/components/NSAProductListDialog.tsx +88 -88
  73. package/src/components/NSAReorderDialog.module.css +49 -49
  74. package/src/components/NSAReorderDialog.tsx +149 -149
  75. package/src/components/NSASortDialog.tsx +117 -117
  76. package/src/components/NSATable.tsx +489 -489
  77. package/src/components/NSAUserDialog.module.css +67 -67
  78. package/src/components/NSAUserDialog.tsx +122 -122
  79. package/src/components/NSAWorkspaceListDialog.module.css +41 -41
  80. package/src/components/NSAWorkspaceListDialog.tsx +147 -147
  81. package/src/components/NSBoxSecret.module.css +23 -23
  82. package/src/components/NSBoxSecret.tsx +258 -258
  83. package/src/components/NSLabelSecret.tsx +37 -37
  84. package/src/components/quickfilter/NSAFilterBoxBase.tsx +55 -55
  85. package/src/components/quickfilter/NSAFilterBoxBoolean.tsx +54 -54
  86. package/src/components/quickfilter/NSAFilterBoxDate.tsx +104 -104
  87. package/src/components/quickfilter/NSAFilterBoxDateTime.tsx +105 -105
  88. package/src/components/quickfilter/NSAFilterBoxEnum.module.css +44 -44
  89. package/src/components/quickfilter/NSAFilterBoxEnum.tsx +79 -79
  90. package/src/components/quickfilter/NSAFilterBoxNumber.tsx +136 -136
  91. package/src/components/quickfilter/NSAFilterBoxString.tsx +81 -81
  92. package/src/components/quickfilter/NSAFilterBoxTime.tsx +101 -101
  93. package/src/components/quickfilter/NSAQuickFilterBar.module.css +19 -19
  94. package/src/components/quickfilter/NSAQuickFilterBar.tsx +114 -114
  95. package/src/components/quickfilter/NSAQuickFilterDialog.module.css +74 -74
  96. package/src/components/quickfilter/NSAQuickFilterDialog.tsx +260 -260
  97. package/src/css.d.ts +13 -13
  98. package/src/formatters/SecretFormatter.tsx +24 -24
  99. package/src/index.tsx +24 -24
  100. package/src/layouts/Actions.ts +145 -145
  101. package/src/layouts/CFTUtil.ts +18 -18
  102. package/src/layouts/NSALayout.tsx +765 -765
  103. package/src/layouts/NSASectionEdit.tsx +250 -250
  104. package/src/layouts/NSASectionEditTabPage.module.css +4 -4
  105. package/src/layouts/NSASectionEditTabPage.tsx +250 -250
  106. package/src/layouts/NSASectionList.module.css +18 -18
  107. package/src/layouts/NSASectionList.tsx +143 -143
  108. package/src/layouts/NSASectionView.tsx +100 -100
  109. package/src/layouts/NSASectionViewTabMore.tsx +77 -77
  110. package/src/layouts/NSASectionViewTabPage.module.css +47 -47
  111. package/src/layouts/NSASectionViewTabPage.tsx +419 -419
  112. package/src/main.ts +46 -46
  113. package/src/pages/NSAConsentPage.module.css +26 -26
  114. package/src/pages/NSAConsentPage.tsx +120 -120
  115. package/src/pages/NSAEmailVerificationPage.tsx +30 -30
  116. package/src/pages/NSAHomePage.module.css +41 -41
  117. package/src/pages/NSAHomePage.tsx +102 -102
  118. package/src/pages/NSALoginPage.module.css +26 -26
  119. package/src/pages/NSALoginPage.tsx +87 -87
  120. package/src/pages/NSAPhoneVerificationPage.tsx +94 -94
  121. package/src/pages/NSAVerificationPage.module.css +31 -31
  122. package/src/pages/NSAVerificationPage.tsx +186 -186
  123. package/src/pages/PaymentRequired.tsx +74 -74
  124. package/tsconfig.json +43 -43
@@ -1,251 +1,251 @@
1
- import { IBaseComponentProps, NSID, NSLoading } from "namirasoft-site-react";
2
- import { NSSection, NSPanel, NSButtonBlue, NSLine, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
3
- import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
- import { Component, createRef, ReactNode } from "react";
5
- import { IEntityInfo } from "../IEntityInfo";
6
- import { IStorageLocal, NamingConvention } from "namirasoft-core";
7
- import { NSASectionViewTabPage, NSASectionViewTabPageUIProps } from "./NSASectionViewTabPage";
8
- import { NSASectionEditTabPage, NSASectionEditTabPageEditorProps, NSASectionEditTabPageUIProps } from "./NSASectionEditTabPage";
9
- import { CategoryRow, FieldRow } from "namirasoft-field";
10
-
11
- export interface NSASectionEditCustomProps<RowType extends { id: string }, RowTypeInput = RowType> extends NSARouterMakerProps, IBaseComponentProps
12
- {
13
- isEdit: boolean;
14
- ui: {
15
- panel?: IBaseComponentProps;
16
- tab_page_edit: {
17
- ui?: NSASectionEditTabPageUIProps;
18
- editor: NSASectionEditTabPageEditorProps<RowType, RowTypeInput>;
19
- };
20
- tab_page_view?: NSASectionViewTabPageUIProps<RowType>;
21
- }
22
- onLoaded?: () => void;
23
- onRowLoaded?: (item: RowType) => void;
24
- children?: React.ReactNode;
25
- }
26
-
27
- export interface NSASectionEditProps<RowType extends { id: string }, RowTypeInput = RowType> extends NSASectionEditCustomProps<RowType, RowTypeInput>, NSARouterMakerProps
28
- {
29
- model: {
30
- id: string | null;
31
- row: RowType | null;
32
- };
33
- entity: IEntityInfo<RowType, RowTypeInput>,
34
- ctf: {
35
- enabled: boolean;
36
- fields: FieldRow[] | null;
37
- categories: CategoryRow[] | null;
38
- };
39
- deleteFieldCache: () => void;
40
- children: ReactNode;
41
- }
42
-
43
- interface NSASectionEditState<RowType>
44
- {
45
- row: RowType | null;
46
- loading: boolean;
47
- }
48
-
49
- export class NSASectionEdit<RowType extends { id: string }, RowTypeInput = RowType> extends Component<NSASectionEditProps<RowType, RowTypeInput>, NSASectionEditState<RowType>>
50
- {
51
- NSASectionViewTabPage_Ref = createRef<NSASectionViewTabPage<RowType, RowTypeInput>>();
52
- NSASectionEditTabPage_Ref = createRef<NSASectionEditTabPage<RowType, RowTypeInput>>();
53
-
54
- constructor(props: NSASectionEditProps<RowType, RowTypeInput>)
55
- {
56
- super(props);
57
-
58
- this.state = {
59
- row: this.props.model.row,
60
- loading: !this.props.model.row,
61
- };
62
-
63
- this.reload = this.reload.bind(this);
64
- this.getRow = this.getRow.bind(this);
65
- this.onApply = this.onApply.bind(this);
66
- }
67
- reload()
68
- {
69
- this.setState(() => ({ row: null, loading: true }));
70
- if (this.props.model.id)
71
- this.props.entity.server.get?.(this.props.model.id).then(row =>
72
- {
73
- this.setState(
74
- () => ({ row, loading: false }),
75
- () =>
76
- {
77
- this.props.onLoaded?.();
78
- this.props.onRowLoaded?.(row);
79
- }
80
- );
81
- }).catch(() => { });
82
- }
83
- getRow()
84
- {
85
- return this.state.row;
86
- }
87
- async onApply(onFinshied: () => void): Promise<void>
88
- {
89
- try
90
- {
91
- let Name_Pascal_Space = NamingConvention.lower_case_underscore.convert(this.props.entity.name, NamingConvention.Pascal_Case_Space);
92
-
93
- let onSuccess = (new_row: RowType, message: string) =>
94
- {
95
- this.props.notifier.onSuccess(message);
96
- let handled = false;
97
- if (this.props.entity.client.onSuccess)
98
- handled = this.props.entity.client.onSuccess(new_row);
99
- if (!handled)
100
- {
101
- let url = null;
102
- if (this.props.entity.client.getViewURL)
103
- url = this.props.entity.client.getViewURL(new_row.id);
104
- else if (this.props.entity.client.getListURL)
105
- url = this.props.entity.client.getListURL();
106
- if (url)
107
- this.props.url.redirect(url, {});
108
- }
109
- };
110
- let cur_row: RowTypeInput | null = null;
111
- if (this.NSASectionEditTabPage_Ref.current)
112
- cur_row = await this.NSASectionEditTabPage_Ref.current.getInputRow();
113
- if (cur_row)
114
- if (this.props.isEdit)
115
- {
116
- if (this.props.model.id)
117
- {
118
- if (this.props.entity.client.onUpdate)
119
- {
120
- this.props.entity.client.onUpdate(this.props.model.id, cur_row).then(new_entity =>
121
- {
122
- if (new_entity)
123
- onSuccess(new_entity, Name_Pascal_Space + " has been updated successfully");
124
- if (this.props.model.id)
125
- NSID.clearID(new IStorageLocal(), this.props.model.id);
126
- onFinshied();
127
- }).catch(onFinshied);
128
- }
129
- else if (this.props.entity.server.update)
130
- {
131
- this.props.entity.server.update(this.props.model.id, cur_row).then(new_entity =>
132
- {
133
- onSuccess(new_entity, Name_Pascal_Space + " has been updated successfully");
134
- if (this.props.model.id)
135
- NSID.clearID(new IStorageLocal(), this.props.model.id);
136
- onFinshied();
137
- }).catch(onFinshied);
138
- }
139
- else
140
- onFinshied();
141
- }
142
- else
143
- throw new Error("ID was not provided.");
144
- }
145
- else
146
- {
147
- if (this.props.entity.client.onCreate)
148
- {
149
- this.props.entity.client.onCreate(cur_row).then(new_entity =>
150
- {
151
- if (new_entity)
152
- onSuccess(new_entity, Name_Pascal_Space + " has been created successfully");
153
- onFinshied();
154
- }).catch(onFinshied);
155
- }
156
- else if (this.props.entity.server.create)
157
- {
158
- this.props.entity.server.create(cur_row).then(new_entity =>
159
- {
160
- onSuccess(new_entity, Name_Pascal_Space + " has been created successfully");;
161
- onFinshied();
162
- }).catch(onFinshied);
163
- }
164
- else
165
- onFinshied();
166
- }
167
- else
168
- onFinshied();
169
- } catch (error: any)
170
- {
171
- this.props.notifier.onError(error);
172
- onFinshied();
173
- }
174
- }
175
- override componentDidMount()
176
- {
177
- let { id, row } = this.props.model;
178
-
179
- if ((id && !row) || (id && id !== row?.id))
180
- this.reload();
181
- else
182
- this.setState(
183
- () => ({ loading: false }),
184
- () => this.props.onLoaded?.()
185
- );
186
- }
187
- override render()
188
- {
189
- return (
190
- <>
191
- <NSSection
192
- id={this.props.id}
193
- classList={[`${this.props.classList?.join(" ") ?? ""}`]}
194
- style={{ ...this.props.style }}
195
- >
196
- {
197
- !this.state.loading
198
- ?
199
- <NSPanel
200
- id={this.props.ui.panel?.id}
201
- classList={[`${this.props.ui.panel?.classList?.join(" ") ?? ""}`]}
202
- style={{ ...this.props.ui.panel?.style }}
203
- >
204
- <NSASectionEditTabPage<RowType, RowTypeInput>
205
- ref={this.NSASectionEditTabPage_Ref}
206
- {...this.props}
207
- model={{
208
- id: this.props.model.id,
209
- row: this.state.row
210
- }}
211
- editor={this.props.ui.tab_page_edit.editor}
212
- ui={this.props.ui.tab_page_edit.ui}
213
- >
214
- {this.props.children}
215
- </NSASectionEditTabPage>
216
- </NSPanel>
217
- :
218
- <NSLoading />
219
- }
220
- <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
221
- <NSButtonBlue
222
- title="Apply"
223
- onClick={{
224
- action: (onFinished) =>
225
- {
226
- this.onApply(onFinished);
227
- }
228
- }}
229
- />
230
- </NSSection>
231
- {
232
- this.props.isEdit && (this.props.ui.tab_page_view?.enabled ?? true) && !this.state.loading &&
233
- <>
234
- <NSSpace size={NSSpaceSizeType.SMALL} />
235
- <NSLine />
236
- <NSSpace size={NSSpaceSizeType.SMALL} />
237
- <NSASectionViewTabPage<RowType, RowTypeInput>
238
- ref={this.NSASectionViewTabPage_Ref}
239
- {...this.props}
240
- model={{
241
- id: this.props.model.id,
242
- row: this.state.row
243
- }}
244
- ui={this.props.ui.tab_page_view}
245
- />
246
- </>
247
- }
248
- </>
249
- );
250
- }
1
+ import { IBaseComponentProps, NSID, NSLoading } from "namirasoft-site-react";
2
+ import { NSSection, NSPanel, NSButtonBlue, NSLine, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
3
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
+ import { Component, createRef, ReactNode } from "react";
5
+ import { IEntityInfo } from "../IEntityInfo";
6
+ import { IStorageLocal, NamingConvention } from "namirasoft-core";
7
+ import { NSASectionViewTabPage, NSASectionViewTabPageUIProps } from "./NSASectionViewTabPage";
8
+ import { NSASectionEditTabPage, NSASectionEditTabPageEditorProps, NSASectionEditTabPageUIProps } from "./NSASectionEditTabPage";
9
+ import { CategoryRow, FieldRow } from "namirasoft-field";
10
+
11
+ export interface NSASectionEditCustomProps<RowType extends { id: string }, RowTypeInput = RowType> extends NSARouterMakerProps, IBaseComponentProps
12
+ {
13
+ isEdit: boolean;
14
+ ui: {
15
+ panel?: IBaseComponentProps;
16
+ tab_page_edit: {
17
+ ui?: NSASectionEditTabPageUIProps;
18
+ editor: NSASectionEditTabPageEditorProps<RowType, RowTypeInput>;
19
+ };
20
+ tab_page_view?: NSASectionViewTabPageUIProps<RowType>;
21
+ }
22
+ onLoaded?: () => void;
23
+ onRowLoaded?: (item: RowType) => void;
24
+ children?: React.ReactNode;
25
+ }
26
+
27
+ export interface NSASectionEditProps<RowType extends { id: string }, RowTypeInput = RowType> extends NSASectionEditCustomProps<RowType, RowTypeInput>, NSARouterMakerProps
28
+ {
29
+ model: {
30
+ id: string | null;
31
+ row: RowType | null;
32
+ };
33
+ entity: IEntityInfo<RowType, RowTypeInput>,
34
+ ctf: {
35
+ enabled: boolean;
36
+ fields: FieldRow[] | null;
37
+ categories: CategoryRow[] | null;
38
+ };
39
+ deleteFieldCache: () => void;
40
+ children: ReactNode;
41
+ }
42
+
43
+ interface NSASectionEditState<RowType>
44
+ {
45
+ row: RowType | null;
46
+ loading: boolean;
47
+ }
48
+
49
+ export class NSASectionEdit<RowType extends { id: string }, RowTypeInput = RowType> extends Component<NSASectionEditProps<RowType, RowTypeInput>, NSASectionEditState<RowType>>
50
+ {
51
+ NSASectionViewTabPage_Ref = createRef<NSASectionViewTabPage<RowType, RowTypeInput>>();
52
+ NSASectionEditTabPage_Ref = createRef<NSASectionEditTabPage<RowType, RowTypeInput>>();
53
+
54
+ constructor(props: NSASectionEditProps<RowType, RowTypeInput>)
55
+ {
56
+ super(props);
57
+
58
+ this.state = {
59
+ row: this.props.model.row,
60
+ loading: !this.props.model.row,
61
+ };
62
+
63
+ this.reload = this.reload.bind(this);
64
+ this.getRow = this.getRow.bind(this);
65
+ this.onApply = this.onApply.bind(this);
66
+ }
67
+ reload()
68
+ {
69
+ this.setState(() => ({ row: null, loading: true }));
70
+ if (this.props.model.id)
71
+ this.props.entity.server.get?.(this.props.model.id).then(row =>
72
+ {
73
+ this.setState(
74
+ () => ({ row, loading: false }),
75
+ () =>
76
+ {
77
+ this.props.onLoaded?.();
78
+ this.props.onRowLoaded?.(row);
79
+ }
80
+ );
81
+ }).catch(() => { });
82
+ }
83
+ getRow()
84
+ {
85
+ return this.state.row;
86
+ }
87
+ async onApply(onFinshied: () => void): Promise<void>
88
+ {
89
+ try
90
+ {
91
+ let Name_Pascal_Space = NamingConvention.lower_case_underscore.convert(this.props.entity.name, NamingConvention.Pascal_Case_Space);
92
+
93
+ let onSuccess = (new_row: RowType, message: string) =>
94
+ {
95
+ this.props.notifier.onSuccess(message);
96
+ let handled = false;
97
+ if (this.props.entity.client.onSuccess)
98
+ handled = this.props.entity.client.onSuccess(new_row);
99
+ if (!handled)
100
+ {
101
+ let url = null;
102
+ if (this.props.entity.client.getViewURL)
103
+ url = this.props.entity.client.getViewURL(new_row.id);
104
+ else if (this.props.entity.client.getListURL)
105
+ url = this.props.entity.client.getListURL();
106
+ if (url)
107
+ this.props.url.redirect(url, {});
108
+ }
109
+ };
110
+ let cur_row: RowTypeInput | null = null;
111
+ if (this.NSASectionEditTabPage_Ref.current)
112
+ cur_row = await this.NSASectionEditTabPage_Ref.current.getInputRow();
113
+ if (cur_row)
114
+ if (this.props.isEdit)
115
+ {
116
+ if (this.props.model.id)
117
+ {
118
+ if (this.props.entity.client.onUpdate)
119
+ {
120
+ this.props.entity.client.onUpdate(this.props.model.id, cur_row).then(new_entity =>
121
+ {
122
+ if (new_entity)
123
+ onSuccess(new_entity, Name_Pascal_Space + " has been updated successfully");
124
+ if (this.props.model.id)
125
+ NSID.clearID(new IStorageLocal(), this.props.model.id);
126
+ onFinshied();
127
+ }).catch(onFinshied);
128
+ }
129
+ else if (this.props.entity.server.update)
130
+ {
131
+ this.props.entity.server.update(this.props.model.id, cur_row).then(new_entity =>
132
+ {
133
+ onSuccess(new_entity, Name_Pascal_Space + " has been updated successfully");
134
+ if (this.props.model.id)
135
+ NSID.clearID(new IStorageLocal(), this.props.model.id);
136
+ onFinshied();
137
+ }).catch(onFinshied);
138
+ }
139
+ else
140
+ onFinshied();
141
+ }
142
+ else
143
+ throw new Error("ID was not provided.");
144
+ }
145
+ else
146
+ {
147
+ if (this.props.entity.client.onCreate)
148
+ {
149
+ this.props.entity.client.onCreate(cur_row).then(new_entity =>
150
+ {
151
+ if (new_entity)
152
+ onSuccess(new_entity, Name_Pascal_Space + " has been created successfully");
153
+ onFinshied();
154
+ }).catch(onFinshied);
155
+ }
156
+ else if (this.props.entity.server.create)
157
+ {
158
+ this.props.entity.server.create(cur_row).then(new_entity =>
159
+ {
160
+ onSuccess(new_entity, Name_Pascal_Space + " has been created successfully");;
161
+ onFinshied();
162
+ }).catch(onFinshied);
163
+ }
164
+ else
165
+ onFinshied();
166
+ }
167
+ else
168
+ onFinshied();
169
+ } catch (error: any)
170
+ {
171
+ this.props.notifier.onError(error);
172
+ onFinshied();
173
+ }
174
+ }
175
+ override componentDidMount()
176
+ {
177
+ let { id, row } = this.props.model;
178
+
179
+ if ((id && !row) || (id && id !== row?.id))
180
+ this.reload();
181
+ else
182
+ this.setState(
183
+ () => ({ loading: false }),
184
+ () => this.props.onLoaded?.()
185
+ );
186
+ }
187
+ override render()
188
+ {
189
+ return (
190
+ <>
191
+ <NSSection
192
+ id={this.props.id}
193
+ classList={[`${this.props.classList?.join(" ") ?? ""}`]}
194
+ style={{ ...this.props.style }}
195
+ >
196
+ {
197
+ !this.state.loading
198
+ ?
199
+ <NSPanel
200
+ id={this.props.ui.panel?.id}
201
+ classList={[`${this.props.ui.panel?.classList?.join(" ") ?? ""}`]}
202
+ style={{ ...this.props.ui.panel?.style }}
203
+ >
204
+ <NSASectionEditTabPage<RowType, RowTypeInput>
205
+ ref={this.NSASectionEditTabPage_Ref}
206
+ {...this.props}
207
+ model={{
208
+ id: this.props.model.id,
209
+ row: this.state.row
210
+ }}
211
+ editor={this.props.ui.tab_page_edit.editor}
212
+ ui={this.props.ui.tab_page_edit.ui}
213
+ >
214
+ {this.props.children}
215
+ </NSASectionEditTabPage>
216
+ </NSPanel>
217
+ :
218
+ <NSLoading />
219
+ }
220
+ <NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
221
+ <NSButtonBlue
222
+ title="Apply"
223
+ onClick={{
224
+ action: (onFinished) =>
225
+ {
226
+ this.onApply(onFinished);
227
+ }
228
+ }}
229
+ />
230
+ </NSSection>
231
+ {
232
+ this.props.isEdit && (this.props.ui.tab_page_view?.enabled ?? true) && !this.state.loading &&
233
+ <>
234
+ <NSSpace size={NSSpaceSizeType.SMALL} />
235
+ <NSLine />
236
+ <NSSpace size={NSSpaceSizeType.SMALL} />
237
+ <NSASectionViewTabPage<RowType, RowTypeInput>
238
+ ref={this.NSASectionViewTabPage_Ref}
239
+ {...this.props}
240
+ model={{
241
+ id: this.props.model.id,
242
+ row: this.state.row
243
+ }}
244
+ ui={this.props.ui.tab_page_view}
245
+ />
246
+ </>
247
+ }
248
+ </>
249
+ );
250
+ }
251
251
  }
@@ -1,5 +1,5 @@
1
- @media screen and (min-width: 768px) {
2
- .nsa_section_edit_tab_page {
3
- min-width: 560px;
4
- }
1
+ @media screen and (min-width: 768px) {
2
+ .nsa_section_edit_tab_page {
3
+ min-width: 560px;
4
+ }
5
5
  }