@nova-ui/dashboards 12.0.22 → 12.0.24

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.
Files changed (20) hide show
  1. package/bundles/nova-ui-dashboards.umd.js +26 -6
  2. package/bundles/nova-ui-dashboards.umd.js.map +1 -1
  3. package/esm2015/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +14 -6
  4. package/esm2015/lib/components/timeseries-widget/timeseries-widget.component.js +13 -5
  5. package/esm2015/lib/components/timeseries-widget/types.js +6 -1
  6. package/fesm2015/nova-ui-dashboards.js +28 -8
  7. package/fesm2015/nova-ui-dashboards.js.map +1 -1
  8. package/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.d.ts +1 -2
  9. package/lib/components/timeseries-widget/timeseries-widget.component.d.ts +4 -3
  10. package/lib/components/timeseries-widget/types.d.ts +5 -0
  11. package/package.json +3 -3
  12. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.d.ts +1 -2
  13. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +12 -4
  14. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js.map +1 -1
  15. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.d.ts +4 -3
  16. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.js +9 -1
  17. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.js.map +1 -1
  18. package/sdk/atoms/src/lib/components/timeseries-widget/types.d.ts +5 -0
  19. package/sdk/atoms/src/lib/components/timeseries-widget/types.js +6 -1
  20. package/sdk/atoms/src/lib/components/timeseries-widget/types.js.map +1 -1
@@ -7117,6 +7117,11 @@
7117
7117
  TimeseriesTransformer["Standardize"] = "standardize";
7118
7118
  TimeseriesTransformer["FloatingAverage"] = "floatingAverage";
7119
7119
  })(exports.TimeseriesTransformer || (exports.TimeseriesTransformer = {}));
7120
+ exports.TimeseriesWidgetProjectType = void 0;
7121
+ (function (TimeseriesWidgetProjectType) {
7122
+ TimeseriesWidgetProjectType[TimeseriesWidgetProjectType["ModernDashboard"] = 0] = "ModernDashboard";
7123
+ TimeseriesWidgetProjectType[TimeseriesWidgetProjectType["PerfstackApp"] = 1] = "PerfstackApp";
7124
+ })(exports.TimeseriesWidgetProjectType || (exports.TimeseriesWidgetProjectType = {}));
7120
7125
 
