@etsoo/materialui 1.6.49 → 1.6.51

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.
@@ -109,9 +109,8 @@ class NotificationMU extends react_2.NotificationReact {
109
109
  await this.returnValue(undefined);
110
110
  return true;
111
111
  };
112
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [(0, jsx_runtime_1.jsxs)(IconDialogTitle, { draggable: draggable, className: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [icon, (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, { children: [typeof this.content === "string" ? ((0, jsx_runtime_1.jsx)(DialogContentText_1.default, { children: this.content })) : (this.content), inputs] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons
113
- ? buttons(this, callback)
114
- : primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButtonProps, children: okLabel })) })] }, this.id));
112
+ const base = () => primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButtonProps, children: okLabel }));
113
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [(0, jsx_runtime_1.jsxs)(IconDialogTitle, { draggable: draggable, className: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [icon, (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, { children: [typeof this.content === "string" ? ((0, jsx_runtime_1.jsx)(DialogContentText_1.default, { children: this.content })) : (this.content), inputs] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? buttons(this, callback, base) : base() })] }, this.id));
115
114
  }
116
115
  // Create confirm
117
116
  createConfirm(_props, className) {
@@ -124,7 +123,8 @@ class NotificationMU extends react_2.NotificationReact {
124
123
  await this.returnValue(value);
125
124
  return true;
126
125
  };
127
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...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)(Help_1.default, { color: "action" }), (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, { children: [typeof this.content === "string" ? ((0, jsx_runtime_1.jsx)(DialogContentText_1.default, { children: this.content })) : (this.content), inputs] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? (buttons(this, callback)) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [cancelButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "secondary", onClick: async (event) => await callback(event, false), children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", onClick: async (event) => await callback(event, true), autoFocus: true, ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
126
+ const base = () => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [cancelButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "secondary", onClick: async (event) => await callback(event, false), children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", onClick: async (event) => await callback(event, true), autoFocus: true, ...primaryButtonProps, children: okLabel }))] }));
127
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...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)(Help_1.default, { color: "action" }), (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, { children: [typeof this.content === "string" ? ((0, jsx_runtime_1.jsx)(DialogContentText_1.default, { children: this.content })) : (this.content), inputs] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? buttons(this, callback, base) : base() })] }, this.id));
128
128
  }
129
129
  createMessageColor() {
130
130
  if (this.type === notificationbase_1.NotificationMessageType.Danger)
@@ -186,11 +186,12 @@ class NotificationMU extends react_2.NotificationReact {
186
186
  this.dismiss();
187
187
  return true;
188
188
  };
189
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, 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, { ...inputProps, children: [content, (0, jsx_runtime_1.jsx)(Typography_1.default, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), (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: () => {
190
- if (this.onReturn)
191
- this.onReturn(undefined);
192
- this.dismiss();
193
- }, children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
189
+ const base = () => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [cancelButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { color: "secondary", onClick: () => {
190
+ if (this.onReturn)
191
+ this.onReturn(undefined);
192
+ this.dismiss();
193
+ }, children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] }));
194
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, 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, { ...inputProps, children: [content, (0, jsx_runtime_1.jsx)(Typography_1.default, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? buttons(this, handleSubmit, base) : base() })] }, this.id));
194
195
  }
195
196
  // Create prompt
196
197
  createPrompt(_props, className) {
@@ -260,6 +261,11 @@ class NotificationMU extends react_2.NotificationReact {
260
261
  }
261
262
  // Setup callback
262
263
  const options = this.renderSetup ? this.renderSetup({}) : undefined;
264
+ const base = () => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [cancelButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { color: "secondary", onClick: () => {
265
+ if (this.onReturn)
266
+ this.onReturn(undefined);
267
+ this.dismiss();
268
+ }, children: cancelLabel })), primaryButton && ((0, jsx_runtime_1.jsx)(LoadingButton_1.LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] }));
263
269
  return ((0, jsx_runtime_1.jsxs)(Dialog_1.default, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent_1.DraggablePaperComponent : undefined, slotProps: {
264
270
  paper: {
265
271
  component: "form",
@@ -269,11 +275,7 @@ class NotificationMU extends react_2.NotificationReact {
269
275
  return false;
270
276
  }
271
277
  }
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, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), (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));
278
+ }, 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, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), (0, jsx_runtime_1.jsx)(DialogActions_1.default, { children: buttons ? buttons(this, handleSubmit, base) : base() })] }, this.id));
277
279
  }
