@bizy/core 19.4.1 → 19.4.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.
@@ -5495,28 +5495,31 @@ class BizyKeyboardService {
5495
5495
  document;
5496
5496
  #shiftHolding = new BehaviorSubject(false);
5497
5497
  #controlHolding = new BehaviorSubject(false);
5498
+ get shiftHolding$() {
5499
+ return this.#shiftHolding.asObservable();
5500
+ }
5498
5501
  get controlHolding$() {
5499
5502
  return this.#controlHolding.asObservable();
5500
5503
  }
5501
5504
  constructor(document) {
5502
5505
  this.document = document;
5506
+ this.document.addEventListener('visibilitychange', () => {
5507
+ this.#shiftHolding.next(false);
5508
+ this.#controlHolding.next(false);
5509
+ });
5503
5510
  this.document.addEventListener('keydown', (event) => {
5504
5511
  if (event.key === 'Shift') {
5505
5512
  this.#shiftHolding.next(true);
5506
5513
  }
5514
+ if (event.key === 'Meta' || event.key === 'Control') {
5515
+ this.#controlHolding.next(true);
5516
+ }
5507
5517
  });
5508
5518
  this.document.addEventListener('keyup', (event) => {
5509
5519
  if (event.key === 'Shift') {
5510
5520
  this.#shiftHolding.next(false);
5511
5521
  }
5512
- });
5513
- this.document.addEventListener('keydown', (event) => {
5514
- if (event.ctrlKey && event.key !== 'Control') {
5515
- this.#controlHolding.next(true);
5516
- }
5517
- });
5518
- this.document.addEventListener('keyup', (event) => {
5519
- if (event.ctrlKey && event.key !== 'Control') {
5522
+ if (event.key === 'Meta' || event.key === 'Control') {
5520
5523
  this.#controlHolding.next(false);
5521
5524
  }
5522
5525
  });
@@ -5634,7 +5637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
5634
5637
 
5635
5638
  class BizyRouterService {
5636
5639
  router;
5637
- _backPath = '';
5640
+ static backPath = '';
5638
5641
  transitionsEnd$;
5639
5642
  transitionsStart$;
5640
5643
  popStateEvent$;
@@ -5650,7 +5653,7 @@ class BizyRouterService {
5650
5653
  return window.location.pathname;
5651
5654
  }
5652
5655
  getBackPath() {
5653
- return this._backPath;
5656
+ return BizyRouterService.backPath;
5654
5657
  }
5655
5658
  getId(activatedRoute, param) {
5656
5659
  return activatedRoute.snapshot.paramMap.get(param);
@@ -5668,10 +5671,10 @@ class BizyRouterService {
5668
5671
  }
5669
5672
  goTo(data) {
5670
5673
  if (data.replace) {
5671
- this._backPath = '';
5674
+ BizyRouterService.backPath = '';
5672
5675
  }
5673
5676
  else {
5674
- this._backPath = this.getURL();
5677
+ BizyRouterService.backPath = this.getURL();
5675
5678
  }
5676
5679
  if (data.path[0] === '/') {
5677
5680
  this.router.navigateByUrl(`${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
@@ -5683,9 +5686,9 @@ class BizyRouterService {
5683
5686
  this.router.navigateByUrl(`${url}/${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
5684
5687
  }
5685
5688
  goBack(data) {
5686
- if (this._backPath) {
5689
+ if (BizyRouterService.backPath) {
5687
5690
  history.back();
5688
- this._backPath = '';
5691
+ BizyRouterService.backPath = '';
5689
5692
  }
5690
5693
  else if (data && data.path) {
5691
5694
  this.router.navigateByUrl(data.path, { replaceUrl: true });