@zydon/common-csr 2.1.0 → 2.1.1

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.
@@ -14,8 +14,9 @@ interface ListingRulesModalProps {
14
14
  disable: boolean;
15
15
  confirm: VoidFunction;
16
16
  initialMode?: string;
17
+ onChangeRuleType?: (ruleType: string) => void;
17
18
  }
18
19
 
19
- declare const ListingRulesModal: ({ rules, open, close, formId, loading, disable, confirm, initialMode, }: ListingRulesModalProps) => react_jsx_runtime.JSX.Element;
20
+ declare const ListingRulesModal: ({ rules, open, close, formId, loading, disable, confirm, initialMode, onChangeRuleType, }: ListingRulesModalProps) => react_jsx_runtime.JSX.Element;
20
21
 
21
22
  export { ListingRulesModal as default };
@@ -1,10 +1,10 @@
1
1
  import { a } from '../../../chunk-IWHIWC75.js';
2
2
  import { useFormContext } from 'react-hook-form';
3
- import f from '@mui/material/Button';
4
- import g from '@zydon/common/components/ActionButton';
5
- import C from '@zydon/common/components/Modal';
3
+ import g from '@mui/material/Button';
4
+ import C from '@zydon/common/components/ActionButton';
5
+ import M from '@zydon/common/components/Modal';
6
6
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
7
7
 
8
- var M=({rules:l,open:n,close:a$1,formId:e,loading:s,disable:d,confirm:m,initialMode:u})=>{let{reset:c}=useFormContext(),t=()=>{c(),a$1();};return jsx(Fragment,{children:jsx(C,{fullWidth:!0,maxWidth:"lg",open:n,onClose:t,dialogTitle:"Nova regra de listagem",actions:jsxs(Fragment,{children:[jsx(f,{variant:"outlined",color:"inherit",onClick:t,children:"Fechar"}),jsx(g,{form:e,loading:s,actionType:"CREATE",color:"primary",variant:"contained",disabled:d,onClick:m,children:"Salvar"})]}),children:jsx(a,{rules:l,initialMode:u})})})},T=M;
8
+ var R=({rules:r,open:n,close:e,formId:a$1,loading:s,disable:d,confirm:m,initialMode:u,onChangeRuleType:p})=>{let{reset:c}=useFormContext(),t=()=>{c(),e();};return jsx(Fragment,{children:jsx(M,{fullWidth:!0,maxWidth:"lg",open:n,onClose:t,dialogTitle:"Nova regra de listagem",actions:jsxs(Fragment,{children:[jsx(g,{variant:"outlined",color:"inherit",onClick:t,children:"Fechar"}),jsx(C,{form:a$1,loading:s,actionType:"CREATE",color:"primary",variant:"contained",disabled:d,onClick:m,children:"Salvar"})]}),children:jsx(a,{rules:r,setRuleType:p,initialMode:u})})})},A=R;
9
9
 
10
- export { T as default };
10
+ export { A as default };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.0",
2
+ "version": "2.1.1",
3
3
  "name": "@zydon/common-csr",
4
4
  "description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
5
5
  "license": "MIT",