es-grid-template 1.7.38 → 1.7.39

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE +21 -21
  3. package/README.md +1 -1
  4. package/es/grid-component/hooks/constant.js +6 -6
  5. package/es/grid-component/hooks/useColumns.d.ts +1 -3
  6. package/es/grid-component/hooks/utils.d.ts +1 -1
  7. package/es/grid-component/styles.scss +1437 -1437
  8. package/es/table-component/ContextMenu.d.ts +3 -2
  9. package/es/table-component/ContextMenu.js +2 -2
  10. package/es/table-component/InternalTable.d.ts +6 -6
  11. package/es/table-component/InternalTable.js +25 -134
  12. package/es/table-component/TableContainer.d.ts +5 -5
  13. package/es/table-component/TableContainer.js +32 -31
  14. package/es/table-component/TableContainerEdit.d.ts +1 -1
  15. package/es/table-component/TableContainerEdit.js +247 -228
  16. package/es/table-component/body/EditableCell.js +146 -147
  17. package/es/table-component/body/TableBody.d.ts +1 -1
  18. package/es/table-component/body/TableBody.js +5 -5
  19. package/es/table-component/body/TableBodyCell.js +18 -37
  20. package/es/table-component/body/TableBodyCellEdit.d.ts +4 -4
  21. package/es/table-component/body/TableBodyCellEdit.js +64 -63
  22. package/es/table-component/body/TableBodyRow.js +1 -0
  23. package/es/table-component/footer/TableFooterCell.d.ts +3 -3
  24. package/es/table-component/footer/TableFooterCell.js +6 -8
  25. package/es/table-component/header/TableHead.d.ts +5 -5
  26. package/es/table-component/header/TableHead.js +2 -2
  27. package/es/table-component/hook/constant.js +6 -6
  28. package/es/table-component/hook/useFilterOperator.d.ts +1 -1
  29. package/es/table-component/hook/utils.d.ts +3 -2
  30. package/es/table-component/hook/utils.js +159 -202
  31. package/es/table-component/style.scss +1197 -1197
  32. package/es/table-component/table/TableWrapper.d.ts +4 -4
  33. package/es/table-component/table/TableWrapper.js +20 -23
  34. package/es/table-component/type.d.ts +40 -40
  35. package/es/table-component/useContext.d.ts +3 -4
  36. package/es/table-component/useContext.js +4 -4
  37. package/lib/grid-component/hooks/constant.js +6 -6
  38. package/lib/grid-component/hooks/useColumns.d.ts +1 -3
  39. package/lib/grid-component/hooks/utils.d.ts +1 -1
  40. package/lib/grid-component/styles.scss +1437 -1437
  41. package/lib/table-component/ContextMenu.d.ts +3 -2
  42. package/lib/table-component/InternalTable.d.ts +6 -6
  43. package/lib/table-component/InternalTable.js +18 -125
  44. package/lib/table-component/TableContainer.d.ts +5 -5
  45. package/lib/table-component/TableContainer.js +26 -24
  46. package/lib/table-component/TableContainerEdit.d.ts +1 -1
  47. package/lib/table-component/TableContainerEdit.js +246 -227
  48. package/lib/table-component/body/EditableCell.js +145 -146
  49. package/lib/table-component/body/TableBody.d.ts +1 -1
  50. package/lib/table-component/body/TableBody.js +5 -5
  51. package/lib/table-component/body/TableBodyCell.js +17 -36
  52. package/lib/table-component/body/TableBodyCellEdit.d.ts +4 -4
  53. package/lib/table-component/body/TableBodyCellEdit.js +60 -59
  54. package/lib/table-component/body/TableBodyRow.js +1 -0
  55. package/lib/table-component/footer/TableFooterCell.d.ts +3 -3
  56. package/lib/table-component/footer/TableFooterCell.js +5 -7
  57. package/lib/table-component/header/TableHead.d.ts +5 -5
  58. package/lib/table-component/header/TableHead.js +1 -1
  59. package/lib/table-component/hook/constant.js +6 -6
  60. package/lib/table-component/hook/useFilterOperator.d.ts +1 -1
  61. package/lib/table-component/hook/utils.d.ts +3 -2
  62. package/lib/table-component/hook/utils.js +159 -201
  63. package/lib/table-component/style.scss +1197 -1197
  64. package/lib/table-component/table/TableWrapper.d.ts +4 -4
  65. package/lib/table-component/table/TableWrapper.js +20 -23
  66. package/lib/table-component/type.d.ts +40 -40
  67. package/lib/table-component/useContext.d.ts +3 -4
  68. package/lib/table-component/useContext.js +3 -3
  69. package/package.json +116 -116
@@ -25,7 +25,7 @@ import { Controller } from "react-hook-form";
25
25
  import { Checkbox, Select, TreeSelect } from "rc-master-ui";
