react-table-edit 1.2.2 → 1.2.4

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/README.md ADDED
File without changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, Dispatch, SetStateAction } from 'react';
3
- import { TFunction } from 'i18next';
3
+ import { TFunction } from 'react-i18next';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
6
6
  type IFColumnSelectTable = {
@@ -16,6 +16,14 @@ type IFColumnSelectTable = {
16
16
  maxWidth?: number;
17
17
  minWidth?: number;
18
18
  };
19
+ type IFTableSelectFormat = {
20
+ dateFormat?: string;
21
+ decimalSeparator?: string;
22
+ thousandSeparator?: string;
23
+ colorNegative?: string;
24
+ prefixNegative?: string;
25
+ suffixNegative?: string;
26
+ };
19
27
  type Props$1 = {
20
28
  id?: string;
21
29
  component?: any;
@@ -39,12 +47,11 @@ type Props$1 = {
39
47
  noHeader?: boolean;
40
48
  maxHeight?: number;
41
49
  columns?: IFColumnSelectTable[];
42
- decimalSeparator?: string;
43
- thousandSeparator?: string;
44
50
  isClearable?: boolean;
45
51
  isDisabled?: boolean;
46
52
  showFooter?: boolean;
47
53
  onPaste?: any;
54
+ formatSetting?: IFTableSelectFormat;
48
55
  };
49
56
  declare const SelectTable: react__default.ForwardRefExoticComponent<Props$1 & react__default.RefAttributes<unknown>>;
50
57
 
@@ -96,6 +103,7 @@ type ISettingNumericElement = {
96
103
  min?: number;
97
104
  max?: number;
98
105
  fraction?: number;
106
+ allowNegative?: boolean;
99
107
  };
100
108
  type IColumnTable = {
101
109
  field: string;
@@ -159,6 +167,14 @@ type IFTableEditSearchSetting = {
159
167
  keyField?: string[];
160
168
  setSearchTerm?: Dispatch<SetStateAction<string>>;
161
169
  };
170
+ type IFTableEditFormat = {
171
+ dateFormat?: string;
172
+ decimalSeparator?: string;
173
+ thousandSeparator?: string;
174
+ colorNegative?: string;
175
+ prefixNegative?: string;
176
+ suffixNegative?: string;
177
+ };
162
178
  type IFTableEditProps = {
163
179
  idTable?: string;
164
180
  dataSource: any[];
@@ -176,11 +192,10 @@ type IFTableEditProps = {
176
192
  selectedItem?: any;
177
193
  setSelectedItem?: Dispatch<SetStateAction<any>>;
178
194
  isMulti?: boolean;
179
- haveSum?: boolean;
180
195
  editDisable?: boolean;
181
196
  addDisable?: boolean;
182
- decimalSeparator?: string;
183
- thousandSeparator?: string;
197
+ haveSum?: boolean;
198
+ formatSetting?: IFTableEditFormat;
184
199
  pagingSetting?: IFTableEditPaging;
185
200
  buttonSetting?: IFTableEditButton;
186
201
  toolbarSetting?: IFTableEditToolbar;
@@ -248,9 +263,7 @@ declare const generateUUID: () => string;
248
263
  * @param isDone đã nhập xong
249
264
  * @returns
250
265
  */
251
- declare const objSymbolDecimal: any;
252
- declare const objSymbolThousand: any;
253
- declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean) => string;
266
+ declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
254
267
  declare const roundNumber: (num: number, fraction: number) => number;
255
268
 
256
269
  type IFDataProps = {
@@ -278,6 +291,14 @@ type IFColumnSelectTableTree = {
278
291
  maxWidth?: number;
279
292
  minWidth?: number;
280
293
  };
294
+ type IFTableTreeSelectFormat = {
295
+ dateFormat?: string;
296
+ decimalSeparator?: string;
297
+ thousandSeparator?: string;
298
+ colorNegative?: string;
299
+ prefixNegative?: string;
300
+ suffixNegative?: string;
301
+ };
281
302
  type Props = {
282
303
  id?: string;
283
304
  component?: any;
@@ -301,13 +322,12 @@ type Props = {
301
322
  noHeader?: boolean;
302
323
  maxHeight?: number;
303
324
  columns?: IFColumnSelectTableTree[];
304
- decimalSeparator?: string;
305
325
  fieldChildren?: string;
306
- thousandSeparator?: string;
307
326
  isClearable?: boolean;
308
327
  isDisabled?: boolean;
309
328
  showFooter?: boolean;
310
329
  selectChilds?: boolean;
330
+ formatSetting?: IFTableTreeSelectFormat;
311
331
  onPaste?: any;
312
332
  };
313
333
  declare const SelectTableTree: react__default.ForwardRefExoticComponent<Props & react__default.RefAttributes<unknown>>;
@@ -335,4 +355,4 @@ interface IFDataInputStyle {
335
355
  }
336
356
  declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
337
357
 
338
- export { type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditButton, type IFTableEditPaging, type IFTableEditProps, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, objSymbolDecimal, objSymbolThousand, roundNumber, useOnClickOutside };
358
+ export { type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditProps, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, Dispatch, SetStateAction } from 'react';
3
- import { TFunction } from 'i18next';
3
+ import { TFunction } from 'react-i18next';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
6
6
  type IFColumnSelectTable = {
@@ -16,6 +16,14 @@ type IFColumnSelectTable = {
16
16
  maxWidth?: number;
17
17
  minWidth?: number;
18
18
  };
19
+ type IFTableSelectFormat = {
20
+ dateFormat?: string;
21
+ decimalSeparator?: string;
22
+ thousandSeparator?: string;
23
+ colorNegative?: string;
24
+ prefixNegative?: string;
25
+ suffixNegative?: string;
26
+ };
19
27
  type Props$1 = {
20
28
  id?: string;
21
29
  component?: any;
@@ -39,12 +47,11 @@ type Props$1 = {
39
47
  noHeader?: boolean;
40
48
  maxHeight?: number;
41
49
  columns?: IFColumnSelectTable[];
42
- decimalSeparator?: string;
43
- thousandSeparator?: string;
44
50
  isClearable?: boolean;
45
51
  isDisabled?: boolean;
46
52
  showFooter?: boolean;
47
53
  onPaste?: any;
54
+ formatSetting?: IFTableSelectFormat;
48
55
  };
49
56
  declare const SelectTable: react__default.ForwardRefExoticComponent<Props$1 & react__default.RefAttributes<unknown>>;
50
57
 
@@ -96,6 +103,7 @@ type ISettingNumericElement = {
96
103
  min?: number;
97
104
  max?: number;
98
105
  fraction?: number;
106
+ allowNegative?: boolean;
99
107
  };
100
108
  type IColumnTable = {
101
109
  field: string;
@@ -159,6 +167,14 @@ type IFTableEditSearchSetting = {
159
167
  keyField?: string[];
160
168
  setSearchTerm?: Dispatch<SetStateAction<string>>;
161
169
  };
170
+ type IFTableEditFormat = {
171
+ dateFormat?: string;
172
+ decimalSeparator?: string;
173
+ thousandSeparator?: string;
174
+ colorNegative?: string;
175
+ prefixNegative?: string;
176
+ suffixNegative?: string;
177
+ };
162
178
  type IFTableEditProps = {
163
179
  idTable?: string;
164
180
  dataSource: any[];
@@ -176,11 +192,10 @@ type IFTableEditProps = {
176
192
  selectedItem?: any;
177
193
  setSelectedItem?: Dispatch<SetStateAction<any>>;
178
194
  isMulti?: boolean;
179
- haveSum?: boolean;
180
195
  editDisable?: boolean;
181
196
  addDisable?: boolean;
182
- decimalSeparator?: string;
183
- thousandSeparator?: string;
197
+ haveSum?: boolean;
198
+ formatSetting?: IFTableEditFormat;
184
199
  pagingSetting?: IFTableEditPaging;
185
200
  buttonSetting?: IFTableEditButton;
186
201
  toolbarSetting?: IFTableEditToolbar;
@@ -248,9 +263,7 @@ declare const generateUUID: () => string;
248
263
  * @param isDone đã nhập xong
249
264
  * @returns
250
265
  */
251
- declare const objSymbolDecimal: any;
252
- declare const objSymbolThousand: any;
253
- declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean) => string;
266
+ declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
254
267
  declare const roundNumber: (num: number, fraction: number) => number;
255
268
 
256
269
  type IFDataProps = {
@@ -278,6 +291,14 @@ type IFColumnSelectTableTree = {
278
291
  maxWidth?: number;
279
292
  minWidth?: number;
280
293
  };
294
+ type IFTableTreeSelectFormat = {
295
+ dateFormat?: string;
296
+ decimalSeparator?: string;
297
+ thousandSeparator?: string;
298
+ colorNegative?: string;
299
+ prefixNegative?: string;
300
+ suffixNegative?: string;
301
+ };
281
302
  type Props = {
282
303
  id?: string;
283
304
  component?: any;
@@ -301,13 +322,12 @@ type Props = {
301
322
  noHeader?: boolean;
302
323
  maxHeight?: number;
303
324
  columns?: IFColumnSelectTableTree[];
304
- decimalSeparator?: string;
305
325
  fieldChildren?: string;
306
- thousandSeparator?: string;
307
326
  isClearable?: boolean;
308
327
  isDisabled?: boolean;
309
328
  showFooter?: boolean;
310
329
  selectChilds?: boolean;
330
+ formatSetting?: IFTableTreeSelectFormat;
311
331
  onPaste?: any;
312
332
  };
313
333
  declare const SelectTableTree: react__default.ForwardRefExoticComponent<Props & react__default.RefAttributes<unknown>>;
@@ -335,4 +355,4 @@ interface IFDataInputStyle {
335
355
  }
336
356
  declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
337
357
 
338
- export { type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditButton, type IFTableEditPaging, type IFTableEditProps, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, objSymbolDecimal, objSymbolThousand, roundNumber, useOnClickOutside };
358
+ export { type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditProps, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
package/dist/index.js CHANGED
@@ -27,16 +27,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // index.ts
31
- var Table_edit_exports = {};
32
- __export(Table_edit_exports, {
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
33
  InputStyleComponent: () => InputStyleComponent,
34
34
  SelectTable: () => SelectTable,
35
35
  SelectTableTree: () => SelectTableTree,
36
36
  TabsMenuComponent: () => TabsMenuComponent,
37
37
  checkDecimalSeparator: () => checkDecimalSeparator,
38
38
  checkThousandSeparator: () => checkThousandSeparator,
39
- default: () => Table_edit_default,
39
+ default: () => src_default,
40
40
  formartNumberic: () => formartNumberic,
41
41
  generateUUID: () => generateUUID,
42
42
  isNullOrUndefined: () => isNullOrUndefined,
@@ -48,21 +48,19 @@ __export(Table_edit_exports, {
48
48
  messageHtmlBoxError: () => messageHtmlBoxError,
49
49
  notificationError: () => notificationError,
50
50
  notificationSuccess: () => notificationSuccess,
51
- objSymbolDecimal: () => objSymbolDecimal,
52
- objSymbolThousand: () => objSymbolThousand,
53
51
  roundNumber: () => roundNumber,
54
52
  useOnClickOutside: () => useOnClickOutside
55
53
  });
56
- module.exports = __toCommonJS(Table_edit_exports);
54
+ module.exports = __toCommonJS(src_exports);
57
55
 
58
- // test-app/src/component/table/index.tsx
56
+ // src/component/table/index.tsx
59
57
  var import_react16 = require("react");
60
58
  var import_reactstrap11 = require("reactstrap");
61
59
  var import_classnames14 = __toESM(require("classnames"));
62
60
  var import_react_i18next12 = require("react-i18next");
63
61
  var import_becoxy_icons7 = require("becoxy-icons");
64
62
 
65
- // test-app/src/component/react-input/index.tsx
63
+ // src/component/react-input/index.tsx
66
64
  var import_becoxy_icons = require("becoxy-icons");
67
65
  var import_classnames = __toESM(require("classnames"));
68
66
  var import_react = require("react");
@@ -99,7 +97,7 @@ var ReactInput = (props) => {
99
97
  };
100
98
  var react_input_default = ReactInput;
101
99
 
102
- // test-app/src/component/notifications.tsx
100
+ // src/component/notifications.tsx
103
101
  var import_react2 = require("react");
104
102
  var import_sweetalert2 = __toESM(require("sweetalert2"));
105
103
  var import_sweetalert2_react_content = __toESM(require("sweetalert2-react-content"));
@@ -236,7 +234,7 @@ var messageBoxConfirm2 = async (t, data, data2, message) => {
236
234
  });
237
235
  };
238
236
 
239
- // test-app/src/component/utils.ts
237
+ // src/component/utils.ts
240
238
  var import_react3 = require("react");
241
239
  var useOnClickOutside = (ref, handler) => {
242
240
  (0, import_react3.useEffect)(
@@ -314,9 +312,7 @@ var generateUUID = () => {
314
312
  return (c === "x" ? r : 3).toString(16);
315
313
  });
316
314
  };
317
- var objSymbolDecimal = { 0: ",", 1: "." };
318
- var objSymbolThousand = { 1: ",", 0: "." };
319
- var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone) => {
315
+ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone, haveNegative = true) => {
320
316
  if (isDone) {
321
317
  str = roundNumber(Number(str), fraction);
322
318
  }
@@ -332,7 +328,6 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
332
328
  if (arr[0][0] === "-") {
333
329
  flagNegative = true;
334
330
  arr[0] = arr[0].substring(1, arr[0].length);
335
- console.log(arr[0].substring(1, arr[0].length));
336
331
  }
337
332
  let count = 0;
338
333
  for (let i = arr[0].length - 2; i >= 0; i--) {
@@ -347,7 +342,7 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
347
342
  if (isDone) {
348
343
  flag = (arr[1]?.substring(0, fraction) ?? "") !== "";
349
344
  }
350
- if (flagNegative) {
345
+ if (flagNegative && haveNegative) {
351
346
  arr[0] = "-".concat(arr[0]);
352
347
  }
353
348
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
@@ -362,10 +357,10 @@ var roundNumber = (num, fraction) => {
362
357
  return result;
363
358
  };
364
359
 
365
- // test-app/src/component/table/index.tsx
360
+ // src/component/table/index.tsx
366
361
  var import_moment3 = __toESM(require("moment"));
367
362
 
368
- // test-app/src/component/edit-form/index.tsx
363
+ // src/component/edit-form/index.tsx
369
364
  var import_react8 = require("react");
370
365
  var import_reactstrap6 = require("reactstrap");
371
366
  var import_react_hook_form4 = require("react-hook-form");
@@ -373,7 +368,7 @@ var import_yup = require("@hookform/resolvers/yup");
373
368
  var import_react_i18next5 = require("react-i18next");
374
369
  var import_classnames6 = __toESM(require("classnames"));
375
370
 
376
- // test-app/src/component/input-text/index.tsx
371
+ // src/component/input-text/index.tsx
377
372
  var import_react_hook_form = require("react-hook-form");
378
373
  var import_reactstrap2 = require("reactstrap");
379
374
  var import_classnames2 = __toESM(require("classnames"));
@@ -464,7 +459,7 @@ var TextInput = (props) => {
464
459
  };
465
460
  var input_text_default = TextInput;
466
461
 
467
- // test-app/src/component/input-number/index.tsx
462
+ // src/component/input-number/index.tsx
468
463
  var import_react_hook_form2 = require("react-hook-form");
469
464
  var import_reactstrap3 = require("reactstrap");
470
465
  var import_classnames3 = __toESM(require("classnames"));
@@ -598,13 +593,13 @@ var NumberInput = (props) => {
598
593
  };
599
594
  var input_number_default = NumberInput;
600
595
 
601
- // test-app/src/component/edit-form/select-table/index.tsx
596
+ // src/component/edit-form/select-table/index.tsx
602
597
  var import_react_hook_form3 = require("react-hook-form");
603
598
  var import_reactstrap5 = require("reactstrap");
604
599
  var import_classnames5 = __toESM(require("classnames"));
605
600
  var import_react7 = require("react");
606
601
 
607
- // test-app/src/component/select-table/index.tsx
602
+ // src/component/select-table/index.tsx
608
603
  var import_react6 = __toESM(require("react"));
609
604
  var import_reactstrap4 = require("reactstrap");
610
605
  var import_react_i18next3 = require("react-i18next");
@@ -624,8 +619,6 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
624
619
  textAlign,
625
620
  options,
626
621
  columns,
627
- decimalSeparator,
628
- thousandSeparator,
629
622
  onChange,
630
623
  value,
631
624
  fieldValue,
@@ -641,6 +634,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
641
634
  isDisabled,
642
635
  showFooter,
643
636
  footerComponent,
637
+ formatSetting,
644
638
  onPaste
645
639
  } = props;
646
640
  const selectTableRef = (0, import_react6.useRef)();
@@ -919,7 +913,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
919
913
  (columns ? columns : defaultColumns).map((col, indexCol) => {
920
914
  let valueDisplay = row[col.field];
921
915
  if (col.type === "numeric" || col.typeCondition && col.typeCondition(row) === "numeric") {
922
- valueDisplay = formartNumberic(row[col.field], decimalSeparator ?? ".", thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
916
+ valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ".", formatSetting?.thousandSeparator ?? ",", col.fraction ?? 0, true, false) ?? 0;
923
917
  } else if (col.type === "date") {
924
918
  valueDisplay = valueDisplay ? (0, import_moment.default)(valueDisplay).format("DD/MM/yyyy") : "";
925
919
  } else if (col.type === "datetime") {
@@ -965,7 +959,10 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
965
959
  }
966
960
  e.stopPropagation();
967
961
  },
968
- children: col.template ? col.template(row, indexRow) : valueDisplay
962
+ children: col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
963
+ " ",
964
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
965
+ ] }) : valueDisplay
969
966
  },
970
967
  `col-${indexRow}-${indexCol}`
971
968
  ),
@@ -1173,7 +1170,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
1173
1170
  );
1174
1171
  });
1175
1172
 
1176
- // test-app/src/component/edit-form/select-table/index.tsx
1173
+ // src/component/edit-form/select-table/index.tsx
1177
1174
  var import_react_i18next4 = require("react-i18next");
1178
1175
  var import_jsx_runtime6 = require("react/jsx-runtime");
1179
1176
  var SelectTableBox = (props) => {
@@ -1290,7 +1287,7 @@ var SelectTableBox = (props) => {
1290
1287
  };
1291
1288
  var select_table_default = SelectTableBox;
1292
1289
 
1293
- // test-app/src/component/edit-form/index.tsx
1290
+ // src/component/edit-form/index.tsx
1294
1291
  var import_jsx_runtime7 = require("react/jsx-runtime");
1295
1292
  var defaultWidth = 200;
1296
1293
  var EditForm = (0, import_react8.forwardRef)((props, ref) => {
@@ -1626,12 +1623,12 @@ var EditForm = (0, import_react8.forwardRef)((props, ref) => {
1626
1623
  });
1627
1624
  var edit_form_default = EditForm;
1628
1625
 
1629
- // test-app/src/component/sidebar-setting-column/index.tsx
1626
+ // src/component/sidebar-setting-column/index.tsx
1630
1627
  var import_react10 = require("react");
1631
1628
  var import_reactstrap7 = require("reactstrap");
1632
1629
  var import_react_i18next7 = require("react-i18next");
1633
1630
 
1634
- // test-app/src/component/modal-header/index.tsx
1631
+ // src/component/modal-header/index.tsx
1635
1632
  var import_becoxy_icons3 = require("becoxy-icons");
1636
1633
  var import_classnames7 = __toESM(require("classnames"));
1637
1634
  var import_react_i18next6 = require("react-i18next");
@@ -1675,7 +1672,7 @@ var ModalHeader = (props) => {
1675
1672
  };
1676
1673
  var modal_header_default = ModalHeader;
1677
1674
 
1678
- // test-app/src/component/sidebar/index.tsx
1675
+ // src/component/sidebar/index.tsx
1679
1676
  var import_becoxy_icons4 = require("becoxy-icons");
1680
1677
  var import_classnames8 = __toESM(require("classnames"));
1681
1678
  var import_react9 = require("react");
@@ -1779,7 +1776,7 @@ var Sidebar = (props) => {
1779
1776
  };
1780
1777
  var sidebar_default = Sidebar;
1781
1778
 
1782
- // test-app/src/component/sidebar-setting-column/index.tsx
1779
+ // src/component/sidebar-setting-column/index.tsx
1783
1780
  var import_classnames9 = __toESM(require("classnames"));
1784
1781
  var import_jsx_runtime10 = require("react/jsx-runtime");
1785
1782
  var SidebarSetColumn = (props) => {
@@ -2031,7 +2028,7 @@ var SidebarSetColumn = (props) => {
2031
2028
  };
2032
2029
  var sidebar_setting_column_default = SidebarSetColumn;
2033
2030
 
2034
- // test-app/src/component/table/paging/index.tsx
2031
+ // src/component/table/paging/index.tsx
2035
2032
  var import_becoxy_icons5 = require("becoxy-icons");
2036
2033
  var import_classnames10 = __toESM(require("classnames"));
2037
2034
  var import_react11 = require("react");
@@ -2117,7 +2114,7 @@ var PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOpt
2117
2114
  ] }) });
2118
2115
  };
2119
2116
 
2120
- // test-app/src/component/table/header.tsx
2117
+ // src/component/table/header.tsx
2121
2118
  var import_react12 = require("react");
2122
2119
  var import_classnames11 = __toESM(require("classnames"));
2123
2120
  var import_reactstrap8 = require("reactstrap");
@@ -2207,13 +2204,13 @@ var HeaderTableCol = (props) => {
2207
2204
  };
2208
2205
  var header_default = HeaderTableCol;
2209
2206
 
2210
- // test-app/src/component/table/command.tsx
2207
+ // src/component/table/command.tsx
2211
2208
  var import_react14 = require("react");
2212
2209
  var import_classnames12 = __toESM(require("classnames"));
2213
2210
  var import_reactstrap9 = require("reactstrap");
2214
2211
  var import_react_i18next10 = require("react-i18next");
2215
2212
 
2216
- // test-app/src/component/icon/index.tsx
2213
+ // src/component/icon/index.tsx
2217
2214
  var Icon = __toESM(require("becoxy-icons"));
2218
2215
  var import_react13 = require("react");
2219
2216
  var import_jsx_runtime13 = require("react/jsx-runtime");
@@ -2228,7 +2225,7 @@ var IconCustom = (props) => {
2228
2225
  };
2229
2226
  var icon_default = IconCustom;
2230
2227
 
2231
- // test-app/src/component/table/command.tsx
2228
+ // src/component/table/command.tsx
2232
2229
  var import_jsx_runtime14 = require("react/jsx-runtime");
2233
2230
  var CommandElement = (props) => {
2234
2231
  const { commandItems, rowData, indexRow, handleCommandClick, indexFocus, setIndexFocus } = props;
@@ -2262,7 +2259,7 @@ var CommandElement = (props) => {
2262
2259
  };
2263
2260
  var command_default = CommandElement;
2264
2261
 
2265
- // test-app/src/component/select-table-tree/index.tsx
2262
+ // src/component/select-table-tree/index.tsx
2266
2263
  var import_react15 = __toESM(require("react"));
2267
2264
  var import_reactstrap10 = require("reactstrap");
2268
2265
  var import_react_i18next11 = require("react-i18next");
@@ -2282,8 +2279,6 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2282
2279
  textAlign,
2283
2280
  options,
2284
2281
  columns,
2285
- decimalSeparator,
2286
- thousandSeparator,
2287
2282
  onChange,
2288
2283
  value,
2289
2284
  fieldValue,
@@ -2300,6 +2295,7 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2300
2295
  showFooter,
2301
2296
  selectChilds,
2302
2297
  footerComponent,
2298
+ formatSetting,
2303
2299
  onPaste
2304
2300
  } = props;
2305
2301
  const selectTableRef = (0, import_react15.useRef)();
@@ -2541,7 +2537,7 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2541
2537
  (columns ? columns : defaultColumns).map((col, indexCol) => {
2542
2538
  let valueDisplay = row[col.field];
2543
2539
  if (col.type === "numeric" || col.typeCondition && col.typeCondition(row) === "numeric") {
2544
- valueDisplay = formartNumberic(row[col.field], decimalSeparator ?? ".", thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
2540
+ valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ".", formatSetting?.thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
2545
2541
  } else if (col.type === "date") {
2546
2542
  valueDisplay = valueDisplay ? (0, import_moment2.default)(valueDisplay).format("DD/MM/yyyy") : "";
2547
2543
  } else if (col.type === "datetime") {
@@ -2611,12 +2607,18 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2611
2607
  className: (0, import_classnames13.default)("me-50 r-icon-expand", { "is-open": expanded })
2612
2608
  }
2613
2609
  ),
2614
- col.template ? col.template(row, indexRow) : valueDisplay
2610
+ col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
2611
+ " ",
2612
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
2613
+ ] }) : valueDisplay
2615
2614
  ]
2616
2615
  },
2617
2616
  `col-${indexRow}-${indexCol}`
2618
2617
  ),
2619
- checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : valueDisplay })
2618
+ checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
2619
+ " ",
2620
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
2621
+ ] }) : valueDisplay })
2620
2622
  ] }, indexCol);
