adb-shared 22.0.0-beta.3 → 22.0.0-beta.5
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/fesm2022/adb-shared-map.mjs +137 -85
- package/fesm2022/adb-shared-map.mjs.map +1 -1
- package/fesm2022/adb-shared.mjs +168 -8
- package/fesm2022/adb-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/types/adb-shared-map.d.ts +56 -26
- package/types/adb-shared.d.ts +46 -1
package/package.json
CHANGED
|
@@ -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 {
|
|
@@ -24,7 +25,7 @@ export interface AdbMapConfig {
|
|
|
24
25
|
enableClusterSelection?: boolean;
|
|
25
26
|
dataProviderIds?: readonly number[];
|
|
26
27
|
}
|
|
27
|
-
export type AdbMapFilterType = 'taxon' | 'area' | 'ownArea' | 'time' | 'redlist' | 'risklist' | 'taxonLists' | 'datasources';
|
|
28
|
+
export type AdbMapFilterType = 'taxon' | 'area' | 'location' | 'ownArea' | 'time' | 'redlist' | 'risklist' | 'taxonLists' | 'datasources';
|
|
28
29
|
export declare const ADB_MAP_CONFIG: InjectionToken<AdbMapConfig>;
|
|
29
30
|
export declare class AdbMapConfigService {
|
|
30
31
|
readonly artfaktaTaxonLists: string;
|
|
@@ -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
|
-
|
|
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
|
-
"
|
|
259
|
-
"alias": "
|
|
292
|
+
"headerButtons": {
|
|
293
|
+
"alias": "headerButtons";
|
|
260
294
|
"required": false;
|
|
261
295
|
"isSignal": true;
|
|
262
296
|
};
|
|
@@ -312,12 +346,15 @@ export declare class AdbMapFilters implements OnInit, OnDestroy {
|
|
|
312
346
|
private http;
|
|
313
347
|
private router;
|
|
314
348
|
private activatedRoute;
|
|
349
|
+
private static nextLocationInputId;
|
|
350
|
+
readonly locationInputId: string;
|
|
315
351
|
inline: boolean;
|
|
316
352
|
readonly hiddenFilters: import("@angular/core").InputSignal<AdbMapFilterType[]>;
|
|
317
353
|
readonly visibleFilters: import("@angular/core").Signal<{
|
|
318
354
|
taxon: boolean;
|
|
319
355
|
time: boolean;
|
|
320
356
|
area: boolean;
|
|
357
|
+
location: boolean;
|
|
321
358
|
ownArea: boolean;
|
|
322
359
|
taxaLists: boolean;
|
|
323
360
|
datasources: boolean;
|
|
@@ -407,7 +444,7 @@ interface ListItem {
|
|
|
407
444
|
export declare class AdbMapModule {
|
|
408
445
|
static forRoot(config?: AdbMapConfig): ModuleWithProviders<AdbMapModule>;
|
|
409
446
|
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]>;
|
|
447
|
+
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
448
|
static ɵinj: i0.ɵɵInjectorDeclaration<AdbMapModule>;
|
|
412
449
|
}
|
|
413
450
|
export declare class AdbMapUtils {
|
|
@@ -424,6 +461,7 @@ export declare class AdbMapUtils {
|
|
|
424
461
|
};
|
|
425
462
|
static Providers: MapProvider[];
|
|
426
463
|
static fitExtentIfReady(map: Map, extent: Extent | null | undefined, options: FitOptions): boolean;
|
|
464
|
+
static isCluster(properties: Record<string, unknown>): boolean;
|
|
427
465
|
static locationSymbol(feature: FeatureLike, selected?: boolean, hovered?: boolean): Style;
|
|
428
466
|
static isNotRecovered(presentation: any): boolean;
|
|
429
467
|
static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType?: string): Style | Style[];
|
|
@@ -440,6 +478,16 @@ export declare class AdbMapUtils {
|
|
|
440
478
|
static getMetersPerPixel(bbox: string, mapWidth: number): number;
|
|
441
479
|
private static wms;
|
|
442
480
|
static createMap(elementId: string, options?: MapOptions): Map;
|
|
481
|
+
static addProviderLayers(map: Map): {
|
|
482
|
+
backgrounds: {
|
|
483
|
+
name: string;
|
|
484
|
+
layer: TileLayer<TileWMS> | TileLayer<XYZ>;
|
|
485
|
+
}[];
|
|
486
|
+
overlays: {
|
|
487
|
+
name: string;
|
|
488
|
+
layer: TileLayer<TileWMS>;
|
|
489
|
+
}[];
|
|
490
|
+
};
|
|
443
491
|
private static addProviders;
|
|
444
492
|
static createFile(source: Blob, fileName?: string): boolean;
|
|
445
493
|
}
|
|
@@ -452,22 +500,4 @@ interface MapProvider {
|
|
|
452
500
|
wms: boolean;
|
|
453
501
|
params?: any;
|
|
454
502
|
}
|
|
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
503
|
export {};
|
package/types/adb-shared.d.ts
CHANGED
|
@@ -955,6 +955,7 @@ export declare class GenericPickerComponent<T> implements OnInit, OnDestroy {
|
|
|
955
955
|
loadById?: (id: any) => Observable<T>;
|
|
956
956
|
disabled: boolean;
|
|
957
957
|
placeholder: string;
|
|
958
|
+
inputId?: string;
|
|
958
959
|
itemTemplate: TemplateRef<any>;
|
|
959
960
|
selectItemChange: EventEmitter<T>;
|
|
960
961
|
focus: EventEmitter<FocusEvent>;
|
|
@@ -997,6 +998,10 @@ export declare class GenericPickerComponent<T> implements OnInit, OnDestroy {
|
|
|
997
998
|
"alias": "placeholder";
|
|
998
999
|
"required": false;
|
|
999
1000
|
};
|
|
1001
|
+
"inputId": {
|
|
1002
|
+
"alias": "inputId";
|
|
1003
|
+
"required": false;
|
|
1004
|
+
};
|
|
1000
1005
|
"initialValue": {
|
|
1001
1006
|
"alias": "initialValue";
|
|
1002
1007
|
"required": false;
|
|
@@ -1048,6 +1053,46 @@ export declare class AdbAreaPickerComponent implements ControlValueAccessor {
|
|
|
1048
1053
|
};
|
|
1049
1054
|
}, {}, never, ["*"], false, never>;
|
|
1050
1055
|
}
|
|
1056
|
+
interface LocationSearchResult {
|
|
1057
|
+
id: string;
|
|
1058
|
+
name: string;
|
|
1059
|
+
municipality?: string;
|
|
1060
|
+
}
|
|
1061
|
+
export declare class AdbLocationPickerComponent implements ControlValueAccessor, OnDestroy {
|
|
1062
|
+
private http;
|
|
1063
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1064
|
+
readonly inputId: import("@angular/core").InputSignal<string>;
|
|
1065
|
+
readonly initialValue: import("@angular/core").WritableSignal<LocationSearchResult>;
|
|
1066
|
+
readonly disabled: import("@angular/core").WritableSignal<boolean>;
|
|
1067
|
+
private readonly locationsUrl;
|
|
1068
|
+
private lookup?;
|
|
1069
|
+
private onChange;
|
|
1070
|
+
private onTouched;
|
|
1071
|
+
constructor(http: HttpClient);
|
|
1072
|
+
readonly searchLocations: (query: string) => import("rxjs").Observable<{
|
|
1073
|
+
items: any[];
|
|
1074
|
+
}>;
|
|
1075
|
+
readonly displayLocation: (location: LocationSearchResult) => string;
|
|
1076
|
+
selectLocation(location: LocationSearchResult | null): void;
|
|
1077
|
+
writeValue(id: string | null): void;
|
|
1078
|
+
registerOnChange(fn: (id: string | null) => void): void;
|
|
1079
|
+
registerOnTouched(fn: () => void): void;
|
|
1080
|
+
setDisabledState(disabled: boolean): void;
|
|
1081
|
+
ngOnDestroy(): void;
|
|
1082
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbLocationPickerComponent, never>;
|
|
1083
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdbLocationPickerComponent, "adb-location-picker", never, {
|
|
1084
|
+
"placeholder": {
|
|
1085
|
+
"alias": "placeholder";
|
|
1086
|
+
"required": false;
|
|
1087
|
+
"isSignal": true;
|
|
1088
|
+
};
|
|
1089
|
+
"inputId": {
|
|
1090
|
+
"alias": "inputId";
|
|
1091
|
+
"required": false;
|
|
1092
|
+
"isSignal": true;
|
|
1093
|
+
};
|
|
1094
|
+
}, {}, never, never, false, never>;
|
|
1095
|
+
}
|
|
1051
1096
|
export declare class AdbTaxonPickerComponent implements ControlValueAccessor {
|
|
1052
1097
|
private config;
|
|
1053
1098
|
private http;
|
|
@@ -1094,7 +1139,7 @@ export declare class AdbTaxonPickerComponent implements ControlValueAccessor {
|
|
|
1094
1139
|
export declare class AdbPickerModule {
|
|
1095
1140
|
static forRoot(config?: AdbPickerConfig): ModuleWithProviders<AdbPickerModule>;
|
|
1096
1141
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdbPickerModule, never>;
|
|
1097
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbPickerModule, [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbTaxonPickerComponent], [typeof i2.CommonModule, typeof i4.FormsModule, typeof AdbPipesModule, typeof AdbDirectivesModule, typeof i3.TranslatePipe], [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbTaxonPickerComponent]>;
|
|
1142
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbPickerModule, [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbLocationPickerComponent, typeof AdbTaxonPickerComponent], [typeof i2.CommonModule, typeof i4.FormsModule, typeof AdbPipesModule, typeof AdbDirectivesModule, typeof i3.TranslatePipe], [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbLocationPickerComponent, typeof AdbTaxonPickerComponent]>;
|
|
1098
1143
|
static ɵinj: i0.ɵɵInjectorDeclaration<AdbPickerModule>;
|
|
1099
1144
|
}
|
|
1100
1145
|
export {};
|