@c8y/ngx-components 1023.9.0 → 1023.12.0

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 (42) hide show
  1. package/branding/plain-branding-editor/index.d.ts +2 -1
  2. package/branding/plain-branding-editor/index.d.ts.map +1 -1
  3. package/branding/plain-branding-editor/lazy/index.d.ts +4 -0
  4. package/branding/plain-branding-editor/lazy/index.d.ts.map +1 -1
  5. package/branding/shared/data/index.d.ts +15 -10
  6. package/branding/shared/data/index.d.ts.map +1 -1
  7. package/context-dashboard/index.d.ts +11 -2
  8. package/context-dashboard/index.d.ts.map +1 -1
  9. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +21 -5
  10. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +11 -1
  12. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +17 -5
  15. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  16. package/fesm2022/c8y-ngx-components-global-context.mjs +1090 -38
  17. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  18. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs +3 -4
  19. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +86 -99
  21. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components.mjs +22 -26
  23. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  24. package/global-context/index.d.ts +180 -4
  25. package/global-context/index.d.ts.map +1 -1
  26. package/index.d.ts +44 -0
  27. package/index.d.ts.map +1 -1
  28. package/locales/de.po +41 -32
  29. package/locales/es.po +41 -32
  30. package/locales/fr.po +41 -32
  31. package/locales/ja_JP.po +41 -32
  32. package/locales/ko.po +41 -32
  33. package/locales/nl.po +41 -32
  34. package/locales/pl.po +41 -32
  35. package/locales/pt_BR.po +41 -32
  36. package/locales/zh_CN.po +41 -32
  37. package/locales/zh_TW.po +41 -32
  38. package/package.json +1 -1
  39. package/widgets/definitions/alarms/alarm-list/index.d.ts +1 -2
  40. package/widgets/definitions/alarms/alarm-list/index.d.ts.map +1 -1
  41. package/widgets/implementations/alarms/index.d.ts +35 -28
  42. package/widgets/implementations/alarms/index.d.ts.map +1 -1
@@ -1,28 +1,28 @@
1
1
  import { gettext } from '@c8y/ngx-components/gettext';
2
2
  import { aggregationType } from '@c8y/client';
3
3
  import * as i0 from '@angular/core';
4
- import { computed, signal, Injectable, inject, input, forwardRef, ChangeDetectionStrategy, Component, DestroyRef, output, Input, ViewChild, EventEmitter, viewChild, effect, ChangeDetectorRef, Output, TemplateRef, untracked, ContentChild, NgModule } from '@angular/core';
4
+ import { computed, signal, Injectable, inject, input, forwardRef, ChangeDetectionStrategy, Component, DestroyRef, output, Input, ChangeDetectorRef, ViewChild, EventEmitter, viewChild, effect, HostListener, Output, TemplateRef, untracked, ContentChild, NgModule } from '@angular/core';
5
5
  import * as i4 from '@c8y/ngx-components';
6
6
  import { ViewContext, I18nModule, IconDirective, FormGroupComponent, MessagesComponent, MessageDirective, DateTimePickerModule, C8yTranslatePipe, DatePipe, TabsOutletComponent, FormsModule as FormsModule$1, CountdownIntervalModule, CountdownIntervalComponent, AlertService, ContextRouteService, DashboardChildComponent, hookActionBar } from '@c8y/ngx-components';
7
- import { BehaviorSubject, map, distinctUntilChanged, shareReplay, fromEvent, filter, debounceTime, startWith, tap as tap$1, firstValueFrom, combineLatest, Subject, take, skip, throttleTime } from 'rxjs';
8
- import * as i1$1 from '@angular/forms';
7
+ import { BehaviorSubject, map, distinctUntilChanged, shareReplay, fromEvent, filter, debounceTime, startWith, tap as tap$1, firstValueFrom, combineLatest, Subject, take, skip, throttleTime, merge as merge$1, EMPTY } from 'rxjs';
8
+ import * as i1 from '@angular/forms';
9
9
  import { FormBuilder, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormControl } from '@angular/forms';
10
10
  import { pick, omit, isObject, isEqual, transform, some, cloneDeep, merge, isEmpty } from 'lodash-es';
11
11
  import { ActivatedRoute, Router, NavigationStart, NavigationEnd, ActivationEnd } from '@angular/router';
12
- import * as i1$2 from '@angular/common';
12
+ import * as i1$1 from '@angular/common';
13
13
  import { NgClass, CommonModule, AsyncPipe, TitleCasePipe, Location, NgTemplateOutlet } from '@angular/common';
14
14
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
15
  import { ContextDashboardStateService } from '@c8y/ngx-components/context-dashboard-state';
16
- import * as i1 from 'ngx-bootstrap/tooltip';
16
+ import * as i2 from 'ngx-bootstrap/tooltip';
17
17
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
18
- import * as i1$3 from 'ngx-bootstrap/collapse';
18
+ import * as i1$2 from 'ngx-bootstrap/collapse';
19
19
  import { CollapseModule } from 'ngx-bootstrap/collapse';
20
- import * as i2$1 from 'ngx-bootstrap/popover';
20
+ import * as i2$2 from 'ngx-bootstrap/popover';
21
21
  import { PopoverModule } from 'ngx-bootstrap/popover';
22
- import * as i2 from 'ngx-bootstrap/dropdown';
22
+ import * as i2$1 from 'ngx-bootstrap/dropdown';
23
23
  import { BsDropdownModule, BsDropdownDirective } from 'ngx-bootstrap/dropdown';
24
24
  import { A11yModule } from '@angular/cdk/a11y';
25
- import { withLatestFrom, filter as filter$1, tap, distinctUntilChanged as distinctUntilChanged$1, map as map$1 } from 'rxjs/operators';
25
+ import { withLatestFrom, filter as filter$1, tap, distinctUntilChanged as distinctUntilChanged$1, map as map$1, catchError } from 'rxjs/operators';
26
26
  import { TranslateService } from '@ngx-translate/core';
27
27
 
28
28
  const GLOBAL_CONTEXT_EVENTS = {
@@ -62,7 +62,6 @@ const REFRESH_OPTION = {
62
62
  LIVE: 'live',
63
63
  HISTORY: 'history'
64
64
  };
65
- const DEFAULT_INTERVAL_VALUES = [5_000, 10_000, 15_000, 30_000, 60_000];
66
65
 
67
66
  const todayDate = new Date();
68
67
  const TIME_SPAN_MS = {
@@ -2874,7 +2873,7 @@ class AggregationPickerComponent {
2874
2873
  useExisting: forwardRef(() => AggregationPickerComponent),
2875
2874
  multi: true
2876
2875
  }
2877
- ], ngImport: i0, template: "@if (layout() === 'dropdown') {\n <div\n class=\"dropdown\"\n style=\"border: 0; margin-left: -1px\"\n container=\"body\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [attr.data-cy]=\"'global-context--aggregation-picker'\"\n [insideClick]=\"true\"\n [isDisabled]=\"disabled()\"\n >\n <button\n class=\"dropdown-toggle form-control p-t-0 p-b-0 l-h-1 d-flex a-i-center\"\n [attr.aria-label]=\"currentText() | translate\"\n tooltip=\"{{ (disabled() ? AGGREGATION_TEXTS.disabled : currentText()) | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"dropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'global-context--aggregation-picker-' + value()\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"currentIcon()\"\n ></i>\n <span class=\"caret m-r-8 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu-right--xs\"\n role=\"listbox\"\n *dropdownMenu\n >\n @for (aggregation of AGGREGATIONS; track aggregation.id || $index) {\n @let isDisabled = aggregation.id ? disabledAggregations()[aggregation.id] : false;\n <li\n [class.active]=\"aggregation.id === value()\"\n [class.disabled]=\"isDisabled\"\n >\n <button\n class=\"\"\n [attr.aria-selected]=\"aggregation.id === value()\"\n role=\"option\"\n (click)=\"selectAggregation(aggregation.id); dropdown.isOpen = false\"\n [disabled]=\"isDisabled\"\n [attr.data-cy]=\"'global-context--aggregation-picker-input-' + aggregation.id\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n aggregation.id ? AGGREGATION_ICONS[aggregation.id] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n <span>{{ aggregation.title | translate }}</span>\n </button>\n </li>\n }\n </ul>\n </div>\n}\n\n@if (layout() === 'radio') {\n <div\n class=\"radio-group d-flex-md a-i-center gap-16\"\n [attr.aria-label]=\"'Aggregation options' | translate\"\n role=\"radiogroup\"\n >\n @for (aggregation of AGGREGATIONS; track aggregation.id || $index) {\n @let isDisabled = aggregation.id ? disabledAggregations()[aggregation.id] : false;\n <label\n class=\"c8y-radio\"\n [attr.data-cy]=\"'global-context--aggregation-picker-input-' + aggregation.id\"\n >\n <input\n name=\"aggregation\"\n role=\"radio\"\n type=\"radio\"\n [value]=\"aggregation.id\"\n [checked]=\"aggregation.id === value()\"\n [disabled]=\"isDisabled\"\n (change)=\"selectAggregation(aggregation.id)\"\n />\n <span></span>\n <i\n class=\"icon-16 m-l-4\"\n [c8yIcon]=\"\n aggregation.id ? AGGREGATION_ICONS[aggregation.id] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n <span>{{ aggregation.title | translate }}</span>\n </label>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: I18nModule }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i4.C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2876
+ ], ngImport: i0, template: "@if (layout() === 'dropdown') {\n <div\n class=\"dropdown\"\n style=\"border: 0; margin-left: -1px\"\n container=\"body\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [attr.data-cy]=\"'global-context--aggregation-picker'\"\n [insideClick]=\"true\"\n [isDisabled]=\"disabled()\"\n >\n <button\n class=\"dropdown-toggle form-control p-t-0 p-b-0 l-h-1 d-flex a-i-center\"\n [attr.aria-label]=\"currentText() | translate\"\n tooltip=\"{{ (disabled() ? AGGREGATION_TEXTS.disabled : currentText()) | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"dropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'global-context--aggregation-picker-' + value()\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"currentIcon()\"\n ></i>\n <span class=\"caret m-r-8 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu-right--xs\"\n role=\"listbox\"\n *dropdownMenu\n >\n @for (aggregation of AGGREGATIONS; track aggregation.id || $index) {\n @let isDisabled = aggregation.id ? disabledAggregations()[aggregation.id] : false;\n <li\n [class.active]=\"aggregation.id === value()\"\n [class.disabled]=\"isDisabled\"\n >\n <button\n class=\"\"\n [attr.aria-selected]=\"aggregation.id === value()\"\n role=\"option\"\n (click)=\"selectAggregation(aggregation.id); dropdown.isOpen = false\"\n [disabled]=\"isDisabled\"\n [attr.data-cy]=\"'global-context--aggregation-picker-input-' + aggregation.id\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n aggregation.id ? AGGREGATION_ICONS[aggregation.id] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n <span>{{ aggregation.title | translate }}</span>\n </button>\n </li>\n }\n </ul>\n </div>\n}\n\n@if (layout() === 'radio') {\n <div\n class=\"radio-group d-flex-md a-i-center gap-16\"\n [attr.aria-label]=\"'Aggregation options' | translate\"\n role=\"radiogroup\"\n >\n @for (aggregation of AGGREGATIONS; track aggregation.id || $index) {\n @let isDisabled = aggregation.id ? disabledAggregations()[aggregation.id] : false;\n <label\n class=\"c8y-radio\"\n [attr.data-cy]=\"'global-context--aggregation-picker-input-' + aggregation.id\"\n >\n <input\n name=\"aggregation\"\n role=\"radio\"\n type=\"radio\"\n [value]=\"aggregation.id\"\n [checked]=\"aggregation.id === value()\"\n [disabled]=\"isDisabled\"\n (change)=\"selectAggregation(aggregation.id)\"\n />\n <span></span>\n <i\n class=\"icon-16 m-l-4\"\n [c8yIcon]=\"\n aggregation.id ? AGGREGATION_ICONS[aggregation.id] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n <span>{{ aggregation.title | translate }}</span>\n </label>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i2$1.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$1.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$1.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: I18nModule }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i4.C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2878
2877
  }
2879
2878
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AggregationPickerComponent, decorators: [{
2880
2879
  type: Component,
@@ -3098,7 +3097,7 @@ class HistoryModeConfigurationControlsComponent {
3098
3097
  };
3099
3098
  }
3100
3099
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HistoryModeConfigurationControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3101
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HistoryModeConfigurationControlsComponent, isStandalone: true, selector: "c8y-history-mode-configuration-controls", inputs: { settings: "settings", context: "context" }, outputs: { contextChange: "contextChange", validationStatus: "validationStatus" }, ngImport: i0, template: "@if (currentForm) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AGGREGATION = settings.showAggregation;\n\n <form [formGroup]=\"currentForm\">\n <div class=\"content-flex-100\">\n <div\n class=\"col-4\"\n [ngClass]=\"{ 'm-b-8': !SHOW_AGGREGATION }\"\n >\n @if (SHOW_TIME_CONTEXT) {\n @let dateTimeContext = currentForm.get('dateTimeContext');\n @let tempDateFromValue = dateTimeContext.get('dateFrom')?.value;\n @let tempDateToValue = dateTimeContext.get('dateTo')?.value;\n @let fromErrors = dateFromErrors();\n @let toErrors = dateToErrors();\n\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item time-context m-r-4\">\n <i\n class=\"\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n </div>\n {{ 'Date & time range' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"TIME_RANGE_PICKER_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"content-flex-58 d-flex a-i-center m-b-0 p-t-16\">\n <c8y-form-group\n [class.has-error]=\"fromErrors\"\n class=\"form-group-sm d-flex a-i-center col-6 flex-wrap\"\n >\n <label\n class=\"m-b-sm-0 m-r-8 text-nowrap\"\n style=\"min-width: 30px\"\n [title]=\"'From`date`' | translate\"\n for=\"dateFrom\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"fromErrors\"\n id=\"dateFrom\"\n [maxDate]=\"tempDateToValue\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"dateTimeContext.get('dateFrom')\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"fromErrors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [class.has-error]=\"toErrors\"\n class=\"form-group-sm d-flex flex-wrap col-6 a-i-center\"\n >\n <label\n class=\"m-b-sm-0 text-nowrap m-r-8\"\n style=\"min-width: 30px\"\n [title]=\"'To`date`' | translate\"\n for=\"dateTo\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"toErrors\"\n id=\"dateTo\"\n [minDate]=\"tempDateFromValue\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"dateTimeContext.get('dateTo')\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"toErrors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n <div class=\"col-\">\n @if (SHOW_AGGREGATION) {\n @let selectedAggregation = currentForm.get('aggregation')?.value;\n\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item aggregation m-r-4\">\n <i [c8yIcon]=\"'input'\"></i>\n </div>\n {{ 'Aggregation' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"AGGREGATION_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"p-t-16 p-b-16 m-b-4\">\n <c8y-aggregation-picker\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n [disabledAggregations]=\"disabledAggregations()\"\n [layout]=\"'radio'\"\n ></c8y-aggregation-picker>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: I18nModule }, { kind: "directive", type: i4.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$1.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: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i4.DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HistoryModeConfigurationControlsComponent, isStandalone: true, selector: "c8y-history-mode-configuration-controls", inputs: { settings: "settings", context: "context" }, outputs: { contextChange: "contextChange", validationStatus: "validationStatus" }, ngImport: i0, template: "@if (currentForm) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AGGREGATION = settings.showAggregation;\n\n <form [formGroup]=\"currentForm\">\n <div class=\"content-flex-100\">\n <div\n class=\"col-4\"\n [ngClass]=\"{ 'm-b-8': !SHOW_AGGREGATION }\"\n >\n @if (SHOW_TIME_CONTEXT) {\n @let dateTimeContext = currentForm.get('dateTimeContext');\n @let tempDateFromValue = dateTimeContext.get('dateFrom')?.value;\n @let tempDateToValue = dateTimeContext.get('dateTo')?.value;\n @let fromErrors = dateFromErrors();\n @let toErrors = dateToErrors();\n\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item time-context m-r-4\">\n <i\n class=\"\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n </div>\n {{ 'Date & time range' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"TIME_RANGE_PICKER_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"content-flex-58 d-flex a-i-center m-b-0 p-t-16\">\n <c8y-form-group\n [class.has-error]=\"fromErrors\"\n class=\"form-group-sm d-flex a-i-center col-6 flex-wrap\"\n >\n <label\n class=\"m-b-sm-0 m-r-8 text-nowrap\"\n style=\"min-width: 30px\"\n [title]=\"'From`date`' | translate\"\n for=\"dateFrom\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"fromErrors\"\n id=\"dateFrom\"\n [maxDate]=\"tempDateToValue\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"dateTimeContext.get('dateFrom')\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"fromErrors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [class.has-error]=\"toErrors\"\n class=\"form-group-sm d-flex flex-wrap col-6 a-i-center\"\n >\n <label\n class=\"m-b-sm-0 text-nowrap m-r-8\"\n style=\"min-width: 30px\"\n [title]=\"'To`date`' | translate\"\n for=\"dateTo\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"toErrors\"\n id=\"dateTo\"\n [minDate]=\"tempDateFromValue\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"dateTimeContext.get('dateTo')\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"toErrors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n <div class=\"col-\">\n @if (SHOW_AGGREGATION) {\n @let selectedAggregation = currentForm.get('aggregation')?.value;\n\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item aggregation m-r-4\">\n <i [c8yIcon]=\"'input'\"></i>\n </div>\n {{ 'Aggregation' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"AGGREGATION_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"p-t-16 p-b-16 m-b-4\">\n <c8y-aggregation-picker\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n [disabledAggregations]=\"disabledAggregations()\"\n [layout]=\"'radio'\"\n ></c8y-aggregation-picker>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: I18nModule }, { kind: "directive", type: i4.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.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: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i4.DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3102
3101
  }
