@mamrp/components 1.7.24 → 1.7.26

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.mts CHANGED
@@ -404,6 +404,8 @@ type DataTableProps<T extends Record<string, any>> = {
404
404
  totalRows: number;
405
405
  /** فعال‌سازی صفحه‌بندی دستی (پیش‌فرض: true) */
406
406
  manualPagination?: boolean;
407
+ /** غیرفعال کردن نمایش پیجینیشن (پیش‌فرض: false) */
408
+ disablePagination?: boolean;
407
409
  /** فیلترهای ستون (columnFilters از useTableState) */
408
410
  columnFilters?: MRT_ColumnFiltersState;
409
411
  /** تابع تغییر فیلترهای ستون */
@@ -462,8 +464,14 @@ type DataTableProps<T extends Record<string, any>> = {
462
464
  enableColumnVirtualization?: boolean;
463
465
  /** گزینه‌های مجازی‌سازی ستون‌ها */
464
466
  columnVirtualizerOptions?: MRT_TableOptions<T>["columnVirtualizerOptions"];
465
- /** فعال‌سازی تغییر اندازه ستون‌ها */
467
+ /** فعال‌سازی تغییر اندازه ستون‌ها (پیش‌فرض: false) */
466
468
  enableColumnResizing?: boolean;
469
+ /** حالت چیدمان جدول برای کنترل عرض ستون‌ها (پیش‌فرض: "semantic") */
470
+ layoutMode?: "semantic" | "grid" | "grid-no-grow";
471
+ /** رندر کردن پنل جزئیات برای هر سطر (expandable rows) */
472
+ renderDetailPanel?: MRT_TableOptions<T>["renderDetailPanel"];
473
+ /** تابع برای تازه‌سازی داده‌ها - دکمه refresh در تولبار نمایش داده می‌شود */
474
+ refetch?: () => void;
467
475
  };
468
476
  /**
469
477
  * کامپوننت DataTable - جدول پیشرفته با قابلیت‌های کامل
@@ -490,7 +498,7 @@ type DataTableProps<T extends Record<string, any>> = {
490
498
  *
491
499
  * ### مرحله 2: فراخوانی API
492
500
  * ```tsx
493
- * const { data } = useGetData({
501
+ * const { data, refetch } = useGetData({
494
502
  * PageNumber: tableState.pagination.pageIndex + 1,
495
503
  * PageSize: tableState.pagination.pageSize,
496
504
  * ...tableState.debouncedFiltring,
@@ -504,6 +512,7 @@ type DataTableProps<T extends Record<string, any>> = {
504
512
  * {
505
513
  * accessorKey: "name",
506
514
  * header: "نام",
515
+ * size: 200, // عرض ستون
507
516
  * Filter: ({ column }) => (
508
517
  * <FormInputText
509
518
  * control={control}
@@ -534,6 +543,7 @@ type DataTableProps<T extends Record<string, any>> = {
534
543
  * onShowColumnFiltersChange={setShowFilters}
535
544
  * onClearFilters={handleClearFilters}
536
545
  * manualSorting={true}
546
+ * refetch={refetch}
537
547
  * />
538
548
  * );
539
549
  * ```
@@ -547,12 +557,69 @@ type DataTableProps<T extends Record<string, any>> = {
547
557
  * 🌍 **لوکالیزیشن**: پشتیبانی کامل از زبان فارسی
548
558
  * ⚡ **بهینه‌سازی**: رندرینگ بهینه با useMemo و مجازی‌سازی ستون‌ها برای عملکرد بالا
549
559
  * 🎨 **قابل تنظیم**: ظاهر و رفتار کاملاً قابل تنظیم
560
+ * 🔄 **تازه‌سازی**: دکمه refresh برای بارگذاری مجدد داده‌ها
561
+ * 📐 **تغییر اندازه ستون‌ها**: امکان تغییر عرض ستون‌ها توسط کاربر
562
+ * 📋 **پنل جزئیات**: نمایش جزئیات بیشتر برای هر سطر (expandable rows)
563
+ *
564
+ * ## Props مهم:
565
+ *
566
+ * | Prop | نوع | پیش‌فرض | توضیحات |
567
+ * |------|-----|---------|---------|
568
+ * | `data` | `T[]` | - | آرایه داده‌های جدول |
569
+ * | `columns` | `MRT_ColumnDef<T>[]` | - | تعریف ستون‌های جدول |
570
+ * | `pagination` | `MRT_PaginationState` | - | وضعیت صفحه‌بندی |
571
+ * | `totalRows` | `number` | - | تعداد کل رکوردها |
572
+ * | `isLoading` | `boolean` | `false` | وضعیت بارگذاری |
573
+ * | `disablePagination` | `boolean` | `false` | غیرفعال کردن پیجینیشن |
574
+ * | `manualSorting` | `boolean` | `false` | مرتب‌سازی سمت سرور |
575
+ * | `enableColumnResizing` | `boolean` | `false` | امکان تغییر عرض ستون |
576
+ * | `layoutMode` | `string` | `"semantic"` | حالت چیدمان (`"grid"` برای عرض ثابت) |
577
+ * | `refetch` | `() => void` | - | تابع تازه‌سازی داده‌ها |
550
578
  *
551
579
  * @template T - نوع داده‌های جدول
552
580
  *
553
581
  * @example
554
582
  * ```tsx
555
- * // مثال کامل استفاده
583
+ * // مثال ساده
584
+ * <DataTable
585
+ * data={users}
586
+ * columns={columns}
587
+ * pagination={{ pageIndex: 0, pageSize: 10 }}
588
+ * onPaginationChange={setPagination}
589
+ * totalRows={100}
590
+ * />
591
+ * ```
592
+ *
593
+ * @example
594
+ * ```tsx
595
+ * // مثال با تغییر اندازه ستون
596
+ * <DataTable
597
+ * data={users}
598
+ * columns={columns}
599
+ * pagination={pagination}
600
+ * onPaginationChange={setPagination}
601
+ * totalRows={100}
602
+ * enableColumnResizing={true}
603
+ * layoutMode="grid"
604
+ * />
605
+ * ```
606
+ *
607
+ * @example
608
+ * ```tsx
609
+ * // مثال بدون پیجینیشن
610
+ * <DataTable
611
+ * data={users}
612
+ * columns={columns}
613
+ * pagination={{ pageIndex: 0, pageSize: 100 }}
614
+ * onPaginationChange={() => {}}
615
+ * totalRows={users.length}
616
+ * disablePagination={true}
617
+ * />
618
+ * ```
619
+ *
620
+ * @example
621
+ * ```tsx
622
+ * // مثال کامل با همه قابلیت‌ها
556
623
  * function UsersTable() {
557
624
  * const { control, watch, reset } = useForm();
558
625
  *
@@ -566,7 +633,7 @@ type DataTableProps<T extends Record<string, any>> = {
566
633
  * }
567
634
  * });
568
635
  *
569
- * const { data, isLoading } = useGetUsers({
636
+ * const { data, isLoading, refetch } = useGetUsers({
570
637
  * PageNumber: tableState.pagination.pageIndex + 1,
571
638
  * PageSize: tableState.pagination.pageSize,
572
639
  * ...tableState.debouncedFiltring,
@@ -577,6 +644,7 @@ type DataTableProps<T extends Record<string, any>> = {
577
644
  * {
578
645
  * accessorKey: "name",
579
646
  * header: "نام کاربر",
647
+ * size: 200,
580
648
  * Filter: () => (
581
649
  * <FormInputText
582
650
  * control={control}
@@ -604,12 +672,20 @@ type DataTableProps<T extends Record<string, any>> = {
604
672
  * reset();
605
673
  * }}
606
674
  * manualSorting={true}
675
+ * enableColumnResizing={true}
676
+ * layoutMode="grid"
677
+ * refetch={refetch}
678
+ * renderDetailPanel={({ row }) => (
679
+ * <Box p={2}>
680
+ * <Typography>جزئیات کاربر: {row.original.name}</Typography>
681
+ * </Box>
682
+ * )}
607
683
  * />
608
684
  * );
609
685
  * }
610
686
  * ```
611
687
  */
612
- declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, }: DataTableProps<T>) => React$1.JSX.Element;
688
+ declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, disablePagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, layoutMode, renderDetailPanel, refetch, }: DataTableProps<T>) => React$1.JSX.Element;
613
689
 
