@mamrp/components 1.0.36 → 1.0.38
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 +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import React__default, { ReactNode, CSSProperties, Dispatch, SetStateAction } fr
|
|
|
3
3
|
import { Control, FieldValues, Path, FieldErrors, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
import { Moment } from 'moment-jalaali';
|
|
5
5
|
import { SxProps, Theme } from '@mui/material';
|
|
6
|
-
import { GridColDef } from '@mui/x-data-grid';
|
|
6
|
+
import { GridColDef, GridRowSelectionModel, GridRowParams } from '@mui/x-data-grid';
|
|
7
7
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
8
8
|
|
|
9
9
|
interface MultipleSelectChipProps {
|
|
@@ -228,8 +228,12 @@ type TapleProps = {
|
|
|
228
228
|
setsortQuery?: Dispatch<SetStateAction<any | null>>;
|
|
229
229
|
sortQuery?: any;
|
|
230
230
|
fontSize?: number | string;
|
|
231
|
+
checkboxSelection?: boolean;
|
|
232
|
+
selectedRows?: GridRowSelectionModel;
|
|
233
|
+
setSelectedRows?: Dispatch<SetStateAction<GridRowSelectionModel>>;
|
|
234
|
+
isRowSelectable?: (params: GridRowParams) => boolean;
|
|
231
235
|
};
|
|
232
|
-
declare const Table: ({ pagingmode, totalRows, rows, columns, paginationModel, setPaginationModel, loading, rowId, _tools, _CustomFooter, rowInPage, highlightedRowId, evenRowBgColor, sortFieldMapping, setsortQuery, sortQuery, fontSize, ...rest }: TapleProps) => React__default.JSX.Element;
|
|
236
|
+
declare const Table: ({ pagingmode, totalRows, rows, columns, paginationModel, setPaginationModel, loading, rowId, _tools, _CustomFooter, rowInPage, highlightedRowId, evenRowBgColor, sortFieldMapping, setsortQuery, sortQuery, fontSize, checkboxSelection, selectedRows, setSelectedRows, isRowSelectable, ...rest }: TapleProps) => React__default.JSX.Element;
|
|
233
237
|
|
|
234
238
|
type FormInputNumberProps<T extends FieldValues> = {
|
|
235
239
|
control: Control<T>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React__default, { ReactNode, CSSProperties, Dispatch, SetStateAction } fr
|
|
|
3
3
|
import { Control, FieldValues, Path, FieldErrors, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
import { Moment } from 'moment-jalaali';
|
|
5
5
|
import { SxProps, Theme } from '@mui/material';
|
|
6
|
-
import { GridColDef } from '@mui/x-data-grid';
|
|
6
|
+
import { GridColDef, GridRowSelectionModel, GridRowParams } from '@mui/x-data-grid';
|
|
7
7
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
8
8
|
|
|
9
9
|
interface MultipleSelectChipProps {
|
|
@@ -228,8 +228,12 @@ type TapleProps = {
|
|
|
228
228
|
setsortQuery?: Dispatch<SetStateAction<any | null>>;
|
|
229
229
|
sortQuery?: any;
|
|
230
230
|
fontSize?: number | string;
|
|
231
|
+
checkboxSelection?: boolean;
|
|
232
|
+
selectedRows?: GridRowSelectionModel;
|
|
233
|
+
setSelectedRows?: Dispatch<SetStateAction<GridRowSelectionModel>>;
|
|
234
|
+
isRowSelectable?: (params: GridRowParams) => boolean;
|
|
231
235
|
};
|
|
232
|
-
declare const Table: ({ pagingmode, totalRows, rows, columns, paginationModel, setPaginationModel, loading, rowId, _tools, _CustomFooter, rowInPage, highlightedRowId, evenRowBgColor, sortFieldMapping, setsortQuery, sortQuery, fontSize, ...rest }: TapleProps) => React__default.JSX.Element;
|
|
236
|
+
declare const Table: ({ pagingmode, totalRows, rows, columns, paginationModel, setPaginationModel, loading, rowId, _tools, _CustomFooter, rowInPage, highlightedRowId, evenRowBgColor, sortFieldMapping, setsortQuery, sortQuery, fontSize, checkboxSelection, selectedRows, setSelectedRows, isRowSelectable, ...rest }: TapleProps) => React__default.JSX.Element;
|
|
233
237
|
|
|
234
238
|
type FormInputNumberProps<T extends FieldValues> = {
|
|
235
239
|
control: Control<T>;
|
package/dist/index.js
CHANGED
|
@@ -3138,6 +3138,10 @@ var Table = ({
|
|
|
3138
3138
|
setsortQuery,
|
|
3139
3139
|
sortQuery,
|
|
3140
3140
|
fontSize,
|
|
3141
|
+
checkboxSelection = false,
|
|
3142
|
+
selectedRows,
|
|
3143
|
+
setSelectedRows,
|
|
3144
|
+
isRowSelectable,
|
|
3141
3145
|
...rest
|
|
3142
3146
|
}) => {
|
|
3143
3147
|
const [sortModel, setSortModel] = import_react19.default.useState([]);
|
|
@@ -3212,6 +3216,14 @@ var Table = ({
|
|
|
3212
3216
|
return /* @__PURE__ */ import_react19.default.createElement(ScrollableContainer, null, /* @__PURE__ */ import_react19.default.createElement(
|
|
3213
3217
|
import_x_data_grid.DataGrid,
|
|
3214
3218
|
{
|
|
3219
|
+
checkboxSelection: selectedRows != void 0,
|
|
3220
|
+
rowSelectionModel: selectedRows,
|
|
3221
|
+
isRowSelectable: isRowSelectable ? (params) => isRowSelectable(params) : void 0,
|
|
3222
|
+
onRowSelectionModelChange: (newSelection) => {
|
|
3223
|
+
if (setSelectedRows) {
|
|
3224
|
+
setSelectedRows(newSelection);
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3215
3227
|
rows,
|
|
3216
3228
|
columns: columns.map((column) => ({ ...column })),
|
|
3217
3229
|
disableRowSelectionOnClick: true,
|
|
@@ -3629,7 +3641,7 @@ var UploadImage = ({
|
|
|
3629
3641
|
startIcon: /* @__PURE__ */ import_react23.default.createElement(import_md5.MdOutlineCameraAlt, { size: 16 }),
|
|
3630
3642
|
onClick: () => document.getElementById("camera-upload")?.click()
|
|
3631
3643
|
},
|
|
3632
|
-
"\
|
|
3644
|
+
"\u062F\u0648\u0631\u0628\u06CC\u0646"
|
|
3633
3645
|
), /* @__PURE__ */ import_react23.default.createElement(
|
|
3634
3646
|
import_material21.Button,
|
|
3635
3647
|
{
|
|
@@ -3639,7 +3651,7 @@ var UploadImage = ({
|
|
|
3639
3651
|
startIcon: /* @__PURE__ */ import_react23.default.createElement(import_gr.GrGallery, { size: 16 }),
|
|
3640
3652
|
onClick: () => document.getElementById("gallery-upload")?.click()
|
|
3641
3653
|
},
|
|
3642
|
-
"\
|
|
3654
|
+
"\u06AF\u0627\u0644\u0631\u06CC"
|
|
3643
3655
|
)),
|
|
3644
3656
|
!allowGallery && /* @__PURE__ */ import_react23.default.createElement(
|
|
3645
3657
|
"input",
|