@thefreshop/tb 1.0.24 → 1.0.25

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,6 @@
1
- import type { AnyObject } from 'antd/es/_util/type';
2
- import type { ExpandableConfig, GetRowKey, TablePaginationConfig, TableRowSelection } from 'antd/es/table/interface';
3
- import type { ColumnGroupType, ColumnType, TableProps } from 'antd/es/table';
1
+ import type { AnyObject } from "antd/es/_util/type";
2
+ import type { ExpandableConfig, GetRowKey, TablePaginationConfig, TableRowSelection } from "antd/es/table/interface";
3
+ import type { ColumnGroupType, ColumnType, TableProps } from "antd/es/table";
4
4
  export interface AntBaseTableRefProps<ItemType> {
5
5
  resetSelection: () => void;
6
6
  reSelection: () => void;
@@ -19,7 +19,7 @@ export type antBasePropsType<T = AnyObject, K = string | GetRowKey<T>> = {
19
19
  customValue?: (data: any) => any;
20
20
  columns: antBaseColumnType[];
21
21
  expandable?: ExpandableConfig<AnyObject>;
22
- size?: 'large' | 'middle' | 'small';
22
+ size?: "large" | "middle" | "small";
23
23
  onClick?: (record: T, index?: number) => void;
24
24
  onDoubleClick?: (record: T, index?: number) => void;
25
25
  selectProps?: selectType<T>;
@@ -39,11 +39,11 @@ export type antBasePropsType<T = AnyObject, K = string | GetRowKey<T>> = {
39
39
  upProps?: btnReturnTType<T>;
40
40
  downProps?: btnReturnTType<T>;
41
41
  pageProps?: TablePaginationConfig | false;
42
- scroll?: TableProps<AnyObject>['scroll'];
42
+ scroll?: TableProps<AnyObject>["scroll"];
43
43
  onRefresh?: () => void;
44
44
  isCounter?: boolean;
45
45
  autoRefreshTime?: number;
46
- createModalWidth?: React.CSSProperties['width'];
46
+ createModalWidth?: React.CSSProperties["width"];
47
47
  onCreateClose?: () => void;
48
48
  };
49
49
  export type antBaseColumnType = {
@@ -52,9 +52,9 @@ export type antBaseColumnType = {
52
52
  };
53
53
  formatProps?: {
54
54
  hidden?: boolean;
55
- type: 'tag' | 'json_tags' | 'tagarr' | 'switch' | 'price' | 'length' | 'tel' | 'file' | 'files' | 'copy' | 'email' | 'image' | 'images' | 'addcount' | 'tostring' | 'jsonarr' | 'arr' | 'sleeptime' | 'sleeptimes' | 'compute' | 'answer' | 'number' | 'select' | 'DateTime' | 'imageCrop' | 'password' | 'code' | 'textEditer' | 'string' | 'custom' | 'remainingtime';
55
+ type: "tag" | "json_tags" | "tagarr" | "switch" | "price" | "length" | "tel" | "file" | "files" | "copy" | "email" | "image" | "images" | "addcount" | "tostring" | "jsonarr" | "arr" | "sleeptime" | "sleeptimes" | "compute" | "answer" | "number" | "select" | "DateTime" | "imageCrop" | "password" | "code" | "textEditer" | "string" | "custom" | "remainingtime";
56
56
  formatter?: {
57
- text: 'default' | string | undefined | null;
57
+ text: "default" | string | undefined | null;
58
58
  asText: string;
59
59
  color: string;
60
60
  }[];
@@ -68,8 +68,8 @@ export type antBaseColumnType = {
68
68
  title: any;
69
69
  onChange: (data: any) => void;
70
70
  }) => any;
71
- image_width?: React.CSSProperties['width'];
72
- image_height?: React.CSSProperties['height'];
71
+ image_width?: React.CSSProperties["width"];
72
+ image_height?: React.CSSProperties["height"];
73
73
  imagesId?: string;
74
74
  };
75
75
  sort?: boolean;
@@ -80,7 +80,7 @@ export type antBaseColumnType = {
80
80
  countIndex?: string;
81
81
  tooltip?: any;
82
82
  placeholder?: any;
83
- defaultValue?: any;
83
+ initialValues?: any;
84
84
  rules?: any[];
85
85
  };
86
86
  export type btnReturnTType<T> = {
@@ -105,8 +105,8 @@ export type customBtnReturnFType = {
105
105
  rightRender?: () => React.ReactNode;
106
106
  };
107
107
  export type selectType<T> = {
108
- type: 'radio' | 'checkbox';
108
+ type: "radio" | "checkbox";
109
109
  onFun?: (key: T | React.Key[]) => void;
110
- checkboxProps?: TableRowSelection<AnyObject>['getCheckboxProps'];
110
+ checkboxProps?: TableRowSelection<AnyObject>["getCheckboxProps"];
111
111
  onUpdateData?: (data?: T) => void;
112
112
  };
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ type antBasePropsType<T = AnyObject$1, K = string | GetRowKey<T>> = {
20
20
  customValue?: (data: any) => any;
21
21
  columns: antBaseColumnType[];
22
22
  expandable?: ExpandableConfig<AnyObject$1>;
23
- size?: 'large' | 'middle' | 'small';
23
+ size?: "large" | "middle" | "small";
24
24
  onClick?: (record: T, index?: number) => void;
25
25
  onDoubleClick?: (record: T, index?: number) => void;
26
26
  selectProps?: selectType<T>;
@@ -40,11 +40,11 @@ type antBasePropsType<T = AnyObject$1, K = string | GetRowKey<T>> = {
40
40
  upProps?: btnReturnTType<T>;
41
41
  downProps?: btnReturnTType<T>;
42
42
  pageProps?: TablePaginationConfig | false;
43
- scroll?: TableProps<AnyObject$1>['scroll'];
43
+ scroll?: TableProps<AnyObject$1>["scroll"];
44
44
  onRefresh?: () => void;
45
45
  isCounter?: boolean;
46
46
  autoRefreshTime?: number;
47
- createModalWidth?: React.CSSProperties['width'];
47
+ createModalWidth?: React.CSSProperties["width"];
48
48
  onCreateClose?: () => void;
49
49
  };
50
50
  type antBaseColumnType = {
@@ -53,9 +53,9 @@ type antBaseColumnType = {
53
53
  };
54
54
  formatProps?: {
55
55
  hidden?: boolean;
56
- type: 'tag' | 'json_tags' | 'tagarr' | 'switch' | 'price' | 'length' | 'tel' | 'file' | 'files' | 'copy' | 'email' | 'image' | 'images' | 'addcount' | 'tostring' | 'jsonarr' | 'arr' | 'sleeptime' | 'sleeptimes' | 'compute' | 'answer' | 'number' | 'select' | 'DateTime' | 'imageCrop' | 'password' | 'code' | 'textEditer' | 'string' | 'custom' | 'remainingtime';
56
+ type: "tag" | "json_tags" | "tagarr" | "switch" | "price" | "length" | "tel" | "file" | "files" | "copy" | "email" | "image" | "images" | "addcount" | "tostring" | "jsonarr" | "arr" | "sleeptime" | "sleeptimes" | "compute" | "answer" | "number" | "select" | "DateTime" | "imageCrop" | "password" | "code" | "textEditer" | "string" | "custom" | "remainingtime";
57
57
  formatter?: {
58
- text: 'default' | string | undefined | null;
58
+ text: "default" | string | undefined | null;
59
59
  asText: string;
60
60
  color: string;
61
61
  }[];
@@ -69,8 +69,8 @@ type antBaseColumnType = {
69
69
  title: any;
70
70
  onChange: (data: any) => void;
71
71
  }) => any;
72
- image_width?: React.CSSProperties['width'];
73
- image_height?: React.CSSProperties['height'];
72
+ image_width?: React.CSSProperties["width"];
73
+ image_height?: React.CSSProperties["height"];
74
74
  imagesId?: string;
75
75
  };
76
76
  sort?: boolean;
@@ -81,7 +81,7 @@ type antBaseColumnType = {
81
81
  countIndex?: string;
82
82
  tooltip?: any;
83
83
  placeholder?: any;
84
- defaultValue?: any;
84
+ initialValues?: any;
85
85
  rules?: any[];
86
86
  };
87
87
  type btnReturnTType<T> = {
@@ -106,9 +106,9 @@ type customBtnReturnFType = {
106
106
  rightRender?: () => React.ReactNode;
107
107
  };
108
108
  type selectType<T> = {
109
- type: 'radio' | 'checkbox';
109
+ type: "radio" | "checkbox";
110
110
  onFun?: (key: T | React.Key[]) => void;
111
- checkboxProps?: TableRowSelection<AnyObject$1>['getCheckboxProps'];
111
+ checkboxProps?: TableRowSelection<AnyObject$1>["getCheckboxProps"];
112
112
  onUpdateData?: (data?: T) => void;
113
113
  };
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thefreshop/tb",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "tb framework",
5
5
  "license": "MIT",
6
6
  "repository": {