@provoly/dashboard 0.24.8 → 0.24.10

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.
Files changed (57) hide show
  1. package/assets/svgs/bin_normal.svg +6 -0
  2. package/esm2022/lib/core/components/edit-input/edit-input.component.mjs +18 -5
  3. package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
  4. package/esm2022/lib/core/i18n/fr.translations.mjs +5 -3
  5. package/esm2022/lib/core/model/display-options.interface.mjs +3 -1
  6. package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
  7. package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
  8. package/esm2022/lib/dashboard/components/widgets/settings/settings.component.mjs +3 -3
  9. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +8 -2
  10. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +19 -1
  11. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +66 -1
  12. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +6 -4
  13. package/esm2022/toolbox/toolbox.model.mjs +9 -1
  14. package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +1 -1
  15. package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +1 -1
  16. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +183 -43
  17. package/esm2022/widgets/widget-map/i18n/en.translations.mjs +22 -2
  18. package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +23 -2
  19. package/esm2022/widgets/widget-map/style/css.component.mjs +2 -2
  20. package/esm2022/widgets/widget-map/widget-map.module.mjs +12 -5
  21. package/fesm2022/provoly-dashboard-toolbox.mjs +26 -19
  22. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  23. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +1 -1
  24. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
  25. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +1 -1
  26. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
  27. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +237 -49
  28. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  29. package/fesm2022/provoly-dashboard.mjs +121 -12
  30. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  31. package/lib/core/components/edit-input/edit-input.component.d.ts +6 -2
  32. package/lib/core/i18n/en.translations.d.ts +1 -0
  33. package/lib/core/i18n/fr.translations.d.ts +2 -0
  34. package/lib/core/model/display-options.interface.d.ts +1 -0
  35. package/lib/core/model/manifest.interface.d.ts +2 -1
  36. package/lib/core/model/widget-map-manifest.interface.d.ts +6 -0
  37. package/lib/dashboard/store/dashboard.actions.d.ts +37 -0
  38. package/lib/dashboard/store/dashboard.effects.d.ts +4 -0
  39. package/lib/dashboard/store/dashboard.selectors.d.ts +9 -0
  40. package/package.json +1 -1
  41. package/styles/base/_utils.scss +4 -0
  42. package/styles/components/_a-range-slider.scss +5 -21
  43. package/styles/components/_m-form-label-field.scss +1 -0
  44. package/styles/components/_o-layer-settings.scss +139 -0
  45. package/styles/components/_o-pry-edit.scss +30 -2
  46. package/styles/components/_o-settings.scss +6 -2
  47. package/styles/main.scss +1 -0
  48. package/styles-theme/components-theme/_m-layer-legend.theme.scss +24 -0
  49. package/styles-theme/components-theme/_o-layer-settings.theme.scss +32 -0
  50. package/styles-theme/components-theme/_o-settings.theme.scss +6 -0
  51. package/styles-theme/main-theme.scss +2 -0
  52. package/widgets/widget-map/component/widget-map.component.d.ts +22 -8
  53. package/widgets/widget-map/i18n/en.translations.d.ts +20 -0
  54. package/widgets/widget-map/i18n/fr.translations.d.ts +21 -0
  55. package/widgets/widget-map/style/_m-layer-legend.scss +30 -5
  56. package/widgets/widget-map/style/_o-widget-map.scss +4 -0
  57. package/widgets/widget-map/widget-map.module.d.ts +2 -1
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, ComponentRef, ElementRef, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
3
- import { BaseTooltipComponent, BaseWidgetMapLayerOptions, Class, DataWidgetComponent, Field, GetCapabilitiesResponse, MapAutoLayerOptions, MapFeatureLayerOptions, MapGeoServerLayerOptions, MapRasterTileLayerOptions, MapVectorTileLayerOptions, MapWidgetBubbleLayerOptions, MapWidgetHeatMapLayerOptions, MapWidgetLayerOptions, MapWidgetMarkerLayerOptions, MapWidgetOptions, MapWMSLayerLayerOptions, MapWMTSLayerLayerOptions, PryAggregationService, PryGeoAuthService, PryI18nService, SymbolService, TooltipFactoryService } from '@provoly/dashboard';
3
+ import { BaseTooltipComponent, BaseWidgetMapLayerOptions, Class, DataWidgetComponent, Field, GetCapabilitiesResponse, LayerGroup, MapAutoLayerOptions, MapFeatureLayerOptions, MapGeoServerLayerOptions, MapRasterTileLayerOptions, MapVectorTileLayerOptions, MapWidgetBubbleLayerOptions, MapWidgetHeatMapLayerOptions, MapWidgetLayerOptions, MapWidgetMarkerLayerOptions, MapWidgetOptions, MapWMSLayerLayerOptions, MapWMTSLayerLayerOptions, PryAggregationService, PryGeoAuthService, PryI18nService, SymbolService, TooltipFactoryService } from '@provoly/dashboard';
4
4
  import { Map, Overlay } from 'ol';
