react-dialogger 1.1.20 → 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 +4 -3
- package/components/DialogBase.js +120 -83
- 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
|
@@ -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";
|
|
@@ -41,6 +41,7 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
|
41
41
|
protected _shInterval: number;
|
|
42
42
|
protected _onClose: TDialogCallbackVoidFn;
|
|
43
43
|
private _inProcess;
|
|
44
|
+
private _footeRef;
|
|
44
45
|
/**
|
|
45
46
|
* @deprecated
|
|
46
47
|
* @see dialogOptions.snackbar.anchorOrigin */
|
|
@@ -98,7 +99,7 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
|
98
99
|
close: (callbackFn?: any) => void;
|
|
99
100
|
focus: () => void;
|
|
100
101
|
get actions(): {
|
|
101
|
-
[key: string]: Pick<DialogActionBase, "
|
|
102
|
+
[key: string]: Pick<DialogActionBase, "options" | "setInProcess" | "setOptions" | "getLabel" | "click" | "remove">;
|
|
102
103
|
};
|
|
103
104
|
private orderPositionWithReference;
|
|
104
105
|
/**
|
|
@@ -131,6 +132,6 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
|
131
132
|
private Actions;
|
|
132
133
|
private Content;
|
|
133
134
|
protected show(callback?: TDialogCallbackVoidFn): void;
|
|
134
|
-
render: () =>
|
|
135
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
135
136
|
}
|
|
136
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 {
|
|
@@ -95,6 +96,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
95
96
|
_this._dialogTranslate = { lastX: 0, lastY: 0 };
|
|
96
97
|
_this._shInterval = 300;
|
|
97
98
|
_this._inProcess = { inProcess: false };
|
|
99
|
+
_this._footeRef = React.createRef();
|
|
98
100
|
// Initialize a ref for each action dynamically
|
|
99
101
|
_this.initializeActionRef = function (key) {
|
|
100
102
|
if (!_this._actionRefs.hasOwnProperty(key)) {
|
|
@@ -170,7 +172,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
170
172
|
return _this;
|
|
171
173
|
};
|
|
172
174
|
_this.setInProcess = function (process, message, holder) {
|
|
173
|
-
var _a, _b;
|
|
175
|
+
var _a, _b, _c;
|
|
174
176
|
_this._inProcess = __assign({ inProcess: process }, message ? { message: message } : {});
|
|
175
177
|
// this.setState( prevState => ({
|
|
176
178
|
// ...prevState, inProcess: { inProcess: process, ...message ? {message} : {} }
|
|
@@ -212,7 +214,9 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
212
214
|
if (!process) {
|
|
213
215
|
_this.snackbar.close("kInProcess");
|
|
214
216
|
}
|
|
215
|
-
|
|
217
|
+
// @ts-ignore
|
|
218
|
+
(_c = _this._footeRef.current) === null || _c === void 0 ? void 0 : _c.setProcessing(process);
|
|
219
|
+
// this.forceUpdate();
|
|
216
220
|
return _this;
|
|
217
221
|
};
|
|
218
222
|
_this.isInProcess = function () {
|
|
@@ -310,7 +314,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
310
314
|
_this.orderPositionWithReference();
|
|
311
315
|
var _a = _this._dialogOptions.backdrop, backgroundColor = _a.backgroundColor, opacity = _a.opacity;
|
|
312
316
|
var bgCl = hexToRgb(backgroundColor, opacity);
|
|
313
|
-
return
|
|
317
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "dialog-backdrop dialog-backdrop-show", ref: _this._backdropRef, style: {
|
|
314
318
|
justifyContent: _this._dialogOptions.base.initialAnchor.horizontal,
|
|
315
319
|
// alignItems: dialogOptions.base.initialAnchor.vertical,
|
|
316
320
|
background: bgCl
|
|
@@ -322,7 +326,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
322
326
|
return;
|
|
323
327
|
}
|
|
324
328
|
_this.baseZoomEffect();
|
|
325
|
-
}
|
|
329
|
+
}, children: _this.Content(body, header, actions) });
|
|
326
330
|
};
|
|
327
331
|
_this.switchFullScreen = function () {
|
|
328
332
|
if (!_this.state.fullscreenMode) {
|
|
@@ -343,11 +347,11 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
343
347
|
_this._dialogOptions.base.style.backgroundColor : "#FFFFFF";
|
|
344
348
|
var bg = _this._dialogOptions.base.style.background ?
|
|
345
349
|
_this._dialogOptions.base.style.background : "#FFFFFF";
|
|
346
|
-
return
|
|
350
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'dialog-content-placeholder', style: {
|
|
347
351
|
backgroundColor: bgColor,
|
|
348
352
|
background: bg,
|
|
349
353
|
display: placeholder ? 'flex' : 'none',
|
|
350
|
-
}
|
|
354
|
+
}, children: placeholder });
|
|
351
355
|
};
|
|
352
356
|
_this.Header = function (header) {
|
|
353
357
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -364,46 +368,92 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
364
368
|
headerProps = _this._dialogOptions.slotProps.header(staticProps);
|
|
365
369
|
}
|
|
366
370
|
if (_this._dialogOptions.slot.header) {
|
|
367
|
-
return
|
|
371
|
+
return (0, jsx_runtime_1.jsx)("div", { onDoubleClick: function (event) {
|
|
368
372
|
if (_this._fullscreen) {
|
|
369
373
|
_this.switchFullScreen();
|
|
370
374
|
}
|
|
371
|
-
}, 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' : '') },
|
|
372
|
-
React.createElement(WithHeaderFooterContext, __assign({}, staticProps),
|
|
373
|
-
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 })) })) });
|
|
374
376
|
}
|
|
375
377
|
if (header instanceof Function) {
|
|
376
|
-
return
|
|
378
|
+
return (0, jsx_runtime_1.jsxs)("div", { onDoubleClick: function (event) {
|
|
377
379
|
if (_this._fullscreen) {
|
|
378
380
|
_this.switchFullScreen();
|
|
379
381
|
}
|
|
380
|
-
}, 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' : '')
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
React.createElement(Futures_1.DialogHeaderActionsWrapper, null,
|
|
385
|
-
_this._fullscreen &&
|
|
386
|
-
React.createElement(Futures_1.DialogFullscreenAction, null),
|
|
387
|
-
_this._closeable &&
|
|
388
|
-
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, {})] }) })] });
|
|
389
386
|
}
|
|
390
|
-
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 });
|
|
391
388
|
};
|
|
392
389
|
_this.Body = function (body) {
|
|
393
390
|
if (body instanceof Function) {
|
|
394
|
-
return
|
|
395
|
-
_this.Placeholder(_this._holder),
|
|
396
|
-
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)] });
|
|
397
392
|
}
|
|
398
|
-
return
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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 });
|
|
403
398
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
399
|
+
// private Footer = (actions?: DialogAction[]) => {
|
|
400
|
+
//
|
|
401
|
+
// const CustomFooter = this._dialogOptions.slot?.footer;
|
|
402
|
+
//
|
|
403
|
+
//
|
|
404
|
+
// const staticProps: BaseDialogSlotProps = {
|
|
405
|
+
// dialogValues: this.state.values,
|
|
406
|
+
// dialogOptions: this._dialogOptions,
|
|
407
|
+
// // apiRef: { current: this as IDialogRef } as RefObject<IDialogRef|IDialogCloseRef>
|
|
408
|
+
// // apiRef: { current: this as IDialogRef }
|
|
409
|
+
// dialog: this as IDialogDef
|
|
410
|
+
// };
|
|
411
|
+
//
|
|
412
|
+
// let footerProps = {};
|
|
413
|
+
//
|
|
414
|
+
// if( this._dialogOptions.slotProps.footer ){
|
|
415
|
+
// footerProps = this._dialogOptions.slotProps.footer({
|
|
416
|
+
// dialogValues: this.state.values,
|
|
417
|
+
// dialogOptions: this._dialogOptions,
|
|
418
|
+
// inProcess: this.isInProcess()
|
|
419
|
+
// })
|
|
420
|
+
// }
|
|
421
|
+
//
|
|
422
|
+
//
|
|
423
|
+
// console.log('FooterSlot_props_Y', footerProps, staticProps, 'V6 ya hazirlik -2');
|
|
424
|
+
//
|
|
425
|
+
// return <div className={'dialog-footer'} style={this._dialogOptions.base?.footer?.style}>
|
|
426
|
+
// <div>
|
|
427
|
+
// <WithHeaderFooterContext {...staticProps} dialog={this}>
|
|
428
|
+
// {
|
|
429
|
+
// this._dialogOptions.slot.footer ?
|
|
430
|
+
// /*<CustomFooter inProcess={this._inProcess} dialogValues={this.state.values} dialogOptions={this._dialogOptions} />*/
|
|
431
|
+
// <CustomFooter {...staticProps} {...footerProps} />
|
|
432
|
+
// :
|
|
433
|
+
// <DialogProcessing />
|
|
434
|
+
// /*<CircularProgress size={20} inProcess={this._inProcess} color={this._dialogOptions.progress.color}/>*/
|
|
435
|
+
// }
|
|
436
|
+
// </WithHeaderFooterContext>
|
|
437
|
+
//
|
|
438
|
+
//
|
|
439
|
+
// </div>
|
|
440
|
+
// { this.Actions(actions)}
|
|
441
|
+
// </div>
|
|
442
|
+
//
|
|
443
|
+
// };
|
|
444
|
+
// Bu islem Dialog Base state inden bagimsiz calisir
|
|
445
|
+
_this.Footer = React.forwardRef(function (_a, ref) {
|
|
446
|
+
var _b, _c, _d;
|
|
447
|
+
var actions = _a.actions;
|
|
448
|
+
var CustomFooter = (_b = _this._dialogOptions.slot) === null || _b === void 0 ? void 0 : _b.footer;
|
|
449
|
+
// Imperative handle
|
|
450
|
+
var _e = React.useState(false), inProcess = _e[0], setInProcess = _e[1];
|
|
451
|
+
var setProcessing = function (inProcess) {
|
|
452
|
+
setInProcess(inProcess);
|
|
453
|
+
};
|
|
454
|
+
React.useImperativeHandle(ref, function () { return ({
|
|
455
|
+
setProcessing: setProcessing
|
|
456
|
+
}); });
|
|
407
457
|
var staticProps = {
|
|
408
458
|
dialogValues: _this.state.values,
|
|
409
459
|
dialogOptions: _this._dialogOptions,
|
|
@@ -419,44 +469,39 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
419
469
|
inProcess: _this.isInProcess()
|
|
420
470
|
});
|
|
421
471
|
}
|
|
422
|
-
console.log('FooterSlot_props_Y', footerProps, staticProps, 'V6 ya hazirlik');
|
|
423
|
-
return
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
React.createElement(Futures_1.DialogProcessing, null)
|
|
430
|
-
/*<CircularProgress size={20} inProcess={this._inProcess} color={this._dialogOptions.progress.color}/>*/
|
|
431
|
-
)),
|
|
432
|
-
_this.Actions(actions));
|
|
433
|
-
};
|
|
472
|
+
console.log('FooterSlot_props_Y', footerProps, staticProps, 'V6 ya hazirlik -2');
|
|
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)] });
|
|
478
|
+
});
|
|
434
479
|
_this.Actions = function (actions) {
|
|
435
|
-
return
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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
|
+
}) });
|
|
460
505
|
};
|
|
461
506
|
_this.Content = function (body, header, actions) {
|
|
462
507
|
var _a;
|
|
@@ -476,11 +521,10 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
476
521
|
console.log('Content:', actions);
|
|
477
522
|
var xKey = _this.dialogPosFromMultipleDialogs.isMultiple ? "left" : "marginLeft";
|
|
478
523
|
var yKey = _this.dialogPosFromMultipleDialogs.isMultiple ? "top" : "marginTop";
|
|
479
|
-
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) {
|
|
480
525
|
event.stopPropagation();
|
|
481
526
|
_this._dialogTranslate = { lastX: data.lastX, lastY: data.lastY };
|
|
482
|
-
}
|
|
483
|
-
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) {
|
|
484
528
|
e.stopPropagation();
|
|
485
529
|
}, onKeyDown: function (e) {
|
|
486
530
|
if (typeof _this.props.keyboardListener === "function") {
|
|
@@ -489,15 +533,8 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
489
533
|
}
|
|
490
534
|
},
|
|
491
535
|
// className={this._dialogSize.width === 'auto' ? 'auto' : `dialog-width-${this._dialogSize.width} dialog-main show-opacity show-position-${this._dialogOptions.base.initialAnchor.vertical}`}
|
|
492
|
-
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 }) },
|
|
493
|
-
|
|
494
|
-
(_this._header || _this._dialogOptions.slot.header) && _this.Header(header),
|
|
495
|
-
_this.Body(body),
|
|
496
|
-
_this.Footer(actions)),
|
|
497
|
-
(_this._dialogOptions.base.resizeable) &&
|
|
498
|
-
React.createElement(React.Fragment, null,
|
|
499
|
-
React.createElement("div", { className: "resizable-handle", onMouseDown: (_c = _this._Resizeable) === null || _c === void 0 ? void 0 : _c.resizeHandleMouseDown },
|
|
500
|
-
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' }) }) })] }) });
|
|
501
538
|
};
|
|
502
539
|
_this.render = function () {
|
|
503
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;
|
|
@@ -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.DialogProcessing = void 0;
|
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
8
|
var CircularProgress_1 = __importDefault(require("../CircularProgress"));
|
|
31
|
-
var React = __importStar(require("react"));
|
|
32
9
|
var react_1 = require("react");
|
|
33
10
|
var DialogBase_1 = require("../DialogBase");
|
|
34
11
|
var DialogProcessing = function () {
|
|
@@ -36,6 +13,6 @@ var DialogProcessing = function () {
|
|
|
36
13
|
var dialogHeaderContext = (0, react_1.useContext)(DialogBase_1.DialogHeaderFooterContext);
|
|
37
14
|
var _dialog = dialogHeaderContext.dialog;
|
|
38
15
|
console.log('_dialog_isInProcess', _dialog.isInProcess());
|
|
39
|
-
return
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: (_a = _dialog.dialogOptions.progress.size) !== null && _a !== void 0 ? _a : 20, inProcess: _dialog.isInProcess(), color: (_c = (_b = _dialog.dialogOptions.progress) === null || _b === void 0 ? void 0 : _b.color) !== null && _c !== void 0 ? _c : '#399aec' });
|
|
40
17
|
};
|
|
41
18
|
exports.DialogProcessing = DialogProcessing;
|
|
@@ -34,6 +34,7 @@ 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
|
var react_1 = require("react");
|
|
39
40
|
exports.default = React.forwardRef(function (_a, ref) {
|
|
@@ -66,7 +67,7 @@ exports.default = React.forwardRef(function (_a, ref) {
|
|
|
66
67
|
rippleEffect: rippleEffect
|
|
67
68
|
}); });
|
|
68
69
|
console.log('Ripple_button_style', style);
|
|
69
|
-
return (
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("button", {
|
|
70
71
|
// ref={buttonRef}
|
|
71
72
|
ref: ref, disabled: disabled, className: "ripple-button ripple-button-".concat(variant, " ripple-button-").concat(color, " ").concat(disabled ? 'ripple-button-disabled' : ''), onClick: function (e) {
|
|
72
73
|
//@ts-ignore
|
|
@@ -75,7 +76,5 @@ exports.default = React.forwardRef(function (_a, ref) {
|
|
|
75
76
|
setTimeout(function () {
|
|
76
77
|
onClick && onClick(e);
|
|
77
78
|
}, 200);
|
|
78
|
-
}, style: __assign(__assign(__assign({}, baseStyle), style), { fontFamily: fontFamily }) },
|
|
79
|
-
isRippling && React.createElement("span", { className: "ripple", style: { left: coords.x, top: coords.y } }),
|
|
80
|
-
React.createElement("span", { className: "content" }, children(ref.current))));
|
|
79
|
+
}, style: __assign(__assign(__assign({}, baseStyle), style), { fontFamily: fontFamily }), children: [isRippling && (0, jsx_runtime_1.jsx)("span", { className: "ripple", style: { left: coords.x, top: coords.y } }), (0, jsx_runtime_1.jsx)("span", { className: "content", children: children(ref.current) })] }));
|
|
81
80
|
});
|
|
@@ -10,14 +10,9 @@ 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
|
-
var
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
15
|
exports.default = (function (_a) {
|
|
19
16
|
var size = _a.size, color = _a.color;
|
|
20
|
-
return
|
|
21
|
-
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "CloseIcon" },
|
|
22
|
-
react_1.default.createElement("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })));
|
|
17
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'close-icon icon-base', style: __assign({ fill: color }, size ? { width: size } : null), children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "CloseIcon", children: (0, jsx_runtime_1.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) });
|
|
23
18
|
});
|
|
@@ -10,14 +10,9 @@ 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
|
-
var
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
15
|
exports.default = (function (_a) {
|
|
19
16
|
var size = _a.size, color = _a.color;
|
|
20
|
-
return
|
|
21
|
-
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "FullscreenExitIcon" },
|
|
22
|
-
react_1.default.createElement("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" })));
|
|
17
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'fullscreen-exit-icon icon-base', style: __assign({ fill: color }, size ? { width: size } : null), children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "FullscreenExitIcon", children: (0, jsx_runtime_1.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }) }) });
|
|
23
18
|
});
|
|
@@ -10,14 +10,9 @@ 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
|
-
var
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
15
|
exports.default = (function (_a) {
|
|
19
16
|
var size = _a.size, color = _a.color;
|
|
20
|
-
return
|
|
21
|
-
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "FullscreenIcon", color: color },
|
|
22
|
-
react_1.default.createElement("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" })));
|
|
17
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'fullscreen-icon icon-base', style: __assign({ fill: color }, size ? { width: size } : null), children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "FullscreenIcon", color: color, children: (0, jsx_runtime_1.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }) }) });
|
|
23
18
|
});
|
|
@@ -10,14 +10,9 @@ 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
|
-
var
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
15
|
exports.default = (function (_a) {
|
|
19
16
|
var size = _a.size, color = _a.color;
|
|
20
|
-
return
|
|
21
|
-
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "InfoIcon" },
|
|
22
|
-
react_1.default.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" })));
|
|
17
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'info-icon icon-base', style: __assign({ fill: color }, size ? { width: size } : null), children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "InfoIcon", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }) }) });
|
|
23
18
|
});
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var
|
|
3
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
exports.default = (function (_a) {
|
|
8
5
|
var size = _a.size, color = _a.color;
|
|
9
|
-
return
|
|
6
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'resizable-handle-icon icon-base', style: {
|
|
10
7
|
fill: color
|
|
11
|
-
} }
|
|
12
|
-
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ArrowBackIosNewIcon" },
|
|
13
|
-
react_1.default.createElement("path", { d: "M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z" })));
|
|
8
|
+
}, children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ArrowBackIosNewIcon", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z" }) }) });
|
|
14
9
|
});
|
package/models/DialogAction.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TDialogStateListenerForActionCallbackType, DialogActionOptionsType, TBVariant, TBColor, ActionProps, DialogActionType } from "../types/DialogActionTypes";
|
|
2
2
|
import DialogActionBase from "../components/DialogActionBase";
|
|
3
|
-
|
|
4
|
-
declare const ActionProgress: () => React.JSX.Element;
|
|
3
|
+
declare const ActionProgress: () => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export { ActionProgress };
|
|
6
5
|
declare class DialogAction extends DialogActionBase {
|
|
7
6
|
constructor(name: string, options?: DialogActionOptionsType);
|
package/models/DialogAction.js
CHANGED
|
@@ -25,39 +25,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
-
}
|
|
34
|
-
Object.defineProperty(o, k2, desc);
|
|
35
|
-
}) : (function(o, m, k, k2) {
|
|
36
|
-
if (k2 === undefined) k2 = k;
|
|
37
|
-
o[k2] = m[k];
|
|
38
|
-
}));
|
|
39
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
-
}) : function(o, v) {
|
|
42
|
-
o["default"] = v;
|
|
43
|
-
});
|
|
44
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
45
|
-
if (mod && mod.__esModule) return mod;
|
|
46
|
-
var result = {};
|
|
47
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
48
|
-
__setModuleDefault(result, mod);
|
|
49
|
-
return result;
|
|
50
|
-
};
|
|
51
28
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
30
|
};
|
|
54
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
32
|
exports.DialogAction = exports.ActionProgress = void 0;
|
|
33
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
56
34
|
var DialogActionBase_1 = __importDefault(require("../components/DialogActionBase"));
|
|
57
35
|
var CircularProgress_1 = __importDefault(require("../components/CircularProgress"));
|
|
58
|
-
var React = __importStar(require("react"));
|
|
59
36
|
var ActionProgress = function () {
|
|
60
|
-
return
|
|
37
|
+
return (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 20, inProcess: { inProcess: true } });
|
|
61
38
|
};
|
|
62
39
|
exports.ActionProgress = ActionProgress;
|
|
63
40
|
var DialogAction = /** @class */ (function (_super) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"pb": "
|
|
24
|
+
"pb": "npm version patch && npm publish && cp ./package.json ../src/dist.package.json"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"react",
|