ngx-hana-nameserver-history-viewer 1.1.9-7.beta → 1.1.9-9.2.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.
- package/esm2020/src/nameserver-history-viewer/components/port-selector/port-selector.component.mjs +3 -3
- package/esm2020/src/nameserver-history-viewer/components/timezone-selector/timezone-selector.component.mjs +2 -2
- package/esm2020/src/nameserver-history-viewer/utils/chartjs-downsample/data_culling.mjs +2 -3
- package/esm2020/src/nameserver-history-viewer/utils/chartjs-downsample/responsive_downsample_plugin.mjs +2 -3
- package/esm2020/src/nameserver-history-viewer/utils/time-util.mjs +2 -2
- package/fesm2015/ngx-hana-nameserver-history-viewer.mjs +13 -14
- package/fesm2015/ngx-hana-nameserver-history-viewer.mjs.map +1 -1
- package/fesm2020/ngx-hana-nameserver-history-viewer.mjs +13 -14
- package/fesm2020/ngx-hana-nameserver-history-viewer.mjs.map +1 -1
- package/package.json +4 -4
- package/src/nameserver-history-viewer/utils/chartjs-downsample/data_culling.d.ts +2 -2
|
@@ -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
|
|
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
|
|
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
|
|
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 =
|
|
565
|
-
const currentOffset =
|
|
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,7 +571,7 @@ function getTimeFromTimeZone(time, timezone) {
|
|
|
570
571
|
* Get time formatted with the provided timezone
|
|
571
572
|
*/
|
|
572
573
|
function getTimeString(time) {
|
|
573
|
-
return
|
|
574
|
+
return moment__default(time).format('YYYY-MM-DD HH:mm:ss');
|
|
574
575
|
}
|
|
575
576
|
/**
|
|
576
577
|
* Get the time range string by time array, eg: 2018-10-25 10:10:00 ~ 2018-10-25 12:12:00
|
|
@@ -772,7 +773,7 @@ class TimezoneSelectorService {
|
|
|
772
773
|
*/
|
|
773
774
|
getZones() {
|
|
774
775
|
const timezones = [];
|
|
775
|
-
const zones = moment
|
|
776
|
+
const zones = moment.tz.names();
|
|
776
777
|
zones.forEach(zone => {
|
|
777
778
|
// get region
|
|
778
779
|
let region;
|
|
@@ -829,7 +830,7 @@ class TimezoneSelectorComponent {
|
|
|
829
830
|
return tz[tz.length - 1].replace('_', ' ');
|
|
830
831
|
}
|
|
831
832
|
_getOffset(zone) {
|
|
832
|
-
let offset =
|
|
833
|
+
let offset = moment__default.tz(zone).utcOffset();
|
|
833
834
|
const neg = offset < 0;
|
|
834
835
|
if (neg) {
|
|
835
836
|
offset = -1 * offset;
|
|
@@ -948,7 +949,7 @@ class PortSelectorComponent {
|
|
|
948
949
|
}
|
|
949
950
|
PortSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PortSelectorComponent, deps: [{ token: PortSelectorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
950
951
|
PortSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PortSelectorComponent, selector: "port-selector", inputs: { disabled: "disabled", port: "port", ports: "ports" }, outputs: { portChange: "portChange" }, providers: [PortSelectorService], ngImport: i0, template: `
|
|
951
|
-
<label>
|
|
952
|
+
<label style="width: 100%">
|
|
952
953
|
<ngx-dropdown-list (selectionChange)="onChange($event)"
|
|
953
954
|
[items]="displayPorts"
|
|
954
955
|
[multiSelection]="false"
|
|
@@ -964,7 +965,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
964
965
|
args: [{
|
|
965
966
|
selector: 'port-selector',
|
|
966
967
|
template: `
|
|
967
|
-
<label>
|
|
968
|
+
<label style="width: 100%">
|
|
968
969
|
<ngx-dropdown-list (selectionChange)="onChange($event)"
|
|
969
970
|
[items]="displayPorts"
|
|
970
971
|
[multiSelection]="false"
|
|
@@ -2704,7 +2705,6 @@ class LTTBDataMipmap extends DataMipmap {
|
|
|
2704
2705
|
}
|
|
2705
2706
|
}
|
|
2706
2707
|
|
|
2707
|
-
const moment$1 = (window && window.moment) ? window.moment : moment_module;
|
|
2708
2708
|
function getCompareValue(value) {
|
|
2709
2709
|
if (typeof value === 'number') {
|
|
2710
2710
|
return value;
|
|
@@ -2783,7 +2783,6 @@ function cullData(data, range) {
|
|
|
2783
2783
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2784
2784
|
* SOFTWARE.
|
|
2785
2785
|
*/
|
|
2786
|
-
const moment = (window && window.moment) ? window.moment : moment_module;
|
|
2787
2786
|
// Using dynamic flag to fix the issue of ng-packagr #696: Lambda not supported
|
|
2788
2787
|
// @dynamic
|
|
2789
2788
|
/**
|
|
@@ -2840,8 +2839,8 @@ class ResponsiveDownsamplePlugin {
|
|
|
2840
2839
|
if (isNil(xScale)) {
|
|
2841
2840
|
return null;
|
|
2842
2841
|
}
|
|
2843
|
-
const start = moment(xScale.getValueForPixel(xScale.left));
|
|
2844
|
-
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));
|
|
2845
2844
|
const targetResolution = end.diff(start);
|
|
2846
2845
|
return targetResolution * options.desiredDataPointDistance;
|
|
2847
2846
|
}
|