namirasoft-site-react 1.3.40 → 1.3.42
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/dist/App.js +30 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSButtonGroup.d.ts +2 -0
- package/dist/components/NSButtonGroup.js +7 -0
- package/dist/components/NSButtonGroup.js.map +1 -0
- package/dist/components/NSButtonGroup.module.css +38 -0
- package/dist/components/NSInputDuration.d.ts +4 -2
- package/dist/components/NSInputDuration.js +12 -9
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +4 -2
- package/dist/components/NSInputEmail.js +16 -12
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +4 -2
- package/dist/components/NSInputFloat.js +11 -8
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +4 -2
- package/dist/components/NSInputIP.js +12 -9
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +4 -2
- package/dist/components/NSInputInteger.js +12 -9
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +4 -4
- package/dist/components/NSInputSearch.js +11 -17
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +4 -2
- package/dist/components/NSInputTime.js +12 -9
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSTable.d.ts +1 -0
- package/dist/components/NSTable.js +6 -2
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.module.css +50 -9
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/images/close-vector.png +0 -0
- package/src/App.tsx +46 -8
- package/src/components/NSButtonGroup.module.css +38 -0
- package/src/components/NSButtonGroup.tsx +12 -0
- package/src/components/NSInputDuration.tsx +18 -14
- package/src/components/NSInputEmail.tsx +21 -16
- package/src/components/NSInputFloat.tsx +16 -11
- package/src/components/NSInputIP.tsx +14 -10
- package/src/components/NSInputInteger.tsx +14 -10
- package/src/components/NSInputSearch.tsx +16 -24
- package/src/components/NSInputTime.tsx +13 -9
- package/src/components/NSTable.module.css +50 -9
- package/src/components/NSTable.tsx +27 -8
- package/src/main.ts +1 -0
|
@@ -15,6 +15,7 @@ export interface NSTableState<RowType> {
|
|
|
15
15
|
[key: string]: string;
|
|
16
16
|
};
|
|
17
17
|
rows: RowType[];
|
|
18
|
+
modalState: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableState<RowType>> {
|
|
20
21
|
constructor(props: NSTableProps<RowType>);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import NSButtonGroup from './NSButtonGroup';
|
|
4
|
+
import { NSInputSearch } from './NSInputSearch';
|
|
5
|
+
import { NSPagination } from './NSPagination';
|
|
6
|
+
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
3
7
|
import Styles from './NSTable.module.css';
|
|
4
8
|
import { Component } from 'react';
|
|
5
9
|
export class NSTable extends Component {
|
|
6
10
|
constructor(props) {
|
|
7
11
|
super(props);
|
|
8
|
-
this.state = { columns: props.columns, rows: props.rows };
|
|
12
|
+
this.state = { columns: props.columns, rows: props.rows, modalState: false };
|
|
9
13
|
}
|
|
10
14
|
setColumns(columns) {
|
|
11
15
|
this.setState({ columns });
|
|
@@ -15,7 +19,7 @@ export class NSTable extends Component {
|
|
|
15
19
|
}
|
|
16
20
|
render() {
|
|
17
21
|
let column_keys = Object.keys(this.state.columns);
|
|
18
|
-
return (_jsxs("div", { className: Styles.ns_project_list_container, children:
|
|
22
|
+
return (_jsxs("div", { className: `container ${Styles.ns_project_list_container}`, children: [_jsx("section", { className: Styles.ns_search_input, children: _jsx(NSInputSearch, {}) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("table", { className: Styles.ns_table, children: [_jsx("thead", { className: Styles.ns_thead, children: _jsx("tr", { children: column_keys.map(column_key => _jsx("th", { scope: "col", children: this.state.columns[column_key] }, column_key)) }) }), _jsx("tbody", { className: Styles.ns_tbody, children: this.state.rows.map((row, rowIndex) => _jsx("tr", { onClick: () => this.setState({ modalState: !this.state.modalState }), children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, this.props.getColumnAttributes(column, columnIndex), { "data-label": this.state.columns[column], children: this.props.getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_button_group, children: [_jsx(NSPagination, { size: 50, page: 5 }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSButtonGroup, {})] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("section", { onClick: () => this.setState({ modalState: !this.state.modalState }), className: Styles.ns_modal, style: { display: this.state.modalState ? "block" : "none" }, children: [_jsx("a", { children: _jsx("img", { src: '/assets/images/close-vector.png' }) }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur vitae diam non enim vestibulum interdum. Duis condimentum augue id magna semper rutrum. Nullam sit amet magna in magna gravida vehicula. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. In laoreet, magna id viverra tincidunt, sem odio bibendum justo, vel imperdiet sapien wisi sed libero. Phasellus enim erat, vestibulum vel, aliquam a, posuere eu, velit. Morbi imperdiet, mauris ac auctor dictum, nisl ligula egestas nulla, et sollicitudin sem purus in lacus. Mauris dictum facilisis augue. Phasellus faucibus molestie nisl. Aliquam ante. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo. In convallis. Phasellus rhoncus.." })] })] }));
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
//# sourceMappingURL=NSTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBlC,MAAM,OAAO,OAAiB,SAAQ,SAAuD;IAEzF,YAAY,KAA4B;QAEpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IACjF,CAAC;IACD,UAAU,CAAC,OAAkC;QAEzC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,IAAe;QAEnB,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACQ,MAAM;QAEX,IAAI,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CACH,eAAK,SAAS,EAAE,aAAa,MAAM,CAAC,yBAA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AE,IAAI,EAAE,CAAC,GAAI,EACnC,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,KAAC,aAAa,KAAG,IACX,EACV,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,mBAAS,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,aACnK,sBAAG,cAAK,GAAG,EAAC,iCAAiC,GAAG,GAAI,EACpD,4xBAGI,IACE,IACP,CACV,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
.ns_project_list_container {}
|
|
2
|
-
|
|
3
1
|
.ns_table {
|
|
4
2
|
display: flex;
|
|
5
3
|
flex-direction: column;
|
|
6
|
-
padding: 0;
|
|
7
4
|
color: rgba(20, 27, 92, 1);
|
|
8
|
-
|
|
9
5
|
}
|
|
10
6
|
|
|
11
7
|
.ns_table thead {
|
|
12
8
|
clip: rect(0 0 0 0);
|
|
13
9
|
position: fixed;
|
|
14
|
-
|
|
15
10
|
}
|
|
16
11
|
|
|
17
12
|
.ns_table tr {
|
|
18
13
|
border-radius: 8px;
|
|
19
14
|
padding: 16px;
|
|
20
|
-
margin: 10px;
|
|
21
15
|
display: block;
|
|
22
16
|
background-color: rgba(20, 27, 92, 0.3);
|
|
17
|
+
margin: 16px 0;
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
.ns_table td {
|
|
@@ -35,13 +30,42 @@
|
|
|
35
30
|
float: left;
|
|
36
31
|
font-weight: bold;
|
|
37
32
|
text-transform: uppercase;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Button Group */
|
|
36
|
+
.ns_button_group {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Modal */
|
|
43
|
+
.ns_modal {
|
|
44
|
+
position: fixed;
|
|
45
|
+
height: fit-content;
|
|
46
|
+
top: 25%;
|
|
47
|
+
left: 0;
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
padding: 24px;
|
|
50
|
+
margin: 0 16px;
|
|
51
|
+
background-color: rgba(188, 194, 244, 1);
|
|
52
|
+
z-index: 10;
|
|
53
|
+
color: rgba(20, 27, 92, 1);
|
|
54
|
+
}
|
|
38
55
|
|
|
56
|
+
.ns_modal a {
|
|
57
|
+
float: right;
|
|
39
58
|
}
|
|
40
59
|
|
|
41
|
-
|
|
60
|
+
.modal img {
|
|
61
|
+
width: 32px;
|
|
62
|
+
height: 32px;
|
|
63
|
+
right: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media screen and (min-width: 768px) {
|
|
42
67
|
.ns_table {
|
|
43
68
|
color: #000000;
|
|
44
|
-
|
|
45
69
|
}
|
|
46
70
|
|
|
47
71
|
.ns_table thead {
|
|
@@ -53,7 +77,6 @@
|
|
|
53
77
|
|
|
54
78
|
.ns_table tbody {
|
|
55
79
|
background-color: rgba(20, 27, 92, 0.3);
|
|
56
|
-
|
|
57
80
|
}
|
|
58
81
|
|
|
59
82
|
.ns_table tr {
|
|
@@ -89,6 +112,14 @@
|
|
|
89
112
|
text-transform: uppercase;
|
|
90
113
|
}
|
|
91
114
|
|
|
115
|
+
/* Button Group */
|
|
116
|
+
.ns_button_group {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
align-items: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
92
123
|
@media screen and (min-width: 990px) {
|
|
93
124
|
.ns_table {
|
|
94
125
|
padding: 0 48px;
|
|
@@ -101,5 +132,15 @@
|
|
|
101
132
|
.ns_table tr {
|
|
102
133
|
font-size: 24px;
|
|
103
134
|
}
|
|
135
|
+
|
|
136
|
+
/* Search Input */
|
|
137
|
+
.ns_search_input {
|
|
138
|
+
padding: 0 40px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Button Group */
|
|
142
|
+
.ns_button_group {
|
|
143
|
+
padding: 0 48px;
|
|
144
|
+
}
|
|
104
145
|
}
|
|
105
146
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSButtonBlue";
|
|
2
2
|
export * from "./components/NSButtonBlueVector";
|
|
3
3
|
export * from "./components/NSButtonGreen";
|
|
4
|
+
export * from "./components/NSButtonGroup";
|
|
4
5
|
export * from "./components/NSButtonRed";
|
|
5
6
|
export * from "./components/NSCard";
|
|
6
7
|
export * from "./components/NSEntityCardBackground";
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSButtonBlue";
|
|
2
2
|
export * from "./components/NSButtonBlueVector";
|
|
3
3
|
export * from "./components/NSButtonGreen";
|
|
4
|
+
export * from "./components/NSButtonGroup";
|
|
4
5
|
export * from "./components/NSButtonRed";
|
|
5
6
|
export * from "./components/NSCard";
|
|
6
7
|
export * from "./components/NSEntityCardBackground";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,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A8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
Binary file
|
package/src/App.tsx
CHANGED
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import { NSLayoutTitle } from './main';
|
|
3
|
+
import { NSLayoutTitle, NSTable } from './main';
|
|
4
4
|
|
|
5
5
|
export function App()
|
|
6
6
|
{
|
|
7
|
+
let columns = {
|
|
8
|
+
"id": "ID",
|
|
9
|
+
"project": "Project",
|
|
10
|
+
"level": "Level",
|
|
11
|
+
"message": "Message",
|
|
12
|
+
"cent": "Cent",
|
|
13
|
+
"status": "Status",
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
let rows = [{
|
|
17
|
+
id: 1,
|
|
18
|
+
project: "Namirasoft Account",
|
|
19
|
+
level: "Debug",
|
|
20
|
+
message: "Lorem ipsum dolor sit amet, consetetur ",
|
|
21
|
+
cent: "24",
|
|
22
|
+
status: "Done"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 2,
|
|
26
|
+
project: "Namirasoft Account",
|
|
27
|
+
level: "Debug",
|
|
28
|
+
message: "Lorem ipsum dolor sit amet, consetetur ",
|
|
29
|
+
cent: "24",
|
|
30
|
+
status: "Done"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
interface Row
|
|
34
|
+
{
|
|
35
|
+
id: number,
|
|
36
|
+
project: string,
|
|
37
|
+
level: string,
|
|
38
|
+
message: string,
|
|
39
|
+
cent: string,
|
|
40
|
+
status: string
|
|
41
|
+
}
|
|
42
|
+
function getCell(row: Row, column: string): any
|
|
43
|
+
{
|
|
44
|
+
return (row as any)[column];
|
|
45
|
+
}
|
|
7
46
|
return (
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</div>
|
|
47
|
+
<NSLayoutTitle scope='Namirasoft Account Console' logo='' title="Namirasoft">
|
|
48
|
+
<div className="container">
|
|
49
|
+
<NSTable columns={columns} rows={rows} getCell={getCell} getColumnAttributes={() => { return {} }} getRowKey={row => row.id.toString()} />
|
|
50
|
+
</div>
|
|
51
|
+
</NSLayoutTitle>
|
|
14
52
|
);
|
|
15
|
-
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.ns_button_group_desktop {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
width: 100%;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_button_group_desktop button {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
width: 128px;
|
|
15
|
+
height: 48px;
|
|
16
|
+
gap: 10px;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
color: black;
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ns_export_button {
|
|
23
|
+
border: 1px solid rgba(255, 148, 50, 1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ns_refresh_button {
|
|
27
|
+
border: 1px solid rgba(3, 119, 255, 1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ns_project img {
|
|
31
|
+
margin-right: 8px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media only screen and (min-width:768px) {
|
|
35
|
+
.ns_button_group_desktop {
|
|
36
|
+
gap: 24px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Styles from './NSButtonGroup.module.css'
|
|
2
|
+
function NSButtonGroup()
|
|
3
|
+
{
|
|
4
|
+
return (
|
|
5
|
+
<div className={Styles.ns_button_group_desktop}>
|
|
6
|
+
<button onClick={() => window.print()} className={Styles.ns_export_button}><img src="/assets/images/export-vector.png" alt="Export Table Data" width={13} height={16} />Export</button>
|
|
7
|
+
<button onClick={() => window.location.reload()} className={Styles.ns_refresh_button}><img src="/assets/images/refresh-vector.png" alt="Refresh Table Contnet" width={15} height={16} />Refresh</button>
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default NSButtonGroup;
|
|
@@ -6,7 +6,9 @@ import IconInputDuration from '../assets/images/icon-input-duration.svg';
|
|
|
6
6
|
|
|
7
7
|
export interface NSInputDurationProps
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface NSInputDurationState
|
|
@@ -19,25 +21,27 @@ export class NSInputDuration extends React.Component<NSInputDurationProps, NSInp
|
|
|
19
21
|
{
|
|
20
22
|
super(props);
|
|
21
23
|
this.state = {
|
|
22
|
-
value: "",
|
|
24
|
+
value: props.defaultValue ?? "",
|
|
23
25
|
};
|
|
24
|
-
this.setValue = this.setValue.bind(this);
|
|
25
26
|
this.getValue = this.getValue.bind(this);
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
this.setValue = this.setValue.bind(this);
|
|
28
|
+
this.onChanged = this.onChanged.bind(this);
|
|
29
|
+
}
|
|
30
|
+
getValue(): string
|
|
29
31
|
{
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
return this.state.value;
|
|
33
|
+
}
|
|
34
|
+
setValue(value: string): void
|
|
33
35
|
{
|
|
34
36
|
this.setState({ value });
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
37
39
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
this.setValue(e.target.value);
|
|
41
|
+
if (this.props.onChanged)
|
|
42
|
+
this.props.onChanged(e);
|
|
43
|
+
}
|
|
44
|
+
override render()
|
|
41
45
|
{
|
|
42
46
|
return (
|
|
43
47
|
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
@@ -51,7 +55,7 @@ export class NSInputDuration extends React.Component<NSInputDurationProps, NSInp
|
|
|
51
55
|
/>
|
|
52
56
|
<input
|
|
53
57
|
value={this.state.value}
|
|
54
|
-
|
|
58
|
+
onChange={this.onChanged}
|
|
55
59
|
type="time"
|
|
56
60
|
className={Styles.ns_input}
|
|
57
61
|
placeholder="21:44:06"
|
|
@@ -8,6 +8,8 @@ import Danger from '../assets/images/danger.svg';
|
|
|
8
8
|
export interface NSInputEmailProps
|
|
9
9
|
{
|
|
10
10
|
title: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export interface NSInputEmailState
|
|
@@ -21,32 +23,35 @@ export class NSInputEmail extends React.Component<NSInputEmailProps, NSInputEmai
|
|
|
21
23
|
{
|
|
22
24
|
super(props);
|
|
23
25
|
this.state = {
|
|
24
|
-
|
|
26
|
+
value: props.defaultValue ?? "",
|
|
25
27
|
error: false,
|
|
26
28
|
};
|
|
27
29
|
this.setValue = this.setValue.bind(this);
|
|
28
30
|
this.getValue = this.getValue.bind(this);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
this.onChanged = this.onChanged.bind(this);
|
|
32
|
+
}
|
|
33
|
+
getValue(): string
|
|
32
34
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
return this.state.value;
|
|
36
|
+
}
|
|
37
|
+
setValue(value: string): void
|
|
38
|
+
{
|
|
39
|
+
let email = /^(([^<>()[]\\.,;:\s@"]+(\.[^<>()[]\\.,;:\s@"]+)*)|(".+"))@(([[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
40
|
+
debugger
|
|
41
|
+
if (!email.test(value))
|
|
35
42
|
{
|
|
36
|
-
this.setState({ error: true, value
|
|
43
|
+
this.setState({ error: true, value });
|
|
37
44
|
}
|
|
38
45
|
else
|
|
39
46
|
{
|
|
40
|
-
this.setState({ error: false, value
|
|
47
|
+
this.setState({ error: false, value });
|
|
41
48
|
}
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
}
|
|
50
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
44
51
|
{
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
return this.state.value;
|
|
52
|
+
this.setValue(e.target.value);
|
|
53
|
+
if (this.props.onChanged)
|
|
54
|
+
this.props.onChanged(e);
|
|
50
55
|
}
|
|
51
56
|
override render()
|
|
52
57
|
{
|
|
@@ -63,7 +68,7 @@ export class NSInputEmail extends React.Component<NSInputEmailProps, NSInputEmai
|
|
|
63
68
|
/>
|
|
64
69
|
<input
|
|
65
70
|
value={this.state.value}
|
|
66
|
-
onChange={this.
|
|
71
|
+
onChange={this.onChanged}
|
|
67
72
|
type="email"
|
|
68
73
|
className={`${this.state.error === true ? Styles.ns_input_red : ""} ${Styles.ns_input}`}
|
|
69
74
|
placeholder="Sample@gmail.com"
|
|
@@ -6,7 +6,9 @@ import IconInputFloat from '../assets/images/icon-input-float.svg';
|
|
|
6
6
|
|
|
7
7
|
export interface NSInputFloatProps
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface NSInputFloatState
|
|
@@ -19,23 +21,26 @@ export class NSInputFloat extends React.Component<NSInputFloatProps, NSInputFloa
|
|
|
19
21
|
{
|
|
20
22
|
super(props);
|
|
21
23
|
this.state = {
|
|
22
|
-
value: "",
|
|
24
|
+
value: props.defaultValue ?? "",
|
|
23
25
|
};
|
|
24
26
|
this.setValue = this.setValue.bind(this);
|
|
25
27
|
this.getValue = this.getValue.bind(this);
|
|
26
|
-
this.
|
|
28
|
+
this.onChanged = this.onChanged.bind(this);
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
getValue(): string
|
|
29
31
|
{
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
return this.state.value;
|
|
33
|
+
}
|
|
34
|
+
setValue(value: string): void
|
|
33
35
|
{
|
|
34
36
|
this.setState({ value });
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
37
40
|
{
|
|
38
|
-
|
|
41
|
+
this.setValue(e.target.value);
|
|
42
|
+
if (this.props.onChanged)
|
|
43
|
+
this.props.onChanged(e);
|
|
39
44
|
}
|
|
40
45
|
override render()
|
|
41
46
|
{
|
|
@@ -51,7 +56,7 @@ export class NSInputFloat extends React.Component<NSInputFloatProps, NSInputFloa
|
|
|
51
56
|
/>
|
|
52
57
|
<input
|
|
53
58
|
value={this.state.value}
|
|
54
|
-
onChange={this.
|
|
59
|
+
onChange={this.onChanged}
|
|
55
60
|
type="number"
|
|
56
61
|
className={Styles.ns_input}
|
|
57
62
|
placeholder="1.2"
|
|
@@ -6,7 +6,9 @@ import IconInputId from '../assets/images/icon-input-id.svg';
|
|
|
6
6
|
|
|
7
7
|
export interface NSInputIPProps
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface NSInputIPState
|
|
@@ -19,23 +21,25 @@ export class NSInputIP extends React.Component<NSInputIPProps, NSInputIPState> {
|
|
|
19
21
|
{
|
|
20
22
|
super(props);
|
|
21
23
|
this.state = {
|
|
22
|
-
value: "",
|
|
24
|
+
value: props.defaultValue ?? "",
|
|
23
25
|
};
|
|
24
|
-
this.setValue = this.setValue.bind(this);
|
|
25
26
|
this.getValue = this.getValue.bind(this);
|
|
26
|
-
this.
|
|
27
|
+
this.setValue = this.setValue.bind(this);
|
|
28
|
+
this.onChanged = this.onChanged.bind(this);
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
getValue(): string
|
|
29
31
|
{
|
|
30
|
-
this.
|
|
32
|
+
return this.state.value;
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
setValue(value: string): void
|
|
33
35
|
{
|
|
34
36
|
this.setState({ value });
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
37
39
|
{
|
|
38
|
-
|
|
40
|
+
this.setValue(e.target.value);
|
|
41
|
+
if (this.props.onChanged)
|
|
42
|
+
this.props.onChanged(e);
|
|
39
43
|
}
|
|
40
44
|
override render()
|
|
41
45
|
{
|
|
@@ -51,7 +55,7 @@ export class NSInputIP extends React.Component<NSInputIPProps, NSInputIPState> {
|
|
|
51
55
|
/>
|
|
52
56
|
<input
|
|
53
57
|
value={this.state.value}
|
|
54
|
-
onChange={this.
|
|
58
|
+
onChange={this.onChanged}
|
|
55
59
|
type="number"
|
|
56
60
|
className={Styles.ns_input}
|
|
57
61
|
placeholder="192.158.1.38"
|
|
@@ -6,7 +6,9 @@ import IconInputInteger from '../assets/images/icon-input-integer.svg';
|
|
|
6
6
|
|
|
7
7
|
export interface NSInputIntegerProps
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface NSInputIntegerState
|
|
@@ -19,23 +21,25 @@ export class NSInputInteger extends React.Component<NSInputIntegerProps, NSInput
|
|
|
19
21
|
{
|
|
20
22
|
super(props);
|
|
21
23
|
this.state = {
|
|
22
|
-
value: "",
|
|
24
|
+
value: props.defaultValue ?? "",
|
|
23
25
|
};
|
|
24
|
-
this.setValue = this.setValue.bind(this);
|
|
25
26
|
this.getValue = this.getValue.bind(this);
|
|
26
|
-
this.
|
|
27
|
+
this.setValue = this.setValue.bind(this);
|
|
28
|
+
this.onChanged = this.onChanged.bind(this);
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
getValue(): string
|
|
29
31
|
{
|
|
30
|
-
this.
|
|
32
|
+
return this.state.value;
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
setValue(value: string): void
|
|
33
35
|
{
|
|
34
36
|
this.setState({ value });
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
37
39
|
{
|
|
38
|
-
|
|
40
|
+
this.setValue(e.target.value);
|
|
41
|
+
if (this.props.onChanged)
|
|
42
|
+
this.props.onChanged(e);
|
|
39
43
|
}
|
|
40
44
|
override render()
|
|
41
45
|
{
|
|
@@ -51,7 +55,7 @@ export class NSInputInteger extends React.Component<NSInputIntegerProps, NSInput
|
|
|
51
55
|
/>
|
|
52
56
|
<input
|
|
53
57
|
value={this.state.value}
|
|
54
|
-
onChange={this.
|
|
58
|
+
onChange={this.onChanged}
|
|
55
59
|
type="number"
|
|
56
60
|
className={Styles.ns_input}
|
|
57
61
|
placeholder="1234"
|