ngx-hana-nameserver-history-viewer 1.2.0-9.8.beta → 1.2.0

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.
@@ -6,7 +6,7 @@ import * as i2$1 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
7
  import * as i1$1 from '@danielmoncada/angular-datetime-picker';
8
8
  import { OwlDateTimeModule, OwlNativeDateTimeModule } from '@danielmoncada/angular-datetime-picker';
9
- import * as moment$2 from 'moment-timezone';
9
+ import moment from 'moment-timezone';
10
10
  import * as i2 from 'ngx-dropdown-list';
11
11
  import { DropdownListModule } from 'ngx-dropdown-list';
12
12
  import { __awaiter } from 'tslib';
@@ -15,7 +15,7 @@ import * as chartjs from 'chart.js';
15
15
  import { Chart as Chart$2 } from 'chart.js';
16
16
  import { parse } from 'papaparse';
17
17
  import * as hammerjs from 'hammerjs';
18
- import * as moment_module from 'moment';
18
+ import moment$1 from 'moment';
19
19
  import * as i8 from 'ngx-selection-table';
20
20
  import { SelectionTableModule } from 'ngx-selection-table';
21
21
 
@@ -549,7 +549,7 @@ function _getTimeRange(time) {
549
549
  * get default local time zone
550
550
  */
551
551
  function getDefaultTimezone() {
552
- return moment$2.tz.guess();
552
+ return moment.tz.guess();
553
553
  }
554
554
  /**
555
555
  * Get time from provided timezone, using this only because chart.js doesn't support timezone.
@@ -562,8 +562,8 @@ function getTimeFromTimeZone(time, timezone) {
562
562
  timezone = getDefaultTimezone();
563
563
  console.warn(`getTimeFromTimeZone - Input timezone is null, returning the local (${timezone}) time. `);
564
564
  }
565
- const utcOffset = moment$2.tz.zone(timezone).utcOffset(time * 1000);
566
- const currentOffset = moment$2.tz.zone(getDefaultTimezone()).utcOffset(time * 1000);
565
+ const utcOffset = moment.tz.zone(timezone).utcOffset(time * 1000);
566
+ const currentOffset = moment.tz.zone(getDefaultTimezone()).utcOffset(time * 1000);
567
567
  // convert to utc and then to selected timezone
568
568
  return time + currentOffset * 60 - utcOffset * 60;
569
569
  }
@@ -571,7 +571,7 @@ function getTimeFromTimeZone(time, timezone) {
571
571
  * Get time formatted with the provided timezone
572
572
  */
573
573
  function getTimeString(time) {
574
- return moment$2(time).format('YYYY-MM-DD HH:mm:ss');
574
+ return moment(time).format('YYYY-MM-DD HH:mm:ss');
575
575
  }
576
576
  /**
577
577
  * Get the time range string by time array, eg: 2018-10-25 10:10:00 ~ 2018-10-25 12:12:00
@@ -773,7 +773,7 @@ class TimezoneSelectorService {
773
773
  */
774
774
  getZones() {
775
775
  const timezones = [];
776
- const zones = moment$2.tz.names();
776
+ const zones = moment.tz.names();
777
777
  zones.forEach(zone => {
778
778
  // get region
779
779
  let region;
@@ -830,7 +830,7 @@ class TimezoneSelectorComponent {
830
830
  return tz[tz.length - 1].replace('_', ' ');
831
831
  }
832
832
  _getOffset(zone) {
833
- let offset = moment$2.tz(zone).utcOffset();
833
+ let offset = moment.tz(zone).utcOffset();
834
834
  const neg = offset < 0;
835
835
  if (neg) {
836
836
  offset = -1 * offset;
@@ -2711,7 +2711,6 @@ class LTTBDataMipmap extends DataMipmap {
2711
2711
  }
2712
2712
  }
2713
2713
 
2714
- const moment$1 = (window && window.moment) ? window.moment : moment_module;
2715
2714
  function getCompareValue(value) {
2716
2715
  if (typeof value === 'number') {
2717
2716
  return value;
@@ -2790,7 +2789,6 @@ function cullData(data, range) {
2790
2789
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2791
2790
  * SOFTWARE.
2792
2791
  */
2793
- const moment = (window && window.moment) ? window.moment : moment_module;
2794
2792
  // Using dynamic flag to fix the issue of ng-packagr #696: Lambda not supported
2795
2793
  // @dynamic
2796
2794
  /**
@@ -2847,8 +2845,8 @@ class ResponsiveDownsamplePlugin {
2847
2845
  if (isNil(xScale)) {
2848
2846
  return null;
2849
2847
  }
2850
- const start = moment(xScale.getValueForPixel(xScale.left));
2851
- const end = moment(xScale.getValueForPixel(xScale.left + 1));
2848
+ const start = moment$1(xScale.getValueForPixel(xScale.left));
2849
+ const end = moment$1(xScale.getValueForPixel(xScale.left + 1));
2852
2850
  const targetResolution = end.diff(start);
2853
2851
  return targetResolution * options.desiredDataPointDistance;
2854
2852
  }
@@ -3542,6 +3540,7 @@ class NameServerHistoryComponent {
3542
3540
  yield this.fileSelected(simulatedEvent);
3543
3541
  this.port = undefined; // clear the port selection
3544
3542
  if (this.autoDisplay) {
3543
+ this.onResize(); // ngAfterViewInit/resize won't work in electron
3545
3544
  this.showChart();
3546
3545
  }
3547
3546
  }