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.js
CHANGED
|
@@ -6,8 +6,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React$5 = require('react');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
8
|
var ReactDOM = require('react-dom');
|
|
9
|
-
var client = require('react-dom/client');
|
|
10
9
|
var toast = require('react-hot-toast');
|
|
10
|
+
var client = require('react-dom/client');
|
|
11
11
|
var reactRouterDom = require('react-router-dom');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -17769,39 +17769,6 @@ const renderLabel = (props) => {
|
|
|
17769
17769
|
return (jsxRuntime.jsx(React$5.Fragment, { children: isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : '', " "] }) }));
|
|
17770
17770
|
};
|
|
17771
17771
|
|
|
17772
|
-
const TextInput = (props) => {
|
|
17773
|
-
const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
|
|
17774
|
-
const renderInput = () => {
|
|
17775
|
-
return (jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsxRuntime.jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
|
|
17776
|
-
if (min || max) {
|
|
17777
|
-
if (min && Number(val.target.value) >= min) {
|
|
17778
|
-
onChange(val.target.value);
|
|
17779
|
-
if (callback) {
|
|
17780
|
-
callback(val);
|
|
17781
|
-
}
|
|
17782
|
-
}
|
|
17783
|
-
if (max && Number(val.target.value) <= max) {
|
|
17784
|
-
onChange(val.target.value);
|
|
17785
|
-
if (callback) {
|
|
17786
|
-
callback(val);
|
|
17787
|
-
}
|
|
17788
|
-
}
|
|
17789
|
-
}
|
|
17790
|
-
else {
|
|
17791
|
-
onChange(val.target.value);
|
|
17792
|
-
if (callback) {
|
|
17793
|
-
callback(val);
|
|
17794
|
-
}
|
|
17795
|
-
}
|
|
17796
|
-
}, 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 && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
|
|
17797
|
-
};
|
|
17798
|
-
return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$2(' align', {
|
|
17799
|
-
[labelSize ? labelSize : '']: labelSize,
|
|
17800
|
-
[classes ? classes : '']: classes,
|
|
17801
|
-
'form-row-inline-error': errors
|
|
17802
|
-
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17803
|
-
};
|
|
17804
|
-
|
|
17805
17772
|
const NumberInput = (props) => {
|
|
17806
17773
|
const { id, control, fractionCurrency, name, min, max, label, labelSize, required, errors, disabled, isLabel, fixedDecimalScale, placeholder, inLine, callback, decimalSeparator = ',', thousandSeparator = '.', classes, width, allowNegative } = props;
|
|
17807
17774
|
const renderInput = () => {
|
|
@@ -17847,6 +17814,39 @@ const NumberInput = (props) => {
|
|
|
17847
17814
|
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { style: { width: width ? width : undefined }, className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17848
17815
|
};
|
|
17849
17816
|
|
|
17817
|
+
const TextInput = (props) => {
|
|
17818
|
+
const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
|
|
17819
|
+
const renderInput = () => {
|
|
17820
|
+
return (jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsxRuntime.jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
|
|
17821
|
+
if (min || max) {
|
|
17822
|
+
if (min && Number(val.target.value) >= min) {
|
|
17823
|
+
onChange(val.target.value);
|
|
17824
|
+
if (callback) {
|
|
17825
|
+
callback(val);
|
|
17826
|
+
}
|
|
17827
|
+
}
|
|
17828
|
+
if (max && Number(val.target.value) <= max) {
|
|
17829
|
+
onChange(val.target.value);
|
|
17830
|
+
if (callback) {
|
|
17831
|
+
callback(val);
|
|
17832
|
+
}
|
|
17833
|
+
}
|
|
17834
|
+
}
|
|
17835
|
+
else {
|
|
17836
|
+
onChange(val.target.value);
|
|
17837
|
+
if (callback) {
|
|
17838
|
+
callback(val);
|
|
17839
|
+
}
|
|
17840
|
+
}
|
|
17841
|
+
}, 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 && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
|
|
17842
|
+
};
|
|
17843
|
+
return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$2(' align', {
|
|
17844
|
+
[labelSize ? labelSize : '']: labelSize,
|
|
17845
|
+
[classes ? classes : '']: classes,
|
|
17846
|
+
'form-row-inline-error': errors
|
|
17847
|
+
}, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
|
|
17848
|
+
};
|
|
17849
|
+
|
|
17850
17850
|
const defaultMaxHeight$1 = 250;
|
|
17851
17851
|
const SelectTable = React$5.forwardRef((props, ref) => {
|
|
17852
17852
|
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;
|
|
@@ -18464,7 +18464,7 @@ const EditForm = React$5.forwardRef((props, ref) => {
|
|
|
18464
18464
|
height: template ? 0 : 28,
|
|
18465
18465
|
lineHeight: template ? 0 : 19,
|
|
18466
18466
|
padding: template ? 0 : 'auto',
|
|
18467
|
-
backgroundColor: '
|
|
18467
|
+
backgroundColor: '$white',
|
|
18468
18468
|
textAlign: textAlign ?? 'left'
|
|
18469
18469
|
}, 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', style: {
|
|
18470
18470
|
minWidth: minWidth ? minWidth : defaultWidth,
|
|
@@ -39753,7 +39753,7 @@ const messageHtmlBoxConfirm = (t, message, handle, data, title = 'Important', bt
|
|
|
39753
39753
|
MySwal.fire({
|
|
39754
39754
|
title: t(title),
|
|
39755
39755
|
html: message.map((item, index) => {
|
|
39756
|
-
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid
|
|
39756
|
+
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
|
|
39757
39757
|
}).join(''),
|
|
39758
39758
|
allowOutsideClick: false,
|
|
39759
39759
|
showCancelButton: true,
|
|
@@ -39774,7 +39774,7 @@ const messageHtmlBoxError = (t, message, title = 'Important', btnCancel = 'Ok')
|
|
|
39774
39774
|
MySwal.fire({
|
|
39775
39775
|
title: t(title),
|
|
39776
39776
|
html: message.map((item, index) => {
|
|
39777
|
-
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid
|
|
39777
|
+
return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
|
|
39778
39778
|
}).join(''),
|
|
39779
39779
|
allowOutsideClick: false,
|
|
39780
39780
|
showCancelButton: true,
|
|
@@ -40336,7 +40336,7 @@ const Sidebar = (props) => {
|
|
|
40336
40336
|
position: 'fixed',
|
|
40337
40337
|
top: '50%',
|
|
40338
40338
|
transform: 'translate(-50%, -50%)',
|
|
40339
|
-
background: '
|
|
40339
|
+
background: '$white',
|
|
40340
40340
|
filter: 'drop-shadow(0.9px 0.9px 1.5px)',
|
|
40341
40341
|
height: 50,
|
|
40342
40342
|
display: 'flex',
|
|
@@ -42650,7 +42650,7 @@ const CommandElement = (props) => {
|
|
|
42650
42650
|
return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
|
|
42651
42651
|
return (jsxRuntime.jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classNames$2('command-item', {
|
|
42652
42652
|
'btn-icon': item.tooltip === ''
|
|
42653
|
-
}), color: item.color ? item.color : '
|
|
42653
|
+
}), color: item.color ? item.color : '$black', onClick: (e) => {
|
|
42654
42654
|
handleCommandClick(item.id, rowData, indexRow);
|
|
42655
42655
|
if (indexRow === indexFocus) {
|
|
42656
42656
|
if (setIndexFocus) {
|
|
@@ -43789,7 +43789,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
|
|
|
43789
43789
|
};
|
|
43790
43790
|
return (jsxRuntime.jsxs(React$5.Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxRuntime.jsxs("div", { className: classNames$2('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsxRuntime.jsx("div", { onClick: () => handleScroll(-200), className: classNames$2('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronLeft, {}) }), jsxRuntime.jsx("div", { ref: tabComponentRef, className: "tab-component", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: jsxRuntime.jsx("div", { ref: contentComponentRef, children: dataMenu.map((item) => {
|
|
43791
43791
|
if (item?.resAttributes?.IS_MENU === '1') {
|
|
43792
|
-
return (jsxRuntime.jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '
|
|
43792
|
+
return (jsxRuntime.jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '$border-color' : '' }, children: [jsxRuntime.jsx(DropdownToggle$1, { color: "$black00", style: { border: 'none', boxShadow: 'none', margin: 0, padding: 0 }, className: "background-none", children: jsxRuntime.jsx("div", { children: item.name }) }), jsxRuntime.jsx(DropdownMenu$1, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => jsxRuntime.jsx(DropdownItem$1, { style: { borderRadius: '5px', margin: "0 0.5rem", width: "95%" }, onClick: () => {
|
|
43793
43793
|
if (x.resAttributes.MODAL_VALUE) {
|
|
43794
43794
|
handleModal(x.resAttributes.MODAL_VALUE);
|
|
43795
43795
|
}
|
|
@@ -44681,8 +44681,8 @@ const InputStyleComponent = (props) => {
|
|
|
44681
44681
|
fontWeight: value.bold ? "bold" : 'normal',
|
|
44682
44682
|
fontStyle: value.italic ? "italic" : 'normal',
|
|
44683
44683
|
textDecoration: value.underline ? "underline" : 'normal',
|
|
44684
|
-
backgroundColor: value.backgroundColor ?? '
|
|
44685
|
-
color: value.color ?? '
|
|
44684
|
+
backgroundColor: value.backgroundColor ?? '$white',
|
|
44685
|
+
color: value.color ?? '$black'
|
|
44686
44686
|
}, children: props.label }));
|
|
44687
44687
|
} }), jsxRuntime.jsx("div", { className: classNames$2('ms-25', { 'd-none': disabledFontSize }), style: { width: 60 }, children: jsxRuntime.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) => {
|
|
44688
44688
|
onChange({ ...value, fontSize: val.value });
|
|
@@ -44698,9 +44698,9 @@ const InputStyleComponent = (props) => {
|
|
|
44698
44698
|
if (!disabled) {
|
|
44699
44699
|
onChange({ ...value, underline: !value.underline });
|
|
44700
44700
|
}
|
|
44701
|
-
}, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsxRuntime.jsx(SvgType, { stroke: value.color ?? '
|
|
44701
|
+
}, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsxRuntime.jsx(SvgType, { stroke: value.color ?? '$black', fontSize: 18 }), jsxRuntime.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) => {
|
|
44702
44702
|
onChange({ ...value, color: e.target.value });
|
|
44703
|
-
} })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsxRuntime.jsx(SvgDroplet, { fill: value.backgroundColor ?? '
|
|
44703
|
+
} })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsxRuntime.jsx(SvgDroplet, { fill: value.backgroundColor ?? '$white', fontSize: 18 }), jsxRuntime.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) => {
|
|
44704
44704
|
onChange({ ...value, backgroundColor: e.target.value });
|
|
44705
44705
|
} })] })] }) }));
|
|
44706
44706
|
};
|
|
@@ -46170,8 +46170,8 @@ const CheckboxInput = (props) => {
|
|
|
46170
46170
|
|
|
46171
46171
|
const defaultStyleExportSetting = {
|
|
46172
46172
|
title: {
|
|
46173
|
-
color: '
|
|
46174
|
-
backgroundColor: '
|
|
46173
|
+
color: '$black',
|
|
46174
|
+
backgroundColor: '$white',
|
|
46175
46175
|
fontFamily: 'Times New Roman',
|
|
46176
46176
|
fontSize: 18,
|
|
46177
46177
|
row: 2,
|
|
@@ -46180,8 +46180,8 @@ const defaultStyleExportSetting = {
|
|
|
46180
46180
|
underline: false
|
|
46181
46181
|
},
|
|
46182
46182
|
subtitle: {
|
|
46183
|
-
color: '
|
|
46184
|
-
backgroundColor: '
|
|
46183
|
+
color: '$black',
|
|
46184
|
+
backgroundColor: '$white',
|
|
46185
46185
|
fontFamily: 'Times New Roman',
|
|
46186
46186
|
fontSize: 12,
|
|
46187
46187
|
row: 3,
|
|
@@ -46190,7 +46190,7 @@ const defaultStyleExportSetting = {
|
|
|
46190
46190
|
underline: false
|
|
46191
46191
|
},
|
|
46192
46192
|
header: {
|
|
46193
|
-
color: "
|
|
46193
|
+
color: "$black",
|
|
46194
46194
|
backgroundColor: "#ffe0cc",
|
|
46195
46195
|
fontFamily: 'Times New Roman',
|
|
46196
46196
|
fontSize: 14,
|
|
@@ -46200,7 +46200,7 @@ const defaultStyleExportSetting = {
|
|
|
46200
46200
|
underline: false
|
|
46201
46201
|
},
|
|
46202
46202
|
group1: {
|
|
46203
|
-
color: "
|
|
46203
|
+
color: "$black",
|
|
46204
46204
|
backgroundColor: "#bfbfbf",
|
|
46205
46205
|
fontFamily: 'Times New Roman',
|
|
46206
46206
|
fontSize: 12,
|
|
@@ -46209,7 +46209,7 @@ const defaultStyleExportSetting = {
|
|
|
46209
46209
|
underline: false
|
|
46210
46210
|
},
|
|
46211
46211
|
group2: {
|
|
46212
|
-
color: "
|
|
46212
|
+
color: "$black",
|
|
46213
46213
|
backgroundColor: "#d9d9d9",
|
|
46214
46214
|
fontFamily: 'Times New Roman',
|
|
46215
46215
|
fontSize: 12,
|
|
@@ -46218,7 +46218,7 @@ const defaultStyleExportSetting = {
|
|
|
46218
46218
|
underline: false
|
|
46219
46219
|
},
|
|
46220
46220
|
group3: {
|
|
46221
|
-
color: "
|
|
46221
|
+
color: "$black",
|
|
46222
46222
|
backgroundColor: "#f2f2f2",
|
|
46223
46223
|
fontFamily: 'Times New Roman',
|
|
46224
46224
|
fontSize: 12,
|
|
@@ -46227,8 +46227,8 @@ const defaultStyleExportSetting = {
|
|
|
46227
46227
|
underline: false
|
|
46228
46228
|
},
|
|
46229
46229
|
content: {
|
|
46230
|
-
color: "
|
|
46231
|
-
backgroundColor: '
|
|
46230
|
+
color: "$black",
|
|
46231
|
+
backgroundColor: '$white',
|
|
46232
46232
|
fontFamily: 'Times New Roman',
|
|
46233
46233
|
fontSize: 11,
|
|
46234
46234
|
bold: false,
|
|
@@ -46236,7 +46236,7 @@ const defaultStyleExportSetting = {
|
|
|
46236
46236
|
underline: false
|
|
46237
46237
|
},
|
|
46238
46238
|
summary: {
|
|
46239
|
-
color: "
|
|
46239
|
+
color: "$black",
|
|
46240
46240
|
backgroundColor: '#ffe0cc',
|
|
46241
46241
|
fontFamily: 'Times New Roman',
|
|
46242
46242
|
fontSize: 12,
|