@mamrp/components 1.7.23 → 1.7.25
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/charts/index.d.mts +0 -0
- package/dist/charts/index.d.ts +0 -0
- package/dist/charts/index.js +0 -0
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/index.mjs +0 -0
- package/dist/charts/index.mjs.map +1 -1
- package/dist/date-pickers/index.d.mts +0 -0
- package/dist/date-pickers/index.d.ts +0 -0
- package/dist/date-pickers/index.js +0 -0
- package/dist/date-pickers/index.js.map +0 -0
- package/dist/date-pickers/index.mjs +0 -0
- package/dist/date-pickers/index.mjs.map +0 -0
- package/dist/index.d.mts +81 -5
- package/dist/index.d.ts +81 -5
- package/dist/index.js +42 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -25
- package/dist/index.mjs.map +1 -1
- package/dist/pagination/index.d.mts +0 -0
- package/dist/pagination/index.d.ts +0 -0
- package/dist/pagination/index.js +0 -0
- package/dist/pagination/index.js.map +0 -0
- package/dist/pagination/index.mjs +0 -0
- package/dist/pagination/index.mjs.map +0 -0
- package/dist/selectors/index.d.mts +0 -0
- package/dist/selectors/index.d.ts +0 -0
- package/dist/selectors/index.js +0 -0
- package/dist/selectors/index.js.map +1 -1
- package/dist/selectors/index.mjs +0 -0
- package/dist/selectors/index.mjs.map +1 -1
- package/package.json +3 -2
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
|
-
|
|
4968
|
-
|
|
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
|
|
4998
|
+
enableColumnResizing,
|
|
4999
|
+
layoutMode,
|
|
4993
5000
|
enableColumnVirtualization,
|
|
4994
5001
|
columnVirtualizerInstanceRef,
|
|
4995
5002
|
columnVirtualizerOptions,
|
|
5003
|
+
enableKeyboardShortcuts: false,
|
|
4996
5004
|
// === صفحهبندی ===
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
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
|
-
|
|
5030
|
-
muiTableBodyCellProps: {
|
|
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
|
|
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
|
|
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(
|
|
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(
|
|
5167
|
-
!noZoom && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material31.IconButton, { onClick: () => setZoom((z) => z + 0.2) }, /* @__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(
|
|
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
|
|
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(
|
|
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),
|