278
280
  createPopup(_props, className) {
279
281
  // Destruct
@@ -135,3 +135,4 @@ export * from "./UserAvatar";
135
135
  export * from "./UserAvatarEditor";
136
136
  export * from "./ViewContainer";
137
137
  export { default as AccountTreeIcon } from "@mui/icons-material/AccountTree";
138
+ export { DataGrid, type GridColDef } from "@mui/x-data-grid";
package/lib/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.AccountTreeIcon = void 0;
20
+ exports.DataGrid = exports.AccountTreeIcon = void 0;
21
21
  __exportStar(require("./app/CommonApp"), exports);
22
22
  __exportStar(require("./app/IServiceApp"), exports);
23
23
  __exportStar(require("./app/IServiceAppSettings"), exports);
@@ -157,3 +157,6 @@ __exportStar(require("./ViewContainer"), exports);
157
157
  // Icons
158
158
  var AccountTree_1 = require("@mui/icons-material/AccountTree");
159
159
  Object.defineProperty(exports, "AccountTreeIcon", { enumerable: true, get: function () { return __importDefault(AccountTree_1).default; } });
160
+ // Datagrid
161
+ var x_data_grid_1 = require("@mui/x-data-grid");
162
+ Object.defineProperty(exports, "DataGrid", { enumerable: true, get: function () { return x_data_grid_1.DataGrid; } });
@@ -103,9 +103,8 @@ export class NotificationMU extends NotificationReact {
103
103
  await this.returnValue(undefined);
104
104
  return true;
105
105
  };
106
- 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: draggable ? "dialog-title draggable-dialog-title" : "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
107
- ? buttons(this, callback)
108
- : primaryButton && (_jsx(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButtonProps, children: okLabel })) })] }, this.id));
106
+ const base = () => primaryButton && (_jsx(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButtonProps, children: okLabel }));
107
+ 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: draggable ? "dialog-title draggable-dialog-title" : "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 ? buttons(this, callback, base) : base() })] }, this.id));
109
108
  }
110
109
  // Create confirm
111
110
  createConfirm(_props, className) {
@@ -118,7 +117,8 @@ export class NotificationMU extends NotificationReact {
118
117
  await this.returnValue(value);
119
118
  return true;
120
119
  };
121
- 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: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [_jsx(HelpIcon, { 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));
120
+ const base = () => (_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 }))] }));
121
+ 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: draggable ? "dialog-title draggable-dialog-title" : "dialog-title", children: [_jsx(HelpIcon, { 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, base) : base() })] }, this.id));
122
122
  }
123
123
  createMessageColor() {
124
124
  if (this.type === NotificationMessageType.Danger)
@@ -180,11 +180,12 @@ export class NotificationMU extends NotificationReact {
180
180
  this.dismiss();
181
181
  return true;
182
182
  };
183
- return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, 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, { ...inputProps, children: [content, _jsx(Typography, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), _jsx(DialogActions, { children: buttons ? (buttons(this, handleSubmit)) : (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(Button, { color: "secondary", onClick: () => {
184
- if (this.onReturn)
185
- this.onReturn(undefined);
186
- this.dismiss();
187
- }, children: cancelLabel })), primaryButton && (_jsx(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] })) })] }, this.id));
183
+ const base = () => (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(Button, { color: "secondary", onClick: () => {
184
+ if (this.onReturn)
185
+ this.onReturn(undefined);
186
+ this.dismiss();
187
+ }, children: cancelLabel })), primaryButton && (_jsx(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] }));
188
+ return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, 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, { ...inputProps, children: [content, _jsx(Typography, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), _jsx(DialogActions, { children: buttons ? buttons(this, handleSubmit, base) : base() })] }, this.id));
188
189
  }
189
190
  // Create prompt
