react-table-edit 1.5.11 → 1.5.13

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
@@ -19692,11 +19692,11 @@ const useOnClickOutside = (ref, handler) => {
19692
19692
  // ** Call passed function on click outside
19693
19693
  handler(event);
19694
19694
  };
19695
- document.addEventListener("mousedown", listener);
19696
- document.addEventListener("touchstart", listener);
19695
+ document.addEventListener('mousedown', listener);
19696
+ document.addEventListener('touchstart', listener);
19697
19697
  return () => {
19698
- document.removeEventListener("mousedown", listener);
19699
- document.removeEventListener("touchstart", listener);
19698
+ document.removeEventListener('mousedown', listener);
19699
+ document.removeEventListener('touchstart', listener);
19700
19700
  };
19701
19701
  },
19702
19702
  // ** Add ref and handler to effect dependencies
@@ -19711,7 +19711,7 @@ const checkThousandSeparator = (thousandSeparator, decimalSeparator) => {
19711
19711
  if (thousandSeparator) {
19712
19712
  if (decimalSeparator) {
19713
19713
  if (thousandSeparator === decimalSeparator) {
19714
- return ",";
19714
+ return ',';
19715
19715
  }
19716
19716
  else {
19717
19717
  return thousandSeparator;
@@ -19722,14 +19722,14 @@ const checkThousandSeparator = (thousandSeparator, decimalSeparator) => {
19722
19722
  }
19723
19723
  }
19724
19724
  else {
19725
- return ",";
19725
+ return ',';
19726
19726
  }
19727
19727
  };
19728
19728
  const checkDecimalSeparator = (thousandSeparator, decimalSeparator) => {
19729
19729
  if (decimalSeparator) {
19730
19730
  if (thousandSeparator) {
19731
19731
  if (thousandSeparator === decimalSeparator) {
19732
- return ".";
19732
+ return '.';
19733
19733
  }
19734
19734
  else {
19735
19735
  return decimalSeparator;
@@ -19740,11 +19740,11 @@ const checkDecimalSeparator = (thousandSeparator, decimalSeparator) => {
19740
19740
  }
19741
19741
  }
19742
19742
  else {
19743
- return ".";
19743
+ return '.';
19744
19744
  }
19745
19745
  };
19746
19746
  const isNullOrUndefined$1 = (d) => {
19747
- if (d === null || d === undefined || d === "") {
19747
+ if (d === null || d === undefined || d === '') {
19748
19748
  return true;
19749
19749
  }
19750
19750
  return false;
@@ -19752,8 +19752,8 @@ const isNullOrUndefined$1 = (d) => {
19752
19752
  const generateUUID = () => {
19753
19753
  // Public Domain/MIT
19754
19754
  let d = new Date().getTime(); //Timestamp
19755
- let d2 = (typeof performance !== "undefined" && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported
19756
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
19755
+ let d2 = (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported
19756
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
19757
19757
  let r = Math.random() * 16; //random number between 0 and 16
19758
19758
  if (d > 0) {
19759
19759
  //Use timestamp until depleted
@@ -19765,7 +19765,7 @@ const generateUUID = () => {
19765
19765
  r = (d2 + r) % 16 | 0;
19766
19766
  d2 = Math.floor(d2 / 16);
19767
19767
  }
19768
- return (c === "x" ? r : 0x3).toString(16);
19768
+ return (c === 'x' ? r : 0x3).toString(16);
19769
19769
  });
19770
19770
  };
19771
19771
  /**
@@ -19782,17 +19782,17 @@ const formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10
19782
19782
  str = roundNumber(Number(str), fraction);
19783
19783
  }
19784
19784
  // eslint-disable-next-line
19785
- if (str || str == "0") {
19785
+ if (str || str == '0') {
19786
19786
  str = str.toString();
19787
- const value = decimalSeparator !== "." ? str.toString().replaceAll(".", decimalSeparator ?? "") : str;
19788
- const arr = value.toString().split(decimalSeparator ?? "", 2);
19789
- let flag = value.toString().includes(decimalSeparator ?? "");
19787
+ const value = decimalSeparator !== '.' ? str.toString().replaceAll('.', decimalSeparator ?? '') : str;
19788
+ const arr = value.toString().split(decimalSeparator ?? '', 2);
19789
+ let flag = value.toString().includes(decimalSeparator ?? '');
19790
19790
  if (arr[0].length < 3) {
19791
- return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
19791
+ return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ''}` : arr[0];
19792
19792
  }
19793
19793
  else {
19794
19794
  let flagNegative = false;
19795
- if (arr[0][0] === "-") {
19795
+ if (arr[0][0] === '-') {
19796
19796
  flagNegative = true;
19797
19797
  arr[0] = arr[0].substring(1, arr[0].length);
19798
19798
  }
@@ -19803,20 +19803,20 @@ const formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10
19803
19803
  count++;
19804
19804
  }
19805
19805
  }
19806
- if (arr[0].lastIndexOf(thousandSeparator ?? "") === arr[0].length - 1) {
19806
+ if (arr[0].lastIndexOf(thousandSeparator ?? '') === arr[0].length - 1) {
19807
19807
  arr[0] = arr[0].slice(0, arr[0].length - 1);
19808
19808
  }
19809
19809
  if (isDone) {
19810
- flag = (arr[1]?.substring(0, fraction) ?? "") !== "";
19810
+ flag = (arr[1]?.substring(0, fraction) ?? '') !== '';
19811
19811
  }
19812
19812
  if (flagNegative && haveNegative) {
19813
- arr[0] = "-".concat(arr[0]);
19813
+ arr[0] = '-'.concat(arr[0]);
19814
19814
  }
19815
- return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ""}` : arr[0];
19815
+ return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ''}` : arr[0];
19816
19816
  }
19817
19817
  }
19818
19818
  else {
19819
- return "";
19819
+ return '';
19820
19820
  }
19821
19821
  };
19822
19822
  const roundNumber = (num, fraction) => {
@@ -19824,24 +19824,24 @@ const roundNumber = (num, fraction) => {
19824
19824
  const result = Math.round(num * base) / base;
19825
19825
  return result;
19826
19826
  };
19827
- const formatDateTime = (data, format = "dd/MM/yyyy") => {
19827
+ const formatDateTime = (data, format = 'dd/MM/yyyy') => {
19828
19828
  if (!data) {
19829
- return "";
19829
+ return '';
19830
19830
  }
19831
19831
  const date = new Date(data);
19832
19832
  const map = {
19833
- DD: String(date.getDate()).padStart(2, "0"),
19834
- dd: String(date.getDate()).padStart(2, "0"),
19835
- MM: String(date.getMonth() + 1).padStart(2, "0"),
19833
+ DD: String(date.getDate()).padStart(2, '0'),
19834
+ dd: String(date.getDate()).padStart(2, '0'),
19835
+ MM: String(date.getMonth() + 1).padStart(2, '0'),
19836
19836
  yyyy: date.getFullYear(),
19837
- HH: String(date.getHours()).padStart(2, "0"),
19838
- mm: String(date.getMinutes()).padStart(2, "0")
19837
+ HH: String(date.getHours()).padStart(2, '0'),
19838
+ mm: String(date.getMinutes()).padStart(2, '0')
19839
19839
  };
19840
19840
  return format.replace(/dd|DD|MM|yyyy|HH|mm/g, (match) => map[match]);
19841
19841
  };
19842
19842
  // Hàm tìm vị trí theo chuỗi index
19843
19843
  const FindNodeByPath = (tree, path) => {
19844
- const levels = path.split("-").map((num) => parseInt(num, 10));
19844
+ const levels = path.split('-').map((num) => parseInt(num, 10));
19845
19845
  let current = tree;
19846
19846
  let node = null;
19847
19847
  for (let index = 0; index < levels.length - 1; index++) {
@@ -19890,15 +19890,15 @@ const calculateTableStructure = (columns, settingColumns) => {
19890
19890
  calcTotalRightWidth(col.columns);
19891
19891
  }
19892
19892
  else {
19893
- if (col.fixedType === "right" && col.visible !== false) {
19893
+ if (col.fixedType === 'right' && col.visible !== false) {
19894
19894
  rightTotal += col.width ?? 40;
19895
19895
  }
19896
19896
  }
19897
19897
  });
19898
19898
  };
19899
19899
  const applySetting = (cols) => {
19900
- return cols.map(cell => {
19901
- const setting = settingColumns?.find(s => s.field === cell.field);
19900
+ return cols.map((cell) => {
19901
+ const setting = settingColumns?.find((s) => s.field === cell.field);
19902
19902
  if (setting) {
19903
19903
  cell.sortOrder = setting.sortOrder;
19904
19904
  cell.visible = setting.visible ?? true;
@@ -19911,10 +19911,19 @@ const calculateTableStructure = (columns, settingColumns) => {
19911
19911
  cell.headerDisplay = setting.headerText || cell.headerText;
19912
19912
  }
19913
19913
  else {
19914
- cell.visible = false;
19915
- }
19916
- if (cell.columns?.length) {
19917
- cell.columns = applySetting(cell.columns); // đệ quy
19914
+ if (cell.columns?.length) {
19915
+ cell.columns = applySetting(cell.columns);
19916
+ cell.sortOrder = cell.columns[0].sortOrder;
19917
+ if (cell.columns.some((x) => x.visible !== false)) {
19918
+ cell.visible = true;
19919
+ }
19920
+ else {
19921
+ cell.visible = false;
19922
+ }
19923
+ }
19924
+ else {
19925
+ cell.visible = false;
19926
+ }
19918
19927
  }
19919
19928
  return cell;
19920
19929
  });
@@ -19922,7 +19931,7 @@ const calculateTableStructure = (columns, settingColumns) => {
19922
19931
  const traverse = (cols, level = 0) => {
19923
19932
  levels[level] = levels[level] || [];
19924
19933
  let columns = [...cols];
19925
- if (settingColumns?.some(c => c.sortOrder !== undefined && c.sortOrder !== null)) {
19934
+ if (settingColumns?.some((c) => c.sortOrder !== undefined && c.sortOrder !== null)) {
19926
19935
  columns = columns.sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0));
19927
19936
  }
19928
19937
  return columns.reduce((colspanSum, col, indexCol) => {
@@ -19936,7 +19945,7 @@ const calculateTableStructure = (columns, settingColumns) => {
19936
19945
  };
19937
19946
  levels[level].push(cell);
19938
19947
  const headerKey = `${level}-${indexCol}`;
19939
- if (cell.fixedType === "left" && cell.visible !== false) {
19948
+ if (cell.fixedType === 'left' && cell.visible !== false) {
19940
19949
  objHeaderWidthFixLeft[headerKey] = leftTotal;
19941
19950
  }
19942
19951
  if (!hasChildren) {
@@ -19944,16 +19953,16 @@ const calculateTableStructure = (columns, settingColumns) => {
19944
19953
  const width = cell.width ?? 40;
19945
19954
  cell.index = index;
19946
19955
  flat.push(cell);
19947
- if (cell.fixedType === "left" && cell.visible !== false) {
19956
+ if (cell.fixedType === 'left' && cell.visible !== false) {
19948
19957
  objWidthFixLeft[index] = leftTotal;
19949
19958
  leftTotal += width;
19950
19959
  }
19951
- if (cell.fixedType === "right" && cell.visible !== false) {
19960
+ if (cell.fixedType === 'right' && cell.visible !== false) {
19952
19961
  rightTotal -= width;
19953
19962
  objWidthFixRight[index] = rightTotal;
19954
19963
  }
19955
19964
  }
19956
- if (cell.fixedType === "right" && cell.visible !== false) {
19965
+ if (cell.fixedType === 'right' && cell.visible !== false) {
19957
19966
  objHeaderWidthFixRight[headerKey] = rightTotal;
19958
19967
  }
19959
19968
  return colspanSum + colspan;
@@ -19966,7 +19975,7 @@ const calculateTableStructure = (columns, settingColumns) => {
19966
19975
  traverse(columns);
19967
19976
  // Danh sách các cột được hiển thị
19968
19977
  const flatVisble = flat.filter((e) => e.visible !== false);
19969
- const flatVisbleContent = flatVisble.filter((x) => x.field !== "command" && x.field !== "#" && x.field !== "checkbox");
19978
+ const flatVisbleContent = flatVisble.filter((x) => x.field !== 'command' && x.field !== '#' && x.field !== 'checkbox');
19970
19979
  // Tính toán vị trí đầu tiên và cuối cùng của các cột cố định
19971
19980
  const lastObjWidthFixLeft = Math.max(...Object.keys(objWidthFixLeft).map(Number), 0);
19972
19981
  const fisrtObjWidthFixRight = Math.min(...Object.keys(objWidthFixRight).map(Number), flat.length);
@@ -19989,8 +19998,8 @@ const calculateTableStructure = (columns, settingColumns) => {
19989
19998
  };
19990
19999
  };
19991
20000
  /**
19992
- * Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
19993
- */
20001
+ * Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
20002
+ */
19994
20003
  const CheckRowMatch = (row, filters, keyword, searchKeys) => {
19995
20004
  const isFilterMatch = filters.every((filter) => {
19996
20005
  const { key, value, ope } = filter;
@@ -20002,23 +20011,23 @@ const CheckRowMatch = (row, filters, keyword, searchKeys) => {
20002
20011
  const filterStr = String(value).toLowerCase();
20003
20012
  /*eslint-disable*/
20004
20013
  switch (ope) {
20005
- case "startswith":
20014
+ case 'startswith':
20006
20015
  return valStr.startsWith(filterStr);
20007
- case "endswith":
20016
+ case 'endswith':
20008
20017
  return valStr.endsWith(filterStr);
20009
- case "contains":
20018
+ case 'contains':
20010
20019
  return valStr.includes(filterStr);
20011
- case "equal":
20020
+ case 'equal':
20012
20021
  return rowValue == value;
20013
- case "notequal":
20022
+ case 'notequal':
20014
20023
  return rowValue != value;
20015
- case "greaterthan":
20024
+ case 'greaterthan':
20016
20025
  return rowValue > value;
20017
- case "greaterthanorequal":
20026
+ case 'greaterthanorequal':
20018
20027
  return rowValue >= value;
20019
- case "lessthan":
20028
+ case 'lessthan':
20020
20029
  return rowValue < value;
20021
- case "lessthanorequal":
20030
+ case 'lessthanorequal':
20022
20031
  return rowValue <= value;
20023
20032
  default:
20024
20033
  return false;
@@ -20477,25 +20486,16 @@ const ReactInput = (props) => {
20477
20486
  }), value: value, onChange: (val) => setValue(val.target.value) }), value ? jsxRuntime.jsx(SvgX, { className: 'input__clear-icon', onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ''] }));
20478
20487
  };
20479
20488
 
20480
- const RenderToolbarTop = ({ toolbarTopOption, setOpenPopupSetupColumn }) => {
20489
+ const RenderToolbarTop = ({ toolbarTopOption }) => {
20481
20490
  return (jsxRuntime.jsx("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: jsxRuntime.jsxs("div", { className: "r-toolbar-items", children: [jsxRuntime.jsx("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
20482
- return item.align === "left" ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index, setOpenPopupSetupColumn: setOpenPopupSetupColumn }) : "";
20491
+ return item.align === 'left' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
20483
20492
  }) }), jsxRuntime.jsx("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
20484
- return item.align === "center" ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index, setOpenPopupSetupColumn: setOpenPopupSetupColumn }) : "";
20493
+ return item.align === 'center' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
20485
20494
  }) }), jsxRuntime.jsx("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
20486
- return item.align === "right" ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index, setOpenPopupSetupColumn: setOpenPopupSetupColumn }) : "";
20495
+ return item.align === 'right' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
20487
20496
  }) })] }) }));
20488
20497
  };
20489
- const ToolBarElement = ({ item, index, setOpenPopupSetupColumn }) => {
20490
- if (item.id === "GROUP") {
20491
- return (jsxRuntime.jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false", children: jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "stroke-width": "1.5", id: "toolbar-columns-group", "font-size": "20", color: "#7F7F7F", className: "cursor-pointer", children: [jsxRuntime.jsxs("g", { "clip-path": "url(#group_svg__a)", fill: "#7F7F7F", children: [jsxRuntime.jsx("path", { d: "M22.167 0h-7.334c-.486 0-.952.181-1.295.503A1.662 1.662 0 0 0 13 1.714v20.572c0 .454.194.89.538 1.211.343.322.81.503 1.295.503h7.334c.486 0 .952-.181 1.295-.503.344-.321.537-.757.538-1.211V1.714c0-.454-.194-.89-.538-1.211A1.902 1.902 0 0 0 22.167 0Zm0 1.714v6h-7.334v-6h7.334Zm0 7.715v5.142h-7.334V9.43h7.334Zm-7.334 12.857v-6h7.334v6h-7.334ZM7.502 11.25h-1.5v-1.5h-1.5v1.5h-1.5v1.5h1.5v1.5h1.5v-1.5h1.5v-1.5Z" }), jsxRuntime.jsx("path", { d: "M10.502 4.5V3h-4.5a1.502 1.502 0 0 0-1.5 1.5v2.31a5.242 5.242 0 0 0 0 10.38v2.31a1.502 1.502 0 0 0 1.5 1.5h4.5v-1.5h-4.5v-2.31a5.243 5.243 0 0 0 0-10.38V4.5h4.5Zm-1.5 7.5a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "group_svg__a", children: jsxRuntime.jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })] }) }, `toolbar-top-${index}`));
20492
- }
20493
- if (item.id === "EXPAND") {
20494
- return jsxRuntime.jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false" }, `toolbar-top-${index}`);
20495
- }
20496
- if (item.id === "COLUMN_CHOOSE") {
20497
- return (jsxRuntime.jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false", children: jsxRuntime.jsx(SvgSettings, { className: "me-1", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) }) }, `toolbar-top-${index}`));
20498
- }
20498
+ const ToolBarElement = ({ item, index }) => {
20499
20499
  return (jsxRuntime.jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template?.() }, `toolbar-top-${index}`));
20500
20500
  };
20501
20501
 
@@ -30585,6 +30585,36 @@ function setYear(date, year, options) {
30585
30585
  return date_;
30586
30586
  }
30587
30587
 
30588
+ /**
30589
+ * The subMonths function options.
30590
+ */
30591
+
30592
+ /**
30593
+ * @name subMonths
30594
+ * @category Month Helpers
30595
+ * @summary Subtract the specified number of months from the given date.
30596
+ *
30597
+ * @description
30598
+ * Subtract the specified number of months from the given date.
30599
+ *
30600
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
30601
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
30602
+ *
30603
+ * @param date - The date to be changed
30604
+ * @param amount - The amount of months to be subtracted.
30605
+ * @param options - An object with options
30606
+ *
30607
+ * @returns The new date with the months subtracted
30608
+ *
30609
+ * @example
30610
+ * // Subtract 5 months from 1 February 2015:
30611
+ * const result = subMonths(new Date(2015, 1, 1), 5)
30612
+ * //=> Mon Sep 01 2014 00:00:00
30613
+ */
30614
+ function subMonths(date, amount, options) {
30615
+ return addMonths(date, -amount, options);
30616
+ }
30617
+
30588
30618
  /**
30589
30619
  * Time zone name format.
30590
30620
  */
@@ -36315,7 +36345,7 @@ const CommandElement = (props) => {
36315
36345
  }) }) }));
36316
36346
  };
36317
36347
 
