tp-react-elements-dev 1.15.2 → 1.15.4

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 InputRangeField = {};
1
+ var DayCell = {};
2
2
 
3
- export { InputRangeField 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 InputRangeField = {};
2
2
 
3
- export { Month as __exports };
3
+ export { InputRangeField as __exports };
@@ -1,3 +1,3 @@
1
- var DefinedRange = {};
1
+ var Calendar = {};
2
2
 
3
- export { DefinedRange as __exports };
3
+ export { Calendar 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 DateRangePicker = {};
2
2
 
3
- export { DateRange as __exports };
3
+ export { DateRangePicker as __exports };
@@ -1,3 +1,3 @@
1
- var DateRangePicker = {};
1
+ var DefinedRange = {};
2
2
 
3
- export { DateRangePicker as __exports };
3
+ export { DefinedRange as __exports };
@@ -23,21 +23,23 @@ const SingleSelectSearchApi = ({ props, variant, }) => {
23
23
  setOptionsFetched([]);
24
24
  }
25
25
  else if (props.getValues(props.item.name)) ;
26
- setIsLoading(true);
27
- jwtAxios
28
- .get(props.item.api + `&${props.item.searchValue || 'searchvalue'}=${searchValue}`, {
29
- signal,
30
- headers: props.item.jwtHeader,
31
- })
32
- .then((res) => {
33
- setOptionsFetched(res.data);
34
- setIsLoading(false);
35
- props.item.setLoadList && props.item.setLoadList(res.data);
36
- })
37
- .catch((err) => {
38
- console.log(err, 'error');
39
- setIsLoading(false);
40
- });
26
+ if (searchValue && searchValue.length > 3) {
27
+ setIsLoading(true);
28
+ jwtAxios
29
+ .get(props.item.api + `&${props.item.searchValue || 'searchvalue'}=${searchValue}`, {
30
+ signal,
31
+ headers: props.item.jwtHeader,
32
+ })
33
+ .then((res) => {
34
+ setOptionsFetched(res.data);
35
+ setIsLoading(false);
36
+ props.item.setLoadList && props.item.setLoadList(res.data);
37
+ })
38
+ .catch((err) => {
39
+ console.log(err, 'error');
40
+ setIsLoading(false);
41
+ });
42
+ }
41
43
  // }
42
44
  // }
43
45
  return () => controller.abort();
@@ -68,7 +70,9 @@ const SingleSelectSearchApi = ({ props, variant, }) => {
68
70
  }, disabled: props.item.disable, options: optionsFetched, getOptionLabel: (option) => option.label, renderInput: (params) => {
69
71
  return (jsx(Tooltip, { title: params.inputProps.value && params.inputProps.value, children: jsx(TextField, { ...params, onChange: (e) => {
70
72
  setSearchValue(e.target.value);
71
- }, placeholder: props.item.placeholder, label: props.item.label }) }));
73
+ }, label: variant !== 'standard'
74
+ ? `${props.item.label}${props.item.required ? ' *' : ''}`
75
+ : '', placeholder: props.item.placeholder }) }));
72
76
  }, PaperComponent: ({ children }) => (jsx("div", { style: {
73
77
  background: '#fff',
74
78
  }, children: isLoading ? (jsxs(Stack, { padding: 2, spacing: 1, children: [jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 }), jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 }), jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 }), jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 }), jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 }), jsx(Skeleton, { variant: "rectangular", width: '100%', height: 20 })] })) : (children) })), isOptionEqualToValue: isOptionEqualToValue }), props?.item?.helperText && (jsxs("span", { style: {
@@ -1,4 +1,4 @@
1
- import { __exports as Calendar } from '../../../../../_virtual/index.esm5.js';
1
+ import { __exports as Calendar } 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 requireDayCell } from '../DayCell/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DateRange } from '../../../../../_virtual/index.esm6.js';
1
+ import { __exports as DateRange } 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 requireCalendar } from '../Calendar/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm7.js';
1
+ import { __exports as DateRangePicker } 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 requireDateRange } from '../DateRange/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.esm4.js';
1
+ import { __exports as DefinedRange } from '../../../../../_virtual/index.esm7.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 InputRangeField } from '../../../../../_virtual/index.esm11.js';
1
+ import { __exports as InputRangeField } 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
 
@@ -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.15.2",
3
+ "version": "1.15.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "React form components library built with React Hook Form and Yup",