@gobolt/genesis 0.4.44 → 0.4.45
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,8 +1,12 @@
|
|
|
1
1
|
import { Change } from '../Table';
|
|
2
2
|
import { InfiniteScrollChangeEvent } from '../InfiniteScrollTable/types';
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
type Item = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: unknown;
|
|
7
|
+
};
|
|
4
8
|
export type Groups = {
|
|
5
|
-
[key: string]: string[];
|
|
9
|
+
[key: string]: string[] | Item[];
|
|
6
10
|
};
|
|
7
11
|
export interface SecondaryTableControlsRowProps {
|
|
8
12
|
groups: Groups | null;
|
package/dist/index.cjs
CHANGED
|
@@ -85807,18 +85807,21 @@ const GroupItem = ({
|
|
|
85807
85807
|
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85808
85808
|
}
|
|
85809
85809
|
) }),
|
|
85810
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) =>
|
|
85811
|
-
|
|
85812
|
-
|
|
85813
|
-
|
|
85814
|
-
|
|
85815
|
-
|
|
85816
|
-
|
|
85817
|
-
|
|
85818
|
-
|
|
85819
|
-
|
|
85820
|
-
|
|
85821
|
-
|
|
85810
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) => {
|
|
85811
|
+
const isObjectItem = typeof item === "object" && item !== null && "label" in item && "value" in item;
|
|
85812
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85813
|
+
Badge$1,
|
|
85814
|
+
{
|
|
85815
|
+
label: isObjectItem ? item.label : item?.toString() || "Undefined",
|
|
85816
|
+
hasClose: true,
|
|
85817
|
+
hasIcon: false,
|
|
85818
|
+
state: "generic",
|
|
85819
|
+
size: "small",
|
|
85820
|
+
onClick: () => onGroupItemClick(title, item)
|
|
85821
|
+
},
|
|
85822
|
+
!item ? "Undefined" : item?.toString()
|
|
85823
|
+
);
|
|
85824
|
+
}) })
|
|
85822
85825
|
] });
|
|
85823
85826
|
};
|
|
85824
85827
|
const GroupsRow = ({
|
|
@@ -85835,7 +85838,7 @@ const GroupsRow = ({
|
|
|
85835
85838
|
GroupItem,
|
|
85836
85839
|
{
|
|
85837
85840
|
title: group.title,
|
|
85838
|
-
items: group
|
|
85841
|
+
items: group?.items,
|
|
85839
85842
|
onGroupItemClick,
|
|
85840
85843
|
getCustomIcon
|
|
85841
85844
|
},
|
package/dist/index.js
CHANGED
|
@@ -85789,18 +85789,21 @@ const GroupItem = ({
|
|
|
85789
85789
|
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85790
85790
|
}
|
|
85791
85791
|
) }),
|
|
85792
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) =>
|
|
85793
|
-
|
|
85794
|
-
|
|
85795
|
-
|
|
85796
|
-
|
|
85797
|
-
|
|
85798
|
-
|
|
85799
|
-
|
|
85800
|
-
|
|
85801
|
-
|
|
85802
|
-
|
|
85803
|
-
|
|
85792
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items?.map((item) => {
|
|
85793
|
+
const isObjectItem = typeof item === "object" && item !== null && "label" in item && "value" in item;
|
|
85794
|
+
return /* @__PURE__ */ jsx(
|
|
85795
|
+
Badge$1,
|
|
85796
|
+
{
|
|
85797
|
+
label: isObjectItem ? item.label : item?.toString() || "Undefined",
|
|
85798
|
+
hasClose: true,
|
|
85799
|
+
hasIcon: false,
|
|
85800
|
+
state: "generic",
|
|
85801
|
+
size: "small",
|
|
85802
|
+
onClick: () => onGroupItemClick(title, item)
|
|
85803
|
+
},
|
|
85804
|
+
!item ? "Undefined" : item?.toString()
|
|
85805
|
+
);
|
|
85806
|
+
}) })
|
|
85804
85807
|
] });
|
|
85805
85808
|
};
|
|
85806
85809
|
const GroupsRow = ({
|
|
@@ -85817,7 +85820,7 @@ const GroupsRow = ({
|
|
|
85817
85820
|
GroupItem,
|
|
85818
85821
|
{
|
|
85819
85822
|
title: group.title,
|
|
85820
|
-
items: group
|
|
85823
|
+
items: group?.items,
|
|
85821
85824
|
onGroupItemClick,
|
|
85822
85825
|
getCustomIcon
|
|
85823
85826
|
},
|