@theseam/ui-common 0.4.1 → 0.4.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.
Files changed (56) hide show
  1. package/esm2020/datatable/datatable-action-menu/datatable-action-menu.component.mjs +1 -1
  2. package/esm2020/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.mjs +1 -1
  3. package/esm2020/datatable/datatable-export-button/datatable-export-button.component.mjs +1 -1
  4. package/esm2020/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.mjs +1 -1
  5. package/esm2020/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.mjs +1 -1
  6. package/esm2020/framework/top-bar/top-bar.component.mjs +1 -1
  7. package/esm2020/google-maps/google-maps/google-maps.component.mjs +32 -8
  8. package/esm2020/google-maps/google-maps-feature-helpers.mjs +13 -1
  9. package/esm2020/google-maps/google-maps.module.mjs +4 -2
  10. package/esm2020/google-maps/google-maps.service.mjs +96 -25
  11. package/esm2020/menu/menu-item.component.mjs +43 -15
  12. package/esm2020/menu/menu-toggle.directive.mjs +202 -43
  13. package/esm2020/menu/menu.component.mjs +37 -14
  14. package/esm2020/utils/geo-json/close-polygons.mjs +38 -0
  15. package/esm2020/utils/public-api.mjs +2 -1
  16. package/esm2020/widget/widget/widget.component.mjs +54 -33
  17. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs +1 -1
  18. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  19. package/fesm2015/theseam-ui-common-datatable.mjs +3 -3
  20. package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
  21. package/fesm2015/theseam-ui-common-framework.mjs +2 -2
  22. package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
  23. package/fesm2015/theseam-ui-common-google-maps.mjs +138 -28
  24. package/fesm2015/theseam-ui-common-google-maps.mjs.map +1 -1
  25. package/fesm2015/theseam-ui-common-menu.mjs +442 -228
  26. package/fesm2015/theseam-ui-common-menu.mjs.map +1 -1
  27. package/fesm2015/theseam-ui-common-utils.mjs +39 -1
  28. package/fesm2015/theseam-ui-common-utils.mjs.map +1 -1
  29. package/fesm2015/theseam-ui-common-widget.mjs +53 -32
  30. package/fesm2015/theseam-ui-common-widget.mjs.map +1 -1
  31. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs +1 -1
  32. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  33. package/fesm2020/theseam-ui-common-datatable.mjs +3 -3
  34. package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
  35. package/fesm2020/theseam-ui-common-framework.mjs +2 -2
  36. package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
  37. package/fesm2020/theseam-ui-common-google-maps.mjs +141 -32
  38. package/fesm2020/theseam-ui-common-google-maps.mjs.map +1 -1
  39. package/fesm2020/theseam-ui-common-menu.mjs +432 -225
  40. package/fesm2020/theseam-ui-common-menu.mjs.map +1 -1
  41. package/fesm2020/theseam-ui-common-utils.mjs +39 -1
  42. package/fesm2020/theseam-ui-common-utils.mjs.map +1 -1
  43. package/fesm2020/theseam-ui-common-widget.mjs +53 -32
  44. package/fesm2020/theseam-ui-common-widget.mjs.map +1 -1
  45. package/google-maps/google-maps/google-maps.component.d.ts +8 -1
  46. package/google-maps/google-maps-feature-helpers.d.ts +3 -0
  47. package/google-maps/google-maps.module.d.ts +1 -1
  48. package/google-maps/google-maps.service.d.ts +7 -0
  49. package/menu/menu-item.component.d.ts +20 -9
  50. package/menu/menu-toggle.directive.d.ts +34 -11
  51. package/menu/menu.component.d.ts +16 -2
  52. package/package.json +1 -1
  53. package/utils/geo-json/close-polygons.d.ts +9 -0
  54. package/utils/public-api.d.ts +1 -0
  55. package/widget/widget/widget.component.d.ts +10 -11
  56. package/widget/widget/widget.component.scss +12 -1