2621
2623
  })
2622
2624
  ]
@@ -2823,7 +2825,7 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2823
2825
  );
2824
2826
  });
2825
2827
 
2826
- // test-app/src/component/table/index.tsx
2828
+ // src/component/table/index.tsx
2827
2829
  var import_react_number_format = require("react-number-format");
2828
2830
  var import_jsx_runtime16 = require("react/jsx-runtime");
2829
2831
  var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
@@ -2841,7 +2843,6 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2841
2843
  maxHeight,
2842
2844
  minHeight,
2843
2845
  defaultValue,
2844
- haveSum,
2845
2846
  toolbarSetting,
2846
2847
  searchSetting,
2847
2848
  setSelectedItem,
@@ -2850,9 +2851,9 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2850
2851
  editDisable,
2851
2852
  addDisable,
2852
2853
  buttonSetting,
2853
- decimalSeparator = ",",
2854
- thousandSeparator = ".",
2854
+ formatSetting,
2855
2855
  handleSelect,
2856
+ haveSum,
2856
2857
  isMulti
2857
2858
  } = props;
2858
2859
  (0, import_react16.useImperativeHandle)(ref, () => {
@@ -3128,8 +3129,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3128
3129
  component: gridRef,
3129
3130
  columns: col.selectSettings?.columns,
3130
3131
  isClearable: col.selectSettings?.isClearable ?? false,
3131
- decimalSeparator,
3132
- thousandSeparator,
3132
+ formatSetting,
3133
3133
  placeholder: t("Select"),
3134
3134
  loadOptions: col.selectSettings?.loadOptions,
3135
3135
  handleAdd: col.selectSettings?.handAddNew,
@@ -3210,8 +3210,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3210
3210
  component: gridRef,
3211
3211
  columns: col.selectSettings?.columns,
3212
3212
  isClearable: col.selectSettings?.isClearable ?? false,
3213
- decimalSeparator,
3214
- thousandSeparator,
3213
+ formatSetting,
3215
3214
  placeholder: t("Select"),
3216
3215
  loadOptions: col.selectSettings?.loadOptions,
3217
3216
  handleAdd: col.selectSettings?.handAddNew,
@@ -3266,9 +3265,9 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3266
3265
  case "numeric":
3267
3266
  const numericFormatProps = {
3268
3267
  value: !isNullOrUndefined(row[col.field]) ? row[col.field] : "",
3269
- thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
3270
- decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
3271
- // allowNegative: (allowNegative ? allowNegative : configNumber?.allowNegative) ?? false,
3268
+ thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
3269
+ decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
3270
+ allowNegative: col.numericSettings?.allowNegative ?? false,
3272
3271
  decimalScale: col.numericSettings?.fraction ?? 0
3273
3272
  };
3274
3273
  let floatValue = parseFloat(row[col.field]);
@@ -3278,7 +3277,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3278
3277
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3279
3278
  style: { textAlign: col.textAlign, height: 29 },
3280
3279
  ...numericFormatProps,
3281
- defaultValue: formartNumberic(row[col.field], decimalSeparator, thousandSeparator, col.numericSettings?.fraction),
3280
+ defaultValue: formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction),
3282
3281
  className: (0, import_classnames14.default)("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3283
3282
  onValueChange: (values) => {
3284
3283
  floatValue = values?.floatValue;
@@ -3912,7 +3911,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3912
3911
  className: "cursor-pointer",
3913
3912
  onChange: () => {
3914
3913
  },
3915
- style: { textAlign: col.textAlign ?? "center", marginTop: 6 }
3914
+ style: { textAlign: col.textAlign ?? "center" }
3916
3915
  }
3917
3916
  )
3918
3917
  }