36318
- var css_248z$2 = "@charset \"UTF-8\";\n.react-select-table .select-table-control {\n opacity: 1;\n border: 1px solid hsl(0, 0%, 80%);\n border-radius: 0.357rem;\n width: 100%;\n height: 28px;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n padding: 2px 8px;\n}\n.react-select-table .select-table-control .select-table-indicator svg {\n fill: #c4c4c4 !important;\n}\n.react-select-table .select-table-control .icon-clear {\n font-size: 25px;\n margin-top: 2px;\n font-weight: 500;\n color: #c4c4c4;\n}\n.react-select-table .select-table-control .icon-clear:hover {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n}\n.react-select-table .select-table-control.r-select-is-open .select-table-indicator svg {\n fill: rgba(0, 0, 0, 0.8705882353) !important;\n}\n.react-select-table .select-table-control.r-select-is-invalid {\n border: 1px solid red !important;\n}\n.react-select-table .select-table-control.r-select-is-focus {\n border: 1px solid #1989fa !important;\n}\n.react-select-table .select-table-control.r-select-is-disabled {\n background-color: #efefef !important;\n}\n.react-select-table .select-table-control .select-table-container {\n position: relative;\n flex: 1;\n}\n.react-select-table .select-table-control .select-table-container .input-container {\n background-color: transparent;\n white-space: nowrap;\n top: 0px;\n left: 0px;\n display: inline;\n}\n.react-select-table .select-table-control .select-table-container .input-container .select-input {\n background-color: transparent;\n text-align: center;\n width: 100%;\n box-sizing: border-box;\n margin-left: -3px;\n border: none;\n /* Loại bỏ border */\n outline: none;\n /* Loại bỏ outline khi input được chọn */\n}\n.react-select-table .select-table-control .select-table-container .input-container .select-input:focus {\n border-width: 0px !important;\n}\n.react-select-table .select-table-control .select-table-container .select-placeholder {\n position: absolute;\n color: #283046;\n margin-top: 1px;\n background-color: transparent;\n}\n.react-select-table .select-table-control .select-table-container .select-value {\n position: absolute;\n background-color: transparent;\n bottom: 0px;\n left: 0px;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.react-select-table .formula-dropdown {\n min-width: min-content !important;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;\n}\n.react-select-table input::placeholder {\n color: #000000 !important;\n opacity: 1;\n /* Firefox */\n}\n\n.r-select-grid.r-select-tree-grid .r-select-gridtable .r-select-row:hover {\n background-color: rgba(235, 70, 25, 0.1) !important;\n color: #eb4619;\n}\n\n.r-select-grid {\n font-size: 12px;\n font-family: Montserrat, Helvetica, Arial, serif;\n font-weight: 500 !important;\n border-radius: 4px !important;\n overflow: hidden;\n}\n.r-select-grid table {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0px;\n}\n.r-select-grid .r-select-gridtable {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: auto;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353) !important;\n font-weight: 400 !important;\n font-size: 13px !important;\n /* Toàn bộ thanh cuộn */\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar {\n width: 9px;\n height: 9px;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-track {\n background: #FCFCFC;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n border-radius: 6px;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-thumb:hover {\n background: #636363;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n position: sticky;\n padding: 0px;\n height: 35px;\n z-index: 1;\n border-width: 0px;\n line-height: 16px;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell .r-select-headercell-div {\n border-bottom: 1px solid #e0e0e0;\n background-color: #fafafa;\n display: flex;\n align-items: center;\n text-align: center;\n padding: 5px 10px;\n height: 100%;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell .r-select-headercell-text {\n width: 100%;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row {\n background-color: #FFFFFF;\n cursor: pointer;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .cell-fixed {\n position: sticky;\n z-index: 1;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row.fisrt-row .r-select-rowcell {\n border-top-width: 0px !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row.last-row .r-select-rowcell {\n border-bottom: 1px solid #e0e0e0;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell {\n border-top: 1px solid #e0e0e0;\n height: 30px !important;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 7px 9px;\n vertical-align: middle !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-select-move {\n background-color: rgba(235, 70, 25, 0.1) !important;\n color: #eb4619 !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-select-active {\n background-color: #eb4619 !important;\n color: #FFFFFF !important;\n}\n.r-tooltip .r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-hidden {\n display: none;\n}\n.r-tooltip .r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-hidden ::after {\n display: none;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell .r-icon-expand {\n transition: transform 0.3s ease !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell .r-icon-expand.is-open {\n transform: rotate(90deg) !important;\n -moz-transform: rotate(90deg);\n -webkit-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n}\n.r-select-grid .r-select-gridtable.no-header .r-select-rowcell {\n border: none !important;\n}\n.r-select-grid .r-no-data {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 7px 9px;\n color: #8f8f8f;\n}\n.r-select-grid .r-select-footer {\n height: 30px;\n background-color: #fafafa;\n}\n.r-select-grid .r-select-footer button {\n font-weight: 400 !important;\n font-size: 13px;\n}\n.r-select-grid .r-select-footer .r-btn {\n border-width: 0px !important;\n}\n\n.r-pagesize .react-select-table .select-table-control {\n border-radius: 0px;\n border: 0px;\n border-bottom: 1px solid #e0e0e0 !important;\n}\n.r-pagesize .react-select-table .select-table-control.r-select-is-focus {\n border: 0px !important;\n border-bottom: 1px solid #1989fa !important;\n}\n\n.r-sidebar {\n width: 400px;\n right: -400px;\n padding: 0;\n background-color: #FFFFFF;\n z-index: 1051;\n position: fixed;\n top: 0;\n bottom: 0;\n height: 100vh;\n height: calc(var(--vh, 1vh) * 100);\n transition: right 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);\n backface-visibility: hidden;\n border-left: 1px solid rgba(0, 0, 0, 0.05);\n}\n.r-sidebar.open {\n box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.11), 0 5px 15px 0 rgba(0, 0, 0, 0.08);\n right: 0;\n}\n.r-sidebar .modal-header {\n background-color: #FFFFFF;\n}\n.r-sidebar .modal-header .btn-close {\n padding: 0.8rem;\n box-shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.1);\n border-radius: 0.357rem;\n background-color: #FFFFFF;\n opacity: 1;\n transition: all 0.23s ease 0.1s;\n position: relative;\n transform: translate(18px, -10px);\n}\n.r-sidebar .modal-header .btn-close:hover, .r-sidebar .modal-header .btn-close:focus, .r-sidebar .modal-header .btn-close:active {\n opacity: 1;\n outline: none;\n transform: translate(15px, -2px);\n box-shadow: none;\n}\n\n.r-sidebar .react-select {\n max-width: 100%;\n}\n\n.r-sidebar {\n width: 400px;\n right: -100vw;\n height: 100vh;\n}\n.r-sidebar .r-handle {\n position: fixed;\n background-color: #FFFFFF;\n top: 50%;\n transform: translate(-50%, -50%);\n filter: drop-shadow(0.9px 0.9px 1.5px);\n height: 50px;\n display: flex;\n align-items: center;\n border-radius: 0px 5px 5px 0px;\n cursor: pointer;\n margin-left: 7px;\n z-index: 9;\n}\n.r-sidebar.customizer-md {\n width: 600px;\n}\n.r-sidebar.customizer-lg {\n width: 800px;\n}\n.r-sidebar.customizer-500 {\n width: 500px;\n}\n@media (max-width: 500px) {\n .r-sidebar.customizer-500 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-600 {\n width: 600px;\n}\n@media (max-width: 600px) {\n .r-sidebar.customizer-600 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-700 {\n width: 700px;\n}\n@media (max-width: 700px) {\n .r-sidebar.customizer-700 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-800 {\n width: 800px;\n}\n@media (max-width: 800px) {\n .r-sidebar.customizer-800 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-900 {\n width: 900px;\n}\n@media (max-width: 900px) {\n .r-sidebar.customizer-900 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-1000 {\n width: 1000px;\n}\n@media (max-width: 1000px) {\n .r-sidebar.customizer-1000 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-1500 {\n width: 1500px;\n}\n@media (max-width: 1500px) {\n .r-sidebar.customizer-1500 {\n width: 100vw;\n }\n}\n.r-sidebar.fullscreen {\n width: 100%;\n}\n.r-sidebar.open {\n right: 0;\n}\n\n.r-datepicker {\n position: relative;\n}\n.r-datepicker .form-control {\n height: 28px;\n}\n\n.r-datepicker-popup {\n background: white;\n border: 1px solid #e0e0e0;\n padding: 15px 5px !important;\n}\n.r-datepicker-popup .rdp-nav {\n display: none;\n}\n.r-datepicker-popup .rdp-month_caption {\n display: none;\n}\n.r-datepicker-popup .select-month-year {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 5px 5px 8px 5px;\n}\n.r-datepicker-popup .select-month-year .select-month {\n text-align: right;\n width: 90px !important;\n}\n.r-datepicker-popup .select-month-year .select-year {\n text-align: left;\n width: 65px !important;\n}\n.r-datepicker-popup .select-month-year svg:hover {\n color: #eb4619;\n}\n.r-datepicker-popup .select-month-year .select-table-control .select-table-container {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n font-size: 14px !important;\n font-weight: 600;\n}\n.r-datepicker-popup .select-month-year .select-table-control .select-table-container .select-input {\n cursor: pointer !important;\n}\n.r-datepicker-popup .select-month-year .react-select-table .select-table-control {\n border: none;\n}\n.r-datepicker-popup .select-month-year .react-select-table .r-select-is-focus {\n border: none !important;\n}\n.r-datepicker-popup .select-month-year .select-table-indicator {\n display: none;\n}\n.r-datepicker-popup .rdp-weekday {\n color: #323232 !important;\n opacity: 1 !important;\n font-weight: 500;\n font-size: 14px !important;\n}\n.r-datepicker-popup .rdp-day {\n color: #323232 !important;\n font-size: 13.5px !important;\n height: 32px !important;\n width: 32px !important;\n}\n.r-datepicker-popup .rdp-day .rdp-day_button {\n height: 32px !important;\n width: 32px !important;\n}\n.r-datepicker-popup .rdp-day.rdp-today {\n font-weight: bold;\n color: #eb4619;\n}\n.r-datepicker-popup .rdp-day.rdp-today .rdp-day_button {\n border: 1px solid #eb4619;\n border-radius: 8px;\n}\n.r-datepicker-popup .rdp-day.rdp-selected .rdp-day_button {\n border: 1px solid #eb4619;\n background-color: #eb4619;\n color: #FFFFFF;\n border-radius: 8px;\n}\n.r-datepicker-popup .rdp-day.rdp-in-range .rdp-day_button {\n background-color: #fce6df;\n color: #eb4619;\n border-radius: 2px;\n height: 22px !important;\n border-width: 0px !important;\n}\n.r-datepicker-popup .rdp-day .rdp-day_button:hover {\n background-color: #fce6df;\n color: #eb4619;\n border-radius: 8px;\n}\n.r-datepicker-popup .btn-today {\n margin-top: 5px;\n text-align: center;\n font-size: 13px;\n color: #eb4619;\n cursor: pointer;\n user-select: none;\n font-weight: 500;\n}\n.r-datepicker-popup .btn-today:hover {\n text-decoration: underline;\n}\n\n.tab-custom {\n font-family: Roboto, \"Segoe UI\", GeezaPro, \"DejaVu Serif\", \"sans-serif\", -apple-system, BlinkMacSystemFont;\n display: flex;\n}\n.tab-custom.tab-parent {\n border-bottom: solid 1px #c9c9c9;\n}\n.tab-custom .btn-scroll {\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.tab-custom .tab-component::-webkit-scrollbar {\n display: none;\n /* Ẩn thanh cuộn nếu không cần */\n}\n.tab-custom .tab-component {\n white-space: nowrap;\n overflow-x: hidden;\n scroll-behavior: smooth;\n}\n.tab-custom .tab-component > * {\n display: inline-block;\n}\n.tab-custom .tab-component .tab-custom-item {\n display: inline-block;\n padding: 3px 10px;\n line-height: 23px;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n text-transform: uppercase;\n height: 30px;\n color: rgba(0, 0, 0, 0.5);\n}\n.tab-custom .tab-component .tab-custom-item.active {\n border-bottom: solid 2px #eb4619 !important;\n color: #eb4619;\n}\n.tab-custom.tab-child .tab-custom-item {\n font-size: 12px !important;\n line-height: 23px !important;\n border-radius: 5px 5px 0px 0px;\n margin: 8px 3px 0px 3px;\n box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;\n}\n\n.bs-stepper {\n background-color: #FFFFFF;\n box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.1);\n border-radius: 0.5rem;\n}\n.bs-stepper .bs-stepper-header {\n padding: 1.5rem 1.5rem;\n flex-wrap: wrap;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n margin: 0;\n}\n.bs-stepper .bs-stepper-header .line {\n flex: 0;\n min-width: auto;\n min-height: auto;\n background-color: transparent;\n margin: 0;\n padding: 0 1.75rem;\n color: #283046;\n font-size: 1.5rem;\n}\n.bs-stepper .bs-stepper-header .step {\n margin-bottom: 0.25rem;\n margin-top: 0.25rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger {\n flex-wrap: nowrap;\n padding: 0;\n font-weight: normal;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-box {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 38px;\n height: 38px;\n padding: 0.5em 0;\n font-weight: 500;\n color: #babfc7;\n background-color: rgba(186, 191, 199, 0.12);\n border-radius: 0.35rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label {\n text-align: left;\n margin: 0;\n margin-top: 0.5rem;\n margin-left: 1rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label .bs-stepper-title {\n display: inherit;\n color: #283046;\n font-weight: 600;\n line-height: 1rem;\n margin-bottom: 0rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label .bs-stepper-subtitle {\n font-weight: 400;\n font-size: 0.85rem;\n color: #b9b9c3;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger:hover {\n background-color: transparent;\n}\n.bs-stepper .bs-stepper-header .step.active .step-trigger .bs-stepper-box {\n background-color: #eb4619;\n color: #FFFFFF;\n box-shadow: 0 3px 6px 0 rgba(235, 70, 25, 0.4);\n}\n.bs-stepper .bs-stepper-header .step.active .step-trigger .bs-stepper-label .bs-stepper-title {\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-header .step.crossed .step-trigger .bs-stepper-box {\n background-color: rgba(235, 70, 25, 0.12);\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-header .step.crossed .step-trigger .bs-stepper-label .bs-stepper-title {\n color: #b9b9c3;\n}\n.bs-stepper .bs-stepper-header .step.crossed + .line {\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-content {\n padding: 1.5rem 1.5rem;\n}\n.bs-stepper .bs-stepper-content .content {\n margin-left: 0;\n}\n.bs-stepper .bs-stepper-content .content .content-header {\n margin-bottom: 1rem;\n}\n.bs-stepper.vertical .bs-stepper-header {\n border-right: 1px solid #e0e0e0;\n border-bottom: none;\n}\n.bs-stepper.vertical .bs-stepper-header .step .step-trigger {\n padding: 1rem 0;\n}\n.bs-stepper.vertical .bs-stepper-header .line {\n display: none;\n}\n.bs-stepper.vertical .bs-stepper-content {\n width: 100%;\n padding-top: 2.5rem;\n}\n.bs-stepper.vertical .bs-stepper-content .content:not(.active) {\n display: none;\n}\n.bs-stepper.vertical.wizard-icons .step {\n text-align: center;\n}\n.bs-stepper.wizard-modern {\n background-color: transparent;\n box-shadow: none;\n}\n.bs-stepper.wizard-modern .bs-stepper-header {\n border: none;\n}\n.bs-stepper.wizard-modern .bs-stepper-content {\n background-color: #FFFFFF;\n border-radius: 0.5rem;\n box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.horizontal-wizard,\n.vertical-wizard,\n.modern-horizontal-wizard,\n.modern-vertical-wizard {\n margin-bottom: 2.2rem;\n}\n\nhtml[data-textdirection=rtl] .btn-prev,\nhtml[data-textdirection=rtl] .btn-next {\n display: flex;\n}\nhtml[data-textdirection=rtl] .btn-prev i,\nhtml[data-textdirection=rtl] .btn-prev svg,\nhtml[data-textdirection=rtl] .btn-next i,\nhtml[data-textdirection=rtl] .btn-next svg {\n transform: rotate(-180deg);\n}\n\n@media (max-width: 992px) {\n .bs-stepper .bs-stepper-header {\n flex-direction: column;\n align-items: flex-start;\n }\n .bs-stepper .bs-stepper-header .step .step-trigger {\n padding: 0.5rem 0 !important;\n flex-direction: row;\n }\n .bs-stepper .bs-stepper-header .line {\n display: none;\n }\n .bs-stepper.vertical {\n flex-direction: column;\n }\n .bs-stepper.vertical .bs-stepper-header {\n align-items: flex-start;\n }\n .bs-stepper.vertical .bs-stepper-content {\n padding-top: 1.5rem;\n }\n}\n.r-table-edit .r-grid {\n font-size: 12px;\n}\n.r-table-edit .r-grid .r-search {\n display: flex;\n position: relative;\n align-items: center;\n}\n.r-table-edit .r-grid .r-search .input__value {\n z-index: 1;\n}\n.r-table-edit .r-grid .r-search .input__value.is-clearable {\n padding-right: 25px;\n}\n.r-table-edit .r-grid .r-search .input__clear-icon {\n position: absolute;\n right: 5px;\n z-index: 10;\n}\n.r-table-edit .r-grid .r-gridtable {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: scroll;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353);\n font-weight: 400;\n border: 1px solid #e0e0e0;\n /* Toàn bộ thanh cuộn */\n /* Nền của thanh cuộn */\n /* Thanh trượt (thumb) */\n /* Khi hover */\n}\n.r-table-edit .r-grid .r-gridtable table {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0px;\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar {\n width: 9px;\n /* Độ rộng của thanh cuộn */\n height: 9px;\n /* Độ cao của thanh cuộn */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-track {\n background: #FCFCFC;\n /* Màu nền nhạt */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n /* Màu xám nhạt */\n border-radius: 6px;\n /* Bo góc giống Edge */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-thumb:hover {\n background: #636363;\n /* Màu đậm hơn khi hover */\n}\n.r-table-edit .r-grid .r-gridtable .react-resizable-handle.react-resizable-handle-se {\n position: absolute;\n right: 0px;\n top: 0px;\n width: 10px;\n height: 100%;\n cursor: col-resize;\n background-image: none;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter svg.active {\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .select-value {\n line-height: 20px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .select-placeholder {\n line-height: 20px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .r-select-is-focus {\n border-color: #eb4619 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .form-control:focus {\n border-color: #eb4619 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-no-data {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 20px 9px;\n color: #8f8f8f;\n}\n.r-table-edit .r-grid .r-gridtable .r-loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.3);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 3;\n}\n.r-table-edit .r-grid .r-gridtable .r-loading-overlay .r-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 7px 9px;\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed {\n z-index: 2 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-right .r-headercell-div {\n border-left: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-left .r-headercell-div {\n border-right: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-left.fixed-last .r-headercell-div {\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-right.fixed-last .r-headercell-div {\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell {\n color: rgba(0, 0, 0, 0.8705882353);\n position: sticky;\n padding: 0px;\n height: 42px;\n z-index: 1;\n border-width: 0px;\n line-height: 16px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .r-headercell-div {\n border-right: 1px solid #e0e0e0;\n border-bottom: 1px solid #e0e0e0;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n text-align: center;\n padding: 5px 10px;\n height: 100%;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .header-content {\n display: flex;\n flex: 1 1 0%;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .header-content .text-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row:first-of-type .r-rowcell-div {\n border-top-color: #FFFFFF;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row {\n font-size: 13px;\n transition: transform 0.05s linear;\n will-change: transform;\n backface-visibility: hidden;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .cell-fixed {\n position: sticky;\n z-index: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .cell-fixed .r-rowcell.r-cell-selected-right {\n margin-right: 1px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell {\n background-color: #FFFFFF;\n border-bottom: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n vertical-align: middle;\n padding: 0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.cell-fixed .r-rowcell-div.r-cell-selected-right {\n padding-right: 1px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-right {\n border-left: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-right.fixed-last {\n border-left: 1px solid #e0e0e0;\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-left.fixed-last {\n border-right: 1px solid #e0e0e0;\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-active-row {\n background-color: #fce6df;\n border-right: 2px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div {\n min-height: 28px !important;\n border: 1px solid transparent;\n position: relative;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-expand {\n transition: transform 0.3s ease;\n position: absolute;\n left: 3px;\n top: 8px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-expand.is-open {\n transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -webkit-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .arrow-context-menu {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 15px;\n width: 15px;\n background-color: #FFFFFF;\n border-radius: 10px;\n border: 1px solid #e0e0e0;\n box-shadow: 0px 0px 2px #e0e0e0;\n right: -5px;\n bottom: -5px;\n z-index: 10000;\n cursor: pointer;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.command {\n padding-top: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div:focus {\n outline: none;\n /* bỏ viền focus mặc định */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-disable {\n background-color: #f9f9f9;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-active-cell {\n background-color: rgb(255, 240, 240);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text:focus {\n outline: none;\n /* bỏ viền focus mặc định */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-invalid {\n position: absolute;\n width: 10px;\n height: 10px;\n top: 0px;\n left: -6px;\n rotate: -90deg;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-drag-icon {\n position: absolute;\n border: 1px solid #FFFFFF;\n bottom: -2px;\n right: -2px;\n width: 7px;\n height: 7px;\n background-color: #eb4619;\n border-radius: 20%;\n cursor: crosshair;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text {\n padding: 0px 7px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: flex;\n align-items: center;\n min-width: 0;\n min-height: 28px;\n flex: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text .r-drop-icon {\n position: absolute;\n fill: #c4c4c4 !important;\n right: 8.5px;\n top: 3.5px;\n cursor: pointer;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .is-invalid {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .is-invalid .r-select-is-invalid {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-top {\n border-top: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-bottom {\n border-bottom: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-left {\n border-left: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-right {\n border-right: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-datepicker .form-control {\n padding: 0px 4px;\n border-radius: 0px;\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table.is-invalid {\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .r-select-is-focus {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .select-table-control {\n border-radius: 0px;\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .select-table-control.r-select-is-focus {\n border: 1px solid #1989fa;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .display-value {\n cursor: pointer;\n border-radius: 0px;\n background-color: #FFFFFF;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .input-display {\n border-width: 0px;\n box-sizing: border-box;\n border: none;\n /* Loại bỏ border */\n outline: none;\n /* Loại bỏ outline khi input được chọn */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .form-input-content .form-control {\n border-radius: 4px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .form-input-content .form-control:focus {\n border: 1px solid #1989fa;\n outline: none;\n box-shadow: none;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit input::placeholder {\n color: #eb4619;\n opacity: 1;\n /* Firefox */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__display {\n vertical-align: middle;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit {\n display: none;\n text-align: left;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit.active {\n display: flex;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form-label {\n font-size: 10px;\n margin-bottom: 0px;\n text-align: left;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form-control {\n border-radius: 0px;\n height: 23px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form__element {\n margin: 0px 2px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-date-input {\n text-align: center;\n height: 29px;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 5px;\n font-size: 14px;\n background-color: #f9f9f9;\n color: #333;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-control:focus {\n border-radius: 0px;\n border-width: 0px;\n background-color: #f8f8f8;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div input {\n font-size: 13px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot {\n color: #283046;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row {\n bottom: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer {\n background-color: #fafafa;\n font-size: 14px;\n font-weight: 600;\n width: 100px;\n position: sticky;\n z-index: 1;\n bottom: 0;\n border-width: 0px;\n padding: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer.cell-fixed {\n z-index: 2;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer .r-footer-div {\n height: 30px;\n padding: 5px 7px;\n}\n.r-table-edit .r-grid .r-gridtable .formula-dropdown {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;\n}\n.r-table-edit .r-grid .text-left .form-label {\n text-align: left;\n}\n.r-table-edit .r-grid .r-toolbar {\n border: 1px solid #e0e0e0;\n height: 44px;\n}\n.r-table-edit .r-grid .r-toolbar.r-toolbar-bottom {\n border-top-width: 0px;\n}\n.r-table-edit .r-grid .r-toolbar.r-toolbar-top {\n border-bottom-width: 0px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-left {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-left .r-toolbar-item {\n margin: 7px 0px 7px 7px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-center {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-center .r-toolbar-item {\n margin: 7px 3px 7px 3px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-right {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-right .r-toolbar-item {\n margin: 7px 7px 7px 0px;\n}\n.r-table-edit .r-setting-container {\n margin: 0px 15px;\n}\n.r-table-edit .r-setting-container .r-setting-content {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: scroll;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353);\n font-weight: 400;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n /* Toàn bộ thanh cuộn */\n /* Nền của thanh cuộn */\n /* Thanh trượt (thumb) */\n /* Khi hover */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar {\n width: 9px;\n /* Độ rộng của thanh cuộn */\n height: 9px;\n /* Độ cao của thanh cuộn */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-track {\n background: #FCFCFC;\n /* Màu nền nhạt */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n /* Màu xám nhạt */\n border-radius: 6px;\n /* Bo góc giống Edge */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-thumb:hover {\n background: #636363;\n /* Màu đậm hơn khi hover */\n}\n.r-table-edit .r-setting-container .r-setting-row {\n padding: 5px !important;\n margin: 0px;\n border-bottom: 1px solid #e0e0e0;\n font-size: 13px;\n display: flex;\n align-items: center;\n}\n.r-table-edit .r-setting-container .r-setting-row .r-setting-cell {\n padding-right: 10px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.r-table-edit .r-setting-container .r-setting-row .r-setting-cell .form-control {\n font-size: 13px !important;\n}\n.r-table-edit .r-setting-container .r-setting-row.r-setting-header {\n font-size: 12px !important;\n}\n.r-table-edit.r-virtualized-table .r-row:hover .r-rowcell {\n background-color: #fce6df !important;\n}\n.r-table-edit .r-pager {\n border: 1px solid #e0e0e0;\n border-top-width: 0px;\n min-height: 50px;\n width: 100%;\n display: inline-block;\n}\n.r-table-edit .r-pager .r-pagercontainer {\n margin-left: 10px;\n float: left;\n height: 100%;\n display: block;\n align-items: center;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-button {\n display: inline-block;\n margin: 9px 6px;\n height: 30px;\n width: 30px;\n padding: 6px;\n border-width: 0px;\n background-color: transparent;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-button svg {\n font-size: 16px;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number {\n display: inline-block;\n margin: 10px 4px 0px 0px;\n height: 25px;\n width: 25px;\n font-size: 13px;\n padding-top: 4px;\n text-align: center;\n cursor: pointer;\n border-radius: 5px;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number.r-active {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number:hover {\n border: 1px solid #eb4619;\n}\n.r-table-edit .r-pager .r-pagesize {\n margin-left: 20px;\n font-size: 13px;\n display: inline-block;\n}\n.r-table-edit .r-pager .r-pagesize .select-pagesize__menu-portal {\n z-index: 5;\n}\n.r-table-edit .r-pager .r-parentmsgbar {\n font-size: 13px;\n float: right;\n padding-bottom: 9px;\n padding-right: 18px;\n padding-top: 14px;\n}\n\n.r-tooltip .tooltip-inner {\n font-size: 11px;\n}\n.r-tooltip.tooltip-error ::before {\n border-top-color: rgb(235, 78, 78);\n}\n.r-tooltip.tooltip-error .tooltip-inner {\n background-color: rgb(235, 78, 78);\n}\n\n.btn-input-style {\n font-weight: 500;\n text-transform: uppercase;\n border: 1px solid #e0e0e0;\n border-radius: 5px;\n margin-left: 3px;\n height: 28px;\n padding: 2px 5px;\n cursor: pointer;\n}\n.btn-input-style:hover {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\n}\n.btn-input-style.active-custom {\n background-color: #eb4619;\n color: #FFFFFF;\n}";
36348
+ var css_248z$2 = "@charset \"UTF-8\";\n.react-select-table .select-table-control {\n opacity: 1;\n border: 1px solid hsl(0, 0%, 80%);\n border-radius: 0.357rem;\n width: 100%;\n height: 28px;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n padding: 2px 8px;\n}\n.react-select-table .select-table-control .select-table-indicator svg {\n fill: #c4c4c4 !important;\n}\n.react-select-table .select-table-control .icon-clear {\n font-size: 25px;\n margin-top: 2px;\n font-weight: 500;\n color: #c4c4c4;\n}\n.react-select-table .select-table-control .icon-clear:hover {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n}\n.react-select-table .select-table-control.r-select-is-open .select-table-indicator svg {\n fill: rgba(0, 0, 0, 0.8705882353) !important;\n}\n.react-select-table .select-table-control.r-select-is-invalid {\n border: 1px solid red !important;\n}\n.react-select-table .select-table-control.r-select-is-focus {\n border: 1px solid #1989fa !important;\n}\n.react-select-table .select-table-control.r-select-is-disabled {\n background-color: #efefef !important;\n}\n.react-select-table .select-table-control .select-table-container {\n position: relative;\n flex: 1;\n}\n.react-select-table .select-table-control .select-table-container .input-container {\n background-color: transparent;\n white-space: nowrap;\n top: 0px;\n left: 0px;\n display: inline;\n}\n.react-select-table .select-table-control .select-table-container .input-container .select-input {\n background-color: transparent;\n text-align: center;\n width: 100%;\n box-sizing: border-box;\n margin-left: -3px;\n border: none;\n /* Loại bỏ border */\n outline: none;\n /* Loại bỏ outline khi input được chọn */\n}\n.react-select-table .select-table-control .select-table-container .input-container .select-input:focus {\n border-width: 0px !important;\n}\n.react-select-table .select-table-control .select-table-container .select-placeholder {\n position: absolute;\n color: #283046;\n margin-top: 1px;\n background-color: transparent;\n}\n.react-select-table .select-table-control .select-table-container .select-value {\n position: absolute;\n background-color: transparent;\n bottom: 0px;\n left: 0px;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.react-select-table .formula-dropdown {\n min-width: min-content !important;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;\n}\n.react-select-table input::placeholder {\n color: #000000 !important;\n opacity: 1;\n /* Firefox */\n}\n\n.r-select-grid.r-select-tree-grid .r-select-gridtable .r-select-row:hover {\n background-color: rgba(235, 70, 25, 0.1) !important;\n color: #eb4619;\n}\n\n.r-select-grid {\n font-size: 12px;\n font-family: Montserrat, Helvetica, Arial, serif;\n font-weight: 500 !important;\n border-radius: 4px !important;\n overflow: hidden;\n}\n.r-select-grid table {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0px;\n}\n.r-select-grid .r-select-gridtable {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: auto;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353) !important;\n font-weight: 400 !important;\n font-size: 13px !important;\n /* Toàn bộ thanh cuộn */\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar {\n width: 9px;\n height: 9px;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-track {\n background: #FCFCFC;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n border-radius: 6px;\n}\n.r-select-grid .r-select-gridtable::-webkit-scrollbar-thumb:hover {\n background: #636363;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n position: sticky;\n padding: 0px;\n height: 35px;\n z-index: 1;\n border-width: 0px;\n line-height: 16px;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell .r-select-headercell-div {\n border-bottom: 1px solid #e0e0e0;\n background-color: #fafafa;\n display: flex;\n align-items: center;\n text-align: center;\n padding: 5px 10px;\n height: 100%;\n}\n.r-select-grid .r-select-gridtable .r-select-gridheader .r-select-row .r-select-headercell .r-select-headercell-text {\n width: 100%;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row {\n background-color: #FFFFFF;\n cursor: pointer;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .cell-fixed {\n position: sticky;\n z-index: 1;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row.fisrt-row .r-select-rowcell {\n border-top-width: 0px !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row.last-row .r-select-rowcell {\n border-bottom: 1px solid #e0e0e0;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell {\n border-top: 1px solid #e0e0e0;\n height: 30px !important;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 7px 9px;\n vertical-align: middle !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-select-move {\n background-color: rgba(235, 70, 25, 0.1) !important;\n color: #eb4619 !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-select-active {\n background-color: #eb4619 !important;\n color: #FFFFFF !important;\n}\n.r-tooltip .r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-hidden {\n display: none;\n}\n.r-tooltip .r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell.r-hidden ::after {\n display: none;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell .r-icon-expand {\n transition: transform 0.3s ease !important;\n}\n.r-select-grid .r-select-gridtable .r-select-gridcontent .r-select-row .r-select-rowcell .r-icon-expand.is-open {\n transform: rotate(90deg) !important;\n -moz-transform: rotate(90deg);\n -webkit-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n}\n.r-select-grid .r-select-gridtable.no-header .r-select-rowcell {\n border: none !important;\n}\n.r-select-grid .r-no-data {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 7px 9px;\n color: #8f8f8f;\n}\n.r-select-grid .r-select-footer {\n height: 30px;\n background-color: #fafafa;\n}\n.r-select-grid .r-select-footer button {\n font-weight: 400 !important;\n font-size: 13px;\n}\n.r-select-grid .r-select-footer .r-btn {\n border-width: 0px !important;\n}\n\n.r-pagesize .react-select-table .select-table-control {\n border-radius: 0px;\n border: 0px;\n border-bottom: 1px solid #e0e0e0 !important;\n}\n.r-pagesize .react-select-table .select-table-control.r-select-is-focus {\n border: 0px !important;\n border-bottom: 1px solid #1989fa !important;\n}\n\n.r-sidebar {\n width: 400px;\n right: -400px;\n padding: 0;\n background-color: #FFFFFF;\n z-index: 1051;\n position: fixed;\n top: 0;\n bottom: 0;\n height: 100vh;\n height: calc(var(--vh, 1vh) * 100);\n transition: right 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);\n backface-visibility: hidden;\n border-left: 1px solid rgba(0, 0, 0, 0.05);\n}\n.r-sidebar.open {\n box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.11), 0 5px 15px 0 rgba(0, 0, 0, 0.08);\n right: 0;\n}\n.r-sidebar .modal-header {\n background-color: #FFFFFF;\n}\n.r-sidebar .modal-header .btn-close {\n padding: 0.8rem;\n box-shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.1);\n border-radius: 0.357rem;\n background-color: #FFFFFF;\n opacity: 1;\n transition: all 0.23s ease 0.1s;\n position: relative;\n transform: translate(18px, -10px);\n}\n.r-sidebar .modal-header .btn-close:hover, .r-sidebar .modal-header .btn-close:focus, .r-sidebar .modal-header .btn-close:active {\n opacity: 1;\n outline: none;\n transform: translate(15px, -2px);\n box-shadow: none;\n}\n\n.r-sidebar .react-select {\n max-width: 100%;\n}\n\n.r-sidebar {\n width: 400px;\n right: -100vw;\n height: 100vh;\n}\n.r-sidebar .r-handle {\n position: fixed;\n background-color: #FFFFFF;\n top: 50%;\n transform: translate(-50%, -50%);\n filter: drop-shadow(0.9px 0.9px 1.5px);\n height: 50px;\n display: flex;\n align-items: center;\n border-radius: 0px 5px 5px 0px;\n cursor: pointer;\n margin-left: 7px;\n z-index: 9;\n}\n.r-sidebar.customizer-md {\n width: 600px;\n}\n.r-sidebar.customizer-lg {\n width: 800px;\n}\n.r-sidebar.customizer-500 {\n width: 500px;\n}\n@media (max-width: 500px) {\n .r-sidebar.customizer-500 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-600 {\n width: 600px;\n}\n@media (max-width: 600px) {\n .r-sidebar.customizer-600 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-700 {\n width: 700px;\n}\n@media (max-width: 700px) {\n .r-sidebar.customizer-700 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-800 {\n width: 800px;\n}\n@media (max-width: 800px) {\n .r-sidebar.customizer-800 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-900 {\n width: 900px;\n}\n@media (max-width: 900px) {\n .r-sidebar.customizer-900 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-1000 {\n width: 1000px;\n}\n@media (max-width: 1000px) {\n .r-sidebar.customizer-1000 {\n width: 100vw;\n }\n}\n.r-sidebar.customizer-1500 {\n width: 1500px;\n}\n@media (max-width: 1500px) {\n .r-sidebar.customizer-1500 {\n width: 100vw;\n }\n}\n.r-sidebar.fullscreen {\n width: 100%;\n}\n.r-sidebar.open {\n right: 0;\n}\n\n.r-datepicker {\n position: relative;\n}\n.r-datepicker .form-control {\n height: 28px;\n}\n\n.r-datepicker-popup {\n background: white;\n border: 1px solid #e0e0e0;\n padding: 15px 5px !important;\n}\n.r-datepicker-popup .rdp-nav {\n display: none;\n}\n.r-datepicker-popup .rdp-month_caption {\n display: none;\n}\n.r-datepicker-popup .select-month-year {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 5px 5px 8px 5px;\n}\n.r-datepicker-popup .select-month-year .select-month {\n text-align: right;\n width: 90px !important;\n}\n.r-datepicker-popup .select-month-year .select-year {\n text-align: left;\n width: 65px !important;\n}\n.r-datepicker-popup .select-month-year svg:hover {\n color: #eb4619;\n}\n.r-datepicker-popup .select-month-year .select-table-control .select-table-container {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n font-size: 14px !important;\n font-weight: 600;\n}\n.r-datepicker-popup .select-month-year .select-table-control .select-table-container .select-input {\n cursor: pointer !important;\n}\n.r-datepicker-popup .select-month-year .react-select-table .select-table-control {\n border: none;\n}\n.r-datepicker-popup .select-month-year .react-select-table .r-select-is-focus {\n border: none !important;\n}\n.r-datepicker-popup .select-month-year .select-table-indicator {\n display: none;\n}\n.r-datepicker-popup .rdp-weekday {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n opacity: 1 !important;\n font-weight: 500;\n font-size: 14px !important;\n}\n.r-datepicker-popup .rdp-day {\n color: rgba(0, 0, 0, 0.8705882353) !important;\n font-size: 13.5px !important;\n height: 32px !important;\n width: 32px !important;\n}\n.r-datepicker-popup .rdp-day .rdp-day_button {\n height: 32px !important;\n width: 32px !important;\n}\n.r-datepicker-popup .rdp-day.rdp-today {\n font-weight: bold;\n color: #eb4619;\n}\n.r-datepicker-popup .rdp-day.rdp-today .rdp-day_button {\n border: 1px solid #eb4619;\n border-radius: 8px;\n}\n.r-datepicker-popup .rdp-day.rdp-selected .rdp-day_button {\n border: 1px solid #eb4619;\n background-color: #eb4619;\n color: #FFFFFF;\n border-radius: 8px;\n}\n.r-datepicker-popup .rdp-day.rdp-in-range .rdp-day_button {\n background-color: #fce6df;\n color: #eb4619;\n border-radius: 2px;\n height: 22px !important;\n border-width: 0px !important;\n}\n.r-datepicker-popup .rdp-day .rdp-day_button:hover {\n background-color: #fce6df;\n color: #eb4619;\n border-radius: 8px;\n}\n.r-datepicker-popup .btn-today {\n margin-top: 5px;\n text-align: center;\n font-size: 13px;\n color: #eb4619;\n cursor: pointer;\n user-select: none;\n font-weight: 500;\n}\n.r-datepicker-popup .btn-today:hover {\n text-decoration: underline;\n}\n\n.tab-custom {\n font-family: Roboto, \"Segoe UI\", GeezaPro, \"DejaVu Serif\", \"sans-serif\", -apple-system, BlinkMacSystemFont;\n display: flex;\n}\n.tab-custom.tab-parent {\n border-bottom: solid 1px #c9c9c9;\n}\n.tab-custom .btn-scroll {\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.tab-custom .tab-component::-webkit-scrollbar {\n display: none;\n /* Ẩn thanh cuộn nếu không cần */\n}\n.tab-custom .tab-component {\n white-space: nowrap;\n overflow-x: hidden;\n scroll-behavior: smooth;\n}\n.tab-custom .tab-component > * {\n display: inline-block;\n}\n.tab-custom .tab-component .tab-custom-item {\n display: inline-block;\n padding: 3px 10px;\n line-height: 23px;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n text-transform: uppercase;\n height: 30px;\n color: rgba(0, 0, 0, 0.5);\n}\n.tab-custom .tab-component .tab-custom-item.active {\n border-bottom: solid 2px #eb4619 !important;\n color: #eb4619;\n}\n.tab-custom.tab-child .tab-custom-item {\n font-size: 12px !important;\n line-height: 23px !important;\n border-radius: 5px 5px 0px 0px;\n margin: 8px 3px 0px 3px;\n box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;\n}\n\n.bs-stepper {\n background-color: #FFFFFF;\n box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.1);\n border-radius: 0.5rem;\n}\n.bs-stepper .bs-stepper-header {\n padding: 1.5rem 1.5rem;\n flex-wrap: wrap;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n margin: 0;\n}\n.bs-stepper .bs-stepper-header .line {\n flex: 0;\n min-width: auto;\n min-height: auto;\n background-color: transparent;\n margin: 0;\n padding: 0 1.75rem;\n color: #283046;\n font-size: 1.5rem;\n}\n.bs-stepper .bs-stepper-header .step {\n margin-bottom: 0.25rem;\n margin-top: 0.25rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger {\n flex-wrap: nowrap;\n padding: 0;\n font-weight: normal;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-box {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 38px;\n height: 38px;\n padding: 0.5em 0;\n font-weight: 500;\n color: #babfc7;\n background-color: rgba(186, 191, 199, 0.12);\n border-radius: 0.35rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label {\n text-align: left;\n margin: 0;\n margin-top: 0.5rem;\n margin-left: 1rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label .bs-stepper-title {\n display: inherit;\n color: #283046;\n font-weight: 600;\n line-height: 1rem;\n margin-bottom: 0rem;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger .bs-stepper-label .bs-stepper-subtitle {\n font-weight: 400;\n font-size: 0.85rem;\n color: #b9b9c3;\n}\n.bs-stepper .bs-stepper-header .step .step-trigger:hover {\n background-color: transparent;\n}\n.bs-stepper .bs-stepper-header .step.active .step-trigger .bs-stepper-box {\n background-color: #eb4619;\n color: #FFFFFF;\n box-shadow: 0 3px 6px 0 rgba(235, 70, 25, 0.4);\n}\n.bs-stepper .bs-stepper-header .step.active .step-trigger .bs-stepper-label .bs-stepper-title {\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-header .step.crossed .step-trigger .bs-stepper-box {\n background-color: rgba(235, 70, 25, 0.12);\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-header .step.crossed .step-trigger .bs-stepper-label .bs-stepper-title {\n color: #b9b9c3;\n}\n.bs-stepper .bs-stepper-header .step.crossed + .line {\n color: #eb4619;\n}\n.bs-stepper .bs-stepper-content {\n padding: 1.5rem 1.5rem;\n}\n.bs-stepper .bs-stepper-content .content {\n margin-left: 0;\n}\n.bs-stepper .bs-stepper-content .content .content-header {\n margin-bottom: 1rem;\n}\n.bs-stepper.vertical .bs-stepper-header {\n border-right: 1px solid #e0e0e0;\n border-bottom: none;\n}\n.bs-stepper.vertical .bs-stepper-header .step .step-trigger {\n padding: 1rem 0;\n}\n.bs-stepper.vertical .bs-stepper-header .line {\n display: none;\n}\n.bs-stepper.vertical .bs-stepper-content {\n width: 100%;\n padding-top: 2.5rem;\n}\n.bs-stepper.vertical .bs-stepper-content .content:not(.active) {\n display: none;\n}\n.bs-stepper.vertical.wizard-icons .step {\n text-align: center;\n}\n.bs-stepper.wizard-modern {\n background-color: transparent;\n box-shadow: none;\n}\n.bs-stepper.wizard-modern .bs-stepper-header {\n border: none;\n}\n.bs-stepper.wizard-modern .bs-stepper-content {\n background-color: #FFFFFF;\n border-radius: 0.5rem;\n box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.horizontal-wizard,\n.vertical-wizard,\n.modern-horizontal-wizard,\n.modern-vertical-wizard {\n margin-bottom: 2.2rem;\n}\n\nhtml[data-textdirection=rtl] .btn-prev,\nhtml[data-textdirection=rtl] .btn-next {\n display: flex;\n}\nhtml[data-textdirection=rtl] .btn-prev i,\nhtml[data-textdirection=rtl] .btn-prev svg,\nhtml[data-textdirection=rtl] .btn-next i,\nhtml[data-textdirection=rtl] .btn-next svg {\n transform: rotate(-180deg);\n}\n\n@media (max-width: 992px) {\n .bs-stepper .bs-stepper-header {\n flex-direction: column;\n align-items: flex-start;\n }\n .bs-stepper .bs-stepper-header .step .step-trigger {\n padding: 0.5rem 0 !important;\n flex-direction: row;\n }\n .bs-stepper .bs-stepper-header .line {\n display: none;\n }\n .bs-stepper.vertical {\n flex-direction: column;\n }\n .bs-stepper.vertical .bs-stepper-header {\n align-items: flex-start;\n }\n .bs-stepper.vertical .bs-stepper-content {\n padding-top: 1.5rem;\n }\n}\n.r-table-edit .r-grid {\n font-size: 12px;\n}\n.r-table-edit .r-grid .r-search {\n display: flex;\n position: relative;\n align-items: center;\n}\n.r-table-edit .r-grid .r-search .input__value {\n z-index: 1;\n}\n.r-table-edit .r-grid .r-search .input__value.is-clearable {\n padding-right: 25px;\n}\n.r-table-edit .r-grid .r-search .input__clear-icon {\n position: absolute;\n right: 5px;\n z-index: 10;\n}\n.r-table-edit .r-grid .r-gridtable {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: scroll;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353);\n font-weight: 400;\n border: 1px solid #e0e0e0;\n /* Toàn bộ thanh cuộn */\n /* Nền của thanh cuộn */\n /* Thanh trượt (thumb) */\n /* Khi hover */\n}\n.r-table-edit .r-grid .r-gridtable table {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0px;\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar {\n width: 9px;\n /* Độ rộng của thanh cuộn */\n height: 9px;\n /* Độ cao của thanh cuộn */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-track {\n background: #FCFCFC;\n /* Màu nền nhạt */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n /* Màu xám nhạt */\n border-radius: 6px;\n /* Bo góc giống Edge */\n}\n.r-table-edit .r-grid .r-gridtable::-webkit-scrollbar-thumb:hover {\n background: #636363;\n /* Màu đậm hơn khi hover */\n}\n.r-table-edit .r-grid .r-gridtable .react-resizable-handle.react-resizable-handle-se {\n position: absolute;\n right: 0px;\n top: 0px;\n width: 10px;\n height: 100%;\n cursor: col-resize;\n background-image: none;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter svg.active {\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .select-value {\n line-height: 20px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .select-placeholder {\n line-height: 20px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .react-select-table .r-select-is-focus {\n border-color: #eb4619 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-filter-popup .form-control:focus {\n border-color: #eb4619 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-no-data {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 20px 9px;\n color: #8f8f8f;\n}\n.r-table-edit .r-grid .r-gridtable .r-loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.3);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 3;\n}\n.r-table-edit .r-grid .r-gridtable .r-loading-overlay .r-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n padding: 7px 9px;\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed {\n z-index: 2 !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-right .r-headercell-div {\n border-left: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-left .r-headercell-div {\n border-right: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-left.fixed-last .r-headercell-div {\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .cell-fixed.fix-right.fixed-last .r-headercell-div {\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell {\n color: rgba(0, 0, 0, 0.8705882353);\n position: sticky;\n padding: 0px;\n height: 42px;\n z-index: 1;\n border-width: 0px;\n line-height: 16px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .r-headercell-div {\n border-right: 1px solid #e0e0e0;\n border-bottom: 1px solid #e0e0e0;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n text-align: center;\n padding: 5px 10px;\n height: 100%;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .header-content {\n display: flex;\n flex: 1 1 0%;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridheader .r-row .r-headercell .header-content .text-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row:first-of-type .r-rowcell-div {\n border-top-color: #FFFFFF;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row {\n font-size: 13px;\n transition: transform 0.05s linear;\n will-change: transform;\n backface-visibility: hidden;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .cell-fixed {\n position: sticky;\n z-index: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .cell-fixed .r-rowcell.r-cell-selected-right {\n margin-right: 1px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell {\n background-color: #FFFFFF;\n border-bottom: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n vertical-align: middle;\n padding: 0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group {\n background-color: #fafafa;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 15px;\n display: flex;\n align-items: center;\n background-color: #fafafa;\n font-weight: 550;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group {\n left: 0px;\n position: sticky;\n z-index: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 15px;\n display: flex;\n align-items: center;\n background-color: #fafafa;\n font-weight: 550;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group .r-rowcell-div svg {\n margin-right: 10px;\n cursor: pointer;\n user-select: none;\n transition: transform 0.2s ease-in-out;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group .r-rowcell-div svg:hover {\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.cell-fixed .r-rowcell-div.r-cell-selected-right {\n padding-right: 1px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-right {\n border-left: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-right.fixed-last {\n border-left: 1px solid #e0e0e0;\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.fix-left.fixed-last {\n border-right: 1px solid #e0e0e0;\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-active-row {\n background-color: #fce6df;\n border-right: 2px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div {\n min-height: 28px !important;\n border: 1px solid transparent;\n position: relative;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-expand {\n transition: transform 0.3s ease;\n position: absolute;\n left: 3px;\n top: 8px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-expand.is-open {\n transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -webkit-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .arrow-context-menu {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 15px;\n width: 15px;\n background-color: #FFFFFF;\n border-radius: 10px;\n border: 1px solid #e0e0e0;\n box-shadow: 0px 0px 2px #e0e0e0;\n right: -5px;\n bottom: -5px;\n z-index: 10000;\n cursor: pointer;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.command {\n padding-top: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div:focus {\n outline: none;\n /* bỏ viền focus mặc định */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-disable {\n background-color: #f9f9f9;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-active-cell {\n background-color: rgb(255, 240, 240);\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text:focus {\n outline: none;\n /* bỏ viền focus mặc định */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-icon-invalid {\n position: absolute;\n width: 10px;\n height: 10px;\n top: 0px;\n left: -6px;\n rotate: -90deg;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-drag-icon {\n position: absolute;\n border: 1px solid #FFFFFF;\n bottom: -2px;\n right: -2px;\n width: 7px;\n height: 7px;\n background-color: #eb4619;\n border-radius: 20%;\n cursor: crosshair;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text {\n padding: 0px 7px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: flex;\n align-items: center;\n min-width: 0;\n min-height: 28px;\n flex: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-cell-text .r-drop-icon {\n position: absolute;\n fill: #c4c4c4 !important;\n right: 8.5px;\n top: 3.5px;\n cursor: pointer;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .is-invalid {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .is-invalid .r-select-is-invalid {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-top {\n border-top: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-bottom {\n border-bottom: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-left {\n border-left: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div.r-cell-selected-right {\n border-right: 1px solid #eb4619;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-datepicker .form-control {\n padding: 0px 4px;\n border-radius: 0px;\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table.is-invalid {\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .r-select-is-focus {\n border-width: 0px !important;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .select-table-control {\n border-radius: 0px;\n border-width: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .react-select-table .select-table-control.r-select-is-focus {\n border: 1px solid #1989fa;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .display-value {\n cursor: pointer;\n border-radius: 0px;\n background-color: #FFFFFF;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .input-display {\n border-width: 0px;\n box-sizing: border-box;\n border: none;\n /* Loại bỏ border */\n outline: none;\n /* Loại bỏ outline khi input được chọn */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .form-input-content .form-control {\n border-radius: 4px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit .form-input-content .form-control:focus {\n border: 1px solid #1989fa;\n outline: none;\n box-shadow: none;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit input::placeholder {\n color: #eb4619;\n opacity: 1;\n /* Firefox */\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__display {\n vertical-align: middle;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit {\n display: none;\n text-align: left;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit.active {\n display: flex;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form-label {\n font-size: 10px;\n margin-bottom: 0px;\n text-align: left;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form-control {\n border-radius: 0px;\n height: 23px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-edit-inline .form__edit .form__element {\n margin: 0px 2px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .r-date-input {\n text-align: center;\n height: 29px;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 5px;\n font-size: 14px;\n background-color: #f9f9f9;\n color: #333;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div .form-control:focus {\n border-radius: 0px;\n border-width: 0px;\n background-color: #f8f8f8;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell .r-rowcell-div input {\n font-size: 13px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot {\n color: #283046;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row {\n bottom: 0px;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer {\n background-color: #fafafa;\n font-size: 14px;\n font-weight: 600;\n width: 100px;\n position: sticky;\n z-index: 1;\n bottom: 0;\n border-width: 0px;\n padding: 0px;\n border-top: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer.cell-fixed {\n z-index: 2;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridfoot .r-row .r-footer .r-footer-div {\n height: 30px;\n padding: 5px 7px;\n}\n.r-table-edit .r-grid .r-gridtable .formula-dropdown {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;\n}\n.r-table-edit .r-grid .text-left .form-label {\n text-align: left;\n}\n.r-table-edit .r-grid .r-toolbar {\n border: 1px solid #e0e0e0;\n height: 44px;\n}\n.r-table-edit .r-grid .r-toolbar.r-toolbar-bottom {\n border-top-width: 0px;\n}\n.r-table-edit .r-grid .r-toolbar.r-toolbar-top {\n border-bottom-width: 0px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items svg {\n cursor: pointer;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items svg:hover {\n color: #eb4619;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-left {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-left .r-toolbar-item {\n margin: 7px 0px 7px 7px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-center {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-center .r-toolbar-item {\n margin: 7px 3px 7px 3px;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-right {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.r-table-edit .r-grid .r-toolbar .r-toolbar-items .r-toolbar-right .r-toolbar-item {\n margin: 7px 7px 7px 0px;\n}\n.r-table-edit .r-setting-container {\n margin: 0px 15px;\n}\n.r-table-edit .r-setting-container .r-setting-content {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: scroll;\n position: relative;\n background-color: #FFFFFF;\n color: rgba(0, 0, 0, 0.8705882353);\n font-weight: 400;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n /* Toàn bộ thanh cuộn */\n /* Nền của thanh cuộn */\n /* Thanh trượt (thumb) */\n /* Khi hover */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar {\n width: 9px;\n /* Độ rộng của thanh cuộn */\n height: 9px;\n /* Độ cao của thanh cuộn */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-track {\n background: #FCFCFC;\n /* Màu nền nhạt */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-thumb {\n background: #8B8B8B;\n /* Màu xám nhạt */\n border-radius: 6px;\n /* Bo góc giống Edge */\n}\n.r-table-edit .r-setting-container .r-setting-content::-webkit-scrollbar-thumb:hover {\n background: #636363;\n /* Màu đậm hơn khi hover */\n}\n.r-table-edit .r-setting-container .r-setting-row {\n padding: 5px !important;\n margin: 0px;\n border-bottom: 1px solid #e0e0e0;\n font-size: 13px;\n display: flex;\n align-items: center;\n}\n.r-table-edit .r-setting-container .r-setting-row .r-setting-cell {\n padding-right: 10px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.r-table-edit .r-setting-container .r-setting-row .r-setting-cell .form-control {\n font-size: 13px !important;\n}\n.r-table-edit .r-setting-container .r-setting-row.r-setting-header {\n font-size: 12px !important;\n}\n.r-table-edit.r-virtualized-table .r-row:hover .r-rowcell {\n background-color: #fce6df !important;\n}\n.r-table-edit .r-pager {\n border: 1px solid #e0e0e0;\n border-top-width: 0px;\n min-height: 50px;\n width: 100%;\n display: inline-block;\n}\n.r-table-edit .r-pager .r-pagercontainer {\n margin-left: 10px;\n float: left;\n height: 100%;\n display: block;\n align-items: center;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-button {\n display: inline-block;\n margin: 9px 6px;\n height: 30px;\n width: 30px;\n padding: 6px;\n border-width: 0px;\n background-color: transparent;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-button svg {\n font-size: 16px;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number {\n display: inline-block;\n margin: 10px 4px 0px 0px;\n height: 25px;\n width: 25px;\n font-size: 13px;\n padding-top: 4px;\n text-align: center;\n cursor: pointer;\n border-radius: 5px;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number.r-active {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\n}\n.r-table-edit .r-pager .r-pagercontainer .r-number:hover {\n border: 1px solid #eb4619;\n}\n.r-table-edit .r-pager .r-pagesize {\n margin-left: 20px;\n font-size: 13px;\n display: inline-block;\n}\n.r-table-edit .r-pager .r-pagesize .select-pagesize__menu-portal {\n z-index: 5;\n}\n.r-table-edit .r-pager .r-parentmsgbar {\n font-size: 13px;\n float: right;\n padding-bottom: 9px;\n padding-right: 18px;\n padding-top: 14px;\n}\n\n.r-tooltip .tooltip-inner {\n font-size: 11px;\n}\n.r-tooltip.tooltip-error ::before {\n border-top-color: rgb(235, 78, 78);\n}\n.r-tooltip.tooltip-error .tooltip-inner {\n background-color: rgb(235, 78, 78);\n}\n\n.btn-input-style {\n font-weight: 500;\n text-transform: uppercase;\n border: 1px solid #e0e0e0;\n border-radius: 5px;\n margin-left: 3px;\n height: 28px;\n padding: 2px 5px;\n cursor: pointer;\n}\n.btn-input-style:hover {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\n}\n.btn-input-style.active-custom {\n background-color: #eb4619;\n color: #FFFFFF;\n}";
36319
36349
  styleInject(css_248z$2);