@@ -43,6 +43,18 @@ function isFeatureSelected(feature) {
43
43
  function setFeatureSelected(feature, isSelected) {
44
44
  feature.setProperty(AppFeaturePropertyName.IsSelected, isSelected);
45
45
  }
46
+ const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_PROPERTY_NAME = 'styleOptions';
47
+ const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_HOVERED_PROPERTY_NAME = 'styleOptionsHovered';
48
+ const EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_SELECTED_PROPERTY_NAME = 'styleOptionsSelected';
49
+ function getStyleOptionsDefinedByFeature(feature) {
50
+ return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_PROPERTY_NAME) || undefined;
51
+ }
52
+ function getHoveredStyleOptionsDefinedByFeature(feature) {
53
+ return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_HOVERED_PROPERTY_NAME) || undefined;
54
+ }
55
+ function getSelectedStyleOptionsDefinedByFeature(feature) {
56
+ return feature.getProperty(EXTERNAL_FEATURE_DEFINED_STYLE_OPTIONS_SELECTED_PROPERTY_NAME) || undefined;
57
+ }
46
58
  // TODO: Check performance of cloning a google.maps.Data instance, so the
47
59
  // properties can be removed with the google maps api, instead of on the
48
60
  // resulting json.
@@ -389,25 +401,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
389
401
  type: Injectable
390
402
  }], ctorParameters: function () { return []; } });
391
403
 
