asma-ui-table 1.4.2 → 1.4.3

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.
Files changed (39) hide show
  1. package/dist/asma-ui-table.es.js +10758 -11905
  2. package/dist/src/components/StyledTableIndex.d.ts +2 -1
  3. package/dist/src/components/TableBody.d.ts +1 -1
  4. package/dist/src/components/TableRow.d.ts +2 -2
  5. package/dist/src/components/TableRows.d.ts +1 -1
  6. package/dist/src/components/TableSkeleton.d.ts +2 -1
  7. package/dist/src/components/columns/action-column/actionColumn.d.ts +6 -6
  8. package/dist/src/components/columns/action-column/components/HeaderActionMenu.d.ts +1 -1
  9. package/dist/src/components/columns/action-column/components/RowActionMenu.d.ts +2 -2
  10. package/dist/src/components/columns/dndHandleColumn.d.ts +1 -1
  11. package/dist/src/components/columns/expandColumn.d.ts +2 -1
  12. package/dist/src/components/columns/helpers/useElementHeightPx.d.ts +1 -1
  13. package/dist/src/components/columns/helpers/useProxyHorizontalScrollSync.d.ts +4 -4
  14. package/dist/src/components/columns/selectColumn.d.ts +3 -2
  15. package/dist/src/components/columns/showTextColumn.d.ts +2 -1
  16. package/dist/src/components/table-footer/TableFooter.d.ts +1 -1
  17. package/dist/src/components/table-footer/TablePagination.d.ts +1 -1
  18. package/dist/src/components/table-footer/TableRowCountSelect.d.ts +1 -1
  19. package/dist/src/components/table-header/TableHeader.d.ts +1 -1
  20. package/dist/src/components/table-header/TableHeaderCell.d.ts +1 -1
  21. package/dist/src/shared-components/CheckIcon.d.ts +2 -1
  22. package/dist/src/shared-components/ChevronDownIcon.d.ts +2 -1
  23. package/dist/src/shared-components/ChevronLeftIcon.d.ts +2 -1
  24. package/dist/src/shared-components/ChevronRightIcon.d.ts +2 -1
  25. package/dist/src/shared-components/ChevronUpIcon.d.ts +2 -1
  26. package/dist/src/shared-components/CircleWarningOutlineIcon.d.ts +2 -1
  27. package/dist/src/shared-components/DotsHorizontalIcon.d.ts +2 -1
  28. package/dist/src/shared-components/DotsVerticalIcon.d.ts +2 -1
  29. package/dist/src/shared-components/DropDownIcon.d.ts +2 -1
  30. package/dist/src/shared-components/DropUpIcon.d.ts +2 -1
  31. package/dist/src/shared-components/FilterIcon.d.ts +1 -1
  32. package/dist/src/shared-components/LoadingIcon.d.ts +2 -1
  33. package/dist/src/shared-components/PinIcon.d.ts +2 -1
  34. package/dist/src/shared-components/StyledCheckbox.d.ts +2 -2
  35. package/dist/src/shared-components/StyledMenuItem.d.ts +2 -1
  36. package/dist/src/shared-components/button/StyledButton.d.ts +1 -1
  37. package/dist/src/shared-components/menu-item/index.d.ts +2 -1
  38. package/dist/src/shared-components/tooltip/index.d.ts +2 -1
  39. package/package.json +12 -12
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { StyledTableProps, TableState, ColumnSizingState } from '../types';
2
3
  type RowWithId = {
3
4
  id: string | number;
@@ -6,5 +7,5 @@ export declare const StyledTable: <TData extends RowWithId, TCustomData = Record
6
7
  getColumnSizing?: ((column_sizing: ColumnSizingState) => void) | undefined;
7
8
  getTableState?: ((tableState: TableState) => void) | undefined;
8
9
  setData?: ((callback: (data: TData[]) => TData[]) => void) | undefined;
9
- }) => JSX.Element;
10
+ }) => import("react").JSX.Element;
10
11
  export {};
