@provoly/dashboard 0.12.9 → 0.13.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 (96) hide show
  1. package/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.d.ts +3 -1
  2. package/components/sinceDate/sinceDate.pipe.d.ts +1 -1
  3. package/dataset/components/dataset-detail/dataset-detail.component.d.ts +7 -1
  4. package/dataset/i18n/en.translations.d.ts +2 -0
  5. package/dataset/i18n/fr.translations.d.ts +2 -1
  6. package/dataset/style/_o-pry-dataset-detail.scss +13 -11
  7. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.mjs +8 -3
  8. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +2 -1
  9. package/esm2022/components/sinceDate/sinceDate.pipe.mjs +7 -9
  10. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +26 -8
  11. package/esm2022/dataset/components/dataset.component.mjs +4 -2
  12. package/esm2022/dataset/i18n/en.translations.mjs +3 -1
  13. package/esm2022/dataset/i18n/fr.translations.mjs +4 -3
  14. package/esm2022/dataset/style/css.component.mjs +2 -2
  15. package/esm2022/filters/date/date-filter.component.mjs +3 -3
  16. package/esm2022/filters/number/number-filter.component.mjs +3 -3
  17. package/esm2022/filters/text/text-filter.component.mjs +3 -3
  18. package/esm2022/import/components/import.component.mjs +5 -16
  19. package/esm2022/import/store/import.actions.mjs +1 -1
  20. package/esm2022/import/store/import.effects.mjs +3 -3
  21. package/esm2022/import/store/import.reducer.mjs +5 -13
  22. package/esm2022/import/store/import.selectors.mjs +5 -7
  23. package/esm2022/import/store/import.service.mjs +1 -1
  24. package/esm2022/lib/core/components/accordion/accordion-item/accordion-item.component.mjs +42 -0
  25. package/esm2022/lib/core/components/accordion/accordion.component.mjs +13 -0
  26. package/esm2022/lib/core/components/select/select.component.mjs +3 -3
  27. package/esm2022/lib/core/core.module.mjs +26 -8
  28. package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
  29. package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
  30. package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -2
  31. package/esm2022/lib/core/public-api.mjs +3 -1
  32. package/esm2022/lib/core/symbol/symbol.service.mjs +53 -15
  33. package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +4 -4
  34. package/esm2022/lib/dashboard/components/widgets/base-widget.component.mjs +1 -1
  35. package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +3 -2
  36. package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.mjs +6 -4
  37. package/esm2022/pipeline/components/pipeline-editor/pipeline-editor.component.mjs +6 -11
  38. package/esm2022/pipeline/style/css.component.mjs +2 -2
  39. package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +3 -7
  40. package/esm2022/restitution/style/css.component.mjs +2 -2
  41. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +53 -194
  42. package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +146 -0
  43. package/esm2022/widgets/widget-map/public-api.mjs +3 -1
  44. package/fesm2022/provoly-dashboard-admin.mjs +7 -2
  45. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  46. package/fesm2022/provoly-dashboard-components-sinceDate.mjs +6 -8
  47. package/fesm2022/provoly-dashboard-components-sinceDate.mjs.map +1 -1
  48. package/fesm2022/provoly-dashboard-dataset.mjs +35 -12
  49. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  50. package/fesm2022/provoly-dashboard-filters-date.mjs +2 -2
  51. package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
  52. package/fesm2022/provoly-dashboard-filters-number.mjs +2 -2
  53. package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
  54. package/fesm2022/provoly-dashboard-filters-text.mjs +2 -2
  55. package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
  56. package/fesm2022/provoly-dashboard-import.mjs +14 -35
  57. package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
  58. package/fesm2022/provoly-dashboard-pipeline.mjs +15 -19
  59. package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
  60. package/fesm2022/provoly-dashboard-restitution.mjs +4 -8
  61. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  62. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +256 -257
  63. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  64. package/fesm2022/provoly-dashboard.mjs +143 -38
  65. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  66. package/import/components/import.component.d.ts +3 -9
  67. package/import/store/import.actions.d.ts +3 -16
  68. package/import/store/import.effects.d.ts +1 -1
  69. package/import/store/import.reducer.d.ts +2 -5
  70. package/import/store/import.selectors.d.ts +2 -7
  71. package/import/store/import.service.d.ts +2 -2
  72. package/lib/core/components/accordion/accordion-item/accordion-item.component.d.ts +17 -0
  73. package/lib/core/components/accordion/accordion.component.d.ts +6 -0
  74. package/lib/core/core.module.d.ts +15 -11
  75. package/lib/core/i18n/en.translations.d.ts +1 -0
  76. package/lib/core/i18n/fr.translations.d.ts +1 -0
  77. package/lib/core/model/widget-map-manifest.interface.d.ts +0 -1
  78. package/lib/core/public-api.d.ts +2 -0
  79. package/lib/core/symbol/symbol.service.d.ts +18 -2
  80. package/lib/dashboard/components/widgets/base-widget.component.d.ts +1 -1
  81. package/package.json +25 -25
  82. package/pipeline/components/pipeline-editor/pipeline-editor.component.d.ts +1 -3
  83. package/pipeline/style/_o-pipeline.scss +0 -108
  84. package/restitution/components/restitution-list/restitution-list.component.d.ts +0 -2
  85. package/restitution/style/_o-restitution-list.scss +2 -24
  86. package/schematics/ng-add/index.spec.js +9 -0
  87. package/schematics/ng-add/index.spec.js.map +1 -1
  88. package/styles/abstracts/_mixins.scss +14 -0
  89. package/styles/components/_m-filter.scss +0 -1
  90. package/styles/components/_o-accordion.scss +91 -0
  91. package/styles-theme/components-theme/_o-accordion.theme.scss +30 -0
  92. package/styles-theme/components-theme/_o-pipeline.theme.scss +0 -26
  93. package/styles-theme/main-theme.scss +1 -0
  94. package/widgets/widget-map/component/widget-map.component.d.ts +13 -24
  95. package/widgets/widget-map/interaction/interaction-manager.class.d.ts +27 -0
  96. package/widgets/widget-map/public-api.d.ts +2 -0