@@ -3923,7 +3922,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3923
3922
  } else {
3924
3923
  let value = row[col.field];
3925
3924
  if (col.editType === "numeric" || col.editTypeCondition && col.editTypeCondition(row) === "numeric") {
3926
- value = formartNumberic(row[col.field], decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) ?? 0;
3925
+ value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true, false) ?? 0;
3927
3926
  } else if (col.editType === "date") {
3928
3927
  value = value ? (0, import_moment3.default)(value).format("DD/MM/yyyy") : "";
3929
3928
  } else if (col.editType === "datetime") {
@@ -3981,13 +3980,18 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3981
3980
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
3982
3981
  className: (0, import_classnames14.default)("r-rowcell-content", { "r-is-invalid": errorMessage }),
3983
3982
  style: {
3984
- margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2,
3985
- color: col.editType === "numeric" && Number(row[col.field]) < 0 ? "red" : ""
3983
+ margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
3986
3984
  },
3987
3985
  children: [
3988
- typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }),
3986
+ typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : col.editType === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
3987
+ " ",
3988
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
3989
+ ] }) : value }),
3989
3990
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { id: `error-${indexRow}-${indexCol}`, className: (0, import_classnames14.default)("cursor-pointer text-primary icon-table", { "d-none": !errorMessage }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.AlertCircle, { fontSize: 15.5 }) }),
3990
- !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : value }),
3991
+ !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : col.editType === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
3992
+ " ",
3993
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
3994
+ ] }) : value }),
3991
3995
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3992
3996
  import_reactstrap11.UncontrolledTooltip,