26
26
  import { AsyncSelect } from "../components/async-select";
27
27
  import { AsyncTableSelect } from "../components/async-table-select";
28
- import { cyan, green, red, blue } from "@ant-design/colors";
28
+ import { cyan, green, red, blue } from '@ant-design/colors';
29
29
  import { EditForm } from "../components/EditForm";
30
30
  import { TableContext } from "../useContext";
31
31
  // import moment from "moment";
@@ -41,7 +41,7 @@ const filterTreeNode = (input, treeNode) => {
41
41
  title,
42
42
  value
43
43
  } = treeNode;
44
- if (typeof title === "string" || typeof title === "number") {
44
+ if (typeof title === "string" || typeof title === 'number') {
45
45
  return title.toString().toLowerCase().includes(input.toLowerCase()) || value.toLowerCase().includes(input.toLowerCase());
46
46
  }
47
47
  return value.toLowerCase().includes(input.toLowerCase());
@@ -76,7 +76,7 @@ const EditableCell = props => {
76
76
  const dateTimePickerRef = React.useRef(null);
77
77
  // const timePickerRef = React.useRef(null);
78
78
 
79
- const colFormat = typeof column?.format === "function" ? column?.format(record) : column?.format;
79
+ const colFormat = typeof column?.format === 'function' ? column?.format(record) : column?.format;
80
80
  const cellFormat = getFormat(colFormat, format);
81
81
  const inputNode = (value, onChange) => {
82
82
  const dateFormat = getDatepickerFormat(editType, cellFormat);
@@ -102,32 +102,33 @@ const EditableCell = props => {
102
102
 
103
103
  // @ts-ignore
104
104
  const key = record[rowKey];
105
- const field = column.field ?? "";
105
+ const field = column.field ?? '';
106
106
 
107
107
  // const message = errors && column.field && errors[column.field] ? errors[column.field].message : ''
108
108
  const message = isInvalid?.message;
109
109
  const keySelect = checkFieldKey(column?.editSelectSettings?.fieldKey);
110
- const selectOptions = typeof propsOptions === "function" ? propsOptions(record, column.field) : propsOptions;
110
+ const selectOptions = typeof propsOptions === 'function' ? propsOptions(record, column.field) : propsOptions;
111
111
  const options = validateOption ? validateOption(record, column.field) : selectOptions ?? [];
112
112
  const optionsTree = validateOption ? convertArrayWithIndent(validateOption(record, column.field)) : selectOptions ? convertArrayWithIndent(selectOptions) : [];
113
113
 
114
114
  // const currt = flatColumns2()
115
115
 
116
116
  switch (editType) {
117
- case "date":
117
+ case 'date':
118
118
  return /*#__PURE__*/React.createElement(DatePicker, {
119
119
  ref: datePickerRef,
120
120
  format: {
121
121
  format: dateFormat,
122
- type: "mask"
122
+ type: 'mask'
123
123
  },
124
124
  autoFocus: column.field === startCell?.colId,
125
125
  defaultOpen: column.field === startCell?.colId
126
+
126
127
  // locale={buddhistLocale}
127
128
  ,
128
129
  style: {
129
- width: "100%",
130
- height: "100%"
130
+ width: '100%',
131
+ height: '100%'
131
132
  }
132
133
  // value={date}
133
134
  ,
@@ -151,11 +152,11 @@ const EditableCell = props => {
151
152
  option: newState,
152
153
  indexCol,
153
154
  indexRow,
154
- type: "blur"
155
+ type: 'blur'
155
156
  });
156
157
  }
157
158
  },
158
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
159
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
159
160
  disabled: isDisable(column, record) ?? false,
160
161
  maxDate: maxDate,
161
162
  minDate: minDate,
@@ -167,31 +168,31 @@ const EditableCell = props => {
167
168
  datePickerRef.current?.focus();
168
169
  }, 0);
169
170
  },
170
- popupClassName: "be-popup-container",
171
- status: isInvalid ? "error" : undefined,
171
+ popupClassName: 'be-popup-container',
172
+ status: isInvalid ? 'error' : undefined,
172
173
  "data-tooltip-content": message,
173
174
  "data-tooltip-id": `${id}-tooltip-error`
174
175
  });
