devextreme-cli 1.11.0-beta.0 → 1.11.0
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 +9 -9
- package/src/applications/application.angular.js +1 -1
- package/src/applications/application.react.js +1 -1
- package/src/applications/application.vue.js +6 -11
- package/src/templates/react/application/src/App.tsx +2 -1
- package/src/templates/react/application/src/Content.tsx +1 -1
- package/src/templates/react/application/src/app-routes.tsx +3 -3
- package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +1 -1
- package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +1 -1
- package/src/templates/react/application/src/components/login-form/LoginForm.tsx +1 -1
- package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx +2 -2
- package/src/templates/react/application/src/components/user-panel/UserPanel.tsx +1 -1
- package/src/templates/react/application/src/contexts/auth-hooks.ts +8 -0
- package/src/templates/react/application/src/contexts/auth.tsx +7 -5
- package/src/templates/react/application/src/contexts/navigation-hooks.ts +22 -0
- package/src/templates/react/application/src/contexts/navigation.tsx +3 -17
- 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 +2 -2
- package/src/templates/react/page/page.tsx +1 -1
- package/src/templates/react/sample-pages/home/home.tsx +1 -1
- package/src/templates/react/sample-pages/index.tsx +3 -3
- package/src/templates/react/sample-pages/profile/profile.tsx +1 -1
- package/src/templates/react/sample-pages/tasks/tasks.tsx +1 -1
- package/src/templates/vue-v3/application/eslint.config.js +32 -0
- package/src/templates/vue-v3/application/src/App.vue +1 -1
- package/src/templates/vue-v3/application/src/components/header-toolbar.vue +1 -1
- package/src/templates/vue-v3/application/src/layouts/side-nav-inner-toolbar.vue +2 -2
- package/src/templates/vue-v3/application/src/layouts/side-nav-outer-toolbar.vue +2 -2
- package/src/templates/vue-v3/application/src/main.js +1 -1
- package/src/templates/vue-v3/application/src/router.js +5 -5
- package/src/utility/latest-versions.js +7 -6
- package/src/utility/module.js +2 -2
- package/src/templates/vue-v3/application/vue.config.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devextreme-cli",
|
|
3
|
-
"version": "1.11.0
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "DevExtreme CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devexpress",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"devextreme": "index.js"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">
|
|
18
|
-
"npm": ">6.
|
|
17
|
+
"node": ">20.19.0",
|
|
18
|
+
"npm": ">9.6.0",
|
|
19
19
|
"yarn": ">1.21"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -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.89.2",
|
|
47
47
|
"semver": "^5.7.2",
|
|
48
48
|
"strip-bom": "^4.0.0"
|
|
49
49
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
52
52
|
"@typescript-eslint/parser": "^4.33.0",
|
|
53
53
|
"babel-eslint": "^10.1.0",
|
|
54
|
-
"create-vite": "
|
|
54
|
+
"create-vite": "7.0.0",
|
|
55
55
|
"cross-env": "^5.2.1",
|
|
56
56
|
"eslint": "^7.32.0",
|
|
57
57
|
"eslint-config-angular": "^0.5.0",
|
|
@@ -59,20 +59,20 @@
|
|
|
59
59
|
"eslint-plugin-angular": "^4.1.0",
|
|
60
60
|
"eslint-plugin-jest": "^22.21.0",
|
|
61
61
|
"eslint-plugin-prettier": "^4.2.1",
|
|
62
|
-
"eslint-plugin-react": "^7.37.
|
|
62
|
+
"eslint-plugin-react": "^7.37.5",
|
|
63
63
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
64
64
|
"eslint-plugin-unused-imports": "^1.1.5",
|
|
65
65
|
"eslint-plugin-vue": "^7.20.0",
|
|
66
66
|
"eslint-stylish": "^0.2.0",
|
|
67
67
|
"jest": "^29.7.0",
|
|
68
|
-
"jest-image-snapshot": "^6.
|
|
68
|
+
"jest-image-snapshot": "^6.5.1",
|
|
69
69
|
"prettier": "^2.8.8",
|
|
70
70
|
"rimraf": "^2.7.1",
|
|
71
71
|
"tree-kill": "^1.2.2",
|
|
72
72
|
"tree-kill-promise": "^1.0.12",
|
|
73
73
|
"typescript": "^4.0.2",
|
|
74
74
|
"typescript-eslint-parser": "^22.0.0",
|
|
75
|
-
"wait-on": "8.0.
|
|
75
|
+
"wait-on": "8.0.3"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "16351e5d8d9dceee7d826668231c3e047d4df3fc"
|
|
78
78
|
}
|
|
@@ -99,8 +99,8 @@ const bumpAngular = (appPath, versionTag) => {
|
|
|
99
99
|
|
|
100
100
|
const create = async(appName, options) => {
|
|
101
101
|
const layout = await getLayoutInfo(options.layout);
|
|
102
|
-
const depsVersionTag = extractDepsVersionTag(options);
|
|
103
102
|
const currentNgVersion = ngVersion.getNgCliVersion().version;
|
|
103
|
+
const depsVersionTag = extractDepsVersionTag(options);
|
|
104
104
|
|
|
105
105
|
const commandArguments = [
|
|
106
106
|
'new',
|
|
@@ -214,7 +214,7 @@ const addView = (pageName, options) => {
|
|
|
214
214
|
return fileExtension === '.tsx' ? extension : fileExtension;
|
|
215
215
|
};
|
|
216
216
|
templateCreator.addPageToApp(pageName, pathToPage, pageTemplatePath, getCorrectExtension);
|
|
217
|
-
moduleUtils.insertExport(pathToPagesIndex(), componentName, `./${pageName}/${pageName}
|
|
217
|
+
moduleUtils.insertExport(pathToPagesIndex(), componentName, `./${pageName}/${pageName}`, 'Page');
|
|
218
218
|
moduleUtils.insertImport(routingModulePath, './pages', componentName);
|
|
219
219
|
insertItemToArray(routingModulePath, navigationData.route);
|
|
220
220
|
insertItemToArray(navigationModulePath, navigationData.navigation);
|
|
@@ -16,10 +16,9 @@ const defaultStyles = [
|
|
|
16
16
|
|
|
17
17
|
const preparePackageJsonForTemplate = (appPath, appName) => {
|
|
18
18
|
const dependencies = [
|
|
19
|
-
{ name: 'sass', version: '^1.
|
|
19
|
+
{ name: 'sass-embedded', version: '^1.85.1' },
|
|
20
20
|
{ name: 'vue-router', version: '^3.0.1' },
|
|
21
|
-
{ name: 'devextreme-cli', version: latestVersions['devextreme-cli'], dev: true }
|
|
22
|
-
{ name: 'sass-loader', version: '^10', dev: true }
|
|
21
|
+
{ name: 'devextreme-cli', version: latestVersions['devextreme-cli'], dev: true }
|
|
23
22
|
];
|
|
24
23
|
|
|
25
24
|
const nameDepends = dependencies.map(d => d.name);
|
|
@@ -38,18 +37,14 @@ const preparePackageJsonForTemplate = (appPath, appName) => {
|
|
|
38
37
|
};
|
|
39
38
|
|
|
40
39
|
async function createVueApp(name, depsVersionTag) {
|
|
41
|
-
const argList = ['
|
|
42
|
-
|
|
43
|
-
return runCommand('npx', argList);
|
|
40
|
+
const argList = ['create', `vue@${depsVersionTag ? depsVersionTag : latestVersions['create-vue']}`, name, '--registry', 'https://registry.npmjs.org/', '--', '--eslint', '--default', '--bare'];
|
|
41
|
+
return runCommand('npm', argList);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
const bumpVue = (appPath, versionTag) => {
|
|
47
45
|
const dependencies = [
|
|
48
46
|
{ name: 'vue', version: versionTag },
|
|
49
47
|
{ name: 'vue-router', version: versionTag },
|
|
50
|
-
{ name: '@vue/cli-plugin-babel', version: versionTag, dev: true },
|
|
51
|
-
{ name: '@vue/cli-plugin-eslint', version: versionTag, dev: true },
|
|
52
|
-
{ name: '@vue/cli-service', version: versionTag, dev: true },
|
|
53
48
|
];
|
|
54
49
|
|
|
55
50
|
packageJsonUtils.addDependencies(appPath, dependencies);
|
|
@@ -78,7 +73,7 @@ const create = async(appName, options) => {
|
|
|
78
73
|
};
|
|
79
74
|
|
|
80
75
|
const modifyIndexHtml = (appPath, appName) => {
|
|
81
|
-
const indexHtmlPath = path.join(appPath, '
|
|
76
|
+
const indexHtmlPath = path.join(appPath, 'index.html');
|
|
82
77
|
let htmlContent = fs.readFileSync(indexHtmlPath).toString();
|
|
83
78
|
|
|
84
79
|
htmlContent = htmlContent.replace(/<title>(\w+\s*)+<\/title>/, `<title>${appName}<\/title>`);
|
|
@@ -175,7 +170,7 @@ const addView = (pageName, options) => {
|
|
|
175
170
|
const navigationData = getNavigationData(pageName, componentName, options && options.icon || 'folder');
|
|
176
171
|
const getCorrectExtension = (fileExtension) => fileExtension;
|
|
177
172
|
templateCreator.addPageToApp(pageName, pathToPage, pageTemplatePath, getCorrectExtension);
|
|
178
|
-
moduleUtils.insertImport(routingModulePath, `./views/${pageName}`, componentName, true);
|
|
173
|
+
moduleUtils.insertImport(routingModulePath, `./views/${pageName}.vue`, componentName, true);
|
|
179
174
|
insertItemToArray(routingModulePath, navigationData.route);
|
|
180
175
|
insertItemToArray(navigationModulePath, navigationData.navigation);
|
|
181
176
|
};
|
|
@@ -2,7 +2,8 @@ import { HashRouter as Router } from 'react-router-dom';
|
|
|
2
2
|
import './dx-styles.scss';
|
|
3
3
|
import LoadPanel from 'devextreme-react/load-panel';
|
|
4
4
|
import { NavigationProvider } from './contexts/navigation';
|
|
5
|
-
import { AuthProvider
|
|
5
|
+
import { AuthProvider } from './contexts/auth';
|
|
6
|
+
import { useAuth } from './contexts/auth-hooks';
|
|
6
7
|
import { useScreenSizeClass } from './utils/media-query';
|
|
7
8
|
import Content from './Content';
|
|
8
9
|
import UnauthenticatedContent from './UnauthenticatedContent';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
|
2
2
|
import appInfo from './app-info';
|
|
3
|
-
import routes from './app-routes';
|
|
3
|
+
import { routes } from './app-routes';
|
|
4
4
|
import { <%=layout%> as SideNavBarLayout } from './layouts';
|
|
5
5
|
import { Footer } from './components';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HomePage, TasksPage, ProfilePage } from './pages';
|
|
2
|
-
import { withNavigationWatcher } from './contexts/navigation';
|
|
2
|
+
import { withNavigationWatcher } from './contexts/navigation-hooks';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const routeData = [<%=^empty%>
|
|
5
5
|
{
|
|
6
6
|
path: '/tasks',
|
|
7
7
|
element: TasksPage
|
|
@@ -16,7 +16,7 @@ const routes = [<%=^empty%>
|
|
|
16
16
|
}
|
|
17
17
|
<%=/empty%>];
|
|
18
18
|
|
|
19
|
-
export
|
|
19
|
+
export const routes = routeData.map(route => {
|
|
20
20
|
return {
|
|
21
21
|
...route,
|
|
22
22
|
element: withNavigationWatcher(route.element, route.path)
|
package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import Form, {
|
|
|
10
10
|
} from 'devextreme-react/form';
|
|
11
11
|
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
12
12
|
import notify from 'devextreme/ui/notify';
|
|
13
|
-
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
13
|
+
<%=#isTypeScript%>import type { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
14
14
|
import { changePassword } from '../../api/auth';
|
|
15
15
|
|
|
16
16
|
export default function ChangePasswordForm() {
|
package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import Form, {
|
|
|
12
12
|
import notify from 'devextreme/ui/notify';
|
|
13
13
|
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
14
14
|
import { createAccount } from '../../api/auth';
|
|
15
|
-
<%=#isTypeScript%>import { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
15
|
+
<%=#isTypeScript%>import type { ValidationCallbackData } from 'devextreme-react/common';<%=/isTypeScript%>
|
|
16
16
|
import './CreateAccountForm.scss';
|
|
17
17
|
|
|
18
18
|
export default function CreateAccountForm() {
|
|
@@ -11,7 +11,7 @@ import Form, {
|
|
|
11
11
|
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
12
12
|
import Button from 'devextreme-react/button';
|
|
13
13
|
import notify from 'devextreme/ui/notify';
|
|
14
|
-
import { useAuth } from '../../contexts/auth';
|
|
14
|
+
import { useAuth } from '../../contexts/auth-hooks';
|
|
15
15
|
|
|
16
16
|
import './LoginForm.scss';
|
|
17
17
|
|
package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useCallback, useMemo, useContext } from 'react';
|
|
2
|
-
import { TreeView<%=#isTypeScript%>, TreeViewRef<%=/isTypeScript%> } from 'devextreme-react/tree-view';
|
|
2
|
+
import { TreeView<%=#isTypeScript%>, type TreeViewRef<%=/isTypeScript%> } from 'devextreme-react/tree-view';
|
|
3
3
|
import * as events from 'devextreme-react/common/core/events';
|
|
4
4
|
import { navigation } from '../../app-navigation';
|
|
5
|
-
import { useNavigation } from '../../contexts/navigation';
|
|
5
|
+
import { useNavigation } from '../../contexts/navigation-hooks';
|
|
6
6
|
import { useScreenSize } from '../../utils/media-query';
|
|
7
7
|
import './SideNavigationMenu.scss';
|
|
8
8
|
<%=#isTypeScript%>import type { SideNavigationMenuProps } from '../../types';<%=/isTypeScript%>
|
|
@@ -2,7 +2,7 @@ import { useMemo, useCallback } from 'react';
|
|
|
2
2
|
import { useNavigate } from "react-router-dom";
|
|
3
3
|
import DropDownButton from 'devextreme-react/drop-down-button';
|
|
4
4
|
import List from 'devextreme-react/list';
|
|
5
|
-
import { useAuth } from '../../contexts/auth';
|
|
5
|
+
import { useAuth } from '../../contexts/auth-hooks';
|
|
6
6
|
import './UserPanel.scss';
|
|
7
7
|
<%=#isTypeScript%>import type { UserPanelProps } from '../../types';<%=/isTypeScript%>
|
|
8
8
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import React, { useState, useEffect,
|
|
1
|
+
import React, { useState, useEffect, useCallback, createContext } from 'react';
|
|
2
2
|
import { getUser, signIn as sendSignInRequest } from '../api/auth';
|
|
3
3
|
<%=#isTypeScript%>import type { User, AuthContextType } from '../types';<%=/isTypeScript%>
|
|
4
4
|
|
|
5
|
+
const AuthContext = createContext<%=#isTypeScript%><AuthContextType><%=/isTypeScript%>({ loading: false }<%=#isTypeScript%> as AuthContextType<%=/isTypeScript%>);
|
|
6
|
+
|
|
5
7
|
function AuthProvider(props<%=#isTypeScript%>: React.PropsWithChildren<unknown><%=/isTypeScript%>) {
|
|
6
8
|
const [user, setUser] = useState<%=#isTypeScript%><User><%=/isTypeScript%>();
|
|
7
9
|
const [loading, setLoading] = useState(true);
|
|
@@ -36,7 +38,7 @@ function AuthProvider(props<%=#isTypeScript%>: React.PropsWithChildren<unknown><
|
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
export {
|
|
42
|
+
AuthProvider,
|
|
43
|
+
AuthContext,
|
|
44
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
|
+
import { NavigationContext } from './navigation';
|
|
3
|
+
|
|
4
|
+
const useNavigation = () => useContext(NavigationContext);
|
|
5
|
+
|
|
6
|
+
function withNavigationWatcher(Component<%=#isTypeScript%>: React.ElementType<%=/isTypeScript%>, path<%=#isTypeScript%>: string<%=/isTypeScript%>) {
|
|
7
|
+
const WrappedComponent = function (props<%=#isTypeScript%>: Record<string, unknown><%=/isTypeScript%>) {
|
|
8
|
+
const { setNavigationData } = useNavigation();
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setNavigationData<%=#isTypeScript%>!<%=/isTypeScript%>({ currentPath: path });
|
|
12
|
+
}, [setNavigationData]);
|
|
13
|
+
|
|
14
|
+
return <Component {...props} />;
|
|
15
|
+
}
|
|
16
|
+
return <WrappedComponent />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
useNavigation,
|
|
21
|
+
withNavigationWatcher
|
|
22
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { useState, createContext
|
|
1
|
+
import React, { useState, createContext } from 'react';
|
|
2
2
|
<%=#isTypeScript%>import type { NavigationContextType } from '../types';<%=/isTypeScript%>
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
const NavigationContext = createContext<%=#isTypeScript%><NavigationContextType><%=/isTypeScript%>({}<%=#isTypeScript%> as NavigationContextType<%=/isTypeScript%>);
|
|
5
|
-
const useNavigation = () => useContext(NavigationContext);
|
|
6
6
|
|
|
7
7
|
function NavigationProvider(props<%=#isTypeScript%>: React.PropsWithChildren<unknown><%=/isTypeScript%>) {
|
|
8
8
|
const [navigationData, setNavigationData] = useState({ currentPath: '' });
|
|
@@ -15,21 +15,7 @@ function NavigationProvider(props<%=#isTypeScript%>: React.PropsWithChildren<unk
|
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function withNavigationWatcher(Component<%=#isTypeScript%>: React.ElementType<%=/isTypeScript%>, path<%=#isTypeScript%>: string<%=/isTypeScript%>) {
|
|
19
|
-
const WrappedComponent = function (props<%=#isTypeScript%>: Record<string, unknown><%=/isTypeScript%>) {
|
|
20
|
-
const { setNavigationData } = useNavigation();
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
setNavigationData<%=#isTypeScript%>!<%=/isTypeScript%>({ currentPath: path });
|
|
24
|
-
}, [setNavigationData]);
|
|
25
|
-
|
|
26
|
-
return <Component {...props} />;
|
|
27
|
-
}
|
|
28
|
-
return <WrappedComponent />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
18
|
export {
|
|
32
19
|
NavigationProvider,
|
|
33
|
-
|
|
34
|
-
withNavigationWatcher
|
|
20
|
+
NavigationContext,
|
|
35
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from 'devextreme-react/button';
|
|
2
2
|
import Drawer from 'devextreme-react/drawer';
|
|
3
|
-
import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view';
|
|
3
|
+
import { ScrollView<%=#isTypeScript%>, type 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-dom';
|
|
@@ -9,9 +9,9 @@ import './side-nav-inner-toolbar.scss';
|
|
|
9
9
|
import { useScreenSize } from '../../utils/media-query';
|
|
10
10
|
import { Template } from 'devextreme-react/core/template';
|
|
11
11
|
import { useMenuPatch } from '../../utils/patches';
|
|
12
|
-
<%=#isTypeScript%>import { TreeViewTypes } from 'devextreme-react/tree-view';<%=/isTypeScript%>
|
|
12
|
+
<%=#isTypeScript%>import type { TreeViewTypes } from 'devextreme-react/tree-view';<%=/isTypeScript%>
|
|
13
13
|
<%=#isTypeScript%>import type { SideNavToolbarProps } from '../../types';<%=/isTypeScript%>
|
|
14
|
-
<%=#isTypeScript%>import { ButtonTypes } from 'devextreme-react/button';<%=/isTypeScript%>
|
|
14
|
+
<%=#isTypeScript%>import type { ButtonTypes } from 'devextreme-react/button';<%=/isTypeScript%>
|
|
15
15
|
|
|
16
16
|
export default function SideNavInnerToolbar({ title, children }<%=#isTypeScript%>: React.PropsWithChildren<SideNavToolbarProps><%=/isTypeScript%>) {
|
|
17
17
|
const scrollViewRef = useRef<%=#isTypeScript%><ScrollViewRef><%=/isTypeScript%>(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Drawer from 'devextreme-react/drawer';
|
|
2
|
-
import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view';
|
|
2
|
+
import { ScrollView<%=#isTypeScript%>, type ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view';
|
|
3
3
|
import React, { useState, useCallback, useRef } from 'react';
|
|
4
4
|
import { useNavigate } from 'react-router-dom';
|
|
5
5
|
import { Header, SideNavigationMenu, Footer } from '../../components';
|
|
@@ -7,8 +7,8 @@ import './side-nav-outer-toolbar.scss';
|
|
|
7
7
|
import { useScreenSize } from '../../utils/media-query';
|
|
8
8
|
import { Template } from 'devextreme-react/core/template';
|
|
9
9
|
import { useMenuPatch } from '../../utils/patches';
|
|
10
|
-
<%=#isTypeScript%>import { ButtonTypes } from 'devextreme-react/button';<%=/isTypeScript%>
|
|
11
|
-
<%=#isTypeScript%>import { TreeViewTypes } from 'devextreme-react/tree-view';<%=/isTypeScript%>
|
|
10
|
+
<%=#isTypeScript%>import type { ButtonTypes } from 'devextreme-react/button';<%=/isTypeScript%>
|
|
11
|
+
<%=#isTypeScript%>import type { TreeViewTypes } from 'devextreme-react/tree-view';<%=/isTypeScript%>
|
|
12
12
|
<%=#isTypeScript%>import type { SideNavToolbarProps } from '../../types';<%=/isTypeScript%>
|
|
13
13
|
|
|
14
14
|
export default function SideNavOuterToolbar({ title, children }<%=#isTypeScript%>: React.PropsWithChildren<SideNavToolbarProps><%=/isTypeScript%>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TreeViewTypes } from 'devextreme-react/tree-view';
|
|
2
|
-
import { ButtonTypes } from 'devextreme-react/button';
|
|
1
|
+
import type { TreeViewTypes } from 'devextreme-react/tree-view';
|
|
2
|
+
import type { ButtonTypes } from 'devextreme-react/button';
|
|
3
3
|
|
|
4
4
|
export interface HeaderProps {
|
|
5
5
|
menuToggleEnabled: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { Home as HomePage } from './home/home';
|
|
2
|
+
export { Profile as ProfilePage } from './profile/profile';
|
|
3
|
+
export { Tasks as TasksPage } from './tasks/tasks';
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import './profile.scss';
|
|
3
3
|
import Form from 'devextreme-react/form';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export function Profile() {
|
|
6
6
|
const [notes, setNotes] = useState(
|
|
7
7
|
'Sandra is a CPA and has been our controller since 2008. She loves to interact with staff so if you`ve not met her, be certain to say hi.\r\n\r\nSandra has 2 daughters both of whom are accomplished gymnasts.'
|
|
8
8
|
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import js from '@eslint/js'
|
|
4
|
+
import pluginVue from 'eslint-plugin-vue'
|
|
5
|
+
|
|
6
|
+
export default defineConfig([
|
|
7
|
+
{
|
|
8
|
+
name: 'app/files-to-lint',
|
|
9
|
+
files: ['**/*.{js,mjs,jsx,vue}'],
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
languageOptions: {
|
|
16
|
+
globals: {
|
|
17
|
+
...globals.browser,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
js.configs.recommended,
|
|
23
|
+
...pluginVue.configs['flat/essential'],
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
name: 'disable-unused-vars-in-vue',
|
|
27
|
+
files: ['**/*.vue'],
|
|
28
|
+
rules: {
|
|
29
|
+
'no-unused-vars': 'off',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
])
|
|
@@ -52,7 +52,7 @@ import auth from "../auth";
|
|
|
52
52
|
import { useRouter, useRoute } from 'vue-router';
|
|
53
53
|
import { ref } from 'vue';
|
|
54
54
|
|
|
55
|
-
import UserPanel from "./user-panel";
|
|
55
|
+
import UserPanel from "./user-panel.vue";
|
|
56
56
|
import ThemeSwitcher from './theme-switcher.vue';
|
|
57
57
|
|
|
58
58
|
export default {
|
|
@@ -57,8 +57,8 @@ import DxDrawer from "devextreme-vue/drawer";
|
|
|
57
57
|
import DxScrollView from "devextreme-vue/scroll-view";
|
|
58
58
|
import DxToolbar, { DxItem } from "devextreme-vue/toolbar";
|
|
59
59
|
|
|
60
|
-
import HeaderToolbar from "../components/header-toolbar";
|
|
61
|
-
import SideNavMenu from "../components/side-nav-menu";
|
|
60
|
+
import HeaderToolbar from "../components/header-toolbar.vue";
|
|
61
|
+
import SideNavMenu from "../components/side-nav-menu.vue";
|
|
62
62
|
import menuItems from "../app-navigation";
|
|
63
63
|
import { ref, watch, computed } from 'vue';
|
|
64
64
|
import { useRoute } from 'vue-router';
|
|
@@ -39,8 +39,8 @@ import DxDrawer from "devextreme-vue/drawer";
|
|
|
39
39
|
import DxScrollView from "devextreme-vue/scroll-view";
|
|
40
40
|
|
|
41
41
|
import menuItems from "../app-navigation";
|
|
42
|
-
import HeaderToolbar from "../components/header-toolbar";
|
|
43
|
-
import SideNavMenu from "../components/side-nav-menu";
|
|
42
|
+
import HeaderToolbar from "../components/header-toolbar.vue";
|
|
43
|
+
import SideNavMenu from "../components/side-nav-menu.vue";
|
|
44
44
|
import { computed, ref, watch} from 'vue';
|
|
45
45
|
import { useRoute } from 'vue-router';
|
|
46
46
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import auth from "./auth";
|
|
2
2
|
import { createRouter, createWebHashHistory } from "vue-router";
|
|
3
3
|
|
|
4
|
-
<%=^empty%>import Home from "./views/home-page";
|
|
5
|
-
import Profile from "./views/profile-page";
|
|
6
|
-
import Tasks from "./views/tasks-page";
|
|
7
|
-
<%=/empty%>import defaultLayout from "./layouts/<%=layout
|
|
8
|
-
import simpleLayout from "./layouts/single-card";
|
|
4
|
+
<%=^empty%>import Home from "./views/home-page.vue";
|
|
5
|
+
import Profile from "./views/profile-page.vue";
|
|
6
|
+
import Tasks from "./views/tasks-page.vue";
|
|
7
|
+
<%=/empty%>import defaultLayout from "./layouts/<%=layout%>.vue";
|
|
8
|
+
import simpleLayout from "./layouts/single-card.vue";
|
|
9
9
|
|
|
10
10
|
function loadView(view) {
|
|
11
11
|
return () => import (/* webpackChunkName: "login" */ `./views/${view}.vue`)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const packageJson = require('../../package.json');
|
|
2
2
|
module.exports = {
|
|
3
|
-
'devextreme': '25.1.
|
|
4
|
-
'devextreme-react': '25.1.
|
|
5
|
-
'devextreme-vue': '25.1.
|
|
6
|
-
'create-vite': '
|
|
7
|
-
'create-
|
|
8
|
-
'
|
|
3
|
+
'devextreme': '25.1.3',
|
|
4
|
+
'devextreme-react': '25.1.3',
|
|
5
|
+
'devextreme-vue': '25.1.3',
|
|
6
|
+
'create-vite': '7.0.0',
|
|
7
|
+
'create-vue': '3.17.0',
|
|
8
|
+
'create-next-app': '15.3.4',
|
|
9
|
+
'jose': '6.0.11',
|
|
9
10
|
'devextreme-cli': packageJson.version,
|
|
10
11
|
'devextreme-schematics': 'latest'
|
|
11
12
|
};
|
package/src/utility/module.js
CHANGED
|
@@ -32,10 +32,10 @@ const insertImport = (filePath, moduleName, importName, isDefault) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
const insertExport = (filePath, exportName, modulePath) => {
|
|
35
|
+
const insertExport = (filePath, exportName, modulePath, importName = 'default') => {
|
|
36
36
|
const fileContent = fs.readFileSync(filePath).toString();
|
|
37
37
|
|
|
38
|
-
fs.writeFileSync(filePath, `${fileContent}export {
|
|
38
|
+
fs.writeFileSync(filePath, `${fileContent}export { ${importName} as ${exportName} } from \'${modulePath}\';\n`);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
module.exports = {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|