igniteui-cli 13.2.2-beta.0 → 13.2.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 (61) hide show
  1. package/lib/templates/AngularTemplate.js +8 -29
  2. package/lib/templates/IgniteUIForReactTemplate.d.ts +0 -1
  3. package/lib/templates/IgniteUIForReactTemplate.js +11 -36
  4. package/lib/templates/IgniteUIForWebComponentsTemplate.js +5 -33
  5. package/migrations/update-5_0_0/index.js +2 -3
  6. package/package.json +3 -3
  7. package/templates/react/ReactTypeScriptFileUpdate.d.ts +49 -10
  8. package/templates/react/ReactTypeScriptFileUpdate.js +336 -60
  9. package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +6 -0
  10. package/templates/webcomponents/TypeScriptFileUpdate.d.ts +52 -0
  11. package/templates/webcomponents/TypeScriptFileUpdate.js +341 -0
  12. package/templates/webcomponents/igc-ts/accordion/default/index.js +3 -0
  13. package/templates/webcomponents/igc-ts/avatar/default/index.js +3 -0
  14. package/templates/webcomponents/igc-ts/badge/default/index.js +3 -0
  15. package/templates/webcomponents/igc-ts/button/default/index.js +3 -0
  16. package/templates/webcomponents/igc-ts/button-group/default/index.js +3 -0
  17. package/templates/webcomponents/igc-ts/calendar/default/index.js +3 -0
  18. package/templates/webcomponents/igc-ts/card/default/index.js +3 -0
  19. package/templates/webcomponents/igc-ts/checkbox/default/index.js +3 -0
  20. package/templates/webcomponents/igc-ts/chip/default/index.js +3 -0
  21. package/templates/webcomponents/igc-ts/circular-progress/default/index.js +3 -0
  22. package/templates/webcomponents/igc-ts/custom-templates/subscription-form/index.js +3 -0
  23. package/templates/webcomponents/igc-ts/date-time-input/default/index.js +3 -0
  24. package/templates/webcomponents/igc-ts/dock-manager/default/index.js +3 -0
  25. package/templates/webcomponents/igc-ts/dropdown/default/index.js +3 -0
  26. package/templates/webcomponents/igc-ts/expansion-panel/default/index.js +3 -0
  27. package/templates/webcomponents/igc-ts/financial-chart/default/index.js +3 -0
  28. package/templates/webcomponents/igc-ts/form/default/index.js +3 -0
  29. package/templates/webcomponents/igc-ts/grid/default/index.js +3 -0
  30. package/templates/webcomponents/igc-ts/grid/grid-editing/index.js +3 -0
  31. package/templates/webcomponents/igc-ts/grid/grid-summaries/index.js +3 -0
  32. package/templates/webcomponents/igc-ts/icon/default/index.js +3 -0
  33. package/templates/webcomponents/igc-ts/icon-button/default/index.js +3 -0
  34. package/templates/webcomponents/igc-ts/input/default/index.js +3 -0
  35. package/templates/webcomponents/igc-ts/linear-gauge/default/index.js +3 -0
  36. package/templates/webcomponents/igc-ts/linear-progress/default/index.js +3 -0
  37. package/templates/webcomponents/igc-ts/list/default/index.js +3 -0
  38. package/templates/webcomponents/igc-ts/navbar/default/index.js +3 -0
  39. package/templates/webcomponents/igc-ts/pie-chart/default/index.js +3 -0
  40. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +7 -7
  41. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +13 -13
  42. package/templates/webcomponents/igc-ts/radial-gauge/default/index.js +3 -0
  43. package/templates/webcomponents/igc-ts/radio-group/default/index.js +3 -0
  44. package/templates/webcomponents/igc-ts/rating/default/index.js +3 -0
  45. package/templates/webcomponents/igc-ts/ripple/default/index.js +3 -0
  46. package/templates/webcomponents/igc-ts/slider/default/index.js +3 -0
  47. package/templates/webcomponents/igc-ts/switch/default/index.js +3 -0
  48. package/templates/webcomponents/igc-ts/tabs/default/index.js +3 -0
  49. package/templates/webcomponents/igc-ts/text-area/default/index.js +3 -0
  50. package/templates/webcomponents/igc-ts/text-area/index.js +3 -0
  51. package/templates/webcomponents/igc-ts/tree/default/index.js +3 -0
  52. package/templates/react/types/ReactRouteEntry.d.ts +0 -6
  53. package/templates/react/types/ReactRouteEntry.js +0 -2
  54. package/templates/react/types/ReactRouteLike.d.ts +0 -25
  55. package/templates/react/types/ReactRouteLike.js +0 -2
  56. package/templates/react/types/ReactRouteTarget.d.ts +0 -7
  57. package/templates/react/types/ReactRouteTarget.js +0 -11
  58. package/templates/react/types/index.d.ts +0 -3
  59. package/templates/react/types/index.js +0 -19
  60. package/templates/webcomponents/WebComponentsTypeScriptFileUpdate.d.ts +0 -11
  61. package/templates/webcomponents/WebComponentsTypeScriptFileUpdate.js +0 -82
