Skip to content

Commit

Permalink
fix(package): Fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kolkov committed Nov 15, 2021
1 parent 2970e4c commit 0884106
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 36 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@angular/language-service": "~13.0.0",
"@types/jasmine": "~3.10.2",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^16.11.7",
"@types/node": "^12.11.2",
"@typescript-eslint/eslint-plugin": "5.3.1",
"@typescript-eslint/parser": "5.3.1",
"coveralls": "^3.1.1",
Expand Down
16 changes: 16 additions & 0 deletions projects/gallery/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
6 changes: 4 additions & 2 deletions projects/gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
},
"peerDependencies": {
"@angular/common": ">=13.0.0 <14",
"@angular/core": ">=13.0.0 <14",
"tslib": "^2.0.0"
"@angular/core": ">=13.0.0 <14"
},
"dependencies": {
"tslib": "^2.3.0"
},
"keywords": [
"angular",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class NgxGalleryImageComponent implements OnInit, OnChanges {
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.swipe) {
if (changes['swipe']) {
this.helperService.manageSwipe(this.swipe, this.elementRef, 'image', () => this.showNext(), () => this.showPrev());
}
}
Expand Down Expand Up @@ -307,7 +307,7 @@ export class NgxGalleryImageComponent implements OnInit, OnChanges {

showNext(): boolean {
if (this.isAnimating) {
return;
return false;
}
if (this.canShowNext() && this.canChangeImage) {
let action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class NgxGalleryPreviewComponent implements OnInit, OnDestroy, OnChanges
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.swipe) {
if (changes['swipe']) {
this.helperService.manageSwipe(this.swipe, this.elementRef,
'preview', () => this.showNext(), () => this.showPrev());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export class NgxGalleryThumbnailsComponent implements OnChanges {
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.selectedIndex) {
if (changes['selectedIndex']) {
this.validateIndex();
}

if (changes.swipe) {
if (changes['swipe']) {
this.helperService.manageSwipe(this.swipe, this.elementRef,
'thumbnails', () => this.moveRight(), () => this.moveLeft());
}
Expand Down Expand Up @@ -128,9 +128,7 @@ export class NgxGalleryThumbnailsComponent implements OnChanges {
}

hasLink(index: number): boolean {
if (this.links && this.links.length && this.links[index]) {
return true;
}
return !!(this.links && this.links.length && this.links[index]);
}

moveRight(): void {
Expand Down
2 changes: 1 addition & 1 deletion projects/gallery/src/lib/ngx-gallery.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

@Injectable()
export class CustomHammerConfig extends HammerGestureConfig {
overrides = {
override overrides = {
pinch: { enable: false },
rotate: { enable: false }
} as any;
Expand Down
13 changes: 1 addition & 12 deletions projects/gallery/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true,
"enableIvy": true
"types": []
},
"exclude": [
"src/test.ts",
Expand Down
3 changes: 1 addition & 2 deletions projects/gallery/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
"jasmine"
]
},
"files": [
Expand Down
14 changes: 11 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"target": "es2017",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"es2020",
"dom"
],
"paths": {
Expand All @@ -29,6 +34,9 @@
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}

0 comments on commit 0884106

Please sign in to comment.