react-dialogger 1.1.131 → 1.1.132

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,9 +99,12 @@ var Placeholder = function (_a) {
99
99
  // </div>
100
100
  // }
101
101
  var PlaceholderWrapper = function (_a) {
102
- var _b;
102
+ var _b, _c, _d;
103
103
  var dialog = _a.dialog, dialogOptions = _a.dialogOptions, children = _a.children;
104
- var _c = React.useState(dialog.isInProcess()), inProcess = _c[0], setInProcess = _c[1];
104
+ var _e = React.useState({
105
+ message: (_c = (_b = dialog.dialogOptions.slotProps.loader) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : null,
106
+ inProcess: true
107
+ }), inProcess = _e[0], setInProcess = _e[1];
105
108
  React.useEffect(function () {
106
109
  var unsubscribe = dialog.processingListener(function () {
107
110
  setInProcess(dialog.isInProcess());
@@ -116,7 +119,7 @@ var PlaceholderWrapper = function (_a) {
116
119
  var LoaderSlotElement = initialElement
117
120
  ? React.cloneElement(initialElement, __assign(__assign({}, dialog.dialogOptions.slotProps.loader), { values: dialog.values, inProcess: dialog.isInProcess() }))
118
121
  : null;
119
- var backgroundColor = (_b = dialogOptions.base.style.backgroundColor) !== null && _b !== void 0 ? _b : "#FFFFFF";
122
+ var backgroundColor = (_d = dialogOptions.base.style.backgroundColor) !== null && _d !== void 0 ? _d : "#FFFFFF";
120
123
  return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-content-placeholder', style: { display: inProcess.inProcess ? 'flex' : 'none', backgroundColor: backgroundColor }, children: LoaderSlotElement });
121
124
  };
122
125
  // 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.131",
3
+ "version": "1.1.132",
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",
@@ -100,7 +100,10 @@ interface kSlotProps {
100
100
  };
101
101
  footer?: Record<string, any>;
102
102
  header?: Record<string, any>;
103
- loader?: Record<string, any>;
103
+ loader?: {
104
+ message?: string;
105
+ [key: string]: any;
106
+ };
104
107
  }
105
108
  export type DialogSlotLoaderProps = kSlotProps['loader'] & Pick<IDialogApiDef, 'values'> & {
106
109
  processing: IInProcess;