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
|
@@ -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 {};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
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");
|
|
30
|
+
class HierarchicalGridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(__dirname);
|
|
33
|
+
this.id = "hierarchical-grid";
|
|
34
|
+
this.name = "Hierarchical Grid";
|
|
35
|
+
this.widget = "igHierarchicalGrid";
|
|
36
|
+
this.description = "IgrHierarchicalGrid template for React";
|
|
37
|
+
this.projectType = "igr-ts";
|
|
38
|
+
this.components = ["Hierarchical Grid"];
|
|
39
|
+
this.controlGroup = "Data Grids";
|
|
40
|
+
this.packages = [constants_1.IGNITEUI_REACT_GRIDS_PACKAGE];
|
|
41
|
+
this.hasExtraConfiguration = false;
|
|
42
|
+
}
|
|
43
|
+
get templatePaths() {
|
|
44
|
+
return [
|
|
45
|
+
...super.templatePaths,
|
|
46
|
+
path.join(SHARED_DATA_ROOT, "hierarchical-grid", "files")
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
module.exports = new HierarchicalGridTemplate();
|
|
@@ -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 IgrTsHierarchicalGridComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.name = "Hierarchical Grid";
|
|
8
|
+
this.group = "Grids & Lists";
|
|
9
|
+
this.description = "IgrHierarchicalGrid component for React";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
module.exports = new IgrTsHierarchicalGridComponent();
|
package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx
ADDED
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import style from './style.module.css';
|
|
2
|
+
import { IgrPivotGrid } from 'igniteui-react-grids';
|
|
3
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
|
|
4
|
+
|
|
5
|
+
import { DATA } from './data';
|
|
6
|
+
|
|
7
|
+
export default function $(ClassName)() {
|
|
8
|
+
const title = '$(name)';
|
|
9
|
+
|
|
10
|
+
const pivotConfiguration = {
|
|
11
|
+
columns: [
|
|
12
|
+
{
|
|
13
|
+
memberName: 'Product',
|
|
14
|
+
memberFunction: (data: any) => data.Product.Name,
|
|
15
|
+
enabled: true
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
rows: [
|
|
19
|
+
{
|
|
20
|
+
memberName: 'Seller',
|
|
21
|
+
memberFunction: (data: any) => data.Seller.Name,
|
|
22
|
+
enabled: true
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
values: [
|
|
26
|
+
{
|
|
27
|
+
member: 'NumberOfUnits',
|
|
28
|
+
aggregate: {
|
|
29
|
+
aggregatorName: 'SUM',
|
|
30
|
+
key: 'sum',
|
|
31
|
+
label: 'Sum'
|
|
32
|
+
},
|
|
33
|
+
enabled: true
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
filters: null
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className={style.page}>
|
|
41
|
+
<p className={style.title}>{title}</p>
|
|
42
|
+
<p className={style.subtitle}>
|
|
43
|
+
Basic IgrPivotGrid component.<br />
|
|
44
|
+
You can read more about configuring the IgrPivotGrid component in the
|
|
45
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grids/pivot-grid/overview.html" target="_blank" rel="noopener noreferrer">
|
|
46
|
+
official documentation
|
|
47
|
+
</a>.
|
|
48
|
+
</p>
|
|
49
|
+
<div className={style.grid}>
|
|
50
|
+
<IgrPivotGrid data={DATA} pivotConfiguration={pivotConfiguration} height="650px" width="100%" />
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -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 {};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
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");
|
|
30
|
+
class PivotGridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(__dirname);
|
|
33
|
+
this.id = "pivot-grid";
|
|
34
|
+
this.name = "Pivot Grid";
|
|
35
|
+
this.widget = "igPivotGrid";
|
|
36
|
+
this.description = "IgrPivotGrid template for React";
|
|
37
|
+
this.projectType = "igr-ts";
|
|
38
|
+
this.components = ["Pivot Grid"];
|
|
39
|
+
this.controlGroup = "Data Grids";
|
|
40
|
+
this.packages = [constants_1.IGNITEUI_REACT_GRIDS_PACKAGE];
|
|
41
|
+
this.hasExtraConfiguration = false;
|
|
42
|
+
}
|
|
43
|
+
get templatePaths() {
|
|
44
|
+
return [
|
|
45
|
+
...super.templatePaths,
|
|
46
|
+
path.join(SHARED_DATA_ROOT, "pivot-grid", "files")
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
module.exports = new PivotGridTemplate();
|
|
@@ -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 IgrTsPivotGridComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.name = "Pivot Grid";
|
|
8
|
+
this.group = "Grids & Lists";
|
|
9
|
+
this.description = "IgrPivotGrid component for React";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
module.exports = new IgrTsPivotGridComponent();
|