igniteui-cli 9.0.3 → 9.0.5-beta.2

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.
Files changed (54) hide show
  1. package/package.json +4 -4
  2. package/templates/angular/ig-ts/projects/empty/files/package.json +14 -14
  3. package/templates/jquery/js/projects/empty/files/package.json +1 -1
  4. package/templates/quickstart/angular/package.json +1 -1
  5. package/templates/quickstart/react/package.json +1 -1
  6. package/templates/react/igr-es6/bullet-graph/default/index.js +1 -1
  7. package/templates/react/igr-es6/category-chart/default/index.js +1 -1
  8. package/templates/react/igr-es6/doughnut-chart/default/index.js +1 -1
  9. package/templates/react/igr-es6/financial-chart/default/index.js +1 -1
  10. package/templates/react/igr-es6/grid/basic/index.js +2 -2
  11. package/templates/react/igr-es6/linear-gauge/default/index.js +1 -1
  12. package/templates/react/igr-es6/pie-chart/default/index.js +1 -1
  13. package/templates/react/igr-es6/projects/_base/files/package.json +1 -1
  14. package/templates/react/igr-es6/radial-gauge/default/index.js +1 -1
  15. package/templates/webcomponents/TypeScriptFileUpdate.js +9 -9
  16. package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  17. package/templates/webcomponents/igc-ts/badge/default/files/src/app/__path__/__filePrefix__.component.test.ts +10 -0
  18. package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.component.test.ts +10 -0
  19. package/templates/webcomponents/igc-ts/calendar/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  20. package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  21. package/templates/webcomponents/igc-ts/checkbox/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  22. package/templates/webcomponents/igc-ts/custom-templates/subscription-form/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  23. package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  24. package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/__filePrefix__.ts +31 -31
  25. package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  26. package/templates/webcomponents/igc-ts/form/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  27. package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  28. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/DataGridSharedData.ts +2 -1
  29. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  30. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts +39 -37
  31. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/DataGridSharedData.ts +2 -1
  32. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  33. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/__filePrefix__.ts +7 -4
  34. package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  35. package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  36. package/templates/webcomponents/igc-ts/input/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  37. package/templates/webcomponents/igc-ts/linear-gauge/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  38. package/templates/webcomponents/igc-ts/list/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  39. package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  40. package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  41. package/templates/webcomponents/igc-ts/projects/empty/files/index.html +1 -1
  42. package/templates/webcomponents/igc-ts/projects/empty/files/package.json +2 -2
  43. package/templates/webcomponents/igc-ts/projects/empty/files/src/app.ts +3 -2
  44. package/templates/webcomponents/igc-ts/projects/empty/files/src/index.ts +1 -0
  45. package/templates/webcomponents/igc-ts/radial-gauge/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  46. package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  47. package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  48. package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
  49. package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/__filePrefix__.ts +23 -0
  50. package/templates/webcomponents/igc-ts/slider/default/index.d.ts +1 -0
  51. package/templates/webcomponents/igc-ts/slider/default/index.js +19 -0
  52. package/templates/webcomponents/igc-ts/slider/index.d.ts +1 -0
  53. package/templates/webcomponents/igc-ts/slider/index.js +15 -0
  54. package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/__filePrefix__.component.test.ts +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-cli",
3
- "version": "9.0.3",
3
+ "version": "9.0.5-beta.2",
4
4
  "description": "CLI tool for creating Ignite UI projects",
5
5
  "keywords": [
6
6
  "CLI",
@@ -72,8 +72,8 @@
72
72
  "all": true
73
73
  },
74
74
  "dependencies": {
75
- "@igniteui/angular-templates": "~13.0.903",
76
- "@igniteui/cli-core": "~9.0.3",
75
+ "@igniteui/angular-templates": "~13.0.905-beta.2",
76
+ "@igniteui/cli-core": "~9.0.5-beta.2",
77
77
  "chalk": "^2.3.2",
78
78
  "fs-extra": "^3.0.1",
79
79
  "glob": "^7.1.2",
@@ -81,7 +81,7 @@
81
81
  "opn": "^5.3.0",
82
82
  "resolve": "^1.6.0",
83
83
  "through2": "^2.0.3",
84
- "typescript": "~4.4.4",
84
+ "typescript": "~4.5.2",
85
85
  "yargs": "^8.0.2"
86
86
  },
