react-dialogger 1.1.70 → 1.1.71
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.js
CHANGED
|
@@ -89,7 +89,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
89
89
|
return _this._actionRefs[key];
|
|
90
90
|
};
|
|
91
91
|
_this.setInProcess = function (process, message, holder) {
|
|
92
|
-
var _a, _b, _c;
|
|
92
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
93
93
|
_this._inProcess = __assign({ inProcess: process }, message ? { message: message } : {});
|
|
94
94
|
if (!process) {
|
|
95
95
|
_this._holder = null;
|
|
@@ -104,12 +104,12 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
104
104
|
for (var actionKey in _this._actionRefs) {
|
|
105
105
|
var action = _this._actionRefs[actionKey];
|
|
106
106
|
// Save the current disabled state before changing it
|
|
107
|
-
var currentDisabled = action.current.options.disabled;
|
|
107
|
+
var currentDisabled = (_d = (_c = action.current) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.disabled;
|
|
108
108
|
console.log('this._actions', currentDisabled, process);
|
|
109
109
|
// Set the options with prevDisabled as the current disabled state
|
|
110
110
|
if (currentDisabled !== process) {
|
|
111
111
|
action.current
|
|
112
|
-
.updateOptions(__assign(__assign({}, action.current.options), { prevDisabled: currentDisabled, disabled: process // Set the new disabled state based on the process
|
|
112
|
+
.updateOptions(__assign(__assign({}, (_f = (_e = action.current) === null || _e === void 0 ? void 0 : _e.options) !== null && _f !== void 0 ? _f : {}), { prevDisabled: currentDisabled, disabled: process // Set the new disabled state based on the process
|
|
113
113
|
}));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -119,8 +119,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
119
119
|
var action = _this._actionRefs[actionKey];
|
|
120
120
|
// Restore the previous disabled state from options
|
|
121
121
|
// Call prevDisabled state from memo
|
|
122
|
-
action.current
|
|
123
|
-
.updateOptions(__assign(__assign({}, action.current.options), { disabled: action.current.options.prevDisabled // Set the new disabled state based on the process
|
|
122
|
+
(_g = action.current) === null || _g === void 0 ? void 0 : _g.updateOptions(__assign(__assign({}, (_j = (_h = action.current) === null || _h === void 0 ? void 0 : _h.options) !== null && _j !== void 0 ? _j : {}), { disabled: action.current.options.prevDisabled // Set the new disabled state based on the process
|
|
124
123
|
}));
|
|
125
124
|
}
|
|
126
125
|
}
|
|
@@ -132,8 +131,8 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
132
131
|
// this._processingListener(process);
|
|
133
132
|
//
|
|
134
133
|
// }
|
|
135
|
-
for (var _i = 0,
|
|
136
|
-
var listener =
|
|
134
|
+
for (var _i = 0, _l = _this._processingListeners; _i < _l.length; _i++) {
|
|
135
|
+
var listener = _l[_i];
|
|
137
136
|
if (typeof listener === "function") {
|
|
138
137
|
listener(process);
|
|
139
138
|
}
|
|
@@ -143,7 +142,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
143
142
|
// //
|
|
144
143
|
// // }
|
|
145
144
|
// @ts-ignore
|
|
146
|
-
(
|
|
145
|
+
(_k = _this._footerRef.current) === null || _k === void 0 ? void 0 : _k.setProcessing(process);
|
|
147
146
|
return _this;
|
|
148
147
|
};
|
|
149
148
|
_this.isInProcess = function () {
|
|
@@ -60,15 +60,17 @@ var DialogContentHeader = function (_a) {
|
|
|
60
60
|
var baseOptions = dialogOptions.base;
|
|
61
61
|
var _g = React.useState(bounds === null || bounds === void 0 ? void 0 : bounds.fullscreen), fullscreen = _g[0], setFullscreen = _g[1];
|
|
62
62
|
(0, react_1.useEffect)(function () {
|
|
63
|
+
var _a, _b, _c;
|
|
63
64
|
if (fullscreen) {
|
|
64
|
-
dialogRef.current.classList.add('fullscreen');
|
|
65
|
+
(_a = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _a === void 0 ? void 0 : _a.classList.add('fullscreen');
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
67
|
-
dialogRef.current.classList.remove('fullscreen');
|
|
68
|
+
(_b = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _b === void 0 ? void 0 : _b.classList.remove('fullscreen');
|
|
68
69
|
}
|
|
69
|
-
dialogRef.current.classList.add('no-user-select');
|
|
70
|
+
(_c = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _c === void 0 ? void 0 : _c.classList.add('no-user-select');
|
|
70
71
|
setTimeout(function () {
|
|
71
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
(_a = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove('no-user-select');
|
|
72
74
|
}, 300);
|
|
73
75
|
}, [fullscreen]);
|
|
74
76
|
var CustomHeader = (_b = dialogOptions.slot) === null || _b === void 0 ? void 0 : _b.header;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.71",
|
|
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",
|