36320
36350
 
36321
36351
  const getColumn = (contentColumns, col, count) => {
@@ -38614,14 +38644,331 @@ reactResizable.exports.ResizableBox = ResizableBox$1.default;
38614
38644
  var css_248z$1 = ".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}";
38615
38645
  styleInject(css_248z$1);
38616
38646
 
38617
- const HeaderTableCol$1 = (props) => {
38647
+ const DateRangePicker = React$5.forwardRef((props, ref) => {
38648
+ const { id, onKeyDown, className, invalid, container, onPaste, onChange, value } = props;
38649
+ const dateFormat = props.dateFormat ?? 'dd/MM/yyyy';
38650
+ const { from, to } = value || {};
38651
+ const today = new Date();
38652
+ const { t } = reactI18next.useTranslation();
38653
+ const [viewDateFrom, setViewDateFrom] = React$5.useState(from ? new Date(from) : today);
38654
+ const [viewDateTo, setViewDateTo] = React$5.useState(to ? new Date(to) : addMonths(today, 1));
38655
+ const [open, setOpen] = React$5.useState(false);
38656
+ const formatDisplay = (f, t) => {
38657
+ if (f && t) {
38658
+ return `${formatDateTime(f, dateFormat)} - ${formatDateTime(t, dateFormat)}`;
38659
+ }
38660
+ if (f) {
38661
+ return `${formatDateTime(f, dateFormat)} - `;
38662
+ }
38663
+ return '';
38664
+ };
38665
+ const [inputValue, setInputValue] = React$5.useState(formatDisplay(from, to));
38666
+ const toggle = () => setOpen((prev) => !prev);
38667
+ const handleSelect = (selected, selectedTo) => {
38668
+ let newRange = { from, to };
38669
+ if (selectedTo) {
38670
+ newRange = { from: selected, to: selectedTo };
38671
+ setViewDateFrom(selected || today);
38672
+ setViewDateTo(selectedTo || today);
38673
+ }
38674
+ else if (!newRange.from || (selected && selected < newRange.from)) {
38675
+ newRange = { from: selected, to };
38676
+ setViewDateFrom(selected || today);
38677
+ }
38678
+ else if (newRange.from && selected && selected > newRange.from && (!newRange.to || selected < newRange.to)) {
38679
+ newRange = { from, to: selected };
38680
+ setViewDateTo(selected || today);
38681
+ }
38682
+ else if (newRange.to && selected && selected > newRange.to) {
38683
+ newRange = { from, to: selected };
38684
+ setViewDateTo(selected || today);
38685
+ }
38686
+ onChange(newRange);
38687
+ setInputValue(formatDisplay(newRange.from, newRange.to));
38688
+ };
38689
+ const handleChange = (e) => {
38690
+ const v = e.target.value;
38691
+ setInputValue(v);
38692
+ const parts = v.split('-').map((p) => p.trim());
38693
+ if (parts.length === 2 && parts[0].length === 10 && parts[1].length === 10) {
38694
+ const parsedFrom = parse(parts[0], dateFormat, today);
38695
+ const parsedTo = parse(parts[1], dateFormat, today);
38696
+ if (!isNaN(parsedFrom.getTime()) && !isNaN(parsedTo.getTime())) {
38697
+ onChange({ from: parsedFrom, to: parsedTo });
38698
+ }
38699
+ }
38700
+ };
38701
+ const optionsMonth = [
38702
+ { value: 1, label: t('January') },
38703
+ { value: 2, label: t('February') },
38704
+ { value: 3, label: t('March') },
38705
+ { value: 4, label: t('April') },
38706
+ { value: 5, label: t('May') },
38707
+ { value: 6, label: t('June') },
38708
+ { value: 7, label: t('July') },
38709
+ { value: 8, label: t('August') },
38710
+ { value: 9, label: t('September') },
38711
+ { value: 10, label: t('October') },
38712
+ { value: 11, label: t('November') },
38713
+ { value: 12, label: t('December') }
38714
+ ];
38715
+ const getMaskFromFormat = () => '99/99/9999 -> 99/99/9999';
38716
+ return (jsxRuntime.jsx("div", { className: classNames$1('r-daterangepicker', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsxs(Dropdown$1$1, { className: className, isOpen: open, toggle: toggle, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", "data-toggle": "dropdown", "aria-expanded": open, className: "d-flex align-items-center", style: { cursor: 'pointer' }, children: jsxRuntime.jsx(InputMask, { mask: getMaskFromFormat(), value: inputValue, onChange: handleChange, placeholder: "dd/mm/yyyy -> dd/mm/yyyy", className: "form-control", style: { width: 230 }, onKeyDown: (e) => {
38717
+ if (e.code === 'Space') {
38718
+ setOpen(!open);
38719
+ }
38720
+ else if (onKeyDown) {
38721
+ const rs = onKeyDown(e);
38722
+ if (rs) {
38723
+ setOpen(false);
38724
+ }
38725
+ }
38726
+ }, onPaste: (e) => {
38727
+ onPaste?.(e);
38728
+ setOpen(false);
38729
+ } }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: "r-datepicker-popup formula-dropdown icon-dropdown p-0", container: container, style: { position: 'fixed', borderRadius: 8, zIndex: 9999 }, children: [jsxRuntime.jsxs("div", { className: "d-flex", style: { padding: 10, gap: 20 }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: "select-month-year", children: [jsxRuntime.jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
38730
+ const newDate = new Date(viewDateFrom);
38731
+ newDate.setMonth(viewDateFrom.getMonth() - 1);
38732
+ setViewDateFrom(newDate);
38733
+ } }), jsxRuntime.jsxs("div", { className: "d-flex", children: [jsxRuntime.jsx("div", { className: "select-month", children: jsxRuntime.jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
38734
+ const newMonth = parseInt(e.value, 10);
38735
+ const newDate = new Date(viewDateFrom);
38736
+ newDate.setMonth(newMonth - 1);
38737
+ setViewDateFrom(newDate);
38738
+ }, value: optionsMonth.find((x) => x.value === viewDateFrom.getMonth() + 1) }) }), jsxRuntime.jsx("div", { className: "select-year", children: jsxRuntime.jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
38739
+ const newYear = parseInt(e.value, 10);
38740
+ const newDate = new Date(viewDateFrom);
38741
+ newDate.setFullYear(newYear);
38742
+ setViewDateFrom(newDate);
38743
+ }, value: { value: viewDateFrom.getFullYear(), label: viewDateFrom.getFullYear() } }) })] }), jsxRuntime.jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
38744
+ const newDate = new Date(viewDateFrom);
38745
+ newDate.setMonth(viewDateFrom.getMonth() + 1);
38746
+ setViewDateFrom(newDate);
38747
+ } })] }), jsxRuntime.jsx(DayPicker, { mode: "single", selected: from, onSelect: (d) => handleSelect(d), month: viewDateFrom, showOutsideDays: true, modifiers: {
38748
+ inRange: (day) => !!(from && to && day && day > from && day < to),
38749
+ rangeStart: from,
38750
+ rangeEnd: to
38751
+ }, modifiersClassNames: {
38752
+ inRange: 'rdp-in-range',
38753
+ rangeStart: 'rdp-selected',
38754
+ rangeEnd: 'rdp-selected'
38755
+ } })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: "select-month-year", children: [jsxRuntime.jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
38756
+ const newDate = new Date(viewDateTo);
38757
+ newDate.setMonth(viewDateTo.getMonth() - 1);
38758
+ setViewDateTo(newDate);
38759
+ } }), jsxRuntime.jsxs("div", { className: "d-flex", children: [jsxRuntime.jsx("div", { className: "select-month", children: jsxRuntime.jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
38760
+ const newMonth = parseInt(e.value, 10);
38761
+ const newDate = new Date(viewDateTo);
38762
+ newDate.setMonth(newMonth - 1);
38763
+ setViewDateTo(newDate);
38764
+ }, value: optionsMonth.find((x) => x.value === viewDateTo.getMonth() + 1) }) }), jsxRuntime.jsx("div", { className: "select-year", children: jsxRuntime.jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
38765
+ const newYear = parseInt(e.value, 10);
38766
+ const newDate = new Date(viewDateTo);
38767
+ newDate.setFullYear(newYear);
38768
+ setViewDateTo(newDate);
38769
+ }, value: { value: viewDateTo.getFullYear(), label: viewDateTo.getFullYear() } }) })] }), jsxRuntime.jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
38770
+ const newDate = new Date(viewDateTo);
38771
+ newDate.setMonth(viewDateTo.getMonth() + 1);
38772
+ setViewDateTo(newDate);
38773
+ } })] }), jsxRuntime.jsx(DayPicker, { mode: "single", selected: to, onSelect: (d) => handleSelect(d), month: viewDateTo, showOutsideDays: true, modifiers: {
38774
+ inRange: (day) => !!(from && to && day && day > from && day < to),
38775
+ rangeStart: from,
38776
+ rangeEnd: to
38777
+ }, modifiersClassNames: {
38778
+ inRange: 'rdp-in-range',
38779
+ rangeStart: 'rdp-selected',
38780
+ rangeEnd: 'rdp-selected'
38781
+ } })] })] }), jsxRuntime.jsxs("div", { className: "d-flex border-top ms-50", style: { gap: 20, paddingTop: 10 }, children: [jsxRuntime.jsx("div", { className: "btn-today", onClick: () => {
38782
+ handleSelect(today, today);
38783
+ setOpen(false);
38784
+ }, children: t('Today') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => {
38785
+ handleSelect(addDays(today, -1), addDays(today, -1));
38786
+ setOpen(false);
38787
+ }, children: t('Yesterday') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => {
38788
+ handleSelect(startOfWeek(today, { weekStartsOn: 1 }), endOfWeek(today, { weekStartsOn: 1 }));
38789
+ setOpen(false);
38790
+ }, children: t('This week') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => {
38791
+ handleSelect(startOfMonth(today), endOfMonth(today));
38792
+ setOpen(false);
38793
+ }, children: t('This month') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => {
38794
+ const lastMonth = subMonths(today, 1);
38795
+ handleSelect(startOfMonth(lastMonth), endOfMonth(lastMonth));
38796
+ setOpen(false);
38797
+ }, children: t('Last month') })] })] })] }) }));
38798
+ });
38799
+
38800
+ const FilterComponent = ({ optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
38801
+ const { t } = reactI18next.useTranslation();
38802
+ const fieldFilter = column.fieldFilter ?? column.field;
38803
+ let typeFilter = column.filterType;
38804
+ if (!typeFilter) {
38805
+ if (column.type === 'numeric') {
38806
+ typeFilter = 'numeric';
38807
+ }
38808
+ else if (column.type === 'date' || column.type === 'datetime') {
38809
+ typeFilter = 'date';
38810
+ }
38811
+ else if (column.type === 'select') {
38812
+ typeFilter = 'select';
38813
+ }
38814
+ else {
38815
+ typeFilter = 'text';
38816
+ }
38817
+ }
38818
+ const handleSave = (typeFilter, filterValue, operator) => {
38819
+ if (!typeFilter && !filterValue) {
38820
+ changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
38821
+ setOpenFilter(false);
38822
+ return;
38823
+ }
38824
+ if (typeFilter === 'date') {
38825
+ const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal');
38826
+ if (from) {
38827
+ from.value = filterValue?.from;
38828
+ }
38829
+ else {
38830
+ filterBy.push({ key: fieldFilter, ope: 'greaterthanorequal', value: filterValue?.from });
38831
+ }
38832
+ const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal');
38833
+ if (to) {
38834
+ to.value = filterValue?.to;
38835
+ }
38836
+ else {
38837
+ filterBy.push({ key: fieldFilter, ope: 'lessthanorequal', value: filterValue?.to });
38838
+ }
38839
+ }
38840
+ else {
38841
+ const filter = filterBy.find((item) => item.key === fieldFilter);
38842
+ if (filter) {
38843
+ filter.ope = operator ?? 'equal';
38844
+ filter.value = filterValue ?? '';
38845
+ }
38846
+ else {
38847
+ filterBy.push({ key: fieldFilter, ope: operator ?? 'equal', value: filterValue ?? '' });
38848
+ }
38849
+ }
38850
+ changeFilter([...filterBy]);
38851
+ setOpenFilter(false);
38852
+ };
38853
+ /* eslint-disable */
38854
+ switch (typeFilter) {
38855
+ case 'text':
38856
+ return jsxRuntime.jsx(StringFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
38857
+ case 'numeric':
38858
+ return jsxRuntime.jsx(NumberFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave, formatSetting: formatSetting });
38859
+ case 'select':
38860
+ return jsxRuntime.jsx(SelectFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
38861
+ case 'date':
38862
+ return jsxRuntime.jsx(DateRangeFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
38863
+ default:
38864
+ return jsxRuntime.jsx("div", { children: t('No filter available') });
38865
+ }
38866
+ /* eslint-enable */
38867
+ };
38868
+ const StringFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
38869
+ const { t } = reactI18next.useTranslation();
38870
+ const filter = filterBy.find((item) => item.key === fieldFilter);
38871
+ const [operator, setOperator] = React$5.useState(filter?.ope ?? 'contains');
38872
+ const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
38873
+ const options = [
38874
+ { label: 'Bắt đầu bởi', value: 'startswith' },
38875
+ { label: 'Kết thúc bởi', value: 'endswith' },
38876
+ { label: 'Chứa', value: 'contains' },
38877
+ { label: 'Bằng', value: 'equal' },
38878
+ { label: 'Không bằng', value: 'notequal' }
38879
+ ];
38880
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
38881
+ if (e.code === 'Enter' || e.code === 'NumpadEnter') {
38882
+ setTimeout(() => {
38883
+ handleSave('text', valueFilter, operator);
38884
+ }, 100);
38885
+ e.stopPropagation();
38886
+ }
38887
+ }, children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
38888
+ setOperator(val.value);
38889
+ }, placeholder: "Select" }), jsxRuntime.jsx(Input$1, { className: "my-1", value: valueFilter, onChange: (val) => {
38890
+ setValueFilter(val.target.value);
38891
+ } }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('text', valueFilter, operator), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
38892
+ };
38893
+ const NumberFilterComponent = ({ column, filterBy, fieldFilter, handleSave, formatSetting }) => {
38894
+ const { t } = reactI18next.useTranslation();
38895
+ const filter = filterBy.find((item) => item.key === fieldFilter);
38896
+ const [operator, setOperator] = React$5.useState(filter?.ope ?? 'equal');
38897
+ const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
38898
+ const options = [
38899
+ { label: 'Lớn hơn', value: 'greaterthan' },
38900
+ { label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
38901
+ { label: 'Bằng', value: 'equal' },
38902
+ { label: 'Bé hơn', value: 'lessthan' },
38903
+ { label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
38904
+ ];
38905
+ const numericFormatProps = {
38906
+ value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
38907
+ thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
38908
+ decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
38909
+ allowNegative: column.numericSettings?.allowNegative ?? false,
38910
+ decimalScale: column.numericSettings?.fraction ?? 0
38911
+ };
38912
+ let floatValue = parseFloat(valueFilter ?? '0');
38913
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
38914
+ if (e.code === 'Enter' || e.code === 'NumpadEnter') {
38915
+ setTimeout(() => {
38916
+ handleSave('numeric', valueFilter, operator);
38917
+ }, 100);
38918
+ e.stopPropagation();
38919
+ }
38920
+ }, children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
38921
+ setOperator(val.value);
38922
+ }, placeholder: t('Select') }), jsxRuntime.jsx(NumericFormat, { style: { textAlign: column.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(valueFilter, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', column.numericSettings?.fraction), className: classNames$1('form-control my-1 input-numeric'), onValueChange: (values) => {
38923
+ floatValue = values?.floatValue;
38924
+ }, onFocus: (e) => {
38925
+ e.target.setSelectionRange(0, e.target.innerText.length - 1);
38926
+ }, onBlur: () => {
38927
+ if (floatValue !== valueFilter) {
38928
+ setValueFilter(!isNaN(floatValue) ? floatValue : 0);
38929
+ }
38930
+ } }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('numeric', valueFilter, operator), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
38931
+ };
38932
+ const SelectFilterComponent = ({ column, filterBy, handleSave, fieldFilter, optionsFilter }) => {
38933
+ const { t } = reactI18next.useTranslation();
38934
+ const filter = filterBy.find((item) => item.key === fieldFilter);
38935
+ const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
38936
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
38937
+ if (e.code === 'Enter' || e.code === 'NumpadEnter') {
38938
+ setTimeout(() => {
38939
+ handleSave('select', valueFilter, 'equal');
38940
+ }, 100);
38941
+ e.stopPropagation();
38942
+ }
38943
+ }, children: [jsxRuntime.jsx("div", { className: "mb-1", children: jsxRuntime.jsx(SelectTable, { value: optionsFilter ? optionsFilter[column.fieldFilter ?? column.field]?.find((x) => x.value === valueFilter) : undefined, options: (optionsFilter && optionsFilter[column.fieldFilter ?? column.field]) ?? [], isClearable: true, onChange: (val) => {
38944
+ setValueFilter(val?.value);
38945
+ }, placeholder: t('Select') }) }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('select', valueFilter, 'equal'), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
38946
+ };
38947
+ const DateRangeFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
38948
+ const { t } = reactI18next.useTranslation();
38949
+ const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal')?.value;
38950
+ const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal')?.value;
38951
+ const [valueFilter, setValueFilter] = React$5.useState({ from: from ?? undefined, to: to ?? undefined });
38952
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
38953
+ if (e.code === 'Enter' || e.code === 'NumpadEnter') {
38954
+ setTimeout(() => {
38955
+ handleSave('date', valueFilter);
38956
+ }, 100);
38957
+ e.stopPropagation();
38958
+ }
38959
+ }, children: [jsxRuntime.jsx("div", { className: "mb-1", children: jsxRuntime.jsx(DateRangePicker, { dateFormat: "dd/MM/yyyy", value: valueFilter, onChange: (date) => {
38960
+ setValueFilter(date);
38961
+ } }) }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('date', valueFilter), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
38962
+ };
38963
+
38964
+ const HeaderTableCol = (props) => {
38618
38965
  const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objHeaderWidthFixLeft, objHeaderWidthFixRight, totalCount, selectedRows, columns, orderBy, changeFilter, filterBy, changeOrder, allowFiltering, allowSorting, container, fisrtObjWidthFixRight, lastObjWidthFixLeft, setContentColumns, formatSetting, optionsFilter, idTable, isMulti } = props;
38619
38966
  const { t } = reactI18next.useTranslation();
38620
38967
  const headerRef = React$5.useRef(null);
38621
38968
  const order = orderBy.find((item) => item.key === col.field);
38622
38969
  const [openFilter, setOpenFilter] = React$5.useState(false);
38623
38970
  const filter = filterBy.find((item) => item.key === col.field);
38624
- const herderContent = col.headerDisplay ?? (col.headerText ?? '');
38971
+ const herderContent = col.headerDisplay ?? col.headerText ?? '';
38625
38972
  const handleResize = (e, { size }) => {
38626
38973
  if (size.width > 50) {
38627
38974
  const newColumns = [...columns];
@@ -38634,7 +38981,7 @@ const HeaderTableCol$1 = (props) => {
38634
38981
  const checkOverflow = () => {
38635
38982
  return headerRef.current && headerRef.current.scrollHeight > headerRef.current.clientHeight;
38636
38983
  };
38637
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: true }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : 1, colSpan: col.columns?.filter(x => x.visible !== false)?.length ?? 1, className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
38984
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? '').replaceAll(new RegExp(`[^0-9]`, 'g'), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: true }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : 1, colSpan: col.columns?.filter((x) => x.visible !== false)?.length ?? 1, className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
38638
38985
  top: `${indexParent * 42}px`,
38639
38986
  left: col.fixedType === 'left' ? objHeaderWidthFixLeft[`${indexParent}-${indexCol ?? 0}`] : undefined,
38640
38987
  right: col.fixedType === 'right' ? objHeaderWidthFixRight[`${indexParent}-${indexCol ?? 0}`] : undefined
@@ -38655,96 +39002,23 @@ const HeaderTableCol$1 = (props) => {
38655
39002
  }, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting }), children: [col.field === 'checkbox' && (jsxRuntime.jsx(Input$1, { checked: !!(totalCount > 0 && selectedRows?.length >= totalCount), type: "checkbox", className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: col.textAlign ?? 'left', marginTop: 6 }, onChange: (e) => {
38656
39003
  if (selectEnable) {
38657
39004
  if (e.target.checked) {
38658
- setSelectedRows(dataSource.map((item) => { return item; }));
39005
+ setSelectedRows(dataSource.map((item) => {
39006
+ return item;
39007
+ }));
38659
39008
  }
38660
39009
  else {
38661
39010
  setSelectedRows([]);
38662
39011
  }
38663
39012
  }
38664
- } })), col.field !== 'checkbox' && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'header-content', style: { justifyContent: col.textAlign ?? 'left' }, children: [jsxRuntime.jsx("span", { id: `header-${idTable}-${indexParent}-${indexCol}`, ref: headerRef, className: 'text-content', children: t(herderContent) }), checkOverflow() && jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `header-${idTable}-${indexParent}-${indexCol}`, children: t(herderContent) })] }), col.field !== '#' && col.field !== 'command' && jsxRuntime.jsxs("div", { className: 'd-flex', children: [allowSorting && order?.direction === 'asc' && jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: 'ms-25', width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_6)", children: jsxRuntime.jsx("path", { d: "M8.70711 0.292893C8.31658 -0.0976311 7.68342 -0.0976311 7.29289 0.292893L0.928932 6.65685C0.538408 7.04738 0.538408 7.68054 0.928932 8.07107C1.31946 8.46159 1.95262 8.46159 2.34315 8.07107L8 2.41421L13.6569 8.07107C14.0474 8.46159 14.6805 8.46159 15.0711 8.07107C15.4616 7.68054 15.4616 7.04738 15.0711 6.65685L8.70711 0.292893ZM8 18H9L9 1H8H7L7 18H8Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_6", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] }), allowSorting && order?.direction === 'desc' && jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: 'ms-25', width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_2)", children: jsxRuntime.jsx("path", { d: "M7.29289 17.7071C7.68342 18.0976 8.31658 18.0976 8.70711 17.7071L15.0711 11.3431C15.4616 10.9526 15.4616 10.3195 15.0711 9.92893C14.6805 9.53841 14.0474 9.53841 13.6569 9.92893L8 15.5858L2.34315 9.92893C1.95262 9.53841 1.31946 9.53841 0.928932 9.92893C0.538408 10.3195 0.538408 10.9526 0.928932 11.3431L7.29289 17.7071ZM8 0L7 0L7 17H8H9L9 0L8 0Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_2", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] }), allowFiltering && (col.columns?.length ?? 0) === 0 && col.allowFilter !== false && jsxRuntime.jsxs(Dropdown$1$1, { isOpen: openFilter, toggle: (e) => {
39013
+ } })), col.field !== 'checkbox' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "header-content", style: { justifyContent: col.textAlign ?? 'left' }, children: [jsxRuntime.jsx("span", { id: `header-${idTable}-${indexParent}-${indexCol}`, ref: headerRef, className: "text-content", children: t(herderContent) }), checkOverflow() && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `header-${idTable}-${indexParent}-${indexCol}`, children: t(herderContent) }))] }), col.field !== '#' && col.field !== 'command' && (jsxRuntime.jsxs("div", { className: "d-flex", children: [allowSorting && order?.direction === 'asc' && (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_6)", children: jsxRuntime.jsx("path", { d: "M8.70711 0.292893C8.31658 -0.0976311 7.68342 -0.0976311 7.29289 0.292893L0.928932 6.65685C0.538408 7.04738 0.538408 7.68054 0.928932 8.07107C1.31946 8.46159 1.95262 8.46159 2.34315 8.07107L8 2.41421L13.6569 8.07107C14.0474 8.46159 14.6805 8.46159 15.0711 8.07107C15.4616 7.68054 15.4616 7.04738 15.0711 6.65685L8.70711 0.292893ZM8 18H9L9 1H8H7L7 18H8Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_6", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowSorting && order?.direction === 'desc' && (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_2)", children: jsxRuntime.jsx("path", { d: "M7.29289 17.7071C7.68342 18.0976 8.31658 18.0976 8.70711 17.7071L15.0711 11.3431C15.4616 10.9526 15.4616 10.3195 15.0711 9.92893C14.6805 9.53841 14.0474 9.53841 13.6569 9.92893L8 15.5858L2.34315 9.92893C1.95262 9.53841 1.31946 9.53841 0.928932 9.92893C0.538408 10.3195 0.538408 10.9526 0.928932 11.3431L7.29289 17.7071ZM8 0L7 0L7 17H8H9L9 0L8 0Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_2", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowFiltering && (col.columns?.length ?? 0) === 0 && col.allowFilter !== false && (jsxRuntime.jsxs(Dropdown$1$1, { isOpen: openFilter, toggle: (e) => {
38665
39014
  setOpenFilter(!openFilter);
38666
39015
  e.stopPropagation();
38667
39016
  }, onClick: (e) => {
38668
39017
  e.stopPropagation();
38669
- }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', className: 'p-0 r-filter', children: jsxRuntime.jsxs("svg", { className: classNames$1('cursor-pointer ms-25', { active: filter }), width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "stroke-width": "1.5", "font-size": "12", children: [jsxRuntime.jsx("path", { d: "M14.7 11.998v10.506c.052.4-.08.826-.381 1.106a1.306 1.306 0 0 1-.925.39 1.289 1.289 0 0 1-.926-.39l-2.637-2.68a1.323 1.323 0 0 1-.38-1.106v-7.826h-.04L1.85 2.16A1.348 1.348 0 0 1 2.076.293C2.325.107 2.6 0 2.888 0h18.373c.289 0 .564.107.814.293a1.348 1.348 0 0 1 .223 1.866L14.738 12H14.7Z", fill: "currentColor" }), " "] }) }), jsxRuntime.jsx(DropdownMenu$1, { container: container, className: 'formula-dropdown icon-dropdown p-0', style: {
39018
+ }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", className: "p-0 r-filter", children: jsxRuntime.jsxs("svg", { className: classNames$1('cursor-pointer ms-25', { active: filter }), width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "stroke-width": "1.5", "font-size": "12", children: [jsxRuntime.jsx("path", { d: "M14.7 11.998v10.506c.052.4-.08.826-.381 1.106a1.306 1.306 0 0 1-.925.39 1.289 1.289 0 0 1-.926-.39l-2.637-2.68a1.323 1.323 0 0 1-.38-1.106v-7.826h-.04L1.85 2.16A1.348 1.348 0 0 1 2.076.293C2.325.107 2.6 0 2.888 0h18.373c.289 0 .564.107.814.293a1.348 1.348 0 0 1 .223 1.866L14.738 12H14.7Z", fill: "currentColor" }), ' '] }) }), jsxRuntime.jsx(DropdownMenu$1, { container: container, className: "formula-dropdown icon-dropdown p-0", style: {
38670
39019
  borderRadius: 8,
38671
39020
  zIndex: 1056
38672
- }, children: jsxRuntime.jsx(DropdownItem$1, { className: 'p-1', style: { borderRadius: '6px' }, tag: 'div', header: true, children: jsxRuntime.jsx(RenderFilterElement, { setOpenFilter: setOpenFilter, filter: filter, filterBy: filterBy, optionsFilter: optionsFilter, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] })] })] })] }) }) })) }, `header-${indexCol}`));
38673
- };
38674
- const RenderFilterElement = ({ filter, optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
38675
- const { t } = reactI18next.useTranslation();
38676
- const [operator, setOperator] = React$5.useState(filter?.ope ?? ((!column.filterType && column.type === 'numeric') || column.filterType === 'select' ? 'equal' : 'contains'));
38677
- const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
38678
- const fieldFilter = column.fieldFilter ?? column.field;
38679
- const RenderStringFilter = () => {
38680
- const options = [
38681
- { label: 'Bắt đầu bởi', value: 'startswith' },
38682
- { label: 'Kết thúc bởi', value: 'endswith' },
38683
- { label: 'Chứa', value: 'contains' },
38684
- { label: 'Bằng', value: 'equal' },
38685
- { label: 'Không bằng', value: 'notequal' }
38686
- ];
38687
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
38688
- setOperator(val.value);
38689
- }, placeholder: 'Select' }), jsxRuntime.jsx(Input$1, { className: 'my-1', value: valueFilter, onChange: (val) => {
38690
- setValueFilter(val.target.value);
38691
- } })] }));
38692
- };
38693
- const RenderNumberFilter = () => {
38694
- const options = [
38695
- { label: 'Lớn hơn', value: 'greaterthan' },
38696
- { label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
38697
- { label: 'Bằng', value: 'equal' },
38698
- { label: 'Bé hơn', value: 'lessthan' },
38699
- { label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
38700
- ];
38701
- const numericFormatProps = {
38702
- value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
38703
- thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
38704
- decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
38705
- allowNegative: column.numericSettings?.allowNegative ?? false,
38706
- decimalScale: column.numericSettings?.fraction ?? 0
38707
- };
38708
- let floatValue = parseFloat(valueFilter ?? '0');
38709
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
38710
- setOperator(val.value);
38711
- }, placeholder: t('Select') }), jsxRuntime.jsx(NumericFormat, { style: { textAlign: column.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(valueFilter, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', column.numericSettings?.fraction), className: classNames$1('form-control my-1 input-numeric'), onValueChange: (values) => {
38712
- floatValue = values?.floatValue;
38713
- }, onFocus: (e) => {
38714
- e.target.setSelectionRange(0, e.target.innerText.length - 1);
38715
- }, onBlur: () => {
38716
- if (floatValue !== valueFilter) {
38717
- setValueFilter(!isNaN(floatValue) ? floatValue : 0);
38718
- }
38719
- } })] }));
38720
- };
38721
- const RenderSelectFilter = () => {
38722
- return (jsxRuntime.jsx("div", { className: 'mb-1', children: jsxRuntime.jsx(SelectTable, { value: optionsFilter ? optionsFilter[fieldFilter]?.find((x) => x.value === valueFilter) : undefined, options: (optionsFilter && optionsFilter[fieldFilter]) ?? [], isClearable: true, onChange: (val) => {
38723
- setValueFilter(val?.value);
38724
- }, placeholder: t('Select') }) }));
38725
- };
38726
- const handleSave = () => {
38727
- if (filter) {
38728
- filter.ope = operator;
38729
- filter.value = valueFilter ?? '';
38730
- }
38731
- else {
38732
- filterBy.push({ key: fieldFilter, ope: operator, value: valueFilter ?? '' });
38733
- }
38734
- changeFilter([...filterBy]);
38735
- setOpenFilter(false);
38736
- };
38737
- return (jsxRuntime.jsxs("div", { className: 'r-filter-popup', onKeyDown: (e) => {
38738
- if (e.code === 'Enter' || e.code === 'NumpadEnter') {
38739
- handleSave();
38740
- e.stopPropagation();
38741
- }
38742
- }, children: [((!column.filterType && column.type === 'numeric') || column.filterType === 'numeric') ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderNumberFilter(), " "] }) : (column.filterType === 'select' ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" ", RenderSelectFilter(), " "] }) : RenderStringFilter()), jsxRuntime.jsxs("div", { className: 'd-flex justify-content-end', children: [jsxRuntime.jsx(Button$1$1, { color: 'primary', style: { borderRadius: 3 }, className: 'me-50 py-25 px-50 fw-bold', onClick: handleSave, children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: 'py-25 px-50 fw-bold', color: 'white', style: { borderRadius: 3, borderWidth: 0 }, onClick: () => {
38743
- if (filterBy) {
38744
- changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
38745
- }
38746
- setOpenFilter(false);
38747
- }, children: t('Clear') })] })] }));
39021
+ }, children: jsxRuntime.jsx(DropdownItem$1, { className: "p-1", style: { borderRadius: '6px' }, tag: "div", header: true, children: jsxRuntime.jsx(FilterComponent, { setOpenFilter: setOpenFilter, filterBy: filterBy, optionsFilter: optionsFilter, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] }))] }))] }))] }) }) })) }, `header-${indexCol}`));
38748
39022
  };
