namirasoft-account-react 1.4.19 → 1.4.21
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/.env.template +10 -10
- package/config-overrides.js +72 -72
- package/dist/IEntityInfo.d.ts +11 -11
- package/dist/Messages.js.map +1 -1
- package/dist/NSARouterMaker.d.ts +0 -1
- package/dist/NSARouterMaker.js.map +1 -1
- package/dist/Router.d.ts +0 -1
- package/dist/components/NSAAccessListDialog.js.map +1 -1
- package/dist/components/NSAAccessListDialog.module.css +87 -0
- package/dist/components/NSABoxOTP.js.map +1 -1
- package/dist/components/NSABoxOTP.module.css +11 -0
- package/dist/components/NSAMessageListDialog.js.map +1 -1
- package/dist/components/NSAMessageListDialog.module.css +98 -0
- package/dist/components/NSAProductListDialog.js.map +1 -1
- package/dist/components/NSAProductListDialog.module.css +45 -0
- package/dist/components/NSAWorkspaceListDialog.js.map +1 -1
- package/dist/components/NSAWorkspaceListDialog.module.css +43 -0
- package/dist/index.js.map +1 -1
- package/dist/layouts/Actions.d.ts +2 -1
- package/dist/layouts/Actions.js +38 -17
- package/dist/layouts/Actions.js.map +1 -1
- package/dist/layouts/NSALayout.d.ts +2 -1
- package/dist/layouts/NSALayout.js +58 -37
- package/dist/layouts/NSALayout.js.map +1 -1
- package/dist/layouts/NSASectionEdit.d.ts +0 -1
- package/dist/layouts/NSASectionEdit.js +12 -8
- package/dist/layouts/NSASectionEdit.js.map +1 -1
- package/dist/layouts/NSASectionList.js +6 -4
- package/dist/layouts/NSASectionList.js.map +1 -1
- package/dist/layouts/NSASectionTabs.d.ts +0 -1
- package/dist/layouts/NSASectionTabs.js +4 -7
- package/dist/layouts/NSASectionTabs.js.map +1 -1
- package/dist/layouts/NSASectionView.js +4 -3
- package/dist/layouts/NSASectionView.js.map +1 -1
- package/dist/pages/NSAHomePage.module.css +23 -0
- package/dist/pages/NSALoginPage.module.css +20 -0
- package/dist/pages/NSAVerificationPage.module.css +23 -0
- package/package.json +70 -70
- package/public/index.html +21 -21
- package/src/App.css +31 -31
- package/src/App.tsx +18 -18
- package/src/IEntityInfo.ts +31 -31
- 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 +142 -142
- package/src/Router.tsx +39 -39
- package/src/components/NSAAccessListDialog.module.css +86 -86
- package/src/components/NSAAccessListDialog.tsx +160 -160
- package/src/components/NSABoxOTP.module.css +10 -10
- package/src/components/NSABoxOTP.tsx +63 -63
- package/src/components/NSAMessageListDialog.module.css +97 -97
- package/src/components/NSAMessageListDialog.tsx +116 -116
- package/src/components/NSAProductListDialog.module.css +44 -44
- package/src/components/NSAProductListDialog.tsx +100 -100
- package/src/components/NSAWorkspaceListDialog.module.css +42 -42
- package/src/components/NSAWorkspaceListDialog.tsx +73 -73
- package/src/index.tsx +24 -24
- package/src/layouts/Actions.ts +147 -119
- package/src/layouts/Menus.ts +15 -15
- package/src/layouts/NSALayout.tsx +417 -387
- package/src/layouts/NSASectionEdit.tsx +144 -140
- package/src/layouts/NSASectionList.tsx +161 -158
- package/src/layouts/NSASectionTabs.tsx +152 -156
- package/src/layouts/NSASectionView.tsx +61 -60
- package/src/main.ts +19 -19
- package/src/pages/NSAHomePage.module.css +22 -22
- package/src/pages/NSAHomePage.tsx +27 -27
- package/src/pages/NSALoginPage.module.css +19 -19
- package/src/pages/NSALoginPage.tsx +65 -65
- package/src/pages/NSAVerificationPage.module.css +22 -22
- package/src/pages/NSAVerificationPage.tsx +59 -59
- package/tsconfig.json +43 -43
|
@@ -1,157 +1,153 @@
|
|
|
1
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
2
|
-
import { EnvService, FilterItem, FilterItemOperator } from "namirasoft-core";
|
|
3
|
-
import { BaseColumnFormatter, DateTimeFormatter, ForeignIDFormatter, IDFormatter, NSBoxLabel, NSLoading, NSRepeater, NSTable, NSTabPage, StringFormatter, NSTagValue, NSTag } from "namirasoft-site-react";
|
|
4
|
-
import { HistoryRow, MetaDatabase, NamirasoftHistoryServer } from "namirasoft-history";
|
|
5
|
-
import { IEntityInfo } from "../IEntityInfo";
|
|
6
|
-
import { INSARouterProps } from "../INSARouterProps";
|
|
7
|
-
|
|
8
|
-
export interface NSASectionTabsProps
|
|
9
|
-
{
|
|
10
|
-
id: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface NSASectionTabsState
|
|
14
|
-
{
|
|
15
|
-
row: any | null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface NSASectionTabsRef
|
|
19
|
-
{
|
|
20
|
-
NSTabPage: NSTabPage | null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const NSASectionTabs = forwardRef<any, any>(<EntityType extends { id: string }, EntityTypeInput = EntityType>(
|
|
24
|
-
_props: Omit<NSASectionTabsProps & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps, "ref">,
|
|
25
|
-
ref: React.Ref<NSASectionTabsRef>
|
|
26
|
-
) =>
|
|
27
|
-
{
|
|
28
|
-
let props: NSASectionTabsProps & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps = _props as any;
|
|
29
|
-
const NSTabPage_Ref = useRef<NSTabPage>(null);
|
|
30
|
-
|
|
31
|
-
let [state, setState] = useState<NSASectionTabsState>({ row: null });
|
|
32
|
-
|
|
33
|
-
useEffect(() =>
|
|
34
|
-
{
|
|
35
|
-
setState(prevState => ({ ...prevState, row: null }));
|
|
36
|
-
if (props.id)
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
//todo
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.
|
|
84
|
-
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.
|
|
85
|
-
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.
|
|
86
|
-
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.
|
|
87
|
-
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
}}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
NSTabPage
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return (
|
|
155
|
-
<NSTabPage ref={NSTabPage_Ref} tabs={tabs} />
|
|
156
|
-
);
|
|
1
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
2
|
+
import { EnvService, FilterItem, FilterItemOperator } from "namirasoft-core";
|
|
3
|
+
import { BaseColumnFormatter, DateTimeFormatter, ForeignIDFormatter, IDFormatter, NSBoxLabel, NSLoading, NSRepeater, NSTable, NSTabPage, StringFormatter, NSTagValue, NSTag } from "namirasoft-site-react";
|
|
4
|
+
import { HistoryRow, MetaDatabase, NamirasoftHistoryServer } from "namirasoft-history";
|
|
5
|
+
import { IEntityInfo } from "../IEntityInfo";
|
|
6
|
+
import { INSARouterProps } from "../INSARouterProps";
|
|
7
|
+
|
|
8
|
+
export interface NSASectionTabsProps
|
|
9
|
+
{
|
|
10
|
+
id: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface NSASectionTabsState
|
|
14
|
+
{
|
|
15
|
+
row: any | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface NSASectionTabsRef
|
|
19
|
+
{
|
|
20
|
+
NSTabPage: NSTabPage | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const NSASectionTabs = forwardRef<any, any>(<EntityType extends { id: string }, EntityTypeInput = EntityType>(
|
|
24
|
+
_props: Omit<NSASectionTabsProps & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps, "ref">,
|
|
25
|
+
ref: React.Ref<NSASectionTabsRef>
|
|
26
|
+
) =>
|
|
27
|
+
{
|
|
28
|
+
let props: NSASectionTabsProps & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps = _props as any;
|
|
29
|
+
const NSTabPage_Ref = useRef<NSTabPage>(null);
|
|
30
|
+
|
|
31
|
+
let [state, setState] = useState<NSASectionTabsState>({ row: null });
|
|
32
|
+
|
|
33
|
+
useEffect(() =>
|
|
34
|
+
{
|
|
35
|
+
setState(prevState => ({ ...prevState, row: null }));
|
|
36
|
+
if (props.id)
|
|
37
|
+
{
|
|
38
|
+
if (props.entity.server.get)
|
|
39
|
+
props.entity.server.get(props.id).then(row =>
|
|
40
|
+
{
|
|
41
|
+
setState(prevState => ({ ...prevState, row }));
|
|
42
|
+
}).catch(() => { });
|
|
43
|
+
}
|
|
44
|
+
}, [props.id]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
45
|
+
// tabs
|
|
46
|
+
//todo
|
|
47
|
+
// let todo = () => <p>This is not impolemented yet.</p>;
|
|
48
|
+
const tabs = [];
|
|
49
|
+
if (props.id)
|
|
50
|
+
{
|
|
51
|
+
tabs.push({
|
|
52
|
+
title: 'Information', getContent: () =>
|
|
53
|
+
{
|
|
54
|
+
if (state.row == null)
|
|
55
|
+
return <NSLoading></NSLoading>;
|
|
56
|
+
return <>
|
|
57
|
+
{
|
|
58
|
+
props.entity.client.getColumns().map(column =>
|
|
59
|
+
{
|
|
60
|
+
let value = state.row[column.name];
|
|
61
|
+
let formatted = column.formatter.format(value, column, { index: 0, value: state.row });
|
|
62
|
+
return <NSBoxLabel title={column.text + ":"}><p style={{ color: "#000" }}>{formatted}</p></NSBoxLabel>
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
</>;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//todo
|
|
69
|
+
// tabs.push({ title: 'Price History', getContent: todo });
|
|
70
|
+
// tabs.push({ title: 'Price Estimator', getContent: todo });
|
|
71
|
+
// tabs.push({ title: 'Log', getContent: todo });
|
|
72
|
+
// tabs.push({ title: 'Monitor', getContent: todo });
|
|
73
|
+
tabs.push({
|
|
74
|
+
title: 'History', getContent: () =>
|
|
75
|
+
{
|
|
76
|
+
return <NSTable<HistoryRow>
|
|
77
|
+
checkbox={false}
|
|
78
|
+
columns={[
|
|
79
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.id, new IDFormatter()),
|
|
80
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.user_id, new ForeignIDFormatter()),
|
|
81
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.device_id, new ForeignIDFormatter()),
|
|
82
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.session_id, new ForeignIDFormatter()),
|
|
83
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.product_id, new ForeignIDFormatter()),
|
|
84
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.entity_name, new StringFormatter()),
|
|
85
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.entity_id, new ForeignIDFormatter()),
|
|
86
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.action, new StringFormatter()),
|
|
87
|
+
BaseColumnFormatter.getColumn(MetaDatabase.main.history.columns.created_at, new DateTimeFormatter()),
|
|
88
|
+
]}
|
|
89
|
+
getRows={async () =>
|
|
90
|
+
{
|
|
91
|
+
if (props.id)
|
|
92
|
+
{
|
|
93
|
+
let REACT_APP_BASE_URL_HISTORY = new EnvService("REACT_APP_BASE_URL_HISTORY", true).getString();
|
|
94
|
+
let server = new NamirasoftHistoryServer(REACT_APP_BASE_URL_HISTORY, props.account.token_manager, props.notifier.onError);
|
|
95
|
+
let filters = [new FilterItem(MetaDatabase.main.history, MetaDatabase.main.history.columns.id, false, FilterItemOperator.all.equals, props.id)]
|
|
96
|
+
return await server.history.List(filters, null, null);
|
|
97
|
+
}
|
|
98
|
+
return { rows: [], count: 0 };
|
|
99
|
+
}}
|
|
100
|
+
getRowKey={row => row.value.id}
|
|
101
|
+
></NSTable>;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//todo
|
|
106
|
+
// tabs.push({ title: 'How It Works', getContent: todo });
|
|
107
|
+
// tabs.push({ title: 'API', getContent: todo });
|
|
108
|
+
// tabs.push({ title: 'Sample Code', getContent: todo });
|
|
109
|
+
tabs.push({
|
|
110
|
+
title: 'Tag', getContent: () =>
|
|
111
|
+
{
|
|
112
|
+
return <NSRepeater<NSTag, NSTagValue>
|
|
113
|
+
createItem={(index, ref, onChange, onDelete) =>
|
|
114
|
+
{
|
|
115
|
+
return <NSTag
|
|
116
|
+
ref={ref}
|
|
117
|
+
onChanged={() =>
|
|
118
|
+
{
|
|
119
|
+
onChange(index);
|
|
120
|
+
}}
|
|
121
|
+
onDeleted={() =>
|
|
122
|
+
{
|
|
123
|
+
onDelete(index);
|
|
124
|
+
}}
|
|
125
|
+
/>;
|
|
126
|
+
}}
|
|
127
|
+
getValue={(item, checkError) => item.getValue(checkError)}
|
|
128
|
+
isEmpty={value => NSTag.isEmpty(value)}
|
|
129
|
+
updateItem={(item, index, value) =>
|
|
130
|
+
{
|
|
131
|
+
if (index > 0)
|
|
132
|
+
if (value)
|
|
133
|
+
item.setValue(value);
|
|
134
|
+
}}
|
|
135
|
+
onValuesChanged={values =>
|
|
136
|
+
{
|
|
137
|
+
console.log(values)
|
|
138
|
+
}}
|
|
139
|
+
/>;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
//todo
|
|
143
|
+
// tabs.push({ title: 'Category', getContent: todo });
|
|
144
|
+
// tabs.push({ title: 'Field', getContent: todo });
|
|
145
|
+
|
|
146
|
+
useImperativeHandle(ref, () => ({
|
|
147
|
+
NSTabPage: NSTabPage_Ref.current
|
|
148
|
+
}));
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<NSTabPage ref={NSTabPage_Ref} tabs={tabs} />
|
|
152
|
+
);
|
|
157
153
|
});
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { NSASectionTabs, NSASectionTabsRef } from "./NSASectionTabs";
|
|
2
|
-
import { IEntityInfo } from "../IEntityInfo";
|
|
3
|
-
import { useParams } from "react-router-dom";
|
|
4
|
-
import { forwardRef, ReactNode, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
|
-
import { NSLoading } from "namirasoft-site-react";
|
|
6
|
-
import { INSARouterProps } from "../INSARouterProps";
|
|
7
|
-
|
|
8
|
-
export interface NSASectionViewProps<EntityType>
|
|
9
|
-
{
|
|
10
|
-
getChildren?: (id: string, entity: EntityType) => ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface NSASectionViewState<EntityType>
|
|
14
|
-
{
|
|
15
|
-
entity: EntityType | null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface NSASectionViewRef
|
|
19
|
-
{
|
|
20
|
-
NSASectionTabs: NSASectionTabsRef | null
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const NSASectionView = forwardRef<any, any>(<EntityType extends { id: string }, EntityTypeInput = EntityType>(
|
|
24
|
-
props: Omit<NSASectionViewProps<EntityType> & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps, "ref">,
|
|
25
|
-
ref: React.Ref<NSASectionViewRef>
|
|
26
|
-
) =>
|
|
27
|
-
{
|
|
28
|
-
let NSASectionTabs_Ref = useRef<NSASectionTabsRef>(null);
|
|
29
|
-
|
|
30
|
-
let { id } = useParams();
|
|
31
|
-
|
|
32
|
-
let [state, setState] = useState<NSASectionViewState<EntityType>>({ entity: null });
|
|
33
|
-
|
|
34
|
-
useEffect(() =>
|
|
35
|
-
{
|
|
36
|
-
if (id)
|
|
37
|
-
props.entity.server.get
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
import { NSASectionTabs, NSASectionTabsRef } from "./NSASectionTabs";
|
|
2
|
+
import { IEntityInfo } from "../IEntityInfo";
|
|
3
|
+
import { useParams } from "react-router-dom";
|
|
4
|
+
import { forwardRef, ReactNode, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
|
+
import { NSLoading } from "namirasoft-site-react";
|
|
6
|
+
import { INSARouterProps } from "../INSARouterProps";
|
|
7
|
+
|
|
8
|
+
export interface NSASectionViewProps<EntityType>
|
|
9
|
+
{
|
|
10
|
+
getChildren?: (id: string, entity: EntityType) => ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface NSASectionViewState<EntityType>
|
|
14
|
+
{
|
|
15
|
+
entity: EntityType | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface NSASectionViewRef
|
|
19
|
+
{
|
|
20
|
+
NSASectionTabs: NSASectionTabsRef | null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const NSASectionView = forwardRef<any, any>(<EntityType extends { id: string }, EntityTypeInput = EntityType>(
|
|
24
|
+
props: Omit<NSASectionViewProps<EntityType> & { entity: IEntityInfo<EntityType, EntityTypeInput>; } & INSARouterProps, "ref">,
|
|
25
|
+
ref: React.Ref<NSASectionViewRef>
|
|
26
|
+
) =>
|
|
27
|
+
{
|
|
28
|
+
let NSASectionTabs_Ref = useRef<NSASectionTabsRef>(null);
|
|
29
|
+
|
|
30
|
+
let { id } = useParams();
|
|
31
|
+
|
|
32
|
+
let [state, setState] = useState<NSASectionViewState<EntityType>>({ entity: null });
|
|
33
|
+
|
|
34
|
+
useEffect(() =>
|
|
35
|
+
{
|
|
36
|
+
if (id)
|
|
37
|
+
if (props.entity.server.get)
|
|
38
|
+
props.entity.server.get(id).then((entity) =>
|
|
39
|
+
{
|
|
40
|
+
setState({ entity });
|
|
41
|
+
}).catch(() => { });
|
|
42
|
+
}, [id]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
useImperativeHandle(ref, () => ({
|
|
46
|
+
NSASectionTabs: NSASectionTabs_Ref.current
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
if (id && state.entity != null)
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<NSASectionTabs
|
|
53
|
+
ref={NSASectionTabs_Ref}
|
|
54
|
+
id={id ?? ""}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
{props.getChildren && props.getChildren(id, state.entity)}
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
return <NSLoading></NSLoading>;
|
|
61
62
|
});
|
package/src/main.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export * from "./components/NSAAccessListDialog";
|
|
2
|
-
export * from "./components/NSAMessageListDialog";
|
|
3
|
-
export * from "./layouts/Actions";
|
|
4
|
-
export * from "./layouts/Menus";
|
|
5
|
-
export * from "./layouts/NSALayout";
|
|
6
|
-
export * from "./layouts/NSASectionEdit";
|
|
7
|
-
export * from "./layouts/NSASectionList";
|
|
8
|
-
export * from "./layouts/NSASectionTabs";
|
|
9
|
-
export * from "./layouts/NSASectionView";
|
|
10
|
-
export * from "./pages/NSAHomePage";
|
|
11
|
-
export * from "./pages/NSALoginPage";
|
|
12
|
-
export * from "./pages/NSAVerificationPage";
|
|
13
|
-
export * from "./IEntityInfo";
|
|
14
|
-
export * from "./Info";
|
|
15
|
-
export * from "./INSARouterMaker";
|
|
16
|
-
export * from "./INSARouterProps";
|
|
17
|
-
export * from "./INSARouterState";
|
|
18
|
-
export * from "./Message";
|
|
19
|
-
export * from "./Messages";
|
|
1
|
+
export * from "./components/NSAAccessListDialog";
|
|
2
|
+
export * from "./components/NSAMessageListDialog";
|
|
3
|
+
export * from "./layouts/Actions";
|
|
4
|
+
export * from "./layouts/Menus";
|
|
5
|
+
export * from "./layouts/NSALayout";
|
|
6
|
+
export * from "./layouts/NSASectionEdit";
|
|
7
|
+
export * from "./layouts/NSASectionList";
|
|
8
|
+
export * from "./layouts/NSASectionTabs";
|
|
9
|
+
export * from "./layouts/NSASectionView";
|
|
10
|
+
export * from "./pages/NSAHomePage";
|
|
11
|
+
export * from "./pages/NSALoginPage";
|
|
12
|
+
export * from "./pages/NSAVerificationPage";
|
|
13
|
+
export * from "./IEntityInfo";
|
|
14
|
+
export * from "./Info";
|
|
15
|
+
export * from "./INSARouterMaker";
|
|
16
|
+
export * from "./INSARouterProps";
|
|
17
|
+
export * from "./INSARouterState";
|
|
18
|
+
export * from "./Message";
|
|
19
|
+
export * from "./Messages";
|
|
20
20
|
export * from "./NSARouterMaker";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
.nsa_home_container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
text-align: center;
|
|
8
|
-
color: #141B5C;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.nsa_home_container h2 {
|
|
12
|
-
color: #141B5C;
|
|
13
|
-
font-size: 48px;
|
|
14
|
-
font-weight: 600;
|
|
15
|
-
text-align: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.nsa_home_container p {
|
|
19
|
-
color: #141B5C;
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
max-width: 960px;
|
|
22
|
-
text-align: center;
|
|
1
|
+
.nsa_home_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
text-align: center;
|
|
8
|
+
color: #141B5C;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nsa_home_container h2 {
|
|
12
|
+
color: #141B5C;
|
|
13
|
+
font-size: 48px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.nsa_home_container p {
|
|
19
|
+
color: #141B5C;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
max-width: 960px;
|
|
22
|
+
text-align: center;
|
|
23
23
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { IBaseComponentProps, INSBarTitleProps, INSRouterProps, NSProductList, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
|
|
2
|
-
import Styles from './NSAHomePage.module.css';
|
|
3
|
-
|
|
4
|
-
export interface NSAHomePageProps extends IBaseComponentProps, INSBarTitleProps, INSRouterProps
|
|
5
|
-
{
|
|
6
|
-
title: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
description: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function NSAHomePage(props: NSAHomePageProps)
|
|
12
|
-
{
|
|
13
|
-
return (
|
|
14
|
-
<div className={Styles.nsa_home_container}>
|
|
15
|
-
<img
|
|
16
|
-
src={props.icon}
|
|
17
|
-
alt={props.name}
|
|
18
|
-
width={256}
|
|
19
|
-
height={256}
|
|
20
|
-
/>
|
|
21
|
-
<NSSpace size={NSSpaceSizeType.MICRO} />
|
|
22
|
-
<h2>{props.title}</h2>
|
|
23
|
-
<NSSpace size={NSSpaceSizeType.MICRO} />
|
|
24
|
-
<p>{props.description}</p>
|
|
25
|
-
<NSProductList notifier={props.notifier} scope={props.title} name="Home" />
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
1
|
+
import { IBaseComponentProps, INSBarTitleProps, INSRouterProps, NSProductList, NSSpace, NSSpaceSizeType } from 'namirasoft-site-react';
|
|
2
|
+
import Styles from './NSAHomePage.module.css';
|
|
3
|
+
|
|
4
|
+
export interface NSAHomePageProps extends IBaseComponentProps, INSBarTitleProps, INSRouterProps
|
|
5
|
+
{
|
|
6
|
+
title: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
description: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function NSAHomePage(props: NSAHomePageProps)
|
|
12
|
+
{
|
|
13
|
+
return (
|
|
14
|
+
<div className={Styles.nsa_home_container}>
|
|
15
|
+
<img
|
|
16
|
+
src={props.icon}
|
|
17
|
+
alt={props.name}
|
|
18
|
+
width={256}
|
|
19
|
+
height={256}
|
|
20
|
+
/>
|
|
21
|
+
<NSSpace size={NSSpaceSizeType.MICRO} />
|
|
22
|
+
<h2>{props.title}</h2>
|
|
23
|
+
<NSSpace size={NSSpaceSizeType.MICRO} />
|
|
24
|
+
<p>{props.description}</p>
|
|
25
|
+
<NSProductList notifier={props.notifier} scope={props.title} name="Home" />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
28
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.ns_login_container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.ns_logo {
|
|
9
|
-
text-align: center;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ns_title {
|
|
13
|
-
font-size: 32px;
|
|
14
|
-
font-weight: 700;
|
|
15
|
-
text-align: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ns_button {
|
|
19
|
-
text-align: center;
|
|
1
|
+
.ns_login_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_logo {
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ns_title {
|
|
13
|
+
font-size: 32px;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ns_button {
|
|
19
|
+
text-align: center;
|
|
20
20
|
}
|