datastake-daf 0.6.319 → 0.6.320
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
|
@@ -12666,7 +12666,7 @@ const {
|
|
|
12666
12666
|
Paragraph: Paragraph$1
|
|
12667
12667
|
} = antd.Typography;
|
|
12668
12668
|
const checkHasActiveFilterValues = filtersConfig => {
|
|
12669
|
-
if (!filtersConfig
|
|
12669
|
+
if (!(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.filtersConfig) || !(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.selectedFilters)) return false;
|
|
12670
12670
|
const filterConfigKeys = Object.keys(filtersConfig.filtersConfig);
|
|
12671
12671
|
const selectedFilters = filtersConfig.selectedFilters;
|
|
12672
12672
|
return filterConfigKeys.some(key => {
|
|
@@ -12674,27 +12674,28 @@ const checkHasActiveFilterValues = filtersConfig => {
|
|
|
12674
12674
|
return value !== undefined && value !== null && value !== "";
|
|
12675
12675
|
});
|
|
12676
12676
|
};
|
|
12677
|
-
const useHeader =
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12677
|
+
const useHeader = _ref => {
|
|
12678
|
+
let {
|
|
12679
|
+
title = "",
|
|
12680
|
+
tooltip = "",
|
|
12681
|
+
supportText = "",
|
|
12682
|
+
tags = [],
|
|
12683
|
+
actionButtons: _actionButtons = [],
|
|
12684
|
+
titleTooltip,
|
|
12685
|
+
className,
|
|
12686
|
+
addedHeader = null,
|
|
12687
|
+
addedHeaderFirst,
|
|
12688
|
+
extraButtons: _extraButtons = [],
|
|
12689
|
+
onDownload,
|
|
12690
|
+
downloadDisabled,
|
|
12691
|
+
goBackTo,
|
|
12692
|
+
loading,
|
|
12693
|
+
renderExtraComponents,
|
|
12694
|
+
app = "",
|
|
12695
|
+
isViewMode = false,
|
|
12696
|
+
filtersConfig = {}
|
|
12697
|
+
} = _ref;
|
|
12698
|
+
const hasActiveFilterValues = React.useMemo(() => checkHasActiveFilterValues(filtersConfig), [filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.filtersConfig, filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.selectedFilters]);
|
|
12698
12699
|
const [showFilters, setShowFilters] = React.useState(() => checkHasActiveFilterValues(filtersConfig));
|
|
12699
12700
|
const hasFilters = filtersConfig && Object.keys(filtersConfig).length > 0;
|
|
12700
12701
|
React.useEffect(() => {
|
|
@@ -12737,9 +12738,9 @@ const useHeader = ({
|
|
|
12737
12738
|
const buttonCont = React.useRef();
|
|
12738
12739
|
const [mainContWidth, setMainContWidth] = React.useState(600);
|
|
12739
12740
|
const [buttonContWidth, setButtonContWidth] = React.useState(0);
|
|
12740
|
-
const hasSupportText = !!supportText
|
|
12741
|
-
const hasTags = !!tags
|
|
12742
|
-
const hasButtons = !!(actionButtons
|
|
12741
|
+
const hasSupportText = !!(supportText !== null && supportText !== void 0 && supportText.length);
|
|
12742
|
+
const hasTags = !!(tags !== null && tags !== void 0 && tags.length);
|
|
12743
|
+
const hasButtons = !!(actionButtons !== null && actionButtons !== void 0 && actionButtons.length || extraButtons !== null && extraButtons !== void 0 && extraButtons.length);
|
|
12743
12744
|
React.useEffect(() => {
|
|
12744
12745
|
const mainContObserver = new ResizeObserver(entries => {
|
|
12745
12746
|
const _mainEntry = entries[0];
|
|
@@ -12850,8 +12851,8 @@ const useHeader = ({
|
|
|
12850
12851
|
})]
|
|
12851
12852
|
}), addedHeaderFirst ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12852
12853
|
className: "flex gap-2",
|
|
12853
|
-
ref: buttonCont,
|
|
12854
12854
|
children: [addedHeader, hasButtons && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12855
|
+
ref: buttonCont,
|
|
12855
12856
|
children: /*#__PURE__*/jsxRuntime.jsx(Buttons, {
|
|
12856
12857
|
extraButtons: extraButtons,
|
|
12857
12858
|
actionButtons: actionButtons
|
|
@@ -12859,8 +12860,8 @@ const useHeader = ({
|
|
|
12859
12860
|
})]
|
|
12860
12861
|
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12861
12862
|
className: "flex gap-2",
|
|
12862
|
-
ref: buttonCont,
|
|
12863
12863
|
children: [hasButtons && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12864
|
+
ref: buttonCont,
|
|
12864
12865
|
children: /*#__PURE__*/jsxRuntime.jsx(Buttons, {
|
|
12865
12866
|
extraButtons: extraButtons,
|
|
12866
12867
|
actionButtons: actionButtons
|
package/package.json
CHANGED
|
@@ -243,10 +243,10 @@ export const useHeader = ({
|
|
|
243
243
|
</div>
|
|
244
244
|
|
|
245
245
|
{addedHeaderFirst ? (
|
|
246
|
-
<div className="flex gap-2"
|
|
246
|
+
<div className="flex gap-2">
|
|
247
247
|
{addedHeader}
|
|
248
248
|
{hasButtons && (
|
|
249
|
-
<div>
|
|
249
|
+
<div ref={buttonCont}>
|
|
250
250
|
<Buttons
|
|
251
251
|
extraButtons={extraButtons}
|
|
252
252
|
actionButtons={actionButtons}
|
|
@@ -255,9 +255,9 @@ export const useHeader = ({
|
|
|
255
255
|
)}
|
|
256
256
|
</div>
|
|
257
257
|
) : (
|
|
258
|
-
<div className="flex gap-2"
|
|
258
|
+
<div className="flex gap-2">
|
|
259
259
|
{hasButtons && (
|
|
260
|
-
<div>
|
|
260
|
+
<div ref={buttonCont}>
|
|
261
261
|
<Buttons
|
|
262
262
|
extraButtons={extraButtons}
|
|
263
263
|
actionButtons={actionButtons}
|