38749
39023
 
38750
39024
  const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, visibleColumns, selectedRows, setSelectedRows, selectedCell, startCell, editCell, gridRef, objHeaderWidthFixLeft, objHeaderWidthFixRight, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight, totalCount, isMulti, selectEnable, editDisable, addDisable, defaultValue, fieldKey, fieldUniKey, formatSetting, toolbarSetting, buttonSetting, containerRef, handleDataChange, changeDataSource, handleCommandClick, handleDuplicate, handleKeyDown, onDuplicate, setSelectedCell, setStartCell, focusEditElementCell, setContentColumns, handeCopyCell, isCopying, typeDragging, rowChange, visibleContentColumns, filterBy, setFilterBy, orderBy, setOrderBy, optionsFilter, allowFiltering, allowSorting, searchSetting, searchTerm, searchClient, height, rowHeight, haveSum }) => {
@@ -38757,7 +39031,7 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
38757
39031
  const visibleCount = Math.ceil(height / rowHeight) + 5; // buffer
38758
39032
  const startIndex = Math.floor(scrollTop / rowHeight);
38759
39033
  const endIndex = Math.min(startIndex + visibleCount, filteredData.length);
38760
- const offsetY = (startIndex * rowHeight);
39034
+ const offsetY = startIndex * rowHeight;
38761
39035
  const rafId = React$5.useRef(null);
38762
39036
  React$5.useEffect(() => {
38763
39037
  const el = containerRef.current;
@@ -38772,17 +39046,17 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
38772
39046
  setScrollTop(el.scrollTop);
38773
39047
  });
38774
39048
  };
