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.
- 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 +4 -4
- package/templates/blazor/igb/index.js +1 -1
- 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/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 +4 -0
- 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/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
|
@@ -176,7 +176,7 @@ export default class App extends LitElement {
|
|
|
176
176
|
>
|
|
177
177
|
${visibleRoutes.map((route) => html`
|
|
178
178
|
<igc-nav-drawer-item
|
|
179
|
-
?active=${this.currentPath === route.path}
|
|
179
|
+
?active=${this.currentPath === this.toAbsPath(route.path)}
|
|
180
180
|
@click=${() => this.navigate(route.path)}
|
|
181
181
|
>
|
|
182
182
|
<igc-icon
|
|
@@ -220,13 +220,19 @@ export default class App extends LitElement {
|
|
|
220
220
|
router.setRoutes(routes);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
private toAbsPath(p: string) {
|
|
224
|
+
return p.startsWith('/') ? p : '/' + p;
|
|
225
|
+
}
|
|
226
|
+
|
|
223
227
|
private toggleDrawer = () => {
|
|
224
228
|
this.drawerOpen = !this.drawerOpen;
|
|
225
229
|
};
|
|
226
230
|
|
|
227
231
|
private navigate(path: string) {
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
const targetPath = this.toAbsPath(path);
|
|
233
|
+
|
|
234
|
+
this.currentPath = targetPath;
|
|
235
|
+
Router.go(targetPath);
|
|
230
236
|
|
|
231
237
|
if (!this.mediaQuery?.matches) {
|
|
232
238
|
this.drawerOpen = false;
|
|
@@ -181,13 +181,14 @@ export default class App extends LitElement {
|
|
|
181
181
|
>
|
|
182
182
|
${visibleRoutes.map((route) => html`
|
|
183
183
|
<igc-nav-drawer-item
|
|
184
|
-
?active=${this.currentPath === route.path}
|
|
184
|
+
?active=${this.currentPath === this.toAbsPath(route.path)}
|
|
185
185
|
@click=${() => this.navigate(route.path)}
|
|
186
186
|
>
|
|
187
187
|
<igc-icon
|
|
188
188
|
slot="icon"
|
|
189
189
|
name=${route.icon || 'apps'}
|
|
190
190
|
collection="material"
|
|
191
|
+
style=${this.currentPath === this.toAbsPath(route.path) ? 'color: #0075D2;' : ''}
|
|
191
192
|
></igc-icon>
|
|
192
193
|
<span slot="content">${route.name}</span>
|
|
193
194
|
</igc-nav-drawer-item>
|
|
@@ -219,13 +220,19 @@ export default class App extends LitElement {
|
|
|
219
220
|
router.setRoutes(routes);
|
|
220
221
|
}
|
|
221
222
|
|
|
223
|
+
private toAbsPath(p: string) {
|
|
224
|
+
return p.startsWith('/') ? p : '/' + p;
|
|
225
|
+
}
|
|
226
|
+
|
|
222
227
|
private toggleDrawer = () => {
|
|
223
228
|
this.drawerOpen = !this.drawerOpen;
|
|
224
229
|
};
|
|
225
230
|
|
|
226
231
|
private navigate(path: string) {
|
|
227
|
-
|
|
228
|
-
|
|
232
|
+
const targetPath = this.toAbsPath(path);
|
|
233
|
+
|
|
234
|
+
this.currentPath = targetPath;
|
|
235
|
+
Router.go(targetPath);
|
|
229
236
|
}
|
|
230
237
|
|
|
231
238
|
private updateDrawerState = () => {
|
|
@@ -192,13 +192,14 @@ export default class App extends LitElement {
|
|
|
192
192
|
>
|
|
193
193
|
${visibleRoutes.map((route) => html`
|
|
194
194
|
<igc-nav-drawer-item
|
|
195
|
-
?active=${this.currentPath === route.path}
|
|
195
|
+
?active=${this.currentPath === this.toAbsPath(route.path)}
|
|
196
196
|
@click=${() => this.navigate(route.path)}
|
|
197
197
|
>
|
|
198
198
|
<igc-icon
|
|
199
199
|
slot="icon"
|
|
200
200
|
name=${route.icon || 'apps'}
|
|
201
201
|
collection="material"
|
|
202
|
+
style=${this.currentPath === this.toAbsPath(route.path) ? 'color: #0075D2;' : ''}
|
|
202
203
|
></igc-icon>
|
|
203
204
|
<span slot="content">${route.name}</span>
|
|
204
205
|
</igc-nav-drawer-item>
|
|
@@ -234,13 +235,19 @@ export default class App extends LitElement {
|
|
|
234
235
|
router.setRoutes(routes);
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
private toAbsPath(p: string) {
|
|
239
|
+
return p.startsWith('/') ? p : '/' + p;
|
|
240
|
+
}
|
|
241
|
+
|
|
237
242
|
private toggleDrawer = () => {
|
|
238
243
|
this.drawerOpen = !this.drawerOpen;
|
|
239
244
|
};
|
|
240
245
|
|
|
241
246
|
private navigate(path: string) {
|
|
242
|
-
|
|
243
|
-
|
|
247
|
+
const targetPath = this.toAbsPath(path);
|
|
248
|
+
|
|
249
|
+
this.currentPath = targetPath;
|
|
250
|
+
Router.go(targetPath);
|
|
244
251
|
}
|
|
245
252
|
|
|
246
253
|
private updateDrawerState = () => {
|
package/templates/webcomponents/igc-ts/tree-grid/basic/files/src/app/__path__/__filePrefix__.test.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import $(ClassName) from './$(path).js';
|
|
3
|
+
|
|
4
|
+
describe('IgcTreeGridComponent', () => {
|
|
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/tree-grid/basic/files/src/app/__path__/__filePrefix__.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement, state } from 'lit/decorators.js';
|
|
3
|
+
import { IgcTreeGridComponent } from 'igniteui-webcomponents-grids';
|
|
4
|
+
import { EMPLOYEE_DATA, type Employee } from './data.js';
|
|
5
|
+
|
|
6
|
+
import gridTheme from 'igniteui-webcomponents-grids/grids/themes/light/material.css?inline';
|
|
7
|
+
|
|
8
|
+
IgcTreeGridComponent.register();
|
|
9
|
+
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
static styles = css`
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.page {
|
|
19
|
+
width: 100%;
|
|
20
|
+
margin-top: 40px;
|
|
21
|
+
padding: 0 48px;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.title {
|
|
29
|
+
color: rgb(0, 153, 255);
|
|
30
|
+
text-align: center;
|
|
31
|
+
font-size: 2.5rem;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
margin-top: 0;
|
|
34
|
+
margin-bottom: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.subtitle {
|
|
38
|
+
text-align: center;
|
|
39
|
+
margin-bottom: 32px;
|
|
40
|
+
margin-top: 16px;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.subtitle a {
|
|
45
|
+
color: rgb(0, 153, 255);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.grid-wrapper {
|
|
49
|
+
width: 100%;
|
|
50
|
+
max-width: 1200px;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
@state()
|
|
55
|
+
data: Employee[] = EMPLOYEE_DATA;
|
|
56
|
+
|
|
57
|
+
render() {
|
|
58
|
+
return html`
|
|
59
|
+
<style>${gridTheme}</style>
|
|
60
|
+
<div class="page">
|
|
61
|
+
<p class="title">$(name)</p>
|
|
62
|
+
<p class="subtitle">
|
|
63
|
+
IgcTreeGrid component displaying hierarchical data using a child collection.<br />
|
|
64
|
+
You can read more about configuring the IgcTreeGrid component in the
|
|
65
|
+
<a href="https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/grids/tree-grid/overview.html" target="_blank">
|
|
66
|
+
official documentation
|
|
67
|
+
</a>.
|
|
68
|
+
</p>
|
|
69
|
+
<div class="grid-wrapper">
|
|
70
|
+
<igc-tree-grid
|
|
71
|
+
class="ig-typography"
|
|
72
|
+
.data=${this.data}
|
|
73
|
+
primary-key="ID"
|
|
74
|
+
child-data-key="Employees"
|
|
75
|
+
height="650px"
|
|
76
|
+
width="100%"
|
|
77
|
+
>
|
|
78
|
+
<igc-column field="Name" data-type="string"></igc-column>
|
|
79
|
+
<igc-column field="Location" data-type="string"></igc-column>
|
|
80
|
+
<igc-column field="HireDate" header="Hire Date" data-type="date"></igc-column>
|
|
81
|
+
<igc-column field="Age" data-type="number"></igc-column>
|
|
82
|
+
</igc-tree-grid>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -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 IgcTreeGridTemplate extends IgniteUIForWebComponentsTemplate_1.IgniteUIForWebComponentsTemplate {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(__dirname);
|
|
32
|
+
this.components = ["Tree Grid"];
|
|
33
|
+
this.controlGroup = "Grids & Lists";
|
|
34
|
+
this.listInComponentTemplates = true;
|
|
35
|
+
this.id = "tree-grid";
|
|
36
|
+
this.projectType = "igc-ts";
|
|
37
|
+
this.name = "Tree Grid";
|
|
38
|
+
this.description = "IgcTreeGrid with hierarchical data";
|
|
39
|
+
this.packages = ["igniteui-webcomponents-grids@~7.1.0"];
|
|
40
|
+
}
|
|
41
|
+
get templatePaths() {
|
|
42
|
+
return [
|
|
43
|
+
...super.templatePaths,
|
|
44
|
+
path.join(SHARED_DATA_ROOT, "tree-grid", "files")
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
module.exports = new IgcTreeGridTemplate();
|
|
@@ -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 IgcTreeGridComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.name = "Tree Grid";
|
|
8
|
+
this.group = "Grids & Lists";
|
|
9
|
+
this.description = "pick from different tree grid views";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
module.exports = new IgcTreeGridComponent();
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export default [{
|
|
2
|
-
Discontinued: false,
|
|
3
|
-
OrderDate: new Date('2012-02-12'),
|
|
4
|
-
ProductID: 1,
|
|
5
|
-
ProductName: 'Chai',
|
|
6
|
-
QuantityPerUnit: '10 boxes x 20 bags',
|
|
7
|
-
ReorderLevel: 10,
|
|
8
|
-
UnitPrice: 18.0000,
|
|
9
|
-
UnitsInStock: 39
|
|
10
|
-
}, {
|
|
11
|
-
Discontinued: false,
|
|
12
|
-
OrderDate: new Date('2003-03-17'),
|
|
13
|
-
ProductID: 2,
|
|
14
|
-
ProductName: 'Chang',
|
|
15
|
-
QuantityPerUnit: '24 - 12 oz bottles',
|
|
16
|
-
ReorderLevel: 25,
|
|
17
|
-
UnitPrice: 19.0000,
|
|
18
|
-
UnitsInStock: 17
|
|
19
|
-
}, {
|
|
20
|
-
Discontinued: false,
|
|
21
|
-
OrderDate: new Date('2006-03-17'),
|
|
22
|
-
ProductID: 3,
|
|
23
|
-
ProductName: 'Aniseed Syrup',
|
|
24
|
-
QuantityPerUnit: '12 - 550 ml bottles',
|
|
25
|
-
ReorderLevel: 25,
|
|
26
|
-
UnitPrice: 10.0000,
|
|
27
|
-
UnitsInStock: 13
|
|
28
|
-
}, {
|
|
29
|
-
Discontinued: false,
|
|
30
|
-
OrderDate: new Date('2016-03-17'),
|
|
31
|
-
ProductID: 4,
|
|
32
|
-
ProductName: 'Chef Antons Cajun Seasoning',
|
|
33
|
-
QuantityPerUnit: '48 - 6 oz jars',
|
|
34
|
-
ReorderLevel: 0,
|
|
35
|
-
UnitPrice: 22.0000,
|
|
36
|
-
UnitsInStock: 53
|
|
37
|
-
}, {
|
|
38
|
-
Discontinued: true,
|
|
39
|
-
OrderDate: new Date('2011-11-11'),
|
|
40
|
-
ProductID: 5,
|
|
41
|
-
ProductName: 'Chef Antons Gumbo Mix',
|
|
42
|
-
QuantityPerUnit: '36 boxes',
|
|
43
|
-
ReorderLevel: 0,
|
|
44
|
-
UnitPrice: 21.3500,
|
|
45
|
-
UnitsInStock: 0
|
|
46
|
-
}];
|