@@ -23,7 +23,7 @@
23
23
  "@vaadin/router": "^1.7.4",
24
24
  "lit": "^3.1.2",
25
25
  "typescript": "^5.3.3",
26
- "igniteui-webcomponents": "~4.7.0"
26
+ "igniteui-webcomponents": "~4.9.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/preset-env": "^7.20.2",
@@ -31,23 +31,23 @@
31
31
  "@open-wc/testing": "^4.0.0",
32
32
  "@rollup/plugin-babel": "^6.0.3",
33
33
  "@rollup/plugin-node-resolve": "^15.0.1",
34
- "@typescript-eslint/eslint-plugin": "^6.20.0",
35
- "@typescript-eslint/parser": "^6.20.0",
36
- "@web/dev-server": "^0.1.35",
37
- "@web/rollup-plugin-html": "^1.11.0",
34
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
35
+ "@typescript-eslint/parser": "^7.13.1",
36
+ "@web/dev-server": "^0.4.6",
37
+ "@web/rollup-plugin-html": "^2.3.0",
38
38
  "@web/rollup-plugin-import-meta-assets": "^1.0.7",
39
39
  "@web/test-runner": "^0.18.0",
40
40
  "babel-plugin-template-html-minifier": "^4.1.0",
41
41
  "concurrently": "^8.2.2",
42
42
  "deepmerge": "^4.2.2",
43
- "eslint": "^8.56.0",
43
+ "eslint": "^8.57.0",
44
44
  "eslint-plugin-lit": "^1.8.2",
45
45
  "igniteui-cli": "^13.1.5",
46
46
  "rimraf": "^5.0.5",
47
47
  "rollup": "^2.79.0",
48
48
  "rollup-plugin-copy-assets": "^2.0.3",
49
49
  "rollup-plugin-terser": "^7.0.2",
50
- "rollup-plugin-workbox": "^6.2.0",
50
+ "rollup-plugin-workbox": "^8.1.0",
51
51
  "source-map": "^0.7.4",
52
52
  "tslib": "^2.6.2"
53
53
  }
@@ -23,13 +23,13 @@
23
23
  "@vaadin/router": "^1.7.4",
24
24
  "@igniteui/material-icons-extended": "^3.0.2",
25
25
  "igniteui-dockmanager": "~1.14.3",
26
- "igniteui-webcomponents": "~4.7.0",
27
- "igniteui-webcomponents-charts": "~4.7.0",
28
- "igniteui-webcomponents-core": "~4.7.0",
29
- "igniteui-webcomponents-gauges": "~4.7.0",
30
- "igniteui-webcomponents-grids": "~4.7.0",
31
- "igniteui-webcomponents-inputs": "~4.7.0",
32
- "igniteui-webcomponents-layouts": "~4.7.0",
26
+ "igniteui-webcomponents": "~4.9.0",
27
+ "igniteui-webcomponents-charts": "~4.8.0",
28
+ "igniteui-webcomponents-core": "~4.8.0",
29
+ "igniteui-webcomponents-gauges": "~4.8.0",
30
+ "igniteui-webcomponents-grids": "~4.8.0",
31
+ "igniteui-webcomponents-inputs": "~4.8.0",
32
+ "igniteui-webcomponents-layouts": "~4.8.0",
33
33
  "lit": "^3.1.2",