38775
- el.addEventListener("scroll", onScroll);
39049
+ el.addEventListener('scroll', onScroll);
38776
39050
  return () => {
38777
- el.removeEventListener("scroll", onScroll);
39051
+ el.removeEventListener('scroll', onScroll);
38778
39052
  if (rafId.current) {
38779
39053
  cancelAnimationFrame(rafId.current);
38780
39054
  }
38781
39055
  };
38782
39056
  }, []);
38783
- return (jsxRuntime.jsx("div", { ref: containerRef, className: "r-gridtable", style: { maxHeight: `${height ? `${height}px` : "auto"}` }, children: jsxRuntime.jsxs("table", { style: { width: "100%" }, role: "presentation", children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: visibleColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((element, indexParent) => {
39057
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: "r-gridtable", style: { maxHeight: `${height ? `${height}px` : 'auto'}` }, children: jsxRuntime.jsxs("table", { style: { width: '100%' }, role: "presentation", children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: visibleColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((element, indexParent) => {
38784
39058
  return (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
38785
- return (jsxRuntime.jsx(HeaderTableCol$1, { col: col, idTable: idTable ?? "", dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: containerRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: optionsFilter, allowFiltering: allowFiltering, allowSorting: allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
39059
+ return (jsxRuntime.jsx(HeaderTableCol, { col: col, idTable: idTable ?? '', dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: containerRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: optionsFilter, allowFiltering: allowFiltering, allowSorting: allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
38786
39060
  setFilterBy([...val]);
38787
39061
  }, changeOrder: (val) => {
38788
39062
  setOrderBy([...val]);
@@ -38791,10 +39065,10 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
38791
39065
  }) }), jsxRuntime.jsxs("tbody", { className: "r-gridcontent", role: "rowgroup", children: [jsxRuntime.jsx("tr", { style: { height: offsetY } }), filteredData.slice(startIndex, endIndex).map((row) => {
38792
39066
  const indexRow = row.indexRow;
38793
39067
  const isSelected = selectedRows?.some((x) => x[fieldKey] === row.data[fieldKey]);
38794
- return (jsxRuntime.jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1("r-row"), children: contentColumns.map((col, indexCol) => jsxRuntime.jsx(CellComponent, { col: col, row: row.data, idTable: idTable, gridRef: gridRef, indexRow: indexRow, indexCol: indexCol, isSelected: isSelected, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, selectedCell: selectedCell, startCell: startCell, editCell: editCell, editDisable: editDisable, addDisable: addDisable, fieldKey: fieldKey, defaultValue: defaultValue, dataSource: dataSource, formatSetting: formatSetting, selectEnable: selectEnable, isMulti: isMulti, selectedRows: selectedRows, containerRef: containerRef, totalCount: totalCount, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, fieldUniKey: fieldUniKey, handleDataChange: handleDataChange, changeDataSource: changeDataSource, setSelectedRows: setSelectedRows, handleCommandClick: handleCommandClick, handleDuplicate: handleDuplicate, handleKeyDown: handleKeyDown, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, handeCopyCell: handeCopyCell, isCopying: isCopying, typeDragging: typeDragging, contentColumns: contentColumns, rowChange: rowChange, visibleContentColumns: visibleContentColumns })) }, row.data[fieldKey] ?? indexRow));
38795
- }), jsxRuntime.jsx("tr", { style: { height: totalHeight - (endIndex * rowHeight) } })] }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: haveSum && jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, index) => {
38796
- return (jsxRuntime.jsx(FooterCol, { col: col, dataSource: dataSource, indexCol: index, objWidthFix: { ...objWidthFixLeft, ...objWidthFixRight }, formatSetting: formatSetting }));
38797
- }) }) })] }) }));
39068
+ return (jsxRuntime.jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1('r-row'), children: contentColumns.map((col, indexCol) => (jsxRuntime.jsx(CellComponent, { col: col, row: row.data, idTable: idTable, gridRef: gridRef, indexRow: indexRow, indexCol: indexCol, isSelected: isSelected, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, selectedCell: selectedCell, startCell: startCell, editCell: editCell, editDisable: editDisable, addDisable: addDisable, fieldKey: fieldKey, defaultValue: defaultValue, dataSource: dataSource, formatSetting: formatSetting, selectEnable: selectEnable, isMulti: isMulti, selectedRows: selectedRows, containerRef: containerRef, totalCount: totalCount, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, fieldUniKey: fieldUniKey, handleDataChange: handleDataChange, changeDataSource: changeDataSource, setSelectedRows: setSelectedRows, handleCommandClick: handleCommandClick, handleDuplicate: handleDuplicate, handleKeyDown: handleKeyDown, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, handeCopyCell: handeCopyCell, isCopying: isCopying, typeDragging: typeDragging, contentColumns: contentColumns, rowChange: rowChange, visibleContentColumns: visibleContentColumns }))) }, row.data[fieldKey] ?? indexRow));
39069
+ }), jsxRuntime.jsx("tr", { style: { height: totalHeight - endIndex * rowHeight } })] }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: haveSum && (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, index) => {
39070
+ return jsxRuntime.jsx(FooterCol, { col: col, dataSource: dataSource, indexCol: index, objWidthFix: { ...objWidthFixLeft, ...objWidthFixRight }, formatSetting: formatSetting });
39071
+ }) })) })] }) }));
38798
39072
  };
