react-dialogger 1.1.13 → 1.1.14
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.
@@ -38,7 +38,7 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
38
38
|
protected readonly _parent: Dialog;
|
39
39
|
protected _dialogOptions?: DialogOptionsType;
|
40
40
|
protected _shInterval: number;
|
41
|
-
protected _onClose:
|
41
|
+
protected _onClose: TDialogCallbackVoidFn;
|
42
42
|
private _inProcess;
|
43
43
|
/**
|
44
44
|
* @deprecated
|
@@ -87,7 +87,7 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
87
87
|
stateListener(listener: TDialogStateListenerCallbackType): DialogBase;
|
88
88
|
protected keyboardListener(listener: (key: string, dialog: IDialogDef) => void): DialogBase;
|
89
89
|
protected initialHolder(holder: TInitialHolder): DialogBase;
|
90
|
-
protected onClose(callback:
|
90
|
+
protected onClose(callback: TDialogCallbackVoidFn): DialogBase;
|
91
91
|
setInProcess_noRef: (process: boolean, message?: string, holder?: TInitialHolder) => DialogBase;
|
92
92
|
setInProcess: (process: boolean, message?: string, holder?: TInitialHolder) => DialogBase;
|
93
93
|
isInProcess: () => IInProcess;
|
package/components/DialogBase.js
CHANGED
@@ -245,7 +245,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
245
245
|
// unmountComponentAtNode(this.props.dom);
|
246
246
|
// @deprecated
|
247
247
|
if (typeof _this._onClose === "function") {
|
248
|
-
_this._onClose();
|
248
|
+
_this._onClose(_this);
|
249
249
|
}
|
250
250
|
if (typeof callbackFn === "function") {
|
251
251
|
callbackFn();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-dialogger",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.14",
|
4
4
|
"description": "This package is a continuation of the react-araci package. Due to an error, react-araci was removed, and it has been decided to continue under the new package name react-dialogger",
|
5
5
|
"main": "index.js",
|
6
6
|
"author": "Sueleyman Topaloglu",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
}
|
22
22
|
],
|
23
23
|
"scripts": {
|
24
|
-
"pb": "npm version patch && npm publish"
|
24
|
+
"pb": "git add . && git commit -m \"My Changes update\" && npm version patch && npm publish"
|
25
25
|
},
|
26
26
|
"keywords": [
|
27
27
|
"react",
|
package/types/DialogTypes.d.ts
CHANGED
@@ -32,7 +32,7 @@ export interface BaseDialogProps {
|
|
32
32
|
snackbarAnchor?: ISnackbarAnchor;
|
33
33
|
dom: HTMLDivElement;
|
34
34
|
parent?: Dialog;
|
35
|
-
onClose?:
|
35
|
+
onClose?: TDialogCallbackVoidFn;
|
36
36
|
root?: any;
|
37
37
|
keyboardListener: (key: string, dialog: Dialog) => void;
|
38
38
|
}
|
@@ -114,7 +114,7 @@ export interface IStateDef extends Pick<BaseDialogState, "values" | "fullscreenM
|
|
114
114
|
export interface IListenerDialogDef extends Omit<IDialogDef, "state" | "values" | "setValues"> {
|
115
115
|
}
|
116
116
|
export type TDialogStateListenerCallbackType = (state: IStateDef, values: DialogValues, dialog: IListenerDialogDef) => void;
|
117
|
-
type TDialogCallbackFn<T> = (dialog
|
117
|
+
type TDialogCallbackFn<T> = (dialog?: IDialogDef) => T;
|
118
118
|
export type TDialogCallbackNodeFn = TDialogCallbackFn<string | React.ReactElement<any>> | React.ReactNode | React.JSX.Element;
|
119
119
|
export type TDialogCallbackVoidFn = TDialogCallbackFn<void>;
|
120
120
|
export interface IDialogDef extends Omit<Partial<Pick<DialogBase, 'isInProcess' | 'setInProcess' | 'values' | 'setValue' | 'setValues' | 'close' | 'dialogOptions' | 'switchFullScreen' | 'actions' | 'snackbar' | 'formikValidate' | 'formikProps' | 'focus' | 'setOrder' | 'setBody'>>, 'switchFullScreen'> {
|