venice-ui 3.0.33 → 3.0.35

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,18 +81,22 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
81
81
  updateParentSelection(newListOption, item.id);
82
82
  handleChange(newListOption);
83
83
  };
84
- const select = (id) => {
84
+ const selectRow = (id) => {
85
+ console.log('selectRow', id, handleSelect && isSelectable);
85
86
  if (handleSelect && isSelectable) {
87
+ console.log('action');
86
88
  handleSelect(id);
87
89
  }
88
90
  };
89
91
  const renderRow = (row, level) => {
90
92
  const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
91
- return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
93
+ return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme, key: row.id },
92
94
  react_1.default.createElement(List_styles_1.ListRowRoot, { theme: resolvedTheme, config: checkboxConfig,
93
95
  // action={}
94
- level: level },
95
- react_1.default.createElement(List_styles_1.ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable },
96
+ level: level, key: `row_${row.id}` },
97
+ react_1.default.createElement(List_styles_1.ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable, onClick: () => {
98
+ selectRow(row.id);
99
+ } },
96
100
  react_1.default.createElement(react_1.default.Fragment, null,
97
101
  react_1.default.createElement(Aligment_1.Aligment, { justify: "start-flex", gap: checkboxConfig.size.gap, align: "center" },
98
102
  isCollapsable && (react_1.default.createElement(List_styles_1.ListIconWrapper, { theme: resolvedTheme, config: checkboxConfig, isExtended: row.extend || false, onClick: (e) => {
@@ -116,9 +120,7 @@ const List = ({ theme, themeVariant = 'default', items, handleChange, handleSele
116
120
  : checkboxConfig.color.status.success })))),
117
121
  isCheckbox && (react_1.default.createElement("div", { onClick: (e) => e.stopPropagation() },
118
122
  react_1.default.createElement(Checkbox_1.Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
119
- react_1.default.createElement(List_styles_1.ListValue, { theme: resolvedTheme, config: checkboxConfig, onClick: () => {
120
- select(row.id);
121
- } }, row.value)),
123
+ react_1.default.createElement(List_styles_1.ListValue, { theme: resolvedTheme, config: checkboxConfig }, row.value)),
122
124
  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" })))))),
123
125
  row.children.length > 0 && (react_1.default.createElement(List_styles_1.ListRowExtend, { isExtended: row.extend || false },
124
126
  react_1.default.createElement("div", null, row.children.map((_chiledRow) => {
@@ -75,18 +75,22 @@ 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) => {
78
+ const selectRow = (id) => {
79
+ console.log('selectRow', id, handleSelect && isSelectable);
79
80
  if (handleSelect && isSelectable) {
81
+ console.log('action');
80
82
  handleSelect(id);
81
83
  }
82
84
  };
83
85
  const renderRow = (row, level) => {
84
86
  const rowHaveStatus = row.statusDone || row.statusError || row.statusWarning;
85
- return (React.createElement(ThemeProvider, { theme: resolvedTheme },
87
+ return (React.createElement(ThemeProvider, { theme: resolvedTheme, key: row.id },
86
88
  React.createElement(ListRowRoot, { theme: resolvedTheme, config: checkboxConfig,
87
89
  // action={}
88
- level: level },
89
- React.createElement(ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable },
90
+ level: level, key: `row_${row.id}` },
91
+ React.createElement(ListRow, { theme: resolvedTheme, config: checkboxConfig, isSelected: isSelectable && selected ? selected === row.id : false, isSelectable: isSelectable, onClick: () => {
92
+ selectRow(row.id);
93
+ } },
90
94
  React.createElement(React.Fragment, null,
91
95
  React.createElement(Aligment, { justify: "start-flex", gap: checkboxConfig.size.gap, align: "center" },
92
96
  isCollapsable && (React.createElement(ListIconWrapper, { theme: resolvedTheme, config: checkboxConfig, isExtended: row.extend || false, onClick: (e) => {
@@ -110,9 +114,7 @@ export const List = ({ theme, themeVariant = 'default', items, handleChange, han
110
114
  : checkboxConfig.color.status.success })))),
111
115
  isCheckbox && (React.createElement("div", { onClick: (e) => e.stopPropagation() },
112
116
  React.createElement(Checkbox, { handleClick: () => handleClick(row), value: getValue(row), isIntermedian: getIntermedian(row), size: "sm" }))),
113
- React.createElement(ListValue, { theme: resolvedTheme, config: checkboxConfig, onClick: () => {
114
- select(row.id);
115
- } }, row.value)),
117
+ React.createElement(ListValue, { theme: resolvedTheme, config: checkboxConfig }, row.value)),
116
118
  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" })))))),
117
119
  row.children.length > 0 && (React.createElement(ListRowExtend, { isExtended: row.extend || false },
118
120
  React.createElement("div", null, row.children.map((_chiledRow) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.33",
3
+ "version": "3.0.35",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",