@@ -8,4 +8,4 @@ export declare function TableBody<TData extends {
8
8
  table: Table<TData>;
9
9
  styledTableProps: StyledTableProps<TData, TCustomData>;
10
10
  columnWindow: ColumnWindow;
11
- }): JSX.Element | null;
11
+ }): import("react").JSX.Element | null;
@@ -9,5 +9,5 @@ export declare function TableRow<TData extends {
9
9
  row: Row<TData>;
10
10
  columnWindow: ColumnWindow;
11
11
  index: number;
12
- }): JSX.Element;
13
- export declare const Checkmark: () => JSX.Element;
12
+ }): import("react").JSX.Element;
13
+ export declare const Checkmark: () => import("react").JSX.Element;
@@ -8,4 +8,4 @@ export declare function TableRows<TData extends {
8
8
  styledTableProps: StyledTableProps<TData, TCustomData>;
9
9
  table: Table<TData>;
10
10
  columnWindow: ColumnWindow;
11
- }): JSX.Element;
11
+ }): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
+ /// <reference types="react" />
1
2
  export declare const TableSkeleton: ({ colSpan, rowHeight }: {
2
3
  colSpan: number;
3
4
  rowHeight?: number | undefined;
4
- }) => JSX.Element;
5
+ }) => import("react").JSX.Element;
@@ -14,8 +14,8 @@ export declare function generateActionsColumn<TData>(options: {
14
14
  enableHiding: boolean;
15
15
  enableSorting: boolean;
16
16
  accessorFn: (row: TData) => TData;
17
- header: (props: HeaderContext<TData, TData>) => JSX.Element | null;
18
- cell: (cell: CellContext<TData, TData>) => JSX.Element | null;
17
+ header: (props: HeaderContext<TData, TData>) => import("react").JSX.Element | null;
18
+ cell: (cell: CellContext<TData, TData>) => import("react").JSX.Element | null;
19
19
  size: number;
20
20
  } | {
21
21
  getUniqueValues?: import("@tanstack/react-table").AccessorFn<TData, unknown[]> | undefined;
@@ -46,7 +46,7 @@ export declare function generateActionsColumn<TData>(options: {
46
46
  headerAlign?: "left" | "center" | "right" | undefined;
47
47
  fixedLeft?: boolean | undefined;
48
48
  pinnedHeaderText?: string | undefined;
49
- header: string | ((props: HeaderContext<TData, TData>) => JSX.Element | null);
49
+ header: string | ((props: HeaderContext<TData, TData>) => import("react").JSX.Element | null);
50
50
  id: string;
51
51
  accessorFn: (row: TData) => TData;
52
52
  } | {
@@ -111,7 +111,7 @@ export declare function generateActionsColumn<TData>(options: {
111
111
  headerAlign?: "left" | "center" | "right" | undefined;
112
112
  fixedLeft?: boolean | undefined;
113
113
  pinnedHeaderText?: string | undefined;
114
- header: string | ((props: HeaderContext<TData, TData>) => JSX.Element | null);
114
+ header: string | ((props: HeaderContext<TData, TData>) => import("react").JSX.Element | null);
115
115
  id: string;
116
116
  accessorFn: (row: TData) => TData;
117
117
  } | {
@@ -178,7 +178,7 @@ export declare function generateActionsColumn<TData>(options: {
178
178
  headerAlign?: "left" | "center" | "right" | undefined;
179
179
  fixedLeft?: boolean | undefined;
180
180
  pinnedHeaderText?: string | undefined;
181
- header: string | ((props: HeaderContext<TData, TData>) => JSX.Element | null);
181
+ header: string | ((props: HeaderContext<TData, TData>) => import("react").JSX.Element | null);
182
182
  accessorFn: (row: TData) => TData;
183
183
  } | {
184
184
  id: string;
@@ -243,7 +243,7 @@ export declare function generateActionsColumn<TData>(options: {
243
243
  headerAlign?: "left" | "center" | "right" | undefined;
244
244
  fixedLeft?: boolean | undefined;
245
245
  pinnedHeaderText?: string | undefined;
246
- header: string | ((props: HeaderContext<TData, TData>) => JSX.Element | null);
246
+ header: string | ((props: HeaderContext<TData, TData>) => import("react").JSX.Element | null);
247
247
  id: string;
248
248
  } | {
249
249
  accessorFn: import("@tanstack/react-table").AccessorFn<TData, unknown>;
@@ -3,4 +3,4 @@ import type { HeaderContext } from '@tanstack/react-table';
3
3
  export declare function HeaderActionMenu<TData>({ headerData, locale, }: {
4
4
  headerData: HeaderContext<TData, TData>;
5
5
  locale?: 'en' | 'no';
6
- }): JSX.Element;
6
+ }): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import type { CellContext, Row } from '@tanstack/react-table';
3
2
  import { type IAction, type ICustomAction, type RowActionsState } from 'src/types';
3
+ import React from 'react';
4
4
  export declare function RowActionMenu<TData>({ tableData, actions, rowActionsState, }: {
5
5
  tableData: CellContext<TData, TData>;
6
6
  actions: (row: Row<TData>) => (IAction<TData> | ICustomAction<TData>)[];
7
7
  rowActionsState?: (row: Row<TData>) => RowActionsState | undefined;
8
- }): JSX.Element;
8
+ }): React.JSX.Element;
@@ -6,7 +6,7 @@ export declare function generateDndHandleColumn<TData>(custom_props?: ColumnDef<
6
6
  enableHiding: boolean;
7
7
  enableSorting: boolean;
8
8
  header: () => null;
9
- cell: ({ row }: CellContext<TData, TData>) => JSX.Element;
9
+ cell: ({ row }: CellContext<TData, TData>) => import("react").JSX.Element;
10
10
  } | {
11
11
  id: string;
12
12
  getUniqueValues?: import("src/types").AccessorFn<TData, unknown[]> | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { type CellContext } from '@tanstack/react-table';
2
3
  export declare function generateExpandColumn<TData>(isFixed: boolean, rowHeight?: number): {
3
4
  id: string;
@@ -7,6 +8,6 @@ export declare function generateExpandColumn<TData>(isFixed: boolean, rowHeight?
7
8
  enableHiding: boolean;
8
9
  enableSorting: boolean;
9
10
  header: () => null;
10
- cell: ({ cell }: CellContext<TData, TData>) => JSX.Element | null;
11
+ cell: ({ cell }: CellContext<TData, TData>) => import("react").JSX.Element | null;
11
12
  fixedLeft: boolean;
12
13
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  export declare function useElementHeightPx<T extends HTMLElement>(): {
3
- ref: import("react").RefObject<T>;
3
+ ref: import("react").RefObject<T | null>;
4
4
  heightPx: number;
5
5
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare function useProxyHorizontalScrollSync(enabled: boolean): {
3
- tableScrollRef: import("react").MutableRefObject<HTMLDivElement | null>;
4
- tableXRef: import("react").MutableRefObject<HTMLDivElement | null>;
5
- hScrollRef: import("react").MutableRefObject<HTMLDivElement | null>;
6
- hScrollContentRef: import("react").MutableRefObject<HTMLDivElement | null>;
3
+ tableScrollRef: import("react").RefObject<HTMLDivElement | null>;
4
+ tableXRef: import("react").RefObject<HTMLDivElement | null>;
5
+ hScrollRef: import("react").RefObject<HTMLDivElement | null>;
6
+ hScrollContentRef: import("react").RefObject<HTMLDivElement | null>;
7
7
  };
@@ -1,10 +1,11 @@
1
+ /// <reference types="react" />
1
2
  import type { CellContext, HeaderContext } from '@tanstack/react-table';
2
3
  export declare function selectColumn<TData>(isFixed: boolean, rowHeight?: number): {
3
4
  id: string;
4
5
  minSize: number;
5
6
  maxSize: number;
6
7
  size: number;
7
- header: ({ table }: HeaderContext<TData, TData>) => JSX.Element;
8
- cell: ({ cell }: CellContext<TData, TData>) => JSX.Element;
8
+ header: ({ table }: HeaderContext<TData, TData>) => import("react").JSX.Element;
9
+ cell: ({ cell }: CellContext<TData, TData>) => import("react").JSX.Element;
9
10
  fixedLeft: boolean;
10
11
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { type CellContext } from 'src/types';
2
3
  export declare function generateShowFullTextColumn<TData>(isFixed: boolean, rowHeight?: number): {
3
4
  id: string;
@@ -7,6 +8,6 @@ export declare function generateShowFullTextColumn<TData>(isFixed: boolean, rowH
7
8
  enableHiding: boolean;
8
9
  enableSorting: boolean;
9
10
  header: () => null;
10
- cell: (info: CellContext<TData, TData>) => JSX.Element;
11
+ cell: (info: CellContext<TData, TData>) => import("react").JSX.Element;
11
12
  fixedLeft: boolean;
12
13
  };
@@ -7,4 +7,4 @@ export declare function TableFooter<TData extends {
7
7
  table: Table<TData>;
8
8
  styledTableProps: StyledTableProps<TData, TCustomData>;
9
9
  canShowStickyFooter: boolean;
10
- }): JSX.Element | null;
10
+ }): import("react").JSX.Element | null;
@@ -3,4 +3,4 @@ import type { Table } from '@tanstack/react-table';
3
3
  export declare function TablePagination<TData>({ table, locale, }: {
4
4
  locale: 'en' | 'no';
5
5
  table: Table<TData>;
6
- }): JSX.Element;
6
+ }): import("react").JSX.Element;
@@ -3,4 +3,4 @@ import type { Table } from '@tanstack/react-table';
3
3
  export declare function TableRowCountSelect<TData>({ table, locale, }: {
4
4
  locale: 'en' | 'no';
5
5
  table: Table<TData>;
6
- }): JSX.Element;
6
+ }): import("react").JSX.Element;
@@ -10,4 +10,4 @@ export declare function TableHeader<TData extends {
10
10
  tableCanResize: boolean;
11
11
  tableWidth: number | null;
12
12
  columnWindow: ColumnWindow;
13
- }): JSX.Element;
13
+ }): import("react").JSX.Element;
@@ -9,4 +9,4 @@ export declare function TableHeaderCell<TData extends {
9
9
  tableCanResize: boolean;
10
10
  left: number;
11
11
  tableWidth: number | null;
12
- }): JSX.Element;
12
+ }): import("react").JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function CheckIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function CheckIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function ChevronDownIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function ChevronDownIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function ChevronLeftIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function ChevronLeftIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function ChevronRightIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function ChevronRightIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function ChevronUpIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function ChevronUpIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function CircleWarningOutlineIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function CircleWarningOutlineIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function DotsHorizontalIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function DotsHorizontalIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function DotsVerticalIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function DotsVerticalIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function DropDownIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function DropDownIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function DropUpIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function DropUpIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import type { SVGProps } from 'react';
2
- export declare function FilterIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
2
+ export declare function FilterIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function LoadingIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function LoadingIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { SVGProps } from 'react';
2
- export declare function PinIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
3
+ export declare function PinIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -10,7 +10,7 @@ type StyledCheckboxProps = {
10
10
  className?: string;
11
11
  onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
12
12
  } & Omit<React.ComponentProps<typeof Checkbox.Root>, 'children'>;