@@ -9,6 +9,21 @@
9
9
  min-height: toRem(55);
10
10
  padding: toRem(15) toRem(15);
11
11
  margin-bottom: toRem(0);
12
+ position: relative;
13
+ border-bottom-style: solid;
14
+ border-bottom-width: toRem(1);
15
+
16
+ // Border left colored
17
+ &:before {
18
+ @include panelBorderLeftColored(var(--border-color));
19
+ }
20
+
21
+ &__title {
22
+ // On active item, remove border-bottom, replaced by border-bottom on active panel
23
+ &.is-active {
24
+ border-bottom: none;
25
+ }
26
+ }
12
27
 
13
28
  &__btn {
14
29
  display: flex;
@@ -19,6 +34,82 @@
19
34
  line-height: 18px;
20
35
  font-weight: 700;
21
36
  border: 0 solid transparent;
37
+ width: 100%;
38
+ height: 70%;
39
+ padding: 0;
40
+ text-transform: uppercase;
41
+ text-align: left;
42
+ }
43
+ }
44
+
45
+ &__panel {
46
+ position: relative;
47
+
48
+ // Border-bottom on active panel
49
+ &[aria-hidden='false'] {
50
+ border-bottom-style: solid;
51
+ border-bottom-width: toRem(1);
52
+ }
53
+
54
+ // Head (input field)
55
+ &__head {
56
+ position: relative;
57
+ padding: toRem(2) toRem(10) toRem(20) toRem(10);
58
+
59
+ // Border left colored
60
+ &:before {
61
+ @include panelBorderLeftColored(var(--border-color));
62
+ }
63
+
64
+ pry-icon {
65
+ position: absolute;
66
+ top: toRem(12);
67
+ left: toRem(23);
68
+ }
69
+
70
+ .a-form-field {
71
+ padding-left: toRem(40);
72
+ }
73
+ }
74
+
75
+ // Components list
76
+ .o-pipeline__components {
77
+ @extend %list-unstyled;
78
+ position: relative;
79
+ z-index: 1;
80
+
81
+ li {
82
+ position: relative;
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: space-between;
86
+ min-height: 40px;
87
+ padding: 0 toRem(15);
88
+ border-top-width: 1px;
89
+ border-top-style: solid;
90
+ cursor: grab;
91
+
92
+ // Border left colored
93
+ &:before {
94
+ @include panelBorderLeftColored(var(--border-color));
95
+ }
96
+
97
+ &:hover {
98
+ background-color: white;
99
+ }
100
+
101
+ &:active {
102
+ cursor: grabbing;
103
+ }
104
+
105
+ .a-p {
106
+ margin-bottom: 0;
107
+ }
108
+
109
+ .a-icon {
110
+ transform: scale(2.2);
111
+ }
112
+ }
22
113
  }
23
114
  }
