react-dialogger 1.1.128 → 1.1.130

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/README.md CHANGED
@@ -123,6 +123,22 @@ Custom Dialog Configurations
123
123
 
124
124
  Although a global configuration is set by useDialogOptions, each dialog can still be individually customized as needed. You can override the default settings for specific dialogs to meet particular requirements. This flexibility allows you to customize the appearance, behavior, and actions of each dialog instance separately, while still maintaining the benefits of a unified base configuration.
125
125
  ```
126
+
127
+ ## New feature
128
+ ```
129
+ backdrop: {
130
+ dimOnInactive: boolean
131
+ },
132
+ scaleable: boolean,
133
+ ```
134
+ #### Explanations:
135
+ * <b>backdrop.dimOnInactive</b>:
136
+ When set to true, the dialog will dim the background when it becomes inactive. This makes it easier for the user to identify which dialog is currently active.
137
+ * <b>scaleable</b>:
138
+ When set to true, the dialog becomes resizable, allowing the user to change its size. When this feature is enabled, resizing handles will appear around the dialog.
139
+
140
+
141
+
126
142
  ## Example Usage
127
143
 
128
144
  Below is an example of customizing a dialog using `baseDialogOptions`:
@@ -53,7 +53,7 @@ declare class DialogBase<V, I> extends Component<BaseDialogProps<V, I>, BaseDial
53
53
  get accessFrom(): TAccessFrom;
54
54
  initializeActionRef: (key: string) => RefObject<DialogActionBase>;
55
55
  get dialogOptions(): DialogOptionsType;
56
- get holder(): DialogOptionsType;
56
+ get holder(): DialogOptionsType['slot']['loader'];
57
57
  get formikProps(): FormikProps<any>;
58
58
  set formikProps(value: FormikProps<any>);
59
59
  get formikValidate(): Promise<DialogFormikAdapter<any>>;
@@ -69,7 +69,7 @@ var _context_1 = require("../context/index.js");
69
69
  var DialogBase = /** @class */ (function (_super) {
70
70
  __extends(DialogBase, _super);
71
71
  function DialogBase(props) {
72
- var _a, _b;
72
+ var _a, _b, _c, _d, _e;
73
73
  var _this = _super.call(this, props) || this;
74
74
  // ✨✨✨✨✨✨✨✨✨✨✨
75
75
  _this._dialogTranslate = { lastX: 0, lastY: 0 };
@@ -238,13 +238,13 @@ var DialogBase = /** @class */ (function (_super) {
238
238
  _this._bodyRef = React.createRef();
239
239
  _this._inProcess = { inProcess: false };
240
240
  _this._snackbarRef = React.createRef();
241
- _this._holder = props.initialHolder;
241
+ _this._holder = (_c = (_b = (_a = props.initialOptions) === null || _a === void 0 ? void 0 : _a.slot) === null || _b === void 0 ? void 0 : _b.loader) !== null && _c !== void 0 ? _c : props === null || props === void 0 ? void 0 : props.initialHolder;
242
242
  // Initialize _actionRefs as an empty object
243
243
  _this._actionRefs = {};
244
244
  _this._parent = props.parent;
245
245
  _this._dialogWithBackDropRef = (0, react_1.createRef)();
246
- _this._processingListeners = (_a = props.processingListeners) !== null && _a !== void 0 ? _a : [];
247
- _this._abortedListeners = (_b = props.abortedListeners) !== null && _b !== void 0 ? _b : [];
246
+ _this._processingListeners = (_d = props.processingListeners) !== null && _d !== void 0 ? _d : [];
247
+ _this._abortedListeners = (_e = props.abortedListeners) !== null && _e !== void 0 ? _e : [];
248
248
  _this._initialValues = props.initialValues;
249
249
  return _this;
250
250
  }
@@ -74,16 +74,16 @@ var appLogger_1 = require("../helpers/appLogger");
74
74
  var PlusIcon_1 = __importDefault(require("../icons/PlusIcon"));
75
75
  var MinusIcon_1 = __importDefault(require("../icons/MinusIcon"));
76
76
  var DialogContent = function (props) {
77
- var _a, _b, _c, _d, _e, _f, _g, _h;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
78
78
  var firstUpdate = React.useRef(true);
79
- var _j = (0, react_1.useContext)(_context_1.DialogContentContext), dialog = _j.dialog, dialogRef = _j.dialogRef, prevDialogRect = _j.prevDialogRect, backdropRef = _j.backdropRef, snackbarRef = _j.snackbarRef, footerRef = _j.footerRef, bodyRef = _j.bodyRef, headerRef = _j.headerRef, resizeableObject = _j.resizeableObject, body = _j.body;
79
+ var _k = (0, react_1.useContext)(_context_1.DialogContentContext), dialog = _k.dialog, dialogRef = _k.dialogRef, prevDialogRect = _k.prevDialogRect, backdropRef = _k.backdropRef, snackbarRef = _k.snackbarRef, footerRef = _k.footerRef, bodyRef = _k.bodyRef, headerRef = _k.headerRef, resizeableObject = _k.resizeableObject, body = _k.body;
80
80
  var dialogOptions = dialog.dialogOptions;
81
81
  var baseOptions = dialogOptions.base;
82
- var _k = React.useState(false), fullscreenMode = _k[0], setFullscreenMode = _k[1];
83
- var _l = React.useState(null), rect = _l[0], setRect = _l[1];
84
- var _m = React.useState(((_a = dialogOptions === null || dialogOptions === void 0 ? void 0 : dialogOptions.scale) !== null && _a !== void 0 ? _a : 1)), zoom = _m[0], setZoom = _m[1];
85
- var bounds = ((_b = dialog.dialogOptions.base) === null || _b === void 0 ? void 0 : _b.memoBounds) ? (0, _helpers_1.getDialogBounds)(dialog.dialogOptions.base.id) : null;
82
+ var _l = React.useState(false), fullscreenMode = _l[0], setFullscreenMode = _l[1];
83
+ var _m = React.useState(null), rect = _m[0], setRect = _m[1];
84
+ var bounds = ((_a = dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.memoBounds) ? (0, _helpers_1.getDialogBounds)(dialog.dialogOptions.base.id) : null;
86
85
  var domZIndex = window.getComputedStyle(dialog.getDom()).zIndex;
86
+ var _o = React.useState(((_b = bounds === null || bounds === void 0 ? void 0 : bounds.scale) !== null && _b !== void 0 ? _b : ((_c = dialogOptions === null || dialogOptions === void 0 ? void 0 : dialogOptions.scale) !== null && _c !== void 0 ? _c : 1))), zoom = _o[0], setZoom = _o[1];
87
87
  var positionSelector = function () {
88
88
  var _a;
89
89
  var dialogRectSelectors = { xKey: 'marginLeft', yKey: 'marginTop' };
@@ -151,13 +151,16 @@ var DialogContent = function (props) {
151
151
  dialogRef.current = null;
152
152
  };
153
153
  }, []);
154
- // TODO Bi dene Zoom + Scale ile drag yapiliyor (Resize eksik) & Memo tam coordine degil!!
155
- var scale = zoom; //dialogOptions?.scale ?? 1;
156
154
  // Set Zoom
157
155
  (0, react_1.useEffect)(function () {
156
+ var _a, _b;
158
157
  dialogOptions.scale = zoom;
158
+ if (((_a = dialogOptions.base) === null || _a === void 0 ? void 0 : _a.memoBounds) && ((_b = dialogOptions.base) === null || _b === void 0 ? void 0 : _b.id)) {
159
+ // const gb = getDialogBounds(dialogOptions.base.id)
160
+ (0, _helpers_1.setDialogBounds)(dialogOptions.base.id, __assign(__assign({}, bounds), { scale: zoom }), dialogRef);
161
+ }
159
162
  }, [zoom]);
160
- return (0, jsx_runtime_1.jsx)(react_draggable_1.default, { disabled: !baseOptions.draggable || fullscreenMode, axis: 'both', handle: baseOptions.draggable ? '.drag-handle' : '', scale: scale, nodeRef: dialogRef, onDrag: function (event, data) {
163
+ return (0, jsx_runtime_1.jsx)(react_draggable_1.default, { disabled: !baseOptions.draggable || fullscreenMode, axis: 'both', handle: baseOptions.draggable ? '.drag-handle' : '', scale: zoom, nodeRef: dialogRef, onDrag: function (event, data) {
161
164
  event.stopPropagation();
162
165
  dialog._dialogTranslate = { lastX: data.lastX, lastY: data.lastY };
163
166
  }, onStop: function (event, data) {
@@ -167,13 +170,13 @@ var DialogContent = function (props) {
167
170
  var _c = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(), width = _c.width, height = _c.height, x = _c.x, y = _c.y;
168
171
  (0, appLogger_1.appLog)('onDragStop', 'fired', (_b = dialogRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect());
169
172
  (0, _helpers_1.setDialogBounds)(dialogOptions.base.id, {
170
- width: width / scale,
171
- height: height / scale,
172
- x: x / scale,
173
- y: y / scale,
173
+ width: width / zoom,
174
+ height: height / zoom,
175
+ x: x / zoom,
176
+ y: y / zoom,
174
177
  fullscreen: false
175
178
  }, dialogRef);
176
- }, children: (0, jsx_runtime_1.jsxs)("div", { onBlur: function (event) {
179
+ }, children: (0, jsx_runtime_1.jsx)("div", { onBlur: function (event) {
177
180
  if (dialog.dialogOptions.backdrop.dimOnInactive) {
178
181
  dialogRef.current.classList.add('inactive');
179
182
  }
@@ -204,17 +207,21 @@ var DialogContent = function (props) {
204
207
  // @ts-ignore
205
208
  dialog.props.keyboardListener(e.key, _this);
206
209
  }
207
- }, className: baseOptions.size.width === 'auto' ? 'auto' : "dialog-width-".concat(dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(baseOptions.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ height: (_c = baseOptions.size.height) !== null && _c !== void 0 ? _c : 'auto' }, typeof baseOptions.size.width === "number" ? { width: "".concat(baseOptions.size.width, "px") } : { width: "".concat(baseOptions.size.width) }), { outline: 'none', fontFamily: (_d = baseOptions.style.fontFamily) !== null && _d !== void 0 ? _d : 'Arial' }), rect), { alignSelf: (_e = baseOptions.initialAnchor.vertical) !== null && _e !== void 0 ? _e : 'flex-start', justifySelf: (_f = baseOptions.initialAnchor.horizontal) !== null && _f !== void 0 ? _f : 'flex-start', zoom: scale !== null && scale !== void 0 ? scale : 1, overflow: 'unset' }), children: [dialog.dialogOptions.scaleable &&
208
- (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-zoom-root', style: { width: 36 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'dialog-zoom-wrapper', children: [(0, jsx_runtime_1.jsx)("div", { className: "zoom-action", onClick: function () {
209
- setZoom(function (prev) { return Number((prev + 0.1).toFixed(2)); }); // 0.6 → 0.7
210
- }, children: (0, jsx_runtime_1.jsx)(PlusIcon_1.default, { size: 22 }) }), (0, jsx_runtime_1.jsx)("div", { className: "zoom-action", onClick: function (event) {
211
- setZoom(function (prev) { return Number((prev - 0.1).toFixed(2)); }); // 0.7 0.6
212
- setTimeout(function () {
213
- event.clientX;
214
- });
215
- }, children: (0, jsx_runtime_1.jsx)(MinusIcon_1.default, { size: 22 }) })] }), (0, jsx_runtime_1.jsxs)("span", { className: 'dialog-zoom-label', children: [(Math.round(zoom * 100)), "%"] })] }), (0, jsx_runtime_1.jsxs)(notistack_1.SnackbarProvider, { ref: snackbarRef, maxSnack: dialog.dialogOptions.snackbar.maxSnack, style: __assign({ width: 'min-content' }, (_h = (_g = dialog.dialogOptions) === null || _g === void 0 ? void 0 : _g.snackbar) === null || _h === void 0 ? void 0 : _h.style), children: [(dialog.props.header || dialogOptions.slot.header) && ((0, jsx_runtime_1.jsx)(_1.DialogContentHeader, { ref: headerRef, header: dialog.props.header, bounds: bounds })), (0, jsx_runtime_1.jsx)(_1.DialogContentBody, { ref: bodyRef, body: body }), (0, jsx_runtime_1.jsx)(_1.DialogContentFooter, { ref: footerRef }), (baseOptions.resizeable) &&
216
- (0, jsx_runtime_1.jsx)(React.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "resizable-handle", style: {
217
- zIndex: parseInt(domZIndex) + 1
218
- }, onMouseDown: resizeableObject === null || resizeableObject === void 0 ? void 0 : resizeableObject.resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(_icons_1.ResizeIcon, { color: '#286e94' }) }) })] })] }) });
210
+ }, className: baseOptions.size.width === 'auto' ? 'auto' : "dialog-width-".concat(dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(baseOptions.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ height: (_d = baseOptions.size.height) !== null && _d !== void 0 ? _d : 'auto' }, typeof baseOptions.size.width === "number" ? { width: "".concat(baseOptions.size.width, "px") } : { width: "".concat(baseOptions.size.width) }), { outline: 'none', fontFamily: (_e = baseOptions.style.fontFamily) !== null && _e !== void 0 ? _e : 'Arial' }), rect), { alignSelf: (_f = baseOptions.initialAnchor.vertical) !== null && _f !== void 0 ? _f : 'flex-start', justifySelf: (_g = baseOptions.initialAnchor.horizontal) !== null && _g !== void 0 ? _g : 'flex-start', zoom: zoom !== null && zoom !== void 0 ? zoom : 1, overflow: 'hidden' }), children: (0, jsx_runtime_1.jsxs)(notistack_1.SnackbarProvider
211
+ // domRoot={document.getElementById('mirsak')}
212
+ , {
213
+ // domRoot={document.getElementById('mirsak')}
214
+ ref: snackbarRef, maxSnack: dialog.dialogOptions.snackbar.maxSnack, style: __assign({ width: 'min-content' }, (_j = (_h = dialog.dialogOptions) === null || _h === void 0 ? void 0 : _h.snackbar) === null || _j === void 0 ? void 0 : _j.style), children: [dialog.dialogOptions.scaleable &&
215
+ (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-zoom-root', style: { width: 36 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'dialog-zoom-wrapper', children: [(0, jsx_runtime_1.jsx)("div", { className: "zoom-action", onClick: function () {
216
+ setZoom(function (prev) { return Number((prev + 0.1).toFixed(2)); }); // 0.6 → 0.7
217
+ }, children: (0, jsx_runtime_1.jsx)(PlusIcon_1.default, { size: 22 }) }), (0, jsx_runtime_1.jsx)("div", { className: "zoom-action", onClick: function (event) {
218
+ setZoom(function (prev) { return Number((prev - 0.1).toFixed(2)); }); // 0.7 0.6
219
+ setTimeout(function () {
220
+ event.clientX;
221
+ });
222
+ }, children: (0, jsx_runtime_1.jsx)(MinusIcon_1.default, { size: 22 }) })] }), (0, jsx_runtime_1.jsxs)("span", { className: 'dialog-zoom-label', children: [(Math.round(zoom * 100)), "%"] })] }), (dialog.props.header || dialogOptions.slot.header) && ((0, jsx_runtime_1.jsx)(_1.DialogContentHeader, { ref: headerRef, header: dialog.props.header, bounds: bounds })), (0, jsx_runtime_1.jsx)(_1.DialogContentBody, { ref: bodyRef, body: body }), (0, jsx_runtime_1.jsx)(_1.DialogContentFooter, { ref: footerRef }), (baseOptions.resizeable) &&
223
+ (0, jsx_runtime_1.jsx)(React.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "resizable-handle", style: {
224
+ zIndex: parseInt(domZIndex) + 1
225
+ }, onMouseDown: resizeableObject === null || resizeableObject === void 0 ? void 0 : resizeableObject.resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(_icons_1.ResizeIcon, { color: '#286e94' }) }) })] }) }) });
219
226
  };
220
227
  exports.DialogContent = DialogContent;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -50,6 +61,64 @@ var Placeholder = function (_a) {
50
61
  display: placeholder ? 'flex' : 'none',
51
62
  }, children: placeholder });
52
63
  };
64
+ // /**
65
+ // * @deprecated gereksiz render */
66
+ // const PlaceholderWrapper_: React.FC<{dialog: IDialogApiDef, dialogOptions: DialogOptionsType, children: React.ReactNode}> = ({dialog, dialogOptions, children}) => {
67
+ // const bgColor = dialogOptions.base.style.backgroundColor ?
68
+ // dialogOptions.base.style.backgroundColor : "#FFFFFF";
69
+ // const bg = dialogOptions.base.style.background ?
70
+ // dialogOptions.base.style.background : "#FFFFFF";
71
+ //
72
+ // const [inProcess, setInProcess] = React.useState<any>();
73
+ //
74
+ // React.useEffect(() => {
75
+ // dialog.processingListener( inProcess => {
76
+ // setInProcess(dialog.isInProcess);
77
+ // })
78
+ // }, []);
79
+ //
80
+ // const LoaderSlotElement = children ? React.isValidElement(children)
81
+ // ? React.cloneElement( children as React.ReactElement<DialogOptionsType['slotProps']['loader'] & {dialog: IDialogApiDef}>, {
82
+ // ...dialog.dialogOptions.slotProps.loader,
83
+ // dialog
84
+ // })
85
+ // : React.createElement(children as unknown as React.JSXElementConstructor<DialogOptionsType['slotProps']['loader'] & {dialog: IDialogApiDef}>, {
86
+ // ...dialog.dialogOptions.slotProps.loader,
87
+ // dialog
88
+ // }) : null
89
+ //
90
+ // console.log('PlaceholderWrapper', dialog.isInProcess().message)
91
+ //
92
+ // return <div className={'dialog-content-placeholder'} style={{
93
+ // backgroundColor: bgColor,
94
+ // background: bg,
95
+ // display: "flex"
96
+ // }}>
97
+ // {/*{children}*/}
98
+ // {LoaderSlotElement}
99
+ // </div>
100
+ // }
101
+ var PlaceholderWrapper = function (_a) {
102
+ var _b;
103
+ var dialog = _a.dialog, dialogOptions = _a.dialogOptions, children = _a.children;
104
+ var _c = React.useState(dialog.isInProcess()), inProcess = _c[0], setInProcess = _c[1];
105
+ React.useEffect(function () {
106
+ var unsubscribe = dialog.processingListener(function () {
107
+ setInProcess(dialog.isInProcess());
108
+ });
109
+ // return () => (unsubscribe as any)?.()
110
+ }, [dialog]);
111
+ var initialElement = React.useState(function () {
112
+ if (!children)
113
+ return null;
114
+ return React.isValidElement(children) ? children : React.createElement(children, {});
115
+ })[0];
116
+ var LoaderSlotElement = initialElement
117
+ ? React.cloneElement(initialElement, __assign(__assign({}, dialog.dialogOptions.slotProps.loader), { values: dialog.values, inProcess: dialog.isInProcess() }))
118
+ : null;
119
+ var backgroundColor = (_b = dialogOptions.base.style.backgroundColor) !== null && _b !== void 0 ? _b : "#FFFFFF";
120
+ return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-content-placeholder', style: { display: 'flex', backgroundColor: backgroundColor }, children: LoaderSlotElement });
121
+ };
53
122
  // const DialogContentBody: React.FC<IContentBodyProps> = React.forwardRef(({
54
123
  // body
55
124
  // }, ref ) => {
@@ -67,8 +136,18 @@ var DialogContentBody = React.forwardRef(function (_a, ref) {
67
136
  setProcessing: setProcessing,
68
137
  inProcess: inProcess
69
138
  }); });
139
+ // const LoaderSlotElement = dialog.holder ? React.isValidElement(dialog.holder)
140
+ // ? React.cloneElement( dialog.holder as React.ReactElement<DialogOptionsType['slotProps']['loader'] & {dialog: IDialogApiDef}>, {
141
+ // ...dialog.dialogOptions.slotProps.loader,
142
+ // dialog
143
+ // })
144
+ // : React.createElement(dialog.holder as JSXElementConstructor<DialogOptionsType['slotProps']['loader'] & {dialog: IDialogApiDef}>, {
145
+ // ...dialog.dialogOptions.slotProps.loader,
146
+ // dialog
147
+ // }) : null
148
+ console.log('LoaderSlotElement', dialog.isInProcess());
70
149
  if (body instanceof Function) {
71
- return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-body', style: { height: '100%' }, children: [dialog.holder && (0, jsx_runtime_1.jsx)(Placeholder, { dialogOptions: dialog.dialogOptions, placeholder: dialog.holder }), body(dialog)] });
150
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-body', style: { height: '100%' }, children: [dialog.holder && (0, jsx_runtime_1.jsx)(PlaceholderWrapper, { dialog: dialog, dialogOptions: dialog.dialogOptions, children: dialog.holder }), body(dialog)] });
72
151
  }
73
152
  return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-body', style: { height: '100%', padding: 10 }, children: dialog.holder ?
74
153
  (0, jsx_runtime_1.jsx)(Placeholder, { dialogOptions: dialog.dialogOptions, placeholder: dialog.holder })
@@ -78,7 +78,7 @@ var setDialogBounds = function (dialogId, bounds, dialogRef) {
78
78
  // Save to RAM
79
79
  initDialogMemoizeBounds_1.registeredDialogs.set(combined.join('-'), {
80
80
  id: combined.join('-'),
81
- bounds: bounds
81
+ bounds: __assign(__assign({}, (0, exports.getDialogBounds)(dialogId)), bounds)
82
82
  });
83
83
  /**
84
84
  * const myMap = new Map();
@@ -92,7 +92,7 @@ var setDialogBounds = function (dialogId, bounds, dialogRef) {
92
92
  *
93
93
  * */
94
94
  // Save to Store
95
- (0, appLogger_1.appLog)('registeredDialogs', initDialogMemoizeBounds_1.registeredDialogs);
95
+ // console.log('registeredDialogs', registeredDialogs);
96
96
  try {
97
97
  window.localStorage.setItem(initDialogMemoizeBounds_1.BOUNDS_STORE_KEY, JSON.stringify(Array.from(initDialogMemoizeBounds_1.registeredDialogs)));
98
98
  }
@@ -37,6 +37,7 @@ declare class Dialog<V, I> {
37
37
  stateListener(listener: TDialogStateListenerCallbackType): this;
38
38
  processingListener(listener: (inProcess: boolean) => void): this;
39
39
  onAbort(callbackFn: TDialogCallbackFn<V, I, void>): this;
40
+ /**@deprecated use slot.loader instead */
40
41
  initialHolder(holder: TInitialHolder): this;
41
42
  keyboardListener(listener: (key: string, dialog: IDialogApiDef) => void): this;
42
43
  resizeListener(listener: (size: IDialogSize, dialog: IDialogApiDef) => void): this;
package/models/Dialog.js CHANGED
@@ -155,6 +155,7 @@ var Dialog = /** @class */ (function () {
155
155
  this._abortedListeners.push(callbackFn);
156
156
  return this;
157
157
  };
158
+ /**@deprecated use slot.loader instead */
158
159
  Dialog.prototype.initialHolder = function (holder) {
159
160
  this._initialHolder = holder;
160
161
  return this;
@@ -76,7 +76,7 @@ var BASE_DIALOG_OPTIONS = {
76
76
  busyMessage: "Please wait...",
77
77
  },
78
78
  slot: {
79
- action: undefined,
79
+ action: undefined
80
80
  },
81
81
  slotProps: {
82
82
  action: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.128",
3
+ "version": "1.1.130",
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",
@@ -5,6 +5,7 @@ export interface IDialogBoundsDef {
5
5
  x: number;
6
6
  y: number;
7
7
  fullscreen: boolean;
8
+ scale?: number;
8
9
  }
9
10
  export interface IDialogBoundDef {
10
11
  id: IDialogBoundsMemoKey;
@@ -41,6 +41,7 @@ export interface BaseDialogProps<V extends Record<string, any>, I> {
41
41
  didMountCallback?: TDialogCallbackFn<V, I, void>;
42
42
  dialogSize?: IDialogSize;
43
43
  stateListener: TDialogStateListenerCallbackType;
44
+ /**@deprecated use slot.loader instead */
44
45
  initialHolder: TInitialHolder;
45
46
  snackbarAnchor?: ISnackbarAnchor;
46
47
  dom: HTMLDivElement;
@@ -90,6 +91,7 @@ interface kSlot {
90
91
  action?: React.JSXElementConstructor<any>;
91
92
  footer?: React.JSXElementConstructor<any>;
92
93
  header?: React.JSXElementConstructor<any>;
94
+ loader?: React.JSXElementConstructor<any>;
93
95
  }
94
96
  interface kSlotProps {
95
97
  action?: {
@@ -98,6 +100,7 @@ interface kSlotProps {
98
100
  };
99
101
  footer?: Record<string, any>;
100
102
  header?: Record<string, any>;
103
+ loader?: Record<string, any>;
101
104
  }
102
105
  export interface IBaseDialogOptions {
103
106
  closeable?: boolean;
@@ -236,7 +239,7 @@ export interface IBackdropOptions {
236
239
  dimOnInactive?: boolean;
237
240
  }
238
241
  export type TNotifyOnClosing = "snackbar" | "zoom" | undefined;
239
- export type TInitialHolder = any;
242
+ export type TInitialHolder = kSlot['loader'];
240
243
  export type TLoaderHolder = any;
241
244
  export interface IInProcess {
242
245
  inProcess: boolean;