87
87
  "devDependencies": {
@@ -10,26 +10,26 @@
10
10
  },
11
11
  "private": true,
12
12
  "dependencies": {
13
- "@angular/animations": "~13.0.0",
14
- "@angular/common": "~13.0.0",
15
- "@angular/compiler": "~13.0.0",
16
- "@angular/core": "~13.0.0",
17
- "@angular/forms": "~13.0.0",
18
- "@angular/platform-browser": "~13.0.0",
19
- "@angular/platform-browser-dynamic": "~13.0.0",
20
- "@angular/router": "~13.0.0",
13
+ "@angular/animations": "~13.1.1",
14
+ "@angular/common": "~13.1.1",
15
+ "@angular/compiler": "~13.1.1",
16
+ "@angular/core": "~13.1.1",
17
+ "@angular/forms": "~13.1.1",
18
+ "@angular/platform-browser": "~13.1.1",
19
+ "@angular/platform-browser-dynamic": "~13.1.1",
20
+ "@angular/router": "~13.1.1",
21
21
  "jquery": ">=1.9.1",
22
22
  "jquery-ui": ">=1.10.5",
23
- "igniteui-angular-wrappers": "^13.0.1",
24
- "ignite-ui": "~20.2",
23
+ "igniteui-angular-wrappers": "^13.1.0",
24
+ "ignite-ui": "~21.2",
25
25
  "rxjs": "~6.6.0",
26
26
  "tslib": "^2.2.0",
27
27
  "zone.js": "~0.11.4"
28
28
  },
29
29
  "devDependencies": {
30
- "@angular-devkit/build-angular": "~13.0.1",
31
- "@angular/cli": "~13.0.1",
32
- "@angular/compiler-cli": "~13.0.0",
30
+ "@angular-devkit/build-angular": "~13.1.2",
31
+ "@angular/cli": "~13.1.2",
32
+ "@angular/compiler-cli": "~13.1.1",
33
33
  "@types/jasmine": "~3.8.0",
34
34
  "@types/node": "^12.11.1",
35
35
  "igniteui-cli": "^$(cliVersion)",
@@ -39,6 +39,6 @@
39
39
  "karma-coverage": "~2.0.3",
40
40
  "karma-jasmine": "~4.0.0",
41
41
  "karma-jasmine-html-reporter": "~1.7.0",
42
- "typescript": "~4.4.4"
42
+ "typescript": "~4.5.2"
43
43
  }
44
44
  }
@@ -7,7 +7,7 @@
7
7
  "dependencies": {
8
8
  "jquery": ">=1.9.1",
9
9
  "jquery-ui": ">=1.10.5",
10
- "ignite-ui": "~20.1"
10
+ "ignite-ui": "~21.2"
11
11
  },
