react-dialogger 1.1.132 → 1.1.134
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.
|
@@ -99,18 +99,19 @@ var Placeholder = function (_a) {
|
|
|
99
99
|
// </div>
|
|
100
100
|
// }
|
|
101
101
|
var PlaceholderWrapper = function (_a) {
|
|
102
|
-
var _b, _c
|
|
102
|
+
var _b, _c;
|
|
103
103
|
var dialog = _a.dialog, dialogOptions = _a.dialogOptions, children = _a.children;
|
|
104
|
+
var _d = (_b = dialog.dialogOptions.slotProps.loader) !== null && _b !== void 0 ? _b : { message: null }, message = _d.message, loading = _d.loading;
|
|
104
105
|
var _e = React.useState({
|
|
105
|
-
message:
|
|
106
|
-
inProcess: true
|
|
106
|
+
message: message,
|
|
107
|
+
inProcess: typeof loading === "boolean" ? loading : true
|
|
107
108
|
}), inProcess = _e[0], setInProcess = _e[1];
|
|
108
109
|
React.useEffect(function () {
|
|
109
|
-
var unsubscribe = dialog.processingListener(function () {
|
|
110
|
+
var unsubscribe = dialog.processingListener(function (processing) {
|
|
110
111
|
setInProcess(dialog.isInProcess());
|
|
111
112
|
});
|
|
112
113
|
// return () => (unsubscribe as any)?.()
|
|
113
|
-
}, [
|
|
114
|
+
}, []);
|
|
114
115
|
var initialElement = React.useState(function () {
|
|
115
116
|
if (!children)
|
|
116
117
|
return null;
|
|
@@ -119,7 +120,7 @@ var PlaceholderWrapper = function (_a) {
|
|
|
119
120
|
var LoaderSlotElement = initialElement
|
|
120
121
|
? React.cloneElement(initialElement, __assign(__assign({}, dialog.dialogOptions.slotProps.loader), { values: dialog.values, inProcess: dialog.isInProcess() }))
|
|
121
122
|
: null;
|
|
122
|
-
var backgroundColor = (
|
|
123
|
+
var backgroundColor = (_c = dialogOptions.base.style.backgroundColor) !== null && _c !== void 0 ? _c : "#FFFFFF";
|
|
123
124
|
return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-content-placeholder', style: { display: inProcess.inProcess ? 'flex' : 'none', backgroundColor: backgroundColor }, children: LoaderSlotElement });
|
|
124
125
|
};
|
|
125
126
|
// const DialogContentBody: React.FC<IContentBodyProps> = React.forwardRef(({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.134",
|
|
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",
|