@c8y/ngx-components 1021.22.54 → 1021.22.60

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 (84) hide show
  1. package/core/common/interval-based-reload.abstract.d.ts +13 -3
  2. package/core/common/interval-based-reload.abstract.d.ts.map +1 -1
  3. package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts +5 -4
  4. package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts.map +1 -1
  5. package/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.d.ts.map +1 -1
  6. package/core/dashboard/widgets-dashboard-event.service.d.ts +1 -0
  7. package/core/dashboard/widgets-dashboard-event.service.d.ts.map +1 -1
  8. package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts +9 -3
  9. package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts.map +1 -1
  10. package/core/login/login.component.d.ts.map +1 -1
  11. package/core/login/login.model.d.ts +8 -0
  12. package/core/login/login.model.d.ts.map +1 -1
  13. package/core/login/login.service.d.ts +2 -1
  14. package/core/login/login.service.d.ts.map +1 -1
  15. package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.d.ts +11 -8
  16. package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.d.ts.map +1 -1
  17. package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-file-exporter.component.d.ts +4 -2
  18. package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-file-exporter.component.d.ts.map +1 -1
  19. package/datapoints-export-selector/datapoints-export-selector.component.d.ts +6 -2
  20. package/datapoints-export-selector/datapoints-export-selector.component.d.ts.map +1 -1
  21. package/datapoints-export-selector/datapoints-export-selector.model.d.ts +17 -0
  22. package/datapoints-export-selector/datapoints-export-selector.model.d.ts.map +1 -1
  23. package/esm2022/core/common/aggregation/aggregation.model.mjs +2 -2
  24. package/esm2022/core/common/interval-based-reload.abstract.mjs +13 -13
  25. package/esm2022/core/dashboard/dashboard-child.component.mjs +3 -3
  26. package/esm2022/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.mjs +12 -10
  27. package/esm2022/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.mjs +2 -2
  28. package/esm2022/core/dashboard/widgets-dashboard-event.service.mjs +10 -1
  29. package/esm2022/core/dashboard/widgets-dashboard.component.mjs +3 -3
  30. package/esm2022/core/dashboard/wiget-time-context/widget-time-context-icon-bar/widget-time-context-icon-bar.component.mjs +3 -3
  31. package/esm2022/core/dashboard/wiget-time-context/widget-time-context.component.mjs +37 -15
  32. package/esm2022/core/login/login.component.mjs +4 -4
  33. package/esm2022/core/login/login.model.mjs +1 -1
  34. package/esm2022/core/login/login.service.mjs +7 -3
  35. package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.mjs +22 -27
  36. package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-file-exporter.component.mjs +29 -6
  37. package/esm2022/datapoints-export-selector/datapoints-export-selector.component.mjs +18 -8
  38. package/esm2022/datapoints-export-selector/datapoints-export-selector.model.mjs +18 -1
  39. package/esm2022/interval-picker/interval-picker.model.mjs +5 -1
  40. package/esm2022/widgets/definitions/datapoints-table/index.mjs +3 -2
  41. package/esm2022/widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.mjs +3 -3
  42. package/esm2022/widgets/implementations/alarms/alarm-widget-alarms-reload.component.mjs +17 -100
  43. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.mjs +45 -41
  44. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.mjs +35 -13
  45. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table/datapoints-table.component.mjs +3 -3
  46. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.mjs +81 -38
  47. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-widget.model.mjs +3 -5
  48. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +79 -36
  49. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-interval-picker.mjs +5 -1
  51. package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs +2 -1
  53. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +18 -101
  55. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +152 -88
  57. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components.mjs +84 -47
  59. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  60. package/interval-picker/interval-picker.model.d.ts +6 -0
  61. package/interval-picker/interval-picker.model.d.ts.map +1 -1
  62. package/locales/de.po +60 -62
  63. package/locales/es.po +10 -12
  64. package/locales/fr.po +109 -109
  65. package/locales/ja_JP.po +149 -94
  66. package/locales/ko.po +10 -12
  67. package/locales/locales.pot +3 -4
  68. package/locales/nl.po +11 -13
  69. package/locales/pl.po +11 -13
  70. package/locales/pt_BR.po +9 -11
  71. package/locales/zh_CN.po +9 -11
  72. package/locales/zh_TW.po +11 -13
  73. package/package.json +1 -1
  74. package/widgets/definitions/datapoints-table/index.d.ts.map +1 -1
  75. package/widgets/implementations/alarms/alarm-widget-alarms-reload.component.d.ts +18 -63
  76. package/widgets/implementations/alarms/alarm-widget-alarms-reload.component.d.ts.map +1 -1
  77. package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts +4 -3
  78. package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts.map +1 -1
  79. package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.d.ts +16 -8
  80. package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-reload/datapoints-reload.component.d.ts.map +1 -1
  81. package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts +23 -5
  82. package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts.map +1 -1
  83. package/widgets/implementations/datapoints-table/datapoints-table-widget.model.d.ts +4 -1
  84. package/widgets/implementations/datapoints-table/datapoints-table-widget.model.d.ts.map +1 -1
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Injector, InjectionToken, Injectable, Optional, Inject, isDevMode, inject, Pipe, EventEmitter, NgModule, LOCALE_ID, EnvironmentInjector, HostListener, NgModuleRef, createNgModule, Component, Output, HostBinding, forwardRef, SecurityContext, TemplateRef, APP_INITIALIZER, runInInjectionContext, effect, Self, SkipSelf, ViewChild, Attribute, ContentChild, ViewContainerRef, ContentChildren, ElementRef, ViewChildren, createComponent, importProvidersFrom, ChangeDetectionStrategy, SimpleChange, signal, Type, DestroyRef } from '@angular/core';
2
+ import { Directive, Input, Injector, InjectionToken, Injectable, Optional, Inject, isDevMode, inject, Pipe, EventEmitter, NgModule, LOCALE_ID, EnvironmentInjector, HostListener, NgModuleRef, createNgModule, Component, Output, HostBinding, forwardRef, SecurityContext, TemplateRef, APP_INITIALIZER, Self, SkipSelf, ViewChild, Attribute, ContentChild, ViewContainerRef, ContentChildren, ElementRef, ViewChildren, createComponent, runInInjectionContext, importProvidersFrom, ChangeDetectionStrategy, SimpleChange, signal, Type, DestroyRef } from '@angular/core';
3
3
  import * as i2$2 from 'ngx-bootstrap/dropdown';
4
4
  import { BsDropdownModule, BsDropdownDirective } from 'ngx-bootstrap/dropdown';
5
5
  import * as i3$1 from '@angular/cdk/a11y';
6
6
  import { A11yModule } from '@angular/cdk/a11y';
7
- import { castArray, flatten, uniq, sortBy, groupBy, camelCase, isEqual, isUndefined, throttle as throttle$1, keys, get, isNaN as isNaN$1, isFinite, each, mapValues, mapKeys, forEach, reduce, union, cloneDeep, uniqBy, assign, min, every, first, map as map$2, find, negate, upperFirst, memoize as memoize$1, property, some, entries, omitBy, isDate, orderBy, flatMap, isEmpty, filter as filter$1, snakeCase, matches, isString, clone, toNumber, isEqualWith, escape as escape$1, escapeRegExp, assignWith, set, omit, pick, has, transform, identity, flow, isNil, chunk, values, without, indexOf, parseInt as parseInt$1, kebabCase, forOwn } from 'lodash-es';
8
- import { merge, of, defer, combineLatest, race, isObservable, from, Subject, BehaviorSubject, NEVER, Observable, firstValueFrom, map as map$1, distinctUntilChanged as distinctUntilChanged$1, fromEvent, pipe, throwError, concat, EMPTY, timer, fromEventPattern, startWith as startWith$1, switchMap as switchMap$1, takeUntil as takeUntil$1, empty, forkJoin, ReplaySubject, interval, shareReplay as shareReplay$1, mergeMap as mergeMap$1 } from 'rxjs';
7
+ import { castArray, flatten, uniq, sortBy, groupBy, camelCase, isEqual, isUndefined, throttle as throttle$1, keys, get, isNaN as isNaN$1, isFinite, each, mapValues, mapKeys, forEach, reduce, union, cloneDeep, uniqBy, assign, min, every, first, map as map$2, find, negate, upperFirst, memoize as memoize$1, property, some, entries, omitBy, isDate, orderBy, flatMap, isEmpty, filter as filter$2, snakeCase, matches, isString, clone, toNumber, isEqualWith, escape as escape$1, escapeRegExp, assignWith, set, omit, pick, has, transform, identity, flow, isNil, chunk, values, without, indexOf, parseInt as parseInt$1, kebabCase, forOwn } from 'lodash-es';
8
+ import { merge, of, defer, combineLatest, race, isObservable, from, Subject, BehaviorSubject, NEVER, Observable, firstValueFrom, map as map$1, distinctUntilChanged as distinctUntilChanged$1, fromEvent, pipe, throwError, concat, filter as filter$1, tap as tap$1, EMPTY, timer, fromEventPattern, startWith as startWith$1, switchMap as switchMap$1, takeUntil as takeUntil$1, empty, forkJoin, ReplaySubject, interval, shareReplay as shareReplay$1, mergeMap as mergeMap$1 } from 'rxjs';
9
9
  import { map, distinctUntilChanged, filter, startWith, switchMap, take, shareReplay, scan, debounceTime, share, takeUntil, tap, catchError, first as first$1, retryWhen, delay, concatMap, debounce, sample, withLatestFrom, mergeMap, every as every$1, toArray, merge as merge$1, expand, skip, mapTo, finalize, reduce as reduce$1, combineLatestWith } from 'rxjs/operators';
10
10
  import * as i1 from '@c8y/client';
11
11
  import { ApplicationAvailability, OperationStatus, TenantLoginOptionType, UserManagementSource, GrantType, ApplicationType, aggregationType, BearerAuthFromSessionStorage, FetchClient, Client, PasswordStrength, QueriesUtil, InventoryService, UserService, ApplicationService, TenantService, AlarmService, Service } from '@c8y/client';
@@ -9086,7 +9086,7 @@ const AGGREGATION_ICONS = {
9086
9086
  DAILY: 'calendar-o'
9087
9087
  };