614
690
  declare function imgViewer({ open, handleClose, src, isLoading, title, noResetBtn, noRotate, noZoom, unoptimized, }: {
615
691
  open: boolean;
package/dist/index.d.ts CHANGED
@@ -404,6 +404,8 @@ type DataTableProps<T extends Record<string, any>> = {
404
404
  totalRows: number;
405
405
  /** فعال‌سازی صفحه‌بندی دستی (پیش‌فرض: true) */
406
406
  manualPagination?: boolean;
407
+ /** غیرفعال کردن نمایش پیجینیشن (پیش‌فرض: false) */
408
+ disablePagination?: boolean;
407
409
  /** فیلترهای ستون (columnFilters از useTableState) */
408
410
  columnFilters?: MRT_ColumnFiltersState;
409
411
  /** تابع تغییر فیلترهای ستون */
@@ -462,8 +464,14 @@ type DataTableProps<T extends Record<string, any>> = {
462
464
  enableColumnVirtualization?: boolean;
463
465
  /** گزینه‌های مجازی‌سازی ستون‌ها */
464
466
  columnVirtualizerOptions?: MRT_TableOptions<T>["columnVirtualizerOptions"];
465
- /** فعال‌سازی تغییر اندازه ستون‌ها */
467
+ /** فعال‌سازی تغییر اندازه ستون‌ها (پیش‌فرض: false) */
466
468
  enableColumnResizing?: boolean;
469
+ /** حالت چیدمان جدول برای کنترل عرض ستون‌ها (پیش‌فرض: "semantic") */
470
+ layoutMode?: "semantic" | "grid" | "grid-no-grow";
471
+ /** رندر کردن پنل جزئیات برای هر سطر (expandable rows) */
472
+ renderDetailPanel?: MRT_TableOptions<T>["renderDetailPanel"];
473
+ /** تابع برای تازه‌سازی داده‌ها - دکمه refresh در تولبار نمایش داده می‌شود */
474
+ refetch?: () => void;
467
475
  };
468
476
  /**
469
477
  * کامپوننت DataTable - جدول پیشرفته با قابلیت‌های کامل
@@ -490,7 +498,7 @@ type DataTableProps<T extends Record<string, any>> = {
490
498
  *
491
499
  * ### مرحله 2: فراخوانی API
492
500
  * ```tsx
493
- * const { data } = useGetData({
501
+ * const { data, refetch } = useGetData({
494
502
  * PageNumber: tableState.pagination.pageIndex + 1,
495
503
  * PageSize: tableState.pagination.pageSize,
496
504
  * ...tableState.debouncedFiltring,
@@ -504,6 +512,7 @@ type DataTableProps<T extends Record<string, any>> = {
504
512
  * {
505
513
  * accessorKey: "name",
506
514
  * header: "نام",
515
+ * size: 200, // عرض ستون
507
516
  * Filter: ({ column }) => (
508
517
  * <FormInputText
509
518
  * control={control}
@@ -534,6 +543,7 @@ type DataTableProps<T extends Record<string, any>> = {
534
543
  * onShowColumnFiltersChange={setShowFilters}
535
544
  * onClearFilters={handleClearFilters}
536
545
  * manualSorting={true}
546
+ * refetch={refetch}
537
547
  * />
538
548
  * );
539
549
  * ```
@@ -547,12 +557,69 @@ type DataTableProps<T extends Record<string, any>> = {
547
557
  * 🌍 **لوکالیزیشن**: پشتیبانی کامل از زبان فارسی
548
558
  * ⚡ **بهینه‌سازی**: رندرینگ بهینه با useMemo و مجازی‌سازی ستون‌ها برای عملکرد بالا
549
559
  * 🎨 **قابل تنظیم**: ظاهر و رفتار کاملاً قابل تنظیم
560
+ * 🔄 **تازه‌سازی**: دکمه refresh برای بارگذاری مجدد داده‌ها
561
+ * 📐 **تغییر اندازه ستون‌ها**: امکان تغییر عرض ستون‌ها توسط کاربر
562
+ * 📋 **پنل جزئیات**: نمایش جزئیات بیشتر برای هر سطر (expandable rows)
563
+ *
564
+ * ## Props مهم:
565
+ *
566
+ * | Prop | نوع | پیش‌فرض | توضیحات |
567
+ * |------|-----|---------|---------|
568
+ * | `data` | `T[]` | - | آرایه داده‌های جدول |
569
+ * | `columns` | `MRT_ColumnDef<T>[]` | - | تعریف ستون‌های جدول |
570
+ * | `pagination` | `MRT_PaginationState` | - | وضعیت صفحه‌بندی |
571
+ * | `totalRows` | `number` | - | تعداد کل رکوردها |
572
+ * | `isLoading` | `boolean` | `false` | وضعیت بارگذاری |
573
+ * | `disablePagination` | `boolean` | `false` | غیرفعال کردن پیجینیشن |
574
+ * | `manualSorting` | `boolean` | `false` | مرتب‌سازی سمت سرور |
575
+ * | `enableColumnResizing` | `boolean` | `false` | امکان تغییر عرض ستون |
576
+ * | `layoutMode` | `string` | `"semantic"` | حالت چیدمان (`"grid"` برای عرض ثابت) |
577
+ * | `refetch` | `() => void` | - | تابع تازه‌سازی داده‌ها |
550
578
  *
551
579
  * @template T - نوع داده‌های جدول
552
580
  *
553
581
  * @example
554
582
  * ```tsx
555
- * // مثال کامل استفاده
583
+ * // مثال ساده
584
+ * <DataTable
585
+ * data={users}
586
+ * columns={columns}
587
+ * pagination={{ pageIndex: 0, pageSize: 10 }}
588
+ * onPaginationChange={setPagination}
589
+ * totalRows={100}
590
+ * />
591
+ * ```
592
+ *
593
+ * @example
594
+ * ```tsx
595
+ * // مثال با تغییر اندازه ستون
596
+ * <DataTable
597
+ * data={users}
598
+ * columns={columns}
599
+ * pagination={pagination}
600
+ * onPaginationChange={setPagination}
601
+ * totalRows={100}
602
+ * enableColumnResizing={true}
603
+ * layoutMode="grid"
604
+ * />
605
+ * ```
606
+ *
607
+ * @example
608
+ * ```tsx
609
+ * // مثال بدون پیجینیشن
610
+ * <DataTable
611
+ * data={users}
612
+ * columns={columns}
613
+ * pagination={{ pageIndex: 0, pageSize: 100 }}
614
+ * onPaginationChange={() => {}}
615
+ * totalRows={users.length}
616
+ * disablePagination={true}
617
+ * />
618
+ * ```
619
+ *
620
+ * @example
621
+ * ```tsx
622
+ * // مثال کامل با همه قابلیت‌ها
556
623
  * function UsersTable() {
557
624
  * const { control, watch, reset } = useForm();
558
625
  *
@@ -566,7 +633,7 @@ type DataTableProps<T extends Record<string, any>> = {
566
633
  * }
567
634
  * });
568
635
  *
569
- * const { data, isLoading } = useGetUsers({
636
+ * const { data, isLoading, refetch } = useGetUsers({
570
637
  * PageNumber: tableState.pagination.pageIndex + 1,
571
638
  * PageSize: tableState.pagination.pageSize,
572
639
  * ...tableState.debouncedFiltring,
@@ -577,6 +644,7 @@ type DataTableProps<T extends Record<string, any>> = {
577
644
  * {
578
645
  * accessorKey: "name",
579
646
  * header: "نام کاربر",
647
+ * size: 200,
580
648
  * Filter: () => (
581
649
  * <FormInputText
582
650
  * control={control}
@@ -604,12 +672,20 @@ type DataTableProps<T extends Record<string, any>> = {
604
672
  * reset();
605
673
  * }}
606
674
  * manualSorting={true}
675
+ * enableColumnResizing={true}
676
+ * layoutMode="grid"
677
+ * refetch={refetch}
678
+ * renderDetailPanel={({ row }) => (
679
+ * <Box p={2}>
680
+ * <Typography>جزئیات کاربر: {row.original.name}</Typography>
681
+ * </Box>
682
+ * )}
607
683
  * />
608
684
  * );
609
685
  * }
610
686
  * ```
611
687
  */
612
- declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, }: DataTableProps<T>) => React$1.JSX.Element;
688
+ declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, disablePagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, layoutMode, renderDetailPanel, refetch, }: DataTableProps<T>) => React$1.JSX.Element;
613
689
 
