react-table-edit 1.5.6 → 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 +38 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -36
- 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) => {
|