@c8y/ngx-components 1021.55.1 → 1021.55.3
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/core/common/interval-based-reload.abstract.d.ts +13 -3
- package/core/common/interval-based-reload.abstract.d.ts.map +1 -1
- package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts +3 -4
- package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts.map +1 -1
- package/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.d.ts +1 -0
- package/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.d.ts.map +1 -1
- package/core/dashboard/widgets-dashboard-event.service.d.ts +7 -0
- package/core/dashboard/widgets-dashboard-event.service.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts +6 -2
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts.map +1 -1
- package/datapoint-explorer/view/configuration/workspace-configuration.component.d.ts.map +1 -1
- package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.d.ts.map +1 -1
- package/datapoints-export-selector/datapoints-export-selector.component.d.ts +3 -1
- package/datapoints-export-selector/datapoints-export-selector.component.d.ts.map +1 -1
- package/echart/charts.component.d.ts.map +1 -1
- package/esm2022/core/aggregation/aggregation.model.mjs +2 -2
- package/esm2022/core/common/interval-based-reload.abstract.mjs +13 -13
- package/esm2022/core/dashboard/dashboard-child.component.mjs +3 -3
- package/esm2022/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.mjs +6 -8
- package/esm2022/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.mjs +9 -1
- package/esm2022/core/dashboard/widgets-dashboard-event.service.mjs +19 -2
- package/esm2022/core/dashboard/widgets-dashboard.component.mjs +3 -3
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context-icon-bar/widget-time-context-icon-bar.component.mjs +3 -3
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context.component.mjs +48 -23
- package/esm2022/datapoint-explorer/view/configuration/workspace-configuration.component.mjs +13 -8
- package/esm2022/datapoint-explorer/view/datapoint-explorer.component.mjs +2 -2
- package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.mjs +1 -3
- package/esm2022/datapoints-export-selector/datapoints-export-selector.component.mjs +9 -5
- package/esm2022/echart/charts.component.mjs +22 -84
- package/esm2022/widgets/definitions/datapoints-table/index.mjs +3 -2
- package/esm2022/widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.mjs +3 -3
- package/esm2022/widgets/implementations/alarms/alarm-widget-alarms-reload.component.mjs +17 -100
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.mjs +47 -34
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.mjs +35 -13
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table/datapoints-table.component.mjs +3 -3
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.mjs +75 -35
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-widget.model.mjs +3 -5
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +13 -8
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +7 -6
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +21 -83
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs +2 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +18 -101
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +147 -76
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +209 -162
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +3 -7
- package/package.json +1 -1
- package/widgets/definitions/datapoints-table/index.d.ts.map +1 -1
- package/widgets/implementations/alarms/alarm-widget-alarms-reload.component.d.ts +18 -63
- package/widgets/implementations/alarms/alarm-widget-alarms-reload.component.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts +4 -2
- package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.d.ts +16 -8
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts +21 -4
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-widget.model.d.ts +4 -1
- package/widgets/implementations/datapoints-table/datapoints-table-widget.model.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-datapoints-table.mjs","sources":["../../widgets/definitions/datapoints-table/index.ts","../../widgets/definitions/datapoints-table/c8y-ngx-components-widgets-definitions-datapoints-table.ts"],"sourcesContent":["import type { DynamicComponentDefinition } from '@c8y/ngx-components';\nimport { DynamicComponentErrorStrategy, gettext, hookComponent } from '@c8y/ngx-components';\nimport type { ContextWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\n\nexport const dataPointsTableWidgetDefinition = {\n id: defaultWidgetIds.DATA_POINTS_TABLE,\n label: gettext('Data points table'),\n description: gettext(`A table display of a collection of data points`),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableViewWidgetComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/data-points-table-widget.png',\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n minCol: 6,\n datapointAttributes: ['datapoints']\n }\n }\n },\n displaySettings: {\n globalTimeContext: true,\n globalRealtimeContext:
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-datapoints-table.mjs","sources":["../../widgets/definitions/datapoints-table/index.ts","../../widgets/definitions/datapoints-table/c8y-ngx-components-widgets-definitions-datapoints-table.ts"],"sourcesContent":["import type { DynamicComponentDefinition } from '@c8y/ngx-components';\nimport { DynamicComponentErrorStrategy, gettext, hookComponent } from '@c8y/ngx-components';\nimport type { ContextWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\n\nexport const dataPointsTableWidgetDefinition = {\n id: defaultWidgetIds.DATA_POINTS_TABLE,\n label: gettext('Data points table'),\n description: gettext(`A table display of a collection of data points`),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableViewWidgetComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/data-points-table-widget.png',\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n minCol: 6,\n datapointAttributes: ['datapoints']\n }\n }\n },\n displaySettings: {\n globalAutoRefreshContext: true,\n globalTimeContext: true,\n globalRealtimeContext: false,\n globalAggregationContext: true\n }\n } as ContextWidgetConfig\n} satisfies DynamicComponentDefinition;\n\nexport const dataPointsTableWidgetProviders = [hookComponent(dataPointsTableWidgetDefinition)];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAKa,MAAA,+BAA+B,GAAG;IAC7C,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;AACtC,IAAA,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC;AACnC,IAAA,WAAW,EAAE,OAAO,CAAC,CAAA,8CAAA,CAAgD,CAAC;AACtE,IAAA,aAAa,EAAE,MACb,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,kCAAkC,CAC1C;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,oCAAoC,CAC5C;AACH,IAAA,YAAY,EAAE,+CAA+C;IAC7D,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE;AACR,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAAE,IAAI;AACpB,oBAAA,MAAM,EAAE,CAAC;oBACT,mBAAmB,EAAE,CAAC,YAAY,CAAC;AACpC,iBAAA;AACF,aAAA;AACF,SAAA;AACD,QAAA,eAAe,EAAE;AACf,YAAA,wBAAwB,EAAE,IAAI;AAC9B,YAAA,iBAAiB,EAAE,IAAI;AACvB,YAAA,qBAAqB,EAAE,KAAK;AAC5B,YAAA,wBAAwB,EAAE,IAAI;AAC/B,SAAA;AACqB,KAAA;EACa;AAE1B,MAAA,8BAA8B,GAAG,CAAC,aAAa,CAAC,+BAA+B,CAAC;;AC3C7F;;AAEG;;;;"}
|
|
@@ -5,13 +5,13 @@ import { FormControl, ControlContainer, NgForm, FormsModule as FormsModule$1, Re
|
|
|
5
5
|
import * as i2 from '@c8y/client';
|
|
6
6
|
import { Severity, AlarmStatus, SEVERITY_LABELS, ALARM_STATUS_LABELS } from '@c8y/client';
|
|
7
7
|
import * as i2$1 from '@c8y/ngx-components';
|
|
8
|
-
import { gettext, CountdownIntervalComponent, DismissAlertStrategy, DynamicComponentAlert, globalAutoRefreshLoading, AlarmRealtimeService, AlarmWithChildrenRealtimeService, CommonModule, CountdownIntervalModule, DocsModule, FormsModule } from '@c8y/ngx-components';
|
|
8
|
+
import { gettext, IntervalBasedReload, CountdownIntervalComponent, DismissAlertStrategy, DynamicComponentAlert, globalAutoRefreshLoading, AlarmRealtimeService, AlarmWithChildrenRealtimeService, CommonModule, CountdownIntervalModule, DocsModule, FormsModule } from '@c8y/ngx-components';
|
|
9
9
|
import * as i3 from '@c8y/ngx-components/alarms';
|
|
10
10
|
import { ALARM_STATUS_ICON, DEFAULT_STATUS_VALUES, DEFAULT_SEVERITY_VALUES, AlarmsModule } from '@c8y/ngx-components/alarms';
|
|
11
11
|
import * as i6 from '@ngx-translate/core';
|
|
12
12
|
import { omit, isEqual, isEmpty } from 'lodash-es';
|
|
13
13
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
14
|
-
import { startWith, pairwise, debounceTime, tap,
|
|
14
|
+
import { startWith, pairwise, debounceTime, tap, takeUntil, skip } from 'rxjs/operators';
|
|
15
15
|
import * as i7 from '@angular/common';
|
|
16
16
|
import { CommonModule as CommonModule$1 } from '@angular/common';
|
|
17
17
|
import * as i8 from 'ngx-bootstrap/popover';
|
|
@@ -744,16 +744,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
744
744
|
type: Input
|
|
745
745
|
}] } });
|
|
746
746
|
|
|
747
|
-
class AlarmWidgetAlarmsReloadComponent {
|
|
747
|
+
class AlarmWidgetAlarmsReloadComponent extends IntervalBasedReload {
|
|
748
748
|
constructor(alarmsViewService, cdRef, translateService, widgetGlobalAutoRefreshService) {
|
|
749
|
+
super();
|
|
749
750
|
this.alarmsViewService = alarmsViewService;
|
|
750
751
|
this.cdRef = cdRef;
|
|
751
752
|
this.translateService = translateService;
|
|
752
753
|
this.widgetGlobalAutoRefreshService = widgetGlobalAutoRefreshService;
|
|
753
754
|
this.REALTIME_UPDATE_ALARMS_MESSAGE = this.alarmsViewService.REALTIME_UPDATE_ALARMS_MESSAGE;
|
|
754
|
-
this.isDisabled = false;
|
|
755
755
|
/**
|
|
756
|
-
*
|
|
756
|
+
* @inheritdoc
|
|
757
757
|
*/
|
|
758
758
|
this.onCountdownEnded = new EventEmitter();
|
|
759
759
|
/**
|
|
@@ -765,7 +765,7 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
765
765
|
*/
|
|
766
766
|
this.isNewAlarmMessageCleared = true;
|
|
767
767
|
/**
|
|
768
|
-
*
|
|
768
|
+
* @inheritdoc
|
|
769
769
|
*/
|
|
770
770
|
this.manuallyDisabledCountdown = false;
|
|
771
771
|
}
|
|
@@ -776,7 +776,7 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
776
776
|
}
|
|
777
777
|
else {
|
|
778
778
|
this.isIntervalRefreshToggleOn =
|
|
779
|
-
!this.
|
|
779
|
+
!this.isRefreshDisabled && (this.config.isAutoRefreshEnabled || !!this.refreshInterval);
|
|
780
780
|
this.updateCountdownButtonTooltipText();
|
|
781
781
|
}
|
|
782
782
|
}
|
|
@@ -797,7 +797,7 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
797
797
|
}
|
|
798
798
|
if (isDisabled) {
|
|
799
799
|
this.isIntervalRefreshToggleOn =
|
|
800
|
-
!this.
|
|
800
|
+
!this.isRefreshDisabled && (this.config.isAutoRefreshEnabled || !!this.refreshInterval);
|
|
801
801
|
this.updateCountdownButtonTooltipText(gettext('Disabled'));
|
|
802
802
|
}
|
|
803
803
|
if (!this.isIntervalRefresh ||
|
|
@@ -813,53 +813,12 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
/**
|
|
816
|
-
*
|
|
817
|
-
* Once a falsy value is detected (indicating that loading has finished), it attempts to start the countdown.
|
|
818
|
-
*
|
|
819
|
-
* IMPORTANT: If the widget's configuration (refreshInterval, check template) is not set prior to executing countdownIntervalComponent?.start,
|
|
820
|
-
* the countdown interval will not start!
|
|
821
|
-
*/
|
|
822
|
-
startCountdown() {
|
|
823
|
-
this.countdownSubscription = this.isLoading
|
|
824
|
-
.pipe(filter(isLoading => !Boolean(isLoading)), tap(() => {
|
|
825
|
-
this.countdownIntervalComponent?.start();
|
|
826
|
-
}))
|
|
827
|
-
.subscribe();
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* Handles the toggle state of the countdown on button click.
|
|
831
|
-
*
|
|
832
|
-
* This method is triggered by a mouse event, typically a click on the countdown toggle button.
|
|
833
|
-
* It toggles `isIntervalRefreshToggleOn` to reflect the current state of the countdown timer.
|
|
834
|
-
*
|
|
835
|
-
* - If `isIntervalRefreshToggleOn` is set to false, indicating that the countdown should be stopped,
|
|
836
|
-
* `disableCountdown` is called, and `manuallyDisabledCountdown` is set to true.
|
|
837
|
-
*
|
|
838
|
-
* - If `isIntervalRefreshToggleOn` is true and the countdown subscription is closed, indicating that
|
|
839
|
-
* the countdown can be started, `enableCountdown` is called, and `manuallyDisabledCountdown`
|
|
840
|
-
* is set to false.
|
|
841
|
-
*
|
|
842
|
-
* @param $event - The MouseEvent that triggered this method.
|
|
843
|
-
*/
|
|
844
|
-
onToggleCountdownButtonState($event) {
|
|
845
|
-
$event.preventDefault();
|
|
846
|
-
this.isIntervalRefreshToggleOn = !this.isDisabled && !this.isIntervalRefreshToggleOn;
|
|
847
|
-
this.updateCountdownButtonTooltipText();
|
|
848
|
-
if (!this.isIntervalRefreshToggleOn) {
|
|
849
|
-
this.disableCountdown();
|
|
850
|
-
this.manuallyDisabledCountdown = true;
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
const onRefreshToggleOn = this.isIntervalRefreshToggleOn && this.countdownSubscription.closed;
|
|
854
|
-
if (onRefreshToggleOn) {
|
|
855
|
-
this.enableCountdown();
|
|
856
|
-
this.manuallyDisabledCountdown = false;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
/**
|
|
860
|
-
* Wrapper method where it's name better describes a context where it was called.
|
|
816
|
+
* @inheritdoc
|
|
861
817
|
*/
|
|
862
818
|
countdownEnded() {
|
|
819
|
+
/**
|
|
820
|
+
* @inheritdoc
|
|
821
|
+
*/
|
|
863
822
|
this.autoRefreshList();
|
|
864
823
|
}
|
|
865
824
|
reload() {
|
|
@@ -905,35 +864,6 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
905
864
|
? this.translateService.instant(gettext('Realtime active'))
|
|
906
865
|
: this.translateService.instant(gettext('Realtime inactive'));
|
|
907
866
|
}
|
|
908
|
-
/**
|
|
909
|
-
* Manages the countdown timer's visibility and state in response to user scrolling.
|
|
910
|
-
*
|
|
911
|
-
* This method toggles the countdown timer based on the user's scrolling behavior. It uses
|
|
912
|
-
* the `disableCountdown` and `enableCountdown` methods for handling the countdown state.
|
|
913
|
-
*
|
|
914
|
-
* - If the user is scrolling down while the countdown is visible (`isScrolling` is true and
|
|
915
|
-
* `hideCountdown` is false), `disableCountdown` is called to stop and hide the countdown,
|
|
916
|
-
* and `isIntervalRefreshToggleOn` is set to false.
|
|
917
|
-
*
|
|
918
|
-
* - If the user has stopped scrolling, the countdown subscription is closed, and the countdown
|
|
919
|
-
* is hidden (`!isScrolling`, `countdownSubscription?.closed`, `hideCountdown`), `enableCountdown`
|
|
920
|
-
* is called to show and restart the countdown, and `isIntervalRefreshToggleOn` is set to true.
|
|
921
|
-
*/
|
|
922
|
-
handleScrolling() {
|
|
923
|
-
// Checks if the user has scrolled down while the countdown is visible
|
|
924
|
-
const onUserScrollDownHide = this.isScrolling && !this.hideCountdown;
|
|
925
|
-
if (onUserScrollDownHide) {
|
|
926
|
-
this.disableCountdown();
|
|
927
|
-
this.isIntervalRefreshToggleOn = false;
|
|
928
|
-
return;
|
|
929
|
-
}
|
|
930
|
-
// Checks if the user has stopped scrolling and the countdown is currently hidden
|
|
931
|
-
const onUserScrollTopShow = !this.isScrolling && this.countdownSubscription?.closed && this.hideCountdown;
|
|
932
|
-
if (onUserScrollTopShow) {
|
|
933
|
-
this.isIntervalRefreshToggleOn = true;
|
|
934
|
-
this.enableCountdown();
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
867
|
/**
|
|
938
868
|
* Enables and starts the countdown timer.
|
|
939
869
|
*
|
|
@@ -949,20 +879,7 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
949
879
|
this.startCountdown();
|
|
950
880
|
}
|
|
951
881
|
/**
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
* This method stops the ongoing countdown process by unsubscribing from `countdownSubscription`
|
|
955
|
-
* and stopping the `countdownIntervalComponent` if it exists. It then hides the countdown timer
|
|
956
|
-
* by setting `hideCountdown` to true. This method encapsulates the logic required to halt and
|
|
957
|
-
* conceal the countdown timer.
|
|
958
|
-
*/
|
|
959
|
-
disableCountdown() {
|
|
960
|
-
this.countdownSubscription.unsubscribe();
|
|
961
|
-
this.countdownIntervalComponent?.stop();
|
|
962
|
-
this.hideCountdown = true;
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* Updates the countdown button tooltip text based on the state of the interval refresh toggle state.
|
|
882
|
+
* @inheritdoc
|
|
966
883
|
*/
|
|
967
884
|
updateCountdownButtonTooltipText(customText) {
|
|
968
885
|
if (customText) {
|
|
@@ -974,11 +891,11 @@ class AlarmWidgetAlarmsReloadComponent {
|
|
|
974
891
|
: this.translateService.instant(gettext('Enable auto refresh'));
|
|
975
892
|
}
|
|
976
893
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AlarmWidgetAlarmsReloadComponent, deps: [{ token: i3.AlarmsViewService }, { token: i0.ChangeDetectorRef }, { token: i6.TranslateService }, { token: i2$1.WidgetGlobalAutoRefreshService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
977
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AlarmWidgetAlarmsReloadComponent, selector: "c8y-alarm-widget-alarms-reload", inputs: { isIntervalRefresh: "isIntervalRefresh", refreshInterval: "refreshInterval", config: "config", isLoading: "isLoading", isScrolling: "isScrolling",
|
|
894
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AlarmWidgetAlarmsReloadComponent, selector: "c8y-alarm-widget-alarms-reload", inputs: { isIntervalRefresh: "isIntervalRefresh", refreshInterval: "refreshInterval", config: "config", isLoading: "isLoading", isScrolling: "isScrolling", isRefreshDisabled: "isRefreshDisabled" }, outputs: { onCountdownEnded: "onCountdownEnded", onRealTimeToggleChanged: "onRealTimeToggleChanged" }, viewQueries: [{ propertyName: "countdownIntervalComponent", first: true, predicate: CountdownIntervalComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"m-l-auto d-flex p-t-4 p-b-4\"\n *ngIf=\"!globalAutoRefreshEnabled\"\n>\n <div class=\"m-l-auto d-flex a-i-center\">\n <label\n class=\"m-b-0 m-r-8 text-label-small text-truncate flex-no-shrink\"\n title=\" {{ 'Auto refresh' | translate }}\"\n *ngIf=\"isIntervalRefresh && refreshInterval && config.isAutoRefreshEnabled\"\n >\n {{ 'Auto refresh' | translate }}\n </label>\n <div class=\"input-group\">\n <label\n class=\"toggle-countdown\"\n [class.toggle-countdown-disabled]=\"isRefreshDisabled\"\n [attr.aria-label]=\"toggleCountdownButtonTooltipText\"\n [tooltip]=\"toggleCountdownButtonTooltipText\"\n placement=\"bottom\"\n *ngIf=\"isIntervalRefresh && refreshInterval && config.isAutoRefreshEnabled\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"500\"\n >\n <input\n type=\"checkbox\"\n data-cy=\"c8y-alarms-widget--interval-toggle-button\"\n (click)=\"onToggleCountdownButtonState($event)\"\n />\n <c8y-countdown-interval\n *ngIf=\"isIntervalRefreshToggleOn\"\n [countdownInterval]=\"refreshInterval\"\n (countdownEnded)=\"countdownEnded()\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!isIntervalRefreshToggleOn\"\n ></i>\n </label>\n\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n !isNewAlarmMessageCleared\n ? (REALTIME_UPDATE_ALARMS_MESSAGE | translate)\n : ('Refresh' | translate)\n \"\n placement=\"bottom\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"500\"\n [disabled]=\"isRefreshDisabled || (isLoading | async)\"\n (click)=\"reload()\"\n data-cy=\"c8y-alarms-widget--reload-button\"\n >\n <span\n class=\"tag tag--info m-r-8\"\n *ngIf=\"!isNewAlarmMessageCleared\"\n >\n {{ 'New alarms' | translate }}\n </span>\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading | async }\"\n ></i>\n </button>\n </div>\n <div\n class=\"input-group-btn input-group-btn--last\"\n *ngIf=\"!isIntervalRefresh\"\n >\n <button\n class=\"c8y-realtime btn btn-default\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\n [disabled]=\"isRefreshDisabled\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{\n active: isRealtimeToggleOn,\n inactive: !isRealtimeToggleOn\n }\"\n ></span>\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval"], outputs: ["countdownEnded"] }, { kind: "directive", type: i5$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: i2$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }] }); }
|
|
978
895
|
}
|
|
979
896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AlarmWidgetAlarmsReloadComponent, decorators: [{
|
|
980
897
|
type: Component,
|
|
981
|
-
args: [{ selector: 'c8y-alarm-widget-alarms-reload', template: "<div\n class=\"m-l-auto d-flex p-t-4 p-b-4\"\n *ngIf=\"!globalAutoRefreshEnabled\"\n>\n <div class=\"m-l-auto d-flex a-i-center\">\n <label\n class=\"m-b-0 m-r-8 text-label-small text-truncate flex-no-shrink\"\n title=\" {{ 'Auto refresh' | translate }}\"\n *ngIf=\"isIntervalRefresh && refreshInterval && config.isAutoRefreshEnabled\"\n >\n {{ 'Auto refresh' | translate }}\n </label>\n <div class=\"input-group\">\n <label\n class=\"toggle-countdown\"\n [class.toggle-countdown-disabled]=\"
|
|
898
|
+
args: [{ selector: 'c8y-alarm-widget-alarms-reload', template: "<div\n class=\"m-l-auto d-flex p-t-4 p-b-4\"\n *ngIf=\"!globalAutoRefreshEnabled\"\n>\n <div class=\"m-l-auto d-flex a-i-center\">\n <label\n class=\"m-b-0 m-r-8 text-label-small text-truncate flex-no-shrink\"\n title=\" {{ 'Auto refresh' | translate }}\"\n *ngIf=\"isIntervalRefresh && refreshInterval && config.isAutoRefreshEnabled\"\n >\n {{ 'Auto refresh' | translate }}\n </label>\n <div class=\"input-group\">\n <label\n class=\"toggle-countdown\"\n [class.toggle-countdown-disabled]=\"isRefreshDisabled\"\n [attr.aria-label]=\"toggleCountdownButtonTooltipText\"\n [tooltip]=\"toggleCountdownButtonTooltipText\"\n placement=\"bottom\"\n *ngIf=\"isIntervalRefresh && refreshInterval && config.isAutoRefreshEnabled\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"500\"\n >\n <input\n type=\"checkbox\"\n data-cy=\"c8y-alarms-widget--interval-toggle-button\"\n (click)=\"onToggleCountdownButtonState($event)\"\n />\n <c8y-countdown-interval\n *ngIf=\"isIntervalRefreshToggleOn\"\n [countdownInterval]=\"refreshInterval\"\n (countdownEnded)=\"countdownEnded()\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!isIntervalRefreshToggleOn\"\n ></i>\n </label>\n\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n !isNewAlarmMessageCleared\n ? (REALTIME_UPDATE_ALARMS_MESSAGE | translate)\n : ('Refresh' | translate)\n \"\n placement=\"bottom\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"500\"\n [disabled]=\"isRefreshDisabled || (isLoading | async)\"\n (click)=\"reload()\"\n data-cy=\"c8y-alarms-widget--reload-button\"\n >\n <span\n class=\"tag tag--info m-r-8\"\n *ngIf=\"!isNewAlarmMessageCleared\"\n >\n {{ 'New alarms' | translate }}\n </span>\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading | async }\"\n ></i>\n </button>\n </div>\n <div\n class=\"input-group-btn input-group-btn--last\"\n *ngIf=\"!isIntervalRefresh\"\n >\n <button\n class=\"c8y-realtime btn btn-default\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\n [disabled]=\"isRefreshDisabled\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{\n active: isRealtimeToggleOn,\n inactive: !isRealtimeToggleOn\n }\"\n ></span>\n </button>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
982
899
|
}], ctorParameters: () => [{ type: i3.AlarmsViewService }, { type: i0.ChangeDetectorRef }, { type: i6.TranslateService }, { type: i2$1.WidgetGlobalAutoRefreshService }], propDecorators: { isIntervalRefresh: [{
|
|
983
900
|
type: Input
|
|
984
901
|
}], refreshInterval: [{
|
|
@@ -989,7 +906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
989
906
|
type: Input
|
|
990
907
|
}], isScrolling: [{
|
|
991
908
|
type: Input
|
|
992
|
-
}],
|
|
909
|
+
}], isRefreshDisabled: [{
|
|
993
910
|
type: Input
|
|
994
911
|
}], onCountdownEnded: [{
|
|
995
912
|
type: Output
|
|
@@ -1211,11 +1128,11 @@ class AlarmListWidgetComponent {
|
|
|
1211
1128
|
.subscribe();
|
|
1212
1129
|
}
|
|
1213
1130
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AlarmListWidgetComponent, deps: [{ token: AlarmWidgetService }, { token: i2$1.AlarmRealtimeService }, { token: i2.AlarmService }, { token: i3.AlarmsViewService }, { token: i2$1.AlarmWithChildrenRealtimeService }, { token: i2$1.DashboardChildComponent }, { token: i2$1.AlertService }, { token: i2$1.WidgetGlobalAutoRefreshService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1214
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AlarmListWidgetComponent, selector: "c8y-alarm-list-widget", inputs: { config: "config" }, providers: [AlarmRealtimeService, AlarmWithChildrenRealtimeService], viewQueries: [{ propertyName: "alarmWidgetAlarmsReloadComp", first: true, predicate: AlarmWidgetAlarmsReloadComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<c8y-alarms-list\n #list\n [alarms]=\"alarms$ | async\"\n [navigationOptions]=\"{\n alwaysNavigateToAllAlarms: !config.device,\n allowNavigationToAlarmsView: true,\n includeClearedQueryParams: true,\n queryParamsHandling: ''\n }\"\n [isInitialLoading]=\"isLoading$ | async\"\n [hasPermissions]=\"!isDisabled\"\n>\n <c8y-alarms-date-filter\n *ngIf=\"config.displayDateSelection\"\n [updateQueryParams]=\"false\"\n [date]=\"this.config.dateFilter\"\n [DEFAULT_INTERVAL]=\"config.interval || 'none'\"\n (dateFilterChange)=\"onDateFilterChange($event)\"\n ></c8y-alarms-date-filter>\n <c8y-alarm-widget-alarms-reload\n class=\"d-contents\"\n [isIntervalRefresh]=\"isIntervalRefresh\"\n [refreshInterval]=\"refreshInterval\"\n [config]=\"config\"\n [isLoading]=\"isLoading$\"\n [isScrolling]=\"list.isScrolling\"\n [
|
|
1131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AlarmListWidgetComponent, selector: "c8y-alarm-list-widget", inputs: { config: "config" }, providers: [AlarmRealtimeService, AlarmWithChildrenRealtimeService], viewQueries: [{ propertyName: "alarmWidgetAlarmsReloadComp", first: true, predicate: AlarmWidgetAlarmsReloadComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<c8y-alarms-list\n #list\n [alarms]=\"alarms$ | async\"\n [navigationOptions]=\"{\n alwaysNavigateToAllAlarms: !config.device,\n allowNavigationToAlarmsView: true,\n includeClearedQueryParams: true,\n queryParamsHandling: ''\n }\"\n [isInitialLoading]=\"isLoading$ | async\"\n [hasPermissions]=\"!isDisabled\"\n>\n <c8y-alarms-date-filter\n *ngIf=\"config.displayDateSelection\"\n [updateQueryParams]=\"false\"\n [date]=\"this.config.dateFilter\"\n [DEFAULT_INTERVAL]=\"config.interval || 'none'\"\n (dateFilterChange)=\"onDateFilterChange($event)\"\n ></c8y-alarms-date-filter>\n <c8y-alarm-widget-alarms-reload\n class=\"d-contents\"\n [isIntervalRefresh]=\"isIntervalRefresh\"\n [refreshInterval]=\"refreshInterval\"\n [config]=\"config\"\n [isLoading]=\"isLoading$\"\n [isScrolling]=\"list.isScrolling\"\n [isRefreshDisabled]=\"isDisabled\"\n (onCountdownEnded)=\"fetchAlarms()\"\n (onRealTimeToggleChanged)=\"handleRealTimeToggleChange($event)\"\n ></c8y-alarm-widget-alarms-reload>\n</c8y-alarms-list>\n", dependencies: [{ kind: "component", type: i3.AlarmsListComponent, selector: "c8y-alarms-list", inputs: ["alarms", "hasPermissions", "typeFilters", "loadMoreMode", "navigationOptions", "isInitialLoading", "splitView"], outputs: ["onSelectedAlarm", "onScrollingStateChange"] }, { kind: "component", type: i3.AlarmsDateFilterComponent, selector: "c8y-alarms-date-filter", inputs: ["DEFAULT_INTERVAL", "updateQueryParams", "date"], outputs: ["dateFilterChange"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AlarmWidgetAlarmsReloadComponent, selector: "c8y-alarm-widget-alarms-reload", inputs: ["isIntervalRefresh", "refreshInterval", "config", "isLoading", "isScrolling", "isRefreshDisabled"], outputs: ["onCountdownEnded", "onRealTimeToggleChanged"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }] }); }
|
|
1215
1132
|
}
|
|
1216
1133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AlarmListWidgetComponent, decorators: [{
|
|
1217
1134
|
type: Component,
|
|
1218
|
-
args: [{ selector: 'c8y-alarm-list-widget', providers: [AlarmRealtimeService, AlarmWithChildrenRealtimeService], template: "<c8y-alarms-list\n #list\n [alarms]=\"alarms$ | async\"\n [navigationOptions]=\"{\n alwaysNavigateToAllAlarms: !config.device,\n allowNavigationToAlarmsView: true,\n includeClearedQueryParams: true,\n queryParamsHandling: ''\n }\"\n [isInitialLoading]=\"isLoading$ | async\"\n [hasPermissions]=\"!isDisabled\"\n>\n <c8y-alarms-date-filter\n *ngIf=\"config.displayDateSelection\"\n [updateQueryParams]=\"false\"\n [date]=\"this.config.dateFilter\"\n [DEFAULT_INTERVAL]=\"config.interval || 'none'\"\n (dateFilterChange)=\"onDateFilterChange($event)\"\n ></c8y-alarms-date-filter>\n <c8y-alarm-widget-alarms-reload\n class=\"d-contents\"\n [isIntervalRefresh]=\"isIntervalRefresh\"\n [refreshInterval]=\"refreshInterval\"\n [config]=\"config\"\n [isLoading]=\"isLoading$\"\n [isScrolling]=\"list.isScrolling\"\n [
|
|
1135
|
+
args: [{ selector: 'c8y-alarm-list-widget', providers: [AlarmRealtimeService, AlarmWithChildrenRealtimeService], template: "<c8y-alarms-list\n #list\n [alarms]=\"alarms$ | async\"\n [navigationOptions]=\"{\n alwaysNavigateToAllAlarms: !config.device,\n allowNavigationToAlarmsView: true,\n includeClearedQueryParams: true,\n queryParamsHandling: ''\n }\"\n [isInitialLoading]=\"isLoading$ | async\"\n [hasPermissions]=\"!isDisabled\"\n>\n <c8y-alarms-date-filter\n *ngIf=\"config.displayDateSelection\"\n [updateQueryParams]=\"false\"\n [date]=\"this.config.dateFilter\"\n [DEFAULT_INTERVAL]=\"config.interval || 'none'\"\n (dateFilterChange)=\"onDateFilterChange($event)\"\n ></c8y-alarms-date-filter>\n <c8y-alarm-widget-alarms-reload\n class=\"d-contents\"\n [isIntervalRefresh]=\"isIntervalRefresh\"\n [refreshInterval]=\"refreshInterval\"\n [config]=\"config\"\n [isLoading]=\"isLoading$\"\n [isScrolling]=\"list.isScrolling\"\n [isRefreshDisabled]=\"isDisabled\"\n (onCountdownEnded)=\"fetchAlarms()\"\n (onRealTimeToggleChanged)=\"handleRealTimeToggleChange($event)\"\n ></c8y-alarm-widget-alarms-reload>\n</c8y-alarms-list>\n" }]
|
|
1219
1136
|
}], ctorParameters: () => [{ type: AlarmWidgetService }, { type: i2$1.AlarmRealtimeService }, { type: i2.AlarmService }, { type: i3.AlarmsViewService }, { type: i2$1.AlarmWithChildrenRealtimeService }, { type: i2$1.DashboardChildComponent }, { type: i2$1.AlertService }, { type: i2$1.WidgetGlobalAutoRefreshService }], propDecorators: { config: [{
|
|
1220
1137
|
type: Input
|
|
1221
1138
|
}], alarmWidgetAlarmsReloadComp: [{
|