@provoly/dashboard 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/assets/svgs/analytic.svg +1 -0
  2. package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +5 -4
  3. package/esm2022/import/components/import.component.mjs +22 -10
  4. package/esm2022/import/i18n/en.translations.mjs +3 -1
  5. package/esm2022/import/i18n/fr.translations.mjs +3 -1
  6. package/esm2022/lib/core/access/access.service.mjs +4 -1
  7. package/esm2022/lib/core/i18n/en.translations.mjs +2 -1
  8. package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
  9. package/esm2022/lib/core/model/public-api.mjs +2 -1
  10. package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +2 -0
  11. package/esm2022/lib/core/store/data-source/data-source.effects.mjs +5 -2
  12. package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +12 -1
  13. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +4 -3
  14. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
  15. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +6 -4
  16. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +17 -9
  17. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +8 -2
  18. package/esm2022/presentation/components/presentation.component.mjs +18 -9
  19. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +108 -0
  20. package/esm2022/widgets/widget-analytic/i18n/en.translations.mjs +13 -0
  21. package/esm2022/widgets/widget-analytic/i18n/fr.translations.mjs +13 -0
  22. package/esm2022/widgets/widget-analytic/provoly-dashboard-widgets-widget-analytic.mjs +5 -0
  23. package/esm2022/widgets/widget-analytic/public-api.mjs +3 -0
  24. package/esm2022/widgets/widget-analytic/style/css.component.mjs +11 -0
  25. package/esm2022/widgets/widget-analytic/widget-analytic.module.mjs +70 -0
  26. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +14 -137
  27. package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +2 -34
  28. package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +191 -0
  29. package/esm2022/widgets/widget-map/public-api.mjs +2 -1
  30. package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +24 -5
  31. package/fesm2022/provoly-dashboard-admin.mjs +3 -2
  32. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  33. package/fesm2022/provoly-dashboard-import.mjs +25 -9
  34. package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
  35. package/fesm2022/provoly-dashboard-presentation.mjs +17 -8
  36. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  37. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +211 -0
  38. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -0
  39. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +201 -169
  40. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  41. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +23 -4
  42. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
  43. package/fesm2022/provoly-dashboard.mjs +52 -16
  44. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  45. package/import/components/import.component.d.ts +4 -2
  46. package/import/i18n/en.translations.d.ts +2 -0
  47. package/import/i18n/fr.translations.d.ts +2 -0
  48. package/lib/core/access/access.service.d.ts +3 -0
  49. package/lib/core/i18n/en.translations.d.ts +1 -0
  50. package/lib/core/i18n/fr.translations.d.ts +1 -0
  51. package/lib/core/model/public-api.d.ts +1 -0
  52. package/lib/core/model/widget-analytic-manifest.interface.d.ts +6 -0
  53. package/lib/core/store/data-source/data-source.effects.d.ts +4 -2
  54. package/lib/dashboard/store/dashboard.actions.d.ts +11 -1
  55. package/lib/dashboard/store/dashboard.effects.d.ts +2 -0
  56. package/lib/dashboard/store/dashboard.reducers.d.ts +3 -1
  57. package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
  58. package/package.json +54 -48
  59. package/presentation/components/presentation.component.d.ts +5 -3
  60. package/styles/components/_o-pry-admin-classes-customize.scss +1 -0
  61. package/widgets/widget-analytic/component/widget-analytic.component.d.ts +47 -0
  62. package/widgets/widget-analytic/i18n/en.translations.d.ts +12 -0
  63. package/widgets/widget-analytic/i18n/fr.translations.d.ts +12 -0
  64. package/widgets/widget-analytic/index.d.ts +5 -0
  65. package/widgets/widget-analytic/public-api.d.ts +2 -0
  66. package/widgets/widget-analytic/style/_o-widget-analytic.scss +43 -0
  67. package/widgets/widget-analytic/style/css.component.d.ts +5 -0
  68. package/widgets/widget-analytic/widget-analytic.module.d.ts +19 -0
  69. package/widgets/widget-map/component/widget-map.component.d.ts +9 -22
  70. package/widgets/widget-map/interaction/interaction-manager.class.d.ts +0 -5
  71. package/widgets/widget-map/interaction/tooltip-manager.class.d.ts +43 -0
  72. package/widgets/widget-map/public-api.d.ts +1 -0
  73. package/widgets/widget-tile/component/widget-tile.component.d.ts +4 -1