614
690
  declare function imgViewer({ open, handleClose, src, isLoading, title, noResetBtn, noRotate, noZoom, unoptimized, }: {
615
691
  open: boolean;
package/dist/index.js CHANGED
@@ -4918,6 +4918,7 @@ var import_material30 = require("@mui/material");
4918
4918
  var import_material_react_table = require("material-react-table");
4919
4919
  var import_fa4 = require("material-react-table/locales/fa");
4920
4920
  var import_react30 = require("react");
4921
+ var import_md9 = require("react-icons/md");
4921
4922
  var customLocalization = {
4922
4923
  ...import_fa4.MRT_Localization_FA,
4923
4924
  mrt_columns_showHide_resetOrder: "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC \u062A\u0631\u062A\u06CC\u0628"
@@ -4931,6 +4932,7 @@ var DataTable = ({
4931
4932
  onPaginationChange,
4932
4933
  totalRows,
4933
4934
  manualPagination = true,
4935
+ disablePagination = false,
4934
4936
  columnFilters = [],
4935
4937
  onColumnFiltersChange,
4936
4938
  manualFiltering = true,
@@ -4958,22 +4960,26 @@ var DataTable = ({
4958
4960
  localization = customLocalization,
4959
4961
  enableColumnVirtualization = false,
4960
4962
  columnVirtualizerOptions = { overscan: 10 },
4961
- enableColumnResizing = false
4963
+ enableColumnResizing = false,
4964
+ layoutMode = "semantic",
4965
+ renderDetailPanel,
4966
+ refetch
4962
4967
  }) => {
4963
4968
  const memoizedColumns = (0, import_react30.useMemo)(() => columns, [columns]);
4964
4969
  const memoizedData = (0, import_react30.useMemo)(() => data, [data]);
4965
4970
  const defaultRenderTopToolbarCustomActions = ({ table: table2 }) => {
4966
4971
  const currentShowFilters = showColumnFilters !== void 0 ? showColumnFilters : table2.getState().showColumnFilters;
4967
- if (!currentShowFilters || !showClearFiltersButton || !onClearFilters)
4968
- return null;
4969
- return /* @__PURE__ */ React.createElement(import_material30.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React.createElement(
4972
+ const showClearButton = currentShowFilters && showClearFiltersButton && onClearFilters;
4973
+ return /* @__PURE__ */ React.createElement(
4970
4974
  import_material30.Box,
4971
4975
  {
4972
4976
  display: "flex",
4973
4977
  alignItems: "center",
4974
- justifyContent: "flex-start"
4978
+ justifyContent: "flex-start",
4979
+ gap: 1
4975
4980
  },
4976
- /* @__PURE__ */ React.createElement(
4981
+ refetch && /* @__PURE__ */ React.createElement(import_material30.Tooltip, { arrow: true, title: "\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC" }, /* @__PURE__ */ React.createElement(import_material30.IconButton, { onClick: () => refetch() }, /* @__PURE__ */ React.createElement(import_md9.MdOutlineRefresh, null))),
4982
+ showClearButton && /* @__PURE__ */ React.createElement(
4977
4983
  import_material30.Button,
4978
4984
  {
4979
4985
  color: "secondary",
@@ -4982,21 +4988,24 @@ var DataTable = ({
4982
4988
  },
4983
4989
  "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC \u0641\u06CC\u0644\u062A\u0631\u0647\u0627"
4984
4990
  )
4985
- ));
4991
+ );
4986
4992
  };
4987
4993
  const columnVirtualizerInstanceRef = (0, import_react30.useRef)(null);
4988
4994
  const table = (0, import_material_react_table.useMaterialReactTable)({
4989
4995
  columns: memoizedColumns,
4990
4996
  data: memoizedData,
4991
4997
  localization,
4992
- enableColumnResizing: false,
4998
+ enableColumnResizing,
4999
+ layoutMode,
4993
5000
  enableColumnVirtualization,
4994
5001
  columnVirtualizerInstanceRef,
4995
5002
  columnVirtualizerOptions,
5003
+ enableKeyboardShortcuts: false,
4996
5004
  // === صفحه‌بندی ===
4997
- manualPagination,
4998
- onPaginationChange,
4999
- pageCount: manualPagination ? Math.ceil(totalRows / pagination.pageSize) : void 0,
5005
+ enablePagination: !disablePagination,
5006
+ manualPagination: disablePagination ? false : manualPagination,
5007
+ onPaginationChange: disablePagination ? void 0 : onPaginationChange,
5008
+ pageCount: !disablePagination && manualPagination ? Math.ceil(totalRows / pagination.pageSize) : void 0,
5000
5009
  rowCount: totalRows ?? 0,
5001
5010
  // === فیلترینگ ===
5002
5011
  manualFiltering,
@@ -5026,12 +5035,22 @@ var DataTable = ({
5026
5035
  ...onShowColumnFiltersChange && { onShowColumnFiltersChange },
5027
5036
  ...onColumnOrderChange && { onColumnOrderChange },
5028
5037
  // === استایل‌دهی ===
5029
- muiTablePaperProps: { sx: { direction: "ltr" } },
5030
- muiTableBodyCellProps: { sx: { textAlign: "center" } },
5038
+ columnResizeDirection: "ltr",
5039
+ muiTableBodyCellProps: {
5040
+ sx: {
5041
+ textAlign: "center",
5042
+ "&:focus": {
5043
+ outline: "none"
5044
+ }
5045
+ }
5046
+ },
5031
5047
  muiTableHeadCellProps: {
5032
5048
  sx: {
5049
+ "&:focus": {
5050
+ outline: "none"
5051
+ },
5033
5052
  "& .Mui-TableHeadCell-Content": {
5034
- flexDirection: "row-reverse",
5053
+ flexDirection: "row",
5035
5054
  justifyContent: "center"
5036
5055
  }
5037
5056
  }
@@ -5045,6 +5064,8 @@ var DataTable = ({
5045
5064
  initialState: {
5046
5065
  density
5047
5066
  },
5067
+ // === قابلیت‌ها ===
5068
+ renderDetailPanel: renderDetailPanel ? ({ row, table: table2 }) => renderDetailPanel({ row, table: table2 }) : void 0,
5048
5069
  // === تولبارهای سفارشی ===
5049
5070
  renderTopToolbarCustomActions: renderTopToolbarCustomActions || defaultRenderTopToolbarCustomActions,
5050
5071
  renderBottomToolbarCustomActions,
@@ -5057,7 +5078,7 @@ var data_table_default = DataTable;
5057
5078
 
5058
5079
  // src/img-viewer/index.tsx
5059
5080
  var import_material31 = require("@mui/material");
5060
- var import_md9 = require("react-icons/md");
5081
+ var import_md10 = require("react-icons/md");
5061
5082
  var import_image6 = __toESM(require("next/image"));
5062
5083
  var import_react31 = require("react");
5063
5084
  function imgViewer({
@@ -5161,15 +5182,15 @@ function imgViewer({
5161
5182
  alignItems: "center"
5162
5183
  }
5163
5184
  },
5164
- /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: handleClose }, /* @__PURE__ */ React.createElement(import_md9.MdClose, { color: "white" })),
5185
+ /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: handleClose }, /* @__PURE__ */ React.createElement(import_md10.MdClose, { color: "white" })),
5165
5186
  !noResetBtn && /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: reset }, /* @__PURE__ */ React.createElement("span", { style: { color: "white", fontSize: "0.9rem" } }, "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC")),
5166
- !noRotate && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setRotate((r) => r - 90) }, /* @__PURE__ */ React.createElement(import_md9.MdRotateLeft, { color: "white" })), /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setRotate((r) => r + 90) }, /* @__PURE__ */ React.createElement(import_md9.MdRotateRight, { color: "white" }))),
5167
- !noZoom && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setZoom((z) => z + 0.2) }, /* @__PURE__ */ React.createElement(import_md9.MdZoomIn, { color: "white" })), /* @__PURE__ */ React.createElement(
5187
+ !noRotate && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setRotate((r) => r - 90) }, /* @__PURE__ */ React.createElement(import_md10.MdRotateLeft, { color: "white" })), /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setRotate((r) => r + 90) }, /* @__PURE__ */ React.createElement(import_md10.MdRotateRight, { color: "white" }))),
5188
+ !noZoom && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setZoom((z) => z + 0.2) }, /* @__PURE__ */ React.createElement(import_md10.MdZoomIn, { color: "white" })), /* @__PURE__ */ React.createElement(
5168
5189
  import_material31.IconButton,
5169
5190
  {
5170
5191
  onClick: () => setZoom((z) => Math.max(0.2, z - 0.2))
5171
5192
  },
5172
- /* @__PURE__ */ React.createElement(import_md9.MdZoomOut, { color: "white" })
5193
+ /* @__PURE__ */ React.createElement(import_md10.MdZoomOut, { color: "white" })
5173
5194
  )),
5174
5195
  /* @__PURE__ */ React.createElement(import_material31.Typography, { color: "white" }, title)
5175
5196
  ),
@@ -5224,7 +5245,7 @@ function imgViewer({
5224
5245
 
5225
5246
  // src/custom-dialog/index.tsx
5226
5247
  var import_material32 = require("@mui/material");
5227
- var import_md10 = require("react-icons/md");
5248
+ var import_md11 = require("react-icons/md");
5228
5249
  function CustomDialog({
5229
5250
  title,
5230
5251
  icon: Icon,
@@ -5312,7 +5333,7 @@ function CustomDialog({
5312
5333
  },
5313
5334
  disabled: isSubmiting
5314
5335
  },
5315
- /* @__PURE__ */ React.createElement(import_md10.MdClose, null)
5336
+ /* @__PURE__ */ React.createElement(import_md11.MdClose, null)
5316
5337
  )),
5317
5338
  /* @__PURE__ */ React.createElement(import_material32.Divider, null),
5318
5339
  /* @__PURE__ */ React.createElement(import_material32.DialogContent, null, children),