@ts-core/angular 13.1.27 → 13.1.28

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.
@@ -14,7 +14,6 @@ import { CommonModule, isPlatformServer, isPlatformBrowser, DOCUMENT, DatePipe }
14
14
  import * as i5 from '@angular/forms';
15
15
  import { FormsModule, Validators } from '@angular/forms';
16
16
  import * as Cookie from 'ngx-cookie';
17
- import { ResizeSensor } from 'css-element-queries';
18
17
  import * as interact from 'interactjs';
19
18
  import * as i4$2 from '@angular/material/paginator';
20
19
  import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
@@ -1931,6 +1930,7 @@ class CanDeactivateGuard {
1931
1930
  }
1932
1931
 
1933
1932
  class ResizeManager {
1933
+ // protected sensor: ResizeSensor;
1934
1934
  // --------------------------------------------------------------------------
1935
1935
  //
1936
1936
  // Constructor
@@ -1952,9 +1952,16 @@ class ResizeManager {
1952
1952
  this.size = item;
1953
1953
  this.subject.next(item);
1954
1954
  };
1955
+ this.handler2 = (items) => {
1956
+ if (!_.isEmpty(items)) {
1957
+ this.handler(items[0].contentRect);
1958
+ }
1959
+ };
1955
1960
  this.element = ViewUtil.parseElement(element);
1956
1961
  this.subject = new BehaviorSubject({ width: ViewUtil.getWidth(this.element), height: ViewUtil.getHeight(this.element) });
1957
- this.sensor = new ResizeSensor(this.element, this.handler);
1962
+ // this.sensor = new ResizeSensor(this.element, this.handler);
1963
+ this.sensor = new ResizeObserver(this.handler2);
1964
+ this.sensor.observe(this.element);
1958
1965
  }
1959
1966
  // --------------------------------------------------------------------------
1960
1967
  //
@@ -1985,12 +1992,16 @@ class ResizeManager {
1985
1992
  // --------------------------------------------------------------------------
1986
1993
  destroy() {
1987
1994
  if (!_.isNil(this.sensor)) {
1995
+ this.sensor.unobserve(this.element);
1996
+ this.sensor.disconnect();
1997
+ this.sensor = null;
1998
+ /*
1988
1999
  this.sensor.detach(this.handler);
1989
2000
  try {
1990
2001
  this.sensor.reset();
1991
- }
1992
- catch (error) { }
2002
+ } catch (error) {}
1993
2003
  this.sensor = null;
2004
+ */
1994
2005
  }
1995
2006
  if (!_.isNil(this.subject)) {
1996
2007
  this.subject.complete();