namirasoft-site-react 1.3.443 → 1.3.444

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.
@@ -1,31 +1,34 @@
1
- import { IBaseComponentProps } from "../main";
1
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
2
  import Styles from "./NSCardScreenshot.module.css"
3
3
 
4
- export interface NSCardScreenshotProps extends IBaseComponentProps {
5
- key: number;
6
- screenshot: string;
7
- timeSpent: string;
8
- onDelete: () => void;
4
+ export interface NSCardScreenshotProps extends IBaseComponentProps
5
+ {
6
+ key: number;
7
+ screenshot: string;
8
+ timeSpent: string;
9
+ onDelete: () => void;
9
10
  };
10
11
 
11
- const NSCardScreenshot = (props: NSCardScreenshotProps) => {
12
- return (
13
- <div className={`${Styles.card_screenshot} ${props.classList?.join(' ')}`} style={props.style}>
14
- <div className={Styles.card_screenshot_header}>
15
- <span className={Styles.timeSpent}>{props.timeSpent}</span>
16
- <div onClick={() => {
17
- if (props.onDelete)
18
- props.onDelete()
19
- }}
20
- className={Styles.deleteButton}>
21
- <img src="https://static.namirasoft.com/image/concept/delete/blue.svg" alt="" />
22
- </div>
23
- </div>
24
- <div className={Styles.screenshot_imageSection}>
25
- <img src={props.screenshot} alt="Screenshot" className={Styles.image} />
26
- </div>
27
- </div>
28
- );
12
+ const NSCardScreenshot = (props: NSCardScreenshotProps) =>
13
+ {
14
+ return (
15
+ <div className={`${Styles.card_screenshot} ${props.classList?.join(' ')}`} style={props.style}>
16
+ <div className={Styles.card_screenshot_header}>
17
+ <span className={Styles.timeSpent}>{props.timeSpent}</span>
18
+ <div onClick={() =>
19
+ {
20
+ if (props.onDelete)
21
+ props.onDelete()
22
+ }}
23
+ className={Styles.deleteButton}>
24
+ <img src="https://static.namirasoft.com/image/concept/delete/blue.svg" alt="" />
25
+ </div>
26
+ </div>
27
+ <div className={Styles.screenshot_imageSection}>
28
+ <img src={props.screenshot} alt="Screenshot" className={Styles.image} />
29
+ </div>
30
+ </div>
31
+ );
29
32
  };
30
33
 
31
34
  export default NSCardScreenshot;
@@ -1,114 +1,109 @@
1
1
  import { Bar } from 'react-chartjs-2';
2
- import {
3
- Chart as ChartJS,
4
- CategoryScale,
5
- LinearScale,
6
- BarElement,
7
- Title,
8
- Tooltip,
9
- Legend,
10
- ChartOptions,
11
- } from 'chart.js';
12
- import { IBaseComponentProps } from '../main';
2
+ import { Chart as ChartJS, CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend, ChartOptions, } from 'chart.js';
3
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
13
4
  import Styles from "./NSChartColumn.module.css"
14
5
 
15
6
  ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend);
16
7
 
17
- export interface NSChartColumnProps extends IBaseComponentProps {
18
- labels: string[];
19
- datasets: number[];
20
- range: {
21
- min: number,
22
- max: number,
23
- }
24
- yGrid?: boolean;
25
- height?: number;
26
- width?: number;
8
+ export interface NSChartColumnProps extends IBaseComponentProps
9
+ {
10
+ labels: string[];
11
+ datasets: number[];
12
+ range: {
13
+ min: number,
14
+ max: number,
15
+ }
16
+ yGrid?: boolean;
17
+ height?: number;
18
+ width?: number;
27
19
  }
28
20
 
29
- const NSChartColumn = (props: NSChartColumnProps) => {
30
- const data = {
31
- labels: props.labels,
32
- datasets: [
33
- {
34
- label: 'Dataset 1',
35
- data: props.datasets,
36
- backgroundColor: '#3354F4',
37
- borderRadius: 10,
38
- barThickness: 12,
39
- borderSkipped: false,
40
- },
41
- ],
42
- };
21
+ const NSChartColumn = (props: NSChartColumnProps) =>
22
+ {
23
+ const data = {
24
+ labels: props.labels,
25
+ datasets: [
26
+ {
27
+ label: 'Dataset 1',
28
+ data: props.datasets,
29
+ backgroundColor: '#3354F4',
30
+ borderRadius: 10,
31
+ barThickness: 12,
32
+ borderSkipped: false,
33
+ },
34
+ ],
35
+ };
43
36
 
44
- const options: ChartOptions<'bar'> = {
45
- responsive: true,
46
- maintainAspectRatio: false,
47
- plugins: {
48
- legend: {
49
- display: false,
50
- },
51
- tooltip: {
52
- enabled: true,
53
- callbacks: {
54
- label: function (context) {
55
- return `$${context.raw}`;
56
- },
57
- },
58
- },
59
- },
60
- scales: {
61
- x: {
62
- ticks: {
63
- font: {
64
- size: 8,
65
- weight: 700
66
- },
67
- color: '#141B5C',
68
- maxRotation: 554,
69
- minRotation: 0,
70
- },
71
- grid: {
72
- display: false,
73
- },
74
- border: {
75
- display: false,
76
- }
77
- },
78
- y: {
79
- min: props.range.min,
80
- max: props.range.max,
81
- ticks: {
82
- callback: function (value) {
83
- return `$${value}`;
84
- },
85
- font: {
86
- size: 8,
87
- weight: 700,
88
- },
89
- color: '#141B5C',
90
- },
91
- grid: {
92
- display: props.yGrid,
93
- color: "#E6EEF5"
94
- },
95
- border: {
96
- display: false,
97
- },
98
- },
99
- },
100
- };
37
+ const options: ChartOptions<'bar'> = {
38
+ responsive: true,
39
+ maintainAspectRatio: false,
40
+ plugins: {
41
+ legend: {
42
+ display: false,
43
+ },
44
+ tooltip: {
45
+ enabled: true,
46
+ callbacks: {
47
+ label: function (context)
48
+ {
49
+ return `$${context.raw}`;
50
+ },
51
+ },
52
+ },
53
+ },
54
+ scales: {
55
+ x: {
56
+ ticks: {
57
+ font: {
58
+ size: 8,
59
+ weight: 700
60
+ },
61
+ color: '#141B5C',
62
+ maxRotation: 554,
63
+ minRotation: 0,
64
+ },
65
+ grid: {
66
+ display: false,
67
+ },
68
+ border: {
69
+ display: false,
70
+ }
71
+ },
72
+ y: {
73
+ min: props.range.min,
74
+ max: props.range.max,
75
+ ticks: {
76
+ callback: function (value)
77
+ {
78
+ return `$${value}`;
79
+ },
80
+ font: {
81
+ size: 8,
82
+ weight: 700,
83
+ },
84
+ color: '#141B5C',
85
+ },
86
+ grid: {
87
+ display: props.yGrid,
88
+ color: "#E6EEF5"
89
+ },
90
+ border: {
91
+ display: false,
92
+ },
93
+ },
94
+ },
95
+ };
101
96
 
102
- return (
103
- <div style={props.style} className={`${Styles.chart_column_container} ${props.classList?.join(" ")}`}>
104
- <Bar
105
- data={data}
106
- options={options}
107
- height={props.height ? props.height : 250}
108
- width={props.width ? props.width : 320}
109
- />
110
- </div>
111
- );
97
+ return (
98
+ <div style={props.style} className={`${Styles.chart_column_container} ${props.classList?.join(" ")}`}>
99
+ <Bar
100
+ data={data}
101
+ options={options}
102
+ height={props.height ? props.height : 250}
103
+ width={props.width ? props.width : 320}
104
+ />
105
+ </div>
106
+ );
112
107
  };
113
108
 
114
109
  export default NSChartColumn;
@@ -2,7 +2,7 @@
2
2
  import { Doughnut } from 'react-chartjs-2';
3
3
  import
4
4
  {
5
- Chart as ChartJS,
5
+ Chart as ChartJS,
6
6
  ArcElement,
7
7
  Tooltip,
8
8
  Legend,
@@ -17,7 +17,7 @@ import
17
17
  Plugin,
18
18
  ArcElement as ArcElementType
19
19
  } from 'chart.js';
20
- import { IBaseComponentProps } from '../main';
20
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
21
21
 
22
22
  ChartJS.register(
23
23
  ArcElement, Tooltip, Legend, Title,
@@ -1,94 +1,98 @@
1
1
  import { Table, Progress } from 'antd';
2
2
  import { ColumnType } from 'antd/es/table';
3
- import { IBaseComponentProps } from '../main';
3
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
4
4
  import Styles from "./NSChartTable.module.css"
5
5
 
6
- interface DataType {
7
- key: string;
8
- job: string;
9
- totalHours: number;
10
- percentage: number;
11
- cost: number;
12
- income: number;
13
- benefit: number;
6
+ interface DataType
7
+ {
8
+ key: string;
9
+ job: string;
10
+ totalHours: number;
11
+ percentage: number;
12
+ cost: number;
13
+ income: number;
14
+ benefit: number;
14
15
  }
15
16
 
16
- interface CustomTableProps extends IBaseComponentProps {
17
- data: DataType[];
17
+ interface CustomTableProps extends IBaseComponentProps
18
+ {
19
+ data: DataType[];
18
20
  }
19
21
 
20
- const NSChartTable = (props: CustomTableProps) => {
21
- const getColor = (percentage: number) => {
22
- if (percentage >= 75) return '#368F01';
23
- if (percentage >= 60) return ' #44B400';
24
- if (percentage >= 50) return '#56E500';
25
- if (percentage >= 25) return '#FAFF00';
26
- return 'red';
27
- };
22
+ const NSChartTable = (props: CustomTableProps) =>
23
+ {
24
+ const getColor = (percentage: number) =>
25
+ {
26
+ if (percentage >= 75) return '#368F01';
27
+ if (percentage >= 60) return ' #44B400';
28
+ if (percentage >= 50) return '#56E500';
29
+ if (percentage >= 25) return '#FAFF00';
30
+ return 'red';
31
+ };
28
32
 
29
- const columns: ColumnType<DataType>[] = [
30
- {
31
- title: '',
32
- dataIndex: 'job',
33
- key: 'job',
34
- },
35
- {
36
- title: 'Total Hours',
37
- dataIndex: 'totalHours',
38
- key: 'totalHours',
39
- render: (text: number) => <div>{text}</div>,
40
- },
41
- {
42
- title: 'Percentage',
43
- dataIndex: 'percentage',
44
- key: 'percentage',
45
- render: (text: number) => <div>{text}%</div>,
46
- },
47
- {
48
- title: 'Cost',
49
- dataIndex: 'cost',
50
- key: 'cost',
51
- render: (text: number) => <div>${text}</div>,
52
- },
53
- {
54
- title: 'Income',
55
- dataIndex: 'income',
56
- key: 'income',
57
- render: (text: number) => <div>${text}</div>,
58
- },
59
- {
60
- title: 'Benefit',
61
- dataIndex: 'benefit',
62
- key: 'benefit',
63
- render: (text: number) => <div>${text}</div>,
64
- },
65
- {
66
- title: '',
67
- dataIndex: 'totalHours',
68
- key: 'chart',
69
- render: (totalHours: number, record: DataType) => (
70
- <Progress
71
- percent={(totalHours / 8) * 100}
72
- showInfo={false}
73
- strokeColor={getColor(record.percentage)}
74
- strokeWidth={16}
75
- size={{ width: 310, height: 16 }}
76
- />
77
- ),
78
- },
79
- ];
33
+ const columns: ColumnType<DataType>[] = [
34
+ {
35
+ title: '',
36
+ dataIndex: 'job',
37
+ key: 'job',
38
+ },
39
+ {
40
+ title: 'Total Hours',
41
+ dataIndex: 'totalHours',
42
+ key: 'totalHours',
43
+ render: (text: number) => <div>{text}</div>,
44
+ },
45
+ {
46
+ title: 'Percentage',
47
+ dataIndex: 'percentage',
48
+ key: 'percentage',
49
+ render: (text: number) => <div>{text}%</div>,
50
+ },
51
+ {
52
+ title: 'Cost',
53
+ dataIndex: 'cost',
54
+ key: 'cost',
55
+ render: (text: number) => <div>${text}</div>,
56
+ },
57
+ {
58
+ title: 'Income',
59
+ dataIndex: 'income',
60
+ key: 'income',
61
+ render: (text: number) => <div>${text}</div>,
62
+ },
63
+ {
64
+ title: 'Benefit',
65
+ dataIndex: 'benefit',
66
+ key: 'benefit',
67
+ render: (text: number) => <div>${text}</div>,
68
+ },
69
+ {
70
+ title: '',
71
+ dataIndex: 'totalHours',
72
+ key: 'chart',
73
+ render: (totalHours: number, record: DataType) => (
74
+ <Progress
75
+ percent={(totalHours / 8) * 100}
76
+ showInfo={false}
77
+ strokeColor={getColor(record.percentage)}
78
+ strokeWidth={16}
79
+ size={{ width: 310, height: 16 }}
80
+ />
81
+ ),
82
+ },
83
+ ];
80
84
 
81
- return (
82
- <div>
83
- <Table
84
- columns={columns}
85
- dataSource={props.data}
86
- pagination={false}
87
- scroll={{ x: 800 }}
88
- rowClassName={() => Styles.custom_row}
89
- />
90
- </div>
91
- );
85
+ return (
86
+ <div>
87
+ <Table
88
+ columns={columns}
89
+ dataSource={props.data}
90
+ pagination={false}
91
+ scroll={{ x: 800 }}
92
+ rowClassName={() => Styles.custom_row}
93
+ />
94
+ </div>
95
+ );
92
96
  };
93
97
 
94
98
  export default NSChartTable;
@@ -1,58 +1,65 @@
1
1
  import { useState } from "react";
2
- import { IBaseComponentProps, NSButtonBlue } from "../main";
2
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { NSBoxRadio } from "./NSBoxRadio";
4
- import Styles from "./NSDownload.module.css"
5
4
  import { NSLine } from "./NSLine";
5
+ import { NSButtonBlue } from "./NSButtonBlue";
6
+ import Styles from "./NSDownload.module.css"
6
7
 
7
- export interface NSDownloadProps extends IBaseComponentProps {
8
- releaseDate: string;
8
+ export interface NSDownloadProps extends IBaseComponentProps
9
+ {
10
+ releaseDate: string;
9
11
  }
10
12
 
11
- function NSDownload(props: NSDownloadProps) {
12
- const [state, setState] = useState("32-bit");
13
+ function NSDownload(props: NSDownloadProps)
14
+ {
15
+ const [state, setState] = useState("32-bit");
13
16
 
14
- return (
15
- <div className={`${Styles.download_parent} ${props.classList?.join(' ')}`}>
16
- <div className={Styles.download_header}>
17
- <h3 style={{ color: "#141B5C" }}>Choose Your Windows Architecture</h3>
18
- <div className={Styles.radio_group}>
19
- <NSBoxRadio
20
- title={"32-bit"}
21
- required={false}
22
- isSelected={state === "32-bit"}
23
- onChanged={(event) => {
24
- let value = event.getValue();
25
- if (value) {
26
- setState("32-bit");
27
- }
28
- }}
29
- classList={[Styles.radio_button]}
30
- />
31
- <NSBoxRadio
32
- title={"64-bit"}
33
- required={false}
34
- isSelected={state === "64-bit"}
35
- onChanged={(event) => {
36
- let value = event.getValue();
37
- if (value) {
38
- setState("64-bit");
39
- }
40
- }}
41
- classList={[Styles.radio_button]}
42
- />
43
- </div>
44
- </div>
45
- <NSLine />
46
- <div className={Styles.download_detail}>
47
- <h4 style={{ color: "#141B5C" }}>For Windows 7 and higher, Windows Server 2008 R2 and higher.</h4>
48
- <div>
49
- <p style={{ marginBottom: "0" }}>Latest Version</p>
50
- <p style={{ marginBottom: "0" }}>Release Date: {props.releaseDate}</p>
51
- </div>
52
- <NSButtonBlue title="Download" onClick={() => { }} classList={[Styles.download_button]} />
53
- </div>
54
- </div>
55
- );
17
+ return (
18
+ <div className={`${Styles.download_parent} ${props.classList?.join(' ')}`}>
19
+ <div className={Styles.download_header}>
20
+ <h3 style={{ color: "#141B5C" }}>Choose Your Windows Architecture</h3>
21
+ <div className={Styles.radio_group}>
22
+ <NSBoxRadio
23
+ title={"32-bit"}
24
+ required={false}
25
+ isSelected={state === "32-bit"}
26
+ onChanged={(event) =>
27
+ {
28
+ let value = event.getValue();
29
+ if (value)
30
+ {
31
+ setState("32-bit");
32
+ }
33
+ }}
34
+ classList={[Styles.radio_button]}
35
+ />
36
+ <NSBoxRadio
37
+ title={"64-bit"}
38
+ required={false}
39
+ isSelected={state === "64-bit"}
40
+ onChanged={(event) =>
41
+ {
42
+ let value = event.getValue();
43
+ if (value)
44
+ {
45
+ setState("64-bit");
46
+ }
47
+ }}
48
+ classList={[Styles.radio_button]}
49
+ />
50
+ </div>
51
+ </div>
52
+ <NSLine />
53
+ <div className={Styles.download_detail}>
54
+ <h4 style={{ color: "#141B5C" }}>For Windows 7 and higher, Windows Server 2008 R2 and higher.</h4>
55
+ <div>
56
+ <p style={{ marginBottom: "0" }}>Latest Version</p>
57
+ <p style={{ marginBottom: "0" }}>Release Date: {props.releaseDate}</p>
58
+ </div>
59
+ <NSButtonBlue title="Download" onClick={() => { }} classList={[Styles.download_button]} />
60
+ </div>
61
+ </div>
62
+ );
56
63
  }
57
64
 
58
65
  export default NSDownload;
@@ -61,7 +61,7 @@
61
61
  display: flex;
62
62
  flex-direction: row;
63
63
  flex-wrap: wrap;
64
- justify-content: space-between;
64
+ justify-content: center;
65
65
  align-items: center;
66
66
  width: 100%;
67
67
  gap: 16px;
@@ -82,6 +82,12 @@
82
82
  justify-content: center
83
83
  }
84
84
 
85
+ @media screen and (min-width: 420px) {
86
+ .ns_button {
87
+ justify-content: space-between;
88
+ }
89
+ }
90
+
85
91
  @media screen and (min-width: 992px) {
86
92
  .ns_table {
87
93
  color: #000000;