@visns-studio/visns-components 5.0.27 → 5.0.28

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/package.json CHANGED
@@ -77,7 +77,7 @@
77
77
  "react-dom": "^17.0.0 || ^18.0.0"
78
78
  },
79
79
  "name": "@visns-studio/visns-components",
80
- "version": "5.0.27",
80
+ "version": "5.0.28",
81
81
  "description": "Various packages to assist in the development of our Custom Applications.",
82
82
  "main": "src/index.js",
83
83
  "files": [
@@ -285,10 +285,11 @@ function GenericDashboard({ setting }) {
285
285
  widget.props.keys = widgetData.keys;
286
286
  }
287
287
 
288
- const barData = widgetData.bar?.data || widgetData;
288
+ const barData =
289
+ widgetData.bar?.data || widgetData.data || widgetData;
289
290
 
290
291
  return (
291
- <div style={{ height: '600px' }}>
292
+ <div style={{ height: widget.height || '600px' }}>
292
293
  <ResponsiveBar data={barData} {...widget.props} />
293
294
  </div>
294
295
  );
@@ -1682,7 +1682,15 @@ function GenericDetail({
1682
1682
  const options = {};
1683
1683
  for (const column of ajaxColumns) {
1684
1684
  try {
1685
- const res = await CustomFetch(column.url, 'POST');
1685
+ let params = {};
1686
+
1687
+ if (column.fields) {
1688
+ params.fields = column.fields;
1689
+ }
1690
+
1691
+ const res = await CustomFetch(column.url, 'POST', {
1692
+ ...params,
1693
+ });
1686
1694
  options[column.id] = res.data.data || res.data || []; // Assume API returns options in the expected format
1687
1695
  } catch (error) {
1688
1696
  console.error(
@@ -157,20 +157,21 @@
157
157
  border-top: 1px solid transparent !important;
158
158
  border-left: 1px solid transparent !important;
159
159
  border-right: 1px solid transparent !important;
160
- border-bottom: 4px solid rgba(var(--primary-color-rgb), 0.9) !important;
160
+ border-bottom: 4px solid rgba(var(--secondary-rgb), 0.9) !important;
161
161
 
162
162
  h2 {
163
163
  color: var(--highlight-color) !important;
164
164
  }
165
165
 
166
166
  .widgetTitle {
167
- border-bottom: 1px dashed rgba(#dadce0, 0.15);
167
+ padding-bottom: 10px;
168
+ border-bottom: 1px solid rgba(var(--secondary-rgb), 0.5);
168
169
  }
169
170
  }
170
171
 
171
172
  .dashwidget--highlight {
172
- background: var(--primary-color) !important;
173
- border-bottom: 4px solid rgba(var(--primary-color-rgb), 0.85) !important;
173
+ background: var(--secondary-color) !important;
174
+ border-bottom: 4px solid rgba(var(--secondary-rgb), 0.85) !important;
174
175
  }
175
176
 
176
177
  .widgetNo {