namirasoft-site-react 1.3.39 → 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/NSSection.d.ts +1 -0
- package/dist/components/NSSection.js +4 -1
- package/dist/components/NSSection.js.map +1 -1
- package/dist/components/NSSection.module.css +6 -0
- package/dist/components/NSSpace.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 +121 -88
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
- 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 +36 -31
- 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/NSSection.module.css +6 -0
- package/src/components/NSSection.tsx +7 -2
- package/src/components/NSSpace.tsx +2 -1
- package/src/components/NSTable.module.css +121 -88
- package/src/components/NSTable.tsx +28 -9
- package/src/main.ts +1 -0
|
@@ -16,11 +16,14 @@ export class NSSection extends Component {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
var _a, _b, _c;
|
|
19
|
+
let styles = [Styles.ns_section];
|
|
20
|
+
if (this.props.center_items)
|
|
21
|
+
styles.push(Styles.ns_section_center);
|
|
19
22
|
return (_jsx("section", { style: {
|
|
20
23
|
backgroundImage: (_a = this.state.background) === null || _a === void 0 ? void 0 : _a.image,
|
|
21
24
|
backgroundColor: (_b = this.state.background) === null || _b === void 0 ? void 0 : _b.color,
|
|
22
25
|
backgroundPosition: (_c = this.state.background) === null || _c === void 0 ? void 0 : _c.position
|
|
23
|
-
}, className:
|
|
26
|
+
}, className: styles.join(" "), children: this.props.children }));
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=NSSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSSection.js","sourceRoot":"","sources":["../../src/components/NSSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAC7C,OAAO,MAAM,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"NSSection.js","sourceRoot":"","sources":["../../src/components/NSSection.tsx"],"names":[],"mappings":"AAAA,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AC3B,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,aAAI,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,GAAI,CACtH,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -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,eAA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AAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,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,113 +1,146 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
font-weight: 300;
|
|
5
|
-
padding: 16px;
|
|
6
|
-
color: white;
|
|
7
|
-
font-size: 16px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ns_tbody td {
|
|
11
|
-
background-color: rgb(173, 178, 206);
|
|
1
|
+
.ns_table {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
12
4
|
color: rgba(20, 27, 92, 1);
|
|
13
|
-
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
|
|
5
|
+
}
|
|
17
6
|
|
|
7
|
+
.ns_table thead {
|
|
8
|
+
clip: rect(0 0 0 0);
|
|
9
|
+
position: fixed;
|
|
18
10
|
}
|
|
19
11
|
|
|
20
|
-
.ns_table {
|
|
21
|
-
|
|
12
|
+
.ns_table tr {
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
padding: 16px;
|
|
15
|
+
display: block;
|
|
16
|
+
background-color: rgba(20, 27, 92, 0.3);
|
|
17
|
+
margin: 16px 0;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
.ns_table td {
|
|
21
|
+
|
|
22
|
+
display: block;
|
|
23
|
+
padding: 8px 0;
|
|
24
|
+
font-size: .8em;
|
|
25
|
+
text-align: right;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
padding: 24px 0;
|
|
28
|
+
.ns_table td::before {
|
|
29
|
+
content: attr(data-label);
|
|
30
|
+
float: left;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
text-transform: uppercase;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
/* Button Group */
|
|
36
|
+
.ns_button_group {
|
|
39
37
|
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
40
39
|
align-items: center;
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Modal */
|
|
43
|
+
.ns_modal {
|
|
44
|
+
position: fixed;
|
|
45
|
+
height: fit-content;
|
|
46
|
+
top: 25%;
|
|
47
|
+
left: 0;
|
|
43
48
|
border-radius: 8px;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
color:
|
|
49
|
-
background-color: transparent;
|
|
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);
|
|
50
54
|
}
|
|
51
55
|
|
|
52
|
-
.
|
|
53
|
-
|
|
56
|
+
.ns_modal a {
|
|
57
|
+
float: right;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
.
|
|
57
|
-
|
|
60
|
+
.modal img {
|
|
61
|
+
width: 32px;
|
|
62
|
+
height: 32px;
|
|
63
|
+
right: 0;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
|
-
@media
|
|
61
|
-
.
|
|
62
|
-
|
|
66
|
+
@media screen and (min-width: 768px) {
|
|
67
|
+
.ns_table {
|
|
68
|
+
color: #000000;
|
|
63
69
|
}
|
|
64
|
-
}
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
height: 24px;
|
|
73
|
-
border-radius: 24px;
|
|
74
|
-
border: none;
|
|
75
|
-
text-align: center;
|
|
76
|
-
padding-top: 2px;
|
|
77
|
-
}
|
|
71
|
+
.ns_table thead {
|
|
72
|
+
position: static;
|
|
73
|
+
background-color: rgba(20, 27, 92, 1);
|
|
74
|
+
border-top-left-radius: 8px;
|
|
75
|
+
border-top-right-radius: 8px;
|
|
76
|
+
}
|
|
78
77
|
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
font-size: 12px;
|
|
83
|
-
width: 96px;
|
|
84
|
-
height: 24px;
|
|
85
|
-
border-radius: 24px;
|
|
86
|
-
border: none;
|
|
87
|
-
text-align: center;
|
|
88
|
-
padding-top: 2px;
|
|
89
|
-
}
|
|
78
|
+
.ns_table tbody {
|
|
79
|
+
background-color: rgba(20, 27, 92, 0.3);
|
|
80
|
+
}
|
|
90
81
|
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
padding-top: 2px;
|
|
101
|
-
}
|
|
82
|
+
.ns_table tr {
|
|
83
|
+
display: grid;
|
|
84
|
+
grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
|
|
85
|
+
padding: 12px 16px;
|
|
86
|
+
margin: 0;
|
|
87
|
+
border-radius: 0;
|
|
88
|
+
border-bottom: 1px solid rgba(20, 27, 92, 0.3);
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
}
|
|
102
91
|
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
.ns_table td {
|
|
93
|
+
text-align: left;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: start;
|
|
96
|
+
padding: 0;
|
|
97
|
+
margin: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ns_table th {
|
|
101
|
+
font-size: 16px;
|
|
102
|
+
font-weight: 300;
|
|
103
|
+
color: #ffffff;
|
|
104
|
+
margin: 0;
|
|
105
|
+
padding: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ns_table td::before {
|
|
109
|
+
content: attr(none);
|
|
110
|
+
float: left;
|
|
111
|
+
font-weight: bold;
|
|
112
|
+
text-transform: uppercase;
|
|
113
|
+
}
|
|
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
|
+
|
|
123
|
+
@media screen and (min-width: 990px) {
|
|
124
|
+
.ns_table {
|
|
125
|
+
padding: 0 48px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ns_table thead {
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ns_table tr {
|
|
133
|
+
font-size: 24px;
|
|
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
|
+
}
|
|
145
|
+
}
|
|
113
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,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,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,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Ac,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
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
12
|
-
"author": "Amir Abolhasani",
|
|
11
|
+
"version": "1.3.42",
|
|
12
|
+
"author": "Amir Abolhasani, Alireza Esmaeeli, Hooman Shashaeh",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
15
15
|
"types": "./dist/main.d.ts",
|
|
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"
|