namirasoft-site-react 1.2.0 → 1.2.2
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/.gitlab-ci.yml +1 -1
- package/dist/App.d.ts +4 -0
- package/dist/App.js +47 -0
- package/dist/App.js.map +1 -0
- package/dist/components/NSButtonGreen.d.ts +11 -0
- package/dist/components/NSButtonGreen.js +9 -0
- package/dist/components/NSButtonGreen.js.map +1 -0
- package/dist/components/NSButtonGreen.module.css +12 -0
- package/dist/components/NSButtonRed.d.ts +11 -0
- package/dist/components/NSButtonRed.js +9 -0
- package/dist/components/NSButtonRed.js.map +1 -0
- package/dist/components/NSButtonRed.module.css +12 -0
- package/dist/components/NSFooter.d.ts +19 -0
- package/dist/components/NSFooter.js +45 -0
- package/dist/components/NSFooter.js.map +1 -0
- package/dist/components/NSFooter.module.css +32 -0
- package/dist/components/NSHeader.d.ts +22 -0
- package/dist/components/NSHeader.js +63 -0
- package/dist/components/NSHeader.js.map +1 -0
- package/dist/components/NSHeader.module.css +127 -0
- package/dist/components/NSInputDate.d.ts +15 -0
- package/dist/components/NSInputDate.js +27 -0
- package/dist/components/NSInputDate.js.map +1 -0
- package/dist/components/NSInputDate.module.css +32 -0
- package/dist/components/NSInputDuration.d.ts +15 -0
- package/dist/components/NSInputDuration.js +28 -0
- package/dist/components/NSInputDuration.js.map +1 -0
- package/dist/components/NSInputDuration.module.css +26 -0
- package/dist/components/NSInputEmail.d.ts +16 -0
- package/dist/components/NSInputEmail.js +36 -0
- package/dist/components/NSInputEmail.js.map +1 -0
- package/dist/components/NSInputEmail.module.css +38 -0
- package/dist/components/NSInputFloat.d.ts +15 -0
- package/dist/components/NSInputFloat.js +28 -0
- package/dist/components/NSInputFloat.js.map +1 -0
- package/dist/components/NSInputFloat.module.css +23 -0
- package/dist/components/NSInputIP.d.ts +15 -0
- package/dist/components/NSInputIP.js +28 -0
- package/dist/components/NSInputIP.js.map +1 -0
- package/dist/components/NSInputIP.module.css +23 -0
- package/dist/components/NSInputInteger.d.ts +15 -0
- package/dist/components/NSInputInteger.js +28 -0
- package/dist/components/NSInputInteger.js.map +1 -0
- package/dist/components/NSInputInteger.module.css +26 -0
- package/dist/components/NSInputPhone.d.ts +16 -0
- package/dist/components/NSInputPhone.js +30 -0
- package/dist/components/NSInputPhone.js.map +1 -0
- package/dist/components/NSInputPhone.module.css +30 -0
- package/dist/components/NSInputPrice.d.ts +15 -0
- package/dist/components/NSInputPrice.js +28 -0
- package/dist/components/NSInputPrice.js.map +1 -0
- package/dist/components/NSInputPrice.module.css +24 -0
- package/dist/components/NSInputSearch.d.ts +17 -0
- package/dist/components/NSInputSearch.js +37 -0
- package/dist/components/NSInputSearch.js.map +1 -0
- package/dist/components/NSInputSearch.module.css +24 -0
- package/dist/components/NSInputString.d.ts +15 -0
- package/dist/components/NSInputString.js +28 -0
- package/dist/components/NSInputString.js.map +1 -0
- package/dist/components/NSInputString.module.css +24 -0
- package/dist/components/NSInputText.d.ts +15 -0
- package/dist/components/NSInputText.js +28 -0
- package/dist/components/NSInputText.js.map +1 -0
- package/dist/components/NSInputText.module.css +25 -0
- package/dist/components/NSInputTime.d.ts +15 -0
- package/dist/components/NSInputTime.js +28 -0
- package/dist/components/NSInputTime.js.map +1 -0
- package/dist/components/NSInputTime.module.css +24 -0
- package/dist/components/NSSelectBox.d.ts +16 -0
- package/dist/components/NSSelectBox.js +24 -0
- package/dist/components/NSSelectBox.js.map +1 -0
- package/dist/components/NSSelectBox.module.css +25 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +17 -0
- package/dist/main.js +18 -0
- package/dist/main.js.map +1 -0
- package/package.json +18 -10
- package/src/App.tsx +48 -49
- package/src/components/NSButtonGreen.tsx +3 -6
- package/src/components/NSButtonRed.tsx +3 -6
- package/src/components/NSHeader.tsx +14 -28
- package/src/main.ts +17 -0
- package/tsconfig.json +32 -32
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
interface IState {
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export default class NSInputText extends React.Component<IProps, IState> {
|
|
9
|
+
constructor(props: IProps);
|
|
10
|
+
setValue(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
11
|
+
setDefaultValue(value: string): void;
|
|
12
|
+
getValue(): string;
|
|
13
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Styles from "./NSInputText.module.css";
|
|
4
|
+
import IconInputText from '../assets/images/icon-input-text.svg';
|
|
5
|
+
export default class NSInputText extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = {
|
|
9
|
+
value: "",
|
|
10
|
+
};
|
|
11
|
+
this.setValue = this.setValue.bind(this);
|
|
12
|
+
this.getValue = this.getValue.bind(this);
|
|
13
|
+
this.setDefaultValue = this.setDefaultValue.bind(this);
|
|
14
|
+
}
|
|
15
|
+
setValue(e) {
|
|
16
|
+
this.setState({ value: e.target.value });
|
|
17
|
+
}
|
|
18
|
+
setDefaultValue(value) {
|
|
19
|
+
this.setState({ value });
|
|
20
|
+
}
|
|
21
|
+
getValue() {
|
|
22
|
+
return this.state.value;
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (_jsxs("div", Object.assign({ className: `${Styles.ns_input_parent} p-2` }, { children: [_jsx("span", Object.assign({ className: Styles.ns_input_title }, { children: this.props.title })), _jsx("img", { className: Styles.ns_input_icon, src: IconInputText, alt: "icon", width: 24, height: 24 }), _jsx("input", { value: this.state.value, onChange: this.setValue, type: "text", className: Styles.ns_input, placeholder: "Enter your Text"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ACI,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,aAAa,EAClB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACZ,EACF,gBACI,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAC,iBAAiB,GAC/B,KAEA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.ns_input_parent{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 326px;
|
|
5
|
+
color: #fff;
|
|
6
|
+
position: relative;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
}
|
|
10
|
+
.ns_input{
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
padding: 10px 12px;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
.ns_input_icon{
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 20px;
|
|
19
|
+
top: 51%;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
}
|
|
22
|
+
.ns_input_title {
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
interface IState {
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export default class NSInputTime extends React.Component<IProps, IState> {
|
|
9
|
+
constructor(props: IProps);
|
|
10
|
+
setValue(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
11
|
+
setDefaultValue(value: string): void;
|
|
12
|
+
getValue(): string;
|
|
13
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Styles from "./NSInputTime.module.css";
|
|
4
|
+
import IconInputTime from '../assets/images/icon-input-time.svg';
|
|
5
|
+
export default class NSInputTime extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = {
|
|
9
|
+
value: "",
|
|
10
|
+
};
|
|
11
|
+
this.setValue = this.setValue.bind(this);
|
|
12
|
+
this.getValue = this.getValue.bind(this);
|
|
13
|
+
this.setDefaultValue = this.setDefaultValue.bind(this);
|
|
14
|
+
}
|
|
15
|
+
setValue(e) {
|
|
16
|
+
this.setState({ value: e.target.value });
|
|
17
|
+
}
|
|
18
|
+
setDefaultValue(value) {
|
|
19
|
+
this.setState({ value });
|
|
20
|
+
}
|
|
21
|
+
getValue() {
|
|
22
|
+
return this.state.value;
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (_jsxs("div", Object.assign({ className: `${Styles.ns_input_parent} p-2` }, { children: [_jsx("span", Object.assign({ className: Styles.ns_input_title }, { children: this.props.title })), _jsx("img", { className: Styles.ns_input_icon, src: IconInputTime, alt: "icon", width: 24, height: 24 }), _jsx("input", { value: this.state.value, onChange: this.setValue, type: "time", className: Styles.ns_input, placeholder: "21:44:06", step: "2" })] })));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=NSInputTime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSInputTime.js","sourceRoot":"","sources":["../../src/components/NSInputTime.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,sCAAsC,CAAC;AA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W,EAAC,UAAU,EACtB,IAAI,EAAC,GAAG,GACV,KACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.ns_input_parent{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 326px;
|
|
5
|
+
color: #fff;
|
|
6
|
+
position: relative;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
}
|
|
9
|
+
.ns_input{
|
|
10
|
+
border-radius: 8px;
|
|
11
|
+
padding: 10px 12px;
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
}
|
|
15
|
+
.ns_input_icon{
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: 20px;
|
|
18
|
+
top: 51%;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
.ns_input_title {
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SelectProps } from 'antd';
|
|
3
|
+
interface IProps {
|
|
4
|
+
title: string;
|
|
5
|
+
options: SelectProps['options'];
|
|
6
|
+
}
|
|
7
|
+
interface IState {
|
|
8
|
+
value: string[];
|
|
9
|
+
}
|
|
10
|
+
export default class NSSelectBox extends React.Component<IProps, IState> {
|
|
11
|
+
constructor(props: IProps);
|
|
12
|
+
setValue(value: string[]): void;
|
|
13
|
+
getValue(): string[];
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Styles from "./NSSelectBox.module.css";
|
|
4
|
+
import { Select, Space } from 'antd';
|
|
5
|
+
import { CaretDownOutlined } from '@ant-design/icons';
|
|
6
|
+
export default class NSSelectBox extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = {
|
|
10
|
+
value: [],
|
|
11
|
+
};
|
|
12
|
+
this.setValue = this.setValue.bind(this);
|
|
13
|
+
}
|
|
14
|
+
setValue(value) {
|
|
15
|
+
this.setState({ value });
|
|
16
|
+
}
|
|
17
|
+
getValue() {
|
|
18
|
+
return this.state.value;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (_jsx("div", Object.assign({ className: `${Styles.ns_input_parent} p-2` }, { children: _jsx(Select, { suffixIcon: _jsx(CaretDownOutlined, {}), mode: "multiple", style: { width: '100%' }, className: Styles.ns_input_select, placeholder: "Combo Box", onChange: this.setValue, optionLabelProp: "label", options: this.props.options, optionRender: (option) => (_jsx(Space, Object.assign({ className: Styles.ns_input_select_option }, { children: option.data.desc }))) }) })));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=NSSelectBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSSelectBox.js","sourceRoot":"","sources":["../../src/components/NSSelectBox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,EAAC,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAapD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,KAAK,EAAE,EAAE;SACZ,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ,CAAC,KAAe;QAEpB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,QAAQ;QAEJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IACQ,MAAM;QAGX,OAAO,CACH,4BAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,MAAM,gBAC3C,KAAC,MAAM,IACH,UAAU,EAAE,KAAC,iBAAiB,KAAG,EACjC,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,SAAS,EAAE,MAAM,CAAC,eAAe,EACjC,WAAW,EAAC,WAAW,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,eAAe,EAAC,OAAO,EACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CACtB,KAAC,KAAK,kBAAC,SAAS,EAAE,MAAM,CAAC,sBAAsB,gBAC1C,MAAM,CAAC,IAAI,CAAC,IAAI,IACb,CACX,GACH,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.ns_input_parent {
|
|
2
|
+
width: 326px;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ns_input_select {
|
|
7
|
+
height: 48px;
|
|
8
|
+
width: 304px !important;
|
|
9
|
+
}
|
|
10
|
+
.ns_input_select span span svg path{
|
|
11
|
+
height: 24px !important;
|
|
12
|
+
width: 24px !important;
|
|
13
|
+
}
|
|
14
|
+
.ns_input_select span span svg {
|
|
15
|
+
height: 24px !important;
|
|
16
|
+
width: 24px !important;
|
|
17
|
+
}
|
|
18
|
+
.ns_input_select span span span svg path{
|
|
19
|
+
height: 12px !important;
|
|
20
|
+
width: 12px !important;
|
|
21
|
+
}
|
|
22
|
+
.ns_input_select span span span svg {
|
|
23
|
+
height: 12px !important;
|
|
24
|
+
width: 12px !important;
|
|
25
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
|
+
root.render(_jsx(App, {}));
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,CAAC;AACrB,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAC9B,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CAC/C,CAAC;AACF,IAAI,CAAC,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC"}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./components/NSButtonGreen";
|
|
2
|
+
export * from "./components/NSButtonRed";
|
|
3
|
+
export * from "./components/NSFooter";
|
|
4
|
+
export * from "./components/NSHeader";
|
|
5
|
+
export * from "./components/NSInputDate";
|
|
6
|
+
export * from "./components/NSInputDuration";
|
|
7
|
+
export * from "./components/NSInputEmail";
|
|
8
|
+
export * from "./components/NSInputFloat";
|
|
9
|
+
export * from "./components/NSInputIP";
|
|
10
|
+
export * from "./components/NSInputInteger";
|
|
11
|
+
export * from "./components/NSInputPhone";
|
|
12
|
+
export * from "./components/NSInputPrice";
|
|
13
|
+
export * from "./components/NSInputSearch";
|
|
14
|
+
export * from "./components/NSInputString";
|
|
15
|
+
export * from "./components/NSInputText";
|
|
16
|
+
export * from "./components/NSInputTime";
|
|
17
|
+
export * from "./components/NSSelectBox";
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from "./components/NSButtonGreen";
|
|
2
|
+
export * from "./components/NSButtonRed";
|
|
3
|
+
export * from "./components/NSFooter";
|
|
4
|
+
export * from "./components/NSHeader";
|
|
5
|
+
export * from "./components/NSInputDate";
|
|
6
|
+
export * from "./components/NSInputDuration";
|
|
7
|
+
export * from "./components/NSInputEmail";
|
|
8
|
+
export * from "./components/NSInputFloat";
|
|
9
|
+
export * from "./components/NSInputIP";
|
|
10
|
+
export * from "./components/NSInputInteger";
|
|
11
|
+
export * from "./components/NSInputPhone";
|
|
12
|
+
export * from "./components/NSInputPrice";
|
|
13
|
+
export * from "./components/NSInputSearch";
|
|
14
|
+
export * from "./components/NSInputString";
|
|
15
|
+
export * from "./components/NSInputText";
|
|
16
|
+
export * from "./components/NSInputTime";
|
|
17
|
+
export * from "./components/NSSelectBox";
|
|
18
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namirasoft-site-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"main": "./dist/main.js",
|
|
5
|
+
"types": "./dist/main.d.ts",
|
|
4
6
|
"dependencies": {
|
|
5
|
-
"@types/node": "^20.10.
|
|
6
|
-
"@types/react": "^18.2.
|
|
7
|
-
"@types/react-dom": "^18.2.
|
|
8
|
-
"antd": "^5.12.
|
|
7
|
+
"@types/node": "^20.10.5",
|
|
8
|
+
"@types/react": "^18.2.45",
|
|
9
|
+
"@types/react-dom": "^18.2.18",
|
|
10
|
+
"antd": "^5.12.5",
|
|
9
11
|
"bootstrap": "^5.3.2",
|
|
10
|
-
"namirasoft-api-link": "^1.2.
|
|
12
|
+
"namirasoft-api-link": "^1.2.3",
|
|
11
13
|
"namirasoft-core": "^1.2.4",
|
|
12
14
|
"path-browserify": "^1.0.1",
|
|
13
15
|
"react": "^18.2.0",
|
|
14
16
|
"react-app-rewired": "^2.2.1",
|
|
15
|
-
"react-bootstrap": "^2.9.
|
|
17
|
+
"react-bootstrap": "^2.9.2",
|
|
16
18
|
"react-dom": "^18.2.0",
|
|
17
19
|
"react-phone-input-2": "^2.15.1",
|
|
18
20
|
"react-phone-number-input": "^3.3.7",
|
|
@@ -20,9 +22,11 @@
|
|
|
20
22
|
},
|
|
21
23
|
"scripts": {
|
|
22
24
|
"start": "react-app-rewired start",
|
|
23
|
-
"build": "
|
|
25
|
+
"build": "npm run clean && tsc && npm run copy",
|
|
24
26
|
"test": "react-app-rewired test",
|
|
25
|
-
"eject": "react-app-rewired eject"
|
|
27
|
+
"eject": "react-app-rewired eject",
|
|
28
|
+
"clean": "rimraf dist/",
|
|
29
|
+
"copy": "copyfiles -u 1 src/**/*.html src/**/*.css dist/"
|
|
26
30
|
},
|
|
27
31
|
"eslintConfig": {
|
|
28
32
|
"extends": [
|
|
@@ -41,5 +45,9 @@
|
|
|
41
45
|
"last 1 firefox version",
|
|
42
46
|
"last 1 safari version"
|
|
43
47
|
]
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"copyfiles": "^2.4.1",
|
|
51
|
+
"rimraf": "^5.0.5"
|
|
44
52
|
}
|
|
45
|
-
}
|
|
53
|
+
}
|
package/src/App.tsx
CHANGED
|
@@ -14,58 +14,57 @@ import NSInputIP from './components/NSInputIP';
|
|
|
14
14
|
import NSInputEmail from './components/NSInputEmail';
|
|
15
15
|
import NSInputSearch from './components/NSInputSearch';
|
|
16
16
|
import NSInputPhone from './components/NSInputPhone';
|
|
17
|
-
import NSButtonGreen from './components/NSButtonGreen';
|
|
18
|
-
import NSButtonRed from './components/NSButtonRed';
|
|
17
|
+
import { NSButtonGreen } from './components/NSButtonGreen';
|
|
18
|
+
import { NSButtonRed } from './components/NSButtonRed';
|
|
19
19
|
import NSSelectBox from './components/NSSelectBox';
|
|
20
20
|
import type { SelectProps } from 'antd';
|
|
21
21
|
|
|
22
|
-
function App()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
22
|
+
function App() {
|
|
23
|
+
const options: SelectProps['options'] = [
|
|
24
|
+
{
|
|
25
|
+
label: 'Test1',
|
|
26
|
+
value: 'test1',
|
|
27
|
+
desc: 'Test1',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Test2',
|
|
31
|
+
value: 'test2',
|
|
32
|
+
desc: 'Test2',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Test3',
|
|
36
|
+
value: 'test3',
|
|
37
|
+
desc: 'Test3',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Test4',
|
|
41
|
+
value: 'test4',
|
|
42
|
+
desc: 'Test4',
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
return (
|
|
46
|
+
<div className="App">
|
|
47
|
+
<NSHeader scope='test' name='test' />
|
|
48
|
+
<div className='my-4'>
|
|
49
|
+
<NSInputText title='Text' />
|
|
50
|
+
<NSInputInteger title='Integer' />
|
|
51
|
+
<NSInputFloat title='Floating Point' />
|
|
52
|
+
<NSInputPrice title='Price' />
|
|
53
|
+
<NSInputDate title='Date' />
|
|
54
|
+
<NSInputTime title='Time' />
|
|
55
|
+
<NSInputDuration title='Duration' />
|
|
56
|
+
<NSInputString title='String' />
|
|
57
|
+
<NSInputIP title='IP' />
|
|
58
|
+
<NSInputEmail title='Email' />
|
|
59
|
+
<NSInputSearch title='Search' />
|
|
60
|
+
<NSInputPhone title='Phone' />
|
|
61
|
+
<NSSelectBox title="t" options={options} />
|
|
62
|
+
<NSButtonGreen title='Save' onClick={() => { }} />
|
|
63
|
+
<NSButtonRed title='Delete' onClick={() => { }} />
|
|
64
|
+
</div>
|
|
65
|
+
<NSFooter scope='test' name='test' />
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
export default App;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonGreen.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
5
|
-
{
|
|
4
|
+
interface IProps {
|
|
6
5
|
title: string;
|
|
7
6
|
onClick: () => void;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
interface IState { }
|
|
11
9
|
|
|
12
|
-
export
|
|
10
|
+
export class NSButtonGreen extends React.Component<IProps, IState>
|
|
13
11
|
{
|
|
14
|
-
override
|
|
15
|
-
{
|
|
12
|
+
override render() {
|
|
16
13
|
return <button onClick={this.props.onClick} className={Style.ns_button_green}>{this.props.title}</button>;
|
|
17
14
|
}
|
|
18
15
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonRed.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
5
|
-
{
|
|
4
|
+
interface IProps {
|
|
6
5
|
title: string;
|
|
7
6
|
onClick: () => void;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
interface IState { }
|
|
11
9
|
|
|
12
|
-
export
|
|
10
|
+
export class NSButtonRed extends React.Component<IProps, IState>
|
|
13
11
|
{
|
|
14
|
-
override
|
|
15
|
-
{
|
|
12
|
+
override render() {
|
|
16
13
|
return <button onClick={this.props.onClick} className={Style.ns_button_red}>{this.props.title}</button>;
|
|
17
14
|
}
|
|
18
15
|
}
|
|
@@ -6,22 +6,19 @@ import Exit from '../assets/images/exit.svg';
|
|
|
6
6
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
7
7
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
8
8
|
|
|
9
|
-
interface IProps
|
|
10
|
-
{
|
|
9
|
+
interface IProps {
|
|
11
10
|
scope: string;
|
|
12
11
|
name: string;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
interface IState
|
|
16
|
-
{
|
|
14
|
+
interface IState {
|
|
17
15
|
filters: FilterLinkRow[];
|
|
18
16
|
selected: FilterLinkRow | null;
|
|
19
17
|
showNavbar: boolean;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export default class NSHeader extends React.Component<IProps, IState> {
|
|
23
|
-
constructor(props: IProps)
|
|
24
|
-
{
|
|
21
|
+
constructor(props: IProps) {
|
|
25
22
|
super(props);
|
|
26
23
|
this.state = {
|
|
27
24
|
filters: [],
|
|
@@ -34,29 +31,23 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
34
31
|
this.render_menuItem = this.render_menuItem.bind(this);
|
|
35
32
|
this.handleShowNavbar = this.handleShowNavbar.bind(this);
|
|
36
33
|
}
|
|
37
|
-
override componentDidMount(): void
|
|
38
|
-
{
|
|
34
|
+
override componentDidMount(): void {
|
|
39
35
|
let server = new NamirasoftAPILinkServer(console.error);
|
|
40
|
-
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
41
|
-
{
|
|
36
|
+
server.filter.GetFilters(this.props.scope, this.props.name).then(filters => {
|
|
42
37
|
this.setState({ filters });
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
|
-
private onMenuItemToggled(checked: boolean, selected: FilterLinkRow)
|
|
46
|
-
{
|
|
40
|
+
private onMenuItemToggled(checked: boolean, selected: FilterLinkRow) {
|
|
47
41
|
if (checked)
|
|
48
42
|
this.setState({ selected });
|
|
49
43
|
}
|
|
50
|
-
private hasChild(id: number): boolean
|
|
51
|
-
{
|
|
44
|
+
private hasChild(id: number): boolean {
|
|
52
45
|
return this.state.filters.filter(f => f.parent_id === id).length > 0;
|
|
53
46
|
}
|
|
54
|
-
handleShowNavbar(): void
|
|
55
|
-
{
|
|
47
|
+
handleShowNavbar(): void {
|
|
56
48
|
this.setState({ showNavbar: !this.state.showNavbar });
|
|
57
49
|
}
|
|
58
|
-
override render()
|
|
59
|
-
{
|
|
50
|
+
override render() {
|
|
60
51
|
return (
|
|
61
52
|
<nav className={Styles.ns_navbar}>
|
|
62
53
|
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
@@ -91,8 +82,7 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
91
82
|
</nav>
|
|
92
83
|
);
|
|
93
84
|
}
|
|
94
|
-
private render_menu(level: number, parent_id: number | null)
|
|
95
|
-
{
|
|
85
|
+
private render_menu(level: number, parent_id: number | null) {
|
|
96
86
|
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id === parent_id);
|
|
97
87
|
return (
|
|
98
88
|
<Nav className="me-auto" >
|
|
@@ -100,14 +90,11 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
100
90
|
</Nav>
|
|
101
91
|
);
|
|
102
92
|
}
|
|
103
|
-
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
104
|
-
|
|
105
|
-
if (this.hasChild(filter.id))
|
|
106
|
-
{
|
|
93
|
+
private render_menuItem(level: number, filter: FilterLinkRow) {
|
|
94
|
+
if (this.hasChild(filter.id)) {
|
|
107
95
|
let sub_menus = <></>;
|
|
108
96
|
if (level === 0)
|
|
109
|
-
if (this.state.selected)
|
|
110
|
-
{
|
|
97
|
+
if (this.state.selected) {
|
|
111
98
|
sub_menus =
|
|
112
99
|
<div
|
|
113
100
|
id={`dropdown_items${filter.id}`}>
|
|
@@ -124,8 +111,7 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
124
111
|
</NavDropdown >
|
|
125
112
|
</>
|
|
126
113
|
);
|
|
127
|
-
} else
|
|
128
|
-
{
|
|
114
|
+
} else {
|
|
129
115
|
return (
|
|
130
116
|
<Nav.Link className={level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item} href={filter.link?.url}>{filter.name}li</Nav.Link>
|
|
131
117
|
);
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./components/NSButtonGreen";
|
|
2
|
+
export * from "./components/NSButtonRed";
|
|
3
|
+
export * from "./components/NSFooter";
|
|
4
|
+
export * from "./components/NSHeader";
|
|
5
|
+
export * from "./components/NSInputDate";
|
|
6
|
+
export * from "./components/NSInputDuration";
|
|
7
|
+
export * from "./components/NSInputEmail";
|
|
8
|
+
export * from "./components/NSInputFloat";
|
|
9
|
+
export * from "./components/NSInputIP";
|
|
10
|
+
export * from "./components/NSInputInteger";
|
|
11
|
+
export * from "./components/NSInputPhone";
|
|
12
|
+
export * from "./components/NSInputPrice";
|
|
13
|
+
export * from "./components/NSInputSearch";
|
|
14
|
+
export * from "./components/NSInputString";
|
|
15
|
+
export * from "./components/NSInputText";
|
|
16
|
+
export * from "./components/NSInputTime";
|
|
17
|
+
export * from "./components/NSSelectBox";
|