@etsoo/materialui 1.6.36 → 1.6.38
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/cjs/NotifierMU.js +14 -9
- package/lib/mjs/NotifierMU.js +14 -9
- package/package.json +7 -7
- package/src/NotifierMU.tsx +84 -82
package/lib/cjs/NotifierMU.js
CHANGED
|
@@ -260,15 +260,20 @@ class NotificationMU extends react_2.NotificationReact {
|
|
|
260
260
|
}
|
|
261
261
|
// Setup callback
|
|
262
262
|
const options = this.renderSetup ? this.renderSetup({}) : undefined;
|
|
263
|
-
return ((0, jsx_runtime_1.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
263
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, slotProps: {
|
|
264
|
+
paper: {
|
|
265
|
+
component: "form",
|
|
266
|
+
onSubmit: (event) => {
|
|
267
|
+
event.preventDefault();
|
|
268
|
+
event.currentTarget.elements.namedItem("okButton")?.click();
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, scroll: "paper", ...options, children: [(0, jsx_runtime_1.jsxs)(IconDialogTitle, { draggable: draggable, className: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [(0, jsx_runtime_1.jsx)(Info_1.default, { color: "primary" }), (0, jsx_runtime_1.jsx)("span", { className: "dialogTitle", children: title }), closable && ((0, jsx_runtime_1.jsx)(IconButton_1.default, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE"), children: (0, jsx_runtime_1.jsx)(Close_1.default, {}) }))] }), (0, jsx_runtime_1.jsxs)(DialogContent_1.default, { dividers: true, children: [typeof this.content === "string" ? ((0, jsx_runtime_1.jsx)(DialogContentText_1.default, { children: this.content })) : (this.content), localInputs, (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "caption", display: "block", ref: errorRef, color: "error" })] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? (buttons(this, handleSubmit)) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [cancelButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { color: "secondary", onClick: () => {
|
|
273
|
+
if (this.onReturn)
|
|
274
|
+
this.onReturn(undefined);
|
|
275
|
+
this.dismiss();
|
|
276
|
+
}, children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
|
|
272
277
|
}
|
|
273
278
|
createPopup(_props, className) {
|
|
274
279
|
// Destruct
|
package/lib/mjs/NotifierMU.js
CHANGED
|
@@ -254,15 +254,20 @@ export class NotificationMU extends NotificationReact {
|
|
|
254
254
|
}
|
|
255
255
|
// Setup callback
|
|
256
256
|
const options = this.renderSetup ? this.renderSetup({}) : undefined;
|
|
257
|
-
return (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
257
|
+
return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, slotProps: {
|
|
258
|
+
paper: {
|
|
259
|
+
component: "form",
|
|
260
|
+
onSubmit: (event) => {
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
event.currentTarget.elements.namedItem("okButton")?.click();
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, scroll: "paper", ...options, children: [_jsxs(IconDialogTitle, { draggable: draggable, className: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [_jsx(InfoIcon, { 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, { dividers: true, 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: () => {
|
|
267
|
+
if (this.onReturn)
|
|
268
|
+
this.onReturn(undefined);
|
|
269
|
+
this.dismiss();
|
|
270
|
+
}, children: cancelLabel })), primaryButton && (_jsx(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
|
|
266
271
|
}
|
|
267
272
|
createPopup(_props, className) {
|
|
268
273
|
// Destruct
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.38",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@dnd-kit/react": "^0.3.2",
|
|
41
41
|
"@emotion/react": "^11.14.0",
|
|
42
42
|
"@emotion/styled": "^11.14.1",
|
|
43
|
-
"@etsoo/appscript": "^1.6.
|
|
44
|
-
"@etsoo/notificationbase": "^1.1.
|
|
45
|
-
"@etsoo/react": "^1.8.
|
|
46
|
-
"@etsoo/shared": "^1.2.
|
|
43
|
+
"@etsoo/appscript": "^1.6.59",
|
|
44
|
+
"@etsoo/notificationbase": "^1.1.68",
|
|
45
|
+
"@etsoo/react": "^1.8.83",
|
|
46
|
+
"@etsoo/shared": "^1.2.81",
|
|
47
47
|
"@mui/icons-material": "^7.3.9",
|
|
48
48
|
"@mui/material": "^7.3.9",
|
|
49
|
-
"@mui/x-data-grid": "^8.28.
|
|
49
|
+
"@mui/x-data-grid": "^8.28.1",
|
|
50
50
|
"chart.js": "^4.5.1",
|
|
51
51
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
52
52
|
"dompurify": "^3.3.3",
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
"@vitejs/plugin-react": "^6.0.1",
|
|
83
83
|
"jsdom": "^29.0.1",
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
|
-
"vitest": "^4.1.
|
|
85
|
+
"vitest": "^4.1.2"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/src/NotifierMU.tsx
CHANGED
|
@@ -606,92 +606,94 @@ export class NotificationMU extends NotificationReact {
|
|
|
606
606
|
const options = this.renderSetup ? this.renderSetup({}) : undefined;
|
|
607
607
|
|
|
608
608
|
return (
|
|
609
|
-
<
|
|
609
|
+
<Dialog
|
|
610
610
|
key={this.id}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
)
|
|
617
|
-
|
|
618
|
-
|
|
611
|
+
open={this.open}
|
|
612
|
+
PaperComponent={draggable ? DraggablePaperComponent : undefined}
|
|
613
|
+
slotProps={{
|
|
614
|
+
paper: {
|
|
615
|
+
component: "form",
|
|
616
|
+
onSubmit: (event: React.SubmitEvent<HTMLFormElement>) => {
|
|
617
|
+
event.preventDefault();
|
|
618
|
+
(
|
|
619
|
+
event.currentTarget.elements.namedItem(
|
|
620
|
+
"okButton"
|
|
621
|
+
) as HTMLButtonElement
|
|
622
|
+
)?.click();
|
|
623
|
+
return false;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
619
626
|
}}
|
|
627
|
+
className={className}
|
|
628
|
+
fullWidth={fullWidth}
|
|
629
|
+
maxWidth={maxWidth}
|
|
630
|
+
fullScreen={fullScreen}
|
|
631
|
+
scroll="paper"
|
|
632
|
+
{...options}
|
|
620
633
|
>
|
|
621
|
-
<
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
maxWidth={maxWidth}
|
|
627
|
-
fullScreen={fullScreen}
|
|
628
|
-
scroll="paper"
|
|
629
|
-
{...options}
|
|
634
|
+
<IconDialogTitle
|
|
635
|
+
draggable={draggable}
|
|
636
|
+
className={
|
|
637
|
+
draggable ? "dialog-title draggable-dialog-title" : "dialog-title"
|
|
638
|
+
}
|
|
630
639
|
>
|
|
631
|
-
<
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
</LoadingButton>
|
|
689
|
-
)}
|
|
690
|
-
</React.Fragment>
|
|
691
|
-
)}
|
|
692
|
-
</DialogActions>
|
|
693
|
-
</Dialog>
|
|
694
|
-
</form>
|
|
640
|
+
<InfoIcon color="primary" />
|
|
641
|
+
<span className="dialogTitle">{title}</span>
|
|
642
|
+
{closable && (
|
|
643
|
+
<IconButton
|
|
644
|
+
className="MuiDialogContent-root-close-button"
|
|
645
|
+
size="small"
|
|
646
|
+
onClick={() => this.returnValue("CLOSE")}
|
|
647
|
+
>
|
|
648
|
+
<CloseIcon />
|
|
649
|
+
</IconButton>
|
|
650
|
+
)}
|
|
651
|
+
</IconDialogTitle>
|
|
652
|
+
<DialogContent dividers>
|
|
653
|
+
{typeof this.content === "string" ? (
|
|
654
|
+
<DialogContentText>{this.content}</DialogContentText>
|
|
655
|
+
) : (
|
|
656
|
+
this.content
|
|
657
|
+
)}
|
|
658
|
+
{localInputs}
|
|
659
|
+
<Typography
|
|
660
|
+
variant="caption"
|
|
661
|
+
display="block"
|
|
662
|
+
ref={errorRef}
|
|
663
|
+
color="error"
|
|
664
|
+
/>
|
|
665
|
+
</DialogContent>
|
|
666
|
+
<DialogActions>
|
|
667
|
+
{buttons ? (
|
|
668
|
+
buttons(this, handleSubmit)
|
|
669
|
+
) : (
|
|
670
|
+
<React.Fragment>
|
|
671
|
+
{cancelButton && (
|
|
672
|
+
<Button
|
|
673
|
+
color="secondary"
|
|
674
|
+
onClick={() => {
|
|
675
|
+
if (this.onReturn) this.onReturn(undefined);
|
|
676
|
+
this.dismiss();
|
|
677
|
+
}}
|
|
678
|
+
>
|
|
679
|
+
{cancelLabel}
|
|
680
|
+
</Button>
|
|
681
|
+
)}
|
|
682
|
+
{primaryButton && (
|
|
683
|
+
<LoadingButton
|
|
684
|
+
color="primary"
|
|
685
|
+
autoFocus
|
|
686
|
+
onClick={handleSubmit}
|
|
687
|
+
name="okButton"
|
|
688
|
+
{...primaryButtonProps}
|
|
689
|
+
>
|
|
690
|
+
{okLabel}
|
|
691
|
+
</LoadingButton>
|
|
692
|
+
)}
|
|
693
|
+
</React.Fragment>
|
|
694
|
+
)}
|
|
695
|
+
</DialogActions>
|
|
696
|
+
</Dialog>
|
|
695
697
|
);
|
|
696
698
|
}
|
|
697
699
|
|