adb-shared 22.0.0-beta.2 → 22.0.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adb-shared",
3
- "version": "22.0.0-beta.2",
3
+ "version": "22.0.0-beta.3",
4
4
  "author": "ADB",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">= 22.x",
@@ -16,10 +16,8 @@
16
16
  "dependencies": {
17
17
  "tslib": "^2.9.1"
18
18
  },
19
- "sideEffects": false,
20
- "module": "fesm2022/adb-shared.mjs",
21
- "typings": "types/adb-shared.d.ts",
22
19
  "exports": {
20
+ "./redlist-colors.css": "./redlist-colors.css",
23
21
  "./package.json": {
24
22
  "default": "./package.json"
25
23
  },
@@ -32,5 +30,8 @@
32
30
  "default": "./fesm2022/adb-shared-map.mjs"
33
31
  }
34
32
  },
33
+ "sideEffects": false,
34
+ "module": "fesm2022/adb-shared.mjs",
35
+ "typings": "types/adb-shared.d.ts",
35
36
  "type": "module"
36
37
  }
@@ -0,0 +1,7 @@
1
+ .text-redlist-re { color: #41172f; }
2
+ .text-redlist-dd { color: #dcdcdc; }
3
+ .text-redlist-cr { color: #c4004e; }
4
+ .text-redlist-en { color: #cb506a; }
5
+ .text-redlist-vu { color: #d7828d; }
6
+ .text-redlist-nt { color: #ebc5c6; }
7
+ .text-redlist-lc { color: #cdd425; }
@@ -12,6 +12,7 @@ import { HttpClient } from "@angular/common/http";
12
12
  import * as i8 from "@angular/common";
13
13
  import * as i9 from "adb-shared";
14
14
  import * as i12 from "@ngx-translate/core";
15
+ import { FitOptions } from "ol/View.js";
15
16
  import TileLayer from "ol/layer/Tile.js";
16
17
  import TileWMS from "ol/source/TileWMS.js";
17
18
  import CircleGeometry from "ol/geom/Circle.js";
@@ -277,9 +278,9 @@ export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
277
278
  export declare class PolygonDrawerInput implements ControlValueAccessor, AfterViewInit, OnDestroy {
278
279
  mapId: string;
279
280
  map: Map;
280
- polygonDraw: boolean;
281
+ readonly polygonDraw: import("@angular/core").WritableSignal<boolean>;
281
282
  disabled: boolean;
282
- shapeLayer: boolean;
283
+ readonly shapeLayer: import("@angular/core").WritableSignal<boolean>;
283
284
  private source;
284
285
  private format;
285
286
  private draw;
@@ -324,6 +325,8 @@ export declare class AdbMapFilters implements OnInit, OnDestroy {
324
325
  static datasets: string[];
325
326
  subscriptions: Subscription;
326
327
  form: FormGroup;
328
+ readonly canFilter: import("@angular/core").WritableSignal<boolean>;
329
+ private formEvents;
327
330
  thisYear: Date;
328
331
  lastYear: Date;
329
332
  queryParamsMap: ParamMap;
@@ -408,19 +411,9 @@ export declare class AdbMapModule {
408
411
  static ɵinj: i0.ɵɵInjectorDeclaration<AdbMapModule>;
409
412
  }
410
413
  export declare class AdbMapUtils {
411
- static locationSymbol(feature: FeatureLike, selected?: boolean, hovered?: boolean): Style;
412
- static isNotRecovered(presentation: any): boolean;
413
- static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType?: string): Style | Style[];
414
- static createUncertaintyCircle(center: number[], radius: number): CircleGeometry;
415
414
  static readonly INITIAL_METERS_PER_PIXEL = 500;
416
415
  static readonly INITIAL_CENTER_LAT = 62;
417
416
  static readonly INITIAL_CENTER_LNG = 17;
418
- static gridLevels(result: GeoJson): {
419
- min: number;
420
- max: number;
421
- color: string;
422
- }[];
423
- static getMetersPerPixel(bbox: string, mapWidth: number): number;
424
417
  static OverlayMaps: {
425
418
  Altitude: TileLayer<TileWMS>;
426
419
  Fjällkarta: TileLayer<TileWMS>;
@@ -430,6 +423,21 @@ export declare class AdbMapUtils {
430
423
  'Ekonomisk zon': TileLayer<TileWMS>;
431
424
  };
432
425
  static Providers: MapProvider[];
426
+ static fitExtentIfReady(map: Map, extent: Extent | null | undefined, options: FitOptions): boolean;
427
+ static locationSymbol(feature: FeatureLike, selected?: boolean, hovered?: boolean): Style;
428
+ static isNotRecovered(presentation: any): boolean;
429
+ static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType?: string): Style | Style[];
430
+ static createUncertaintyCircle(center: number[], radius: number): CircleGeometry;
431
+ static gridSymbol(observationCount: number, levels: readonly {
432
+ max: number;
433
+ color: string;
434
+ }[]): Style;
435
+ static gridLevels(result: GeoJson): {
436
+ min: number;
437
+ max: number;
438
+ color: string;
439
+ }[];
440
+ static getMetersPerPixel(bbox: string, mapWidth: number): number;
433
441
  private static wms;
434
442
  static createMap(elementId: string, options?: MapOptions): Map;
435
443
  private static addProviders;
@@ -155,6 +155,17 @@ export declare class RedListBadgeClassDirective {
155
155
  };
156
156
  }, {}, never, never, false, never>;
157
157
  }
158
+ export declare class RedListColorClassDirective {
159
+ redlistId: string | null;
160
+ get colorClass(): string | null;
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<RedListColorClassDirective, never>;
162
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RedListColorClassDirective, "[adbRedListColorClass]", never, {
163
+ "redlistId": {
164
+ "alias": "adbRedListColorClass";
165
+ "required": false;
166
+ };
167
+ }, {}, never, never, false, never>;
168
+ }
158
169
  export declare class RiskClassDirective {
159
170
  category: string;
160
171
  get hostClasses(): string;
@@ -214,7 +225,7 @@ export declare class RouterLinkActiveFragmentDirective implements OnInit, OnDest
214
225
  }
215
226
  export declare class AdbDirectivesModule {
216
227
  static ɵfac: i0.ɵɵFactoryDeclaration<AdbDirectivesModule, never>;
217
- static ɵmod: i0.ɵɵNgModuleDeclaration<AdbDirectivesModule, [typeof ClickOutsideDirective, typeof FocusDirective, typeof FileUploadDirective, typeof RedListBadgeClassDirective, typeof RiskClassDirective, typeof ImageLoaderDirective, typeof RouterLinkActiveFragmentDirective], never, [typeof ClickOutsideDirective, typeof FocusDirective, typeof FileUploadDirective, typeof RedListBadgeClassDirective, typeof RiskClassDirective, typeof ImageLoaderDirective, typeof RouterLinkActiveFragmentDirective]>;
228
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AdbDirectivesModule, [typeof ClickOutsideDirective, typeof FocusDirective, typeof FileUploadDirective, typeof RedListBadgeClassDirective, typeof RedListColorClassDirective, typeof RiskClassDirective, typeof ImageLoaderDirective, typeof RouterLinkActiveFragmentDirective], never, [typeof ClickOutsideDirective, typeof FocusDirective, typeof FileUploadDirective, typeof RedListBadgeClassDirective, typeof RedListColorClassDirective, typeof RiskClassDirective, typeof ImageLoaderDirective, typeof RouterLinkActiveFragmentDirective]>;
218
229
  static ɵinj: i0.ɵɵInjectorDeclaration<AdbDirectivesModule>;
219
230
  }
220
231
  declare class AdbDropdownService {
@@ -423,7 +434,7 @@ export declare class AdbAlertComponent implements OnInit {
423
434
  static ɵcmp: i0.ɵɵComponentDeclaration<AdbAlertComponent, "adb-alert", never, {}, {}, never, never, false, never>;
424
435
  }
425
436
  interface RichModuleConfig {
426
- taxonUrl: string;
437
+ taxonUrl?: string;
427
438
  }
428
439
  export declare class AdbRichEditorComponent implements ControlValueAccessor, OnDestroy {
429
440
  private el;
@@ -440,6 +451,7 @@ export declare class AdbRichEditorComponent implements ControlValueAccessor, OnD
440
451
  onBoldClick(): void;
441
452
  private applyFormatting;
442
453
  private findWrappingMarker;
454
+ onLinkClick(): void;
443
455
  onTaxonClick(): void;
444
456
  onReferenceClick(): void;
445
457
  private replaceMarked;
@@ -482,11 +494,13 @@ export interface RichTextPart {
482
494
  export declare class RichTextComponent {
483
495
  text: string;
484
496
  parts: RichTextPart[];
485
- taxonUrl: string;
486
- constructor(config: RichModuleConfig);
497
+ readonly taxonUrl: string | null;
498
+ constructor(config: RichModuleConfig | null);
487
499
  ngOnChanges(): void;
488
500
  private parseCustomMarkdown;
489
- static ɵfac: i0.ɵɵFactoryDeclaration<RichTextComponent, never>;
501
+ static ɵfac: i0.ɵɵFactoryDeclaration<RichTextComponent, [{
502
+ optional: true;
503
+ }]>;
490
504
  static ɵcmp: i0.ɵɵComponentDeclaration<RichTextComponent, "adb-rich-text", never, {
491
505
  "text": {
492
506
  "alias": "text";
@@ -495,7 +509,7 @@ export declare class RichTextComponent {
495
509
  }, {}, never, never, false, never>;
496
510
  }
497
511
  export declare class AdbRichEditorModule {
498
- static forRoot(config: RichModuleConfig): ModuleWithProviders<AdbRichEditorModule>;
512
+ static forRoot(config?: RichModuleConfig): ModuleWithProviders<AdbRichEditorModule>;
499
513
  static ɵfac: i0.ɵɵFactoryDeclaration<AdbRichEditorModule, never>;
500
514
  static ɵmod: i0.ɵɵNgModuleDeclaration<AdbRichEditorModule, [typeof AdbRichEditorComponent, typeof RichTextComponent], [typeof i2.CommonModule, typeof i4.FormsModule, typeof i3.TranslatePipe], [typeof AdbRichEditorComponent, typeof RichTextComponent]>;
501
515
  static ɵinj: i0.ɵɵInjectorDeclaration<AdbRichEditorModule>;
@@ -902,6 +916,11 @@ export declare class AdbPickerConfigService {
902
916
  static ɵfac: i0.ɵɵFactoryDeclaration<AdbPickerConfigService, never>;
903
917
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
904
918
  }
919
+ interface SOSArea {
920
+ name: string;
921
+ areaType: string;
922
+ featureId: string;
923
+ }
905
924
  interface Area {
906
925
  identifier: string;
907
926
  name: string;
@@ -1003,9 +1022,11 @@ export declare class AdbAreaPickerComponent implements ControlValueAccessor {
1003
1022
  private onTouched;
1004
1023
  constructor(translate: TranslateService, config: AdbPickerConfigService, http: HttpClient);
1005
1024
  getAreas: (query: string) => import("rxjs").Observable<PagedResult<Area>>;
1006
- displayArea: (area: Area) => string;
1007
- loadAreaIdentifier: (identifier: string) => import("rxjs").Observable<Area>;
1008
- onSelect(area: Area | null): void;
1025
+ displayArea: (area: SOSArea) => string;
1026
+ loadAreaId: (id: any) => import("rxjs").Observable<Area>;
1027
+ onSelect(area: (Partial<Area> & {
1028
+ id?: string;
1029
+ }) | null): void;
1009
1030
  onFocus(): void;
1010
1031
  writeValue(value: any): void;
1011
1032
  registerOnChange(fn: any): void;