12
12
  "devDependencies": {
13
13
  "browser-sync": "^2.26.3",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "concurrently": "^3.1.0",
33
33
  "lite-server": "^2.5.4",
34
- "typescript": "~4.4.4",
34
+ "typescript": "~4.5.2",
35
35
  "canonical-path": "0.0.2",
36
36
  "http-server": "^0.12.1",
37
37
  "tslint": "~6.1.0",
@@ -15,7 +15,7 @@
15
15
  "bin": {
16
16
  },
17
17
  "dependencies": {
18
- "ignite-ui": "~20.1",
18
+ "ignite-ui": "~21.2",
19
19
  "lite-server": "^2.3.0",
20
20
  "babel-runtime": "6.22.0",
21
21
  "react": "15.4.2",
@@ -11,7 +11,7 @@ class IgrBulletGraphTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReact
11
11
  this.projectType = "igr-es6";
12
12
  this.name = "Bullet Graph";
13
13
  this.description = `allows for a linear and concise view of measures compared against a scale.`;
14
- this.packages = ["igniteui-react-gauges@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
14
+ this.packages = ["igniteui-react-gauges@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
15
15
  }
16
16
  }
17
17
  module.exports = new IgrBulletGraphTemplate();
@@ -12,7 +12,7 @@ class IgrCategoryChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForRea
12
12
  this.name = "Category Chart";
13
13
  this.description = `makes visualizing category data easy. Simplifies the complexities
14
14
  of the data visualization domain into manageable API`;
15
- this.packages = ["igniteui-react-charts@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
15
+ this.packages = ["igniteui-react-charts@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
16
16
  }
17
17
  }
18
18
  module.exports = new IgrCategoryChartTemplate();
@@ -11,7 +11,7 @@ class IgrDoughnutChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForRea
11
11
  this.projectType = "igr-es6";
12
12
  this.name = "Doughnut Chart";
13
13
  this.description = `proportionally illustrate the occurrences of variables.`;
14
- this.packages = ["igniteui-react-charts@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
14
+ this.packages = ["igniteui-react-charts@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
15
15
  }
16
16
  }
17
17
  module.exports = new IgrDoughnutChartTemplate();
@@ -13,7 +13,7 @@ class IgrFinancialChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForRe
13
13
  this.name = "Financial Chart";
14
14
  this.description = `charting component that makes it easy to visualize financial data by
15
15
  using a simple and intuitive API.`;
16
- this.packages = ["igniteui-react-charts@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
16
+ this.packages = ["igniteui-react-charts@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
17
17
  }
18
18
  }
19
19
  module.exports = new IgrFinancialChartTemplate();
@@ -15,8 +15,8 @@ class GridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
15
15
  this.components = ["Grid"];
16
16
  this.controlGroup = "Data Grids";
17
17
  // TODO: read version from igniteui-react-core in package.json
18
- this.packages = ["igniteui-react-grids@~16.12.0", "igniteui-react-inputs@~16.12.0",
19
- "igniteui-react-layouts@~16.12.0"];
18
+ this.packages = ["igniteui-react-grids@~16.15.0", "igniteui-react-inputs@~16.15.0",
19
+ "igniteui-react-layouts@~16.15.0"];
20
20
  this.hasExtraConfiguration = false;
21
21
  }
22
22
  }
@@ -11,7 +11,7 @@ class IgrLinearGaugeTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReact
11
11
  this.projectType = "igr-es6";
12
12
  this.name = "Linear Gauge";
13
13
  this.description = `value compared against a scale and one or more ranges.`;
14
- this.packages = ["igniteui-react-gauges@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
14
+ this.packages = ["igniteui-react-gauges@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
15
15
  }
16
16
  }
17
17
  module.exports = new IgrLinearGaugeTemplate();
@@ -11,7 +11,7 @@ class IgrPieChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTem
11
11
  this.projectType = "igr-es6";
12
12
  this.name = "Pie Chart";
13
13
  this.description = `easily illustate the proportions of data entries`;
14
- this.packages = ["igniteui-react-charts@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
14
+ this.packages = ["igniteui-react-charts@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
15
15
  }
16
16
  }
17
17
  module.exports = new IgrPieChartTemplate();
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "igniteui-react-core": "~16.12.0",
6
+ "igniteui-react-core": "~16.15.0",
7
7
  "react": "^16.8.2",
8
8
  "react-app-polyfill": "^0.2.0",
9
9
  "react-dom": "^16.8.2",
@@ -12,7 +12,7 @@ class IgrRadialGaugeTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReact
12
12
  this.name = "Radial Gauge";
13
13
  this.description = `provides a number of visual elements, like a needle, tick marks, ranges
14
14
  and labels, in order to create a predefined shape and scale.`;
15
- this.packages = ["igniteui-react-gauges@~16.12.0"]; // TODO: read version from igniteui-react-core in package.json
15
+ this.packages = ["igniteui-react-gauges@~16.15.0"]; // TODO: read version from igniteui-react-core in package.json
16
16
  }
17
17
  }
18
18
  module.exports = new IgrRadialGaugeTemplate();
@@ -109,10 +109,10 @@ class TypeScriptFileUpdate {
109
109
  resultNodes = nodes
110
110
  .concat(newObject);
111
111
  }
