tp-react-elements-dev 1.14.10 → 1.14.12
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.esm11.js +2 -2
- package/dist/_virtual/index.esm12.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/components/FormComponents/DatePicker/DatepickerWrapperV2.esm.js +33 -31
- package/dist/components/FormComponents/RichTextEditor/RichTextEditor.esm.js +11 -16
- 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/DayCell/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +1 -1
- package/dist/utils/Interface/FormInterface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DayCell = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DayCell 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 DateInput = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateInput as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateRange as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Calendar = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Calendar as __exports };
|
|
@@ -33,40 +33,42 @@ const DatepickerWrapperV2 = ({ props, variant, }) => {
|
|
|
33
33
|
if (isLoading) {
|
|
34
34
|
return jsx("div", { style: { minHeight: '36px' }, children: "Loading..." });
|
|
35
35
|
}
|
|
36
|
-
return (jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) =>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
?
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
props?.item?.onChangeFn
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
error: isShowBorderError,
|
|
60
|
-
sx: {
|
|
61
|
-
'& .MuiFormLabel-root': {
|
|
62
|
-
top: -10,
|
|
36
|
+
return (jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => {
|
|
37
|
+
return (jsxs(Fragment, { children: [DatePicker && (jsxs(LocalizationProvider, { dateAdapter: AdapterDayjs, children: [renderLabel(variant, props), jsx(DatePicker, { views: ['month', 'year', 'day'], label: variant !== 'standard'
|
|
38
|
+
? `${props.item.label}${props.item.required ? ' *' : ''}`
|
|
39
|
+
: '', value: field.value
|
|
40
|
+
? typeof field.value === 'string'
|
|
41
|
+
? dayjs(field.value, props.item.DateFormat || 'DD/MM/YYYY')
|
|
42
|
+
: dayjs(field.value)
|
|
43
|
+
: null, className: 'read-only', format: props.item.DateFormat || 'DD/MM/YYYY', open: open, onOpen: handleToggle, onClose: handleToggle, minDate: props?.item?.minDate ? dayjs(props?.item?.minDate, props.item.DateFormat || 'DD/MM/YYYY') : undefined, maxDate: props?.item?.maxDate ? dayjs(props?.item?.maxDate, props.item.DateFormat || 'DD/MM/YYYY') : undefined, disabled: props.item.disable || false, onChange: (date) => {
|
|
44
|
+
field.onChange(dayjs(date).format(props.item.DateFormat || 'DD/MM/YYYY'));
|
|
45
|
+
props?.item?.onChangeFn &&
|
|
46
|
+
props?.item?.onChangeFn(dayjs(date).format(props.item.DateFormat || 'DD/MM/YYYY'));
|
|
47
|
+
}, slotProps: {
|
|
48
|
+
textField: {
|
|
49
|
+
onClick: () => handleToggle(),
|
|
50
|
+
inputRef: inputTextRef,
|
|
51
|
+
onBlur: (e) => {
|
|
52
|
+
props?.item?.onBlurFn && props?.item?.onBlurFn(e);
|
|
53
|
+
},
|
|
54
|
+
inputProps: {
|
|
55
|
+
input: { cursor: 'pointer' },
|
|
56
|
+
'aria-labelledby': `${props.item.name}-label`,
|
|
57
|
+
'aria-describedby': `${props.item.name}-helper ${props.item.name}-error`,
|
|
58
|
+
'aria-required': props.item.required ? true : undefined,
|
|
63
59
|
},
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
error: isShowBorderError,
|
|
61
|
+
sx: {
|
|
62
|
+
'& .MuiFormLabel-root': {
|
|
63
|
+
top: -10,
|
|
64
|
+
},
|
|
65
|
+
'& .MuiInputLabel-shrink': {
|
|
66
|
+
top: 0,
|
|
67
|
+
},
|
|
66
68
|
},
|
|
67
69
|
},
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
+
} })] })), jsx(FormBottomField, { ...props })] }));
|
|
71
|
+
} }, props.item.name));
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
export { DatepickerWrapperV2 as default };
|
|
@@ -9,12 +9,15 @@ const RichTextEditor = ({ props }) => {
|
|
|
9
9
|
const [JoditEditor, setJoditEditor] = useState(null);
|
|
10
10
|
const [isLoading, setIsLoading] = useState(true);
|
|
11
11
|
const value = useWatch({ control: props.control, name: props.item.name });
|
|
12
|
-
// Dynamically load JoditEditor only
|
|
13
12
|
useEffect(() => {
|
|
14
13
|
const loadJoditDependencies = async () => {
|
|
15
14
|
try {
|
|
16
15
|
const joditEditorModule = await getJoditEditor();
|
|
17
|
-
|
|
16
|
+
// Extract the default export if present
|
|
17
|
+
const Editor = joditEditorModule?.default
|
|
18
|
+
? joditEditorModule.default
|
|
19
|
+
: joditEditorModule;
|
|
20
|
+
setJoditEditor(() => Editor);
|
|
18
21
|
setIsLoading(false);
|
|
19
22
|
}
|
|
20
23
|
catch (error) {
|
|
@@ -28,19 +31,13 @@ const RichTextEditor = ({ props }) => {
|
|
|
28
31
|
placeholder: props.item.placeholder || 'Start typing...',
|
|
29
32
|
statusbar: false,
|
|
30
33
|
removeButtons: props.item.removeButtons,
|
|
31
|
-
style: {
|
|
32
|
-
'font-family': 'Arial',
|
|
33
|
-
},
|
|
34
|
+
style: { 'font-family': 'Arial' },
|
|
34
35
|
controls: {
|
|
35
|
-
font: {
|
|
36
|
-
list: {
|
|
37
|
-
Arial: 'Arial',
|
|
38
|
-
...props.item?.FontFamily,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
36
|
+
font: { list: { Arial: 'Arial', ...props.item?.FontFamily } },
|
|
41
37
|
fontsize: {
|
|
42
38
|
list: props.item.Fonts || [
|
|
43
|
-
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
39
|
+
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
40
|
+
25, 26, 27, 28, 29, 30,
|
|
44
41
|
],
|
|
45
42
|
},
|
|
46
43
|
},
|
|
@@ -97,18 +94,16 @@ const RichTextEditor = ({ props }) => {
|
|
|
97
94
|
setContent(newContent);
|
|
98
95
|
props.setValue(props.item.name, newContent);
|
|
99
96
|
}
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
100
98
|
props.item.onBlurFn && props.item.onBlurFn(newContent);
|
|
101
99
|
};
|
|
102
100
|
const handleChange = (newContent) => {
|
|
103
101
|
props.item.onChangeFn && props.item.onChangeFn(newContent);
|
|
104
102
|
};
|
|
105
|
-
// Show loading state while Jodit is being loaded
|
|
106
103
|
if (isLoading || !JoditEditor) {
|
|
107
104
|
return jsx("div", { children: "Loading editor..." });
|
|
108
105
|
}
|
|
109
|
-
return (jsx(JoditEditor, { ref: editor, value: content, config: config,
|
|
110
|
-
// tabIndex={1 as IJoditEditorProps["tabIndex"]}
|
|
111
|
-
onBlur: handleBlur, onChange: handleChange }));
|
|
106
|
+
return (jsx(JoditEditor, { ref: editor, value: content, config: config, onBlur: handleBlur, onChange: handleChange }));
|
|
112
107
|
};
|
|
113
108
|
|
|
114
109
|
export { RichTextEditor as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Calendar } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Calendar } from '../../../../../_virtual/index.esm5.js';
|
|
2
2
|
import React__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.esm14.js';
|
|
2
2
|
import React__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.esm4.js';
|
|
2
2
|
import React__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 DayCell } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DayCell } from '../../../../../_virtual/index.esm11.js';
|
|
2
2
|
import React__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 Month } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Month } from '../../../../../_virtual/index.esm12.js';
|
|
2
2
|
import React__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';
|