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
package/lib/PromptSession.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BasePromptSession, Framework, ProjectLibrary, PromptTaskContext, Task }
|
|
|
2
2
|
export declare class PromptSession extends BasePromptSession {
|
|
3
3
|
static chooseTerm(): Promise<string>;
|
|
4
4
|
protected getProjectLibrary(framework: Framework): Promise<ProjectLibrary>;
|
|
5
|
-
protected
|
|
5
|
+
protected complete(): Promise<void>;
|
|
6
6
|
protected upgradePackages(): Promise<void>;
|
|
7
7
|
protected configureAI(frameworkId: string): Promise<void>;
|
|
8
8
|
protected templateSelectedTask(type?: "component" | "view"): Task<PromptTaskContext>;
|
package/lib/PromptSession.js
CHANGED
|
@@ -16,7 +16,6 @@ exports.PromptSession = void 0;
|
|
|
16
16
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
17
17
|
const add_1 = __importDefault(require("./commands/add"));
|
|
18
18
|
const ai_config_1 = require("./commands/ai-config");
|
|
19
|
-
const start_1 = __importDefault(require("./commands/start"));
|
|
20
19
|
const upgrade_1 = __importDefault(require("./commands/upgrade"));
|
|
21
20
|
class PromptSession extends cli_core_1.BasePromptSession {
|
|
22
21
|
static chooseTerm() {
|
|
@@ -45,10 +44,10 @@ class PromptSession extends cli_core_1.BasePromptSession {
|
|
|
45
44
|
return result;
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
complete() {
|
|
49
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
yield cli_core_1.PackageManager.installPackages();
|
|
50
50
|
yield cli_core_1.PackageManager.flushQueue(true);
|
|
51
|
-
yield start_1.default.start({ port });
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
53
|
upgradePackages() {
|
package/lib/commands/new.js
CHANGED
|
@@ -68,6 +68,16 @@ const command = {
|
|
|
68
68
|
alias: "th",
|
|
69
69
|
describe: "Project theme (depends on project type)",
|
|
70
70
|
type: "string"
|
|
71
|
+
})
|
|
72
|
+
.option("hosting", {
|
|
73
|
+
describe: "Blazor hosting model (Blazor projects only)",
|
|
74
|
+
type: "string",
|
|
75
|
+
choices: ["Server", "Wasm", "Auto"]
|
|
76
|
+
})
|
|
77
|
+
.option("variant", {
|
|
78
|
+
describe: "Theme variant (Blazor projects only)",
|
|
79
|
+
type: "string",
|
|
80
|
+
choices: ["light", "dark"]
|
|
71
81
|
})
|
|
72
82
|
.option("skip-git", {
|
|
73
83
|
alias: "sg",
|
|
@@ -169,6 +179,44 @@ const command = {
|
|
|
169
179
|
cd11: !!argv.skipGit,
|
|
170
180
|
cd14: theme
|
|
171
181
|
});
|
|
182
|
+
if (typeof projTemplate.scaffold === "function") {
|
|
183
|
+
if (!/^[a-zA-Z][a-zA-Z0-9-]*$/.test(argv.name)) {
|
|
184
|
+
cli_core_1.Util.warn(`The project namespace will be derived from the name '${argv.name}'. ` +
|
|
185
|
+
"Use only letters, digits and dashes for a clean identifier.", "yellow");
|
|
186
|
+
}
|
|
187
|
+
const extraConfig = {};
|
|
188
|
+
if (argv.hosting) {
|
|
189
|
+
extraConfig.Hosting = argv.hosting;
|
|
190
|
+
}
|
|
191
|
+
if (argv.variant) {
|
|
192
|
+
extraConfig.Variant = argv.variant;
|
|
193
|
+
}
|
|
194
|
+
const success = yield projTemplate.scaffold({
|
|
195
|
+
name: argv.name,
|
|
196
|
+
theme,
|
|
197
|
+
skipInstall: !!argv.skipInstall,
|
|
198
|
+
skipGit: !!argv.skipGit,
|
|
199
|
+
extraConfig
|
|
200
|
+
});
|
|
201
|
+
if (!success) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
process.chdir(argv.name);
|
|
205
|
+
yield (0, ai_config_1.configure)(argv.framework, {
|
|
206
|
+
agents: argv.agents,
|
|
207
|
+
assistants: argv.assistants
|
|
208
|
+
});
|
|
209
|
+
process.chdir("..");
|
|
210
|
+
if (!argv["skip-git"] && !cli_core_1.ProjectConfig.getConfig().skipGit) {
|
|
211
|
+
cli_core_1.Util.gitInit(process.cwd(), argv.name);
|
|
212
|
+
}
|
|
213
|
+
const quotedName = cli_core_1.Util.quoteIfNeeded(argv.name);
|
|
214
|
+
cli_core_1.Util.log("");
|
|
215
|
+
cli_core_1.Util.log("Next Steps:");
|
|
216
|
+
cli_core_1.Util.log(` cd ${quotedName}`);
|
|
217
|
+
cli_core_1.Util.log(` dotnet run --project ${quotedName}`);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
172
220
|
const config = projTemplate.generateConfig(argv.name, theme);
|
|
173
221
|
for (const templatePath of projTemplate.templatePaths) {
|
|
174
222
|
yield cli_core_1.Util.processTemplates(templatePath, path.join(process.cwd(), argv.name), config, projTemplate.delimiters, false);
|
|
@@ -190,7 +238,7 @@ const command = {
|
|
|
190
238
|
}
|
|
191
239
|
cli_core_1.Util.log("");
|
|
192
240
|
cli_core_1.Util.log("Next Steps:");
|
|
193
|
-
cli_core_1.Util.log(` cd ${argv.name}`);
|
|
241
|
+
cli_core_1.Util.log(` cd ${cli_core_1.Util.quoteIfNeeded(argv.name)}`);
|
|
194
242
|
cli_core_1.Util.log(" ig add start guided mode for adding views to the app");
|
|
195
243
|
cli_core_1.Util.log(" ig start starts a web server and opens the app in the default browser");
|
|
196
244
|
});
|
package/lib/commands/types.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export interface PositionalArgs {
|
|
|
9
9
|
type?: string;
|
|
10
10
|
/** Which theme to use when creating a new project. */
|
|
11
11
|
theme?: string;
|
|
12
|
+
/** Blazor hosting model (Blazor projects only). */
|
|
13
|
+
hosting?: string;
|
|
14
|
+
/** Theme variant (Blazor projects only). */
|
|
15
|
+
variant?: string;
|
|
12
16
|
template?: string;
|
|
13
17
|
module?: string;
|
|
14
18
|
skipRoute?: boolean;
|
|
@@ -59,6 +59,7 @@ class IgniteUIForWebComponentsTemplate {
|
|
|
59
59
|
if (!(options && options.skipRoute) &&
|
|
60
60
|
cli_core_1.App.container.get(cli_core_1.FS_TOKEN).fileExists(routeModulePath)) {
|
|
61
61
|
const modulePath = `./${cli_core_1.Util.lowerDashed(fullName)}/${cli_core_1.Util.lowerDashed(fullName)}-routing`;
|
|
62
|
+
const componentTag = `app-${this.fileName(fullName)}`;
|
|
62
63
|
const child = {
|
|
63
64
|
identifierName: cli_core_1.ROUTES_VARIABLE_NAME,
|
|
64
65
|
aliasName: options.routerChildren,
|
|
@@ -67,7 +68,7 @@ class IgniteUIForWebComponentsTemplate {
|
|
|
67
68
|
if (defaultPath) {
|
|
68
69
|
routingModule.addRoute({
|
|
69
70
|
path: "",
|
|
70
|
-
redirectTo:
|
|
71
|
+
redirectTo: componentTag,
|
|
71
72
|
name: cli_core_1.Util.nameFromPath(fullName)
|
|
72
73
|
});
|
|
73
74
|
if (options.hasChildren) {
|
|
@@ -76,7 +77,7 @@ class IgniteUIForWebComponentsTemplate {
|
|
|
76
77
|
}
|
|
77
78
|
routingModule.addRoute({
|
|
78
79
|
path: this.fileName(fullName),
|
|
79
|
-
identifierName:
|
|
80
|
+
identifierName: componentTag,
|
|
80
81
|
name: cli_core_1.Util.nameFromPath(fullName)
|
|
81
82
|
}, false // multiline
|
|
82
83
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.4.1-beta.0",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"all": true
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@igniteui/angular-templates": "~22.0.
|
|
70
|
-
"@igniteui/cli-core": "~15.
|
|
71
|
-
"@igniteui/mcp-server": "~15.
|
|
69
|
+
"@igniteui/angular-templates": "~22.0.1541-beta.0",
|
|
70
|
+
"@igniteui/cli-core": "~15.4.1-beta.0",
|
|
71
|
+
"@igniteui/mcp-server": "~15.4.1-beta.0",
|
|
72
72
|
"@inquirer/prompts": "^7.9.0",
|
|
73
73
|
"chalk": "^5.3.0",
|
|
74
74
|
"glob": "^11.0.0",
|
|
@@ -6,7 +6,7 @@ class IgbBlazorProjectLibrary extends cli_core_1.BaseProjectLibrary {
|
|
|
6
6
|
super(__dirname);
|
|
7
7
|
this.name = "Ignite UI for Blazor";
|
|
8
8
|
this.projectType = "igb";
|
|
9
|
-
this.themes = ["
|
|
9
|
+
this.themes = ["bootstrap", "material", "fluent", "indigo"];
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
module.exports = new IgbBlazorProjectLibrary();
|
|
@@ -265,12 +265,14 @@ Apply different sizing to a specific grid:
|
|
|
265
265
|
|
|
266
266
|
## Key Rules
|
|
267
267
|
|
|
268
|
-
1. **
|
|
269
|
-
2. **
|
|
270
|
-
3. **
|
|
271
|
-
4. **
|
|
272
|
-
5.
|
|
273
|
-
6.
|
|
274
|
-
7.
|
|
275
|
-
8.
|
|
276
|
-
9. **
|
|
268
|
+
1. **Do not add column `Width` unless explicitly requested** — omitting `Width` causes the grid to distribute available space proportionally across all columns, producing a responsive layout with no empty space. Only set explicit pixel or percentage widths when the user specifically asks for fixed column sizing.
|
|
269
|
+
2. **If any column has a specified `Width`, leave at least one column without `Width`** - so it fills the remaining space in the grid.
|
|
270
|
+
3. **Always set `Height` for performance** - without it, virtualization is disabled and all rows render to the DOM.
|
|
271
|
+
4. **Percentage height needs a sized parent** - `Height="100%"` only works if the parent element has an explicit height.
|
|
272
|
+
5. **Box model is border-box** - column widths include padding and borders.
|
|
273
|
+
6. **Horizontal scroll triggers when columns overflow** - if total column width > grid width, a horizontal scrollbar appears.
|
|
274
|
+
7. **`MinWidth` and `MaxWidth` constrain resizing** - always set them when `Resizable="true"` for predictable UX.
|
|
275
|
+
8. **`--ig-size` controls the overall density** - it affects row height, cell padding, header height, and internal spacing.
|
|
276
|
+
9. **Column virtualization works without explicit per-column widths** — when no `Width` is set on a column, the grid distributes available space across all columns (minimum 136px per column). If columns cannot fit at that minimum, a horizontal scrollbar appears and horizontal virtualization activates automatically. You can also set a grid-level default with `ColumnWidth` on `IgbGrid` instead of setting per-column widths. Only set per-column `Width` when a specific column needs a fixed or percentage size.
|
|
277
|
+
10. **Auto-size is a one-time operation** - `Width="auto"` on a column fits content at initial render; it doesn't update dynamically as data changes.
|
|
278
|
+
11. **Row height consistency** - all rows in a grid have the same height. Variable row height is not supported.
|
|
@@ -497,4 +497,5 @@ Or grid-wide:
|
|
|
497
497
|
4. **Registration is mandatory** - every grid module must be registered in `Program.cs` or the component silently fails to render.
|
|
498
498
|
5. **Use PascalCase for all parameters** - Blazor parameters use PascalCase (`Sortable`, `Filterable`), not kebab-case.
|
|
499
499
|
6. **Data must be a C# collection** - `List<T>`, `T[]`, or `IEnumerable<T>`. Not a JSON string or JavaScript object.
|
|
500
|
-
7. **Use `@ref` for programmatic access** - declare `private IgbGrid grid = default!;` and use `@ref="grid"` on the component.
|
|
500
|
+
7. **Use `@ref` for programmatic access** - declare `private IgbGrid grid = default!;` and use `@ref="grid"` on the component.
|
|
501
|
+
8. **Do not add column `Width` unless explicitly requested** - omitting `Width` lets the grid distribute available space proportionally, filling the container with no empty right-side gap. Only set pixel or percentage widths when the user specifically asks for fixed column sizing.
|
|
@@ -40,7 +40,7 @@ Columns are declared as child elements (`<IgbGridLiteColumn>`), not via a `Colum
|
|
|
40
40
|
<IgbGridLite TItem="Employee" Data="@employees">
|
|
41
41
|
<IgbGridLiteColumn Field="@nameof(Employee.Name)" Header="Name" DataType="GridLiteColumnDataType.String" Sortable Filterable Resizable />
|
|
42
42
|
<IgbGridLiteColumn Field="@nameof(Employee.Department)" Header="Department" Sortable />
|
|
43
|
-
<IgbGridLiteColumn Field="@nameof(Employee.Salary)" Header="Salary" DataType="GridLiteColumnDataType.Number"
|
|
43
|
+
<IgbGridLiteColumn Field="@nameof(Employee.Salary)" Header="Salary" DataType="GridLiteColumnDataType.Number" Sortable />
|
|
44
44
|
<IgbGridLiteColumn Field="@nameof(Employee.HireDate)" Header="Hire Date" DataType="GridLiteColumnDataType.Date" Sortable />
|
|
45
45
|
</IgbGridLite>
|
|
46
46
|
```
|
|
@@ -67,7 +67,7 @@ Columns are declared as child elements (`<IgbGridLiteColumn>`), not via a `Colum
|
|
|
67
67
|
```razor
|
|
68
68
|
<IgbGridLite TItem="ProductInfo" Data="@products" SortingOptions="@sortingOptions">
|
|
69
69
|
<IgbGridLiteColumn Field="Name" Header="Name" DataType="GridLiteColumnDataType.String" Sortable />
|
|
70
|
-
<IgbGridLiteColumn Field="Price" Header="Price" DataType="GridLiteColumnDataType.Number"
|
|
70
|
+
<IgbGridLiteColumn Field="Price" Header="Price" DataType="GridLiteColumnDataType.Number" Sortable />
|
|
71
71
|
</IgbGridLite>
|
|
72
72
|
|
|
73
73
|
@code {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ControlExtraConfiguration, ProjectTemplate, ScaffoldOptions } from "@igniteui/cli-core";
|
|
2
|
+
export declare class EmptyIgbProject implements ProjectTemplate {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
framework: string;
|
|
7
|
+
projectType: string;
|
|
8
|
+
dependencies: string[];
|
|
9
|
+
hasExtraConfiguration: boolean;
|
|
10
|
+
isHidden: boolean;
|
|
11
|
+
delimiters: import("@igniteui/cli-core").TemplateDelimiters;
|
|
12
|
+
templatePaths: string[];
|
|
13
|
+
private extraConfiguration;
|
|
14
|
+
getExtraConfiguration(): ControlExtraConfiguration[];
|
|
15
|
+
setExtraConfiguration(extraConfigKeys: {} | any[]): void;
|
|
16
|
+
scaffold(options: ScaffoldOptions): Promise<boolean>;
|
|
17
|
+
installModules(): void;
|
|
18
|
+
upgradeIgniteUIPackages(_projectPath: string, _packagePath: string): Promise<boolean>;
|
|
19
|
+
generateConfig(_name: string, _theme: string, ..._options: any[]): {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const _default: EmptyIgbProject;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmptyIgbProject = void 0;
|
|
4
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
5
|
+
class EmptyIgbProject {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.id = "empty";
|
|
8
|
+
this.name = "Blazor Web App";
|
|
9
|
+
this.description = "Ignite UI for Blazor Web App, scaffolded via the IgniteUI.Blazor.Templates package";
|
|
10
|
+
this.framework = "blazor";
|
|
11
|
+
this.projectType = "igb";
|
|
12
|
+
this.dependencies = [];
|
|
13
|
+
this.hasExtraConfiguration = true;
|
|
14
|
+
this.isHidden = false;
|
|
15
|
+
this.delimiters = cli_core_1.defaultDelimiters;
|
|
16
|
+
this.templatePaths = [];
|
|
17
|
+
this.extraConfiguration = {};
|
|
18
|
+
}
|
|
19
|
+
getExtraConfiguration() {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
choices: ["Server", "Wasm", "Auto"],
|
|
23
|
+
default: "Server",
|
|
24
|
+
key: "Hosting",
|
|
25
|
+
message: "Choose the hosting model:",
|
|
26
|
+
type: 0 /* ControlExtraConfigType.Choice */
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
choices: ["light", "dark"],
|
|
30
|
+
default: "light",
|
|
31
|
+
key: "Variant",
|
|
32
|
+
message: "Choose the theme variant:",
|
|
33
|
+
type: 0 /* ControlExtraConfigType.Choice */
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
setExtraConfiguration(extraConfigKeys) {
|
|
38
|
+
if (Array.isArray(extraConfigKeys)) {
|
|
39
|
+
// the wizard supplies answers positionally, matching getExtraConfiguration() order
|
|
40
|
+
const keys = this.getExtraConfiguration().map(c => c.key);
|
|
41
|
+
extraConfigKeys.forEach((value, i) => {
|
|
42
|
+
if (keys[i] !== undefined) {
|
|
43
|
+
this.extraConfiguration[keys[i]] = value;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.extraConfiguration = Object.assign(Object.assign({}, this.extraConfiguration), extraConfigKeys);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
scaffold(options) {
|
|
52
|
+
const extraConfig = Object.assign(Object.assign({}, this.extraConfiguration), options.extraConfig);
|
|
53
|
+
return Promise.resolve(cli_core_1.DotnetTemplateManager.scaffold(Object.assign(Object.assign({}, options), { extraConfig })));
|
|
54
|
+
}
|
|
55
|
+
// Unused — the host calls scaffold() instead of the generateConfig pipeline when scaffold exists.
|
|
56
|
+
installModules() {
|
|
57
|
+
throw new Error("Method not implemented.");
|
|
58
|
+
}
|
|
59
|
+
upgradeIgniteUIPackages(_projectPath, _packagePath) {
|
|
60
|
+
throw new Error("Method not implemented.");
|
|
61
|
+
}
|
|
62
|
+
generateConfig(_name, _theme, ..._options) {
|
|
63
|
+
throw new Error("Method not implemented.");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.EmptyIgbProject = EmptyIgbProject;
|
|
67
|
+
exports.default = new EmptyIgbProject();
|
|
@@ -2,50 +2,59 @@ import style from './style.module.css';
|
|
|
2
2
|
import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
|
|
3
3
|
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { employeesData } from './data';
|
|
6
6
|
|
|
7
7
|
export default function $(ClassName)() {
|
|
8
|
-
const title = '
|
|
8
|
+
const title = '$(name)';
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<div>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
11
|
+
<div className={style.page}>
|
|
12
|
+
<p className={style.title}>{title}</p>
|
|
13
|
+
<p className={style.subtitle}>
|
|
14
|
+
IgrGrid component with auto generated columns and local data.<br />
|
|
15
|
+
You can read more about configuring the IgrGrid component in the
|
|
16
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grids/data-grid.html" target="_blank" rel="noopener noreferrer">
|
|
17
|
+
official documentation
|
|
18
|
+
</a>.
|
|
19
|
+
</p>
|
|
20
|
+
<div className={style.grid}>
|
|
21
|
+
<IgrGrid data={employeesData} height="600px" width="100%">
|
|
22
|
+
<IgrColumn
|
|
23
|
+
field="EmployeeID"
|
|
24
|
+
header="Employee ID"
|
|
25
|
+
dataType="string">
|
|
26
|
+
</IgrColumn>
|
|
27
|
+
<IgrColumn
|
|
28
|
+
field="FirstName"
|
|
29
|
+
header="First Name"
|
|
30
|
+
dataType="string">
|
|
31
|
+
</IgrColumn>
|
|
32
|
+
<IgrColumn
|
|
33
|
+
field="LastName"
|
|
34
|
+
header="Last Name"
|
|
35
|
+
dataType="string">
|
|
36
|
+
</IgrColumn>
|
|
37
|
+
<IgrColumn
|
|
38
|
+
field="Country"
|
|
39
|
+
header="Country"
|
|
40
|
+
dataType="string">
|
|
41
|
+
</IgrColumn>
|
|
42
|
+
<IgrColumn
|
|
43
|
+
field="Age"
|
|
44
|
+
header="Age"
|
|
45
|
+
dataType="number">
|
|
46
|
+
</IgrColumn>
|
|
47
|
+
<IgrColumn
|
|
48
|
+
field="RegistererDate"
|
|
49
|
+
header="Registered Date"
|
|
50
|
+
dataType="date">
|
|
51
|
+
</IgrColumn>
|
|
52
|
+
<IgrColumn
|
|
53
|
+
field="IsActive"
|
|
54
|
+
header="Active"
|
|
55
|
+
dataType="boolean">
|
|
56
|
+
</IgrColumn>
|
|
57
|
+
</IgrGrid>
|
|
49
58
|
</div>
|
|
50
59
|
</div>
|
|
51
60
|
);
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
:local(.
|
|
2
|
-
|
|
1
|
+
:local(.page) {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin-top: 40px;
|
|
4
|
+
padding: 0 48px;
|
|
3
5
|
display: flex;
|
|
4
|
-
flex-
|
|
5
|
-
justify-content: center;
|
|
6
|
+
flex-direction: column;
|
|
6
7
|
align-items: center;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
:local(.title) {
|
|
10
11
|
color: rgb(0, 153, 255);
|
|
12
|
+
text-align: center;
|
|
13
|
+
font-size: 2.5rem;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:local(.subtitle) {
|
|
18
|
+
text-align: center;
|
|
19
|
+
margin-bottom: 32px;
|
|
20
|
+
margin-top: 16px;
|
|
21
|
+
font-size: 14px;
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
:local(.grid) {
|
|
14
|
-
width:
|
|
15
|
-
|
|
16
|
-
border: 1px solid rgb(0, 153, 255);
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 1200px;
|
|
17
27
|
}
|
|
@@ -1,7 +1,32 @@
|
|
|
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 IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
27
|
const constants_1 = require("../../constants");
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const SHARED_DATA_ROOT = path.join(path.dirname(require.resolve("@igniteui/angular-templates/package.json")), "shared-data");
|
|
5
30
|
class GridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
6
31
|
/**
|
|
7
32
|
*
|
|
@@ -18,5 +43,11 @@ class GridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
|
18
43
|
this.packages = [constants_1.IGNITEUI_REACT_GRIDS_PACKAGE];
|
|
19
44
|
this.hasExtraConfiguration = false;
|
|
20
45
|
}
|
|
46
|
+
get templatePaths() {
|
|
47
|
+
return [
|
|
48
|
+
...super.templatePaths,
|
|
49
|
+
path.join(SHARED_DATA_ROOT, "grid", "files")
|
|
50
|
+
];
|
|
51
|
+
}
|
|
21
52
|
}
|
|
22
53
|
module.exports = new GridTemplate();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { beforeAll, expect, test } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import $(ClassName) from './$(path)';
|
|
4
|
+
import { setupTestMocks } from '../../setupTests';
|
|
5
|
+
|
|
6
|
+
beforeAll(() => {
|
|
7
|
+
setupTestMocks();
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
test('renders $(ClassName) component', () => {
|
|
11
|
+
const wrapper = render(<$(ClassName) />);
|
|
12
|
+
expect(wrapper).toBeTruthy();
|
|
13
|
+
});
|
package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.tsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import style from './style.module.css';
|
|
2
|
+
import { IgrHierarchicalGrid, IgrRowIsland, IgrColumn } from 'igniteui-react-grids';
|
|
3
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
|
|
4
|
+
|
|
5
|
+
import { ARTISTS } from './data';
|
|
6
|
+
|
|
7
|
+
export default function $(ClassName)() {
|
|
8
|
+
const title = '$(name)';
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className={style.page}>
|
|
12
|
+
<p className={style.title}>{title}</p>
|
|
13
|
+
<p className={style.subtitle}>
|
|
14
|
+
IgrHierarchicalGrid with basic configuration.<br />
|
|
15
|
+
You can read more about configuring the IgrHierarchicalGrid component in the
|
|
16
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grids/hierarchical-grid/overview.html" target="_blank" rel="noopener noreferrer">
|
|
17
|
+
official documentation
|
|
18
|
+
</a>.
|
|
19
|
+
</p>
|
|
20
|
+
<div className={style.grid}>
|
|
21
|
+
<IgrHierarchicalGrid data={ARTISTS} primaryKey="Artist" autoGenerate={false} height="600px" width="100%">
|
|
22
|
+
<IgrColumn field="Artist" dataType="string" />
|
|
23
|
+
<IgrColumn field="HasGrammyAward" header="Has Grammy Award" dataType="boolean" />
|
|
24
|
+
<IgrColumn field="Debut" dataType="number" />
|
|
25
|
+
<IgrColumn field="GrammyNominations" header="Grammy Nominations" dataType="number" />
|
|
26
|
+
<IgrColumn field="GrammyAwards" header="Grammy Awards" dataType="number" />
|
|
27
|
+
<IgrRowIsland childDataKey="Albums" primaryKey="Album" autoGenerate={false}>
|
|
28
|
+
<IgrColumn field="Album" dataType="string" />
|
|
29
|
+
<IgrColumn field="LaunchDate" header="Launch Date" dataType="date" />
|
|
30
|
+
<IgrColumn field="BillboardReview" header="Billboard Review" dataType="number" />
|
|
31
|
+
<IgrColumn field="USBillboard200" header="US Billboard 200" dataType="number" />
|
|
32
|
+
<IgrRowIsland childDataKey="Songs" primaryKey="TrackNumber" autoGenerate={false}>
|
|
33
|
+
<IgrColumn field="TrackNumber" header="Track" dataType="string" />
|
|
34
|
+
<IgrColumn field="Title" dataType="string" />
|
|
35
|
+
<IgrColumn field="Released" dataType="string" />
|
|
36
|
+
<IgrColumn field="Genre" dataType="string" />
|
|
37
|
+
</IgrRowIsland>
|
|
38
|
+
</IgrRowIsland>
|
|
39
|
+
</IgrHierarchicalGrid>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
package/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/style.module.css
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
:local(.page) {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin-top: 40px;
|
|
4
|
+
padding: 0 48px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:local(.title) {
|
|
11
|
+
color: rgb(0, 153, 255);
|
|
12
|
+
text-align: center;
|
|
13
|
+
font-size: 2.5rem;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:local(.subtitle) {
|
|
18
|
+
text-align: center;
|
|
19
|
+
margin-bottom: 32px;
|
|
20
|
+
margin-top: 16px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:local(.grid) {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 1200px;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|