@docsvision/management-console 6.2.0-beta.15 → 6.2.0-beta.17
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/index.css +1 -1
- package/index.d.ts +40 -3
- package/index.js +729 -441
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useState, useEffect, createElement, useRef, useMemo, useContext, memo, isValidElement, cloneElement, Children, createContext, useCallback, useDebugValue, useLayoutEffect, forwardRef as forwardRef$1, Fragment as Fragment$1, Component, useReducer } from "react";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
|
-
import { Accordion as Accordion$1, AccordionSummary, AccordionDetails, Typography as Typography$3, Button as Button$3, Box, CircularProgress as CircularProgress$3, Tooltip as Tooltip$2, Breadcrumbs, IconButton as IconButton$3, Popover as Popover$4, SvgIcon as SvgIcon$3, TableCell as TableCell$2, Grid as Grid$1, Paper as Paper$3, Chip as Chip$1, MenuItem as MenuItem$2, List as List$4, ListItemButton, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, ListItem as ListItem$1, Input as Input$3, TextField as TextField$3, InputAdornment as InputAdornment$3, Stack, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, RadioGroup, Radio, createTheme as createTheme$3, TableContainer, Table as Table$1, TableHead, TableRow as TableRow$1, TableBody as TableBody$1, FormControl as FormControl$3, capitalize as capitalize$2, ThemeProvider as ThemeProvider$1, Dialog as Dialog$2, DialogTitle, DialogContent as DialogContent$2, DialogActions as DialogActions$2 } from "@mui/material";
|
|
4
|
+
import { Accordion as Accordion$1, AccordionSummary, AccordionDetails, Typography as Typography$3, Button as Button$3, Box, CircularProgress as CircularProgress$3, Tooltip as Tooltip$2, Breadcrumbs, IconButton as IconButton$3, Popover as Popover$4, SvgIcon as SvgIcon$3, TableCell as TableCell$2, Grid as Grid$1, Paper as Paper$3, Chip as Chip$1, MenuItem as MenuItem$2, List as List$4, ListItemButton, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, ListItem as ListItem$1, Input as Input$3, TextField as TextField$3, InputAdornment as InputAdornment$3, Stack, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, RadioGroup, Radio, createTheme as createTheme$3, TableContainer, Table as Table$1, TableHead, TableRow as TableRow$1, TableBody as TableBody$1, FormControl as FormControl$3, capitalize as capitalize$2, ThemeProvider as ThemeProvider$1, Dialog as Dialog$2, DialogTitle, DialogContent as DialogContent$2, DialogActions as DialogActions$2, Menu as Menu$3 } from "@mui/material";
|
|
5
5
|
import * as ReactDOM from "react-dom";
|
|
6
6
|
import ReactDOM__default, { flushSync } from "react-dom";
|
|
7
7
|
import { unstable_createGetCssVar, createSpacing as createSpacing$2, useTheme as useTheme$4, GlobalStyles as GlobalStyles$1, unstable_memoTheme, keyframes, css as css$2, styled as styled$1, alpha as alpha$2, lighten as lighten$2, darken as darken$2, decomposeColor as decomposeColor$2, recomposeColor as recomposeColor$2, getThemeProps as getThemeProps$2 } from "@mui/system";
|
|
@@ -58970,9 +58970,9 @@ function getTextContent$1(content, className) {
|
|
|
58970
58970
|
}
|
|
58971
58971
|
return /* @__PURE__ */ jsx("ul", { className: classNames("text-message__list", className), children: content.map((m2) => /* @__PURE__ */ jsx("li", { children: m2 }, m2)) });
|
|
58972
58972
|
}
|
|
58973
|
-
function InfoBanner({ text }) {
|
|
58973
|
+
function InfoBanner({ text, typographyProps }) {
|
|
58974
58974
|
if (text) {
|
|
58975
|
-
return /* @__PURE__ */ jsx("div", { className: "info-banner", "data-testid": "info-banner", children: /* @__PURE__ */ jsx(Typography$3, {
|
|
58975
|
+
return /* @__PURE__ */ jsx("div", { className: "info-banner", "data-testid": "info-banner", children: /* @__PURE__ */ jsx(Typography$3, { color: "inherit", ...typographyProps, children: text }) });
|
|
58976
58976
|
}
|
|
58977
58977
|
}
|
|
58978
58978
|
const KeyboardArrowRightIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
@@ -59032,6 +59032,9 @@ function CellWithTwoLineClamping(props) {
|
|
|
59032
59032
|
};
|
|
59033
59033
|
return /* @__PURE__ */ jsx(Cell, { className, style: { maxWidth: maxWidth2 }, align: props.align || "left", onClick, children: /* @__PURE__ */ jsx(LightTooltip, { title: content, placement: "top-start", disableHoverListener: !showTooltip, children: /* @__PURE__ */ jsx("div", { ref: contentRef, className: "mui-table__cell-clamp-two-line", children: content }) }) });
|
|
59034
59034
|
}
|
|
59035
|
+
const ArrowDownwardIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59036
|
+
d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"
|
|
59037
|
+
}));
|
|
59035
59038
|
const ArrowDropDownOutlined = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59036
59039
|
d: "m7 10 5 5 5-5z"
|
|
59037
59040
|
}));
|
|
@@ -59053,6 +59056,9 @@ const DeleteIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
|
59053
59056
|
const GroupIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59054
59057
|
d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"
|
|
59055
59058
|
}));
|
|
59059
|
+
const MoreVertIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59060
|
+
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
59061
|
+
}));
|
|
59056
59062
|
const Replay = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59057
59063
|
d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"
|
|
59058
59064
|
}));
|
|
@@ -83664,7 +83670,8 @@ const theme = createTheme$3({
|
|
|
83664
83670
|
main: "#c10015"
|
|
83665
83671
|
},
|
|
83666
83672
|
warning: {
|
|
83667
|
-
main: "#
|
|
83673
|
+
main: "#ff9800",
|
|
83674
|
+
light: "#ffe0b2"
|
|
83668
83675
|
},
|
|
83669
83676
|
info: {
|
|
83670
83677
|
main: "#1976d2"
|
|
@@ -85802,6 +85809,52 @@ function DatabaseGenerationSettings(props) {
|
|
|
85802
85809
|
});
|
|
85803
85810
|
return /* @__PURE__ */ jsx(EditorCollectionEditor, { isChanged: isDirty, resetValue: () => resetField(fieldName, { defaultValue }), ...props, children: editors });
|
|
85804
85811
|
}
|
|
85812
|
+
function ServerAppList(props) {
|
|
85813
|
+
const { required, id: fieldName, value, label } = props;
|
|
85814
|
+
const services = useContext(ServicesContext);
|
|
85815
|
+
const resources = services.resources;
|
|
85816
|
+
const { resetField, control } = useCustomFormContext();
|
|
85817
|
+
const options = value?.services ?? [];
|
|
85818
|
+
const defaultValue = {
|
|
85819
|
+
currentServiceId: value?.currentServiceId ?? "",
|
|
85820
|
+
services: options
|
|
85821
|
+
};
|
|
85822
|
+
const {
|
|
85823
|
+
field,
|
|
85824
|
+
fieldState: { isDirty, error }
|
|
85825
|
+
} = useController({
|
|
85826
|
+
name: fieldName,
|
|
85827
|
+
control,
|
|
85828
|
+
rules: {
|
|
85829
|
+
validate: (value2) => {
|
|
85830
|
+
if (required && !value2?.currentServiceId) {
|
|
85831
|
+
return resources.Dialog_ValidationRequired;
|
|
85832
|
+
}
|
|
85833
|
+
return true;
|
|
85834
|
+
}
|
|
85835
|
+
},
|
|
85836
|
+
defaultValue
|
|
85837
|
+
});
|
|
85838
|
+
const handleChange = (value2) => {
|
|
85839
|
+
field.onChange({ ...field.value, currentServiceId: value2 });
|
|
85840
|
+
};
|
|
85841
|
+
return /* @__PURE__ */ jsxs(EditorContainer, { isChanged: isDirty, resetValue: () => resetField(fieldName, { defaultValue }), ...props, children: [
|
|
85842
|
+
/* @__PURE__ */ jsx(
|
|
85843
|
+
DropdownWithEllipsis,
|
|
85844
|
+
{
|
|
85845
|
+
options,
|
|
85846
|
+
value: field.value?.currentServiceId,
|
|
85847
|
+
label,
|
|
85848
|
+
field,
|
|
85849
|
+
dataTestId: "server-app-list",
|
|
85850
|
+
handleChange,
|
|
85851
|
+
className: "server-app-list",
|
|
85852
|
+
noOptionsText: resources.NoApplicationServers
|
|
85853
|
+
}
|
|
85854
|
+
),
|
|
85855
|
+
error && /* @__PURE__ */ jsx(ErrorMessage, { message: error.message })
|
|
85856
|
+
] });
|
|
85857
|
+
}
|
|
85805
85858
|
function registerEditors() {
|
|
85806
85859
|
editorFactory.register("TenantsEditor", TenantsEditor);
|
|
85807
85860
|
editorFactory.register("MailConnectionsEditor", MailConnectionsEditor);
|
|
@@ -85823,6 +85876,7 @@ function registerEditors() {
|
|
|
85823
85876
|
editorFactory.register("AdvancedSettings", AdvancedSettings);
|
|
85824
85877
|
editorFactory.register("LogBackupStrategy", LogBackupStrategy);
|
|
85825
85878
|
editorFactory.register("DatabaseGenerationSettings", DatabaseGenerationSettings);
|
|
85879
|
+
editorFactory.register("ServerAppList", ServerAppList);
|
|
85826
85880
|
}
|
|
85827
85881
|
serviceName(function(s2) {
|
|
85828
85882
|
return s2.router;
|
|
@@ -88952,21 +89006,656 @@ class ServersPageLogic extends ComponentLogic {
|
|
|
88952
89006
|
function ServerIcon() {
|
|
88953
89007
|
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24px", height: "24px", fill: ICON_COLOR, children: /* @__PURE__ */ jsx("path", { d: "M2 4.6V9.4C2 10.3 2.5 11 3.2 11H20.9C21.5 11 22.1 10.3 22.1 9.4V4.6C22 3.7 21.5 3 20.8 3H3.2C2.5 3 2 3.7 2 4.6M10 8V6H9V8H10M5 8H7V6H5V8M20 9H4V5H20V9M2 14.6V19.4C2 20.3 2.5 21 3.2 21H20.9C21.5 21 22.1 20.3 22.1 19.4V14.6C22.1 13.7 21.6 13 20.9 13H3.2C2.5 13 2 13.7 2 14.6M10 18V16H9V18H10M5 18H7V16H5V18M20 19H4V15H20V19Z" }) });
|
|
88954
89008
|
}
|
|
88955
|
-
function
|
|
88956
|
-
|
|
88957
|
-
|
|
89009
|
+
function getCircularProgressUtilityClass(slot) {
|
|
89010
|
+
return generateUtilityClass("MuiCircularProgress", slot);
|
|
89011
|
+
}
|
|
89012
|
+
generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
89013
|
+
const SIZE = 44;
|
|
89014
|
+
const circularRotateKeyframe = keyframes`
|
|
89015
|
+
0% {
|
|
89016
|
+
transform: rotate(0deg);
|
|
89017
|
+
}
|
|
89018
|
+
|
|
89019
|
+
100% {
|
|
89020
|
+
transform: rotate(360deg);
|
|
89021
|
+
}
|
|
89022
|
+
`;
|
|
89023
|
+
const circularDashKeyframe = keyframes`
|
|
89024
|
+
0% {
|
|
89025
|
+
stroke-dasharray: 1px, 200px;
|
|
89026
|
+
stroke-dashoffset: 0;
|
|
89027
|
+
}
|
|
89028
|
+
|
|
89029
|
+
50% {
|
|
89030
|
+
stroke-dasharray: 100px, 200px;
|
|
89031
|
+
stroke-dashoffset: -15px;
|
|
89032
|
+
}
|
|
89033
|
+
|
|
89034
|
+
100% {
|
|
89035
|
+
stroke-dasharray: 1px, 200px;
|
|
89036
|
+
stroke-dashoffset: -126px;
|
|
89037
|
+
}
|
|
89038
|
+
`;
|
|
89039
|
+
const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css$2`
|
|
89040
|
+
animation: ${circularRotateKeyframe} 1.4s linear infinite;
|
|
89041
|
+
` : null;
|
|
89042
|
+
const dashAnimation = typeof circularDashKeyframe !== "string" ? css$2`
|
|
89043
|
+
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
89044
|
+
` : null;
|
|
89045
|
+
const useUtilityClasses$1a = (ownerState) => {
|
|
89046
|
+
const {
|
|
89047
|
+
classes: classes2,
|
|
89048
|
+
variant,
|
|
89049
|
+
color: color2,
|
|
89050
|
+
disableShrink
|
|
89051
|
+
} = ownerState;
|
|
89052
|
+
const slots = {
|
|
89053
|
+
root: ["root", variant, `color${capitalize(color2)}`],
|
|
89054
|
+
svg: ["svg"],
|
|
89055
|
+
circle: ["circle", `circle${capitalize(variant)}`, disableShrink && "circleDisableShrink"]
|
|
89056
|
+
};
|
|
89057
|
+
return composeClasses(slots, getCircularProgressUtilityClass, classes2);
|
|
89058
|
+
};
|
|
89059
|
+
const CircularProgressRoot = styled("span", {
|
|
89060
|
+
name: "MuiCircularProgress",
|
|
89061
|
+
slot: "Root",
|
|
89062
|
+
overridesResolver: (props, styles3) => {
|
|
89063
|
+
const {
|
|
89064
|
+
ownerState
|
|
89065
|
+
} = props;
|
|
89066
|
+
return [styles3.root, styles3[ownerState.variant], styles3[`color${capitalize(ownerState.color)}`]];
|
|
89067
|
+
}
|
|
89068
|
+
})(memoTheme(({
|
|
89069
|
+
theme: theme2
|
|
89070
|
+
}) => ({
|
|
89071
|
+
display: "inline-block",
|
|
89072
|
+
variants: [{
|
|
89073
|
+
props: {
|
|
89074
|
+
variant: "determinate"
|
|
89075
|
+
},
|
|
89076
|
+
style: {
|
|
89077
|
+
transition: theme2.transitions.create("transform")
|
|
89078
|
+
}
|
|
89079
|
+
}, {
|
|
89080
|
+
props: {
|
|
89081
|
+
variant: "indeterminate"
|
|
89082
|
+
},
|
|
89083
|
+
style: rotateAnimation || {
|
|
89084
|
+
animation: `${circularRotateKeyframe} 1.4s linear infinite`
|
|
89085
|
+
}
|
|
89086
|
+
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
89087
|
+
props: {
|
|
89088
|
+
color: color2
|
|
89089
|
+
},
|
|
89090
|
+
style: {
|
|
89091
|
+
color: (theme2.vars || theme2).palette[color2].main
|
|
89092
|
+
}
|
|
89093
|
+
}))]
|
|
89094
|
+
})));
|
|
89095
|
+
const CircularProgressSVG = styled("svg", {
|
|
89096
|
+
name: "MuiCircularProgress",
|
|
89097
|
+
slot: "Svg"
|
|
89098
|
+
})({
|
|
89099
|
+
display: "block"
|
|
89100
|
+
// Keeps the progress centered
|
|
89101
|
+
});
|
|
89102
|
+
const CircularProgressCircle = styled("circle", {
|
|
89103
|
+
name: "MuiCircularProgress",
|
|
89104
|
+
slot: "Circle",
|
|
89105
|
+
overridesResolver: (props, styles3) => {
|
|
89106
|
+
const {
|
|
89107
|
+
ownerState
|
|
89108
|
+
} = props;
|
|
89109
|
+
return [styles3.circle, styles3[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles3.circleDisableShrink];
|
|
89110
|
+
}
|
|
89111
|
+
})(memoTheme(({
|
|
89112
|
+
theme: theme2
|
|
89113
|
+
}) => ({
|
|
89114
|
+
stroke: "currentColor",
|
|
89115
|
+
variants: [{
|
|
89116
|
+
props: {
|
|
89117
|
+
variant: "determinate"
|
|
89118
|
+
},
|
|
89119
|
+
style: {
|
|
89120
|
+
transition: theme2.transitions.create("stroke-dashoffset")
|
|
89121
|
+
}
|
|
89122
|
+
}, {
|
|
89123
|
+
props: {
|
|
89124
|
+
variant: "indeterminate"
|
|
89125
|
+
},
|
|
89126
|
+
style: {
|
|
89127
|
+
// Some default value that looks fine waiting for the animation to kicks in.
|
|
89128
|
+
strokeDasharray: "80px, 200px",
|
|
89129
|
+
strokeDashoffset: 0
|
|
89130
|
+
// Add the unit to fix a Edge 16 and below bug.
|
|
89131
|
+
}
|
|
89132
|
+
}, {
|
|
89133
|
+
props: ({
|
|
89134
|
+
ownerState
|
|
89135
|
+
}) => ownerState.variant === "indeterminate" && !ownerState.disableShrink,
|
|
89136
|
+
style: dashAnimation || {
|
|
89137
|
+
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
89138
|
+
animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`
|
|
89139
|
+
}
|
|
89140
|
+
}]
|
|
89141
|
+
})));
|
|
89142
|
+
const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgress22(inProps, ref2) {
|
|
89143
|
+
const props = useDefaultProps({
|
|
89144
|
+
props: inProps,
|
|
89145
|
+
name: "MuiCircularProgress"
|
|
89146
|
+
});
|
|
89147
|
+
const {
|
|
89148
|
+
className,
|
|
89149
|
+
color: color2 = "primary",
|
|
89150
|
+
disableShrink = false,
|
|
89151
|
+
size = 40,
|
|
89152
|
+
style: style2,
|
|
89153
|
+
thickness = 3.6,
|
|
89154
|
+
value = 0,
|
|
89155
|
+
variant = "indeterminate",
|
|
89156
|
+
...other
|
|
89157
|
+
} = props;
|
|
89158
|
+
const ownerState = {
|
|
89159
|
+
...props,
|
|
89160
|
+
color: color2,
|
|
89161
|
+
disableShrink,
|
|
89162
|
+
size,
|
|
89163
|
+
thickness,
|
|
89164
|
+
value,
|
|
89165
|
+
variant
|
|
89166
|
+
};
|
|
89167
|
+
const classes2 = useUtilityClasses$1a(ownerState);
|
|
89168
|
+
const circleStyle = {};
|
|
89169
|
+
const rootStyle = {};
|
|
89170
|
+
const rootProps = {};
|
|
89171
|
+
if (variant === "determinate") {
|
|
89172
|
+
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
89173
|
+
circleStyle.strokeDasharray = circumference.toFixed(3);
|
|
89174
|
+
rootProps["aria-valuenow"] = Math.round(value);
|
|
89175
|
+
circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
|
|
89176
|
+
rootStyle.transform = "rotate(-90deg)";
|
|
89177
|
+
}
|
|
89178
|
+
return /* @__PURE__ */ jsx(CircularProgressRoot, {
|
|
89179
|
+
className: clsx$2(classes2.root, className),
|
|
89180
|
+
style: {
|
|
89181
|
+
width: size,
|
|
89182
|
+
height: size,
|
|
89183
|
+
...rootStyle,
|
|
89184
|
+
...style2
|
|
89185
|
+
},
|
|
89186
|
+
ownerState,
|
|
89187
|
+
ref: ref2,
|
|
89188
|
+
role: "progressbar",
|
|
89189
|
+
...rootProps,
|
|
89190
|
+
...other,
|
|
89191
|
+
children: /* @__PURE__ */ jsx(CircularProgressSVG, {
|
|
89192
|
+
className: classes2.svg,
|
|
89193
|
+
ownerState,
|
|
89194
|
+
viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
|
|
89195
|
+
children: /* @__PURE__ */ jsx(CircularProgressCircle, {
|
|
89196
|
+
className: classes2.circle,
|
|
89197
|
+
style: circleStyle,
|
|
89198
|
+
ownerState,
|
|
89199
|
+
cx: SIZE,
|
|
89200
|
+
cy: SIZE,
|
|
89201
|
+
r: (SIZE - thickness) / 2,
|
|
89202
|
+
fill: "none",
|
|
89203
|
+
strokeWidth: thickness
|
|
89204
|
+
})
|
|
89205
|
+
})
|
|
89206
|
+
});
|
|
89207
|
+
});
|
|
89208
|
+
function getIconButtonUtilityClass(slot) {
|
|
89209
|
+
return generateUtilityClass("MuiIconButton", slot);
|
|
89210
|
+
}
|
|
89211
|
+
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
89212
|
+
const useUtilityClasses$19 = (ownerState) => {
|
|
89213
|
+
const {
|
|
89214
|
+
classes: classes2,
|
|
89215
|
+
disabled,
|
|
89216
|
+
color: color2,
|
|
89217
|
+
edge,
|
|
89218
|
+
size,
|
|
89219
|
+
loading
|
|
89220
|
+
} = ownerState;
|
|
89221
|
+
const slots = {
|
|
89222
|
+
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize(color2)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],
|
|
89223
|
+
loadingIndicator: ["loadingIndicator"],
|
|
89224
|
+
loadingWrapper: ["loadingWrapper"]
|
|
89225
|
+
};
|
|
89226
|
+
return composeClasses(slots, getIconButtonUtilityClass, classes2);
|
|
89227
|
+
};
|
|
89228
|
+
const IconButtonRoot = styled(ButtonBase, {
|
|
89229
|
+
name: "MuiIconButton",
|
|
89230
|
+
slot: "Root",
|
|
89231
|
+
overridesResolver: (props, styles3) => {
|
|
89232
|
+
const {
|
|
89233
|
+
ownerState
|
|
89234
|
+
} = props;
|
|
89235
|
+
return [styles3.root, ownerState.loading && styles3.loading, ownerState.color !== "default" && styles3[`color${capitalize(ownerState.color)}`], ownerState.edge && styles3[`edge${capitalize(ownerState.edge)}`], styles3[`size${capitalize(ownerState.size)}`]];
|
|
89236
|
+
}
|
|
89237
|
+
})(memoTheme(({
|
|
89238
|
+
theme: theme2
|
|
89239
|
+
}) => ({
|
|
89240
|
+
textAlign: "center",
|
|
89241
|
+
flex: "0 0 auto",
|
|
89242
|
+
fontSize: theme2.typography.pxToRem(24),
|
|
89243
|
+
padding: 8,
|
|
89244
|
+
borderRadius: "50%",
|
|
89245
|
+
color: (theme2.vars || theme2).palette.action.active,
|
|
89246
|
+
transition: theme2.transitions.create("background-color", {
|
|
89247
|
+
duration: theme2.transitions.duration.shortest
|
|
89248
|
+
}),
|
|
89249
|
+
variants: [{
|
|
89250
|
+
props: (props) => !props.disableRipple,
|
|
89251
|
+
style: {
|
|
89252
|
+
"--IconButton-hoverBg": theme2.vars ? `rgba(${theme2.vars.palette.action.activeChannel} / ${theme2.vars.palette.action.hoverOpacity})` : alpha(theme2.palette.action.active, theme2.palette.action.hoverOpacity),
|
|
89253
|
+
"&:hover": {
|
|
89254
|
+
backgroundColor: "var(--IconButton-hoverBg)",
|
|
89255
|
+
// Reset on touch devices, it doesn't add specificity
|
|
89256
|
+
"@media (hover: none)": {
|
|
89257
|
+
backgroundColor: "transparent"
|
|
89258
|
+
}
|
|
89259
|
+
}
|
|
89260
|
+
}
|
|
89261
|
+
}, {
|
|
89262
|
+
props: {
|
|
89263
|
+
edge: "start"
|
|
89264
|
+
},
|
|
89265
|
+
style: {
|
|
89266
|
+
marginLeft: -12
|
|
89267
|
+
}
|
|
89268
|
+
}, {
|
|
89269
|
+
props: {
|
|
89270
|
+
edge: "start",
|
|
89271
|
+
size: "small"
|
|
89272
|
+
},
|
|
89273
|
+
style: {
|
|
89274
|
+
marginLeft: -3
|
|
89275
|
+
}
|
|
89276
|
+
}, {
|
|
89277
|
+
props: {
|
|
89278
|
+
edge: "end"
|
|
89279
|
+
},
|
|
89280
|
+
style: {
|
|
89281
|
+
marginRight: -12
|
|
89282
|
+
}
|
|
89283
|
+
}, {
|
|
89284
|
+
props: {
|
|
89285
|
+
edge: "end",
|
|
89286
|
+
size: "small"
|
|
89287
|
+
},
|
|
89288
|
+
style: {
|
|
89289
|
+
marginRight: -3
|
|
89290
|
+
}
|
|
89291
|
+
}]
|
|
89292
|
+
})), memoTheme(({
|
|
89293
|
+
theme: theme2
|
|
89294
|
+
}) => ({
|
|
89295
|
+
variants: [{
|
|
89296
|
+
props: {
|
|
89297
|
+
color: "inherit"
|
|
89298
|
+
},
|
|
89299
|
+
style: {
|
|
89300
|
+
color: "inherit"
|
|
89301
|
+
}
|
|
89302
|
+
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
89303
|
+
props: {
|
|
89304
|
+
color: color2
|
|
89305
|
+
},
|
|
89306
|
+
style: {
|
|
89307
|
+
color: (theme2.vars || theme2).palette[color2].main
|
|
89308
|
+
}
|
|
89309
|
+
})), ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
89310
|
+
props: {
|
|
89311
|
+
color: color2
|
|
89312
|
+
},
|
|
89313
|
+
style: {
|
|
89314
|
+
"--IconButton-hoverBg": theme2.vars ? `rgba(${(theme2.vars || theme2).palette[color2].mainChannel} / ${theme2.vars.palette.action.hoverOpacity})` : alpha((theme2.vars || theme2).palette[color2].main, theme2.palette.action.hoverOpacity)
|
|
89315
|
+
}
|
|
89316
|
+
})), {
|
|
89317
|
+
props: {
|
|
89318
|
+
size: "small"
|
|
89319
|
+
},
|
|
89320
|
+
style: {
|
|
89321
|
+
padding: 5,
|
|
89322
|
+
fontSize: theme2.typography.pxToRem(18)
|
|
89323
|
+
}
|
|
89324
|
+
}, {
|
|
89325
|
+
props: {
|
|
89326
|
+
size: "large"
|
|
89327
|
+
},
|
|
89328
|
+
style: {
|
|
89329
|
+
padding: 12,
|
|
89330
|
+
fontSize: theme2.typography.pxToRem(28)
|
|
89331
|
+
}
|
|
89332
|
+
}],
|
|
89333
|
+
[`&.${iconButtonClasses.disabled}`]: {
|
|
89334
|
+
backgroundColor: "transparent",
|
|
89335
|
+
color: (theme2.vars || theme2).palette.action.disabled
|
|
89336
|
+
},
|
|
89337
|
+
[`&.${iconButtonClasses.loading}`]: {
|
|
89338
|
+
color: "transparent"
|
|
89339
|
+
}
|
|
89340
|
+
})));
|
|
89341
|
+
const IconButtonLoadingIndicator = styled("span", {
|
|
89342
|
+
name: "MuiIconButton",
|
|
89343
|
+
slot: "LoadingIndicator"
|
|
89344
|
+
})(({
|
|
89345
|
+
theme: theme2
|
|
89346
|
+
}) => ({
|
|
89347
|
+
display: "none",
|
|
89348
|
+
position: "absolute",
|
|
89349
|
+
visibility: "visible",
|
|
89350
|
+
top: "50%",
|
|
89351
|
+
left: "50%",
|
|
89352
|
+
transform: "translate(-50%, -50%)",
|
|
89353
|
+
color: (theme2.vars || theme2).palette.action.disabled,
|
|
89354
|
+
variants: [{
|
|
89355
|
+
props: {
|
|
89356
|
+
loading: true
|
|
89357
|
+
},
|
|
89358
|
+
style: {
|
|
89359
|
+
display: "flex"
|
|
89360
|
+
}
|
|
89361
|
+
}]
|
|
89362
|
+
}));
|
|
89363
|
+
const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton22(inProps, ref2) {
|
|
89364
|
+
const props = useDefaultProps({
|
|
89365
|
+
props: inProps,
|
|
89366
|
+
name: "MuiIconButton"
|
|
89367
|
+
});
|
|
89368
|
+
const {
|
|
89369
|
+
edge = false,
|
|
89370
|
+
children,
|
|
89371
|
+
className,
|
|
89372
|
+
color: color2 = "default",
|
|
89373
|
+
disabled = false,
|
|
89374
|
+
disableFocusRipple = false,
|
|
89375
|
+
size = "medium",
|
|
89376
|
+
id: idProp,
|
|
89377
|
+
loading = null,
|
|
89378
|
+
loadingIndicator: loadingIndicatorProp,
|
|
89379
|
+
...other
|
|
89380
|
+
} = props;
|
|
89381
|
+
const loadingId = useId(idProp);
|
|
89382
|
+
const loadingIndicator = loadingIndicatorProp ?? /* @__PURE__ */ jsx(CircularProgress, {
|
|
89383
|
+
"aria-labelledby": loadingId,
|
|
89384
|
+
color: "inherit",
|
|
89385
|
+
size: 16
|
|
89386
|
+
});
|
|
89387
|
+
const ownerState = {
|
|
89388
|
+
...props,
|
|
89389
|
+
edge,
|
|
89390
|
+
color: color2,
|
|
89391
|
+
disabled,
|
|
89392
|
+
disableFocusRipple,
|
|
89393
|
+
loading,
|
|
89394
|
+
loadingIndicator,
|
|
89395
|
+
size
|
|
89396
|
+
};
|
|
89397
|
+
const classes2 = useUtilityClasses$19(ownerState);
|
|
89398
|
+
return /* @__PURE__ */ jsxs(IconButtonRoot, {
|
|
89399
|
+
id: loading ? loadingId : idProp,
|
|
89400
|
+
className: clsx$2(classes2.root, className),
|
|
89401
|
+
centerRipple: true,
|
|
89402
|
+
focusRipple: !disableFocusRipple,
|
|
89403
|
+
disabled: disabled || loading,
|
|
89404
|
+
ref: ref2,
|
|
89405
|
+
...other,
|
|
89406
|
+
ownerState,
|
|
89407
|
+
children: [typeof loading === "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
89408
|
+
/* @__PURE__ */ jsx("span", {
|
|
89409
|
+
className: classes2.loadingWrapper,
|
|
89410
|
+
style: {
|
|
89411
|
+
display: "contents"
|
|
89412
|
+
},
|
|
89413
|
+
children: /* @__PURE__ */ jsx(IconButtonLoadingIndicator, {
|
|
89414
|
+
className: classes2.loadingIndicator,
|
|
89415
|
+
ownerState,
|
|
89416
|
+
children: loading && loadingIndicator
|
|
89417
|
+
})
|
|
89418
|
+
}), children]
|
|
89419
|
+
});
|
|
89420
|
+
});
|
|
89421
|
+
class ImportSettingsLogic extends ComponentLogic {
|
|
89422
|
+
constructor() {
|
|
89423
|
+
super(...arguments);
|
|
89424
|
+
this.domain = y("ImportSettings");
|
|
89425
|
+
this.$peers = this.domain.store(null, { name: "peers" });
|
|
89426
|
+
this.initializePeers = this.domain.event("initializePeers");
|
|
89427
|
+
this.getPeersFx = this.domain.effect("loadPeers");
|
|
89428
|
+
this.copyFx = this.domain.effect("copySettings");
|
|
89429
|
+
}
|
|
89430
|
+
init() {
|
|
89431
|
+
const { serverController, settingsController } = this.options.services;
|
|
89432
|
+
v({
|
|
89433
|
+
clock: this.initializePeers,
|
|
89434
|
+
target: this.getPeersFx
|
|
89435
|
+
});
|
|
89436
|
+
v({
|
|
89437
|
+
clock: this.getPeersFx.doneData,
|
|
89438
|
+
target: this.$peers
|
|
89439
|
+
});
|
|
89440
|
+
this.getPeersFx.use(async () => {
|
|
89441
|
+
return serverController.getPeers(this.options.serviceId);
|
|
89442
|
+
});
|
|
89443
|
+
this.copyFx.use(async (request) => {
|
|
89444
|
+
await settingsController.copy(request);
|
|
89445
|
+
});
|
|
89446
|
+
this.initializePeers();
|
|
89447
|
+
}
|
|
89448
|
+
}
|
|
89449
|
+
function WarningBanner(props) {
|
|
89450
|
+
return /* @__PURE__ */ jsxs("div", { className: "warning-banner", children: [
|
|
89451
|
+
/* @__PURE__ */ jsx(WarningIcon, { className: "warning-banner__warning-icon", fontSize: "large" }),
|
|
89452
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "caption", children: props.services.resources.Attention + " " + props.text })
|
|
89453
|
+
] });
|
|
89454
|
+
}
|
|
89455
|
+
const DATE_TIME_FORMAT_RUS = "DD.MM.YYYY HH:mm:ss";
|
|
89456
|
+
const DATE_TIME_FORMAT_ENG = "MM/D/YYYY, h:mm:ss A";
|
|
89457
|
+
function ImportSettingsDialog(props) {
|
|
89458
|
+
const logic = useLogic(props, ImportSettingsLogic);
|
|
89459
|
+
const { open, onClose, services, serviceId, serverName } = props;
|
|
89460
|
+
const resources = services.resources;
|
|
89461
|
+
const [selectedPeer, setSelectedPeer] = useState(null);
|
|
89462
|
+
const isLoading = e(logic.copyFx.pending);
|
|
89463
|
+
const handlePeerChange = (event, peerId) => {
|
|
89464
|
+
event.stopPropagation();
|
|
89465
|
+
const peer = peers.find((p2) => p2.id === peerId);
|
|
89466
|
+
setSelectedPeer(peer);
|
|
89467
|
+
};
|
|
89468
|
+
const peers = e(logic.$peers);
|
|
89469
|
+
const onSubmitClick = async () => {
|
|
89470
|
+
if (selectedPeer.lastUpdated) {
|
|
89471
|
+
const dateFormat = services.applicationSettings.culture.name === "ru-RU" ? DATE_TIME_FORMAT_RUS : DATE_TIME_FORMAT_ENG;
|
|
89472
|
+
const dateStr = hooks(selectedPeer.lastUpdated).format(dateFormat);
|
|
89473
|
+
await services.messageWindow.showConfirmation(
|
|
89474
|
+
formatString$1(resources.ImportSettingsConfirmationWithDateMessage, dateStr),
|
|
89475
|
+
{
|
|
89476
|
+
modalIcon: /* @__PURE__ */ jsx(WarningIcon, { className: "import-settings-dialog__warning-icon", fontSize: "small" }),
|
|
89477
|
+
customCaptionText: services.resources.Attention,
|
|
89478
|
+
color: theme.palette.warning.main
|
|
89479
|
+
}
|
|
89480
|
+
);
|
|
89481
|
+
} else {
|
|
89482
|
+
await services.messageWindow.showConfirmation(
|
|
89483
|
+
resources.ImportSettingsConfirmationMessage,
|
|
89484
|
+
{
|
|
89485
|
+
modalIcon: /* @__PURE__ */ jsx(WarningIcon, { className: "import-settings-dialog__warning-icon", fontSize: "small" }),
|
|
89486
|
+
customCaptionText: services.resources.Attention,
|
|
89487
|
+
color: theme.palette.warning.main
|
|
89488
|
+
}
|
|
89489
|
+
);
|
|
89490
|
+
}
|
|
89491
|
+
await logic.copyFx({ targetServiceId: serviceId, sourceServiceId: selectedPeer.id });
|
|
89492
|
+
showNote({ timeout: 3e3, text: formatString$1(resources.ImportSettingsCompletedMessage, selectedPeer.serverName, serverName) });
|
|
89493
|
+
onClose();
|
|
89494
|
+
};
|
|
89495
|
+
return /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children: /* @__PURE__ */ jsxs(
|
|
89496
|
+
Dialog$2,
|
|
89497
|
+
{
|
|
89498
|
+
onClick: (e2) => {
|
|
89499
|
+
e2.stopPropagation();
|
|
89500
|
+
},
|
|
89501
|
+
maxWidth: "md",
|
|
89502
|
+
open,
|
|
89503
|
+
onClose,
|
|
89504
|
+
className: "import-settings-dialog",
|
|
89505
|
+
fullWidth: true,
|
|
89506
|
+
sx: { zIndex: 900, fontSize: "0.85rem" },
|
|
89507
|
+
slotProps: {
|
|
89508
|
+
paper: { style: { maxHeight: "60vh" } }
|
|
89509
|
+
},
|
|
89510
|
+
children: [
|
|
89511
|
+
/* @__PURE__ */ jsxs(DialogTitle, { variant: "h6", className: "import-settings-dialog__title", children: [
|
|
89512
|
+
resources.ImportSettings,
|
|
89513
|
+
/* @__PURE__ */ jsx(IconButton$3, { "aria-label": "close", onClick: onClose, children: /* @__PURE__ */ jsx(Close, {}) })
|
|
89514
|
+
] }),
|
|
89515
|
+
/* @__PURE__ */ jsxs(DialogContent$2, { className: "import-settings-dialog__content", children: [
|
|
89516
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "subtitle2", color: "inherit", children: resources.SelectImportSettingsFrom }),
|
|
89517
|
+
!!peers?.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89518
|
+
/* @__PURE__ */ jsx(Box, { className: "import-settings-dialog__content-box", children: /* @__PURE__ */ jsx(RadioGroup, { className: "import-settings-dialog__peers-group", value: selectedPeer?.id, onChange: handlePeerChange, children: peers?.map((peer) => /* @__PURE__ */ jsx(
|
|
89519
|
+
FormControlLabel$1,
|
|
89520
|
+
{
|
|
89521
|
+
value: peer.id,
|
|
89522
|
+
control: /* @__PURE__ */ jsx(Radio, {}),
|
|
89523
|
+
label: /* @__PURE__ */ jsxs("div", { className: "import-settings-dialog__peer-label", children: [
|
|
89524
|
+
/* @__PURE__ */ jsx(ComputerRounded, { fontSize: "small", color: "secondary" }),
|
|
89525
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "body2", color: "inherit", children: `${peer.serverName} (${peer.id})` })
|
|
89526
|
+
] })
|
|
89527
|
+
},
|
|
89528
|
+
peer.id
|
|
89529
|
+
)) }) }),
|
|
89530
|
+
/* @__PURE__ */ jsx(WarningBanner, { text: resources.ImportSettingsWarning, services: props.services })
|
|
89531
|
+
] }) : /* @__PURE__ */ jsx(Typography$3, { variant: "body1", color: "error", children: resources.ImportSettingsNoServersMessage })
|
|
89532
|
+
] }),
|
|
89533
|
+
/* @__PURE__ */ jsxs(DialogActions$2, { className: "import-settings-dialog__actions", children: [
|
|
89534
|
+
/* @__PURE__ */ jsx(
|
|
89535
|
+
Button$3,
|
|
89536
|
+
{
|
|
89537
|
+
type: "button",
|
|
89538
|
+
disabled: isLoading,
|
|
89539
|
+
onClick: onClose,
|
|
89540
|
+
color: "primary",
|
|
89541
|
+
"data-testid": "cancel-button",
|
|
89542
|
+
children: resources.Dialog_Cancel
|
|
89543
|
+
}
|
|
89544
|
+
),
|
|
89545
|
+
/* @__PURE__ */ jsx(
|
|
89546
|
+
Button$3,
|
|
89547
|
+
{
|
|
89548
|
+
loading: isLoading,
|
|
89549
|
+
disabled: !selectedPeer,
|
|
89550
|
+
type: "submit",
|
|
89551
|
+
onClick: onSubmitClick,
|
|
89552
|
+
variant: "contained",
|
|
89553
|
+
color: "primary",
|
|
89554
|
+
"data-testid": "accept-button",
|
|
89555
|
+
children: resources.DialogButton_Accept
|
|
89556
|
+
}
|
|
89557
|
+
)
|
|
89558
|
+
] })
|
|
89559
|
+
]
|
|
89560
|
+
}
|
|
89561
|
+
) });
|
|
89562
|
+
}
|
|
89563
|
+
function ComponentMenu(props) {
|
|
89564
|
+
const { services, serverName, component, onDeleteClick } = props;
|
|
89565
|
+
const { resources } = services;
|
|
89566
|
+
const [openedDialog, setOpenedDialog] = useState(false);
|
|
89567
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
89568
|
+
const open = Boolean(anchorEl);
|
|
89569
|
+
const handleMenuButtonClick = (event) => {
|
|
89570
|
+
event.stopPropagation();
|
|
89571
|
+
setAnchorEl(event.currentTarget);
|
|
89572
|
+
};
|
|
89573
|
+
const closeMenu = () => {
|
|
89574
|
+
setAnchorEl(null);
|
|
89575
|
+
};
|
|
89576
|
+
const handleCloseMenu = () => {
|
|
89577
|
+
setOpenedDialog(false);
|
|
89578
|
+
closeMenu();
|
|
89579
|
+
};
|
|
89580
|
+
const onDeleteMenuClick = async (event) => {
|
|
88958
89581
|
event.stopPropagation();
|
|
89582
|
+
closeMenu();
|
|
88959
89583
|
await services.messageWindow.showConfirmation(
|
|
88960
89584
|
formatString$1(services.resources.ConfirmDeleteService, component.serviceName),
|
|
88961
89585
|
{
|
|
88962
89586
|
customButtonOkText: services.resources.Delete,
|
|
88963
|
-
modalIcon: /* @__PURE__ */ jsx(WarningIcon, { className: "component-
|
|
89587
|
+
modalIcon: /* @__PURE__ */ jsx(WarningIcon, { className: "component-menu__warning-icon", fontSize: "medium" }),
|
|
88964
89588
|
customCaptionText: services.resources.Attention,
|
|
88965
|
-
color:
|
|
89589
|
+
color: theme.palette.warning.main
|
|
88966
89590
|
}
|
|
88967
89591
|
);
|
|
88968
89592
|
onDeleteClick(component);
|
|
88969
89593
|
};
|
|
89594
|
+
const onImportMenuClick = async (event) => {
|
|
89595
|
+
event.stopPropagation();
|
|
89596
|
+
closeMenu();
|
|
89597
|
+
setOpenedDialog(true);
|
|
89598
|
+
};
|
|
89599
|
+
const handleCloseImportDialog = () => {
|
|
89600
|
+
setOpenedDialog(false);
|
|
89601
|
+
};
|
|
89602
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89603
|
+
/* @__PURE__ */ jsx(
|
|
89604
|
+
IconButton,
|
|
89605
|
+
{
|
|
89606
|
+
"aria-label": "component menu",
|
|
89607
|
+
"aria-controls": open ? "component-menu" : void 0,
|
|
89608
|
+
"aria-expanded": open ? "true" : void 0,
|
|
89609
|
+
"aria-haspopup": "true",
|
|
89610
|
+
"data-testid": "component-menu-button",
|
|
89611
|
+
onClick: (event) => handleMenuButtonClick(event),
|
|
89612
|
+
children: /* @__PURE__ */ jsx(MoreVertIcon, { color: "secondary" })
|
|
89613
|
+
}
|
|
89614
|
+
),
|
|
89615
|
+
/* @__PURE__ */ jsxs(
|
|
89616
|
+
Menu$3,
|
|
89617
|
+
{
|
|
89618
|
+
anchorEl,
|
|
89619
|
+
open,
|
|
89620
|
+
id: "component-menu",
|
|
89621
|
+
onClose: handleCloseMenu,
|
|
89622
|
+
onClick: handleCloseMenu,
|
|
89623
|
+
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
89624
|
+
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
89625
|
+
children: [
|
|
89626
|
+
/* @__PURE__ */ jsxs(MenuItem$2, { onClick: (event) => onImportMenuClick(event), "data-testid": "component-import-settings-button", children: [
|
|
89627
|
+
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(ArrowDownwardIcon, { fontSize: "small" }) }),
|
|
89628
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "body1", color: "secondary", children: resources.ImportSettings })
|
|
89629
|
+
] }),
|
|
89630
|
+
/* @__PURE__ */ jsxs(MenuItem$2, { onClick: (event) => onDeleteMenuClick(event), children: [
|
|
89631
|
+
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(
|
|
89632
|
+
DeleteIcon,
|
|
89633
|
+
{
|
|
89634
|
+
color: "error",
|
|
89635
|
+
fontSize: "small",
|
|
89636
|
+
"data-testid": "delete-icon",
|
|
89637
|
+
className: "component-menu__item__delete-icon"
|
|
89638
|
+
}
|
|
89639
|
+
) }),
|
|
89640
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "body1", color: "error", children: resources.DeleteComponent })
|
|
89641
|
+
] })
|
|
89642
|
+
]
|
|
89643
|
+
}
|
|
89644
|
+
),
|
|
89645
|
+
openedDialog && /* @__PURE__ */ jsx(
|
|
89646
|
+
ImportSettingsDialog,
|
|
89647
|
+
{
|
|
89648
|
+
services,
|
|
89649
|
+
open: openedDialog,
|
|
89650
|
+
onClose: handleCloseImportDialog,
|
|
89651
|
+
serviceId: component.serviceId,
|
|
89652
|
+
serverName
|
|
89653
|
+
}
|
|
89654
|
+
)
|
|
89655
|
+
] });
|
|
89656
|
+
}
|
|
89657
|
+
function ComponentList(props) {
|
|
89658
|
+
const { components, serverName, services, onComponentClick, onDeleteClick } = props;
|
|
88970
89659
|
return /* @__PURE__ */ jsxs("div", { className: "component-list", children: [
|
|
88971
89660
|
/* @__PURE__ */ jsx("div", { className: "component-list__title", children: services.resources.Components }),
|
|
88972
89661
|
components.map((component) => {
|
|
@@ -88974,11 +89663,12 @@ function ComponentList(props) {
|
|
|
88974
89663
|
/* @__PURE__ */ jsx(ComponentIcon, { color: ICON_COLOR }),
|
|
88975
89664
|
/* @__PURE__ */ jsx(Typography$3, { className: "component-list__item__content", children: component.serviceName }),
|
|
88976
89665
|
/* @__PURE__ */ jsx(
|
|
88977
|
-
|
|
89666
|
+
ComponentMenu,
|
|
88978
89667
|
{
|
|
88979
|
-
|
|
88980
|
-
|
|
88981
|
-
|
|
89668
|
+
services,
|
|
89669
|
+
serverName,
|
|
89670
|
+
component,
|
|
89671
|
+
onDeleteClick
|
|
88982
89672
|
}
|
|
88983
89673
|
),
|
|
88984
89674
|
/* @__PURE__ */ jsx(ExpandMoreIcon, { color: ICON_COLOR })
|
|
@@ -89035,6 +89725,7 @@ function ServerDescriptionPanel(props) {
|
|
|
89035
89725
|
{
|
|
89036
89726
|
onComponentClick,
|
|
89037
89727
|
onDeleteClick,
|
|
89728
|
+
serverName: serverDescription.name,
|
|
89038
89729
|
components: serverDescription.services,
|
|
89039
89730
|
services
|
|
89040
89731
|
}
|
|
@@ -89117,6 +89808,9 @@ class ServersController {
|
|
|
89117
89808
|
getServerInfo(serverId) {
|
|
89118
89809
|
return this.requestService.get(`api/servers/${serverId}`, null, { disableDialogsOnErrors: true });
|
|
89119
89810
|
}
|
|
89811
|
+
getPeers(serviceId) {
|
|
89812
|
+
return this.requestService.get(`api/servers/${serviceId}/peers`);
|
|
89813
|
+
}
|
|
89120
89814
|
getServiceInfo(serviceId) {
|
|
89121
89815
|
return this.requestService.get(`api/servers/service/${serviceId}`, null, { disableDialogsOnErrors: true });
|
|
89122
89816
|
}
|
|
@@ -90720,7 +91414,7 @@ const inputOverridesResolver = (props, styles3) => {
|
|
|
90720
91414
|
} = props;
|
|
90721
91415
|
return [styles3.input, ownerState.size === "small" && styles3.inputSizeSmall, ownerState.multiline && styles3.inputMultiline, ownerState.type === "search" && styles3.inputTypeSearch, ownerState.startAdornment && styles3.inputAdornedStart, ownerState.endAdornment && styles3.inputAdornedEnd, ownerState.hiddenLabel && styles3.inputHiddenLabel];
|
|
90722
91416
|
};
|
|
90723
|
-
const useUtilityClasses$
|
|
91417
|
+
const useUtilityClasses$18 = (ownerState) => {
|
|
90724
91418
|
const {
|
|
90725
91419
|
classes: classes2,
|
|
90726
91420
|
color: color2,
|
|
@@ -91106,7 +91800,7 @@ const InputBase = /* @__PURE__ */ React.forwardRef(function InputBase22(inProps,
|
|
|
91106
91800
|
startAdornment,
|
|
91107
91801
|
type: type2
|
|
91108
91802
|
};
|
|
91109
|
-
const classes2 = useUtilityClasses$
|
|
91803
|
+
const classes2 = useUtilityClasses$18(ownerState);
|
|
91110
91804
|
const Root = slots.root || components.Root || InputBaseRoot;
|
|
91111
91805
|
const rootProps = slotProps.root || componentsProps.root || {};
|
|
91112
91806
|
const Input3 = slots.input || components.Input || InputBaseInput;
|
|
@@ -91171,7 +91865,7 @@ const InputBase = /* @__PURE__ */ React.forwardRef(function InputBase22(inProps,
|
|
|
91171
91865
|
});
|
|
91172
91866
|
});
|
|
91173
91867
|
const _excluded$K = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
|
|
91174
|
-
const useUtilityClasses$
|
|
91868
|
+
const useUtilityClasses$17 = (ownerState) => {
|
|
91175
91869
|
const {
|
|
91176
91870
|
classes: classes2
|
|
91177
91871
|
} = ownerState;
|
|
@@ -91208,7 +91902,7 @@ const GridEditInputCell = forwardRef((props, ref2) => {
|
|
|
91208
91902
|
const apiRef = useGridApiContext();
|
|
91209
91903
|
const inputRef = React.useRef(null);
|
|
91210
91904
|
const [valueState, setValueState] = React.useState(value);
|
|
91211
|
-
const classes2 = useUtilityClasses$
|
|
91905
|
+
const classes2 = useUtilityClasses$17(rootProps);
|
|
91212
91906
|
const handleChange = React.useCallback(async (event) => {
|
|
91213
91907
|
const newValue = event.target.value;
|
|
91214
91908
|
if (onValueChange) {
|
|
@@ -93925,7 +94619,7 @@ function resolveAnchorEl$1(anchorEl) {
|
|
|
93925
94619
|
function isHTMLElement(element) {
|
|
93926
94620
|
return element.nodeType !== void 0;
|
|
93927
94621
|
}
|
|
93928
|
-
const useUtilityClasses$
|
|
94622
|
+
const useUtilityClasses$16 = (ownerState) => {
|
|
93929
94623
|
const {
|
|
93930
94624
|
classes: classes2
|
|
93931
94625
|
} = ownerState;
|
|
@@ -94026,7 +94720,7 @@ const PopperTooltip = /* @__PURE__ */ React.forwardRef(function PopperTooltip2(p
|
|
|
94026
94720
|
if (TransitionProps !== null) {
|
|
94027
94721
|
childProps.TransitionProps = TransitionProps;
|
|
94028
94722
|
}
|
|
94029
|
-
const classes2 = useUtilityClasses$
|
|
94723
|
+
const classes2 = useUtilityClasses$16(props);
|
|
94030
94724
|
const Root = slots.root ?? "div";
|
|
94031
94725
|
const rootProps = useSlotProps({
|
|
94032
94726
|
elementType: Root,
|
|
@@ -94173,7 +94867,7 @@ function getListSubheaderUtilityClass(slot) {
|
|
|
94173
94867
|
return generateUtilityClass("MuiListSubheader", slot);
|
|
94174
94868
|
}
|
|
94175
94869
|
generateUtilityClasses("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
|
|
94176
|
-
const useUtilityClasses$
|
|
94870
|
+
const useUtilityClasses$15 = (ownerState) => {
|
|
94177
94871
|
const {
|
|
94178
94872
|
classes: classes2,
|
|
94179
94873
|
color: color2,
|
|
@@ -94268,7 +94962,7 @@ const ListSubheader = /* @__PURE__ */ React.forwardRef(function ListSubheader2(i
|
|
|
94268
94962
|
disableSticky,
|
|
94269
94963
|
inset
|
|
94270
94964
|
};
|
|
94271
|
-
const classes2 = useUtilityClasses$
|
|
94965
|
+
const classes2 = useUtilityClasses$15(ownerState);
|
|
94272
94966
|
return /* @__PURE__ */ jsx(ListSubheaderRoot, {
|
|
94273
94967
|
as: component,
|
|
94274
94968
|
className: clsx$2(classes2.root, className),
|
|
@@ -94284,7 +94978,7 @@ function getPaperUtilityClass(slot) {
|
|
|
94284
94978
|
return generateUtilityClass("MuiPaper", slot);
|
|
94285
94979
|
}
|
|
94286
94980
|
generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
|
|
94287
|
-
const useUtilityClasses$
|
|
94981
|
+
const useUtilityClasses$14 = (ownerState) => {
|
|
94288
94982
|
const {
|
|
94289
94983
|
square,
|
|
94290
94984
|
elevation,
|
|
@@ -94356,7 +95050,7 @@ const Paper = /* @__PURE__ */ React.forwardRef(function Paper22(inProps, ref2) {
|
|
|
94356
95050
|
square,
|
|
94357
95051
|
variant
|
|
94358
95052
|
};
|
|
94359
|
-
const classes2 = useUtilityClasses$
|
|
95053
|
+
const classes2 = useUtilityClasses$14(ownerState);
|
|
94360
95054
|
return /* @__PURE__ */ jsx(PaperRoot, {
|
|
94361
95055
|
as: component,
|
|
94362
95056
|
ownerState,
|
|
@@ -94377,418 +95071,6 @@ const Paper = /* @__PURE__ */ React.forwardRef(function Paper22(inProps, ref2) {
|
|
|
94377
95071
|
}
|
|
94378
95072
|
});
|
|
94379
95073
|
});
|
|
94380
|
-
function getCircularProgressUtilityClass(slot) {
|
|
94381
|
-
return generateUtilityClass("MuiCircularProgress", slot);
|
|
94382
|
-
}
|
|
94383
|
-
generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
94384
|
-
const SIZE = 44;
|
|
94385
|
-
const circularRotateKeyframe = keyframes`
|
|
94386
|
-
0% {
|
|
94387
|
-
transform: rotate(0deg);
|
|
94388
|
-
}
|
|
94389
|
-
|
|
94390
|
-
100% {
|
|
94391
|
-
transform: rotate(360deg);
|
|
94392
|
-
}
|
|
94393
|
-
`;
|
|
94394
|
-
const circularDashKeyframe = keyframes`
|
|
94395
|
-
0% {
|
|
94396
|
-
stroke-dasharray: 1px, 200px;
|
|
94397
|
-
stroke-dashoffset: 0;
|
|
94398
|
-
}
|
|
94399
|
-
|
|
94400
|
-
50% {
|
|
94401
|
-
stroke-dasharray: 100px, 200px;
|
|
94402
|
-
stroke-dashoffset: -15px;
|
|
94403
|
-
}
|
|
94404
|
-
|
|
94405
|
-
100% {
|
|
94406
|
-
stroke-dasharray: 1px, 200px;
|
|
94407
|
-
stroke-dashoffset: -126px;
|
|
94408
|
-
}
|
|
94409
|
-
`;
|
|
94410
|
-
const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css$2`
|
|
94411
|
-
animation: ${circularRotateKeyframe} 1.4s linear infinite;
|
|
94412
|
-
` : null;
|
|
94413
|
-
const dashAnimation = typeof circularDashKeyframe !== "string" ? css$2`
|
|
94414
|
-
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
94415
|
-
` : null;
|
|
94416
|
-
const useUtilityClasses$15 = (ownerState) => {
|
|
94417
|
-
const {
|
|
94418
|
-
classes: classes2,
|
|
94419
|
-
variant,
|
|
94420
|
-
color: color2,
|
|
94421
|
-
disableShrink
|
|
94422
|
-
} = ownerState;
|
|
94423
|
-
const slots = {
|
|
94424
|
-
root: ["root", variant, `color${capitalize(color2)}`],
|
|
94425
|
-
svg: ["svg"],
|
|
94426
|
-
circle: ["circle", `circle${capitalize(variant)}`, disableShrink && "circleDisableShrink"]
|
|
94427
|
-
};
|
|
94428
|
-
return composeClasses(slots, getCircularProgressUtilityClass, classes2);
|
|
94429
|
-
};
|
|
94430
|
-
const CircularProgressRoot = styled("span", {
|
|
94431
|
-
name: "MuiCircularProgress",
|
|
94432
|
-
slot: "Root",
|
|
94433
|
-
overridesResolver: (props, styles3) => {
|
|
94434
|
-
const {
|
|
94435
|
-
ownerState
|
|
94436
|
-
} = props;
|
|
94437
|
-
return [styles3.root, styles3[ownerState.variant], styles3[`color${capitalize(ownerState.color)}`]];
|
|
94438
|
-
}
|
|
94439
|
-
})(memoTheme(({
|
|
94440
|
-
theme: theme2
|
|
94441
|
-
}) => ({
|
|
94442
|
-
display: "inline-block",
|
|
94443
|
-
variants: [{
|
|
94444
|
-
props: {
|
|
94445
|
-
variant: "determinate"
|
|
94446
|
-
},
|
|
94447
|
-
style: {
|
|
94448
|
-
transition: theme2.transitions.create("transform")
|
|
94449
|
-
}
|
|
94450
|
-
}, {
|
|
94451
|
-
props: {
|
|
94452
|
-
variant: "indeterminate"
|
|
94453
|
-
},
|
|
94454
|
-
style: rotateAnimation || {
|
|
94455
|
-
animation: `${circularRotateKeyframe} 1.4s linear infinite`
|
|
94456
|
-
}
|
|
94457
|
-
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
94458
|
-
props: {
|
|
94459
|
-
color: color2
|
|
94460
|
-
},
|
|
94461
|
-
style: {
|
|
94462
|
-
color: (theme2.vars || theme2).palette[color2].main
|
|
94463
|
-
}
|
|
94464
|
-
}))]
|
|
94465
|
-
})));
|
|
94466
|
-
const CircularProgressSVG = styled("svg", {
|
|
94467
|
-
name: "MuiCircularProgress",
|
|
94468
|
-
slot: "Svg"
|
|
94469
|
-
})({
|
|
94470
|
-
display: "block"
|
|
94471
|
-
// Keeps the progress centered
|
|
94472
|
-
});
|
|
94473
|
-
const CircularProgressCircle = styled("circle", {
|
|
94474
|
-
name: "MuiCircularProgress",
|
|
94475
|
-
slot: "Circle",
|
|
94476
|
-
overridesResolver: (props, styles3) => {
|
|
94477
|
-
const {
|
|
94478
|
-
ownerState
|
|
94479
|
-
} = props;
|
|
94480
|
-
return [styles3.circle, styles3[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles3.circleDisableShrink];
|
|
94481
|
-
}
|
|
94482
|
-
})(memoTheme(({
|
|
94483
|
-
theme: theme2
|
|
94484
|
-
}) => ({
|
|
94485
|
-
stroke: "currentColor",
|
|
94486
|
-
variants: [{
|
|
94487
|
-
props: {
|
|
94488
|
-
variant: "determinate"
|
|
94489
|
-
},
|
|
94490
|
-
style: {
|
|
94491
|
-
transition: theme2.transitions.create("stroke-dashoffset")
|
|
94492
|
-
}
|
|
94493
|
-
}, {
|
|
94494
|
-
props: {
|
|
94495
|
-
variant: "indeterminate"
|
|
94496
|
-
},
|
|
94497
|
-
style: {
|
|
94498
|
-
// Some default value that looks fine waiting for the animation to kicks in.
|
|
94499
|
-
strokeDasharray: "80px, 200px",
|
|
94500
|
-
strokeDashoffset: 0
|
|
94501
|
-
// Add the unit to fix a Edge 16 and below bug.
|
|
94502
|
-
}
|
|
94503
|
-
}, {
|
|
94504
|
-
props: ({
|
|
94505
|
-
ownerState
|
|
94506
|
-
}) => ownerState.variant === "indeterminate" && !ownerState.disableShrink,
|
|
94507
|
-
style: dashAnimation || {
|
|
94508
|
-
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
94509
|
-
animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`
|
|
94510
|
-
}
|
|
94511
|
-
}]
|
|
94512
|
-
})));
|
|
94513
|
-
const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgress22(inProps, ref2) {
|
|
94514
|
-
const props = useDefaultProps({
|
|
94515
|
-
props: inProps,
|
|
94516
|
-
name: "MuiCircularProgress"
|
|
94517
|
-
});
|
|
94518
|
-
const {
|
|
94519
|
-
className,
|
|
94520
|
-
color: color2 = "primary",
|
|
94521
|
-
disableShrink = false,
|
|
94522
|
-
size = 40,
|
|
94523
|
-
style: style2,
|
|
94524
|
-
thickness = 3.6,
|
|
94525
|
-
value = 0,
|
|
94526
|
-
variant = "indeterminate",
|
|
94527
|
-
...other
|
|
94528
|
-
} = props;
|
|
94529
|
-
const ownerState = {
|
|
94530
|
-
...props,
|
|
94531
|
-
color: color2,
|
|
94532
|
-
disableShrink,
|
|
94533
|
-
size,
|
|
94534
|
-
thickness,
|
|
94535
|
-
value,
|
|
94536
|
-
variant
|
|
94537
|
-
};
|
|
94538
|
-
const classes2 = useUtilityClasses$15(ownerState);
|
|
94539
|
-
const circleStyle = {};
|
|
94540
|
-
const rootStyle = {};
|
|
94541
|
-
const rootProps = {};
|
|
94542
|
-
if (variant === "determinate") {
|
|
94543
|
-
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
94544
|
-
circleStyle.strokeDasharray = circumference.toFixed(3);
|
|
94545
|
-
rootProps["aria-valuenow"] = Math.round(value);
|
|
94546
|
-
circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
|
|
94547
|
-
rootStyle.transform = "rotate(-90deg)";
|
|
94548
|
-
}
|
|
94549
|
-
return /* @__PURE__ */ jsx(CircularProgressRoot, {
|
|
94550
|
-
className: clsx$2(classes2.root, className),
|
|
94551
|
-
style: {
|
|
94552
|
-
width: size,
|
|
94553
|
-
height: size,
|
|
94554
|
-
...rootStyle,
|
|
94555
|
-
...style2
|
|
94556
|
-
},
|
|
94557
|
-
ownerState,
|
|
94558
|
-
ref: ref2,
|
|
94559
|
-
role: "progressbar",
|
|
94560
|
-
...rootProps,
|
|
94561
|
-
...other,
|
|
94562
|
-
children: /* @__PURE__ */ jsx(CircularProgressSVG, {
|
|
94563
|
-
className: classes2.svg,
|
|
94564
|
-
ownerState,
|
|
94565
|
-
viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
|
|
94566
|
-
children: /* @__PURE__ */ jsx(CircularProgressCircle, {
|
|
94567
|
-
className: classes2.circle,
|
|
94568
|
-
style: circleStyle,
|
|
94569
|
-
ownerState,
|
|
94570
|
-
cx: SIZE,
|
|
94571
|
-
cy: SIZE,
|
|
94572
|
-
r: (SIZE - thickness) / 2,
|
|
94573
|
-
fill: "none",
|
|
94574
|
-
strokeWidth: thickness
|
|
94575
|
-
})
|
|
94576
|
-
})
|
|
94577
|
-
});
|
|
94578
|
-
});
|
|
94579
|
-
function getIconButtonUtilityClass(slot) {
|
|
94580
|
-
return generateUtilityClass("MuiIconButton", slot);
|
|
94581
|
-
}
|
|
94582
|
-
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
94583
|
-
const useUtilityClasses$14 = (ownerState) => {
|
|
94584
|
-
const {
|
|
94585
|
-
classes: classes2,
|
|
94586
|
-
disabled,
|
|
94587
|
-
color: color2,
|
|
94588
|
-
edge,
|
|
94589
|
-
size,
|
|
94590
|
-
loading
|
|
94591
|
-
} = ownerState;
|
|
94592
|
-
const slots = {
|
|
94593
|
-
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize(color2)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],
|
|
94594
|
-
loadingIndicator: ["loadingIndicator"],
|
|
94595
|
-
loadingWrapper: ["loadingWrapper"]
|
|
94596
|
-
};
|
|
94597
|
-
return composeClasses(slots, getIconButtonUtilityClass, classes2);
|
|
94598
|
-
};
|
|
94599
|
-
const IconButtonRoot = styled(ButtonBase, {
|
|
94600
|
-
name: "MuiIconButton",
|
|
94601
|
-
slot: "Root",
|
|
94602
|
-
overridesResolver: (props, styles3) => {
|
|
94603
|
-
const {
|
|
94604
|
-
ownerState
|
|
94605
|
-
} = props;
|
|
94606
|
-
return [styles3.root, ownerState.loading && styles3.loading, ownerState.color !== "default" && styles3[`color${capitalize(ownerState.color)}`], ownerState.edge && styles3[`edge${capitalize(ownerState.edge)}`], styles3[`size${capitalize(ownerState.size)}`]];
|
|
94607
|
-
}
|
|
94608
|
-
})(memoTheme(({
|
|
94609
|
-
theme: theme2
|
|
94610
|
-
}) => ({
|
|
94611
|
-
textAlign: "center",
|
|
94612
|
-
flex: "0 0 auto",
|
|
94613
|
-
fontSize: theme2.typography.pxToRem(24),
|
|
94614
|
-
padding: 8,
|
|
94615
|
-
borderRadius: "50%",
|
|
94616
|
-
color: (theme2.vars || theme2).palette.action.active,
|
|
94617
|
-
transition: theme2.transitions.create("background-color", {
|
|
94618
|
-
duration: theme2.transitions.duration.shortest
|
|
94619
|
-
}),
|
|
94620
|
-
variants: [{
|
|
94621
|
-
props: (props) => !props.disableRipple,
|
|
94622
|
-
style: {
|
|
94623
|
-
"--IconButton-hoverBg": theme2.vars ? `rgba(${theme2.vars.palette.action.activeChannel} / ${theme2.vars.palette.action.hoverOpacity})` : alpha(theme2.palette.action.active, theme2.palette.action.hoverOpacity),
|
|
94624
|
-
"&:hover": {
|
|
94625
|
-
backgroundColor: "var(--IconButton-hoverBg)",
|
|
94626
|
-
// Reset on touch devices, it doesn't add specificity
|
|
94627
|
-
"@media (hover: none)": {
|
|
94628
|
-
backgroundColor: "transparent"
|
|
94629
|
-
}
|
|
94630
|
-
}
|
|
94631
|
-
}
|
|
94632
|
-
}, {
|
|
94633
|
-
props: {
|
|
94634
|
-
edge: "start"
|
|
94635
|
-
},
|
|
94636
|
-
style: {
|
|
94637
|
-
marginLeft: -12
|
|
94638
|
-
}
|
|
94639
|
-
}, {
|
|
94640
|
-
props: {
|
|
94641
|
-
edge: "start",
|
|
94642
|
-
size: "small"
|
|
94643
|
-
},
|
|
94644
|
-
style: {
|
|
94645
|
-
marginLeft: -3
|
|
94646
|
-
}
|
|
94647
|
-
}, {
|
|
94648
|
-
props: {
|
|
94649
|
-
edge: "end"
|
|
94650
|
-
},
|
|
94651
|
-
style: {
|
|
94652
|
-
marginRight: -12
|
|
94653
|
-
}
|
|
94654
|
-
}, {
|
|
94655
|
-
props: {
|
|
94656
|
-
edge: "end",
|
|
94657
|
-
size: "small"
|
|
94658
|
-
},
|
|
94659
|
-
style: {
|
|
94660
|
-
marginRight: -3
|
|
94661
|
-
}
|
|
94662
|
-
}]
|
|
94663
|
-
})), memoTheme(({
|
|
94664
|
-
theme: theme2
|
|
94665
|
-
}) => ({
|
|
94666
|
-
variants: [{
|
|
94667
|
-
props: {
|
|
94668
|
-
color: "inherit"
|
|
94669
|
-
},
|
|
94670
|
-
style: {
|
|
94671
|
-
color: "inherit"
|
|
94672
|
-
}
|
|
94673
|
-
}, ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
94674
|
-
props: {
|
|
94675
|
-
color: color2
|
|
94676
|
-
},
|
|
94677
|
-
style: {
|
|
94678
|
-
color: (theme2.vars || theme2).palette[color2].main
|
|
94679
|
-
}
|
|
94680
|
-
})), ...Object.entries(theme2.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
94681
|
-
props: {
|
|
94682
|
-
color: color2
|
|
94683
|
-
},
|
|
94684
|
-
style: {
|
|
94685
|
-
"--IconButton-hoverBg": theme2.vars ? `rgba(${(theme2.vars || theme2).palette[color2].mainChannel} / ${theme2.vars.palette.action.hoverOpacity})` : alpha((theme2.vars || theme2).palette[color2].main, theme2.palette.action.hoverOpacity)
|
|
94686
|
-
}
|
|
94687
|
-
})), {
|
|
94688
|
-
props: {
|
|
94689
|
-
size: "small"
|
|
94690
|
-
},
|
|
94691
|
-
style: {
|
|
94692
|
-
padding: 5,
|
|
94693
|
-
fontSize: theme2.typography.pxToRem(18)
|
|
94694
|
-
}
|
|
94695
|
-
}, {
|
|
94696
|
-
props: {
|
|
94697
|
-
size: "large"
|
|
94698
|
-
},
|
|
94699
|
-
style: {
|
|
94700
|
-
padding: 12,
|
|
94701
|
-
fontSize: theme2.typography.pxToRem(28)
|
|
94702
|
-
}
|
|
94703
|
-
}],
|
|
94704
|
-
[`&.${iconButtonClasses.disabled}`]: {
|
|
94705
|
-
backgroundColor: "transparent",
|
|
94706
|
-
color: (theme2.vars || theme2).palette.action.disabled
|
|
94707
|
-
},
|
|
94708
|
-
[`&.${iconButtonClasses.loading}`]: {
|
|
94709
|
-
color: "transparent"
|
|
94710
|
-
}
|
|
94711
|
-
})));
|
|
94712
|
-
const IconButtonLoadingIndicator = styled("span", {
|
|
94713
|
-
name: "MuiIconButton",
|
|
94714
|
-
slot: "LoadingIndicator"
|
|
94715
|
-
})(({
|
|
94716
|
-
theme: theme2
|
|
94717
|
-
}) => ({
|
|
94718
|
-
display: "none",
|
|
94719
|
-
position: "absolute",
|
|
94720
|
-
visibility: "visible",
|
|
94721
|
-
top: "50%",
|
|
94722
|
-
left: "50%",
|
|
94723
|
-
transform: "translate(-50%, -50%)",
|
|
94724
|
-
color: (theme2.vars || theme2).palette.action.disabled,
|
|
94725
|
-
variants: [{
|
|
94726
|
-
props: {
|
|
94727
|
-
loading: true
|
|
94728
|
-
},
|
|
94729
|
-
style: {
|
|
94730
|
-
display: "flex"
|
|
94731
|
-
}
|
|
94732
|
-
}]
|
|
94733
|
-
}));
|
|
94734
|
-
const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton22(inProps, ref2) {
|
|
94735
|
-
const props = useDefaultProps({
|
|
94736
|
-
props: inProps,
|
|
94737
|
-
name: "MuiIconButton"
|
|
94738
|
-
});
|
|
94739
|
-
const {
|
|
94740
|
-
edge = false,
|
|
94741
|
-
children,
|
|
94742
|
-
className,
|
|
94743
|
-
color: color2 = "default",
|
|
94744
|
-
disabled = false,
|
|
94745
|
-
disableFocusRipple = false,
|
|
94746
|
-
size = "medium",
|
|
94747
|
-
id: idProp,
|
|
94748
|
-
loading = null,
|
|
94749
|
-
loadingIndicator: loadingIndicatorProp,
|
|
94750
|
-
...other
|
|
94751
|
-
} = props;
|
|
94752
|
-
const loadingId = useId(idProp);
|
|
94753
|
-
const loadingIndicator = loadingIndicatorProp ?? /* @__PURE__ */ jsx(CircularProgress, {
|
|
94754
|
-
"aria-labelledby": loadingId,
|
|
94755
|
-
color: "inherit",
|
|
94756
|
-
size: 16
|
|
94757
|
-
});
|
|
94758
|
-
const ownerState = {
|
|
94759
|
-
...props,
|
|
94760
|
-
edge,
|
|
94761
|
-
color: color2,
|
|
94762
|
-
disabled,
|
|
94763
|
-
disableFocusRipple,
|
|
94764
|
-
loading,
|
|
94765
|
-
loadingIndicator,
|
|
94766
|
-
size
|
|
94767
|
-
};
|
|
94768
|
-
const classes2 = useUtilityClasses$14(ownerState);
|
|
94769
|
-
return /* @__PURE__ */ jsxs(IconButtonRoot, {
|
|
94770
|
-
id: loading ? loadingId : idProp,
|
|
94771
|
-
className: clsx$2(classes2.root, className),
|
|
94772
|
-
centerRipple: true,
|
|
94773
|
-
focusRipple: !disableFocusRipple,
|
|
94774
|
-
disabled: disabled || loading,
|
|
94775
|
-
ref: ref2,
|
|
94776
|
-
...other,
|
|
94777
|
-
ownerState,
|
|
94778
|
-
children: [typeof loading === "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
94779
|
-
/* @__PURE__ */ jsx("span", {
|
|
94780
|
-
className: classes2.loadingWrapper,
|
|
94781
|
-
style: {
|
|
94782
|
-
display: "contents"
|
|
94783
|
-
},
|
|
94784
|
-
children: /* @__PURE__ */ jsx(IconButtonLoadingIndicator, {
|
|
94785
|
-
className: classes2.loadingIndicator,
|
|
94786
|
-
ownerState,
|
|
94787
|
-
children: loading && loadingIndicator
|
|
94788
|
-
})
|
|
94789
|
-
}), children]
|
|
94790
|
-
});
|
|
94791
|
-
});
|
|
94792
95074
|
const CancelIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
94793
95075
|
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
|
|
94794
95076
|
}));
|
|
@@ -125708,6 +125990,17 @@ class RootElementService {
|
|
|
125708
125990
|
this.rootElementId = rootElementId;
|
|
125709
125991
|
}
|
|
125710
125992
|
}
|
|
125993
|
+
const $SettingsController = serviceName((s2) => s2.settingsController);
|
|
125994
|
+
class SettingsController {
|
|
125995
|
+
constructor(requestService) {
|
|
125996
|
+
this.requestService = requestService;
|
|
125997
|
+
this.name = "Settings";
|
|
125998
|
+
this.meta = null;
|
|
125999
|
+
}
|
|
126000
|
+
copy(request) {
|
|
126001
|
+
return this.requestService.post("api/settings/copy", request);
|
|
126002
|
+
}
|
|
126003
|
+
}
|
|
125711
126004
|
class Application extends ServiceContainer {
|
|
125712
126005
|
constructor(reactRootElementId) {
|
|
125713
126006
|
super();
|
|
@@ -125782,6 +126075,7 @@ class Application extends ServiceContainer {
|
|
|
125782
126075
|
this.registerService($ExtendedConfigurationController, new ExtendedConfigurationController(this.requestService));
|
|
125783
126076
|
this.registerService($SessionsController, new SessionsController(this.requestService));
|
|
125784
126077
|
this.registerService($RootElement, new RootElementService(this.reactRootElementId));
|
|
126078
|
+
this.registerService($SettingsController, new SettingsController(this.requestService));
|
|
125785
126079
|
await this.registerLocalization();
|
|
125786
126080
|
this.registerService($MessageWindow, new MessageWindowService({ resources: this.resources }));
|
|
125787
126081
|
const about = await this.requestService.get("api/about");
|
|
@@ -125959,11 +126253,6 @@ function DatabaseSelectionModal(props) {
|
|
|
125959
126253
|
const selectedItems = databases.filter((database) => selectedIds.has(database.hash));
|
|
125960
126254
|
onApply(selectedItems);
|
|
125961
126255
|
};
|
|
125962
|
-
const handleKeyDown2 = (event, databaseHash) => {
|
|
125963
|
-
if (event.key === "Enter") {
|
|
125964
|
-
handleToggle(databaseHash);
|
|
125965
|
-
}
|
|
125966
|
-
};
|
|
125967
126256
|
const hasDatabases = databases.length > 0;
|
|
125968
126257
|
const isApplyDisabled = !hasDatabases || !selectedIds.size;
|
|
125969
126258
|
const columns = [resources.Alias, resources.ApplicationServer, resources.SqlServer, ""];
|
|
@@ -126018,7 +126307,6 @@ function DatabaseSelectionModal(props) {
|
|
|
126018
126307
|
checked: isSelected,
|
|
126019
126308
|
onChange: () => handleToggle(database.hash),
|
|
126020
126309
|
onClick: (event) => event.stopPropagation(),
|
|
126021
|
-
onKeyDown: (event) => handleKeyDown2(event, database.hash),
|
|
126022
126310
|
disabled: hasError
|
|
126023
126311
|
}
|
|
126024
126312
|
) })
|