tp-react-elements 1.1.9 → 1.1.11
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/_virtual/index.esm12.js +2 -2
- package/dist/_virtual/index.esm13.js +2 -2
- package/dist/_virtual/index.esm14.js +2 -2
- package/dist/_virtual/index.esm4.js +2 -2
- package/dist/_virtual/index.esm5.js +2 -2
- package/dist/_virtual/index.esm6.js +2 -2
- package/dist/_virtual/index.esm7.js +2 -2
- package/dist/components/Form/FormRender.esm.js +8 -8
- package/dist/components/FormComponents/Select/MultiSelectv1.esm.js +14 -9
- package/dist/components/FormComponents/index.esm.js +27 -13
- package/dist/components/SelectField/MultiSelectFieldComponent.esm.js +12 -8
- package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateRange/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateRangePicker/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +1 -1
- package/package.json +4 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateInput = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateInput as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Month = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Month as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var InputRangeField = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { InputRangeField as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateRangePicker = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateRangePicker as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DefinedRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DefinedRange as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Calendar = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Calendar as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateRange as __exports };
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import require$$0__default, { lazy, Suspense } from 'react';
|
|
3
|
+
import FormCheckBox from '../FormComponents/FormCheckBox/FormCheckBox.esm.js';
|
|
4
|
+
import FormCheckBoxGroup from '../FormComponents/FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
5
|
+
import FormNumberField from '../FormComponents/FormNumberField/FormNumberField.esm.js';
|
|
6
|
+
import FormNumberFieldDecimal from '../FormComponents/FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
7
|
+
import FormRadioGroup from '../FormComponents/FormRadioGroup/FormRadioGroup.esm.js';
|
|
8
|
+
import FormTextAreaField from '../FormComponents/FormTextAreaField/FormTextAreaField.esm.js';
|
|
9
|
+
import FormTextField from '../FormComponents/FormTextField/FormTextField.esm.js';
|
|
10
|
+
import PasswordField from '../FormComponents/PasswordField/PasswordField.esm.js';
|
|
3
11
|
import SingleSelect from '../FormComponents/Select/SingleSelect.esm.js';
|
|
4
12
|
import MultiSelectAutocomplete from '../FormComponents/Select/MultiSelectAutocomplete.esm.js';
|
|
5
13
|
import SingleSelectNonAutoComplete from '../FormComponents/Select/SingleSelectNonAutoComplete.esm.js';
|
|
@@ -8,14 +16,6 @@ import FormTextFieldWithSelect from '../FormComponents/FormTextFieldWithSelect/F
|
|
|
8
16
|
import DateRangePickerComponent from '../DateRangePicker/DateRangePicker.esm.js';
|
|
9
17
|
import RichTextEditorWrapper from '../FormComponents/RichTextEditor/RichTextEditorWrapper.esm.js';
|
|
10
18
|
import SingleSelectSearchApi from '../FormComponents/Select/SingleSelectSearchApi.esm.js';
|
|
11
|
-
import FormTextAreaField from '../FormComponents/FormTextAreaField/FormTextAreaField.esm.js';
|
|
12
|
-
import FormCheckBox from '../FormComponents/FormCheckBox/FormCheckBox.esm.js';
|
|
13
|
-
import FormRadioGroup from '../FormComponents/FormRadioGroup/FormRadioGroup.esm.js';
|
|
14
|
-
import FormCheckBoxGroup from '../FormComponents/FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
15
|
-
import FormNumberFieldDecimal from '../FormComponents/FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
16
|
-
import FormNumberField from '../FormComponents/FormNumberField/FormNumberField.esm.js';
|
|
17
|
-
import PasswordField from '../FormComponents/PasswordField/PasswordField.esm.js';
|
|
18
|
-
import FormTextField from '../FormComponents/FormTextField/FormTextField.esm.js';
|
|
19
19
|
|
|
20
20
|
// Lazy-loaded heavy components
|
|
21
21
|
// const RichTextEditorWrapper = lazy(() =>
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Box, TextField, FormControlLabel, Checkbox, Tooltip } from '@mui/material';
|
|
3
3
|
import FormControl from '@mui/material/FormControl';
|
|
4
4
|
import InputLabel from '@mui/material/InputLabel';
|
|
5
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
5
6
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
7
|
import OutlinedInput from '@mui/material/OutlinedInput';
|
|
7
8
|
import Select from '@mui/material/Select';
|
|
@@ -74,7 +75,7 @@ function MultiSelectV1({ props, variant, }) {
|
|
|
74
75
|
disableAutoFocusItem: true,
|
|
75
76
|
}, children: [jsx(Box, { sx: { width: '100%', position: 'sticky', top: 0, padding: '7px', zIndex: 2, background: '#fff' }, children: jsx(TextField, { inputRef: textfieldRef, fullWidth: true, size: "small", placeholder: "Search...", value: searchText, onChange: (e) => setSearchText(e.target.value),
|
|
76
77
|
// Prevent space key from closing the select while typing in search
|
|
77
|
-
onKeyDown: (e) => e.key !== 'Escape' && e.stopPropagation() }) }), jsx(MenuItem, { disabled: filterOptions.length === 0, sx: { py: 0, px: 2 }, children: jsx(FormControlLabel, { control: jsx(Checkbox, { id: `${props.item.name}-select-all`, size: "small", checked: selectAll, sx: { p: 1 }, onChange: () => {
|
|
78
|
+
onKeyDown: (e) => e.key !== 'Escape' && e.stopPropagation() }) }), jsx(MenuItem, { disabled: filterOptions.length === 0, sx: { py: 0, px: 2 }, children: jsx(FormControlLabel, { control: jsx(Checkbox, { id: `${props.item.name}-select-all`, size: "small", checked: selectAll, sx: { p: 1 }, onMouseDown: (e) => e.stopPropagation(), onChange: (e) => {
|
|
78
79
|
const currentValues = fieldValue?.split(',').filter(Boolean) || [];
|
|
79
80
|
const filteredIds = filterOptions.map((opt) => String(opt.value));
|
|
80
81
|
if (selectAll) {
|
|
@@ -86,22 +87,26 @@ function MultiSelectV1({ props, variant, }) {
|
|
|
86
87
|
} }), label: "Select All", sx: {
|
|
87
88
|
width: '100%',
|
|
88
89
|
margin: 0,
|
|
90
|
+
// Remove pointerEvents: 'none' to allow label to trigger checkbox
|
|
89
91
|
'& .MuiFormControlLabel-label': { fontSize: '13px' }
|
|
90
92
|
} }) }), filterOptions.length !== 0 ? (filterOptions.map((option) => {
|
|
91
93
|
const selectedArray = fieldValue ? extractValuesToArray(fieldValue) : [];
|
|
92
94
|
const isChecked = selectedArray.includes(String(option.value));
|
|
93
|
-
return (
|
|
95
|
+
return (jsxs(MenuItem, { value: `${option.value}`, sx: {
|
|
94
96
|
whiteSpace: 'normal',
|
|
95
97
|
wordBreak: 'break-all',
|
|
96
|
-
alignItems: '
|
|
97
|
-
py: 0,
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
py: 0.5,
|
|
98
100
|
px: 2,
|
|
99
101
|
minHeight: ITEM_HEIGHT,
|
|
100
|
-
}, children: jsx(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
}, children: [jsx(Checkbox, { checked: isChecked, size: "small", sx: { p: 1, mr: 1, pointerEvents: 'none' } }), jsx(ListItemText, { primary: option.label, primaryTypographyProps: {
|
|
103
|
+
fontSize: '13px',
|
|
104
|
+
sx: {
|
|
105
|
+
whiteSpace: 'normal',
|
|
106
|
+
wordBreak: 'break-all',
|
|
107
|
+
lineHeight: '1.2'
|
|
108
|
+
}
|
|
109
|
+
} })] }, option.value));
|
|
105
110
|
})) : (jsx(MenuItem, { disabled: true, children: "No data Found" }))] }), jsx(FormBottomField, { ...props })] }) }, props.item.name));
|
|
106
111
|
}
|
|
107
112
|
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
+
export { default as FormNumberField } from './FormNumberField/FormNumberField.esm.js';
|
|
2
|
+
export { default as FormNumberFieldDecimal } from './FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
3
|
+
export { default as FormTextAreaField } from './FormTextAreaField/FormTextAreaField.esm.js';
|
|
4
|
+
export { default as FormTextField } from './FormTextField/FormTextField.esm.js';
|
|
5
|
+
export { default as PasswordField } from './PasswordField/PasswordField.esm.js';
|
|
6
|
+
export { default as FormCheckBox } from './FormCheckBox/FormCheckBox.esm.js';
|
|
1
7
|
export { default as SingleSelect } from './Select/SingleSelect.esm.js';
|
|
2
8
|
export { default as SingleSelectNonAutoComplete } from './Select/SingleSelectNonAutoComplete.esm.js';
|
|
3
9
|
export { default as SingleSelectSearchApi } from './Select/SingleSelectSearchApi.esm.js';
|
|
4
10
|
export { default as MultiSelectV1 } from './Select/MultiSelectv1.esm.js';
|
|
5
11
|
export { default as MultiSelectTable } from './Select/MultiSelectTable.esm.js';
|
|
6
|
-
export { default as DatepickerWrapperV2 } from './DatePicker/DatepickerWrapperV2.esm.js';
|
|
7
|
-
export { default as FormBottomField } from './FormBottomField/FormBottomField.esm.js';
|
|
8
|
-
export { default as FormCheckBox } from './FormCheckBox/FormCheckBox.esm.js';
|
|
9
12
|
export { default as FormCheckBoxGroup } from './FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
10
|
-
export { default as FormErrorField } from './FormErrorField/FormErrorField.esm.js';
|
|
11
|
-
export { default as FormNumberField } from './FormNumberField/FormNumberField.esm.js';
|
|
12
|
-
export { default as FormNumberFieldDecimal } from './FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
13
13
|
export { default as FormRadioGroup } from './FormRadioGroup/FormRadioGroup.esm.js';
|
|
14
|
+
export { default as DatepickerWrapperV2 } from './DatePicker/DatepickerWrapperV2.esm.js';
|
|
15
|
+
export { default as MonthPicker } from './DatePicker/MonthPicker.esm.js';
|
|
16
|
+
export { default as Monthpickerrender } from './DatePicker/Monthpickerrender.esm.js';
|
|
17
|
+
export { default as YearPickerField } from './YearPickerField/YearPickerField.esm.js';
|
|
18
|
+
export { default as TimePicker } from './TimePicker/TimePicker.esm.js';
|
|
14
19
|
export { default as FormRenderFileUpload } from './FileUpload/FormRenderFileUpload.esm.js';
|
|
15
20
|
export { default as FormRenderMultiFileUpload } from './FileUpload/FormRenderMultiFileUpload.esm.js';
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
import 'react/jsx-runtime';
|
|
22
|
+
import '@mui/material';
|
|
23
|
+
import 'react';
|
|
24
|
+
import 'react-hook-form';
|
|
25
|
+
import 'dayjs';
|
|
26
|
+
export { default as FormBottomField } from './FormBottomField/FormBottomField.esm.js';
|
|
27
|
+
import '@mui/icons-material/Visibility';
|
|
28
|
+
import '@mui/icons-material/Close';
|
|
29
|
+
import '@mui/icons-material/NavigateBefore';
|
|
30
|
+
import '@mui/icons-material/NavigateNext';
|
|
31
|
+
import '@mui/icons-material/Delete';
|
|
32
|
+
import '@mui/icons-material/UploadFile';
|
|
33
|
+
import '@mui/icons-material/PictureAsPdf';
|
|
34
|
+
import '@mui/icons-material/TableChart';
|
|
35
|
+
import '@mui/icons-material/Description';
|
|
36
|
+
export { default as FormErrorField } from './FormErrorField/FormErrorField.esm.js';
|
|
18
37
|
export { default as HelperText } from './HelperText/HelperText.esm.js';
|
|
19
|
-
export { default as MonthPicker } from './DatePicker/MonthPicker.esm.js';
|
|
20
|
-
export { default as Monthpickerrender } from './DatePicker/Monthpickerrender.esm.js';
|
|
21
|
-
export { default as PasswordField } from './PasswordField/PasswordField.esm.js';
|
|
22
38
|
export { default as RichTextEditor } from './RichTextEditor/RichTextEditor.esm.js';
|
|
23
39
|
export { default as RichTextEditorWrapper } from './RichTextEditor/RichTextEditorWrapper.esm.js';
|
|
24
|
-
export { default as TimePicker } from './TimePicker/TimePicker.esm.js';
|
|
25
|
-
export { default as YearPickerField } from './YearPickerField/YearPickerField.esm.js';
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Box, TextField, FormControlLabel, Tooltip } from '@mui/material';
|
|
3
3
|
import Checkbox from '@mui/material/Checkbox';
|
|
4
4
|
import FormControl from '@mui/material/FormControl';
|
|
5
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
5
6
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
7
|
import Select from '@mui/material/Select';
|
|
7
8
|
import * as require$$0 from 'react';
|
|
@@ -101,7 +102,7 @@ function MultiSelectFieldComponent({ value, options, onChangeFn, disable = false
|
|
|
101
102
|
if (e.key !== 'Escape') {
|
|
102
103
|
e.stopPropagation();
|
|
103
104
|
}
|
|
104
|
-
} }) }), jsx(MenuItem, { disabled: filterOptions.length === 0, sx: { py: 0, px: 2 }, children: jsx(FormControlLabel, { control: jsx(Checkbox, { id: `${value}-select-all`, size: "small", checked: selectAll,
|
|
105
|
+
} }) }), jsx(MenuItem, { disabled: filterOptions.length === 0, sx: { py: 0.5, px: 2 }, onMouseDown: (e) => e.stopPropagation(), children: jsx(FormControlLabel, { control: jsx(Checkbox, { id: `${value}-select-all`, size: "small", checked: selectAll, onChange: () => {
|
|
105
106
|
const currentValues = fieldValue?.split(',').filter(Boolean) || [];
|
|
106
107
|
const filteredIds = filterOptions.map((opt) => String(opt.value));
|
|
107
108
|
if (selectAll) {
|
|
@@ -111,19 +112,22 @@ function MultiSelectFieldComponent({ value, options, onChangeFn, disable = false
|
|
|
111
112
|
onChangeFn([...new Set([...currentValues, ...filteredIds])].join(','));
|
|
112
113
|
}
|
|
113
114
|
} }), label: "Select All", sx: {
|
|
114
|
-
width: '100%',
|
|
115
115
|
margin: 0,
|
|
116
|
+
width: '100%',
|
|
116
117
|
'& .MuiFormControlLabel-label': { fontSize: '13px' }
|
|
117
|
-
} }) }), filterOptions.length !== 0 ? (filterOptions.map((option) => (
|
|
118
|
+
} }) }), filterOptions.length !== 0 ? (filterOptions.map((option) => (jsxs(MenuItem, { value: `${option.value}`, sx: {
|
|
118
119
|
zIndex: 0,
|
|
119
120
|
py: 0,
|
|
120
121
|
px: 2,
|
|
121
122
|
minHeight: ITEM_HEIGHT
|
|
122
|
-
}, children: jsx(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
}, children: [jsx(Checkbox, { checked: fieldValue?.split(',').some((val) => String(val) === String(option.value)), size: "small", sx: { p: 1, mr: 1, pointerEvents: 'none' } }), jsx(ListItemText, { primary: option.label, primaryTypographyProps: {
|
|
124
|
+
fontSize: '13px',
|
|
125
|
+
sx: {
|
|
126
|
+
whiteSpace: 'normal',
|
|
127
|
+
wordBreak: 'break-all',
|
|
128
|
+
lineHeight: '1.2'
|
|
129
|
+
}
|
|
130
|
+
} })] }, option.value)))) : (jsx(MenuItem, { disabled: true, value: 'NA', children: "No data Found" }, 'NA'))] }) }) }));
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
export { MultiSelectFieldComponent as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Calendar } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Calendar } from '../../../../../_virtual/index.esm6.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateInput } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateInput } from '../../../../../_virtual/index.esm12.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireClassnames } from '../../../../classnames/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateRange } from '../../../../../_virtual/index.esm7.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireCalendar } from '../Calendar/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateRangePicker } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm4.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDateRange } from '../DateRange/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DefinedRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DefinedRange } from '../../../../../_virtual/index.esm5.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireStyles } from '../../styles.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as InputRangeField } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as InputRangeField } from '../../../../../_virtual/index.esm14.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Month } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Month } from '../../../../../_virtual/index.esm13.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tp-react-elements",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "React form components library built with React Hook Form and Yup",
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
"publish:prepare": "npm run build:lib && npm run type-check",
|
|
73
73
|
"publish:npm": "npm publish",
|
|
74
74
|
"publish:beta": "npm publish --tag beta",
|
|
75
|
+
"publish:patch": "npm version patch --no-git-tag-version && npm publish",
|
|
76
|
+
"publish:minor": "npm version minor --no-git-tag-version && npm publish",
|
|
77
|
+
"publish:major": "npm version major --no-git-tag-version && npm publish",
|
|
75
78
|
"publish:auto": "npm run publish:prepare && npm publish",
|
|
76
79
|
"install-peers": "install-tp-form-deps",
|
|
77
80
|
"package-build": "rollup -c --bundleConfigAsCjs",
|