@c8y/ngx-components 1023.14.8 → 1023.16.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.
Files changed (39) hide show
  1. package/alarms/index.d.ts +110 -53
  2. package/alarms/index.d.ts.map +1 -1
  3. package/assets-navigator/index.d.ts +7 -3
  4. package/assets-navigator/index.d.ts.map +1 -1
  5. package/context-dashboard/index.d.ts.map +1 -1
  6. package/fesm2022/c8y-ngx-components-alarms.mjs +365 -205
  7. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  8. package/fesm2022/c8y-ngx-components-assets-navigator.mjs +25 -6
  9. package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  10. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -4
  11. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  12. package/fesm2022/c8y-ngx-components-echart.mjs +2 -2
  13. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs +192 -0
  15. package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs.map +1 -0
  16. package/fesm2022/c8y-ngx-components-module-federation-exports-assets-navigator.mjs +13 -0
  17. package/fesm2022/c8y-ngx-components-module-federation-exports-assets-navigator.mjs.map +1 -0
  18. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -2
  19. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components.mjs +1201 -36
  21. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  22. package/group-breadcrumbs/index.d.ts +6 -0
  23. package/group-breadcrumbs/index.d.ts.map +1 -0
  24. package/index.d.ts +873 -6
  25. package/index.d.ts.map +1 -1
  26. package/locales/de.po +66 -58
  27. package/locales/es.po +55 -48
  28. package/locales/fr.po +47 -40
  29. package/locales/ja_JP.po +43 -37
  30. package/locales/ko.po +53 -46
  31. package/locales/locales.pot +25 -15
  32. package/locales/nl.po +50 -43
  33. package/locales/pl.po +65 -58
  34. package/locales/pt_BR.po +52 -45
  35. package/locales/zh_CN.po +49 -43
  36. package/locales/zh_TW.po +61 -53
  37. package/module-federation-exports/assets-navigator/index.d.ts +2 -0
  38. package/module-federation-exports/assets-navigator/index.d.ts.map +1 -0
  39. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Pipe, InjectionToken, HostListener, Input, Optional, Component, EventEmitter, ViewChild, Output, ChangeDetectionStrategy, forwardRef, signal, NgModule } from '@angular/core';
3
- import { combineLatest, Subject, BehaviorSubject, fromEvent, firstValueFrom, of, from, forkJoin, EMPTY, Observable, pipe, take, takeUntil as takeUntil$1, map as map$1 } from 'rxjs';
3
+ import { combineLatest, BehaviorSubject, Subject, fromEvent, firstValueFrom, of, from, forkJoin, EMPTY, Observable, pipe, take, takeUntil as takeUntil$1, map as map$1 } from 'rxjs';
4
4
  import { filter, map, switchMap, startWith, debounceTime, takeUntil, distinctUntilChanged, catchError, finalize, tap, shareReplay, throttleTime } from 'rxjs/operators';
5
5
  import * as i3 from '@c8y/ngx-components';
6
- import { Permissions, ViewContext, SupportedApps, IconDirective, ProductExperienceDirective, EmptyStateComponent, LoadingComponent, ListGroupComponent, ForOfDirective, ListItemTimelineComponent, ListItemComponent, ListItemBodyComponent, C8yTranslatePipe, DatePipe, HumanizeAppNamePipe, AssetLinkPipe, TitleComponent, TabsOutletComponent, RequiredInputPlaceholderDirective, CountdownIntervalComponent, DynamicComponentAlertAggregator, DynamicComponentAlert, C8yTranslateDirective, ListItemIconComponent, GuideDocsComponent, GuideHrefDirective, DynamicComponentAlertsComponent, DropdownDirectionDirective, FormGroupComponent, DateTimePickerComponent, MessagesComponent, MessageDirective, ListItemCheckboxComponent, ActionBarItemComponent, HelpComponent, AlarmWithChildrenRealtimeService, RouterTabsResolver, ContextRouteGuard, ContextRouteComponent, hookNavigator, hookRoute, CommonModule, CoreModule, HeaderModule, C8yTranslateModule, DynamicComponentModule, RelativeTimePipe } from '@c8y/ngx-components';
6
+ import { Permissions, ViewContext, SupportedApps, IconDirective, EmptyStateComponent, LoadingComponent, ListGroupComponent, ForOfDirective, ListItemTimelineComponent, ListItemComponent, ListItemBodyComponent, SplitViewDetailsActionsComponent, IconPanelComponent, C8yTranslatePipe, DatePipe, HumanizeAppNamePipe, AssetLinkPipe, TitleComponent, TabsOutletComponent, ProductExperienceDirective, RequiredInputPlaceholderDirective, CountdownIntervalComponent, DynamicComponentAlertAggregator, DynamicComponentAlert, C8yTranslateDirective, ListItemIconComponent, DynamicComponentAlertsComponent, SplitViewListComponent, SplitViewHeaderActionsComponent, SplitViewAlertsComponent, FormGroupComponent, DateTimePickerComponent, MessagesComponent, MessageDirective, ListItemCheckboxComponent, SplitViewComponent, SplitViewDetailsComponent, HelpComponent, ActionBarItemComponent, AlarmWithChildrenRealtimeService, RouterTabsResolver, ContextRouteGuard, ContextRouteComponent, hookNavigator, hookRoute, CommonModule, CoreModule, HeaderModule, C8yTranslateModule, DynamicComponentModule, RelativeTimePipe } from '@c8y/ngx-components';
7
7
  import { sortBy, cloneDeep } from 'lodash-es';
8
+ import { NgClass, NgStyle, NgTemplateOutlet, AsyncPipe, JsonPipe, LowerCasePipe, NgIf, NgFor, TitleCasePipe } from '@angular/common';
9
+ import * as i1 from '@angular/router';
10
+ import { RouterLink, NavigationEnd, RouterLinkActive, RouterOutlet, RouterModule } from '@angular/router';
8
11
  import * as i2 from '@c8y/client';
9
12
  import { AlarmStatus, Severity, ALARM_STATUS_LABELS, SEVERITY_LABELS } from '@c8y/client';
10
13
  import { gettext } from '@c8y/ngx-components/gettext';
11
14
  import * as i1$1 from '@ngx-translate/core';
12
- import { INTERVAL_TITLES, INTERVALS, IntervalPickerComponent } from '@c8y/ngx-components/interval-picker';
13
- import * as i1 from '@angular/router';
14
- import { RouterLink, NavigationEnd, RouterLinkActive, RouterOutlet, RouterModule } from '@angular/router';
15
- import * as i3$1 from '@c8y/ngx-components/global-context';
16
- import { NgClass, NgIf, NgStyle, NgFor, AsyncPipe, LowerCasePipe, JsonPipe, TitleCasePipe } from '@angular/common';
17
15
  import { PopoverDirective, PopoverModule } from 'ngx-bootstrap/popover';
16
+ import * as i3$1 from '@c8y/ngx-components/global-context';
17
+ import { INTERVAL_TITLES, INTERVALS, IntervalPickerComponent } from '@c8y/ngx-components/interval-picker';
18
18
  import * as i1$2 from '@angular/forms';
19
19
  import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
20
20
  import { BsDropdownDirective, BsDropdownToggleDirective, BsDropdownMenuDirective, BsDropdownModule } from 'ngx-bootstrap/dropdown';
@@ -209,6 +209,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
209
209
  }]
210
210
  }], ctorParameters: () => [{ type: i3.Permissions }] });
211
211
 
212
+ class AlarmsActivityTrackerService {
213
+ constructor() {
214
+ this.isUserActive$ = new BehaviorSubject(true);
215
+ this.userSecondsSpendOnPage = 0;
216
+ this.INACTIVITY_THRESHOLD_SECONDS = 10;
217
+ this.ONE_SECOND_IN_MILLISECONDS = 1_000;
218
+ this.destroy$ = new Subject();
219
+ }
220
+ ngOnDestroy() {
221
+ this.destroy$.next();
222
+ this.destroy$.complete();
223
+ }
224
+ setGainsightInterval() {
225
+ this.gainsightTimerId = setInterval(() => this.userSecondsSpendOnPage++, this.ONE_SECOND_IN_MILLISECONDS);
226
+ }
227
+ clearGainsightInterval() {
228
+ clearInterval(this.gainsightTimerId);
229
+ }
230
+ resetInactivityTimer() {
231
+ this.isUserActive$.next(true);
232
+ clearTimeout(this.gainsightInactivityTimeoutId);
233
+ this.gainsightInactivityTimeoutId = setTimeout(() => {
234
+ this.isUserActive$.next(false); // Pause counting if the user is inactive
235
+ }, this.INACTIVITY_THRESHOLD_SECONDS * this.ONE_SECOND_IN_MILLISECONDS);
236
+ }
237
+ setupEventListenersForGainsight() {
238
+ const events = ['mousemove', 'keydown', 'click'];
239
+ events.forEach(event => {
240
+ fromEvent(window, event)
241
+ .pipe(debounceTime(30), takeUntil(this.destroy$))
242
+ .subscribe(() => this.resetInactivityTimer());
243
+ });
244
+ }
245
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
246
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService }); }
247
+ }
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService, decorators: [{
249
+ type: Injectable
250
+ }] });
251
+
212
252
  const ALARMS_MODULE_CONFIG = new InjectionToken('AlarmsModuleConfig');
213
253
  const ALARM_STATUS_ICON = {
214
254
  ALERT_IDLE: 'c8y-alert-idle',
@@ -310,25 +350,6 @@ const PRODUCT_EXPERIENCE_ALARMS = {
310
350
  }
311
351
  };
312
352
 
