@artstesh/maps 6.1.1 → 6.1.3

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 (35) hide show
  1. package/dist/esm2022/map/map-plate/features/polygons/polygons.component.mjs +6 -2
  2. package/dist/esm2022/map/map-plate/layers/feature-layer/feature-layer.settings.mjs +28 -1
  3. package/dist/esm2022/map/map-plate/map-plate.component.mjs +5 -1
  4. package/dist/esm2022/map/messages/events/map-feature-hovered.event.mjs +23 -0
  5. package/dist/esm2022/map/messages/events/map-pointer-move.event.mjs +21 -0
  6. package/dist/esm2022/map/messages/index.mjs +3 -1
  7. package/dist/esm2022/map/models/map.constants.mjs +2 -1
  8. package/dist/esm2022/map/services/map-feature.service.mjs +22 -2
  9. package/dist/esm2022/map/services/message-registrator.service.mjs +7 -2
  10. package/dist/esm2022/src/map/map-plate/features/polygons/polygons.component.mjs +6 -2
  11. package/dist/esm2022/src/map/map-plate/layers/feature-layer/feature-layer.settings.mjs +28 -1
  12. package/dist/esm2022/src/map/map-plate/map-plate.component.mjs +5 -1
  13. package/dist/esm2022/src/map/messages/events/map-feature-hovered.event.mjs +23 -0
  14. package/dist/esm2022/src/map/messages/events/map-pointer-move.event.mjs +21 -0
  15. package/dist/esm2022/src/map/messages/index.mjs +3 -1
  16. package/dist/esm2022/src/map/models/map.constants.mjs +2 -1
  17. package/dist/esm2022/src/map/services/map-feature.service.mjs +22 -2
  18. package/dist/esm2022/src/map/services/message-registrator.service.mjs +7 -2
  19. package/dist/fesm2022/maps-components-src-map.mjs +99 -4
  20. package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
  21. package/dist/fesm2022/maps-components.mjs +99 -4
  22. package/dist/fesm2022/maps-components.mjs.map +1 -1
  23. package/dist/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +22 -0
  24. package/dist/map/messages/events/map-feature-hovered.event.d.ts +19 -0
  25. package/dist/map/messages/events/map-pointer-move.event.d.ts +17 -0
  26. package/dist/map/messages/index.d.ts +2 -0
  27. package/dist/map/models/map.constants.d.ts +1 -0
  28. package/dist/map/services/map-feature.service.d.ts +1 -0
  29. package/dist/src/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +22 -0
  30. package/dist/src/map/messages/events/map-feature-hovered.event.d.ts +19 -0
  31. package/dist/src/map/messages/events/map-pointer-move.event.d.ts +17 -0
  32. package/dist/src/map/messages/index.d.ts +2 -0
  33. package/dist/src/map/models/map.constants.d.ts +1 -0
  34. package/dist/src/map/services/map-feature.service.d.ts +1 -0
  35. package/package.json +1 -1
