@etsoo/materialui 1.4.20 → 1.4.21
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/lib/NotifierMU.js +5 -5
- package/package.json +1 -1
- package/src/NotifierMU.tsx +5 -5
package/lib/NotifierMU.js
CHANGED
|
@@ -11,8 +11,8 @@ import { LoadingButton } from "./LoadingButton";
|
|
|
11
11
|
import { Labels } from "./app/Labels";
|
|
12
12
|
// Custom icon dialog title bar
|
|
13
13
|
const IconDialogTitle = styled(DialogTitle) `
|
|
14
|
-
${({ theme }) => `
|
|
15
|
-
cursor: move;
|
|
14
|
+
${({ theme, draggable }) => `
|
|
15
|
+
cursor: ${draggable ? "move" : "default"};
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
& .dialogTitle {
|
|
@@ -63,7 +63,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
63
63
|
await this.returnValue(undefined);
|
|
64
64
|
return true;
|
|
65
65
|
};
|
|
66
|
-
return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { className: "
|
|
66
|
+
return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { draggable: draggable, className: "dialog-title", children: [icon, _jsx("span", { className: "dialogTitle", children: title }), closable && (_jsx(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE"), children: _jsx(CloseIcon, {}) }))] }), _jsxs(DialogContent, { children: [typeof this.content === "string" ? (_jsx(DialogContentText, { children: this.content })) : (this.content), inputs] }), _jsx(DialogActions, { children: buttons
|
|
67
67
|
? buttons(this, callback)
|
|
68
68
|
: primaryButton && (_jsx(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButtonProps, children: okLabel })) })] }, this.id));
|
|
69
69
|
}
|
|
@@ -78,7 +78,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
78
78
|
await this.returnValue(value);
|
|
79
79
|
return true;
|
|
80
80
|
};
|
|
81
|
-
return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { className: "
|
|
81
|
+
return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { draggable: draggable, className: "dialog-title", children: [_jsx(Help, { color: "action" }), _jsx("span", { className: "dialogTitle", children: title }), closable && (_jsx(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE"), children: _jsx(CloseIcon, {}) }))] }), _jsxs(DialogContent, { children: [typeof this.content === "string" ? (_jsx(DialogContentText, { children: this.content })) : (this.content), inputs] }), _jsx(DialogActions, { children: buttons ? (buttons(this, callback)) : (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(LoadingButton, { color: "secondary", onClick: async (event) => await callback(event, false), children: cancelLabel })), primaryButton && (_jsx(LoadingButton, { color: "primary", onClick: async (event) => await callback(event, true), autoFocus: true, ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
|
|
82
82
|
}
|
|
83
83
|
createMessageColor() {
|
|
84
84
|
if (this.type === NotificationMessageType.Danger)
|
|
@@ -177,7 +177,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
177
177
|
event.preventDefault();
|
|
178
178
|
event.currentTarget.elements.namedItem("okButton")?.click();
|
|
179
179
|
return false;
|
|
180
|
-
}, children: [_jsxs(IconDialogTitle, { className: "
|
|
180
|
+
}, children: [_jsxs(IconDialogTitle, { draggable: draggable, className: "dialog-title", children: [_jsx(Info, { color: "primary" }), _jsx("span", { className: "dialogTitle", children: title }), closable && (_jsx(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE"), children: _jsx(CloseIcon, {}) }))] }), _jsxs(DialogContent, { children: [typeof this.content === "string" ? (_jsx(DialogContentText, { children: this.content })) : (this.content), localInputs, _jsx(Typography, { variant: "caption", display: "block", ref: errorRef, color: "error" })] }), _jsx(DialogActions, { children: buttons ? (buttons(this, handleSubmit)) : (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(Button, { color: "secondary", onClick: () => {
|
|
181
181
|
if (this.onReturn)
|
|
182
182
|
this.onReturn(undefined);
|
|
183
183
|
this.dismiss();
|
package/package.json
CHANGED
package/src/NotifierMU.tsx
CHANGED
|
@@ -45,8 +45,8 @@ import { Labels } from "./app/Labels";
|
|
|
45
45
|
|
|
46
46
|
// Custom icon dialog title bar
|
|
47
47
|
const IconDialogTitle = styled(DialogTitle)`
|
|
48
|
-
${({ theme }) => `
|
|
49
|
-
cursor: move;
|
|
48
|
+
${({ theme, draggable }) => `
|
|
49
|
+
cursor: ${draggable ? "move" : "default"};
|
|
50
50
|
display: flex;
|
|
51
51
|
align-items: center;
|
|
52
52
|
& .dialogTitle {
|
|
@@ -123,7 +123,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
123
123
|
fullScreen={fullScreen}
|
|
124
124
|
{...options}
|
|
125
125
|
>
|
|
126
|
-
<IconDialogTitle className="
|
|
126
|
+
<IconDialogTitle draggable={draggable} className="dialog-title">
|
|
127
127
|
{icon}
|
|
128
128
|
<span className="dialogTitle">{title}</span>
|
|
129
129
|
{closable && (
|
|
@@ -204,7 +204,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
204
204
|
fullScreen={fullScreen}
|
|
205
205
|
{...options}
|
|
206
206
|
>
|
|
207
|
-
<IconDialogTitle className="
|
|
207
|
+
<IconDialogTitle draggable={draggable} className="dialog-title">
|
|
208
208
|
<Help color="action" />
|
|
209
209
|
<span className="dialogTitle">{title}</span>
|
|
210
210
|
{closable && (
|
|
@@ -438,7 +438,7 @@ export class NotificationMU extends NotificationReact {
|
|
|
438
438
|
return false;
|
|
439
439
|
}}
|
|
440
440
|
>
|
|
441
|
-
<IconDialogTitle className="
|
|
441
|
+
<IconDialogTitle draggable={draggable} className="dialog-title">
|
|
442
442
|
<Info color="primary" />
|
|
443
443
|
<span className="dialogTitle">{title}</span>
|
|
444
444
|
{closable && (
|