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.
Files changed (86) hide show
  1. package/lib/commands/start.js +11 -9
  2. package/lib/templates/IgniteUIForWebComponentsTemplate.js +3 -2
  3. package/package.json +3 -3
  4. package/templates/webcomponents/TypeScriptFileUpdate.js +1 -1
  5. package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  6. package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  7. package/templates/webcomponents/igc-ts/badge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -2
  8. package/templates/webcomponents/igc-ts/badge/default/files/src/app/__path__/__filePrefix__.ts +21 -19
  9. package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -2
  10. package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  11. package/templates/webcomponents/igc-ts/calendar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  12. package/templates/webcomponents/igc-ts/calendar/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  13. package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  14. package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.ts +47 -45
  15. package/templates/webcomponents/igc-ts/checkbox/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  16. package/templates/webcomponents/igc-ts/checkbox/default/files/src/app/__path__/__filePrefix__.ts +11 -10
  17. package/templates/webcomponents/igc-ts/custom-templates/subscription-form/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  18. package/templates/webcomponents/igc-ts/custom-templates/subscription-form/files/src/app/__path__/__filePrefix__.ts +36 -36
  19. package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  20. package/templates/webcomponents/igc-ts/dock-manager/default/files/src/app/__path__/__filePrefix__.ts +53 -53
  21. package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/StockIndexData.ts +994 -126
  22. package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  23. package/templates/webcomponents/igc-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.ts +19 -20
  24. package/templates/webcomponents/igc-ts/form/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  25. package/templates/webcomponents/igc-ts/form/default/files/src/app/__path__/__filePrefix__.ts +14 -13
  26. package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  27. package/templates/webcomponents/igc-ts/grid/default/files/src/app/__path__/__filePrefix__.ts +34 -35
  28. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  29. package/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts +25 -26
  30. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  31. package/templates/webcomponents/igc-ts/grid/grid-summaries/files/src/app/__path__/__filePrefix__.ts +17 -21
  32. package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  33. package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.ts +11 -10
  34. package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  35. package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.ts +10 -9
  36. package/templates/webcomponents/igc-ts/input/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  37. package/templates/webcomponents/igc-ts/input/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  38. package/templates/webcomponents/igc-ts/linear-gauge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  39. package/templates/webcomponents/igc-ts/linear-gauge/default/files/src/app/__path__/__filePrefix__.ts +26 -26
  40. package/templates/webcomponents/igc-ts/list/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  41. package/templates/webcomponents/igc-ts/list/default/files/src/app/__path__/__filePrefix__.ts +7 -6
  42. package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  43. package/templates/webcomponents/igc-ts/navbar/default/files/src/app/__path__/__filePrefix__.ts +17 -9
  44. package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  45. package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.ts +19 -19
  46. package/templates/webcomponents/igc-ts/pie-chart/default/files/src/app/__path__/sampleData.ts +28 -23
  47. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/__dot__editorconfig +0 -0
  48. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/__dot__gitignore +0 -0
  49. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/ignite-ui-cli.json +2 -1
  50. package/templates/webcomponents/igc-ts/projects/_base/files/index.html +17 -0
  51. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/package.json +22 -22
  52. package/templates/webcomponents/igc-ts/projects/_base/files/rollup.config.mjs +90 -0
  53. package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app-routing.ts +11 -0
  54. package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.ts +32 -0
  55. 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
  56. package/templates/webcomponents/igc-ts/projects/{empty/files/src/app/home/home.component.ts → _base/files/src/app/home/home.ts} +17 -15
  57. package/templates/webcomponents/igc-ts/projects/_base/files/src/app/not-found/not-found.ts +11 -0
  58. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/src/assets/astronaut-components.svg +0 -0
  59. package/templates/webcomponents/igc-ts/projects/_base/files/src/index.ts +2 -0
  60. package/templates/webcomponents/igc-ts/projects/_base/files/styles.css +5 -0
  61. package/templates/webcomponents/igc-ts/projects/_base/files/tsconfig.json +31 -0
  62. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-dev-server.config.mjs +0 -0
  63. package/templates/webcomponents/igc-ts/projects/{empty → _base}/files/web-test-runner.config.mjs +0 -0
  64. package/templates/webcomponents/igc-ts/projects/_base/index.d.ts +19 -0
  65. package/templates/webcomponents/igc-ts/projects/_base/index.js +56 -0
  66. package/templates/webcomponents/igc-ts/projects/empty/index.d.ts +14 -1
  67. package/templates/webcomponents/igc-ts/projects/empty/index.js +10 -43
  68. package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +57 -0
  69. package/templates/webcomponents/igc-ts/projects/side-nav/index.d.ts +14 -0
  70. package/templates/webcomponents/igc-ts/projects/side-nav/index.js +21 -0
  71. package/templates/webcomponents/igc-ts/radial-gauge/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  72. package/templates/webcomponents/igc-ts/radial-gauge/default/files/src/app/__path__/__filePrefix__.ts +13 -13
  73. package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  74. package/templates/webcomponents/igc-ts/radio-group/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  75. package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  76. package/templates/webcomponents/igc-ts/ripple/default/files/src/app/__path__/__filePrefix__.ts +6 -6
  77. package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  78. package/templates/webcomponents/igc-ts/slider/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  79. package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/{__filePrefix__.component.test.ts → __filePrefix__.test.ts} +1 -1
  80. package/templates/webcomponents/igc-ts/switch/default/files/src/app/__path__/__filePrefix__.ts +6 -5
  81. package/templates/webcomponents/igc-ts/projects/empty/files/index.html +0 -43
  82. package/templates/webcomponents/igc-ts/projects/empty/files/src/app/not-found/not-found.component.ts +0 -9
  83. package/templates/webcomponents/igc-ts/projects/empty/files/src/app.ts +0 -46
  84. package/templates/webcomponents/igc-ts/projects/empty/files/src/index.ts +0 -16
  85. package/templates/webcomponents/igc-ts/projects/empty/files/tsconfig.json +0 -31
  86. 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
