react-table-edit 1.5.11 → 1.5.12
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/component/icon/ExpandAll.d.ts +10 -0
- package/dist/component/icon/GroupIcon.d.ts +10 -0
- package/dist/component/icon/UnExpandAll.d.ts +10 -0
- package/dist/component/table/data-table.d.ts +3 -3
- package/dist/component/table/header.d.ts +1 -1
- package/dist/component/table/toolbar-top.d.ts +2 -4
- package/dist/component/table-view/content.d.ts +1 -1
- package/dist/component/table-view/index.d.ts +1 -1
- package/dist/component/type/index.d.ts +0 -1
- package/dist/component/utils.d.ts +3 -3
- package/dist/index.d.ts +3 -4
- package/dist/index.js +541 -547
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +541 -547
- package/dist/index.mjs.map +1 -1
- package/dist/styles/date-picker.css +2 -2
- package/dist/styles/index.css +31 -2
- package/dist/styles/index.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19663,11 +19663,11 @@ const useOnClickOutside = (ref, handler) => {
|
|
|
19663
19663
|
// ** Call passed function on click outside
|
|
19664
19664
|
handler(event);
|
|
19665
19665
|
};
|
|
19666
|
-
document.addEventListener(
|
|
19667
|
-
document.addEventListener(
|
|
19666
|
+
document.addEventListener('mousedown', listener);
|
|
19667
|
+
document.addEventListener('touchstart', listener);
|
|
19668
19668
|
return () => {
|
|
19669
|
-
document.removeEventListener(
|
|
19670
|
-
document.removeEventListener(
|
|
19669
|
+
document.removeEventListener('mousedown', listener);
|
|
19670
|
+
document.removeEventListener('touchstart', listener);
|
|
19671
19671
|
};
|
|
19672
19672
|
},
|
|
19673
19673
|
// ** Add ref and handler to effect dependencies
|
|
@@ -19682,7 +19682,7 @@ const checkThousandSeparator = (thousandSeparator, decimalSeparator) => {
|
|
|
19682
19682
|
if (thousandSeparator) {
|
|
19683
19683
|
if (decimalSeparator) {
|
|
19684
19684
|
if (thousandSeparator === decimalSeparator) {
|
|
19685
|
-
return
|
|
19685
|
+
return ',';
|
|
19686
19686
|
}
|
|
19687
19687
|
else {
|
|
19688
19688
|
return thousandSeparator;
|
|
@@ -19693,14 +19693,14 @@ const checkThousandSeparator = (thousandSeparator, decimalSeparator) => {
|
|
|
19693
19693
|
}
|
|
19694
19694
|
}
|
|
19695
19695
|
else {
|
|
19696
|
-
return
|
|
19696
|
+
return ',';
|
|
19697
19697
|
}
|
|
19698
19698
|
};
|
|
19699
19699
|
const checkDecimalSeparator = (thousandSeparator, decimalSeparator) => {
|
|
19700
19700
|
if (decimalSeparator) {
|
|
19701
19701
|
if (thousandSeparator) {
|
|
19702
19702
|
if (thousandSeparator === decimalSeparator) {
|
|
19703
|
-
return
|
|
19703
|
+
return '.';
|
|
19704
19704
|
}
|
|
19705
19705
|
else {
|
|
19706
19706
|
return decimalSeparator;
|
|
@@ -19711,11 +19711,11 @@ const checkDecimalSeparator = (thousandSeparator, decimalSeparator) => {
|
|
|
19711
19711
|
}
|
|
19712
19712
|
}
|
|
19713
19713
|
else {
|
|
19714
|
-
return
|
|
19714
|
+
return '.';
|
|
19715
19715
|
}
|
|
19716
19716
|
};
|
|
19717
19717
|
const isNullOrUndefined$1 = (d) => {
|
|
19718
|
-
if (d === null || d === undefined || d ===
|
|
19718
|
+
if (d === null || d === undefined || d === '') {
|
|
19719
19719
|
return true;
|
|
19720
19720
|
}
|
|
19721
19721
|
return false;
|
|
@@ -19723,8 +19723,8 @@ const isNullOrUndefined$1 = (d) => {
|
|
|
19723
19723
|
const generateUUID = () => {
|
|
19724
19724
|
// Public Domain/MIT
|
|
19725
19725
|
let d = new Date().getTime(); //Timestamp
|
|
19726
|
-
let d2 = (typeof performance !==
|
|
19727
|
-
return
|
|
19726
|
+
let d2 = (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported
|
|
19727
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
19728
19728
|
let r = Math.random() * 16; //random number between 0 and 16
|
|
19729
19729
|
if (d > 0) {
|
|
19730
19730
|
//Use timestamp until depleted
|
|
@@ -19736,7 +19736,7 @@ const generateUUID = () => {
|
|
|
19736
19736
|
r = (d2 + r) % 16 | 0;
|
|
19737
19737
|
d2 = Math.floor(d2 / 16);
|
|
19738
19738
|
}
|
|
19739
|
-
return (c ===
|
|
19739
|
+
return (c === 'x' ? r : 0x3).toString(16);
|
|
19740
19740
|
});
|
|
19741
19741
|
};
|
|
19742
19742
|
/**
|
|
@@ -19753,17 +19753,17 @@ const formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10
|
|
|
19753
19753
|
str = roundNumber(Number(str), fraction);
|
|
19754
19754
|
}
|
|
19755
19755
|
// eslint-disable-next-line
|
|
19756
|
-
if (str || str ==
|
|
19756
|
+
if (str || str == '0') {
|
|
19757
19757
|
str = str.toString();
|
|
19758
|
-
const value = decimalSeparator !==
|
|
19759
|
-
const arr = value.toString().split(decimalSeparator ??
|
|
19760
|
-
let flag = value.toString().includes(decimalSeparator ??
|
|
19758
|
+
const value = decimalSeparator !== '.' ? str.toString().replaceAll('.', decimalSeparator ?? '') : str;
|
|
19759
|
+
const arr = value.toString().split(decimalSeparator ?? '', 2);
|
|
19760
|
+
let flag = value.toString().includes(decimalSeparator ?? '');
|
|
19761
19761
|
if (arr[0].length < 3) {
|
|
19762
|
-
return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ??
|
|
19762
|
+
return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ''}` : arr[0];
|
|
19763
19763
|
}
|
|
19764
19764
|
else {
|
|
19765
19765
|
let flagNegative = false;
|
|
19766
|
-
if (arr[0][0] ===
|
|
19766
|
+
if (arr[0][0] === '-') {
|
|
19767
19767
|
flagNegative = true;
|
|
19768
19768
|
arr[0] = arr[0].substring(1, arr[0].length);
|
|
19769
19769
|
}
|
|
@@ -19774,20 +19774,20 @@ const formartNumberic = (str, decimalSeparator, thousandSeparator, fraction = 10
|
|
|
19774
19774
|
count++;
|
|
19775
19775
|
}
|
|
19776
19776
|
}
|
|
19777
|
-
if (arr[0].lastIndexOf(thousandSeparator ??
|
|
19777
|
+
if (arr[0].lastIndexOf(thousandSeparator ?? '') === arr[0].length - 1) {
|
|
19778
19778
|
arr[0] = arr[0].slice(0, arr[0].length - 1);
|
|
19779
19779
|
}
|
|
19780
19780
|
if (isDone) {
|
|
19781
|
-
flag = (arr[1]?.substring(0, fraction) ??
|
|
19781
|
+
flag = (arr[1]?.substring(0, fraction) ?? '') !== '';
|
|
19782
19782
|
}
|
|
19783
19783
|
if (flagNegative && haveNegative) {
|
|
19784
|
-
arr[0] =
|
|
19784
|
+
arr[0] = '-'.concat(arr[0]);
|
|
19785
19785
|
}
|
|
19786
|
-
return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ??
|
|
19786
|
+
return flag ? `${arr[0]}${decimalSeparator}${arr[1]?.substring(0, fraction) ?? ''}` : arr[0];
|
|
19787
19787
|
}
|
|
19788
19788
|
}
|
|
19789
19789
|
else {
|
|
19790
|
-
return
|
|
19790
|
+
return '';
|
|
19791
19791
|
}
|
|
19792
19792
|
};
|
|
19793
19793
|
const roundNumber = (num, fraction) => {
|
|
@@ -19795,24 +19795,24 @@ const roundNumber = (num, fraction) => {
|
|
|
19795
19795
|
const result = Math.round(num * base) / base;
|
|
19796
19796
|
return result;
|
|
19797
19797
|
};
|
|
19798
|
-
const formatDateTime = (data, format =
|
|
19798
|
+
const formatDateTime = (data, format = 'dd/MM/yyyy') => {
|
|
19799
19799
|
if (!data) {
|
|
19800
|
-
return
|
|
19800
|
+
return '';
|
|
19801
19801
|
}
|
|
19802
19802
|
const date = new Date(data);
|
|
19803
19803
|
const map = {
|
|
19804
|
-
DD: String(date.getDate()).padStart(2,
|
|
19805
|
-
dd: String(date.getDate()).padStart(2,
|
|
19806
|
-
MM: String(date.getMonth() + 1).padStart(2,
|
|
19804
|
+
DD: String(date.getDate()).padStart(2, '0'),
|
|
19805
|
+
dd: String(date.getDate()).padStart(2, '0'),
|
|
19806
|
+
MM: String(date.getMonth() + 1).padStart(2, '0'),
|
|
19807
19807
|
yyyy: date.getFullYear(),
|
|
19808
|
-
HH: String(date.getHours()).padStart(2,
|
|
19809
|
-
mm: String(date.getMinutes()).padStart(2,
|
|
19808
|
+
HH: String(date.getHours()).padStart(2, '0'),
|
|
19809
|
+
mm: String(date.getMinutes()).padStart(2, '0')
|
|
19810
19810
|
};
|
|
19811
19811
|
return format.replace(/dd|DD|MM|yyyy|HH|mm/g, (match) => map[match]);
|
|
19812
19812
|
};
|
|
19813
19813
|
// Hàm tìm vị trí theo chuỗi index
|
|
19814
19814
|
const FindNodeByPath = (tree, path) => {
|
|
19815
|
-
const levels = path.split(
|
|
19815
|
+
const levels = path.split('-').map((num) => parseInt(num, 10));
|
|
19816
19816
|
let current = tree;
|
|
19817
19817
|
let node = null;
|
|
19818
19818
|
for (let index = 0; index < levels.length - 1; index++) {
|
|
@@ -19861,15 +19861,15 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19861
19861
|
calcTotalRightWidth(col.columns);
|
|
19862
19862
|
}
|
|
19863
19863
|
else {
|
|
19864
|
-
if (col.fixedType ===
|
|
19864
|
+
if (col.fixedType === 'right' && col.visible !== false) {
|
|
19865
19865
|
rightTotal += col.width ?? 40;
|
|
19866
19866
|
}
|
|
19867
19867
|
}
|
|
19868
19868
|
});
|
|
19869
19869
|
};
|
|
19870
19870
|
const applySetting = (cols) => {
|
|
19871
|
-
return cols.map(cell => {
|
|
19872
|
-
const setting = settingColumns?.find(s => s.field === cell.field);
|
|
19871
|
+
return cols.map((cell) => {
|
|
19872
|
+
const setting = settingColumns?.find((s) => s.field === cell.field);
|
|
19873
19873
|
if (setting) {
|
|
19874
19874
|
cell.sortOrder = setting.sortOrder;
|
|
19875
19875
|
cell.visible = setting.visible ?? true;
|
|
@@ -19882,10 +19882,19 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19882
19882
|
cell.headerDisplay = setting.headerText || cell.headerText;
|
|
19883
19883
|
}
|
|
19884
19884
|
else {
|
|
19885
|
-
cell.
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19885
|
+
if (cell.columns?.length) {
|
|
19886
|
+
cell.columns = applySetting(cell.columns);
|
|
19887
|
+
cell.sortOrder = cell.columns[0].sortOrder;
|
|
19888
|
+
if (cell.columns.some((x) => x.visible !== false)) {
|
|
19889
|
+
cell.visible = true;
|
|
19890
|
+
}
|
|
19891
|
+
else {
|
|
19892
|
+
cell.visible = false;
|
|
19893
|
+
}
|
|
19894
|
+
}
|
|
19895
|
+
else {
|
|
19896
|
+
cell.visible = false;
|
|
19897
|
+
}
|
|
19889
19898
|
}
|
|
19890
19899
|
return cell;
|
|
19891
19900
|
});
|
|
@@ -19893,7 +19902,7 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19893
19902
|
const traverse = (cols, level = 0) => {
|
|
19894
19903
|
levels[level] = levels[level] || [];
|
|
19895
19904
|
let columns = [...cols];
|
|
19896
|
-
if (settingColumns?.some(c => c.sortOrder !== undefined && c.sortOrder !== null)) {
|
|
19905
|
+
if (settingColumns?.some((c) => c.sortOrder !== undefined && c.sortOrder !== null)) {
|
|
19897
19906
|
columns = columns.sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0));
|
|
19898
19907
|
}
|
|
19899
19908
|
return columns.reduce((colspanSum, col, indexCol) => {
|
|
@@ -19907,7 +19916,7 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19907
19916
|
};
|
|
19908
19917
|
levels[level].push(cell);
|
|
19909
19918
|
const headerKey = `${level}-${indexCol}`;
|
|
19910
|
-
if (cell.fixedType ===
|
|
19919
|
+
if (cell.fixedType === 'left' && cell.visible !== false) {
|
|
19911
19920
|
objHeaderWidthFixLeft[headerKey] = leftTotal;
|
|
19912
19921
|
}
|
|
19913
19922
|
if (!hasChildren) {
|
|
@@ -19915,16 +19924,16 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19915
19924
|
const width = cell.width ?? 40;
|
|
19916
19925
|
cell.index = index;
|
|
19917
19926
|
flat.push(cell);
|
|
19918
|
-
if (cell.fixedType ===
|
|
19927
|
+
if (cell.fixedType === 'left' && cell.visible !== false) {
|
|
19919
19928
|
objWidthFixLeft[index] = leftTotal;
|
|
19920
19929
|
leftTotal += width;
|
|
19921
19930
|
}
|
|
19922
|
-
if (cell.fixedType ===
|
|
19931
|
+
if (cell.fixedType === 'right' && cell.visible !== false) {
|
|
19923
19932
|
rightTotal -= width;
|
|
19924
19933
|
objWidthFixRight[index] = rightTotal;
|
|
19925
19934
|
}
|
|
19926
19935
|
}
|
|
19927
|
-
if (cell.fixedType ===
|
|
19936
|
+
if (cell.fixedType === 'right' && cell.visible !== false) {
|
|
19928
19937
|
objHeaderWidthFixRight[headerKey] = rightTotal;
|
|
19929
19938
|
}
|
|
19930
19939
|
return colspanSum + colspan;
|
|
@@ -19937,7 +19946,7 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19937
19946
|
traverse(columns);
|
|
19938
19947
|
// Danh sách các cột được hiển thị
|
|
19939
19948
|
const flatVisble = flat.filter((e) => e.visible !== false);
|
|
19940
|
-
const flatVisbleContent = flatVisble.filter((x) => x.field !==
|
|
19949
|
+
const flatVisbleContent = flatVisble.filter((x) => x.field !== 'command' && x.field !== '#' && x.field !== 'checkbox');
|
|
19941
19950
|
// Tính toán vị trí đầu tiên và cuối cùng của các cột cố định
|
|
19942
19951
|
const lastObjWidthFixLeft = Math.max(...Object.keys(objWidthFixLeft).map(Number), 0);
|
|
19943
19952
|
const fisrtObjWidthFixRight = Math.min(...Object.keys(objWidthFixRight).map(Number), flat.length);
|
|
@@ -19960,8 +19969,8 @@ const calculateTableStructure = (columns, settingColumns) => {
|
|
|
19960
19969
|
};
|
|
19961
19970
|
};
|
|
19962
19971
|
/**
|
|
19963
|
-
* 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
|
|
19964
|
-
*/
|
|
19972
|
+
* 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
|
|
19973
|
+
*/
|
|
19965
19974
|
const CheckRowMatch = (row, filters, keyword, searchKeys) => {
|
|
19966
19975
|
const isFilterMatch = filters.every((filter) => {
|
|
19967
19976
|
const { key, value, ope } = filter;
|
|
@@ -19973,23 +19982,23 @@ const CheckRowMatch = (row, filters, keyword, searchKeys) => {
|
|
|
19973
19982
|
const filterStr = String(value).toLowerCase();
|
|
19974
19983
|
/*eslint-disable*/
|
|
19975
19984
|
switch (ope) {
|
|
19976
|
-
case
|
|
19985
|
+
case 'startswith':
|
|
19977
19986
|
return valStr.startsWith(filterStr);
|
|
19978
|
-
case
|
|
19987
|
+
case 'endswith':
|
|
19979
19988
|
return valStr.endsWith(filterStr);
|
|
19980
|
-
case
|
|
19989
|
+
case 'contains':
|
|
19981
19990
|
return valStr.includes(filterStr);
|
|
19982
|
-
case
|
|
19991
|
+
case 'equal':
|
|
19983
19992
|
return rowValue == value;
|
|
19984
|
-
case
|
|
19993
|
+
case 'notequal':
|
|
19985
19994
|
return rowValue != value;
|
|
19986
|
-
case
|
|
19995
|
+
case 'greaterthan':
|
|
19987
19996
|
return rowValue > value;
|
|
19988
|
-
case
|
|
19997
|
+
case 'greaterthanorequal':
|
|
19989
19998
|
return rowValue >= value;
|
|
19990
|
-
case
|
|
19999
|
+
case 'lessthan':
|
|
19991
20000
|
return rowValue < value;
|
|
19992
|
-
case
|
|
20001
|
+
case 'lessthanorequal':
|
|
19993
20002
|
return rowValue <= value;
|
|
19994
20003
|
default:
|
|
19995
20004
|
return false;
|
|
@@ -20448,25 +20457,16 @@ const ReactInput = (props) => {
|
|
|
20448
20457
|
}), value: value, onChange: (val) => setValue(val.target.value) }), value ? jsx(SvgX, { className: 'input__clear-icon', onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ''] }));
|
|
20449
20458
|
};
|
|
20450
20459
|
|
|
20451
|
-
const RenderToolbarTop = ({ toolbarTopOption
|
|
20460
|
+
const RenderToolbarTop = ({ toolbarTopOption }) => {
|
|
20452
20461
|
return (jsx("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: jsxs("div", { className: "r-toolbar-items", children: [jsx("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
|
|
20453
|
-
return item.align ===
|
|
20462
|
+
return item.align === 'left' ? jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
20454
20463
|
}) }), jsx("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
|
|
20455
|
-
return item.align ===
|
|
20464
|
+
return item.align === 'center' ? jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
20456
20465
|
}) }), jsx("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
|
|
20457
|
-
return item.align ===
|
|
20466
|
+
return item.align === 'right' ? jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
20458
20467
|
}) })] }) }));
|
|
20459
20468
|
};
|
|
20460
|
-
const ToolBarElement = ({ item, index
|
|
20461
|
-
if (item.id === "GROUP") {
|
|
20462
|
-
return (jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false", children: 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: [jsxs("g", { "clip-path": "url(#group_svg__a)", fill: "#7F7F7F", children: [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" }), 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" })] }), jsx("defs", { children: jsx("clipPath", { id: "group_svg__a", children: jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })] }) }, `toolbar-top-${index}`));
|
|
20463
|
-
}
|
|
20464
|
-
if (item.id === "EXPAND") {
|
|
20465
|
-
return jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false" }, `toolbar-top-${index}`);
|
|
20466
|
-
}
|
|
20467
|
-
if (item.id === "COLUMN_CHOOSE") {
|
|
20468
|
-
return (jsx("div", { className: "r-toolbar-item cursor-pointer", "aria-disabled": "false", children: jsx(SvgSettings, { className: "me-1", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) }) }, `toolbar-top-${index}`));
|
|
20469
|
-
}
|
|
20469
|
+
const ToolBarElement = ({ item, index }) => {
|
|
20470
20470
|
return (jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template?.() }, `toolbar-top-${index}`));
|
|
20471
20471
|
};
|
|
20472
20472
|
|
|
@@ -36286,7 +36286,7 @@ const CommandElement = (props) => {
|
|
|
36286
36286
|
}) }) }));
|
|
36287
36287
|
};
|
|
36288
36288
|
|
|
36289
|
-
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}";
|
|
36289
|
+
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-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}";
|
|
36290
36290
|
styleInject(css_248z$2);
|
|
36291
36291
|
|
|
36292
36292
|
const getColumn = (contentColumns, col, count) => {
|
|
@@ -38585,14 +38585,310 @@ reactResizable.exports.ResizableBox = ResizableBox$1.default;
|
|
|
38585
38585
|
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}";
|
|
38586
38586
|
styleInject(css_248z$1);
|
|
38587
38587
|
|
|
38588
|
-
const
|
|
38588
|
+
const DateRangePicker = forwardRef((props, ref) => {
|
|
38589
|
+
const { id, onKeyDown, className, invalid, container, onPaste, onChange, value } = props;
|
|
38590
|
+
const dateFormat = props.dateFormat ?? 'dd/MM/yyyy';
|
|
38591
|
+
const { from, to } = value || {};
|
|
38592
|
+
const currentDate = new Date();
|
|
38593
|
+
const { t } = useTranslation();
|
|
38594
|
+
const [viewDateFrom, setViewDateFrom] = useState(from ? new Date(from) : currentDate);
|
|
38595
|
+
const [viewDateTo, setViewDateTo] = useState(to ? new Date(to) : addMonths(currentDate, 1));
|
|
38596
|
+
const [open, setOpen] = useState(false);
|
|
38597
|
+
const formatDisplay = (f, t) => {
|
|
38598
|
+
if (f && t) {
|
|
38599
|
+
return `${formatDateTime(f, dateFormat)} - ${formatDateTime(t, dateFormat)}`;
|
|
38600
|
+
}
|
|
38601
|
+
if (f) {
|
|
38602
|
+
return `${formatDateTime(f, dateFormat)} - `;
|
|
38603
|
+
}
|
|
38604
|
+
return '';
|
|
38605
|
+
};
|
|
38606
|
+
const [inputValue, setInputValue] = useState(formatDisplay(from, to));
|
|
38607
|
+
const toggle = () => setOpen((prev) => !prev);
|
|
38608
|
+
const handleSelect = (selected) => {
|
|
38609
|
+
let newRange = { from, to };
|
|
38610
|
+
if (!newRange.from || (selected && selected < newRange.from)) {
|
|
38611
|
+
newRange = { from: selected, to };
|
|
38612
|
+
setViewDateFrom(selected || currentDate);
|
|
38613
|
+
}
|
|
38614
|
+
else if (newRange.from && selected && selected > newRange.from && (!newRange.to || selected < newRange.to)) {
|
|
38615
|
+
newRange = { from, to: selected };
|
|
38616
|
+
setViewDateTo(selected || currentDate);
|
|
38617
|
+
}
|
|
38618
|
+
else if (newRange.to && selected && selected > newRange.to) {
|
|
38619
|
+
newRange = { from, to: selected };
|
|
38620
|
+
setViewDateTo(selected || currentDate);
|
|
38621
|
+
}
|
|
38622
|
+
onChange(newRange);
|
|
38623
|
+
setInputValue(formatDisplay(newRange.from, newRange.to));
|
|
38624
|
+
};
|
|
38625
|
+
const handleChange = (e) => {
|
|
38626
|
+
const v = e.target.value;
|
|
38627
|
+
setInputValue(v);
|
|
38628
|
+
const parts = v.split('-').map((p) => p.trim());
|
|
38629
|
+
if (parts.length === 2 && parts[0].length === 10 && parts[1].length === 10) {
|
|
38630
|
+
const parsedFrom = parse(parts[0], dateFormat, currentDate);
|
|
38631
|
+
const parsedTo = parse(parts[1], dateFormat, currentDate);
|
|
38632
|
+
if (!isNaN(parsedFrom.getTime()) && !isNaN(parsedTo.getTime())) {
|
|
38633
|
+
onChange({ from: parsedFrom, to: parsedTo });
|
|
38634
|
+
}
|
|
38635
|
+
}
|
|
38636
|
+
};
|
|
38637
|
+
const optionsMonth = [
|
|
38638
|
+
{ value: 1, label: t('January') },
|
|
38639
|
+
{ value: 2, label: t('February') },
|
|
38640
|
+
{ value: 3, label: t('March') },
|
|
38641
|
+
{ value: 4, label: t('April') },
|
|
38642
|
+
{ value: 5, label: t('May') },
|
|
38643
|
+
{ value: 6, label: t('June') },
|
|
38644
|
+
{ value: 7, label: t('July') },
|
|
38645
|
+
{ value: 8, label: t('August') },
|
|
38646
|
+
{ value: 9, label: t('September') },
|
|
38647
|
+
{ value: 10, label: t('October') },
|
|
38648
|
+
{ value: 11, label: t('November') },
|
|
38649
|
+
{ value: 12, label: t('December') }
|
|
38650
|
+
];
|
|
38651
|
+
const getMaskFromFormat = () => '99/99/9999 -> 99/99/9999';
|
|
38652
|
+
return (jsx("div", { className: classNames$1('r-daterangepicker', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxs(Dropdown$1$1, { className: className, isOpen: open, toggle: toggle, children: [jsx(DropdownToggle$1, { tag: "div", "data-toggle": "dropdown", "aria-expanded": open, className: "d-flex align-items-center", style: { cursor: 'pointer' }, children: jsx(InputMask, { mask: getMaskFromFormat(), value: inputValue, onChange: handleChange, placeholder: "dd/mm/yyyy -> dd/mm/yyyy", className: "form-control", style: { width: 230 }, onKeyDown: (e) => {
|
|
38653
|
+
if (e.code === 'Space') {
|
|
38654
|
+
setOpen(!open);
|
|
38655
|
+
}
|
|
38656
|
+
else if (onKeyDown) {
|
|
38657
|
+
const rs = onKeyDown(e);
|
|
38658
|
+
if (rs) {
|
|
38659
|
+
setOpen(false);
|
|
38660
|
+
}
|
|
38661
|
+
}
|
|
38662
|
+
}, onPaste: (e) => {
|
|
38663
|
+
onPaste?.(e);
|
|
38664
|
+
setOpen(false);
|
|
38665
|
+
} }) }), jsxs(DropdownMenu$1, { className: "r-datepicker-popup formula-dropdown icon-dropdown p-0", container: container, style: { position: 'fixed', borderRadius: 8, zIndex: 9999 }, children: [jsxs("div", { className: "d-flex", style: { padding: 10, gap: 20 }, children: [jsxs("div", { children: [jsxs("div", { className: "select-month-year", children: [jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
38666
|
+
const newDate = new Date(viewDateFrom);
|
|
38667
|
+
newDate.setMonth(viewDateFrom.getMonth() - 1);
|
|
38668
|
+
setViewDateFrom(newDate);
|
|
38669
|
+
} }), jsxs("div", { className: "d-flex", children: [jsx("div", { className: "select-month", children: jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
|
|
38670
|
+
const newMonth = parseInt(e.value, 10);
|
|
38671
|
+
const newDate = new Date(viewDateFrom);
|
|
38672
|
+
newDate.setMonth(newMonth - 1);
|
|
38673
|
+
setViewDateFrom(newDate);
|
|
38674
|
+
}, value: optionsMonth.find((x) => x.value === viewDateFrom.getMonth() + 1) }) }), jsx("div", { className: "select-year", children: jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
|
|
38675
|
+
const newYear = parseInt(e.value, 10);
|
|
38676
|
+
const newDate = new Date(viewDateFrom);
|
|
38677
|
+
newDate.setFullYear(newYear);
|
|
38678
|
+
setViewDateFrom(newDate);
|
|
38679
|
+
}, value: { value: viewDateFrom.getFullYear(), label: viewDateFrom.getFullYear() } }) })] }), jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
38680
|
+
const newDate = new Date(viewDateFrom);
|
|
38681
|
+
newDate.setMonth(viewDateFrom.getMonth() + 1);
|
|
38682
|
+
setViewDateFrom(newDate);
|
|
38683
|
+
} })] }), jsx(DayPicker, { mode: "single", selected: from, onSelect: (d) => handleSelect(d), month: viewDateFrom, showOutsideDays: true, modifiers: {
|
|
38684
|
+
inRange: (day) => !!(from && to && day && day > from && day < to),
|
|
38685
|
+
rangeStart: from,
|
|
38686
|
+
rangeEnd: to
|
|
38687
|
+
}, modifiersClassNames: {
|
|
38688
|
+
inRange: 'rdp-in-range',
|
|
38689
|
+
rangeStart: 'rdp-selected',
|
|
38690
|
+
rangeEnd: 'rdp-selected'
|
|
38691
|
+
} })] }), jsxs("div", { children: [jsxs("div", { className: "select-month-year", children: [jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
38692
|
+
const newDate = new Date(viewDateTo);
|
|
38693
|
+
newDate.setMonth(viewDateTo.getMonth() - 1);
|
|
38694
|
+
setViewDateTo(newDate);
|
|
38695
|
+
} }), jsxs("div", { className: "d-flex", children: [jsx("div", { className: "select-month", children: jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
|
|
38696
|
+
const newMonth = parseInt(e.value, 10);
|
|
38697
|
+
const newDate = new Date(viewDateTo);
|
|
38698
|
+
newDate.setMonth(newMonth - 1);
|
|
38699
|
+
setViewDateTo(newDate);
|
|
38700
|
+
}, value: optionsMonth.find((x) => x.value === viewDateTo.getMonth() + 1) }) }), jsx("div", { className: "select-year", children: jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
|
|
38701
|
+
const newYear = parseInt(e.value, 10);
|
|
38702
|
+
const newDate = new Date(viewDateTo);
|
|
38703
|
+
newDate.setFullYear(newYear);
|
|
38704
|
+
setViewDateTo(newDate);
|
|
38705
|
+
}, value: { value: viewDateTo.getFullYear(), label: viewDateTo.getFullYear() } }) })] }), jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
38706
|
+
const newDate = new Date(viewDateTo);
|
|
38707
|
+
newDate.setMonth(viewDateTo.getMonth() + 1);
|
|
38708
|
+
setViewDateTo(newDate);
|
|
38709
|
+
} })] }), jsx(DayPicker, { mode: "single", selected: to, onSelect: (d) => handleSelect(d), month: viewDateTo, showOutsideDays: true, modifiers: {
|
|
38710
|
+
inRange: (day) => !!(from && to && day && day > from && day < to),
|
|
38711
|
+
rangeStart: from,
|
|
38712
|
+
rangeEnd: to
|
|
38713
|
+
}, modifiersClassNames: {
|
|
38714
|
+
inRange: 'rdp-in-range',
|
|
38715
|
+
rangeStart: 'rdp-selected',
|
|
38716
|
+
rangeEnd: 'rdp-selected'
|
|
38717
|
+
} })] })] }), jsxs("div", { className: "d-flex border-top ms-50", style: { gap: 20, paddingTop: 10 }, children: [jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Today') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Yesterday') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This week') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This month') })] })] })] }) }));
|
|
38718
|
+
});
|
|
38719
|
+
|
|
38720
|
+
const FilterComponent = ({ optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
|
|
38721
|
+
const { t } = useTranslation();
|
|
38722
|
+
const fieldFilter = column.fieldFilter ?? column.field;
|
|
38723
|
+
let typeFilter = column.filterType;
|
|
38724
|
+
if (!typeFilter) {
|
|
38725
|
+
if (column.type === 'numeric') {
|
|
38726
|
+
typeFilter = 'numeric';
|
|
38727
|
+
}
|
|
38728
|
+
else if (column.type === 'date' || column.type === 'datetime') {
|
|
38729
|
+
typeFilter = 'date';
|
|
38730
|
+
}
|
|
38731
|
+
else if (column.type === 'select') {
|
|
38732
|
+
typeFilter = 'select';
|
|
38733
|
+
}
|
|
38734
|
+
else {
|
|
38735
|
+
typeFilter = 'text';
|
|
38736
|
+
}
|
|
38737
|
+
}
|
|
38738
|
+
const handleSave = (typeFilter, filterValue, operator) => {
|
|
38739
|
+
if (!typeFilter && !filterValue) {
|
|
38740
|
+
changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
|
|
38741
|
+
setOpenFilter(false);
|
|
38742
|
+
return;
|
|
38743
|
+
}
|
|
38744
|
+
if (typeFilter === 'date') {
|
|
38745
|
+
const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal');
|
|
38746
|
+
if (from) {
|
|
38747
|
+
from.value = filterValue?.from;
|
|
38748
|
+
}
|
|
38749
|
+
else {
|
|
38750
|
+
filterBy.push({ key: fieldFilter, ope: 'greaterthanorequal', value: filterValue?.from });
|
|
38751
|
+
}
|
|
38752
|
+
const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal');
|
|
38753
|
+
if (to) {
|
|
38754
|
+
to.value = filterValue?.to;
|
|
38755
|
+
}
|
|
38756
|
+
else {
|
|
38757
|
+
filterBy.push({ key: fieldFilter, ope: 'lessthanorequal', value: filterValue?.to });
|
|
38758
|
+
}
|
|
38759
|
+
}
|
|
38760
|
+
else {
|
|
38761
|
+
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
38762
|
+
if (filter) {
|
|
38763
|
+
filter.ope = operator ?? 'equal';
|
|
38764
|
+
filter.value = filterValue ?? '';
|
|
38765
|
+
}
|
|
38766
|
+
else {
|
|
38767
|
+
filterBy.push({ key: fieldFilter, ope: operator ?? 'equal', value: filterValue ?? '' });
|
|
38768
|
+
}
|
|
38769
|
+
}
|
|
38770
|
+
changeFilter([...filterBy]);
|
|
38771
|
+
setOpenFilter(false);
|
|
38772
|
+
};
|
|
38773
|
+
/* eslint-disable */
|
|
38774
|
+
switch (typeFilter) {
|
|
38775
|
+
case 'text':
|
|
38776
|
+
return jsx(StringFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
38777
|
+
case 'numeric':
|
|
38778
|
+
return jsx(NumberFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave, formatSetting: formatSetting });
|
|
38779
|
+
case 'select':
|
|
38780
|
+
return jsx(SelectFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
38781
|
+
case 'date':
|
|
38782
|
+
return jsx(DateRangeFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
38783
|
+
default:
|
|
38784
|
+
return jsx("div", { children: t('No filter available') });
|
|
38785
|
+
}
|
|
38786
|
+
/* eslint-enable */
|
|
38787
|
+
};
|
|
38788
|
+
const StringFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
|
|
38789
|
+
const { t } = useTranslation();
|
|
38790
|
+
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
38791
|
+
const [operator, setOperator] = useState(filter?.ope ?? 'contains');
|
|
38792
|
+
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
38793
|
+
const options = [
|
|
38794
|
+
{ label: 'Bắt đầu bởi', value: 'startswith' },
|
|
38795
|
+
{ label: 'Kết thúc bởi', value: 'endswith' },
|
|
38796
|
+
{ label: 'Chứa', value: 'contains' },
|
|
38797
|
+
{ label: 'Bằng', value: 'equal' },
|
|
38798
|
+
{ label: 'Không bằng', value: 'notequal' }
|
|
38799
|
+
];
|
|
38800
|
+
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
38801
|
+
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
38802
|
+
setTimeout(() => {
|
|
38803
|
+
handleSave('text', valueFilter, operator);
|
|
38804
|
+
}, 100);
|
|
38805
|
+
e.stopPropagation();
|
|
38806
|
+
}
|
|
38807
|
+
}, children: [jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
|
|
38808
|
+
setOperator(val.value);
|
|
38809
|
+
}, placeholder: "Select" }), jsx(Input$1, { className: "my-1", value: valueFilter, onChange: (val) => {
|
|
38810
|
+
setValueFilter(val.target.value);
|
|
38811
|
+
} }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
38812
|
+
};
|
|
38813
|
+
const NumberFilterComponent = ({ column, filterBy, fieldFilter, handleSave, formatSetting }) => {
|
|
38814
|
+
const { t } = useTranslation();
|
|
38815
|
+
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
38816
|
+
const [operator, setOperator] = useState(filter?.ope ?? 'equal');
|
|
38817
|
+
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
38818
|
+
const options = [
|
|
38819
|
+
{ label: 'Lớn hơn', value: 'greaterthan' },
|
|
38820
|
+
{ label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
|
|
38821
|
+
{ label: 'Bằng', value: 'equal' },
|
|
38822
|
+
{ label: 'Bé hơn', value: 'lessthan' },
|
|
38823
|
+
{ label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
|
|
38824
|
+
];
|
|
38825
|
+
const numericFormatProps = {
|
|
38826
|
+
value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
|
|
38827
|
+
thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
38828
|
+
decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
38829
|
+
allowNegative: column.numericSettings?.allowNegative ?? false,
|
|
38830
|
+
decimalScale: column.numericSettings?.fraction ?? 0
|
|
38831
|
+
};
|
|
38832
|
+
let floatValue = parseFloat(valueFilter ?? '0');
|
|
38833
|
+
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
38834
|
+
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
38835
|
+
setTimeout(() => {
|
|
38836
|
+
handleSave('numeric', valueFilter, operator);
|
|
38837
|
+
}, 100);
|
|
38838
|
+
e.stopPropagation();
|
|
38839
|
+
}
|
|
38840
|
+
}, children: [jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
|
|
38841
|
+
setOperator(val.value);
|
|
38842
|
+
}, placeholder: t('Select') }), 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) => {
|
|
38843
|
+
floatValue = values?.floatValue;
|
|
38844
|
+
}, onFocus: (e) => {
|
|
38845
|
+
e.target.setSelectionRange(0, e.target.innerText.length - 1);
|
|
38846
|
+
}, onBlur: () => {
|
|
38847
|
+
if (floatValue !== valueFilter) {
|
|
38848
|
+
setValueFilter(!isNaN(floatValue) ? floatValue : 0);
|
|
38849
|
+
}
|
|
38850
|
+
} }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
38851
|
+
};
|
|
38852
|
+
const SelectFilterComponent = ({ column, filterBy, handleSave, fieldFilter, optionsFilter }) => {
|
|
38853
|
+
const { t } = useTranslation();
|
|
38854
|
+
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
38855
|
+
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
38856
|
+
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
38857
|
+
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
38858
|
+
setTimeout(() => {
|
|
38859
|
+
handleSave('select', valueFilter, 'equal');
|
|
38860
|
+
}, 100);
|
|
38861
|
+
e.stopPropagation();
|
|
38862
|
+
}
|
|
38863
|
+
}, children: [jsx("div", { className: "mb-1", children: 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) => {
|
|
38864
|
+
setValueFilter(val?.value);
|
|
38865
|
+
}, placeholder: t('Select') }) }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
38866
|
+
};
|
|
38867
|
+
const DateRangeFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
|
|
38868
|
+
const { t } = useTranslation();
|
|
38869
|
+
const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal')?.value;
|
|
38870
|
+
const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal')?.value;
|
|
38871
|
+
const [valueFilter, setValueFilter] = useState({ from: from ?? undefined, to: to ?? undefined });
|
|
38872
|
+
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
38873
|
+
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
38874
|
+
setTimeout(() => {
|
|
38875
|
+
handleSave('date', valueFilter);
|
|
38876
|
+
}, 100);
|
|
38877
|
+
e.stopPropagation();
|
|
38878
|
+
}
|
|
38879
|
+
}, children: [jsx("div", { className: "mb-1", children: jsx(DateRangePicker, { dateFormat: "dd/MM/yyyy", value: valueFilter, onChange: (date) => {
|
|
38880
|
+
setValueFilter(date);
|
|
38881
|
+
} }) }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
38882
|
+
};
|
|
38883
|
+
|
|
38884
|
+
const HeaderTableCol = (props) => {
|
|
38589
38885
|
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;
|
|
38590
38886
|
const { t } = useTranslation();
|
|
38591
38887
|
const headerRef = useRef(null);
|
|
38592
38888
|
const order = orderBy.find((item) => item.key === col.field);
|
|
38593
38889
|
const [openFilter, setOpenFilter] = useState(false);
|
|
38594
38890
|
const filter = filterBy.find((item) => item.key === col.field);
|
|
38595
|
-
const herderContent = col.headerDisplay ??
|
|
38891
|
+
const herderContent = col.headerDisplay ?? col.headerText ?? '';
|
|
38596
38892
|
const handleResize = (e, { size }) => {
|
|
38597
38893
|
if (size.width > 50) {
|
|
38598
38894
|
const newColumns = [...columns];
|
|
@@ -38605,7 +38901,7 @@ const HeaderTableCol$1 = (props) => {
|
|
|
38605
38901
|
const checkOverflow = () => {
|
|
38606
38902
|
return headerRef.current && headerRef.current.scrollHeight > headerRef.current.clientHeight;
|
|
38607
38903
|
};
|
|
38608
|
-
return (jsx(Fragment, { children: col.visible !== false && (jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ??
|
|
38904
|
+
return (jsx(Fragment, { children: col.visible !== false && (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: 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: {
|
|
38609
38905
|
top: `${indexParent * 42}px`,
|
|
38610
38906
|
left: col.fixedType === 'left' ? objHeaderWidthFixLeft[`${indexParent}-${indexCol ?? 0}`] : undefined,
|
|
38611
38907
|
right: col.fixedType === 'right' ? objHeaderWidthFixRight[`${indexParent}-${indexCol ?? 0}`] : undefined
|
|
@@ -38626,96 +38922,23 @@ const HeaderTableCol$1 = (props) => {
|
|
|
38626
38922
|
}, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting }), children: [col.field === 'checkbox' && (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) => {
|
|
38627
38923
|
if (selectEnable) {
|
|
38628
38924
|
if (e.target.checked) {
|
|
38629
|
-
setSelectedRows(dataSource.map((item) => {
|
|
38925
|
+
setSelectedRows(dataSource.map((item) => {
|
|
38926
|
+
return item;
|
|
38927
|
+
}));
|
|
38630
38928
|
}
|
|
38631
38929
|
else {
|
|
38632
38930
|
setSelectedRows([]);
|
|
38633
38931
|
}
|
|
38634
38932
|
}
|
|
38635
|
-
} })), col.field !== 'checkbox' && jsxs(Fragment$1, { children: [jsxs("div", { className:
|
|
38933
|
+
} })), col.field !== 'checkbox' && (jsxs(Fragment$1, { children: [jsxs("div", { className: "header-content", style: { justifyContent: col.textAlign ?? 'left' }, children: [jsx("span", { id: `header-${idTable}-${indexParent}-${indexCol}`, ref: headerRef, className: "text-content", children: t(herderContent) }), checkOverflow() && (jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `header-${idTable}-${indexParent}-${indexCol}`, children: t(herderContent) }))] }), col.field !== '#' && col.field !== 'command' && (jsxs("div", { className: "d-flex", children: [allowSorting && order?.direction === 'asc' && (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsx("g", { "clip-path": "url(#clip0_520_6)", children: 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" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_520_6", children: jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowSorting && order?.direction === 'desc' && (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsx("g", { "clip-path": "url(#clip0_520_2)", children: 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" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_520_2", children: jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowFiltering && (col.columns?.length ?? 0) === 0 && col.allowFilter !== false && (jsxs(Dropdown$1$1, { isOpen: openFilter, toggle: (e) => {
|
|
38636
38934
|
setOpenFilter(!openFilter);
|
|
38637
38935
|
e.stopPropagation();
|
|
38638
38936
|
}, onClick: (e) => {
|
|
38639
38937
|
e.stopPropagation();
|
|
38640
|
-
}, children: [jsx(DropdownToggle$1, { tag:
|
|
38938
|
+
}, children: [jsx(DropdownToggle$1, { tag: "div", className: "p-0 r-filter", children: 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: [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" }), ' '] }) }), jsx(DropdownMenu$1, { container: container, className: "formula-dropdown icon-dropdown p-0", style: {
|
|
38641
38939
|
borderRadius: 8,
|
|
38642
38940
|
zIndex: 1056
|
|
38643
|
-
}, children: jsx(DropdownItem$1, { className:
|
|
38644
|
-
};
|
|
38645
|
-
const RenderFilterElement = ({ filter, optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
|
|
38646
|
-
const { t } = useTranslation();
|
|
38647
|
-
const [operator, setOperator] = useState(filter?.ope ?? ((!column.filterType && column.type === 'numeric') || column.filterType === 'select' ? 'equal' : 'contains'));
|
|
38648
|
-
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
38649
|
-
const fieldFilter = column.fieldFilter ?? column.field;
|
|
38650
|
-
const RenderStringFilter = () => {
|
|
38651
|
-
const options = [
|
|
38652
|
-
{ label: 'Bắt đầu bởi', value: 'startswith' },
|
|
38653
|
-
{ label: 'Kết thúc bởi', value: 'endswith' },
|
|
38654
|
-
{ label: 'Chứa', value: 'contains' },
|
|
38655
|
-
{ label: 'Bằng', value: 'equal' },
|
|
38656
|
-
{ label: 'Không bằng', value: 'notequal' }
|
|
38657
|
-
];
|
|
38658
|
-
return (jsxs(Fragment$1, { children: [jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
|
|
38659
|
-
setOperator(val.value);
|
|
38660
|
-
}, placeholder: 'Select' }), jsx(Input$1, { className: 'my-1', value: valueFilter, onChange: (val) => {
|
|
38661
|
-
setValueFilter(val.target.value);
|
|
38662
|
-
} })] }));
|
|
38663
|
-
};
|
|
38664
|
-
const RenderNumberFilter = () => {
|
|
38665
|
-
const options = [
|
|
38666
|
-
{ label: 'Lớn hơn', value: 'greaterthan' },
|
|
38667
|
-
{ label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
|
|
38668
|
-
{ label: 'Bằng', value: 'equal' },
|
|
38669
|
-
{ label: 'Bé hơn', value: 'lessthan' },
|
|
38670
|
-
{ label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
|
|
38671
|
-
];
|
|
38672
|
-
const numericFormatProps = {
|
|
38673
|
-
value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
|
|
38674
|
-
thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
38675
|
-
decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
38676
|
-
allowNegative: column.numericSettings?.allowNegative ?? false,
|
|
38677
|
-
decimalScale: column.numericSettings?.fraction ?? 0
|
|
38678
|
-
};
|
|
38679
|
-
let floatValue = parseFloat(valueFilter ?? '0');
|
|
38680
|
-
return (jsxs(Fragment$1, { children: [jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
|
|
38681
|
-
setOperator(val.value);
|
|
38682
|
-
}, placeholder: t('Select') }), 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) => {
|
|
38683
|
-
floatValue = values?.floatValue;
|
|
38684
|
-
}, onFocus: (e) => {
|
|
38685
|
-
e.target.setSelectionRange(0, e.target.innerText.length - 1);
|
|
38686
|
-
}, onBlur: () => {
|
|
38687
|
-
if (floatValue !== valueFilter) {
|
|
38688
|
-
setValueFilter(!isNaN(floatValue) ? floatValue : 0);
|
|
38689
|
-
}
|
|
38690
|
-
} })] }));
|
|
38691
|
-
};
|
|
38692
|
-
const RenderSelectFilter = () => {
|
|
38693
|
-
return (jsx("div", { className: 'mb-1', children: jsx(SelectTable, { value: optionsFilter ? optionsFilter[fieldFilter]?.find((x) => x.value === valueFilter) : undefined, options: (optionsFilter && optionsFilter[fieldFilter]) ?? [], isClearable: true, onChange: (val) => {
|
|
38694
|
-
setValueFilter(val?.value);
|
|
38695
|
-
}, placeholder: t('Select') }) }));
|
|
38696
|
-
};
|
|
38697
|
-
const handleSave = () => {
|
|
38698
|
-
if (filter) {
|
|
38699
|
-
filter.ope = operator;
|
|
38700
|
-
filter.value = valueFilter ?? '';
|
|
38701
|
-
}
|
|
38702
|
-
else {
|
|
38703
|
-
filterBy.push({ key: fieldFilter, ope: operator, value: valueFilter ?? '' });
|
|
38704
|
-
}
|
|
38705
|
-
changeFilter([...filterBy]);
|
|
38706
|
-
setOpenFilter(false);
|
|
38707
|
-
};
|
|
38708
|
-
return (jsxs("div", { className: 'r-filter-popup', onKeyDown: (e) => {
|
|
38709
|
-
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
38710
|
-
handleSave();
|
|
38711
|
-
e.stopPropagation();
|
|
38712
|
-
}
|
|
38713
|
-
}, children: [((!column.filterType && column.type === 'numeric') || column.filterType === 'numeric') ? jsxs(Fragment$1, { children: [RenderNumberFilter(), " "] }) : (column.filterType === 'select' ? jsxs(Fragment$1, { children: [" ", RenderSelectFilter(), " "] }) : RenderStringFilter()), jsxs("div", { className: 'd-flex justify-content-end', children: [jsx(Button$1$1, { color: 'primary', style: { borderRadius: 3 }, className: 'me-50 py-25 px-50 fw-bold', onClick: handleSave, children: t('Filter') }), jsx(Button$1$1, { className: 'py-25 px-50 fw-bold', color: 'white', style: { borderRadius: 3, borderWidth: 0 }, onClick: () => {
|
|
38714
|
-
if (filterBy) {
|
|
38715
|
-
changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
|
|
38716
|
-
}
|
|
38717
|
-
setOpenFilter(false);
|
|
38718
|
-
}, children: t('Clear') })] })] }));
|
|
38941
|
+
}, children: jsx(DropdownItem$1, { className: "p-1", style: { borderRadius: '6px' }, tag: "div", header: true, children: jsx(FilterComponent, { setOpenFilter: setOpenFilter, filterBy: filterBy, optionsFilter: optionsFilter, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] }))] }))] }))] }) }) })) }, `header-${indexCol}`));
|
|
38719
38942
|
};
|
|
38720
38943
|
|
|
38721
38944
|
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 }) => {
|
|
@@ -38728,7 +38951,7 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
|
|
|
38728
38951
|
const visibleCount = Math.ceil(height / rowHeight) + 5; // buffer
|
|
38729
38952
|
const startIndex = Math.floor(scrollTop / rowHeight);
|
|
38730
38953
|
const endIndex = Math.min(startIndex + visibleCount, filteredData.length);
|
|
38731
|
-
const offsetY =
|
|
38954
|
+
const offsetY = startIndex * rowHeight;
|
|
38732
38955
|
const rafId = useRef(null);
|
|
38733
38956
|
useEffect(() => {
|
|
38734
38957
|
const el = containerRef.current;
|
|
@@ -38743,17 +38966,17 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
|
|
|
38743
38966
|
setScrollTop(el.scrollTop);
|
|
38744
38967
|
});
|
|
38745
38968
|
};
|
|
38746
|
-
el.addEventListener(
|
|
38969
|
+
el.addEventListener('scroll', onScroll);
|
|
38747
38970
|
return () => {
|
|
38748
|
-
el.removeEventListener(
|
|
38971
|
+
el.removeEventListener('scroll', onScroll);
|
|
38749
38972
|
if (rafId.current) {
|
|
38750
38973
|
cancelAnimationFrame(rafId.current);
|
|
38751
38974
|
}
|
|
38752
38975
|
};
|
|
38753
38976
|
}, []);
|
|
38754
|
-
return (jsx("div", { ref: containerRef, className: "r-gridtable", style: { maxHeight: `${height ? `${height}px` :
|
|
38977
|
+
return (jsx("div", { ref: containerRef, className: "r-gridtable", style: { maxHeight: `${height ? `${height}px` : 'auto'}` }, children: jsxs("table", { style: { width: '100%' }, role: "presentation", children: [jsx(RenderColGroup, { contentColumns: visibleColumns }), jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((element, indexParent) => {
|
|
38755
38978
|
return (jsx("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
|
|
38756
|
-
return (jsx(HeaderTableCol
|
|
38979
|
+
return (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) => {
|
|
38757
38980
|
setFilterBy([...val]);
|
|
38758
38981
|
}, changeOrder: (val) => {
|
|
38759
38982
|
setOrderBy([...val]);
|
|
@@ -38762,10 +38985,10 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
|
|
|
38762
38985
|
}) }), jsxs("tbody", { className: "r-gridcontent", role: "rowgroup", children: [jsx("tr", { style: { height: offsetY } }), filteredData.slice(startIndex, endIndex).map((row) => {
|
|
38763
38986
|
const indexRow = row.indexRow;
|
|
38764
38987
|
const isSelected = selectedRows?.some((x) => x[fieldKey] === row.data[fieldKey]);
|
|
38765
|
-
return (jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1(
|
|
38766
|
-
}), jsx("tr", { style: { height: totalHeight -
|
|
38767
|
-
return
|
|
38768
|
-
}) }) })] }) }));
|
|
38988
|
+
return (jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1('r-row'), children: contentColumns.map((col, indexCol) => (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));
|
|
38989
|
+
}), jsx("tr", { style: { height: totalHeight - endIndex * rowHeight } })] }), jsx("tfoot", { className: "r-gridfoot", children: haveSum && (jsx("tr", { className: "r-row", children: contentColumns.map((col, index) => {
|
|
38990
|
+
return jsx(FooterCol, { col: col, dataSource: dataSource, indexCol: index, objWidthFix: { ...objWidthFixLeft, ...objWidthFixRight }, formatSetting: formatSetting });
|
|
38991
|
+
}) })) })] }) }));
|
|
38769
38992
|
};
|
|
38770
38993
|
|
|
38771
38994
|
const handleArrowRight = (e, params) => {
|
|
@@ -39880,7 +40103,7 @@ const TableEdit = forwardRef((props, ref) => {
|
|
|
39880
40103
|
}
|
|
39881
40104
|
}
|
|
39882
40105
|
};
|
|
39883
|
-
return (jsx(Fragment, { children: jsxs("div", { className: "r-table-edit", children: [jsxs("div", { className: "r-grid", ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption
|
|
40106
|
+
return (jsx(Fragment, { children: jsxs("div", { className: "r-table-edit", children: [jsxs("div", { className: "r-grid", ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), 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: () => {
|
|
39884
40107
|
handleDuplicate(dataSource, startCell.row, fieldKey, defaultValue, fieldUniKey, changeDataSource, containerRef, totalCount, toolbarSetting, buttonSetting, editDisable, addDisable, onDuplicate);
|
|
39885
40108
|
}, setContentColumns: (newColumns) => {
|
|
39886
40109
|
setContentColumns(newColumns);
|
|
@@ -68308,6 +68531,27 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
|
|
|
68308
68531
|
}) }) }), jsx("div", { onClick: () => handleScroll(200), className: classNames$1('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronRight, {}) })] })] }));
|
|
68309
68532
|
};
|
|
68310
68533
|
|
|
68534
|
+
const ExpandAllIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
|
|
68535
|
+
return (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: {
|
|
68536
|
+
userSelect: 'none',
|
|
68537
|
+
...style
|
|
68538
|
+
}, onClick: onClick, children: 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" }) }));
|
|
68539
|
+
};
|
|
68540
|
+
|
|
68541
|
+
const GroupIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
|
|
68542
|
+
return (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: {
|
|
68543
|
+
userSelect: 'none',
|
|
68544
|
+
...style
|
|
68545
|
+
}, onClick: onClick, children: [jsx("rect", { x: "1", y: "11", width: "8", height: "2", rx: "0.8", fill: "currentColor" }), jsx("rect", { x: "4", y: "8", width: "2", height: "8", rx: "0.8", fill: "currentColor" }), jsx("mask", { id: "path-3-inside-1_547_22", fill: "white", children: jsx("rect", { x: "11", y: "17", width: "12", height: "5", rx: "1" }) }), 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)" }), jsx("mask", { id: "path-4-inside-2_547_22", fill: "white", children: jsx("rect", { x: "11", y: "8", width: "12", height: "8", rx: "1" }) }), 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)" }), jsx("mask", { id: "path-5-inside-3_547_22", fill: "white", children: jsx("rect", { x: "11", y: "2", width: "12", height: "5", rx: "1" }) }), 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)" })] }));
|
|
68546
|
+
};
|
|
68547
|
+
|
|
68548
|
+
const UnExpandAllIcon = ({ className, color = '#7F7F7F', size = 24, onClick, style }) => {
|
|
68549
|
+
return (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: {
|
|
68550
|
+
userSelect: 'none',
|
|
68551
|
+
...style
|
|
68552
|
+
}, onClick: onClick, children: [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" }), jsx("rect", { x: "14", y: "11", width: "4", height: "4", fill: "currentColor" }), jsx("rect", { x: "14", y: "17", width: "4", height: "4", fill: "currentColor" })] }));
|
|
68553
|
+
};
|
|
68554
|
+
|
|
68311
68555
|
const RenderContentCol = (props) => {
|
|
68312
68556
|
const { col, indexCol, indexRow, isSelected, row, formatSetting, idTable, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, selectedRows, selectEnable, setSelectedRows, fieldKey, isMulti } = props;
|
|
68313
68557
|
const RenderElement = () => {
|
|
@@ -68352,10 +68596,10 @@ const RenderContentCol = (props) => {
|
|
|
68352
68596
|
}
|
|
68353
68597
|
return (jsx("div", { className: classNames$1('r-rowcell-div'), children: jsxs("div", { className: classNames$1('r-rowcell-content'), style: {
|
|
68354
68598
|
textAlign: col.textAlign ? col.textAlign : 'left'
|
|
68355
|
-
}, children: [jsx("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children:
|
|
68599
|
+
}, children: [jsx("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value }), col.haveToolTip && (jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value }))] }) }));
|
|
68356
68600
|
}
|
|
68357
68601
|
};
|
|
68358
|
-
return jsx(Fragment$1, { children:
|
|
68602
|
+
return (jsx(Fragment$1, { children: col.visible !== false && (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: {
|
|
68359
68603
|
left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
|
|
68360
68604
|
right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined
|
|
68361
68605
|
}, onClick: (e) => {
|
|
@@ -68382,375 +68626,10 @@ const RenderContentCol = (props) => {
|
|
|
68382
68626
|
}
|
|
68383
68627
|
e.stopPropagation();
|
|
68384
68628
|
}
|
|
68385
|
-
}, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) });
|
|
68386
|
-
};
|
|
68387
|
-
|
|
68388
|
-
const DateRangePicker = forwardRef((props, ref) => {
|
|
68389
|
-
const { id, onKeyDown, className, invalid, container, onPaste, onChange, value } = props;
|
|
68390
|
-
const dateFormat = props.dateFormat ?? 'dd/MM/yyyy';
|
|
68391
|
-
const { from, to } = value || {};
|
|
68392
|
-
const currentDate = new Date();
|
|
68393
|
-
const { t } = useTranslation();
|
|
68394
|
-
const [viewDateFrom, setViewDateFrom] = useState(from ? new Date(from) : currentDate);
|
|
68395
|
-
const [viewDateTo, setViewDateTo] = useState(to ? new Date(to) : addMonths(currentDate, 1));
|
|
68396
|
-
const [open, setOpen] = useState(false);
|
|
68397
|
-
const formatDisplay = (f, t) => {
|
|
68398
|
-
if (f && t) {
|
|
68399
|
-
return `${formatDateTime(f, dateFormat)} - ${formatDateTime(t, dateFormat)}`;
|
|
68400
|
-
}
|
|
68401
|
-
if (f) {
|
|
68402
|
-
return `${formatDateTime(f, dateFormat)} - `;
|
|
68403
|
-
}
|
|
68404
|
-
return '';
|
|
68405
|
-
};
|
|
68406
|
-
const [inputValue, setInputValue] = useState(formatDisplay(from, to));
|
|
68407
|
-
const toggle = () => setOpen((prev) => !prev);
|
|
68408
|
-
const handleSelect = (selected) => {
|
|
68409
|
-
let newRange = { from, to };
|
|
68410
|
-
if (!newRange.from || (selected && selected < newRange.from)) {
|
|
68411
|
-
newRange = { from: selected, to };
|
|
68412
|
-
setViewDateFrom(selected || currentDate);
|
|
68413
|
-
}
|
|
68414
|
-
else if (newRange.from && selected && selected > newRange.from && (!newRange.to || selected < newRange.to)) {
|
|
68415
|
-
newRange = { from, to: selected };
|
|
68416
|
-
setViewDateTo(selected || currentDate);
|
|
68417
|
-
}
|
|
68418
|
-
else if (newRange.to && selected && selected > newRange.to) {
|
|
68419
|
-
newRange = { from, to: selected };
|
|
68420
|
-
setViewDateTo(selected || currentDate);
|
|
68421
|
-
}
|
|
68422
|
-
onChange(newRange);
|
|
68423
|
-
setInputValue(formatDisplay(newRange.from, newRange.to));
|
|
68424
|
-
};
|
|
68425
|
-
const handleChange = (e) => {
|
|
68426
|
-
const v = e.target.value;
|
|
68427
|
-
setInputValue(v);
|
|
68428
|
-
const parts = v.split('-').map((p) => p.trim());
|
|
68429
|
-
if (parts.length === 2 && parts[0].length === 10 && parts[1].length === 10) {
|
|
68430
|
-
const parsedFrom = parse(parts[0], dateFormat, currentDate);
|
|
68431
|
-
const parsedTo = parse(parts[1], dateFormat, currentDate);
|
|
68432
|
-
if (!isNaN(parsedFrom.getTime()) && !isNaN(parsedTo.getTime())) {
|
|
68433
|
-
onChange({ from: parsedFrom, to: parsedTo });
|
|
68434
|
-
}
|
|
68435
|
-
}
|
|
68436
|
-
};
|
|
68437
|
-
const optionsMonth = [
|
|
68438
|
-
{ value: 1, label: t('January') },
|
|
68439
|
-
{ value: 2, label: t('February') },
|
|
68440
|
-
{ value: 3, label: t('March') },
|
|
68441
|
-
{ value: 4, label: t('April') },
|
|
68442
|
-
{ value: 5, label: t('May') },
|
|
68443
|
-
{ value: 6, label: t('June') },
|
|
68444
|
-
{ value: 7, label: t('July') },
|
|
68445
|
-
{ value: 8, label: t('August') },
|
|
68446
|
-
{ value: 9, label: t('September') },
|
|
68447
|
-
{ value: 10, label: t('October') },
|
|
68448
|
-
{ value: 11, label: t('November') },
|
|
68449
|
-
{ value: 12, label: t('December') }
|
|
68450
|
-
];
|
|
68451
|
-
const getMaskFromFormat = () => '99/99/9999 -> 99/99/9999';
|
|
68452
|
-
return (jsx("div", { className: classNames$1('r-daterangepicker', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxs(Dropdown$1$1, { className: className, isOpen: open, toggle: toggle, children: [jsx(DropdownToggle$1, { tag: "div", "data-toggle": "dropdown", "aria-expanded": open, className: "d-flex align-items-center", style: { cursor: 'pointer' }, children: jsx(InputMask, { mask: getMaskFromFormat(), value: inputValue, onChange: handleChange, placeholder: "dd/mm/yyyy -> dd/mm/yyyy", className: "form-control", style: { width: 230 }, onKeyDown: (e) => {
|
|
68453
|
-
if (e.code === 'Space') {
|
|
68454
|
-
setOpen(!open);
|
|
68455
|
-
}
|
|
68456
|
-
else if (onKeyDown) {
|
|
68457
|
-
const rs = onKeyDown(e);
|
|
68458
|
-
if (rs) {
|
|
68459
|
-
setOpen(false);
|
|
68460
|
-
}
|
|
68461
|
-
}
|
|
68462
|
-
}, onPaste: (e) => {
|
|
68463
|
-
onPaste?.(e);
|
|
68464
|
-
setOpen(false);
|
|
68465
|
-
} }) }), jsxs(DropdownMenu$1, { className: "r-datepicker-popup formula-dropdown icon-dropdown p-0", container: container, style: { position: 'fixed', borderRadius: 8, zIndex: 9999 }, children: [jsxs("div", { className: "d-flex", style: { padding: 10, gap: 20 }, children: [jsxs("div", { children: [jsxs("div", { className: "select-month-year", children: [jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
68466
|
-
const newDate = new Date(viewDateFrom);
|
|
68467
|
-
newDate.setMonth(viewDateFrom.getMonth() - 1);
|
|
68468
|
-
setViewDateFrom(newDate);
|
|
68469
|
-
} }), jsxs("div", { className: "d-flex", children: [jsx("div", { className: "select-month", children: jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
|
|
68470
|
-
const newMonth = parseInt(e.value, 10);
|
|
68471
|
-
const newDate = new Date(viewDateFrom);
|
|
68472
|
-
newDate.setMonth(newMonth - 1);
|
|
68473
|
-
setViewDateFrom(newDate);
|
|
68474
|
-
}, value: optionsMonth.find((x) => x.value === viewDateFrom.getMonth() + 1) }) }), jsx("div", { className: "select-year", children: jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
|
|
68475
|
-
const newYear = parseInt(e.value, 10);
|
|
68476
|
-
const newDate = new Date(viewDateFrom);
|
|
68477
|
-
newDate.setFullYear(newYear);
|
|
68478
|
-
setViewDateFrom(newDate);
|
|
68479
|
-
}, value: { value: viewDateFrom.getFullYear(), label: viewDateFrom.getFullYear() } }) })] }), jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
68480
|
-
const newDate = new Date(viewDateFrom);
|
|
68481
|
-
newDate.setMonth(viewDateFrom.getMonth() + 1);
|
|
68482
|
-
setViewDateFrom(newDate);
|
|
68483
|
-
} })] }), jsx(DayPicker, { mode: "single", selected: from, onSelect: (d) => handleSelect(d), month: viewDateFrom, showOutsideDays: true, modifiers: {
|
|
68484
|
-
inRange: (day) => !!(from && to && day && day > from && day < to),
|
|
68485
|
-
rangeStart: from,
|
|
68486
|
-
rangeEnd: to
|
|
68487
|
-
}, modifiersClassNames: {
|
|
68488
|
-
inRange: 'rdp-in-range',
|
|
68489
|
-
rangeStart: 'rdp-selected',
|
|
68490
|
-
rangeEnd: 'rdp-selected'
|
|
68491
|
-
} })] }), jsxs("div", { children: [jsxs("div", { className: "select-month-year", children: [jsx(SvgChevronLeft, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
68492
|
-
const newDate = new Date(viewDateTo);
|
|
68493
|
-
newDate.setMonth(viewDateTo.getMonth() - 1);
|
|
68494
|
-
setViewDateTo(newDate);
|
|
68495
|
-
} }), jsxs("div", { className: "d-flex", children: [jsx("div", { className: "select-month", children: jsx(SelectTable, { options: optionsMonth, onChange: (e) => {
|
|
68496
|
-
const newMonth = parseInt(e.value, 10);
|
|
68497
|
-
const newDate = new Date(viewDateTo);
|
|
68498
|
-
newDate.setMonth(newMonth - 1);
|
|
68499
|
-
setViewDateTo(newDate);
|
|
68500
|
-
}, value: optionsMonth.find((x) => x.value === viewDateTo.getMonth() + 1) }) }), jsx("div", { className: "select-year", children: jsx(SelectTable, { options: Array.from({ length: 200 }, (_, i) => 1900 + i).map((x) => ({ value: x, label: x })), onChange: (e) => {
|
|
68501
|
-
const newYear = parseInt(e.value, 10);
|
|
68502
|
-
const newDate = new Date(viewDateTo);
|
|
68503
|
-
newDate.setFullYear(newYear);
|
|
68504
|
-
setViewDateTo(newDate);
|
|
68505
|
-
}, value: { value: viewDateTo.getFullYear(), label: viewDateTo.getFullYear() } }) })] }), jsx(SvgChevronRight, { cursor: 'pointer', fontSize: 22, onClick: () => {
|
|
68506
|
-
const newDate = new Date(viewDateTo);
|
|
68507
|
-
newDate.setMonth(viewDateTo.getMonth() + 1);
|
|
68508
|
-
setViewDateTo(newDate);
|
|
68509
|
-
} })] }), jsx(DayPicker, { mode: "single", selected: to, onSelect: (d) => handleSelect(d), month: viewDateTo, showOutsideDays: true, modifiers: {
|
|
68510
|
-
inRange: (day) => !!(from && to && day && day > from && day < to),
|
|
68511
|
-
rangeStart: from,
|
|
68512
|
-
rangeEnd: to
|
|
68513
|
-
}, modifiersClassNames: {
|
|
68514
|
-
inRange: 'rdp-in-range',
|
|
68515
|
-
rangeStart: 'rdp-selected',
|
|
68516
|
-
rangeEnd: 'rdp-selected'
|
|
68517
|
-
} })] })] }), jsxs("div", { className: "d-flex border-top ms-50", style: { gap: 20, paddingTop: 10 }, children: [jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Today') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('Yesterday') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This week') }), jsx("div", { className: "btn-today", onClick: () => onChange({ from: currentDate, to: currentDate }), children: t('This month') })] })] })] }) }));
|
|
68518
|
-
});
|
|
68519
|
-
|
|
68520
|
-
const FilterComponent = ({ optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
|
|
68521
|
-
const { t } = useTranslation();
|
|
68522
|
-
const fieldFilter = column.fieldFilter ?? column.field;
|
|
68523
|
-
let typeFilter = column.filterType;
|
|
68524
|
-
if (!typeFilter) {
|
|
68525
|
-
if (column.type === 'numeric') {
|
|
68526
|
-
typeFilter = 'numeric';
|
|
68527
|
-
}
|
|
68528
|
-
else if (column.type === 'date' || column.type === 'datetime') {
|
|
68529
|
-
typeFilter = 'date';
|
|
68530
|
-
}
|
|
68531
|
-
else if (column.type === 'select') {
|
|
68532
|
-
typeFilter = 'select';
|
|
68533
|
-
}
|
|
68534
|
-
else {
|
|
68535
|
-
typeFilter = 'text';
|
|
68536
|
-
}
|
|
68537
|
-
}
|
|
68538
|
-
const handleSave = (typeFilter, filterValue, operator) => {
|
|
68539
|
-
if (!typeFilter && !filterValue) {
|
|
68540
|
-
changeFilter(filterBy.filter((x) => x.key !== fieldFilter));
|
|
68541
|
-
setOpenFilter(false);
|
|
68542
|
-
return;
|
|
68543
|
-
}
|
|
68544
|
-
if (typeFilter === 'date') {
|
|
68545
|
-
const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal');
|
|
68546
|
-
if (from) {
|
|
68547
|
-
from.value = filterValue?.from;
|
|
68548
|
-
}
|
|
68549
|
-
else {
|
|
68550
|
-
filterBy.push({ key: fieldFilter, ope: 'greaterthanorequal', value: filterValue?.from });
|
|
68551
|
-
}
|
|
68552
|
-
const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal');
|
|
68553
|
-
if (to) {
|
|
68554
|
-
to.value = filterValue?.to;
|
|
68555
|
-
}
|
|
68556
|
-
else {
|
|
68557
|
-
filterBy.push({ key: fieldFilter, ope: 'lessthanorequal', value: filterValue?.to });
|
|
68558
|
-
}
|
|
68559
|
-
}
|
|
68560
|
-
else {
|
|
68561
|
-
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
68562
|
-
if (filter) {
|
|
68563
|
-
filter.ope = operator ?? 'equal';
|
|
68564
|
-
filter.value = filterValue ?? '';
|
|
68565
|
-
}
|
|
68566
|
-
else {
|
|
68567
|
-
filterBy.push({ key: fieldFilter, ope: operator ?? 'equal', value: filterValue ?? '' });
|
|
68568
|
-
}
|
|
68569
|
-
}
|
|
68570
|
-
changeFilter([...filterBy]);
|
|
68571
|
-
setOpenFilter(false);
|
|
68572
|
-
};
|
|
68573
|
-
/* eslint-disable */
|
|
68574
|
-
switch (typeFilter) {
|
|
68575
|
-
case 'text':
|
|
68576
|
-
return jsx(StringFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
68577
|
-
case 'numeric':
|
|
68578
|
-
return jsx(NumberFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave, formatSetting: formatSetting });
|
|
68579
|
-
case 'select':
|
|
68580
|
-
return jsx(SelectFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
68581
|
-
case 'date':
|
|
68582
|
-
return jsx(DateRangeFilterComponent, { fieldFilter: fieldFilter, optionsFilter: optionsFilter, filterBy: filterBy, column: column, handleSave: handleSave });
|
|
68583
|
-
default:
|
|
68584
|
-
return jsx("div", { children: t('No filter available') });
|
|
68585
|
-
}
|
|
68586
|
-
/* eslint-enable */
|
|
68587
|
-
};
|
|
68588
|
-
const StringFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
|
|
68589
|
-
const { t } = useTranslation();
|
|
68590
|
-
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
68591
|
-
const [operator, setOperator] = useState(filter?.ope ?? 'contains');
|
|
68592
|
-
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
68593
|
-
const options = [
|
|
68594
|
-
{ label: 'Bắt đầu bởi', value: 'startswith' },
|
|
68595
|
-
{ label: 'Kết thúc bởi', value: 'endswith' },
|
|
68596
|
-
{ label: 'Chứa', value: 'contains' },
|
|
68597
|
-
{ label: 'Bằng', value: 'equal' },
|
|
68598
|
-
{ label: 'Không bằng', value: 'notequal' }
|
|
68599
|
-
];
|
|
68600
|
-
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
68601
|
-
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
68602
|
-
setTimeout(() => {
|
|
68603
|
-
handleSave('text', valueFilter, operator);
|
|
68604
|
-
}, 100);
|
|
68605
|
-
e.stopPropagation();
|
|
68606
|
-
}
|
|
68607
|
-
}, children: [jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
|
|
68608
|
-
setOperator(val.value);
|
|
68609
|
-
}, placeholder: "Select" }), jsx(Input$1, { className: "my-1", value: valueFilter, onChange: (val) => {
|
|
68610
|
-
setValueFilter(val.target.value);
|
|
68611
|
-
} }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
68612
|
-
};
|
|
68613
|
-
const NumberFilterComponent = ({ column, filterBy, fieldFilter, handleSave, formatSetting }) => {
|
|
68614
|
-
const { t } = useTranslation();
|
|
68615
|
-
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
68616
|
-
const [operator, setOperator] = useState(filter?.ope ?? 'equal');
|
|
68617
|
-
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
68618
|
-
const options = [
|
|
68619
|
-
{ label: 'Lớn hơn', value: 'greaterthan' },
|
|
68620
|
-
{ label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
|
|
68621
|
-
{ label: 'Bằng', value: 'equal' },
|
|
68622
|
-
{ label: 'Bé hơn', value: 'lessthan' },
|
|
68623
|
-
{ label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
|
|
68624
|
-
];
|
|
68625
|
-
const numericFormatProps = {
|
|
68626
|
-
value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
|
|
68627
|
-
thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
68628
|
-
decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
|
|
68629
|
-
allowNegative: column.numericSettings?.allowNegative ?? false,
|
|
68630
|
-
decimalScale: column.numericSettings?.fraction ?? 0
|
|
68631
|
-
};
|
|
68632
|
-
let floatValue = parseFloat(valueFilter ?? '0');
|
|
68633
|
-
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
68634
|
-
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
68635
|
-
setTimeout(() => {
|
|
68636
|
-
handleSave('numeric', valueFilter, operator);
|
|
68637
|
-
}, 100);
|
|
68638
|
-
e.stopPropagation();
|
|
68639
|
-
}
|
|
68640
|
-
}, children: [jsx(SelectTable, { value: options.find((x) => x.value === operator), options: options, onChange: (val) => {
|
|
68641
|
-
setOperator(val.value);
|
|
68642
|
-
}, placeholder: t('Select') }), 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) => {
|
|
68643
|
-
floatValue = values?.floatValue;
|
|
68644
|
-
}, onFocus: (e) => {
|
|
68645
|
-
e.target.setSelectionRange(0, e.target.innerText.length - 1);
|
|
68646
|
-
}, onBlur: () => {
|
|
68647
|
-
if (floatValue !== valueFilter) {
|
|
68648
|
-
setValueFilter(!isNaN(floatValue) ? floatValue : 0);
|
|
68649
|
-
}
|
|
68650
|
-
} }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
68651
|
-
};
|
|
68652
|
-
const SelectFilterComponent = ({ column, filterBy, handleSave, fieldFilter, optionsFilter }) => {
|
|
68653
|
-
const { t } = useTranslation();
|
|
68654
|
-
const filter = filterBy.find((item) => item.key === fieldFilter);
|
|
68655
|
-
const [valueFilter, setValueFilter] = useState(filter?.value ?? '');
|
|
68656
|
-
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
68657
|
-
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
68658
|
-
setTimeout(() => {
|
|
68659
|
-
handleSave('select', valueFilter, 'equal');
|
|
68660
|
-
}, 100);
|
|
68661
|
-
e.stopPropagation();
|
|
68662
|
-
}
|
|
68663
|
-
}, children: [jsx("div", { className: "mb-1", children: 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) => {
|
|
68664
|
-
setValueFilter(val?.value);
|
|
68665
|
-
}, placeholder: t('Select') }) }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
68666
|
-
};
|
|
68667
|
-
const DateRangeFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
|
|
68668
|
-
const { t } = useTranslation();
|
|
68669
|
-
const from = filterBy.find((item) => item.key === fieldFilter && item.ope === 'greaterthanorequal')?.value;
|
|
68670
|
-
const to = filterBy.find((item) => item.key === fieldFilter && item.ope === 'lessthanorequal')?.value;
|
|
68671
|
-
const [valueFilter, setValueFilter] = useState({ from: from ?? undefined, to: to ?? undefined });
|
|
68672
|
-
return (jsx(Fragment$1, { children: jsxs("div", { className: "r-filter-popup", onKeyDown: (e) => {
|
|
68673
|
-
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
68674
|
-
setTimeout(() => {
|
|
68675
|
-
handleSave('date', valueFilter);
|
|
68676
|
-
}, 100);
|
|
68677
|
-
e.stopPropagation();
|
|
68678
|
-
}
|
|
68679
|
-
}, children: [jsx("div", { className: "mb-1", children: jsx(DateRangePicker, { dateFormat: "dd/MM/yyyy", value: valueFilter, onChange: (date) => {
|
|
68680
|
-
setValueFilter(date);
|
|
68681
|
-
} }) }), jsxs("div", { className: "d-flex justify-content-end", children: [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') }), jsx(Button$1$1, { className: "py-25 px-50 fw-bold", outline: true, style: { borderRadius: 3 }, onClick: () => handleSave(), children: t('Clear') })] })] }) }));
|
|
68682
|
-
};
|
|
68683
|
-
|
|
68684
|
-
const HeaderTableCol = (props) => {
|
|
68685
|
-
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;
|
|
68686
|
-
const { t } = useTranslation();
|
|
68687
|
-
const headerRef = useRef(null);
|
|
68688
|
-
const order = orderBy.find((item) => item.key === col.field);
|
|
68689
|
-
const [openFilter, setOpenFilter] = useState(false);
|
|
68690
|
-
// const filter = filterBy.find((item) => item.key === (col.fieldFilter ?? col.field))
|
|
68691
|
-
const handleResize = (e, { size }) => {
|
|
68692
|
-
// Update the column width here
|
|
68693
|
-
// You might need to update the state or call a callback to update the width
|
|
68694
|
-
if (size.width > 50) {
|
|
68695
|
-
const newColumns = [...columns];
|
|
68696
|
-
newColumns[indexCol].width = size.width;
|
|
68697
|
-
if ((columns[indexCol]?.maxWidth ?? 0) < size.width) {
|
|
68698
|
-
newColumns[indexCol].maxWidth = size.width;
|
|
68699
|
-
}
|
|
68700
|
-
if ((columns[indexCol]?.minWidth ?? 0) > size.width) {
|
|
68701
|
-
newColumns[indexCol].minWidth = size.width;
|
|
68702
|
-
}
|
|
68703
|
-
if (setColumns) {
|
|
68704
|
-
setColumns(newColumns);
|
|
68705
|
-
}
|
|
68706
|
-
}
|
|
68707
|
-
};
|
|
68708
|
-
const checkOverflow = () => {
|
|
68709
|
-
return headerRef.current && headerRef.current.scrollHeight > headerRef.current.clientHeight;
|
|
68710
|
-
};
|
|
68711
|
-
return (jsx(Fragment, { children: col.visible !== false && (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: 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: {
|
|
68712
|
-
top: `${indexParent * 42}px`,
|
|
68713
|
-
left: col.fixedType === 'left' ? objWidthFixLeft[indexCol ?? 0] : undefined,
|
|
68714
|
-
right: col.fixedType === 'right' ? objWidthFixRight[indexCol ?? 0] : undefined
|
|
68715
|
-
}, children: jsxs("div", { style: { justifyContent: 'space-between' }, onClick: () => {
|
|
68716
|
-
if (!!allowSorting && (col.columns?.length ?? 0) === 0) {
|
|
68717
|
-
if (order) {
|
|
68718
|
-
if (order.direction === 'asc') {
|
|
68719
|
-
order.direction = 'desc';
|
|
68720
|
-
changeOrder(orderBy);
|
|
68721
|
-
}
|
|
68722
|
-
else {
|
|
68723
|
-
changeOrder(orderBy.filter((x) => x.key !== col.field));
|
|
68724
|
-
}
|
|
68725
|
-
}
|
|
68726
|
-
else {
|
|
68727
|
-
orderBy.push({ direction: 'asc', key: col.field });
|
|
68728
|
-
changeOrder(orderBy);
|
|
68729
|
-
}
|
|
68730
|
-
}
|
|
68731
|
-
}, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting }), children: [col.type === 'checkbox' && !col.field && (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) => {
|
|
68732
|
-
if (selectEnable) {
|
|
68733
|
-
if (e.target.checked) {
|
|
68734
|
-
setSelectedRows(dataSource.map((item) => {
|
|
68735
|
-
return item;
|
|
68736
|
-
}));
|
|
68737
|
-
}
|
|
68738
|
-
else {
|
|
68739
|
-
setSelectedRows([]);
|
|
68740
|
-
}
|
|
68741
|
-
}
|
|
68742
|
-
} })), col.type !== 'checkbox' && (jsxs(Fragment$1, { children: [jsxs("div", { className: "header-content", style: { justifyContent: col.textAlign ?? 'left' }, children: [jsx("span", { id: `header-${idTable}-${indexParent}-${indexCol}`, ref: headerRef, className: "text-content", children: t(col.headerText ?? '') }), checkOverflow() && (jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `header-${idTable}-${indexParent}-${indexCol}`, children: t(col.headerText ?? '') }))] }), jsxs("div", { className: "d-flex align-items-center", children: [allowSorting && order?.direction === 'asc' && (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsx("g", { "clip-path": "url(#clip0_520_6)", children: 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" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_520_6", children: jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowSorting && order?.direction === 'desc' && (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "ms-25", width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsx("g", { "clip-path": "url(#clip0_520_2)", children: 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" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_520_2", children: jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] })), allowFiltering && (col.columns?.length ?? 0) === 0 && col.allowFilter !== false && (jsxs(Dropdown$1$1, { isOpen: openFilter, toggle: (e) => {
|
|
68743
|
-
setOpenFilter(!openFilter);
|
|
68744
|
-
e.stopPropagation();
|
|
68745
|
-
}, onClick: (e) => {
|
|
68746
|
-
e.stopPropagation();
|
|
68747
|
-
}, children: [jsx(DropdownToggle$1, { tag: "div", className: "p-0 r-filter", children: 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: [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" }), ' '] }) }), jsx(DropdownMenu$1, { container: container, className: "formula-dropdown icon-dropdown p-0", style: {
|
|
68748
|
-
borderRadius: 8,
|
|
68749
|
-
zIndex: 1056
|
|
68750
|
-
}, children: jsx(DropdownItem$1, { className: "p-1", style: { borderRadius: '6px' }, tag: "div", header: true, children: jsx(FilterComponent, { setOpenFilter: setOpenFilter, filterBy: filterBy, optionsFilter: optionsFilter, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] }))] })] }))] }) }) })) }, `header-${indexCol}`));
|
|
68629
|
+
}, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
|
|
68751
68630
|
};
|
|
68752
68631
|
|
|
68753
|
-
const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false, isLoading, selectEnable, formatSetting, querySetting,
|
|
68632
|
+
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 }) => {
|
|
68754
68633
|
const { t } = useTranslation();
|
|
68755
68634
|
const gridRef = useRef(null);
|
|
68756
68635
|
const [openPopupSetupColumn, setOpenPopupSetupColumn] = useState(false);
|
|
@@ -68759,6 +68638,21 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68759
68638
|
const [filterBy, setFilterBy] = useState([]);
|
|
68760
68639
|
const [searchTerm, setSearchTerm] = useState('');
|
|
68761
68640
|
const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? 'id';
|
|
68641
|
+
const [contentColumns, setContentColumns] = useState([]);
|
|
68642
|
+
const [groupColumns, setGroupColumns] = useState([]);
|
|
68643
|
+
const [expandsAll, setExpandsAll] = useState();
|
|
68644
|
+
useEffect(() => {
|
|
68645
|
+
if (groupSetting?.groupColumns) {
|
|
68646
|
+
setGroupColumns([...groupSetting.groupColumns]);
|
|
68647
|
+
}
|
|
68648
|
+
setExpandsAll(undefined);
|
|
68649
|
+
}, [groupSetting?.groupColumns]);
|
|
68650
|
+
const { levels: headerColumns, flatVisble, objHeaderWidthFixLeft, objHeaderWidthFixRight, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = useMemo(() => {
|
|
68651
|
+
const rs = calculateTableStructure(columns, settingColumns?.value);
|
|
68652
|
+
setContentColumns(rs.flat);
|
|
68653
|
+
return rs;
|
|
68654
|
+
}, [columns, settingColumns]);
|
|
68655
|
+
const optionGroupColumns = useMemo(() => contentColumns.filter((x) => !groupColumns.includes(x.field)).map((x) => ({ ...x, headerDisplay: t(x.headerDisplay) })), [groupColumns, contentColumns]);
|
|
68762
68656
|
// 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
|
|
68763
68657
|
const viewData = useMemo(() => {
|
|
68764
68658
|
if (!dataSource || dataSource.length === 0) {
|
|
@@ -68827,7 +68721,6 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68827
68721
|
}
|
|
68828
68722
|
return datas;
|
|
68829
68723
|
}, [searchTerm, filterBy, orderBy, dataSource]);
|
|
68830
|
-
const { levels: headerColumns, flat: contentColumns, flatVisble, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = useMemo(() => calculateTableStructure(columns), [columns]);
|
|
68831
68724
|
const handleKeyPress = (e) => {
|
|
68832
68725
|
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
68833
68726
|
if (searchSetting?.setSearchTerm) {
|
|
@@ -68843,7 +68736,56 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68843
68736
|
const searchTemplate = () => {
|
|
68844
68737
|
return (jsx("div", { className: "me-50 r-search", children: jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, setSearchTerm: searchSetting?.setSearchTerm ? searchSetting?.setSearchTerm : setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
|
|
68845
68738
|
};
|
|
68739
|
+
const groupbtnTemplate = () => {
|
|
68740
|
+
return (jsxs(UncontrolledDropdown, { children: [jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[0] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerDisplay) } : undefined, onChange: (val) => {
|
|
68741
|
+
if (val) {
|
|
68742
|
+
groupColumns[0] = val.field;
|
|
68743
|
+
}
|
|
68744
|
+
else {
|
|
68745
|
+
groupColumns.pop();
|
|
68746
|
+
}
|
|
68747
|
+
setGroupColumns([...groupColumns]);
|
|
68748
|
+
}, isClearable: groupColumns?.length === 1 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[1] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerDisplay) } : undefined, onChange: (val) => {
|
|
68749
|
+
if (val) {
|
|
68750
|
+
groupColumns[1] = val.field;
|
|
68751
|
+
}
|
|
68752
|
+
else {
|
|
68753
|
+
groupColumns.pop();
|
|
68754
|
+
}
|
|
68755
|
+
setGroupColumns([...groupColumns]);
|
|
68756
|
+
}, isClearable: groupColumns?.length === 2 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: optionGroupColumns, fieldLabel: 'headerDisplay', fieldValue: 'field', value: groupColumns[2] ? { headerDisplay: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerDisplay) } : undefined, onChange: (val) => {
|
|
68757
|
+
if (groupSetting) {
|
|
68758
|
+
if (val) {
|
|
68759
|
+
groupColumns[2] = val.field;
|
|
68760
|
+
}
|
|
68761
|
+
else {
|
|
68762
|
+
groupColumns.pop();
|
|
68763
|
+
}
|
|
68764
|
+
setGroupColumns([...groupColumns]);
|
|
68765
|
+
}
|
|
68766
|
+
}, isClearable: groupColumns?.length === 3 }) })] }), jsxs("div", { className: "border-top d-flex justify-content-end mt-1", children: [jsx(Button$1$1, { color: "primary", className: "mt-1 me-50 rounded", size: "sm", onClick: () => {
|
|
68767
|
+
groupSetting?.onGroup({ columnGrouped: groupColumns.filter((x) => x) });
|
|
68768
|
+
document.getElementById('group-dropdown-toggle')?.click();
|
|
68769
|
+
}, children: `${t('Apply')}` }), jsx(Button$1$1, { color: "secondary", outline: true, className: "mt-1 rounded", size: "sm", onClick: () => {
|
|
68770
|
+
groupSetting?.onGroup({ columnGrouped: [] });
|
|
68771
|
+
document.getElementById('group-dropdown-toggle')?.click();
|
|
68772
|
+
}, children: `${t('Delete')}` })] })] })] }));
|
|
68773
|
+
};
|
|
68774
|
+
const chooseColumnsTemplate = () => {
|
|
68775
|
+
return jsx(SvgSettings, { className: "me-1 r-toolbar-icon", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) });
|
|
68776
|
+
};
|
|
68777
|
+
const expandTemplate = () => {
|
|
68778
|
+
return (jsxs(Fragment$1, { children: [!expandsAll && (jsx(ExpandAllIcon, { onClick: () => {
|
|
68779
|
+
setExpandsAll(true);
|
|
68780
|
+
}, color: "#7F7F7F", size: 24 })), expandsAll && jsx(UnExpandAllIcon, { onClick: () => setExpandsAll(false), color: "#7F7F7F", size: 24 })] }));
|
|
68781
|
+
};
|
|
68846
68782
|
const defaultToolbarOption = searchSetting?.searchEnable ? [{ template: searchTemplate, align: 'left' }] : [];
|
|
68783
|
+
if (groupSetting) {
|
|
68784
|
+
defaultToolbarOption.push({ template: groupbtnTemplate, align: 'left' });
|
|
68785
|
+
}
|
|
68786
|
+
if (groupSetting?.groupColumns && groupSetting?.groupColumns.length > 0) {
|
|
68787
|
+
defaultToolbarOption.push({ template: expandTemplate, align: 'left' });
|
|
68788
|
+
}
|
|
68847
68789
|
let toolbarTopOption = [];
|
|
68848
68790
|
if (toolbarSetting?.toolbarOptions) {
|
|
68849
68791
|
toolbarTopOption = [...defaultToolbarOption, ...toolbarSetting?.toolbarOptions];
|
|
@@ -68851,6 +68793,9 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68851
68793
|
else {
|
|
68852
68794
|
toolbarTopOption = [...defaultToolbarOption];
|
|
68853
68795
|
}
|
|
68796
|
+
if (settingColumns) {
|
|
68797
|
+
toolbarTopOption.push({ template: chooseColumnsTemplate, align: 'right' });
|
|
68798
|
+
}
|
|
68854
68799
|
const onChangePage = (args) => {
|
|
68855
68800
|
if (pagingSetting?.setCurrentPage) {
|
|
68856
68801
|
if (args.currentPage === args.oldPage) {
|
|
@@ -68916,20 +68861,68 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68916
68861
|
}
|
|
68917
68862
|
}
|
|
68918
68863
|
}, [selectedItem]);
|
|
68919
|
-
|
|
68920
|
-
|
|
68921
|
-
|
|
68922
|
-
|
|
68923
|
-
|
|
68924
|
-
|
|
68925
|
-
|
|
68926
|
-
|
|
68927
|
-
|
|
68928
|
-
|
|
68929
|
-
|
|
68930
|
-
|
|
68931
|
-
|
|
68932
|
-
|
|
68864
|
+
const RenderContent = ({ datas, level = 0 }) => {
|
|
68865
|
+
const firstColSpan = contentColumns.findIndex((x) => x.visible !== false && x.type === 'numeric');
|
|
68866
|
+
return (jsx(Fragment$1, { children: datas.map((row, indexRow) => {
|
|
68867
|
+
const [expand, setExpand] = useState(row.expand ?? false);
|
|
68868
|
+
useEffect(() => {
|
|
68869
|
+
if (expandsAll !== undefined) {
|
|
68870
|
+
setExpand(expandsAll);
|
|
68871
|
+
row.expand = expandsAll;
|
|
68872
|
+
}
|
|
68873
|
+
}, [expandsAll]);
|
|
68874
|
+
if (row.children?.length) {
|
|
68875
|
+
const col = contentColumns.find((x) => x.field === row.field);
|
|
68876
|
+
let value = row[col.field];
|
|
68877
|
+
if (col.type === 'numeric') {
|
|
68878
|
+
value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
|
|
68879
|
+
}
|
|
68880
|
+
else if (col.type === 'date') {
|
|
68881
|
+
value = value ? formatDateTime(value, formatSetting?.dateFormat) : '';
|
|
68882
|
+
}
|
|
68883
|
+
else if (col.type === 'datetime') {
|
|
68884
|
+
value = value ? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
|
|
68885
|
+
}
|
|
68886
|
+
if (col.template) {
|
|
68887
|
+
value = col.template(row, indexRow) ?? '';
|
|
68888
|
+
}
|
|
68889
|
+
return (jsxs(Fragment$1, { children: [jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsx("td", { className: "r-rowcell r-cell-group", colSpan: firstColSpan, children: jsxs("div", { className: "r-rowcell-div", children: [jsx(SvgChevronRight, { style: { marginLeft: level * 20, transform: expand ? 'rotate(90deg)' : 'rotate(0deg)' }, fontSize: 15, onClick: () => {
|
|
68890
|
+
setExpand(!expand);
|
|
68891
|
+
setExpandsAll(undefined);
|
|
68892
|
+
row.expand = !expand;
|
|
68893
|
+
} }), t(col.headerDisplay), ": ", value, " (", row.children.length, ")"] }) }), contentColumns.map((colSum, indexCol) => {
|
|
68894
|
+
if (indexCol < firstColSpan) {
|
|
68895
|
+
return;
|
|
68896
|
+
}
|
|
68897
|
+
let sumValue = row[colSum.field];
|
|
68898
|
+
const haveSum = row[colSum.field] !== undefined && row[colSum.field] !== null;
|
|
68899
|
+
if (!haveSum && colSum.haveSum === true && colSum.type === 'numeric') {
|
|
68900
|
+
sumValue = row.children.reduce(function (accumulator, currentValue) {
|
|
68901
|
+
return Number(accumulator ?? 0) + Number(currentValue[colSum.field] ?? 0);
|
|
68902
|
+
}, 0);
|
|
68903
|
+
}
|
|
68904
|
+
return (colSum.visible !== false && (jsx("td", { className: "r-rowcell r-cell-group", children: 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 && (jsx(Fragment$1, { 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 && (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}`)));
|
|
68905
|
+
})] }), expand && jsx(RenderContent, { datas: row.children, level: level + 1 })] }));
|
|
68906
|
+
}
|
|
68907
|
+
else {
|
|
68908
|
+
const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
|
|
68909
|
+
return (jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: contentColumns.map((column, indexCol) => (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}`));
|
|
68910
|
+
}
|
|
68911
|
+
}) }));
|
|
68912
|
+
};
|
|
68913
|
+
return (jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxs("div", { ref: gridRef, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}` }, children: [jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsx(RenderColGroup, { contentColumns: flatVisble }), jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
|
|
68914
|
+
return (jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((col, index) => (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) => {
|
|
68915
|
+
setFilterBy([...val]);
|
|
68916
|
+
if (querySetting?.changeFilter) {
|
|
68917
|
+
querySetting.changeFilter(val);
|
|
68918
|
+
}
|
|
68919
|
+
}, changeOrder: (val) => {
|
|
68920
|
+
setOrderBy([...val]);
|
|
68921
|
+
if (querySetting?.changeOrder) {
|
|
68922
|
+
querySetting.changeOrder(val);
|
|
68923
|
+
}
|
|
68924
|
+
}, columns: contentColumns, setContentColumns: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: dataSource?.length ?? 0 }, `header-${indexParent}-${index}`))) }, `header-${-indexParent}`));
|
|
68925
|
+
}) }), jsx("tbody", { className: "r-gridcontent", role: "rowgroup", children: jsx(RenderContent, { datas: viewData }) }), jsx("tfoot", { className: "r-gridfoot", children: (columnsAggregate?.length ?? 0) > 0 && (jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
|
|
68933
68926
|
const item = columnsAggregate?.find((x) => x.field === col.field);
|
|
68934
68927
|
let sumValue = item?.value;
|
|
68935
68928
|
if (!item && col.haveSum === true && col.type === 'numeric') {
|
|
@@ -68942,9 +68935,10 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isMutil = false
|
|
|
68942
68935
|
right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
|
|
68943
68936
|
textAlign: col.textAlign ? col.textAlign : 'left'
|
|
68944
68937
|
}, children: jsxs("div", { className: "r-footer-div", children: [(item || (col.haveSum === true && col.type === 'numeric')) && col.type === 'numeric' && Number(sumValue) >= 0 && (jsx(Fragment$1, { 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 && (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}`)));
|
|
68945
|
-
}) }))
|
|
68938
|
+
}) })) })] }), (viewData.length ?? 0) === 0 && !isLoading && (jsxs("div", { className: "r-no-data", children: [jsx("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [jsx("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }), jsxs("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [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" }), 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 && (jsx("div", { className: "r-loading-overlay", children: jsxs("div", { className: "r-loading", children: [jsx(Spinner$1, { className: "me-1" }), t('Loading...')] }) }))] })] }), pagingSetting?.allowPaging && (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 })), jsx(SettingColumn, { gridRef: gridRef, handleSidebar: () => {
|
|
68946
68939
|
setOpenPopupSetupColumn(!openPopupSetupColumn);
|
|
68947
68940
|
}, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
|
|
68941
|
+
console.log(newColumns);
|
|
68948
68942
|
if (saveSettingColumn) {
|
|
68949
68943
|
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
|
|
68950
68944
|
}
|