392
- const DEFAULT_POLYGON_OPTIONS = {
393
- clickable: true,
394
- draggable: true,
395
- editable: true,
396
- // fillColor: 'rgba(60,150,60,1)',
397
- // strokeColor: 'rgba(155,255,0,1)'
398
- };
399
- const DEFAULT_DRAWING_MANAGER_OPTIONS = () => ({
400
- drawingControl: true,
404
+ const DEFAULT_POLYGON_OPTIONS = (editingEnabled) => ({
405
+ clickable: editingEnabled,
406
+ draggable: editingEnabled,
407
+ editable: editingEnabled,
408
+ });
409
+ const DEFAULT_DRAWING_MANAGER_OPTIONS = (editingEnabled) => ({
410
+ drawingControl: editingEnabled,
401
411
  drawingControlOptions: {
402
412
  drawingModes: [
403
413
  google.maps.drawing.OverlayType.POLYGON,
404
414
  ],
405
415
  },
406
- polygonOptions: DEFAULT_POLYGON_OPTIONS,
416
+ polygonOptions: DEFAULT_POLYGON_OPTIONS(editingEnabled),
407
417
  drawingMode: null,
408
418
  });
409
- const FEATURE_STYLE_OPTIONS_DEFAULT = {
419
+ const FEATURE_STYLE_OPTIONS_DEFAULT = (editingEnabled) => ({
410
420
  clickable: true,
421
+ // clickable: editingEnabled,
411
422
  visible: true,
412
423
  // zIndex?: number;
413
424
  // cursor?: string;
@@ -418,17 +429,34 @@ const FEATURE_STYLE_OPTIONS_DEFAULT = {
418
429
  strokeColor: 'blue',
419
430
  strokeOpacity: 1,
420
431
  strokeWeight: 2,
421
- };
422
- const FEATURE_STYLE_OPTIONS_SELECTED = {
423
- ...FEATURE_STYLE_OPTIONS_DEFAULT,
424
- draggable: true,
425
- editable: true,
432
+ });
433
+ const FEATURE_STYLE_OPTIONS_SELECTED = (editingEnabled) => ({
434
+ ...FEATURE_STYLE_OPTIONS_DEFAULT(editingEnabled),
435
+ draggable: editingEnabled,
436
+ editable: editingEnabled,
426
437
  fillColor: 'green',
427
438
  fillOpacity: 0.7,
428
439
  strokeColor: 'limegreen',
429
440
  strokeOpacity: 1,
430
441
  strokeWeight: 2,
431
- };
442
+ });
443
+ const FEATURE_STYLE_OVERRIDE_OPTIONS_HOVERED = (editingEnabled) => ({
444
+ strokeColor: 'black',
445
+ strokeOpacity: 1,
446
+ strokeWeight: 4,
447
+ });
448
+ const SUPPORTED_PROPERTY_STYLE_OPTIONS = [
449
+ 'fillColor',
450
+ 'fillOpacity',
451
+ 'strokeColor',
452
+ 'strokeOpacity',
453
+ 'strokeWeight',
454
+ 'label',
455
+ 'opacity',
456
+ 'icon',
457
+ 'clickable',
458
+ 'visible',
459
+ ];
432
460
  class GoogleMapsService {
433
461
  get mapReady() { return this._mapReadySubject.value; }
434
462
  constructor(_mapValueManager, _ngZone, _vcr) {
@@ -437,9 +465,11 @@ class GoogleMapsService {
437
465
  this._vcr = _vcr;
438
466
  this._ngUnsubscribe = new Subject();
439
467
  this._mapReadySubject = new BehaviorSubject(false);
468
+ this._editingEnabledSubject = new BehaviorSubject(true);
440
469
  this._featureContextMenu = null;
441
470
  this._activeContextMenu = null;
442
471
  this._allowDrawingHoleInPolygon = false;
472
+ this.editingEnabled$ = this._editingEnabledSubject.asObservable();
443
473
  this.mapReady$ = this._mapReadySubject.asObservable();
444
474
  }
445
475
  ngOnDestroy() {
@@ -458,8 +488,35 @@ class GoogleMapsService {
458
488
  }
459
489
  // TODO: Refactor out of the service meant to just wrap the google maps api.
460
490
  setFeatureContextMenu(menu) {
491
+ this.closeContextMenu();
461
492
  this._featureContextMenu = menu;
462
493
  }
494
+ setEditingEnabled(enabled) {
495
+ this._editingEnabledSubject.next(enabled);
496
+ if (this.mapReady) {
497
+ this._assertInitialized();
498
+ this.googleMap.data.revertStyle();
499
+ if (!enabled) {
500
+ this.stopDrawing();
501
+ const options = DEFAULT_DRAWING_MANAGER_OPTIONS(this.isEditingEnabled());
502
+ this._drawingManager?.setOptions(options);
503
+ this._drawingManager?.setMap(null);
504
+ this.googleMap.data.forEach(f => {
505
+ if (isFeatureSelected(f)) {
506
+ setFeatureSelected(f, false);
507
+ }
508
+ });
509
+ }
510
+ else {
511
+ const options = DEFAULT_DRAWING_MANAGER_OPTIONS(this.isEditingEnabled());
512
+ this._drawingManager?.setOptions(options);
513
+ this._drawingManager?.setMap(this.googleMap);
514
+ }
515
+ }
516
+ }
517
+ isEditingEnabled() {
518
+ return this._editingEnabledSubject.value;
519
+ }
463
520
  getDiv() {
464
521
  this._assertInitialized();
465
522
  return this.googleMap.getDiv();
@@ -497,7 +554,7 @@ class GoogleMapsService {
497
554
  listener.remove();
498
555
  });
499
556
  // To fake canceling the current drawing, without disabling the drawing
500
- // mode, the drawin mode is being unset then immediately set back. When
557
+ // mode, the drawing mode is being unset then immediately set back. When
501
558
  // the mode is unset the 'overlaycomplete' event will fire, which will
502
559
  // give a reference to the current overlay to remove, then it is set back
503
560
  // to the mode the user was using. To the user is should just seem like
@@ -517,7 +574,7 @@ class GoogleMapsService {
517
574
  throw Error(`DrawingManager is already initialized.`);
518
575
  }
519
576
  this._assertInitialized();
520
- const options = DEFAULT_DRAWING_MANAGER_OPTIONS();
577
+ const options = DEFAULT_DRAWING_MANAGER_OPTIONS(this.isEditingEnabled());
521
578
  const drawingManager = new google.maps.drawing.DrawingManager(options);
522
579
  drawingManager.setMap(this.googleMap);
523
580
  this._drawingManager = drawingManager;
@@ -579,10 +636,15 @@ class GoogleMapsService {
579
636
  });
580
637
  // Determine what the style of the features are.
581
638
  this.googleMap.data.setStyle(feature => {
639
+ let opts = FEATURE_STYLE_OPTIONS_DEFAULT(this.isEditingEnabled());
640
+ const options = getStyleOptionsDefinedByFeature(feature);
641
+ this._mergeStyleOptions(opts, options ?? {});
582
642
  if (isFeatureSelected(feature)) {
583
- return FEATURE_STYLE_OPTIONS_SELECTED;
643
+ const hoverOptions = getHoveredStyleOptionsDefinedByFeature(feature);
644
+ opts = FEATURE_STYLE_OPTIONS_SELECTED(this.isEditingEnabled());
645
+ this._mergeStyleOptions(opts, hoverOptions ?? {});
584
646
  }
585
- return FEATURE_STYLE_OPTIONS_DEFAULT;
647
+ return opts;
586
648
  });
587
649
  // Select a feature when clicked.
588
650
  this.googleMap.data.addListener('click', (event) => {
@@ -599,7 +661,7 @@ class GoogleMapsService {
599
661
  this._assertInitialized();
600
662
  this.googleMap.data.revertStyle();
601
663
  if (!this.isDrawing() && !isFeatureSelected(event.feature)) {
602
- this.googleMap.data.overrideStyle(event.feature, { strokeWeight: 4 });
664
+ this.setFeatureHoveredStyleOverride(event.feature);
603
665
  }
604
666
  });
605
667
  // Remove any hover styles when mouse moves away.
@@ -608,6 +670,23 @@ class GoogleMapsService {
608
670
  this.googleMap.data.revertStyle();
609
671
  });
610
672
  }
673
+ setFeatureHoveredStyleOverride(feature) {
674
+ this._assertInitialized();
675
+ const overrideOpts = FEATURE_STYLE_OVERRIDE_OPTIONS_HOVERED(this.isEditingEnabled());
676
+ const hoverOptions = getHoveredStyleOptionsDefinedByFeature(feature);
677
+ this._mergeStyleOptions(overrideOpts, hoverOptions ?? {});
678
+ this.googleMap.data.overrideStyle(feature, overrideOpts);
679
+ }
680
+ _mergeStyleOptions(options, propertiesStyleOptions) {
681
+ if (Object.keys(propertiesStyleOptions).length === 0) {
682
+ return;
683
+ }
684
+ for (const opt of SUPPORTED_PROPERTY_STYLE_OPTIONS) {
685
+ if (Object.prototype.hasOwnProperty.call(propertiesStyleOptions, opt)) {
686
+ options[opt] = propertiesStyleOptions[opt];
687
+ }
688
+ }
689
+ }
611
690
  _initFeatureChangeListeners() {
612
691
  this._assertInitialized();
613
692
  createFeatureChangeObservable(this.googleMap.data, this._ngZone).pipe(switchMap(() => from(this.getGeoJson()).pipe(tap(geoJson => this._mapValueManager.setValue(geoJson, MapValueSource.FeatureChange)))), takeUntil(this._ngUnsubscribe)).subscribe();
@@ -696,11 +775,15 @@ class GoogleMapsService {
696
775
  }
697
776
  }
698
777
  // TODO: Refactor out of the service meant to just wrap the google maps api.
699
- _openContextMenuForFeature(feature, position) {
778
+ closeContextMenu() {
700
779
  if (this._activeContextMenu) {
701
780
  this._activeContextMenu.close();
702
781
  this._activeContextMenu = null;
703
782
  }
783
+ }
784
+ // TODO: Refactor out of the service meant to just wrap the google maps api.
785
+ _openContextMenuForFeature(feature, position) {
786
+ this.closeContextMenu();
704
787
  this._assertInitialized();
705
788
  let _position = position;
706
789
  if (!_position) {
@@ -1192,6 +1275,7 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
1192
1275
  this.mapTypeControlEnabled = true;
1193
1276
  this.streetViewControlEnabled = false;
1194
1277
  this.allowDrawingHoleInPolygon = false;
1278
+ this.editingEnabled = true;
1195
1279
  this.zoom = 14;
1196
1280
  this.longitude = -98.570209;
1197
1281
  this.latitude = 37.633814;
@@ -1215,17 +1299,32 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
1215
1299
  this._googleMaps.setData(changed.value);
1216
1300
  }
1217
1301
  }), takeUntil(this._ngUnsubscribe)).subscribe();
1302
+ this._contextMenuItems$ = this._googleMaps.editingEnabled$.pipe(map(enabled => {
1303
+ const items = [];
1304
+ if (enabled) {
1305
+ items.push({ label: 'Delete', action: () => this._onClickDeleteFeature() });
1306
+ }
1307
+ return items;
1308
+ }), tap(items => {
1309
+ if (items.length === 0) {
1310
+ this._googleMaps.setFeatureContextMenu(null);
1311
+ }
1312
+ else {
1313
+ this._googleMaps.setFeatureContextMenu(this.featureContextMenu);
1314
+ }
1315
+ }));
1218
1316
  this._googleMaps.setBaseLatLng(this.latitude, this.longitude);
1219
1317
  this._gmApiLoaded = this._googleMapsApiLoader.load().pipe(map(() => true), catchError(() => of(false)));
1220
1318
  }
1221
1319
  ngOnInit() {
1222
- this._googleMaps.setFeatureContextMenu(this.featureContextMenu);
1223
1320
  fromEvent(window, 'keydown').pipe(tap((event) => {
1224
1321
  switch (event.code) {
1225
1322
  case 'Delete':
1226
- this._googleMaps.deleteSelection();
1227
- event.preventDefault();
1228
- event.stopPropagation();
1323
+ if (this._googleMaps.isEditingEnabled()) {
1324
+ this._googleMaps.deleteSelection();
1325
+ event.preventDefault();
1326
+ event.stopPropagation();
1327
+ }
1229
1328
  break;
1230
1329
  case 'Escape':
1231
1330
  this._googleMaps.stopDrawing();
@@ -1270,6 +1369,9 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
1270
1369
  };
1271
1370
  }
1272
1371
  }
1372
+ if (Object.prototype.hasOwnProperty.call(changes, 'editingEnabled')) {
1373
+ this._googleMaps.setEditingEnabled(this.editingEnabled);
1374
+ }
1273
1375
  }
1274
1376
  writeValue(value) {
1275
1377
  this.value = value;
@@ -1315,7 +1417,7 @@ class TheSeamGoogleMapsComponent extends _TheSeamGoogleMapsMixinBase {
1315
1417
  }
1316
1418
  }
1317
1419
  TheSeamGoogleMapsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheSeamGoogleMapsComponent, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: GoogleMapsService }, { token: MapValueManagerService }, { token: TheSeamGoogleMapsApiLoader }], target: i0.ɵɵFactoryTarget.Component });
