asma-core-ui 3.0.71 → 3.0.73

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 (33) hide show
  1. package/CHANGELOG.md +687 -0
  2. package/dist/asma-core-ui.es.js +2 -2
  3. package/package.json +123 -123
  4. package/dist/src/components/icons/Icons.d.ts +0 -5
  5. package/dist/src/components/table/StyledTable.d.ts +0 -18
  6. package/dist/src/components/table/components/TableBody.d.ts +0 -9
  7. package/dist/src/components/table/components/TableFooter.d.ts +0 -9
  8. package/dist/src/components/table/components/TableHeader.d.ts +0 -10
  9. package/dist/src/components/table/components/TableHeaderCell.d.ts +0 -10
  10. package/dist/src/components/table/components/TableNoRowsOverlay.d.ts +0 -5
  11. package/dist/src/components/table/components/TablePagination.d.ts +0 -6
  12. package/dist/src/components/table/components/TableRow.d.ts +0 -10
  13. package/dist/src/components/table/components/TableRows.d.ts +0 -9
  14. package/dist/src/components/table/components/TableSkeleton.d.ts +0 -4
  15. package/dist/src/components/table/components/columns/action-column/actionColumn.d.ts +0 -21
  16. package/dist/src/components/table/components/columns/action-column/components/HeaderActionMenu.d.ts +0 -5
  17. package/dist/src/components/table/components/columns/action-column/components/RowActionMenu.d.ts +0 -12
  18. package/dist/src/components/table/components/columns/expandColumn.d.ts +0 -11
  19. package/dist/src/components/table/components/columns/selectColumn.d.ts +0 -9
  20. package/dist/src/components/table/helpers/getTableHeaderStyle.d.ts +0 -10
  21. package/dist/src/components/table/helpers/injectColumns.d.ts +0 -4
  22. package/dist/src/components/table/hooks/useStyledTable.d.ts +0 -6
  23. package/dist/src/components/table/index.d.ts +0 -3
  24. package/dist/src/components/table/story/components/styled-flex-table/generateActions.d.ts +0 -6
  25. package/dist/src/components/table/story/components/styled-flex-table/useColumns.d.ts +0 -5
  26. package/dist/src/components/table/story/components/styled-table/RenderSubRows.d.ts +0 -5
  27. package/dist/src/components/table/story/components/styled-table/getRowActions.d.ts +0 -23
  28. package/dist/src/components/table/story/components/styled-table/useTableColumns.d.ts +0 -10
  29. package/dist/src/components/table/story/components/styled-table/useTableSubRowsColumns.d.ts +0 -5
  30. package/dist/src/components/table/story/service/Templates.query.d.ts +0 -5
  31. package/dist/src/components/table/story/service/types.d.ts +0 -9
  32. package/dist/src/components/table/story/service/useFetchTemplates.d.ts +0 -4
  33. package/dist/src/components/table/types.d.ts +0 -65
