From 578874a3087d58af23c9258ba48e1dfb1f0f5a26 Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Wed, 17 Jan 2024 16:12:02 +0200 Subject: [PATCH 1/6] Enable binding information from the Router state to the components' inputs --- .../projects/_base/files/src/app/app-routing.module.ts | 2 +- .../_base_with_home/files/src/app/app-routing.module.ts | 2 +- .../projects/empty/files/src/app/app-routing.module.ts | 2 +- .../igx-ts/projects/_base/files/src/app/app.config.ts | 4 ++-- .../projects/_base_with_home/files/src/app/app.config.ts | 4 ++-- .../igx-ts/projects/empty/files/src/app/app.config.ts | 4 ++-- .../igx-ts/projects/side-nav-auth/files/src/app/app.config.ts | 4 ++-- .../igx-ts/projects/side-nav/files/src/app/app.config.ts | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/igx-templates/igx-ts-legacy/projects/_base/files/src/app/app-routing.module.ts b/packages/igx-templates/igx-ts-legacy/projects/_base/files/src/app/app-routing.module.ts index 61db0398a..4c2de81e5 100644 --- a/packages/igx-templates/igx-ts-legacy/projects/_base/files/src/app/app-routing.module.ts +++ b/packages/igx-templates/igx-ts-legacy/projects/_base/files/src/app/app-routing.module.ts @@ -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 { } diff --git a/packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/src/app/app-routing.module.ts b/packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/src/app/app-routing.module.ts index 12e760d0e..e526dc337 100644 --- a/packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/src/app/app-routing.module.ts +++ b/packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/src/app/app-routing.module.ts @@ -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 { } diff --git a/packages/igx-templates/igx-ts-legacy/projects/empty/files/src/app/app-routing.module.ts b/packages/igx-templates/igx-ts-legacy/projects/empty/files/src/app/app-routing.module.ts index 851a7c06e..9506dae53 100644 --- a/packages/igx-templates/igx-ts-legacy/projects/empty/files/src/app/app-routing.module.ts +++ b/packages/igx-templates/igx-ts-legacy/projects/empty/files/src/app/app-routing.module.ts @@ -8,7 +8,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], + imports: [RouterModule.forRoot(routes, { bindToComponentInputs: true })], exports: [RouterModule] }) export class AppRoutingModule { } diff --git a/packages/igx-templates/igx-ts/projects/_base/files/src/app/app.config.ts b/packages/igx-templates/igx-ts/projects/_base/files/src/app/app.config.ts index ab9812036..2466735ec 100644 --- a/packages/igx-templates/igx-ts/projects/_base/files/src/app/app.config.ts +++ b/packages/igx-templates/igx-ts/projects/_base/files/src/app/app.config.ts @@ -1,5 +1,5 @@ import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withComponentInputBinding } from '@angular/router'; import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { provideAnimations } from '@angular/platform-browser/animations'; @@ -7,7 +7,7 @@ import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ - provideRouter(routes), + provideRouter(routes, withComponentInputBinding()), importProvidersFrom(BrowserModule, HammerModule), provideAnimations(), // provide the HAMMER_GESTURE_CONFIG token diff --git a/packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts b/packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts index 6c6ef6035..b4a42d429 100644 --- a/packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts +++ b/packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts @@ -1,8 +1,8 @@ import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withComponentInputBinding } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes)] + providers: [provideRouter(routes, withComponentInputBinding())] }; diff --git a/packages/igx-templates/igx-ts/projects/empty/files/src/app/app.config.ts b/packages/igx-templates/igx-ts/projects/empty/files/src/app/app.config.ts index 6c6ef6035..b4a42d429 100644 --- a/packages/igx-templates/igx-ts/projects/empty/files/src/app/app.config.ts +++ b/packages/igx-templates/igx-ts/projects/empty/files/src/app/app.config.ts @@ -1,8 +1,8 @@ import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withComponentInputBinding } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes)] + providers: [provideRouter(routes, withComponentInputBinding())] }; diff --git a/packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.config.ts b/packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.config.ts index 405b50387..508208d6c 100644 --- a/packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.config.ts +++ b/packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.config.ts @@ -1,5 +1,5 @@ import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withComponentInputBinding } from '@angular/router'; import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { provideAnimations } from '@angular/platform-browser/animations'; import { IgxNavigationDrawerModule, IgxNavbarModule, IgxLayoutModule, IgxRippleModule } from 'igniteui-angular'; @@ -9,7 +9,7 @@ import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ - provideRouter(routes), + provideRouter(routes, withComponentInputBinding()), importProvidersFrom( BrowserModule, HammerModule, diff --git a/packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.config.ts b/packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.config.ts index 5ad75d272..963f647b3 100644 --- a/packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.config.ts +++ b/packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.config.ts @@ -1,5 +1,5 @@ import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withComponentInputBinding } from '@angular/router'; import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { provideAnimations } from '@angular/platform-browser/animations'; import { IgxNavigationDrawerModule, IgxNavbarModule, IgxLayoutModule, IgxRippleModule } from 'igniteui-angular'; @@ -8,7 +8,7 @@ import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ - provideRouter(routes), + provideRouter(routes, withComponentInputBinding()), importProvidersFrom( BrowserModule, HammerModule, From 2369c556b8f84ce6a575c73b617c7581cedf5c0f Mon Sep 17 00:00:00 2001 From: Ivaylo Barakov Date: Wed, 17 Jan 2024 17:37:07 +0200 Subject: [PATCH 2/6] fix(igr-ts): add github workflows folder (#1192) --- .../files/__dot__github/workflows/node.js.yml | 33 +++++++++++++++++++ .../react/igr-ts/projects/_base/index.ts | 3 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml new file mode 100644 index 000000000..5a0946e79 --- /dev/null +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml @@ -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 + diff --git a/packages/cli/templates/react/igr-ts/projects/_base/index.ts b/packages/cli/templates/react/igr-ts/projects/_base/index.ts index 62d9a7cac..00d37fec2 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/index.ts +++ b/packages/cli/templates/react/igr-ts/projects/_base/index.ts @@ -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" }; } } From c4e1f5c8d65dd8729083377973a40450b4899d63 Mon Sep 17 00:00:00 2001 From: Ivaylo Barakov Date: Wed, 17 Jan 2024 17:40:09 +0200 Subject: [PATCH 3/6] fix: open browser on app start (#1187) --- .../templates/react/igr-ts/projects/_base/files/vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts b/packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts index 4443712a3..95ca2ae68 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts @@ -18,6 +18,7 @@ export default defineConfig({ mainFields: ['module'], }, server: { + open: true, port: 3003 } }) From cef76c11043abdf71530508f9d0748444f53b623 Mon Sep 17 00:00:00 2001 From: Boris Penkov Date: Wed, 17 Jan 2024 17:46:16 +0200 Subject: [PATCH 4/6] Replace base app name with placeholders (#1194) --- .../igx-ts/projects/_base/files/angular.json | 197 +++++++++--------- 1 file changed, 99 insertions(+), 98 deletions(-) diff --git a/packages/igx-templates/igx-ts/projects/_base/files/angular.json b/packages/igx-templates/igx-ts/projects/_base/files/angular.json index 118f92360..d3bb0121f 100644 --- a/packages/igx-templates/igx-ts/projects/_base/files/angular.json +++ b/packages/igx-templates/igx-ts/projects/_base/files/angular.json @@ -3,105 +3,106 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "NgStandaloneApp": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:application", - "options": { - "outputPath": "dist/ng-standalone-app", - "index": "src/index.html", - "browser": "src/main.ts", - "polyfills": [ - "zone.js" - ], - "tsConfig": "tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss"<%=DefaultTheme%> - ], - "scripts": [ - "./node_modules/hammerjs/hammer.min.js" - ], - "stylePreprocessorOptions": { - "includePaths": ["node_modules"] - } + "<%=dashName%>": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "NgStandaloneApp:build:production" - }, - "development": { - "buildTarget": "NgStandaloneApp:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "NgStandaloneApp:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "polyfills": [ - "zone.js", - "zone.js/testing" - ], - "tsConfig": "tsconfig.spec.json", - "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/<%=dashName%>", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss"<%=DefaultTheme%> + ], + "scripts": [ + "./node_modules/hammerjs/hammer.min.js" + ], + "stylePreprocessorOptions": { + "includePaths": [ + "node_modules" + ] + } + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "<%=dashName%>:build:production" + }, + "development": { + "buildTarget": "<%=dashName%>:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "<%=dashName%>:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + } } - } } - } } - } - \ No newline at end of file +} From e9dbfd7d6212f1b8535de6a142f6140e3848f6ef Mon Sep 17 00:00:00 2001 From: Viktor Aladzhov Date: Wed, 17 Jan 2024 20:48:38 +0200 Subject: [PATCH 5/6] feat(igc-ts): bump the version to 4.7.0 and add new components (#1189) --- .../src/app/__path__/__filePrefix__.test.ts | 9 ++++++++ .../files/src/app/__path__/__filePrefix__.ts | 21 +++++++++++++++++++ .../igc-ts/button-group/default/index.ts | 19 +++++++++++++++++ .../igc-ts/button-group/index.ts | 14 +++++++++++++ .../files/src/app/__path__/__filePrefix__.ts | 4 ++-- .../igc-ts/projects/_base/files/package.json | 2 +- .../_base_with_home/files/package.json | 16 +++++++------- .../src/app/__path__/__filePrefix__.test.ts | 9 ++++++++ .../files/src/app/__path__/__filePrefix__.ts | 19 +++++++++++++++++ .../igc-ts/text-area/default/index.ts | 19 +++++++++++++++++ .../webcomponents/igc-ts/text-area/index.ts | 17 +++++++++++++++ 11 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.test.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/button-group/default/index.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/button-group/index.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.test.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/text-area/default/index.ts create mode 100644 packages/cli/templates/webcomponents/igc-ts/text-area/index.ts diff --git a/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.test.ts b/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.test.ts new file mode 100644 index 000000000..392626d5c --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.test.ts @@ -0,0 +1,9 @@ +import { expect } from '@open-wc/testing'; +import $(ClassName) from './$(path).js'; + +describe('IgcButtonGroupComponent', () => { + it(' is an instance of $(ClassName)', async () => { + const element = document.createElement('app-$(path)'); + expect(element).to.be.instanceOf($(ClassName)); + }); +}); diff --git a/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.ts b/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.ts new file mode 100644 index 000000000..ad49c05c0 --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/button-group/default/files/src/app/__path__/__filePrefix__.ts @@ -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` + + Left + Center + Right + + `; + } +} diff --git a/packages/cli/templates/webcomponents/igc-ts/button-group/default/index.ts b/packages/cli/templates/webcomponents/igc-ts/button-group/default/index.ts new file mode 100644 index 000000000..270e1e4e6 --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/button-group/default/index.ts @@ -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(); diff --git a/packages/cli/templates/webcomponents/igc-ts/button-group/index.ts b/packages/cli/templates/webcomponents/igc-ts/button-group/index.ts new file mode 100644 index 000000000..5f697d204 --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/button-group/index.ts @@ -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(); diff --git a/packages/cli/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts b/packages/cli/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts index 9e8635bd8..83ec64969 100644 --- a/packages/cli/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts +++ b/packages/cli/templates/webcomponents/igc-ts/grid/grid-editing/files/src/app/__path__/__filePrefix__.ts @@ -3,7 +3,7 @@ import { customElement } from 'lit/decorators.js'; import { EditModeType, GridActivationMode, - GridSelectionMode, + DataGridSelectionMode, IgcDataGridComponent, IgcDataGridModule, IgcGridCellValueChangingEventArgs, @@ -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; } diff --git a/packages/cli/templates/webcomponents/igc-ts/projects/_base/files/package.json b/packages/cli/templates/webcomponents/igc-ts/projects/_base/files/package.json index d8e9994e2..1eccb1ccb 100644 --- a/packages/cli/templates/webcomponents/igc-ts/projects/_base/files/package.json +++ b/packages/cli/templates/webcomponents/igc-ts/projects/_base/files/package.json @@ -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", diff --git a/packages/cli/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json b/packages/cli/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json index 22d7fe06f..f12f072d5 100644 --- a/packages/cli/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +++ b/packages/cli/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json @@ -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" }, diff --git a/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.test.ts b/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.test.ts new file mode 100644 index 000000000..f8fd7fc6e --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.test.ts @@ -0,0 +1,9 @@ +import { expect } from '@open-wc/testing'; +import $(ClassName) from './$(path).js'; + +describe('IgcTextareaComponent', () => { + it(' is an instance of $(ClassName)', async () => { + const element = document.createElement('app-$(path)'); + expect(element).to.be.instanceOf($(ClassName)); + }); +}); diff --git a/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.ts b/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.ts new file mode 100644 index 000000000..99ed4eca7 --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/text-area/default/files/src/app/__path__/__filePrefix__.ts @@ -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` + + + `; + } +} diff --git a/packages/cli/templates/webcomponents/igc-ts/text-area/default/index.ts b/packages/cli/templates/webcomponents/igc-ts/text-area/default/index.ts new file mode 100644 index 000000000..8d993831a --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/text-area/default/index.ts @@ -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(); diff --git a/packages/cli/templates/webcomponents/igc-ts/text-area/index.ts b/packages/cli/templates/webcomponents/igc-ts/text-area/index.ts new file mode 100644 index 000000000..d39afa117 --- /dev/null +++ b/packages/cli/templates/webcomponents/igc-ts/text-area/index.ts @@ -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(); From 5f6cd6309fc0eb041600fabc03e163b85f40f672 Mon Sep 17 00:00:00 2001 From: lipata Date: Wed, 17 Jan 2024 20:55:10 +0200 Subject: [PATCH 6/6] chore: release 13.1.3 --- CHANGELOG.md | 16 ++++++++++++++++ packages/cli/package.json | 6 +++--- packages/core/package.json | 2 +- packages/igx-templates/package.json | 4 ++-- packages/ng-schematics/package.json | 6 +++--- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7060489c..1f0ee4819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/cli/package.json b/packages/cli/package.json index 50a4a80c5..1a86fc157 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -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", @@ -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", diff --git a/packages/core/package.json b/packages/core/package.json index 68399399a..cf270533a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/igx-templates/package.json b/packages/igx-templates/package.json index 7a5c774c5..dbc1b128b 100644 --- a/packages/igx-templates/package.json +++ b/packages/igx-templates/package.json @@ -1,6 +1,6 @@ { "name": "@igniteui/angular-templates", - "version": "17.1.1312", + "version": "17.1.1313", "description": "Templates for Ignite UI for Angular projects and components", "repository": { "type": "git", @@ -12,7 +12,7 @@ "author": "Infragistics", "license": "MIT", "dependencies": { - "@igniteui/cli-core": "~13.1.2", + "@igniteui/cli-core": "~13.1.3", "typescript": "~4.7.2" } } diff --git a/packages/ng-schematics/package.json b/packages/ng-schematics/package.json index 4ee31b046..2ebfe3fcb 100644 --- a/packages/ng-schematics/package.json +++ b/packages/ng-schematics/package.json @@ -1,6 +1,6 @@ { "name": "@igniteui/angular-schematics", - "version": "17.1.1312", + "version": "17.1.1313", "description": "Ignite UI for Angular Schematics for ng new and ng generate", "repository": { "type": "git", @@ -20,8 +20,8 @@ "dependencies": { "@angular-devkit/core": "~14.0.0", "@angular-devkit/schematics": "~14.0.0", - "@igniteui/angular-templates": "~17.1.1312", - "@igniteui/cli-core": "~13.1.2", + "@igniteui/angular-templates": "~17.1.1313", + "@igniteui/cli-core": "~13.1.3", "@schematics/angular": "~14.0.0", "rxjs": "^6.6.3" },