@m4l/graphics 0.0.7 → 0.0.10

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.
@@ -2,7 +2,7 @@ import { MenuAction } from '@mui_extended/MenuActions/types';
2
2
  import { ReactNode } from 'react';
3
3
  import { Column } from 'react-data-grid';
4
4
  import { Maybe } from '@m4l/core';
5
- import { Key, RowHeights, RowHeightVariants } from '../../types';
5
+ import { RowKey, RowHeights, RowHeightVariants } from '../../types';
6
6
  export interface IConfigColumn {
7
7
  key: string;
8
8
  visible: boolean;
@@ -16,7 +16,7 @@ export interface IConfigColumn {
16
16
  }
17
17
  export interface IGridConfig {
18
18
  columnsConfig: IConfigColumn[];
19
- columnsWidths: Map<string, Maybe<Key>>;
19
+ columnsWidths: Map<string, Maybe<RowKey>>;
20
20
  }
21
21
  export declare type BaseProviderProps<TRow, TSummaryRow> = {
22
22
  id: number | string;
@@ -1,11 +1,11 @@
1
- import { Key } from '../../types';
1
+ import { RowKey } from '../../types';
2
2
  export interface FilterContextProps {
3
3
  activeFilters: boolean;
4
- filters?: Map<Key, string>;
4
+ filters?: Map<RowKey, string>;
5
5
  onChangeFilter?: (key: string, value: string) => void;
6
6
  setActiveFilters: (active: boolean) => void;
7
7
  }
8
8
  export interface IFilterState {
9
9
  activeFilters: boolean;
10
- filters?: Map<Key, string>;
10
+ filters?: Map<RowKey, string>;
11
11
  }
@@ -4,7 +4,7 @@ import { Column } from 'react-data-grid';
4
4
  import { ActionsProps } from './components/Actions/types';
5
5
  export declare type ColumnType = 'text' | 'date' | 'number' | 'boolean' | 'custom';
6
6
  export declare type ColumnAlign = 'left' | 'center' | 'right';
7
- export interface GridRow {
7
+ export declare interface GridRow {
8
8
  id: number;
9
9
  }
10
10
  export declare type SortDirection = 'ASC' | 'DESC';
@@ -24,11 +24,11 @@ declare module 'react-data-grid' {
24
24
  withinHeaderRenderer?: React.FunctionComponent<HeaderRendererProps<TRow, TSummaryRow>>;
25
25
  }
26
26
  }
27
- export declare type Key = string | number;
28
- export interface WithActionsProps {
27
+ export declare type RowKey = string | number;
28
+ export declare interface WithActionsProps {
29
29
  withActions?: boolean;
30
30
  }
31
- export interface PagerState {
31
+ export declare interface PagerState {
32
32
  page: number;
33
33
  rowsPerPage: number;
34
34
  totalRecords: number;
@@ -36,8 +36,8 @@ export interface PagerState {
36
36
  export declare const initialPagerState: PagerState;
37
37
  export declare type RowHeightVariants = 'standard' | 'compact' | 'confortable';
38
38
  export declare type RowHeights = number | number[];
39
- export interface GridProps<TRow, TSummaryRow> {
40
- id: Key;
39
+ export declare interface GridProps<TRow, TSummaryRow> {
40
+ id: RowKey;
41
41
  isSkeleton?: boolean;
42
42
  withActions?: boolean;
43
43
  columns: readonly Column<TRow, TSummaryRow>[];
@@ -46,11 +46,11 @@ export interface GridProps<TRow, TSummaryRow> {
46
46
  rowHeaderHeights?: RowHeights;
47
47
  rowHeights?: RowHeights;
48
48
  rowActionsGetter?: (row: TRow) => MenuAction[];
49
- rowKeyGetter: (row: TRow) => Key;
49
+ rowKeyGetter: (row: TRow) => RowKey;
50
50
  isMultipleSelect?: boolean;
51
- selectedRows?: Set<Key>;
52
- onRowsSelectedChange?: (mapRowsSelected: ReadonlySet<Key>, rawRowsSelected: TRow[]) => void;
51
+ selectedRows?: Set<RowKey>;
52
+ onRowsSelectedChange?: (mapRowsSelected: ReadonlySet<RowKey>, rawRowsSelected: TRow[]) => void;
53
53
  }
54
- export interface DataGridProps<TRow, TSummaryRow> extends GridProps<TRow, TSummaryRow> {
54
+ export declare interface DataGridProps<TRow, TSummaryRow> extends GridProps<TRow, TSummaryRow> {
55
55
  actionsProps: ActionsProps;
56
56
  }
@@ -9,3 +9,5 @@ export type { GridPaletteOptions } from './theme/palette';
9
9
  export { defaultThemeOptions } from './theme/defaultThemeOptions';
10
10
  export { default as fnComponentsOverrides } from './theme/overrides';
11
11
  export type { HostThemeType } from './types';
12
+ export type { ModuleAction } from './layouts/ModuleLayout/types';
13
+ export type { RowKey } from './components/DataGrid/types';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/graphics",
3
3
  "private": false,
4
- "version": "0.0.7",
4
+ "version": "0.0.10",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {
@@ -15,6 +15,7 @@
15
15
  "format": "npm run prettier:fix && npm run lint:fix"
16
16
  },
17
17
  "dependencies": {
18
+ "@mui/material": "^5.8.6",
18
19
  "framer-motion": "^6.3.11",
19
20
  "nprogress": "^0.2.0",
20
21
  "react": ">=18",
@@ -28,6 +29,7 @@
28
29
  "react-hook-form": "^7.31.3",
29
30
  "react-intersection-observer": "^9.2.2",
30
31
  "react-lazy-load-image-component": "^1.5.4",
32
+ "react-resizable": "^3.0.4",
31
33
  "react-router-dom": "^6.3.0",
32
34
  "react-splitter-layout": "^4.0.0",
33
35
  "simplebar-react": "^2.4.1",
@@ -39,7 +41,6 @@
39
41
  "@m4l/core": "^0.0.8",
40
42
  "@mui/icons-material": "^5.8.4",
41
43
  "@mui/lab": "^5.0.0-alpha.87",
42
- "@mui/material": "^5.8.5",
43
44
  "@types/lodash": "^4.14.182",
44
45
  "@types/node": "^17.0.40",
45
46
  "@types/nprogress": "^0.2.0",
@@ -71,6 +72,7 @@
71
72
  "vite-plugin-mkcert": "^1.6.4"
72
73
  },
73
74
  "peerDependencies": {
75
+ "@m4l/core": "^0.0.8",
74
76
  "react": ">=18",
75
77
  "react-dom": "^18.0.0"
76
78
  },