-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from infra-geo-ouverte/master
merge master
- Loading branch information
Showing
43 changed files
with
2,643 additions
and
1,698 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import { TestBed, inject } from '@angular/core/testing'; | ||
import { HttpClientModule} from '@angular/common/http'; | ||
import { HttpClientModule } from '@angular/common/http'; | ||
|
||
import { IgoLanguageModule } from '@igo2/core'; | ||
import { IgoLanguageModule, IgoMessageModule } from '@igo2/core'; | ||
|
||
import { AuthService } from './auth.service'; | ||
|
||
describe('ShareMapService', () => { | ||
describe('AuthService', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [HttpClientModule, IgoLanguageModule], | ||
imports: [HttpClientModule, IgoLanguageModule, IgoMessageModule], | ||
providers: [AuthService] | ||
}); | ||
}); | ||
|
||
it( | ||
'should ...', | ||
inject([AuthService], (service: AuthService) => { | ||
expect(service).toBeTruthy(); | ||
}) | ||
); | ||
it('should ...', inject([AuthService], (service: AuthService) => { | ||
expect(service).toBeTruthy(); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/common/src/lib/badge-icon/badge-icon.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Directive, Input, ElementRef, OnInit } from '@angular/core'; | ||
import { MatIconRegistry } from '@angular/material'; | ||
|
||
@Directive({ | ||
selector: '[igoMatBadgeIcon]' | ||
}) | ||
export class MatBadgeIconDirective implements OnInit { | ||
@Input() | ||
set igoMatBadgeIcon(value: string) { | ||
this.matIconRegistry | ||
.getNamedSvgIcon(value) | ||
.subscribe(svgObj => { | ||
this.badge.innerHTML = ''; | ||
this.badge.appendChild(svgObj); | ||
}); | ||
} | ||
|
||
@Input() | ||
set matBadgeHidden(value: boolean) { | ||
this.badge.style.display = value | ||
? 'none' | ||
: 'flex'; | ||
} | ||
|
||
get badge() { | ||
return this.el.nativeElement.querySelector('.mat-badge-content'); | ||
} | ||
|
||
constructor( | ||
private el: ElementRef, | ||
private matIconRegistry: MatIconRegistry | ||
) {} | ||
|
||
ngOnInit() { | ||
this.badge.style.alignItems = 'center'; | ||
this.badge.style.justifyContent = 'center'; | ||
this.badge.style.background = 'none'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { MatBadgeIconDirective } from './badge-icon.directive'; | ||
import { MatBadgeModule, MatIconModule } from '@angular/material'; | ||
|
||
@NgModule({ | ||
imports: [MatBadgeModule, MatIconModule], | ||
declarations: [MatBadgeIconDirective], | ||
exports: [MatBadgeIconDirective] | ||
}) | ||
export class IgoMatBadgeIconModule { | ||
static forRoot() { | ||
return { | ||
ngModule: IgoMatBadgeIconModule, | ||
providers: [] | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './badge-icon.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ export interface Version { | |
} | ||
|
||
export const version: Version = { | ||
lib: '1.0.0' | ||
lib: '1.1.0' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.igo-catalog-group-title { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 14 additions & 5 deletions
19
packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
<mat-list-item> | ||
<mat-icon mat-list-avatar svgIcon="blank"></mat-icon> | ||
<h4 mat-line>{{title}}</h4> | ||
<h4 mat-line matTooltipShowDelay="500" [matTooltip]="title">{{title}}</h4> | ||
|
||
<igo-metadata-button [layer]="layer"></igo-metadata-button> | ||
|
||
<button | ||
(mouseenter)="onMouseEvent($event)" (mouseleave)="onMouseEvent($event)" | ||
mat-icon-button | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]="(added ? 'igo.geo.catalog.layer.removeFromMap' : 'igo.geo.catalog.layer.addToMap') | translate" | ||
[color]="added ? 'warn' : ''" | ||
(click)="onToggleClick()"> | ||
<mat-icon [svgIcon]="added ? 'delete' : 'plus'"></mat-icon> | ||
[matTooltip]="computeTooltip() | translate" | ||
[color]="(isPreview$ | async) ? '' : added ? 'warn' : ''" | ||
(click)="onToggleClick($event)"> | ||
<mat-icon | ||
matBadge | ||
igoMatBadgeIcon="eye-off" | ||
[matBadgeHidden]="isInResolutionsRange()" | ||
matBadgeColor="accent" | ||
matBadgeSize="small" | ||
matBadgePosition="after" | ||
[svgIcon]="(isPreview$ | async) ? 'plus' : added ? 'delete' : 'plus'"> | ||
</mat-icon> | ||
</button> | ||
|
||
</mat-list-item> |
4 changes: 4 additions & 0 deletions
4
packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.mat-badge-small .mat-badge-content { | ||
color: rgba(0, 0, 0, 0.38); | ||
} | ||
|
Oops, something went wrong.