igniteui-cli 15.3.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/PromptSession.d.ts +1 -1
- package/lib/PromptSession.js +2 -3
- package/lib/commands/new.js +49 -1
- package/lib/commands/types.d.ts +4 -0
- package/lib/templates/IgniteUIForWebComponentsTemplate.js +3 -2
- package/package.json +7 -7
- package/templates/blazor/igb/index.js +1 -1
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +322 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +11 -9
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +2 -1
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +2 -2
- package/templates/blazor/igb/projects/empty/index.d.ts +24 -0
- package/templates/blazor/igb/projects/empty/index.js +67 -0
- package/templates/blazor/index.js +1 -1
- package/templates/react/igr-ts/grid/basic/files/src/app/__path__/__filePrefix__.tsx +49 -40
- package/templates/react/igr-ts/grid/basic/files/src/app/__path__/style.module.css +17 -7
- package/templates/react/igr-ts/grid/basic/index.js +31 -0
- package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
- package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.tsx +43 -0
- package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/style.module.css +27 -0
- package/templates/react/igr-ts/hierarchical-grid/basic/index.d.ts +1 -0
- package/templates/react/igr-ts/hierarchical-grid/basic/index.js +50 -0
- package/templates/react/igr-ts/hierarchical-grid/index.d.ts +1 -0
- package/templates/react/igr-ts/hierarchical-grid/index.js +12 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.tsx +54 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/style.module.css +27 -0
- package/templates/react/igr-ts/pivot-grid/basic/index.d.ts +1 -0
- package/templates/react/igr-ts/pivot-grid/basic/index.js +50 -0
- package/templates/react/igr-ts/pivot-grid/index.d.ts +1 -0
- package/templates/react/igr-ts/pivot-grid/index.js +12 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +274 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +1 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +9 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +6 -2
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.tsx +5 -3
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.tsx +5 -3
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.tsx +4 -3
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.tsx +4 -3
- package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx +13 -0
- package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.tsx +30 -0
- package/templates/react/igr-ts/tree-grid/basic/files/src/app/__path__/style.module.css +27 -0
- package/templates/react/igr-ts/tree-grid/basic/index.d.ts +1 -0
- package/templates/react/igr-ts/tree-grid/basic/index.js +50 -0
- package/templates/react/igr-ts/tree-grid/index.d.ts +1 -0
- package/templates/react/igr-ts/tree-grid/index.js +12 -0
- package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.ts +65 -52
- package/templates/webcomponents/igc-ts/grid/default/index.js +31 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.ts +100 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/basic/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/basic/index.js +48 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/hierarchical-grid/index.js +12 -0
- package/templates/webcomponents/igc-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
- package/templates/webcomponents/igc-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.ts +113 -0
- package/templates/webcomponents/igc-ts/pivot-grid/basic/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/pivot-grid/basic/index.js +48 -0
- package/templates/webcomponents/igc-ts/pivot-grid/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/pivot-grid/index.js +12 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/index.html +1 -0
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/index.html +1 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -1
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +446 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +10 -3
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/index.html +1 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app.ts +9 -3
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app.ts +10 -3
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/files/src/app/app.ts +10 -3
- package/templates/webcomponents/igc-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.test.ts +9 -0
- package/templates/webcomponents/igc-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.ts +87 -0
- package/templates/webcomponents/igc-ts/tree-grid/basic/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/tree-grid/basic/index.js +48 -0
- package/templates/webcomponents/igc-ts/tree-grid/index.d.ts +1 -0
- package/templates/webcomponents/igc-ts/tree-grid/index.js +12 -0
- package/templates/react/igr-ts/grid/basic/files/src/app/__path__/data.tsx +0 -46
package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,76 +1,89 @@
|
|
|
1
1
|
import { html, css, LitElement } from 'lit';
|
|
2
2
|
import { customElement, state } from 'lit/decorators.js';
|
|
3
|
-
import { IgcGridComponent
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
padding-right: 20px;
|
|
16
|
-
width: calc(100% - 600px);
|
|
15
|
+
display: block;
|
|
16
|
+
width: 100%;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
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
|
-
<
|
|
60
|
-
class="
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
});
|
package/templates/webcomponents/igc-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.ts
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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();
|
|
@@ -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
|
|
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.
|