devextreme-cli 1.13.0 → 1.14.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devextreme-cli",
3
- "version": "1.13.0",
3
+ "version": "1.14.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.97.1",
46
+ "sass": "^1.97.3",
47
47
  "semver": "^5.7.2",
48
48
  "strip-bom": "^4.0.0"
49
49
  },
@@ -77,5 +77,5 @@
77
77
  "@babel/traverse@<7.23.2": ">=7.23.2",
78
78
  "braces@<3.0.3": ">=3.0.3"
79
79
  },
80
- "gitHead": "51bbc8d2fbfa40b741792c6921e27429cdb04c6f"
80
+ "gitHead": "1f3ffa8ec11b0545d13e3fc2ec20b0c7fdae178b"
81
81
  }
@@ -63,40 +63,6 @@ function localPackageExists(packageName) {
63
63
  return false;
64
64
  }
65
65
 
66
- function getLocalCollectionPath(packageName) {
67
- const nodeModulesPath = path.join(process.cwd(), 'node_modules', packageName, 'src', 'collection.json');
68
- if(fs.existsSync(nodeModulesPath)) {
69
- return nodeModulesPath;
70
- }
71
- return null;
72
- }
73
-
74
- function getCollectionPath(packageName) {
75
- const localPath = getLocalCollectionPath(packageName);
76
- if(localPath) {
77
- return localPath;
78
- }
79
-
80
- try {
81
- const packageJsonPath = require.resolve(`${packageName}/package.json`);
82
- const collectionPath = path.join(path.dirname(packageJsonPath), 'src', 'collection.json');
83
- if(fs.existsSync(collectionPath)) {
84
- return collectionPath;
85
- }
86
- } catch(e) {}
87
-
88
- return null;
89
- }
90
-
91
- function schematicsCliExists() {
92
- try {
93
- require.resolve('@angular-devkit/schematics-cli/package.json');
94
- return true;
95
- } catch(e) {
96
- return false;
97
- }
98
- }
99
-
100
66
  const hasSutableNgCli = async() => {
101
67
  const localVersion = ngVersion.getLocalNgVersion();
102
68
 
@@ -189,44 +155,17 @@ const addView = (viewName, options) => {
189
155
 
190
156
  const migrateConfigComponents = async(options = {}) => {
191
157
  const collectionName = 'devextreme-schematics';
192
- const collectionPath = getCollectionPath(collectionName);
193
-
194
- if(!collectionPath) {
195
- const prompts = require('prompts');
196
-
197
- console.log(`\nRequired package is missing: '${collectionName}'`);
198
-
199
- const response = await prompts({
200
- type: 'confirm',
201
- name: 'install',
202
- message: `Would you like to install '${collectionName}@${schematicsVersion}' in the npm cache?`,
203
- initial: true
204
- });
205
-
206
- if(!response.install) {
207
- console.log('Migration was canceled.');
208
- process.exit(1);
209
- }
210
- }
211
158
 
212
159
  const schematicOptions = {
213
160
  ...options
214
161
  };
215
162
 
216
- const hasSchematicsCli = schematicsCliExists();
217
163
  const commandArguments = ['--yes'];
218
164
 
219
- if(!hasSchematicsCli) {
220
- commandArguments.push('-p', '@angular-devkit/schematics-cli');
221
- }
222
-
223
- if(!collectionPath) {
224
- commandArguments.push('-p', `${collectionName}@${schematicsVersion}`);
225
- }
165
+ commandArguments.push('-p', '@angular-devkit/schematics-cli');
166
+ commandArguments.push('-p', `${collectionName}@${schematicsVersion}`);
226
167
 
227
- const collectionSpecifier = collectionPath
228
- ? `${collectionPath.replace(/\\/g, '/')}:migrate-config-components`
229
- : `${collectionName}:migrate-config-components`;
168
+ const collectionSpecifier = `${collectionName}:migrate-config-components`;
230
169
 
231
170
  commandArguments.push('schematics', collectionSpecifier);
232
171
 
@@ -1,12 +1,11 @@
1
1
  'use client'
2
2
  import React from 'react';
3
- import { DataSource } from 'devextreme-react/common/data';
3
+ import { CustomStore } from 'devextreme-react/common/data';
4
4
  import DataGrid, {
5
5
  Column,
6
6
  Pager,
7
7
  Paging,
8
8
  FilterRow,
9
- Lookup
10
9
  } from 'devextreme-react/data-grid';
11
10
  import './tasks.scss';
12
11
 
@@ -28,85 +27,61 @@ export default function Task() {
28
27
  <Pager showPageSizeSelector={true} showInfo={true} />
29
28
  <FilterRow visible={true} />
30
29
 
31
- <Column dataField={'Task_ID'} width={90} hidingPriority={2} />
30
+ <Column dataField={'id'} width={90} hidingPriority={1} />
32
31
  <Column
33
- dataField={'Task_Subject'}
32
+ dataField={'text'}
34
33
  width={190}
35
34
  caption={'Subject'}
36
- hidingPriority={8}
35
+ hidingPriority={6}
37
36
  />
38
37
  <Column
39
- dataField={'Task_Status'}
38
+ dataField={'status'}
40
39
  caption={'Status'}
41
- hidingPriority={6}
40
+ hidingPriority={4}
42
41
  />
43
42
  <Column
44
- dataField={'Task_Priority'}
45
- caption={'Priority'}
46
- hidingPriority={5}
47
- >
48
- <Lookup
49
- dataSource={priorities}
50
- valueExpr={'value'}
51
- displayExpr={'name'}
52
- />
53
- </Column>
54
- <Column
55
- dataField={'ResponsibleEmployee.Employee_Full_Name'}
43
+ dataField={'owner'}
56
44
  caption={'Assigned To'}
57
45
  allowSorting={false}
58
- hidingPriority={7}
46
+ hidingPriority={5}
59
47
  />
60
48
  <Column
61
- dataField={'Task_Start_Date'}
49
+ dataField={'startDate'}
62
50
  caption={'Start Date'}
63
51
  dataType={'date'}
64
- hidingPriority={3}
52
+ hidingPriority={2}
65
53
  />
66
54
  <Column
67
- dataField={'Task_Due_Date'}
55
+ dataField={'dueDate'}
68
56
  caption={'Due Date'}
69
57
  dataType={'date'}
70
- hidingPriority={4}
58
+ hidingPriority={3}
71
59
  />
72
60
  <Column
73
- dataField={'Task_Priority'}
61
+ dataField={'priority'}
74
62
  caption={'Priority'}
75
63
  name={'Priority'}
76
- hidingPriority={1}
77
- />
78
- <Column
79
- dataField={'Task_Completion'}
80
- caption={'Completion'}
81
64
  hidingPriority={0}
82
65
  />
83
66
  </DataGrid>
84
67
  </React.Fragment>
85
68
  )}
86
69
 
87
- const dataSource = new DataSource({
88
- store: {
89
- version: 2,
90
- type: 'odata',
91
- key: 'Task_ID',
92
- url: 'https://js.devexpress.com/Demos/DevAV/odata/Tasks'
93
- },
94
- expand: 'ResponsibleEmployee',
95
- select: [
96
- 'Task_ID',
97
- 'Task_Subject',
98
- 'Task_Start_Date',
99
- 'Task_Due_Date',
100
- 'Task_Status',
101
- 'Task_Priority',
102
- 'Task_Completion',
103
- 'ResponsibleEmployee/Employee_Full_Name'
104
- ]
105
- });
70
+ const dataSource = {
71
+ store: new CustomStore({
72
+ key: 'id',
73
+ async load() {
74
+ try {
75
+ const response = await fetch(`https://js.devexpress.com/Demos/RwaService/api/Employees/AllTasks`);
76
+
77
+ const result = await response.json();
106
78
 
107
- const priorities = [
108
- { name: 'High', value: 4 },
109
- { name: 'Urgent', value: 3 },
110
- { name: 'Normal', value: 2 },
111
- { name: 'Low', value: 1 }
112
- ];
79
+ return {
80
+ data: result,
81
+ };
82
+ } catch (err) {
83
+ throw new Error('Data Loading Error');
84
+ }
85
+ },
86
+ }),
87
+ };
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { DataSource } from 'devextreme-react/common/data';
2
+ import { CustomStore } from 'devextreme-react/common/data';
3
3
  import DataGrid, {
4
4
  Column,
5
5
  Pager,
6
6
  Paging,
7
7
  FilterRow,
8
- Lookup
9
8
  } from 'devextreme-react/data-grid';
10
9
  import './tasks.scss';
11
10
 
@@ -27,85 +26,61 @@ export function Tasks() {
27
26
  <Pager showPageSizeSelector={true} showInfo={true} />
28
27
  <FilterRow visible={true} />
29
28
 
30
- <Column dataField={'Task_ID'} width={90} hidingPriority={2} />
29
+ <Column dataField={'id'} width={90} hidingPriority={1} />
31
30
  <Column
32
- dataField={'Task_Subject'}
31
+ dataField={'text'}
33
32
  width={190}
34
33
  caption={'Subject'}
35
- hidingPriority={8}
34
+ hidingPriority={6}
36
35
  />
37
36
  <Column
38
- dataField={'Task_Status'}
37
+ dataField={'status'}
39
38
  caption={'Status'}
40
- hidingPriority={6}
39
+ hidingPriority={4}
41
40
  />
42
41
  <Column
43
- dataField={'Task_Priority'}
44
- caption={'Priority'}
45
- hidingPriority={5}
46
- >
47
- <Lookup
48
- dataSource={priorities}
49
- valueExpr={'value'}
50
- displayExpr={'name'}
51
- />
52
- </Column>
53
- <Column
54
- dataField={'ResponsibleEmployee.Employee_Full_Name'}
42
+ dataField={'owner'}
55
43
  caption={'Assigned To'}
56
44
  allowSorting={false}
57
- hidingPriority={7}
45
+ hidingPriority={5}
58
46
  />
59
47
  <Column
60
- dataField={'Task_Start_Date'}
48
+ dataField={'startDate'}
61
49
  caption={'Start Date'}
62
50
  dataType={'date'}
63
- hidingPriority={3}
51
+ hidingPriority={2}
64
52
  />
65
53
  <Column
66
- dataField={'Task_Due_Date'}
54
+ dataField={'dueDate'}
67
55
  caption={'Due Date'}
68
56
  dataType={'date'}
69
- hidingPriority={4}
57
+ hidingPriority={3}
70
58
  />
71
59
  <Column
72
- dataField={'Task_Priority'}
60
+ dataField={'priority'}
73
61
  caption={'Priority'}
74
62
  name={'Priority'}
75
- hidingPriority={1}
76
- />
77
- <Column
78
- dataField={'Task_Completion'}
79
- caption={'Completion'}
80
63
  hidingPriority={0}
81
64
  />
82
65
  </DataGrid>
83
66
  </React.Fragment>
84
67
  )}
85
68
 
86
- const dataSource = new DataSource({
87
- store: {
88
- version: 2,
89
- type: 'odata',
90
- key: 'Task_ID',
91
- url: 'https://js.devexpress.com/Demos/DevAV/odata/Tasks'
92
- },
93
- expand: 'ResponsibleEmployee',
94
- select: [
95
- 'Task_ID',
96
- 'Task_Subject',
97
- 'Task_Start_Date',
98
- 'Task_Due_Date',
99
- 'Task_Status',
100
- 'Task_Priority',
101
- 'Task_Completion',
102
- 'ResponsibleEmployee/Employee_Full_Name'
103
- ]
104
- });
69
+ const dataSource = {
70
+ store: new CustomStore({
71
+ key: 'id',
72
+ async load() {
73
+ try {
74
+ const response = await fetch(`https://js.devexpress.com/Demos/RwaService/api/Employees/AllTasks`);
75
+
76
+ const result = await response.json();
105
77
 
106
- const priorities = [
107
- { name: 'High', value: 4 },
108
- { name: 'Urgent', value: 3 },
109
- { name: 'Normal', value: 2 },
110
- { name: 'Low', value: 1 }
111
- ];
78
+ return {
79
+ data: result,
80
+ };
81
+ } catch {
82
+ throw new Error(`Data Loading Error`);
83
+ }
84
+ },
85
+ })
86
+ };
@@ -15,64 +15,46 @@
15
15
  <dx-pager :show-page-size-selector="true" :show-info="true" />
16
16
  <dx-filter-row :visible="true" />
17
17
 
18
- <dx-column data-field="Task_ID" :width="90" :hiding-priority="2" />
18
+ <dx-column data-field="id" :width="90" :hiding-priority="1" />
19
19
 
20
20
  <dx-column
21
- data-field="Task_Subject"
21
+ data-field="text"
22
22
  caption="Subject"
23
23
  :width="190"
24
- :hiding-priority="8"
24
+ :hiding-priority="6"
25
25
  />
26
26
 
27
27
  <dx-column
28
- data-field="Task_Status"
28
+ data-field="status"
29
29
  caption="Status"
30
- :hiding-priority="6"
30
+ :hiding-priority="4"
31
31
  />
32
32
 
33
33
  <dx-column
34
- data-field="Task_Priority"
35
- caption="Priority"
36
- :hiding-priority="5"
37
- >
38
- <dx-lookup
39
- display-expr="name"
40
- value-expr="value"
41
- :data-source="priorities"
42
- />
43
- </dx-column>
44
-
45
- <dx-column
46
- data-field="ResponsibleEmployee.Employee_Full_Name"
34
+ data-field="owner"
47
35
  caption="Assigned To"
48
36
  :allow-sorting="false"
49
- :hiding-priority="7"
37
+ :hiding-priority="5"
50
38
  />
51
39
 
52
40
  <dx-column
53
- data-field="Task_Start_Date"
41
+ data-field="startDate"
54
42
  caption="Start Date"
55
43
  data-type="date"
56
- :hiding-priority="3"
44
+ :hiding-priority="2"
57
45
  />
58
46
 
59
47
  <dx-column
60
- data-field="Task_Due_Date"
48
+ data-field="dueDate"
61
49
  caption="Due Date"
62
50
  data-type="date"
63
- :hiding-priority="4"
51
+ :hiding-priority="3"
64
52
  />
65
53
 
66
54
  <dx-column
67
- data-field="Task_Priority"
55
+ data-field="priority"
68
56
  caption="Priority"
69
57
  name="Priority"
70
- :hiding-priority="1"
71
- />
72
-
73
- <dx-column
74
- data-field="Task_Completion"
75
- caption="Completion"
76
58
  :hiding-priority="0"
77
59
  />
78
60
  </dx-data-grid>
@@ -80,53 +62,42 @@
80
62
  </template>
81
63
 
82
64
  <script>
83
- import "devextreme-vue/common/data";
65
+ import { CustomStore } from 'devextreme-vue/common/data';
84
66
  import DxDataGrid, {
85
67
  DxColumn,
86
68
  DxFilterRow,
87
- DxLookup,
88
69
  DxPager,
89
70
  DxPaging
90
71
  } from "devextreme-vue/data-grid";
91
72
 
92
- const priorities = [
93
- { name: "High", value: 4 },
94
- { name: "Urgent", value: 3 },
95
- { name: "Normal", value: 2 },
96
- { name: "Low", value: 1 }
97
- ];
98
-
99
73
  export default {
100
74
  setup() {
101
75
  const dataSourceConfig = {
102
- store: {
103
- version: 2,
104
- type: "odata",
105
- key: "Task_ID",
106
- url: "https://js.devexpress.com/Demos/DevAV/odata/Tasks"
107
- },
108
- expand: "ResponsibleEmployee",
109
- select: [
110
- "Task_ID",
111
- "Task_Subject",
112
- "Task_Start_Date",
113
- "Task_Due_Date",
114
- "Task_Status",
115
- "Task_Priority",
116
- "Task_Completion",
117
- "ResponsibleEmployee/Employee_Full_Name"
118
- ]
76
+ store: new CustomStore({
77
+ key: 'id',
78
+ async load() {
79
+ try {
80
+ const response = await fetch(`https://js.devexpress.com/Demos/RwaService/api/Employees/AllTasks`);
81
+
82
+ const result = await response.json();
83
+
84
+ return {
85
+ data: result,
86
+ };
87
+ } catch (err) {
88
+ throw new Error('Data Loading Error');
89
+ }
90
+ },
91
+ }),
119
92
  };
120
93
  return {
121
94
  dataSourceConfig,
122
- priorities
123
95
  };
124
96
  },
125
97
  components: {
126
98
  DxDataGrid,
127
99
  DxColumn,
128
100
  DxFilterRow,
129
- DxLookup,
130
101
  DxPager,
131
102
  DxPaging
132
103
  }
@@ -1,8 +1,8 @@
1
1
  const packageJson = require('../../package.json');
2
2
  module.exports = {
3
- 'devextreme': '25.2.3',
4
- 'devextreme-react': '25.2.3',
5
- 'devextreme-vue': '25.2.3',
3
+ 'devextreme': '25.2.4',
4
+ 'devextreme-react': '25.2.4',
5
+ 'devextreme-vue': '25.2.4',
6
6
  'create-vite': '8.2.0',
7
7
  'create-vue': '3.17.0',
8
8
  'create-next-app': '16.1.0',