5
5
  import { Coordinate } from 'ol/coordinate';
6
6
  import { Geometry } from 'ol/geom';
@@ -17,9 +17,11 @@ import { LayerSlider } from '../interaction/layer-slider.class';
17
17
  import TileLayer from 'ol/layer/Tile';
18
18
  import { Attribution } from 'ol/control';
19
19
  import VectorTileLayer from 'ol/layer/VectorTile';
20
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
20
21
  import * as i0 from "@angular/core";
21
22
  export declare const TOOLTIP_PADDING = 15;
22
23
  export declare const NON_MANDATORY_FIT_LAYER_TYPES: string[];
24
+ export declare const DEFAULT_LAYER_GROUP = "DEFAULT";
23
25
  export declare class WidgetMapComponent extends DataWidgetComponent implements AfterViewInit, OnDestroy {
24
26
  translateService: PryI18nService;
25
27
  private tooltipFactoryService;
@@ -124,6 +126,10 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
124
126
  previousTooltip?: ComponentRef<BaseTooltipComponent>;
125
127
  previousTooltipSub?: Subscription;
126
128
  popupOverlay?: Overlay;
129
+ layerGroups$: Observable<LayerGroup[]>;
130
+ layerSettingsExpandedState: {
131
+ [key: string]: boolean;
132
+ };
127
133
  constructor(store: Store<any>, translateService: PryI18nService, tooltipFactoryService: TooltipFactoryService, symbolService: SymbolService, injector: Injector, widgetMapLayerService: WidgetMapLayerService, pryAggregationService: PryAggregationService, el: ElementRef, geoAuthService: PryGeoAuthService);
128
134
  initInteractionManager(): InteractionManager;
129
135
  ngAfterViewInit(): void;
@@ -135,7 +141,7 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
135
141
  coordinates: Pixel;
136
142
  values: any;
137
143
  }): Promise<ComponentRef<BaseTooltipComponent> | null>;