34
34
  "typescript": "^5.3.3"
35
35
  },
@@ -39,23 +39,23 @@
39
39
  "@open-wc/testing": "^4.0.0",
40
40
  "@rollup/plugin-babel": "^6.0.3",
41
41
  "@rollup/plugin-node-resolve": "^15.0.1",
42
- "@typescript-eslint/eslint-plugin": "^6.20.0",
43
- "@typescript-eslint/parser": "^6.20.0",
44
- "@web/dev-server": "^0.1.35",
45
- "@web/rollup-plugin-html": "^1.11.0",
42
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
43
+ "@typescript-eslint/parser": "^7.13.1",
44
+ "@web/dev-server": "^0.4.6",
45
+ "@web/rollup-plugin-html": "^2.3.0",
46
46
  "@web/rollup-plugin-import-meta-assets": "^1.0.7",
47
47
  "@web/test-runner": "^0.18.0",
48
48
  "babel-plugin-template-html-minifier": "^4.1.0",
49
49
  "concurrently": "^8.2.2",
50
50
  "deepmerge": "^4.2.2",
51
- "eslint": "^8.56.0",
51
+ "eslint": "^8.57.0",
52
52
  "eslint-plugin-lit": "^1.8.2",
53
53
  "igniteui-cli": "^13.1.5",
54
54
  "rimraf": "^5.0.5",
55
55
  "rollup": "^2.79.0",
56
56
  "rollup-plugin-copy-assets": "^2.0.3",
57
57
  "rollup-plugin-terser": "^7.0.2",
58
- "rollup-plugin-workbox": "^6.2.0",
58
+ "rollup-plugin-workbox": "^8.1.0",
59
59
  "source-map": "^0.7.4",
60
60
  "tslib": "^2.6.2"
61
61
  }
@@ -16,5 +16,8 @@ class IgcradialGaugeTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUI
16
16
  "igniteui-webcomponents-gauges@~4.2.5"
17
17
  ];
18
18
  }
19
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
20
+ // not applicable with custom module
21
+ }
19
22
  }
20
23
  module.exports = new IgcradialGaugeTemplate();
@@ -12,5 +12,8 @@ class IgcRadioGroupTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIF
12
12
  this.name = "Radio Group";
13
13
  this.description = "basic IgcRadioGroup";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcRadioGroupTemplate();
@@ -12,5 +12,8 @@ class IgcRatingComponent extends IgniteUIForWebComponentsTemplate_1.IgniteUIForW
12
12
  this.name = "Rating";
13
13
  this.description = "Basic Rating";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcRatingComponent();
@@ -12,5 +12,8 @@ class IgcRippleTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWe
12
12
  this.name = "Ripple";
13
13
  this.description = "basic IgcRipple";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcRippleTemplate();
@@ -12,5 +12,8 @@ class IgcSliderComponent extends IgniteUIForWebComponentsTemplate_1.IgniteUIForW
12
12
  this.name = "Slider";
13
13
  this.description = `Basic slider component`;
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcSliderComponent();
@@ -12,5 +12,8 @@ class IgcSwitchTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWe
12
12
  this.name = "Switch";
13
13
  this.description = "basic IgcSwitch";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcSwitchTemplate();
@@ -12,5 +12,8 @@ class IgcTabsTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebC
12
12
  this.name = "Tabs";
13
13
  this.description = "basic IgcTabs";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcTabsTemplate();
@@ -12,5 +12,8 @@ class IgcTextareaComponent extends IgniteUIForWebComponentsTemplate_1.IgniteUIFo
12
12
  this.name = "Text area";
13
13
  this.description = "basic IgcTextarea";
14
14
  }
15
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
16
+ // not applicable with custom module
17
+ }
15
18
  }
16
19
  module.exports = new IgcTextareaComponent();
@@ -11,5 +11,8 @@ class IgcTextareaComponent extends cli_core_1.BaseComponent {
11
11
  this.group = "Data Entry & Display";
12
12
  this.description = `Basic text area component`;
13
13
  }
14
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
15
+ // not applicable with custom module
16
+ }
14
17
  }
