tp-react-elements 2.0.5 → 3.0.0
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.esm13.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/_virtual/index.esm6.js +2 -2
- package/dist/_virtual/index.esm7.js +2 -2
- package/dist/components/Button/Button.esm.js +9 -5
- package/dist/components/DeleteComponent/DeleteField.esm.js +20 -14
- package/dist/components/Form/FormActiveSwitch.esm.js +5 -1
- package/dist/components/Form/FormRender.esm.js +9 -9
- package/dist/components/Form/FormRenderWrapper.esm.js +2 -2
- package/dist/components/FormComponents/DatePicker/Monthpickerrender.esm.js +6 -4
- package/dist/components/FormComponents/FileUpload/MultiFileWithPreview.esm.js +38 -6
- package/dist/components/FormComponents/FormCheckBoxGroup/FormCheckBoxGroup.esm.js +11 -8
- package/dist/components/FormComponents/FormRadioGroup/FormRadioGroup.esm.js +14 -12
- package/dist/components/FormComponents/Select/MultiSelectTable.esm.js +176 -160
- package/dist/components/FormComponents/Select/MultiSelectv1.esm.js +2 -2
- package/dist/components/FormComponents/index.esm.js +10 -24
- package/dist/components/ModalField/ConfirmationDialog.esm.js +37 -37
- package/dist/components/ModalField/ModalField.esm.js +19 -16
- package/dist/components/PaginatedGrid/GenericPaginatedGrid.d.ts +31 -2
- package/dist/components/PaginatedGrid/GenericPaginatedGrid.esm.js +156 -32
- package/dist/components/PaginatedGrid/types.d.ts +25 -0
- package/dist/components/SelectField/MultiSelectFieldComponent.esm.js +19 -21
- package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/DateRange/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/DateRangePicker/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/DayCell/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +3 -3
- package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +3 -3
- package/dist/node_modules/react-list/react-list.esm.js +2 -2
- package/package.json +2 -2
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo, useState, useRef, useLayoutEffect, useCallback } from 'react';
|
|
3
|
-
import * as XLSX from 'xlsx-js-style';
|
|
2
|
+
import { useMemo, useState, useRef, useLayoutEffect, useCallback, useEffect } from 'react';
|
|
4
3
|
import { MRT_ToggleGlobalFilterButton, MRT_ShowHideColumnsButton, MRT_ToggleDensePaddingButton, MRT_ToggleFullScreenButton, useMaterialReactTable, MaterialReactTable } from 'material-react-table';
|
|
5
4
|
import { useQuery, keepPreviousData } from '@tanstack/react-query';
|
|
6
|
-
import { Box, Tooltip, IconButton, GlobalStyles, Typography, Select, MenuItem, CircularProgress } from '@mui/material';
|
|
5
|
+
import { Box, Tooltip, IconButton, GlobalStyles, Typography, Select, MenuItem, Skeleton, CircularProgress } from '@mui/material';
|
|
7
6
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
8
7
|
import FileDownloadIcon from '@mui/icons-material/FileDownload';
|
|
9
8
|
import FirstPageIcon from '@mui/icons-material/FirstPage';
|
|
@@ -11,6 +10,7 @@ import LastPageIcon from '@mui/icons-material/LastPage';
|
|
|
11
10
|
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
12
11
|
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
13
12
|
import DynamicFilterBar from './DynamicFilterBar.esm.js';
|
|
13
|
+
import { getXLSX } from '../../utils/Constants/xlsx-js-style.esm.js';
|
|
14
14
|
|
|
15
15
|
const UI_DENSITY_PRESETS = {
|
|
16
16
|
default: {
|
|
@@ -194,27 +194,60 @@ const OverlayLoader = ({ message }) => (jsxs(Box, { sx: {
|
|
|
194
194
|
bgcolor: 'rgba(255,255,255,0.80)', backdropFilter: 'blur(2px)',
|
|
195
195
|
zIndex: 10, gap: 1.5,
|
|
196
196
|
}, children: [jsx(CircularProgress, { size: 50, thickness: 4 }), jsx(Typography, { variant: "body2", color: "text.secondary", fontWeight: 500, children: message })] }));
|
|
197
|
-
|
|
197
|
+
// ─── Internal: skeleton loader (initial load — no data on screen yet) ────────
|
|
198
|
+
const SkeletonOverlay = ({ columnCount, rowCount = 10, }) => (jsx(Box, { sx: {
|
|
199
|
+
position: 'absolute', inset: 0,
|
|
200
|
+
display: 'flex', flexDirection: 'column',
|
|
201
|
+
bgcolor: 'background.paper',
|
|
202
|
+
zIndex: 10, p: 1.5, gap: 1,
|
|
203
|
+
overflow: 'hidden',
|
|
204
|
+
}, children: Array.from({ length: rowCount }).map((_, rowIdx) => (jsx(Box, { sx: { display: 'flex', gap: 1.5 }, children: Array.from({ length: Math.max(columnCount, 1) }).map((_, colIdx) => (jsx(Skeleton, { variant: "rounded", height: 28, sx: { flex: 1, minWidth: 0 }, animation: "wave" }, colIdx))) }, rowIdx))) }));
|
|
205
|
+
const useResponsiveTier = (tabletBreakpoint, mobileBreakpoint, enabled) => {
|
|
206
|
+
const [tier, setTier] = useState('desktop');
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
if (!enabled || typeof window === 'undefined') {
|
|
209
|
+
setTier('desktop');
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const mqlTablet = window.matchMedia(`(max-width: ${tabletBreakpoint}px)`);
|
|
213
|
+
const mqlMobile = window.matchMedia(`(max-width: ${mobileBreakpoint}px)`);
|
|
214
|
+
const update = () => {
|
|
215
|
+
setTier(mqlMobile.matches ? 'mobile' : mqlTablet.matches ? 'tablet' : 'desktop');
|
|
216
|
+
};
|
|
217
|
+
update();
|
|
218
|
+
mqlTablet.addEventListener('change', update);
|
|
219
|
+
mqlMobile.addEventListener('change', update);
|
|
220
|
+
return () => {
|
|
221
|
+
mqlTablet.removeEventListener('change', update);
|
|
222
|
+
mqlMobile.removeEventListener('change', update);
|
|
223
|
+
};
|
|
224
|
+
}, [tabletBreakpoint, mobileBreakpoint, enabled]);
|
|
225
|
+
return enabled ? tier : 'desktop';
|
|
226
|
+
};
|
|
227
|
+
const PaginationFooter = ({ pageIndex, pageSize, totalRecords, isFetching, isLoading, canPrev, canNext, onFirst, onPrev, onNext, onLast, onPageSizeChange, pageSizeOptions, density, gridId, isStacked, }) => {
|
|
198
228
|
const fs = density.footerFontSize;
|
|
199
229
|
const selectH = density.footerMinHeight - 8;
|
|
200
230
|
const startRow = totalRecords === 0 ? 0 : pageIndex * pageSize + 1;
|
|
201
231
|
const endRow = Math.min((pageIndex + 1) * pageSize, totalRecords);
|
|
202
232
|
return (jsxs(Box, { sx: {
|
|
203
|
-
display: 'flex',
|
|
233
|
+
display: 'flex',
|
|
234
|
+
flexDirection: isStacked ? 'column' : 'row',
|
|
235
|
+
alignItems: isStacked ? 'stretch' : 'center',
|
|
236
|
+
justifyContent: isStacked ? 'center' : 'flex-end',
|
|
204
237
|
gap: { xs: 1, md: 2 }, px: 1.5, py: density.footerPaddingY,
|
|
205
238
|
borderTop: '1px solid', borderColor: 'divider',
|
|
206
239
|
bgcolor: 'background.paper', flexWrap: 'wrap',
|
|
207
240
|
minHeight: density.footerMinHeight,
|
|
208
241
|
flexShrink: 0,
|
|
209
|
-
}, children: [jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.75 }, children: [jsx(Typography, { sx: { fontSize: fs }, color: "text.secondary", noWrap: true, children: "Rows per page:" }), jsx(Select, { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), inputProps: { id: `${gridId}_page_size_select` }, size: "small", variant: "outlined", sx: {
|
|
242
|
+
}, children: [jsxs(Box, { sx: { display: 'flex', alignItems: 'center', justifyContent: isStacked ? 'center' : 'flex-start', gap: 0.75 }, children: [jsx(Typography, { sx: { fontSize: fs }, color: "text.secondary", noWrap: true, children: "Rows per page:" }), jsx(Select, { value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), inputProps: { id: `${gridId}_page_size_select` }, size: "small", variant: "outlined", sx: {
|
|
210
243
|
height: selectH, fontSize: fs - 1, minWidth: 72,
|
|
211
244
|
'.MuiSelect-select': { py: '2px !important' },
|
|
212
245
|
'.MuiOutlinedInput-notchedOutline': { borderColor: 'divider' },
|
|
213
|
-
}, children: pageSizeOptions.map((opt) => (jsx(MenuItem, { value: opt, sx: { fontSize: fs - 1 }, children: opt.toLocaleString() }, opt))) })] }), jsx(Typography, { sx: { fontSize: fs }, color: "text.secondary", noWrap: true, children: isLoading || (isFetching && totalRecords === 0)
|
|
246
|
+
}, children: pageSizeOptions.map((opt) => (jsx(MenuItem, { value: opt, sx: { fontSize: fs - 1 }, children: opt.toLocaleString() }, opt))) })] }), jsx(Typography, { sx: { fontSize: fs, textAlign: isStacked ? 'center' : 'left' }, color: "text.secondary", noWrap: true, children: isLoading || (isFetching && totalRecords === 0)
|
|
214
247
|
? 'Loading…'
|
|
215
248
|
: totalRecords === 0
|
|
216
249
|
? 'No records'
|
|
217
|
-
: `${startRow.toLocaleString()}–${endRow.toLocaleString()} of ${totalRecords.toLocaleString()}` }), jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.25 }, children: [jsx(Tooltip, { title: "First page", children: jsx("span", { children: jsx(IconButton, { id: `${gridId}_first_page_icon`, size: "small", onClick: onFirst, disabled: !canPrev, sx: { p: 0.5 }, children: jsx(FirstPageIcon, { sx: { fontSize: density.footerIconSize } }) }) }) }), jsx(Tooltip, { title: "Previous page", children: jsx("span", { children: jsx(IconButton, { id: `${gridId}_prev_page_icon`, size: "small", onClick: onPrev, disabled: !canPrev, sx: { p: 0.5 }, children: jsx(ChevronLeftIcon, { sx: { fontSize: density.footerIconSize } }) }) }) }), jsx(Typography, { fontWeight: 600, sx: {
|
|
250
|
+
: `${startRow.toLocaleString()}–${endRow.toLocaleString()} of ${totalRecords.toLocaleString()}` }), jsxs(Box, { sx: { display: 'flex', alignItems: 'center', justifyContent: isStacked ? 'center' : 'flex-start', gap: 0.25 }, children: [jsx(Tooltip, { title: "First page", children: jsx("span", { children: jsx(IconButton, { id: `${gridId}_first_page_icon`, size: "small", onClick: onFirst, disabled: !canPrev, sx: { p: 0.5 }, children: jsx(FirstPageIcon, { sx: { fontSize: density.footerIconSize } }) }) }) }), jsx(Tooltip, { title: "Previous page", children: jsx("span", { children: jsx(IconButton, { id: `${gridId}_prev_page_icon`, size: "small", onClick: onPrev, disabled: !canPrev, sx: { p: 0.5 }, children: jsx(ChevronLeftIcon, { sx: { fontSize: density.footerIconSize } }) }) }) }), jsx(Typography, { fontWeight: 600, sx: {
|
|
218
251
|
mx: 0.5,
|
|
219
252
|
minWidth: density.footerMinHeight - 12,
|
|
220
253
|
height: density.footerMinHeight - 12,
|
|
@@ -224,13 +257,29 @@ const PaginationFooter = ({ pageIndex, pageSize, totalRecords, isFetching, isLoa
|
|
|
224
257
|
}, children: pageIndex + 1 }), jsx(Tooltip, { title: "Next page", children: jsx("span", { children: jsx(IconButton, { id: `${gridId}_next_page_icon`, 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, { id: `${gridId}_last_page_icon`, size: "small", onClick: onLast, disabled: !canNext, sx: { p: 0.5 }, children: jsx(LastPageIcon, { sx: { fontSize: density.footerIconSize } }) }) }) })] })] }));
|
|
225
258
|
};
|
|
226
259
|
// ─── GenericPaginatedGrid ─────────────────────────────────────────────────────
|
|
227
|
-
function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize = 10000, exportFilename = 'export', gridId, tableHeight, tableMinHeight = '300px', tableMaxHeight, autoFillViewport = true, layoutMode = 'grid', uiDensity
|
|
228
|
-
|
|
260
|
+
function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs, defaultFilters, defaultVisibleFilterIds, batchSize = 10000, exportFilename = 'export', gridId, tableHeight, tableMinHeight = '300px', tableMaxHeight, autoFillViewport = true, layoutMode = 'grid', uiDensity, uiDensityOptions, responsiveBreakpoints, disableResponsive = false, pageSizeOptions = [1000, 5000, 10000], showGlobalSearchByDefault = false, showDensityToggle = false, headerBgColor, exportHeaderBgColor, exportHeaderTextColor, headerMinHeight, headerMaxHeight, headerMaxLines, headerFontSize, bodyFontSize, maxVisibleFilters = 4, muiTableBodyCellProps: gridBodyCellProps, muiTableHeadCellProps: gridHeadCellProps, renderDetailPanel, enableExpanding = !!renderDetailPanel, }) {
|
|
261
|
+
// ── Responsive tier detection ────────────────────────────────────────────────
|
|
262
|
+
// Three tiers (desktop / tablet / mobile) drive auto density, a progressively
|
|
263
|
+
// lower filter-chip cap, toolbar wrapping, and a stacked pagination footer —
|
|
264
|
+
// unless the consumer opts out via `disableResponsive` or pins `uiDensity`
|
|
265
|
+
// explicitly (density only).
|
|
266
|
+
const tier = useResponsiveTier(responsiveBreakpoints?.tablet ?? 1024, responsiveBreakpoints?.mobile ?? 640, !disableResponsive);
|
|
267
|
+
const isNarrow = tier !== 'desktop'; // tablet or mobile — density, toolbar wrap
|
|
268
|
+
const isMobileTier = tier === 'mobile'; // mobile only — footer stacking, tightest chip cap
|
|
269
|
+
const resolvedUiDensity = uiDensity ?? (isNarrow ? 'compact' : 'default');
|
|
270
|
+
const effectiveMaxVisibleFilters = disableResponsive
|
|
271
|
+
? maxVisibleFilters
|
|
272
|
+
: tier === 'mobile'
|
|
273
|
+
? Math.min(maxVisibleFilters, 2)
|
|
274
|
+
: tier === 'tablet'
|
|
275
|
+
? Math.min(maxVisibleFilters, 3)
|
|
276
|
+
: maxVisibleFilters;
|
|
277
|
+
const densityTokens = useMemo(() => ({ ...UI_DENSITY_PRESETS[resolvedUiDensity], ...uiDensityOptions }), [resolvedUiDensity, uiDensityOptions]);
|
|
229
278
|
const resolvedGridId = gridId ?? exportFilename;
|
|
230
|
-
const resolvedHeaderMinHeight = toCssSize(headerMinHeight,
|
|
231
|
-
const resolvedHeaderMaxHeight = toCssSize(headerMaxHeight,
|
|
232
|
-
const resolvedHeaderFontSize = toCssSize(headerFontSize ?? densityTokens.headerFontSize,
|
|
233
|
-
const resolvedBodyFontSize = toCssSize(bodyFontSize ?? densityTokens.bodyFontSize,
|
|
279
|
+
const resolvedHeaderMinHeight = toCssSize(headerMinHeight, resolvedUiDensity === 'compact' ? '34px' : '40px');
|
|
280
|
+
const resolvedHeaderMaxHeight = toCssSize(headerMaxHeight, resolvedUiDensity === 'compact' ? '56px' : '72px');
|
|
281
|
+
const resolvedHeaderFontSize = toCssSize(headerFontSize ?? densityTokens.headerFontSize, resolvedUiDensity === 'compact' ? '11px' : '12px');
|
|
282
|
+
const resolvedBodyFontSize = toCssSize(bodyFontSize ?? densityTokens.bodyFontSize, resolvedUiDensity === 'compact' ? '11px' : '12px');
|
|
234
283
|
const tableStyleOverrides = useMemo(() => ({
|
|
235
284
|
// Static rules folded in here so the whole object comes from one useMemo
|
|
236
285
|
// and GlobalStyles receives a stable reference unless these props change.
|
|
@@ -239,6 +288,17 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
239
288
|
'.tp-gpg-root button[aria-label="Move"]': { display: 'none !important' },
|
|
240
289
|
'.tp-gpg-root [data-column-id="mrt-row-spacer"]': { display: 'none !important' },
|
|
241
290
|
'.tp-gpg-root .Mui-TableHeadCell-ColumnSpacer': { display: 'none !important' },
|
|
291
|
+
// Visible horizontal scrollbar — touch devices (iOS) hide scrollbars by
|
|
292
|
+
// default, leaving no affordance that a horizontally-overflowing table
|
|
293
|
+
// (common on narrow viewports) can be scrolled.
|
|
294
|
+
'.tp-gpg-root .MuiTableContainer-root::-webkit-scrollbar': {
|
|
295
|
+
height: 6,
|
|
296
|
+
width: 6,
|
|
297
|
+
},
|
|
298
|
+
'.tp-gpg-root .MuiTableContainer-root::-webkit-scrollbar-thumb': {
|
|
299
|
+
backgroundColor: 'rgba(0,0,0,0.25)',
|
|
300
|
+
borderRadius: 4,
|
|
301
|
+
},
|
|
242
302
|
...buildHeaderGlobalStyles(resolvedHeaderMinHeight, resolvedHeaderMaxHeight, resolvedHeaderFontSize, headerBgColor),
|
|
243
303
|
...buildBodyGlobalStyles(resolvedBodyFontSize),
|
|
244
304
|
}), [
|
|
@@ -333,14 +393,15 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
333
393
|
const totalRecords = data?.totalRecords ?? 0;
|
|
334
394
|
// ── Strip custom props + auto-inject filterFn before passing to MRT ──────────
|
|
335
395
|
//
|
|
336
|
-
// `TPColumnDef` extends `MRT_ColumnDef` with `filterType` and
|
|
337
|
-
// MRT doesn't know these props, so we strip them here. We
|
|
338
|
-
// appropriate `filterFn` automatically so callers never
|
|
396
|
+
// `TPColumnDef` extends `MRT_ColumnDef` with `filterType`, `options`, and
|
|
397
|
+
// `getSearchText`. MRT doesn't know these props, so we strip them here. We
|
|
398
|
+
// also inject the appropriate `filterFn` automatically so callers never
|
|
399
|
+
// have to write one.
|
|
339
400
|
const processedColumns = useMemo(() => {
|
|
340
401
|
const allowGrow = layoutMode === 'grid' || layoutMode === 'semantic';
|
|
341
402
|
return columns.map((col) => {
|
|
342
403
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
343
|
-
const { filterType, options, ...mrtCol } = col;
|
|
404
|
+
const { filterType, options, getSearchText, ...mrtCol } = col;
|
|
344
405
|
if (allowGrow && mrtCol.grow === undefined) {
|
|
345
406
|
mrtCol.grow = true;
|
|
346
407
|
}
|
|
@@ -370,6 +431,41 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
370
431
|
return mrtCol;
|
|
371
432
|
});
|
|
372
433
|
}, [columns, layoutMode]);
|
|
434
|
+
// ── Global Search: match formatted `Cell` text, not just the raw value ───────
|
|
435
|
+
//
|
|
436
|
+
// MRT's built-in global filter always compares against `row.getValue(columnId)`
|
|
437
|
+
// (the raw accessor value) and never against what `Cell` renders. A column
|
|
438
|
+
// whose `Cell` formats/maps that value for display (dates, currency, status
|
|
439
|
+
// labels, …) is therefore unsearchable by the text a user actually sees —
|
|
440
|
+
// typing "01 Jul 2026" finds nothing because the raw value is really
|
|
441
|
+
// "2026-07-01T00:00:00". `getSearchText` on `TPColumnDef` lets a column opt
|
|
442
|
+
// in to being matched against its formatted representation instead.
|
|
443
|
+
const searchTextGetters = useMemo(() => {
|
|
444
|
+
const map = new Map();
|
|
445
|
+
columns.forEach((col) => {
|
|
446
|
+
const getSearchText = col.getSearchText;
|
|
447
|
+
if ('accessorKey' in col && col.accessorKey && typeof getSearchText === 'function') {
|
|
448
|
+
map.set(col.accessorKey, getSearchText);
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
return map;
|
|
452
|
+
}, [columns]);
|
|
453
|
+
const tpGlobalSearchFn = useCallback((row, columnId, filterValue) => {
|
|
454
|
+
const needle = String(filterValue ?? '').trim().toLowerCase();
|
|
455
|
+
if (!needle)
|
|
456
|
+
return true;
|
|
457
|
+
const getSearchText = searchTextGetters.get(columnId);
|
|
458
|
+
const value = getSearchText ? getSearchText(row.original) : row.getValue(columnId);
|
|
459
|
+
if (value === null || value === undefined)
|
|
460
|
+
return false;
|
|
461
|
+
return String(value).toLowerCase().includes(needle);
|
|
462
|
+
}, [searchTextGetters]);
|
|
463
|
+
// Stable references for the two table options below — recreating either
|
|
464
|
+
// per render would defeat the memoization on every other MRT callback
|
|
465
|
+
// (see docs/arch-performance.mdx: all function/object props passed into
|
|
466
|
+
// useMaterialReactTable must be memoized).
|
|
467
|
+
const tpFilterFns = useMemo(() => ({ tpGlobalSearch: tpGlobalSearchFn }), [tpGlobalSearchFn]);
|
|
468
|
+
const getColumnCanGlobalFilter = useCallback(() => true, []);
|
|
373
469
|
// ── Derive column list for filter chip picker ──────────────────────────────
|
|
374
470
|
//
|
|
375
471
|
// A column is excluded from the "Column Filters" section of Manage Filters
|
|
@@ -407,10 +503,15 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
407
503
|
const handleToggleFilter = useCallback((id) => setVisibleFilterIds((prev) => {
|
|
408
504
|
if (prev.includes(id))
|
|
409
505
|
return prev.filter((v) => v !== id); // always allow remove
|
|
410
|
-
if (prev.length >=
|
|
506
|
+
if (prev.length >= effectiveMaxVisibleFilters)
|
|
411
507
|
return prev; // cap reached — ignore add
|
|
412
508
|
return [...prev, id];
|
|
413
|
-
}), [
|
|
509
|
+
}), [effectiveMaxVisibleFilters]);
|
|
510
|
+
// Trim already-visible chips down to the new cap when the viewport narrows
|
|
511
|
+
// (e.g. resizing from desktop to mobile with 4 chips already shown).
|
|
512
|
+
useEffect(() => {
|
|
513
|
+
setVisibleFilterIds((prev) => prev.length > effectiveMaxVisibleFilters ? prev.slice(0, effectiveMaxVisibleFilters) : prev);
|
|
514
|
+
}, [effectiveMaxVisibleFilters]);
|
|
414
515
|
const handleClearAll = useCallback(() => {
|
|
415
516
|
setFilterValues(defaultFilters);
|
|
416
517
|
setColumnFilters([]);
|
|
@@ -418,7 +519,10 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
418
519
|
setGlobalFilter('');
|
|
419
520
|
setPagination((p) => ({ ...p, pageIndex: 0 }));
|
|
420
521
|
}, [defaultFilters, defaultVisible]);
|
|
421
|
-
const handleExport = useCallback(() => {
|
|
522
|
+
const handleExport = useCallback(async () => {
|
|
523
|
+
// Loaded on demand (and cached) so the xlsx-js-style library is excluded
|
|
524
|
+
// from the initial bundle for consumers who never click Export.
|
|
525
|
+
const XLSX = await getXLSX();
|
|
422
526
|
const dataCols = columns.filter((c) => 'accessorKey' in c && c.accessorKey);
|
|
423
527
|
// xlsx-js-style requires 8-char ARGB (AA + RRGGBB). Prepend full-opacity "FF".
|
|
424
528
|
const toArgb = (hex, fallback = 'FF1565C0') => hex?.startsWith('#') ? 'FF' + hex.slice(1).toUpperCase().padEnd(6, '0') : fallback;
|
|
@@ -516,15 +620,20 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
516
620
|
// ── Memoized toolbar render functions ─────────────────────────────────────
|
|
517
621
|
// Defined with useCallback so MRT receives stable references and does not
|
|
518
622
|
// re-render the toolbar on every isFetching / data update cycle.
|
|
519
|
-
const renderTopToolbarCustomActions = useCallback(() => (jsxs(Box, { sx: {
|
|
520
|
-
|
|
623
|
+
const renderTopToolbarCustomActions = useCallback(() => (jsxs(Box, { sx: {
|
|
624
|
+
display: 'flex',
|
|
625
|
+
alignItems: 'center',
|
|
626
|
+
flexWrap: isNarrow ? 'wrap' : 'nowrap',
|
|
627
|
+
flex: 1, minWidth: 0, pr: 1, gap: 0.5,
|
|
628
|
+
}, children: [jsxs(Box, { sx: { display: 'flex', alignItems: 'center', flexShrink: 0, gap: 0.25 }, children: [jsx(Tooltip, { title: "Clear filters & refresh", children: jsx("span", { children: jsx(IconButton, { id: `${resolvedGridId}_refresh_icon`, size: "small", onClick: () => { handleClearAll(); refetch(); }, disabled: isFetching, sx: { p: resolvedUiDensity === 'compact' ? 0.35 : 0.5 }, children: jsx(RefreshIcon, { sx: { fontSize: resolvedUiDensity === 'compact' ? 18 : 20 } }) }) }) }), jsx(Tooltip, { title: "Export batch as Excel (.xlsx)", children: jsx("span", { children: jsx(IconButton, { id: `${resolvedGridId}_export_icon`, size: "small", onClick: handleExport, disabled: rows.length === 0 || isFetching, sx: { p: resolvedUiDensity === 'compact' ? 0.35 : 0.5 }, children: jsx(FileDownloadIcon, { sx: { fontSize: resolvedUiDensity === 'compact' ? 18 : 20 } }) }) }) })] }), jsx(Box, { sx: { flex: 1, minWidth: isNarrow ? '100%' : 0 }, children: jsx(DynamicFilterBar, { serverFilterDefs: serverFilterDefs, visibleFilterIds: visibleFilterIds, onToggleFilter: handleToggleFilter, filterValues: filterValues, onFilterValuesChange: handleFilterValuesChange, columnFilters: columnFilters, onColumnFilterChange: setColumnFilters, availableColumns: availableColumns, maxVisibleFilters: effectiveMaxVisibleFilters, uiDensity: resolvedUiDensity, filterChipFontSize: densityTokens.filterChipFontSize, filterChipMinHeight: densityTokens.filterChipMinHeight, filterLabelFontSize: densityTokens.filterLabelFontSize, gridId: resolvedGridId }) })] })), [
|
|
629
|
+
resolvedGridId, isFetching, rows.length, resolvedUiDensity, isNarrow,
|
|
521
630
|
handleClearAll, refetch, handleExport,
|
|
522
631
|
serverFilterDefs, visibleFilterIds, handleToggleFilter,
|
|
523
632
|
filterValues, handleFilterValuesChange, columnFilters, setColumnFilters,
|
|
524
|
-
availableColumns,
|
|
633
|
+
availableColumns, effectiveMaxVisibleFilters, densityTokens, handleToggleFilter,
|
|
525
634
|
]);
|
|
526
|
-
const renderToolbarInternalActions = useCallback(({ table: t }) => (jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.5 }, children: [jsx(MRT_ToggleGlobalFilterButton, { table: t, id: `${resolvedGridId}_global_search_icon` }), jsx(MRT_ShowHideColumnsButton, { table: t, id: `${resolvedGridId}_columns_icon` }), jsx(MRT_ToggleDensePaddingButton, { table: t, id: `${resolvedGridId}_density_icon` }), jsx(MRT_ToggleFullScreenButton, { table: t, id: `${resolvedGridId}_fullscreen_icon` })] })), [resolvedGridId]);
|
|
527
|
-
const renderBottomToolbar = useCallback(({ table: t }) => (jsx(PaginationFooter, { pageIndex: t.getState().pagination.pageIndex, pageSize: t.getState().pagination.pageSize, totalRecords: totalRecords, isFetching: isFetching, isLoading: isLoading, canPrev: t.getCanPreviousPage() && !isFetching, canNext: t.getCanNextPage() && !isFetching, onFirst: () => t.firstPage(), onPrev: () => t.previousPage(), onNext: () => t.nextPage(), onLast: () => t.lastPage(), onPageSizeChange: (s) => t.setPageSize(s), pageSizeOptions: pageSizeOptions, density: densityTokens, gridId: resolvedGridId })), [totalRecords, isFetching, isLoading, pageSizeOptions, densityTokens, resolvedGridId]);
|
|
635
|
+
const renderToolbarInternalActions = useCallback(({ table: t }) => (jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.5 }, children: [jsx(MRT_ToggleGlobalFilterButton, { table: t, id: `${resolvedGridId}_global_search_icon` }), jsx(MRT_ShowHideColumnsButton, { table: t, id: `${resolvedGridId}_columns_icon` }), showDensityToggle && (jsx(MRT_ToggleDensePaddingButton, { table: t, id: `${resolvedGridId}_density_icon` })), jsx(MRT_ToggleFullScreenButton, { table: t, id: `${resolvedGridId}_fullscreen_icon` })] })), [resolvedGridId, showDensityToggle]);
|
|
636
|
+
const renderBottomToolbar = useCallback(({ table: t }) => (jsx(PaginationFooter, { pageIndex: t.getState().pagination.pageIndex, pageSize: t.getState().pagination.pageSize, totalRecords: totalRecords, isFetching: isFetching, isLoading: isLoading, canPrev: t.getCanPreviousPage() && !isFetching, canNext: t.getCanNextPage() && !isFetching, onFirst: () => t.firstPage(), onPrev: () => t.previousPage(), onNext: () => t.nextPage(), onLast: () => t.lastPage(), onPageSizeChange: (s) => t.setPageSize(s), pageSizeOptions: pageSizeOptions, density: densityTokens, gridId: resolvedGridId, isStacked: isMobileTier })), [totalRecords, isFetching, isLoading, pageSizeOptions, densityTokens, resolvedGridId, isMobileTier]);
|
|
528
637
|
// ── Table instance ─────────────────────────────────────────────────────────
|
|
529
638
|
const table = useMaterialReactTable({
|
|
530
639
|
columns: processedColumns,
|
|
@@ -603,7 +712,21 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
603
712
|
enableFilters: true,
|
|
604
713
|
enableColumnFilters: false,
|
|
605
714
|
enableGlobalFilter: true,
|
|
606
|
-
|
|
715
|
+
// Custom global filter (see `tpGlobalSearchFn` above) so columns with a
|
|
716
|
+
// formatting `Cell` are matched by their displayed text, not just the
|
|
717
|
+
// raw accessor value. Registered under `filterFns` and selected by name
|
|
718
|
+
// via `globalFilterFn` — MRT resolves `globalFilterFn` strings against
|
|
719
|
+
// this map rather than accepting a function directly.
|
|
720
|
+
filterFns: tpFilterFns,
|
|
721
|
+
globalFilterFn: 'tpGlobalSearch',
|
|
722
|
+
// MRT's default `getColumnCanGlobalFilter` only allows a column into
|
|
723
|
+
// Global Search when the very first fetched row's raw value happens to
|
|
724
|
+
// be a `string`/`number` — a null/undefined first row silently drops
|
|
725
|
+
// that column from search entirely. Our filterFn already handles
|
|
726
|
+
// null/undefined per-row, so allow every column (columns can still opt
|
|
727
|
+
// out individually via `enableGlobalFilter: false`).
|
|
728
|
+
getColumnCanGlobalFilter,
|
|
729
|
+
enableDensityToggle: showDensityToggle,
|
|
607
730
|
enableFullScreenToggle: true,
|
|
608
731
|
enableHiding: true,
|
|
609
732
|
enableStickyHeader: true,
|
|
@@ -621,6 +744,7 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
621
744
|
minHeight: 0,
|
|
622
745
|
maxHeight: '100%',
|
|
623
746
|
overflow: 'auto',
|
|
747
|
+
WebkitOverflowScrolling: 'touch',
|
|
624
748
|
},
|
|
625
749
|
},
|
|
626
750
|
muiTablePaperProps: {
|
|
@@ -636,10 +760,10 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
636
760
|
muiTopToolbarProps: {
|
|
637
761
|
sx: {
|
|
638
762
|
alignItems: 'center',
|
|
639
|
-
flexWrap: 'nowrap',
|
|
763
|
+
flexWrap: isNarrow ? 'wrap' : 'nowrap',
|
|
640
764
|
minHeight: densityTokens.filterChipMinHeight + 12,
|
|
641
|
-
py:
|
|
642
|
-
'& .MuiIconButton-root': { p:
|
|
765
|
+
py: resolvedUiDensity === 'compact' ? 0.25 : 0.5,
|
|
766
|
+
'& .MuiIconButton-root': { p: resolvedUiDensity === 'compact' ? 0.35 : 0.5 },
|
|
643
767
|
'& .MuiIconButton-root svg': { fontSize: densityTokens.toolbarIconFontSize === 'small' ? 18 : 20 },
|
|
644
768
|
},
|
|
645
769
|
},
|
|
@@ -650,7 +774,7 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
650
774
|
size: 'small',
|
|
651
775
|
variant: 'outlined',
|
|
652
776
|
sx: {
|
|
653
|
-
minWidth:
|
|
777
|
+
minWidth: resolvedUiDensity === 'compact' ? 160 : 200,
|
|
654
778
|
'& .MuiOutlinedInput-root': {
|
|
655
779
|
height: densityTokens.filterChipMinHeight,
|
|
656
780
|
fontSize: densityTokens.filterChipFontSize,
|
|
@@ -700,7 +824,7 @@ function GenericPaginatedGrid({ columns, fetchPage, queryKey, serverFilterDefs,
|
|
|
700
824
|
display: 'flex',
|
|
701
825
|
flexDirection: 'column',
|
|
702
826
|
overflow: 'hidden',
|
|
703
|
-
}, children: [jsx(GlobalStyles, { styles: tableStyleOverrides }), isLoading && jsx(
|
|
827
|
+
}, children: [jsx(GlobalStyles, { styles: tableStyleOverrides }), isLoading && jsx(SkeletonOverlay, { columnCount: processedColumns.length }), !isLoading && isFetching && jsx(OverlayLoader, { message: "Updating data\u2026" }), jsx(Box, { sx: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column', overflow: 'hidden' }, children: jsx(MaterialReactTable, { table: table }) })] }));
|
|
704
828
|
}
|
|
705
829
|
|
|
706
830
|
export { GenericPaginatedGrid as default };
|
|
@@ -75,6 +75,31 @@ export type TPColumnDef<TData extends object = object, TValue = any> = MRT_Colum
|
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
77
|
defaultVisible?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Text/number the Global Search box should match against for this column.
|
|
80
|
+
*
|
|
81
|
+
* MRT's built-in Global Search always matches the raw accessor value
|
|
82
|
+
* (`row.getValue(columnId)`) — **never** what `Cell` renders. So a column
|
|
83
|
+
* whose `Cell` formats or maps the raw value for display (dates, currency,
|
|
84
|
+
* status labels, etc.) becomes unsearchable by the text a user actually
|
|
85
|
+
* sees on screen: typing the formatted text finds nothing because it's
|
|
86
|
+
* being compared against the untouched raw value underneath.
|
|
87
|
+
*
|
|
88
|
+
* Set `getSearchText` to the same formatted representation `Cell` renders,
|
|
89
|
+
* and `GenericPaginatedGrid` will match Global Search against it instead:
|
|
90
|
+
*
|
|
91
|
+
* ```ts
|
|
92
|
+
* {
|
|
93
|
+
* accessorKey: 'InvoiceDate',
|
|
94
|
+
* Cell: ({ cell }) => formatDate(cell.getValue<string>()),
|
|
95
|
+
* getSearchText: (row) => formatDate(row.InvoiceDate), // "01 Jul 2026" now matches
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* Omit when `Cell` is absent or simply displays the raw value unchanged —
|
|
100
|
+
* the raw accessor value is matched by default in that case.
|
|
101
|
+
*/
|
|
102
|
+
getSearchText?: (row: TData) => string | number | null | undefined;
|
|
78
103
|
};
|
|
79
104
|
export interface InvoiceDetail {
|
|
80
105
|
Data_from: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { Box, TextField, FormControlLabel
|
|
2
|
+
import { Tooltip, Box, TextField, FormControlLabel } from '@mui/material';
|
|
3
3
|
import Checkbox from '@mui/material/Checkbox';
|
|
4
4
|
import FormControl from '@mui/material/FormControl';
|
|
5
5
|
import ListItemText from '@mui/material/ListItemText';
|
|
6
6
|
import MenuItem from '@mui/material/MenuItem';
|
|
7
7
|
import Select from '@mui/material/Select';
|
|
8
|
-
import * as
|
|
9
|
-
import { useState, useCallback } from 'react';
|
|
8
|
+
import * as require$$0 from 'react';
|
|
9
|
+
import { useState, useMemo, useCallback } from 'react';
|
|
10
10
|
|
|
11
11
|
const ITEM_HEIGHT = 36;
|
|
12
12
|
const ITEM_PADDING_TOP = 2;
|
|
@@ -16,29 +16,26 @@ const extractValuesToArray = (inputString) => {
|
|
|
16
16
|
return trimmedArray;
|
|
17
17
|
};
|
|
18
18
|
function MultiSelectFieldComponent({ value, options, onChangeFn, disable = false, optionFontSize = '13px', donotEnableMultiselectOrder = false }) {
|
|
19
|
-
const [personName, setPersonName] =
|
|
19
|
+
const [personName, setPersonName] = require$$0.useState(value ? extractValuesToArray(value) : []);
|
|
20
20
|
const [searchText, setSearchText] = useState('');
|
|
21
21
|
const [selectAll, setSelectAll] = useState(false);
|
|
22
|
-
const textfieldRef =
|
|
23
|
-
const containerRef =
|
|
22
|
+
const textfieldRef = require$$0.useRef(null);
|
|
23
|
+
const containerRef = require$$0.useRef(null);
|
|
24
24
|
const fieldValue = value;
|
|
25
|
-
const [savedSortValue, setSavedSortValue] =
|
|
26
|
-
const sortedOptions =
|
|
25
|
+
const [savedSortValue, setSavedSortValue] = require$$0.useState(fieldValue);
|
|
26
|
+
const sortedOptions = require$$0.useMemo(() => {
|
|
27
27
|
const selectedArray = savedSortValue ? savedSortValue.split(',') : [];
|
|
28
28
|
const selectedItems = options.filter((opt) => selectedArray.includes(String(opt.value)));
|
|
29
29
|
const unselectedItems = options.filter((opt) => !selectedArray.includes(String(opt.value)));
|
|
30
30
|
return [...selectedItems, ...unselectedItems];
|
|
31
31
|
}, [options, savedSortValue]);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
}, [sortedOptions, searchText]);
|
|
41
|
-
React.useEffect(() => {
|
|
32
|
+
// Derived directly from sortedOptions/searchText — previously a
|
|
33
|
+
// useState+useEffect pair that duplicated this computation and forced an
|
|
34
|
+
// extra render pass every time either dependency changed.
|
|
35
|
+
const filterOptions = useMemo(() => searchText !== ''
|
|
36
|
+
? sortedOptions.filter((item) => item.label.toLowerCase().includes(searchText.toLowerCase()))
|
|
37
|
+
: sortedOptions, [sortedOptions, searchText]);
|
|
38
|
+
require$$0.useEffect(() => {
|
|
42
39
|
const values = fieldValue ? fieldValue.split(',').filter(Boolean) : [];
|
|
43
40
|
const filterIdStrings = filterOptions.map((item) => String(item.value));
|
|
44
41
|
if (values.length === 0 || filterOptions.length === 0) {
|
|
@@ -57,8 +54,9 @@ function MultiSelectFieldComponent({ value, options, onChangeFn, disable = false
|
|
|
57
54
|
setPersonName(typeof value === 'string' ? value?.split(',') : value);
|
|
58
55
|
onChangeFn((typeof value === 'string' ? value?.split(',') : value).join(','));
|
|
59
56
|
}, [onChangeFn]);
|
|
60
|
-
const selectedOptions = options.filter((item) => fieldValue?.split(',').some((value) => value === item.value));
|
|
61
|
-
const selectedValues = selectedOptions.map((item) => item.label).join(' , ');
|
|
57
|
+
const selectedOptions = useMemo(() => options.filter((item) => fieldValue?.split(',').some((value) => value === item.value)), [options, fieldValue]);
|
|
58
|
+
const selectedValues = useMemo(() => selectedOptions.map((item) => item.label).join(' , '), [selectedOptions]);
|
|
59
|
+
const renderSelectedValue = useCallback(() => (jsx(Tooltip, { title: selectedValues, children: jsx("span", { children: selectedOptions.length > 3 ? `${selectedOptions.length} Selected` : selectedValues }) })), [selectedOptions, selectedValues]);
|
|
62
60
|
return (jsx(Box, { children: jsx(FormControl, { fullWidth: true, ref: containerRef, sx: {
|
|
63
61
|
'& .css-kichxs-MuiFormLabel-root-MuiInputLabel-root,.css-1holvmy': {
|
|
64
62
|
top: '-10px',
|
|
@@ -81,7 +79,7 @@ function MultiSelectFieldComponent({ value, options, onChangeFn, disable = false
|
|
|
81
79
|
if (!donotEnableMultiselectOrder) {
|
|
82
80
|
setSavedSortValue(fieldValue);
|
|
83
81
|
}
|
|
84
|
-
}, renderValue:
|
|
82
|
+
}, renderValue: renderSelectedValue, MenuProps: {
|
|
85
83
|
PaperProps: {
|
|
86
84
|
style: {
|
|
87
85
|
maxHeight: ITEM_HEIGHT * 5.5 + ITEM_PADDING_TOP,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as Calendar } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as Calendar } from '../../../../../_virtual/index.esm6.js';
|
|
2
|
+
import require$$0__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';
|
|
5
5
|
import { __require as requireMonth } from '../Month/index.esm.js';
|
|
@@ -23,7 +23,7 @@ function requireCalendar () {
|
|
|
23
23
|
value: true
|
|
24
24
|
});
|
|
25
25
|
Calendar.default = void 0;
|
|
26
|
-
var _react = _interopRequireWildcard(
|
|
26
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
27
27
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
28
28
|
var _DayCell = requireDayCell();
|
|
29
29
|
var _Month = _interopRequireDefault(requireMonth());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as DateInput } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as DateInput } from '../../../../../_virtual/index.esm14.js';
|
|
2
|
+
import require$$0__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';
|
|
5
5
|
import { __require as requireDateFns } from '../../../../date-fns/index.esm.js';
|
|
@@ -14,7 +14,7 @@ function requireDateInput () {
|
|
|
14
14
|
value: true
|
|
15
15
|
});
|
|
16
16
|
DateInput.default = void 0;
|
|
17
|
-
var _react = _interopRequireWildcard(
|
|
17
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
18
18
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
19
19
|
var _classnames = _interopRequireDefault(requireClassnames());
|
|
20
20
|
var _dateFns = /*@__PURE__*/ requireDateFns();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as DateRange } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as DateRange } from '../../../../../_virtual/index.esm7.js';
|
|
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';
|
|
5
5
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
|
@@ -18,7 +18,7 @@ function requireDateRange () {
|
|
|
18
18
|
value: true
|
|
19
19
|
});
|
|
20
20
|
DateRange.default = void 0;
|
|
21
|
-
var _react = _interopRequireWildcard(
|
|
21
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
22
22
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
23
23
|
var _Calendar = _interopRequireDefault(requireCalendar());
|
|
24
24
|
var _DayCell = requireDayCell();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as DateRangePicker } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm5.js';
|
|
2
|
+
import require$$0__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';
|
|
5
5
|
import { __require as requireDefinedRange } from '../DefinedRange/index.esm.js';
|
|
@@ -17,7 +17,7 @@ function requireDateRangePicker () {
|
|
|
17
17
|
value: true
|
|
18
18
|
});
|
|
19
19
|
DateRangePicker.default = void 0;
|
|
20
|
-
var _react = _interopRequireWildcard(
|
|
20
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
21
21
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
22
22
|
var _DateRange = _interopRequireDefault(requireDateRange());
|
|
23
23
|
var _DefinedRange = _interopRequireDefault(requireDefinedRange());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as DayCell } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as DayCell } from '../../../../../_virtual/index.esm11.js';
|
|
2
|
+
import require$$0__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';
|
|
5
5
|
import { __require as requireDateFns } from '../../../../date-fns/index.esm.js';
|
|
@@ -14,7 +14,7 @@ function requireDayCell () {
|
|
|
14
14
|
value: true
|
|
15
15
|
});
|
|
16
16
|
DayCell.rangeShape = DayCell.default = void 0;
|
|
17
|
-
var _react = _interopRequireWildcard(
|
|
17
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
18
18
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
19
19
|
var _classnames = _interopRequireDefault(requireClassnames());
|
|
20
20
|
var _dateFns = /*@__PURE__*/ requireDateFns();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as DefinedRange } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as DefinedRange } from '../../../../../_virtual/index.esm4.js';
|
|
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';
|
|
5
5
|
import { __require as requireDefaultRanges } from '../../defaultRanges.esm.js';
|
|
@@ -17,7 +17,7 @@ function requireDefinedRange () {
|
|
|
17
17
|
value: true
|
|
18
18
|
});
|
|
19
19
|
DefinedRange.default = void 0;
|
|
20
|
-
var _react = _interopRequireWildcard(
|
|
20
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
21
21
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
22
22
|
var _styles = _interopRequireDefault(requireStyles());
|
|
23
23
|
var _defaultRanges = requireDefaultRanges();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as InputRangeField } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as InputRangeField } from '../../../../../_virtual/index.esm12.js';
|
|
2
|
+
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
|
|
5
5
|
var hasRequiredInputRangeField;
|
|
@@ -12,7 +12,7 @@ function requireInputRangeField () {
|
|
|
12
12
|
value: true
|
|
13
13
|
});
|
|
14
14
|
InputRangeField.default = void 0;
|
|
15
|
-
var _react = _interopRequireWildcard(
|
|
15
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
16
16
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as Month } from '../../../../../_virtual/index.
|
|
2
|
-
import
|
|
1
|
+
import { __exports as Month } from '../../../../../_virtual/index.esm13.js';
|
|
2
|
+
import require$$0__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';
|
|
5
5
|
import { __require as requireDateFns } from '../../../../date-fns/index.esm.js';
|
|
@@ -15,7 +15,7 @@ function requireMonth () {
|
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
17
|
Month.default = void 0;
|
|
18
|
-
var _react = _interopRequireWildcard(
|
|
18
|
+
var _react = _interopRequireWildcard(require$$0__default);
|
|
19
19
|
var _propTypes = _interopRequireDefault(/*@__PURE__*/ requirePropTypes());
|
|
20
20
|
var _DayCell = _interopRequireWildcard(requireDayCell());
|
|
21
21
|
var _dateFns = /*@__PURE__*/ requireDateFns();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as reactList } from '../../_virtual/react-list.esm.js';
|
|
2
|
-
import
|
|
2
|
+
import require$$0__default from 'react';
|
|
3
3
|
import require$$1 from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var hasRequiredReactList;
|
|
@@ -10,7 +10,7 @@ function requireReactList () {
|
|
|
10
10
|
(function (exports$1) {
|
|
11
11
|
(function (global, factory) {
|
|
12
12
|
{
|
|
13
|
-
factory(exports$1,
|
|
13
|
+
factory(exports$1, require$$0__default, require$$1);
|
|
14
14
|
}
|
|
15
15
|
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : reactList, function (_exports, _react, _jsxRuntime) {
|
|
16
16
|
|