react-table-edit 1.5.41 → 1.5.43
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/select-table/element.d.ts +24 -0
- package/dist/component/select-table/table.d.ts +24 -0
- package/dist/component/table/header.d.ts +1 -1
- package/dist/component/table/toolbar-top.d.ts +4 -1
- package/dist/component/table-view/content.d.ts +3 -1
- package/dist/component/table-view/index.d.ts +2 -0
- package/dist/component/table-view/table.d.ts +47 -0
- package/dist/component/type/index.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +635 -277
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +636 -278
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20143,9 +20143,139 @@ const findItemInTree = (items, filter, keyFilter = 'value', keyChildren = 'child
|
|
|
20143
20143
|
}
|
|
20144
20144
|
};
|
|
20145
20145
|
|
|
20146
|
+
const RenderElement = React__default["default"].memo((props) => {
|
|
20147
|
+
const { indexRow, formatSetting, currentOptions, id, defaultColumns, closeMenu, setIndexFocus, setSearchTerm, indexFocus, columns, compareFunction, fieldValue, value, handChange, isMulti, row, isSelected, level = 0 } = props;
|
|
20148
|
+
const checkOverflow = (indexRow, indexCol) => {
|
|
20149
|
+
const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
|
|
20150
|
+
return element && element.scrollWidth > element.clientWidth;
|
|
20151
|
+
};
|
|
20152
|
+
return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$1('r-select-row', { 'last-row': indexRow === currentOptions.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && (jsxRuntime.jsx("td", { className: classNames$1(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && (compareFunction ? compareFunction(row) : value[fieldValue ?? 'value'] === row[fieldValue ?? 'value']) }), style: { width: 40, textAlign: 'center', padding: 0, paddingBottom: 6 }, onClick: (e) => {
|
|
20153
|
+
if (isMulti) {
|
|
20154
|
+
const index = value?.findIndex((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
|
|
20155
|
+
if (index > -1) {
|
|
20156
|
+
value?.splice(index, 1);
|
|
20157
|
+
handChange([...value]);
|
|
20158
|
+
}
|
|
20159
|
+
else {
|
|
20160
|
+
if (value) {
|
|
20161
|
+
value?.push(row);
|
|
20162
|
+
handChange([...value]);
|
|
20163
|
+
}
|
|
20164
|
+
else {
|
|
20165
|
+
handChange([row]);
|
|
20166
|
+
}
|
|
20167
|
+
}
|
|
20168
|
+
e.stopPropagation();
|
|
20169
|
+
}
|
|
20170
|
+
}, children: jsxRuntime.jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { }, style: { textAlign: 'center', marginTop: 6 } }) })), (columns ? columns : defaultColumns).map((col, indexCol) => {
|
|
20171
|
+
let valueDisplay = row[col.field];
|
|
20172
|
+
if (col.type === 'numeric' || (col.typeCondition && col.typeCondition(row) === 'numeric')) {
|
|
20173
|
+
valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? '.', formatSetting?.thousandSeparator ?? ',', col.fraction ?? 0, true, false) ?? 0;
|
|
20174
|
+
}
|
|
20175
|
+
else if (col.type === 'date') {
|
|
20176
|
+
valueDisplay = valueDisplay ? formatDateTime(valueDisplay, formatSetting?.dateFormat) : '';
|
|
20177
|
+
}
|
|
20178
|
+
else if (col.type === 'datetime') {
|
|
20179
|
+
valueDisplay = valueDisplay ? formatDateTime(valueDisplay, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
|
|
20180
|
+
}
|
|
20181
|
+
return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && (jsxRuntime.jsx("td", { id: `select-${id}-${indexRow}-${indexCol}`,
|
|
20182
|
+
// ref={refRow}
|
|
20183
|
+
className: classNames$1(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && (compareFunction ? compareFunction(row) : value[fieldValue ?? 'value'] === row[fieldValue ?? 'value']) }), style: {
|
|
20184
|
+
minWidth: col.minWidth,
|
|
20185
|
+
width: col.width,
|
|
20186
|
+
maxWidth: col.maxWidth,
|
|
20187
|
+
textAlign: col.textAlign ? col.textAlign : 'left'
|
|
20188
|
+
}, onClick: (e) => {
|
|
20189
|
+
if (isMulti) {
|
|
20190
|
+
const index = value?.findIndex((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
|
|
20191
|
+
if (index > -1) {
|
|
20192
|
+
value?.splice(index, 1);
|
|
20193
|
+
handChange([...value]);
|
|
20194
|
+
}
|
|
20195
|
+
else {
|
|
20196
|
+
if (value) {
|
|
20197
|
+
value?.push(row);
|
|
20198
|
+
handChange([...value]);
|
|
20199
|
+
}
|
|
20200
|
+
else {
|
|
20201
|
+
handChange([row]);
|
|
20202
|
+
}
|
|
20203
|
+
}
|
|
20204
|
+
}
|
|
20205
|
+
else {
|
|
20206
|
+
handChange(row);
|
|
20207
|
+
setSearchTerm('');
|
|
20208
|
+
closeMenu();
|
|
20209
|
+
}
|
|
20210
|
+
e.preventDefault();
|
|
20211
|
+
e.stopPropagation();
|
|
20212
|
+
}, onMouseMove: (e) => {
|
|
20213
|
+
if (indexRow !== indexFocus) {
|
|
20214
|
+
setIndexFocus(indexRow);
|
|
20215
|
+
}
|
|
20216
|
+
e.stopPropagation();
|
|
20217
|
+
}, children: col.template ? col.template(row, indexRow) : col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay }, `col-${indexRow}-${indexCol}`)), checkOverflow(indexRow, indexCol) && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : valueDisplay }))] }, indexCol));
|
|
20218
|
+
})] }, `row-${indexRow}`));
|
|
20219
|
+
});
|
|
20220
|
+
|
|
20221
|
+
const TableElement$1 = React__default["default"].memo((props) => {
|
|
20222
|
+
const { currentOptions, isMulti, closeMenu, indexFocus, setIndexFocus, setSearchTerm, formatSetting, defaultColumns, haveCreateNew, isLoading, searchTerm, compareFunction, handChange, columns, fieldLabel, fieldValue, noHeader, value } = props;
|
|
20223
|
+
const { t } = reactI18next.useTranslation();
|
|
20224
|
+
const checkboxRef = React$5.useRef(null);
|
|
20225
|
+
const typeSelected = React$5.useMemo(() => {
|
|
20226
|
+
// 0: none selected, 1: some selected, 2: all selected
|
|
20227
|
+
if (!isMulti || currentOptions.length === 0 || !value?.length) {
|
|
20228
|
+
return 0;
|
|
20229
|
+
}
|
|
20230
|
+
else if (value?.length < currentOptions.length) {
|
|
20231
|
+
return 1;
|
|
20232
|
+
}
|
|
20233
|
+
else if (!currentOptions.some((item) => !value.some((x) => x[fieldValue ?? 'value'] === item[fieldValue ?? 'value']))) {
|
|
20234
|
+
return 2;
|
|
20235
|
+
}
|
|
20236
|
+
return 1;
|
|
20237
|
+
}, [currentOptions, value]);
|
|
20238
|
+
React$5.useEffect(() => {
|
|
20239
|
+
if (checkboxRef.current) {
|
|
20240
|
+
checkboxRef.current.checked = typeSelected === 2;
|
|
20241
|
+
checkboxRef.current.indeterminate = typeSelected === 1;
|
|
20242
|
+
}
|
|
20243
|
+
}, [typeSelected]);
|
|
20244
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [!(noHeader || (columns?.length ?? 0) === 0) && (jsxRuntime.jsx("thead", { className: "r-select-gridheader", children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && (jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { innerRef: (el) => {
|
|
20245
|
+
checkboxRef.current = el;
|
|
20246
|
+
}, type: "checkbox", onClick: (e) => {
|
|
20247
|
+
if (isMulti) {
|
|
20248
|
+
if (typeSelected === 2) {
|
|
20249
|
+
handChange([]);
|
|
20250
|
+
}
|
|
20251
|
+
else if (typeSelected === 0) {
|
|
20252
|
+
handChange([...currentOptions]);
|
|
20253
|
+
}
|
|
20254
|
+
else {
|
|
20255
|
+
const notSelectedRows = currentOptions.filter((item) => !value.some((x) => x[fieldValue ?? 'value'] === item[fieldValue ?? 'value']));
|
|
20256
|
+
handChange([...value, ...notSelectedRows]);
|
|
20257
|
+
}
|
|
20258
|
+
e.stopPropagation();
|
|
20259
|
+
}
|
|
20260
|
+
}, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) })), (columns ? columns : defaultColumns).map((col, indexCol) => {
|
|
20261
|
+
return (col.visible !== false && (jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell `), style: {
|
|
20262
|
+
width: Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? 'auto'),
|
|
20263
|
+
minWidth: Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? 'auto'),
|
|
20264
|
+
top: `${0 * 35}px`,
|
|
20265
|
+
maxWidth: col.maxWidth
|
|
20266
|
+
}, children: jsxRuntime.jsx("div", { role: "textbox", title: t(col.headerText ?? ''), style: {
|
|
20267
|
+
height: `${1 * 35}px`,
|
|
20268
|
+
justifyContent: col.textAlign ?? 'left'
|
|
20269
|
+
}, className: "r-select-headercell-div", children: t(col.headerText ?? '') }) }, `header-select-${indexCol}`)));
|
|
20270
|
+
})] }) })), currentOptions && !isLoading && (jsxRuntime.jsxs("tbody", { className: "r-select-gridcontent", children: [haveCreateNew && (jsxRuntime.jsx(RenderElement, { indexRow: 0, isSelected: false, closeMenu: closeMenu, value: value, isMulti: isMulti, currentOptions: currentOptions, fieldValue: fieldValue, columns: columns, defaultColumns: defaultColumns, indexFocus: indexFocus, formatSetting: formatSetting, handChange: handChange, compareFunction: compareFunction, setIndexFocus: setIndexFocus, setSearchTerm: setSearchTerm, row: { valueCreate: searchTerm, [fieldValue ?? 'value']: searchTerm, [fieldLabel ?? 'label']: `${t('Create')} '${searchTerm}'`, isCreated: true } })), currentOptions?.map((row, indexRow) => {
|
|
20271
|
+
const isSelected = isMulti && value?.some((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
|
|
20272
|
+
return (jsxRuntime.jsx(RenderElement, { isSelected: isSelected ?? false, indexRow: indexRow + (haveCreateNew ? 1 : 0), closeMenu: closeMenu, value: value, isMulti: isMulti, currentOptions: currentOptions, fieldValue: fieldValue, columns: columns, defaultColumns: defaultColumns, indexFocus: indexFocus, formatSetting: formatSetting, handChange: handChange, compareFunction: compareFunction, setIndexFocus: setIndexFocus, setSearchTerm: setSearchTerm, row: row }, `select-table-${indexRow}`));
|
|
20273
|
+
})] }))] }), (currentOptions?.length ?? 0) === 0 && !haveCreateNew && !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.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx(Spinner$1, { className: "me-1", children: " " }), t('Loading...')] }))] }));
|
|
20274
|
+
});
|
|
20275
|
+
|
|
20146
20276
|
const defaultMaxHeight$1 = 250;
|
|
20147
20277
|
const SelectTable = React$5.forwardRef((props, ref) => {
|
|
20148
|
-
const { id, menuWidth, width, invalid, placeholder, textAlign, options, columns, value, fieldValue, fieldLabel, maxHeight, isClearable, component, isMulti, noHeader, isDisabled, showFooter, formatSetting, allowCreate, onPaste, onChange, handleAdd, onKeyDown, onOpenMenu, loadOptions, onCloseMenu, footerComponent, formatOptionLabel, compareFunction } = props;
|
|
20278
|
+
const { id, menuWidth, width, invalid, placeholder, textAlign, options, columns, value, fieldValue, fieldLabel, maxHeight, isClearable, component, isMulti, noHeader, isDisabled, showFooter, formatSetting, allowCreate, onPaste, onChange, handleAdd, onKeyDown, onOpenMenu, loadOptions, onCloseMenu, footerComponent, formatOptionLabel, compareFunction, } = props;
|
|
20149
20279
|
const selectTableRef = React$5.useRef(null);
|
|
20150
20280
|
const selectMenuTableRef = React$5.useRef(null);
|
|
20151
20281
|
const inputRef = React$5.useRef(null);
|
|
@@ -20157,15 +20287,13 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20157
20287
|
const [optionsLoad, setOptionsLoad] = React$5.useState();
|
|
20158
20288
|
const [haveCreateNew, setHaveCreateNew] = React$5.useState(false);
|
|
20159
20289
|
const { t } = reactI18next.useTranslation();
|
|
20160
|
-
const
|
|
20161
|
-
return isMulti === true && (optionsLoad ? optionsLoad : options).length > 0 && value?.length >= (optionsLoad ? optionsLoad : options).length;
|
|
20162
|
-
}, [optionsLoad, options, value]);
|
|
20290
|
+
const currentOptions = React$5.useMemo(() => optionsLoad || options || [], [optionsLoad, options]);
|
|
20163
20291
|
const defaultColumns = [
|
|
20164
20292
|
{
|
|
20165
20293
|
headerText: 'Name',
|
|
20166
20294
|
field: fieldLabel ?? 'label',
|
|
20167
|
-
width: menuWidth
|
|
20168
|
-
}
|
|
20295
|
+
width: menuWidth,
|
|
20296
|
+
},
|
|
20169
20297
|
];
|
|
20170
20298
|
const closeMenu = () => {
|
|
20171
20299
|
setDropdownOpen(false);
|
|
@@ -20175,7 +20303,12 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20175
20303
|
};
|
|
20176
20304
|
const handChange = (val) => {
|
|
20177
20305
|
if (val && val.isCreated) {
|
|
20178
|
-
const newVal = {
|
|
20306
|
+
const newVal = {
|
|
20307
|
+
...val,
|
|
20308
|
+
[fieldLabel ?? 'label']: val.valueCreate,
|
|
20309
|
+
isCreated: undefined,
|
|
20310
|
+
isCreatedItem: true,
|
|
20311
|
+
};
|
|
20179
20312
|
options.unshift(newVal);
|
|
20180
20313
|
onChange(newVal);
|
|
20181
20314
|
return;
|
|
@@ -20184,7 +20317,9 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20184
20317
|
};
|
|
20185
20318
|
React$5.useEffect(() => {
|
|
20186
20319
|
if (dropdownOpen && value && !isMulti && selectMenuTableRef) {
|
|
20187
|
-
const index =
|
|
20320
|
+
const index = currentOptions?.findIndex((row) => compareFunction
|
|
20321
|
+
? compareFunction(row)
|
|
20322
|
+
: row[fieldValue ?? 'value'] === value[fieldValue ?? 'value']);
|
|
20188
20323
|
if (index >= 0) {
|
|
20189
20324
|
selectMenuTableRef.current.scrollTo({ top: (index - 1) * 30 });
|
|
20190
20325
|
}
|
|
@@ -20231,14 +20366,28 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20231
20366
|
}
|
|
20232
20367
|
}
|
|
20233
20368
|
};
|
|
20234
|
-
const listKeyUse = [
|
|
20369
|
+
const listKeyUse = [
|
|
20370
|
+
'Escape',
|
|
20371
|
+
'Space',
|
|
20372
|
+
'Enter',
|
|
20373
|
+
'Tab',
|
|
20374
|
+
'NumpadEnter',
|
|
20375
|
+
'ArrowDown',
|
|
20376
|
+
'ArrowUp',
|
|
20377
|
+
'F9',
|
|
20378
|
+
];
|
|
20235
20379
|
const handleOnKeyDown = (e) => {
|
|
20236
20380
|
let key = '';
|
|
20237
20381
|
if (onKeyDown &&
|
|
20238
20382
|
(!dropdownOpen ||
|
|
20239
20383
|
!listKeyUse.includes(e.code) ||
|
|
20240
|
-
((e.code === 'Enter' ||
|
|
20241
|
-
|
|
20384
|
+
((e.code === 'Enter' ||
|
|
20385
|
+
e.code === 'Tab' ||
|
|
20386
|
+
e.code === 'NumpadEnter' ||
|
|
20387
|
+
e.code === 'Space') &&
|
|
20388
|
+
!(currentOptions[indexFocus] || haveCreateNew)) ||
|
|
20389
|
+
((e.code === 'ArrowDown' || e.code === 'ArrowUp') &&
|
|
20390
|
+
currentOptions.length === 0) ||
|
|
20242
20391
|
(e.code === 'Escape' && !(isClearable && value && !isDisabled)))) {
|
|
20243
20392
|
key = onKeyDown(e);
|
|
20244
20393
|
}
|
|
@@ -20251,10 +20400,15 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20251
20400
|
else if (e.code === 'Space') {
|
|
20252
20401
|
let newItem;
|
|
20253
20402
|
if (haveCreateNew && indexFocus === 0) {
|
|
20254
|
-
newItem = {
|
|
20403
|
+
newItem = {
|
|
20404
|
+
valueCreate: searchTerm,
|
|
20405
|
+
[fieldValue ?? 'value']: searchTerm,
|
|
20406
|
+
[fieldLabel ?? 'label']: `${t('Create')} '${searchTerm}'`,
|
|
20407
|
+
isCreated: true,
|
|
20408
|
+
};
|
|
20255
20409
|
}
|
|
20256
20410
|
else {
|
|
20257
|
-
newItem =
|
|
20411
|
+
newItem = currentOptions[indexFocus];
|
|
20258
20412
|
}
|
|
20259
20413
|
if (dropdownOpen && newItem) {
|
|
20260
20414
|
handChange(newItem);
|
|
@@ -20272,13 +20426,20 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20272
20426
|
flag = true;
|
|
20273
20427
|
}
|
|
20274
20428
|
}
|
|
20275
|
-
else if (e.code === 'Enter' ||
|
|
20429
|
+
else if (e.code === 'Enter' ||
|
|
20430
|
+
e.code === 'Tab' ||
|
|
20431
|
+
e.code === 'NumpadEnter') {
|
|
20276
20432
|
let newItem;
|
|
20277
20433
|
if (haveCreateNew && indexFocus === 0) {
|
|
20278
|
-
newItem = {
|
|
20434
|
+
newItem = {
|
|
20435
|
+
valueCreate: searchTerm,
|
|
20436
|
+
[fieldValue ?? 'value']: searchTerm,
|
|
20437
|
+
[fieldLabel ?? 'label']: `${t('Create')} '${searchTerm}'`,
|
|
20438
|
+
isCreated: true,
|
|
20439
|
+
};
|
|
20279
20440
|
}
|
|
20280
20441
|
else {
|
|
20281
|
-
newItem =
|
|
20442
|
+
newItem = currentOptions[indexFocus];
|
|
20282
20443
|
}
|
|
20283
20444
|
if (dropdownOpen && newItem) {
|
|
20284
20445
|
handChange(newItem);
|
|
@@ -20287,15 +20448,18 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20287
20448
|
}
|
|
20288
20449
|
}
|
|
20289
20450
|
else if (e.code === 'ArrowDown') {
|
|
20290
|
-
if (dropdownOpen && (
|
|
20451
|
+
if (dropdownOpen && (currentOptions.length > 0 || haveCreateNew)) {
|
|
20291
20452
|
let newIndex = 0;
|
|
20292
20453
|
if (indexFocus >= 0) {
|
|
20293
20454
|
newIndex = indexFocus + 1;
|
|
20294
20455
|
}
|
|
20295
20456
|
else if (value) {
|
|
20296
|
-
newIndex =
|
|
20457
|
+
newIndex =
|
|
20458
|
+
currentOptions?.findIndex((row) => compareFunction
|
|
20459
|
+
? compareFunction(row)
|
|
20460
|
+
: row[fieldValue ?? 'value'] === value[fieldValue ?? 'value']) + 1;
|
|
20297
20461
|
}
|
|
20298
|
-
if (newIndex <
|
|
20462
|
+
if (newIndex < currentOptions.length) {
|
|
20299
20463
|
setIndexFocus(newIndex);
|
|
20300
20464
|
checkIfElementIsOutOfScroll(0, newIndex);
|
|
20301
20465
|
}
|
|
@@ -20311,21 +20475,24 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20311
20475
|
}
|
|
20312
20476
|
}
|
|
20313
20477
|
else if (e.code === 'ArrowUp') {
|
|
20314
|
-
if (dropdownOpen && (
|
|
20478
|
+
if (dropdownOpen && (currentOptions.length > 0 || haveCreateNew)) {
|
|
20315
20479
|
let newIndex = 0;
|
|
20316
20480
|
if (indexFocus >= 0) {
|
|
20317
20481
|
newIndex = indexFocus - 1;
|
|
20318
20482
|
}
|
|
20319
20483
|
else if (value) {
|
|
20320
|
-
newIndex =
|
|
20484
|
+
newIndex =
|
|
20485
|
+
currentOptions?.findIndex((row) => compareFunction
|
|
20486
|
+
? compareFunction(row)
|
|
20487
|
+
: row[fieldValue ?? 'value'] === value[fieldValue ?? 'value']) - 1;
|
|
20321
20488
|
}
|
|
20322
20489
|
if (newIndex >= 0) {
|
|
20323
20490
|
setIndexFocus(newIndex);
|
|
20324
20491
|
checkIfElementIsOutOfScroll(2, newIndex);
|
|
20325
20492
|
}
|
|
20326
20493
|
else {
|
|
20327
|
-
setIndexFocus(
|
|
20328
|
-
checkIfElementIsOutOfScroll(3,
|
|
20494
|
+
setIndexFocus(currentOptions.length - 1);
|
|
20495
|
+
checkIfElementIsOutOfScroll(3, currentOptions.length - 1);
|
|
20329
20496
|
}
|
|
20330
20497
|
flag = true;
|
|
20331
20498
|
}
|
|
@@ -20350,7 +20517,11 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20350
20517
|
scrollToElement(selectMenuTableRef.current, selectMenuTableRef.current.scrollHeight);
|
|
20351
20518
|
}
|
|
20352
20519
|
else if (flag === 0 && rect.bottom + 30 > parentRect.bottom) {
|
|
20353
|
-
scrollToElement(selectMenuTableRef.current, elementFocus.offsetTop -
|
|
20520
|
+
scrollToElement(selectMenuTableRef.current, elementFocus.offsetTop -
|
|
20521
|
+
selectMenuTableRef.current.offsetTop -
|
|
20522
|
+
parentRect.height +
|
|
20523
|
+
rect.height +
|
|
20524
|
+
50);
|
|
20354
20525
|
}
|
|
20355
20526
|
else if (flag === 2 && rect.top < parentRect.top + 50) {
|
|
20356
20527
|
scrollToElement(selectMenuTableRef.current, elementFocus.offsetTop - 65);
|
|
@@ -20364,28 +20535,22 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20364
20535
|
timeOutElement = setTimeout(() => {
|
|
20365
20536
|
elemment.scrollTo({
|
|
20366
20537
|
top,
|
|
20367
|
-
behavior: 'smooth'
|
|
20538
|
+
behavior: 'smooth',
|
|
20368
20539
|
});
|
|
20369
20540
|
}, 100);
|
|
20370
20541
|
};
|
|
20371
|
-
const renderHeaderCol = (col, indexCol) => {
|
|
20372
|
-
return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
|
|
20373
|
-
width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? 'auto') : col.width,
|
|
20374
|
-
minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? 'auto') : col.minWidth,
|
|
20375
|
-
top: `${0 * 35}px`,
|
|
20376
|
-
maxWidth: col.maxWidth
|
|
20377
|
-
}, children: jsxRuntime.jsx("div", { role: "textbox", title: t(col.headerText ?? ''), style: {
|
|
20378
|
-
height: `${1 * 35}px`,
|
|
20379
|
-
justifyContent: col.textAlign ?? 'left'
|
|
20380
|
-
}, className: "r-select-headercell-div", children: t(col.headerText ?? '') }) })) }, `header-select-${indexCol}`));
|
|
20381
|
-
};
|
|
20382
20542
|
const checkSearch = (keyword, data, columnsSearch) => {
|
|
20383
20543
|
if (!keyword || columnsSearch.length === 0) {
|
|
20384
20544
|
return true;
|
|
20385
20545
|
}
|
|
20386
20546
|
for (let index = 0; index < columnsSearch.length; index++) {
|
|
20387
20547
|
const key = columnsSearch[index].field.trim();
|
|
20388
|
-
if (data[key] &&
|
|
20548
|
+
if (data[key] &&
|
|
20549
|
+
data[key]
|
|
20550
|
+
.toString()
|
|
20551
|
+
.trim()
|
|
20552
|
+
.toLowerCase()
|
|
20553
|
+
.includes(keyword.trim().toLowerCase())) {
|
|
20389
20554
|
return true;
|
|
20390
20555
|
}
|
|
20391
20556
|
}
|
|
@@ -20401,7 +20566,8 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20401
20566
|
if (!searchTerm) {
|
|
20402
20567
|
setOptionsLoad(undefined);
|
|
20403
20568
|
}
|
|
20404
|
-
else if (allowCreate &&
|
|
20569
|
+
else if (allowCreate &&
|
|
20570
|
+
!currentOptions?.find((x) => x[fieldLabel ?? 'label'] === searchTerm)) {
|
|
20405
20571
|
setHaveCreateNew(true);
|
|
20406
20572
|
return;
|
|
20407
20573
|
}
|
|
@@ -20411,11 +20577,26 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20411
20577
|
const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
|
|
20412
20578
|
return element && element.scrollWidth > element.clientWidth;
|
|
20413
20579
|
};
|
|
20414
|
-
|
|
20580
|
+
React__default["default"].memo((props) => {
|
|
20415
20581
|
const { indexRow, row, isSelected, level = 0 } = props;
|
|
20416
|
-
return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$1('r-select-row', { 'last-row': indexRow ===
|
|
20582
|
+
return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$1('r-select-row', { 'last-row': indexRow === currentOptions.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && (jsxRuntime.jsx("td", { className: classNames$1(`r-select-rowcell`, {
|
|
20583
|
+
'r-select-move': indexFocus === indexRow,
|
|
20584
|
+
'r-select-active': !isMulti &&
|
|
20585
|
+
value &&
|
|
20586
|
+
(compareFunction
|
|
20587
|
+
? compareFunction(row)
|
|
20588
|
+
: value[fieldValue ?? 'value'] ===
|
|
20589
|
+
row[fieldValue ?? 'value']),
|
|
20590
|
+
}), style: {
|
|
20591
|
+
width: 40,
|
|
20592
|
+
textAlign: 'center',
|
|
20593
|
+
padding: 0,
|
|
20594
|
+
paddingBottom: 6,
|
|
20595
|
+
}, onClick: (e) => {
|
|
20417
20596
|
if (isMulti) {
|
|
20418
|
-
const index = value?.findIndex((x) =>
|
|
20597
|
+
const index = value?.findIndex((x) => compareFunction
|
|
20598
|
+
? compareFunction(row)
|
|
20599
|
+
: x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
|
|
20419
20600
|
if (index > -1) {
|
|
20420
20601
|
value?.splice(index, 1);
|
|
20421
20602
|
handChange([...value]);
|
|
@@ -20433,25 +20614,42 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20433
20614
|
}
|
|
20434
20615
|
}, children: jsxRuntime.jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { }, style: { textAlign: 'center', marginTop: 6 } }) })), (columns ? columns : defaultColumns).map((col, indexCol) => {
|
|
20435
20616
|
let valueDisplay = row[col.field];
|
|
20436
|
-
if (col.type === 'numeric' ||
|
|
20437
|
-
|
|
20617
|
+
if (col.type === 'numeric' ||
|
|
20618
|
+
(col.typeCondition && col.typeCondition(row) === 'numeric')) {
|
|
20619
|
+
valueDisplay =
|
|
20620
|
+
formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? '.', formatSetting?.thousandSeparator ?? ',', col.fraction ?? 0, true, false) ?? 0;
|
|
20438
20621
|
}
|
|
20439
20622
|
else if (col.type === 'date') {
|
|
20440
|
-
valueDisplay = valueDisplay
|
|
20623
|
+
valueDisplay = valueDisplay
|
|
20624
|
+
? formatDateTime(valueDisplay, formatSetting?.dateFormat)
|
|
20625
|
+
: '';
|
|
20441
20626
|
}
|
|
20442
20627
|
else if (col.type === 'datetime') {
|
|
20443
|
-
valueDisplay = valueDisplay
|
|
20628
|
+
valueDisplay = valueDisplay
|
|
20629
|
+
? formatDateTime(valueDisplay, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm')
|
|
20630
|
+
: '';
|
|
20444
20631
|
}
|
|
20445
20632
|
return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && (jsxRuntime.jsx("td", { id: `select-${id}-${indexRow}-${indexCol}`,
|
|
20446
20633
|
// ref={refRow}
|
|
20447
|
-
className: classNames$1(`r-select-rowcell`, {
|
|
20634
|
+
className: classNames$1(`r-select-rowcell`, {
|
|
20635
|
+
'r-select-move': indexFocus === indexRow,
|
|
20636
|
+
'r-select-active': !isMulti &&
|
|
20637
|
+
value &&
|
|
20638
|
+
(compareFunction
|
|
20639
|
+
? compareFunction(row)
|
|
20640
|
+
: value[fieldValue ?? 'value'] ===
|
|
20641
|
+
row[fieldValue ?? 'value']),
|
|
20642
|
+
}), style: {
|
|
20448
20643
|
minWidth: col.minWidth,
|
|
20449
20644
|
width: col.width,
|
|
20450
20645
|
maxWidth: col.maxWidth,
|
|
20451
|
-
textAlign: col.textAlign ? col.textAlign : 'left'
|
|
20646
|
+
textAlign: col.textAlign ? col.textAlign : 'left',
|
|
20452
20647
|
}, onClick: (e) => {
|
|
20453
20648
|
if (isMulti) {
|
|
20454
|
-
const index = value?.findIndex((x) =>
|
|
20649
|
+
const index = value?.findIndex((x) => compareFunction
|
|
20650
|
+
? compareFunction(row)
|
|
20651
|
+
: x[fieldValue ?? 'value'] ===
|
|
20652
|
+
row[fieldValue ?? 'value']);
|
|
20455
20653
|
if (index > -1) {
|
|
20456
20654
|
value?.splice(index, 1);
|
|
20457
20655
|
handChange([...value]);
|
|
@@ -20478,36 +20676,36 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20478
20676
|
setIndexFocus(indexRow);
|
|
20479
20677
|
}
|
|
20480
20678
|
e.stopPropagation();
|
|
20481
|
-
}, children: col.template ? col.template(row, indexRow) : col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [
|
|
20679
|
+
}, children: col.template ? (col.template(row, indexRow)) : col.type === 'numeric' && Number(row[col.field]) < 0 ? (jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] })) : (valueDisplay) }, `col-${indexRow}-${indexCol}`)), checkOverflow(indexRow, indexCol) && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : valueDisplay }))] }, indexCol));
|
|
20482
20680
|
})] }, `row-${indexRow}`));
|
|
20483
20681
|
});
|
|
20484
|
-
const RenderTable = (props) => {
|
|
20485
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [!(noHeader || (columns?.length ?? 0) === 0) && (jsxRuntime.jsx("thead", { className: "r-select-gridheader", children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && (jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
|
|
20486
|
-
if (isMulti) {
|
|
20487
|
-
if (isSelectedAll) {
|
|
20488
|
-
handChange([]);
|
|
20489
|
-
}
|
|
20490
|
-
else {
|
|
20491
|
-
handChange([...(optionsLoad ? optionsLoad : options)]);
|
|
20492
|
-
}
|
|
20493
|
-
e.stopPropagation();
|
|
20494
|
-
}
|
|
20495
|
-
}, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) })), (columns ? columns : defaultColumns).map((col, index) => {
|
|
20496
|
-
return renderHeaderCol(col, index);
|
|
20497
|
-
})] }) })), (optionsLoad ? optionsLoad : options) && !isLoading && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("tbody", { className: "r-select-gridcontent", children: [haveCreateNew && jsxRuntime.jsx(RenderElement, { isSelected: false, indexRow: 0, row: { valueCreate: searchTerm, [fieldValue ?? 'value']: searchTerm, [fieldLabel ?? 'label']: `${t('Create')} '${searchTerm}'`, isCreated: true } }), (optionsLoad ? optionsLoad : options)?.map((row, indexRow) => {
|
|
20498
|
-
const isSelected = isMulti && value?.some((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
|
|
20499
|
-
return jsxRuntime.jsx(RenderElement, { isSelected: isSelected ?? false, indexRow: indexRow + (haveCreateNew ? 1 : 0), row: row }, `select-table-${indexRow}`);
|
|
20500
|
-
})] }) }))] }), ((optionsLoad ? optionsLoad : options)?.length ?? 0) === 0 && !haveCreateNew && !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.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx(Spinner$1, { className: "me-1", children: " " }), t('Loading...')] }))] }));
|
|
20501
|
-
};
|
|
20502
20682
|
return (jsxRuntime.jsx("div", { className: classNames$1('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: selectTableRef, children: jsxRuntime.jsxs(Dropdown$1$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxRuntime.jsxs(DropdownToggle$1, { onClick: (e) => {
|
|
20503
20683
|
if (!isDisabled) {
|
|
20504
20684
|
inputRef?.current.focus();
|
|
20505
20685
|
handleOpenClose();
|
|
20506
20686
|
}
|
|
20507
20687
|
e.preventDefault();
|
|
20508
|
-
}, tag: "div", style: {
|
|
20509
|
-
|
|
20510
|
-
|
|
20688
|
+
}, tag: "div", style: {
|
|
20689
|
+
width: width
|
|
20690
|
+
? width
|
|
20691
|
+
: selectTableRef?.current?.clientWidth
|
|
20692
|
+
? selectTableRef?.current?.clientWidth
|
|
20693
|
+
: 'auto',
|
|
20694
|
+
}, className: classNames$1('select-table-control', { 'r-select-is-disabled': isDisabled }, { 'r-select-is-open': dropdownOpen }, { 'r-select-is-focus': isFocus }, { 'r-select-is-invalid': invalid }), children: [jsxRuntime.jsxs("div", { className: "select-table-container", children: [isMulti ? (jsxRuntime.jsx("div", { className: classNames$1('select-value is-mutil', {
|
|
20695
|
+
'd-none': searchTerm,
|
|
20696
|
+
}), children: value?.map((ele, index) => {
|
|
20697
|
+
return (jsxRuntime.jsxs("span", { children: [index === 0 ? '' : ', ', formatOptionLabel
|
|
20698
|
+
? formatOptionLabel(ele)
|
|
20699
|
+
: ele[fieldLabel ?? 'label']] }, index));
|
|
20700
|
+
}) })) : (jsxRuntime.jsxs("div", { className: classNames$1('select-value', {
|
|
20701
|
+
'd-none': searchTerm,
|
|
20702
|
+
}), children: [value
|
|
20703
|
+
? formatOptionLabel
|
|
20704
|
+
? formatOptionLabel(value)
|
|
20705
|
+
: value[fieldLabel ?? 'label']
|
|
20706
|
+
: '', ' '] })), !((isMulti ? value?.length > 0 : value) ||
|
|
20707
|
+
isDisabled ||
|
|
20708
|
+
searchTerm) && (jsxRuntime.jsx("div", { className: classNames$1('select-placeholder'), children: placeholder })), jsxRuntime.jsx("div", { className: "input-container", children: jsxRuntime.jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classNames$1('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => onPaste && !dropdownOpen && onPaste(e), onChange: (val) => {
|
|
20511
20709
|
if (val.target.value) {
|
|
20512
20710
|
if (loadOptions && val.target.value) {
|
|
20513
20711
|
setIsLoading(true);
|
|
@@ -20529,13 +20727,23 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
20529
20727
|
width: width ? width + 2 : 'min-content',
|
|
20530
20728
|
position: 'fixed',
|
|
20531
20729
|
borderRadius: 4,
|
|
20532
|
-
zIndex: 9999
|
|
20730
|
+
zIndex: 9999,
|
|
20533
20731
|
}, children: jsxRuntime.jsx(DropdownItem$1, { className: classNames$1('p-0 menu-select-table'), tag: "div", header: true, children: dropdownOpen && (jsxRuntime.jsx("div", { style: { backgroundColor: 'none' }, onMouseDown: (e) => {
|
|
20534
20732
|
if (!isDisabled) {
|
|
20535
20733
|
inputRef?.current.focus();
|
|
20536
20734
|
e.preventDefault();
|
|
20537
20735
|
}
|
|
20538
|
-
}, children: jsxRuntime.jsxs("div", { className: "r-select-grid", children: [jsxRuntime.jsx("div", { className: classNames$1('r-select-gridtable', {
|
|
20736
|
+
}, children: jsxRuntime.jsxs("div", { className: "r-select-grid", children: [jsxRuntime.jsx("div", { className: classNames$1('r-select-gridtable', {
|
|
20737
|
+
'no-header': noHeader || (columns?.length ?? 0) === 0,
|
|
20738
|
+
}), ref: selectMenuTableRef, style: {
|
|
20739
|
+
width: menuWidth,
|
|
20740
|
+
minWidth: selectTableRef?.current?.clientWidth,
|
|
20741
|
+
maxHeight: maxHeight ?? defaultMaxHeight$1,
|
|
20742
|
+
}, children: jsxRuntime.jsx(TableElement$1, { haveCreateNew: haveCreateNew, isLoading: isLoading, searchTerm: searchTerm, fieldLabel: fieldLabel, noHeader: noHeader, closeMenu: closeMenu, value: value, isMulti: isMulti, currentOptions: currentOptions, fieldValue: fieldValue, columns: columns, defaultColumns: defaultColumns, indexFocus: indexFocus, formatSetting: formatSetting, handChange: handChange, compareFunction: compareFunction, setIndexFocus: setIndexFocus, setSearchTerm: setSearchTerm }) }), jsxRuntime.jsxs("div", { className: classNames$1('r-select-footer', {
|
|
20743
|
+
'd-none': !(showFooter === true ||
|
|
20744
|
+
handleAdd ||
|
|
20745
|
+
isMulti),
|
|
20746
|
+
}), children: [jsxRuntime.jsxs(Button$1$1, { outline: true, color: "primary", onClick: () => handleAdd?.(), className: classNames$1('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsxRuntime.jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), isMulti && (jsxRuntime.jsx("div", { className: "ms-50 text-primary h-100 d-flex align-items-center", children: t('countSelected', { item: value?.length ?? 0 }) })), footerComponent ? footerComponent() : null] })] }) })) }) })] }) }) }));
|
|
20539
20747
|
});
|
|
20540
20748
|
|
|
20541
20749
|
const PagingComponent = ({ totalItem, gridRef, pageSize, currentPage, onChangePage, pageOptions, onChangePageSize }) => {
|
|
@@ -36351,7 +36559,7 @@ const RenderEditCellComponent = (props) => {
|
|
|
36351
36559
|
}
|
|
36352
36560
|
};
|
|
36353
36561
|
|
|
36354
|
-
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-context-popover .popover-arrow {\n display: none !important;\n}\n.r-context-popover .popover-body {\n padding: 5px !important;\n border: none !important;\n border-radius: 10px;\n}\n.r-context-popover .popover-body .r-context-item {\n padding: 5px 10px;\n font-size: 13px;\n cursor: pointer;\n border-radius: 5px;\n display: flex;\n align-items: center;\n}\n.r-context-popover .popover-body .r-context-item:hover {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\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-last-row .r-rowcell .r-rowcell-div {\n border-bottom: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell {\n background-color: #FFFFFF;\n border-bottom: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n vertical-align: middle;\n padding: 0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group {\n background-color: #fafafa;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 5px;\n display: flex;\n align-items: center;\n background-color: #fafafa;\n font-weight: 550;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group {\n left: 0px;\n position: sticky;\n z-index: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 5px !important;\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 .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 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 0px;\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}";
|
|
36562
|
+
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-context-popover .popover-arrow {\n display: none !important;\n}\n.r-context-popover .popover-body {\n padding: 5px !important;\n border: none !important;\n border-radius: 10px;\n}\n.r-context-popover .popover-body .r-context-item {\n padding: 5px 10px;\n font-size: 13px;\n cursor: pointer;\n border-radius: 5px;\n display: flex;\n align-items: center;\n}\n.r-context-popover .popover-body .r-context-item:hover {\n background-color: rgba(235, 70, 25, 0.1);\n color: #eb4619;\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-last-row .r-rowcell .r-rowcell-div {\n border-bottom: 1px solid #e0e0e0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell {\n background-color: #FFFFFF;\n border-bottom: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n vertical-align: middle;\n padding: 0;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group {\n background-color: #fafafa;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-sum-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 5px;\n display: flex;\n align-items: center;\n background-color: #fafafa;\n font-weight: 550;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group {\n left: 0px;\n position: sticky;\n z-index: 1;\n}\n.r-table-edit .r-grid .r-gridtable .r-gridcontent .r-row .r-rowcell.r-cell-group .r-rowcell-div {\n padding-left: 10px;\n padding-right: 5px !important;\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 .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 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 0px;\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 {\n transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;\n}\n.r-table-edit.r-virtualized-table .r-row:hover .r-rowcell {\n background-color: #fce6df !important;\n}\n.r-table-edit.r-virtualized-table.is-maximized {\n position: fixed;\n inset: 0;\n width: 100vw;\n height: 100vh;\n z-index: 9999;\n background: #fff;\n}\n@keyframes zoomFeel {\n 0% {\n transform: scale(0.98);\n }\n 55% {\n transform: scale(1.02);\n }\n 100% {\n transform: scale(1);\n }\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}";
|
|
36355
36563
|
styleInject(css_248z$2);
|
|
36356
36564
|
|
|
36357
36565
|
const getColumn = (contentColumns, col, count) => {
|
|
@@ -39018,13 +39226,33 @@ const DateRangeFilterComponent = ({ fieldFilter, filterBy, handleSave }) => {
|
|
|
39018
39226
|
};
|
|
39019
39227
|
|
|
39020
39228
|
const HeaderTableCol = (props) => {
|
|
39021
|
-
const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objHeaderWidthFixLeft, objHeaderWidthFixRight,
|
|
39229
|
+
const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objHeaderWidthFixLeft, objHeaderWidthFixRight, selectedRows, columns, orderBy, changeFilter, filterBy, changeOrder, allowFiltering, allowSorting, container, fisrtObjWidthFixRight, lastObjWidthFixLeft, setContentColumns, formatSetting, optionsFilter, idTable, isMulti, fieldKey } = props;
|
|
39022
39230
|
const { t } = reactI18next.useTranslation();
|
|
39023
39231
|
const headerRef = React$5.useRef(null);
|
|
39024
39232
|
const order = orderBy.find((item) => item.key === col.field);
|
|
39025
39233
|
const [openFilter, setOpenFilter] = React$5.useState(false);
|
|
39026
39234
|
const filter = filterBy.find((item) => item.key === col.field);
|
|
39027
39235
|
const herderContent = col.headerDisplay ?? col.headerText ?? '';
|
|
39236
|
+
const headerCheckboxRef = React$5.useRef(null);
|
|
39237
|
+
const typeSelected = React$5.useMemo(() => {
|
|
39238
|
+
// 0: none selected, 1: some selected, 2: all selected
|
|
39239
|
+
if (!isMulti || !selectEnable || dataSource.length === 0 || !selectedRows?.length) {
|
|
39240
|
+
return 0;
|
|
39241
|
+
}
|
|
39242
|
+
else if (selectedRows?.length < dataSource.length) {
|
|
39243
|
+
return 1;
|
|
39244
|
+
}
|
|
39245
|
+
else if (!dataSource.some((item) => !selectedRows.some((y) => y[fieldKey] === item[fieldKey]))) {
|
|
39246
|
+
return 2;
|
|
39247
|
+
}
|
|
39248
|
+
return 1;
|
|
39249
|
+
}, [dataSource, selectedRows]);
|
|
39250
|
+
React$5.useEffect(() => {
|
|
39251
|
+
if (headerCheckboxRef.current) {
|
|
39252
|
+
headerCheckboxRef.current.checked = typeSelected === 2;
|
|
39253
|
+
headerCheckboxRef.current.indeterminate = typeSelected === 1;
|
|
39254
|
+
}
|
|
39255
|
+
}, [typeSelected]);
|
|
39028
39256
|
const handleResize = (e, { size }) => {
|
|
39029
39257
|
if (size.width > 50) {
|
|
39030
39258
|
const newColumns = [...columns];
|
|
@@ -39058,12 +39286,20 @@ const HeaderTableCol = (props) => {
|
|
|
39058
39286
|
orderBy.push({ direction: 'asc', key: col.field });
|
|
39059
39287
|
changeOrder(orderBy);
|
|
39060
39288
|
}
|
|
39061
|
-
}, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting && !col.columns?.length }), children: [col.field === 'checkbox' && (jsxRuntime.jsx(Input$1, {
|
|
39289
|
+
}, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowSorting && !col.columns?.length }), children: [col.field === 'checkbox' && (jsxRuntime.jsx(Input$1, { innerRef: (el) => {
|
|
39290
|
+
headerCheckboxRef.current = el;
|
|
39291
|
+
}, type: "checkbox", style: {
|
|
39292
|
+
marginTop: 6,
|
|
39293
|
+
textAlign: 'center',
|
|
39294
|
+
cursor: 'pointer'
|
|
39295
|
+
}, onChange: () => {
|
|
39062
39296
|
if (selectEnable) {
|
|
39063
|
-
if (
|
|
39064
|
-
setSelectedRows(dataSource
|
|
39065
|
-
|
|
39066
|
-
|
|
39297
|
+
if (typeSelected === 0) {
|
|
39298
|
+
setSelectedRows([...dataSource]);
|
|
39299
|
+
}
|
|
39300
|
+
else if (typeSelected === 1) {
|
|
39301
|
+
const notSelectedRows = dataSource.filter((item) => !selectedRows.some((x) => x[fieldKey] === item[fieldKey]));
|
|
39302
|
+
setSelectedRows([...selectedRows, ...notSelectedRows]);
|
|
39067
39303
|
}
|
|
39068
39304
|
else {
|
|
39069
39305
|
setSelectedRows([]);
|
|
@@ -39848,14 +40084,22 @@ const ToolbarBottom = ({ handleAdd, handleDuplicate, handleInsertBefore, handleI
|
|
|
39848
40084
|
}), !toolbarSetting?.hiddenSetting && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item me-25'), "aria-disabled": "false", children: jsxRuntime.jsx(SvgSettings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item me-25', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: jsxRuntime.jsxs(UncontrolledDropdown, { className: "dropdown-user nav-item", children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", color: "primary", onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(SvgInfo, { className: "cursor-pointer text-primary" }) }), jsxRuntime.jsx(DropdownMenu$1, { className: "formula-dropdown icon-dropdown", children: jsxRuntime.jsxs("ul", { className: "mb-0 pe-50", children: [jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\u00E2n b\u1EA3n" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \u00F4 v\u00E0 Ctrl + V \u0111\u1EC3 d\u00E1n th\u00F4ng tin t\u1EEB excel" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\u00E9p h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\u00E1n h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2193 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng d\u01B0\u1EDBi" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2191 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng tr\u00EAn" })] }) })] }) })] }))] })] }) }));
|
|
39849
40085
|
};
|
|
39850
40086
|
|
|
39851
|
-
const RenderToolbarTop = ({ toolbarTopOption }) => {
|
|
40087
|
+
const RenderToolbarTop = ({ toolbarTopOption, maximize, setMaximize }) => {
|
|
39852
40088
|
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) => {
|
|
39853
40089
|
return item.align === 'left' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
39854
40090
|
}) }), jsxRuntime.jsx("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
|
|
39855
40091
|
return item.align === 'center' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
39856
|
-
}) }), jsxRuntime.
|
|
39857
|
-
|
|
39858
|
-
|
|
40092
|
+
}) }), jsxRuntime.jsxs("div", { className: "r-toolbar-right", children: [toolbarTopOption?.map((item, index) => {
|
|
40093
|
+
return item.align === 'right' ? jsxRuntime.jsx(ToolBarElement, { item: item, index: index }) : '';
|
|
40094
|
+
}), jsxRuntime.jsxs("div", { className: "r-toolbar-item", "aria-disabled": "false", children: [maximize === true && (jsxRuntime.jsx(SvgMinimize, { fontSize: 18, color: "#7F7F7F", className: "mx-25", onClick: () => {
|
|
40095
|
+
if (setMaximize) {
|
|
40096
|
+
setMaximize(!maximize);
|
|
40097
|
+
}
|
|
40098
|
+
} })), maximize === false && (jsxRuntime.jsx(SvgMaximize, { fontSize: 18, style: { strokeWidth: 2 }, className: "mx-25", color: "#7F7F7F", onClick: () => {
|
|
40099
|
+
if (setMaximize) {
|
|
40100
|
+
setMaximize(!maximize);
|
|
40101
|
+
}
|
|
40102
|
+
} }))] })] })] }) }));
|
|
39859
40103
|
};
|
|
39860
40104
|
const ToolBarElement = ({ item, index }) => {
|
|
39861
40105
|
return (jsxRuntime.jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template?.() }, `toolbar-top-${index}`));
|
|
@@ -68757,8 +69001,8 @@ const UnExpandAllIcon = ({ className, color = '#7F7F7F', size = 24, onClick, sty
|
|
|
68757
69001
|
}, 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" })] }));
|
|
68758
69002
|
};
|
|
68759
69003
|
|
|
68760
|
-
const RenderContentCol = (props) => {
|
|
68761
|
-
const { col, indexCol, indexRow, isSelected, row, zeroVisiable, formatSetting, idTable, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, selectedRows, setSelectedRows, handleCloseContext, handleDoubleClick, fieldKey, isMulti } = props;
|
|
69004
|
+
const RenderContentCol = React__default["default"].memo((props) => {
|
|
69005
|
+
const { col, indexCol, indexRow, isSelected, row, zeroVisiable, formatSetting, idTable, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, selectedRows, setSelectedRows, handleCloseContext, handleDoubleClick, handleCellClick, fieldKey, isMulti, } = props;
|
|
68762
69006
|
const cellId = `content-${idTable}-row${indexRow}col-${indexCol}`;
|
|
68763
69007
|
const checkOverflow = () => {
|
|
68764
69008
|
const element = document.getElementById(cellId);
|
|
@@ -68780,10 +69024,12 @@ const RenderContentCol = (props) => {
|
|
|
68780
69024
|
const RenderElement = () => {
|
|
68781
69025
|
if (col.field === '#' || col.type === '#') {
|
|
68782
69026
|
return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', {
|
|
68783
|
-
'r-active-cell': isSelected
|
|
69027
|
+
'r-active-cell': isSelected,
|
|
68784
69028
|
}), style: {
|
|
68785
|
-
fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType
|
|
68786
|
-
|
|
69029
|
+
fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType
|
|
69030
|
+
? 600
|
|
69031
|
+
: 400,
|
|
69032
|
+
fontStyle: row.haveItalicType ? 'italic' : 'normal',
|
|
68787
69033
|
}, onDoubleClick: (e) => {
|
|
68788
69034
|
e.preventDefault();
|
|
68789
69035
|
handleCloseContext();
|
|
@@ -68792,11 +69038,15 @@ const RenderContentCol = (props) => {
|
|
|
68792
69038
|
}
|
|
68793
69039
|
else if (col.type === 'checkbox' || col.field === 'checkbox') {
|
|
68794
69040
|
return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
|
|
68795
|
-
'r-active-cell': isSelected
|
|
69041
|
+
'r-active-cell': isSelected,
|
|
68796
69042
|
}), style: {
|
|
68797
69043
|
display: 'flex',
|
|
68798
|
-
justifyContent: col.textAlign === 'center'
|
|
68799
|
-
|
|
69044
|
+
justifyContent: col.textAlign === 'center'
|
|
69045
|
+
? 'center'
|
|
69046
|
+
: col.textAlign === 'right'
|
|
69047
|
+
? 'flex-end'
|
|
69048
|
+
: 'flex-start',
|
|
69049
|
+
alignItems: 'center',
|
|
68800
69050
|
}, onClick: (e) => {
|
|
68801
69051
|
setSelectedRows(toggleSelect());
|
|
68802
69052
|
e.stopPropagation();
|
|
@@ -68806,8 +69056,12 @@ const RenderContentCol = (props) => {
|
|
|
68806
69056
|
let value = row[col.field];
|
|
68807
69057
|
// ✅ Format dữ liệu theo loại cột
|
|
68808
69058
|
if (col.type === 'numeric') {
|
|
68809
|
-
value =
|
|
68810
|
-
|
|
69059
|
+
value =
|
|
69060
|
+
formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
|
|
69061
|
+
if (!zeroVisiable &&
|
|
69062
|
+
!col.zeroVisiable &&
|
|
69063
|
+
!(row?.sortOrder < 0 || row?.sortOrder > 100000) &&
|
|
69064
|
+
(value === '0' || value === 0)) {
|
|
68811
69065
|
value = '';
|
|
68812
69066
|
}
|
|
68813
69067
|
}
|
|
@@ -68815,31 +69069,43 @@ const RenderContentCol = (props) => {
|
|
|
68815
69069
|
value = value ? formatDateTime(value, formatSetting?.dateFormat) : '';
|
|
68816
69070
|
}
|
|
68817
69071
|
else if (col.type === 'datetime') {
|
|
68818
|
-
value = value
|
|
69072
|
+
value = value
|
|
69073
|
+
? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm')
|
|
69074
|
+
: '';
|
|
68819
69075
|
}
|
|
68820
69076
|
if (col.template) {
|
|
68821
69077
|
value = col.template(row, indexRow) ?? '';
|
|
68822
69078
|
}
|
|
68823
69079
|
const isNegative = col.type === 'numeric' && Number(row[col.field]) < 0;
|
|
68824
|
-
const textColor = isNegative
|
|
68825
|
-
|
|
68826
|
-
|
|
68827
|
-
const
|
|
69080
|
+
const textColor = isNegative
|
|
69081
|
+
? (formatSetting?.colorNegative ?? 'red')
|
|
69082
|
+
: undefined;
|
|
69083
|
+
const prefix = isNegative ? (formatSetting?.prefixNegative ?? '-') : '';
|
|
69084
|
+
const suffix = isNegative ? (formatSetting?.suffixNegative ?? '') : '';
|
|
69085
|
+
const displayText = isNegative
|
|
69086
|
+
? `${prefix}${value}${suffix}`
|
|
69087
|
+
: (value ?? '');
|
|
68828
69088
|
return (jsxRuntime.jsxs("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
|
|
68829
|
-
'r-active-cell': isSelected
|
|
69089
|
+
'r-active-cell': isSelected,
|
|
68830
69090
|
}), style: {
|
|
68831
|
-
fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType
|
|
68832
|
-
|
|
69091
|
+
fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType
|
|
69092
|
+
? 600
|
|
69093
|
+
: 400,
|
|
69094
|
+
fontStyle: row.haveItalicType ? 'italic' : 'normal',
|
|
68833
69095
|
}, children: [jsxRuntime.jsx("div", { className: "r-cell-text", style: {
|
|
68834
69096
|
display: 'flex',
|
|
68835
|
-
justifyContent: col.textAlign === 'center'
|
|
68836
|
-
|
|
69097
|
+
justifyContent: col.textAlign === 'center'
|
|
69098
|
+
? 'center'
|
|
69099
|
+
: col.textAlign === 'right'
|
|
69100
|
+
? 'flex-end'
|
|
69101
|
+
: 'flex-start',
|
|
69102
|
+
alignItems: 'center',
|
|
68837
69103
|
}, children: jsxRuntime.jsx("div", { id: cellId, style: {
|
|
68838
69104
|
color: textColor,
|
|
68839
69105
|
overflow: 'hidden',
|
|
68840
69106
|
textOverflow: 'ellipsis',
|
|
68841
69107
|
whiteSpace: 'pre',
|
|
68842
|
-
maxWidth: '100%'
|
|
69108
|
+
maxWidth: '100%',
|
|
68843
69109
|
}, children: displayText }) }), checkOverflow() && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: cellId, placement: "top", children: jsxRuntime.jsx("div", { style: { color: textColor }, onClick: (e) => {
|
|
68844
69110
|
e.stopPropagation();
|
|
68845
69111
|
e.preventDefault();
|
|
@@ -68848,15 +69114,21 @@ const RenderContentCol = (props) => {
|
|
|
68848
69114
|
};
|
|
68849
69115
|
const clickTimerRef = React$5.useRef(null);
|
|
68850
69116
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: col.visible !== false && col.isGroup !== true && (jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, {
|
|
68851
|
-
'fixed-last': (col.fixedType === 'left' &&
|
|
69117
|
+
'fixed-last': (col.fixedType === 'left' &&
|
|
69118
|
+
indexCol === lastObjWidthFixLeft) ||
|
|
69119
|
+
(col.fixedType === 'right' &&
|
|
69120
|
+
indexCol === fisrtObjWidthFixRight),
|
|
68852
69121
|
}, { 'r-active': isSelected }), style: {
|
|
68853
69122
|
left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
|
|
68854
|
-
right: col.fixedType === 'right'
|
|
69123
|
+
right: col.fixedType === 'right'
|
|
69124
|
+
? objWidthFixRight[indexCol]
|
|
69125
|
+
: undefined,
|
|
68855
69126
|
}, onClick: (e) => {
|
|
68856
69127
|
const tag = e.target?.nodeName;
|
|
68857
69128
|
if (tag !== 'DIV' && tag !== 'TD') {
|
|
68858
69129
|
return;
|
|
68859
69130
|
}
|
|
69131
|
+
handleCellClick?.(row, col);
|
|
68860
69132
|
if (clickTimerRef.current) {
|
|
68861
69133
|
window.clearTimeout(clickTimerRef.current);
|
|
68862
69134
|
}
|
|
@@ -68881,20 +69153,11 @@ const RenderContentCol = (props) => {
|
|
|
68881
69153
|
e.preventDefault();
|
|
68882
69154
|
e.stopPropagation();
|
|
68883
69155
|
}, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
|
|
68884
|
-
};
|
|
69156
|
+
});
|
|
68885
69157
|
|
|
68886
|
-
const
|
|
69158
|
+
const TableElement = React__default["default"].memo((props) => {
|
|
69159
|
+
const { contentColumns, dataSource, fieldKey, filterBy, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, orderBy, selectedRows, setContentColumns, setSelectedRows, formatSetting, gridRef, idTable, headerColumns, objHeaderWidthFixLeft, objHeaderWidthFixRight, isMulti, querySetting, searchSetting, searchTerm, columnsAggregate, haveSum, expandsAll, zeroVisiable, setFilterBy, setOrderBy, setExpandsAll, handleDoubleClick, handleCellClick, contextMenuItems, handleContextMenuClick, isLoading, } = props;
|
|
68887
69160
|
const { t } = reactI18next.useTranslation();
|
|
68888
|
-
const gridRef = React$5.useRef(null);
|
|
68889
|
-
const [openPopupSetupColumn, setOpenPopupSetupColumn] = React$5.useState(false);
|
|
68890
|
-
const [selectedRows, setSelectedRows] = React$5.useState([]);
|
|
68891
|
-
const [orderBy, setOrderBy] = React$5.useState([]);
|
|
68892
|
-
const [filterBy, setFilterBy] = React$5.useState([]);
|
|
68893
|
-
const [searchTerm, setSearchTerm] = React$5.useState('');
|
|
68894
|
-
const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? 'id';
|
|
68895
|
-
const [contentColumns, setContentColumns] = React$5.useState([]);
|
|
68896
|
-
const [groupColumns, setGroupColumns] = React$5.useState([]);
|
|
68897
|
-
const [expandsAll, setExpandsAll] = React$5.useState(true);
|
|
68898
69161
|
const [context, setContext] = React$5.useState(null);
|
|
68899
69162
|
const virtualDivRef = React$5.useRef(null);
|
|
68900
69163
|
useOnClickOutside(virtualDivRef, () => {
|
|
@@ -68904,17 +69167,17 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
68904
69167
|
}, 100);
|
|
68905
69168
|
}
|
|
68906
69169
|
});
|
|
69170
|
+
const handleCloseContext = () => setContext((prev) => (prev ? { ...prev, show: false } : null));
|
|
68907
69171
|
React$5.useEffect(() => {
|
|
68908
|
-
if (
|
|
68909
|
-
|
|
69172
|
+
if (virtualDivRef.current && context) {
|
|
69173
|
+
// đặt vị trí div ảo tại con trỏ chuột
|
|
69174
|
+
virtualDivRef.current.style.position = 'fixed';
|
|
69175
|
+
virtualDivRef.current.style.top = `${context.y}px`;
|
|
69176
|
+
virtualDivRef.current.style.left = `${context.x}px`;
|
|
69177
|
+
virtualDivRef.current.style.width = '0px';
|
|
69178
|
+
virtualDivRef.current.style.height = '0px';
|
|
68910
69179
|
}
|
|
68911
|
-
|
|
68912
|
-
}, [groupSetting?.groupColumns]);
|
|
68913
|
-
const { levels: headerColumns, objHeaderWidthFixLeft, objHeaderWidthFixRight, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = React$5.useMemo(() => {
|
|
68914
|
-
const rs = calculateTableStructure(columns, settingColumns?.value, groupSetting?.groupColumns);
|
|
68915
|
-
setContentColumns(rs.flat);
|
|
68916
|
-
return rs;
|
|
68917
|
-
}, [columns, settingColumns, groupSetting?.groupColumns]);
|
|
69180
|
+
}, [context]);
|
|
68918
69181
|
const firstColSpan = React$5.useMemo(() => {
|
|
68919
69182
|
let count = 0;
|
|
68920
69183
|
let index = 3;
|
|
@@ -68939,7 +69202,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
68939
69202
|
if (searchTerm) {
|
|
68940
69203
|
datas = datas.filter((row) => {
|
|
68941
69204
|
return searchSetting?.keyField?.some((key) => {
|
|
68942
|
-
return row[key]
|
|
69205
|
+
return row[key]
|
|
69206
|
+
?.toString()
|
|
69207
|
+
.toLowerCase()
|
|
69208
|
+
.includes(searchTerm.trim().toLowerCase());
|
|
68943
69209
|
});
|
|
68944
69210
|
});
|
|
68945
69211
|
}
|
|
@@ -68948,7 +69214,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
68948
69214
|
return filterBy.every((filter) => {
|
|
68949
69215
|
const { key, value, ope } = filter;
|
|
68950
69216
|
const rowValue = row[key];
|
|
68951
|
-
if (rowValue === undefined ||
|
|
69217
|
+
if (rowValue === undefined ||
|
|
69218
|
+
rowValue === null ||
|
|
69219
|
+
value === undefined ||
|
|
69220
|
+
value === null) {
|
|
68952
69221
|
return false;
|
|
68953
69222
|
}
|
|
68954
69223
|
const valStr = String(rowValue).toLowerCase();
|
|
@@ -68998,6 +69267,202 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
68998
69267
|
}
|
|
68999
69268
|
return datas;
|
|
69000
69269
|
}, [searchTerm, filterBy, orderBy, dataSource]);
|
|
69270
|
+
const RenderContent = React__default["default"].memo(({ datas, level = 0 }) => {
|
|
69271
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: datas.map((row, indexRow) => {
|
|
69272
|
+
const [expand, setExpand] = React$5.useState(row.expand ?? true);
|
|
69273
|
+
React$5.useEffect(() => {
|
|
69274
|
+
if (expandsAll !== undefined) {
|
|
69275
|
+
setExpand(expandsAll);
|
|
69276
|
+
row.expand = expandsAll;
|
|
69277
|
+
}
|
|
69278
|
+
}, [expandsAll]);
|
|
69279
|
+
if (row.children?.length) {
|
|
69280
|
+
const col = contentColumns.find((x) => x.field === row.field);
|
|
69281
|
+
if (!col) {
|
|
69282
|
+
return;
|
|
69283
|
+
}
|
|
69284
|
+
let value = row[col.field];
|
|
69285
|
+
if (col.type === 'numeric') {
|
|
69286
|
+
value =
|
|
69287
|
+
formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
|
|
69288
|
+
}
|
|
69289
|
+
else if (col.type === 'date') {
|
|
69290
|
+
value = value
|
|
69291
|
+
? formatDateTime(value, formatSetting?.dateFormat)
|
|
69292
|
+
: '';
|
|
69293
|
+
}
|
|
69294
|
+
else if (col.type === 'datetime') {
|
|
69295
|
+
value = value
|
|
69296
|
+
? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm')
|
|
69297
|
+
: '';
|
|
69298
|
+
}
|
|
69299
|
+
if (col.template) {
|
|
69300
|
+
value = col.template(row, indexRow) ?? '';
|
|
69301
|
+
}
|
|
69302
|
+
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: 3, children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", children: [jsxRuntime.jsx(SvgChevronRight, { style: {
|
|
69303
|
+
marginLeft: level * 20,
|
|
69304
|
+
transform: expand ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
69305
|
+
}, fontSize: 15, onClick: () => {
|
|
69306
|
+
setExpand(!expand);
|
|
69307
|
+
setExpandsAll(undefined);
|
|
69308
|
+
row.expand = !expand;
|
|
69309
|
+
} }), t(col.headerDisplay ?? col.headerText ?? ''), ": ", value, " (", row.children.length, ")"] }) }), contentColumns.map((colSum, indexCol) => {
|
|
69310
|
+
if (indexCol <= firstColSpan ||
|
|
69311
|
+
colSum.visible === false ||
|
|
69312
|
+
colSum.isGroup === true) {
|
|
69313
|
+
return;
|
|
69314
|
+
}
|
|
69315
|
+
let sumValue = row[colSum.field];
|
|
69316
|
+
const haveSum = row[colSum.field] !== undefined &&
|
|
69317
|
+
row[colSum.field] !== null;
|
|
69318
|
+
if (!haveSum &&
|
|
69319
|
+
colSum.haveSum === true &&
|
|
69320
|
+
colSum.type === 'numeric') {
|
|
69321
|
+
sumValue = row.children.reduce(function (accumulator, currentValue) {
|
|
69322
|
+
return (Number(accumulator ?? 0) +
|
|
69323
|
+
Number(currentValue[colSum.field] ?? 0));
|
|
69324
|
+
}, 0);
|
|
69325
|
+
}
|
|
69326
|
+
if (colSum.type === 'numeric') {
|
|
69327
|
+
sumValue = formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', colSum.numericSettings?.fraction, true, false);
|
|
69328
|
+
if (!zeroVisiable &&
|
|
69329
|
+
!col.zeroVisiable &&
|
|
69330
|
+
(sumValue === '0' || sumValue === 0)) {
|
|
69331
|
+
sumValue = '';
|
|
69332
|
+
}
|
|
69333
|
+
}
|
|
69334
|
+
return (jsxRuntime.jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsxRuntime.jsx("div", { className: "r-rowcell-div", style: {
|
|
69335
|
+
justifyContent: colSum.textAlign
|
|
69336
|
+
? colSum.textAlign
|
|
69337
|
+
: 'left',
|
|
69338
|
+
}, children: (haveSum || colSum.haveSum === true) &&
|
|
69339
|
+
Number(row[colSum.field] ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
|
|
69340
|
+
color: formatSetting?.colorNegative ?? 'red',
|
|
69341
|
+
}, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
|
|
69342
|
+
})] }), expand && (jsxRuntime.jsx(RenderContent, { datas: row.children, level: level + 1 }))] }, `row-${level}-${indexRow}`));
|
|
69343
|
+
}
|
|
69344
|
+
else {
|
|
69345
|
+
const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
|
|
69346
|
+
return (jsxRuntime.jsx("tr", { id: `row-content-${indexRow}`, "aria-rowindex": indexRow + 1, role: "row", className: classNames$1('r-row', {
|
|
69347
|
+
'r-last-row': level === 0 && indexRow === viewData.length - 1,
|
|
69348
|
+
}), onContextMenu: (e) => {
|
|
69349
|
+
e.preventDefault();
|
|
69350
|
+
handleContextMenu(e, row);
|
|
69351
|
+
}, children: contentColumns.map((column, indexCol) => (jsxRuntime.jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: fieldKey, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMulti, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row, zeroVisiable: zeroVisiable, handleCloseContext: handleCloseContext, handleDoubleClick: handleDoubleClick, handleCellClick: handleCellClick }, indexCol))) }, `row-content-${indexRow}`));
|
|
69352
|
+
}
|
|
69353
|
+
}) }));
|
|
69354
|
+
});
|
|
69355
|
+
const handleContextMenu = (e, row) => {
|
|
69356
|
+
e.preventDefault();
|
|
69357
|
+
setContext(null);
|
|
69358
|
+
setTimeout(() => {
|
|
69359
|
+
setContext({
|
|
69360
|
+
x: e.clientX,
|
|
69361
|
+
y: e.clientY,
|
|
69362
|
+
row,
|
|
69363
|
+
show: true,
|
|
69364
|
+
});
|
|
69365
|
+
}, 100);
|
|
69366
|
+
};
|
|
69367
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: contentColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
|
|
69368
|
+
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: true, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: gridRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: querySetting?.optionsFilter, allowFiltering: querySetting?.allowFiltering, allowSorting: querySetting?.allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
|
|
69369
|
+
setFilterBy([...val]);
|
|
69370
|
+
if (querySetting?.changeFilter) {
|
|
69371
|
+
querySetting.changeFilter(val);
|
|
69372
|
+
}
|
|
69373
|
+
}, changeOrder: (val) => {
|
|
69374
|
+
setOrderBy([...val]);
|
|
69375
|
+
if (querySetting?.changeOrder) {
|
|
69376
|
+
querySetting.changeOrder(val);
|
|
69377
|
+
}
|
|
69378
|
+
}, columns: contentColumns, setContentColumns: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fieldKey: fieldKey }, `header-${indexParent}-${index}`))) }, `header-${-indexParent}`));
|
|
69379
|
+
}) }), 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 || haveSum) && (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
|
|
69380
|
+
if (col.visible === false || col.isGroup === true) {
|
|
69381
|
+
return;
|
|
69382
|
+
}
|
|
69383
|
+
const item = columnsAggregate?.find((x) => x.field === col.field);
|
|
69384
|
+
let sumValue = item?.value;
|
|
69385
|
+
if (!item && col.haveSum === true && col.type === 'numeric') {
|
|
69386
|
+
sumValue = viewData.reduce(function (accumulator, currentValue) {
|
|
69387
|
+
return (Number(accumulator ?? 0) +
|
|
69388
|
+
Number(currentValue[col.field] ?? 0));
|
|
69389
|
+
}, 0);
|
|
69390
|
+
}
|
|
69391
|
+
if (col.type === 'numeric') {
|
|
69392
|
+
sumValue = formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false);
|
|
69393
|
+
}
|
|
69394
|
+
return (jsxRuntime.jsx("td", { className: classNames$1(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
|
|
69395
|
+
left: col.fixedType === 'left'
|
|
69396
|
+
? objWidthFixLeft[indexCol]
|
|
69397
|
+
: undefined,
|
|
69398
|
+
right: col.fixedType === 'right'
|
|
69399
|
+
? objWidthFixRight[indexCol]
|
|
69400
|
+
: undefined,
|
|
69401
|
+
textAlign: col.textAlign ? col.textAlign : 'left',
|
|
69402
|
+
}, children: jsxRuntime.jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) &&
|
|
69403
|
+
Number(item?.value ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
|
|
69404
|
+
color: formatSetting?.colorNegative ?? 'red',
|
|
69405
|
+
}, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `summarycell-${indexCol}`));
|
|
69406
|
+
}) })) })] }), jsxRuntime.jsx("div", { ref: virtualDivRef }), context &&
|
|
69407
|
+
(contextMenuItems?.length ?? 0) > 0 &&
|
|
69408
|
+
handleContextMenuClick && (jsxRuntime.jsx(Popover$1, { className: "r-context-popover", placement: "right-start", isOpen: context.show, target: virtualDivRef.current, toggle: handleCloseContext, fade: false, children: jsxRuntime.jsx(PopoverBody$1, { children: contextMenuItems?.map((item, index) => {
|
|
69409
|
+
return (jsxRuntime.jsxs("div", { className: "r-context-item", onClick: () => {
|
|
69410
|
+
handleCloseContext();
|
|
69411
|
+
handleContextMenuClick?.(item, context.row);
|
|
69412
|
+
}, children: [item.icon && (jsxRuntime.jsx("div", { className: "me-75", children: jsxRuntime.jsx(IconCustom, { iconName: item.icon, size: 16 }) })), jsxRuntime.jsx("span", { children: t(item.text) })] }, `context-${index}`));
|
|
69413
|
+
}) }) })), (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.')] }))] }));
|
|
69414
|
+
});
|
|
69415
|
+
|
|
69416
|
+
const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoading, formatSetting, querySetting, pagingSetting, searchSetting, columnsAggregate, toolbarSetting, selectedItem, setSelectedItem, handleSelect, saveSettingColumn, resetDefaultColumns, settingColumns, headerComponent, groupSetting, zeroVisiable, isMulti, handleDoubleClick, handleCellClick, contextMenuItems, headerHeight, handleContextMenuClick, }) => {
|
|
69417
|
+
const { t } = reactI18next.useTranslation();
|
|
69418
|
+
const gridRef = React$5.useRef(null);
|
|
69419
|
+
const [openPopupSetupColumn, setOpenPopupSetupColumn] = React$5.useState(false);
|
|
69420
|
+
const [selectedRows, setSelectedRows] = React$5.useState([]);
|
|
69421
|
+
const [orderBy, setOrderBy] = React$5.useState([]);
|
|
69422
|
+
const [filterBy, setFilterBy] = React$5.useState([]);
|
|
69423
|
+
const [searchTerm, setSearchTerm] = React$5.useState('');
|
|
69424
|
+
const [contentColumns, setContentColumns] = React$5.useState([]);
|
|
69425
|
+
const [groupColumns, setGroupColumns] = React$5.useState([]);
|
|
69426
|
+
const [expandsAll, setExpandsAll] = React$5.useState(true);
|
|
69427
|
+
const [maximize, setMaximize] = React$5.useState(false);
|
|
69428
|
+
const [windowHeight, setWindowHeight] = React$5.useState(window.innerHeight);
|
|
69429
|
+
const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ??
|
|
69430
|
+
'id';
|
|
69431
|
+
React$5.useEffect(() => {
|
|
69432
|
+
const handleResize = () => {
|
|
69433
|
+
setWindowHeight(window.innerHeight);
|
|
69434
|
+
};
|
|
69435
|
+
window.addEventListener('resize', handleResize);
|
|
69436
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
69437
|
+
}, []);
|
|
69438
|
+
const heightTable = React$5.useMemo(() => {
|
|
69439
|
+
if (maximize) {
|
|
69440
|
+
return (windowHeight -
|
|
69441
|
+
(pagingSetting?.allowPaging ? 50 : 0) -
|
|
69442
|
+
(haveSum ? 30 : 0) -
|
|
69443
|
+
(headerHeight ?? 59) -
|
|
69444
|
+
(toolbarSetting?.showBottomToolbar ? 42 : 0) -
|
|
69445
|
+
(toolbarSetting?.showTopToolbar ? 42 : 0));
|
|
69446
|
+
}
|
|
69447
|
+
return height;
|
|
69448
|
+
}, [height, maximize, windowHeight]);
|
|
69449
|
+
const optionsGroupColumn = React$5.useMemo(() => {
|
|
69450
|
+
return contentColumns.map((col) => ({
|
|
69451
|
+
...col,
|
|
69452
|
+
headerText: t(col.headerText),
|
|
69453
|
+
}));
|
|
69454
|
+
}, [contentColumns]);
|
|
69455
|
+
React$5.useEffect(() => {
|
|
69456
|
+
if (groupSetting?.groupColumns) {
|
|
69457
|
+
setGroupColumns([...groupSetting.groupColumns]);
|
|
69458
|
+
}
|
|
69459
|
+
setExpandsAll(true);
|
|
69460
|
+
}, [groupSetting?.groupColumns]);
|
|
69461
|
+
const { levels: headerColumns, objHeaderWidthFixLeft, objHeaderWidthFixRight, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight, } = React$5.useMemo(() => {
|
|
69462
|
+
const rs = calculateTableStructure(columns, settingColumns?.value, groupSetting?.groupColumns);
|
|
69463
|
+
setContentColumns(rs.flat);
|
|
69464
|
+
return rs;
|
|
69465
|
+
}, [columns, settingColumns, groupSetting?.groupColumns]);
|
|
69001
69466
|
const handleKeyPress = (e) => {
|
|
69002
69467
|
if (e.code === 'Enter' || e.code === 'NumpadEnter') {
|
|
69003
69468
|
if (searchSetting?.setSearchTerm) {
|
|
@@ -69011,12 +69476,17 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69011
69476
|
}
|
|
69012
69477
|
};
|
|
69013
69478
|
const searchTemplate = () => {
|
|
69014
|
-
return (jsxRuntime.jsx("div", { className: "me-50 r-search", children: jsxRuntime.jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined
|
|
69479
|
+
return (jsxRuntime.jsx("div", { className: "me-50 r-search", children: jsxRuntime.jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined
|
|
69480
|
+
? searchSetting?.searchTerm
|
|
69481
|
+
: searchTerm, setSearchTerm: searchSetting?.setSearchTerm
|
|
69482
|
+
? searchSetting?.setSearchTerm
|
|
69483
|
+
: setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
|
|
69015
69484
|
};
|
|
69016
69485
|
const groupbtnTemplate = () => {
|
|
69017
|
-
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:
|
|
69486
|
+
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: optionsGroupColumn, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[0]
|
|
69018
69487
|
? {
|
|
69019
|
-
headerText: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerText ??
|
|
69488
|
+
headerText: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerText ??
|
|
69489
|
+
contentColumns.find((x) => x.field === groupColumns[0])?.headerText),
|
|
69020
69490
|
}
|
|
69021
69491
|
: undefined, onChange: (val) => {
|
|
69022
69492
|
if (val) {
|
|
@@ -69026,9 +69496,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69026
69496
|
groupColumns.pop();
|
|
69027
69497
|
}
|
|
69028
69498
|
setGroupColumns([...groupColumns]);
|
|
69029
|
-
}, 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:
|
|
69499
|
+
}, 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: optionsGroupColumn, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[1]
|
|
69030
69500
|
? {
|
|
69031
|
-
headerText: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerText ??
|
|
69501
|
+
headerText: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerText ??
|
|
69502
|
+
contentColumns.find((x) => x.field === groupColumns[1])?.headerText),
|
|
69032
69503
|
}
|
|
69033
69504
|
: undefined, onChange: (val) => {
|
|
69034
69505
|
if (val) {
|
|
@@ -69038,9 +69509,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69038
69509
|
groupColumns.pop();
|
|
69039
69510
|
}
|
|
69040
69511
|
setGroupColumns([...groupColumns]);
|
|
69041
|
-
}, 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:
|
|
69512
|
+
}, 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: optionsGroupColumn, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[2]
|
|
69042
69513
|
? {
|
|
69043
|
-
headerText: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerText ??
|
|
69514
|
+
headerText: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerText ??
|
|
69515
|
+
contentColumns.find((x) => x.field === groupColumns[2])?.headerText),
|
|
69044
69516
|
}
|
|
69045
69517
|
: undefined, onChange: (val) => {
|
|
69046
69518
|
if (groupSetting) {
|
|
@@ -69054,7 +69526,7 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69054
69526
|
}
|
|
69055
69527
|
}, 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: () => {
|
|
69056
69528
|
groupSetting?.onGroup({
|
|
69057
|
-
columnGrouped: groupColumns.filter((x) => x)
|
|
69529
|
+
columnGrouped: groupColumns.filter((x) => x),
|
|
69058
69530
|
});
|
|
69059
69531
|
document.getElementById('group-dropdown-toggle')?.click();
|
|
69060
69532
|
}, children: `${t('Apply')}` }), jsxRuntime.jsx(Button$1$1, { color: "secondary", outline: true, className: "mt-1 rounded", size: "sm", onClick: () => {
|
|
@@ -69063,14 +69535,16 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69063
69535
|
}, children: `${t('Delete')}` })] })] })] }));
|
|
69064
69536
|
};
|
|
69065
69537
|
const chooseColumnsTemplate = () => {
|
|
69066
|
-
return jsxRuntime.jsx(SvgSettings, { className: "r-toolbar-icon", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) });
|
|
69538
|
+
return (jsxRuntime.jsx(SvgSettings, { className: "r-toolbar-icon", fontSize: 20, color: "#7F7F7F", onClick: () => setOpenPopupSetupColumn(true) }));
|
|
69067
69539
|
};
|
|
69068
69540
|
const expandTemplate = () => {
|
|
69069
69541
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!expandsAll && (jsxRuntime.jsx(ExpandAllIcon, { onClick: () => {
|
|
69070
69542
|
setExpandsAll(true);
|
|
69071
|
-
}, color: "#7F7F7F", size: 24 })), expandsAll && jsxRuntime.jsx(UnExpandAllIcon, { onClick: () => setExpandsAll(false), color: "#7F7F7F", size: 24 })] }));
|
|
69543
|
+
}, color: "#7F7F7F", size: 24 })), expandsAll && (jsxRuntime.jsx(UnExpandAllIcon, { onClick: () => setExpandsAll(false), color: "#7F7F7F", size: 24 }))] }));
|
|
69072
69544
|
};
|
|
69073
|
-
const defaultToolbarOption = searchSetting?.searchEnable
|
|
69545
|
+
const defaultToolbarOption = searchSetting?.searchEnable
|
|
69546
|
+
? [{ template: searchTemplate, align: 'left' }]
|
|
69547
|
+
: [];
|
|
69074
69548
|
if (groupSetting) {
|
|
69075
69549
|
defaultToolbarOption.push({ template: groupbtnTemplate, align: 'left' });
|
|
69076
69550
|
}
|
|
@@ -69079,7 +69553,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69079
69553
|
}
|
|
69080
69554
|
let toolbarTopOption = [];
|
|
69081
69555
|
if (toolbarSetting?.toolbarOptions) {
|
|
69082
|
-
toolbarTopOption = [
|
|
69556
|
+
toolbarTopOption = [
|
|
69557
|
+
...defaultToolbarOption,
|
|
69558
|
+
...toolbarSetting?.toolbarOptions,
|
|
69559
|
+
];
|
|
69083
69560
|
}
|
|
69084
69561
|
else {
|
|
69085
69562
|
toolbarTopOption = [...defaultToolbarOption];
|
|
@@ -69110,7 +69587,9 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69110
69587
|
React$5.useEffect(() => {
|
|
69111
69588
|
if (setSelectedItem) {
|
|
69112
69589
|
if (isMulti) {
|
|
69113
|
-
if (dataSource &&
|
|
69590
|
+
if (dataSource &&
|
|
69591
|
+
selectedRows &&
|
|
69592
|
+
selectedRows?.length !== selectedItem?.length) {
|
|
69114
69593
|
setSelectedItem([...selectedRows]);
|
|
69115
69594
|
if (handleSelect) {
|
|
69116
69595
|
handleSelect([...selectedRows]);
|
|
@@ -69119,7 +69598,8 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69119
69598
|
}
|
|
69120
69599
|
else {
|
|
69121
69600
|
if (dataSource && selectedRows?.length > 0) {
|
|
69122
|
-
if (!selectedItem ||
|
|
69601
|
+
if (!selectedItem ||
|
|
69602
|
+
selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
|
|
69123
69603
|
setSelectedItem({ ...selectedRows[0] });
|
|
69124
69604
|
if (handleSelect) {
|
|
69125
69605
|
handleSelect({ ...selectedRows[0] });
|
|
@@ -69138,7 +69618,8 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69138
69618
|
React$5.useEffect(() => {
|
|
69139
69619
|
if (!isMulti) {
|
|
69140
69620
|
if (dataSource && selectedItem && selectedItem[fieldKey]) {
|
|
69141
|
-
if (selectedRows?.length === 0 ||
|
|
69621
|
+
if (selectedRows?.length === 0 ||
|
|
69622
|
+
selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
|
|
69142
69623
|
setSelectedRows([selectedItem]);
|
|
69143
69624
|
}
|
|
69144
69625
|
}
|
|
@@ -69147,142 +69628,19 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69147
69628
|
}
|
|
69148
69629
|
}
|
|
69149
69630
|
else {
|
|
69150
|
-
if (dataSource &&
|
|
69631
|
+
if (dataSource &&
|
|
69632
|
+
selectedItem &&
|
|
69633
|
+
selectedRows?.length !== selectedItem.length) {
|
|
69151
69634
|
setSelectedRows(selectedItem ? [...selectedItem] : []);
|
|
69152
69635
|
}
|
|
69153
69636
|
}
|
|
69154
69637
|
}, [selectedItem]);
|
|
69155
|
-
|
|
69156
|
-
|
|
69157
|
-
|
|
69158
|
-
|
|
69159
|
-
|
|
69160
|
-
|
|
69161
|
-
row.expand = expandsAll;
|
|
69162
|
-
}
|
|
69163
|
-
}, [expandsAll]);
|
|
69164
|
-
if (row.children?.length) {
|
|
69165
|
-
const col = contentColumns.find((x) => x.field === row.field);
|
|
69166
|
-
let value = row[col.field];
|
|
69167
|
-
if (col.type === 'numeric') {
|
|
69168
|
-
value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
|
|
69169
|
-
}
|
|
69170
|
-
else if (col.type === 'date') {
|
|
69171
|
-
value = value ? formatDateTime(value, formatSetting?.dateFormat) : '';
|
|
69172
|
-
}
|
|
69173
|
-
else if (col.type === 'datetime') {
|
|
69174
|
-
value = value ? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
|
|
69175
|
-
}
|
|
69176
|
-
if (col.template) {
|
|
69177
|
-
value = col.template(row, indexRow) ?? '';
|
|
69178
|
-
}
|
|
69179
|
-
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: 3, children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", children: [jsxRuntime.jsx(SvgChevronRight, { style: {
|
|
69180
|
-
marginLeft: level * 20,
|
|
69181
|
-
transform: expand ? 'rotate(90deg)' : 'rotate(0deg)'
|
|
69182
|
-
}, fontSize: 15, onClick: () => {
|
|
69183
|
-
setExpand(!expand);
|
|
69184
|
-
setExpandsAll(undefined);
|
|
69185
|
-
row.expand = !expand;
|
|
69186
|
-
} }), t(col.headerDisplay ?? col.headerText), ": ", value, " (", row.children.length, ")"] }) }), contentColumns.map((colSum, indexCol) => {
|
|
69187
|
-
if (indexCol <= firstColSpan || colSum.visible === false || colSum.isGroup === true) {
|
|
69188
|
-
return;
|
|
69189
|
-
}
|
|
69190
|
-
let sumValue = row[colSum.field];
|
|
69191
|
-
const haveSum = row[colSum.field] !== undefined && row[colSum.field] !== null;
|
|
69192
|
-
if (!haveSum && colSum.haveSum === true && colSum.type === 'numeric') {
|
|
69193
|
-
sumValue = row.children.reduce(function (accumulator, currentValue) {
|
|
69194
|
-
return Number(accumulator ?? 0) + Number(currentValue[colSum.field] ?? 0);
|
|
69195
|
-
}, 0);
|
|
69196
|
-
}
|
|
69197
|
-
if (colSum.type === 'numeric') {
|
|
69198
|
-
sumValue = formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', colSum.numericSettings?.fraction, true, false);
|
|
69199
|
-
if (!zeroVisiable && (sumValue === '0' || sumValue === 0)) {
|
|
69200
|
-
sumValue = '';
|
|
69201
|
-
}
|
|
69202
|
-
}
|
|
69203
|
-
return (jsxRuntime.jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsxRuntime.jsx("div", { className: "r-rowcell-div", style: {
|
|
69204
|
-
justifyContent: colSum.textAlign ? colSum.textAlign : 'left'
|
|
69205
|
-
}, children: (haveSum || colSum.haveSum === true) && Number(row[colSum.field] ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
|
|
69206
|
-
color: formatSetting?.colorNegative ?? 'red'
|
|
69207
|
-
}, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
|
|
69208
|
-
})] }), expand && jsxRuntime.jsx(RenderContent, { datas: row.children, level: level + 1 })] }, `row-${level}-${indexRow}`));
|
|
69209
|
-
}
|
|
69210
|
-
else {
|
|
69211
|
-
const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
|
|
69212
|
-
return (jsxRuntime.jsx("tr", { id: `row-content-${indexRow}`, "aria-rowindex": indexRow + 1, role: "row", className: classNames$1('r-row', {
|
|
69213
|
-
'r-last-row': level === 0 && indexRow === viewData.length - 1
|
|
69214
|
-
}), onContextMenu: (e) => {
|
|
69215
|
-
e.preventDefault();
|
|
69216
|
-
handleContextMenu(e, row);
|
|
69217
|
-
}, children: contentColumns.map((column, indexCol) => (jsxRuntime.jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: fieldKey, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMulti, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row, zeroVisiable: zeroVisiable, handleCloseContext: handleCloseContext, handleDoubleClick: handleDoubleClick }, indexCol))) }, `row-content-${indexRow}`));
|
|
69218
|
-
}
|
|
69219
|
-
}) }));
|
|
69220
|
-
};
|
|
69221
|
-
const handleContextMenu = (e, row) => {
|
|
69222
|
-
e.preventDefault();
|
|
69223
|
-
setContext(null);
|
|
69224
|
-
setTimeout(() => {
|
|
69225
|
-
setContext({
|
|
69226
|
-
x: e.clientX,
|
|
69227
|
-
y: e.clientY,
|
|
69228
|
-
row,
|
|
69229
|
-
show: true
|
|
69230
|
-
});
|
|
69231
|
-
}, 100);
|
|
69232
|
-
};
|
|
69233
|
-
const handleCloseContext = () => setContext((prev) => (prev ? { ...prev, show: false } : null));
|
|
69234
|
-
React$5.useEffect(() => {
|
|
69235
|
-
if (virtualDivRef.current && context) {
|
|
69236
|
-
// đặt vị trí div ảo tại con trỏ chuột
|
|
69237
|
-
virtualDivRef.current.style.position = 'fixed';
|
|
69238
|
-
virtualDivRef.current.style.top = `${context.y}px`;
|
|
69239
|
-
virtualDivRef.current.style.left = `${context.x}px`;
|
|
69240
|
-
virtualDivRef.current.style.width = '0px';
|
|
69241
|
-
virtualDivRef.current.style.height = '0px';
|
|
69242
|
-
}
|
|
69243
|
-
}, [context]);
|
|
69244
|
-
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: {
|
|
69245
|
-
height: `${height ? `${height}px` : 'auto'}`,
|
|
69246
|
-
position: 'relative'
|
|
69247
|
-
}, children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: contentColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
|
|
69248
|
-
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: true, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: gridRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: querySetting?.optionsFilter, allowFiltering: querySetting?.allowFiltering, allowSorting: querySetting?.allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
|
|
69249
|
-
setFilterBy([...val]);
|
|
69250
|
-
if (querySetting?.changeFilter) {
|
|
69251
|
-
querySetting.changeFilter(val);
|
|
69252
|
-
}
|
|
69253
|
-
}, changeOrder: (val) => {
|
|
69254
|
-
setOrderBy([...val]);
|
|
69255
|
-
if (querySetting?.changeOrder) {
|
|
69256
|
-
querySetting.changeOrder(val);
|
|
69257
|
-
}
|
|
69258
|
-
}, columns: contentColumns, setContentColumns: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: dataSource?.length ?? 0 }, `header-${indexParent}-${index}`))) }, `header-${-indexParent}`));
|
|
69259
|
-
}) }), 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 || haveSum) && (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
|
|
69260
|
-
if (col.visible === false || col.isGroup === true) {
|
|
69261
|
-
return;
|
|
69262
|
-
}
|
|
69263
|
-
const item = columnsAggregate?.find((x) => x.field === col.field);
|
|
69264
|
-
let sumValue = item?.value;
|
|
69265
|
-
if (!item && col.haveSum === true && col.type === 'numeric') {
|
|
69266
|
-
sumValue = viewData.reduce(function (accumulator, currentValue) {
|
|
69267
|
-
return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
|
|
69268
|
-
}, 0);
|
|
69269
|
-
}
|
|
69270
|
-
if (col.type === 'numeric') {
|
|
69271
|
-
sumValue = formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false);
|
|
69272
|
-
}
|
|
69273
|
-
return (jsxRuntime.jsx("td", { className: classNames$1(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
|
|
69274
|
-
left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
|
|
69275
|
-
right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
|
|
69276
|
-
textAlign: col.textAlign ? col.textAlign : 'left'
|
|
69277
|
-
}, children: jsxRuntime.jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) && Number(item?.value ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
|
|
69278
|
-
color: formatSetting?.colorNegative ?? 'red'
|
|
69279
|
-
}, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `summarycell-${indexCol}`));
|
|
69280
|
-
}) })) })] }), jsxRuntime.jsx("div", { ref: virtualDivRef }), context && (contextMenuItems?.length ?? 0) > 0 && handleContextMenuClick && (jsxRuntime.jsx(Popover$1, { className: "r-context-popover", placement: "right-start", isOpen: context.show, target: virtualDivRef.current, toggle: handleCloseContext, fade: false, children: jsxRuntime.jsx(PopoverBody$1, { children: contextMenuItems?.map((item, index) => {
|
|
69281
|
-
return (jsxRuntime.jsxs("div", { className: "r-context-item", onClick: () => {
|
|
69282
|
-
handleCloseContext();
|
|
69283
|
-
handleContextMenuClick?.(item, context.row);
|
|
69284
|
-
}, children: [item.icon && (jsxRuntime.jsx("div", { className: "me-75", children: jsxRuntime.jsx(IconCustom, { iconName: item.icon, size: 16 }) })), jsxRuntime.jsx("span", { children: t(item.text) })] }, `context-${index}`));
|
|
69285
|
-
}) }) })), (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: () => {
|
|
69638
|
+
return (jsxRuntime.jsxs("div", { className: classNames$1('r-table-edit r-virtualized-table', {
|
|
69639
|
+
'is-maximized': maximize,
|
|
69640
|
+
}), children: [jsxRuntime.jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && (jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption, maximize: maximize, setMaximize: setMaximize })), headerComponent && headerComponent(), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", style: {
|
|
69641
|
+
height: `${heightTable ? `${heightTable}px` : 'auto'}`,
|
|
69642
|
+
position: 'relative',
|
|
69643
|
+
}, children: [jsxRuntime.jsx(TableElement, { idTable: idTable, gridRef: gridRef, isLoading: isLoading, dataSource: dataSource, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, fieldKey: fieldKey, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, selectedRows: selectedRows, isMulti: isMulti, filterBy: filterBy, orderBy: orderBy, formatSetting: formatSetting, contentColumns: contentColumns, headerColumns: headerColumns, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, searchTerm: searchTerm, searchSetting: searchSetting, columnsAggregate: columnsAggregate, haveSum: haveSum, expandsAll: expandsAll, zeroVisiable: zeroVisiable, contextMenuItems: contextMenuItems, handleContextMenuClick: handleContextMenuClick, setFilterBy: setFilterBy, setSelectedRows: setSelectedRows, setOrderBy: setOrderBy, handleDoubleClick: handleDoubleClick, handleCellClick: handleCellClick, querySetting: querySetting, setContentColumns: setContentColumns, setExpandsAll: setExpandsAll }), 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: () => {
|
|
69286
69644
|
setOpenPopupSetupColumn(!openPopupSetupColumn);
|
|
69287
69645
|
}, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
|
|
69288
69646
|
if (saveSettingColumn) {
|
|
@@ -69292,7 +69650,7 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
|
|
|
69292
69650
|
visible: x.visible,
|
|
69293
69651
|
fixedType: x.fixedType,
|
|
69294
69652
|
width: x.width,
|
|
69295
|
-
sortOrder: index + 1
|
|
69653
|
+
sortOrder: index + 1,
|
|
69296
69654
|
})));
|
|
69297
69655
|
}
|
|
69298
69656
|
} })] }));
|