@@ -28,6 +28,21 @@ export declare class FeatureLayerSettings {
28
28
  * The styling definition of layer's features. The easiest way is to use {@link PolygonStyleHelper},{@link MarkerStyleHelper}
29
29
  */
30
30
  style?: Style | StyleFunction;
31
+ /**
32
+ * Defines the style applied to a feature when it is hovered over.
33
+ *
34
+ * This property can accept either a static style object or a dynamic style function.
35
+ * When a `StyleFunction` is provided, it will determine the style dynamically
36
+ * based on the feature being hovered.
37
+ *
38
+ * The style is applied temporarily, specifically for the hovered feature,
39
+ * and overrides any default or predefined styles for that feature.
40
+ *
41
+ * Optional property.
42
+ *
43
+ * @type {(Style | StyleFunction)}
44
+ */
45
+ featureHoverStyle?: Style | StyleFunction;
31
46
  /**
32
47
  * Copies the given FeatureLayerSettings object
33
48
  *
@@ -71,6 +86,13 @@ export declare class FeatureLayerSettings {
71
86
  * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new style.
72
87
  */
73
88
  setStyle(style: Style | StyleFunction): FeatureLayerSettings;
89
+ /**
90
+ * Sets the style to apply to features when they are hovered over.
91
+ *
92
+ * @param {Style | StyleFunction} featureHoverStyle - The style or style function to use for hovered features.
93
+ * @return {FeatureLayerSettings} A new instance of FeatureLayerSettings with the updated hover style.
94
+ */
95
+ setFeatureHoverStyle(featureHoverStyle: Style | StyleFunction): FeatureLayerSettings;
74
96
  /**
75
97
  * Checks if the given FeatureLayerSettings object is identical to the current object.
76
98
  *
@@ -0,0 +1,19 @@
1
+ import { PostboyGenericMessage } from '@artstesh/postboy';
2
+ import { Feature } from 'ol';
3
+ /**
4
+ * Represents an event triggered when a map feature is hovered over.
5
+ * This event contains information about the hovered feature and its associated layer.
6
+ * Extends the PostboyGenericMessage class.
7
+ */
8
+ export declare class MapFeatureHoveredEvent extends PostboyGenericMessage {
9
+ feature: Feature | null;
10
+ layer: string | null;
11
+ static readonly ID = "eb9b032a-1616-4823-a628-0fd8ffc3b57a";
12
+ /**
13
+ * Constructs an instance of the class.
14
+ *
15
+ * @param {Feature|null} feature - The feature associated with this instance. Can be null.
16
+ * @param {string|null} layer - The layer associated with this instance. Can be null.
17
+ */
18
+ constructor(feature: Feature | null, layer: string | null);
19
+ }
@@ -0,0 +1,17 @@
1
+ import { PostboyGenericMessage } from '@artstesh/postboy';
2
+ /**
3
+ * Represents an event that is triggered when the pointer moves on a map.
4
+ * This class extends PostboyGenericMessage.
5
+ *
6
+ * It contains information about the coordinates of the pointer when the event occurs.
7
+ */
8
+ export declare class MapPointerMoveEvent extends PostboyGenericMessage {
9
+ point: Array<number>;
10
+ static readonly ID = "193cb41d-2489-45cc-b349-59c3ec18ed72";
11
+ /**
12
+ * Constructor for initializing an instance with a given point.
13
+ *
14
+ * @param {Array<number>} point - An array representing the coordinates of the point.
15
+ */
16
+ constructor(point: Array<number>);
17
+ }
@@ -11,6 +11,8 @@ export * from './commands/fit-to-polygons.command';
11
11
  export * from './events/map-rendered.event';
12
12
  export * from './events/map-click.event';
13
13
  export * from './events/map-move-end.event';
14
+ export * from './events/map-pointer-move.event';
15
+ export * from './events/map-feature-hovered.event';
14
16
  export * from './executors/filter-features-in-point.executor';
15
17
  export * from './executors/filter-features-in-area.executor';
16
18
  export * from './executors/calculate-area.executor';
@@ -1,4 +1,5 @@
1
1
  export declare class MapConstants {
2
2
  static FeatureInfo: string;
3
3
  static DrawingLayerId: string;
4
+ static FeatureLayerName: string;
4
5
  }
@@ -8,6 +8,7 @@ export declare class MapFeatureService implements IPostboyDependingService {
8
8
  constructor(postboy: MapPostboyService);
9
9
  up(): void;
10
10
  private observeMapRender;
11
+ private observePointerMove;
11
12
  private observeFitToFeatures;
12
13
  private observeFitToPolygons;
13
14
  private fitToGeometries;
@@ -28,6 +28,21 @@ export declare class FeatureLayerSettings {
28
28
  * The styling definition of layer's features. The easiest way is to use {@link PolygonStyleHelper},{@link MarkerStyleHelper}
29
29
  */
30
30
  style?: Style | StyleFunction;
31
+ /**
32
+ * Defines the style applied to a feature when it is hovered over.
33
+ *
34
+ * This property can accept either a static style object or a dynamic style function.
35
+ * When a `StyleFunction` is provided, it will determine the style dynamically
36
+ * based on the feature being hovered.
37
+ *
38
+ * The style is applied temporarily, specifically for the hovered feature,
39
+ * and overrides any default or predefined styles for that feature.
40
+ *
41
+ * Optional property.
42
+ *
43
+ * @type {(Style | StyleFunction)}
44
+ */
45
+ featureHoverStyle?: Style | StyleFunction;
31
46
  /**
32
47
  * Copies the given FeatureLayerSettings object
33
48
  *
@@ -71,6 +86,13 @@ export declare class FeatureLayerSettings {
71
86
  * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new style.
72
87
  */
73
88
  setStyle(style: Style | StyleFunction): FeatureLayerSettings;
89
+ /**
90
+ * Sets the style to apply to features when they are hovered over.
91
+ *
92
+ * @param {Style | StyleFunction} featureHoverStyle - The style or style function to use for hovered features.
93
+ * @return {FeatureLayerSettings} A new instance of FeatureLayerSettings with the updated hover style.
94
+ */
95
+ setFeatureHoverStyle(featureHoverStyle: Style | StyleFunction): FeatureLayerSettings;
74
96
  /**
75
97
  * Checks if the given FeatureLayerSettings object is identical to the current object.
76
98
  *
@@ -0,0 +1,19 @@
1
+ import { PostboyGenericMessage } from '@artstesh/postboy';
2
+ import { Feature } from 'ol';
3
+ /**
4
+ * Represents an event triggered when a map feature is hovered over.
5
+ * This event contains information about the hovered feature and its associated layer.
6
+ * Extends the PostboyGenericMessage class.
7
+ */
8
+ export declare class MapFeatureHoveredEvent extends PostboyGenericMessage {
9
+ feature: Feature | null;
10
+ layer: string | null;
11
+ static readonly ID = "eb9b032a-1616-4823-a628-0fd8ffc3b57a";
12
+ /**
13
+ * Constructs an instance of the class.
14
+ *
15
+ * @param {Feature|null} feature - The feature associated with this instance. Can be null.
16
+ * @param {string|null} layer - The layer associated with this instance. Can be null.
17
+ */
18
+ constructor(feature: Feature | null, layer: string | null);
19
+ }
@@ -0,0 +1,17 @@
1
+ import { PostboyGenericMessage } from '@artstesh/postboy';
2
+ /**
3
+ * Represents an event that is triggered when the pointer moves on a map.
4
+ * This class extends PostboyGenericMessage.
5
+ *
6
+ * It contains information about the coordinates of the pointer when the event occurs.
7
+ */
8
+ export declare class MapPointerMoveEvent extends PostboyGenericMessage {
9
+ point: Array<number>;
10
+ static readonly ID = "193cb41d-2489-45cc-b349-59c3ec18ed72";
11
+ /**
12
+ * Constructor for initializing an instance with a given point.
13
+ *
14
+ * @param {Array<number>} point - An array representing the coordinates of the point.
15
+ */
16
+ constructor(point: Array<number>);
17
+ }
@@ -11,6 +11,8 @@ export * from './commands/fit-to-polygons.command';
11
11
  export * from './events/map-rendered.event';
12
12
  export * from './events/map-click.event';
13
13
  export * from './events/map-move-end.event';
14
+ export * from './events/map-pointer-move.event';
15
+ export * from './events/map-feature-hovered.event';
14
16
  export * from './executors/filter-features-in-point.executor';
15
17
  export * from './executors/filter-features-in-area.executor';
16
18
  export * from './executors/calculate-area.executor';
@@ -1,4 +1,5 @@
1
1
  export declare class MapConstants {
2
2
  static FeatureInfo: string;
3
3
  static DrawingLayerId: string;
4
+ static FeatureLayerName: string;
4
5
  }
@@ -8,6 +8,7 @@ export declare class MapFeatureService implements IPostboyDependingService {
8
8
  constructor(postboy: MapPostboyService);
9
9
  up(): void;
10
10
  private observeMapRender;
11
+ private observePointerMove;
11
12
  private observeFitToFeatures;
12
13
  private observeFitToPolygons;
13
14
  private fitToGeometries;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artstesh/maps",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
4
4
  "author": "artstesh",
5
5
  "license": "MIT",
6
6
  "description": "Let's draw a map ;)",