7121
7126
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
7122
7127
  var intlFormatOptions = {
@@ -7495,10 +7500,17 @@
7495
7500
  this.chartAssist.update(seriesSet);
7496
7501
  if (this.configuration.enableZoom) {
7497
7502
  this.chartAssist.sparks.forEach(function (spark) {
7498
- var _a, _b;
7499
- if (!((_a = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _a === void 0 ? void 0 : _a.hasPlugin(i2.TimeseriesZoomPlugin)) &&
7500
- _this.configuration.enableZoom) {
7501
- (_b = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _b === void 0 ? void 0 : _b.addPlugin(_this.zoomPlugin);
7503
+ var _a, _b, _c, _d, _e;
7504
+ if (((_a = _this.configuration) === null || _a === void 0 ? void 0 : _a.projectType) ===
7505
+ exports.TimeseriesWidgetProjectType.PerfstackApp) {
7506
+ if (!((_b = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _b === void 0 ? void 0 : _b.hasPlugin(i2.TimeseriesZoomPlugin))) {
7507
+ (_c = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _c === void 0 ? void 0 : _c.addPlugin(new i2.TimeseriesZoomPlugin({ collectionId: _this.collectionId }, _this.zoomPluginsSyncService));
7508
+ }
7509
+ }
7510
+ else {
7511
+ if (!((_d = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _d === void 0 ? void 0 : _d.hasPlugin(i2.ZoomPlugin))) {
7512
+ (_e = spark === null || spark === void 0 ? void 0 : spark.chart) === null || _e === void 0 ? void 0 : _e.addPlugin(new i2.ZoomPlugin({ enableExternalEvents: true }));
7513
+ }
7502
7514
  }
7503
7515
  });
7504
7516
  // only need to subscribe to one chart's SET_DOMAIN_EVENT
@@ -8756,9 +8768,17 @@
8756
8768
  this.zoomPluginsSyncService = zoomPluginsSyncService;
8757
8769
  this.elementClass = "";
8758
8770
  this.allowPopover = false;
8771
+ this.timeseriesWidgetProjectType = exports.TimeseriesWidgetProjectType;
8759
8772
  }
8760
8773
  TimeseriesWidgetComponent.prototype.ngOnInit = function () {
8761
- this.zoomPlugin = new i2.TimeseriesZoomPlugin({ collectionId: this.collectionId }, this.zoomPluginsSyncService);
8774
+ var _a;
8775
+ if (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.projectType) ===
8776
+ exports.TimeseriesWidgetProjectType.PerfstackApp) {
8777
+ this.zoomPlugin = new i2.TimeseriesZoomPlugin({ collectionId: this.collectionId }, this.zoomPluginsSyncService);
8778
+ }
8779
+ else {
8780
+ this.zoomPlugin = new i2.ZoomPlugin();
8781
+ }
8762
8782
  };
8763
8783
  TimeseriesWidgetComponent.prototype.ngOnChanges = function (changes) {
8764
8784
  var _a, _b;
@@ -8792,7 +8812,7 @@
8792
8812
  }());
8793
8813
  TimeseriesWidgetComponent.lateLoadKey = "TimeseriesWidgetComponent";
8794
8814
  /** @nocollapse */ TimeseriesWidgetComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: TimeseriesWidgetComponent, deps: [{ token: TimeseriesChartPresetService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.TimeseriesZoomPluginsSyncService }], target: i0__namespace.ɵɵFactoryTarget.Component });
8795
- /** @nocollapse */ TimeseriesWidgetComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: TimeseriesWidgetComponent, selector: "nui-timeseries-widget", inputs: { widgetData: "widgetData", configuration: "configuration", collectionId: "collectionId", elementClass: "elementClass" }, host: { properties: { "class": "this.elementClass" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"h-100 timeseries-widget-content\"\n *ngIf=\"shouldShowChart()\"\n (mouseleave)=\"toggleLeave()\"\n (mouseenter)=\"toggleEnter()\"\n>\n <ng-container\n nuiComponentPortal\n componentId=\"timeseriesWidgetChart\"\n [componentType]=\"chartPreset.componentType\"\n [properties]=\"{\n widgetData: widgetData,\n configuration: configuration,\n collectionId: collectionId || configuration?.collectionId,\n zoomPlugin: zoomPlugin\n }\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\n </ng-template>\n </ng-container>\n <nui-timeseries-inspection-menu\n [allowed]=\"allowPopover\"\n [plugin]=\"zoomPlugin\"\n [collectionId]=\"collectionId\"\n [exploringEnabled]=\"isExploringEnabled()\"\n [metricIds]=\"configuration?.metricIds\"\n ></nui-timeseries-inspection-menu>\n</div>\n<div *ngIf=\"!shouldShowChart()\">\n <nui-image image=\"no-data-to-show\"></nui-image>\n</div>\n", styles: [".timeseries-widget-content{padding:10px;position:relative}\n"], components: [{ type: TimeseriesInspectionMenuComponent, selector: "nui-timeseries-inspection-menu", inputs: ["plugin", "exploringEnabled", "metricIds", "collectionId", "allowed"] }, { type: i3__namespace.ImageComponent, selector: "nui-image", inputs: ["width", "height", "image", "description", "float", "margin", "isWatermark", "autoFill"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ComponentPortalDirective, selector: "[nuiComponentPortal]", inputs: ["componentId", "componentType", "properties", "providers", "outputs"], outputs: ["output"], exportAs: ["nuiComponentPortal"] }, { type: i6__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
8815
+ /** @nocollapse */ TimeseriesWidgetComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: TimeseriesWidgetComponent, selector: "nui-timeseries-widget", inputs: { widgetData: "widgetData", configuration: "configuration", collectionId: "collectionId", elementClass: "elementClass" }, host: { properties: { "class": "this.elementClass" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"h-100 timeseries-widget-content\"\n *ngIf=\"shouldShowChart()\"\n (mouseleave)=\"toggleLeave()\"\n (mouseenter)=\"toggleEnter()\"\n>\n <ng-container\n nuiComponentPortal\n componentId=\"timeseriesWidgetChart\"\n [componentType]=\"chartPreset.componentType\"\n [properties]=\"{\n widgetData: widgetData,\n configuration: configuration,\n collectionId: collectionId || configuration?.collectionId,\n zoomPlugin: zoomPlugin\n }\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\n </ng-template>\n </ng-container>\n <nui-timeseries-inspection-menu\n *ngIf=\"\n configuration?.enableZoom &&\n configuration?.projectType ===\n timeseriesWidgetProjectType.PerfstackApp\n \"\n [allowed]=\"allowPopover\"\n [plugin]=\"zoomPlugin\"\n [collectionId]=\"collectionId\"\n [exploringEnabled]=\"isExploringEnabled()\"\n [metricIds]=\"configuration?.metricIds\"\n ></nui-timeseries-inspection-menu>\n</div>\n<div *ngIf=\"!shouldShowChart()\">\n <nui-image image=\"no-data-to-show\"></nui-image>\n</div>\n", styles: [".timeseries-widget-content{padding:10px;position:relative}\n"], components: [{ type: TimeseriesInspectionMenuComponent, selector: "nui-timeseries-inspection-menu", inputs: ["plugin", "exploringEnabled", "metricIds", "collectionId", "allowed"] }, { type: i3__namespace.ImageComponent, selector: "nui-image", inputs: ["width", "height", "image", "description", "float", "margin", "isWatermark", "autoFill"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ComponentPortalDirective, selector: "[nuiComponentPortal]", inputs: ["componentId", "componentType", "properties", "providers", "outputs"], outputs: ["output"], exportAs: ["nuiComponentPortal"] }, { type: i6__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
8796
8816
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: TimeseriesWidgetComponent, decorators: [{
8797
8817
  type: i0.Component,
8798
8818
  args: [{