react-table-edit 1.4.34 → 1.4.35
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/index.js +55 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -55
- package/dist/index.mjs.map +1 -1
- package/dist/styles/date-picker.css +806 -0
- package/dist/styles/date-picker.css.map +1 -0
- package/dist/styles/form-wizard.css +165 -0
- package/dist/styles/form-wizard.css.map +1 -0
- package/dist/styles/index.css +1851 -0
- package/dist/styles/index.css.map +1 -0
- package/dist/styles/select-table.css +230 -0
- package/dist/styles/select-table.css.map +1 -0
- package/dist/styles/sidebar.css +118 -0
- package/dist/styles/sidebar.css.map +1 -0
- package/dist/styles/tab-menu.css +49 -0
- package/dist/styles/tab-menu.css.map +1 -0
- package/dist/styles/variables.css +3 -0
- package/dist/styles/variables.css.map +1 -0
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import React__default, { useRef, useState, useEffect, useMemo, useLayoutEffect,
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import * as ReactDOM from 'react-dom';
|
|
6
6
|
import ReactDOM__default from 'react-dom';
|
|
7
|
-
import { createRoot } from 'react-dom/client';
|
|
8
7
|
import toast from 'react-hot-toast';
|
|
8
|
+
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { useNavigate, Link } from 'react-router-dom';
|
|
10
10
|
|
|
11
11
|
/******************************************************************************
|
|
@@ -17741,39 +17741,6 @@ const renderLabel = (props) => {
|
|
|
17741
17741
|
return (jsx(Fragment, { children: isLabel === false ? '' : jsxs(Label$1, { for: name, children: [t(label ? label : ''), " ", required ? jsx("span", { className: "text-danger", children: "*" }) : '', " "] }) }));
|
|
17742
17742
|
};
|
|
17743
17743
|
|
|
17744
|
-
const TextInput = (props) => {
|
|
17745
|
-
const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
|
|
17746
|
-
const renderInput = () => {
|
|
17747
|
-
return (jsxs(Fragment, { children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
|
|
17748
|
-
if (min || max) {
|
|
17749
|
-
if (min && Number(val.target.value) >= min) {
|
|
17750
|
-
onChange(val.target.value);
|
|
17751
|
-
if (callback) {
|
|
17752
|
-
callback(val);
|
|
17753
|
-
}
|
|
17754
|
-
}
|
|
17755
|
-
if (max && Number(val.target.value) <= max) {
|
|
17756
|
-
onChange(val.target.value);
|
|
17757
|
-
if (callback) {
|
|
17758
|
-
callback(val);
|
|
17759
|
-
}
|
|
17760
|
-
}
|
|
17761
|
-
}
|
|
17762
|
-
else {
|
|
17763
|
-
onChange(val.target.value);
|
|
17764
|
-
if (callback) {
|
|
17765
|
-
callback(val);
|
|
17766
|
-
}
|
|
17767
|
-
}
|
|
17768
|
-
}, style: { height: `${height}px` }, autoFocus: autoFocus, disabled: disabled, placeholder: placeholder, type: type ? type : 'text', invalid: errors && true, className: "h-100", rows: row, min: min, max: max, readOnly: readOnly, ...rest })) }), errors && jsx(FormFeedback$1, { children: errors?.message })] }));
|
|
17769
|
-
};
|
|
17770
|
-
return (jsx(Fragment, { children: jsxs("div", { className: classNames$2(' align', {
|
|
17771
|
-
[labelSize ? labelSize : '']: labelSize,
|
|
17772
|
-
[classes ? classes : '']: classes,
|
|
17773
|
-
'form-row-inline-error': errors
|
|
17774
|
-
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17775
|
-
};
|
|
17776
|
-
|
|
17777
17744
|
const NumberInput = (props) => {
|
|
17778
17745
|
const { id, control, fractionCurrency, name, min, max, label, labelSize, required, errors, disabled, isLabel, fixedDecimalScale, placeholder, inLine, callback, decimalSeparator = ',', thousandSeparator = '.', classes, width, allowNegative } = props;
|
|
17779
17746
|
const renderInput = () => {
|
|
@@ -17819,6 +17786,39 @@ const NumberInput = (props) => {
|
|
|
17819
17786
|
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { style: { width: width ? width : undefined }, className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17820
17787
|
};
|
|
17821
17788
|
|
|
17789
|
+
const TextInput = (props) => {
|
|
17790
|
+
const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
|
|
17791
|
+
const renderInput = () => {
|
|
17792
|
+
return (jsxs(Fragment, { children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
|
|
17793
|
+
if (min || max) {
|
|
17794
|
+
if (min && Number(val.target.value) >= min) {
|
|
17795
|
+
onChange(val.target.value);
|
|
17796
|
+
if (callback) {
|
|
17797
|
+
callback(val);
|
|
17798
|
+
}
|
|
17799
|
+
}
|
|
17800
|
+
if (max && Number(val.target.value) <= max) {
|
|
17801
|
+
onChange(val.target.value);
|
|
17802
|
+
if (callback) {
|
|
17803
|
+
callback(val);
|
|
17804
|
+
}
|
|
17805
|
+
}
|
|
17806
|
+
}
|
|
17807
|
+
else {
|
|
17808
|
+
onChange(val.target.value);
|
|
17809
|
+
if (callback) {
|
|
17810
|
+
callback(val);
|
|
17811
|
+
}
|
|
17812
|
+
}
|
|
17813
|
+
}, style: { height: `${height}px` }, autoFocus: autoFocus, disabled: disabled, placeholder: placeholder, type: type ? type : 'text', invalid: errors && true, className: "h-100", rows: row, min: min, max: max, readOnly: readOnly, ...rest })) }), errors && jsx(FormFeedback$1, { children: errors?.message })] }));
|
|
17814
|
+
};
|
|
17815
|
+
return (jsx(Fragment, { children: jsxs("div", { className: classNames$2(' align', {
|
|
17816
|
+
[labelSize ? labelSize : '']: labelSize,
|
|
17817
|
+
[classes ? classes : '']: classes,
|
|
17818
|
+
'form-row-inline-error': errors
|
|
17819
|
+
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17820
|
+
};
|
|
17821
|
+
|
|
17822
17822
|
const defaultMaxHeight$1 = 250;
|
|
17823
17823
|
const SelectTable = forwardRef((props, ref) => {
|
|
17824
17824
|
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 } = props;
|
|
@@ -18436,7 +18436,7 @@ const EditForm = forwardRef((props, ref) => {
|
|
|
18436
18436
|
height: template ? 0 : 28,
|
|
18437
18437
|
lineHeight: template ? 0 : 19,
|
|
18438
18438
|
padding: template ? 0 : 'auto',
|
|
18439
|
-
backgroundColor: '
|
|
18439
|
+
backgroundColor: '$white',
|
|
18440
18440
|
textAlign: textAlign ?? 'left'
|
|
18441
18441
|
}, 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', style: {
|
|
18442
18442
|
minWidth: minWidth ? minWidth : defaultWidth,
|
|
@@ -39725,7 +39725,7 @@ const messageHtmlBoxConfirm = (t, message, handle, data, title = 'Important', bt
|
|
|
39725
39725
|
MySwal.fire({
|
|
39726
39726
|
title: t(title),
|
|
39727
39727
|
html: message.map((item, index) => {
|
|
39728
|
-
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid
|
|
39728
|
+
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
|
|
39729
39729
|
}).join(''),
|
|
39730
39730
|
allowOutsideClick: false,
|
|
39731
39731
|
showCancelButton: true,
|
|
@@ -39746,7 +39746,7 @@ const messageHtmlBoxError = (t, message, title = 'Important', btnCancel = 'Ok')
|
|
|
39746
39746
|
MySwal.fire({
|
|
39747
39747
|
title: t(title),
|
|
39748
39748
|
html: message.map((item, index) => {
|
|
39749
|
-
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid
|
|
39749
|
+
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
|
|
39750
39750
|
}).join(''),
|
|
39751
39751
|
allowOutsideClick: false,
|
|
39752
39752
|
showCancelButton: true,
|
|
@@ -40308,7 +40308,7 @@ const Sidebar = (props) => {
|
|
|
40308
40308
|
position: 'fixed',
|
|
40309
40309
|
top: '50%',
|
|
40310
40310
|
transform: 'translate(-50%, -50%)',
|
|
40311
|
-
background: '
|
|
40311
|
+
background: '$white',
|
|
40312
40312
|
filter: 'drop-shadow(0.9px 0.9px 1.5px)',
|
|
40313
40313
|
height: 50,
|
|
40314
40314
|
display: 'flex',
|
|
@@ -42622,7 +42622,7 @@ const CommandElement = (props) => {
|
|
|
42622
42622
|
return (jsx(Fragment, { children: jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
|
|
42623
42623
|
return (jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classNames$2('command-item', {
|
|
42624
42624
|
'btn-icon': item.tooltip === ''
|
|
42625
|
-
}), color: item.color ? item.color : '
|
|
42625
|
+
}), color: item.color ? item.color : '$black', onClick: (e) => {
|
|
42626
42626
|
handleCommandClick(item.id, rowData, indexRow);
|
|
42627
42627
|
if (indexRow === indexFocus) {
|
|
42628
42628
|
if (setIndexFocus) {
|
|
@@ -43761,7 +43761,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
|
|
|
43761
43761
|
};
|
|
43762
43762
|
return (jsxs(Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxs("div", { className: classNames$2('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsx("div", { onClick: () => handleScroll(-200), className: classNames$2('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronLeft, {}) }), jsx("div", { ref: tabComponentRef, className: "tab-component", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: jsx("div", { ref: contentComponentRef, children: dataMenu.map((item) => {
|
|
43763
43763
|
if (item?.resAttributes?.IS_MENU === '1') {
|
|
43764
|
-
return (jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '
|
|
43764
|
+
return (jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '$border-color' : '' }, children: [jsx(DropdownToggle$1, { color: "$black00", style: { border: 'none', boxShadow: 'none', margin: 0, padding: 0 }, className: "background-none", children: jsx("div", { children: item.name }) }), jsx(DropdownMenu$1, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => jsx(DropdownItem$1, { style: { borderRadius: '5px', margin: "0 0.5rem", width: "95%" }, onClick: () => {
|
|
43765
43765
|
if (x.resAttributes.MODAL_VALUE) {
|
|
43766
43766
|
handleModal(x.resAttributes.MODAL_VALUE);
|
|
43767
43767
|
}
|
|
@@ -44653,8 +44653,8 @@ const InputStyleComponent = (props) => {
|
|
|
44653
44653
|
fontWeight: value.bold ? "bold" : 'normal',
|
|
44654
44654
|
fontStyle: value.italic ? "italic" : 'normal',
|
|
44655
44655
|
textDecoration: value.underline ? "underline" : 'normal',
|
|
44656
|
-
backgroundColor: value.backgroundColor ?? '
|
|
44657
|
-
color: value.color ?? '
|
|
44656
|
+
backgroundColor: value.backgroundColor ?? '$white',
|
|
44657
|
+
color: value.color ?? '$black'
|
|
44658
44658
|
}, children: props.label }));
|
|
44659
44659
|
} }), jsx("div", { className: classNames$2('ms-25', { 'd-none': disabledFontSize }), style: { width: 60 }, children: jsx(SelectTable, { options: Array.from({ length: 100 }, (_, i) => ({ value: i + 1, label: i + 1 })), noHeader: true, isDisabled: disabled, value: value.fontSize ? { value: value.fontSize, label: value.fontSize } : null, onChange: (val) => {
|
|
44660
44660
|
onChange({ ...value, fontSize: val.value });
|
|
@@ -44670,9 +44670,9 @@ const InputStyleComponent = (props) => {
|
|
|
44670
44670
|
if (!disabled) {
|
|
44671
44671
|
onChange({ ...value, underline: !value.underline });
|
|
44672
44672
|
}
|
|
44673
|
-
}, children: jsx(SvgUnderline, { fontSize: 18 }) }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsx(SvgType, { stroke: value.color ?? '
|
|
44673
|
+
}, children: jsx(SvgUnderline, { fontSize: 18 }) }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsx(SvgType, { stroke: value.color ?? '$black', fontSize: 18 }), jsx("input", { type: "color", id: "color", disabled: disabled, value: value.color, style: { color: '$white', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, onChange: (e) => {
|
|
44674
44674
|
onChange({ ...value, color: e.target.value });
|
|
44675
|
-
} })] }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsx(SvgDroplet, { fill: value.backgroundColor ?? '
|
|
44675
|
+
} })] }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsx(SvgDroplet, { fill: value.backgroundColor ?? '$white', fontSize: 18 }), jsx(Input$1, { id: "backgroundColor", type: "color", disabled: disabled, style: { color: '$white', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, value: value.backgroundColor, onChange: (e) => {
|
|
44676
44676
|
onChange({ ...value, backgroundColor: e.target.value });
|
|
44677
44677
|
} })] })] }) }));
|
|
44678
44678
|
};
|
|
@@ -46142,8 +46142,8 @@ const CheckboxInput = (props) => {
|
|
|
46142
46142
|
|
|
46143
46143
|
const defaultStyleExportSetting = {
|
|
46144
46144
|
title: {
|
|
46145
|
-
color: '
|
|
46146
|
-
backgroundColor: '
|
|
46145
|
+
color: '$black',
|
|
46146
|
+
backgroundColor: '$white',
|
|
46147
46147
|
fontFamily: 'Times New Roman',
|
|
46148
46148
|
fontSize: 18,
|
|
46149
46149
|
row: 2,
|
|
@@ -46152,8 +46152,8 @@ const defaultStyleExportSetting = {
|
|
|
46152
46152
|
underline: false
|
|
46153
46153
|
},
|
|
46154
46154
|
subtitle: {
|
|
46155
|
-
color: '
|
|
46156
|
-
backgroundColor: '
|
|
46155
|
+
color: '$black',
|
|
46156
|
+
backgroundColor: '$white',
|
|
46157
46157
|
fontFamily: 'Times New Roman',
|
|
46158
46158
|
fontSize: 12,
|
|
46159
46159
|
row: 3,
|
|
@@ -46162,7 +46162,7 @@ const defaultStyleExportSetting = {
|
|
|
46162
46162
|
underline: false
|
|
46163
46163
|
},
|
|
46164
46164
|
header: {
|
|
46165
|
-
color: "
|
|
46165
|
+
color: "$black",
|
|
46166
46166
|
backgroundColor: "#ffe0cc",
|
|
46167
46167
|
fontFamily: 'Times New Roman',
|
|
46168
46168
|
fontSize: 14,
|
|
@@ -46172,7 +46172,7 @@ const defaultStyleExportSetting = {
|
|
|
46172
46172
|
underline: false
|
|
46173
46173
|
},
|
|
46174
46174
|
group1: {
|
|
46175
|
-
color: "
|
|
46175
|
+
color: "$black",
|
|
46176
46176
|
backgroundColor: "#bfbfbf",
|
|
46177
46177
|
fontFamily: 'Times New Roman',
|
|
46178
46178
|
fontSize: 12,
|
|
@@ -46181,7 +46181,7 @@ const defaultStyleExportSetting = {
|
|
|
46181
46181
|
underline: false
|
|
46182
46182
|
},
|
|
46183
46183
|
group2: {
|
|
46184
|
-
color: "
|
|
46184
|
+
color: "$black",
|
|
46185
46185
|
backgroundColor: "#d9d9d9",
|
|
46186
46186
|
fontFamily: 'Times New Roman',
|
|
46187
46187
|
fontSize: 12,
|
|
@@ -46190,7 +46190,7 @@ const defaultStyleExportSetting = {
|
|
|
46190
46190
|
underline: false
|
|
46191
46191
|
},
|
|
46192
46192
|
group3: {
|
|
46193
|
-
color: "
|
|
46193
|
+
color: "$black",
|
|
46194
46194
|
backgroundColor: "#f2f2f2",
|
|
46195
46195
|
fontFamily: 'Times New Roman',
|
|
46196
46196
|
fontSize: 12,
|
|
@@ -46199,8 +46199,8 @@ const defaultStyleExportSetting = {
|
|
|
46199
46199
|
underline: false
|
|
46200
46200
|
},
|
|
46201
46201
|
content: {
|
|
46202
|
-
color: "
|
|
46203
|
-
backgroundColor: '
|
|
46202
|
+
color: "$black",
|
|
46203
|
+
backgroundColor: '$white',
|
|
46204
46204
|
fontFamily: 'Times New Roman',
|
|
46205
46205
|
fontSize: 11,
|
|
46206
46206
|
bold: false,
|
|
@@ -46208,7 +46208,7 @@ const defaultStyleExportSetting = {
|
|
|
46208
46208
|
underline: false
|
|
46209
46209
|
},
|
|
46210
46210
|
summary: {
|
|
46211
|
-
color: "
|
|
46211
|
+
color: "$black",
|
|
46212
46212
|
backgroundColor: '#ffe0cc',
|
|
46213
46213
|
fontFamily: 'Times New Roman',
|
|
46214
46214
|
fontSize: 12,
|