38799
39073
 
38800
39074
  const handleArrowRight = (e, params) => {
@@ -39909,7 +40183,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
39909
40183
  }
39910
40184
  }
39911
40185
  };
39912
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-table-edit", children: [jsxRuntime.jsxs("div", { className: "r-grid", ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption, setOpenPopupSetupColumn: setOpenPopupSetupColumn }), jsxRuntime.jsx(TableComponent, { idTable: idTable, height: height, dataSource: dataSource, contentColumns: contentColumns, headerColumns: headerColumns, visibleColumns: visibleColumns, selectedRows: selectedRows, setSelectedRows: setSelectedRows, selectedCell: selectedCell, startCell: startCell, editCell: editCell, gridRef: gridRef, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, totalCount: totalCount, isMulti: isMulti, selectEnable: selectEnable, editDisable: editDisable, addDisable: addDisable, defaultValue: defaultValue, fieldKey: fieldKey, fieldUniKey: fieldUniKey, formatSetting: formatSetting, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, containerRef: containerRef, optionsFilter: optionsFilter, allowFiltering: allowFiltering, allowSorting: allowSorting, searchSetting: searchSetting, searchTerm: searchTerm, haveSum: haveSum, isCopying: isCopying, typeDragging: typeDragging, visibleContentColumns: visibleContentColumns, rowHeight: rowHeight, changeDataSource: changeDataSource, handleCommandClick: handleCommandClick, handleKeyDown: handleKeyDown, handeCopyCell: handeCopyCell, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, rowChange: rowChange, filterBy: filterBy, setFilterBy: setFilterBy, orderBy: orderBy, setOrderBy: setOrderBy, searchClient: searchClient, handleDataChange: handleDataChange, handleDuplicate: () => {
40186
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-table-edit", children: [jsxRuntime.jsxs("div", { className: "r-grid", ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsx(TableComponent, { idTable: idTable, height: height, dataSource: dataSource, contentColumns: contentColumns, headerColumns: headerColumns, visibleColumns: visibleColumns, selectedRows: selectedRows, setSelectedRows: setSelectedRows, selectedCell: selectedCell, startCell: startCell, editCell: editCell, gridRef: gridRef, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, totalCount: totalCount, isMulti: isMulti, selectEnable: selectEnable, editDisable: editDisable, addDisable: addDisable, defaultValue: defaultValue, fieldKey: fieldKey, fieldUniKey: fieldUniKey, formatSetting: formatSetting, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, containerRef: containerRef, optionsFilter: optionsFilter, allowFiltering: allowFiltering, allowSorting: allowSorting, searchSetting: searchSetting, searchTerm: searchTerm, haveSum: haveSum, isCopying: isCopying, typeDragging: typeDragging, visibleContentColumns: visibleContentColumns, rowHeight: rowHeight, changeDataSource: changeDataSource, handleCommandClick: handleCommandClick, handleKeyDown: handleKeyDown, handeCopyCell: handeCopyCell, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, rowChange: rowChange, filterBy: filterBy, setFilterBy: setFilterBy, orderBy: orderBy, setOrderBy: setOrderBy, searchClient: searchClient, handleDataChange: handleDataChange, handleDuplicate: () => {
39913
40187
  handleDuplicate(dataSource, startCell.row, fieldKey, defaultValue, fieldUniKey, changeDataSource, containerRef, totalCount, toolbarSetting, buttonSetting, editDisable, addDisable, onDuplicate);
39914
40188
  }, setContentColumns: (newColumns) => {
39915
40189
  setContentColumns(newColumns);
@@ -68337,6 +68611,27 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
68337
68611
  }) }) }), jsxRuntime.jsx("div", { onClick: () => handleScroll(200), className: classNames$1('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronRight, {}) })] })] }));
68338
68612
  };
68339
68613
 
68614
+ const ExpandAllIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
68615
+ return (jsxRuntime.jsx("svg", { className: className ?? '', xmlns: "http://www.w3.org/2000/svg", color: color, fill: "currentColor", version: "1.1", id: "mdi-expand-all", width: size, height: size, viewBox: "0 0 24 24", style: {
68616
+ userSelect: 'none',
68617
+ ...style
68618
+ }, onClick: onClick, children: jsxRuntime.jsx("path", { d: "M18,8H8V18H6V8A2,2 0 0,1 8,6H18V8M14,2H4A2,2 0 0,0 2,4V14H4V4H14V2M22,12V20A2,2 0 0,1 20,22H12A2,2 0 0,1 10,20V12A2,2 0 0,1 12,10H20A2,2 0 0,1 22,12M20,15H17V12H15V15H12V17H15V20H17V17H20V15Z" }) }));
68619
+ };
68620
+
68621
+ const GroupIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
68622
+ return (jsxRuntime.jsxs("svg", { className: className ?? '', xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", color: color, fill: "none", style: {
68623
+ userSelect: 'none',
68624
+ ...style
68625
+ }, onClick: onClick, children: [jsxRuntime.jsx("rect", { x: "1", y: "11", width: "8", height: "2", rx: "0.8", fill: "currentColor" }), jsxRuntime.jsx("rect", { x: "4", y: "8", width: "2", height: "8", rx: "0.8", fill: "currentColor" }), jsxRuntime.jsx("mask", { id: "path-3-inside-1_547_22", fill: "white", children: jsxRuntime.jsx("rect", { x: "11", y: "17", width: "12", height: "5", rx: "1" }) }), jsxRuntime.jsx("rect", { x: "11", y: "17", width: "12", height: "5", rx: "1", stroke: "currentColor", "stroke-width": "4", mask: "url(#path-3-inside-1_547_22)" }), jsxRuntime.jsx("mask", { id: "path-4-inside-2_547_22", fill: "white", children: jsxRuntime.jsx("rect", { x: "11", y: "8", width: "12", height: "8", rx: "1" }) }), jsxRuntime.jsx("rect", { x: "11", y: "8", width: "12", height: "8", rx: "1", stroke: "currentColor", "stroke-width": "4", mask: "url(#path-4-inside-2_547_22)" }), jsxRuntime.jsx("mask", { id: "path-5-inside-3_547_22", fill: "white", children: jsxRuntime.jsx("rect", { x: "11", y: "2", width: "12", height: "5", rx: "1" }) }), jsxRuntime.jsx("rect", { x: "11", y: "2", width: "12", height: "5", rx: "1", stroke: "currentColor", "stroke-width": "4", mask: "url(#path-5-inside-3_547_22)" })] }));
68626
+ };
68627
+
68628
+ const UnExpandAllIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
68629
+ return (jsxRuntime.jsxs("svg", { className: className ?? '', xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", color: color, fill: "currentColor", style: {
68630
+ userSelect: 'none',
68631
+ ...style
68632
+ }, onClick: onClick, children: [jsxRuntime.jsx("path", { d: "M18 8H8V18H6V8C6 7.46957 6.21071 6.96086 6.58579 6.58579C6.96086 6.21071 7.46957 6 8 6H18V8ZM14 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4V14H4V4H14V2ZM22 12V20C22 20.5304 21.7893 21.0391 21.4142 21.4142C21.0391 21.7893 20.5304 22 20 22H12C11.4696 22 10.9609 21.7893 10.5858 21.4142C10.2107 21.0391 10 20.5304 10 20V12C10 11.4696 10.2107 10.9609 10.5858 10.5858C10.9609 10.2107 11.4696 10 12 10H20C20.5304 10 21.0391 10.2107 21.4142 10.5858C21.7893 10.9609 22 11.4696 22 12ZM20 15H17V12H15V15H12V17H15V20H17V17H20V15Z", fill: "currentColor" }), jsxRuntime.jsx("rect", { x: "14", y: "11", width: "4", height: "4", fill: "currentColor" }), jsxRuntime.jsx("rect", { x: "14", y: "17", width: "4", height: "4", fill: "currentColor" })] }));
68633
+ };
68634
+
68340
68635
  const RenderContentCol = (props) => {
68341
68636
  const { col, indexCol, indexRow, isSelected, row, formatSetting, idTable, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, selectedRows, selectEnable, setSelectedRows, fieldKey, isMulti } = props;
68342
68637
  const RenderElement = () => {
@@ -68381,10 +68676,10 @@ const RenderContentCol = (props) => {
68381
68676
  }
68382
68677
  return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div'), children: jsxRuntime.jsxs("div", { className: classNames$1('r-rowcell-content'), style: {
68383
68678
  textAlign: col.textAlign ? col.textAlign : 'left'
68384
- }, children: [jsxRuntime.jsx("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value) }), col.haveToolTip && jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value) })] }) }));
68679
+ }, children: [jsxRuntime.jsx("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value }), col.haveToolTip && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value }))] }) }));
68385
68680
  }
68386
68681
  };
68387
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: (col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': isSelected }), style: {
68682
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: col.visible !== false && (jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': isSelected }), style: {
68388
68683
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
68389
68684
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined
68390
68685
  }, onClick: (e) => {
@@ -68411,375 +68706,10 @@ const RenderContentCol = (props) => {
68411
68706
  }
68412
68707
  e.stopPropagation();
68413
68708
  }
68414
- }, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) });
68709
+ }, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
68415
68710
  };
