@monolith-forensics/monolith-ui 1.1.87 → 1.1.89

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.
@@ -1,4 +1,5 @@
1
1
  import "overlayscrollbars/overlayscrollbars.css";
2
+ import { ReactElement } from "react";
2
3
  export interface ColumnProps {
3
4
  className?: string;
4
5
  key?: string | number;
@@ -20,11 +21,7 @@ export interface ColumnProps {
20
21
  props?: any;
21
22
  render?: (data: any, options: any) => React.ReactNode;
22
23
  }
23
- interface ColumnType extends React.FunctionComponent<ColumnProps> {
24
- displayName: string;
25
- props?: ColumnProps;
26
- }
27
- export declare const Column: ColumnType;
24
+ export declare const Column: React.FC<ColumnProps>;
28
25
  interface onResizeProps {
29
26
  columns: {
30
27
  dataField: string;
@@ -60,7 +57,7 @@ export declare const useTable: () => {
60
57
  };
61
58
  interface TableProps {
62
59
  className?: string;
63
- children: ColumnType | ColumnType[];
60
+ children: ReactElement<ColumnProps> | ReactElement<ColumnProps>[];
64
61
  data: {
65
62
  [key: string]: any;
66
63
  }[];
@@ -26,7 +26,6 @@ const MIN_COLUMN_WIDTH = 125;
26
26
  export const Column = () => {
27
27
  return null;
28
28
  };
29
- Column.displayName = "Column";
30
29
  const StyledTable = styled.table `
31
30
  position: relative;
32
31
  border-collapse: separate;
@@ -446,7 +445,7 @@ const Table = styled(({ className, children, data, rowHeight, headerHeight, tabl
446
445
  let columns = useMemo(() => children === null || children === void 0 ? void 0 : children.map((column) => {
447
446
  var _a, _b, _c;
448
447
  return cloneElement(column, {
449
- columnId: shortUUID.generate(),
448
+ columnId: shortUUID.generate(), // Set unique ID for each column
450
449
  allowResize: allowColumnResize !== undefined
451
450
  ? allowColumnResize
452
451
  : (_a = column === null || column === void 0 ? void 0 : column.props) === null || _a === void 0 ? void 0 : _a.allowResize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.1.87",
3
+ "version": "1.1.89",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",