@coolon/angular-ui-powerups 13.0.0 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/services/visibility-service.mjs +11 -7
- package/fesm2015/coolon-angular-ui-powerups.mjs +10 -6
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +10 -6
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/services/visibility-service.d.ts +5 -1
- package/package.json +1 -2
|
@@ -65,7 +65,6 @@ import * as i2$4 from '@angular/material/list';
|
|
|
65
65
|
import { MatListModule } from '@angular/material/list';
|
|
66
66
|
import 'reflect-metadata';
|
|
67
67
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
68
|
-
import * as wakeEvent from 'wake-event';
|
|
69
68
|
|
|
70
69
|
class CommandDirective extends GarbageCollector {
|
|
71
70
|
constructor(elementRef, matButton, matMenuItem) {
|
|
@@ -9816,7 +9815,7 @@ class VisibilityService extends GarbageCollector {
|
|
|
9816
9815
|
// private _throttledWakeEvents: Stream<Instant>;
|
|
9817
9816
|
constructor(document) {
|
|
9818
9817
|
super();
|
|
9819
|
-
this.
|
|
9818
|
+
this._visible$ = new MutableValueModel();
|
|
9820
9819
|
this.document = document; // see https://stackoverflow.com/a/53715642
|
|
9821
9820
|
const { chain } = Dsl.disposeWith(this);
|
|
9822
9821
|
// Set the name of the hidden property and the change event for visibility
|
|
@@ -9844,8 +9843,7 @@ class VisibilityService extends GarbageCollector {
|
|
|
9844
9843
|
this.document.removeEventListener(this.eventName, handler);
|
|
9845
9844
|
});
|
|
9846
9845
|
}
|
|
9847
|
-
|
|
9848
|
-
this._visibleModel.value = this.isVisible();
|
|
9846
|
+
this._visible$.value = this.isVisible();
|
|
9849
9847
|
// give the network a chance to come back or we end up with a bunch of failed requests.
|
|
9850
9848
|
// should probably also implement a connection service so that we can go
|
|
9851
9849
|
// connectionServer.ensureConnectedThen(fireWakeEvent);
|
|
@@ -9856,11 +9854,17 @@ class VisibilityService extends GarbageCollector {
|
|
|
9856
9854
|
// }
|
|
9857
9855
|
// @trace
|
|
9858
9856
|
updateVisibilityState() {
|
|
9859
|
-
this.
|
|
9857
|
+
this._visible$.value = this.isVisible();
|
|
9860
9858
|
// this._wakeEvents.publish(Instant.now());
|
|
9861
9859
|
}
|
|
9860
|
+
/**
|
|
9861
|
+
* @deprecated use visible$ instead.
|
|
9862
|
+
*/
|
|
9862
9863
|
get visibleModel() {
|
|
9863
|
-
return this.
|
|
9864
|
+
return this._visible$.readonly;
|
|
9865
|
+
}
|
|
9866
|
+
get visible$() {
|
|
9867
|
+
return this._visible$.readonly;
|
|
9864
9868
|
}
|
|
9865
9869
|
isHidden() {
|
|
9866
9870
|
return !!this.document[this.attributeName];
|