react-dialogger 1.1.143 → 1.1.146

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.
@@ -164,7 +164,7 @@ var DialogContent = function (props) {
164
164
  (0, react_1.useEffect)(function () {
165
165
  var _a, _b;
166
166
  dialogOptions.scale = zoom;
167
- if (((_a = dialogOptions.base) === null || _a === void 0 ? void 0 : _a.memoBounds) && ((_b = dialogOptions.base) === null || _b === void 0 ? void 0 : _b.id)) {
167
+ if (((_a = dialogOptions.base) === null || _a === void 0 ? void 0 : _a.memoBounds) && ((_b = dialogOptions.base) === null || _b === void 0 ? void 0 : _b.id) && bounds) {
168
168
  // const gb = getDialogBounds(dialogOptions.base.id)
169
169
  (0, _helpers_1.setDialogBounds)(dialogOptions.base.id, __assign(__assign({}, bounds), { scale: zoom }), dialogRef);
170
170
  }
@@ -131,12 +131,13 @@ var PlaceholderWrapper = function (_a) {
131
131
  // body
132
132
  // }, ref ) => {
133
133
  var DialogContentBody = React.forwardRef(function (_a, ref) {
134
+ var _b, _c;
134
135
  var body = _a.body;
135
136
  var dialog = (0, react_1.useContext)(_context_1.DialogContentContext).dialog;
136
137
  // Imperative handle
137
- var _b = React.useState({
138
+ var _d = React.useState({
138
139
  inProcess: false
139
- }), inProcess = _b[0], setInProcess = _b[1];
140
+ }), inProcess = _d[0], setInProcess = _d[1];
140
141
  var setProcessing = function (processing) {
141
142
  setInProcess(processing);
142
143
  };
@@ -144,7 +145,7 @@ var DialogContentBody = React.forwardRef(function (_a, ref) {
144
145
  setProcessing: setProcessing,
145
146
  inProcess: inProcess
146
147
  }); });
147
- return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-body', style: { height: '100%' }, children: [dialog.holder &&
148
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-body', style: __assign({ height: '100%' }, (_c = (_b = dialog.dialogOptions.base) === null || _b === void 0 ? void 0 : _b.body) === null || _c === void 0 ? void 0 : _c.style), children: [dialog.holder &&
148
149
  (0, jsx_runtime_1.jsx)(PlaceholderWrapper, { dialog: dialog, dialogOptions: dialog.dialogOptions, children: dialog.holder }), body(dialog)] });
149
150
  // if(body instanceof Function){
150
151
  // return <div className={'dialog-body'} style={{ height: '100%'}}>
@@ -93,9 +93,9 @@ window["dialogOptions"] = structuredClone(BASE_DIALOG_OPTIONS);
93
93
  * Deep + safe merge
94
94
  */
95
95
  var baseDialogOptions = function (options) {
96
- var _a, _b;
96
+ var _a, _b, _c, _d, _e, _f, _g, _h;
97
97
  if (options === void 0) { options = {}; }
98
98
  var base = structuredClone(BASE_DIALOG_OPTIONS);
99
- window["dialogOptions"] = __assign(__assign(__assign({}, base), options), { backdrop: __assign(__assign({}, base.backdrop), options.backdrop), base: __assign(__assign(__assign({}, base.base), options.base), { style: __assign(__assign({}, base.base.style), (_a = options.base) === null || _a === void 0 ? void 0 : _a.style) }), progress: __assign(__assign({}, base.progress), options.progress), snackbar: __assign(__assign(__assign({}, base.snackbar), options.snackbar), { anchorOrigin: __assign(__assign({}, base.snackbar.anchorOrigin), (_b = options.snackbar) === null || _b === void 0 ? void 0 : _b.anchorOrigin) }), slot: __assign(__assign({}, base.slot), options.slot), slotProps: __assign(__assign({}, base.slotProps), options.slotProps) });
99
+ window["dialogOptions"] = __assign(__assign(__assign({}, base), options), { backdrop: __assign(__assign({}, base.backdrop), options.backdrop), base: __assign(__assign(__assign({}, base.base), options.base), { style: __assign(__assign({}, base.base.style), (_a = options.base) === null || _a === void 0 ? void 0 : _a.style), body: __assign(__assign(__assign({}, (_b = base.base) === null || _b === void 0 ? void 0 : _b.body), (_c = options.base) === null || _c === void 0 ? void 0 : _c.body), { style: __assign(__assign({}, (_e = (_d = base.base) === null || _d === void 0 ? void 0 : _d.body) === null || _e === void 0 ? void 0 : _e.style), (_g = (_f = options.base) === null || _f === void 0 ? void 0 : _f.body) === null || _g === void 0 ? void 0 : _g.style) }) }), progress: __assign(__assign({}, base.progress), options.progress), snackbar: __assign(__assign(__assign({}, base.snackbar), options.snackbar), { anchorOrigin: __assign(__assign({}, base.snackbar.anchorOrigin), (_h = options.snackbar) === null || _h === void 0 ? void 0 : _h.anchorOrigin) }), slot: __assign(__assign({}, base.slot), options.slot), slotProps: __assign(__assign({}, base.slotProps), options.slotProps) });
100
100
  };
101
101
  exports.baseDialogOptions = baseDialogOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.143",
3
+ "version": "1.1.146",
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/styles/dialog.css CHANGED
@@ -327,7 +327,7 @@
327
327
  inset: 0;
328
328
  pointer-events: none;
329
329
  z-index: 500;
330
- animation: resizeHintFade 3.2s ease-in-out forwards;
330
+ animation: resizeHintFade 5s ease-in-out forwards;
331
331
  }
332
332
  .dialog-main .rh {
333
333
  position: absolute;
@@ -123,6 +123,9 @@ export interface IBaseDialogOptions {
123
123
  footer?: {
124
124
  style?: React.CSSProperties;
125
125
  };
126
+ body?: {
127
+ style?: React.CSSProperties;
128
+ };
126
129
  style?: React.CSSProperties;
127
130
  size?: IDialogSize;
128
131
  notifyOnClosing?: TNotifyOnClosing;