@smartbit4all/ng-client 4.2.29 → 4.2.31

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 (39) hide show
  1. package/esm2022/lib/smart-map/abstract-map.mjs +43 -5
  2. package/esm2022/lib/smart-map/api/model/gPSRoute.mjs +2 -0
  3. package/esm2022/lib/smart-map/api/model/geoMapChange.mjs +1 -1
  4. package/esm2022/lib/smart-map/api/model/geoMapDataSourceDescriptor.mjs +1 -1
  5. package/esm2022/lib/smart-map/api/model/geoMapDataSourceType.mjs +2 -1
  6. package/esm2022/lib/smart-map/api/model/geoMapEditingSession.mjs +2 -0
  7. package/esm2022/lib/smart-map/api/model/geoMapInteraction.mjs +1 -1
  8. package/esm2022/lib/smart-map/api/model/geoMapItem.mjs +1 -1
  9. package/esm2022/lib/smart-map/api/model/geoMapModel.mjs +1 -1
  10. package/esm2022/lib/smart-map/api/model/geoMapOperationMode.mjs +1 -2
  11. package/esm2022/lib/smart-map/api/model/geoMapServerModel.mjs +1 -1
  12. package/esm2022/lib/smart-map/api/model/geoMapViewState.mjs +1 -1
  13. package/esm2022/lib/smart-map/api/model/models.mjs +3 -1
  14. package/esm2022/lib/smart-map/impl/google-map.mjs +6 -5
  15. package/esm2022/lib/smart-map/impl/leaflet-map.mjs +113 -14
  16. package/esm2022/lib/smart-map/smart-map.component.mjs +72 -47
  17. package/esm2022/lib/smart-map/smart-map.types.mjs +1 -1
  18. package/fesm2022/smartbit4all-ng-client.mjs +230 -67
  19. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  20. package/lib/smart-map/abstract-map.d.ts +9 -5
  21. package/lib/smart-map/api/model/gPSRoute.d.ts +21 -0
  22. package/lib/smart-map/api/model/geoMapChange.d.ts +2 -0
  23. package/lib/smart-map/api/model/geoMapDataSourceDescriptor.d.ts +2 -0
  24. package/lib/smart-map/api/model/geoMapDataSourceType.d.ts +2 -1
  25. package/lib/smart-map/api/model/geoMapEditingSession.d.ts +17 -0
  26. package/lib/smart-map/api/model/geoMapInteraction.d.ts +2 -0
  27. package/lib/smart-map/api/model/geoMapItem.d.ts +2 -1
  28. package/lib/smart-map/api/model/geoMapModel.d.ts +0 -1
  29. package/lib/smart-map/api/model/geoMapOperationMode.d.ts +1 -2
  30. package/lib/smart-map/api/model/geoMapServerModel.d.ts +0 -3
  31. package/lib/smart-map/api/model/geoMapViewState.d.ts +2 -0
  32. package/lib/smart-map/api/model/models.d.ts +2 -0
  33. package/lib/smart-map/impl/google-map.d.ts +1 -0
  34. package/lib/smart-map/impl/leaflet-map.d.ts +2 -0
  35. package/lib/smart-map/smart-map.component.d.ts +5 -1
  36. package/lib/smart-map/smart-map.types.d.ts +13 -0
  37. package/package.json +1 -1
  38. package/smartbit4all-ng-client-4.2.31.tgz +0 -0
  39. package/smartbit4all-ng-client-4.2.29.tgz +0 -0
@@ -1,12 +1,12 @@
1
1
  import { ChangeDetectorRef, EffectRef, ElementRef, EventEmitter, NgZone, Signal } from '@angular/core';
2
- import { GeoMapItem, GeoMapModel, GeoMapOperationMode } from './api';
3
- import { MapClickedEvent, MapDraggedEvent, MapItemClickedEvent, MapZoomChangedEvent } from './smart-map.types';
2
+ import { GeoMapEditingSession, GeoMapItem, GeoMapModel, GeoMapOperationMode } from './api';
3
+ import { MapClickedEvent, MapDraggedEvent, MapEditingItemClickedEvent, MapEditingItemDraggedEvent, MapItemClickedEvent, MapItemConfiguration, MapZoomChangedEvent } from './smart-map.types';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface RecordWithId {
6
6
  id: string;
7
7
  record: any;
8
8
  }
