namirasoft-site-react 1.3.190 → 1.3.192
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 +3 -3
- package/dist/App.js.map +1 -1
- package/dist/CopyToClipboard.d.ts +3 -0
- package/dist/CopyToClipboard.js +7 -0
- package/dist/CopyToClipboard.js.map +1 -0
- package/dist/assets/images/icon-copy.png +0 -0
- package/dist/assets/images/icon-fullscreen.png +0 -0
- package/dist/components/NSActionMenu.js +2 -2
- package/dist/components/NSActionMenu.js.map +1 -1
- package/dist/components/NSBox.module.css +23 -7
- package/dist/components/NSBoxEmail.d.ts +3 -1
- package/dist/components/NSBoxEmail.js +11 -6
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxPhone.d.ts +2 -0
- package/dist/components/NSBoxPhone.js +9 -2
- package/dist/components/NSBoxPhone.js.map +1 -1
- package/dist/components/NSFooter.js +1 -1
- package/dist/components/NSFooter.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +5 -2
- package/src/CopyToClipboard.ts +7 -0
- package/src/assets/images/icon-copy.png +0 -0
- package/src/assets/images/icon-fullscreen.png +0 -0
- package/src/components/NSActionMenu.tsx +2 -4
- package/src/components/NSBox.module.css +23 -7
- package/src/components/NSBoxEmail.tsx +42 -13
- package/src/components/NSBoxPhone.tsx +33 -3
- package/src/components/NSFooter.tsx +8 -8
package/dist/App.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fragment as _Fragment,
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import './App.css';
|
|
3
3
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
4
|
-
import { NSLayout } from './main';
|
|
4
|
+
import { NSBoxEmail, NSBoxPhone, NSLayout } from './main';
|
|
5
5
|
export function App() {
|
|
6
6
|
const onClicked = () => {
|
|
7
7
|
console.log("clicked");
|
|
@@ -18,6 +18,6 @@ export function App() {
|
|
|
18
18
|
return (_jsx(_Fragment, { children: _jsx(NSLayout, { header: {
|
|
19
19
|
title: "any",
|
|
20
20
|
icons: icons
|
|
21
|
-
}, scope: "exampleScope", logo: "exampleLogoUrl", notifications: [], background: "", children:
|
|
21
|
+
}, scope: "exampleScope", logo: "exampleLogoUrl", notifications: [], background: "", children: _jsxs(_Fragment, { children: [_jsx(NSBoxEmail, { title: 'test', required: true }), _jsx(NSBoxPhone, { title: 'test', required: true })] }) }) }));
|
|
22
22
|
}
|
|
23
23
|
//# 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,QAAQ,EAAE,MAAM,QAAQ,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,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,UAAU,GAAG;IAGlB,MAAM,SAAS,GAAG,GAAG,EAAE;QAEtB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,IAAI,KAAK,GAAG;QACX,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE;QACrG,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;QAC3F,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;QAC3F,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;QAC3F,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;QAC3F,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;QAC3F,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;KAC3F,CAAC;IAEF,OAAO,CACN,4BACC,KAAC,QAAQ,IACR,MAAM,EAAE;gBACP,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,KAAK;aACZ,EACD,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,gBAAgB,EACrB,aAAa,EAAE,EAAE,EACjB,UAAU,EAAC,EAAE,YAEb,8BACA,KAAC,UAAU,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,GAAG,EACzC,KAAC,UAAU,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,GAAI,IACzC,GACO,GACT,CACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.js","sourceRoot":"","sources":["../src/CopyToClipboard.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,eAAe;IAEhC,MAAM,CAAC,eAAe,CAAC,KAAa;QAEhC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACJ;AAAA,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -23,7 +23,7 @@ export function NSActionMenu(props) {
|
|
|
23
23
|
if (props.items.length == 1)
|
|
24
24
|
return _jsx(NSButtonBlue, { title: props.items[0].menu_item, onClick: props.items[0].handler });
|
|
25
25
|
return (_jsxs("div", { className: Styles.ns_action_bar, ref: menuRef, children: [_jsxs("button", { onClick: () => setState((prevState) => (Object.assign(Object.assign({}, prevState), { isShow: !state.isShow }))), children: [props.name, _jsx("img", { className: Styles.ns_action_menu_icon, src: "https://static.namirasoft.com/image/concept/ellipsis/vertical-blue.png", alt: "Icon", width: 8, height: 24 })] }), _jsx("ul", { className: `${Styles.ns_action_item_holder} ${state.isShow ? Styles.ns_show : Styles.ns_hide}`, children: props.items.map((item) => _jsx("li", { onClick: item.handler, className: `${Styles.ns_action_item}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
${item.isActive() ? Styles.ns_active_item : Styles.ns_deActive_item}
|
|
27
|
+
`, children: item.menu_item }, item.id)) })] }));
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=NSActionMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSActionMenu.js","sourceRoot":"","sources":["../../src/components/NSActionMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAuB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,MAAM,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"NSActionMenu.js","sourceRoot":"","sources":["../../src/components/NSActionMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAuB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAa/C,MAAM,UAAU,YAAY,CAAC,KAAoD;IAEhF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB;QACtD,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE7C,SAAS,CAAC,GAAG,EAAE;QAEd,SAAS,kBAAkB,CAAC,KAAiB;YAE5C,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO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C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACxB,aAEC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,GAAG,MAAM,CAAC,cAAc;kCACR,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB;iCAClE,YAEzB,IAAI,CAAC,SAAS,IANV,IAAI,CAAC,EAAE,CAOR,CACL,GAEE,IACA,CACN,CAAC;AACH,CAAC"}
|
|
@@ -75,23 +75,39 @@
|
|
|
75
75
|
width: 272px !important;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
|
|
78
79
|
/*End Input phone*/
|
|
79
80
|
|
|
80
81
|
.ns_btn_box {
|
|
81
|
-
|
|
82
|
-
visibility: hidden;
|
|
83
|
-
background-color: #007bff;
|
|
84
|
-
color: white;
|
|
82
|
+
color: #000;
|
|
85
83
|
border: none;
|
|
86
|
-
padding: 4px 10px;
|
|
87
|
-
border-radius: 8px;
|
|
88
84
|
cursor: pointer;
|
|
89
85
|
width: max-content;
|
|
90
|
-
|
|
86
|
+
background-color: transparent;
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
.ns_input_parent:hover .ns_btn_box {
|
|
94
90
|
opacity: 1;
|
|
95
91
|
visibility: visible;
|
|
96
92
|
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ns_btn_box img {
|
|
96
|
+
position: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ns_full_screen {
|
|
100
|
+
position: fixed;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
background: #0101015c;
|
|
106
|
+
z-index: 1000;
|
|
107
|
+
padding: 5%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ns_full_screen input {
|
|
111
|
+
width: 100% !important;
|
|
112
|
+
max-width: 100%;
|
|
97
113
|
}
|
|
@@ -11,6 +11,7 @@ export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps,
|
|
|
11
11
|
export interface INSBoxEmailState {
|
|
12
12
|
value: string;
|
|
13
13
|
error?: string;
|
|
14
|
+
isFullScreen: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState> {
|
|
16
17
|
constructor(props: INSBoxEmailProps);
|
|
@@ -18,6 +19,7 @@ export declare class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBox
|
|
|
18
19
|
getValue(): string;
|
|
19
20
|
setValue(value: string): void;
|
|
20
21
|
private onChanged;
|
|
21
|
-
private
|
|
22
|
+
private toggleFullScreen;
|
|
22
23
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
}
|
|
25
|
+
export default NSBoxEmail;
|
|
@@ -3,17 +3,20 @@ 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';
|
|
6
8
|
import { Validator } from "../Validator";
|
|
7
9
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
8
11
|
export class NSBoxEmail extends React.Component {
|
|
9
12
|
constructor(props) {
|
|
10
13
|
var _a;
|
|
11
14
|
super(props);
|
|
12
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
15
|
+
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "", isFullScreen: false };
|
|
13
16
|
this.setValue = this.setValue.bind(this);
|
|
14
17
|
this.getValue = this.getValue.bind(this);
|
|
15
18
|
this.onChanged = this.onChanged.bind(this);
|
|
16
|
-
this.
|
|
19
|
+
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
17
20
|
}
|
|
18
21
|
getError() {
|
|
19
22
|
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
@@ -33,15 +36,17 @@ export class NSBoxEmail extends React.Component {
|
|
|
33
36
|
}
|
|
34
37
|
onChanged(e) {
|
|
35
38
|
this.setValue(e.target.value);
|
|
36
|
-
if (this.props.onChanged)
|
|
39
|
+
if (this.props.onChanged) {
|
|
37
40
|
this.props.onChanged(e);
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
toggleFullScreen() {
|
|
44
|
+
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
41
45
|
}
|
|
42
46
|
render() {
|
|
43
47
|
var _a;
|
|
44
|
-
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-
|
|
48
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { 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] }), _jsxs("div", { className: "d-flex gap-1", children: [_jsx("button", { className: Styles.ns_btn_box, onClick: () => CopyToClipboard.copyToClipboard(this.getValue()), children: _jsx("img", { src: IconCopy, alt: "Copy", width: 14, height: 14 }) }), _jsx("button", { className: Styles.ns_btn_box, onClick: this.toggleFullScreen, children: _jsx("img", { src: IconFullScreen, alt: "FullScreen", width: 14, height: 14 }) })] })] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputEmail, alt: "Email Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "email", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
|
|
45
49
|
}
|
|
46
50
|
}
|
|
51
|
+
export default NSBoxEmail;
|
|
47
52
|
//# sourceMappingURL=NSBoxEmail.js.map
|
|
@@ -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,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
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,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,cAAc,MAAM,sCAAsC,CAAC;AAClE,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAiBjD,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA6C;IAClF,YAAY,KAAuB;;QAElC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,E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AC,gBAAgB,YACnE,cACC,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,GACM,IACJ,IACD,EACN,cACC,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,EACF,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,GAClC,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -12,11 +12,13 @@ export interface INSBoxPhoneProps extends IBaseComponentProps, IValidationProps,
|
|
|
12
12
|
export interface INSBoxPhoneState {
|
|
13
13
|
value: string;
|
|
14
14
|
error?: string;
|
|
15
|
+
isFullScreen: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneState> {
|
|
17
18
|
constructor(props: INSBoxPhoneProps);
|
|
18
19
|
getError(): string | null;
|
|
19
20
|
getValue(): string;
|
|
20
21
|
setValue(value: string): void;
|
|
22
|
+
private toggleFullScreen;
|
|
21
23
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
}
|
|
@@ -3,17 +3,21 @@ 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 IconInputPhone from '../assets/images/icon-input-phone.svg';
|
|
6
|
+
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
+
import IconCopy from '../assets/images/icon-copy.png';
|
|
6
8
|
import PhoneInput from 'react-phone-input-2';
|
|
7
9
|
import 'react-phone-input-2/lib/style.css';
|
|
8
10
|
import { Validator } from "../Validator";
|
|
9
11
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
12
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
10
13
|
export class NSBoxPhone extends React.Component {
|
|
11
14
|
constructor(props) {
|
|
12
15
|
var _a;
|
|
13
16
|
super(props);
|
|
14
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
17
|
+
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "", isFullScreen: false };
|
|
15
18
|
this.setValue = this.setValue.bind(this);
|
|
16
19
|
this.getValue = this.getValue.bind(this);
|
|
20
|
+
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
17
21
|
}
|
|
18
22
|
getError() {
|
|
19
23
|
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
@@ -30,9 +34,12 @@ export class NSBoxPhone extends React.Component {
|
|
|
30
34
|
setValue(value) {
|
|
31
35
|
this.setState({ value });
|
|
32
36
|
}
|
|
37
|
+
toggleFullScreen() {
|
|
38
|
+
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
39
|
+
}
|
|
33
40
|
render() {
|
|
34
41
|
var _a;
|
|
35
|
-
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(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputPhone, alt: "Phone Icon", width: 24, height: 24 }), _jsx(PhoneInput, { value: this.state.value, onChange: this.setValue, country: 'us', inputClass: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
|
|
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: [_jsxs("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, " "] }), _jsxs("div", { className: "d-flex gap-1", children: [_jsx("button", { className: Styles.ns_btn_box, onClick: () => CopyToClipboard.copyToClipboard(this.getValue()), children: _jsx("img", { src: IconCopy, alt: "Copy", width: 14, height: 14 }) }), _jsx("button", { className: Styles.ns_btn_box, onClick: this.toggleFullScreen, children: _jsx("img", { src: IconFullScreen, alt: "FullScreen", width: 14, height: 14 }) })] })] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputPhone, alt: "Phone Icon", width: 24, height: 24 }), _jsx(PhoneInput, { value: this.state.value, onChange: this.setValue, country: 'us', inputClass: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
//# sourceMappingURL=NSBoxPhone.js.map
|
|
@@ -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,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,UAAU,M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AC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,eAAK,SAAS,EAAC,cAAc,aAC5B,iBAAQ,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,YACpG,cACC,GAAG,EAAE,QAAQ,EACb,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,GACM,EACT,iBAAQ,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,YACnE,cACC,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,GACM,IACJ,IACD,EACN,cACC,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,EACF,KAAC,UAAU,IACV,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,EACb,UAAU,EAAE,MAAM,CAAC,QAAQ,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAClC,IACI,EACP,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -25,7 +25,7 @@ export class NSFooter extends React.Component {
|
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
27
|
var _a;
|
|
28
|
-
return (_jsx("footer", { id: this.props.id, className: `${Styles.ns_footer} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: _jsxs("div", { className: `container ${Styles.ns_package_footer}`, children: [_jsxs("div", { className: `${Styles.ns_footer_parent_items}`, children: [_jsx("div", { className: `${Styles.ns_footer_project_logo_tablet}`, children: _jsx("a", { href: "/", children: _jsx("img", { src: this.props.logo, alt: 'Logo', width: 80, height: 80 }) }) }), _jsx("div", { className: `${Styles.ns_footer_menu_container}`, children: this.render_menu(0, null) }), _jsxs("div", { className: `${Styles.ns_footer_namira_logo_tablet}`, children: [_jsxs("div", { className: "d-flex flex-row gap-3", children: [_jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/site/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) }), _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/account/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) })] }), _jsxs("div", { className: "d-flex flex-row gap-1 w-100 justify-content-center align-items-center", children: [_jsx("a", { children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/linkedin/white.svg", alt: "", width: 24, height: 24 }) }), _jsx("a", { children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/instagram/white.svg", alt: "", width: 24, height: 24 }) }), _jsx("a", { children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/email/white.svg", alt: "", width: 24, height: 24 }) }), _jsx("a", { children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/location/white.svg", alt: "", width: 24, height: 24 }) })] })] })] }), _jsx("div", { className: `${Styles.ns_footer_logos_mobile}`, children: _jsxs("div", { className: "d-flex flex-column gap-4", children: [_jsxs("div", { className: "d-flex flex-row gap-3", children: [_jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/site/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) }), _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/account/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) })] }), _jsxs("div", { className: "d-flex flex-row gap-1 w-100 justify-content-center align-items-center", children: [_jsx("a", { children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/linkedin/white.svg", alt: "
|
|
28
|
+
return (_jsx("footer", { id: this.props.id, className: `${Styles.ns_footer} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: _jsxs("div", { className: `container ${Styles.ns_package_footer}`, children: [_jsxs("div", { className: `${Styles.ns_footer_parent_items}`, children: [_jsx("div", { className: `${Styles.ns_footer_project_logo_tablet}`, children: _jsx("a", { href: "/", children: _jsx("img", { src: this.props.logo, alt: 'Logo', width: 80, height: 80 }) }) }), _jsx("div", { className: `${Styles.ns_footer_menu_container}`, children: this.render_menu(0, null) }), _jsxs("div", { className: `${Styles.ns_footer_namira_logo_tablet}`, children: [_jsxs("div", { className: "d-flex flex-row gap-3", children: [_jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/site/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) }), _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/account/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) })] }), _jsxs("div", { className: "d-flex flex-row gap-1 w-100 justify-content-center align-items-center", children: [_jsx("a", { style: { cursor: "pointer" }, href: "https://ca.linkedin.com/company/namira-software-corporation", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/linkedin/white.svg", alt: "Communicate with Namirasoft Via LinkedIn", width: 24, height: 24 }) }), _jsx("a", { href: "https://instagram.com/namira.software.corporation?igshid=MzRlODBiNWFlZA==", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/instagram/white.svg", alt: "Communicate with Namirasoft Via Instagram", width: 24, height: 24 }) }), _jsx("a", { href: "support@namirasoft.com", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/email/white.svg", alt: "Communicate with Namirasoft Via Email", width: 24, height: 24 }) }), _jsx("a", { href: "https://www.google.com/maps/place//@49.2781041,-123.1354814,14z/data=!4m2!3m1!1s0x0:0x18f70365c7a2f0fa?entry=s&sa=X", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/location/white.svg", alt: "Communicate with Namirasoft in Person", width: 24, height: 24 }) })] })] })] }), _jsx("div", { className: `${Styles.ns_footer_logos_mobile}`, children: _jsxs("div", { className: "d-flex flex-column gap-4", children: [_jsxs("div", { className: "d-flex flex-row gap-3", children: [_jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/site/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) }), _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/image/namirasoft/account/logo/circle.png", alt: 'Namira Software Corporation Logo', width: 48, height: 48 }) })] }), _jsxs("div", { className: "d-flex flex-row gap-1 w-100 justify-content-center align-items-center", children: [_jsx("a", { href: "https://ca.linkedin.com/company/namira-software-corporation", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/linkedin/white.svg", alt: "Communicate with Namirasoft Via LinkedIn", width: 24, height: 24 }) }), _jsx("a", { href: "https://instagram.com/namira.software.corporation?igshid=MzRlODBiNWFlZA==", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/instagram/white.svg", alt: "Communicate with Namirasoft Via Instagram", width: 24, height: 24 }) }), _jsx("a", { href: "support@namirasoft.com", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/email/white.svg", alt: "Communicate with Namirasoft Via Email", width: 24, height: 24 }) }), _jsx("a", { href: "https://www.google.com/maps/place//@49.2781041,-123.1354814,14z/data=!4m2!3m1!1s0x0:0x18f70365c7a2f0fa?entry=s&sa=X", children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/social/location/white.svg", alt: "Communicate with Namirasoft in Person", width: 24, height: 24 }) })] })] }) }), _jsxs("div", { className: `${Styles.ns_footer_copyright}`, children: [_jsxs("span", { children: [" \u00A9Copyright 2010 - ", new Date().getFullYear(), " "] }), " ", _jsx("a", { href: "https://namirasoft.com/", target: "_blank", rel: "noopener noreferrer", children: " Namira Software Corporation" }), ". ", " ", _jsx("span", { children: " All rights reserved. " })] })] }) }));
|
|
29
29
|
}
|
|
30
30
|
render_menu(level, parent_id) {
|
|
31
31
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFooter.js","sourceRoot":"","sources":["../../src/components/NSFooter.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAqB,MAAM,qBAAqB,CAAC;AAgBjF,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAwC;IAExE,YAAY,KAAqB;QAE7B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IACQ,iBAAiB;QAEtB,IAAI,MAAM,GAAG,IAAI,uBAAuB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,OA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L,CAAC;CACJ"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import { NSLayout } from './main';
|
|
3
|
+
import { NSBoxEmail, NSBoxPhone, NSLayout } from './main';
|
|
4
4
|
|
|
5
5
|
export function App()
|
|
6
6
|
{
|
|
@@ -32,7 +32,10 @@ export function App()
|
|
|
32
32
|
notifications={[]}
|
|
33
33
|
background=""
|
|
34
34
|
>
|
|
35
|
-
|
|
35
|
+
<>
|
|
36
|
+
<NSBoxEmail title='test' required={true}/>
|
|
37
|
+
<NSBoxPhone title='test' required={true} />
|
|
38
|
+
</>
|
|
36
39
|
</NSLayout>
|
|
37
40
|
</>
|
|
38
41
|
);
|
|
Binary file
|
|
Binary file
|
|
@@ -9,12 +9,10 @@ export interface INSActionMenuProps extends IBaseComponentProps
|
|
|
9
9
|
handler: () => void;
|
|
10
10
|
isActive: () => boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
12
|
export interface INSActionMenuState
|
|
14
13
|
{
|
|
15
14
|
isShow: boolean;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
export function NSActionMenu(props: { name: string, items: INSActionMenuProps[] })
|
|
19
17
|
{
|
|
20
18
|
const [state, setState] = useState<INSActionMenuState>({
|
|
@@ -68,8 +66,8 @@ export function NSActionMenu(props: { name: string, items: INSActionMenuProps[]
|
|
|
68
66
|
key={item.id}
|
|
69
67
|
onClick={item.handler}
|
|
70
68
|
className={`${Styles.ns_action_item}
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
${item.isActive() ? Styles.ns_active_item : Styles.ns_deActive_item}
|
|
70
|
+
`}
|
|
73
71
|
>
|
|
74
72
|
{item.menu_item}
|
|
75
73
|
</li>
|
|
@@ -75,23 +75,39 @@
|
|
|
75
75
|
width: 272px !important;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
|
|
78
79
|
/*End Input phone*/
|
|
79
80
|
|
|
80
81
|
.ns_btn_box {
|
|
81
|
-
|
|
82
|
-
visibility: hidden;
|
|
83
|
-
background-color: #007bff;
|
|
84
|
-
color: white;
|
|
82
|
+
color: #000;
|
|
85
83
|
border: none;
|
|
86
|
-
padding: 4px 10px;
|
|
87
|
-
border-radius: 8px;
|
|
88
84
|
cursor: pointer;
|
|
89
85
|
width: max-content;
|
|
90
|
-
|
|
86
|
+
background-color: transparent;
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
.ns_input_parent:hover .ns_btn_box {
|
|
94
90
|
opacity: 1;
|
|
95
91
|
visibility: visible;
|
|
96
92
|
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ns_btn_box img {
|
|
96
|
+
position: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ns_full_screen {
|
|
100
|
+
position: fixed;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
background: #0101015c;
|
|
106
|
+
z-index: 1000;
|
|
107
|
+
padding: 5%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ns_full_screen input {
|
|
111
|
+
width: 100% !important;
|
|
112
|
+
max-width: 100%;
|
|
97
113
|
}
|
|
@@ -3,11 +3,14 @@
|
|
|
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';
|
|
6
8
|
import { Validator } from "../Validator";
|
|
7
9
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
10
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
9
11
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
10
12
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
13
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
11
14
|
|
|
12
15
|
export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
13
16
|
{
|
|
@@ -21,19 +24,20 @@ export interface INSBoxEmailState
|
|
|
21
24
|
{
|
|
22
25
|
value: string;
|
|
23
26
|
error?: string;
|
|
27
|
+
isFullScreen: boolean;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState>
|
|
27
|
-
{
|
|
30
|
+
export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState> {
|
|
28
31
|
constructor(props: INSBoxEmailProps)
|
|
29
32
|
{
|
|
30
33
|
super(props);
|
|
31
|
-
this.state = { value: props.defaultValue ?? "" };
|
|
34
|
+
this.state = { value: props.defaultValue ?? "", isFullScreen: false };
|
|
32
35
|
this.setValue = this.setValue.bind(this);
|
|
33
36
|
this.getValue = this.getValue.bind(this);
|
|
34
37
|
this.onChanged = this.onChanged.bind(this);
|
|
35
|
-
this.
|
|
38
|
+
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
getError(): string | null
|
|
38
42
|
{
|
|
39
43
|
return (
|
|
@@ -42,6 +46,7 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
42
46
|
Validator.getErrorEmail(this.props.title, this.state.value)
|
|
43
47
|
);
|
|
44
48
|
}
|
|
49
|
+
|
|
45
50
|
getValue(): string
|
|
46
51
|
{
|
|
47
52
|
let error = this.getError();
|
|
@@ -52,30 +57,52 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
52
57
|
}
|
|
53
58
|
return this.state.value;
|
|
54
59
|
}
|
|
60
|
+
|
|
55
61
|
setValue(value: string): void
|
|
56
62
|
{
|
|
57
63
|
this.setState({ value });
|
|
58
64
|
}
|
|
65
|
+
|
|
59
66
|
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
60
67
|
{
|
|
61
68
|
this.setValue(e.target.value);
|
|
62
69
|
if (this.props.onChanged)
|
|
70
|
+
{
|
|
63
71
|
this.props.onChanged(e);
|
|
72
|
+
}
|
|
64
73
|
}
|
|
65
|
-
|
|
74
|
+
|
|
75
|
+
private toggleFullScreen(): void
|
|
66
76
|
{
|
|
67
|
-
|
|
77
|
+
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
68
78
|
}
|
|
79
|
+
|
|
69
80
|
override render()
|
|
70
81
|
{
|
|
71
82
|
return (
|
|
72
83
|
<>
|
|
73
|
-
<div className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
74
|
-
<div className="d-flex justify-content-between align-
|
|
75
|
-
<span className={Styles.ns_input_title}>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
<div className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`} style={this.props.style}>
|
|
85
|
+
<div className="d-flex justify-content-between align-items-center">
|
|
86
|
+
<span className={Styles.ns_input_title}>
|
|
87
|
+
{this.props.required && <span style={{ color: "red" }}>*</span>} {this.props.title}
|
|
88
|
+
</span>
|
|
89
|
+
<div className="d-flex gap-1">
|
|
90
|
+
<button className={Styles.ns_btn_box} onClick={() => CopyToClipboard.copyToClipboard(this.getValue())}>
|
|
91
|
+
<img
|
|
92
|
+
src={IconCopy}
|
|
93
|
+
alt="Copy"
|
|
94
|
+
width={14}
|
|
95
|
+
height={14}
|
|
96
|
+
/>
|
|
97
|
+
</button>
|
|
98
|
+
<button className={Styles.ns_btn_box} onClick={this.toggleFullScreen}>
|
|
99
|
+
<img
|
|
100
|
+
src={IconFullScreen}
|
|
101
|
+
alt="FullScreen"
|
|
102
|
+
width={14}
|
|
103
|
+
height={14}
|
|
104
|
+
/>
|
|
105
|
+
</button>
|
|
79
106
|
</div>
|
|
80
107
|
</div>
|
|
81
108
|
<img
|
|
@@ -98,4 +125,6 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
98
125
|
</>
|
|
99
126
|
);
|
|
100
127
|
}
|
|
101
|
-
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export default NSBoxEmail;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
5
|
import IconInputPhone from '../assets/images/icon-input-phone.svg';
|
|
6
|
+
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
7
|
+
import IconCopy from '../assets/images/icon-copy.png';
|
|
6
8
|
import PhoneInput from 'react-phone-input-2'
|
|
7
9
|
import 'react-phone-input-2/lib/style.css'
|
|
8
10
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
@@ -10,6 +12,7 @@ import { IValidationProps } from "../props/IValidationProps";
|
|
|
10
12
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
11
13
|
import { Validator } from "../Validator";
|
|
12
14
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
15
|
+
import CopyToClipboard from '../CopyToClipboard';
|
|
13
16
|
|
|
14
17
|
export interface INSBoxPhoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
15
18
|
{
|
|
@@ -23,6 +26,7 @@ export interface INSBoxPhoneState
|
|
|
23
26
|
{
|
|
24
27
|
value: string;
|
|
25
28
|
error?: string;
|
|
29
|
+
isFullScreen: boolean;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
export class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneState>
|
|
@@ -30,9 +34,10 @@ export class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneSta
|
|
|
30
34
|
constructor(props: INSBoxPhoneProps)
|
|
31
35
|
{
|
|
32
36
|
super(props);
|
|
33
|
-
this.state = { value: props.defaultValue ?? "" };
|
|
37
|
+
this.state = { value: props.defaultValue ?? "", isFullScreen: false };
|
|
34
38
|
this.setValue = this.setValue.bind(this);
|
|
35
39
|
this.getValue = this.getValue.bind(this);
|
|
40
|
+
this.toggleFullScreen = this.toggleFullScreen.bind(this);
|
|
36
41
|
}
|
|
37
42
|
getError(): string | null
|
|
38
43
|
{
|
|
@@ -55,12 +60,37 @@ export class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneSta
|
|
|
55
60
|
{
|
|
56
61
|
this.setState({ value });
|
|
57
62
|
}
|
|
63
|
+
private toggleFullScreen(): void
|
|
64
|
+
{
|
|
65
|
+
this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
|
|
66
|
+
}
|
|
58
67
|
override render()
|
|
59
68
|
{
|
|
60
69
|
return (
|
|
61
70
|
<>
|
|
62
|
-
<div id={this.props.id} className={`${Styles.ns_input_phone_parent} ${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
63
|
-
|
|
71
|
+
<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}>
|
|
72
|
+
|
|
73
|
+
<div className="d-flex justify-content-between align-item-center">
|
|
74
|
+
<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
|
+
</div>
|
|
64
94
|
<img
|
|
65
95
|
className={Styles.ns_input_icon}
|
|
66
96
|
src={IconInputPhone}
|
|
@@ -66,10 +66,10 @@ export class NSFooter extends React.Component<INSFooterProps, NSFooterState>
|
|
|
66
66
|
<a href="/"><img src="https://static.namirasoft.com/image/namirasoft/account/logo/circle.png" alt='Namira Software Corporation Logo' width={48} height={48} /></a>
|
|
67
67
|
</div>
|
|
68
68
|
<div className="d-flex flex-row gap-1 w-100 justify-content-center align-items-center">
|
|
69
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/linkedin/white.svg" alt="" width={24} height={24} /></a>
|
|
70
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/instagram/white.svg" alt="" width={24} height={24} /></a>
|
|
71
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/email/white.svg" alt="" width={24} height={24} /></a>
|
|
72
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/location/white.svg" alt="" width={24} height={24} /></a>
|
|
69
|
+
<a style={{ cursor: "pointer" }} href="https://ca.linkedin.com/company/namira-software-corporation"><img src="https://static.namirasoft.com/image/concept/social/linkedin/white.svg" alt="Communicate with Namirasoft Via LinkedIn" width={24} height={24} /></a>
|
|
70
|
+
<a href="https://instagram.com/namira.software.corporation?igshid=MzRlODBiNWFlZA=="><img src="https://static.namirasoft.com/image/concept/social/instagram/white.svg" alt="Communicate with Namirasoft Via Instagram" width={24} height={24} /></a>
|
|
71
|
+
<a href="support@namirasoft.com"><img src="https://static.namirasoft.com/image/concept/social/email/white.svg" alt="Communicate with Namirasoft Via Email" width={24} height={24} /></a>
|
|
72
|
+
<a href="https://www.google.com/maps/place//@49.2781041,-123.1354814,14z/data=!4m2!3m1!1s0x0:0x18f70365c7a2f0fa?entry=s&sa=X"><img src="https://static.namirasoft.com/image/concept/social/location/white.svg" alt="Communicate with Namirasoft in Person" width={24} height={24} /></a>
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -80,10 +80,10 @@ export class NSFooter extends React.Component<INSFooterProps, NSFooterState>
|
|
|
80
80
|
<a href="/"><img src="https://static.namirasoft.com/image/namirasoft/account/logo/circle.png" alt='Namira Software Corporation Logo' width={48} height={48} /></a>
|
|
81
81
|
</div>
|
|
82
82
|
<div className="d-flex flex-row gap-1 w-100 justify-content-center align-items-center">
|
|
83
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/linkedin/white.svg" alt="
|
|
84
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/instagram/white.svg" alt="
|
|
85
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/email/white.svg" alt="
|
|
86
|
-
<a><img src="https://static.namirasoft.com/image/concept/social/location/white.svg" alt="
|
|
83
|
+
<a href="https://ca.linkedin.com/company/namira-software-corporation"><img src="https://static.namirasoft.com/image/concept/social/linkedin/white.svg" alt="Communicate with Namirasoft Via LinkedIn" width={24} height={24} /></a>
|
|
84
|
+
<a href="https://instagram.com/namira.software.corporation?igshid=MzRlODBiNWFlZA=="><img src="https://static.namirasoft.com/image/concept/social/instagram/white.svg" alt="Communicate with Namirasoft Via Instagram" width={24} height={24} /></a>
|
|
85
|
+
<a href="support@namirasoft.com"><img src="https://static.namirasoft.com/image/concept/social/email/white.svg" alt="Communicate with Namirasoft Via Email" width={24} height={24} /></a>
|
|
86
|
+
<a href="https://www.google.com/maps/place//@49.2781041,-123.1354814,14z/data=!4m2!3m1!1s0x0:0x18f70365c7a2f0fa?entry=s&sa=X"><img src="https://static.namirasoft.com/image/concept/social/location/white.svg" alt="Communicate with Namirasoft in Person" width={24} height={24} /></a>
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|