175
- case "datetime":
176
+ case 'datetime':
176
177
  return /*#__PURE__*/React.createElement(DatePicker
177
178
  // id={`col${indexCol}-record${indexRow}`}
178
179
  , {
179
180
  ref: dateTimePickerRef,
180
181
  format: {
181
182
  format: dateFormat,
182
- type: "mask"
183
+ type: 'mask'
183
184
  }
184
185
  // locale={buddhistLocale}
185
186
  ,
186
187
  style: {
187
- width: "100%",
188
- height: "100%"
188
+ width: '100%',
189
+ height: '100%'
189
190
  },
190
191
  showTime: true
191
192
  // value={date}
192
193
  ,
193
194
  defaultValue: date,
194
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
195
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
195
196
  disabled: isDisable(column, record) ?? false,
196
197
  maxDate: maxDate,
197
198
  minDate: minDate,
@@ -219,20 +220,20 @@ const EditableCell = props => {
219
220
  option: newState,
220
221
  indexCol,
221
222
  indexRow,
222
- type: "blur"
223
+ type: 'blur'
223
224
  });
224
225
  }
225
226
  },
226
- popupClassName: "be-popup-container",
227
- status: isInvalid ? "error" : undefined,
227
+ popupClassName: 'be-popup-container',
228
+ status: isInvalid ? 'error' : undefined,
228
229
  "data-tooltip-content": message,
229
230
  "data-tooltip-id": `${id}-tooltip-error`,
230
231
  autoFocus: column.field === startCell?.colId,
231
232
  defaultOpen: column.field === startCell?.colId
232
233
  });
233
- case "month":
234
- case "quarter":
235
- case "year":
234
+ case 'month':
235
+ case 'quarter':
236
+ case 'year':
236
237
  const pickerFormat = getDatepickerFormat(editType, cellFormat);
237
238
  const maxDateValue1 = !isEmpty(column.maxDate) ? dayjs(column.maxDate, pickerFormat) : undefined;
238
239
  const minDateValue1 = !isEmpty(column.minDate) ? dayjs(column.minDate, pickerFormat) : undefined;
@@ -240,47 +241,47 @@ const EditableCell = props => {
240
241
  id: `col${indexCol}-record${indexRow}`,
241
242
  format: {
242
243
  format: pickerFormat,
243
- type: "mask"
244
+ type: 'mask'
244
245
  },
245
246
  style: {
246
- width: "100%",
247
- height: "100%"
247
+ width: '100%',
248
+ height: '100%'
248
249
  },
249
250
  picker: editType,
250
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
251
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
251
252
  disabled: isDisable(column, record) ?? false,
252
253
  maxDate: maxDateValue1,
253
254
  minDate: minDateValue1,
254
- popupClassName: "be-popup-container",
255
- status: isInvalid ? "error" : undefined,
255
+ popupClassName: 'be-popup-container',
256
+ status: isInvalid ? 'error' : undefined,
256
257
  "data-tooltip-content": message,
257
258
  "data-tooltip-id": `${id}-tooltip-error`,
258
259
  autoFocus: column.field === startCell?.colId,
259
260
  defaultOpen: column.field === startCell?.colId
260
261
  });
261
- case "week":
262
+ case 'week':
262
263
  const weekFormat = getDatepickerFormat(editType, cellFormat);
263
264
  const maxWeekValue = !isEmpty(column.maxDate) ? dayjs(column.maxDate, weekFormat) : undefined;
264
265
  const minWeekValue = !isEmpty(column.minDate) ? dayjs(column.minDate, weekFormat) : undefined;
265
266
  return /*#__PURE__*/React.createElement(DatePicker, {
266
267
  format: val => customWeekStartEndFormat(val, weekFormat),
267
268
  style: {
268
- width: "100%",
269
- height: "100%"
269
+ width: '100%',
270
+ height: '100%'
270
271
  },
271
272
  picker: editType,
272
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
273
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
273
274
  disabled: isDisable(column, record) ?? false,
274
275
  maxDate: maxWeekValue,
275
276
  minDate: minWeekValue,
276
- popupClassName: "be-popup-container",
277
- status: isInvalid ? "error" : undefined,
277
+ popupClassName: 'be-popup-container',
278
+ status: isInvalid ? 'error' : undefined,
278
279
  "data-tooltip-content": message,
279
280
  "data-tooltip-id": `${id}-tooltip-error`,
280
281
  autoFocus: column.field === startCell?.colId,
281
282
  defaultOpen: column.field === startCell?.colId
282
283
  });
283
- case "time":
284
+ case 'time':
284
285
  const timeFormat = getDatepickerFormat(editType, cellFormat);
285
286
  const maxTimeValue = !isEmpty(column.maxTime) ? dayjs(column.maxTime).format(timeFormat) : null;
286
287
  const minTimeValue = !isEmpty(column.minTime) ? dayjs(column.minTime).format(timeFormat) : null;
