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