datastake-daf 0.6.246 → 0.6.247
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/dist/components/index.js
CHANGED
|
@@ -14082,8 +14082,9 @@ const determineHasChildren = ({
|
|
|
14082
14082
|
|
|
14083
14083
|
const sortByPosition = (items, getConfig) => {
|
|
14084
14084
|
return items.sort((a, b) => {
|
|
14085
|
-
|
|
14086
|
-
const
|
|
14085
|
+
var _getConfig, _getConfig2;
|
|
14086
|
+
const positionA = ((_getConfig = getConfig(a)) === null || _getConfig === void 0 ? void 0 : _getConfig.position) || 0;
|
|
14087
|
+
const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
|
|
14087
14088
|
return positionA - positionB;
|
|
14088
14089
|
});
|
|
14089
14090
|
};
|
|
@@ -14100,7 +14101,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
14100
14101
|
const parts = labelKey.split(' is ');
|
|
14101
14102
|
if (parts.length === 2) {
|
|
14102
14103
|
const [conditionKey, conditionValue] = parts;
|
|
14103
|
-
if (item
|
|
14104
|
+
if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
|
|
14104
14105
|
return labelConfig[labelKey];
|
|
14105
14106
|
}
|
|
14106
14107
|
}
|
|
@@ -20543,13 +20544,16 @@ function DashboardLayout(_ref) {
|
|
|
20543
20544
|
let {
|
|
20544
20545
|
children,
|
|
20545
20546
|
header,
|
|
20546
|
-
footer
|
|
20547
|
+
footer,
|
|
20548
|
+
isCollapsed
|
|
20547
20549
|
} = _ref;
|
|
20548
20550
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
20549
20551
|
className: "daf-analysis",
|
|
20550
|
-
style: {
|
|
20552
|
+
style: _objectSpread2({
|
|
20551
20553
|
backgroundColor: "#F9FAFB"
|
|
20552
|
-
},
|
|
20554
|
+
}, isCollapsed === undefined ? {} : {
|
|
20555
|
+
maxWidth: isCollapsed ? "calc(100vw - 70px)" : "calc(100vw - 250px)"
|
|
20556
|
+
}),
|
|
20553
20557
|
children: [header, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
20554
20558
|
className: "content",
|
|
20555
20559
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
package/package.json
CHANGED
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Every Widget inside the component (children) must be wrapped by a section tag, because i say so and if you dont like it you can change the code in the entire codebase, included but not limited to the following projects: nashiriki, tazama, kustawi, sbg, cukura, kota, mmt, and wherever the daf library is used.
|
|
7
7
|
*/
|
|
8
|
-
export default function DashboardLayout({ children, header, footer }) {
|
|
8
|
+
export default function DashboardLayout({ children, header, footer, isCollapsed }) {
|
|
9
9
|
return (
|
|
10
10
|
<div
|
|
11
11
|
className="daf-analysis"
|
|
12
12
|
style={{
|
|
13
13
|
backgroundColor: `#F9FAFB`,
|
|
14
|
+
...(isCollapsed === undefined
|
|
15
|
+
? {}
|
|
16
|
+
: {
|
|
17
|
+
maxWidth: isCollapsed ? `calc(100vw - 70px)` : `calc(100vw - 250px)`,
|
|
18
|
+
}),
|
|
14
19
|
}}
|
|
15
20
|
>
|
|
16
21
|
{header}
|