190
191
  createPrompt(_props, className) {
@@ -254,6 +255,11 @@ export class NotificationMU extends NotificationReact {
254
255
  }
255
256
  // Setup callback
256
257
  const options = this.renderSetup ? this.renderSetup({}) : undefined;
258
+ const base = () => (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(Button, { color: "secondary", onClick: () => {
259
+ if (this.onReturn)
260
+ this.onReturn(undefined);
261
+ this.dismiss();
262
+ }, children: cancelLabel })), primaryButton && (_jsx(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButtonProps, children: okLabel }))] }));
257
263
  return (_jsxs(Dialog, { open: this.open, PaperComponent: draggable ? DraggablePaperComponent : undefined, slotProps: {
258
264
  paper: {
259
265
  component: "form",
@@ -263,11 +269,7 @@ export class NotificationMU extends NotificationReact {
263
269
  return false;
264
270
  }
265
271
  }
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, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), _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));
272
+ }, 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, { component: "div", variant: "caption", ref: errorRef, color: "error", align: "center" })] }), _jsx(DialogActions, { children: buttons ? buttons(this, handleSubmit, base) : base() })] }, this.id));
271
273
  }
272
274
  createPopup(_props, className) {
273
275
  // Destruct
@@ -135,3 +135,4 @@ export * from "./UserAvatar";
135
135
  export * from "./UserAvatarEditor";
136
136
  export * from "./ViewContainer";
137
137
  export { default as AccountTreeIcon } from "@mui/icons-material/AccountTree";
138
+ export { DataGrid, type GridColDef } from "@mui/x-data-grid";
package/lib/mjs/index.js CHANGED
@@ -136,3 +136,5 @@ export * from "./UserAvatarEditor";
136
136
  export * from "./ViewContainer";
137
137
  // Icons
138
138
  export { default as AccountTreeIcon } from "@mui/icons-material/AccountTree";
139
+ // Datagrid
140
+ export { DataGrid } from "@mui/x-data-grid";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.6.49",
3
+ "version": "1.6.51",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -36,27 +36,27 @@
36
36
  },
37
37
  "homepage": "https://github.com/ETSOO/ReactMU#readme",
38
38
  "dependencies": {
39
- "@base-ui/react": "^1.4.0",
39
+ "@base-ui/react": "^1.4.1",
40
40
  "@dnd-kit/react": "^0.4.0",
41
41
  "@emotion/react": "^11.14.0",
42
42
  "@emotion/styled": "^11.14.1",
43
- "@etsoo/appscript": "^1.6.62",
44
- "@etsoo/notificationbase": "^1.1.70",
45
- "@etsoo/react": "^1.8.86",
46
- "@etsoo/shared": "^1.2.83",
47
- "@mui/icons-material": "^9.0.0",
48
- "@mui/material": "^9.0.0",
49
- "@mui/x-data-grid": "^9.0.2",
43
+ "@etsoo/appscript": "^1.6.63",
44
+ "@etsoo/notificationbase": "^1.1.71",
45
+ "@etsoo/react": "^1.8.88",
46
+ "@etsoo/shared": "^1.2.84",
47
+ "@mui/icons-material": "^9.0.1",
48
+ "@mui/material": "^9.0.1",
49
+ "@mui/x-data-grid": "^9.1.0",
50
50
  "chart.js": "^4.5.1",
51
51
  "chartjs-plugin-datalabels": "^2.2.0",
52
- "dompurify": "^3.4.0",
52
+ "dompurify": "^3.4.2",
53
53
  "eventemitter3": "^5.0.4",
54
54
  "pica": "^9.0.1",
55
55
  "pulltorefreshjs": "^0.1.22",
56
- "react": "^19.2.5",
56
+ "react": "^19.2.6",
57
57
  "react-avatar-editor": "^15.1.0",
58
58
  "react-chartjs-2": "^5.3.1",
59
- "react-dom": "^19.2.5",
59
+ "react-dom": "^19.2.6",
60
60
  "react-draggable": "^4.5.0",
61
61
  "react-imask": "7.6.1"
62
62
  },
