@gobolt/genesis 0.4.37 → 0.4.38
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Change } from '../Table';
|
|
2
2
|
import { InfiniteScrollChangeEvent } from '../InfiniteScrollTable/types';
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
export type Groups = {
|
|
4
5
|
[key: string]: string[];
|
|
5
6
|
};
|
|
@@ -10,6 +11,7 @@ export interface SecondaryTableControlsRowProps {
|
|
|
10
11
|
infiniteScrollData?: InfiniteScrollChangeEvent;
|
|
11
12
|
intialRowTotal?: number;
|
|
12
13
|
hasExternalFilters?: boolean;
|
|
14
|
+
getCustomIcon?: (title: string) => React.ReactNode | null;
|
|
13
15
|
}
|
|
14
|
-
declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, getCustomIcon, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export default SecondaryTableControlsRow;
|
package/dist/index.cjs
CHANGED
|
@@ -85734,7 +85734,12 @@ const PrimaryTableControlsRow = ({
|
|
|
85734
85734
|
}
|
|
85735
85735
|
);
|
|
85736
85736
|
};
|
|
85737
|
-
const GroupItem = ({
|
|
85737
|
+
const GroupItem = ({
|
|
85738
|
+
title,
|
|
85739
|
+
items,
|
|
85740
|
+
onGroupItemClick,
|
|
85741
|
+
getCustomIcon
|
|
85742
|
+
}) => {
|
|
85738
85743
|
if (items.length === 0) return null;
|
|
85739
85744
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
85740
85745
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -85747,7 +85752,7 @@ const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
|
85747
85752
|
width: 24,
|
|
85748
85753
|
height: 24
|
|
85749
85754
|
},
|
|
85750
|
-
children: getIcon$1(title)
|
|
85755
|
+
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85751
85756
|
}
|
|
85752
85757
|
) }),
|
|
85753
85758
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -85764,7 +85769,11 @@ const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
|
85764
85769
|
)) })
|
|
85765
85770
|
] });
|
|
85766
85771
|
};
|
|
85767
|
-
const GroupsRow = ({
|
|
85772
|
+
const GroupsRow = ({
|
|
85773
|
+
groups,
|
|
85774
|
+
onGroupItemClick,
|
|
85775
|
+
getCustomIcon
|
|
85776
|
+
}) => {
|
|
85768
85777
|
if (!groups) return null;
|
|
85769
85778
|
const groupArray = Object.entries(groups).map(([title, items]) => ({
|
|
85770
85779
|
title,
|
|
@@ -85775,7 +85784,8 @@ const GroupsRow = ({ groups, onGroupItemClick }) => {
|
|
|
85775
85784
|
{
|
|
85776
85785
|
title: group.title,
|
|
85777
85786
|
items: group.items,
|
|
85778
|
-
onGroupItemClick
|
|
85787
|
+
onGroupItemClick,
|
|
85788
|
+
getCustomIcon
|
|
85779
85789
|
},
|
|
85780
85790
|
group.title
|
|
85781
85791
|
)) : null });
|
|
@@ -85786,7 +85796,8 @@ const SecondaryTableControlsRow = ({
|
|
|
85786
85796
|
onChange,
|
|
85787
85797
|
infiniteScrollData,
|
|
85788
85798
|
intialRowTotal = 40,
|
|
85789
|
-
hasExternalFilters = false
|
|
85799
|
+
hasExternalFilters = false,
|
|
85800
|
+
getCustomIcon
|
|
85790
85801
|
}) => {
|
|
85791
85802
|
const [hasChanged, setHasChanged] = React__namespace.useState(false);
|
|
85792
85803
|
const onGroupItemClick = (title, item) => {
|
|
@@ -85829,7 +85840,14 @@ const SecondaryTableControlsRow = ({
|
|
|
85829
85840
|
marginTop: 8
|
|
85830
85841
|
},
|
|
85831
85842
|
children: [
|
|
85832
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
85843
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
85844
|
+
GroupsRow,
|
|
85845
|
+
{
|
|
85846
|
+
groups,
|
|
85847
|
+
onGroupItemClick,
|
|
85848
|
+
getCustomIcon
|
|
85849
|
+
}
|
|
85850
|
+
) }),
|
|
85833
85851
|
(totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
|
|
85834
85852
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85835
85853
|
"div",
|
package/dist/index.js
CHANGED
|
@@ -85716,7 +85716,12 @@ const PrimaryTableControlsRow = ({
|
|
|
85716
85716
|
}
|
|
85717
85717
|
);
|
|
85718
85718
|
};
|
|
85719
|
-
const GroupItem = ({
|
|
85719
|
+
const GroupItem = ({
|
|
85720
|
+
title,
|
|
85721
|
+
items,
|
|
85722
|
+
onGroupItemClick,
|
|
85723
|
+
getCustomIcon
|
|
85724
|
+
}) => {
|
|
85720
85725
|
if (items.length === 0) return null;
|
|
85721
85726
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85722
85727
|
/* @__PURE__ */ jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsx(
|
|
@@ -85729,7 +85734,7 @@ const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
|
85729
85734
|
width: 24,
|
|
85730
85735
|
height: 24
|
|
85731
85736
|
},
|
|
85732
|
-
children: getIcon$1(title)
|
|
85737
|
+
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85733
85738
|
}
|
|
85734
85739
|
) }),
|
|
85735
85740
|
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
@@ -85746,7 +85751,11 @@ const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
|
85746
85751
|
)) })
|
|
85747
85752
|
] });
|
|
85748
85753
|
};
|
|
85749
|
-
const GroupsRow = ({
|
|
85754
|
+
const GroupsRow = ({
|
|
85755
|
+
groups,
|
|
85756
|
+
onGroupItemClick,
|
|
85757
|
+
getCustomIcon
|
|
85758
|
+
}) => {
|
|
85750
85759
|
if (!groups) return null;
|
|
85751
85760
|
const groupArray = Object.entries(groups).map(([title, items]) => ({
|
|
85752
85761
|
title,
|
|
@@ -85757,7 +85766,8 @@ const GroupsRow = ({ groups, onGroupItemClick }) => {
|
|
|
85757
85766
|
{
|
|
85758
85767
|
title: group.title,
|
|
85759
85768
|
items: group.items,
|
|
85760
|
-
onGroupItemClick
|
|
85769
|
+
onGroupItemClick,
|
|
85770
|
+
getCustomIcon
|
|
85761
85771
|
},
|
|
85762
85772
|
group.title
|
|
85763
85773
|
)) : null });
|
|
@@ -85768,7 +85778,8 @@ const SecondaryTableControlsRow = ({
|
|
|
85768
85778
|
onChange,
|
|
85769
85779
|
infiniteScrollData,
|
|
85770
85780
|
intialRowTotal = 40,
|
|
85771
|
-
hasExternalFilters = false
|
|
85781
|
+
hasExternalFilters = false,
|
|
85782
|
+
getCustomIcon
|
|
85772
85783
|
}) => {
|
|
85773
85784
|
const [hasChanged, setHasChanged] = React.useState(false);
|
|
85774
85785
|
const onGroupItemClick = (title, item) => {
|
|
@@ -85811,7 +85822,14 @@ const SecondaryTableControlsRow = ({
|
|
|
85811
85822
|
marginTop: 8
|
|
85812
85823
|
},
|
|
85813
85824
|
children: [
|
|
85814
|
-
/* @__PURE__ */ jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsx(
|
|
85825
|
+
/* @__PURE__ */ jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsx(
|
|
85826
|
+
GroupsRow,
|
|
85827
|
+
{
|
|
85828
|
+
groups,
|
|
85829
|
+
onGroupItemClick,
|
|
85830
|
+
getCustomIcon
|
|
85831
|
+
}
|
|
85832
|
+
) }),
|
|
85815
85833
|
(totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
|
|
85816
85834
|
/* @__PURE__ */ jsxs(
|
|
85817
85835
|
"div",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
export declare const getIcon: (name: string) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
3
|
export declare const getIconColor: (state: any, theme: any) => any;
|
|
3
|
-
export declare const getBadgeStateIcon: (state: any, color: any, isFilled?: boolean, hasIcon?: boolean, customIcon?: React.ReactNode | null | undefined) => string | number | true | Iterable<
|
|
4
|
+
export declare const getBadgeStateIcon: (state: any, color: any, isFilled?: boolean, hasIcon?: boolean, customIcon?: React.ReactNode | null | undefined) => string | number | true | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|