adb-shared 22.0.0-beta.3 → 22.0.0-beta.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adb-shared",
3
- "version": "22.0.0-beta.3",
3
+ "version": "22.0.0-beta.4",
4
4
  "author": "ADB",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">= 22.x",
@@ -5,9 +5,9 @@ import { Extent } from "ol/extent.js";
5
5
  import Map from "ol/Map.js";
6
6
  import * as i11 from "@angular/router";
7
7
  import { ActivatedRoute, ParamMap, Params, Router } from "@angular/router";
8
+ import { Observable, Subscription } from "rxjs";
8
9
  import * as i10 from "@angular/forms";
9
10
  import { ControlValueAccessor, FormArray, FormControl, FormGroup } from "@angular/forms";
10
- import { Observable, Subscription } from "rxjs";
11
11
  import { HttpClient } from "@angular/common/http";
12
12
  import * as i8 from "@angular/common";
13
13
  import * as i9 from "adb-shared";
@@ -15,6 +15,7 @@ import * as i12 from "@ngx-translate/core";
15
15
  import { FitOptions } from "ol/View.js";
16
16
  import TileLayer from "ol/layer/Tile.js";
17
17
  import TileWMS from "ol/source/TileWMS.js";
18
+ import XYZ from "ol/source/XYZ.js";
18
19
  import CircleGeometry from "ol/geom/Circle.js";
19
20
  import { Style } from "ol/style.js";
20
21
  export interface AdbMapConfig {
@@ -180,18 +181,50 @@ declare class MapLegendComponent {
180
181
  };
181
182
  }, {}, never, never, false, never>;
182
183
  }
184
+ export interface AdbMapRequest {
185
+ url: string;
186
+ params: Params;
187
+ metersPerPixel: number;
188
+ dataProviderIds?: readonly number[];
189
+ }
190
+ export interface AdbMapDataSource {
191
+ load(request: AdbMapRequest): Observable<GeoJson>;
192
+ }
193
+ /** Default transport for the shared BFF observation-features contract. */
194
+ export declare class AdbBffMapDataSource implements AdbMapDataSource {
195
+ private readonly http;
196
+ load(request: AdbMapRequest): Observable<GeoJson>;
197
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdbBffMapDataSource, never>;
198
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
199
+ }
200
+ /** Applications normally use the default BFF source without overriding this token. */
201
+ export declare const ADB_MAP_DATA_SOURCE: InjectionToken<AdbMapDataSource>;
202
+ export type MapHeaderButton = 'layers' | 'export' | 'settings';
183
203
  export type MapPresentationMode = 'locations' | 'observations';
184
204
  export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
185
205
  private activatedRoute;
186
206
  private config;
187
207
  private router;
208
+ private readonly dataSource;
188
209
  showLegend: import("@angular/core").InputSignal<boolean>;
189
- showHeader: import("@angular/core").InputSignal<boolean>;
210
+ headerButtons: import("@angular/core").InputSignal<readonly MapHeaderButton[]>;
211
+ showLayersButton: import("@angular/core").Signal<boolean>;
212
+ showExportButton: import("@angular/core").Signal<boolean>;
213
+ showSettingsButton: import("@angular/core").Signal<boolean>;
214
+ providerLayers: import("@angular/core").WritableSignal<{
215
+ backgrounds: {
216
+ name: string;
217
+ layer: import("ol/layer/Tile").default<import("ol/source").TileWMS> | import("ol/layer/Tile").default<import("ol/source").XYZ>;
218
+ }[];
219
+ overlays: {
220
+ name: string;
221
+ layer: import("ol/layer/Tile").default<import("ol/source").TileWMS>;
222
+ }[];
223
+ }>;
190
224
  allowPresentationMode: import("@angular/core").InputSignal<boolean>;
191
225
  presentationMode: import("@angular/core").InputSignal<MapPresentationMode>;
192
226
  private route;
193
227
  activePresentationMode: import("@angular/core").Signal<any>;
194
- private readonly dataSource;
195
228
  private requestedParams;
196
229
  settingsOpen: import("@angular/core").WritableSignal<boolean>;
197
230
  savingSettings: import("@angular/core").WritableSignal<boolean>;
@@ -229,8 +262,9 @@ export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
229
262
  map: Map;
230
263
  private mapReady;
231
264
  queryParams: Params;
232
- constructor(activatedRoute: ActivatedRoute, config: AdbMapConfigService, router: Router);
265
+ constructor(activatedRoute: ActivatedRoute, config: AdbMapConfigService, router: Router, dataSource: AdbMapDataSource);
233
266
  ngAfterViewInit(): void;
267
+ selectBackground(index: number): void;
234
268
  openSettings(): void;
