react-dialogger 1.1.42 → 1.1.43
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.
|
@@ -74,6 +74,7 @@ declare class DialogBase<Values extends Record<string, any>> extends Component<B
|
|
|
74
74
|
initializeActionRef: (key: string) => RefObject<DialogActionBase>;
|
|
75
75
|
get dialogOptions(): DialogOptionsType;
|
|
76
76
|
get holder(): DialogOptionsType;
|
|
77
|
+
get Resizeable(): Resizeable;
|
|
77
78
|
/**@deprecate
|
|
78
79
|
* @see this.state
|
|
79
80
|
* */
|
package/components/DialogBase.js
CHANGED
|
@@ -350,7 +350,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
_this.baseZoomEffect();
|
|
353
|
-
}, children: (0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { body: body, header: header, actions: actions, dialogRef: _this._dialogRef, footerRef: _this._footerRef, backdropRef: _this._backdropRef, dialogOptions: _this.dialogOptions, dom: _this._dom, keyboardListener: _this._keyboardListener,
|
|
353
|
+
}, children: (0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { body: body, header: header, actions: actions, dialogRef: _this._dialogRef, footerRef: _this._footerRef, backdropRef: _this._backdropRef, dialogOptions: _this.dialogOptions, dom: _this._dom, keyboardListener: _this._keyboardListener, dialog: _this }) });
|
|
354
354
|
};
|
|
355
355
|
_this.switchFullScreen = function () {
|
|
356
356
|
if (!_this.state.fullscreenMode) {
|
|
@@ -710,6 +710,13 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
710
710
|
enumerable: false,
|
|
711
711
|
configurable: true
|
|
712
712
|
});
|
|
713
|
+
Object.defineProperty(DialogBase.prototype, "Resizeable", {
|
|
714
|
+
get: function () {
|
|
715
|
+
return this._Resizeable;
|
|
716
|
+
},
|
|
717
|
+
enumerable: false,
|
|
718
|
+
configurable: true
|
|
719
|
+
});
|
|
713
720
|
Object.defineProperty(DialogBase.prototype, "formikProps", {
|
|
714
721
|
// get state(): T | Readonly<BaseDialogState> {
|
|
715
722
|
// return super.state
|
|
@@ -12,7 +12,6 @@ interface IContentProps {
|
|
|
12
12
|
dialogOptions: DialogOptionsType;
|
|
13
13
|
dom: HTMLDivElement;
|
|
14
14
|
keyboardListener: BaseDialogProps['keyboardListener'];
|
|
15
|
-
resizeHandleMouseDown: () => void;
|
|
16
15
|
dialog: DialogBase<any>;
|
|
17
16
|
}
|
|
18
17
|
declare const DialogContent: React.FC<IContentProps>;
|
|
@@ -77,7 +77,7 @@ var dialogAutoPos = function () {
|
|
|
77
77
|
var DialogContent = function (_a) {
|
|
78
78
|
var _b;
|
|
79
79
|
var _c, _d, _e;
|
|
80
|
-
var body = _a.body, header = _a.header, actions = _a.actions, dialogRef = _a.dialogRef, footerRef = _a.footerRef, dialogOptions = _a.dialogOptions, dom = _a.dom, backdropRef = _a.backdropRef, keyboardListener = _a.keyboardListener,
|
|
80
|
+
var body = _a.body, header = _a.header, actions = _a.actions, dialogRef = _a.dialogRef, footerRef = _a.footerRef, dialogOptions = _a.dialogOptions, dom = _a.dom, backdropRef = _a.backdropRef, keyboardListener = _a.keyboardListener, dialog = _a.dialog;
|
|
81
81
|
var position = dialogAutoPos();
|
|
82
82
|
var snackbarRef = React.useRef(null);
|
|
83
83
|
var _f = React.useState(false), fullscreenMode = _f[0], setFullscreenMode = _f[1];
|
|
@@ -134,6 +134,6 @@ var DialogContent = function (_a) {
|
|
|
134
134
|
dialog: dialog }), (0, jsx_runtime_1.jsx)(DialogContentBody_1.DialogContentBody, { dialog: dialog, body: body }), (0, jsx_runtime_1.jsx)(DialogContenFooter_1.DialogContentFooter, { dialog: dialog, ref: footerRef, actions: actions })] }), (baseOptions.resizeable) &&
|
|
135
135
|
(0, jsx_runtime_1.jsx)(React.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "resizable-handle", style: {
|
|
136
136
|
zIndex: parseInt(domZIndex) + 1
|
|
137
|
-
}, onMouseDown: resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(ResizeIcon_1.default, { color: '#286e94' }) }) })] }) });
|
|
137
|
+
}, onMouseDown: dialog.Resizeable.resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(ResizeIcon_1.default, { color: '#286e94' }) }) })] }) });
|
|
138
138
|
};
|
|
139
139
|
exports.DialogContent = DialogContent;
|
|
@@ -38,7 +38,7 @@ var DialogContentHeader = function (_a) {
|
|
|
38
38
|
if ((_a = dialog === null || dialog === void 0 ? void 0 : dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.fullscreen) {
|
|
39
39
|
dialog.switchFullScreen();
|
|
40
40
|
}
|
|
41
|
-
}, style: (_c = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.header) === null || _c === void 0 ? void 0 : _c.style, className: "dialog-header ".concat(baseOptions.draggable && !dialog.state.fullscreenMode ? 'drag-handle' : ''), children: (0, jsx_runtime_1.jsx)(DialogBase_1.WithHeaderFooterContext, { children: (0, jsx_runtime_1.jsx)(CustomHeader, __assign({}, staticProps, headerProps, { dialog: _this })) }) });
|
|
41
|
+
}, style: (_c = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.header) === null || _c === void 0 ? void 0 : _c.style, className: "dialog-header ".concat(baseOptions.draggable && !dialog.state.fullscreenMode ? 'drag-handle' : ''), children: (0, jsx_runtime_1.jsx)(DialogBase_1.WithHeaderFooterContext, { dialog: dialog, children: (0, jsx_runtime_1.jsx)(CustomHeader, __assign({}, staticProps, headerProps, { dialog: _this })) }) });
|
|
42
42
|
}
|
|
43
43
|
if (header instanceof Function) {
|
|
44
44
|
return (0, jsx_runtime_1.jsxs)("div", { onDoubleClick: function (event) {
|
|
@@ -48,7 +48,7 @@ var DialogContentHeader = function (_a) {
|
|
|
48
48
|
}, style: (_d = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.header) === null || _d === void 0 ? void 0 : _d.style, className: "dialog-header ".concat(baseOptions.draggable && !dialog.state.fullscreenMode ? 'drag-handle' : ''), children: [header(dialog), (baseOptions.closeable || baseOptions.fullscreen) &&
|
|
49
49
|
(0, jsx_runtime_1.jsx)(DialogBase_1.WithHeaderFooterContext, { dialog: dialog, children: (0, jsx_runtime_1.jsxs)(Futures_1.DialogHeaderActionsWrapper, { children: [baseOptions.fullscreen &&
|
|
50
50
|
(0, jsx_runtime_1.jsx)(Futures_1.DialogFullscreenAction, {}), baseOptions.closeable &&
|
|
51
|
-
(0, jsx_runtime_1.jsx)(Futures_1.DialogCloseAction, {})] }) })] });
|
|
51
|
+
(0, jsx_runtime_1.jsx)(Futures_1.DialogCloseAction, {}), (0, jsx_runtime_1.jsx)(Futures_1.DialogInfoAction, {})] }) })] });
|
|
52
52
|
}
|
|
53
53
|
return (0, jsx_runtime_1.jsx)("div", { style: (_e = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.header) === null || _e === void 0 ? void 0 : _e.style, className: 'drag-handle dialog-header', children: header });
|
|
54
54
|
};
|
|
@@ -11,20 +11,20 @@ var DialogBase_1 = require("../DialogBase");
|
|
|
11
11
|
// const DialogCloseAction = ({dialog}:{dialog: React.RefObject<IDialogRef> | undefined}) => {
|
|
12
12
|
// const DialogCloseAction = ({dialog, newProps}:{dialog: IDialogDef | undefined, newProps?: any}) => {
|
|
13
13
|
var DialogCloseAction = function () {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
15
|
-
var
|
|
16
|
-
|
|
14
|
+
var _a, _b, _c, _d, _e, _f;
|
|
15
|
+
var dialog = (0, react_1.useContext)(DialogBase_1.DialogHeaderFooterContext).dialog;
|
|
16
|
+
console.log('DialogCloseAction_dialog', dialog);
|
|
17
17
|
// console.log('DialogCloseAction_props', dialogHeaderContext);
|
|
18
18
|
// return <div className={'close-icon-wrapper'} onClick={event => apiRef.current.close()} >
|
|
19
19
|
return (0, jsx_runtime_1.jsx)("div", { className: 'close-icon-wrapper', onClick: function (event) {
|
|
20
20
|
// props.dialog.close()
|
|
21
|
-
|
|
21
|
+
dialog.close();
|
|
22
22
|
}, children: (0, jsx_runtime_1.jsx)(CloseIcon_1.default
|
|
23
23
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
|
24
24
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
|
25
25
|
, {
|
|
26
26
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
|
27
27
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
|
28
|
-
size: (_b = (_a =
|
|
28
|
+
size: (_c = (_b = (_a = dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.headerControllerIcons) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : 24, color: (_f = (_e = (_d = dialog.dialogOptions.base) === null || _d === void 0 ? void 0 : _d.headerControllerIcons) === null || _e === void 0 ? void 0 : _e.color) !== null && _f !== void 0 ? _f : null }) });
|
|
29
29
|
};
|
|
30
30
|
exports.DialogCloseAction = DialogCloseAction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.43",
|
|
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",
|