Skip to content

Commit

Permalink
Merge branch 'master' into ibarakov/react-add-style-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
gedinakova authored Jan 18, 2024
2 parents 0b46a87 + 5f6cd63 commit 0949f36
Show file tree
Hide file tree
Showing 28 changed files with 311 additions and 132 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# [13.1.3](https://github.com/IgniteUI/igniteui-cli/compare/v13.1.2...v13.1.3) (2024-01-17)

## What's Changed

* Enable binding information from the Router state to the components' inputs by @viktorkombov in https://github.com/IgniteUI/igniteui-cli/pull/1196
* fix(igr-ts): add github workflows folder by @onlyexeption in https://github.com/IgniteUI/igniteui-cli/pull/1192
* React - open browser on app start by @onlyexeption in https://github.com/IgniteUI/igniteui-cli/pull/1187
* Replace base app name with placeholders by @jackofdiamond5 in https://github.com/IgniteUI/igniteui-cli/pull/1194
* Bump the version of WebComponents by @valadzhov in https://github.com/IgniteUI/igniteui-cli/pull/1189
* build(deps): bump follow-redirects from 1.15.0 to 1.15.4 by @dependabot in https://github.com/IgniteUI/igniteui-cli/pull/1193

## New Contributors
* @viktorkombov made their first contribution in https://github.com/IgniteUI/igniteui-cli/pull/1196

**Full Changelog**: https://github.com/IgniteUI/igniteui-cli/compare/v13.1.2...v13.1.3

# [13.1.2](https://github.com/IgniteUI/igniteui-cli/compare/v13.1.1...v13.1.2) (2024-01-02)

