react-dialogger 1.1.94 → 1.1.96
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/DialogContentFooter.js +6 -4
- package/components/DialogContentHeader.js +11 -6
- package/features/DialogActionsWrapper.d.ts +7 -0
- package/features/{DialogHeaderActionsWrapper.js → DialogActionsWrapper.js} +4 -4
- package/features/DialogFullscreenAction.js +1 -0
- package/features/index.d.ts +1 -1
- package/features/index.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/styles/dialog.css +7 -6
- package/styles/snackbar.css +1 -0
- package/types/DialogTypes.d.ts +4 -4
- package/features/DialogHeaderActionsWrapper.d.ts +0 -7
|
@@ -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) {
|
|
@@ -98,7 +103,7 @@ var DialogContentHeader = function (_a) {
|
|
|
98
103
|
event.preventDefault();
|
|
99
104
|
}
|
|
100
105
|
}, 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 && !fullscreen ? 'drag-handle' : ''), children: [header(dialog), (baseOptions.closeable || baseOptions.fullscreen) &&
|
|
101
|
-
(0, jsx_runtime_1.jsx)(_context_1.WithHeaderFooterContext, { dialog: dialog, fullscreen: fullscreen, setFullscreen: setFullscreen, children: (0, jsx_runtime_1.jsxs)(_features_1.
|
|
106
|
+
(0, jsx_runtime_1.jsx)(_context_1.WithHeaderFooterContext, { dialog: dialog, fullscreen: fullscreen, setFullscreen: setFullscreen, children: (0, jsx_runtime_1.jsxs)(_features_1.DialogActionsWrapper, { children: [baseOptions.fullscreen &&
|
|
102
107
|
(0, jsx_runtime_1.jsx)(_features_1.DialogFullscreenAction, {}), baseOptions.closeable &&
|
|
103
108
|
(0, jsx_runtime_1.jsx)(_features_1.DialogCloseAction, {}), baseOptions.about &&
|
|
104
109
|
(0, jsx_runtime_1.jsx)(_features_1.DialogInfoAction, {})] }) })] });
|
|
@@ -11,10 +11,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
14
|
+
exports.DialogActionsWrapper = void 0;
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var
|
|
16
|
+
var DialogActionsWrapper = function (props) {
|
|
17
17
|
var _a;
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({}, props, { className: '
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({}, props, { className: 'actions-wrapper', style: { columnGap: "".concat((_a = props.gap) !== null && _a !== void 0 ? _a : 10, "px") }, children: props.children })));
|
|
19
19
|
};
|
|
20
|
-
exports.
|
|
20
|
+
exports.DialogActionsWrapper = DialogActionsWrapper;
|
|
@@ -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/features/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { DialogCloseAction } from "./DialogCloseAction";
|
|
|
2
2
|
export { DialogInfoAction } from "./DialogInfoAction";
|
|
3
3
|
export { DialogProcessing } from "./DialogProcessing";
|
|
4
4
|
export { DialogFullscreenAction } from "./DialogFullscreenAction";
|
|
5
|
-
export {
|
|
5
|
+
export { DialogActionsWrapper } from "./DialogActionsWrapper";
|
package/features/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DialogActionsWrapper = exports.DialogFullscreenAction = exports.DialogProcessing = exports.DialogInfoAction = exports.DialogCloseAction = void 0;
|
|
4
4
|
var DialogCloseAction_1 = require("./DialogCloseAction");
|
|
5
5
|
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return DialogCloseAction_1.DialogCloseAction; } });
|
|
6
6
|
var DialogInfoAction_1 = require("./DialogInfoAction");
|
|
@@ -9,5 +9,5 @@ var DialogProcessing_1 = require("./DialogProcessing");
|
|
|
9
9
|
Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: function () { return DialogProcessing_1.DialogProcessing; } });
|
|
10
10
|
var DialogFullscreenAction_1 = require("./DialogFullscreenAction");
|
|
11
11
|
Object.defineProperty(exports, "DialogFullscreenAction", { enumerable: true, get: function () { return DialogFullscreenAction_1.DialogFullscreenAction; } });
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
12
|
+
var DialogActionsWrapper_1 = require("./DialogActionsWrapper");
|
|
13
|
+
Object.defineProperty(exports, "DialogActionsWrapper", { enumerable: true, get: function () { return DialogActionsWrapper_1.DialogActionsWrapper; } });
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import './styles/dialog.action.scss';
|
|
|
3
3
|
import './styles/circular-progress.scss';
|
|
4
4
|
import './styles/snackbar.scss';
|
|
5
5
|
export { default } from "./models/Dialog";
|
|
6
|
-
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction,
|
|
6
|
+
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction, DialogActionsWrapper, DialogInfoAction } from "./features";
|
|
7
7
|
export { DialogAction, ActionProgress, baseDialogOptions } from "./models";
|
|
8
8
|
export { InitDialogMemoizeBounds } from "./helpers";
|
|
9
9
|
export { IDialogApiDef, ActionApiDef } from './types';
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InitDialogMemoizeBounds = exports.baseDialogOptions = exports.ActionProgress = exports.DialogAction = exports.DialogInfoAction = exports.
|
|
6
|
+
exports.InitDialogMemoizeBounds = exports.baseDialogOptions = exports.ActionProgress = exports.DialogAction = exports.DialogInfoAction = exports.DialogActionsWrapper = exports.DialogFullscreenAction = exports.DialogCloseAction = exports.DialogProcessing = exports.default = void 0;
|
|
7
7
|
require("./styles/dialog.css");
|
|
8
8
|
require("./styles/dialog.action.css");
|
|
9
9
|
require("./styles/circular-progress.css");
|
|
@@ -15,7 +15,7 @@ var features_1 = require("./features");
|
|
|
15
15
|
Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: function () { return features_1.DialogProcessing; } });
|
|
16
16
|
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return features_1.DialogCloseAction; } });
|
|
17
17
|
Object.defineProperty(exports, "DialogFullscreenAction", { enumerable: true, get: function () { return features_1.DialogFullscreenAction; } });
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "DialogActionsWrapper", { enumerable: true, get: function () { return features_1.DialogActionsWrapper; } });
|
|
19
19
|
Object.defineProperty(exports, "DialogInfoAction", { enumerable: true, get: function () { return features_1.DialogInfoAction; } });
|
|
20
20
|
var models_1 = require("./models");
|
|
21
21
|
Object.defineProperty(exports, "DialogAction", { enumerable: true, get: function () { return models_1.DialogAction; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.96",
|
|
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
|
@@ -209,6 +209,13 @@
|
|
|
209
209
|
flex-direction: column;
|
|
210
210
|
overflow: clip;
|
|
211
211
|
}
|
|
212
|
+
.dialog-main .actions-wrapper {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: row;
|
|
215
|
+
align-items: center;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
width: min-content;
|
|
218
|
+
}
|
|
212
219
|
.dialog-main .dialog-header {
|
|
213
220
|
min-height: 3rem;
|
|
214
221
|
padding: 10px 20px 10px 20px;
|
|
@@ -218,12 +225,6 @@
|
|
|
218
225
|
align-items: center;
|
|
219
226
|
border-bottom: 0.5px solid rgba(0, 0, 0, 0.2);
|
|
220
227
|
}
|
|
221
|
-
.dialog-main .dialog-header .header-actions-wrapper {
|
|
222
|
-
display: flex;
|
|
223
|
-
flex-direction: row;
|
|
224
|
-
align-items: center;
|
|
225
|
-
justify-content: center;
|
|
226
|
-
}
|
|
227
228
|
.dialog-main .dialog-header .icon-base {
|
|
228
229
|
display: flex;
|
|
229
230
|
}
|
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;
|