proje-react-panel 1.5.0 → 1.6.0

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,6 +1,9 @@
1
1
  import React from 'react';
2
+ import { AnyClass } from '../../../types/AnyClass';
3
+ import { CellConfiguration } from '../../../decorators/list/Cell';
2
4
  interface BooleanCellProps {
3
- value: boolean;
5
+ item: AnyClass;
6
+ configuration: CellConfiguration;
4
7
  }
5
- export declare function BooleanCell({ value }: BooleanCellProps): React.JSX.Element;
8
+ export declare function BooleanCell({ item, configuration }: BooleanCellProps): React.JSX.Element;
6
9
  export {};
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import { AnyClass } from '../../../types/AnyClass';
3
+ import { CellConfiguration } from '../../../decorators/list/Cell';
2
4
  interface DateCellProps {
3
- value: string | number | Date;
5
+ item: AnyClass;
6
+ configuration: CellConfiguration;
4
7
  }
5
- export declare function DateCell({ value }: DateCellProps): React.JSX.Element;
8
+ export declare function DateCell({ item, configuration }: DateCellProps): React.JSX.Element;
6
9
  export {};
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { CellConfiguration } from '../../../decorators/list/Cell';
3
+ import { AnyClass } from '../../../types/AnyClass';
3
4
  interface DefaultCellProps {
4
- value: any;
5
+ item: AnyClass;
5
6
  configuration: CellConfiguration;
6
7
  }
7
- export declare function DefaultCell({ value, configuration }: DefaultCellProps): React.ReactElement;
8
+ export declare function DefaultCell({ item, configuration }: DefaultCellProps): React.ReactElement;
8
9
  export {};
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { CellConfiguration } from '../../../decorators/list/Cell';
3
+ import { AnyClass } from '../../../types/AnyClass';
3
4
  interface DownloadCellProps {
4
- value: string;
5
+ item: AnyClass;
5
6
  configuration: CellConfiguration;
6
7
  }
7
- export declare function DownloadCell({ value, configuration }: DownloadCellProps): React.ReactElement;
8
+ export declare function DownloadCell({ item, configuration }: DownloadCellProps): React.ReactElement;
8
9
  export {};
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { CellConfiguration } from '../../../decorators/list/Cell';
3
+ import { AnyClass } from '../../../types/AnyClass';
3
4
  interface ImageCellProps {
4
- value: string;
5
+ item: AnyClass;
5
6
  configuration: CellConfiguration;
6
7
  }
7
- export declare function ImageCell({ value, configuration }: ImageCellProps): React.JSX.Element;
8
+ export declare function ImageCell({ item, configuration }: ImageCellProps): React.JSX.Element;
8
9
  export {};
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import { AnyClass } from '../../../types/AnyClass';
3
+ import { CellConfiguration } from '../../../decorators/list/Cell';
2
4
  interface UUIDCellProps {
3
- value: string;
5
+ item: AnyClass;
6
+ configuration: CellConfiguration;
4
7
  }
5
- export declare function UUIDCell({ value }: UUIDCellProps): React.JSX.Element;
8
+ export declare function UUIDCell({ item, configuration }: UUIDCellProps): React.JSX.Element;
6
9
  export {};
@@ -20,6 +20,10 @@ export interface CellOptions {
20
20
  type?: CellTypes;
21
21
  placeHolder?: string;
22
22
  filter?: Filter | StaticSelectFilter;
23
+ style?: {
24
+ minWidth?: string;
25
+ width?: string;
26
+ };
23
27
  }
24
28
  export interface CellConfiguration extends Omit<CellOptions, 'type'> {
25
29
  name: string;
@@ -19,7 +19,12 @@ export interface ListHeaderOptions {
19
19
  label: string;
20
20
  };
21
21
  }
22
- export interface ListCellOptions<T> {
22
+ export interface ListActionOptions<T> {
23
+ customActions?: {
24
+ label: string;
25
+ onClick: (item: T) => void;
26
+ icon?: string;
27
+ }[];
23
28
  details?: {
24
29
  path: string;
25
30
  label: string;
@@ -36,7 +41,7 @@ export interface ListCellOptions<T> {
36
41
  export interface ListOptions<T> {
37
42
  getData: GetDataForList<T>;
38
43
  headers?: ListHeaderOptions;
39
- cells?: ((item: T) => ListCellOptions<T>) | ListCellOptions<T>;
44
+ actions?: ((item: T) => ListActionOptions<T>) | ListActionOptions<T>;
40
45
  primaryId?: string;
41
46
  key?: string;
42
47
  }