venice-ui 3.0.32 → 3.0.33
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.
|
@@ -81,6 +81,11 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
|
|
|
81
81
|
updateParentSelection(newListOption, item.id);
|
|
82
82
|
handleChange(newListOption);
|
|
83
83
|
};
|
|
84
|
+
const select = (id) => {
|
|
85
|
+
if (handleSelect && isSelectable) {
|
|
86
|
+
handleSelect(id);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
84
89
|
const renderRow = (row, level) => {
|
|
85
90
|
const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
|
|
86
91
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
|
|
@@ -111,8 +116,10 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
|
|
|
111
116
|
: checkboxConfig.color.status.success })))),
|
|
112
117
|
isCheckbox && (react_1.default.createElement("div", { onClick: (e) => e.stopPropagation() },
|
|
113
118
|
react_1.default.createElement(Checkbox_1.Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
|
|
114
|
-
react_1.default.createElement(List_styles_1.ListValue, { theme: resolvedTheme, config: checkboxConfig
|
|
115
|
-
|
|
119
|
+
react_1.default.createElement(List_styles_1.ListValue, { theme: resolvedTheme, config: checkboxConfig, onClick: () => {
|
|
120
|
+
select(row.id);
|
|
121
|
+
} }, row.value)),
|
|
122
|
+
react_1.default.createElement(List_styles_1.ListRowOptionsWrapper, { onClick: (e) => e.stopPropagation() }, haveMoreOptions && levelActions[level]?.moreActions && (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: levelActions[level]?.moreActions || [], targetID: row.id, position: 'right', iconBgHoverColor: "transparent" })))))),
|
|
116
123
|
row.children.length > 0 && (react_1.default.createElement(List_styles_1.ListRowExtend, { isExtended: row.extend || false },
|
|
117
124
|
react_1.default.createElement("div", null, row.children.map((_chiledRow) => {
|
|
118
125
|
return renderRow(_chiledRow, level + 1);
|
|
@@ -75,6 +75,11 @@ export const List = ({ theme, themeVariant = 'default', items, handleChange, han
|
|
|
75
75
|
updateParentSelection(newListOption, item.id);
|
|
76
76
|
handleChange(newListOption);
|
|
77
77
|
};
|
|
78
|
+
const select = (id) => {
|
|
79
|
+
if (handleSelect && isSelectable) {
|
|
80
|
+
handleSelect(id);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
78
83
|
const renderRow = (row, level) => {
|
|
79
84
|
const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
|
|
80
85
|
return (React.createElement(ThemeProvider, { theme: resolvedTheme },
|
|
@@ -105,8 +110,10 @@ export const List = ({ theme, themeVariant = 'default', items, handleChange, han
|
|
|
105
110
|
: checkboxConfig.color.status.success })))),
|
|
106
111
|
isCheckbox && (React.createElement("div", { onClick: (e) => e.stopPropagation() },
|
|
107
112
|
React.createElement(Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
|
|
108
|
-
React.createElement(ListValue, { theme: resolvedTheme, config: checkboxConfig
|
|
109
|
-
|
|
113
|
+
React.createElement(ListValue, { theme: resolvedTheme, config: checkboxConfig, onClick: () => {
|
|
114
|
+
select(row.id);
|
|
115
|
+
} }, row.value)),
|
|
116
|
+
React.createElement(ListRowOptionsWrapper, { onClick: (e) => e.stopPropagation() }, haveMoreOptions && levelActions[level]?.moreActions && (React.createElement(DropdownMenu, { options: levelActions[level]?.moreActions || [], targetID: row.id, position: 'right', iconBgHoverColor: "transparent" })))))),
|
|
110
117
|
row.children.length > 0 && (React.createElement(ListRowExtend, { isExtended: row.extend || false },
|
|
111
118
|
React.createElement("div", null, row.children.map((_chiledRow) => {
|
|
112
119
|
return renderRow(_chiledRow, level + 1);
|