monkey-front-core 0.0.175 → 0.0.178

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.
@@ -1908,8 +1908,6 @@ class MonkeyEcxPopoverDirective {
1908
1908
  }
1909
1909
  set popover(show) {
1910
1910
  this._popover = show;
1911
- console.log('show');
1912
- console.log(show);
1913
1911
  if (show) {
1914
1912
  this.createPopover();
1915
1913
  }
@@ -1989,79 +1987,48 @@ class MonkeyEcxPopoverDirective {
1989
1987
  return [];
1990
1988
  }
1991
1989
  createPopover(origin, options) {
1992
- console.log('1');
1993
- try {
1994
- this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
1995
- console.log('2');
1996
- this.positionStrategy = this.overlayPositionBuilder
1997
- .flexibleConnectedTo(origin || this.target)
1998
- .withPush(true)
1999
- .withGrowAfterOpen(true)
2000
- .withPositions(this.getDirPositions(options?.dir));
2001
- console.log('3');
2002
- let width = 0;
2003
- if (this.options?.minwidth || this.minwidth) {
2004
- width = this.target.offsetWidth - 2;
2005
- }
2006
- console.log('4');
2007
- console.log('width');
2008
- console.log(width);
2009
- this.overlayRef = this.overlay.create({
2010
- positionStrategy: this.positionStrategy,
2011
- disposeOnNavigation: true,
2012
- direction: 'ltr',
2013
- hasBackdrop: this.backdrop,
2014
- scrollStrategy: this.overlay.scrollStrategies.reposition({}),
2015
- backdropClass: 'cdk-overlay-transparent-backdrop',
2016
- width,
2017
- maxHeight: '95%',
2018
- height: this.height
2019
- });
2020
- console.log('5');
2021
- let resizeObserver;
2022
- const subs = this.overlayRef.backdropClick().subscribe((e) => {
2023
- this.popover = false;
2024
- console.log('6');
2025
- subs.unsubscribe();
2026
- console.log('7');
2027
- resizeObserver?.disconnect();
2028
- console.log('8');
2029
- this.zone.run(() => {
2030
- console.log('9');
2031
- if (this.closed) {
2032
- console.log('10');
2033
- this.closed(e);
2034
- }
2035
- });
2036
- });
2037
- console.log('11');
2038
- const attached = this.overlayRef.attach(this.templatePortal);
2039
- console.log('12');
2040
- if (this.watch) {
2041
- console.log('13');
2042
- try {
2043
- console.log('14');
2044
- if ('ResizeObserver' in window) {
2045
- console.log('16');
2046
- resizeObserver = new ResizeObserver(([{ contentRect }]) => {
2047
- console.log('17');
2048
- this.overlayRef.updatePosition();
2049
- })
2050
- .observe(attached.rootNodes[0]);
2051
- }
1990
+ this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
1991
+ this.positionStrategy = this.overlayPositionBuilder
1992
+ .flexibleConnectedTo(origin || this.target)
1993
+ .withPush(true)
1994
+ .withGrowAfterOpen(true)
1995
+ .withPositions(this.getDirPositions(options?.dir));
1996
+ this.overlayRef = this.overlay.create({
1997
+ positionStrategy: this.positionStrategy,
1998
+ disposeOnNavigation: true,
1999
+ direction: 'ltr',
2000
+ hasBackdrop: this.backdrop,
2001
+ scrollStrategy: this.overlay.scrollStrategies.reposition({}),
2002
+ backdropClass: 'cdk-overlay-transparent-backdrop',
2003
+ width: (this.options?.minwidth || this.minwidth) ? (this.target.offsetWidth - 2) : undefined,
2004
+ maxHeight: '95%',
2005
+ height: this.height
2006
+ });
2007
+ let resizeObserver;
2008
+ const subs = this.overlayRef.backdropClick().subscribe((e) => {
2009
+ this.popover = false;
2010
+ subs.unsubscribe();
2011
+ resizeObserver?.disconnect();
2012
+ this.zone.run(() => {
2013
+ if (this.closed) {
2014
+ this.closed(e);
2052
2015
  }
2053
- catch (e) {
2054
- // not to do
2016
+ });
2017
+ });
2018
+ const attached = this.overlayRef.attach(this.templatePortal);
2019
+ if (this.watch) {
2020
+ try {
2021
+ if ('ResizeObserver' in window) {
2022
+ resizeObserver = new ResizeObserver(([{ contentRect }]) => {
2023
+ this.overlayRef.updatePosition();
2024
+ })
2025
+ .observe(attached.rootNodes[0]);
2055
2026
  }
2056
- console.log('18');
2057
2027
  }
2058
- console.log('19');
2059
- }
2060
- catch (e) {
2061
- console.log('error no popover');
2062
- console.log(e);
2028
+ catch (e) {
2029
+ // not to do
2030
+ }
2063
2031
  }
2064
- console.log('10');
2065
2032
  }
2066
2033
  ngOnDestroy() {
2067
2034
  this.popover = false;
@@ -2763,10 +2730,9 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
2763
2730
  EXTERNAL: externali18n
2764
2731
  };
2765
2732
  }
2733
+ this.translateService.setTranslation('pt-BR', data, true);
2766
2734
  this.translateService.setTranslation(lang, data, true);
2767
2735
  this.translateService.use(lang);
2768
- if (change)
2769
- document.location.reload();
2770
2736
  }, (err) => {
2771
2737
  console.error(`i18n ${i18n?.lang} not found!`);
2772
2738
  monkeyecxErrorConfigService.apply('i18n');