@mezzanine-ui/react 0.14.2 → 0.14.4

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.
@@ -14,7 +14,10 @@ function useAutoCompleteBaseValueControl(props) {
14
14
  });
15
15
  const [searchText, setSearchText] = useState('');
16
16
  const [focused, setFocused] = useState(false);
17
- const searchTextReg = new RegExp(searchText.replace(/\\/g, '\\\\'), 'i');
17
+ /** escape all special characters */
18
+ const searchTextReg = new RegExp(searchText
19
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
20
+ .replace(/-/g, '\\x2d'));
18
21
  const onFocus = useCallback((focus) => {
19
22
  setFocused(focus);
20
23
  }, []);
@@ -54,7 +54,7 @@ const TableBodyRow = forwardRef(function TableBodyRow(props, ref) {
54
54
  }, children: jsx(TableExpandable, { expandable: isExpandable, expanded: expanded, setExpanded: setExpanded, onExpand: (status) => { var _a; return (_a = expanding.onExpand) === null || _a === void 0 ? void 0 : _a.call(expanding, rowData, status); } }) })) : null, (columns !== null && columns !== void 0 ? columns : []).map((column, idx) => {
55
55
  var _a, _b, _c, _d;
56
56
  const autoGrabData = column.dataIndex ? get(rowData, column.dataIndex) : '';
57
- const ellipsis = !!(autoGrabData) && ((_a = column.ellipsis) !== null && _a !== void 0 ? _a : true);
57
+ const ellipsis = ((_a = column.ellipsis) !== null && _a !== void 0 ? _a : true);
58
58
  const tooltipTitle = ((_c = (_b = column.renderTooltipTitle) === null || _b === void 0 ? void 0 : _b.call(column, rowData)) !== null && _c !== void 0 ? _c : autoGrabData);
59
59
  return (jsx("td", { className: cx(tableClasses.bodyRowCellWrapper, isFirstColumnShouldSticky && idx === 0 && tableClasses.bodyRowCellWrapperFixed, isFirstColumnShouldSticky && idx === 0 && isHorizontalScrolling && tableClasses.bodyRowCellWrapperFixedStuck, column.bodyClassName), style: getColumnStyle(column), children: jsx(TableEditRenderWrapper, { ...column, rowData: rowData, children: jsx(TableCell, { ellipsis: ellipsis, forceShownTooltipWhenHovered: column.forceShownTooltipWhenHovered, style: getCellStyle(column), tooltipTitle: tooltipTitle, children: ((_d = column.render) === null || _d === void 0 ? void 0 : _d.call(column, rowData, rowIndex, column)) || autoGrabData }) }) }, `${idx + 1}-${(rowData.key || rowData.id)}`));
60
60
  })] })) }, rowData.key || rowData.id), renderedExpandedContent ? (jsx("tr", { children: jsx("td", { style: { padding: 0 }, children: jsx(AccordionDetails, { className: cx(expanding.className, tableClasses.bodyRowExpandedTableWrapper), expanded: expanded, children: (renderedExpandedContent === null || renderedExpandedContent === void 0 ? void 0 : renderedExpandedContent.dataSource) ? (jsx(TableExpandedTable, { renderedExpandedContent: renderedExpandedContent })) : renderedExpandedContent }) }) })) : null] }));
@@ -1,6 +1,6 @@
1
- import { ReactElement, MouseEventHandler } from 'react';
1
+ import { ReactElement, MouseEventHandler, ReactNode } from 'react';
2
2
  import { PopperProps } from '../Popper';
3
- export interface TooltipProps extends Omit<PopperProps, 'children'> {
3
+ export interface TooltipProps extends Omit<PopperProps, 'children' | 'title'> {
4
4
  /**
5
5
  * child function that can receive events
6
6
  */
@@ -16,7 +16,7 @@ export interface TooltipProps extends Omit<PopperProps, 'children'> {
16
16
  /**
17
17
  * title of tooltip
18
18
  */
19
- title?: string;
19
+ title?: ReactNode;
20
20
  }
21
21
  /**
22
22
  * The react component for `mezzanine` tooltip.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/react",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
4
4
  "description": "React components for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -28,9 +28,9 @@
28
28
  "react-dom": "^18.2.0"
29
29
  },
30
30
  "dependencies": {
31
- "@mezzanine-ui/core": "^0.14.2",
32
- "@mezzanine-ui/icons": "^0.14.2",
33
- "@mezzanine-ui/system": "^0.14.2",
31
+ "@mezzanine-ui/core": "^0.14.4",
32
+ "@mezzanine-ui/icons": "^0.14.4",
33
+ "@mezzanine-ui/system": "^0.14.4",
34
34
  "@popperjs/core": "^2.11.6",
35
35
  "@types/react-transition-group": "^4.4.8",
36
36
  "clsx": "^2.0.0",