13
- export declare const IndeterminateIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
14
- export declare const CheckIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
13
+ export declare const IndeterminateIcon: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
14
+ export declare const CheckIcon: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
15
15
  export declare const StyledCheckbox: React.FC<StyledCheckboxProps>;
16
16
  export {};
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { type MenuItemProps } from '@mui/material';
2
- export declare const StyledMenuItem: (props: MenuItemProps) => JSX.Element;
3
+ export declare const StyledMenuItem: (props: MenuItemProps) => import("react").JSX.Element;
@@ -36,5 +36,5 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
36
36
  * @param refLink - ref to component
37
37
  * @param dataTest - data-test tag
38
38
  */
39
- export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, ...otherProps }: StyledButtonProps) => JSX.Element;
39
+ export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, ...otherProps }: StyledButtonProps) => React.JSX.Element;
40
40
  export {};
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import type { MenuItemProps } from '@mui/material';
2
- export declare const StyledMenuItem: (props: MenuItemProps) => JSX.Element;
3
+ export declare const StyledMenuItem: (props: MenuItemProps) => import("react").JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { type TooltipProps } from '@mui/material';
2
- export declare const StyledTooltip: (props: TooltipProps) => JSX.Element;
3
+ export declare const StyledTooltip: (props: TooltipProps) => import("react").JSX.Element;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.4.2",
6
+ "version": "1.4.3",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",
@@ -56,18 +56,18 @@
56
56
  "@dnd-kit/modifiers": "^7.0.0",