3103
3102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HistoryModeConfigurationControlsComponent, decorators: [{
3104
3103
  type: Component,
@@ -3164,7 +3163,7 @@ class IntervalPickerComponent {
3164
3163
  useExisting: forwardRef(() => IntervalPickerComponent),
3165
3164
  multi: true
3166
3165
  }
3167
- ], ngImport: i0, template: "@for (interval of INTERVALS; track interval.id) {\n @let isSelected = interval.id === value;\n @let checkVisibility = isSelected ? 'visible' : 'hidden';\n @let isIntervalDisabled = shouldDisableInterval?.isDisabled;\n @let isIntervalDisabledMsg = shouldDisableInterval?.msg;\n @let isCustom = interval.id === 'custom';\n\n <li [class.active]=\"isSelected\">\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"mr-2\"\n type=\"button\"\n [attr.data-cy]=\"'global-context--interval-' + interval.id\"\n (click)=\"onIntervalSelect(interval.id)\"\n [disabled]=\"isCustom && isIntervalDisabled\"\n >\n <span [class.text-primary]=\"isSelected\">\n <span\n [c8yIcon]=\"'check'\"\n [style.visibility]=\"checkVisibility\"\n ></span>\n {{ interval.title | translate }}\n </span>\n </button>\n </div>\n </li>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3166
+ ], ngImport: i0, template: "@for (interval of INTERVALS; track interval.id) {\n @let isSelected = interval.id === value;\n @let checkVisibility = isSelected ? 'visible' : 'hidden';\n @let isIntervalDisabled = shouldDisableInterval?.isDisabled;\n @let isIntervalDisabledMsg = shouldDisableInterval?.msg;\n @let isCustom = interval.id === 'custom';\n\n <li [class.active]=\"isSelected\">\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"mr-2\"\n type=\"button\"\n [attr.data-cy]=\"'global-context--interval-' + interval.id\"\n (click)=\"onIntervalSelect(interval.id)\"\n [disabled]=\"isCustom && isIntervalDisabled\"\n >\n <span [class.text-primary]=\"isSelected\">\n <span\n [c8yIcon]=\"'check'\"\n [style.visibility]=\"checkVisibility\"\n ></span>\n {{ interval.title | translate }}\n </span>\n </button>\n </div>\n </li>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3168
3167
  }
3169
3168
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IntervalPickerComponent, decorators: [{
3170
3169
  type: Component,
@@ -3202,6 +3201,7 @@ class DateTimeContextPickerComponent {
3202
3201
  this.formBuilder = inject(FormBuilder);
3203
3202
  this.destroyRef = inject(DestroyRef);
3204
3203
  this.datePipe = inject(DatePipe);
3204
+ this.cdr = inject(ChangeDetectorRef);
3205
3205
  this.INTERVALS = INTERVAL_TITLES;
3206
3206
  this.DATE_FORMAT = 'medium';
3207
3207
  this.TIME_INTERVAL = TIME_INTERVAL;
@@ -3245,6 +3245,7 @@ class DateTimeContextPickerComponent {
3245
3245
  this.canEmit.set(true);
3246
3246
  this.customSnapshot.set(null);
3247
3247
  }
3248
+ this.cdr.markForCheck();
3248
3249
  }
3249
3250
  }
3250
3251
  registerOnChange(fn) {
@@ -3453,7 +3454,7 @@ class DateTimeContextPickerComponent {
3453
3454
  useExisting: forwardRef(() => DateTimeContextPickerComponent),
3454
3455
  multi: true
3455
3456
  }
3456
- ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "@if (form) {\n @let intervalValue = form.get('interval')?.value;\n @let isIntervalNone = intervalValue === 'none';\n @let dateFromControl = form.get('dateFrom');\n @let dateToControl = form.get('dateTo');\n @let dateRangeLabel = getDateRangeLabel();\n\n <form [formGroup]=\"form\">\n <div\n class=\"dropdown max-width-100\"\n container=\"body\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n [isDisabled]=\"disabled\"\n (onShown)=\"onShownDropdown()\"\n (onHidden)=\"onHiddenDropdown()\"\n >\n <!-- Dropdown toggle button with better accessibility -->\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n [attr.aria-label]=\"dateRangeLabel\"\n [tooltip]=\"dateRangeLabel\"\n placement=\"top\"\n container=\"body\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n data-cy=\"c8y-date-time-context-picker--picker-toggle\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'schedule1'\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"d-col text-left flex-grow min-width-0\">\n @if (isIntervalNone) {\n <span class=\"text-10 text-muted l-h-1\">\n {{ 'No date filter' | translate }}\n </span>\n } @else {\n <span\n class=\"text-10 text-muted l-h-1\"\n data-cy=\"c8y-date-time-context-picker--picker-label\"\n >\n {{ INTERVALS[intervalValue] | translate }}\n </span>\n <span\n class=\"text-12 l-h-1 text-medium text-truncate\"\n data-cy=\"c8y-date-time-context-picker--picker-time-range\"\n >\n {{ form.get('dateFrom')?.value | c8yDate: DATE_FORMAT }} \u2014\n {{ form.get('dateTo')?.value | c8yDate: DATE_FORMAT }}\n </span>\n }\n </div>\n <span\n class=\"caret m-r-16 m-l-4\"\n aria-hidden=\"true\"\n ></span>\n </button>\n\n <!-- Dropdown menu -->\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n role=\"menu\"\n *dropdownMenu\n >\n @if (dropdown.isOpen) {\n <!-- Interval picker section -->\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"interval\"\n [shouldDisableInterval]=\"shouldDisableInterval\"\n ></c8y-interval-picker>\n\n <!-- Custom date range section -->\n @if (isCustomMode() && (config?.showDateFrom || config?.showDateTo)) {\n <div class=\"p-l-16 p-r-16\">\n @if (config?.showDateFrom) {\n <c8y-form-group [class.has-error]=\"getDateFromErrors()\">\n <label\n [title]=\"'From`date`' | translate\"\n for=\"dateFrom\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"getDateFromErrors()\"\n id=\"dateFrom\"\n [maxDate]=\"tempDateToControl?.value\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"tempDateFromControl\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"getDateFromErrors()\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"bsDate\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n }\n\n @if (config?.showDateTo) {\n <c8y-form-group [class.has-error]=\"getDateToErrors()\">\n <label\n [title]=\"'To`date`' | translate\"\n for=\"dateTo\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"getDateToErrors()\"\n id=\"dateTo\"\n [minDate]=\"tempDateFromControl?.value\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"tempDateToControl\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"getDateToErrors()\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"bsDate\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n }\n </div>\n\n <!-- Action buttons -->\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset()\"\n translate\n >\n Reset\n </button>\n\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateTimeContext()\"\n [disabled]=\"isApplyDisabled()\"\n translate\n >\n Apply\n </button>\n </div>\n }\n }\n </ul>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: I18nModule }, { kind: "directive", type: i4.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS", "shouldDisableInterval"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i4.DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "pipe", type: i4.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3457
+ ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "@if (form) {\n @let intervalValue = form.get('interval')?.value;\n @let isIntervalNone = intervalValue === 'none';\n @let dateFromControl = form.get('dateFrom');\n @let dateToControl = form.get('dateTo');\n @let dateRangeLabel = getDateRangeLabel();\n\n <form [formGroup]=\"form\">\n <div\n class=\"dropdown max-width-100\"\n container=\"body\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n [isDisabled]=\"disabled\"\n (onShown)=\"onShownDropdown()\"\n (onHidden)=\"onHiddenDropdown()\"\n >\n <!-- Dropdown toggle button with better accessibility -->\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n [attr.aria-label]=\"dateRangeLabel\"\n [tooltip]=\"dateRangeLabel\"\n placement=\"top\"\n container=\"body\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n data-cy=\"c8y-date-time-context-picker--picker-toggle\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'schedule1'\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"d-col text-left flex-grow min-width-0\">\n @if (isIntervalNone) {\n <span class=\"text-10 text-muted l-h-1\">\n {{ 'No date filter' | translate }}\n </span>\n } @else {\n <span\n class=\"text-10 text-muted l-h-1\"\n data-cy=\"c8y-date-time-context-picker--picker-label\"\n >\n {{ INTERVALS[intervalValue] | translate }}\n </span>\n <span\n class=\"text-12 l-h-1 text-medium text-truncate\"\n data-cy=\"c8y-date-time-context-picker--picker-time-range\"\n >\n {{ form.get('dateFrom')?.value | c8yDate: DATE_FORMAT }} \u2014\n {{ form.get('dateTo')?.value | c8yDate: DATE_FORMAT }}\n </span>\n }\n </div>\n <span\n class=\"caret m-r-16 m-l-4\"\n aria-hidden=\"true\"\n ></span>\n </button>\n\n <!-- Dropdown menu -->\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n role=\"menu\"\n *dropdownMenu\n >\n @if (dropdown.isOpen) {\n <!-- Interval picker section -->\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"interval\"\n [shouldDisableInterval]=\"shouldDisableInterval\"\n ></c8y-interval-picker>\n\n <!-- Custom date range section -->\n @if (isCustomMode() && (config?.showDateFrom || config?.showDateTo)) {\n <div class=\"p-l-16 p-r-16\">\n @if (config?.showDateFrom) {\n <c8y-form-group [class.has-error]=\"getDateFromErrors()\">\n <label\n [title]=\"'From`date`' | translate\"\n for=\"dateFrom\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"getDateFromErrors()\"\n id=\"dateFrom\"\n [maxDate]=\"tempDateToControl?.value\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"tempDateFromControl\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"getDateFromErrors()\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"bsDate\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n }\n\n @if (config?.showDateTo) {\n <c8y-form-group [class.has-error]=\"getDateToErrors()\">\n <label\n [title]=\"'To`date`' | translate\"\n for=\"dateTo\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n [class.has-error]=\"getDateToErrors()\"\n id=\"dateTo\"\n [minDate]=\"tempDateFromControl?.value\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"tempDateToControl\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"getDateToErrors()\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"errorMessages.dateAfterRangeMax | translate\"\n ></c8y-message>\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"errorMessages.dateBeforeRangeMin | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"bsDate\"\n [text]=\"errorMessages.invalidDateTime | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateRange\"\n [text]=\"errorMessages.invalidDateRange | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n }\n </div>\n\n <!-- Action buttons -->\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset()\"\n translate\n >\n Reset\n </button>\n\n <button\n class=\"btn btn-primary btn-sm flex-grow\"\n title=\"{{ 'Apply' | translate }}\"\n type=\"button\"\n (click)=\"applyDateTimeContext()\"\n [disabled]=\"isApplyDisabled()\"\n translate\n >\n Apply\n </button>\n </div>\n }\n }\n </ul>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i2$1.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$1.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$1.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: I18nModule }, { kind: "directive", type: i4.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS", "shouldDisableInterval"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i4.DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "pipe", type: i4.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3457
3458
  }
3458
3459
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DateTimeContextPickerComponent, decorators: [{
3459
3460
  type: Component,
@@ -3560,7 +3561,7 @@ class LiveModeConfigurationControlsComponent {
3560
3561
  }, { emitEvent: false });
3561
3562
  }
3562
3563
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LiveModeConfigurationControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3563
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: LiveModeConfigurationControlsComponent, isStandalone: true, selector: "c8y-live-mode-configuration-controls", inputs: { settings: "settings", context: "context" }, outputs: { contextChange: "contextChange" }, ngImport: i0, template: "@if (form) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AUTO_REFRESH = settings.showAutoRefresh;\n\n <form [formGroup]=\"form\">\n <div class=\"content-flex-82\">\n <div class=\"col-5\">\n @if (SHOW_TIME_CONTEXT) {\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item time-context m-r-4\">\n <i [c8yIcon]=\"'calendar'\"></i>\n </div>\n {{ 'Date & time' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"TIME_RANGE_PICKER_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"m-b-4 p-t-16 p-b-16\">\n <c8y-date-time-context-picker\n formControlName=\"dateTimeContext\"\n [config]=\"{ showDateTo: false, showDateFrom: true }\"\n ></c8y-date-time-context-picker>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n <div class=\"col-3\">\n @if (SHOW_AUTO_REFRESH) {\n <fieldset class=\"c8y-fieldset\">\n <legend class=\"d-flex\">\n <div class=\"standalone btn-icon-dot__item auto-refresh m-r-4\">\n <i [c8yIcon]=\"'refresh'\"></i>\n </div>\n {{ 'Auto refresh' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"REFRESH_POPOVER_MESSAGE | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"m-b-8 form-group-sm p-t-16 p-b-16\">\n <div class=\"d-flex gap-8 a-i-center\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n #arInput\n formControlName=\"isAutoRefreshEnabled\"\n />\n <span></span>\n <span>\n {{ 'Auto refresh enabled' | translate }}\n </span>\n </label>\n </div>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$1.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: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3564
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: LiveModeConfigurationControlsComponent, isStandalone: true, selector: "c8y-live-mode-configuration-controls", inputs: { settings: "settings", context: "context" }, outputs: { contextChange: "contextChange" }, ngImport: i0, template: "@if (form) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AUTO_REFRESH = settings.showAutoRefresh;\n\n <form [formGroup]=\"form\">\n <div class=\"content-flex-82\">\n <div class=\"col-5\">\n @if (SHOW_TIME_CONTEXT) {\n <fieldset class=\"c8y-fieldset\">\n <legend>\n <div class=\"standalone btn-icon-dot__item time-context m-r-4\">\n <i [c8yIcon]=\"'calendar'\"></i>\n </div>\n {{ 'Date & time' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"TIME_RANGE_PICKER_POPOVER | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"m-b-4 p-t-16 p-b-16\">\n <c8y-date-time-context-picker\n formControlName=\"dateTimeContext\"\n [config]=\"{ showDateTo: false, showDateFrom: true }\"\n ></c8y-date-time-context-picker>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n <div class=\"col-3\">\n @if (SHOW_AUTO_REFRESH) {\n <fieldset class=\"c8y-fieldset\">\n <legend class=\"d-flex\">\n <div class=\"standalone btn-icon-dot__item auto-refresh m-r-4\">\n <i [c8yIcon]=\"'refresh'\"></i>\n </div>\n {{ 'Auto refresh' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"REFRESH_POPOVER_MESSAGE | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </legend>\n <c8y-form-group class=\"m-b-8 form-group-sm p-t-16 p-b-16\">\n <div class=\"d-flex gap-8 a-i-center\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n #arInput\n formControlName=\"isAutoRefreshEnabled\"\n />\n <span></span>\n <span>\n {{ 'Auto refresh enabled' | translate }}\n </span>\n </label>\n </div>\n </c8y-form-group>\n </fieldset>\n }\n </div>\n </div>\n </form>\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.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: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3564
3565
  }
