@etsoo/materialui 1.3.57 → 1.3.59

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.
Files changed (171) hide show
  1. package/__tests__/ResponsePage.tsx +12 -3
  2. package/lib/AddresSelector.d.ts +1 -1
  3. package/lib/AddresSelector.js +9 -18
  4. package/lib/AuditDisplay.d.ts +1 -1
  5. package/lib/AuditDisplay.js +12 -15
  6. package/lib/BackButton.d.ts +1 -2
  7. package/lib/BackButton.js +3 -4
  8. package/lib/BridgeCloseButton.d.ts +1 -2
  9. package/lib/BridgeCloseButton.js +3 -4
  10. package/lib/ButtonLink.d.ts +1 -2
  11. package/lib/ButtonLink.js +2 -2
  12. package/lib/ComboBox.d.ts +1 -2
  13. package/lib/ComboBox.js +12 -16
  14. package/lib/ComboBoxMultiple.d.ts +1 -2
  15. package/lib/ComboBoxMultiple.js +15 -19
  16. package/lib/ComboBoxPro.d.ts +1 -2
  17. package/lib/ComboBoxPro.js +3 -2
  18. package/lib/CountdownButton.js +4 -3
  19. package/lib/CountryList.d.ts +1 -2
  20. package/lib/CountryList.js +2 -1
  21. package/lib/CultureDataTable.d.ts +1 -2
  22. package/lib/CultureDataTable.js +2 -1
  23. package/lib/DataGridEx.d.ts +1 -1
  24. package/lib/DataGridEx.js +55 -58
  25. package/lib/DataGridRenderers.js +5 -5
  26. package/lib/DataSteps.d.ts +1 -2
  27. package/lib/DataSteps.js +20 -23
  28. package/lib/DataTable.d.ts +1 -1
  29. package/lib/DataTable.js +2 -1
  30. package/lib/DialogButton.d.ts +1 -1
  31. package/lib/DialogButton.js +6 -13
  32. package/lib/DnDList.d.ts +1 -1
  33. package/lib/DnDList.js +8 -8
  34. package/lib/DraggablePaperComponent.d.ts +1 -2
  35. package/lib/DraggablePaperComponent.js +2 -2
  36. package/lib/EmailInput.d.ts +1 -2
  37. package/lib/EmailInput.js +2 -2
  38. package/lib/FabBox.d.ts +1 -2
  39. package/lib/FabBox.js +4 -3
  40. package/lib/FieldSetEx.d.ts +1 -1
  41. package/lib/FieldSetEx.js +13 -16
  42. package/lib/FileUploadButton.d.ts +1 -1
  43. package/lib/FileUploadButton.js +27 -29
  44. package/lib/FlexBox.d.ts +2 -3
  45. package/lib/FlexBox.js +3 -3
  46. package/lib/GridDataFormat.js +2 -2
  47. package/lib/HiSelector.d.ts +1 -1
  48. package/lib/HiSelector.js +2 -12
  49. package/lib/HiSelectorTL.d.ts +1 -1
  50. package/lib/HiSelectorTL.js +2 -12
  51. package/lib/IconButtonLink.d.ts +1 -2
  52. package/lib/IconButtonLink.js +2 -2
  53. package/lib/InputField.js +2 -1
  54. package/lib/InputTipField.d.ts +1 -1
  55. package/lib/InputTipField.js +12 -14
  56. package/lib/IntInputField.js +28 -33
  57. package/lib/ItemList.d.ts +1 -1
  58. package/lib/ItemList.js +6 -11
  59. package/lib/LineChart.d.ts +1 -2
  60. package/lib/LineChart.js +2 -1
  61. package/lib/ListChooser.d.ts +1 -1
  62. package/lib/ListChooser.js +4 -7
  63. package/lib/ListMoreDisplay.d.ts +1 -1
  64. package/lib/ListMoreDisplay.js +5 -10
  65. package/lib/LoadingButton.d.ts +1 -2
  66. package/lib/LoadingButton.js +3 -2
  67. package/lib/MaskInput.d.ts +1 -2
  68. package/lib/MaskInput.js +2 -1
  69. package/lib/MenuButton.d.ts +1 -1
  70. package/lib/MenuButton.js +30 -31
  71. package/lib/MobileListItemRenderer.d.ts +1 -1
  72. package/lib/MobileListItemRenderer.js +15 -18
  73. package/lib/MoneyInputField.js +2 -1
  74. package/lib/MoreFab.d.ts +1 -1
  75. package/lib/MoreFab.js +21 -24
  76. package/lib/NotifierMU.d.ts +2 -2
  77. package/lib/NotifierMU.js +27 -67
  78. package/lib/NumberInputField.d.ts +1 -1
  79. package/lib/NumberInputField.js +4 -4
  80. package/lib/OptionBool.d.ts +1 -2
  81. package/lib/OptionBool.js +2 -2
  82. package/lib/OptionGroup.d.ts +1 -1
  83. package/lib/OptionGroup.js +17 -20
  84. package/lib/OptionGroupFlag.d.ts +1 -1
  85. package/lib/OptionGroupFlag.js +15 -18
  86. package/lib/PList.d.ts +1 -2
  87. package/lib/PList.js +5 -4
  88. package/lib/PercentCircularProgress.d.ts +1 -2
  89. package/lib/PercentCircularProgress.js +11 -14
  90. package/lib/PercentLinearProgress.d.ts +1 -2
  91. package/lib/PercentLinearProgress.js +2 -6
  92. package/lib/ProgressCount.d.ts +1 -2
  93. package/lib/ProgressCount.js +12 -18
  94. package/lib/PullToRefreshUI.d.ts +1 -2
  95. package/lib/PullToRefreshUI.js +2 -1
  96. package/lib/QuickList.d.ts +1 -1
  97. package/lib/QuickList.js +12 -14
  98. package/lib/ResponsibleContainer.d.ts +1 -1
  99. package/lib/ResponsibleContainer.js +11 -16
  100. package/lib/ScrollTopFab.d.ts +1 -2
  101. package/lib/ScrollTopFab.js +2 -3
  102. package/lib/ScrollerListEx.d.ts +1 -1
  103. package/lib/ScrollerListEx.js +3 -2
  104. package/lib/SearchBar.d.ts +1 -1
  105. package/lib/SearchBar.js +27 -35
  106. package/lib/SearchField.d.ts +1 -2
  107. package/lib/SearchField.js +2 -1
  108. package/lib/SearchOptionGroup.d.ts +1 -2
  109. package/lib/SearchOptionGroup.js +2 -2
  110. package/lib/SelectBool.d.ts +1 -2
  111. package/lib/SelectBool.js +2 -2
  112. package/lib/SelectEx.d.ts +1 -1
  113. package/lib/SelectEx.js +47 -55
  114. package/lib/ShowDataComparison.js +2 -11
  115. package/lib/Switch.d.ts +1 -2
  116. package/lib/Switch.js +3 -2
  117. package/lib/SwitchAnt.d.ts +1 -2
  118. package/lib/SwitchAnt.js +12 -14
  119. package/lib/SwitchField.d.ts +1 -1
  120. package/lib/SwitchField.js +13 -16
  121. package/lib/TabBox.d.ts +1 -1
  122. package/lib/TabBox.js +6 -9
  123. package/lib/TableEx.d.ts +1 -1
  124. package/lib/TableEx.js +79 -89
  125. package/lib/TagList.d.ts +1 -2
  126. package/lib/TagList.js +4 -5
  127. package/lib/TagListPro.d.ts +1 -2
  128. package/lib/TagListPro.js +4 -6
  129. package/lib/TextFieldEx.js +3 -6
  130. package/lib/Tiplist.d.ts +1 -2
  131. package/lib/Tiplist.js +39 -40
  132. package/lib/TiplistPro.d.ts +2 -2
  133. package/lib/TiplistPro.js +48 -49
  134. package/lib/TooltipClick.d.ts +1 -1
  135. package/lib/TooltipClick.js +3 -3
  136. package/lib/TwoFieldInput.d.ts +1 -2
  137. package/lib/TwoFieldInput.js +4 -5
  138. package/lib/UserAvatar.d.ts +1 -2
  139. package/lib/UserAvatar.js +3 -3
  140. package/lib/UserAvatarEditor.d.ts +1 -2
  141. package/lib/UserAvatarEditor.js +2 -19
  142. package/lib/messages/OperationMessageContainer.d.ts +1 -2
  143. package/lib/messages/OperationMessageContainer.js +2 -1
  144. package/lib/pages/CommonPage.d.ts +1 -2
  145. package/lib/pages/CommonPage.js +15 -24
  146. package/lib/pages/DataGridPage.d.ts +1 -2
  147. package/lib/pages/DataGridPage.js +5 -8
  148. package/lib/pages/EditPage.d.ts +1 -1
  149. package/lib/pages/EditPage.js +6 -15
  150. package/lib/pages/FixedListPage.d.ts +1 -2
  151. package/lib/pages/FixedListPage.js +5 -9
  152. package/lib/pages/LeftDrawer.d.ts +1 -1
  153. package/lib/pages/LeftDrawer.js +3 -10
  154. package/lib/pages/ListPage.d.ts +1 -2
  155. package/lib/pages/ListPage.js +4 -7
  156. package/lib/pages/ResponsivePage.d.ts +1 -2
  157. package/lib/pages/ResponsivePage.js +25 -26
  158. package/lib/pages/TablePage.d.ts +1 -2
  159. package/lib/pages/TablePage.js +5 -8
  160. package/lib/pages/UserMenu.d.ts +1 -1
  161. package/lib/pages/UserMenu.js +33 -35
  162. package/lib/pages/ViewPage.d.ts +2 -2
  163. package/lib/pages/ViewPage.js +29 -37
  164. package/lib/texts/DateText.d.ts +1 -2
  165. package/lib/texts/DateText.js +2 -2
  166. package/lib/texts/MoneyText.d.ts +1 -2
  167. package/lib/texts/MoneyText.js +4 -4
  168. package/lib/texts/NumberText.d.ts +1 -2
  169. package/lib/texts/NumberText.js +2 -2
  170. package/package.json +9 -9
  171. package/tsconfig.json +1 -1
