@gobolt/genesis 0.4.38 → 0.4.39
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.
|
@@ -12,6 +12,7 @@ export interface SecondaryTableControlsRowProps {
|
|
|
12
12
|
intialRowTotal?: number;
|
|
13
13
|
hasExternalFilters?: boolean;
|
|
14
14
|
getCustomIcon?: (title: string) => React.ReactNode | null;
|
|
15
|
+
filteredResultsCount?: number;
|
|
15
16
|
}
|
|
16
|
-
declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, getCustomIcon, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, getCustomIcon, filteredResultsCount, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default SecondaryTableControlsRow;
|
package/dist/index.cjs
CHANGED
|
@@ -85797,7 +85797,8 @@ const SecondaryTableControlsRow = ({
|
|
|
85797
85797
|
infiniteScrollData,
|
|
85798
85798
|
intialRowTotal = 40,
|
|
85799
85799
|
hasExternalFilters = false,
|
|
85800
|
-
getCustomIcon
|
|
85800
|
+
getCustomIcon,
|
|
85801
|
+
filteredResultsCount
|
|
85801
85802
|
}) => {
|
|
85802
85803
|
const [hasChanged, setHasChanged] = React__namespace.useState(false);
|
|
85803
85804
|
const onGroupItemClick = (title, item) => {
|
|
@@ -85829,7 +85830,7 @@ const SecondaryTableControlsRow = ({
|
|
|
85829
85830
|
};
|
|
85830
85831
|
}, [infiniteScrollData, groups, hasExternalFilters]);
|
|
85831
85832
|
const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
|
|
85832
|
-
|
|
85833
|
+
infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
|
|
85833
85834
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
85834
85835
|
"div",
|
|
85835
85836
|
{
|
|
@@ -85848,7 +85849,6 @@ const SecondaryTableControlsRow = ({
|
|
|
85848
85849
|
getCustomIcon
|
|
85849
85850
|
}
|
|
85850
85851
|
) }),
|
|
85851
|
-
(totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
|
|
85852
85852
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85853
85853
|
"div",
|
|
85854
85854
|
{
|
|
@@ -85860,7 +85860,7 @@ const SecondaryTableControlsRow = ({
|
|
|
85860
85860
|
marginRight: 16
|
|
85861
85861
|
},
|
|
85862
85862
|
children: [
|
|
85863
|
-
|
|
85863
|
+
filteredResultsCount && hasChanged ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${filteredResultsCount} results` }) : null,
|
|
85864
85864
|
!isGroupsEmpty || hasExternalFilters ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
85865
85865
|
"button",
|
|
85866
85866
|
{
|
|
@@ -85923,7 +85923,9 @@ const TableControls = ({
|
|
|
85923
85923
|
onChange: onSecondaryChange,
|
|
85924
85924
|
infiniteScrollData: secondaryTableRowData.infiniteScrollData,
|
|
85925
85925
|
hasExternalFilters: secondaryTableRowData.hasExternalFilters,
|
|
85926
|
-
intialRowTotal: secondaryTableRowData.intialRowTotal
|
|
85926
|
+
intialRowTotal: secondaryTableRowData.intialRowTotal,
|
|
85927
|
+
filteredResultsCount: secondaryTableRowData.filteredResultsCount,
|
|
85928
|
+
getCustomIcon: secondaryTableRowData.getCustomIcon
|
|
85927
85929
|
}
|
|
85928
85930
|
) : null
|
|
85929
85931
|
]
|
package/dist/index.js
CHANGED
|
@@ -85779,7 +85779,8 @@ const SecondaryTableControlsRow = ({
|
|
|
85779
85779
|
infiniteScrollData,
|
|
85780
85780
|
intialRowTotal = 40,
|
|
85781
85781
|
hasExternalFilters = false,
|
|
85782
|
-
getCustomIcon
|
|
85782
|
+
getCustomIcon,
|
|
85783
|
+
filteredResultsCount
|
|
85783
85784
|
}) => {
|
|
85784
85785
|
const [hasChanged, setHasChanged] = React.useState(false);
|
|
85785
85786
|
const onGroupItemClick = (title, item) => {
|
|
@@ -85811,7 +85812,7 @@ const SecondaryTableControlsRow = ({
|
|
|
85811
85812
|
};
|
|
85812
85813
|
}, [infiniteScrollData, groups, hasExternalFilters]);
|
|
85813
85814
|
const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
|
|
85814
|
-
|
|
85815
|
+
infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
|
|
85815
85816
|
return /* @__PURE__ */ jsxs(
|
|
85816
85817
|
"div",
|
|
85817
85818
|
{
|
|
@@ -85830,7 +85831,6 @@ const SecondaryTableControlsRow = ({
|
|
|
85830
85831
|
getCustomIcon
|
|
85831
85832
|
}
|
|
85832
85833
|
) }),
|
|
85833
|
-
(totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
|
|
85834
85834
|
/* @__PURE__ */ jsxs(
|
|
85835
85835
|
"div",
|
|
85836
85836
|
{
|
|
@@ -85842,7 +85842,7 @@ const SecondaryTableControlsRow = ({
|
|
|
85842
85842
|
marginRight: 16
|
|
85843
85843
|
},
|
|
85844
85844
|
children: [
|
|
85845
|
-
|
|
85845
|
+
filteredResultsCount && hasChanged ? /* @__PURE__ */ jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${filteredResultsCount} results` }) : null,
|
|
85846
85846
|
!isGroupsEmpty || hasExternalFilters ? /* @__PURE__ */ jsx(
|
|
85847
85847
|
"button",
|
|
85848
85848
|
{
|
|
@@ -85905,7 +85905,9 @@ const TableControls = ({
|
|
|
85905
85905
|
onChange: onSecondaryChange,
|
|
85906
85906
|
infiniteScrollData: secondaryTableRowData.infiniteScrollData,
|
|
85907
85907
|
hasExternalFilters: secondaryTableRowData.hasExternalFilters,
|
|
85908
|
-
intialRowTotal: secondaryTableRowData.intialRowTotal
|
|
85908
|
+
intialRowTotal: secondaryTableRowData.intialRowTotal,
|
|
85909
|
+
filteredResultsCount: secondaryTableRowData.filteredResultsCount,
|
|
85910
|
+
getCustomIcon: secondaryTableRowData.getCustomIcon
|
|
85909
85911
|
}
|
|
85910
85912
|
) : null
|
|
85911
85913
|
]
|