@@ -67,7 +67,7 @@
67
67
  "devDependencies": {
68
68
  "@babel/core": "^7.29.0",
69
69
  "@babel/plugin-transform-runtime": "^7.29.0",
70
- "@babel/preset-env": "^7.29.2",
70
+ "@babel/preset-env": "^7.29.5",
71
71
  "@babel/preset-react": "^7.28.5",
72
72
  "@babel/preset-typescript": "^7.28.5",
73
73
  "@babel/runtime-corejs3": "^7.29.2",
@@ -80,8 +80,8 @@
80
80
  "@types/react-dom": "^19.2.3",
81
81
  "@types/react-input-mask": "^3.0.6",
82
82
  "@vitejs/plugin-react": "^6.0.1",
83
- "jsdom": "^29.0.2",
83
+ "jsdom": "^29.1.1",
84
84
  "typescript": "^6.0.3",
85
- "vitest": "^4.1.4"
85
+ "vitest": "^4.1.5"
86
86
  }
87
87
  }
@@ -156,6 +156,18 @@ export class NotificationMU extends NotificationReact {
156
156
  return true;
157
157
  };
158
158
 
159
+ const base = () =>
160
+ primaryButton && (
161
+ <LoadingButton
162
+ {...setupProps}
163
+ onClick={callback}
164
+ autoFocus
165
+ {...primaryButtonProps}
166
+ >
167
+ {okLabel}
168
+ </LoadingButton>
169
+ );
170
+
159
171
  return (
160
172
  <Dialog
161
173
  key={this.id}
@@ -194,18 +206,7 @@ export class NotificationMU extends NotificationReact {
194
206
  {inputs}
195
207
  </DialogContent>
196
208
  <DialogActions>
197
- {buttons
198
- ? buttons(this, callback)
199
- : primaryButton && (
200
- <LoadingButton
201
- {...setupProps}
202
- onClick={callback}
203
- autoFocus
204
- {...primaryButtonProps}
205
- >
206
- {okLabel}
207
- </LoadingButton>
208
- )}
209
+ {buttons ? buttons(this, callback, base) : base()}
209
210
  </DialogActions>
210
211
  </Dialog>
211
212
  );
@@ -242,6 +243,29 @@ export class NotificationMU extends NotificationReact {
242
243
  return true;
243
244
  };
244
245
 
246
+ const base = () => (
247
+ <React.Fragment>
248
+ {cancelButton && (
249
+ <LoadingButton
250
+ color="secondary"
251
+ onClick={async (event) => await callback(event, false)}
252
+ >
253
+ {cancelLabel}
254
+ </LoadingButton>
255
+ )}
256
+ {primaryButton && (
257
+ <LoadingButton
258
+ color="primary"
259
+ onClick={async (event) => await callback(event, true)}
260
+ autoFocus
261
+ {...primaryButtonProps}
262
+ >
263
+ {okLabel}
264
+ </LoadingButton>
265
+ )}
266
+ </React.Fragment>
267
+ );
268
+
245
269
  return (
246
270
  <Dialog
247
271
  key={this.id}
@@ -280,30 +304,7 @@ export class NotificationMU extends NotificationReact {
280
304
  {inputs}
281
305
  </DialogContent>
282
306
  <DialogActions>
283
- {buttons ? (
284
- buttons(this, callback)
285
- ) : (
286
- <React.Fragment>
287
- {cancelButton && (
288
- <LoadingButton
289
- color="secondary"
290
- onClick={async (event) => await callback(event, false)}
291
- >
292
- {cancelLabel}
293
- </LoadingButton>
294
- )}
295
- {primaryButton && (
296
- <LoadingButton
297
- color="primary"
298
- onClick={async (event) => await callback(event, true)}
299
- autoFocus
300
- {...primaryButtonProps}
301
- >
302
- {okLabel}
303
- </LoadingButton>
304
- )}
305
- </React.Fragment>
306
- )}
307
+ {buttons ? buttons(this, callback, base) : base()}
307
308
  </DialogActions>
308
309
  </Dialog>
309
310
  );
@@ -420,6 +421,33 @@ export class NotificationMU extends NotificationReact {
420
421
  return true;
421
422
  };
422
423
 
424
+ const base = () => (
425
+ <React.Fragment>
426
+ {cancelButton && (
427
+ <Button
428
+ color="secondary"
429
+ onClick={() => {
430
+ if (this.onReturn) this.onReturn(undefined);
431
+ this.dismiss();
432
+ }}
433
+ >
434
+ {cancelLabel}
435
+ </Button>
436
+ )}
437
+ {primaryButton && (
438
+ <LoadingButton
439
+ color="primary"
440
+ autoFocus
441
+ onClick={handleSubmit}
442
+ name="okButton"
443
+ {...primaryButtonProps}
444
+ >
445
+ {okLabel}
446
+ </LoadingButton>
447
+ )}
448
+ </React.Fragment>
449
+ );
450
+
423
451
  return (
424
452
  <Dialog
425
453
  key={this.id}
@@ -461,34 +489,7 @@ export class NotificationMU extends NotificationReact {
461
489
  />
462
490
  </DialogContent>
463
491
  <DialogActions>
464
- {buttons ? (
465
- buttons(this, handleSubmit)
466
- ) : (
467
- <React.Fragment>
468
- {cancelButton && (
469
- <Button
470
- color="secondary"
471
- onClick={() => {
472
- if (this.onReturn) this.onReturn(undefined);
473
- this.dismiss();
474
- }}
475
- >
476
- {cancelLabel}
477
- </Button>
478
- )}
479
- {primaryButton && (
480
- <LoadingButton
481
- color="primary"
482
- autoFocus
483
- onClick={handleSubmit}
484
- name="okButton"
485
- {...primaryButtonProps}
486
- >
487
- {okLabel}
488
- </LoadingButton>
489
- )}
490
- </React.Fragment>
491
- )}
492
+ {buttons ? buttons(this, handleSubmit, base) : base()}
492
493
  </DialogActions>
493
494
  </Dialog>
494
495
  );
@@ -608,6 +609,33 @@ export class NotificationMU extends NotificationReact {
608
609
  // Setup callback
609
610
  const options = this.renderSetup ? this.renderSetup({}) : undefined;
610
611
 
612
+ const base = () => (
613
+ <React.Fragment>
614
+ {cancelButton && (
615
+ <Button
616
+ color="secondary"
617
+ onClick={() => {
618
+ if (this.onReturn) this.onReturn(undefined);
619
+ this.dismiss();
620
+ }}
621
+ >
622
+ {cancelLabel}
623
+ </Button>
624
+ )}
625
+ {primaryButton && (
626
+ <LoadingButton
627
+ color="primary"
628
+ autoFocus
629
+ onClick={handleSubmit}
630
+ name="okButton"
631
+ {...primaryButtonProps}
632
+ >
633
+ {okLabel}
634
+ </LoadingButton>
635
+ )}
636
+ </React.Fragment>
637
+ );
638
+
611
639
  return (
612
640
  <Dialog
613
641
  key={this.id}
@@ -668,34 +696,7 @@ export class NotificationMU extends NotificationReact {
668
696
  />
669
697
  </DialogContent>
670
698
  <DialogActions>
671
- {buttons ? (
672
- buttons(this, handleSubmit)
673
- ) : (
674
- <React.Fragment>
675
- {cancelButton && (
676
- <Button
677
- color="secondary"
678
- onClick={() => {
679
- if (this.onReturn) this.onReturn(undefined);
680
- this.dismiss();
681
- }}
682
- >
683
- {cancelLabel}
684
- </Button>
685
- )}
686
- {primaryButton && (
687
- <LoadingButton
688
- color="primary"
689
- autoFocus
690
- onClick={handleSubmit}
691
- name="okButton"
692
- {...primaryButtonProps}
693
- >
694
- {okLabel}
695
- </LoadingButton>
696
- )}
697
- </React.Fragment>
698
- )}
699
+ {buttons ? buttons(this, handleSubmit, base) : base()}
699
700
  </DialogActions>
700
701
  </Dialog>
701
702
  );
package/src/index.ts CHANGED
@@ -143,3 +143,6 @@ export * from "./ViewContainer";
143
143
 
144
144
  // Icons
145
145
  export { default as AccountTreeIcon } from "@mui/icons-material/AccountTree";
146
+
147
+ // Datagrid
148
+ export { DataGrid, type GridColDef } from "@mui/x-data-grid";