tp-react-elements-dev 1.14.10 → 1.14.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.
@@ -1,3 +1,3 @@
1
- var DateInput = {};
1
+ var DayCell = {};
2
2
 
3
- export { DateInput as __exports };
3
+ export { DayCell as __exports };
@@ -1,3 +1,3 @@
1
- var DayCell = {};
1
+ var Month = {};
2
2
 
3
- export { DayCell as __exports };
3
+ export { Month as __exports };
@@ -1,3 +1,3 @@
1
- var Month = {};
1
+ var DateInput = {};
2
2
 
3
- export { Month as __exports };
3
+ export { DateInput as __exports };
@@ -1,3 +1,3 @@
1
- var Calendar = {};
1
+ var DateRange = {};
2
2
 
3
- export { Calendar as __exports };
3
+ export { DateRange as __exports };
@@ -1,3 +1,3 @@
1
- var DateRange = {};
1
+ var DefinedRange = {};
2
2
 
3
- export { DateRange as __exports };
3
+ export { DefinedRange as __exports };
@@ -1,3 +1,3 @@
1
- var DefinedRange = {};
1
+ var Calendar = {};
2
2
 
3
- export { DefinedRange as __exports };
3
+ export { Calendar as __exports };
@@ -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
- setJoditEditor(joditEditorModule);
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, 25, 26, 27, 28, 29, 30,
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.esm4.js';
1
+ import { __exports as Calendar } from '../../../../../_virtual/index.esm6.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.esm11.js';
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.esm5.js';
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.esm12.js';
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 DefinedRange } from '../../../../../_virtual/index.esm6.js';
1
+ import { __exports as DefinedRange } 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 requireStyles } from '../../styles.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as Month } from '../../../../../_virtual/index.esm14.js';
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tp-react-elements-dev",
3
- "version": "1.14.10",
3
+ "version": "1.14.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "React form components library built with React Hook Form and Yup",