9
- export type GeoMapItemFactory = (it: GeoMapItem) => any;
9
+ export type GeoMapItemFactory = (it: GeoMapItem, config: MapItemConfiguration) => any;
10
10
  export declare abstract class AbstractMap {
11
11
  el: ElementRef;
12
12
  cd: ChangeDetectorRef;
@@ -14,19 +14,23 @@ export declare abstract class AbstractMap {
14
14
  protected itemFactory: GeoMapItemFactory;
15
15
  readonly model: import("@angular/core").InputSignal<GeoMapModel>;
16
16
  readonly items: import("@angular/core").InputSignal<GeoMapItem[]>;
17
+ readonly editingSession: import("@angular/core").InputSignal<GeoMapEditingSession | undefined>;
17
18
  onMapClick: EventEmitter<MapClickedEvent>;
18
19
  onOverlayClick: EventEmitter<MapItemClickedEvent>;
19
20
  onMapDragEnd: EventEmitter<MapDraggedEvent>;
20
21
  onZoomChanged: EventEmitter<MapZoomChangedEvent>;
22
+ onEditingOverlayClick: EventEmitter<MapEditingItemClickedEvent>;
23
+ onEditingOverlayDrag: EventEmitter<MapEditingItemDraggedEvent>;
21
24
  selection: Signal<Array<string>>;
22
- pending: Signal<Array<string>>;
23
25
  operationMode: Signal<GeoMapOperationMode>;
24
26
  protected readonly overlays: Map<string, any>;
27
+ protected readonly editingOverlays: Map<string, any>;
25
28
  protected readonly onItemsChanged: EffectRef;
26
29
  map: any;
27
30
  protected constructor(el: ElementRef, cd: ChangeDetectorRef, zone: NgZone, itemFactory: GeoMapItemFactory);
28
31
  private initChangeEffect;
29
32
  abstract handleItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
33
+ abstract handleEditingItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
30
34
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractMap, never>;
31
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractMap, never, never, { "model": { "alias": "model"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; }, { "onMapClick": "onMapClick"; "onOverlayClick": "onOverlayClick"; "onMapDragEnd": "onMapDragEnd"; "onZoomChanged": "onZoomChanged"; }, never, never, false, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractMap, never, never, { "model": { "alias": "model"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; "editingSession": { "alias": "editingSession"; "required": false; "isSignal": true; }; }, { "onMapClick": "onMapClick"; "onOverlayClick": "onOverlayClick"; "onMapDragEnd": "onMapDragEnd"; "onZoomChanged": "onZoomChanged"; "onEditingOverlayClick": "onEditingOverlayClick"; "onEditingOverlayDrag": "onEditingOverlayDrag"; }, never, never, false, never>;
32
36
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * GeoMap api
3
+ * The geomap api is resposible for the geomap components that shows a list of item.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { GPSPosition } from './gPSPosition';
13
+ /**
14
+ * An ordered list of GPSpositions defines a route on the surface of earth..
15
+ */
16
+ export interface GPSRoute {
17
+ /**
18
+ * The ordered list of gps positions defining the route. The first point is necessarily the 0 distance from the start of the route.
19
+ */
20
+ points: Array<GPSPosition>;
21
+ }
@@ -10,10 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { GeoMapLayerChange } from './geoMapLayerChange';
13
+ import { GeoMapEditingSession } from './geoMapEditingSession';
13
14
  /**
14
15
  * This object containt the page information of the content. The currently seen row range, the total row cont and other options.
15
16
  */
16
17
  export interface GeoMapChange {
17
18
  code?: string;
18
19
  items: Array<GeoMapLayerChange>;
20
+ editingSession?: GeoMapEditingSession;
19
21
  }
@@ -14,6 +14,7 @@ import { InvocationRequest } from '../../api-default/api-default';
14
14
  import { StoredCollectionDescriptor } from '../../api-default/api-default';
15
15
  import { GeoMapDataSourceType } from './geoMapDataSourceType';
16
16
  import { FilterExpressionList } from '../../../smart-filter/api/filter/model/filterExpressionList';
17
+ import { GeoMapItem } from './geoMapItem';
17
18
  import { GeoMapItemKind } from './geoMapItemKind';
18
19
  export interface GeoMapDataSourceDescriptor {
19
20
  /**
@@ -47,4 +48,5 @@ export interface GeoMapDataSourceDescriptor {
47
48
  * GeoMapViewport -> List<GeoMapItem>
48
49
  */
49
50
  invocationRequest?: InvocationRequest;
51
+ inlineItems?: Array<GeoMapItem>;
50
52
  }
@@ -12,5 +12,6 @@
12
12
  export declare enum GeoMapDataSourceType {
13
13
  STORED_COLLECTION = "STORED_COLLECTION",
14
14
  SEARCH_INDEX = "SEARCH_INDEX",
15
- INVOCATION_REQUEST = "INVOCATION_REQUEST"
15
+ INVOCATION_REQUEST = "INVOCATION_REQUEST",
16
+ INLINE = "INLINE"
16
17
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * GeoMap api
3
+ * The geomap api is resposible for the geomap components that shows a list of item.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { GeoMapItem } from './geoMapItem';
13
+ export interface GeoMapEditingSession {
14
+ pendingItems?: {
15
+ [key: string]: Array<GeoMapItem>;
16
+ };
17
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { GeoMapOperationMode } from './geoMapOperationMode';
13
+ import { GeoMapEditingSession } from './geoMapEditingSession';
13
14
  import { GeoMapItem } from './geoMapItem';
14
15
  export interface GeoMapInteraction {
15
16
  operationMode: GeoMapOperationMode;
@@ -19,4 +20,5 @@ export interface GeoMapInteraction {
19
20
  * Marks inverse operations (unselect, remove pending placement)
20
21
  */
21
22
  inverse: boolean;
23
+ editingSession?: GeoMapEditingSession;
22
24
  }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { GPSRoute } from './gPSRoute';
12
13
  import { ImageResource } from '../../../view-context/api/model/imageResource';
13
14
  import { Style } from '../../../view-context/api/model/style';
14
15
  import { UiAction } from '../../../view-context/api/model/uiAction';
@@ -34,5 +35,5 @@ export interface GeoMapItem {
34
35
  */
35
36
  style?: Style;
36
37
  position?: GPSPosition;
37
- bounds: Array<GPSPosition>;
38
+ route?: GPSRoute;
38
39
  }
@@ -23,5 +23,4 @@ export interface GeoMapModel {
23
23
  viewState?: GeoMapViewState;
24
24
  viewport?: GeoMapViewport;
25
25
  defaultItemActions: Array<string>;
26
- pendingItems: Array<string>;
27
26
  }
@@ -11,6 +11,5 @@
11
11
  */
12
12
  export declare enum GeoMapOperationMode {
13
13
  ACTION = "ACTION",
14
- SELECTION = "SELECTION",
15
- PLACEMENT = "PLACEMENT"
14
+ SELECTION = "SELECTION"
16
15
  }
@@ -22,7 +22,4 @@ export interface GeoMapServerModel {
22
22
  dataSources: {
23
23
  [key: string]: GeoMapDataSourceDescriptor;
24
24
  };
25
- pendingItems: {
26
- [key: string]: Array<GeoMapItem>;
27
- };
28
25
  }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { GeoMapLayerDescriptor } from './geoMapLayerDescriptor';
13
13
  import { GeoMapOperationMode } from './geoMapOperationMode';
14
+ import { GeoMapEditingSession } from './geoMapEditingSession';
14
15
  /**
15
16
  * What to show and how...
16
17
  */
@@ -22,4 +23,5 @@ export interface GeoMapViewState {
22
23
  centerOnItemClick: boolean;
23
24
  operationMode?: GeoMapOperationMode;
24
25
  selectedItems: Array<string>;
26
+ editingSession?: GeoMapEditingSession;
25
27
  }
@@ -1,8 +1,10 @@
1
1
  export * from './gPSPosition';
2
+ export * from './gPSRoute';
2
3
  export * from './geoMapChange';
3
4
  export * from './geoMapDataLoadingMode';
4
5
  export * from './geoMapDataSourceDescriptor';
5
6
  export * from './geoMapDataSourceType';
7
+ export * from './geoMapEditingSession';
6
8
  export * from './geoMapInteraction';
7
9
  export * from './geoMapItem';
8
10
  export * from './geoMapItemKind';
@@ -14,6 +14,7 @@ export declare class GoogleMap extends AbstractMap implements AfterViewChecked {
14
14
  private initialize;
15
15
  private createGoogleMapsOptions;
16
16
  handleItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
17
+ handleEditingItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
17
18
  bindDragEvents(overlay: any): void;
18
19
  getMap(): any;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<GoogleMap, never>;
@@ -3,12 +3,14 @@ import { AbstractMap, RecordWithId } from '../abstract-map';
3
3
  import { GeoMapViewport } from '../api';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class LeafletMap extends AbstractMap implements AfterViewChecked {
6
+ originalLatLng: any;
6
7
  constructor(el: ElementRef, cd: ChangeDetectorRef, zone: NgZone);
7
8
  ngAfterViewChecked(): void;
8
9
  private initialize;
9
10
  getViewport(): GeoMapViewport;
10
11
  private createLeafletMapOptions;
11
12
  handleItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
13
+ handleEditingItemChanges(toRemove: Array<RecordWithId>, toAdd: Array<RecordWithId>): void;
12
14
  private findDatasetBounds;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<LeafletMap, never>;
14
16
  static ɵcmp: i0.ɵɵComponentDeclaration<LeafletMap, "leaflet-map", never, {}, {}, never, never, false, never>;
@@ -1,6 +1,7 @@
1
1
  import { AfterViewInit, InjectionToken, OnInit, Signal, WritableSignal } from '@angular/core';
2
- import { GeoMapItem, GeoMapModel, GeoMapService, GeoMapViewport, GeoMapViewState, GPSPosition } from './api';
2
+ import { GeoMapEditingSession, GeoMapItem, GeoMapModel, GeoMapService, GeoMapViewport, GeoMapViewState, GPSPosition } from './api';
3
3
  import { SmartViewContextService } from '../view-context/smart-view-context.service';
4
+ import { MapEditingItemClickedEvent, MapEditingItemDraggedEvent } from './smart-map.types';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare enum MapEngine {
6
7
  GOOGLE = "GOOGLE",
@@ -16,6 +17,7 @@ export declare class SmartMapComponent implements OnInit, AfterViewInit {
16
17
  parent?: any;
17
18
  readonly model: WritableSignal<GeoMapModel | undefined>;
18
19
  readonly items: Signal<Array<GeoMapItem>>;
20
+ readonly editingSession: Signal<GeoMapEditingSession | undefined>;
19
21
  readonly selection: Signal<Set<string>>;
20
22
  viewContextService?: SmartViewContextService;
21
23
  constructor(mapEngine: MapEngine, api: GeoMapService);
@@ -27,6 +29,8 @@ export declare class SmartMapComponent implements OnInit, AfterViewInit {
27
29
  private handleChange;
28
30
  handleMapClick(position: GPSPosition): void;
29
31
  handleItemClick(id: string): void;
32
+ handleEditingItemClick(id: string, event: MapEditingItemClickedEvent): void;
33
+ handleEditingItemDrag(id: string, event: MapEditingItemDraggedEvent): void;
30
34
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartMapComponent, never>;
31
35
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartMapComponent, "smart-map", never, { "uuid": { "alias": "uuid"; "required": false; }; "identifier": { "alias": "identifier"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; }, {}, never, never, false, never>;
32
36
  }
@@ -11,10 +11,23 @@ export type MapItemClickedEvent = {
11
11
  itemId: string;
12
12
  originalEvent: any;
13
13
  };
14
+ export type MapEditingItemClickedEvent = {
15
+ itemId: string;
16
+ coord: Coord;
17
+ };
18
+ export type MapEditingItemDraggedEvent = {
19
+ itemId: string;
20
+ startPosition?: Coord;
21
+ dragTo: Coord;
22
+ };
14
23
  export type MapClickedEvent = {
15
24
  coordinates: GPSPosition;
16
25
  originalEvent: any;
17
26
  };
27
+ export type MapItemConfiguration = {
28
+ color: string;
29
+ draggable: boolean;
30
+ };
18
31
  export interface Coord {
19
32
  x: number;
20
33
  y: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "4.2.29",
3
+ "version": "4.2.31",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
6
6
  "@angular/common": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
Binary file