@@ -1,16 +1,15 @@
1
- import { AfterViewInit, ComponentRef, ElementRef, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
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
- import { Map, Overlay } from 'ol';
3
+ import { 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
+ import { Map } from 'ol';
5
5
  import { Coordinate } from 'ol/coordinate';
6
6
  import { Geometry } from 'ol/geom';
7
7
  import { Layer } from 'ol/layer';
8
8
  import BaseLayer from 'ol/layer/Base';
9
9
  import VectorLayer from 'ol/layer/Vector';
10
- import { Pixel } from 'ol/pixel';
11
10
  import VectorSource from 'ol/source/Vector';
12
11
  import { Style } from 'ol/style';
13
- import { BehaviorSubject, Observable, Subscription } from 'rxjs';
12
+ import { BehaviorSubject, Observable } from 'rxjs';
14
13
  import { InteractionManager } from '../interaction/interaction-manager.class';
15
14
  import { WidgetMapLayerService } from './widget-map-layer.service';
16
15
  import { LayerSlider } from '../interaction/layer-slider.class';
@@ -18,6 +17,7 @@ import TileLayer from 'ol/layer/Tile';
18
17
  import { Attribution } from 'ol/control';
19
18
  import VectorTileLayer from 'ol/layer/VectorTile';
20
19
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
20
+ import { TooltipManager } from '../interaction/tooltip-manager.class';
21
21
  import * as i0 from "@angular/core";
22
22
  export declare const TOOLTIP_PADDING = 15;
23
23
  export declare const NON_MANDATORY_FIT_LAYER_TYPES: string[];
@@ -30,6 +30,8 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
30
30
  private widgetMapLayerService;
31
31
  private pryAggregationService;
32
32
  private geoAuthService;
33
+ static idCounter: number;
34
+ id: string;
33
35
  mapUrl$: Observable<string>;
34
36
  mapRef: ElementRef;
35
37
  popup: ElementRef;
@@ -60,8 +62,6 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
60
62
  }>;
61
63
  height$: Observable<number>;
62
64
  actions$: BehaviorSubject<("click" | "lasso" | "rectangle" | "zoom" | "move" | "export" | "upload")[]>;
63
- private wmsFeatures$;
64
- classicFeatures$: BehaviorSubject<any>;
65
65
  geoServerLayerDescriptions$: Observable<MapGeoServerLayerOptions[]>;
66
66
  legendTabOpen: boolean;
67
67
  layersTabOpen: boolean;
@@ -82,9 +82,8 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
82
82
  }>;
83
83
  mapStyleUrl$: Observable<string | null>;
84
84
  interactionManager: InteractionManager;
85
+ tooltipManager: TooltipManager;
85
86
  mapStyleLayer$: Observable<(VectorTileLayer | TileLayer<any>)[]>;
86
- tooltipIndex: number;
87
- tooltipNumber: number;
88
87
  STYLE_FROM_URL: string;
89
88
  NO_STYLE: string;