package/package.json CHANGED
@@ -1,125 +1,125 @@
1
1
  {
2
- "name": "asma-core-ui",
3
- "publishConfig": {
4
- "access": "public"
5
- },
6
- "version": "3.0.71",
7
- "type": "module",
8
- "files": [
9
- "dist/**/*",
10
- "dist/style.css",
11
- "tw-configs/**/*"
12
- ],
13
- "keywords": [],
14
- "author": "asma-team",
15
- "types": "./dist/index.d.ts",
16
- "main": "./dist/asma-core-ui.es.js",
17
- "module": "./dist/asma-core-ui.es.js",
18
- "license": "UNLICENSED",
19
- "dependencies": {
20
- "@emotion/react": "^11.11.1",
21
- "@emotion/styled": "^11.11.0",
22
- "@fontsource/material-icons": "^5.0.4",
23
- "@fontsource/roboto": "^5.0.4",
24
- "@iconify/react": "^4.1.1",
25
- "@mui/material": "^5.13.7",
26
- "@tanstack/react-table": "^8.10.0",
27
- "clsx": "^1.2.1",
28
- "date-fns": "^2.30.0",
29
- "lodash-es": "^4.17.21",
30
- "material-ui-popup-state": "^5.0.10",
31
- "node": "18.17.0",
32
- "notistack": "^3.0.1",
33
- "react": "^18.2.0",
34
- "react-day-picker": "^8.8.2",
35
- "react-dom": "^18.2.0",
36
- "react-quill": "^2.0.0",
37
- "sass": "^1.77.5",
38
- "vite-plugin-css-injected-by-js": "^3.5.1"
39
- },
40
- "devDependencies": {
41
- "@changesets/cli": "^2.26.2",
42
- "@faker-js/faker": "^8.0.2",
43
- "@rollup/plugin-terser": "^0.4.3",
44
- "@storybook/addon-a11y": "^7.6.9",
45
- "@storybook/addon-essentials": "^7.6.9",
46
- "@storybook/addon-interactions": "^7.6.9",
47
- "@storybook/addon-links": "^7.6.9",
48
- "@storybook/addon-mdx-gfm": "^7.6.9",
49
- "@storybook/addon-styling": "^1.3.7",
50
- "@storybook/addons": "^7.6.9",
51
- "@storybook/blocks": "^7.6.9",
52
- "@storybook/manager-api": "^7.6.9",
53
- "@storybook/preset-create-react-app": "^7.6.9",
54
- "@storybook/react": "^7.6.9",
55
- "@storybook/react-vite": "^7.6.9",
56
- "@storybook/test-runner": "^0.16.0",
57
- "@storybook/testing-library": "^0.2.2",
58
- "@storybook/theming": "^7.6.9",
59
- "@types/lodash-es": "^4.17.7",
60
- "@types/node": "^18.0.3",
61
- "@types/react": "^18.0.37",
62
- "@types/react-dom": "^18.0.11",
63
- "@typescript-eslint/eslint-plugin": "^5.59.0",
64
- "@typescript-eslint/parser": "^5.59.0",
65
- "@vitejs/plugin-react": "^4.0.0",
66
- "autoprefixer": "^10.4.14",
67
- "axe-playwright": "^1.2.3",
68
- "axios": "^1.6.8",
69
- "eslint": "^8.38.0",
70
- "eslint-plugin-react-hooks": "^4.6.0",
71
- "eslint-plugin-react-refresh": "^0.3.4",
72
- "eslint-plugin-storybook": "^0.6.15",
73
- "postcss": "^8.4.24",
74
- "prop-types": "^15.8.1",
75
- "rollup-plugin-typescript2": "^0.35.0",
76
- "storybook": "^7.6.9",
77
- "storybook-addon-themes": "^6.1.0",
78
- "tailwind-scrollbar": "^3.1.0",
79
- "tailwindcss": "^3.3.2",
80
- "typescript": "^5.0.2",
81
- "typescript-plugin-css-modules": "^5.0.1",
82
- "vite": "^4.3.9",
83
- "vite-plugin-dts": "^3.1.1",
84
- "vite-tsconfig-paths": "^4.2.0"
85
- },
86
- "peerDependencies": {
87
- "@emotion/react": "^11.*",
88
- "@emotion/styled": "^11.*",
89
- "@mui/material": "^5.*",
90
- "immer": "^9.*",
91
- "react": "^18.*",
92
- "react-dom": "^18.*"
93
- },
94
- "resolutions": {
95
- "@types/node": "18.0.3",
96
- "node": "18.17.0"
97
- },
98
- "exports": {
99
- ".": {
100
- "import": "./dist/asma-core-ui.es.js"
2
+ "name": "asma-core-ui",
3
+ "publishConfig": {
4
+ "access": "public"
101
5
  },
102
- "./dist/style.css": "./dist/style.css",
103
- "./tw-configs/twConfigs.json": "./tw-configs/twConfigs.json"
104
- },
105
- "scripts": {
106
- "dev": "vite",
107
- "build": "npx tsc && rm -rf ./dist && vite build",
108
- "preview": "vite preview",
109
- "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
110
- "version": "echo $npm_package_version",
111
- "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
112
- "prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
113
- "storybook": "storybook dev -p 6006",
114
- "storybook:no-browser": "storybook dev -p 6006 --no-open",
115
- "storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
116
- "storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
117
- "build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
118
- "test-storybook": "test-storybook",
119
- "changeset:pre-beta": "changeset pre enter beta",
120
- "changeset:pre-exit": "changeset pre exit",
121
- "changeset:version": "changeset version",
122
- "changeset:publish": "changeset publish",
123
- "changeset:status": "changeset status"
124
- }
125
- }
6
+ "version": "3.0.73",
7
+ "type": "module",
8
+ "files": [
9
+ "dist/**/*",
10
+ "dist/style.css",
11
+ "tw-configs/**/*"
12
+ ],
13
+ "keywords": [],
14
+ "author": "asma-team",
15
+ "types": "./dist/index.d.ts",
16
+ "main": "./dist/asma-core-ui.es.js",
17
+ "module": "./dist/asma-core-ui.es.js",
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "npx tsc && rm -rf ./dist && vite build",
21
+ "preview": "vite preview",
22
+ "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
23
+ "version": "echo $npm_package_version",
24
+ "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
25
+ "prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
26
+ "storybook": "storybook dev -p 6006",
27
+ "storybook:no-browser": "storybook dev -p 6006 --no-open",
28
+ "storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
29
+ "storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
30
+ "build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
31
+ "test-storybook": "test-storybook",
32
+ "changeset:pre-beta": "changeset pre enter beta",
33
+ "changeset:pre-exit": "changeset pre exit",
34
+ "changeset:version": "changeset version",
35
+ "changeset:publish": "changeset publish",
36
+ "changeset:status": "changeset status"
37
+ },
38
+ "license": "UNLICENSED",
39
+ "dependencies": {
40
+ "@emotion/react": "^11.11.1",
41
+ "@emotion/styled": "^11.11.0",
42
+ "@fontsource/material-icons": "^5.0.4",
43
+ "@fontsource/roboto": "^5.0.4",
44
+ "@iconify/react": "^4.1.1",
45
+ "@mui/material": "^5.13.7",
46
+ "@tanstack/react-table": "^8.10.0",
47
+ "clsx": "^1.2.1",
48
+ "date-fns": "^2.30.0",
49
+ "lodash-es": "^4.17.21",
50
+ "material-ui-popup-state": "^5.0.10",
51
+ "node": "18.17.0",
52
+ "notistack": "^3.0.1",
53
+ "react": "^18.2.0",
54
+ "react-day-picker": "^8.8.2",
55
+ "react-dom": "^18.2.0",
56
+ "react-quill": "^2.0.0",
57
+ "sass": "^1.77.5",
58
+ "vite-plugin-css-injected-by-js": "^3.5.1"
59
+ },
60
+ "devDependencies": {
61
+ "@changesets/cli": "^2.26.2",
62
+ "@faker-js/faker": "^8.0.2",
63
+ "@rollup/plugin-terser": "^0.4.3",
64
+ "@storybook/addon-a11y": "^7.6.9",
65
+ "@storybook/addon-essentials": "^7.6.9",
66
+ "@storybook/addon-interactions": "^7.6.9",
67
+ "@storybook/addon-links": "^7.6.9",
68
+ "@storybook/addon-mdx-gfm": "^7.6.9",
69
+ "@storybook/addon-styling": "^1.3.7",
70
+ "@storybook/addons": "^7.6.9",
71
+ "@storybook/blocks": "^7.6.9",
72
+ "@storybook/manager-api": "^7.6.9",
73
+ "@storybook/preset-create-react-app": "^7.6.9",
74
+ "@storybook/react": "^7.6.9",
75
+ "@storybook/react-vite": "^7.6.9",
76
+ "@storybook/test-runner": "^0.16.0",
77
+ "@storybook/testing-library": "^0.2.2",
78
+ "@storybook/theming": "^7.6.9",
79
+ "@types/lodash-es": "^4.17.7",
80
+ "@types/node": "^18.0.3",
81
+ "@types/react": "^18.0.37",
82
+ "@types/react-dom": "^18.0.11",
83
+ "@typescript-eslint/eslint-plugin": "^5.59.0",
84
+ "@typescript-eslint/parser": "^5.59.0",
85
+ "@vitejs/plugin-react": "^4.0.0",
86
+ "autoprefixer": "^10.4.14",
87
+ "axe-playwright": "^1.2.3",
88
+ "axios": "^1.6.8",
89
+ "eslint": "^8.38.0",
90
+ "eslint-plugin-react-hooks": "^4.6.0",
91
+ "eslint-plugin-react-refresh": "^0.3.4",
92
+ "eslint-plugin-storybook": "^0.6.15",
93
+ "postcss": "^8.4.24",
94
+ "prop-types": "^15.8.1",
95
+ "rollup-plugin-typescript2": "^0.35.0",
96
+ "storybook": "^7.6.9",
97
+ "storybook-addon-themes": "^6.1.0",
98
+ "tailwind-scrollbar": "^3.1.0",
99
+ "tailwindcss": "^3.3.2",
100
+ "typescript": "^5.0.2",
101
+ "typescript-plugin-css-modules": "^5.0.1",
102
+ "vite": "^4.3.9",
103
+ "vite-plugin-dts": "^3.1.1",
104
+ "vite-tsconfig-paths": "^4.2.0"
105
+ },
106
+ "peerDependencies": {
107
+ "@emotion/react": "^11.*",
108
+ "@emotion/styled": "^11.*",
109
+ "@mui/material": "^5.*",
110
+ "immer": "^9.*",
111
+ "react": "^18.*",
112
+ "react-dom": "^18.*"
113
+ },
114
+ "resolutions": {
115
+ "@types/node": "18.0.3",
116
+ "node": "18.17.0"
117
+ },
118
+ "exports": {
119
+ ".": {
120
+ "import": "./dist/asma-core-ui.es.js"
121
+ },
122
+ "./dist/style.css": "./dist/style.css",
123
+ "./tw-configs/twConfigs.json": "./tw-configs/twConfigs.json"
124
+ }
125
+ }
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledIcons: React.FC<{
3
- height?: number;
4
- width?: number;
5
- }>;
@@ -1,18 +0,0 @@
1
- import { type StyledTableProps, type TableState } from './types';
2
- import { TableBody } from './components/TableBody';
3
- import type { ColumnSizingState } from './types';
4
- /**
5
- *
6
- * Custom props:
7
- * @param size: Column sizing. use NaN (width 100%) - only one time for the main column. It will make the column very responsive.. Example is in Storybook.
8
- *
9
- * @param focusable: Used for controlling the focus of rows. If set to true, the tabIndex={0} attribute will be added to each table row. Used, for example, when adding a new item to scroll to it and focus it
10
- *
11
- */
12
- export declare const StyledTable: <TData extends {
13
- id: string | number;
14
- }, TCustomData = Record<string, unknown>>(props: StyledTableProps<TData, TCustomData> & {
15
- getColumnSizing?: ((column_sizing: ColumnSizingState) => void) | undefined;
16
- getTableState?: ((tableState: TableState) => void) | undefined;
17
- }) => JSX.Element;
18
- export declare const MemoizedTableBody: typeof TableBody;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Table } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
4
- export declare function TableBody<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ table, styledTableProps }: {
7
- table: Table<TData>;
8
- styledTableProps: StyledTableProps<TData, TCustomData>;
9
- }): JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Table } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
4
- export declare function TableFooter<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ table, styledTableProps }: {
7
- table: Table<TData>;
8
- styledTableProps: StyledTableProps<TData, TCustomData>;
9
- }): JSX.Element | null;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Table } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
4
- export declare function TableHeader<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ table, styledTableProps, tableCanResize, }: {
7
- table: Table<TData>;
8
- styledTableProps: StyledTableProps<TData, TCustomData>;
9
- tableCanResize: boolean;
10
- }): JSX.Element | null;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Header } from '@tanstack/react-table';
3
- import { type StyledTableProps } from '../types';
4
- export declare function TableHeaderCell<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ styledTableProps, header, tableCanResize, }: {
7
- styledTableProps: StyledTableProps<TData, TCustomData>;
8
- header: Header<TData, unknown>;
9
- tableCanResize: boolean;
10
- }): JSX.Element;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TableNoRowsOverlay: React.FC<{
3
- colSpan: number;
4
- noRowsOverlay?: React.ReactNode;
5
- }>;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Table } from '@tanstack/react-table';
3
- export declare function TablePagination<TData>({ table, locale }: {
4
- locale: 'en' | 'no';
5
- table: Table<TData>;
6
- }): JSX.Element | null;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Row } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
4
- export declare function TableRow<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ styledTableProps, row, index, }: {
7
- styledTableProps: StyledTableProps<TData, TCustomData>;
8
- row: Row<TData>;
9
- index: number;
10
- }): JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Table } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
4
- export declare function TableRows<TData extends {
5
- id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ styledTableProps, table }: {
7
- styledTableProps: StyledTableProps<TData, TCustomData>;
8
- table: Table<TData>;
9
- }): JSX.Element;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TableSkeleton: React.FC<{
3
- colSpan: number;
4
- }>;
@@ -1,21 +0,0 @@
1
- import { type CellContext, type HeaderContext, type Row } from '@tanstack/react-table';
2
- import type { ReactNode } from 'react';
3
- export declare function generateActionsColumn<TData>(options: {
4
- headerPin: boolean;
5
- actions?: (row: Row<TData>) => {
6
- label: ReactNode;
7
- className?: string;
8
- disabled?: boolean;
9
- hide?: boolean;
10
- onClick?: (row: Row<TData>) => void;
11
- }[];
12
- customActionsNode?: (row: CellContext<TData, TData>) => ReactNode;
13
- }): {
14
- id: string;
15
- enableHiding: boolean;
16
- enableSorting: boolean;
17
- accessorFn: (row: TData) => TData;
18
- header: (props: HeaderContext<TData, TData>) => JSX.Element | null;
19
- cell: (cell: CellContext<TData, TData>) => JSX.Element | null;
20
- size: number;
21
- };
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { HeaderContext } from '@tanstack/react-table';
3
- export declare function HeaderActionMenu<TData>({ headerData }: {
4
- headerData: HeaderContext<TData, TData>;
5
- }): JSX.Element;
@@ -1,12 +0,0 @@
1
- import type { CellContext, Row } from '@tanstack/react-table';
2
- import type { ReactNode } from 'react';
3
- export declare function RowActionMenu<TData>({ tableData, actions, }: {
4
- tableData: CellContext<TData, TData>;
5
- actions: (row: Row<TData>) => {
6
- label: ReactNode;
7
- className?: string;
8
- disabled?: boolean;
9
- hide?: boolean;
10
- onClick?: (row: Row<TData>) => void;
11
- }[];
12
- }): JSX.Element;
@@ -1,11 +0,0 @@
1
- import { type CellContext } from '@tanstack/react-table';
2
- export declare function generateExpandColumn<TData>(): {
3
- id: string;
4
- minSize: number;
5
- maxSize: number;
6
- size: number;
7
- enableHiding: boolean;
8
- enableSorting: boolean;
9
- header: () => null;
10
- cell: ({ cell }: CellContext<TData, TData>) => JSX.Element | null;
11
- };
@@ -1,9 +0,0 @@
1
- import type { CellContext, HeaderContext } from '@tanstack/react-table';
2
- export declare function selectColumn<TData>(): {
3
- id: string;
4
- minSize: number;
5
- maxSize: number;
6
- size: number;
7
- header: ({ table }: HeaderContext<TData, TData>) => JSX.Element;
8
- cell: ({ cell }: CellContext<TData, TData>) => JSX.Element;
9
- };
@@ -1,10 +0,0 @@
1
- import type { Header } from '@tanstack/react-table';
2
- export declare const getTableHeaderStyle: <TData>(props: {
3
- enableResizing: boolean;
4
- header: Header<TData, unknown>;
5
- element: HTMLTableCellElement | null;
6
- }) => {
7
- width: string | number | undefined;
8
- maxWidth: string | number | undefined;
9
- minWidth: string | number | undefined;
10
- };
@@ -1,4 +0,0 @@
1
- import { type StyledTableProps } from '../types';
2
- export declare const injectColumns: <TData extends {
3
- id: string | number;
4
- }, TCustomData = Record<string, unknown>>(props: StyledTableProps<TData, TCustomData>) => void;
@@ -1,6 +0,0 @@
1
- import { type StyledTableProps } from '../types';
2
- export declare const useStyledTable: <TData extends {
3
- id: string | number;
4
- }, TCustomData = Record<string, unknown>>(props: StyledTableProps<TData, TCustomData>) => {
5
- table: import("@tanstack/react-table").Table<TData>;
6
- };
@@ -1,3 +0,0 @@
1
- export * from './types';
2
- export * from './StyledTable';
3
- export { createColumnHelper, type Table, type Row, type ColumnDef } from '@tanstack/react-table';
@@ -1,6 +0,0 @@
1
- import type { Row } from '@tanstack/react-table';
2
- import type { ITemplate } from '../../service/types';
3
- export declare const generateActions: (row: Row<ITemplate>) => {
4
- label: string;
5
- onClick: () => void;
6
- }[];
@@ -1,5 +0,0 @@
1
- import type { ColumnDef } from '@tanstack/react-table';
2
- import type { ITemplate } from '../../service/types';
3
- export declare const useColumns: () => {
4
- columns: ColumnDef<ITemplate, ITemplate>[];
5
- };
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Participant } from '../../helpers/makeData';
3
- export declare const RenderSubRows: React.FC<{
4
- subRows: Participant[];
5
- }>;
@@ -1,23 +0,0 @@
1
- import type { Person } from '../../helpers/makeData';
2
- import type { Row } from '@tanstack/react-table';
3
- export declare function getRowActions(row: Row<Person>): ({
4
- label: string;
5
- hide: boolean;
6
- onClick: () => void;
7
- className?: undefined;
8
- } | {
9
- label: string;
10
- onClick: () => void;
11
- hide?: undefined;
12
- className?: undefined;
13
- } | {
14
- label: string;
15
- className: string;
16
- onClick: () => void;
17
- hide?: undefined;
18
- } | {
19
- label: string;
20
- hide: boolean;
21
- className: string;
22
- onClick: () => void;
23
- })[];
@@ -1,10 +0,0 @@
1
- import type { Person } from '../../helpers/makeData';
2
- import type { ColumnDef } from '@tanstack/react-table';
3
- /**
4
- * Custom props:
5
- * @param size. use NaN (width 100%) only one time for the main column. It will make the column very responsive
6
- *
7
- */
8
- export declare const useStyledTableColumns: () => {
9
- columns: ColumnDef<Person, Person>[];
10
- };
@@ -1,5 +0,0 @@
1
- import type { Participant } from '../../helpers/makeData';
2
- import type { ColumnDef } from '@tanstack/react-table';
3
- export declare const useTableSubRowsColumns: () => {
4
- columns: ColumnDef<Participant, Participant>[];
5
- };
@@ -1,5 +0,0 @@
1
- export declare const TemplatesQueryString: () => string;
2
- export declare const TemplatesQuery: {
3
- query: string;
4
- variables: {};
5
- };
@@ -1,9 +0,0 @@
1
- export type ITemplate = {
2
- id: string;
3
- context: string;
4
- archived: string;
5
- title: string;
6
- template_uuid: string;
7
- valid_days: string;
8
- updated_at: string;
9
- };
@@ -1,4 +0,0 @@
1
- import type { ITemplate } from './types';
2
- export declare const useFetchTemplates: () => {
3
- data: ITemplate[];
4
- };
@@ -1,65 +0,0 @@
1
- import type { CellContext, ColumnMeta, HeaderContext, Row, TableOptions, Table } from '@tanstack/react-table';
2
- import type { AccessorFn, ColumnDefTemplate } from '@tanstack/react-table';
3
- import type { ColumnPinningColumnDef, ColumnSizingColumnDef, FiltersColumnDef, GroupingColumnDef, RowData, SortingColumnDef, VisibilityColumnDef } from '@tanstack/react-table';
4
- import type { MouseEvent, ReactElement, ReactNode } from 'react';
5
- declare module '@tanstack/react-table' {
6
- interface ColumnDefExtensions<TData extends RowData, TValue = unknown> extends VisibilityColumnDef, ColumnPinningColumnDef, FiltersColumnDef<TData>, SortingColumnDef<TData>, GroupingColumnDef<TData, TValue>, ColumnSizingColumnDef {
7
- className?: string;
8
- cellAlign?: 'left' | 'center' | 'right';
9
- headerAlign?: 'left' | 'center' | 'right';
10
- }
11
- interface ColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefExtensions<TData, TValue> {
12
- getUniqueValues?: AccessorFn<TData, unknown[]>;
13
- footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
14
- cell?: ColumnDefTemplate<CellContext<TData, TValue>>;
15
- meta?: ColumnMeta<TData, TValue>;
16
- }
17
- }
18
- export interface IAction<TData> {
19
- label: ReactNode;
20
- className?: string;
21
- disabled?: boolean;
22
- hide?: boolean;
23
- onClick?: (row: Row<TData>) => void;
24
- }
25
- type IFooter<TData> = {
26
- footer?: (table: Table<TData>) => ReactNode;
27
- hideFooter?: never;
28
- };
29
- type IHideFooter = {
30
- footer?: never;
31
- hideFooter?: boolean;
32
- };
33
- type TFooter<TData> = IFooter<TData> | IHideFooter;
34
- type TTableOptions<TData> = TableOptions<TData>;
35
- export type * from '@tanstack/react-table';
36
- export type StyledTableProps<TData, TCustomData> = {
37
- locale?: 'no' | 'en';
38
- height?: string | number;
39
- actions?: (row: Row<TData>) => IAction<TData>[];
40
- customActionsNode?: (row: CellContext<TData, TData>) => ReactNode;
41
- customSubRowData?: Map<string, TCustomData[]>;
42
- headerPin?: boolean;
43
- expandArrow?: boolean;
44
- loading?: boolean;
45
- noRowsOverlay?: ReactElement;
46
- tableInstanceRef?: React.MutableRefObject<Table<TData> | null>;
47
- className?: string;
48
- rowHeight?: number;
49
- tdClassName?: string;
50
- focusable?: boolean;
51
- stickyHeader?: boolean;
52
- getRowClassName?: (row: Row<TData>) => string;
53
- onRowClick?: (e: MouseEvent<HTMLTableRowElement, globalThis.MouseEvent>, row: Row<TData>) => void;
54
- renderSubRows?: (props: {
55
- rows: TCustomData[];
56
- row: TData;
57
- }) => ReactElement | null;
58
- getRowSelectionIds?: (ids: string[]) => void;
59
- hideHeader?: boolean;
60
- pageSize?: number;
61
- enableResizing?: boolean;
62
- } & Omit<TTableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> & TFooter<TData>;
63
- export declare const SELECT_COLUMN_ID = "select";
64
- export declare const EXPAND_COLUMN_ID = "expand-column-id";
65
- export declare const ACTIONS_COLUMN_ID = "actions";