@@ -292,24 +293,24 @@ const EditableCell = props => {
292
293
  return /*#__PURE__*/React.createElement(TimePicker, {
293
294
  format: {
294
295
  format: timeFormat,
295
- type: "mask"
296
+ type: 'mask'
296
297
  },
297
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
298
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
298
299
  maxDate: maxTime,
299
300
  minDate: minTime,
300
301
  disabled: isDisable(column, record) ?? false,
301
302
  style: {
302
- width: "100%",
303
- height: "100%"
303
+ width: '100%',
304
+ height: '100%'
304
305
  },
305
- popupClassName: "be-popup-container",
306
- status: isInvalid ? "error" : undefined,
306
+ popupClassName: 'be-popup-container',
307
+ status: isInvalid ? 'error' : undefined,
307
308
  "data-tooltip-content": message,
308
309
  "data-tooltip-id": `${id}-tooltip-error`,
309
310
  autoFocus: column.field === startCell?.colId,
310
311
  defaultOpen: column.field === startCell?.colId
311
312
  });
312
- case "selectTable":
313
+ case 'selectTable':
313
314
  const rr = selectColumns ?? [];
314
315
  const columnsTable = rr.map(colSelect => {
315
316
  return {
@@ -334,9 +335,9 @@ const EditableCell = props => {
334
335
  // @ts-ignore
335
336
  valueSelectTable = record[fieldValue] ?? value;
336
337
  }
337
- if (isMulti || selectMode === "checkbox") {
338
+ if (isMulti || selectMode === 'checkbox') {
338
339
  // @ts-ignore
339
- valueSelectTable = !isNullOrUndefined(record[dataIndex ?? ""]) && Array.isArray(record[dataIndex]) && record[dataIndex]?.length > 0 ? options.filter(val => record[dataIndex]?.includes(val[keySelect])) : undefined;
340
+ valueSelectTable = !isNullOrUndefined(record[dataIndex]) && Array.isArray(record[dataIndex]) && record[dataIndex]?.length > 0 ? options.filter(val => record[dataIndex]?.includes(val[keySelect])) : undefined;
340
341
  }
341
342
  return /*#__PURE__*/React.createElement(AsyncTableSelect
342
343
  // id={`col${indexCol}-record${indexRow}`}
@@ -345,11 +346,10 @@ const EditableCell = props => {
345
346
  options: options,
346
347
  defaultOptions: options,
347
348
  value: valueSelectTable,
348
- rowData: record
349
- // autoDestroy={true}
350
- ,
349
+ rowData: record,
350
+ autoDestroy: true,
351
351
  onChange: (val, option) => {
352
- onChange(val ?? "");
352
+ onChange(val ?? '');
353
353
  const formState = getValues();
354
354
  // const itemState = getValues(dataIndex)
355
355
  // @ts-ignore
@@ -365,38 +365,39 @@ const EditableCell = props => {
365
365
  option: option,
366
366
  indexCol,
367
367
  indexRow,
368
- type: "blur"
368
+ type: 'blur'
369
369
  });
370
370
  },
371
371
  showSearch: true,
372
- mode: isMulti || selectMode === "checkbox" ? "multiple" : undefined,
372
+ mode: isMulti || selectMode === 'checkbox' ? 'multiple' : undefined,
373
373
  valueSelectAble: true,
374
374
  selectMode: selectMode,
375
375
  style: {
376
- width: "100%",
377
- height: "100%"
376
+ width: '100%',
377
+ height: '100%'
378
378
  },
379
379
  defaultOpen: column.field === startCell?.colId,
380
380
  autoFocus: column.field === startCell?.colId
381
+
381
382
  // defaultOpen={column.field === cellEditing?.column.field}
382
383
  ,
383
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
384
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
384
385
  allowClear: column.isClearable ?? false,
385
- maxTagCount: "responsive",
386
+ maxTagCount: 'responsive',
386
387
  rowKey: keySelect,
387
388
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
388
389
  optionFilterProp: "label",
389
- popupClassName: "be-popup-container",
390
+ popupClassName: 'be-popup-container',
390
391
  loadOptions: loadOptions,
391
- status: isInvalid ? "error" : undefined,
392
+ status: isInvalid ? 'error' : undefined,
392
393
  dropdownRender: menu => {
393
394
  if (toolbarItems && toolbarItems.length > 0) {
394
395
  return /*#__PURE__*/React.createElement(React.Fragment, null, menu, /*#__PURE__*/React.createElement(Divider, {
395
396
  style: {
396
- margin: "8px 0"
397
+ margin: '8px 0'
397
398
  }
398
399
  }), /*#__PURE__*/React.createElement("div", {
399
- className: "toolbar-control d-flex justify-content-end"
400
+ className: 'toolbar-control d-flex justify-content-end'
400
401
  }));
401
402
  } else {
402
403
  return /*#__PURE__*/React.createElement(React.Fragment, null, " ", menu);
@@ -405,13 +406,12 @@ const EditableCell = props => {
405
406
  filterOption: filterOption,
406
407
  fieldNames: fieldNames ? fieldNames : {
407
408
  value: keySelect,
408
- label: inputKey ?? "label"
409
+ label: inputKey ?? 'label'
409
410
  },
410
411
  onBlur: event => {
411
- console.log("aafffffff");
412
412
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
413
413
  const val = event.inputValue;
414
- onChange(val ?? "");
414
+ onChange(val ?? '');
415
415
  const formState = getValues();
416
416
  // const itemState = getValues(dataIndex)
417
417
  // @ts-ignore
@@ -429,20 +429,20 @@ const EditableCell = props => {
429
429
  },
430
430
  indexCol,
431
431
  indexRow,
432
- type: "blur"
432
+ type: 'blur'
433
433
  });
434
434
  }
435
435
  },
436
436
  "data-tooltip-content": message,
437
437
  "data-tooltip-id": `${id}-tooltip-error`
438
438
  });
439
- case "select":
439
+ case 'select':
440
440
  let valueSelect = value;
441
441
  if (fieldValue) {
442
442
  // @ts-ignore
443
443
  valueSelect = record[fieldValue] ?? value;
444
444
  }
445
- if (isMulti || selectMode === "checkbox") {
445
+ if (isMulti || selectMode === 'checkbox') {
446
446
  // @ts-ignore
447
447
  valueSelect = !isNullOrUndefined(record[dataIndex]) && Array.isArray(record[dataIndex]) && record[dataIndex]?.length > 0 ? options.filter(val => record[dataIndex]?.includes(val[keySelect])) : undefined;
448
448
  }
@@ -450,7 +450,7 @@ const EditableCell = props => {
450
450
  options: options,
451
451
  value: valueSelect,
452
452
  onChange: (val, option) => {
453
- onChange(val ?? "");
453
+ onChange(val ?? '');
454
454
  const formState = getValues();
455
455
  // const itemState = getValues(dataIndex)
456
456
  // @ts-ignore
@@ -465,39 +465,39 @@ const EditableCell = props => {
465
465
  option: option,
466
466
  indexCol,
467
467
  indexRow,
468
- type: "blur"
468
+ type: 'blur'
469
469
  });
470
- }
471
- // autoDestroy={true}
472
- ,
470
+ },
471
+ autoDestroy: true,
473
472
  showSearch: true,
474
- mode: isMulti || selectMode === "checkbox" ? "multiple" : undefined,
473
+ mode: isMulti || selectMode === 'checkbox' ? 'multiple' : undefined,
475
474
  valueSelectAble: true,
476
475
  defaultOpen: column.field === startCell?.colId,
477
476
  autoFocus: column.field === startCell?.colId
477
+
478
478
  // defaultOpen={column.field === cellEditing?.column.field}
479
479
  ,
480
480
 
481
481
  style: {
482
- width: "100%",
483
- height: "100%"
482
+ width: '100%',
483
+ height: '100%'
484
484
  },
485
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
485
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
486
486
  allowClear: column.isClearable ?? false,
487
- maxTagCount: "responsive",
487
+ maxTagCount: 'responsive',
488
488
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
489
489
  optionFilterProp: "label",
490
- popupClassName: "be-popup-container",
491
- status: isInvalid ? "error" : undefined,
490
+ popupClassName: 'be-popup-container',
491
+ status: isInvalid ? 'error' : undefined,
492
492
  filterOption: filterOption,
493
493
  fieldNames: fieldNames ? fieldNames : {
494
494
  value: keySelect,
495
- label: inputKey ?? "label"
495
+ label: inputKey ?? 'label'
496
496
  },
497
497
  onBlur: event => {
498
498
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
499
499
  const val = event.inputValue;
500
- onChange(val ?? "");
500
+ onChange(val ?? '');
501
501
  const formState = getValues();
502
502
  // const itemState = getValues(dataIndex)
503
503
  // @ts-ignore
@@ -515,20 +515,20 @@ const EditableCell = props => {
515
515
  },
516
516
  indexCol,
517
517
  indexRow,
518
- type: "blur"
518
+ type: 'blur'
519
519
  });
520
520
  }
521
521
  },
522
522
  "data-tooltip-content": message,
523
523
  "data-tooltip-id": `${id}-tooltip-error`
524
524
  });
