ngx-hana-nameserver-history-viewer 1.1.9-8.beta → 1.1.9-9.1.beta

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,8 @@ 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 * as moment from 'moment-timezone';
10
+ import moment__default from 'moment-timezone';
10
11
  import * as i2 from 'ngx-dropdown-list';
11
12
  import { DropdownListModule } from 'ngx-dropdown-list';
12
13
  import { SelectionModel } from '@angular/cdk/collections';
@@ -14,7 +15,7 @@ import * as chartjs from 'chart.js';
14
15
  import { Chart as Chart$2 } from 'chart.js';
15
16
  import { parse } from 'papaparse';
16
17
  import * as hammerjs from 'hammerjs';
17
- import * as moment_module from 'moment';
18
+ import moment$1 from 'moment';
18
19
  import * as i8 from 'ngx-selection-table';
19
20
  import { SelectionTableModule } from 'ngx-selection-table';
20
21
 
@@ -548,7 +549,7 @@ function _getTimeRange(time) {
548
549
  * get default local time zone
549
550
  */
550
551
  function getDefaultTimezone() {
551
- return moment$2.tz.guess();
552
+ return moment__default.tz.guess();
552
553
  }
553
554
  /**
554
555
  * Get time from provided timezone, using this only because chart.js doesn't support timezone.
@@ -561,8 +562,8 @@ function getTimeFromTimeZone(time, timezone) {
561
562
  timezone = getDefaultTimezone();
562
563
  console.warn(`getTimeFromTimeZone - Input timezone is null, returning the local (${timezone}) time. `);
563
564
  }
564
- const utcOffset = moment$2.tz.zone(timezone).utcOffset(time * 1000);
565
- const currentOffset = moment$2.tz.zone(getDefaultTimezone()).utcOffset(time * 1000);
565
+ const utcOffset = moment__default.tz.zone(timezone).utcOffset(time * 1000);
566
+ const currentOffset = moment__default.tz.zone(getDefaultTimezone()).utcOffset(time * 1000);
566
567
  // convert to utc and then to selected timezone
567
568
  return time + currentOffset * 60 - utcOffset * 60;
568
569
  }
@@ -570,16 +571,7 @@ function getTimeFromTimeZone(time, timezone) {
570
571
  * Get time formatted with the provided timezone
571
572
  */
572
573
  function getTimeString(time) {
573
- console.log('3333312', time, '4444434', moment$2(time));
574
- const dateTime = new Date(time);
575
- const year = dateTime.getFullYear();
576
- const month = ('0' + (dateTime.getMonth() + 1)).slice(-2);
577
- const date = ('0' + dateTime.getDate()).slice(-2);
578
- const hour = ('0' + dateTime.getHours()).slice(-2);
579
- const minute = ('0' + dateTime.getMinutes()).slice(-2);
580
- const second = ('0' + dateTime.getSeconds()).slice(-2);
581
- return `${year}-${month}-${date} ${hour}:${minute}:${second}}`;
582
- // return moment(time).format('YYYY-MM-DD HH:mm:ss');
574
+ return moment__default(time).format('YYYY-MM-DD HH:mm:ss');
583
575
  }
584
576
  /**
585
577
  * Get the time range string by time array, eg: 2018-10-25 10:10:00 ~ 2018-10-25 12:12:00
@@ -781,7 +773,7 @@ class TimezoneSelectorService {
781
773
  */
782
774
  getZones() {
783
775
  const timezones = [];
784
- const zones = moment$2.tz.names();
776
+ const zones = moment.tz.names();
785
777
  zones.forEach(zone => {
786
778
  // get region
787
779
  let region;
@@ -838,7 +830,7 @@ class TimezoneSelectorComponent {
838
830
  return tz[tz.length - 1].replace('_', ' ');
839
831
  }
840
832
  _getOffset(zone) {
841
- let offset = moment$2.tz(zone).utcOffset();
833
+ let offset = moment__default.tz(zone).utcOffset();
842
834
  const neg = offset < 0;
843
835
  if (neg) {
844
836
  offset = -1 * offset;
@@ -2713,7 +2705,6 @@ class LTTBDataMipmap extends DataMipmap {
2713
2705
  }
2714
2706
  }
2715
2707
 
2716
- const moment$1 = (window && window.moment) ? window.moment : moment_module;
2717
2708
  function getCompareValue(value) {
2718
2709
  if (typeof value === 'number') {
2719
2710
  return value;
@@ -2792,7 +2783,6 @@ function cullData(data, range) {
2792
2783
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2793
2784
  * SOFTWARE.
2794
2785
  */
2795
- const moment = (window && window.moment) ? window.moment : moment_module;
2796
2786
  // Using dynamic flag to fix the issue of ng-packagr #696: Lambda not supported
2797
2787
  // @dynamic
2798
2788
  /**
@@ -2849,8 +2839,8 @@ class ResponsiveDownsamplePlugin {
2849
2839
  if (isNil(xScale)) {
2850
2840
  return null;
2851
2841
  }
2852
- const start = moment(xScale.getValueForPixel(xScale.left));
2853
- const end = moment(xScale.getValueForPixel(xScale.left + 1));
2842
+ const start = moment$1(xScale.getValueForPixel(xScale.left));
2843
+ const end = moment$1(xScale.getValueForPixel(xScale.left + 1));
2854
2844
  const targetResolution = end.diff(start);
2855
2845
  return targetResolution * options.desiredDataPointDistance;
2856
2846
  }