tp-react-elements 1.3.16 → 1.3.19

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.
Files changed (22) hide show
  1. package/dist/_virtual/index.esm11.js +2 -2
  2. package/dist/_virtual/index.esm12.js +2 -2
  3. package/dist/_virtual/index.esm13.js +2 -2
  4. package/dist/_virtual/index.esm14.js +2 -2
  5. package/dist/_virtual/index.esm4.js +2 -2
  6. package/dist/_virtual/index.esm6.js +2 -2
  7. package/dist/_virtual/index.esm7.js +2 -2
  8. package/dist/components/FormComponents/Select/MultiSelectAutocomplete.d.ts +21 -1
  9. package/dist/components/FormComponents/Select/MultiSelectAutocomplete.esm.js +117 -197
  10. package/dist/components/FormComponents/Select/SingleSelectSearchApi.d.ts +46 -1
  11. package/dist/components/FormComponents/Select/SingleSelectSearchApi.esm.js +180 -64
  12. package/dist/components/PaginatedGrid/GenericPaginatedGrid.d.ts +22 -1
  13. package/dist/components/PaginatedGrid/GenericPaginatedGrid.esm.js +3 -1
  14. package/dist/components/PaginatedGrid/mockData.d.ts +15 -0
  15. package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +1 -1
  16. package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +1 -1
  17. package/dist/node_modules/react-date-range/dist/components/DateRangePicker/index.esm.js +1 -1
  18. package/dist/node_modules/react-date-range/dist/components/DayCell/index.esm.js +1 -1
  19. package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +1 -1
  20. package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +1 -1
  21. package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +1 -1
  22. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- var DayCell = {};
1
+ var InputRangeField = {};
2
2
 
3
- export { DayCell as __exports };
3
+ export { InputRangeField as __exports };
@@ -1,3 +1,3 @@
1
- var Month = {};
1
+ var DayCell = {};
2
2
 
3
- export { Month as __exports };
3
+ export { DayCell as __exports };
@@ -1,3 +1,3 @@
1
- var DateInput = {};
1
+ var Month = {};
2
2
 
3
- export { DateInput as __exports };
3
+ export { Month as __exports };
@@ -1,3 +1,3 @@
1
- var InputRangeField = {};
1
+ var DateInput = {};
2
2
 
3
- export { InputRangeField as __exports };
3
+ export { DateInput as __exports };
@@ -1,3 +1,3 @@
1
- var Calendar = {};
1
+ var DefinedRange = {};
2
2
 
3
- export { Calendar as __exports };
3
+ export { DefinedRange as __exports };
@@ -1,3 +1,3 @@
1
- var DateRangePicker = {};
1
+ var Calendar = {};
2
2
 
3
- export { DateRangePicker as __exports };
3
+ export { Calendar as __exports };
@@ -1,3 +1,3 @@
1
- var DefinedRange = {};
1
+ var DateRangePicker = {};
2
2
 
3
- export { DefinedRange as __exports };
3
+ export { DateRangePicker as __exports };
@@ -1,6 +1,26 @@
1
1
  import { FormRenderProps, VariantProps } from '../../../utils';