15
18
  module.exports = new IgcTextareaComponent();
@@ -18,5 +18,8 @@ class IgcTreeTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebC
18
18
  "igniteui-webcomponents-layouts@~4.2.5"
19
19
  ];
20
20
  }
21
+ addClassDeclaration(mainModule, projPath, name, modulePath) {
22
+ // not applicable with custom module
23
+ }
21
24
  }
22
25
  module.exports = new IgcTreeTemplate();
@@ -1,6 +0,0 @@
1
- import { RouteEntry, RouteTarget } from "@igniteui/cli-core";
2
- import { ReactRouteTarget } from "./ReactRouteTarget";
3
- /** Represents a React route entry in a routes collection. */
4
- export interface ReactRouteEntry extends Pick<RouteEntry, "value"> {
5
- name: RouteTarget | ReactRouteTarget;
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,25 +0,0 @@
1
- import { RouteLike } from '@igniteui/cli-core';
2
- /** A route member in a React routes collection. */
3
- export interface ReactRouteLike extends RouteLike {
4
- /**
5
- * Determines if the route is an index route.
6
- * Index routes render into their parent's {@link https://reactrouter.com/en/main/components/outlet|Outlet} at their parent's URL (like a default child route).
7
- */
8
- index?: boolean;
9
- /**
10
- * The route loader is called before the route renders and provides data for the element through {@link https://reactrouter.com/en/main/hooks/use-loader-data|useLoaderData}.
11
- */
12
- loader?: string;
13
- /**
14
- * The React Element/Component to render when the route matches the URL.
15
- */
16
- element?: string;
17
- /**
18
- * The name the page.
19
- */
20
- text?: string;
21
- /**
22
- * An array of child `Route` objects that specifies a nested route configuration.
23
- */
24
- children?: ReactRouteLike | ReactRouteLike[];
25
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- /** Represents possible members in a React route object. */
2
- export declare enum ReactRouteTarget {
3
- Index = "index",
4
- Element = "element",
5
- Text = "text",
6
- Loader = "loader"
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReactRouteTarget = void 0;
4
- /** Represents possible members in a React route object. */
5
- var ReactRouteTarget;
6
- (function (ReactRouteTarget) {
7
- ReactRouteTarget["Index"] = "index";
8
- ReactRouteTarget["Element"] = "element";
9
- ReactRouteTarget["Text"] = "text";
10
- ReactRouteTarget["Loader"] = "loader";
11
- })(ReactRouteTarget || (exports.ReactRouteTarget = ReactRouteTarget = {}));
@@ -1,3 +0,0 @@
1
- export * from './ReactRouteTarget';
2
- export * from './ReactRouteEntry';
3
- export * from './ReactRouteLike';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ReactRouteTarget"), exports);
18
- __exportStar(require("./ReactRouteEntry"), exports);
19
- __exportStar(require("./ReactRouteLike"), exports);
@@ -1,11 +0,0 @@
1
- import * as ts from 'typescript';
2
- import { FormatSettings, PropertyAssignment, RouteLike, TypeScriptFileUpdate } from '@igniteui/cli-core';
3
- export declare class WebComponentsTypeScriptFileUpdate extends TypeScriptFileUpdate {
4
- filePath: string;
5
- constructor(filePath: string, formatSettings?: FormatSettings);
6
- addRoute(route: RouteLike, multiline?: boolean, prepend?: boolean, anchorElement?: PropertyAssignment): ts.SourceFile;
7
- addChildRoute(parentPath: string, route: RouteLike, asIdentifier?: boolean, multiline?: boolean, prepend?: boolean, anchorElement?: PropertyAssignment): ts.SourceFile;
8
- protected addRouteEntry(route: RouteLike, visitCondition: (node: ts.Node) => boolean, multiline: boolean, prepend: boolean, anchorElement: PropertyAssignment): ts.SourceFile;
9
- protected addRedirectRouteEntry(route: RouteLike, visitCondition: (node: ts.Node) => boolean, multiline: boolean, prepend: boolean, anchorElement: PropertyAssignment): ts.SourceFile;
10
- protected addChildRouteEntry(route: RouteLike, asIdentifier?: boolean, multiline?: boolean, prepend?: boolean): ts.SourceFile;
11
- }
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebComponentsTypeScriptFileUpdate = void 0;
4
- const ts = require("typescript");
5
- const cli_core_1 = require("@igniteui/cli-core");
6
- class WebComponentsTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
7
- constructor(filePath, formatSettings) {
8
- super(filePath, formatSettings);
9
- this.filePath = filePath;
10
- }
11
- //#region Overridden Public API
12
- addRoute(route, multiline = false, prepend = true, anchorElement = cli_core_1.WC_ANCHOR_ELEMENT) {
13
- return this.addRedirectOrSimpleRouteEntry(route, (0, cli_core_1.RoutesVariableAsParentCondition)(this.astTransformer), multiline, prepend, anchorElement);
14
- }
15
- addChildRoute(parentPath, route, asIdentifier = true, multiline, prepend, anchorElement) {
16
- return super.addChildRoute(parentPath, route, asIdentifier, multiline, prepend, anchorElement);
17
- }
18
- //#endregion
19
- //#region Overrides
20
- addRouteEntry(route, visitCondition, multiline = false, prepend = false, anchorElement) {
21
- const routeName = cli_core_1.Util.lowerDashed(route.name || route.path);
22
- this.requestSideEffectsImportForModule(`./${routeName}/${routeName}`);
23
- if (route.children &&
24
- !Array.isArray(route.children) &&
25
- (route.children.identifierName || route.children.aliasName)) {
26
- this.requestImportForRouteIdentifier(route.children);
27
- }
28
- const structure = [
29
- {
30
- name: cli_core_1.RouteTarget.Path,
31
- value: ts.factory.createStringLiteral(route.path),
32
- },
33
- {
34
- name: cli_core_1.RouteTarget.Component,
35
- value: ts.factory.createStringLiteral(route.aliasName || route.identifierName),
36
- },
37
- {
38
- name: cli_core_1.RouteTarget.Name,
39
- value: ts.factory.createStringLiteral(route.name),
40
- },
41
- ];
42
- const newRoute = this.astTransformer.createObjectLiteralExpression(structure, multiline);
43
- return this.astTransformer.addMembersToArrayLiteral(visitCondition, [newRoute], prepend, anchorElement);
44
- }
45
- addRedirectRouteEntry(route, visitCondition, multiline = false, prepend = false, anchorElement) {
46
- const routeName = cli_core_1.Util.lowerDashed(route.name || route.path);
47
- this.requestSideEffectsImportForModule(`./${routeName}/${routeName}`);
48
- const childRoute = route.children;
49
- if (childRoute) {
50
- this.requestImportForRouteIdentifier(childRoute);
51
- }
52
- const structure = [
53
- {
54
- name: cli_core_1.RouteTarget.Path,
55
- value: ts.factory.createStringLiteral(route.path || ''),
56
- },
57
- {
58
- // vaadin/router uses the component's tag name when navigating
59
- name: cli_core_1.RouteTarget.Component,
60
- value: ts.factory.createStringLiteral(route.redirectTo),
61
- },
62
- {
63
- name: cli_core_1.RouteTarget.Name,
64
- value: ts.factory.createStringLiteral(route.name),
65
- },
66
- ];
67
- if (childRoute) {
68
- structure.push({
69
- // the identifier name in this case will be the alias of the routes variable
70
- name: cli_core_1.RouteTarget.Children,
71
- value: ts.factory.createIdentifier(childRoute.aliasName || childRoute.identifierName),
72
- });
73
- }
74
- const newRoute = this.astTransformer.createObjectLiteralExpression(structure, multiline);
75
- return this.astTransformer.addMembersToArrayLiteral(visitCondition, [newRoute], prepend, anchorElement);
76
- }
77
- addChildRouteEntry(route, asIdentifier = true, multiline = false, prepend = false) {
78
- return super.addChildRouteEntry(route, asIdentifier || true, // for WC the `children` member should always be added in the form { children: identifier }
79
- multiline, prepend);
80
- }
81
- }
82
- exports.WebComponentsTypeScriptFileUpdate = WebComponentsTypeScriptFileUpdate;