235
269
  cancelSettings(button: HTMLButtonElement): void;
236
270
  saveSettings(button: HTMLButtonElement): Promise<void>;
@@ -255,8 +289,8 @@ export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
255
289
  "required": false;
256
290
  "isSignal": true;
257
291
  };
258
- "showHeader": {
259
- "alias": "showHeader";
292
+ "headerButtons": {
293
+ "alias": "headerButtons";
260
294
  "required": false;
261
295
  "isSignal": true;
262
296
  };
@@ -407,7 +441,7 @@ interface ListItem {
407
441
  export declare class AdbMapModule {
408
442
  static forRoot(config?: AdbMapConfig): ModuleWithProviders<AdbMapModule>;
409
443
  static ɵfac: i0.ɵɵFactoryDeclaration<AdbMapModule, never>;
410
- static ɵmod: i0.ɵɵNgModuleDeclaration<AdbMapModule, [typeof AdbLocationMapComponent, typeof MapFeaturePickerComponent, typeof MapLegendComponent, typeof AdbMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters, typeof TreeviewComponent], [typeof i8.CommonModule, typeof i9.AdbButtonsModule, typeof i9.AdbDirectivesModule, typeof i10.FormsModule, typeof i11.RouterModule, typeof i10.ReactiveFormsModule, typeof i9.AdbDatePickerModule, typeof i9.AdbPipesModule, typeof i9.AdbFilterSectionModule, typeof i9.AdbPickerModule, typeof i12.TranslatePipe], [typeof AdbLocationMapComponent, typeof AdbMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters]>;
444
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AdbMapModule, [typeof AdbLocationMapComponent, typeof MapFeaturePickerComponent, typeof MapLegendComponent, typeof AdbMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters, typeof TreeviewComponent], [typeof i8.CommonModule, typeof i9.AdbButtonsModule, typeof i9.AdbDirectivesModule, typeof i9.AdbDropdownModule, typeof i10.FormsModule, typeof i11.RouterModule, typeof i10.ReactiveFormsModule, typeof i9.AdbDatePickerModule, typeof i9.AdbPipesModule, typeof i9.AdbFilterSectionModule, typeof i9.AdbPickerModule, typeof i12.TranslatePipe], [typeof AdbLocationMapComponent, typeof AdbMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters]>;
411
445
  static ɵinj: i0.ɵɵInjectorDeclaration<AdbMapModule>;
412
446
  }
413
447
  export declare class AdbMapUtils {
@@ -424,6 +458,7 @@ export declare class AdbMapUtils {
424
458
  };
425
459
  static Providers: MapProvider[];
426
460
  static fitExtentIfReady(map: Map, extent: Extent | null | undefined, options: FitOptions): boolean;
461
+ static isCluster(properties: Record<string, unknown>): boolean;
427
462
  static locationSymbol(feature: FeatureLike, selected?: boolean, hovered?: boolean): Style;
428
463
  static isNotRecovered(presentation: any): boolean;
429
464
  static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType?: string): Style | Style[];
@@ -440,6 +475,16 @@ export declare class AdbMapUtils {
440
475
  static getMetersPerPixel(bbox: string, mapWidth: number): number;
441
476
  private static wms;
442
477
  static createMap(elementId: string, options?: MapOptions): Map;
478
+ static addProviderLayers(map: Map): {
479
+ backgrounds: {
480
+ name: string;
481
+ layer: TileLayer<TileWMS> | TileLayer<XYZ>;
482
+ }[];
483
+ overlays: {
484
+ name: string;
485
+ layer: TileLayer<TileWMS>;
486
+ }[];
487
+ };
443
488
  private static addProviders;
444
489
  static createFile(source: Blob, fileName?: string): boolean;
445
490
  }
@@ -452,22 +497,4 @@ interface MapProvider {
452
497
  wms: boolean;
453
498
  params?: any;
454
499
  }
455
- export interface AdbMapRequest {
456
- url: string;
457
- params: Params;
458
- metersPerPixel: number;
459
- dataProviderIds?: readonly number[];
460
- }
461
- export interface AdbMapDataSource {
462
- load(request: AdbMapRequest): Observable<GeoJson>;
463
- }
464
- /** Default transport for the shared BFF observation-features contract. */
465
- export declare class AdbBffMapDataSource implements AdbMapDataSource {
466
- private readonly http;
467
- load(request: AdbMapRequest): Observable<GeoJson>;
468
- static ɵfac: i0.ɵɵFactoryDeclaration<AdbBffMapDataSource, never>;
469
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
470
- }
471
- /** Applications normally use the default BFF source without overriding this token. */
472
- export declare const ADB_MAP_DATA_SOURCE: InjectionToken<AdbMapDataSource>;
473
500
  export {};