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/lib/commands/start.js
CHANGED
|
@@ -13,6 +13,13 @@ const cli_core_1 = require("@igniteui/cli-core");
|
|
|
13
13
|
const path = require("path");
|
|
14
14
|
const resolve = require("resolve");
|
|
15
15
|
const build_1 = require("./build");
|
|
16
|
+
const execSyncNpmStart = (port, options) => {
|
|
17
|
+
if (port) {
|
|
18
|
+
cli_core_1.Util.execSync(`npm start -- --port=${port}`, options);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
cli_core_1.Util.execSync(`npm start`, options);
|
|
22
|
+
};
|
|
16
23
|
let command;
|
|
17
24
|
// tslint:disable:object-literal-sort-keys
|
|
18
25
|
command = {
|
|
@@ -57,6 +64,9 @@ command = {
|
|
|
57
64
|
cd14: config.project.theme
|
|
58
65
|
});
|
|
59
66
|
let port = Number(argv.port) || defaultPort;
|
|
67
|
+
// TODO: consider piping the stdin so that we handle the cp's termination
|
|
68
|
+
// this may require additional logic to be implemented if the cp asks for input
|
|
69
|
+
const options = { stdio: "inherit", killSignal: "SIGINT" };
|
|
60
70
|
switch (framework.toLowerCase()) {
|
|
61
71
|
case "jquery":
|
|
62
72
|
// browser-sync installed per project
|
|
@@ -80,16 +90,8 @@ command = {
|
|
|
80
90
|
}
|
|
81
91
|
/* falls through */
|
|
82
92
|
case "angular":
|
|
83
|
-
const options = { stdio: "inherit", killSignal: "SIGINT" };
|
|
84
|
-
if (port) {
|
|
85
|
-
cli_core_1.Util.execSync(`npm start -- --port=` + port, options);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
cli_core_1.Util.execSync(`npm start`, options);
|
|
89
|
-
}
|
|
90
|
-
break;
|
|
91
93
|
case "webcomponents":
|
|
92
|
-
|
|
94
|
+
execSyncNpmStart(port, options);
|
|
93
95
|
default:
|
|
94
96
|
break;
|
|
95
97
|
}
|
|
@@ -28,8 +28,9 @@ class IgniteUIForWebComponentsTemplate {
|
|
|
28
28
|
return Object.assign({}, options["extraConfig"], this.getBaseVariables(name));
|
|
29
29
|
}
|
|
30
30
|
registerInProject(projectPath, fullName, options) {
|
|
31
|
-
if (!(options && options.skipRoute) && cli_core_1.App.container.get(cli_core_1.FS_TOKEN)
|
|
32
|
-
|
|
31
|
+
if (!(options && options.skipRoute) && cli_core_1.App.container.get(cli_core_1.FS_TOKEN)
|
|
32
|
+
.fileExists("src/app/app-routing.ts")) {
|
|
33
|
+
const routingModule = new TypeScriptFileUpdate_1.TypeScriptFileUpdate(path.join(projectPath, "src/app/app-routing.ts"));
|
|
33
34
|
routingModule.addRoute(path.join(projectPath, `src/app/${this.folderName(fullName)}/${this.fileName(fullName)}.component.ts`), this.fileName(fullName), cli_core_1.Util.nameFromPath(fullName));
|
|
34
35
|
}
|
|
35
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.1.0-beta.0",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"all": true
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@igniteui/angular-templates": "~13.0
|
|
76
|
-
"@igniteui/cli-core": "~9.0.
|
|
75
|
+
"@igniteui/angular-templates": "~13.1.910-beta.0",
|
|
76
|
+
"@igniteui/cli-core": "~9.1.0-beta.0",
|
|
77
77
|
"chalk": "^2.3.2",
|
|
78
78
|
"fs-extra": "^3.0.1",
|
|
79
79
|
"glob": "^7.1.2",
|
|
@@ -84,7 +84,7 @@ class TypeScriptFileUpdate {
|
|
|
84
84
|
//#endregion File state
|
|
85
85
|
addRouteModuleEntry(targetPath, filePath, linkText, linkPath, routesVariable = DEFAULT_ROUTES_VARIABLE, parentRoutePath) {
|
|
86
86
|
let className;
|
|
87
|
-
const relativePath = "./
|
|
87
|
+
const relativePath = "./" + filePath + "/" + filePath;
|
|
88
88
|
className = "app-" + filePath;
|
|
89
89
|
this.requestImport(relativePath);
|
|
90
90
|
// https://github.com/Microsoft/TypeScript/issues/14419#issuecomment-307256171
|
package/templates/webcomponents/igc-ts/avatar/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
|
IgcAvatarComponent,
|
|
@@ -5,9 +7,10 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcAvatarComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
11
14
|
<igc-avatar
|
|
12
15
|
size="large"
|
|
13
16
|
shape="circle"
|
|
@@ -18,5 +21,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
18
21
|
`;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
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('IgcBadgeComponent', () => {
|
|
5
5
|
it('<app-$(path)> is an instance of $(ClassName)', async () => {
|
|
@@ -7,4 +7,3 @@ describe('IgcBadgeComponent', () => {
|
|
|
7
7
|
expect(element).to.be.instanceOf($(ClassName));
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
|
-
|
package/templates/webcomponents/igc-ts/badge/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
|
IgcBadgeComponent,
|
|
@@ -5,23 +7,25 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcBadgeComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
static styles = css`
|
|
13
|
+
#labels {
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
border-style: groove;
|
|
18
|
+
}
|
|
19
|
+
igc-badge {
|
|
20
|
+
padding: 3px;
|
|
21
|
+
}
|
|
22
|
+
label {
|
|
23
|
+
padding: 5px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
render() {
|
|
28
|
+
return html`
|
|
25
29
|
<div id='labels'>
|
|
26
30
|
<label>Labels</label>
|
|
27
31
|
<igc-badge
|
|
@@ -42,5 +46,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
42
46
|
`;
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
|
|
46
|
-
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('IgcButtonComponent', () => {
|
|
5
5
|
it('<app-$(path)> is an instance of $(ClassName)', async () => {
|
|
@@ -7,4 +7,3 @@ describe('IgcButtonComponent', () => {
|
|
|
7
7
|
expect(element).to.be.instanceOf($(ClassName));
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
|
-
|
package/templates/webcomponents/igc-ts/button/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
|
IgcButtonComponent,
|
|
@@ -5,9 +7,10 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcButtonComponent);
|
|
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
|
size='large'>
|
|
13
16
|
Large button
|
|
@@ -15,5 +18,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
15
18
|
`;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/calendar/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
|
IgcCalendarComponent,
|
|
@@ -5,9 +7,10 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcCalendarComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
11
14
|
<igc-calendar
|
|
12
15
|
style="width:1300px"
|
|
13
16
|
week-start="monday"
|
|
@@ -17,5 +20,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
17
20
|
`;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/card/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
|
IgcCardActionsComponent,
|
|
@@ -12,53 +14,53 @@ defineComponents(
|
|
|
12
14
|
IgcCardActionsComponent,
|
|
13
15
|
IgcCardContentComponent,
|
|
14
16
|
IgcCardHeaderComponent,
|
|
15
|
-
IgcCardMediaComponent
|
|
17
|
+
IgcCardMediaComponent,
|
|
16
18
|
);
|
|
17
19
|
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
20
|
+
@customElement('app-$(path)')
|
|
21
|
+
export default class $(ClassName) extends LitElement {
|
|
22
|
+
static styles = css`
|
|
23
|
+
igc-card {
|
|
24
|
+
width: 400px;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
render() {
|
|
29
|
+
return html`
|
|
30
|
+
<igc-card>
|
|
31
|
+
<igc-card-media style="max-height: 194px">
|
|
32
|
+
<img
|
|
33
|
+
src="https://images.unsplash.com/photo-1518235506717-e1ed3306a89b?ixlib=rb-1.2.1&auto=format&fit=crop&w=320&q=180"
|
|
34
|
+
/>
|
|
35
|
+
</igc-card-media>
|
|
36
|
+
<igc-card-header>
|
|
37
|
+
<igc-avatar
|
|
38
|
+
slot="thumbnail"
|
|
39
|
+
size="small"
|
|
40
|
+
shape="rounded"
|
|
41
|
+
src="https://www.infragistics.com/angular-demos/assets/images/men/1.jpg"
|
|
42
|
+
>
|
|
43
|
+
</igc-avatar>
|
|
44
|
+
<h3 slot="title">Title</h3>
|
|
45
|
+
<h5 slot="subtitle">Subtitle</h5>
|
|
46
|
+
</igc-card-header>
|
|
47
|
+
<igc-card-content>
|
|
48
|
+
<p>
|
|
49
|
+
New York City comprises 5 boroughs sitting where the Hudson River
|
|
50
|
+
meets the Atlantic Ocean. At its core is Manhattan, a densely
|
|
51
|
+
populated borough that’s among the world’s major commercial,
|
|
52
|
+
financial and cultural centers.
|
|
53
|
+
</p>
|
|
54
|
+
</igc-card-content>
|
|
55
|
+
<hr
|
|
56
|
+
style="height: 1px; margin: 0 0 8px 0; background-color: rgba(0,0,0, 0.2); border: 0px"
|
|
57
|
+
/>
|
|
58
|
+
<igc-card-actions>
|
|
59
|
+
<igc-button slot="start" variant="flat">Like</igc-button>
|
|
60
|
+
<igc-button slot="start" variant="flat">Learn More</igc-button>
|
|
61
|
+
<igc-icon slot="end" name="home" collection="default"></igc-icon>
|
|
62
|
+
</igc-card-actions>
|
|
63
|
+
</igc-card>
|
|
60
64
|
`;
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
|
|
64
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/checkbox/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
|
IgcCheckboxComponent,
|
|
@@ -5,16 +7,15 @@ import {
|
|
|
5
7
|
|
|
6
8
|
defineComponents(IgcCheckboxComponent);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
@customElement('app-$(path)')
|
|
11
|
+
export default class $(ClassName) extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
14
|
+
<igc-checkbox
|
|
15
|
+
checked="true"
|
|
16
|
+
>
|
|
17
|
+
Label
|
|
18
|
+
</igc-checkbox>
|
|
16
19
|
`;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
customElements.define('app-$(path)', $(ClassName));
|
|
@@ -1,32 +1,50 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
1
3
|
import {
|
|
2
4
|
defineComponents,
|
|
3
5
|
IgcFormComponent,
|
|
4
6
|
IgcInputComponent,
|
|
5
7
|
IgcCheckboxComponent,
|
|
6
|
-
IgcButtonComponent
|
|
8
|
+
IgcButtonComponent,
|
|
7
9
|
} from 'igniteui-webcomponents';
|
|
8
10
|
|
|
9
11
|
defineComponents(IgcFormComponent, IgcInputComponent, IgcCheckboxComponent, IgcButtonComponent);
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</style>
|
|
13
|
+
@customElement('app-$(path)')
|
|
14
|
+
export default class $(ClassName) extends LitElement {
|
|
15
|
+
static styles = css`
|
|
16
|
+
#form {
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
}
|
|
21
|
+
.buttonContainer {
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
.buttonContainer > igc-button {
|
|
25
|
+
flex: 1;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
27
28
|
|
|
29
|
+
private handleSubmit = (event:any) => {
|
|
30
|
+
const customEvent = event as CustomEvent<FormData>;
|
|
31
|
+
const formData = customEvent.detail;
|
|
32
|
+
const formKeys = formData.keys();
|
|
33
|
+
const formEntries = formData.entries();
|
|
34
|
+
let result = '';
|
|
35
|
+
do {
|
|
36
|
+
const pair = formEntries.next().value;
|
|
37
|
+
if (pair) {
|
|
38
|
+
result += `${pair[0]}=${pair[1]};`;
|
|
39
|
+
}
|
|
40
|
+
} while (!formKeys.next().done);
|
|
41
|
+
alert(result);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
render() {
|
|
45
|
+
return html`
|
|
28
46
|
<div class="container sample">
|
|
29
|
-
<igc-form id="form">
|
|
47
|
+
<igc-form id="form" @igcSubmit="${this.handleSubmit}">
|
|
30
48
|
<div>Subscribe</div>
|
|
31
49
|
<igc-input required name="name" type="text" label="Your Name"></igc-input>
|
|
32
50
|
<igc-input required name="email" type="email" label="Your E-mail"></igc-input>
|
|
@@ -39,23 +57,5 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
39
57
|
</igc-form>
|
|
40
58
|
</div>
|
|
41
59
|
`;
|
|
42
|
-
|
|
43
|
-
document.addEventListener('igcSubmit', function (event) {
|
|
44
|
-
const customEvent = event as CustomEvent<FormData>;
|
|
45
|
-
const formData = customEvent.detail;
|
|
46
|
-
const formKeys = formData.keys();
|
|
47
|
-
const formEntries = formData.entries();
|
|
48
|
-
let result = '';
|
|
49
|
-
do {
|
|
50
|
-
const pair = formEntries.next().value;
|
|
51
|
-
if (pair) {
|
|
52
|
-
result += pair[0] + '=' + pair[1] + ';';
|
|
53
|
-
}
|
|
54
|
-
} while (!formKeys.next().done)
|
|
55
|
-
console.log(result);
|
|
56
|
-
alert(result);
|
|
57
|
-
});
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
|
|
61
|
-
customElements.define('app-$(path)', $(ClassName));
|
package/templates/webcomponents/igc-ts/dock-manager/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
|
IgcDockManagerComponent,
|
|
3
5
|
IgcDockManagerPaneType,
|
|
@@ -7,59 +9,59 @@ import { defineCustomElements } from 'igniteui-dockmanager/loader';
|
|
|
7
9
|
|
|
8
10
|
defineCustomElements();
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
padding-left: 275px;
|
|
20
|
-
width: calc(100% - 275px);
|
|
21
|
-
}
|
|
12
|
+
@customElement('app-$(path)')
|
|
13
|
+
export default class $(ClassName) extends LitElement {
|
|
14
|
+
static styles = css`
|
|
15
|
+
:host, igc-dockmanager {
|
|
16
|
+
height: 100%;
|
|
17
|
+
margin: 0px;
|
|
18
|
+
padding-left: 275px;
|
|
19
|
+
width: calc(100% - 275px);
|
|
20
|
+
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
.dockManagerContent {
|
|
23
|
+
padding: 0.5rem;
|
|
24
|
+
height: calc(100% - 1rem);
|
|
25
|
+
width: calc(100% - 1rem);
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
/* background: orange; */
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
.dockManagerFull {
|
|
32
|
+
padding: 0rem;
|
|
33
|
+
margin: 0rem;
|
|
34
|
+
height: 100%;
|
|
35
|
+
width: 100%;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
.dockManagerFrame {
|
|
42
|
+
padding: 0rem;
|
|
43
|
+
margin: 0rem;
|
|
44
|
+
height: 100%;
|
|
45
|
+
width: 100%;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
.employeesDetailsRow {
|
|
52
|
+
height: 4rem;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
padding-left: 0.5rem;
|
|
56
|
+
padding-right: 0.5rem;
|
|
57
|
+
padding-top: 0.5rem;
|
|
58
|
+
padding-bottom: 0.5rem;
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
render() {
|
|
64
|
+
return html`
|
|
63
65
|
<igc-dockmanager id="dockManager">
|
|
64
66
|
<div slot="content1" class="dockManagerContent">Content 1</div>
|
|
65
67
|
<div slot="content2" class="dockManagerContent">Content 2</div>
|
|
@@ -77,8 +79,8 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
77
79
|
`;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
|
|
81
|
-
const dockManager =
|
|
82
|
+
firstUpdated() {
|
|
83
|
+
const dockManager = this.shadowRoot?.getElementById('dockManager') as IgcDockManagerComponent;
|
|
82
84
|
dockManager.layout = {
|
|
83
85
|
rootPane: {
|
|
84
86
|
type: IgcDockManagerPaneType.splitPane,
|
|
@@ -202,5 +204,3 @@ export default class $(ClassName) extends HTMLElement {
|
|
|
202
204
|
};
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
|
-
|
|
206
|
-
customElements.define('app-$(path)', $(ClassName));
|