@@ -1,5 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { Card, CardContent, CardHeader, LinearProgress } from '@mui/material';
2
- import React from 'react';
3
3
  import { MoreFab } from './MoreFab';
4
4
  /**
5
5
  * Default mobile list item renderer
@@ -11,25 +11,22 @@ import { MoreFab } from './MoreFab';
11
11
  export function MobileListItemRenderer({ data, itemHeight, margins }, renderer) {
12
12
  // Loading
13
13
  if (data == null)
14
- return React.createElement(LinearProgress, null);
14
+ return _jsx(LinearProgress, {});
15
15
  // Elements
16
16
  const [title, subheader, actions, children, cardActions] = renderer(data);
17
- return (React.createElement(Card, { sx: {
17
+ return (_jsxs(Card, { sx: {
18
18
  height: itemHeight,
19
19
  ...margins
20
- } },
21
- React.createElement(CardHeader, { sx: { paddingBottom: 0.5 }, action: Array.isArray(actions) ? (React.createElement(MoreFab, { iconButton: true, size: "small", anchorOrigin: {
22
- vertical: 'bottom',
23
- horizontal: 'right'
24
- }, transformOrigin: {
25
- vertical: 'top',
26
- horizontal: 'right'
27
- }, actions: actions })) : (actions), title: title, titleTypographyProps: { variant: 'body2' }, subheader: subheader, subheaderTypographyProps: { variant: 'caption' } }),
28
- React.createElement(CardContent, { sx: {
29
- paddingTop: 0,
30
- paddingBottom: cardActions == null
31
- ? Reflect.get(margins, 'marginBottom')
32
- : 0
33
- } }, children),
34
- cardActions));
20
+ }, children: [_jsx(CardHeader, { sx: { paddingBottom: 0.5 }, action: Array.isArray(actions) ? (_jsx(MoreFab, { iconButton: true, size: "small", anchorOrigin: {
21
+ vertical: 'bottom',
22
+ horizontal: 'right'
23
+ }, transformOrigin: {
24
+ vertical: 'top',
25
+ horizontal: 'right'
26
+ }, actions: actions })) : (actions), title: title, titleTypographyProps: { variant: 'body2' }, subheader: subheader, subheaderTypographyProps: { variant: 'caption' } }), _jsx(CardContent, { sx: {
27
+ paddingTop: 0,
28
+ paddingBottom: cardActions == null
29
+ ? Reflect.get(margins, 'marginBottom')
30
+ : 0
31
+ }, children: children }), cardActions] }));
35
32
  }
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React from "react";
2
3
  import { IntInputField } from "./IntInputField";
3
4
  /**
@@ -7,5 +8,5 @@ export const MoneyInputField = React.forwardRef((props, ref) => {
7
8
  // Destruct
8
9
  const { step = 0.01, ...rest } = props;
9
10
  // Layout
10
- return React.createElement(IntInputField, { ref: ref, step: step, ...rest });
11
+ return _jsx(IntInputField, { ref: ref, step: step, ...rest });
11
12
  });
package/lib/MoreFab.d.ts CHANGED
@@ -42,4 +42,4 @@ export interface MoreFabProps extends CustomFabProps {
42
42
  * More fab
43
43
  * @returns Component
44
44
  */
