react-dialogger 1.1.135 → 1.1.137

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.
@@ -4,6 +4,8 @@ import { TInitialHolder, IDialogSize, TDialogStateListenerCallbackType, DialogOp
4
4
  declare class Dialog<V, I> {
5
5
  private _initialValues?;
6
6
  private _inject?;
7
+ private static _globalWrapper?;
8
+ static setGlobalWrapper(wrapper: React.ComponentType): void;
7
9
  private readonly _processingListeners;
8
10
  private readonly _abortedListeners;
9
11
  private _stateListener;
package/models/Dialog.js CHANGED
@@ -69,6 +69,10 @@ var Dialog = /** @class */ (function () {
69
69
  * */
70
70
  this._headerRef = React.createRef();
71
71
  this.highestZ = function () {
72
+ var _a, _b;
73
+ if ((_a = _this._dialogOptions) === null || _a === void 0 ? void 0 : _a.zIndex) {
74
+ return (_b = _this._dialogOptions) === null || _b === void 0 ? void 0 : _b.zIndex;
75
+ }
72
76
  var presentationElements = document.querySelectorAll('div[data-family="presentation"]');
73
77
  var highest = 1201;
74
78
  presentationElements.forEach(function (element) {
@@ -107,6 +111,9 @@ var Dialog = /** @class */ (function () {
107
111
  }
108
112
  // this._xrefs = {} as DialogExternalRefs<StockDialogRefs>;
109
113
  }
114
+ Dialog.setGlobalWrapper = function (wrapper) {
115
+ Dialog._globalWrapper = wrapper;
116
+ };
110
117
  Dialog.prototype.inject = function (args) {
111
118
  // @ts-ignore
112
119
  var t = new Dialog(this._apiRef, this._dialogOptions, this._initialValues, args);
@@ -200,7 +207,12 @@ var Dialog = /** @class */ (function () {
200
207
  // root.render( React.createElement( DialogBase as React.ComponentType<
201
208
  // typeof this._initialValues
202
209
  // >, props ) );
203
- root.render(React.createElement(DialogBase_1.default, props));
210
+ // root.render( React.createElement( DialogBase as React.ComponentType<BaseDialogProps<Values, I>>, props ) );
211
+ var element = React.createElement(DialogBase_1.default, props);
212
+ // Wrapper varsa sar, yoksa direkt render
213
+ root.render(Dialog._globalWrapper
214
+ ? React.createElement(Dialog._globalWrapper, null, element)
215
+ : element);
204
216
  };
205
217
  return Dialog;
206
218
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.135",
3
+ "version": "1.1.137",
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",
@@ -85,8 +85,9 @@ interface IDialogOptionsType {
85
85
  };
86
86
  scale?: number;
87
87
  scaleable?: boolean;
88
+ zIndex?: number;
88
89
  }
89
- export type DialogOptionsType = Partial<Pick<IDialogOptionsType, 'base' | 'snackbar' | 'backdrop' | 'slotProps' | 'slot' | 'animate' | 'progress' | 'scale' | 'scaleable' | 'localText'>>;
90
+ export type DialogOptionsType = Partial<Pick<IDialogOptionsType, 'base' | 'snackbar' | 'backdrop' | 'slotProps' | 'slot' | 'animate' | 'progress' | 'scale' | 'scaleable' | 'localText' | 'zIndex'>>;
90
91
  interface kSlot {
91
92
  action?: React.JSXElementConstructor<any>;
92
93
  footer?: React.JSXElementConstructor<any>;