namirasoft-account-react 1.3.149 → 1.3.151
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.map +1 -1
- package/dist/IEntityInfo.d.ts +2 -2
- package/dist/layouts/NSASectionEdit.js +8 -2
- package/dist/layouts/NSASectionEdit.js.map +1 -1
- package/dist/pages/NSAVerificationPage.d.ts +4 -3
- package/dist/pages/NSAVerificationPage.js +3 -6
- package/dist/pages/NSAVerificationPage.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -0
- package/src/IEntityInfo.ts +2 -2
- package/src/layouts/NSASectionEdit.tsx +10 -2
- package/src/pages/NSAVerificationPage.tsx +35 -23
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AACA,MAAM,UAAU,GAAG;IAEf,OAAO,CACH,mBAEG,CACN,CAAC;AACN,CAAC;AAAA,CAAC"}
|
package/dist/IEntityInfo.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export interface IEntityInfo<EntityType extends {
|
|
|
25
25
|
getCopyURL: (id: string) => string;
|
|
26
26
|
getEditURL: (id: string) => string;
|
|
27
27
|
getViewURL: (id: string) => string;
|
|
28
|
-
onCreate?: (entity: EntityTypeInput) => Promise<
|
|
29
|
-
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<
|
|
28
|
+
onCreate?: (entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
29
|
+
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
30
30
|
onSuccess?: (entity: EntityType) => void;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -23,7 +23,10 @@ export function onApply(props, entity, id) {
|
|
|
23
23
|
if (props.isEdit) {
|
|
24
24
|
if (id) {
|
|
25
25
|
if (entity.client.onUpdate)
|
|
26
|
-
entity.client.onUpdate(id, cur_entity).
|
|
26
|
+
entity.client.onUpdate(id, cur_entity).then(new_entity => {
|
|
27
|
+
if (new_entity)
|
|
28
|
+
onSuccess(new_entity, NameSpace + " has been updated successfully");
|
|
29
|
+
}).catch(() => { });
|
|
27
30
|
else
|
|
28
31
|
entity.server.update(id, cur_entity).then((new_entity) => {
|
|
29
32
|
onSuccess(new_entity, NameSpace + " has been updated successfully");
|
|
@@ -34,7 +37,10 @@ export function onApply(props, entity, id) {
|
|
|
34
37
|
}
|
|
35
38
|
else {
|
|
36
39
|
if (entity.client.onCreate)
|
|
37
|
-
entity.client.onCreate(cur_entity).
|
|
40
|
+
entity.client.onCreate(cur_entity).then(new_entity => {
|
|
41
|
+
if (new_entity)
|
|
42
|
+
onSuccess(new_entity, NameSpace + " has been created successfully");
|
|
43
|
+
}).catch(() => { });
|
|
38
44
|
else
|
|
39
45
|
entity.server.create(cur_entity).then((new_entity) => {
|
|
40
46
|
onSuccess(new_entity, NameSpace + " has been created successfully");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSASectionEdit.js","sourceRoot":"","sources":["../../src/layouts/NSASectionEdit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE3G,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBlD,MAAM,UAAU,OAAO,CAAkE,KAAuD,EAAE,MAAgD,EAAE,EAAsB;IAEzN,IACA;QACC,IAAI,SAAS,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,O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|
2
2
|
import React from "react";
|
|
3
3
|
export interface INSAVerificationPageProps extends IBaseComponentProps {
|
|
4
|
-
|
|
4
|
+
contact_type: string;
|
|
5
|
+
contact_value: string;
|
|
6
|
+
onApply: (code: string) => void;
|
|
5
7
|
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
image?: IImageProps;
|
|
7
8
|
}
|
|
8
9
|
export declare function NSAVerificationPage(props: INSAVerificationPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,16 +3,13 @@ import Styles from './NSAVerificationPage.module.css';
|
|
|
3
3
|
import { NSABoxOTP } from '../components/NSABoxOTP';
|
|
4
4
|
import vector from '../assets/images/verify.png';
|
|
5
5
|
import { useState } from "react";
|
|
6
|
+
import { NSSection, NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
|
|
6
7
|
export function NSAVerificationPage(props) {
|
|
7
|
-
var _a
|
|
8
|
+
var _a;
|
|
8
9
|
const [values, setValue] = useState('');
|
|
9
10
|
function onChanged(event) {
|
|
10
11
|
setValue(prevValues => [...prevValues, event.target.value].join(''));
|
|
11
|
-
if (props.onChanged)
|
|
12
|
-
props.onChanged(event);
|
|
13
|
-
console.log(values);
|
|
14
|
-
return (values);
|
|
15
12
|
}
|
|
16
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: `${Styles.nsa_verification_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("img", { src:
|
|
13
|
+
return (_jsx(_Fragment, { children: _jsxs(NSSection, { center_items: true, children: [_jsxs("div", { className: `${Styles.nsa_verification_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("img", { src: vector, alt: 'verification vector', className: Styles.nsa_verification_vector }), _jsxs("div", { className: 'm-0', children: [_jsxs("p", { className: 'm-2', children: ["Type: ", props.contact_type] }), _jsxs("p", { className: 'm-2', children: ["Address: ", props.contact_value] })] }), _jsxs("p", { children: ["Please enter code sent to ", props.contact_value] }), _jsx(NSABoxOTP, { onChanged: onChanged })] }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), _jsx(NSButtonBlue, { title: "Apply", onClick: () => props.onApply(values) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { className: "nsa-font-16-normal ", children: "Resend Code" })] }) }));
|
|
17
14
|
}
|
|
18
15
|
//# sourceMappingURL=NSAVerificationPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSAVerificationPage.js","sourceRoot":"","sources":["../../src/pages/NSAVerificationPage.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,OAAO,
|
|
1
|
+
{"version":3,"file":"NSAVerificationPage.js","sourceRoot":"","sources":["../../src/pages/NSAVerificationPage.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1F,MAAM,UAAU,mBAAmB,CAAC,KAAgC;;IAEhE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAA;IAE/C,SAAS,SAAS,CAAC,KAA0C;QAEzD,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,CACH,4BACI,MAAC,SAAS,IAAC,YAAY,EAAE,IAAI,aACzB,eACI,SAAS,EAAE,GAAG,MAAM,CAAC,0BAA0B,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC/E,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,cACI,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,qBAAqB,EAC1B,SAAS,EAAE,MAAM,CAAC,uBAAuB,GAC3C,EACF,eAAK,SAAS,EAAC,KAAK,aAChB,aAAG,SAAS,EAAC,KAAK,uBAAQ,KAAK,CAAC,YAAY,IAAK,EACjD,aAAG,SAAS,EAAC,KAAK,0BAAW,KAAK,CAAC,aAAa,IAAK,IACnD,EACN,sDAA8B,KAAK,CAAC,aAAa,IAAK,EACtD,KAAC,SAAS,IAAC,SAAS,EAAE,SAAS,GAAI,IACjC,EACN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,MAAM,GAAY,EACjD,KAAC,YAAY,IAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAI,EAMpE,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAY,EAChD,cAAK,SAAS,EAAC,qBAAqB,4BAAkB,IAC9C,GACb,CACN,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
package/src/IEntityInfo.ts
CHANGED
|
@@ -22,8 +22,8 @@ export interface IEntityInfo<EntityType extends { id: string }, EntityTypeInput
|
|
|
22
22
|
getCopyURL: (id: string) => string;
|
|
23
23
|
getEditURL: (id: string) => string;
|
|
24
24
|
getViewURL: (id: string) => string;
|
|
25
|
-
onCreate?: (entity: EntityTypeInput) => Promise<
|
|
26
|
-
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<
|
|
25
|
+
onCreate?: (entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
26
|
+
onUpdate?: (id: string, entity: EntityTypeInput) => Promise<EntityType | null>;
|
|
27
27
|
onSuccess?: (entity: EntityType) => void;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -48,7 +48,11 @@ export function onApply<EntityType extends { id: string }, EntityTypeInput = Ent
|
|
|
48
48
|
if (id)
|
|
49
49
|
{
|
|
50
50
|
if (entity.client.onUpdate)
|
|
51
|
-
entity.client.onUpdate(id, cur_entity).
|
|
51
|
+
entity.client.onUpdate(id, cur_entity).then(new_entity =>
|
|
52
|
+
{
|
|
53
|
+
if (new_entity)
|
|
54
|
+
onSuccess(new_entity, NameSpace + " has been updated successfully");
|
|
55
|
+
}).catch(() => { });
|
|
52
56
|
else
|
|
53
57
|
entity.server.update(id, cur_entity).then((new_entity) =>
|
|
54
58
|
{
|
|
@@ -61,7 +65,11 @@ export function onApply<EntityType extends { id: string }, EntityTypeInput = Ent
|
|
|
61
65
|
else
|
|
62
66
|
{
|
|
63
67
|
if (entity.client.onCreate)
|
|
64
|
-
entity.client.onCreate(cur_entity).
|
|
68
|
+
entity.client.onCreate(cur_entity).then(new_entity =>
|
|
69
|
+
{
|
|
70
|
+
if (new_entity)
|
|
71
|
+
onSuccess(new_entity, NameSpace + " has been created successfully");
|
|
72
|
+
}).catch(() => { });
|
|
65
73
|
else
|
|
66
74
|
entity.server.create(cur_entity).then((new_entity) =>
|
|
67
75
|
{
|
|
@@ -1,43 +1,55 @@
|
|
|
1
1
|
import Styles from './NSAVerificationPage.module.css';
|
|
2
|
-
import { IBaseComponentProps
|
|
3
|
-
import {NSABoxOTP} from '../components/NSABoxOTP';
|
|
2
|
+
import { IBaseComponentProps } from 'namirasoft-site-react';
|
|
3
|
+
import { NSABoxOTP } from '../components/NSABoxOTP';
|
|
4
4
|
import vector from '../assets/images/verify.png';
|
|
5
5
|
import React, { useState } from "react";
|
|
6
|
-
|
|
6
|
+
import { NSSection, NSSpace, NSSpaceSizeType, NSButtonBlue } from 'namirasoft-site-react';
|
|
7
7
|
|
|
8
8
|
export interface INSAVerificationPageProps extends IBaseComponentProps
|
|
9
9
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
contact_type: string;
|
|
11
|
+
contact_value: string;
|
|
12
|
+
onApply: (code: string) => void
|
|
13
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export function NSAVerificationPage(props: INSAVerificationPageProps)
|
|
16
17
|
{
|
|
17
18
|
const [values, setValue] = useState<string>('')
|
|
18
19
|
|
|
19
|
-
function onChanged(event: React.ChangeEvent<HTMLInputElement>):
|
|
20
|
+
function onChanged(event: React.ChangeEvent<HTMLInputElement>): void
|
|
20
21
|
{
|
|
21
22
|
setValue(prevValues => [...prevValues, event.target.value].join(''));
|
|
22
|
-
if (props.onChanged)
|
|
23
|
-
props.onChanged(event);
|
|
24
|
-
console.log(values);
|
|
25
|
-
return (values);
|
|
26
23
|
}
|
|
27
24
|
return (
|
|
28
25
|
<>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
<NSSection center_items={true}>
|
|
27
|
+
<div
|
|
28
|
+
className={`${Styles.nsa_verification_container} ${props.classList?.join(" ")}`}
|
|
29
|
+
style={props.style}
|
|
30
|
+
>
|
|
31
|
+
<img
|
|
32
|
+
src={vector}
|
|
33
|
+
alt={'verification vector'}
|
|
34
|
+
className={Styles.nsa_verification_vector}
|
|
35
|
+
/>
|
|
36
|
+
<div className='m-0'>
|
|
37
|
+
<p className='m-2'>Type: {props.contact_type}</p>
|
|
38
|
+
<p className='m-2'>Address: {props.contact_value}</p>
|
|
39
|
+
</div>
|
|
40
|
+
<p>Please enter code sent to {props.contact_value}</p>
|
|
41
|
+
<NSABoxOTP onChanged={onChanged} />
|
|
42
|
+
</div>
|
|
43
|
+
<NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
|
|
44
|
+
<NSButtonBlue title="Apply" onClick={() => props.onApply(values)} />
|
|
45
|
+
{/* {
|
|
46
|
+
sendCode ?
|
|
47
|
+
<NSButtonBlue title="Apply" onClick={onApply} />
|
|
48
|
+
: <p className="nsa-color-blue">Please Wait</p>
|
|
49
|
+
} */}
|
|
50
|
+
<NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
|
|
51
|
+
<div className="nsa-font-16-normal ">Resend Code</div>
|
|
52
|
+
</NSSection>
|
|
41
53
|
</>
|
|
42
54
|
);
|
|
43
55
|
}
|