react-table-edit 1.2.44 → 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.js CHANGED
@@ -55,7 +55,7 @@ __export(src_exports, {
55
55
  module.exports = __toCommonJS(src_exports);
56
56
 
57
57
  // src/component/table/index.tsx
58
- var import_react16 = require("react");
58
+ var import_react17 = require("react");
59
59
  var import_reactstrap11 = require("reactstrap");
60
60
  var import_classnames14 = __toESM(require("classnames"));
61
61
  var import_react_i18next12 = require("react-i18next");
@@ -476,36 +476,34 @@ var import_react_hook_form2 = require("react-hook-form");
476
476
  var import_reactstrap3 = require("reactstrap");
477
477
  var import_classnames3 = __toESM(require("classnames"));
478
478
  var import_react5 = require("react");
479
+ var import_react_number_format = require("react-number-format");
479
480
  var import_react_i18next2 = require("react-i18next");
480
481
  var import_jsx_runtime4 = require("react/jsx-runtime");
481
482
  var NumberInput = (props) => {
482
- const { t } = (0, import_react_i18next2.useTranslation)();
483
483
  const {
484
- control,
485
484
  id,
486
- fractionCurrency = 10,
485
+ control,
486
+ fractionCurrency,
487
487
  name,
488
488
  min,
489
489
  max,
490
- type,
491
490
  label,
492
491
  labelSize,
493
492
  required,
494
493
  errors,
495
- height,
496
494
  disabled,
497
- row,
498
495
  isLabel,
496
+ fixedDecimalScale,
499
497
  placeholder,
500
- autoFocus,
501
498
  inLine,
502
499
  callback,
503
- readOnly,
504
500
  decimalSeparator = ",",
505
501
  thousandSeparator = ".",
506
502
  classes,
507
- ...rest
503
+ width,
504
+ allowNegative
508
505
  } = props;
506
+ const { t } = (0, import_react_i18next2.useTranslation)();
509
507
  const renderLabel = () => {
510
508
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react5.Fragment, { children: isLabel === false ? "" : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_reactstrap3.Label, { className: "form-label", for: name, children: [
511
509
  t(label ? label : ""),
@@ -521,64 +519,50 @@ var NumberInput = (props) => {
521
519
  {
522
520
  name,
523
521
  control,
524
- render: ({ field: { value, onChange } }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
525
- import_reactstrap3.Input,
526
- {
527
- id,
528
- value: formartNumberic(value, decimalSeparator, thousandSeparator, fractionCurrency),
529
- onChange: (val) => {
530
- let newVal = "";
531
- const flag = val.target?.value.startsWith("-");
532
- if (val.target?.value.endsWith(decimalSeparator)) {
533
- if ((val.target?.value.match(new RegExp(decimalSeparator === "," ? "," : "\\.", "g")) || []).length > 1 || fractionCurrency === 0) {
534
- newVal = val.target?.value.slice(0, -1).replaceAll(thousandSeparator, "");
522
+ render: ({ field: { value, onChange } }) => {
523
+ let floatValue = parseFloat(value);
524
+ const numericFormatProps = {
525
+ value: !isNullOrUndefined(value) ? value : "",
526
+ thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
527
+ decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
528
+ allowNegative: allowNegative ?? false,
529
+ decimalScale: fractionCurrency ?? 0,
530
+ fixedDecimalScale
531
+ };
532
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
533
+ import_react_number_format.NumericFormat,
534
+ {
535
+ ...numericFormatProps,
536
+ className: (0, import_classnames3.default)("form-control text-right", {
537
+ "is-invalid": errors
538
+ }),
539
+ onValueChange: (values) => {
540
+ floatValue = values?.floatValue;
541
+ const textBeforeDot = values?.value.split(".")[1];
542
+ onChange(textBeforeDot ? parseFloat(values?.value).toFixed(textBeforeDot.length) : values?.floatValue);
543
+ },
544
+ onFocus: (e) => {
545
+ e.target.setSelectionRange(0, e.target.innerText.length - 1);
546
+ },
547
+ onChange: () => {
548
+ if (callback) {
549
+ callback(floatValue);
550
+ }
551
+ },
552
+ onBlur: () => {
553
+ if (max && floatValue > max) {
554
+ onChange(max);
555
+ } else if (min && floatValue < min) {
556
+ onChange(min);
535
557
  } else {
536
- newVal = val.target?.value.replaceAll(thousandSeparator, "");
558
+ onChange(floatValue);
537
559
  }
538
- } else {
539
- newVal = val.target.value.replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
540
- }
541
- if (decimalSeparator !== ".") {
542
- newVal = newVal.replaceAll(decimalSeparator, ".");
543
- }
544
- onChange(flag ? `-${newVal}` : newVal);
545
- },
546
- onBlur: (val) => {
547
- let newVal = "";
548
- const flag = val.target?.value.startsWith("-");
549
- if (val.target?.value.endsWith(decimalSeparator)) {
550
- newVal = val.target?.value.slice(0, -1).replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
551
- } else {
552
- newVal = val.target.value.replaceAll(new RegExp(`[^0-9${decimalSeparator}]`, "g"), "");
553
- }
554
- if (decimalSeparator !== ".") {
555
- newVal = newVal.replaceAll(decimalSeparator, ".");
556
- }
557
- let value2 = flag ? 0 - Number(newVal) : Number(newVal);
558
- if (max !== void 0 && value2 > max) {
559
- value2 = max;
560
- } else if (min !== void 0 && value2 < min) {
561
- value2 = min;
562
- }
563
- onChange(value2);
564
- if (callback) {
565
- callback(value2);
566
- }
567
- },
568
- style: { height: `${height}px` },
569
- autoFocus,
570
- disabled,
571
- placeholder,
572
- type: type ? type : "text",
573
- invalid: errors && true,
574
- className: "h-100",
575
- rows: row,
576
- min,
577
- max,
578
- readOnly,
579
- ...rest
580
- }
581
- )
560
+ },
561
+ placeholder,
562
+ disabled
563
+ }
564
+ );
565
+ }
582
566
  }
583
567
  ),
584
568
  errors && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_reactstrap3.FormFeedback, { children: errors?.message })
@@ -598,7 +582,7 @@ var NumberInput = (props) => {
598
582
  ),
599
583
  children: [
600
584
  renderLabel(),
601
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_classnames3.default)("form-input-content", { "hidden-label": isLabel === false }), children: renderInput() })
585
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { width: width ? width : void 0 }, className: (0, import_classnames3.default)("form-input-content", { "hidden-label": isLabel === false }), children: renderInput() })
602
586
  ]
603
587
  }
