namirasoft-site-react 1.3.269 → 1.3.271
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 +33 -1
- package/dist/App.js.map +1 -1
- package/dist/components/NSAssistantButton.d.ts +2 -2
- package/dist/components/NSAssistantButton.js +5 -1
- package/dist/components/NSAssistantButton.js.map +1 -1
- package/dist/components/NSAssistantButton.module.css +108 -0
- package/dist/components/NSBox.module.css +9 -8
- package/dist/components/NSBoxEmail.d.ts +0 -3
- package/dist/components/NSBoxEmail.js +3 -19
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSTable.js +1 -2
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.module.css +8 -2
- package/package.json +3 -3
- package/src/App.tsx +42 -4
- package/src/components/NSAssistantButton.module.css +108 -0
- package/src/components/NSAssistantButton.tsx +63 -28
- package/src/components/NSBox.module.css +9 -8
- package/src/components/NSBoxEmail.tsx +6 -58
- package/src/components/NSTable.module.css +8 -2
- package/src/components/NSTable.tsx +3 -4
package/dist/App.js
CHANGED
|
@@ -6,6 +6,7 @@ import { NSBoxLabel } from './components/NSBoxLabel';
|
|
|
6
6
|
import NSRadioButton from './components/NSRadioButton';
|
|
7
7
|
import NSTag from './components/NSTag';
|
|
8
8
|
import NSButton from './components/NSButton';
|
|
9
|
+
import { useRef } from 'react';
|
|
9
10
|
export function App() {
|
|
10
11
|
const onClicked = () => {
|
|
11
12
|
console.log("clicked");
|
|
@@ -35,6 +36,28 @@ export function App() {
|
|
|
35
36
|
os: "OS"
|
|
36
37
|
};
|
|
37
38
|
};
|
|
39
|
+
let rows = [
|
|
40
|
+
{
|
|
41
|
+
id: 1,
|
|
42
|
+
name: "Accountant",
|
|
43
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 2,
|
|
47
|
+
name: "Accountant",
|
|
48
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 3,
|
|
52
|
+
name: "Accountant",
|
|
53
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 4,
|
|
57
|
+
name: "Accountant",
|
|
58
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
59
|
+
},
|
|
60
|
+
];
|
|
38
61
|
let group = [
|
|
39
62
|
[
|
|
40
63
|
{
|
|
@@ -56,9 +79,18 @@ export function App() {
|
|
|
56
79
|
}
|
|
57
80
|
]
|
|
58
81
|
];
|
|
82
|
+
let table = useRef(null);
|
|
83
|
+
function getCell(row, column) {
|
|
84
|
+
if (column === "check") {
|
|
85
|
+
return _jsxs(_Fragment, { children: [_jsx("input", { id: `checkbox_${row.id}`, type: "checkbox", className: "table_checkbox" }), _jsx("label", { htmlFor: `checkbox_${row.id}` })] });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return row[column];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
59
91
|
return (_jsx(_Fragment, { children: _jsxs(NSLayout, { header: {
|
|
60
92
|
title: "any",
|
|
61
93
|
icons: icons
|
|
62
|
-
}, scope: "Namirasoft Account Console", logo: "exampleLogoUrl", notifications: [], background: "", children: [_jsxs(_Fragment, { children: [_jsx(NSTabPage, { tabs: tabs }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSPagination, { totalItems: 100, onPageChange: () => { } })] }), _jsx(NSTable, { columns: getColumns(), getColumnAttributes: () => { return {}; },
|
|
94
|
+
}, scope: "Namirasoft Account Console", logo: "exampleLogoUrl", notifications: [], background: "", children: [_jsxs(_Fragment, { children: [_jsx(NSTabPage, { tabs: tabs }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSPagination, { totalItems: 100, onPageChange: () => { } })] }), _jsx(NSTable, { ref: table, columns: getColumns(), getCell: getCell, getRowKey: row => row.id.toString(), getColumnAttributes: () => { return {}; }, totalItems: 0, reload: () => { var _a; return (_a = table.current) === null || _a === void 0 ? void 0 : _a.setRows(rows); } }), _jsx(NSBarAction, { title: '', menus: group }), _jsx(NSBoxEmail, { title: 'Email', required: true }), _jsx(NSBoxString, { title: 'String', required: true }), _jsx(NSRadioButton, { title: "Radio Button" }), _jsx(NSSpace, { size: NSSpaceSizeType.LARGE }), _jsx(NSBoxBoolean, { defaultValue: true, title: '', required: true }), _jsx(NSButton, { title: 'Clear Filters', onClick: () => window.location.reload(), style: { width: "136px", border: "2px solid #001664" } }), _jsx(NSTag, {})] }) }));
|
|
63
95
|
}
|
|
64
96
|
//# sourceMappingURL=App.js.map
|
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,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClJ,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClJ,OAAO,EAAE,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AAC,QAAQ,SAAG,EACvC,KAAC,aAAa,IAAC,KAAK,EAAE,cAAc,GAAI,EACxC,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,KAAC,YAAY,IAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAC,EAAE,EAAC,QAAQ,SAAG,EACtD,KAAC,QAAQ,IAAC,KAAK,EAAC,eAAe,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAI,EACnI,KAAC,KAAK,KAAG,IACC,GACT,CACH,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface INSAssistantProps {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: string;
|
|
3
|
+
required: boolean;
|
|
4
4
|
}
|
|
5
5
|
declare function NSAssistantButton(props: INSAssistantProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default NSAssistantButton;
|
|
@@ -2,8 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Styles from './NSAssistantButton.module.css';
|
|
3
3
|
import IconCopy from '../assets/images/icon-copy.png';
|
|
4
4
|
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
5
7
|
function NSAssistantButton(props) {
|
|
6
|
-
|
|
8
|
+
let [fullscreen, setFullscreen] = useState(false);
|
|
9
|
+
let [state, setState] = useState("");
|
|
10
|
+
return (_jsxs("div", { className: Styles.ns_container, children: [_jsxs("div", { className: Styles.ns_input_parent, children: [_jsxs("div", { className: Styles.ns_input_title_group, children: [_jsxs("div", { children: [props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", props.title] }), _jsxs("div", { children: [_jsx("button", { className: Styles.ns_btn_box, onClick: () => alert(10), children: _jsx("img", { src: IconCopy, alt: "Copy", width: 14, height: 14 }) }), _jsx("button", { className: Styles.ns_btn_box, onClick: () => { setFullscreen(!fullscreen); }, children: _jsx("img", { src: IconFullScreen, alt: "FullScreen", width: 14, height: 14 }) })] })] }), _jsxs("div", { className: Styles.ns_input_modal_full_screen, style: { display: fullscreen === false ? "none" : "block" }, children: [_jsx("div", { className: Styles.ns_cover_background, children: _jsx("img", { className: Styles.ns_modal_icon_close, src: "https://static.namirasoft.com/image/concept/close/info.svg", alt: "Close Button", width: 24, height: 24, onClick: () => { setFullscreen(!fullscreen); } }) }), _jsx("div", { className: Styles.ns_input_modal_full, onClick: () => { } }), _jsx("textarea", { onChange: (e) => { setState(e.target.value); } }), _jsx("div", { children: state })] })] }), _jsx("input", { type: "email", className: Styles.ns_input, style: { background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` } })] }));
|
|
7
11
|
}
|
|
8
12
|
export default NSAssistantButton;
|
|
9
13
|
//# sourceMappingURL=NSAssistantButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSAssistantButton.js","sourceRoot":"","sources":["../../src/components/NSAssistantButton.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,cAAc,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"NSAssistantButton.js","sourceRoot":"","sources":["../../src/components/NSAssistantButton.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,cAAc,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAMnE,SAAS,iBAAiB,CAAC,KAAwB;IA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ACV,OAAO,EAAE,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC,UAAU,CAAC,CAAA,CAAC,CAAC,GAC/C,GACA,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAQ,EACtE,mBACI,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,CAAC,CAAC,GAEtC,EACX,wBACK,KAAK,GACJ,IACJ,IACH,EACP,gBACI,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,cAAc,4CAA4C,EAAE,GAC1F,IACA,CACT,CAAC;AACN,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
.ns_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: left;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_input_parent {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
width: 100%;
|
|
12
|
+
color: #141B5C;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
width: 272px;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ns_input {
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
padding: 10px 48px 10px 12px;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
border: 1px solid rgba(0, 0, 0, 1) !important;
|
|
24
|
+
height: 48px;
|
|
25
|
+
width: 272px
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ns_input li {
|
|
29
|
+
color: #000 !important
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ns_input_title {
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ns_input_title_group {
|
|
39
|
+
display: flex;
|
|
40
|
+
width: 100%;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media only screen and (min-width: 380px) {
|
|
45
|
+
.ns_input {
|
|
46
|
+
max-width: 272px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*Start Input phone*/
|
|
51
|
+
.ns_input_phone_parent input {
|
|
52
|
+
width: 100% !important;
|
|
53
|
+
height: 48px !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
1
56
|
@media only screen and (min-width: 380px) {
|
|
2
57
|
.ns_input_phone_parent input {
|
|
3
58
|
width: 272px !important;
|
|
@@ -24,4 +79,57 @@
|
|
|
24
79
|
|
|
25
80
|
.ns_btn_box img {
|
|
26
81
|
position: inherit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ns_full_screen {
|
|
85
|
+
position: fixed;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
background: #0101015c;
|
|
91
|
+
z-index: 1000;
|
|
92
|
+
padding: 5%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ns_full_screen input {
|
|
96
|
+
width: 100% !important;
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ns_input_modal_full {
|
|
101
|
+
position: fixed;
|
|
102
|
+
top: 0;
|
|
103
|
+
left: 0;
|
|
104
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
105
|
+
height: 100%;
|
|
106
|
+
width: 100%;
|
|
107
|
+
z-index: 15;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ns_input_modal_full_screen textarea {
|
|
111
|
+
height: 80%;
|
|
112
|
+
width: 80%;
|
|
113
|
+
z-index: 15;
|
|
114
|
+
position: fixed;
|
|
115
|
+
top: 10%;
|
|
116
|
+
left: 10%;
|
|
117
|
+
text-align: left;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ns_input_modal_full_screen img {
|
|
121
|
+
position: fixed;
|
|
122
|
+
top: 5%;
|
|
123
|
+
right: 10%;
|
|
124
|
+
z-index: 20;
|
|
125
|
+
transition: all 0.3s ease-in-out;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
background-color: white;
|
|
128
|
+
border-radius: 50%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ns_input_modal_full_screen img:hover {
|
|
132
|
+
scale: 1.2;
|
|
133
|
+
rotate: 180deg;
|
|
134
|
+
background-color: red;
|
|
27
135
|
}
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
font-weight: 400;
|
|
28
28
|
display: flex;
|
|
29
29
|
align-items: center;
|
|
30
|
+
flex-direction: row;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
@media only screen and (min-width: 380px) {
|
|
@@ -59,15 +60,15 @@
|
|
|
59
60
|
background-color: transparent;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
.ns_input_parent:hover .ns_btn_box {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
visibility: visible;
|
|
66
|
+
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
|
|
67
|
+
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
.ns_btn_box img {
|
|
70
|
+
position: inherit;
|
|
71
|
+
}
|
|
71
72
|
|
|
72
73
|
.ns_full_screen {
|
|
73
74
|
position: fixed;
|
|
@@ -12,15 +12,12 @@ export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps,
|
|
|
12
12
|
export interface INSBoxEmailState {
|
|
13
13
|
value: string;
|
|
14
14
|
error?: string;
|
|
15
|
-
isFullScreen: boolean;
|
|
16
15
|
}
|
|
17
16
|
export declare class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState> {
|
|
18
17
|
constructor(props: INSBoxEmailProps);
|
|
19
18
|
getError(): string | null;
|
|
20
|
-
getValue(): string;
|
|
21
19
|
setValue(value: string): void;
|
|
22
20
|
private onChanged;
|
|
23
|
-
private toggleFullScreen;
|
|
24
21
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
25
22
|
}
|
|
26
23
|
export default NSBoxEmail;
|
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
5
|
import { Validator } from "../Validator";
|
|
7
6
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
7
|
import NSAssitantButton from "./NSAssistantButton";
|
|
9
|
-
import CopyToClipboard from "../CopyToClipboard";
|
|
10
8
|
export class NSBoxEmail extends React.Component {
|
|
11
9
|
constructor(props) {
|
|
12
10
|
var _a;
|
|
13
11
|
super(props);
|
|
14
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : ""
|
|
15
|
-
this.setValue = this.setValue.bind(this);
|
|
16
|
-
this.getValue = this.getValue.bind(this);
|
|
12
|
+
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
17
13
|
this.onChanged = this.onChanged.bind(this);
|
|
18
|
-
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
19
14
|
}
|
|
20
15
|
getError() {
|
|
21
16
|
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
22
17
|
Validator.getErrorString(this.props.title, this.state.value, this.props) ||
|
|
23
18
|
Validator.getErrorEmail(this.props.title, this.state.value));
|
|
24
19
|
}
|
|
25
|
-
getValue() {
|
|
26
|
-
let error = this.getError();
|
|
27
|
-
if (error) {
|
|
28
|
-
this.setState({ error });
|
|
29
|
-
throw new Error(error);
|
|
30
|
-
}
|
|
31
|
-
return this.state.value;
|
|
32
|
-
}
|
|
33
20
|
setValue(value) {
|
|
34
21
|
this.setState({ value }, () => {
|
|
35
22
|
if (this.props.onChanged) {
|
|
@@ -40,12 +27,9 @@ export class NSBoxEmail extends React.Component {
|
|
|
40
27
|
onChanged(e) {
|
|
41
28
|
this.setValue(e.target.value);
|
|
42
29
|
}
|
|
43
|
-
toggleFullScreen() {
|
|
44
|
-
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
45
|
-
}
|
|
46
30
|
render() {
|
|
47
31
|
var _a;
|
|
48
|
-
return (_jsxs(_Fragment, { children: [
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: _jsx("span", { className: Styles.ns_input_title, children: _jsx(NSAssitantButton, { title: this.props.title, required: true }) }) }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
49
33
|
}
|
|
50
34
|
}
|
|
51
35
|
export default NSBoxEmail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxEmail.js","sourceRoot":"","sources":["../../src/components/NSBoxEmail.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"NSBoxEmail.js","sourceRoot":"","sources":["../../src/components/NSBoxEmail.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAA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AAK,CAAC,CAAC;IAC/B,CAAC;IAEQ,MAAM;;QAEd,OAAO,CACN,8BACC,cAAK,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,YACzH,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YACrC,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,SAAG,GAC/C,GACF,EACP,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -9,7 +9,6 @@ import { Component } from 'react';
|
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { NSModal } from './NSModal';
|
|
11
11
|
import { NSLoading } from './NSLoading';
|
|
12
|
-
import { Checkbox } from 'antd';
|
|
13
12
|
export class NSTable extends Component {
|
|
14
13
|
constructor(props) {
|
|
15
14
|
super(props);
|
|
@@ -81,7 +80,7 @@ export class NSTable extends Component {
|
|
|
81
80
|
else {
|
|
82
81
|
content = this.state.rows.map((row, rowIndex) => _jsx("tr", { onClick: (e) => { onRowClick(e, row, rowIndex); }, children: column_keys.map((column, columnIndex) => (_createElement("td", Object.assign({}, getColumnAttributes(column, columnIndex), { key: this.props.getRowKey(row, rowIndex), "data-label": `${this.state.columns[column]} : `, onClick: (e) => { onCellClick(e, row, column, rowIndex, columnIndex); } }), getCell(row, column, rowIndex, columnIndex)))) }, this.props.getRowKey(row, rowIndex)));
|
|
83
82
|
}
|
|
84
|
-
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(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("table", { className: Styles.ns_table, children: [_jsx("thead", { className: Styles.ns_thead, children: _jsxs("tr", { children: [_jsx(
|
|
83
|
+
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(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("table", { className: Styles.ns_table, children: [_jsx("thead", { className: Styles.ns_thead, children: _jsxs("tr", { children: [_jsx("div", { className: Styles.ns_checkbox, children: _jsx("input", { id: 'checkbox', type: 'checkbox', onChange: () => { } }) }), column_keys.map(column_key => _jsx("th", { scope: "col", children: this.state.columns[column_key] }, column_key))] }) }), _jsx("tbody", { className: Styles.ns_tbody, children: content })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_pagination_button, children: [_jsx(NSPagination, { ref: this.NSPagination, totalItems: this.props.totalItems, onPageChange: this.onPageChange }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("div", { className: Styles.ns_button, children: [_jsx(NSButton, { title: 'Chart', icon: { src: "https://static.namirasoft.com/image/concept/chart/blue.svg" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)', width: "128px" } }), _jsx(NSButton, { title: 'Print', icon: { src: "https://static.namirasoft.com/image/concept/print/blue.svg" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)', width: "128px" } }), _jsx(NSButton, { title: 'Export', icon: { src: "https://static.namirasoft.com/image/concept/export/blue.svg" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)', width: "128px" } }), _jsx(NSButton, { title: 'Refresh', icon: { src: "https://static.namirasoft.com/image/concept/refresh/blue.svg" }, onClick: () => {
|
|
85
84
|
if (this.NSPagination.current)
|
|
86
85
|
this.props.reload(this.NSPagination.current.getCurrentPage(), this.NSPagination.current.getPageSize());
|
|
87
86
|
}, 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 })] }));
|
|
@@ -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,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;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
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,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;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,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,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;oCACzG,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,gCAAgC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAI,IACrE,IACG,EACV,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,KAAC,OAAO,IACP,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,GACtB,IACI,CACP,CAAC;IACH,CAAC;CACD"}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
|
|
91
91
|
.ns_table tr {
|
|
92
92
|
display: grid;
|
|
93
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
93
|
+
grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr));
|
|
94
94
|
padding: 12px 16px;
|
|
95
95
|
margin: 0;
|
|
96
96
|
border-radius: 0;
|
|
@@ -99,6 +99,12 @@
|
|
|
99
99
|
align-items: center;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
.ns_checkbox {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: left;
|
|
105
|
+
align-items: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
.ns_table tr:hover {
|
|
103
109
|
background-color: rgba(20, 27, 92, 0.5);
|
|
104
110
|
color: white;
|
|
@@ -125,7 +131,7 @@
|
|
|
125
131
|
float: left;
|
|
126
132
|
font-weight: bold;
|
|
127
133
|
min-width: unset;
|
|
128
|
-
display:none;
|
|
134
|
+
display: none;
|
|
129
135
|
}
|
|
130
136
|
|
|
131
137
|
/* Button Group */
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
11
|
+
"version": "1.3.271",
|
|
12
12
|
"author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"copy": "copyfiles -u 1 src/**/*.html src/**/*.css src/**/*.svg src/**/*.png src/**/*.jpg dist/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@types/node": "^20.14.
|
|
24
|
+
"@types/node": "^20.14.9",
|
|
25
25
|
"@types/react": "^18.3.3",
|
|
26
26
|
"@types/react-dom": "^18.3.0",
|
|
27
27
|
"antd": "^5.18.3",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-dom": "^18.3.1",
|
|
38
38
|
"react-phone-input-2": "^2.15.1",
|
|
39
39
|
"react-phone-number-input": "^3.4.3",
|
|
40
|
-
"react-router-dom": "^6.
|
|
40
|
+
"react-router-dom": "^6.24.0",
|
|
41
41
|
"react-scripts": "5.0.1"
|
|
42
42
|
},
|
|
43
43
|
"eslintConfig": {
|
package/src/App.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { NSBoxLabel } from './components/NSBoxLabel';
|
|
|
5
5
|
import NSRadioButton from './components/NSRadioButton';
|
|
6
6
|
import NSTag from './components/NSTag';
|
|
7
7
|
import NSButton from './components/NSButton';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
10
|
export interface INSBarActionState
|
|
10
11
|
{
|
|
@@ -58,7 +59,28 @@ export function App()
|
|
|
58
59
|
os: "OS"
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
+
let rows = [
|
|
63
|
+
{
|
|
64
|
+
id: 1,
|
|
65
|
+
name: "Accountant",
|
|
66
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 2,
|
|
70
|
+
name: "Accountant",
|
|
71
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 3,
|
|
75
|
+
name: "Accountant",
|
|
76
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 4,
|
|
80
|
+
name: "Accountant",
|
|
81
|
+
policy: "Lorem ipsum dolor sit amet, consetetur ",
|
|
82
|
+
},
|
|
83
|
+
]
|
|
62
84
|
let group: any = [
|
|
63
85
|
[
|
|
64
86
|
{
|
|
@@ -80,6 +102,20 @@ export function App()
|
|
|
80
102
|
}
|
|
81
103
|
]
|
|
82
104
|
]
|
|
105
|
+
let table = useRef<NSTable<any>>(null);
|
|
106
|
+
function getCell(row: any, column: string): any
|
|
107
|
+
{
|
|
108
|
+
if (column === "check")
|
|
109
|
+
{
|
|
110
|
+
return <>
|
|
111
|
+
<input id={`checkbox_${row.id}`} type="checkbox" className="table_checkbox" />
|
|
112
|
+
<label htmlFor={`checkbox_${row.id}`}></label>
|
|
113
|
+
</>
|
|
114
|
+
} else
|
|
115
|
+
{
|
|
116
|
+
return (row as any)[column];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
83
119
|
return (
|
|
84
120
|
<>
|
|
85
121
|
<NSLayout
|
|
@@ -98,11 +134,13 @@ export function App()
|
|
|
98
134
|
<NSPagination totalItems={100} onPageChange={() => { }} />
|
|
99
135
|
</>
|
|
100
136
|
<NSTable
|
|
137
|
+
ref={table}
|
|
101
138
|
columns={getColumns()}
|
|
139
|
+
getCell={getCell}
|
|
140
|
+
getRowKey={row => row.id.toString()}
|
|
102
141
|
getColumnAttributes={() => { return {} }}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
reload={() => { }}
|
|
142
|
+
totalItems={0}
|
|
143
|
+
reload={() => { return table.current?.setRows(rows) }}
|
|
106
144
|
/>
|
|
107
145
|
<NSBarAction title='' menus={group} />
|
|
108
146
|
<NSBoxEmail title='Email' required />
|
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
.ns_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: left;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_input_parent {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
width: 100%;
|
|
12
|
+
color: #141B5C;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
width: 272px;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ns_input {
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
padding: 10px 48px 10px 12px;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
border: 1px solid rgba(0, 0, 0, 1) !important;
|
|
24
|
+
height: 48px;
|
|
25
|
+
width: 272px
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ns_input li {
|
|
29
|
+
color: #000 !important
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ns_input_title {
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ns_input_title_group {
|
|
39
|
+
display: flex;
|
|
40
|
+
width: 100%;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media only screen and (min-width: 380px) {
|
|
45
|
+
.ns_input {
|
|
46
|
+
max-width: 272px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*Start Input phone*/
|
|
51
|
+
.ns_input_phone_parent input {
|
|
52
|
+
width: 100% !important;
|
|
53
|
+
height: 48px !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
1
56
|
@media only screen and (min-width: 380px) {
|
|
2
57
|
.ns_input_phone_parent input {
|
|
3
58
|
width: 272px !important;
|
|
@@ -24,4 +79,57 @@
|
|
|
24
79
|
|
|
25
80
|
.ns_btn_box img {
|
|
26
81
|
position: inherit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ns_full_screen {
|
|
85
|
+
position: fixed;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
background: #0101015c;
|
|
91
|
+
z-index: 1000;
|
|
92
|
+
padding: 5%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ns_full_screen input {
|
|
96
|
+
width: 100% !important;
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ns_input_modal_full {
|
|
101
|
+
position: fixed;
|
|
102
|
+
top: 0;
|
|
103
|
+
left: 0;
|
|
104
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
105
|
+
height: 100%;
|
|
106
|
+
width: 100%;
|
|
107
|
+
z-index: 15;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ns_input_modal_full_screen textarea {
|
|
111
|
+
height: 80%;
|
|
112
|
+
width: 80%;
|
|
113
|
+
z-index: 15;
|
|
114
|
+
position: fixed;
|
|
115
|
+
top: 10%;
|
|
116
|
+
left: 10%;
|
|
117
|
+
text-align: left;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ns_input_modal_full_screen img {
|
|
121
|
+
position: fixed;
|
|
122
|
+
top: 5%;
|
|
123
|
+
right: 10%;
|
|
124
|
+
z-index: 20;
|
|
125
|
+
transition: all 0.3s ease-in-out;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
background-color: white;
|
|
128
|
+
border-radius: 50%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ns_input_modal_full_screen img:hover {
|
|
132
|
+
scale: 1.2;
|
|
133
|
+
rotate: 180deg;
|
|
134
|
+
background-color: red;
|
|
27
135
|
}
|
|
@@ -1,40 +1,75 @@
|
|
|
1
1
|
import Styles from './NSAssistantButton.module.css';
|
|
2
2
|
import IconCopy from '../assets/images/icon-copy.png';
|
|
3
3
|
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
4
|
-
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
5
6
|
export interface INSAssistantProps
|
|
6
7
|
{
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
title: string;
|
|
9
|
+
required: boolean;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
11
|
function NSAssistantButton(props: INSAssistantProps)
|
|
12
12
|
{
|
|
13
|
+
let [fullscreen, setFullscreen] = useState(false);
|
|
14
|
+
let [state, setState] = useState("")
|
|
15
|
+
// CopyToClipboard.copyToClipboard
|
|
13
16
|
return (
|
|
14
|
-
<div className={Styles.
|
|
15
|
-
<div className=
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
<div className={Styles.ns_container}>
|
|
18
|
+
<div className={Styles.ns_input_parent}>
|
|
19
|
+
<div className={Styles.ns_input_title_group}>
|
|
20
|
+
<div>
|
|
21
|
+
{props.required && <span style={{ color: "red" }}>*</span>} {props.title}
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<button className={Styles.ns_btn_box}
|
|
25
|
+
onClick={() => alert(10)}
|
|
26
|
+
>
|
|
27
|
+
<img
|
|
28
|
+
src={IconCopy}
|
|
29
|
+
alt="Copy"
|
|
30
|
+
width={14}
|
|
31
|
+
height={14}
|
|
32
|
+
/>
|
|
33
|
+
</button>
|
|
34
|
+
<button className={Styles.ns_btn_box}
|
|
35
|
+
onClick={() => { setFullscreen(!fullscreen) }}
|
|
36
|
+
>
|
|
37
|
+
<img
|
|
38
|
+
src={IconFullScreen}
|
|
39
|
+
alt="FullScreen"
|
|
40
|
+
width={14}
|
|
41
|
+
height={14}
|
|
42
|
+
/>
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div className={Styles.ns_input_modal_full_screen} style={{ display: fullscreen === false ? "none" : "block" }} >
|
|
47
|
+
<div className={Styles.ns_cover_background}>
|
|
48
|
+
<img
|
|
49
|
+
className={Styles.ns_modal_icon_close}
|
|
50
|
+
src="https://static.namirasoft.com/image/concept/close/info.svg"
|
|
51
|
+
alt="Close Button"
|
|
52
|
+
width={24}
|
|
53
|
+
height={24}
|
|
54
|
+
onClick={() => { setFullscreen(!fullscreen) }}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
<div className={Styles.ns_input_modal_full} onClick={() => { }}></div>
|
|
58
|
+
<textarea
|
|
59
|
+
onChange={(e) => { setState(e.target.value) }}
|
|
60
|
+
>
|
|
61
|
+
</textarea>
|
|
62
|
+
<div>
|
|
63
|
+
{state}
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div >
|
|
67
|
+
<input
|
|
68
|
+
type="email"
|
|
69
|
+
className={Styles.ns_input}
|
|
70
|
+
style={{ background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` }}
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
38
73
|
);
|
|
39
74
|
}
|
|
40
75
|
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
font-weight: 400;
|
|
28
28
|
display: flex;
|
|
29
29
|
align-items: center;
|
|
30
|
+
flex-direction: row;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
@media only screen and (min-width: 380px) {
|
|
@@ -59,15 +60,15 @@
|
|
|
59
60
|
background-color: transparent;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
.ns_input_parent:hover .ns_btn_box {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
visibility: visible;
|
|
66
|
+
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
|
|
67
|
+
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
.ns_btn_box img {
|
|
70
|
+
position: inherit;
|
|
71
|
+
}
|
|
71
72
|
|
|
72
73
|
.ns_full_screen {
|
|
73
74
|
position: fixed;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
5
|
import { Validator } from "../Validator";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
9
8
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
10
9
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
11
10
|
import NSAssitantButton from "./NSAssistantButton";
|
|
12
|
-
import CopyToClipboard from "../CopyToClipboard";
|
|
11
|
+
// import CopyToClipboard from "../CopyToClipboard";
|
|
13
12
|
|
|
14
13
|
export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
15
14
|
{
|
|
@@ -24,18 +23,14 @@ export interface INSBoxEmailState
|
|
|
24
23
|
{
|
|
25
24
|
value: string;
|
|
26
25
|
error?: string;
|
|
27
|
-
isFullScreen: boolean;
|
|
28
26
|
}
|
|
29
27
|
export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState>
|
|
30
28
|
{
|
|
31
29
|
constructor(props: INSBoxEmailProps)
|
|
32
30
|
{
|
|
33
31
|
super(props);
|
|
34
|
-
this.state = { value: props.defaultValue ?? ""
|
|
35
|
-
this.setValue = this.setValue.bind(this);
|
|
36
|
-
this.getValue = this.getValue.bind(this);
|
|
32
|
+
this.state = { value: props.defaultValue ?? "" };
|
|
37
33
|
this.onChanged = this.onChanged.bind(this);
|
|
38
|
-
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
getError(): string | null
|
|
@@ -47,16 +42,6 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
47
42
|
);
|
|
48
43
|
}
|
|
49
44
|
|
|
50
|
-
getValue(): string
|
|
51
|
-
{
|
|
52
|
-
let error = this.getError();
|
|
53
|
-
if (error)
|
|
54
|
-
{
|
|
55
|
-
this.setState({ error });
|
|
56
|
-
throw new Error(error);
|
|
57
|
-
}
|
|
58
|
-
return this.state.value;
|
|
59
|
-
}
|
|
60
45
|
|
|
61
46
|
setValue(value: string): void
|
|
62
47
|
{
|
|
@@ -74,52 +59,15 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
74
59
|
this.setValue(e.target.value);
|
|
75
60
|
}
|
|
76
61
|
|
|
77
|
-
private toggleFullScreen(): void
|
|
78
|
-
{
|
|
79
|
-
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
62
|
override render()
|
|
83
63
|
{
|
|
84
64
|
return (
|
|
85
65
|
<>
|
|
86
66
|
<div id={this.props.id} className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<NSAssitantButton onCopy={() => CopyToClipboard.copyToClipboard(this.getValue())} onFullScreen={this.toggleFullScreen} />
|
|
92
|
-
</div>
|
|
93
|
-
<input
|
|
94
|
-
type="email"
|
|
95
|
-
name={this.props.name}
|
|
96
|
-
className={Styles.ns_input}
|
|
97
|
-
placeholder={this.props.placeholder}
|
|
98
|
-
value={this.state.value}
|
|
99
|
-
onChange={this.onChanged}
|
|
100
|
-
onClick={() => this.props.onClicked}
|
|
101
|
-
style={{ background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` }}
|
|
102
|
-
/>
|
|
103
|
-
{/* Todo make a new component for fullscreen */}
|
|
104
|
-
<div className={Styles.ns_input_modal_full_screen} style={{ display: this.state.isFullScreen === false ? "none" : "block" }} >
|
|
105
|
-
<div>
|
|
106
|
-
<img
|
|
107
|
-
className={Styles.ns_modal_icon_close}
|
|
108
|
-
src="https://static.namirasoft.com/image/concept/close/info.svg"
|
|
109
|
-
alt="Close Button"
|
|
110
|
-
width={24}
|
|
111
|
-
height={24}
|
|
112
|
-
onClick={this.toggleFullScreen}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
<div className={Styles.ns_input_modal_full} onClick={this.toggleFullScreen}></div>
|
|
116
|
-
<textarea
|
|
117
|
-
value={this.state.value}
|
|
118
|
-
onChange={(e) => this.setValue(e.target.value)}
|
|
119
|
-
>
|
|
120
|
-
</textarea>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
67
|
+
<span className={Styles.ns_input_title}>
|
|
68
|
+
<NSAssitantButton title={this.props.title} required />
|
|
69
|
+
</span >
|
|
70
|
+
</div >
|
|
123
71
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
124
72
|
</>
|
|
125
73
|
);
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
|
|
91
91
|
.ns_table tr {
|
|
92
92
|
display: grid;
|
|
93
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
93
|
+
grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr));
|
|
94
94
|
padding: 12px 16px;
|
|
95
95
|
margin: 0;
|
|
96
96
|
border-radius: 0;
|
|
@@ -99,6 +99,12 @@
|
|
|
99
99
|
align-items: center;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
.ns_checkbox {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: left;
|
|
105
|
+
align-items: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
.ns_table tr:hover {
|
|
103
109
|
background-color: rgba(20, 27, 92, 0.5);
|
|
104
110
|
color: white;
|
|
@@ -125,7 +131,7 @@
|
|
|
125
131
|
float: left;
|
|
126
132
|
font-weight: bold;
|
|
127
133
|
min-width: unset;
|
|
128
|
-
display:none;
|
|
134
|
+
display: none;
|
|
129
135
|
}
|
|
130
136
|
|
|
131
137
|
/* Button Group */
|
|
@@ -9,7 +9,6 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { NSModal } from './NSModal';
|
|
11
11
|
import { NSLoading } from './NSLoading';
|
|
12
|
-
import { Checkbox } from 'antd';
|
|
13
12
|
|
|
14
13
|
export interface INSTableProps<RowType> extends IBaseComponentProps
|
|
15
14
|
{
|
|
@@ -148,9 +147,9 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
148
147
|
<table className={Styles.ns_table} >
|
|
149
148
|
<thead className={Styles.ns_thead}>
|
|
150
149
|
<tr>
|
|
151
|
-
<
|
|
152
|
-
onChange={() => { }}
|
|
153
|
-
|
|
150
|
+
<div className={Styles.ns_checkbox}>
|
|
151
|
+
<input id='checkbox' type='checkbox' onChange={() => { }}></input>
|
|
152
|
+
</div>
|
|
154
153
|
{column_keys.map(column_key => <th key={column_key} scope="col">
|
|
155
154
|
{this.state.columns[column_key]}
|
|
156
155
|
</th>)}
|