namirasoft-site-react 1.3.436 → 1.3.438
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 +9 -4
- package/dist/App.js.map +1 -1
- package/dist/components/NSAssistantButton.js +1 -3
- package/dist/components/NSAssistantButton.js.map +1 -1
- package/dist/components/NSBoxBoolean.module.css +2 -0
- package/dist/components/NSBoxCombo.js +1 -2
- package/dist/components/NSBoxCombo.js.map +1 -1
- package/dist/components/NSBoxDate.module.css +2 -1
- package/dist/components/NSBoxDateTime.js +1 -1
- package/dist/components/NSBoxDateTime.js.map +1 -1
- package/dist/components/NSBoxDateTime.module.css +41 -0
- package/dist/components/NSBoxDouble.js +1 -2
- package/dist/components/NSBoxDouble.js.map +1 -1
- package/dist/components/NSBoxDuration.js +1 -2
- package/dist/components/NSBoxDuration.js.map +1 -1
- package/dist/components/NSBoxEmail.js +1 -2
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxEntity.js +1 -2
- package/dist/components/NSBoxEntity.js.map +1 -1
- package/dist/components/NSBoxErrorNotifier.js +1 -2
- package/dist/components/NSBoxErrorNotifier.js.map +1 -1
- package/dist/components/NSBoxIPV4.js +1 -2
- package/dist/components/NSBoxIPV4.js.map +1 -1
- package/dist/components/NSBoxIPV6.js +1 -2
- package/dist/components/NSBoxIPV6.js.map +1 -1
- package/dist/components/NSBoxInteger.js +1 -2
- package/dist/components/NSBoxInteger.js.map +1 -1
- package/dist/components/NSBoxPassword.js +1 -2
- package/dist/components/NSBoxPassword.js.map +1 -1
- package/dist/components/NSBoxPhone.js +1 -2
- package/dist/components/NSBoxPhone.js.map +1 -1
- package/dist/components/NSBoxPrice.js +1 -2
- package/dist/components/NSBoxPrice.js.map +1 -1
- package/dist/components/NSBoxSearch.js +1 -1
- package/dist/components/NSBoxString.js +1 -2
- package/dist/components/NSBoxString.js.map +1 -1
- package/dist/components/NSBoxTextArea.js +1 -2
- package/dist/components/NSBoxTextArea.js.map +1 -1
- package/dist/components/NSBoxTime.js +1 -2
- package/dist/components/NSBoxTime.js.map +1 -1
- package/dist/components/NSCopyToClipboard.js +1 -2
- package/dist/components/NSCopyToClipboard.js.map +1 -1
- package/dist/components/NSLine.js +2 -2
- package/dist/components/NSLine.js.map +1 -1
- package/dist/components/NSLine.module.css +14 -0
- package/dist/components/NSRange.d.ts +7 -1
- package/dist/components/NSRange.js +34 -3
- package/dist/components/NSRange.js.map +1 -1
- package/dist/components/NSRange.module.css +25 -0
- package/dist/components/NSTabPage.module.css +0 -1
- package/dist/pages/NSNotFoundPage.module.css +2 -2
- package/package.json +2 -2
- package/src/App.tsx +18 -6
- package/src/components/NSAssistantButton.tsx +2 -4
- package/src/components/NSBoxBoolean.module.css +2 -0
- package/src/components/NSBoxCombo.tsx +1 -2
- package/src/components/NSBoxDate.module.css +2 -1
- package/src/components/NSBoxDateTime.module.css +41 -0
- package/src/components/NSBoxDateTime.tsx +1 -1
- package/src/components/NSBoxDouble.tsx +1 -2
- package/src/components/NSBoxDuration.tsx +1 -2
- package/src/components/NSBoxEmail.tsx +1 -2
- package/src/components/NSBoxEntity.tsx +1 -2
- package/src/components/NSBoxErrorNotifier.tsx +1 -2
- package/src/components/NSBoxIPV4.tsx +1 -2
- package/src/components/NSBoxIPV6.tsx +1 -2
- package/src/components/NSBoxInteger.tsx +1 -2
- package/src/components/NSBoxPassword.tsx +1 -2
- package/src/components/NSBoxPhone.tsx +1 -2
- package/src/components/NSBoxPrice.tsx +1 -2
- package/src/components/NSBoxSearch.tsx +1 -1
- package/src/components/NSBoxString.tsx +1 -2
- package/src/components/NSBoxTextArea.tsx +1 -2
- package/src/components/NSBoxTime.tsx +1 -2
- package/src/components/NSCopyToClipboard.tsx +1 -2
- package/src/components/NSLine.module.css +14 -0
- package/src/components/NSLine.tsx +4 -8
- package/src/components/NSRange.module.css +25 -0
- package/src/components/NSRange.tsx +71 -5
- package/src/components/NSTabPage.module.css +0 -1
- package/src/pages/NSNotFoundPage.module.css +2 -2
- package/dist/assets/images/404 image.svg +0 -9
- package/dist/assets/images/404 image_mobile.svg +0 -9
- package/dist/assets/images/arrow.svg +0 -3
- package/dist/assets/images/close-vector.png +0 -0
- package/dist/assets/images/danger.svg +0 -3
- package/dist/assets/images/exit.svg +0 -3
- package/dist/assets/images/icon-copy.png +0 -0
- package/dist/assets/images/icon-fullscreen.png +0 -0
- package/dist/assets/images/icon-input-copy.svg +0 -3
- package/dist/assets/images/icon-input-date.svg +0 -9
- package/dist/assets/images/icon-input-duration.svg +0 -9
- package/dist/assets/images/icon-input-email.svg +0 -9
- package/dist/assets/images/icon-input-float.svg +0 -9
- package/dist/assets/images/icon-input-integer.svg +0 -9
- package/dist/assets/images/icon-input-ip.svg +0 -9
- package/dist/assets/images/icon-input-phone.svg +0 -9
- package/dist/assets/images/icon-input-price.svg +0 -9
- package/dist/assets/images/icon-input-search.svg +0 -3
- package/dist/assets/images/icon-input-string.svg +0 -9
- package/dist/assets/images/icon-input-text.svg +0 -9
- package/dist/assets/images/icon-input-time.svg +0 -9
- package/dist/assets/images/icon-logout.png +0 -0
- package/dist/assets/images/icon-notification.png +0 -0
- package/dist/assets/images/icon-select-box.svg +0 -3
- package/dist/assets/images/line.png +0 -0
- package/dist/assets/images/logo.svg +0 -9
- package/dist/assets/images/map_location.png +0 -0
- package/dist/assets/images/menu.svg +0 -3
- package/dist/assets/images/namira.svg +0 -9
- package/dist/assets/images/rectangle.svg +0 -3
- package/dist/assets/images/verify.png +0 -0
- package/src/assets/images/404 image.svg +0 -9
- package/src/assets/images/404 image_mobile.svg +0 -9
- package/src/assets/images/arrow.svg +0 -3
- package/src/assets/images/close-vector.png +0 -0
- package/src/assets/images/danger.svg +0 -3
- package/src/assets/images/exit.svg +0 -3
- package/src/assets/images/icon-copy.png +0 -0
- package/src/assets/images/icon-fullscreen.png +0 -0
- package/src/assets/images/icon-input-copy.svg +0 -3
- package/src/assets/images/icon-input-date.svg +0 -9
- package/src/assets/images/icon-input-duration.svg +0 -9
- package/src/assets/images/icon-input-email.svg +0 -9
- package/src/assets/images/icon-input-float.svg +0 -9
- package/src/assets/images/icon-input-integer.svg +0 -9
- package/src/assets/images/icon-input-ip.svg +0 -9
- package/src/assets/images/icon-input-phone.svg +0 -9
- package/src/assets/images/icon-input-price.svg +0 -9
- package/src/assets/images/icon-input-search.svg +0 -3
- package/src/assets/images/icon-input-string.svg +0 -9
- package/src/assets/images/icon-input-text.svg +0 -9
- package/src/assets/images/icon-input-time.svg +0 -9
- package/src/assets/images/icon-logout.png +0 -0
- package/src/assets/images/icon-notification.png +0 -0
- package/src/assets/images/icon-select-box.svg +0 -3
- package/src/assets/images/line.png +0 -0
- package/src/assets/images/logo.svg +0 -9
- package/src/assets/images/map_location.png +0 -0
- package/src/assets/images/menu.svg +0 -3
- package/src/assets/images/namira.svg +0 -9
- package/src/assets/images/rectangle.svg +0 -3
- package/src/assets/images/verify.png +0 -0
|
@@ -7,7 +7,6 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
|
7
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
8
|
import { NSAssistantButton } from "./NSAssistantButton";
|
|
9
9
|
import Styles from "./NSBox.module.css";
|
|
10
|
-
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
11
10
|
|
|
12
11
|
export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
13
12
|
{
|
|
@@ -95,7 +94,7 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
95
94
|
type="email"
|
|
96
95
|
className={Styles.ns_input}
|
|
97
96
|
placeholder={this.props.placeholder}
|
|
98
|
-
style={{ background: `url(
|
|
97
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/email.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
99
98
|
/>
|
|
100
99
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
101
100
|
</div>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import Styles from "./NSBoxEntity.module.css";
|
|
4
4
|
import { Select, Space } from 'antd';
|
|
5
|
-
import IconSelectBox from '../assets/images/icon-select-box.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { Validator } from "../Validator";
|
|
@@ -172,7 +171,7 @@ export class NSBoxEntity<Data> extends React.Component<INSBoxEntityProps<Data>,
|
|
|
172
171
|
{option.data.desc}
|
|
173
172
|
</Space>
|
|
174
173
|
)}
|
|
175
|
-
suffixIcon={<img src=
|
|
174
|
+
suffixIcon={<img src="https://static.namirasoft.com/image/concept/arrow/down/blue.svg" alt="SelectBox Icon" />}
|
|
176
175
|
/>
|
|
177
176
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
178
177
|
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Styles from "./NSBoxErrorNotifier.module.css";
|
|
2
|
-
import Danger from '../assets/images/danger.svg';
|
|
3
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
3
|
|
|
5
4
|
export interface INSBoxErrorNotifierProps extends IBaseComponentProps
|
|
@@ -21,7 +20,7 @@ export function NSBoxErrorNotifier(props: INSBoxErrorNotifierProps)
|
|
|
21
20
|
<div id={props.id} className="d-flex justify-content-start align-items-center gap-2 ms-2">
|
|
22
21
|
<img
|
|
23
22
|
className={""}
|
|
24
|
-
src=
|
|
23
|
+
src="https://static.namirasoft.com/image/concept/danger/red.svg"
|
|
25
24
|
alt="Error Icon"
|
|
26
25
|
width={13}
|
|
27
26
|
height={13}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputIP from '../assets/images/icon-input-ip.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
@@ -87,7 +86,7 @@ export class NSBoxIPV4 extends React.Component<INSBoxIPV4Props, INSBoxIPV4State>
|
|
|
87
86
|
maxLength={15}
|
|
88
87
|
size={15}
|
|
89
88
|
pattern={IPV4_PATTERN}
|
|
90
|
-
style={{ background: `url(
|
|
89
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/ipv4%266.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
91
90
|
/>
|
|
92
91
|
</div>
|
|
93
92
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputIP from '../assets/images/icon-input-ip.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
@@ -84,7 +83,7 @@ export class NSBoxIPV6 extends React.Component<INSBoxIPV6Props, INSBoxIPV6State>
|
|
|
84
83
|
onChange={this.onChanged}
|
|
85
84
|
onClick={() => this.props.onClicked}
|
|
86
85
|
pattern={IPV6_PATTERN}
|
|
87
|
-
style={{ background: `url(
|
|
86
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/ipv4%266.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
88
87
|
/>
|
|
89
88
|
</div>
|
|
90
89
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputInteger from '../assets/images/icon-input-integer.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationNumberProps } from "../props/IValidationNumberProps";
|
|
8
7
|
import { IValidationProps } from "../props/IValidationProps";
|
|
@@ -80,7 +79,7 @@ export class NSBoxInteger extends React.Component<INSBoxIntegerProps, INSBoxInte
|
|
|
80
79
|
value={this.state.value}
|
|
81
80
|
onChange={this.onChanged}
|
|
82
81
|
onClick={() => this.props.onClicked}
|
|
83
|
-
style={{ background: `url(
|
|
82
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/Integer.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
84
83
|
/>
|
|
85
84
|
</div>
|
|
86
85
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
@@ -80,7 +79,7 @@ export class NSBoxPassword extends React.Component<INSBoxPasswordProps, INSBoxPa
|
|
|
80
79
|
value={this.state.value}
|
|
81
80
|
onChange={this.onChanged}
|
|
82
81
|
onClick={() => this.props.onClicked}
|
|
83
|
-
style={{ background: `url(
|
|
82
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/string.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
84
83
|
/>
|
|
85
84
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
86
85
|
</div>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import PhoneIcon from '../assets/images/icon-input-phone.svg';
|
|
6
5
|
import PhoneInput from 'react-phone-input-2'
|
|
7
6
|
import 'react-phone-input-2/lib/style.css'
|
|
8
7
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
@@ -80,7 +79,7 @@ export class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneSta
|
|
|
80
79
|
inputClass={Styles.PhoneIconns_input}
|
|
81
80
|
placeholder={this.props.placeholder}
|
|
82
81
|
inputStyle={{
|
|
83
|
-
background: `url(
|
|
82
|
+
background: `url("https://static.namirasoft.com/image/concept/nsbox/phone.png") white no-repeat scroll center right 16px`,
|
|
84
83
|
backgroundSize: "24px"
|
|
85
84
|
}}
|
|
86
85
|
/>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputFloat from '../assets/images/icon-input-float.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationNumberProps } from "../props/IValidationNumberProps";
|
|
@@ -82,7 +81,7 @@ export class NSBoxPrice extends React.Component<INSBoxPriceProps, INSBoxPriceSta
|
|
|
82
81
|
onClick={() => this.props.onClicked}
|
|
83
82
|
step="0.01"
|
|
84
83
|
min="0"
|
|
85
|
-
style={{ background: `url(
|
|
84
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/price.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
86
85
|
/>
|
|
87
86
|
</div>
|
|
88
87
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
@@ -93,7 +93,7 @@ export class NSBoxSearch extends React.Component<INSBoxSearchProps, INSBoxSearch
|
|
|
93
93
|
style=
|
|
94
94
|
{{
|
|
95
95
|
background: `url(${"https://static.namirasoft.com/image/concept/search/blue.svg"}) white no-repeat left`,
|
|
96
|
-
backgroundSize: "
|
|
96
|
+
backgroundSize: "24px",
|
|
97
97
|
backgroundPosition: "10px",
|
|
98
98
|
paddingLeft: "48px",
|
|
99
99
|
}}
|
|
@@ -7,7 +7,6 @@ import { Validator } from "../Validator";
|
|
|
7
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
8
|
import { NSAssistantButton } from "./NSAssistantButton";
|
|
9
9
|
import Styles from "./NSBox.module.css";
|
|
10
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
11
10
|
|
|
12
11
|
export interface INSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
13
12
|
{
|
|
@@ -96,7 +95,7 @@ export class NSBoxString extends React.Component<INSBoxStringProps, INSBoxString
|
|
|
96
95
|
value={this.state.value}
|
|
97
96
|
onChange={this.onChanged}
|
|
98
97
|
onClick={() => this.props.onClicked}
|
|
99
|
-
style={{ background: `url(
|
|
98
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/string.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
100
99
|
/>
|
|
101
100
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
102
101
|
</div>
|
|
@@ -7,7 +7,6 @@ import { IValidationProps } from "../props/IValidationProps";
|
|
|
7
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
8
8
|
import { Validator } from "../Validator";
|
|
9
9
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
11
10
|
|
|
12
11
|
export interface INSBoxTextAreaProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
13
12
|
{
|
|
@@ -90,7 +89,7 @@ export class NSBoxTextArea extends React.Component<INSBoxTextAreaProps, INSBoxTe
|
|
|
90
89
|
style={{
|
|
91
90
|
height: !this.props.rows ? "96px" : "",
|
|
92
91
|
background:
|
|
93
|
-
`url(
|
|
92
|
+
`url("https://static.namirasoft.com/image/concept/nsbox/string.png") white no-repeat scroll top right 16px `,
|
|
94
93
|
backgroundPositionY: "12px"
|
|
95
94
|
}}
|
|
96
95
|
cols={this.props.cols}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputTime from '../assets/images/icon-input-time.svg';
|
|
6
5
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
6
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
7
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
@@ -82,7 +81,7 @@ export class NSBoxTime extends React.Component<INSBoxTimeProps, INSBoxTimeState>
|
|
|
82
81
|
onChange={this.onChanged}
|
|
83
82
|
onClick={() => this.props.onClicked}
|
|
84
83
|
step="2"
|
|
85
|
-
style={{ background: `url(
|
|
84
|
+
style={{ background: `url("https://static.namirasoft.com/image/concept/nsbox/time.png") white no-repeat scroll center right 16px`, backgroundSize: "24px" }}
|
|
86
85
|
/>
|
|
87
86
|
</div>
|
|
88
87
|
<NSBoxErrorNotifier error={this.state.error} clearError={() => this.setState({ error: "" })} />
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Styles from "./NSCopyToClipboard.module.css";
|
|
2
|
-
import IconInputString from '../assets/images/icon-input-copy.svg';
|
|
3
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
3
|
|
|
5
4
|
export interface INSCopyToClipboardProps extends IBaseComponentProps
|
|
@@ -24,7 +23,7 @@ export function NSCopyToClipboard(props: INSCopyToClipboardProps)
|
|
|
24
23
|
<p className="m-0">{props.value}</p>
|
|
25
24
|
<img
|
|
26
25
|
className={Styles.ns_copy_to_clipboard_icon}
|
|
27
|
-
src=
|
|
26
|
+
src="https://static.namirasoft.com/image/concept/copy/blue.svg"
|
|
28
27
|
alt="Copy Icon"
|
|
29
28
|
width={24}
|
|
30
29
|
height={24}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.ns_line_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_line {
|
|
10
|
+
border: 1px solid rgb(0, 0, 0);
|
|
11
|
+
border-left: 300px solid transparent;
|
|
12
|
+
border-right: 300px solid transparent;
|
|
13
|
+
width: 80%;
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import Styles from './NSLine.module.css';
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
-
import Line from "../assets/images/line.png";
|
|
4
|
-
|
|
5
3
|
export interface INSLineProps extends IBaseComponentProps
|
|
6
4
|
{
|
|
7
5
|
|
|
@@ -10,10 +8,8 @@ export interface INSLineProps extends IBaseComponentProps
|
|
|
10
8
|
export function NSLine()
|
|
11
9
|
{
|
|
12
10
|
return (
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
height={"max-content"}
|
|
17
|
-
/>
|
|
11
|
+
<div className={Styles.ns_line_container}>
|
|
12
|
+
<hr className={Styles.ns_line}></hr>
|
|
13
|
+
</div>
|
|
18
14
|
);
|
|
19
15
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.ns_range_time_item {
|
|
2
|
+
z-index: 99;
|
|
3
|
+
text-align: center;
|
|
4
|
+
padding: 10px;
|
|
5
|
+
width: 4.166666%;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
height: 60px;
|
|
8
|
+
position: relative;
|
|
9
|
+
border-width: 1px;
|
|
10
|
+
border-color: black;
|
|
11
|
+
border-style: groove;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ns_range_time_box_full {
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
border-radius: 5px;
|
|
17
|
+
margin-bottom: 40px;
|
|
18
|
+
position: relative;
|
|
19
|
+
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 7%);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
.ns_range_time_line{
|
|
23
|
+
position: absolute;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
@@ -1,15 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import Styles from './NSRange.module.css';
|
|
3
|
+
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
import Color from "../Color";
|
|
6
|
+
|
|
7
|
+
export interface NSRangeRow
|
|
5
8
|
{
|
|
9
|
+
start_time: Date;
|
|
10
|
+
end_time: Date;
|
|
11
|
+
percentage: number;
|
|
12
|
+
}
|
|
6
13
|
|
|
14
|
+
export interface INSRangeProps extends IBaseComponentProps
|
|
15
|
+
{
|
|
16
|
+
data: NSRangeRow[];
|
|
7
17
|
}
|
|
8
18
|
|
|
9
19
|
export function NSRange(props: INSRangeProps)
|
|
10
20
|
{
|
|
11
|
-
|
|
21
|
+
const [Widths, setWidths] = useState<string[]>([]);
|
|
22
|
+
const [positions, setPositions] = useState<string[]>([]);
|
|
23
|
+
|
|
24
|
+
useEffect(() =>
|
|
25
|
+
{
|
|
26
|
+
const widths = props.data?.map((data) =>
|
|
27
|
+
{
|
|
28
|
+
const minutes = calculateMinutesBetween(data.start_time, data.end_time);
|
|
29
|
+
return convertToPercentage(minutes);
|
|
30
|
+
});
|
|
31
|
+
const positions = props.data?.map((data) =>
|
|
32
|
+
{
|
|
33
|
+
const minutes = calculateMinutesBetween(new Date('2023-08-14T00:00:00'), data.start_time);
|
|
34
|
+
return convertToPercentage(minutes);
|
|
35
|
+
});
|
|
36
|
+
setWidths(widths);
|
|
37
|
+
setPositions(positions);
|
|
38
|
+
}, [props.data]);
|
|
39
|
+
|
|
40
|
+
const calculateMinutesBetween = (start_time: Date, end_time: Date): number =>
|
|
41
|
+
{
|
|
42
|
+
const difference_in_milliseconds = Math.abs(start_time.getTime() - end_time.getTime());
|
|
43
|
+
const difference_in_minutes = Math.floor(difference_in_milliseconds / 1000 / 60);
|
|
44
|
+
return difference_in_minutes;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const convertToPercentage = (minute: number): string =>
|
|
48
|
+
{
|
|
49
|
+
const width = ((minute * 100) / 1440).toString();
|
|
50
|
+
return `${width}%`;
|
|
51
|
+
};
|
|
52
|
+
|
|
12
53
|
return (
|
|
13
|
-
<div
|
|
54
|
+
<div className="container-fluid d-flex justify-content-center direction-ltr">
|
|
55
|
+
<div className="col-12 col-sm-11 px-0">
|
|
56
|
+
<div className={` ${Styles.ns_range_time_box_full} d-flex justify-content-start`}>
|
|
57
|
+
<div>
|
|
58
|
+
{
|
|
59
|
+
props.data?.map((data, index) =>
|
|
60
|
+
<span
|
|
61
|
+
key={index}
|
|
62
|
+
className={Styles.ns_range_time_line}
|
|
63
|
+
style={{
|
|
64
|
+
background: Color.getColor(data?.percentage),
|
|
65
|
+
width: Widths[index] || '0%',
|
|
66
|
+
left: positions[index] || '%0'
|
|
67
|
+
}}>
|
|
68
|
+
</span>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
</div>
|
|
72
|
+
{[...Array(24).keys()].map(hour => (
|
|
73
|
+
<div key={hour} className={Styles.ns_range_time_item}>
|
|
74
|
+
<span>{hour.toString().padStart(2, '0')}:00</span>
|
|
75
|
+
</div>
|
|
76
|
+
))}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
14
80
|
);
|
|
15
81
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
5
|
-
background-image: url('
|
|
5
|
+
background-image: url('https://static.namirasoft.com/image/concept/404/image.png');
|
|
6
6
|
background-repeat: no-repeat;
|
|
7
7
|
background-size: contain;
|
|
8
8
|
background-position: center;
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
@media only screen and (min-width: 1024px) {
|
|
16
16
|
.ns_not_found_page {
|
|
17
|
-
background-image: url('
|
|
17
|
+
background-image: url('https://static.namirasoft.com/image/concept/404/image.png');
|
|
18
18
|
}
|
|
19
19
|
}
|