react-dialogger 1.1.21 → 1.1.22
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/CircularProgress.d.ts +1 -2
- package/components/CircularProgress.js +5 -8
- package/components/DialogActionBase.d.ts +1 -2
- package/components/DialogActionBase.js +10 -11
- package/components/DialogBase.d.ts +3 -3
- package/components/DialogBase.js +56 -76
- package/components/Futures/DialogCloseAction.d.ts +1 -2
- package/components/Futures/DialogCloseAction.js +4 -28
- package/components/Futures/DialogFullscreenAction.d.ts +1 -2
- package/components/Futures/DialogFullscreenAction.js +13 -36
- package/components/Futures/DialogHeaderActionsWrapper.d.ts +1 -1
- package/components/Futures/DialogHeaderActionsWrapper.js +2 -5
- package/components/Futures/DialogInfoAction.d.ts +1 -2
- package/components/Futures/DialogInfoAction.js +4 -15
- package/components/Futures/DialogProcessing.d.ts +1 -2
- package/components/Futures/DialogProcessing.js +2 -25
- package/components/RippleButton.js +3 -4
- package/components/icons/CloseIcon.d.ts +1 -2
- package/components/icons/CloseIcon.js +2 -7
- package/components/icons/FullscreenExitIcon.d.ts +1 -2
- package/components/icons/FullscreenExitIcon.js +2 -7
- package/components/icons/FullscreenIcon.d.ts +1 -2
- package/components/icons/FullscreenIcon.js +2 -7
- package/components/icons/InfoIcon.d.ts +1 -2
- package/components/icons/InfoIcon.js +2 -7
- package/components/icons/ResizeIcon.d.ts +1 -2
- package/components/icons/ResizeIcon.js +3 -8
- package/models/DialogAction.d.ts +1 -2
- package/models/DialogAction.js +2 -25
- package/package.json +2 -2
- package/components/Dependencies/Body.d.ts +0 -8
- package/components/Dependencies/Body.js +0 -40
- package/components/Dependencies/DialogBody.d.ts +0 -8
- package/components/Dependencies/DialogBody.js +0 -40
- package/types/FormikProps.d.ts +0 -302
@@ -1,8 +1,7 @@
|
|
1
|
-
import * as React from "react";
|
2
1
|
import { IInProcess } from "../types/types";
|
3
2
|
declare const _default: ({ size, color, inProcess }: {
|
4
3
|
color?: string;
|
5
4
|
inProcess: IInProcess;
|
6
5
|
size: number;
|
7
|
-
}) =>
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
8
7
|
export default _default;
|
@@ -34,17 +34,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
34
|
return result;
|
35
35
|
};
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
37
38
|
var React = __importStar(require("react"));
|
38
39
|
exports.default = (function (_a) {
|
39
40
|
var size = _a.size, color = _a.color, inProcess = _a.inProcess;
|
40
41
|
if (inProcess === null || inProcess === void 0 ? void 0 : inProcess.inProcess) {
|
41
|
-
return
|
42
|
-
|
43
|
-
|
44
|
-
React.createElement("circle", { className: "circular-circle", cx: "44", cy: "44", r: "20.2", fill: "none", strokeWidth: "3.6" }))),
|
45
|
-
inProcess.message
|
46
|
-
&&
|
47
|
-
React.createElement("span", { style: { fontStyle: 'normal', fontSize: 12 } }, inProcess.message));
|
42
|
+
return (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'row', columnGap: 10, alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)("span", { className: "circular-root", style: __assign({ display: 'flex', flex: 1, width: size, height: size }, color ? { color: color } : {}), role: "progressbar", children: (0, jsx_runtime_1.jsx)("svg", { className: "circular", viewBox: "22 22 44 44", children: (0, jsx_runtime_1.jsx)("circle", { className: "circular-circle", cx: "44", cy: "44", r: "20.2", fill: "none", strokeWidth: "3.6" }) }) }), inProcess.message
|
43
|
+
&&
|
44
|
+
(0, jsx_runtime_1.jsx)("span", { style: { fontStyle: 'normal', fontSize: 12 }, children: inProcess.message })] });
|
48
45
|
}
|
49
|
-
return
|
46
|
+
return (0, jsx_runtime_1.jsx)(React.Fragment, {});
|
50
47
|
});
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { Component } from "react";
|
2
|
-
import * as React from "react";
|
3
2
|
import DialogBase from "./DialogBase";
|
4
3
|
import { ActionProps, ActionState, DialogActionType, TBVariant, TBColor, DialogActionOptionsType, TDialogStateListenerForActionCallbackType } from "../types/DialogActionTypes";
|
5
4
|
declare class DialogActionBase extends Component<ActionProps, ActionState> {
|
@@ -39,6 +38,6 @@ declare class DialogActionBase extends Component<ActionProps, ActionState> {
|
|
39
38
|
remove: () => void;
|
40
39
|
click: () => void;
|
41
40
|
onClickHandler: () => DialogActionType;
|
42
|
-
render: () =>
|
41
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
43
42
|
}
|
44
43
|
export default DialogActionBase;
|
@@ -52,6 +52,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
52
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
53
53
|
};
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
55
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
55
56
|
var react_1 = require("react");
|
56
57
|
var React = __importStar(require("react"));
|
57
58
|
var RippleButton_1 = __importDefault(require("./RippleButton"));
|
@@ -133,22 +134,20 @@ var DialogActionBase = /** @class */ (function (_super) {
|
|
133
134
|
};
|
134
135
|
_this.render = function () {
|
135
136
|
console.log('this._options.style.render', _this._options);
|
136
|
-
return
|
137
|
+
return (0, jsx_runtime_1.jsx)(RippleButton_1.default, { ref: _this._buttonRef, innerRef: _this._rippleButtonRef, variant: _this._options.variant, color: _this._options.color, disabled: _this._options.disabled, onClick: function (e) {
|
137
138
|
if (_this._options.disabled || _this.isInProcess())
|
138
139
|
return;
|
139
140
|
// @ts-ignore
|
140
141
|
_this._onClick(_this, _this._dialogBaseComponent);
|
141
|
-
}, style: _this._options.style, baseStyle: _this.props.baseStyle, fontFamily: _this.props.fontFamily
|
142
|
-
|
143
|
-
|
144
|
-
|
142
|
+
}, style: _this._options.style, baseStyle: _this.props.baseStyle, fontFamily: _this.props.fontFamily, children: function (buttonRef) {
|
143
|
+
if (buttonRef) {
|
144
|
+
if (!_this.isInProcess()) {
|
145
|
+
buttonRef.style.minWidth = buttonRef.getBoundingClientRect().width + 'px';
|
146
|
+
}
|
145
147
|
}
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
!_this.isInProcess() &&
|
150
|
-
_this._options.label);
|
151
|
-
});
|
148
|
+
return (0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 15, inProcess: { inProcess: _this.isInProcess() } }), !_this.isInProcess() &&
|
149
|
+
_this._options.label] });
|
150
|
+
} });
|
152
151
|
};
|
153
152
|
_this._options = props.options;
|
154
153
|
// this._label = props.label;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Component, ReactNode, RefObject } from "react";
|
2
|
-
import { FormikProps } from "
|
2
|
+
import { FormikProps } from "formik";
|
3
3
|
import * as React from "react";
|
4
4
|
import Dialog from "../models/Dialog";
|
5
5
|
import { DialogAction } from "../models/DialogAction";
|
@@ -99,7 +99,7 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
99
99
|
close: (callbackFn?: any) => void;
|
100
100
|
focus: () => void;
|
101
101
|
get actions(): {
|
102
|
-
[key: string]: Pick<DialogActionBase, "
|
102
|
+
[key: string]: Pick<DialogActionBase, "options" | "setInProcess" | "setOptions" | "getLabel" | "click" | "remove">;
|
103
103
|
};
|
104
104
|
private orderPositionWithReference;
|
105
105
|
/**
|
@@ -132,6 +132,6 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
132
132
|
private Actions;
|
133
133
|
private Content;
|
134
134
|
protected show(callback?: TDialogCallbackVoidFn): void;
|
135
|
-
render: () =>
|
135
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
136
136
|
}
|
137
137
|
export default DialogBase;
|
package/components/DialogBase.js
CHANGED
@@ -53,6 +53,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
53
|
};
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
55
55
|
exports.DialogHeaderFooterContext = void 0;
|
56
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
56
57
|
var react_1 = require("react");
|
57
58
|
var React = __importStar(require("react"));
|
58
59
|
var react_draggable_1 = __importDefault(require("react-draggable"));
|
@@ -65,10 +66,10 @@ var Resizeable_1 = __importDefault(require("../models/Resizeable"));
|
|
65
66
|
var ResizeIcon_1 = __importDefault(require("./icons/ResizeIcon"));
|
66
67
|
var Futures_1 = require("./Futures");
|
67
68
|
var WithSnackbar = function (props) {
|
68
|
-
return
|
69
|
+
return (0, jsx_runtime_1.jsx)(notistack_1.SnackbarProvider, { ref: props.snackbarRef, maxSnack: props.maxSnack, children: props.children });
|
69
70
|
};
|
70
71
|
var WithHeaderFooterContext = function (props) {
|
71
|
-
return
|
72
|
+
return (0, jsx_runtime_1.jsx)(exports.DialogHeaderFooterContext.Provider, { value: __assign({}, props), children: props.children });
|
72
73
|
};
|
73
74
|
var hexToRgb = function (hex, opacity) {
|
74
75
|
try {
|
@@ -313,7 +314,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
313
314
|
_this.orderPositionWithReference();
|
314
315
|
var _a = _this._dialogOptions.backdrop, backgroundColor = _a.backgroundColor, opacity = _a.opacity;
|
315
316
|
var bgCl = hexToRgb(backgroundColor, opacity);
|
316
|
-
return
|
317
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "dialog-backdrop dialog-backdrop-show", ref: _this._backdropRef, style: {
|
317
318
|
justifyContent: _this._dialogOptions.base.initialAnchor.horizontal,
|
318
319
|
// alignItems: dialogOptions.base.initialAnchor.vertical,
|
319
320
|
background: bgCl
|
@@ -325,7 +326,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
325
326
|
return;
|
326
327
|
}
|
327
328
|
_this.baseZoomEffect();
|
328
|
-
}
|
329
|
+
}, children: _this.Content(body, header, actions) });
|
329
330
|
};
|
330
331
|
_this.switchFullScreen = function () {
|
331
332
|
if (!_this.state.fullscreenMode) {
|
@@ -346,11 +347,11 @@ var DialogBase = /** @class */ (function (_super) {
|
|
346
347
|
_this._dialogOptions.base.style.backgroundColor : "#FFFFFF";
|
347
348
|
var bg = _this._dialogOptions.base.style.background ?
|
348
349
|
_this._dialogOptions.base.style.background : "#FFFFFF";
|
349
|
-
return
|
350
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-content-placeholder', style: {
|
350
351
|
backgroundColor: bgColor,
|
351
352
|
background: bg,
|
352
353
|
display: placeholder ? 'flex' : 'none',
|
353
|
-
}
|
354
|
+
}, children: placeholder });
|
354
355
|
};
|
355
356
|
_this.Header = function (header) {
|
356
357
|
var _a, _b, _c, _d, _e, _f, _g;
|
@@ -367,42 +368,33 @@ var DialogBase = /** @class */ (function (_super) {
|
|
367
368
|
headerProps = _this._dialogOptions.slotProps.header(staticProps);
|
368
369
|
}
|
369
370
|
if (_this._dialogOptions.slot.header) {
|
370
|
-
return
|
371
|
+
return (0, jsx_runtime_1.jsx)("div", { onDoubleClick: function (event) {
|
371
372
|
if (_this._fullscreen) {
|
372
373
|
_this.switchFullScreen();
|
373
374
|
}
|
374
|
-
}, style: (_c = (_b = _this._dialogOptions.base) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.style, className: "dialog-header ".concat(_this._draggable && !_this.state.fullscreenMode ? 'drag-handle' : '') },
|
375
|
-
React.createElement(WithHeaderFooterContext, __assign({}, staticProps),
|
376
|
-
React.createElement(CustomHeader, __assign({}, staticProps, headerProps, { dialog: _this }))));
|
375
|
+
}, style: (_c = (_b = _this._dialogOptions.base) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.style, className: "dialog-header ".concat(_this._draggable && !_this.state.fullscreenMode ? 'drag-handle' : ''), children: (0, jsx_runtime_1.jsx)(WithHeaderFooterContext, __assign({}, staticProps, { children: (0, jsx_runtime_1.jsx)(CustomHeader, __assign({}, staticProps, headerProps, { dialog: _this })) })) });
|
377
376
|
}
|
378
377
|
if (header instanceof Function) {
|
379
|
-
return
|
378
|
+
return (0, jsx_runtime_1.jsxs)("div", { onDoubleClick: function (event) {
|
380
379
|
if (_this._fullscreen) {
|
381
380
|
_this.switchFullScreen();
|
382
381
|
}
|
383
|
-
}, style: (_e = (_d = _this._dialogOptions.base) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.style, className: "dialog-header ".concat(_this._draggable && !_this.state.fullscreenMode ? 'drag-handle' : '')
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
React.createElement(Futures_1.DialogHeaderActionsWrapper, null,
|
388
|
-
_this._fullscreen &&
|
389
|
-
React.createElement(Futures_1.DialogFullscreenAction, null),
|
390
|
-
_this._closeable &&
|
391
|
-
React.createElement(Futures_1.DialogCloseAction, null))));
|
382
|
+
}, style: (_e = (_d = _this._dialogOptions.base) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.style, className: "dialog-header ".concat(_this._draggable && !_this.state.fullscreenMode ? 'drag-handle' : ''), children: [header(_this), (_this._closeable || _this._fullscreen) &&
|
383
|
+
(0, jsx_runtime_1.jsx)(WithHeaderFooterContext, { dialog: _this, children: (0, jsx_runtime_1.jsxs)(Futures_1.DialogHeaderActionsWrapper, { children: [_this._fullscreen &&
|
384
|
+
(0, jsx_runtime_1.jsx)(Futures_1.DialogFullscreenAction, {}), _this._closeable &&
|
385
|
+
(0, jsx_runtime_1.jsx)(Futures_1.DialogCloseAction, {})] }) })] });
|
392
386
|
}
|
393
|
-
return
|
387
|
+
return (0, jsx_runtime_1.jsx)("div", { style: (_g = (_f = _this._dialogOptions.base) === null || _f === void 0 ? void 0 : _f.header) === null || _g === void 0 ? void 0 : _g.style, className: 'drag-handle dialog-header', children: header });
|
394
388
|
};
|
395
389
|
_this.Body = function (body) {
|
396
390
|
if (body instanceof Function) {
|
397
|
-
return
|
398
|
-
_this.Placeholder(_this._holder),
|
399
|
-
body(_this));
|
391
|
+
return (0, jsx_runtime_1.jsxs)("div", { ref: _this._dialogBodyRef, className: 'dialog-body', style: { height: '100%' }, children: [_this.Placeholder(_this._holder), body(_this)] });
|
400
392
|
}
|
401
|
-
return
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
393
|
+
return (0, jsx_runtime_1.jsx)("div", { style: { height: '100%', padding: 10 }, children: _this._holder ?
|
394
|
+
_this.Placeholder(_this._holder)
|
395
|
+
:
|
396
|
+
//@ts-ignore
|
397
|
+
body });
|
406
398
|
};
|
407
399
|
// private Footer = (actions?: DialogAction[]) => {
|
408
400
|
//
|
@@ -449,6 +441,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
449
441
|
// </div>
|
450
442
|
//
|
451
443
|
// };
|
444
|
+
// Bu islem Dialog Base state inden bagimsiz calisir
|
452
445
|
_this.Footer = React.forwardRef(function (_a, ref) {
|
453
446
|
var _b, _c, _d;
|
454
447
|
var actions = _a.actions;
|
@@ -477,43 +470,38 @@ var DialogBase = /** @class */ (function (_super) {
|
|
477
470
|
});
|
478
471
|
}
|
479
472
|
console.log('FooterSlot_props_Y', footerProps, staticProps, 'V6 ya hazirlik -2');
|
480
|
-
return
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
:
|
486
|
-
React.createElement(Futures_1.DialogProcessing, null)
|
487
|
-
/*<CircularProgress size={20} inProcess={this._inProcess} color={this._dialogOptions.progress.color}/>*/
|
488
|
-
)),
|
489
|
-
_this.Actions(actions));
|
473
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: 'dialog-footer', style: (_d = (_c = _this._dialogOptions.base) === null || _c === void 0 ? void 0 : _c.footer) === null || _d === void 0 ? void 0 : _d.style, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(WithHeaderFooterContext, __assign({}, staticProps, { dialog: _this, children: _this._dialogOptions.slot.footer ?
|
474
|
+
/*<CustomFooter inProcess={this._inProcess} dialogValues={this.state.values} dialogOptions={this._dialogOptions} />*/
|
475
|
+
(0, jsx_runtime_1.jsx)(CustomFooter, __assign({}, staticProps, footerProps))
|
476
|
+
:
|
477
|
+
(0, jsx_runtime_1.jsx)(Futures_1.DialogProcessing, {}) })) }), _this.Actions(actions)] });
|
490
478
|
});
|
491
479
|
_this.Actions = function (actions) {
|
492
|
-
return
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
480
|
+
return (0, jsx_runtime_1.jsx)("div", { style: { position: 'relative', display: 'flex', flexDirection: 'row', columnGap: 10, alignItems: 'center' }, children: actions.map(function (action, index) {
|
481
|
+
// const ref = this.slotActionsRef[index];
|
482
|
+
// const ActionSlot = this._dialogOptions?.slot?.action;
|
483
|
+
// // console.log('ActionSlot',ActionSlot);
|
484
|
+
// if (ActionSlot) {
|
485
|
+
// return <ActionSlot
|
486
|
+
// ref={ref}
|
487
|
+
// key={index.toString()}
|
488
|
+
// {...this._dialogOptions?.slotProps?.action}
|
489
|
+
// onClick={ (event: React.MouseEvent) => {
|
490
|
+
// action._onClickSlot( ref, this );
|
491
|
+
// }}
|
492
|
+
// label={action.options.label}
|
493
|
+
// style={{...this._dialogOptions.slotProps?.action?.style, ...action.options.style }}
|
494
|
+
// />
|
495
|
+
//
|
496
|
+
// }
|
497
|
+
var referencedAction = _this.initializeActionRef(action.name);
|
498
|
+
// this._actions[action.name] = referencedAction.current
|
499
|
+
return (0, jsx_runtime_1.jsx)(DialogActionBase_1.default, { name: action.name, ref: referencedAction, dialogBaseComponent: _this, options: action.options, onClick: action.onClickHandler(), inProcess: action.isInProcess(),
|
500
|
+
// onLoad={ dialogAction => {
|
501
|
+
// action.baseDialogAction = dialogAction;
|
502
|
+
// }}
|
503
|
+
style: action.options.style, baseStyle: _this._dialogOptions.base.actions.baseStyle, fontFamily: _this._fontFamily, stateListener: action._stateListener }, index.toString());
|
504
|
+
}) });
|
517
505
|
};
|
518
506
|
_this.Content = function (body, header, actions) {
|
519
507
|
var _a;
|
@@ -533,11 +521,10 @@ var DialogBase = /** @class */ (function (_super) {
|
|
533
521
|
console.log('Content:', actions);
|
534
522
|
var xKey = _this.dialogPosFromMultipleDialogs.isMultiple ? "left" : "marginLeft";
|
535
523
|
var yKey = _this.dialogPosFromMultipleDialogs.isMultiple ? "top" : "marginTop";
|
536
|
-
return
|
524
|
+
return (0, jsx_runtime_1.jsx)(react_draggable_1.default, { disabled: !_this._draggable || _this.state.fullscreenMode, axis: 'both', handle: _this._draggable ? '.drag-handle' : '', scale: 1, ref: _this._backdropRef, onDrag: function (event, data) {
|
537
525
|
event.stopPropagation();
|
538
526
|
_this._dialogTranslate = { lastX: data.lastX, lastY: data.lastY };
|
539
|
-
}
|
540
|
-
React.createElement("div", { id: "dialog-main", ref: _this._dialogRef, onClick: function (e) {
|
527
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { id: "dialog-main", ref: _this._dialogRef, onClick: function (e) {
|
541
528
|
e.stopPropagation();
|
542
529
|
}, onKeyDown: function (e) {
|
543
530
|
if (typeof _this.props.keyboardListener === "function") {
|
@@ -546,15 +533,8 @@ var DialogBase = /** @class */ (function (_super) {
|
|
546
533
|
}
|
547
534
|
},
|
548
535
|
// className={this._dialogSize.width === 'auto' ? 'auto' : `dialog-width-${this._dialogSize.width} dialog-main show-opacity show-position-${this._dialogOptions.base.initialAnchor.vertical}`}
|
549
|
-
className: _this._dialogOptions.base.size.width === 'auto' ? 'auto' : "dialog-width-".concat(_this._dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(_this._dialogOptions.base.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ alignSelf: _this._dialogOptions.base.initialAnchor.vertical, height: (_b = _this._dialogOptions.base.size.height) !== null && _b !== void 0 ? _b : 'auto' }, typeof _this._dialogOptions.base.size.width === "number" ? { width: _this._dialogOptions.base.size.width } : null), (_a = { outline: 'none' }, _a[yKey] = _this.dialogPosFromMultipleDialogs.top + 'px', _a[xKey] = _this.dialogPosFromMultipleDialogs.left + 'px', _a)), _this._dialogOptions.base.style), { fontFamily: _this._fontFamily }) },
|
550
|
-
|
551
|
-
(_this._header || _this._dialogOptions.slot.header) && _this.Header(header),
|
552
|
-
_this.Body(body),
|
553
|
-
React.createElement(_this.Footer, { ref: _this._footeRef, actions: actions })),
|
554
|
-
(_this._dialogOptions.base.resizeable) &&
|
555
|
-
React.createElement(React.Fragment, null,
|
556
|
-
React.createElement("div", { className: "resizable-handle", onMouseDown: (_c = _this._Resizeable) === null || _c === void 0 ? void 0 : _c.resizeHandleMouseDown },
|
557
|
-
React.createElement(ResizeIcon_1.default, { color: '#286e94' })))));
|
536
|
+
className: _this._dialogOptions.base.size.width === 'auto' ? 'auto' : "dialog-width-".concat(_this._dialogOptions.base.size.width, " dialog-main show-opacity show-position-").concat(_this._dialogOptions.base.initialAnchor.vertical), style: __assign(__assign(__assign(__assign({ alignSelf: _this._dialogOptions.base.initialAnchor.vertical, height: (_b = _this._dialogOptions.base.size.height) !== null && _b !== void 0 ? _b : 'auto' }, typeof _this._dialogOptions.base.size.width === "number" ? { width: _this._dialogOptions.base.size.width } : null), (_a = { outline: 'none' }, _a[yKey] = _this.dialogPosFromMultipleDialogs.top + 'px', _a[xKey] = _this.dialogPosFromMultipleDialogs.left + 'px', _a)), _this._dialogOptions.base.style), { fontFamily: _this._fontFamily }), children: [(0, jsx_runtime_1.jsxs)(WithSnackbar, { snackbarRef: _this._snackbarRef, maxSnack: _this._dialogOptions.snackbar.maxSnack, children: [(_this._header || _this._dialogOptions.slot.header) && _this.Header(header), _this.Body(body), (0, jsx_runtime_1.jsx)(_this.Footer, { ref: _this._footeRef, actions: actions })] }), (_this._dialogOptions.base.resizeable) &&
|
537
|
+
(0, jsx_runtime_1.jsx)(React.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "resizable-handle", onMouseDown: (_c = _this._Resizeable) === null || _c === void 0 ? void 0 : _c.resizeHandleMouseDown, children: (0, jsx_runtime_1.jsx)(ResizeIcon_1.default, { color: '#286e94' }) }) })] }) });
|
558
538
|
};
|
559
539
|
_this.render = function () {
|
560
540
|
return _this.withBackdrop(_this._body, _this._header, _this._actions);
|
@@ -1,34 +1,11 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
4
|
};
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
6
|
exports.DialogCloseAction = void 0;
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
30
8
|
var CloseIcon_1 = __importDefault(require("../icons/CloseIcon"));
|
31
|
-
var React = __importStar(require("react"));
|
32
9
|
var react_1 = require("react");
|
33
10
|
var DialogBase_1 = require("../DialogBase");
|
34
11
|
// const DialogCloseAction = ({dialog}:{dialog: React.RefObject<IDialogRef> | undefined}) => {
|
@@ -39,16 +16,15 @@ var DialogCloseAction = function () {
|
|
39
16
|
var _dialog = dialogHeaderContext.dialog;
|
40
17
|
// console.log('DialogCloseAction_props', dialogHeaderContext);
|
41
18
|
// return <div className={'close-icon-wrapper'} onClick={event => apiRef.current.close()} >
|
42
|
-
return
|
19
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'close-icon-wrapper', onClick: function (event) {
|
43
20
|
// props.dialog.close()
|
44
21
|
_dialog.close();
|
45
|
-
}
|
46
|
-
React.createElement(CloseIcon_1.default
|
22
|
+
}, children: (0, jsx_runtime_1.jsx)(CloseIcon_1.default
|
47
23
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
48
24
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
49
25
|
, {
|
50
26
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
51
27
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
52
|
-
size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null }));
|
28
|
+
size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null }) });
|
53
29
|
};
|
54
30
|
exports.DialogCloseAction = DialogCloseAction;
|
@@ -1,33 +1,10 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
4
|
};
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
6
|
exports.DialogFullscreenAction = void 0;
|
30
|
-
var
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
31
8
|
var FullscreenExitIcon_1 = __importDefault(require("../icons/FullscreenExitIcon"));
|
32
9
|
var FullscreenIcon_1 = __importDefault(require("../icons/FullscreenIcon"));
|
33
10
|
var react_1 = require("react");
|
@@ -37,24 +14,24 @@ var DialogFullscreenAction = function () {
|
|
37
14
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
38
15
|
var dialogHeaderContext = (0, react_1.useContext)(DialogBase_1.DialogHeaderFooterContext);
|
39
16
|
var _dialog = dialogHeaderContext.dialog;
|
40
|
-
return
|
17
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'fullscreen-icon-wrapper', onClick: function (event) {
|
41
18
|
event.stopPropagation();
|
42
19
|
_dialog.switchFullScreen();
|
43
|
-
}
|
44
|
-
|
45
|
-
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
46
|
-
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
47
|
-
, {
|
48
|
-
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
49
|
-
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
50
|
-
size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null })
|
51
|
-
:
|
52
|
-
React.createElement(FullscreenIcon_1.default
|
20
|
+
}, children: _dialog.state.fullscreenMode ?
|
21
|
+
(0, jsx_runtime_1.jsx)(FullscreenExitIcon_1.default
|
53
22
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
54
23
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
55
24
|
, {
|
56
25
|
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
57
26
|
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
58
|
-
size: (
|
27
|
+
size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null })
|
28
|
+
:
|
29
|
+
(0, jsx_runtime_1.jsx)(FullscreenIcon_1.default
|
30
|
+
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
31
|
+
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
32
|
+
, {
|
33
|
+
// size={apiRef.current.dialogOptions.base.headerControllerIcons?.size ?? 24 }
|
34
|
+
// color={apiRef.current.dialogOptions.base.headerControllerIcons?.color ?? null }
|
35
|
+
size: (_f = (_e = _dialog.dialogOptions.base.headerControllerIcons) === null || _e === void 0 ? void 0 : _e.size) !== null && _f !== void 0 ? _f : 24, color: (_h = (_g = _dialog.dialogOptions.base.headerControllerIcons) === null || _g === void 0 ? void 0 : _g.color) !== null && _h !== void 0 ? _h : null }) });
|
59
36
|
};
|
60
37
|
exports.DialogFullscreenAction = DialogFullscreenAction;
|
@@ -3,5 +3,5 @@ interface IProps {
|
|
3
3
|
gap?: number;
|
4
4
|
children?: React.ReactNode;
|
5
5
|
}
|
6
|
-
declare const DialogHeaderActionsWrapper: (props: IProps) =>
|
6
|
+
declare const DialogHeaderActionsWrapper: (props: IProps) => import("react/jsx-runtime").JSX.Element;
|
7
7
|
export { DialogHeaderActionsWrapper };
|
@@ -10,14 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
10
10
|
};
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
|
-
};
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
14
|
exports.DialogHeaderActionsWrapper = void 0;
|
18
|
-
var
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
19
16
|
var DialogHeaderActionsWrapper = function (props) {
|
20
17
|
var _a;
|
21
|
-
return (
|
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 })));
|
22
19
|
};
|
23
20
|
exports.DialogHeaderActionsWrapper = DialogHeaderActionsWrapper;
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.DialogInfoAction = void 0;
|
30
|
-
var
|
30
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
31
31
|
var react_1 = require("react");
|
32
32
|
var DialogBase_1 = require("../DialogBase");
|
33
33
|
var InfoIcon_1 = __importDefault(require("../icons/InfoIcon"));
|
@@ -39,7 +39,7 @@ var DialogInfoAction = function () {
|
|
39
39
|
var _a, _b, _c, _d;
|
40
40
|
var dialogHeaderContext = (0, react_1.useContext)(DialogBase_1.DialogHeaderFooterContext);
|
41
41
|
var _dialog = dialogHeaderContext.dialog;
|
42
|
-
return
|
42
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'info-icon-wrapper', onClick: function (event) {
|
43
43
|
var closeAction = new __1.DialogAction('closeAction', {
|
44
44
|
label: 'Close',
|
45
45
|
variant: 'text',
|
@@ -72,23 +72,12 @@ var DialogInfoAction = function () {
|
|
72
72
|
});
|
73
73
|
dialog
|
74
74
|
.setHeader(function (dialog1) { return 'Info'; })
|
75
|
-
.setBody(function (dialog1) { return
|
76
|
-
React.createElement("tbody", null,
|
77
|
-
React.createElement("tr", null,
|
78
|
-
React.createElement("td", null, "Name"),
|
79
|
-
React.createElement("td", null, package_json_1.default.name)),
|
80
|
-
React.createElement("tr", null,
|
81
|
-
React.createElement("td", null, "Varsion"),
|
82
|
-
React.createElement("td", null, package_json_1.default.version)),
|
83
|
-
React.createElement("tr", null,
|
84
|
-
React.createElement("td", null, "Author"),
|
85
|
-
React.createElement("td", null, package_json_1.default.author)))); })
|
75
|
+
.setBody(function (dialog1) { return (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Name" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default.name })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Varsion" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default.version })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Author" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default.author })] })] }) }); })
|
86
76
|
.addActions([
|
87
77
|
closeAction
|
88
78
|
])
|
89
79
|
.initialState({})
|
90
80
|
.show();
|
91
|
-
} }
|
92
|
-
React.createElement(InfoIcon_1.default, { size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null }));
|
81
|
+
}, children: (0, jsx_runtime_1.jsx)(InfoIcon_1.default, { size: (_b = (_a = _dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = _dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null }) });
|
93
82
|
};
|
94
83
|
exports.DialogInfoAction = DialogInfoAction;
|