@theseam/ui-common 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/breadcrumbs/_breadcrumbs-theme.scss +3 -3
  2. package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +10 -10
  3. package/bundles/theseam-ui-common-dynamic.umd.js +1 -0
  4. package/bundles/theseam-ui-common-dynamic.umd.js.map +1 -1
  5. package/bundles/theseam-ui-common-google-maps.umd.js +1 -1
  6. package/bundles/theseam-ui-common-google-maps.umd.js.map +1 -1
  7. package/bundles/theseam-ui-common-modal.umd.js +21 -1
  8. package/bundles/theseam-ui-common-modal.umd.js.map +1 -1
  9. package/bundles/theseam-ui-common-utils.umd.js.map +1 -1
  10. package/bundles/theseam-ui-common-widget.umd.js +3 -1
  11. package/bundles/theseam-ui-common-widget.umd.js.map +1 -1
  12. package/esm2015/dynamic/evaluators/jexl-evaluator/jexl-evaluator.js +2 -1
  13. package/esm2015/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.js +2 -2
  14. package/esm2015/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.directive.js +1 -1
  15. package/esm2015/modal/modal-ref.js +22 -2
  16. package/esm2015/utils/geo-json/coerce-feature-collection.js +1 -1
  17. package/esm2015/utils/geo-json/geo-json-to-area.js +1 -1
  18. package/esm2015/utils/geo-json/is-feature-collection.validator.js +1 -1
  19. package/esm2015/utils/geo-json/is-only-geometry-types.js +1 -1
  20. package/esm2015/utils/geo-json/is-only-geometry-types.validator.js +1 -1
  21. package/esm2015/utils/geo-json/merge-polygons.js +1 -1
  22. package/esm2015/utils/geo-json/no-inner-rings.validator.js +1 -1
  23. package/esm2015/utils/geo-json/no-kinks.validator.js +1 -1
  24. package/esm2015/utils/geo-json/split-multi-polygons.js +1 -1
  25. package/esm2015/widget/widget-content-components/widget-tile/widget-tile.component.js +4 -2
  26. package/fesm2015/theseam-ui-common-dynamic.js +1 -0
  27. package/fesm2015/theseam-ui-common-dynamic.js.map +1 -1
  28. package/fesm2015/theseam-ui-common-google-maps.js +1 -1
  29. package/fesm2015/theseam-ui-common-google-maps.js.map +1 -1
  30. package/fesm2015/theseam-ui-common-modal.js +21 -1
  31. package/fesm2015/theseam-ui-common-modal.js.map +1 -1
  32. package/fesm2015/theseam-ui-common-utils.js.map +1 -1
  33. package/fesm2015/theseam-ui-common-widget.js +3 -1
  34. package/fesm2015/theseam-ui-common-widget.js.map +1 -1
  35. package/framework/top-bar/_top-bar-theme.scss +5 -5
  36. package/google-maps/theseam-ui-common-google-maps.metadata.json +1 -1
  37. package/modal/modal-ref.d.ts +1 -0
  38. package/modal/theseam-ui-common-modal.metadata.json +1 -1
  39. package/package.json +1 -1
  40. package/widget/styles/_variables.scss +1 -0
  41. package/widget/theseam-ui-common-widget.metadata.json +1 -1
  42. package/widget/widget-content-components/widget-tile/widget-tile.component.d.ts +2 -0
  43. package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -1
@@ -33,7 +33,23 @@
33
33
  }
34
34
  });
35
35
  // NOTE: For current bootstrap style modal
36
- _overlayRef.overlayElement.addEventListener('click', _bootstrapBackdropClickListener);
36
+ // Replaced click event because it was easy to accidentally close
37
+ // the dialog by mousing down inside the modal and mousing up outside
38
+ // (like when dragging a map, selecting text, etc)
39
+ var clickStarted_1 = false;
40
+ _overlayRef.overlayElement.addEventListener('mousedown', function (event) {
41
+ // @ts-ignore
42
+ if (!_this._isModalMouseEvent(event.path)) {
43
+ clickStarted_1 = true;
44
+ }
45
+ });
46
+ _overlayRef.overlayElement.addEventListener('mouseup', function (event) {
47
+ // @ts-ignore
48
+ if (clickStarted_1 && !_this._isModalMouseEvent(event.path)) {
49
+ clickStarted_1 = false;
50
+ _bootstrapBackdropClickListener();
51
+ }
52
+ }, {});
37
53
  }
38
54
  this.beforeClosed().subscribe(function () {
39
55
  _this._overlayRef.detachBackdrop();
@@ -130,6 +146,10 @@
130
146
  var _this = this;
131
147
  return this._containerInstance._afterExit.pipe(operators.map(function () { return _this._result; }));
132
148
  };
149
+ // TODO: pull container name in from element, to protect against changes
150
+ ModalRef.prototype._isModalMouseEvent = function (path) {
151
+ return path.findIndex(function (p) { return p.localName === 'seam-modal-container'; }) !== -1;
152
+ };
133
153
  return ModalRef;
134
154
  }());
135
155