namirasoft-site-react 1.3.273 → 1.3.274
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/components/NSAssistantButton.d.ts +2 -2
- package/dist/components/NSAssistantButton.js +10 -3
- package/dist/components/NSAssistantButton.js.map +1 -1
- package/dist/components/NSAssistantButton.module.css +0 -1
- package/dist/components/NSBoxEmail.js +2 -7
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxPhone.js +1 -4
- package/dist/components/NSBoxPhone.js.map +1 -1
- package/dist/components/NSBoxString.js +2 -4
- package/dist/components/NSBoxString.js.map +1 -1
- package/dist/components/NSBoxTextArea.js +1 -4
- package/dist/components/NSBoxTextArea.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NSAssistantButton.module.css +0 -1
- package/src/components/NSAssistantButton.tsx +24 -25
- package/src/components/NSBoxEmail.tsx +2 -46
- package/src/components/NSBoxPhone.tsx +0 -21
- package/src/components/NSBoxString.tsx +2 -39
- package/src/components/NSBoxTextArea.tsx +0 -21
- package/tsconfig.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface INSAssistantProps {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
value: string;
|
|
3
|
+
setValue: (value: string) => void;
|
|
4
4
|
}
|
|
5
5
|
declare function NSAssistantButton(props: INSAssistantProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default NSAssistantButton;
|
|
@@ -3,11 +3,18 @@ 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
5
|
import { useState } from 'react';
|
|
6
|
-
import
|
|
6
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
7
7
|
function NSAssistantButton(props) {
|
|
8
8
|
let [fullscreen, setFullscreen] = useState(false);
|
|
9
|
-
let [
|
|
10
|
-
|
|
9
|
+
let [value, setValue] = useState(props.value);
|
|
10
|
+
const handleClose = () => {
|
|
11
|
+
setFullscreen(!fullscreen);
|
|
12
|
+
props.setValue(value);
|
|
13
|
+
};
|
|
14
|
+
const onChanged = (e) => {
|
|
15
|
+
setValue(e.target.value);
|
|
16
|
+
};
|
|
17
|
+
return (_jsx("div", { className: Styles.ns_container, children: _jsxs("div", { className: Styles.ns_input_parent, children: [_jsx("div", { className: Styles.ns_input_title_group, children: _jsxs("div", { children: [_jsx("button", { className: Styles.ns_btn_box, onClick: () => CopyToClipboard.copyToClipboard(props.value), 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: handleClose }) }), _jsx("div", { className: Styles.ns_input_modal_full, onClick: () => { } }), _jsx("textarea", { defaultValue: props.value, onChange: onChanged })] })] }) }));
|
|
11
18
|
}
|
|
12
19
|
export default NSAssistantButton;
|
|
13
20
|
//# 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;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"NSAssistantButton.js","sourceRoot":"","sources":["../../src/components/NSAss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AC/E,cACI,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACZ,GACG,IACP,GACJ,EACN,eAAK,SAAS,EAAE,MAAM,CAAC,0BAA0B,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,aAC1G,cAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,YACtC,cACI,SAAS,EAAE,MAAM,CAAC,mBAAmB,EACrC,GAAG,EAAC,4DAA4D,EAChE,GAAG,EAAC,cAAc,EAClB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,WAAW,GACtB,GACA,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAQ,EACtE,mBACI,YAAY,EAAE,KAAK,CAAC,KAAK,EACzB,QAAQ,EAAE,SAAS,GAEZ,IACT,IACJ,GACJ,CACT,CAAC;AACN,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -3,11 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
5
|
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
8
6
|
import { Validator } from "../Validator";
|
|
9
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
|
-
import
|
|
8
|
+
import NSAssistantButton from "./NSAssistantButton";
|
|
11
9
|
export class NSBoxEmail extends React.Component {
|
|
12
10
|
constructor(props) {
|
|
13
11
|
var _a;
|
|
@@ -27,9 +25,6 @@ export class NSBoxEmail extends React.Component {
|
|
|
27
25
|
let error = this.getError();
|
|
28
26
|
if (error) {
|
|
29
27
|
this.setState({ error });
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
this.setState({ error: "" });
|
|
32
|
-
}, 7000);
|
|
33
28
|
throw new Error(error);
|
|
34
29
|
}
|
|
35
30
|
return this.state.value;
|
|
@@ -48,7 +43,7 @@ export class NSBoxEmail extends React.Component {
|
|
|
48
43
|
}
|
|
49
44
|
render() {
|
|
50
45
|
var _a;
|
|
51
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [_jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }),
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [_jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }), _jsx(NSAssistantButton, { value: this.state.value, setValue: this.setValue })] }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "email", className: Styles.ns_input, placeholder: this.props.placeholder, style: { background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
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,OA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EAAE,MAAM,CAAC,cAAc,aACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAU,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,IAC5E,EACP,KAAC,iBAAiB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,IAClE,EACN,gBACC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,cAAc,4CAA4C,EAAE,GACvF,IACG,EACN,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"}
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
6
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
7
5
|
import PhoneIcon from '../assets/images/icon-input-phone.svg';
|
|
8
6
|
import PhoneInput from 'react-phone-input-2';
|
|
9
7
|
import 'react-phone-input-2/lib/style.css';
|
|
10
8
|
import { Validator } from "../Validator";
|
|
11
9
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
12
|
-
import CopyToClipboard from '../CopyToClipboard';
|
|
13
10
|
export class NSBoxPhone extends React.Component {
|
|
14
11
|
constructor(props) {
|
|
15
12
|
var _a;
|
|
@@ -39,7 +36,7 @@ export class NSBoxPhone extends React.Component {
|
|
|
39
36
|
}
|
|
40
37
|
render() {
|
|
41
38
|
var _a;
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_phone_parent} ${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, children: [
|
|
39
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_phone_parent} ${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, children: [_jsx("div", { className: "d-flex justify-content-between align-item-center", children: _jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }) }), _jsx(PhoneInput, { value: this.state.value, onChange: this.setValue, country: 'us', inputClass: Styles.PhoneIconns_input, placeholder: this.props.placeholder, inputStyle: {
|
|
43
40
|
background: `url(${PhoneIcon}) white no-repeat scroll center right 16px`,
|
|
44
41
|
backgroundSize: "24px"
|
|
45
42
|
} })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxPhone.js","sourceRoot":"","sources":["../../src/components/NSBoxPhone.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,
|
|
1
|
+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AiB,EACpC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,UAAU,EAAE;gCACX,UAAU,EAAE,OAAO,SAAS,4CAA4C;gCACxE,cAAc,EAAE,MAAM;6BACtB,GACA,IACI,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"}
|
|
@@ -3,11 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
5
|
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
8
6
|
import { Validator } from "../Validator";
|
|
9
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
|
-
import
|
|
8
|
+
import NSAssistantButton from "./NSAssistantButton";
|
|
11
9
|
export class NSBoxString extends React.Component {
|
|
12
10
|
constructor(props) {
|
|
13
11
|
var _a;
|
|
@@ -44,7 +42,7 @@ export class NSBoxString extends React.Component {
|
|
|
44
42
|
}
|
|
45
43
|
render() {
|
|
46
44
|
var _a;
|
|
47
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, children: [_jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [_jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }),
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, children: [_jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [_jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }), _jsx(NSAssistantButton, { value: this.state.value, setValue: this.setValue })] }), _jsx("input", { type: "text", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, style: { background: `url(${IconInputString}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
//# sourceMappingURL=NSBoxString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxString.js","sourceRoot":"","sources":["../../src/components/NSBoxString.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,eAAe,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxString.js","sourceRoot":"","sources":["../../src/components/NSBoxString.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAIrE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAkBpD,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA+C;I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AE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,eAAe,4CAA4C,EAAE,GACxF,IACG,EACN,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"}
|
|
@@ -14,9 +14,6 @@ import Styles from "./NSBoxTextArea.module.css";
|
|
|
14
14
|
import { Validator } from "../Validator";
|
|
15
15
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
16
16
|
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
17
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
18
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
19
|
-
import CopyToClipboard from '../CopyToClipboard';
|
|
20
17
|
export class NSBoxTextArea extends React.Component {
|
|
21
18
|
constructor(props) {
|
|
22
19
|
var _a;
|
|
@@ -53,7 +50,7 @@ export class NSBoxTextArea extends React.Component {
|
|
|
53
50
|
}
|
|
54
51
|
render() {
|
|
55
52
|
var _a;
|
|
56
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_text_area_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, onClick: this.state.isFullScreen ? () => { } : () => { }, children: [
|
|
53
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_text_area_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`, style: this.props.style, onClick: this.state.isFullScreen ? () => { } : () => { }, children: [_jsx("div", { className: "d-flex justify-content-between align-items-center", children: _jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }) }), _jsx("div", { className: Styles.ns_text_area_container, children: _jsx("textarea", { style: {
|
|
57
54
|
height: !this.props.rows ? "96px" : "",
|
|
58
55
|
background: `url(${IconInputString}) white no-repeat scroll top right 16px `,
|
|
59
56
|
backgroundPositionY: "12px"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxTextArea.js","sourceRoot":"","sources":["../../src/components/NSBoxTextArea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAIhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,eAAe,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxTextArea.js","sourceRoot":"","sources":["../../src/components/NSBoxTextArea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAIhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAoBrE,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAmD;IAE3F,YAAY,KAA0B;;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QAiCN,cAAS,GAAG,CAAO,CAAyC,EAAiB,EAAE;YAEtF,MAAM,IAAI,CAAC,QA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,EACD,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAClC,GACG,IACD,EACN,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"}
|
package/package.json
CHANGED
|
@@ -2,28 +2,36 @@ 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
|
|
5
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
6
|
+
|
|
6
7
|
export interface INSAssistantProps
|
|
7
8
|
{
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
value: string;
|
|
10
|
+
setValue: (value: string) => void;
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
function NSAssistantButton(props: INSAssistantProps)
|
|
12
14
|
{
|
|
13
15
|
let [fullscreen, setFullscreen] = useState(false);
|
|
14
|
-
let [
|
|
15
|
-
|
|
16
|
+
let [value, setValue] = useState(props.value);
|
|
17
|
+
|
|
18
|
+
const handleClose = () =>
|
|
19
|
+
{
|
|
20
|
+
setFullscreen(!fullscreen);
|
|
21
|
+
props.setValue(value);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const onChanged = (e: React.ChangeEvent<HTMLTextAreaElement>) =>
|
|
25
|
+
{
|
|
26
|
+
setValue(e.target.value);
|
|
27
|
+
}
|
|
28
|
+
|
|
16
29
|
return (
|
|
17
30
|
<div className={Styles.ns_container}>
|
|
18
31
|
<div className={Styles.ns_input_parent}>
|
|
19
32
|
<div className={Styles.ns_input_title_group}>
|
|
20
33
|
<div>
|
|
21
|
-
{
|
|
22
|
-
</div>
|
|
23
|
-
<div>
|
|
24
|
-
<button className={Styles.ns_btn_box}
|
|
25
|
-
onClick={() => alert(10)}
|
|
26
|
-
>
|
|
34
|
+
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(props.value)}>
|
|
27
35
|
<img
|
|
28
36
|
src={IconCopy}
|
|
29
37
|
alt="Copy"
|
|
@@ -31,9 +39,7 @@ function NSAssistantButton(props: INSAssistantProps)
|
|
|
31
39
|
height={14}
|
|
32
40
|
/>
|
|
33
41
|
</button>
|
|
34
|
-
<button className={Styles.ns_btn_box}
|
|
35
|
-
onClick={() => { setFullscreen(!fullscreen) }}
|
|
36
|
-
>
|
|
42
|
+
<button className={Styles.ns_btn_box} onClick={() => { setFullscreen(!fullscreen) }}>
|
|
37
43
|
<img
|
|
38
44
|
src={IconFullScreen}
|
|
39
45
|
alt="FullScreen"
|
|
@@ -51,24 +57,17 @@ function NSAssistantButton(props: INSAssistantProps)
|
|
|
51
57
|
alt="Close Button"
|
|
52
58
|
width={24}
|
|
53
59
|
height={24}
|
|
54
|
-
onClick={
|
|
60
|
+
onClick={handleClose}
|
|
55
61
|
/>
|
|
56
62
|
</div>
|
|
57
63
|
<div className={Styles.ns_input_modal_full} onClick={() => { }}></div>
|
|
58
64
|
<textarea
|
|
59
|
-
|
|
65
|
+
defaultValue={props.value}
|
|
66
|
+
onChange={onChanged}
|
|
60
67
|
>
|
|
61
68
|
</textarea>
|
|
62
|
-
<div>
|
|
63
|
-
{state}
|
|
64
|
-
</div>
|
|
65
69
|
</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
|
-
/>
|
|
70
|
+
</div>
|
|
72
71
|
</div>
|
|
73
72
|
);
|
|
74
73
|
}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
5
|
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
8
6
|
import { Validator } from "../Validator";
|
|
9
7
|
import { IValidationProps } from "../props/IValidationProps";
|
|
10
8
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
11
9
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
12
10
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
13
|
-
import
|
|
11
|
+
import NSAssistantButton from "./NSAssistantButton";
|
|
14
12
|
|
|
15
13
|
export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
16
14
|
{
|
|
@@ -54,10 +52,6 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
54
52
|
if (error)
|
|
55
53
|
{
|
|
56
54
|
this.setState({ error });
|
|
57
|
-
setTimeout(() =>
|
|
58
|
-
{
|
|
59
|
-
this.setState({ error: "" });
|
|
60
|
-
}, 7000);
|
|
61
55
|
throw new Error(error);
|
|
62
56
|
}
|
|
63
57
|
return this.state.value;
|
|
@@ -90,26 +84,7 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
90
84
|
<span className={Styles.ns_input_title}>
|
|
91
85
|
{this.props.required && <span style={{ color: "red" }}>*</span>} {this.props.title}
|
|
92
86
|
</span>
|
|
93
|
-
<
|
|
94
|
-
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(this.getValue())}>
|
|
95
|
-
<img
|
|
96
|
-
src={IconCopy}
|
|
97
|
-
alt="Copy"
|
|
98
|
-
width={14}
|
|
99
|
-
height={14}
|
|
100
|
-
/>
|
|
101
|
-
</button>
|
|
102
|
-
<button className={Styles.ns_btn_box}
|
|
103
|
-
onClick={this.toggleFullScreen}
|
|
104
|
-
>
|
|
105
|
-
<img
|
|
106
|
-
src={IconFullScreen}
|
|
107
|
-
alt="FullScreen"
|
|
108
|
-
width={14}
|
|
109
|
-
height={14}
|
|
110
|
-
/>
|
|
111
|
-
</button>
|
|
112
|
-
</div>
|
|
87
|
+
<NSAssistantButton value={this.state.value} setValue={this.setValue} />
|
|
113
88
|
</div>
|
|
114
89
|
<input
|
|
115
90
|
id={this.props.id}
|
|
@@ -120,25 +95,6 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
120
95
|
placeholder={this.props.placeholder}
|
|
121
96
|
style={{ background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` }}
|
|
122
97
|
/>
|
|
123
|
-
<div className={Styles.ns_input_modal_full_screen} style={{ display: this.state.isFullScreen === false ? "none" : "block" }} >
|
|
124
|
-
<div>
|
|
125
|
-
<img
|
|
126
|
-
className={Styles.ns_modal_icon_close}
|
|
127
|
-
src="https://static.namirasoft.com/image/concept/close/info.svg"
|
|
128
|
-
alt="Close Button"
|
|
129
|
-
width={24}
|
|
130
|
-
height={24}
|
|
131
|
-
onClick={this.toggleFullScreen}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
<div className={Styles.ns_input_modal_full} onClick={this.toggleFullScreen}> </div>
|
|
135
|
-
<textarea
|
|
136
|
-
value={this.state.value}
|
|
137
|
-
onChange={(e) => this.setValue(e.target.value)}
|
|
138
|
-
>
|
|
139
|
-
|
|
140
|
-
</textarea>
|
|
141
|
-
</div>
|
|
142
98
|
</div>
|
|
143
99
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
144
100
|
</>
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
6
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
7
5
|
import PhoneIcon from '../assets/images/icon-input-phone.svg';
|
|
8
6
|
import PhoneInput from 'react-phone-input-2'
|
|
9
7
|
import 'react-phone-input-2/lib/style.css'
|
|
@@ -12,7 +10,6 @@ import { IValidationProps } from "../props/IValidationProps";
|
|
|
12
10
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
13
11
|
import { Validator } from "../Validator";
|
|
14
12
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
15
|
-
import CopyToClipboard from '../CopyToClipboard';
|
|
16
13
|
|
|
17
14
|
export interface INSBoxPhoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
18
15
|
{
|
|
@@ -72,24 +69,6 @@ export class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneSta
|
|
|
72
69
|
<div id={this.props.id} className={`${Styles.ns_input_phone_parent} ${Styles.ns_input_parent} ${this.props.classList?.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`} style={this.props.style}>
|
|
73
70
|
<div className="d-flex justify-content-between align-item-center">
|
|
74
71
|
<span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
|
|
75
|
-
<div className="d-flex gap-1">
|
|
76
|
-
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(this.getValue())}>
|
|
77
|
-
<img
|
|
78
|
-
src={IconCopy}
|
|
79
|
-
alt="Copy"
|
|
80
|
-
width={14}
|
|
81
|
-
height={14}
|
|
82
|
-
/>
|
|
83
|
-
</button>
|
|
84
|
-
<button className={Styles.ns_btn_box} onClick={this.toggleFullScreen}>
|
|
85
|
-
<img
|
|
86
|
-
src={IconFullScreen}
|
|
87
|
-
alt="FullScreen"
|
|
88
|
-
width={14}
|
|
89
|
-
height={14}
|
|
90
|
-
/>
|
|
91
|
-
</button>
|
|
92
|
-
</div>
|
|
93
72
|
</div>
|
|
94
73
|
<PhoneInput
|
|
95
74
|
value={this.state.value}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
5
|
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
8
6
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
9
7
|
import { IValidationProps } from "../props/IValidationProps";
|
|
10
8
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
11
9
|
import { Validator } from "../Validator";
|
|
12
10
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
13
|
-
import
|
|
11
|
+
import NSAssistantButton from "./NSAssistantButton";
|
|
14
12
|
|
|
15
13
|
export interface INSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
16
14
|
{
|
|
@@ -81,24 +79,7 @@ export class NSBoxString extends React.Component<INSBoxStringProps, INSBoxString
|
|
|
81
79
|
<span className={Styles.ns_input_title}>
|
|
82
80
|
{this.props.required && <span style={{ color: "red" }}>*</span>} {this.props.title}
|
|
83
81
|
</span>
|
|
84
|
-
<
|
|
85
|
-
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(this.getValue())}>
|
|
86
|
-
<img
|
|
87
|
-
src={IconCopy}
|
|
88
|
-
alt="Copy"
|
|
89
|
-
width={14}
|
|
90
|
-
height={14}
|
|
91
|
-
/>
|
|
92
|
-
</button>
|
|
93
|
-
<button className={Styles.ns_btn_box} onClick={this.toggleFullScreen}>
|
|
94
|
-
<img
|
|
95
|
-
src={IconFullScreen}
|
|
96
|
-
alt="FullScreen"
|
|
97
|
-
width={14}
|
|
98
|
-
height={14}
|
|
99
|
-
/>
|
|
100
|
-
</button>
|
|
101
|
-
</div>
|
|
82
|
+
<NSAssistantButton value={this.state.value} setValue={this.setValue} />
|
|
102
83
|
</div>
|
|
103
84
|
<input
|
|
104
85
|
type="text"
|
|
@@ -110,24 +91,6 @@ export class NSBoxString extends React.Component<INSBoxStringProps, INSBoxString
|
|
|
110
91
|
onClick={() => this.props.onClicked}
|
|
111
92
|
style={{ background: `url(${IconInputString}) white no-repeat scroll center right 16px` }}
|
|
112
93
|
/>
|
|
113
|
-
{/* Todo make a new component for fullscreen */}
|
|
114
|
-
<div className={Styles.ns_input_modal_full_screen} style={{ display: this.state.isFullScreen === false ? "none" : "block" }} >
|
|
115
|
-
<div>
|
|
116
|
-
<img
|
|
117
|
-
className={Styles.ns_modal_icon_close}
|
|
118
|
-
src="https://static.namirasoft.com/image/concept/close/info.svg"
|
|
119
|
-
alt="Close Button"
|
|
120
|
-
width={24}
|
|
121
|
-
height={24}
|
|
122
|
-
onClick={this.toggleFullScreen}
|
|
123
|
-
/>
|
|
124
|
-
</div>
|
|
125
|
-
<div className={Styles.ns_input_modal_full} onClick={this.toggleFullScreen}></div>
|
|
126
|
-
<textarea
|
|
127
|
-
value={this.state.value}
|
|
128
|
-
onChange={(e) => this.setValue(e.target.value)}
|
|
129
|
-
></textarea>
|
|
130
|
-
</div>
|
|
131
94
|
</div>
|
|
132
95
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
133
96
|
</>
|
|
@@ -8,9 +8,6 @@ import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
|
8
8
|
import { Validator } from "../Validator";
|
|
9
9
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
10
|
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
11
|
-
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
12
|
-
import IconCopy from '../assets/images/icon-copy.png';
|
|
13
|
-
import CopyToClipboard from '../CopyToClipboard';
|
|
14
11
|
|
|
15
12
|
export interface INSBoxTextAreaProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
16
13
|
{
|
|
@@ -84,24 +81,6 @@ export class NSBoxTextArea extends React.Component<INSBoxTextAreaProps, INSBoxTe
|
|
|
84
81
|
<span className={Styles.ns_input_title}>
|
|
85
82
|
{this.props.required && <span style={{ color: "red" }}>*</span>} {this.props.title}
|
|
86
83
|
</span>
|
|
87
|
-
<div className="d-flex gap-1">
|
|
88
|
-
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(this.getValue())}>
|
|
89
|
-
<img
|
|
90
|
-
src={IconCopy}
|
|
91
|
-
alt="Copy"
|
|
92
|
-
width={14}
|
|
93
|
-
height={14}
|
|
94
|
-
/>
|
|
95
|
-
</button>
|
|
96
|
-
<button className={Styles.ns_btn_box} onClick={this.toggleFullScreen}>
|
|
97
|
-
<img
|
|
98
|
-
src={IconFullScreen}
|
|
99
|
-
alt="FullScreen"
|
|
100
|
-
width={14}
|
|
101
|
-
height={14}
|
|
102
|
-
/>
|
|
103
|
-
</button>
|
|
104
|
-
</div>
|
|
105
84
|
</div>
|
|
106
85
|
<div className={Styles.ns_text_area_container}>
|
|
107
86
|
<textarea
|