namirasoft-site-react 1.3.102 → 1.3.104
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.map +1 -1
- package/dist/components/NSInput.module.css +11 -4
- package/dist/components/NSLayoutAction.d.ts +1 -1
- package/dist/components/NSLayoutAction.js +2 -5
- package/dist/components/NSLayoutAction.js.map +1 -1
- package/dist/components/NSLayoutAction.module.css +1 -1
- package/dist/components/NSLink.module.css +3 -3
- package/dist/components/NSLinkBlue.js +8 -1
- package/dist/components/NSLinkBlue.js.map +1 -1
- package/dist/components/NSModal.d.ts +1 -4
- package/dist/components/NSModal.js +5 -23
- package/dist/components/NSModal.js.map +1 -1
- package/dist/components/NSModal.module.css +25 -12
- package/dist/components/NSTable.d.ts +1 -0
- package/dist/components/NSTable.js +4 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.module.css +6 -0
- package/dist/pages/NSLoginPage.js +9 -2
- package/dist/pages/NSLoginPage.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -3
- package/src/components/NSInput.module.css +11 -4
- package/src/components/NSLayoutAction.module.css +1 -1
- package/src/components/NSLayoutAction.tsx +5 -10
- package/src/components/NSLink.module.css +3 -3
- package/src/components/NSLinkBlue.tsx +9 -2
- package/src/components/NSModal.module.css +25 -12
- package/src/components/NSModal.tsx +32 -60
- package/src/components/NSTable.module.css +6 -0
- package/src/components/NSTable.tsx +13 -3
- package/src/pages/NSLoginPage.tsx +11 -2
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC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AE,EAAE,CAAC;YACL,OAAO,EAAE,oBAAoB;YAC7B,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,yCAAyC;YAClD,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,CAAC;YACL,OAAO,EAAE,oBAAoB;YAC7B,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,yCAAyC;YAClD,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;SACd;KACA,CAAA;IAUD,SAAS,OAAO,CAAC,GAAQ,EAAE,MAAc;QAExC,OAAQ,GAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK,GAAG,MAAM,CAAe,IAAI,CAAC,CAAC;IACvC,OAAO,CACN,4BACC,KAAC,cAAc,IACd,aAAa,EAAE,EAAE,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,MAAM,EACZ,WAAW,EAAC,wGAAwG,EACpH,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAC,mEAAmE,YAExE,wBACC,KAAC,OAAO,IACP,GAAG,EAAE,KAAK,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,CAAA,CAAC,CAAC,EACxC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAClC,GACG,GACW,GAChB,CACH,CAAC;AACH,CAAC"}
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.ns_input_parent img {
|
|
11
|
+
position: absolute;
|
|
12
|
+
right: 5%;
|
|
13
|
+
top: 50%;
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
.ns_input_container {
|
|
11
17
|
display: flex;
|
|
12
18
|
align-items: center;
|
|
@@ -16,10 +22,10 @@
|
|
|
16
22
|
|
|
17
23
|
.ns_input_icon_container {
|
|
18
24
|
margin: 0 !important;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 12px;
|
|
27
|
+
right: 5%;
|
|
28
|
+
top: 25%;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
.ns_input {
|
|
@@ -64,4 +70,5 @@
|
|
|
64
70
|
width: 206px !important;
|
|
65
71
|
}
|
|
66
72
|
}
|
|
73
|
+
|
|
67
74
|
/*End Input Tell*/
|
|
@@ -9,6 +9,6 @@ export interface INSLayoutActionProps extends INSLayoutProps, IBaseComponentProp
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export interface INSLaoutActionState {
|
|
12
|
-
|
|
12
|
+
show: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function NSLayoutAction(props: INSLayoutActionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,13 +9,10 @@ export function NSLayoutAction(props) {
|
|
|
9
9
|
var _a;
|
|
10
10
|
let lines = ((_a = props.description) !== null && _a !== void 0 ? _a : "").split(/(\n|\\n|<br>|<br\s*\/>)/gm);
|
|
11
11
|
const [state, setState] = useState({
|
|
12
|
-
|
|
12
|
+
show: false
|
|
13
13
|
});
|
|
14
14
|
const filtered_actions = props.actions.filter((action) => action.group);
|
|
15
|
-
|
|
16
|
-
setState(prevState => (Object.assign(Object.assign({}, prevState), { showDescription: !prevState.showDescription })));
|
|
17
|
-
};
|
|
18
|
-
return (_jsxs(NSLayout, Object.assign({}, props, { children: [_jsxs("div", { className: Styles.ns_action_bar_holder, children: [_jsxs("div", { className: `d-none d-lg-flex ${Styles.ns_desktop_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), _jsxs("button", { className: Styles.ns_info_container, onClick: showHandler, children: [_jsx("img", { src: 'https://static.namirasoft.com/image/concept/info/white-blue.svg', alt: 'info-icon', width: 24, height: 24 }), _jsx("span", { children: " Info " })] }), _jsx(NSModal, { show: state.showDescription, description: props.description, title: props.title })] }), _jsxs("div", { className: `d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description && lines &&
|
|
15
|
+
return (_jsxs(NSLayout, Object.assign({}, props, { children: [_jsxs("div", { className: Styles.ns_action_bar_holder, children: [_jsxs("div", { className: `d-none d-lg-flex ${Styles.ns_desktop_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), _jsxs("button", { className: Styles.ns_info_container, onClick: () => setState({ show: true }), children: [_jsx("img", { src: 'https://static.namirasoft.com/image/concept/info/white-blue.svg', alt: 'info-icon', width: 24, height: 24 }), _jsx("span", { children: " Info " })] }), _jsx(NSModal, { show: state.show, description: props.description, title: props.title, onClose: () => setState({ show: false }) })] }), _jsxs("div", { className: `d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description && lines &&
|
|
19
16
|
_jsxs(_Fragment, { children: [_jsx("p", { className: Styles.description, children: lines.map((line, index) => {
|
|
20
17
|
return _jsxs(_Fragment, { children: [line.trim(), index != lines.length - 1 && _jsx("br", {})] });
|
|
21
18
|
}) }), _jsx(NSSpace, { size: NSSpaceSizeType.MINI })] })] }), _jsx("div", { className: Styles.ns_actions_hodler, children: filtered_actions.map((action) => _jsx(NSActionMenu, { group: action.group, items: action.items }, action.id)) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), props.children] })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLayoutAction.js","sourceRoot":"","sources":["../../src/components/NSLayoutAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAErD,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AE,MAAM,CAAC,KAAK,EACnB,KAAK,EAAE,MAAM,CAAC,KAAK,IAFd,MAAM,CAAC,EAAE,CAGb,CACF,GACI,IAED,EACN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACvC,KAAK,CAAC,QAAQ,KACL,CACX,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { NSLink } from "./NSLink";
|
|
3
3
|
export function NSLinkBlue(props) {
|
|
4
|
-
return (_jsx(NSLink, { id: props.id,
|
|
4
|
+
return (_jsx(NSLink, { id: props.id, style: {
|
|
5
|
+
color: "#fff",
|
|
6
|
+
border: "none",
|
|
7
|
+
backgroundColor: "rgba(3, 119, 255, 1)",
|
|
8
|
+
width: "358px",
|
|
9
|
+
height: "48px",
|
|
10
|
+
boxShadow: "inset 0 - 4px 4px 0px rgb(0 0 0 / 25 %)"
|
|
11
|
+
}, title: props.title, href: props.href, target: props.target }));
|
|
5
12
|
}
|
|
6
13
|
//# sourceMappingURL=NSLinkBlue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLinkBlue.js","sourceRoot":"","sources":["../../src/components/NSLinkBlue.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,UAAU,CAAC;AAEjD,MAAM,UAAU,UAAU,CAAC,KAAoB;IAE9C,OAAO,CACN,KAAC,MAAM,IACN,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,
|
|
1
|
+
{"version":3,"file":"NSLinkBlue.js","sourceRoot":"","sources":["../../src/components/NSLinkBlue.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,UAAU,CAAC;AAEjD,MAAM,UAAU,UAAU,CAAC,KAAoB;IAE9C,OAAO,CACN,KAAC,MAAM,IACN,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EACJ;YACA,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,eAAe,EAAE,sBAAsB;YACvC,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,yCAAyC;SACpD,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,GACnB,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -5,9 +5,6 @@ export interface INSModalProps extends IBaseComponentProps {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
show: boolean;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
|
|
9
|
-
export interface INSModalState {
|
|
10
|
-
closeModal: boolean;
|
|
11
|
-
visibilityClassNames: string;
|
|
8
|
+
onClose: () => void;
|
|
12
9
|
}
|
|
13
10
|
export declare function NSModal(props: INSModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
3
|
import { NSSpace, NSSpaceSizeType, NSTitle } from "../main";
|
|
5
4
|
import Styles from './NSModal.module.css';
|
|
6
5
|
import NSButton from "./NSButton";
|
|
7
6
|
export function NSModal(props) {
|
|
8
7
|
var _a;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
visibilityClassNames: ""
|
|
12
|
-
});
|
|
13
|
-
const closeModalHandler = () => {
|
|
14
|
-
setState(prevState => (Object.assign(Object.assign({}, prevState), { closeModal: !state.closeModal })));
|
|
15
|
-
};
|
|
16
|
-
let classNames;
|
|
17
|
-
const modalVisibilityClassName = () => {
|
|
18
|
-
if (state.closeModal && !props.show)
|
|
19
|
-
classNames = `${Styles.ns_hide}`;
|
|
20
|
-
else if (!state.closeModal && props.show)
|
|
21
|
-
classNames = `${Styles.ns_show}`;
|
|
22
|
-
else if (state.closeModal && props.show)
|
|
23
|
-
classNames = `${Styles.ns_hide}`;
|
|
24
|
-
return classNames;
|
|
25
|
-
};
|
|
26
|
-
let modalClassNames = modalVisibilityClassName();
|
|
27
|
-
return (_jsx("section", { onClick: closeModalHandler, id: props.id, className: `${modalClassNames}
|
|
8
|
+
console.log(props, props.show ? Styles.ns_show : Styles.ns_hide);
|
|
9
|
+
return (_jsx("div", { className: Styles.ns_modal_container, onClick: props.onClose, children: _jsx("section", { id: props.id, className: `${props.show ? Styles.ns_show : Styles.ns_hide}
|
|
28
10
|
${Styles.ns_modal}
|
|
29
|
-
${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: _jsxs("div", { className: Styles.ns_modal_container, children: [_jsx(NSButton, { onClick:
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: _jsxs("div", { className: Styles.ns_modal_container, children: [_jsx(NSButton, { onClick: props.onClose, icon: { src: "https://static.namirasoft.com/image/concept/close/white.svg", alt: "close modal" }, classList: [Styles.ns_close_modal] }), _jsxs("div", { className: Styles.ns_modal_content, children: [props.title &&
|
|
12
|
+
_jsxs(_Fragment, { children: [_jsx(NSTitle, { title: props.title }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL })] }), props.description &&
|
|
13
|
+
(_jsx("div", { children: _jsxs("p", { className: Styles.ns_modal_description, children: [" ", props.description, " "] }) }))] })] }) }) }));
|
|
32
14
|
}
|
|
33
15
|
//# sourceMappingURL=NSModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSModal.js","sourceRoot":"","sources":["../../src/components/NSModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,
|
|
1
|
+
{"version":3,"file":"NSModal.js","sourceRoot":"","sources":["../../src/components/NSModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAA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AAW,SAAM,GAChE,CACN,IAGG,IACD,GACI,GACN,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Modal */
|
|
2
2
|
.ns_modal {
|
|
3
3
|
position: fixed;
|
|
4
|
-
top:
|
|
5
|
-
left:
|
|
4
|
+
top: 25%;
|
|
5
|
+
left: 25%;
|
|
6
6
|
border-radius: 8px;
|
|
7
7
|
padding: 24px;
|
|
8
8
|
margin: 0 16px;
|
|
@@ -10,30 +10,44 @@
|
|
|
10
10
|
color: rgba(20, 27, 92, 1);
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
|
-
background: #ffffff2a;
|
|
14
13
|
right: 0;
|
|
15
|
-
|
|
14
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
left: 0;
|
|
16
18
|
margin: 0;
|
|
17
19
|
display: none;
|
|
18
20
|
justify-content: center;
|
|
19
21
|
align-items: center;
|
|
20
22
|
z-index: 99;
|
|
23
|
+
text-align: center;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.ns_modal_container {
|
|
24
27
|
background-color: #fff;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
width: 50%;
|
|
29
|
+
height: 50%;
|
|
30
|
+
top: 25%;
|
|
31
|
+
left: 25%;
|
|
32
|
+
position: relative;
|
|
33
|
+
border-radius: 8px;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
.ns_close_modal {
|
|
36
|
+
.ns_close_modal {
|
|
32
37
|
border: none;
|
|
33
38
|
position: absolute;
|
|
34
39
|
right: 0;
|
|
40
|
+
margin: 0 24px 0 0;
|
|
35
41
|
top: 24px;
|
|
36
|
-
width:
|
|
42
|
+
width: 24px;
|
|
43
|
+
height: 24px;
|
|
44
|
+
background-color: rgba(236, 28, 36, 1);
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ns_close_modal img {
|
|
49
|
+
width: 12px;
|
|
50
|
+
height: 12px;
|
|
37
51
|
}
|
|
38
52
|
|
|
39
53
|
.ns_modal_content {
|
|
@@ -44,11 +58,10 @@
|
|
|
44
58
|
height: 100%;
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
|
|
49
61
|
.ns_show {
|
|
50
62
|
display: block;
|
|
51
63
|
}
|
|
64
|
+
|
|
52
65
|
.ns_hide {
|
|
53
66
|
display: none;
|
|
54
67
|
}
|
|
@@ -30,6 +30,9 @@ export class NSTable extends Component {
|
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
var _a;
|
|
33
|
+
let modalTitle = (e) => {
|
|
34
|
+
this.setState({ title: e.currentTarget.innerText });
|
|
35
|
+
};
|
|
33
36
|
let column_keys = Object.keys(this.state.columns);
|
|
34
37
|
let getColumnAttributes = (column, columnIndex) => {
|
|
35
38
|
if (this.props.getColumnAttributes)
|
|
@@ -57,7 +60,7 @@ export class NSTable extends Component {
|
|
|
57
60
|
if (!overided)
|
|
58
61
|
this.showModal(getCell(row, column, rowIndex, columnIndex));
|
|
59
62
|
};
|
|
60
|
-
return (_jsxs("div", { id: this.props.id, className: `${Styles.ns_project_list_container} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsx("section", { className: Styles.ns_search_input, children: _jsx(NSInputSearch, { ref: this.search, title: "Search", required: false, onChanged: this.getSearchValue, style: { padding: "0", margin: "0" } }) }), _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: (e) => { onRowClick(e, row, rowIndex); }, children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, getColumnAttributes(column, columnIndex), { "data-label": `${this.state.columns[column]} : `, onClick: (e) => { onCellClick(e, row, column, rowIndex, columnIndex); }, children: getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_pagination_button, children: [_jsx(NSPagination, { size: 50, page: 5 }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("div", { className: Styles.ns_button, children: [_jsx(NSButton, { title: 'Export', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)', width: "128px" } }), _jsx(NSButton, { title: 'Refresh', icon: { src: "/assets/images/refresh-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(3, 119, 255, 1)', width: "128px" } })] })] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSModal, { show: this.state.model.show, description: this.state.model.description })] }));
|
|
63
|
+
return (_jsxs("div", { id: this.props.id, className: `${Styles.ns_project_list_container} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsx("section", { className: Styles.ns_search_input, children: _jsx(NSInputSearch, { ref: this.search, title: "Search", required: false, onChanged: this.getSearchValue, style: { padding: "0", margin: "0" } }) }), _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", onClick: (e) => modalTitle(e), children: this.state.columns[column_key] }, column_key)) }) }), _jsx("tbody", { className: Styles.ns_tbody, children: this.state.rows.map((row, rowIndex) => _jsx("tr", { onClick: (e) => { onRowClick(e, row, rowIndex); }, children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, getColumnAttributes(column, columnIndex), { "data-label": `${this.state.columns[column]} : `, onClick: (e) => { onCellClick(e, row, column, rowIndex, columnIndex); }, children: getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_pagination_button, children: [_jsx(NSPagination, { size: 50, page: 5 }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("div", { className: Styles.ns_button, children: [_jsx(NSButton, { title: 'Export', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)', width: "128px" } }), _jsx(NSButton, { title: 'Refresh', icon: { src: "/assets/images/refresh-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(3, 119, 255, 1)', width: "128px" } })] })] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSModal, { show: this.state.model.show, description: this.state.model.description, onClose: () => { this.hideModal(); }, title: this.state.title })] }));
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
//# 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,QAAQ,MAAM,YAAY,CAAC;AAClC,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;AAGlC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,QAAQ,MAAM,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EACxK,KAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,GAAG,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,gCAAgC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAI,IACvK,IACA,EACV,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,KAAC,OAAO,IACJ,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EACzC,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EACpC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GACzB,IACC,CACV,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
display: block;
|
|
25
25
|
background-color: rgba(255, 255, 255, 1);
|
|
26
26
|
margin: 16px 0;
|
|
27
|
+
transition: all 0.2s ease-in-out;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.ns_table td {
|
|
@@ -89,6 +90,11 @@
|
|
|
89
90
|
align-items: center;
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
tr:hover {
|
|
94
|
+
background-color: rgba(20, 27, 92, 0.5);
|
|
95
|
+
color: white;
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
.ns_table td {
|
|
93
99
|
text-align: left;
|
|
94
100
|
display: flex;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Styles from './NSLoginPage.module.css';
|
|
3
|
-
import { NSButtonGreen } from '../components/NSButtonGreen';
|
|
4
3
|
import { NSLinkBlue } from '../components/NSLinkBlue';
|
|
5
4
|
import { NSSpace, NSSpaceSizeType } from '../components/NSSpace';
|
|
5
|
+
import NSButton from '../components/NSButton';
|
|
6
6
|
export function NSLoginPage(props) {
|
|
7
7
|
var _a;
|
|
8
8
|
let button = _jsx(_Fragment, {});
|
|
9
9
|
if (props.href)
|
|
10
10
|
button = _jsx(NSLinkBlue, { title: "Login", href: (_a = props.href) !== null && _a !== void 0 ? _a : "" });
|
|
11
11
|
else if (props.onClick)
|
|
12
|
-
button = _jsx(
|
|
12
|
+
button = _jsx(NSButton, { title: "Login", onClick: props.onClick, style: {
|
|
13
|
+
color: "#fff",
|
|
14
|
+
border: "none",
|
|
15
|
+
backgroundColor: "rgba(3, 119, 255, 1)",
|
|
16
|
+
width: "358px",
|
|
17
|
+
height: "48px",
|
|
18
|
+
boxShadow: "inset 0 - 4px 4px 0px rgb(0 0 0 / 25 %)"
|
|
19
|
+
} });
|
|
13
20
|
return (_jsx("div", { style: { backgroundImage: props.background, width: "100%", backgroundSize: "cover" }, children: _jsxs("div", { className: `${Styles.ns_login_container}`, style: { marginTop: "100px" }, children: [_jsx("div", { className: `${Styles.ns_logo}`, children: _jsx("img", { width: 256, height: 256, src: props.logo, alt: `${props.title} Logo` }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { children: _jsx("h1", { className: `${Styles.ns_title}`, children: props.title }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { className: `${Styles.ns_button}`, children: button })] }) }));
|
|
14
21
|
}
|
|
15
22
|
//# sourceMappingURL=NSLoginPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":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,wBAAK,aAAI,SAAS,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,YAAG,KAAK,CAAC,KAAK,GAAM,GAAM,EAClE,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,YAChC,MAAM,GACL,IACJ,GACH,CACV,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import {
|
|
3
|
+
import { NSTable } from './main';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { NSLayoutAction } from './components/NSLayoutAction';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
const actions = [
|
|
9
8
|
{
|
|
10
9
|
group: "test-1",
|
|
@@ -122,7 +121,7 @@ export function App()
|
|
|
122
121
|
getRowKey={row => row.id.toString()}
|
|
123
122
|
/>
|
|
124
123
|
</div>
|
|
125
|
-
|
|
124
|
+
</NSLayoutAction>
|
|
126
125
|
</>
|
|
127
126
|
);
|
|
128
127
|
}
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.ns_input_parent img {
|
|
11
|
+
position: absolute;
|
|
12
|
+
right: 5%;
|
|
13
|
+
top: 50%;
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
.ns_input_container {
|
|
11
17
|
display: flex;
|
|
12
18
|
align-items: center;
|
|
@@ -16,10 +22,10 @@
|
|
|
16
22
|
|
|
17
23
|
.ns_input_icon_container {
|
|
18
24
|
margin: 0 !important;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 12px;
|
|
27
|
+
right: 5%;
|
|
28
|
+
top: 25%;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
.ns_input {
|
|
@@ -64,4 +70,5 @@
|
|
|
64
70
|
width: 206px !important;
|
|
65
71
|
}
|
|
66
72
|
}
|
|
73
|
+
|
|
67
74
|
/*End Input Tell*/
|
|
@@ -15,23 +15,17 @@ export interface INSLayoutActionProps extends INSLayoutProps, IBaseComponentProp
|
|
|
15
15
|
}
|
|
16
16
|
export interface INSLaoutActionState
|
|
17
17
|
{
|
|
18
|
-
|
|
18
|
+
show: boolean
|
|
19
19
|
}
|
|
20
20
|
export function NSLayoutAction(props: INSLayoutActionProps)
|
|
21
21
|
{
|
|
22
22
|
let lines = (props.description ?? "").split(/(\n|\\n|<br>|<br\s*\/>)/gm);
|
|
23
23
|
const [state, setState] = useState<INSLaoutActionState>({
|
|
24
|
-
|
|
24
|
+
show: false
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
const filtered_actions = props.actions.filter((action) => action.group)
|
|
28
28
|
|
|
29
|
-
const showHandler = (): void =>
|
|
30
|
-
{
|
|
31
|
-
setState(prevState => ({
|
|
32
|
-
...prevState, showDescription: !prevState.showDescription // Updated prevState
|
|
33
|
-
}));
|
|
34
|
-
};
|
|
35
29
|
|
|
36
30
|
return (
|
|
37
31
|
<NSLayout {...props}>
|
|
@@ -41,15 +35,16 @@ export function NSLayoutAction(props: INSLayoutActionProps)
|
|
|
41
35
|
<div className={`d-none d-lg-flex ${Styles.ns_desktop_action_bar_title}`}>
|
|
42
36
|
<h1 className={Styles.title}>{props.title}</h1>
|
|
43
37
|
|
|
44
|
-
<button className={Styles.ns_info_container} onClick={
|
|
38
|
+
<button className={Styles.ns_info_container} onClick={() => setState({ show: true })}>
|
|
45
39
|
<img src='https://static.namirasoft.com/image/concept/info/white-blue.svg' alt='info-icon' width={24} height={24} />
|
|
46
40
|
<span> Info </span>
|
|
47
41
|
</button>
|
|
48
42
|
|
|
49
43
|
<NSModal
|
|
50
|
-
show={state.
|
|
44
|
+
show={state.show}
|
|
51
45
|
description={props.description}
|
|
52
46
|
title={props.title}
|
|
47
|
+
onClose={() => setState({ show: false })}
|
|
53
48
|
/>
|
|
54
49
|
</div>
|
|
55
50
|
|
|
@@ -5,8 +5,15 @@ export function NSLinkBlue(props: INSILinkProps)
|
|
|
5
5
|
return (
|
|
6
6
|
<NSLink
|
|
7
7
|
id={props.id}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
style=
|
|
9
|
+
{{
|
|
10
|
+
color: "#fff",
|
|
11
|
+
border: "none",
|
|
12
|
+
backgroundColor: "rgba(3, 119, 255, 1)",
|
|
13
|
+
width: "358px",
|
|
14
|
+
height: "48px",
|
|
15
|
+
boxShadow: "inset 0 - 4px 4px 0px rgb(0 0 0 / 25 %)"
|
|
16
|
+
}}
|
|
10
17
|
title={props.title}
|
|
11
18
|
href={props.href}
|
|
12
19
|
target={props.target}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Modal */
|
|
2
2
|
.ns_modal {
|
|
3
3
|
position: fixed;
|
|
4
|
-
top:
|
|
5
|
-
left:
|
|
4
|
+
top: 25%;
|
|
5
|
+
left: 25%;
|
|
6
6
|
border-radius: 8px;
|
|
7
7
|
padding: 24px;
|
|
8
8
|
margin: 0 16px;
|
|
@@ -10,30 +10,44 @@
|
|
|
10
10
|
color: rgba(20, 27, 92, 1);
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
|
-
background: #ffffff2a;
|
|
14
13
|
right: 0;
|
|
15
|
-
|
|
14
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
left: 0;
|
|
16
18
|
margin: 0;
|
|
17
19
|
display: none;
|
|
18
20
|
justify-content: center;
|
|
19
21
|
align-items: center;
|
|
20
22
|
z-index: 99;
|
|
23
|
+
text-align: center;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.ns_modal_container {
|
|
24
27
|
background-color: #fff;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
width: 50%;
|
|
29
|
+
height: 50%;
|
|
30
|
+
top: 25%;
|
|
31
|
+
left: 25%;
|
|
32
|
+
position: relative;
|
|
33
|
+
border-radius: 8px;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
.ns_close_modal {
|
|
36
|
+
.ns_close_modal {
|
|
32
37
|
border: none;
|
|
33
38
|
position: absolute;
|
|
34
39
|
right: 0;
|
|
40
|
+
margin: 0 24px 0 0;
|
|
35
41
|
top: 24px;
|
|
36
|
-
width:
|
|
42
|
+
width: 24px;
|
|
43
|
+
height: 24px;
|
|
44
|
+
background-color: rgba(236, 28, 36, 1);
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ns_close_modal img {
|
|
49
|
+
width: 12px;
|
|
50
|
+
height: 12px;
|
|
37
51
|
}
|
|
38
52
|
|
|
39
53
|
.ns_modal_content {
|
|
@@ -44,11 +58,10 @@
|
|
|
44
58
|
height: 100%;
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
|
|
49
61
|
.ns_show {
|
|
50
62
|
display: block;
|
|
51
63
|
}
|
|
64
|
+
|
|
52
65
|
.ns_hide {
|
|
53
66
|
display: none;
|
|
54
67
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
4
3
|
import { IBaseComponentProps, NSSpace, NSSpaceSizeType, NSTitle } from "../main";
|
|
5
4
|
import Styles from './NSModal.module.css';
|
|
6
5
|
import NSButton from "./NSButton";
|
|
@@ -11,72 +10,45 @@ export interface INSModalProps extends IBaseComponentProps
|
|
|
11
10
|
description?: string;
|
|
12
11
|
show: boolean;
|
|
13
12
|
children?: React.ReactNode;
|
|
14
|
-
|
|
15
|
-
export interface INSModalState
|
|
16
|
-
{
|
|
17
|
-
closeModal: boolean;
|
|
18
|
-
visibilityClassNames: string;
|
|
13
|
+
onClose: () => void;
|
|
19
14
|
}
|
|
20
15
|
export function NSModal(props: INSModalProps)
|
|
21
16
|
{
|
|
22
|
-
|
|
23
|
-
closeModal: false,
|
|
24
|
-
visibilityClassNames: ""
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const closeModalHandler = (): void =>
|
|
28
|
-
{
|
|
29
|
-
setState(prevState =>
|
|
30
|
-
({
|
|
31
|
-
...prevState, closeModal: !state.closeModal
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
let classNames: string;
|
|
36
|
-
const modalVisibilityClassName = (): string =>
|
|
37
|
-
{
|
|
38
|
-
if (state.closeModal && !props.show)
|
|
39
|
-
classNames = `${Styles.ns_hide}`
|
|
40
|
-
else if (!state.closeModal && props.show)
|
|
41
|
-
classNames = `${Styles.ns_show}`
|
|
42
|
-
else if (state.closeModal && props.show)
|
|
43
|
-
classNames = `${Styles.ns_hide}`
|
|
44
|
-
return classNames;
|
|
45
|
-
}
|
|
46
|
-
// show -> true va close -> false --> show
|
|
47
|
-
// show -> false va close -> true --> hiden
|
|
48
|
-
let modalClassNames: string = modalVisibilityClassName();
|
|
49
|
-
|
|
17
|
+
console.log(props, props.show ? Styles.ns_show : Styles.ns_hide);
|
|
50
18
|
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className={`${modalClassNames}
|
|
19
|
+
<div className={Styles.ns_modal_container} onClick={props.onClose}>
|
|
20
|
+
<section
|
|
21
|
+
id={props.id}
|
|
22
|
+
className={`${props.show ? Styles.ns_show : Styles.ns_hide}
|
|
56
23
|
${Styles.ns_modal}
|
|
57
24
|
${props.classList?.join(" ")}`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
25
|
+
}
|
|
26
|
+
style={props.style}
|
|
27
|
+
>
|
|
28
|
+
<div className={Styles.ns_modal_container}>
|
|
29
|
+
<NSButton
|
|
30
|
+
onClick={props.onClose}
|
|
31
|
+
icon={{ src: "https://static.namirasoft.com/image/concept/close/white.svg", alt: "close modal" }}
|
|
32
|
+
classList={[Styles.ns_close_modal]}
|
|
33
|
+
/>
|
|
34
|
+
<div className={Styles.ns_modal_content}>
|
|
35
|
+
{props.title &&
|
|
36
|
+
<>
|
|
37
|
+
<NSTitle title={props.title} />
|
|
38
|
+
<NSSpace size={NSSpaceSizeType.NORMAL} />
|
|
39
|
+
</>
|
|
40
|
+
}
|
|
41
|
+
{props.description &&
|
|
42
|
+
(
|
|
43
|
+
<div>
|
|
44
|
+
<p className={Styles.ns_modal_description} > {props.description} </p>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
67
47
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<>
|
|
71
|
-
<NSTitle title={props.title} />
|
|
72
|
-
<NSSpace size={NSSpaceSizeType.NORMAL} />
|
|
73
|
-
</>
|
|
74
|
-
}
|
|
75
|
-
{props.description &&
|
|
76
|
-
<p className={Styles.ns_modal_description} > {props.description} </p>
|
|
77
|
-
}
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
78
50
|
</div>
|
|
79
|
-
</
|
|
80
|
-
</
|
|
51
|
+
</section >
|
|
52
|
+
</div>
|
|
81
53
|
);
|
|
82
54
|
}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
display: block;
|
|
25
25
|
background-color: rgba(255, 255, 255, 1);
|
|
26
26
|
margin: 16px 0;
|
|
27
|
+
transition: all 0.2s ease-in-out;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.ns_table td {
|
|
@@ -89,6 +90,11 @@
|
|
|
89
90
|
align-items: center;
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
tr:hover {
|
|
94
|
+
background-color: rgba(20, 27, 92, 0.5);
|
|
95
|
+
color: white;
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
.ns_table td {
|
|
93
99
|
text-align: left;
|
|
94
100
|
display: flex;
|
|
@@ -25,6 +25,7 @@ export interface NSTableState<RowType>
|
|
|
25
25
|
{
|
|
26
26
|
columns: { [key: string]: string };
|
|
27
27
|
rows: RowType[];
|
|
28
|
+
title?: string
|
|
28
29
|
model: {
|
|
29
30
|
show: boolean;
|
|
30
31
|
description?: string;
|
|
@@ -53,14 +54,18 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
53
54
|
}
|
|
54
55
|
showModal(description: string)
|
|
55
56
|
{
|
|
56
|
-
this.setState({ model: { show: true, description } })
|
|
57
|
+
this.setState({ model: { show: true, description } });
|
|
57
58
|
}
|
|
58
59
|
hideModal()
|
|
59
60
|
{
|
|
60
|
-
this.setState({ model: { show: false } })
|
|
61
|
+
this.setState({ model: { show: false } });
|
|
61
62
|
}
|
|
62
63
|
override render()
|
|
63
64
|
{
|
|
65
|
+
let modalTitle = (e: any) =>
|
|
66
|
+
{
|
|
67
|
+
this.setState({ title: e.currentTarget.innerText });
|
|
68
|
+
}
|
|
64
69
|
let column_keys = Object.keys(this.state.columns);
|
|
65
70
|
let getColumnAttributes = (column: string, columnIndex: number) =>
|
|
66
71
|
{
|
|
@@ -104,7 +109,10 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
104
109
|
<table className={Styles.ns_table} >
|
|
105
110
|
<thead className={Styles.ns_thead}>
|
|
106
111
|
<tr>
|
|
107
|
-
{column_keys.map(column_key => <th key={column_key} scope="col"
|
|
112
|
+
{column_keys.map(column_key => <th key={column_key} scope="col"
|
|
113
|
+
onClick={(e) => modalTitle(e)}>
|
|
114
|
+
{this.state.columns[column_key]}
|
|
115
|
+
</th>)}
|
|
108
116
|
</tr>
|
|
109
117
|
</thead>
|
|
110
118
|
<tbody className={Styles.ns_tbody}>
|
|
@@ -135,6 +143,8 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
135
143
|
<NSModal
|
|
136
144
|
show={this.state.model.show}
|
|
137
145
|
description={this.state.model.description}
|
|
146
|
+
onClose={() => { this.hideModal(); }}
|
|
147
|
+
title={this.state.title}
|
|
138
148
|
/>
|
|
139
149
|
</div >
|
|
140
150
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Styles from './NSLoginPage.module.css'
|
|
2
|
-
import { NSButtonGreen } from '../components/NSButtonGreen';
|
|
3
2
|
import { NSLinkBlue } from '../components/NSLinkBlue';
|
|
4
3
|
import { NSSpace, NSSpaceSizeType } from '../components/NSSpace';
|
|
4
|
+
import NSButton from '../components/NSButton';
|
|
5
5
|
|
|
6
6
|
export interface INSLoginPageProps
|
|
7
7
|
{
|
|
@@ -18,7 +18,16 @@ export function NSLoginPage(props: INSLoginPageProps)
|
|
|
18
18
|
if (props.href)
|
|
19
19
|
button = <NSLinkBlue title="Login" href={props.href ?? ""} />;
|
|
20
20
|
else if (props.onClick)
|
|
21
|
-
button = <
|
|
21
|
+
button = <NSButton title="Login" onClick={props.onClick}
|
|
22
|
+
style=
|
|
23
|
+
{{
|
|
24
|
+
color: "#fff",
|
|
25
|
+
border: "none",
|
|
26
|
+
backgroundColor: "rgba(3, 119, 255, 1)",
|
|
27
|
+
width: "358px",
|
|
28
|
+
height: "48px",
|
|
29
|
+
boxShadow: "inset 0 - 4px 4px 0px rgb(0 0 0 / 25 %)"
|
|
30
|
+
}} />;
|
|
22
31
|
return (
|
|
23
32
|
<div style={{ backgroundImage: props.background, width: "100%", backgroundSize: "cover" }}>
|
|
24
33
|
<div className={`${Styles.ns_login_container}`} style={{ marginTop: "100px" }}>
|