68416
68711
 
68417
- const DateRangePicker = React$5.forwardRef((props, ref) => {
68418
- const { id, onKeyDown, className, invalid, container, onPaste, onChange, value } = props;
68419
- const dateFormat = props.dateFormat ?? 'dd/MM/yyyy';
68420
- const { from, to } = value || {};
68421
- const currentDate = new Date();
68422
- const { t } = reactI18next.useTranslation();
68423
- const [viewDateFrom, setViewDateFrom] = React$5.useState(from ? new Date(from) : currentDate);
68424
- const [viewDateTo, setViewDateTo] = React$5.useState(to ? new Date(to) : addMonths(currentDate, 1));
68425
- const [open, setOpen] = React$5.useState(false);
68426
- const formatDisplay = (f, t) => {
68427
- if (f && t) {
68428
- return `${formatDateTime(f, dateFormat)} - ${formatDateTime(t, dateFormat)}`;
68429
- }
68430
- if (f) {
68431
- return `${formatDateTime(f, dateFormat)} - `;
68432
- }
68433
- return '';
68434
- };
68435
- const [inputValue, setInputValue] = React$5.useState(formatDisplay(from, to));
68436
- const toggle = () => setOpen((prev) => !prev);
68437
- const handleSelect = (selected) => {
68438
- let newRange = { from, to };
68439
- if (!newRange.from || (selected && selected < newRange.from)) {
68440
- newRange = { from: selected, to };
68441
- setViewDateFrom(selected || currentDate);
68442
- }
68443
- else if (newRange.from && selected && selected > newRange.from && (!newRange.to || selected < newRange.to)) {
68444
- newRange = { from, to: selected };
68445
- setViewDateTo(selected || currentDate);
68446
- }
68447
- else if (newRange.to && selected && selected > newRange.to) {
68448
- newRange = { from, to: selected };
68449
- setViewDateTo(selected || currentDate);
68450
- }
68451
- onChange(newRange);
68452
- setInputValue(formatDisplay(newRange.from, newRange.to));
68453
- };
68454
- const handleChange = (e) => {
68455
- const v = e.target.value;
68456
- setInputValue(v);
68457
- const parts = v.split('-').map((p) => p.trim());
68458
- if (parts.length === 2 && parts[0].length === 10 && parts[1].length === 10) {
68459
- const parsedFrom = parse(parts[0], dateFormat, currentDate);
68460
- const parsedTo = parse(parts[1], dateFormat, currentDate);
68461
- if (!isNaN(parsedFrom.getTime()) && !isNaN(parsedTo.getTime())) {
68462
- onChange({ from: parsedFrom, to: parsedTo });
68463
- }
68464
- }
68465
- };
68466
- const optionsMonth = [
68467
- { value: 1, label: t('January') },
68468
- { value: 2, label: t('February') },
68469
- { value: 3, label: t('March') },
68470
- { value: 4, label: t('April') },
68471
- { value: 5, label: t('May') },
68472
- { value: 6, label: t('June') },
68473
- { value: 7, label: t('July') },
68474
- { value: 8, label: t('August') },
68475
- { value: 9, label: t('September') },
68476
- { value: 10, label: t('October') },
68477
- { value: 11, label: t('November') },
68478
- { value: 12, label: t('December') }
68479
- ];
68480
- const getMaskFromFormat = () => '99/99/9999 -> 99/99/9999';
68481
- return (jsxRuntime.jsx("div", { className: classNames$1('r-daterangepicker', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsxs(Dropdown$1$1, { className: className, isOpen: open, toggle: toggle, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", "data-toggle": "dropdown", "aria-expanded": open, className: "d-flex align-items-center", style: { cursor: 'pointer' }, children: jsxRuntime.jsx(InputMask, { mask: getMaskFromFormat(), value: inputValue, onChange: handleChange, placeholder: "dd/mm/yyyy -> dd/mm/yyyy", className: "form-control", style: { width: 230 }, onKeyDown: (e) => {
68482
- if (e.code === 'Space') {
68483
- setOpen(!open);
68484
- }
68485
- else if (onKeyDown) {
68486
- const rs = onKeyDown(e);
68487
- if (rs) {
68488
- setOpen(false);
68489
- }
68490
- }
68491
- }, onPaste: (e) => {
68492
- onPaste?.(e);
68493
- setOpen(false);
68494
- } }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: "r-datepicker-popup formula-dropdown icon-dropdown p-0", container: container, style: { position: 'fixed', borderRadius: 8, zIndex: 9999 }, children: [jsxRuntime.jsxs("div", { className: "d-flex", style: { padding: 10, gap: 20 }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: "select-month-year", children: [jsxRuntime.jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
68495
- const newDate = new Date(viewDateFrom);
68496
- newDate.setMonth(viewDateFrom.getMonth() - 1);
68497
- setViewDateFrom(newDate);
68498
- } }), jsxRuntime.jsxs("div", { className: "d-flex", children: [jsxRuntime.jsx("div", { className: "select-month", children: jsxRuntime.jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
68499
- const newMonth = parseInt(e.value, 10);
68500
- const newDate = new Date(viewDateFrom);
68501
- newDate.setMonth(newMonth - 1);
68502
- setViewDateFrom(newDate);
68503
- }, value: optionsMonth.find((x) => x.value === viewDateFrom.getMonth() + 1) }) }), jsxRuntime.jsx("div", { className: "select-year", children: jsxRuntime.jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
68504
- const newYear = parseInt(e.value, 10);
68505
- const newDate = new Date(viewDateFrom);
68506
- newDate.setFullYear(newYear);
68507
- setViewDateFrom(newDate);
68508
- }, value: { value: viewDateFrom.getFullYear(), label: viewDateFrom.getFullYear() } }) })] }), jsxRuntime.jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
68509
- const newDate = new Date(viewDateFrom);
68510
- newDate.setMonth(viewDateFrom.getMonth() + 1);
68511
- setViewDateFrom(newDate);
68512
- } })] }), jsxRuntime.jsx(DayPicker, { mode: "single", selected: from, onSelect: (d) => handleSelect(d), month: viewDateFrom, showOutsideDays: true, modifiers: {
68513
- inRange: (day) => !!(from && to && day && day > from && day < to),
68514
- rangeStart: from,
68515
- rangeEnd: to
68516
- }, modifiersClassNames: {
68517
- inRange: 'rdp-in-range',
68518
- rangeStart: 'rdp-selected',
68519
- rangeEnd: 'rdp-selected'
68520
- } })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: "select-month-year", children: [jsxRuntime.jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
68521
- const newDate = new Date(viewDateTo);
68522
- newDate.setMonth(viewDateTo.getMonth() - 1);
68523
- setViewDateTo(newDate);
68524
- } }), jsxRuntime.jsxs("div", { className: "d-flex", children: [jsxRuntime.jsx("div", { className: "select-month", children: jsxRuntime.jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
68525
- const newMonth = parseInt(e.value, 10);
68526
- const newDate = new Date(viewDateTo);
68527
- newDate.setMonth(newMonth - 1);
68528
- setViewDateTo(newDate);
68529
- }, value: optionsMonth.find((x) => x.value === viewDateTo.getMonth() + 1) }) }), jsxRuntime.jsx("div", { className: "select-year", children: jsxRuntime.jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
68530
- const newYear = parseInt(e.value, 10);
68531
- const newDate = new Date(viewDateTo);
68532
- newDate.setFullYear(newYear);
68533
- setViewDateTo(newDate);
68534
- }, value: { value: viewDateTo.getFullYear(), label: viewDateTo.getFullYear() } }) })] }), jsxRuntime.jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
68535
- const newDate = new Date(viewDateTo);
68536
- newDate.setMonth(viewDateTo.getMonth() + 1);
68537
- setViewDateTo(newDate);
68538
- } })] }), jsxRuntime.jsx(DayPicker, { mode: "single", selected: to, onSelect: (d) => handleSelect(d), month: viewDateTo, showOutsideDays: true, modifiers: {
68539
- inRange: (day) => !!(from && to && day && day > from && day < to),
68540
- rangeStart: from,
68541
- rangeEnd: to
68542
- }, modifiersClassNames: {
68543
- inRange: 'rdp-in-range',
68544
- rangeStart: 'rdp-selected',
68545
- rangeEnd: 'rdp-selected'
68546
- } })] })] }), jsxRuntime.jsxs("div", { className: "d-flex border-top ms-50", style: { gap: 20, paddingTop: 10 }, children: [jsxRuntime.jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Today') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Yesterday') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This week') }), jsxRuntime.jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This month') })] })] })] }) }));
68547
- });
68548
-
68549
- const FilterComponent = ({ optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
68550
- const { t } = reactI18next.useTranslation();
68551
- const fieldFilter = column.fieldFilter ?? column.field;
68552
- let typeFilter = column.filterType;
68553
- if (!typeFilter) {
68554
- if (column.type === 'numeric') {
68555
- typeFilter = 'numeric';
68556
- }
68557
- else if (column.type === 'date' || column.type === 'datetime') {
68558
- typeFilter = 'date';
68559
- }
68560
- else if (column.type === 'select') {
68561
- typeFilter = 'select';
68562
- }
68563
- else {
68564
- typeFilter = 'text';
68565
- }
68566
- }
68567
- const handleSave = (typeFilter, filterValue, operator) => {
68568
- if (!typeFilter && !filterValue) {
68569
- changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
68570
- setOpenFilter(false);
68571
- return;
68572
- }
68573
- if (typeFilter === 'date') {
68574
- const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal');
68575
- if (from) {
68576
- from.value = filterValue?.from;
68577
- }
68578
- else {
68579
- filterBy.push({ key: fieldFilter, ope: 'greaterthanorequal', value: filterValue?.from });
68580
- }
68581
- const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal');
68582
- if (to) {
68583
- to.value = filterValue?.to;
68584
- }
68585
- else {
68586
- filterBy.push({ key: fieldFilter, ope: 'lessthanorequal', value: filterValue?.to });
68587
- }
68588
- }
68589
- else {
68590
- const filter = filterBy.find((item) => item.key === fieldFilter);
68591
- if (filter) {
68592
- filter.ope = operator ?? 'equal';
68593
- filter.value = filterValue ?? '';
68594
- }
68595
- else {
68596
- filterBy.push({ key: fieldFilter, ope: operator ?? 'equal', value: filterValue ?? '' });
68597
- }
68598
- }
68599
- changeFilter([...filterBy]);
68600
- setOpenFilter(false);
68601
- };
68602
- /* eslint-disable */
68603
- switch (typeFilter) {
68604
- case 'text':
68605
- return jsxRuntime.jsx(StringFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
68606
- case 'numeric':
68607
- return jsxRuntime.jsx(NumberFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave, formatSetting: formatSetting });
68608
- case 'select':
68609
- return jsxRuntime.jsx(SelectFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
68610
- case 'date':
68611
- return jsxRuntime.jsx(DateRangeFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
68612
- default:
68613
- return jsxRuntime.jsx("div", { children: t('No filter available') });
68614
- }
68615
- /* eslint-enable */
68616
- };
68617
- const StringFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
68618
- const { t } = reactI18next.useTranslation();
68619
- const filter = filterBy.find((item) => item.key === fieldFilter);
68620
- const [operator, setOperator] = React$5.useState(filter?.ope ?? 'contains');
68621
- const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
68622
- const options = [
68623
- { label: 'Bắt đầu bởi', value: 'startswith' },
68624
- { label: 'Kết thúc bởi', value: 'endswith' },
68625
- { label: 'Chứa', value: 'contains' },
68626
- { label: 'Bằng', value: 'equal' },
68627
- { label: 'Không bằng', value: 'notequal' }
68628
- ];
68629
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
68630
- if (e.code === 'Enter' || e.code === 'NumpadEnter') {
68631
- setTimeout(() => {
68632
- handleSave('text', valueFilter, operator);
68633
- }, 100);
68634
- e.stopPropagation();
68635
- }
68636
- }, children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
68637
- setOperator(val.value);
68638
- }, placeholder: "Select" }), jsxRuntime.jsx(Input$1, { className: "my-1", value: valueFilter, onChange: (val) => {
68639
- setValueFilter(val.target.value);
68640
- } }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('text', valueFilter, operator), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
68641
- };
68642
- const NumberFilterComponent = ({ column, filterBy, fieldFilter, handleSave, formatSetting }) => {
68643
- const { t } = reactI18next.useTranslation();
68644
- const filter = filterBy.find((item) => item.key === fieldFilter);
68645
- const [operator, setOperator] = React$5.useState(filter?.ope ?? 'equal');
68646
- const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
68647
- const options = [
68648
- { label: 'Lớn hơn', value: 'greaterthan' },
68649
- { label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
68650
- { label: 'Bằng', value: 'equal' },
68651
- { label: 'Bé hơn', value: 'lessthan' },
68652
- { label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
68653
- ];
68654
- const numericFormatProps = {
68655
- value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
68656
- thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
68657
- decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
68658
- allowNegative: column.numericSettings?.allowNegative ?? false,
68659
- decimalScale: column.numericSettings?.fraction ?? 0
68660
- };
68661
- let floatValue = parseFloat(valueFilter ?? '0');
68662
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
68663
- if (e.code === 'Enter' || e.code === 'NumpadEnter') {
68664
- setTimeout(() => {
68665
- handleSave('numeric', valueFilter, operator);
68666
- }, 100);
68667
- e.stopPropagation();
68668
- }
68669
- }, children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
68670
- setOperator(val.value);
68671
- }, placeholder: t('Select') }), jsxRuntime.jsx(NumericFormat, { style: { textAlign: column.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(valueFilter, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', column.numericSettings?.fraction), className: classNames$1('form-control my-1 input-numeric'), onValueChange: (values) => {
68672
- floatValue = values?.floatValue;
68673
- }, onFocus: (e) => {
68674
- e.target.setSelectionRange(0, e.target.innerText.length - 1);
68675
- }, onBlur: () => {
68676
- if (floatValue !== valueFilter) {
68677
- setValueFilter(!isNaN(floatValue) ? floatValue : 0);
68678
- }
68679
- } }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('numeric', valueFilter, operator), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
68680
- };
68681
- const SelectFilterComponent = ({ column, filterBy, handleSave, fieldFilter, optionsFilter }) => {
68682
- const { t } = reactI18next.useTranslation();
68683
- const filter = filterBy.find((item) => item.key === fieldFilter);
68684
- const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
68685
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
68686
- if (e.code === 'Enter' || e.code === 'NumpadEnter') {
68687
- setTimeout(() => {
68688
- handleSave('select', valueFilter, 'equal');
68689
- }, 100);
68690
- e.stopPropagation();
68691
- }
68692
- }, children: [jsxRuntime.jsx("div", { className: "mb-1", children: jsxRuntime.jsx(SelectTable, { value: optionsFilter ? optionsFilter[column.fieldFilter ?? column.field]?.find((x) => x.value === valueFilter) : undefined, options: (optionsFilter && optionsFilter[column.fieldFilter ?? column.field]) ?? [], isClearable: true, onChange: (val) => {
68693
- setValueFilter(val?.value);
68694
- }, placeholder: t('Select') }) }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('select', valueFilter, 'equal'), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
68695
- };
68696
- const DateRangeFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
68697
- const { t } = reactI18next.useTranslation();
68698
- const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal')?.value;
68699
- const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal')?.value;
68700
- const [valueFilter, setValueFilter] = React$5.useState({ from: from ?? undefined, to: to ?? undefined });
68701
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
68702
- if (e.code === 'Enter' || e.code === 'NumpadEnter') {
68703
- setTimeout(() => {
68704
- handleSave('date', valueFilter);
68705
- }, 100);
68706
- e.stopPropagation();
68707
- }
68708
- }, children: [jsxRuntime.jsx("div", { className: "mb-1", children: jsxRuntime.jsx(DateRangePicker, { dateFormat: "dd/MM/yyyy", value: valueFilter, onChange: (date) => {
68709
- setValueFilter(date);
68710
- } }) }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", style: { borderRadius: 3 }, className: "me-50 py-25 px-50 fw-bold", onClick: () => handleSave('date', valueFilter), children: t('Filter') }), jsxRuntime.jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
68711
- };
68712
-
68713
- const HeaderTableCol = (props) => {
68714
- const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objWidthFixLeft, objWidthFixRight, totalCount, selectedRows, columns, setColumns, orderBy, changeFilter, filterBy, changeOrder, allowFiltering, allowSorting, container, fisrtObjWidthFixRight, lastObjWidthFixLeft, formatSetting, optionsFilter, idTable, isMulti } = props;
68715
- const { t } = reactI18next.useTranslation();
68716
- const headerRef = React$5.useRef(null);
68717
- const order = orderBy.find((item) => item.key === col.field);
68718
- const [openFilter, setOpenFilter] = React$5.useState(false);
68719
- // const filter = filterBy.find((item) => item.key === (col.fieldFilter ?? col.field))
68720
- const handleResize = (e, { size }) => {
68721
- // Update the column width here
68722
- // You might need to update the state or call a callback to update the width
68723
- if (size.width > 50) {
68724
- const newColumns = [...columns];
68725
- newColumns[indexCol].width = size.width;
68726
- if ((columns[indexCol]?.maxWidth ?? 0) < size.width) {
68727
- newColumns[indexCol].maxWidth = size.width;
68728
- }
68729
- if ((columns[indexCol]?.minWidth ?? 0) > size.width) {
68730
- newColumns[indexCol].minWidth = size.width;
68731
- }
68732
- if (setColumns) {
68733
- setColumns(newColumns);
68734
- }
68735
- }
68736
- };
68737
- const checkOverflow = () => {
68738
- return headerRef.current && headerRef.current.scrollHeight > headerRef.current.clientHeight;
68739
- };
68740
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? '').replaceAll(new RegExp(`[^0-9]`, 'g'), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: false }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : 1, colSpan: col.columns?.filter((x) => x.visible !== false)?.length ?? 1, className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
68741
- top: `${indexParent * 42}px`,
68742
- left: col.fixedType === 'left' ? objWidthFixLeft[indexCol ?? 0] : undefined,
68743
- right: col.fixedType === 'right' ? objWidthFixRight[indexCol ?? 0] : undefined
68744
- }, children: jsxRuntime.jsxs("div", { style: { justifyContent: 'space-between' }, onClick: () => {
68745
- if (!!allowSorting && (col.columns?.length ?? 0) === 0) {
68746
- if (order) {
68747
- if (order.direction === 'asc') {
68748
- order.direction = 'desc';
68749
- changeOrder(orderBy);
68750
- }
68751
- else {
68752
- changeOrder(orderBy.filter((x) => x.key !== col.field));
68753
- }
68754
- }
68755
- else {
68756
- orderBy.push({ direction: 'asc', key: col.field });
68757
- changeOrder(orderBy);
68758
- }
68759
- }
68760
- }, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting }), children: [col.type === 'checkbox' && !col.field && (jsxRuntime.jsx(Input$1, { checked: !!(totalCount > 0 && selectedRows?.length >= totalCount), type: "checkbox", className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: col.textAlign ?? 'left', marginTop: 6 }, onChange: (e) => {
68761
- if (selectEnable) {
68762
- if (e.target.checked) {
68763
- setSelectedRows(dataSource.map((item) => {
68764
- return item;
68765
- }));
68766
- }
68767
- else {
68768
- setSelectedRows([]);
68769
- }
68770
- }
68771
- } })), col.type !== 'checkbox' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "header-content", style: { justifyContent: col.textAlign ?? 'left' }, children: [jsxRuntime.jsx("span", { id: `header-${idTable}-${indexParent}-${indexCol}`, ref: headerRef, className: "text-content", children: t(col.headerText ?? '') }), checkOverflow() && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `header-${idTable}-${indexParent}-${indexCol}`, children: t(col.headerText ?? '') }))] }), jsxRuntime.jsxs("div", { className: "d-flex align-items-center", children: [allowSorting && order?.direction === 'asc' && (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_6)", children: jsxRuntime.jsx("path", { d: "M8.70711 0.292893C8.31658 -0.0976311 7.68342 -0.0976311 7.29289 0.292893L0.928932 6.65685C0.538408 7.04738 0.538408 7.68054 0.928932 8.07107C1.31946 8.46159 1.95262 8.46159 2.34315 8.07107L8 2.41421L13.6569 8.07107C14.0474 8.46159 14.6805 8.46159 15.0711 8.07107C15.4616 7.68054 15.4616 7.04738 15.0711 6.65685L8.70711 0.292893ZM8 18H9L9 1H8H7L7 18H8Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_6", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowSorting && order?.direction === 'desc' && (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_2)", children: jsxRuntime.jsx("path", { d: "M7.29289 17.7071C7.68342 18.0976 8.31658 18.0976 8.70711 17.7071L15.0711 11.3431C15.4616 10.9526 15.4616 10.3195 15.0711 9.92893C14.6805 9.53841 14.0474 9.53841 13.6569 9.92893L8 15.5858L2.34315 9.92893C1.95262 9.53841 1.31946 9.53841 0.928932 9.92893C0.538408 10.3195 0.538408 10.9526 0.928932 11.3431L7.29289 17.7071ZM8 0L7 0L7 17H8H9L9 0L8 0Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_2", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowFiltering && (col.columns?.length ?? 0) === 0 && col.allowFilter !== false && (jsxRuntime.jsxs(Dropdown$1$1, { isOpen: openFilter, toggle: (e) => {
68772
- setOpenFilter(!openFilter);
68773
- e.stopPropagation();
68774
- }, onClick: (e) => {
68775
- e.stopPropagation();
68776
- }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", className: "p-0 r-filter", children: jsxRuntime.jsxs("svg", { className: classNames$1('ms-25', { active: filterBy.some((item) => item.key === (col.fieldFilter ?? col.field)) }), width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "stroke-width": "1.5", "font-size": "12", children: [jsxRuntime.jsx("path", { d: "M14.7 11.998v10.506c.052.4-.08.826-.381 1.106a1.306 1.306 0 0 1-.925.39 1.289 1.289 0 0 1-.926-.39l-2.637-2.68a1.323 1.323 0 0 1-.38-1.106v-7.826h-.04L1.85 2.16A1.348 1.348 0 0 1 2.076.293C2.325.107 2.6 0 2.888 0h18.373c.289 0 .564.107.814.293a1.348 1.348 0 0 1 .223 1.866L14.738 12H14.7Z", fill: "currentColor" }), ' '] }) }), jsxRuntime.jsx(DropdownMenu$1, { container: container, className: "formula-dropdown icon-dropdown p-0", style: {
68777
- borderRadius: 8,
68778
- zIndex: 1056
68779
- }, children: jsxRuntime.jsx(DropdownItem$1, { className: "p-1", style: { borderRadius: '6px' }, tag: "div", header: true, children: jsxRuntime.jsx(FilterComponent, { setOpenFilter: setOpenFilter, filterBy: filterBy, optionsFilter: optionsFilter, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] }))] })] }))] }) }) })) }, `header-${indexCol}`));
68780
- };
68781
-
68782
- const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false, isLoading, selectEnable, formatSetting, querySetting, setColumns, pagingSetting, searchSetting, columnsAggregate, toolbarSetting, selectedItem, setSelectedItem, handleSelect, saveSettingColumn, resetDefaultColumns, settingColumns, headerComponent }) => {
68712
+ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false, isLoading, selectEnable, formatSetting, querySetting, pagingSetting, searchSetting, columnsAggregate, toolbarSetting, selectedItem, setSelectedItem, handleSelect, saveSettingColumn, resetDefaultColumns, settingColumns, headerComponent, groupSetting, isMulti }) => {
68783
68713
  const { t } = reactI18next.useTranslation();
68784
68714
  const gridRef = React$5.useRef(null);
68785
68715
  const [openPopupSetupColumn, setOpenPopupSetupColumn] = React$5.useState(false);
@@ -68788,6 +68718,21 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68788
68718
  const [filterBy, setFilterBy] = React$5.useState([]);
68789
68719
  const [searchTerm, setSearchTerm] = React$5.useState('');
68790
68720
  const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? 'id';
68721
+ const [contentColumns, setContentColumns] = React$5.useState([]);
68722
+ const [groupColumns, setGroupColumns] = React$5.useState([]);
68723
+ const [expandsAll, setExpandsAll] = React$5.useState();
68724
+ React$5.useEffect(() => {
68725
+ if (groupSetting?.groupColumns) {
68726
+ setGroupColumns([...groupSetting.groupColumns]);
68727
+ }
68728
+ setExpandsAll(undefined);
68729
+ }, [groupSetting?.groupColumns]);
68730
+ const { levels: headerColumns, flatVisble, objHeaderWidthFixLeft, objHeaderWidthFixRight, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = React$5.useMemo(() => {
68731
+ const rs = calculateTableStructure(columns, settingColumns?.value);
68732
+ setContentColumns(rs.flat);
68733
+ return rs;
68734
+ }, [columns, settingColumns]);
68735
+ const optionGroupColumns = React$5.useMemo(() => contentColumns.filter((x) => !groupColumns.includes(x.field)).map((x) => ({ ...x, headerDisplay: t(x.headerDisplay ?? x.headerText) })), [groupColumns, contentColumns]);
68791
68736
  // Tính toán dữ liệu hiển thị dựa trên các điều kiện lọc, tìm kiếm và sắp xếp
68792
68737
  const viewData = React$5.useMemo(() => {
68793
68738
  if (!dataSource || dataSource.length === 0) {
@@ -68856,7 +68801,6 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68856
68801
  }
68857
68802
  return datas;
68858
68803
  }, [searchTerm, filterBy, orderBy, dataSource]);
68859
- const { levels: headerColumns, flat: contentColumns, flatVisble, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = React$5.useMemo(() => calculateTableStructure(columns), [columns]);
68860
68804
  const handleKeyPress = (e) => {
68861
68805
  if (e.code === 'Enter' || e.code === 'NumpadEnter') {
68862
68806
  if (searchSetting?.setSearchTerm) {
@@ -68872,7 +68816,56 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68872
68816
  const searchTemplate = () => {
68873
68817
  return (jsxRuntime.jsx("div", { className: "me-50 r-search", children: jsxRuntime.jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, setSearchTerm: searchSetting?.setSearchTerm ? searchSetting?.setSearchTerm : setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
68874
68818
  };
68819
+ const groupbtnTemplate = () => {
68820
+ return (jsxRuntime.jsxs(UncontrolledDropdown, { children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsxRuntime.jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[0] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerDisplay ?? contentColumns.find((x) => x.field === groupColumns[0])?.headerText) } : undefined, onChange: (val) => {
68821
+ if (val) {
68822
+ groupColumns[0] = val.field;
68823
+ }
68824
+ else {
68825
+ groupColumns.pop();
68826
+ }
68827
+ setGroupColumns([...groupColumns]);
68828
+ }, isClearable: groupColumns?.length === 1 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[1] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerDisplay ?? contentColumns.find((x) => x.field === groupColumns[1])?.headerText) } : undefined, onChange: (val) => {
68829
+ if (val) {
68830
+ groupColumns[1] = val.field;
68831
+ }
68832
+ else {
68833
+ groupColumns.pop();
68834
+ }
68835
+ setGroupColumns([...groupColumns]);
68836
+ }, isClearable: groupColumns?.length === 2 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[2] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerDisplay ?? contentColumns.find((x) => x.field === groupColumns[2])?.headerText) } : undefined, onChange: (val) => {
68837
+ if (groupSetting) {
68838
+ if (val) {
68839
+ groupColumns[2] = val.field;
68840
+ }
68841
+ else {
68842
+ groupColumns.pop();
68843
+ }
68844
+ setGroupColumns([...groupColumns]);
68845
+ }
68846
+ }, isClearable: groupColumns?.length === 3 }) })] }), jsxRuntime.jsxs("div", { className: "border-top d-flex justify-content-end mt-1", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", className: "mt-1 me-50 rounded", size: "sm", onClick: () => {
68847
+ groupSetting?.onGroup({ columnGrouped: groupColumns.filter((x) => x) });
68848
+ document.getElementById('group-dropdown-toggle')?.click();
68849
+ }, children: `${t('Apply')}` }), jsxRuntime.jsx(Button$1$1, { color: "secondary", outline: true, className: "mt-1 rounded", size: "sm", onClick: () => {
68850
+ groupSetting?.onGroup({ columnGrouped: [] });
68851
+ document.getElementById('group-dropdown-toggle')?.click();
68852
+ }, children: `${t('Delete')}` })] })] })] }));
68853
+ };
68854
+ const chooseColumnsTemplate = () => {
68855
+ return jsxRuntime.jsx(SvgSettings, { className: "me-1 r-toolbar-icon", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) });
68856
+ };
68857
+ const expandTemplate = () => {
68858
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!expandsAll && (jsxRuntime.jsx(ExpandAllIcon, { onClick: () => {
68859
+ setExpandsAll(true);
68860
+ }, color: "#7F7F7F", size: 24 })), expandsAll && jsxRuntime.jsx(UnExpandAllIcon, { onClick: () => setExpandsAll(false), color: "#7F7F7F", size: 24 })] }));
68861
+ };
68875
68862
  const defaultToolbarOption = searchSetting?.searchEnable ? [{ template: searchTemplate, align: 'left' }] : [];
