@m4l/graphics 0.0.6 → 0.0.9

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
  }
@@ -1,6 +1,6 @@
1
1
  import { LinkProps as MuiLinkProps } from '@mui/material';
2
2
  import { To } from 'history';
3
- import { SkeletonProps } from '~/lib/@types';
3
+ import { SkeletonProps } from '~/lib/types';
4
4
  export interface LinkWithRouteProps extends MuiLinkProps {
5
5
  to: To;
6
6
  skeletonProps: SkeletonProps;
@@ -1,5 +1,5 @@
1
1
  import { TypographyProps as MUITypographyProps } from '@mui/material';
2
- import { SkeletonProps } from '~/lib/@types';
2
+ import { SkeletonProps } from '~/lib/types';
3
3
  export interface TypographyProps extends MUITypographyProps {
4
4
  skeletonProps?: SkeletonProps;
5
5
  }
@@ -8,4 +8,6 @@ export type { ChartPaletteOptions } from './theme/palette';
8
8
  export type { GridPaletteOptions } from './theme/palette';
9
9
  export { defaultThemeOptions } from './theme/defaultThemeOptions';
10
10
  export { default as fnComponentsOverrides } from './theme/overrides';
11
- export type { HostThemeType } from '../lib/contexts/HostThemeContext/types';
11
+ export type { HostThemeType } from './types';
12
+ export type { ModuleAction } from './layouts/ModuleLayout/types';
13
+ export type { RowKey } from './components/DataGrid/types';
@@ -4,3 +4,4 @@ export interface SkeletonProps {
4
4
  height?: string | number;
5
5
  }
6
6
  export declare type ThemeColorPresets = 'default' | 'purple' | 'cyan' | 'blue' | 'orange' | 'red';
7
+ export type { HostThemeType } from '../contexts/HostThemeContext/types';
@@ -1,4 +1,4 @@
1
- import { ThemeColorPresets } from '../@types';
1
+ import { ThemeColorPresets } from '../types';
2
2
  export declare const colorPresets: ({
3
3
  LightSelected: string;
4
4
  LightSelectedHover: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/graphics",
3
3
  "private": false,
4
- "version": "0.0.6",
4
+ "version": "0.0.9",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {
@@ -72,7 +72,8 @@
72
72
  },
73
73
  "peerDependencies": {
74
74
  "react": ">=18",
75
- "react-dom": "^18.0.0"
75
+ "react-dom": "^18.0.0",
76
+ "@m4l/core": "^0.0.8"
76
77
  },
77
78
  "files": [
78
79
  "dist"