## What's Changed
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "igniteui-cli",
"version": "13.1.2",
"version": "13.1.3",
"description": "CLI tool for creating Ignite UI projects",
"keywords": [
"CLI",
Expand Down Expand Up @@ -78,8 +78,8 @@
"all": true
},
"dependencies": {
"@igniteui/angular-templates": "~17.1.1312",
"@igniteui/cli-core": "~13.1.2",
"@igniteui/angular-templates": "~17.1.1313",
"@igniteui/cli-core": "~13.1.3",
"chalk": "^2.3.2",
"fs-extra": "^3.0.1",
"glob": "^7.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ $(yamlDefaultBranch) ]
pull_request:
branches: [ $(yamlDefaultBranch) ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm' # enable after committing lock file from first install
- run: npm i # replace with 'npm ci' after committing lock file from first install
# - run: npm run lint
- run: npm run build
- run: npm run test

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig({
mainFields: ['module'],
},
server: {
open: true,
port: 3003
}
})
3 changes: 2 additions & 1 deletion packages/cli/templates/react/igr-ts/projects/_base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export class BaseIgrTsProject implements ProjectTemplate {
"description": this.description,
"dot": ".",
"path": name,
"projectTemplate": this.id
"projectTemplate": this.id,
"yamlDefaultBranch": this.id === "base" ? "<%=yaml-default-branch%>" : "main"
};
}
}
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('IgcButtonGroupComponent', () => {
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,21 @@
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import {
defineComponents,
IgcButtonGroupComponent,
} from 'igniteui-webcomponents';

defineComponents(IgcButtonGroupComponent);

@customElement('app-$(path)')
export default class $(ClassName) extends LitElement {
render() {
return html`
<igc-button-group>
<igc-toggle-button value="left">Left</igc-toggle-button>
<igc-toggle-button value="center">Center</igc-toggle-button>
<igc-toggle-button value="right">Right</igc-toggle-button>
</igc-button-group>
`;
}
}
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 IgcTabsTemplate extends IgniteUIForWebComponentsTemplate {
constructor() {
super(__dirname);
this.components = ["ButtonGroup"];
this.controlGroup = "Data Entry & Display";
this.listInComponentTemplates = true;
this.id = "button-group";
this.projectType = "igc-ts";
this.name = "Button group";
this.description = "basic IgcButtonGroup";
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcTabsTemplate();
14 changes: 14 additions & 0 deletions packages/cli/templates/webcomponents/igc-ts/button-group/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BaseComponent } from "@igniteui/cli-core";

class IgcButtonGroupComponent extends BaseComponent {
/**
*
*/
constructor() {
super(__dirname);
this.name = "Button group";
this.group = "Data Entry & Display";
this.description = `Basic button group component`;
}
}
module.exports = new IgcButtonGroupComponent();
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { customElement } from 'lit/decorators.js';
import {
EditModeType,
GridActivationMode,
GridSelectionMode,
DataGridSelectionMode,
IgcDataGridComponent,
IgcDataGridModule,
IgcGridCellValueChangingEventArgs,
Expand Down Expand Up @@ -193,7 +193,7 @@ export default class $(ClassName) extends LitElement {
if (grid !== null) {
grid.dataSource = this.data;
grid.activationMode = GridActivationMode.Cell;
grid.selectionMode = GridSelectionMode.SingleCell;
grid.selectionMode = DataGridSelectionMode.SingleCell;
grid.editMode = EditModeType.Cell;
grid.cellValueChanging = onCellValueChanging;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@vaadin/router": "^1.7.4",
"lit": "^2.6.1",
"typescript": "^4.9.4",
"igniteui-webcomponents": "~4.3.0"
"igniteui-webcomponents": "~4.7.0"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"dependencies": {
"@vaadin/router": "^1.7.4",
"@igniteui/material-icons-extended": "^2.11.0",
"igniteui-dockmanager": "~1.8.0",
"igniteui-webcomponents": "~4.3.0",
"igniteui-webcomponents-charts": "~4.3.0",
"igniteui-webcomponents-core": "~4.3.0",
"igniteui-webcomponents-gauges": "~4.3.0",
"igniteui-webcomponents-grids": "~4.3.0",
"igniteui-webcomponents-inputs": "~4.3.0",
"igniteui-webcomponents-layouts": "~4.3.0",
"igniteui-dockmanager": "~1.14.3",
"igniteui-webcomponents": "~4.7.0",
"igniteui-webcomponents-charts": "~4.7.0",
"igniteui-webcomponents-core": "~4.7.0",
"igniteui-webcomponents-gauges": "~4.7.0",
"igniteui-webcomponents-grids": "~4.7.0",
"igniteui-webcomponents-inputs": "~4.7.0",
"igniteui-webcomponents-layouts": "~4.7.0",
"lit": "^2.6.1",
"typescript": "^4.9.4"
},
Expand Down
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('IgcTextareaComponent', () => {
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,
IgcTextareaComponent,
} from 'igniteui-webcomponents';

defineComponents(IgcTextareaComponent);

@customElement('app-$(path)')
export default class $(ClassName) extends LitElement {
render() {
return html`
<igc-textarea
label="Leave your comment">
</igc-textarea>
`;
}
}
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 IgcTextareaComponent extends IgniteUIForWebComponentsTemplate {
constructor() {
super(__dirname);
this.components = ["Teaxtarea"];
this.controlGroup = "Data Entry & Display";
this.listInComponentTemplates = true;
this.id = "text-area";
this.projectType = "igc-ts";
this.name = "Text area";
this.description = "basic IgcTextarea";
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcTextareaComponent();
17 changes: 17 additions & 0 deletions packages/cli/templates/webcomponents/igc-ts/text-area/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { BaseComponent, TypeScriptFileUpdate } from "@igniteui/cli-core";

class IgcTextareaComponent extends BaseComponent {
/**
*
*/
constructor() {
super(__dirname);
this.name = "Text area";
this.group = "Data Entry & Display";
this.description = `Basic text area component`;
}
protected addClassDeclaration(mainModule: TypeScriptFileUpdate, projPath: string, name: string, modulePath: string) {
// not applicable with custom module
}
}
module.exports = new IgcTextareaComponent();
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igniteui/cli-core",
"version": "13.1.2",
"version": "13.1.3",
"description": "Base types and functionality for Ignite UI CLI",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes), ErrorRoutingModule],
imports: [RouterModule.forRoot(routes, { bindToComponentInputs: true }), ErrorRoutingModule],
exports: [RouterModule, ErrorRoutingModule]
})
export class AppRoutingModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes), ErrorRoutingModule],
imports: [RouterModule.forRoot(routes, { bindToComponentInputs: true }), ErrorRoutingModule],
exports: [RouterModule, ErrorRoutingModule]
})
export class AppRoutingModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes, { bindToComponentInputs: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }
Loading

0 comments on commit 0949f36

Please sign in to comment.