namirasoft-site-react 1.3.403 → 1.3.405
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 +2 -2
- package/dist/App.js.map +1 -1
- package/dist/CopyToClipboard.d.ts +1 -1
- package/dist/CopyToClipboard.js +1 -1
- package/dist/CopyToClipboard.js.map +1 -1
- package/dist/components/NSAssistantButton.d.ts +1 -2
- package/dist/components/NSAssistantButton.js +3 -4
- package/dist/components/NSAssistantButton.js.map +1 -1
- package/dist/components/NSBoxEmail.d.ts +0 -1
- package/dist/components/NSBoxEmail.js +3 -4
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxSearch.js +2 -2
- package/dist/components/NSBoxSearch.js.map +1 -1
- package/dist/components/NSBoxString.js +3 -3
- package/dist/components/NSBoxString.js.map +1 -1
- package/dist/components/NSButton.d.ts +1 -1
- package/dist/components/NSButton.js +1 -1
- package/dist/components/NSButton.js.map +1 -1
- package/dist/components/NSButtonBlue.js +1 -1
- package/dist/components/NSButtonBlue.js.map +1 -1
- package/dist/components/NSButtonGreen.js +1 -1
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.js +1 -1
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSElectronicCard.d.ts +1 -2
- package/dist/components/NSElectronicCard.js +1 -2
- package/dist/components/NSElectronicCard.js.map +1 -1
- package/dist/components/NSFilterBox.js +1 -1
- package/dist/components/NSFilterBox.js.map +1 -1
- package/dist/components/NSPageSelectionModal.d.ts +1 -1
- package/dist/components/NSPageSelectionModal.js +0 -1
- package/dist/components/NSPageSelectionModal.js.map +1 -1
- package/dist/components/NSTable.d.ts +2 -2
- package/dist/components/NSTable.js +6 -6
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTag.d.ts +1 -2
- package/dist/components/NSTag.js +2 -3
- package/dist/components/NSTag.js.map +1 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.js +0 -2
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -2
- package/src/CopyToClipboard.ts +1 -1
- package/src/components/NSAssistantButton.tsx +4 -6
- package/src/components/NSBoxEmail.tsx +4 -7
- package/src/components/NSBoxSearch.tsx +2 -3
- package/src/components/NSBoxString.tsx +3 -4
- package/src/components/NSButton.tsx +1 -1
- package/src/components/NSButtonBlue.tsx +1 -2
- package/src/components/NSButtonGreen.tsx +1 -2
- package/src/components/NSButtonRed.tsx +1 -2
- package/src/components/NSElectronicCard.tsx +2 -4
- package/src/components/NSFilterBox.tsx +1 -1
- package/src/components/NSPageSelectionModal.tsx +1 -3
- package/src/components/NSTable.tsx +7 -8
- package/src/components/NSTag.tsx +60 -61
- package/src/main.ts +0 -2
- package/dist/components/NSBoxOTP.d.ts +0 -9
- package/dist/components/NSBoxOTP.js +0 -34
- package/dist/components/NSBoxOTP.js.map +0 -1
- package/dist/components/NSBoxOTP.module.css +0 -11
- package/dist/components/NSVerification.d.ts +0 -10
- package/dist/components/NSVerification.js +0 -19
- package/dist/components/NSVerification.js.map +0 -1
- package/dist/components/NSVerification.module.css +0 -23
- package/src/components/NSBoxOTP.module.css +0 -11
- package/src/components/NSBoxOTP.tsx +0 -66
- package/src/components/NSVerification.module.css +0 -23
- package/src/components/NSVerification.tsx +0 -43
package/dist/main.js
CHANGED
|
@@ -17,7 +17,6 @@ export * from "./components/NSBoxInteger";
|
|
|
17
17
|
export * from "./components/NSBoxIPV4";
|
|
18
18
|
export * from "./components/NSBoxIPV6";
|
|
19
19
|
export * from "./components/NSBoxLabel";
|
|
20
|
-
export * from "./components/NSBoxOTP";
|
|
21
20
|
export * from "./components/NSBoxPassword";
|
|
22
21
|
export * from "./components/NSBoxPhone";
|
|
23
22
|
export * from "./components/NSBoxPrice";
|
|
@@ -66,7 +65,6 @@ export * from "./components/NSTable";
|
|
|
66
65
|
export * from "./components/NSTag";
|
|
67
66
|
export * from "./components/NSTabPage";
|
|
68
67
|
export * from "./components/NSTitle";
|
|
69
|
-
export * from "./components/NSVerification";
|
|
70
68
|
export * from "./formatter/BackColorFormatter";
|
|
71
69
|
export * from "./formatter/BaseColumnFormatter";
|
|
72
70
|
export * from "./formatter/BooleanFormatter";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC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|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
11
|
+
"version": "1.3.405",
|
|
12
12
|
"author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh, Mehrab Bahramian",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
package/src/App.tsx
CHANGED
|
@@ -3,8 +3,8 @@ import 'bootstrap/dist/css/bootstrap.min.css';
|
|
|
3
3
|
import { NSBarAction, NSBoxBoolean, NSBoxEmail, NSBoxEnum, NSBoxSearch, NSBoxString, NSEntityBar, NSLayout, NSNoData, NSPagination, NSPanel, NSRepeater, NSSpace, NSSpaceSizeType, NSTabPage } from './main';
|
|
4
4
|
import { NSBoxLabel } from './components/NSBoxLabel';
|
|
5
5
|
import { NSRadioButton } from './components/NSRadioButton';
|
|
6
|
-
import NSTag,
|
|
7
|
-
import NSButton from './components/NSButton';
|
|
6
|
+
import { NSTag, NSTagValue } from './components/NSTag';
|
|
7
|
+
import { NSButton } from './components/NSButton';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import { NSDialog } from './components/NSDialog';
|
|
10
10
|
|
package/src/CopyToClipboard.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { CopyToClipboard } from '../CopyToClipboard';
|
|
1
3
|
import Styles from './NSAssistantButton.module.css';
|
|
2
4
|
import IconCopy from '../assets/images/icon-copy.png';
|
|
3
5
|
import IconFullScreen from '../assets/images/icon-fullscreen.png';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import CopyToClipboard from '../CopyToClipboard';
|
|
6
6
|
|
|
7
7
|
export interface INSAssistantProps
|
|
8
8
|
{
|
|
@@ -10,7 +10,7 @@ export interface INSAssistantProps
|
|
|
10
10
|
setValue: (value: string) => void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function NSAssistantButton(props: INSAssistantProps)
|
|
13
|
+
export function NSAssistantButton(props: INSAssistantProps)
|
|
14
14
|
{
|
|
15
15
|
let [fullscreen, setFullscreen] = useState(false);
|
|
16
16
|
let [value, setValue] = useState(props.value);
|
|
@@ -70,6 +70,4 @@ function NSAssistantButton(props: INSAssistantProps)
|
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
72
72
|
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export default NSAssistantButton;
|
|
73
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
3
|
import { Validator } from "../Validator";
|
|
7
4
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
5
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
9
6
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
10
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
11
|
-
import NSAssistantButton from "./NSAssistantButton";
|
|
8
|
+
import { NSAssistantButton } from "./NSAssistantButton";
|
|
9
|
+
import Styles from "./NSBox.module.css";
|
|
10
|
+
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
12
11
|
|
|
13
12
|
export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
14
13
|
{
|
|
@@ -103,6 +102,4 @@ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailSta
|
|
|
103
102
|
</>
|
|
104
103
|
);
|
|
105
104
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export default NSBoxEmail;
|
|
105
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
3
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
6
4
|
import { IValidationProps } from "../props/IValidationProps";
|
|
7
5
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
8
6
|
import { Validator } from "../Validator";
|
|
9
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
10
|
-
import NSAssistantButton from "./NSAssistantButton";
|
|
8
|
+
import { NSAssistantButton } from "./NSAssistantButton";
|
|
9
|
+
import Styles from "./NSBox.module.css";
|
|
11
10
|
|
|
12
11
|
export interface INSBoxSearchProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
13
12
|
{
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
3
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
7
4
|
import { IValidationProps } from "../props/IValidationProps";
|
|
8
5
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
9
6
|
import { Validator } from "../Validator";
|
|
10
7
|
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
11
|
-
import NSAssistantButton from "./NSAssistantButton";
|
|
8
|
+
import { NSAssistantButton } from "./NSAssistantButton";
|
|
9
|
+
import Styles from "./NSBox.module.css";
|
|
10
|
+
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
12
11
|
|
|
13
12
|
export interface INSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
|
|
14
13
|
{
|
|
@@ -9,7 +9,7 @@ export interface INSButtonProps extends IBaseComponentProps
|
|
|
9
9
|
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export
|
|
12
|
+
export function NSButton(props: INSButtonProps)
|
|
13
13
|
{
|
|
14
14
|
return (
|
|
15
15
|
<button id={props.id}
|
|
@@ -8,7 +8,7 @@ export interface INSElectronicCardProps
|
|
|
8
8
|
info?: string;
|
|
9
9
|
alt?: string;
|
|
10
10
|
}
|
|
11
|
-
function NSElectronicCard(props: INSElectronicCardProps)
|
|
11
|
+
export function NSElectronicCard(props: INSElectronicCardProps)
|
|
12
12
|
{
|
|
13
13
|
if (props.cardNumber.length < 15)
|
|
14
14
|
{
|
|
@@ -43,6 +43,4 @@ function NSElectronicCard(props: INSElectronicCardProps)
|
|
|
43
43
|
</div>
|
|
44
44
|
</section >
|
|
45
45
|
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export default NSElectronicCard;
|
|
46
|
+
}
|
|
@@ -4,7 +4,7 @@ import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
|
4
4
|
import { NSFilterItem } from './NSFilterItem';
|
|
5
5
|
import { FilterItem, FilterItemColumnType, FilterItemOperator } from 'namirasoft-core';
|
|
6
6
|
import {NSGroupedList, INSGroupedListProps_Group } from './NSGroupedList';
|
|
7
|
-
import NSButton from './NSButton';
|
|
7
|
+
import { NSButton } from './NSButton';
|
|
8
8
|
import Styles from './NSFilterBox.module.css';
|
|
9
9
|
|
|
10
10
|
export interface INSFilterBoxProps extends IBaseComponentProps
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import NSButton from './NSButton';
|
|
4
|
-
import { NSPagination } from './NSPagination';
|
|
5
|
-
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
6
|
-
import Styles from './NSTable.module.css';
|
|
7
|
-
import { Component } from 'react';
|
|
8
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
9
2
|
import React from "react";
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
import { writeFile, utils } from 'xlsx';
|
|
5
|
+
import { NSButton } from './NSButton';
|
|
6
|
+
import { NSPagination } from './NSPagination';
|
|
10
7
|
import { NSInfoDialog } from './NSInfoDialog';
|
|
8
|
+
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
11
9
|
import { NSPageSelectionModal } from './NSPageSelectionModal';
|
|
12
10
|
import { NSLoading } from './NSLoading';
|
|
13
11
|
import { NSNoData } from './NSNoData';
|
|
14
|
-
import {
|
|
12
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
15
13
|
import { BaseColumnFormatter } from '../formatter/BaseColumnFormatter';
|
|
14
|
+
import Styles from './NSTable.module.css';
|
|
16
15
|
|
|
17
16
|
export interface TableColumnInfo
|
|
18
17
|
{
|
package/src/components/NSTag.tsx
CHANGED
|
@@ -1,75 +1,74 @@
|
|
|
1
1
|
import { Component, createRef } from 'react';
|
|
2
2
|
import { NSBoxString } from './NSBoxString';
|
|
3
|
-
import NSButton from './NSButton';
|
|
3
|
+
import { NSButton } from './NSButton';
|
|
4
4
|
import Styles from './NSTag.module.css';
|
|
5
5
|
|
|
6
6
|
export interface NSTagProps
|
|
7
7
|
{
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
onChanged?: () => void;
|
|
9
|
+
onDeleted?: () => void;
|
|
10
10
|
}
|
|
11
11
|
export interface NSTagValue
|
|
12
12
|
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
description?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
class NSTag extends Component<NSTagProps>
|
|
18
|
+
export class NSTag extends Component<NSTagProps>
|
|
19
19
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
static isEmpty(value: NSTagValue)
|
|
21
|
+
{
|
|
22
|
+
if (value.name || value.value || value.description)
|
|
23
|
+
return false
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
private NSBoxString_Key = createRef<NSBoxString>();
|
|
28
|
+
private NSBoxString_Value = createRef<NSBoxString>();
|
|
29
|
+
private NSBoxString_Description = createRef<NSBoxString>();
|
|
30
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
export default NSTag;
|
|
31
|
+
getValue(checkError: boolean = true): NSTagValue
|
|
32
|
+
{
|
|
33
|
+
let name = this.NSBoxString_Key.current?.getValue(checkError) ?? "";
|
|
34
|
+
let value = this.NSBoxString_Value.current?.getValue(checkError) ?? "";
|
|
35
|
+
let description = this.NSBoxString_Description.current?.getValue(checkError) ?? "";
|
|
36
|
+
return {
|
|
37
|
+
name,
|
|
38
|
+
value,
|
|
39
|
+
description
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
setValue(value: NSTagValue)
|
|
43
|
+
{
|
|
44
|
+
this.NSBoxString_Key.current?.setValue(value.name);
|
|
45
|
+
this.NSBoxString_Value.current?.setValue(value.value);
|
|
46
|
+
this.NSBoxString_Description.current?.setValue(value.description ?? "");
|
|
47
|
+
}
|
|
48
|
+
override render()
|
|
49
|
+
{
|
|
50
|
+
return (
|
|
51
|
+
<section className={Styles.ns_tag_input_container} >
|
|
52
|
+
<div className={Styles.ns_tag_input_group}>
|
|
53
|
+
<NSBoxString ref={this.NSBoxString_Key} title='Name' required onChanged={this.props.onChanged} />
|
|
54
|
+
<NSBoxString ref={this.NSBoxString_Value} title='Value' required onChanged={this.props.onChanged} />
|
|
55
|
+
<NSBoxString ref={this.NSBoxString_Description} title='Description' required={false} onChanged={this.props.onChanged} />
|
|
56
|
+
<NSButton
|
|
57
|
+
title='Remove'
|
|
58
|
+
onClick={() =>
|
|
59
|
+
{
|
|
60
|
+
if (this.props.onDeleted)
|
|
61
|
+
this.props.onDeleted();
|
|
62
|
+
}}
|
|
63
|
+
style={{
|
|
64
|
+
backgroundColor: "transparent",
|
|
65
|
+
border: "1px solid rgba(3, 119, 255, 1)",
|
|
66
|
+
width: "145px",
|
|
67
|
+
marginTop: "28px"
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</section>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -17,7 +17,6 @@ export * from "./components/NSBoxInteger";
|
|
|
17
17
|
export * from "./components/NSBoxIPV4";
|
|
18
18
|
export * from "./components/NSBoxIPV6";
|
|
19
19
|
export * from "./components/NSBoxLabel";
|
|
20
|
-
export * from "./components/NSBoxOTP";
|
|
21
20
|
export * from "./components/NSBoxPassword";
|
|
22
21
|
export * from "./components/NSBoxPhone";
|
|
23
22
|
export * from "./components/NSBoxPrice";
|
|
@@ -66,7 +65,6 @@ export * from "./components/NSTable";
|
|
|
66
65
|
export * from "./components/NSTag";
|
|
67
66
|
export * from "./components/NSTabPage";
|
|
68
67
|
export * from "./components/NSTitle";
|
|
69
|
-
export * from "./components/NSVerification";
|
|
70
68
|
export * from "./formatter/BackColorFormatter";
|
|
71
69
|
export * from "./formatter/BaseColumnFormatter";
|
|
72
70
|
export * from "./formatter/BooleanFormatter";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
3
|
-
interface INSBoxOTPProps extends IBaseComponentProps {
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
defaultValue?: string;
|
|
6
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
}
|
|
8
|
-
declare function NSBoxOTP(props: INSBoxOTPProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default NSBoxOTP;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef } from 'react';
|
|
3
|
-
import Styles from './NSBoxOTP.module.css';
|
|
4
|
-
function NSBoxOTP(props) {
|
|
5
|
-
var _a;
|
|
6
|
-
let [state, setState] = useState("");
|
|
7
|
-
const [values, setValues] = useState(Array(6).fill(''));
|
|
8
|
-
const inputsRef = useRef([]);
|
|
9
|
-
const handleChange = (index) => (event) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const newValue = event.target.value;
|
|
12
|
-
setState(state + newValue);
|
|
13
|
-
if (/^\d?$/.test(newValue)) {
|
|
14
|
-
const updatedValues = [...values];
|
|
15
|
-
updatedValues[index] = newValue;
|
|
16
|
-
setValues(updatedValues);
|
|
17
|
-
if (newValue && index < 5) {
|
|
18
|
-
(_a = inputsRef.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (props.onChanged)
|
|
22
|
-
props.onChanged(event);
|
|
23
|
-
};
|
|
24
|
-
const handleKeyDown = (index) => (event) => {
|
|
25
|
-
var _a;
|
|
26
|
-
if (event.key === 'Backspace' && !values[index] && index > 0) {
|
|
27
|
-
(_a = inputsRef.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
return (_jsx("div", { id: props.id, className: `${Styles.ns_input_parent} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: Object.assign(Object.assign({}, props.style), { display: 'flex', gap: '10px' }), children: values.map((value, index) => (_jsx("input", { ref: el => inputsRef.current[index] = el, type: "text", value: value, onChange: handleChange(index), onKeyDown: handleKeyDown(index), maxLength: 1, style: { width: '30px', textAlign: 'center' }, className: Styles.ns_otp_input }, index + 10))) }));
|
|
31
|
-
}
|
|
32
|
-
;
|
|
33
|
-
export default NSBoxOTP;
|
|
34
|
-
//# sourceMappingURL=NSBoxOTP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxOTP.js","sourceRoot":"","sources":["../../src/components/NSBoxOTP.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAS1C,SAAS,QAAQ,CAAC,KAAqB;;IAEnC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAW,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,MAAM,CAA8B,EAAE,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,KAAoC,EAAE,EAAE;;QAE7E,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAA;QAC1B,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC1B;YACI,MAAM,aAAa,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;YAClC,aAAa,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;YAChC,SAAS,CAAC,aAAa,CAAC,CAAC;YACzB,IAAI,QAAQ,IAAI,KAAK,GAAG,CAAC,EACzB;gBACI,MAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,KAA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0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
3
|
-
import { IImageProps } from '../props/IImageProps';
|
|
4
|
-
interface INSVerificationProps extends IBaseComponentProps {
|
|
5
|
-
verificationType: string;
|
|
6
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
image?: IImageProps;
|
|
8
|
-
}
|
|
9
|
-
declare function NSVerification(props: INSVerificationProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default NSVerification;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import NSBoxOTP from './NSBoxOTP';
|
|
4
|
-
import Styles from './NSVerification.module.css';
|
|
5
|
-
import vector from '../assets/images/verify.png';
|
|
6
|
-
function NSVerification(props) {
|
|
7
|
-
var _a, _b, _c, _d, _e;
|
|
8
|
-
const [values, setValue] = useState('');
|
|
9
|
-
function onChanged(event) {
|
|
10
|
-
setValue(prevValues => [...prevValues, event.target.value].join(''));
|
|
11
|
-
if (props.onChanged)
|
|
12
|
-
props.onChanged(event);
|
|
13
|
-
console.log(values);
|
|
14
|
-
return (values);
|
|
15
|
-
}
|
|
16
|
-
return (_jsxs("div", { className: `${Styles.ns_verification_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("img", { src: (_c = (_b = props.image) === null || _b === void 0 ? void 0 : _b.src) !== null && _c !== void 0 ? _c : vector, alt: (_e = (_d = props.image) === null || _d === void 0 ? void 0 : _d.alt) !== null && _e !== void 0 ? _e : 'verification vector', className: Styles.ns_verification_vector }), _jsxs("p", { children: ["Please enter code sent to ", props.verificationType] }), _jsx(NSBoxOTP, { onChanged: onChanged })] }));
|
|
17
|
-
}
|
|
18
|
-
export default NSVerification;
|
|
19
|
-
//# sourceMappingURL=NSVerification.js.map
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AAe,cAAc,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.ns_verification_container {
|
|
2
|
-
background-color: #FFF;
|
|
3
|
-
border: 1px solid #A1A4B0;
|
|
4
|
-
backdrop-filter: blur(5px);
|
|
5
|
-
border-radius: 8px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
max-width: 594px;
|
|
8
|
-
padding: 16px;
|
|
9
|
-
color: #141B5C !important;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
gap: 16px;
|
|
13
|
-
align-items: center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ns_verification_container p{
|
|
17
|
-
text-align: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ns_verification_vector{
|
|
21
|
-
width: 224px;
|
|
22
|
-
height: 224px;
|
|
23
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React, { useState, ChangeEvent, useRef } from 'react';
|
|
2
|
-
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
3
|
-
import Styles from './NSBoxOTP.module.css'
|
|
4
|
-
|
|
5
|
-
interface INSBoxOTPProps extends IBaseComponentProps
|
|
6
|
-
{
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function NSBoxOTP(props: INSBoxOTPProps)
|
|
13
|
-
{
|
|
14
|
-
let [state, setState] = useState("");
|
|
15
|
-
|
|
16
|
-
const [values, setValues] = useState<string[]>(Array(6).fill(''));
|
|
17
|
-
const inputsRef = useRef<(HTMLInputElement | null)[]>([]);
|
|
18
|
-
|
|
19
|
-
const handleChange = (index: number) => (event: ChangeEvent<HTMLInputElement>) =>
|
|
20
|
-
{
|
|
21
|
-
const newValue = event.target.value;
|
|
22
|
-
setState(state + newValue)
|
|
23
|
-
if (/^\d?$/.test(newValue))
|
|
24
|
-
{
|
|
25
|
-
const updatedValues = [...values];
|
|
26
|
-
updatedValues[index] = newValue;
|
|
27
|
-
setValues(updatedValues);
|
|
28
|
-
if (newValue && index < 5)
|
|
29
|
-
{
|
|
30
|
-
inputsRef.current[index + 1]?.focus();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (props.onChanged)
|
|
34
|
-
props.onChanged(event);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const handleKeyDown = (index: number) => (event: React.KeyboardEvent<HTMLInputElement>) =>
|
|
38
|
-
{
|
|
39
|
-
if (event.key === 'Backspace' && !values[index] && index > 0)
|
|
40
|
-
{
|
|
41
|
-
inputsRef.current[index - 1]?.focus();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<div id={props.id} className={`${Styles.ns_input_parent} ${props.classList?.join(" ")}`} style={{ ...props.style, display: 'flex', gap: '10px' }}>
|
|
47
|
-
{
|
|
48
|
-
values.map((value, index) => (
|
|
49
|
-
<input
|
|
50
|
-
key={index + 10}
|
|
51
|
-
ref={el => inputsRef.current[index] = el}
|
|
52
|
-
type="text"
|
|
53
|
-
value={value}
|
|
54
|
-
onChange={handleChange(index)}
|
|
55
|
-
onKeyDown={handleKeyDown(index)}
|
|
56
|
-
maxLength={1}
|
|
57
|
-
style={{ width: '30px', textAlign: 'center' }}
|
|
58
|
-
className={Styles.ns_otp_input}
|
|
59
|
-
/>
|
|
60
|
-
))
|
|
61
|
-
}
|
|
62
|
-
</div >
|
|
63
|
-
);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export default NSBoxOTP;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.ns_verification_container {
|
|
2
|
-
background-color: #FFF;
|
|
3
|
-
border: 1px solid #A1A4B0;
|
|
4
|
-
backdrop-filter: blur(5px);
|
|
5
|
-
border-radius: 8px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
max-width: 594px;
|
|
8
|
-
padding: 16px;
|
|
9
|
-
color: #141B5C !important;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
gap: 16px;
|
|
13
|
-
align-items: center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ns_verification_container p{
|
|
17
|
-
text-align: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ns_verification_vector{
|
|
21
|
-
width: 224px;
|
|
22
|
-
height: 224px;
|
|
23
|
-
}
|