From f74c495db129502af99c8e6a16579b103e97d3a3 Mon Sep 17 00:00:00 2001 From: alecarn <133774929+alecarn@users.noreply.github.com> Date: Tue, 9 Apr 2024 10:25:34 -0400 Subject: [PATCH] feat: replace our icon library @mdi/angular-material with the Google Font - Material Symbol (#1664) * feat(common): icon add provider to register icon class for symbol BREAKING CHANGE - Breaking change: The CoreModule doesn't instantiate the icon anymore. We need to explicitly call the provideIcon() in our main file --- .../auth-microsoft.component.html | 2 +- .../auth-microsoft.component.ts | 6 ++- .../auth-microsoftb2c.component.html | 2 +- .../auth-microsoftb2c.component.ts | 6 ++- packages/auth/package.json | 1 + .../actionbar/actionbar-item.component.html | 4 +- .../actionbar/actionbar-item.component.ts | 29 ++--------- .../action/actionbar/actionbar.component.html | 6 +-- .../action/actionbar/actionbar.component.ts | 4 +- .../lib/action/shared/action.interfaces.ts | 4 +- .../lib/badge-icon/badge-icon.directive.ts | 25 ++++----- .../collapsible/collapsible.component.html | 2 +- .../entity-table/entity-table.component.html | 19 +++---- .../form-field-select.component.html | 9 ++-- .../form-field/form-field-text.component.html | 13 +++-- .../form-field-textarea.component.html | 9 ++-- .../home-button/home-button.component.html | 2 +- .../common/src/lib/icons/icon.provider.ts | 23 +++++++++ .../src/lib/icons/icon/icon.component.html | 5 ++ .../src/lib/icons/icon/icon.component.spec.ts | 23 +++++++++ .../src/lib/icons/icon/icon.component.ts | 42 +++++++++++++++ packages/common/src/lib/icons/index.ts | 3 ++ .../src/lib/icons/shared/icon.interface.ts | 4 ++ packages/common/src/lib/icons/shared/icons.ts | 39 ++++++++++++++ packages/common/src/lib/icons/shared/index.ts | 2 + .../interactive-tour.component.html | 5 +- .../common/src/lib/table/table.component.html | 2 +- .../src/lib/tool/shared/tool.interface.ts | 5 +- .../src/lib/tool/toolbox/toolbox.component.ts | 1 - packages/common/src/public_api.ts | 1 + .../context-form/context-form.component.html | 2 +- .../context-item/context-item.component.html | 43 ++++++---------- .../context-list/context-list.component.html | 25 +++------ .../context-list/context-list.component.scss | 6 +++ .../context-list/context-list.component.ts | 8 +-- .../context-permissions.component.html | 4 +- .../bookmark-button.component.html | 2 +- .../poi-button/poi-button.component.html | 4 +- .../user-button/user-button.component.html | 6 +-- .../share-map/share-map-api.component.html | 2 +- .../share-map/share-map-url.component.html | 2 +- .../src/lib/sidenav/sidenav.component.html | 18 +++---- packages/core/src/lib/core.module.ts | 13 ++--- .../catalog-browser-group.component.html | 8 +-- .../catalog-browser-layer.component.html | 5 +- .../catalog-browser-layer.component.ts | 4 +- .../catalog-library-item.component.html | 6 +-- .../catalog-library.component.html | 2 +- .../directions-buttons.component.html | 12 ++--- .../directions-inputs.component.html | 6 +-- .../directions-results.component.html | 7 +-- .../directions/shared/directions.interface.ts | 11 +--- .../lib/directions/shared/directions.utils.ts | 40 +++++++-------- .../download-button.component.html | 2 +- .../draw/draw/draw-shorcuts.component.html | 12 ++--- .../lib/draw/draw/draw-shorcuts.component.ts | 9 +++- .../geo/src/lib/draw/draw/draw.component.html | 11 ++-- .../geo/src/lib/draw/draw/draw.component.ts | 2 +- .../feature-details.component.html | 6 +-- .../ogc-filter-button.component.html | 4 +- .../ogc-filter-form.component.html | 14 ++--- .../ogc-filter-selection.component.html | 4 +- .../ogc-filter-time-slider.component.html | 4 +- .../ogc-filter-time-slider.component.ts | 8 +-- .../ogc-filter-time.component.html | 4 +- .../ogc-filterable-item.component.html | 8 ++- .../spatial-filter-item.component.html | 14 +++-- .../spatial-filter-type.component.html | 4 +- .../time-filter-button.component.html | 4 +- .../time-filter-form.component.html | 6 +-- .../time-filter-form.component.ts | 8 +-- .../time-filter-item.component.html | 8 ++- .../geometry-form-field.component.html | 2 +- .../export-button.component.html | 3 +- .../layer-item/layer-item.component.html | 8 ++- .../layer-legend/layer-legend.component.html | 3 +- .../layer-list-tool.component.html | 22 +++----- .../layer-list-tool.component.scss | 6 +++ .../layer-list/layer-list.component.html | 38 +++++++------- .../layer/layer-list/layer-list.component.ts | 9 +++- .../track-feature-button.component.html | 2 +- .../baselayers-switcher.component.html | 10 ++-- .../geolocate-button.component.html | 2 +- .../geolocate-button.component.ts | 10 ++-- .../home-extent-button.component.html | 2 +- .../menu-button/menu-button.component.html | 2 +- .../offline-button.component.html | 2 +- .../rotation-button.component.html | 3 +- .../wake-lock-button.component.html | 2 +- .../wake-lock-button.component.ts | 6 +-- .../zoom-button/zoom-button.component.html | 4 +- .../measure/measurer/measurer.component.html | 12 +---- .../metadata-button.component.html | 2 +- .../search-bar/search-bar.component.html | 4 +- .../search-results-add-button.component.html | 8 ++- .../search-results-add-button.component.ts | 4 +- .../search-results-item.component.html | 10 ++-- .../search-selector.component.html | 2 +- .../search-settings.component.html | 2 +- .../lib/search/shared/search.interfaces.ts | 24 +++++---- .../geo/src/lib/search/shared/search.utils.ts | 2 +- .../src/lib/search/shared/sources/cadastre.ts | 2 +- .../lib/search/shared/sources/coordinates.ts | 2 +- .../search/shared/sources/icherche-icons.ts | 34 +++++++++++++ .../src/lib/search/shared/sources/icherche.ts | 11 +++- .../lib/search/shared/sources/nominatim.ts | 2 +- .../search/shared/sources/storedqueries.ts | 4 +- .../lib/search/shared/sources/workspace.ts | 2 +- .../style-modal-drawing.component.html | 5 +- .../style-modal-layer-button.component.html | 2 +- .../layer/style-modal-layer.component.html | 5 +- .../geo/src/lib/toast/toast.component.html | 14 +++-- .../shared/edition-workspace.service.ts | 4 +- .../lib/workspace/shared/workspace.utils.ts | 2 +- .../about-tool/about-tool.component.html | 4 +- .../about/about-tool/about-tool.component.ts | 2 +- .../catalog-browser-tool.component.ts | 1 - .../catalog-library-tool.component.ts | 2 +- .../context-share-tool.component.ts | 2 +- .../drawing-tool/drawing-tool.component.ts | 2 +- .../spatial-filter-tool.component.ts | 9 +++- .../data-issue-reporter-tool.component.ts | 2 +- .../import-export-tool.component.ts | 2 +- .../advanced-coordinates.component.html | 2 +- .../advanced-map-tool.component.ts | 2 +- .../advanced-swipe.component.html | 6 +-- .../map-legend/map-legend-tool.component.ts | 2 +- .../map-proximity-tool.component.html | 2 +- .../map-proximity-tool.component.ts | 2 +- .../measurer-tool/measurer-tool.component.ts | 2 +- .../print/print-tool/print-tool.component.ts | 2 +- .../search-results-tool.component.html | 14 ++--- .../search-results-tool.component.ts | 2 +- .../lib/workspace/shared/workspace.utils.ts | 8 +-- .../workspace-button.component.html | 2 +- .../src/locale/en.integration.json | 2 +- .../src/locale/fr.integration.json | 2 +- projects/demo/src/app/app.component.html | 2 +- .../src/app/common/action/action.component.ts | 4 +- .../demo/src/app/common/common.routing.ts | 10 +++- .../entity-table/entity-table.component.ts | 4 +- .../src/app/common/icon/icon.component.html | 51 +++++++++++++++++++ .../src/app/common/icon/icon.component.scss | 4 ++ .../app/common/icon/icon.component.spec.ts | 23 +++++++++ .../src/app/common/icon/icon.component.ts | 50 ++++++++++++++++++ .../src/app/common/table/table.component.ts | 2 +- .../src/app/common/tool/tool.component.html | 4 +- .../src/app/common/tool/tool.component.ts | 2 +- .../example-viewer.component.html | 4 +- projects/demo/src/index.html | 4 ++ projects/demo/src/main.ts | 2 + projects/demo/src/styles.scss | 8 +++ 152 files changed, 735 insertions(+), 476 deletions(-) create mode 100644 packages/common/src/lib/icons/icon.provider.ts create mode 100644 packages/common/src/lib/icons/icon/icon.component.html create mode 100644 packages/common/src/lib/icons/icon/icon.component.spec.ts create mode 100644 packages/common/src/lib/icons/icon/icon.component.ts create mode 100644 packages/common/src/lib/icons/index.ts create mode 100644 packages/common/src/lib/icons/shared/icon.interface.ts create mode 100644 packages/common/src/lib/icons/shared/icons.ts create mode 100644 packages/common/src/lib/icons/shared/index.ts create mode 100644 packages/geo/src/lib/search/shared/sources/icherche-icons.ts create mode 100644 projects/demo/src/app/common/icon/icon.component.html create mode 100644 projects/demo/src/app/common/icon/icon.component.scss create mode 100644 projects/demo/src/app/common/icon/icon.component.spec.ts create mode 100644 projects/demo/src/app/common/icon/icon.component.ts diff --git a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html index e72355a048..e1699a3b2d 100644 --- a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html +++ b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html @@ -3,6 +3,6 @@ mat-raised-button (click)="loginMicrosoft()" > - + {{ 'igo.auth.microsoft.login' | translate }} diff --git a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts index db0a4d25c5..11f53600f9 100644 --- a/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts +++ b/packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts @@ -7,9 +7,9 @@ import { Output } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; import { AuthService } from '@igo2/auth'; +import { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { @@ -40,7 +40,7 @@ import { styleUrls: ['./auth-microsoft.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [MatButtonModule, MatIconModule, TranslateModule] + imports: [MatButtonModule, TranslateModule, IgoIconComponent] }) export class AuthMicrosoftComponent { private options?: AuthMicrosoftOptions; @@ -48,6 +48,8 @@ export class AuthMicrosoftComponent { @Output() login: EventEmitter = new EventEmitter(); private broadcastService: MsalBroadcastService; + svgIcon: IconSvg = MICROSOFT_ICON; + constructor( private authService: AuthService, private config: ConfigService, diff --git a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html index 0a793ab77c..3319a78577 100644 --- a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html +++ b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html @@ -3,6 +3,6 @@ mat-raised-button (click)="loginMicrosoftb2c()" > - + {{ 'igo.auth.microsoftb2c.login' | translate }} diff --git a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts index 4f440d6a74..e01aa7dca7 100644 --- a/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts +++ b/packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts @@ -7,9 +7,9 @@ import { Output } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; import { AuthService } from '@igo2/auth'; +import { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common'; import { ConfigService } from '@igo2/core/config'; import { MSAL_GUARD_CONFIG } from '@azure/msal-angular'; @@ -38,7 +38,7 @@ import { MsalServiceb2c } from './auth-msalServiceb2c.service'; styleUrls: ['./auth-microsoftb2c.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [MatButtonModule, MatIconModule, TranslateModule], + imports: [MatButtonModule, TranslateModule, IgoIconComponent], providers: [MsalServiceb2c] }) export class AuthMicrosoftb2cComponent { @@ -47,6 +47,8 @@ export class AuthMicrosoftb2cComponent { @Output() login: EventEmitter = new EventEmitter(); private broadcastService: MsalBroadcastServiceb2c; + svgIcon: IconSvg = MICROSOFT_ICON; + constructor( private authService: AuthService, private config: ConfigService, diff --git a/packages/auth/package.json b/packages/auth/package.json index 7c5bf584e9..377ca5afb0 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -63,6 +63,7 @@ "@angular/router": "^17.0.6", "@azure/msal-angular": "^3.0.4", "@azure/msal-browser": "^3.0.4", + "@igo2/common": "*", "@igo2/core": "*", "@igo2/utils": "*", "rxjs": "^7.8.0" diff --git a/packages/common/src/lib/action/actionbar/actionbar-item.component.html b/packages/common/src/lib/action/actionbar/actionbar-item.component.html index c08568994b..49c9828292 100644 --- a/packages/common/src/lib/action/actionbar/actionbar-item.component.html +++ b/packages/common/src/lib/action/actionbar/actionbar-item.component.html @@ -15,7 +15,9 @@ [disabled]="disabled$ | async" [disableRipple]="true" > - + {{ title | translate }} diff --git a/packages/common/src/lib/action/actionbar/actionbar-item.component.ts b/packages/common/src/lib/action/actionbar/actionbar-item.component.ts index 888efc142c..77495a7efd 100644 --- a/packages/common/src/lib/action/actionbar/actionbar-item.component.ts +++ b/packages/common/src/lib/action/actionbar/actionbar-item.component.ts @@ -17,6 +17,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Subscription, isObservable } from 'rxjs'; +import { IgoIconComponent } from '../../icons'; import { Action } from '../shared/action.interfaces'; /** @@ -37,7 +38,8 @@ import { Action } from '../shared/action.interfaces'; MatIconModule, MatCheckboxModule, AsyncPipe, - TranslateModule + TranslateModule, + IgoIconComponent ] }) export class ActionbarItemComponent implements OnInit, OnDestroy { @@ -47,8 +49,6 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { undefined ); - readonly icon$: BehaviorSubject = new BehaviorSubject(undefined); - readonly tooltip$: BehaviorSubject = new BehaviorSubject(undefined); readonly noDisplay$: BehaviorSubject = new BehaviorSubject(false); @@ -62,8 +62,6 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { private availability$$: Subscription; - private icon$$: Subscription; - private checkCondition$$: Subscription; private tooltip$$: Subscription; @@ -72,6 +70,8 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { private display$$: Subscription; + isObservable = isObservable; + /** * Action */ @@ -131,8 +131,6 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { return this.action.title; } - constructor() {} - ngOnInit() { const args = this.action.args || []; @@ -144,14 +142,6 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { ); } - if (isObservable(this.action.icon)) { - this.icon$$ = this.action.icon.subscribe((icon: string) => - this.updateIcon(icon) - ); - } else { - this.updateIcon(this.action.icon); - } - if (isObservable(this.action.checkCondition)) { this.checkCondition$$ = this.action.checkCondition.subscribe( (checkCondition: boolean) => this.updateCheckCondition(checkCondition) @@ -210,11 +200,6 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { this.checkCondition$$ = undefined; } - if (this.icon$$ !== undefined) { - this.icon$$.unsubscribe(); - this.icon$$ = undefined; - } - if (this.tooltip$$ !== undefined) { this.tooltip$$.unsubscribe(); this.tooltip$$ = undefined; @@ -247,8 +232,4 @@ export class ActionbarItemComponent implements OnInit, OnDestroy { private updateCheckCondition(checkCondition: boolean) { this.checkCondition$.next(checkCondition); } - - private updateIcon(icon: string) { - this.icon$.next(icon); - } } diff --git a/packages/common/src/lib/action/actionbar/actionbar.component.html b/packages/common/src/lib/action/actionbar/actionbar.component.html index 832d8349e7..9958d57e5c 100644 --- a/packages/common/src/lib/action/actionbar/actionbar.component.html +++ b/packages/common/src/lib/action/actionbar/actionbar.component.html @@ -9,7 +9,7 @@ [matTooltip]="'igo.common.actionbar.scrollUp' | translate" (click)="scrollUp()" > - + expand_less @@ -57,7 +57,7 @@ [matTooltip]="'igo.common.actionbar.scrollDown' | translate" (click)="scrollDown()" > - + expand_more @@ -72,7 +72,7 @@ [disabled]="store.view.empty" [color]="iconColor" > - + {{ icon }} { this.collapsed = !this.collapsed; } @@ -160,7 +160,7 @@ export class ActionbarComponent implements OnDestroy, OnChanges { /** * Which icon want to be shown */ - @Input() icon = 'dots-horizontal'; + @Input() icon = 'more_horiz'; /** * Overlay X position diff --git a/packages/common/src/lib/action/shared/action.interfaces.ts b/packages/common/src/lib/action/shared/action.interfaces.ts index 6b438b427f..3625f7edbb 100644 --- a/packages/common/src/lib/action/shared/action.interfaces.ts +++ b/packages/common/src/lib/action/shared/action.interfaces.ts @@ -1,10 +1,12 @@ import { Observable } from 'rxjs'; +import { IconSvg } from '../../icons'; + export interface Action { id: string; handler: ActionHandler; title?: string; - icon?: string | Observable; + icon?: string | IconSvg | Observable; tooltip?: string | Observable; args?: any[]; checkbox?: boolean; diff --git a/packages/common/src/lib/badge-icon/badge-icon.directive.ts b/packages/common/src/lib/badge-icon/badge-icon.directive.ts index 7af41dfd8b..b241ff29b7 100644 --- a/packages/common/src/lib/badge-icon/badge-icon.directive.ts +++ b/packages/common/src/lib/badge-icon/badge-icon.directive.ts @@ -1,5 +1,5 @@ import { Directive, ElementRef, Input, OnInit } from '@angular/core'; -import { MatIconModule, MatIconRegistry } from '@angular/material/icon'; +import { MatIconModule } from '@angular/material/icon'; /** * This directive allow to add an icon inside a matBadge. @@ -14,12 +14,12 @@ import { MatIconModule, MatIconRegistry } from '@angular/material/icon'; export class IgoBadgeIconDirective implements OnInit { @Input() set igoMatBadgeIcon(value: string) { - this.matIconRegistry.getNamedSvgIcon(value).subscribe((svgObj) => { - this.svg = svgObj; - this.updateSvg(); - }); + this.html = ` + ${value} + `; + this.updateHtml(); } - private svg: SVGElement; + private html: string; @Input() set matBadgeHidden(value: boolean) { @@ -69,10 +69,7 @@ export class IgoBadgeIconDirective implements OnInit { private originalColor: string; - constructor( - private el: ElementRef, - private matIconRegistry: MatIconRegistry - ) {} + constructor(private el: ElementRef) {} ngOnInit() { this.badge.style.alignItems = 'center'; @@ -80,16 +77,16 @@ export class IgoBadgeIconDirective implements OnInit { this.updateHidden(); this.updateColor(); - this.updateSvg(); + this.updateHtml(); } - private updateSvg() { + private updateHtml() { if (!this.badge) { return; } this.badge.innerHTML = ''; - if (this.svg) { - this.badge.appendChild(this.svg); + if (this.html) { + this.badge.innerHTML = this.html; } } private updateColor() { diff --git a/packages/common/src/lib/collapsible/collapsible.component.html b/packages/common/src/lib/collapsible/collapsible.component.html index 0dfb4dc772..d7daa8756f 100644 --- a/packages/common/src/lib/collapsible/collapsible.component.html +++ b/packages/common/src/lib/collapsible/collapsible.component.html @@ -1,6 +1,5 @@ + expand_less {{ title }} diff --git a/packages/common/src/lib/entity/entity-table/entity-table.component.html b/packages/common/src/lib/entity/entity-table/entity-table.component.html index 3ad87ccf69..5f52bb8cc5 100644 --- a/packages/common/src/lib/entity/entity-table/entity-table.component.html +++ b/packages/common/src/lib/entity/entity-table/entity-table.component.html @@ -313,15 +313,12 @@ class="mat-cell-text" [ngClass]="row.cellData[column.name].class" > - - + {{ + row.cellData[column.name].value || column.icon + }} + {{ + row.cellData[column.name].value || column.icon + }} - + {{ button.icon }} diff --git a/packages/common/src/lib/form/form-field/form-field-select.component.html b/packages/common/src/lib/form/form-field/form-field-select.component.html index 2aba46c15a..9c94b07a7c 100644 --- a/packages/common/src/lib/form/form-field/form-field-select.component.html +++ b/packages/common/src/lib/form/form-field/form-field-select.component.html @@ -12,14 +12,11 @@ + >{{ + (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box' + }} {{ getErrorMessage() | translate diff --git a/packages/common/src/lib/form/form-field/form-field-text.component.html b/packages/common/src/lib/form/form-field/form-field-text.component.html index 750f160723..27f7556d01 100644 --- a/packages/common/src/lib/form/form-field/form-field-text.component.html +++ b/packages/common/src/lib/form/form-field/form-field-text.component.html @@ -11,14 +11,11 @@ + >{{ + (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box' + }} {{ diff --git a/packages/common/src/lib/form/form-field/form-field-textarea.component.html b/packages/common/src/lib/form/form-field/form-field-textarea.component.html index 20c919e99d..ee9927c7da 100644 --- a/packages/common/src/lib/form/form-field/form-field-textarea.component.html +++ b/packages/common/src/lib/form/form-field/form-field-textarea.component.html @@ -9,14 +9,11 @@ + >{{ + (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box' + }} {{ getErrorMessage() | translate diff --git a/packages/common/src/lib/home-button/home-button.component.html b/packages/common/src/lib/home-button/home-button.component.html index a36be26e82..43100b1a72 100644 --- a/packages/common/src/lib/home-button/home-button.component.html +++ b/packages/common/src/lib/home-button/home-button.component.html @@ -6,5 +6,5 @@ [matTooltip]="'igo.context.sidenav.mainMenu' | translate" (click)="onUnselectButtonClick()" > - + home diff --git a/packages/common/src/lib/icons/icon.provider.ts b/packages/common/src/lib/icons/icon.provider.ts new file mode 100644 index 0000000000..df1544f342 --- /dev/null +++ b/packages/common/src/lib/icons/icon.provider.ts @@ -0,0 +1,23 @@ +import { + APP_INITIALIZER, + EnvironmentProviders, + makeEnvironmentProviders +} from '@angular/core'; +import { MatIconModule, MatIconRegistry } from '@angular/material/icon'; + +type MaterialSymbolStyle = 'outlined' | 'rounded' | 'sharp'; + +export function provideIcon( + style: MaterialSymbolStyle = 'outlined' +): EnvironmentProviders { + return makeEnvironmentProviders([ + MatIconModule, + { + provide: APP_INITIALIZER, + useFactory: (iconRegistry: MatIconRegistry) => () => + iconRegistry.setDefaultFontSetClass(`material-symbols-${style}`), + deps: [MatIconRegistry], + multi: true + } + ]); +} diff --git a/packages/common/src/lib/icons/icon/icon.component.html b/packages/common/src/lib/icons/icon/icon.component.html new file mode 100644 index 0000000000..a0c5963f83 --- /dev/null +++ b/packages/common/src/lib/icons/icon/icon.component.html @@ -0,0 +1,5 @@ +@if (isSvg(icon)) { + +} @else { + {{ icon }} +} diff --git a/packages/common/src/lib/icons/icon/icon.component.spec.ts b/packages/common/src/lib/icons/icon/icon.component.spec.ts new file mode 100644 index 0000000000..66f53c7433 --- /dev/null +++ b/packages/common/src/lib/icons/icon/icon.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { IgoIconComponent } from './icon.component'; + +describe('IconComponent', () => { + let component: IgoIconComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [IgoIconComponent] + }).compileComponents(); + + fixture = TestBed.createComponent(IgoIconComponent); + component = fixture.componentInstance; + component.icon = 'test'; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/packages/common/src/lib/icons/icon/icon.component.ts b/packages/common/src/lib/icons/icon/icon.component.ts new file mode 100644 index 0000000000..1f015badda --- /dev/null +++ b/packages/common/src/lib/icons/icon/icon.component.ts @@ -0,0 +1,42 @@ +import { Component, Input } from '@angular/core'; +import { MatIconModule, MatIconRegistry } from '@angular/material/icon'; +import { DomSanitizer } from '@angular/platform-browser'; + +import { IconSvg } from '../shared'; + +@Component({ + selector: 'igo-icon', + standalone: true, + imports: [MatIconModule], + templateUrl: './icon.component.html' +}) +export class IgoIconComponent { + @Input({ required: true }) + set icon(icon: string | IconSvg) { + if (this.isSvg(icon)) { + this.registerSvg(icon); + } + + this._icon = icon; + } + get icon(): string | IconSvg { + return this._icon; + } + private _icon: string | IconSvg; + + constructor( + private iconRegistry: MatIconRegistry, + private sanitizer: DomSanitizer + ) {} + + registerSvg(icon: IconSvg): void { + this.iconRegistry.addSvgIconLiteral( + icon.name, + this.sanitizer.bypassSecurityTrustHtml(icon.svg) + ); + } + + isSvg(icon: string | IconSvg): icon is IconSvg { + return typeof icon != 'string'; + } +} diff --git a/packages/common/src/lib/icons/index.ts b/packages/common/src/lib/icons/index.ts new file mode 100644 index 0000000000..96ff867005 --- /dev/null +++ b/packages/common/src/lib/icons/index.ts @@ -0,0 +1,3 @@ +export * from './shared'; +export * from './icon.provider'; +export * from './icon/icon.component'; diff --git a/packages/common/src/lib/icons/shared/icon.interface.ts b/packages/common/src/lib/icons/shared/icon.interface.ts new file mode 100644 index 0000000000..8fe9d4c29a --- /dev/null +++ b/packages/common/src/lib/icons/shared/icon.interface.ts @@ -0,0 +1,4 @@ +export interface IconSvg { + name: string; + svg: string; +} diff --git a/packages/common/src/lib/icons/shared/icons.ts b/packages/common/src/lib/icons/shared/icons.ts new file mode 100644 index 0000000000..dc67c891a9 --- /dev/null +++ b/packages/common/src/lib/icons/shared/icons.ts @@ -0,0 +1,39 @@ +import { IconSvg } from './icon.interface'; + +/** + * Source: https://pictogrammers.com/library/mdi/ + */ +export const MAGNIFY_SCAN_ICON: IconSvg = { + name: 'magnify-scan', + svg: ` + magnify-scan +` +}; + +export const MICROSOFT_ICON = { + name: 'microsoft', + svg: ` + microsoft +` +}; + +export const KEYBOARD_ESC_ICON = { + name: 'keyboard-esc', + svg: ` + keyboard-esc +` +}; + +export const ENGINE_ICON = { + name: 'engine', + svg: ` + engine +` +}; + +export const SELECTION_MARKER_ICON = { + name: 'selection-marker', + svg: ` + selection-marker +` +}; diff --git a/packages/common/src/lib/icons/shared/index.ts b/packages/common/src/lib/icons/shared/index.ts new file mode 100644 index 0000000000..dfedea2a0b --- /dev/null +++ b/packages/common/src/lib/icons/shared/index.ts @@ -0,0 +1,2 @@ +export * from './icons'; +export * from './icon.interface'; diff --git a/packages/common/src/lib/interactive-tour/interactive-tour.component.html b/packages/common/src/lib/interactive-tour/interactive-tour.component.html index 014ef3b10a..44e0461ccb 100644 --- a/packages/common/src/lib/interactive-tour/interactive-tour.component.html +++ b/packages/common/src/lib/interactive-tour/interactive-tour.component.html @@ -15,7 +15,7 @@ " [disabled]="disabledTourButton" > - + help_center @@ -32,14 +32,13 @@ {{ discoverTitleInLocale$ | async | translate }} + >help_center diff --git a/packages/common/src/lib/table/table.component.html b/packages/common/src/lib/table/table.component.html index defec7ac73..c3b44443e2 100644 --- a/packages/common/src/lib/table/table.component.html +++ b/packages/common/src/lib/table/table.component.html @@ -81,7 +81,7 @@ [color]="getActionColor(action.color)" (click)="handleClickAction($event, action, row)" > - + {{ action.icon }} diff --git a/packages/common/src/lib/tool/shared/tool.interface.ts b/packages/common/src/lib/tool/shared/tool.interface.ts index f0d81199a9..d8a14a485d 100644 --- a/packages/common/src/lib/tool/shared/tool.interface.ts +++ b/packages/common/src/lib/tool/shared/tool.interface.ts @@ -1,9 +1,10 @@ +import { IconSvg } from '../../icons'; + export interface Tool { name: string; component: any; title?: string; - icon?: string; - iconImage?: string; + icon?: string | IconSvg; tooltip?: string; global?: boolean; options?: { [key: string]: any }; diff --git a/packages/common/src/lib/tool/toolbox/toolbox.component.ts b/packages/common/src/lib/tool/toolbox/toolbox.component.ts index 7fdfe5b0db..018ffcd804 100644 --- a/packages/common/src/lib/tool/toolbox/toolbox.component.ts +++ b/packages/common/src/lib/tool/toolbox/toolbox.component.ts @@ -222,7 +222,6 @@ export class ToolboxComponent implements OnInit, OnDestroy { id: tool.name, title: tool.title, icon: tool.icon, - // iconImage: tool.iconImage, tooltip: tool.tooltip, args: [tool, this.toolbox], handler: (_tool: Tool, _toolbox: Toolbox) => { diff --git a/packages/common/src/public_api.ts b/packages/common/src/public_api.ts index 83a88b7883..678e69af18 100644 --- a/packages/common/src/public_api.ts +++ b/packages/common/src/public_api.ts @@ -67,6 +67,7 @@ export * from './lib/flexible'; export * from './lib/form-dialog'; export * from './lib/form'; export * from './lib/home-button'; +export * from './lib/icons'; export * from './lib/image'; export * from './lib/interactive-tour'; export * from './lib/json-dialog'; diff --git a/packages/context/src/lib/context-manager/context-form/context-form.component.html b/packages/context/src/lib/context-manager/context-form/context-form.component.html index bdbd054556..b638adf1bf 100644 --- a/packages/context/src/lib/context-manager/context-form/context-form.component.html +++ b/packages/context/src/lib/context-manager/context-form/context-form.component.html @@ -39,7 +39,7 @@ color="primary" (click)="copyTextToClipboard()" > - + content_copy
diff --git a/packages/context/src/lib/context-manager/context-item/context-item.component.html b/packages/context/src/lib/context-manager/context-item/context-item.component.html index 46e99a06a3..c97b0c8940 100644 --- a/packages/context/src/lib/context-manager/context-item/context-item.component.html +++ b/packages/context/src/lib/context-manager/context-item/context-item.component.html @@ -16,16 +16,13 @@ [color]="default ? 'primary' : 'default'" (click)="favoriteClick(context)" > - + {{ + context.icon + ? context.icon + : context.scope === 'public' + ? 'public' + : 'star' + }} {{ context.title }} @@ -62,7 +59,7 @@ [color]="color" (click)="save.emit(context)" > - + save
@@ -76,17 +73,9 @@ [color]="color" (click)="managePermissions.emit(context)" > - + manage_accounts - -
@@ -163,7 +152,7 @@ [collapsed]="collapsed" (click)="collapsed = !collapsed" > - + more_horiz
diff --git a/packages/context/src/lib/context-manager/context-list/context-list.component.html b/packages/context/src/lib/context-manager/context-list/context-list.component.html index 39b51b3092..62c182a276 100644 --- a/packages/context/src/lib/context-manager/context-list/context-list.component.html +++ b/packages/context/src/lib/context-manager/context-list/context-list.component.html @@ -21,35 +21,22 @@ color="warn" (click)="clearFilter()" > - + close
- - + fitler_alt diff --git a/packages/context/src/lib/context-manager/context-list/context-list.component.scss b/packages/context/src/lib/context-manager/context-list/context-list.component.scss index ef17bd3b9d..4a3a9e0f0c 100644 --- a/packages/context/src/lib/context-manager/context-list/context-list.component.scss +++ b/packages/context/src/lib/context-manager/context-list/context-list.component.scss @@ -14,6 +14,12 @@ } } +.sort-alpha { + &.--active mat-icon { + color: red; + } +} + .context-filter-min-width { width: calc(100% - 135px); margin: 5px; diff --git a/packages/context/src/lib/context-manager/context-list/context-list.component.ts b/packages/context/src/lib/context-manager/context-list/context-list.component.ts index c79ae5fb7d..7dd738dac4 100644 --- a/packages/context/src/lib/context-manager/context-list/context-list.component.ts +++ b/packages/context/src/lib/context-manager/context-list/context-list.component.ts @@ -206,7 +206,7 @@ export class ContextListComponent implements OnInit, OnDestroy { title: this.languageService.translate.instant( 'igo.context.contextManager.emptyContext' ), - icon: 'map-outline', + icon: 'star', tooltip: this.languageService.translate.instant( 'igo.context.contextManager.emptyContextTooltip' ), @@ -219,7 +219,7 @@ export class ContextListComponent implements OnInit, OnDestroy { title: this.languageService.translate.instant( 'igo.context.contextManager.contextMap' ), - icon: 'map-check', + icon: 'map', tooltip: this.languageService.translate.instant( 'igo.context.contextManager.contextMapTooltip' ), @@ -364,8 +364,8 @@ export class ContextListComponent implements OnInit, OnDestroy { .toLowerCase(); } - toggleSort(sortAlpha: boolean) { - this.sortedAlpha = sortAlpha; + toggleSort() { + this.sortedAlpha = !this.sortedAlpha; } clearFilter() { diff --git a/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.html b/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.html index 19c8a9e179..b1db0521fb 100644 --- a/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.html +++ b/packages/context/src/lib/context-manager/context-permissions/context-permissions.component.html @@ -73,7 +73,7 @@

{{ 'igo.context.permission.readOnlyTitle' | translate }}

> - + person

{{ permission.profilTitle }} {{ permission.profil }} @@ -95,7 +95,7 @@

color="warn" (click)="removePermission.emit(permission)" > - + delete

diff --git a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.html b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.html index f66bbcc723..209052ca7a 100644 --- a/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.html +++ b/packages/context/src/lib/context-map-button/bookmark-button/bookmark-button.component.html @@ -6,6 +6,6 @@ [color]="color" (click)="createContext()" > - + star diff --git a/packages/context/src/lib/context-map-button/poi-button/poi-button.component.html b/packages/context/src/lib/context-map-button/poi-button/poi-button.component.html index aff274073a..12e0aaa146 100644 --- a/packages/context/src/lib/context-map-button/poi-button/poi-button.component.html +++ b/packages/context/src/lib/context-map-button/poi-button/poi-button.component.html @@ -12,7 +12,7 @@ color="primary" (click)="createPoi()" > - + add-circle @@ -29,7 +29,7 @@ color="warn" (click)="deletePoi(poi)" > - + delete diff --git a/packages/context/src/lib/context-map-button/user-button/user-button.component.html b/packages/context/src/lib/context-map-button/user-button/user-button.component.html index da49a48ba6..46360e5682 100644 --- a/packages/context/src/lib/context-map-button/user-button/user-button.component.html +++ b/packages/context/src/lib/context-map-button/user-button/user-button.component.html @@ -12,7 +12,7 @@ [color]="color" (click)="infoUser()" > - + info @@ -31,6 +31,6 @@ [color]="auth.authenticated ? color : 'warn'" (click)="accountClick()" > - + account_box diff --git a/packages/context/src/lib/share-map/share-map/share-map-api.component.html b/packages/context/src/lib/share-map/share-map/share-map-api.component.html index 84b4b93ae7..fd8d926d41 100644 --- a/packages/context/src/lib/share-map/share-map/share-map-api.component.html +++ b/packages/context/src/lib/share-map/share-map/share-map-api.component.html @@ -70,7 +70,7 @@ color="primary" (click)="copyTextToClipboard(textArea)" > - + content_copy
diff --git a/packages/context/src/lib/share-map/share-map/share-map-url.component.html b/packages/context/src/lib/share-map/share-map/share-map-url.component.html index 24685cb70e..2e149276a0 100644 --- a/packages/context/src/lib/share-map/share-map/share-map-url.component.html +++ b/packages/context/src/lib/share-map/share-map/share-map-url.component.html @@ -12,7 +12,7 @@
diff --git a/packages/context/src/lib/sidenav/sidenav.component.html b/packages/context/src/lib/sidenav/sidenav.component.html index 5be86421cc..c657d4036c 100644 --- a/packages/context/src/lib/sidenav/sidenav.component.html +++ b/packages/context/src/lib/sidenav/sidenav.component.html @@ -17,7 +17,7 @@ [matTooltip]="'igo.context.sidenav.goBack' | translate" *ngIf="tool" > - + arrow_back @@ -41,13 +41,11 @@ class="igo-icon-button" (click)="toggleTopPanel()" > - + {{ + ['collapsed', 'initial'].indexOf(topPanel.state) >= 0 + ? 'arrow_downward' + : 'arrow_upward' + }} { return { ngModule: IgoCoreModule, @@ -69,11 +70,5 @@ export class IgoCoreModule { }; } - constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) { - matIconRegistry.addSvgIconSet( - domSanitizer.bypassSecurityTrustResourceUrl( - './assets/igo2/core/icons/mdi.svg' - ) - ); - } + constructor() {} } diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.html b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.html index 41465cdfc4..06484d3543 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.html +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-group.component.html @@ -1,13 +1,13 @@ + expand_less + public @@ -46,7 +46,7 @@ [disabled]="disabled$ | async" (click)="onToggleClick($event)" > - + delete @@ -59,7 +59,7 @@ [disabled]="disabled$ | async" (click)="onToggleClick($event)" > - + add diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html index 4f04d0bee9..8e57025bc5 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html @@ -3,7 +3,6 @@ *ngIf="haveGroup()" class="catalog-browser-layer-carret" matListItemIcon - svgIcon="blank" > + public @@ -55,8 +54,8 @@ [matBadgeDisabled]="(inRange$ | async) === false" matBadgeSize="small" matBadgePosition="after" - [svgIcon]="(isPreview$ | async) ? 'plus' : added ? 'delete' : 'plus'" > + {{ (isPreview$ | async) ? 'plus' : added ? 'delete' : 'add' }} diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts index 9e6b3fb15b..8c327df863 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.ts @@ -271,9 +271,9 @@ export class CatalogBrowserLayerComponent implements OnInit, OnDestroy { getBadgeIcon() { if (this.inRange$.getValue()) { - return this.isVisible$.getValue() ? '' : 'eye-off'; + return this.isVisible$.getValue() ? '' : 'visibility_off'; } else { - return 'eye-off'; + return 'visibility_off'; } } diff --git a/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.html b/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.html index 406d605f7a..d450fe9cd9 100644 --- a/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.html +++ b/packages/geo/src/lib/catalog/catalog-library/catalog-library-item.component.html @@ -12,8 +12,8 @@ [matTooltip]="'igo.geo.catalog.externalProvider.catalog' | translate" color="primary" (click)="$event.stopPropagation()" - svgIcon="earth-arrow-right" > + public diff --git a/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.html b/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.html index 3f91fabffc..cf2086c411 100644 --- a/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.html +++ b/packages/geo/src/lib/catalog/catalog-library/catalog-library.component.html @@ -21,6 +21,6 @@ (click)="addCatalogDialog()" > {{ 'igo.geo.catalog.library.addBtn' | translate }} - + library_add diff --git a/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.html b/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.html index ba36a51673..f5d78166b4 100644 --- a/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.html +++ b/packages/geo/src/lib/directions/directions-buttons/directions-buttons.component.html @@ -7,7 +7,7 @@ color="primary" (click)="addStop()" > - + add_location_alt diff --git a/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.html b/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.html index e581c6a361..02604dc8a4 100644 --- a/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.html +++ b/packages/geo/src/lib/directions/directions-inputs/directions-inputs.component.html @@ -43,7 +43,7 @@ aria-label="Clear" (click)="clearStop(stop)" > - + close - + drag_indicator diff --git a/packages/geo/src/lib/directions/directions-results/directions-results.component.html b/packages/geo/src/lib/directions/directions-results/directions-results.component.html index 7b2c894e32..1b991e4ac5 100644 --- a/packages/geo/src/lib/directions/directions-results/directions-results.component.html +++ b/packages/geo/src/lib/directions/directions-results/directions-results.component.html @@ -34,11 +34,8 @@

{{ activeDirection.title }}

*ngFor="let step of activeDirection.steps; let cnt = index" igoListItem > - + {{ formatStep(step, cnt).image }} diff --git a/packages/geo/src/lib/directions/shared/directions.interface.ts b/packages/geo/src/lib/directions/shared/directions.interface.ts index 203607cd87..5816fe1128 100644 --- a/packages/geo/src/lib/directions/shared/directions.interface.ts +++ b/packages/geo/src/lib/directions/shared/directions.interface.ts @@ -1,6 +1,7 @@ import { GeoJsonGeometryTypes } from 'geojson'; import { Feature } from '../../feature/shared/feature.interfaces'; +import { SearchMeta } from '../../search'; import { SearchSource } from '../../search/shared/sources/source'; import { DirectionRelativePositionType, @@ -60,15 +61,7 @@ export interface SourceProposal { type: ProposalType; source: SearchSource; results: { [key: string]: any }[]; - meta: { - dataType: string; - id: string; - title: string; - titleHtml?: string; - icon: string; - score?: number; - nextPage?: boolean; - }; + meta: SearchMeta; } export interface Direction { diff --git a/packages/geo/src/lib/directions/shared/directions.utils.ts b/packages/geo/src/lib/directions/shared/directions.utils.ts index b060f1d145..182f9bf5c9 100644 --- a/packages/geo/src/lib/directions/shared/directions.utils.ts +++ b/packages/geo/src/lib/directions/shared/directions.utils.ts @@ -434,7 +434,7 @@ export function formatInstruction( ) { const translate = languageService.translate; let directive; - let image = 'forward'; + let image = 'arrow_forward'; let cssClass = 'rotate-270'; const translatedDirection = translateBearing(direction, languageService); const translatedModifier = translateModifier(modifier, languageService); @@ -450,27 +450,27 @@ export function formatInstruction( } if (modifier === 'uturn') { - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-90'; } else if (modifier === 'sharp right') { - image = 'subdirectory-arrow-right'; + image = 'subdirectory_arrow_right'; cssClass = 'icon-flipped'; } else if (modifier === 'right') { - image = 'subdirectory-arrow-right'; + image = 'subdirectory_arrow_right'; cssClass = 'icon-flipped'; } else if (modifier === 'slight right') { - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-290'; } else if (modifier === 'straight') { - image = 'forward'; + image = 'arrow_forward'; } else if (modifier === 'slight left') { - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-250'; } else if (modifier === 'left') { - image = 'subdirectory-arrow-left'; + image = 'subdirectory_arrow_left'; cssClass = 'icon-flipped'; } else if (modifier === 'sharp left') { - image = 'subdirectory-arrow-left'; + image = 'subdirectory_arrow_left'; cssClass = 'icon-flipped'; } @@ -493,14 +493,14 @@ export function formatInstruction( route, translatedDirection }); - image = 'compass'; + image = 'explore'; cssClass = ''; } else if (type === 'depart') { directive = translate.instant('igo.geo.directions.depart', { route, translatedDirection }); - image = 'compass'; + image = 'explore'; cssClass = ''; } else if (type === 'arrive') { if (lastStep) { @@ -514,12 +514,12 @@ export function formatInstruction( directive = translate.instant('igo.geo.directions.arrive.intermediate', { route }); - image = 'map-marker'; + image = 'location_on'; cssClass = ''; } } else if (type === 'merge') { directive = translate.instant('igo.geo.directions.merge', { route }); - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-270'; } else if (type === 'on ramp') { directive = translate.instant('igo.geo.directions.on ramp', { @@ -548,7 +548,7 @@ export function formatInstruction( directive = translate.instant('igo.geo.directions.continue.notUturn', { route }); - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-270'; } else if (type === 'roundabout') { const cntSuffix = @@ -560,21 +560,21 @@ export function formatInstruction( cntSuffix, route }); - image = 'chart-donut'; + image = 'donut_large'; cssClass = ''; } else if (type === 'rotary') { directive = translate.instant('igo.geo.directions.rotary'); - image = 'chart-donut'; + image = 'donut_large'; cssClass = ''; } else if (type === 'roundabout turn') { directive = translate.instant('igo.geo.directions.roundabout turn'); - image = 'chart-donut'; + image = 'donut_large'; cssClass = ''; } else if (type === 'exit roundabout') { directive = translate.instant('igo.geo.directions.exit roundabout', { route }); - image = 'forward'; + image = 'arrow_forward'; cssClass = 'rotate-270'; } else if (type === 'notification') { directive = translate.instant('igo.geo.directions.notification'); @@ -587,9 +587,9 @@ export function formatInstruction( directive = translate.instant('igo.geo.directions.unknown'); } - image = lastStep ? 'flag-variant' : image; + image = lastStep ? 'flag' : image; cssClass = lastStep ? '' : cssClass; - image = stepPosition === 0 ? 'compass' : image; + image = stepPosition === 0 ? 'explore' : image; cssClass = stepPosition === 0 ? '' : cssClass; return { instruction: directive, image, cssClass }; diff --git a/packages/geo/src/lib/download/download-button/download-button.component.html b/packages/geo/src/lib/download/download-button/download-button.component.html index 7b958d1cae..0ee9a8ddb7 100644 --- a/packages/geo/src/lib/download/download-button/download-button.component.html +++ b/packages/geo/src/lib/download/download-button/download-button.component.html @@ -11,5 +11,5 @@ [color]="color" (click)="openDownload(layer)" > - + download diff --git a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.html b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.html index ec1afc5ae7..56fe50085d 100644 --- a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.html +++ b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.html @@ -1,25 +1,25 @@
- keyboard_return{{ 'igo.geo.draw.finish' | translate }}
- keyboard_backspace{{ 'igo.geo.draw.undo' | translate }}
- {{ 'igo.geo.draw.abort' | translate }} + + {{ 'igo.geo.draw.abort' | translate }} +
- space_bar{{ 'igo.geo.draw.move' | translate }}
diff --git a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts index 9f199b6380..732a8cdce0 100644 --- a/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts +++ b/packages/geo/src/lib/draw/draw/draw-shorcuts.component.ts @@ -7,6 +7,8 @@ import { } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; +import { IconSvg, IgoIconComponent, KEYBOARD_ESC_ICON } from '@igo2/common'; + import { TranslateModule } from '@ngx-translate/core'; @Component({ @@ -20,7 +22,10 @@ import { TranslateModule } from '@ngx-translate/core'; MatDialogActions, MatButtonModule, MatDialogClose, - TranslateModule + TranslateModule, + IgoIconComponent ] }) -export class DrawShorcutsComponent {} +export class DrawShorcutsComponent { + svgIcon: IconSvg = KEYBOARD_ESC_ICON; +} diff --git a/packages/geo/src/lib/draw/draw/draw.component.html b/packages/geo/src/lib/draw/draw/draw.component.html index 8026b905c1..01c88d3a4d 100644 --- a/packages/geo/src/lib/draw/draw/draw.component.html +++ b/packages/geo/src/lib/draw/draw/draw.component.html @@ -109,7 +109,8 @@ " (click)="activeDrawingLayer.visible = !activeDrawingLayer.visible" > - + + {{ activeDrawingLayer.visible ? 'visibility' : 'visibility_off' }} @@ -126,7 +127,7 @@ [disabled]="(selectedFeatures$ | async).length === 0" (click)="deleteDrawings()" > - + delete
@@ -174,11 +175,10 @@ > + >keyboard @@ -194,11 +194,10 @@ aria-hidden="false" iconPositionEnd class="style-icon" - svgIcon="palette" [matBadge]="selectedFeatures$.value.length" matBadgeColor="warn" matBadgeSize="medium" - > + >palette
diff --git a/packages/geo/src/lib/draw/draw/draw.component.ts b/packages/geo/src/lib/draw/draw/draw.component.ts index dedaf6ca71..3ab0aee99a 100644 --- a/packages/geo/src/lib/draw/draw/draw.component.ts +++ b/packages/geo/src/lib/draw/draw/draw.component.ts @@ -272,7 +272,7 @@ export class DrawComponent implements OnInit, OnDestroy { return [ { editMode: false, - icon: 'pencil', + icon: 'edit', color: 'primary', click: () => { this.editLabelDrawing(feature); diff --git a/packages/geo/src/lib/feature/feature-details/feature-details.component.html b/packages/geo/src/lib/feature/feature-details/feature-details.component.html index edb8d3dc65..fe8fc23342 100644 --- a/packages/geo/src/lib/feature/feature-details/feature-details.component.html +++ b/packages/geo/src/lib/feature/feature-details/feature-details.component.html @@ -12,7 +12,7 @@ - + {{ icon }} - + content_copy @@ -79,7 +79,7 @@ mat-icon-button (click)="copyTextToClipboard(property.value)" > - + content_copy diff --git a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.html b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.html index 13236cef25..ee723c7d6d 100644 --- a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.html +++ b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.html @@ -22,8 +22,8 @@ [matBadge]="badge" matBadgeColor="warn" matBadgeSize="medium" - svgIcon="filter" - >
+ >filter_alt
- + close @@ -208,7 +208,7 @@ [disabled]="!currentFilter.active" (click)="clearProperty()" > - + close @@ -222,7 +222,7 @@ color="warn" (click)="deleteFilter()" > - + delete
@@ -257,7 +257,7 @@ " (click)="currentFilter.igoSNRC = ''" > - + close @@ -278,7 +278,7 @@ matTooltipShowDelay="500" [matTooltip]="'igo.geo.spatialSelector.btnSetExtent' | translate" > - + zoom_out_map @@ -332,7 +332,7 @@ [disabled]="!currentFilter.active" (click)="clearProperty(1)" > - + close @@ -384,7 +384,7 @@ [disabled]="!currentFilter.active" (click)="clearProperty(2)" > - + close diff --git a/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.html b/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.html index 8be630dfca..1263558676 100644 --- a/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.html +++ b/packages/geo/src/lib/filter/ogc-filter-selection/ogc-filter-selection.component.html @@ -208,7 +208,7 @@

{{ bundle.title }}

matTooltipClass="material-tooltip" (click)="emptySelect()" > - + filter_alt_off {{ bundle.title }} matTooltipClass="material-tooltip" (click)="emptyAutocomplete()" > - + filter_alt_off diff --git a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.ts b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.ts index 7c5db0f96b..c901e32a89 100644 --- a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.ts @@ -40,7 +40,7 @@ export class OgcFilterTimeSliderComponent implements OnInit { calculatedStep: number = 0; readonly _defaultDisplayFormat: string = 'DD/MM/YYYY HH:mm A'; readonly _defaultSliderInterval: number = 2000; - public playIcon = 'play-circle'; + public playIcon = 'play_circle'; public resetIcon = 'replay'; get sliderInterval(): number { @@ -123,7 +123,7 @@ export class OgcFilterTimeSliderComponent implements OnInit { if (this.interval) { this.stopFilter(); } else { - this.playIcon = 'pause-circle'; + this.playIcon = 'pause_circle'; this.interval = setInterval( (that) => { if (this.slider.step < this.calculatedStep) { @@ -146,7 +146,7 @@ export class OgcFilterTimeSliderComponent implements OnInit { clearInterval(this.interval); } this.interval = undefined; - this.playIcon = 'play-circle'; + this.playIcon = 'play_circle'; } resetFilter(event: any) { @@ -154,7 +154,7 @@ export class OgcFilterTimeSliderComponent implements OnInit { clearInterval(this.interval); } this.interval = undefined; - this.playIcon = 'play-circle'; + this.playIcon = 'play_circle'; this.slider.step = 1; const _increment = '_increment'; const _emitInputEvent = '_emitInputEvent'; diff --git a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.html b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.html index 98f442c6c5..b0039ce390 100644 --- a/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.html +++ b/packages/geo/src/lib/filter/ogc-filter-time/ogc-filter-time.component.html @@ -111,7 +111,7 @@ [matTooltip]="'igo.geo.filter.resetFilters' | translate" [disabled]="filterStateDisable" > - + {{ resetIcon }} - + {{ resetIcon }} + >expand_less - + add diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html index 48365d319b..40815b2fba 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html @@ -152,11 +152,9 @@
{{ node.name }}
- + expand_less - + pentagon - + circle
diff --git a/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.html b/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.html index 0e992505a6..d7d9698ef5 100644 --- a/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.html +++ b/packages/geo/src/lib/filter/time-filter-button/time-filter-button.component.html @@ -12,8 +12,8 @@ [matBadge]="badge" matBadgeColor="warn" matBadgeSize="medium" - svgIcon="history" - > + >history
- + {{ playIcon }}
@@ -228,6 +228,6 @@

{{ handleSliderTooltip() }}

diff --git a/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts b/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts index 6a8fef044e..8d3107ca3f 100644 --- a/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts +++ b/packages/geo/src/lib/filter/time-filter-form/time-filter-form.component.ts @@ -94,7 +94,7 @@ export class TimeFilterFormComponent implements OnInit { } public interval: any; - public playIcon = 'play-circle'; + public playIcon = 'play_circle'; public resetIcon = 'replay'; @Output() change: EventEmitter = new EventEmitter(); @@ -375,7 +375,7 @@ export class TimeFilterFormComponent implements OnInit { if (this.interval) { this.stopFilter(); } else { - this.playIcon = 'pause-circle'; + this.playIcon = 'pause_circle'; this.interval = setInterval( (that) => { let newMinDateNumber; @@ -409,7 +409,7 @@ export class TimeFilterFormComponent implements OnInit { if (this.interval) { this.stopFilter(); } else { - this.playIcon = 'pause-circle'; + this.playIcon = 'pause_circle'; this.interval = setInterval( () => { if (this.year + this.mySlider.step > this.max.getFullYear()) { @@ -430,7 +430,7 @@ export class TimeFilterFormComponent implements OnInit { clearInterval(this.interval); } this.interval = undefined; - this.playIcon = 'play-circle'; + this.playIcon = 'play_circle'; } handleSliderDateChange(event: any) { diff --git a/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.html b/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.html index 60a2d6d51f..3a90a68c2c 100644 --- a/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.html +++ b/packages/geo/src/lib/filter/time-filter-item/time-filter-item.component.html @@ -6,8 +6,8 @@ [target]="filters" [collapsed]="filtersCollapsed" (click)="toggleFiltersCollapsed()" - svgIcon="chevron-up" > + expand_less - + {{ layer.visible ? 'visibility' : 'visibility_off' }} diff --git a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html index 0584ada643..d2ed93ba56 100644 --- a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html +++ b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html @@ -45,7 +45,7 @@ [placeholder]="drawGuidePlaceholder" [(ngModel)]="drawGuide" /> - + adjust {{ 'igo.geo.measure.meters' | translate }} diff --git a/packages/geo/src/lib/import-export/export-button/export-button.component.html b/packages/geo/src/lib/import-export/export-button/export-button.component.html index 44be9101ed..e33dfa5f0f 100644 --- a/packages/geo/src/lib/import-export/export-button/export-button.component.html +++ b/packages/geo/src/lib/import-export/export-button/export-button.component.html @@ -6,6 +6,5 @@ [matTooltip]="'igo.geo.download.action' | translate" [color]="color" > - - + file_save diff --git a/packages/geo/src/lib/layer/layer-item/layer-item.component.html b/packages/geo/src/lib/layer/layer-item/layer-item.component.html index d539ea8bf4..c7f3bd53cd 100644 --- a/packages/geo/src/lib/layer/layer-item/layer-item.component.html +++ b/packages/geo/src/lib/layer/layer-item/layer-item.component.html @@ -36,8 +36,7 @@ matBadgePosition="after" [matBadgeHidden]="queryBadgeHidden$ | async" [ngClass]="{ disabled: (inResolutionRange$ | async) === false }" - [svgIcon]="(layer.visible$ | async) ? 'eye' : 'eye-off'" - > + >{{ (layer.visible$ | async) ? 'visibility' : 'visibility_off' }} @@ -64,8 +63,7 @@ matBadgePosition="after" [matBadgeHidden]="queryBadgeHidden$ | async" [ngClass]="{ disabled: (inResolutionRange$ | async) === false }" - [svgIcon]="layer.visible ? 'eye' : 'eye-off'" - > + >{{ layer.visible ? 'visibility' : 'visibility_off' }} @@ -79,7 +77,7 @@ color="primary" (click)="toggleLayerTool()" > - + more_horiz diff --git a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html index e00ded4682..05a880bf31 100644 --- a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html +++ b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html @@ -11,8 +11,7 @@ [target]="legend" [collapsed]="item.collapsed" (toggle)="toggleLegendItem($event, item)" - svgIcon="chevron-up" - > + >expand_less {{ computeItemTitle(item) | async }} diff --git a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.html b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.html index 89bd8ea941..ef63bd259d 100644 --- a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.html +++ b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.html @@ -15,13 +15,14 @@ color="warn" (click)="clearTerm()" > - + close
- @@ -73,12 +71,8 @@ matTooltipShowDelay="500" (click)="toggleSelectionMode()" > - + {{ + selectionMode ? 'library_add_check' : 'filter_none' + }}
diff --git a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.scss b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.scss index 40a8244918..dd685403c5 100644 --- a/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.scss +++ b/packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.component.scss @@ -19,3 +19,9 @@ display: none; } } + +.sort-alpha { + &.--active mat-icon { + color: red; + } +} diff --git a/packages/geo/src/lib/layer/layer-list/layer-list.component.html b/packages/geo/src/lib/layer/layer-list/layer-list.component.html index 9ef89f259f..1876f3f465 100644 --- a/packages/geo/src/lib/layer/layer-list/layer-list.component.html +++ b/packages/geo/src/lib/layer/layer-list/layer-list.component.html @@ -68,7 +68,7 @@ [matTooltip]="'igo.geo.layer.removeLayer' | translate" (click)="removeLayers()" > - + delete @@ -134,8 +134,8 @@ [matBadge]="badgeOpacity" matBadgeColor="primary" matBadgeSize="medium" - svgIcon="opacity" - > + >opacity @@ -220,8 +220,8 @@ matBadgeColor="warn" matBadgeSize="medium" [matBadgeHidden]="isAllLayersRemovable(layersChecked)" - svgIcon="delete" - > + >delete diff --git a/packages/geo/src/lib/layer/layer-list/layer-list.component.ts b/packages/geo/src/lib/layer/layer-list/layer-list.component.ts index ed950eb1a9..7a639a21ab 100644 --- a/packages/geo/src/lib/layer/layer-list/layer-list.component.ts +++ b/packages/geo/src/lib/layer/layer-list/layer-list.component.ts @@ -22,7 +22,13 @@ import { MatMenuModule } from '@angular/material/menu'; import { MatSliderChange, MatSliderModule } from '@angular/material/slider'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { ListComponent, ListItemDirective, PanelComponent } from '@igo2/common'; +import { + IconSvg, + ListComponent, + ListItemDirective, + MAGNIFY_SCAN_ICON, + PanelComponent +} from '@igo2/common'; import * as olextent from 'ol/extent'; @@ -268,6 +274,7 @@ export class LayerListComponent implements OnInit, OnDestroy { public selectAllCheck: boolean; public selectAllCheck$ = new BehaviorSubject(undefined); private selectAllCheck$$: Subscription; + svgIcon: IconSvg = MAGNIFY_SCAN_ICON; constructor(private elRef: ElementRef) {} diff --git a/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.html b/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.html index 006e63fb50..2914a18bc6 100644 --- a/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.html +++ b/packages/geo/src/lib/layer/track-feature-button/track-feature-button.component.html @@ -8,5 +8,5 @@ [color]="color" (click)="toggleTrackFeature()" > - + my_location diff --git a/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.html b/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.html index f7b7816fda..e22cf31b24 100644 --- a/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.html +++ b/packages/geo/src/lib/map/baselayers-switcher/baselayers-switcher.component.html @@ -19,7 +19,7 @@ matTooltipPosition="right" color="primary" > - + photo_library @@ -40,10 +40,8 @@
- + arrow_drop_down
diff --git a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.html b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.html index 56501ed344..6b7f97f6d6 100644 --- a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.html +++ b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.html @@ -10,6 +10,6 @@ [color]="color" (click)="onGeolocationClick()" > - + {{ icon$ | async }} diff --git a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts index 69da669ff6..be108da42e 100644 --- a/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts +++ b/packages/geo/src/lib/map/geolocate-button/geolocate-button.component.ts @@ -27,9 +27,7 @@ import { IgoMap } from '../shared/map'; }) export class GeolocateButtonComponent implements AfterContentInit, OnDestroy { private tracking$$: Subscription; - readonly icon$: BehaviorSubject = new BehaviorSubject( - 'crosshairs-gps' - ); + readonly icon$: BehaviorSubject = new BehaviorSubject('my_location'); @Input() get map(): IgoMap { @@ -55,11 +53,11 @@ export class GeolocateButtonComponent implements AfterContentInit, OnDestroy { this.tracking$$ = this.map.geolocationController.tracking$.subscribe( (tracking) => { if (tracking) { - this.icon$.next('crosshairs-gps'); + this.icon$.next('my_location'); } else { this.configService.getConfig('geolocate.basic') - ? this.icon$.next('crosshairs-gps') - : this.icon$.next('crosshairs'); + ? this.icon$.next('my_location') + : this.icon$.next('location_searching'); } } ); diff --git a/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.html b/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.html index 746307a17f..334f8e13ed 100644 --- a/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.html +++ b/packages/geo/src/lib/map/home-extent-button/home-extent-button.component.html @@ -6,6 +6,6 @@ [color]="color" (click)="onToggleClick()" > - + home diff --git a/packages/geo/src/lib/map/menu-button/menu-button.component.html b/packages/geo/src/lib/map/menu-button/menu-button.component.html index 1494c38c2c..e0a16573ae 100644 --- a/packages/geo/src/lib/map/menu-button/menu-button.component.html +++ b/packages/geo/src/lib/map/menu-button/menu-button.component.html @@ -7,5 +7,5 @@ [matTooltip]="(sidenavOpened ? 'menu.close' : 'menu.open') | translate" (click)="onToggleSidenavClick()" > - + menu diff --git a/packages/geo/src/lib/map/offline-button/offline-button.component.html b/packages/geo/src/lib/map/offline-button/offline-button.component.html index 43681d98fc..68166ce7f8 100644 --- a/packages/geo/src/lib/map/offline-button/offline-button.component.html +++ b/packages/geo/src/lib/map/offline-button/offline-button.component.html @@ -11,6 +11,6 @@ [color]="enabled ? color : null" (click)="onClick()" > - + wifi_off diff --git a/packages/geo/src/lib/map/rotation-button/rotation-button.component.html b/packages/geo/src/lib/map/rotation-button/rotation-button.component.html index 02834db8a0..13d4bbbc63 100644 --- a/packages/geo/src/lib/map/rotation-button/rotation-button.component.html +++ b/packages/geo/src/lib/map/rotation-button/rotation-button.component.html @@ -16,7 +16,6 @@ [disabled]="(rotated$ | async) === false" (click)="map.viewController.resetRotation()" > - - + navigation diff --git a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.html b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.html index bd7c50dd2d..9616296168 100644 --- a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.html +++ b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.html @@ -10,6 +10,6 @@ matTooltipPosition="left" (click)="toggleWakeLock()" > - + {{ icon$ | async }} diff --git a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts index 12945a3a3e..3dda148851 100644 --- a/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts +++ b/packages/geo/src/lib/map/wake-lock-button/wake-lock-button.component.ts @@ -45,7 +45,7 @@ export class WakeLockButtonComponent { } private noSleep: NoSleep; - readonly icon$: BehaviorSubject = new BehaviorSubject('sleep'); + readonly icon$: BehaviorSubject = new BehaviorSubject('bedtime'); public visible = false; constructor(private storageService: StorageService) { @@ -78,7 +78,7 @@ export class WakeLockButtonComponent { private enableWakeLock() { this.noSleep.enable(); this.enabled = true; - this.icon$.next('sleep-off'); + this.icon$.next('bedtime_off'); } /** * Let display sleep @@ -86,7 +86,7 @@ export class WakeLockButtonComponent { private disableWakeLock() { this.noSleep.disable(); this.enabled = false; - this.icon$.next('sleep'); + this.icon$.next('bedtime'); } toggleWakeLock() { diff --git a/packages/geo/src/lib/map/zoom-button/zoom-button.component.html b/packages/geo/src/lib/map/zoom-button/zoom-button.component.html index c18772a2ec..f9267c9df2 100644 --- a/packages/geo/src/lib/map/zoom-button/zoom-button.component.html +++ b/packages/geo/src/lib/map/zoom-button/zoom-button.component.html @@ -7,7 +7,7 @@ [disabled]="zoom >= maxZoom" (click)="map.viewController.zoomIn()" > - + add diff --git a/packages/geo/src/lib/measure/measurer/measurer.component.html b/packages/geo/src/lib/measure/measurer/measurer.component.html index 7936ca575e..cbf4b29e9b 100644 --- a/packages/geo/src/lib/measure/measurer/measurer.component.html +++ b/packages/geo/src/lib/measure/measurer/measurer.component.html @@ -108,7 +108,7 @@ color="accent" (click)="onCalculateClick()" > - + calculate - - - + info diff --git a/packages/geo/src/lib/search/search-bar/search-bar.component.html b/packages/geo/src/lib/search/search-bar/search-bar.component.html index 022882c12e..75ad2cfe20 100644 --- a/packages/geo/src/lib/search/search-bar/search-bar.component.html +++ b/packages/geo/src/lib/search/search-bar/search-bar.component.html @@ -25,7 +25,7 @@ (click)="onClearButtonClick()" [matTooltip]="'igo.geo.search.clearSearch' | translate" > - + close
@@ -33,7 +33,7 @@
+ >{{ (isPreview$ | async) ? 'add' : added ? 'delete' : 'add' }} @@ -43,13 +42,12 @@ + >add_to_photos diff --git a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts index f46e24e7f2..db3d8cd26a 100644 --- a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts +++ b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts @@ -301,9 +301,9 @@ export class SearchResultAddButtonComponent implements OnInit, OnDestroy { getBadgeIcon() { if (this.inRange$.value) { - return this.isVisible$.value ? '' : 'eye-off'; + return this.isVisible$.value ? '' : 'visibility_off'; } else { - return 'eye-off'; + return 'visibility_off'; } } diff --git a/packages/geo/src/lib/search/search-results/search-results-item.component.html b/packages/geo/src/lib/search/search-results/search-results-item.component.html index 222967579b..5d3d4fecc3 100644 --- a/packages/geo/src/lib/search/search-results/search-results-item.component.html +++ b/packages/geo/src/lib/search/search-results/search-results-item.component.html @@ -2,11 +2,9 @@ (mouseenter)="onMouseEvent($event)" (mouseleave)="onMouseEvent($event)" > - + {{ + showIcons ? icon : 'blank' + }}
- + search diff --git a/packages/geo/src/lib/search/search-selector/search-selector.component.html b/packages/geo/src/lib/search/search-selector/search-selector.component.html index b26d5f405a..154643bb86 100644 --- a/packages/geo/src/lib/search/search-selector/search-selector.component.html +++ b/packages/geo/src/lib/search/search-selector/search-selector.component.html @@ -8,7 +8,7 @@ [matTooltip]="'igo.geo.search.menu.tooltip' | translate" [matMenuTriggerFor]="searchSelectorMenu" > - + arrow_drop_down - + expand_more
diff --git a/packages/geo/src/lib/search/shared/search.interfaces.ts b/packages/geo/src/lib/search/shared/search.interfaces.ts index 56a7b36956..a2b2b3eda6 100644 --- a/packages/geo/src/lib/search/shared/search.interfaces.ts +++ b/packages/geo/src/lib/search/shared/search.interfaces.ts @@ -1,3 +1,5 @@ +import { IconSvg } from '@igo2/common'; + import { Observable } from 'rxjs'; import { CommonVectorStyleOptions } from '../../style/shared/vector/vector-style.interface'; @@ -16,16 +18,7 @@ export interface Research { export interface SearchResult { data: T; source: SearchSource; - meta: { - dataType: string; - id: string; - title: string; - titleHtml?: string; - pointerSummaryTitle?: string; - icon: string; - score?: number; - nextPage?: boolean; - }; + meta: SearchMeta; style?: { base?: CommonVectorStyleOptions; selection?: CommonVectorStyleOptions; @@ -33,6 +26,17 @@ export interface SearchResult { }; } +export interface SearchMeta { + id: string; + dataType: string; + title: string; + titleHtml?: string; + icon: string | IconSvg; + score?: number; + nextPage?: boolean; + pointerSummaryTitle?: string; +} + /** * Search sources that allow searching by text implement this class */ diff --git a/packages/geo/src/lib/search/shared/search.utils.ts b/packages/geo/src/lib/search/shared/search.utils.ts index e6649dd38e..71546561ce 100644 --- a/packages/geo/src/lib/search/shared/search.utils.ts +++ b/packages/geo/src/lib/search/shared/search.utils.ts @@ -65,7 +65,7 @@ export function featureToSearchResult( dataType: FEATURE, id: feature.meta.id as string, title: feature.meta.title, - icon: feature.meta.icon || 'map-marker' + icon: feature.meta.icon || 'location_on' } }; } diff --git a/packages/geo/src/lib/search/shared/sources/cadastre.ts b/packages/geo/src/lib/search/shared/sources/cadastre.ts index 28ffdb2719..255288a5b5 100644 --- a/packages/geo/src/lib/search/shared/sources/cadastre.ts +++ b/packages/geo/src/lib/search/shared/sources/cadastre.ts @@ -139,7 +139,7 @@ export class CadastreSearchSource extends SearchSource implements TextSearch { id, title: numero, score: computeTermSimilarity(term.trim(), numero), - icon: 'map-marker' + icon: 'location_on' }, data: { type: FEATURE, diff --git a/packages/geo/src/lib/search/shared/sources/coordinates.ts b/packages/geo/src/lib/search/shared/sources/coordinates.ts index b2dcf8c1a5..aff082de39 100644 --- a/packages/geo/src/lib/search/shared/sources/coordinates.ts +++ b/packages/geo/src/lib/search/shared/sources/coordinates.ts @@ -211,7 +211,7 @@ export class CoordinatesReverseSearchSource id: data[0].toString() + ',' + data[1].toString(), title: roundedCoordString, titleHtml: roundedCoordString + subtitleHtml, - icon: 'map-marker', + icon: 'location_on', score: 100 // every coord exists } }; diff --git a/packages/geo/src/lib/search/shared/sources/icherche-icons.ts b/packages/geo/src/lib/search/shared/sources/icherche-icons.ts new file mode 100644 index 0000000000..caec906298 --- /dev/null +++ b/packages/geo/src/lib/search/shared/sources/icherche-icons.ts @@ -0,0 +1,34 @@ +import { ENGINE_ICON, IconSvg } from '@igo2/common'; + +/** + * Icons mappings to be retrocompatible with iCherche + */ +export const ICHERCHE_ICONS: { + [key: string]: string | IconSvg; +} = { + 'map-marker': 'location_on', + city: 'location_city', + 'flag-triangle': 'flag', + 'map-marker-alert': 'fmd_bad', + 'map-marker-radius': 'pin_drop', + 'map-marker-multiple': 'local_post_office', + 'map-legend': 'map', + bank: 'account_balance', + 'map-search': 'search_insights', + 'book-open-variant': 'menu_book', + 'office-building': 'apartment', + 'table-picnic': 'table_restaurant', + flash: 'flash_on', + engine: ENGINE_ICON, + 'road-variant': 'add_road', + 'baby-face-outline': 'child_care', + 'home-account': 'location_home', + hospital: 'local_hospital', + pharmacy: 'local_pharmacy', + 'police-badge-outline': 'local_police', + parking: 'local_parking', + tree: 'nature', + 'home-city': 'home_work', + terrain: 'landscape', + 'panorama-horizontal': 'panorama_horizontal' +}; diff --git a/packages/geo/src/lib/search/shared/sources/icherche.ts b/packages/geo/src/lib/search/shared/sources/icherche.ts index 161d5ba375..12113cbbee 100644 --- a/packages/geo/src/lib/search/shared/sources/icherche.ts +++ b/packages/geo/src/lib/search/shared/sources/icherche.ts @@ -6,6 +6,7 @@ import { import { Inject, Injectable, Injector } from '@angular/core'; import { AuthService } from '@igo2/auth'; +import { IconSvg } from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; import { StorageService } from '@igo2/core/storage'; import { ObjectUtils, customCacheHasher } from '@igo2/utils'; @@ -20,6 +21,7 @@ import { Feature } from '../../../feature/shared/feature.interfaces'; import { ReverseSearch, SearchResult, TextSearch } from '../search.interfaces'; import { computeTermSimilarity } from '../search.utils'; import { GoogleLinks } from './../../../utils/googleLinks'; +import { ICHERCHE_ICONS } from './icherche-icons'; import { IChercheData, IChercheResponse, @@ -495,6 +497,11 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { ? '
' + data.highlight.title3 + '' : ''; + let icon: string | IconSvg = data.icon; + if (typeof icon == 'string' && Object.keys(ICHERCHE_ICONS).includes(icon)) { + icon = ICHERCHE_ICONS[icon]; + } + return { source: this, data: { @@ -513,7 +520,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { id, title: data.properties.nom, titleHtml: titleHtml + subtitleHtml + subtitleHtml2, - icon: data.icon || 'map-marker', + icon: icon || 'location_on', score: data.score || computeTermSimilarity(term.trim(), data.properties.nom), nextPage: @@ -927,7 +934,7 @@ export class IChercheReverseSearchSource id, title: data.properties.nom, titleHtml: titleHtml + subtitleHtml, - icon: data.icon || 'map-marker', + icon: data.icon || 'location_on', pointerSummaryTitle: this.getSubtitle(data) + ': ' + data.properties.nom } }; diff --git a/packages/geo/src/lib/search/shared/sources/nominatim.ts b/packages/geo/src/lib/search/shared/sources/nominatim.ts index a41ee82f43..69106dd13e 100644 --- a/packages/geo/src/lib/search/shared/sources/nominatim.ts +++ b/packages/geo/src/lib/search/shared/sources/nominatim.ts @@ -211,7 +211,7 @@ export class NominatimSearchSource extends SearchSource implements TextSearch { dataType: FEATURE, id, title: data.display_name, - icon: 'map-marker', + icon: 'location_on', score: computeTermSimilarity(term.trim(), data.display_name) }, data: { diff --git a/packages/geo/src/lib/search/shared/sources/storedqueries.ts b/packages/geo/src/lib/search/shared/sources/storedqueries.ts index 7868db6dfa..e965352473 100644 --- a/packages/geo/src/lib/search/shared/sources/storedqueries.ts +++ b/packages/geo/src/lib/search/shared/sources/storedqueries.ts @@ -356,7 +356,7 @@ export class StoredQueriesSearchSource id, title: data.properties.title, titleHtml: data.properties[title], - icon: 'map-marker', + icon: 'location_on', score: data.properties.title ? computeTermSimilarity(term.trim(), data.properties.title) : computeTermSimilarity(term.trim(), data.properties[title]) @@ -574,7 +574,7 @@ export class StoredQueriesReverseSearchSource dataType: FEATURE, id, title: data.properties[title], - icon: 'map-marker' + icon: 'location_on' } }; } diff --git a/packages/geo/src/lib/search/shared/sources/workspace.ts b/packages/geo/src/lib/search/shared/sources/workspace.ts index 56d5dd5198..3359bce020 100644 --- a/packages/geo/src/lib/search/shared/sources/workspace.ts +++ b/packages/geo/src/lib/search/shared/sources/workspace.ts @@ -167,7 +167,7 @@ export class WorkspaceSearchSource extends SearchSource implements TextSearch { id, title: data.feature.meta.title, titleHtml: titleHtml + subtitleHtml2, - icon: 'map-marker', + icon: 'location_on', score: data.score, nextPage: resultsCnt % +this.options.params.limit === 0 && diff --git a/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.html b/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.html index 5fea418172..4057a9978e 100644 --- a/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.html +++ b/packages/geo/src/lib/style/style-modal/drawing/style-modal-drawing.component.html @@ -10,7 +10,7 @@

- + format_color_fill {{ 'igo.geo.style.fill' | translate }} @@ -20,8 +20,7 @@

- - + border_color {{ 'igo.geo.style.stroke' | translate }} diff --git a/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.html b/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.html index bbffa3b609..889c5b9419 100644 --- a/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.html +++ b/packages/geo/src/lib/style/style-modal/layer-button/style-modal-layer-button.component.html @@ -4,5 +4,5 @@ (click)="openStyleModalDialog()" [matTooltip]="'igo.geo.style.styleModalTooltipLayer' | translate" > - + palette diff --git a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.html b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.html index 7e9b1c190d..c9e033f315 100644 --- a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.html +++ b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.html @@ -9,7 +9,7 @@

*ngIf="linestringOnly !== true" > - + format_color_fill {{ 'igo.geo.style.fill' | translate }}
- - + border_color {{ 'igo.geo.style.stroke' | translate }} diff --git a/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts b/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts index f234695cd3..b5ec2bf998 100644 --- a/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts +++ b/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts @@ -308,7 +308,7 @@ export class EditionWorkspaceService { return [ { editMode: false, - icon: 'pencil', + icon: 'edit', color: 'primary', disabled: layer.dataSource.options.edition.modifyButton === false @@ -341,7 +341,7 @@ export class EditionWorkspaceService { }, { editMode: true, - icon: 'alpha-x', + icon: 'close', color: 'primary', disabled: this.loading, click: (feature) => { diff --git a/packages/geo/src/lib/workspace/shared/workspace.utils.ts b/packages/geo/src/lib/workspace/shared/workspace.utils.ts index 41211ff59e..c41c410be2 100644 --- a/packages/geo/src/lib/workspace/shared/workspace.utils.ts +++ b/packages/geo/src/lib/workspace/shared/workspace.utils.ts @@ -150,7 +150,7 @@ export function getGeoServiceAction( } else { return [ { - icon: 'plus', + icon: 'add', color: 'primary', click: (row, record) => { addOrRemoveLayer( diff --git a/packages/integration/src/lib/about/about-tool/about-tool.component.html b/packages/integration/src/lib/about/about-tool/about-tool.component.html index 94b197d4d9..8c347028b1 100644 --- a/packages/integration/src/lib/about/about-tool/about-tool.component.html +++ b/packages/integration/src/lib/about/about-tool/about-tool.component.html @@ -21,7 +21,7 @@ (click)="openGuide()" > {{ 'igo.integration.aboutTool.trainingGuide' | translate }} - + description diff --git a/packages/integration/src/lib/about/about-tool/about-tool.component.ts b/packages/integration/src/lib/about/about-tool/about-tool.component.ts index 021a53b9ea..724510f192 100644 --- a/packages/integration/src/lib/about/about-tool/about-tool.component.ts +++ b/packages/integration/src/lib/about/about-tool/about-tool.component.ts @@ -24,7 +24,7 @@ import { AllEnvironmentOptions } from '../../environment'; @ToolComponent({ name: 'about', title: 'igo.integration.tools.about', - icon: 'help-circle' + icon: 'help' }) @Component({ selector: 'igo-about-tool', diff --git a/packages/integration/src/lib/catalog/catalog-browser-tool/catalog-browser-tool.component.ts b/packages/integration/src/lib/catalog/catalog-browser-tool/catalog-browser-tool.component.ts index 76c37ef2b2..5821707c50 100644 --- a/packages/integration/src/lib/catalog/catalog-browser-tool/catalog-browser-tool.component.ts +++ b/packages/integration/src/lib/catalog/catalog-browser-tool/catalog-browser-tool.component.ts @@ -30,7 +30,6 @@ import { CatalogState } from '../catalog.state'; @ToolComponent({ name: 'catalogBrowser', title: 'igo.integration.tools.catalog', - icon: 'photo-browser', parent: 'catalog' }) @Component({ diff --git a/packages/integration/src/lib/catalog/catalog-library-tool/catalog-library-tool.component.ts b/packages/integration/src/lib/catalog/catalog-library-tool/catalog-library-tool.component.ts index 093ad3f762..3270b1847c 100644 --- a/packages/integration/src/lib/catalog/catalog-library-tool/catalog-library-tool.component.ts +++ b/packages/integration/src/lib/catalog/catalog-library-tool/catalog-library-tool.component.ts @@ -21,7 +21,7 @@ import { CatalogState } from '../catalog.state'; @ToolComponent({ name: 'catalog', title: 'igo.integration.tools.catalog', - icon: 'layers-plus' + icon: 'library_add' }) @Component({ selector: 'igo-catalog-library-tool', diff --git a/packages/integration/src/lib/context/context-share-tool/context-share-tool.component.ts b/packages/integration/src/lib/context/context-share-tool/context-share-tool.component.ts index a81740f818..57ec7fbc7e 100644 --- a/packages/integration/src/lib/context/context-share-tool/context-share-tool.component.ts +++ b/packages/integration/src/lib/context/context-share-tool/context-share-tool.component.ts @@ -10,7 +10,7 @@ import { MapState } from '../../map/map.state'; @ToolComponent({ name: 'shareMap', title: 'igo.integration.tools.shareMap', - icon: 'share-variant' + icon: 'share' }) @Component({ selector: 'igo-context-share-tool', diff --git a/packages/integration/src/lib/draw/drawing-tool/drawing-tool.component.ts b/packages/integration/src/lib/draw/drawing-tool/drawing-tool.component.ts index b76d00c4af..8d2e782154 100644 --- a/packages/integration/src/lib/draw/drawing-tool/drawing-tool.component.ts +++ b/packages/integration/src/lib/draw/drawing-tool/drawing-tool.component.ts @@ -19,7 +19,7 @@ import { DrawState } from '../draw.state'; @ToolComponent({ name: 'draw', title: 'igo.integration.tools.draw', - icon: 'draw' + icon: 'stylus_note' }) @Component({ selector: 'igo-drawing-tool', diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts index 6a07178367..b01534ad36 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts @@ -9,7 +9,12 @@ import { } from '@angular/core'; import { MatIconRegistry } from '@angular/material/icon'; -import { EntityStore, PanelComponent, ToolComponent } from '@igo2/common'; +import { + EntityStore, + PanelComponent, + SELECTION_MARKER_ICON, + ToolComponent +} from '@igo2/common'; import { LanguageService } from '@igo2/core/language'; import { MessageService } from '@igo2/core/message'; import { @@ -62,7 +67,7 @@ import { @ToolComponent({ name: 'spatialFilter', title: 'igo.integration.tools.spatialFilter', - icon: 'selection-marker' + icon: SELECTION_MARKER_ICON }) /** * Spatial Filter Type diff --git a/packages/integration/src/lib/geometry-form/data-issue-reporter-tool/data-issue-reporter-tool.component.ts b/packages/integration/src/lib/geometry-form/data-issue-reporter-tool/data-issue-reporter-tool.component.ts index a79c7a2d2e..2f18b6cd74 100644 --- a/packages/integration/src/lib/geometry-form/data-issue-reporter-tool/data-issue-reporter-tool.component.ts +++ b/packages/integration/src/lib/geometry-form/data-issue-reporter-tool/data-issue-reporter-tool.component.ts @@ -24,7 +24,7 @@ interface DataIssueReporterData { @ToolComponent({ name: 'dataIssueReporter', title: 'igo.integration.tools.dataIssueReporter', - icon: 'message-alert' + icon: 'feedback' }) @Component({ selector: 'igo-issue-reporter-tool', diff --git a/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts b/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts index 32822d67f4..eb48ca457f 100644 --- a/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts +++ b/packages/integration/src/lib/import-export/import-export-tool/import-export-tool.component.ts @@ -31,7 +31,7 @@ import { @ToolComponent({ name: 'importExport', title: 'igo.integration.tools.importExport', - icon: 'file-move' + icon: 'file_save' }) @Component({ selector: 'igo-import-export-tool', diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.html b/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.html index 44f4ecc03a..71089970ca 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.html +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-coordinates/advanced-coordinates.component.html @@ -72,7 +72,7 @@ class="igo-form-button-group advanced-coordinates__copy-coordinates" (click)="copyTextToClipboard()" > - + content_copy
diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts b/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts index caa1cec2ac..95bd80715c 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-map-tool.component.ts @@ -14,7 +14,7 @@ import { AdvancedSwipeComponent } from './advanced-swipe/advanced-swipe.componen @ToolComponent({ name: 'advancedMap', title: 'igo.integration.tools.advancedMap', - icon: 'toolbox' + icon: 'home_repair_service' }) /** * Tool to handle the advanced map tools diff --git a/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.html b/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.html index 8e51c62424..1ecec452e7 100644 --- a/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.html +++ b/packages/integration/src/lib/map/advanced-map-tool/advanced-swipe/advanced-swipe.component.html @@ -46,7 +46,7 @@ }}

- + search - + library_add - + star - + content_copy
{{ diff --git a/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts b/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts index e23f2e081e..7e8549196e 100644 --- a/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts +++ b/packages/integration/src/lib/map/map-proximity-tool/map-proximity-tool.component.ts @@ -26,7 +26,7 @@ import { MapState } from '../map.state'; @ToolComponent({ name: 'map-proximity', title: 'igo.integration.tools.closestFeature', - icon: 'radius' + icon: 'output_circle' }) /** * Tool to handle the advanced map tools diff --git a/packages/integration/src/lib/measure/measurer-tool/measurer-tool.component.ts b/packages/integration/src/lib/measure/measurer-tool/measurer-tool.component.ts index 1c2ce1d854..a54dc2364b 100644 --- a/packages/integration/src/lib/measure/measurer-tool/measurer-tool.component.ts +++ b/packages/integration/src/lib/measure/measurer-tool/measurer-tool.component.ts @@ -17,7 +17,7 @@ import { MeasureState } from '../measure.state'; @ToolComponent({ name: 'measurer', title: 'igo.integration.tools.measurer', - icon: 'ruler' + icon: 'square_foot' }) @Component({ selector: 'igo-measurer-tool', diff --git a/packages/integration/src/lib/print/print-tool/print-tool.component.ts b/packages/integration/src/lib/print/print-tool/print-tool.component.ts index 1995ec6c51..9e0455cb58 100644 --- a/packages/integration/src/lib/print/print-tool/print-tool.component.ts +++ b/packages/integration/src/lib/print/print-tool/print-tool.component.ts @@ -8,7 +8,7 @@ import { MapState } from '../../map/map.state'; @ToolComponent({ name: 'print', title: 'igo.integration.tools.print', - icon: 'printer' + icon: 'print' }) @Component({ selector: 'igo-print-tool', diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html index ea40723b08..b563f7e28d 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html @@ -74,11 +74,11 @@

class="igo-icon-button" (click)="toggleTopPanel()" > - + {{ + (topPanelState$ | async) === 'collapsed' + ? 'arrow_upward' + : 'arrow_downward' + }} { @@ -103,7 +103,7 @@ export function getWorkspaceActions( }, { id: 'featureDownload', - icon: 'file-export', + icon: 'file_save', title: 'igo.integration.workspace.download.title', tooltip: 'igo.integration.workspace.download.tooltip', handler: (ws: FeatureWorkspace | WfsWorkspace | EditionWorkspace) => { @@ -129,7 +129,7 @@ export function getWorkspaceActions( }, { id: 'ogcFilter', - icon: 'filter', + icon: 'filter_alt', title: 'igo.integration.workspace.ogcFilter.title', tooltip: 'igo.integration.workspace.ogcFilter.tooltip', handler: ( @@ -179,7 +179,7 @@ export function getWorkspaceActions( }, { id: 'print', - icon: 'printer', + icon: 'print', title: 'igo.integration.workspace.print.title', tooltip: 'igo.integration.workspace.print.tooltip', handler: (ws: FeatureWorkspace | WfsWorkspace | EditionWorkspace) => { diff --git a/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.html b/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.html index af35f7b9cd..bb6432d0a1 100644 --- a/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.html +++ b/packages/integration/src/lib/workspace/workspace-button/workspace-button.component.html @@ -7,5 +7,5 @@ [color]="color" (click)="activateWorkspace()" > - + table diff --git a/packages/integration/src/locale/en.integration.json b/packages/integration/src/locale/en.integration.json index 153e4ed39b..27db49428e 100644 --- a/packages/integration/src/locale/en.integration.json +++ b/packages/integration/src/locale/en.integration.json @@ -47,7 +47,7 @@ }, "aboutTool": { "headerHtml": "", - "html": "
Features overview
Search Bar
Located in the upper-left portion of the interface, the Search Bar allows the user to locate an area of interest using an address, location or GPS coordinates. It can also be used to search for a layer.

It is also possible to search for a specific element using the hashtag \"#\" (for example, #municipalites québec). Accents and capital letters don't have any impact on Search Results when using a hashtag.

Contexts
Contexts are used to visualize groupings of layers related to a specific theme. When a context is selected, all the layers associated with it will be added to the Map. It is then possible to add other layers to the map by using the Catalog or the Search Bar.

WARNING : If a new context is selected, all the layers displayed on the Map will be replaced by the ones associated with the newly selected context.

Map
It is possible to personalize the Map by using the Catalog or the Search Bar. This space allows the user to add, delete, interrogate, filter and sort the displayed layers. It is also possible to visualize the legends associated with the layers.

Spatial Filter
The Spatial Filter can be used to search for adresses or themes by specifying a predefined zone (for example, electoral districts) or by drawing an area on the map. The results can then be exported by using the Import & Export tool.

Measure
This tool gives the option to either Measure distances or areas on the map.

Draw
The Draw tool can be used to draw points, lines, polygons or circles with labels. The color of the fill and the stroke can be set with the given selectors.

A Drawings layer can be exported by using the Import & Export tool.

Directions
It is possible to build a route and get Directions between two points by placing them on the map or by searching for addresses. It is also possible to add stops and copy the description or the link of the route to the clipboard.

Catalog
The Catalog contains all the layers that can be added to the Map. Click on the + of desired layer to add it.

Import & Export
It is possible to Import vector data by specifying a coordinate system or a projection.

It is possible to Export one or many layers in multiple formats.

It is also possible to Import or Export a context locally. This feature is useful to save contexts when the user is not authenticated.

Print
This tool is used to Print the map displayed on-screen. Multiple options can be specified like a title, a comment, the output format, the paper size and the orientation.

Share
The Share tool is used to create an URL that redirects to an exact representation of the map. This link can be shared or distributed in a document and allows the user to \"save\" the map for later use.

IGOIGO2 is a open source geospatial solution developed by collaborators and specialists from several departments and agencies of the Government of Quebec.

Version: {{version}}

", + "html": "
Features overview
Search Bar
Located in the upper-left portion of the interface, the Search Bar allows the user to locate an area of interest using an address, location or GPS coordinates. It can also be used to search for a layer.

It is also possible to search for a specific element using the hashtag \"#\" (for example, #municipalites québec). Accents and capital letters don't have any impact on Search Results when using a hashtag.

Context
Contexts are used to visualize groupings of layers related to a specific theme. When a context is selected, all the layers associated with it will be added to the Map. It is then possible to add other layers to the map by using the Catalog or the Search Bar.

WARNING : If a new context is selected, all the layers displayed on the Map will be replaced by the ones associated with the newly selected context.

Map
It is possible to personalize the Map by using the Catalog or the Search Bar. This space allows the user to add, delete, interrogate, filter and sort the displayed layers. It is also possible to visualize the legends associated with the layers.

Spatial Filter
The Spatial Filter can be used to search for adresses or themes by specifying a predefined zone (for example, electoral districts) or by drawing an area on the map. The results can then be exported by using the Import & Export tool.

Measure
This tool gives the option to either Measure distances or areas on the map.

Draw
The Draw tool can be used to draw points, lines, polygons or circles with labels. The color of the fill and the stroke can be set with the given selectors.

A Drawings layer can be exported by using the Import & Export tool.

Directions
It is possible to build a route and get Directions between two points by placing them on the map or by searching for addresses. It is also possible to add stops and copy the description or the link of the route to the clipboard.

Catalog
The Catalog contains all the layers that can be added to the Map. Click on the + of desired layer to add it.

Import & Export
It is possible to Import vector data by specifying a coordinate system or a projection.

It is possible to Export one or many layers in multiple formats.

It is also possible to Import or Export a context locally. This feature is useful to save contexts when the user is not authenticated.

Print
This tool is used to Print the map displayed on-screen. Multiple options can be specified like a title, a comment, the output format, the paper size and the orientation.

Share
The Share tool is used to create an URL that redirects to an exact representation of the map. This link can be shared or distributed in a document and allows the user to \"save\" the map for later use.

IGOIGO2 is a open source geospatial solution developed by collaborators and specialists from several departments and agencies of the Government of Quebec.

Version: {{version}}

", "trainingGuide": "Training guide", "trainingGuideTooltip": "Click here to access IGO2's self-training guide" }, diff --git a/packages/integration/src/locale/fr.integration.json b/packages/integration/src/locale/fr.integration.json index 359a8f9f61..c869c11bde 100644 --- a/packages/integration/src/locale/fr.integration.json +++ b/packages/integration/src/locale/fr.integration.json @@ -47,7 +47,7 @@ }, "aboutTool": { "headerHtml": "", - "html": "
Aperçu des fonctionnalités
Recherche
Située dans la portion supérieure gauche de l’interface, la barre de Recherche permet de se positionner à l’aide d’une adresse, d’un lieu ou de coordonnées GPS et peut également servir à rechercher une couche.

Il est également possible de rechercher un élément par type de résultats en utilisant le hashtag « # » (par exemple, #municipalites québec). Les accents et les lettres majuscules n'importent pas lors de l'utilisation du hashtag et n'ont pas d'impact sur les Résultats de recherche.

Contextes
Les Contextes permettent de visualiser des regroupements de couches faits par thème ou par contexte de travail. Lorsqu'un contexte est sélectionné, toutes les couches qu'il contient se retrouvent alors dans la Carte. Il est possible d'ajouter d’autres couches à partir du Catalogue ou de l’outil Recherche.

ATTENTION : Si un nouveau contexte est sélectionné, toutes les couches affichées dans la Carte seront remplacées par celles de ce nouveau contexte.

Carte
Il est possible de personnaliser la Carte à partir du Catalogue ou de l’outil Recherche. Cet espace permet entre autres d’ajouter, de supprimer, d’interroger, de filtrer et de trier les couches présentées. Il est également possible d'afficher les légendes des couches.

Filtre spatial
Le Filtre spatial permet de rechercher des adresses ou des thématiques selon des zones prédéfinies (par exemple, par arrondissement ou par MRC) ou selon un dessin réalisé par l'utilisateur. Les résultats du filtre peuvent être exportés à l'aide de l'outil Importer et exporter.

Mesurer
Cet outil permet de Mesurer des distances ou des superficies directement sur la carte.

Dessin
L'outil Dessin permet de dessiner des entités ponctuelles, linéaires, polygonales ou circulaires accompagnées ou non d'étiquettes. La couleur de remplissage et du contour des entités peuvent être choisies à l'aide des sélecteurs correspondants.

Une couche Dessins peut être exportée à l'aide de l'outil Importer et exporter.

Itinéraire
Il est possible de construire un Itinéraire entre deux points en sélectionnant un point de départ et un point d'arrivée dans la carte ou en recherchant des adresses. Il est ensuite possible d'ajouter des points d'arrêt intermédiaires et de copier la description ou le lien de l'itinéraire dans le presse-papier.

Catalogue
Le Catalogue contient toutes les couches qui peuvent être ajoutées à la Carte. L'utilisateur doit cliquer sur + de la couche désirée afin de l’ajouter à la Carte.

Importer et exporter
Il est possible d'Importer un fichier vectoriel tout en spécifiant un système de coordonnées ou une projection.

Il est possible d'Exporter une ou plusieurs couches dans plusieurs formats courants.

Il est également possible d'Importer ou d'Exporter un contexte localement. Cette dernière fonctionnalité permet ainsi de sauvegarder des contextes en mode non-authentifié ou anonyme.

Imprimer
Cet outil permet d'Imprimer la carte affichée à l’écran en spécifiant plusieurs options telles qu'un titre, un commentaire, le format de sortie, le format du papier et l'orientation de l'impression.

Partager
L'outil Partager permet de créer une adresse URL qui redirige vers une représentation exacte de la Carte affichée à l’écran. Ce lien peut, par exemple, être partagé ou diffusé dans un document, permettant ainsi de « sauvegarder » la carte pour une utilisation ultérieure.

IGOIGO2 est une solution Web libre géomatique développée en mode collaboratif par des spécialistes provenant de plusieurs ministères et organismes du gouvernement du Québec.

Version: {{version}}

", + "html": "
Aperçu des fonctionnalités
Recherche
Située dans la portion supérieure gauche de l’interface, la barre de Recherche permet de se positionner à l’aide d’une adresse, d’un lieu ou de coordonnées GPS et peut également servir à rechercher une couche.

Il est également possible de rechercher un élément par type de résultats en utilisant le hashtag « # » (par exemple, #municipalites québec). Les accents et les lettres majuscules n'importent pas lors de l'utilisation du hashtag et n'ont pas d'impact sur les Résultats de recherche.

Contextes
Les Contextes permettent de visualiser des regroupements de couches faits par thème ou par contexte de travail. Lorsqu'un contexte est sélectionné, toutes les couches qu'il contient se retrouvent alors dans la Carte. Il est possible d'ajouter d’autres couches à partir du Catalogue ou de l’outil Recherche.

ATTENTION : Si un nouveau contexte est sélectionné, toutes les couches affichées dans la Carte seront remplacées par celles de ce nouveau contexte.

Carte
Il est possible de personnaliser la Carte à partir du Catalogue ou de l’outil Recherche. Cet espace permet entre autres d’ajouter, de supprimer, d’interroger, de filtrer et de trier les couches présentées. Il est également possible d'afficher les légendes des couches.

Filtre spatial
Le Filtre spatial permet de rechercher des adresses ou des thématiques selon des zones prédéfinies (par exemple, par arrondissement ou par MRC) ou selon un dessin réalisé par l'utilisateur. Les résultats du filtre peuvent être exportés à l'aide de l'outil Importer et exporter.

Mesurer
Cet outil permet de Mesurer des distances ou des superficies directement sur la carte.

Dessin
L'outil Dessin permet de dessiner des entités ponctuelles, linéaires, polygonales ou circulaires accompagnées ou non d'étiquettes. La couleur de remplissage et du contour des entités peuvent être choisies à l'aide des sélecteurs correspondants.

Une couche Dessins peut être exportée à l'aide de l'outil Importer et exporter.

Itinéraire
Il est possible de construire un Itinéraire entre deux points en sélectionnant un point de départ et un point d'arrivée dans la carte ou en recherchant des adresses. Il est ensuite possible d'ajouter des points d'arrêt intermédiaires et de copier la description ou le lien de l'itinéraire dans le presse-papier.

Catalogue
Le Catalogue contient toutes les couches qui peuvent être ajoutées à la Carte. L'utilisateur doit cliquer sur + de la couche désirée afin de l’ajouter à la Carte.

Importer et exporter
Il est possible d'Importer un fichier vectoriel tout en spécifiant un système de coordonnées ou une projection.

Il est possible d'Exporter une ou plusieurs couches dans plusieurs formats courants.

Il est également possible d'Importer ou d'Exporter un contexte localement. Cette dernière fonctionnalité permet ainsi de sauvegarder des contextes en mode non-authentifié ou anonyme.

Imprimer
Cet outil permet d'Imprimer la carte affichée à l’écran en spécifiant plusieurs options telles qu'un titre, un commentaire, le format de sortie, le format du papier et l'orientation de l'impression.

Partager
L'outil Partager permet de créer une adresse URL qui redirige vers une représentation exacte de la Carte affichée à l’écran. Ce lien peut, par exemple, être partagé ou diffusé dans un document, permettant ainsi de « sauvegarder » la carte pour une utilisation ultérieure.

IGOIGO2 est une solution Web libre géomatique développée en mode collaboratif par des spécialistes provenant de plusieurs ministères et organismes du gouvernement du Québec.

Version: {{version}}

", "trainingGuide": "Guide de formation", "trainingGuideTooltip": "Cliquez ici pour accéder au guide d'autoformation de IGO2" }, diff --git a/projects/demo/src/app/app.component.html b/projects/demo/src/app/app.component.html index a2fe073692..ae2c32407a 100644 --- a/projects/demo/src/app/app.component.html +++ b/projects/demo/src/app/app.component.html @@ -1,7 +1,7 @@

{{ title }}

{{ version.lib }}
diff --git a/projects/demo/src/app/common/action/action.component.ts b/projects/demo/src/app/common/action/action.component.ts index b567038c7c..3a48a8053c 100644 --- a/projects/demo/src/app/common/action/action.component.ts +++ b/projects/demo/src/app/common/action/action.component.ts @@ -40,7 +40,7 @@ export class AppActionComponent implements OnInit, OnDestroy { { id: 'add', title: 'Add', - icon: 'plus', + icon: 'add', tooltip: 'Add Tooltip', handler: () => { alert('Add!'); @@ -50,7 +50,7 @@ export class AppActionComponent implements OnInit, OnDestroy { { id: 'edit', title: 'Edit', - icon: 'pencil', + icon: 'edit', tooltip: 'Edit Tooltip', args: ['1'], handler: (item: string) => { diff --git a/projects/demo/src/app/common/common.routing.ts b/projects/demo/src/app/common/common.routing.ts index f7635e29b0..7cb2b1f0dd 100644 --- a/projects/demo/src/app/common/common.routing.ts +++ b/projects/demo/src/app/common/common.routing.ts @@ -6,6 +6,7 @@ import { AppDynamicComponentComponent } from './dynamic-component/dynamic-compon import { AppEntitySelectorComponent } from './entity-selector/entity-selector.component'; import { AppEntityTableComponent } from './entity-table/entity-table.component'; import { AppFormComponent } from './form/form.component'; +import { AppIconComponent } from './icon/icon.component'; import { AppTableComponent } from './table/table.component'; import { AppToolComponent } from './tool/tool.component'; import { AppWidgetComponent } from './widget/widget.component'; @@ -38,10 +39,15 @@ export const routes: Routes = [ component: AppEntitySelectorComponent }, { - title: 'form', - path: 'Form', + title: 'Form', + path: 'form', component: AppFormComponent }, + { + title: 'Icon', + path: 'icon', + component: AppIconComponent + }, { title: 'Table', path: 'table', diff --git a/projects/demo/src/app/common/entity-table/entity-table.component.ts b/projects/demo/src/app/common/entity-table/entity-table.component.ts index bb857e2826..709744c06f 100644 --- a/projects/demo/src/app/common/entity-table/entity-table.component.ts +++ b/projects/demo/src/app/common/entity-table/entity-table.component.ts @@ -44,8 +44,8 @@ export class AppEntityTableComponent implements OnInit, OnDestroy { title: 'Selected', valueAccessor: (entity: object) => { return this.store.state.get(entity).selected - ? 'radiobox-marked' - : 'radiobox-blank'; + ? 'radio_button_checked' + : 'radio_button_unchecked'; }, renderer: EntityTableColumnRenderer.Icon }, diff --git a/projects/demo/src/app/common/icon/icon.component.html b/projects/demo/src/app/common/icon/icon.component.html new file mode 100644 index 0000000000..c37c7b2da1 --- /dev/null +++ b/projects/demo/src/app/common/icon/icon.component.html @@ -0,0 +1,51 @@ + +
+

+ The icon is a core concept for many packages of the IGO2 + library. The icon system is base on + Google Font - Material Symbol + who use font ligature to configure the icon +

+
+ +
+

Getting started

+
    +
  1. + In your + index.html + file, add the variable font stylesheet request to your head tag and +
    {{exampleIndexHtml}}
    +
  2. +
  3. + Then add the current class with variable axes configuration to icons in + your style.scss file. +
    {{exampleStyleVariable}}
    +
  4. +
  5. + Finally, add the icon provider configuration in your main file + main.ts +
    {{exampleProvider}}
    +
  6. +
+
+ + +

+ Enter a name from the + Google Font - Material Symbol +

+
+ + Icon Name + + + + +
+
+
diff --git a/projects/demo/src/app/common/icon/icon.component.scss b/projects/demo/src/app/common/icon/icon.component.scss new file mode 100644 index 0000000000..acfae0abde --- /dev/null +++ b/projects/demo/src/app/common/icon/icon.component.scss @@ -0,0 +1,4 @@ +.field-container { + display: flex; + align-items: center; +} diff --git a/projects/demo/src/app/common/icon/icon.component.spec.ts b/projects/demo/src/app/common/icon/icon.component.spec.ts new file mode 100644 index 0000000000..061015a1cc --- /dev/null +++ b/projects/demo/src/app/common/icon/icon.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; + +import { AppIconComponent } from './icon.component'; + +describe('AppIconComponent', () => { + let component: AppIconComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [AppIconComponent, NoopAnimationsModule] + }).compileComponents(); + + fixture = TestBed.createComponent(AppIconComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/demo/src/app/common/icon/icon.component.ts b/projects/demo/src/app/common/icon/icon.component.ts new file mode 100644 index 0000000000..5d67bef16a --- /dev/null +++ b/projects/demo/src/app/common/icon/icon.component.ts @@ -0,0 +1,50 @@ +import { Component } from '@angular/core'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; + +import { IgoIconComponent } from '@igo2/common'; + +import { DocViewerComponent } from '../../components/doc-viewer/doc-viewer.component'; +import { ExampleViewerComponent } from '../../components/example/example-viewer/example-viewer.component'; + +@Component({ + selector: 'app-icon', + standalone: true, + imports: [ + DocViewerComponent, + ExampleViewerComponent, + IgoIconComponent, + MatFormFieldModule, + ReactiveFormsModule, + MatInputModule + ], + templateUrl: './icon.component.html', + styleUrl: './icon.component.scss' +}) +export class AppIconComponent { + exampleIndexHtml: string = EXAMPLE_INDEX_HTML; + exampleStyleVariable: string = EXAMPLE_STYLE_VARIABLE; + exampleProvider: string = EXAMPLE_PROVIDER; + + nameControl = new FormControl('shopping_cart_checkout'); +} + +const EXAMPLE_INDEX_HTML = ``; + +const EXAMPLE_STYLE_VARIABLE = `.material-symbols-outlined { + font-variation-settings: + 'FILL' 0, + 'wght' 400, + 'GRAD' 0, + 'opsz' 24 +}`; + +const EXAMPLE_PROVIDER = `import { provideIcon } from '@igo2/common'; + +bootstrapApplication(AppComponent, { + providers: [ + provideIcon(), + ] +}) +`; diff --git a/projects/demo/src/app/common/table/table.component.ts b/projects/demo/src/app/common/table/table.component.ts index c9a1f2608d..1a9d7fda82 100644 --- a/projects/demo/src/app/common/table/table.component.ts +++ b/projects/demo/src/app/common/table/table.component.ts @@ -43,7 +43,7 @@ export class AppTableComponent implements OnInit { ], actions: [ { - icon: 'file-document', + icon: 'description', color: TableActionColor.primary, click: (row) => this.showName(row.name) } diff --git a/projects/demo/src/app/common/tool/tool.component.html b/projects/demo/src/app/common/tool/tool.component.html index f150879c61..639ee92dfd 100644 --- a/projects/demo/src/app/common/tool/tool.component.html +++ b/projects/demo/src/app/common/tool/tool.component.html @@ -7,7 +7,7 @@ (click)="toolbox.activatePreviousTool()" *ngIf="activeTool$ | async" > - + arrow_back - + code-tags - + settings
diff --git a/projects/demo/src/index.html b/projects/demo/src/index.html index 1d3f410c63..05a1b0cee1 100644 --- a/projects/demo/src/index.html +++ b/projects/demo/src/index.html @@ -13,6 +13,10 @@ href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap" rel="stylesheet" /> + diff --git a/projects/demo/src/main.ts b/projects/demo/src/main.ts index 50609b1b1e..e4f2baa030 100644 --- a/projects/demo/src/main.ts +++ b/projects/demo/src/main.ts @@ -23,6 +23,7 @@ import { } from '@angular/router'; import { provideAuthentification } from '@igo2/auth'; +import { provideIcon } from '@igo2/common'; import { IgoCoreModule } from '@igo2/core'; import { provideConfigOptions } from '@igo2/core/config'; import { provideRootTranslation } from '@igo2/core/language'; @@ -74,6 +75,7 @@ bootstrapApplication(AppComponent, { provideOsrmDirectionsSource(), provideIChercheSearchSource(), provideWorkspaceSearchSource(), + provideIcon(), { provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } diff --git a/projects/demo/src/styles.scss b/projects/demo/src/styles.scss index a93ad03ded..53d1a133b8 100644 --- a/projects/demo/src/styles.scss +++ b/projects/demo/src/styles.scss @@ -15,6 +15,14 @@ body { font-family: Roboto, 'Helvetica Neue', sans-serif; } +.material-symbols-outlined { + font-variation-settings: + 'FILL' 0, + 'wght' 400, + 'GRAD' 0, + 'opsz' 24; +} + mat-card { .mat-mdc-card-content > :last-child:is(hr) { margin-bottom: 0.5em !important;