@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
|
@@ -740,7 +740,8 @@ class ContextService {
|
|
|
740
740
|
layerOptions: {
|
|
741
741
|
title: layer.options.title,
|
|
742
742
|
zIndex: ++i,
|
|
743
|
-
visible: layer.visible
|
|
743
|
+
visible: layer.visible,
|
|
744
|
+
security: layer.security
|
|
744
745
|
},
|
|
745
746
|
sourceOptions: {
|
|
746
747
|
type: layer.dataSource.options.type,
|
|
@@ -1323,7 +1324,7 @@ class MapContextDirective {
|
|
|
1323
1324
|
// this.component.map.init();
|
|
1324
1325
|
// this.component.map.ol.setTarget(target);
|
|
1325
1326
|
const viewContext = context.map.view;
|
|
1326
|
-
if (!this.component.view || viewContext.keepCurrentView !== true) {
|
|
1327
|
+
if (!this.component.view || viewContext.keepCurrentView !== true || context.map.view.projection !== this.map.projection) {
|
|
1327
1328
|
this.component.view = viewContext;
|
|
1328
1329
|
}
|
|
1329
1330
|
if (this.component.map.geolocationController) {
|
|
@@ -2296,10 +2297,10 @@ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2296
2297
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 10, "igo.context.contextManager.showHidden"), " ");
|
|
2297
2298
|
i0.ɵɵadvance(2);
|
|
2298
2299
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(15, 12, i0.ɵɵpipeBind1(16, 14, ctx.contexts$)));
|
|
2299
|
-
} }, 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}
|
|
2300
|
+
} }, 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 });
|
|
2300
2301
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextListComponent, [{
|
|
2301
2302
|
type: Component,
|
|
2302
|
-
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}
|
|
2303
|
+
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"] }]
|
|
2303
2304
|
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.ConfigService }, { type: i2.AuthService }, { type: i1$3.MatDialog }, { type: i3.LanguageService }, { type: i3.StorageService }]; }, { contexts: [{
|
|
2304
2305
|
type: Input
|
|
2305
2306
|
}], selectedContext: [{
|
|
@@ -3869,13 +3870,20 @@ IgoContextManagerModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [
|
|
|
3869
3870
|
LayerContextDirective] }); })();
|
|
3870
3871
|
|
|
3871
3872
|
class ShareMapService {
|
|
3872
|
-
constructor(contextService,
|
|
3873
|
+
constructor(contextService, route) {
|
|
3873
3874
|
this.contextService = contextService;
|
|
3874
|
-
this.messageService = messageService;
|
|
3875
3875
|
this.route = route;
|
|
3876
|
+
this.language = '';
|
|
3877
|
+
this.route.queryParams.subscribe((params) => {
|
|
3878
|
+
if (params['lang']) {
|
|
3879
|
+
this.language = params['lang'];
|
|
3880
|
+
}
|
|
3881
|
+
});
|
|
3876
3882
|
}
|
|
3877
3883
|
getUrlWithApi(formValues) {
|
|
3878
|
-
return
|
|
3884
|
+
return this.language ?
|
|
3885
|
+
`${location.origin + location.pathname}?context=${formValues.uri}&lang=${this.language}` :
|
|
3886
|
+
`${location.origin + location.pathname}?context=${formValues.uri}`;
|
|
3879
3887
|
}
|
|
3880
3888
|
createContextShared(map, formValues) {
|
|
3881
3889
|
const context = this.contextService.getContextFromMap(map);
|
|
@@ -3950,7 +3958,9 @@ class ShareMapService {
|
|
|
3950
3958
|
if (this.contextService.context$.value) {
|
|
3951
3959
|
context = `${contextKey}=${this.contextService.context$.value.uri}`;
|
|
3952
3960
|
}
|
|
3953
|
-
let url =
|
|
3961
|
+
let url = this.language ?
|
|
3962
|
+
`${location.origin}${location.pathname}?${context}&${zoom}&${center}&${layersUrl}&${llc}&${addedLayersQueryParamsWms}&${llc}&${addedLayersQueryParamsWmts}&${addedLayersQueryParamsArcgisRest}&${addedLayersQueryParamsImageArcgisRest}&${addedLayersQueryParamsTileArcgisRest}&lang=${this.language}` :
|
|
3963
|
+
`${location.origin}${location.pathname}?${context}&${zoom}&${center}&${layersUrl}&${llc}&${addedLayersQueryParamsWms}&${llc}&${addedLayersQueryParamsWmts}&${addedLayersQueryParamsArcgisRest}&${addedLayersQueryParamsImageArcgisRest}&${addedLayersQueryParamsTileArcgisRest}`;
|
|
3954
3964
|
for (let i = 0; i < 5; i++) {
|
|
3955
3965
|
url = url.replace(/&&/g, '&');
|
|
3956
3966
|
url = url.endsWith('&') ? url.slice(0, -1) : url;
|
|
@@ -4054,14 +4064,14 @@ class ShareMapService {
|
|
|
4054
4064
|
return addedLayersQueryParams;
|
|
4055
4065
|
}
|
|
4056
4066
|
}
|
|
4057
|
-
ShareMapService.ɵfac = function ShareMapService_Factory(t) { return new (t || ShareMapService)(i0.ɵɵinject(ContextService), i0.ɵɵinject(i3.
|
|
4067
|
+
ShareMapService.ɵfac = function ShareMapService_Factory(t) { return new (t || ShareMapService)(i0.ɵɵinject(ContextService), i0.ɵɵinject(i3.RouteService, 8)); };
|
|
4058
4068
|
ShareMapService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ShareMapService, factory: ShareMapService.ɵfac, providedIn: 'root' });
|
|
4059
4069
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapService, [{
|
|
4060
4070
|
type: Injectable,
|
|
4061
4071
|
args: [{
|
|
4062
4072
|
providedIn: 'root'
|
|
4063
4073
|
}]
|
|
4064
|
-
}], function () { return [{ type: ContextService }, { type: i3.
|
|
4074
|
+
}], function () { return [{ type: ContextService }, { type: i3.RouteService, decorators: [{
|
|
4065
4075
|
type: Optional
|
|
4066
4076
|
}] }]; }, null); })();
|
|
4067
4077
|
|