From 2b9fd49e55ec75b5e2411b17311e27479885a1ea Mon Sep 17 00:00:00 2001 From: William Welling Date: Mon, 14 Dec 2020 21:23:12 -0600 Subject: [PATCH 1/5] trying ng-inline-svg for icons --- package.json | 40 +++++++++---------- .../src/lib/core/wvr-core.module.ts | 5 +++ .../src/lib/shared/wvr-shared.module.ts | 6 +-- .../src/lib/wvr-card/wvr-card.component.html | 2 +- .../lib/wvr-header/wvr-header.component.html | 2 +- .../src/lib/wvr-icon/wvr-icon.component.html | 2 +- .../src/lib/wvr-icon/wvr-icon.component.scss | 2 +- 7 files changed, 32 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 0078dc8e1..ed2131ecb 100644 --- a/package.json +++ b/package.json @@ -52,15 +52,15 @@ "test:ci": "npm run test:coverage && npm run test:audit" }, "dependencies": { - "@angular/animations": "^11.0.3", - "@angular/common": "^11.0.3", - "@angular/compiler": "^11.0.3", - "@angular/core": "^11.0.3", - "@angular/elements": "^11.0.3", - "@angular/forms": "^11.0.3", - "@angular/platform-browser": "^11.0.3", - "@angular/platform-browser-dynamic": "^11.0.3", - "@angular/router": "^11.0.3", + "@angular/animations": "^11.0.4", + "@angular/common": "^11.0.4", + "@angular/compiler": "^11.0.4", + "@angular/core": "^11.0.4", + "@angular/elements": "^11.0.4", + "@angular/forms": "^11.0.4", + "@angular/platform-browser": "^11.0.4", + "@angular/platform-browser-dynamic": "^11.0.4", + "@angular/router": "^11.0.4", "@ng-bootstrap/ng-bootstrap": "^8.0.0", "@ngrx/core": "^1.2.0", "@ngrx/effects": "^10.1.0", @@ -74,27 +74,27 @@ "document-register-element": "^1.14.5", "handlebars": "^4.7.6", "json5": "^2.1.3", - "ng-lazyload-image": "^9.1.0", + "ng-inline-svg": "^11.0.1", "rxjs": "~6.6.3", "tslib": "^2.0.3", "web-animations-js": "^2.3.2", - "zone.js": "~0.11.3" + "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.1100.3", + "@angular-devkit/build-angular": "^0.1100.4", "@angular-devkit/build-ng-packagr": "~0.1002.0", - "@angular-devkit/schematics": "^11.0.3", - "@angular/cli": "^11.0.3", - "@angular/compiler-cli": "^11.0.3", - "@angular/language-service": "^11.0.3", - "@angular/localize": "11.0.3", + "@angular-devkit/schematics": "^11.0.4", + "@angular/cli": "^11.0.4", + "@angular/compiler-cli": "^11.0.4", + "@angular/language-service": "^11.0.4", + "@angular/localize": "11.0.4", "@compodoc/compodoc": "^1.1.11", "@lhci/cli": "^0.6.1", "@ngrx/schematics": "^10.1.0", "@pickra/copy-code-block": "^1.2.0", "@types/jasmine": "~3.6.2", "@types/jasminewd2": "~2.0.8", - "@types/node": "^14.14.10", + "@types/node": "^14.14.13", "angular-tslint-rules": "^1.20.4", "chalk": "^4.1.0", "chrome-launcher": "^0.13.4", @@ -122,8 +122,8 @@ "rimraf": "^3.0.2", "shelljs": "^0.8.4", "static-server": "^2.2.1", - "ts-loader": "^8.0.11", - "ts-node": "~9.1.0", + "ts-loader": "^8.0.12", + "ts-node": "~9.1.1", "tslint": "~6.1.3", "typescript": "~4.0.5" } diff --git a/projects/wvr-elements/src/lib/core/wvr-core.module.ts b/projects/wvr-elements/src/lib/core/wvr-core.module.ts index b431722c0..eb812a614 100644 --- a/projects/wvr-elements/src/lib/core/wvr-core.module.ts +++ b/projects/wvr-elements/src/lib/core/wvr-core.module.ts @@ -4,6 +4,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, Injector, NgModule, Optional, SkipSelf } from ' import { createCustomElement } from '@angular/elements'; import { EffectsModule } from '@ngrx/effects'; import { StoreModule } from '@ngrx/store'; +import { InlineSVGModule } from 'ng-inline-svg'; import { WvrAlertComponent } from '../wvr-alert/wvr-alert.component'; import { WvrButtonComponent } from '../wvr-button/wvr-button.component'; import { WvrCardComponent } from '../wvr-card/wvr-card.component'; @@ -80,6 +81,10 @@ const MODULES = [ ThemeEffects ]), HttpClientModule, + InlineSVGModule.forRoot({ + clientOnly: true, + bypassHttpClientInterceptorChain: true + }), StoreModule.forRoot(ROOT_REDUCER, { metaReducers }) ]; diff --git a/projects/wvr-elements/src/lib/shared/wvr-shared.module.ts b/projects/wvr-elements/src/lib/shared/wvr-shared.module.ts index 877a44827..20262d44a 100644 --- a/projects/wvr-elements/src/lib/shared/wvr-shared.module.ts +++ b/projects/wvr-elements/src/lib/shared/wvr-shared.module.ts @@ -1,7 +1,7 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; -import { LazyLoadImageDirective, LazyLoadImageModule } from 'ng-lazyload-image'; +import { InlineSVGModule } from 'ng-inline-svg'; import { WvrAlertComponent } from '../wvr-alert/wvr-alert.component'; import { WvrButtonComponent } from '../wvr-button/wvr-button.component'; import { WvrCardComponent } from '../wvr-card/wvr-card.component'; @@ -55,12 +55,12 @@ export const WVR_PIPES = [ @NgModule({ imports: [ CommonModule, - LazyLoadImageModule, + InlineSVGModule, NgbDropdownModule ], exports: [ CommonModule, - LazyLoadImageDirective, + InlineSVGModule, ...WVR_COMPONENTS, ...WVR_PIPES ], diff --git a/projects/wvr-elements/src/lib/wvr-card/wvr-card.component.html b/projects/wvr-elements/src/lib/wvr-card/wvr-card.component.html index e4be7b41b..18c240bf6 100644 --- a/projects/wvr-elements/src/lib/wvr-card/wvr-card.component.html +++ b/projects/wvr-elements/src/lib/wvr-card/wvr-card.component.html @@ -34,7 +34,7 @@
- Card Image Cap + Card Image Cap
diff --git a/projects/wvr-elements/src/lib/wvr-header/wvr-header.component.html b/projects/wvr-elements/src/lib/wvr-header/wvr-header.component.html index 2a366df8a..a8473efc0 100644 --- a/projects/wvr-elements/src/lib/wvr-header/wvr-header.component.html +++ b/projects/wvr-elements/src/lib/wvr-header/wvr-header.component.html @@ -3,7 +3,7 @@