From 181e00bbfac6b57312be70ce35b7da327bbc2922 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 22 Jul 2024 13:53:51 -0400 Subject: [PATCH 1/5] remove material buttons --- src/app/translate-demo/translate-demo.component.css | 0 src/app/translate-demo/translate-demo.component.html | 8 +++++--- src/app/translate-demo/translate-demo.component.ts | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 src/app/translate-demo/translate-demo.component.css diff --git a/src/app/translate-demo/translate-demo.component.css b/src/app/translate-demo/translate-demo.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/translate-demo/translate-demo.component.html b/src/app/translate-demo/translate-demo.component.html index b8a42b7e..e1172f5f 100644 --- a/src/app/translate-demo/translate-demo.component.html +++ b/src/app/translate-demo/translate-demo.component.html @@ -1,8 +1,10 @@

Translate

- - - +
+ + + +

{{ 'TITLE' | translate }} diff --git a/src/app/translate-demo/translate-demo.component.ts b/src/app/translate-demo/translate-demo.component.ts index 46145daa..70bc59e9 100644 --- a/src/app/translate-demo/translate-demo.component.ts +++ b/src/app/translate-demo/translate-demo.component.ts @@ -3,8 +3,7 @@ import { TranslateService } from '@ngstack/translate'; @Component({ selector: 'app-translate-demo', - templateUrl: './translate-demo.component.html', - styleUrls: ['./translate-demo.component.css'], + templateUrl: './translate-demo.component.html' }) export class TranslateDemoComponent { constructor(private translate: TranslateService) {} From 6f4ae7346bc1d2d6785f636f22f15f0228dadc6a Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 22 Jul 2024 13:55:40 -0400 Subject: [PATCH 2/5] cleanup empty css files --- src/app/app.component.css | 0 src/app/app.component.ts | 3 +-- src/app/app.module.ts | 6 +----- .../translate-lazy-demo/demo-page/demo-page.component.css | 0 .../translate-lazy-demo/demo-page/demo-page.component.ts | 3 +-- 5 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 src/app/app.component.css delete mode 100644 src/app/translate-lazy-demo/demo-page/demo-page.component.css diff --git a/src/app/app.component.css b/src/app/app.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e871b901..1fcab37d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,8 +3,7 @@ import { TitleService } from '@ngstack/translate'; @Component({ selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], + templateUrl: './app.component.html' }) export class AppComponent implements OnInit { constructor(private titleService: TitleService) {} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e10074d1..7268cb51 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,8 +2,6 @@ import { NgModule, APP_INITIALIZER } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule, Route } from '@angular/router'; import { TranslateModule, TranslateService } from '@ngstack/translate'; -import { MatButtonModule } from '@angular/material/button'; -import { MatSelectModule } from '@angular/material/select'; import { HttpClientModule } from '@angular/common/http'; import { AppComponent } from './app.component'; @@ -35,9 +33,7 @@ export function setupTranslateService(service: TranslateService) { BrowserAnimationsModule, RouterModule.forRoot(routes), HttpClientModule, - TranslateModule.forRoot(), - MatButtonModule, - MatSelectModule, + TranslateModule.forRoot() ], declarations: [AppComponent, TranslateDemoComponent, CustomTranslatePipe], providers: [ diff --git a/src/app/translate-lazy-demo/demo-page/demo-page.component.css b/src/app/translate-lazy-demo/demo-page/demo-page.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/translate-lazy-demo/demo-page/demo-page.component.ts b/src/app/translate-lazy-demo/demo-page/demo-page.component.ts index 485d2a88..7ea3b236 100644 --- a/src/app/translate-lazy-demo/demo-page/demo-page.component.ts +++ b/src/app/translate-lazy-demo/demo-page/demo-page.component.ts @@ -3,7 +3,6 @@ import { Component } from '@angular/core'; @Component({ // eslint-disable-next-line @angular-eslint/component-selector selector: 'ngs-demo-page', - templateUrl: './demo-page.component.html', - styleUrls: ['./demo-page.component.css'], + templateUrl: './demo-page.component.html' }) export class DemoPageComponent {} From de65e0be8f5f9b6a6d66af241845f8b8d80b4fbd Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 22 Jul 2024 13:58:35 -0400 Subject: [PATCH 3/5] cleanup angular config --- angular.json | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/angular.json b/angular.json index f1239237..9c9b80c6 100644 --- a/angular.json +++ b/angular.json @@ -24,23 +24,9 @@ "tsConfig": "src/tsconfig.app.json", "assets": [ "src/favicon.ico", - "src/assets", - { - "glob": "**/*", - "input": "node_modules/monaco-editor/min", - "output": "./assets/monaco" - }, - { - "glob": "**/*.js", - "input": "dist/@ngstack/code-editor/workers", - "output": "./assets/workers" - } + "src/assets" ], "styles": [ - { - "input": "node_modules/@angular/material/prebuilt-themes/indigo-pink.css", - "inject": true - }, "src/styles.css" ], "scripts": [], @@ -98,10 +84,6 @@ "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ - { - "input": "node_modules/@angular/material/prebuilt-themes/indigo-pink.css", - "inject": true - }, "src/styles.css" ], "scripts": [], From 53c86417c340484f1e30e7868e8faf4ae60240ea Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 22 Jul 2024 14:00:45 -0400 Subject: [PATCH 4/5] remove angular material --- package-lock.json | 786 ---------------------------------------------- package.json | 2 - 2 files changed, 788 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fba48ca..395c678d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,8 +15,6 @@ "@angular/common": "^15.2.1", "@angular/compiler": "^15.2.1", "@angular/core": "^15.2.1", - "@angular/forms": "^15.2.1", - "@angular/material": "^15.2.1", "@angular/platform-browser": "^15.2.1", "@angular/platform-browser-dynamic": "^15.2.1", "@angular/router": "^15.2.1", @@ -1286,22 +1284,6 @@ "zone.js": "~0.11.4 || ~0.12.0 || ~0.13.0" } }, - "node_modules/@angular/forms": { - "version": "15.2.1", - "license": "MIT", - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": "^14.20.0 || ^16.13.0 || >=18.10.0" - }, - "peerDependencies": { - "@angular/common": "15.2.1", - "@angular/core": "15.2.1", - "@angular/platform-browser": "15.2.1", - "rxjs": "^6.5.3 || ^7.4.0" - } - }, "node_modules/@angular/language-service": { "version": "15.2.1", "dev": true, @@ -1310,69 +1292,6 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" } }, - "node_modules/@angular/material": { - "version": "15.2.1", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/auto-init": "15.0.0-canary.684e33d25.0", - "@material/banner": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/button": "15.0.0-canary.684e33d25.0", - "@material/card": "15.0.0-canary.684e33d25.0", - "@material/checkbox": "15.0.0-canary.684e33d25.0", - "@material/chips": "15.0.0-canary.684e33d25.0", - "@material/circular-progress": "15.0.0-canary.684e33d25.0", - "@material/data-table": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dialog": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/drawer": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/fab": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/floating-label": "15.0.0-canary.684e33d25.0", - "@material/form-field": "15.0.0-canary.684e33d25.0", - "@material/icon-button": "15.0.0-canary.684e33d25.0", - "@material/image-list": "15.0.0-canary.684e33d25.0", - "@material/layout-grid": "15.0.0-canary.684e33d25.0", - "@material/line-ripple": "15.0.0-canary.684e33d25.0", - "@material/linear-progress": "15.0.0-canary.684e33d25.0", - "@material/list": "15.0.0-canary.684e33d25.0", - "@material/menu": "15.0.0-canary.684e33d25.0", - "@material/menu-surface": "15.0.0-canary.684e33d25.0", - "@material/notched-outline": "15.0.0-canary.684e33d25.0", - "@material/radio": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/segmented-button": "15.0.0-canary.684e33d25.0", - "@material/select": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/slider": "15.0.0-canary.684e33d25.0", - "@material/snackbar": "15.0.0-canary.684e33d25.0", - "@material/switch": "15.0.0-canary.684e33d25.0", - "@material/tab": "15.0.0-canary.684e33d25.0", - "@material/tab-bar": "15.0.0-canary.684e33d25.0", - "@material/tab-indicator": "15.0.0-canary.684e33d25.0", - "@material/tab-scroller": "15.0.0-canary.684e33d25.0", - "@material/textfield": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tooltip": "15.0.0-canary.684e33d25.0", - "@material/top-app-bar": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@angular/animations": "^15.0.0 || ^16.0.0", - "@angular/cdk": "15.2.1", - "@angular/common": "^15.0.0 || ^16.0.0", - "@angular/core": "^15.0.0 || ^16.0.0", - "@angular/forms": "^15.0.0 || ^16.0.0", - "@angular/platform-browser": "^15.0.0 || ^16.0.0", - "rxjs": "^6.5.3 || ^7.4.0" - } - }, "node_modules/@angular/platform-browser": { "version": "15.2.1", "license": "MIT", @@ -3968,707 +3887,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@material/animation": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/auto-init": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/banner": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/button": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/base": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/button": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/card": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/checkbox": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/chips": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/checkbox": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "safevalues": "^0.3.4", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/circular-progress": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/progress-indicator": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/data-table": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/checkbox": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/icon-button": "15.0.0-canary.684e33d25.0", - "@material/linear-progress": "15.0.0-canary.684e33d25.0", - "@material/list": "15.0.0-canary.684e33d25.0", - "@material/menu": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/select": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/density": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/dialog": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/button": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/icon-button": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/dom": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/drawer": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/list": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/elevation": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/fab": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/feature-targeting": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/floating-label": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/focus-ring": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0" - } - }, - "node_modules/@material/form-field": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/icon-button": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/image-list": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/layout-grid": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/line-ripple": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/linear-progress": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/progress-indicator": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/list": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/menu": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/list": "15.0.0-canary.684e33d25.0", - "@material/menu-surface": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/menu-surface": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/notched-outline": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/floating-label": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/progress-indicator": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@material/radio": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/ripple": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/rtl": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/segmented-button": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/touch-target": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/select": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/floating-label": "15.0.0-canary.684e33d25.0", - "@material/line-ripple": "15.0.0-canary.684e33d25.0", - "@material/list": "15.0.0-canary.684e33d25.0", - "@material/menu": "15.0.0-canary.684e33d25.0", - "@material/menu-surface": "15.0.0-canary.684e33d25.0", - "@material/notched-outline": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/shape": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/slider": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/snackbar": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/button": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/icon-button": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/switch": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "safevalues": "^0.3.4", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/tab": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/focus-ring": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/tab-indicator": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/tab-bar": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/tab": "15.0.0-canary.684e33d25.0", - "@material/tab-indicator": "15.0.0-canary.684e33d25.0", - "@material/tab-scroller": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/tab-indicator": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/tab-scroller": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/tab": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/textfield": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/density": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/floating-label": "15.0.0-canary.684e33d25.0", - "@material/line-ripple": "15.0.0-canary.684e33d25.0", - "@material/notched-outline": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/theme": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/tokens": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/elevation": "15.0.0-canary.684e33d25.0" - } - }, - "node_modules/@material/tooltip": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/button": "15.0.0-canary.684e33d25.0", - "@material/dom": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/tokens": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "safevalues": "^0.3.4", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/top-app-bar": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/animation": "15.0.0-canary.684e33d25.0", - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/elevation": "15.0.0-canary.684e33d25.0", - "@material/ripple": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/shape": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "@material/typography": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/touch-target": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/base": "15.0.0-canary.684e33d25.0", - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/rtl": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, - "node_modules/@material/typography": { - "version": "15.0.0-canary.684e33d25.0", - "license": "MIT", - "dependencies": { - "@material/feature-targeting": "15.0.0-canary.684e33d25.0", - "@material/theme": "15.0.0-canary.684e33d25.0", - "tslib": "^2.1.0" - } - }, "node_modules/@ngtools/webpack": { "version": "15.2.1", "dev": true, @@ -13352,10 +12570,6 @@ "dev": true, "license": "MIT" }, - "node_modules/safevalues": { - "version": "0.3.4", - "license": "Apache-2.0" - }, "node_modules/sass": { "version": "1.58.1", "dev": true, diff --git a/package.json b/package.json index 29083958..92735e25 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,6 @@ "@angular/common": "^15.2.1", "@angular/compiler": "^15.2.1", "@angular/core": "^15.2.1", - "@angular/forms": "^15.2.1", - "@angular/material": "^15.2.1", "@angular/platform-browser": "^15.2.1", "@angular/platform-browser-dynamic": "^15.2.1", "@angular/router": "^15.2.1", From 034b1d643b583a3dc0995079bd8925fd4d323341 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 22 Jul 2024 14:03:52 -0400 Subject: [PATCH 5/5] fix formatting --- .prettierrc | 5 +- projects/translate/karma.conf.js | 10 ++-- .../translate/src/lib/title.service.spec.ts | 2 +- projects/translate/src/lib/title.service.ts | 4 +- .../src/lib/translate.directive.spec.ts | 8 +-- .../translate/src/lib/translate.directive.ts | 2 +- .../translate/src/lib/translate.module.ts | 8 +-- .../translate/src/lib/translate.pipe.spec.ts | 2 +- projects/translate/src/lib/translate.pipe.ts | 2 +- .../src/lib/translate.service.spec.ts | 54 +++++++++---------- .../translate/src/lib/translate.service.ts | 10 ++-- projects/translate/src/test.ts | 4 +- src/app/app.component.spec.ts | 4 +- src/app/app.module.ts | 12 ++--- .../translate-demo/custom-translate.pipe.ts | 2 +- .../translate-demo.component.spec.ts | 2 +- .../demo-page/demo-page.component.spec.ts | 2 +- .../translate-lazy-demo.module.ts | 6 +-- src/environments/environment.prod.ts | 2 +- src/environments/environment.ts | 2 +- src/karma.conf.js | 10 ++-- src/test.ts | 4 +- 22 files changed, 79 insertions(+), 78 deletions(-) diff --git a/.prettierrc b/.prettierrc index 92cde390..32ebab4e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,4 @@ { - "singleQuote": true -} \ No newline at end of file + "singleQuote": true, + "trailingComma": "none" +} diff --git a/projects/translate/karma.conf.js b/projects/translate/karma.conf.js index 1f9f587f..39df256e 100644 --- a/projects/translate/karma.conf.js +++ b/projects/translate/karma.conf.js @@ -10,18 +10,18 @@ module.exports = function (config) { require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma'), + require('@angular-devkit/build-angular/plugins/karma') ], client: { - clearContext: false, // leave Jasmine Spec Runner output visible in browser + clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { - suppressAll: true, // removes the duplicated traces + suppressAll: true // removes the duplicated traces }, coverageReporter: { dir: require('path').join(__dirname, '../../coverage/translate'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }] }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -30,6 +30,6 @@ module.exports = function (config) { autoWatch: true, browsers: ['ChromeHeadless'], singleRun: true, - restartOnFileChange: true, + restartOnFileChange: true }); }; diff --git a/projects/translate/src/lib/title.service.spec.ts b/projects/translate/src/lib/title.service.spec.ts index 9d8b873b..8f071dba 100644 --- a/projects/translate/src/lib/title.service.spec.ts +++ b/projects/translate/src/lib/title.service.spec.ts @@ -13,7 +13,7 @@ describe('TitleService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientModule], - providers: [TitleService, TranslateService, Title], + providers: [TitleService, TranslateService, Title] }); translateService = TestBed.inject(TranslateService); diff --git a/projects/translate/src/lib/title.service.ts b/projects/translate/src/lib/title.service.ts index 2953448f..7bb82b36 100644 --- a/projects/translate/src/lib/title.service.ts +++ b/projects/translate/src/lib/title.service.ts @@ -4,7 +4,7 @@ import { TranslateService } from './translate.service'; import { Subject } from 'rxjs'; @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class TitleService { private _titleKey = ''; @@ -35,7 +35,7 @@ export class TitleService { this.changed.next({ previousValue: previousValue, - currentValue: newValue, + currentValue: newValue }); } } diff --git a/projects/translate/src/lib/translate.directive.spec.ts b/projects/translate/src/lib/translate.directive.spec.ts index 4a7f34a7..c1985775 100644 --- a/projects/translate/src/lib/translate.directive.spec.ts +++ b/projects/translate/src/lib/translate.directive.spec.ts @@ -15,7 +15,7 @@ import { HttpClientModule } from '@angular/common/http'; [translateParams]="{ name: 'Bob' }" >

- `, + ` }) class TestComponent { message = 'message1'; @@ -29,7 +29,7 @@ describe('TranslateDirective', () => { TestBed.configureTestingModule({ imports: [HttpClientModule], declarations: [TestComponent, TranslateDirective], - providers: [TranslateService], + providers: [TranslateService] }); translate = TestBed.inject(TranslateService); @@ -37,13 +37,13 @@ describe('TranslateDirective', () => { translate.use('en', { message1: 'hello, world', key1: 'hello, there', - formatted: 'hello, {name}', + formatted: 'hello, {name}' }); translate.use('ua', { message1: '[ua] hello, world', key1: '[ua] hello, there', - formatted: '[ua] hello, {name}', + formatted: '[ua] hello, {name}' }); fixture = TestBed.createComponent(TestComponent); diff --git a/projects/translate/src/lib/translate.directive.ts b/projects/translate/src/lib/translate.directive.ts index bc27ff82..f91d1790 100644 --- a/projects/translate/src/lib/translate.directive.ts +++ b/projects/translate/src/lib/translate.directive.ts @@ -5,7 +5,7 @@ import { takeUntil } from 'rxjs/operators'; @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector - selector: '[translate]', + selector: '[translate]' }) export class TranslateDirective implements OnInit, OnDestroy { private onDestroy$ = new Subject(); diff --git a/projects/translate/src/lib/translate.module.ts b/projects/translate/src/lib/translate.module.ts index 6e748b05..00012d87 100644 --- a/projects/translate/src/lib/translate.module.ts +++ b/projects/translate/src/lib/translate.module.ts @@ -9,7 +9,7 @@ import { TranslateDirective } from './translate.directive'; @NgModule({ imports: [CommonModule], declarations: [TranslatePipe, TranslateDirective], - exports: [TranslatePipe, TranslateDirective], + exports: [TranslatePipe, TranslateDirective] }) export class TranslateModule { static forRoot( @@ -20,14 +20,14 @@ export class TranslateModule { providers: [ { provide: TRANSLATE_SETTINGS, useValue: settings }, TranslateService, - TitleService, - ], + TitleService + ] }; } static forChild(): ModuleWithProviders { return { - ngModule: TranslateModule, + ngModule: TranslateModule }; } } diff --git a/projects/translate/src/lib/translate.pipe.spec.ts b/projects/translate/src/lib/translate.pipe.spec.ts index d52cce89..87060570 100644 --- a/projects/translate/src/lib/translate.pipe.spec.ts +++ b/projects/translate/src/lib/translate.pipe.spec.ts @@ -10,7 +10,7 @@ describe('TranslatePipe', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientModule], - providers: [TranslateService], + providers: [TranslateService] }); translate = TestBed.inject(TranslateService); diff --git a/projects/translate/src/lib/translate.pipe.ts b/projects/translate/src/lib/translate.pipe.ts index f3a64aac..bdddd3d4 100644 --- a/projects/translate/src/lib/translate.pipe.ts +++ b/projects/translate/src/lib/translate.pipe.ts @@ -3,7 +3,7 @@ import { TranslateService, TranslateParams } from './translate.service'; @Pipe({ name: 'translate', - pure: false, + pure: false }) export class TranslatePipe implements PipeTransform { constructor(private translate: TranslateService) {} diff --git a/projects/translate/src/lib/translate.service.spec.ts b/projects/translate/src/lib/translate.service.spec.ts index d7aa88ff..d975dca0 100644 --- a/projects/translate/src/lib/translate.service.spec.ts +++ b/projects/translate/src/lib/translate.service.spec.ts @@ -11,7 +11,7 @@ describe('TranslateService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientModule], - providers: [TranslateService], + providers: [TranslateService] }); translate = TestBed.inject(TranslateService); @@ -195,7 +195,7 @@ describe('TranslateService', () => { expect(result).toEqual({ key1: 'value1', key2: 'value2', - key3: 'value3', + key3: 'value3' }); }); @@ -211,13 +211,13 @@ describe('TranslateService', () => { expect(result).toEqual({ key1: 'value1', key2: { - child1_key: 'child1_value', + child1_key: 'child1_value' }, key3: { child2: { - sub1: 'sub2', - }, - }, + sub1: 'sub2' + } + } }); }); @@ -229,7 +229,7 @@ describe('TranslateService', () => { const result = await translate.use('en', version2); expect(result).toEqual({ - key1: ['one', 'two', 'three', 'four'], + key1: ['one', 'two', 'three', 'four'] }); }); @@ -243,8 +243,8 @@ describe('TranslateService', () => { expect(result).toEqual({ key1: { value1: 'one', - value2: 'two', - }, + value2: 'two' + } }); }); @@ -256,7 +256,7 @@ describe('TranslateService', () => { const result = await translate.use('en', version2); expect(result).toEqual({ - key1: 'value2', + key1: 'value2' }); }); @@ -264,9 +264,9 @@ describe('TranslateService', () => { const data = { MAIN: { APPLICATION: { - TITLE: 'Hello there!', - }, - }, + TITLE: 'Hello there!' + } + } }; await translate.use('en', data); @@ -278,8 +278,8 @@ describe('TranslateService', () => { it('should return key when sub-property missing', async () => { const data = { MAIN: { - APPLICATION: {}, - }, + APPLICATION: {} + } }; await translate.use('en', data); @@ -305,7 +305,7 @@ describe('TranslateService', () => { it('should translate when key is a property path', async () => { const data = { - 'MAIN.APPLICATION.TITLE': 'Hello there!', + 'MAIN.APPLICATION.TITLE': 'Hello there!' }; await translate.use('en', data); @@ -314,7 +314,7 @@ describe('TranslateService', () => { it('should use translate using format params', async () => { const data = { - MESSAGE_FORMAT: 'Hello, {username}!', + MESSAGE_FORMAT: 'Hello, {username}!' }; await translate.use('en', data); @@ -325,13 +325,13 @@ describe('TranslateService', () => { it('should use multiple format params', async () => { const data = { - MESSAGE_FORMAT: '{message}, {username}!', + MESSAGE_FORMAT: '{message}, {username}!' }; await translate.use('en', data); const result = translate.get('MESSAGE_FORMAT', { message: 'Hello', - username: 'Denys', + username: 'Denys' }); expect(result).toEqual('Hello, Denys!'); @@ -339,12 +339,12 @@ describe('TranslateService', () => { it('should use numbers as format params', async () => { const data = { - MESSAGE: 'You got {num} unread messages.', + MESSAGE: 'You got {num} unread messages.' }; await translate.use('en', data); const result = translate.get('MESSAGE', { - num: 12, + num: 12 }); expect(result).toEqual('You got 12 unread messages.'); @@ -354,7 +354,7 @@ describe('TranslateService', () => { const data = { VALUE_1: 'Value {num1}.', VALUE_2: 'Value {num2}.', - VALUE_3: 'Value {num1} again.', + VALUE_3: 'Value {num1} again.' }; await translate.use('en', data); @@ -362,7 +362,7 @@ describe('TranslateService', () => { const inputs = ['VALUE_1', 'VALUE_2', 'VALUE_3']; const context = { num1: 1, - num2: 2, + num2: 2 }; const result = translate.get(inputs, context, 'en'); expect(result).toEqual(['Value 1.', 'Value 2.', 'Value 1 again.']); @@ -370,7 +370,7 @@ describe('TranslateService', () => { it('should use original string when format params not provided', async () => { const data = { - MESSAGE_FORMAT: 'Hello, {username}!', + MESSAGE_FORMAT: 'Hello, {username}!' }; await translate.use('en', data); @@ -381,7 +381,7 @@ describe('TranslateService', () => { it('should use original string when format params are empty', async () => { const data = { - MESSAGE_FORMAT: 'Hello, {username}!', + MESSAGE_FORMAT: 'Hello, {username}!' }; await translate.use('en', data); @@ -586,11 +586,11 @@ describe('TranslateService', () => { expect(result).toEqual({ key1: 'value1', - key2: 'value2', + key2: 'value2' }); expect(httpMock.calls.argsFor(0)).toEqual([ - `${translate.translationRoot}/en.json`, + `${translate.translationRoot}/en.json` ]); expect(httpMock.calls.argsFor(1)).toEqual([`custom/path/en.json`]); diff --git a/projects/translate/src/lib/translate.service.ts b/projects/translate/src/lib/translate.service.ts index a4c69e3d..09ad4ae8 100644 --- a/projects/translate/src/lib/translate.service.ts +++ b/projects/translate/src/lib/translate.service.ts @@ -3,7 +3,7 @@ import { EventEmitter, Inject, InjectionToken, - Optional, + Optional } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { TranslateSettings } from './translate.settings'; @@ -17,7 +17,7 @@ export interface TranslateParams { } @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class TranslateService { protected data: { [key: string]: any } = {}; @@ -95,7 +95,7 @@ export class TranslateService { this.use(newValue).then(() => { this.activeLangChanged.next({ previousValue: previousValue, - currentValue: newValue, + currentValue: newValue }); }); } @@ -137,7 +137,7 @@ export class TranslateService { supportedLangs, translatePaths, translationRoot, - activeLang, + activeLang } = this; const defaults = { @@ -147,7 +147,7 @@ export class TranslateService { translatePaths, translationRoot, activeLang, - ...settings, + ...settings }; this.debugMode = defaults.debugMode; diff --git a/projects/translate/src/test.ts b/projects/translate/src/test.ts index c2c841e0..3dcbf03e 100644 --- a/projects/translate/src/test.ts +++ b/projects/translate/src/test.ts @@ -5,7 +5,7 @@ import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, - platformBrowserDynamicTesting, + platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; // First, initialize the Angular testing environment. @@ -13,6 +13,6 @@ getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { - teardown: { destroyAfterEach: false }, + teardown: { destroyAfterEach: false } } ); diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index ba0e6433..df5eab89 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -10,9 +10,9 @@ describe('AppComponent', () => { imports: [ HttpClientModule, RouterTestingModule, - TranslateModule.forRoot(), + TranslateModule.forRoot() ], - declarations: [AppComponent], + declarations: [AppComponent] }).compileComponents(); })); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7268cb51..44998f37 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -12,15 +12,15 @@ import { CustomTranslatePipe } from './translate-demo/custom-translate.pipe'; const routes: Route[] = [ { path: 'translate', - component: TranslateDemoComponent, + component: TranslateDemoComponent }, { path: 'translate-lazy', loadChildren: () => import('src/app/translate-lazy-demo/translate-lazy-demo.module').then( (m) => m.TranslateLazyDemoModule - ), - }, + ) + } ]; export function setupTranslateService(service: TranslateService) { @@ -41,9 +41,9 @@ export function setupTranslateService(service: TranslateService) { provide: APP_INITIALIZER, useFactory: setupTranslateService, deps: [TranslateService], - multi: true, - }, + multi: true + } ], - bootstrap: [AppComponent], + bootstrap: [AppComponent] }) export class AppModule {} diff --git a/src/app/translate-demo/custom-translate.pipe.ts b/src/app/translate-demo/custom-translate.pipe.ts index 146f3d86..129c7379 100644 --- a/src/app/translate-demo/custom-translate.pipe.ts +++ b/src/app/translate-demo/custom-translate.pipe.ts @@ -3,7 +3,7 @@ import { TranslateService } from '@ngstack/translate'; @Pipe({ name: 'myTranslate', - pure: false, + pure: false }) export class CustomTranslatePipe implements PipeTransform { constructor(private translate: TranslateService) {} diff --git a/src/app/translate-demo/translate-demo.component.spec.ts b/src/app/translate-demo/translate-demo.component.spec.ts index ca7c9346..b7ae16af 100644 --- a/src/app/translate-demo/translate-demo.component.spec.ts +++ b/src/app/translate-demo/translate-demo.component.spec.ts @@ -12,7 +12,7 @@ describe('TranslateDemoComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [HttpClientModule, TranslateModule.forRoot()], - declarations: [CustomTranslatePipe, TranslateDemoComponent], + declarations: [CustomTranslatePipe, TranslateDemoComponent] }).compileComponents(); })); diff --git a/src/app/translate-lazy-demo/demo-page/demo-page.component.spec.ts b/src/app/translate-lazy-demo/demo-page/demo-page.component.spec.ts index 540f5aec..2d36c21c 100644 --- a/src/app/translate-lazy-demo/demo-page/demo-page.component.spec.ts +++ b/src/app/translate-lazy-demo/demo-page/demo-page.component.spec.ts @@ -11,7 +11,7 @@ describe('DemoPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [HttpClientModule, TranslateModule.forRoot()], - declarations: [DemoPageComponent], + declarations: [DemoPageComponent] }).compileComponents(); })); diff --git a/src/app/translate-lazy-demo/translate-lazy-demo.module.ts b/src/app/translate-lazy-demo/translate-lazy-demo.module.ts index c682f881..a0b22687 100644 --- a/src/app/translate-lazy-demo/translate-lazy-demo.module.ts +++ b/src/app/translate-lazy-demo/translate-lazy-demo.module.ts @@ -8,10 +8,10 @@ import { TranslateModule } from '@ngstack/translate'; imports: [ CommonModule, RouterModule.forChild([ - { path: '', pathMatch: 'full', component: DemoPageComponent }, + { path: '', pathMatch: 'full', component: DemoPageComponent } ]), - TranslateModule, + TranslateModule ], - declarations: [DemoPageComponent], + declarations: [DemoPageComponent] }) export class TranslateLazyDemoModule {} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c9669790..3612073b 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const environment = { - production: true, + production: true }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 85db3caf..72cd6397 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,7 +3,7 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false, + production: false }; /* diff --git a/src/karma.conf.js b/src/karma.conf.js index b2a00634..af90cdcb 100644 --- a/src/karma.conf.js +++ b/src/karma.conf.js @@ -10,18 +10,18 @@ module.exports = function (config) { require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma'), + require('@angular-devkit/build-angular/plugins/karma') ], client: { - clearContext: false, // leave Jasmine Spec Runner output visible in browser + clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { - suppressAll: true, // removes the duplicated traces + suppressAll: true // removes the duplicated traces }, coverageReporter: { dir: require('path').join(__dirname, './coverage/app'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }] }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -30,7 +30,7 @@ module.exports = function (config) { autoWatch: true, browsers: ['ChromeHeadless'], singleRun: true, - restartOnFileChange: true, + restartOnFileChange: true // customLaunchers: { // ChromeHeadless: { // base: 'Chrome', diff --git a/src/test.ts b/src/test.ts index 1886cdad..d72c418d 100644 --- a/src/test.ts +++ b/src/test.ts @@ -4,7 +4,7 @@ import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, - platformBrowserDynamicTesting, + platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; // First, initialize the Angular testing environment. @@ -12,6 +12,6 @@ getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { - teardown: { destroyAfterEach: false }, + teardown: { destroyAfterEach: false } } );