react-dialogger 1.1.136 → 1.1.138
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/components/DialogContent.js +2 -2
- package/models/Dialog.js +11 -2
- package/package.json +1 -1
- package/types/DialogTypes.d.ts +3 -2
|
@@ -187,12 +187,12 @@ var DialogContent = function (props) {
|
|
|
187
187
|
}, id: "dialog-main", ref: dialogRef, onClick: function (e) {
|
|
188
188
|
e.stopPropagation();
|
|
189
189
|
if (dialog.dialogOptions.backdrop.throughable) {
|
|
190
|
-
var toppest = dialog.props.zFinder();
|
|
190
|
+
var toppest = dialog.props.zFinder(true);
|
|
191
191
|
var dom = dialog.getDom();
|
|
192
192
|
console.log('toppest', parseInt(dom.style.zIndex), toppest);
|
|
193
193
|
if (dom) {
|
|
194
194
|
if (parseInt(dom.style.zIndex) < toppest) {
|
|
195
|
-
dom.style.zIndex = String(dialog.props.zFinder() + 1);
|
|
195
|
+
dom.style.zIndex = String(dialog.props.zFinder(true) + 1);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
}
|
package/models/Dialog.js
CHANGED
|
@@ -68,8 +68,13 @@ var Dialog = /** @class */ (function () {
|
|
|
68
68
|
* UI / Dialog / Form bağlamında alışıldık
|
|
69
69
|
* */
|
|
70
70
|
this._headerRef = React.createRef();
|
|
71
|
-
this.highestZ = function () {
|
|
72
|
-
var
|
|
71
|
+
this.highestZ = function (throughableOnly) {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
if (throughableOnly === void 0) { throughableOnly = false; }
|
|
74
|
+
if ((_a = _this._dialogOptions) === null || _a === void 0 ? void 0 : _a.zIndex) {
|
|
75
|
+
return (_b = _this._dialogOptions) === null || _b === void 0 ? void 0 : _b.zIndex;
|
|
76
|
+
}
|
|
77
|
+
var presentationElements = document.querySelectorAll("div[data-family=\"presentation\"]".concat(throughableOnly ? ' > div.dialogger-throughable' : ''));
|
|
73
78
|
var highest = 1201;
|
|
74
79
|
presentationElements.forEach(function (element) {
|
|
75
80
|
var z = parseInt(window.getComputedStyle(element).zIndex, 10);
|
|
@@ -86,6 +91,10 @@ var Dialog = /** @class */ (function () {
|
|
|
86
91
|
dom.setAttribute('data-type', 'dialog');
|
|
87
92
|
dom.setAttribute('data-family', 'presentation');
|
|
88
93
|
dom.classList.add('react-guzzle-root');
|
|
94
|
+
// if(Boolean(this._dialogOptions?.backdrop?.throughable) && this._dialogOptions?.backdrop?.throughable){
|
|
95
|
+
// dom.classList.add('throughable');
|
|
96
|
+
// }
|
|
97
|
+
dom.classList.add('react-guzzle-root');
|
|
89
98
|
dom.style.setProperty('z-index', String(_this.highestZ() + 1));
|
|
90
99
|
// Find root element
|
|
91
100
|
var rootElement = document.getElementById('root');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.138",
|
|
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/types/DialogTypes.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface BaseDialogProps<V extends Record<string, any>, I> {
|
|
|
52
52
|
resizeListener?: (size: IDialogSize, dialog: IDialogApiDef<V, I>) => void;
|
|
53
53
|
processingListeners?: Array<(inProcess: boolean, message: string) => void>;
|
|
54
54
|
abortedListeners?: Array<(dialog: IDialogApiDef<V, I>) => void>;
|
|
55
|
-
zFinder: () => number;
|
|
55
|
+
zFinder: (throughableOnly: boolean) => number;
|
|
56
56
|
}
|
|
57
57
|
export interface DialogContentBodyReturnType {
|
|
58
58
|
setProcessing: React.Dispatch<React.SetStateAction<InProcessType>>;
|
|
@@ -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>;
|