@mamrp/components 1.4.0 → 1.4.2

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/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import * as React from 'react';
1
+ import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, CSSProperties, Dispatch, SetStateAction } from 'react';
3
3
  import { Control, FieldValues, Path, FieldErrors, UseFormSetValue } from 'react-hook-form';
4
4
  import { Moment } from 'moment-jalaali';
5
5
  import { SxProps, Theme, PaperProps } from '@mui/material';
6
6
  import { GridColDef, GridRowSelectionModel, GridRowParams } from '@mui/x-data-grid';
7
7
  import { TextFieldProps } from '@mui/material/TextField';
8
+ import { MRT_ColumnDef, MRT_PaginationState, MRT_ColumnFiltersState, MRT_SortingState, MRT_TableOptions } from 'material-react-table';
8
9
 
9
10
  interface MultipleSelectChipProps {
10
11
  name: string;
@@ -16,9 +17,10 @@ interface MultipleSelectChipProps {
16
17
  disabled?: boolean;
17
18
  size?: "small" | "medium";
18
19
  clear?: boolean;
20
+ variant?: "outlined" | "filled" | "standard";
21
+ placeholder?: string;
19
22
  }
20
- declare function MultipleSelectChip({ name, control, label, data, multipleitems, //قابلیت انتخاب چند گزینه ای
21
- isLoading, disabled, size, clear, }: MultipleSelectChipProps): React.JSX.Element;
23
+ declare function MultipleSelectChip({ name, control, label, data, multipleitems, isLoading, disabled, size, clear, variant, placeholder, }: MultipleSelectChipProps): React$1.JSX.Element;
22
24
 
23
25
  interface AdvancedSearchButtonProps {
24
26
  isShowFilter: boolean;
@@ -53,12 +55,12 @@ interface ConfirmationDialogProps$1 {
53
55
  iconColor: string;
54
56
  color: "error" | "info" | "primary" | "success" | "warning" | "secondary";
55
57
  actionTitle: string;
56
- icon?: React.ReactElement<{
58
+ icon?: React$1.ReactElement<{
57
59
  color?: string;
58
60
  size?: number;
59
61
  }>;
60
62
  }
61
- declare function ConfirmationDialog$1({ open, handleClose, callback, callbackParams, headerText, bodyText, isLoading, maxWidth, iconColor, color, actionTitle, icon, }: ConfirmationDialogProps$1): React.JSX.Element;
63
+ declare function ConfirmationDialog$1({ open, handleClose, callback, callbackParams, headerText, bodyText, isLoading, maxWidth, iconColor, color, actionTitle, icon, }: ConfirmationDialogProps$1): React$1.JSX.Element;
62
64
 
63
65
  interface CustomTimePickerProps {
64
66
  name: string;
@@ -69,12 +71,12 @@ interface CustomTimePickerProps {
69
71
  autoRefresh?: boolean;
70
72
  disabled?: boolean;
71
73
  }
72
- declare function CustomTimePicker({ name, control, label, size, fullwidth, autoRefresh, disabled, }: CustomTimePickerProps): React.JSX.Element;
74
+ declare function CustomTimePicker({ name, control, label, size, fullwidth, autoRefresh, disabled, }: CustomTimePickerProps): React$1.JSX.Element;
73
75
 
74
76
  declare function DateFilterRange({ FromDate, ToDate }: {
75
77
  FromDate: any;
76
78
  ToDate: any;
77
- }): React.JSX.Element;
79
+ }): React$1.JSX.Element;
78
80
 
79
81
  declare function DateFilter({ setHandler }: {
80
82
  setHandler?: any;
@@ -143,7 +145,7 @@ interface LicensePlateProps$1 {
143
145
  readOnly?: boolean;
144
146
  size?: "small" | "medium";
145
147
  }
146
- declare function LicensePlate({ width, name, setValue, data, readOnly, size, }: LicensePlateProps$1): React.JSX.Element;
148
+ declare function LicensePlate({ width, name, setValue, data, readOnly, size, }: LicensePlateProps$1): React$1.JSX.Element;
147
149
 
148
150
  interface LicensePlateProps {
149
151
  width?: CSSProperties["width"];
@@ -176,7 +178,7 @@ interface ConfirmationDialogProps {
176
178
  bodyText: ReactNode;
177
179
  isLoading?: boolean;
178
180
  }
179
- declare function ConfirmationDialog({ open, handleClose, callback, callbackParams, headerText, bodyText, isLoading, }: ConfirmationDialogProps): React.JSX.Element;
181
+ declare function ConfirmationDialog({ open, handleClose, callback, callbackParams, headerText, bodyText, isLoading, }: ConfirmationDialogProps): React$1.JSX.Element;
180
182
 
181
183
  interface NoResultProps {
182
184
  title?: string;
@@ -187,14 +189,14 @@ declare function NoResult({ title, description, sx, }: NoResultProps): React__de
187
189
 
188
190
  interface PaginationListProps {
189
191
  currentPage: number;
190
- setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
192
+ setCurrentPage: React$1.Dispatch<React$1.SetStateAction<number>>;
191
193
  totalPages: number;
192
194
  }
193
- declare function PaginationList({ currentPage, setCurrentPage, totalPages, }: PaginationListProps): React.JSX.Element;
195
+ declare function PaginationList({ currentPage, setCurrentPage, totalPages, }: PaginationListProps): React$1.JSX.Element;
194
196
 
195
197
  declare function RadioButton({ name, label, options, control, align, disabledBoarder, direction, }: {
196
198
  name: string;
197
- label: string | React.ReactNode;
199
+ label: string | React$1.ReactNode;
198
200
  control: Control<any>;
199
201
  options: {
200
202
  value: any;
@@ -204,7 +206,7 @@ declare function RadioButton({ name, label, options, control, align, disabledBoa
204
206
  align?: "start" | "center" | "end";
205
207
  disabledBoarder?: boolean;
206
208
  direction?: "row" | "column";
207
- }): React.JSX.Element;
209
+ }): React$1.JSX.Element;
208
210
 
209
211
  declare const NestedSelect: React__default.FC;
210
212
 
@@ -217,7 +219,7 @@ interface HorizontalStepperProps {
217
219
  currentStep: number;
218
220
  setCurrentStep: (newStep: number) => void;
219
221
  }
220
- declare function HorizontalStepper({ steps, currentStep, setCurrentStep, }: HorizontalStepperProps): React.JSX.Element;
222
+ declare function HorizontalStepper({ steps, currentStep, setCurrentStep, }: HorizontalStepperProps): React$1.JSX.Element;
221
223
 
222
224
  interface StateType {
223
225
  page: number;
@@ -272,9 +274,9 @@ type FormInputNumberProps<T extends FieldValues> = {
272
274
  onKeyDown?: any;
273
275
  textAlign?: "left" | "right" | "center";
274
276
  autoComplete?: string;
275
- borderless?: boolean;
277
+ variant?: "outlined" | "filled" | "standard";
276
278
  } & TextFieldProps;
277
- declare const FormInputNumber: <T extends FieldValues>({ name, control, label, inputRef, onKeyDown, endAdornment, thousandSeparator, startAdornment, onChangeHandler, valueHandler, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, placeholder, decimalScale, autoComplete, textAlign, borderless, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
279
+ declare const FormInputNumber: <T extends FieldValues>({ name, control, label, inputRef, onKeyDown, endAdornment, thousandSeparator, startAdornment, onChangeHandler, valueHandler, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, placeholder, decimalScale, autoComplete, textAlign, variant, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
278
280
 
279
281
  type FormInputTextProps$1<T extends FieldValues> = {
280
282
  control: Control<T>;
@@ -289,8 +291,9 @@ type FormInputTextProps$1<T extends FieldValues> = {
289
291
  isLoading?: boolean;
290
292
  onBlurHandler?: any;
291
293
  rows?: number;
294
+ variant?: "outlined" | "filled" | "standard";
292
295
  } & TextFieldProps;
293
- declare const FormInputText: <T extends FieldValues>({ name, control, label, maxLength, readOnly, rules, size, disabled, multiline, isLoading, onBlurHandler, rows, ...rest }: FormInputTextProps$1<T>) => React__default.JSX.Element;
296
+ declare const FormInputText: <T extends FieldValues>({ name, control, label, maxLength, readOnly, rules, size, disabled, multiline, isLoading, onBlurHandler, rows, variant, ...rest }: FormInputTextProps$1<T>) => React__default.JSX.Element;
294
297
 
295
298
  type FormInputTextProps<T extends FieldValues> = {
296
299
  control: Control<T>;
@@ -344,7 +347,7 @@ declare function Page({ data, }: {
344
347
  title: string;
345
348
  body: ReactNode;
346
349
  }];
347
- }): React.JSX.Element;
350
+ }): React$1.JSX.Element;
348
351
 
349
352
  type SwitchButtonProps = {
350
353
  checked: boolean;
@@ -367,6 +370,41 @@ interface DraggablePaperProps extends PaperProps {
367
370
  handle?: string;
368
371
  cancel?: string;
369
372
  }
370
- declare function DraggablePaper({ handle, cancel, ...props }: DraggablePaperProps): React.JSX.Element;
373
+ declare function DraggablePaper({ handle, cancel, ...props }: DraggablePaperProps): React$1.JSX.Element;
374
+
375
+ type DataTableProps<T extends Record<string, any>> = {
376
+ data: T[];
377
+ columns: MRT_ColumnDef<T>[];
378
+ isLoading?: boolean;
379
+ isRefetching?: boolean;
380
+ pagination: MRT_PaginationState;
381
+ onPaginationChange: (updater: MRT_PaginationState | ((old: MRT_PaginationState) => MRT_PaginationState)) => void;
382
+ totalRows: number;
383
+ manualPagination?: boolean;
384
+ columnFilters?: MRT_ColumnFiltersState;
385
+ onColumnFiltersChange?: (filters: MRT_ColumnFiltersState | ((old: MRT_ColumnFiltersState) => MRT_ColumnFiltersState)) => void;
386
+ manualFiltering?: boolean;
387
+ onClearFilters?: () => void;
388
+ showClearFiltersButton?: boolean;
389
+ sorting?: MRT_SortingState;
390
+ onSortingChange?: (sorting: MRT_SortingState | ((old: MRT_SortingState) => MRT_SortingState)) => void;
391
+ manualSorting?: boolean;
392
+ enableStickyHeader?: boolean;
393
+ maxHeight?: string;
394
+ density?: "comfortable" | "compact" | "spacious";
395
+ enableColumnOrdering?: boolean;
396
+ enableGlobalFilter?: boolean;
397
+ enableColumnFilterModes?: boolean;
398
+ enableRowSelection?: boolean;
399
+ renderTopToolbarCustomActions?: (props: {
400
+ table: any;
401
+ }) => React.ReactNode;
402
+ renderBottomToolbarCustomActions?: (props: {
403
+ table: any;
404
+ }) => React.ReactNode;
405
+ tableOptions?: Partial<MRT_TableOptions<T>>;
406
+ localization?: Record<string, string>;
407
+ };
408
+ declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, }: DataTableProps<T>) => React$1.JSX.Element;
371
409
 
372
- export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomTimePicker, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
410
+ export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomTimePicker, DataTable, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  ConnectToBasculeButton: () => bascule_connection_button_default,
37
37
  CustomCheckbox: () => CustomCheckbox,
38
38
  CustomTimePicker: () => CustomTimePicker,
39
+ DataTable: () => data_table_default,
39
40
  DateFilter: () => DateFilter,
40
41
  DateFilterRange: () => DateFilterRange,
41
42
  DateMonthPicker: () => date_month_default,
@@ -607,16 +608,16 @@ function MultipleSelectChip({
607
608
  label,
608
609
  data,
609
610
  multipleitems,
610
- //قابلیت انتخاب چند گزینه ای
611
611
  isLoading,
612
612
  disabled = false,
613
613
  size = "medium",
614
- clear = false
614
+ clear = false,
615
+ variant = "outlined",
616
+ placeholder
615
617
  }) {
616
618
  const dataOptions = data?.map((value) => ({
617
619
  title: value.userName || value.name || `${value.firstName} ${value.lastName}`,
618
620
  key: value.id || `key_${Math.random()}`,
619
- // Assuming each item has an 'id'
620
621
  httpMethod: numberToHttpMethodMapping[value.httpMethod],
621
622
  url: value.url,
622
623
  licensePlate: value.licensePlate
@@ -641,16 +642,6 @@ function MultipleSelectChip({
641
642
  onChange(value?.key || null);
642
643
  }
643
644
  };
644
- function search(option, value) {
645
- if (option.title.includes(value.title)) {
646
- return true;
647
- }
648
- if (value.title.includes(option.title)) {
649
- return true;
650
- }
651
- return false;
652
- }
653
- const CustomStyledValue = ({ children }) => /* @__PURE__ */ React3.createElement("span", { style: { color: "green", fontStyle: "italic" } }, children);
654
645
  return /* @__PURE__ */ React3.createElement(
655
646
  import_react_hook_form.Controller,
656
647
  {
@@ -665,30 +656,24 @@ function MultipleSelectChip({
665
656
  disableCloseOnSelect: multipleitems,
666
657
  options: combinedOptions,
667
658
  multiple: multipleitems,
668
- sx: {
669
- width: "100%"
670
- },
671
- noOptionsText: "\u062F\u0627\u062F\u0647 \u0627\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",
659
+ sx: { width: "100%" },
660
+ noOptionsText: "\u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",
672
661
  value: multipleitems ? selectedValues : combinedOptions.find(
673
662
  (option) => String(option.key) === String(value)
674
663
  ) || { title: "", key: "" },
675
- onChange: (event, value2) => {
676
- handleChange(event, value2, onChange);
677
- },
664
+ onChange: (event, value2) => handleChange(event, value2, onChange),
678
665
  isOptionEqualToValue: (option, value2) => String(option.key) === String(value2?.key),
679
666
  getOptionLabel: (option) => option.title,
680
667
  loading: isLoading,
681
668
  loadingText: "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...",
682
- renderOption: (props, option) => {
683
- return /* @__PURE__ */ React3.createElement(
684
- CustomeStyle,
685
- {
686
- props,
687
- option,
688
- multipleitems: !!multipleitems
689
- }
690
- );
691
- },
669
+ renderOption: (props, option) => /* @__PURE__ */ React3.createElement(
670
+ CustomeStyle,
671
+ {
672
+ props,
673
+ option,
674
+ multipleitems: !!multipleitems
675
+ }
676
+ ),
692
677
  slots: { popper: import_material3.Popper },
693
678
  slotProps: {
694
679
  popper: {
@@ -706,7 +691,6 @@ function MultipleSelectChip({
706
691
  name: "flip",
707
692
  options: {
708
693
  fallbackPlacements: ["top", "bottom"]
709
- // Ensures it flips to the top if needed
710
694
  }
711
695
  }
712
696
  ]
@@ -720,6 +704,8 @@ function MultipleSelectChip({
720
704
  error: !!error,
721
705
  helperText: error?.message,
722
706
  inputRef: ref,
707
+ variant,
708
+ placeholder,
723
709
  InputProps: {
724
710
  ...params.InputProps,
725
711
  startAdornment: /* @__PURE__ */ React3.createElement(
@@ -729,14 +715,12 @@ function MultipleSelectChip({
729
715
  display: "flex",
730
716
  flexWrap: "wrap",
731
717
  maxHeight: "250px",
732
- // Set the maximum height for the chip container
733
718
  overflowY: "auto",
734
- // Enable vertical scroll
735
719
  padding: 0
736
- // Remove any padding to ensure chips stay inside the container
737
720
  }
738
721
  },
739
- /* @__PURE__ */ React3.createElement(React3.Fragment, null, isLoading ? /* @__PURE__ */ React3.createElement(import_material3.Typography, { sx: { marginRight: 1 } }, "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...") : null, params.InputProps.startAdornment)
722
+ isLoading ? /* @__PURE__ */ React3.createElement(import_material3.Typography, { sx: { marginRight: 1 } }, "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...") : null,
723
+ params.InputProps.startAdornment
740
724
  )
741
725
  }
742
726
  }
@@ -3552,7 +3536,7 @@ var FormInputNumber = ({
3552
3536
  decimalScale = 2,
3553
3537
  autoComplete = "off",
3554
3538
  textAlign = "right",
3555
- borderless = false,
3539
+ variant = "outlined",
3556
3540
  ...rest
3557
3541
  }) => {
3558
3542
  return /* @__PURE__ */ import_react22.default.createElement(
@@ -3576,30 +3560,18 @@ var FormInputNumber = ({
3576
3560
  },
3577
3561
  value: data && !value ? data : value == null ? "" : valueHandler ? valueHandler(value) : value,
3578
3562
  fullWidth: true,
3579
- variant: borderless ? "standard" : "outlined",
3563
+ variant,
3580
3564
  sx: {
3581
- ...borderless ? {
3582
- "& .MuiInput-underline:before": {
3583
- borderBottom: "none"
3584
- },
3585
- "& .MuiInput-underline:after": {
3586
- borderBottom: "none"
3587
- },
3588
- "& .MuiInput-underline:hover:not(.Mui-disabled):before": {
3589
- borderBottom: "none"
3590
- }
3591
- } : {
3592
- "& .MuiOutlinedInput-notchedOutline": {
3593
- borderColor: borderColor || ""
3565
+ "& .MuiOutlinedInput-notchedOutline": {
3566
+ borderColor: borderColor || ""
3567
+ },
3568
+ "& .MuiOutlinedInput-root": {
3569
+ borderRadius: "12px",
3570
+ "&:hover fieldset": {
3571
+ borderColor: borderColor ?? "#085938"
3594
3572
  },
3595
- "& .MuiOutlinedInput-root": {
3596
- borderRadius: "12px",
3597
- "&:hover fieldset": {
3598
- borderColor: borderColor ?? "#085938"
3599
- },
3600
- "&.Mui-focused fieldset": {
3601
- borderColor: borderColor ?? "#085938"
3602
- }
3573
+ "&.Mui-focused fieldset": {
3574
+ borderColor: borderColor ?? "#085938"
3603
3575
  }
3604
3576
  },
3605
3577
  "& .MuiInputLabel-root.Mui-focused": {
@@ -3687,6 +3659,7 @@ var FormInputText = ({
3687
3659
  isLoading,
3688
3660
  onBlurHandler,
3689
3661
  rows,
3662
+ variant = "outlined",
3690
3663
  ...rest
3691
3664
  }) => {
3692
3665
  return /* @__PURE__ */ import_react23.default.createElement(
@@ -3708,7 +3681,7 @@ var FormInputText = ({
3708
3681
  value,
3709
3682
  fullWidth: true,
3710
3683
  label,
3711
- variant: "outlined",
3684
+ variant,
3712
3685
  inputProps: {
3713
3686
  ...rest.inputProps,
3714
3687
  maxLength,
@@ -4814,6 +4787,127 @@ function DraggablePaper({
4814
4787
  /* @__PURE__ */ React.createElement(import_material29.Paper, { ref: nodeRef, ...props })
4815
4788
  );
4816
4789
  }
4790
+
4791
+ // src/data-table/index.tsx
4792
+ var import_Clear = __toESM(require("@mui/icons-material/Clear"));
4793
+ var import_material30 = require("@mui/material");
4794
+ var import_material_react_table = require("material-react-table");
4795
+ var import_fa6 = require("material-react-table/locales/fa");
4796
+ var import_react32 = require("react");
4797
+ var customLocalization = {
4798
+ ...import_fa6.MRT_Localization_FA,
4799
+ mrt_columns_showHide_resetOrder: "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC \u062A\u0631\u062A\u06CC\u0628"
4800
+ };
4801
+ var DataTable = ({
4802
+ data,
4803
+ columns,
4804
+ isLoading = false,
4805
+ isRefetching = false,
4806
+ pagination,
4807
+ onPaginationChange,
4808
+ totalRows,
4809
+ manualPagination = true,
4810
+ columnFilters = [],
4811
+ onColumnFiltersChange,
4812
+ manualFiltering = true,
4813
+ onClearFilters,
4814
+ showClearFiltersButton = true,
4815
+ sorting = [],
4816
+ onSortingChange,
4817
+ manualSorting = false,
4818
+ enableStickyHeader = true,
4819
+ maxHeight = "calc(100vh - 200px)",
4820
+ density = "compact",
4821
+ enableColumnOrdering = true,
4822
+ enableGlobalFilter = false,
4823
+ enableColumnFilterModes = false,
4824
+ enableRowSelection = false,
4825
+ renderTopToolbarCustomActions,
4826
+ renderBottomToolbarCustomActions,
4827
+ tableOptions = {},
4828
+ localization = customLocalization
4829
+ }) => {
4830
+ const memoizedColumns = (0, import_react32.useMemo)(() => columns, [columns]);
4831
+ const memoizedData = (0, import_react32.useMemo)(() => data, [data]);
4832
+ const defaultRenderTopToolbarCustomActions = ({ table: table2 }) => {
4833
+ const showFilters = table2.getState().showColumnFilters;
4834
+ if (!showFilters || !showClearFiltersButton || !onClearFilters) return null;
4835
+ return /* @__PURE__ */ React.createElement(import_material30.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React.createElement(
4836
+ import_material30.Box,
4837
+ {
4838
+ display: "flex",
4839
+ alignItems: "center",
4840
+ justifyContent: "flex-start"
4841
+ },
4842
+ /* @__PURE__ */ React.createElement(
4843
+ import_material30.Button,
4844
+ {
4845
+ color: "secondary",
4846
+ onClick: onClearFilters,
4847
+ startIcon: /* @__PURE__ */ React.createElement(import_Clear.default, null)
4848
+ },
4849
+ "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC \u0641\u06CC\u0644\u062A\u0631\u0647\u0627"
4850
+ )
4851
+ ));
4852
+ };
4853
+ const table = (0, import_material_react_table.useMaterialReactTable)({
4854
+ columns: memoizedColumns,
4855
+ data: memoizedData,
4856
+ localization,
4857
+ // Pagination
4858
+ manualPagination,
4859
+ onPaginationChange,
4860
+ pageCount: manualPagination ? Math.ceil(totalRows / pagination.pageSize) : void 0,
4861
+ rowCount: totalRows ?? 0,
4862
+ // Filtering
4863
+ manualFiltering,
4864
+ onColumnFiltersChange,
4865
+ enableColumnFilterModes,
4866
+ enableGlobalFilter,
4867
+ // Sorting
4868
+ manualSorting,
4869
+ onSortingChange,
4870
+ // Features
4871
+ enableColumnOrdering,
4872
+ enableRowSelection,
4873
+ enableStickyHeader,
4874
+ // State
4875
+ state: {
4876
+ pagination,
4877
+ columnFilters,
4878
+ sorting,
4879
+ isLoading,
4880
+ showProgressBars: isRefetching
4881
+ },
4882
+ // Styling
4883
+ muiTablePaperProps: { sx: { direction: "ltr" } },
4884
+ muiTableBodyCellProps: { sx: { textAlign: "center" } },
4885
+ muiTableHeadCellProps: {
4886
+ sx: {
4887
+ "& .Mui-TableHeadCell-Content": {
4888
+ flexDirection: "row-reverse",
4889
+ justifyContent: "center"
4890
+ }
4891
+ }
4892
+ },
4893
+ muiTableContainerProps: {
4894
+ sx: {
4895
+ maxHeight
4896
+ }
4897
+ },
4898
+ // Initial state
4899
+ initialState: {
4900
+ density
4901
+ },
4902
+ // Custom toolbars
4903
+ renderTopToolbarCustomActions: renderTopToolbarCustomActions || defaultRenderTopToolbarCustomActions,
4904
+ renderBottomToolbarCustomActions,
4905
+ // Override with any additional options
4906
+ ...tableOptions
4907
+ });
4908
+ return /* @__PURE__ */ React.createElement(import_material_react_table.MaterialReactTable, { table });
4909
+ };
4910
+ var data_table_default = DataTable;
4817
4911
  // Annotate the CommonJS export names for ESM import in node:
4818
4912
  0 && (module.exports = {
4819
4913
  Accordion,
@@ -4822,6 +4916,7 @@ function DraggablePaper({
4822
4916
  ConnectToBasculeButton,
4823
4917
  CustomCheckbox,
4824
4918
  CustomTimePicker,
4919
+ DataTable,
4825
4920
  DateFilter,
4826
4921
  DateFilterRange,
4827
4922
  DateMonthPicker,