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
|
@@ -1,54 +1,21 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
3
|
+
exports.EmptyPageTemplate = void 0;
|
|
13
4
|
const path = require("path");
|
|
14
|
-
|
|
5
|
+
const _base_1 = require("../_base");
|
|
6
|
+
class EmptyPageTemplate extends _base_1.BaseIgcProject {
|
|
15
7
|
constructor() {
|
|
16
|
-
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.id = "empty";
|
|
10
|
+
this.name = "Empty Project";
|
|
11
|
+
this.description = "Project structure with routing and a home page";
|
|
19
12
|
this.framework = "webcomponents";
|
|
20
13
|
this.projectType = "igc-ts";
|
|
21
14
|
this.hasExtraConfiguration = false;
|
|
22
|
-
this.delimiters = cli_core_1.defaultDelimiters;
|
|
23
15
|
}
|
|
24
16
|
get templatePaths() {
|
|
25
|
-
return [path.join(__dirname, "files")];
|
|
26
|
-
}
|
|
27
|
-
installModules() {
|
|
28
|
-
throw new Error("Method not implemented.");
|
|
29
|
-
}
|
|
30
|
-
upgradeIgniteUIPackages(projectPath, packagePath) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
throw new Error("Method not implemented.");
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
generateConfig(name, theme, ...options) {
|
|
36
|
-
//TODO update the config with [{key: "keyname", "value"}]
|
|
37
|
-
return {
|
|
38
|
-
"cliVersion": cli_core_1.Util.version(),
|
|
39
|
-
"dash-name": cli_core_1.Util.lowerDashed(name),
|
|
40
|
-
"description": this.description,
|
|
41
|
-
"dot": ".",
|
|
42
|
-
"name": name,
|
|
43
|
-
"path": name,
|
|
44
|
-
"theme": theme
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
getExtraConfiguration() {
|
|
48
|
-
throw new Error("Method not implemented.");
|
|
49
|
-
}
|
|
50
|
-
setExtraConfiguration(extraConfigKeys) {
|
|
51
|
-
throw new Error("Method not implemented.");
|
|
17
|
+
return [...super.templatePaths, path.join(__dirname, "files")];
|
|
52
18
|
}
|
|
53
19
|
}
|
|
54
|
-
|
|
20
|
+
exports.EmptyPageTemplate = EmptyPageTemplate;
|
|
21
|
+
exports.default = new EmptyPageTemplate();
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* eslint-disable no-return-assign */
|
|
2
|
+
import { html, css, LitElement } from 'lit';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import {
|
|
5
|
+
defineComponents,
|
|
6
|
+
IgcNavDrawerComponent,
|
|
7
|
+
IgcNavDrawerItemComponent,
|
|
8
|
+
IgcNavDrawerHeaderItemComponent,
|
|
9
|
+
IgcRippleComponent,
|
|
10
|
+
} from 'igniteui-webcomponents';
|
|
11
|
+
import { Router } from '@vaadin/router';
|
|
12
|
+
import { routes } from './app-routing.js';
|
|
13
|
+
|
|
14
|
+
defineComponents(
|
|
15
|
+
IgcNavDrawerComponent,
|
|
16
|
+
IgcNavDrawerItemComponent,
|
|
17
|
+
IgcNavDrawerHeaderItemComponent,
|
|
18
|
+
IgcRippleComponent,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
@customElement('app-root')
|
|
22
|
+
export class App extends LitElement {
|
|
23
|
+
static styles = css`
|
|
24
|
+
router-outlet {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
display: flex;
|
|
28
|
+
text-align: center;
|
|
29
|
+
flex-flow: column nowrap;
|
|
30
|
+
justify-content: stretch;
|
|
31
|
+
align-items: center;
|
|
32
|
+
overflow: inherit;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
render() {
|
|
37
|
+
return html`
|
|
38
|
+
<igc-nav-drawer open=true>
|
|
39
|
+
<igc-nav-drawer-header-item>Ignite UI CLI</igc-nav-drawer-header-item>
|
|
40
|
+
${routes.filter((element, index) => index < routes.length - 1).map(i => html`
|
|
41
|
+
<igc-nav-drawer-item>
|
|
42
|
+
<span slot="content">
|
|
43
|
+
<a href="${i.path}">${i.name}<igc-ripple></igc-ripple></a>
|
|
44
|
+
</span>
|
|
45
|
+
</igc-nav-drawer-item>
|
|
46
|
+
`)}
|
|
47
|
+
</igc-nav-drawer>
|
|
48
|
+
<router-outlet></router-outlet>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
firstUpdated() {
|
|
53
|
+
const outlet = this.shadowRoot?.querySelector('router-outlet');
|
|
54
|
+
const router = new Router(outlet);
|
|
55
|
+
router.setRoutes(routes);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProjectTemplate } from "@igniteui/cli-core";
|
|
2
|
+
import { BaseIgcProject } from "../_base";
|
|
3
|
+
export declare class SideNavProject 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: SideNavProject;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SideNavProject = void 0;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const _base_1 = require("../_base");
|
|
6
|
+
class SideNavProject extends _base_1.BaseIgcProject {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.id = "side-nav";
|
|
10
|
+
this.name = "Default side navigation";
|
|
11
|
+
this.description = "Project structure with side navigation drawer";
|
|
12
|
+
this.framework = "webcomponents";
|
|
13
|
+
this.projectType = "igc-ts";
|
|
14
|
+
this.hasExtraConfiguration = false;
|
|
15
|
+
}
|
|
16
|
+
get templatePaths() {
|
|
17
|
+
return [...super.templatePaths, path.join(__dirname, "files")];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.SideNavProject = SideNavProject;
|
|
21
|
+
exports.default = new SideNavProject();
|
package/templates/webcomponents/igc-ts/radial-gauge/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
|
IgcRadialGaugeModule,
|
|
3
5
|
} from 'igniteui-webcomponents-gauges';
|
|
@@ -7,17 +9,17 @@ ModuleManager.register(
|
|
|
7
9
|
IgcRadialGaugeModule,
|
|
8
10
|
);
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
@customElement('app-$(path)')
|
|
13
|
+
export default class $(ClassName) extends LitElement {
|
|
14
|
+
static styles = css`
|
|
15
|
+
:host{
|
|
16
|
+
height: 50%;
|
|
17
|
+
width: 50%;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return html`
|
|
21
23
|
<igc-radial-gauge
|
|
22
24
|
height="100%"
|
|
23
25
|
width="50%"
|
|
@@ -39,5 +41,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
39
41
|
`;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcRadioComponent,
|
|
@@ -6,9 +8,10 @@ import {
|
|
|
6
8
|
|
|
7
9
|
defineComponents(IgcRadioComponent, IgcRadioGroupComponent);
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
@customElement('app-$(path)')
|
|
12
|
+
export default class $(ClassName) extends LitElement {
|
|
13
|
+
render() {
|
|
14
|
+
return html`
|
|
12
15
|
<igc-radio-group>
|
|
13
16
|
<igc-radio name="fruit" value="banana">
|
|
14
17
|
Banana
|
|
@@ -23,5 +26,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
23
26
|
`;
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
|
-
|
|
27
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcRippleComponent,
|
|
@@ -5,9 +7,10 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcRippleComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
11
14
|
<igc-button>
|
|
12
15
|
<igc-ripple></igc-ripple>
|
|
13
16
|
Button with ripple
|
|
@@ -15,6 +18,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
15
18
|
`;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcSliderComponent,
|
|
@@ -5,9 +7,10 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcSliderComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
11
14
|
<igc-slider
|
|
12
15
|
style="margin: 40px 20px; width: 200px;"
|
|
13
16
|
min="0"
|
|
@@ -19,5 +22,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
19
22
|
`;
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
|
-
|
|
23
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/__filePrefix__.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcSwitchComponent,
|
|
@@ -5,14 +7,13 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcSwitchComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
11
14
|
<igc-switch>
|
|
12
15
|
Label
|
|
13
16
|
</igc-switch>
|
|
14
17
|
`;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
|
|
18
|
-
customElements.define('app-$(path)', $(ClassName));
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<base href="/">
|
|
7
|
-
<link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/bootstrap.css">
|
|
8
|
-
<style>
|
|
9
|
-
html, body {
|
|
10
|
-
height: 100%;
|
|
11
|
-
margin: 0px;
|
|
12
|
-
background: #fafafa;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host {
|
|
16
|
-
display: block;
|
|
17
|
-
padding: 25px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
#outlet {
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
display: flex;
|
|
24
|
-
text-align: center;
|
|
25
|
-
flex-flow: column nowrap;
|
|
26
|
-
justify-content: stretch;
|
|
27
|
-
align-items: center;
|
|
28
|
-
overflow: inherit;
|
|
29
|
-
}
|
|
30
|
-
</style>
|
|
31
|
-
</head>
|
|
32
|
-
|
|
33
|
-
<body>
|
|
34
|
-
<app-navigation></app-navigation>
|
|
35
|
-
<main id="outlet"></main>
|
|
36
|
-
|
|
37
|
-
<script type="module" src="./dist/src/index.js"></script>
|
|
38
|
-
<script type="module">
|
|
39
|
-
import './dist/src/app.js';
|
|
40
|
-
</script>
|
|
41
|
-
</body>
|
|
42
|
-
|
|
43
|
-
</html>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-return-assign */
|
|
2
|
-
import {
|
|
3
|
-
defineComponents,
|
|
4
|
-
IgcNavDrawerComponent,
|
|
5
|
-
IgcNavDrawerItemComponent,
|
|
6
|
-
IgcNavDrawerHeaderItemComponent,
|
|
7
|
-
IgcRippleComponent,
|
|
8
|
-
} from 'igniteui-webcomponents';
|
|
9
|
-
import { routes } from './index.js';
|
|
10
|
-
import './app/home/home.component';
|
|
11
|
-
import './app/not-found/not-found.component';
|
|
12
|
-
|
|
13
|
-
defineComponents(
|
|
14
|
-
IgcNavDrawerComponent,
|
|
15
|
-
IgcNavDrawerItemComponent,
|
|
16
|
-
IgcNavDrawerHeaderItemComponent,
|
|
17
|
-
IgcRippleComponent,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
export class App extends HTMLElement {
|
|
21
|
-
connectedCallback() {
|
|
22
|
-
this.innerHTML = `
|
|
23
|
-
<style>
|
|
24
|
-
igc-nav-drawer-header-item {
|
|
25
|
-
text-align: center;
|
|
26
|
-
font-weight: bold;
|
|
27
|
-
}
|
|
28
|
-
</style>
|
|
29
|
-
<div id="navigation-outlet">
|
|
30
|
-
<igc-nav-drawer open=true>
|
|
31
|
-
<igc-nav-drawer-header-item>Ignite UI CLI</igc-nav-drawer-header-item>
|
|
32
|
-
|
|
33
|
-
${routes.filter((element, index) => index < routes.length - 1).map(i => `
|
|
34
|
-
<igc-nav-drawer-item>
|
|
35
|
-
<span slot="content">
|
|
36
|
-
<a style="text-decoration: none;" href="${i.path}">${i.name}<igc-ripple></igc-ripple></a>
|
|
37
|
-
</span>
|
|
38
|
-
</igc-nav-drawer-item>
|
|
39
|
-
`).join('')}
|
|
40
|
-
</igc-nav-drawer>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
customElements.define('app-navigation', App);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/extensions, quotes, no-tabs, indent, comma-dangle */
|
|
2
|
-
import {
|
|
3
|
-
Route,
|
|
4
|
-
Router
|
|
5
|
-
} from '@vaadin/router';
|
|
6
|
-
import './app/home/home.component';
|
|
7
|
-
|
|
8
|
-
export const routes: Route[] = [
|
|
9
|
-
{ path: '/', component: 'app-home', name: 'Home' },
|
|
10
|
-
// The fallback route should always be after other alternatives.
|
|
11
|
-
{ path: '(.*)', component: 'app-not-found' },
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
const outlet = document.getElementById('outlet');
|
|
15
|
-
export const router = new Router(outlet);
|
|
16
|
-
router.setRoutes(routes);
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|
2
|
-
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
const __dirname = path.resolve();
|
|
6
|
-
|
|
7
|
-
export default ({
|
|
8
|
-
|
|
9
|
-
entry: path.resolve(__dirname, 'src'),
|
|
10
|
-
devtool: false,
|
|
11
|
-
output: {
|
|
12
|
-
filename: '[chunkhash].bundle.js',
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
resolve: {
|
|
16
|
-
mainFields: ['fesm2015', 'module', 'main'],
|
|
17
|
-
extensions: ['.ts', '.js', '.json'],
|
|
18
|
-
},
|
|
19
|
-
module: {
|
|
20
|
-
rules: [{
|
|
21
|
-
test: /\.m?js/,
|
|
22
|
-
type: "javascript/auto",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
test: /\.m?js/,
|
|
26
|
-
resolve: {
|
|
27
|
-
fullySpecified: false,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
test: /\.(ts|js)$/,
|
|
32
|
-
exclude: /node_modules/,
|
|
33
|
-
loader: 'babel-loader',
|
|
34
|
-
options: {
|
|
35
|
-
"compact": true,
|
|
36
|
-
"presets": [
|
|
37
|
-
["@babel/preset-env", {
|
|
38
|
-
"useBuiltIns": "usage",
|
|
39
|
-
"corejs": 3,
|
|
40
|
-
"targets": {
|
|
41
|
-
"browsers": [
|
|
42
|
-
"last 2 Chrome versions",
|
|
43
|
-
"last 2 Safari versions",
|
|
44
|
-
"last 2 iOS versions",
|
|
45
|
-
"last 2 Firefox versions",
|
|
46
|
-
"last 2 Edge versions"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
}],
|
|
50
|
-
"@babel/preset-typescript"
|
|
51
|
-
],
|
|
52
|
-
"plugins": [
|
|
53
|
-
"@babel/plugin-proposal-class-properties",
|
|
54
|
-
"@babel/plugin-transform-runtime"
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
}],
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
plugins: [
|
|
61
|
-
new HtmlWebpackPlugin({
|
|
62
|
-
title: '@@AppName',
|
|
63
|
-
template: './index.html',
|
|
64
|
-
}),
|
|
65
|
-
new ForkTsCheckerWebpackPlugin(),
|
|
66
|
-
],
|
|
67
|
-
});
|