react-table-edit 1.5.5 → 1.5.7
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/calendar/index.d.ts +8 -0
- package/dist/index.js +40 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -38
- package/dist/index.mjs.map +1 -1
- package/dist/styles/date-picker.css.map +1 -1
- package/dist/styles/form-wizard.css.map +1 -1
- package/dist/styles/index.css +178 -56
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/select-table.css.map +1 -1
- package/dist/styles/sidebar.css +14 -0
- package/dist/styles/sidebar.css.map +1 -1
- package/dist/styles/tab-menu.css.map +1 -1
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -23953,7 +23953,9 @@ const EditForm = forwardRef((props, ref) => {
|
|
|
23953
23953
|
const [itemsField, setItemsField] = useState([]);
|
|
23954
23954
|
const { t } = useTranslation();
|
|
23955
23955
|
useOnClickOutside(editFormRef, () => {
|
|
23956
|
-
|
|
23956
|
+
if (dropdownOpen !== false) {
|
|
23957
|
+
closeMenu();
|
|
23958
|
+
}
|
|
23957
23959
|
});
|
|
23958
23960
|
const closeMenu = () => {
|
|
23959
23961
|
setTimeout(() => {
|
|
@@ -24117,43 +24119,43 @@ const EditForm = forwardRef((props, ref) => {
|
|
|
24117
24119
|
});
|
|
24118
24120
|
}
|
|
24119
24121
|
}, [inputRef]);
|
|
24120
|
-
return (jsx("div", { className: "form-edit", ref: ref, id: id, children:
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
}
|
|
24144
|
-
else {
|
|
24145
|
-
setValue(e.name, '');
|
|
24146
|
-
}
|
|
24147
|
-
});
|
|
24148
|
-
}, onKeyDown: (e) => {
|
|
24149
|
-
if (e.code === 'Tab') {
|
|
24150
|
-
closeMenu();
|
|
24122
|
+
return (jsx("div", { className: "form-edit", ref: ref, id: id, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsx(DropdownToggle$1, { tag: 'div', children: jsxs("div", { className: classNames$1('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsx(Input$1, { style: {
|
|
24123
|
+
outline: 'none',
|
|
24124
|
+
border: 'none',
|
|
24125
|
+
width: template ? 0 : '100%',
|
|
24126
|
+
height: template ? 0 : 28,
|
|
24127
|
+
lineHeight: template ? 0 : 19,
|
|
24128
|
+
padding: template ? 0 : 'auto',
|
|
24129
|
+
backgroundColor: '$white',
|
|
24130
|
+
textAlign: textAlign ?? 'left'
|
|
24131
|
+
}, placeholder: placeholder, innerRef: inputRef, onKeyDown: (e) => handleOnKeyDown(e), onPaste: (e) => onPaste && onPaste(e), readOnly: true })] }) }), jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', container: component, style: {
|
|
24132
|
+
position: 'fixed',
|
|
24133
|
+
minWidth: minWidth ? minWidth : defaultWidth,
|
|
24134
|
+
width: menuWidth ? menuWidth : 'min-content',
|
|
24135
|
+
maxWidth: innerWidth > 1280 ? 1280 : innerWidth,
|
|
24136
|
+
borderRadius: 8,
|
|
24137
|
+
zIndex: 9999
|
|
24138
|
+
}, children: jsxs(DropdownItem$1, { className: 'p-0', style: { borderRadius: '6px' }, tag: 'div', header: true, children: [jsx("div", { onKeyDown: (e) => formKeyDown(e, handleSubmit(handleOnSubmit)), className: 'p-1', ref: editFormRef, style: {
|
|
24139
|
+
maxHeight: menuHeight ? menuHeight : 300,
|
|
24140
|
+
overflow: "auto"
|
|
24141
|
+
}, children: itemsField ? renderForm(itemsField) : '' }), jsxs("div", { className: "d-flex justify-content-between p-50", style: { boxShadow: "0 4px 24px 0 rgb(34 41 47 / 10%)" }, children: [jsx("div", { className: "text-primary py-25", style: { fontSize: 12 }, children: footerTemplate ? footerTemplate(rowData) : '' }), !onChangeField ? jsxs("div", { className: "d-flex justify-content-end", children: [isClearable && jsx(Button$1, { className: 'btn me-50 py-25 px-50', outline: true, onClick: () => {
|
|
24142
|
+
itemsField.forEach((e) => {
|
|
24143
|
+
if (e.type === 'numeric') {
|
|
24144
|
+
setValue(e.name, 0);
|
|
24151
24145
|
}
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
closeMenu();
|
|
24146
|
+
else {
|
|
24147
|
+
setValue(e.name, '');
|
|
24155
24148
|
}
|
|
24156
|
-
}
|
|
24149
|
+
});
|
|
24150
|
+
}, onKeyDown: (e) => {
|
|
24151
|
+
if (e.code === 'Tab') {
|
|
24152
|
+
closeMenu();
|
|
24153
|
+
}
|
|
24154
|
+
}, children: t('Clear') }), jsx(Button$1, { color: 'primary', className: 'btn btn-primary py-25 px-50', onClick: handleSubmit(handleOnSubmit), onKeyDown: (e) => {
|
|
24155
|
+
if (e.code === 'Tab') {
|
|
24156
|
+
closeMenu();
|
|
24157
|
+
}
|
|
24158
|
+
}, children: t('Save') })] }) : jsx(Fragment$1, {})] })] }) })] }) }));
|
|
24157
24159
|
});
|
|
24158
24160
|
|
|
24159
24161
|
const SelectTableBox = (props) => {
|
|
@@ -43799,7 +43801,7 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
|
|
|
43799
43801
|
const isSelected = selectedRows?.some((x) => x[fieldKey] === row.data[fieldKey]);
|
|
43800
43802
|
return (jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1("r-row"), children: contentColumns.map((col, indexCol) => jsx(CellComponent, { col: col, row: row.data, idTable: idTable, gridRef: gridRef, indexRow: indexRow, indexCol: indexCol, isSelected: isSelected, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, selectedCell: selectedCell, startCell: startCell, editCell: editCell, editDisable: editDisable, addDisable: addDisable, fieldKey: fieldKey, defaultValue: defaultValue, dataSource: dataSource, formatSetting: formatSetting, selectEnable: selectEnable, isMulti: isMulti, selectedRows: selectedRows, containerRef: containerRef, totalCount: totalCount, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, fieldUniKey: fieldUniKey, handleDataChange: handleDataChange, changeDataSource: changeDataSource, setSelectedRows: setSelectedRows, handleCommandClick: handleCommandClick, handleDuplicate: handleDuplicate, handleKeyDown: handleKeyDown, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, handeCopyCell: handeCopyCell, isCopying: isCopying, typeDragging: typeDragging, contentColumns: contentColumns, rowChange: rowChange, visibleContentColumns: visibleContentColumns })) }, row.data[fieldKey] ?? indexRow));
|
|
43801
43803
|
}), jsx("tr", { style: { height: totalHeight - (endIndex * rowHeight) } })] }), jsx("tfoot", { className: "r-gridfoot", children: haveSum && jsx("tr", { className: "r-row", children: contentColumns.map((col, index) => {
|
|
43802
|
-
return (jsx(FooterCol, { col: col, dataSource:
|
|
43804
|
+
return (jsx(FooterCol, { col: col, dataSource: dataSource, indexCol: index, objWidthFix: { ...objWidthFixLeft, ...objWidthFixRight }, formatSetting: formatSetting }));
|
|
43803
43805
|
}) }) })] }) }));
|
|
43804
43806
|
};
|
|
43805
43807
|
|
|
@@ -44947,7 +44949,7 @@ const TableEdit = forwardRef((props, ref) => {
|
|
|
44947
44949
|
setOpenPopupSetupColumn(!openPopupSetupColumn);
|
|
44948
44950
|
}, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
|
|
44949
44951
|
if (saveSettingColumn) {
|
|
44950
|
-
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.
|
|
44952
|
+
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
|
|
44951
44953
|
}
|
|
44952
44954
|
} })] }) }));
|
|
44953
44955
|
});
|