525
- case "asyncSelect":
525
+ case 'asyncSelect':
526
526
  let valueAsyncSelect = value;
527
527
  if (fieldValue) {
528
528
  // @ts-ignore
529
529
  valueAsyncSelect = record[fieldValue] ?? value;
530
530
  }
531
- if (isMulti || selectMode === "checkbox") {
531
+ if (isMulti || selectMode === 'checkbox') {
532
532
  // @ts-ignore
533
533
  valueAsyncSelect = !isNullOrUndefined(record[dataIndex]) && Array.isArray(record[dataIndex]) && record[dataIndex]?.length > 0 ? options.filter(val => record[dataIndex]?.includes(val[keySelect])) : undefined;
534
534
  }
@@ -537,7 +537,7 @@ const EditableCell = props => {
537
537
  defaultOptions: options,
538
538
  value: valueAsyncSelect,
539
539
  onChange: (val, option) => {
540
- onChange(val ?? "");
540
+ onChange(val ?? '');
541
541
  const formState = getValues();
542
542
  // const itemState = getValues(dataIndex)
543
543
  // @ts-ignore
@@ -552,30 +552,30 @@ const EditableCell = props => {
552
552
  option: option,
553
553
  indexCol,
554
554
  indexRow,
555
- type: "blur"
555
+ type: 'blur'
556
556
  });
557
- }
558
- // autoDestroy={true}
559
- ,
557
+ },
558
+ autoDestroy: true,
560
559
  showSearch: true,
