igniteui-cli 15.3.1-beta.1 → 15.4.1-beta.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.
Files changed (73) hide show
  1. package/lib/PromptSession.d.ts +1 -1
  2. package/lib/PromptSession.js +2 -3
  3. package/lib/commands/new.js +49 -1
  4. package/lib/commands/types.d.ts +4 -0
  5. package/lib/templates/IgniteUIForWebComponentsTemplate.js +3 -2
  6. package/package.json +4 -4
  7. package/templates/blazor/igb/index.js +1 -1
  8. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +11 -9
  9. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +2 -1
  10. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +2 -2
  11. package/templates/blazor/igb/projects/empty/index.d.ts +24 -0
  12. package/templates/blazor/igb/projects/empty/index.js +67 -0
  13. package/templates/blazor/index.js +1 -1
  14. package/templates/react/igr-ts/grid/basic/files/src/app/__path__/__filePrefix__.tsx +49 -40
  15. package/templates/react/igr-ts/grid/basic/files/src/app/__path__/style.module.css +17 -7
  16. package/templates/react/igr-ts/grid/basic/index.js +31 -0
  17. package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
  18. package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.tsx +43 -0
  19. package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/style.module.css +27 -0
  20. package/templates/react/igr-ts/hierarchical-grid/basic/index.d.ts +1 -0
  21. package/templates/react/igr-ts/hierarchical-grid/basic/index.js +50 -0
  22. package/templates/react/igr-ts/hierarchical-grid/index.d.ts +1 -0
  23. package/templates/react/igr-ts/hierarchical-grid/index.js +12 -0
  24. package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
  25. package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.tsx +54 -0
  26. package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/style.module.css +27 -0
  27. package/templates/react/igr-ts/pivot-grid/basic/index.d.ts +1 -0
  28. package/templates/react/igr-ts/pivot-grid/basic/index.js +50 -0
  29. package/templates/react/igr-ts/pivot-grid/index.d.ts +1 -0
  30. package/templates/react/igr-ts/pivot-grid/index.js +12 -0
  31. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +1 -0
  32. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +9 -0
  33. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +4 -0
  34. package/templates/react/igr-ts/projects/side-nav/files/src/app/app.tsx +5 -3
  35. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.tsx +5 -3
  36. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.tsx +4 -3
  37. package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.tsx +4 -3
  38. package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
  39. package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.tsx +30 -0
  40. package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/style.module.css +27 -0
  41. package/templates/react/igr-ts/tree-grid/basic/index.d.ts +1 -0
  42. package/templates/react/igr-ts/tree-grid/basic/index.js +50 -0
  43. package/templates/react/igr-ts/tree-grid/index.d.ts +1 -0
  44. package/templates/react/igr-ts/tree-grid/index.js +12 -0
  45. package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.ts +65 -52
  46. package/templates/webcomponents/igc-ts/grid/default/index.js +31 -0
  47. package/templates/webcomponents/igc-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
  48. package/templates/webcomponents/igc-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.ts +100 -0
  49. package/templates/webcomponents/igc-ts/hierarchical-grid/basic/index.d.ts +1 -0
  50. package/templates/webcomponents/igc-ts/hierarchical-grid/basic/index.js +48 -0
  51. package/templates/webcomponents/igc-ts/hierarchical-grid/index.d.ts +1 -0
  52. package/templates/webcomponents/igc-ts/hierarchical-grid/index.js +12 -0
  53. package/templates/webcomponents/igc-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
  54. package/templates/webcomponents/igc-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.ts +113 -0
  55. package/templates/webcomponents/igc-ts/pivot-grid/basic/index.d.ts +1 -0
  56. package/templates/webcomponents/igc-ts/pivot-grid/basic/index.js +48 -0
  57. package/templates/webcomponents/igc-ts/pivot-grid/index.d.ts +1 -0
  58. package/templates/webcomponents/igc-ts/pivot-grid/index.js +12 -0
  59. package/templates/webcomponents/igc-ts/projects/_base/files/index.html +1 -0
  60. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/index.html +1 -0
  61. package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -1
  62. package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +10 -3
  63. package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/index.html +1 -0
  64. package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app.ts +9 -3
  65. package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app.ts +10 -3
  66. package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/files/src/app/app.ts +10 -3
  67. package/templates/webcomponents/igc-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
  68. package/templates/webcomponents/igc-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.ts +87 -0
  69. package/templates/webcomponents/igc-ts/tree-grid/basic/index.d.ts +1 -0
  70. package/templates/webcomponents/igc-ts/tree-grid/basic/index.js +48 -0
  71. package/templates/webcomponents/igc-ts/tree-grid/index.d.ts +1 -0
  72. package/templates/webcomponents/igc-ts/tree-grid/index.js +12 -0
  73. package/templates/react/igr-ts/grid/basic/files/src/app/__path__/data.tsx +0 -46
