react-dialogger 1.1.94 → 1.1.95
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,10 +74,12 @@ var DialogContentFooter = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
74
74
|
};
|
|
75
75
|
var footerProps = {};
|
|
76
76
|
if (dialogOptions.slotProps.footer) {
|
|
77
|
-
footerProps = dialogOptions.slotProps.footer({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})
|
|
77
|
+
// footerProps = dialogOptions.slotProps.footer({
|
|
78
|
+
// dialogOptions: dialogOptions,
|
|
79
|
+
// inProcess: dialog.isInProcess()
|
|
80
|
+
// })
|
|
81
|
+
// footerProps = {...dialogOptions.slotProps.footer, dialogOptions: dialogOptions, inProcess: dialog.isInProcess() }
|
|
82
|
+
footerProps = dialogOptions.slotProps.footer;
|
|
81
83
|
}
|
|
82
84
|
return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-footer', style: (_c = (_b = dialogOptions.base) === null || _b === void 0 ? void 0 : _b.footer) === null || _c === void 0 ? void 0 : _c.style, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(_context_1.WithHeaderFooterContext, __assign({}, staticProps, { dialog: dialog, children: dialogOptions.slot.footer ?
|
|
83
85
|
(0, jsx_runtime_1.jsx)(CustomFooter, __assign({}, staticProps, footerProps))
|
|
@@ -43,7 +43,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
43
43
|
return result;
|
|
44
44
|
};
|
|
45
45
|
})();
|
|
46
|
-
var _this = this;
|
|
47
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
47
|
exports.DialogContentHeader = void 0;
|
|
49
48
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -79,13 +78,19 @@ var DialogContentHeader = function (_a) {
|
|
|
79
78
|
dialog: dialog
|
|
80
79
|
};
|
|
81
80
|
if (dialogOptions.slot.header) {
|
|
82
|
-
|
|
81
|
+
// const headerProps = dialogOptions.slotProps.header ? {...dialogOptions.slotProps.header(staticProps)} : {};
|
|
82
|
+
console.log('CustomHeader_Content', dialogOptions.slot.header, fullscreen);
|
|
83
|
+
var headerProps = dialogOptions.slotProps.header;
|
|
83
84
|
return (0, jsx_runtime_1.jsx)("div", { onDoubleClick: function (event) {
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
if (baseOptions.fullscreen) {
|
|
86
|
+
if (bounds) {
|
|
87
|
+
(0, _helpers_1.setDialogBounds)(dialog.dialogOptions.base.id, __assign(__assign({}, bounds), { fullscreen: !fullscreen }), dialogRef);
|
|
88
|
+
}
|
|
86
89
|
setFullscreen(!fullscreen);
|
|
90
|
+
event.stopPropagation();
|
|
91
|
+
event.preventDefault();
|
|
87
92
|
}
|
|
88
|
-
}, 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 && !
|
|
93
|
+
}, 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 && !fullscreen ? 'drag-handle' : ''), children: (0, jsx_runtime_1.jsx)(_context_1.WithHeaderFooterContext, { dialog: dialog, fullscreen: fullscreen, setFullscreen: setFullscreen, children: (0, jsx_runtime_1.jsx)(CustomHeader, __assign({}, staticProps, headerProps)) }) });
|
|
89
94
|
}
|
|
90
95
|
if (header instanceof Function) {
|
|
91
96
|
return (0, jsx_runtime_1.jsxs)("div", { onDoubleClick: function (event) {
|
|
@@ -10,6 +10,7 @@ var DialogFullscreenAction = function () {
|
|
|
10
10
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
11
11
|
// use this owned context while setFullscreen mode declared
|
|
12
12
|
var _j = (0, react_1.useContext)(_context_1.DialogHeaderFooterContext), dialog = _j.dialog, setFullscreen = _j.setFullscreen, fullscreen = _j.fullscreen;
|
|
13
|
+
console.log('DialogFullscreenAction', fullscreen, setFullscreen);
|
|
13
14
|
return (0, jsx_runtime_1.jsx)("div", { className: 'fullscreen-icon-wrapper', onClick: function (event) {
|
|
14
15
|
setFullscreen(!fullscreen);
|
|
15
16
|
(0, _helpers_1.setDialogBound)(dialog.dialogOptions.base.id, "fullscreen", !fullscreen);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.95",
|
|
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/snackbar.css
CHANGED
package/types/DialogTypes.d.ts
CHANGED
|
@@ -88,8 +88,8 @@ interface kSlotProps {
|
|
|
88
88
|
style?: React.CSSProperties;
|
|
89
89
|
[k: string]: any;
|
|
90
90
|
};
|
|
91
|
-
footer?:
|
|
92
|
-
header?:
|
|
91
|
+
footer?: Record<string, any>;
|
|
92
|
+
header?: Record<string, any>;
|
|
93
93
|
}
|
|
94
94
|
export interface IBaseDialogOptions {
|
|
95
95
|
closeable?: boolean;
|
|
@@ -129,11 +129,11 @@ export interface IBaseDialogProgressOptions {
|
|
|
129
129
|
export interface IBaseFooterProps extends BaseDialogSlotProps {
|
|
130
130
|
inProcess?: IInProcess;
|
|
131
131
|
}
|
|
132
|
-
type FooterSlotProps =
|
|
132
|
+
type FooterSlotProps = kSlotProps['footer'];
|
|
133
133
|
export type IFooterProps = IBaseFooterProps & FooterSlotProps;
|
|
134
134
|
export interface IBaseHeaderProps extends BaseDialogSlotProps {
|
|
135
135
|
}
|
|
136
|
-
type HeaderSlotProps =
|
|
136
|
+
type HeaderSlotProps = kSlotProps['header'];
|
|
137
137
|
export type IHeaderProps = IBaseHeaderProps & HeaderSlotProps;
|
|
138
138
|
export interface BaseDialogSlotProps {
|
|
139
139
|
dialogOptions: DialogOptionsType;
|