tp-react-elements 3.0.14 → 3.0.15
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.esm6.js +2 -2
- package/dist/_virtual/index.esm7.js +2 -2
- package/dist/components/Form/FormRender.esm.js +7 -7
- package/dist/components/FormComponents/index.esm.js +11 -28
- package/dist/components/PaginatedGrid/GenericPaginatedGrid.d.ts +17 -9
- package/dist/components/PaginatedGrid/GenericPaginatedGrid.esm.js +2 -2
- package/dist/node_modules/react-date-range/dist/components/DateRange/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +1 -1
- package/package.json +1 -1
|
@@ -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 DefinedRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DefinedRange as __exports };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import require$$0__default, { lazy, Suspense } from 'react';
|
|
3
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';
|
|
11
4
|
import SingleSelect from '../FormComponents/Select/SingleSelect.esm.js';
|
|
12
5
|
import MultiSelectAutocomplete from '../FormComponents/Select/MultiSelectAutocomplete.esm.js';
|
|
13
6
|
import SingleSelectNonAutoComplete from '../FormComponents/Select/SingleSelectNonAutoComplete.esm.js';
|
|
@@ -18,6 +11,13 @@ import DateRangePickerComponent from '../DateRangePicker/DateRangePicker.esm.js'
|
|
|
18
11
|
import RichTextEditorWrapper from '../FormComponents/RichTextEditor/RichTextEditorWrapper.esm.js';
|
|
19
12
|
import SingleSelectSearchApi from '../FormComponents/Select/SingleSelectSearchApi.esm.js';
|
|
20
13
|
import DatetimepickerWrapper from '../FormComponents/DatePicker/DatetimepickerWrapper.esm.js';
|
|
14
|
+
import FormTextAreaField from '../FormComponents/FormTextAreaField/FormTextAreaField.esm.js';
|
|
15
|
+
import FormRadioGroup from '../FormComponents/FormRadioGroup/FormRadioGroup.esm.js';
|
|
16
|
+
import FormCheckBoxGroup from '../FormComponents/FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
17
|
+
import FormNumberFieldDecimal from '../FormComponents/FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
18
|
+
import FormNumberField from '../FormComponents/FormNumberField/FormNumberField.esm.js';
|
|
19
|
+
import PasswordField from '../FormComponents/PasswordField/PasswordField.esm.js';
|
|
20
|
+
import FormTextField from '../FormComponents/FormTextField/FormTextField.esm.js';
|
|
21
21
|
|
|
22
22
|
// Lazy-loaded heavy components
|
|
23
23
|
// const RichTextEditorWrapper = lazy(() =>
|
|
@@ -1,8 +1,3 @@
|
|
|
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
1
|
export { default as FormCheckBox } from './FormCheckBox/FormCheckBox.esm.js';
|
|
7
2
|
export { default as SingleSelect } from './Select/SingleSelect.esm.js';
|
|
8
3
|
export { default as SingleSelectNonAutoComplete } from './Select/SingleSelectNonAutoComplete.esm.js';
|
|
@@ -10,33 +5,21 @@ export { default as SingleSelectSearchApi } from './Select/SingleSelectSearchApi
|
|
|
10
5
|
export { default as MultiSelectV1 } from './Select/MultiSelectv1.esm.js';
|
|
11
6
|
export { default as MultiSelectTable } from './Select/MultiSelectTable.esm.js';
|
|
12
7
|
export { default as SearchableSelect } from './Select/SearchableSelect.esm.js';
|
|
13
|
-
export { default as FormCheckBoxGroup } from './FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
14
|
-
export { default as FormRadioGroup } from './FormRadioGroup/FormRadioGroup.esm.js';
|
|
15
8
|
export { default as DatepickerWrapperV2 } from './DatePicker/DatepickerWrapperV2.esm.js';
|
|
16
|
-
export { default as Monthpickerrender } from './DatePicker/Monthpickerrender.esm.js';
|
|
17
|
-
import 'react/jsx-runtime';
|
|
18
|
-
import 'react';
|
|
19
|
-
import '@mui/material';
|
|
20
|
-
import '@mui/icons-material/CalendarToday';
|
|
21
|
-
import '@mui/icons-material/ChevronLeft';
|
|
22
|
-
import '@mui/icons-material/ChevronRight';
|
|
23
|
-
import 'react-hook-form';
|
|
24
9
|
export { default as FormBottomField } from './FormBottomField/FormBottomField.esm.js';
|
|
25
|
-
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
10
|
+
export { default as FormCheckBoxGroup } from './FormCheckBoxGroup/FormCheckBoxGroup.esm.js';
|
|
11
|
+
export { default as FormErrorField } from './FormErrorField/FormErrorField.esm.js';
|
|
12
|
+
export { default as FormNumberField } from './FormNumberField/FormNumberField.esm.js';
|
|
13
|
+
export { default as FormNumberFieldDecimal } from './FormNumberField/FormNumberFieldDecimal.esm.js';
|
|
14
|
+
export { default as FormRadioGroup } from './FormRadioGroup/FormRadioGroup.esm.js';
|
|
28
15
|
export { default as FormRenderFileUpload } from './FileUpload/FormRenderFileUpload.esm.js';
|
|
29
16
|
export { default as FormRenderMultiFileUpload } from './FileUpload/FormRenderMultiFileUpload.esm.js';
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import '@mui/icons-material/NavigateBefore';
|
|
33
|
-
import '@mui/icons-material/NavigateNext';
|
|
34
|
-
import '@mui/icons-material/Delete';
|
|
35
|
-
import '@mui/icons-material/UploadFile';
|
|
36
|
-
import '@mui/icons-material/PictureAsPdf';
|
|
37
|
-
import '@mui/icons-material/TableChart';
|
|
38
|
-
import '@mui/icons-material/Description';
|
|
39
|
-
export { default as FormErrorField } from './FormErrorField/FormErrorField.esm.js';
|
|
17
|
+
export { default as FormTextAreaField } from './FormTextAreaField/FormTextAreaField.esm.js';
|
|
18
|
+
export { default as FormTextField } from './FormTextField/FormTextField.esm.js';
|
|
40
19
|
export { default as HelperText } from './HelperText/HelperText.esm.js';
|
|
20
|
+
export { default as Monthpickerrender } from './DatePicker/Monthpickerrender.esm.js';
|
|
21
|
+
export { default as PasswordField } from './PasswordField/PasswordField.esm.js';
|
|
41
22
|
export { default as RichTextEditor } from './RichTextEditor/RichTextEditor.esm.js';
|
|
42
23
|
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';
|
|
@@ -37,10 +37,15 @@ export interface GenericPaginatedGridProps<TData extends object> {
|
|
|
37
37
|
*/
|
|
38
38
|
columns: TPColumnDef<TData>[];
|
|
39
39
|
/**
|
|
40
|
-
* Async function called on every page/filter change.
|
|
41
|
-
* Receives the current flat filter map
|
|
40
|
+
* Async function called on every page/filter/page-size change.
|
|
41
|
+
* Receives the current flat filter map, the 0-based page index, and the
|
|
42
|
+
* current `pageSize` (whatever `pageSize`/`pageSizeOptions`/`batchSize`
|
|
43
|
+
* resolved to, including the user's latest "Rows per page" selection) so
|
|
44
|
+
* the request can ask the backend for exactly that many rows. Existing
|
|
45
|
+
* implementations that only declare the first two parameters keep working
|
|
46
|
+
* unchanged — the third argument is simply ignored by them, same as before.
|
|
42
47
|
*/
|
|
43
|
-
fetchPage: (filters: Record<string, string>, pageIndex: number) => Promise<PagedResult<TData>>;
|
|
48
|
+
fetchPage: (filters: Record<string, string>, pageIndex: number, pageSize: number) => Promise<PagedResult<TData>>;
|
|
44
49
|
/** Base react-query cache key. */
|
|
45
50
|
queryKey: unknown[];
|
|
46
51
|
/** Server-side filter chip definitions. */
|
|
@@ -123,12 +128,15 @@ export interface GenericPaginatedGridProps<TData extends object> {
|
|
|
123
128
|
* Initial "Rows per page" value, shown in the footer before the user touches the dropdown.
|
|
124
129
|
*
|
|
125
130
|
* The grid never slices rows client-side (`manualPagination: true`, no row model) — whatever
|
|
126
|
-
* `fetchPage` resolves with for a page **is** that page, shown in full.
|
|
127
|
-
*
|
|
128
|
-
* `fetchPage`
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
131
|
+
* `fetchPage` resolves with for a page **is** that page, shown in full. The current value
|
|
132
|
+
* (initial `pageSize`, or whatever the user picks from the footer dropdown afterward) is
|
|
133
|
+
* passed to `fetchPage` as its third argument and is part of the react-query cache key, so
|
|
134
|
+
* picking a new value re-fetches that page at the new size — `fetchPage` should ask the
|
|
135
|
+
* backend for that many rows per call. Implementations written before this argument existed
|
|
136
|
+
* simply ignore it and keep behaving exactly as before. The two exist separately only because
|
|
137
|
+
* `batchSize` doubles as "rows per fetch" documentation elsewhere; use `pageSize` when you
|
|
138
|
+
* want the initial dropdown value to be authoritative without reinterpreting `batchSize`'s
|
|
139
|
+
* meaning at every call site.
|
|
132
140
|
*
|
|
133
141
|
* Default: `batchSize` (unchanged behaviour — identical to how the initial page size worked
|
|
134
142
|
* before this prop existed). If this value isn't already in `pageSizeOptions`, it's folded in
|
|
@@ -466,8 +466,8 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
466
466
|
const resolvedHeight = tableHeight || (shouldAutoFill ? autoHeight : undefined) || tableMinHeight;
|
|
467
467
|
// ── Data fetching ──────────────────────────────────────────────────────────
|
|
468
468
|
const { data, isLoading, isError, isFetching, refetch } = useQuery({
|
|
469
|
-
queryKey: [...queryKey, filterValues, pagination.pageIndex],
|
|
470
|
-
queryFn: () => fetchPage(filterValues, pagination.pageIndex),
|
|
469
|
+
queryKey: [...queryKey, filterValues, pagination.pageIndex, pagination.pageSize],
|
|
470
|
+
queryFn: () => fetchPage(filterValues, pagination.pageIndex, pagination.pageSize),
|
|
471
471
|
placeholderData: keepPreviousData,
|
|
472
472
|
staleTime: 30000,
|
|
473
473
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateRange } 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 requireCalendar } from '../Calendar/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DefinedRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DefinedRange } 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 requireStyles } from '../../styles.esm.js';
|