9088
9088
  const AGGREGATION_TEXTS = {
9089
- disabled: gettext$1('No aggregation with realtime enabled'),
9089
+ disabled: gettext$1('No aggregation with real-time or auto-refresh enabled'),
9090
9090
  undefined: gettext$1('No aggregation'),
9091
9091
  MINUTELY: gettext$1('Minutely aggregation'),
9092
9092
  HOURLY: gettext$1('Hourly aggregation'),
@@ -9479,7 +9479,7 @@ class IntervalBasedReload {
9479
9479
  return;
9480
9480
  }
9481
9481
  // Checks if the user has stopped scrolling and the countdown is currently hidden
9482
- const onUserScrollTopShow = !this.isScrolling && this.hideCountdown;
9482
+ const onUserScrollTopShow = !this.isScrolling && this.countdownSubscription?.closed && this.hideCountdown;
9483
9483
  if (onUserScrollTopShow) {
9484
9484
  this.isIntervalRefreshToggleOn = true;
9485
9485
  this.enableCountdown();
@@ -9502,14 +9502,15 @@ class IntervalBasedReload {
9502
9502
  */
9503
9503
  onToggleCountdownButtonState($event) {
9504
9504
  $event.preventDefault();
9505
- this.isIntervalRefreshToggleOn = !this.isIntervalRefreshToggleOn;
9505
+ this.isIntervalRefreshToggleOn = !this.isRefreshDisabled && !this.isIntervalRefreshToggleOn;
9506
9506
  this.updateCountdownButtonTooltipText();
9507
9507
  if (!this.isIntervalRefreshToggleOn) {
9508
9508
  this.disableCountdown();
9509
9509
  this.manuallyDisabledCountdown = true;
9510
9510
  return;
9511
9511
  }
9512
- if (this.isIntervalRefreshToggleOn) {
9512
+ const onRefreshToggleOn = this.isIntervalRefreshToggleOn && this.countdownSubscription.closed;
9513
+ if (onRefreshToggleOn) {
9513
9514
  this.enableCountdown();
9514
9515
  this.manuallyDisabledCountdown = false;
9515
9516
  }
@@ -9524,14 +9525,12 @@ class IntervalBasedReload {
9524
9525
  * @param injector - The injector used to provide necessary dependencies
9525
9526
  * within the `runInInjectionContext`.
9526
9527
  */
9527
- startCountdown(injector) {
9528
- runInInjectionContext(injector, () => {
9529
- effect(() => {
9530
- if (!this.isLoading()) {
9531
- this.countdownIntervalComponent?.start();
9532
- }
9533
- });
9534
- });
9528
+ startCountdown() {
9529
+ this.countdownSubscription = this.isLoading
9530
+ .pipe(filter$1(isLoading => !Boolean(isLoading)), tap$1(() => {
9531
+ this.countdownIntervalComponent?.start();
9532
+ }))
9533
+ .subscribe();
9535
9534
  }
9536
9535
  /**
9537
9536
  * Disables and hides the countdown timer.
@@ -9542,6 +9541,7 @@ class IntervalBasedReload {
9542
9541
  * conceal the countdown timer.
9543
9542
  */
9544
9543
  disableCountdown() {
9544
+ this.countdownSubscription.unsubscribe();
9545
9545
  this.countdownIntervalComponent?.stop();
9546
9546
  this.hideCountdown = true;
9547
9547
  }
@@ -10951,9 +10951,9 @@ class ActionBarComponent {
10951
10951
  });
10952
10952
  }
10953
10953
  ngOnInit() {
10954
- this.right$ = this.items$.pipe(map(items => filter$1(items, { placement: 'right' })), map(items => sortBy(items, this.byPriority)));
10955
- this.left$ = this.items$.pipe(map(items => filter$1(items, { placement: 'left' })), map(items => sortBy(items, this.byPriority)));
10956
- this.more$ = this.items$.pipe(map(items => filter$1(items, { placement: 'more' })), map(items => sortBy(items, this.byPriority)));
10954
+ this.right$ = this.items$.pipe(map(items => filter$2(items, { placement: 'right' })), map(items => sortBy(items, this.byPriority)));
10955
+ this.left$ = this.items$.pipe(map(items => filter$2(items, { placement: 'left' })), map(items => sortBy(items, this.byPriority)));
10956
+ this.more$ = this.items$.pipe(map(items => filter$2(items, { placement: 'more' })), map(items => sortBy(items, this.byPriority)));
10957
10957
  this.hidden$ = this.items$.pipe(map(items => {
10958
10958
  return !(items && items.length);
10959
10959
  }));
@@ -12830,15 +12830,19 @@ class LoginService {
12830
12830
  window.location.href = `${initRequest}${originUriParam}`;
12831
12831
  }
12832
12832
  }
12833
- loginBySso(sessionState, code) {
12833
+ loginBySso({ code, sessionState }) {
12834
12834
  const params = {
12835
12835
  method: 'GET',
12836
12836
  headers: {
12837
12837
  Accept: 'text/html,application/xhtml+xml'
12838
12838
  }
12839
12839
  };
12840
+ let url = `/tenant/oauth?code=${encodeURIComponent(code)}`;
12841
+ if (sessionState) {
12842
+ url += `&session_state=${encodeURIComponent(sessionState)}`;
12843
+ }
12840
12844
  return this.client
12841
- .fetch(`/tenant/oauth?session_state=${sessionState}&code=${code}`, params)
12845
+ .fetch(url, params)
12842
12846
  .then(res => this.handleErrorStatusCodes(res))
12843
12847
  .catch(ex => {
12844
12848
  this.showSsoError(ex);
@@ -14879,7 +14883,7 @@ class PasswordService {
14879
14883
  return password.search(/[^0-9a-zA-Z]+/) !== -1;
14880
14884
  }
14881
14885
  getStrengthColor(password) {
14882
- const passwordStrength = filter$1([
14886
+ const passwordStrength = filter$2([
14883
14887
  this.hasLowerCase(password),
14884
14888
  this.hasUpperCase(password),
14885
14889
  this.hasNumbers(password),
@@ -15186,7 +15190,7 @@ class PasswordStrengthCheckerService {
15186
15190
  return password.search(/[^0-9a-zA-Z]+/) !== -1;
15187
15191
  }
15188
15192
  getStrengthColor(password) {
15189
- const passwordStrength = filter$1([
15193
+ const passwordStrength = filter$2([
15190
15194
  this.hasLowerCase(password),
15191
15195
  this.hasUpperCase(password),
15192
15196
  this.hasNumbers(password),
@@ -16865,7 +16869,7 @@ class LoginComponent {
16865
16869
  getSsoData() {
16866
16870
  const code = this.getParamAndClear('code');
16867
16871
  const sessionState = this.getParamAndClear('session_state');
16868
- if (sessionState && code) {
16872
+ if (code) {
16869
16873
  return { sessionState, code };
16870
16874
  }
16871
16875
  const ssoError = this.getParamAndClear('error');
@@ -16875,13 +16879,13 @@ class LoginComponent {
16875
16879
  }
16876
16880
  }
16877
16881
  handleSso(ssoData) {
16878
- if (ssoData.ssoError) {
16882
+ if ('ssoError' in ssoData) {
16879
16883
  this.loginService.showSsoError(decodeURIComponent(ssoData.ssoErrorDescription).replace(/\+/g, '%20'));
16880
16884
  this.reset();
16881
16885
  }
16882
16886
  else {
16883
16887
  this.loginService
16884
- .loginBySso(ssoData.sessionState, ssoData.code)
16888
+ .loginBySso(ssoData)
16885
16889
  .then(() => this.loginService.login())
16886
16890
  .catch(e => {
16887
16891
  this.reset();
@@ -28098,11 +28102,11 @@ class WidgetTimeContextIconBar {
28098
28102
  }
28099
28103
  }
28100
28104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetTimeContextIconBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
28101
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetTimeContextIconBar, selector: "c8y-widget-time-context-icon-bar", inputs: { config: "config" }, ngImport: i0, template: "<span class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-clean btn-no-focus\"\n [attr.aria-label]=\"'Aggregation' | translate\"\n tooltip=\"{{\n (config?.aggregation ? AGGREGATION_TEXTS[config.aggregation] : AGGREGATION_TEXTS.undefined)\n | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config.displaySettings.globalAggregationContext\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n config?.aggregation ? AGGREGATION_ICONS[config.aggregation] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n </button>\n <button\n class=\"btn c8y-realtime btn-no-focus\"\n [attr.aria-label]=\"(config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate\"\n tooltip=\"{{ (config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{ active: config?.realtime, inactive: !config?.realtime }\"\n ></span>\n </button>\n <button\n class=\"btn btn-clean btn-no-focus p-l-4 p-r-0\"\n [attr.aria-label]=\"globalContextButtonText | translate\"\n [tooltip]=\"globalContextButtonText | translate\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"dashboard-child--global-date-context-indicator\"\n >\n <span class=\"tag tag--success chip\">\n <i c8yIcon=\"clock\"></i>\n {{ 'Realtime' | translate }}\n </span>\n </button>\n</span>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.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: i1$1.TranslatePipe, name: "translate" }] }); }
28105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetTimeContextIconBar, selector: "c8y-widget-time-context-icon-bar", inputs: { config: "config" }, ngImport: i0, template: "<span class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-clean btn-no-focus\"\n [attr.aria-label]=\"'Aggregation' | translate\"\n tooltip=\"{{\n (config?.aggregation ? AGGREGATION_TEXTS[config.aggregation] : AGGREGATION_TEXTS.undefined)\n | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config.displaySettings.globalAggregationContext\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n config?.aggregation ? AGGREGATION_ICONS[config.aggregation] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n </button>\n <button\n class=\"btn c8y-realtime btn-no-focus\"\n [attr.aria-label]=\"(config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate\"\n tooltip=\"{{ (config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config?.widgetInstanceGlobalTimeContext\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{ active: config?.realtime, inactive: !config?.realtime }\"\n ></span>\n </button>\n <button\n class=\"btn btn-clean btn-no-focus p-l-4 p-r-0\"\n [attr.aria-label]=\"globalContextButtonText | translate\"\n [tooltip]=\"globalContextButtonText | translate\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"dashboard-child--global-date-context-indicator\"\n *ngIf=\"config?.widgetInstanceGlobalTimeContext\"\n >\n <span class=\"tag tag--success chip\">\n <i c8yIcon=\"clock\"></i>\n {{ 'Realtime' | translate }}\n </span>\n </button>\n</span>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.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: i1$1.TranslatePipe, name: "translate" }] }); }
28102
28106
  }
28103
28107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetTimeContextIconBar, decorators: [{
28104
28108
  type: Component,
28105
- args: [{ selector: 'c8y-widget-time-context-icon-bar', template: "<span class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-clean btn-no-focus\"\n [attr.aria-label]=\"'Aggregation' | translate\"\n tooltip=\"{{\n (config?.aggregation ? AGGREGATION_TEXTS[config.aggregation] : AGGREGATION_TEXTS.undefined)\n | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config.displaySettings.globalAggregationContext\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n config?.aggregation ? AGGREGATION_ICONS[config.aggregation] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n </button>\n <button\n class=\"btn c8y-realtime btn-no-focus\"\n [attr.aria-label]=\"(config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate\"\n tooltip=\"{{ (config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{ active: config?.realtime, inactive: !config?.realtime }\"\n ></span>\n </button>\n <button\n class=\"btn btn-clean btn-no-focus p-l-4 p-r-0\"\n [attr.aria-label]=\"globalContextButtonText | translate\"\n [tooltip]=\"globalContextButtonText | translate\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"dashboard-child--global-date-context-indicator\"\n >\n <span class=\"tag tag--success chip\">\n <i c8yIcon=\"clock\"></i>\n {{ 'Realtime' | translate }}\n </span>\n </button>\n</span>\n" }]
28109
+ args: [{ selector: 'c8y-widget-time-context-icon-bar', template: "<span class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-clean btn-no-focus\"\n [attr.aria-label]=\"'Aggregation' | translate\"\n tooltip=\"{{\n (config?.aggregation ? AGGREGATION_TEXTS[config.aggregation] : AGGREGATION_TEXTS.undefined)\n | translate\n }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config.displaySettings.globalAggregationContext\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"icon-14\"\n [c8yIcon]=\"\n config?.aggregation ? AGGREGATION_ICONS[config.aggregation] : AGGREGATION_ICONS.undefined\n \"\n ></i>\n </button>\n <button\n class=\"btn c8y-realtime btn-no-focus\"\n [attr.aria-label]=\"(config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate\"\n tooltip=\"{{ (config?.realtime ? 'Realtime active' : 'Realtime inactive') | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"config?.widgetInstanceGlobalTimeContext\"\n >\n <span\n class=\"c8y-pulse m-0\"\n [ngClass]=\"{ active: config?.realtime, inactive: !config?.realtime }\"\n ></span>\n </button>\n <button\n class=\"btn btn-clean btn-no-focus p-l-4 p-r-0\"\n [attr.aria-label]=\"globalContextButtonText | translate\"\n [tooltip]=\"globalContextButtonText | translate\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"dashboard-child--global-date-context-indicator\"\n *ngIf=\"config?.widgetInstanceGlobalTimeContext\"\n >\n <span class=\"tag tag--success chip\">\n <i c8yIcon=\"clock\"></i>\n {{ 'Realtime' | translate }}\n </span>\n </button>\n</span>\n" }]
28106
28110
  }], propDecorators: { config: [{
28107
28111
  type: Input
28108
28112
  }] } });
@@ -28342,13 +28346,13 @@ class DashboardChildComponent {
28342
28346
  return false;
28343
28347
  }
28344
28348
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DashboardChildComponent, deps: [{ token: DashboardComponent }, { token: i1$2.DomSanitizer }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
28345
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DashboardChildComponent, selector: "c8y-dashboard-child", inputs: { x: "x", y: "y", width: "width", height: "height", data: "data", margin: "margin", useIntersection: "useIntersection", isFrozen: "isFrozen", canToggleFullscreen: "canToggleFullscreen", editMode: "editMode", class: "class" }, outputs: { changeStart: "changeStart", changeEnd: "changeEnd", toggleFullscreen: "toggleFullscreen" }, host: { properties: { "class.fullscreen": "this.fullscreen", "attr.style": "this.inlineStyle" }, classAttribute: "dashboard-grid-child" }, queries: [{ propertyName: "templateActions", predicate: DashboardChildActionComponent }], usesOnChanges: true, ngImport: i0, template: "<div cdkDropList>\n <div\n class=\"card-placeholder\"\n *ngIf=\"isResize\"\n ></div>\n <div\n [ngStyle]=\"{ width: _pxWidth, height: _pxHeight }\"\n [ngClass]=\"klasses\"\n cdkDrag\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n [cdkDragDisabled]=\"(isOneColumnView$ | async) || !editMode || fullscreen\"\n >\n <div\n class=\"card-header-actions card-header-grid\"\n [ngClass]=\"{\n 'drag-handle': editMode && !fullscreen,\n draggableCursor: editMode && !fullscreen\n }\"\n cdkDragHandle\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n <div\n class=\"header-actions d-flex a-i-center\"\n *ngIf=\"actions.length > 0\"\n >\n <c8y-widget-time-context-icon-bar\n *ngIf=\"data?.config?.displaySettings && data?.config?.widgetInstanceGlobalTimeContext\"\n [config]=\"data.config\"\n ></c8y-widget-time-context-icon-bar>\n <c8y-widget-auto-refresh-context-icon-bar\n *ngIf=\"\n data?.config?.widgetInstanceGlobalAutoRefreshContext &&\n data?.config?.displaySettings.globalAutoRefreshContext\n \"\n ></c8y-widget-auto-refresh-context-icon-bar>\n\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"fullscreen ? ('Exit full screen' | translate) : ('Full screen' | translate)\"\n delay=\"500\"\n container=\"body\"\n [disabled]=\"editMode || !canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"></i>\n </button>\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n [container]=\"'body'\"\n >\n <button\n class=\"btn btn-icon c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n aria-haspopup=\"true\"\n *ngIf=\"editMode\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click &quot;Edit widgets&quot; to unlock' | translate\"\n tooltip=\"{{ 'Click &quot;Edit widgets&quot; to unlock' | translate }}\"\n container=\"body\"\n *ngIf=\"!editMode\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i [c8yIcon]=\"'lock'\"></i>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n style=\"right: -1px\"\n *dropdownMenu\n >\n <ng-container *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"resize-handle hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n cdkDrag\n [cdkDragDisabled]=\"!editMode || fullscreen\"\n (cdkDragStarted)=\"resizeStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n ></div>\n <div\n class=\"resize-icon hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n ></div>\n\n <div\n class=\"card-placeholder\"\n *cdkDragPlaceholder\n ></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5$3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i2$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: WidgetAutoRefreshContextIconBarComponent, selector: "c8y-widget-auto-refresh-context-icon-bar" }, { kind: "component", type: WidgetTimeContextIconBar, selector: "c8y-widget-time-context-icon-bar", inputs: ["config"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
28349
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DashboardChildComponent, selector: "c8y-dashboard-child", inputs: { x: "x", y: "y", width: "width", height: "height", data: "data", margin: "margin", useIntersection: "useIntersection", isFrozen: "isFrozen", canToggleFullscreen: "canToggleFullscreen", editMode: "editMode", class: "class" }, outputs: { changeStart: "changeStart", changeEnd: "changeEnd", toggleFullscreen: "toggleFullscreen" }, host: { properties: { "class.fullscreen": "this.fullscreen", "attr.style": "this.inlineStyle" }, classAttribute: "dashboard-grid-child" }, queries: [{ propertyName: "templateActions", predicate: DashboardChildActionComponent }], usesOnChanges: true, ngImport: i0, template: "<div cdkDropList>\n <div\n class=\"card-placeholder\"\n *ngIf=\"isResize\"\n ></div>\n <div\n [ngStyle]=\"{ width: _pxWidth, height: _pxHeight }\"\n [ngClass]=\"klasses\"\n cdkDrag\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n [cdkDragDisabled]=\"(isOneColumnView$ | async) || !editMode || fullscreen\"\n >\n <div\n class=\"card-header-actions card-header-grid\"\n [ngClass]=\"{\n 'drag-handle': editMode && !fullscreen,\n draggableCursor: editMode && !fullscreen\n }\"\n cdkDragHandle\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n <div\n class=\"header-actions d-flex a-i-center\"\n *ngIf=\"actions.length > 0\"\n >\n <c8y-widget-time-context-icon-bar\n *ngIf=\"\n data?.config?.displaySettings &&\n (data?.config?.widgetInstanceGlobalTimeContext ||\n data?.config?.widgetInstanceGlobalAutoRefreshContext)\n \"\n [config]=\"data.config\"\n ></c8y-widget-time-context-icon-bar>\n <c8y-widget-auto-refresh-context-icon-bar\n *ngIf=\"\n data?.config?.widgetInstanceGlobalAutoRefreshContext &&\n data?.config?.displaySettings.globalAutoRefreshContext\n \"\n ></c8y-widget-auto-refresh-context-icon-bar>\n\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"fullscreen ? ('Exit full screen' | translate) : ('Full screen' | translate)\"\n [delay]=\"500\"\n container=\"body\"\n [disabled]=\"editMode || !canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"></i>\n </button>\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n [container]=\"'body'\"\n >\n <button\n class=\"btn btn-icon c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n aria-haspopup=\"true\"\n *ngIf=\"editMode\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click &quot;Edit widgets&quot; to unlock' | translate\"\n tooltip=\"{{ 'Click &quot;Edit widgets&quot; to unlock' | translate }}\"\n container=\"body\"\n *ngIf=\"!editMode\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i [c8yIcon]=\"'lock'\"></i>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n style=\"right: -1px\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n *dropdownMenu\n >\n <ng-container *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"resize-handle hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n cdkDrag\n [cdkDragDisabled]=\"!editMode || fullscreen\"\n (cdkDragStarted)=\"resizeStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n ></div>\n <div\n class=\"resize-icon hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n ></div>\n\n <div\n class=\"card-placeholder\"\n *cdkDragPlaceholder\n ></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5$3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i2$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: WidgetAutoRefreshContextIconBarComponent, selector: "c8y-widget-auto-refresh-context-icon-bar" }, { kind: "component", type: WidgetTimeContextIconBar, selector: "c8y-widget-time-context-icon-bar", inputs: ["config"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
28346
28350
  }
28347
28351
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DashboardChildComponent, decorators: [{
28348
28352
  type: Component,
28349
28353
  args: [{ selector: 'c8y-dashboard-child', host: {
28350
28354
  class: 'dashboard-grid-child'
28351
- }, template: "<div cdkDropList>\n <div\n class=\"card-placeholder\"\n *ngIf=\"isResize\"\n ></div>\n <div\n [ngStyle]=\"{ width: _pxWidth, height: _pxHeight }\"\n [ngClass]=\"klasses\"\n cdkDrag\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n [cdkDragDisabled]=\"(isOneColumnView$ | async) || !editMode || fullscreen\"\n >\n <div\n class=\"card-header-actions card-header-grid\"\n [ngClass]=\"{\n 'drag-handle': editMode && !fullscreen,\n draggableCursor: editMode && !fullscreen\n }\"\n cdkDragHandle\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n <div\n class=\"header-actions d-flex a-i-center\"\n *ngIf=\"actions.length > 0\"\n >\n <c8y-widget-time-context-icon-bar\n *ngIf=\"data?.config?.displaySettings && data?.config?.widgetInstanceGlobalTimeContext\"\n [config]=\"data.config\"\n ></c8y-widget-time-context-icon-bar>\n <c8y-widget-auto-refresh-context-icon-bar\n *ngIf=\"\n data?.config?.widgetInstanceGlobalAutoRefreshContext &&\n data?.config?.displaySettings.globalAutoRefreshContext\n \"\n ></c8y-widget-auto-refresh-context-icon-bar>\n\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"fullscreen ? ('Exit full screen' | translate) : ('Full screen' | translate)\"\n delay=\"500\"\n container=\"body\"\n [disabled]=\"editMode || !canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"></i>\n </button>\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n [container]=\"'body'\"\n >\n <button\n class=\"btn btn-icon c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n aria-haspopup=\"true\"\n *ngIf=\"editMode\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click &quot;Edit widgets&quot; to unlock' | translate\"\n tooltip=\"{{ 'Click &quot;Edit widgets&quot; to unlock' | translate }}\"\n container=\"body\"\n *ngIf=\"!editMode\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i [c8yIcon]=\"'lock'\"></i>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n style=\"right: -1px\"\n *dropdownMenu\n >\n <ng-container *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"resize-handle hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n cdkDrag\n [cdkDragDisabled]=\"!editMode || fullscreen\"\n (cdkDragStarted)=\"resizeStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n ></div>\n <div\n class=\"resize-icon hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n ></div>\n\n <div\n class=\"card-placeholder\"\n *cdkDragPlaceholder\n ></div>\n </div>\n</div>\n" }]
28355
+ }, template: "<div cdkDropList>\n <div\n class=\"card-placeholder\"\n *ngIf=\"isResize\"\n ></div>\n <div\n [ngStyle]=\"{ width: _pxWidth, height: _pxHeight }\"\n [ngClass]=\"klasses\"\n cdkDrag\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n [cdkDragDisabled]=\"(isOneColumnView$ | async) || !editMode || fullscreen\"\n >\n <div\n class=\"card-header-actions card-header-grid\"\n [ngClass]=\"{\n 'drag-handle': editMode && !fullscreen,\n draggableCursor: editMode && !fullscreen\n }\"\n cdkDragHandle\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n <div\n class=\"header-actions d-flex a-i-center\"\n *ngIf=\"actions.length > 0\"\n >\n <c8y-widget-time-context-icon-bar\n *ngIf=\"\n data?.config?.displaySettings &&\n (data?.config?.widgetInstanceGlobalTimeContext ||\n data?.config?.widgetInstanceGlobalAutoRefreshContext)\n \"\n [config]=\"data.config\"\n ></c8y-widget-time-context-icon-bar>\n <c8y-widget-auto-refresh-context-icon-bar\n *ngIf=\"\n data?.config?.widgetInstanceGlobalAutoRefreshContext &&\n data?.config?.displaySettings.globalAutoRefreshContext\n \"\n ></c8y-widget-auto-refresh-context-icon-bar>\n\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"fullscreen ? ('Exit full screen' | translate) : ('Full screen' | translate)\"\n [delay]=\"500\"\n container=\"body\"\n [disabled]=\"editMode || !canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"></i>\n </button>\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n [container]=\"'body'\"\n >\n <button\n class=\"btn btn-icon c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n aria-haspopup=\"true\"\n *ngIf=\"editMode\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click &quot;Edit widgets&quot; to unlock' | translate\"\n tooltip=\"{{ 'Click &quot;Edit widgets&quot; to unlock' | translate }}\"\n container=\"body\"\n *ngIf=\"!editMode\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i [c8yIcon]=\"'lock'\"></i>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n style=\"right: -1px\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n *dropdownMenu\n >\n <ng-container *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"resize-handle hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n cdkDrag\n [cdkDragDisabled]=\"!editMode || fullscreen\"\n (cdkDragStarted)=\"resizeStarted($event)\"\n (cdkDragEnded)=\"reset($event)\"\n ></div>\n <div\n class=\"resize-icon hidden-xs\"\n *ngIf=\"editMode && !isDragging && !fullscreen\"\n ></div>\n\n <div\n class=\"card-placeholder\"\n *cdkDragPlaceholder\n ></div>\n </div>\n</div>\n" }]
28352
28356
  }], ctorParameters: () => [{ type: DashboardComponent }, { type: i1$2.DomSanitizer }, { type: i0.ElementRef }], propDecorators: { templateActions: [{
28353
28357
  type: ContentChildren,
28354
28358
  args: [DashboardChildActionComponent]
@@ -28426,6 +28430,15 @@ class WidgetsDashboardEventService {
28426
28430
  this.lastValueByEvent[event.type] = event.data;
28427
28431
  this.events$.next(event);
28428
28432
  }
28433
+ // When a dashboard has a multiple tabs, and not all of them has a realtime global context control
28434
+ // we need to set the realtime to false when switching between tabs to make aggregation selector not to be always disabled
28435
+ // while global auto-refresh context control is available.
28436
+ setRealtimeTimeContextSetting(value = false) {
28437
+ this.lastValueByEvent.TIME_CONTEXT = {
28438
+ ...this.lastValueByEvent.TIME_CONTEXT,
28439
+ realtime: value
28440
+ };
28441
+ }
28429
28442
  /**
28430
28443
  * @ignore
28431
28444
  */
@@ -28809,7 +28822,7 @@ class WidgetTimeContextComponent {
28809
28822
  /**
28810
28823
  * @ignore only DI.
28811
28824
  */
28812
- constructor(widgetEventService, dashboardChild, formBuilder, queryService, helperService, router, actionBarService, aggregationService) {
28825
+ constructor(widgetEventService, dashboardChild, formBuilder, queryService, helperService, router, actionBarService, aggregationService, route) {
28813
28826
  this.widgetEventService = widgetEventService;
28814
28827
  this.dashboardChild = dashboardChild;
28815
28828
  this.formBuilder = formBuilder;
@@ -28818,6 +28831,7 @@ class WidgetTimeContextComponent {
28818
28831
  this.router = router;
28819
28832
  this.actionBarService = actionBarService;
28820
28833
  this.aggregationService = aggregationService;
28834
+ this.route = route;
28821
28835
  this.INTERVAL_TITLES = INTERVAL_TITLES;
28822
28836
  this.DATE_FORMAT = 'short';
28823
28837
  /**
@@ -28876,6 +28890,9 @@ class WidgetTimeContextComponent {
28876
28890
  if (this.canDecouple) {
28877
28891
  this.dashboardChild.addActions([this.action]);
28878
28892
  }
28893
+ this.route.queryParams
28894
+ .pipe(distinctUntilChanged(), map(params => params['globalContextAutoRefresh'] === 'true'), takeUntil(this.destroy$))
28895
+ .subscribe(this.handleAutoRefreshChange.bind(this));
28879
28896
  }
28880
28897
  /**
28881
28898
  * Toggles the coupling on or off.
@@ -28927,6 +28944,7 @@ class WidgetTimeContextComponent {
28927
28944
  ngOnDestroy() {
28928
28945
  this.unsubscribeFromGlobalContext();
28929
28946
  this.clearQueryParamsIfNeeded();
28947
+ this.widgetEventService.setRealtimeTimeContextSetting();
28930
28948
  this.destroy$.next();
28931
28949
  this.destroy$.complete();
28932
28950
  }
@@ -29135,9 +29153,7 @@ class WidgetTimeContextComponent {
29135
29153
  };
29136
29154
  }
29137
29155
  startRealtime() {
29138
- this.form.controls.temporaryUserSelectedFromDate.disable();
29139
- this.form.controls.temporaryUserSelectedToDate.disable();
29140
- this.form.controls.aggregation.disable();
29156
+ this.disableDateRangeAndAggregation();
29141
29157
  this.realtimeSubscription = interval(this.REALTIME_INTERVAL)
29142
29158
  .pipe(takeUntil(this.destroy$))
29143
29159
  .subscribe(() => {
@@ -29151,11 +29167,30 @@ class WidgetTimeContextComponent {
29151
29167
  });
29152
29168
  });
29153
29169
  }
29170
+ handleAutoRefreshChange(isEnabled) {
29171
+ this.isAutoRefreshEnabled = isEnabled;
29172
+ isEnabled ? this.onDisableAutoRefresh() : this.enableDateRangeAndAggregation();
29173
+ }
29174
+ onDisableAutoRefresh() {
29175
+ this.form.controls.aggregation.setValue(null);
29176
+ this.disableDateRangeAndAggregation();
29177
+ }
29178
+ disableDateRangeAndAggregation() {
29179
+ this.form.controls.temporaryUserSelectedFromDate.disable();
29180
+ this.form.controls.temporaryUserSelectedToDate.disable();
29181
+ this.form.controls.aggregation.disable();
29182
+ }
29183
+ enableDateRangeAndAggregation() {
29184
+ if (this.form.controls.realtime.value || this.isAutoRefreshEnabled) {
29185
+ return;
29186
+ }
29187
+ this.form.controls.temporaryUserSelectedFromDate.enable();
29188
+ this.form.controls.temporaryUserSelectedToDate.enable();
29189
+ this.form.controls.aggregation.enable();
29190
+ }
29154
29191
  stopRealtime() {
29155
29192
  this.realtimeSubscription?.unsubscribe();
29156
- this.form?.controls.temporaryUserSelectedFromDate.enable();
29157
- this.form?.controls.temporaryUserSelectedToDate.enable();
29158
- this.form?.controls.aggregation.enable();
29193
+ this.enableDateRangeAndAggregation();
29159
29194
  }
29160
29195
  onRealtimeValueChange(realtime) {
29161
29196
  let dateTimeContext;
@@ -29196,13 +29231,13 @@ class WidgetTimeContextComponent {
29196
29231
  return null;
29197
29232
  }
29198
29233
  }
29199
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetTimeContextComponent, deps: [{ token: WidgetsDashboardEventService }, { token: DashboardChildComponent }, { token: i5.FormBuilder }, { token: WidgetTimeContextQueryService }, { token: WidgetTimeContextHelperService }, { token: i1$3.Router }, { token: ActionBarService }, { token: AggregationService }], target: i0.ɵɵFactoryTarget.Component }); }
29200
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetTimeContextComponent, selector: "c8y-widget-time-context", inputs: { canDecouple: "canDecouple", displaySettings: "displaySettings", hidden: "hidden" }, outputs: { dateContextChange: "dateContextChange" }, host: { classAttribute: "d-flex a-i-center gap-4" }, viewQueries: [{ propertyName: "action", first: true, predicate: DashboardChildActionComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "<c8y-action-bar-item\n *ngIf=\"isCoupled && !hidden\"\n [priority]=\"ACTION_BAR_PRIORITY\"\n [groupId]=\"ACTION_BAR_GROUP_ID\"\n [inGroupPriority]=\"actionBarInGroupPriority\"\n [placement]=\"'left'\"\n>\n <ng-container\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n ></ng-container>\n</c8y-action-bar-item>\n\n<ng-container\n *ngIf=\"!isCoupled\"\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n></ng-container>\n\n<ng-template\n #dateTimePicker\n let-date=\"date\"\n>\n <form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n >\n <ng-container *ngIf=\"displaySettings.globalTimeContext\">\n <div>\n <div\n class=\"dropdown flex-grow\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n *ngIf=\"date\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{\n date[1] | c8yDate: DATE_FORMAT\n }}\"\n tooltip=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"widget-time-context--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"widget-time-context--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"\n form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\n \"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset(); dropdown.isOpen = false\"\n [disabled]=\"form.value.realtime\"\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(); dropdown.isOpen = false\"\n [disabled]=\"\n (form.pristine && form.untouched) || form.invalid || form.value.realtime\n \"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n </div>\n </ng-container>\n\n <div class=\"input-group w-auto\">\n <c8y-realtime-control\n class=\"form-control p-0 flex-no-grow w-auto\"\n *ngIf=\"displaySettings.globalRealtimeContext\"\n formControlName=\"realtime\"\n ></c8y-realtime-control>\n\n <c8y-aggregation-picker\n *ngIf=\"displaySettings.globalAggregationContext\"\n formControlName=\"aggregation\"\n [disabledAggregations]=\"disabledAggregations\"\n ></c8y-aggregation-picker>\n </div>\n </form>\n</ng-template>\n\n<c8y-dashboard-child-action>\n <button\n type=\"button\"\n (click)=\"toggleDecoupling()\"\n >\n <i [c8yIcon]=\"isCoupled ? 'schedule1' : 'today'\"></i>\n <span class=\"m-l-4\">\n {{ (isCoupled ? decoupleTimeContextLabel : coupleTimeContextLabel) | translate }}\n </span>\n </button>\n</c8y-dashboard-child-action>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i2$3.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: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i20.IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: RealtimeControlComponent, selector: "c8y-realtime-control" }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations"] }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
29234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetTimeContextComponent, deps: [{ token: WidgetsDashboardEventService }, { token: DashboardChildComponent }, { token: i5.FormBuilder }, { token: WidgetTimeContextQueryService }, { token: WidgetTimeContextHelperService }, { token: i1$3.Router }, { token: ActionBarService }, { token: AggregationService }, { token: i1$3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
29235
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetTimeContextComponent, selector: "c8y-widget-time-context", inputs: { canDecouple: "canDecouple", displaySettings: "displaySettings", hidden: "hidden" }, outputs: { dateContextChange: "dateContextChange" }, host: { classAttribute: "d-flex a-i-center gap-4" }, viewQueries: [{ propertyName: "action", first: true, predicate: DashboardChildActionComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: BsDropdownDirective, descendants: true }], ngImport: i0, template: "<c8y-action-bar-item\n *ngIf=\"isCoupled && !hidden\"\n [priority]=\"ACTION_BAR_PRIORITY\"\n [groupId]=\"ACTION_BAR_GROUP_ID\"\n [inGroupPriority]=\"actionBarInGroupPriority\"\n [placement]=\"'left'\"\n>\n <ng-container\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n ></ng-container>\n</c8y-action-bar-item>\n\n<ng-container\n *ngIf=\"!isCoupled\"\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n></ng-container>\n\n<ng-template\n #dateTimePicker\n let-date=\"date\"\n>\n <form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n >\n <ng-container *ngIf=\"displaySettings.globalTimeContext\">\n <div>\n <div\n class=\"dropdown flex-grow\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n *ngIf=\"date\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{\n date[1] | c8yDate: DATE_FORMAT\n }}\"\n tooltip=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"widget-time-context--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"widget-time-context--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"\n form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\n \"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset(); dropdown.isOpen = false\"\n [disabled]=\"form.value.realtime || isAutoRefreshEnabled\"\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(); dropdown.isOpen = false\"\n [disabled]=\"\n (form.pristine && form.untouched) || form.invalid || form.value.realtime || isAutoRefreshEnabled\n \"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n </div>\n </ng-container>\n\n <div class=\"input-group w-auto\">\n <c8y-realtime-control\n class=\"form-control p-0 flex-no-grow w-auto\"\n *ngIf=\"displaySettings.globalRealtimeContext\"\n formControlName=\"realtime\"\n ></c8y-realtime-control>\n\n <c8y-aggregation-picker\n *ngIf=\"displaySettings.globalAggregationContext\"\n formControlName=\"aggregation\"\n [disabledAggregations]=\"disabledAggregations\"\n ></c8y-aggregation-picker>\n </div>\n </form>\n</ng-template>\n\n<c8y-dashboard-child-action>\n <button\n type=\"button\"\n (click)=\"toggleDecoupling()\"\n >\n <i [c8yIcon]=\"isCoupled ? 'schedule1' : 'today'\"></i>\n <span class=\"m-l-4\">\n {{ (isCoupled ? decoupleTimeContextLabel : coupleTimeContextLabel) | translate }}\n </span>\n </button>\n</c8y-dashboard-child-action>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i2$3.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: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i20.IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: RealtimeControlComponent, selector: "c8y-realtime-control" }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations"] }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
29201
29236
  }
29202
29237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetTimeContextComponent, decorators: [{
29203
29238
  type: Component,
29204
- args: [{ selector: 'c8y-widget-time-context', host: { class: 'd-flex a-i-center gap-4' }, template: "<c8y-action-bar-item\n *ngIf=\"isCoupled && !hidden\"\n [priority]=\"ACTION_BAR_PRIORITY\"\n [groupId]=\"ACTION_BAR_GROUP_ID\"\n [inGroupPriority]=\"actionBarInGroupPriority\"\n [placement]=\"'left'\"\n>\n <ng-container\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n ></ng-container>\n</c8y-action-bar-item>\n\n<ng-container\n *ngIf=\"!isCoupled\"\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n></ng-container>\n\n<ng-template\n #dateTimePicker\n let-date=\"date\"\n>\n <form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n >\n <ng-container *ngIf=\"displaySettings.globalTimeContext\">\n <div>\n <div\n class=\"dropdown flex-grow\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n *ngIf=\"date\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{\n date[1] | c8yDate: DATE_FORMAT\n }}\"\n tooltip=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"widget-time-context--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"widget-time-context--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"\n form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\n \"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset(); dropdown.isOpen = false\"\n [disabled]=\"form.value.realtime\"\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(); dropdown.isOpen = false\"\n [disabled]=\"\n (form.pristine && form.untouched) || form.invalid || form.value.realtime\n \"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n </div>\n </ng-container>\n\n <div class=\"input-group w-auto\">\n <c8y-realtime-control\n class=\"form-control p-0 flex-no-grow w-auto\"\n *ngIf=\"displaySettings.globalRealtimeContext\"\n formControlName=\"realtime\"\n ></c8y-realtime-control>\n\n <c8y-aggregation-picker\n *ngIf=\"displaySettings.globalAggregationContext\"\n formControlName=\"aggregation\"\n [disabledAggregations]=\"disabledAggregations\"\n ></c8y-aggregation-picker>\n </div>\n </form>\n</ng-template>\n\n<c8y-dashboard-child-action>\n <button\n type=\"button\"\n (click)=\"toggleDecoupling()\"\n >\n <i [c8yIcon]=\"isCoupled ? 'schedule1' : 'today'\"></i>\n <span class=\"m-l-4\">\n {{ (isCoupled ? decoupleTimeContextLabel : coupleTimeContextLabel) | translate }}\n </span>\n </button>\n</c8y-dashboard-child-action>\n" }]
29205
- }], ctorParameters: () => [{ type: WidgetsDashboardEventService }, { type: DashboardChildComponent }, { type: i5.FormBuilder }, { type: WidgetTimeContextQueryService }, { type: WidgetTimeContextHelperService }, { type: i1$3.Router }, { type: ActionBarService }, { type: AggregationService }], propDecorators: { canDecouple: [{
29239
+ args: [{ selector: 'c8y-widget-time-context', host: { class: 'd-flex a-i-center gap-4' }, template: "<c8y-action-bar-item\n *ngIf=\"isCoupled && !hidden\"\n [priority]=\"ACTION_BAR_PRIORITY\"\n [groupId]=\"ACTION_BAR_GROUP_ID\"\n [inGroupPriority]=\"actionBarInGroupPriority\"\n [placement]=\"'left'\"\n>\n <ng-container\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n ></ng-container>\n</c8y-action-bar-item>\n\n<ng-container\n *ngIf=\"!isCoupled\"\n [ngTemplateOutlet]=\"dateTimePicker\"\n [ngTemplateOutletContext]=\"{\n date: [form.value.currentDateContextFromDate, form.value.currentDateContextToDate]\n }\"\n></ng-container>\n\n<ng-template\n #dateTimePicker\n let-date=\"date\"\n>\n <form\n class=\"d-flex gap-16 p-l-xs-16 p-r-xs-16 m-t-xs-8 m-b-xs-8\"\n [formGroup]=\"form\"\n >\n <ng-container *ngIf=\"displaySettings.globalTimeContext\">\n <div>\n <div\n class=\"dropdown flex-grow\"\n #dropdown=\"bs-dropdown\"\n dropdown\n [insideClick]=\"true\"\n *ngIf=\"date\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{\n date[1] | c8yDate: DATE_FORMAT\n }}\"\n tooltip=\"{{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"widget-time-context--date-picker-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"schedule1\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span\n class=\"text-12\"\n data-cy=\"widget-time-context--selected-interval\"\n >\n {{ INTERVAL_TITLES[form.controls.currentDateContextInterval.value] | translate }}\n </span>\n <span\n class=\"text-10 text-muted text-truncate\"\n data-cy=\"widget-time-context--selected-time-range\"\n >\n {{ date[0] | c8yDate: DATE_FORMAT }} \u2014 {{ date[1] | c8yDate: DATE_FORMAT }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n\n <ul\n class=\"dropdown-menu dropdown-menu--date-range\"\n *dropdownMenu\n >\n <c8y-interval-picker\n class=\"d-contents\"\n formControlName=\"currentDateContextInterval\"\n ></c8y-interval-picker>\n\n <ng-container *ngIf=\"form.controls.currentDateContextInterval.value === 'custom'\">\n <div class=\"p-l-16 p-r-16\">\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'From`date`' | translate\"\n for=\"temporaryUserSelectedFromDate\"\n translate\n >\n From`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedFromDate\"\n [maxDate]=\"form.value.temporaryUserSelectedToDate\"\n [placeholder]=\"'From`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedFromDate\"\n [ngClass]=\"\n form.controls.temporaryUserSelectedFromDate.errors ? 'has-error' : ''\n \"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedFromDate.errors\">\n <c8y-message\n name=\"dateAfterRangeMax\"\n [text]=\"'This date is after the latest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n >\n <label\n [title]=\"'To`date`' | translate\"\n for=\"temporaryUserSelectedToDate\"\n translate\n >\n To`date`\n </label>\n <c8y-date-time-picker\n id=\"temporaryUserSelectedToDate\"\n [minDate]=\"form.value.temporaryUserSelectedFromDate\"\n [placeholder]=\"'To`date`' | translate\"\n [formControl]=\"form.controls.temporaryUserSelectedToDate\"\n [ngClass]=\"form.controls.temporaryUserSelectedToDate.errors ? 'has-error' : ''\"\n ></c8y-date-time-picker>\n <c8y-messages [show]=\"form.controls.temporaryUserSelectedToDate.errors\">\n <c8y-message\n name=\"dateBeforeRangeMin\"\n [text]=\"'This date is before the earliest allowed date.' | translate\"\n ></c8y-message>\n <c8y-message\n name=\"invalidDateTime\"\n [text]=\"'This date is invalid.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <div class=\"p-16 d-flex gap-8 separator-top\">\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n title=\"{{ 'Reset' | translate }}\"\n type=\"button\"\n (click)=\"reset(); dropdown.isOpen = false\"\n [disabled]=\"form.value.realtime || isAutoRefreshEnabled\"\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(); dropdown.isOpen = false\"\n [disabled]=\"\n (form.pristine && form.untouched) || form.invalid || form.value.realtime || isAutoRefreshEnabled\n \"\n translate\n >\n Apply\n </button>\n </div>\n </ng-container>\n </ul>\n </div>\n </div>\n </ng-container>\n\n <div class=\"input-group w-auto\">\n <c8y-realtime-control\n class=\"form-control p-0 flex-no-grow w-auto\"\n *ngIf=\"displaySettings.globalRealtimeContext\"\n formControlName=\"realtime\"\n ></c8y-realtime-control>\n\n <c8y-aggregation-picker\n *ngIf=\"displaySettings.globalAggregationContext\"\n formControlName=\"aggregation\"\n [disabledAggregations]=\"disabledAggregations\"\n ></c8y-aggregation-picker>\n </div>\n </form>\n</ng-template>\n\n<c8y-dashboard-child-action>\n <button\n type=\"button\"\n (click)=\"toggleDecoupling()\"\n >\n <i [c8yIcon]=\"isCoupled ? 'schedule1' : 'today'\"></i>\n <span class=\"m-l-4\">\n {{ (isCoupled ? decoupleTimeContextLabel : coupleTimeContextLabel) | translate }}\n </span>\n </button>\n</c8y-dashboard-child-action>\n" }]
29240
+ }], ctorParameters: () => [{ type: WidgetsDashboardEventService }, { type: DashboardChildComponent }, { type: i5.FormBuilder }, { type: WidgetTimeContextQueryService }, { type: WidgetTimeContextHelperService }, { type: i1$3.Router }, { type: ActionBarService }, { type: AggregationService }, { type: i1$3.ActivatedRoute }], propDecorators: { canDecouple: [{
29206
29241
  type: Input
29207
29242
  }], displaySettings: [{
29208
29243
  type: Input
@@ -29594,13 +29629,13 @@ class AutoRefreshControlComponent {
29594
29629
  this.DEFAULT_INTERVAL_VALUE = DEFAULT_INTERVAL_VALUE;
29595
29630
  this.loading = new EventEmitter();
29596
29631
  this.widgetGlobalAutoRefresh = inject(WidgetGlobalAutoRefreshService);
29632
+ this.showIntervalRefresh$ = new BehaviorSubject(this.widgetGlobalAutoRefresh.autoRefreshSettings.isEnabled$.getValue());
29633
+ this.isBtnDisabledSubject = new BehaviorSubject(false);
29634
+ this.isBtnDisabled$ = this.isBtnDisabledSubject.asObservable();
29597
29635
  this.destroy$ = new Subject();
29598
29636
  // eslint-disable-next-line @typescript-eslint/no-empty-function
29599
29637
  this.onTouched = () => { };
29600
29638
  }
29601
- ngOnInit() {
29602
- this.showIntervalRefresh$ = this.widgetGlobalAutoRefresh.autoRefreshSettings.isEnabled$;
29603
- }
29604
29639
  ngAfterViewInit() {
29605
29640
  this.subscribeOnCountdownChangeState();
29606
29641
  this.setUpOnCountdownEndedListener();
@@ -29630,12 +29665,14 @@ class AutoRefreshControlComponent {
29630
29665
  subscribeOnCountdownChangeState() {
29631
29666
  this.widgetGlobalAutoRefresh.countdownActions.reset$
29632
29667
  .pipe(tap(() => {
29668
+ this.isBtnDisabledSubject.next(false);
29633
29669
  this.loading.emit(false);
29634
29670
  this.countdownIntervalComponent?.reset();
29635
29671
  }), takeUntil(this.destroy$))
29636
29672
  .subscribe();
29637
29673
  this.widgetGlobalAutoRefresh.countdownActions.stop$
29638
29674
  .pipe(tap(() => {
29675
+ this.isBtnDisabledSubject.next(true);
29639
29676
  this.loading.emit(true);
29640
29677
  this.countdownIntervalComponent?.stop(true);
29641
29678
  }), takeUntil(this.destroy$))
@@ -29656,7 +29693,7 @@ class AutoRefreshControlComponent {
29656
29693
  useExisting: forwardRef(() => AutoRefreshControlComponent),
29657
29694
  multi: true
29658
29695
  }
29659
- ], viewQueries: [{ propertyName: "countdownIntervalComponent", first: true, predicate: CountdownIntervalComponent, descendants: true }], ngImport: i0, template: "<div class=\"input-group\">\n <button\n class=\"toggle-countdown\"\n [attr.aria-label]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n [tooltip]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n placement=\"bottom\"\n (click)=\"toggleIntervalRefresh()\"\n [adaptivePosition]=\"false\"\n mode\n [delay]=\"500\"\n >\n <c8y-countdown-interval\n [hidden]=\"!(showIntervalRefresh$ | async)\"\n [countdownInterval]=\"(autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!(showIntervalRefresh$ | async)\"\n ></i>\n </button>\n <span></span>\n</div>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval"], outputs: ["countdownEnded"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
29696
+ ], viewQueries: [{ propertyName: "countdownIntervalComponent", first: true, predicate: CountdownIntervalComponent, descendants: true }], ngImport: i0, template: "<div class=\"input-group\">\n <button\n class=\"toggle-countdown\"\n [attr.aria-label]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n [tooltip]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n placement=\"bottom\"\n (click)=\"toggleIntervalRefresh()\"\n [adaptivePosition]=\"false\"\n mode\n [delay]=\"500\"\n [disabled]=\"isBtnDisabled$ | async\"\n >\n <c8y-countdown-interval\n [hidden]=\"!(showIntervalRefresh$ | async)\"\n [countdownInterval]=\"(autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!(showIntervalRefresh$ | async)\"\n ></i>\n </button>\n <span></span>\n</div>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval"], outputs: ["countdownEnded"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
29660
29697
  }
29661
29698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AutoRefreshControlComponent, decorators: [{
29662
29699
  type: Component,
@@ -29666,7 +29703,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
29666
29703
  useExisting: forwardRef(() => AutoRefreshControlComponent),
29667
29704
  multi: true
29668
29705
  }
29669
- ], template: "<div class=\"input-group\">\n <button\n class=\"toggle-countdown\"\n [attr.aria-label]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n [tooltip]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n placement=\"bottom\"\n (click)=\"toggleIntervalRefresh()\"\n [adaptivePosition]=\"false\"\n mode\n [delay]=\"500\"\n >\n <c8y-countdown-interval\n [hidden]=\"!(showIntervalRefresh$ | async)\"\n [countdownInterval]=\"(autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!(showIntervalRefresh$ | async)\"\n ></i>\n </button>\n <span></span>\n</div>\n" }]
29706
+ ], template: "<div class=\"input-group\">\n <button\n class=\"toggle-countdown\"\n [attr.aria-label]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n [tooltip]=\"\n ((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate\n \"\n placement=\"bottom\"\n (click)=\"toggleIntervalRefresh()\"\n [adaptivePosition]=\"false\"\n mode\n [delay]=\"500\"\n [disabled]=\"isBtnDisabled$ | async\"\n >\n <c8y-countdown-interval\n [hidden]=\"!(showIntervalRefresh$ | async)\"\n [countdownInterval]=\"(autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"!(showIntervalRefresh$ | async)\"\n ></i>\n </button>\n <span></span>\n</div>\n" }]
29670
29707
  }], propDecorators: { countdownIntervalComponent: [{
29671
29708
  type: ViewChild,
29672
29709
  args: [CountdownIntervalComponent]
@@ -30050,7 +30087,7 @@ class WidgetsDashboardComponent {
30050
30087
  return widgets;
30051
30088
  }
30052
30089
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetsDashboardComponent, deps: [{ token: DynamicComponentService }, { token: i1$1.TranslateService }, { token: i1$3.ActivatedRoute }, { token: ModalService }, { token: WidgetGlobalAutoRefreshService }], target: i0.ɵɵFactoryTarget.Component }); }
30053
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetsDashboardComponent, selector: "c8y-widgets-dashboard", inputs: { widgets: "widgets", context: "context", contextDashboard: "contextDashboard", _settings: ["settings", "_settings"], isCopyDisabled: "isCopyDisabled", breadcrumb: "breadcrumb", editModeButtons: "editModeButtons" }, outputs: { onAddWidget: "onAddWidget", onEditWidget: "onEditWidget", onDeleteWidget: "onDeleteWidget", onChangeDashboard: "onChangeDashboard", onResize: "onResize", onEditDashboard: "onEditDashboard", onCopyDashboard: "onCopyDashboard", onDeleteDashboard: "onDeleteDashboard", onChangeStart: "onChangeStart", onChangeEnd: "onChangeEnd", onSaveDashboard: "onSaveDashboard", onCancelDashboard: "onCancelDashboard", revertChange: "revertChange" }, host: { styleAttribute: "\n display: block;\n ", classAttribute: "dashboard c8y-grid-dashboard" }, providers: [WidgetsDashboardEventService], usesOnChanges: true, ngImport: i0, template: "<c8y-title *ngIf=\"!!settings.title\">\n {{ settings.title | translate }}\n</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!!breadcrumb\">\n <c8y-breadcrumb-item\n [icon]=\"breadcrumb.icon\"\n [label]=\"breadcrumb.label\"\n [path]=\"breadcrumb.path\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n [priority]=\"ACTION_BAR_EDIT_WIDGETS_PRIORITY\"\n *ngIf=\"!(editMode$ | async)\"\n>\n <button\n class=\"btn btn-link animated fadeIn hidden-xs\"\n title=\"{{ 'Edit widgets' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled\"\n (click)=\"enableEditMode()\"\n data-cy=\"c8y-widget-dashboard--edit-widgets\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n *ngIf=\"editMode$ | async\"\n>\n <button\n class=\"btn btn-link animated fadeIn\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"widget-dashboard--Add-widget\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add widget' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"d-flex a-i-center gap-8\"\n *ngIf=\"editMode$ | async\"\n>\n <div class=\"input-group input-group-sm animated fadeIn\">\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Undo' | translate\"\n [tooltip]=\"\n editModeButtons.undoButtonDisabled\n ? ''\n : (undoMessage\n | translate: { changeToUndo: editModeButtons.changeToUndoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('undo')\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n >\n <i [c8yIcon]=\"'undo'\"></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Redo' | translate\"\n [tooltip]=\"\n editModeButtons.redoButtonDisabled\n ? ''\n : (redoMessage\n | translate: { changeToRedo: editModeButtons.changeToRedoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('redo')\"\n [disabled]=\"editModeButtons.redoButtonDisabled\"\n >\n <i [c8yIcon]=\"'redo'\"></i>\n </button>\n </div>\n <span></span>\n </div>\n <div class=\"btn-group animated fadeIn\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancelDashboardSave()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm m-l-8\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n (click)=\"saveDashboard()\"\n data-cy=\"c8y-widgets-dashboard--save\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"onEditDashboard.observers.length\"\n>\n <button\n class=\"btn btn-link hidden-xs m-l-0\"\n title=\"{{ 'Dashboard settings' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n (click)=\"onEditDashboard.emit()\"\n data-cy=\"c8y-widgets-dashboard--edit-dashboard\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"settings.allowFullscreen\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n tooltip=\"{{ 'Full screen' | translate }}\"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"widgets-dashboard--Full-screen\"\n >\n <i [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{ 'Full screen' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n *ngIf=\"settings.canCopy\"\n>\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"hidden-xs\"\n title=\"{{\n (isCopyDisabled === true || !isCopyDisabled?.state ? 'Disabled' : copyDashboardLabel) | translate\n }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"onCopyDashboard.emit()\"\n [disabled]=\"isCopyDisabled === true || !isCopyDisabled?.state || (editMode$ | async)\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n <button\n class=\"btn-help btn-help--sm m-r-16 hidden-xs\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"copyDisabledPopoverMsg | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!isCopyDisabled?.state && copyDisabledPopoverMsg\"\n data-cy=\"widgets-dashboard--info-copy-dashboard\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </div>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-3000\"\n *ngIf=\"settings.canDelete && onDeleteDashboard.observers.length\"\n>\n <button\n class=\"hidden-xs\"\n title=\"{{ 'Delete dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n (click)=\"onDeleteDashboard.emit()\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard-mobile\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n</c8y-action-bar-item>\n\n<ng-template #loadingIndicator>\n <c8y-loading\n class=\"col-xs-12 text-center\"\n *ngIf=\"isLoadingWidgets$ | async\"\n ></c8y-loading>\n</ng-template>\n\n<ng-container *ngIf=\"!(isLoadingWidgets$ | async); else loadingIndicator\">\n <ng-container *ngIf=\"resolvedWidgets$ | async as widgetsToDisplay\">\n <!-- empty state -->\n <c8y-ui-empty-state\n [icon]=\"'c8y-device'\"\n [title]=\"'No widgets to display.' | translate\"\n *ngIf=\"widgetsToDisplay?.length === 0\"\n >\n <div *ngIf=\"onAddWidget.observers.length\">\n <p\n translate\n *ngIf=\"editMode$ | async\"\n >\n Add widgets to this dashboard.\n </p>\n <p\n translate\n *ngIf=\"!(editMode$ | async)\"\n >\n Click \"Edit widgets\" to unlock\n </p>\n <div>\n <button\n class=\"btn btn-primary m-t-16\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || !(editMode$ | async)\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"c8y-widgets-dashboard--add-widget\"\n translate\n >\n Add widget\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-dashboards\">user documentation</a>\n .\n </small>\n </p>\n </div>\n </c8y-ui-empty-state>\n\n <c8y-dashboard\n [columns]=\"settings.columns\"\n (dashboardChange)=\"onChangeDashboard.emit($event)\"\n #dashboard\n >\n <c8y-dashboard-child\n [class]=\"widget.classes\"\n *ngFor=\"let widget of widgetsToDisplay\"\n [x]=\"widget._x\"\n [y]=\"widget._y\"\n [width]=\"widget._width || settings.defaultWidth\"\n [height]=\"widget._height || settings.defaultHeight\"\n [margin]=\"settings.widgetMargin\"\n [data]=\"widget\"\n [useIntersection]=\"true\"\n [editMode]=\"editMode$ | async\"\n (changeStart)=\"onChangeStart.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (changeEnd)=\"onChangeEnd.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (toggleFullscreen)=\"toggleFullscreenOnWidget(child)\"\n [canToggleFullscreen]=\"!(inFullScreen$ | async) || widgetInFullscreenMode\"\n #child\n >\n <c8y-dashboard-child-title>\n <span\n data-cy=\"c8y-dashboard-list--device-widget\"\n *ngIf=\"settings.translateWidgetTitle\"\n >\n {{ widget.title | translate }}\n </span>\n <span *ngIf=\"!settings.translateWidgetTitle\">\n {{ widget.title }}\n </span>\n </c8y-dashboard-child-title>\n <c8y-dashboard-child-action *ngIf=\"onEditWidget.observers.length\">\n <button\n title=\"{{ 'Edit widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--Edit-widget\"\n (click)=\"onEditWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"pencil\"></i>\n <span translate>Edit</span>\n </button>\n </c8y-dashboard-child-action>\n <c8y-dashboard-child-action *ngIf=\"onDeleteWidget.observers.length\">\n <button\n title=\"{{ 'Remove widget' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-widgets-dashboard--remove-widget\"\n (click)=\"onDeleteWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Remove</span>\n </button>\n </c8y-dashboard-child-action>\n\n <c8y-widget-time-context\n *ngIf=\"\n (widget.config?.displaySettings?.globalTimeContext ||\n widget.config?.displaySettings?.globalRealtimeContext) &&\n widget.config.widgetInstanceGlobalTimeContext\n \"\n (dateContextChange)=\"updateWidgetConfig($event, widget)\"\n [canDecouple]=\"widget.config.canDecoupleGlobalTimeContext\"\n [displaySettings]=\"widget.config.displaySettings\"\n [hidden]=\"(editMode$ | async)\"\n ></c8y-widget-time-context>\n\n <c8y-widget-auto-refresh-context\n *ngIf=\"\n widget?.config?.widgetInstanceGlobalAutoRefreshContext &&\n widget.config?.displaySettings.globalAutoRefreshContext\n \"\n [editMode$]=\"editMode$\"\n ></c8y-widget-auto-refresh-context>\n\n <c8y-dynamic-component\n [componentId]=\"widget.componentId || widget.name\"\n [config]=\"\n widget.templateUrl || widget.widgetComponent\n ? { child: widget, dashboard: contextDashboard, context: context }\n : widget.config\n \"\n *ngIf=\"child.intersected\"\n (updateWidgetClasses)=\"updateWidgetClasses(widget, $event)\"\n ></c8y-dynamic-component>\n </c8y-dashboard-child>\n </c8y-dashboard>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: DynamicComponentComponent, selector: "c8y-dynamic-component", inputs: ["componentId", "config", "mode", "notFoundError", "executeResolvers"], outputs: ["updateWidgetClasses"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "directive", type: i2$4.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: DashboardChildComponent, selector: "c8y-dashboard-child", inputs: ["x", "y", "width", "height", "data", "margin", "useIntersection", "isFrozen", "canToggleFullscreen", "editMode", "class"], outputs: ["changeStart", "changeEnd", "toggleFullscreen"] }, { kind: "component", type: DashboardComponent, selector: "c8y-dashboard", inputs: ["columns", "gap", "rows"], outputs: ["dashboardChange"] }, { kind: "component", type: DashboardChildTitleComponent, selector: "c8y-dashboard-child-title" }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: WidgetTimeContextComponent, selector: "c8y-widget-time-context", inputs: ["canDecouple", "displaySettings", "hidden"], outputs: ["dateContextChange"] }, { kind: "component", type: WidgetAutoRefreshContextComponent, selector: "c8y-widget-auto-refresh-context", inputs: ["editMode$"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
30090
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WidgetsDashboardComponent, selector: "c8y-widgets-dashboard", inputs: { widgets: "widgets", context: "context", contextDashboard: "contextDashboard", _settings: ["settings", "_settings"], isCopyDisabled: "isCopyDisabled", breadcrumb: "breadcrumb", editModeButtons: "editModeButtons" }, outputs: { onAddWidget: "onAddWidget", onEditWidget: "onEditWidget", onDeleteWidget: "onDeleteWidget", onChangeDashboard: "onChangeDashboard", onResize: "onResize", onEditDashboard: "onEditDashboard", onCopyDashboard: "onCopyDashboard", onDeleteDashboard: "onDeleteDashboard", onChangeStart: "onChangeStart", onChangeEnd: "onChangeEnd", onSaveDashboard: "onSaveDashboard", onCancelDashboard: "onCancelDashboard", revertChange: "revertChange" }, host: { styleAttribute: "\n display: block;\n ", classAttribute: "dashboard c8y-grid-dashboard" }, providers: [WidgetsDashboardEventService], usesOnChanges: true, ngImport: i0, template: "<c8y-title *ngIf=\"!!settings.title\">\n {{ settings.title | translate }}\n</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!!breadcrumb\">\n <c8y-breadcrumb-item\n [icon]=\"breadcrumb.icon\"\n [label]=\"breadcrumb.label\"\n [path]=\"breadcrumb.path\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n [priority]=\"ACTION_BAR_EDIT_WIDGETS_PRIORITY\"\n *ngIf=\"!(editMode$ | async)\"\n>\n <button\n class=\"btn btn-link animated fadeIn hidden-xs\"\n title=\"{{ 'Edit widgets' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled\"\n (click)=\"enableEditMode()\"\n data-cy=\"c8y-widget-dashboard--edit-widgets\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n *ngIf=\"editMode$ | async\"\n>\n <button\n class=\"btn btn-link animated fadeIn\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"widget-dashboard--Add-widget\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add widget' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"d-flex a-i-center gap-8\"\n *ngIf=\"editMode$ | async\"\n>\n <div class=\"input-group input-group-sm animated fadeIn\">\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Undo' | translate\"\n [tooltip]=\"\n editModeButtons.undoButtonDisabled\n ? ''\n : (undoMessage\n | translate: { changeToUndo: editModeButtons.changeToUndoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('undo')\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n >\n <i [c8yIcon]=\"'undo'\"></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Redo' | translate\"\n [tooltip]=\"\n editModeButtons.redoButtonDisabled\n ? ''\n : (redoMessage\n | translate: { changeToRedo: editModeButtons.changeToRedoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('redo')\"\n [disabled]=\"editModeButtons.redoButtonDisabled\"\n >\n <i [c8yIcon]=\"'redo'\"></i>\n </button>\n </div>\n <span></span>\n </div>\n <div class=\"btn-group animated fadeIn\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancelDashboardSave()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm m-l-8\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n (click)=\"saveDashboard()\"\n data-cy=\"c8y-widgets-dashboard--save\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"onEditDashboard.observers.length\"\n>\n <button\n class=\"btn btn-link hidden-xs m-l-0\"\n title=\"{{ 'Dashboard settings' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n (click)=\"onEditDashboard.emit()\"\n data-cy=\"c8y-widgets-dashboard--edit-dashboard\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"settings.allowFullscreen\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n tooltip=\"{{ 'Full screen' | translate }}\"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"widgets-dashboard--Full-screen\"\n >\n <i [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{ 'Full screen' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n *ngIf=\"settings.canCopy\"\n>\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"hidden-xs\"\n title=\"{{\n (isCopyDisabled === true || !isCopyDisabled?.state ? 'Disabled' : copyDashboardLabel)\n | translate\n }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"onCopyDashboard.emit()\"\n [disabled]=\"isCopyDisabled === true || !isCopyDisabled?.state || (editMode$ | async)\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n <button\n class=\"btn-help btn-help--sm m-r-16 hidden-xs\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"copyDisabledPopoverMsg | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!isCopyDisabled?.state && copyDisabledPopoverMsg\"\n data-cy=\"widgets-dashboard--info-copy-dashboard\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </div>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-3000\"\n *ngIf=\"settings.canDelete && onDeleteDashboard.observers.length\"\n>\n <button\n class=\"hidden-xs\"\n title=\"{{ 'Delete dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n (click)=\"onDeleteDashboard.emit()\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard-mobile\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n</c8y-action-bar-item>\n\n<ng-template #loadingIndicator>\n <c8y-loading\n class=\"col-xs-12 text-center\"\n *ngIf=\"isLoadingWidgets$ | async\"\n ></c8y-loading>\n</ng-template>\n\n<ng-container *ngIf=\"!(isLoadingWidgets$ | async); else loadingIndicator\">\n <ng-container *ngIf=\"resolvedWidgets$ | async as widgetsToDisplay\">\n <!-- empty state -->\n <c8y-ui-empty-state\n [icon]=\"'c8y-device'\"\n [title]=\"'No widgets to display.' | translate\"\n *ngIf=\"widgetsToDisplay?.length === 0\"\n >\n <div *ngIf=\"onAddWidget.observers.length\">\n <p\n translate\n *ngIf=\"editMode$ | async\"\n >\n Add widgets to this dashboard.\n </p>\n <p\n translate\n *ngIf=\"!(editMode$ | async)\"\n >\n Click \"Edit widgets\" to unlock\n </p>\n <div>\n <button\n class=\"btn btn-primary m-t-16\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || !(editMode$ | async)\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"c8y-widgets-dashboard--add-widget\"\n translate\n >\n Add widget\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-dashboards\">user documentation</a>\n .\n </small>\n </p>\n </div>\n </c8y-ui-empty-state>\n\n <c8y-dashboard\n [columns]=\"settings.columns\"\n (dashboardChange)=\"onChangeDashboard.emit($event)\"\n #dashboard\n >\n <c8y-dashboard-child\n [class]=\"widget.classes\"\n *ngFor=\"let widget of widgetsToDisplay\"\n [x]=\"widget._x\"\n [y]=\"widget._y\"\n [width]=\"widget._width || settings.defaultWidth\"\n [height]=\"widget._height || settings.defaultHeight\"\n [margin]=\"settings.widgetMargin\"\n [data]=\"widget\"\n [useIntersection]=\"true\"\n [editMode]=\"editMode$ | async\"\n (changeStart)=\"onChangeStart.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (changeEnd)=\"onChangeEnd.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (toggleFullscreen)=\"toggleFullscreenOnWidget(child)\"\n [canToggleFullscreen]=\"!(inFullScreen$ | async) || widgetInFullscreenMode\"\n #child\n >\n <c8y-dashboard-child-title>\n <span\n data-cy=\"c8y-dashboard-list--device-widget\"\n *ngIf=\"settings.translateWidgetTitle\"\n >\n {{ widget.title | translate }}\n </span>\n <span *ngIf=\"!settings.translateWidgetTitle\">\n {{ widget.title }}\n </span>\n </c8y-dashboard-child-title>\n <c8y-dashboard-child-action *ngIf=\"onEditWidget.observers.length\">\n <button\n title=\"{{ 'Edit widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--Edit-widget\"\n (click)=\"onEditWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"pencil\"></i>\n <span translate>Edit</span>\n </button>\n </c8y-dashboard-child-action>\n <c8y-dashboard-child-action *ngIf=\"onDeleteWidget.observers.length\">\n <button\n title=\"{{ 'Remove widget' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-widgets-dashboard--remove-widget\"\n (click)=\"onDeleteWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Remove</span>\n </button>\n </c8y-dashboard-child-action>\n\n <c8y-widget-time-context\n *ngIf=\"\n (widget.config?.displaySettings?.globalTimeContext ||\n widget.config?.displaySettings?.globalRealtimeContext) &&\n (widget.config.widgetInstanceGlobalTimeContext ||\n widget.config.widgetInstanceGlobalAutoRefreshContext)\n \"\n (dateContextChange)=\"updateWidgetConfig($event, widget)\"\n [canDecouple]=\"widget.config.canDecoupleGlobalTimeContext\"\n [displaySettings]=\"widget.config.displaySettings\"\n [hidden]=\"editMode$ | async\"\n ></c8y-widget-time-context>\n\n <c8y-widget-auto-refresh-context\n *ngIf=\"\n widget?.config?.widgetInstanceGlobalAutoRefreshContext &&\n widget.config?.displaySettings.globalAutoRefreshContext\n \"\n [editMode$]=\"editMode$\"\n ></c8y-widget-auto-refresh-context>\n\n <c8y-dynamic-component\n [componentId]=\"widget.componentId || widget.name\"\n [config]=\"\n widget.templateUrl || widget.widgetComponent\n ? { child: widget, dashboard: contextDashboard, context: context }\n : widget.config\n \"\n *ngIf=\"child.intersected\"\n (updateWidgetClasses)=\"updateWidgetClasses(widget, $event)\"\n ></c8y-dynamic-component>\n </c8y-dashboard-child>\n </c8y-dashboard>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: DynamicComponentComponent, selector: "c8y-dynamic-component", inputs: ["componentId", "config", "mode", "notFoundError", "executeResolvers"], outputs: ["updateWidgetClasses"] }, { kind: "directive", type: i2$3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "directive", type: i2$4.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: DashboardChildComponent, selector: "c8y-dashboard-child", inputs: ["x", "y", "width", "height", "data", "margin", "useIntersection", "isFrozen", "canToggleFullscreen", "editMode", "class"], outputs: ["changeStart", "changeEnd", "toggleFullscreen"] }, { kind: "component", type: DashboardComponent, selector: "c8y-dashboard", inputs: ["columns", "gap", "rows"], outputs: ["dashboardChange"] }, { kind: "component", type: DashboardChildTitleComponent, selector: "c8y-dashboard-child-title" }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: WidgetTimeContextComponent, selector: "c8y-widget-time-context", inputs: ["canDecouple", "displaySettings", "hidden"], outputs: ["dateContextChange"] }, { kind: "component", type: WidgetAutoRefreshContextComponent, selector: "c8y-widget-auto-refresh-context", inputs: ["editMode$"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
30054
30091
  }
30055
30092
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WidgetsDashboardComponent, decorators: [{
30056
30093
  type: Component,
@@ -30059,7 +30096,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
30059
30096
  display: block;
30060
30097
  `,
30061
30098
  class: 'dashboard c8y-grid-dashboard'
30062
- }, providers: [WidgetsDashboardEventService], template: "<c8y-title *ngIf=\"!!settings.title\">\n {{ settings.title | translate }}\n</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!!breadcrumb\">\n <c8y-breadcrumb-item\n [icon]=\"breadcrumb.icon\"\n [label]=\"breadcrumb.label\"\n [path]=\"breadcrumb.path\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n [priority]=\"ACTION_BAR_EDIT_WIDGETS_PRIORITY\"\n *ngIf=\"!(editMode$ | async)\"\n>\n <button\n class=\"btn btn-link animated fadeIn hidden-xs\"\n title=\"{{ 'Edit widgets' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled\"\n (click)=\"enableEditMode()\"\n data-cy=\"c8y-widget-dashboard--edit-widgets\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n *ngIf=\"editMode$ | async\"\n>\n <button\n class=\"btn btn-link animated fadeIn\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"widget-dashboard--Add-widget\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add widget' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"d-flex a-i-center gap-8\"\n *ngIf=\"editMode$ | async\"\n>\n <div class=\"input-group input-group-sm animated fadeIn\">\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Undo' | translate\"\n [tooltip]=\"\n editModeButtons.undoButtonDisabled\n ? ''\n : (undoMessage\n | translate: { changeToUndo: editModeButtons.changeToUndoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('undo')\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n >\n <i [c8yIcon]=\"'undo'\"></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Redo' | translate\"\n [tooltip]=\"\n editModeButtons.redoButtonDisabled\n ? ''\n : (redoMessage\n | translate: { changeToRedo: editModeButtons.changeToRedoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('redo')\"\n [disabled]=\"editModeButtons.redoButtonDisabled\"\n >\n <i [c8yIcon]=\"'redo'\"></i>\n </button>\n </div>\n <span></span>\n </div>\n <div class=\"btn-group animated fadeIn\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancelDashboardSave()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm m-l-8\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n (click)=\"saveDashboard()\"\n data-cy=\"c8y-widgets-dashboard--save\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"onEditDashboard.observers.length\"\n>\n <button\n class=\"btn btn-link hidden-xs m-l-0\"\n title=\"{{ 'Dashboard settings' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n (click)=\"onEditDashboard.emit()\"\n data-cy=\"c8y-widgets-dashboard--edit-dashboard\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"settings.allowFullscreen\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n tooltip=\"{{ 'Full screen' | translate }}\"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"widgets-dashboard--Full-screen\"\n >\n <i [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{ 'Full screen' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n *ngIf=\"settings.canCopy\"\n>\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"hidden-xs\"\n title=\"{{\n (isCopyDisabled === true || !isCopyDisabled?.state ? 'Disabled' : copyDashboardLabel) | translate\n }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"onCopyDashboard.emit()\"\n [disabled]=\"isCopyDisabled === true || !isCopyDisabled?.state || (editMode$ | async)\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n <button\n class=\"btn-help btn-help--sm m-r-16 hidden-xs\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"copyDisabledPopoverMsg | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!isCopyDisabled?.state && copyDisabledPopoverMsg\"\n data-cy=\"widgets-dashboard--info-copy-dashboard\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </div>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-3000\"\n *ngIf=\"settings.canDelete && onDeleteDashboard.observers.length\"\n>\n <button\n class=\"hidden-xs\"\n title=\"{{ 'Delete dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n (click)=\"onDeleteDashboard.emit()\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard-mobile\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n</c8y-action-bar-item>\n\n<ng-template #loadingIndicator>\n <c8y-loading\n class=\"col-xs-12 text-center\"\n *ngIf=\"isLoadingWidgets$ | async\"\n ></c8y-loading>\n</ng-template>\n\n<ng-container *ngIf=\"!(isLoadingWidgets$ | async); else loadingIndicator\">\n <ng-container *ngIf=\"resolvedWidgets$ | async as widgetsToDisplay\">\n <!-- empty state -->\n <c8y-ui-empty-state\n [icon]=\"'c8y-device'\"\n [title]=\"'No widgets to display.' | translate\"\n *ngIf=\"widgetsToDisplay?.length === 0\"\n >\n <div *ngIf=\"onAddWidget.observers.length\">\n <p\n translate\n *ngIf=\"editMode$ | async\"\n >\n Add widgets to this dashboard.\n </p>\n <p\n translate\n *ngIf=\"!(editMode$ | async)\"\n >\n Click \"Edit widgets\" to unlock\n </p>\n <div>\n <button\n class=\"btn btn-primary m-t-16\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || !(editMode$ | async)\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"c8y-widgets-dashboard--add-widget\"\n translate\n >\n Add widget\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-dashboards\">user documentation</a>\n .\n </small>\n </p>\n </div>\n </c8y-ui-empty-state>\n\n <c8y-dashboard\n [columns]=\"settings.columns\"\n (dashboardChange)=\"onChangeDashboard.emit($event)\"\n #dashboard\n >\n <c8y-dashboard-child\n [class]=\"widget.classes\"\n *ngFor=\"let widget of widgetsToDisplay\"\n [x]=\"widget._x\"\n [y]=\"widget._y\"\n [width]=\"widget._width || settings.defaultWidth\"\n [height]=\"widget._height || settings.defaultHeight\"\n [margin]=\"settings.widgetMargin\"\n [data]=\"widget\"\n [useIntersection]=\"true\"\n [editMode]=\"editMode$ | async\"\n (changeStart)=\"onChangeStart.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (changeEnd)=\"onChangeEnd.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (toggleFullscreen)=\"toggleFullscreenOnWidget(child)\"\n [canToggleFullscreen]=\"!(inFullScreen$ | async) || widgetInFullscreenMode\"\n #child\n >\n <c8y-dashboard-child-title>\n <span\n data-cy=\"c8y-dashboard-list--device-widget\"\n *ngIf=\"settings.translateWidgetTitle\"\n >\n {{ widget.title | translate }}\n </span>\n <span *ngIf=\"!settings.translateWidgetTitle\">\n {{ widget.title }}\n </span>\n </c8y-dashboard-child-title>\n <c8y-dashboard-child-action *ngIf=\"onEditWidget.observers.length\">\n <button\n title=\"{{ 'Edit widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--Edit-widget\"\n (click)=\"onEditWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"pencil\"></i>\n <span translate>Edit</span>\n </button>\n </c8y-dashboard-child-action>\n <c8y-dashboard-child-action *ngIf=\"onDeleteWidget.observers.length\">\n <button\n title=\"{{ 'Remove widget' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-widgets-dashboard--remove-widget\"\n (click)=\"onDeleteWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Remove</span>\n </button>\n </c8y-dashboard-child-action>\n\n <c8y-widget-time-context\n *ngIf=\"\n (widget.config?.displaySettings?.globalTimeContext ||\n widget.config?.displaySettings?.globalRealtimeContext) &&\n widget.config.widgetInstanceGlobalTimeContext\n \"\n (dateContextChange)=\"updateWidgetConfig($event, widget)\"\n [canDecouple]=\"widget.config.canDecoupleGlobalTimeContext\"\n [displaySettings]=\"widget.config.displaySettings\"\n [hidden]=\"(editMode$ | async)\"\n ></c8y-widget-time-context>\n\n <c8y-widget-auto-refresh-context\n *ngIf=\"\n widget?.config?.widgetInstanceGlobalAutoRefreshContext &&\n widget.config?.displaySettings.globalAutoRefreshContext\n \"\n [editMode$]=\"editMode$\"\n ></c8y-widget-auto-refresh-context>\n\n <c8y-dynamic-component\n [componentId]=\"widget.componentId || widget.name\"\n [config]=\"\n widget.templateUrl || widget.widgetComponent\n ? { child: widget, dashboard: contextDashboard, context: context }\n : widget.config\n \"\n *ngIf=\"child.intersected\"\n (updateWidgetClasses)=\"updateWidgetClasses(widget, $event)\"\n ></c8y-dynamic-component>\n </c8y-dashboard-child>\n </c8y-dashboard>\n </ng-container>\n</ng-container>\n" }]
30099
+ }, providers: [WidgetsDashboardEventService], template: "<c8y-title *ngIf=\"!!settings.title\">\n {{ settings.title | translate }}\n</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!!breadcrumb\">\n <c8y-breadcrumb-item\n [icon]=\"breadcrumb.icon\"\n [label]=\"breadcrumb.label\"\n [path]=\"breadcrumb.path\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n [priority]=\"ACTION_BAR_EDIT_WIDGETS_PRIORITY\"\n *ngIf=\"!(editMode$ | async)\"\n>\n <button\n class=\"btn btn-link animated fadeIn hidden-xs\"\n title=\"{{ 'Edit widgets' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled\"\n (click)=\"enableEditMode()\"\n data-cy=\"c8y-widget-dashboard--edit-widgets\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"send-backward\"></i>\n <span class=\"m-l-4\">{{ 'Edit widgets' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n *ngIf=\"editMode$ | async\"\n>\n <button\n class=\"btn btn-link animated fadeIn\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"widget-dashboard--Add-widget\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add widget' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"d-flex a-i-center gap-8\"\n *ngIf=\"editMode$ | async\"\n>\n <div class=\"input-group input-group-sm animated fadeIn\">\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Undo' | translate\"\n [tooltip]=\"\n editModeButtons.undoButtonDisabled\n ? ''\n : (undoMessage\n | translate: { changeToUndo: editModeButtons.changeToUndoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('undo')\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n >\n <i [c8yIcon]=\"'undo'\"></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default btn-sm btn-icon\"\n [attr.aria-label]=\"'Redo' | translate\"\n [tooltip]=\"\n editModeButtons.redoButtonDisabled\n ? ''\n : (redoMessage\n | translate: { changeToRedo: editModeButtons.changeToRedoName | translate })\n \"\n container=\"body\"\n (click)=\"revertChange.emit('redo')\"\n [disabled]=\"editModeButtons.redoButtonDisabled\"\n >\n <i [c8yIcon]=\"'redo'\"></i>\n </button>\n </div>\n <span></span>\n </div>\n <div class=\"btn-group animated fadeIn\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancelDashboardSave()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm m-l-8\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"editModeButtons.undoButtonDisabled\"\n (click)=\"saveDashboard()\"\n data-cy=\"c8y-widgets-dashboard--save\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"onEditDashboard.observers.length\"\n>\n <button\n class=\"btn btn-link hidden-xs m-l-0\"\n title=\"{{ 'Dashboard settings' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n (click)=\"onEditDashboard.emit()\"\n data-cy=\"c8y-widgets-dashboard--edit-dashboard\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n <button\n class=\"btn btn-link visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"sorting-slider\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Dashboard settings' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"settings.allowFullscreen\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n tooltip=\"{{ 'Full screen' | translate }}\"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"widgets-dashboard--Full-screen\"\n >\n <i [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{ 'Full screen' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n *ngIf=\"settings.canCopy\"\n>\n <div\n [ngStyle]=\"{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n }\"\n >\n <button\n class=\"hidden-xs\"\n title=\"{{\n (isCopyDisabled === true || !isCopyDisabled?.state ? 'Disabled' : copyDashboardLabel)\n | translate\n }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"onCopyDashboard.emit()\"\n [disabled]=\"isCopyDisabled === true || !isCopyDisabled?.state || (editMode$ | async)\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n <button\n class=\"btn-help btn-help--sm m-r-16 hidden-xs\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"copyDisabledPopoverMsg | translate\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!isCopyDisabled?.state && copyDisabledPopoverMsg\"\n data-cy=\"widgets-dashboard--info-copy-dashboard\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </div>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n [ngClass]=\"{ 'btn btn-link': !settings.canDelete }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"clone\"></i>\n <span>{{ copyDashboardLabel | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-3000\"\n *ngIf=\"settings.canDelete && onDeleteDashboard.observers.length\"\n>\n <button\n class=\"hidden-xs\"\n title=\"{{ 'Delete dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n (click)=\"onDeleteDashboard.emit()\"\n [disabled]=\"settings.isDisabled || (editMode$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n <button\n class=\"visible-xs m-l-0\"\n tooltip=\"{{ 'Not available on mobile phone' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--delete-dashboard-mobile\"\n [ngClass]=\"{ 'btn btn-link': !settings.canCopy }\"\n [disabled]=\"true\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Delete dashboard</span>\n </button>\n</c8y-action-bar-item>\n\n<ng-template #loadingIndicator>\n <c8y-loading\n class=\"col-xs-12 text-center\"\n *ngIf=\"isLoadingWidgets$ | async\"\n ></c8y-loading>\n</ng-template>\n\n<ng-container *ngIf=\"!(isLoadingWidgets$ | async); else loadingIndicator\">\n <ng-container *ngIf=\"resolvedWidgets$ | async as widgetsToDisplay\">\n <!-- empty state -->\n <c8y-ui-empty-state\n [icon]=\"'c8y-device'\"\n [title]=\"'No widgets to display.' | translate\"\n *ngIf=\"widgetsToDisplay?.length === 0\"\n >\n <div *ngIf=\"onAddWidget.observers.length\">\n <p\n translate\n *ngIf=\"editMode$ | async\"\n >\n Add widgets to this dashboard.\n </p>\n <p\n translate\n *ngIf=\"!(editMode$ | async)\"\n >\n Click \"Edit widgets\" to unlock\n </p>\n <div>\n <button\n class=\"btn btn-primary m-t-16\"\n title=\"{{ 'Add widget' | translate }}\"\n type=\"button\"\n [disabled]=\"settings.isDisabled || !(editMode$ | async)\"\n (click)=\"onAddWidget.emit()\"\n data-cy=\"c8y-widgets-dashboard--add-widget\"\n translate\n >\n Add widget\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-dashboards\">user documentation</a>\n .\n </small>\n </p>\n </div>\n </c8y-ui-empty-state>\n\n <c8y-dashboard\n [columns]=\"settings.columns\"\n (dashboardChange)=\"onChangeDashboard.emit($event)\"\n #dashboard\n >\n <c8y-dashboard-child\n [class]=\"widget.classes\"\n *ngFor=\"let widget of widgetsToDisplay\"\n [x]=\"widget._x\"\n [y]=\"widget._y\"\n [width]=\"widget._width || settings.defaultWidth\"\n [height]=\"widget._height || settings.defaultHeight\"\n [margin]=\"settings.widgetMargin\"\n [data]=\"widget\"\n [useIntersection]=\"true\"\n [editMode]=\"editMode$ | async\"\n (changeStart)=\"onChangeStart.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (changeEnd)=\"onChangeEnd.emit({ widget: widget, source: child, dashboard: dashboard })\"\n (toggleFullscreen)=\"toggleFullscreenOnWidget(child)\"\n [canToggleFullscreen]=\"!(inFullScreen$ | async) || widgetInFullscreenMode\"\n #child\n >\n <c8y-dashboard-child-title>\n <span\n data-cy=\"c8y-dashboard-list--device-widget\"\n *ngIf=\"settings.translateWidgetTitle\"\n >\n {{ widget.title | translate }}\n </span>\n <span *ngIf=\"!settings.translateWidgetTitle\">\n {{ widget.title }}\n </span>\n </c8y-dashboard-child-title>\n <c8y-dashboard-child-action *ngIf=\"onEditWidget.observers.length\">\n <button\n title=\"{{ 'Edit widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--Edit-widget\"\n (click)=\"onEditWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"pencil\"></i>\n <span translate>Edit</span>\n </button>\n </c8y-dashboard-child-action>\n <c8y-dashboard-child-action *ngIf=\"onDeleteWidget.observers.length\">\n <button\n title=\"{{ 'Remove widget' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-widgets-dashboard--remove-widget\"\n (click)=\"onDeleteWidget.emit({ widget: widget, source: child, dashboard: dashboard })\"\n >\n <i c8yIcon=\"delete\"></i>\n <span translate>Remove</span>\n </button>\n </c8y-dashboard-child-action>\n\n <c8y-widget-time-context\n *ngIf=\"\n (widget.config?.displaySettings?.globalTimeContext ||\n widget.config?.displaySettings?.globalRealtimeContext) &&\n (widget.config.widgetInstanceGlobalTimeContext ||\n widget.config.widgetInstanceGlobalAutoRefreshContext)\n \"\n (dateContextChange)=\"updateWidgetConfig($event, widget)\"\n [canDecouple]=\"widget.config.canDecoupleGlobalTimeContext\"\n [displaySettings]=\"widget.config.displaySettings\"\n [hidden]=\"editMode$ | async\"\n ></c8y-widget-time-context>\n\n <c8y-widget-auto-refresh-context\n *ngIf=\"\n widget?.config?.widgetInstanceGlobalAutoRefreshContext &&\n widget.config?.displaySettings.globalAutoRefreshContext\n \"\n [editMode$]=\"editMode$\"\n ></c8y-widget-auto-refresh-context>\n\n <c8y-dynamic-component\n [componentId]=\"widget.componentId || widget.name\"\n [config]=\"\n widget.templateUrl || widget.widgetComponent\n ? { child: widget, dashboard: contextDashboard, context: context }\n : widget.config\n \"\n *ngIf=\"child.intersected\"\n (updateWidgetClasses)=\"updateWidgetClasses(widget, $event)\"\n ></c8y-dynamic-component>\n </c8y-dashboard-child>\n </c8y-dashboard>\n </ng-container>\n</ng-container>\n" }]
30063
30100
  }], ctorParameters: () => [{ type: DynamicComponentService }, { type: i1$1.TranslateService }, { type: i1$3.ActivatedRoute }, { type: ModalService }, { type: WidgetGlobalAutoRefreshService }], propDecorators: { widgets: [{
30064
30101
  type: Input
30065
30102
  }], context: [{