react-table-edit 0.3.1 → 0.3.3

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.
package/dist/index.d.mts CHANGED
@@ -152,4 +152,21 @@ declare const notificationError: (param: string) => string;
152
152
  declare const notificationSuccess: (param: string) => string;
153
153
  declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
154
154
 
155
- export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type IFToolbarOptions, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
155
+ declare const useOnClickOutside: (ref: any, handler: any) => void;
156
+ declare const isNullOrUndefined: (d: any) => boolean;
157
+ declare const generateUUID: () => string;
158
+ /**
159
+ * format chuỗi kí tự số
160
+ * @param str chuỗi số cần format
161
+ * @param decimalSeparator kí tự thập phân
162
+ * @param thousandSeparator kí tự phân cách hàng nghìn
163
+ * @param fraction số kí tự thập phân
164
+ * @param isDone đã nhập xong
165
+ * @returns
166
+ */
167
+ declare const objSymbolDecimal: any;
168
+ declare const objSymbolThousand: any;
169
+ declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean) => string;
170
+ declare const roundNumber: (num: number, fraction: number) => number;
171
+
172
+ export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type IFToolbarOptions, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, objSymbolDecimal, objSymbolThousand, roundNumber, useOnClickOutside };
package/dist/index.d.ts CHANGED
@@ -152,4 +152,21 @@ declare const notificationError: (param: string) => string;
152
152
  declare const notificationSuccess: (param: string) => string;
153
153
  declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
154
154
 
155
- export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type IFToolbarOptions, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
155
+ declare const useOnClickOutside: (ref: any, handler: any) => void;
156
+ declare const isNullOrUndefined: (d: any) => boolean;
157
+ declare const generateUUID: () => string;
158
+ /**
159
+ * format chuỗi kí tự số
160
+ * @param str chuỗi số cần format
161
+ * @param decimalSeparator kí tự thập phân
162
+ * @param thousandSeparator kí tự phân cách hàng nghìn
163
+ * @param fraction số kí tự thập phân
164
+ * @param isDone đã nhập xong
165
+ * @returns
166
+ */
167
+ declare const objSymbolDecimal: any;
168
+ declare const objSymbolThousand: any;
169
+ declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean) => string;
170
+ declare const roundNumber: (num: number, fraction: number) => number;
171
+
172
+ export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type IFToolbarOptions, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, objSymbolDecimal, objSymbolThousand, roundNumber, useOnClickOutside };
package/dist/index.js CHANGED
@@ -31,6 +31,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var Table_edit_exports = {};
32
32
  __export(Table_edit_exports, {
33
33
  default: () => Table_edit_default,
34
+ formartNumberic: () => formartNumberic,
35
+ generateUUID: () => generateUUID,
36
+ isNullOrUndefined: () => isNullOrUndefined,
34
37
  messageBoxConfirm: () => messageBoxConfirm,
35
38
  messageBoxConfirm2: () => messageBoxConfirm2,
36
39
  messageBoxConfirmDelete: () => messageBoxConfirmDelete,
@@ -38,7 +41,11 @@ __export(Table_edit_exports, {
38
41
  messageHtmlBoxConfirm: () => messageHtmlBoxConfirm,
39
42
  messageHtmlBoxError: () => messageHtmlBoxError,
40
43
  notificationError: () => notificationError,
41
- notificationSuccess: () => notificationSuccess
44
+ notificationSuccess: () => notificationSuccess,
45
+ objSymbolDecimal: () => objSymbolDecimal,
46
+ objSymbolThousand: () => objSymbolThousand,
47
+ roundNumber: () => roundNumber,
48
+ useOnClickOutside: () => useOnClickOutside
42
49
  });
43
50
  module.exports = __toCommonJS(Table_edit_exports);
44
51
 
@@ -269,6 +276,8 @@ var generateUUID = () => {
269
276
  return (c === "x" ? r : 3).toString(16);
270
277
  });
271
278
  };
