react-dialogger 1.1.92 → 1.1.94

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.
@@ -72,13 +72,13 @@ var jumper_animate_1 = require("../utils/effects/jumper-animate");
72
72
  var _context_1 = require("../context/index.js");
73
73
  var appLogger_1 = require("../helpers/appLogger");
74
74
  var DialogContent = function (props) {
75
- var _a, _b, _c, _d, _e;
75
+ var _a, _b, _c, _d, _e, _f, _g;
76
76
  var firstUpdate = React.useRef(true);
77
- var _f = (0, react_1.useContext)(_context_1.DialogContentContext), dialog = _f.dialog, dialogRef = _f.dialogRef, prevDialogRect = _f.prevDialogRect, backdropRef = _f.backdropRef, snackbarRef = _f.snackbarRef, footerRef = _f.footerRef, resizeableObject = _f.resizeableObject, body = _f.body;
77
+ var _h = (0, react_1.useContext)(_context_1.DialogContentContext), dialog = _h.dialog, dialogRef = _h.dialogRef, prevDialogRect = _h.prevDialogRect, backdropRef = _h.backdropRef, snackbarRef = _h.snackbarRef, footerRef = _h.footerRef, resizeableObject = _h.resizeableObject, body = _h.body;
78
78
  var dialogOptions = dialog.dialogOptions;
79
79
  var baseOptions = dialogOptions.base;
80
- var _g = React.useState(false), fullscreenMode = _g[0], setFullscreenMode = _g[1];
81
- var _h = React.useState(null), rect = _h[0], setRect = _h[1];
80
+ var _j = React.useState(false), fullscreenMode = _j[0], setFullscreenMode = _j[1];
81
+ var _k = React.useState(null), rect = _k[0], setRect = _k[1];
82
82
  var bounds = ((_a = dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.memoBounds) ? (0, _helpers_1.getDialogBounds)(dialog.dialogOptions.base.id) : null;
83
83
  var domZIndex = window.getComputedStyle(dialog.getDom()).zIndex;
84
84
  var positionSelector = function () {
@@ -177,7 +177,7 @@ var DialogContent = function (props) {
177
177
  // @ts-ignore
178
178
  dialog.props.keyboardListener(e.key, _this);
179
179
  }
180
- }, className: baseOptions.size.width === 'auto' ? 'auto' : "dialog-width-".concat(dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(baseOptions.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ height: (_b = baseOptions.size.height) !== null && _b !== void 0 ? _b : 'auto' }, typeof baseOptions.size.width === "number" ? { width: "".concat(baseOptions.size.width, "px") } : { width: "".concat(baseOptions.size.width) }), { outline: 'none', fontFamily: (_c = baseOptions.style.fontFamily) !== null && _c !== void 0 ? _c : 'Arial' }), rect), { alignSelf: (_d = baseOptions.initialAnchor.vertical) !== null && _d !== void 0 ? _d : 'flex-start', justifySelf: (_e = baseOptions.initialAnchor.horizontal) !== null && _e !== void 0 ? _e : 'flex-start' }), children: (0, jsx_runtime_1.jsxs)(notistack_1.SnackbarProvider, { ref: snackbarRef, maxSnack: dialog.dialogOptions.snackbar.maxSnack, children: [(dialog.props.header || dialogOptions.slot.header) && ((0, jsx_runtime_1.jsx)(_1.DialogContentHeader, { header: dialog.props.header, bounds: bounds })), (0, jsx_runtime_1.jsx)(_1.DialogContentBody, { body: body }), (0, jsx_runtime_1.jsx)(_1.DialogContentFooter, { ref: footerRef }), (baseOptions.resizeable) &&
180
+ }, className: baseOptions.size.width === 'auto' ? 'auto' : "dialog-width-".concat(dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(baseOptions.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ height: (_b = baseOptions.size.height) !== null && _b !== void 0 ? _b : 'auto' }, typeof baseOptions.size.width === "number" ? { width: "".concat(baseOptions.size.width, "px") } : { width: "".concat(baseOptions.size.width) }), { outline: 'none', fontFamily: (_c = baseOptions.style.fontFamily) !== null && _c !== void 0 ? _c : 'Arial' }), rect), { alignSelf: (_d = baseOptions.initialAnchor.vertical) !== null && _d !== void 0 ? _d : 'flex-start', justifySelf: (_e = baseOptions.initialAnchor.horizontal) !== null && _e !== void 0 ? _e : 'flex-start' }), children: (0, jsx_runtime_1.jsxs)(notistack_1.SnackbarProvider, { ref: snackbarRef, maxSnack: dialog.dialogOptions.snackbar.maxSnack, style: __assign({ width: 'min-content' }, (_g = (_f = dialog.dialogOptions) === null || _f === void 0 ? void 0 : _f.snackbar) === null || _g === void 0 ? void 0 : _g.style), children: [(dialog.props.header || dialogOptions.slot.header) && ((0, jsx_runtime_1.jsx)(_1.DialogContentHeader, { header: dialog.props.header, bounds: bounds })), (0, jsx_runtime_1.jsx)(_1.DialogContentBody, { body: body }), (0, jsx_runtime_1.jsx)(_1.DialogContentFooter, { ref: footerRef }), (baseOptions.resizeable) &&
181
181
  (0, jsx_runtime_1.jsx)(React.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "resizable-handle", style: {
182
182
  zIndex: parseInt(domZIndex) + 1
183
183
  }, onMouseDown: resizeableObject === null || resizeableObject === void 0 ? void 0 : resizeableObject.resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(_icons_1.ResizeIcon, { color: '#286e94' }) }) })] }) }) });
