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.
@@ -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
- dialogOptions: dialogOptions,
79
- inProcess: dialog.isInProcess()
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
- var headerProps = dialogOptions.slotProps.header ? __assign({}, dialogOptions.slotProps.header(staticProps)) : {};
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
- var _a;
85
- if ((_a = dialog === null || dialog === void 0 ? void 0 : dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.fullscreen) {
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 && !dialog.state.fullscreenMode ? 'drag-handle' : ''), children: (0, jsx_runtime_1.jsx)(_context_1.WithHeaderFooterContext, { dialog: dialog, children: (0, jsx_runtime_1.jsx)(CustomHeader, __assign({}, staticProps, headerProps, { dialog: _this })) }) });
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.DialogHeaderActionsWrapper, { children: [baseOptions.fullscreen &&
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, {})] }) })] });
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ gap?: number;
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const DialogActionsWrapper: (props: IProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { DialogActionsWrapper };
@@ -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.DialogHeaderActionsWrapper = void 0;
14
+ exports.DialogActionsWrapper = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
- var DialogHeaderActionsWrapper = function (props) {
16
+ var DialogActionsWrapper = function (props) {
17
17
  var _a;
18
- return ((0, jsx_runtime_1.jsx)("div", __assign({}, props, { className: 'header-actions-wrapper', style: { columnGap: "".concat((_a = props.gap) !== null && _a !== void 0 ? _a : 10, "px") }, children: props.children })));
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.DialogHeaderActionsWrapper = DialogHeaderActionsWrapper;
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);
@@ -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 { DialogHeaderActionsWrapper } from "./DialogHeaderActionsWrapper";
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.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogProcessing = exports.DialogInfoAction = exports.DialogCloseAction = void 0;
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 DialogHeaderActionsWrapper_1 = require("./DialogHeaderActionsWrapper");
13
- Object.defineProperty(exports, "DialogHeaderActionsWrapper", { enumerable: true, get: function () { return DialogHeaderActionsWrapper_1.DialogHeaderActionsWrapper; } });
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, DialogHeaderActionsWrapper, DialogInfoAction } from "./features";
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.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogCloseAction = exports.DialogProcessing = exports.default = void 0;
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, "DialogHeaderActionsWrapper", { enumerable: true, get: function () { return features_1.DialogHeaderActionsWrapper; } });
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.94",
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
  }
@@ -3,4 +3,5 @@ div[role=alert][aria-describedby=notistack-snackbar] {
3
3
  }
4
4
  div[role=alert][aria-describedby=notistack-snackbar] > div:nth-of-type(2) {
5
5
  margin-left: auto !important;
6
+ padding-left: initial !important;
6
7
  }
@@ -88,8 +88,8 @@ interface kSlotProps {
88
88
  style?: React.CSSProperties;
89
89
  [k: string]: any;
90
90
  };
91
- footer?: (props: IBaseFooterProps) => Record<string, any>;
92
- header?: (props: IBaseHeaderProps) => Record<string, any>;
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 = ReturnType<NonNullable<kSlotProps['footer']>>;
132
+ type FooterSlotProps = kSlotProps['footer'];
133
133
  export type IFooterProps = IBaseFooterProps & FooterSlotProps;
134
134
  export interface IBaseHeaderProps extends BaseDialogSlotProps {
135
135
  }
136
- type HeaderSlotProps = ReturnType<NonNullable<kSlotProps['header']>>;
136
+ type HeaderSlotProps = kSlotProps['header'];
137
137
  export type IHeaderProps = IBaseHeaderProps & HeaderSlotProps;
138
138
  export interface BaseDialogSlotProps {
139
139
  dialogOptions: DialogOptionsType;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- gap?: number;
4
- children?: React.ReactNode;
5
- }
6
- declare const DialogHeaderActionsWrapper: (props: IProps) => import("react/jsx-runtime").JSX.Element;
7
- export { DialogHeaderActionsWrapper };