@zydon/common-csr 2.0.55 → 2.0.57
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { GridColDef, GridRowsProp } from '@mui/x-data-grid-premium';
|
|
2
|
+
import { GridColDef, GridRowsProp, GridRowSelectionModel } from '@mui/x-data-grid-premium';
|
|
3
3
|
|
|
4
4
|
interface ManualRuleProps {
|
|
5
5
|
columns: GridColDef[];
|
|
@@ -13,8 +13,10 @@ interface ManualRuleProps {
|
|
|
13
13
|
}) => void;
|
|
14
14
|
page: number;
|
|
15
15
|
perPage: number;
|
|
16
|
+
rowSelectionModel: GridRowSelectionModel;
|
|
17
|
+
onRowSelectionModelChange(values: GridRowSelectionModel): void;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
declare const ManualRules: ({ columns, rows, page, perPage, loading, fetching, totalRows, handlePaginationChange, }: ManualRuleProps) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare const ManualRules: ({ columns, rows, page, perPage, loading, fetching, totalRows, handlePaginationChange, onRowSelectionModelChange, rowSelectionModel, }: ManualRuleProps) => react_jsx_runtime.JSX.Element;
|
|
19
21
|
|
|
20
22
|
export { ManualRules as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { useFormContext } from 'react-hook-form';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import s from '@mui/material/Stack';
|
|
4
|
+
import R from '@mui/material/Typography';
|
|
5
|
+
import k from '@zydon/common/components/DataGrid';
|
|
6
6
|
import z from '@zydon/common/components/SearchInput';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var v=({columns:c,rows:p,page:n=0,perPage:r=5,loading:u,fetching:g,totalRows:f,handlePaginationChange:m,onRowSelectionModelChange:d,rowSelectionModel:a})=>{let{setValue:S}=useFormContext();useEffect(()=>()=>{S("config",{});},[]);let[h,i]=useState(),y=()=>{let e=h?.toLowerCase();return p.filter(w=>Object.values(w).some(o=>typeof o=="string"||o instanceof String?o.toLowerCase().includes(e||""):!1))};return jsxs(s,{gap:2,position:"relative",children:[jsxs(s,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsx(z,{onSearch:e=>i(e),onChange:e=>i(e.target.value),iconPosition:"start",size:"small",placeholder:"Buscar"}),jsxs(R,{variant:"body1",color:"text.disabled",children:[a.length," selecionados"]})]}),jsx(k,{columns:c,rows:y(),pagination:!0,paginationModel:{page:n,pageSize:r},rowCount:f,paginationMode:"server",onPaginationModelChange:m,initialState:{pagination:{paginationModel:{pageSize:r,page:n}}},pageSizeOptions:[5],loading:u,fetching:g,checkboxSelection:!0,onRowSelectionModelChange:d,rowSelectionModel:a})]})},T=v;
|
|
10
10
|
|
|
11
|
-
export {
|
|
11
|
+
export { T as default };
|
package/package.json
CHANGED