es-grid-template 1.7.37 → 1.7.38

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