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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DayButton, DayPicker } from "react-day-picker";
|
|
3
|
+
import { Button } from "reactstrap";
|
|
4
|
+
declare function CalendarComponent({ className, classNames, showOutsideDays, captionLayout, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { CalendarComponent, CalendarDayButton };
|
package/dist/index.js
CHANGED
|
@@ -23982,7 +23982,9 @@ const EditForm = React$5.forwardRef((props, ref) => {
|
|
|
23982
23982
|
const [itemsField, setItemsField] = React$5.useState([]);
|
|
23983
23983
|
const { t } = reactI18next.useTranslation();
|
|
23984
23984
|
useOnClickOutside(editFormRef, () => {
|
|
23985
|
-
|
|
23985
|
+
if (dropdownOpen !== false) {
|
|
23986
|
+
closeMenu();
|
|
23987
|
+
}
|
|
23986
23988
|
});
|
|
23987
23989
|
const closeMenu = () => {
|
|
23988
23990
|
setTimeout(() => {
|
|
@@ -24146,43 +24148,43 @@ const EditForm = React$5.forwardRef((props, ref) => {
|
|
|
24146
24148
|
});
|
|
24147
24149
|
}
|
|
24148
24150
|
}, [inputRef]);
|
|
24149
|
-
return (jsxRuntime.jsx("div", { className: "form-edit", ref: ref, id: id, children: jsxRuntime.
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
}
|
|
24173
|
-
else {
|
|
24174
|
-
setValue(e.name, '');
|
|
24175
|
-
}
|
|
24176
|
-
});
|
|
24177
|
-
}, onKeyDown: (e) => {
|
|
24178
|
-
if (e.code === 'Tab') {
|
|
24179
|
-
closeMenu();
|
|
24151
|
+
return (jsxRuntime.jsx("div", { className: "form-edit", ref: ref, id: id, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', children: jsxRuntime.jsxs("div", { className: classNames$1('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsxRuntime.jsx(Input$1, { style: {
|
|
24152
|
+
outline: 'none',
|
|
24153
|
+
border: 'none',
|
|
24154
|
+
width: template ? 0 : '100%',
|
|
24155
|
+
height: template ? 0 : 28,
|
|
24156
|
+
lineHeight: template ? 0 : 19,
|
|
24157
|
+
padding: template ? 0 : 'auto',
|
|
24158
|
+
backgroundColor: '$white',
|
|
24159
|
+
textAlign: textAlign ?? 'left'
|
|
24160
|
+
}, placeholder: placeholder, innerRef: inputRef, onKeyDown: (e) => handleOnKeyDown(e), onPaste: (e) => onPaste && onPaste(e), readOnly: true })] }) }), jsxRuntime.jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', container: component, style: {
|
|
24161
|
+
position: 'fixed',
|
|
24162
|
+
minWidth: minWidth ? minWidth : defaultWidth,
|
|
24163
|
+
width: menuWidth ? menuWidth : 'min-content',
|
|
24164
|
+
maxWidth: innerWidth > 1280 ? 1280 : innerWidth,
|
|
24165
|
+
borderRadius: 8,
|
|
24166
|
+
zIndex: 9999
|
|
24167
|
+
}, children: jsxRuntime.jsxs(DropdownItem$1, { className: 'p-0', style: { borderRadius: '6px' }, tag: 'div', header: true, children: [jsxRuntime.jsx("div", { onKeyDown: (e) => formKeyDown(e, handleSubmit(handleOnSubmit)), className: 'p-1', ref: editFormRef, style: {
|
|
24168
|
+
maxHeight: menuHeight ? menuHeight : 300,
|
|
24169
|
+
overflow: "auto"
|
|
24170
|
+
}, children: itemsField ? renderForm(itemsField) : '' }), jsxRuntime.jsxs("div", { className: "d-flex justify-content-between p-50", style: { boxShadow: "0 4px 24px 0 rgb(34 41 47 / 10%)" }, children: [jsxRuntime.jsx("div", { className: "text-primary py-25", style: { fontSize: 12 }, children: footerTemplate ? footerTemplate(rowData) : '' }), !onChangeField ? jsxRuntime.jsxs("div", { className: "d-flex justify-content-end", children: [isClearable && jsxRuntime.jsx(Button$1, { className: 'btn me-50 py-25 px-50', outline: true, onClick: () => {
|
|
24171
|
+
itemsField.forEach((e) => {
|
|
24172
|
+
if (e.type === 'numeric') {
|
|
24173
|
+
setValue(e.name, 0);
|
|
24180
24174
|
}
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
closeMenu();
|
|
24175
|
+
else {
|
|
24176
|
+
setValue(e.name, '');
|
|
24184
24177
|
}
|
|
24185
|
-
}
|
|
24178
|
+
});
|
|
24179
|
+
}, onKeyDown: (e) => {
|
|
24180
|
+
if (e.code === 'Tab') {
|
|
24181
|
+
closeMenu();
|
|
24182
|
+
}
|
|
24183
|
+
}, children: t('Clear') }), jsxRuntime.jsx(Button$1, { color: 'primary', className: 'btn btn-primary py-25 px-50', onClick: handleSubmit(handleOnSubmit), onKeyDown: (e) => {
|
|
24184
|
+
if (e.code === 'Tab') {
|
|
24185
|
+
closeMenu();
|
|
24186
|
+
}
|
|
24187
|
+
}, children: t('Save') })] }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] })] }) })] }) }));
|
|
24186
24188
|
});
|
|
24187
24189
|
|
|
24188
24190
|
const SelectTableBox = (props) => {
|
|
@@ -43828,7 +43830,7 @@ const TableComponent = ({ idTable, dataSource, contentColumns, headerColumns, vi
|
|
|
43828
43830
|
const isSelected = selectedRows?.some((x) => x[fieldKey] === row.data[fieldKey]);
|
|
43829
43831
|
return (jsxRuntime.jsx("tr", { "aria-rowindex": indexRow + 1, role: "row", style: { height: rowHeight }, className: classNames$1("r-row"), children: contentColumns.map((col, indexCol) => jsxRuntime.jsx(CellComponent, { col: col, row: row.data, idTable: idTable, gridRef: gridRef, indexRow: indexRow, indexCol: indexCol, isSelected: isSelected, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, selectedCell: selectedCell, startCell: startCell, editCell: editCell, editDisable: editDisable, addDisable: addDisable, fieldKey: fieldKey, defaultValue: defaultValue, dataSource: dataSource, formatSetting: formatSetting, selectEnable: selectEnable, isMulti: isMulti, selectedRows: selectedRows, containerRef: containerRef, totalCount: totalCount, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, fieldUniKey: fieldUniKey, handleDataChange: handleDataChange, changeDataSource: changeDataSource, setSelectedRows: setSelectedRows, handleCommandClick: handleCommandClick, handleDuplicate: handleDuplicate, handleKeyDown: handleKeyDown, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, handeCopyCell: handeCopyCell, isCopying: isCopying, typeDragging: typeDragging, contentColumns: contentColumns, rowChange: rowChange, visibleContentColumns: visibleContentColumns })) }, row.data[fieldKey] ?? indexRow));
|
|
43830
43832
|
}), jsxRuntime.jsx("tr", { style: { height: totalHeight - (endIndex * rowHeight) } })] }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: haveSum && jsxRuntime.jsx("tr", { className: "r-row", children: contentColumns.map((col, index) => {
|
|
43831
|
-
return (jsxRuntime.jsx(FooterCol, { col: col, dataSource:
|
|
43833
|
+
return (jsxRuntime.jsx(FooterCol, { col: col, dataSource: dataSource, indexCol: index, objWidthFix: { ...objWidthFixLeft, ...objWidthFixRight }, formatSetting: formatSetting }));
|
|
43832
43834
|
}) }) })] }) }));
|
|
43833
43835
|
};
|
|
43834
43836
|
|
|
@@ -44976,7 +44978,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
|
|
|
44976
44978
|
setOpenPopupSetupColumn(!openPopupSetupColumn);
|
|
44977
44979
|
}, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
|
|
44978
44980
|
if (saveSettingColumn) {
|
|
44979
|
-
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.
|
|
44981
|
+
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
|
|
44980
44982
|
}
|
|
44981
44983
|
} })] }) }));
|
|
44982
44984
|
});
|