devextreme-cli 1.6.6 → 1.6.7
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/package.json +3 -4
- package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +86 -86
- package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +107 -107
- package/src/templates/react/application/src/types.tsx +55 -55
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devextreme-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "DevExtreme CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devexpress",
|
|
@@ -39,12 +39,11 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
41
41
|
"import-cwd": "^3.0.0",
|
|
42
|
-
"ip": "^1.1.8",
|
|
43
42
|
"less": "3.13.1",
|
|
44
43
|
"minimist": "^1.2.8",
|
|
45
44
|
"mustache": "^3.2.1",
|
|
46
45
|
"prompts": "^2.4.2",
|
|
47
|
-
"sass": "^1.
|
|
46
|
+
"sass": "^1.71.0",
|
|
48
47
|
"semver": "^5.7.2",
|
|
49
48
|
"strip-bom": "^4.0.0"
|
|
50
49
|
},
|
|
@@ -73,5 +72,5 @@
|
|
|
73
72
|
"typescript": "^4.0.2",
|
|
74
73
|
"typescript-eslint-parser": "^22.0.0"
|
|
75
74
|
},
|
|
76
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "cc3f1b0a06771282432432679f9055c2baf0fd24"
|
|
77
76
|
}
|
package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import React, { useState, useRef, useCallback } from 'react';
|
|
2
|
-
import { useNavigate, useParams } from 'react-router-dom';
|
|
3
|
-
import Form, {
|
|
4
|
-
Item,
|
|
5
|
-
Label,
|
|
6
|
-
ButtonItem,
|
|
7
|
-
ButtonOptions,
|
|
8
|
-
RequiredRule,
|
|
9
|
-
CustomRule,
|
|
10
|
-
} from 'devextreme-react/form';
|
|
11
|
-
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
12
|
-
import notify from 'devextreme/ui/notify';
|
|
13
|
-
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
14
|
-
import { changePassword } from '../../api/auth';
|
|
15
|
-
|
|
16
|
-
export default function ChangePasswordForm() {
|
|
17
|
-
const navigate = useNavigate();
|
|
18
|
-
const [loading, setLoading] = useState(false);
|
|
19
|
-
const formData = useRef({ password: '' });
|
|
20
|
-
const { recoveryCode } = useParams();
|
|
21
|
-
|
|
22
|
-
const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
const { password } = formData.current;
|
|
25
|
-
setLoading(true);
|
|
26
|
-
|
|
27
|
-
const result = await changePassword(password, recoveryCode);
|
|
28
|
-
setLoading(false);
|
|
29
|
-
|
|
30
|
-
if (result.isOk) {
|
|
31
|
-
navigate('/login');
|
|
32
|
-
} else {
|
|
33
|
-
notify(result.message, 'error', 2000);
|
|
34
|
-
}
|
|
35
|
-
}, [navigate, recoveryCode]);
|
|
36
|
-
|
|
37
|
-
const confirmPassword = useCallback(
|
|
38
|
-
({ value }<%=#isTypeScript%>: ValidationCallbackData<%=/isTypeScript%>) => value === formData.current.password,
|
|
39
|
-
[]
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<form onSubmit={onSubmit}>
|
|
44
|
-
<Form formData={formData.current} disabled={loading}>
|
|
45
|
-
<Item
|
|
46
|
-
dataField={'password'}
|
|
47
|
-
editorType={'dxTextBox'}
|
|
48
|
-
editorOptions={passwordEditorOptions}
|
|
49
|
-
>
|
|
50
|
-
<RequiredRule message="Password is required" />
|
|
51
|
-
<Label visible={false} />
|
|
52
|
-
</Item>
|
|
53
|
-
<Item
|
|
54
|
-
dataField={'confirmedPassword'}
|
|
55
|
-
editorType={'dxTextBox'}
|
|
56
|
-
editorOptions={confirmedPasswordEditorOptions}
|
|
57
|
-
>
|
|
58
|
-
<RequiredRule message="Password is required" />
|
|
59
|
-
<CustomRule
|
|
60
|
-
message={'Passwords do not match'}
|
|
61
|
-
validationCallback={confirmPassword}
|
|
62
|
-
/>
|
|
63
|
-
<Label visible={false} />
|
|
64
|
-
</Item>
|
|
65
|
-
<ButtonItem>
|
|
66
|
-
<ButtonOptions
|
|
67
|
-
width={'100%'}
|
|
68
|
-
type={'default'}
|
|
69
|
-
useSubmitBehavior={true}
|
|
70
|
-
>
|
|
71
|
-
<span className="dx-button-text">
|
|
72
|
-
{
|
|
73
|
-
loading
|
|
74
|
-
? <LoadIndicator width={'24px'} height={'24px'} visible={true} />
|
|
75
|
-
: 'Continue'
|
|
76
|
-
}
|
|
77
|
-
</span>
|
|
78
|
-
</ButtonOptions>
|
|
79
|
-
</ButtonItem>
|
|
80
|
-
</Form>
|
|
81
|
-
</form>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const passwordEditorOptions = { stylingMode: 'filled', placeholder: 'Password', mode: 'password' };
|
|
86
|
-
const confirmedPasswordEditorOptions = { stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' };
|
|
1
|
+
import React, { useState, useRef, useCallback } from 'react';
|
|
2
|
+
import { useNavigate, useParams } from 'react-router-dom';
|
|
3
|
+
import Form, {
|
|
4
|
+
Item,
|
|
5
|
+
Label,
|
|
6
|
+
ButtonItem,
|
|
7
|
+
ButtonOptions,
|
|
8
|
+
RequiredRule,
|
|
9
|
+
CustomRule,
|
|
10
|
+
} from 'devextreme-react/form';
|
|
11
|
+
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
12
|
+
import notify from 'devextreme/ui/notify';
|
|
13
|
+
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
14
|
+
import { changePassword } from '../../api/auth';
|
|
15
|
+
|
|
16
|
+
export default function ChangePasswordForm() {
|
|
17
|
+
const navigate = useNavigate();
|
|
18
|
+
const [loading, setLoading] = useState(false);
|
|
19
|
+
const formData = useRef({ password: '' });
|
|
20
|
+
const { recoveryCode } = useParams();
|
|
21
|
+
|
|
22
|
+
const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const { password } = formData.current;
|
|
25
|
+
setLoading(true);
|
|
26
|
+
|
|
27
|
+
const result = await changePassword(password, recoveryCode);
|
|
28
|
+
setLoading(false);
|
|
29
|
+
|
|
30
|
+
if (result.isOk) {
|
|
31
|
+
navigate('/login');
|
|
32
|
+
} else {
|
|
33
|
+
notify(result.message, 'error', 2000);
|
|
34
|
+
}
|
|
35
|
+
}, [navigate, recoveryCode]);
|
|
36
|
+
|
|
37
|
+
const confirmPassword = useCallback(
|
|
38
|
+
({ value }<%=#isTypeScript%>: ValidationCallbackData<%=/isTypeScript%>) => value === formData.current.password,
|
|
39
|
+
[]
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<form onSubmit={onSubmit}>
|
|
44
|
+
<Form formData={formData.current} disabled={loading}>
|
|
45
|
+
<Item
|
|
46
|
+
dataField={'password'}
|
|
47
|
+
editorType={'dxTextBox'}
|
|
48
|
+
editorOptions={passwordEditorOptions}
|
|
49
|
+
>
|
|
50
|
+
<RequiredRule message="Password is required" />
|
|
51
|
+
<Label visible={false} />
|
|
52
|
+
</Item>
|
|
53
|
+
<Item
|
|
54
|
+
dataField={'confirmedPassword'}
|
|
55
|
+
editorType={'dxTextBox'}
|
|
56
|
+
editorOptions={confirmedPasswordEditorOptions}
|
|
57
|
+
>
|
|
58
|
+
<RequiredRule message="Password is required" />
|
|
59
|
+
<CustomRule
|
|
60
|
+
message={'Passwords do not match'}
|
|
61
|
+
validationCallback={confirmPassword}
|
|
62
|
+
/>
|
|
63
|
+
<Label visible={false} />
|
|
64
|
+
</Item>
|
|
65
|
+
<ButtonItem>
|
|
66
|
+
<ButtonOptions
|
|
67
|
+
width={'100%'}
|
|
68
|
+
type={'default'}
|
|
69
|
+
useSubmitBehavior={true}
|
|
70
|
+
>
|
|
71
|
+
<span className="dx-button-text">
|
|
72
|
+
{
|
|
73
|
+
loading
|
|
74
|
+
? <LoadIndicator width={'24px'} height={'24px'} visible={true} />
|
|
75
|
+
: 'Continue'
|
|
76
|
+
}
|
|
77
|
+
</span>
|
|
78
|
+
</ButtonOptions>
|
|
79
|
+
</ButtonItem>
|
|
80
|
+
</Form>
|
|
81
|
+
</form>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const passwordEditorOptions = { stylingMode: 'filled', placeholder: 'Password', mode: 'password' };
|
|
86
|
+
const confirmedPasswordEditorOptions = { stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' };
|
package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import React, { useState, useRef, useCallback } from 'react';
|
|
2
|
-
import { Link, useNavigate } from 'react-router-dom';
|
|
3
|
-
import Form, {
|
|
4
|
-
Item,
|
|
5
|
-
Label,
|
|
6
|
-
ButtonItem,
|
|
7
|
-
ButtonOptions,
|
|
8
|
-
RequiredRule,
|
|
9
|
-
CustomRule,
|
|
10
|
-
EmailRule
|
|
11
|
-
} from 'devextreme-react/form';
|
|
12
|
-
import notify from 'devextreme/ui/notify';
|
|
13
|
-
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
14
|
-
import { createAccount } from '../../api/auth';
|
|
15
|
-
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
16
|
-
import './CreateAccountForm.scss';
|
|
17
|
-
|
|
18
|
-
export default function CreateAccountForm() {
|
|
19
|
-
const navigate = useNavigate();
|
|
20
|
-
const [loading, setLoading] = useState(false);
|
|
21
|
-
const formData = useRef({ email: '', password: '' });
|
|
22
|
-
|
|
23
|
-
const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
const { email, password } = formData.current;
|
|
26
|
-
setLoading(true);
|
|
27
|
-
|
|
28
|
-
const result = await createAccount(email, password);
|
|
29
|
-
setLoading(false);
|
|
30
|
-
|
|
31
|
-
if (result.isOk) {
|
|
32
|
-
navigate('/login');
|
|
33
|
-
} else {
|
|
34
|
-
notify(result.message, 'error', 2000);
|
|
35
|
-
}
|
|
36
|
-
}, [navigate]);
|
|
37
|
-
|
|
38
|
-
const confirmPassword = useCallback(
|
|
39
|
-
({ value }<%=#isTypeScript%>: ValidationCallbackData<%=/isTypeScript%>) => value === formData.current.password,
|
|
40
|
-
[]
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<form className={'create-account-form'} onSubmit={onSubmit}>
|
|
45
|
-
<Form formData={formData.current} disabled={loading}>
|
|
46
|
-
<Item
|
|
47
|
-
dataField={'email'}
|
|
48
|
-
editorType={'dxTextBox'}
|
|
49
|
-
editorOptions={emailEditorOptions}
|
|
50
|
-
>
|
|
51
|
-
<RequiredRule message="Email is required" />
|
|
52
|
-
<EmailRule message="Email is invalid" />
|
|
53
|
-
<Label visible={false} />
|
|
54
|
-
</Item>
|
|
55
|
-
<Item
|
|
56
|
-
dataField={'password'}
|
|
57
|
-
editorType={'dxTextBox'}
|
|
58
|
-
editorOptions={passwordEditorOptions}
|
|
59
|
-
>
|
|
60
|
-
<RequiredRule message="Password is required" />
|
|
61
|
-
<Label visible={false} />
|
|
62
|
-
</Item>
|
|
63
|
-
<Item
|
|
64
|
-
dataField={'confirmedPassword'}
|
|
65
|
-
editorType={'dxTextBox'}
|
|
66
|
-
editorOptions={confirmedPasswordEditorOptions}
|
|
67
|
-
>
|
|
68
|
-
<RequiredRule message="Password is required" />
|
|
69
|
-
<CustomRule
|
|
70
|
-
message={'Passwords do not match'}
|
|
71
|
-
validationCallback={confirmPassword}
|
|
72
|
-
/>
|
|
73
|
-
<Label visible={false} />
|
|
74
|
-
</Item>
|
|
75
|
-
<Item>
|
|
76
|
-
<div className='policy-info'>
|
|
77
|
-
By creating an account, you agree to the <Link to="#">Terms of Service</Link> and <Link to="#">Privacy Policy</Link>
|
|
78
|
-
</div>
|
|
79
|
-
</Item>
|
|
80
|
-
<ButtonItem>
|
|
81
|
-
<ButtonOptions
|
|
82
|
-
width={'100%'}
|
|
83
|
-
type={'default'}
|
|
84
|
-
useSubmitBehavior={true}
|
|
85
|
-
>
|
|
86
|
-
<span className="dx-button-text">
|
|
87
|
-
{
|
|
88
|
-
loading
|
|
89
|
-
? <LoadIndicator width={'24px'} height={'24px'} visible={true} />
|
|
90
|
-
: 'Create a new account'
|
|
91
|
-
}
|
|
92
|
-
</span>
|
|
93
|
-
</ButtonOptions>
|
|
94
|
-
</ButtonItem>
|
|
95
|
-
<Item>
|
|
96
|
-
<div className={'login-link'}>
|
|
97
|
-
Have an account? <Link to={'/login'}>Sign In</Link>
|
|
98
|
-
</div>
|
|
99
|
-
</Item>
|
|
100
|
-
</Form>
|
|
101
|
-
</form>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const emailEditorOptions = { stylingMode: 'filled', placeholder: 'Email', mode: 'email' };
|
|
106
|
-
const passwordEditorOptions = { stylingMode: 'filled', placeholder: 'Password', mode: 'password' };
|
|
107
|
-
const confirmedPasswordEditorOptions = { stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' };
|
|
1
|
+
import React, { useState, useRef, useCallback } from 'react';
|
|
2
|
+
import { Link, useNavigate } from 'react-router-dom';
|
|
3
|
+
import Form, {
|
|
4
|
+
Item,
|
|
5
|
+
Label,
|
|
6
|
+
ButtonItem,
|
|
7
|
+
ButtonOptions,
|
|
8
|
+
RequiredRule,
|
|
9
|
+
CustomRule,
|
|
10
|
+
EmailRule
|
|
11
|
+
} from 'devextreme-react/form';
|
|
12
|
+
import notify from 'devextreme/ui/notify';
|
|
13
|
+
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
14
|
+
import { createAccount } from '../../api/auth';
|
|
15
|
+
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
16
|
+
import './CreateAccountForm.scss';
|
|
17
|
+
|
|
18
|
+
export default function CreateAccountForm() {
|
|
19
|
+
const navigate = useNavigate();
|
|
20
|
+
const [loading, setLoading] = useState(false);
|
|
21
|
+
const formData = useRef({ email: '', password: '' });
|
|
22
|
+
|
|
23
|
+
const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
const { email, password } = formData.current;
|
|
26
|
+
setLoading(true);
|
|
27
|
+
|
|
28
|
+
const result = await createAccount(email, password);
|
|
29
|
+
setLoading(false);
|
|
30
|
+
|
|
31
|
+
if (result.isOk) {
|
|
32
|
+
navigate('/login');
|
|
33
|
+
} else {
|
|
34
|
+
notify(result.message, 'error', 2000);
|
|
35
|
+
}
|
|
36
|
+
}, [navigate]);
|
|
37
|
+
|
|
38
|
+
const confirmPassword = useCallback(
|
|
39
|
+
({ value }<%=#isTypeScript%>: ValidationCallbackData<%=/isTypeScript%>) => value === formData.current.password,
|
|
40
|
+
[]
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<form className={'create-account-form'} onSubmit={onSubmit}>
|
|
45
|
+
<Form formData={formData.current} disabled={loading}>
|
|
46
|
+
<Item
|
|
47
|
+
dataField={'email'}
|
|
48
|
+
editorType={'dxTextBox'}
|
|
49
|
+
editorOptions={emailEditorOptions}
|
|
50
|
+
>
|
|
51
|
+
<RequiredRule message="Email is required" />
|
|
52
|
+
<EmailRule message="Email is invalid" />
|
|
53
|
+
<Label visible={false} />
|
|
54
|
+
</Item>
|
|
55
|
+
<Item
|
|
56
|
+
dataField={'password'}
|
|
57
|
+
editorType={'dxTextBox'}
|
|
58
|
+
editorOptions={passwordEditorOptions}
|
|
59
|
+
>
|
|
60
|
+
<RequiredRule message="Password is required" />
|
|
61
|
+
<Label visible={false} />
|
|
62
|
+
</Item>
|
|
63
|
+
<Item
|
|
64
|
+
dataField={'confirmedPassword'}
|
|
65
|
+
editorType={'dxTextBox'}
|
|
66
|
+
editorOptions={confirmedPasswordEditorOptions}
|
|
67
|
+
>
|
|
68
|
+
<RequiredRule message="Password is required" />
|
|
69
|
+
<CustomRule
|
|
70
|
+
message={'Passwords do not match'}
|
|
71
|
+
validationCallback={confirmPassword}
|
|
72
|
+
/>
|
|
73
|
+
<Label visible={false} />
|
|
74
|
+
</Item>
|
|
75
|
+
<Item>
|
|
76
|
+
<div className='policy-info'>
|
|
77
|
+
By creating an account, you agree to the <Link to="#">Terms of Service</Link> and <Link to="#">Privacy Policy</Link>
|
|
78
|
+
</div>
|
|
79
|
+
</Item>
|
|
80
|
+
<ButtonItem>
|
|
81
|
+
<ButtonOptions
|
|
82
|
+
width={'100%'}
|
|
83
|
+
type={'default'}
|
|
84
|
+
useSubmitBehavior={true}
|
|
85
|
+
>
|
|
86
|
+
<span className="dx-button-text">
|
|
87
|
+
{
|
|
88
|
+
loading
|
|
89
|
+
? <LoadIndicator width={'24px'} height={'24px'} visible={true} />
|
|
90
|
+
: 'Create a new account'
|
|
91
|
+
}
|
|
92
|
+
</span>
|
|
93
|
+
</ButtonOptions>
|
|
94
|
+
</ButtonItem>
|
|
95
|
+
<Item>
|
|
96
|
+
<div className={'login-link'}>
|
|
97
|
+
Have an account? <Link to={'/login'}>Sign In</Link>
|
|
98
|
+
</div>
|
|
99
|
+
</Item>
|
|
100
|
+
</Form>
|
|
101
|
+
</form>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const emailEditorOptions = { stylingMode: 'filled', placeholder: 'Email', mode: 'email' };
|
|
106
|
+
const passwordEditorOptions = { stylingMode: 'filled', placeholder: 'Password', mode: 'password' };
|
|
107
|
+
const confirmedPasswordEditorOptions = { stylingMode: 'filled', placeholder: 'Confirm Password', mode: 'password' };
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { TreeViewTypes } from 'devextreme-react/tree-view';
|
|
2
|
-
import { ButtonTypes } from 'devextreme-react/button';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
export interface HeaderProps {
|
|
6
|
-
menuToggleEnabled: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
toggleMenu: (e: ButtonTypes.ClickEvent) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SideNavigationMenuProps {
|
|
12
|
-
selectedItemChanged: (e: TreeViewTypes.ItemClickEvent) => void;
|
|
13
|
-
openMenu: (e: React.PointerEvent) => void;
|
|
14
|
-
compactMode: boolean;
|
|
15
|
-
onMenuReady: (e: TreeViewTypes.ContentReadyEvent) => void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface UserPanelProps {
|
|
19
|
-
menuMode: 'context' | 'list';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface User {
|
|
23
|
-
email: string;
|
|
24
|
-
avatarUrl: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type AuthContextType = {
|
|
28
|
-
user?: User;
|
|
29
|
-
signIn: (email: string, password: string) => Promise<{isOk: boolean, data?: User, message?: string}>;
|
|
30
|
-
signOut: () => void;
|
|
31
|
-
loading: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface SideNavToolbarProps {
|
|
35
|
-
title: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface SingleCardProps {
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type Handle = () => void;
|
|
44
|
-
|
|
45
|
-
interface NavigationData {
|
|
46
|
-
currentPath: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type NavigationContextType = {
|
|
50
|
-
setNavigationData?: ({ currentPath }: NavigationData) => void;
|
|
51
|
-
navigationData: NavigationData;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type ValidationType = {
|
|
55
|
-
value: string;
|
|
1
|
+
import { TreeViewTypes } from 'devextreme-react/tree-view';
|
|
2
|
+
import { ButtonTypes } from 'devextreme-react/button';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
export interface HeaderProps {
|
|
6
|
+
menuToggleEnabled: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
toggleMenu: (e: ButtonTypes.ClickEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SideNavigationMenuProps {
|
|
12
|
+
selectedItemChanged: (e: TreeViewTypes.ItemClickEvent) => void;
|
|
13
|
+
openMenu: (e: React.PointerEvent) => void;
|
|
14
|
+
compactMode: boolean;
|
|
15
|
+
onMenuReady: (e: TreeViewTypes.ContentReadyEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface UserPanelProps {
|
|
19
|
+
menuMode: 'context' | 'list';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface User {
|
|
23
|
+
email: string;
|
|
24
|
+
avatarUrl: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type AuthContextType = {
|
|
28
|
+
user?: User;
|
|
29
|
+
signIn: (email: string, password: string) => Promise<{isOk: boolean, data?: User, message?: string}>;
|
|
30
|
+
signOut: () => void;
|
|
31
|
+
loading: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SideNavToolbarProps {
|
|
35
|
+
title: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface SingleCardProps {
|
|
39
|
+
title?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type Handle = () => void;
|
|
44
|
+
|
|
45
|
+
interface NavigationData {
|
|
46
|
+
currentPath: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type NavigationContextType = {
|
|
50
|
+
setNavigationData?: ({ currentPath }: NavigationData) => void;
|
|
51
|
+
navigationData: NavigationData;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type ValidationType = {
|
|
55
|
+
value: string;
|
|
56
56
|
}
|