react-dialogger 1.1.121 → 1.1.122
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/DialogBase.js
CHANGED
|
@@ -360,9 +360,9 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
360
360
|
};
|
|
361
361
|
DialogBase.prototype.componentDidMount = function () {
|
|
362
362
|
var _this = this;
|
|
363
|
-
var _a, _b, _c;
|
|
363
|
+
var _a, _b, _c, _d, _e;
|
|
364
364
|
// First position take from Global
|
|
365
|
-
var
|
|
365
|
+
var _f = this._dialogOptions.snackbar.anchorOrigin, vertical = _f.vertical, horizontal = _f.horizontal;
|
|
366
366
|
var initialAnchor = { vertical: vertical, horizontal: horizontal };
|
|
367
367
|
// Merge user defied positions with global positions!
|
|
368
368
|
this._snackbarAnchor = __assign(__assign(__assign({}, initialAnchor), (((_a = this.props.snackbarAnchor) === null || _a === void 0 ? void 0 : _a.vertical) ? { vertical: this.props.snackbarAnchor.vertical } : {})), (((_b = this.props.snackbarAnchor) === null || _b === void 0 ? void 0 : _b.horizontal) ? { horizontal: this.props.snackbarAnchor.horizontal } : {}));
|
|
@@ -373,6 +373,9 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
373
373
|
}
|
|
374
374
|
// accessFrom Property of Parent object Internal->External
|
|
375
375
|
this.accessFrom = "internal";
|
|
376
|
+
if ((_e = (_d = this.props.initialOptions) === null || _d === void 0 ? void 0 : _d.backdrop) === null || _e === void 0 ? void 0 : _e.throughable) {
|
|
377
|
+
this.getDom().style.pointerEvents = 'none';
|
|
378
|
+
}
|
|
376
379
|
};
|
|
377
380
|
DialogBase.prototype.componentWillUnmount = function () {
|
|
378
381
|
console.log('componentWillUnmount');
|
|
@@ -166,6 +166,10 @@ var DialogContent = function (props) {
|
|
|
166
166
|
}, dialogRef);
|
|
167
167
|
}, children: (0, jsx_runtime_1.jsx)("div", { id: "dialog-main", ref: dialogRef, onClick: function (e) {
|
|
168
168
|
e.stopPropagation();
|
|
169
|
+
var dom = dialog.getDom();
|
|
170
|
+
if (dom) {
|
|
171
|
+
dom.style.zIndex = String(dialog.props.zFinder() + 1);
|
|
172
|
+
}
|
|
169
173
|
}, tabIndex: 0, onKeyDown: function (e) {
|
|
170
174
|
var target = e.target;
|
|
171
175
|
if (target.tagName === 'INPUT' ||
|
|
@@ -7,13 +7,18 @@ var _components_1 = require("./index.js");
|
|
|
7
7
|
var _helpers_1 = require("../helpers/index.js");
|
|
8
8
|
var _context_1 = require("../context/index.js");
|
|
9
9
|
var DialogWithBackdropWrapper = function () {
|
|
10
|
-
var _a
|
|
11
|
-
var
|
|
10
|
+
var _a, _b;
|
|
11
|
+
var _c = (0, react_1.useContext)(_context_1.DialogContentContext), dialog = _c.dialog, backdropRef = _c.backdropRef, baseZoomEffect = _c.baseZoomEffect;
|
|
12
|
+
var _d = dialog.dialogOptions.backdrop, backgroundColor = _d.backgroundColor, opacity = _d.opacity;
|
|
12
13
|
var bgCl = (0, _helpers_1.hexToRGB)(backgroundColor, opacity);
|
|
13
|
-
|
|
14
|
+
var classes = ['dialog-backdrop', 'dialog-backdrop-show'];
|
|
15
|
+
if (dialog.dialogOptions.backdrop.throughable) {
|
|
16
|
+
classes.push("dialogger-throughable");
|
|
17
|
+
}
|
|
18
|
+
return (0, jsx_runtime_1.jsx)("div", { className: classes.join(" "), ref: backdropRef, style: {
|
|
14
19
|
justifyContent: dialog.dialogOptions.base.initialAnchor.horizontal,
|
|
15
20
|
// alignItems: dialogOptions.base.initialAnchor.vertical,
|
|
16
|
-
background: bgCl
|
|
21
|
+
background: ((_b = (_a = dialog.dialogOptions) === null || _a === void 0 ? void 0 : _a.backdrop) === null || _b === void 0 ? void 0 : _b.throughable) ? 'transparent !important' : bgCl
|
|
17
22
|
}, onClick: function (e) {
|
|
18
23
|
if (dialog.state.fullscreenMode)
|
|
19
24
|
return;
|
package/models/Dialog.js
CHANGED
|
@@ -194,7 +194,7 @@ var Dialog = /** @class */ (function () {
|
|
|
194
194
|
// Listeners
|
|
195
195
|
stateListener: this._stateListener, keyboardListener: this._keyboardListener, resizeListener: this._resizeListener, processingListeners: this._processingListeners, abortedListeners: this._abortedListeners,
|
|
196
196
|
// Others
|
|
197
|
-
dialogSize: this._dialogSize, initialHolder: this._initialHolder, snackbarAnchor: this._snackbarAnchor, root: root, dom: dom, parent: this }, this._apiRef ? { ref: this._apiRef } : null), { onClose: this._onCloseCallback, inject: this._inject });
|
|
197
|
+
dialogSize: this._dialogSize, initialHolder: this._initialHolder, snackbarAnchor: this._snackbarAnchor, root: root, dom: dom, parent: this }, this._apiRef ? { ref: this._apiRef } : null), { onClose: this._onCloseCallback, inject: this._inject, zFinder: this.highestZ });
|
|
198
198
|
// @ts-ignore
|
|
199
199
|
// root.render( React.createElement( DialogBase as React.ComponentType<
|
|
200
200
|
// typeof this._initialValues
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.122",
|
|
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
|
@@ -173,6 +173,11 @@
|
|
|
173
173
|
width: 100%;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
+
.dialogger-throughable {
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
background-color: transparent !important;
|
|
179
|
+
}
|
|
180
|
+
|
|
176
181
|
.react-guzzle-root {
|
|
177
182
|
position: fixed;
|
|
178
183
|
right: 0;
|
|
@@ -208,6 +213,7 @@
|
|
|
208
213
|
display: flex;
|
|
209
214
|
flex-direction: column;
|
|
210
215
|
overflow: clip;
|
|
216
|
+
pointer-events: auto;
|
|
211
217
|
}
|
|
212
218
|
.dialog-main .actions-wrapper {
|
|
213
219
|
display: flex;
|
package/types/DialogTypes.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface BaseDialogProps<V extends Record<string, any>, I> {
|
|
|
51
51
|
resizeListener?: (size: IDialogSize, dialog: IDialogApiDef<V, I>) => void;
|
|
52
52
|
processingListeners?: Array<(inProcess: boolean) => void>;
|
|
53
53
|
abortedListeners?: Array<(dialog: IDialogApiDef<V, I>) => void>;
|
|
54
|
+
zFinder: () => number;
|
|
54
55
|
}
|
|
55
56
|
export interface DialogContentBodyReturnType {
|
|
56
57
|
setProcessing: React.Dispatch<React.SetStateAction<InProcessType>>;
|
|
@@ -229,6 +230,7 @@ export interface IBackdropOptions {
|
|
|
229
230
|
backgroundColor?: string;
|
|
230
231
|
opacity?: number;
|
|
231
232
|
hideOnClick?: boolean;
|
|
233
|
+
throughable?: false;
|
|
232
234
|
}
|
|
233
235
|
export type TNotifyOnClosing = "snackbar" | "zoom" | undefined;
|
|
234
236
|
export type TInitialHolder = any;
|