react-table-edit 1.5.35 → 1.5.36
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/table-view/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ type TableViewProps = {
|
|
|
41
41
|
contextMenuItems?: IContextItem[];
|
|
42
42
|
handleContextMenuClick?: (context: IContextItem, data: any) => void;
|
|
43
43
|
isMulti?: boolean;
|
|
44
|
+
haveSum?: boolean;
|
|
44
45
|
handleSelect?: (data: any) => void;
|
|
45
46
|
};
|
|
46
47
|
declare const TableView: React.FC<TableViewProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -743,6 +743,7 @@ type TableViewProps = {
|
|
|
743
743
|
contextMenuItems?: IContextItem[];
|
|
744
744
|
handleContextMenuClick?: (context: IContextItem, data: any) => void;
|
|
745
745
|
isMulti?: boolean;
|
|
746
|
+
haveSum?: boolean;
|
|
746
747
|
handleSelect?: (data: any) => void;
|
|
747
748
|
};
|
|
748
749
|
declare const TableView: React__default.FC<TableViewProps>;
|
package/dist/index.js
CHANGED
|
@@ -68744,7 +68744,17 @@ const RenderContentCol = (props) => {
|
|
|
68744
68744
|
return element && element.scrollWidth > element.clientWidth;
|
|
68745
68745
|
};
|
|
68746
68746
|
const RenderElement = () => {
|
|
68747
|
-
if (col.
|
|
68747
|
+
if (col.field === '#' || col.type === '#') {
|
|
68748
|
+
return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', { 'r-active-cell': isSelected }), style: {
|
|
68749
|
+
fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType ? 600 : 400,
|
|
68750
|
+
fontStyle: row.haveItalicType ? 'italic' : 'normal'
|
|
68751
|
+
}, onDoubleClick: (e) => {
|
|
68752
|
+
e.preventDefault();
|
|
68753
|
+
handleCloseContext();
|
|
68754
|
+
handleDoubleClick?.(row, col);
|
|
68755
|
+
}, children: indexRow + 1 }));
|
|
68756
|
+
}
|
|
68757
|
+
else if (col.type === 'checkbox' || col.field === 'checkbox') {
|
|
68748
68758
|
return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer', { 'r-active-cell': isSelected }), style: { display: 'flex', justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start', alignItems: 'center' }, onClick: (e) => {
|
|
68749
68759
|
const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
|
|
68750
68760
|
if (index > -1) {
|
|
@@ -68807,7 +68817,10 @@ const RenderContentCol = (props) => {
|
|
|
68807
68817
|
textOverflow: 'ellipsis',
|
|
68808
68818
|
whiteSpace: 'pre',
|
|
68809
68819
|
maxWidth: '100%'
|
|
68810
|
-
}, children: displayText }) }), checkOverflow() && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: cellId, placement: "top", children: jsxRuntime.jsx("div", { style: { color: textColor },
|
|
68820
|
+
}, children: displayText }) }), checkOverflow() && (jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: cellId, placement: "top", children: jsxRuntime.jsx("div", { style: { color: textColor }, onClick: (e) => {
|
|
68821
|
+
e.stopPropagation();
|
|
68822
|
+
e.preventDefault();
|
|
68823
|
+
}, children: displayText }) }))] }));
|
|
68811
68824
|
}
|
|
68812
68825
|
};
|
|
68813
68826
|
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 }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': isSelected }), style: {
|
|
@@ -68838,7 +68851,7 @@ const RenderContentCol = (props) => {
|
|
|
68838
68851
|
}, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
|
|
68839
68852
|
};
|
|
68840
68853
|
|
|
68841
|
-
const TableView = ({ idTable, dataSource, height = 400, columns, isLoading, formatSetting, querySetting, pagingSetting, searchSetting, columnsAggregate, toolbarSetting, selectedItem, setSelectedItem, handleSelect, saveSettingColumn, resetDefaultColumns, settingColumns, headerComponent, groupSetting, zeroVisiable, isMulti, handleDoubleClick, contextMenuItems, handleContextMenuClick }) => {
|
|
68854
|
+
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, contextMenuItems, handleContextMenuClick }) => {
|
|
68842
68855
|
const { t } = reactI18next.useTranslation();
|
|
68843
68856
|
const gridRef = React$5.useRef(null);
|
|
68844
68857
|
const [openPopupSetupColumn, setOpenPopupSetupColumn] = React$5.useState(false);
|
|
@@ -69187,7 +69200,7 @@ const TableView = ({ idTable, dataSource, height = 400, columns, isLoading, form
|
|
|
69187
69200
|
querySetting.changeOrder(val);
|
|
69188
69201
|
}
|
|
69189
69202
|
}, columns: contentColumns, setContentColumns: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: dataSource?.length ?? 0 }, `header-${indexParent}-${index}`))) }, `header-${-indexParent}`));
|
|
69190
|
-
}) }), jsxRuntime.jsx("tbody", { className: "r-gridcontent", role: "rowgroup", children: jsxRuntime.jsx(RenderContent, { datas: viewData }) }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: (columnsAggregate?.length ?? 0) > 0 && (jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, indexCol) => {
|
|
69203
|
+
}) }), 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) => {
|
|
69191
69204
|
if (col.visible === false || col.isGroup === true) {
|
|
69192
69205
|
return;
|
|
69193
69206
|
}
|