@c8y/ngx-components 1023.30.0 → 1023.42.1
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/alarms/cockpit/index.d.ts.map +1 -1
- package/alarms/devicemanagement/index.d.ts.map +1 -1
- package/alarms/index.d.ts +25 -2
- package/alarms/index.d.ts.map +1 -1
- package/asset-properties/index.d.ts +20 -2
- package/asset-properties/index.d.ts.map +1 -1
- package/bookmarks/index.d.ts +15 -7
- package/bookmarks/index.d.ts.map +1 -1
- package/context-dashboard/index.d.ts.map +1 -1
- package/datapoint-explorer/view/index.d.ts +2 -0
- package/datapoint-explorer/view/index.d.ts.map +1 -1
- package/device-grid/index.d.ts.map +1 -1
- package/echart/index.d.ts +19 -3
- package/echart/index.d.ts.map +1 -1
- package/feature-toggles/index.d.ts +6 -0
- package/feature-toggles/index.d.ts.map +1 -0
- package/feature-toggles/list/index.d.ts +63 -0
- package/feature-toggles/list/index.d.ts.map +1 -0
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +6 -11
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs +37 -11
- package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +58 -10
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +36 -12
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B04ixTyA.mjs → c8y-ngx-components-asset-property-grid.component-BoVrIpap.mjs} +5 -12
- package/fesm2022/c8y-ngx-components-asset-property-grid.component-BoVrIpap.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +86 -39
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +2 -2
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +3 -2
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +21 -36
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +5 -2
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +101 -42
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +3 -3
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs +242 -0
- package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-feature-toggles.mjs +36 -0
- package/fesm2022/c8y-ngx-components-feature-toggles.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-global-context.mjs +60 -17
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +127 -33
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +2 -2
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +7 -3
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs +19 -0
- package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-upgrade.mjs +46 -4
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-pie-chart.mjs +30 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-pie-chart.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs +2 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +5 -5
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +4 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +4 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +18 -11
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +156 -67
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs +366 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs +5 -2
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +44 -15
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +23 -4
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +11 -1
- package/index.d.ts.map +1 -1
- package/locales/de.po +261 -143
- package/locales/es.po +155 -53
- package/locales/fr.po +299 -193
- package/locales/ja_JP.po +346 -252
- package/locales/ko.po +154 -54
- package/locales/locales.pot +142 -41
- package/locales/nl.po +156 -54
- package/locales/pl.po +155 -53
- package/locales/pt_BR.po +154 -54
- package/locales/zh_CN.po +155 -53
- package/locales/zh_TW.po +156 -54
- package/map/index.d.ts +41 -10
- package/map/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/trusted-certificates/index.d.ts +2 -0
- package/trusted-certificates/index.d.ts.map +1 -1
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/definitions/index.d.ts +1 -0
- package/widgets/definitions/index.d.ts.map +1 -1
- package/widgets/definitions/pie-chart/index.d.ts +25 -0
- package/widgets/definitions/pie-chart/index.d.ts.map +1 -0
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/implementations/html-widget/index.d.ts +2 -2
- package/widgets/implementations/html-widget/index.d.ts.map +1 -1
- package/widgets/implementations/map/index.d.ts +1 -0
- package/widgets/implementations/map/index.d.ts.map +1 -1
- package/widgets/implementations/markdown/index.d.ts +52 -18
- package/widgets/implementations/markdown/index.d.ts.map +1 -1
- package/widgets/implementations/pie-chart/index.d.ts +129 -0
- package/widgets/implementations/pie-chart/index.d.ts.map +1 -0
- package/widgets/widget-providers/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-property-grid.component-B04ixTyA.mjs.map +0 -1
|
@@ -7992,6 +7992,11 @@ class GlobalContextInlineComponent {
|
|
|
7992
7992
|
this.config = input(null, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
7993
7993
|
this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
7994
7994
|
this.dashboardChildForLegacy = input(...(ngDevMode ? [undefined, { debugName: "dashboardChildForLegacy" }] : []));
|
|
7995
|
+
/**
|
|
7996
|
+
* When true, disables refresh event emissions.
|
|
7997
|
+
* Use when widget handles its own data refresh (e.g., via realtime subscriptions).
|
|
7998
|
+
*/
|
|
7999
|
+
this.disableRefreshEmits = input(false, ...(ngDevMode ? [{ debugName: "disableRefreshEmits" }] : []));
|
|
7995
8000
|
// --- Outputs ---
|
|
7996
8001
|
this.refresh = output();
|
|
7997
8002
|
this.globalContextChange = output();
|
|
@@ -8166,6 +8171,9 @@ class GlobalContextInlineComponent {
|
|
|
8166
8171
|
});
|
|
8167
8172
|
}
|
|
8168
8173
|
onLocalRefreshTrigger() {
|
|
8174
|
+
if (this.disableRefreshEmits()) {
|
|
8175
|
+
return;
|
|
8176
|
+
}
|
|
8169
8177
|
const outcome = this.processRefreshEvent({
|
|
8170
8178
|
globalDateTimeContext: this.getGlobalState().dateTimeContext ?? this.config()?.dateTimeContext ?? null
|
|
8171
8179
|
});
|
|
@@ -8173,6 +8181,12 @@ class GlobalContextInlineComponent {
|
|
|
8173
8181
|
this.refresh.emit(null);
|
|
8174
8182
|
}
|
|
8175
8183
|
}
|
|
8184
|
+
/**
|
|
8185
|
+
* Sets the auto-refresh form control value without affecting link states.
|
|
8186
|
+
* Used when AngularJS widgets update their config directly (e.g., drag X axis in DPE 1.0).
|
|
8187
|
+
* Note: This only updates the form value, NOT calling pauseAutoRefresh() which would
|
|
8188
|
+
* also unlink controls and break the global context flow for date changes.
|
|
8189
|
+
*/
|
|
8176
8190
|
setAutoRefreshEnabled(enabled) {
|
|
8177
8191
|
const autoRefreshControl = this.form?.get('isAutoRefreshEnabled');
|
|
8178
8192
|
if (autoRefreshControl && autoRefreshControl.value !== enabled) {
|
|
@@ -8368,7 +8382,7 @@ class GlobalContextInlineComponent {
|
|
|
8368
8382
|
subscribeToGlobalRefreshEvents() {
|
|
8369
8383
|
this.globalContextEventService
|
|
8370
8384
|
.on(GLOBAL_CONTEXT_EVENTS.REFRESH)
|
|
8371
|
-
.pipe(takeUntilDestroyed(this.destroyReference))
|
|
8385
|
+
.pipe(filter$1(() => !this.disableRefreshEmits()), takeUntilDestroyed(this.destroyReference))
|
|
8372
8386
|
.subscribe(dateTimeContext => {
|
|
8373
8387
|
if (dateTimeContext) {
|
|
8374
8388
|
this.handleGlobalRefresh(dateTimeContext);
|
|
@@ -8505,7 +8519,7 @@ class GlobalContextInlineComponent {
|
|
|
8505
8519
|
};
|
|
8506
8520
|
}
|
|
8507
8521
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8508
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8522
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, disableRefreshEmits: { classPropertyName: "disableRefreshEmits", publicName: "disableRefreshEmits", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8509
8523
|
}
|
|
8510
8524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextInlineComponent, decorators: [{
|
|
8511
8525
|
type: Component,
|
|
@@ -8521,7 +8535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8521
8535
|
NgTemplateOutlet,
|
|
8522
8536
|
NgClass
|
|
8523
8537
|
], selector: 'c8y-global-context-inline', exportAs: 'globalContextInline', providers: [GlobalContextInlineOrchestratorService], template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n" }]
|
|
8524
|
-
}], ctorParameters: () => [], propDecorators: { widgetControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], refresh: [{ type: i0.Output, args: ["refresh"] }], globalContextChange: [{ type: i0.Output, args: ["globalContextChange"] }], headerTemplateRef: [{
|
|
8538
|
+
}], ctorParameters: () => [], propDecorators: { widgetControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], disableRefreshEmits: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRefreshEmits", required: false }] }], refresh: [{ type: i0.Output, args: ["refresh"] }], globalContextChange: [{ type: i0.Output, args: ["globalContextChange"] }], headerTemplateRef: [{
|
|
8525
8539
|
type: ViewChild,
|
|
8526
8540
|
args: ['headerContent', { static: true, read: TemplateRef }]
|
|
8527
8541
|
}] } });
|
|
@@ -10467,6 +10481,11 @@ class GlobalContextWidgetWrapperComponent {
|
|
|
10467
10481
|
this.controlLinks = input({}, ...(ngDevMode ? [{ debugName: "controlLinks" }] : []));
|
|
10468
10482
|
this.dashboardChildForLegacy = input(...(ngDevMode ? [undefined, { debugName: "dashboardChildForLegacy" }] : []));
|
|
10469
10483
|
this.config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
10484
|
+
/**
|
|
10485
|
+
* When true, disables refresh event emissions.
|
|
10486
|
+
* Use when widget handles its own data refresh (e.g., via realtime subscriptions).
|
|
10487
|
+
*/
|
|
10488
|
+
this.disableRefreshEmits = input(false, ...(ngDevMode ? [{ debugName: "disableRefreshEmits" }] : []));
|
|
10470
10489
|
// --- State Management ---
|
|
10471
10490
|
this.internalConfig = signal({}, ...(ngDevMode ? [{ debugName: "internalConfig" }] : []));
|
|
10472
10491
|
// Latest global snapshot cached for child config updates on mode change
|
|
@@ -10583,6 +10602,12 @@ class GlobalContextWidgetWrapperComponent {
|
|
|
10583
10602
|
}
|
|
10584
10603
|
// Update the signal state immutably.
|
|
10585
10604
|
this.internalConfig.update(cfg => merge({}, cfg, processedDiff));
|
|
10605
|
+
// Sync inline component's form when isAutoRefreshEnabled changes from external config.
|
|
10606
|
+
// This is needed for legacy AngularJS widgets that update config directly.
|
|
10607
|
+
// Example: drag X axis in the DPE 1.0 widget.
|
|
10608
|
+
if (processedDiff.isAutoRefreshEnabled !== undefined) {
|
|
10609
|
+
this.globalContextInlineComponent?.setAutoRefreshEnabled(processedDiff.isAutoRefreshEnabled);
|
|
10610
|
+
}
|
|
10586
10611
|
// the widget enters config mode. This provides a consistent "reset" point for the user.
|
|
10587
10612
|
if (!this.widgetInitialConfig && this.displayMode() === WIDGET_DISPLAY_MODE.CONFIG) {
|
|
10588
10613
|
this.widgetInitialConfig = structuredClone(this.internalConfig());
|
|
@@ -10604,7 +10629,7 @@ class GlobalContextWidgetWrapperComponent {
|
|
|
10604
10629
|
return diff;
|
|
10605
10630
|
}
|
|
10606
10631
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextWidgetWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10607
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextWidgetWrapperComponent, isStandalone: true, selector: "c8y-global-context-widget-wrapper", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, widgetControlsConfig: { classPropertyName: "widgetControlsConfig", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, controlLinks: { classPropertyName: "controlLinks", publicName: "controlLinks", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { globalContextChange: "globalContextChange" }, host: { classAttribute: "sticky-top bg-component d-block min-width-0" }, queries: [{ propertyName: "widgetBodyRef", first: true, predicate: ["widgetBody"], descendants: true }, { propertyName: "widgetHeaderRef", first: true, predicate: ["widgetHeader"], descendants: true }], viewQueries: [{ propertyName: "globalContextInlineComponent", first: true, predicate: GlobalContextInlineComponent, descendants: true }], ngImport: i0, template: `
|
|
10632
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextWidgetWrapperComponent, isStandalone: true, selector: "c8y-global-context-widget-wrapper", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, widgetControlsConfig: { classPropertyName: "widgetControlsConfig", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, controlLinks: { classPropertyName: "controlLinks", publicName: "controlLinks", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, disableRefreshEmits: { classPropertyName: "disableRefreshEmits", publicName: "disableRefreshEmits", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { globalContextChange: "globalContextChange" }, host: { classAttribute: "sticky-top bg-component d-block min-width-0" }, queries: [{ propertyName: "widgetBodyRef", first: true, predicate: ["widgetBody"], descendants: true }, { propertyName: "widgetHeaderRef", first: true, predicate: ["widgetHeader"], descendants: true }], viewQueries: [{ propertyName: "globalContextInlineComponent", first: true, predicate: GlobalContextInlineComponent, descendants: true }], ngImport: i0, template: `
|
|
10608
10633
|
@if (widgetControls()) {
|
|
10609
10634
|
@let GLOBAL_CONTEXT_CONFIG = internalConfig();
|
|
10610
10635
|
@let INLINE = WIDGET_DISPLAY_MODE.INLINE;
|
|
@@ -10621,6 +10646,7 @@ class GlobalContextWidgetWrapperComponent {
|
|
|
10621
10646
|
[widgetControls]="widgetControls()"
|
|
10622
10647
|
[isLoading]="isLoading()"
|
|
10623
10648
|
[dashboardChildForLegacy]="dashboardChildForLegacy()"
|
|
10649
|
+
[disableRefreshEmits]="disableRefreshEmits()"
|
|
10624
10650
|
(refresh)="onRefresh()"
|
|
10625
10651
|
(globalContextChange)="onGlobalContextChange($event)"
|
|
10626
10652
|
>
|
|
@@ -10654,7 +10680,7 @@ class GlobalContextWidgetWrapperComponent {
|
|
|
10654
10680
|
}
|
|
10655
10681
|
}
|
|
10656
10682
|
}
|
|
10657
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GlobalContextInlineComponent, selector: "c8y-global-context-inline", inputs: ["widgetControls", "config", "isLoading", "dashboardChildForLegacy"], outputs: ["refresh", "globalContextChange"], exportAs: ["globalContextInline"] }, { kind: "component", type: GlobalContextWidgetConfigComponent, selector: "c8y-global-context-widget-config", inputs: ["config", "widgetControls", "isLoading"], outputs: ["displayModeChange", "refresh", "globalContextChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: PreviewControlsComponent, selector: "c8y-preview-controls", inputs: ["widgetControls", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10683
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GlobalContextInlineComponent, selector: "c8y-global-context-inline", inputs: ["widgetControls", "config", "isLoading", "dashboardChildForLegacy", "disableRefreshEmits"], outputs: ["refresh", "globalContextChange"], exportAs: ["globalContextInline"] }, { kind: "component", type: GlobalContextWidgetConfigComponent, selector: "c8y-global-context-widget-config", inputs: ["config", "widgetControls", "isLoading"], outputs: ["displayModeChange", "refresh", "globalContextChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: PreviewControlsComponent, selector: "c8y-preview-controls", inputs: ["widgetControls", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10658
10684
|
}
|
|
10659
10685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextWidgetWrapperComponent, decorators: [{
|
|
10660
10686
|
type: Component,
|
|
@@ -10688,6 +10714,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10688
10714
|
[widgetControls]="widgetControls()"
|
|
10689
10715
|
[isLoading]="isLoading()"
|
|
10690
10716
|
[dashboardChildForLegacy]="dashboardChildForLegacy()"
|
|
10717
|
+
[disableRefreshEmits]="disableRefreshEmits()"
|
|
10691
10718
|
(refresh)="onRefresh()"
|
|
10692
10719
|
(globalContextChange)="onGlobalContextChange($event)"
|
|
10693
10720
|
>
|
|
@@ -10732,7 +10759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10732
10759
|
}], globalContextInlineComponent: [{
|
|
10733
10760
|
type: ViewChild,
|
|
10734
10761
|
args: [GlobalContextInlineComponent]
|
|
10735
|
-
}], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], widgetControlsConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], controlLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlLinks", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], globalContextChange: [{
|
|
10762
|
+
}], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], widgetControlsConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], controlLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlLinks", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], disableRefreshEmits: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRefreshEmits", required: false }] }], globalContextChange: [{
|
|
10736
10763
|
type: Output
|
|
10737
10764
|
}] } });
|
|
10738
10765
|
|
|
@@ -11545,8 +11572,11 @@ class GlobalContextConnectorComponent {
|
|
|
11545
11572
|
this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
11546
11573
|
this.dashboardChild = input.required(...(ngDevMode ? [{ debugName: "dashboardChild" }] : []));
|
|
11547
11574
|
this.linked = input(undefined, ...(ngDevMode ? [{ debugName: "linked" }] : []));
|
|
11575
|
+
/** When false, refresh events are not emitted as configChange - only user-initiated state changes */
|
|
11576
|
+
this.emitRefresh = input(true, ...(ngDevMode ? [{ debugName: "emitRefresh" }] : []));
|
|
11548
11577
|
this.configChange = output();
|
|
11549
11578
|
this.refresh = output();
|
|
11579
|
+
this.linkedChange = output();
|
|
11550
11580
|
this.isLinked = signal(true, ...(ngDevMode ? [{ debugName: "isLinked" }] : []));
|
|
11551
11581
|
this.syncExternalLinkState();
|
|
11552
11582
|
this.subscribeToGlobalContext();
|
|
@@ -11559,6 +11589,7 @@ class GlobalContextConnectorComponent {
|
|
|
11559
11589
|
}
|
|
11560
11590
|
onLinkToggle(linked) {
|
|
11561
11591
|
this.isLinked.set(linked);
|
|
11592
|
+
this.linkedChange.emit(linked);
|
|
11562
11593
|
if (linked) {
|
|
11563
11594
|
const cached = this.eventService.getLatestValue(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
|
|
11564
11595
|
if (cached)
|
|
@@ -11613,15 +11644,20 @@ class GlobalContextConnectorComponent {
|
|
|
11613
11644
|
if (cached)
|
|
11614
11645
|
this.emitIfChanged(cached);
|
|
11615
11646
|
const stateChanges$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11647
|
+
// Only include refresh events if emitRefresh is true
|
|
11648
|
+
let source$ = stateChanges$;
|
|
11649
|
+
if (this.emitRefresh()) {
|
|
11650
|
+
const refresh$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.REFRESH).pipe(map$1(data => ({
|
|
11651
|
+
...this.config(),
|
|
11652
|
+
dateTimeContext: {
|
|
11653
|
+
dateFrom: data.dateFrom,
|
|
11654
|
+
dateTo: data.dateTo,
|
|
11655
|
+
interval: data.interval
|
|
11656
|
+
}
|
|
11657
|
+
})));
|
|
11658
|
+
source$ = merge$1(stateChanges$, refresh$);
|
|
11659
|
+
}
|
|
11660
|
+
subscription = source$
|
|
11625
11661
|
.pipe(takeUntilDestroyed(this.destroyRef), catchError(() => EMPTY))
|
|
11626
11662
|
.subscribe(state => {
|
|
11627
11663
|
if (state)
|
|
@@ -11631,6 +11667,13 @@ class GlobalContextConnectorComponent {
|
|
|
11631
11667
|
}
|
|
11632
11668
|
registerWithGlobalContext() {
|
|
11633
11669
|
effect(() => {
|
|
11670
|
+
// Auto-unlink if not in dashboard mode
|
|
11671
|
+
const displayMode = this.config().displayMode;
|
|
11672
|
+
if (displayMode && displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
|
|
11673
|
+
this.isLinked.set(false);
|
|
11674
|
+
this.globalContextService.unregister(this.componentId);
|
|
11675
|
+
return;
|
|
11676
|
+
}
|
|
11634
11677
|
if (this.isLinked()) {
|
|
11635
11678
|
const settings = controlsToSettings(this.controls(), GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, this.config().refreshOption || REFRESH_OPTION.LIVE);
|
|
11636
11679
|
this.globalContextService.register(this.componentId, settings);
|
|
@@ -11652,7 +11695,7 @@ class GlobalContextConnectorComponent {
|
|
|
11652
11695
|
});
|
|
11653
11696
|
}
|
|
11654
11697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextConnectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextConnectorComponent, isStandalone: true, selector: "c8y-global-context-connector", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: true, transformFunction: null }, linked: { classPropertyName: "linked", publicName: "linked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh" }, ngImport: i0, template: `
|
|
11698
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextConnectorComponent, isStandalone: true, selector: "c8y-global-context-connector", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: true, transformFunction: null }, linked: { classPropertyName: "linked", publicName: "linked", isSignal: true, isRequired: false, transformFunction: null }, emitRefresh: { classPropertyName: "emitRefresh", publicName: "emitRefresh", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh", linkedChange: "linkedChange" }, ngImport: i0, template: `
|
|
11656
11699
|
<c8y-link-buttons
|
|
11657
11700
|
[dashboardChild]="dashboardChild()"
|
|
11658
11701
|
[isLinked]="isLinked()"
|
|
@@ -11700,7 +11743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11700
11743
|
}
|
|
11701
11744
|
`
|
|
11702
11745
|
}]
|
|
11703
|
-
}], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: true }] }], linked: [{ type: i0.Input, args: [{ isSignal: true, alias: "linked", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
|
|
11746
|
+
}], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: true }] }], linked: [{ type: i0.Input, args: [{ isSignal: true, alias: "linked", required: false }] }], emitRefresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "emitRefresh", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }], linkedChange: [{ type: i0.Output, args: ["linkedChange"] }] } });
|
|
11704
11747
|
|
|
11705
11748
|
class LocalControlsComponent {
|
|
11706
11749
|
constructor() {
|