@provoly/dashboard 0.22.5 → 0.22.6
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/README.md +0 -2
- package/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.d.ts +8 -4
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +7 -6
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +44 -30
- package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/about/about.component.mjs +3 -3
- package/esm2022/lib/core/components/base-menu/base-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/select/select.component.mjs +5 -4
- package/esm2022/lib/core/components/select/select.module.mjs +5 -4
- package/esm2022/lib/core/components/select-image/select-image.component.mjs +2 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +16 -1
- package/esm2022/lib/dashboard/item-utils.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +1 -4
- package/esm2022/lib/dashboard/store/refresh.service.mjs +14 -9
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/automate-refresh/automate-refresh.component.mjs +12 -9
- package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +19 -17
- package/esm2022/toolbox/components/toolbox.component.mjs +7 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +4 -5
- package/esm2022/widgets/widget-graph/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +49 -34
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +4 -4
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +4 -4
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +29 -21
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +5 -6
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +56 -39
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/select/select.module.d.ts +2 -1
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +1 -1
- package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +8 -1
- package/lib/dashboard/store/dashboard.selectors.d.ts +0 -13
- package/lib/dashboard/store/refresh.service.d.ts +3 -1
- package/package.json +7 -7
- package/presentation/style/_o-pry-presentation.scss +0 -3
- package/styles/components/_a-chip.scss +6 -0
- package/styles/components/_a-pry-select.scss +13 -0
- package/styles/components/_a-range-slider.scss +4 -5
- package/styles/components/_m-nav-links.scss +2 -7
- package/styles/components/_o-widget.scss +6 -0
- package/styles-theme/abstracts-theme/variables/_variables-colors.scss +4 -3
- package/styles-theme/base-theme/_typography.theme.scss +5 -2
- package/styles-theme/components-theme/_a-btn.theme.scss +3 -7
- package/styles-theme/components-theme/_a-label.theme.scss +1 -0
- package/styles-theme/components-theme/_a-pry-select.theme.scss +4 -6
- package/styles-theme/components-theme/_a-range-slider.theme.scss +16 -16
- package/styles-theme/components-theme/_a-table.theme.scss +2 -2
- package/styles-theme/components-theme/_m-btn-sorttable.theme.scss +3 -3
- package/styles-theme/components-theme/_m-nav-links.theme.scss +18 -0
- package/styles-theme/components-theme/_o-pry-presentation.theme.scss +9 -0
- package/styles-theme/components-theme/_o-tabs.theme.scss +1 -1
- package/styles-theme/layout-theme/_o-base-layout.theme.scss +1 -0
- package/styles-theme/main-theme.scss +1 -0
- package/toolbox/components/automate-refresh/automate-refresh.component.d.ts +3 -1
- package/toolbox/components/refresh-datasets/refresh-datasets.component.d.ts +3 -2
- package/widgets/widget-aggregated-chart/style/_o-widget-chart.scss +3 -0
- package/widgets/widget-graph/component/widget-graph.component.d.ts +0 -1
- package/widgets/widget-graph/style/_o-widget-graph.scss +14 -0
|
@@ -2327,11 +2327,11 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
2327
2327
|
});
|
|
2328
2328
|
}
|
|
2329
2329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetMapComponent, deps: [{ token: i1.Store }, { token: i2.PryI18nService }, { token: i2.TooltipFactoryService }, { token: i2.SymbolService }, { token: i0.Injector }, { token: WidgetMapLayerService }, { token: i2.PryAggregationService }, { token: i0.ElementRef }, { token: PRY_GEOAUTH_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2330
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetMapComponent, selector: "pry-widget-map", viewQueries: [{ propertyName: "mapRef", first: true, predicate: ["mapRef"], descendants: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "exportTypeTemplate", first: true, predicate: ["exportTypeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: GeometryFieldsForPipe, name: "geometryFieldsFor" }, { kind: "pipe", type: WidgetMapLegendUrlPipe, name: "legendUrl" }] }); }
|
|
2330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetMapComponent, selector: "pry-widget-map", viewQueries: [{ propertyName: "mapRef", first: true, predicate: ["mapRef"], descendants: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "exportTypeTemplate", first: true, predicate: ["exportTypeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: GeometryFieldsForPipe, name: "geometryFieldsFor" }, { kind: "pipe", type: WidgetMapLegendUrlPipe, name: "legendUrl" }] }); }
|
|
2331
2331
|
}
|
|
2332
2332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetMapComponent, decorators: [{
|
|
2333
2333
|
type: Component,
|
|
2334
|
-
args: [{ selector: 'pry-widget-map', template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n" }]
|
|
2334
|
+
args: [{ selector: 'pry-widget-map', template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n" }]
|
|
2335
2335
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.PryI18nService }, { type: i2.TooltipFactoryService }, { type: i2.SymbolService }, { type: i0.Injector }, { type: WidgetMapLayerService }, { type: i2.PryAggregationService }, { type: i0.ElementRef }, { type: i2.PryGeoAuthService, decorators: [{
|
|
2336
2336
|
type: Optional
|
|
2337
2337
|
}, {
|