devextreme-cli 1.6.9 → 1.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devextreme-cli",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
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.71.0",
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": "0c30efbf9951768497b5b4cb5b27ddab08f1f49d"
75
+ "gitHead": "5289a6c9aa525ea566b22a1e21a9782e434395f8"
76
76
  }
@@ -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('12.0.0');
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', '@angular/cli@v15-lts', 'ng'];
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 firstChaptStr = 'platformBrowserDynamic().bootstrapModule(AppModule)';
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(
@@ -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%><TreeView><%=/isTypeScript%>(null);
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
  }
@@ -0,0 +1,16 @@
1
+ import './polyfills';
2
+ import React from 'react';
3
+ import ReactDOM from 'react-dom/client';
4
+ import './index.css';
5
+ import App from './App';
6
+ import reportWebVitals from './reportWebVitals';
7
+
8
+ const root = ReactDOM.createRoot(
9
+ document.getElementById('root')<%=#isTypeScript%> as HTMLElement<%=/isTypeScript%>
10
+ );
11
+ root.render(<App />);
12
+
13
+ // If you want to start measuring performance in your app, pass a function
14
+ // to log results (for example: reportWebVitals(console.log))
15
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
16
+ reportWebVitals();
@@ -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%><ScrollView><%=/isTypeScript%>(null);
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%><ScrollView><%=/isTypeScript%>(null);
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,8 +1,8 @@
1
1
  const packageJson = require('../../package.json');
2
2
  module.exports = {
3
- 'devextreme': '23.2.6',
4
- 'devextreme-react': '23.2.6',
5
- 'devextreme-vue': '23.2.6',
3
+ 'devextreme': '24.1.3',
4
+ 'devextreme-react': '24.1.3',
5
+ 'devextreme-vue': '24.1.3',
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@v15-lts version').toString();
18
+ const version = execSync('npm view @angular/cli@v16-lts version').toString();
19
19
  return new semver(version);
20
20
  };
21
21