3993
3997
  {
@@ -4025,7 +4029,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4025
4029
  },
4026
4030
  children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
4027
4031
  return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
4028
- }, 0), decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) : "" })
4032
+ }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : "" })
4029
4033
  }
4030
4034
  ) }, `summarycell-${indexCol}`);
4031
4035
  };
@@ -4187,7 +4191,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4187
4191
  });
4188
4192
  var table_default = TableEdit;
4189
4193
 
4190
- // test-app/src/component/tab-menu/index.tsx
4194
+ // src/component/tab-menu/index.tsx
4191
4195
  var import_becoxy_icons8 = require("becoxy-icons");
4192
4196
  var import_classnames15 = __toESM(require("classnames"));
4193
4197
  var import_react17 = require("react");
@@ -4323,13 +4327,13 @@ var TabsMenuComponent = ({
4323
4327
  ] });
4324
4328
  };
4325
4329
 
4326
- // test-app/src/component/input-style/index.tsx
4330
+ // src/component/input-style/index.tsx
4327
4331
  var import_becoxy_icons9 = require("becoxy-icons");
4328
4332
  var import_reactstrap13 = require("reactstrap");
4329
4333
  var import_classnames16 = __toESM(require("classnames"));
4330
4334
  var import_react18 = require("react");
4331
4335
 