2
- declare const MultiSelectAutocomplete: ({ props, variant, }: {
2
+ /**
3
+ * Multi-select autocomplete backed by `react-hook-form`.
4
+ *
5
+ * Key behaviours:
6
+ * - Values stored as **`string[]`** in the form field.
7
+ * - Accepts CSV strings and normalises them automatically (backward-compat
8
+ * with older API responses).
9
+ * - Shows individual chips for up to `maxChips` selections, then collapses
10
+ * into a single **"N selected"** chip with a tooltip listing all labels.
11
+ * - The "N selected" chip has a **delete button** that clears all selections.
12
+ * - **`onChangeFn` is only called on genuine user interactions** (select /
13
+ * remove / clear). Pre-populating the form with `defaultValues` or calling
14
+ * `reset()` does **not** trigger `onChangeFn`, preventing unwanted API calls.
15
+ * - `onChangeFn` receives a `string[]` (not a CSV string).
16
+ */
17
+ declare const MultiSelectAutocomplete: ({ props, variant, maxChips, }: {
3
18
  props: FormRenderProps;
4
19
  variant: VariantProps;
20
+ /**
21
+ * Maximum number of chips shown individually before collapsing into
22
+ * "N selected". Default: `2`.
23
+ */
24
+ maxChips?: number;
5
25
  }) => import("react/jsx-runtime").JSX.Element;
6
26
  export default MultiSelectAutocomplete;
@@ -6,233 +6,153 @@ import FormBottomField from '../FormBottomField/FormBottomField.esm.js';
6
6
  import 'dayjs';
7
7
  import { renderLabel } from '../../../utils/Constants/FormConstants.esm.js';
8
8
 
9
- //region old code
10
- // const MultiSelectAutocomplete = ({
11
- // props,
12
- // variant,
13
- // }: {
14
- // props: FormRenderProps;
15
- // variant: VariantProps;
16
- // }) => {
17
- // const isError = !!props.errors?.[props.item.name];
18
- // const watchedValue = useWatch({ control: props.control, name: props.item.name });
19
- // const normalizeToStringArray = (value: unknown): string[] => {
20
- // if (Array.isArray(value)) {
21
- // return value.map((v) => String(v));
22
- // }
23
- // if (typeof value === 'string') {
24
- // return value
25
- // .split(',')
26
- // .map((v) => v.trim())
27
- // .filter((v) => v.length > 0);
28
- // }
29
- // if (value == null) return [];
30
- // return [String(value)];
31
- // };
32
- // const normalizedSelectedValues = normalizeToStringArray(watchedValue);
33
- // const isShowBorderError = isError && normalizedSelectedValues.length === 0;
34
- // const options: OptionItem[] = (props.item.options || []) as OptionItem[];
35
- // const selectedOptions: OptionItem[] = useMemo(() => {
36
- // const valueSet = new Set(normalizedSelectedValues.map((v) => String(v)));
37
- // return options.filter((opt) => valueSet.has(String(opt.value)));
38
- // }, [normalizedSelectedValues, options]);
39
- // return (
40
- // <Controller
41
- // control={props.control}
42
- // name={props.item.name}
43
- // key={props.item.name}
44
- // render={({ field }) => (
45
- // <>
46
- // {renderLabel(variant, props)}
47
- // <Autocomplete
48
- // {...field}
49
- // multiple
50
- // disableCloseOnSelect
51
- // id={`${props.item.name}-autocomplete-multi`}
52
- // options={options}
53
- // value={selectedOptions}
54
- // getOptionLabel={(option) => String(option.label)}
55
- // isOptionEqualToValue={(option, value) => String(option.value) === String(value.value)}
56
- // onChange={(_, newValue) => {
57
- // const joined = (newValue || []).map((o: OptionItem) => String(o.value)).join(',');
58
- // props.setValue(props.item.name, joined);
59
- // props?.item?.onChangeFn && props?.item?.onChangeFn(joined);
60
- // props?.clearErrors && props?.clearErrors(props?.item?.name);
61
- // }}
62
- // onBlur={(e: any) => {
63
- // props?.item?.onBlurFn && props?.item?.onBlurFn(e);
64
- // }}
65
- // size="small"
66
- // renderOption={(renderProps, option, { selected }) => (
67
- // <li {...renderProps} style={{ fontSize: '11px' }}>
68
- // <Checkbox
69
- // checked={selected}
70
- // size="small"
71
- // sx={{ mr: 1, p: '2px' }}
72
- // />
73
- // {option.label}
74
- // </li>
75
- // )}
76
- // renderTags={(tagValue) => (
77
- // tagValue.length ? <span>{tagValue.map((o: OptionItem) => String(o.label)).join(' , ')}</span> : null
78
- // )}
79
- // sx={{
80
- // '& .MuiAutocomplete-input': {
81
- // padding: '0px 0px 0px 5px !important',
82
- // },
83
- // '& .css-erkti9-MuiFormLabel-root-MuiInputLabel-root,.css-8edmr2-MuiFormLabel-root-MuiInputLabel-root': {
84
- // top: '-3px',
85
- // },
86
- // '& .MuiAutocomplete-option': {
87
- // fontSize: '11px',
88
- // zIndex: 2000,
89
- // },
90
- // ...props.item.sx,
91
- // }}
92
- // ListboxProps={{
93
- // onScroll: (event: React.SyntheticEvent) => {
94
- // const listboxNode = event.currentTarget as HTMLElement;
95
- // if (listboxNode.scrollTop + listboxNode.clientHeight === listboxNode.scrollHeight) {
96
- // // Infinite scroll hook can be wired here
97
- // }
98
- // },
99
- // }}
100
- // disabled={props.item.disable}
101
- // slotProps={{
102
- // popper: {
103
- // sx: {
104
- // zIndex: 1401,
105
- // },
106
- // },
107
- // listbox: {
108
- // sx: {
109
- // fontSize: '11px',
110
- // },
111
- // },
112
- // }}
113
- // renderInput={(params) => (
114
- // <TextField
115
- // {...params}
116
- // placeholder={props.item.placeholder}
117
- // error={isShowBorderError}
118
- // label={
119
- // variant !== 'standard'
120
- // ? `${props.item.label}${props.item.required ? ' *' : ''}`
121
- // : ''
122
- // }
123
- // inputProps={{
124
- // ...params.inputProps,
125
- // 'aria-labelledby': `${props.item.name}-label`,
126
- // 'aria-describedby': `${props.item.name}-helper ${props.item.name}-error`,
127
- // 'aria-required': props.item.required ? true : undefined,
128
- // }}
129
- // />
130
- // )}
131
- // />
132
- // <FormBottomField {...props} />
133
- // </>
134
- // )}
135
- // />
136
- // );
137
- // };
138
- //endregion
139
- const MultiSelectAutocomplete = ({ props, variant, }) => {
140
- const isError = !!props.errors?.[props.item.name];
141
- const watchedValue = useWatch({ control: props.control, name: props.item.name });
9
+ // ─── Module-level helpers ─────────────────────────────────────────────────────
10
+ /**
11
+ * Normalises any value shape coming from react-hook-form to a plain string[].
12
+ *
13
+ * | Input shape | Output |
14
+ * |----------------------|-------------------|
15
+ * | `string[]` | as-is (coerced) |
16
+ * | `'1,2,3'` (CSV) | `['1','2','3']` |
17
+ * | `null` / `undefined` | `[]` |
18
+ * | any other scalar | `[String(value)]` |
19
+ */
20
+ const normalizeToStringArray = (value) => {
21
+ if (Array.isArray(value))
22
+ return value.map((v) => String(v));
23
+ if (typeof value === 'string') {
24
+ return value
25
+ .split(',')
26
+ .map((v) => v.trim())
27
+ .filter((v) => v.length > 0);
28
+ }
29
+ if (value == null)
30
+ return [];
31
+ return [String(value)];
32
+ };
33
+ /**
34
+ * MUI Autocomplete change reasons that represent a genuine user interaction.
35
+ * `'blur'` is deliberately excluded because it fires programmatically when
36
+ * focus moves away (e.g. on form reset / programmatic setValue), which would
37
+ * trigger `onChangeFn` → API calls for pre-selected values.
38
+ */
39
+ const USER_CHANGE_REASONS = new Set(['selectOption', 'removeOption', 'clear']);
40
+ // ─── Component ───────────────────────────────────────────────────────────────
41
+ /**
42
+ * Multi-select autocomplete backed by `react-hook-form`.
43
+ *
44
+ * Key behaviours:
45
+ * - Values stored as **`string[]`** in the form field.
46
+ * - Accepts CSV strings and normalises them automatically (backward-compat
47
+ * with older API responses).
48
+ * - Shows individual chips for up to `maxChips` selections, then collapses
49
+ * into a single **"N selected"** chip with a tooltip listing all labels.
50
+ * - The "N selected" chip has a **delete button** that clears all selections.
51
+ * - **`onChangeFn` is only called on genuine user interactions** (select /
52
+ * remove / clear). Pre-populating the form with `defaultValues` or calling
53
+ * `reset()` does **not** trigger `onChangeFn`, preventing unwanted API calls.
54
+ * - `onChangeFn` receives a `string[]` (not a CSV string).
55
+ */
56
+ const MultiSelectAutocomplete = ({ props, variant, maxChips = 2, }) => {
57
+ // ── Destructure stable references from props ───────────────────────────────
58
+ const { control, errors, item, setValue, clearErrors } = props;
59
+ const { name, options: rawOptions, onChangeFn, onBlurFn, disable, placeholder, required, label, sx: itemSx, } = item;
60
+ const isError = !!errors?.[name];
61
+ const watchedValue = useWatch({ control, name });
142
62
  const [open, setOpen] = useState(false);
143
63
  const tagsContainerRef = useRef(null);
144
- const normalizeToStringArray = (value) => {
145
- if (Array.isArray(value)) {
146
- // already array of primitives/strings
147
- return value.map((v) => String(v));
148
- }
149
- if (typeof value === 'string') {
150
- // if backend provided CSV string, convert to array
151
- return value
152
- .split(',')
153
- .map((v) => v.trim())
154
- .filter((v) => v.length > 0);
155
- }
156
- if (value == null)
157
- return [];
158
- // for any other types, coerce to single-element array
159
- return [String(value)];
160
- };
161
64
  const normalizedSelectedValues = normalizeToStringArray(watchedValue);
162
65
  const isShowBorderError = isError && normalizedSelectedValues.length === 0;
163
- const options = useMemo(() => (props.item.options || []), [props.item.options]);
66
+ const options = useMemo(() => (rawOptions || []), [rawOptions]);
164
67
  const selectedOptions = useMemo(() => {
165
68
  const valueSet = new Set(normalizedSelectedValues.map((v) => String(v)));
166
69
  return options.filter((opt) => valueSet.has(String(opt.value)));
167
70
  }, [normalizedSelectedValues, options]);
168
- // Derived overflow flag without extra renders
169
- const isOverflowing = (selectedOptions || []).length > 2;
170
- // Stable callbacks to avoid re-renders
71
+ const isOverflowing = selectedOptions.length > maxChips;
72
+ // ── Stable callbacks ───────────────────────────────────────────────────────
171
73
  const getOptionLabelCb = useCallback((option) => String(option.label), []);
172
74
  const isOptionEqualCb = useCallback((option, value) => String(option.value) === String(value.value), []);
173
75
  const renderOptionCb = useCallback((renderProps, option, state) => (jsxs("li", { ...renderProps, style: { fontSize: '11px' }, children: [jsx(Checkbox, { checked: state.selected, size: "small", sx: { mr: 1, p: '2px' } }), option.label] })), []);
174
- const chipSx = useMemo(() => ({ mr: 0.5, height: 20, fontSize: '10px', borderRadius: '10px', '& .MuiChip-label': { px: 0.75, py: 0 } }), []);
175
- const selectedTooltip = useMemo(() => selectedOptions.map(o => String(o.label)).join(', '), [selectedOptions]);
176
- const handleChange = useCallback((_, newValue) => {
76
+ const chipSx = useMemo(() => ({
77
+ mr: 0.5,
78
+ height: 20,
79
+ fontSize: '10px',
80
+ borderRadius: '10px',
81
+ '& .MuiChip-label': { px: 0.75, py: 0 },
82
+ }), []);
83
+ const selectedTooltip = useMemo(() => selectedOptions.map((o) => String(o.label)).join(', '), [selectedOptions]);
84
+ /**
85
+ * Change handler — only fires `onChangeFn` for genuine user interactions.
86
+ *
87
+ * MUI passes a `reason` string as the third argument:
88
+ * 'selectOption' | 'removeOption' | 'clear' → user action → fire onChangeFn
89
+ * 'blur' → programmatic → suppress onChangeFn
90
+ *
91
+ * This prevents `onChangeFn` → API calls when the field is pre-populated
92
+ * via `defaultValues`, `reset()`, or an external `setValue()`.
93
+ */
94
+ const handleChange = useCallback((_, newValue, reason) => {
177
95
  const values = Array.isArray(newValue)
178
96
  ? newValue.map((o) => String(o.value))
179
97
  : [];
180
- // Minimize work during selection for snappier UX
181
- props.setValue(props.item.name, values, { shouldValidate: false, shouldDirty: true });
182
- props?.item?.onChangeFn && props?.item?.onChangeFn(values.join(','));
183
- props?.clearErrors && props?.clearErrors(props?.item?.name);
184
- }, [props]);
185
- const handleBlur = useCallback((e) => {
186
- props?.item?.onBlurFn && props?.item?.onBlurFn(e);
187
- }, [props]);
188
- return (jsx(Controller, { control: props.control, name: props.item.name, render: ({ field: { ref, onBlur: fieldOnBlur } }) => (jsxs(Fragment, { children: [renderLabel(variant, props), jsx(Autocomplete, { ref: ref, open: open, onOpen: () => setOpen(true), onClose: () => setOpen(false), multiple: true, disableCloseOnSelect: true, id: `${props.item.name}-autocomplete-multi`, options: options, value: selectedOptions, getOptionLabel: getOptionLabelCb, isOptionEqualToValue: isOptionEqualCb, getOptionDisabled: (option) => option.disable, onChange: handleChange, onBlur: (e) => {
98
+ setValue(name, values, { shouldValidate: false, shouldDirty: true });
99
+ if (USER_CHANGE_REASONS.has(reason) && onChangeFn) {
100
+ onChangeFn(values); // passes string[] — not CSV
101
+ }
102
+ clearErrors?.(name);
103
+ }, [setValue, clearErrors, name, onChangeFn]);
104
+ const handleBlur = useCallback((e) => { onBlurFn?.(e); }, [onBlurFn]);
105
+ /** Clears ALL selections — wired to the delete button on the overflow chip. */
106
+ const handleClearAll = useCallback(() => {
107
+ setValue(name, [], { shouldValidate: false, shouldDirty: true });
108
+ onChangeFn?.([]); // user explicitly cleared all → fire callback
109
+ clearErrors?.(name);
110
+ }, [setValue, clearErrors, name, onChangeFn]);
111
+ // ── Render ─────────────────────────────────────────────────────────────────
112
+ return (jsx(Controller, { control: control, name: name, render: ({ field: { ref, onBlur: fieldOnBlur } }) => (jsxs(Fragment, { children: [renderLabel(variant, props), jsx(Autocomplete, { ref: ref, open: open, onOpen: () => setOpen(true), onClose: () => setOpen(false), multiple: true, disableCloseOnSelect: true, id: `${name}-autocomplete-multi`, options: options, value: selectedOptions, getOptionLabel: getOptionLabelCb, isOptionEqualToValue: isOptionEqualCb, getOptionDisabled: (option) => option.disable, onChange: handleChange, onBlur: (e) => {
189
113
  fieldOnBlur();
190
114
  handleBlur(e);
191
115
  }, size: "small", disablePortal: false, autoHighlight: true, selectOnFocus: true, clearOnBlur: false, renderTags: (tagValue, getTagProps) => (jsx(Box, { ref: tagsContainerRef, sx: {
192
- '& :hover': {
193
- cursor: 'pointer',
194
- },
195
- display: 'flex', flexWrap: 'nowrap', overflow: 'hidden', alignItems: 'center'
196
- }, children: isOverflowing ? (jsx(Tooltip, { title: selectedTooltip, placement: "top", children: jsx(Chip, { size: "small", label: `${tagValue.length} selected`, onClick: () => setOpen(true), clickable: true, sx: chipSx }) })) : (tagValue.map((option, index) => (jsx(Tooltip, { title: String(option?.label ?? option), placement: "top", children: jsx(Chip, { ...getTagProps({ index }), size: "small", label: String(option?.label ?? option), sx: chipSx }) }, String(option?.value ?? option?.label ?? index))))) })), renderOption: renderOptionCb, sx: {
116
+ display: 'flex',
117
+ flexWrap: 'nowrap',
118
+ overflow: 'hidden',
119
+ alignItems: 'center',
120
+ '& :hover': { cursor: 'pointer' },
121
+ }, children: isOverflowing ? (
122
+ // ── Collapsed chip: shows "N selected" with tooltip ──────
123
+ // onDelete wires a delete (×) button that clears all selections
124
+ jsx(Tooltip, { title: selectedTooltip, placement: "top", children: jsx(Chip, { size: "small", label: `${tagValue.length} selected`, onClick: () => setOpen(true), onDelete: handleClearAll, clickable: true, sx: chipSx }) })) : (
125
+ // ── Individual chips: up to maxChips items ───────────────
126
+ tagValue.map((option, index) => {
127
+ const { key: tagKey, ...tagProps } = getTagProps({ index });
128
+ return (jsx(Tooltip, { title: String(option?.label ?? option), placement: "top", children: jsx(Chip, { ...tagProps, size: "small", label: String(option?.label ?? option), sx: chipSx }) }, tagKey ?? String(option?.value ?? option?.label ?? index)));
129
+ })) })), renderOption: renderOptionCb, sx: {
197
130
  '& .MuiAutocomplete-input': {
198
131
  padding: '0px 0px 0px 5px !important',
199
132
  },
200
133
  '& .MuiAutocomplete-inputRoot': {
201
- flexWrap: 'nowrap', // keep search beside chip
202
- alignItems: 'center'
134
+ flexWrap: 'nowrap',
135
+ alignItems: 'center',
203
136
  },
204
- '& .css-erkti9-MuiFormLabel-root-MuiInputLabel-root,.css-8edmr2-MuiFormLabel-root-MuiInputLabel-root': {
137
+ '& .css-erkti9-MuiFormLabel-root-MuiInputLabel-root, .css-8edmr2-MuiFormLabel-root-MuiInputLabel-root': {
205
138
  top: '-3px',
206
139
  },
207
140
  '& .MuiAutocomplete-option': {
208
141
  fontSize: '11px',
209
142
  zIndex: 2000,
210
143
  },
211
- ...props.item.sx,
212
- }, ListboxProps: {
213
- onScroll: (event) => {
214
- const listboxNode = event.currentTarget;
215
- if (listboxNode.scrollTop + listboxNode.clientHeight === listboxNode.scrollHeight) ;
216
- },
217
- }, disabled: props.item.disable, slotProps: {
218
- popper: {
219
- sx: {
220
- zIndex: 20000,
221
- },
222
- },
223
- listbox: {
224
- sx: {
225
- fontSize: '11px',
226
- },
227
- },
228
- }, renderInput: (params) => (jsx(TextField, { ...params, placeholder: props.item.placeholder, error: isShowBorderError, label: variant !== 'standard'
229
- ? `${props.item.label}${props.item.required ? ' *' : ''}`
144
+ ...itemSx,
145
+ }, disabled: disable, slotProps: {
146
+ popper: { sx: { zIndex: 20000 } },
147
+ listbox: { sx: { fontSize: '11px' } },
148
+ }, renderInput: (params) => (jsx(TextField, { ...params, placeholder: placeholder, error: isShowBorderError, label: variant !== 'standard'
149
+ ? `${label}${required ? ' *' : ''}`
230
150
  : '', inputProps: {
231
151
  ...params.inputProps,
232
- 'aria-labelledby': `${props.item.name}-label`,
233
- 'aria-describedby': `${props.item.name}-helper ${props.item.name}-error`,
234
- 'aria-required': props.item.required ? true : undefined,
235
- } })) }), jsx(FormBottomField, { ...props })] })) }, props.item.name));
152
+ 'aria-labelledby': `${name}-label`,
153
+ 'aria-describedby': `${name}-helper ${name}-error`,
154
+ 'aria-required': required ? true : undefined,
155
+ } })) }), jsx(FormBottomField, { ...props })] })) }));
236
156
  };