3565
3566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LiveModeConfigurationControlsComponent, decorators: [{
3566
3567
  type: Component,
@@ -3993,7 +3994,7 @@ class ConfigurationCollapseComponent {
3993
3994
  this.hasPendingChanges.set(!isEqual(snapshot, latest));
3994
3995
  }
3995
3996
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigurationCollapseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3996
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ConfigurationCollapseComponent, isStandalone: true, selector: "c8y-configuration-collapse", inputs: { supportedModes: { classPropertyName: "supportedModes", publicName: "supportedModes", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { contextChange: "contextChange", refreshOptionChange: "refreshOptionChange", savePreferenceChange: "savePreferenceChange" }, host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div\n class=\"c8y-global-context\"\n [collapse]=\"isCollapsed()\"\n (collapsed)=\"onCollapsed()\"\n (expanded)=\"onExpanded()\"\n [isAnimated]=\"true\"\n>\n <div class=\"p-t-16 p-b-16 p-l-24 p-r-24 separator-bottom\">\n <span\n class=\"h4\"\n translate\n >\n Time mode\n </span>\n </div>\n <div>\n @if (!isCollapsed()) {\n <c8y-configuration-controls\n [activeMode]=\"activeMode()\"\n [liveContext]=\"liveViewContext()\"\n [historyContext]=\"historyViewContext()\"\n [supportedModes]=\"supportedModes()\"\n (refreshOptionChange)=\"onModeSelected($event)\"\n (contextChange)=\"onModeChange($event)\"\n (validationStatus)=\"onValidationStatusChange($event)\"\n ></c8y-configuration-controls>\n }\n </div>\n <div class=\"c8y-top-drawer--footer\">\n <div class=\"d-flex a-i-center gap-8\">\n <button\n class=\"btn btn-default\"\n [title]=\"'Close help' | translate\"\n aria-controls=\"collapseHelp\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n type=\"button\"\n (click)=\"toggle()\"\n translate\n >\n Close\n </button>\n <button\n class=\"btn btn-primary\"\n [title]=\"'Apply global context' | translate\"\n aria-controls=\"collapseHelp\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n type=\"button\"\n (click)=\"apply()\"\n [disabled]=\"!hasPendingChanges() || !isFormValid()\"\n translate\n data-cy=\"global-date-context--Apply-button\"\n >\n Apply\n </button>\n\n <label class=\"c8y-checkbox d-flex align-items-center m-b-0\">\n <input\n class=\"m-r-4\"\n type=\"checkbox\"\n [ngModel]=\"shouldSave()\"\n (ngModelChange)=\"shouldSaveInDashboard($event)\"\n />\n <span class=\"a-s-center m-r-8\"></span>\n <span\n class=\"text-truncate\"\n translate\n >\n Save in dashboard configuration\n </span>\n <button\n class=\"btn-help btn-help--sm m-l-4\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"helpText | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </label>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i1$3.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$1.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: ConfigurationControlsComponent, selector: "c8y-configuration-controls", inputs: ["controlsDisplayMode", "settings", "activeMode", "liveContext", "historyContext", "supportedModes", "tabsOutletName"], outputs: ["refreshOptionChange", "contextChange", "validationStatus"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3997
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ConfigurationCollapseComponent, isStandalone: true, selector: "c8y-configuration-collapse", inputs: { supportedModes: { classPropertyName: "supportedModes", publicName: "supportedModes", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { contextChange: "contextChange", refreshOptionChange: "refreshOptionChange", savePreferenceChange: "savePreferenceChange" }, host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div\n class=\"c8y-global-context\"\n [collapse]=\"isCollapsed()\"\n (collapsed)=\"onCollapsed()\"\n (expanded)=\"onExpanded()\"\n [isAnimated]=\"true\"\n>\n <div class=\"p-t-16 p-b-16 p-l-24 p-r-24 separator-bottom\">\n <span\n class=\"h4\"\n translate\n >\n Time mode\n </span>\n </div>\n <div>\n @if (!isCollapsed()) {\n <c8y-configuration-controls\n [activeMode]=\"activeMode()\"\n [liveContext]=\"liveViewContext()\"\n [historyContext]=\"historyViewContext()\"\n [supportedModes]=\"supportedModes()\"\n (refreshOptionChange)=\"onModeSelected($event)\"\n (contextChange)=\"onModeChange($event)\"\n (validationStatus)=\"onValidationStatusChange($event)\"\n ></c8y-configuration-controls>\n }\n </div>\n <div class=\"c8y-top-drawer--footer\">\n <div class=\"d-flex a-i-center gap-8\">\n <button\n class=\"btn btn-default\"\n [title]=\"'Close help' | translate\"\n aria-controls=\"collapseHelp\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n type=\"button\"\n (click)=\"toggle()\"\n translate\n >\n Close\n </button>\n <button\n class=\"btn btn-primary\"\n [title]=\"'Apply global context' | translate\"\n aria-controls=\"collapseHelp\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n type=\"button\"\n (click)=\"apply()\"\n [disabled]=\"!hasPendingChanges() || !isFormValid()\"\n translate\n data-cy=\"global-date-context--Apply-button\"\n >\n Apply\n </button>\n\n <label class=\"c8y-checkbox d-flex align-items-center m-b-0\">\n <input\n class=\"m-r-4\"\n type=\"checkbox\"\n [ngModel]=\"shouldSave()\"\n (ngModelChange)=\"shouldSaveInDashboard($event)\"\n />\n <span class=\"a-s-center m-r-8\"></span>\n <span\n class=\"text-truncate\"\n translate\n >\n Save in dashboard configuration\n </span>\n <button\n class=\"btn-help btn-help--sm m-l-4\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"helpText | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n [adaptivePosition]=\"true\"\n ></button>\n </label>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i1$2.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.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: ConfigurationControlsComponent, selector: "c8y-configuration-controls", inputs: ["controlsDisplayMode", "settings", "activeMode", "liveContext", "historyContext", "supportedModes", "tabsOutletName"], outputs: ["refreshOptionChange", "contextChange", "validationStatus"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3997
3998
  }
3998
3999
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigurationCollapseComponent, decorators: [{
3999
4000
  type: Component,
@@ -4559,6 +4560,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4559
4560
  args: [{ selector: 'c8y-aggregation-display', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [C8yTranslatePipe, IconDirective], template: "<div class=\"d-flex a-i-center l-h-tight form-control\">\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"aggregation() ? AGGREGATION_ICONS[aggregation()] : AGGREGATION_ICONS.undefined\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span class=\"text-10 l-h-1 text-muted\">\n {{ 'Aggregation' | translate }}\n </span>\n <span\n class=\"text-12 l-h-1 text-medium text-truncate\"\n data-cy=\"global-date-context--Aggregation-display-value\"\n >\n {{ AGGREGATION_TEXTS[aggregation()] | translate }}\n </span>\n </div>\n</div>\n" }]
4560
4561
  }], propDecorators: { aggregation: [{ type: i0.Input, args: [{ isSignal: true, alias: "aggregation", required: false }] }] } });
4561
4562
 
4563
+ /**
4564
+ * Source of auto-refresh state change.
4565
+ */
4566
+ var AutoRefreshChangeSource;
4567
+ (function (AutoRefreshChangeSource) {
4568
+ /** External change from user interaction or form value changes */
4569
+ AutoRefreshChangeSource["External"] = "external";
4570
+ /** Internal change from tab visibility detection */
4571
+ AutoRefreshChangeSource["Visibility"] = "visibility";
4572
+ })(AutoRefreshChangeSource || (AutoRefreshChangeSource = {}));
4562
4573
  /**
4563
4574
  * Auto-refresh toggle control with countdown timer.
4564
4575
  *
@@ -4581,6 +4592,8 @@ class AutoRefreshControlComponent {
4581
4592
  this.cdr = inject(ChangeDetectorRef);
4582
4593
  // Grace period handling for widgets without proper loading state
4583
4594
  this.gracePeriodTimeout = null;
4595
+ // Track if auto-refresh was disabled by tab visibility (not user action)
4596
+ this.disabledByTabVisibility = false;
4584
4597
  this.loadingChange = new EventEmitter();
4585
4598
  this.refresh = new EventEmitter();
4586
4599
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -4620,17 +4633,28 @@ class AutoRefreshControlComponent {
4620
4633
  ngOnDestroy() {
4621
4634
  this.clearGracePeriod();
4622
4635
  }
4636
+ onVisibilityChange() {
4637
+ if (document.hidden && this.isEnabled) {
4638
+ this.disabledByTabVisibility = true;
4639
+ this.setAutoRefreshEnabled(false, AutoRefreshChangeSource.Visibility);
4640
+ }
4641
+ else {
4642
+ if (this.disabledByTabVisibility) {
4643
+ this.setAutoRefreshEnabled(true, AutoRefreshChangeSource.Visibility);
4644
+ }
4645
+ }
4646
+ }
4623
4647
  toggleIntervalRefresh() {
4624
- this.isEnabled = !this.isEnabled;
4625
- this.onChange(this.isEnabled);
4626
- this.syncCountdownState();
4627
- this.cdr.markForCheck();
4648
+ this.setAutoRefreshEnabled(!this.isEnabled, AutoRefreshChangeSource.External);
4628
4649
  }
4629
4650
  registerOnChange(fn) {
4630
4651
  this.onChange = fn;
4631
4652
  }
4632
4653
  writeValue(showIntervalRefresh) {
4633
4654
  this.isEnabled = showIntervalRefresh;
4655
+ // External state change always clears the flag
4656
+ // This ensures visibility doesn't re-enable after external disable
4657
+ this.disabledByTabVisibility = false;
4634
4658
  this.syncCountdownState();
4635
4659
  this.cdr.markForCheck();
4636
4660
  }
@@ -4641,6 +4665,22 @@ class AutoRefreshControlComponent {
4641
4665
  this.clearGracePeriod();
4642
4666
  this.countdownIntervalComponent?.reset();
4643
4667
  }
4668
+ /**
4669
+ * Internal method to change auto-refresh state with proper flag management.
4670
+ * @param enabled - New enabled state
4671
+ * @param source - Source of the change (External or Visibility)
4672
+ */
4673
+ setAutoRefreshEnabled(enabled, source) {
4674
+ this.isEnabled = enabled;
4675
+ if (enabled || source === AutoRefreshChangeSource.External) {
4676
+ this.disabledByTabVisibility = false;
4677
+ }
4678
+ if (source === AutoRefreshChangeSource.External) {
4679
+ this.onChange(this.isEnabled);
4680
+ }
4681
+ this.syncCountdownState();
4682
+ this.cdr.markForCheck();
4683
+ }
4644
4684
  setupLoadingHandler() {
4645
4685
  this.loading$
4646
4686
  .pipe(withLatestFrom(this.countdownComponentReady$), filter$1(([_, component]) => component !== null), tap(([isLoading, component]) => {
@@ -4688,13 +4728,13 @@ class AutoRefreshControlComponent {
4688
4728
  }
4689
4729
  }
4690
4730
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AutoRefreshControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4691
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AutoRefreshControlComponent, isStandalone: true, selector: "c8y-auto-refresh-control", inputs: { isAutoRefreshConnected: "isAutoRefreshConnected", autoRefreshSeconds: "autoRefreshSeconds", disableCounter: "disableCounter", isEnabled: "isEnabled", isLoading: "isLoading" }, outputs: { loadingChange: "loadingChange", refresh: "refresh" }, providers: [
4731
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AutoRefreshControlComponent, isStandalone: true, selector: "c8y-auto-refresh-control", inputs: { isAutoRefreshConnected: "isAutoRefreshConnected", autoRefreshSeconds: "autoRefreshSeconds", disableCounter: "disableCounter", isEnabled: "isEnabled", isLoading: "isLoading" }, outputs: { loadingChange: "loadingChange", refresh: "refresh" }, host: { listeners: { "document:visibilitychange": "onVisibilityChange()" } }, providers: [
4692
4732
  {
4693
4733
  provide: NG_VALUE_ACCESSOR,
4694
4734
  useExisting: forwardRef(() => AutoRefreshControlComponent),
4695
4735
  multi: true
4696
4736
  }
4697
- ], viewQueries: [{ propertyName: "countdownIntervalComponent", first: true, predicate: CountdownIntervalComponent, descendants: true }], ngImport: i0, template: "@let autoRefreshTooltip = (isEnabled ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate;\n@let countdownInterval = (autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE;\n\n<button\n [class.btn]=\"disableCounter\"\n [class.btn-link]=\"disableCounter\"\n [class.c8y-realtime]=\"disableCounter\"\n [class.toggle-countdown]=\"!disableCounter\"\n [attr.aria-label]=\"autoRefreshTooltip\"\n [tooltip]=\"tooltipTpl\"\n placement=\"bottom\"\n container=\"body\"\n [delay]=\"500\"\n (click)=\"toggleIntervalRefresh(); $event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n [disabled]=\"isLoading\"\n mode\n data-cy=\"global-date-context--Auto-refresh-toggle\"\n>\n <div class=\"d-flex a-i-center\">\n @if (!disableCounter) {\n <c8y-countdown-interval\n #countdown\n [hidden]=\"!isEnabled\"\n [countdownInterval]=\"countdownInterval\"\n [config]=\"countdownIntervalConfig\"\n ></c8y-countdown-interval>\n }\n\n @if (!isEnabled) {\n <i\n class=\"icon-20 text-primary\"\n [c8yIcon]=\"'pause-circle'\"\n data-cy=\"global-date-context--Auto-refresh-toggle-pause\"\n ></i>\n } @else if (disableCounter) {\n <span class=\"c8y-pulse m-0 active\"></span>\n }\n </div>\n</button>\n\n<ng-template #tooltipTpl>\n {{ autoRefreshTooltip }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CountdownIntervalModule }, { kind: "component", type: i4.CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval", "config"], outputs: ["countdownEnded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4737
+ ], viewQueries: [{ propertyName: "countdownIntervalComponent", first: true, predicate: CountdownIntervalComponent, descendants: true }], ngImport: i0, template: "@let autoRefreshTooltip = (isEnabled ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate;\n@let countdownInterval = (autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE;\n\n<button\n [class.btn]=\"disableCounter\"\n [class.btn-link]=\"disableCounter\"\n [class.c8y-realtime]=\"disableCounter\"\n [class.toggle-countdown]=\"!disableCounter\"\n [attr.aria-label]=\"autoRefreshTooltip\"\n [tooltip]=\"tooltipTpl\"\n placement=\"bottom\"\n container=\"body\"\n [delay]=\"500\"\n (click)=\"toggleIntervalRefresh(); $event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n [disabled]=\"isLoading\"\n mode\n data-cy=\"global-date-context--Auto-refresh-toggle\"\n>\n <div class=\"d-flex a-i-center\">\n @if (!disableCounter) {\n <c8y-countdown-interval\n #countdown\n [hidden]=\"!isEnabled\"\n [countdownInterval]=\"countdownInterval\"\n [config]=\"countdownIntervalConfig\"\n ></c8y-countdown-interval>\n }\n\n @if (!isEnabled) {\n <i\n class=\"icon-20 text-primary\"\n [c8yIcon]=\"'pause-circle'\"\n data-cy=\"global-date-context--Auto-refresh-toggle-pause\"\n ></i>\n } @else if (disableCounter) {\n <span class=\"c8y-pulse m-0 active\"></span>\n }\n </div>\n</button>\n\n<ng-template #tooltipTpl>\n {{ autoRefreshTooltip }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CountdownIntervalModule }, { kind: "component", type: i4.CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval", "config"], outputs: ["countdownEnded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4698
4738
  }
4699
4739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AutoRefreshControlComponent, decorators: [{
4700
4740
  type: Component,
@@ -4722,6 +4762,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4722
4762
  type: Output
4723
4763
  }], refresh: [{
4724
4764
  type: Output
4765
+ }], onVisibilityChange: [{
4766
+ type: HostListener,
4767
+ args: ['document:visibilitychange']
4725
4768
  }] } });
4726
4769
 
4727
4770
  class TimeRangeDisplayComponent {
@@ -4765,7 +4808,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4765
4808
  * ```
4766
4809
  *
4767
4810
  */
4768
- class ContextControlsComponent {
4811
+ let ContextControlsComponent$1 = class ContextControlsComponent {
4769
4812
  constructor() {
4770
4813
  // Static properties
4771
4814
  this.REFRESH_OPTION = REFRESH_OPTION;
@@ -4848,9 +4891,9 @@ class ContextControlsComponent {
4848
4891
  return pick(settings, requiredKeys);
4849
4892
  }
4850
4893
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContextControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4851
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ContextControlsComponent, isStandalone: true, selector: "c8y-context-controls", inputs: { showDisplayModeLabel: "showDisplayModeLabel", isLoading: "isLoading", settings: "settings", context: "context" }, outputs: { contextChange: "contextChange", refresh: "refresh", contextClick: "contextClick" }, ngImport: i0, template: "@if (form) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AGGREGATION = settings.showAggregation;\n @let SHOW_AUTO_REFRESH = settings.showAutoRefresh;\n @let refreshIntervalValue = form?.get('refreshInterval')?.value;\n @let isLiveMode = refreshOption === REFRESH_OPTION.LIVE;\n\n @if (isLiveMode) {\n <form\n class=\"input-group\"\n [formGroup]=\"form\"\n >\n <c8y-auto-refresh-control\n #autoRefreshControl\n [isLoading]=\"isLoading\"\n [isAutoRefreshConnected]=\"isAutoRefreshConnected\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"refreshIntervalValue\"\n (refresh)=\"refresh.emit()\"\n ></c8y-auto-refresh-control>\n <button\n class=\"btn-clean d-flex p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n style=\"margin-left: -1px\"\n (click)=\"contextClick.emit($event); $event.stopPropagation()\"\n >\n <div class=\"d-col a-i-start form-control\">\n <p class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Time mode' | translate }}\n </p>\n <p\n class=\"text-bold text-12 fit-w l-h-1\"\n data-cy=\"global-time-context-controls--Display-mode\"\n >\n {{ refreshOption | translate | titlecase }}\n </p>\n </div>\n\n @let interval = form.get('dateTimeContext')?.value?.interval;\n @let isCustomInterval = interval === 'custom';\n\n <c8y-time-range-display\n style=\"margin-left: -1px\"\n [dateTimeContext]=\"form.get('dateTimeContext')?.value\"\n ></c8y-time-range-display>\n\n @if (!(isAnySettingsEnabled$ | async)) {\n <div\n class=\"d-col a-i-center form-control\"\n style=\"margin-left: -1px\"\n >\n <i\n class=\"dlt-c8y-icon-disconnected icon-20 text-danger\"\n [tooltip]=\"'No synced widgets' | translate\"\n placement=\"right\"\n container=\"body\"\n [delay]=\"500\"\n data-cy=\"global-time-context-controls--Widgets-disconnected\"\n ></i>\n </div>\n }\n </button>\n </form>\n } @else {\n <form [formGroup]=\"form\">\n <button\n class=\"btn-clean d-flex p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n (click)=\"contextClick.emit($event); $event.stopPropagation()\"\n >\n <div class=\"d-col a-i-center form-control\">\n <i class=\"dlt-c8y-icon-schedule1 icon-20 text-primary\"></i>\n </div>\n\n <div\n class=\"d-col a-i-start form-control\"\n style=\"margin-left: -1px\"\n >\n <p class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Time mode' | translate }}\n </p>\n <p\n class=\"text-bold text-12 fit-w l-h-1\"\n data-cy=\"global-time-context-controls--Display-mode\"\n >\n {{ refreshOption | translate | titlecase }}\n </p>\n </div>\n\n <c8y-time-range-display\n style=\"margin-left: -1px\"\n [dateTimeContext]=\"form.get('dateTimeContext')?.value\"\n ></c8y-time-range-display>\n <c8y-aggregation-display\n style=\"margin-left: -1px\"\n [aggregation]=\"form.get('aggregation')?.value\"\n ></c8y-aggregation-display>\n\n @if (!(isAnySettingsEnabled$ | async)) {\n <div\n class=\"d-col a-i-center form-control\"\n style=\"margin-left: -1px\"\n >\n <i\n class=\"dlt-c8y-icon-disconnected icon-20 text-danger\"\n [tooltip]=\"'No synced widgets' | translate\"\n placement=\"right\"\n container=\"body\"\n [delay]=\"500\"\n data-cy=\"global-time-context-controls--Widgets-disconnected\"\n ></i>\n </div>\n }\n </button>\n </form>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: "ngmodule", type: CollapseModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: TimeRangeDisplayComponent, selector: "c8y-time-range-display", inputs: ["dateTimeContext", "mode"] }, { kind: "component", type: AggregationDisplayComponent, selector: "c8y-aggregation-display", inputs: ["aggregation"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4852
- }
4853
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContextControlsComponent, decorators: [{
4894
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ContextControlsComponent, isStandalone: true, selector: "c8y-context-controls", inputs: { showDisplayModeLabel: "showDisplayModeLabel", isLoading: "isLoading", settings: "settings", context: "context" }, outputs: { contextChange: "contextChange", refresh: "refresh", contextClick: "contextClick" }, ngImport: i0, template: "@if (form) {\n @let SHOW_TIME_CONTEXT = settings.showTimeContext;\n @let SHOW_AGGREGATION = settings.showAggregation;\n @let SHOW_AUTO_REFRESH = settings.showAutoRefresh;\n @let refreshIntervalValue = form?.get('refreshInterval')?.value;\n @let isLiveMode = refreshOption === REFRESH_OPTION.LIVE;\n\n @if (isLiveMode) {\n <form\n class=\"input-group\"\n [formGroup]=\"form\"\n >\n <c8y-auto-refresh-control\n #autoRefreshControl\n [isLoading]=\"isLoading\"\n [isAutoRefreshConnected]=\"isAutoRefreshConnected\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"refreshIntervalValue\"\n (refresh)=\"refresh.emit()\"\n ></c8y-auto-refresh-control>\n <button\n class=\"btn-clean d-flex p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n style=\"margin-left: -1px\"\n (click)=\"contextClick.emit($event); $event.stopPropagation()\"\n >\n <div class=\"d-col a-i-start form-control\">\n <p class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Time mode' | translate }}\n </p>\n <p\n class=\"text-bold text-12 fit-w l-h-1\"\n data-cy=\"global-time-context-controls--Display-mode\"\n >\n {{ refreshOption | translate | titlecase }}\n </p>\n </div>\n\n @let interval = form.get('dateTimeContext')?.value?.interval;\n @let isCustomInterval = interval === 'custom';\n\n <c8y-time-range-display\n style=\"margin-left: -1px\"\n [dateTimeContext]=\"form.get('dateTimeContext')?.value\"\n ></c8y-time-range-display>\n\n @if (!(isAnySettingsEnabled$ | async)) {\n <div\n class=\"d-col a-i-center form-control\"\n style=\"margin-left: -1px\"\n >\n <i\n class=\"dlt-c8y-icon-disconnected icon-20 text-danger\"\n [tooltip]=\"'No synced widgets' | translate\"\n placement=\"right\"\n container=\"body\"\n [delay]=\"500\"\n data-cy=\"global-time-context-controls--Widgets-disconnected\"\n ></i>\n </div>\n }\n </button>\n </form>\n } @else {\n <form [formGroup]=\"form\">\n <button\n class=\"btn-clean d-flex p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n (click)=\"contextClick.emit($event); $event.stopPropagation()\"\n >\n <div class=\"d-col a-i-center form-control\">\n <i class=\"dlt-c8y-icon-schedule1 icon-20 text-primary\"></i>\n </div>\n\n <div\n class=\"d-col a-i-start form-control\"\n style=\"margin-left: -1px\"\n >\n <p class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Time mode' | translate }}\n </p>\n <p\n class=\"text-bold text-12 fit-w l-h-1\"\n data-cy=\"global-time-context-controls--Display-mode\"\n >\n {{ refreshOption | translate | titlecase }}\n </p>\n </div>\n\n <c8y-time-range-display\n style=\"margin-left: -1px\"\n [dateTimeContext]=\"form.get('dateTimeContext')?.value\"\n ></c8y-time-range-display>\n <c8y-aggregation-display\n style=\"margin-left: -1px\"\n [aggregation]=\"form.get('aggregation')?.value\"\n ></c8y-aggregation-display>\n\n @if (!(isAnySettingsEnabled$ | async)) {\n <div\n class=\"d-col a-i-center form-control\"\n style=\"margin-left: -1px\"\n >\n <i\n class=\"dlt-c8y-icon-disconnected icon-20 text-danger\"\n [tooltip]=\"'No synced widgets' | translate\"\n placement=\"right\"\n container=\"body\"\n [delay]=\"500\"\n data-cy=\"global-time-context-controls--Widgets-disconnected\"\n ></i>\n </div>\n }\n </button>\n </form>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: "ngmodule", type: CollapseModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: TimeRangeDisplayComponent, selector: "c8y-time-range-display", inputs: ["dateTimeContext", "mode"] }, { kind: "component", type: AggregationDisplayComponent, selector: "c8y-aggregation-display", inputs: ["aggregation"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4895
+ };
4896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContextControlsComponent$1, decorators: [{
4854
4897
  type: Component,
4855
4898
  args: [{ selector: 'c8y-context-controls', standalone: true, imports: [
4856
4899
  C8yTranslatePipe,
@@ -5383,14 +5426,14 @@ class GlobalContextComponent {
5383
5426
  });
5384
5427
  }
5385
5428
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5386
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextComponent, isStandalone: true, selector: "c8y-global-context", viewQueries: [{ propertyName: "configurationCollapseComponent", first: true, predicate: ConfigurationCollapseComponent, descendants: true }], ngImport: i0, template: "@if (globalContextState() !== null && isVisible()) {\n <c8y-context-controls\n [settings]=\"settings\"\n [context]=\"globalContextState()\"\n [isLoading]=\"globalContextService.isLoading()\"\n (refresh)=\"onRefresh()\"\n (contextChange)=\"onChanges($event)\"\n (contextClick)=\"gcs.toggle()\"\n ></c8y-context-controls>\n\n <c8y-configuration-collapse\n #gcs\n [context]=\"globalContextState()\"\n (contextChange)=\"onChanges($event)\"\n (refreshOptionChange)=\"onRefreshOptionChanges($event)\"\n (savePreferenceChange)=\"shouldSaveDashboardState = $event\"\n ></c8y-configuration-collapse>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: ContextControlsComponent, selector: "c8y-context-controls", inputs: ["showDisplayModeLabel", "isLoading", "settings", "context"], outputs: ["contextChange", "refresh", "contextClick"] }, { kind: "component", type: ConfigurationCollapseComponent, selector: "c8y-configuration-collapse", inputs: ["supportedModes", "context"], outputs: ["contextChange", "refreshOptionChange", "savePreferenceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5429
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextComponent, isStandalone: true, selector: "c8y-global-context", viewQueries: [{ propertyName: "configurationCollapseComponent", first: true, predicate: ConfigurationCollapseComponent, descendants: true }], ngImport: i0, template: "@if (globalContextState() !== null && isVisible()) {\n <c8y-context-controls\n [settings]=\"settings\"\n [context]=\"globalContextState()\"\n [isLoading]=\"globalContextService.isLoading()\"\n (refresh)=\"onRefresh()\"\n (contextChange)=\"onChanges($event)\"\n (contextClick)=\"gcs.toggle()\"\n ></c8y-context-controls>\n\n <c8y-configuration-collapse\n #gcs\n [context]=\"globalContextState()\"\n (contextChange)=\"onChanges($event)\"\n (refreshOptionChange)=\"onRefreshOptionChanges($event)\"\n (savePreferenceChange)=\"shouldSaveDashboardState = $event\"\n ></c8y-configuration-collapse>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: ContextControlsComponent$1, selector: "c8y-context-controls", inputs: ["showDisplayModeLabel", "isLoading", "settings", "context"], outputs: ["contextChange", "refresh", "contextClick"] }, { kind: "component", type: ConfigurationCollapseComponent, selector: "c8y-configuration-collapse", inputs: ["supportedModes", "context"], outputs: ["contextChange", "refreshOptionChange", "savePreferenceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5387
5430
  }
5388
5431
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextComponent, decorators: [{
5389
5432
  type: Component,
5390
5433
  args: [{ standalone: true, imports: [
5391
5434
  ReactiveFormsModule,
5392
5435
  TooltipModule,
5393
- ContextControlsComponent,
5436
+ ContextControlsComponent$1,
5394
5437
  ConfigurationCollapseComponent
5395
5438
  ], selector: 'c8y-global-context', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (globalContextState() !== null && isVisible()) {\n <c8y-context-controls\n [settings]=\"settings\"\n [context]=\"globalContextState()\"\n [isLoading]=\"globalContextService.isLoading()\"\n (refresh)=\"onRefresh()\"\n (contextChange)=\"onChanges($event)\"\n (contextClick)=\"gcs.toggle()\"\n ></c8y-context-controls>\n\n <c8y-configuration-collapse\n #gcs\n [context]=\"globalContextState()\"\n (contextChange)=\"onChanges($event)\"\n (refreshOptionChange)=\"onRefreshOptionChanges($event)\"\n (savePreferenceChange)=\"shouldSaveDashboardState = $event\"\n ></c8y-configuration-collapse>\n}\n" }]
5396
5439
  }], ctorParameters: () => [], propDecorators: { configurationCollapseComponent: [{
@@ -5905,7 +5948,7 @@ class GlobalContextLinkControlsComponent {
5905
5948
  </button>
5906
5949
  <ng-template #masterTooltipTemplate>{{ masterTooltipText() | translate }}</ng-template>
5907
5950
  }
5908
- `, isInline: true, styles: [".btn-icon-dot[disabled]{cursor:not-allowed;opacity:.75}.btn-icon-dot.link-auto-unlinked,.btn-icon-dot.link-auto-unlinked:focus{box-shadow:0 0 0 2px var(--c8y-palette-status-danger);border-color:var(--c8y-palette-status-danger)}\n"], dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5951
+ `, isInline: true, styles: [".btn-icon-dot[disabled]{cursor:not-allowed;opacity:.75}.btn-icon-dot.link-auto-unlinked,.btn-icon-dot.link-auto-unlinked:focus{box-shadow:0 0 0 2px var(--c8y-palette-status-danger);border-color:var(--c8y-palette-status-danger)}\n"], dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5909
5952
  }
5910
5953
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextLinkControlsComponent, decorators: [{
5911
5954
  type: Component,
@@ -6289,6 +6332,8 @@ function resolveConfigurationValue(key, sources, localStateValues, globalStateVa
6289
6332
  return undefined;
6290
6333
  case 'eventSourceId':
6291
6334
  return undefined;
6335
+ case 'isGlobalContextReady':
6336
+ return undefined;
6292
6337
  default: {
6293
6338
  // Exhaustive check: ensures all keys are handled at compile time
6294
6339
  const _exhaustive = key;
@@ -8460,7 +8505,7 @@ class GlobalContextInlineComponent {
8460
8505
  };
8461
8506
  }
8462
8507
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8463
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8508
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8464
8509
  }
8465
8510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextInlineComponent, decorators: [{
8466
8511
  type: Component,
@@ -9043,7 +9088,7 @@ class ConfigContextSelectorComponent {
9043
9088
  }
9044
9089
  </form>
9045
9090
  }
9046
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9091
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9047
9092
  }
9048
9093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigContextSelectorComponent, decorators: [{
9049
9094
  type: Component,
@@ -9373,7 +9418,7 @@ class GlobalContextWidgetConfigComponent {
9373
9418
  ></c8y-global-context-config>
9374
9419
  </fieldset>
9375
9420
  }
9376
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ConfigContextSelectorComponent, selector: "c8y-config-context-selector" }, { kind: "component", type: GlobalContextConfigComponent, selector: "c8y-global-context-config", inputs: ["config", "isLoading", "widgetControls", "liveSnapshot", "historySnapshot"], outputs: ["refresh", "globalContextChange"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9421
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ConfigContextSelectorComponent, selector: "c8y-config-context-selector" }, { kind: "component", type: GlobalContextConfigComponent, selector: "c8y-global-context-config", inputs: ["config", "isLoading", "widgetControls", "liveSnapshot", "historySnapshot"], outputs: ["refresh", "globalContextChange"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9377
9422
  }
9378
9423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextWidgetConfigComponent, decorators: [{
9379
9424
  type: Component,
@@ -9475,7 +9520,7 @@ class RealtimeControlComponent {
9475
9520
  useExisting: forwardRef(() => RealtimeControlComponent),
9476
9521
  multi: true
9477
9522
  }
9478
- ], ngImport: i0, template: "@let buttonLabel = (isActive ? disableRealtimeLabel : enableRealtimeLabel) | translate;\n\n<button\n class=\"btn btn-icon c8y-realtime\"\n [attr.aria-label]=\"buttonLabel\"\n [tooltip]=\"tooltipTpl\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-context--realtime-toggle\"\n (click)=\"onButtonClick()\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"disabled\"\n>\n <span\n class=\"c8y-pulse m-0\"\n [class.active]=\"isActive\"\n [class.inactive]=\"!isActive\"\n ></span>\n</button>\n<ng-template #tooltipTpl>\n {{ buttonLabel }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.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: "ngmodule", type: FormsModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9523
+ ], ngImport: i0, template: "@let buttonLabel = (isActive ? disableRealtimeLabel : enableRealtimeLabel) | translate;\n\n<button\n class=\"btn btn-icon c8y-realtime\"\n [attr.aria-label]=\"buttonLabel\"\n [tooltip]=\"tooltipTpl\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-context--realtime-toggle\"\n (click)=\"onButtonClick()\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"disabled\"\n>\n <span\n class=\"c8y-pulse m-0\"\n [class.active]=\"isActive\"\n [class.inactive]=\"!isActive\"\n ></span>\n</button>\n<ng-template #tooltipTpl>\n {{ buttonLabel }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.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: "ngmodule", type: FormsModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9479
9524
  }
9480
9525
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RealtimeControlComponent, decorators: [{
9481
9526
  type: Component,
@@ -9596,7 +9641,7 @@ class PreviewControlsComponent {
9596
9641
  this.config.displayMode = GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
9597
9642
  }
9598
9643
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9599
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: PreviewControlsComponent, isStandalone: true, selector: "c8y-preview-controls", inputs: { widgetControls: "widgetControls", config: "config" }, ngImport: i0, template: "<!-- Main Controls -->\n@let isConfigMode = config?.displayMode === GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG;\n@let settings = inlineControlsSettings$ | async;\n\n@if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll\"\n [formGroup]=\"form\"\n >\n <!-- Control Group Container -->\n <div class=\"input-group w-auto\">\n <!-- Aggregation Picker -->\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n <!-- Auto Refresh Controls -->\n @if (settings.showAutoRefresh) {\n <!-- Auto Refresh Toggle -->\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"form.get('refreshInterval')?.value\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n @let configValue =\n isHistoryMode\n ? {\n showDateTo: true,\n showDateFrom: true\n }\n : {\n showDateTo: false,\n showDateFrom: true\n };\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"shouldDisableCustomInterval\"\n [config]=\"configValue\"\n ></c8y-date-time-context-picker>\n }\n\n <!-- Manual Refresh Button -->\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading\"\n >\n <i\n [class.icon-spin]=\"isLoading\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n}\n", styles: [":host{position:relative;display:block;cursor:not-allowed}:host form{position:relative;pointer-events:none;-webkit-user-select:none;user-select:none}:host form:after{content:\"\";position:absolute;inset:0;background:#ffffff0d;z-index:1;pointer-events:none}:host form button,:host form input,:host form select,:host form .dropdown-toggle,:host form .btn{cursor:not-allowed!important;opacity:.85}:host form *{pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}\n"], dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9644
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: PreviewControlsComponent, isStandalone: true, selector: "c8y-preview-controls", inputs: { widgetControls: "widgetControls", config: "config" }, ngImport: i0, template: "<!-- Main Controls -->\n@let isConfigMode = config?.displayMode === GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG;\n@let settings = inlineControlsSettings$ | async;\n\n@if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll\"\n [formGroup]=\"form\"\n >\n <!-- Control Group Container -->\n <div class=\"input-group w-auto\">\n <!-- Aggregation Picker -->\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n <!-- Auto Refresh Controls -->\n @if (settings.showAutoRefresh) {\n <!-- Auto Refresh Toggle -->\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"form.get('refreshInterval')?.value\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n @let configValue =\n isHistoryMode\n ? {\n showDateTo: true,\n showDateFrom: true\n }\n : {\n showDateTo: false,\n showDateFrom: true\n };\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"shouldDisableCustomInterval\"\n [config]=\"configValue\"\n ></c8y-date-time-context-picker>\n }\n\n <!-- Manual Refresh Button -->\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n type=\"button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading\"\n >\n <i\n [class.icon-spin]=\"isLoading\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n}\n", styles: [":host{position:relative;display:block;cursor:not-allowed}:host form{position:relative;pointer-events:none;-webkit-user-select:none;user-select:none}:host form:after{content:\"\";position:absolute;inset:0;background:#ffffff0d;z-index:1;pointer-events:none}:host form button,:host form input,:host form select,:host form .dropdown-toggle,:host form .btn{cursor:not-allowed!important;opacity:.85}:host form *{pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}\n"], dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9600
9645
  }
9601
9646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewControlsComponent, decorators: [{
9602
9647
  type: Component,
@@ -10690,7 +10735,1016 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
10690
10735
  type: Output
10691
10736
  }] } });
10692
10737
 
10693
- // Export widget integration components
10738
+ /** Context control feature constants for type-safe access */
10739
+ const CONTEXT_FEATURE = {
10740
+ /** Time range selector for live mode (relative time window that moves with current time) */
10741
+ LIVE_TIME: 'liveTime',
10742
+ /** Time range selector for history mode (fixed date range for historical analysis) */
10743
+ HISTORY_TIME: 'historyTime',
10744
+ /** Data aggregation options (hourly, daily, etc.) - history mode only */
10745
+ AGGREGATION: 'aggregation',
10746
+ /** Auto-refresh toggle (fixed 5s interval) - live mode only */
10747
+ AUTO_REFRESH: 'autoRefresh',
10748
+ /** Manual refresh button */
10749
+ REFRESH: 'refresh'
10750
+ };
10751
+ /** Preset name constants for type-safe access */
10752
+ const PRESET_NAME = {
10753
+ DEFAULT: 'default',
10754
+ ALARM_LIST: 'alarmList',
10755
+ CHART: 'chart',
10756
+ LIVE_ONLY: 'liveOnly',
10757
+ HISTORY_ONLY: 'historyOnly',
10758
+ ALARM_LIST_CONFIG: 'alarmListConfig',
10759
+ ALARM_LIST_LEGACY: 'alarmListLegacy'
10760
+ };
10761
+ /** Control presets for different widget types (mode constraints applied by applyModeConstraints) */
10762
+ const CONTROL_PRESETS = {
10763
+ /** Full-featured preset for most widgets (supports both live and history modes) */
10764
+ [PRESET_NAME.DEFAULT]: {
10765
+ dashboard: [
10766
+ CONTEXT_FEATURE.LIVE_TIME,
10767
+ CONTEXT_FEATURE.HISTORY_TIME,
10768
+ CONTEXT_FEATURE.AUTO_REFRESH
10769
+ ],
10770
+ config: [CONTEXT_FEATURE.LIVE_TIME, CONTEXT_FEATURE.HISTORY_TIME, CONTEXT_FEATURE.AUTO_REFRESH],
10771
+ view_and_config: [
10772
+ CONTEXT_FEATURE.LIVE_TIME,
10773
+ CONTEXT_FEATURE.HISTORY_TIME,
10774
+ CONTEXT_FEATURE.AUTO_REFRESH,
10775
+ CONTEXT_FEATURE.AGGREGATION,
10776
+ CONTEXT_FEATURE.REFRESH
10777
+ ]
10778
+ },
10779
+ /** For alarm/event lists (supports both live and history modes) */
10780
+ [PRESET_NAME.ALARM_LIST]: {
10781
+ dashboard: [
10782
+ CONTEXT_FEATURE.LIVE_TIME,
10783
+ CONTEXT_FEATURE.HISTORY_TIME,
10784
+ CONTEXT_FEATURE.AUTO_REFRESH
10785
+ ],
10786
+ config: [CONTEXT_FEATURE.AUTO_REFRESH],
10787
+ view_and_config: [
10788
+ CONTEXT_FEATURE.LIVE_TIME,
10789
+ CONTEXT_FEATURE.HISTORY_TIME,
10790
+ CONTEXT_FEATURE.AUTO_REFRESH
10791
+ ]
10792
+ },
10793
+ /** For alarm/event lists in config mode (supports both live and history modes with time in config) */
10794
+ [PRESET_NAME.ALARM_LIST_CONFIG]: {
10795
+ dashboard: [
10796
+ CONTEXT_FEATURE.LIVE_TIME,
10797
+ CONTEXT_FEATURE.HISTORY_TIME,
10798
+ CONTEXT_FEATURE.AUTO_REFRESH
10799
+ ],
10800
+ config: [
10801
+ CONTEXT_FEATURE.LIVE_TIME,
10802
+ CONTEXT_FEATURE.HISTORY_TIME,
10803
+ CONTEXT_FEATURE.AUTO_REFRESH,
10804
+ CONTEXT_FEATURE.AGGREGATION
10805
+ ],
10806
+ view_and_config: [
10807
+ CONTEXT_FEATURE.LIVE_TIME,
10808
+ CONTEXT_FEATURE.HISTORY_TIME,
10809
+ CONTEXT_FEATURE.AUTO_REFRESH
10810
+ ]
10811
+ },
10812
+ /** For charts with aggregation support (supports both live and history modes) */
10813
+ [PRESET_NAME.CHART]: {
10814
+ dashboard: [
10815
+ CONTEXT_FEATURE.LIVE_TIME,
10816
+ CONTEXT_FEATURE.HISTORY_TIME,
10817
+ CONTEXT_FEATURE.AUTO_REFRESH
10818
+ ],
10819
+ config: [CONTEXT_FEATURE.LIVE_TIME, CONTEXT_FEATURE.HISTORY_TIME, CONTEXT_FEATURE.AUTO_REFRESH],
10820
+ view_and_config: [
10821
+ CONTEXT_FEATURE.LIVE_TIME,
10822
+ CONTEXT_FEATURE.HISTORY_TIME,
10823
+ CONTEXT_FEATURE.AGGREGATION,
10824
+ CONTEXT_FEATURE.AUTO_REFRESH,
10825
+ CONTEXT_FEATURE.REFRESH
10826
+ ]
10827
+ },
10828
+ /** For live-only widgets (no history mode support) */
10829
+ [PRESET_NAME.LIVE_ONLY]: {
10830
+ dashboard: [CONTEXT_FEATURE.LIVE_TIME, CONTEXT_FEATURE.AUTO_REFRESH],
10831
+ config: [CONTEXT_FEATURE.LIVE_TIME, CONTEXT_FEATURE.AUTO_REFRESH],
10832
+ view_and_config: [
10833
+ CONTEXT_FEATURE.LIVE_TIME,
10834
+ CONTEXT_FEATURE.AUTO_REFRESH,
10835
+ CONTEXT_FEATURE.REFRESH
10836
+ ]
10837
+ },
10838
+ /** For history-only widgets (no live mode support) */
10839
+ [PRESET_NAME.HISTORY_ONLY]: {
10840
+ dashboard: [CONTEXT_FEATURE.HISTORY_TIME],
10841
+ config: [CONTEXT_FEATURE.HISTORY_TIME, CONTEXT_FEATURE.AGGREGATION],
10842
+ view_and_config: [
10843
+ CONTEXT_FEATURE.HISTORY_TIME,
10844
+ CONTEXT_FEATURE.AGGREGATION,
10845
+ CONTEXT_FEATURE.REFRESH
10846
+ ]
10847
+ },
10848
+ [PRESET_NAME.ALARM_LIST_LEGACY]: {
10849
+ dashboard: [
10850
+ CONTEXT_FEATURE.LIVE_TIME,
10851
+ CONTEXT_FEATURE.HISTORY_TIME,
10852
+ CONTEXT_FEATURE.AUTO_REFRESH
10853
+ ],
10854
+ config: [CONTEXT_FEATURE.AUTO_REFRESH, CONTEXT_FEATURE.REFRESH],
10855
+ view_and_config: [
10856
+ CONTEXT_FEATURE.LIVE_TIME,
10857
+ CONTEXT_FEATURE.HISTORY_TIME,
10858
+ CONTEXT_FEATURE.AUTO_REFRESH
10859
+ ]
10860
+ }
10861
+ };
10862
+ /**
10863
+ * Apply mode constraints (hard rules) to filter controls based on refresh option.
10864
+ *
10865
+ * @param controls - Array of control features
10866
+ * @param refreshOption - Current refresh option (REFRESH_OPTION.LIVE or REFRESH_OPTION.HISTORY)
10867
+ * @returns Filtered array with mode constraints applied
10868
+ */
10869
+ function applyModeConstraints(controls, refreshOption) {
10870
+ if (refreshOption === REFRESH_OPTION.HISTORY) {
10871
+ // History mode: no auto-refresh, no live time
10872
+ return controls.filter(c => c !== CONTEXT_FEATURE.AUTO_REFRESH && c !== CONTEXT_FEATURE.LIVE_TIME);
10873
+ }
10874
+ if (refreshOption === REFRESH_OPTION.LIVE) {
10875
+ // Live mode: no aggregation, no history time
10876
+ return controls.filter(c => c !== CONTEXT_FEATURE.AGGREGATION && c !== CONTEXT_FEATURE.HISTORY_TIME);
10877
+ }
10878
+ return controls;
10879
+ }
10880
+ /**
10881
+ * Get supported modes from a preset definition.
10882
+ * Modes are derived from features:
10883
+ * - LIVE mode: supported if preset has AUTO_REFRESH (LIVE_TIME is optional)
10884
+ * - HISTORY mode: supported if preset has HISTORY_TIME
10885
+ *
10886
+ * @param controls - Preset name or definition
10887
+ * @param displayMode - Current display mode
10888
+ * @returns Array of supported refresh options
10889
+ */
10890
+ function getSupportedModes(controls, displayMode) {
10891
+ const presetDef = typeof controls === 'string' ? CONTROL_PRESETS[controls] : controls;
10892
+ const features = presetDef[displayMode];
10893
+ const modes = [];
10894
+ // Support LIVE if has autoRefresh (with optional liveTime)
10895
+ if (features.includes(CONTEXT_FEATURE.AUTO_REFRESH)) {
10896
+ modes.push(REFRESH_OPTION.LIVE);
10897
+ }
10898
+ // Support HISTORY if has historyTime
10899
+ if (features.includes(CONTEXT_FEATURE.HISTORY_TIME)) {
10900
+ modes.push(REFRESH_OPTION.HISTORY);
10901
+ }
10902
+ // Fallback to LIVE if no mode features detected
10903
+ return modes.length > 0 ? modes : [REFRESH_OPTION.LIVE];
10904
+ }
10905
+ /**
10906
+ * Convert controls preset to GlobalContextSettings for registration.
10907
+ */
10908
+ function controlsToSettings(controls, displayMode, refreshOption) {
10909
+ const presetDef = typeof controls === 'string' ? CONTROL_PRESETS[controls] : controls;
10910
+ const activeControls = applyModeConstraints(presetDef[displayMode], refreshOption);
10911
+ return {
10912
+ showTimeContext: activeControls.includes(CONTEXT_FEATURE.LIVE_TIME) ||
10913
+ activeControls.includes(CONTEXT_FEATURE.HISTORY_TIME),
10914
+ showAutoRefresh: activeControls.includes(CONTEXT_FEATURE.AUTO_REFRESH),
10915
+ showRefreshInterval: false,
10916
+ showAggregation: activeControls.includes(CONTEXT_FEATURE.AGGREGATION),
10917
+ showRefresh: activeControls.includes(CONTEXT_FEATURE.REFRESH)
10918
+ };
10919
+ }
10920
+
10921
+ class ConfigModeControls {
10922
+ constructor() {
10923
+ this.destroyRef = inject(DestroyRef);
10924
+ this.globalContextUtils = inject(GlobalContextUtilsService);
10925
+ this.globalContextEventService = inject(GlobalContextEventService);
10926
+ this.controls = input(PRESET_NAME.DEFAULT, ...(ngDevMode ? [{ debugName: "controls" }] : []));
10927
+ this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
10928
+ this.configChange = output();
10929
+ this.displayModeControl = new FormControl(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, { nonNullable: true });
10930
+ this.GLOBAL_CONTEXT_DISPLAY_MODE = GLOBAL_CONTEXT_DISPLAY_MODE;
10931
+ this.displayMode = signal(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
10932
+ this.refreshOption = signal(REFRESH_OPTION.LIVE, ...(ngDevMode ? [{ debugName: "refreshOption" }] : []));
10933
+ this.liveState = signal(null, ...(ngDevMode ? [{ debugName: "liveState" }] : []));
10934
+ this.historyState = signal(null, ...(ngDevMode ? [{ debugName: "historyState" }] : []));
10935
+ this.lastEmittedContext = signal({}, ...(ngDevMode ? [{ debugName: "lastEmittedContext" }] : []));
10936
+ this.settings = computed(() => controlsToSettings(this.controls(), this.displayMode(), this.refreshOption()), ...(ngDevMode ? [{ debugName: "settings" }] : []));
10937
+ this.supportedModes = computed(() => getSupportedModes(this.controls(), this.displayMode()), ...(ngDevMode ? [{ debugName: "supportedModes" }] : []));
10938
+ // Sync with incoming config
10939
+ effect(() => {
10940
+ const cfg = this.config();
10941
+ if (!cfg)
10942
+ return;
10943
+ untracked(() => {
10944
+ const mode = cfg.displayMode ?? GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
10945
+ if (this.displayModeControl.value !== mode) {
10946
+ this.displayModeControl.setValue(mode, { emitEvent: false });
10947
+ this.displayMode.set(mode);
10948
+ }
10949
+ const refreshOpt = cfg.refreshOption ?? REFRESH_OPTION.LIVE;
10950
+ this.refreshOption.set(refreshOpt);
10951
+ if (refreshOpt === REFRESH_OPTION.LIVE) {
10952
+ this.liveState.set({ ...cfg });
10953
+ }
10954
+ else {
10955
+ this.historyState.set({ ...cfg });
10956
+ }
10957
+ this.lastEmittedContext.set(cfg);
10958
+ });
10959
+ });
10960
+ }
10961
+ ngOnInit() {
10962
+ this.displayModeControl.valueChanges
10963
+ .pipe(takeUntilDestroyed(this.destroyRef))
10964
+ .subscribe(mode => {
10965
+ this.displayMode.set(mode);
10966
+ this.emitForDisplayMode(mode);
10967
+ });
10968
+ this.emitInitialState();
10969
+ }
10970
+ onRefreshOptionChange(option) {
10971
+ this.refreshOption.set(option);
10972
+ const snapshot = option === REFRESH_OPTION.LIVE ? this.liveState() : this.historyState();
10973
+ const context = {
10974
+ ...(snapshot ?? this.config()),
10975
+ refreshOption: option,
10976
+ displayMode: this.displayMode(),
10977
+ aggregation: option === REFRESH_OPTION.LIVE ? null : (snapshot ?? this.config()).aggregation
10978
+ };
10979
+ this.emit(context);
10980
+ }
10981
+ onConfigurationChange(changes) {
10982
+ const context = {
10983
+ ...this.config(),
10984
+ ...changes,
10985
+ refreshOption: this.refreshOption(),
10986
+ displayMode: this.displayMode()
10987
+ };
10988
+ // Update snapshot for current mode
10989
+ if (this.refreshOption() === REFRESH_OPTION.LIVE) {
10990
+ this.liveState.set({ ...context });
10991
+ }
10992
+ else {
10993
+ this.historyState.set({ ...context });
10994
+ }
10995
+ this.emit(context);
10996
+ }
10997
+ emitInitialState() {
10998
+ const cfg = this.config();
10999
+ if (!cfg)
11000
+ return;
11001
+ const mode = cfg.displayMode ?? GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
11002
+ const context = mode === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD
11003
+ ? this.getGlobalContextState(mode)
11004
+ : { ...cfg, isGlobalContextReady: true };
11005
+ this.lastEmittedContext.set(context);
11006
+ this.configChange.emit({ context, diff: context });
11007
+ }
11008
+ emitForDisplayMode(mode) {
11009
+ if (mode === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
11010
+ this.emit(this.getGlobalContextState(mode));
11011
+ }
11012
+ else {
11013
+ const snapshot = this.refreshOption() === REFRESH_OPTION.LIVE ? this.liveState() : this.historyState();
11014
+ this.emit({ ...(snapshot ?? this.config()), displayMode: mode, isGlobalContextReady: true });
11015
+ }
11016
+ }
11017
+ emit(context) {
11018
+ const diff = this.globalContextUtils.getChangedFields(this.lastEmittedContext(), context);
11019
+ if (Object.keys(diff).length === 0)
11020
+ return;
11021
+ this.lastEmittedContext.set(context);
11022
+ this.configChange.emit({ context, diff });
11023
+ }
11024
+ getGlobalContextState(mode) {
11025
+ const globalState = this.globalContextEventService.getLatestValue(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11026
+ return globalState
11027
+ ? {
11028
+ displayMode: mode,
11029
+ dateTimeContext: globalState.dateTimeContext,
11030
+ refreshOption: globalState.refreshOption,
11031
+ aggregation: globalState.aggregation,
11032
+ isAutoRefreshEnabled: globalState.isAutoRefreshEnabled,
11033
+ refreshInterval: globalState.refreshInterval,
11034
+ isGlobalContextReady: true
11035
+ }
11036
+ : { displayMode: mode, isGlobalContextReady: true };
11037
+ }
11038
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigModeControls, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11039
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ConfigModeControls, isStandalone: true, selector: "c8y-config-mode-controls", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { configChange: "configChange" }, ngImport: i0, template: `
11040
+ <form>
11041
+ <fieldset class="c8y-fieldset">
11042
+ <legend>
11043
+ {{ 'Time context' | translate }}
11044
+ <button
11045
+ class="btn-help btn-help--sm"
11046
+ [attr.aria-label]="'Help' | translate"
11047
+ [popover]="
11048
+ 'Sync with dashboard settings or set independent time controls for this widget.'
11049
+ | translate
11050
+ "
11051
+ placement="right"
11052
+ triggers="focus"
11053
+ container="body"
11054
+ type="button"
11055
+ [adaptivePosition]="true"
11056
+ ></button>
11057
+ </legend>
11058
+ <c8y-config-context-selector
11059
+ [formControl]="displayModeControl"
11060
+ ></c8y-config-context-selector>
11061
+ </fieldset>
11062
+ </form>
11063
+
11064
+ @if (displayMode() !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
11065
+ <fieldset class="c8y-fieldset p-l-0 p-r-0 p-t-16">
11066
+ <legend class="m-l-16">{{ 'Widget time context' | translate }}</legend>
11067
+ <c8y-configuration-controls
11068
+ [settings]="settings()"
11069
+ [controlsDisplayMode]="'horizontal'"
11070
+ [tabsOutletName]="'verticalTabOutletForConfigurationModes'"
11071
+ [activeMode]="refreshOption()"
11072
+ [liveContext]="liveState()"
11073
+ [historyContext]="historyState()"
11074
+ [supportedModes]="supportedModes()"
11075
+ (contextChange)="onConfigurationChange($event)"
11076
+ (refreshOptionChange)="onRefreshOptionChange($event)"
11077
+ ></c8y-configuration-controls>
11078
+ </fieldset>
11079
+ }
11080
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ConfigContextSelectorComponent, selector: "c8y-config-context-selector" }, { kind: "component", type: ConfigurationControlsComponent, selector: "c8y-configuration-controls", inputs: ["controlsDisplayMode", "settings", "activeMode", "liveContext", "historyContext", "supportedModes", "tabsOutletName"], outputs: ["refreshOptionChange", "contextChange", "validationStatus"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i2$2.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11081
+ }
11082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigModeControls, decorators: [{
11083
+ type: Component,
11084
+ args: [{
11085
+ selector: 'c8y-config-mode-controls',
11086
+ standalone: true,
11087
+ imports: [
11088
+ ReactiveFormsModule,
11089
+ ConfigContextSelectorComponent,
11090
+ ConfigurationControlsComponent,
11091
+ C8yTranslatePipe,
11092
+ PopoverModule
11093
+ ],
11094
+ changeDetection: ChangeDetectionStrategy.OnPush,
11095
+ template: `
11096
+ <form>
11097
+ <fieldset class="c8y-fieldset">
11098
+ <legend>
11099
+ {{ 'Time context' | translate }}
11100
+ <button
11101
+ class="btn-help btn-help--sm"
11102
+ [attr.aria-label]="'Help' | translate"
11103
+ [popover]="
11104
+ 'Sync with dashboard settings or set independent time controls for this widget.'
11105
+ | translate
11106
+ "
11107
+ placement="right"
11108
+ triggers="focus"
11109
+ container="body"
11110
+ type="button"
11111
+ [adaptivePosition]="true"
11112
+ ></button>
11113
+ </legend>
11114
+ <c8y-config-context-selector
11115
+ [formControl]="displayModeControl"
11116
+ ></c8y-config-context-selector>
11117
+ </fieldset>
11118
+ </form>
11119
+
11120
+ @if (displayMode() !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
11121
+ <fieldset class="c8y-fieldset p-l-0 p-r-0 p-t-16">
11122
+ <legend class="m-l-16">{{ 'Widget time context' | translate }}</legend>
11123
+ <c8y-configuration-controls
11124
+ [settings]="settings()"
11125
+ [controlsDisplayMode]="'horizontal'"
11126
+ [tabsOutletName]="'verticalTabOutletForConfigurationModes'"
11127
+ [activeMode]="refreshOption()"
11128
+ [liveContext]="liveState()"
11129
+ [historyContext]="historyState()"
11130
+ [supportedModes]="supportedModes()"
11131
+ (contextChange)="onConfigurationChange($event)"
11132
+ (refreshOptionChange)="onRefreshOptionChange($event)"
11133
+ ></c8y-configuration-controls>
11134
+ </fieldset>
11135
+ }
11136
+ `
11137
+ }]
11138
+ }], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], configChange: [{ type: i0.Output, args: ["configChange"] }] } });
11139
+
11140
+ class ContextControlsComponent {
11141
+ constructor() {
11142
+ this.fb = inject(FormBuilder);
11143
+ this.aggregationValidationService = inject(AggregationValidationService);
11144
+ this.globalContextUtils = inject(GlobalContextUtilsService);
11145
+ this.controls = input(PRESET_NAME.DEFAULT, ...(ngDevMode ? [{ debugName: "controls" }] : []));
11146
+ this.displayMode = input(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
11147
+ this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
11148
+ this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
11149
+ this.configChange = output();
11150
+ this.refresh = output();
11151
+ this.lastEmittedState = signal({}, ...(ngDevMode ? [{ debugName: "lastEmittedState" }] : []));
11152
+ /**
11153
+ * Visible controls for the template.
11154
+ * LIVE_TIME and HISTORY_TIME are normalized to 'time' for template simplicity.
11155
+ */
11156
+ this.visibleControls = computed(() => {
11157
+ const controlsInput = this.controls();
11158
+ const presetDef = typeof controlsInput === 'string' ? CONTROL_PRESETS[controlsInput] : controlsInput;
11159
+ const baseControls = presetDef[this.displayMode()];
11160
+ const refreshOption = this.config().refreshOption || REFRESH_OPTION.LIVE;
11161
+ const filteredControls = applyModeConstraints(baseControls, refreshOption);
11162
+ // Normalize LIVE_TIME/HISTORY_TIME to 'time' for template
11163
+ return filteredControls.map(c => c === CONTEXT_FEATURE.LIVE_TIME || c === CONTEXT_FEATURE.HISTORY_TIME ? 'time' : c);
11164
+ }, ...(ngDevMode ? [{ debugName: "visibleControls" }] : []));
11165
+ this.disabledAggregations = computed(() => {
11166
+ const dateCtx = this.config().dateTimeContext;
11167
+ if (!dateCtx)
11168
+ return {};
11169
+ const [from, to] = this.parseDateRange(dateCtx);
11170
+ return this.aggregationValidationService.getDisabledAggregations([from, to]);
11171
+ }, ...(ngDevMode ? [{ debugName: "disabledAggregations" }] : []));
11172
+ this.dateTimePickerConfig = computed(() => {
11173
+ const refreshOption = this.config().refreshOption;
11174
+ return refreshOption === REFRESH_OPTION.HISTORY
11175
+ ? { showDateFrom: true, showDateTo: true }
11176
+ : { showDateFrom: true, showDateTo: false };
11177
+ }, ...(ngDevMode ? [{ debugName: "dateTimePickerConfig" }] : []));
11178
+ this.autoRefreshSeconds = computed(() => this.config().refreshInterval || GLOBAL_CONTEXT_DEFAULTS.REFRESH_INTERVAL, ...(ngDevMode ? [{ debugName: "autoRefreshSeconds" }] : []));
11179
+ this.form = this.fb.group({
11180
+ dateTimeContext: [null],
11181
+ aggregation: [null],
11182
+ isAutoRefreshEnabled: [false],
11183
+ refreshInterval: [GLOBAL_CONTEXT_DEFAULTS.REFRESH_INTERVAL],
11184
+ refreshOption: [GLOBAL_CONTEXT_DEFAULTS.REFRESH_OPTION]
11185
+ });
11186
+ this.syncConfigToForm();
11187
+ this.subscribeToFormChanges();
11188
+ }
11189
+ onRefresh() {
11190
+ const { dateTimeContext } = this.config();
11191
+ if (!dateTimeContext) {
11192
+ this.refresh.emit();
11193
+ return;
11194
+ }
11195
+ const context = {
11196
+ ...this.config(),
11197
+ dateTimeContext: DateTimeContextUtil.normalizeForLive(dateTimeContext)
11198
+ };
11199
+ if (!this.emitIfChanged(context)) {
11200
+ this.refresh.emit();
11201
+ }
11202
+ }
11203
+ /** Emits configChange if context differs from last emitted state. Returns true if emitted. */
11204
+ emitIfChanged(context) {
11205
+ const diff = this.globalContextUtils.getChangedFields(this.lastEmittedState(), context);
11206
+ if (Object.keys(diff).length === 0)
11207
+ return false;
11208
+ this.lastEmittedState.set(context);
11209
+ this.configChange.emit({ context, diff });
11210
+ return true;
11211
+ }
11212
+ syncConfigToForm() {
11213
+ effect(() => {
11214
+ const cfg = this.config();
11215
+ this.form.patchValue(cfg, { emitEvent: false });
11216
+ this.lastEmittedState.set(this.form.value);
11217
+ });
11218
+ }
11219
+ subscribeToFormChanges() {
11220
+ this.form.valueChanges.pipe(takeUntilDestroyed()).subscribe(value => {
11221
+ const context = this.clearInvalidAggregation(value);
11222
+ this.emitIfChanged(context);
11223
+ });
11224
+ }
11225
+ /** Clears aggregation if in LIVE mode or invalid for current time range (HISTORY mode). */
11226
+ clearInvalidAggregation(context) {
11227
+ const { aggregation, dateTimeContext, refreshOption } = context;
11228
+ if (!aggregation)
11229
+ return context;
11230
+ // LIVE mode doesn't support aggregation
11231
+ if (refreshOption === REFRESH_OPTION.LIVE) {
11232
+ this.form.patchValue({ aggregation: null }, { emitEvent: false });
11233
+ return { ...context, aggregation: null };
11234
+ }
11235
+ // HISTORY mode: validate aggregation for time range
11236
+ if (!dateTimeContext)
11237
+ return context;
11238
+ const [from, to] = this.parseDateRange(dateTimeContext);
11239
+ const disabledAggs = this.aggregationValidationService.getDisabledAggregations([from, to]);
11240
+ if (disabledAggs[aggregation]) {
11241
+ this.form.patchValue({ aggregation: null }, { emitEvent: false });
11242
+ return { ...context, aggregation: null };
11243
+ }
11244
+ return context;
11245
+ }
11246
+ parseDateRange(dateCtx) {
11247
+ const from = typeof dateCtx.dateFrom === 'string' ? new Date(dateCtx.dateFrom) : dateCtx.dateFrom;
11248
+ const to = typeof dateCtx.dateTo === 'string' ? new Date(dateCtx.dateTo) : dateCtx.dateTo;
11249
+ return [from, to];
11250
+ }
11251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContextControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ContextControlsComponent, isStandalone: true, selector: "c8y-context-controls", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh" }, ngImport: i0, template: `
11253
+ <form
11254
+ class="d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll h-auto min-width-0 widget-controls"
11255
+ [formGroup]="form"
11256
+ >
11257
+ <div class="input-group w-auto">
11258
+ @if (visibleControls().includes('aggregation')) {
11259
+ <c8y-aggregation-picker
11260
+ formControlName="aggregation"
11261
+ [disabledAggregations]="disabledAggregations()"
11262
+ [resetToDefault]="true"
11263
+ >
11264
+ </c8y-aggregation-picker>
11265
+ }
11266
+
11267
+ @if (visibleControls().includes('autoRefresh')) {
11268
+ <c8y-auto-refresh-control
11269
+ formControlName="isAutoRefreshEnabled"
11270
+ [autoRefreshSeconds]="autoRefreshSeconds()"
11271
+ [isLoading]="isLoading()"
11272
+ (refresh)="onRefresh()"
11273
+ >
11274
+ </c8y-auto-refresh-control>
11275
+ }
11276
+
11277
+ @if (visibleControls().includes('time')) {
11278
+ <c8y-date-time-context-picker
11279
+ style="margin-left: -1px"
11280
+ formControlName="dateTimeContext"
11281
+ [config]="dateTimePickerConfig()"
11282
+ >
11283
+ </c8y-date-time-context-picker>
11284
+ }
11285
+
11286
+ @if (visibleControls().includes('refresh')) {
11287
+ <div class="input-group-btn">
11288
+ <button
11289
+ class="btn btn-default"
11290
+ [attr.aria-label]="'Refresh' | translate"
11291
+ [tooltip]="'Refresh' | translate"
11292
+ placement="bottom"
11293
+ container="body"
11294
+ type="button"
11295
+ [delay]="500"
11296
+ [disabled]="isLoading()"
11297
+ (click)="onRefresh()"
11298
+ data-cy="widget-controls--refresh-button"
11299
+ >
11300
+ <i [class.icon-spin]="isLoading()" [c8yIcon]="'refresh'"></i>
11301
+ </button>
11302
+ </div>
11303
+ }
11304
+ </div>
11305
+ </form>
11306
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
11307
+ }
11308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContextControlsComponent, decorators: [{
11309
+ type: Component,
11310
+ args: [{
11311
+ selector: 'c8y-context-controls',
11312
+ standalone: true,
11313
+ imports: [
11314
+ ReactiveFormsModule,
11315
+ DateTimeContextPickerComponent,
11316
+ AggregationPickerComponent,
11317
+ AutoRefreshControlComponent,
11318
+ IconDirective,
11319
+ C8yTranslatePipe,
11320
+ TooltipModule
11321
+ ],
11322
+ template: `
11323
+ <form
11324
+ class="d-flex gap-16 p-l-16 p-r-16 p-b-8 inner-scroll h-auto min-width-0 widget-controls"
11325
+ [formGroup]="form"
11326
+ >
11327
+ <div class="input-group w-auto">
11328
+ @if (visibleControls().includes('aggregation')) {
11329
+ <c8y-aggregation-picker
11330
+ formControlName="aggregation"
11331
+ [disabledAggregations]="disabledAggregations()"
11332
+ [resetToDefault]="true"
11333
+ >
11334
+ </c8y-aggregation-picker>
11335
+ }
11336
+
11337
+ @if (visibleControls().includes('autoRefresh')) {
11338
+ <c8y-auto-refresh-control
11339
+ formControlName="isAutoRefreshEnabled"
11340
+ [autoRefreshSeconds]="autoRefreshSeconds()"
11341
+ [isLoading]="isLoading()"
11342
+ (refresh)="onRefresh()"
11343
+ >
11344
+ </c8y-auto-refresh-control>
11345
+ }
11346
+
11347
+ @if (visibleControls().includes('time')) {
11348
+ <c8y-date-time-context-picker
11349
+ style="margin-left: -1px"
11350
+ formControlName="dateTimeContext"
11351
+ [config]="dateTimePickerConfig()"
11352
+ >
11353
+ </c8y-date-time-context-picker>
11354
+ }
11355
+
11356
+ @if (visibleControls().includes('refresh')) {
11357
+ <div class="input-group-btn">
11358
+ <button
11359
+ class="btn btn-default"
11360
+ [attr.aria-label]="'Refresh' | translate"
11361
+ [tooltip]="'Refresh' | translate"
11362
+ placement="bottom"
11363
+ container="body"
11364
+ type="button"
11365
+ [delay]="500"
11366
+ [disabled]="isLoading()"
11367
+ (click)="onRefresh()"
11368
+ data-cy="widget-controls--refresh-button"
11369
+ >
11370
+ <i [class.icon-spin]="isLoading()" [c8yIcon]="'refresh'"></i>
11371
+ </button>
11372
+ </div>
11373
+ }
11374
+ </div>
11375
+ </form>
11376
+ `
11377
+ }]
11378
+ }], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
11379
+
11380
+ // Map preset controls to state keys
11381
+ const CONTROL_DISPLAY_CONFIG = {
11382
+ liveTime: {
11383
+ key: 'liveTime',
11384
+ stateKey: 'dateTimeContext',
11385
+ cssClass: 'time-context',
11386
+ label: gettext('date/time'),
11387
+ icon: 'calendar'
11388
+ },
11389
+ historyTime: {
11390
+ key: 'historyTime',
11391
+ stateKey: 'dateTimeContext',
11392
+ cssClass: 'time-context',
11393
+ label: gettext('date/time'),
11394
+ icon: 'calendar'
11395
+ },
11396
+ aggregation: {
11397
+ key: 'aggregation',
11398
+ stateKey: 'aggregation',
11399
+ cssClass: 'aggregation',
11400
+ label: gettext('aggregation'),
11401
+ icon: 'input'
11402
+ },
11403
+ autoRefresh: {
11404
+ key: 'autoRefresh',
11405
+ stateKey: 'isAutoRefreshEnabled',
11406
+ cssClass: 'auto-refresh',
11407
+ label: gettext('auto refresh'),
11408
+ icon: 'refresh'
11409
+ }
11410
+ };
11411
+ class LinkButtonsComponent {
11412
+ constructor() {
11413
+ this.injectedDashboardChild = inject(DashboardChildComponent, { optional: true });
11414
+ this.translateService = inject(TranslateService);
11415
+ this.dashboardChild = input(...(ngDevMode ? [undefined, { debugName: "dashboardChild" }] : []));
11416
+ this.isLinked = input.required(...(ngDevMode ? [{ debugName: "isLinked" }] : []));
11417
+ this.controls = input(PRESET_NAME.DEFAULT, ...(ngDevMode ? [{ debugName: "controls" }] : []));
11418
+ this.config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
11419
+ this.toggle = output();
11420
+ this.visibleControls = computed(() => {
11421
+ const controlsInput = this.controls();
11422
+ const presetDef = typeof controlsInput === 'string' ? CONTROL_PRESETS[controlsInput] : controlsInput;
11423
+ const refreshOption = this.config().refreshOption || REFRESH_OPTION.LIVE;
11424
+ const dashboardControls = presetDef[GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD];
11425
+ const activeControls = applyModeConstraints(dashboardControls, refreshOption);
11426
+ return activeControls.map(key => CONTROL_DISPLAY_CONFIG[key]).filter(Boolean);
11427
+ }, ...(ngDevMode ? [{ debugName: "visibleControls" }] : []));
11428
+ this.masterTooltipText = computed(() => {
11429
+ const controls = this.visibleControls();
11430
+ const clickToToggleLabel = this.translateService.instant(gettext('(click to toggle)'));
11431
+ if (!this.isLinked()) {
11432
+ const usingWidgetCustomTimeSettingsLabel = this.translateService.instant(gettext('Using widget custom time settings'));
11433
+ return `${usingWidgetCustomTimeSettingsLabel}\n${clickToToggleLabel}`;
11434
+ }
11435
+ const linkedNames = controls.map(control => this.translateService.instant(control.label));
11436
+ const formatter = new Intl.ListFormat(this.translateService.getCurrentLang()?.replace('_', '-'), {
11437
+ type: 'conjunction'
11438
+ });
11439
+ const linkedNamesList = formatter.format(linkedNames);
11440
+ const linkedToDashboardLabel = this.translateService.instant(gettext('Synced to dashboard:'));
11441
+ return `${linkedToDashboardLabel}\n${linkedNamesList}\n${clickToToggleLabel}`;
11442
+ }, ...(ngDevMode ? [{ debugName: "masterTooltipText" }] : []));
11443
+ }
11444
+ ngAfterViewInit() {
11445
+ const dashChild = this.getDashboardChild();
11446
+ if (dashChild && this.headerTemplateRef) {
11447
+ const headers = dashChild.additionalHeaderTemplates;
11448
+ if (!headers.includes(this.headerTemplateRef)) {
11449
+ headers.push(this.headerTemplateRef);
11450
+ }
11451
+ }
11452
+ }
11453
+ ngOnDestroy() {
11454
+ const dashChild = this.getDashboardChild();
11455
+ if (dashChild && this.headerTemplateRef) {
11456
+ const idx = dashChild.additionalHeaderTemplates.indexOf(this.headerTemplateRef);
11457
+ if (idx >= 0) {
11458
+ dashChild.additionalHeaderTemplates.splice(idx, 1);
11459
+ }
11460
+ }
11461
+ }
11462
+ getDashboardChild() {
11463
+ return this.dashboardChild() ?? this.injectedDashboardChild ?? null;
11464
+ }
11465
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11466
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: LinkButtonsComponent, isStandalone: true, selector: "c8y-link-buttons", inputs: { dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: false, transformFunction: null }, isLinked: { classPropertyName: "isLinked", publicName: "isLinked", isSignal: true, isRequired: true, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
11467
+ <ng-template #headerContent>
11468
+ <button
11469
+ class="btn-icon-dot-set"
11470
+ [class.active]="isLinked()"
11471
+ [attr.aria-label]="'Global context sync controls' | translate"
11472
+ [tooltip]="masterTooltipTemplate"
11473
+ delay="500"
11474
+ container="body"
11475
+ (click)="toggle.emit(!isLinked())"
11476
+ data-cy="global-context-link--all"
11477
+ >
11478
+ <span class="btn-icon-dot__item default" [class.active]="isLinked()">
11479
+ <i [c8yIcon]="isLinked() ? 'link' : 'unlink'"></i>
11480
+ </span>
11481
+ @for (control of visibleControls(); track control.stateKey) {
11482
+ <span
11483
+ [class]="control.cssClass + ' btn-icon-dot__item'"
11484
+ [class.active]="isLinked()"
11485
+ [attr.data-cy]="'global-context-link--' + control.stateKey"
11486
+ >
11487
+ <i [c8yIcon]="control.icon"></i>
11488
+ </span>
11489
+ }
11490
+ </button>
11491
+ <ng-template #masterTooltipTemplate>{{ masterTooltipText() }}</ng-template>
11492
+ </ng-template>
11493
+ `, isInline: true, dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
11494
+ }
11495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkButtonsComponent, decorators: [{
11496
+ type: Component,
11497
+ args: [{
11498
+ selector: 'c8y-link-buttons',
11499
+ standalone: true,
11500
+ imports: [IconDirective, TooltipModule, C8yTranslatePipe],
11501
+ template: `
11502
+ <ng-template #headerContent>
11503
+ <button
11504
+ class="btn-icon-dot-set"
11505
+ [class.active]="isLinked()"
11506
+ [attr.aria-label]="'Global context sync controls' | translate"
11507
+ [tooltip]="masterTooltipTemplate"
11508
+ delay="500"
11509
+ container="body"
11510
+ (click)="toggle.emit(!isLinked())"
11511
+ data-cy="global-context-link--all"
11512
+ >
11513
+ <span class="btn-icon-dot__item default" [class.active]="isLinked()">
11514
+ <i [c8yIcon]="isLinked() ? 'link' : 'unlink'"></i>
11515
+ </span>
11516
+ @for (control of visibleControls(); track control.stateKey) {
11517
+ <span
11518
+ [class]="control.cssClass + ' btn-icon-dot__item'"
11519
+ [class.active]="isLinked()"
11520
+ [attr.data-cy]="'global-context-link--' + control.stateKey"
11521
+ >
11522
+ <i [c8yIcon]="control.icon"></i>
11523
+ </span>
11524
+ }
11525
+ </button>
11526
+ <ng-template #masterTooltipTemplate>{{ masterTooltipText() }}</ng-template>
11527
+ </ng-template>
11528
+ `
11529
+ }]
11530
+ }], propDecorators: { headerTemplateRef: [{
11531
+ type: ViewChild,
11532
+ args: ['headerContent', { static: true, read: TemplateRef }]
11533
+ }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: false }] }], isLinked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLinked", required: true }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
11534
+
11535
+ class GlobalContextConnectorComponent {
11536
+ constructor() {
11537
+ this.eventService = inject(GlobalContextEventService);
11538
+ this.globalContextService = inject(GlobalContextService);
11539
+ this.globalContextUtils = inject(GlobalContextUtilsService);
11540
+ this.destroyRef = inject(DestroyRef);
11541
+ this.lastEmittedState = signal({}, ...(ngDevMode ? [{ debugName: "lastEmittedState" }] : []));
11542
+ this.controls = input(PRESET_NAME.DEFAULT, ...(ngDevMode ? [{ debugName: "controls" }] : []));
11543
+ this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
11544
+ this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
11545
+ this.dashboardChild = input.required(...(ngDevMode ? [{ debugName: "dashboardChild" }] : []));
11546
+ this.linked = input(undefined, ...(ngDevMode ? [{ debugName: "linked" }] : []));
11547
+ this.configChange = output();
11548
+ this.refresh = output();
11549
+ this.isLinked = signal(true, ...(ngDevMode ? [{ debugName: "isLinked" }] : []));
11550
+ this.syncExternalLinkState();
11551
+ this.subscribeToGlobalContext();
11552
+ this.registerWithGlobalContext();
11553
+ this.trackLoadingState();
11554
+ this.destroyRef.onDestroy(() => {
11555
+ this.globalContextService.unregister(this.componentId);
11556
+ this.globalContextService.unregisterLoading(this.componentId);
11557
+ });
11558
+ }
11559
+ onLinkToggle(linked) {
11560
+ this.isLinked.set(linked);
11561
+ if (linked) {
11562
+ const cached = this.eventService.getLatestValue(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11563
+ if (cached)
11564
+ this.emitIfChanged(cached);
11565
+ }
11566
+ }
11567
+ onLocalChange(event) {
11568
+ this.lastEmittedState.set(event.context);
11569
+ this.configChange.emit(event);
11570
+ }
11571
+ onLocalRefresh() {
11572
+ const { dateTimeContext } = this.config();
11573
+ if (!dateTimeContext) {
11574
+ this.refresh.emit();
11575
+ return;
11576
+ }
11577
+ const context = {
11578
+ ...this.config(),
11579
+ dateTimeContext: DateTimeContextUtil.normalizeForLive(dateTimeContext)
11580
+ };
11581
+ if (!this.emitIfChanged(context)) {
11582
+ this.refresh.emit();
11583
+ }
11584
+ }
11585
+ /** Emits configChange if context differs from last emitted state. Returns true if emitted. */
11586
+ emitIfChanged(context) {
11587
+ const diff = this.globalContextUtils.getChangedFields(this.lastEmittedState(), context);
11588
+ if (Object.keys(diff).length === 0)
11589
+ return false;
11590
+ this.lastEmittedState.set(context);
11591
+ this.configChange.emit({ context, diff });
11592
+ return true;
11593
+ }
11594
+ get componentId() {
11595
+ const data = this.dashboardChild()['data'];
11596
+ return data.id;
11597
+ }
11598
+ syncExternalLinkState() {
11599
+ effect(() => {
11600
+ const external = this.linked();
11601
+ if (external !== undefined)
11602
+ this.isLinked.set(external);
11603
+ });
11604
+ }
11605
+ subscribeToGlobalContext() {
11606
+ let subscription = null;
11607
+ effect(() => {
11608
+ subscription?.unsubscribe();
11609
+ if (!this.isLinked())
11610
+ return;
11611
+ const cached = this.eventService.getLatestValue(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11612
+ if (cached)
11613
+ this.emitIfChanged(cached);
11614
+ const stateChanges$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11615
+ const refresh$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.REFRESH).pipe(map$1(data => ({
11616
+ ...this.config(),
11617
+ dateTimeContext: {
11618
+ dateFrom: data.dateFrom,
11619
+ dateTo: data.dateTo,
11620
+ interval: data.interval
11621
+ }
11622
+ })));
11623
+ subscription = merge$1(stateChanges$, refresh$)
11624
+ .pipe(takeUntilDestroyed(this.destroyRef), catchError(() => EMPTY))
11625
+ .subscribe(state => {
11626
+ if (state)
11627
+ this.emitIfChanged(state);
11628
+ });
11629
+ });
11630
+ }
11631
+ registerWithGlobalContext() {
11632
+ effect(() => {
11633
+ if (this.isLinked()) {
11634
+ const settings = controlsToSettings(this.controls(), GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, this.config().refreshOption || REFRESH_OPTION.LIVE);
11635
+ this.globalContextService.register(this.componentId, settings);
11636
+ }
11637
+ else {
11638
+ this.globalContextService.unregister(this.componentId);
11639
+ }
11640
+ });
11641
+ }
11642
+ trackLoadingState() {
11643
+ effect(() => {
11644
+ const shouldTrack = this.isLinked() && this.isLoading();
11645
+ if (shouldTrack) {
11646
+ this.globalContextService.registerLoading(this.componentId);
11647
+ }
11648
+ else {
11649
+ this.globalContextService.unregisterLoading(this.componentId);
11650
+ }
11651
+ });
11652
+ }
11653
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextConnectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11654
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextConnectorComponent, isStandalone: true, selector: "c8y-global-context-connector", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: true, transformFunction: null }, linked: { classPropertyName: "linked", publicName: "linked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh" }, ngImport: i0, template: `
11655
+ <c8y-link-buttons
11656
+ [dashboardChild]="dashboardChild()"
11657
+ [isLinked]="isLinked()"
11658
+ [controls]="controls()"
11659
+ [config]="config()"
11660
+ (toggle)="onLinkToggle($event)"
11661
+ ></c8y-link-buttons>
11662
+
11663
+ @if (!isLinked()) {
11664
+ <c8y-context-controls
11665
+ [controls]="controls()"
11666
+ displayMode="dashboard"
11667
+ [config]="config()"
11668
+ [isLoading]="isLoading()"
11669
+ (configChange)="onLocalChange($event)"
11670
+ (refresh)="onLocalRefresh()"
11671
+ ></c8y-context-controls>
11672
+ }
11673
+ `, isInline: true, dependencies: [{ kind: "component", type: ContextControlsComponent, selector: "c8y-context-controls", inputs: ["controls", "displayMode", "config", "isLoading"], outputs: ["configChange", "refresh"] }, { kind: "component", type: LinkButtonsComponent, selector: "c8y-link-buttons", inputs: ["dashboardChild", "isLinked", "controls", "config"], outputs: ["toggle"] }] }); }
11674
+ }
11675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextConnectorComponent, decorators: [{
11676
+ type: Component,
11677
+ args: [{
11678
+ selector: 'c8y-global-context-connector',
11679
+ standalone: true,
11680
+ imports: [ContextControlsComponent, LinkButtonsComponent],
11681
+ template: `
11682
+ <c8y-link-buttons
11683
+ [dashboardChild]="dashboardChild()"
11684
+ [isLinked]="isLinked()"
11685
+ [controls]="controls()"
11686
+ [config]="config()"
11687
+ (toggle)="onLinkToggle($event)"
11688
+ ></c8y-link-buttons>
11689
+
11690
+ @if (!isLinked()) {
11691
+ <c8y-context-controls
11692
+ [controls]="controls()"
11693
+ displayMode="dashboard"
11694
+ [config]="config()"
11695
+ [isLoading]="isLoading()"
11696
+ (configChange)="onLocalChange($event)"
11697
+ (refresh)="onLocalRefresh()"
11698
+ ></c8y-context-controls>
11699
+ }
11700
+ `
11701
+ }]
11702
+ }], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: true }] }], linked: [{ type: i0.Input, args: [{ isSignal: true, alias: "linked", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
11703
+
11704
+ class LocalControlsComponent {
11705
+ constructor() {
11706
+ this.controls = input(PRESET_NAME.DEFAULT, ...(ngDevMode ? [{ debugName: "controls" }] : []));
11707
+ this.displayMode = input(GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG, ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
11708
+ this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
11709
+ this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
11710
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
11711
+ this.configChange = output();
11712
+ this.refresh = output();
11713
+ }
11714
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LocalControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11715
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: LocalControlsComponent, isStandalone: true, selector: "c8y-local-controls", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh" }, host: { attributes: { "data-local-controls": "true" }, properties: { "class.disabled": "disabled()" } }, ngImport: i0, template: `
11716
+ <div [class.disabled-overlay]="disabled()">
11717
+ <c8y-context-controls
11718
+ [controls]="controls()"
11719
+ [displayMode]="displayMode()"
11720
+ [config]="config()"
11721
+ [isLoading]="isLoading()"
11722
+ (configChange)="configChange.emit($event)"
11723
+ (refresh)="refresh.emit()"
11724
+ ></c8y-context-controls>
11725
+ </div>
11726
+ `, isInline: true, styles: [".disabled-overlay{position:relative;cursor:not-allowed}.disabled-overlay:after{content:\"\";position:absolute;inset:0;z-index:10}\n"], dependencies: [{ kind: "component", type: ContextControlsComponent, selector: "c8y-context-controls", inputs: ["controls", "displayMode", "config", "isLoading"], outputs: ["configChange", "refresh"] }] }); }
11727
+ }
11728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LocalControlsComponent, decorators: [{
11729
+ type: Component,
11730
+ args: [{ selector: 'c8y-local-controls', standalone: true, imports: [ContextControlsComponent], host: {
11731
+ 'data-local-controls': 'true',
11732
+ '[class.disabled]': 'disabled()'
11733
+ }, template: `
11734
+ <div [class.disabled-overlay]="disabled()">
11735
+ <c8y-context-controls
11736
+ [controls]="controls()"
11737
+ [displayMode]="displayMode()"
11738
+ [config]="config()"
11739
+ [isLoading]="isLoading()"
11740
+ (configChange)="configChange.emit($event)"
11741
+ (refresh)="refresh.emit()"
11742
+ ></c8y-context-controls>
11743
+ </div>
11744
+ `, styles: [".disabled-overlay{position:relative;cursor:not-allowed}.disabled-overlay:after{content:\"\";position:absolute;inset:0;z-index:10}\n"] }]
11745
+ }], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
11746
+
11747
+ /** @deprecated Use LocalControlsComponent or GlobalContextConnectorComponent instead */
10694
11748
 
10695
11749
  class GlobalContextModule {
10696
11750
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -10707,11 +11761,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
10707
11761
  }]
10708
11762
  }] });
10709
11763
 
10710
- // Export models
10711
-
10712
11764
  /**
10713
11765
  * Generated bundle index. Do not edit.
10714
11766
  */
10715
11767
 
10716
- export { AGGREGATIONS, AGGREGATION_ICONS, AGGREGATION_ICON_TYPE, AGGREGATION_LABELS, AGGREGATION_LIMITS, AGGREGATION_TEXTS, AGGREGATION_VALUES, AGGREGATION_VALUES_ARR, AggregationDisplayComponent, AggregationPickerComponent, AggregationPickerService, AggregationValidationService, AutoRefreshControlComponent, ConfigContextSelectorComponent, ConfigurationCollapseComponent, ConfigurationControlsComponent, ContextControlsComponent, DEFAULT_INTERVAL_VALUES, DEFAULT_WIDGET_TEMPLATE, DateContextQueryParamNames, DateTimeContextPickerComponent, DateTimeContextPickerService, GLOBAL_CONTEXT_DEFAULTS, GLOBAL_CONTEXT_DISPLAY_MODE, GLOBAL_CONTEXT_EVENTS, GLOBAL_CONTEXT_SOURCE, GlobalContextComponent, GlobalContextConfigComponent, GlobalContextEventService, GlobalContextFormService, GlobalContextInlineComponent, GlobalContextLinkControlsComponent, GlobalContextModule, GlobalContextNavigationService, GlobalContextQueryService, GlobalContextService, GlobalContextUtilsService, GlobalContextValidationService, GlobalContextWidgetConfigComponent, GlobalContextWidgetWrapperComponent, HistoryModeConfigurationControlsComponent, INTERVALS, INTERVAL_TITLES, IntervalPickerComponent, LINK_BTNS_CONFIG, LiveModeConfigurationControlsComponent, PreviewControlsComponent, REFRESH_OPTION, ROUTE_PATHS, RealtimeControlComponent, TIME_DURATION, TIME_INTERVAL, TIME_SPAN_MS, TIMING, TimeRangeDisplayComponent, UI_PRIORITIES, WIDGET_DISPLAY_MODE, WIDGET_FEATURE_MAP, WidgetConfigMigrationService, WidgetControlService, buildAggregationExtensions, buildBaselineControls, buildWidgetControlsFromPresets, createAutoRefreshHandlers, createResult, defineWidgetControls, guards, isAggregationLinked, isAggregationUnlinked, isAutoRefreshDisabled, isAutoRefreshEnabled, isConfig, isDashboard, isDateTimeContextLinked, isDateTimeContextUnlinked, isHistory, isLive, isViewAndConfig, mergePartialControls, resolveWidgetControlsInput, setAutoRefreshControlsVisibility, setAutoRefreshLinks, updateBothSettings };
11768
+ export { AGGREGATIONS, AGGREGATION_ICONS, AGGREGATION_ICON_TYPE, AGGREGATION_LABELS, AGGREGATION_LIMITS, AGGREGATION_TEXTS, AGGREGATION_VALUES, AGGREGATION_VALUES_ARR, AggregationDisplayComponent, AggregationPickerComponent, AggregationPickerService, AggregationValidationService, AutoRefreshControlComponent, CONTEXT_FEATURE, CONTROL_PRESETS, ConfigContextSelectorComponent, ConfigModeControls, ConfigModeControls as ConfigModeControlsComponent, ConfigurationCollapseComponent, ConfigurationControlsComponent, ContextControlsComponent$1 as ContextControlsComponent, DEFAULT_WIDGET_TEMPLATE, DateContextQueryParamNames, DateTimeContextPickerComponent, DateTimeContextPickerService, GLOBAL_CONTEXT_DEFAULTS, GLOBAL_CONTEXT_DISPLAY_MODE, GLOBAL_CONTEXT_EVENTS, GLOBAL_CONTEXT_SOURCE, GlobalContextComponent, GlobalContextConfigComponent, GlobalContextConnectorComponent, GlobalContextEventService, GlobalContextFormService, GlobalContextInlineComponent, GlobalContextLinkControlsComponent, GlobalContextModule, GlobalContextNavigationService, GlobalContextQueryService, GlobalContextService, GlobalContextUtilsService, GlobalContextValidationService, GlobalContextWidgetConfigComponent, GlobalContextWidgetWrapperComponent, HistoryModeConfigurationControlsComponent, INTERVALS, INTERVAL_TITLES, IntervalPickerComponent, LINK_BTNS_CONFIG, LinkButtonsComponent, LiveModeConfigurationControlsComponent, LocalControlsComponent, PRESET_NAME, PreviewControlsComponent, REFRESH_OPTION, ROUTE_PATHS, RealtimeControlComponent, TIME_DURATION, TIME_INTERVAL, TIME_SPAN_MS, TIMING, TimeRangeDisplayComponent, UI_PRIORITIES, WIDGET_DISPLAY_MODE, WIDGET_FEATURE_MAP, WidgetConfigMigrationService, WidgetControlService, applyModeConstraints, buildAggregationExtensions, buildBaselineControls, buildWidgetControlsFromPresets, controlsToSettings, createAutoRefreshHandlers, createResult, defineWidgetControls, getSupportedModes, guards, isAggregationLinked, isAggregationUnlinked, isAutoRefreshDisabled, isAutoRefreshEnabled, isConfig, isDashboard, isDateTimeContextLinked, isDateTimeContextUnlinked, isHistory, isLive, isViewAndConfig, mergePartialControls, resolveWidgetControlsInput, setAutoRefreshControlsVisibility, setAutoRefreshLinks, updateBothSettings };
10717
11769
  //# sourceMappingURL=c8y-ngx-components-global-context.mjs.map