112
- const elements = ts.createNodeArray([
112
+ const elements = ts.factory.createNodeArray([
113
113
  ...resultNodes
114
114
  ]);
115
- return ts.updateArrayLiteral(array, elements);
115
+ return ts.factory.updateArrayLiteralExpression(array, elements);
116
116
  }
117
117
  else {
118
118
  return ts.visitEachChild(node, conditionalVisitor, context);
@@ -151,16 +151,16 @@ class TypeScriptFileUpdate {
151
151
  if (!newImports.length) {
152
152
  return;
153
153
  }
154
- const newStatements = ts.createNodeArray([
154
+ const newStatements = ts.factory.createNodeArray([
155
155
  ...this.targetSource.statements.slice(0, this.importsMeta.lastIndex),
156
156
  ...newImports.map(x => this.createIdentifierImport(x.from)),
157
157
  ...this.targetSource.statements.slice(this.importsMeta.lastIndex)
158
158
  ]);
159
159
  newImports.forEach(x => this.createdStringLiterals.push(x.from));
160
- this.targetSource = ts.updateSourceFileNode(this.targetSource, newStatements);
160
+ this.targetSource = ts.factory.updateSourceFile(this.targetSource, newStatements);
161
161
  }
162
162
  createIdentifierImport(importPath) {
163
- const importDeclaration = ts.createImportDeclaration(undefined, undefined, undefined, ts.createLiteral(importPath));
163
+ const importDeclaration = ts.factory.createImportDeclaration(undefined, undefined, undefined, ts.factory.createStringLiteral(importPath));
164
164
  return importDeclaration;
165
165
  }
166
166
  //#endregion ts.TransformerFactory
@@ -295,10 +295,10 @@ class TypeScriptFileUpdate {
295
295
  };
296
296
  }
297
297
  createRouteEntry(filePath, className, linkText) {
298
- const routePath = ts.createPropertyAssignment("path", ts.createLiteral(filePath));
299
- const routeComponent = ts.createPropertyAssignment("component", ts.createLiteral(className));
300
- const routeData = ts.createPropertyAssignment("name", ts.createLiteral(linkText));
301
- return ts.createObjectLiteral([routePath, routeComponent, routeData]);
298
+ const routePath = ts.factory.createPropertyAssignment("path", ts.factory.createStringLiteral(filePath));
299
+ const routeComponent = ts.factory.createPropertyAssignment("component", ts.factory.createStringLiteral(className));
300
+ const routeData = ts.factory.createPropertyAssignment("name", ts.factory.createStringLiteral(linkText));
301
+ return ts.factory.createObjectLiteralExpression([routePath, routeComponent, routeData]);
302
302
  }
303
303
  }
304
304
  exports.TypeScriptFileUpdate = TypeScriptFileUpdate;
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcAvatarComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,10 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcBadgeComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
10
+
@@ -0,0 +1,10 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcButtonComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
10
+
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcCalendarComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcCardComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcCheckboxComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcSubscriptionFormComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcDockManagerComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -91,15 +91,15 @@ export default class $(ClassName) extends HTMLElement {
91
91
  {
92
92
  type: IgcDockManagerPaneType.contentPane,
93
93
  contentId: 'content1',
94
- header: 'Content Pane 1'
94
+ header: 'Content Pane 1',
95
95
  },
96
96
  {
97
97
  type: IgcDockManagerPaneType.contentPane,
98
98
  contentId: 'content2',
99
99
  header: 'Unpinned Pane 1',
100
- isPinned: false
101
- }
102
- ]
100
+ isPinned: false,
101
+ },
102
+ ],
103
103
  },
104
104
  {
105
105
  type: IgcDockManagerPaneType.splitPane,
@@ -119,25 +119,25 @@ export default class $(ClassName) extends HTMLElement {
119
119
  {
120
120
  type: IgcDockManagerPaneType.contentPane,
121
121
  header: 'Document 1',
122
- contentId: 'content3'
122
+ contentId: 'content3',
123
123
  },
124
124
  {
125
125
  type: IgcDockManagerPaneType.contentPane,
126
126
  header: 'Document 2',
127
- contentId: 'content4'
128
- }
129
- ]
130
- }
131
- ]
132
- }
127
+ contentId: 'content4',
128
+ },
129
+ ],
130
+ },
131
+ ],
132
+ },
133
133
  },