1318
- TheSeamGoogleMapsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheSeamGoogleMapsComponent, 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", fileImportHandler: "fileImportHandler", zoom: "zoom", longitude: "longitude", latitude: "latitude" }, outputs: { mapReady: "mapReady" }, host: { properties: { "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, providers: [
1420
+ TheSeamGoogleMapsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheSeamGoogleMapsComponent, 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" }, outputs: { mapReady: "mapReady" }, host: { properties: { "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, providers: [
1319
1421
  MapValueManagerService,
1320
1422
  GoogleMapsService,
1321
1423
  { provide: MAP_CONTROLS_SERVICE, useClass: GoogleMapsControlsService },
@@ -1325,7 +1427,7 @@ TheSeamGoogleMapsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
1325
1427
  useExisting: forwardRef(() => TheSeamGoogleMapsComponent),
1326
1428
  multi: true,
1327
1429
  },
1328
- ], 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 seamMenuItem (click)=\"_onClickDeleteFeature()\">Delete</button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control *ngIf=\"fileUploadControlEnabled\" [def]=\"_fileUploadControlDef\"></seam-map-control>\n<seam-map-control *ngIf=\"reCenterControlEnabled\" [def]=\"_reCenterControlDef\"></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.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", "badgeText", "badgeTheme"], exportAs: ["seamMenuItem"] }, { kind: "component", type: i7.GoogleMap, selector: "google-map", inputs: ["height", "width", "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 });
1430
+ ], 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 seamMenuItem *ngFor=\"let item of _contextMenuItems$ | async\" (click)=\"item.action(item)\">{{ item.label }}</button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control *ngIf=\"fileUploadControlEnabled\" [def]=\"_fileUploadControlDef\"></seam-map-control>\n<seam-map-control *ngIf=\"reCenterControlEnabled\" [def]=\"_reCenterControlDef\"></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", "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 });
1329
1431
  __decorate([
1330
1432
  InputBoolean()
1331
1433
  ], TheSeamGoogleMapsComponent.prototype, "fileDropEnabled", void 0);
@@ -1347,6 +1449,9 @@ __decorate([
1347
1449
  __decorate([
1348
1450
  InputBoolean()
1349
1451
  ], TheSeamGoogleMapsComponent.prototype, "allowDrawingHoleInPolygon", void 0);
1452
+ __decorate([
1453
+ InputBoolean()
1454
+ ], TheSeamGoogleMapsComponent.prototype, "editingEnabled", void 0);
1350
1455
  __decorate([
1351
1456
  InputNumber()
1352
1457
  ], TheSeamGoogleMapsComponent.prototype, "zoom", void 0);
@@ -1370,7 +1475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1370
1475
  useExisting: forwardRef(() => TheSeamGoogleMapsComponent),
1371
1476
  multi: true,
1372
1477
  },
1373
- ], changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMaps', 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 seamMenuItem (click)=\"_onClickDeleteFeature()\">Delete</button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control *ngIf=\"fileUploadControlEnabled\" [def]=\"_fileUploadControlDef\"></seam-map-control>\n<seam-map-control *ngIf=\"reCenterControlEnabled\" [def]=\"_reCenterControlDef\"></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"] }]
1478
+ ], changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'seamGoogleMaps', 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 seamMenuItem *ngFor=\"let item of _contextMenuItems$ | async\" (click)=\"item.action(item)\">{{ item.label }}</button>\n</seam-menu>\n<seam-map-file-drop *ngIf=\"fileDropEnabled\"></seam-map-file-drop>\n\n<seam-map-control *ngIf=\"fileUploadControlEnabled\" [def]=\"_fileUploadControlDef\"></seam-map-control>\n<seam-map-control *ngIf=\"reCenterControlEnabled\" [def]=\"_reCenterControlDef\"></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"] }]
1374
1479
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: GoogleMapsService }, { type: MapValueManagerService }, { type: TheSeamGoogleMapsApiLoader }]; }, propDecorators: { value: [{
1375
1480
  type: Input
1376
1481
  }], tabIndex: [{
@@ -1389,6 +1494,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1389
1494
  type: Input
1390
1495
  }], allowDrawingHoleInPolygon: [{
1391
1496
  type: Input
1497
+ }], editingEnabled: [{
1498
+ type: Input
1392
1499
  }], fileImportHandler: [{
1393
1500
  type: Input
1394
1501
  }], _attrDisabled: [{
@@ -1783,7 +1890,8 @@ TheSeamGoogleMapsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
1783
1890
  TheSeamFormFieldModule,
1784
1891
  GoogleMapsModule], exports: [TheSeamGoogleMapsComponent,
1785
1892
  TheSeamGoogleMapsPlacesAutocompleteDirective,
1786
- TheSeamGoogleMapsPlacesAutoCompleteComponent] });
1893
+ TheSeamGoogleMapsPlacesAutoCompleteComponent,
1894
+ TheSeamMapsControlComponent] });
1787
1895
  TheSeamGoogleMapsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheSeamGoogleMapsModule, imports: [CommonModule,
1788
1896
  ObserversModule,
1789
1897
  TheSeamSharedModule,
@@ -1816,6 +1924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1816
1924
  TheSeamGoogleMapsComponent,
1817
1925
  TheSeamGoogleMapsPlacesAutocompleteDirective,
1818
1926
  TheSeamGoogleMapsPlacesAutoCompleteComponent,
1927
+ TheSeamMapsControlComponent,
1819
1928
  ]