- const cli_core_1 = require("@igniteui/cli-core");
3
+ exports.EmptyPageTemplate = void 0;
13
4
  const path = require("path");
14
- class EmptyProject {
5
+ const _base_1 = require("../_base");
6
+ class EmptyPageTemplate extends _base_1.BaseIgcProject {
15
7
  constructor() {
16
- this.id = "webcomponent";
17
- this.name = "empty";
18
- this.description = "Ignite UI CLI project for Web Components";
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
- module.exports = new EmptyProject();
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();
@@ -1,5 +1,5 @@
1
1
  import { expect } from '@open-wc/testing';
2
- import $(ClassName) from './$(path)';
2
+ import $(ClassName) from './$(path).js';
3
3
 
4
4
  describe('IgcRadialGaugeComponent', () => {
5
5
  it('<app-$(path)> is an instance of $(ClassName)', async () => {
@@ -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
- export default class $(ClassName) extends HTMLElement {
11
- constructor() {
12
- super();
13
- this.attachShadow({ mode: 'open' });
14
- this.shadowRoot!.innerHTML = `
15
- <style>
16
- :host{
17
- height: 50%;
18
- width: 50%;
19
- }
20
- </style>
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));
@@ -1,5 +1,5 @@
1
1
  import { expect } from '@open-wc/testing';
2
- import $(ClassName) from './$(path)';
2
+ import $(ClassName) from './$(path).js';
3
3
 
4
4
  describe('IgcRadioGroupComponent', () => {
5
5
  it('<app-$(path)> is an instance of $(ClassName)', async () => {
@@ -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
- export default class $(ClassName) extends HTMLElement {
10
- connectedCallback() {
11
- this.innerHTML = `
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));
@@ -1,5 +1,5 @@
1
1
  import { expect } from '@open-wc/testing';
2
- import $(ClassName) from './$(path)';
2
+ import $(ClassName) from './$(path).js';
3
3
 
4
4
  describe('IgcRippleComponent', () => {
5
5
  it('<app-$(path)> is an instance of $(ClassName)', async () => {
@@ -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
- export default class $(ClassName) extends HTMLElement {
9
- connectedCallback() {
10
- this.innerHTML = `
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));
@@ -1,5 +1,5 @@
1
1
  import { expect } from '@open-wc/testing';
2
- import $(ClassName) from './$(path)';
2
+ import $(ClassName) from './$(path).js';
3
3
 
4
4
  describe('IgcSliderComponent', () => {
5
5
  it('<app-$(path)> is an instance of $(ClassName)', async () => {
@@ -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
- export default class $(ClassName) extends HTMLElement {
9
- connectedCallback() {
10
- this.innerHTML = `
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));
@@ -1,5 +1,5 @@
1
1
  import { expect } from '@open-wc/testing';
2
- import $(ClassName) from './$(path)';
2
+ import $(ClassName) from './$(path).js';
3
3
 
4
4
  describe('IgcSwitchComponent', () => {
5
5
  it('<app-$(path)> is an instance of $(ClassName)', async () => {
@@ -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
- export default class $(ClassName) extends HTMLElement {
9
- connectedCallback() {
10
- this.innerHTML = `
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,9 +0,0 @@
1
- export default class NotFound extends HTMLElement {
2
- connectedCallback() {
3
- this.innerHTML = `
4
- <h2>Error 404: Page not found</h2>
5
- `;
6
- }
7
- }
8
-
9
- customElements.define('app-not-found', NotFound);
@@ -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
- });