134
134
  {
135
135
  type: IgcDockManagerPaneType.contentPane,
136
136
  contentId: 'content5',
137
137
  header: 'Unpinned Pane 2',
138
- isPinned: false
139
- }
140
- ]
138
+ isPinned: false,
139
+ },
140
+ ],
141
141
  },
142
142
  {
143
143
  type: IgcDockManagerPaneType.splitPane,
@@ -150,38 +150,38 @@ export default class $(ClassName) extends HTMLElement {
150
150
  {
151
151
  type: IgcDockManagerPaneType.contentPane,
152
152
  contentId: 'content6',
153
- header: 'Tab 1'
153
+ header: 'Tab 1',
154
154
  },
155
155
  {
156
156
  type: IgcDockManagerPaneType.contentPane,
157
157
  contentId: 'content7',
158
- header: 'Tab 2'
158
+ header: 'Tab 2',
159
159
  },
160
160
  {
161
161
  type: IgcDockManagerPaneType.contentPane,
162
162
  contentId: 'content8',
163
- header: 'Tab 3'
163
+ header: 'Tab 3',
164
164
  },
165
165
  {
166
166
  type: IgcDockManagerPaneType.contentPane,
167
167
  contentId: 'content9',
168
- header: 'Tab 4'
168
+ header: 'Tab 4',
169
169
  },
170
170
  {
171
171
  type: IgcDockManagerPaneType.contentPane,
172
172
  contentId: 'content10',
173
- header: 'Tab 5'
174
- }
175
- ]
173
+ header: 'Tab 5',
174
+ },
175
+ ],
176
176
  },
177
177
  {
178
178
  type: IgcDockManagerPaneType.contentPane,
179
179
  contentId: 'content11',
180
- header: 'Content Pane 2'
181
- }
182
- ]
183
- }
184
- ]
180
+ header: 'Content Pane 2',
181
+ },
182
+ ],
183
+ },
184
+ ],
185
185
  },
186
186
  floatingPanes: [
187
187
  {
@@ -194,11 +194,11 @@ export default class $(ClassName) extends HTMLElement {
194
194
  {
195
195
  type: IgcDockManagerPaneType.contentPane,
196
196
  contentId: 'content12',
197
- header: 'Floating Pane'
198
- }
199
- ]
200
- }
201
- ]
197
+ header: 'Floating Pane',
198
+ },
199
+ ],
200
+ },
201
+ ],
202
202
  };
203
203
  }
