@mamrp/components 1.4.2 → 1.4.4

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.js CHANGED
@@ -4815,6 +4815,10 @@ var DataTable = ({
4815
4815
  sorting = [],
4816
4816
  onSortingChange,
4817
4817
  manualSorting = false,
4818
+ columnVisibility = {},
4819
+ onColumnVisibilityChange,
4820
+ columnOrder = [],
4821
+ onColumnOrderChange,
4818
4822
  enableStickyHeader = true,
4819
4823
  maxHeight = "calc(100vh - 200px)",
4820
4824
  density = "compact",
@@ -4854,32 +4858,37 @@ var DataTable = ({
4854
4858
  columns: memoizedColumns,
4855
4859
  data: memoizedData,
4856
4860
  localization,
4857
- // Pagination
4861
+ // === صفحه‌بندی ===
4858
4862
  manualPagination,
4859
4863
  onPaginationChange,
4860
4864
  pageCount: manualPagination ? Math.ceil(totalRows / pagination.pageSize) : void 0,
4861
4865
  rowCount: totalRows ?? 0,
4862
- // Filtering
4866
+ // === فیلترینگ ===
4863
4867
  manualFiltering,
4864
4868
  onColumnFiltersChange,
4865
4869
  enableColumnFilterModes,
4866
4870
  enableGlobalFilter,
4867
- // Sorting
4871
+ // === مرتب‌سازی ===
4868
4872
  manualSorting,
4869
4873
  onSortingChange,
4870
- // Features
4874
+ // === ویژگی‌ها ===
4871
4875
  enableColumnOrdering,
4872
4876
  enableRowSelection,
4873
4877
  enableStickyHeader,
4874
- // State
4878
+ // === وضعیت جدول ===
4875
4879
  state: {
4876
4880
  pagination,
4877
- columnFilters,
4881
+ // columnFilters, // غیرفعال شده - فیلترها از طریق useTableState مدیریت می‌شوند
4878
4882
  sorting,
4883
+ columnVisibility,
4884
+ ...columnOrder && Array.isArray(columnOrder) && columnOrder.length > 0 && { columnOrder },
4879
4885
  isLoading,
4880
4886
  showProgressBars: isRefetching
4881
4887
  },
4882
- // Styling
4888
+ // === Event Handlers ===
4889
+ onColumnVisibilityChange,
4890
+ ...onColumnOrderChange && { onColumnOrderChange },
4891
+ // === استایل‌دهی ===
4883
4892
  muiTablePaperProps: { sx: { direction: "ltr" } },
4884
4893
  muiTableBodyCellProps: { sx: { textAlign: "center" } },
4885
4894
  muiTableHeadCellProps: {
@@ -4895,14 +4904,14 @@ var DataTable = ({
4895
4904
  maxHeight
4896
4905
  }
4897
4906
  },
4898
- // Initial state
4907
+ // === حالت اولیه ===
4899
4908
  initialState: {
4900
4909
  density
4901
4910
  },
4902
- // Custom toolbars
4911
+ // === تولبارهای سفارشی ===
4903
4912
  renderTopToolbarCustomActions: renderTopToolbarCustomActions || defaultRenderTopToolbarCustomActions,
4904
4913
  renderBottomToolbarCustomActions,
4905
- // Override with any additional options
4914
+ // 🔧 اعمال تنظیمات اضافی
4906
4915
  ...tableOptions
4907
4916
  });
4908
4917
  return /* @__PURE__ */ React.createElement(import_material_react_table.MaterialReactTable, { table });