datastake-daf 0.6.325 → 0.6.327
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
|
@@ -12750,11 +12750,6 @@ const useHeader = _ref => {
|
|
|
12750
12750
|
});
|
|
12751
12751
|
mainContObserver.observe(mainCont.current);
|
|
12752
12752
|
let buttonContObserver;
|
|
12753
|
-
console.log({
|
|
12754
|
-
hasButtons,
|
|
12755
|
-
buttonCont: buttonCont.current,
|
|
12756
|
-
buttonContWidth
|
|
12757
|
-
});
|
|
12758
12753
|
if (hasButtons) {
|
|
12759
12754
|
buttonContObserver = new ResizeObserver(entries => {
|
|
12760
12755
|
const _buttonEntry = entries[0];
|
|
@@ -12775,12 +12770,7 @@ const useHeader = _ref => {
|
|
|
12775
12770
|
}
|
|
12776
12771
|
};
|
|
12777
12772
|
}, [hasButtons, buttonCont.current]);
|
|
12778
|
-
const maxWidth = React.useMemo(() => mainContWidth - buttonContWidth, [mainContWidth, buttonContWidth]);
|
|
12779
|
-
console.log({
|
|
12780
|
-
buttonContWidth,
|
|
12781
|
-
mainContWidth,
|
|
12782
|
-
maxWidth
|
|
12783
|
-
});
|
|
12773
|
+
const maxWidth = React.useMemo(() => mainContWidth - Math.max(0, buttonContWidth) - 24, [mainContWidth, buttonContWidth]);
|
|
12784
12774
|
const renderMainCont = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12785
12775
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12786
12776
|
className: formatClassname(["main-cont flex", className]),
|
|
@@ -14105,9 +14095,8 @@ const determineHasChildren = ({
|
|
|
14105
14095
|
|
|
14106
14096
|
const sortByPosition = (items, getConfig) => {
|
|
14107
14097
|
return items.sort((a, b) => {
|
|
14108
|
-
|
|
14109
|
-
const
|
|
14110
|
-
const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
|
|
14098
|
+
const positionA = getConfig(a)?.position || 0;
|
|
14099
|
+
const positionB = getConfig(b)?.position || 0;
|
|
14111
14100
|
return positionA - positionB;
|
|
14112
14101
|
});
|
|
14113
14102
|
};
|
|
@@ -14124,7 +14113,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
14124
14113
|
const parts = labelKey.split(' is ');
|
|
14125
14114
|
if (parts.length === 2) {
|
|
14126
14115
|
const [conditionKey, conditionValue] = parts;
|
|
14127
|
-
if (
|
|
14116
|
+
if (item?.[conditionKey] === conditionValue) {
|
|
14128
14117
|
return labelConfig[labelKey];
|
|
14129
14118
|
}
|
|
14130
14119
|
}
|
package/package.json
CHANGED
|
@@ -125,12 +125,6 @@ export const useHeader = ({
|
|
|
125
125
|
|
|
126
126
|
let buttonContObserver;
|
|
127
127
|
|
|
128
|
-
console.log({
|
|
129
|
-
hasButtons,
|
|
130
|
-
buttonCont: buttonCont.current,
|
|
131
|
-
buttonContWidth,
|
|
132
|
-
});
|
|
133
|
-
|
|
134
128
|
if (hasButtons) {
|
|
135
129
|
buttonContObserver = new ResizeObserver((entries) => {
|
|
136
130
|
const _buttonEntry = entries[0];
|
|
@@ -156,12 +150,10 @@ export const useHeader = ({
|
|
|
156
150
|
}, [hasButtons, buttonCont.current]);
|
|
157
151
|
|
|
158
152
|
const maxWidth = useMemo(
|
|
159
|
-
() => mainContWidth - buttonContWidth,
|
|
153
|
+
() => mainContWidth - Math.max(0, buttonContWidth) - 24,
|
|
160
154
|
[mainContWidth, buttonContWidth],
|
|
161
155
|
);
|
|
162
156
|
|
|
163
|
-
console.log({ buttonContWidth, mainContWidth, maxWidth });
|
|
164
|
-
|
|
165
157
|
const renderMainCont = () => (
|
|
166
158
|
<div>
|
|
167
159
|
<div className={formatClassname(["main-cont flex", className])} ref={mainCont}>
|