es-grid-template 1.8.44 → 1.8.45

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.
@@ -474,27 +474,37 @@ const TableContainerEdit = props => {
474
474
  const isEdit = typeof columnOri?.editEnable === 'function' ? columnOri.editEnable(newData[targetRow]) : columnOri.editEnable;
475
475
  if (isEdit) {
476
476
  const columnKey = allCols[targetCol].id;
477
- if (columnOri.type === 'number' && isFormattedNumber(cellValue.trim())) {
478
- const colFormat = typeof columnOri.format === 'function' ? columnOri.format(record) : columnOri.format;
479
- const valuePasteFormat = detectSeparators(cellValue.trim());
480
- const cellFormat = getFormat(colFormat, format);
481
- const thousandSeparator = valuePasteFormat?.thousandSeparator ?? cellFormat?.thousandSeparator;
482
- const decimalSeparator = valuePasteFormat?.decimalSeparator ?? cellFormat?.decimalSeparator;
483
- const dec = cellFormat?.decimalScale;
484
- const numericFormatProps = {
485
- thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
486
- decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
487
- allowNegative: cellFormat?.allowNegative ?? true,
488
- prefix: cellFormat?.prefix,
489
- suffix: cellFormat?.suffix,
490
- decimalScale: dec,
491
- fixedDecimalScale: cellFormat?.fixedDecimalScale ?? false
492
- };
493
- const val = removeNumericFormat(cellValue.trim(), undefined, numericFormatProps);
494
- newData[targetRow] = {
495
- ...newData[targetRow],
496
- [columnKey]: Number(val)
497
- };
477
+
478
+ // if (columnOri.type === 'number' && isFormattedNumber(cellValue.trim())) {
479
+ if (columnOri.type === 'number') {
480
+ if (cellValue.trim() === '') {
481
+ newData[targetRow] = {
482
+ ...newData[targetRow],
483
+ [columnKey]: null
484
+ };
485
+ }
486
+ if (isFormattedNumber(cellValue.trim())) {
487
+ const colFormat = typeof columnOri.format === 'function' ? columnOri.format(record) : columnOri.format;
488
+ const valuePasteFormat = detectSeparators(cellValue.trim());
489
+ const cellFormat = getFormat(colFormat, format);
490
+ const thousandSeparator = valuePasteFormat?.thousandSeparator ?? cellFormat?.thousandSeparator;
491
+ const decimalSeparator = valuePasteFormat?.decimalSeparator ?? cellFormat?.decimalSeparator;
492
+ const dec = cellFormat?.decimalScale;
493
+ const numericFormatProps = {
494
+ thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
495
+ decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
496
+ allowNegative: cellFormat?.allowNegative ?? true,
497
+ prefix: cellFormat?.prefix,
498
+ suffix: cellFormat?.suffix,
499
+ decimalScale: dec,
500
+ fixedDecimalScale: cellFormat?.fixedDecimalScale ?? false
501
+ };
502
+ const val = removeNumericFormat(cellValue.trim(), undefined, numericFormatProps);
503
+ newData[targetRow] = {
504
+ ...newData[targetRow],
505
+ [columnKey]: Number(val)
506
+ };
507
+ }
498
508
  } else {
499
509
  newData[targetRow] = {
500
510
  ...newData[targetRow],
@@ -16,7 +16,7 @@ $cell-selected-bg: #F3F8FF !default;
16
16
  $cell-index-selected-bg: #1869E6 !default;
17
17
  //$cell-index-focus-bg: #CEDBEF !default;
18
18
  $cell-index-focus-bg: #E6EFFD !default;
19
- $rowSelectedHoverBg: 'ui-rc' !default;
19
+ // $rowSelectedHoverBg: 'ui-rc' !default;
20
20
  $boxShadowColor: rgba(5, 5, 5, 0.09) !default;
21
21
  $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
22
22
 
@@ -546,9 +546,10 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
546
546
  // ------------ select ---------------
547
547
 
548
548
  .#{$prefix}-table-select-single .#{$prefix}-table-select-selector,
549
- .#{$prefix}-select-single .#{$prefix}-select-selector {
549
+ .#{$prefix}-select-single .#{$prefix}-select-selector,
550
+ .ui-rc-table-select-selector {
550
551
 
551
- border-radius: 0;
552
+ border-radius: 0 !important;
552
553
 
553
554
  }
554
555
 
@@ -481,27 +481,37 @@ const TableContainerEdit = props => {
481
481
  const isEdit = typeof columnOri?.editEnable === 'function' ? columnOri.editEnable(newData[targetRow]) : columnOri.editEnable;
482
482
  if (isEdit) {
483
483
  const columnKey = allCols[targetCol].id;
484
- if (columnOri.type === 'number' && (0, _utils.isFormattedNumber)(cellValue.trim())) {
485
- const colFormat = typeof columnOri.format === 'function' ? columnOri.format(record) : columnOri.format;
486
- const valuePasteFormat = (0, _utils.detectSeparators)(cellValue.trim());
487
- const cellFormat = (0, _utils.getFormat)(colFormat, format);
488
- const thousandSeparator = valuePasteFormat?.thousandSeparator ?? cellFormat?.thousandSeparator;
489
- const decimalSeparator = valuePasteFormat?.decimalSeparator ?? cellFormat?.decimalSeparator;
490
- const dec = cellFormat?.decimalScale;
491
- const numericFormatProps = {
492
- thousandSeparator: (0, _utils.checkThousandSeparator)(thousandSeparator, decimalSeparator),
493
- decimalSeparator: (0, _utils.checkDecimalSeparator)(thousandSeparator, decimalSeparator),
494
- allowNegative: cellFormat?.allowNegative ?? true,
495
- prefix: cellFormat?.prefix,
496
- suffix: cellFormat?.suffix,
497
- decimalScale: dec,
498
- fixedDecimalScale: cellFormat?.fixedDecimalScale ?? false
499
- };
500
- const val = (0, _reactNumericComponent.removeNumericFormat)(cellValue.trim(), undefined, numericFormatProps);
501
- newData[targetRow] = {
502
- ...newData[targetRow],
503
- [columnKey]: Number(val)
504
- };
484
+
485
+ // if (columnOri.type === 'number' && isFormattedNumber(cellValue.trim())) {
486
+ if (columnOri.type === 'number') {
487
+ if (cellValue.trim() === '') {
488
+ newData[targetRow] = {
489
+ ...newData[targetRow],
490
+ [columnKey]: null
491
+ };
492
+ }
493
+ if ((0, _utils.isFormattedNumber)(cellValue.trim())) {
494
+ const colFormat = typeof columnOri.format === 'function' ? columnOri.format(record) : columnOri.format;
495
+ const valuePasteFormat = (0, _utils.detectSeparators)(cellValue.trim());
496
+ const cellFormat = (0, _utils.getFormat)(colFormat, format);
497
+ const thousandSeparator = valuePasteFormat?.thousandSeparator ?? cellFormat?.thousandSeparator;
498
+ const decimalSeparator = valuePasteFormat?.decimalSeparator ?? cellFormat?.decimalSeparator;
499
+ const dec = cellFormat?.decimalScale;
500
+ const numericFormatProps = {
501
+ thousandSeparator: (0, _utils.checkThousandSeparator)(thousandSeparator, decimalSeparator),
502
+ decimalSeparator: (0, _utils.checkDecimalSeparator)(thousandSeparator, decimalSeparator),
503
+ allowNegative: cellFormat?.allowNegative ?? true,
504
+ prefix: cellFormat?.prefix,
505
+ suffix: cellFormat?.suffix,
506
+ decimalScale: dec,
507
+ fixedDecimalScale: cellFormat?.fixedDecimalScale ?? false
508
+ };
509
+ const val = (0, _reactNumericComponent.removeNumericFormat)(cellValue.trim(), undefined, numericFormatProps);
510
+ newData[targetRow] = {
511
+ ...newData[targetRow],
512
+ [columnKey]: Number(val)
513
+ };
514
+ }
505
515
  } else {
506
516
  newData[targetRow] = {
507
517
  ...newData[targetRow],
@@ -16,7 +16,7 @@ $cell-selected-bg: #F3F8FF !default;
16
16
  $cell-index-selected-bg: #1869E6 !default;
17
17
  //$cell-index-focus-bg: #CEDBEF !default;
18
18
  $cell-index-focus-bg: #E6EFFD !default;
19
- $rowSelectedHoverBg: 'ui-rc' !default;
19
+ // $rowSelectedHoverBg: 'ui-rc' !default;
20
20
  $boxShadowColor: rgba(5, 5, 5, 0.09) !default;
21
21
  $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
22
22
 
@@ -546,9 +546,10 @@ $fontFamily: "Montserrat", Helvetica, Arial, serif !default;
546
546
  // ------------ select ---------------
547
547
 
548
548
  .#{$prefix}-table-select-single .#{$prefix}-table-select-selector,
549
- .#{$prefix}-select-single .#{$prefix}-select-selector {
549
+ .#{$prefix}-select-single .#{$prefix}-select-selector,
550
+ .ui-rc-table-select-selector {
550
551
 
551
- border-radius: 0;
552
+ border-radius: 0 !important;
552
553
 
553
554
  }
554
555
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.8.44",
3
+ "version": "1.8.45",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",