From 27b5e80a2b4735b6f940c23b9caaab42f64faaad Mon Sep 17 00:00:00 2001 From: William Brawner Date: Wed, 17 Nov 2021 20:51:29 -0700 Subject: [PATCH] Remove ng2-currency-mask This was a cool feature but my wife didn't like it and it's been a huge headache every time I need to update my angular versions so it's time for it to go --- .gitignore | 1 + package-lock.json | 21 ------------------- package.json | 1 - src/app/app.module.ts | 13 ------------ .../category-form.component.html | 2 +- .../add-edit-transaction.component.html | 7 ++++--- 6 files changed, 6 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index cc4a1eb..9eebaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ Thumbs.db # Firebase .firebase/ +.angular/ diff --git a/package-lock.json b/package-lock.json index 9c97943..e4589f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,6 @@ "core-js": "^2.6.12", "dexie": "^2.0.4", "ng2-charts": "^2.4.2", - "ng2-currency-mask": "^11.0.0", "rxjs": "^6.6.3", "tslib": "^2.0.0", "zone.js": "~0.11.4" @@ -10904,18 +10903,6 @@ "rxjs": "^6.3.3" } }, - "node_modules/ng2-currency-mask": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/ng2-currency-mask/-/ng2-currency-mask-11.0.0.tgz", - "integrity": "sha512-+jSqTMP7eKISA+PUFEFYfi2zlpP/JuYcKrVxcD0gTIflBlbr8GoD3Iace/Z5/s0zZmSvPJk2eGQB0X05GAf1ug==", - "dependencies": { - "tslib": "^2.0.0" - }, - "peerDependencies": { - "@angular/common": "^11.2.8", - "@angular/core": "^11.2.8" - } - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -26725,14 +26712,6 @@ "tslib": "^2.0.0" } }, - "ng2-currency-mask": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/ng2-currency-mask/-/ng2-currency-mask-11.0.0.tgz", - "integrity": "sha512-+jSqTMP7eKISA+PUFEFYfi2zlpP/JuYcKrVxcD0gTIflBlbr8GoD3Iace/Z5/s0zZmSvPJk2eGQB0X05GAf1ug==", - "requires": { - "tslib": "^2.0.0" - } - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/package.json b/package.json index 57ef52b..91aa88d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "core-js": "^2.6.12", "dexie": "^2.0.4", "ng2-charts": "^2.4.2", - "ng2-currency-mask": "^11.0.0", "rxjs": "^6.6.3", "tslib": "^2.0.0", "zone.js": "~0.11.4" diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 064f294..b023701 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -38,7 +38,6 @@ import { NewBudgetComponent } from './budgets/new-budget/new-budget.component'; import { BudgetDetailsComponent } from './budgets/budget-details/budget-details.component'; import { environment } from 'src/environments/environment'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; -import { CurrencyMaskModule, CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from 'ng2-currency-mask'; import { ServiceWorkerModule } from '@angular/service-worker'; import { CategoryBreakdownComponent } from './categories/category-breakdown/category-breakdown.component'; import { ChartsModule } from 'ng2-charts'; @@ -50,16 +49,6 @@ import { TransactionListComponent } from './transactions/transaction-list/transa import { EditCategoryComponent } from './categories/edit-category/edit-category.component'; import { EditBudgetComponent } from './budgets/edit-budget/edit-budget.component'; -export const CustomCurrencyMaskConfig: CurrencyMaskConfig = { - align: 'left', - precision: 2, - prefix: '', - thousands: ',', - decimal: '.', - suffix: '', - allowNegative: false, -}; - @NgModule({ declarations: [ AppComponent, @@ -104,13 +93,11 @@ export const CustomCurrencyMaskConfig: CurrencyMaskConfig = { FormsModule, ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), HttpClientModule, - CurrencyMaskModule, ChartsModule, MatCheckboxModule, MatCardModule, ], providers: [ - { provide: CURRENCY_MASK_CONFIG, useValue: CustomCurrencyMaskConfig }, { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: TWIGS_SERVICE, useClass: TwigsHttpService }, { provide: Storage, useValue: window.localStorage }, diff --git a/src/app/categories/category-form/category-form.component.html b/src/app/categories/category-form/category-form.component.html index 4ab562d..3a7806f 100644 --- a/src/app/categories/category-form/category-form.component.html +++ b/src/app/categories/category-form/category-form.component.html @@ -9,7 +9,7 @@ - + Expense diff --git a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.html b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.html index 0675677..d934361 100644 --- a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.html +++ b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.html @@ -9,10 +9,11 @@ - + - + @@ -30,4 +31,4 @@ - + \ No newline at end of file