devextreme-cli 1.6.9 → 1.7.1
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 -3
- package/src/.DS_Store +0 -0
- package/src/applications/application.angular.js +6 -4
- package/src/templates/.DS_Store +0 -0
- package/src/templates/react/.DS_Store +0 -0
- package/src/templates/react/application/.DS_Store +0 -0
- 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/components/side-navigation-menu/SideNavigationMenu.tsx +3 -3
- package/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.tsx +3 -3
- package/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx +3 -3
- package/src/templates/react/application/src/types.tsx +55 -55
- package/src/utility/latest-versions.js +3 -3
- package/src/utility/ng-version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devextreme-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "DevExtreme CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devexpress",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"minimist": "^1.2.8",
|
|
44
44
|
"mustache": "^3.2.1",
|
|
45
45
|
"prompts": "^2.4.2",
|
|
46
|
-
"sass": "^1.
|
|
46
|
+
"sass": "^1.77.6",
|
|
47
47
|
"semver": "^5.7.2",
|
|
48
48
|
"strip-bom": "^4.0.0"
|
|
49
49
|
},
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"typescript": "^4.0.2",
|
|
73
73
|
"typescript-eslint-parser": "^22.0.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "faa2afd612b7677412d18ca0b8330b1076f4ccd8"
|
|
76
76
|
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -10,7 +10,7 @@ const latestVersions = require('../utility/latest-versions');
|
|
|
10
10
|
const { extractToolingVersion, toolingVersionOptionName } = require('../utility/extract-tooling-version');
|
|
11
11
|
const schematicsVersion = latestVersions['devextreme-schematics'] || 'latest';
|
|
12
12
|
|
|
13
|
-
const minNgCliVersion = new semver('
|
|
13
|
+
const minNgCliVersion = new semver('16.0.0');
|
|
14
14
|
const ngCliWithStandalone = new semver('17.0.0');
|
|
15
15
|
|
|
16
16
|
async function runSchematicCommand(schematicCommand, options, evaluatingOptions) {
|
|
@@ -40,9 +40,10 @@ async function runNgCommand(commandArguments, commandOptions, commandConfig) {
|
|
|
40
40
|
const hasNg = await hasSutableNgCli();
|
|
41
41
|
const toolingVersion = extractToolingVersion(commandOptions);
|
|
42
42
|
const npmCommandName = hasNg && !toolingVersion ? 'ng' : 'npx';
|
|
43
|
+
const [minCliLtsVersion] = minNgCliVersion.version.split('.');
|
|
43
44
|
const ngCommandArguments = hasNg && !toolingVersion
|
|
44
45
|
? []
|
|
45
|
-
: ['-p',
|
|
46
|
+
: ['-p', `@angular/cli@v${minCliLtsVersion}-lts`, 'ng'];
|
|
46
47
|
|
|
47
48
|
ngCommandArguments.push(...commandArguments);
|
|
48
49
|
return runCommand(npmCommandName, ngCommandArguments, commandConfig);
|
|
@@ -88,7 +89,7 @@ const create = async(appName, options) => {
|
|
|
88
89
|
];
|
|
89
90
|
|
|
90
91
|
if(ngCliWithStandalone.compare(currentNgVersion) <= 0) {
|
|
91
|
-
commandArguments.push('--standalone=false');
|
|
92
|
+
commandArguments.push('--standalone=false', '--ssr=false');
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
await runNgCommand(commandArguments, options);
|
|
@@ -128,7 +129,8 @@ const changeMainTs = (appPath) => {
|
|
|
128
129
|
moduleWorker.insertImport(filePath, 'devextreme/ui/themes', 'themes', true);
|
|
129
130
|
|
|
130
131
|
const fileContent = fs.readFileSync(filePath).toString();
|
|
131
|
-
const
|
|
132
|
+
const bootstrapPattern = /platformBrowserDynamic\(\)\.bootstrapModule\(\s*AppModule\s*(?:,\s*\{[^}]*\})?\s*\)/;
|
|
133
|
+
const firstChaptStr = fileContent.match(bootstrapPattern)[0];
|
|
132
134
|
const lastChaptStr = '.catch(err => console.error(err));';
|
|
133
135
|
|
|
134
136
|
fs.writeFileSync(
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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' };
|
package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useCallback, useMemo } from 'react';
|
|
2
|
-
import TreeView from 'devextreme-react/tree-view';
|
|
2
|
+
import { TreeView<%=#isTypeScript%>, TreeViewRef<%=/isTypeScript%> } from 'devextreme-react/tree-view';
|
|
3
3
|
import { navigation } from '../../app-navigation';
|
|
4
4
|
import { useNavigation } from '../../contexts/navigation';
|
|
5
5
|
import { useScreenSize } from '../../utils/media-query';
|
|
@@ -32,7 +32,7 @@ export default function SideNavigationMenu(props<%=#isTypeScript%>: React.PropsW
|
|
|
32
32
|
|
|
33
33
|
const { navigationData: { currentPath } } = useNavigation();
|
|
34
34
|
|
|
35
|
-
const treeViewRef = useRef<%=#isTypeScript%><
|
|
35
|
+
const treeViewRef = useRef<%=#isTypeScript%><TreeViewRef><%=/isTypeScript%>(null);
|
|
36
36
|
const wrapperRef = useRef<%=#isTypeScript%><HTMLDivElement><%=/isTypeScript%>();
|
|
37
37
|
const getWrapperRef = useCallback((element<%=#isTypeScript%>: HTMLDivElement<%=/isTypeScript%>) => {
|
|
38
38
|
const prevElement = wrapperRef.current;
|
|
@@ -47,7 +47,7 @@ export default function SideNavigationMenu(props<%=#isTypeScript%>: React.PropsW
|
|
|
47
47
|
}, [openMenu]);
|
|
48
48
|
|
|
49
49
|
useEffect(() => {
|
|
50
|
-
const treeView = treeViewRef.current && treeViewRef.current.instance;
|
|
50
|
+
const treeView = treeViewRef.current && treeViewRef.current.instance();
|
|
51
51
|
if (!treeView) {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from 'devextreme-react/button';
|
|
2
2
|
import Drawer from 'devextreme-react/drawer';
|
|
3
|
-
import ScrollView from 'devextreme-react/scroll-view';
|
|
3
|
+
import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view';
|
|
4
4
|
import Toolbar, { Item } from 'devextreme-react/toolbar';
|
|
5
5
|
import React, { useState, useCallback, useRef } from 'react';
|
|
6
6
|
import { useNavigate } from 'react-router';
|
|
@@ -14,7 +14,7 @@ import { useMenuPatch } from '../../utils/patches';
|
|
|
14
14
|
<%=#isTypeScript%>import { ButtonTypes } from 'devextreme-react/button';<%=/isTypeScript%>
|
|
15
15
|
|
|
16
16
|
export default function SideNavInnerToolbar({ title, children }<%=#isTypeScript%>: React.PropsWithChildren<SideNavToolbarProps><%=/isTypeScript%>) {
|
|
17
|
-
const scrollViewRef = useRef<%=#isTypeScript%><
|
|
17
|
+
const scrollViewRef = useRef<%=#isTypeScript%><ScrollViewRef><%=/isTypeScript%>(null);
|
|
18
18
|
const navigate = useNavigate();
|
|
19
19
|
const { isXSmall, isLarge } = useScreenSize();
|
|
20
20
|
const [patchCssClass, onMenuReady] = useMenuPatch();
|
|
@@ -55,7 +55,7 @@ export default function SideNavInnerToolbar({ title, children }<%=#isTypeScript%
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
navigate(itemData.path);
|
|
58
|
-
scrollViewRef.current<%=#isTypeScript%>?<%=/isTypeScript%>.instance.scrollTo(0);
|
|
58
|
+
scrollViewRef.current<%=#isTypeScript%>?<%=/isTypeScript%>.instance().scrollTo(0);
|
|
59
59
|
|
|
60
60
|
if (!isLarge || menuStatus === MenuStatus.TemporaryOpened) {
|
|
61
61
|
setMenuStatus(MenuStatus.Closed);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Drawer from 'devextreme-react/drawer';
|
|
2
|
-
import ScrollView from 'devextreme-react/scroll-view';
|
|
2
|
+
import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view';
|
|
3
3
|
import React, { useState, useCallback, useRef } from 'react';
|
|
4
4
|
import { useNavigate } from 'react-router';
|
|
5
5
|
import { Header, SideNavigationMenu, Footer } from '../../components';
|
|
@@ -12,7 +12,7 @@ import { useMenuPatch } from '../../utils/patches';
|
|
|
12
12
|
<%=#isTypeScript%>import type { SideNavToolbarProps } from '../../types';<%=/isTypeScript%>
|
|
13
13
|
|
|
14
14
|
export default function SideNavOuterToolbar({ title, children }<%=#isTypeScript%>: React.PropsWithChildren<SideNavToolbarProps><%=/isTypeScript%>) {
|
|
15
|
-
const scrollViewRef = useRef<%=#isTypeScript%><
|
|
15
|
+
const scrollViewRef = useRef<%=#isTypeScript%><ScrollViewRef><%=/isTypeScript%>(null);
|
|
16
16
|
const navigate = useNavigate();
|
|
17
17
|
const { isXSmall, isLarge } = useScreenSize();
|
|
18
18
|
const [patchCssClass, onMenuReady] = useMenuPatch();
|
|
@@ -53,7 +53,7 @@ export default function SideNavOuterToolbar({ title, children }<%=#isTypeScript%
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
navigate(itemData.path);
|
|
56
|
-
scrollViewRef.current<%=#isTypeScript%>?<%=/isTypeScript%>.instance.scrollTo(0);
|
|
56
|
+
scrollViewRef.current<%=#isTypeScript%>?<%=/isTypeScript%>.instance().scrollTo(0);
|
|
57
57
|
|
|
58
58
|
if (!isLarge || menuStatus === MenuStatus.TemporaryOpened) {
|
|
59
59
|
setMenuStatus(MenuStatus.Closed);
|
|
@@ -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
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const packageJson = require('../../package.json');
|
|
2
2
|
module.exports = {
|
|
3
|
-
'devextreme': '
|
|
4
|
-
'devextreme-react': '
|
|
5
|
-
'devextreme-vue': '
|
|
3
|
+
'devextreme': '24.1.4',
|
|
4
|
+
'devextreme-react': '24.1.4',
|
|
5
|
+
'devextreme-vue': '24.1.4',
|
|
6
6
|
'devextreme-cli': packageJson.version,
|
|
7
7
|
'devextreme-schematics': 'latest'
|
|
8
8
|
};
|
|
@@ -15,7 +15,7 @@ const getLocalNgVersion = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const getPublicNgVersion = () => {
|
|
18
|
-
const version = execSync('npm view @angular/cli@
|
|
18
|
+
const version = execSync('npm view @angular/cli@v16-lts version').toString();
|
|
19
19
|
return new semver(version);
|
|
20
20
|
};
|
|
21
21
|
|