@theseam/ui-common 0.2.17 → 0.3.2
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/breadcrumbs/_breadcrumbs-theme.scss +3 -0
- package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +10 -0
- package/breadcrumbs/styles/_utilities.scss +3 -0
- package/breadcrumbs/styles/_variables.scss +1 -0
- package/breadcrumbs/theseam-ui-common-breadcrumbs.metadata.json +1 -1
- package/bundles/theseam-ui-common-breadcrumbs.umd.js +2 -1
- package/bundles/theseam-ui-common-breadcrumbs.umd.js.map +1 -1
- package/bundles/theseam-ui-common-form-field.umd.js +1 -1
- package/bundles/theseam-ui-common-form-field.umd.js.map +1 -1
- package/bundles/theseam-ui-common-framework.umd.js +18 -15
- package/bundles/theseam-ui-common-framework.umd.js.map +1 -1
- package/bundles/theseam-ui-common-google-maps.umd.js +2202 -0
- package/bundles/theseam-ui-common-google-maps.umd.js.map +1 -0
- package/bundles/theseam-ui-common-menu.umd.js +1 -0
- package/bundles/theseam-ui-common-menu.umd.js.map +1 -1
- package/bundles/theseam-ui-common-scrollbar.umd.js +1 -1
- package/bundles/theseam-ui-common-scrollbar.umd.js.map +1 -1
- package/bundles/theseam-ui-common-tel-input.umd.js +59 -7
- package/bundles/theseam-ui-common-tel-input.umd.js.map +1 -1
- package/bundles/theseam-ui-common-utils.umd.js +610 -136
- package/bundles/theseam-ui-common-utils.umd.js.map +1 -1
- package/bundles/theseam-ui-common-viewers.umd.js +269 -4
- package/bundles/theseam-ui-common-viewers.umd.js.map +1 -1
- package/bundles/theseam-ui-common-widget.umd.js +1 -1
- package/esm2015/breadcrumbs/breadcrumbs/breadcrumbs.component.js +4 -3
- package/esm2015/form-field/input.directive.js +2 -2
- package/esm2015/framework/base-layout/base-layout.component.js +3 -3
- package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +5 -5
- package/esm2015/framework/top-bar/top-bar-title/top-bar-title.component.js +4 -3
- package/esm2015/framework/top-bar/top-bar.component.js +10 -8
- package/esm2015/google-maps/google-maps/google-maps.component.js +261 -0
- package/esm2015/google-maps/google-maps-contextmenu.js +113 -0
- package/esm2015/google-maps/google-maps-controls.service.js +70 -0
- package/esm2015/google-maps/google-maps-feature-helpers.js +177 -0
- package/esm2015/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.js +195 -0
- package/esm2015/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.directive.js +163 -0
- package/esm2015/google-maps/google-maps-recenter-button-control/google-maps-recenter-button-control.component.js +57 -0
- package/esm2015/google-maps/google-maps-upload-button-control/google-maps-upload-button-control.component.js +119 -0
- package/esm2015/google-maps/google-maps.module.js +45 -0
- package/esm2015/google-maps/google-maps.service.js +344 -0
- package/esm2015/google-maps/map-control.component.js +65 -0
- package/esm2015/google-maps/map-controls-service.js +4 -0
- package/esm2015/google-maps/map-file-drop/map-file-drop.component.js +135 -0
- package/esm2015/google-maps/map-value-manager.service.js +46 -0
- package/esm2015/google-maps/public-api.js +14 -0
- package/esm2015/google-maps/theseam-ui-common-google-maps.js +6 -0
- package/esm2015/menu/menu-toggle.directive.js +2 -1
- package/esm2015/scrollbar/overlay-scrollbar.directive.js +2 -2
- package/esm2015/tel-input/tel-input/tel-input.component.js +10 -2
- package/esm2015/tel-input/tel-input.directive.js +50 -5
- package/esm2015/utils/geo-json/coerce-feature-collection.js +44 -0
- package/esm2015/utils/geo-json/geo-json-to-area.js +11 -0
- package/esm2015/utils/geo-json/is-feature-collection.validator.js +21 -0
- package/esm2015/utils/geo-json/is-only-geometry-types.js +23 -0
- package/esm2015/utils/geo-json/is-only-geometry-types.validator.js +32 -0
- package/esm2015/utils/geo-json/merge-polygons.js +35 -0
- package/esm2015/utils/geo-json/no-inner-rings.validator.js +63 -0
- package/esm2015/utils/geo-json/no-kinks.validator.js +39 -0
- package/esm2015/utils/geo-json/read-geo-file.js +99 -0
- package/esm2015/utils/geo-json/split-multi-polygons.js +29 -0
- package/esm2015/utils/is-null-or-undefined.js +1 -1
- package/esm2015/utils/public-api.js +11 -1
- package/esm2015/viewers/html-template-viewer/html-template-viewer.component.js +219 -0
- package/esm2015/viewers/html-template-viewer/html-template-viewer.module.js +23 -0
- package/esm2015/viewers/html-template-viewer/index.js +3 -0
- package/esm2015/viewers/public-api.js +2 -1
- package/esm2015/widget/widget/widget.component.js +1 -1
- package/fesm2015/theseam-ui-common-breadcrumbs.js +3 -2
- package/fesm2015/theseam-ui-common-breadcrumbs.js.map +1 -1
- package/fesm2015/theseam-ui-common-form-field.js +1 -1
- package/fesm2015/theseam-ui-common-form-field.js.map +1 -1
- package/fesm2015/theseam-ui-common-framework.js +15 -12
- package/fesm2015/theseam-ui-common-framework.js.map +1 -1
- package/fesm2015/theseam-ui-common-google-maps.js +1729 -0
- package/fesm2015/theseam-ui-common-google-maps.js.map +1 -0
- package/fesm2015/theseam-ui-common-menu.js +1 -0
- package/fesm2015/theseam-ui-common-menu.js.map +1 -1
- package/fesm2015/theseam-ui-common-scrollbar.js +1 -1
- package/fesm2015/theseam-ui-common-scrollbar.js.map +1 -1
- package/fesm2015/theseam-ui-common-tel-input.js +58 -6
- package/fesm2015/theseam-ui-common-tel-input.js.map +1 -1
- package/fesm2015/theseam-ui-common-utils.js +477 -94
- package/fesm2015/theseam-ui-common-utils.js.map +1 -1
- package/fesm2015/theseam-ui-common-viewers.js +237 -2
- package/fesm2015/theseam-ui-common-viewers.js.map +1 -1
- package/fesm2015/theseam-ui-common-widget.js +1 -1
- package/form-field/theseam-ui-common-form-field.metadata.json +1 -1
- package/framework/base-layout/base-layout.component.scss +14 -0
- package/framework/base-layout/styles/_variables.scss +14 -0
- package/framework/theseam-ui-common-framework.metadata.json +1 -1
- package/framework/top-bar/_top-bar-theme.scss +5 -0
- package/framework/top-bar/styles/_utilities.scss +3 -0
- package/framework/top-bar/styles/_variables.scss +18 -0
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +3 -1
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.scss +15 -0
- package/framework/top-bar/top-bar-title/top-bar-title.component.scss +6 -0
- package/framework/top-bar/top-bar.component.d.ts +3 -0
- package/framework/top-bar/top-bar.component.scss +39 -0
- package/google-maps/google-maps/google-maps.component.d.ts +89 -0
- package/google-maps/google-maps-contextmenu.d.ts +15 -0
- package/google-maps/google-maps-controls.service.d.ts +23 -0
- package/google-maps/google-maps-feature-helpers.d.ts +37 -0
- package/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.d.ts +104 -0
- package/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.directive.d.ts +80 -0
- package/google-maps/google-maps-recenter-button-control/google-maps-recenter-button-control.component.d.ts +21 -0
- package/google-maps/google-maps-upload-button-control/google-maps-upload-button-control.component.d.ts +34 -0
- package/google-maps/google-maps.module.d.ts +2 -0
- package/google-maps/google-maps.service.d.ts +53 -0
- package/google-maps/map-control.component.d.ts +20 -0
- package/google-maps/map-controls-service.d.ts +13 -0
- package/google-maps/map-file-drop/map-file-drop.component.d.ts +34 -0
- package/google-maps/map-value-manager.service.d.ts +18 -0
- package/google-maps/package.json +11 -0
- package/google-maps/public-api.d.ts +13 -0
- package/google-maps/theseam-ui-common-google-maps.d.ts +5 -0
- package/google-maps/theseam-ui-common-google-maps.metadata.json +1 -0
- package/package.json +17 -10
- package/tel-input/tel-input.directive.d.ts +7 -3
- package/tel-input/theseam-ui-common-tel-input.metadata.json +1 -1
- package/utils/geo-json/coerce-feature-collection.d.ts +2 -0
- package/utils/geo-json/geo-json-to-area.d.ts +6 -0
- package/utils/geo-json/is-feature-collection.validator.d.ts +3 -0
- package/utils/geo-json/is-only-geometry-types.d.ts +5 -0
- package/utils/geo-json/is-only-geometry-types.validator.d.ts +4 -0
- package/utils/geo-json/merge-polygons.d.ts +9 -0
- package/utils/geo-json/no-inner-rings.validator.d.ts +10 -0
- package/utils/geo-json/no-kinks.validator.d.ts +3 -0
- package/utils/geo-json/read-geo-file.d.ts +7 -0
- package/utils/geo-json/split-multi-polygons.d.ts +8 -0
- package/utils/is-null-or-undefined.d.ts +1 -1
- package/utils/public-api.d.ts +10 -0
- package/utils/theseam-ui-common-utils.metadata.json +1 -1
- package/viewers/html-template-viewer/html-template-viewer.component.d.ts +67 -0
- package/viewers/html-template-viewer/html-template-viewer.module.d.ts +2 -0
- package/viewers/html-template-viewer/index.d.ts +2 -0
- package/viewers/public-api.d.ts +1 -0
- package/viewers/theseam-ui-common-viewers.metadata.json +1 -1
- package/widget/styles/_variables.scss +2 -0
- package/widget/theseam-ui-common-widget.metadata.json +1 -1
- package/widget/widget/widget.component.scss +2 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$seam-top-bar-padding: 8px !default;
|
|
2
|
+
$seam-top-bar-margin: 0px !default;
|
|
3
|
+
$seam-top-bar-bg: white !default;
|
|
4
|
+
$seam-top-bar-border-radius: 0 !default;
|
|
5
|
+
$seam-top-bar-box-shadow: none !default;
|
|
6
|
+
|
|
7
|
+
$seam-top-bar-logo-height: auto !default;
|
|
8
|
+
$seam-top-bar-logo-width: auto !default;
|
|
9
|
+
$seam-top-bar-logo-max-height: 60px !default;
|
|
10
|
+
$seam-top-bar-logo-max-width: 200px !default;
|
|
11
|
+
|
|
12
|
+
$seam-top-bar-logo-mobile-height: auto !default;
|
|
13
|
+
$seam-top-bar-logo-mobile-width: auto !default;
|
|
14
|
+
$seam-top-bar-logo-mobile-max-height: 40px !default;
|
|
15
|
+
$seam-top-bar-logo-mobile-max-width: 150px !default;
|
|
16
|
+
|
|
17
|
+
$seam-top-bar-menu-button-min-width: 200px !default;
|
|
18
|
+
$seam-top-bar-menu-button-mobile-min-width: 40px !default;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
2
|
import { OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
3
3
|
import { CanDisableCtor } from '@theseam/ui-common/core';
|
|
4
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
4
5
|
declare class TopBarMenuButtonBase {
|
|
5
6
|
}
|
|
6
7
|
declare const _TopBarMenuButtonMixinBase: CanDisableCtor & typeof TopBarMenuButtonBase;
|
|
7
8
|
export declare class TopBarMenuButtonComponent extends _TopBarMenuButtonMixinBase implements OnInit, OnDestroy {
|
|
8
9
|
static ngAcceptInputType_compact: BooleanInput;
|
|
9
10
|
faAngleDown: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
10
|
-
profileIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
11
11
|
detailTpl: TemplateRef<{}> | undefined | null;
|
|
12
12
|
compact: boolean;
|
|
13
|
+
/** Icon to display on mobile to activate profile dropdown. Defaults to faUserCircle. */
|
|
14
|
+
profileIcon: SeamIcon | undefined | null;
|
|
13
15
|
get _hasCompactClass(): boolean;
|
|
14
16
|
get _hasPadding0Class(): boolean;
|
|
15
17
|
get _hasRoundedClass(): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import '../styles/utilities';
|
|
2
|
+
|
|
3
|
+
button[seamTopBarMenuButton] {
|
|
4
|
+
min-width: $seam-top-bar-menu-button-min-width;
|
|
5
|
+
|
|
6
|
+
border-radius: 0;
|
|
7
|
+
border-top: 0 !important;
|
|
8
|
+
border-bottom: 0 !important;
|
|
9
|
+
border-right: 0 !important;
|
|
10
|
+
|
|
11
|
+
&.top-bar-menu-button--compact {
|
|
12
|
+
min-width: $seam-top-bar-menu-button-mobile-min-width;
|
|
13
|
+
border-left: 0 !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -5,6 +5,7 @@ import { TheSeamLayoutService } from '@theseam/ui-common/layout';
|
|
|
5
5
|
import { TopBarItemDirective } from './top-bar-item.directive';
|
|
6
6
|
import { TopBarMenuBtnDetailDirective } from './top-bar-menu-btn-detail.directive';
|
|
7
7
|
import { TopBarMenuDirective } from './top-bar-menu.directive';
|
|
8
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
8
9
|
/**
|
|
9
10
|
* Top bar of an app.
|
|
10
11
|
*
|
|
@@ -45,6 +46,8 @@ export declare class TheSeamTopBarComponent implements OnInit, OnDestroy, AfterC
|
|
|
45
46
|
titleText: string | undefined | null;
|
|
46
47
|
/** Sub Title text displayed when `hasTitle` is true. The sub title will be less prominent. */
|
|
47
48
|
subTitleText: string | undefined | null;
|
|
49
|
+
/** Icon to display on mobile to activate profile dropdown. Defaults to faUserCircle. */
|
|
50
|
+
profileIcon: SeamIcon | undefined | null;
|
|
48
51
|
/** @ignore */
|
|
49
52
|
_items$?: Observable<TopBarItemDirective[]>;
|
|
50
53
|
/** @ignore */
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import './styles/utilities';
|
|
2
|
+
|
|
3
|
+
seam-top-bar {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex: 1 1 100%;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
|
|
8
|
+
background: $seam-top-bar-bg;
|
|
9
|
+
margin: $seam-top-bar-margin;
|
|
10
|
+
padding: $seam-top-bar-padding;
|
|
11
|
+
border-radius: $seam-top-bar-border-radius;
|
|
12
|
+
box-shadow: $seam-top-bar-box-shadow;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.top-bar--logo {
|
|
16
|
+
flex: 0 0 auto;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
height: $seam-top-bar-logo-height;
|
|
22
|
+
max-height: $seam-top-bar-logo-max-height;
|
|
23
|
+
width: $seam-top-bar-logo-width;
|
|
24
|
+
max-width: $seam-top-bar-logo-max-width;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.top-bar--logo-mobile {
|
|
28
|
+
img {
|
|
29
|
+
height: $seam-top-bar-logo-mobile-height;
|
|
30
|
+
max-height: $seam-top-bar-logo-mobile-max-height;
|
|
31
|
+
width: $seam-top-bar-logo-mobile-width;
|
|
32
|
+
max-width: $seam-top-bar-logo-mobile-max-width;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.top-bar-icon-container {
|
|
38
|
+
margin: auto 0;
|
|
39
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
3
|
+
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
4
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
5
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
6
|
+
import { AgmMap } from '@agm/core';
|
|
7
|
+
import { CanDisable, CanDisableCtor } from '@theseam/ui-common/core';
|
|
8
|
+
import { MenuComponent } from '@theseam/ui-common/menu';
|
|
9
|
+
import { GoogleMapsService } from '../google-maps.service';
|
|
10
|
+
import { MapControl } from '../map-controls-service';
|
|
11
|
+
import { MapValue, MapValueManagerService } from '../map-value-manager.service';
|
|
12
|
+
declare class TheSeamGoogleMapsComponentBase {
|
|
13
|
+
_elementRef: ElementRef;
|
|
14
|
+
constructor(_elementRef: ElementRef);
|
|
15
|
+
}
|
|
16
|
+
declare const _TheSeamGoogleMapsMixinBase: CanDisableCtor & typeof TheSeamGoogleMapsComponentBase;
|
|
17
|
+
/**
|
|
18
|
+
* A wrapper for googlemap.
|
|
19
|
+
*/
|
|
20
|
+
export declare class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase implements OnInit, AfterViewInit, OnDestroy, OnChanges, CanDisable, ControlValueAccessor {
|
|
21
|
+
private readonly _focusMonitor;
|
|
22
|
+
private readonly _googleMaps;
|
|
23
|
+
private readonly _mapValueManager;
|
|
24
|
+
static ngAcceptInputType_disabled: BooleanInput;
|
|
25
|
+
static ngAcceptInputType_zoom: NumberInput;
|
|
26
|
+
static ngAcceptInputType_longitude: NumberInput;
|
|
27
|
+
static ngAcceptInputType_latitude: NumberInput;
|
|
28
|
+
static ngAcceptInputType_fileDropEnabled: BooleanInput;
|
|
29
|
+
static ngAcceptInputType_fileUploadControlEnabled: BooleanInput;
|
|
30
|
+
static ngAcceptInputType_fullscreenControlEnabled: BooleanInput;
|
|
31
|
+
static ngAcceptInputType_reCenterControlEnabled: BooleanInput;
|
|
32
|
+
static ngAcceptInputType_mapTypeControlEnabled: BooleanInput;
|
|
33
|
+
static ngAcceptInputType_streetViewControlEnabled: BooleanInput;
|
|
34
|
+
static ngAcceptInputType_allowDrawingHoleInPolygon: BooleanInput;
|
|
35
|
+
private readonly _ngUnsubscribe;
|
|
36
|
+
readonly _fileUploadControlDef: MapControl;
|
|
37
|
+
readonly _reCenterControlDef: MapControl;
|
|
38
|
+
private _focusOrigin;
|
|
39
|
+
set value(value: MapValue);
|
|
40
|
+
get value(): MapValue;
|
|
41
|
+
set tabIndex(value: number);
|
|
42
|
+
get tabIndex(): number;
|
|
43
|
+
/**
|
|
44
|
+
* Set the tab index to `-1` to allow the root element of the
|
|
45
|
+
* component to receive `focus` event from javascript, but not get focused by
|
|
46
|
+
* keyboard navigation.
|
|
47
|
+
*/
|
|
48
|
+
private _tabIndex;
|
|
49
|
+
fileDropEnabled: boolean;
|
|
50
|
+
fileUploadControlEnabled: boolean;
|
|
51
|
+
fullscreenControlEnabled: boolean;
|
|
52
|
+
reCenterControlEnabled: boolean;
|
|
53
|
+
mapTypeControlEnabled: boolean;
|
|
54
|
+
streetViewControlEnabled: boolean;
|
|
55
|
+
allowDrawingHoleInPolygon: boolean;
|
|
56
|
+
set fileImportHandler(value: ((file: File) => void) | undefined | null);
|
|
57
|
+
get _attrDisabled(): true | null;
|
|
58
|
+
get _attrTabIndex(): number;
|
|
59
|
+
onChange: any;
|
|
60
|
+
onTouched: any;
|
|
61
|
+
zoom: number;
|
|
62
|
+
longitude: number;
|
|
63
|
+
latitude: number;
|
|
64
|
+
mapReady: EventEmitter<void>;
|
|
65
|
+
agmMap: AgmMap;
|
|
66
|
+
featureContextMenu: MenuComponent;
|
|
67
|
+
agmMapTpl: ElementRef<HTMLElement>;
|
|
68
|
+
constructor(elementRef: ElementRef, _focusMonitor: FocusMonitor, _googleMaps: GoogleMapsService, _mapValueManager: MapValueManagerService);
|
|
69
|
+
/** @ignore */
|
|
70
|
+
ngOnInit(): void;
|
|
71
|
+
/** @ignore */
|
|
72
|
+
ngOnDestroy(): void;
|
|
73
|
+
/** @ignore */
|
|
74
|
+
ngAfterViewInit(): void;
|
|
75
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
76
|
+
writeValue(value: MapValue): void;
|
|
77
|
+
registerOnChange(fn: any): void;
|
|
78
|
+
registerOnTouched(fn: any): void;
|
|
79
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
80
|
+
fitBounds(bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): void;
|
|
81
|
+
getGeoJson(): Promise<object>;
|
|
82
|
+
hasFocus(): boolean;
|
|
83
|
+
/** Focuses the button. */
|
|
84
|
+
focus(): void;
|
|
85
|
+
private _getHostElement;
|
|
86
|
+
_onMapReady(theMap: google.maps.Map): void;
|
|
87
|
+
_onClickDeleteFeature(): void;
|
|
88
|
+
}
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { NgZone, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { MenuComponent } from '@theseam/ui-common/menu';
|
|
4
|
+
export declare class GoogleMapsContextMenu {
|
|
5
|
+
private readonly _map;
|
|
6
|
+
private readonly _menu;
|
|
7
|
+
private readonly _vcr;
|
|
8
|
+
private readonly _ngZone;
|
|
9
|
+
private readonly _data;
|
|
10
|
+
private readonly _feature;
|
|
11
|
+
private readonly _overlayView;
|
|
12
|
+
private readonly _cleanupFn;
|
|
13
|
+
constructor(_map: google.maps.Map, _menu: MenuComponent, _position: google.maps.LatLng, _vcr: ViewContainerRef, _ngZone: NgZone, _data: google.maps.Data, _feature: google.maps.Data.Feature);
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFactoryResolver, Injector } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { GoogleMapsService } from './google-maps.service';
|
|
4
|
+
import { MapControl, MapControlsService } from './map-controls-service';
|
|
5
|
+
export declare class MapControlRef {
|
|
6
|
+
private readonly _googleMaps;
|
|
7
|
+
private readonly _componentFactoryResolver;
|
|
8
|
+
private readonly _injector;
|
|
9
|
+
private readonly _controlDef;
|
|
10
|
+
private readonly _destroyedSubject;
|
|
11
|
+
private _componentRef;
|
|
12
|
+
private _addedAtPosition;
|
|
13
|
+
destroyed: Observable<void>;
|
|
14
|
+
constructor(_googleMaps: GoogleMapsService, _componentFactoryResolver: ComponentFactoryResolver, _injector: Injector, _controlDef: MapControl);
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class GoogleMapsControlsService implements MapControlsService {
|
|
18
|
+
private readonly _googleMaps;
|
|
19
|
+
private readonly _componentFactoryResolver;
|
|
20
|
+
private readonly _injector;
|
|
21
|
+
constructor(_googleMaps: GoogleMapsService, _componentFactoryResolver: ComponentFactoryResolver, _injector: Injector);
|
|
22
|
+
add(control: MapControl): MapControlRef;
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { NgZone } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare enum AppFeaturePropertyName {
|
|
5
|
+
IsSelected = "__app__isSelected"
|
|
6
|
+
}
|
|
7
|
+
export declare function isAppFeatureProperty(propertyName: string): propertyName is AppFeaturePropertyName;
|
|
8
|
+
export declare function isFeatureSelected(feature: google.maps.Data.Feature): boolean;
|
|
9
|
+
export declare function setFeatureSelected(feature: google.maps.Data.Feature, isSelected: boolean): void;
|
|
10
|
+
export declare function stripAppFeaturePropertiesFromJson(json: any): void;
|
|
11
|
+
/**
|
|
12
|
+
* Searches for a Feature in Data that contains the provided Feature and can use
|
|
13
|
+
* it as a cutout area.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPossibleExteriorFeature(data: google.maps.Data, feature: google.maps.Data.Feature): google.maps.Data.Feature | undefined;
|
|
16
|
+
export declare function addInnerFeatureCutoutToExteriorFeature(exteriorFeature: google.maps.Data.Feature, innerFeature: google.maps.Data.Feature): void;
|
|
17
|
+
/**
|
|
18
|
+
* Google maps paths don't always start and stop at the exact same position, so
|
|
19
|
+
* this will fix that for turfjs.
|
|
20
|
+
*/
|
|
21
|
+
export declare function fixPathDifferentStartingAndEndingPoint(coordinates: number[][]): void;
|
|
22
|
+
export declare function polygonCoordinates(polygon: google.maps.Data.Polygon): number[][][];
|
|
23
|
+
export declare function multiPolygonCoordinates(multiPolygon: google.maps.Data.MultiPolygon): number[][][][];
|
|
24
|
+
export declare function toTurfJsPolygon(polygon: google.maps.Data.Polygon): import("@turf/helpers").Feature<import("@turf/helpers").Polygon, import("@turf/helpers").Properties>;
|
|
25
|
+
export declare function toTurfJsMultiPolygon(multiPolygon: google.maps.Data.MultiPolygon): import("@turf/helpers").Feature<import("@turf/helpers").MultiPolygon, import("@turf/helpers").Properties>;
|
|
26
|
+
export declare function toTurfJsFeature(googleFeature: google.maps.Data.Feature): import("@turf/helpers").Feature<import("@turf/helpers").Polygon, import("@turf/helpers").Properties> | import("@turf/helpers").Feature<import("@turf/helpers").MultiPolygon, import("@turf/helpers").Properties>;
|
|
27
|
+
export declare function featureContains(featureA: google.maps.Data.Feature, featureB: google.maps.Data.Feature): boolean;
|
|
28
|
+
export declare function createDataFeatureFromPolygon(polygon: google.maps.Polygon): google.maps.Data.Feature;
|
|
29
|
+
export declare function getBoundsWithAllFeatures(data: google.maps.Data): google.maps.LatLngBounds;
|
|
30
|
+
export declare function getFeatureBounds(feature: google.maps.Data.Feature): google.maps.LatLngBounds;
|
|
31
|
+
export declare function getFeatureCenter(feature: google.maps.Data.Feature): google.maps.LatLng;
|
|
32
|
+
export declare function removeAllFeatures(data: google.maps.Data): void;
|
|
33
|
+
export declare function getFeaturesCount(data: google.maps.Data): number;
|
|
34
|
+
/**
|
|
35
|
+
* NOTE: Original events are not emitted, because filtering may omit events.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createFeatureChangeObservable(data: google.maps.Data, ngZone: NgZone): Observable<void>;
|
package/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
3
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { InputDirective } from '@theseam/ui-common/form-field';
|
|
6
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
7
|
+
import { TheSeamGoogleMapsPlacesAutocompleteDirective } from './google-maps-places-autocomplete.directive';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare class TheSeamGoogleMapsPlacesAutoCompleteComponent implements OnInit, OnDestroy {
|
|
12
|
+
private readonly _elementRef;
|
|
13
|
+
static ngAcceptInputType_disabled: BooleanInput;
|
|
14
|
+
private readonly _ngUnsubscribe;
|
|
15
|
+
private readonly _autoCompleteReadySubject;
|
|
16
|
+
private _placeChangedPending;
|
|
17
|
+
autoComplete?: google.maps.places.Autocomplete;
|
|
18
|
+
label: string | undefined | null;
|
|
19
|
+
icon: SeamIcon | undefined | null;
|
|
20
|
+
disabled: BooleanInput;
|
|
21
|
+
placeholder: string | undefined | null;
|
|
22
|
+
autocorrect: 'off' | 'on' | undefined | null;
|
|
23
|
+
autocapitalize: 'off' | 'on' | undefined | null;
|
|
24
|
+
/**
|
|
25
|
+
* Set the tab index to `-1` to allow the root element of the
|
|
26
|
+
* component to receive `focus` event from javascript, but not get focused by
|
|
27
|
+
* keyboard navigation.
|
|
28
|
+
*/
|
|
29
|
+
set tabIndex(value: number);
|
|
30
|
+
get tabIndex(): number;
|
|
31
|
+
private _tabIndex;
|
|
32
|
+
set options(value: google.maps.places.AutocompleteOptions | undefined | null);
|
|
33
|
+
_options: google.maps.places.AutocompleteOptions;
|
|
34
|
+
/**
|
|
35
|
+
* This event is fired when a PlaceResult is made available for a Place the
|
|
36
|
+
* user has selected. If the user enters the name of a Place that was not
|
|
37
|
+
* suggested by the control and presses the Enter key, or if a Place Details
|
|
38
|
+
* request fails, the PlaceResult contains the user input in the name
|
|
39
|
+
* property, with no other properties defined.
|
|
40
|
+
*
|
|
41
|
+
* See: https://developers.google.com/maps/documentation/javascript/reference/places-widget#Autocomplete.place_changed
|
|
42
|
+
*/
|
|
43
|
+
readonly placeChanged: Observable<void>;
|
|
44
|
+
_inputDirective: InputDirective;
|
|
45
|
+
set __autocompleteDirective(value: TheSeamGoogleMapsPlacesAutocompleteDirective);
|
|
46
|
+
_autoCompleteDirective: TheSeamGoogleMapsPlacesAutocompleteDirective;
|
|
47
|
+
get _attrTabIndex(): number;
|
|
48
|
+
_onClick(event: MouseEvent): void;
|
|
49
|
+
_onFocus(): void;
|
|
50
|
+
constructor(_elementRef: ElementRef);
|
|
51
|
+
ngOnInit(): void;
|
|
52
|
+
/** @ignore */
|
|
53
|
+
ngOnDestroy(): void;
|
|
54
|
+
private _untilAutoCompleteReady;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the bounds to which predictions are biased.
|
|
57
|
+
*/
|
|
58
|
+
getBounds(): google.maps.LatLngBounds | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the fields to be included for the Place in the details response
|
|
61
|
+
* when the details are successfully retrieved. For a list of fields see
|
|
62
|
+
* [PlaceResult](https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult).
|
|
63
|
+
*/
|
|
64
|
+
getFields(): string[] | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Returns the details of the Place selected by user if the details were
|
|
67
|
+
* successfully retrieved. Otherwise returns a stub Place object, with the
|
|
68
|
+
* name property set to the current value of the input field.
|
|
69
|
+
*/
|
|
70
|
+
getPlace(): google.maps.places.PlaceResult;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the preferred area within which to return Place results. Results are
|
|
73
|
+
* biased towards, but not restricted to, this area.
|
|
74
|
+
*/
|
|
75
|
+
setBounds(bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral): void;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the component restrictions. Component restrictions are used to
|
|
78
|
+
* restrict predictions to only those within the parent component. For
|
|
79
|
+
* example, the country.
|
|
80
|
+
*/
|
|
81
|
+
setComponentRestrictions(restrictions?: google.maps.places.ComponentRestrictions): void;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the fields to be included for the Place in the details response when
|
|
84
|
+
* the details are successfully retrieved. For a list of fields see
|
|
85
|
+
* [PlaceResult](https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult).
|
|
86
|
+
*/
|
|
87
|
+
setFields(fields?: string[]): void;
|
|
88
|
+
/** */
|
|
89
|
+
setOptions(options?: google.maps.places.AutocompleteOptions): void;
|
|
90
|
+
/**
|
|
91
|
+
* Sets the types of predictions to be returned. For supported types, see the
|
|
92
|
+
* [developer's guide](https://developers.google.com/maps/documentation/javascript/places-autocomplete#constrain-place-types).
|
|
93
|
+
* If no types are specified, all types will be returned.
|
|
94
|
+
*/
|
|
95
|
+
setTypes(types?: string[]): void;
|
|
96
|
+
/** Focuses the input. */
|
|
97
|
+
focus(): void;
|
|
98
|
+
/** Unfocuses the input. */
|
|
99
|
+
blur(): void;
|
|
100
|
+
getHostElement(): HTMLInputElement;
|
|
101
|
+
private _createPlaceChangedObservable;
|
|
102
|
+
/** Asserts that the map has been initialized. */
|
|
103
|
+
private _assertInitialized;
|
|
104
|
+
}
|
package/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.directive.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { ElementRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare const SEAM_GOOGLE_PLACES_AUTOCOMPLETE_DEFAULT_OPTIONS: google.maps.places.AutocompleteOptions;
|
|
5
|
+
export declare class TheSeamGoogleMapsPlacesAutocompleteDirective implements OnInit, OnDestroy, OnChanges {
|
|
6
|
+
private readonly _elementRef;
|
|
7
|
+
private readonly _ngZone;
|
|
8
|
+
private readonly _autoCompleteReadySubject;
|
|
9
|
+
private readonly _ngUnsubscribe;
|
|
10
|
+
private _placeChangedPending;
|
|
11
|
+
private _listeners;
|
|
12
|
+
autoComplete?: google.maps.places.Autocomplete;
|
|
13
|
+
set options(value: google.maps.places.AutocompleteOptions | undefined | null);
|
|
14
|
+
private _options;
|
|
15
|
+
/**
|
|
16
|
+
* This event is fired when a PlaceResult is made available for a Place the
|
|
17
|
+
* user has selected. If the user enters the name of a Place that was not
|
|
18
|
+
* suggested by the control and presses the Enter key, or if a Place Details
|
|
19
|
+
* request fails, the PlaceResult contains the user input in the name
|
|
20
|
+
* property, with no other properties defined.
|
|
21
|
+
*
|
|
22
|
+
* See: https://developers.google.com/maps/documentation/javascript/reference/places-widget#Autocomplete.place_changed
|
|
23
|
+
*/
|
|
24
|
+
readonly placeChanged: Observable<any>;
|
|
25
|
+
_attrType: string;
|
|
26
|
+
constructor(_elementRef: ElementRef<HTMLInputElement>, _ngZone: NgZone);
|
|
27
|
+
ngOnInit(): void;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
+
private _untilGoogleMapsApiLoaded;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the bounds to which predictions are biased.
|
|
33
|
+
*/
|
|
34
|
+
getBounds(): google.maps.LatLngBounds | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the fields to be included for the Place in the details response
|
|
37
|
+
* when the details are successfully retrieved. For a list of fields see
|
|
38
|
+
* [PlaceResult](https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult).
|
|
39
|
+
*/
|
|
40
|
+
getFields(): string[] | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the details of the Place selected by user if the details were
|
|
43
|
+
* successfully retrieved. Otherwise returns a stub Place object, with the
|
|
44
|
+
* name property set to the current value of the input field.
|
|
45
|
+
*/
|
|
46
|
+
getPlace(): google.maps.places.PlaceResult;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the preferred area within which to return Place results. Results are
|
|
49
|
+
* biased towards, but not restricted to, this area.
|
|
50
|
+
*/
|
|
51
|
+
setBounds(bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral): void;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the component restrictions. Component restrictions are used to
|
|
54
|
+
* restrict predictions to only those within the parent component. For
|
|
55
|
+
* example, the country.
|
|
56
|
+
*/
|
|
57
|
+
setComponentRestrictions(restrictions?: google.maps.places.ComponentRestrictions): void;
|
|
58
|
+
/**
|
|
59
|
+
* Sets the fields to be included for the Place in the details response when
|
|
60
|
+
* the details are successfully retrieved. For a list of fields see
|
|
61
|
+
* [PlaceResult](https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult).
|
|
62
|
+
*/
|
|
63
|
+
setFields(fields?: string[]): void;
|
|
64
|
+
/** */
|
|
65
|
+
setOptions(options?: google.maps.places.AutocompleteOptions): void;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the types of predictions to be returned. For supported types, see the
|
|
68
|
+
* [developer's guide](https://developers.google.com/maps/documentation/javascript/places-autocomplete#constrain-place-types).
|
|
69
|
+
* If no types are specified, all types will be returned.
|
|
70
|
+
*/
|
|
71
|
+
setTypes(types?: string[]): void;
|
|
72
|
+
/** Focuses the input. */
|
|
73
|
+
focus(): void;
|
|
74
|
+
/** Unfocuses the input. */
|
|
75
|
+
blur(): void;
|
|
76
|
+
getHostElement(): HTMLInputElement;
|
|
77
|
+
private _createPlaceChangedObservable;
|
|
78
|
+
/** Asserts that the map has been initialized. */
|
|
79
|
+
private _assertInitialized;
|
|
80
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
3
|
+
import { GoogleMapsService } from '../google-maps.service';
|
|
4
|
+
export interface GoogleMapsRecenterButtonControlData {
|
|
5
|
+
label?: string | undefined | null;
|
|
6
|
+
icon?: SeamIcon | undefined | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare class TheSeamGoogleMapsRecenterButtonControlComponent implements OnDestroy {
|
|
12
|
+
private readonly _googleMaps;
|
|
13
|
+
private readonly _ngUnsubscribe;
|
|
14
|
+
private _listeners;
|
|
15
|
+
label: string | undefined | null;
|
|
16
|
+
icon: SeamIcon | undefined | null;
|
|
17
|
+
_onClick(event: MouseEvent): void;
|
|
18
|
+
constructor(_googleMaps: GoogleMapsService, _data?: GoogleMapsRecenterButtonControlData);
|
|
19
|
+
/** @ignore */
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
3
|
+
import { GoogleMapsService } from '../google-maps.service';
|
|
4
|
+
import { MapValueManagerService } from '../map-value-manager.service';
|
|
5
|
+
export interface GoogleMapsUploadButtonControlData {
|
|
6
|
+
label?: string | undefined | null;
|
|
7
|
+
icon?: SeamIcon | undefined | null;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export declare class TheSeamGoogleMapsUploadButtonControlComponent implements OnDestroy {
|
|
13
|
+
private readonly _elementRef;
|
|
14
|
+
private readonly _mapValueManager;
|
|
15
|
+
private readonly _renderer;
|
|
16
|
+
private readonly _googleMaps;
|
|
17
|
+
private readonly _ngUnsubscribe;
|
|
18
|
+
private readonly _fileInputElement;
|
|
19
|
+
private _listeners;
|
|
20
|
+
label: string | undefined | null;
|
|
21
|
+
icon: SeamIcon | undefined | null;
|
|
22
|
+
_onClick(event: MouseEvent): void;
|
|
23
|
+
constructor(_elementRef: ElementRef, _mapValueManager: MapValueManagerService, _renderer: Renderer2, _googleMaps: GoogleMapsService, _data?: GoogleMapsUploadButtonControlData);
|
|
24
|
+
/** @ignore */
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
private _getFile;
|
|
27
|
+
private _importFile;
|
|
28
|
+
private _createHiddenInput;
|
|
29
|
+
private _createTemporaryFormElement;
|
|
30
|
+
/**
|
|
31
|
+
* Reset input element, so that the same file can be added again.
|
|
32
|
+
*/
|
|
33
|
+
private _resetInput;
|
|
34
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { MenuComponent } from '@theseam/ui-common/menu';
|
|
5
|
+
import { MapValueManagerService } from './map-value-manager.service';
|
|
6
|
+
export declare class GoogleMapsService implements OnDestroy {
|
|
7
|
+
private readonly _mapValueManager;
|
|
8
|
+
private readonly _ngZone;
|
|
9
|
+
private readonly _vcr;
|
|
10
|
+
private readonly _ngUnsubscribe;
|
|
11
|
+
private readonly _mapReadySubject;
|
|
12
|
+
private _drawingManager?;
|
|
13
|
+
private _featureContextMenu;
|
|
14
|
+
private _activeContextMenu;
|
|
15
|
+
private _baseLatLng?;
|
|
16
|
+
private _allowDrawingHoleInPolygon;
|
|
17
|
+
private _fileInputHandler;
|
|
18
|
+
googleMap?: google.maps.Map;
|
|
19
|
+
readonly mapReady$: Observable<boolean>;
|
|
20
|
+
get mapReady(): boolean;
|
|
21
|
+
constructor(_mapValueManager: MapValueManagerService, _ngZone: NgZone, _vcr: ViewContainerRef);
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
setMap(map: google.maps.Map): void;
|
|
24
|
+
setBaseLatLng(lat: number, lng: number): void;
|
|
25
|
+
setFeatureContextMenu(menu: MenuComponent | null): void;
|
|
26
|
+
getDiv(): HTMLDivElement;
|
|
27
|
+
fitBounds(bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): void;
|
|
28
|
+
/**
|
|
29
|
+
* Iterates the map's features and removes any that are selected.
|
|
30
|
+
*/
|
|
31
|
+
deleteSelection(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Stops the current drawing.
|
|
34
|
+
*/
|
|
35
|
+
stopDrawing(): void;
|
|
36
|
+
private _initDrawingManager;
|
|
37
|
+
addControl(element: HTMLElement, position: google.maps.ControlPosition): void;
|
|
38
|
+
setData(data: any): Promise<void>;
|
|
39
|
+
reCenterOnFeatures(): void;
|
|
40
|
+
allowDrawingHoleInPolygon(allow: boolean): void;
|
|
41
|
+
setFileInputHandler(handler: ((file: File) => void) | undefined | null): void;
|
|
42
|
+
getFileInputHandler(): ((file: File) => void) | undefined | null;
|
|
43
|
+
private _initFeatureStyling;
|
|
44
|
+
private _initFeatureChangeListeners;
|
|
45
|
+
isDrawing(): boolean;
|
|
46
|
+
hasSelectedFeature(): boolean;
|
|
47
|
+
getSelectedFeature(): google.maps.Data.Feature | null;
|
|
48
|
+
openContextMenu(): void;
|
|
49
|
+
private _openContextMenuForFeature;
|
|
50
|
+
getGeoJson(removeAppProperties?: boolean): Promise<object>;
|
|
51
|
+
/** Asserts that the map has been initialized. */
|
|
52
|
+
private _assertInitialized;
|
|
53
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { GoogleMapsControlsService } from './google-maps-controls.service';
|
|
4
|
+
import { GoogleMapsService } from './google-maps.service';
|
|
5
|
+
import { MapControl } from './map-controls-service';
|
|
6
|
+
export declare class TheSeamMapsControlComponent implements OnInit, OnDestroy {
|
|
7
|
+
private readonly _googleMaps;
|
|
8
|
+
private readonly _googleMapsControls;
|
|
9
|
+
private readonly _ngUnsubscribe;
|
|
10
|
+
private _controlRef?;
|
|
11
|
+
set def(value: MapControl | null | undefined);
|
|
12
|
+
_def: MapControl | null | undefined;
|
|
13
|
+
constructor(_googleMaps: GoogleMapsService, _googleMapsControls: GoogleMapsControlsService);
|
|
14
|
+
/** @ignore */
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
/** @ignore */
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
private _add;
|
|
19
|
+
private _remove;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import { ComponentType } from '@theseam/ui-common/models';
|
|
4
|
+
export interface MapControl<TData = any> {
|
|
5
|
+
component: ComponentType<any>;
|
|
6
|
+
data?: TData;
|
|
7
|
+
position?: google.maps.ControlPosition;
|
|
8
|
+
}
|
|
9
|
+
export interface MapControlsService {
|
|
10
|
+
add(control: MapControl): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const MAP_CONTROLS_SERVICE: InjectionToken<MapControlsService>;
|
|
13
|
+
export declare const MAP_CONTROL_DATA: InjectionToken<any>;
|