604
588
  ) });
@@ -713,9 +697,11 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
713
697
  }
714
698
  }, [inputRef]);
715
699
  (0, import_react6.useEffect)(() => {
716
- if (searchTerm && !dropdownOpen) {
717
- setDropdownOpen(true);
718
- setIndexFocus(0);
700
+ if (searchTerm) {
701
+ if (!dropdownOpen) {
702
+ setDropdownOpen(true);
703
+ }
704
+ setIndexFocus(-1);
719
705
  }
720
706
  }, [searchTerm]);
721
707
  (0, import_react6.useEffect)(() => {
@@ -754,10 +740,9 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
754
740
  if (dropdownOpen && newItem) {
755
741
  handChange(newItem);
756
742
  handleOpenClose();
757
- flag = true;
758
743
  }
759
- if (!searchTerm) {
760
- handleOpenClose();
744
+ if (!dropdownOpen) {
745
+ setDropdownOpen(true);
761
746
  flag = true;
762
747
  }
763
748
  } else if (e.code === "Escape") {
@@ -2874,9 +2859,79 @@ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2874
2859
  });
2875
2860
 
2876
2861
  // src/component/table/index.tsx
2877
- var import_react_number_format = require("react-number-format");
2862
+ var import_react_number_format2 = require("react-number-format");
2863
+
2864
+ // src/component/table/toolbar-top.tsx
2878
2865
  var import_jsx_runtime16 = require("react/jsx-runtime");
2879
- var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2866
+ var renderToolbarTop = (toolbarTopOption) => {
2867
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-items", children: [
2868
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
2869
+ return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) }) : "";
2870
+ }) }),
2871
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
2872
+ return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) }) : "";
2873
+ }) }),
2874
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
2875
+ return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) }) : "";
2876
+ }) })
2877
+ ] }) });
2878
+ };
2879
+ var toolbar_top_default = renderToolbarTop;
2880
+
2881
+ // src/component/input-date/index.tsx
2882
+ var import_react16 = require("react");
2883
+ var import_react_datepicker = __toESM(require("react-datepicker"));
2884
+ var import_react_input_mask = __toESM(require("react-input-mask"));
2885
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2886
+ var DateInput = (props) => {
2887
+ const { id, onKeyDown, dateFormat, className, onChange, value } = props;
2888
+ const [open, setOpen] = (0, import_react16.useState)(false);
2889
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2890
+ import_react_datepicker.default,
2891
+ {
2892
+ id,
2893
+ open,
2894
+ className,
2895
+ selected: value,
2896
+ onChange: (date) => {
2897
+ if (onChange) {
2898
+ onChange(date);
2899
+ }
2900
+ },
2901
+ dateFormat,
2902
+ locale: "vi",
2903
+ showMonthDropdown: true,
2904
+ showYearDropdown: true,
2905
+ dropdownMode: "select",
2906
+ onCalendarClose: () => setOpen(false),
2907
+ onCalendarOpen: () => setOpen(true),
2908
+ customInput: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_input_mask.default, { mask: "99/99/9999", placeholder: dateFormat }),
2909
+ onKeyDown: (e) => {
2910
+ if (e.code === "Space") {
2911
+ setOpen(!open);
2912
+ setTimeout(() => {
2913
+ const element = document.getElementById(id ?? "");
2914
+ if (element) {
2915
+ element.focus();
2916
+ }
2917
+ }, 100);
2918
+ } else {
2919
+ if (onKeyDown && !open) {
2920
+ const rs = onKeyDown(e);
2921
+ if (rs) {
2922
+ setOpen(false);
2923
+ }
2924
+ }
2925
+ }
2926
+ }
2927
+ }
2928
+ );
2929
+ };
2930
+ var input_date_default = DateInput;
2931
+
2932
+ // src/component/table/index.tsx
2933
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2934
+ var TableEdit = (0, import_react17.forwardRef)((props, ref) => {
2880
2935
  const { t } = (0, import_react_i18next12.useTranslation)();
2881
2936
  const {
2882
2937
  idTable,
@@ -2905,35 +2960,35 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2905
2960
  isMulti,
2906
2961
  disableAutoKey
2907
2962
  } = props;
2908
- (0, import_react16.useImperativeHandle)(ref, () => {
2963
+ (0, import_react17.useImperativeHandle)(ref, () => {
2909
2964
  return {
2910
2965
  refeshFocusRow: handleRefeshRow
2911
2966
  };
2912
2967
  });
2913
- const [refreshRow, setRefreshRow] = (0, import_react16.useState)(false);
2914
- const [indexFocus, setIndexFocus] = (0, import_react16.useState)();
2915
- const [selectedRows, setSelectedRows] = (0, import_react16.useState)([]);
2916
- const [headerColumns, setHeaderColumns] = (0, import_react16.useState)([[]]);
2917
- const [contentColumns, setContentColumns] = (0, import_react16.useState)([]);
2918
- const [levelCol, setLevelCol] = (0, import_react16.useState)(0);
2919
- const [columnFistEdit, setColumnFistEdit] = (0, import_react16.useState)(0);
2920
- const [columnLastEdit, setColumnlastEdit] = (0, import_react16.useState)(0);
2921
- const [objWidthFix, setObjWidthFix] = (0, import_react16.useState)({});
2922
- const [openPopupSetupColumn, setOpenPopupSetupColumn] = (0, import_react16.useState)(false);
2923
- const [searchTerm, setSearchTerm] = (0, import_react16.useState)("");
2924
- const tableElement = (0, import_react16.useRef)(null);
2925
- const gridRef = (0, import_react16.useRef)();
2968
+ const [refreshRow, setRefreshRow] = (0, import_react17.useState)(false);
2969
+ const [indexFocus, setIndexFocus] = (0, import_react17.useState)();
2970
+ const [selectedRows, setSelectedRows] = (0, import_react17.useState)([]);
2971
+ const [headerColumns, setHeaderColumns] = (0, import_react17.useState)([[]]);
2972
+ const [contentColumns, setContentColumns] = (0, import_react17.useState)([]);
2973
+ const [levelCol, setLevelCol] = (0, import_react17.useState)(0);
2974
+ const [columnFistEdit, setColumnFistEdit] = (0, import_react17.useState)(0);
2975
+ const [columnLastEdit, setColumnlastEdit] = (0, import_react17.useState)(0);
2976
+ const [objWidthFix, setObjWidthFix] = (0, import_react17.useState)({});
2977
+ const [openPopupSetupColumn, setOpenPopupSetupColumn] = (0, import_react17.useState)(false);
2978
+ const [searchTerm, setSearchTerm] = (0, import_react17.useState)("");
2979
+ const tableElement = (0, import_react17.useRef)(null);
2980
+ const gridRef = (0, import_react17.useRef)();
2926
2981
  let totalCount = dataSource.length;
2927
2982
  const pagingClient = pagingSetting?.allowPaging && (pagingSetting?.pagingClient || !(editDisable || addDisable));
2928
2983
  const searchClient = searchSetting?.searchEnable && (searchSetting?.searchClient || !(editDisable || addDisable));
2929
2984
  const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? "id";
2930
2985
  const fieldUniKey = columns.filter((item) => item.isUnikey === true)?.map((item) => item.field);
2931
- (0, import_react16.useEffect)(() => {
2986
+ (0, import_react17.useEffect)(() => {
2932
2987
  if (pagingClient && pagingSetting.setCurrentPage && Math.ceil(totalCount / (pagingSetting?.pageSize ?? 1)) < (pagingSetting.currentPage ?? 1)) {
2933
2988
  pagingSetting.setCurrentPage(1);
2934
2989
  }
2935
2990
  }, [dataSource]);
2936
- (0, import_react16.useEffect)(() => {
2991
+ (0, import_react17.useEffect)(() => {
2937
2992
  let indexFirst = -1;
2938
2993
  let indexlast = -1;
2939
2994
  let letfWidthFix = 0;
@@ -2967,7 +3022,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2967
3022
  setColumnFistEdit(indexFirst + 1);
2968
3023
  setColumnlastEdit(indexlast + 1);
2969
3024
  }, [contentColumns]);
2970
- (0, import_react16.useEffect)(() => {
3025
+ (0, import_react17.useEffect)(() => {
2971
3026
  const arrHeaderColumns = [];
2972
3027
  const arrContentColumns = [];
2973
3028
  let headerLevelRow = 0;
@@ -2984,7 +3039,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2984
3039
  setHeaderColumns(arrHeaderColumns);
2985
3040
  setContentColumns(arrContentColumns);
2986
3041
  }, [columns]);
2987
- (0, import_react16.useEffect)(() => {
3042
+ (0, import_react17.useEffect)(() => {
2988
3043
  const arrHeaderColumns = [];
2989
3044
  const arrContentColumns = [];
2990
3045
  let headerLevelRow = 0;
@@ -3063,7 +3118,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3063
3118
  }
3064
3119
  };
3065
3120
  const searchTemplate = () => {
3066
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "me-50 r-search", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3121
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "me-50 r-search", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3067
3122
  react_input_default,
3068
3123
  {
3069
3124
  style: { width: "230px" },
@@ -3084,59 +3139,45 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3084
3139
  const RenderEdit = (row, col, indexCol, indexRow) => {
3085
3140
  switch (col?.editTypeCondition ? col?.editTypeCondition(row) : col.editType) {
3086
3141
  case "date":
3087
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3088
- import_reactstrap11.Input,
3142
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3143
+ input_date_default,
3089
3144
  {
3090
3145
  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") : row[col.field],
3093
- onChange: (val) => {
3094
- row[col.field] = val.target.value;
3146
+ className: (0, import_classnames14.default)("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3147
+ value: row[col.field],
3148
+ onChange: (date) => {
3149
+ row[col.field] = date;
3095
3150
  if (col.callback) {
3096
- col.callback(row, val.target.value, indexRow);
3151
+ col.callback(date, indexRow);
3097
3152
  }
3098
3153
  handleDataChange(row, col, indexRow);
3099
3154
  },
3100
- className: (0, import_classnames14.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3101
- type: "date",
3102
- max: "9999-12-31",
3155
+ dateFormat: "dd/MM/yyyy",
3103
3156
  onKeyDown: (e) => {
3104
3157
  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();
3158
+ return true;
3111
3159
  }
3112
3160
  }
3113
3161
  }
3114
3162
  );
3115
3163
  case "datetime":
3116
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3117
- import_reactstrap11.Input,
3164
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3165
+ input_date_default,
3118
3166
  {
3119
3167
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3120
- style: { textAlign: col.textAlign, height: 29 },
3121
- value: row[col.field] ? formatDateTime(row[col.field], "yyyy-MM-dd HH:mm") : row[col.field],
3122
- onChange: (val) => {
3123
- row[col.field] = val.target.value;
3168
+ className: (0, import_classnames14.default)("form-control border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3169
+ value: row[col.field],
3170
+ onChange: (date) => {
3171
+ row[col.field] = date;
3124
3172
  if (col.callback) {
3125
- col.callback(val.target.value, indexRow);
3173
+ col.callback(date, indexRow);
3126
3174
  }
3127
3175
  handleDataChange(row, col, indexRow);
3128
3176
  },
3129
- className: (0, import_classnames14.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3130
- type: "datetime-local",
3131
- max: "9999-12-31T23:59",
3177
+ dateFormat: "dd/MM/yyyy HH:mm",
3132
3178
  onKeyDown: (e) => {
3133
3179
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3134
- }
3135
- },
3136
- onPaste: (e) => {
3137
- if (toolbarSetting?.showBottomToolbar && !editDisable && !addDisable) {
3138
- pasteDataFromExcel(indexRow, indexCol, e);
3139
- e.preventDefault();
3180
+ return true;
3140
3181
  }
3141
3182
  }
3142
3183
  }
@@ -3157,7 +3198,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3157
3198
  valueSelect = col.selectSettings?.defaultValue(row);
3158
3199
  }
3159
3200
  }
3160
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3201
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3161
3202
  SelectTable,
3162
3203
  {
3163
3204
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3250,14 +3291,14 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3250
3291
  } else {
3251
3292
  valueSelectTree = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? findItemInTree(optionsSelectTree, row[col.field]) : "";
3252
3293
  }
3253
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3294
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3254
3295
  "div",
3255
3296
  {
3256
3297
  onKeyDown: (e) => {
3257
3298
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3258
3299
  }
3259
3300
  },
3260
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3301
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3261
3302
  SelectTableTree,
3262
3303
  {
3263
3304
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3316,7 +3357,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3316
3357
  }
3317
3358
  );
3318
3359
  case "checkbox":
3319
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3360
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3320
3361
  import_reactstrap11.Input,
3321
3362
  {
3322
3363
  checked: row[col.field],
@@ -3346,8 +3387,8 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3346
3387
  decimalScale: col.numericSettings?.fraction ?? 0
3347
3388
  };
3348
3389
  let floatValue = parseFloat(row[col.field]);
3349
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3350
- import_react_number_format.NumericFormat,
3390
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3391
+ import_react_number_format2.NumericFormat,
3351
3392
  {
3352
3393
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
3353
3394
  style: { textAlign: col.textAlign, height: 29 },
@@ -3390,7 +3431,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3390
3431
  }
3391
3432
  );
3392
3433
  case "color":
3393
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3434
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3394
3435
  import_reactstrap11.Input,
3395
3436
  {
3396
3437
  type: "color",
@@ -3413,7 +3454,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3413
3454
  `col-${indexRow}-${indexCol}`
3414
3455
  ) });
3415
3456
  case "form":
3416
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3457
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3417
3458
  edit_form_default,
3418
3459
  {
3419
3460
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3441,7 +3482,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3441
3482
  }
3442
3483
  );
3443
3484
  default:
3444
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3485
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3445
3486
  import_reactstrap11.Input,
3446
3487
  {
3447
3488
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -3818,7 +3859,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3818
3859
  }
3819
3860
  }
3820
3861
  };
3821
- (0, import_react16.useEffect)(() => {
3862
+ (0, import_react17.useEffect)(() => {
3822
3863
  setIndexFocus(-1);
3823
3864
  if (setSelectedItem) {
3824
3865
  if (isMulti) {
@@ -3845,7 +3886,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3845
3886
  }
3846
3887
  }
3847
3888
  }, [selectedRows]);
3848
- (0, import_react16.useEffect)(() => {
3889
+ (0, import_react17.useEffect)(() => {
3849
3890
  if (!isMulti) {
3850
3891
  if (dataSource && selectedItem && selectedItem[fieldKey]) {
3851
3892
  if (selectedRows?.length === 0 || selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
@@ -3862,7 +3903,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3862
3903
  }, [selectedItem]);
3863
3904
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
3864
3905
  if (col.field === "command") {
3865
- return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3906
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3866
3907
  "td",
3867
3908
  {
3868
3909
  className: (0, import_classnames14.default)(
@@ -3875,12 +3916,12 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3875
3916
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3876
3917
  textAlign: col.textAlign ? col.textAlign : "left"
3877
3918
  },
3878
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-rowcell-div command", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3919
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-rowcell-div command", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3879
3920
  },
3880
3921
  `col-${indexRow}-${indexCol}`
3881
3922
  );
3882
3923
  } else if (col.field === "#") {
3883
- return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3924
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3884
3925
  "td",
3885
3926
  {
3886
3927
  className: (0, import_classnames14.default)(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
@@ -3927,12 +3968,12 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3927
3968
  e.stopPropagation();
3928
3969
  }
3929
3970
  },
3930
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-rowcell-div", children: indexRow + 1 })
3971
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-rowcell-div", children: indexRow + 1 })
3931
3972
  },
3932
3973
  `col-${indexRow}-${indexCol}`
3933
3974
  );
3934
3975
  } else if (col.field === "checkbox") {
3935
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3976
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3936
3977
  "td",
3937
3978
  {
3938
3979
  className: (0, import_classnames14.default)(
@@ -3945,7 +3986,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3945
3986
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3946
3987
  textAlign: col.textAlign ? col.textAlign : "center"
3947
3988
  },
3948
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3989
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3949
3990
  "div",
3950
3991
  {
3951
3992
  className: "r-rowcell-div cursor-pointer",
@@ -3969,7 +4010,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3969
4010
  e.stopPropagation();
3970
4011
  }
3971
4012
  },
3972
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4013
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3973
4014
  import_reactstrap11.Input,
3974
4015
  {
3975
4016
  checked: isSelected,
@@ -3996,7 +4037,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
3996
4037
  }
3997
4038
  const typeDis = !editDisable && (indexFocus === indexRow || col.editType === "checkbox") && (!col.disabledCondition || !col.disabledCondition(row)) ? col.editEnable ? 1 : col.template ? 2 : 3 : col.template ? 2 : 3;
3998
4039
  const errorMessage = typeDis === 1 || col.field === "" || !col.validate ? "" : col.validate(row[col.field], row);
3999
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4040
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4000
4041
  "td",
4001
4042
  {
4002
4043
  className: (0, import_classnames14.default)(
@@ -4036,11 +4077,11 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4036
4077
  e.stopPropagation();
4037
4078
  }
4038
4079
  },
4039
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4080
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4040
4081
  "div",
4041
4082
  {
4042
4083
  className: (0, import_classnames14.default)("r-rowcell-div"),
4043
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4084
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4044
4085
  "div",
4045
4086
  {
4046
4087
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
@@ -4049,16 +4090,16 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4049
4090
  margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2
4050
4091
  },
4051
4092
  children: [
4052
- 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: [
4093
+ typeDis === 1 && !refreshRow ? RenderEdit(row, col, indexCol, indexRow) : /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4053
4094
  " ",
4054
4095
  `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
4055
4096
  ] }) : value }),
4056
- /* @__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 }) }),
4057
- !(typeDis === 1 && !refreshRow) && /* @__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: [
4097
+ /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)(import_becoxy_icons7.AlertCircle, { fontSize: 15.5 }) }),
4098
+ !(typeDis === 1 && !refreshRow) && /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4058
4099
  " ",
4059
4100
  `${formatSetting?.prefixNegative ?? "-"}${value}${formatSetting?.suffixNegative ?? ""}`
4060
4101
  ] }) : value }),
4061
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4102
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4062
4103
  import_reactstrap11.UncontrolledTooltip,
4063
4104
  {
4064
4105
  target: `error-${indexRow}-${indexCol}`,
@@ -4077,7 +4118,10 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4077
4118
  }
4078
4119
  };
4079
4120
  const renderFooterCol = (col, indexCol) => {
4080
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4121
+ const sumValue = col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
4122
+ return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
4123
+ }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : 0;
4124
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4081
4125
  "td",
4082
4126
  {
4083
4127
  className: (0, import_classnames14.default)(
@@ -4089,60 +4133,51 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4089
4133
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
4090
4134
  textAlign: col.textAlign ? col.textAlign : "left"
4091
4135
  },
4092
- 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) {
4093
- return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
4094
- }, 0), formatSetting?.decimalSeparator ?? ",", formatSetting?.thousandSeparator ?? ".", col.numericSettings?.fraction, true) : "" })
4136
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "r-footer-div", children: [
4137
+ col.haveSum === true && col.editType === "numeric" && Number(sumValue) >= 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: sumValue }),
4138
+ col.haveSum === true && col.editType === "numeric" && Number(sumValue) < 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { color: formatSetting?.colorNegative ?? "red" }, children: [
4139
+ " ",
4140
+ `${formatSetting?.prefixNegative ?? "-"}${sumValue}${formatSetting?.suffixNegative ?? ""}`
4141
+ ] })
4142
+ ] })
4095
4143
  }
4096
4144
  ) }, `summarycell-${indexCol}`);
4097
4145
  };
4098
- const renderToolbarTop = () => {
4099
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-items", children: [
4100
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
4101
- return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) : "";
4102
- }) }),
4103
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
4104
- return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) : "";
4105
- }) }),
4106
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
4107
- return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) : "";
4108
- }) })
4109
- ] }) });
4110
- };
4111
4146
  const renderToolbarBottom = () => {
4112
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-items", children: [
4113
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-left", children: [
4114
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
4115
- (indexFocus ?? -1) > -1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4116
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: () => {
4147
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "r-toolbar-items", children: [
4148
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "r-toolbar-left", children: [
4149
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
4150
+ (indexFocus ?? -1) > -1 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
4151
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: () => {
4117
4152
  handleDuplicate(dataSource[indexFocus ?? -1], indexFocus ?? -1);
4118
4153
  }, className: "d-flex", children: t("Duplicate") }) }),
4119
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
4120
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
4121
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: " " }),
4122
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
4154
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
4155
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
4156
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: " " }),
4157
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.Button, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
4123
4158
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4124
- return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
4159
+ return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
4125
4160
  })
4126
4161
  ] }),
4127
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4128
- return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
4162
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4163
+ return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
4129
4164
  }) }),
4130
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-right", children: [
4165
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "r-toolbar-right", children: [
4131
4166
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4132
- return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
4167
+ return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
4133
4168
  }),
4134
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
4135
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_reactstrap11.UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
4136
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.DropdownToggle, { tag: "div", color: "primary", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.Info, { className: "cursor-pointer text-primary" }) }),
4137
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4169
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons7.Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
4170
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_reactstrap11.UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
4171
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_reactstrap11.DropdownToggle, { tag: "div", color: "primary", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons7.Info, { className: "cursor-pointer text-primary" }) }),
4172
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4138
4173
  import_reactstrap11.DropdownMenu,
4139
4174
  {
4140
4175
  className: "formula-dropdown icon-dropdown",
4141
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ul", { className: "mb-0 pe-50", children: [
4142
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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" }),
4143
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
4144
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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" }),
4145
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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" })
4176
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("ul", { className: "mb-0 pe-50", children: [
4177
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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" }),
4178
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
4179
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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" }),
4180
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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
4181
  ] })
4147
4182
  }
4148
4183
  )
@@ -4173,7 +4208,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4173
4208
  const flagDisplay = !pagingClient || totalCount > (pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1) && totalCount <= (pagingSetting.pageSize ?? 0) * (pagingSetting.currentPage ?? 0);
4174
4209
  if (flagDisplay) {
4175
4210
  countDisplay++;
4176
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4211
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4177
4212
  "tr",
4178
4213
  {
4179
4214
  className: (0, import_classnames14.default)("r-row", { "fisrt-row": countDisplay === 0 }),
@@ -4187,19 +4222,19 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4187
4222
  }
4188
4223
  });
4189
4224
  };
4190
- (0, import_react16.useEffect)(() => {
4225
+ (0, import_react17.useEffect)(() => {
4191
4226
  if (pagingClient && pagingSetting?.setCurrentPage && (searchSetting?.searchTerm !== void 0 ? searchSetting?.searchTerm : searchTerm)) {
4192
4227
  pagingSetting?.setCurrentPage(1);
4193
4228
  }
4194
4229
  }, [searchTerm, searchSetting?.searchTerm]);
4195
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react16.Fragment, { children: [
4196
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "react-table-edit", children: [
4197
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-grid", ref: gridRef, children: [
4198
- toolbarSetting?.showTopToolbar ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: renderToolbarTop() }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {}),
4199
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { style: { width: "100%" }, children: [
4200
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
4201
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
4202
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4230
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react17.Fragment, { children: [
4231
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "react-table-edit", children: [
4232
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "r-grid", ref: gridRef, children: [
4233
+ toolbarSetting?.showTopToolbar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: toolbar_top_default(toolbarTopOption) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {}),
4234
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("table", { style: { width: "100%" }, children: [
4235
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
4236
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
4237
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4203
4238
  header_default,
4204
4239
  {
4205
4240
  col,
@@ -4219,14 +4254,14 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4219
4254
  );
4220
4255
  }) }, `header-${-indexParent}`);
4221
4256
  }) }),
4222
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { className: "r-gridcontent", children: renderData() }),
4223
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "r-row", children: contentColumns.map((col, index) => {
4257
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { className: "r-gridcontent", children: renderData() }),
4258
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: "r-row", children: contentColumns.map((col, index) => {
4224
4259
  return renderFooterCol(col, index);
4225
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {}) })
4260
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {}) })
4226
4261
  ] }) }),
4227
- toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: renderToolbarBottom() }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {})
4262
+ toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: renderToolbarBottom() }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {})
4228
4263
  ] }),
4229
- pagingSetting?.allowPaging ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4264
+ pagingSetting?.allowPaging ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4230
4265
  PagingComponent,
4231
4266
  {
4232
4267
  onChangePage,
@@ -4236,9 +4271,9 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
4236
4271
  totalItem: pagingClient ? totalCount : pagingSetting?.totalItem ?? 0,
4237
4272
  onChangePageSize
4238
4273
  }
4239
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {})
4274
+ ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {})
4240
4275
  ] }),
4241
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4276
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4242
4277
  sidebar_setting_column_default,
4243
4278
  {
4244
4279
  handleSidebar: () => {
@@ -4256,10 +4291,10 @@ var table_default = TableEdit;
4256
4291
  // src/component/tab-menu/index.tsx
4257
4292
  var import_becoxy_icons8 = require("becoxy-icons");
4258
4293
  var import_classnames15 = __toESM(require("classnames"));
4259
- var import_react17 = require("react");
4294
+ var import_react18 = require("react");
4260
4295
  var import_react_router_dom = require("react-router-dom");
4261
4296
  var import_reactstrap12 = require("reactstrap");
4262
- var import_jsx_runtime17 = require("react/jsx-runtime");
4297
+ var import_jsx_runtime19 = require("react/jsx-runtime");
4263
4298
  var TabsMenuComponent = ({
4264
4299
  buttonWidth,
4265
4300
  tabParent,
@@ -4271,14 +4306,14 @@ var TabsMenuComponent = ({
4271
4306
  renderModal
4272
4307
  }) => {
4273
4308
  const navigate = (0, import_react_router_dom.useNavigate)();
4274
- const [dataMenu, setDataMenu] = (0, import_react17.useState)([]);
4275
- const [openMenu, setOpenMenu] = (0, import_react17.useState)(false);
4276
- const [url, setUrl] = (0, import_react17.useState)("");
4277
- const [contentWidth, setContentWidth] = (0, import_react17.useState)(0);
4278
- const [componentWidth, setComponentWidth] = (0, import_react17.useState)(0);
4279
- const [scrollPosition, setScrollPosition] = (0, import_react17.useState)(0);
4280
- const [dataItem, setDataItem] = (0, import_react17.useState)([]);
4281
- const [openModal, setOpenModal] = (0, import_react17.useState)({});
4309
+ const [dataMenu, setDataMenu] = (0, import_react18.useState)([]);
4310
+ const [openMenu, setOpenMenu] = (0, import_react18.useState)(false);
4311
+ const [url, setUrl] = (0, import_react18.useState)("");
4312
+ const [contentWidth, setContentWidth] = (0, import_react18.useState)(0);
4313
+ const [componentWidth, setComponentWidth] = (0, import_react18.useState)(0);
4314
+ const [scrollPosition, setScrollPosition] = (0, import_react18.useState)(0);
4315
+ const [dataItem, setDataItem] = (0, import_react18.useState)([]);
4316
+ const [openModal, setOpenModal] = (0, import_react18.useState)({});
4282
4317
  const handleWindowResize = () => {
4283
4318
  const tabEle = document.getElementById(`tab-component-${resourceCode}`);
4284
4319
  const tabContent = document.getElementById(`content-component-${resourceCode}`);
@@ -4287,7 +4322,7 @@ var TabsMenuComponent = ({
4287
4322
  setContentWidth(tabContent?.offsetWidth ?? 0);
4288
4323
  }
4289
4324
  };
4290
- (0, import_react17.useEffect)(() => {
4325
+ (0, import_react18.useEffect)(() => {
4291
4326
  setUrl(window.location.pathname);
4292
4327
  window.addEventListener("resize", handleWindowResize);
4293
4328
  setTimeout(() => {
@@ -4303,7 +4338,7 @@ var TabsMenuComponent = ({
4303
4338
  window.removeEventListener("resize", handleWindowResize);
4304
4339
  };
4305
4340
  }, []);
4306
- (0, import_react17.useEffect)(() => {
4341
+ (0, import_react18.useEffect)(() => {
4307
4342
  const item = resources?.find((x) => x.code === (resourceCodeParent ? resourceCodeParent : resourceCode));
4308
4343
  if (item) {
4309
4344
  if (resourceCodeParent) {
@@ -4334,22 +4369,22 @@ var TabsMenuComponent = ({
4334
4369
  const handleModal = (name) => {
4335
4370
  setOpenModal((old) => ({ ...old, [name]: !(openModal[name] ?? false) }));
4336
4371
  };
4337
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react17.Fragment, { children: [
4372
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react18.Fragment, { children: [
4338
4373
  renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : "",
4339
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_classnames15.default)("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
4340
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4374
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_classnames15.default)("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
4375
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4341
4376
  "div",
4342
4377
  {
4343
4378
  onClick: () => handleScroll(-200),
4344
4379
  className: (0, import_classnames15.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4345
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.ChevronLeft, {})
4380
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_becoxy_icons8.ChevronLeft, {})
4346
4381
  }
4347
4382
  ),
4348
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
4383
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
4349
4384
  if (item?.resAttributes?.IS_MENU === "1") {
4350
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_reactstrap12.UncontrolledDropdown, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
4351
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_reactstrap12.DropdownToggle, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: item.name }) }),
4352
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_reactstrap12.DropdownMenu, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4385
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_reactstrap12.UncontrolledDropdown, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
4386
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_reactstrap12.DropdownToggle, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: item.name }) }),
4387
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_reactstrap12.DropdownMenu, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4353
4388
  import_reactstrap12.DropdownItem,
4354
4389
  {
4355
4390
  style: { borderRadius: "5px", margin: "0 0.5rem", width: "95%" },
@@ -4366,7 +4401,7 @@ var TabsMenuComponent = ({
4366
4401
  )) })
4367
4402
  ] }, item.code);
4368
4403
  } else {
4369
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4404
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4370
4405
  import_react_router_dom.Link,
4371
4406
  {
4372
4407
  to: item.url,
@@ -4377,12 +4412,12 @@ var TabsMenuComponent = ({
4377
4412
  );
4378
4413
  }
4379
4414
  }) }) }),
4380
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4415
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4381
4416
  "div",
4382
4417
  {
4383
4418
  onClick: () => handleScroll(200),
4384
4419
  className: (0, import_classnames15.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4385
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.ChevronRight, {})
4420
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_becoxy_icons8.ChevronRight, {})
4386
4421
  }
4387
4422
  )
4388
4423
  ] })
@@ -4393,7 +4428,7 @@ var TabsMenuComponent = ({
4393
4428
  var import_becoxy_icons9 = require("becoxy-icons");
4394
4429
  var import_reactstrap13 = require("reactstrap");
4395
4430
  var import_classnames16 = __toESM(require("classnames"));
4396
- var import_react18 = require("react");
4431
+ var import_react19 = require("react");
4397
4432
 
4398
4433
  // src/component/input-style/fonts.ts
4399
4434
  var OptionFont = [
@@ -5252,7 +5287,7 @@ var OptionFont = [
5252
5287
  ];
5253
5288
 
5254
5289
  // src/component/input-style/index.tsx
5255
- var import_jsx_runtime18 = require("react/jsx-runtime");
5290
+ var import_jsx_runtime20 = require("react/jsx-runtime");
5256
5291
  var InputStyleComponent = (props) => {
5257
5292
  const {
5258
5293
  value,
@@ -5266,8 +5301,8 @@ var InputStyleComponent = (props) => {
5266
5301
  disabledItalic,
5267
5302
  disabledUnderline
5268
5303
  } = props;
5269
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "d-flex align-items-center", children: [
5270
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5304
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "d-flex align-items-center", children: [
5305
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5271
5306
  SelectTable,
5272
5307
  {
5273
5308
  options: OptionFont,
@@ -5283,12 +5318,12 @@ var InputStyleComponent = (props) => {
5283
5318
  field: "label",
5284
5319
  headerText: "",
5285
5320
  template: (row) => {
5286
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { fontFamily: row.label }, children: row.label });
5321
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontFamily: row.label }, children: row.label });
5287
5322
  }
5288
5323
  }
5289
5324
  ],
5290
5325
  formatOptionLabel: (props2) => {
5291
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { style: {
5326
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { style: {
5292
5327
  paddingLeft: 3,
5293
5328
  borderRadius: 2,
5294
5329
  fontFamily: value.fontFamily,
@@ -5301,7 +5336,7 @@ var InputStyleComponent = (props) => {
5301
5336
  }
5302
5337
  }
5303
5338
  ),
5304
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames16.default)("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5339
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: (0, import_classnames16.default)("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5305
5340
  SelectTable,
5306
5341
  {
5307
5342
  options: Array.from({ length: 100 }, (_, i) => ({ value: i + 1, label: i + 1 })),
@@ -5313,7 +5348,7 @@ var InputStyleComponent = (props) => {
5313
5348
  }
5314
5349
  }
5315
5350
  ) }),
5316
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5351
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5317
5352
  "div",
5318
5353
  {
5319
5354
  className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.bold }, { "d-none": disabledBold }),
@@ -5322,10 +5357,10 @@ var InputStyleComponent = (props) => {
5322
5357
  onChange({ ...value, bold: !value.bold });
5323
5358
  }
5324
5359
  },
5325
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Bold, { fontSize: 18 })
5360
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_becoxy_icons9.Bold, { fontSize: 18 })
5326
5361
  }
5327
5362
  ),
5328
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5363
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5329
5364
  "div",
5330
5365
  {
5331
5366
  className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.italic }, { "d-none": disabledItalic }),
@@ -5334,10 +5369,10 @@ var InputStyleComponent = (props) => {
5334
5369
  onChange({ ...value, italic: !value.italic });
5335
5370
  }
5336
5371
  },
5337
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Italic, { fontSize: 18 })
5372
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_becoxy_icons9.Italic, { fontSize: 18 })
5338
5373
  }
5339
5374
  ),
5340
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5375
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5341
5376
  "div",
5342
5377
  {
5343
5378
  className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.underline }, { "d-none": disabledUnderline }),
@@ -5346,12 +5381,12 @@ var InputStyleComponent = (props) => {
5346
5381
  onChange({ ...value, underline: !value.underline });
5347
5382
  }
5348
5383
  },
5349
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Underline, { fontSize: 18 })
5384
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_becoxy_icons9.Underline, { fontSize: 18 })
5350
5385
  }
5351
5386
  ),
5352
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledColor }), children: [
5353
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
5354
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5387
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledColor }), children: [
5388
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_becoxy_icons9.Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
5389
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5355
5390
  "input",
5356
5391
  {
5357
5392
  type: "color",
@@ -5365,9 +5400,9 @@ var InputStyleComponent = (props) => {
5365
5400
  }
5366
5401
  )
5367
5402
  ] }),
5368
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
5369
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
5370
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5403
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
5404
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_becoxy_icons9.Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
5405
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5371
5406
  import_reactstrap13.Input,
5372
5407
  {
5373
5408
  id: "backgroundColor",