namirasoft-site-react 1.2.41 → 1.2.42
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 +14 -14
- package/config-overrides.js +65 -65
- package/dist/App.d.ts +3 -3
- package/dist/App.js +8 -8
- package/dist/assets/images/arrow.svg +3 -3
- package/dist/assets/images/danger.svg +3 -3
- package/dist/assets/images/exit.svg +3 -3
- package/dist/assets/images/icon-input-date.svg +9 -9
- package/dist/assets/images/icon-input-duration.svg +9 -9
- package/dist/assets/images/icon-input-email.svg +9 -9
- package/dist/assets/images/icon-input-float.svg +9 -9
- package/dist/assets/images/icon-input-id.svg +9 -9
- package/dist/assets/images/icon-input-integer.svg +9 -9
- package/dist/assets/images/icon-input-phone.svg +9 -9
- package/dist/assets/images/icon-input-price.svg +9 -9
- package/dist/assets/images/icon-input-search.svg +4 -4
- package/dist/assets/images/icon-input-string.svg +9 -9
- package/dist/assets/images/icon-input-text.svg +9 -9
- package/dist/assets/images/icon-input-time.svg +9 -9
- package/dist/assets/images/logo.svg +9 -9
- package/dist/assets/images/menu.svg +3 -3
- package/dist/assets/images/namira.svg +9 -9
- package/dist/assets/images/rectangle.svg +3 -3
- package/dist/components/NSButtonGreen.d.ts +16 -16
- package/dist/components/NSButtonGreen.js +16 -16
- package/dist/components/NSButtonRed.d.ts +16 -16
- package/dist/components/NSButtonRed.js +16 -16
- package/dist/components/NSCard.d.ts +20 -20
- package/dist/components/NSCard.js +12 -12
- package/dist/components/NSFooter.d.ts +20 -20
- package/dist/components/NSFooter.js +46 -46
- package/dist/components/NSHeader.d.ts +23 -23
- package/dist/components/NSHeader.js +60 -60
- package/dist/components/NSInputDate.d.ts +15 -15
- package/dist/components/NSInputDate.js +27 -27
- package/dist/components/NSInputDuration.d.ts +15 -15
- package/dist/components/NSInputDuration.js +28 -28
- package/dist/components/NSInputEmail.d.ts +16 -16
- package/dist/components/NSInputEmail.js +36 -36
- package/dist/components/NSInputEmail.module.css +37 -37
- package/dist/components/NSInputFloat.d.ts +15 -15
- package/dist/components/NSInputFloat.js +28 -28
- package/dist/components/NSInputFloat.module.css +25 -25
- package/dist/components/NSInputIP.d.ts +15 -15
- package/dist/components/NSInputIP.js +28 -28
- package/dist/components/NSInputIP.module.css +25 -25
- package/dist/components/NSInputInteger.d.ts +15 -15
- package/dist/components/NSInputInteger.js +28 -28
- package/dist/components/NSInputInteger.module.css +25 -25
- package/dist/components/NSInputPhone.d.ts +16 -16
- package/dist/components/NSInputPhone.js +30 -30
- package/dist/components/NSInputPhone.module.css +32 -32
- package/dist/components/NSInputPrice.d.ts +17 -17
- package/dist/components/NSInputPrice.js +31 -31
- package/dist/components/NSInputPrice.module.css +26 -26
- package/dist/components/NSInputSearch.d.ts +17 -17
- package/dist/components/NSInputSearch.js +37 -37
- package/dist/components/NSInputSearch.module.css +25 -25
- package/dist/components/NSInputString.d.ts +17 -17
- package/dist/components/NSInputString.js +31 -31
- package/dist/components/NSInputString.module.css +26 -26
- package/dist/components/NSInputText.d.ts +17 -17
- package/dist/components/NSInputText.js +31 -31
- package/dist/components/NSInputText.module.css +27 -27
- package/dist/components/NSInputTime.d.ts +15 -15
- package/dist/components/NSInputTime.js +28 -28
- package/dist/components/NSInputTime.module.css +26 -26
- package/dist/components/NSLayout.d.ts +8 -8
- package/dist/components/NSLayout.js +8 -8
- package/dist/components/NSLayout.module.css +16 -16
- package/dist/components/NSLayoutHeroBanner.d.ts +12 -12
- package/dist/components/NSLayoutHeroBanner.js +8 -8
- package/dist/components/NSLayoutHeroBanner.module.css +43 -43
- package/dist/components/NSLayoutTitle.d.ts +10 -10
- package/dist/components/NSLayoutTitle.js +6 -6
- package/dist/components/NSLinkGreen.d.ts +16 -16
- package/dist/components/NSLinkGreen.js +20 -20
- package/dist/components/NSLinkGreen.module.css +15 -15
- package/dist/components/NSLinkRed.d.ts +16 -16
- package/dist/components/NSLinkRed.js +20 -20
- package/dist/components/NSLinkRed.module.css +15 -15
- package/dist/components/NSPagination.d.ts +15 -15
- package/dist/components/NSPagination.js +35 -35
- package/dist/components/NSPagination.module.css +24 -24
- package/dist/components/NSParentCard.module.css +34 -34
- package/dist/components/NSSelectBox.d.ts +16 -16
- package/dist/components/NSSelectBox.js +24 -24
- package/dist/components/NSSelectBox.module.css +28 -28
- package/dist/components/NSTable.d.ts +28 -28
- package/dist/components/NSTable.js +20 -20
- package/dist/components/NSTable.modules.css +76 -76
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/main.d.ts +26 -26
- package/dist/main.js +26 -26
- package/dist/pages/NSLoginPage.d.ts +13 -13
- package/dist/pages/NSLoginPage.js +17 -17
- package/package.json +52 -52
- package/public/index.html +42 -42
- package/public/manifest.json +25 -25
- package/public/robots.txt +3 -3
- package/src/App.tsx +70 -70
- package/src/assets/images/arrow.svg +3 -3
- package/src/assets/images/danger.svg +3 -3
- package/src/assets/images/exit.svg +3 -3
- package/src/assets/images/icon-input-date.svg +9 -9
- package/src/assets/images/icon-input-duration.svg +9 -9
- package/src/assets/images/icon-input-email.svg +9 -9
- package/src/assets/images/icon-input-float.svg +9 -9
- package/src/assets/images/icon-input-id.svg +9 -9
- package/src/assets/images/icon-input-integer.svg +9 -9
- package/src/assets/images/icon-input-phone.svg +9 -9
- package/src/assets/images/icon-input-price.svg +9 -9
- package/src/assets/images/icon-input-search.svg +4 -4
- package/src/assets/images/icon-input-string.svg +9 -9
- package/src/assets/images/icon-input-text.svg +9 -9
- package/src/assets/images/icon-input-time.svg +9 -9
- package/src/assets/images/logo.svg +9 -9
- package/src/assets/images/menu.svg +3 -3
- package/src/assets/images/namira.svg +9 -9
- package/src/assets/images/rectangle.svg +3 -3
- package/src/components/NSButtonGreen.tsx +33 -33
- package/src/components/NSButtonRed.tsx +33 -33
- package/src/components/NSCard.tsx +54 -54
- package/src/components/NSFooter.tsx +123 -123
- package/src/components/NSHeader.tsx +134 -134
- package/src/components/NSInputDate.tsx +57 -57
- package/src/components/NSInputDuration.tsx +65 -65
- package/src/components/NSInputEmail.module.css +37 -37
- package/src/components/NSInputEmail.tsx +92 -92
- package/src/components/NSInputFloat.module.css +25 -25
- package/src/components/NSInputFloat.tsx +61 -61
- package/src/components/NSInputIP.module.css +25 -25
- package/src/components/NSInputIP.tsx +65 -65
- package/src/components/NSInputInteger.module.css +25 -25
- package/src/components/NSInputInteger.tsx +65 -65
- package/src/components/NSInputPhone.module.css +32 -32
- package/src/components/NSInputPhone.tsx +65 -65
- package/src/components/NSInputPrice.module.css +26 -26
- package/src/components/NSInputPrice.tsx +68 -68
- package/src/components/NSInputSearch.module.css +25 -25
- package/src/components/NSInputSearch.tsx +78 -78
- package/src/components/NSInputString.module.css +26 -26
- package/src/components/NSInputString.tsx +66 -66
- package/src/components/NSInputText.module.css +27 -27
- package/src/components/NSInputText.tsx +69 -69
- package/src/components/NSInputTime.module.css +26 -26
- package/src/components/NSInputTime.tsx +65 -65
- package/src/components/NSLayout.module.css +16 -16
- package/src/components/NSLayout.tsx +30 -30
- package/src/components/NSLayoutHeroBanner.module.css +43 -43
- package/src/components/NSLayoutHeroBanner.tsx +85 -85
- package/src/components/NSLayoutTitle.tsx +25 -25
- package/src/components/NSLinkGreen.module.css +15 -15
- package/src/components/NSLinkGreen.tsx +43 -43
- package/src/components/NSLinkRed.module.css +15 -15
- package/src/components/NSLinkRed.tsx +43 -43
- package/src/components/NSPagination.module.css +24 -24
- package/src/components/NSPagination.tsx +54 -54
- package/src/components/NSParentCard.module.css +34 -34
- package/src/components/NSParentCard.tsx.temp +58 -58
- package/src/components/NSSelectBox.module.css +28 -28
- package/src/components/NSSelectBox.tsx +62 -62
- package/src/components/NSTable.modules.css +76 -76
- package/src/components/NSTable.tsx +64 -64
- package/src/index.tsx +7 -7
- package/src/main.ts +25 -25
- package/src/pages/NSLoginPage.tsx +39 -39
- package/src/react-app-env.d.ts +1 -1
- package/tsconfig.json +37 -37
- package/dist/App.css +0 -0
- package/dist/assets/images/background.svg +0 -9
- package/dist/assets/images/left-vector.png +0 -0
- package/dist/assets/images/left_vector.png +0 -0
- package/dist/assets/images/right-vector.png +0 -0
- package/dist/assets/images/right_vector.png +0 -0
- package/dist/components/NSParentCard.d.ts +0 -0
- package/dist/components/NSParentCard.js +0 -2
- package/dist/components/NSParentCard.js.map +0 -1
- package/dist/index.css +0 -6
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect x="1" y="1" width="18" height="18" rx="3" fill="white" stroke="#848484" stroke-width="2"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="1" y="1" width="18" height="18" rx="3" fill="white" stroke="#848484" stroke-width="2"/>
|
|
3
|
+
</svg>
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Style from "./NSButtonGreen.module.css";
|
|
5
|
-
|
|
6
|
-
interface IProps
|
|
7
|
-
{
|
|
8
|
-
title: string;
|
|
9
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface IState
|
|
13
|
-
{
|
|
14
|
-
title: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface IState { }
|
|
18
|
-
|
|
19
|
-
export class NSButtonGreen extends React.Component<IProps, IState>
|
|
20
|
-
{
|
|
21
|
-
constructor(props: IProps)
|
|
22
|
-
{
|
|
23
|
-
super(props);
|
|
24
|
-
this.state = { title: props.title };
|
|
25
|
-
}
|
|
26
|
-
setTitle(title: string)
|
|
27
|
-
{
|
|
28
|
-
this.setState({ title });
|
|
29
|
-
}
|
|
30
|
-
override render()
|
|
31
|
-
{
|
|
32
|
-
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
33
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Style from "./NSButtonGreen.module.css";
|
|
5
|
+
|
|
6
|
+
interface IProps
|
|
7
|
+
{
|
|
8
|
+
title: string;
|
|
9
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IState
|
|
13
|
+
{
|
|
14
|
+
title: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface IState { }
|
|
18
|
+
|
|
19
|
+
export class NSButtonGreen extends React.Component<IProps, IState>
|
|
20
|
+
{
|
|
21
|
+
constructor(props: IProps)
|
|
22
|
+
{
|
|
23
|
+
super(props);
|
|
24
|
+
this.state = { title: props.title };
|
|
25
|
+
}
|
|
26
|
+
setTitle(title: string)
|
|
27
|
+
{
|
|
28
|
+
this.setState({ title });
|
|
29
|
+
}
|
|
30
|
+
override render()
|
|
31
|
+
{
|
|
32
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
33
|
+
}
|
|
34
34
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Style from "./NSButtonRed.module.css";
|
|
5
|
-
|
|
6
|
-
interface IProps
|
|
7
|
-
{
|
|
8
|
-
title: string;
|
|
9
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface IState
|
|
13
|
-
{
|
|
14
|
-
title: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface IState { }
|
|
18
|
-
|
|
19
|
-
export class NSButtonRed extends React.Component<IProps, IState>
|
|
20
|
-
{
|
|
21
|
-
constructor(props: IProps)
|
|
22
|
-
{
|
|
23
|
-
super(props);
|
|
24
|
-
this.state = { title: props.title };
|
|
25
|
-
}
|
|
26
|
-
setTitle(title: string)
|
|
27
|
-
{
|
|
28
|
-
this.setState({ title });
|
|
29
|
-
}
|
|
30
|
-
override render()
|
|
31
|
-
{
|
|
32
|
-
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_red}>{this.state.title}</button>;
|
|
33
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Style from "./NSButtonRed.module.css";
|
|
5
|
+
|
|
6
|
+
interface IProps
|
|
7
|
+
{
|
|
8
|
+
title: string;
|
|
9
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IState
|
|
13
|
+
{
|
|
14
|
+
title: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface IState { }
|
|
18
|
+
|
|
19
|
+
export class NSButtonRed extends React.Component<IProps, IState>
|
|
20
|
+
{
|
|
21
|
+
constructor(props: IProps)
|
|
22
|
+
{
|
|
23
|
+
super(props);
|
|
24
|
+
this.state = { title: props.title };
|
|
25
|
+
}
|
|
26
|
+
setTitle(title: string)
|
|
27
|
+
{
|
|
28
|
+
this.setState({ title });
|
|
29
|
+
}
|
|
30
|
+
override render()
|
|
31
|
+
{
|
|
32
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_red}>{this.state.title}</button>;
|
|
33
|
+
}
|
|
34
34
|
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Component } from 'react';
|
|
4
|
-
|
|
5
|
-
import Styles from './NSCard.module.css'
|
|
6
|
-
|
|
7
|
-
interface IProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
image: {
|
|
12
|
-
src: string;
|
|
13
|
-
alt: string;
|
|
14
|
-
};
|
|
15
|
-
link?:
|
|
16
|
-
{
|
|
17
|
-
text: string;
|
|
18
|
-
href: string;
|
|
19
|
-
target?: string;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface IStart
|
|
24
|
-
{ }
|
|
25
|
-
|
|
26
|
-
export class NSCard extends Component<IProps, IStart> {
|
|
27
|
-
override render()
|
|
28
|
-
{
|
|
29
|
-
const { title, image, description, link } = this.props;
|
|
30
|
-
return (
|
|
31
|
-
<>
|
|
32
|
-
<article className={Styles.ns_card}>
|
|
33
|
-
<div className={Styles.ns_card_detail_container}>
|
|
34
|
-
<div className={Styles.ns_card_title_img}>
|
|
35
|
-
<h3 className={Styles.card_title}>
|
|
36
|
-
{title}
|
|
37
|
-
</h3>
|
|
38
|
-
<img className={Styles.card_img} src={image.src} alt={image.alt} />
|
|
39
|
-
</div>
|
|
40
|
-
<p className={Styles.card_description}>
|
|
41
|
-
{description}
|
|
42
|
-
</p>
|
|
43
|
-
</div>
|
|
44
|
-
{link &&
|
|
45
|
-
<div >
|
|
46
|
-
<a className={Styles.ns_card_link} href={link.href} target={link.target ?? "_self"} >
|
|
47
|
-
{link.text}
|
|
48
|
-
</a>
|
|
49
|
-
</div>
|
|
50
|
-
}
|
|
51
|
-
</article >
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
|
|
5
|
+
import Styles from './NSCard.module.css'
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
image: {
|
|
12
|
+
src: string;
|
|
13
|
+
alt: string;
|
|
14
|
+
};
|
|
15
|
+
link?:
|
|
16
|
+
{
|
|
17
|
+
text: string;
|
|
18
|
+
href: string;
|
|
19
|
+
target?: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IStart
|
|
24
|
+
{ }
|
|
25
|
+
|
|
26
|
+
export class NSCard extends Component<IProps, IStart> {
|
|
27
|
+
override render()
|
|
28
|
+
{
|
|
29
|
+
const { title, image, description, link } = this.props;
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<article className={Styles.ns_card}>
|
|
33
|
+
<div className={Styles.ns_card_detail_container}>
|
|
34
|
+
<div className={Styles.ns_card_title_img}>
|
|
35
|
+
<h3 className={Styles.card_title}>
|
|
36
|
+
{title}
|
|
37
|
+
</h3>
|
|
38
|
+
<img className={Styles.card_img} src={image.src} alt={image.alt} />
|
|
39
|
+
</div>
|
|
40
|
+
<p className={Styles.card_description}>
|
|
41
|
+
{description}
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
{link &&
|
|
45
|
+
<div >
|
|
46
|
+
<a className={Styles.ns_card_link} href={link.href} target={link.target ?? "_self"} >
|
|
47
|
+
{link.text}
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
}
|
|
51
|
+
</article >
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
55
|
}
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSFooter.module.css";
|
|
5
|
-
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
6
|
-
|
|
7
|
-
interface IProps
|
|
8
|
-
{
|
|
9
|
-
scope: string;
|
|
10
|
-
name: string;
|
|
11
|
-
logo: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface IState
|
|
15
|
-
{
|
|
16
|
-
filters: FilterLinkRow[];
|
|
17
|
-
selected: FilterLinkRow | null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class NSFooter extends React.Component<IProps, IState>
|
|
21
|
-
{
|
|
22
|
-
constructor(props: IProps)
|
|
23
|
-
{
|
|
24
|
-
super(props);
|
|
25
|
-
this.state = {
|
|
26
|
-
filters: [],
|
|
27
|
-
selected: null
|
|
28
|
-
};
|
|
29
|
-
this.hasChild = this.hasChild.bind(this);
|
|
30
|
-
this.render_menu = this.render_menu.bind(this);
|
|
31
|
-
this.render_menuItem = this.render_menuItem.bind(this);
|
|
32
|
-
}
|
|
33
|
-
override componentDidMount(): void
|
|
34
|
-
{
|
|
35
|
-
let server = new NamirasoftAPILinkServer(console.error);
|
|
36
|
-
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
37
|
-
{
|
|
38
|
-
this.setState({ filters });
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
private hasChild(id: number): boolean
|
|
42
|
-
{
|
|
43
|
-
return this.state.filters.filter(f => f.parent_id === id).length > 0;
|
|
44
|
-
}
|
|
45
|
-
override render()
|
|
46
|
-
{
|
|
47
|
-
return (
|
|
48
|
-
<div className={Styles.ns_footer}>
|
|
49
|
-
<div className={`container ${Styles.ns_package_footer}`}>
|
|
50
|
-
<div className={`${Styles.ns_footer_parent_items}`}>
|
|
51
|
-
<div className={`${Styles.ns_footer_project_logo_tablet}`}>
|
|
52
|
-
<a href="/">
|
|
53
|
-
<img src={this.props.logo} alt='Logo' width={80} height={80} />
|
|
54
|
-
</a>
|
|
55
|
-
</div>
|
|
56
|
-
<div className={`${Styles.ns_footer_menu_container}`}>
|
|
57
|
-
{this.render_menu(0, null)}
|
|
58
|
-
</div>
|
|
59
|
-
<div className={`${Styles.ns_footer_namira_logo_tablet}`}>
|
|
60
|
-
<a href="/">
|
|
61
|
-
<img src="https://static.namirasoft.com/logo/namirasoft/name.png" alt='Namira Software Corporation Logo' width={80} height={80} />
|
|
62
|
-
</a>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div className={`${Styles.ns_footer_logos_mobile}`}>
|
|
66
|
-
<div>
|
|
67
|
-
<a href="/">
|
|
68
|
-
<img src={this.props.logo} alt='Logo' width={80} height={80} />
|
|
69
|
-
</a>
|
|
70
|
-
</div>
|
|
71
|
-
<div>
|
|
72
|
-
<a href="/">
|
|
73
|
-
<img src="https://static.namirasoft.com/logo/namirasoft/name.png" alt='Namira Software Corporation Logo' width={80} height={80} />
|
|
74
|
-
</a>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div className={`${Styles.ns_footer_copyright}`}>
|
|
78
|
-
<span> ©Copyright 2010 - {new Date().getFullYear()} </span>
|
|
79
|
-
<a href="https://namirasoft.com/" target="_blank" rel="noopener noreferrer"> Namira Software Corporation</a>. All rights reserved.
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
private render_menu(level: number, parent_id: number | null)
|
|
86
|
-
{
|
|
87
|
-
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id === parent_id);
|
|
88
|
-
return (
|
|
89
|
-
<>
|
|
90
|
-
{(fs?.map(f => this.render_menuItem(level, f)))}
|
|
91
|
-
</>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
95
|
-
{
|
|
96
|
-
if (this.hasChild(filter.id))
|
|
97
|
-
{
|
|
98
|
-
return (<>
|
|
99
|
-
<ul
|
|
100
|
-
id={`dropdown_parent${filter.id}`}>
|
|
101
|
-
{filter.name}
|
|
102
|
-
{this.render_menu(1, filter.id)}
|
|
103
|
-
</ul>
|
|
104
|
-
</>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
else if (level === 0)
|
|
108
|
-
{
|
|
109
|
-
return (<>
|
|
110
|
-
<ul
|
|
111
|
-
id={`dropdown_parent${filter.id}`}>
|
|
112
|
-
{filter.name}
|
|
113
|
-
</ul>
|
|
114
|
-
</>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
else
|
|
118
|
-
{
|
|
119
|
-
return (
|
|
120
|
-
<a href={filter.link?.url}><li className="mb-2">{filter.name}</li></a>
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Styles from "./NSFooter.module.css";
|
|
5
|
+
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
scope: string;
|
|
10
|
+
name: string;
|
|
11
|
+
logo: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IState
|
|
15
|
+
{
|
|
16
|
+
filters: FilterLinkRow[];
|
|
17
|
+
selected: FilterLinkRow | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class NSFooter extends React.Component<IProps, IState>
|
|
21
|
+
{
|
|
22
|
+
constructor(props: IProps)
|
|
23
|
+
{
|
|
24
|
+
super(props);
|
|
25
|
+
this.state = {
|
|
26
|
+
filters: [],
|
|
27
|
+
selected: null
|
|
28
|
+
};
|
|
29
|
+
this.hasChild = this.hasChild.bind(this);
|
|
30
|
+
this.render_menu = this.render_menu.bind(this);
|
|
31
|
+
this.render_menuItem = this.render_menuItem.bind(this);
|
|
32
|
+
}
|
|
33
|
+
override componentDidMount(): void
|
|
34
|
+
{
|
|
35
|
+
let server = new NamirasoftAPILinkServer(console.error);
|
|
36
|
+
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
37
|
+
{
|
|
38
|
+
this.setState({ filters });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
private hasChild(id: number): boolean
|
|
42
|
+
{
|
|
43
|
+
return this.state.filters.filter(f => f.parent_id === id).length > 0;
|
|
44
|
+
}
|
|
45
|
+
override render()
|
|
46
|
+
{
|
|
47
|
+
return (
|
|
48
|
+
<div className={Styles.ns_footer}>
|
|
49
|
+
<div className={`container ${Styles.ns_package_footer}`}>
|
|
50
|
+
<div className={`${Styles.ns_footer_parent_items}`}>
|
|
51
|
+
<div className={`${Styles.ns_footer_project_logo_tablet}`}>
|
|
52
|
+
<a href="/">
|
|
53
|
+
<img src={this.props.logo} alt='Logo' width={80} height={80} />
|
|
54
|
+
</a>
|
|
55
|
+
</div>
|
|
56
|
+
<div className={`${Styles.ns_footer_menu_container}`}>
|
|
57
|
+
{this.render_menu(0, null)}
|
|
58
|
+
</div>
|
|
59
|
+
<div className={`${Styles.ns_footer_namira_logo_tablet}`}>
|
|
60
|
+
<a href="/">
|
|
61
|
+
<img src="https://static.namirasoft.com/logo/namirasoft/name.png" alt='Namira Software Corporation Logo' width={80} height={80} />
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div className={`${Styles.ns_footer_logos_mobile}`}>
|
|
66
|
+
<div>
|
|
67
|
+
<a href="/">
|
|
68
|
+
<img src={this.props.logo} alt='Logo' width={80} height={80} />
|
|
69
|
+
</a>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<a href="/">
|
|
73
|
+
<img src="https://static.namirasoft.com/logo/namirasoft/name.png" alt='Namira Software Corporation Logo' width={80} height={80} />
|
|
74
|
+
</a>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div className={`${Styles.ns_footer_copyright}`}>
|
|
78
|
+
<span> ©Copyright 2010 - {new Date().getFullYear()} </span>
|
|
79
|
+
<a href="https://namirasoft.com/" target="_blank" rel="noopener noreferrer"> Namira Software Corporation</a>. All rights reserved.
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
private render_menu(level: number, parent_id: number | null)
|
|
86
|
+
{
|
|
87
|
+
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id === parent_id);
|
|
88
|
+
return (
|
|
89
|
+
<>
|
|
90
|
+
{(fs?.map(f => this.render_menuItem(level, f)))}
|
|
91
|
+
</>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
95
|
+
{
|
|
96
|
+
if (this.hasChild(filter.id))
|
|
97
|
+
{
|
|
98
|
+
return (<>
|
|
99
|
+
<ul
|
|
100
|
+
id={`dropdown_parent${filter.id}`}>
|
|
101
|
+
{filter.name}
|
|
102
|
+
{this.render_menu(1, filter.id)}
|
|
103
|
+
</ul>
|
|
104
|
+
</>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
else if (level === 0)
|
|
108
|
+
{
|
|
109
|
+
return (<>
|
|
110
|
+
<ul
|
|
111
|
+
id={`dropdown_parent${filter.id}`}>
|
|
112
|
+
{filter.name}
|
|
113
|
+
</ul>
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
{
|
|
119
|
+
return (
|
|
120
|
+
<a href={filter.link?.url}><li className="mb-2">{filter.name}</li></a>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
124
|
}
|