@@ -1,76 +1,89 @@
1
1
  import { html, css, LitElement } from 'lit';
2
2
  import { customElement, state } from 'lit/decorators.js';
3
- import { IgcGridComponent, type IgcGroupingExpression, SortingDirection } from 'igniteui-webcomponents-grids';
3
+ import { IgcGridComponent } from 'igniteui-webcomponents-grids';
4
4
 
5
5
  import gridThemeLightMaterial from 'igniteui-webcomponents-grids/grids/themes/light/material.css?inline'
6
6
 
7
+ import { employeesData, type Employee } from './data.js';
8
+
7
9
  IgcGridComponent.register();
8
10
 
9
11
  @customElement('app-$(path)')
10
12
  export default class $(ClassName) extends LitElement {
11
13
  static styles = css`
12
14
  :host {
13
- height: 100%;
14
- margin: 0px;
15
- padding-right: 20px;
16
- width: calc(100% - 600px);
15
+ display: block;
16
+ width: 100%;
17
17
  }
18
- igc-grid img {
19
- object-fit: contain;
20
- height: 100%;
18
+
19
+ .page {
21
20
  width: 100%;
21
+ margin-top: 40px;
22
+ padding: 0 48px;
23
+ box-sizing: border-box;
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
22
27
  }
23
- `;
24
28
 
25
- @state()
26
- data: any[] = [{
27
- country: 'USA',
28
- countryFlag: 'https://static.infragistics.com/xplatform/images/flags/USA.png',
29
- margin: 0.03,
30
- orderDate: new Date(2021, 4, 3),
31
- orderItems: 7,
32
- orderValue: 500,
33
- productID: 1001,
34
- productName: 'Patriot Memory',
35
- productPrice: 2000,
36
- status: 'Shipped',
37
- },
38
- {
39
- country: 'Croatia',
40
- countryFlag: 'https://static.infragistics.com/xplatform/images/flags/Croatia.png',
41
- margin: 0.05,
42
- orderDate: new Date(2021, 1, 10),
43
- orderItems: 11,
44
- orderValue: 760,
45
- productID: 1002,
46
- productName: 'Asus GPU',
47
- productPrice: 3000,
48
- status: 'Packing',
49
- }];
29
+ .title {
30
+ color: rgb(0, 153, 255);
31
+ text-align: center;
32
+ font-size: 2.5rem;
33
+ font-weight: 600;
34
+ margin-top: 0;
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .subtitle {
39
+ text-align: center;
40
+ margin-bottom: 32px;
41
+ margin-top: 16px;
42
+ font-size: 14px;
43
+ }
44
+
45
+ .subtitle a {
46
+ color: rgb(0, 153, 255);
47
+ }
48
+
49
+ .grid-wrapper {
50
+ width: 100%;
51
+ max-width: 1200px;
52
+ }
53
+ `;
50
54
 
51
55
  @state()
52
- groupingExpressions: IgcGroupingExpression[] = [
53
- { fieldName: 'status', dir: SortingDirection.Desc },
54
- ];
56
+ data: Employee[] = employeesData;
55
57
 
56
58
  render() {
57
59
  return html`
58
60
  <style>${gridThemeLightMaterial}</style>
59
- <igc-grid
60
- class="ig-typography"
61
- .data=${this.data}
62
- .groupingExpressions=${this.groupingExpressions}
63
- filter-mode="excelStyleFilter"
64
- >
65
- <igc-column field="productID" header="ID" width="90px"></igc-column>
66
- <igc-column field="productName" header="Product" width="160px"></igc-column>
67
- <igc-column field="countryFlag" header="Country" data-type="image" width="100px"></igc-column>
68
- <igc-column field="orderItems" header="Orders" data-type="number" width="100px"></igc-column>
69
- <igc-column field="orderValue" header="Order Value" data-type="currency" width="140px"></igc-column>
70
- <igc-column field="orderDate" header="Order Date" data-type="date"></igc-column>
71
- <igc-column field="margin" header="Margin" data-type="percent" width="100px"></igc-column>
72
- <igc-column field="status" header="Status" width="100px" groupable></igc-column>
73
- </igc-grid>
61
+ <div class="page">
62
+ <p class="title">$(name)</p>
63
+ <p class="subtitle">
64
+ IgcGrid component with auto generated columns and local data.<br />
65
+ You can read more about configuring the IgcGrid component in the
66
+ <a href="https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/grids/data-grid.html" target="_blank">
67
+ official documentation
68
+ </a>.
69
+ </p>
70
+ <div class="grid-wrapper">
71
+ <igc-grid
72
+ class="ig-typography"
73
+ .data=${this.data}
74
+ height="600px"
75
+ width="100%"
76
+ >
77
+ <igc-column field="EmployeeID" header="Employee ID" data-type="string"></igc-column>
78
+ <igc-column field="FirstName" header="First Name" data-type="string"></igc-column>
79
+ <igc-column field="LastName" header="Last Name" data-type="string"></igc-column>
80
+ <igc-column field="Country" header="Country" data-type="string"></igc-column>
81
+ <igc-column field="Age" header="Age" data-type="number" width="80px"></igc-column>
82
+ <igc-column field="RegistererDate" header="Registered Date" data-type="date"></igc-column>
83
+ <igc-column field="IsActive" header="Active" data-type="boolean" width="90px"></igc-column>
84
+ </igc-grid>
85
+ </div>
86
+ </div>
74
87
  `;
75
88
  }
76
89
  }
@@ -1,6 +1,31 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  const IgniteUIForWebComponentsTemplate_1 = require("../../../../../lib/templates/IgniteUIForWebComponentsTemplate");
27
+ const path = __importStar(require("path"));
28
+ const SHARED_DATA_ROOT = path.join(path.dirname(require.resolve("@igniteui/angular-templates/package.json")), "shared-data");
4
29
  class IgcGridTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebComponentsTemplate {
5
30
  constructor() {
6
31
  super(__dirname);
@@ -13,5 +38,11 @@ class IgcGridTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebC
13
38
  this.description = "IgcGrid with local data";
14
39
  this.packages = ["igniteui-webcomponents-grids@~7.1.0"];
15
40
  }
41
+ get templatePaths() {
42
+ return [
43
+ ...super.templatePaths,
44
+ path.join(SHARED_DATA_ROOT, "grid", "files")
45
+ ];
46
+ }
16
47
  }
17
48
  module.exports = new IgcGridTemplate();
@@ -0,0 +1,9 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import $(ClassName) from './$(path).js';
3
+
4
+ describe('IgcHierarchicalGridComponent', () => {
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,100 @@
1
+ import { html, css, LitElement } from 'lit';
2
+ import { customElement, state } from 'lit/decorators.js';
3
+ import { IgcHierarchicalGridComponent, IgcRowIslandComponent } from 'igniteui-webcomponents-grids';
4
+ import { ARTISTS, type Artist } from './data.js';
5
+
6
+ import gridTheme from 'igniteui-webcomponents-grids/grids/themes/light/material.css?inline';
7
+
8
+ IgcHierarchicalGridComponent.register();
9
+ IgcRowIslandComponent.register();
10
+
11
+ @customElement('app-$(path)')
12
+ export default class $(ClassName) extends LitElement {
13
+ static styles = css`
14
+ :host {
15
+ display: block;
16
+ width: 100%;
17
+ }
18
+
19
+ .page {
20
+ width: 100%;
21
+ margin-top: 40px;
22
+ padding: 0 48px;
23
+ box-sizing: border-box;
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
27
+ }
28
+
29
+ .title {
30
+ color: rgb(0, 153, 255);
31
+ text-align: center;
32
+ font-size: 2.5rem;
33
+ font-weight: 600;
34
+ margin-top: 0;
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .subtitle {
39
+ text-align: center;
40
+ margin-bottom: 32px;
41
+ margin-top: 16px;
42
+ font-size: 14px;
43
+ }
44
+
45
+ .subtitle a {
46
+ color: rgb(0, 153, 255);
47
+ }
48
+
49
+ .grid-wrapper {
50
+ width: 100%;
51
+ max-width: 1200px;
52
+ }
53
+ `;
54
+
55
+ @state()
56
+ data: Artist[] = ARTISTS;
57
+
58
+ render() {
59
+ return html`
60
+ <style>${gridTheme}</style>
61
+ <div class="page">
62
+ <p class="title">$(name)</p>
63
+ <p class="subtitle">
64
+ IgcHierarchicalGrid with basic configuration.<br />
65
+ You can read more about configuring the IgcHierarchicalGrid component in the
66
+ <a href="https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/grids/hierarchical-grid/overview.html" target="_blank">
67
+ official documentation
68
+ </a>.
69
+ </p>
70
+ <div class="grid-wrapper">
71
+ <igc-hierarchical-grid
72
+ class="ig-typography"
73
+ .data=${this.data}
74
+ primary-key="Artist"
75
+ height="600px"
76
+ width="100%"
77
+ >
78
+ <igc-column field="Artist" data-type="string"></igc-column>
79
+ <igc-column field="HasGrammyAward" header="Has Grammy Award" data-type="boolean"></igc-column>
80
+ <igc-column field="Debut" data-type="number"></igc-column>
81
+ <igc-column field="GrammyNominations" header="Grammy Nominations" data-type="number"></igc-column>
82
+ <igc-column field="GrammyAwards" header="Grammy Awards" data-type="number"></igc-column>
83
+ <igc-row-island child-data-key="Albums" primary-key="Album">
84
+ <igc-column field="Album" data-type="string"></igc-column>
85
+ <igc-column field="LaunchDate" header="Launch Date" data-type="date"></igc-column>
86
+ <igc-column field="BillboardReview" header="Billboard Review" data-type="number"></igc-column>
87
+ <igc-column field="USBillboard200" header="US Billboard 200" data-type="number"></igc-column>
88
+ <igc-row-island child-data-key="Songs" primary-key="TrackNumber">
89
+ <igc-column field="TrackNumber" header="Track" data-type="string"></igc-column>
90
+ <igc-column field="Title" data-type="string"></igc-column>
91
+ <igc-column field="Released" data-type="string"></igc-column>
92
+ <igc-column field="Genre" data-type="string"></igc-column>
93
+ </igc-row-island>
94
+ </igc-row-island>
95
+ </igc-hierarchical-grid>
96
+ </div>
97
+ </div>
98
+ `;
99
+ }
100
+ }
@@ -0,0 +1,48 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const IgniteUIForWebComponentsTemplate_1 = require("../../../../../lib/templates/IgniteUIForWebComponentsTemplate");
27
+ const path = __importStar(require("path"));
28
+ const SHARED_DATA_ROOT = path.join(path.dirname(require.resolve("@igniteui/angular-templates/package.json")), "shared-data");
29
+ class IgcHierarchicalGridTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebComponentsTemplate {
30
+ constructor() {
31
+ super(__dirname);
32
+ this.components = ["Hierarchical Grid"];
33
+ this.controlGroup = "Grids & Lists";
34
+ this.listInComponentTemplates = true;
35
+ this.id = "hierarchical-grid";
36
+ this.projectType = "igc-ts";
37
+ this.name = "Hierarchical Grid";
38
+ this.description = "IgcHierarchicalGrid with basic configuration";
39
+ this.packages = ["igniteui-webcomponents-grids@~7.1.0"];
40
+ }
41
+ get templatePaths() {
42
+ return [
43
+ ...super.templatePaths,
44
+ path.join(SHARED_DATA_ROOT, "hierarchical-grid", "files")
45
+ ];
46
+ }
47
+ }
48
+ module.exports = new IgcHierarchicalGridTemplate();
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_core_1 = require("@igniteui/cli-core");
4
+ class IgcHierarchicalGridComponent extends cli_core_1.BaseComponent {
5
+ constructor() {
6
+ super(__dirname);
7
+ this.name = "Hierarchical Grid";
8
+ this.group = "Grids & Lists";
9
+ this.description = "pick from different hierarchical grid views";
10
+ }
11
+ }
12
+ module.exports = new IgcHierarchicalGridComponent();
@@ -0,0 +1,9 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import $(ClassName) from './$(path).js';
3
+
4
+ describe('IgcPivotGridComponent', () => {
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,113 @@
1
+ import { html, css, LitElement } from 'lit';
2
+ import { customElement, state } from 'lit/decorators.js';
3
+ import {
4
+ IgcPivotGridComponent,
5
+ type IgcPivotConfiguration
6
+ } from 'igniteui-webcomponents-grids';
7
+ import { DATA } from './data.js';
8
+
9
+ import gridTheme from 'igniteui-webcomponents-grids/grids/themes/light/material.css?inline';
10
+
11
+ IgcPivotGridComponent.register();
12
+
13
+ @customElement('app-$(path)')
14
+ export default class $(ClassName) extends LitElement {
15
+ static styles = css`
16
+ :host {
17
+ display: block;
18
+ width: 100%;
19
+ }
20
+
21
+ .page {
22
+ width: 100%;
23
+ margin-top: 40px;
24
+ padding: 0 48px;
25
+ box-sizing: border-box;
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ }
30
+
31
+ .title {
32
+ color: rgb(0, 153, 255);
33
+ text-align: center;
34
+ font-size: 2.5rem;
35
+ font-weight: 600;
36
+ margin-top: 0;
37
+ margin-bottom: 0;
38
+ }
39
+
40
+ .subtitle {
41
+ text-align: center;
42
+ margin-bottom: 32px;
43
+ margin-top: 16px;
44
+ font-size: 14px;
45
+ }
46
+
47
+ .subtitle a {
48
+ color: rgb(0, 153, 255);
49
+ }
50
+
51
+ .grid-wrapper {
52
+ width: 100%;
53
+ max-width: 1200px;
54
+ }
55
+ `;
56
+
57
+ @state()
58
+ data: any[] = DATA;
59
+
60
+ pivotConfig: IgcPivotConfiguration = {
61
+ columns: [
62
+ {
63
+ memberName: 'Product',
64
+ memberFunction: (data: any) => data.Product.Name,
65
+ enabled: true
66
+ }
67
+ ],
68
+ rows: [
69
+ {
70
+ memberName: 'Seller',
71
+ memberFunction: (data: any) => data.Seller.Name,
72
+ enabled: true
73
+ }
74
+ ],
75
+ values: [
76
+ {
77
+ member: 'NumberOfUnits',
78
+ aggregate: {
79
+ aggregatorName: 'SUM' as const,
80
+ key: 'sum',
81
+ label: 'Sum'
82
+ },
83
+ enabled: true
84
+ }
85
+ ],
86
+ filters: null
87
+ };
88
+
89
+ render() {
90
+ return html`
91
+ <style>${gridTheme}</style>
92
+ <div class="page">
93
+ <p class="title">$(name)</p>
94
+ <p class="subtitle">
95
+ Basic IgcPivotGrid component.<br />
96
+ You can read more about configuring the IgcPivotGrid component in the
97
+ <a href="https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/grids/pivot-grid/overview.html" target="_blank">
98
+ official documentation
99
+ </a>.
100
+ </p>
101
+ <div class="grid-wrapper">
102
+ <igc-pivot-grid
103
+ class="ig-typography"
104
+ .data=${this.data}
105
+ .pivotConfiguration=${this.pivotConfig}
106
+ height="650px"
107
+ width="100%"
108
+ ></igc-pivot-grid>
109
+ </div>
110
+ </div>
111
+ `;
112
+ }
113
+ }
@@ -0,0 +1,48 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const IgniteUIForWebComponentsTemplate_1 = require("../../../../../lib/templates/IgniteUIForWebComponentsTemplate");
27
+ const path = __importStar(require("path"));
28
+ const SHARED_DATA_ROOT = path.join(path.dirname(require.resolve("@igniteui/angular-templates/package.json")), "shared-data");
29
+ class IgcPivotGridTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebComponentsTemplate {
30
+ constructor() {
31
+ super(__dirname);
32
+ this.components = ["Pivot Grid"];
33
+ this.controlGroup = "Grids & Lists";
34
+ this.listInComponentTemplates = true;
35
+ this.id = "pivot-grid";
36
+ this.projectType = "igc-ts";
37
+ this.name = "Pivot Grid";
38
+ this.description = "Basic IgcPivotGrid component";
39
+ this.packages = ["igniteui-webcomponents-grids@~7.1.0"];
40
+ }
41
+ get templatePaths() {
42
+ return [
43
+ ...super.templatePaths,
44
+ path.join(SHARED_DATA_ROOT, "pivot-grid", "files")
45
+ ];
46
+ }
47
+ }
48
+ module.exports = new IgcPivotGridTemplate();
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_core_1 = require("@igniteui/cli-core");
4
+ class IgcPivotGridComponent extends cli_core_1.BaseComponent {
5
+ constructor() {
6
+ super(__dirname);
7
+ this.name = "Pivot Grid";
8
+ this.group = "Grids & Lists";
9
+ this.description = "pick from different pivot grid views";
10
+ }
11
+ }
12
+ module.exports = new IgcPivotGridComponent();
@@ -5,6 +5,7 @@
5
5
  <meta charset="utf-8">
6
6
  <base href="/">
7
7
  <title><%=ApplicationTitle%></title>
8
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
8
9
  <link rel="stylesheet" href="./styles.css">
9
10
  </head>
10
11
 
@@ -8,6 +8,7 @@
8
8
  <title>Ignite UI for Web Components</title>
9
9
  <link rel="icon" type="image/png" href="./src/assets/wc.png">
10
10
  <link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/bootstrap.css">
11
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
11
12
  <link rel="stylesheet" href="./styles.css">
12
13
  </head>
13
14
 
@@ -106,6 +106,20 @@ igc-nav-drawer {
106
106
  }
107
107
  ```
108
108
 
109
+ ### Omit column `width` — both grid types are fluid by default
110
+ Adding explicit pixel widths prevents columns from filling the container and leaves trailing empty space. Both `igc-grid-lite-column` and `igc-column` are fluid by default when `width` is not set.
111
+
112
+ When some columns need a fixed size, apply `width` only to those and leave **at least one column without `width`** so it fills the remaining space. The pattern is the same regardless of grid type — replace the tag name to match whichever grid is in use:
113
+
114
+ ```html
115
+ <!-- replace igc-grid-lite-column with igc-column for the Premium Grid -->
116
+ <igc-grid-lite-column field="id" header="#" width="60px"></igc-grid-lite-column>
117
+ <igc-grid-lite-column field="status" header="Status" width="100px"></igc-grid-lite-column>
118
+ <igc-grid-lite-column field="name" header="Name">{/* no width — fills remaining space */}</igc-grid-lite-column>
119
+ ```
120
+
121
+ When a Grid Lite column has `width` set and `resizable` enabled, use `px` — not `%` or other relative units — to prevent layout shifts during resize.
122
+
109
123
  ## Theming Pitfalls
110
124
 
111
125
  ### Never hardcode colors after palette generation
@@ -118,7 +132,7 @@ Once a palette or theme exists, use `get_color` and palette-backed CSS custom pr
118
132
  For core UI component theming, prefer `create_component_theme` and apply the returned theme block as generated by the MCP server.
119
133
 
120
134
  ### Grid theming is package-specific
121
- `igniteui-grid-lite` and the advanced grid packages do not map to Angular's `igx-grid__*` internal class structure. Use `get_component_design_tokens("grid")`, the exact grid package docs, and exposed tokens or parts for the package present in the workspace.
135
+ `igniteui-grid-lite` and the premium grid packages do not map to Angular's `igx-grid__*` internal class structure. Use `get_component_design_tokens("grid")`, the exact grid package docs, and exposed tokens or parts for the package present in the workspace.
122
136
 
123
137
  ### Read luminance warnings from palette generation
124
138
  If palette generation returns a luminance warning for a generated surface, do not ignore it. If the design needs multiple surface depths, use `create_custom_palette` or define semantic CSS variables such as `--surface-1` and `--surface-2` in the main stylesheet instead of relying on a single generated surface color.
@@ -162,13 +162,14 @@ export default class App extends LitElement {
162
162
  >
163
163
  ${visibleRoutes.map((route) => html`
164
164
  <igc-nav-drawer-item
165
- ?active=${this.currentPath === route.path}
165
+ ?active=${this.currentPath === this.toAbsPath(route.path)}
166
166
  @click=${() => this.navigate(route.path)}
167
167
  >
168
168
  <igc-icon
169
169
  slot="icon"
170
170
  name=${route.icon || 'home'}
171
171
  collection="material"
172
+ style=${this.currentPath === this.toAbsPath(route.path) ? 'color: #0075D2;' : ''}
172
173
  ></igc-icon>
173
174
  <span slot="content">${route.name}</span>
174
175
  </igc-nav-drawer-item>
@@ -202,13 +203,19 @@ export default class App extends LitElement {
202
203
  router.setRoutes(routes);
203
204
  }
204
205
 
206
+ private toAbsPath(p: string) {
207
+ return p.startsWith('/') ? p : '/' + p;
208
+ }
209
+
205
210
  private toggleDrawer = () => {
206
211
  this.drawerOpen = !this.drawerOpen;
207
212
  };
208
213
 
209
214
  private navigate(path: string) {
210
- this.currentPath = path;
211
- Router.go(path);
215
+ const targetPath = this.toAbsPath(path);
216
+
217
+ this.currentPath = targetPath;
218
+ Router.go(targetPath);
212
219
 
213
220
  if (!this.mediaQuery?.matches) {
214
221
  this.drawerOpen = false;
@@ -9,6 +9,7 @@
9
9
  <link rel="icon" type="image/png" href="./src/assets/wc.png">
10
10
  <link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
11
11
  <link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/material.css">
12
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
12
13
  <link rel="stylesheet" href="./styles.css">
13
14
  <!-- Facebook JS SDK — required only when facebook is configured in external-auth-config.ts.
14
15
  Remove this script if you are not using Facebook login. -->