138
- setDefaultLayerTitle(layer: MapWidgetLayerOptions, capabilities: {
144
+ setDefaultLayerTitle(layer: MapWidgetLayerOptions, index: number, capabilities: {
139
145
  [p: string]: GetCapabilitiesResponse | null;
140
146
  } | undefined): void;
141
147
  fitMapForObjects(selectedIds?: string[], extents?: {
@@ -150,16 +156,15 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
150
156
  changeFit($event: boolean, layer: MapWidgetLayerOptions): void;
151
157
  changeSlide($event: undefined | 'left' | 'right', layer: MapWidgetLayerOptions): void;
152
158
  changeAttributions($event: boolean): void;
153
- addLayer(): void;
159
+ addLayer(group: LayerGroup): void;
154
160
  changeLayerType($event: any, i: number): void;
155
- changeTitle($event: any, layer: MapWidgetLayerOptions): void;
161
+ changeTitle($event: any, layer: MapWidgetLayerOptions, group: LayerGroup): void;
156
162
  emitManifest(): void;
157
163
  changeLocationAttributes($event: any, layer: MapWidgetLayerOptions): void;
158
164
  layerHasIntensity(layer: MapWidgetLayerOptions): MapWidgetHeatMapLayerOptions | MapWidgetBubbleLayerOptions;
159
165
  changeIntensityAttributes($event: any, layer: MapWidgetLayerOptions): void;
160
166
  changeClasses($event: string[], layer: MapWidgetLayerOptions): void;
161
167
  deleteLayer(i: number, layer: MapWidgetLayerOptions): void;
162
- invertLayers(idx: number, idxWith: number): void;
163
168
  changeUrl($event: Event, layer: MapWMSLayerLayerOptions | MapFeatureLayerOptions | MapVectorTileLayerOptions | MapRasterTileLayerOptions | MapWMTSLayerLayerOptions | MapGeoServerLayerOptions): void;
164
169
  changeAttribution($event: Event, layer: BaseWidgetMapLayerOptions): void;
165
170
  changeParamLayer($event: Event, layer: MapWMSLayerLayerOptions | MapWMTSLayerLayerOptions): void;
@@ -173,7 +178,6 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
173
178
  changeOpacity(layer: MapWidgetLayerOptions, $event: string): void;
174
179
  getWMSLayers(): Layer<any>[];
175
180
  isLayerRendered(layer: any): boolean;
176
- isLayerVisible(layer: any): boolean;
177
181
  getFeatureFromServer(wmsLayers: Layer<any>[], pixel: Pixel): void;
178
182
  changeWmsClass($event: any, layer: MapWMSLayerLayerOptions): void;
179
183
  toggleLegend(index: number): void;
@@ -185,8 +189,8 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
185
189
  get mapLayers(): BaseLayer[];
186
190
  get rightSlideLayers(): BaseLayer[];
187
191
  get leftSlideLayers(): BaseLayer[];
188
- changeVisibility(layer: BaseLayer): void;
189
- changeSingleLayer($event: any): void;
192
+ changeVisibility(group: LayerGroup, _layer?: MapWidgetLayerOptions): void;
193
+ isLayerVisible(layer: MapWidgetLayerOptions, group: LayerGroup): boolean;
190
194
  changeAutoLayer($event: any): void;
191
195
  get layerVisibleIdx(): number;
192
196
  ngOnDestroy(): void;
@@ -203,6 +207,16 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
203
207
  private getOlZoomElement;
204
208
  changeSelection(action: 'click' | 'lasso' | 'rectangle' | 'zoom' | 'move' | 'export' | 'upload'): void;
205
209
  private clearLayers;
210
+ addLayerGroup(): void;
211
+ updateLayerGroup(name: string, newName?: string, singleLayer?: boolean, visibleLayers?: string[]): void;
212
+ updateLayerGroupTitle($event: Event, name: string): void;
213
+ deleteLayerGroup(name: string): void;
214
+ drop(event: CdkDragDrop<MapWidgetLayerOptions[]>, group: LayerGroup): void;
215
+ moveLayerInOptions(targetIdxInGroup: number, movedLayer: MapWidgetLayerOptions, group: LayerGroup, direction: 1 | -1): void;
216
+ toggleExpandAll(group: LayerGroup): void;
217
+ toggleLayerExpand(layer: MapWidgetLayerOptions, group: LayerGroup): void;
218
+ updateOrder($event: Event, layer: MapWidgetLayerOptions): void;
219
+ protected readonly DEFAULT_LAYER_GROUP = "DEFAULT";
206
220
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetMapComponent, [null, null, null, null, null, null, null, null, { optional: true; }]>;
207
221
  static ɵcmp: i0.ɵɵComponentDeclaration<WidgetMapComponent, "pry-widget-map", never, {}, {}, never, never, false, never>;
208
222
  }
@@ -13,6 +13,7 @@ export declare const enTranslations: {
13
13
  layer: string;
14
14
  layerOptions: string;
15
15
  layerTitle: string;
16
+ order: string;
16
17
  layerType: {
17
18
  title: string;
18
19
  heatmap: string;
@@ -90,6 +91,25 @@ export declare const enTranslations: {
90
91
  zoomOut: string;
91
92
  slideTitle: string;
92
93
  layerLoadError: string;
94
+ layerSettings: {
95
+ title: string;
96
+ addLayerGroup: string;
97
+ layerGroupName: string;
98
+ optionalColon: string;
99
+ singleLayer: string;
100
+ multipleLayer: string;
101
+ unfoldAll: string;
102
+ foldAll: string;
103
+ noLayer: string;
104
+ selectLayers: string;
105
+ group: string;
106
+ deleteGroup: string;
107
+ deleteLayer: string;
108
+ editLayerTitle: string;
109
+ editGroupName: string;
110
+ };
111
+ missingTitle: string;
112
+ noGroup: string;
93
113
  };
94
114
  };
95
115
  };
@@ -13,6 +13,7 @@ export declare const frTranslations: {
13
13
  layer: string;
14
14
  layerOptions: string;
15
15
  layerTitle: string;
16
+ order: string;
16
17
  layerType: {
17
18
  title: string;
18
19
  heatmap: string;
@@ -90,6 +91,26 @@ export declare const frTranslations: {
90
91
  zoomOut: string;
91
92
  slideTitle: string;
92
93
  layerLoadError: string;
94
+ layerSettings: {
95
+ title: string;
96
+ addLayerGroup: string;
97
+ layerGroupName: string;
98
+ optionalColon: string;
99
+ singleLayer: string;
100
+ multipleLayer: string;
101
+ unfoldAll: string;
102
+ foldAll: string;
103
+ noLayer: string;
104
+ selectLayers: string;
105
+ group: string;
106
+ deleteGroup: string;
107
+ deleteLayer: string;
108
+ confirmDelete: string;
109
+ editLayerTitle: string;
110
+ editGroupName: string;
111
+ };
112
+ missingTitle: string;
113
+ noGroup: string;
93
114
  };
94
115
  };
95
116
  };
@@ -29,7 +29,6 @@
29
29
  display: flex;
30
30
  flex-direction: row;
31
31
  align-items: center;
32
- font-size: 12px;
33
32
 
34
33
  &:hover {
35
34
  cursor: pointer;
@@ -38,13 +37,20 @@
38
37
  }
39
38
 
40
39
  &__container {
41
- color: #113b6e;
42
- background-color: white;
43
40
  border-radius: toRem(8);
44
- padding: toRem(5) toRem(8);
41
+ padding: toRem(8) toRem(10);
42
+
43
+ &--layers {
44
+ max-width: toRem(220);
45
+ }
45
46
 
46
47
  .a-h4 {
47
- font-size: 12px;
48
+ font-size: 16px;
49
+ }
50
+
51
+ .a-h5 {
52
+ font-size: 14px;
53
+ margin: 0;
48
54
  }
49
55
 
50
56
  button.m-map-layer-action__toggle {
@@ -79,9 +85,28 @@
79
85
  }
80
86
 
81
87
  .m-layer-switcher {
88
+ &__group-title {
89
+ font-weight: 700;
90
+ margin-bottom: toRem(5);
91
+ }
92
+
82
93
  &__title {
83
94
  align-items: flex-start;
84
95
  }
96
+
97
+ &--radios {
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: toRem(5);
101
+
102
+ input {
103
+ margin-top: toRem(3);
104
+ }
105
+
106
+ .a-label {
107
+ margin-left: toRem(5)
108
+ }
109
+ }
85
110
  }
86
111
 
87
112
  .m-map-slide-legend {
@@ -8,6 +8,10 @@
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
 
11
+ &__general-settings {
12
+ margin: 0 -10px;
13
+ }
14
+
11
15
  div.ol-scale-bar {
12
16
  position: absolute;
13
17
  left: initial;
@@ -10,11 +10,12 @@ import * as i6 from "@angular/forms";
10
10
  import * as i7 from "@angular/cdk/overlay";
11
11
  import * as i8 from "@provoly/dashboard";
12
12
  import * as i9 from "@provoly/dashboard/components/checkbox";
13
+ import * as i10 from "@angular/cdk/drag-drop";
13
14
  export declare class WidgetMapModule extends BaseWidgetModule {
14
15
  private pryTranslateService;
15
16
  constructor(pryTranslateService: PryI18nService);
16
17
  getComponent(): Type<BaseWidgetComponent>;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetMapModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetMapModule, [typeof i1.WidgetMapComponent, typeof i2.GeometryFieldsForPipe, typeof i3.PryWidgetMapCssComponent, typeof i4.WidgetMapLegendUrlPipe], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.OverlayModule, typeof i8.PryCoreModule, typeof i8.PryDashboardModule, typeof i8.PrySelectModule, typeof i8.PryIconModule, typeof i9.PryCheckboxModule, typeof i8.PryToggleModule, typeof i8.PryOverlayModule, typeof i8.PryI18nModule, typeof i8.PryRangeModule], [typeof i1.WidgetMapComponent, typeof i2.GeometryFieldsForPipe, typeof i3.PryWidgetMapCssComponent, typeof i4.WidgetMapLegendUrlPipe]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetMapModule, [typeof i1.WidgetMapComponent, typeof i2.GeometryFieldsForPipe, typeof i3.PryWidgetMapCssComponent, typeof i4.WidgetMapLegendUrlPipe], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.OverlayModule, typeof i8.PryCoreModule, typeof i8.PryDashboardModule, typeof i8.PrySelectModule, typeof i8.PryIconModule, typeof i9.PryCheckboxModule, typeof i8.PryToggleModule, typeof i8.PryOverlayModule, typeof i8.PryI18nModule, typeof i8.PryRangeModule, typeof i8.PryEditInputModule, typeof i10.DragDropModule], [typeof i1.WidgetMapComponent, typeof i2.GeometryFieldsForPipe, typeof i3.PryWidgetMapCssComponent, typeof i4.WidgetMapLegendUrlPipe]>;
19
20
  static ɵinj: i0.ɵɵInjectorDeclaration<WidgetMapModule>;
20
21
  }