1820
1929
  }]
1821
1930
  }] });
@@ -1944,5 +2053,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1944
2053
  * Generated bundle index. Do not edit.
1945
2054
  */
1946
2055
 
1947
- export { AppFeaturePropertyName, GoogleMapsContextMenu, GoogleMapsControlsService, GoogleMapsService, MapControlRef, MapValueManagerService, MapValueSource, SEAM_GOOGLE_PLACES_AUTOCOMPLETE_DEFAULT_OPTIONS, THESEAM_LAZY_MAPS_API_CONFIG, TheSeamGoogleMapsApiLoader, TheSeamGoogleMapsComponent, TheSeamGoogleMapsModule, TheSeamGoogleMapsPlacesAutoCompleteComponent, TheSeamGoogleMapsPlacesAutocompleteDirective, TheSeamGoogleMapsRecenterButtonControlComponent, TheSeamGoogleMapsUploadButtonControlComponent, TheSeamLazyMapsApiLoader, TheSeamMapFileDropComponent, TheSeamMapsControlComponent, TheSeamNoopGoogleMapsAPILoader, addInnerFeatureCutoutToExteriorFeature, createDataFeatureFromPolygon, createFeatureChangeObservable, featureContains, fixPathDifferentStartingAndEndingPoint, getBoundsWithAllFeatures, getFeatureBounds, getFeatureCenter, getFeaturesCount, getPossibleExteriorFeature, isAppFeatureProperty, isFeatureSelected, multiPolygonCoordinates, polygonCoordinates, polygonHasValidPathsLengths, removeAllFeatures, setFeatureSelected, stripAppFeaturePropertiesFromJson, toTurfJsFeature, toTurfJsMultiPolygon, toTurfJsPolygon };
2056
+ export { AppFeaturePropertyName, GoogleMapsContextMenu, GoogleMapsControlsService, GoogleMapsService, MapControlRef, MapValueManagerService, MapValueSource, SEAM_GOOGLE_PLACES_AUTOCOMPLETE_DEFAULT_OPTIONS, THESEAM_LAZY_MAPS_API_CONFIG, TheSeamGoogleMapsApiLoader, TheSeamGoogleMapsComponent, TheSeamGoogleMapsModule, TheSeamGoogleMapsPlacesAutoCompleteComponent, TheSeamGoogleMapsPlacesAutocompleteDirective, TheSeamGoogleMapsRecenterButtonControlComponent, TheSeamGoogleMapsUploadButtonControlComponent, TheSeamLazyMapsApiLoader, TheSeamMapFileDropComponent, TheSeamMapsControlComponent, TheSeamNoopGoogleMapsAPILoader, addInnerFeatureCutoutToExteriorFeature, createDataFeatureFromPolygon, createFeatureChangeObservable, featureContains, fixPathDifferentStartingAndEndingPoint, getBoundsWithAllFeatures, getFeatureBounds, getFeatureCenter, getFeaturesCount, getHoveredStyleOptionsDefinedByFeature, getPossibleExteriorFeature, getSelectedStyleOptionsDefinedByFeature, getStyleOptionsDefinedByFeature, isAppFeatureProperty, isFeatureSelected, multiPolygonCoordinates, polygonCoordinates, polygonHasValidPathsLengths, removeAllFeatures, setFeatureSelected, stripAppFeaturePropertiesFromJson, toTurfJsFeature, toTurfJsMultiPolygon, toTurfJsPolygon };
1948
2057
  //# sourceMappingURL=theseam-ui-common-google-maps.mjs.map