tp-react-elements 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- var propTypes = {exports: {}};
1
+ var accessibility = {};
2
2
 
3
- export { propTypes as __module };
3
+ export { accessibility as __exports };
@@ -1,3 +1,3 @@
1
- var Month = {};
1
+ var DateInput = {};
2
2
 
3
- export { Month as __exports };
3
+ export { DateInput as __exports };
@@ -1,3 +1,3 @@
1
- var DateInput = {};
1
+ var Month = {};
2
2
 
3
- export { DateInput as __exports };
3
+ export { Month as __exports };
@@ -1,3 +1,3 @@
1
- var DateRangePicker = {};
1
+ var DateRange = {};
2
2
 
3
- export { DateRangePicker as __exports };
3
+ export { DateRange as __exports };
@@ -1,3 +1,3 @@
1
- var DateRange = {};
1
+ var DefinedRange = {};
2
2
 
3
- export { DateRange as __exports };
3
+ export { DefinedRange as __exports };
@@ -1,3 +1,3 @@
1
- var DefinedRange = {};
1
+ var DateRangePicker = {};
2
2
 
3
- export { DefinedRange as __exports };
3
+ export { DateRangePicker as __exports };
@@ -1,3 +1,3 @@
1
- var accessibility = {};
1
+ var propTypes = {exports: {}};
2
2
 
3
- export { accessibility as __exports };
3
+ export { propTypes as __module };
@@ -1,11 +1,12 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Box, FormControl, InputLabel, Select, Tooltip, OutlinedInput, Checkbox } from '@mui/material';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Box, IconButton, FormControl, InputLabel, Select, Tooltip, OutlinedInput, Checkbox } from '@mui/material';
3
3
  import { useState, useRef, useMemo, useCallback } from 'react';
4
4
  import { useWatch } from 'react-hook-form';
5
5
  import FormBottomField from '../FormBottomField/FormBottomField.esm.js';
6
6
  import 'dayjs';
7
7
  import { renderLabel } from '../../../utils/Constants/FormConstants.esm.js';
8
8
  import { useMaterialReactTable, MaterialReactTable } from 'material-react-table';
9
+ import { ChevronLeft, ChevronRight } from '@mui/icons-material';
9
10
 
10
11
  const ITEM_HEIGHT = 50;
11
12
  const ITEM_PADDING_TOP = 3;
@@ -333,6 +334,18 @@ const MultiSelectTable = ({ props, variant, }) => {
333
334
  globalFilter,
334
335
  },
335
336
  onGlobalFilterChange: setGlobalFilter,
337
+ renderBottomToolbar: ({ table }) => {
338
+ const totalRows = table.getFilteredRowModel().rows.length;
339
+ const selectedCount = selectedValues.length;
340
+ return (jsxs(Box, { sx: {
341
+ display: 'flex',
342
+ justifyContent: 'space-between',
343
+ alignItems: 'center',
344
+ padding: '6px 10px',
345
+ borderTop: '1px solid #e0e0e0',
346
+ fontSize: '11px',
347
+ }, children: [jsxs(Box, { children: ["Total: ", totalRows] }), jsxs(Box, { children: ["Selected: ", selectedCount] }), jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [jsx(IconButton, { size: "small", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: jsx(ChevronLeft, { fontSize: "small" }) }), jsxs("span", { children: ["Page ", table.getState().pagination.pageIndex + 1] }), jsx(IconButton, { size: "small", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: jsx(ChevronRight, { fontSize: "small" }) })] })] }));
348
+ },
336
349
  });
337
350
  return (jsx(Box, { children: jsxs(FormControl, { fullWidth: true, sx: {
338
351
  '& .MuiFormLabel-root': {
@@ -341,9 +354,6 @@ const MultiSelectTable = ({ props, variant, }) => {
341
354
  '& .MuiInputLabel-shrink': {
342
355
  top: 0,
343
356
  },
344
- '& .MuiTablePagination-root': {
345
- padding: '0px !important'
346
- }
347
357
  }, children: [renderLabel(variant, props), variant !== 'standard' ? (jsxs(InputLabel, { error: isShowBorderError, id: `${props.item.name}-mst-labelId`, children: [props.item.label, props.item.required ? ' *' : ''] })) : null, jsx(Select, { labelId: `${props.item.name}-mst-labelId`, id: `${props.item.name}-mst-select`, multiple: true, sx: {
348
358
  '& .MuiTypography-root': {
349
359
  fontSize: '5px !important',
@@ -1,4 +1,4 @@
1
- import { __module as propTypes } from '../../_virtual/index.esm10.js';
1
+ import { __module as propTypes } from '../../_virtual/index.esm9.js';
2
2
  import { __require as requireReactIs } from './node_modules/react-is/index.esm.js';
3
3
  import { __require as requireFactoryWithTypeCheckers } from './factoryWithTypeCheckers.esm.js';
4
4
  import { __require as requireFactoryWithThrowingShims } from './factoryWithThrowingShims.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as accessibility } from '../../../../_virtual/index.esm9.js';
1
+ import { __exports as accessibility } from '../../../../_virtual/index.esm10.js';
2
2
  import { __require as requirePropTypes } from '../../../prop-types/index.esm.js';
3
3
 
4
4
  var hasRequiredAccessibility;
@@ -1,4 +1,4 @@
1
- import { __exports as DateInput } from '../../../../../_virtual/index.esm14.js';
1
+ import { __exports as DateInput } 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 requireClassnames } from '../../../../classnames/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DateRange } from '../../../../../_virtual/index.esm5.js';
1
+ import { __exports as DateRange } from '../../../../../_virtual/index.esm4.js';
2
2
  import React__default from 'react';
3
3
  import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
4
4
  import { __require as requireCalendar } from '../Calendar/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm4.js';
1
+ import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm6.js';
2
2
  import React__default from 'react';
3
3
  import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
4
4
  import { __require as requireDateRange } from '../DateRange/index.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as DefinedRange } from '../../../../../_virtual/index.esm6.js';
1
+ import { __exports as DefinedRange } from '../../../../../_virtual/index.esm5.js';
2
2
  import React__default from 'react';
3
3
  import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
4
4
  import { __require as requireStyles } from '../../styles.esm.js';
@@ -1,4 +1,4 @@
1
- import { __exports as Month } from '../../../../../_virtual/index.esm13.js';
1
+ import { __exports as Month } 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 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.2.5",
3
+ "version": "1.2.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "React form components library built with React Hook Form and Yup",