313
- /**
314
- * This service is a duplicate of smart-rules-service with slight name change.
315
- * Duplicating allows to pass 'Verify App tutorial' job.
316
- * Name renames allows to pass 'Reusable build codex' job.
317
- * Overall this service is considered as a workaround.
318
- * In ticket MTM-58985 we will investigate if it's possible to remove this service
319
- * along with making failing jobs pass.
320
- */
321
- class Ng1SmartRulesUpgradeService {
322
- }
323
- function SmartRulesUpgradeServiceFactory(injector) {
324
- return injector.get('smartRulesSvc');
325
- }
326
- const smartRulesUpgradeServiceProvider = {
327
- provide: Ng1SmartRulesUpgradeService,
328
- useFactory: SmartRulesUpgradeServiceFactory,
329
- deps: ['$injector']
330
- };
331
-
332
353
  /**
333
354
  * Service for managing and retrieving alarms data within the alarms view.
334
355
  *
@@ -606,102 +627,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
606
627
  }]
607
628
  }], ctorParameters: () => [{ type: i2.AlarmService }, { type: i3.OptionsService }, { type: i3$1.DateTimeContextPickerService }, { type: i1.Router }, { type: i3.ContextRouteService }] });
608
629
 
609
- class AlarmsActivityTrackerService {
610
- constructor() {
611
- this.isUserActive$ = new BehaviorSubject(true);
612
- this.userSecondsSpendOnPage = 0;
613
- this.INACTIVITY_THRESHOLD_SECONDS = 10;
614
- this.ONE_SECOND_IN_MILLISECONDS = 1_000;
615
- this.destroy$ = new Subject();
616
- }
617
- ngOnDestroy() {
618
- this.destroy$.next();
619
- this.destroy$.complete();
620
- }
621
- setGainsightInterval() {
622
- this.gainsightTimerId = setInterval(() => this.userSecondsSpendOnPage++, this.ONE_SECOND_IN_MILLISECONDS);
623
- }
624
- clearGainsightInterval() {
625
- clearInterval(this.gainsightTimerId);
626
- }
627
- resetInactivityTimer() {
628
- this.isUserActive$.next(true);
629
- clearTimeout(this.gainsightInactivityTimeoutId);
630
- this.gainsightInactivityTimeoutId = setTimeout(() => {
631
- this.isUserActive$.next(false); // Pause counting if the user is inactive
632
- }, this.INACTIVITY_THRESHOLD_SECONDS * this.ONE_SECOND_IN_MILLISECONDS);
633
- }
634
- setupEventListenersForGainsight() {
635
- const events = ['mousemove', 'keydown', 'click'];
636
- events.forEach(event => {
637
- fromEvent(window, event)
638
- .pipe(debounceTime(30), takeUntil(this.destroy$))
639
- .subscribe(() => this.resetInactivityTimer());
640
- });
641
- }
642
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
643
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService }); }
644
- }
645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsActivityTrackerService, decorators: [{
646
- type: Injectable
647
- }] });
648
-
649
- /**
650
- * Pipe for transforming alarm severity types into corresponding icons.
651
- *
652
- * @example
653
- * Usage in an Angular template:
654
- * {{ 'CRITICAL' | AlarmSeverityToIcon }}
655
- * Result: 'exclamation-circle'
656
- */
657
- class AlarmSeverityToIconPipe {
658
- /**
659
- * Transforms an alarm severity type into a corresponding icon.
660
- *
661
- * @param alarmSeverity - The severity type of the alarm.
662
- * @returns The corresponding icon for the given alarm severity type.
663
- */
664
- transform(alarmSeverity) {
665
- const alarmSeverityMapped = Severity[alarmSeverity?.toUpperCase()];
666
- return ALARM_SEVERITY_ICON_MAP[alarmSeverityMapped] || HELP_ICON;
667
- }
668
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
669
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, isStandalone: true, name: "AlarmSeverityToIcon" }); }
670
- }
671
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, decorators: [{
672
- type: Pipe,
673
- args: [{
674
- name: 'AlarmSeverityToIcon',
675
- standalone: true
676
- }]
677
- }] });
678
-
679
- /**
680
- * Angular pipe for transforming alarm statuses into corresponding icons.
681
- *
682
- * @example
683
- * Usage in an Angular template:
684
- * {{ 'ACTIVE' | AlarmStatusToIcon }}
685
- * Result: 'bell'
686
- */
687
- class AlarmStatusToIconPipe {
688
- /**
689
- * Transforms an alarm status into a corresponding icon.
690
- *
691
- * @param alarmStatus - The status of the alarm.
692
- * @returns - The corresponding icon for the given alarm status.
693
- */
694
- transform(alarmStatus) {
695
- return AlarmIconMap[alarmStatus?.toUpperCase()] || HELP_ICON;
696
- }
697
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
698
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, isStandalone: true, name: "AlarmStatusToIcon" }); }
699
- }
700
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, decorators: [{
701
- type: Pipe,
702
- args: [{ name: 'AlarmStatusToIcon' }]
703
- }] });
704
-
705
630
  /**
706
631
  * A pipe for transforming audit record data into localized messages.
707
632
  * It specifically addresses changes in the audit records, with an emphasis on status changes.
@@ -742,6 +667,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
742
667
  args: [{ name: 'auditChangesMessage' }]
743
668
  }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
744
669
 
670
+ /**
671
+ * This service is a duplicate of smart-rules-service with slight name change.
672
+ * Duplicating allows to pass 'Verify App tutorial' job.
673
+ * Name renames allows to pass 'Reusable build codex' job.
674
+ * Overall this service is considered as a workaround.
675
+ * In ticket MTM-58985 we will investigate if it's possible to remove this service
676
+ * along with making failing jobs pass.
677
+ */
678
+ class Ng1SmartRulesUpgradeService {
679
+ }
680
+ function SmartRulesUpgradeServiceFactory(injector) {
681
+ return injector.get('smartRulesSvc');
682
+ }
683
+ const smartRulesUpgradeServiceProvider = {
684
+ provide: Ng1SmartRulesUpgradeService,
685
+ useFactory: SmartRulesUpgradeServiceFactory,
686
+ deps: ['$injector']
687
+ };
688
+
745
689
  class AlarmDetailsComponent {
746
690
  constructor(alarmDetailsService, alarmService, alertService, appState, auditService, relativeTime, ng1SmartRulesUpgradeService, translateService, inventoryService, alarmsViewService, colorService, interAppService, gainsightService, alarmsActivityTrackerService) {
747
691
  this.alarmDetailsService = alarmDetailsService;
@@ -758,6 +702,26 @@ class AlarmDetailsComponent {
758
702
  this.interAppService = interAppService;
759
703
  this.gainsightService = gainsightService;
760
704
  this.alarmsActivityTrackerService = alarmsActivityTrackerService;
705
+ /**
706
+ * Master switch to show/hide ALL alarm details sections (default: true).
707
+ * When `false`, all sections are hidden regardless of `hiddenSections`.
708
+ * When `true`, use `hiddenSections` for granular control of individual sections.
709
+ *
710
+ * Priority: `showSections` takes precedence over `hiddenSections`.
711
+ */
712
+ this.showSections = true;
713
+ /**
714
+ * Master switch to show/hide ALL action buttons (default: true).
715
+ * When `false`, all actions are hidden regardless of `hiddenActions`.
716
+ * When `true`, use `hiddenActions` for granular control of individual actions.
717
+ *
718
+ * Priority: `showActions` takes precedence over `hiddenActions`.
719
+ */
720
+ this.showActions = true;
721
+ /**
722
+ * Whether to show external navigation links (default: true)
723
+ */
724
+ this.showExternalNavigation = true;
761
725
  this.ACKNOWLEDGED_STATUS_VALUE = AlarmStatus.ACKNOWLEDGED;
762
726
  this.ACTIVE_STATUS_VALUE = AlarmStatus.ACTIVE;
763
727
  this.CLEARED_STATUS_VALUE = AlarmStatus.CLEARED;
@@ -774,6 +738,14 @@ class AlarmDetailsComponent {
774
738
  * Indicates when alarms status change was started (Acknowledge/Reactivate)
775
739
  */
776
740
  this.isAlarmStatusChanging = false;
741
+ /**
742
+ * Cached alarm actions to prevent constant re-rendering
743
+ */
744
+ this.alarmActions = [];
745
+ /**
746
+ * Cached alarm info sections to prevent constant re-rendering
747
+ */
748
+ this.alarmInfoSections = [];
777
749
  /**
778
750
  * Custom fragments of the selected alarm. If none exist, null is returned.
779
751
  */
@@ -797,15 +769,23 @@ class AlarmDetailsComponent {
797
769
  hasAnyRoleAllowingToCreateSmartRule;
798
770
  this.userDeviceManagementApp$ = this.interAppService.getApp$(this.deviceManagementAppKey);
799
771
  this.showSourceNavigationLink$ = this.interAppService.shouldShowAppLink$(this.deviceManagementAppKey);
800
- this.typeColor = await this.colorService.generateColor(this.selectedAlarm.type);
772
+ this.typeColor = await this.colorService.generateColor(this.selectedAlarm?.type);
773
+ // Initialize cached actions and info sections
774
+ if (this.selectedAlarm) {
775
+ this.updateAlarmActions();
776
+ this.updateAlarmInfoSections();
777
+ }
801
778
  }
802
779
  async ngOnChanges(changes) {
803
780
  if (changes.selectedAlarm && changes.selectedAlarm.currentValue) {
804
781
  await this.reloadAuditLog(true, true);
805
782
  await this.updateStatusMessage();
806
- const { data } = await this.inventoryService.detail(this.selectedAlarm.source.id);
783
+ const { data } = await this.inventoryService.detail(this.selectedAlarm?.source?.id);
807
784
  this.selectedAlarmMO = data;
808
785
  this.customFragments = this.getCustomFragments(this.selectedAlarm);
786
+ // Update cached actions and info sections when alarm data changes
787
+ this.updateAlarmActions();
788
+ this.updateAlarmInfoSections();
809
789
  }
810
790
  }
811
791
  ngOnDestroy() {
@@ -862,6 +842,8 @@ class AlarmDetailsComponent {
862
842
  async reloadAuditLog(isRevert = true, isSetAuditLogs = false) {
863
843
  try {
864
844
  this.isLoading = true;
845
+ // Update actions to show spinner on reload button
846
+ this.updateAlarmActions();
865
847
  const auditLogs = await this.getAlarmAuditRecords(isRevert);
866
848
  if (isSetAuditLogs) {
867
849
  this.setAuditLogs(auditLogs);
@@ -873,15 +855,21 @@ class AlarmDetailsComponent {
873
855
  }
874
856
  finally {
875
857
  this.isLoading = false;
858
+ // Update actions to remove spinner from reload button
859
+ this.updateAlarmActions();
876
860
  }
877
861
  }
878
862
  async onUpdateDetails(status) {
879
863
  try {
880
864
  this.isAlarmStatusChanging = true;
865
+ // Update actions when status changing flag is set (affects button disabled state)
866
+ this.updateAlarmActions();
881
867
  await this.updateAlarmStatus(status);
882
868
  await this.reloadAuditLog(true, true);
883
869
  await this.updateStatusMessage();
884
870
  this.updateLastUpdatedDate(this.auditLog.data[0]);
871
+ // Update info sections to reflect new status message
872
+ this.updateAlarmInfoSections();
885
873
  if (status === AlarmStatus.CLEARED) {
886
874
  this.alarmsViewService.closeDetailsView$.next();
887
875
  }
@@ -891,6 +879,8 @@ class AlarmDetailsComponent {
891
879
  }
892
880
  finally {
893
881
  this.isAlarmStatusChanging = false;
882
+ // Update actions when status changing flag is cleared (re-enables button)
883
+ this.updateAlarmActions();
894
884
  }
895
885
  }
896
886
  async detailsButtonAction(button, alarm) {
@@ -905,7 +895,7 @@ class AlarmDetailsComponent {
905
895
  if (shouldReload) {
906
896
  let alarm;
907
897
  if (shouldReload === true) {
908
- const { data: updatedAlarm } = await this.alarmService.detail(this.selectedAlarm.id);
898
+ const { data: updatedAlarm } = await this.alarmService.detail(this.selectedAlarm?.id);
909
899
  alarm = updatedAlarm;
910
900
  }
911
901
  else {
@@ -925,14 +915,19 @@ class AlarmDetailsComponent {
925
915
  }
926
916
  }
927
917
  async updateAlarmStatus(status) {
928
- const partiallyUpdatedAlarm = { id: this.selectedAlarm.id, status };
918
+ const partiallyUpdatedAlarm = { id: this.selectedAlarm?.id, status };
929
919
  await this.alarmService.update(partiallyUpdatedAlarm);
930
920
  const translatedStatusLabel = this.translateService.instant(ALARM_STATUS_LABELS[status]);
931
921
  this.alertService.success(this.translateService.instant(gettext('Alarm status changed to {{ status }}'), {
932
922
  status: translatedStatusLabel.toUpperCase()
933
923
  }));
934
- this.selectedAlarm.status = status;
924
+ if (this.selectedAlarm) {
925
+ this.selectedAlarm.status = status;
926
+ }
935
927
  this.alarmsViewService.updateAlarmList();
928
+ // Update cached actions and info sections when status changes
929
+ this.updateAlarmActions();
930
+ this.updateAlarmInfoSections();
936
931
  }
937
932
  /**
938
933
  * Retrieves the audit log and appends the last audit record to it.
@@ -962,7 +957,9 @@ class AlarmDetailsComponent {
962
957
  return;
963
958
  }
964
959
  const { creationTime } = updatedAuditRecords;
965
- this.selectedAlarm.lastUpdated = creationTime;
960
+ if (this.selectedAlarm) {
961
+ this.selectedAlarm.lastUpdated = creationTime;
962
+ }
966
963
  }
967
964
  getActiveStatusMessage(time) {
968
965
  return this.translateService.instant(gettext('ACTIVE`alarm`: triggered {{alarmTimeFromNow}}'), {
@@ -1038,18 +1035,18 @@ class AlarmDetailsComponent {
1038
1035
  dateTo: new Date(Date.now()).toISOString(),
1039
1036
  pageSize: isRevert ? this.PAGE_SIZE : 1,
1040
1037
  revert: isRevert,
1041
- source: this.selectedAlarm.id,
1038
+ source: this.selectedAlarm?.id,
1042
1039
  withTotalPages: true
1043
1040
  };
1044
1041
  return await this.auditService.list(properties);
1045
1042
  }
1046
1043
  async updateStatusMessage() {
1047
- switch (this.selectedAlarm.status) {
1044
+ switch (this.selectedAlarm?.status) {
1048
1045
  case this.ACTIVE_STATUS_VALUE:
1049
- this.statusMessage = this.getActiveStatusMessage(this.selectedAlarm.time);
1046
+ this.statusMessage = this.getActiveStatusMessage(this.selectedAlarm?.time);
1050
1047
  break;
1051
1048
  case this.ACKNOWLEDGED_STATUS_VALUE:
1052
- this.statusMessage = this.getAcknowledgedStatusMessage(this.selectedAlarm.status, this.auditLog.data);
1049
+ this.statusMessage = this.getAcknowledgedStatusMessage(this.selectedAlarm?.status, this.auditLog.data);
1053
1050
  break;
1054
1051
  case this.CLEARED_STATUS_VALUE:
1055
1052
  if (this.hasReachedOrExceededPageSizeLimit()) {
@@ -1076,20 +1073,144 @@ class AlarmDetailsComponent {
1076
1073
  }
1077
1074
  return customProperties;
1078
1075
  }
1076
+ updateAlarmActions() {
1077
+ const actions = [];
1078
+ // Reload audit logs action
1079
+ if (!this.hiddenActions?.reloadAuditLogs) {
1080
+ actions.push({
1081
+ id: 'reloadAuditLogs',
1082
+ label: gettext('Reload audit logs'),
1083
+ icon: 'refresh',
1084
+ iconClass: this.isLoading ? 'icon-spin' : '',
1085
+ class: 'btn btn-default btn-sm',
1086
+ disabled: false,
1087
+ visible: true,
1088
+ action: () => this.reloadAuditLog(true, true),
1089
+ dataCy: 'c8y-alarms-details--reload-audit-logs',
1090
+ title: gettext('Reload audit logs'),
1091
+ productExperience: {
1092
+ actionName: this.PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS,
1093
+ actionData: {
1094
+ component: this.PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,
1095
+ action: this.PRODUCT_EXPERIENCE_ALARMS.ACTIONS.RELOAD_AUDIT_LOGS
1096
+ }
1097
+ }
1098
+ });
1099
+ }
1100
+ // Acknowledge/Reactivate action
1101
+ if (!this.hiddenActions?.acknowledgeReactivate) {
1102
+ const isAcknowledged = this.selectedAlarm?.status === this.ACKNOWLEDGED_STATUS_VALUE;
1103
+ actions.push({
1104
+ id: 'acknowledgeReactivate',
1105
+ label: isAcknowledged ? this.REACTIVATE_LABEL : this.ACKNOWLEDGE_LABEL,
1106
+ icon: isAcknowledged ? this.BELL_ICON : this.BELL_SLASH_ICON,
1107
+ class: 'btn btn-default btn-sm',
1108
+ disabled: this.selectedAlarm?.status === this.CLEARED_STATUS_VALUE || this.isAlarmStatusChanging,
1109
+ visible: true,
1110
+ action: () => this.onUpdateDetails(isAcknowledged ? this.ACTIVE_STATUS_VALUE : this.ACKNOWLEDGED_STATUS_VALUE),
1111
+ title: isAcknowledged ? this.REACTIVATE_LABEL : this.ACKNOWLEDGE_LABEL,
1112
+ productExperience: {
1113
+ actionName: this.PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS,
1114
+ actionData: {
1115
+ component: this.PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,
1116
+ action: isAcknowledged
1117
+ ? this.PRODUCT_EXPERIENCE_ALARMS.ACTIONS.REACTIVATE_ALARM
1118
+ : this.PRODUCT_EXPERIENCE_ALARMS.ACTIONS.ACKNOWLEDGE_ALARM
1119
+ }
1120
+ }
1121
+ });
1122
+ }
1123
+ // Create smart rule action
1124
+ if (this.isCreateSmartRulesButtonAvailable && !this.hiddenActions?.createSmartRule) {
1125
+ actions.push({
1126
+ id: 'createSmartRule',
1127
+ label: gettext('Create smart rule'),
1128
+ icon: 'c8y-icon c8y-icon-smart-rules',
1129
+ class: 'btn btn-default btn-sm',
1130
+ disabled: false,
1131
+ visible: true,
1132
+ action: () => this.createSmartRule(),
1133
+ dataCy: 'c8y-alarms-details--create-smart-rule',
1134
+ title: gettext('Create smart rule'),
1135
+ productExperience: {
1136
+ actionName: this.PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS,
1137
+ actionData: {
1138
+ component: this.PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,
1139
+ action: this.PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CREATE_SMART_RULE
1140
+ }
1141
+ }
1142
+ });
1143
+ }
1144
+ // Clear alarm action
1145
+ if (!this.hiddenActions?.clearAlarm) {
1146
+ actions.push({
1147
+ id: 'clearAlarm',
1148
+ label: gettext('Clear`alarm`'),
1149
+ icon: 'c8y-alert-idle',
1150
+ class: 'btn btn-default btn-sm',
1151
+ disabled: this.selectedAlarm?.status === this.CLEARED_STATUS_VALUE,
1152
+ visible: true,
1153
+ action: () => this.onUpdateDetails(this.CLEARED_STATUS_VALUE),
1154
+ dataCy: 'c8y-alarm-details--clear-alarm',
1155
+ title: gettext('Clear`alarm`'),
1156
+ productExperience: {
1157
+ actionName: this.PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS,
1158
+ actionData: {
1159
+ component: this.PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,
1160
+ action: this.PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CLEAR_ALARM
1161
+ }
1162
+ }
1163
+ });
1164
+ }
1165
+ this.alarmActions = actions;
1166
+ }
1167
+ updateAlarmInfoSections() {
1168
+ const sections = [];
1169
+ // Status section
1170
+ if (this.showSections && !this.hiddenSections?.status) {
1171
+ const statusIcon = this.selectedAlarm?.status
1172
+ ? this.selectedAlarm?.status === this.ACKNOWLEDGED_STATUS_VALUE
1173
+ ? this.BELL_SLASH_ICON
1174
+ : this.selectedAlarm?.status === this.ACTIVE_STATUS_VALUE
1175
+ ? this.BELL_ICON
1176
+ : 'c8y-alert-idle'
1177
+ : 'help';
1178
+ sections.push({
1179
+ id: 'status',
1180
+ label: gettext('Status'),
1181
+ icon: statusIcon,
1182
+ visible: true,
1183
+ content: this.statusMessage,
1184
+ dataCy: 'c8y-alarm-details--status-section-wrapper'
1185
+ });
1186
+ }
1187
+ // Severity section
1188
+ if (this.showSections && !this.hiddenSections?.severity) {
1189
+ const alarmSeverityMapped = Severity[this.selectedAlarm?.severity?.toUpperCase()];
1190
+ const severityIcon = ALARM_SEVERITY_ICON_MAP[alarmSeverityMapped] || HELP_ICON;
1191
+ sections.push({
1192
+ id: 'severity',
1193
+ label: gettext('Severity'),
1194
+ icon: severityIcon,
1195
+ visible: true,
1196
+ content: this.SEVERITY_LABELS[this.selectedAlarm?.severity],
1197
+ dataCy: 'c8y-alarm-details--severity-section-wrapper',
1198
+ iconClass: `stroked-icon status ${this.selectedAlarm?.severity?.toString().toLowerCase() || ''}`
1199
+ });
1200
+ }
1201
+ this.alarmInfoSections = sections;
1202
+ }
1079
1203
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmDetailsComponent, deps: [{ token: AlarmDetailsService }, { token: i2.AlarmService }, { token: i3.AlertService }, { token: i3.AppStateService }, { token: i2.AuditService }, { token: i3.RelativeTimePipe }, { token: Ng1SmartRulesUpgradeService, optional: true }, { token: i1$1.TranslateService }, { token: i2.InventoryService }, { token: AlarmsViewService }, { token: i3.ColorService }, { token: i3.InterAppService }, { token: i3.GainsightService }, { token: AlarmsActivityTrackerService }], target: i0.ɵɵFactoryTarget.Component }); }
1080
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmDetailsComponent, isStandalone: true, selector: "c8y-alarm-details", inputs: { selectedAlarm: "selectedAlarm" }, host: { listeners: { "document:visibilitychange": "visibilityChange()" } }, providers: [AlarmsActivityTrackerService], usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex row tight-grid flex-wrap a-i-stretch\">\n <div class=\"col-xs-12 col-md-6 d-flex p-b-8\">\n <div\n class=\"border-all fit-w d-flex\"\n data-cy=\"c8y-alarm-details--status-section-wrapper\"\n >\n <div\n class=\"p-8\"\n data-cy=\"c8y-alarm-details--status-icon\"\n >\n <i\n class=\"icon-24 text-gray-dark m-t-4 c8y-icon\"\n [c8yIcon]=\"selectedAlarm.status | AlarmStatusToIcon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Status' | translate }}</p>\n <p class=\"small\">{{ statusMessage }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 col-md-6 d-flex p-b-8\">\n <div\n class=\"border-all fit-w d-flex\"\n data-cy=\"c8y-alarm-details--severity-section-wrapper\"\n >\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4 stroked-icon status\"\n [c8yIcon]=\"selectedAlarm.severity | AlarmSeverityToIcon\"\n [ngClass]=\"selectedAlarm.severity?.toString() | lowercase\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Severity' | translate }}</p>\n <p class=\"small\">{{ SEVERITY_LABELS[selectedAlarm.severity] | translate }}</p>\n </div>\n </div>\n </div>\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--source-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4 stroked-icon status\"\n c8yIcon=\"contactless-payment\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Source' | translate }}</p>\n <p class=\"small\">\n <button\n class=\"btn-link text-muted p-0 m-r-8 text-left\"\n title=\"{{ selectedAlarm.source.name }}\"\n type=\"button\"\n routerLink=\"{{ selectedAlarmMO | assetLink }}\"\n >\n <small class=\"icon-flex\">\n <i c8yIcon=\"exchange\"></i>\n {{ selectedAlarm.source.name || selectedAlarm.source.id }}\n </small>\n </button>\n <ng-container *ngIf=\"showSourceNavigationLink$ | async\">\n <button\n class=\"btn-link p-0 text-left\"\n title=\"{{\n linkTitle\n | translate\n : { appName: userDeviceManagementApp$ | async | humanizeAppName | async }\n }}\"\n type=\"button\"\n (click)=\"goToAlarmSource(selectedAlarm.id)\"\n data-cy=\"alarm-details-device-management-link\"\n >\n {{ userDeviceManagementApp$ | async | humanizeAppName | async }}\n <i c8yIcon=\"external-link\"></i>\n </button>\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--severity-type-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': typeColor }\"\n >\n <i\n class=\"stroked-icon\"\n c8yIcon=\"bell\"\n ></i>\n </span>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8 min-width-0\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Type' | translate }}</p>\n <p\n class=\"small text-truncate\"\n title=\"{{ selectedAlarm.type }}\"\n >\n <code>{{ selectedAlarm.type }}</code>\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"col-xs-12 col-md-12 p-b-16\">\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"calendar\"\n data-cy=\"c8y-alarm-details--last-updated-icon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-0 p-r-8 flex-grow\">\n <div class=\"content-flex-50\">\n <div\n class=\"col-4 p-b-8\"\n *ngIf=\"selectedAlarm.count > 1\"\n data-cy=\"c8y-alarm-details--number-of-occurrences-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Number of occurrences' | translate }}</p>\n <p>\n <span\n class=\"badge badge-info\"\n data-cy=\"c8y-alarm-details--badge\"\n >\n {{ selectedAlarm.count }}\n </span>\n </p>\n </div>\n <div\n class=\"col-4 p-b-8\"\n *ngIf=\"selectedAlarm.count > 1\"\n data-cy=\"c8y-alarm-details--first-occurrence-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'First occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm.creationTime | c8yDate: 'medium' }}\n\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was created. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--last-updated-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Last occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm.lastUpdated | c8yDate: 'medium' }}\n\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was last updated. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"col-xs-12 col-md-12 p-b-16\"\n data-cy=\"c8y-alarm-details--custom-fragments-wrapper\"\n *ngIf=\"customFragments\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"outgoing-data\"\n ></i>\n </div>\n <div\n class=\"p-t-8 p-b-0 p-r-8 flex-grow\"\n data-cy=\"alarm-details-custom-data\"\n >\n <p class=\"text-label-small m-b-4 m-r-8\">{{ 'Custom data' | translate }}</p>\n <pre><code>{{ customFragments | json }}</code></pre>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"d-flex flex-wrap gap-8\">\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Reload audit logs' | translate\"\n type=\"submit\"\n (click)=\"reloadAuditLog(true, true)\"\n data-cy=\"c8y-alarms-details--reload-audit-logs\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.RELOAD_AUDIT_LOGS\n }\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading }\"\n ></i>\n {{ 'Reload audit logs' | translate }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? (ACKNOWLEDGE_LABEL | translate)\n : (REACTIVATE_LABEL | translate)\n \"\n type=\"submit\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action:\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? PRODUCT_EXPERIENCE_ALARMS.ACTIONS.ACKNOWLEDGE_ALARM\n : PRODUCT_EXPERIENCE_ALARMS.ACTIONS.REACTIVATE_ALARM\n }\"\n (click)=\"\n onUpdateDetails(\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? ACKNOWLEDGED_STATUS_VALUE\n : ACTIVE_STATUS_VALUE\n )\n \"\n [disabled]=\"selectedAlarm.status === CLEARED_STATUS_VALUE || isAlarmStatusChanging\"\n >\n <i\n [c8yIcon]=\"selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE ? BELL_SLASH_ICON : BELL_ICON\"\n ></i>\n {{\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? (ACKNOWLEDGE_LABEL | translate)\n : (REACTIVATE_LABEL | translate)\n }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Create smart rule' | translate\"\n type=\"submit\"\n *ngIf=\"isCreateSmartRulesButtonAvailable\"\n (click)=\"createSmartRule()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CREATE_SMART_RULE\n }\"\n data-cy=\"c8y-alarms-details--create-smart-rule\"\n >\n <i c8yIcon=\"c8y-icon c8y-icon-smart-rules\"></i>\n {{ 'Create smart rule' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Clear`alarm`' | translate\"\n type=\"submit\"\n data-cy=\"c8y-alarm-details--clear-alarm\"\n (click)=\"onUpdateDetails(CLEARED_STATUS_VALUE)\"\n [disabled]=\"selectedAlarm.status === CLEARED_STATUS_VALUE\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CLEAR_ALARM\n }\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear`alarm`' | translate }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"button.title | translate\"\n type=\"button\"\n *ngFor=\"let button of selectedAlarm | alarmDetailsButton: selectedAlarmMO | async\"\n [ngClass]=\"button.additionalButtonClasses\"\n (click)=\"detailsButtonAction(button, selectedAlarm)\"\n [disabled]=\"button.disabled\"\n >\n <i\n [c8yIcon]=\"button.icon\"\n [ngClass]=\"button.additionalIconClasses\"\n ></i>\n <span *ngIf=\"button.label\">{{ button.label | translate }}</span>\n </button>\n</div>\n\n<ng-template #noAuditLogAvailable>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"'archive'\"\n [title]=\"'No audit logs found.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n</ng-template>\n\n<div class=\"legend form-block\">{{ 'Audit logs' | translate }}</div>\n\n<ng-container *ngIf=\"isLoading || auditLog?.data.length; else noAuditLogAvailable\">\n <c8y-loading *ngIf=\"isLoading\"></c8y-loading>\n\n <c8y-list-group\n data-cy=\"c8y-alarms-details--audit-logs\"\n *ngIf=\"!isLoading\"\n >\n <c8y-li-timeline *c8yFor=\"let log of auditLog; loadMore: 'hidden'\">\n {{ log.creationTime | c8yDate: 'mediumDate' }}\n {{ log.creationTime | c8yDate: 'mediumTime' }}\n <c8y-li>\n <c8y-li-body>\n <p class=\"text-truncate-wrap separator-bottom p-b-4\">\n {{ log | auditChangesMessage }}\n </p>\n <div class=\"c8y-list__item__footer\">\n <span\n class=\"m-r-16 small\"\n *ngIf=\"log.user\"\n >\n <span class=\"text-label-small\">\n {{ 'by`user`' | translate }}\n </span>\n {{ log.user }}\n </span>\n <span class=\"small\">\n <span class=\"text-label-small\">\n {{ 'device time' | translate }}\n </span>\n {{ log.time | c8yDate: 'medium' }}\n </span>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n</ng-container>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: HumanizeAppNamePipe, name: "humanizeAppName" }, { kind: "pipe", type: AssetLinkPipe, name: "assetLink" }, { kind: "pipe", type: AlarmDetailsButtonPipe, name: "alarmDetailsButton" }, { kind: "pipe", type: AlarmSeverityToIconPipe, name: "AlarmSeverityToIcon" }, { kind: "pipe", type: AlarmStatusToIconPipe, name: "AlarmStatusToIcon" }, { kind: "pipe", type: AuditChangesMessagePipe, name: "auditChangesMessage" }] }); }
1204
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlarmDetailsComponent, isStandalone: true, selector: "c8y-alarm-details", inputs: { selectedAlarm: "selectedAlarm", showSections: "showSections", hiddenSections: "hiddenSections", showActions: "showActions", hiddenActions: "hiddenActions", showExternalNavigation: "showExternalNavigation" }, host: { listeners: { "document:visibilitychange": "visibilityChange()" } }, providers: [AlarmsActivityTrackerService], usesOnChanges: true, ngImport: i0, template: "@if (selectedAlarm) {\n <div\n class=\"card-header p-24 m-b-16 bg-component separator-bottom sticky-top\"\n style=\"margin: 0 -24px\"\n >\n <h4\n class=\"m-0\"\n data-cy=\"c8y-alarm-details-title\"\n >\n {{ selectedAlarm.text | translate }}\n </h4>\n </div>\n}\n\n<c8y-icon-panel [sections]=\"alarmInfoSections\">\n @if (showSections && !hiddenSections?.source) {\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--source-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 m-t-4 stroked-icon status\"\n c8yIcon=\"contactless-payment\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Source' | translate }}</p>\n <p class=\"small\">\n <button\n class=\"btn-link text-muted p-0 m-r-8 text-left\"\n title=\"{{ selectedAlarm?.source?.name }}\"\n type=\"button\"\n routerLink=\"{{ selectedAlarmMO | assetLink }}\"\n >\n <small class=\"icon-flex\">\n <i c8yIcon=\"exchange\"></i>\n {{ selectedAlarm?.source?.name || selectedAlarm?.source?.id }}\n </small>\n </button>\n @if (showSourceNavigationLink$ | async) {\n <button\n class=\"btn-link p-0 text-left\"\n title=\"{{\n linkTitle\n | translate\n : { appName: userDeviceManagementApp$ | async | humanizeAppName | async }\n }}\"\n type=\"button\"\n (click)=\"goToAlarmSource(selectedAlarm?.id)\"\n data-cy=\"alarm-details-device-management-link\"\n >\n {{ userDeviceManagementApp$ | async | humanizeAppName | async }}\n <i c8yIcon=\"external-link\"></i>\n </button>\n }\n </p>\n </div>\n </div>\n </div>\n }\n\n @if (showSections && !hiddenSections?.type) {\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--severity-type-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': typeColor }\"\n >\n <i\n class=\"stroked-icon\"\n c8yIcon=\"bell\"\n ></i>\n </span>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8 min-width-0\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Type' | translate }}</p>\n <p\n class=\"small text-truncate\"\n title=\"{{ selectedAlarm?.type }}\"\n >\n <code>{{ selectedAlarm?.type }}</code>\n </p>\n </div>\n </div>\n </div>\n }\n\n <div class=\"col-xs-12 col-md-12 p-b-16\">\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"calendar\"\n data-cy=\"c8y-alarm-details--last-updated-icon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-0 p-r-8 flex-grow\">\n <div class=\"content-flex-50\">\n @if (selectedAlarm?.count > 1 && showSections && !hiddenSections?.occurrenceCount) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--number-of-occurrences-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">\n {{ 'Number of occurrences' | translate }}\n </p>\n <p>\n <span\n class=\"badge badge-info\"\n data-cy=\"c8y-alarm-details--badge\"\n >\n {{ selectedAlarm?.count }}\n </span>\n </p>\n </div>\n }\n @if (selectedAlarm?.count > 1 && showSections && !hiddenSections?.firstOccurrence) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--first-occurrence-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'First occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm?.creationTime | c8yDate: 'medium' }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was created. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n }\n @if (showSections && !hiddenSections?.lastOccurrence) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--last-updated-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Last occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm?.lastUpdated | c8yDate: 'medium' }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was last updated. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n @if (customFragments && showSections && !hiddenSections?.customData) {\n <div\n class=\"col-xs-12 col-md-12 p-b-16\"\n data-cy=\"c8y-alarm-details--custom-fragments-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"outgoing-data\"\n ></i>\n </div>\n <div\n class=\"p-t-8 p-b-0 p-r-8 flex-grow\"\n data-cy=\"alarm-details-custom-data\"\n >\n <p class=\"text-label-small m-b-4 m-r-8\">{{ 'Custom data' | translate }}</p>\n <pre><code>{{ customFragments | json }}</code></pre>\n </div>\n </div>\n </div>\n }\n</c8y-icon-panel>\n\n@if (showActions) {\n <c8y-sv-details-actions [actions]=\"alarmActions\">\n @for (button of selectedAlarm | alarmDetailsButton: selectedAlarmMO | async; track $index) {\n <button\n class=\"btn btn-default btn-sm no-swing\"\n [title]=\"button.title | translate\"\n type=\"button\"\n [ngClass]=\"button.additionalButtonClasses\"\n (click)=\"detailsButtonAction(button, selectedAlarm!)\"\n [disabled]=\"button.disabled\"\n >\n <i\n [c8yIcon]=\"button.icon\"\n [ngClass]=\"button.additionalIconClasses\"\n ></i>\n @if (button.label) {\n <span>{{ button.label | translate }}</span>\n }\n </button>\n }\n </c8y-sv-details-actions>\n}\n\n@if (showSections && !hiddenSections?.auditLogs) {\n <ng-template #noAuditLogAvailable>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"'archive'\"\n [title]=\"'No audit logs found.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <div>\n <div class=\"legend form-block\">{{ 'Audit logs' | translate }}</div>\n\n @if (isLoading || auditLog?.data.length) {\n @if (isLoading) {\n <c8y-loading></c8y-loading>\n }\n\n @if (!isLoading) {\n <c8y-list-group data-cy=\"c8y-alarms-details--audit-logs\">\n <c8y-li-timeline *c8yFor=\"let log of auditLog; loadMore: 'hidden'\">\n {{ log.creationTime | c8yDate: 'mediumDate' }}\n {{ log.creationTime | c8yDate: 'mediumTime' }}\n <c8y-li>\n <c8y-li-body>\n <p class=\"text-truncate-wrap separator-bottom p-b-4\">\n {{ log | auditChangesMessage }}\n </p>\n <div class=\"c8y-list__item__footer\">\n @if (log.user) {\n <span class=\"m-r-16 small\">\n <span class=\"text-label-small\">\n {{ 'by`user`' | translate }}\n </span>\n {{ log.user }}\n </span>\n }\n <span class=\"small\">\n <span class=\"text-label-small\">\n {{ 'device time' | translate }}\n </span>\n {{ log.time | c8yDate: 'medium' }}\n </span>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"noAuditLogAvailable\"></ng-container>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: SplitViewDetailsActionsComponent, selector: "c8y-sv-details-actions", inputs: ["actions"] }, { kind: "component", type: IconPanelComponent, selector: "c8y-icon-panel", inputs: ["sections", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: HumanizeAppNamePipe, name: "humanizeAppName" }, { kind: "pipe", type: AssetLinkPipe, name: "assetLink" }, { kind: "pipe", type: AlarmDetailsButtonPipe, name: "alarmDetailsButton" }, { kind: "pipe", type: AuditChangesMessagePipe, name: "auditChangesMessage" }] }); }
1081
1205
  }
1082
1206
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmDetailsComponent, decorators: [{
1083
1207
  type: Component,
1084
1208
  args: [{ selector: 'c8y-alarm-details', providers: [AlarmsActivityTrackerService], imports: [
1085
1209
  IconDirective,
1086
1210
  NgClass,
1087
- RouterLink,
1088
- NgIf,
1089
1211
  NgStyle,
1212
+ RouterLink,
1090
1213
  PopoverDirective,
1091
- ProductExperienceDirective,
1092
- NgFor,
1093
1214
  EmptyStateComponent,
1094
1215
  LoadingComponent,
1095
1216
  ListGroupComponent,
@@ -1099,20 +1220,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1099
1220
  ListItemBodyComponent,
1100
1221
  C8yTranslatePipe,
1101
1222
  AsyncPipe,
1102
- LowerCasePipe,
1103
1223
  JsonPipe,
1104
1224
  DatePipe,
1105
1225
  HumanizeAppNamePipe,
1106
1226
  AssetLinkPipe,
1107
1227
  AlarmDetailsButtonPipe,
1108
- AlarmSeverityToIconPipe,
1109
- AlarmStatusToIconPipe,
1110
- AuditChangesMessagePipe
1111
- ], template: "<div class=\"d-flex row tight-grid flex-wrap a-i-stretch\">\n <div class=\"col-xs-12 col-md-6 d-flex p-b-8\">\n <div\n class=\"border-all fit-w d-flex\"\n data-cy=\"c8y-alarm-details--status-section-wrapper\"\n >\n <div\n class=\"p-8\"\n data-cy=\"c8y-alarm-details--status-icon\"\n >\n <i\n class=\"icon-24 text-gray-dark m-t-4 c8y-icon\"\n [c8yIcon]=\"selectedAlarm.status | AlarmStatusToIcon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Status' | translate }}</p>\n <p class=\"small\">{{ statusMessage }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 col-md-6 d-flex p-b-8\">\n <div\n class=\"border-all fit-w d-flex\"\n data-cy=\"c8y-alarm-details--severity-section-wrapper\"\n >\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4 stroked-icon status\"\n [c8yIcon]=\"selectedAlarm.severity | AlarmSeverityToIcon\"\n [ngClass]=\"selectedAlarm.severity?.toString() | lowercase\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Severity' | translate }}</p>\n <p class=\"small\">{{ SEVERITY_LABELS[selectedAlarm.severity] | translate }}</p>\n </div>\n </div>\n </div>\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--source-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4 stroked-icon status\"\n c8yIcon=\"contactless-payment\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Source' | translate }}</p>\n <p class=\"small\">\n <button\n class=\"btn-link text-muted p-0 m-r-8 text-left\"\n title=\"{{ selectedAlarm.source.name }}\"\n type=\"button\"\n routerLink=\"{{ selectedAlarmMO | assetLink }}\"\n >\n <small class=\"icon-flex\">\n <i c8yIcon=\"exchange\"></i>\n {{ selectedAlarm.source.name || selectedAlarm.source.id }}\n </small>\n </button>\n <ng-container *ngIf=\"showSourceNavigationLink$ | async\">\n <button\n class=\"btn-link p-0 text-left\"\n title=\"{{\n linkTitle\n | translate\n : { appName: userDeviceManagementApp$ | async | humanizeAppName | async }\n }}\"\n type=\"button\"\n (click)=\"goToAlarmSource(selectedAlarm.id)\"\n data-cy=\"alarm-details-device-management-link\"\n >\n {{ userDeviceManagementApp$ | async | humanizeAppName | async }}\n <i c8yIcon=\"external-link\"></i>\n </button>\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--severity-type-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': typeColor }\"\n >\n <i\n class=\"stroked-icon\"\n c8yIcon=\"bell\"\n ></i>\n </span>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8 min-width-0\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Type' | translate }}</p>\n <p\n class=\"small text-truncate\"\n title=\"{{ selectedAlarm.type }}\"\n >\n <code>{{ selectedAlarm.type }}</code>\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"col-xs-12 col-md-12 p-b-16\">\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"calendar\"\n data-cy=\"c8y-alarm-details--last-updated-icon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-0 p-r-8 flex-grow\">\n <div class=\"content-flex-50\">\n <div\n class=\"col-4 p-b-8\"\n *ngIf=\"selectedAlarm.count > 1\"\n data-cy=\"c8y-alarm-details--number-of-occurrences-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Number of occurrences' | translate }}</p>\n <p>\n <span\n class=\"badge badge-info\"\n data-cy=\"c8y-alarm-details--badge\"\n >\n {{ selectedAlarm.count }}\n </span>\n </p>\n </div>\n <div\n class=\"col-4 p-b-8\"\n *ngIf=\"selectedAlarm.count > 1\"\n data-cy=\"c8y-alarm-details--first-occurrence-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'First occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm.creationTime | c8yDate: 'medium' }}\n\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was created. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--last-updated-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Last occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm.lastUpdated | c8yDate: 'medium' }}\n\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was last updated. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"col-xs-12 col-md-12 p-b-16\"\n data-cy=\"c8y-alarm-details--custom-fragments-wrapper\"\n *ngIf=\"customFragments\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"outgoing-data\"\n ></i>\n </div>\n <div\n class=\"p-t-8 p-b-0 p-r-8 flex-grow\"\n data-cy=\"alarm-details-custom-data\"\n >\n <p class=\"text-label-small m-b-4 m-r-8\">{{ 'Custom data' | translate }}</p>\n <pre><code>{{ customFragments | json }}</code></pre>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"d-flex flex-wrap gap-8\">\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Reload audit logs' | translate\"\n type=\"submit\"\n (click)=\"reloadAuditLog(true, true)\"\n data-cy=\"c8y-alarms-details--reload-audit-logs\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.RELOAD_AUDIT_LOGS\n }\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading }\"\n ></i>\n {{ 'Reload audit logs' | translate }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? (ACKNOWLEDGE_LABEL | translate)\n : (REACTIVATE_LABEL | translate)\n \"\n type=\"submit\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action:\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? PRODUCT_EXPERIENCE_ALARMS.ACTIONS.ACKNOWLEDGE_ALARM\n : PRODUCT_EXPERIENCE_ALARMS.ACTIONS.REACTIVATE_ALARM\n }\"\n (click)=\"\n onUpdateDetails(\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? ACKNOWLEDGED_STATUS_VALUE\n : ACTIVE_STATUS_VALUE\n )\n \"\n [disabled]=\"selectedAlarm.status === CLEARED_STATUS_VALUE || isAlarmStatusChanging\"\n >\n <i\n [c8yIcon]=\"selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE ? BELL_SLASH_ICON : BELL_ICON\"\n ></i>\n {{\n selectedAlarm.status !== ACKNOWLEDGED_STATUS_VALUE\n ? (ACKNOWLEDGE_LABEL | translate)\n : (REACTIVATE_LABEL | translate)\n }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Create smart rule' | translate\"\n type=\"submit\"\n *ngIf=\"isCreateSmartRulesButtonAvailable\"\n (click)=\"createSmartRule()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CREATE_SMART_RULE\n }\"\n data-cy=\"c8y-alarms-details--create-smart-rule\"\n >\n <i c8yIcon=\"c8y-icon c8y-icon-smart-rules\"></i>\n {{ 'Create smart rule' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"'Clear`alarm`' | translate\"\n type=\"submit\"\n data-cy=\"c8y-alarm-details--clear-alarm\"\n (click)=\"onUpdateDetails(CLEARED_STATUS_VALUE)\"\n [disabled]=\"selectedAlarm.status === CLEARED_STATUS_VALUE\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE_ALARMS.EVENTS.ALARMS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE_ALARMS.COMPONENTS.ALARM_DETAILS,\n action: PRODUCT_EXPERIENCE_ALARMS.ACTIONS.CLEAR_ALARM\n }\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear`alarm`' | translate }}\n </button>\n\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"button.title | translate\"\n type=\"button\"\n *ngFor=\"let button of selectedAlarm | alarmDetailsButton: selectedAlarmMO | async\"\n [ngClass]=\"button.additionalButtonClasses\"\n (click)=\"detailsButtonAction(button, selectedAlarm)\"\n [disabled]=\"button.disabled\"\n >\n <i\n [c8yIcon]=\"button.icon\"\n [ngClass]=\"button.additionalIconClasses\"\n ></i>\n <span *ngIf=\"button.label\">{{ button.label | translate }}</span>\n </button>\n</div>\n\n<ng-template #noAuditLogAvailable>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"'archive'\"\n [title]=\"'No audit logs found.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n</ng-template>\n\n<div class=\"legend form-block\">{{ 'Audit logs' | translate }}</div>\n\n<ng-container *ngIf=\"isLoading || auditLog?.data.length; else noAuditLogAvailable\">\n <c8y-loading *ngIf=\"isLoading\"></c8y-loading>\n\n <c8y-list-group\n data-cy=\"c8y-alarms-details--audit-logs\"\n *ngIf=\"!isLoading\"\n >\n <c8y-li-timeline *c8yFor=\"let log of auditLog; loadMore: 'hidden'\">\n {{ log.creationTime | c8yDate: 'mediumDate' }}\n {{ log.creationTime | c8yDate: 'mediumTime' }}\n <c8y-li>\n <c8y-li-body>\n <p class=\"text-truncate-wrap separator-bottom p-b-4\">\n {{ log | auditChangesMessage }}\n </p>\n <div class=\"c8y-list__item__footer\">\n <span\n class=\"m-r-16 small\"\n *ngIf=\"log.user\"\n >\n <span class=\"text-label-small\">\n {{ 'by`user`' | translate }}\n </span>\n {{ log.user }}\n </span>\n <span class=\"small\">\n <span class=\"text-label-small\">\n {{ 'device time' | translate }}\n </span>\n {{ log.time | c8yDate: 'medium' }}\n </span>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n</ng-container>\n" }]
1228
+ AuditChangesMessagePipe,
1229
+ SplitViewDetailsActionsComponent,
1230
+ IconPanelComponent,
1231
+ NgTemplateOutlet
1232
+ ], template: "@if (selectedAlarm) {\n <div\n class=\"card-header p-24 m-b-16 bg-component separator-bottom sticky-top\"\n style=\"margin: 0 -24px\"\n >\n <h4\n class=\"m-0\"\n data-cy=\"c8y-alarm-details-title\"\n >\n {{ selectedAlarm.text | translate }}\n </h4>\n </div>\n}\n\n<c8y-icon-panel [sections]=\"alarmInfoSections\">\n @if (showSections && !hiddenSections?.source) {\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--source-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 m-t-4 stroked-icon status\"\n c8yIcon=\"contactless-payment\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Source' | translate }}</p>\n <p class=\"small\">\n <button\n class=\"btn-link text-muted p-0 m-r-8 text-left\"\n title=\"{{ selectedAlarm?.source?.name }}\"\n type=\"button\"\n routerLink=\"{{ selectedAlarmMO | assetLink }}\"\n >\n <small class=\"icon-flex\">\n <i c8yIcon=\"exchange\"></i>\n {{ selectedAlarm?.source?.name || selectedAlarm?.source?.id }}\n </small>\n </button>\n @if (showSourceNavigationLink$ | async) {\n <button\n class=\"btn-link p-0 text-left\"\n title=\"{{\n linkTitle\n | translate\n : { appName: userDeviceManagementApp$ | async | humanizeAppName | async }\n }}\"\n type=\"button\"\n (click)=\"goToAlarmSource(selectedAlarm?.id)\"\n data-cy=\"alarm-details-device-management-link\"\n >\n {{ userDeviceManagementApp$ | async | humanizeAppName | async }}\n <i c8yIcon=\"external-link\"></i>\n </button>\n }\n </p>\n </div>\n </div>\n </div>\n }\n\n @if (showSections && !hiddenSections?.type) {\n <div\n class=\"col-xs-12 col-md-6 d-flex p-b-8\"\n data-cy=\"c8y-alarm-details--severity-type-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': typeColor }\"\n >\n <i\n class=\"stroked-icon\"\n c8yIcon=\"bell\"\n ></i>\n </span>\n </div>\n <div class=\"p-t-8 p-b-8 p-r-8 min-width-0\">\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Type' | translate }}</p>\n <p\n class=\"small text-truncate\"\n title=\"{{ selectedAlarm?.type }}\"\n >\n <code>{{ selectedAlarm?.type }}</code>\n </p>\n </div>\n </div>\n </div>\n }\n\n <div class=\"col-xs-12 col-md-12 p-b-16\">\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"calendar\"\n data-cy=\"c8y-alarm-details--last-updated-icon\"\n ></i>\n </div>\n <div class=\"p-t-8 p-b-0 p-r-8 flex-grow\">\n <div class=\"content-flex-50\">\n @if (selectedAlarm?.count > 1 && showSections && !hiddenSections?.occurrenceCount) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--number-of-occurrences-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">\n {{ 'Number of occurrences' | translate }}\n </p>\n <p>\n <span\n class=\"badge badge-info\"\n data-cy=\"c8y-alarm-details--badge\"\n >\n {{ selectedAlarm?.count }}\n </span>\n </p>\n </div>\n }\n @if (selectedAlarm?.count > 1 && showSections && !hiddenSections?.firstOccurrence) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--first-occurrence-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'First occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm?.creationTime | c8yDate: 'medium' }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was created. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n }\n @if (showSections && !hiddenSections?.lastOccurrence) {\n <div\n class=\"col-4 p-b-8\"\n data-cy=\"c8y-alarm-details--last-updated-wrapper\"\n >\n <p class=\"text-label-small m-b-0 m-r-8\">{{ 'Last occurrence' | translate }}</p>\n <p class=\"small\">\n {{ selectedAlarm?.lastUpdated | c8yDate: 'medium' }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Time in which the alarm was last updated. The time shown corresponds to the server\\'s time. Device time can be different from server time.'\n | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </p>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n @if (customFragments && showSections && !hiddenSections?.customData) {\n <div\n class=\"col-xs-12 col-md-12 p-b-16\"\n data-cy=\"c8y-alarm-details--custom-fragments-wrapper\"\n >\n <div class=\"border-all fit-w d-flex\">\n <div class=\"p-8\">\n <i\n class=\"icon-24 text-gray-dark m-t-4\"\n c8yIcon=\"outgoing-data\"\n ></i>\n </div>\n <div\n class=\"p-t-8 p-b-0 p-r-8 flex-grow\"\n data-cy=\"alarm-details-custom-data\"\n >\n <p class=\"text-label-small m-b-4 m-r-8\">{{ 'Custom data' | translate }}</p>\n <pre><code>{{ customFragments | json }}</code></pre>\n </div>\n </div>\n </div>\n }\n</c8y-icon-panel>\n\n@if (showActions) {\n <c8y-sv-details-actions [actions]=\"alarmActions\">\n @for (button of selectedAlarm | alarmDetailsButton: selectedAlarmMO | async; track $index) {\n <button\n class=\"btn btn-default btn-sm no-swing\"\n [title]=\"button.title | translate\"\n type=\"button\"\n [ngClass]=\"button.additionalButtonClasses\"\n (click)=\"detailsButtonAction(button, selectedAlarm!)\"\n [disabled]=\"button.disabled\"\n >\n <i\n [c8yIcon]=\"button.icon\"\n [ngClass]=\"button.additionalIconClasses\"\n ></i>\n @if (button.label) {\n <span>{{ button.label | translate }}</span>\n }\n </button>\n }\n </c8y-sv-details-actions>\n}\n\n@if (showSections && !hiddenSections?.auditLogs) {\n <ng-template #noAuditLogAvailable>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"'archive'\"\n [title]=\"'No audit logs found.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <div>\n <div class=\"legend form-block\">{{ 'Audit logs' | translate }}</div>\n\n @if (isLoading || auditLog?.data.length) {\n @if (isLoading) {\n <c8y-loading></c8y-loading>\n }\n\n @if (!isLoading) {\n <c8y-list-group data-cy=\"c8y-alarms-details--audit-logs\">\n <c8y-li-timeline *c8yFor=\"let log of auditLog; loadMore: 'hidden'\">\n {{ log.creationTime | c8yDate: 'mediumDate' }}\n {{ log.creationTime | c8yDate: 'mediumTime' }}\n <c8y-li>\n <c8y-li-body>\n <p class=\"text-truncate-wrap separator-bottom p-b-4\">\n {{ log | auditChangesMessage }}\n </p>\n <div class=\"c8y-list__item__footer\">\n @if (log.user) {\n <span class=\"m-r-16 small\">\n <span class=\"text-label-small\">\n {{ 'by`user`' | translate }}\n </span>\n {{ log.user }}\n </span>\n }\n <span class=\"small\">\n <span class=\"text-label-small\">\n {{ 'device time' | translate }}\n </span>\n {{ log.time | c8yDate: 'medium' }}\n </span>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"noAuditLogAvailable\"></ng-container>\n }\n </div>\n}\n" }]
1112
1233
  }], ctorParameters: () => [{ type: AlarmDetailsService }, { type: i2.AlarmService }, { type: i3.AlertService }, { type: i3.AppStateService }, { type: i2.AuditService }, { type: i3.RelativeTimePipe }, { type: Ng1SmartRulesUpgradeService, decorators: [{
1113
1234
  type: Optional
1114
1235
  }] }, { type: i1$1.TranslateService }, { type: i2.InventoryService }, { type: AlarmsViewService }, { type: i3.ColorService }, { type: i3.InterAppService }, { type: i3.GainsightService }, { type: AlarmsActivityTrackerService }], propDecorators: { selectedAlarm: [{
1115
1236
  type: Input
1237
+ }], showSections: [{
1238
+ type: Input
1239
+ }], hiddenSections: [{
1240
+ type: Input
1241
+ }], showActions: [{
1242
+ type: Input
1243
+ }], hiddenActions: [{
1244
+ type: Input
1245
+ }], showExternalNavigation: [{
1246
+ type: Input
1116
1247
  }], visibilityChange: [{
1117
1248
  type: HostListener,
1118
1249
  args: ['document:visibilitychange']
@@ -1120,19 +1251,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1120
1251
 
1121
1252
  class AlarmEmptyComponent {
1122
1253
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1123
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmEmptyComponent, isStandalone: true, selector: "c8y-alarms-empty", ngImport: i0, template: "<div class=\"p-24 hidden-sm\" data-cy=\"c8y-alarms-empty\">\n <c8y-ui-empty-state\n [icon]=\"'alarm'\"\n [title]=\"'No alarm selected' | translate\"\n [subtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</div>\n", dependencies: [{ kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmEmptyComponent, isStandalone: true, selector: "c8y-alarms-empty", ngImport: i0, template: "<div\n class=\"p-24\"\n data-cy=\"c8y-alarms-empty\"\n>\n <c8y-ui-empty-state\n [icon]=\"'alarm'\"\n [title]=\"'No alarm selected' | translate\"\n [subtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n ></c8y-ui-empty-state>\n</div>\n", dependencies: [{ kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1124
1255
  }
1125
1256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmEmptyComponent, decorators: [{
1126
1257
  type: Component,
1127
- args: [{ selector: 'c8y-alarms-empty', imports: [EmptyStateComponent, C8yTranslatePipe], template: "<div class=\"p-24 hidden-sm\" data-cy=\"c8y-alarms-empty\">\n <c8y-ui-empty-state\n [icon]=\"'alarm'\"\n [title]=\"'No alarm selected' | translate\"\n [subtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</div>\n" }]
1258
+ args: [{ selector: 'c8y-alarms-empty', imports: [EmptyStateComponent, C8yTranslatePipe], template: "<div\n class=\"p-24\"\n data-cy=\"c8y-alarms-empty\"\n>\n <c8y-ui-empty-state\n [icon]=\"'alarm'\"\n [title]=\"'No alarm selected' | translate\"\n [subtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n ></c8y-ui-empty-state>\n</div>\n" }]
1128
1259
  }] });
1129
1260
 
1130
1261
  class AlarmInfoComponent {
1131
- constructor(activatedRoute, router, contextRouteService, alarmsViewService) {
1262
+ constructor(activatedRoute, router, contextRouteService) {
1132
1263
  this.activatedRoute = activatedRoute;
1133
1264
  this.router = router;
1134
1265
  this.contextRouteService = contextRouteService;
1135
- this.alarmsViewService = alarmsViewService;
1136
1266
  this.isContextRoute = false;
1137
1267
  this.TITLE = gettext('Alarms');
1138
1268
  }
@@ -1144,24 +1274,13 @@ class AlarmInfoComponent {
1144
1274
  ViewContext.Group
1145
1275
  ]);
1146
1276
  }
1147
- back() {
1148
- this.alarmsViewService.closeDetailsView$.next();
1149
- }
1150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmInfoComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i3.ContextRouteService }, { token: AlarmsViewService }], target: i0.ɵɵFactoryTarget.Component }); }
1151
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmInfoComponent, isStandalone: true, selector: "c8y-alarm-info", ngImport: i0, template: "<ng-container *ngIf=\"!isContextRoute\">\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n</ng-container>\n\n<div\n class=\"inner-scroll split-view__detail split-view__detail--selected\"\n *ngIf=\"selectedAlarm$ | async\"\n>\n <div class=\"sticky-top bg-component\">\n <div class=\"card-header gap-16 d-block-xs d-block-sm p-l-24 p-r-24 p-t-16 separator\">\n <button\n class=\"btn btn-clean text-primary visible-sm visible-xs\"\n data-cy=\"c8y-alarms-info--back\"\n [title]=\"'Back' | translate\"\n (click)=\"back()\"\n >\n <i c8yIcon=\"chevron-left\"></i>\n <span>{{ 'Back' | translate }}</span>\n </button>\n\n <div class=\"flex-no-shrink a-s-start\"></div>\n <div class=\"flex-grow d-col\">\n <div\n class=\"text-break-word flex-grow text-16\"\n data-cy=\"c8y-alarms-info--title\"\n >\n {{ (selectedAlarm$ | async)?.text | translate }}\n </div>\n </div>\n </div>\n <div class=\"p-relative\">\n <c8y-tabs-outlet\n outletName=\"alarms\"\n orientation=\"horizontal\"\n ></c8y-tabs-outlet>\n </div>\n <div class=\"card-block overflow-visible p-l-24 p-r-24\">\n <c8y-alarm-details [selectedAlarm]=\"selectedAlarm$ | async\"></c8y-alarm-details>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: TabsOutletComponent, selector: "c8y-tabs-outlet,c8y-ui-tabs", inputs: ["tabs", "orientation", "navigatorOpen", "outletName", "context", "openFirstTab", "hasHeader"] }, { kind: "component", type: AlarmDetailsComponent, selector: "c8y-alarm-details", inputs: ["selectedAlarm"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
1277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmInfoComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i3.ContextRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
1278
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlarmInfoComponent, isStandalone: true, selector: "c8y-alarm-info", ngImport: i0, template: "@if (!isContextRoute) {\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n}\n\n@if (selectedAlarm$ | async; as selectedAlarm) {\n <div class=\"p-relative\">\n <c8y-tabs-outlet\n outletName=\"alarms\"\n orientation=\"horizontal\"\n ></c8y-tabs-outlet>\n </div>\n\n <c8y-alarm-details [selectedAlarm]=\"selectedAlarm\"></c8y-alarm-details>\n}\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: TabsOutletComponent, selector: "c8y-tabs-outlet,c8y-ui-tabs", inputs: ["tabs", "orientation", "navigatorOpen", "outletName", "context", "openFirstTab", "hasHeader"] }, { kind: "component", type: AlarmDetailsComponent, selector: "c8y-alarm-details", inputs: ["selectedAlarm", "showSections", "hiddenSections", "showActions", "hiddenActions", "showExternalNavigation"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
1152
1279
  }
1153
1280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmInfoComponent, decorators: [{
1154
1281
  type: Component,
1155
- args: [{ selector: 'c8y-alarm-info', imports: [
1156
- NgIf,
1157
- TitleComponent,
1158
- IconDirective,
1159
- TabsOutletComponent,
1160
- AlarmDetailsComponent,
1161
- C8yTranslatePipe,
1162
- AsyncPipe
1163
- ], template: "<ng-container *ngIf=\"!isContextRoute\">\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n</ng-container>\n\n<div\n class=\"inner-scroll split-view__detail split-view__detail--selected\"\n *ngIf=\"selectedAlarm$ | async\"\n>\n <div class=\"sticky-top bg-component\">\n <div class=\"card-header gap-16 d-block-xs d-block-sm p-l-24 p-r-24 p-t-16 separator\">\n <button\n class=\"btn btn-clean text-primary visible-sm visible-xs\"\n data-cy=\"c8y-alarms-info--back\"\n [title]=\"'Back' | translate\"\n (click)=\"back()\"\n >\n <i c8yIcon=\"chevron-left\"></i>\n <span>{{ 'Back' | translate }}</span>\n </button>\n\n <div class=\"flex-no-shrink a-s-start\"></div>\n <div class=\"flex-grow d-col\">\n <div\n class=\"text-break-word flex-grow text-16\"\n data-cy=\"c8y-alarms-info--title\"\n >\n {{ (selectedAlarm$ | async)?.text | translate }}\n </div>\n </div>\n </div>\n <div class=\"p-relative\">\n <c8y-tabs-outlet\n outletName=\"alarms\"\n orientation=\"horizontal\"\n ></c8y-tabs-outlet>\n </div>\n <div class=\"card-block overflow-visible p-l-24 p-r-24\">\n <c8y-alarm-details [selectedAlarm]=\"selectedAlarm$ | async\"></c8y-alarm-details>\n </div>\n </div>\n</div>\n" }]
1164
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i3.ContextRouteService }, { type: AlarmsViewService }] });
1282
+ args: [{ selector: 'c8y-alarm-info', imports: [TitleComponent, TabsOutletComponent, AlarmDetailsComponent, C8yTranslatePipe, AsyncPipe], template: "@if (!isContextRoute) {\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n}\n\n@if (selectedAlarm$ | async; as selectedAlarm) {\n <div class=\"p-relative\">\n <c8y-tabs-outlet\n outletName=\"alarms\"\n orientation=\"horizontal\"\n ></c8y-tabs-outlet>\n </div>\n\n <c8y-alarm-details [selectedAlarm]=\"selectedAlarm\"></c8y-alarm-details>\n}\n" }]
1283
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i3.ContextRouteService }] });
1165
1284
 
1166
1285
  /**
1167
1286
  * A service to retrieve custom indicators for the alarm list view.
@@ -1267,6 +1386,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1267
1386
  args: [{ name: 'AlarmSeveritiesToTitle' }]
1268
1387
  }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
1269
1388
 
1389
+ /**
1390
+ * Pipe for transforming alarm severity types into corresponding icons.
1391
+ *
1392
+ * @example
1393
+ * Usage in an Angular template:
1394
+ * {{ 'CRITICAL' | AlarmSeverityToIcon }}
1395
+ * Result: 'exclamation-circle'
1396
+ */
1397
+ class AlarmSeverityToIconPipe {
1398
+ /**
1399
+ * Transforms an alarm severity type into a corresponding icon.
1400
+ *
1401
+ * @param alarmSeverity - The severity type of the alarm.
1402
+ * @returns The corresponding icon for the given alarm severity type.
1403
+ */
1404
+ transform(alarmSeverity) {
1405
+ const alarmSeverityMapped = Severity[alarmSeverity?.toUpperCase()];
1406
+ return ALARM_SEVERITY_ICON_MAP[alarmSeverityMapped] || HELP_ICON;
1407
+ }
1408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1409
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, isStandalone: true, name: "AlarmSeverityToIcon" }); }
1410
+ }
1411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmSeverityToIconPipe, decorators: [{
1412
+ type: Pipe,
1413
+ args: [{
1414
+ name: 'AlarmSeverityToIcon',
1415
+ standalone: true
1416
+ }]
1417
+ }] });
1418
+
1270
1419
  class AlarmSeverityToIconClassPipe {
1271
1420
  transform(alarmSeverity) {
1272
1421
  let severityClassName = '';
@@ -1328,6 +1477,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1328
1477
  args: [{ name: 'AlarmSeverityToLabel' }]
1329
1478
  }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
1330
1479
 
1480
+ /**
1481
+ * Angular pipe for transforming alarm statuses into corresponding icons.
1482
+ *
1483
+ * @example
1484
+ * Usage in an Angular template:
1485
+ * {{ 'ACTIVE' | AlarmStatusToIcon }}
1486
+ * Result: 'bell'
1487
+ */
1488
+ class AlarmStatusToIconPipe {
1489
+ /**
1490
+ * Transforms an alarm status into a corresponding icon.
1491
+ *
1492
+ * @param alarmStatus - The status of the alarm.
1493
+ * @returns - The corresponding icon for the given alarm status.
1494
+ */
1495
+ transform(alarmStatus) {
1496
+ return AlarmIconMap[alarmStatus?.toUpperCase()] || HELP_ICON;
1497
+ }
1498
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1499
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, isStandalone: true, name: "AlarmStatusToIcon" }); }
1500
+ }
1501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmStatusToIconPipe, decorators: [{
1502
+ type: Pipe,
1503
+ args: [{ name: 'AlarmStatusToIcon' }]
1504
+ }] });
1505
+
1331
1506
  /**
1332
1507
  * Pipe to transform alarm status to corresponding label.
1333
1508
  */
@@ -1536,8 +1711,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1536
1711
  ReactiveFormsModule,
1537
1712
  BsDropdownDirective,
1538
1713
  CdkTrapFocus,
1539
- NgIf,
1540
- NgFor,
1541
1714
  ProductExperienceDirective,
1542
1715
  IconDirective,
1543
1716
  NgClass,
@@ -1769,15 +1942,6 @@ class AlarmsListComponent {
1769
1942
  * When set to `false`, the alarm list is displayed. When set to `true`, the opacity of alarms list is changed and a loading bar is shown.
1770
1943
  */
1771
1944
  this.isInitialLoading = false;
1772
- /**
1773
- * Controls the visibility and functionality of some components
1774
- * When set to `true`, means the list is displayed in a split view layout:
1775
- * the list on the first column and the selected record detail on the second column (the cockpit
1776
- * alarms view for example)
1777
- * When set to false, the list is displayed as a standalone component, opening the detail will
1778
- * redirect to the alarms
1779
- */
1780
- this.splitView = false;
1781
1945
  /**
1782
1946
  * Indicates whether the component is in widget preview mode.
1783
1947
  */
@@ -1844,7 +2008,7 @@ class AlarmsListComponent {
1844
2008
  return;
1845
2009
  }
1846
2010
  if (this.alarmsViewService.isIntervalRefresh()) {
1847
- const scrollElement = this.innerScrollWrapper.nativeElement;
2011
+ const scrollElement = this.svListComponent.innerScrollDiv.nativeElement;
1848
2012
  fromEvent(scrollElement, 'scroll')
1849
2013
  .pipe(takeUntil(this.destroy$), debounceTime(300))
1850
2014
  .subscribe((event) => {
@@ -1878,16 +2042,12 @@ class AlarmsListComponent {
1878
2042
  this.activeChildParam$.subscribe();
1879
2043
  }
1880
2044
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsListComponent, deps: [{ token: i1.ActivatedRoute }, { token: AlarmsViewService }, { token: i3.ContextRouteService }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1881
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmsListComponent, isStandalone: true, selector: "c8y-alarms-list", inputs: { alarms: "alarms", hasPermissions: "hasPermissions", typeFilters: "typeFilters", loadMoreMode: "loadMoreMode", navigationOptions: "navigationOptions", isInitialLoading: "isInitialLoading", splitView: "splitView", isInPreviewMode: "isInPreviewMode" }, outputs: { onSelectedAlarm: "onSelectedAlarm", onScrollingStateChange: "onScrollingStateChange" }, viewQueries: [{ propertyName: "innerScrollWrapper", first: true, predicate: ["scrollWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"inner-scroll\"\n [ngClass]=\"{ 'split-view__list bg-level-1': splitView, 'bg-component': !splitView }\"\n data-cy=\"c8y-alarms-list\"\n #scrollWrapper\n>\n <div\n class=\"flex-wrap flex-no-shrink sticky-top m-b-16\"\n [ngClass]=\"{\n 'separator-bottom card-header p-b-0': splitView,\n 'd-flex fit-w separator-top-bottom widget-bar p-l-16 p-r-16':\n !splitView && navigationOptions.allowNavigationToAlarmsView\n }\"\n >\n <div\n class=\"h4 card-title\"\n *ngIf=\"splitView\"\n >\n {{ 'Alarms list' | translate }}\n </div>\n <div\n [ngClass]=\"{ 'fit-w d-flex a-i-center gap-16': !splitView, 'fit-h-20 m-l-auto': splitView }\"\n >\n <ng-content></ng-content>\n </div>\n <!-- Loading -->\n <div\n class=\"fit-w overflow-hidden\"\n [ngClass]=\"{ 'p-t-16': splitView }\"\n >\n <div\n class=\"loading-bar\"\n data-cy=\"c8y-alarms-list--loading-bar\"\n style=\"z-index: 101\"\n [ngClass]=\"{ active: isInitialLoading && !isEmptyListLoading }\"\n ></div>\n </div>\n\n <div\n class=\"alert alert-warning\"\n role=\"alert\"\n translate\n *ngIf=\"\n !isEmptyListLoading &&\n (activeChildParam$ | async) &&\n (activeAlarm$ | async)?.id !== (activeChildParam$ | async)\n \"\n >\n The selected alarm is not currently in the list, change your filter.\n </div>\n </div>\n <c8y-list-group\n class=\"p-r-16 interactive\"\n [ngStyle]=\"{ opacity: isInitialLoading && !isEmptyListLoading ? 0.2 : 1 }\"\n style=\"transition: opacity 0.15s linear\"\n data-cy=\"c8y-alarms-list--group\"\n >\n <c8y-li-timeline\n class=\"pointer\"\n role=\"button\"\n data-cy=\"c8y-alarms-list--timeline-repeat\"\n *c8yFor=\"let alarm of alarms; let i = index; pipe: mapAlarmLink; loadMore: loadMoreMode\"\n [routerLink]=\"navigationOptions.allowNavigationToAlarmsView ? alarm.link : null\"\n routerLinkActive=\"active\"\n [queryParamsHandling]=\"navigationOptions.queryParamsHandling\"\n (isActiveChange)=\"activeRouteChanged($event, liScrollAnchor, alarm)\"\n (click)=\"onAlarmOpen(alarm)\"\n [queryParams]=\"\n navigationOptions.includeClearedQueryParams\n ? { showCleared: alarm.status === 'CLEARED' }\n : {}\n \"\n >\n <span\n [attr.aria-label]=\"alarmLastOccurrenceLabel | translate\"\n [tooltip]=\"alarmLastOccurrenceLabel | translate\"\n placement=\"right\"\n data-cy=\"c8y-alarms-list--last-occurrence-date\"\n container=\"body\"\n [delay]=\"500\"\n >\n {{ alarm.time | c8yDate: 'mediumDate' }}\n {{ alarm.time | c8yDate: 'mediumTime' }}\n </span>\n <c8y-li\n style=\"scroll-margin-top: 56px\"\n #liScrollAnchor\n >\n <c8y-li-icon class=\"a-s-start\">\n <div class=\"alarm-icons\">\n <c8y-alarms-icon [typeFilters]=\"typeFilters\" [alarm]=\"alarm\"></c8y-alarms-icon>\n </div>\n <button\n class=\"btn-clean text-center\"\n data-cy=\"c8y-alarms-list--badge\"\n [attr.aria-label]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n [tooltip]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n placement=\"right\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarm.firstOccurrenceTime\"\n (click)=\"$event.stopPropagation()\"\n [delay]=\"500\"\n >\n <span\n class=\"badge badge-info\"\n *ngIf=\"alarm.count > 1\"\n >\n {{ alarm.count }}\n </span>\n </button>\n </c8y-li-icon>\n <c8y-li-body class=\"a-s-stretch\">\n <div class=\"d-flex a-i-start fit-h\">\n <div class=\"min-width-0 flex-grow\">\n <p class=\"text-truncate-wrap p-b-4\" data-cy=\"c8y-alarms-list--alarm-text\">\n {{ alarm.text | translate }}\n </p>\n <div class=\"d-flex\">\n <p\n class=\"small text-muted text-truncate flex-grow\"\n [title]=\"alarm.source.name\"\n data-cy=\"c8y-alarms-list--alarm-source-name\"\n >\n <i [c8yIcon]=\"'exchange'\"></i>\n {{ alarm.source.name }}\n </p>\n <div class=\"d-flex\">\n <div\n [title]=\"item.title | translate\"\n *ngFor=\"let item of alarm | alarmListIndicator | async\"\n >\n <i\n [class]=\"item.class\"\n [c8yIcon]=\"item.icon\"\n ></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n <c8y-loading\n data-cy=\"c8y-alarms-list--c8y-loading\"\n *ngIf=\"isInitialLoading && isEmptyListLoading\"></c8y-loading>\n <div\n class=\"p-relative p-l-24\"\n *ngIf=\"isEmptyListLoading && !isInitialLoading\"\n >\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No alarms to display.' | translate\"\n data-cy=\"c8y-alarms-list--empty-state\"\n *ngIf=\"hasPermissions; else alertsA\"\n >\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n </c8y-list-group>\n</div>\n\n<ng-template #alertsA>\n <c8y-dynamic-component-alerts [alerts]=\"alertAggregator\"></c8y-dynamic-component-alerts>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: 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: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: AlarmsIconComponent, selector: "c8y-alarms-icon", inputs: ["alarm", "typeFilters"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: DynamicComponentAlertsComponent, selector: "c8y-dynamic-component-alerts", inputs: ["alerts"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: AlarmListIndicatorPipe, name: "alarmListIndicator" }] }); }
2045
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlarmsListComponent, isStandalone: true, selector: "c8y-alarms-list", inputs: { alarms: "alarms", hasPermissions: "hasPermissions", typeFilters: "typeFilters", loadMoreMode: "loadMoreMode", navigationOptions: "navigationOptions", isInitialLoading: "isInitialLoading", isInPreviewMode: "isInPreviewMode" }, outputs: { onSelectedAlarm: "onSelectedAlarm", onScrollingStateChange: "onScrollingStateChange" }, viewQueries: [{ propertyName: "svListComponent", first: true, predicate: ["scrollWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<c8y-sv-list\n [emptyStateIcon]=\"'c8y-alert-idle'\"\n [title]=\"'Alarms list' | translate\"\n [emptyStateTitle]=\"'No alarms to display.' | translate\"\n [loading]=\"isInitialLoading || isEmptyListLoading\"\n [showEmptyState]=\"isEmptyListLoading && !isInitialLoading && hasPermissions\"\n [docsUrl]=\"\n '/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms'\n \"\n data-cy=\"c8y-alarms-list\"\n #scrollWrapper\n>\n <c8y-sv-header-actions>\n <ng-content></ng-content>\n </c8y-sv-header-actions>\n\n <c8y-sv-alerts>\n @if (\n !isEmptyListLoading &&\n (activeChildParam$ | async) &&\n (activeAlarm$ | async)?.id !== (activeChildParam$ | async)\n ) {\n <div\n class=\"alert alert-warning m-b-0\"\n role=\"alert\"\n translate\n >\n The selected alarm is not currently in the list, change your filter.\n </div>\n }\n </c8y-sv-alerts>\n\n <c8y-list-group class=\"c8y-list--timeline d-block p-r-16 p-t-16\">\n <c8y-li-timeline\n class=\"pointer c8y-list--timeline__item\"\n role=\"button\"\n data-cy=\"c8y-alarms-list--timeline-repeat\"\n *c8yFor=\"let alarm of alarms; let i = index; pipe: mapAlarmLink; loadMore: loadMoreMode\"\n [routerLink]=\"navigationOptions.allowNavigationToAlarmsView ? alarm.link : null\"\n routerLinkActive=\"active\"\n [queryParamsHandling]=\"navigationOptions.queryParamsHandling\"\n (isActiveChange)=\"activeRouteChanged($event, liScrollAnchor, alarm)\"\n (click)=\"onAlarmOpen(alarm)\"\n [queryParams]=\"\n navigationOptions.includeClearedQueryParams\n ? { showCleared: alarm.status === 'CLEARED' }\n : {}\n \"\n >\n <span\n [attr.aria-label]=\"alarmLastOccurrenceLabel | translate\"\n [tooltip]=\"alarmLastOccurrenceLabel | translate\"\n placement=\"right\"\n container=\"body\"\n data-cy=\"c8y-alarms-list--last-occurrence-date\"\n [delay]=\"500\"\n >\n {{ alarm.time | c8yDate: 'mediumDate' }}\n {{ alarm.time | c8yDate: 'mediumTime' }}\n </span>\n <c8y-li\n style=\"scroll-margin-top: 56px\"\n #liScrollAnchor\n >\n <c8y-li-icon class=\"a-s-start\">\n <div class=\"alarm-icons\">\n <c8y-alarms-icon\n [typeFilters]=\"typeFilters\"\n [alarm]=\"alarm\"\n ></c8y-alarms-icon>\n </div>\n @if (alarm.firstOccurrenceTime) {\n <button\n class=\"btn-clean text-center\"\n [attr.aria-label]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n [tooltip]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n placement=\"right\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-alarms-list--badge\"\n (click)=\"$event.stopPropagation()\"\n [delay]=\"500\"\n >\n @if (alarm.count > 1) {\n <span class=\"badge badge-info\">\n {{ alarm.count }}\n </span>\n }\n </button>\n }\n </c8y-li-icon>\n <c8y-li-body class=\"a-s-stretch\">\n <div class=\"d-flex a-i-start fit-h\">\n <div class=\"min-width-0 flex-grow\">\n <p\n class=\"text-truncate-wrap p-b-4\"\n data-cy=\"c8y-alarms-list--alarm-text\"\n >\n {{ alarm.text | translate }}\n </p>\n <div class=\"d-flex\">\n <p\n class=\"small text-muted text-truncate flex-grow\"\n [title]=\"alarm.source.name\"\n data-cy=\"c8y-alarms-list--alarm-source-name\"\n >\n <i [c8yIcon]=\"'exchange'\"></i>\n {{ alarm.source.name }}\n </p>\n <div class=\"d-flex\">\n @for (item of alarm | alarmListIndicator | async; track $index) {\n <div [title]=\"item.title | translate\">\n <i\n [class]=\"item.class\"\n [c8yIcon]=\"item.icon\"\n ></i>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n</c8y-sv-list>\n\n<ng-template #alertsA>\n <c8y-dynamic-component-alerts [alerts]=\"alertAggregator\"></c8y-dynamic-component-alerts>\n</ng-template>\n", dependencies: [{ kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: 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: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: AlarmsIconComponent, selector: "c8y-alarms-icon", inputs: ["alarm", "typeFilters"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: DynamicComponentAlertsComponent, selector: "c8y-dynamic-component-alerts", inputs: ["alerts"] }, { kind: "component", type: SplitViewListComponent, selector: "c8y-sv-list", inputs: ["title", "loading", "showEmptyState", "emptyStateIcon", "emptyStateTitle", "emptyStateSubtitle", "docsUrl", "showTitle", "listOpacity"] }, { kind: "component", type: SplitViewHeaderActionsComponent, selector: "c8y-sv-header-actions" }, { kind: "component", type: SplitViewAlertsComponent, selector: "c8y-sv-alerts" }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: AlarmListIndicatorPipe, name: "alarmListIndicator" }] }); }
1882
2046
  }
1883
2047
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsListComponent, decorators: [{
1884
2048
  type: Component,
1885
2049
  args: [{ selector: 'c8y-alarms-list', imports: [
1886
- NgClass,
1887
- NgIf,
1888
2050
  C8yTranslateDirective,
1889
- ListGroupComponent,
1890
- NgStyle,
1891
2051
  ForOfDirective,
1892
2052
  ListItemTimelineComponent,
1893
2053
  RouterLinkActive,
@@ -1898,17 +2058,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1898
2058
  AlarmsIconComponent,
1899
2059
  ListItemBodyComponent,
1900
2060
  IconDirective,
1901
- NgFor,
1902
- LoadingComponent,
1903
- EmptyStateComponent,
1904
- GuideDocsComponent,
1905
- GuideHrefDirective,
1906
2061
  DynamicComponentAlertsComponent,
1907
2062
  C8yTranslatePipe,
1908
2063
  AsyncPipe,
1909
2064
  DatePipe,
1910
- AlarmListIndicatorPipe
1911
- ], template: "<div\n class=\"inner-scroll\"\n [ngClass]=\"{ 'split-view__list bg-level-1': splitView, 'bg-component': !splitView }\"\n data-cy=\"c8y-alarms-list\"\n #scrollWrapper\n>\n <div\n class=\"flex-wrap flex-no-shrink sticky-top m-b-16\"\n [ngClass]=\"{\n 'separator-bottom card-header p-b-0': splitView,\n 'd-flex fit-w separator-top-bottom widget-bar p-l-16 p-r-16':\n !splitView && navigationOptions.allowNavigationToAlarmsView\n }\"\n >\n <div\n class=\"h4 card-title\"\n *ngIf=\"splitView\"\n >\n {{ 'Alarms list' | translate }}\n </div>\n <div\n [ngClass]=\"{ 'fit-w d-flex a-i-center gap-16': !splitView, 'fit-h-20 m-l-auto': splitView }\"\n >\n <ng-content></ng-content>\n </div>\n <!-- Loading -->\n <div\n class=\"fit-w overflow-hidden\"\n [ngClass]=\"{ 'p-t-16': splitView }\"\n >\n <div\n class=\"loading-bar\"\n data-cy=\"c8y-alarms-list--loading-bar\"\n style=\"z-index: 101\"\n [ngClass]=\"{ active: isInitialLoading && !isEmptyListLoading }\"\n ></div>\n </div>\n\n <div\n class=\"alert alert-warning\"\n role=\"alert\"\n translate\n *ngIf=\"\n !isEmptyListLoading &&\n (activeChildParam$ | async) &&\n (activeAlarm$ | async)?.id !== (activeChildParam$ | async)\n \"\n >\n The selected alarm is not currently in the list, change your filter.\n </div>\n </div>\n <c8y-list-group\n class=\"p-r-16 interactive\"\n [ngStyle]=\"{ opacity: isInitialLoading && !isEmptyListLoading ? 0.2 : 1 }\"\n style=\"transition: opacity 0.15s linear\"\n data-cy=\"c8y-alarms-list--group\"\n >\n <c8y-li-timeline\n class=\"pointer\"\n role=\"button\"\n data-cy=\"c8y-alarms-list--timeline-repeat\"\n *c8yFor=\"let alarm of alarms; let i = index; pipe: mapAlarmLink; loadMore: loadMoreMode\"\n [routerLink]=\"navigationOptions.allowNavigationToAlarmsView ? alarm.link : null\"\n routerLinkActive=\"active\"\n [queryParamsHandling]=\"navigationOptions.queryParamsHandling\"\n (isActiveChange)=\"activeRouteChanged($event, liScrollAnchor, alarm)\"\n (click)=\"onAlarmOpen(alarm)\"\n [queryParams]=\"\n navigationOptions.includeClearedQueryParams\n ? { showCleared: alarm.status === 'CLEARED' }\n : {}\n \"\n >\n <span\n [attr.aria-label]=\"alarmLastOccurrenceLabel | translate\"\n [tooltip]=\"alarmLastOccurrenceLabel | translate\"\n placement=\"right\"\n data-cy=\"c8y-alarms-list--last-occurrence-date\"\n container=\"body\"\n [delay]=\"500\"\n >\n {{ alarm.time | c8yDate: 'mediumDate' }}\n {{ alarm.time | c8yDate: 'mediumTime' }}\n </span>\n <c8y-li\n style=\"scroll-margin-top: 56px\"\n #liScrollAnchor\n >\n <c8y-li-icon class=\"a-s-start\">\n <div class=\"alarm-icons\">\n <c8y-alarms-icon [typeFilters]=\"typeFilters\" [alarm]=\"alarm\"></c8y-alarms-icon>\n </div>\n <button\n class=\"btn-clean text-center\"\n data-cy=\"c8y-alarms-list--badge\"\n [attr.aria-label]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n [tooltip]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n placement=\"right\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarm.firstOccurrenceTime\"\n (click)=\"$event.stopPropagation()\"\n [delay]=\"500\"\n >\n <span\n class=\"badge badge-info\"\n *ngIf=\"alarm.count > 1\"\n >\n {{ alarm.count }}\n </span>\n </button>\n </c8y-li-icon>\n <c8y-li-body class=\"a-s-stretch\">\n <div class=\"d-flex a-i-start fit-h\">\n <div class=\"min-width-0 flex-grow\">\n <p class=\"text-truncate-wrap p-b-4\" data-cy=\"c8y-alarms-list--alarm-text\">\n {{ alarm.text | translate }}\n </p>\n <div class=\"d-flex\">\n <p\n class=\"small text-muted text-truncate flex-grow\"\n [title]=\"alarm.source.name\"\n data-cy=\"c8y-alarms-list--alarm-source-name\"\n >\n <i [c8yIcon]=\"'exchange'\"></i>\n {{ alarm.source.name }}\n </p>\n <div class=\"d-flex\">\n <div\n [title]=\"item.title | translate\"\n *ngFor=\"let item of alarm | alarmListIndicator | async\"\n >\n <i\n [class]=\"item.class\"\n [c8yIcon]=\"item.icon\"\n ></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n <c8y-loading\n data-cy=\"c8y-alarms-list--c8y-loading\"\n *ngIf=\"isInitialLoading && isEmptyListLoading\"></c8y-loading>\n <div\n class=\"p-relative p-l-24\"\n *ngIf=\"isEmptyListLoading && !isInitialLoading\"\n >\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No alarms to display.' | translate\"\n data-cy=\"c8y-alarms-list--empty-state\"\n *ngIf=\"hasPermissions; else alertsA\"\n >\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n </c8y-list-group>\n</div>\n\n<ng-template #alertsA>\n <c8y-dynamic-component-alerts [alerts]=\"alertAggregator\"></c8y-dynamic-component-alerts>\n</ng-template>\n" }]
2065
+ AlarmListIndicatorPipe,
2066
+ SplitViewListComponent,
2067
+ SplitViewHeaderActionsComponent,
2068
+ SplitViewAlertsComponent,
2069
+ ListGroupComponent
2070
+ ], template: "<c8y-sv-list\n [emptyStateIcon]=\"'c8y-alert-idle'\"\n [title]=\"'Alarms list' | translate\"\n [emptyStateTitle]=\"'No alarms to display.' | translate\"\n [loading]=\"isInitialLoading || isEmptyListLoading\"\n [showEmptyState]=\"isEmptyListLoading && !isInitialLoading && hasPermissions\"\n [docsUrl]=\"\n '/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms'\n \"\n data-cy=\"c8y-alarms-list\"\n #scrollWrapper\n>\n <c8y-sv-header-actions>\n <ng-content></ng-content>\n </c8y-sv-header-actions>\n\n <c8y-sv-alerts>\n @if (\n !isEmptyListLoading &&\n (activeChildParam$ | async) &&\n (activeAlarm$ | async)?.id !== (activeChildParam$ | async)\n ) {\n <div\n class=\"alert alert-warning m-b-0\"\n role=\"alert\"\n translate\n >\n The selected alarm is not currently in the list, change your filter.\n </div>\n }\n </c8y-sv-alerts>\n\n <c8y-list-group class=\"c8y-list--timeline d-block p-r-16 p-t-16\">\n <c8y-li-timeline\n class=\"pointer c8y-list--timeline__item\"\n role=\"button\"\n data-cy=\"c8y-alarms-list--timeline-repeat\"\n *c8yFor=\"let alarm of alarms; let i = index; pipe: mapAlarmLink; loadMore: loadMoreMode\"\n [routerLink]=\"navigationOptions.allowNavigationToAlarmsView ? alarm.link : null\"\n routerLinkActive=\"active\"\n [queryParamsHandling]=\"navigationOptions.queryParamsHandling\"\n (isActiveChange)=\"activeRouteChanged($event, liScrollAnchor, alarm)\"\n (click)=\"onAlarmOpen(alarm)\"\n [queryParams]=\"\n navigationOptions.includeClearedQueryParams\n ? { showCleared: alarm.status === 'CLEARED' }\n : {}\n \"\n >\n <span\n [attr.aria-label]=\"alarmLastOccurrenceLabel | translate\"\n [tooltip]=\"alarmLastOccurrenceLabel | translate\"\n placement=\"right\"\n container=\"body\"\n data-cy=\"c8y-alarms-list--last-occurrence-date\"\n [delay]=\"500\"\n >\n {{ alarm.time | c8yDate: 'mediumDate' }}\n {{ alarm.time | c8yDate: 'mediumTime' }}\n </span>\n <c8y-li\n style=\"scroll-margin-top: 56px\"\n #liScrollAnchor\n >\n <c8y-li-icon class=\"a-s-start\">\n <div class=\"alarm-icons\">\n <c8y-alarms-icon\n [typeFilters]=\"typeFilters\"\n [alarm]=\"alarm\"\n ></c8y-alarms-icon>\n </div>\n @if (alarm.firstOccurrenceTime) {\n <button\n class=\"btn-clean text-center\"\n [attr.aria-label]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n [tooltip]=\"\n alarmBadgeTooltip\n | translate\n : { alarmFirstOccurrenceTime: alarm.firstOccurrenceTime | c8yDate: 'medium' }\n \"\n placement=\"right\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-alarms-list--badge\"\n (click)=\"$event.stopPropagation()\"\n [delay]=\"500\"\n >\n @if (alarm.count > 1) {\n <span class=\"badge badge-info\">\n {{ alarm.count }}\n </span>\n }\n </button>\n }\n </c8y-li-icon>\n <c8y-li-body class=\"a-s-stretch\">\n <div class=\"d-flex a-i-start fit-h\">\n <div class=\"min-width-0 flex-grow\">\n <p\n class=\"text-truncate-wrap p-b-4\"\n data-cy=\"c8y-alarms-list--alarm-text\"\n >\n {{ alarm.text | translate }}\n </p>\n <div class=\"d-flex\">\n <p\n class=\"small text-muted text-truncate flex-grow\"\n [title]=\"alarm.source.name\"\n data-cy=\"c8y-alarms-list--alarm-source-name\"\n >\n <i [c8yIcon]=\"'exchange'\"></i>\n {{ alarm.source.name }}\n </p>\n <div class=\"d-flex\">\n @for (item of alarm | alarmListIndicator | async; track $index) {\n <div [title]=\"item.title | translate\">\n <i\n [class]=\"item.class\"\n [c8yIcon]=\"item.icon\"\n ></i>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-li-timeline>\n </c8y-list-group>\n</c8y-sv-list>\n\n<ng-template #alertsA>\n <c8y-dynamic-component-alerts [alerts]=\"alertAggregator\"></c8y-dynamic-component-alerts>\n</ng-template>\n" }]
1912
2071
  }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: AlarmsViewService }, { type: i3.ContextRouteService }, { type: i1.Router }], propDecorators: { alarms: [{
1913
2072
  type: Input
1914
2073
  }], hasPermissions: [{
@@ -1921,15 +2080,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1921
2080
  type: Input
1922
2081
  }], isInitialLoading: [{
1923
2082
  type: Input
1924
- }], splitView: [{
1925
- type: Input
1926
2083
  }], isInPreviewMode: [{
1927
2084
  type: Input
1928
2085
  }], onSelectedAlarm: [{
1929
2086
  type: Output
1930
2087
  }], onScrollingStateChange: [{
1931
2088
  type: Output
1932
- }], innerScrollWrapper: [{
2089
+ }], svListComponent: [{
1933
2090
  type: ViewChild,
1934
2091
  args: ['scrollWrapper']
1935
2092
  }] } });
@@ -2076,13 +2233,13 @@ class AlarmsDateFilterComponent {
2076
2233
  });
2077
2234
  }
2078
2235
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsDateFilterComponent, deps: [{ token: i1$2.FormBuilder }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: AlarmsViewService }], target: i0.ɵɵFactoryTarget.Component }); }
2079
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmsDateFilterComponent, isStandalone: true, selector: "c8y-alarms-date-filter", inputs: { DEFAULT_INTERVAL: "DEFAULT_INTERVAL", updateQueryParams: "updateQueryParams", date: "date" }, outputs: { dateFilterChange: "dateFilterChange" }, providers: [
2236
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlarmsDateFilterComponent, isStandalone: true, selector: "c8y-alarms-date-filter", inputs: { DEFAULT_INTERVAL: "DEFAULT_INTERVAL", updateQueryParams: "updateQueryParams", date: "date" }, outputs: { dateFilterChange: "dateFilterChange" }, providers: [
2080
2237
  {
2081
2238
  provide: NG_VALUE_ACCESSOR,
2082
2239
  useExisting: forwardRef(() => AlarmsDateFilterComponent),
2083
2240
  multi: true
2084
2241
  }
2085
- ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "<form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n>\n <div\n class=\"dropdown flex-grow\"\n c8yDropdownDirection\n #dropDirection=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n tooltip=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"alarms-date-filter--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"alarms-date-filter--selected-time-range\"\n *ngIf=\"form.controls.currentDateContextInterval.value !== 'none'\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n [INTERVALS]=\"INTERVALS\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateFilter(); dropdown.isOpen = false\"\n [disabled]=\"(form.pristine && form.untouched) || form.invalid\"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: DropdownDirectionDirective, selector: "[dropdown][c8yBsDropdownDirection],[dropdown][c8yDropdownDirection]" }, { kind: "directive", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: 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: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
2242
+ ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "<form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n>\n <div\n class=\"dropdown flex-grow\"\n container=\"body\"\n #dropDirection=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n tooltip=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"alarms-date-filter--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n @if (form.controls.currentDateContextInterval.value !== 'none') {\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"alarms-date-filter--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n }\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n [INTERVALS]=\"INTERVALS\"\n ></c8y-interval-picker>\n\n @if (form.controls.currentDateContextInterval.value === 'custom') {\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateFilter(); dropdown.isOpen = false\"\n [disabled]=\"(form.pristine && form.untouched) || form.invalid\"\n translate\n >\n Apply\n </button>\n </div>\n }\n </ul>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: 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: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
2086
2243
  }
2087
2244
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsDateFilterComponent, decorators: [{
2088
2245
  type: Component,
@@ -2096,11 +2253,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2096
2253
  FormsModule,
2097
2254
  ReactiveFormsModule,
2098
2255
  BsDropdownDirective,
2099
- DropdownDirectionDirective,
2100
2256
  BsDropdownToggleDirective,
2101
2257
  TooltipDirective,
2102
2258
  IconDirective,
2103
- NgIf,
2104
2259
  BsDropdownMenuDirective,
2105
2260
  IntervalPickerComponent,
2106
2261
  FormGroupComponent,
@@ -2111,7 +2266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2111
2266
  MessageDirective,
2112
2267
  C8yTranslatePipe,
2113
2268
  DatePipe
2114
- ], template: "<form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n>\n <div\n class=\"dropdown flex-grow\"\n c8yDropdownDirection\n #dropDirection=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n tooltip=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"alarms-date-filter--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"alarms-date-filter--selected-time-range\"\n *ngIf=\"form.controls.currentDateContextInterval.value !== 'none'\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n [INTERVALS]=\"INTERVALS\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateFilter(); dropdown.isOpen = false\"\n [disabled]=\"(form.pristine && form.untouched) || form.invalid\"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n</form>\n" }]
2269
+ ], template: "<form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n>\n <div\n class=\"dropdown flex-grow\"\n container=\"body\"\n #dropDirection=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n tooltip=\"{{\n (form.value.currentDateContextInterval === 'none'\n ? noFilterLabel\n : (date[0] | c8yDate: DATE_FORMAT) + ' \u2014 ' + (date[1] | c8yDate: DATE_FORMAT)\n ) | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"alarms-date-filter--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n @if (form.controls.currentDateContextInterval.value !== 'none') {\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"alarms-date-filter--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n }\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n [INTERVALS]=\"INTERVALS\"\n ></c8y-interval-picker>\n\n @if (form.controls.currentDateContextInterval.value === 'custom') {\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n class=\"m-b-8\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateFilter(); dropdown.isOpen = false\"\n [disabled]=\"(form.pristine && form.untouched) || form.invalid\"\n translate\n >\n Apply\n </button>\n </div>\n }\n </ul>\n </div>\n</form>\n" }]
2115
2270
  }], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: AlarmsViewService }], propDecorators: { DEFAULT_INTERVAL: [{
2116
2271
  type: Input
2117
2272
  }], updateQueryParams: [{
@@ -2287,7 +2442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2287
2442
  }] } });