57
57
  "@dnd-kit/sortable": "^8.0.0",
58
58
  "@dnd-kit/utilities": "^3.2.2",
59
- "@emotion/react": "^11.11.1",
60
- "@emotion/styled": "^11.11.0",
61
59
  "@fontsource/roboto": "^5.0.4",
62
- "@mui/material": "^5.13.7",
63
60
  "@tanstack/react-table": "^8.21.3",
64
61
  "@tanstack/react-virtual": "^3.13.21",
65
62
  "clsx": "^1.2.1",
66
- "lodash-es": "^4.17.21",
67
- "react": "^18.2.0",
68
- "react-dom": "^18.2.0"
63
+ "lodash-es": "^4.17.21"
69
64
  },
70
65
  "devDependencies": {
66
+ "@emotion/react": "^11.11.1",
67
+ "@emotion/styled": "^11.11.0",
68
+ "@mui/material": "^5.18.0",
69
+ "react": "^18.2.0",
70
+ "react-dom": "^18.2.0",
71
71
  "@changesets/cli": "^2.26.2",
72
72
  "@faker-js/faker": "^8.0.2",
73
73
  "@rollup/plugin-terser": "^0.4.3",
@@ -88,8 +88,8 @@
88
88
  "@storybook/theming": "^7.6.9",
89
89
  "@types/lodash-es": "^4.17.7",
90
90
  "@types/node": "^18.0.3",
91
- "@types/react": "^18.0.37",
92
- "@types/react-dom": "^18.0.11",
91
+ "@types/react": "^19.2.14",
92
+ "@types/react-dom": "^19.2.3",
93
93
  "@typescript-eslint/eslint-plugin": "^5.59.0",
94
94
  "@typescript-eslint/parser": "^5.59.0",
95
95
  "@vitejs/plugin-react": "^4.0.0",
@@ -118,10 +118,10 @@
118
118
  "peerDependencies": {
119
119
  "@emotion/react": "^11.*",
120
120
  "@emotion/styled": "^11.*",
121
- "@mui/material": "^5.*",
121
+ "@mui/material": "^5.18.0",
122
122
  "immer": "^9.*",
123
- "react": "^18.*",
124
- "react-dom": "^18.*"
123
+ "react": "^18.0.0 || ^19.0.0",
124
+ "react-dom": "^18.0.0 || ^19.0.0"
125
125
  },
126
126
  "resolutions": {
127
127
  "@types/node": "18.0.3"