4332
- // test-app/src/component/input-style/fonts.ts
4336
+ // src/component/input-style/fonts.ts
4333
4337
  var OptionFont = [
4334
4338
  {
4335
4339
  value: 1,
@@ -5185,7 +5189,7 @@ var OptionFont = [
5185
5189
  }
5186
5190
  ];
5187
5191
 
5188
- // test-app/src/component/input-style/index.tsx
5192
+ // src/component/input-style/index.tsx
5189
5193
  var import_jsx_runtime18 = require("react/jsx-runtime");
5190
5194
  var InputStyleComponent = (props) => {
5191
5195
  const {
@@ -5318,8 +5322,8 @@ var InputStyleComponent = (props) => {
5318
5322
  ] }) });
5319
5323
  };
5320
5324
 
5321
- // index.ts
5322
- var Table_edit_default = table_default;
5325
+ // src/index.ts
5326
+ var src_default = table_default;
5323
5327
  // Annotate the CommonJS export names for ESM import in node:
5324
5328
  0 && (module.exports = {
5325
5329
  InputStyleComponent,
@@ -5339,8 +5343,6 @@ var Table_edit_default = table_default;
5339
5343
  messageHtmlBoxError,
5340
5344
  notificationError,
5341
5345
  notificationSuccess,
5342
- objSymbolDecimal,
5343
- objSymbolThousand,
5344
5346
  roundNumber,
5345
5347
  useOnClickOutside
5346
5348
  });
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- // test-app/src/component/table/index.tsx
1
+ // src/component/table/index.tsx
2
2
  import { Fragment as Fragment20, forwardRef as forwardRef4, useEffect as useEffect9, useImperativeHandle, useRef as useRef4, useState as useState8 } from "react";
3
3
  import { Button as Button6, DropdownMenu as DropdownMenu4, DropdownToggle as DropdownToggle4, Input as Input9, UncontrolledDropdown, UncontrolledTooltip as UncontrolledTooltip5 } from "reactstrap";
4
4
  import classnames9 from "classnames";
5
5
  import { useTranslation as useTranslation12 } from "react-i18next";
6
6
  import { AlertCircle, Info as Info2, Settings } from "becoxy-icons";
7
7
 
8
- // test-app/src/component/react-input/index.tsx
8
+ // src/component/react-input/index.tsx
9
9
  import { X } from "becoxy-icons";
10
10
  import classNames from "classnames";
11
11
  import { Fragment, useEffect, useState } from "react";
@@ -42,7 +42,7 @@ var ReactInput = (props) => {
42
42
  };
43
43
  var react_input_default = ReactInput;
44
44
 
45
- // test-app/src/component/notifications.tsx
45
+ // src/component/notifications.tsx
46
46
  import { Fragment as Fragment2 } from "react";
47
47
  import Swal from "sweetalert2";
48
48
  import withReactContent from "sweetalert2-react-content";
@@ -179,7 +179,7 @@ var messageBoxConfirm2 = async (t, data, data2, message) => {
179
179
  });
180
180
  };
181
181
 
182
- // test-app/src/component/utils.ts
182
+ // src/component/utils.ts
183
183
  import { useEffect as useEffect2 } from "react";
184
184
  var useOnClickOutside = (ref, handler) => {
185
185
  useEffect2(
@@ -257,9 +257,7 @@ var generateUUID = () => {
257
257
  return (c === "x" ? r : 3).toString(16);
258
258
  });
259
259
  };
