@igo2/context 1.13.4 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/context-manager/context-list/context-list.component.mjs +2 -2
- package/esm2020/lib/context-manager/shared/context.service.mjs +3 -2
- package/esm2020/lib/context-manager/shared/map-context.directive.mjs +2 -2
- package/esm2020/lib/share-map/shared/share-map.service.mjs +16 -7
- package/fesm2015/igo2-context.mjs +20 -10
- package/fesm2015/igo2-context.mjs.map +1 -1
- package/fesm2020/igo2-context.mjs +20 -10
- package/fesm2020/igo2-context.mjs.map +1 -1
- package/lib/share-map/shared/share-map.service.d.ts +4 -4
- package/package.json +6 -6
|
@@ -744,7 +744,8 @@ class ContextService {
|
|
|
744
744
|
layerOptions: {
|
|
745
745
|
title: layer.options.title,
|
|
746
746
|
zIndex: ++i,
|
|
747
|
-
visible: layer.visible
|
|
747
|
+
visible: layer.visible,
|
|
748
|
+
security: layer.security
|
|
748
749
|
},
|
|
749
750
|
sourceOptions: {
|
|
750
751
|
type: layer.dataSource.options.type,
|
|
@@ -1349,7 +1350,7 @@ class MapContextDirective {
|
|
|
1349
1350
|
// this.component.map.init();
|
|
1350
1351
|
// this.component.map.ol.setTarget(target);
|
|
1351
1352
|
const viewContext = context.map.view;
|
|
1352
|
-
if (!this.component.view || viewContext.keepCurrentView !== true) {
|
|
1353
|
+
if (!this.component.view || viewContext.keepCurrentView !== true || context.map.view.projection !== this.map.projection) {
|
|
1353
1354
|
this.component.view = viewContext;
|
|
1354
1355
|
}
|
|
1355
1356
|
if (this.component.map.geolocationController) {
|
|
@@ -2422,11 +2423,11 @@ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2422
2423
|
i0.ɵɵadvance(2);
|
|
2423
2424
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(15, 12, i0.ɵɵpipeBind1(16, 14, ctx.contexts$)));
|
|
2424
2425
|
}
|
|
2425
|
-
}, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i1$1.DefaultValueAccessor, i1$1.NgControlStatus, i1$1.NgModel, i6.MatFormField, i6.MatSuffix, i5.MatInput, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i11$1.MatCheckbox, i12$1.MatMenu, i12$1.MatMenuItem, i12$1.MatMenuTrigger, i13.ListItemDirective, i13.ListComponent, i13.CollapsibleComponent, i13.ActionbarComponent, ContextItemComponent, i4.AsyncPipe, i13.KeyValuePipe, i9$1.TranslatePipe], styles: [".context-filter-max-width[_ngcontent-%COMP%]{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width[_ngcontent-%COMP%]{width:calc(100% - 135px);margin:5px;padding-left:6px}
|
|
2426
|
+
}, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i1$1.DefaultValueAccessor, i1$1.NgControlStatus, i1$1.NgModel, i6.MatFormField, i6.MatSuffix, i5.MatInput, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i11$1.MatCheckbox, i12$1.MatMenu, i12$1.MatMenuItem, i12$1.MatMenuTrigger, i13.ListItemDirective, i13.ListComponent, i13.CollapsibleComponent, i13.ActionbarComponent, ContextItemComponent, i4.AsyncPipe, i13.KeyValuePipe, i9$1.TranslatePipe], styles: [".context-filter-max-width[_ngcontent-%COMP%]{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width[_ngcontent-%COMP%]{width:calc(100% - 135px);margin:5px;padding-left:6px}mat-form-field[_ngcontent-%COMP%]{height:40px}.profilsMenu[_ngcontent-%COMP%]{display:flex}.profilsMenu[_ngcontent-%COMP%] > mat-checkbox[_ngcontent-%COMP%]{width:8px}.add-context-button[_ngcontent-%COMP%]{margin:0;width:40px;display:inline-flex;overflow:hidden}"], changeDetection: 0 });
|
|
2426
2427
|
(function () {
|
|
2427
2428
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextListComponent, [{
|
|
2428
2429
|
type: Component,
|
|
2429
|
-
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\n <mat-form-field *ngIf=\"showFilter()\" [ngClass]=\"auth.authenticated && configService.getConfig('context') ? 'context-filter-min-width' : 'context-filter-max-width'\">\n <input\n matInput\n type=\"text\"\n [placeholder]=\"'igo.context.contextManager.filterPlaceHolder' | translate\"\n [(ngModel)]=\"term\">\n <button\n mat-button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n *ngIf=\"term.length\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\">\n <mat-icon svgIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n\n <button\n *ngIf=\"!sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortAlphabetically' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(true)\">\n <mat-icon color=\"primary\" svgIcon=\"sort-alphabetical-variant\"></mat-icon>\n </button>\n <button\n *ngIf=\"sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(false)\">\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\n </button>\n\n <igo-actionbar *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"plus\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\">\n </igo-actionbar>\n\n <button *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\n </button>\n\n <mat-menu #accountMenu=\"matMenu\">\n <ng-container *ngFor=\"let user of users\">\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(user)\">\n </mat-checkbox>\n <button *ngIf=\"user.childs\"\n [matMenuTriggerFor]=\"subAccountMenu\"\n mat-menu-item>\n {{user.title}}\n </button>\n <button\n mat-menu-item\n *ngIf=\"!user.childs\">\n {{user.title}}\n </button>\n </span>\n\n <mat-menu #subAccountMenu=\"matMenu\">\n <mat-checkbox *ngFor=\"let child of user.childs\"\n class=\"mat-menu-item\"\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(child, user)\">\n {{child.title}}\n </mat-checkbox>\n </mat-menu>\n </ng-container>\n\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showHiddenContexts.emit()\">\n </mat-checkbox>\n <button mat-menu-item>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </button>\n </span>\n </mat-menu>\n\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\n\n <igo-collapsible *ngIf=\"groupContexts.value.length && auth.authenticated\" [title]=\"titleMapping[groupContexts.key] | translate\"\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\" (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\">\n\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"context.id && this.defaultContextId && this.defaultContextId === context.id\"\n (edit)=\"edit.emit(context)\"\n (delete)=\"delete.emit(context)\"\n (clone)=\"clone.emit(context)\"\n (save)=\"save.emit(context)\"\n (hide)=\"hideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"favorite.emit(context)\"\n (manageTools)=\"manageTools.emit(context)\"\n (managePermissions)=\"managePermissions.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </igo-collapsible>\n\n <ng-template *ngIf=\"groupContexts.value.length && !auth.authenticated\" ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"configService.getConfig('favoriteContext4NonAuthenticated')\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"configService.getConfig('context') ? defaultContextId === context.id : defaultContextId === context.uri\"\n (favorite)=\"favorite.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </ng-template>\n</igo-list>\n", styles: [".context-filter-max-width{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}
|
|
2430
|
+
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\n <mat-form-field *ngIf=\"showFilter()\" [ngClass]=\"auth.authenticated && configService.getConfig('context') ? 'context-filter-min-width' : 'context-filter-max-width'\">\n <input\n matInput\n type=\"text\"\n [placeholder]=\"'igo.context.contextManager.filterPlaceHolder' | translate\"\n [(ngModel)]=\"term\">\n <button\n mat-button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n *ngIf=\"term.length\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\">\n <mat-icon svgIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n\n <button\n *ngIf=\"!sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortAlphabetically' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(true)\">\n <mat-icon color=\"primary\" svgIcon=\"sort-alphabetical-variant\"></mat-icon>\n </button>\n <button\n *ngIf=\"sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(false)\">\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\n </button>\n\n <igo-actionbar *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"plus\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\">\n </igo-actionbar>\n\n <button *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\n </button>\n\n <mat-menu #accountMenu=\"matMenu\">\n <ng-container *ngFor=\"let user of users\">\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(user)\">\n </mat-checkbox>\n <button *ngIf=\"user.childs\"\n [matMenuTriggerFor]=\"subAccountMenu\"\n mat-menu-item>\n {{user.title}}\n </button>\n <button\n mat-menu-item\n *ngIf=\"!user.childs\">\n {{user.title}}\n </button>\n </span>\n\n <mat-menu #subAccountMenu=\"matMenu\">\n <mat-checkbox *ngFor=\"let child of user.childs\"\n class=\"mat-menu-item\"\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(child, user)\">\n {{child.title}}\n </mat-checkbox>\n </mat-menu>\n </ng-container>\n\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showHiddenContexts.emit()\">\n </mat-checkbox>\n <button mat-menu-item>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </button>\n </span>\n </mat-menu>\n\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\n\n <igo-collapsible *ngIf=\"groupContexts.value.length && auth.authenticated\" [title]=\"titleMapping[groupContexts.key] | translate\"\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\" (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\">\n\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"context.id && this.defaultContextId && this.defaultContextId === context.id\"\n (edit)=\"edit.emit(context)\"\n (delete)=\"delete.emit(context)\"\n (clone)=\"clone.emit(context)\"\n (save)=\"save.emit(context)\"\n (hide)=\"hideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"favorite.emit(context)\"\n (manageTools)=\"manageTools.emit(context)\"\n (managePermissions)=\"managePermissions.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </igo-collapsible>\n\n <ng-template *ngIf=\"groupContexts.value.length && !auth.authenticated\" ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"configService.getConfig('favoriteContext4NonAuthenticated')\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"configService.getConfig('context') ? defaultContextId === context.id : defaultContextId === context.uri\"\n (favorite)=\"favorite.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </ng-template>\n</igo-list>\n", styles: [".context-filter-max-width{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}mat-form-field{height:40px}.profilsMenu{display:flex}.profilsMenu>mat-checkbox{width:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}\n"] }]
|
|
2430
2431
|
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.ConfigService }, { type: i2.AuthService }, { type: i1$3.MatDialog }, { type: i3.LanguageService }, { type: i3.StorageService }]; }, { contexts: [{
|
|
2431
2432
|
type: Input
|
|
2432
2433
|
}], selectedContext: [{
|
|
@@ -4113,13 +4114,20 @@ IgoContextManagerModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [
|
|
|
4113
4114
|
})();
|
|
4114
4115
|
|
|
4115
4116
|
class ShareMapService {
|
|
4116
|
-
constructor(contextService,
|
|
4117
|
+
constructor(contextService, route) {
|
|
4117
4118
|
this.contextService = contextService;
|
|
4118
|
-
this.messageService = messageService;
|
|
4119
4119
|
this.route = route;
|
|
4120
|
+
this.language = '';
|
|
4121
|
+
this.route.queryParams.subscribe((params) => {
|
|
4122
|
+
if (params['lang']) {
|
|
4123
|
+
this.language = params['lang'];
|
|
4124
|
+
}
|
|
4125
|
+
});
|
|
4120
4126
|
}
|
|
4121
4127
|
getUrlWithApi(formValues) {
|
|
4122
|
-
return
|
|
4128
|
+
return this.language ?
|
|
4129
|
+
`${location.origin + location.pathname}?context=${formValues.uri}&lang=${this.language}` :
|
|
4130
|
+
`${location.origin + location.pathname}?context=${formValues.uri}`;
|
|
4123
4131
|
}
|
|
4124
4132
|
createContextShared(map, formValues) {
|
|
4125
4133
|
const context = this.contextService.getContextFromMap(map);
|
|
@@ -4194,7 +4202,9 @@ class ShareMapService {
|
|
|
4194
4202
|
if (this.contextService.context$.value) {
|
|
4195
4203
|
context = `${contextKey}=${this.contextService.context$.value.uri}`;
|
|
4196
4204
|
}
|
|
4197
|
-
let url =
|
|
4205
|
+
let url = this.language ?
|
|
4206
|
+
`${location.origin}${location.pathname}?${context}&${zoom}&${center}&${layersUrl}&${llc}&${addedLayersQueryParamsWms}&${llc}&${addedLayersQueryParamsWmts}&${addedLayersQueryParamsArcgisRest}&${addedLayersQueryParamsImageArcgisRest}&${addedLayersQueryParamsTileArcgisRest}&lang=${this.language}` :
|
|
4207
|
+
`${location.origin}${location.pathname}?${context}&${zoom}&${center}&${layersUrl}&${llc}&${addedLayersQueryParamsWms}&${llc}&${addedLayersQueryParamsWmts}&${addedLayersQueryParamsArcgisRest}&${addedLayersQueryParamsImageArcgisRest}&${addedLayersQueryParamsTileArcgisRest}`;
|
|
4198
4208
|
for (let i = 0; i < 5; i++) {
|
|
4199
4209
|
url = url.replace(/&&/g, '&');
|
|
4200
4210
|
url = url.endsWith('&') ? url.slice(0, -1) : url;
|
|
@@ -4298,7 +4308,7 @@ class ShareMapService {
|
|
|
4298
4308
|
return addedLayersQueryParams;
|
|
4299
4309
|
}
|
|
4300
4310
|
}
|
|
4301
|
-
ShareMapService.ɵfac = function ShareMapService_Factory(t) { return new (t || ShareMapService)(i0.ɵɵinject(ContextService), i0.ɵɵinject(i3.
|
|
4311
|
+
ShareMapService.ɵfac = function ShareMapService_Factory(t) { return new (t || ShareMapService)(i0.ɵɵinject(ContextService), i0.ɵɵinject(i3.RouteService, 8)); };
|
|
4302
4312
|
ShareMapService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ShareMapService, factory: ShareMapService.ɵfac, providedIn: 'root' });
|
|
4303
4313
|
(function () {
|
|
4304
4314
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapService, [{
|
|
@@ -4307,7 +4317,7 @@ ShareMapService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ShareMap
|
|
|
4307
4317
|
providedIn: 'root'
|
|
4308
4318
|
}]
|
|
4309
4319
|
}], function () {
|
|
4310
|
-
return [{ type: ContextService }, { type: i3.
|
|
4320
|
+
return [{ type: ContextService }, { type: i3.RouteService, decorators: [{
|
|
4311
4321
|
type: Optional
|
|
4312
4322
|
}] }];
|
|
4313
4323
|
}, null);
|