561
560
  defaultOpen: column.field === startCell?.colId,
562
561
  autoFocus: column.field === startCell?.colId
562
+
563
563
  // defaultOpen={column.field === cellEditing?.column.field}
564
564
  ,
565
- mode: isMulti || selectMode === "checkbox" ? "multiple" : undefined,
565
+ mode: isMulti || selectMode === 'checkbox' ? 'multiple' : undefined,
566
566
  valueSelectAble: true,
567
567
  style: {
568
- width: "100%",
569
- height: "100%"
568
+ width: '100%',
569
+ height: '100%'
570
570
  },
571
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
571
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
572
572
  allowClear: column.isClearable ?? false,
573
- maxTagCount: "responsive",
573
+ maxTagCount: 'responsive',
574
574
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
575
575
  optionFilterProp: "label",
576
- popupClassName: "be-popup-container",
576
+ popupClassName: 'be-popup-container',
577
577
  loadOptions: loadOptions,
578
- status: isInvalid ? "error" : undefined
578
+ status: isInvalid ? 'error' : undefined
579
579
  // dropdownRender={(menu) => {
580
580
  // if (toolbarItems && toolbarItems.length > 0) {
581
581
  // return (
@@ -617,12 +617,12 @@ const EditableCell = props => {
617
617
  filterOption: filterOption,
618
618
  fieldNames: fieldNames ? fieldNames : {
619
619
  value: keySelect,
620
- label: inputKey ?? "label"
620
+ label: inputKey ?? 'label'
621
621
  },
622
622
  onBlur: event => {
623
623
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
624
624
  const val = event.inputValue;
625
- onChange(val ?? "");
625
+ onChange(val ?? '');
626
626
  const formState = getValues();
627
627
  // const itemState = getValues(dataIndex)
628
628
  // @ts-ignore
@@ -640,14 +640,14 @@ const EditableCell = props => {
640
640
  },
641
641
  indexCol,
642
642
  indexRow,
643
- type: "blur"
643
+ type: 'blur'
644
644
  });
645
645
  }
646
646
  },
647
647
  "data-tooltip-content": message,
648
648
  "data-tooltip-id": `${id}-tooltip-error`
649
649
  });
650
- case "treeSelect":
650
+ case 'treeSelect':
651
651
  // let valueTreeSelect
652
652
 
653
653
  const newTreeData = convertLabelToTitle(optionsTree);
@@ -659,27 +659,28 @@ const EditableCell = props => {
659
659
  // @ts-ignore
660
660
  valueTreeSelect = record[fieldValue] ?? value;
661
661
  }