2288
2443
 
2289
2444
  class AlarmsComponent {
2290
- constructor(activatedRoute, alarmsViewService, alarmWithChildrenRealtimeService, alertService, contextRouteService, modalService, translateService, router, gainsightService, alarmsActivityTrackerService) {
2445
+ constructor(activatedRoute, alarmsViewService, alarmWithChildrenRealtimeService, alertService, contextRouteService, modalService, translateService, gainsightService, alarmsActivityTrackerService) {
2291
2446
  this.activatedRoute = activatedRoute;
2292
2447
  this.alarmsViewService = alarmsViewService;
2293
2448
  this.alarmWithChildrenRealtimeService = alarmWithChildrenRealtimeService;
@@ -2295,7 +2450,6 @@ class AlarmsComponent {
2295
2450
  this.contextRouteService = contextRouteService;
2296
2451
  this.modalService = modalService;
2297
2452
  this.translateService = translateService;
2298
- this.router = router;
2299
2453
  this.gainsightService = gainsightService;
2300
2454
  this.alarmsActivityTrackerService = alarmsActivityTrackerService;
2301
2455
  this.NEW_REALTIME_ALARM_MESSAGE = this.alarmsViewService.REALTIME_UPDATE_ALARMS_MESSAGE;
@@ -2397,6 +2551,9 @@ class AlarmsComponent {
2397
2551
  this.updateAlarms(null);
2398
2552
  this.isRealtimeActive.next(false);
2399
2553
  }
2554
+ async handleBackClick() {
2555
+ await this.alarmsViewService.closeDetailsView(this.activatedRoute);
2556
+ }
2400
2557
  changeInterval(value = true) {
2401
2558
  this.shouldShowIntervalToggle$.next(value);
2402
2559
  }
@@ -2481,14 +2638,16 @@ class AlarmsComponent {
2481
2638
  this.contextSourceId = contextData?.id;
2482
2639
  }
2483
2640
  }
2484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsComponent, deps: [{ token: i1.ActivatedRoute }, { token: AlarmsViewService }, { token: i3.AlarmWithChildrenRealtimeService }, { token: i3.AlertService }, { token: i3.ContextRouteService }, { token: i3.ModalService }, { token: i1$1.TranslateService }, { token: i1.Router }, { token: i3.GainsightService }, { token: AlarmsActivityTrackerService }], target: i0.ɵɵFactoryTarget.Component }); }
2485
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AlarmsComponent, isStandalone: true, selector: "c8y-alarms", host: { listeners: { "document:visibilitychange": "visibilityChange()" } }, providers: [AlarmWithChildrenRealtimeService, AlarmsActivityTrackerService], viewQueries: [{ propertyName: "alarmIntervalRefreshComponent", first: true, predicate: AlarmsIntervalRefreshComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"(activatedRoute.data | async)?.title\">\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n</ng-container>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-filter\n class=\"d-block fit-w\"\n [contextSourceId]=\"contextSourceId\"\n (onFilterApplied)=\"applyFormFilters($event)\"\n ></c8y-alarms-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-date-filter (dateFilterChange)=\"applyFormFilters($event)\"></c8y-alarms-date-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-alarms-type-filter\n class=\"d-block fit-w\"\n [alarms]=\"alarms$ | async\"\n (onFilterChanged)=\"applyTypeFilters($event)\"\n ></c8y-alarms-type-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"0\"\n>\n <button\n class=\"btn btn-link\"\n [title]=\"'Clear all alarms' | translate\"\n type=\"button\"\n (click)=\"clearAll()\"\n data-cy=\"c8y-alarms-view--clear-all-button\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear all`alarms`' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<!--Realtime button-->\n<ng-template #realtimeRefresh>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n (isRealtimeActive | async)\n ? (NEW_REALTIME_ALARM_MESSAGE | translate)\n : (REFRESH_LABEL | translate)\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading$ | async\"\n (click)=\"refresh()\"\n >\n <span\n class=\"tag tag--info m-r-8\"\n *ngIf=\"isRealtimeActive | async\"\n >\n {{ 'New alarms' | translate }}\n </span>\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading$ | async }\"\n ></i>\n </button>\n <button\n class=\"c8y-realtime btn btn-default btn-sm\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n data-cy=\"c8y-alarms--realtime-button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\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</ng-template>\n\n<c8y-help\n src=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n></c8y-help>\n\n<div class=\"card content-fullpage split-view--5-7 grid__row--1\">\n <c8y-alarms-list\n class=\"d-contents\"\n [isInitialLoading]=\"isLoading$ | async\"\n [alarms]=\"alarms$ | async\"\n [typeFilters]=\"typeFilters\"\n (onScrollingStateChange)=\"changeInterval(!$event); isListScrolled.set($event)\"\n (onSelectedAlarm)=\"changeInterval(false)\"\n [splitView]=\"true\"\n [hasPermissions]=\"!isDisabled\"\n >\n <ng-container *ngIf=\"isIntervalRefresh; else realtimeRefresh\">\n <c8y-alarms-interval-refresh\n [alarmsListLoading$]=\"isLoading$\"\n [isIntervalToggleEnabled]=\"shouldShowIntervalToggle$ | async\"\n (onCountdownEnded)=\"refresh()\"\n [isDisabled]=\"isDisabled\"\n ></c8y-alarms-interval-refresh>\n </ng-container>\n </c8y-alarms-list>\n\n <router-outlet class=\"d-contents\"></router-outlet>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: AlarmsFilterComponent, selector: "c8y-alarms-filter", inputs: ["contextSourceId"], outputs: ["onFilterApplied"] }, { kind: "component", type: AlarmsDateFilterComponent, selector: "c8y-alarms-date-filter", inputs: ["DEFAULT_INTERVAL", "updateQueryParams", "date"], outputs: ["dateFilterChange"] }, { kind: "component", type: AlarmsTypeFilterComponent, selector: "c8y-alarms-type-filter", inputs: ["alarms", "possibleFilters", "activeFilters"], outputs: ["onFilterChanged"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "component", type: AlarmsListComponent, selector: "c8y-alarms-list", inputs: ["alarms", "hasPermissions", "typeFilters", "loadMoreMode", "navigationOptions", "isInitialLoading", "splitView", "isInPreviewMode"], outputs: ["onSelectedAlarm", "onScrollingStateChange"] }, { kind: "component", type: AlarmsIntervalRefreshComponent, selector: "c8y-alarms-interval-refresh", inputs: ["isDisabled", "alarmsListLoading$", "isIntervalToggleEnabled"], outputs: ["onCountdownEnded"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsComponent, deps: [{ token: i1.ActivatedRoute }, { token: AlarmsViewService }, { token: i3.AlarmWithChildrenRealtimeService }, { token: i3.AlertService }, { token: i3.ContextRouteService }, { token: i3.ModalService }, { token: i1$1.TranslateService }, { token: i3.GainsightService }, { token: AlarmsActivityTrackerService }], target: i0.ɵɵFactoryTarget.Component }); }
2642
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlarmsComponent, isStandalone: true, selector: "c8y-alarms", host: { listeners: { "document:visibilitychange": "visibilityChange()" } }, providers: [AlarmWithChildrenRealtimeService, AlarmsActivityTrackerService], viewQueries: [{ propertyName: "alarmIntervalRefreshComponent", first: true, predicate: AlarmsIntervalRefreshComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ TITLE | translate }}</c8y-title>\n<c8y-help\n src=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n></c8y-help>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-filter\n class=\"d-block fit-w\"\n [contextSourceId]=\"contextSourceId\"\n (onFilterApplied)=\"applyFormFilters($event)\"\n ></c8y-alarms-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-date-filter (dateFilterChange)=\"applyFormFilters($event)\"></c8y-alarms-date-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-alarms-type-filter\n class=\"d-block fit-w\"\n [alarms]=\"alarms$ | async\"\n (onFilterChanged)=\"applyTypeFilters($event)\"\n ></c8y-alarms-type-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"0\"\n>\n <button\n class=\"btn btn-link\"\n [title]=\"'Clear all alarms' | translate\"\n type=\"button\"\n (click)=\"clearAll()\"\n data-cy=\"c8y-alarms-view--clear-all-button\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear all`alarms`' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-sv [resizableConfig]=\"{ trackId: 'alarms-split-view', collapsible: false }\">\n <c8y-alarms-list\n [isInitialLoading]=\"isLoading$ | async\"\n [alarms]=\"alarms$ | async\"\n [typeFilters]=\"typeFilters\"\n (onScrollingStateChange)=\"changeInterval(!$event); isListScrolled.set($event)\"\n (onSelectedAlarm)=\"changeInterval(false)\"\n [hasPermissions]=\"!isDisabled\"\n >\n @if (isIntervalRefresh) {\n <c8y-alarms-interval-refresh\n [alarmsListLoading$]=\"isLoading$\"\n [isIntervalToggleEnabled]=\"shouldShowIntervalToggle$ | async\"\n (onCountdownEnded)=\"refresh()\"\n [isDisabled]=\"isDisabled\"\n ></c8y-alarms-interval-refresh>\n } @else {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n (isRealtimeActive | async)\n ? (NEW_REALTIME_ALARM_MESSAGE | translate)\n : (REFRESH_LABEL | translate)\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading$ | async\"\n (click)=\"refresh()\"\n >\n @if (isRealtimeActive | async) {\n <span class=\"tag tag--info m-r-8\">\n {{ 'New alarms' | translate }}\n </span>\n }\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading$ | async }\"\n ></i>\n </button>\n <button\n class=\"c8y-realtime btn btn-default btn-sm\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n data-cy=\"c8y-alarms--realtime-button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\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 }\n </c8y-alarms-list>\n\n <c8y-sv-details\n emptyStateIcon=\"alarm\"\n [emptyStateTitle]=\"'No alarm selected' | translate\"\n [emptyStateSubtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n (backClick)=\"handleBackClick()\"\n >\n <router-outlet></router-outlet>\n </c8y-sv-details>\n</c8y-sv>\n", dependencies: [{ kind: "component", type: SplitViewComponent, selector: "c8y-sv", inputs: ["showDefaultRouterOutlet", "isResizable", "initialSelection", "resizableBreakpoint", "resizableConfig"], outputs: ["selectionChange"] }, { kind: "component", type: SplitViewDetailsComponent, selector: "c8y-sv-details", inputs: ["title", "ariaLabel", "cssClass", "emptyStateIcon", "emptyStateTitle", "emptyStateSubtitle"], outputs: ["backClick"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: AlarmsFilterComponent, selector: "c8y-alarms-filter", inputs: ["contextSourceId"], outputs: ["onFilterApplied"] }, { kind: "component", type: AlarmsDateFilterComponent, selector: "c8y-alarms-date-filter", inputs: ["DEFAULT_INTERVAL", "updateQueryParams", "date"], outputs: ["dateFilterChange"] }, { kind: "component", type: AlarmsTypeFilterComponent, selector: "c8y-alarms-type-filter", inputs: ["alarms", "possibleFilters", "activeFilters"], outputs: ["onFilterChanged"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AlarmsListComponent, selector: "c8y-alarms-list", inputs: ["alarms", "hasPermissions", "typeFilters", "loadMoreMode", "navigationOptions", "isInitialLoading", "isInPreviewMode"], outputs: ["onSelectedAlarm", "onScrollingStateChange"] }, { kind: "component", type: AlarmsIntervalRefreshComponent, selector: "c8y-alarms-interval-refresh", inputs: ["isDisabled", "alarmsListLoading$", "isIntervalToggleEnabled"], outputs: ["onCountdownEnded"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2486
2643
  }
2487
2644
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlarmsComponent, decorators: [{
2488
2645
  type: Component,
2489
2646
  args: [{ selector: 'c8y-alarms', providers: [AlarmWithChildrenRealtimeService, AlarmsActivityTrackerService], imports: [
2490
- NgIf,
2647
+ SplitViewComponent,
2648
+ SplitViewDetailsComponent,
2491
2649
  TitleComponent,
2650
+ HelpComponent,
2492
2651
  ActionBarItemComponent,
2493
2652
  AlarmsFilterComponent,
2494
2653
  AlarmsDateFilterComponent,
@@ -2496,14 +2655,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2496
2655
  IconDirective,
2497
2656
  TooltipDirective,
2498
2657
  NgClass,
2499
- HelpComponent,
2500
2658
  AlarmsListComponent,
2501
2659
  AlarmsIntervalRefreshComponent,
2502
- RouterOutlet,
2503
2660
  C8yTranslatePipe,
2504
- AsyncPipe
2505
- ], template: "<ng-container *ngIf=\"(activatedRoute.data | async)?.title\">\n <c8y-title>{{ TITLE | translate }}</c8y-title>\n</ng-container>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-filter\n class=\"d-block fit-w\"\n [contextSourceId]=\"contextSourceId\"\n (onFilterApplied)=\"applyFormFilters($event)\"\n ></c8y-alarms-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-date-filter (dateFilterChange)=\"applyFormFilters($event)\"></c8y-alarms-date-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-alarms-type-filter\n class=\"d-block fit-w\"\n [alarms]=\"alarms$ | async\"\n (onFilterChanged)=\"applyTypeFilters($event)\"\n ></c8y-alarms-type-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"0\"\n>\n <button\n class=\"btn btn-link\"\n [title]=\"'Clear all alarms' | translate\"\n type=\"button\"\n (click)=\"clearAll()\"\n data-cy=\"c8y-alarms-view--clear-all-button\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear all`alarms`' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<!--Realtime button-->\n<ng-template #realtimeRefresh>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n (isRealtimeActive | async)\n ? (NEW_REALTIME_ALARM_MESSAGE | translate)\n : (REFRESH_LABEL | translate)\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading$ | async\"\n (click)=\"refresh()\"\n >\n <span\n class=\"tag tag--info m-r-8\"\n *ngIf=\"isRealtimeActive | async\"\n >\n {{ 'New alarms' | translate }}\n </span>\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading$ | async }\"\n ></i>\n </button>\n <button\n class=\"c8y-realtime btn btn-default btn-sm\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n data-cy=\"c8y-alarms--realtime-button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\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</ng-template>\n\n<c8y-help\n src=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n></c8y-help>\n\n<div class=\"card content-fullpage split-view--5-7 grid__row--1\">\n <c8y-alarms-list\n class=\"d-contents\"\n [isInitialLoading]=\"isLoading$ | async\"\n [alarms]=\"alarms$ | async\"\n [typeFilters]=\"typeFilters\"\n (onScrollingStateChange)=\"changeInterval(!$event); isListScrolled.set($event)\"\n (onSelectedAlarm)=\"changeInterval(false)\"\n [splitView]=\"true\"\n [hasPermissions]=\"!isDisabled\"\n >\n <ng-container *ngIf=\"isIntervalRefresh; else realtimeRefresh\">\n <c8y-alarms-interval-refresh\n [alarmsListLoading$]=\"isLoading$\"\n [isIntervalToggleEnabled]=\"shouldShowIntervalToggle$ | async\"\n (onCountdownEnded)=\"refresh()\"\n [isDisabled]=\"isDisabled\"\n ></c8y-alarms-interval-refresh>\n </ng-container>\n </c8y-alarms-list>\n\n <router-outlet class=\"d-contents\"></router-outlet>\n</div>\n" }]
2506
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: AlarmsViewService }, { type: i3.AlarmWithChildrenRealtimeService }, { type: i3.AlertService }, { type: i3.ContextRouteService }, { type: i3.ModalService }, { type: i1$1.TranslateService }, { type: i1.Router }, { type: i3.GainsightService }, { type: AlarmsActivityTrackerService }], propDecorators: { alarmIntervalRefreshComponent: [{
2661
+ AsyncPipe,
2662
+ RouterOutlet
2663
+ ], template: "<c8y-title>{{ TITLE | translate }}</c8y-title>\n<c8y-help\n src=\"/docs/device-management-application/monitoring-and-controlling-devices/#working-with-alarms\"\n></c8y-help>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-filter\n class=\"d-block fit-w\"\n [contextSourceId]=\"contextSourceId\"\n (onFilterApplied)=\"applyFormFilters($event)\"\n ></c8y-alarms-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form min-width-fit\"\n>\n <c8y-alarms-date-filter (dateFilterChange)=\"applyFormFilters($event)\"></c8y-alarms-date-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-alarms-type-filter\n class=\"d-block fit-w\"\n [alarms]=\"alarms$ | async\"\n (onFilterChanged)=\"applyTypeFilters($event)\"\n ></c8y-alarms-type-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"0\"\n>\n <button\n class=\"btn btn-link\"\n [title]=\"'Clear all alarms' | translate\"\n type=\"button\"\n (click)=\"clearAll()\"\n data-cy=\"c8y-alarms-view--clear-all-button\"\n >\n <i c8yIcon=\"c8y-alert-idle\"></i>\n {{ 'Clear all`alarms`' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-sv [resizableConfig]=\"{ trackId: 'alarms-split-view', collapsible: false }\">\n <c8y-alarms-list\n [isInitialLoading]=\"isLoading$ | async\"\n [alarms]=\"alarms$ | async\"\n [typeFilters]=\"typeFilters\"\n (onScrollingStateChange)=\"changeInterval(!$event); isListScrolled.set($event)\"\n (onSelectedAlarm)=\"changeInterval(false)\"\n [hasPermissions]=\"!isDisabled\"\n >\n @if (isIntervalRefresh) {\n <c8y-alarms-interval-refresh\n [alarmsListLoading$]=\"isLoading$\"\n [isIntervalToggleEnabled]=\"shouldShowIntervalToggle$ | async\"\n (onCountdownEnded)=\"refresh()\"\n [isDisabled]=\"isDisabled\"\n ></c8y-alarms-interval-refresh>\n } @else {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"\n (isRealtimeActive | async)\n ? (NEW_REALTIME_ALARM_MESSAGE | translate)\n : (REFRESH_LABEL | translate)\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading$ | async\"\n (click)=\"refresh()\"\n >\n @if (isRealtimeActive | async) {\n <span class=\"tag tag--info m-r-8\">\n {{ 'New alarms' | translate }}\n </span>\n }\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': isLoading$ | async }\"\n ></i>\n </button>\n <button\n class=\"c8y-realtime btn btn-default btn-sm\"\n [attr.aria-label]=\"realtimeIconTitle\"\n [tooltip]=\"realtimeIconTitle\"\n placement=\"bottom\"\n type=\"button\"\n data-cy=\"c8y-alarms--realtime-button\"\n [container]=\"'body'\"\n (click)=\"toggleRealtimeState()\"\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 }\n </c8y-alarms-list>\n\n <c8y-sv-details\n emptyStateIcon=\"alarm\"\n [emptyStateTitle]=\"'No alarm selected' | translate\"\n [emptyStateSubtitle]=\"'Select an alarm from the list to view its details.' | translate\"\n (backClick)=\"handleBackClick()\"\n >\n <router-outlet></router-outlet>\n </c8y-sv-details>\n</c8y-sv>\n" }]
2664
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: AlarmsViewService }, { type: i3.AlarmWithChildrenRealtimeService }, { type: i3.AlertService }, { type: i3.ContextRouteService }, { type: i3.ModalService }, { type: i1$1.TranslateService }, { type: i3.GainsightService }, { type: AlarmsActivityTrackerService }], propDecorators: { alarmIntervalRefreshComponent: [{
2507
2665
  type: ViewChild,
2508
2666
  args: [AlarmsIntervalRefreshComponent]
2509
2667
  }], visibilityChange: [{
@@ -2525,8 +2683,10 @@ function getChildrenForViewContext(context) {
2525
2683
  return [
2526
2684
  {
2527
2685
  path: '',
2528
- component: AlarmEmptyComponent,
2529
- label: gettext('Alarms')
2686
+ // No component for empty path - router-outlet won't activate
2687
+ // This allows details panel to slide out on mobile, showing the list
2688
+ // On desktop, split-view-details will show its custom empty state
2689
+ children: []
2530
2690
  },
2531
2691
  {
2532
2692
  path: ':id',