90
89
  wmsCapabilities$: Observable<{
@@ -123,9 +122,6 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
123
122
  attributions$: Observable<boolean>;
124
123
  olZoomElement$: BehaviorSubject<HTMLDivElement | null>;
125
124
  previousLayers: BaseLayer[];
126
- previousTooltip?: ComponentRef<BaseTooltipComponent>;
127
- previousTooltipSub?: Subscription;
128
- popupOverlay?: Overlay;
129
125
  layerGroups$: Observable<LayerGroup[]>;
130
126
  layerGroups: LayerGroup[];
131
127
  layerSettingsExpandedState: {
@@ -133,15 +129,10 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
133
129
  };
134
130
  constructor(store: Store<any>, translateService: PryI18nService, tooltipFactoryService: TooltipFactoryService, symbolService: SymbolService, injector: Injector, widgetMapLayerService: WidgetMapLayerService, pryAggregationService: PryAggregationService, el: ElementRef, geoAuthService: PryGeoAuthService);
135
131
  initInteractionManager(): InteractionManager;
132
+ initTooltipManager(): TooltipManager;
136
133
  ngAfterViewInit(): void;
137
- clearTooltip(): void;
138
134
  private addEmptyWebGlLayerBelowSlideHeatmaps;
139
135
  initResultSet$(): Observable<import("@provoly/dashboard").ResultSet>;
140
- generateTooltip(value: {
141
- oClass: string;
142
- coordinates: Pixel;
143
- values: any;
144
- }): Promise<ComponentRef<BaseTooltipComponent> | null>;
145
136
  setDefaultLayerTitle(layer: MapWidgetLayerOptions, index: number, capabilities: {
146
137
  [p: string]: GetCapabilitiesResponse | null;
147
138
  } | undefined): void;
@@ -179,14 +170,10 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
179
170
  changeOpacity(layer: MapWidgetLayerOptions, $event: string): void;
180
171
  getWMSLayers(): Layer<any>[];
181
172
  isLayerRendered(layer: any): boolean;
182
- getFeatureFromServer(wmsLayers: Layer<any>[], pixel: Pixel): void;
183
173
  changeWmsClass($event: any, layer: MapWMSLayerLayerOptions): void;
184
174
  toggleLegend(index: number): void;
185
175
  toggleLegendWindow(): void;
186
176
  toggleLayersWindow(): void;
187
- tooltipMove(number: number): void;
188
- tooltipCanMove(number: number): boolean;
189
- private setStyleAsync;
190
177
  get mapLayers(): BaseLayer[];
191
178
  get rightSlideLayers(): BaseLayer[];
192
179
  get leftSlideLayers(): BaseLayer[];
@@ -1,20 +1,15 @@
1
- import { MapBrowserEvent, Overlay } from 'ol';
2
1
  import { ScaleLine } from 'ol/control';
3
2
  import type { WidgetMapComponent } from '../component/widget-map.component';
4
3
  import { SelectionInteraction } from './selection-interaction.class';
5
4
  export declare class InteractionManager {
6
- interactionPopupOverlay?: Overlay;
7
5
  scaleControl?: ScaleLine;
8
6
  selectionInteraction: SelectionInteraction;
9
- tooltipEvent?: MapBrowserEvent<MouseEvent>;
10
7
  private component;
11
8
  init(component: WidgetMapComponent): this;
12
9
  listeners: {
13
10
  contextMenu: (e: MouseEvent) => void;
14
- popup: (event: MapBrowserEvent<MouseEvent>) => void;
15
11
  };
16
12
  private addContextMenuInteraction;
17
- private addOverlayOnInteraction;
18
13
  private addScaleControl;
19
14
  private addUpdateZoomAndCenter;
20
15
  }
@@ -0,0 +1,43 @@
1
+ import { Pixel } from 'ol/pixel';
2
+ import { ComponentRef, ElementRef, Injector, ViewContainerRef } from '@angular/core';
3
+ import { BaseTooltipComponent, Size, TooltipFactoryService } from '@provoly/dashboard';
4
+ import { BehaviorSubject, Observable, Subscription } from 'rxjs';
5
+ import { Map, MapBrowserEvent, Overlay } from 'ol';
6
+ import { Store } from '@ngrx/store';
7
+ import { WidgetMapComponent } from '../component/widget-map.component';
8
+ import { InteractionManager } from './interaction-manager.class';
9
+ import { Layer } from 'ol/layer';
10
+ export declare class TooltipManager {
11
+ private tooltipFactoryService;
12
+ private injector;
13
+ private store;
14
+ wmsFeatures$: Observable<any[]>;
15
+ classicFeatures$: BehaviorSubject<any>;
16
+ tooltipIndex: number;
17
+ popupOverlay?: Overlay;
18
+ map: Map;
19
+ popup: ElementRef;
20
+ popupContent: ViewContainerRef;
21
+ tooltipNumber: number;
22
+ interactionManager: InteractionManager;
23
+ previousTooltip?: ComponentRef<BaseTooltipComponent>;
24
+ previousTooltipSub?: Subscription;
25
+ tooltipEvent?: MapBrowserEvent<MouseEvent>;
26
+ parent: WidgetMapComponent;
27
+ interactionPopupOverlay: Overlay;
28
+ init(tooltipFactoryService: TooltipFactoryService, injector: Injector, store: Store, subscriptions: Subscription, widgetSize$: Observable<Size>, displayHeader$: Observable<boolean | {
29
+ [p: string]: boolean;
30
+ }>, map: Map, popup: ElementRef, popupContent: ViewContainerRef, interactionManager: InteractionManager, parent: WidgetMapComponent): this;
31
+ private addOverlayOnInteraction;
32
+ generateTooltip(value: {
33
+ oClass: string;
34
+ coordinates: Pixel;
35
+ values: any;
36
+ }): Promise<ComponentRef<BaseTooltipComponent> | null>;
37
+ clearTooltip(empty?: boolean): void;
38
+ tooltipMove(number: number): void;
39
+ private setStyleAsync;
40
+ tooltipCanMove(number: number): boolean;
41
+ getFeatureFromServer(wmsLayers: Layer<any>[], pixel: Pixel): void;
42
+ destroy(): void;
43
+ }
@@ -6,6 +6,7 @@ export * from './pipe/widget-map-legend-url.pipe';
6
6
  export * from './interaction/interaction-manager.class';
7
7
  export * from './interaction/selection-interaction.class';
8
8
  export * from './interaction/layer-slider.class';
9
+ export * from './interaction/tooltip-manager.class';
9
10
  export * from './utils/widget-map.utils';
10
11
  export * from './utils/xml-utils.class';
11
12
  export * from './utils/cql-utils.class';
@@ -28,7 +28,10 @@ export declare class WidgetTileComponent extends DataWidgetComponent {
28
28
  optionsCopy: TileWidgetOptions;
29
29
  WIDGET_HEADER_HEIGHT: number;
30
30
  propertiesToDisplay$: Observable<{
31
- [p: string]: string[];
31
+ [p: string]: {
32
+ label: string;
33
+ prop: string;
34
+ }[];
32
35
  } | undefined>;
33
36
  fields: Field[];
34
37
  classes: Class[];