@@ -109,5 +109,5 @@ exports.default = React.forwardRef(function (_a, ref) {
109
109
  setTimeout(function () {
110
110
  onClick && onClick(e);
111
111
  }, 200);
112
- }, style: __assign(__assign(__assign(__assign(__assign({}, baseStyle), style), exclusive), { fontFamily: fontFamily }), variant === 'text' ? { border: "none" } : null), children: [isRippling && (0, jsx_runtime_1.jsx)("span", { className: "ripple", style: __assign({ left: coords.x, top: coords.y }, !isNamedColor ? { backgroundColor: (0, Colorify_1.hexToRGB)(hexedColor, .3) } : null) }), (0, jsx_runtime_1.jsx)("span", { className: "content", children: children(ref.current) })] }));
112
+ }, style: __assign(__assign(__assign(__assign(__assign({}, baseStyle), style), exclusive), { fontFamily: fontFamily }), variant === 'text' ? { border: "none" } : null), children: [isRippling && (0, jsx_runtime_1.jsx)("span", { className: "ripple", style: __assign({ left: coords.x, top: coords.y }, !isNamedColor ? { backgroundColor: (0, Colorify_1.hexToRGB)('#FFF', .3) } : null) }), (0, jsx_runtime_1.jsx)("span", { className: "content", children: children(ref.current) })] }));
113
113
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.92",
3
+ "version": "1.1.94",
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",
@@ -3,7 +3,7 @@ import Dialog, { DialogAction } from "../models/index.js";
3
3
  import type { ITypeHeight, ITypeWidth } from "./SizePosTypes";
4
4
  import { DialogBase } from "../components/index.js";
5
5
  import type { FormikProps } from "formik";
6
- import type { RefObject } from "react";
6
+ import type { CSSProperties, RefObject } from "react";
7
7
  import { Resizeable } from "../helpers/index.js";
8
8
  import type { DialogContentFooterReturnType, IActionIntents } from "./DialogActionTypes";
9
9
  import { SharedProps, SnackbarKey, SnackbarProvider, VariantType } from "notistack";
@@ -67,6 +67,7 @@ interface IDialogOptionsType {
67
67
  /**@deprecated
68
68
  * @link IDialogOptionsType['localText']*/
69
69
  busyMessage?: string;
70
+ style?: CSSProperties;
70
71
  };
71
72
  animate: 'jumper' | 'none';
72
73
  slot?: kSlot;