662
- if (isMulti || selectMode === "checkbox") {
662
+ if (isMulti || selectMode === 'checkbox') {
663
663
  // @ts-ignore
664
664
  valueTreeSelect = !isNullOrUndefined(record[dataIndex]) && Array.isArray(record[dataIndex]) && record[dataIndex]?.length > 0 ? options.filter(val => record[dataIndex]?.includes(val[keySelect])) : undefined;
665
665
  }
666
666
  return /*#__PURE__*/React.createElement(TreeSelect, {
667
667
  id: `col${indexCol}-record${indexRow}`,
668
- className: "be-tree-select",
668
+ className: 'be-tree-select',
669
669
  style: {
670
- width: "100%",
671
- height: "100%"
670
+ width: '100%',
671
+ height: '100%'
672
672
  },
673
673
  value: valueTreeSelect,
674
674
  dropdownStyle: {
675
675
  maxHeight: 400,
676
- overflow: "auto"
676
+ overflow: 'auto'
677
677
  },
678
678
  treeData: newTreeData,
679
- placeholder: t ? t(column.placeholder ?? "Select") : column.placeholder ?? "Select",
679
+ placeholder: t ? t(column.placeholder ?? 'Select') : column.placeholder ?? 'Select',
680
680
  treeDefaultExpandAll: true,
681
681
  defaultOpen: column.field === startCell?.colId,
682
682
  autoFocus: column.field === startCell?.colId
683
+
683
684
  // defaultOpen={column.field === cellEditing?.column.field}
684
685
  ,
685
686
  virtual: true,
@@ -691,14 +692,14 @@ const EditableCell = props => {
691
692
  maxTagPlaceholder: 2,
692
693
  treeTitleRender: column?.editSelectSettings?.formatOptionLabel,
693
694
  showCheckedStrategy: SHOW_PARENT,
694
- multiple: column?.editSelectSettings?.selectMode === "checkbox" || column?.editSelectSettings?.isMulti
695
+ multiple: column?.editSelectSettings?.selectMode === 'checkbox' || column?.editSelectSettings?.isMulti
695
696
  // fieldNames={{label: inputKey ? inputKey : 'title', value: keySelect, children: 'children'}}
696
697
  ,
697
- treeCheckable: column?.editSelectSettings?.selectMode === "checkbox",
698
+ treeCheckable: column?.editSelectSettings?.selectMode === 'checkbox',
698
699
  filterTreeNode: filterTreeNode,
699
700
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
700
701
  onSelect: (val, option) => {
701
- onChange(val ?? "");
702
+ onChange(val ?? '');
702
703
  const formState = getValues();
703
704
  // const itemState = getValues(dataIndex)
704
705
  // @ts-ignore
@@ -713,23 +714,23 @@ const EditableCell = props => {
713
714
  option: option,
714
715
  indexCol,
715
716
  indexRow,
716
- type: "blur"
717
+ type: 'blur'
717
718
  });
718
719
  },
719
- popupClassName: "be-popup-container",
720
- status: isInvalid ? "error" : undefined,
720
+ popupClassName: 'be-popup-container',
721
+ status: isInvalid ? 'error' : undefined,
721
722
  "data-tooltip-content": message,
722
723
  "data-tooltip-id": `${id}-tooltip-error`
723
724
  });
724
- case "checkbox":
725
+ case 'checkbox':
725
726
  return /*#__PURE__*/React.createElement("div", {
726
727
  style: {
727
- display: "flex",
728
- alignItems: "center",
729
- justifyContent: column.align ?? "center",
728
+ display: 'flex',
729
+ alignItems: 'center',
730
+ justifyContent: column.align ?? 'center',
730
731
  paddingInline: 5,
731
- height: "100%",
732
- width: "100%"
732
+ height: '100%',
733
+ width: '100%'
733
734
  }
734
735
  }, /*#__PURE__*/React.createElement(Checkbox, {
735
736
  checked: Boolean(value)
@@ -748,12 +749,12 @@ const EditableCell = props => {
748
749
  field: column.field ?? column.field,
749
750
  indexCol,
750
751
  indexRow,
751
- type: "blur"
752
+ type: 'blur'
752
753
  });
753
754
  },
754
755
  disabled: isDisable(column, record) ?? false
755
756
  }));
756
- case "form":
757
+ case 'form':
757
758
  const valueForm = value;
758
759
  return /*#__PURE__*/React.createElement(EditForm, {
759
760
  rowData: record,
@@ -763,6 +764,7 @@ const EditableCell = props => {
763
764
  value: valueForm,
764
765
  fieldKey: column.editFromSettings?.fieldKey,
765
766
  indexRow: indexRow
767
+
766
768
  // cellFocus={column.field === cellEditing?.column.field}
767
769
  ,
768
770
 
@@ -777,14 +779,14 @@ const EditableCell = props => {
777
779
  field: column.field,
778
780
  record: {
779
781
  ...formState,
780
- [column.field ?? ""]: val
782
+ [column.field ?? '']: val
781
783
  },
782
784
  prevState,
783
785
  newState,
784
786
  option: val,
785
787
  indexCol,
786
788
  indexRow,
787
- type: "blur"
789
+ type: 'blur'
788
790
  });
789
791
  }
790
792
  // cellEditing={cellEditing}
@@ -792,7 +794,7 @@ const EditableCell = props => {
792
794
  // menuPortalTarget={tableContainerRef}
793
795
  // classNamePrefix={column.classElement ?? 'select'}
794
796
  ,
795
- placeholder: t ? t(column.placeholder ? column.placeholder : "") : column.placeholder ? column.placeholder : "",
797
+ placeholder: t ? t(column.placeholder ? column.placeholder : '') : column.placeholder ? column.placeholder : '',
796
798
  menuWidth: column.editFromSettings?.menuWidth,
797
799
  menuHeight: column.editFromSettings?.menuHeight
798
800
  });