237
157
 
238
158
  export { MultiSelectAutocomplete as default };
@@ -1,6 +1,51 @@
1
1
  import { FormRenderProps, VariantProps } from '../../../utils';
2
- declare const SingleSelectSearchApi: ({ props, variant, }: {
2
+ export interface SearchOption {
3
+ label: string;
4
+ value: string | number;
5
+ [key: string]: any;
6
+ }
7
+ /**
8
+ * Single-select autocomplete that fetches options from a remote API.
9
+ *
10
+ * ### Authentication
11
+ * Prefer `fetchOptions` — a consumer-supplied async function that handles auth
12
+ * internally and returns `SearchOption[]`. Falls back to `item.api` +
13
+ * `item.jwtHeader` via axios when `fetchOptions` is not provided.
14
+ *
15
+ * ### Pre-selected values (edit mode)
16
+ * Pass the pre-selected option in `item.options` so the label displays
17
+ * immediately without a round-trip search. If `item.options` is empty and
18
+ * `autoFill` is true, the component seeds the search input with the form value
19
+ * so options load on mount.
20
+ *
21
+ * ### API call guard
22
+ * Searches fire only after `minSearchLength` chars AND after the `debounceMs`
23
+ * debounce delay — preventing a request per keystroke.
24
+ */
25
+ declare const SingleSelectSearchApi: ({ props, variant, minSearchLength, debounceMs, fetchOptions, }: {
3
26
  props: FormRenderProps;
4
27
  variant: VariantProps;
28
+ /**
29
+ * Minimum characters before the search fires.
30
+ * Default: `3`.
31
+ */
32
+ minSearchLength?: number;
33
+ /**
34
+ * Debounce delay in milliseconds.
35
+ * Default: `300`.
36
+ */
37
+ debounceMs?: number;
38
+ /**
39
+ * Preferred way to load options. Takes precedence over `item.api`.
40
+ * Receives the current search text and an AbortSignal for cancellation.
41
+ *
42
+ * ```tsx
43
+ * fetchOptions={async (text, signal) => {
44
+ * const res = await myAuthenticatedApi.search(text, { signal });
45
+ * return res.items.map(r => ({ label: r.name, value: r.id }));
46
+ * }}
47
+ * ```
48
+ */
49
+ fetchOptions?: (searchText: string, signal: AbortSignal) => Promise<SearchOption[]>;
5
50
  }) => import("react/jsx-runtime").JSX.Element;
6
51
  export default SingleSelectSearchApi;
@@ -1,85 +1,201 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { Autocomplete, Stack, Skeleton, Tooltip, TextField } from '@mui/material';
3
- import { useState, useEffect } from 'react';
4
- import { Controller } from 'react-hook-form';
2
+ import { Autocomplete, Tooltip, TextField, Paper, Typography } from '@mui/material';
5
3
  import '../../../node_modules/axios/index.esm.js';
4
+ import { useState, useEffect, useCallback, useMemo } from 'react';
5
+ import { useWatch, Controller } from 'react-hook-form';
6
6
  import 'dayjs';
7
7
  import { renderLabel } from '../../../utils/Constants/FormConstants.esm.js';
8
8
  import FormBottomField from '../FormBottomField/FormBottomField.esm.js';
9
9
  import axios from '../../../node_modules/axios/lib/axios.esm.js';
10
10
 
11
- // Create axios instance or import your configured jwtAxios
12
- const jwtAxios = axios.create();
13
- const SingleSelectSearchApi = ({ props, variant, }) => {
14
- const [searchValue, setSearchValue] = useState('');
15
- const [optionsFetched, setOptionsFetched] = useState([]);
11
+ // ─── Module-level helpers ─────────────────────────────────────────────────────
12
+ /**
13
+ * Appends a query parameter correctly regardless of whether the base URL
14
+ * already contains a query string (`?` or `&`).
15
+ *
16
+ * Old code used `&` unconditionally which broke clean base URLs.
17
+ */
18
+ const appendQueryParam = (url, key, value) => {
19
+ const sep = url.includes('?') ? '&' : '?';
20
+ return `${url}${sep}${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
21
+ };
22
+ /** True when the error is a request cancellation (AbortController / axios). */
23
+ const isCancellation = (err) => axios.isCancel?.(err) ||
24
+ (err instanceof Error && (err.name === 'AbortError' || err.name === 'CanceledError'));
25
+ // ─── Debounce hook ────────────────────────────────────────────────────────────
26
+ function useDebounce(value, delayMs) {
27
+ const [debounced, setDebounced] = useState(value);
28
+ useEffect(() => {
29
+ const id = setTimeout(() => setDebounced(value), delayMs);
30
+ return () => clearTimeout(id);
31
+ }, [value, delayMs]);
32
+ return debounced;
33
+ }
34
+ // ─── Component ───────────────────────────────────────────────────────────────
35
+ /**
36
+ * Single-select autocomplete that fetches options from a remote API.
37
+ *
38
+ * ### Authentication
39
+ * Prefer `fetchOptions` — a consumer-supplied async function that handles auth
40
+ * internally and returns `SearchOption[]`. Falls back to `item.api` +
41
+ * `item.jwtHeader` via axios when `fetchOptions` is not provided.
42
+ *
43
+ * ### Pre-selected values (edit mode)
44
+ * Pass the pre-selected option in `item.options` so the label displays
45
+ * immediately without a round-trip search. If `item.options` is empty and
46
+ * `autoFill` is true, the component seeds the search input with the form value
47
+ * so options load on mount.
48
+ *
49
+ * ### API call guard
50
+ * Searches fire only after `minSearchLength` chars AND after the `debounceMs`
51
+ * debounce delay — preventing a request per keystroke.
52
+ */
53
+ const SingleSelectSearchApi = ({ props, variant, minSearchLength = 3, debounceMs = 300, fetchOptions, }) => {
54
+ // ── Stable references from props ──────────────────────────────────────────
55
+ const { control, errors, item, setValue, clearErrors } = props;
56
+ const { name, label, required, disable, placeholder, helperText, autoFIll: autoFill, // match the (typo'd) field name in FormSectionPropsItem
57
+ setLoadList, api, jwtHeader, searchValue: searchParamKey, sx: itemSx, } = item;
58
+ // ── Form value (reactive, no function call in deps) ───────────────────────
59
+ const formValue = useWatch({ control, name });
60
+ const isError = !!errors?.[name];
61
+ // ── State ─────────────────────────────────────────────────────────────────
62
+ /** Text shown in the input (display). */
63
+ const [displayText, setDisplayText] = useState('');
64
+ /** Text that drives API calls — only updated when user types. */
65
+ const [searchQuery, setSearchQuery] = useState('');
66
+ const [options, setOptions] = useState([]);
16
67
  const [isLoading, setIsLoading] = useState(false);
68
+ const [fetchError, setFetchError] = useState(null);
69
+ /** Stores the full selected option object so the label stays visible. */
70
+ const [selectedOption, setSelectedOption] = useState(null);
71
+ const debouncedSearch = useDebounce(searchQuery, debounceMs);
72
+ // ── Seed selectedOption from item.options (edit-mode preload) ─────────────
73
+ // If the parent supplies the pre-selected option in item.options, display it
74
+ // immediately on mount without a search round-trip.
17
75
  useEffect(() => {
18
- // eslint-disable-next-line no-undef
19
- const controller = new AbortController();
20
- const signal = controller.signal;
21
- if (props?.item?.autoFIll && props.getValues(props.item.name)) {
22
- setSearchValue(props.getValues(props.item.name));
23
- setOptionsFetched([]);
76
+ if (!formValue || selectedOption?.value === formValue)
77
+ return;
78
+ const staticMatch = (item.options || []).find((o) => String(o.value) === String(formValue));
79
+ if (staticMatch) {
80
+ const opt = { label: String(staticMatch.label), value: staticMatch.value };
81
+ setSelectedOption(opt);
82
+ setDisplayText(String(staticMatch.label));
83
+ }
84
+ }, [formValue]); // eslint-disable-line react-hooks/exhaustive-deps
85
+ // ── autoFill: auto-search for pre-selected value on mount ─────────────────
86
+ // When autoFill is true and no static option covers the pre-selected value,
87
+ // seed the search input so options load automatically on mount.
88
+ useEffect(() => {
89
+ if (autoFill && formValue && !selectedOption) {
90
+ const text = String(formValue);
91
+ setDisplayText(text);
92
+ setSearchQuery(text);
93
+ }
94
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
95
+ // ── API fetch ─────────────────────────────────────────────────────────────
96
+ useEffect(() => {
97
+ if (!debouncedSearch || debouncedSearch.length < minSearchLength) {
98
+ setOptions([]);
99
+ return;
24
100
  }
25
- else if (props.getValues(props.item.name)) ;
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);
101
+ const controller = new AbortController();
102
+ setIsLoading(true);
103
+ setFetchError(null);
104
+ const load = async () => {
105
+ try {
106
+ let data;
107
+ if (fetchOptions) {
108
+ // ── Preferred path: consumer-supplied function (auth-aware) ──
109
+ data = await fetchOptions(debouncedSearch, controller.signal);
110
+ }
111
+ else if (api) {
112
+ // ── Fallback: item.api + item.jwtHeader via axios ─────────────
113
+ const url = appendQueryParam(api, searchParamKey || 'searchvalue', debouncedSearch);
114
+ const res = await axios.get(url, { signal: controller.signal, headers: jwtHeader });
115
+ data = res.data;
116
+ }
117
+ else {
118
+ data = [];
119
+ }
120
+ setOptions(data);
121
+ setLoadList?.(data);
35
122
  setIsLoading(false);
36
- props.item.setLoadList && props.item.setLoadList(res.data);
37
- })
38
- .catch((err) => {
39
- console.log(err, 'error');
123
+ }
124
+ catch (err) {
125
+ if (isCancellation(err))
126
+ return; // silently ignore aborted requests
127
+ setFetchError('Failed to load options. Please try again.');
40
128
  setIsLoading(false);
41
- });
42
- }
43
- // }
44
- // }
129
+ }
130
+ };
131
+ load();
45
132
  return () => controller.abort();
46
- }, [searchValue, props.item.api, props.getValues(props.item.name), props?.item?.autoFIll]);
47
- // useEffect(() => {
48
- // setSearchValue('');
49
- // }, [props.item?.changeValue]);
50
- const isOptionEqualToValue = (option, value) => option?.value === value?.value; // Assuming there's a 'value' property in your options
51
- return (jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => (jsxs(Fragment, { children: [renderLabel(variant, props), jsx(Autocomplete, { ...field, value: props.getValues(props.item.name)
52
- ? optionsFetched?.find((item) => item.value === props.getValues(props.item.name))
53
- : null, onChange: (_, newValue) => {
54
- // field.onChange(newValue);
55
- props.setValue(props.item.name, newValue?.value || '');
56
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
57
- props?.item?.onChangeFn && props?.item?.onChangeFn(newValue?.value || '', newValue);
58
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
59
- props?.clearErrors && props?.clearErrors(props.item.name);
60
- }, size: "small", sx: {
133
+ }, [debouncedSearch, minSearchLength, api, fetchOptions]); // eslint-disable-line react-hooks/exhaustive-deps
134
+ // ── Stable callbacks ──────────────────────────────────────────────────────
135
+ const getOptionLabel = useCallback((option) => option?.label ?? '', []);
136
+ const isOptionEqualToValue = useCallback((option, value) => String(option?.value) === String(value?.value), []);
137
+ const handleChange = useCallback((_, newValue) => {
138
+ setSelectedOption(newValue);
139
+ setValue(name, newValue?.value ?? '');
140
+ clearErrors?.(name);
141
+ if (newValue) {
142
+ item.onChangeFn?.(newValue.value, newValue);
143
+ }
144
+ }, [setValue, clearErrors, name, item.onChangeFn]);
145
+ const handleInputChange = useCallback((_, newInputValue, reason) => {
146
+ setDisplayText(newInputValue);
147
+ if (reason === 'input') {
148
+ // User is typing → trigger debounced API search
149
+ setSearchQuery(newInputValue);
150
+ }
151
+ if (reason === 'clear') {
152
+ // User clicked the clear × → reset everything
153
+ setSearchQuery('');
154
+ setOptions([]);
155
+ setSelectedOption(null);
156
+ }
157
+ // 'reset' fires when MUI sets the input text after an option is selected
158
+ // — no search should trigger here
159
+ }, []);
160
+ // ── Resolved Autocomplete value ───────────────────────────────────────────
161
+ // Priority: selectedOption (if matches form value) → loaded options → null
162
+ const resolvedValue = useMemo(() => {
163
+ if (!formValue)
164
+ return null;
165
+ const fv = String(formValue);
166
+ if (selectedOption && String(selectedOption.value) === fv)
167
+ return selectedOption;
168
+ return options.find((o) => String(o.value) === fv) ?? null;
169
+ }, [formValue, selectedOption, options]);
170
+ // ── noOptionsText ─────────────────────────────────────────────────────────
171
+ const noOptionsText = useMemo(() => {
172
+ if (searchQuery.length < minSearchLength) {
173
+ return `Type at least ${minSearchLength} character${minSearchLength === 1 ? '' : 's'} to search`;
174
+ }
175
+ return fetchError ?? 'No results found';
176
+ }, [searchQuery, minSearchLength, fetchError]);
177
+ // ── Render ────────────────────────────────────────────────────────────────
178
+ return (jsx(Controller, { control: control, name: name, render: ({ field: { ref, onBlur } }) => (jsxs(Fragment, { children: [renderLabel(variant, props), jsx(Autocomplete, { ref: ref, value: resolvedValue, inputValue: displayText, onInputChange: handleInputChange, onChange: handleChange, onBlur: onBlur, options: options, getOptionLabel: getOptionLabel, isOptionEqualToValue: isOptionEqualToValue,
179
+ // Options come pre-filtered from the server — disable client-side filtering
180
+ filterOptions: (x) => x, loading: isLoading, disabled: disable, size: "small", noOptionsText: noOptionsText, sx: {
61
181
  '& .MuiAutocomplete-input': {
62
182
  padding: '0px 0px 0px 5px !important',
63
183
  },
64
- '& .css-erkti9-MuiFormLabel-root-MuiInputLabel-root ': {
184
+ '& .css-erkti9-MuiFormLabel-root-MuiInputLabel-root': {
65
185
  top: '-5px',
66
186
  },
67
- '& .MuiAutocomplete-option': {
68
- fontSize: '16px',
69
- },
70
- }, disabled: props.item.disable, options: optionsFetched, getOptionLabel: (option) => option.label, renderInput: (params) => {
71
- return (jsx(Tooltip, { title: params.inputProps.value && params.inputProps.value, children: jsx(TextField, { ...params, onChange: (e) => {
72
- setSearchValue(e.target.value);
73
- }, label: variant !== 'standard'
74
- ? `${props.item.label}${props.item.required ? ' *' : ''}`
75
- : '', placeholder: props.item.placeholder }) }));
76
- }, PaperComponent: ({ children }) => (jsx("div", { style: {
77
- background: '#fff',
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: {
79
- fontFamily: 'Roboto-Reg',
80
- fontSize: '11px',
81
- color: '#3651d3',
82
- }, children: ["(", props?.item?.helperText, ")"] })), jsx(FormBottomField, { ...props })] })) }));
187
+ ...itemSx,
188
+ }, slotProps: {
189
+ popper: { sx: { zIndex: 20000 } },
190
+ listbox: { sx: { fontSize: '11px' } },
191
+ }, PaperComponent: ({ children, ...paperProps }) => (jsx(Paper, { elevation: 4, ...paperProps, children: children })), renderInput: (params) => (jsx(Tooltip, { title: resolvedValue?.label ?? '', children: jsx(TextField, { ...params, error: isError && !formValue, label: variant !== 'standard'
192
+ ? `${label}${required ? ' *' : ''}`
193
+ : '', placeholder: placeholder, inputProps: {
194
+ ...params.inputProps,
195
+ 'aria-labelledby': `${name}-label`,
196
+ 'aria-describedby': `${name}-helper ${name}-error`,
197
+ 'aria-required': required ? true : undefined,
198
+ } }) })) }), helperText && (jsx(Typography, { variant: "caption", color: "primary", sx: { mt: 0.25, display: 'block' }, children: helperText })), fetchError && (jsx(Typography, { variant: "caption", color: "error", sx: { mt: 0.25, display: 'block' }, children: fetchError })), jsx(FormBottomField, { ...props })] })) }));
83
199
  };
84
200
 
85
201
  export { SingleSelectSearchApi as default };
@@ -163,6 +163,27 @@ export interface GenericPaginatedGridProps<TData extends object> {
163
163
  column: any;
164
164
  table: any;
165
165
  }) => TableCellProps);
166
+ /**
167
+ * Optional render function for expanded row detail panels.
168
+ * When provided, enables row expansion and renders custom content for each expanded row.
169
+ *
170
+ * ```tsx
171
+ * renderDetailPanel={({ row }) => (
172
+ * <Box sx={{ p: 2 }}>
173
+ * <CustomSubGrid rows={row.original.subRows} />
174
+ * </Box>
175
+ * )}
176
+ * ```
177
+ */
178
+ renderDetailPanel?: (params: {
179
+ row: any;
180
+ table: any;
181
+ }) => React.ReactNode;
182
+ /**
183
+ * Enable row expansion functionality. Auto-enabled if `renderDetailPanel` is provided.
184
+ * Default: false.
185
+ */
186
+ enableExpanding?: boolean;
166
187
  }
167
- declare function GenericPaginatedGrid<TData extends object>({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize, exportFilename, tableHeight, tableMinHeight, tableMaxHeight, autoFillViewport, layoutMode, uiDensity, uiDensityOptions, pageSizeOptions, headerBgColor, headerMinHeight, headerMaxHeight, headerMaxLines, headerFontSize, bodyFontSize, maxVisibleFilters, muiTableBodyCellProps: gridBodyCellProps, muiTableHeadCellProps: gridHeadCellProps, }: GenericPaginatedGridProps<TData>): import("react/jsx-runtime").JSX.Element;
188
+ declare function GenericPaginatedGrid<TData extends object>({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize, exportFilename, tableHeight, tableMinHeight, tableMaxHeight, autoFillViewport, layoutMode, uiDensity, uiDensityOptions, pageSizeOptions, headerBgColor, headerMinHeight, headerMaxHeight, headerMaxLines, headerFontSize, bodyFontSize, maxVisibleFilters, muiTableBodyCellProps: gridBodyCellProps, muiTableHeadCellProps: gridHeadCellProps, renderDetailPanel, enableExpanding, }: GenericPaginatedGridProps<TData>): import("react/jsx-runtime").JSX.Element;
168
189
  export default GenericPaginatedGrid;
@@ -221,7 +221,7 @@ const PaginationFooter = ({ pageIndex, pageSize, totalRecords, isFetching, isLoa
221
221
  }, children: pageIndex + 1 }), jsx(Tooltip, { title: "Next page", children: jsx("span", { children: jsx(IconButton, { size: "small", onClick: onNext, disabled: !canNext, sx: { p: 0.5 }, children: jsx(ChevronRightIcon, { sx: { fontSize: density.footerIconSize } }) }) }) }), jsx(Tooltip, { title: "Last page", children: jsx("span", { children: jsx(IconButton, { size: "small", onClick: onLast, disabled: !canNext, sx: { p: 0.5 }, children: jsx(LastPageIcon, { sx: { fontSize: density.footerIconSize } }) }) }) })] })] }));
222
222
  };
223
223
  // ─── GenericPaginatedGrid ─────────────────────────────────────────────────────
224
- function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize = 10000, exportFilename = 'export', tableHeight, tableMinHeight = '300px', tableMaxHeight, autoFillViewport = true, layoutMode = 'grid', uiDensity = 'default', uiDensityOptions, pageSizeOptions = [1000, 5000, 10000], headerBgColor, headerMinHeight, headerMaxHeight, headerMaxLines, headerFontSize, bodyFontSize, maxVisibleFilters = 4, muiTableBodyCellProps: gridBodyCellProps, muiTableHeadCellProps: gridHeadCellProps, }) {
224
+ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize = 10000, exportFilename = 'export', tableHeight, tableMinHeight = '300px', tableMaxHeight, autoFillViewport = true, layoutMode = 'grid', uiDensity = 'default', uiDensityOptions, pageSizeOptions = [1000, 5000, 10000], headerBgColor, headerMinHeight, headerMaxHeight, headerMaxLines, headerFontSize, bodyFontSize, maxVisibleFilters = 4, muiTableBodyCellProps: gridBodyCellProps, muiTableHeadCellProps: gridHeadCellProps, renderDetailPanel, enableExpanding = !!renderDetailPanel, }) {
225
225
  const densityTokens = useMemo(() => ({ ...UI_DENSITY_PRESETS[uiDensity], ...uiDensityOptions }), [uiDensity, uiDensityOptions]);
226
226
  const resolvedHeaderMinHeight = toCssSize(headerMinHeight, uiDensity === 'compact' ? '34px' : '40px');
227
227
  const resolvedHeaderMaxHeight = toCssSize(headerMaxHeight, uiDensity === 'compact' ? '56px' : '72px');
@@ -464,6 +464,8 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
464
464
  enableColumnActions: false,
465
465
  enableColumnPinning: true,
466
466
  columnResizeMode: 'onChange',
467
+ enableExpanding,
468
+ renderDetailPanel,
467
469
  enableFilters: false,
468
470
  enableGlobalFilter: true,
469
471
  enableDensityToggle: true,
@@ -54,3 +54,18 @@ export declare const orderColumns: TPColumnDef<OrderRow>[];
54
54
  export declare const orderFilterDefs: ServerFilterDef[];
55
55
  export declare const orderDefaultFilters: Record<string, string>;
56
56
  export declare function fetchOrderPage(filters: Record<string, string>, pageIndex: number, pageSize?: number): Promise<PagedResult<OrderRow>>;
57
+ export interface OrderLineItem {
58
+ itemId: number;
59
+ productCode: string;
60
+ productName: string;
61
+ quantity: number;
62
+ unitPrice: number;
63
+ total: number;
64
+ }
65
+ export interface ExpandableOrderRow extends OrderRow {
66
+ lineItems: OrderLineItem[];
67
+ }
68
+ export declare const expandableOrderColumns: TPColumnDef<ExpandableOrderRow>[];
69
+ export declare const expandableOrderFilterDefs: ServerFilterDef[];
70
+ export declare const expandableOrderDefaultFilters: Record<string, string>;
71
+ export declare function fetchExpandableOrderPage(filters: Record<string, string>, pageIndex: number, pageSize?: number): Promise<PagedResult<ExpandableOrderRow>>;
@@ -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.esm13.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 DateRangePicker } from '../../../../../_virtual/index.esm6.js';
1
+ import { __exports as DateRangePicker } 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 requireDateRange } from '../DateRange/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DayCell } from '../../../../../_virtual/index.esm11.js';
1
+ import { __exports as DayCell } 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 requireClassnames } from '../../../../classnames/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DefinedRange } from '../../../../../_virtual/index.esm7.js';
1
+ import { __exports as DefinedRange } 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 requireStyles } from '../../styles.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as InputRangeField } from '../../../../../_virtual/index.esm14.js';
1
+ import { __exports as InputRangeField } 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
 
@@ -1,4 +1,4 @@
1
- import { __exports as Month } from '../../../../../_virtual/index.esm12.js';
1
+ import { __exports as Month } from '../../../../../_virtual/index.esm13.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",
3
- "version": "1.3.16",
3
+ "version": "1.3.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "React form components library built with React Hook Form and Yup",