45
- export declare function MoreFab(props: MoreFabProps): React.JSX.Element;
45
+ export declare function MoreFab(props: MoreFabProps): import("react/jsx-runtime").JSX.Element;
package/lib/MoreFab.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
2
3
  import React from "react";
3
4
  import { Divider, Fab, IconButton, ListItemIcon, ListItemText, Menu, MenuItem } from "@mui/material";
@@ -21,7 +22,7 @@ export function MoreFab(props) {
21
22
  const { actions, drawArrow = true, anchorOrigin = {
22
23
  vertical: "top",
23
24
  horizontal: "right"
24
- }, color = "primary", icon = React.createElement(MoreHorizIcon, null), iconButton = false, PaperProps = drawArrow
25
+ }, color = "primary", icon = _jsx(MoreHorizIcon, {}), iconButton = false, PaperProps = drawArrow
25
26
  ? {
26
27
  elevation: 0,
27
28
  sx: {
@@ -66,32 +67,28 @@ export function MoreFab(props) {
66
67
  };
67
68
  // No actions
68
69
  if (actions == null || actions.length == 0)
69
- return React.createElement(React.Fragment, null);
70
+ return _jsx(React.Fragment, {});
70
71
  // Actions
71
72
  const actionsLocal = getActions(actions);
72
73
  // Has any icon
73
74
  const hasIcon = actionsLocal.some((action) => action.icon != null);
74
75
  // Main
75
- const main = iconButton ? (React.createElement(IconButton, { color: color, size: size, title: title, onClick: handleClick }, icon)) : (React.createElement(Fab, { color: color, size: size, title: title, onClick: handleClick }, icon));
76
- return (React.createElement(React.Fragment, null,
77
- main,
78
- React.createElement(Menu, { disableScrollLock: true, anchorEl: anchorEl, anchorOrigin: anchorOrigin, keepMounted: true, transformOrigin: transformOrigin, open: open, onClose: handleClose, PaperProps: PaperProps }, actionsLocal.map(({ label, icon, action }, index) => label === "-" ? (React.createElement(Divider, { key: index })) : (React.createElement(MenuItem, { key: label, ...(typeof action === "string"
79
- ? action.includes("://")
80
- ? {
81
- component: "a",
82
- href: action,
83
- target: "_blank"
84
- }
85
- : { component: Link, to: action }
86
- : Array.isArray(action)
87
- ? { component: Link, to: action[0], state: action[1] }
88
- : {
89
- onClick: (event) => {
90
- handleClose();
91
- if (typeof action === "function")
92
- action(event);
93
- }
94
- }) },
95
- icon != null && React.createElement(ListItemIcon, null, icon),
96
- React.createElement(ListItemText, { inset: icon == null && hasIcon }, label)))))));
76
+ const main = iconButton ? (_jsx(IconButton, { color: color, size: size, title: title, onClick: handleClick, children: icon })) : (_jsx(Fab, { color: color, size: size, title: title, onClick: handleClick, children: icon }));
77
+ return (_jsxs(React.Fragment, { children: [main, _jsx(Menu, { disableScrollLock: true, anchorEl: anchorEl, anchorOrigin: anchorOrigin, keepMounted: true, transformOrigin: transformOrigin, open: open, onClose: handleClose, PaperProps: PaperProps, children: actionsLocal.map(({ label, icon, action }, index) => label === "-" ? (_jsx(Divider, {}, index)) : (_jsxs(MenuItem, { ...(typeof action === "string"
78
+ ? action.includes("://")
79
+ ? {
80
+ component: "a",
81
+ href: action,
82
+ target: "_blank"
83
+ }
84
+ : { component: Link, to: action }
85
+ : Array.isArray(action)
86
+ ? { component: Link, to: action[0], state: action[1] }
87
+ : {
88
+ onClick: (event) => {
89
+ handleClose();
90
+ if (typeof action === "function")
91
+ action(event);
92
+ }
93
+ }), children: [icon != null && _jsx(ListItemIcon, { children: icon }), _jsx(ListItemText, { inset: icon == null && hasIcon, children: label })] }, label))) })] }));
97
94
  }
@@ -18,7 +18,7 @@ export declare class NotificationMU extends NotificationReact {
18
18
  * @param className Style class name
19
19
  * @param classes Style classes
20
20
  */
21
- render(props: NotificationRenderProps, className?: string): React.JSX.Element;
21
+ render(props: NotificationRenderProps, className?: string): import("react/jsx-runtime").JSX.Element;
22
22
  }
23
23
  /**
24
24
  * Antd notifier
@@ -37,7 +37,7 @@ export declare class NotifierMU extends NotifierReact {
37
37
  * @param children Children
38
38
  * @param options Other options
39
39
  */
40
- protected createContainer: (align: NotificationAlign, children: React.ReactNode[]) => React.JSX.Element;
40
+ protected createContainer: (align: NotificationAlign, children: React.ReactNode[]) => import("react/jsx-runtime").JSX.Element;
41
41
  /**
42
42
  * Add raw definition
43
43
  * @param data Notification data definition
package/lib/NotifierMU.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { NotificationAlign, NotificationMessageType, NotificationType } from "@etsoo/notificationbase";
2
3
  import { DomUtils } from "@etsoo/shared";
3
4
  import { Alert, AlertTitle, Backdrop, Box, Button, CircularProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Fade, IconButton, Popover, Slider, Snackbar, styled, Switch, TextField, Typography } from "@mui/material";
@@ -37,19 +38,19 @@ export class NotificationMU extends NotificationReact {
37
38
  let title = this.title;
38
39
  let icon;
39
40
  if (this.type === NotificationMessageType.Success) {
40
- icon = React.createElement(Done, { color: "primary" });
41
+ icon = _jsx(Done, { color: "primary" });
41
42
  title ?? (title = labels.success);
42
43
  }
43
44
  else if (this.type === NotificationMessageType.Info) {
44
- icon = React.createElement(Info, null);
45
+ icon = _jsx(Info, {});
45
46
  title ?? (title = labels.info);
46
47
  }
47
48
  else if (this.type === NotificationMessageType.Warning) {
48
- icon = React.createElement(Warning, { color: "secondary" });
49
+ icon = _jsx(Warning, { color: "secondary" });
49
50
  title ?? (title = labels.warning);
50
51
  }
51
52
  else {
52
- icon = React.createElement(Error, { color: "error" });
53
+ icon = _jsx(Error, { color: "error" });
53
54
  title ?? (title = labels.alertTitle);
54
55
  }
55
56
  const setupProps = {
@@ -62,16 +63,7 @@ export class NotificationMU extends NotificationReact {
62
63
  await this.returnValue(undefined);
63
64
  return true;
64
65
  };
65
- return (React.createElement(Dialog, { key: this.id, open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options },
66
- React.createElement(IconDialogTitle, { className: "draggable-dialog-title" },
67
- icon,
68
- React.createElement("span", { className: "dialogTitle" }, title),
69
- closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
70
- React.createElement(CloseIcon, null)))),
71
- React.createElement(DialogContent, null,
72
- typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
73
- inputs),
74
- React.createElement(DialogActions, null, buttons ? (buttons(this, callback)) : (React.createElement(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButton }, okLabel)))));
66
+ return (_jsxs(Dialog, { open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { className: "draggable-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)) : (_jsx(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButton, children: okLabel })) })] }, this.id));
75
67
  }
76
68
  // Create confirm
77
69
  createConfirm(_props, className) {
@@ -84,18 +76,7 @@ export class NotificationMU extends NotificationReact {
84
76
  await this.returnValue(value);
85
77
  return true;
86
78
  };
87
- return (React.createElement(Dialog, { key: this.id, open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options },
88
- React.createElement(IconDialogTitle, { className: "draggable-dialog-title" },
89
- React.createElement(Help, { color: "action" }),
90
- React.createElement("span", { className: "dialogTitle" }, title),
91
- closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
92
- React.createElement(CloseIcon, null)))),
93
- React.createElement(DialogContent, null,
94
- typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
95
- inputs),
96
- React.createElement(DialogActions, null, buttons ? (buttons(this, callback)) : (React.createElement(React.Fragment, null,
97
- cancelButton && (React.createElement(LoadingButton, { color: "secondary", onClick: async (event) => await callback(event, false) }, cancelLabel)),
98
- React.createElement(LoadingButton, { color: "primary", onClick: async (event) => await callback(event, true), autoFocus: true, ...primaryButton }, okLabel))))));
79
+ return (_jsxs(Dialog, { open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: [_jsxs(IconDialogTitle, { className: "draggable-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 })), _jsx(LoadingButton, { color: "primary", onClick: async (event) => await callback(event, true), autoFocus: true, ...primaryButton, children: okLabel })] })) })] }, this.id));
99
80
  }
100
81
  createMessageColor() {
101
82
  if (this.type === NotificationMessageType.Danger)
@@ -109,7 +90,7 @@ export class NotificationMU extends NotificationReact {
109
90
  // Create message
110
91
  createMessage(props, className) {
111
92
  if (!this.open)
112
- return React.createElement(React.Fragment, { key: this.id });
93
+ return _jsx(React.Fragment, {}, this.id);
113
94
  const { closable = false } = props;
114
95
  const setupProps = {
115
96
  severity: this.createMessageColor(),
@@ -117,11 +98,7 @@ export class NotificationMU extends NotificationReact {
117
98
  };
118
99
  // Setup callback
119
100
  const options = this.renderSetup ? this.renderSetup(setupProps) : undefined;
120
- return (React.createElement(Fade, { in: true, key: this.id },
121
- React.createElement(Alert, { ...setupProps, ...options, action: closable ? (React.createElement(IconButton, { size: "small", onClick: () => this.returnValue("CLOSE") },
122
- React.createElement(CloseIcon, null))) : undefined, onClose: () => this.dismiss(), className: className },
123
- this.title && React.createElement(AlertTitle, null, this.title),
124
- this.content)));
101
+ return (_jsx(Fade, { in: true, children: _jsxs(Alert, { ...setupProps, ...options, action: closable ? (_jsx(IconButton, { size: "small", onClick: () => this.returnValue("CLOSE"), children: _jsx(CloseIcon, {}) })) : undefined, onClose: () => this.dismiss(), className: className, children: [this.title && _jsx(AlertTitle, { children: this.title }), this.content] }) }, this.id));
125
102
  }
126
103
  // Create prompt
127
104
  createPrompt(_props, className) {
@@ -180,13 +157,13 @@ export class NotificationMU extends NotificationReact {
180
157
  let value = undefined;
181
158
  if (inputs == null) {
182
159
  if (type === "switch") {
183
- localInputs = (React.createElement(Switch, { inputRef: inputRef, ...inputProps, value: "true", autoFocus: true, required: true }));
160
+ localInputs = (_jsx(Switch, { inputRef: inputRef, ...inputProps, value: "true", autoFocus: true, required: true }));
184
161
  }
185
162
  else if (type === "slider") {
186
- localInputs = React.createElement(Slider, { onChange: (_e, v) => (value = v) });
163
+ localInputs = _jsx(Slider, { onChange: (_e, v) => (value = v) });
187
164
  }
188
165
  else {
189
- localInputs = (React.createElement(TextField, { inputRef: inputRef, onChange: () => setError(undefined), autoFocus: true, margin: "dense", fullWidth: true, type: type, required: true, ...inputProps }));
166
+ localInputs = (_jsx(TextField, { inputRef: inputRef, onChange: () => setError(undefined), autoFocus: true, margin: "dense", fullWidth: true, type: type, required: true, ...inputProps }));
190
167
  }
191
168
  }
192
169
  else {
@@ -194,28 +171,15 @@ export class NotificationMU extends NotificationReact {
194
171
  }
195
172
  // Setup callback
196
173
  const options = this.renderSetup ? this.renderSetup({}) : undefined;
197
- return (React.createElement(Dialog, { key: this.id, open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options },
198
- React.createElement("form", { onSubmit: (event) => {
174
+ return (_jsx(Dialog, { open: this.open, PaperComponent: DraggablePaperComponent, className: className, fullWidth: fullWidth, maxWidth: maxWidth, fullScreen: fullScreen, ...options, children: _jsxs("form", { onSubmit: (event) => {
199
175
  event.preventDefault();
200
176
  event.currentTarget.elements.namedItem("okButton")?.click();
201
177
  return false;
202
- } },
203
- React.createElement(IconDialogTitle, { className: "draggable-dialog-title" },
204
- React.createElement(Info, { color: "primary" }),
205
- React.createElement("span", { className: "dialogTitle" }, title),
206
- closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
207
- React.createElement(CloseIcon, null)))),
208
- React.createElement(DialogContent, null,
209
- typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
210
- localInputs,
211
- React.createElement(Typography, { variant: "caption", display: "block", ref: errorRef, color: (theme) => theme.palette.error.main })),
212
- React.createElement(DialogActions, null, buttons ? (buttons(this, handleSubmit)) : (React.createElement(React.Fragment, null,
213
- cancelButton && (React.createElement(Button, { color: "secondary", onClick: () => {
214
- if (this.onReturn)
215
- this.onReturn(undefined);
216
- this.dismiss();
217
- } }, cancelLabel)),
218
- React.createElement(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButton }, okLabel)))))));
178
+ }, children: [_jsxs(IconDialogTitle, { className: "draggable-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: (theme) => theme.palette.error.main })] }), _jsx(DialogActions, { children: buttons ? (buttons(this, handleSubmit)) : (_jsxs(React.Fragment, { children: [cancelButton && (_jsx(Button, { color: "secondary", onClick: () => {
179
+ if (this.onReturn)
180
+ this.onReturn(undefined);
181
+ this.dismiss();
182
+ }, children: cancelLabel })), _jsx(LoadingButton, { color: "primary", autoFocus: true, onClick: handleSubmit, name: "okButton", ...primaryButton, children: okLabel })] })) })] }) }, this.id));
219
183
  }
220
184
  createPopup(_props, className) {
221
185
  // Destruct
@@ -223,7 +187,7 @@ export class NotificationMU extends NotificationReact {
223
187
  const { content, id, open } = this;
224
188
  // Setup callback
225
189
  const options = this.renderSetup ? this.renderSetup({}) : undefined;
226
- return (React.createElement(Popover, { key: id, open: open, className: className, onClose: () => this.dismiss(), ...options }, content));
190
+ return (_jsx(Popover, { open: open, className: className, onClose: () => this.dismiss(), ...options, children: content }, id));
227
191
  }
228
192
  // Create loading
229
193
  createLoading(_props, className) {
@@ -238,17 +202,14 @@ export class NotificationMU extends NotificationReact {
238
202
  content = labels.loading.toString();
239
203
  // Setup callback
240
204
  const options = this.renderSetup ? this.renderSetup(setupProps) : undefined;
241
- return (React.createElement(Backdrop, { key: this.id, className: className, sx: {
205
+ return (_jsx(Backdrop, { className: className, sx: {
242
206
  color: "#fff",
243
207
  zIndex: (theme) => theme.zIndex.modal + 1
244
- }, open: this.open, ...options },
245
- React.createElement(Box, { display: "flex", flexDirection: "column", flexWrap: "nowrap", alignItems: "center", sx: {
208
+ }, open: this.open, ...options, children: _jsxs(Box, { display: "flex", flexDirection: "column", flexWrap: "nowrap", alignItems: "center", sx: {
246
209
  "& > :not(style) + :not(style)": {
247
210
  marginTop: (theme) => theme.spacing(1)
248
211
  }
249
- } },
250
- React.createElement(CircularProgress, { ...setupProps }),
251
- content && (React.createElement(Box, { maxWidth: maxWidth === false ? undefined : maxWidth }, content)))));
212
+ }, children: [_jsx(CircularProgress, { ...setupProps }), content && (_jsx(Box, { maxWidth: maxWidth === false ? undefined : maxWidth, children: content }))] }) }, this.id));
252
213
  }
253
214
  /**
254
215
  * Render method
@@ -297,21 +258,20 @@ export class NotifierMU extends NotifierReact {
297
258
  const alignText = NotificationAlign[align].toLowerCase();
298
259
  let className = `align-${alignText}`;
299
260
  if (children.length === 0) {
300
- return React.createElement("div", { key: `empty-${alignText}`, className: className });
261
+ return _jsx("div", { className: className }, `empty-${alignText}`);
301
262
  }
302
263
  if (align === NotificationAlign.Unknown) {
303
264
  // div container for style control
304
- return (React.createElement("div", { key: `div-${alignText}`, className: className }, children));
265
+ return (_jsx("div", { className: className, children: children }, `div-${alignText}`));
305
266
  }
306
267
  // Use SnackBar for layout
307
- return (React.createElement(Snackbar, { anchorOrigin: NotifierMU.getOrigin(align), className: className, key: `layout-${alignText}`, sx: align === NotificationAlign.Center
268
+ return (_jsx(Snackbar, { anchorOrigin: NotifierMU.getOrigin(align), className: className, sx: align === NotificationAlign.Center
308
269
  ? { position: "fixed", top: "50%!important" }
309
- : undefined, open: true },
310
- React.createElement(Box, { display: "flex", flexDirection: "column", flexWrap: "nowrap", key: `box-${alignText}`, sx: {
270
+ : undefined, open: true, children: _jsx(Box, { display: "flex", flexDirection: "column", flexWrap: "nowrap", sx: {
311
271
  "& > :not(style) + :not(style)": {
312
272
  marginTop: (theme) => theme.spacing(1)
313
273
  }
314
- } }, children)));
274
+ }, children: children }, `box-${alignText}`) }, `layout-${alignText}`));
315
275
  };
316
276
  }
317
277
  /**
@@ -39,4 +39,4 @@ export type NumberInputFieldProps = Omit<InputFieldProps, "type" | "inputProps">
39
39
  * @param props Props
40
40
  * @returns Component
41
41
  */
42
- export declare function NumberInputField(props: NumberInputFieldProps): React.JSX.Element;
42
+ export declare function NumberInputField(props: NumberInputFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React from "react";
2
3
  import { InputField } from "./InputField";
3
4
  import { InputAdornment } from "@mui/material";
@@ -11,16 +12,15 @@ export function NumberInputField(props) {
11
12
  const { currency, inputStyle, min = 0, step = 1, symbol = currency
12
13
  ? `${currency} ${NumberUtils.getCurrencySymbol(currency)}`
13
14
  : undefined, endSymbol, max = 9999999, InputProps, ...rest } = props;
14
- return (React.createElement(InputField, { type: "number", inputProps: {
15
+ return (_jsx(InputField, { type: "number", inputProps: {
15
16
  min,
16
17
  step,
17
18
  max,
18
19
  style: inputStyle,
19
20
  inputMode: "numeric"
20
21
  }, InputProps: {
21
- startAdornment: symbol ? (React.createElement(React.Fragment, null,
22
- React.createElement(InputAdornment, { position: "start" }, symbol))) : undefined,
23
- endAdornment: endSymbol ? (React.createElement(InputAdornment, { position: "end" }, endSymbol)) : undefined,
22
+ startAdornment: symbol ? (_jsx(React.Fragment, { children: _jsx(InputAdornment, { position: "start", children: symbol }) })) : undefined,
23
+ endAdornment: endSymbol ? (_jsx(InputAdornment, { position: "end", children: endSymbol })) : undefined,
24
24
  ...InputProps
25
25
  }, ...rest }));
26
26
  }
@@ -1,5 +1,4 @@
1
1
  import { ListType1 } from "@etsoo/shared";
2
- import React from "react";
3
2
  import { OptionGroupProps } from "./OptionGroup";
4
3
  /**
5
4
  * OptionBool props
@@ -10,4 +9,4 @@ export type OptionBoolProps = Omit<OptionGroupProps<ListType1, "id", "label">, "
10
9
  * @param props Props
11
10
  * @returns Component
12
11
  */
13
- export declare function OptionBool(props: OptionBoolProps): React.JSX.Element;
12
+ export declare function OptionBool(props: OptionBoolProps): import("react/jsx-runtime").JSX.Element;
package/lib/OptionBool.js CHANGED
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { globalApp } from "./app/ReactApp";
3
3
  import { OptionGroup } from "./OptionGroup";
4
4
  /**
@@ -10,5 +10,5 @@ export function OptionBool(props) {
10
10
  // Options
11
11
  const options = globalApp?.getBools() ?? [];
12
12
  // Layout
13
- return (React.createElement(OptionGroup, { options: options, row: true, multiple: false, ...props }));
13
+ return (_jsx(OptionGroup, { options: options, row: true, multiple: false, ...props }));
14
14
  }
@@ -77,4 +77,4 @@ export type OptionGroupProps<T extends object, D extends DataTypes.Keys<T>, L ex
77
77
  * @param props Props
78
78
  * @returns Component
79
79
  */
80
- export declare function OptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): React.JSX.Element;
80
+ export declare function OptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { DataTypes, Utils } from "@etsoo/shared";
2
3
  import { Box, Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, InputLabel, Radio, RadioGroup } from "@mui/material";
3
4
  import NotchedOutline from "@mui/material/OutlinedInput";
@@ -53,7 +54,7 @@ export function OptionGroup(props) {
53
54
  // Value
54
55
  const ov = getOptionValue(option);
55
56
  // Control
56
- const control = multiple ? (React.createElement(Checkbox, { name: name, readOnly: readOnly, size: itemSize, checked: itemChecked(option), disabled: disabledIds?.includes(ov), onChange: (event) => {
57
+ const control = multiple ? (_jsx(Checkbox, { name: name, readOnly: readOnly, size: itemSize, checked: itemChecked(option), disabled: disabledIds?.includes(ov), onChange: (event) => {
57
58
  if (firstOptionValue == null)
58
59
  return;
59
60
  const typeValue = Utils.parseString(event.target.value, firstOptionValue);
@@ -72,37 +73,33 @@ export function OptionGroup(props) {
72
73
  if (onValueChange)
73
74
  onValueChange(changedValues);
74
75
  setValues(changedValues);
75
- } })) : (React.createElement(Radio, { disabled: disabledIds?.includes(ov), size: itemSize, readOnly: readOnly }));
76
+ } })) : (_jsx(Radio, { disabled: disabledIds?.includes(ov), size: itemSize, readOnly: readOnly }));
76
77
  // Label
77
78
  const label = getOptionLabel == null ? `${option[labelField]}` : getOptionLabel(option);
78
79
  // Value, convert to string
79
80
  // Will fail when type is number
80
81
  const value = getOptionValue(option);
81
- return (React.createElement(FormControlLabel, { key: value, control: control, value: value, label: label }));
82
+ return (_jsx(FormControlLabel, { control: control, value: value, label: label }, value));
82
83
  });
83
84
  // Group
84
- const group = multiple ? (React.createElement(FormGroup, { row: row }, list)) : (React.createElement(RadioGroup, { row: row, name: name, value: values[0] ?? "", onChange: (_event, value) => {
85
+ const group = multiple ? (_jsx(FormGroup, { row: row, children: list })) : (_jsx(RadioGroup, { row: row, name: name, value: values[0] ?? "", onChange: (_event, value) => {
85
86
  if (firstOptionValue == null)
86
87
  return;
87
88
  const typeValue = Utils.parseString(value, firstOptionValue);
88
89
  if (onValueChange)
89
90
  onValueChange(typeValue);
90
91
  setValues([typeValue]);
91
- } }, list));
92
+ }, children: list }));
92
93
  // Layout
93
- return (React.createElement(React.Fragment, null,
94
- React.createElement(FormControl, { fullWidth: fullWidth, ...rest },
95
- label && (React.createElement(InputLabel, { required: required, variant: variant, shrink: true }, label)),
96
- outlined ? (React.createElement(NotchedOutline, { label: label && required ? label + " *" : label, notched: true, endAdornment: group, sx: {
97
- cursor: "default",
98
- display: "flex",
99
- gap: 1,
100
- paddingX: 2,
101
- paddingY: "7px",
102
- width: fullWidth ? "100%" : "auto",
103
- "& input": {
104
- display: "none"
105
- }
106
- } })) : (React.createElement(Box, { paddingLeft: 2, paddingY: "7px" }, group))),
107
- helperText && (React.createElement(FormHelperText, { sx: { marginLeft: 2, marginRight: 2 } }, helperText))));
94
+ return (_jsxs(React.Fragment, { children: [_jsxs(FormControl, { fullWidth: fullWidth, ...rest, children: [label && (_jsx(InputLabel, { required: required, variant: variant, shrink: true, children: label })), outlined ? (_jsx(NotchedOutline, { label: label && required ? label + " *" : label, notched: true, endAdornment: group, sx: {
95
+ cursor: "default",
96
+ display: "flex",
97
+ gap: 1,
98
+ paddingX: 2,
99
+ paddingY: "7px",
100
+ width: fullWidth ? "100%" : "auto",
101
+ "& input": {
102
+ display: "none"
103
+ }
104
+ } })) : (_jsx(Box, { paddingLeft: 2, paddingY: "7px", children: group }))] }), helperText && (_jsx(FormHelperText, { sx: { marginLeft: 2, marginRight: 2 }, children: helperText }))] }));
108
105
  }
@@ -73,4 +73,4 @@ export type OptionGroupFlagProps<T extends object, D extends DataTypes.Keys<T, n
73
73
  * @param props Props
74
74
  * @returns Component
75
75
  */
76
- export declare function OptionGroupFlag<T extends object = ListType, D extends DataTypes.Keys<T, number> = IdDefaultType<T, number>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupFlagProps<T, D, L>): React.JSX.Element;
76
+ export declare function OptionGroupFlag<T extends object = ListType, D extends DataTypes.Keys<T, number> = IdDefaultType<T, number>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupFlagProps<T, D, L>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { DataTypes, Utils } from "@etsoo/shared";
2
3
  import { Box, Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, InputLabel } from "@mui/material";
3
4
  import NotchedOutline from "@mui/material/OutlinedInput";
@@ -49,7 +50,7 @@ export function OptionGroupFlag(props) {
49
50
  if (ov == null)
50
51
  return;
51
52
  // Control
52
- const control = (React.createElement(Checkbox, { name: name, readOnly: readOnly, size: itemSize, checked: itemChecked(option), disabled: disabledIds?.includes(ov), onChange: (event) => {
53
+ const control = (_jsx(Checkbox, { name: name, readOnly: readOnly, size: itemSize, checked: itemChecked(option), disabled: disabledIds?.includes(ov), onChange: (event) => {
53
54
  if (firstOptionValue == null)
54
55
  return;
55
56
  const typeValue = Utils.parseString(event.target.value, firstOptionValue);
@@ -66,24 +67,20 @@ export function OptionGroupFlag(props) {
66
67
  } }));
67
68
  // Label
68
69
  const label = getOptionLabel == null ? `${option[labelField]}` : getOptionLabel(option);
69
- return (React.createElement(FormControlLabel, { key: ov, control: control, value: ov, label: label }));
70
+ return (_jsx(FormControlLabel, { control: control, value: ov, label: label }, ov));
70
71
  });
71
72
  // Group
72
- const group = React.createElement(FormGroup, { row: row }, list);
73
+ const group = _jsx(FormGroup, { row: row, children: list });
73
74
  // Layout
74
- return (React.createElement(React.Fragment, null,
75
- React.createElement(FormControl, { fullWidth: fullWidth, sx: sx, ...rest },
76
- label && (React.createElement(InputLabel, { required: required, variant: variant, shrink: true }, label)),
77
- outlined ? (React.createElement(NotchedOutline, { label: label && required ? label + " *" : label, notched: true, endAdornment: group, sx: {
78
- cursor: "default",
79
- display: "flex",
80
- gap: 1,
81
- paddingX: 2,
82
- paddingY: "7px",
83
- width: fullWidth ? "100%" : "auto",
84
- "& input": {
85
- display: "none"
86
- }
87
- } })) : (React.createElement(Box, { paddingLeft: 2, paddingY: "7px" }, group))),
88
- helperText && (React.createElement(FormHelperText, { sx: { marginLeft: 2, marginRight: 2 } }, helperText))));
75
+ return (_jsxs(React.Fragment, { children: [_jsxs(FormControl, { fullWidth: fullWidth, sx: sx, ...rest, children: [label && (_jsx(InputLabel, { required: required, variant: variant, shrink: true, children: label })), outlined ? (_jsx(NotchedOutline, { label: label && required ? label + " *" : label, notched: true, endAdornment: group, sx: {
76
+ cursor: "default",
77
+ display: "flex",
78
+ gap: 1,
79
+ paddingX: 2,
80
+ paddingY: "7px",
81
+ width: fullWidth ? "100%" : "auto",
82
+ "& input": {
83
+ display: "none"
84
+ }
85
+ } })) : (_jsx(Box, { paddingLeft: 2, paddingY: "7px", children: group }))] }), helperText && (_jsx(FormHelperText, { sx: { marginLeft: 2, marginRight: 2 }, children: helperText }))] }));
89
86
  }
package/lib/PList.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  /**
3
2
  * Paragraph items list props
4
3
  */
@@ -12,4 +11,4 @@ export interface PListProps {
12
11
  * Paragraph items list
13
12
  * @param items Items
14
13
  */
15
- export declare function PList(props: PListProps): React.JSX.Element;
14
+ export declare function PList(props: PListProps): import("react/jsx-runtime").JSX.Element;
package/lib/PList.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  /**
3
4
  * Paragraph items list
@@ -5,8 +6,8 @@ import React from 'react';
5
6
  */
6
7
  export function PList(props) {
7
8
  const { items } = props;
8
- return (React.createElement(React.Fragment, null, items != null &&
9
- items.map((item, index) => {
10
- return React.createElement("p", { key: index }, item);
11
- })));
9
+ return (_jsx(React.Fragment, { children: items != null &&
10
+ items.map((item, index) => {
11
+ return _jsx("p", { children: item }, index);
12
+ }) }));
12
13
  }
@@ -1,8 +1,7 @@
1
1
  import { CircularProgressProps, TypographyProps } from "@mui/material";
2
- import React from "react";
3
2
  export type PercentCircularProgressProps = CircularProgressProps & {
4
3
  value: number;
5
4
  valueUnit?: string;
6
5
  textProps?: TypographyProps<"div">;
7
6
  };
8
- export declare function PercentCircularProgress(props: PercentCircularProgressProps): React.JSX.Element;
7
+ export declare function PercentCircularProgress(props: PercentCircularProgressProps): import("react/jsx-runtime").JSX.Element;