@c8y/ngx-components 1021.56.4 → 1021.56.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts +2 -0
- package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts.map +1 -1
- package/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.d.ts +0 -1
- package/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.d.ts.map +1 -1
- package/core/dashboard/widgets-dashboard-event.service.d.ts +0 -6
- package/core/dashboard/widgets-dashboard-event.service.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts +5 -3
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts.map +1 -1
- package/esm2022/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.mjs +7 -3
- package/esm2022/core/dashboard/widget-auto-refresh-context/widget-auto-refresh-context.component.mjs +2 -10
- package/esm2022/core/dashboard/widgets-dashboard-event.service.mjs +2 -10
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context.component.mjs +16 -19
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.mjs +3 -8
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -7
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +19 -33
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts.map +1 -1
|
@@ -28654,8 +28654,6 @@ class WidgetsDashboardEventService {
|
|
|
28654
28654
|
*/
|
|
28655
28655
|
this.events$ = new Subject();
|
|
28656
28656
|
this.lastValueByEvent = {};
|
|
28657
|
-
this.autoRefresh$ = new ReplaySubject(1);
|
|
28658
|
-
this.onAutoRefresh$ = this.autoRefresh$.asObservable();
|
|
28659
28657
|
}
|
|
28660
28658
|
/**
|
|
28661
28659
|
* Returns a subscribable event observable of specific event type if eventType is passed, or observable of
|
|
@@ -28682,12 +28680,6 @@ class WidgetsDashboardEventService {
|
|
|
28682
28680
|
this.lastValueByEvent[event.type] = event.data;
|
|
28683
28681
|
this.events$.next(event);
|
|
28684
28682
|
}
|
|
28685
|
-
/**
|
|
28686
|
-
* @ignore
|
|
28687
|
-
*/
|
|
28688
|
-
emitAutoRefresh(value) {
|
|
28689
|
-
this.autoRefresh$.next(value);
|
|
28690
|
-
}
|
|
28691
28683
|
// When a dashboard has a multiple tabs, and not all of them has a realtime global context control
|
|
28692
28684
|
// we need to set the realtime to false when switching between tabs to make aggregation selector not to be always disabled
|
|
28693
28685
|
// while global auto-refresh context control is available.
|
|
@@ -29101,7 +29093,7 @@ class WidgetTimeContextComponent {
|
|
|
29101
29093
|
/**
|
|
29102
29094
|
* @ignore only DI.
|
|
29103
29095
|
*/
|
|
29104
|
-
constructor(widgetEventService, dashboardChild, formBuilder, queryService, helperService, router, actionBarService, aggregationService, widgetTimeContextDateRangeService) {
|
|
29096
|
+
constructor(widgetEventService, dashboardChild, formBuilder, queryService, helperService, router, actionBarService, aggregationService, route, widgetTimeContextDateRangeService) {
|
|
29105
29097
|
this.widgetEventService = widgetEventService;
|
|
29106
29098
|
this.dashboardChild = dashboardChild;
|
|
29107
29099
|
this.formBuilder = formBuilder;
|
|
@@ -29110,6 +29102,7 @@ class WidgetTimeContextComponent {
|
|
|
29110
29102
|
this.router = router;
|
|
29111
29103
|
this.actionBarService = actionBarService;
|
|
29112
29104
|
this.aggregationService = aggregationService;
|
|
29105
|
+
this.route = route;
|
|
29113
29106
|
this.widgetTimeContextDateRangeService = widgetTimeContextDateRangeService;
|
|
29114
29107
|
this.INTERVAL_TITLES = INTERVAL_TITLES;
|
|
29115
29108
|
this.DATE_FORMAT = 'short';
|
|
@@ -29172,16 +29165,6 @@ class WidgetTimeContextComponent {
|
|
|
29172
29165
|
this.subscribeToIntervalChange();
|
|
29173
29166
|
this.subscribeToRealtimeChange();
|
|
29174
29167
|
this.subscribeToAggregationChange();
|
|
29175
|
-
this.widgetEventService.onAutoRefresh$
|
|
29176
|
-
.pipe(takeUntil(this.destroy$), tap(autoRefresh => (this.isAutoRefreshEnabled = autoRefresh)))
|
|
29177
|
-
.subscribe(autoRefresh => {
|
|
29178
|
-
// Fix for:
|
|
29179
|
-
// 1. Make a group with dashboard having a widget with with auto-refresh time context enabled.
|
|
29180
|
-
// 2. When you route to e.g. home page and back to the group dashboard, none of a groups will be routable again.
|
|
29181
|
-
queueMicrotask(() => {
|
|
29182
|
-
autoRefresh ? this.onDisableAutoRefresh() : this.enableDateRangeAndAggregation();
|
|
29183
|
-
});
|
|
29184
|
-
});
|
|
29185
29168
|
if (initialContext.realtime) {
|
|
29186
29169
|
this.onRealtimeValueChange(initialContext.realtime);
|
|
29187
29170
|
this.startRealtime();
|
|
@@ -29194,6 +29177,9 @@ class WidgetTimeContextComponent {
|
|
|
29194
29177
|
if (this.canDecouple) {
|
|
29195
29178
|
this.dashboardChild.addActions([this.action]);
|
|
29196
29179
|
}
|
|
29180
|
+
this.route.queryParams
|
|
29181
|
+
.pipe(distinctUntilChanged(), map(params => params['globalContextAutoRefresh'] === 'true'), takeUntil(this.destroy$))
|
|
29182
|
+
.subscribe(this.handleAutoRefreshChange.bind(this));
|
|
29197
29183
|
}
|
|
29198
29184
|
/**
|
|
29199
29185
|
* Toggles the coupling on or off.
|
|
@@ -29246,7 +29232,6 @@ class WidgetTimeContextComponent {
|
|
|
29246
29232
|
this.unsubscribeFromGlobalContext();
|
|
29247
29233
|
this.clearQueryParamsIfNeeded();
|
|
29248
29234
|
this.widgetEventService.setRealtimeTimeContextSetting();
|
|
29249
|
-
this.widgetEventService.emitAutoRefresh(false);
|
|
29250
29235
|
this.destroy$.next();
|
|
29251
29236
|
this.destroy$.complete();
|
|
29252
29237
|
}
|
|
@@ -29475,6 +29460,10 @@ class WidgetTimeContextComponent {
|
|
|
29475
29460
|
});
|
|
29476
29461
|
});
|
|
29477
29462
|
}
|
|
29463
|
+
handleAutoRefreshChange(isEnabled) {
|
|
29464
|
+
this.isAutoRefreshEnabled = isEnabled;
|
|
29465
|
+
isEnabled ? this.onDisableAutoRefresh() : this.enableDateRangeAndAggregation();
|
|
29466
|
+
}
|
|
29478
29467
|
onDisableAutoRefresh() {
|
|
29479
29468
|
this.form.controls.aggregation.setValue(null);
|
|
29480
29469
|
this.disableDateRangeAndAggregation();
|
|
@@ -29535,8 +29524,8 @@ class WidgetTimeContextComponent {
|
|
|
29535
29524
|
return null;
|
|
29536
29525
|
}
|
|
29537
29526
|
}
|
|
29538
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WidgetTimeContextComponent, deps: [{ token: WidgetsDashboardEventService }, { token: DashboardChildComponent }, { token: i2$3.FormBuilder }, { token: WidgetTimeContextQueryService }, { token: WidgetTimeContextHelperService }, { token: i1$5.Router }, { token: ActionBarService }, { token: AggregationService }, { token: WidgetTimeContextDateRangeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29539
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: WidgetTimeContextComponent, isStandalone: true, 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i1$4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i1$4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i1$4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: RealtimeControlComponent, selector: "c8y-realtime-control" }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }] }); }
|
|
29527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WidgetTimeContextComponent, deps: [{ token: WidgetsDashboardEventService }, { token: DashboardChildComponent }, { token: i2$3.FormBuilder }, { token: WidgetTimeContextQueryService }, { token: WidgetTimeContextHelperService }, { token: i1$5.Router }, { token: ActionBarService }, { token: AggregationService }, { token: i1$5.ActivatedRoute }, { token: WidgetTimeContextDateRangeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29528
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: WidgetTimeContextComponent, isStandalone: true, 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i1$4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i1$4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i1$4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: IntervalPickerComponent, selector: "c8y-interval-picker", inputs: ["INTERVALS"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: RealtimeControlComponent, selector: "c8y-realtime-control" }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "component", type: DashboardChildActionComponent, selector: "c8y-dashboard-child-action" }, { kind: "component", type: DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }] }); }
|
|
29540
29529
|
}
|
|
29541
29530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WidgetTimeContextComponent, decorators: [{
|
|
29542
29531
|
type: Component,
|
|
@@ -29561,8 +29550,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
29561
29550
|
DatePipe,
|
|
29562
29551
|
DashboardChildActionComponent,
|
|
29563
29552
|
DateTimePickerComponent
|
|
29564
|
-
], 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" }]
|
|
29565
|
-
}], ctorParameters: () => [{ type: WidgetsDashboardEventService }, { type: DashboardChildComponent }, { type: i2$3.FormBuilder }, { type: WidgetTimeContextQueryService }, { type: WidgetTimeContextHelperService }, { type: i1$5.Router }, { type: ActionBarService }, { type: AggregationService }, { type: WidgetTimeContextDateRangeService }], propDecorators: { canDecouple: [{
|
|
29553
|
+
], 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" }]
|
|
29554
|
+
}], ctorParameters: () => [{ type: WidgetsDashboardEventService }, { type: DashboardChildComponent }, { type: i2$3.FormBuilder }, { type: WidgetTimeContextQueryService }, { type: WidgetTimeContextHelperService }, { type: i1$5.Router }, { type: ActionBarService }, { type: AggregationService }, { type: i1$5.ActivatedRoute }, { type: WidgetTimeContextDateRangeService }], propDecorators: { canDecouple: [{
|
|
29566
29555
|
type: Input
|
|
29567
29556
|
}], displaySettings: [{
|
|
29568
29557
|
type: Input
|
|
@@ -29955,6 +29944,8 @@ class AutoRefreshControlComponent {
|
|
|
29955
29944
|
this.loading = new EventEmitter();
|
|
29956
29945
|
this.widgetGlobalAutoRefresh = inject(WidgetGlobalAutoRefreshService);
|
|
29957
29946
|
this.showIntervalRefresh$ = new BehaviorSubject(this.widgetGlobalAutoRefresh.autoRefreshSettings.isEnabled$.getValue());
|
|
29947
|
+
this.isBtnDisabledSubject = new BehaviorSubject(false);
|
|
29948
|
+
this.isBtnDisabled$ = this.isBtnDisabledSubject.asObservable();
|
|
29958
29949
|
this.destroy$ = new Subject();
|
|
29959
29950
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
29960
29951
|
this.onTouched = () => { };
|
|
@@ -29988,12 +29979,14 @@ class AutoRefreshControlComponent {
|
|
|
29988
29979
|
subscribeOnCountdownChangeState() {
|
|
29989
29980
|
this.widgetGlobalAutoRefresh.countdownActions.reset$
|
|
29990
29981
|
.pipe(tap(() => {
|
|
29982
|
+
this.isBtnDisabledSubject.next(false);
|
|
29991
29983
|
this.loading.emit(false);
|
|
29992
29984
|
this.countdownIntervalComponent?.reset();
|
|
29993
29985
|
}), takeUntil(this.destroy$))
|
|
29994
29986
|
.subscribe();
|
|
29995
29987
|
this.widgetGlobalAutoRefresh.countdownActions.stop$
|
|
29996
29988
|
.pipe(tap(() => {
|
|
29989
|
+
this.isBtnDisabledSubject.next(true);
|
|
29997
29990
|
this.loading.emit(true);
|
|
29998
29991
|
this.countdownIntervalComponent?.stop(true);
|
|
29999
29992
|
}), takeUntil(this.destroy$))
|
|
@@ -30014,7 +30007,7 @@ class AutoRefreshControlComponent {
|
|
|
30014
30007
|
useExisting: forwardRef(() => AutoRefreshControlComponent),
|
|
30015
30008
|
multi: true
|
|
30016
30009
|
}
|
|
30017
|
-
], 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$2.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" }] }); }
|
|
30010
|
+
], 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$2.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" }] }); }
|
|
30018
30011
|
}
|
|
30019
30012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoRefreshControlComponent, decorators: [{
|
|
30020
30013
|
type: Component,
|
|
@@ -30024,7 +30017,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
30024
30017
|
useExisting: forwardRef(() => AutoRefreshControlComponent),
|
|
30025
30018
|
multi: true
|
|
30026
30019
|
}
|
|
30027
|
-
], 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" }]
|
|
30020
|
+
], 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" }]
|
|
30028
30021
|
}], propDecorators: { countdownIntervalComponent: [{
|
|
30029
30022
|
type: ViewChild,
|
|
30030
30023
|
args: [CountdownIntervalComponent]
|
|
@@ -30081,7 +30074,6 @@ class WidgetAutoRefreshContextComponent {
|
|
|
30081
30074
|
this.destroy$ = new Subject();
|
|
30082
30075
|
this.fb = inject(FormBuilder);
|
|
30083
30076
|
this.widgetGlobalAutoRefresh = inject(WidgetGlobalAutoRefreshService);
|
|
30084
|
-
this.widgetEventService = inject(WidgetsDashboardEventService);
|
|
30085
30077
|
}
|
|
30086
30078
|
ngOnInit() {
|
|
30087
30079
|
this.widgetGlobalAutoRefresh.globalRefreshWidgetsCount.update(count => count + 1);
|
|
@@ -30089,11 +30081,6 @@ class WidgetAutoRefreshContextComponent {
|
|
|
30089
30081
|
this.subscribeOnAutoRefreshSecondsChange();
|
|
30090
30082
|
this.subscribeOnAutoRefreshChange();
|
|
30091
30083
|
this.subscribeOnRouterEvents();
|
|
30092
|
-
this.form.controls.autoRefresh.valueChanges
|
|
30093
|
-
.pipe(takeUntil(this.destroy$))
|
|
30094
|
-
.subscribe(autorefresh => {
|
|
30095
|
-
this.widgetEventService.emitAutoRefresh(autorefresh);
|
|
30096
|
-
});
|
|
30097
30084
|
}
|
|
30098
30085
|
ngAfterViewInit() {
|
|
30099
30086
|
this.initializeWidgetSubscriptions();
|
|
@@ -30107,7 +30094,6 @@ class WidgetAutoRefreshContextComponent {
|
|
|
30107
30094
|
.pipe(takeUntil(this.destroy$))
|
|
30108
30095
|
.subscribe();
|
|
30109
30096
|
this.listenOnDashboardSaveOperation();
|
|
30110
|
-
this.widgetEventService.emitAutoRefresh(this.form.controls.autoRefresh.value);
|
|
30111
30097
|
}
|
|
30112
30098
|
ngOnDestroy() {
|
|
30113
30099
|
this.onContextDestroy();
|