@theseam/ui-common 1.0.0-beta.0 → 1.0.0-beta.10
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/index.d.ts +1 -2
- package/buttons/index.d.ts +20 -13
- package/datatable/index.d.ts +77 -39
- package/dynamic/index.d.ts +5 -5
- package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
- package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
- package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-card.mjs +21 -21
- package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
- package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
- package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-core.mjs +31 -11
- package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
- package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
- package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable.mjs +727 -420
- package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
- package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
- package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
- package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field.mjs +129 -76
- package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-framework.mjs +669 -543
- package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
- package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-graphql.mjs +311 -254
- package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-icon.mjs +125 -89
- package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-layout.mjs +18 -26
- package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-loading.mjs +19 -28
- package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-menu.mjs +124 -95
- package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-modal.mjs +178 -129
- package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-models.mjs +3 -3
- package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
- package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-popover.mjs +81 -88
- package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-progress.mjs +15 -19
- package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
- package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
- package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-services.mjs +41 -26
- package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-shared.mjs +149 -159
- package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-storage.mjs +9 -6
- package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
- package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
- package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-type.mjs +63 -39
- package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
- package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table.mjs +62 -41
- package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
- package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-testing.mjs +13 -10
- package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
- package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
- package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
- package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
- package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-utils.mjs +113 -77
- package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-validators.mjs +10 -9
- package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-viewers.mjs +80 -53
- package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-widget.mjs +288 -314
- package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
- package/form-field/index.d.ts +1 -1
- package/framework/base-layout/base-layout.component.scss +9 -4
- package/framework/base-layout/styles/_variables.scss +4 -9
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
- package/framework/index.d.ts +6 -6
- package/framework/nav/nav-item/nav-item.component.scss +7 -6
- package/framework/nav/styles/_themes/light/_variables.scss +21 -5
- package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
- package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
- package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
- package/graphql/index.d.ts +49 -7
- package/modal/README.md +5 -5
- package/modal/index.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/package.json +59 -60
- package/popover/index.d.ts +0 -2
- package/progress/progress-circle/styles/_variables.scss +15 -3
- package/shared/index.d.ts +0 -13
- package/story-helpers/index.d.ts +11 -1
- package/styles/bootstrap/_bootstrap.scss +34 -34
- package/styles/bootstrap/_bs-styles.scss +4 -8
- package/styles/bootstrap/_bs-utilities.scss +4 -4
- package/styles/bootstrap/_bs-variables.scss +65 -70
- package/styles/common/_forms.scss +9 -10
- package/styles/common/_global.scss +0 -1
- package/styles/common/_hacks.scss +1 -1
- package/styles/common/_table.scss +0 -1
- package/styles/common/_text.scss +3 -1
- package/styles/theme.scss +1 -1
- package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
- package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
- package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
- package/styles/vendor/quill/_quill.scss +15 -9
- package/table/index.d.ts +4 -1
- package/table-cell-type/index.d.ts +27 -2
- package/tel-input/README.md +27 -27
- package/utils/index.d.ts +3 -3
- package/viewers/index.d.ts +9 -2
- package/widget/_widget-theme.scss +1 -1
- package/widget/styles/_variables.scss +2 -2
- package/widget/widget/widget.component.scss +0 -2
- package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
- package/widget/widget-footer/widget-footer.component.scss +0 -1
|
@@ -33,8 +33,7 @@ var AppFeaturePropertyName;
|
|
|
33
33
|
AppFeaturePropertyName["IsSelected"] = "__app__isSelected";
|
|
34
34
|
})(AppFeaturePropertyName || (AppFeaturePropertyName = {}));
|
|
35
35
|
function isAppFeatureProperty(propertyName) {
|
|
36
|
-
return Object.values(AppFeaturePropertyName)
|
|
37
|
-
.findIndex(value => value === propertyName) !== -1;
|
|
36
|
+
return (Object.values(AppFeaturePropertyName).findIndex((value) => value === propertyName) !== -1);
|
|
38
37
|
}
|
|
39
38
|
function isFeatureSelected(feature) {
|
|
40
39
|
const isSelected = feature.getProperty(AppFeaturePropertyName.IsSelected);
|
|
@@ -47,13 +46,13 @@ const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_PROPERTY_NAME = 'styleOptions';
|
|
|
47
46
|
const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_HOVERED_PROPERTY_NAME = 'styleOptionsHovered';
|
|
48
47
|
const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_SELECTED_PROPERTY_NAME = 'styleOptionsSelected';
|
|
49
48
|
function getStyleOptionsDefinedByFeature(feature) {
|
|
50
|
-
return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_PROPERTY_NAME) || undefined;
|
|
49
|
+
return (feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_PROPERTY_NAME) || undefined);
|
|
51
50
|
}
|
|
52
51
|
function getHoveredStyleOptionsDefinedByFeature(feature) {
|
|
53
|
-
return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_HOVERED_PROPERTY_NAME) || undefined;
|
|
52
|
+
return (feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_HOVERED_PROPERTY_NAME) || undefined);
|
|
54
53
|
}
|
|
55
54
|
function getSelectedStyleOptionsDefinedByFeature(feature) {
|
|
56
|
-
return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_SELECTED_PROPERTY_NAME) || undefined;
|
|
55
|
+
return (feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_SELECTED_PROPERTY_NAME) || undefined);
|
|
57
56
|
}
|
|
58
57
|
// TODO: Check performance of cloning a google.maps.Data instance, so the
|
|
59
58
|
// properties can be removed with the google maps api, instead of on the
|
|
@@ -78,7 +77,7 @@ function stripAppFeaturePropertiesFromJson(json) {
|
|
|
78
77
|
*/
|
|
79
78
|
function getPossibleExteriorFeature(data, feature) {
|
|
80
79
|
let exteriorPolygonFeature;
|
|
81
|
-
data.forEach(f => {
|
|
80
|
+
data.forEach((f) => {
|
|
82
81
|
if (f === feature) {
|
|
83
82
|
return;
|
|
84
83
|
}
|
|
@@ -104,14 +103,15 @@ function addInnerFeatureCutoutToExteriorFeature(exteriorFeature, innerFeature) {
|
|
|
104
103
|
// NOTE: Other geometries may support cutouts, but our map shapes editor only
|
|
105
104
|
// supports polygons currently, so we will need to handle other geometry types
|
|
106
105
|
// here if we start allowing users to draw shapes other than polygon.
|
|
107
|
-
if (exteriorGeometry.getType() !== 'Polygon' ||
|
|
106
|
+
if (exteriorGeometry.getType() !== 'Polygon' ||
|
|
107
|
+
innerGeometry.getType() !== 'Polygon') {
|
|
108
108
|
throw Error(`Inner cutout is only supported by Polygon gemoetry.`);
|
|
109
109
|
}
|
|
110
110
|
const featurePolygon = innerGeometry;
|
|
111
111
|
const exteriorPolygon = exteriorGeometry;
|
|
112
112
|
exteriorFeature.setGeometry(new google.maps.Data.Polygon([
|
|
113
113
|
...exteriorPolygon.getArray(),
|
|
114
|
-
featurePolygon.getAt(0).getArray().reverse()
|
|
114
|
+
featurePolygon.getAt(0).getArray().reverse(),
|
|
115
115
|
]));
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
@@ -139,14 +139,14 @@ function polygonHasValidPathsLengths(polygon, minPointsInValidPath = 3) {
|
|
|
139
139
|
return true;
|
|
140
140
|
}
|
|
141
141
|
function polygonCoordinates(polygon) {
|
|
142
|
-
return polygon.getArray().map(linRing => {
|
|
143
|
-
const coords = linRing.getArray().map(x => [x.lng(), x.lat()]);
|
|
142
|
+
return polygon.getArray().map((linRing) => {
|
|
143
|
+
const coords = linRing.getArray().map((x) => [x.lng(), x.lat()]);
|
|
144
144
|
fixPathDifferentStartingAndEndingPoint(coords);
|
|
145
145
|
return coords;
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
function multiPolygonCoordinates(multiPolygon) {
|
|
149
|
-
return multiPolygon.getArray().map(x => polygonCoordinates(x));
|
|
149
|
+
return multiPolygon.getArray().map((x) => polygonCoordinates(x));
|
|
150
150
|
}
|
|
151
151
|
function toTurfJsPolygon(polygon$1) {
|
|
152
152
|
return polygon(polygonCoordinates(polygon$1));
|
|
@@ -173,19 +173,22 @@ function featureContains(featureA, featureB) {
|
|
|
173
173
|
return booleanContains(polygonA, polygonB);
|
|
174
174
|
}
|
|
175
175
|
function createDataFeatureFromPolygon(polygon) {
|
|
176
|
-
const arr = polygon
|
|
176
|
+
const arr = polygon
|
|
177
|
+
.getPaths()
|
|
178
|
+
.getArray()
|
|
179
|
+
.map((x) => x.getArray());
|
|
177
180
|
return new google.maps.Data.Feature({
|
|
178
|
-
geometry: new google.maps.Data.Polygon(arr)
|
|
181
|
+
geometry: new google.maps.Data.Polygon(arr),
|
|
179
182
|
});
|
|
180
183
|
}
|
|
181
184
|
function getBoundsWithAllFeatures(data) {
|
|
182
185
|
const bounds = new google.maps.LatLngBounds();
|
|
183
|
-
data.forEach(feature => {
|
|
186
|
+
data.forEach((feature) => {
|
|
184
187
|
const geometry = feature.getGeometry();
|
|
185
188
|
if (geometry === null) {
|
|
186
189
|
throw Error(`Geometry not found.`);
|
|
187
190
|
}
|
|
188
|
-
geometry.forEachLatLng(latLng => {
|
|
191
|
+
geometry.forEachLatLng((latLng) => {
|
|
189
192
|
bounds.extend(latLng);
|
|
190
193
|
});
|
|
191
194
|
});
|
|
@@ -197,7 +200,7 @@ function getFeatureBounds(feature) {
|
|
|
197
200
|
if (geometry === null) {
|
|
198
201
|
throw Error(`Geometry not found.`);
|
|
199
202
|
}
|
|
200
|
-
geometry.forEachLatLng(latLng => {
|
|
203
|
+
geometry.forEachLatLng((latLng) => {
|
|
201
204
|
bounds.extend(latLng);
|
|
202
205
|
});
|
|
203
206
|
return bounds;
|
|
@@ -206,7 +209,7 @@ function getFeatureCenter(feature) {
|
|
|
206
209
|
return getFeatureBounds(feature).getCenter();
|
|
207
210
|
}
|
|
208
211
|
function removeAllFeatures(data) {
|
|
209
|
-
data.forEach(f => data.remove(f));
|
|
212
|
+
data.forEach((f) => data.remove(f));
|
|
210
213
|
}
|
|
211
214
|
function getFeaturesCount(data) {
|
|
212
215
|
let count = 0;
|
|
@@ -217,26 +220,36 @@ function getFeaturesCount(data) {
|
|
|
217
220
|
* NOTE: Original events are not emitted, because filtering may omit events.
|
|
218
221
|
*/
|
|
219
222
|
function createFeatureChangeObservable(data, ngZone) {
|
|
220
|
-
return new Observable(subscriber => {
|
|
223
|
+
return new Observable((subscriber) => {
|
|
221
224
|
const listeners = [];
|
|
222
225
|
ngZone.runOutsideAngular(() => {
|
|
223
226
|
listeners.push(data.addListener('setgeometry', (event) => {
|
|
224
|
-
ngZone.run(() => {
|
|
227
|
+
ngZone.run(() => {
|
|
228
|
+
subscriber.next(undefined);
|
|
229
|
+
});
|
|
225
230
|
}));
|
|
226
231
|
listeners.push(data.addListener('addfeature', (event) => {
|
|
227
|
-
ngZone.run(() => {
|
|
232
|
+
ngZone.run(() => {
|
|
233
|
+
subscriber.next(undefined);
|
|
234
|
+
});
|
|
228
235
|
}));
|
|
229
236
|
listeners.push(data.addListener('removefeature', (event) => {
|
|
230
|
-
ngZone.run(() => {
|
|
237
|
+
ngZone.run(() => {
|
|
238
|
+
subscriber.next(undefined);
|
|
239
|
+
});
|
|
231
240
|
}));
|
|
232
241
|
listeners.push(data.addListener('setproperty', (event) => {
|
|
233
242
|
if (!isAppFeatureProperty(event.name)) {
|
|
234
|
-
ngZone.run(() => {
|
|
243
|
+
ngZone.run(() => {
|
|
244
|
+
subscriber.next(undefined);
|
|
245
|
+
});
|
|
235
246
|
}
|
|
236
247
|
}));
|
|
237
248
|
listeners.push(data.addListener('removeproperty', (event) => {
|
|
238
249
|
if (!isAppFeatureProperty(event.name)) {
|
|
239
|
-
ngZone.run(() => {
|
|
250
|
+
ngZone.run(() => {
|
|
251
|
+
subscriber.next(undefined);
|
|
252
|
+
});
|
|
240
253
|
}
|
|
241
254
|
}));
|
|
242
255
|
});
|
|
@@ -276,10 +289,12 @@ class GoogleMapsContextMenu {
|
|
|
276
289
|
setTimeout(() => {
|
|
277
290
|
this._menu.focusFirstItem('program');
|
|
278
291
|
});
|
|
279
|
-
this._menu.closed.pipe(takeUntil(ngUnsubscribe)).subscribe(v => {
|
|
292
|
+
this._menu.closed.pipe(takeUntil(ngUnsubscribe)).subscribe((v) => {
|
|
280
293
|
this.close();
|
|
281
294
|
});
|
|
282
|
-
fromEvent(document, 'keydown')
|
|
295
|
+
fromEvent(document, 'keydown')
|
|
296
|
+
.pipe(takeUntil(ngUnsubscribe))
|
|
297
|
+
.subscribe((event) => {
|
|
283
298
|
if (event.keyCode === ESCAPE) {
|
|
284
299
|
this.close();
|
|
285
300
|
}
|
|
@@ -335,24 +350,36 @@ class GoogleMapsContextMenu {
|
|
|
335
350
|
this._ngZone.runOutsideAngular(() => {
|
|
336
351
|
listeners.push(this._data.addListener('removefeature', (event) => {
|
|
337
352
|
if (event.feature === this._feature) {
|
|
338
|
-
this._ngZone.run(() => {
|
|
353
|
+
this._ngZone.run(() => {
|
|
354
|
+
this.close();
|
|
355
|
+
});
|
|
339
356
|
}
|
|
340
357
|
}));
|
|
341
358
|
listeners.push(this._data.addListener('setproperty', (event) => {
|
|
342
|
-
if (event.feature === this._feature &&
|
|
343
|
-
this.
|
|
359
|
+
if (event.feature === this._feature &&
|
|
360
|
+
!isFeatureSelected(this._feature)) {
|
|
361
|
+
this._ngZone.run(() => {
|
|
362
|
+
this.close();
|
|
363
|
+
});
|
|
344
364
|
}
|
|
345
365
|
}));
|
|
346
366
|
listeners.push(this._data.addListener('removeproperty', (event) => {
|
|
347
|
-
if (event.feature === this._feature &&
|
|
348
|
-
this.
|
|
367
|
+
if (event.feature === this._feature &&
|
|
368
|
+
!isFeatureSelected(this._feature)) {
|
|
369
|
+
this._ngZone.run(() => {
|
|
370
|
+
this.close();
|
|
371
|
+
});
|
|
349
372
|
}
|
|
350
373
|
}));
|
|
351
374
|
listeners.push(this._map.addListener('click', (event) => {
|
|
352
|
-
this._ngZone.run(() => {
|
|
375
|
+
this._ngZone.run(() => {
|
|
376
|
+
this.close();
|
|
377
|
+
});
|
|
353
378
|
}));
|
|
354
379
|
listeners.push(this._data.addListener('click', (event) => {
|
|
355
|
-
this._ngZone.run(() => {
|
|
380
|
+
this._ngZone.run(() => {
|
|
381
|
+
this.close();
|
|
382
|
+
});
|
|
356
383
|
}));
|
|
357
384
|
});
|
|
358
385
|
this._cleanupFn = () => {
|
|
@@ -406,10 +433,10 @@ class MapValueManagerService {
|
|
|
406
433
|
get value() {
|
|
407
434
|
return this._value;
|
|
408
435
|
}
|
|
409
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
410
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
436
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MapValueManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
437
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MapValueManagerService });
|
|
411
438
|
}
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MapValueManagerService, decorators: [{
|
|
413
440
|
type: Injectable
|
|
414
441
|
}], ctorParameters: () => [] });
|
|
415
442
|
|
|
@@ -421,9 +448,7 @@ const DEFAULT_POLYGON_OPTIONS = (editingEnabled) => ({
|
|
|
421
448
|
const DEFAULT_DRAWING_MANAGER_OPTIONS = (editingEnabled) => ({
|
|
422
449
|
drawingControl: editingEnabled,
|
|
423
450
|
drawingControlOptions: {
|
|
424
|
-
drawingModes: [
|
|
425
|
-
google.maps.drawing.OverlayType.POLYGON,
|
|
426
|
-
],
|
|
451
|
+
drawingModes: [google.maps.drawing.OverlayType.POLYGON],
|
|
427
452
|
},
|
|
428
453
|
polygonOptions: DEFAULT_POLYGON_OPTIONS(editingEnabled),
|
|
429
454
|
drawingMode: null,
|
|
@@ -486,7 +511,9 @@ class GoogleMapsService {
|
|
|
486
511
|
_fileInputHandler;
|
|
487
512
|
googleMap;
|
|
488
513
|
mapReady$;
|
|
489
|
-
get mapReady() {
|
|
514
|
+
get mapReady() {
|
|
515
|
+
return this._mapReadySubject.value;
|
|
516
|
+
}
|
|
490
517
|
editingEnabled$;
|
|
491
518
|
constructor(_mapValueManager, _ngZone, _vcr) {
|
|
492
519
|
this._mapValueManager = _mapValueManager;
|
|
@@ -527,7 +554,7 @@ class GoogleMapsService {
|
|
|
527
554
|
const options = DEFAULT_DRAWING_MANAGER_OPTIONS(this.isEditingEnabled());
|
|
528
555
|
this._drawingManager?.setOptions(options);
|
|
529
556
|
this._drawingManager?.setMap(null);
|
|
530
|
-
this.googleMap.data.forEach(f => {
|
|
557
|
+
this.googleMap.data.forEach((f) => {
|
|
531
558
|
if (isFeatureSelected(f)) {
|
|
532
559
|
setFeatureSelected(f, false);
|
|
533
560
|
}
|
|
@@ -557,7 +584,7 @@ class GoogleMapsService {
|
|
|
557
584
|
deleteSelection() {
|
|
558
585
|
this._assertInitialized();
|
|
559
586
|
const mapData = this.googleMap.data;
|
|
560
|
-
mapData.forEach(f => {
|
|
587
|
+
mapData.forEach((f) => {
|
|
561
588
|
if (isFeatureSelected(f)) {
|
|
562
589
|
mapData.remove(f);
|
|
563
590
|
}
|
|
@@ -568,7 +595,8 @@ class GoogleMapsService {
|
|
|
568
595
|
*/
|
|
569
596
|
stopDrawing() {
|
|
570
597
|
this._ngZone.runOutsideAngular(() => {
|
|
571
|
-
if (isNullOrUndefined(this._drawingManager) ||
|
|
598
|
+
if (isNullOrUndefined(this._drawingManager) ||
|
|
599
|
+
this._drawingManager.getDrawingMode() === null) {
|
|
572
600
|
return;
|
|
573
601
|
}
|
|
574
602
|
// Listening for the completion event of the overlay currently being drawn
|
|
@@ -607,7 +635,7 @@ class GoogleMapsService {
|
|
|
607
635
|
this._drawingManager.addListener('drawingmode_changed', (event) => {
|
|
608
636
|
if (this._drawingManager?.getDrawingMode() !== null) {
|
|
609
637
|
this._assertInitialized();
|
|
610
|
-
this.googleMap.data.forEach(f => {
|
|
638
|
+
this.googleMap.data.forEach((f) => {
|
|
611
639
|
if (isFeatureSelected(f)) {
|
|
612
640
|
setFeatureSelected(f, false);
|
|
613
641
|
}
|
|
@@ -658,10 +686,10 @@ class GoogleMapsService {
|
|
|
658
686
|
// selection when the map looses focus.
|
|
659
687
|
this.googleMap.addListener('click', (even) => {
|
|
660
688
|
this._assertInitialized();
|
|
661
|
-
this.googleMap.data.forEach(f => setFeatureSelected(f, false));
|
|
689
|
+
this.googleMap.data.forEach((f) => setFeatureSelected(f, false));
|
|
662
690
|
});
|
|
663
691
|
// Determine what the style of the features are.
|
|
664
|
-
this.googleMap.data.setStyle(feature => {
|
|
692
|
+
this.googleMap.data.setStyle((feature) => {
|
|
665
693
|
let opts = FEATURE_STYLE_OPTIONS_DEFAULT(this.isEditingEnabled());
|
|
666
694
|
const options = getStyleOptionsDefinedByFeature(feature);
|
|
667
695
|
this._mergeStyleOptions(opts, options ?? {});
|
|
@@ -676,7 +704,7 @@ class GoogleMapsService {
|
|
|
676
704
|
this.googleMap.data.addListener('click', (event) => {
|
|
677
705
|
this._assertInitialized();
|
|
678
706
|
setFeatureSelected(event.feature, true);
|
|
679
|
-
this.googleMap.data.forEach(f => {
|
|
707
|
+
this.googleMap.data.forEach((f) => {
|
|
680
708
|
if (f !== event.feature && isFeatureSelected(f)) {
|
|
681
709
|
setFeatureSelected(f, false);
|
|
682
710
|
}
|
|
@@ -715,7 +743,9 @@ class GoogleMapsService {
|
|
|
715
743
|
}
|
|
716
744
|
_initFeatureChangeListeners() {
|
|
717
745
|
this._assertInitialized();
|
|
718
|
-
createFeatureChangeObservable(this.googleMap.data, this._ngZone)
|
|
746
|
+
createFeatureChangeObservable(this.googleMap.data, this._ngZone)
|
|
747
|
+
.pipe(switchMap(() => from(this.getGeoJson()).pipe(tap((geoJson) => this._mapValueManager.setValue(geoJson, MapValueSource.FeatureChange)))), takeUntil(this._ngUnsubscribe))
|
|
748
|
+
.subscribe();
|
|
719
749
|
this.googleMap.data.addListener('contextmenu', (event) => {
|
|
720
750
|
if (!isFeatureSelected(event.feature)) {
|
|
721
751
|
return;
|
|
@@ -775,7 +805,7 @@ class GoogleMapsService {
|
|
|
775
805
|
hasSelectedFeature() {
|
|
776
806
|
this._assertInitialized();
|
|
777
807
|
let isSelected = false;
|
|
778
|
-
this.googleMap.data.forEach(f => {
|
|
808
|
+
this.googleMap.data.forEach((f) => {
|
|
779
809
|
if (isFeatureSelected(f)) {
|
|
780
810
|
isSelected = true;
|
|
781
811
|
}
|
|
@@ -786,7 +816,7 @@ class GoogleMapsService {
|
|
|
786
816
|
getSelectedFeature() {
|
|
787
817
|
this._assertInitialized();
|
|
788
818
|
let feature = null;
|
|
789
|
-
this.googleMap.data.forEach(f => {
|
|
819
|
+
this.googleMap.data.forEach((f) => {
|
|
790
820
|
if (isFeatureSelected(f)) {
|
|
791
821
|
feature = f;
|
|
792
822
|
}
|
|
@@ -822,7 +852,7 @@ class GoogleMapsService {
|
|
|
822
852
|
getGeoJson(removeAppProperties = true) {
|
|
823
853
|
return new Promise((resolve, reject) => {
|
|
824
854
|
this._assertInitialized();
|
|
825
|
-
this.googleMap.data.toGeoJson(f => {
|
|
855
|
+
this.googleMap.data.toGeoJson((f) => {
|
|
826
856
|
if (removeAppProperties) {
|
|
827
857
|
stripAppFeaturePropertiesFromJson(f);
|
|
828
858
|
}
|
|
@@ -837,10 +867,10 @@ class GoogleMapsService {
|
|
|
837
867
|
'Please wait for the API to load before trying to interact with it.');
|
|
838
868
|
}
|
|
839
869
|
}
|
|
840
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
841
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
870
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsService, deps: [{ token: MapValueManagerService }, { token: i0.NgZone }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
871
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsService });
|
|
842
872
|
}
|
|
843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsService, decorators: [{
|
|
844
874
|
type: Injectable
|
|
845
875
|
}], ctorParameters: () => [{ type: MapValueManagerService }, { type: i0.NgZone }, { type: i0.ViewContainerRef }] });
|
|
846
876
|
|
|
@@ -865,7 +895,7 @@ class MapControlRef {
|
|
|
865
895
|
if (this._controlDef.data) {
|
|
866
896
|
providers.push({
|
|
867
897
|
provide: MAP_CONTROL_DATA,
|
|
868
|
-
useValue: this._controlDef.data
|
|
898
|
+
useValue: this._controlDef.data,
|
|
869
899
|
});
|
|
870
900
|
}
|
|
871
901
|
const injector = Injector.create({
|
|
@@ -913,10 +943,10 @@ class GoogleMapsControlsService {
|
|
|
913
943
|
add(control) {
|
|
914
944
|
return new MapControlRef(this._googleMaps, this._injector, control, this._viewContainerRef);
|
|
915
945
|
}
|
|
916
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
917
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
946
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsControlsService, deps: [{ token: GoogleMapsService }, { token: i0.Injector }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
947
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsControlsService });
|
|
918
948
|
}
|
|
919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: GoogleMapsControlsService, decorators: [{
|
|
920
950
|
type: Injectable
|
|
921
951
|
}], ctorParameters: () => [{ type: GoogleMapsService }, { type: i0.Injector }, { type: i0.ViewContainerRef }] });
|
|
922
952
|
|
|
@@ -945,21 +975,21 @@ class TheSeamGoogleMapsRecenterButtonControlComponent {
|
|
|
945
975
|
}
|
|
946
976
|
/** @ignore */
|
|
947
977
|
ngOnDestroy() {
|
|
948
|
-
this._listeners.forEach(l => l());
|
|
978
|
+
this._listeners.forEach((l) => l());
|
|
949
979
|
this._ngUnsubscribe.next();
|
|
950
980
|
this._ngUnsubscribe.complete();
|
|
951
981
|
}
|
|
952
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
953
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
982
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsRecenterButtonControlComponent, deps: [{ token: GoogleMapsService }, { token: MAP_CONTROL_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
983
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamGoogleMapsRecenterButtonControlComponent, isStandalone: false, selector: "button[seam-google-maps-recenter-button-control]", inputs: { label: "label", icon: "icon" }, host: { attributes: { "type": "button" }, listeners: { "click": "_onClick(event)" }, properties: { "attr.draggable": "false", "attr.aria-label": "label", "attr.title": "label" }, classAttribute: "gmnoprint gm-control-active" }, ngImport: i0, template: "<seam-icon [icon]=\"icon\" iconType=\"image-fill\"></seam-icon>\n", styles: [":host{background:none #fff;border:0px;margin:10px;padding:11px;text-transform:none;appearance:none;position:absolute;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:2px;height:40px;width:40px;box-shadow:#0000004d 0 1px 4px -1px;overflow:hidden}\n"], dependencies: [{ kind: "component", type: i2.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
954
984
|
}
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsRecenterButtonControlComponent, decorators: [{
|
|
956
986
|
type: Component,
|
|
957
987
|
args: [{ selector: 'button[seam-google-maps-recenter-button-control]', host: {
|
|
958
988
|
'[attr.draggable]': 'false',
|
|
959
989
|
'[attr.aria-label]': 'label',
|
|
960
990
|
'[attr.title]': 'label',
|
|
961
|
-
|
|
962
|
-
|
|
991
|
+
type: 'button',
|
|
992
|
+
class: 'gmnoprint gm-control-active',
|
|
963
993
|
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-icon [icon]=\"icon\" iconType=\"image-fill\"></seam-icon>\n", styles: [":host{background:none #fff;border:0px;margin:10px;padding:11px;text-transform:none;appearance:none;position:absolute;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:2px;height:40px;width:40px;box-shadow:#0000004d 0 1px 4px -1px;overflow:hidden}\n"] }]
|
|
964
994
|
}], ctorParameters: () => [{ type: GoogleMapsService }, { type: undefined, decorators: [{
|
|
965
995
|
type: Optional
|
|
@@ -1009,7 +1039,7 @@ class TheSeamGoogleMapsUploadButtonControlComponent {
|
|
|
1009
1039
|
}
|
|
1010
1040
|
/** @ignore */
|
|
1011
1041
|
ngOnDestroy() {
|
|
1012
|
-
this._listeners.forEach(l => l());
|
|
1042
|
+
this._listeners.forEach((l) => l());
|
|
1013
1043
|
this._ngUnsubscribe.next();
|
|
1014
1044
|
this._ngUnsubscribe.complete();
|
|
1015
1045
|
}
|
|
@@ -1062,17 +1092,17 @@ class TheSeamGoogleMapsUploadButtonControlComponent {
|
|
|
1062
1092
|
formElement.reset();
|
|
1063
1093
|
this._renderer.appendChild(this._elementRef.nativeElement, this._fileInputElement);
|
|
1064
1094
|
}
|
|
1065
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1066
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1095
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsUploadButtonControlComponent, deps: [{ token: i0.ElementRef }, { token: MapValueManagerService }, { token: i0.Renderer2 }, { token: GoogleMapsService }, { token: MAP_CONTROL_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1096
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamGoogleMapsUploadButtonControlComponent, isStandalone: false, selector: "button[seam-google-maps-upload-button-control]", inputs: { label: "label", icon: "icon" }, host: { attributes: { "type": "button" }, listeners: { "click": "_onClick(event)" }, properties: { "attr.draggable": "false", "attr.aria-label": "label", "attr.title": "label" }, classAttribute: "gmnoprint gm-control-active" }, ngImport: i0, template: "<seam-icon [icon]=\"icon\" iconType=\"image-fill\"></seam-icon>\n", styles: [":host{background:none #fff;border:0px;margin:10px;padding:11px;text-transform:none;appearance:none;position:absolute;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:2px;height:40px;width:40px;box-shadow:#0000004d 0 1px 4px -1px;overflow:hidden}\n"], dependencies: [{ kind: "component", type: i2.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1067
1097
|
}
|
|
1068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1098
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsUploadButtonControlComponent, decorators: [{
|
|
1069
1099
|
type: Component,
|
|
1070
1100
|
args: [{ selector: 'button[seam-google-maps-upload-button-control]', host: {
|
|
1071
1101
|
'[attr.draggable]': 'false',
|
|
1072
1102
|
'[attr.aria-label]': 'label',
|
|
1073
1103
|
'[attr.title]': 'label',
|
|
1074
|
-
|
|
1075
|
-
|
|
1104
|
+
type: 'button',
|
|
1105
|
+
class: 'gmnoprint gm-control-active',
|
|
1076
1106
|
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-icon [icon]=\"icon\" iconType=\"image-fill\"></seam-icon>\n", styles: [":host{background:none #fff;border:0px;margin:10px;padding:11px;text-transform:none;appearance:none;position:absolute;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:2px;height:40px;width:40px;box-shadow:#0000004d 0 1px 4px -1px;overflow:hidden}\n"] }]
|
|
1077
1107
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: MapValueManagerService }, { type: i0.Renderer2 }, { type: GoogleMapsService }, { type: undefined, decorators: [{
|
|
1078
1108
|
type: Optional
|
|
@@ -1116,14 +1146,16 @@ class TheSeamMapFileDropComponent {
|
|
|
1116
1146
|
}
|
|
1117
1147
|
/** @ignore */
|
|
1118
1148
|
ngOnInit() {
|
|
1119
|
-
this._googleMaps.mapReady
|
|
1149
|
+
this._googleMaps.mapReady$
|
|
1150
|
+
.pipe(tap((ready) => {
|
|
1120
1151
|
if (ready) {
|
|
1121
1152
|
this._enableFileDrop();
|
|
1122
1153
|
}
|
|
1123
1154
|
else {
|
|
1124
1155
|
this._disableFileDrop();
|
|
1125
1156
|
}
|
|
1126
|
-
}), takeUntil(this._ngUnsubscribe))
|
|
1157
|
+
}), takeUntil(this._ngUnsubscribe))
|
|
1158
|
+
.subscribe();
|
|
1127
1159
|
}
|
|
1128
1160
|
/** @ignore */
|
|
1129
1161
|
ngOnDestroy() {
|
|
@@ -1157,7 +1189,7 @@ class TheSeamMapFileDropComponent {
|
|
|
1157
1189
|
}
|
|
1158
1190
|
_disableFileDrop() {
|
|
1159
1191
|
if (this._listeners.length > 0) {
|
|
1160
|
-
this._listeners.forEach(l => l());
|
|
1192
|
+
this._listeners.forEach((l) => l());
|
|
1161
1193
|
this._listeners = [];
|
|
1162
1194
|
}
|
|
1163
1195
|
}
|
|
@@ -1184,7 +1216,7 @@ class TheSeamMapFileDropComponent {
|
|
|
1184
1216
|
}
|
|
1185
1217
|
const item = event.dataTransfer.items[0];
|
|
1186
1218
|
const file = item.getAsFile();
|
|
1187
|
-
readGeoFile(file).then(json => {
|
|
1219
|
+
readGeoFile(file).then((json) => {
|
|
1188
1220
|
this._mapValueManager.setValue(json, MapValueSource.Input);
|
|
1189
1221
|
});
|
|
1190
1222
|
};
|
|
@@ -1212,10 +1244,10 @@ class TheSeamMapFileDropComponent {
|
|
|
1212
1244
|
_isSupportedDataTransferTypes(dataTransfer) {
|
|
1213
1245
|
return dataTransfer.types[0] === 'Files';
|
|
1214
1246
|
}
|
|
1215
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1216
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1247
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamMapFileDropComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: GoogleMapsService }, { token: MapValueManagerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1248
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamMapFileDropComponent, isStandalone: false, selector: "seam-map-file-drop", ngImport: i0, template: "", styles: [":host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999!important;background-color:#1e1e1eb3}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1217
1249
|
}
|
|
1218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamMapFileDropComponent, decorators: [{
|
|
1219
1251
|
type: Component,
|
|
1220
1252
|
args: [{ selector: 'seam-map-file-drop', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "", styles: [":host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999!important;background-color:#1e1e1eb3}\n"] }]
|
|
1221
1253
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: GoogleMapsService }, { type: MapValueManagerService }, { type: i0.Renderer2 }] });
|
|
@@ -1238,14 +1270,16 @@ class TheSeamMapsControlComponent {
|
|
|
1238
1270
|
}
|
|
1239
1271
|
/** @ignore */
|
|
1240
1272
|
ngOnInit() {
|
|
1241
|
-
this._googleMaps.mapReady
|
|
1273
|
+
this._googleMaps.mapReady$
|
|
1274
|
+
.pipe(tap((ready) => {
|
|
1242
1275
|
if (ready) {
|
|
1243
1276
|
this._add();
|
|
1244
1277
|
}
|
|
1245
1278
|
else {
|
|
1246
1279
|
this._remove();
|
|
1247
1280
|
}
|
|
1248
|
-
}), takeUntil(this._ngUnsubscribe))
|
|
1281
|
+
}), takeUntil(this._ngUnsubscribe))
|
|
1282
|
+
.subscribe();
|
|
1249
1283
|
}
|
|
1250
1284
|
/** @ignore */
|
|
1251
1285
|
ngOnDestroy() {
|
|
@@ -1266,10 +1300,10 @@ class TheSeamMapsControlComponent {
|
|
|
1266
1300
|
this._controlRef?.destroy();
|
|
1267
1301
|
this._controlRef = undefined;
|
|
1268
1302
|
}
|
|
1269
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1270
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamMapsControlComponent, deps: [{ token: GoogleMapsService }, { token: MAP_CONTROLS_SERVICE }], target: i0.ɵɵFactoryTarget.Component });
|
|
1304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamMapsControlComponent, isStandalone: false, selector: "seam-map-control", inputs: { def: "def" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1271
1305
|
}
|
|
1272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamMapsControlComponent, decorators: [{
|
|
1273
1307
|
type: Component,
|
|
1274
1308
|
args: [{
|
|
1275
1309
|
selector: 'seam-map-control',
|
|
@@ -1332,8 +1366,12 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1332
1366
|
get value() {
|
|
1333
1367
|
return this._mapValueManager.value;
|
|
1334
1368
|
}
|
|
1335
|
-
set tabIndex(value) {
|
|
1336
|
-
|
|
1369
|
+
set tabIndex(value) {
|
|
1370
|
+
this._tabIndex = coerceNumberProperty(value);
|
|
1371
|
+
}
|
|
1372
|
+
get tabIndex() {
|
|
1373
|
+
return this._tabIndex;
|
|
1374
|
+
}
|
|
1337
1375
|
/**
|
|
1338
1376
|
* Set the tab index to `-1` to allow the root element of the
|
|
1339
1377
|
* component to receive `focus` event from javascript, but not get focused by
|
|
@@ -1351,8 +1389,12 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1351
1389
|
set fileImportHandler(value) {
|
|
1352
1390
|
this._googleMaps.setFileInputHandler(value);
|
|
1353
1391
|
}
|
|
1354
|
-
get _attrDisabled() {
|
|
1355
|
-
|
|
1392
|
+
get _attrDisabled() {
|
|
1393
|
+
return this.disabled || null;
|
|
1394
|
+
}
|
|
1395
|
+
get _attrTabIndex() {
|
|
1396
|
+
return this.disabled ? -1 : this.tabIndex || 0;
|
|
1397
|
+
}
|
|
1356
1398
|
onChange;
|
|
1357
1399
|
onTouched;
|
|
1358
1400
|
zoom = 14;
|
|
@@ -1376,26 +1418,37 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1376
1418
|
this._googleMaps = _googleMaps;
|
|
1377
1419
|
this._mapValueManager = _mapValueManager;
|
|
1378
1420
|
this._googleMapsApiLoader = _googleMapsApiLoader;
|
|
1379
|
-
this._focusMonitor
|
|
1380
|
-
|
|
1421
|
+
this._focusMonitor
|
|
1422
|
+
.monitor(this._elementRef, true)
|
|
1423
|
+
.pipe(tap((origin) => {
|
|
1424
|
+
this._focusOrigin = origin;
|
|
1425
|
+
}), takeUntil(this._ngUnsubscribe))
|
|
1426
|
+
.subscribe();
|
|
1427
|
+
this._mapValueManager.valueChanged
|
|
1428
|
+
.pipe(tap((change) => {
|
|
1381
1429
|
if (this.onChange) {
|
|
1382
1430
|
this.onChange(change.value);
|
|
1383
1431
|
}
|
|
1384
1432
|
if (this.onTouched) {
|
|
1385
1433
|
this.onTouched();
|
|
1386
1434
|
}
|
|
1387
|
-
}), tap(changed => {
|
|
1388
|
-
if (this._googleMaps.mapReady &&
|
|
1435
|
+
}), tap((changed) => {
|
|
1436
|
+
if (this._googleMaps.mapReady &&
|
|
1437
|
+
changed.source !== MapValueSource.FeatureChange) {
|
|
1389
1438
|
this._googleMaps.setData(changed.value);
|
|
1390
1439
|
}
|
|
1391
|
-
}), takeUntil(this._ngUnsubscribe))
|
|
1392
|
-
|
|
1440
|
+
}), takeUntil(this._ngUnsubscribe))
|
|
1441
|
+
.subscribe();
|
|
1442
|
+
this._contextMenuItems$ = this._googleMaps.editingEnabled$.pipe(map((enabled) => {
|
|
1393
1443
|
const items = [];
|
|
1394
1444
|
if (enabled) {
|
|
1395
|
-
items.push({
|
|
1445
|
+
items.push({
|
|
1446
|
+
label: 'Delete',
|
|
1447
|
+
action: () => this._onClickDeleteFeature(),
|
|
1448
|
+
});
|
|
1396
1449
|
}
|
|
1397
1450
|
return items;
|
|
1398
|
-
}), tap(items => {
|
|
1451
|
+
}), tap((items) => {
|
|
1399
1452
|
if (items.length === 0) {
|
|
1400
1453
|
this._googleMaps.setFeatureContextMenu(null);
|
|
1401
1454
|
}
|
|
@@ -1408,7 +1461,8 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1408
1461
|
this._gmApiLoaded = this._googleMapsApiLoader.load().pipe(map(() => true), catchError(() => of(false)));
|
|
1409
1462
|
}
|
|
1410
1463
|
ngOnInit() {
|
|
1411
|
-
fromEvent(window, 'keydown')
|
|
1464
|
+
fromEvent(window, 'keydown')
|
|
1465
|
+
.pipe(tap((event) => {
|
|
1412
1466
|
switch (event.code) {
|
|
1413
1467
|
case 'Delete':
|
|
1414
1468
|
if (this._googleMaps.isEditingEnabled()) {
|
|
@@ -1428,7 +1482,8 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1428
1482
|
event.stopPropagation();
|
|
1429
1483
|
break;
|
|
1430
1484
|
}
|
|
1431
|
-
}), takeUntil(this._ngUnsubscribe))
|
|
1485
|
+
}), takeUntil(this._ngUnsubscribe))
|
|
1486
|
+
.subscribe();
|
|
1432
1487
|
}
|
|
1433
1488
|
ngOnDestroy() {
|
|
1434
1489
|
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
@@ -1514,18 +1569,17 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
|
|
|
1514
1569
|
_onClickDeleteFeature() {
|
|
1515
1570
|
this._googleMaps.deleteSelection();
|
|
1516
1571
|
}
|
|
1517
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1518
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1572
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsComponent, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: GoogleMapsService }, { token: MapValueManagerService }, { token: TheSeamGoogleMapsApiLoader }], target: i0.ɵɵFactoryTarget.Component });
|
|
1573
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamGoogleMapsComponent, isStandalone: false, selector: "seam-google-maps", inputs: { disabled: "disabled", value: "value", tabIndex: "tabIndex", fileDropEnabled: "fileDropEnabled", fileUploadControlEnabled: "fileUploadControlEnabled", fullscreenControlEnabled: "fullscreenControlEnabled", reCenterControlEnabled: "reCenterControlEnabled", mapTypeControlEnabled: "mapTypeControlEnabled", streetViewControlEnabled: "streetViewControlEnabled", allowDrawingHoleInPolygon: "allowDrawingHoleInPolygon", editingEnabled: "editingEnabled", fileImportHandler: "fileImportHandler", zoom: "zoom", longitude: "longitude", latitude: "latitude", padding: "padding" }, outputs: { mapReady: "mapReady" }, host: { properties: { "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, providers: [
|
|
1519
1574
|
MapValueManagerService,
|
|
1520
1575
|
GoogleMapsService,
|
|
1521
1576
|
{ provide: MAP_CONTROLS_SERVICE, useClass: GoogleMapsControlsService },
|
|
1522
1577
|
{
|
|
1523
1578
|
provide: NG_VALUE_ACCESSOR,
|
|
1524
|
-
// eslint-disable-next-line no-use-before-define
|
|
1525
1579
|
useExisting: forwardRef(() => TheSeamGoogleMapsComponent),
|
|
1526
1580
|
multi: true,
|
|
1527
1581
|
},
|
|
1528
|
-
], viewQueries: [{ propertyName: "featureContextMenu", first: true, predicate: ["featureContextMenu"], descendants: true, read: MenuComponent, static: true }], exportAs: ["seamGoogleMaps"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_gmApiLoaded | async\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [center]=\"{ lat: latitude, lng: longitude }\"\n [zoom]=\"zoom\"\n [options]=\"_options\"\n (mapInitialized)=\"_onMapReady($any($event))\"\n
|
|
1582
|
+
], viewQueries: [{ propertyName: "featureContextMenu", first: true, predicate: ["featureContextMenu"], descendants: true, read: MenuComponent, static: true }], exportAs: ["seamGoogleMaps"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_gmApiLoaded | async\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [center]=\"{ lat: latitude, lng: longitude }\"\n [zoom]=\"zoom\"\n [options]=\"_options\"\n (mapInitialized)=\"_onMapReady($any($event))\"\n >\n </google-map>\n</ng-container>\n<seam-menu #featureContextMenu>\n <button\n seamMenuItem\n *ngFor=\"let item of _contextMenuItems$ | async\"\n (click)=\"item.action(item)\"\n >\n {{ item.label }}\n </button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control\n *ngIf=\"fileUploadControlEnabled\"\n [def]=\"_fileUploadControlDef\"\n></seam-map-control>\n<seam-map-control\n *ngIf=\"reCenterControlEnabled\"\n [def]=\"_reCenterControlDef\"\n></seam-map-control>\n", styles: [":host{display:block;position:relative;height:400px;width:100%}:host.show-focus-border.cdk-focused{outline:0;box-shadow:0 0 0 .2rem #357ebd40}:host.show-focus-border[disabled]{opacity:.65}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MenuComponent, selector: "seam-menu", inputs: ["menuClass", "baseWidth", "animationType"], outputs: ["closed"], exportAs: ["seamMenu"] }, { kind: "component", type: i6.MenuItemComponent, selector: "[seamMenuItem]", inputs: ["disabled", "role", "icon", "iconClass", "sublevelIcon", "subLevelIconClass", "badgeText", "badgeTheme"], exportAs: ["seamMenuItem"] }, { kind: "component", type: i7.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapId", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "component", type: TheSeamMapFileDropComponent, selector: "seam-map-file-drop" }, { kind: "component", type: TheSeamMapsControlComponent, selector: "seam-map-control", inputs: ["def"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1529
1583
|
}
|
|
1530
1584
|
__decorate([
|
|
1531
1585
|
InputBoolean()
|
|
@@ -1560,21 +1614,18 @@ __decorate([
|
|
|
1560
1614
|
__decorate([
|
|
1561
1615
|
InputNumber()
|
|
1562
1616
|
], TheSeamGoogleMapsComponent.prototype, "latitude", void 0);
|
|
1563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsComponent, decorators: [{
|
|
1564
1618
|
type: Component,
|
|
1565
|
-
args: [{ selector: 'seam-google-maps', inputs: [
|
|
1566
|
-
'disabled',
|
|
1567
|
-
], providers: [
|
|
1619
|
+
args: [{ selector: 'seam-google-maps', inputs: ['disabled'], providers: [
|
|
1568
1620
|
MapValueManagerService,
|
|
1569
1621
|
GoogleMapsService,
|
|
1570
1622
|
{ provide: MAP_CONTROLS_SERVICE, useClass: GoogleMapsControlsService },
|
|
1571
1623
|
{
|
|
1572
1624
|
provide: NG_VALUE_ACCESSOR,
|
|
1573
|
-
// eslint-disable-next-line no-use-before-define
|
|
1574
1625
|
useExisting: forwardRef(() => TheSeamGoogleMapsComponent),
|
|
1575
1626
|
multi: true,
|
|
1576
1627
|
},
|
|
1577
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMaps', standalone: false, template: "<ng-container *ngIf=\"_gmApiLoaded | async\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [center]=\"{ lat: latitude, lng: longitude }\"\n [zoom]=\"zoom\"\n [options]=\"_options\"\n (mapInitialized)=\"_onMapReady($any($event))\"\n
|
|
1628
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMaps', standalone: false, template: "<ng-container *ngIf=\"_gmApiLoaded | async\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [center]=\"{ lat: latitude, lng: longitude }\"\n [zoom]=\"zoom\"\n [options]=\"_options\"\n (mapInitialized)=\"_onMapReady($any($event))\"\n >\n </google-map>\n</ng-container>\n<seam-menu #featureContextMenu>\n <button\n seamMenuItem\n *ngFor=\"let item of _contextMenuItems$ | async\"\n (click)=\"item.action(item)\"\n >\n {{ item.label }}\n </button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control\n *ngIf=\"fileUploadControlEnabled\"\n [def]=\"_fileUploadControlDef\"\n></seam-map-control>\n<seam-map-control\n *ngIf=\"reCenterControlEnabled\"\n [def]=\"_reCenterControlDef\"\n></seam-map-control>\n", styles: [":host{display:block;position:relative;height:400px;width:100%}:host.show-focus-border.cdk-focused{outline:0;box-shadow:0 0 0 .2rem #357ebd40}:host.show-focus-border[disabled]{opacity:.65}\n"] }]
|
|
1578
1629
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: GoogleMapsService }, { type: MapValueManagerService }, { type: TheSeamGoogleMapsApiLoader }], propDecorators: { value: [{
|
|
1579
1630
|
type: Input
|
|
1580
1631
|
}], tabIndex: [{
|
|
@@ -1619,7 +1670,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1619
1670
|
}] } });
|
|
1620
1671
|
|
|
1621
1672
|
const SEAM_GOOGLE_PLACES_AUTOCOMPLETE_DEFAULT_OPTIONS = {
|
|
1622
|
-
componentRestrictions: { country: 'US' }
|
|
1673
|
+
componentRestrictions: { country: 'US' },
|
|
1623
1674
|
};
|
|
1624
1675
|
class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
1625
1676
|
_elementRef;
|
|
@@ -1651,15 +1702,17 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1651
1702
|
}
|
|
1652
1703
|
ngOnInit() {
|
|
1653
1704
|
this._ngZone.runOutsideAngular(() => {
|
|
1654
|
-
this._untilGoogleMapsApiLoaded()
|
|
1705
|
+
this._untilGoogleMapsApiLoaded()
|
|
1706
|
+
.pipe(takeUntil(this._ngUnsubscribe))
|
|
1707
|
+
.subscribe(() => {
|
|
1655
1708
|
this.autoComplete = new google.maps.places.Autocomplete(this.getHostElement(), this._options);
|
|
1656
|
-
this._placeChangedPending.forEach(pending => pending.observable.subscribe(pending.subscriber));
|
|
1709
|
+
this._placeChangedPending.forEach((pending) => pending.observable.subscribe(pending.subscriber));
|
|
1657
1710
|
this._autoCompleteReadySubject.next(undefined);
|
|
1658
1711
|
});
|
|
1659
1712
|
});
|
|
1660
1713
|
}
|
|
1661
1714
|
ngOnDestroy() {
|
|
1662
|
-
this._listeners.forEach(l => l.remove());
|
|
1715
|
+
this._listeners.forEach((l) => l.remove());
|
|
1663
1716
|
this._listeners = [];
|
|
1664
1717
|
this._ngUnsubscribe.next(undefined);
|
|
1665
1718
|
this._ngUnsubscribe.complete();
|
|
@@ -1703,7 +1756,6 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1703
1756
|
*/
|
|
1704
1757
|
setBounds(bounds) {
|
|
1705
1758
|
this._assertInitialized();
|
|
1706
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1707
1759
|
return this.autoComplete.setBounds(bounds);
|
|
1708
1760
|
}
|
|
1709
1761
|
/**
|
|
@@ -1713,7 +1765,6 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1713
1765
|
*/
|
|
1714
1766
|
setComponentRestrictions(restrictions) {
|
|
1715
1767
|
this._assertInitialized();
|
|
1716
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1717
1768
|
return this.autoComplete.setComponentRestrictions(restrictions);
|
|
1718
1769
|
}
|
|
1719
1770
|
/**
|
|
@@ -1723,13 +1774,11 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1723
1774
|
*/
|
|
1724
1775
|
setFields(fields) {
|
|
1725
1776
|
this._assertInitialized();
|
|
1726
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1727
1777
|
return this.autoComplete.setFields(fields);
|
|
1728
1778
|
}
|
|
1729
1779
|
/** */
|
|
1730
1780
|
setOptions(options) {
|
|
1731
1781
|
this._assertInitialized();
|
|
1732
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1733
1782
|
return this.autoComplete.setOptions(options);
|
|
1734
1783
|
}
|
|
1735
1784
|
/**
|
|
@@ -1739,7 +1788,6 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1739
1788
|
*/
|
|
1740
1789
|
setTypes(types) {
|
|
1741
1790
|
this._assertInitialized();
|
|
1742
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1743
1791
|
return this.autoComplete.setTypes(types);
|
|
1744
1792
|
}
|
|
1745
1793
|
/** Focuses the input. */
|
|
@@ -1754,7 +1802,7 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1754
1802
|
return this._elementRef.nativeElement;
|
|
1755
1803
|
}
|
|
1756
1804
|
_createPlaceChangedObservable() {
|
|
1757
|
-
const observable = new Observable(subscriber => {
|
|
1805
|
+
const observable = new Observable((subscriber) => {
|
|
1758
1806
|
if (!this.autoComplete) {
|
|
1759
1807
|
this._placeChangedPending.push({ observable, subscriber });
|
|
1760
1808
|
return undefined;
|
|
@@ -1774,14 +1822,14 @@ class TheSeamGoogleMapsPlacesAutocompleteDirective {
|
|
|
1774
1822
|
'Please wait for the API to load before trying to interact with it.');
|
|
1775
1823
|
}
|
|
1776
1824
|
}
|
|
1777
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1778
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
1825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsPlacesAutocompleteDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1826
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamGoogleMapsPlacesAutocompleteDirective, isStandalone: true, selector: "input[seamGoogleMapsPlacesAutocomplete]", inputs: { options: "options" }, outputs: { placeChanged: "placeChanged" }, host: { properties: { "attr.type": "this._attrType" } }, exportAs: ["seamGoogleMapsPlacesAutocomplete"], usesOnChanges: true, ngImport: i0 });
|
|
1779
1827
|
}
|
|
1780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsPlacesAutocompleteDirective, decorators: [{
|
|
1781
1829
|
type: Directive,
|
|
1782
1830
|
args: [{
|
|
1783
1831
|
selector: 'input[seamGoogleMapsPlacesAutocomplete]',
|
|
1784
|
-
exportAs: 'seamGoogleMapsPlacesAutocomplete'
|
|
1832
|
+
exportAs: 'seamGoogleMapsPlacesAutocomplete',
|
|
1785
1833
|
}]
|
|
1786
1834
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { options: [{
|
|
1787
1835
|
type: Input
|
|
@@ -1813,8 +1861,12 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1813
1861
|
* component to receive `focus` event from javascript, but not get focused by
|
|
1814
1862
|
* keyboard navigation.
|
|
1815
1863
|
*/
|
|
1816
|
-
set tabIndex(value) {
|
|
1817
|
-
|
|
1864
|
+
set tabIndex(value) {
|
|
1865
|
+
this._tabIndex = coerceNumberProperty(value);
|
|
1866
|
+
}
|
|
1867
|
+
get tabIndex() {
|
|
1868
|
+
return this._tabIndex;
|
|
1869
|
+
}
|
|
1818
1870
|
_tabIndex = -1;
|
|
1819
1871
|
set options(value) {
|
|
1820
1872
|
this._options = value || SEAM_GOOGLE_PLACES_AUTOCOMPLETE_DEFAULT_OPTIONS;
|
|
@@ -1833,14 +1885,18 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1833
1885
|
_inputDirective;
|
|
1834
1886
|
set __autocompleteDirective(value) {
|
|
1835
1887
|
this._autoCompleteDirective = value;
|
|
1836
|
-
this._untilAutoCompleteReady()
|
|
1888
|
+
this._untilAutoCompleteReady()
|
|
1889
|
+
.pipe(takeUntil(this._ngUnsubscribe))
|
|
1890
|
+
.subscribe(() => {
|
|
1837
1891
|
this.autoComplete = this._autoCompleteDirective.autoComplete;
|
|
1838
|
-
this._placeChangedPending.forEach(pending => pending.observable.subscribe(pending.subscriber));
|
|
1892
|
+
this._placeChangedPending.forEach((pending) => pending.observable.subscribe(pending.subscriber));
|
|
1839
1893
|
this._placeChangedPending = [];
|
|
1840
1894
|
});
|
|
1841
1895
|
}
|
|
1842
1896
|
_autoCompleteDirective;
|
|
1843
|
-
get _attrTabIndex() {
|
|
1897
|
+
get _attrTabIndex() {
|
|
1898
|
+
return this.disabled ? -1 : this.tabIndex || 0;
|
|
1899
|
+
}
|
|
1844
1900
|
_onClick(event) {
|
|
1845
1901
|
this._inputDirective.focus();
|
|
1846
1902
|
}
|
|
@@ -1890,7 +1946,6 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1890
1946
|
*/
|
|
1891
1947
|
setBounds(bounds) {
|
|
1892
1948
|
this._assertInitialized();
|
|
1893
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1894
1949
|
return this.autoComplete.setBounds(bounds);
|
|
1895
1950
|
}
|
|
1896
1951
|
/**
|
|
@@ -1900,7 +1955,6 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1900
1955
|
*/
|
|
1901
1956
|
setComponentRestrictions(restrictions) {
|
|
1902
1957
|
this._assertInitialized();
|
|
1903
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1904
1958
|
return this.autoComplete.setComponentRestrictions(restrictions);
|
|
1905
1959
|
}
|
|
1906
1960
|
/**
|
|
@@ -1910,13 +1964,11 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1910
1964
|
*/
|
|
1911
1965
|
setFields(fields) {
|
|
1912
1966
|
this._assertInitialized();
|
|
1913
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1914
1967
|
return this.autoComplete.setFields(fields);
|
|
1915
1968
|
}
|
|
1916
1969
|
/** */
|
|
1917
1970
|
setOptions(options) {
|
|
1918
1971
|
this._assertInitialized();
|
|
1919
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1920
1972
|
return this.autoComplete.setOptions(options);
|
|
1921
1973
|
}
|
|
1922
1974
|
/**
|
|
@@ -1926,7 +1978,6 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1926
1978
|
*/
|
|
1927
1979
|
setTypes(types) {
|
|
1928
1980
|
this._assertInitialized();
|
|
1929
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1930
1981
|
return this.autoComplete.setTypes(types);
|
|
1931
1982
|
}
|
|
1932
1983
|
/** Focuses the input. */
|
|
@@ -1941,7 +1992,7 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1941
1992
|
return this._elementRef.nativeElement;
|
|
1942
1993
|
}
|
|
1943
1994
|
_createPlaceChangedObservable() {
|
|
1944
|
-
const observable = new Observable(subscriber => {
|
|
1995
|
+
const observable = new Observable((subscriber) => {
|
|
1945
1996
|
if (!this.autoComplete) {
|
|
1946
1997
|
this._placeChangedPending.push({ observable, subscriber });
|
|
1947
1998
|
return undefined;
|
|
@@ -1958,15 +2009,15 @@ class TheSeamGoogleMapsPlacesAutoCompleteComponent {
|
|
|
1958
2009
|
'Please wait for the API to load before trying to interact with it.');
|
|
1959
2010
|
}
|
|
1960
2011
|
}
|
|
1961
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1962
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
2012
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsPlacesAutoCompleteComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamGoogleMapsPlacesAutoCompleteComponent, isStandalone: false, selector: "seam-google-maps-places-autocomplete", inputs: { label: "label", icon: "icon", disabled: "disabled", placeholder: "placeholder", autocorrect: "autocorrect", autocapitalize: "autocapitalize", tabIndex: "tabIndex", options: "options" }, outputs: { placeChanged: "placeChanged" }, host: { listeners: { "click": "_onClick(event)", "focus": "_onFocus($event)" }, properties: { "attr.tabindex": "this._attrTabIndex" } }, viewQueries: [{ propertyName: "_inputDirective", first: true, predicate: ["inp"], descendants: true, read: InputDirective, static: true }, { propertyName: "__autocompleteDirective", first: true, predicate: TheSeamGoogleMapsPlacesAutocompleteDirective, descendants: true, static: true }], exportAs: ["seamGoogleMapsPlacesAutoComplete"], ngImport: i0, template: "<div *ngIf=\"icon\" class=\"search-container--icon-wrapper\">\n <seam-icon [icon]=\"icon\" class=\"text-muted\" size=\"lg\"></seam-icon>\n</div>\n<label *ngIf=\"label || placeholder\" [attr.for]=\"inp.id\" class=\"sr-only\">{{\n label || placeholder\n}}</label>\n<input\n #inp=\"seamInput\"\n seamInput\n seamGoogleMapsPlacesAutocomplete\n [disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocorrect]=\"autocorrect\"\n [attr.autocapitalize]=\"autocapitalize\"\n [options]=\"_options\"\n/>\n", styles: [":host{position:relative;width:100%}:host>input{padding-left:40px}:host .search-container--icon-wrapper{position:absolute;top:6px;left:10px;bottom:0}:host .search-container--icon-wrapper ::ng-deep .svg-inline--fa{vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }, { kind: "directive", type: i3.InputDirective, selector: "input[seamInput], textarea[seamInput], ng-select[seamInput], seam-tel-input[seamInput], quill-editor[seamInput], seam-google-maps[seamInput], seam-rich-text[seamInput]", inputs: ["seamInputSize", "id", "type", "placeholder", "required", "disabled", "readonly"], exportAs: ["seamInput"] }, { kind: "directive", type: TheSeamGoogleMapsPlacesAutocompleteDirective, selector: "input[seamGoogleMapsPlacesAutocomplete]", inputs: ["options"], outputs: ["placeChanged"], exportAs: ["seamGoogleMapsPlacesAutocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1963
2014
|
}
|
|
1964
2015
|
__decorate([
|
|
1965
2016
|
InputBoolean()
|
|
1966
2017
|
], TheSeamGoogleMapsPlacesAutoCompleteComponent.prototype, "disabled", void 0);
|
|
1967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsPlacesAutoCompleteComponent, decorators: [{
|
|
1968
2019
|
type: Component,
|
|
1969
|
-
args: [{ selector: 'seam-google-maps-places-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMapsPlacesAutoComplete', standalone: false, template: "<div *ngIf=\"icon\" class=\"search-container--icon-wrapper\">\
|
|
2020
|
+
args: [{ selector: 'seam-google-maps-places-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMapsPlacesAutoComplete', standalone: false, template: "<div *ngIf=\"icon\" class=\"search-container--icon-wrapper\">\n <seam-icon [icon]=\"icon\" class=\"text-muted\" size=\"lg\"></seam-icon>\n</div>\n<label *ngIf=\"label || placeholder\" [attr.for]=\"inp.id\" class=\"sr-only\">{{\n label || placeholder\n}}</label>\n<input\n #inp=\"seamInput\"\n seamInput\n seamGoogleMapsPlacesAutocomplete\n [disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocorrect]=\"autocorrect\"\n [attr.autocapitalize]=\"autocapitalize\"\n [options]=\"_options\"\n/>\n", styles: [":host{position:relative;width:100%}:host>input{padding-left:40px}:host .search-container--icon-wrapper{position:absolute;top:6px;left:10px;bottom:0}:host .search-container--icon-wrapper ::ng-deep .svg-inline--fa{vertical-align:middle}\n"] }]
|
|
1970
2021
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { label: [{
|
|
1971
2022
|
type: Input
|
|
1972
2023
|
}], icon: [{
|
|
@@ -2003,8 +2054,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2003
2054
|
}] } });
|
|
2004
2055
|
|
|
2005
2056
|
class TheSeamGoogleMapsModule {
|
|
2006
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2007
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2057
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2058
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsModule, declarations: [TheSeamGoogleMapsComponent,
|
|
2008
2059
|
TheSeamMapFileDropComponent,
|
|
2009
2060
|
TheSeamGoogleMapsUploadButtonControlComponent,
|
|
2010
2061
|
TheSeamGoogleMapsRecenterButtonControlComponent,
|
|
@@ -2020,7 +2071,7 @@ class TheSeamGoogleMapsModule {
|
|
|
2020
2071
|
TheSeamGoogleMapsPlacesAutocompleteDirective,
|
|
2021
2072
|
TheSeamGoogleMapsPlacesAutoCompleteComponent,
|
|
2022
2073
|
TheSeamMapsControlComponent] });
|
|
2023
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2074
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsModule, imports: [CommonModule,
|
|
2024
2075
|
ObserversModule,
|
|
2025
2076
|
TheSeamSharedModule,
|
|
2026
2077
|
TheSeamMenuModule,
|
|
@@ -2028,7 +2079,7 @@ class TheSeamGoogleMapsModule {
|
|
|
2028
2079
|
TheSeamFormFieldModule,
|
|
2029
2080
|
GoogleMapsModule] });
|
|
2030
2081
|
}
|
|
2031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamGoogleMapsModule, decorators: [{
|
|
2032
2083
|
type: NgModule,
|
|
2033
2084
|
args: [{
|
|
2034
2085
|
declarations: [
|
|
@@ -2054,7 +2105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2054
2105
|
TheSeamGoogleMapsPlacesAutocompleteDirective,
|
|
2055
2106
|
TheSeamGoogleMapsPlacesAutoCompleteComponent,
|
|
2056
2107
|
TheSeamMapsControlComponent,
|
|
2057
|
-
]
|
|
2108
|
+
],
|
|
2058
2109
|
}]
|
|
2059
2110
|
}] });
|
|
2060
2111
|
|
|
@@ -2103,7 +2154,9 @@ class TheSeamLazyMapsApiLoader extends TheSeamGoogleMapsApiLoader {
|
|
|
2103
2154
|
_assignScriptLoadingPromise(scriptElem) {
|
|
2104
2155
|
this._scriptLoadingPromise = new Promise((resolve, reject) => {
|
|
2105
2156
|
const win = window;
|
|
2106
|
-
win[this.callbackName] = () => {
|
|
2157
|
+
win[this.callbackName] = () => {
|
|
2158
|
+
resolve();
|
|
2159
|
+
};
|
|
2107
2160
|
scriptElem.onerror = (error) => {
|
|
2108
2161
|
reject(error);
|
|
2109
2162
|
};
|
|
@@ -2125,8 +2178,9 @@ class TheSeamLazyMapsApiLoader extends TheSeamGoogleMapsApiLoader {
|
|
|
2125
2178
|
channel: this._config.channel,
|
|
2126
2179
|
libraries: this._config.libraries,
|
|
2127
2180
|
region: this._config.region,
|
|
2128
|
-
language: this._config.language ||
|
|
2129
|
-
|
|
2181
|
+
language: this._config.language ||
|
|
2182
|
+
(this._localeId !== 'en-US' ? this._localeId : null),
|
|
2183
|
+
loading: this._config.loading || 'async',
|
|
2130
2184
|
};
|
|
2131
2185
|
const params = Object.keys(queryParams)
|
|
2132
2186
|
// Remove undefined or null params.
|
|
@@ -2139,7 +2193,10 @@ class TheSeamLazyMapsApiLoader extends TheSeamGoogleMapsApiLoader {
|
|
|
2139
2193
|
// Join arrays as comma seperated strings.
|
|
2140
2194
|
.map((k) => {
|
|
2141
2195
|
const param = queryParams[k];
|
|
2142
|
-
return {
|
|
2196
|
+
return {
|
|
2197
|
+
key: k,
|
|
2198
|
+
value: Array.isArray(param) ? param.join(',') : param,
|
|
2199
|
+
};
|
|
2143
2200
|
})
|
|
2144
2201
|
.map((entry) => {
|
|
2145
2202
|
return `${entry.key}=${entry.value}`;
|
|
@@ -2147,10 +2204,10 @@ class TheSeamLazyMapsApiLoader extends TheSeamGoogleMapsApiLoader {
|
|
|
2147
2204
|
.join('&');
|
|
2148
2205
|
return `${hostAndPath}?${params}`;
|
|
2149
2206
|
}
|
|
2150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2151
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamLazyMapsApiLoader, deps: [{ token: LOCALE_ID }, { token: THESEAM_LAZY_MAPS_API_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2208
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamLazyMapsApiLoader });
|
|
2152
2209
|
}
|
|
2153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamLazyMapsApiLoader, decorators: [{
|
|
2154
2211
|
type: Injectable
|
|
2155
2212
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2156
2213
|
type: Inject,
|
|
@@ -2176,10 +2233,10 @@ class TheSeamNoopGoogleMapsAPILoader extends TheSeamGoogleMapsApiLoader {
|
|
|
2176
2233
|
return of(undefined);
|
|
2177
2234
|
});
|
|
2178
2235
|
}
|
|
2179
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2180
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2236
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamNoopGoogleMapsAPILoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2237
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamNoopGoogleMapsAPILoader });
|
|
2181
2238
|
}
|
|
2182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamNoopGoogleMapsAPILoader, decorators: [{
|
|
2183
2240
|
type: Injectable
|
|
2184
2241
|
}] });
|
|
2185
2242
|
|