@devtable/dashboard 6.19.0 → 6.20.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.
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IColumnConf, ITableConf } from '../../type';
5
+ interface IColumnField {
6
+ control: Control<ITableConf, $TSFixMe>;
7
+ watch: UseFormWatch<ITableConf>;
8
+ index: number;
9
+ remove: UseFieldArrayRemove;
10
+ column: IColumnConf;
11
+ data: AnyObject[];
12
+ }
13
+ export declare const ColumnField: ({ control, index, watch, remove, column, data }: IColumnField) => JSX.Element;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IFuncContentEditor {
3
+ value: string;
4
+ onChange: (v: string) => void;
5
+ }
6
+ export declare const FuncContentEditor: import("react").ForwardRefExoticComponent<IFuncContentEditor & import("react").RefAttributes<unknown>>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { ITableConf } from '../../type';
5
+ interface IColumnsField {
6
+ control: Control<ITableConf, $TSFixMe>;
7
+ watch: UseFormWatch<ITableConf>;
8
+ data: AnyObject[];
9
+ }
10
+ export declare const ColumnsField: ({ control, watch, data }: IColumnsField) => JSX.Element;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ITableConf } from '../type';
4
+ interface IStylingFields {
5
+ control: Control<ITableConf, $TSFixMe>;
6
+ watch: UseFormWatch<ITableConf>;
7
+ data: $TSFixMe[];
8
+ }
9
+ export declare function StylingFields({ control, watch, data }: IStylingFields): JSX.Element;
10
+ export {};
@@ -3,14 +3,17 @@ export declare enum ValueType {
3
3
  string = "string",
4
4
  number = "number",
5
5
  eloc = "eloc",
6
- percentage = "percentage"
6
+ percentage = "percentage",
7
+ custom = "custom"
7
8
  }
8
9
  export declare type CellBackgroundColorType = string | IColorInterpolationConfig;
9
10
  export interface IColumnConf {
11
+ id: string;
10
12
  label: string;
11
13
  value_field: string;
12
14
  value_type: ValueType;
13
15
  cellBackgroundColor?: CellBackgroundColorType;
16
+ func_content?: string;
14
17
  }
15
18
  export interface ITableConf {
16
19
  id_field: string;
@@ -22,6 +25,7 @@ export interface ITableConf {
22
25
  striped: boolean;
23
26
  highlightOnHover: boolean;
24
27
  }
28
+ export declare const DEFAULT_CELL_FUNC_CONTENT: string;
25
29
  export declare const DEFAULT_CONFIG: ITableConf;
26
30
  export interface ITableCellContext {
27
31
  getClickHandler(): (() => void) | undefined;
@@ -4,6 +4,7 @@ interface ICellValue {
4
4
  value: $TSFixMe;
5
5
  type: ValueType;
6
6
  tableCellContext: ITableCellContext;
7
+ func_content?: string;
7
8
  }
8
9
  export declare function CellValue(props: ICellValue): JSX.Element;
9
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "6.19.0",
3
+ "version": "6.20.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",