@c8y/ngx-components 1023.68.0 → 1023.68.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/c8y-ngx-components-global-context.mjs +67 -10
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +4 -106
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +67 -38
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +4 -4
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +7 -1
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +8 -1
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/widgets/implementations/alarms/index.d.ts +4 -0
- package/widgets/implementations/alarms/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-graph/index.d.ts +25 -17
- package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-list/index.d.ts +2 -0
- package/widgets/implementations/datapoints-list/index.d.ts.map +1 -1
|
@@ -10837,8 +10837,12 @@ const CONTEXT_FEATURE = {
|
|
|
10837
10837
|
AGGREGATION: 'aggregation',
|
|
10838
10838
|
/** Auto-refresh toggle (fixed 5s interval) - live mode only */
|
|
10839
10839
|
AUTO_REFRESH: 'autoRefresh',
|
|
10840
|
-
/** Manual refresh button */
|
|
10841
|
-
REFRESH: 'refresh'
|
|
10840
|
+
/** Manual refresh button (shown in all modes) */
|
|
10841
|
+
REFRESH: 'refresh',
|
|
10842
|
+
/** Manual refresh button - live mode only */
|
|
10843
|
+
REFRESH_LIVE: 'refreshLive',
|
|
10844
|
+
/** Manual refresh button - history mode only */
|
|
10845
|
+
REFRESH_HISTORY: 'refreshHistory'
|
|
10842
10846
|
};
|
|
10843
10847
|
/** Preset name constants for type-safe access */
|
|
10844
10848
|
const PRESET_NAME = {
|
|
@@ -10852,7 +10856,9 @@ const PRESET_NAME = {
|
|
|
10852
10856
|
KPI: 'kpi',
|
|
10853
10857
|
KPI_CONFIG: 'kpiConfig',
|
|
10854
10858
|
DATA_POINTS_LIST: 'dataPointsList',
|
|
10855
|
-
DATA_POINTS_LIST_CONFIG: 'dataPointsListConfig'
|
|
10859
|
+
DATA_POINTS_LIST_CONFIG: 'dataPointsListConfig',
|
|
10860
|
+
DATAPOINTS_GRAPH: 'datapointsGraph',
|
|
10861
|
+
DATAPOINTS_GRAPH_CONFIG: 'datapointsGraphConfig'
|
|
10856
10862
|
};
|
|
10857
10863
|
/** Control presets for different widget types (mode constraints applied by applyModeConstraints) */
|
|
10858
10864
|
const CONTROL_PRESETS = {
|
|
@@ -10993,6 +10999,45 @@ const CONTROL_PRESETS = {
|
|
|
10993
10999
|
CONTEXT_FEATURE.HISTORY_TIME,
|
|
10994
11000
|
CONTEXT_FEATURE.AUTO_REFRESH
|
|
10995
11001
|
]
|
|
11002
|
+
},
|
|
11003
|
+
/** For data points graph widget inline controls (supports aggregation in dashboard mode) */
|
|
11004
|
+
[PRESET_NAME.DATAPOINTS_GRAPH]: {
|
|
11005
|
+
dashboard: [
|
|
11006
|
+
CONTEXT_FEATURE.LIVE_TIME,
|
|
11007
|
+
CONTEXT_FEATURE.HISTORY_TIME,
|
|
11008
|
+
CONTEXT_FEATURE.AUTO_REFRESH,
|
|
11009
|
+
CONTEXT_FEATURE.AGGREGATION
|
|
11010
|
+
],
|
|
11011
|
+
config: [CONTEXT_FEATURE.AUTO_REFRESH],
|
|
11012
|
+
view_and_config: [
|
|
11013
|
+
CONTEXT_FEATURE.LIVE_TIME,
|
|
11014
|
+
CONTEXT_FEATURE.HISTORY_TIME,
|
|
11015
|
+
CONTEXT_FEATURE.AGGREGATION,
|
|
11016
|
+
CONTEXT_FEATURE.AUTO_REFRESH,
|
|
11017
|
+
CONTEXT_FEATURE.REFRESH_HISTORY
|
|
11018
|
+
]
|
|
11019
|
+
},
|
|
11020
|
+
/** For data points graph widget config section (full controls including time range) */
|
|
11021
|
+
[PRESET_NAME.DATAPOINTS_GRAPH_CONFIG]: {
|
|
11022
|
+
dashboard: [
|
|
11023
|
+
CONTEXT_FEATURE.LIVE_TIME,
|
|
11024
|
+
CONTEXT_FEATURE.HISTORY_TIME,
|
|
11025
|
+
CONTEXT_FEATURE.AUTO_REFRESH,
|
|
11026
|
+
CONTEXT_FEATURE.AGGREGATION
|
|
11027
|
+
],
|
|
11028
|
+
config: [
|
|
11029
|
+
CONTEXT_FEATURE.LIVE_TIME,
|
|
11030
|
+
CONTEXT_FEATURE.HISTORY_TIME,
|
|
11031
|
+
CONTEXT_FEATURE.AUTO_REFRESH,
|
|
11032
|
+
CONTEXT_FEATURE.AGGREGATION
|
|
11033
|
+
],
|
|
11034
|
+
view_and_config: [
|
|
11035
|
+
CONTEXT_FEATURE.LIVE_TIME,
|
|
11036
|
+
CONTEXT_FEATURE.HISTORY_TIME,
|
|
11037
|
+
CONTEXT_FEATURE.AGGREGATION,
|
|
11038
|
+
CONTEXT_FEATURE.AUTO_REFRESH,
|
|
11039
|
+
CONTEXT_FEATURE.REFRESH
|
|
11040
|
+
]
|
|
10996
11041
|
}
|
|
10997
11042
|
};
|
|
10998
11043
|
/**
|
|
@@ -11004,12 +11049,16 @@ const CONTROL_PRESETS = {
|
|
|
11004
11049
|
*/
|
|
11005
11050
|
function applyModeConstraints(controls, refreshOption) {
|
|
11006
11051
|
if (refreshOption === REFRESH_OPTION.HISTORY) {
|
|
11007
|
-
// History mode: no auto-refresh, no live time
|
|
11008
|
-
return controls.filter(c => c !== CONTEXT_FEATURE.AUTO_REFRESH &&
|
|
11052
|
+
// History mode: no auto-refresh, no live time, no live-only refresh
|
|
11053
|
+
return controls.filter(c => c !== CONTEXT_FEATURE.AUTO_REFRESH &&
|
|
11054
|
+
c !== CONTEXT_FEATURE.LIVE_TIME &&
|
|
11055
|
+
c !== CONTEXT_FEATURE.REFRESH_LIVE);
|
|
11009
11056
|
}
|
|
11010
11057
|
if (refreshOption === REFRESH_OPTION.LIVE) {
|
|
11011
|
-
// Live mode: no aggregation, no history time
|
|
11012
|
-
return controls.filter(c => c !== CONTEXT_FEATURE.AGGREGATION &&
|
|
11058
|
+
// Live mode: no aggregation, no history time, no history-only refresh
|
|
11059
|
+
return controls.filter(c => c !== CONTEXT_FEATURE.AGGREGATION &&
|
|
11060
|
+
c !== CONTEXT_FEATURE.HISTORY_TIME &&
|
|
11061
|
+
c !== CONTEXT_FEATURE.REFRESH_HISTORY);
|
|
11013
11062
|
}
|
|
11014
11063
|
return controls;
|
|
11015
11064
|
}
|
|
@@ -11050,7 +11099,9 @@ function controlsToSettings(controls, displayMode, refreshOption) {
|
|
|
11050
11099
|
showAutoRefresh: activeControls.includes(CONTEXT_FEATURE.AUTO_REFRESH),
|
|
11051
11100
|
showRefreshInterval: false,
|
|
11052
11101
|
showAggregation: activeControls.includes(CONTEXT_FEATURE.AGGREGATION),
|
|
11053
|
-
showRefresh: activeControls.includes(CONTEXT_FEATURE.REFRESH)
|
|
11102
|
+
showRefresh: activeControls.includes(CONTEXT_FEATURE.REFRESH) ||
|
|
11103
|
+
activeControls.includes(CONTEXT_FEATURE.REFRESH_LIVE) ||
|
|
11104
|
+
activeControls.includes(CONTEXT_FEATURE.REFRESH_HISTORY)
|
|
11054
11105
|
};
|
|
11055
11106
|
}
|
|
11056
11107
|
|
|
@@ -11302,8 +11353,14 @@ class ContextControlsComponent {
|
|
|
11302
11353
|
const baseControls = presetDef[this.displayMode()];
|
|
11303
11354
|
const refreshOption = this.config().refreshOption || REFRESH_OPTION.LIVE;
|
|
11304
11355
|
const filteredControls = applyModeConstraints(baseControls, refreshOption);
|
|
11305
|
-
// Normalize LIVE_TIME/HISTORY_TIME to 'time' for template
|
|
11306
|
-
return filteredControls.map(c =>
|
|
11356
|
+
// Normalize LIVE_TIME/HISTORY_TIME to 'time' and REFRESH_*/REFRESH to 'refresh' for template
|
|
11357
|
+
return filteredControls.map(c => {
|
|
11358
|
+
if (c === CONTEXT_FEATURE.LIVE_TIME || c === CONTEXT_FEATURE.HISTORY_TIME)
|
|
11359
|
+
return 'time';
|
|
11360
|
+
if (c === CONTEXT_FEATURE.REFRESH_LIVE || c === CONTEXT_FEATURE.REFRESH_HISTORY)
|
|
11361
|
+
return CONTEXT_FEATURE.REFRESH;
|
|
11362
|
+
return c;
|
|
11363
|
+
});
|
|
11307
11364
|
}, ...(ngDevMode ? [{ debugName: "visibleControls" }] : []));
|
|
11308
11365
|
this.disabledAggregations = computed(() => {
|
|
11309
11366
|
const dateCtx = this.config().dateTimeContext;
|