react-table-edit 1.2.45 → 1.2.46

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/component/table/index.tsx
2
- import { Fragment as Fragment20, forwardRef as forwardRef4, useEffect as useEffect9, useImperativeHandle, useRef as useRef4, useState as useState8 } from "react";
3
- import { Button as Button6, DropdownMenu as DropdownMenu4, DropdownToggle as DropdownToggle4, Input as Input9, UncontrolledDropdown, UncontrolledTooltip as UncontrolledTooltip5 } from "reactstrap";
2
+ import { Fragment as Fragment21, forwardRef as forwardRef4, useEffect as useEffect9, useImperativeHandle, useRef as useRef4, useState as useState9 } from "react";
3
+ import { Button as Button6, DropdownMenu as DropdownMenu4, DropdownToggle as DropdownToggle4, Input as Input8, 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";
@@ -323,7 +323,7 @@ import {
323
323
  DropdownMenu as DropdownMenu2,
324
324
  DropdownToggle as DropdownToggle2,
325
325
  Dropdown as Dropdown2,
326
- Input as Input5,
326
+ Input as Input4,
327
327
  Row,
328
328
  Button as Button2,
329
329
  Col
@@ -426,39 +426,37 @@ var input_text_default = TextInput;
426
426
 
427
427
  // src/component/input-number/index.tsx
428
428
  import { Controller as Controller2 } from "react-hook-form";
429
- import { Input as Input3, Label as Label2, FormFeedback as FormFeedback2 } from "reactstrap";
429
+ import { Label as Label2, FormFeedback as FormFeedback2 } from "reactstrap";
430
430
  import classnames2 from "classnames";
431
431
  import { Fragment as Fragment4 } from "react";
432
+ import { NumericFormat } from "react-number-format";
432
433
  import { useTranslation as useTranslation2 } from "react-i18next";
433
434
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
434
435
  var NumberInput = (props) => {
435
- const { t } = useTranslation2();
436
436
  const {
437
- control,
438
437
  id,
439
- fractionCurrency = 10,
438
+ control,
439
+ fractionCurrency,
440
440
  name,
441
441
  min,
442
442
  max,
443
- type,
444
443
  label,
445
444
  labelSize,
446
445
  required,
447
446
  errors,
448
- height,
449
447
  disabled,
450
- row,
451
448
  isLabel,
449
+ fixedDecimalScale,
452
450
  placeholder,
453
- autoFocus,
454
451
  inLine,
455
452
  callback,
456
- readOnly,
457
453
  decimalSeparator = ",",
458
454
  thousandSeparator = ".",
459
455
  classes,
460
- ...rest
456
+ width,
457
+ allowNegative
461
458
  } = props;
459
+ const { t } = useTranslation2();
462
460
  const renderLabel = () => {
463
461
  return /* @__PURE__ */ jsx4(Fragment4, { children: isLabel === false ? "" : /* @__PURE__ */ jsxs4(Label2, { className: "form-label", for: name, children: [
464
462
  t(label ? label : ""),
@@ -474,64 +472,50 @@ var NumberInput = (props) => {
474
472
  {
475
473
  name,
476
474
  control,
477
- render: ({ field: { value, onChange } }) => /* @__PURE__ */ jsx4(
478
- Input3,
479
- {
480
- id,
481
- value: formartNumberic(value, decimalSeparator, thousandSeparator, fractionCurrency),
482
- onChange: (val) => {
483
- let newVal = "";
484
- const flag = val.target?.value.startsWith("-");
485
- if (val.target?.value.endsWith(decimalSeparator)) {
486
- if ((val.target?.value.match(new RegExp(decimalSeparator === "," ? "," : "\\.", "g")) || []).length > 1 || fractionCurrency === 0) {
487
- newVal = val.target?.value.slice(0, -1).replaceAll(thousandSeparator, "");
475
+ render: ({ field: { value, onChange } }) => {
476
+ let floatValue = parseFloat(value);
477
+ const numericFormatProps = {
478
+ value: !isNullOrUndefined(value) ? value : "",
479
+ thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
480
+ decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
481
+ allowNegative: allowNegative ?? false,
482
+ decimalScale: fractionCurrency ?? 0,
483
+ fixedDecimalScale
484
+ };
485
+ return /* @__PURE__ */ jsx4(
486
+ NumericFormat,
487
+ {
488
+ ...numericFormatProps,
489
+ className: classnames2("form-control text-right", {
490
+ "is-invalid": errors
491
+ }),
492
+ onValueChange: (values) => {
493
+ floatValue = values?.floatValue;
494
+ const textBeforeDot = values?.value.split(".")[1];
495
+ onChange(textBeforeDot ? parseFloat(values?.value).toFixed(textBeforeDot.length) : values?.floatValue);
496
+ },
497
+ onFocus: (e) => {
498
+ e.target.setSelectionRange(0, e.target.innerText.length - 1);
499
+ },
500
+ onChange: () => {
501
+ if (callback) {
502
+ callback(floatValue);
503
+ }
504
+ },
505
+ onBlur: () => {
506
+ if (max && floatValue > max) {
507
+ onChange(max);
508
+ } else if (min && floatValue < min) {
509
+ onChange(min);
488
510
  } else {
489
- newVal = val.target?.value.replaceAll(thousandSeparator, "");
511
+ onChange(floatValue);
490
512
  }
491
- } else {
492
- newVal = val.target.value.replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
493
- }
494
- if (decimalSeparator !== ".") {
495
- newVal = newVal.replaceAll(decimalSeparator, ".");
496
- }
497
- onChange(flag ? `-${newVal}` : newVal);
498
- },
499
- onBlur: (val) => {
500
- let newVal = "";
501
- const flag = val.target?.value.startsWith("-");
502
- if (val.target?.value.endsWith(decimalSeparator)) {
503
- newVal = val.target?.value.slice(0, -1).replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
504
- } else {
505
- newVal = val.target.value.replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
506
- }
507
- if (decimalSeparator !== ".") {
508
- newVal = newVal.replaceAll(decimalSeparator, ".");
509
- }
510
- let value2 = flag ? 0 - Number(newVal) : Number(newVal);
511
- if (max !== void 0 && value2 > max) {
512
- value2 = max;
513
- } else if (min !== void 0 && value2 < min) {
514
- value2 = min;
515
- }
516
- onChange(value2);
517
- if (callback) {
518
- callback(value2);
519
- }
520
- },
521
- style: { height: `${height}px` },
522
- autoFocus,
523
- disabled,
524
- placeholder,
525
- type: type ? type : "text",
526
- invalid: errors && true,
527
- className: "h-100",
528
- rows: row,
529
- min,
530
- max,
531
- readOnly,
532
- ...rest
533
- }
534
- )
513
+ },
514
+ placeholder,
515
+ disabled
516
+ }
517
+ );
518
+ }
535
519
  }
536
520
  ),
537
521
  errors && /* @__PURE__ */ jsx4(FormFeedback2, { children: errors?.message })
@@ -551,7 +535,7 @@ var NumberInput = (props) => {
551
535
  ),
552
536
  children: [
553
537
  renderLabel(),
554
- /* @__PURE__ */ jsx4("div", { className: classnames2("form-input-content", { "hidden-label": isLabel === false }), children: renderInput() })
538
+ /* @__PURE__ */ jsx4("div", { style: { width: width ? width : void 0 }, className: classnames2("form-input-content", { "hidden-label": isLabel === false }), children: renderInput() })
555
539
  ]
556
540
  }
557
541
  ) });
@@ -572,7 +556,7 @@ import {
572
556
  DropdownToggle,
573
557
  Dropdown,
574
558
  Button,
575
- Input as Input4,
559
+ Input as Input3,
576
560
  Spinner,
577
561
  UncontrolledTooltip
578
562
  } from "reactstrap";
@@ -910,7 +894,7 @@ var SelectTable = forwardRef((props, ref) => {
910
894
  }
911
895
  },
912
896
  children: /* @__PURE__ */ jsx5(
913
- Input4,
897
+ Input3,
914
898
  {
915
899
  checked: isSelected,
916
900
  type: "checkbox",
@@ -997,7 +981,7 @@ var SelectTable = forwardRef((props, ref) => {
997
981
  style: { justifyContent: "center" },
998
982
  className: classnames3("r-select-headercell-div"),
999
983
  children: /* @__PURE__ */ jsx5(
1000
- Input4,
984
+ Input3,
1001
985
  {
1002
986
  checked: isSelectedAll,
1003
987
  type: "checkbox",
@@ -1538,7 +1522,7 @@ var EditForm = forwardRef2((props, ref) => {
1538
1522
  },
1539
1523
  children: [
1540
1524
  /* @__PURE__ */ jsx7(DropdownToggle2, { tag: "div", children: /* @__PURE__ */ jsx7(
1541
- Input5,
1525
+ Input4,
1542
1526
  {
1543
1527
  style: { backgroundColor: "#FFF", textAlign: textAlign ?? "left" },
1544
1528
  placeholder,
@@ -1631,7 +1615,7 @@ var edit_form_default = EditForm;
1631
1615
 
1632
1616
  // src/component/sidebar-setting-column/index.tsx
1633
1617
  import { Fragment as Fragment11, useEffect as useEffect6, useState as useState5 } from "react";
1634
- import { Button as Button3, Input as Input6 } from "reactstrap";
1618
+ import { Button as Button3, Input as Input5 } from "reactstrap";
1635
1619
  import { useTranslation as useTranslation7 } from "react-i18next";
1636
1620
 
1637
1621
  // src/component/modal-header/index.tsx
@@ -1825,7 +1809,7 @@ var SidebarSetColumn = (props) => {
1825
1809
  };
1826
1810
  const visibleTemplate = (item, index) => {
1827
1811
  return /* @__PURE__ */ jsx10(
1828
- Input6,
1812
+ Input5,
1829
1813
  {
1830
1814
  defaultChecked: item.visible ?? true,
1831
1815
  disabled: item.invisibleDisable,
@@ -1843,7 +1827,7 @@ var SidebarSetColumn = (props) => {
1843
1827
  };
1844
1828
  const fixColumnTemplate = (item, index) => {
1845
1829
  return /* @__PURE__ */ jsx10(
1846
- Input6,
1830
+ Input5,
1847
1831
  {
1848
1832
  defaultChecked: item.fixedType === "left" || item.fixedType === "right",
1849
1833
  type: "checkbox",
@@ -2123,7 +2107,7 @@ var PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOpt
2123
2107
  // src/component/table/header.tsx
2124
2108
  import { Fragment as Fragment14 } from "react";
2125
2109
  import classnames6 from "classnames";
2126
- import { Input as Input7 } from "reactstrap";
2110
+ import { Input as Input6 } from "reactstrap";
2127
2111
  import { useTranslation as useTranslation9 } from "react-i18next";
2128
2112
  import { Resizable } from "react-resizable";
2129
2113
  import "react-resizable/css/styles.css";
@@ -2180,7 +2164,7 @@ var HeaderTableCol = (props) => {
2180
2164
  className: classnames6("r-headercell-div"),
2181
2165
  children: [
2182
2166
  col.field === "checkbox" && /* @__PURE__ */ jsx12(
2183
- Input7,
2167
+ Input6,
2184
2168
  {
2185
2169
  checked: totalCount > 0 && selectedRows?.length >= totalCount,
2186
2170
  type: "checkbox",
@@ -2273,7 +2257,7 @@ import {
2273
2257
  DropdownToggle as DropdownToggle3,
2274
2258
  Dropdown as Dropdown3,
2275
2259
  Button as Button5,
2276
- Input as Input8,
2260
+ Input as Input7,
2277
2261
  UncontrolledTooltip as UncontrolledTooltip4
2278
2262
  } from "reactstrap";
2279
2263
  import { useTranslation as useTranslation11 } from "react-i18next";
@@ -2541,7 +2525,7 @@ var SelectTableTree = forwardRef3((props, ref) => {
2541
2525
  }
2542
2526
  ),
2543
2527
  /* @__PURE__ */ jsx15(
2544
- Input8,
2528
+ Input7,
2545
2529
  {
2546
2530
  checked: isSelected,
2547
2531
  type: "checkbox",
@@ -2669,7 +2653,7 @@ var SelectTableTree = forwardRef3((props, ref) => {
2669
2653
  style: { justifyContent: "center" },
2670
2654
  className: classnames8("r-select-headercell-div"),
2671
2655
  children: /* @__PURE__ */ jsx15(
2672
- Input8,
2656
+ Input7,
2673
2657
  {
2674
2658
  checked: isSelectedAll,
2675
2659
  type: "checkbox",
@@ -2845,8 +2829,78 @@ var SelectTableTree = forwardRef3((props, ref) => {
2845
2829
  });
2846
2830
 
2847
2831
  // src/component/table/index.tsx
2848
- import { NumericFormat } from "react-number-format";
2849
- import { Fragment as Fragment21, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2832
+ import { NumericFormat as NumericFormat2 } from "react-number-format";
2833
+
2834
+ // src/component/table/toolbar-top.tsx
2835
+ import { Fragment as Fragment20, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2836
+ var renderToolbarTop = (toolbarTopOption) => {
2837
+ return /* @__PURE__ */ jsx16("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ jsxs15("div", { className: "r-toolbar-items", children: [
2838
+ /* @__PURE__ */ jsx16("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
2839
+ return item.align === "left" ? /* @__PURE__ */ jsx16(Fragment20, { children: /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) }) : "";
2840
+ }) }),
2841
+ /* @__PURE__ */ jsx16("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
2842
+ return item.align === "center" ? /* @__PURE__ */ jsx16(Fragment20, { children: /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) }) : "";
2843
+ }) }),
2844
+ /* @__PURE__ */ jsx16("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
2845
+ return item.align === "right" ? /* @__PURE__ */ jsx16(Fragment20, { children: /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) }) : "";
2846
+ }) })
2847
+ ] }) });
2848
+ };
2849
+ var toolbar_top_default = renderToolbarTop;
2850
+
2851
+ // src/component/input-date/index.tsx
2852
+ import { useState as useState8 } from "react";
2853
+ import DatePicker from "react-datepicker";
2854
+ import InputMask from "react-input-mask";
2855
+ import { jsx as jsx17 } from "react/jsx-runtime";
2856
+ var DateInput = (props) => {
2857
+ const { id, onKeyDown, dateFormat, className, onChange, value } = props;
2858
+ const [open, setOpen] = useState8(false);
2859
+ return /* @__PURE__ */ jsx17(
2860
+ DatePicker,
2861
+ {
2862
+ id,
2863
+ open,
2864
+ className,
2865
+ selected: value,
2866
+ onChange: (date) => {
2867
+ if (onChange) {
2868
+ onChange(date);
2869
+ }
2870
+ },
2871
+ dateFormat,
2872
+ locale: "vi",
2873
+ showMonthDropdown: true,
2874
+ showYearDropdown: true,
2875
+ dropdownMode: "select",
2876
+ onCalendarClose: () => setOpen(false),
2877
+ onCalendarOpen: () => setOpen(true),
2878
+ customInput: /* @__PURE__ */ jsx17(InputMask, { mask: "99/99/9999", placeholder: dateFormat }),
2879
+ onKeyDown: (e) => {
2880
+ if (e.code === "Space") {
2881
+ setOpen(!open);
2882
+ setTimeout(() => {
2883
+ const element = document.getElementById(id ?? "");
2884
+ if (element) {
2885
+ element.focus();
2886
+ }
2887
+ }, 100);
2888
+ } else {
2889
+ if (onKeyDown && !open) {
2890
+ const rs = onKeyDown(e);
2891
+ if (rs) {
2892
+ setOpen(false);
2893
+ }
2894
+ }
2895
+ }
2896
+ }
2897
+ }
2898
+ );
2899
+ };
2900
+ var input_date_default = DateInput;
2901
+
2902
+ // src/component/table/index.tsx
2903
+ import { Fragment as Fragment22, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2850
2904
  var TableEdit = forwardRef4((props, ref) => {
2851
2905
  const { t } = useTranslation12();
2852
2906
  const {
@@ -2881,17 +2935,17 @@ var TableEdit = forwardRef4((props, ref) => {
2881
2935
  refeshFocusRow: handleRefeshRow
2882
2936
  };
2883
2937
  });
2884
- const [refreshRow, setRefreshRow] = useState8(false);
2885
- const [indexFocus, setIndexFocus] = useState8();
2886
- const [selectedRows, setSelectedRows] = useState8([]);
2887
- const [headerColumns, setHeaderColumns] = useState8([[]]);
2888
- const [contentColumns, setContentColumns] = useState8([]);
2889
- const [levelCol, setLevelCol] = useState8(0);
2890
- const [columnFistEdit, setColumnFistEdit] = useState8(0);
2891
- const [columnLastEdit, setColumnlastEdit] = useState8(0);
2892
- const [objWidthFix, setObjWidthFix] = useState8({});
2893
- const [openPopupSetupColumn, setOpenPopupSetupColumn] = useState8(false);
2894
- const [searchTerm, setSearchTerm] = useState8("");
2938
+ const [refreshRow, setRefreshRow] = useState9(false);
2939
+ const [indexFocus, setIndexFocus] = useState9();
2940
+ const [selectedRows, setSelectedRows] = useState9([]);
2941
+ const [headerColumns, setHeaderColumns] = useState9([[]]);
2942
+ const [contentColumns, setContentColumns] = useState9([]);
2943
+ const [levelCol, setLevelCol] = useState9(0);
2944
+ const [columnFistEdit, setColumnFistEdit] = useState9(0);
2945
+ const [columnLastEdit, setColumnlastEdit] = useState9(0);
2946
+ const [objWidthFix, setObjWidthFix] = useState9({});
2947
+ const [openPopupSetupColumn, setOpenPopupSetupColumn] = useState9(false);
2948
+ const [searchTerm, setSearchTerm] = useState9("");
2895
2949
  const tableElement = useRef4(null);
2896
2950
  const gridRef = useRef4();
2897
2951
  let totalCount = dataSource.length;
@@ -3034,7 +3088,7 @@ var TableEdit = forwardRef4((props, ref) => {
3034
3088
  }
3035
3089
  };
3036
3090
  const searchTemplate = () => {
3037
- return /* @__PURE__ */ jsx16(Fragment20, { children: /* @__PURE__ */ jsx16("div", { className: "me-50 r-search", children: /* @__PURE__ */ jsx16(
3091
+ return /* @__PURE__ */ jsx18(Fragment21, { children: /* @__PURE__ */ jsx18("div", { className: "me-50 r-search", children: /* @__PURE__ */ jsx18(
3038
3092
  react_input_default,
3039
3093
  {
3040
3094
  style: { width: "230px" },
@@ -3055,59 +3109,45 @@ var TableEdit = forwardRef4((props, ref) => {
3055
3109
  const RenderEdit = (row, col, indexCol, indexRow) => {
3056
3110
  switch (col?.editTypeCondition ? col?.editTypeCondition(row) : col.editType) {
3057
3111
  case "date":
3058
- return /* @__PURE__ */ jsx16(
3059
- Input9,
3112
+ return /* @__PURE__ */ jsx18(
3113
+ input_date_default,
3060
3114
  {
3061
3115
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3062
- style: { textAlign: col.textAlign, height: 29 },
3063
- value: row[col.field] ? formatDateTime(row[col.field], "yyyy-MM-dd") : row[col.field],
3064
- onChange: (val) => {
3065
- row[col.field] = val.target.value;
3116
+ className: classnames9("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3117
+ value: row[col.field],
3118
+ onChange: (date) => {
3119
+ row[col.field] = date;
3066
3120
  if (col.callback) {
3067
- col.callback(row, val.target.value, indexRow);
3121
+ col.callback(date, indexRow);
3068
3122
  }
3069
3123
  handleDataChange(row, col, indexRow);
3070
3124
  },
3071
- className: classnames9("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3072
- type: "date",
3073
- max: "9999-12-31",
3125
+ dateFormat: "dd/MM/yyyy",
3074
3126
  onKeyDown: (e) => {
3075
3127
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3076
- }
3077
- },
3078
- onPaste: (e) => {
3079
- if (toolbarSetting?.showBottomToolbar && !editDisable && !addDisable) {
3080
- pasteDataFromExcel(indexRow, indexCol, e);
3081
- e.preventDefault();
3128
+ return true;
3082
3129
  }
3083
3130
  }
3084
3131
  }
3085
3132
  );
3086
3133
  case "datetime":
3087
- return /* @__PURE__ */ jsx16(
3088
- Input9,
3134
+ return /* @__PURE__ */ jsx18(
3135
+ input_date_default,
3089
3136
  {
3090
3137
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3091
- style: { textAlign: col.textAlign, height: 29 },
3092
- value: row[col.field] ? formatDateTime(row[col.field], "yyyy-MM-dd HH:mm") : row[col.field],
3093
- onChange: (val) => {
3094
- row[col.field] = val.target.value;
3138
+ className: classnames9("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3139
+ value: row[col.field],
3140
+ onChange: (date) => {
3141
+ row[col.field] = date;
3095
3142
  if (col.callback) {
3096
- col.callback(val.target.value, indexRow);
3143
+ col.callback(date, indexRow);
3097
3144
  }
3098
3145
  handleDataChange(row, col, indexRow);
3099
3146
  },
3100
- className: classnames9("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3101
- type: "datetime-local",
3102
- max: "9999-12-31T23:59",
3147
+ dateFormat: "dd/MM/yyyy HH:mm",
3103
3148
  onKeyDown: (e) => {
3104
3149
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3105
- }
3106
- },
3107
- onPaste: (e) => {
3108
- if (toolbarSetting?.showBottomToolbar && !editDisable && !addDisable) {
3109
- pasteDataFromExcel(indexRow, indexCol, e);
3110
- e.preventDefault();
3150
+ return true;
3111
3151
  }
3112
3152
  }
3113
3153
  }
@@ -3128,7 +3168,7 @@ var TableEdit = forwardRef4((props, ref) => {
3128
3168
  valueSelect = col.selectSettings?.defaultValue(row);
3129
3169
  }
3130
3170
  }
3131
- return /* @__PURE__ */ jsx16(
3171
+ return /* @__PURE__ */ jsx18(
3132
3172
  SelectTable,
3133
3173
  {
3134
3174
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3221,14 +3261,14 @@ var TableEdit = forwardRef4((props, ref) => {
3221
3261
  } else {
3222
3262
  valueSelectTree = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? findItemInTree(optionsSelectTree, row[col.field]) : "";
3223
3263
  }
3224
- return /* @__PURE__ */ jsx16(
3264
+ return /* @__PURE__ */ jsx18(
3225
3265
  "div",
3226
3266
  {
3227
3267
  onKeyDown: (e) => {
3228
3268
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3229
3269
  }
3230
3270
  },
3231
- children: /* @__PURE__ */ jsx16(
3271
+ children: /* @__PURE__ */ jsx18(
3232
3272
  SelectTableTree,
3233
3273
  {
3234
3274
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3287,8 +3327,8 @@ var TableEdit = forwardRef4((props, ref) => {
3287
3327
  }
3288
3328
  );
3289
3329
  case "checkbox":
3290
- return /* @__PURE__ */ jsx16(
3291
- Input9,
3330
+ return /* @__PURE__ */ jsx18(
3331
+ Input8,
3292
3332
  {
3293
3333
  checked: row[col.field],
3294
3334
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3317,8 +3357,8 @@ var TableEdit = forwardRef4((props, ref) => {
3317
3357
  decimalScale: col.numericSettings?.fraction ?? 0
3318
3358
  };
3319
3359
  let floatValue = parseFloat(row[col.field]);
3320
- return /* @__PURE__ */ jsx16(
3321
- NumericFormat,
3360
+ return /* @__PURE__ */ jsx18(
3361
+ NumericFormat2,
3322
3362
  {
3323
3363
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3324
3364
  style: { textAlign: col.textAlign, height: 29 },
@@ -3361,8 +3401,8 @@ var TableEdit = forwardRef4((props, ref) => {
3361
3401
  }
3362
3402
  );
3363
3403
  case "color":
3364
- return /* @__PURE__ */ jsx16("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ jsx16(
3365
- Input9,
3404
+ return /* @__PURE__ */ jsx18("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ jsx18(
3405
+ Input8,
3366
3406
  {
3367
3407
  type: "color",
3368
3408
  value: row[col.field],
@@ -3384,7 +3424,7 @@ var TableEdit = forwardRef4((props, ref) => {
3384
3424
  `col-${indexRow}-${indexCol}`
3385
3425
  ) });
3386
3426
  case "form":
3387
- return /* @__PURE__ */ jsx16(
3427
+ return /* @__PURE__ */ jsx18(
3388
3428
  edit_form_default,
3389
3429
  {
3390
3430
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3412,8 +3452,8 @@ var TableEdit = forwardRef4((props, ref) => {
3412
3452
  }
3413
3453
  );
3414
3454
  default:
3415
- return /* @__PURE__ */ jsx16(
3416
- Input9,
3455
+ return /* @__PURE__ */ jsx18(
3456
+ Input8,
3417
3457
  {
3418
3458
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3419
3459
  style: { textAlign: col.textAlign, height: 29 },
@@ -3833,7 +3873,7 @@ var TableEdit = forwardRef4((props, ref) => {
3833
3873
  }, [selectedItem]);
3834
3874
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
3835
3875
  if (col.field === "command") {
3836
- return col.visible !== false && /* @__PURE__ */ jsx16(
3876
+ return col.visible !== false && /* @__PURE__ */ jsx18(
3837
3877
  "td",
3838
3878
  {
3839
3879
  className: classnames9(
@@ -3846,12 +3886,12 @@ var TableEdit = forwardRef4((props, ref) => {
3846
3886
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3847
3887
  textAlign: col.textAlign ? col.textAlign : "left"
3848
3888
  },
3849
- children: /* @__PURE__ */ jsx16("div", { className: "r-rowcell-div command", children: /* @__PURE__ */ jsx16(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3889
+ children: /* @__PURE__ */ jsx18("div", { className: "r-rowcell-div command", children: /* @__PURE__ */ jsx18(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3850
3890
  },
3851
3891
  `col-${indexRow}-${indexCol}`
3852
3892
  );
3853
3893
  } else if (col.field === "#") {
3854
- return col.visible !== false && /* @__PURE__ */ jsx16(
3894
+ return col.visible !== false && /* @__PURE__ */ jsx18(
3855
3895
  "td",
3856
3896
  {
3857
3897
  className: classnames9(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
@@ -3898,12 +3938,12 @@ var TableEdit = forwardRef4((props, ref) => {
3898
3938
  e.stopPropagation();
3899
3939
  }
3900
3940
  },
3901
- children: /* @__PURE__ */ jsx16("div", { className: "r-rowcell-div", children: indexRow + 1 })
3941
+ children: /* @__PURE__ */ jsx18("div", { className: "r-rowcell-div", children: indexRow + 1 })
3902
3942
  },
3903
3943
  `col-${indexRow}-${indexCol}`
3904
3944
  );
3905
3945
  } else if (col.field === "checkbox") {
3906
- return /* @__PURE__ */ jsx16(
3946
+ return /* @__PURE__ */ jsx18(
3907
3947
  "td",
3908
3948
  {
3909
3949
  className: classnames9(
@@ -3916,7 +3956,7 @@ var TableEdit = forwardRef4((props, ref) => {
3916
3956
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3917
3957
  textAlign: col.textAlign ? col.textAlign : "center"
3918
3958
  },
3919
- children: /* @__PURE__ */ jsx16(
3959
+ children: /* @__PURE__ */ jsx18(
3920
3960
  "div",
3921
3961
  {
3922
3962
  className: "r-rowcell-div cursor-pointer",
@@ -3940,8 +3980,8 @@ var TableEdit = forwardRef4((props, ref) => {
3940
3980
  e.stopPropagation();
3941
3981
  }
3942
3982
  },
3943
- children: /* @__PURE__ */ jsx16(
3944
- Input9,
3983
+ children: /* @__PURE__ */ jsx18(
3984
+ Input8,
3945
3985
  {
3946
3986
  checked: isSelected,
3947
3987
  type: "checkbox",
@@ -3967,7 +4007,7 @@ var TableEdit = forwardRef4((props, ref) => {
3967
4007
  }
3968
4008
  const typeDis = !editDisable && (indexFocus === indexRow || col.editType === "checkbox") && (!col.disabledCondition || !col.disabledCondition(row)) ? col.editEnable ? 1 : col.template ? 2 : 3 : col.template ? 2 : 3;
3969
4009
  const errorMessage = typeDis === 1 || col.field === "" || !col.validate ? "" : col.validate(row[col.field], row);
3970
- return /* @__PURE__ */ jsx16(Fragment20, { children: col.visible !== false && /* @__PURE__ */ jsx16(
4010
+ return /* @__PURE__ */ jsx18(Fragment21, { children: col.visible !== false && /* @__PURE__ */ jsx18(
3971
4011
  "td",
3972
4012
  {
3973
4013
  className: classnames9(
@@ -4007,11 +4047,11 @@ var TableEdit = forwardRef4((props, ref) => {
4007
4047
  e.stopPropagation();
4008
4048
  }
4009
4049
  },
4010
- children: /* @__PURE__ */ jsx16(
4050
+ children: /* @__PURE__ */ jsx18(
4011
4051
  "div",
4012
4052
  {
4013
4053
  className: classnames9("r-rowcell-div"),
4014
- children: /* @__PURE__ */ jsxs15(
4054
+ children: /* @__PURE__ */ jsxs16(
4015
4055
  "div",
4016
4056
  {
4017
4057
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
@@ -4020,16 +4060,16 @@ var TableEdit = forwardRef4((props, ref) => {
4020
4060
  margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
4021
4061
  },
4022
4062
  children: [
4023
- 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: [
4063
+ typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ jsx18("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__ */ jsxs16("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4024
4064
  " ",
4025
4065
  `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
4026
4066
  ] }) : value }),
4027
- /* @__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 }) }),
4028
- !(typeDis === 1 && !refreshRow) && /* @__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: [
4067
+ /* @__PURE__ */ jsx18("span", { id: `error-${indexRow}-${indexCol}`, className: classnames9("cursor-pointer text-primary icon-table", { "d-none": !errorMessage }), children: /* @__PURE__ */ jsx18(AlertCircle, { fontSize: 15.5 }) }),
4068
+ !(typeDis === 1 && !refreshRow) && /* @__PURE__ */ jsx18(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__ */ jsxs16("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4029
4069
  " ",
4030
4070
  `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
4031
4071
  ] }) : value }),
4032
- /* @__PURE__ */ jsx16(
4072
+ /* @__PURE__ */ jsx18(
4033
4073
  UncontrolledTooltip5,
4034
4074
  {
4035
4075
  target: `error-${indexRow}-${indexCol}`,
@@ -4048,7 +4088,10 @@ var TableEdit = forwardRef4((props, ref) => {
4048
4088
  }
4049
4089
  };
4050
4090
  const renderFooterCol = (col, indexCol) => {
4051
- return /* @__PURE__ */ jsx16(Fragment20, { children: col.visible !== false && /* @__PURE__ */ jsx16(
4091
+ const sumValue = col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
4092
+ return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
4093
+ }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : 0;
4094
+ return /* @__PURE__ */ jsx18(Fragment21, { children: col.visible !== false && /* @__PURE__ */ jsx18(
4052
4095
  "td",
4053
4096
  {
4054
4097
  className: classnames9(
@@ -4060,60 +4103,51 @@ var TableEdit = forwardRef4((props, ref) => {
4060
4103
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
4061
4104
  textAlign: col.textAlign ? col.textAlign : "left"
4062
4105
  },
4063
- children: /* @__PURE__ */ jsx16("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
4064
- return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
4065
- }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : "" })
4106
+ children: /* @__PURE__ */ jsxs16("div", { className: "r-footer-div", children: [
4107
+ col.haveSum === true && col.editType === "numeric" && Number(sumValue) >= 0 && /* @__PURE__ */ jsx18(Fragment22, { children: sumValue }),
4108
+ col.haveSum === true && col.editType === "numeric" && Number(sumValue) < 0 && /* @__PURE__ */ jsxs16("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4109
+ " ",
4110
+ `${formatSetting?.prefixNegative ?? "-"}${sumValue}${formatSetting?.suffixNegative ?? ""}`
4111
+ ] })
4112
+ ] })
4066
4113
  }
4067
4114
  ) }, `summarycell-${indexCol}`);
4068
4115
  };
4069
- const renderToolbarTop = () => {
4070
- return /* @__PURE__ */ jsx16("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ jsxs15("div", { className: "r-toolbar-items", children: [
4071
- /* @__PURE__ */ jsx16("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
4072
- return item.align === "left" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) : "";
4073
- }) }),
4074
- /* @__PURE__ */ jsx16("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
4075
- return item.align === "center" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) : "";
4076
- }) }),
4077
- /* @__PURE__ */ jsx16("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
4078
- return item.align === "right" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) : "";
4079
- }) })
4080
- ] }) });
4081
- };
4082
4116
  const renderToolbarBottom = () => {
4083
- return /* @__PURE__ */ jsx16("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: /* @__PURE__ */ jsxs15("div", { className: "r-toolbar-items", children: [
4084
- /* @__PURE__ */ jsxs15("div", { className: "r-toolbar-left", children: [
4085
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Button6, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
4086
- (indexFocus ?? -1) > -1 ? /* @__PURE__ */ jsxs15(Fragment21, { children: [
4087
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Button6, { color: "success", outline: true, onClick: () => {
4117
+ return /* @__PURE__ */ jsx18("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: /* @__PURE__ */ jsxs16("div", { className: "r-toolbar-items", children: [
4118
+ /* @__PURE__ */ jsxs16("div", { className: "r-toolbar-left", children: [
4119
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Button6, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
4120
+ (indexFocus ?? -1) > -1 ? /* @__PURE__ */ jsxs16(Fragment22, { children: [
4121
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Button6, { color: "success", outline: true, onClick: () => {
4088
4122
  handleDuplicate(dataSource[indexFocus ?? -1], indexFocus ?? -1);
4089
4123
  }, className: "d-flex", children: t("Duplicate") }) }),
4090
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Button6, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
4091
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Button6, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
4092
- ] }) : /* @__PURE__ */ jsx16(Fragment21, { children: " " }),
4093
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Button6, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
4124
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Button6, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
4125
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Button6, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
4126
+ ] }) : /* @__PURE__ */ jsx18(Fragment22, { children: " " }),
4127
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Button6, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
4094
4128
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4095
- return item.align === "left" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
4129
+ return item.align === "left" ? /* @__PURE__ */ jsx18("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
4096
4130
  })
4097
4131
  ] }),
4098
- /* @__PURE__ */ jsx16("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4099
- return item.align === "center" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
4132
+ /* @__PURE__ */ jsx18("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4133
+ return item.align === "center" ? /* @__PURE__ */ jsx18("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
4100
4134
  }) }),
4101
- /* @__PURE__ */ jsxs15("div", { className: "r-toolbar-right", children: [
4135
+ /* @__PURE__ */ jsxs16("div", { className: "r-toolbar-right", children: [
4102
4136
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4103
- return item.align === "right" ? /* @__PURE__ */ jsx16("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
4137
+ return item.align === "right" ? /* @__PURE__ */ jsx18("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
4104
4138
  }),
4105
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ jsx16(Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
4106
- /* @__PURE__ */ jsx16("div", { className: classnames9("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsxs15(UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
4107
- /* @__PURE__ */ jsx16(DropdownToggle4, { tag: "div", color: "primary", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx16(Info2, { className: "cursor-pointer text-primary" }) }),
4108
- /* @__PURE__ */ jsx16(
4139
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ jsx18(Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
4140
+ /* @__PURE__ */ jsx18("div", { className: classnames9("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ jsxs16(UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
4141
+ /* @__PURE__ */ jsx18(DropdownToggle4, { tag: "div", color: "primary", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx18(Info2, { className: "cursor-pointer text-primary" }) }),
4142
+ /* @__PURE__ */ jsx18(
4109
4143
  DropdownMenu4,
4110
4144
  {
4111
4145
  className: "formula-dropdown icon-dropdown",
4112
- children: /* @__PURE__ */ jsxs15("ul", { className: "mb-0 pe-50", children: [
4113
- /* @__PURE__ */ jsx16("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\xE2n b\u1EA3n" }),
4114
- /* @__PURE__ */ jsx16("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
4115
- /* @__PURE__ */ jsx16("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\xE9p h\xE0ng" }),
4116
- /* @__PURE__ */ jsx16("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\xE1n h\xE0ng" })
4146
+ children: /* @__PURE__ */ jsxs16("ul", { className: "mb-0 pe-50", children: [
4147
+ /* @__PURE__ */ jsx18("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\xE2n b\u1EA3n" }),
4148
+ /* @__PURE__ */ jsx18("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
4149
+ /* @__PURE__ */ jsx18("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\xE9p h\xE0ng" }),
4150
+ /* @__PURE__ */ jsx18("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\xE1n h\xE0ng" })
4117
4151
  ] })
4118
4152
  }
4119
4153
  )
@@ -4144,7 +4178,7 @@ var TableEdit = forwardRef4((props, ref) => {
4144
4178
  const flagDisplay = !pagingClient || totalCount > (pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1) && totalCount <= (pagingSetting.pageSize ?? 0) * (pagingSetting.currentPage ?? 0);
4145
4179
  if (flagDisplay) {
4146
4180
  countDisplay++;
4147
- return /* @__PURE__ */ jsx16(
4181
+ return /* @__PURE__ */ jsx18(
4148
4182
  "tr",
4149
4183
  {
4150
4184
  className: classnames9("r-row", { "fisrt-row": countDisplay === 0 }),
@@ -4163,14 +4197,14 @@ var TableEdit = forwardRef4((props, ref) => {
4163
4197
  pagingSetting?.setCurrentPage(1);
4164
4198
  }
4165
4199
  }, [searchTerm, searchSetting?.searchTerm]);
4166
- return /* @__PURE__ */ jsxs15(Fragment20, { children: [
4167
- /* @__PURE__ */ jsxs15("div", { className: "react-table-edit", children: [
4168
- /* @__PURE__ */ jsxs15("div", { className: "r-grid", ref: gridRef, children: [
4169
- toolbarSetting?.showTopToolbar ? /* @__PURE__ */ jsx16(Fragment21, { children: renderToolbarTop() }) : /* @__PURE__ */ jsx16(Fragment21, {}),
4170
- /* @__PURE__ */ jsx16("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ jsxs15("table", { style: { width: "100%" }, children: [
4171
- /* @__PURE__ */ jsx16("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
4172
- return /* @__PURE__ */ jsx16("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
4173
- return /* @__PURE__ */ jsx16(
4200
+ return /* @__PURE__ */ jsxs16(Fragment21, { children: [
4201
+ /* @__PURE__ */ jsxs16("div", { className: "react-table-edit", children: [
4202
+ /* @__PURE__ */ jsxs16("div", { className: "r-grid", ref: gridRef, children: [
4203
+ toolbarSetting?.showTopToolbar ? /* @__PURE__ */ jsx18(Fragment22, { children: toolbar_top_default(toolbarTopOption) }) : /* @__PURE__ */ jsx18(Fragment22, {}),
4204
+ /* @__PURE__ */ jsx18("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ jsxs16("table", { style: { width: "100%" }, children: [
4205
+ /* @__PURE__ */ jsx18("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
4206
+ return /* @__PURE__ */ jsx18("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
4207
+ return /* @__PURE__ */ jsx18(
4174
4208
  header_default,
4175
4209
  {
4176
4210
  col,
@@ -4190,14 +4224,14 @@ var TableEdit = forwardRef4((props, ref) => {
4190
4224
  );
4191
4225
  }) }, `header-${-indexParent}`);
4192
4226
  }) }),
4193
- /* @__PURE__ */ jsx16("tbody", { className: "r-gridcontent", children: renderData() }),
4194
- /* @__PURE__ */ jsx16("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ jsx16("tr", { className: "r-row", children: contentColumns.map((col, index) => {
4227
+ /* @__PURE__ */ jsx18("tbody", { className: "r-gridcontent", children: renderData() }),
4228
+ /* @__PURE__ */ jsx18("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ jsx18("tr", { className: "r-row", children: contentColumns.map((col, index) => {
4195
4229
  return renderFooterCol(col, index);
4196
- }) }) : /* @__PURE__ */ jsx16(Fragment21, {}) })
4230
+ }) }) : /* @__PURE__ */ jsx18(Fragment22, {}) })
4197
4231
  ] }) }),
4198
- toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ jsx16(Fragment21, { children: renderToolbarBottom() }) : /* @__PURE__ */ jsx16(Fragment21, {})
4232
+ toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ jsx18(Fragment22, { children: renderToolbarBottom() }) : /* @__PURE__ */ jsx18(Fragment22, {})
4199
4233
  ] }),
4200
- pagingSetting?.allowPaging ? /* @__PURE__ */ jsx16(
4234
+ pagingSetting?.allowPaging ? /* @__PURE__ */ jsx18(
4201
4235
  PagingComponent,
4202
4236
  {
4203
4237
  onChangePage,
@@ -4207,9 +4241,9 @@ var TableEdit = forwardRef4((props, ref) => {
4207
4241
  totalItem: pagingClient ? totalCount : pagingSetting?.totalItem ?? 0,
4208
4242
  onChangePageSize
4209
4243
  }
4210
- ) : /* @__PURE__ */ jsx16(Fragment21, {})
4244
+ ) : /* @__PURE__ */ jsx18(Fragment22, {})
4211
4245
  ] }),
4212
- /* @__PURE__ */ jsx16(
4246
+ /* @__PURE__ */ jsx18(
4213
4247
  sidebar_setting_column_default,
4214
4248
  {
4215
4249
  handleSidebar: () => {
@@ -4227,10 +4261,10 @@ var table_default = TableEdit;
4227
4261
  // src/component/tab-menu/index.tsx
4228
4262
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "becoxy-icons";
4229
4263
  import classNames6 from "classnames";
4230
- import { Fragment as Fragment22, useEffect as useEffect10, useState as useState9 } from "react";
4264
+ import { Fragment as Fragment23, useEffect as useEffect10, useState as useState10 } from "react";
4231
4265
  import { Link, useNavigate } from "react-router-dom";
4232
4266
  import { DropdownItem as DropdownItem4, DropdownMenu as DropdownMenu5, DropdownToggle as DropdownToggle5, UncontrolledDropdown as UncontrolledDropdown2 } from "reactstrap";
4233
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
4267
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
4234
4268
  var TabsMenuComponent = ({
4235
4269
  buttonWidth,
4236
4270
  tabParent,
@@ -4242,14 +4276,14 @@ var TabsMenuComponent = ({
4242
4276
  renderModal
4243
4277
  }) => {
4244
4278
  const navigate = useNavigate();
4245
- const [dataMenu, setDataMenu] = useState9([]);
4246
- const [openMenu, setOpenMenu] = useState9(false);
4247
- const [url, setUrl] = useState9("");
4248
- const [contentWidth, setContentWidth] = useState9(0);
4249
- const [componentWidth, setComponentWidth] = useState9(0);
4250
- const [scrollPosition, setScrollPosition] = useState9(0);
4251
- const [dataItem, setDataItem] = useState9([]);
4252
- const [openModal, setOpenModal] = useState9({});
4279
+ const [dataMenu, setDataMenu] = useState10([]);
4280
+ const [openMenu, setOpenMenu] = useState10(false);
4281
+ const [url, setUrl] = useState10("");
4282
+ const [contentWidth, setContentWidth] = useState10(0);
4283
+ const [componentWidth, setComponentWidth] = useState10(0);
4284
+ const [scrollPosition, setScrollPosition] = useState10(0);
4285
+ const [dataItem, setDataItem] = useState10([]);
4286
+ const [openModal, setOpenModal] = useState10({});
4253
4287
  const handleWindowResize = () => {
4254
4288
  const tabEle = document.getElementById(`tab-component-${resourceCode}`);
4255
4289
  const tabContent = document.getElementById(`content-component-${resourceCode}`);
@@ -4305,22 +4339,22 @@ var TabsMenuComponent = ({
4305
4339
  const handleModal = (name) => {
4306
4340
  setOpenModal((old) => ({ ...old, [name]: !(openModal[name] ?? false) }));
4307
4341
  };
4308
- return /* @__PURE__ */ jsxs16(Fragment22, { children: [
4342
+ return /* @__PURE__ */ jsxs17(Fragment23, { children: [
4309
4343
  renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : "",
4310
- /* @__PURE__ */ jsxs16("div", { className: classNames6("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
4311
- /* @__PURE__ */ jsx17(
4344
+ /* @__PURE__ */ jsxs17("div", { className: classNames6("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
4345
+ /* @__PURE__ */ jsx19(
4312
4346
  "div",
4313
4347
  {
4314
4348
  onClick: () => handleScroll(-200),
4315
4349
  className: classNames6("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4316
- children: /* @__PURE__ */ jsx17(ChevronLeft3, {})
4350
+ children: /* @__PURE__ */ jsx19(ChevronLeft3, {})
4317
4351
  }
4318
4352
  ),
4319
- /* @__PURE__ */ jsx17("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ jsx17("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
4353
+ /* @__PURE__ */ jsx19("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ jsx19("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
4320
4354
  if (item?.resAttributes?.IS_MENU === "1") {
4321
- return /* @__PURE__ */ jsxs16(UncontrolledDropdown2, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
4322
- /* @__PURE__ */ jsx17(DropdownToggle5, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ jsx17("div", { children: item.name }) }),
4323
- /* @__PURE__ */ jsx17(DropdownMenu5, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ jsx17(
4355
+ return /* @__PURE__ */ jsxs17(UncontrolledDropdown2, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
4356
+ /* @__PURE__ */ jsx19(DropdownToggle5, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ jsx19("div", { children: item.name }) }),
4357
+ /* @__PURE__ */ jsx19(DropdownMenu5, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ jsx19(
4324
4358
  DropdownItem4,
4325
4359
  {
4326
4360
  style: { borderRadius: "5px", margin: "0 0.5rem", width: "95%" },
@@ -4337,7 +4371,7 @@ var TabsMenuComponent = ({
4337
4371
  )) })
4338
4372
  ] }, item.code);
4339
4373
  } else {
4340
- return /* @__PURE__ */ jsx17(
4374
+ return /* @__PURE__ */ jsx19(
4341
4375
  Link,
4342
4376
  {
4343
4377
  to: item.url,
@@ -4348,12 +4382,12 @@ var TabsMenuComponent = ({
4348
4382
  );
4349
4383
  }
4350
4384
  }) }) }),
4351
- /* @__PURE__ */ jsx17(
4385
+ /* @__PURE__ */ jsx19(
4352
4386
  "div",
4353
4387
  {
4354
4388
  onClick: () => handleScroll(200),
4355
4389
  className: classNames6("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4356
- children: /* @__PURE__ */ jsx17(ChevronRight4, {})
4390
+ children: /* @__PURE__ */ jsx19(ChevronRight4, {})
4357
4391
  }
4358
4392
  )
4359
4393
  ] })
@@ -4362,9 +4396,9 @@ var TabsMenuComponent = ({
4362
4396
 
4363
4397
  // src/component/input-style/index.tsx
4364
4398
  import { Bold, Droplet, Italic, Type, Underline } from "becoxy-icons";
4365
- import { Button as Button7, Input as Input10 } from "reactstrap";
4399
+ import { Button as Button7, Input as Input9 } from "reactstrap";
4366
4400
  import classnames10 from "classnames";
4367
- import { Fragment as Fragment23 } from "react";
4401
+ import { Fragment as Fragment24 } from "react";
4368
4402
 
4369
4403
  // src/component/input-style/fonts.ts
4370
4404
  var OptionFont = [
@@ -5223,7 +5257,7 @@ var OptionFont = [
5223
5257
  ];
5224
5258
 
5225
5259
  // src/component/input-style/index.tsx
5226
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
5260
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
5227
5261
  var InputStyleComponent = (props) => {
5228
5262
  const {
5229
5263
  value,
@@ -5237,8 +5271,8 @@ var InputStyleComponent = (props) => {
5237
5271
  disabledItalic,
5238
5272
  disabledUnderline
5239
5273
  } = props;
5240
- return /* @__PURE__ */ jsx18(Fragment23, { children: /* @__PURE__ */ jsxs17("div", { className: "d-flex align-items-center", children: [
5241
- /* @__PURE__ */ jsx18(
5274
+ return /* @__PURE__ */ jsx20(Fragment24, { children: /* @__PURE__ */ jsxs18("div", { className: "d-flex align-items-center", children: [
5275
+ /* @__PURE__ */ jsx20(
5242
5276
  SelectTable,
5243
5277
  {
5244
5278
  options: OptionFont,
@@ -5254,12 +5288,12 @@ var InputStyleComponent = (props) => {
5254
5288
  field: "label",
5255
5289
  headerText: "",
5256
5290
  template: (row) => {
5257
- return /* @__PURE__ */ jsx18("div", { style: { fontFamily: row.label }, children: row.label });
5291
+ return /* @__PURE__ */ jsx20("div", { style: { fontFamily: row.label }, children: row.label });
5258
5292
  }
5259
5293
  }
5260
5294
  ],
5261
5295
  formatOptionLabel: (props2) => {
5262
- return /* @__PURE__ */ jsx18("p", { style: {
5296
+ return /* @__PURE__ */ jsx20("p", { style: {
5263
5297
  paddingLeft: 3,
5264
5298
  borderRadius: 2,
5265
5299
  fontFamily: value.fontFamily,
@@ -5272,7 +5306,7 @@ var InputStyleComponent = (props) => {
5272
5306
  }
5273
5307
  }
5274
5308
  ),
5275
- /* @__PURE__ */ jsx18("div", { className: classnames10("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ jsx18(
5309
+ /* @__PURE__ */ jsx20("div", { className: classnames10("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ jsx20(
5276
5310
  SelectTable,
5277
5311
  {
5278
5312
  options: Array.from({ length: 100 }, (_, i) => ({ value: i + 1, label: i + 1 })),
@@ -5284,7 +5318,7 @@ var InputStyleComponent = (props) => {
5284
5318
  }
5285
5319
  }
5286
5320
  ) }),
5287
- /* @__PURE__ */ jsx18(
5321
+ /* @__PURE__ */ jsx20(
5288
5322
  "div",
5289
5323
  {
5290
5324
  className: classnames10("btn-input-style", { "active-custom": value.bold }, { "d-none": disabledBold }),
@@ -5293,10 +5327,10 @@ var InputStyleComponent = (props) => {
5293
5327
  onChange({ ...value, bold: !value.bold });
5294
5328
  }
5295
5329
  },
5296
- children: /* @__PURE__ */ jsx18(Bold, { fontSize: 18 })
5330
+ children: /* @__PURE__ */ jsx20(Bold, { fontSize: 18 })
5297
5331
  }
5298
5332
  ),
5299
- /* @__PURE__ */ jsx18(
5333
+ /* @__PURE__ */ jsx20(
5300
5334
  "div",
5301
5335
  {
5302
5336
  className: classnames10("btn-input-style", { "active-custom": value.italic }, { "d-none": disabledItalic }),
@@ -5305,10 +5339,10 @@ var InputStyleComponent = (props) => {
5305
5339
  onChange({ ...value, italic: !value.italic });
5306
5340
  }
5307
5341
  },
5308
- children: /* @__PURE__ */ jsx18(Italic, { fontSize: 18 })
5342
+ children: /* @__PURE__ */ jsx20(Italic, { fontSize: 18 })
5309
5343
  }
5310
5344
  ),
5311
- /* @__PURE__ */ jsx18(
5345
+ /* @__PURE__ */ jsx20(
5312
5346
  "div",
5313
5347
  {
5314
5348
  className: classnames10("btn-input-style", { "active-custom": value.underline }, { "d-none": disabledUnderline }),
@@ -5317,12 +5351,12 @@ var InputStyleComponent = (props) => {
5317
5351
  onChange({ ...value, underline: !value.underline });
5318
5352
  }
5319
5353
  },
5320
- children: /* @__PURE__ */ jsx18(Underline, { fontSize: 18 })
5354
+ children: /* @__PURE__ */ jsx20(Underline, { fontSize: 18 })
5321
5355
  }
5322
5356
  ),
5323
- /* @__PURE__ */ jsxs17(Button7, { tag: "label", color: "none", className: classnames10("btn-input-style", { "d-none": disabledColor }), children: [
5324
- /* @__PURE__ */ jsx18(Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
5325
- /* @__PURE__ */ jsx18(
5357
+ /* @__PURE__ */ jsxs18(Button7, { tag: "label", color: "none", className: classnames10("btn-input-style", { "d-none": disabledColor }), children: [
5358
+ /* @__PURE__ */ jsx20(Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
5359
+ /* @__PURE__ */ jsx20(
5326
5360
  "input",
5327
5361
  {
5328
5362
  type: "color",
@@ -5336,10 +5370,10 @@ var InputStyleComponent = (props) => {
5336
5370
  }
5337
5371
  )
5338
5372
  ] }),
5339
- /* @__PURE__ */ jsxs17(Button7, { tag: "label", color: "none", className: classnames10("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
5340
- /* @__PURE__ */ jsx18(Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
5341
- /* @__PURE__ */ jsx18(
5342
- Input10,
5373
+ /* @__PURE__ */ jsxs18(Button7, { tag: "label", color: "none", className: classnames10("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
5374
+ /* @__PURE__ */ jsx20(Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
5375
+ /* @__PURE__ */ jsx20(
5376
+ Input9,
5343
5377
  {
5344
5378
  id: "backgroundColor",
5345
5379
  type: "color",