@schneideress/dashboardframework 20.0.28 → 20.0.30
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.
|
@@ -4976,13 +4976,40 @@ class RADashboardArea {
|
|
|
4976
4976
|
this.isElementLoaded(this.widgetList[this.currentLoadingCount]?.widgetElement) ?
|
|
4977
4977
|
this.initialWidgetCount++ : null;
|
|
4978
4978
|
}
|
|
4979
|
+
/**
|
|
4980
|
+
* Whether expanded view is active. URL `?expanded=true` is checked first; then bulk action (works in normal browser and kiosk).
|
|
4981
|
+
* Handles bulkActionData as string (from API) or object (from event).
|
|
4982
|
+
*/
|
|
4983
|
+
isExpandedView() {
|
|
4984
|
+
try {
|
|
4985
|
+
if (typeof window !== 'undefined' && window.location?.search) {
|
|
4986
|
+
const fromUrl = new URLSearchParams(window.location.search).get('expanded') === 'true';
|
|
4987
|
+
if (fromUrl) {
|
|
4988
|
+
return true;
|
|
4989
|
+
}
|
|
4990
|
+
}
|
|
4991
|
+
}
|
|
4992
|
+
catch (_) {
|
|
4993
|
+
// ignore URL parse errors
|
|
4994
|
+
}
|
|
4995
|
+
if (!this.bulkActionData)
|
|
4996
|
+
return false;
|
|
4997
|
+
try {
|
|
4998
|
+
const data = typeof this.bulkActionData === 'string'
|
|
4999
|
+
? JSON.parse(this.bulkActionData)
|
|
5000
|
+
: this.bulkActionData;
|
|
5001
|
+
return data?.allSelections?.expandedView === true;
|
|
5002
|
+
}
|
|
5003
|
+
catch (_) {
|
|
5004
|
+
return false;
|
|
5005
|
+
}
|
|
5006
|
+
}
|
|
4979
5007
|
dataLoaded(widgetInfo) {
|
|
4980
5008
|
setTimeout(() => {
|
|
4981
5009
|
this.currentLoadingCount--;
|
|
4982
5010
|
}, 100);
|
|
4983
|
-
// For expanded view, override widget dimensions after data loads
|
|
4984
|
-
|
|
4985
|
-
if (isExpandedView && widgetInfo && widgetInfo.widgetInstanceId) {
|
|
5011
|
+
// For expanded view, override widget dimensions after data loads (from bulk action)
|
|
5012
|
+
if (this.isExpandedView() && widgetInfo && widgetInfo.widgetInstanceId) {
|
|
4986
5013
|
this.overrideWidgetDimensions(widgetInfo);
|
|
4987
5014
|
}
|
|
4988
5015
|
// this.loadData()
|