namirasoft-site-react 1.2.6 → 1.2.8
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.d.ts +1 -2
- package/dist/App.js +16 -17
- package/dist/App.js.map +1 -1
- package/dist/components/NSButtonGreen.d.ts +4 -1
- package/dist/components/NSButtonGreen.js +8 -1
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.d.ts +6 -1
- package/dist/components/NSButtonRed.js +8 -1
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSFooter.d.ts +1 -1
- package/dist/components/NSFooter.js +1 -1
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +1 -1
- package/dist/components/NSHeader.js +1 -1
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInputDate.d.ts +1 -1
- package/dist/components/NSInputDate.js +1 -1
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDuration.d.ts +1 -1
- package/dist/components/NSInputDuration.js +1 -1
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +1 -1
- package/dist/components/NSInputEmail.js +1 -1
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +1 -1
- package/dist/components/NSInputFloat.js +1 -1
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +1 -1
- package/dist/components/NSInputIP.js +1 -1
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +1 -1
- package/dist/components/NSInputInteger.js +1 -1
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputPhone.d.ts +1 -1
- package/dist/components/NSInputPhone.js +1 -1
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPrice.d.ts +1 -1
- package/dist/components/NSInputPrice.js +1 -1
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +1 -1
- package/dist/components/NSInputSearch.js +1 -1
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputString.d.ts +5 -3
- package/dist/components/NSInputString.js +13 -10
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSInputText.d.ts +1 -1
- package/dist/components/NSInputText.js +1 -1
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +1 -1
- package/dist/components/NSInputTime.js +1 -1
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSSelectBox.d.ts +1 -1
- package/dist/components/NSSelectBox.js +1 -1
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/App.tsx +19 -19
- package/src/components/NSButtonGreen.tsx +20 -5
- package/src/components/NSButtonRed.tsx +21 -4
- package/src/components/NSFooter.tsx +3 -7
- package/src/components/NSHeader.tsx +29 -15
- package/src/components/NSInputDate.tsx +1 -1
- package/src/components/NSInputDuration.tsx +1 -1
- package/src/components/NSInputEmail.tsx +1 -1
- package/src/components/NSInputFloat.tsx +2 -5
- package/src/components/NSInputIP.tsx +1 -1
- package/src/components/NSInputInteger.tsx +1 -1
- package/src/components/NSInputPhone.tsx +1 -1
- package/src/components/NSInputPrice.tsx +1 -1
- package/src/components/NSInputSearch.tsx +1 -1
- package/src/components/NSInputString.tsx +16 -13
- package/src/components/NSInputText.tsx +1 -1
- package/src/components/NSInputTime.tsx +1 -1
- package/src/components/NSSelectBox.tsx +2 -2
- package/src/index.tsx +1 -1
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import Styles from "./NSInputText.module.css";
|
|
4
4
|
import IconInputText from '../assets/images/icon-input-text.svg';
|
|
5
|
-
export
|
|
5
|
+
export class NSInputText extends React.Component {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super(props);
|
|
8
8
|
this.state = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSInputText.js","sourceRoot":"","sources":["../../src/components/NSInputText.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAYjE,MAAM,
|
|
1
|
+
{"version":3,"file":"NSInputText.js","sourceRoot":"","sources":["../../src/components/NSInputText.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAYjE,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IAC5D,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;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,QAAQ,CAAC,CAAsC;QAE3C,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,eAAe,CAAC,KAAa;QAEzB,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;QAEX,OAAO,CACH,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,MAAM,aAC3C,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EACjE,cACI,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,IAEA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -5,7 +5,7 @@ interface IProps {
|
|
|
5
5
|
interface IState {
|
|
6
6
|
value: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export declare class NSInputTime extends React.Component<IProps, IState> {
|
|
9
9
|
constructor(props: IProps);
|
|
10
10
|
setValue(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
11
11
|
setDefaultValue(value: string): void;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import Styles from "./NSInputTime.module.css";
|
|
4
4
|
import IconInputTime from '../assets/images/icon-input-time.svg';
|
|
5
|
-
export
|
|
5
|
+
export class NSInputTime extends React.Component {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super(props);
|
|
8
8
|
this.state = {
|
|
@@ -1 +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,sCA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ACV,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,UAAU,EACtB,IAAI,EAAC,GAAG,GACV,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -7,7 +7,7 @@ interface IProps {
|
|
|
7
7
|
interface IState {
|
|
8
8
|
value: string[];
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export declare class NSSelectBox extends React.Component<IProps, IState> {
|
|
11
11
|
constructor(props: IProps);
|
|
12
12
|
setValue(value: string[]): void;
|
|
13
13
|
getValue(): string[];
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import Styles from "./NSSelectBox.module.css";
|
|
4
4
|
import { Select, Space } from 'antd';
|
|
5
5
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
6
|
-
export
|
|
6
|
+
export class NSSelectBox extends React.Component {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super(props);
|
|
9
9
|
this.state = {
|
|
@@ -1 +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,
|
|
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,MAA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from './App';
|
|
4
|
+
import { App } from './App';
|
|
5
5
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
6
|
root.render(_jsx(App, {}));
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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;
|
|
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,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,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/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namirasoft-site-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"main": "./dist/main.js",
|
|
5
5
|
"types": "./dist/main.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@types/node": "^20.10.
|
|
8
|
-
"@types/react": "^18.2.
|
|
7
|
+
"@types/node": "^20.10.6",
|
|
8
|
+
"@types/react": "^18.2.46",
|
|
9
9
|
"@types/react-dom": "^18.2.18",
|
|
10
|
-
"antd": "^5.12.
|
|
10
|
+
"antd": "^5.12.7",
|
|
11
11
|
"bootstrap": "^5.3.2",
|
|
12
12
|
"namirasoft-api-link": "^1.2.3",
|
|
13
|
-
"namirasoft-core": "^1.2.
|
|
13
|
+
"namirasoft-core": "^1.2.5",
|
|
14
14
|
"path-browserify": "^1.0.1",
|
|
15
15
|
"react": "^18.2.0",
|
|
16
16
|
"react-app-rewired": "^2.2.1",
|
|
17
17
|
"react-bootstrap": "^2.9.2",
|
|
18
18
|
"react-dom": "^18.2.0",
|
|
19
19
|
"react-phone-input-2": "^2.15.1",
|
|
20
|
-
"react-phone-number-input": "^3.3.
|
|
20
|
+
"react-phone-number-input": "^3.3.8",
|
|
21
21
|
"react-scripts": "5.0.1"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
package/src/App.tsx
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import NSHeader from './components/NSHeader';
|
|
4
|
-
import NSFooter from './components/NSFooter';
|
|
5
|
-
import NSInputText from './components/NSInputText';
|
|
6
|
-
import NSInputInteger from './components/NSInputInteger';
|
|
7
|
-
import NSInputFloat from './components/NSInputFloat';
|
|
8
|
-
import NSInputPrice from './components/NSInputPrice';
|
|
9
|
-
import NSInputDate from './components/NSInputDate';
|
|
10
|
-
import NSInputTime from './components/NSInputTime';
|
|
11
|
-
import NSInputDuration from './components/NSInputDuration';
|
|
12
|
-
import NSInputString from './components/NSInputString';
|
|
13
|
-
import NSInputIP from './components/NSInputIP';
|
|
14
|
-
import NSInputEmail from './components/NSInputEmail';
|
|
15
|
-
import NSInputSearch from './components/NSInputSearch';
|
|
16
|
-
import NSInputPhone from './components/NSInputPhone';
|
|
3
|
+
import { NSHeader } from './components/NSHeader';
|
|
4
|
+
import { NSFooter } from './components/NSFooter';
|
|
5
|
+
import { NSInputText } from './components/NSInputText';
|
|
6
|
+
import { NSInputInteger } from './components/NSInputInteger';
|
|
7
|
+
import { NSInputFloat } from './components/NSInputFloat';
|
|
8
|
+
import { NSInputPrice } from './components/NSInputPrice';
|
|
9
|
+
import { NSInputDate } from './components/NSInputDate';
|
|
10
|
+
import { NSInputTime } from './components/NSInputTime';
|
|
11
|
+
import { NSInputDuration } from './components/NSInputDuration';
|
|
12
|
+
import { NSInputString } from './components/NSInputString';
|
|
13
|
+
import { NSInputIP } from './components/NSInputIP';
|
|
14
|
+
import { NSInputEmail } from './components/NSInputEmail';
|
|
15
|
+
import { NSInputSearch } from './components/NSInputSearch';
|
|
16
|
+
import { NSInputPhone } from './components/NSInputPhone';
|
|
17
17
|
import { NSButtonGreen } from './components/NSButtonGreen';
|
|
18
18
|
import { NSButtonRed } from './components/NSButtonRed';
|
|
19
|
-
import NSSelectBox from './components/NSSelectBox';
|
|
19
|
+
import { NSSelectBox } from './components/NSSelectBox';
|
|
20
20
|
import type { SelectProps } from 'antd';
|
|
21
21
|
|
|
22
|
-
function App()
|
|
22
|
+
export function App()
|
|
23
|
+
{
|
|
23
24
|
const options: SelectProps['options'] = [
|
|
24
25
|
{
|
|
25
26
|
label: 'Test1',
|
|
@@ -42,6 +43,7 @@ function App() {
|
|
|
42
43
|
desc: 'Test4',
|
|
43
44
|
},
|
|
44
45
|
];
|
|
46
|
+
|
|
45
47
|
return (
|
|
46
48
|
<div className="App">
|
|
47
49
|
<NSHeader scope='test' name='test' />
|
|
@@ -65,6 +67,4 @@ function App() {
|
|
|
65
67
|
<NSFooter scope='test' name='test' />
|
|
66
68
|
</div>
|
|
67
69
|
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default App;
|
|
70
|
+
}
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonGreen.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
4
|
+
interface IProps
|
|
5
|
+
{
|
|
6
|
+
title: string;
|
|
7
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
5
12
|
title: string;
|
|
6
|
-
onClick: () => void;
|
|
7
13
|
}
|
|
8
|
-
interface IState { }
|
|
9
14
|
|
|
10
15
|
export class NSButtonGreen extends React.Component<IProps, IState>
|
|
11
16
|
{
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
constructor(props: IProps)
|
|
18
|
+
{
|
|
19
|
+
super(props);
|
|
20
|
+
this.state = { title: props.title };
|
|
21
|
+
}
|
|
22
|
+
setTitle(title: string)
|
|
23
|
+
{
|
|
24
|
+
this.setState({ title });
|
|
25
|
+
}
|
|
26
|
+
override render()
|
|
27
|
+
{
|
|
28
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
14
29
|
}
|
|
15
30
|
}
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonRed.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
4
|
+
interface IProps
|
|
5
|
+
{
|
|
6
|
+
title: string;
|
|
7
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
5
12
|
title: string;
|
|
6
|
-
onClick: () => void;
|
|
7
13
|
}
|
|
14
|
+
|
|
8
15
|
interface IState { }
|
|
9
16
|
|
|
10
17
|
export class NSButtonRed extends React.Component<IProps, IState>
|
|
11
18
|
{
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
constructor(props: IProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = { title: props.title };
|
|
23
|
+
}
|
|
24
|
+
setTitle(title: string)
|
|
25
|
+
{
|
|
26
|
+
this.setState({ title });
|
|
27
|
+
}
|
|
28
|
+
override render()
|
|
29
|
+
{
|
|
30
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
14
31
|
}
|
|
15
32
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
// import Namira from '../assets/images/namira.svg';
|
|
3
2
|
import Styles from "./NSFooter.module.css";
|
|
4
3
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
5
4
|
|
|
@@ -15,7 +14,8 @@ interface IState
|
|
|
15
14
|
selected: FilterLinkRow | null;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
export
|
|
17
|
+
export class NSFooter extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
19
19
|
constructor(props: IProps)
|
|
20
20
|
{
|
|
21
21
|
super(props);
|
|
@@ -119,8 +119,4 @@ export default class NSFooter extends React.Component<IProps, IState> {
|
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
}
|
|
@@ -6,19 +6,22 @@ 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
|
|
9
|
+
interface IProps
|
|
10
|
+
{
|
|
10
11
|
scope: string;
|
|
11
12
|
name: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
interface IState
|
|
15
|
+
interface IState
|
|
16
|
+
{
|
|
15
17
|
filters: FilterLinkRow[];
|
|
16
18
|
selected: FilterLinkRow | null;
|
|
17
19
|
showNavbar: boolean;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export
|
|
21
|
-
constructor(props: IProps)
|
|
22
|
+
export class NSHeader extends React.Component<IProps, IState> {
|
|
23
|
+
constructor(props: IProps)
|
|
24
|
+
{
|
|
22
25
|
super(props);
|
|
23
26
|
this.state = {
|
|
24
27
|
filters: [],
|
|
@@ -31,23 +34,29 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
31
34
|
this.render_menuItem = this.render_menuItem.bind(this);
|
|
32
35
|
this.handleShowNavbar = this.handleShowNavbar.bind(this);
|
|
33
36
|
}
|
|
34
|
-
override componentDidMount(): void
|
|
37
|
+
override componentDidMount(): void
|
|
38
|
+
{
|
|
35
39
|
let server = new NamirasoftAPILinkServer(console.error);
|
|
36
|
-
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
40
|
+
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
41
|
+
{
|
|
37
42
|
this.setState({ filters });
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
|
-
private onMenuItemToggled(checked: boolean, selected: FilterLinkRow)
|
|
45
|
+
private onMenuItemToggled(checked: boolean, selected: FilterLinkRow)
|
|
46
|
+
{
|
|
41
47
|
if (checked)
|
|
42
48
|
this.setState({ selected });
|
|
43
49
|
}
|
|
44
|
-
private hasChild(id: number): boolean
|
|
50
|
+
private hasChild(id: number): boolean
|
|
51
|
+
{
|
|
45
52
|
return this.state.filters.filter(f => f.parent_id === id).length > 0;
|
|
46
53
|
}
|
|
47
|
-
handleShowNavbar(): void
|
|
54
|
+
handleShowNavbar(): void
|
|
55
|
+
{
|
|
48
56
|
this.setState({ showNavbar: !this.state.showNavbar });
|
|
49
57
|
}
|
|
50
|
-
override render()
|
|
58
|
+
override render()
|
|
59
|
+
{
|
|
51
60
|
return (
|
|
52
61
|
<nav className={Styles.ns_navbar}>
|
|
53
62
|
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
@@ -82,7 +91,8 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
82
91
|
</nav>
|
|
83
92
|
);
|
|
84
93
|
}
|
|
85
|
-
private render_menu(level: number, parent_id: number | null)
|
|
94
|
+
private render_menu(level: number, parent_id: number | null)
|
|
95
|
+
{
|
|
86
96
|
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id === parent_id);
|
|
87
97
|
return (
|
|
88
98
|
<Nav className="me-auto" >
|
|
@@ -90,11 +100,14 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
90
100
|
</Nav>
|
|
91
101
|
);
|
|
92
102
|
}
|
|
93
|
-
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
94
|
-
|
|
103
|
+
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
104
|
+
{
|
|
105
|
+
if (this.hasChild(filter.id))
|
|
106
|
+
{
|
|
95
107
|
let sub_menus = <></>;
|
|
96
108
|
if (level === 0)
|
|
97
|
-
if (this.state.selected)
|
|
109
|
+
if (this.state.selected)
|
|
110
|
+
{
|
|
98
111
|
sub_menus =
|
|
99
112
|
<div
|
|
100
113
|
id={`dropdown_items${filter.id}`}>
|
|
@@ -111,7 +124,8 @@ export default class NSHeader extends React.Component<IProps, IState> {
|
|
|
111
124
|
</NavDropdown >
|
|
112
125
|
</>
|
|
113
126
|
);
|
|
114
|
-
} else
|
|
127
|
+
} else
|
|
128
|
+
{
|
|
115
129
|
return (
|
|
116
130
|
<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>
|
|
117
131
|
);
|
|
@@ -12,7 +12,7 @@ interface IState
|
|
|
12
12
|
value: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export class NSInputFloat extends React.Component<IProps, IState> {
|
|
16
16
|
constructor(props: IProps)
|
|
17
17
|
{
|
|
18
18
|
super(props);
|
|
@@ -54,10 +54,7 @@ export default class NSInputFloat extends React.Component<IProps, IState> {
|
|
|
54
54
|
className={Styles.ns_input}
|
|
55
55
|
placeholder="1.2"
|
|
56
56
|
/>
|
|
57
|
-
|
|
58
57
|
</div>
|
|
59
58
|
);
|
|
60
59
|
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
}
|
|
@@ -5,6 +5,8 @@ import IconInputString from '../assets/images/icon-input-string.svg';
|
|
|
5
5
|
interface IProps
|
|
6
6
|
{
|
|
7
7
|
title: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
interface IState
|
|
@@ -12,28 +14,31 @@ interface IState
|
|
|
12
14
|
value: string;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
export
|
|
17
|
+
export class NSInputString extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
16
19
|
constructor(props: IProps)
|
|
17
20
|
{
|
|
18
21
|
super(props);
|
|
19
22
|
this.state = {
|
|
20
|
-
value: "",
|
|
23
|
+
value: props.defaultValue ?? "",
|
|
21
24
|
};
|
|
22
|
-
this.setValue = this.setValue.bind(this);
|
|
23
25
|
this.getValue = this.getValue.bind(this);
|
|
24
|
-
this.
|
|
26
|
+
this.setValue = this.setValue.bind(this);
|
|
27
|
+
this.onChanged = this.onChanged.bind(this);
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
getValue(): string
|
|
27
30
|
{
|
|
28
|
-
this.
|
|
31
|
+
return this.state.value;
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
setValue(value: string): void
|
|
31
34
|
{
|
|
32
35
|
this.setState({ value });
|
|
33
36
|
}
|
|
34
|
-
|
|
37
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
35
38
|
{
|
|
36
|
-
|
|
39
|
+
this.setValue(e.target.value);
|
|
40
|
+
if (this.props.onChanged)
|
|
41
|
+
this.props.onChanged(e);
|
|
37
42
|
}
|
|
38
43
|
override render()
|
|
39
44
|
{
|
|
@@ -49,7 +54,7 @@ export default class NSInputString extends React.Component<IProps, IState> {
|
|
|
49
54
|
/>
|
|
50
55
|
<input
|
|
51
56
|
value={this.state.value}
|
|
52
|
-
onChange={this.
|
|
57
|
+
onChange={this.onChanged}
|
|
53
58
|
type="text"
|
|
54
59
|
className={Styles.ns_input}
|
|
55
60
|
placeholder="12AB34cf"
|
|
@@ -57,6 +62,4 @@ export default class NSInputString extends React.Component<IProps, IState> {
|
|
|
57
62
|
</div>
|
|
58
63
|
);
|
|
59
64
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import Styles from "./NSSelectBox.module.css";
|
|
3
3
|
import { Select, Space } from 'antd';
|
|
4
4
|
import type { SelectProps } from 'antd';
|
|
5
|
-
import {CaretDownOutlined } from '@ant-design/icons'
|
|
5
|
+
import { CaretDownOutlined } from '@ant-design/icons'
|
|
6
6
|
|
|
7
7
|
interface IProps
|
|
8
8
|
{
|
|
@@ -15,7 +15,7 @@ interface IState
|
|
|
15
15
|
value: string[];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export
|
|
18
|
+
export class NSSelectBox extends React.Component<IProps, IState> {
|
|
19
19
|
constructor(props: IProps)
|
|
20
20
|
{
|
|
21
21
|
super(props);
|