279
+ var objSymbolDecimal = { 0: ",", 1: "." };
280
+ var objSymbolThousand = { 1: ",", 0: "." };
272
281
  var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone) => {
273
282
  if (isDone) {
274
283
  str = roundNumber(Number(str), fraction);
@@ -281,6 +290,12 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
281
290
  if (arr[0].length < 3) {
282
291
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
283
292
  } else {
293
+ let flagNegative = false;
294
+ if (arr[0][0] === "-") {
295
+ flagNegative = true;
296
+ arr[0] = arr[0].substring(1, arr[0].length);
297
+ console.log(arr[0].substring(1, arr[0].length));
298
+ }
284
299
  let count = 0;
285
300
  for (let i = arr[0].length - 2; i >= 0; i--) {
286
301
  if ((arr[0].length - i - count) % 3 === 0 && i > 0) {
@@ -294,6 +309,9 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
294
309
  if (isDone) {
295
310
  flag = (arr[1]?.substring(0, fraction) ?? "") !== "";
296
311
  }
312
+ if (flagNegative) {
313
+ arr[0] = "-".concat(arr[0]);
314
+ }
297
315
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
298
316
  }
299
317
  } else {
@@ -1561,28 +1579,28 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
1561
1579
  (0, import_react12.useEffect)(() => {
1562
1580
  const arrHeaderColumns = [];
1563
1581
  const arrContentColumns = [];
1564
- let headerLevelCol = 0;
1582
+ let headerLevelRow = 0;
1565
1583
  if (levelCol) {
1566
- headerLevelCol = levelCol;
1584
+ headerLevelRow = levelCol;
1567
1585
  } else {
1568
- headerLevelCol = stretchColumn(columns, 0);
1569
- setLevelCol(headerLevelCol);
1586
+ headerLevelRow = stretchColumn(columns, 0);
1587
+ setLevelCol(headerLevelRow);
1570
1588
  }
1571
- for (let i = 0; i < headerLevelCol; i++) {
1589
+ for (let i = 0; i < headerLevelRow; i++) {
1572
1590
  arrHeaderColumns.push([]);
1573
1591
  }
1574
- getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelCol);
1592
+ getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelRow);
1575
1593
  setHeaderColumns(arrHeaderColumns);
1576
1594
  setContentColumns(arrContentColumns);
1577
1595
  }, [columns]);
1578
- const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevel) => {
1579
- array.forEach((item) => {
1580
- const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[level]?.visible ?? item.visible, rowspan: 1, index: 0 };
1596
+ const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevelRow) => {
1597
+ array.forEach((item, index) => {
1598
+ const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[index]?.visible ?? item.visible, rowspan: 1, index: 0 };
1581
1599
  if (item.columns && item.columns?.length > 0) {
1582
- const countLevel = getNestedChildren(item.columns, arrHeaderColumns, arrContentColumns, level + 1, maxLevel);
1583
- arrHeaderColumns[maxLevel - 1 - countLevel].push(ele);
1600
+ const countLevel = getNestedChildren(item.columns, arrHeaderColumns, arrContentColumns, level + 1, maxLevelRow);
1601
+ arrHeaderColumns[maxLevelRow - 1 - countLevel].push(ele);
1584
1602
  } else {
1585
- ele.rowspan = maxLevel - level;
1603
+ ele.rowspan = maxLevelRow - level;
1586
1604
  ele.index = arrContentColumns.length;
1587
1605
  arrHeaderColumns[level].push(ele);
1588
1606
  arrContentColumns.push(ele);
@@ -1590,11 +1608,11 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
1590
1608
  });
1591
1609
  return level;
1592
1610
  };
1593
- const stretchColumn = (subColumns, headerLevelCol) => {
1594
- let count = headerLevelCol + 1;
1611
+ const stretchColumn = (subColumns, headerLevelRow) => {
1612
+ let count = headerLevelRow + 1;
1595
1613
  subColumns.map((item) => {
1596
1614
  if (item.columns && item.columns.length > 0) {
1597
- const newCount = stretchColumn(item.columns, headerLevelCol + 1);
1615
+ const newCount = stretchColumn(item.columns, headerLevelRow + 1);
1598
1616
  if (newCount > count) {
1599
1617
  count = newCount;
1600
1618
  }
@@ -2592,7 +2610,8 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2592
2610
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
2593
2611
  className: (0, import_classnames10.default)("r-rowcell-content", { "r-is-invalid": errorMessage }),
2594
2612
  style: {
2595
- margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
2613
+ margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2,
2614
+ color: col.editType === "numeric" && Number(row[col.field]) < 0 ? "red" : ""
2596
2615
  },
2597
2616
  children: [
2598
2617
  typeDis === 1 && !refreshRow ? renderEdit(row, col, indexRow, indexCol) : !col.haveToolTip ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -2634,7 +2653,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2634
2653
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2635
2654
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
2636
2655
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2637
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2656
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2638
2657
  maxWidth: col.maxWidth
2639
2658
  },
2640
2659
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -2723,7 +2742,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2723
2742
  ),
2724
2743
  style: {
2725
2744
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2726
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2745
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2727
2746
  top: `${indexParent * 42}px`,
2728
2747
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2729
2748
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
@@ -2760,8 +2779,8 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2760
2779
  style: {
2761
2780
  left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
2762
2781
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
2763
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2764
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2782
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2783
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2765
2784
  maxWidth: col.maxWidth,
2766
2785
  textAlign: col.textAlign ? col.textAlign : "left"
2767
2786
  },
@@ -2882,6 +2901,9 @@ var table_default = TableEdit;
2882
2901
  var Table_edit_default = table_default;
2883
2902
  // Annotate the CommonJS export names for ESM import in node:
2884
2903
  0 && (module.exports = {
2904
+ formartNumberic,
2905
+ generateUUID,
2906
+ isNullOrUndefined,
2885
2907
  messageBoxConfirm,
2886
2908
  messageBoxConfirm2,
2887
2909
  messageBoxConfirmDelete,
@@ -2889,5 +2911,9 @@ var Table_edit_default = table_default;
2889
2911
  messageHtmlBoxConfirm,
2890
2912
  messageHtmlBoxError,
2891
2913
  notificationError,
2892
- notificationSuccess
2914
+ notificationSuccess,
2915
+ objSymbolDecimal,
2916
+ objSymbolThousand,
2917
+ roundNumber,
2918
+ useOnClickOutside
2893
2919
  });
package/dist/index.mjs CHANGED
@@ -225,6 +225,8 @@ var generateUUID = () => {
225
225
  return (c === "x" ? r : 3).toString(16);
226
226
  });
227
227
  };
228
+ var objSymbolDecimal = { 0: ",", 1: "." };
229
+ var objSymbolThousand = { 1: ",", 0: "." };
228
230
  var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone) => {
229
231
  if (isDone) {
230
232
  str = roundNumber(Number(str), fraction);
@@ -237,6 +239,12 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
237
239
  if (arr[0].length < 3) {
238
240
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
239
241
  } else {
242
+ let flagNegative = false;
243
+ if (arr[0][0] === "-") {
244
+ flagNegative = true;
245
+ arr[0] = arr[0].substring(1, arr[0].length);
246
+ console.log(arr[0].substring(1, arr[0].length));
247
+ }
240
248
  let count = 0;
241
249
  for (let i = arr[0].length - 2; i >= 0; i--) {
242
250
  if ((arr[0].length - i - count) % 3 === 0 && i > 0) {
@@ -250,6 +258,9 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
250
258
  if (isDone) {
251
259
  flag = (arr[1]?.substring(0, fraction) ?? "") !== "";
252
260
  }
261
+ if (flagNegative) {
262
+ arr[0] = "-".concat(arr[0]);
263
+ }
253
264
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
254
265
  }
255
266
  } else {
@@ -1527,28 +1538,28 @@ var TableEdit = forwardRef2((props, ref) => {
1527
1538
  useEffect5(() => {
1528
1539
  const arrHeaderColumns = [];
1529
1540
  const arrContentColumns = [];
1530
- let headerLevelCol = 0;
1541
+ let headerLevelRow = 0;
1531
1542
  if (levelCol) {
1532
- headerLevelCol = levelCol;
1543
+ headerLevelRow = levelCol;
1533
1544
  } else {
1534
- headerLevelCol = stretchColumn(columns, 0);
1535
- setLevelCol(headerLevelCol);
1545
+ headerLevelRow = stretchColumn(columns, 0);
1546
+ setLevelCol(headerLevelRow);
1536
1547
  }
1537
- for (let i = 0; i < headerLevelCol; i++) {
1548
+ for (let i = 0; i < headerLevelRow; i++) {
1538
1549
  arrHeaderColumns.push([]);
1539
1550
  }
1540
- getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelCol);
1551
+ getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelRow);
1541
1552
  setHeaderColumns(arrHeaderColumns);
1542
1553
  setContentColumns(arrContentColumns);
1543
1554
  }, [columns]);
1544
- const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevel) => {
1545
- array.forEach((item) => {
1546
- const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[level]?.visible ?? item.visible, rowspan: 1, index: 0 };
1555
+ const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevelRow) => {
1556
+ array.forEach((item, index) => {
1557
+ const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[index]?.visible ?? item.visible, rowspan: 1, index: 0 };
1547
1558
  if (item.columns && item.columns?.length > 0) {
1548
- const countLevel = getNestedChildren(item.columns, arrHeaderColumns, arrContentColumns, level + 1, maxLevel);
1549
- arrHeaderColumns[maxLevel - 1 - countLevel].push(ele);
1559
+ const countLevel = getNestedChildren(item.columns, arrHeaderColumns, arrContentColumns, level + 1, maxLevelRow);
1560
+ arrHeaderColumns[maxLevelRow - 1 - countLevel].push(ele);
1550
1561
  } else {
1551
- ele.rowspan = maxLevel - level;
1562
+ ele.rowspan = maxLevelRow - level;
1552
1563
  ele.index = arrContentColumns.length;
1553
1564
  arrHeaderColumns[level].push(ele);
1554
1565
  arrContentColumns.push(ele);
@@ -1556,11 +1567,11 @@ var TableEdit = forwardRef2((props, ref) => {
1556
1567
  });
1557
1568
  return level;
1558
1569
  };
1559
- const stretchColumn = (subColumns, headerLevelCol) => {
1560
- let count = headerLevelCol + 1;
1570
+ const stretchColumn = (subColumns, headerLevelRow) => {
1571
+ let count = headerLevelRow + 1;
1561
1572
  subColumns.map((item) => {
1562
1573
  if (item.columns && item.columns.length > 0) {
1563
- const newCount = stretchColumn(item.columns, headerLevelCol + 1);
1574
+ const newCount = stretchColumn(item.columns, headerLevelRow + 1);
1564
1575
  if (newCount > count) {
1565
1576
  count = newCount;
1566
1577
  }
@@ -2558,7 +2569,8 @@ var TableEdit = forwardRef2((props, ref) => {
2558
2569
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
2559
2570
  className: classnames6("r-rowcell-content", { "r-is-invalid": errorMessage }),
2560
2571
  style: {
2561
- margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
2572
+ margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2,
2573
+ color: col.editType === "numeric" && Number(row[col.field]) < 0 ? "red" : ""
2562
2574
  },
2563
2575
  children: [
2564
2576
  typeDis === 1 && !refreshRow ? renderEdit(row, col, indexRow, indexCol) : !col.haveToolTip ? /* @__PURE__ */ jsx12("div", { className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }) : /* @__PURE__ */ jsx12(
@@ -2600,7 +2612,7 @@ var TableEdit = forwardRef2((props, ref) => {
2600
2612
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2601
2613
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
2602
2614
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2603
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2615
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2604
2616
  maxWidth: col.maxWidth
2605
2617
  },
2606
2618
  children: /* @__PURE__ */ jsx12(
@@ -2689,7 +2701,7 @@ var TableEdit = forwardRef2((props, ref) => {
2689
2701
  ),
2690
2702
  style: {
2691
2703
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2692
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2704
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2693
2705
  top: `${indexParent * 42}px`,
2694
2706
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2695
2707
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
@@ -2726,8 +2738,8 @@ var TableEdit = forwardRef2((props, ref) => {
2726
2738
  style: {
2727
2739
  left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
2728
2740
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
2729
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2730
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2741
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2742
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2731
2743
  maxWidth: col.maxWidth,
2732
2744
  textAlign: col.textAlign ? col.textAlign : "left"
2733
2745
  },
@@ -2848,6 +2860,9 @@ var table_default = TableEdit;
2848
2860
  var Table_edit_default = table_default;
2849
2861
  export {
2850
2862
  Table_edit_default as default,
2863
+ formartNumberic,
2864
+ generateUUID,
2865
+ isNullOrUndefined,
2851
2866
  messageBoxConfirm,
2852
2867
  messageBoxConfirm2,
2853
2868
  messageBoxConfirmDelete,
@@ -2855,5 +2870,9 @@ export {
2855
2870
  messageHtmlBoxConfirm,
2856
2871
  messageHtmlBoxError,
2857
2872
  notificationError,
2858
- notificationSuccess
2873
+ notificationSuccess,
2874
+ objSymbolDecimal,
2875
+ objSymbolThousand,
2876
+ roundNumber,
2877
+ useOnClickOutside
2859
2878
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
3
  "license": "MIT",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",