@@ -824,8 +826,8 @@ const EditableCell = props => {
824
826
  //
825
827
  // )
826
828
 
827
- case "color":
828
- const color = isColor(value) ? value : "#ffffff";
829
+ case 'color':
830
+ const color = isColor(value) ? value : '#ffffff';
829
831
  const presets = genPresets({
830
832
  blue,
831
833
  red,
@@ -847,7 +849,7 @@ const EditableCell = props => {
847
849
  newState: `#${valueColor.toHex()}`,
848
850
  indexCol,
849
851
  indexRow,
850
- type: "blur"
852
+ type: 'blur'
851
853
  });
852
854
  },
853
855
  presets: presets,
@@ -865,7 +867,7 @@ const EditableCell = props => {
865
867
  }, /*#__PURE__*/React.createElement(Presets, null)), /*#__PURE__*/React.createElement(Divider, {
866
868
  type: "vertical",
867
869
  style: {
868
- height: "auto"
870
+ height: 'auto'
869
871
  }
870
872
  }), /*#__PURE__*/React.createElement(Col, {
871
873
  flex: "auto"
@@ -894,7 +896,7 @@ const EditableCell = props => {
894
896
  // />
895
897
  // )
896
898
 
897
- case "numeric":
899
+ case 'numeric':
898
900
  const thousandSeparator = cellFormat?.thousandSeparator;
899
901
  const decimalSeparator = cellFormat?.decimalSeparator;
900
902
 
@@ -920,13 +922,13 @@ const EditableCell = props => {
920
922
  customInput: Input
921
923
  // valueIsNumericString={true}
922
924
  ,
923
- placeholder: t ? t(column.placeholder ?? "Enter") : column.placeholder ?? "Enter",
924
- autoComplete: "off",
925
- className: classNames("be-cell-editing rounded-0 input-element", {
926
- "is-invalid": isInvalid,
927
- "be-cell-edit-align-center": column.align === "center",
928
- "be-cell-edit-align-left": column.align === "left",
929
- "be-cell-edit-align-right": !column.align || column.align === "right"
925
+ placeholder: t ? t(column.placeholder ?? 'Enter') : column.placeholder ?? 'Enter',
926
+ autoComplete: 'off',
927
+ className: classNames('be-cell-editing rounded-0 input-element', {
928
+ 'is-invalid': isInvalid,
929
+ 'be-cell-edit-align-center': column.align === 'center',
930
+ 'be-cell-edit-align-left': column.align === 'left',
931
+ 'be-cell-edit-align-right': !column.align || column.align === 'right'
930
932
  }),
931
933
  autoFocus: column.field === startCell?.colId,
932
934
  onValueChange: values => {
@@ -950,7 +952,7 @@ const EditableCell = props => {
950
952
  newState,
951
953
  indexCol,
952
954
  indexRow,
953
- type: "blur"
955
+ type: 'blur'
954
956
  });
955
957
  }
956
958
  },
@@ -962,16 +964,13 @@ const EditableCell = props => {
962
964
  id: `col${indexCol}-record${indexRow}`,
963
965
  style: {
964
966
  textAlign: column.align,
965
- resize: "none",
966
- height: "100%"
967
- }
968
- // @ts-ignore
969
- // value={!isNullOrUndefined(record[dataIndex]) ? record[dataIndex] : ''}
970
- ,
967
+ resize: 'none',
968
+ height: '100%'
969
+ },
971
970
  disabled: isDisable(column, record) ?? false,
972
- className: classNames("be-cell-editing rounded-0 input-element"),
973
- placeholder: t ? t(column.placeholder ?? "Enter") : column.placeholder ?? "Enter",
974
- value: !isNullOrUndefined(value) ? value : "",
971
+ className: classNames('be-cell-editing rounded-0 input-element'),
972
+ placeholder: t ? t(column.placeholder ?? 'Enter') : column.placeholder ?? 'Enter',
973
+ value: !isNullOrUndefined(value) ? value : '',
975
974
  onBlur: () => {
976
975
  const formState = getValues();
977
976
  // const itemState = getValues(dataIndex)
@@ -989,7 +988,7 @@ const EditableCell = props => {
989
988
  field,
990
989
  indexCol,
991
990
  indexRow,
992
- type: "blur"
991
+ type: 'blur'
993
992
  });
994
993
  }
995
994
  },
@@ -1008,12 +1007,12 @@ const EditableCell = props => {
1008
1007
  record: formState,
1009
1008
  indexCol,
1010
1009
  indexRow,
1011
- type: "enter"
1010
+ type: 'enter'
1012
1011
  });
1013
1012
  // }
1014
1013
  },
1015
1014
  onChange: onChange,
1016
- status: isInvalid ? "error" : undefined,
1015
+ status: isInvalid ? 'error' : undefined,
1017
1016
  "data-tooltip-content": message,
1018
1017
  "data-tooltip-id": `${id}-tooltip-error`,
1019
1018
  autoSize: {