react-dialogger 1.1.69 → 1.1.70
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/components/DialogBase.d.ts +1 -1
- package/components/DialogBase.js +17 -5
- package/models/Dialog.d.ts +1 -1
- package/models/Dialog.js +2 -2
- package/package.json +1 -1
- package/types/DialogTypes.d.ts +1 -1
|
@@ -36,7 +36,7 @@ declare class DialogBase<Values extends FormikProps<Values>> extends Component<B
|
|
|
36
36
|
private readonly _dialogWithBackDropRef;
|
|
37
37
|
protected readonly _parent: Dialog;
|
|
38
38
|
private _accessFrom;
|
|
39
|
-
private
|
|
39
|
+
private _processingListeners;
|
|
40
40
|
constructor(props?: Readonly<BaseDialogProps>);
|
|
41
41
|
private T;
|
|
42
42
|
private readonly _features;
|
package/components/DialogBase.js
CHANGED
|
@@ -70,6 +70,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
70
70
|
__extends(DialogBase, _super);
|
|
71
71
|
function DialogBase(props) {
|
|
72
72
|
if (props === void 0) { props = {}; }
|
|
73
|
+
var _a;
|
|
73
74
|
var _this = _super.call(this, props) || this;
|
|
74
75
|
// ✨✨✨✨✨✨✨✨✨✨✨
|
|
75
76
|
_this._dialogTranslate = { lastX: 0, lastY: 0 };
|
|
@@ -127,9 +128,20 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
127
128
|
if (!process) {
|
|
128
129
|
_this.snackbar.close("kInProcess");
|
|
129
130
|
}
|
|
130
|
-
if
|
|
131
|
-
|
|
131
|
+
// if( typeof this._processingListener === "function" ){
|
|
132
|
+
// this._processingListener(process);
|
|
133
|
+
//
|
|
134
|
+
// }
|
|
135
|
+
for (var _i = 0, _d = _this._processingListeners; _i < _d.length; _i++) {
|
|
136
|
+
var listener = _d[_i];
|
|
137
|
+
if (typeof listener === "function") {
|
|
138
|
+
listener(process);
|
|
139
|
+
}
|
|
132
140
|
}
|
|
141
|
+
// if( ._processingListener === "function" ){
|
|
142
|
+
// // this._processingListener(process);
|
|
143
|
+
// //
|
|
144
|
+
// // }
|
|
133
145
|
// @ts-ignore
|
|
134
146
|
(_c = _this._footerRef.current) === null || _c === void 0 ? void 0 : _c.setProcessing(process);
|
|
135
147
|
return _this;
|
|
@@ -182,7 +194,6 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
182
194
|
prevDialogRect: (0, _helpers_1.dialogRectAuto)(),
|
|
183
195
|
body: props.body
|
|
184
196
|
};
|
|
185
|
-
console.log('Class_Type', _this instanceof DialogBase);
|
|
186
197
|
var defaultOptions = {
|
|
187
198
|
base: {
|
|
188
199
|
initialAnchor: {
|
|
@@ -227,7 +238,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
227
238
|
_this._initialValues = props.initialValues;
|
|
228
239
|
_this._dialogWithBackDropRef = (0, react_1.createRef)();
|
|
229
240
|
_this._parent = props.parent;
|
|
230
|
-
_this.
|
|
241
|
+
_this._processingListeners = (_a = props.processingListeners) !== null && _a !== void 0 ? _a : [];
|
|
231
242
|
_this._features = [];
|
|
232
243
|
console.log('this._dialogOptions', _this._dialogOptions);
|
|
233
244
|
return _this;
|
|
@@ -401,7 +412,8 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
401
412
|
};
|
|
402
413
|
DialogBase.prototype.processingListener = function (listener) {
|
|
403
414
|
// @ts-ignore
|
|
404
|
-
this.
|
|
415
|
+
// this._processingListeners = listener;
|
|
416
|
+
this._processingListeners.push(listener);
|
|
405
417
|
return this;
|
|
406
418
|
};
|
|
407
419
|
Object.defineProperty(DialogBase.prototype, "snackbar", {
|
package/models/Dialog.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface DialogProps {
|
|
|
5
5
|
setHeader(header: TDialogCallbackFn): Dialog;
|
|
6
6
|
}
|
|
7
7
|
declare class Dialog implements DialogProps {
|
|
8
|
-
private
|
|
8
|
+
private _processingListeners;
|
|
9
9
|
private _stateListener;
|
|
10
10
|
private _keyboardListener;
|
|
11
11
|
private _resizeListener;
|
package/models/Dialog.js
CHANGED
|
@@ -116,7 +116,7 @@ var Dialog = /** @class */ (function () {
|
|
|
116
116
|
};
|
|
117
117
|
Dialog.prototype.processingListener = function (listener) {
|
|
118
118
|
// @ts-ignore
|
|
119
|
-
this.
|
|
119
|
+
this._processingListeners = listener;
|
|
120
120
|
return this;
|
|
121
121
|
};
|
|
122
122
|
Dialog.prototype.initialValues = function (values) {
|
|
@@ -150,7 +150,7 @@ var Dialog = /** @class */ (function () {
|
|
|
150
150
|
// Refs
|
|
151
151
|
headerRef: this._headerRef,
|
|
152
152
|
// Listeners
|
|
153
|
-
stateListener: this._stateListener, keyboardListener: this._keyboardListener, resizeListener: this._resizeListener,
|
|
153
|
+
stateListener: this._stateListener, keyboardListener: this._keyboardListener, resizeListener: this._resizeListener, processingListeners: this._processingListeners,
|
|
154
154
|
// Others
|
|
155
155
|
dialogSize: this._dialogSize, initialHolder: this._initialHolder, snackbarAnchor: this._snackbarAnchor, root: root, dom: dom, parent: this }, this._apiRef ? { ref: this._apiRef } : null), { onClose: this._onCloseCallback });
|
|
156
156
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.70",
|
|
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",
|
package/types/DialogTypes.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface BaseDialogProps {
|
|
|
42
42
|
root?: any;
|
|
43
43
|
keyboardListener: (key: string, dialog: IDialogApiDef) => void;
|
|
44
44
|
resizeListener?: (size: IDialogSize, dialog: IDialogApiDef) => void;
|
|
45
|
-
|
|
45
|
+
processingListeners?: Array<(inProcess: boolean) => void>;
|
|
46
46
|
}
|
|
47
47
|
export interface IDialogSize {
|
|
48
48
|
width?: ITypeWidth | number;
|