venice-ui 3.0.31 → 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.
|
@@ -155,6 +155,6 @@ const DropdownMenu = ({ size = 'md', iconName = 'more_vert', theme, themeVariant
|
|
|
155
155
|
react_1.default.createElement(Dropdown_styles_1.TrigerWrapper, { ref: triggerRef, config: dropdownMenuConfig }, textMode ? (react_1.default.createElement(DropdownMenu_styles_1.DropdownMenuText, { isActive: open, onClick: () => toogle(!open), theme: resolvedTheme, config: dropdownMenuConfig }, label)) : (react_1.default.createElement(Icon_1.Icon, { name: iconName, size: size, isActive: open, color: iconColor, hoverColor: iconHoverColor, background: iconBgColor, hoverBackground: iconBgHoverColor, onClick: () => toogle(!open) })))),
|
|
156
156
|
open &&
|
|
157
157
|
(0, react_dom_1.createPortal)(react_1.default.createElement(Dropdown_styles_1.DropdownMenuPanel, { isOpen: open, style: dropdownStyles, ref: panelRef, theme: resolvedTheme, config: dropdownMenuConfig },
|
|
158
|
-
react_1.default.createElement(ActionPanel_1.ActionPanel, { options: options, size: size, theme: theme, themeVariant: themeVariant, maxRows: 5, zIndex: zIndex, handleClick: handleClick, header: header, footer: footer })), document.body)));
|
|
158
|
+
react_1.default.createElement(ActionPanel_1.ActionPanel, { options: options, size: size, theme: theme, themeVariant: themeVariant, maxRows: 5, zIndex: zIndex, handleClick: handleClick, header: header, footer: footer, targetID: targetID })), document.body)));
|
|
159
159
|
};
|
|
160
160
|
exports.DropdownMenu = DropdownMenu;
|
|
@@ -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);
|
|
@@ -119,5 +119,5 @@ export const DropdownMenu = ({ size = 'md', iconName = 'more_vert', theme, theme
|
|
|
119
119
|
React.createElement(TrigerWrapper, { ref: triggerRef, config: dropdownMenuConfig }, textMode ? (React.createElement(DropdownMenuText, { isActive: open, onClick: () => toogle(!open), theme: resolvedTheme, config: dropdownMenuConfig }, label)) : (React.createElement(Icon, { name: iconName, size: size, isActive: open, color: iconColor, hoverColor: iconHoverColor, background: iconBgColor, hoverBackground: iconBgHoverColor, onClick: () => toogle(!open) })))),
|
|
120
120
|
open &&
|
|
121
121
|
createPortal(React.createElement(DropdownMenuPanel, { isOpen: open, style: dropdownStyles, ref: panelRef, theme: resolvedTheme, config: dropdownMenuConfig },
|
|
122
|
-
React.createElement(ActionPanel, { options: options, size: size, theme: theme, themeVariant: themeVariant, maxRows: 5, zIndex: zIndex, handleClick: handleClick, header: header, footer: footer })), document.body)));
|
|
122
|
+
React.createElement(ActionPanel, { options: options, size: size, theme: theme, themeVariant: themeVariant, maxRows: 5, zIndex: zIndex, handleClick: handleClick, header: header, footer: footer, targetID: targetID })), document.body)));
|
|
123
123
|
};
|
|
@@ -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);
|