venice-ui 3.0.29 → 3.0.31
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.
|
@@ -46,7 +46,7 @@ const updateParentSelection = (items, itemID) => {
|
|
|
46
46
|
}
|
|
47
47
|
return found;
|
|
48
48
|
};
|
|
49
|
-
const List = ({ theme, themeVariant = 'default', items, handleChange, handleSelect, isCheckbox, selected, isCollapsable, isStatusable, isSelectable =
|
|
49
|
+
const List = ({ theme, themeVariant = 'default', items, handleChange, handleSelect, isCheckbox, selected, isCollapsable, isStatusable, isSelectable = true, haveMoreOptions, levelActions = [], }) => {
|
|
50
50
|
const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
|
|
51
51
|
theme,
|
|
52
52
|
themeVariant,
|
|
@@ -112,7 +112,7 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
|
|
|
112
112
|
isCheckbox && (react_1.default.createElement("div", { onClick: (e) => e.stopPropagation() },
|
|
113
113
|
react_1.default.createElement(Checkbox_1.Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
|
|
114
114
|
react_1.default.createElement(List_styles_1.ListValue, { theme: resolvedTheme, config: checkboxConfig }, row.value)),
|
|
115
|
-
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' })))))),
|
|
115
|
+
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
116
|
row.children.length > 0 && (react_1.default.createElement(List_styles_1.ListRowExtend, { isExtended: row.extend || false },
|
|
117
117
|
react_1.default.createElement("div", null, row.children.map((_chiledRow) => {
|
|
118
118
|
return renderRow(_chiledRow, level + 1);
|
|
@@ -48,7 +48,7 @@ exports.ListRow = styled_components_1.default.div `
|
|
|
48
48
|
exports.ListIconWrapper = styled_components_1.default.div `
|
|
49
49
|
display: flex;
|
|
50
50
|
transition: transform 0.2s ease;
|
|
51
|
-
transform: ${({ isExtended }) => isExtended ? 'rotate(
|
|
51
|
+
transform: ${({ isExtended }) => isExtended ? 'rotate(0deg)' : 'rotate(-90deg)'};
|
|
52
52
|
width: ${({ config }) => config.size.iconSpace}px;
|
|
53
53
|
height: ${({ config }) => config.size.iconSpace}px;
|
|
54
54
|
align-items: center;
|
|
@@ -40,7 +40,7 @@ const updateParentSelection = (items, itemID) => {
|
|
|
40
40
|
}
|
|
41
41
|
return found;
|
|
42
42
|
};
|
|
43
|
-
export const List = ({ theme, themeVariant = 'default', items, handleChange, handleSelect, isCheckbox, selected, isCollapsable, isStatusable, isSelectable =
|
|
43
|
+
export const List = ({ theme, themeVariant = 'default', items, handleChange, handleSelect, isCheckbox, selected, isCollapsable, isStatusable, isSelectable = true, haveMoreOptions, levelActions = [], }) => {
|
|
44
44
|
const resolvedThemeData = resolveThemeWithComponentsConfig({
|
|
45
45
|
theme,
|
|
46
46
|
themeVariant,
|
|
@@ -106,7 +106,7 @@ export const List = ({ theme, themeVariant = 'default', items, handleChange, han
|
|
|
106
106
|
isCheckbox && (React.createElement("div", { onClick: (e) => e.stopPropagation() },
|
|
107
107
|
React.createElement(Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
|
|
108
108
|
React.createElement(ListValue, { theme: resolvedTheme, config: checkboxConfig }, row.value)),
|
|
109
|
-
React.createElement(ListRowOptionsWrapper, { onClick: (e) => e.stopPropagation() }, haveMoreOptions && levelActions[level]?.moreActions && (React.createElement(DropdownMenu, { options: levelActions[level]?.moreActions || [], targetID: row.id, position: 'right' })))))),
|
|
109
|
+
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
110
|
row.children.length > 0 && (React.createElement(ListRowExtend, { isExtended: row.extend || false },
|
|
111
111
|
React.createElement("div", null, row.children.map((_chiledRow) => {
|
|
112
112
|
return renderRow(_chiledRow, level + 1);
|
|
@@ -42,7 +42,7 @@ export const ListRow = styled.div `
|
|
|
42
42
|
export const ListIconWrapper = styled.div `
|
|
43
43
|
display: flex;
|
|
44
44
|
transition: transform 0.2s ease;
|
|
45
|
-
transform: ${({ isExtended }) => isExtended ? 'rotate(
|
|
45
|
+
transform: ${({ isExtended }) => isExtended ? 'rotate(0deg)' : 'rotate(-90deg)'};
|
|
46
46
|
width: ${({ config }) => config.size.iconSpace}px;
|
|
47
47
|
height: ${({ config }) => config.size.iconSpace}px;
|
|
48
48
|
align-items: center;
|