adb-shared 6.2.0-beta → 6.2.0-beta.1
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.mjs +873 -7
- package/fesm2022/adb-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/types/adb-shared.d.ts +235 -10
package/package.json
CHANGED
package/types/adb-shared.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, OnDestroy, EventEmitter, ElementRef, AfterViewInit, Renderer2, ModuleWithProviders, PipeTransform, ComponentRef, ViewContainerRef, ComponentFactoryResolver, RendererFactory2, ApplicationRef, Injector, TemplateRef, InjectionToken } from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, EventEmitter, ElementRef, AfterViewInit, Renderer2, ModuleWithProviders, PipeTransform, ComponentRef, ViewContainerRef, ComponentFactoryResolver, RendererFactory2, ApplicationRef, Injector, TemplateRef, InjectionToken, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import * as i4 from '@ngx-translate/core';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
6
6
|
import * as i5 from '@angular/router';
|
|
7
|
-
import { Router, ActivatedRoute } from '@angular/router';
|
|
7
|
+
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
|
8
8
|
import * as i2 from '@angular/common';
|
|
9
|
-
import * as
|
|
10
|
-
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
9
|
+
import * as i6 from '@angular/forms';
|
|
10
|
+
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormGroup, FormArray } from '@angular/forms';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
|
-
import { Observable } from 'rxjs';
|
|
12
|
+
import { Observable, Subscription } from 'rxjs';
|
|
13
|
+
import * as Leaflet from 'leaflet';
|
|
13
14
|
|
|
14
15
|
interface Navigation {
|
|
15
16
|
home: Link2;
|
|
@@ -626,7 +627,7 @@ declare class RichTextComponent {
|
|
|
626
627
|
declare class AdbRichEditorModule {
|
|
627
628
|
static forRoot(config: RichModuleConfig): ModuleWithProviders<AdbRichEditorModule>;
|
|
628
629
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdbRichEditorModule, never>;
|
|
629
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbRichEditorModule, [typeof AdbRichEditorComponent, typeof RichTextComponent], [typeof i2.CommonModule, typeof
|
|
630
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbRichEditorModule, [typeof AdbRichEditorComponent, typeof RichTextComponent], [typeof i2.CommonModule, typeof i6.FormsModule], [typeof AdbRichEditorComponent, typeof RichTextComponent]>;
|
|
630
631
|
static ɵinj: i0.ɵɵInjectorDeclaration<AdbRichEditorModule>;
|
|
631
632
|
}
|
|
632
633
|
|
|
@@ -646,7 +647,7 @@ declare class FilterSectionComponent implements OnInit, OnDestroy {
|
|
|
646
647
|
|
|
647
648
|
declare class AdbFilterSectionModule {
|
|
648
649
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdbFilterSectionModule, never>;
|
|
649
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbFilterSectionModule, [typeof FilterSectionComponent], [typeof i2.CommonModule, typeof
|
|
650
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbFilterSectionModule, [typeof FilterSectionComponent], [typeof i2.CommonModule, typeof i6.FormsModule, typeof i4.TranslateModule, typeof AdbButtonsModule], [typeof FilterSectionComponent, typeof AdbButtonsModule]>;
|
|
650
651
|
static ɵinj: i0.ɵɵInjectorDeclaration<AdbFilterSectionModule>;
|
|
651
652
|
}
|
|
652
653
|
|
|
@@ -869,9 +870,233 @@ declare class AdbTaxonPickerComponent implements ControlValueAccessor {
|
|
|
869
870
|
declare class AdbPickerModule {
|
|
870
871
|
static forRoot(config?: AdbPickerConfig): ModuleWithProviders<AdbPickerModule>;
|
|
871
872
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdbPickerModule, never>;
|
|
872
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbPickerModule, [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbTaxonPickerComponent], [typeof i2.CommonModule, typeof
|
|
873
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbPickerModule, [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbTaxonPickerComponent], [typeof i2.CommonModule, typeof i6.FormsModule, typeof i4.TranslateModule, typeof AdbPipesModule, typeof AdbDirectivesModule], [typeof GenericPickerComponent, typeof AdbAreaPickerComponent, typeof AdbTaxonPickerComponent]>;
|
|
873
874
|
static ɵinj: i0.ɵɵInjectorDeclaration<AdbPickerModule>;
|
|
874
875
|
}
|
|
875
876
|
|
|
876
|
-
|
|
877
|
-
|
|
877
|
+
interface AdbMapConfig {
|
|
878
|
+
api: string;
|
|
879
|
+
artfaktaTaxonLists: string;
|
|
880
|
+
artportalen: string;
|
|
881
|
+
filters?: AdbMapFilterType[];
|
|
882
|
+
log?: boolean;
|
|
883
|
+
}
|
|
884
|
+
declare enum AdbMapFilterType {
|
|
885
|
+
Taxon = "taxon",
|
|
886
|
+
Area = "area",
|
|
887
|
+
Time = "time",
|
|
888
|
+
RedList = "redlist",
|
|
889
|
+
RiskList = "risklist",
|
|
890
|
+
TaxaLists = "taxonLists",
|
|
891
|
+
Datasources = "datasources"
|
|
892
|
+
}
|
|
893
|
+
declare class VisibleFilters {
|
|
894
|
+
showTaxon: boolean;
|
|
895
|
+
showTime: boolean;
|
|
896
|
+
showArea: boolean;
|
|
897
|
+
showRedList: boolean;
|
|
898
|
+
showRiskList: boolean;
|
|
899
|
+
showTaxaLists: boolean;
|
|
900
|
+
showDatasets: boolean;
|
|
901
|
+
}
|
|
902
|
+
declare const ADB_MAP_CONFIG: InjectionToken<AdbMapConfig>;
|
|
903
|
+
declare class AdbMapConfigService {
|
|
904
|
+
readonly log: boolean;
|
|
905
|
+
readonly artfaktaTaxonLists: string;
|
|
906
|
+
readonly aportalenObservations: string;
|
|
907
|
+
readonly taxaListsApi: string;
|
|
908
|
+
readonly filters: VisibleFilters;
|
|
909
|
+
constructor(config: AdbMapConfig);
|
|
910
|
+
private hasFilter;
|
|
911
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbMapConfigService, never>;
|
|
912
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AdbMapConfigService>;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
type GeoJsonGeometry = {
|
|
916
|
+
type: "Point";
|
|
917
|
+
coordinates: [number, number];
|
|
918
|
+
} | {
|
|
919
|
+
type: "LineString";
|
|
920
|
+
coordinates: [number, number][];
|
|
921
|
+
} | {
|
|
922
|
+
type: "Polygon";
|
|
923
|
+
coordinates: [number, number][][];
|
|
924
|
+
} | {
|
|
925
|
+
type: "MultiPoint";
|
|
926
|
+
coordinates: [number, number][];
|
|
927
|
+
} | {
|
|
928
|
+
type: "MultiLineString";
|
|
929
|
+
coordinates: [number, number][][];
|
|
930
|
+
} | {
|
|
931
|
+
type: "MultiPolygon";
|
|
932
|
+
coordinates: [number, number][][][];
|
|
933
|
+
} | {
|
|
934
|
+
type: "GeometryCollection";
|
|
935
|
+
geometries: GeoJsonGeometry[];
|
|
936
|
+
};
|
|
937
|
+
interface GeoJsonFeature {
|
|
938
|
+
type: "Feature";
|
|
939
|
+
geometry: GeoJsonGeometry;
|
|
940
|
+
properties?: any;
|
|
941
|
+
}
|
|
942
|
+
interface MapOptions {
|
|
943
|
+
providers?: boolean;
|
|
944
|
+
zoom?: boolean;
|
|
945
|
+
scrollZoom?: boolean;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare class AdbBaseMap implements AfterViewInit {
|
|
949
|
+
subscriptions: Subscription;
|
|
950
|
+
mapId: string;
|
|
951
|
+
map: any;
|
|
952
|
+
tileLayer: Leaflet.tileLayer;
|
|
953
|
+
protected INITIAL_CENTER_LAT: number;
|
|
954
|
+
protected INITIAL_CENTER_LNG: number;
|
|
955
|
+
hasProviders: boolean;
|
|
956
|
+
hasZoom: boolean;
|
|
957
|
+
hasScrollZoom: boolean;
|
|
958
|
+
private mapReadySubject;
|
|
959
|
+
readonly mapReady$: rxjs.Observable<boolean>;
|
|
960
|
+
private mapMoveSubject;
|
|
961
|
+
readonly mapMove$: rxjs.Observable<void>;
|
|
962
|
+
constructor(options?: MapOptions);
|
|
963
|
+
getId(): string;
|
|
964
|
+
ngAfterViewInit(): void;
|
|
965
|
+
addMapLayers(): void;
|
|
966
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbBaseMap, never>;
|
|
967
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AdbBaseMap, never, never, {}, {}, never, never, true, never>;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
declare class AdbObsMapComponent extends AdbBaseMap implements OnInit, OnDestroy {
|
|
971
|
+
private activatedRoute;
|
|
972
|
+
private config;
|
|
973
|
+
private router;
|
|
974
|
+
private http;
|
|
975
|
+
error: null;
|
|
976
|
+
loading: boolean;
|
|
977
|
+
siteLayer: Leaflet.FeatureGroup;
|
|
978
|
+
hasBox: boolean;
|
|
979
|
+
count: any;
|
|
980
|
+
aportalenObservations: string;
|
|
981
|
+
constructor(activatedRoute: ActivatedRoute, config: AdbMapConfigService, router: Router, http: HttpClient);
|
|
982
|
+
ngOnInit(): void;
|
|
983
|
+
ngOnDestroy(): void;
|
|
984
|
+
private loadFeature;
|
|
985
|
+
private buildMap;
|
|
986
|
+
private getPolygonClassName;
|
|
987
|
+
private getMapBoundsToBbox;
|
|
988
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbObsMapComponent, never>;
|
|
989
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdbObsMapComponent, "adb-obs-map", never, {}, {}, never, never, false, never>;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
declare class PolygonDrawerInput extends AdbBaseMap implements ControlValueAccessor, OnInit, OnDestroy {
|
|
993
|
+
drawControl: any;
|
|
994
|
+
polygonDrawer: any;
|
|
995
|
+
polygonDraw: boolean;
|
|
996
|
+
shapeLayer: any;
|
|
997
|
+
drawLayer: any;
|
|
998
|
+
geoJson: any;
|
|
999
|
+
ngOnInit(): void;
|
|
1000
|
+
constructor();
|
|
1001
|
+
onDrawPolygon(): void;
|
|
1002
|
+
onDeleteShape(): void;
|
|
1003
|
+
onUndoStep(): void;
|
|
1004
|
+
onMapMoveEnd(): void;
|
|
1005
|
+
onChange: any;
|
|
1006
|
+
onTouched: any;
|
|
1007
|
+
writeValue(geoJson: any): void;
|
|
1008
|
+
registerOnChange(fn: any): void;
|
|
1009
|
+
registerOnTouched(fn: any): void;
|
|
1010
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
1011
|
+
ngOnDestroy(): void;
|
|
1012
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PolygonDrawerInput, never>;
|
|
1013
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PolygonDrawerInput, "adb-polygon-drawer", never, {}, {}, never, never, false, never>;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
declare class AdbMapFilters implements OnInit, OnDestroy {
|
|
1017
|
+
private cdr;
|
|
1018
|
+
private config;
|
|
1019
|
+
private http;
|
|
1020
|
+
private router;
|
|
1021
|
+
private activatedRoute;
|
|
1022
|
+
inline: boolean;
|
|
1023
|
+
private static AlienSpecies;
|
|
1024
|
+
private static Risklist;
|
|
1025
|
+
private static Redlist;
|
|
1026
|
+
static datasets: string[];
|
|
1027
|
+
artfakta: string;
|
|
1028
|
+
subscriptions: Subscription;
|
|
1029
|
+
form: FormGroup;
|
|
1030
|
+
thisYear: Date;
|
|
1031
|
+
lastYear: Date;
|
|
1032
|
+
dateConfig: {
|
|
1033
|
+
minDate: any;
|
|
1034
|
+
maxDate: Date;
|
|
1035
|
+
};
|
|
1036
|
+
queryParamsMap: ParamMap;
|
|
1037
|
+
hasOwnArea: boolean;
|
|
1038
|
+
geo: GeoJsonFeature;
|
|
1039
|
+
area: {
|
|
1040
|
+
areaType: string;
|
|
1041
|
+
featureId: string;
|
|
1042
|
+
};
|
|
1043
|
+
areasArray: FormArray<any>;
|
|
1044
|
+
dataSetCount: number;
|
|
1045
|
+
taxonListCount: number;
|
|
1046
|
+
riskListCount: number;
|
|
1047
|
+
redListCount: number;
|
|
1048
|
+
areaCount: number;
|
|
1049
|
+
periodCount: number;
|
|
1050
|
+
listsError: any;
|
|
1051
|
+
filters: VisibleFilters;
|
|
1052
|
+
taxaLists: any[];
|
|
1053
|
+
hasTaxonInUrlParameter: any;
|
|
1054
|
+
rcControls: any;
|
|
1055
|
+
rlcControls: any;
|
|
1056
|
+
dsControls: any;
|
|
1057
|
+
constructor(cdr: ChangeDetectorRef, config: AdbMapConfigService, http: HttpClient, router: Router, activatedRoute: ActivatedRoute);
|
|
1058
|
+
ngOnInit(): void;
|
|
1059
|
+
removeArea(index: number): void;
|
|
1060
|
+
addArea(): void;
|
|
1061
|
+
onSubmit(): void;
|
|
1062
|
+
private createForm;
|
|
1063
|
+
private updateCustomDate;
|
|
1064
|
+
private getLists;
|
|
1065
|
+
ngOnDestroy(): void;
|
|
1066
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbMapFilters, never>;
|
|
1067
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdbMapFilters, "adb-map-filters", never, { "inline": { "alias": "inline"; "required": false; }; }, {}, never, never, false, never>;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
declare class TreeviewComponent implements ControlValueAccessor {
|
|
1071
|
+
nodes: ListItem[];
|
|
1072
|
+
private selectedIds;
|
|
1073
|
+
private onChange;
|
|
1074
|
+
private onTouched;
|
|
1075
|
+
writeValue(ids: number[] | null): void;
|
|
1076
|
+
registerOnChange(fn: (value: number[]) => void): void;
|
|
1077
|
+
registerOnTouched(fn: () => void): void;
|
|
1078
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1079
|
+
onLeafToggle(node: ListItem): void;
|
|
1080
|
+
private applySelection;
|
|
1081
|
+
private setReadOnly;
|
|
1082
|
+
private static collectSelectedLeafIds;
|
|
1083
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeviewComponent, never>;
|
|
1084
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeviewComponent, "app-treeview", never, { "nodes": { "alias": "nodes"; "required": false; }; }, {}, never, never, false, never>;
|
|
1085
|
+
}
|
|
1086
|
+
interface ListItem {
|
|
1087
|
+
id: number;
|
|
1088
|
+
name?: string;
|
|
1089
|
+
children?: ListItem[];
|
|
1090
|
+
_selected?: boolean;
|
|
1091
|
+
_readOnly?: boolean;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
declare class AdbMapModule {
|
|
1095
|
+
static forRoot(config?: AdbMapConfig): ModuleWithProviders<AdbMapModule>;
|
|
1096
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdbMapModule, never>;
|
|
1097
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AdbMapModule, [typeof AdbObsMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters, typeof TreeviewComponent], [typeof i2.CommonModule, typeof i6.FormsModule, typeof i5.RouterModule, typeof i6.ReactiveFormsModule, typeof AdbDatePickerModule, typeof i4.TranslateModule, typeof AdbPipesModule, typeof AdbFilterSectionModule, typeof AdbPickerModule], [typeof AdbObsMapComponent, typeof PolygonDrawerInput, typeof AdbMapFilters]>;
|
|
1098
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AdbMapModule>;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export { ADB_MAP_CONFIG, ADB_PICKER_CONFIG, ADB_USER_SERVICE_CONFIG, AdbAreaPickerComponent, AdbBaseMap, AdbButtonsModule, AdbConfirmModal, AdbDatePickerComponent, AdbDatePickerDirective, AdbDatePickerModule, AdbDirectivesModule, AdbDropdown2Directive, AdbDropdownDirective, AdbDropdownModule, AdbFilterSectionModule, AdbHelpButtonComponent, AdbMapConfigService, AdbMapFilterType, AdbMapFilters, AdbMapModule, AdbModalModule, AdbModalService, AdbObsMapComponent, AdbPagersModule, AdbPickerConfigService, AdbPickerModule, AdbPipesModule, AdbRichEditorComponent, AdbRichEditorModule, AdbTaxonPickerComponent, AdbToast, AdbToastModule, AdbToastService, AdbUserInterceptor, AdbUserModule, AdbUserService, ArtportalenFooterComponent, ArtportalenNavComponent, ArtportalenNavModule, AuthCallbackComponent, ClickOutsideDirective, DEFAULT_ADB_USER_SERVICE_CONFIG, EmptyValuePipe, EnvironmentService, FileUploadDirective, FilterSectionComponent, FocusDirective, GenericPickerComponent, HighlightHtmlPipe, HighlightPipe, ImageLoaderDirective, InfiniteScrollComponent, LocaleDatePipe, NumberSpacingPipe, PagerComponent, PagerInlineComponent, PolygonDrawerInput, RedListBadgeClassDirective, RichTextComponent, RiskClassDirective, RouterLinkActiveFragmentDirective, ToastType, UserModuleConstants, VisibleFilters };
|
|
1102
|
+
export type { AdbMapConfig, AdbPickerConfig, AdbUserServiceConfig, DialogModel, PickerDay, PickerWeek, RichTextPart, ToastMessage };
|