204
204
  }
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcFinancialChartComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcFormComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcDataGridComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-param-reassign */
1
2
  export class DataGridSharedData {
2
3
  public static getEmployees(count?: number): any[] {
3
4
  if (count === undefined) {
@@ -102,7 +103,7 @@ export class DataGridSharedData {
102
103
  const items = this.getRandomNumber(10, 80);
103
104
  const value = price * items;
104
105
  const margin = this.getRandomNumber(3, 10);
105
- const profit = Math.round((price * margin / 100) * items);
106
+ const profit = Math.round((price * (margin / 100)) * items);
106
107
  const country = this.getRandomItem(countries);
107
108
  sales.push({
108
109
  BundlePrice: price,
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcGridEditingComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/extensions */
1
2
  import {
2
3
  IgcDataGridModule,
3
4
  IgcGridColumnOptionsModule,
@@ -80,6 +81,11 @@ export default class $(ClassName) extends HTMLElement {
80
81
  }
81
82
 
82
83
  connectedCallback() {
84
+ const grid = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('grid') as IgcDataGridComponent;
85
+ const commitButton = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('commitClick') as HTMLButtonElement;
86
+ const undoButton = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('undoClick') as HTMLButtonElement;
87
+ const redoButton = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('redoClick') as HTMLButtonElement;
88
+
83
89
  const onCommitClick = () => {
84
90
  grid.commitEdits();
85
91
  commitButton.disabled = true;
@@ -115,7 +121,35 @@ export default class $(ClassName) extends HTMLElement {
115
121
  }
116
122
  };
117
123
 
118
- const onDeleteCellUpdating = (s: IgcTemplateColumnComponent, e: IgcTemplateCellUpdatingEventArgs) => {
124
+ if (commitButton !== null) {
125
+ commitButton.onclick = onCommitClick;
126
+ }
127
+ if (undoButton !== null) {
128
+ undoButton.onclick = onUndoClick;
129
+ }
130
+
131
+ if (redoButton !== null) {
132
+ redoButton.onclick = onRedoClick;
133
+ }
134
+
135
+ const onDeleteRowClick = (e: MouseEvent) => {
136
+ const button = e.srcElement as HTMLButtonElement;
137
+ const viewIndex = parseInt(button.id, 10);
138
+ const rowItem = grid.actualDataSource.getItemAtIndex(viewIndex);
139
+
140
+ if (grid.editMode === EditModeType.CellBatch || grid.editMode === EditModeType.Row) {
141
+ grid.removeItem(rowItem);
142
+ commitButton.disabled = !grid.canCommit;
143
+ redoButton.disabled = !grid.canRedo;
144
+ undoButton.disabled = !grid.canUndo;
145
+ } else if (grid.editMode === EditModeType.Cell) {
146
+ // delete grid row immediately
147
+ grid.removeItem(rowItem);
148
+ }
149
+ };
150
+
151
+ const onDeleteCellUpdating = (s: IgcTemplateColumnComponent,
152
+ e: IgcTemplateCellUpdatingEventArgs) => {
119
153
  const content = e.content as HTMLDivElement;
120
154
  if (content.childElementCount === 0) {
121
155
  const button = document.createElement('button') as HTMLButtonElement;
@@ -143,22 +177,6 @@ export default class $(ClassName) extends HTMLElement {
143
177
  grid.editModeClickAction = event.target.value;
144
178
  };
145
179
 
146
- const onDeleteRowClick = (e: MouseEvent) => {
147
- const button = e.srcElement as HTMLButtonElement;
148
- const viewIndex = parseInt(button.id);
149
- const rowItem = grid.actualDataSource.getItemAtIndex(viewIndex);
150
-
151
- if (grid.editMode === EditModeType.CellBatch || grid.editMode === EditModeType.Row) {
152
- grid.removeItem(rowItem);
153
- commitButton.disabled = !grid.canCommit;
154
- redoButton.disabled = !grid.canRedo;
155
- undoButton.disabled = !grid.canUndo;
156
- } else if (grid.editMode === EditModeType.Cell) {
157
- //delete grid row immediately
158
- grid.removeItem(rowItem);
159
- }
160
- };
161
-
162
180
  const onCellValueChanging = (s: IgcDataGridComponent, e: IgcGridCellValueChangingEventArgs) => {
163
181
  if (s.editMode === EditModeType.CellBatch || grid.editMode === EditModeType.Row) {
164
182
  commitButton.disabled = !grid.canCommit;
@@ -170,9 +188,8 @@ export default class $(ClassName) extends HTMLElement {
170
188
  commitButton.disabled = true;
171
189
  s.setEditError(e.editID, 'Error, cell is empty');
172
190
  }
173
- };
191
+ };
174
192
 
175
- const grid = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('grid') as IgcDataGridComponent;
176
193
  if (grid !== null) {
177
194
  grid.dataSource = this.data;
178
195
  grid.activationMode = GridActivationMode.Cell;
@@ -181,32 +198,17 @@ export default class $(ClassName) extends HTMLElement {
181
198
  grid.cellValueChanging = onCellValueChanging;
182
199
  }
183
200
 
184
- const dropDown = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('editModeDropBox');
201
+ const dropDown = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('editModeDropBox');
185
202
  if (dropDown !== null) {
186
203
  dropDown.onchange = editModeChanged;
187
204
  }
188
205
 
189
- const dropDown2 = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('editModeClickActionDropBox');
206
+ const dropDown2 = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('editModeClickActionDropBox');
190
207
  if (dropDown2 !== null) {
191
208
  dropDown2.onchange = editModeClickActionChanged;
192
209
  }
193
210
 
194
- let commitButton = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('commitClick') as HTMLButtonElement;
195
- if (commitButton !== null) {
196
- commitButton.onclick = onCommitClick;
197
- }
198
-
199
- let undoButton = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('undoClick') as HTMLButtonElement;
200
- if (undoButton !== null) {
201
- undoButton.onclick = onUndoClick;
202
- }
203
-
204
- let redoButton = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('redoClick') as HTMLButtonElement;
205
- if (redoButton !== null) {
206
- redoButton.onclick = onRedoClick;
207
- }
208
-
209
- const deleteRowColumn = document.getElementsByTagName('app-$(path)')[0].shadowRoot!.getElementById('deleteRowColumn') as IgcTemplateColumnComponent;
211
+ const deleteRowColumn = document.getElementsByTagName('app-grid-editing')[0].shadowRoot!.getElementById('deleteRowColumn') as IgcTemplateColumnComponent;
210
212
  if (deleteRowColumn !== null) {
211
213
  deleteRowColumn.cellUpdating = onDeleteCellUpdating;
212
214
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-param-reassign */
1
2
  export class DataGridSharedData {
2
3
  public static getEmployees(count?: number): any[] {
3
4
  if (count === undefined) {
@@ -102,7 +103,7 @@ export class DataGridSharedData {
102
103
  const items = this.getRandomNumber(10, 80);
103
104
  const value = price * items;
104
105
  const margin = this.getRandomNumber(3, 10);
105
- const profit = Math.round((price * margin / 100) * items);
106
+ const profit = Math.round((price * (margin / 100)) * items);
106
107
  const country = this.getRandomItem(countries);
107
108
  sales.push({
108
109
  BundlePrice: price,
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcGridSummariesComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/extensions, max-classes-per-file, class-methods-use-this */
1
2
  import {
2
3
  IgcDataGridModule,
3
4
  IgcGridColumnOptionsModule,
@@ -62,6 +63,8 @@ export default class $(ClassName) extends HTMLElement {
62
63
  }
63
64
 
64
65
  connectedCallback() {
66
+ const grid = document.getElementsByTagName('app-grid-summaries')[0].shadowRoot!.getElementById('grid') as IgcDataGridComponent;
67
+
65
68
  // Custom Calculator - calculates the count for all USA.
66
69
  class CustomDomestic extends SummaryCalculator {
67
70
  get displayName(): string {
@@ -81,13 +84,14 @@ export default class $(ClassName) extends HTMLElement {
81
84
 
82
85
  public aggregate(a: any): void {
83
86
  if (a.Countries === 'USA') {
84
- this.usCountries += 1;
87
+ this.usCountries += 1;
85
88
  }
86
89
  }
87
90
  }
88
91
 
89
- const onProvideCalculator = (s: IgcColumnSummaryDescription, e: IgcProvideCalculatorEventArgs) => {
90
- e.calculator = new CustomDomestic();
92
+ const onProvideCalculator = (s: IgcColumnSummaryDescription,
93
+ e: IgcProvideCalculatorEventArgs) => {
94
+ e.calculator = new CustomDomestic();
91
95
  };
92
96
 
93
97
  const onLoad = () => {
@@ -175,7 +179,6 @@ export default class $(ClassName) extends HTMLElement {
175
179
  grid.summaryDescriptions.add(countries);
176
180
  };
177
181
 
178
- const grid = document.getElementsByTagName('app-grid-summaries')[0].shadowRoot!.getElementById('grid') as IgcDataGridComponent;
179
182
  grid.dataSource = DataGridSharedData.getSales();
180
183
 
181
184
  onLoad();
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcIconComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcIconButtonComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcInputComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcLinearGaugeComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcListComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcNavbarComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcPieChartComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="utf-8">
6
6
  <base href="/">
7
- <link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/bootstrap.css">
7
+ <link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/bootstrap.css">
8
8
  <style>
9
9
  html, body {
10
10
  height: 100%;
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@open-wc/testing": "^2.5.33",
23
23
  "@vaadin/router": "^1.7.4",
24
- "igniteui-webcomponents": "1.0.0",
24
+ "igniteui-webcomponents": "2.0.0-beta.1",
25
25
  "igniteui-webcomponents-grids": "~1.4.1",
26
26
  "igniteui-webcomponents-core": "~1.4.1",
27
27
  "igniteui-webcomponents-layouts": "~1.4.1",
@@ -42,7 +42,7 @@
42
42
  "igniteui-cli": "$(cliVersion)",
43
43
  "eslint": "^7.32.0",
44
44
  "tslib": "^2.3.1",
45
- "typescript": "^4.4.2",
45
+ "typescript": "^4.5.2",
46
46
  "@babel/cli": "^7.16.0",
47
47
  "@babel/core": "^7.16.0",
48
48
  "@babel/plugin-proposal-class-properties": "^7.16.0",
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-return-assign */
1
2
  import {
2
3
  defineComponents,
3
4
  IgcNavDrawerComponent,
@@ -29,13 +30,13 @@ export class App extends HTMLElement {
29
30
  <igc-nav-drawer open=true>
30
31
  <igc-nav-drawer-header-item>Ignite UI CLI</igc-nav-drawer-header-item>
31
32
 
32
- ${routes.filter((element, index) => index < routes.length - 1).map(i => this.innerHTML = `
33
+ ${routes.filter((element, index) => index < routes.length - 1).map(i => `
33
34
  <igc-nav-drawer-item>
34
35
  <span slot="content">
35
36
  <a style="text-decoration: none;" href="${i.path}">${i.name}<igc-ripple></igc-ripple></a>
36
37
  </span>
37
38
  </igc-nav-drawer-item>
38
- `)}
39
+ `).join('')}
39
40
  </igc-nav-drawer>
40
41
  </div>
41
42
  `;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/extensions, quotes, no-tabs, indent, comma-dangle */
1
2
  import {
2
3
  Route,
3
4
  Router
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcRadialGaugeComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcRadioGroupComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcRippleComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcSliderComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });
@@ -0,0 +1,23 @@
1
+ import {
2
+ defineComponents,
3
+ IgcSliderComponent,
4
+ } from 'igniteui-webcomponents';
5
+
6
+ defineComponents(IgcSliderComponent);
7
+
8
+ export default class $(ClassName) extends HTMLElement {
9
+ connectedCallback() {
10
+ this.innerHTML = `
11
+ <igc-slider
12
+ style="margin: 40px 20px; width: 200px;"
13
+ min="0"
14
+ max="2"
15
+ primary-ticks="3"
16
+ >
17
+ Label
18
+ </igc-slider>
19
+ `;
20
+ }
21
+ }
22
+
23
+ customElements.define('app-$(path)', $(ClassName));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const IgniteUIForWebComponentsTemplate_1 = require("../../../../../lib/templates/IgniteUIForWebComponentsTemplate");
4
+ class IgcSliderComponent extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebComponentsTemplate {
5
+ constructor() {
6
+ super(__dirname);
7
+ this.components = ["Slider"];
8
+ this.controlGroup = "Interactions";
9
+ this.listInComponentTemplates = true;
10
+ this.id = "slider";
11
+ this.projectType = "igc-ts";
12
+ this.name = "Slider";
13
+ this.description = `Basic slider component`;
14
+ }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
18
+ }
19
+ module.exports = new IgcSliderComponent();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_core_1 = require("@igniteui/cli-core");
4
+ class IgcSliderComponent extends cli_core_1.BaseComponent {
5
+ /**
6
+ *
7
+ */
8
+ constructor() {
9
+ super(__dirname);
10
+ this.name = "Slider";
11
+ this.group = "Interactions";
12
+ this.description = `Basic slider component`;
13
+ }
14
+ }
15
+ module.exports = new IgcSliderComponent();
@@ -0,0 +1,9 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import $(ClassName) from './$(path)';
3
+
4
+ describe('IgcSwitchComponent', () => {
5
+ it('<app-$(path)> is an instance of $(ClassName)', async () => {
6
+ const element = document.createElement('app-$(path)');
7
+ expect(element).to.be.instanceOf($(ClassName));
8
+ });
9
+ });