igniteui-cli 9.0.6 → 9.1.0-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/commands/start.js +11 -9
- package/lib/templates/IgniteUIForWebComponentsTemplate.js +3 -2
- package/package.json +3 -3
- package/templates/webcomponents/TypeScriptFileUpdate.js +1 -1
- package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/badge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -2
- package/templates/webcomponents/igc-ts/badge/default/files/src/app/__path__/__filePrefix__.ts +21 -19
- package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -2
- package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/calendar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/calendar/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.ts +47 -45
- package/templates/webcomponents/igc-ts/checkbox/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/checkbox/default/files/src/app/__path__/__filePrefix__.ts +11 -10
- package/templates/webcomponents/igc-ts/custom-templates/subscription-form/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/custom-templates/subscription-form/files/src/app/__path__/__filePrefix__.ts +36 -36
- package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/__filePrefix__.ts +53 -53
- package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/StockIndexData.ts +994 -126
- package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.ts +19 -20
- package/templates/webcomponents/igc-ts/form/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/form/default/files/src/app/__path__/__filePrefix__.ts +14 -13
- package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.ts +34 -35
- package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts +25 -26
- package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/__filePrefix__.ts +17 -21
- package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.ts +11 -10
- package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.ts +10 -9
- package/templates/webcomponents/igc-ts/input/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/input/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/linear-gauge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/linear-gauge/default/files/src/app/__path__/__filePrefix__.ts +26 -26
- package/templates/webcomponents/igc-ts/list/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/list/default/files/src/app/__path__/__filePrefix__.ts +7 -6
- package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/__filePrefix__.ts +17 -9
- package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.ts +19 -19
- package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/sampleData.ts +28 -23
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/__dot__editorconfig +0 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/__dot__gitignore +0 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/ignite-ui-cli.json +2 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/index.html +17 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/package.json +22 -22
- package/templates/webcomponents/igc-ts/projects/_base/files/rollup.config.mjs +90 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app-routing.ts +11 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.ts +32 -0
- package/templates/webcomponents/igc-ts/projects/{empty/files/src/app/home/home.component.test.ts → _base/files/src/app/home/home.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/projects/{empty/files/src/app/home/home.component.ts → _base/files/src/app/home/home.ts} +17 -15
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/not-found/not-found.ts +11 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/src/assets/astronaut-components.svg +0 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/index.ts +2 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/styles.css +5 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/tsconfig.json +31 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-dev-server.config.mjs +0 -0
- package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-test-runner.config.mjs +0 -0
- package/templates/webcomponents/igc-ts/projects/_base/index.d.ts +19 -0
- package/templates/webcomponents/igc-ts/projects/_base/index.js +56 -0
- package/templates/webcomponents/igc-ts/projects/empty/index.d.ts +14 -1
- package/templates/webcomponents/igc-ts/projects/empty/index.js +10 -43
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +57 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/index.d.ts +14 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/index.js +21 -0
- package/templates/webcomponents/igc-ts/radial-gauge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/radial-gauge/default/files/src/app/__path__/__filePrefix__.ts +13 -13
- package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/__filePrefix__.ts +6 -6
- package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
- package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/__filePrefix__.ts +6 -5
- package/templates/webcomponents/igc-ts/projects/empty/files/index.html +0 -43
- package/templates/webcomponents/igc-ts/projects/empty/files/src/app/not-found/not-found.component.ts +0 -9
- package/templates/webcomponents/igc-ts/projects/empty/files/src/app.ts +0 -46
- package/templates/webcomponents/igc-ts/projects/empty/files/src/index.ts +0 -16
- package/templates/webcomponents/igc-ts/projects/empty/files/tsconfig.json +0 -31
- package/templates/webcomponents/igc-ts/projects/empty/files/webpack.config.mjs +0 -67
package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcIconComponent,
|
|
@@ -5,24 +7,32 @@ import {
|
|
|
5
7
|
} from 'igniteui-webcomponents';
|
|
6
8
|
import {
|
|
7
9
|
registerIcon,
|
|
8
|
-
} from
|
|
10
|
+
} from 'igniteui-webcomponents/components/icon/icon.registry';
|
|
9
11
|
|
|
10
12
|
defineComponents(IgcIconComponent, IgcNavbarComponent);
|
|
11
13
|
|
|
12
14
|
registerIcon(
|
|
13
15
|
'home',
|
|
14
|
-
'https://unpkg.com/material-design-icons@3.0.1/action/svg/production/ic_home_24px.svg'
|
|
16
|
+
'https://unpkg.com/material-design-icons@3.0.1/action/svg/production/ic_home_24px.svg',
|
|
15
17
|
);
|
|
16
18
|
|
|
17
19
|
registerIcon(
|
|
18
20
|
'search',
|
|
19
|
-
'https://unpkg.com/material-design-icons@3.0.1/action/svg/production/ic_search_24px.svg'
|
|
21
|
+
'https://unpkg.com/material-design-icons@3.0.1/action/svg/production/ic_search_24px.svg',
|
|
20
22
|
);
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
@customElement('app-$(path)')
|
|
26
|
+
export default class $(ClassName) extends LitElement {
|
|
27
|
+
static styles = css`
|
|
28
|
+
igc-navbar {
|
|
29
|
+
width:100%;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
render() {
|
|
34
|
+
return html`
|
|
35
|
+
<igc-navbar>
|
|
26
36
|
<igc-icon slot="start" name="home"></igc-icon>
|
|
27
37
|
<h2>Home</h2>
|
|
28
38
|
<igc-icon slot="end" name="search"></igc-icon>
|
|
@@ -30,5 +40,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
30
40
|
`;
|
|
31
41
|
}
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
2
3
|
import {
|
|
3
4
|
IgcItemLegendComponent,
|
|
4
5
|
IgcItemLegendModule,
|
|
@@ -6,25 +7,26 @@ import {
|
|
|
6
7
|
IgcPieChartModule,
|
|
7
8
|
} from 'igniteui-webcomponents-charts';
|
|
8
9
|
import { ModuleManager } from 'igniteui-webcomponents-core';
|
|
10
|
+
import { Data } from './sampleData.js';
|
|
9
11
|
|
|
10
12
|
ModuleManager.register(
|
|
11
13
|
IgcItemLegendModule,
|
|
12
14
|
IgcPieChartModule,
|
|
13
15
|
);
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
@customElement('app-$(path)')
|
|
18
|
+
export default class $(ClassName) extends LitElement {
|
|
19
|
+
static styles = css`
|
|
20
|
+
:host, igc-pie-chart {
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
.container {
|
|
24
|
+
height: 60%;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
render() {
|
|
29
|
+
return html`
|
|
28
30
|
<div class="legend-title">
|
|
29
31
|
Global Electricity Demand by Energy Use
|
|
30
32
|
</div>
|
|
@@ -48,11 +50,9 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
48
50
|
`;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
const chart =
|
|
53
|
+
firstUpdated() {
|
|
54
|
+
const chart = this.shadowRoot?.getElementById('chart') as IgcPieChartComponent;
|
|
53
55
|
chart.dataSource = new Data();
|
|
54
|
-
chart.legend =
|
|
56
|
+
chart.legend = this.shadowRoot?.getElementById('legend') as IgcItemLegendComponent;
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
|
|
58
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/sampleData.ts
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
export class DataItem {
|
|
2
2
|
public constructor(init: Partial<DataItem>) {
|
|
3
|
-
|
|
3
|
+
Object.assign(this, init);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
public marketShare: number = 0;
|
|
7
|
-
public category: string = '';
|
|
8
7
|
|
|
8
|
+
public category: string = '';
|
|
9
9
|
}
|
|
10
10
|
export class Data extends Array<DataItem> {
|
|
11
11
|
public constructor() {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
super();
|
|
13
|
+
this.push(new DataItem(
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
15
|
+
marketShare: 37,
|
|
16
|
+
category: 'Cooling',
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
this.push(new DataItem(
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
21
|
+
marketShare: 25,
|
|
22
|
+
category: 'Residential',
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
this.push(new DataItem(
|
|
24
26
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
27
|
+
marketShare: 12,
|
|
28
|
+
category: 'Heating',
|
|
29
|
+
}
|
|
30
|
+
));
|
|
31
|
+
this.push(new DataItem(
|
|
29
32
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
33
|
+
marketShare: 11,
|
|
34
|
+
category: 'Lighting',
|
|
35
|
+
}
|
|
36
|
+
));
|
|
37
|
+
this.push(new DataItem(
|
|
34
38
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
39
|
+
marketShare: 15,
|
|
40
|
+
category: 'Other',
|
|
41
|
+
}
|
|
42
|
+
));
|
|
38
43
|
}
|
|
39
44
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en-GB">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<base href="/">
|
|
7
|
+
<title>Ignite UI for Web Components</title>
|
|
8
|
+
<link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/bootstrap.css">
|
|
9
|
+
<link rel="stylesheet" href="./styles.css">
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<app-root></app-root>
|
|
14
|
+
|
|
15
|
+
<script type="module" src="./dist/src/index.js"></script>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "$(
|
|
2
|
+
"name": "$(dashName)",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "WebComponents project for Ignite UI CLI",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": "./dist/src/index.js",
|
|
13
|
-
"./$(
|
|
13
|
+
"./$(dashName).js": "./dist/src/$(dashName).js"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"start": "tsc && concurrently
|
|
17
|
-
"build": "
|
|
16
|
+
"start": "tsc && concurrently -k -r \"tsc --watch\" \"wds\"",
|
|
17
|
+
"build": "rimraf dist && tsc && rollup -c rollup.config.mjs",
|
|
18
|
+
"start:build": "web-dev-server --root-dir dist --app-index index.html --open",
|
|
18
19
|
"lint": "eslint --ext .js,.ts,.html . --ignore-path .gitignore",
|
|
19
20
|
"test": "tsc && wtr"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@open-wc/testing": "^2.5.33",
|
|
23
23
|
"@vaadin/router": "^1.7.4",
|
|
24
24
|
"igniteui-webcomponents": "2.0.0",
|
|
25
25
|
"igniteui-webcomponents-grids": "~1.4.1",
|
|
@@ -31,33 +31,33 @@
|
|
|
31
31
|
"igniteui-dockmanager": "~1.6.0",
|
|
32
32
|
"@igniteui/material-icons-extended": "^2.10.0",
|
|
33
33
|
"lit": "^2.0.2",
|
|
34
|
-
"typescript": "^4.5.2"
|
|
35
|
-
"babel-runtime": "^6.26.0"
|
|
34
|
+
"typescript": "^4.5.2"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
37
|
+
"@babel/preset-env": "^7.16.4",
|
|
38
|
+
"@open-wc/testing": "^2.5.33",
|
|
39
|
+
"@open-wc/building-rollup": "^2.0.1",
|
|
40
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
42
|
+
"rollup-plugin-copy-assets": "^2.0.3",
|
|
38
43
|
"@open-wc/eslint-config": "^4.3.0",
|
|
39
44
|
"@typescript-eslint/eslint-plugin": "^4.30.0",
|
|
40
45
|
"@typescript-eslint/parser": "^4.30.0",
|
|
41
46
|
"@web/dev-server": "^0.1.22",
|
|
47
|
+
"@web/rollup-plugin-html": "^1.10.1",
|
|
48
|
+
"@web/rollup-plugin-import-meta-assets": "^1.0.7",
|
|
49
|
+
"babel-plugin-template-html-minifier": "^4.1.0",
|
|
42
50
|
"@web/test-runner": "next",
|
|
43
|
-
"igniteui-cli": "
|
|
51
|
+
"igniteui-cli": "~$(cliVersion)",
|
|
44
52
|
"concurrently": "^6.3.0",
|
|
53
|
+
"deepmerge": "^4.2.2",
|
|
54
|
+
"rimraf": "^3.0.2",
|
|
55
|
+
"rollup": "^2.60.0",
|
|
56
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
57
|
+
"rollup-plugin-workbox": "^6.2.0",
|
|
45
58
|
"eslint": "^7.32.0",
|
|
46
59
|
"tslib": "^2.3.1",
|
|
47
|
-
"
|
|
48
|
-
"@babel/core": "^7.16.0",
|
|
49
|
-
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
50
|
-
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
51
|
-
"@babel/preset-env": "^7.16.4",
|
|
52
|
-
"@babel/preset-typescript": "^7.16.0",
|
|
53
|
-
"@types/source-map": "^0.5.7",
|
|
54
|
-
"babel-loader": "^8.2.3",
|
|
55
|
-
"babel-plugin-transform-custom-element-classes": "^0.1.0",
|
|
56
|
-
"fork-ts-checker-webpack-plugin": "^6.4.2",
|
|
57
|
-
"html-webpack-plugin": "^5.5.0",
|
|
58
|
-
"source-map": "^0.7.3",
|
|
59
|
-
"webpack": "^5.64.2",
|
|
60
|
-
"webpack-cli": "^4.9.1"
|
|
60
|
+
"source-map": "^0.7.3"
|
|
61
61
|
},
|
|
62
62
|
"eslintConfig": {
|
|
63
63
|
"parser": "@typescript-eslint/parser",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import babel from '@rollup/plugin-babel';
|
|
3
|
+
import copy from 'rollup-plugin-copy-assets';
|
|
4
|
+
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
|
|
5
|
+
import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets';
|
|
6
|
+
import { terser } from 'rollup-plugin-terser';
|
|
7
|
+
import { generateSW } from 'rollup-plugin-workbox';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
input: 'index.html',
|
|
12
|
+
output: {
|
|
13
|
+
entryFileNames: '[hash].js',
|
|
14
|
+
chunkFileNames: '[hash].js',
|
|
15
|
+
assetFileNames: '[hash][extname]',
|
|
16
|
+
format: 'es',
|
|
17
|
+
dir: 'dist',
|
|
18
|
+
},
|
|
19
|
+
preserveEntrySignatures: false,
|
|
20
|
+
|
|
21
|
+
plugins: [
|
|
22
|
+
copy({
|
|
23
|
+
assets: [
|
|
24
|
+
'src/assets',
|
|
25
|
+
],
|
|
26
|
+
}),
|
|
27
|
+
/** Enable using HTML as rollup entrypoint */
|
|
28
|
+
html({
|
|
29
|
+
minify: true,
|
|
30
|
+
injectServiceWorker: true,
|
|
31
|
+
serviceWorkerPath: 'dist/sw.js',
|
|
32
|
+
}),
|
|
33
|
+
/** Resolve bare module imports */
|
|
34
|
+
nodeResolve(),
|
|
35
|
+
/** Minify JS */
|
|
36
|
+
terser(),
|
|
37
|
+
/** Bundle assets references via import.meta.url */
|
|
38
|
+
importMetaAssets(),
|
|
39
|
+
/** Compile JS to a lower language target */
|
|
40
|
+
babel.babel({
|
|
41
|
+
babelHelpers: 'bundled',
|
|
42
|
+
presets: [
|
|
43
|
+
[
|
|
44
|
+
'@babel/preset-env',
|
|
45
|
+
{
|
|
46
|
+
targets: [
|
|
47
|
+
'last 3 Chrome major versions',
|
|
48
|
+
'last 3 Firefox major versions',
|
|
49
|
+
'last 3 Edge major versions',
|
|
50
|
+
'last 3 Safari major versions',
|
|
51
|
+
],
|
|
52
|
+
modules: false,
|
|
53
|
+
bugfixes: true,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
],
|
|
57
|
+
plugins: [
|
|
58
|
+
[
|
|
59
|
+
'babel-plugin-template-html-minifier',
|
|
60
|
+
{
|
|
61
|
+
modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] },
|
|
62
|
+
failOnError: false,
|
|
63
|
+
strictCSS: true,
|
|
64
|
+
htmlMinifier: {
|
|
65
|
+
collapseWhitespace: true,
|
|
66
|
+
conservativeCollapse: true,
|
|
67
|
+
removeComments: true,
|
|
68
|
+
caseSensitive: true,
|
|
69
|
+
minifyCSS: true,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
],
|
|
74
|
+
}),
|
|
75
|
+
/** Create and inject a service worker */
|
|
76
|
+
generateSW({
|
|
77
|
+
globIgnores: ['polyfills/*.js', 'nomodule-*.js'],
|
|
78
|
+
navigateFallback: '/index.html',
|
|
79
|
+
// where to output the generated sw
|
|
80
|
+
swDest: path.join('dist', 'sw.js'),
|
|
81
|
+
// directory to match patterns against to be precached
|
|
82
|
+
globDirectory: path.join('dist'),
|
|
83
|
+
// cache any html js and css by default
|
|
84
|
+
globPatterns: ['**/*.{html,js,css,webmanifest}'],
|
|
85
|
+
skipWaiting: true,
|
|
86
|
+
clientsClaim: true,
|
|
87
|
+
runtimeCaching: [{ urlPattern: 'polyfills/*.js', handler: 'CacheFirst' }],
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Route
|
|
3
|
+
} from '@vaadin/router';
|
|
4
|
+
import './home/home.js';
|
|
5
|
+
import './not-found/not-found.js';
|
|
6
|
+
|
|
7
|
+
export const routes: Route[] = [
|
|
8
|
+
{ path: '/', component: 'app-home', name: 'Home' },
|
|
9
|
+
// The fallback route should always be after other alternatives.
|
|
10
|
+
{ path: '(.*)', component: 'app-not-found' },
|
|
11
|
+
];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import { Router, } from '@vaadin/router';
|
|
4
|
+
import { routes } from './app-routing.js';
|
|
5
|
+
|
|
6
|
+
@customElement('app-root')
|
|
7
|
+
export class App extends LitElement {
|
|
8
|
+
static styles = css`
|
|
9
|
+
router-outlet {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
display: flex;
|
|
13
|
+
text-align: center;
|
|
14
|
+
flex-flow: column nowrap;
|
|
15
|
+
justify-content: stretch;
|
|
16
|
+
align-items: center;
|
|
17
|
+
overflow: inherit;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return html`
|
|
23
|
+
<router-outlet></router-outlet>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
firstUpdated() {
|
|
28
|
+
const outlet = this.shadowRoot?.querySelector('router-outlet');
|
|
29
|
+
const router = new Router(outlet);
|
|
30
|
+
router.setRoutes(routes);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
this.innerHTML = `
|
|
4
|
-
<style>
|
|
5
|
-
p {
|
|
6
|
-
margin: 0px 0px 8px 0px;
|
|
7
|
-
}
|
|
8
|
-
img {
|
|
9
|
-
margin-bottom: 48px;
|
|
10
|
-
max-height: 480px;
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
14
3
|
|
|
4
|
+
@customElement('app-home')
|
|
5
|
+
export class HomeComponent extends LitElement {
|
|
6
|
+
static styles = css`
|
|
7
|
+
p {
|
|
8
|
+
margin: 0px 0px 8px 0px;
|
|
9
|
+
}
|
|
10
|
+
img {
|
|
11
|
+
margin-bottom: 48px;
|
|
12
|
+
max-height: 480px;
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
return html`
|
|
15
19
|
<h1>Welcome to Ignite UI for Web Components!</h1>
|
|
16
20
|
<h4>A complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.</h4>
|
|
17
21
|
<img src="./src/assets/astronaut-components.svg" alt="indigoDesign">
|
|
@@ -35,5 +39,3 @@ export class HomeComponent extends HTMLElement {
|
|
|
35
39
|
`;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
|
|
39
|
-
customElements.define('app-home', HomeComponent);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
|
|
4
|
+
@customElement('app-not-found')
|
|
5
|
+
export default class NotFound extends LitElement {
|
|
6
|
+
render() {
|
|
7
|
+
return html`
|
|
8
|
+
<h2>Error 404: Page not found</h2>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2018",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"noEmitOnError": true,
|
|
7
|
+
"lib": [
|
|
8
|
+
"es2017",
|
|
9
|
+
"dom",
|
|
10
|
+
"dom.iterable"
|
|
11
|
+
],
|
|
12
|
+
"strict": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"esModuleInterop": false,
|
|
15
|
+
"allowSyntheticDefaultImports": true,
|
|
16
|
+
"experimentalDecorators": true,
|
|
17
|
+
"importHelpers": true,
|
|
18
|
+
"outDir": "dist",
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"inlineSources": true,
|
|
21
|
+
"rootDir": "./",
|
|
22
|
+
"declaration": true,
|
|
23
|
+
"incremental": true
|
|
24
|
+
},
|
|
25
|
+
"exclude": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"include": [
|
|
29
|
+
"**/*.ts"
|
|
30
|
+
]
|
|
31
|
+
}
|
package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-dev-server.config.mjs
RENAMED
|
File without changes
|
package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-test-runner.config.mjs
RENAMED
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ControlExtraConfiguration, ProjectTemplate } from "@igniteui/cli-core";
|
|
2
|
+
export declare class BaseIgcProject implements ProjectTemplate {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
dependencies: string[];
|
|
7
|
+
framework: string;
|
|
8
|
+
projectType: string;
|
|
9
|
+
hasExtraConfiguration: boolean;
|
|
10
|
+
delimiters: import("@igniteui/cli-core").TemplateDelimiters;
|
|
11
|
+
get templatePaths(): string[];
|
|
12
|
+
installModules(): void;
|
|
13
|
+
upgradeIgniteUIPackages(projectPath: string, packagePath: string): Promise<boolean>;
|
|
14
|
+
getExtraConfiguration(): ControlExtraConfiguration[];
|
|
15
|
+
setExtraConfiguration(extraConfigKeys: any[]): void;
|
|
16
|
+
generateConfig(name: string, theme: string, ...options: any[]): {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseIgcProject = void 0;
|
|
13
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
class BaseIgcProject {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.id = "base";
|
|
18
|
+
this.name = "base";
|
|
19
|
+
this.description = "Empty project layout structure for Ignite UI for Web Components";
|
|
20
|
+
this.dependencies = [];
|
|
21
|
+
this.framework = "webcomponents";
|
|
22
|
+
this.projectType = "igc-ts";
|
|
23
|
+
this.hasExtraConfiguration = false;
|
|
24
|
+
this.delimiters = cli_core_1.defaultDelimiters;
|
|
25
|
+
}
|
|
26
|
+
get templatePaths() {
|
|
27
|
+
return [path.join(__dirname, "files")];
|
|
28
|
+
}
|
|
29
|
+
installModules() {
|
|
30
|
+
throw new Error("Method not implemented.");
|
|
31
|
+
}
|
|
32
|
+
upgradeIgniteUIPackages(projectPath, packagePath) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
throw new Error("Method not implemented.");
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
getExtraConfiguration() {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
setExtraConfiguration(extraConfigKeys) { }
|
|
41
|
+
generateConfig(name, theme, ...options) {
|
|
42
|
+
const config = {
|
|
43
|
+
name,
|
|
44
|
+
theme,
|
|
45
|
+
cliVersion: cli_core_1.Util.version(),
|
|
46
|
+
CustomTheme: "",
|
|
47
|
+
dashName: cli_core_1.Util.lowerDashed(name),
|
|
48
|
+
DefaultTheme: "",
|
|
49
|
+
dot: ".",
|
|
50
|
+
path: name,
|
|
51
|
+
projectTemplate: this.id
|
|
52
|
+
};
|
|
53
|
+
return config;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.BaseIgcProject = BaseIgcProject;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProjectTemplate } from "@igniteui/cli-core";
|
|
2
|
+
import { BaseIgcProject } from "../_base";
|
|
3
|
+
export declare class EmptyPageTemplate extends BaseIgcProject implements ProjectTemplate {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
framework: string;
|
|
8
|
+
projectType: string;
|
|
9
|
+
dependencies: string[];
|
|
10
|
+
hasExtraConfiguration: boolean;
|
|
11
|
+
get templatePaths(): string[];
|
|
12
|
+
}
|
|
13
|
+
declare const _default: EmptyPageTemplate;
|
|
14
|
+
export default _default;
|