Skip to content

Commit

Permalink
chore(WebComponents): igniteui-webcomponents version bump, adding ban…
Browse files Browse the repository at this point in the history
…ner, divider and date picker templates - 13.3.x (#1274)
  • Loading branch information
valadzhov authored Jul 4, 2024
1 parent 7f3c9e4 commit 2c2c142
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { expect } from '@open-wc/testing';
import $(ClassName) from './$(path).js';

describe('IgcBannerComponent', () => {
it('<app-$(path)> is an instance of $(ClassName)', async () => {
const element = document.createElement('app-$(path)');
expect(element).to.be.instanceOf($(ClassName));
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import {
defineComponents,
IgcBannerComponent,
} from 'igniteui-webcomponents';

defineComponents(IgcBannerComponent);

@customElement('app-$(path)')
export default class $(ClassName) extends LitElement {
render() {
return html`
<igc-banner id="banner" .open=${open}>
You are currently not logged in! Please, log into your account first.
</igc-banner>
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { TypeScriptFileUpdate } from "@igniteui/cli-core";
import { IgniteUIForWebComponentsTemplate } from "../../../../../lib/templates/IgniteUIForWebComponentsTemplate";

class IgcBannerTemplate extends IgniteUIForWebComponentsTemplate {
constructor() {
super(__dirname);
this.components = ["Banner"];
this.controlGroup = "Notifications";
this.listInComponentTemplates = true;
this.id = "banner";
this.projectType = "igc-ts";
this.name = "Banner";
this.description = "basic IgcBanner";
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcBannerTemplate();
14 changes: 14 additions & 0 deletions packages/cli/templates/webcomponents/igc-ts/banner/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BaseComponent } from "@igniteui/cli-core";

class IgcBannerComponent extends BaseComponent {
/**
*
*/
constructor() {
super(__dirname);
this.name = "Banner";
this.group = "Notifications";
this.description = `Customizable banner component`;
}
}
module.exports = new IgcBannerComponent();
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { expect } from '@open-wc/testing';
import $(ClassName) from './$(path).js';

describe('IgcAvatarComponent', () => {
it('<app-$(path)> is an instance of $(ClassName)', async () => {
const element = document.createElement('app-$(path)');
expect(element).to.be.instanceOf($(ClassName));
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import {
defineComponents,
IgcDatePickerComponent,
} from 'igniteui-webcomponents';

defineComponents(IgcDatePickerComponent);

@customElement('app-$(path)')
export default class $(ClassName) extends LitElement {
render() {
return html`
<igc-date-picker>
</igc-date-picker>
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { TypeScriptFileUpdate } from "@igniteui/cli-core";
import { IgniteUIForWebComponentsTemplate } from "../../../../../lib/templates/IgniteUIForWebComponentsTemplate";

class IgcDatePickerTemplate extends IgniteUIForWebComponentsTemplate {
constructor() {
super(__dirname);
this.components = ["DatePicker"];
this.controlGroup = "Scheduling";
this.listInComponentTemplates = true;
this.id = "date-picker";
this.projectType = "igc-ts";
this.name = "Date Picker";
this.description = "basic IgcDatePicker";
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcDatePickerTemplate();
14 changes: 14 additions & 0 deletions packages/cli/templates/webcomponents/igc-ts/date-picker/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BaseComponent } from "@igniteui/cli-core";

class IgcDatePickerComponent extends BaseComponent {
/**
*
*/
constructor() {
super(__dirname);
this.name = "DatePicker";
this.group = "Scheduling";
this.description = `Basic date picker component`;
}
}
module.exports = new IgcDatePickerComponent();
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { expect } from '@open-wc/testing';
import $(ClassName) from './$(path).js';

describe('IgcDividerComponent', () => {
it('<app-$(path)> is an instance of $(ClassName)', async () => {
const element = document.createElement('app-$(path)');
expect(element).to.be.instanceOf($(ClassName));
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import {
defineComponents,
IgcDividerComponent,
} from 'igniteui-webcomponents';

defineComponents(IgcDividerComponent);

@customElement('app-$(path)')
export default class $(ClassName) extends LitElement {
render() {
return html`
<p>First paragraph</p>
<igc-divider ?middle=true type=solid></igc-divider>
<p>Second paragraph</p>
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { TypeScriptFileUpdate } from "@igniteui/cli-core";
import { IgniteUIForWebComponentsTemplate } from "../../../../../lib/templates/IgniteUIForWebComponentsTemplate";

class IgcDividerTemplate extends IgniteUIForWebComponentsTemplate {
constructor() {
super(__dirname);
this.components = ["Divider"];
this.controlGroup = "Data Entry & Display";
this.listInComponentTemplates = true;
this.id = "divider";
this.projectType = "igc-ts";
this.name = "Divider";
this.description = "basic IgcDivider";
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcDividerTemplate();
14 changes: 14 additions & 0 deletions packages/cli/templates/webcomponents/igc-ts/divider/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BaseComponent } from "@igniteui/cli-core";

class IgcDividerComponent extends BaseComponent {
/**
*
*/
constructor() {
super(__dirname);
this.name = "Divider";
this.group = "Data Entry & Display";
this.description = `Customizable divider component`;
}
}
module.exports = new IgcDividerComponent();
3 changes: 2 additions & 1 deletion packages/cli/templates/webcomponents/igc-ts/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"Scheduling": "",
"Layouts": "",
"Charts": "",
"Gauges": ""
"Gauges": "",
"Notifications": ""
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@vaadin/router": "^1.7.4",
"lit": "^3.1.2",
"typescript": "^5.3.3",
"igniteui-webcomponents": "~4.10.0"
"igniteui-webcomponents": "~4.11.0"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@vaadin/router": "^1.7.4",
"@igniteui/material-icons-extended": "^3.0.2",
"igniteui-dockmanager": "~1.14.3",
"igniteui-webcomponents": "~4.10.0",
"igniteui-webcomponents": "~4.11.0",
"igniteui-webcomponents-charts": "~4.8.0",
"igniteui-webcomponents-core": "~4.8.0",
"igniteui-webcomponents-gauges": "~4.8.0",
Expand Down

0 comments on commit 2c2c142

Please sign in to comment.