260
- var objSymbolDecimal = { 0: ",", 1: "." };
261
- var objSymbolThousand = { 1: ",", 0: "." };
262
- var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone) => {
260
+ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10, isDone, haveNegative = true) => {
263
261
  if (isDone) {
264
262
  str = roundNumber(Number(str), fraction);
265
263
  }
@@ -275,7 +273,6 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
275
273
  if (arr[0][0] === "-") {
276
274
  flagNegative = true;
277
275
  arr[0] = arr[0].substring(1, arr[0].length);
278
- console.log(arr[0].substring(1, arr[0].length));
279
276
  }
280
277
  let count = 0;
281
278
  for (let i = arr[0].length - 2; i >= 0; i--) {
@@ -290,7 +287,7 @@ var formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10,
290
287
  if (isDone) {
291
288
  flag = (arr[1]?.substring(0, fraction) ?? "") !== "";
292
289
  }
293
- if (flagNegative) {
290
+ if (flagNegative && haveNegative) {
294
291
  arr[0] = "-".concat(arr[0]);
295
292
  }
296
293
  return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
@@ -305,10 +302,10 @@ var roundNumber = (num, fraction) => {
305
302
  return result;
306
303
  };
307
304
 
308
- // test-app/src/component/table/index.tsx
305
+ // src/component/table/index.tsx
309
306
  import moment3 from "moment";
310
307
 
311
- // test-app/src/component/edit-form/index.tsx
308
+ // src/component/edit-form/index.tsx
312
309
  import { forwardRef as forwardRef2, useEffect as useEffect4, useRef as useRef2, useState as useState3 } from "react";
313
310
  import {
314
311
  DropdownItem as DropdownItem2,
@@ -325,7 +322,7 @@ import { yupResolver } from "@hookform/resolvers/yup";
325
322
  import { useTranslation as useTranslation5 } from "react-i18next";
326
323
  import classNames2 from "classnames";
327
324
 
328
- // test-app/src/component/input-text/index.tsx
325
+ // src/component/input-text/index.tsx
329
326
  import { Controller } from "react-hook-form";
330
327
  import { Input as Input2, Label, FormFeedback } from "reactstrap";
331
328
  import classnames from "classnames";
@@ -416,7 +413,7 @@ var TextInput = (props) => {
416
413
  };
417
414
  var input_text_default = TextInput;
418
415
 
419
- // test-app/src/component/input-number/index.tsx
416
+ // src/component/input-number/index.tsx
420
417
  import { Controller as Controller2 } from "react-hook-form";
421
418
  import { Input as Input3, Label as Label2, FormFeedback as FormFeedback2 } from "reactstrap";
422
419
  import classnames2 from "classnames";
@@ -550,13 +547,13 @@ var NumberInput = (props) => {
550
547
  };
551
548
  var input_number_default = NumberInput;
552
549
 
553
- // test-app/src/component/edit-form/select-table/index.tsx
550
+ // src/component/edit-form/select-table/index.tsx
554
551
  import { Controller as Controller3 } from "react-hook-form";
555
552
  import { FormFeedback as FormFeedback3, Label as Label3, UncontrolledTooltip as UncontrolledTooltip2 } from "reactstrap";
556
553
  import classnames4 from "classnames";
557
554
  import { Fragment as Fragment7 } from "react";
558
555
 
559
- // test-app/src/component/select-table/index.tsx
556
+ // src/component/select-table/index.tsx
560
557
  import React, { forwardRef, Fragment as Fragment5, useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
561
558
  import {
562
559
  DropdownItem,
@@ -585,8 +582,6 @@ var SelectTable = forwardRef((props, ref) => {
585
582
  textAlign,
586
583
  options,
587
584
  columns,
588
- decimalSeparator,
589
- thousandSeparator,
590
585
  onChange,
591
586
  value,
592
587
  fieldValue,
@@ -602,6 +597,7 @@ var SelectTable = forwardRef((props, ref) => {
602
597
  isDisabled,
603
598
  showFooter,
604
599
  footerComponent,
600
+ formatSetting,
605
601
  onPaste
606
602
  } = props;
607
603
  const selectTableRef = useRef();
@@ -880,7 +876,7 @@ var SelectTable = forwardRef((props, ref) => {
880
876
  (columns ? columns : defaultColumns).map((col, indexCol) => {
881
877
  let valueDisplay = row[col.field];
882
878
  if (col.type === "numeric" || col.typeCondition && col.typeCondition(row) === "numeric") {
883
- valueDisplay = formartNumberic(row[col.field], decimalSeparator ?? ".", thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
879
+ valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ".", formatSetting?.thousandSeparator ?? ",", col.fraction ?? 0, true, false) ?? 0;
884
880
  } else if (col.type === "date") {
885
881
  valueDisplay = valueDisplay ? moment(valueDisplay).format("DD/MM/yyyy") : "";
886
882
  } else if (col.type === "datetime") {
@@ -926,7 +922,10 @@ var SelectTable = forwardRef((props, ref) => {
926
922
  }
927
923
  e.stopPropagation();
928
924
  },
929
- children: col.template ? col.template(row, indexRow) : valueDisplay
925
+ children: col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ jsxs5("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
926
+ " ",
927
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
928
+ ] }) : valueDisplay
930
929
  },
931
930
  `col-${indexRow}-${indexCol}`
932
931
  ),
@@ -1134,7 +1133,7 @@ var SelectTable = forwardRef((props, ref) => {
1134
1133
  );
1135
1134
  });
1136
1135
 
1137
- // test-app/src/component/edit-form/select-table/index.tsx
1136
+ // src/component/edit-form/select-table/index.tsx
1138
1137
  import { useTranslation as useTranslation4 } from "react-i18next";
1139
1138
  import { Fragment as Fragment8, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1140
1139
  var SelectTableBox = (props) => {
@@ -1251,7 +1250,7 @@ var SelectTableBox = (props) => {
1251
1250
  };
1252
1251
  var select_table_default = SelectTableBox;
1253
1252
 
1254
- // test-app/src/component/edit-form/index.tsx
1253
+ // src/component/edit-form/index.tsx
1255
1254
  import { Fragment as Fragment9, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1256
1255
  var defaultWidth = 200;
1257
1256
  var EditForm = forwardRef2((props, ref) => {
@@ -1587,12 +1586,12 @@ var EditForm = forwardRef2((props, ref) => {
1587
1586
  });
1588
1587
  var edit_form_default = EditForm;
1589
1588
 
1590
- // test-app/src/component/sidebar-setting-column/index.tsx
1589
+ // src/component/sidebar-setting-column/index.tsx
1591
1590
  import { Fragment as Fragment11, useEffect as useEffect6, useState as useState5 } from "react";
1592
1591
  import { Button as Button3, Input as Input6 } from "reactstrap";
1593
1592
  import { useTranslation as useTranslation7 } from "react-i18next";
1594
1593
 
1595
- // test-app/src/component/modal-header/index.tsx
1594
+ // src/component/modal-header/index.tsx
1596
1595
  import { Edit, Info, Plus as Plus2, X as X2 } from "becoxy-icons";
1597
1596
  import classNames3 from "classnames";
1598
1597
  import { useTranslation as useTranslation6 } from "react-i18next";
@@ -1636,7 +1635,7 @@ var ModalHeader = (props) => {
1636
1635
  };
1637
1636
  var modal_header_default = ModalHeader;
1638
1637
 
1639
- // test-app/src/component/sidebar/index.tsx
1638
+ // src/component/sidebar/index.tsx
1640
1639
  import { ChevronLeft, ChevronRight } from "becoxy-icons";
1641
1640
  import classNames4 from "classnames";
1642
1641
  import { useEffect as useEffect5, useState as useState4 } from "react";
@@ -1740,7 +1739,7 @@ var Sidebar = (props) => {
1740
1739
  };
1741
1740
  var sidebar_default = Sidebar;
1742
1741
 
1743
- // test-app/src/component/sidebar-setting-column/index.tsx
1742
+ // src/component/sidebar-setting-column/index.tsx
1744
1743
  import classnames5 from "classnames";
1745
1744
  import { Fragment as Fragment12, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1746
1745
  var SidebarSetColumn = (props) => {
@@ -1992,7 +1991,7 @@ var SidebarSetColumn = (props) => {
1992
1991
  };
1993
1992
  var sidebar_setting_column_default = SidebarSetColumn;
1994
1993
 
1995
- // test-app/src/component/table/paging/index.tsx
1994
+ // src/component/table/paging/index.tsx
1996
1995
  import { ChevronRight as ChevronRight2, ChevronLeft as ChevronLeft2, ChevronsLeft, ChevronsRight } from "becoxy-icons";
1997
1996
  import classNames5 from "classnames";
1998
1997
  import { Fragment as Fragment13, useEffect as useEffect7, useState as useState6 } from "react";
@@ -2078,7 +2077,7 @@ var PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOpt
2078
2077
  ] }) });
2079
2078
  };
2080
2079
 
2081
- // test-app/src/component/table/header.tsx
2080
+ // src/component/table/header.tsx
2082
2081
  import { Fragment as Fragment14 } from "react";
2083
2082
  import classnames6 from "classnames";
2084
2083
  import { Input as Input7 } from "reactstrap";
@@ -2168,13 +2167,13 @@ var HeaderTableCol = (props) => {
2168
2167
  };
2169
2168
  var header_default = HeaderTableCol;
2170
2169
 
2171
- // test-app/src/component/table/command.tsx
2170
+ // src/component/table/command.tsx
2172
2171
  import { Fragment as Fragment17 } from "react";
2173
2172
  import classnames7 from "classnames";
2174
2173
  import { Button as Button4, UncontrolledTooltip as UncontrolledTooltip3 } from "reactstrap";
2175
2174
  import { useTranslation as useTranslation10 } from "react-i18next";
2176
2175
 
2177
- // test-app/src/component/icon/index.tsx
2176
+ // src/component/icon/index.tsx
2178
2177
  import * as Icon from "becoxy-icons";
2179
2178
  import { Fragment as Fragment16 } from "react";
2180
2179
  import { jsx as jsx13 } from "react/jsx-runtime";
@@ -2189,7 +2188,7 @@ var IconCustom = (props) => {
2189
2188
  };
2190
2189
  var icon_default = IconCustom;
2191
2190
 
2192
- // test-app/src/component/table/command.tsx
2191
+ // src/component/table/command.tsx
2193
2192
  import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2194
2193
  var CommandElement = (props) => {
2195
2194
  const { commandItems, rowData, indexRow, handleCommandClick, indexFocus, setIndexFocus } = props;
@@ -2223,7 +2222,7 @@ var CommandElement = (props) => {
2223
2222
  };
2224
2223
  var command_default = CommandElement;
2225
2224
 
2226
- // test-app/src/component/select-table-tree/index.tsx
2225
+ // src/component/select-table-tree/index.tsx
2227
2226
  import React2, { forwardRef as forwardRef3, Fragment as Fragment18, useEffect as useEffect8, useMemo as useMemo2, useRef as useRef3, useState as useState7 } from "react";
2228
2227
  import {
2229
2228
  DropdownItem as DropdownItem3,
@@ -2251,8 +2250,6 @@ var SelectTableTree = forwardRef3((props, ref) => {
2251
2250
  textAlign,
2252
2251
  options,
2253
2252
  columns,
2254
- decimalSeparator,
2255
- thousandSeparator,
2256
2253
  onChange,
2257
2254
  value,
2258
2255
  fieldValue,
@@ -2269,6 +2266,7 @@ var SelectTableTree = forwardRef3((props, ref) => {
2269
2266
  showFooter,
2270
2267
  selectChilds,
2271
2268
  footerComponent,
2269
+ formatSetting,
2272
2270
  onPaste
2273
2271
  } = props;
2274
2272
  const selectTableRef = useRef3();
@@ -2510,7 +2508,7 @@ var SelectTableTree = forwardRef3((props, ref) => {
2510
2508
  (columns ? columns : defaultColumns).map((col, indexCol) => {
2511
2509
  let valueDisplay = row[col.field];
2512
2510
  if (col.type === "numeric" || col.typeCondition && col.typeCondition(row) === "numeric") {
2513
- valueDisplay = formartNumberic(row[col.field], decimalSeparator ?? ".", thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
2511
+ valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ".", formatSetting?.thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
2514
2512
  } else if (col.type === "date") {
2515
2513
  valueDisplay = valueDisplay ? moment2(valueDisplay).format("DD/MM/yyyy") : "";
2516
2514
  } else if (col.type === "datetime") {
@@ -2580,12 +2578,18 @@ var SelectTableTree = forwardRef3((props, ref) => {
2580
2578
  className: classnames8("me-50 r-icon-expand", { "is-open": expanded })
2581
2579
  }
2582
2580
  ),
2583
- col.template ? col.template(row, indexRow) : valueDisplay
2581
+ col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ jsxs14("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
2582
+ " ",
2583
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
2584
+ ] }) : valueDisplay
2584
2585
  ]
2585
2586
  },
2586
2587
  `col-${indexRow}-${indexCol}`
2587
2588
  ),
2588
- checkOverflow(indexRow, indexCol) && /* @__PURE__ */ jsx15(UncontrolledTooltip4, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : valueDisplay })
2589
+ checkOverflow(indexRow, indexCol) && /* @__PURE__ */ jsx15(UncontrolledTooltip4, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : col.type === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ jsxs14("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
2590
+ " ",
2591
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
2592
+ ] }) : valueDisplay })
2589
2593
  ] }, indexCol);
2590
2594
  })
2591
2595
  ]
@@ -2792,7 +2796,7 @@ var SelectTableTree = forwardRef3((props, ref) => {
2792
2796
  );
2793
2797
  });
2794
2798
 
2795
- // test-app/src/component/table/index.tsx
2799
+ // src/component/table/index.tsx
2796
2800
  import { NumericFormat } from "react-number-format";
2797
2801
  import { Fragment as Fragment21, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2798
2802
  var TableEdit = forwardRef4((props, ref) => {
@@ -2810,7 +2814,6 @@ var TableEdit = forwardRef4((props, ref) => {
2810
2814
  maxHeight,
2811
2815
  minHeight,
2812
2816
  defaultValue,
2813
- haveSum,
2814
2817
  toolbarSetting,
2815
2818
  searchSetting,
2816
2819
  setSelectedItem,
@@ -2819,9 +2822,9 @@ var TableEdit = forwardRef4((props, ref) => {
2819
2822
  editDisable,
2820
2823
  addDisable,
2821
2824
  buttonSetting,
2822
- decimalSeparator = ",",
2823
- thousandSeparator = ".",
2825
+ formatSetting,
2824
2826
  handleSelect,
2827
+ haveSum,
2825
2828
  isMulti
2826
2829
  } = props;
2827
2830
  useImperativeHandle(ref, () => {
@@ -3097,8 +3100,7 @@ var TableEdit = forwardRef4((props, ref) => {
3097
3100
  component: gridRef,
3098
3101
  columns: col.selectSettings?.columns,
3099
3102
  isClearable: col.selectSettings?.isClearable ?? false,
3100
- decimalSeparator,
3101
- thousandSeparator,
3103
+ formatSetting,
3102
3104
  placeholder: t("Select"),
3103
3105
  loadOptions: col.selectSettings?.loadOptions,
3104
3106
  handleAdd: col.selectSettings?.handAddNew,
@@ -3179,8 +3181,7 @@ var TableEdit = forwardRef4((props, ref) => {
3179
3181
  component: gridRef,
3180
3182
  columns: col.selectSettings?.columns,
3181
3183
  isClearable: col.selectSettings?.isClearable ?? false,
3182
- decimalSeparator,
3183
- thousandSeparator,
3184
+ formatSetting,
3184
3185
  placeholder: t("Select"),
3185
3186
  loadOptions: col.selectSettings?.loadOptions,
3186
3187
  handleAdd: col.selectSettings?.handAddNew,
@@ -3235,9 +3236,9 @@ var TableEdit = forwardRef4((props, ref) => {
3235
3236
  case "numeric":
3236
3237
  const numericFormatProps = {
3237
3238
  value: !isNullOrUndefined(row[col.field]) ? row[col.field] : "",
3238
- thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
3239
- decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
3240
- // allowNegative: (allowNegative ? allowNegative : configNumber?.allowNegative) ?? false,
3239
+ thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
3240
+ decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
3241
+ allowNegative: col.numericSettings?.allowNegative ?? false,
3241
3242
  decimalScale: col.numericSettings?.fraction ?? 0
3242
3243
  };
3243
3244
  let floatValue = parseFloat(row[col.field]);
@@ -3247,7 +3248,7 @@ var TableEdit = forwardRef4((props, ref) => {
3247
3248
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3248
3249
  style: { textAlign: col.textAlign, height: 29 },
3249
3250
  ...numericFormatProps,
3250
- defaultValue: formartNumberic(row[col.field], decimalSeparator, thousandSeparator, col.numericSettings?.fraction),
3251
+ defaultValue: formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction),
3251
3252
  className: classnames9("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3252
3253
  onValueChange: (values) => {
3253
3254
  floatValue = values?.floatValue;
@@ -3881,7 +3882,7 @@ var TableEdit = forwardRef4((props, ref) => {
3881
3882
  className: "cursor-pointer",
3882
3883
  onChange: () => {
3883
3884
  },
3884
- style: { textAlign: col.textAlign ?? "center", marginTop: 6 }
3885
+ style: { textAlign: col.textAlign ?? "center" }
3885
3886
  }
3886
3887
  )
3887
3888
  }
@@ -3892,7 +3893,7 @@ var TableEdit = forwardRef4((props, ref) => {
3892
3893
  } else {
3893
3894
  let value = row[col.field];
3894
3895
  if (col.editType === "numeric" || col.editTypeCondition && col.editTypeCondition(row) === "numeric") {
3895
- value = formartNumberic(row[col.field], decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) ?? 0;
3896
+ value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true, false) ?? 0;
3896
3897
  } else if (col.editType === "date") {
3897
3898
  value = value ? moment3(value).format("DD/MM/yyyy") : "";
3898
3899
  } else if (col.editType === "datetime") {
@@ -3950,13 +3951,18 @@ var TableEdit = forwardRef4((props, ref) => {
3950
3951
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
3951
3952
  className: classnames9("r-rowcell-content", { "r-is-invalid": errorMessage }),
3952
3953
  style: {
3953
- margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2,
3954
- color: col.editType === "numeric" && Number(row[col.field]) < 0 ? "red" : ""
3954
+ margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
3955
3955
  },
3956
3956
  children: [
3957
- typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ jsx16("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }),
3957
+ typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ jsx16("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : col.editType === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ jsxs15("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
3958
+ " ",
3959
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
3960
+ ] }) : value }),
3958
3961
  /* @__PURE__ */ jsx16("span", { id: `error-${indexRow}-${indexCol}`, className: classnames9("cursor-pointer text-primary icon-table", { "d-none": !errorMessage }), children: /* @__PURE__ */ jsx16(AlertCircle, { fontSize: 15.5 }) }),
3959
- !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ jsx16(UncontrolledTooltip5, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : value }),
3962
+ !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ jsx16(UncontrolledTooltip5, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : col.editType === "numeric" && Number(row[col.field]) < 0 ? /* @__PURE__ */ jsxs15("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
3963
+ " ",
3964
+ `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
3965
+ ] }) : value }),
3960
3966
  /* @__PURE__ */ jsx16(
3961
3967
  UncontrolledTooltip5,
3962
3968
  {
@@ -3994,7 +4000,7 @@ var TableEdit = forwardRef4((props, ref) => {
3994
4000
  },
3995
4001
  children: /* @__PURE__ */ jsx16("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
3996
4002
  return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
3997
- }, 0), decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) : "" })
4003
+ }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : "" })
3998
4004
  }
3999
4005
  ) }, `summarycell-${indexCol}`);
4000
4006
  };
@@ -4156,7 +4162,7 @@ var TableEdit = forwardRef4((props, ref) => {
4156
4162
  });
4157
4163
  var table_default = TableEdit;
4158
4164
 
4159
- // test-app/src/component/tab-menu/index.tsx
4165
+ // src/component/tab-menu/index.tsx
4160
4166
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "becoxy-icons";
4161
4167
  import classNames6 from "classnames";
4162
4168
  import { Fragment as Fragment22, useEffect as useEffect10, useState as useState9 } from "react";
@@ -4292,13 +4298,13 @@ var TabsMenuComponent = ({
4292
4298
  ] });
4293
4299
  };
4294
4300
 
4295
- // test-app/src/component/input-style/index.tsx
4301
+ // src/component/input-style/index.tsx
4296
4302
  import { Bold, Droplet, Italic, Type, Underline } from "becoxy-icons";
4297
4303
  import { Button as Button7, Input as Input10 } from "reactstrap";
4298
4304
  import classnames10 from "classnames";
4299
4305
  import { Fragment as Fragment23 } from "react";
4300
4306
 
4301
- // test-app/src/component/input-style/fonts.ts
4307
+ // src/component/input-style/fonts.ts
4302
4308
  var OptionFont = [
4303
4309
  {
4304
4310
  value: 1,
@@ -5154,7 +5160,7 @@ var OptionFont = [
5154
5160
  }
5155
5161
  ];
5156
5162
 
5157
- // test-app/src/component/input-style/index.tsx
5163
+ // src/component/input-style/index.tsx
5158
5164
  import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
5159
5165
  var InputStyleComponent = (props) => {
5160
5166
  const {
@@ -5287,8 +5293,8 @@ var InputStyleComponent = (props) => {
5287
5293
  ] }) });
5288
5294
  };
5289
5295
 
5290
- // index.ts
5291
- var Table_edit_default = table_default;
5296
+ // src/index.ts
5297
+ var src_default = table_default;
5292
5298
  export {
5293
5299
  InputStyleComponent,
5294
5300
  SelectTable,
@@ -5296,7 +5302,7 @@ export {
5296
5302
  TabsMenuComponent,
5297
5303
  checkDecimalSeparator,
5298
5304
  checkThousandSeparator,
5299
- Table_edit_default as default,
5305
+ src_default as default,
5300
5306
  formartNumberic,
5301
5307
  generateUUID,
5302
5308
  isNullOrUndefined,
@@ -5308,8 +5314,6 @@ export {
5308
5314
  messageHtmlBoxError,
5309
5315
  notificationError,
5310
5316
  notificationSuccess,
5311
- objSymbolDecimal,
5312
- objSymbolThousand,
5313
5317
  roundNumber,
5314
5318
  useOnClickOutside
5315
5319
  };
package/package.json CHANGED
@@ -1,64 +1,53 @@
1
- {
2
- "name": "react-table-edit",
3
- "license": "MIT",
4
- "version": "1.2.2",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist/**/*"
10
- ],
11
- "scripts": {
12
- "build": "tsup index.ts --format cjs,esm --dts",
13
- "release": "pnpm run build && changeset publish",
14
- "lint": "tsc"
15
- },
16
- "keywords": [
17
- "react",
18
- "table",
19
- "react-table",
20
- "table-template",
21
- "table-edit",
22
- "datagrid"
23
- ],
24
- "author": "hungnv",
25
- "dependencies": {
26
- "@babel/core": "^7.25.2",
27
- "@babel/plugin-transform-modules-commonjs": "^7.24.8",
28
- "@babel/preset-env": "^7.25.4",
29
- "@babel/preset-react": "^7.24.7",
30
- "@hookform/resolvers": "^2.8.10",
31
- "@syncfusion/ej2-react-dropdowns": "20.2.36",
32
- "@types/react-resizable": "^3.0.7",
33
- "becoxy-icons": "1.8.1",
34
- "bootstrap": "5.1.0",
35
- "classnames": "2.3.1",
36
- "css-loader": "^7.1.2",
37
- "moment": "^2.29.3",
38
- "react": "^18.1.0",
39
- "react-dom": "^18.1.0",
40
- "react-hook-form": "7.43.9",
41
- "react-hot-toast": "2.2.0",
42
- "react-i18next": "^11.16.9",
43
- "react-resizable": "^3.0.5",
44
- "react-router-dom": "^6.3.0",
45
- "react-select": "^5.3.2",
46
- "reactstrap": "9.0.1",
47
- "style-loader": "^4.0.0",
48
- "sweetalert2": "^11.4.14",
49
- "sweetalert2-react-content": "^5.0.0",
50
- "ts-loader": "^9.5.1",
51
- "webpack": "^5.77.0",
52
- "webpack-dev-server": "^4.15.1",
53
- "react-number-format": "^5.3.3",
54
- "yup": "^0.32.11"
55
- },
56
- "peerDependencies": {
57
- "react": ">=16.8.6",
58
- "react-dom": ">=16.8.6"
59
- },
60
- "devDependencies": {
61
- "tsup": "^8.0.2",
62
- "typescript": "^5.6.2"
63
- }
64
- }
1
+ {
2
+ "name": "react-table-edit",
3
+ "version": "1.2.4",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/**/*"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsup src/index.ts --format cjs,esm --dts",
12
+ "start": "node dist/index.js"
13
+ },
14
+ "keywords": [
15
+ "react",
16
+ "table",
17
+ "react-table",
18
+ "table-template",
19
+ "table-edit",
20
+ "datagrid"
21
+ ],
22
+ "license": "ISC",
23
+ "author": "hungnv",
24
+ "dependencies": {
25
+ "@hookform/resolvers": "^2.8.10",
26
+ "@types/react-resizable": "^3.0.7",
27
+ "becoxy-icons": "1.8.1",
28
+ "bootstrap": "5.1.0",
29
+ "classnames": "2.3.1",
30
+ "moment": "^2.29.3",
31
+ "react": "^18.1.0",
32
+ "react-dom": "^18.1.0",
33
+ "react-hook-form": "7.43.9",
34
+ "react-hot-toast": "2.2.0",
35
+ "i18next": "^21.8.2",
36
+ "react-i18next": "^11.16.9",
37
+ "react-resizable": "^3.0.5",
38
+ "react-router-dom": "^6.3.0",
39
+ "reactstrap": "9.0.1",
40
+ "sweetalert2": "^11.4.14",
41
+ "sweetalert2-react-content": "^5.0.0",
42
+ "react-number-format": "^5.3.3",
43
+ "yup": "^0.32.11"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=16.8.6",
47
+ "react-dom": ">=16.8.6"
48
+ },
49
+ "devDependencies": {
50
+ "tsup": "^8.0.2",
51
+ "typescript": "^5.6.3"
52
+ }
53
+ }