ados-rcm 1.0.49 → 1.0.51
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/AModule/AComponents/ADialog/ADialog.d.ts +30 -17
- package/dist/index.cjs.js +10 -10
- package/dist/index.es.js +1289 -1290
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Resources } from '../AResource/AResource';
|
|
3
3
|
import { IAEvent, TActionRef } from '../ATypes/ATypes';
|
|
4
4
|
/**
|
|
@@ -85,6 +85,12 @@ export interface IADialogProps {
|
|
|
85
85
|
* Description : onCancel of the dialog. it runs close by default
|
|
86
86
|
*/
|
|
87
87
|
onCancel?: (e: IAEvent) => void;
|
|
88
|
+
/**
|
|
89
|
+
* onClose : () => void;
|
|
90
|
+
*
|
|
91
|
+
* Description : onClose of the dialog. it runs dlgState.onClose by default
|
|
92
|
+
*/
|
|
93
|
+
onClose?: () => void;
|
|
88
94
|
/**
|
|
89
95
|
* onEnterPress : (e: IAEvent) => void;
|
|
90
96
|
*
|
|
@@ -168,14 +174,17 @@ export interface IADialogProps {
|
|
|
168
174
|
* }
|
|
169
175
|
*
|
|
170
176
|
* if (case 1)
|
|
171
|
-
*
|
|
172
|
-
* <
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
177
|
+
* <>
|
|
178
|
+
* <ADialogFrame dlgState={dlgState}>
|
|
179
|
+
* <ADialog dlgState={dlgState}
|
|
180
|
+
* title='Dialog Title'
|
|
181
|
+
* onOk={onOk}
|
|
182
|
+
* onCancel={onCancel}>
|
|
183
|
+
* <div>Content</div>
|
|
184
|
+
* </ADialog>
|
|
185
|
+
* </ADialogFrame>
|
|
186
|
+
* <AButton onClick={dlgState.open}>Open Dialog</AButton>
|
|
187
|
+
* </>
|
|
179
188
|
*
|
|
180
189
|
* if (case 2)
|
|
181
190
|
* <ADialogFrame dlgState={dlgState}>
|
|
@@ -201,21 +210,25 @@ export interface IADialogProps {
|
|
|
201
210
|
* }
|
|
202
211
|
*
|
|
203
212
|
*/
|
|
204
|
-
export declare const ADialog: (props: IADialogProps) =>
|
|
213
|
+
export declare const ADialog: (props: IADialogProps) => React.ReactPortal;
|
|
205
214
|
export interface IADialogState {
|
|
206
215
|
isOpen: boolean;
|
|
207
216
|
setIsOpen: (isOpen: boolean) => void;
|
|
208
217
|
open: () => void;
|
|
209
|
-
|
|
218
|
+
onClose: () => void;
|
|
210
219
|
}
|
|
211
|
-
export declare const useADialogState: () =>
|
|
212
|
-
isOpen: boolean;
|
|
213
|
-
setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
214
|
-
open: () => void;
|
|
215
|
-
close: () => void;
|
|
216
|
-
};
|
|
220
|
+
export declare const useADialogState: () => IADialogState;
|
|
217
221
|
export interface IADialogFrameProps {
|
|
222
|
+
/**
|
|
223
|
+
* dlgState : IADialogState
|
|
224
|
+
*
|
|
225
|
+
* Description : isOpen of the dialog. you can 'open' using this.
|
|
226
|
+
* you can 'close' using actionRef. not this.
|
|
227
|
+
*/
|
|
218
228
|
dlgState: IADialogState;
|
|
229
|
+
/**
|
|
230
|
+
* children : React.ReactElement
|
|
231
|
+
*/
|
|
219
232
|
children: React.ReactElement;
|
|
220
233
|
}
|
|
221
234
|
export declare const ADialogFrame: (props: IADialogFrameProps) => import("react/jsx-runtime").JSX.Element;
|