24
115
  }
@@ -0,0 +1,30 @@
1
+ @use '../../styles/abstracts' as *;
2
+ @use '../abstracts-theme/variables.theme' as *;
3
+
4
+ /* Theme organism - Accordion */
5
+
6
+ .o-accordion {
7
+ &__title {
8
+ border-bottom-color: themed($theme-map, 'color', 'primary', 300);
9
+
10
+ &__btn pry-icon {
11
+ color: themed($theme-map, 'color', 'accent', 600);
12
+ }
13
+ }
14
+
15
+ &__panel {
16
+ &[aria-hidden='false'] {
17
+ border-bottom-color: themed($theme-map, 'color', 'primary', 300);
18
+ }
19
+
20
+ .o-pipeline__components {
21
+ li {
22
+ border-top-color: themed($theme-map, 'color', 'primary', 300);
23
+
24
+ .a-icon {
25
+ color: themed($theme-map, 'color', 'primary', 500);
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -16,32 +16,6 @@
16
16
  border-right: 1px solid themed($theme-map, 'color', 'primary', 300);
17
17
  }
18
18
 
19
- .o-accordion {
20
- &__title {
21
- border-bottom-color: themed($theme-map, 'color', 'primary', 300);
22
-
23
- &__btn pry-icon {
24
- color: themed($theme-map, 'color', 'accent', 600);
25
- }
26
- }
27
-
28
- &__panel {
29
- &[aria-hidden='false'] {
30
- border-bottom-color: themed($theme-map, 'color', 'primary', 300);
31
- }
32
-
33
- .o-pipeline__components {
34
- li {
35
- border-top-color: themed($theme-map, 'color', 'primary', 300);
36
-
37
- .a-icon {
38
- color: themed($theme-map, 'color', 'primary', 500);
39
- }
40
- }
41
- }
42
- }
43
- }
44
-
45
19
  .o-pipeline-editor__properties {
46
20
  border-left: 1px solid themed($theme-map, 'color', 'primary', 300);
47
21
 
@@ -34,6 +34,7 @@
34
34
  @use 'components-theme/m-pry-search-select-attribute.theme' as *;
35
35
 
36
36
  /* Organisms */
37
+ @use 'components-theme/o-accordion.theme' as *;
37
38
  @use 'components-theme/o-card.theme' as *;
38
39
  @use 'components-theme/o-catalog.theme' as *;
39
40
  @use 'components-theme/o-dashboard.theme' as *;
@@ -2,24 +2,23 @@ import { Overlay as cdkOverlay } from '@angular/cdk/overlay';
2
2
  import { AfterViewInit, ComponentRef, ElementRef, Injector, TemplateRef, ViewContainerRef } from '@angular/core';
3
3
  import { Store } from '@ngrx/store';
4
4
  import { BaseTooltipComponent, BaseWidgetMapLayerOptions, Class, DataWidgetComponent, Field, GeocodingService, MapFeatureLayerOptions, MapGeoServerLayerOptions, MapRasterTileLayerOptions, MapVectorTileLayerOptions, MapWidgetBubbleLayerOptions, MapWidgetHeatMapLayerOptions, MapWidgetLayerOptions, MapWidgetMarkerLayerOptions, MapWidgetOptions, MapWMSLayerLayerOptions, MapWMTSLayerLayerOptions, PryI18nService, PrySnackbarService, SymbolService, TooltipFactoryService } from '@provoly/dashboard';
5
- import { Map, MapBrowserEvent, Overlay } from 'ol';
6
- import LayerSwitcher from 'ol-layerswitcher';
5
+ import { Map } from 'ol';
7
6
  import { Geometry } from 'ol/geom';
8
7
  import BaseLayer from 'ol/layer/Base';
9
8
  import VectorLayer from 'ol/layer/Vector';
9
+ import VectorTileLayer from 'ol/layer/VectorTile';
10
10
  import { Pixel } from 'ol/pixel';
11
11
  import VectorSource from 'ol/source/Vector';
12
12
  import { Style } from 'ol/style';
13
13
  import { BehaviorSubject, Observable } from 'rxjs';
14
- import { SelectionInteraction } from '../interaction/selection-interaction.class';
15
- import { SearchBarControl } from '../search-bar/search-bar.control';
14
+ import { InteractionManager } from '../interaction/interaction-manager.class';
16
15
  import { WidgetMapLayerService } from './widget-map-layer.service';
17
16
  import * as i0 from "@angular/core";
18
17
  export declare class WidgetMapComponent extends DataWidgetComponent implements AfterViewInit {
19
18
  private snackBar;
20
- private translateService;
19
+ translateService: PryI18nService;
21
20
  private tooltipFactoryService;
22
- private geocodingService;
21
+ geocodingService: GeocodingService;
23
22
  private overlay;
24
23
  private viewContainerRef;
25
24
  private symbolService;
@@ -39,13 +38,9 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
39
38
  selectedIds$: Observable<string[]>;
40
39
  bottomLeft$: Observable<string>;
41
40
  layers$: Observable<BaseLayer[]>;
42
- selectionInteraction: SelectionInteraction;
43
41
  map: Map;
44
- map$: Observable<Map>;
45
42
  additionalLayers$: BehaviorSubject<VectorLayer<VectorSource<Geometry>>[]>;
46
43
  private overlayRef?;
47
- searchBarControl?: SearchBarControl;
48
- layerSwitchControl?: LayerSwitcher;
49
44
  styles$: Observable<{
50
45
  identifier: string;
51
46
  label: string;
@@ -61,7 +56,7 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
61
56
  height$: Observable<number>;
62
57
  actions$: BehaviorSubject<("click" | "lasso" | "rectangle" | "zoom" | "move" | "export" | "upload")[]>;
63
58
  private wmsFeatures$;
64
- private classicFeatures$;
59
+ classicFeatures$: BehaviorSubject<any>;
65
60
  geoServerLayerDescriptions$: Observable<MapGeoServerLayerOptions[]>;
66
61
  legendTabOpen: boolean;
67
62
  legendTab: number;
@@ -78,10 +73,12 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
78
73
  } | undefined;
79
74
  center?: number[] | undefined;
80
75
  }>;
81
- interactionPopupOverlay?: Overlay;
82
- interactionPopupListener?: (event: MapBrowserEvent<MouseEvent>) => void;
83
- interactionPopupMode?: 'singleclick' | 'pointermove';
76
+ fitOption$: Observable<boolean>;
77
+ mapStyle$: Observable<string>;
78
+ interactionManager: InteractionManager;
79
+ mapStyleLayer$: Observable<VectorTileLayer[]>;
84
80
  constructor(store: Store<any>, snackBar: PrySnackbarService, translateService: PryI18nService, tooltipFactoryService: TooltipFactoryService, geocodingService: GeocodingService, overlay: cdkOverlay, viewContainerRef: ViewContainerRef, symbolService: SymbolService, injector: Injector, widgetMapLayerService: WidgetMapLayerService, el: ElementRef);
81
+ initInteractionManager(): InteractionManager;
85
82
  ngAfterViewInit(): void;
86
83
  initResultSet$(): Observable<import("@provoly/dashboard").ResultSet>;
87
84
  generateTooltip(value: {
@@ -90,16 +87,13 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
90
87
  values: any;
91
88
  }): Promise<ComponentRef<BaseTooltipComponent> | null>;
92
89
  setDefaultLayerTitle(layer: MapWidgetLayerOptions, idx: number): void;
93
- fitMapForObjects(options: MapWidgetOptions, selectedIds?: string[]): void;
94
- private addOverlayOnInteraction;
95
- private addContextMenuInteraction;
90
+ fitMapForObjects(fit: boolean, selectedIds?: string[]): void;
96
91
  private getAttributesForDrawing;
97
92
  private getIntensityAttribute;
98
93
  private getLocationAttribute;
99
94
  changeStyle($event: any): void;
100
95
  changeFit($event: boolean): void;
101
96
  changeAttributions($event: boolean): void;
102
- changeTooltipMode($event: 'hover' | 'click'): void;
103
97
  addLayer(): void;
104
98
  changeLayerType($event: any, i: number): void;
105
99
  changeTitle($event: any, layer: MapWidgetLayerOptions): void;
@@ -119,20 +113,15 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
119
113
  export(type: string): void;
120
114
  toImage(): Promise<string>;
121
115
  import(event: Event | DragEvent): void;
122
- private addDropInteraction;
123
116
  changeClustered(layer: MapWidgetMarkerLayerOptions, $event: boolean): void;
124
117
  changeClusterDistance(layer: MapWidgetMarkerLayerOptions, $event: Event): void;
125
- private addScaleControl;
126
- private addSearchBarControl;
127
- private addLayerSwitcher;
128
118
  hideAddress(): void;
129
- private addUpdateZoomAndCenter;
130
119
  changeOpacity(layer: MapWidgetLayerOptions, $event: string): void;
131
120
  displayExportType($event: MouseEvent): void;
132
121
  hideExportType(): void;
133
122
  getWMSLayers(): import("ol/layer/Layer").default<import("ol/source/Source").default, import("ol/renderer/Layer").default<any>>[];
134
123
  isLayerRendered(layer: any): boolean;
135
- private getFeatureFromServer;
124
+ getFeatureFromServer(wmsLayers: any[], pixel: Pixel): void;
136
125
  changeWmsClass($event: any, layer: MapWMSLayerLayerOptions): void;
137
126
  toggleLegend(index: number): void;
138
127
  toggleLegendWindow(): void;
@@ -0,0 +1,27 @@
1
+ import { MapBrowserEvent, Overlay } from 'ol';
2
+ import LayerSwitcher from 'ol-layerswitcher';
3
+ import { ScaleLine } from 'ol/control';
4
+ import { WidgetMapComponent } from '../component/widget-map.component';
5
+ import { SearchBarControl } from '../search-bar/search-bar.control';
6
+ import { SelectionInteraction } from './selection-interaction.class';
7
+ export declare class InteractionManager {
8
+ interactionPopupOverlay?: Overlay;
9
+ private component;
10
+ searchBarControl?: SearchBarControl;
11
+ layerSwitchControl?: LayerSwitcher;
12
+ scaleControl?: ScaleLine;
13
+ selectionInteraction: SelectionInteraction;
14
+ init(component: WidgetMapComponent): this;
15
+ listeners: {
16
+ contextMenu: (e: MouseEvent) => void;
17
+ drop: (e: DragEvent) => void;
18
+ popup: (event: MapBrowserEvent<MouseEvent>) => void;
19
+ };
20
+ private addContextMenuInteraction;
21
+ private addDropInteraction;
22
+ private addOverlayOnInteraction;
23
+ private addScaleControl;
24
+ private addSearchBarControl;
25
+ private addLayerSwitcher;
26
+ private addUpdateZoomAndCenter;
27
+ }
@@ -3,4 +3,6 @@ export * from './component/widget-map.component';
3
3
  export * from './component/widget-map-layer.service';
4
4
  export * from './pipe/widget-map-geometry-fields-for.pipe';
5
5
  export * from './pipe/widget-map-legend-url.pipe';
6
+ export * from './interaction/interaction-manager.class';
7
+ export * from './interaction/selection-interaction.class';
6
8
  export * from './utils/widget-map.utils';