68863
+ if (groupSetting) {
68864
+ defaultToolbarOption.push({ template: groupbtnTemplate, align: 'left' });
68865
+ }
68866
+ if (groupSetting?.groupColumns && groupSetting?.groupColumns.length > 0) {
68867
+ defaultToolbarOption.push({ template: expandTemplate, align: 'left' });
68868
+ }
68876
68869
  let toolbarTopOption = [];
68877
68870
  if (toolbarSetting?.toolbarOptions) {
68878
68871
  toolbarTopOption = [...defaultToolbarOption, ...toolbarSetting?.toolbarOptions];
@@ -68880,6 +68873,9 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68880
68873
  else {
68881
68874
  toolbarTopOption = [...defaultToolbarOption];
68882
68875
  }
68876
+ if (settingColumns) {
68877
+ toolbarTopOption.push({ template: chooseColumnsTemplate, align: 'right' });
68878
+ }
68883
68879
  const onChangePage = (args) => {
68884
68880
  if (pagingSetting?.setCurrentPage) {
68885
68881
  if (args.currentPage === args.oldPage) {
@@ -68945,20 +68941,68 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68945
68941
  }
68946
68942
  }
68947
68943
  }, [selectedItem]);
68948
- return (jsxRuntime.jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxRuntime.jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption, setOpenPopupSetupColumn: setOpenPopupSetupColumn }), headerComponent && headerComponent(), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}` }, children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: flatVisble }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((column, indexColumn) => (jsxRuntime.jsx(HeaderTableCol, { idTable: idTable, col: column, dataSource: dataSource, indexCol: indexColumn, indexParent: indexParent, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, columns: contentColumns, setColumns: setColumns, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, orderBy: orderBy, allowFiltering: querySetting?.allowFiltering, allowSorting: querySetting?.allowSorting, filterBy: filterBy, optionsFilter: querySetting?.optionsFilter, changeFilter: (val) => {
68949
- setFilterBy([...val]);
68950
- if (querySetting?.changeFilter) {
68951
- querySetting.changeFilter(val);
68952
- }
68953
- }, changeOrder: (val) => {
68954
- setOrderBy([...val]);
68955
- if (querySetting?.changeOrder) {
68956
- querySetting.changeOrder(val);
68957
- }
68958
- }, container: gridRef, totalCount: dataSource.length }, `header-${indexParent}-${indexColumn}`))) }, `header-${-indexParent}`))) }), jsxRuntime.jsx("tbody", { className: "r-gridcontent", role: "rowgroup", children: viewData.map((row, indexRow) => {
68959
- const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
68960
- return (jsxRuntime.jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: contentColumns.map((column, indexCol) => (jsxRuntime.jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: fieldKey, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row }, indexCol))) }, `row-content-${indexRow}`));
68961
- }) }), viewData.length > 0 && (jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: (columnsAggregate?.length ?? 0) > 0 ? (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
68944
+ const RenderContent = ({ datas, level = 0 }) => {
68945
+ const firstColSpan = contentColumns.findIndex((x) => x.visible !== false && x.type === 'numeric');
68946
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: datas.map((row, indexRow) => {
68947
+ const [expand, setExpand] = React$5.useState(row.expand ?? false);
68948
+ React$5.useEffect(() => {
68949
+ if (expandsAll !== undefined) {
68950
+ setExpand(expandsAll);
68951
+ row.expand = expandsAll;
68952
+ }
68953
+ }, [expandsAll]);
68954
+ if (row.children?.length) {
68955
+ const col = contentColumns.find((x) => x.field === row.field);
68956
+ let value = row[col.field];
68957
+ if (col.type === 'numeric') {
68958
+ value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
68959
+ }
68960
+ else if (col.type === 'date') {
68961
+ value = value ? formatDateTime(value, formatSetting?.dateFormat) : '';
68962
+ }
68963
+ else if (col.type === 'datetime') {
68964
+ value = value ? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
68965
+ }
68966
+ if (col.template) {
68967
+ value = col.template(row, indexRow) ?? '';
68968
+ }
68969
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsxRuntime.jsx("td", { className: "r-rowcell r-cell-group", colSpan: firstColSpan, children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", children: [jsxRuntime.jsx(SvgChevronRight, { style: { marginLeft: level * 20, transform: expand ? 'rotate(90deg)' : 'rotate(0deg)' }, fontSize: 15, onClick: () => {
68970
+ setExpand(!expand);
68971
+ setExpandsAll(undefined);
68972
+ row.expand = !expand;
68973
+ } }), t(col.headerDisplay ?? col.headerText), ": ", value, " (", row.children.length, ")"] }) }), contentColumns.map((colSum, indexCol) => {
68974
+ if (indexCol < firstColSpan) {
68975
+ return;
68976
+ }
68977
+ let sumValue = row[colSum.field];
68978
+ const haveSum = row[colSum.field] !== undefined && row[colSum.field] !== null;
68979
+ if (!haveSum && colSum.haveSum === true && colSum.type === 'numeric') {
68980
+ sumValue = row.children.reduce(function (accumulator, currentValue) {
68981
+ return Number(accumulator ?? 0) + Number(currentValue[colSum.field] ?? 0);
68982
+ }, 0);
68983
+ }
68984
+ return (colSum.visible !== false && (jsxRuntime.jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", style: { justifyContent: colSum.textAlign ? colSum.textAlign : 'left' }, children: [(haveSum || (colSum.haveSum === true && colSum.type === 'numeric')) && colSum.type === 'numeric' && Number(sumValue) >= 0 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', colSum.numericSettings?.fraction, true, false) })), (haveSum || (colSum.haveSum === true && colSum.type === 'numeric')) && colSum.type === 'numeric' && Number(sumValue) < 0 && (jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false)}${formatSetting?.suffixNegative ?? ''}`] }))] }) }, `group-sum-cell-${level}-${indexCol}`)));
68985
+ })] }), expand && jsxRuntime.jsx(RenderContent, { datas: row.children, level: level + 1 })] }));
68986
+ }
68987
+ else {
68988
+ const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
68989
+ return (jsxRuntime.jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: contentColumns.map((column, indexCol) => (jsxRuntime.jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: fieldKey, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row }, indexCol))) }, `row-content-${indexRow}`));
68990
+ }
68991
+ }) }));
68992
+ };
68993
+ return (jsxRuntime.jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxRuntime.jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}` }, children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: flatVisble }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
68994
+ return (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((col, index) => (jsxRuntime.jsx(HeaderTableCol, { col: col, idTable: idTable ?? '', dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: gridRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: querySetting.optionsFilter, allowFiltering: querySetting.allowFiltering, allowSorting: querySetting.allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
68995
+ setFilterBy([...val]);
68996
+ if (querySetting?.changeFilter) {
68997
+ querySetting.changeFilter(val);
68998
+ }
68999
+ }, changeOrder: (val) => {
69000
+ setOrderBy([...val]);
69001
+ if (querySetting?.changeOrder) {
69002
+ querySetting.changeOrder(val);
69003
+ }
69004
+ }, columns: contentColumns, setContentColumns: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: dataSource?.length ?? 0 }, `header-${indexParent}-${index}`))) }, `header-${-indexParent}`));
69005
+ }) }), jsxRuntime.jsx("tbody", { className: "r-gridcontent", role: "rowgroup", children: jsxRuntime.jsx(RenderContent, { datas: viewData }) }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: (columnsAggregate?.length ?? 0) > 0 && (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
68962
69006
  const item = columnsAggregate?.find((x) => x.field === col.field);
68963
69007
  let sumValue = item?.value;
68964
69008
  if (!item && col.haveSum === true && col.type === 'numeric') {
@@ -68971,9 +69015,10 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
68971
69015
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
68972
69016
  textAlign: col.textAlign ? col.textAlign : 'left'
68973
69017
  }, children: jsxRuntime.jsxs("div", { className: "r-footer-div", children: [(item || (col.haveSum === true && col.type === 'numeric')) && col.type === 'numeric' && Number(sumValue) >= 0 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) })), (item || (col.haveSum === true && col.type === 'numeric')) && col.type === 'numeric' && Number(sumValue) < 0 && (jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false)}${formatSetting?.suffixNegative ?? ''}`] }))] }) }, `summarycell-${indexCol}`)));
68974
- }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) }))] }), (viewData.length ?? 0) === 0 && !isLoading && (jsxRuntime.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsxs("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [jsxRuntime.jsx("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }), jsxRuntime.jsxs("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [jsxRuntime.jsx("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), jsxRuntime.jsx("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", fill: "#fafafa" })] })] }) }), t('No data available.')] })), isLoading && (jsxRuntime.jsx("div", { className: "r-loading-overlay", children: jsxRuntime.jsxs("div", { className: "r-loading", children: [jsxRuntime.jsx(Spinner$1, { className: "me-1" }), t('Loading...')] }) }))] })] }), pagingSetting?.allowPaging && (jsxRuntime.jsx(PagingComponent, { gridRef: gridRef, onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingSetting?.totalItem ?? 0, onChangePageSize: onChangePageSize })), jsxRuntime.jsx(SettingColumn, { gridRef: gridRef, handleSidebar: () => {
69018
+ }) })) })] }), (viewData.length ?? 0) === 0 && !isLoading && (jsxRuntime.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsxs("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [jsxRuntime.jsx("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }), jsxRuntime.jsxs("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [jsxRuntime.jsx("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), jsxRuntime.jsx("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", fill: "#fafafa" })] })] }) }), t('No data available.')] })), isLoading && (jsxRuntime.jsx("div", { className: "r-loading-overlay", children: jsxRuntime.jsxs("div", { className: "r-loading", children: [jsxRuntime.jsx(Spinner$1, { className: "me-1" }), t('Loading...')] }) }))] })] }), pagingSetting?.allowPaging && (jsxRuntime.jsx(PagingComponent, { gridRef: gridRef, onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingSetting?.totalItem ?? 0, onChangePageSize: onChangePageSize })), jsxRuntime.jsx(SettingColumn, { gridRef: gridRef, handleSidebar: () => {
68975
69019
  setOpenPopupSetupColumn(!openPopupSetupColumn);
68976
69020
  }, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
69021
+ console.log(newColumns);
68977
69022
  if (saveSettingColumn) {
68978
69023
  saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
68979
69024
  }