es-grid-template 1.8.76 → 1.8.78

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.
@@ -29,8 +29,54 @@ export interface DensityOptions {
29
29
  onOperatorChange?: OnChangeFn<OpetorState>;
30
30
  }
31
31
  export type Key = React.Key;
32
- export type PaginationConfig = TablePaginationConfig & {
32
+ export type GridTableLocale = TableLocale & {
33
+ ok_btn?: string;
34
+ cancel_btn?: string;
35
+ add_rows?: string;
36
+ add_rows_before?: string;
37
+ add_rows_after?: string;
38
+ add_1?: string;
39
+ add_10?: string;
40
+ add_50?: string;
41
+ add_100?: string;
42
+ add_children?: string;
43
+ delete_content?: string;
44
+ delete_rows?: string;
45
+ custom?: string;
46
+ filterTitle?: string;
47
+ filterConfirm?: React.ReactNode;
48
+ filterReset?: React.ReactNode;
49
+ filterEmptyText?: React.ReactNode;
50
+ filterCheckall?: React.ReactNode;
51
+ filterSearchPlaceholder?: string;
52
+ emptyText?: React.ReactNode | (() => React.ReactNode);
53
+ selectAll?: React.ReactNode;
54
+ selectNone?: React.ReactNode;
55
+ selectInvert?: React.ReactNode;
56
+ selectionAll?: React.ReactNode;
57
+ sortTitle?: string;
58
+ expand?: string;
59
+ collapse?: string;
60
+ triggerDesc?: string;
61
+ triggerAsc?: string;
62
+ cancelSort?: string;
63
+ fullScreen?: string;
64
+ minimized?: string;
65
+ setting?: string;
66
+ groupData?: string;
67
+ textPlaceholder?: string;
68
+ selectPlaceholder?: string;
69
+ };
70
+ export type PagingLocale = PaginationLocale & {
71
+ items?: string;
72
+ };
73
+ export type Locale = {
74
+ table?: GridTableLocale;
75
+ pager?: PagingLocale;
76
+ };
77
+ export type PaginationConfig = Omit<TablePaginationConfig, 'locale'> & {
33
78
  currentPage?: number;
79
+ locale?: PagingLocale;
34
80
  };
35
81
  export type AnyObject = Record<PropertyKey, any>;
36
82
  export type IFormat = {
@@ -163,51 +209,6 @@ export type ColumnTable<RecordType = AnyObject> = {
163
209
  sumGroup?: boolean;
164
210
  onCell?: (rowData: RecordType, index: number) => React.TdHTMLAttributes<HTMLTableCellElement>;
165
211
  };
166
- export type GridTableLocale = TableLocale & {
167
- ok_btn?: string;
168
- cancel_btn?: string;
169
- add_rows?: string;
170
- add_rows_before?: string;
171
- add_rows_after?: string;
172
- add_1?: string;
173
- add_10?: string;
174
- add_50?: string;
175
- add_100?: string;
176
- add_children?: string;
177
- delete_content?: string;
178
- delete_rows?: string;
179
- custom?: string;
180
- filterTitle?: string;
181
- filterConfirm?: React.ReactNode;
182
- filterReset?: React.ReactNode;
183
- filterEmptyText?: React.ReactNode;
184
- filterCheckall?: React.ReactNode;
185
- filterSearchPlaceholder?: string;
186
- emptyText?: React.ReactNode | (() => React.ReactNode);
187
- selectAll?: React.ReactNode;
188
- selectNone?: React.ReactNode;
189
- selectInvert?: React.ReactNode;
190
- selectionAll?: React.ReactNode;
191
- sortTitle?: string;
192
- expand?: string;
193
- collapse?: string;
194
- triggerDesc?: string;
195
- triggerAsc?: string;
196
- cancelSort?: string;
197
- fullScreen?: string;
198
- minimized?: string;
199
- setting?: string;
200
- groupData?: string;
201
- textPlaceholder?: string;
202
- selectPlaceholder?: string;
203
- };
204
- export type PagingLocale = PaginationLocale & {
205
- items?: string;
206
- };
207
- export type Locale = {
208
- table?: GridTableLocale;
209
- pager?: PagingLocale;
210
- };
211
212
  export type ColumnsTable<RecordType = AnyObject> = ColumnTable<RecordType>[];
212
213
  export type TableProps<RecordType = AnyObject> = {
213
214
  id?: string;
@@ -368,7 +368,7 @@ const TableContainer = props => {
368
368
  thousandSeparator: '.'
369
369
  })} / ${numericFormatter((totalItems ?? 0).toString(), {
370
370
  thousandSeparator: '.'
371
- })} ${paginationLocal?.items || 'items'}`
371
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
372
372
  }, pagination, {
373
373
  onChange: (page, pageSize1) => {
374
374
  if (pagination.onChange) {
@@ -2084,7 +2084,7 @@ const TableContainerEdit = props => {
2084
2084
  thousandSeparator: '.'
2085
2085
  })} / ${numericFormatter((totalItems ?? 0).toString(), {
2086
2086
  thousandSeparator: '.'
2087
- })} ${paginationLocal?.items || 'items'}`
2087
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
2088
2088
  }, pagination, {
2089
2089
  onChange: (page, pageSize1) => {
2090
2090
  if (pagination.onChange) {
@@ -165,7 +165,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
165
165
  type?: IColumnType;
166
166
  haveSum?: boolean;
167
167
  isSummary?: boolean;
168
- summaryTemplate?: (data: number, key: string) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode;
168
+ summaryTemplate?: (data: number, key: string) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
169
169
  format?: IFormat | ((rowData: any) => IFormat);
170
170
  allowFiltering?: boolean;
171
171
  sorter?: boolean;
@@ -180,18 +180,18 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
180
180
  headerText?: string;
181
181
  hidden?: boolean;
182
182
  visible?: boolean;
183
- headerTooltip?: string | boolean | (() => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
183
+ headerTooltip?: string | boolean | (() => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
184
184
  columnGroupText?: string;
185
185
  align?: import("./../../grid-component/type").ITextAlign;
186
186
  textAlign?: import("./../../grid-component/type").ITextAlign;
187
187
  headerTextAlign?: import("./../../grid-component/type").ITextAlign;
188
- template?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
188
+ template?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
189
189
  showTooltip?: boolean;
190
190
  tooltipDescription?: string | ((args: {
191
191
  value: any;
192
192
  rowData: RecordType;
193
- }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
194
- headerTemplate?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode | ((column: ColumnTable<RecordType>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
193
+ }) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
194
+ headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
195
195
  commandItems?: import("./../../grid-component/type").CommandItem[];
196
196
  children?: ColumnTable<RecordType>[];
197
197
  editType?: EditType | ((rowData?: RecordType) => EditType);
@@ -211,9 +211,9 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
211
211
  ellipsis?: boolean;
212
212
  allowResizing?: boolean;
213
213
  allowSelection?: boolean | ((rowData: RecordType) => boolean);
214
- onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
215
- onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
216
- onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
214
+ onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
215
+ onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
216
+ onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
217
217
  sumGroup?: boolean;
218
218
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
219
219
  }[];
@@ -325,7 +325,7 @@ const TableContainer = props => {
325
325
  thousandSeparator: '.'
326
326
  })} / ${numericFormatter((totalItems ?? 0).toString(), {
327
327
  thousandSeparator: '.'
328
- })} ${paginationLocal?.items || 'items'}`
328
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
329
329
  }, pagination, {
330
330
  onChange: (page, pageSize1) => {
331
331
  if (pagination.onChange) {
@@ -1984,7 +1984,7 @@ const TableContainerEdit = props => {
1984
1984
  thousandSeparator: '.'
1985
1985
  })} / ${numericFormatter((totalItems ?? 0).toString(), {
1986
1986
  thousandSeparator: '.'
1987
- })} ${locale?.pager?.items || paginationLocal?.items || ''}`
1987
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
1988
1988
 
1989
1989
  // locale={locale}
1990
1990
  }, pagination, {
@@ -95,7 +95,9 @@ export const renderFilter = args => {
95
95
  format: dateRangeFormat,
96
96
  value: dateRangeValue,
97
97
  onChange: value => {
98
+ console.log('value', value);
98
99
  const newDateRangeValue = value ? [value[0] ? moment(value[0]).format() : '', value[1] ? moment(value[1]).format() : ''] : [];
100
+ console.log('newDateRangeValue', newDateRangeValue);
99
101
  setSelectedKeys(newDateRangeValue);
100
102
  },
101
103
  menuClassName: "rc-menu-popup",
@@ -275,7 +275,7 @@ const TableContainer = props => {
275
275
  thousandSeparator: '.'
276
276
  })} / ${numericFormatter((totalItems ?? 0).toString(), {
277
277
  thousandSeparator: '.'
278
- })} ${paginationLocal?.items || 'items'}`
278
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
279
279
  }, pagination, {
280
280
  onChange: (page, pageSize1) => {
281
281
  if (pagination.onChange) {
@@ -29,8 +29,54 @@ export interface DensityOptions {
29
29
  onOperatorChange?: OnChangeFn<OpetorState>;
30
30
  }
31
31
  export type Key = React.Key;
32
- export type PaginationConfig = TablePaginationConfig & {
32
+ export type GridTableLocale = TableLocale & {
33
+ ok_btn?: string;
34
+ cancel_btn?: string;
35
+ add_rows?: string;
36
+ add_rows_before?: string;
37
+ add_rows_after?: string;
38
+ add_1?: string;
39
+ add_10?: string;
40
+ add_50?: string;
41
+ add_100?: string;
42
+ add_children?: string;
43
+ delete_content?: string;
44
+ delete_rows?: string;
45
+ custom?: string;
46
+ filterTitle?: string;
47
+ filterConfirm?: React.ReactNode;
48
+ filterReset?: React.ReactNode;
49
+ filterEmptyText?: React.ReactNode;
50
+ filterCheckall?: React.ReactNode;
51
+ filterSearchPlaceholder?: string;
52
+ emptyText?: React.ReactNode | (() => React.ReactNode);
53
+ selectAll?: React.ReactNode;
54
+ selectNone?: React.ReactNode;
55
+ selectInvert?: React.ReactNode;
56
+ selectionAll?: React.ReactNode;
57
+ sortTitle?: string;
58
+ expand?: string;
59
+ collapse?: string;
60
+ triggerDesc?: string;
61
+ triggerAsc?: string;
62
+ cancelSort?: string;
63
+ fullScreen?: string;
64
+ minimized?: string;
65
+ setting?: string;
66
+ groupData?: string;
67
+ textPlaceholder?: string;
68
+ selectPlaceholder?: string;
69
+ };
70
+ export type PagingLocale = PaginationLocale & {
71
+ items?: string;
72
+ };
73
+ export type Locale = {
74
+ table?: GridTableLocale;
75
+ pager?: PagingLocale;
76
+ };
77
+ export type PaginationConfig = Omit<TablePaginationConfig, 'locale'> & {
33
78
  currentPage?: number;
79
+ locale?: PagingLocale;
34
80
  };
35
81
  export type AnyObject = Record<PropertyKey, any>;
36
82
  export type IFormat = {
@@ -163,51 +209,6 @@ export type ColumnTable<RecordType = AnyObject> = {
163
209
  sumGroup?: boolean;
164
210
  onCell?: (rowData: RecordType, index: number) => React.TdHTMLAttributes<HTMLTableCellElement>;
165
211
  };
166
- export type GridTableLocale = TableLocale & {
167
- ok_btn?: string;
168
- cancel_btn?: string;
169
- add_rows?: string;
170
- add_rows_before?: string;
171
- add_rows_after?: string;
172
- add_1?: string;
173
- add_10?: string;
174
- add_50?: string;
175
- add_100?: string;
176
- add_children?: string;
177
- delete_content?: string;
178
- delete_rows?: string;
179
- custom?: string;
180
- filterTitle?: string;
181
- filterConfirm?: React.ReactNode;
182
- filterReset?: React.ReactNode;
183
- filterEmptyText?: React.ReactNode;
184
- filterCheckall?: React.ReactNode;
185
- filterSearchPlaceholder?: string;
186
- emptyText?: React.ReactNode | (() => React.ReactNode);
187
- selectAll?: React.ReactNode;
188
- selectNone?: React.ReactNode;
189
- selectInvert?: React.ReactNode;
190
- selectionAll?: React.ReactNode;
191
- sortTitle?: string;
192
- expand?: string;
193
- collapse?: string;
194
- triggerDesc?: string;
195
- triggerAsc?: string;
196
- cancelSort?: string;
197
- fullScreen?: string;
198
- minimized?: string;
199
- setting?: string;
200
- groupData?: string;
201
- textPlaceholder?: string;
202
- selectPlaceholder?: string;
203
- };
204
- export type PagingLocale = PaginationLocale & {
205
- items?: string;
206
- };
207
- export type Locale = {
208
- table?: GridTableLocale;
209
- pager?: PagingLocale;
210
- };
211
212
  export type ColumnsTable<RecordType = AnyObject> = ColumnTable<RecordType>[];
212
213
  export type TableProps<RecordType = AnyObject> = {
213
214
  id?: string;
@@ -376,7 +376,7 @@ const TableContainer = props => {
376
376
  thousandSeparator: '.'
377
377
  })} / ${(0, _reactNumericComponent.numericFormatter)((totalItems ?? 0).toString(), {
378
378
  thousandSeparator: '.'
379
- })} ${paginationLocal?.items || 'items'}`
379
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
380
380
  }, pagination, {
381
381
  onChange: (page, pageSize1) => {
382
382
  if (pagination.onChange) {
@@ -2092,7 +2092,7 @@ const TableContainerEdit = props => {
2092
2092
  thousandSeparator: '.'
2093
2093
  })} / ${(0, _reactNumericComponent.numericFormatter)((totalItems ?? 0).toString(), {
2094
2094
  thousandSeparator: '.'
2095
- })} ${paginationLocal?.items || 'items'}`
2095
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
2096
2096
  }, pagination, {
2097
2097
  onChange: (page, pageSize1) => {
2098
2098
  if (pagination.onChange) {
@@ -332,7 +332,7 @@ const TableContainer = props => {
332
332
  thousandSeparator: '.'
333
333
  })} / ${(0, _reactNumericComponent.numericFormatter)((totalItems ?? 0).toString(), {
334
334
  thousandSeparator: '.'
335
- })} ${paginationLocal?.items || 'items'}`
335
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
336
336
  }, pagination, {
337
337
  onChange: (page, pageSize1) => {
338
338
  if (pagination.onChange) {
@@ -1991,7 +1991,7 @@ const TableContainerEdit = props => {
1991
1991
  thousandSeparator: '.'
1992
1992
  })} / ${(0, _reactNumericComponent.numericFormatter)((totalItems ?? 0).toString(), {
1993
1993
  thousandSeparator: '.'
1994
- })} ${locale?.pager?.items || paginationLocal?.items || ''}`
1994
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
1995
1995
 
1996
1996
  // locale={locale}
1997
1997
  }, pagination, {
@@ -104,7 +104,9 @@ const renderFilter = args => {
104
104
  format: dateRangeFormat,
105
105
  value: dateRangeValue,
106
106
  onChange: value => {
107
+ console.log('value', value);
107
108
  const newDateRangeValue = value ? [value[0] ? (0, _moment.default)(value[0]).format() : '', value[1] ? (0, _moment.default)(value[1]).format() : ''] : [];
109
+ console.log('newDateRangeValue', newDateRangeValue);
108
110
  setSelectedKeys(newDateRangeValue);
109
111
  },
110
112
  menuClassName: "rc-menu-popup",
@@ -283,7 +283,7 @@ const TableContainer = props => {
283
283
  thousandSeparator: '.'
284
284
  })} / ${(0, _reactNumericComponent.numericFormatter)((totalItems ?? 0).toString(), {
285
285
  thousandSeparator: '.'
286
- })} ${paginationLocal?.items || 'items'}`
286
+ })} ${pagination?.locale?.items || paginationLocal?.items || ''}`
287
287
  }, pagination, {
288
288
  onChange: (page, pageSize1) => {
289
289
  if (pagination.onChange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.8.76",
3
+ "version": "1.8.78",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",