@vitessce/vit-s 3.6.6 → 3.6.8
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/dist/index.js +1383 -881
- package/dist-tsc/TitleInfo.d.ts.map +1 -1
- package/dist-tsc/TitleInfo.js +28 -7
- package/dist-tsc/VitS.d.ts.map +1 -1
- package/dist-tsc/VitS.js +11 -2
- package/dist-tsc/data-hook-utils.d.ts +6 -12
- package/dist-tsc/data-hook-utils.d.ts.map +1 -1
- package/dist-tsc/data-hook-utils.js +11 -38
- package/dist-tsc/data-hooks-multilevel-utils.d.ts +51 -5
- package/dist-tsc/data-hooks-multilevel-utils.d.ts.map +1 -1
- package/dist-tsc/data-hooks-multilevel-utils.js +68 -42
- package/dist-tsc/data-hooks-multilevel.d.ts +63 -7
- package/dist-tsc/data-hooks-multilevel.d.ts.map +1 -1
- package/dist-tsc/data-hooks-multilevel.js +70 -14
- package/dist-tsc/data-hooks.d.ts +275 -34
- package/dist-tsc/data-hooks.d.ts.map +1 -1
- package/dist-tsc/data-hooks.js +282 -53
- package/dist-tsc/hooks.js +1 -1
- package/package.json +12 -11
- package/src/TitleInfo.js +64 -3
- package/src/VitS.js +11 -1
- package/src/data-hook-utils.js +10 -44
- package/src/data-hooks-multilevel-utils.js +66 -48
- package/src/data-hooks-multilevel.js +70 -14
- package/src/data-hooks.js +285 -57
- package/src/hooks.js +1 -1
package/dist/index.js
CHANGED
|
@@ -9460,7 +9460,7 @@ function getSvgIconUtilityClass(slot) {
|
|
|
9460
9460
|
return generateUtilityClass("MuiSvgIcon", slot);
|
|
9461
9461
|
}
|
|
9462
9462
|
generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
9463
|
-
const useUtilityClasses$
|
|
9463
|
+
const useUtilityClasses$j = (ownerState) => {
|
|
9464
9464
|
const {
|
|
9465
9465
|
color: color2,
|
|
9466
9466
|
fontSize,
|
|
@@ -9605,7 +9605,7 @@ const SvgIcon = /* @__PURE__ */ React$1.forwardRef(function SvgIcon2(inProps, re
|
|
|
9605
9605
|
if (!inheritViewBox) {
|
|
9606
9606
|
more.viewBox = viewBox;
|
|
9607
9607
|
}
|
|
9608
|
-
const classes = useUtilityClasses$
|
|
9608
|
+
const classes = useUtilityClasses$j(ownerState);
|
|
9609
9609
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SvgIconRoot, {
|
|
9610
9610
|
as: component,
|
|
9611
9611
|
className: clsx$1(classes.root, className),
|
|
@@ -9858,7 +9858,7 @@ function getPaperUtilityClass(slot) {
|
|
|
9858
9858
|
return generateUtilityClass("MuiPaper", slot);
|
|
9859
9859
|
}
|
|
9860
9860
|
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"]);
|
|
9861
|
-
const useUtilityClasses$
|
|
9861
|
+
const useUtilityClasses$i = (ownerState) => {
|
|
9862
9862
|
const {
|
|
9863
9863
|
square,
|
|
9864
9864
|
elevation,
|
|
@@ -9931,7 +9931,7 @@ const Paper = /* @__PURE__ */ React$1.forwardRef(function Paper2(inProps, ref) {
|
|
|
9931
9931
|
square,
|
|
9932
9932
|
variant
|
|
9933
9933
|
};
|
|
9934
|
-
const classes = useUtilityClasses$
|
|
9934
|
+
const classes = useUtilityClasses$i(ownerState);
|
|
9935
9935
|
{
|
|
9936
9936
|
if (theme.shadows[elevation] === void 0) {
|
|
9937
9937
|
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
|
|
@@ -10116,6 +10116,56 @@ function mergeSlotProps(parameters) {
|
|
|
10116
10116
|
internalRef: internalSlotProps.ref
|
|
10117
10117
|
};
|
|
10118
10118
|
}
|
|
10119
|
+
function useSlot(name, parameters) {
|
|
10120
|
+
const {
|
|
10121
|
+
className,
|
|
10122
|
+
elementType: initialElementType,
|
|
10123
|
+
ownerState,
|
|
10124
|
+
externalForwardedProps,
|
|
10125
|
+
internalForwardedProps,
|
|
10126
|
+
shouldForwardComponentProp = false,
|
|
10127
|
+
...useSlotPropsParams
|
|
10128
|
+
} = parameters;
|
|
10129
|
+
const {
|
|
10130
|
+
component: rootComponent,
|
|
10131
|
+
slots = {
|
|
10132
|
+
[name]: void 0
|
|
10133
|
+
},
|
|
10134
|
+
slotProps = {
|
|
10135
|
+
[name]: void 0
|
|
10136
|
+
},
|
|
10137
|
+
...other
|
|
10138
|
+
} = externalForwardedProps;
|
|
10139
|
+
const elementType = slots[name] || initialElementType;
|
|
10140
|
+
const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
|
|
10141
|
+
const {
|
|
10142
|
+
props: {
|
|
10143
|
+
component: slotComponent,
|
|
10144
|
+
...mergedProps
|
|
10145
|
+
},
|
|
10146
|
+
internalRef
|
|
10147
|
+
} = mergeSlotProps({
|
|
10148
|
+
className,
|
|
10149
|
+
...useSlotPropsParams,
|
|
10150
|
+
externalForwardedProps: name === "root" ? other : void 0,
|
|
10151
|
+
externalSlotProps: resolvedComponentsProps
|
|
10152
|
+
});
|
|
10153
|
+
const ref = useForkRef$1(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);
|
|
10154
|
+
const LeafComponent = name === "root" ? slotComponent || rootComponent : slotComponent;
|
|
10155
|
+
const props = appendOwnerState(elementType, {
|
|
10156
|
+
...name === "root" && !rootComponent && !slots[name] && internalForwardedProps,
|
|
10157
|
+
...name !== "root" && !slots[name] && internalForwardedProps,
|
|
10158
|
+
...mergedProps,
|
|
10159
|
+
...LeafComponent && !shouldForwardComponentProp && {
|
|
10160
|
+
as: LeafComponent
|
|
10161
|
+
},
|
|
10162
|
+
...LeafComponent && shouldForwardComponentProp && {
|
|
10163
|
+
component: LeafComponent
|
|
10164
|
+
},
|
|
10165
|
+
ref
|
|
10166
|
+
}, ownerState);
|
|
10167
|
+
return [elementType, props];
|
|
10168
|
+
}
|
|
10119
10169
|
const refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
10120
10170
|
function isFocusVisible(element) {
|
|
10121
10171
|
try {
|
|
@@ -10567,7 +10617,7 @@ function getButtonBaseUtilityClass(slot) {
|
|
|
10567
10617
|
return generateUtilityClass("MuiButtonBase", slot);
|
|
10568
10618
|
}
|
|
10569
10619
|
const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
|
|
10570
|
-
const useUtilityClasses$
|
|
10620
|
+
const useUtilityClasses$h = (ownerState) => {
|
|
10571
10621
|
const {
|
|
10572
10622
|
disabled,
|
|
10573
10623
|
focusVisible,
|
|
@@ -10783,7 +10833,7 @@ const ButtonBase = /* @__PURE__ */ React$1.forwardRef(function ButtonBase2(inPro
|
|
|
10783
10833
|
tabIndex,
|
|
10784
10834
|
focusVisible
|
|
10785
10835
|
};
|
|
10786
|
-
const classes = useUtilityClasses$
|
|
10836
|
+
const classes = useUtilityClasses$h(ownerState);
|
|
10787
10837
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonBaseRoot, {
|
|
10788
10838
|
as: ComponentProp,
|
|
10789
10839
|
className: clsx$1(classes.root, className),
|
|
@@ -10982,6 +11032,962 @@ ButtonBase.propTypes = {
|
|
|
10982
11032
|
*/
|
|
10983
11033
|
type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
|
|
10984
11034
|
};
|
|
11035
|
+
function hasCorrectMainProperty(obj) {
|
|
11036
|
+
return typeof obj.main === "string";
|
|
11037
|
+
}
|
|
11038
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
11039
|
+
if (!hasCorrectMainProperty(obj)) {
|
|
11040
|
+
return false;
|
|
11041
|
+
}
|
|
11042
|
+
for (const value of additionalPropertiesToCheck) {
|
|
11043
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
11044
|
+
return false;
|
|
11045
|
+
}
|
|
11046
|
+
}
|
|
11047
|
+
return true;
|
|
11048
|
+
}
|
|
11049
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
11050
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
11051
|
+
}
|
|
11052
|
+
function getAlertUtilityClass(slot) {
|
|
11053
|
+
return generateUtilityClass("MuiAlert", slot);
|
|
11054
|
+
}
|
|
11055
|
+
const alertClasses = generateUtilityClasses("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]);
|
|
11056
|
+
function getCircularProgressUtilityClass(slot) {
|
|
11057
|
+
return generateUtilityClass("MuiCircularProgress", slot);
|
|
11058
|
+
}
|
|
11059
|
+
generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
11060
|
+
const SIZE = 44;
|
|
11061
|
+
const circularRotateKeyframe = keyframes`
|
|
11062
|
+
0% {
|
|
11063
|
+
transform: rotate(0deg);
|
|
11064
|
+
}
|
|
11065
|
+
|
|
11066
|
+
100% {
|
|
11067
|
+
transform: rotate(360deg);
|
|
11068
|
+
}
|
|
11069
|
+
`;
|
|
11070
|
+
const circularDashKeyframe = keyframes`
|
|
11071
|
+
0% {
|
|
11072
|
+
stroke-dasharray: 1px, 200px;
|
|
11073
|
+
stroke-dashoffset: 0;
|
|
11074
|
+
}
|
|
11075
|
+
|
|
11076
|
+
50% {
|
|
11077
|
+
stroke-dasharray: 100px, 200px;
|
|
11078
|
+
stroke-dashoffset: -15px;
|
|
11079
|
+
}
|
|
11080
|
+
|
|
11081
|
+
100% {
|
|
11082
|
+
stroke-dasharray: 1px, 200px;
|
|
11083
|
+
stroke-dashoffset: -126px;
|
|
11084
|
+
}
|
|
11085
|
+
`;
|
|
11086
|
+
const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css`
|
|
11087
|
+
animation: ${circularRotateKeyframe} 1.4s linear infinite;
|
|
11088
|
+
` : null;
|
|
11089
|
+
const dashAnimation = typeof circularDashKeyframe !== "string" ? css`
|
|
11090
|
+
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
11091
|
+
` : null;
|
|
11092
|
+
const useUtilityClasses$g = (ownerState) => {
|
|
11093
|
+
const {
|
|
11094
|
+
classes,
|
|
11095
|
+
variant,
|
|
11096
|
+
color: color2,
|
|
11097
|
+
disableShrink
|
|
11098
|
+
} = ownerState;
|
|
11099
|
+
const slots = {
|
|
11100
|
+
root: ["root", variant, `color${capitalize$1(color2)}`],
|
|
11101
|
+
svg: ["svg"],
|
|
11102
|
+
circle: ["circle", `circle${capitalize$1(variant)}`, disableShrink && "circleDisableShrink"]
|
|
11103
|
+
};
|
|
11104
|
+
return composeClasses(slots, getCircularProgressUtilityClass, classes);
|
|
11105
|
+
};
|
|
11106
|
+
const CircularProgressRoot = styled("span", {
|
|
11107
|
+
name: "MuiCircularProgress",
|
|
11108
|
+
slot: "Root",
|
|
11109
|
+
overridesResolver: (props, styles2) => {
|
|
11110
|
+
const {
|
|
11111
|
+
ownerState
|
|
11112
|
+
} = props;
|
|
11113
|
+
return [styles2.root, styles2[ownerState.variant], styles2[`color${capitalize$1(ownerState.color)}`]];
|
|
11114
|
+
}
|
|
11115
|
+
})(memoTheme(({
|
|
11116
|
+
theme
|
|
11117
|
+
}) => ({
|
|
11118
|
+
display: "inline-block",
|
|
11119
|
+
variants: [{
|
|
11120
|
+
props: {
|
|
11121
|
+
variant: "determinate"
|
|
11122
|
+
},
|
|
11123
|
+
style: {
|
|
11124
|
+
transition: theme.transitions.create("transform")
|
|
11125
|
+
}
|
|
11126
|
+
}, {
|
|
11127
|
+
props: {
|
|
11128
|
+
variant: "indeterminate"
|
|
11129
|
+
},
|
|
11130
|
+
style: rotateAnimation || {
|
|
11131
|
+
animation: `${circularRotateKeyframe} 1.4s linear infinite`
|
|
11132
|
+
}
|
|
11133
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
11134
|
+
props: {
|
|
11135
|
+
color: color2
|
|
11136
|
+
},
|
|
11137
|
+
style: {
|
|
11138
|
+
color: (theme.vars || theme).palette[color2].main
|
|
11139
|
+
}
|
|
11140
|
+
}))]
|
|
11141
|
+
})));
|
|
11142
|
+
const CircularProgressSVG = styled("svg", {
|
|
11143
|
+
name: "MuiCircularProgress",
|
|
11144
|
+
slot: "Svg"
|
|
11145
|
+
})({
|
|
11146
|
+
display: "block"
|
|
11147
|
+
// Keeps the progress centered
|
|
11148
|
+
});
|
|
11149
|
+
const CircularProgressCircle = styled("circle", {
|
|
11150
|
+
name: "MuiCircularProgress",
|
|
11151
|
+
slot: "Circle",
|
|
11152
|
+
overridesResolver: (props, styles2) => {
|
|
11153
|
+
const {
|
|
11154
|
+
ownerState
|
|
11155
|
+
} = props;
|
|
11156
|
+
return [styles2.circle, styles2[`circle${capitalize$1(ownerState.variant)}`], ownerState.disableShrink && styles2.circleDisableShrink];
|
|
11157
|
+
}
|
|
11158
|
+
})(memoTheme(({
|
|
11159
|
+
theme
|
|
11160
|
+
}) => ({
|
|
11161
|
+
stroke: "currentColor",
|
|
11162
|
+
variants: [{
|
|
11163
|
+
props: {
|
|
11164
|
+
variant: "determinate"
|
|
11165
|
+
},
|
|
11166
|
+
style: {
|
|
11167
|
+
transition: theme.transitions.create("stroke-dashoffset")
|
|
11168
|
+
}
|
|
11169
|
+
}, {
|
|
11170
|
+
props: {
|
|
11171
|
+
variant: "indeterminate"
|
|
11172
|
+
},
|
|
11173
|
+
style: {
|
|
11174
|
+
// Some default value that looks fine waiting for the animation to kicks in.
|
|
11175
|
+
strokeDasharray: "80px, 200px",
|
|
11176
|
+
strokeDashoffset: 0
|
|
11177
|
+
// Add the unit to fix a Edge 16 and below bug.
|
|
11178
|
+
}
|
|
11179
|
+
}, {
|
|
11180
|
+
props: ({
|
|
11181
|
+
ownerState
|
|
11182
|
+
}) => ownerState.variant === "indeterminate" && !ownerState.disableShrink,
|
|
11183
|
+
style: dashAnimation || {
|
|
11184
|
+
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
11185
|
+
animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`
|
|
11186
|
+
}
|
|
11187
|
+
}]
|
|
11188
|
+
})));
|
|
11189
|
+
const CircularProgress = /* @__PURE__ */ React$1.forwardRef(function CircularProgress2(inProps, ref) {
|
|
11190
|
+
const props = useDefaultProps({
|
|
11191
|
+
props: inProps,
|
|
11192
|
+
name: "MuiCircularProgress"
|
|
11193
|
+
});
|
|
11194
|
+
const {
|
|
11195
|
+
className,
|
|
11196
|
+
color: color2 = "primary",
|
|
11197
|
+
disableShrink = false,
|
|
11198
|
+
size = 40,
|
|
11199
|
+
style: style2,
|
|
11200
|
+
thickness = 3.6,
|
|
11201
|
+
value = 0,
|
|
11202
|
+
variant = "indeterminate",
|
|
11203
|
+
...other
|
|
11204
|
+
} = props;
|
|
11205
|
+
const ownerState = {
|
|
11206
|
+
...props,
|
|
11207
|
+
color: color2,
|
|
11208
|
+
disableShrink,
|
|
11209
|
+
size,
|
|
11210
|
+
thickness,
|
|
11211
|
+
value,
|
|
11212
|
+
variant
|
|
11213
|
+
};
|
|
11214
|
+
const classes = useUtilityClasses$g(ownerState);
|
|
11215
|
+
const circleStyle = {};
|
|
11216
|
+
const rootStyle = {};
|
|
11217
|
+
const rootProps = {};
|
|
11218
|
+
if (variant === "determinate") {
|
|
11219
|
+
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
11220
|
+
circleStyle.strokeDasharray = circumference.toFixed(3);
|
|
11221
|
+
rootProps["aria-valuenow"] = Math.round(value);
|
|
11222
|
+
circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
|
|
11223
|
+
rootStyle.transform = "rotate(-90deg)";
|
|
11224
|
+
}
|
|
11225
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, {
|
|
11226
|
+
className: clsx$1(classes.root, className),
|
|
11227
|
+
style: {
|
|
11228
|
+
width: size,
|
|
11229
|
+
height: size,
|
|
11230
|
+
...rootStyle,
|
|
11231
|
+
...style2
|
|
11232
|
+
},
|
|
11233
|
+
ownerState,
|
|
11234
|
+
ref,
|
|
11235
|
+
role: "progressbar",
|
|
11236
|
+
...rootProps,
|
|
11237
|
+
...other,
|
|
11238
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressSVG, {
|
|
11239
|
+
className: classes.svg,
|
|
11240
|
+
ownerState,
|
|
11241
|
+
viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
|
|
11242
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressCircle, {
|
|
11243
|
+
className: classes.circle,
|
|
11244
|
+
style: circleStyle,
|
|
11245
|
+
ownerState,
|
|
11246
|
+
cx: SIZE,
|
|
11247
|
+
cy: SIZE,
|
|
11248
|
+
r: (SIZE - thickness) / 2,
|
|
11249
|
+
fill: "none",
|
|
11250
|
+
strokeWidth: thickness
|
|
11251
|
+
})
|
|
11252
|
+
})
|
|
11253
|
+
});
|
|
11254
|
+
});
|
|
11255
|
+
CircularProgress.propTypes = {
|
|
11256
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
11257
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
11258
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
11259
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
11260
|
+
/**
|
|
11261
|
+
* Override or extend the styles applied to the component.
|
|
11262
|
+
*/
|
|
11263
|
+
classes: PropTypes.object,
|
|
11264
|
+
/**
|
|
11265
|
+
* @ignore
|
|
11266
|
+
*/
|
|
11267
|
+
className: PropTypes.string,
|
|
11268
|
+
/**
|
|
11269
|
+
* The color of the component.
|
|
11270
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
11271
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
11272
|
+
* @default 'primary'
|
|
11273
|
+
*/
|
|
11274
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), PropTypes.string]),
|
|
11275
|
+
/**
|
|
11276
|
+
* If `true`, the shrink animation is disabled.
|
|
11277
|
+
* This only works if variant is `indeterminate`.
|
|
11278
|
+
* @default false
|
|
11279
|
+
*/
|
|
11280
|
+
disableShrink: chainPropTypes(PropTypes.bool, (props) => {
|
|
11281
|
+
if (props.disableShrink && props.variant && props.variant !== "indeterminate") {
|
|
11282
|
+
return new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.");
|
|
11283
|
+
}
|
|
11284
|
+
return null;
|
|
11285
|
+
}),
|
|
11286
|
+
/**
|
|
11287
|
+
* The size of the component.
|
|
11288
|
+
* If using a number, the pixel unit is assumed.
|
|
11289
|
+
* If using a string, you need to provide the CSS unit, for example '3rem'.
|
|
11290
|
+
* @default 40
|
|
11291
|
+
*/
|
|
11292
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
11293
|
+
/**
|
|
11294
|
+
* @ignore
|
|
11295
|
+
*/
|
|
11296
|
+
style: PropTypes.object,
|
|
11297
|
+
/**
|
|
11298
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
11299
|
+
*/
|
|
11300
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
11301
|
+
/**
|
|
11302
|
+
* The thickness of the circle.
|
|
11303
|
+
* @default 3.6
|
|
11304
|
+
*/
|
|
11305
|
+
thickness: PropTypes.number,
|
|
11306
|
+
/**
|
|
11307
|
+
* The value of the progress indicator for the determinate variant.
|
|
11308
|
+
* Value between 0 and 100.
|
|
11309
|
+
* @default 0
|
|
11310
|
+
*/
|
|
11311
|
+
value: PropTypes.number,
|
|
11312
|
+
/**
|
|
11313
|
+
* The variant to use.
|
|
11314
|
+
* Use indeterminate when there is no progress value.
|
|
11315
|
+
* @default 'indeterminate'
|
|
11316
|
+
*/
|
|
11317
|
+
variant: PropTypes.oneOf(["determinate", "indeterminate"])
|
|
11318
|
+
};
|
|
11319
|
+
function getIconButtonUtilityClass(slot) {
|
|
11320
|
+
return generateUtilityClass("MuiIconButton", slot);
|
|
11321
|
+
}
|
|
11322
|
+
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
11323
|
+
const useUtilityClasses$f = (ownerState) => {
|
|
11324
|
+
const {
|
|
11325
|
+
classes,
|
|
11326
|
+
disabled,
|
|
11327
|
+
color: color2,
|
|
11328
|
+
edge,
|
|
11329
|
+
size,
|
|
11330
|
+
loading
|
|
11331
|
+
} = ownerState;
|
|
11332
|
+
const slots = {
|
|
11333
|
+
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(size)}`],
|
|
11334
|
+
loadingIndicator: ["loadingIndicator"],
|
|
11335
|
+
loadingWrapper: ["loadingWrapper"]
|
|
11336
|
+
};
|
|
11337
|
+
return composeClasses(slots, getIconButtonUtilityClass, classes);
|
|
11338
|
+
};
|
|
11339
|
+
const IconButtonRoot = styled(ButtonBase, {
|
|
11340
|
+
name: "MuiIconButton",
|
|
11341
|
+
slot: "Root",
|
|
11342
|
+
overridesResolver: (props, styles2) => {
|
|
11343
|
+
const {
|
|
11344
|
+
ownerState
|
|
11345
|
+
} = props;
|
|
11346
|
+
return [styles2.root, ownerState.loading && styles2.loading, ownerState.color !== "default" && styles2[`color${capitalize$1(ownerState.color)}`], ownerState.edge && styles2[`edge${capitalize$1(ownerState.edge)}`], styles2[`size${capitalize$1(ownerState.size)}`]];
|
|
11347
|
+
}
|
|
11348
|
+
})(memoTheme(({
|
|
11349
|
+
theme
|
|
11350
|
+
}) => ({
|
|
11351
|
+
textAlign: "center",
|
|
11352
|
+
flex: "0 0 auto",
|
|
11353
|
+
fontSize: theme.typography.pxToRem(24),
|
|
11354
|
+
padding: 8,
|
|
11355
|
+
borderRadius: "50%",
|
|
11356
|
+
color: (theme.vars || theme).palette.action.active,
|
|
11357
|
+
transition: theme.transitions.create("background-color", {
|
|
11358
|
+
duration: theme.transitions.duration.shortest
|
|
11359
|
+
}),
|
|
11360
|
+
variants: [{
|
|
11361
|
+
props: (props) => !props.disableRipple,
|
|
11362
|
+
style: {
|
|
11363
|
+
"--IconButton-hoverBg": theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
11364
|
+
"&:hover": {
|
|
11365
|
+
backgroundColor: "var(--IconButton-hoverBg)",
|
|
11366
|
+
// Reset on touch devices, it doesn't add specificity
|
|
11367
|
+
"@media (hover: none)": {
|
|
11368
|
+
backgroundColor: "transparent"
|
|
11369
|
+
}
|
|
11370
|
+
}
|
|
11371
|
+
}
|
|
11372
|
+
}, {
|
|
11373
|
+
props: {
|
|
11374
|
+
edge: "start"
|
|
11375
|
+
},
|
|
11376
|
+
style: {
|
|
11377
|
+
marginLeft: -12
|
|
11378
|
+
}
|
|
11379
|
+
}, {
|
|
11380
|
+
props: {
|
|
11381
|
+
edge: "start",
|
|
11382
|
+
size: "small"
|
|
11383
|
+
},
|
|
11384
|
+
style: {
|
|
11385
|
+
marginLeft: -3
|
|
11386
|
+
}
|
|
11387
|
+
}, {
|
|
11388
|
+
props: {
|
|
11389
|
+
edge: "end"
|
|
11390
|
+
},
|
|
11391
|
+
style: {
|
|
11392
|
+
marginRight: -12
|
|
11393
|
+
}
|
|
11394
|
+
}, {
|
|
11395
|
+
props: {
|
|
11396
|
+
edge: "end",
|
|
11397
|
+
size: "small"
|
|
11398
|
+
},
|
|
11399
|
+
style: {
|
|
11400
|
+
marginRight: -3
|
|
11401
|
+
}
|
|
11402
|
+
}]
|
|
11403
|
+
})), memoTheme(({
|
|
11404
|
+
theme
|
|
11405
|
+
}) => ({
|
|
11406
|
+
variants: [{
|
|
11407
|
+
props: {
|
|
11408
|
+
color: "inherit"
|
|
11409
|
+
},
|
|
11410
|
+
style: {
|
|
11411
|
+
color: "inherit"
|
|
11412
|
+
}
|
|
11413
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
11414
|
+
props: {
|
|
11415
|
+
color: color2
|
|
11416
|
+
},
|
|
11417
|
+
style: {
|
|
11418
|
+
color: (theme.vars || theme).palette[color2].main
|
|
11419
|
+
}
|
|
11420
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
11421
|
+
props: {
|
|
11422
|
+
color: color2
|
|
11423
|
+
},
|
|
11424
|
+
style: {
|
|
11425
|
+
"--IconButton-hoverBg": theme.vars ? `rgba(${(theme.vars || theme).palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color2].main, theme.palette.action.hoverOpacity)
|
|
11426
|
+
}
|
|
11427
|
+
})), {
|
|
11428
|
+
props: {
|
|
11429
|
+
size: "small"
|
|
11430
|
+
},
|
|
11431
|
+
style: {
|
|
11432
|
+
padding: 5,
|
|
11433
|
+
fontSize: theme.typography.pxToRem(18)
|
|
11434
|
+
}
|
|
11435
|
+
}, {
|
|
11436
|
+
props: {
|
|
11437
|
+
size: "large"
|
|
11438
|
+
},
|
|
11439
|
+
style: {
|
|
11440
|
+
padding: 12,
|
|
11441
|
+
fontSize: theme.typography.pxToRem(28)
|
|
11442
|
+
}
|
|
11443
|
+
}],
|
|
11444
|
+
[`&.${iconButtonClasses.disabled}`]: {
|
|
11445
|
+
backgroundColor: "transparent",
|
|
11446
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
11447
|
+
},
|
|
11448
|
+
[`&.${iconButtonClasses.loading}`]: {
|
|
11449
|
+
color: "transparent"
|
|
11450
|
+
}
|
|
11451
|
+
})));
|
|
11452
|
+
const IconButtonLoadingIndicator = styled("span", {
|
|
11453
|
+
name: "MuiIconButton",
|
|
11454
|
+
slot: "LoadingIndicator"
|
|
11455
|
+
})(({
|
|
11456
|
+
theme
|
|
11457
|
+
}) => ({
|
|
11458
|
+
display: "none",
|
|
11459
|
+
position: "absolute",
|
|
11460
|
+
visibility: "visible",
|
|
11461
|
+
top: "50%",
|
|
11462
|
+
left: "50%",
|
|
11463
|
+
transform: "translate(-50%, -50%)",
|
|
11464
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
11465
|
+
variants: [{
|
|
11466
|
+
props: {
|
|
11467
|
+
loading: true
|
|
11468
|
+
},
|
|
11469
|
+
style: {
|
|
11470
|
+
display: "flex"
|
|
11471
|
+
}
|
|
11472
|
+
}]
|
|
11473
|
+
}));
|
|
11474
|
+
const IconButton = /* @__PURE__ */ React$1.forwardRef(function IconButton2(inProps, ref) {
|
|
11475
|
+
const props = useDefaultProps({
|
|
11476
|
+
props: inProps,
|
|
11477
|
+
name: "MuiIconButton"
|
|
11478
|
+
});
|
|
11479
|
+
const {
|
|
11480
|
+
edge = false,
|
|
11481
|
+
children,
|
|
11482
|
+
className,
|
|
11483
|
+
color: color2 = "default",
|
|
11484
|
+
disabled = false,
|
|
11485
|
+
disableFocusRipple = false,
|
|
11486
|
+
size = "medium",
|
|
11487
|
+
id: idProp,
|
|
11488
|
+
loading = null,
|
|
11489
|
+
loadingIndicator: loadingIndicatorProp,
|
|
11490
|
+
...other
|
|
11491
|
+
} = props;
|
|
11492
|
+
const loadingId = useId(idProp);
|
|
11493
|
+
const loadingIndicator = loadingIndicatorProp ?? /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {
|
|
11494
|
+
"aria-labelledby": loadingId,
|
|
11495
|
+
color: "inherit",
|
|
11496
|
+
size: 16
|
|
11497
|
+
});
|
|
11498
|
+
const ownerState = {
|
|
11499
|
+
...props,
|
|
11500
|
+
edge,
|
|
11501
|
+
color: color2,
|
|
11502
|
+
disabled,
|
|
11503
|
+
disableFocusRipple,
|
|
11504
|
+
loading,
|
|
11505
|
+
loadingIndicator,
|
|
11506
|
+
size
|
|
11507
|
+
};
|
|
11508
|
+
const classes = useUtilityClasses$f(ownerState);
|
|
11509
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
11510
|
+
id: loading ? loadingId : idProp,
|
|
11511
|
+
className: clsx$1(classes.root, className),
|
|
11512
|
+
centerRipple: true,
|
|
11513
|
+
focusRipple: !disableFocusRipple,
|
|
11514
|
+
disabled: disabled || loading,
|
|
11515
|
+
ref,
|
|
11516
|
+
...other,
|
|
11517
|
+
ownerState,
|
|
11518
|
+
children: [typeof loading === "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
11519
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11520
|
+
className: classes.loadingWrapper,
|
|
11521
|
+
style: {
|
|
11522
|
+
display: "contents"
|
|
11523
|
+
},
|
|
11524
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButtonLoadingIndicator, {
|
|
11525
|
+
className: classes.loadingIndicator,
|
|
11526
|
+
ownerState,
|
|
11527
|
+
children: loading && loadingIndicator
|
|
11528
|
+
})
|
|
11529
|
+
}), children]
|
|
11530
|
+
});
|
|
11531
|
+
});
|
|
11532
|
+
IconButton.propTypes = {
|
|
11533
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
11534
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
11535
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
11536
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
11537
|
+
/**
|
|
11538
|
+
* The icon to display.
|
|
11539
|
+
*/
|
|
11540
|
+
children: chainPropTypes(PropTypes.node, (props) => {
|
|
11541
|
+
const found = React$1.Children.toArray(props.children).some((child) => /* @__PURE__ */ React$1.isValidElement(child) && child.props.onClick);
|
|
11542
|
+
if (found) {
|
|
11543
|
+
return new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join("\n"));
|
|
11544
|
+
}
|
|
11545
|
+
return null;
|
|
11546
|
+
}),
|
|
11547
|
+
/**
|
|
11548
|
+
* Override or extend the styles applied to the component.
|
|
11549
|
+
*/
|
|
11550
|
+
classes: PropTypes.object,
|
|
11551
|
+
/**
|
|
11552
|
+
* @ignore
|
|
11553
|
+
*/
|
|
11554
|
+
className: PropTypes.string,
|
|
11555
|
+
/**
|
|
11556
|
+
* The color of the component.
|
|
11557
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
11558
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
11559
|
+
* @default 'default'
|
|
11560
|
+
*/
|
|
11561
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), PropTypes.string]),
|
|
11562
|
+
/**
|
|
11563
|
+
* If `true`, the component is disabled.
|
|
11564
|
+
* @default false
|
|
11565
|
+
*/
|
|
11566
|
+
disabled: PropTypes.bool,
|
|
11567
|
+
/**
|
|
11568
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
11569
|
+
* @default false
|
|
11570
|
+
*/
|
|
11571
|
+
disableFocusRipple: PropTypes.bool,
|
|
11572
|
+
/**
|
|
11573
|
+
* If `true`, the ripple effect is disabled.
|
|
11574
|
+
*
|
|
11575
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
11576
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
11577
|
+
* @default false
|
|
11578
|
+
*/
|
|
11579
|
+
disableRipple: PropTypes.bool,
|
|
11580
|
+
/**
|
|
11581
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
11582
|
+
* side (this is often helpful for aligning the left or right
|
|
11583
|
+
* side of the icon with content above or below, without ruining the border
|
|
11584
|
+
* size and shape).
|
|
11585
|
+
* @default false
|
|
11586
|
+
*/
|
|
11587
|
+
edge: PropTypes.oneOf(["end", "start", false]),
|
|
11588
|
+
/**
|
|
11589
|
+
* @ignore
|
|
11590
|
+
*/
|
|
11591
|
+
id: PropTypes.string,
|
|
11592
|
+
/**
|
|
11593
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
11594
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
11595
|
+
* @default null
|
|
11596
|
+
*/
|
|
11597
|
+
loading: PropTypes.bool,
|
|
11598
|
+
/**
|
|
11599
|
+
* Element placed before the children if the button is in loading state.
|
|
11600
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
11601
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
11602
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
11603
|
+
*/
|
|
11604
|
+
loadingIndicator: PropTypes.node,
|
|
11605
|
+
/**
|
|
11606
|
+
* The size of the component.
|
|
11607
|
+
* `small` is equivalent to the dense button styling.
|
|
11608
|
+
* @default 'medium'
|
|
11609
|
+
*/
|
|
11610
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["small", "medium", "large"]), PropTypes.string]),
|
|
11611
|
+
/**
|
|
11612
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
11613
|
+
*/
|
|
11614
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
11615
|
+
};
|
|
11616
|
+
const SuccessOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11617
|
+
d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
|
|
11618
|
+
}), "SuccessOutlined");
|
|
11619
|
+
const ReportProblemOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11620
|
+
d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
|
|
11621
|
+
}), "ReportProblemOutlined");
|
|
11622
|
+
const ErrorOutlineIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11623
|
+
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
11624
|
+
}), "ErrorOutline");
|
|
11625
|
+
const InfoOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11626
|
+
d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
|
|
11627
|
+
}), "InfoOutlined");
|
|
11628
|
+
const ClearIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11629
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
11630
|
+
}), "Close");
|
|
11631
|
+
const useUtilityClasses$e = (ownerState) => {
|
|
11632
|
+
const {
|
|
11633
|
+
variant,
|
|
11634
|
+
color: color2,
|
|
11635
|
+
severity,
|
|
11636
|
+
classes
|
|
11637
|
+
} = ownerState;
|
|
11638
|
+
const slots = {
|
|
11639
|
+
root: ["root", `color${capitalize$1(color2 || severity)}`, `${variant}${capitalize$1(color2 || severity)}`, `${variant}`],
|
|
11640
|
+
icon: ["icon"],
|
|
11641
|
+
message: ["message"],
|
|
11642
|
+
action: ["action"]
|
|
11643
|
+
};
|
|
11644
|
+
return composeClasses(slots, getAlertUtilityClass, classes);
|
|
11645
|
+
};
|
|
11646
|
+
const AlertRoot = styled(Paper, {
|
|
11647
|
+
name: "MuiAlert",
|
|
11648
|
+
slot: "Root",
|
|
11649
|
+
overridesResolver: (props, styles2) => {
|
|
11650
|
+
const {
|
|
11651
|
+
ownerState
|
|
11652
|
+
} = props;
|
|
11653
|
+
return [styles2.root, styles2[ownerState.variant], styles2[`${ownerState.variant}${capitalize$1(ownerState.color || ownerState.severity)}`]];
|
|
11654
|
+
}
|
|
11655
|
+
})(memoTheme(({
|
|
11656
|
+
theme
|
|
11657
|
+
}) => {
|
|
11658
|
+
const getColor = theme.palette.mode === "light" ? darken : lighten;
|
|
11659
|
+
const getBackgroundColor = theme.palette.mode === "light" ? lighten : darken;
|
|
11660
|
+
return {
|
|
11661
|
+
...theme.typography.body2,
|
|
11662
|
+
backgroundColor: "transparent",
|
|
11663
|
+
display: "flex",
|
|
11664
|
+
padding: "6px 16px",
|
|
11665
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["light"])).map(([color2]) => ({
|
|
11666
|
+
props: {
|
|
11667
|
+
colorSeverity: color2,
|
|
11668
|
+
variant: "standard"
|
|
11669
|
+
},
|
|
11670
|
+
style: {
|
|
11671
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6),
|
|
11672
|
+
backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color2}StandardBg`] : getBackgroundColor(theme.palette[color2].light, 0.9),
|
|
11673
|
+
[`& .${alertClasses.icon}`]: theme.vars ? {
|
|
11674
|
+
color: theme.vars.palette.Alert[`${color2}IconColor`]
|
|
11675
|
+
} : {
|
|
11676
|
+
color: theme.palette[color2].main
|
|
11677
|
+
}
|
|
11678
|
+
}
|
|
11679
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["light"])).map(([color2]) => ({
|
|
11680
|
+
props: {
|
|
11681
|
+
colorSeverity: color2,
|
|
11682
|
+
variant: "outlined"
|
|
11683
|
+
},
|
|
11684
|
+
style: {
|
|
11685
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6),
|
|
11686
|
+
border: `1px solid ${(theme.vars || theme).palette[color2].light}`,
|
|
11687
|
+
[`& .${alertClasses.icon}`]: theme.vars ? {
|
|
11688
|
+
color: theme.vars.palette.Alert[`${color2}IconColor`]
|
|
11689
|
+
} : {
|
|
11690
|
+
color: theme.palette[color2].main
|
|
11691
|
+
}
|
|
11692
|
+
}
|
|
11693
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["dark"])).map(([color2]) => ({
|
|
11694
|
+
props: {
|
|
11695
|
+
colorSeverity: color2,
|
|
11696
|
+
variant: "filled"
|
|
11697
|
+
},
|
|
11698
|
+
style: {
|
|
11699
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
11700
|
+
...theme.vars ? {
|
|
11701
|
+
color: theme.vars.palette.Alert[`${color2}FilledColor`],
|
|
11702
|
+
backgroundColor: theme.vars.palette.Alert[`${color2}FilledBg`]
|
|
11703
|
+
} : {
|
|
11704
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette[color2].dark : theme.palette[color2].main,
|
|
11705
|
+
color: theme.palette.getContrastText(theme.palette[color2].main)
|
|
11706
|
+
}
|
|
11707
|
+
}
|
|
11708
|
+
}))]
|
|
11709
|
+
};
|
|
11710
|
+
}));
|
|
11711
|
+
const AlertIcon = styled("div", {
|
|
11712
|
+
name: "MuiAlert",
|
|
11713
|
+
slot: "Icon"
|
|
11714
|
+
})({
|
|
11715
|
+
marginRight: 12,
|
|
11716
|
+
padding: "7px 0",
|
|
11717
|
+
display: "flex",
|
|
11718
|
+
fontSize: 22,
|
|
11719
|
+
opacity: 0.9
|
|
11720
|
+
});
|
|
11721
|
+
const AlertMessage = styled("div", {
|
|
11722
|
+
name: "MuiAlert",
|
|
11723
|
+
slot: "Message"
|
|
11724
|
+
})({
|
|
11725
|
+
padding: "8px 0",
|
|
11726
|
+
minWidth: 0,
|
|
11727
|
+
overflow: "auto"
|
|
11728
|
+
});
|
|
11729
|
+
const AlertAction = styled("div", {
|
|
11730
|
+
name: "MuiAlert",
|
|
11731
|
+
slot: "Action"
|
|
11732
|
+
})({
|
|
11733
|
+
display: "flex",
|
|
11734
|
+
alignItems: "flex-start",
|
|
11735
|
+
padding: "4px 0 0 16px",
|
|
11736
|
+
marginLeft: "auto",
|
|
11737
|
+
marginRight: -8
|
|
11738
|
+
});
|
|
11739
|
+
const defaultIconMapping = {
|
|
11740
|
+
success: /* @__PURE__ */ jsxRuntimeExports.jsx(SuccessOutlinedIcon, {
|
|
11741
|
+
fontSize: "inherit"
|
|
11742
|
+
}),
|
|
11743
|
+
warning: /* @__PURE__ */ jsxRuntimeExports.jsx(ReportProblemOutlinedIcon, {
|
|
11744
|
+
fontSize: "inherit"
|
|
11745
|
+
}),
|
|
11746
|
+
error: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorOutlineIcon, {
|
|
11747
|
+
fontSize: "inherit"
|
|
11748
|
+
}),
|
|
11749
|
+
info: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoOutlinedIcon, {
|
|
11750
|
+
fontSize: "inherit"
|
|
11751
|
+
})
|
|
11752
|
+
};
|
|
11753
|
+
const Alert = /* @__PURE__ */ React$1.forwardRef(function Alert2(inProps, ref) {
|
|
11754
|
+
const props = useDefaultProps({
|
|
11755
|
+
props: inProps,
|
|
11756
|
+
name: "MuiAlert"
|
|
11757
|
+
});
|
|
11758
|
+
const {
|
|
11759
|
+
action,
|
|
11760
|
+
children,
|
|
11761
|
+
className,
|
|
11762
|
+
closeText = "Close",
|
|
11763
|
+
color: color2,
|
|
11764
|
+
components = {},
|
|
11765
|
+
componentsProps = {},
|
|
11766
|
+
icon,
|
|
11767
|
+
iconMapping = defaultIconMapping,
|
|
11768
|
+
onClose,
|
|
11769
|
+
role = "alert",
|
|
11770
|
+
severity = "success",
|
|
11771
|
+
slotProps = {},
|
|
11772
|
+
slots = {},
|
|
11773
|
+
variant = "standard",
|
|
11774
|
+
...other
|
|
11775
|
+
} = props;
|
|
11776
|
+
const ownerState = {
|
|
11777
|
+
...props,
|
|
11778
|
+
color: color2,
|
|
11779
|
+
severity,
|
|
11780
|
+
variant,
|
|
11781
|
+
colorSeverity: color2 || severity
|
|
11782
|
+
};
|
|
11783
|
+
const classes = useUtilityClasses$e(ownerState);
|
|
11784
|
+
const externalForwardedProps = {
|
|
11785
|
+
slots: {
|
|
11786
|
+
closeButton: components.CloseButton,
|
|
11787
|
+
closeIcon: components.CloseIcon,
|
|
11788
|
+
...slots
|
|
11789
|
+
},
|
|
11790
|
+
slotProps: {
|
|
11791
|
+
...componentsProps,
|
|
11792
|
+
...slotProps
|
|
11793
|
+
}
|
|
11794
|
+
};
|
|
11795
|
+
const [RootSlot, rootSlotProps] = useSlot("root", {
|
|
11796
|
+
ref,
|
|
11797
|
+
shouldForwardComponentProp: true,
|
|
11798
|
+
className: clsx$1(classes.root, className),
|
|
11799
|
+
elementType: AlertRoot,
|
|
11800
|
+
externalForwardedProps: {
|
|
11801
|
+
...externalForwardedProps,
|
|
11802
|
+
...other
|
|
11803
|
+
},
|
|
11804
|
+
ownerState,
|
|
11805
|
+
additionalProps: {
|
|
11806
|
+
role,
|
|
11807
|
+
elevation: 0
|
|
11808
|
+
}
|
|
11809
|
+
});
|
|
11810
|
+
const [IconSlot, iconSlotProps] = useSlot("icon", {
|
|
11811
|
+
className: classes.icon,
|
|
11812
|
+
elementType: AlertIcon,
|
|
11813
|
+
externalForwardedProps,
|
|
11814
|
+
ownerState
|
|
11815
|
+
});
|
|
11816
|
+
const [MessageSlot, messageSlotProps] = useSlot("message", {
|
|
11817
|
+
className: classes.message,
|
|
11818
|
+
elementType: AlertMessage,
|
|
11819
|
+
externalForwardedProps,
|
|
11820
|
+
ownerState
|
|
11821
|
+
});
|
|
11822
|
+
const [ActionSlot, actionSlotProps] = useSlot("action", {
|
|
11823
|
+
className: classes.action,
|
|
11824
|
+
elementType: AlertAction,
|
|
11825
|
+
externalForwardedProps,
|
|
11826
|
+
ownerState
|
|
11827
|
+
});
|
|
11828
|
+
const [CloseButtonSlot, closeButtonProps] = useSlot("closeButton", {
|
|
11829
|
+
elementType: IconButton,
|
|
11830
|
+
externalForwardedProps,
|
|
11831
|
+
ownerState
|
|
11832
|
+
});
|
|
11833
|
+
const [CloseIconSlot, closeIconProps] = useSlot("closeIcon", {
|
|
11834
|
+
elementType: ClearIcon,
|
|
11835
|
+
externalForwardedProps,
|
|
11836
|
+
ownerState
|
|
11837
|
+
});
|
|
11838
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
|
|
11839
|
+
...rootSlotProps,
|
|
11840
|
+
children: [icon !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconSlot, {
|
|
11841
|
+
...iconSlotProps,
|
|
11842
|
+
children: icon || iconMapping[severity] || defaultIconMapping[severity]
|
|
11843
|
+
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(MessageSlot, {
|
|
11844
|
+
...messageSlotProps,
|
|
11845
|
+
children
|
|
11846
|
+
}), action != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionSlot, {
|
|
11847
|
+
...actionSlotProps,
|
|
11848
|
+
children: action
|
|
11849
|
+
}) : null, action == null && onClose ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionSlot, {
|
|
11850
|
+
...actionSlotProps,
|
|
11851
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseButtonSlot, {
|
|
11852
|
+
size: "small",
|
|
11853
|
+
"aria-label": closeText,
|
|
11854
|
+
title: closeText,
|
|
11855
|
+
color: "inherit",
|
|
11856
|
+
onClick: onClose,
|
|
11857
|
+
...closeButtonProps,
|
|
11858
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIconSlot, {
|
|
11859
|
+
fontSize: "small",
|
|
11860
|
+
...closeIconProps
|
|
11861
|
+
})
|
|
11862
|
+
})
|
|
11863
|
+
}) : null]
|
|
11864
|
+
});
|
|
11865
|
+
});
|
|
11866
|
+
Alert.propTypes = {
|
|
11867
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
11868
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
11869
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
11870
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
11871
|
+
/**
|
|
11872
|
+
* The action to display. It renders after the message, at the end of the alert.
|
|
11873
|
+
*/
|
|
11874
|
+
action: PropTypes.node,
|
|
11875
|
+
/**
|
|
11876
|
+
* The content of the component.
|
|
11877
|
+
*/
|
|
11878
|
+
children: PropTypes.node,
|
|
11879
|
+
/**
|
|
11880
|
+
* Override or extend the styles applied to the component.
|
|
11881
|
+
*/
|
|
11882
|
+
classes: PropTypes.object,
|
|
11883
|
+
/**
|
|
11884
|
+
* @ignore
|
|
11885
|
+
*/
|
|
11886
|
+
className: PropTypes.string,
|
|
11887
|
+
/**
|
|
11888
|
+
* Override the default label for the *close popup* icon button.
|
|
11889
|
+
*
|
|
11890
|
+
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
11891
|
+
* @default 'Close'
|
|
11892
|
+
*/
|
|
11893
|
+
closeText: PropTypes.string,
|
|
11894
|
+
/**
|
|
11895
|
+
* The color of the component. Unless provided, the value is taken from the `severity` prop.
|
|
11896
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
11897
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
11898
|
+
*/
|
|
11899
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["error", "info", "success", "warning"]), PropTypes.string]),
|
|
11900
|
+
/**
|
|
11901
|
+
* The components used for each slot inside.
|
|
11902
|
+
*
|
|
11903
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
11904
|
+
*
|
|
11905
|
+
* @default {}
|
|
11906
|
+
*/
|
|
11907
|
+
components: PropTypes.shape({
|
|
11908
|
+
CloseButton: PropTypes.elementType,
|
|
11909
|
+
CloseIcon: PropTypes.elementType
|
|
11910
|
+
}),
|
|
11911
|
+
/**
|
|
11912
|
+
* The extra props for the slot components.
|
|
11913
|
+
* You can override the existing props or add new ones.
|
|
11914
|
+
*
|
|
11915
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
11916
|
+
*
|
|
11917
|
+
* @default {}
|
|
11918
|
+
*/
|
|
11919
|
+
componentsProps: PropTypes.shape({
|
|
11920
|
+
closeButton: PropTypes.object,
|
|
11921
|
+
closeIcon: PropTypes.object
|
|
11922
|
+
}),
|
|
11923
|
+
/**
|
|
11924
|
+
* Override the icon displayed before the children.
|
|
11925
|
+
* Unless provided, the icon is mapped to the value of the `severity` prop.
|
|
11926
|
+
* Set to `false` to remove the `icon`.
|
|
11927
|
+
*/
|
|
11928
|
+
icon: PropTypes.node,
|
|
11929
|
+
/**
|
|
11930
|
+
* The component maps the `severity` prop to a range of different icons,
|
|
11931
|
+
* for instance success to `<SuccessOutlined>`.
|
|
11932
|
+
* If you wish to change this mapping, you can provide your own.
|
|
11933
|
+
* Alternatively, you can use the `icon` prop to override the icon displayed.
|
|
11934
|
+
*/
|
|
11935
|
+
iconMapping: PropTypes.shape({
|
|
11936
|
+
error: PropTypes.node,
|
|
11937
|
+
info: PropTypes.node,
|
|
11938
|
+
success: PropTypes.node,
|
|
11939
|
+
warning: PropTypes.node
|
|
11940
|
+
}),
|
|
11941
|
+
/**
|
|
11942
|
+
* Callback fired when the component requests to be closed.
|
|
11943
|
+
* When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
|
|
11944
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
11945
|
+
*/
|
|
11946
|
+
onClose: PropTypes.func,
|
|
11947
|
+
/**
|
|
11948
|
+
* The ARIA role attribute of the element.
|
|
11949
|
+
* @default 'alert'
|
|
11950
|
+
*/
|
|
11951
|
+
role: PropTypes.string,
|
|
11952
|
+
/**
|
|
11953
|
+
* The severity of the alert. This defines the color and icon used.
|
|
11954
|
+
* @default 'success'
|
|
11955
|
+
*/
|
|
11956
|
+
severity: PropTypes.oneOfType([PropTypes.oneOf(["error", "info", "success", "warning"]), PropTypes.string]),
|
|
11957
|
+
/**
|
|
11958
|
+
* The props used for each slot inside.
|
|
11959
|
+
* @default {}
|
|
11960
|
+
*/
|
|
11961
|
+
slotProps: PropTypes.shape({
|
|
11962
|
+
action: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
11963
|
+
closeButton: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
11964
|
+
closeIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
11965
|
+
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
11966
|
+
message: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
11967
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
11968
|
+
}),
|
|
11969
|
+
/**
|
|
11970
|
+
* The components used for each slot inside.
|
|
11971
|
+
* @default {}
|
|
11972
|
+
*/
|
|
11973
|
+
slots: PropTypes.shape({
|
|
11974
|
+
action: PropTypes.elementType,
|
|
11975
|
+
closeButton: PropTypes.elementType,
|
|
11976
|
+
closeIcon: PropTypes.elementType,
|
|
11977
|
+
icon: PropTypes.elementType,
|
|
11978
|
+
message: PropTypes.elementType,
|
|
11979
|
+
root: PropTypes.elementType
|
|
11980
|
+
}),
|
|
11981
|
+
/**
|
|
11982
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
11983
|
+
*/
|
|
11984
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
11985
|
+
/**
|
|
11986
|
+
* The variant to use.
|
|
11987
|
+
* @default 'standard'
|
|
11988
|
+
*/
|
|
11989
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["filled", "outlined", "standard"]), PropTypes.string])
|
|
11990
|
+
};
|
|
10985
11991
|
function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
10986
11992
|
const propValue = props[propName];
|
|
10987
11993
|
const safePropName = propFullName || propName;
|
|
@@ -12465,7 +13471,7 @@ function isHTMLElement(element) {
|
|
|
12465
13471
|
function isVirtualElement(element) {
|
|
12466
13472
|
return !isHTMLElement(element);
|
|
12467
13473
|
}
|
|
12468
|
-
const useUtilityClasses$
|
|
13474
|
+
const useUtilityClasses$d = (ownerState) => {
|
|
12469
13475
|
const {
|
|
12470
13476
|
classes
|
|
12471
13477
|
} = ownerState;
|
|
@@ -12574,7 +13580,7 @@ const PopperTooltip = /* @__PURE__ */ React$1.forwardRef(function PopperTooltip2
|
|
|
12574
13580
|
if (TransitionProps !== null) {
|
|
12575
13581
|
childProps.TransitionProps = TransitionProps;
|
|
12576
13582
|
}
|
|
12577
|
-
const classes = useUtilityClasses$
|
|
13583
|
+
const classes = useUtilityClasses$d(props);
|
|
12578
13584
|
const Root = slots.root ?? "div";
|
|
12579
13585
|
const rootProps = useSlotProps({
|
|
12580
13586
|
elementType: Root,
|
|
@@ -12765,786 +13771,209 @@ Popper$2.propTypes = {
|
|
|
12765
13771
|
*/
|
|
12766
13772
|
popperRef: refType,
|
|
12767
13773
|
/**
|
|
12768
|
-
* The props used for each slot inside the Popper.
|
|
12769
|
-
* @default {}
|
|
12770
|
-
*/
|
|
12771
|
-
slotProps: PropTypes.shape({
|
|
12772
|
-
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
12773
|
-
}),
|
|
12774
|
-
/**
|
|
12775
|
-
* The components used for each slot inside the Popper.
|
|
12776
|
-
* Either a string to use a HTML element or a component.
|
|
12777
|
-
* @default {}
|
|
12778
|
-
*/
|
|
12779
|
-
slots: PropTypes.shape({
|
|
12780
|
-
root: PropTypes.elementType
|
|
12781
|
-
}),
|
|
12782
|
-
/**
|
|
12783
|
-
* Help supporting a react-transition-group/Transition component.
|
|
12784
|
-
* @default false
|
|
12785
|
-
*/
|
|
12786
|
-
transition: PropTypes.bool
|
|
12787
|
-
};
|
|
12788
|
-
const PopperRoot = styled(Popper$2, {
|
|
12789
|
-
name: "MuiPopper",
|
|
12790
|
-
slot: "Root"
|
|
12791
|
-
})({});
|
|
12792
|
-
const Popper$1 = /* @__PURE__ */ React$1.forwardRef(function Popper22(inProps, ref) {
|
|
12793
|
-
const isRtl = useRtl();
|
|
12794
|
-
const props = useDefaultProps({
|
|
12795
|
-
props: inProps,
|
|
12796
|
-
name: "MuiPopper"
|
|
12797
|
-
});
|
|
12798
|
-
const {
|
|
12799
|
-
anchorEl,
|
|
12800
|
-
component,
|
|
12801
|
-
components,
|
|
12802
|
-
componentsProps,
|
|
12803
|
-
container,
|
|
12804
|
-
disablePortal,
|
|
12805
|
-
keepMounted,
|
|
12806
|
-
modifiers: modifiers2,
|
|
12807
|
-
open,
|
|
12808
|
-
placement,
|
|
12809
|
-
popperOptions,
|
|
12810
|
-
popperRef,
|
|
12811
|
-
transition,
|
|
12812
|
-
slots,
|
|
12813
|
-
slotProps,
|
|
12814
|
-
...other
|
|
12815
|
-
} = props;
|
|
12816
|
-
const RootComponent = (slots == null ? void 0 : slots.root) ?? (components == null ? void 0 : components.Root);
|
|
12817
|
-
const otherProps = {
|
|
12818
|
-
anchorEl,
|
|
12819
|
-
container,
|
|
12820
|
-
disablePortal,
|
|
12821
|
-
keepMounted,
|
|
12822
|
-
modifiers: modifiers2,
|
|
12823
|
-
open,
|
|
12824
|
-
placement,
|
|
12825
|
-
popperOptions,
|
|
12826
|
-
popperRef,
|
|
12827
|
-
transition,
|
|
12828
|
-
...other
|
|
12829
|
-
};
|
|
12830
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PopperRoot, {
|
|
12831
|
-
as: component,
|
|
12832
|
-
direction: isRtl ? "rtl" : "ltr",
|
|
12833
|
-
slots: {
|
|
12834
|
-
root: RootComponent
|
|
12835
|
-
},
|
|
12836
|
-
slotProps: slotProps ?? componentsProps,
|
|
12837
|
-
...otherProps,
|
|
12838
|
-
ref
|
|
12839
|
-
});
|
|
12840
|
-
});
|
|
12841
|
-
Popper$1.propTypes = {
|
|
12842
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
12843
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
12844
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
12845
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
12846
|
-
/**
|
|
12847
|
-
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
12848
|
-
* or a function that returns either.
|
|
12849
|
-
* It's used to set the position of the popper.
|
|
12850
|
-
* The return value will passed as the reference object of the Popper instance.
|
|
12851
|
-
*/
|
|
12852
|
-
anchorEl: PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),
|
|
12853
|
-
/**
|
|
12854
|
-
* Popper render function or node.
|
|
12855
|
-
*/
|
|
12856
|
-
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
12857
|
-
/**
|
|
12858
|
-
* The component used for the root node.
|
|
12859
|
-
* Either a string to use a HTML element or a component.
|
|
12860
|
-
*/
|
|
12861
|
-
component: PropTypes.elementType,
|
|
12862
|
-
/**
|
|
12863
|
-
* The components used for each slot inside the Popper.
|
|
12864
|
-
* Either a string to use a HTML element or a component.
|
|
12865
|
-
*
|
|
12866
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
12867
|
-
* @default {}
|
|
12868
|
-
*/
|
|
12869
|
-
components: PropTypes.shape({
|
|
12870
|
-
Root: PropTypes.elementType
|
|
12871
|
-
}),
|
|
12872
|
-
/**
|
|
12873
|
-
* The props used for each slot inside the Popper.
|
|
12874
|
-
*
|
|
12875
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
12876
|
-
* @default {}
|
|
12877
|
-
*/
|
|
12878
|
-
componentsProps: PropTypes.shape({
|
|
12879
|
-
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
12880
|
-
}),
|
|
12881
|
-
/**
|
|
12882
|
-
* An HTML element or function that returns one.
|
|
12883
|
-
* The `container` will have the portal children appended to it.
|
|
12884
|
-
*
|
|
12885
|
-
* You can also provide a callback, which is called in a React layout effect.
|
|
12886
|
-
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
12887
|
-
*
|
|
12888
|
-
* By default, it uses the body of the top-level document object,
|
|
12889
|
-
* so it's simply `document.body` most of the time.
|
|
12890
|
-
*/
|
|
12891
|
-
container: PropTypes.oneOfType([HTMLElementType, PropTypes.func]),
|
|
12892
|
-
/**
|
|
12893
|
-
* The `children` will be under the DOM hierarchy of the parent component.
|
|
12894
|
-
* @default false
|
|
12895
|
-
*/
|
|
12896
|
-
disablePortal: PropTypes.bool,
|
|
12897
|
-
/**
|
|
12898
|
-
* Always keep the children in the DOM.
|
|
12899
|
-
* This prop can be useful in SEO situation or
|
|
12900
|
-
* when you want to maximize the responsiveness of the Popper.
|
|
12901
|
-
* @default false
|
|
12902
|
-
*/
|
|
12903
|
-
keepMounted: PropTypes.bool,
|
|
12904
|
-
/**
|
|
12905
|
-
* Popper.js is based on a "plugin-like" architecture,
|
|
12906
|
-
* most of its features are fully encapsulated "modifiers".
|
|
12907
|
-
*
|
|
12908
|
-
* A modifier is a function that is called each time Popper.js needs to
|
|
12909
|
-
* compute the position of the popper.
|
|
12910
|
-
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
12911
|
-
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
12912
|
-
*/
|
|
12913
|
-
modifiers: PropTypes.arrayOf(PropTypes.shape({
|
|
12914
|
-
data: PropTypes.object,
|
|
12915
|
-
effect: PropTypes.func,
|
|
12916
|
-
enabled: PropTypes.bool,
|
|
12917
|
-
fn: PropTypes.func,
|
|
12918
|
-
name: PropTypes.any,
|
|
12919
|
-
options: PropTypes.object,
|
|
12920
|
-
phase: PropTypes.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
12921
|
-
requires: PropTypes.arrayOf(PropTypes.string),
|
|
12922
|
-
requiresIfExists: PropTypes.arrayOf(PropTypes.string)
|
|
12923
|
-
})),
|
|
12924
|
-
/**
|
|
12925
|
-
* If `true`, the component is shown.
|
|
12926
|
-
*/
|
|
12927
|
-
open: PropTypes.bool.isRequired,
|
|
12928
|
-
/**
|
|
12929
|
-
* Popper placement.
|
|
12930
|
-
* @default 'bottom'
|
|
12931
|
-
*/
|
|
12932
|
-
placement: PropTypes.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
12933
|
-
/**
|
|
12934
|
-
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
12935
|
-
* @default {}
|
|
12936
|
-
*/
|
|
12937
|
-
popperOptions: PropTypes.shape({
|
|
12938
|
-
modifiers: PropTypes.array,
|
|
12939
|
-
onFirstUpdate: PropTypes.func,
|
|
12940
|
-
placement: PropTypes.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
12941
|
-
strategy: PropTypes.oneOf(["absolute", "fixed"])
|
|
12942
|
-
}),
|
|
12943
|
-
/**
|
|
12944
|
-
* A ref that points to the used popper instance.
|
|
12945
|
-
*/
|
|
12946
|
-
popperRef: refType,
|
|
12947
|
-
/**
|
|
12948
|
-
* The props used for each slot inside the Popper.
|
|
12949
|
-
* @default {}
|
|
12950
|
-
*/
|
|
12951
|
-
slotProps: PropTypes.shape({
|
|
12952
|
-
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
12953
|
-
}),
|
|
12954
|
-
/**
|
|
12955
|
-
* The components used for each slot inside the Popper.
|
|
12956
|
-
* Either a string to use a HTML element or a component.
|
|
12957
|
-
* @default {}
|
|
12958
|
-
*/
|
|
12959
|
-
slots: PropTypes.shape({
|
|
12960
|
-
root: PropTypes.elementType
|
|
12961
|
-
}),
|
|
12962
|
-
/**
|
|
12963
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
12964
|
-
*/
|
|
12965
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
12966
|
-
/**
|
|
12967
|
-
* Help supporting a react-transition-group/Transition component.
|
|
12968
|
-
* @default false
|
|
12969
|
-
*/
|
|
12970
|
-
transition: PropTypes.bool
|
|
12971
|
-
};
|
|
12972
|
-
function hasCorrectMainProperty(obj) {
|
|
12973
|
-
return typeof obj.main === "string";
|
|
12974
|
-
}
|
|
12975
|
-
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
12976
|
-
if (!hasCorrectMainProperty(obj)) {
|
|
12977
|
-
return false;
|
|
12978
|
-
}
|
|
12979
|
-
for (const value of additionalPropertiesToCheck) {
|
|
12980
|
-
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
12981
|
-
return false;
|
|
12982
|
-
}
|
|
12983
|
-
}
|
|
12984
|
-
return true;
|
|
12985
|
-
}
|
|
12986
|
-
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
12987
|
-
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
12988
|
-
}
|
|
12989
|
-
function getCircularProgressUtilityClass(slot) {
|
|
12990
|
-
return generateUtilityClass("MuiCircularProgress", slot);
|
|
12991
|
-
}
|
|
12992
|
-
generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
12993
|
-
const SIZE = 44;
|
|
12994
|
-
const circularRotateKeyframe = keyframes`
|
|
12995
|
-
0% {
|
|
12996
|
-
transform: rotate(0deg);
|
|
12997
|
-
}
|
|
12998
|
-
|
|
12999
|
-
100% {
|
|
13000
|
-
transform: rotate(360deg);
|
|
13001
|
-
}
|
|
13002
|
-
`;
|
|
13003
|
-
const circularDashKeyframe = keyframes`
|
|
13004
|
-
0% {
|
|
13005
|
-
stroke-dasharray: 1px, 200px;
|
|
13006
|
-
stroke-dashoffset: 0;
|
|
13007
|
-
}
|
|
13008
|
-
|
|
13009
|
-
50% {
|
|
13010
|
-
stroke-dasharray: 100px, 200px;
|
|
13011
|
-
stroke-dashoffset: -15px;
|
|
13012
|
-
}
|
|
13013
|
-
|
|
13014
|
-
100% {
|
|
13015
|
-
stroke-dasharray: 1px, 200px;
|
|
13016
|
-
stroke-dashoffset: -126px;
|
|
13017
|
-
}
|
|
13018
|
-
`;
|
|
13019
|
-
const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css`
|
|
13020
|
-
animation: ${circularRotateKeyframe} 1.4s linear infinite;
|
|
13021
|
-
` : null;
|
|
13022
|
-
const dashAnimation = typeof circularDashKeyframe !== "string" ? css`
|
|
13023
|
-
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
13024
|
-
` : null;
|
|
13025
|
-
const useUtilityClasses$e = (ownerState) => {
|
|
13026
|
-
const {
|
|
13027
|
-
classes,
|
|
13028
|
-
variant,
|
|
13029
|
-
color: color2,
|
|
13030
|
-
disableShrink
|
|
13031
|
-
} = ownerState;
|
|
13032
|
-
const slots = {
|
|
13033
|
-
root: ["root", variant, `color${capitalize$1(color2)}`],
|
|
13034
|
-
svg: ["svg"],
|
|
13035
|
-
circle: ["circle", `circle${capitalize$1(variant)}`, disableShrink && "circleDisableShrink"]
|
|
13036
|
-
};
|
|
13037
|
-
return composeClasses(slots, getCircularProgressUtilityClass, classes);
|
|
13038
|
-
};
|
|
13039
|
-
const CircularProgressRoot = styled("span", {
|
|
13040
|
-
name: "MuiCircularProgress",
|
|
13041
|
-
slot: "Root",
|
|
13042
|
-
overridesResolver: (props, styles2) => {
|
|
13043
|
-
const {
|
|
13044
|
-
ownerState
|
|
13045
|
-
} = props;
|
|
13046
|
-
return [styles2.root, styles2[ownerState.variant], styles2[`color${capitalize$1(ownerState.color)}`]];
|
|
13047
|
-
}
|
|
13048
|
-
})(memoTheme(({
|
|
13049
|
-
theme
|
|
13050
|
-
}) => ({
|
|
13051
|
-
display: "inline-block",
|
|
13052
|
-
variants: [{
|
|
13053
|
-
props: {
|
|
13054
|
-
variant: "determinate"
|
|
13055
|
-
},
|
|
13056
|
-
style: {
|
|
13057
|
-
transition: theme.transitions.create("transform")
|
|
13058
|
-
}
|
|
13059
|
-
}, {
|
|
13060
|
-
props: {
|
|
13061
|
-
variant: "indeterminate"
|
|
13062
|
-
},
|
|
13063
|
-
style: rotateAnimation || {
|
|
13064
|
-
animation: `${circularRotateKeyframe} 1.4s linear infinite`
|
|
13065
|
-
}
|
|
13066
|
-
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
13067
|
-
props: {
|
|
13068
|
-
color: color2
|
|
13069
|
-
},
|
|
13070
|
-
style: {
|
|
13071
|
-
color: (theme.vars || theme).palette[color2].main
|
|
13072
|
-
}
|
|
13073
|
-
}))]
|
|
13074
|
-
})));
|
|
13075
|
-
const CircularProgressSVG = styled("svg", {
|
|
13076
|
-
name: "MuiCircularProgress",
|
|
13077
|
-
slot: "Svg"
|
|
13078
|
-
})({
|
|
13079
|
-
display: "block"
|
|
13080
|
-
// Keeps the progress centered
|
|
13081
|
-
});
|
|
13082
|
-
const CircularProgressCircle = styled("circle", {
|
|
13083
|
-
name: "MuiCircularProgress",
|
|
13084
|
-
slot: "Circle",
|
|
13085
|
-
overridesResolver: (props, styles2) => {
|
|
13086
|
-
const {
|
|
13087
|
-
ownerState
|
|
13088
|
-
} = props;
|
|
13089
|
-
return [styles2.circle, styles2[`circle${capitalize$1(ownerState.variant)}`], ownerState.disableShrink && styles2.circleDisableShrink];
|
|
13090
|
-
}
|
|
13091
|
-
})(memoTheme(({
|
|
13092
|
-
theme
|
|
13093
|
-
}) => ({
|
|
13094
|
-
stroke: "currentColor",
|
|
13095
|
-
variants: [{
|
|
13096
|
-
props: {
|
|
13097
|
-
variant: "determinate"
|
|
13098
|
-
},
|
|
13099
|
-
style: {
|
|
13100
|
-
transition: theme.transitions.create("stroke-dashoffset")
|
|
13101
|
-
}
|
|
13102
|
-
}, {
|
|
13103
|
-
props: {
|
|
13104
|
-
variant: "indeterminate"
|
|
13105
|
-
},
|
|
13106
|
-
style: {
|
|
13107
|
-
// Some default value that looks fine waiting for the animation to kicks in.
|
|
13108
|
-
strokeDasharray: "80px, 200px",
|
|
13109
|
-
strokeDashoffset: 0
|
|
13110
|
-
// Add the unit to fix a Edge 16 and below bug.
|
|
13111
|
-
}
|
|
13112
|
-
}, {
|
|
13113
|
-
props: ({
|
|
13114
|
-
ownerState
|
|
13115
|
-
}) => ownerState.variant === "indeterminate" && !ownerState.disableShrink,
|
|
13116
|
-
style: dashAnimation || {
|
|
13117
|
-
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
13118
|
-
animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`
|
|
13119
|
-
}
|
|
13120
|
-
}]
|
|
13121
|
-
})));
|
|
13122
|
-
const CircularProgress = /* @__PURE__ */ React$1.forwardRef(function CircularProgress2(inProps, ref) {
|
|
13123
|
-
const props = useDefaultProps({
|
|
13124
|
-
props: inProps,
|
|
13125
|
-
name: "MuiCircularProgress"
|
|
13126
|
-
});
|
|
13127
|
-
const {
|
|
13128
|
-
className,
|
|
13129
|
-
color: color2 = "primary",
|
|
13130
|
-
disableShrink = false,
|
|
13131
|
-
size = 40,
|
|
13132
|
-
style: style2,
|
|
13133
|
-
thickness = 3.6,
|
|
13134
|
-
value = 0,
|
|
13135
|
-
variant = "indeterminate",
|
|
13136
|
-
...other
|
|
13137
|
-
} = props;
|
|
13138
|
-
const ownerState = {
|
|
13139
|
-
...props,
|
|
13140
|
-
color: color2,
|
|
13141
|
-
disableShrink,
|
|
13142
|
-
size,
|
|
13143
|
-
thickness,
|
|
13144
|
-
value,
|
|
13145
|
-
variant
|
|
13146
|
-
};
|
|
13147
|
-
const classes = useUtilityClasses$e(ownerState);
|
|
13148
|
-
const circleStyle = {};
|
|
13149
|
-
const rootStyle = {};
|
|
13150
|
-
const rootProps = {};
|
|
13151
|
-
if (variant === "determinate") {
|
|
13152
|
-
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
13153
|
-
circleStyle.strokeDasharray = circumference.toFixed(3);
|
|
13154
|
-
rootProps["aria-valuenow"] = Math.round(value);
|
|
13155
|
-
circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
|
|
13156
|
-
rootStyle.transform = "rotate(-90deg)";
|
|
13157
|
-
}
|
|
13158
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, {
|
|
13159
|
-
className: clsx$1(classes.root, className),
|
|
13160
|
-
style: {
|
|
13161
|
-
width: size,
|
|
13162
|
-
height: size,
|
|
13163
|
-
...rootStyle,
|
|
13164
|
-
...style2
|
|
13165
|
-
},
|
|
13166
|
-
ownerState,
|
|
13167
|
-
ref,
|
|
13168
|
-
role: "progressbar",
|
|
13169
|
-
...rootProps,
|
|
13170
|
-
...other,
|
|
13171
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressSVG, {
|
|
13172
|
-
className: classes.svg,
|
|
13173
|
-
ownerState,
|
|
13174
|
-
viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
|
|
13175
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressCircle, {
|
|
13176
|
-
className: classes.circle,
|
|
13177
|
-
style: circleStyle,
|
|
13178
|
-
ownerState,
|
|
13179
|
-
cx: SIZE,
|
|
13180
|
-
cy: SIZE,
|
|
13181
|
-
r: (SIZE - thickness) / 2,
|
|
13182
|
-
fill: "none",
|
|
13183
|
-
strokeWidth: thickness
|
|
13184
|
-
})
|
|
13185
|
-
})
|
|
13186
|
-
});
|
|
13187
|
-
});
|
|
13188
|
-
CircularProgress.propTypes = {
|
|
13189
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
13190
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
13191
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
13192
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
13193
|
-
/**
|
|
13194
|
-
* Override or extend the styles applied to the component.
|
|
13195
|
-
*/
|
|
13196
|
-
classes: PropTypes.object,
|
|
13197
|
-
/**
|
|
13198
|
-
* @ignore
|
|
13199
|
-
*/
|
|
13200
|
-
className: PropTypes.string,
|
|
13201
|
-
/**
|
|
13202
|
-
* The color of the component.
|
|
13203
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
13204
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
13205
|
-
* @default 'primary'
|
|
13206
|
-
*/
|
|
13207
|
-
color: PropTypes.oneOfType([PropTypes.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), PropTypes.string]),
|
|
13208
|
-
/**
|
|
13209
|
-
* If `true`, the shrink animation is disabled.
|
|
13210
|
-
* This only works if variant is `indeterminate`.
|
|
13211
|
-
* @default false
|
|
13212
|
-
*/
|
|
13213
|
-
disableShrink: chainPropTypes(PropTypes.bool, (props) => {
|
|
13214
|
-
if (props.disableShrink && props.variant && props.variant !== "indeterminate") {
|
|
13215
|
-
return new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.");
|
|
13216
|
-
}
|
|
13217
|
-
return null;
|
|
13218
|
-
}),
|
|
13219
|
-
/**
|
|
13220
|
-
* The size of the component.
|
|
13221
|
-
* If using a number, the pixel unit is assumed.
|
|
13222
|
-
* If using a string, you need to provide the CSS unit, for example '3rem'.
|
|
13223
|
-
* @default 40
|
|
13224
|
-
*/
|
|
13225
|
-
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
13226
|
-
/**
|
|
13227
|
-
* @ignore
|
|
13228
|
-
*/
|
|
13229
|
-
style: PropTypes.object,
|
|
13230
|
-
/**
|
|
13231
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
13232
|
-
*/
|
|
13233
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
13234
|
-
/**
|
|
13235
|
-
* The thickness of the circle.
|
|
13236
|
-
* @default 3.6
|
|
13774
|
+
* The props used for each slot inside the Popper.
|
|
13775
|
+
* @default {}
|
|
13237
13776
|
*/
|
|
13238
|
-
|
|
13777
|
+
slotProps: PropTypes.shape({
|
|
13778
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
13779
|
+
}),
|
|
13239
13780
|
/**
|
|
13240
|
-
* The
|
|
13241
|
-
*
|
|
13242
|
-
* @default
|
|
13781
|
+
* The components used for each slot inside the Popper.
|
|
13782
|
+
* Either a string to use a HTML element or a component.
|
|
13783
|
+
* @default {}
|
|
13243
13784
|
*/
|
|
13244
|
-
|
|
13785
|
+
slots: PropTypes.shape({
|
|
13786
|
+
root: PropTypes.elementType
|
|
13787
|
+
}),
|
|
13245
13788
|
/**
|
|
13246
|
-
*
|
|
13247
|
-
*
|
|
13248
|
-
* @default 'indeterminate'
|
|
13789
|
+
* Help supporting a react-transition-group/Transition component.
|
|
13790
|
+
* @default false
|
|
13249
13791
|
*/
|
|
13250
|
-
|
|
13251
|
-
};
|
|
13252
|
-
function getIconButtonUtilityClass(slot) {
|
|
13253
|
-
return generateUtilityClass("MuiIconButton", slot);
|
|
13254
|
-
}
|
|
13255
|
-
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
13256
|
-
const useUtilityClasses$d = (ownerState) => {
|
|
13257
|
-
const {
|
|
13258
|
-
classes,
|
|
13259
|
-
disabled,
|
|
13260
|
-
color: color2,
|
|
13261
|
-
edge,
|
|
13262
|
-
size,
|
|
13263
|
-
loading
|
|
13264
|
-
} = ownerState;
|
|
13265
|
-
const slots = {
|
|
13266
|
-
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(size)}`],
|
|
13267
|
-
loadingIndicator: ["loadingIndicator"],
|
|
13268
|
-
loadingWrapper: ["loadingWrapper"]
|
|
13269
|
-
};
|
|
13270
|
-
return composeClasses(slots, getIconButtonUtilityClass, classes);
|
|
13792
|
+
transition: PropTypes.bool
|
|
13271
13793
|
};
|
|
13272
|
-
const
|
|
13273
|
-
name: "
|
|
13274
|
-
slot: "Root"
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
} = props;
|
|
13279
|
-
return [styles2.root, ownerState.loading && styles2.loading, ownerState.color !== "default" && styles2[`color${capitalize$1(ownerState.color)}`], ownerState.edge && styles2[`edge${capitalize$1(ownerState.edge)}`], styles2[`size${capitalize$1(ownerState.size)}`]];
|
|
13280
|
-
}
|
|
13281
|
-
})(memoTheme(({
|
|
13282
|
-
theme
|
|
13283
|
-
}) => ({
|
|
13284
|
-
textAlign: "center",
|
|
13285
|
-
flex: "0 0 auto",
|
|
13286
|
-
fontSize: theme.typography.pxToRem(24),
|
|
13287
|
-
padding: 8,
|
|
13288
|
-
borderRadius: "50%",
|
|
13289
|
-
color: (theme.vars || theme).palette.action.active,
|
|
13290
|
-
transition: theme.transitions.create("background-color", {
|
|
13291
|
-
duration: theme.transitions.duration.shortest
|
|
13292
|
-
}),
|
|
13293
|
-
variants: [{
|
|
13294
|
-
props: (props) => !props.disableRipple,
|
|
13295
|
-
style: {
|
|
13296
|
-
"--IconButton-hoverBg": theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
13297
|
-
"&:hover": {
|
|
13298
|
-
backgroundColor: "var(--IconButton-hoverBg)",
|
|
13299
|
-
// Reset on touch devices, it doesn't add specificity
|
|
13300
|
-
"@media (hover: none)": {
|
|
13301
|
-
backgroundColor: "transparent"
|
|
13302
|
-
}
|
|
13303
|
-
}
|
|
13304
|
-
}
|
|
13305
|
-
}, {
|
|
13306
|
-
props: {
|
|
13307
|
-
edge: "start"
|
|
13308
|
-
},
|
|
13309
|
-
style: {
|
|
13310
|
-
marginLeft: -12
|
|
13311
|
-
}
|
|
13312
|
-
}, {
|
|
13313
|
-
props: {
|
|
13314
|
-
edge: "start",
|
|
13315
|
-
size: "small"
|
|
13316
|
-
},
|
|
13317
|
-
style: {
|
|
13318
|
-
marginLeft: -3
|
|
13319
|
-
}
|
|
13320
|
-
}, {
|
|
13321
|
-
props: {
|
|
13322
|
-
edge: "end"
|
|
13323
|
-
},
|
|
13324
|
-
style: {
|
|
13325
|
-
marginRight: -12
|
|
13326
|
-
}
|
|
13327
|
-
}, {
|
|
13328
|
-
props: {
|
|
13329
|
-
edge: "end",
|
|
13330
|
-
size: "small"
|
|
13331
|
-
},
|
|
13332
|
-
style: {
|
|
13333
|
-
marginRight: -3
|
|
13334
|
-
}
|
|
13335
|
-
}]
|
|
13336
|
-
})), memoTheme(({
|
|
13337
|
-
theme
|
|
13338
|
-
}) => ({
|
|
13339
|
-
variants: [{
|
|
13340
|
-
props: {
|
|
13341
|
-
color: "inherit"
|
|
13342
|
-
},
|
|
13343
|
-
style: {
|
|
13344
|
-
color: "inherit"
|
|
13345
|
-
}
|
|
13346
|
-
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
13347
|
-
props: {
|
|
13348
|
-
color: color2
|
|
13349
|
-
},
|
|
13350
|
-
style: {
|
|
13351
|
-
color: (theme.vars || theme).palette[color2].main
|
|
13352
|
-
}
|
|
13353
|
-
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
13354
|
-
props: {
|
|
13355
|
-
color: color2
|
|
13356
|
-
},
|
|
13357
|
-
style: {
|
|
13358
|
-
"--IconButton-hoverBg": theme.vars ? `rgba(${(theme.vars || theme).palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color2].main, theme.palette.action.hoverOpacity)
|
|
13359
|
-
}
|
|
13360
|
-
})), {
|
|
13361
|
-
props: {
|
|
13362
|
-
size: "small"
|
|
13363
|
-
},
|
|
13364
|
-
style: {
|
|
13365
|
-
padding: 5,
|
|
13366
|
-
fontSize: theme.typography.pxToRem(18)
|
|
13367
|
-
}
|
|
13368
|
-
}, {
|
|
13369
|
-
props: {
|
|
13370
|
-
size: "large"
|
|
13371
|
-
},
|
|
13372
|
-
style: {
|
|
13373
|
-
padding: 12,
|
|
13374
|
-
fontSize: theme.typography.pxToRem(28)
|
|
13375
|
-
}
|
|
13376
|
-
}],
|
|
13377
|
-
[`&.${iconButtonClasses.disabled}`]: {
|
|
13378
|
-
backgroundColor: "transparent",
|
|
13379
|
-
color: (theme.vars || theme).palette.action.disabled
|
|
13380
|
-
},
|
|
13381
|
-
[`&.${iconButtonClasses.loading}`]: {
|
|
13382
|
-
color: "transparent"
|
|
13383
|
-
}
|
|
13384
|
-
})));
|
|
13385
|
-
const IconButtonLoadingIndicator = styled("span", {
|
|
13386
|
-
name: "MuiIconButton",
|
|
13387
|
-
slot: "LoadingIndicator"
|
|
13388
|
-
})(({
|
|
13389
|
-
theme
|
|
13390
|
-
}) => ({
|
|
13391
|
-
display: "none",
|
|
13392
|
-
position: "absolute",
|
|
13393
|
-
visibility: "visible",
|
|
13394
|
-
top: "50%",
|
|
13395
|
-
left: "50%",
|
|
13396
|
-
transform: "translate(-50%, -50%)",
|
|
13397
|
-
color: (theme.vars || theme).palette.action.disabled,
|
|
13398
|
-
variants: [{
|
|
13399
|
-
props: {
|
|
13400
|
-
loading: true
|
|
13401
|
-
},
|
|
13402
|
-
style: {
|
|
13403
|
-
display: "flex"
|
|
13404
|
-
}
|
|
13405
|
-
}]
|
|
13406
|
-
}));
|
|
13407
|
-
const IconButton = /* @__PURE__ */ React$1.forwardRef(function IconButton2(inProps, ref) {
|
|
13794
|
+
const PopperRoot = styled(Popper$2, {
|
|
13795
|
+
name: "MuiPopper",
|
|
13796
|
+
slot: "Root"
|
|
13797
|
+
})({});
|
|
13798
|
+
const Popper$1 = /* @__PURE__ */ React$1.forwardRef(function Popper22(inProps, ref) {
|
|
13799
|
+
const isRtl = useRtl();
|
|
13408
13800
|
const props = useDefaultProps({
|
|
13409
13801
|
props: inProps,
|
|
13410
|
-
name: "
|
|
13802
|
+
name: "MuiPopper"
|
|
13411
13803
|
});
|
|
13412
13804
|
const {
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
|
|
13422
|
-
|
|
13805
|
+
anchorEl,
|
|
13806
|
+
component,
|
|
13807
|
+
components,
|
|
13808
|
+
componentsProps,
|
|
13809
|
+
container,
|
|
13810
|
+
disablePortal,
|
|
13811
|
+
keepMounted,
|
|
13812
|
+
modifiers: modifiers2,
|
|
13813
|
+
open,
|
|
13814
|
+
placement,
|
|
13815
|
+
popperOptions,
|
|
13816
|
+
popperRef,
|
|
13817
|
+
transition,
|
|
13818
|
+
slots,
|
|
13819
|
+
slotProps,
|
|
13423
13820
|
...other
|
|
13424
13821
|
} = props;
|
|
13425
|
-
const
|
|
13426
|
-
const
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
loadingIndicator,
|
|
13439
|
-
size
|
|
13822
|
+
const RootComponent = (slots == null ? void 0 : slots.root) ?? (components == null ? void 0 : components.Root);
|
|
13823
|
+
const otherProps = {
|
|
13824
|
+
anchorEl,
|
|
13825
|
+
container,
|
|
13826
|
+
disablePortal,
|
|
13827
|
+
keepMounted,
|
|
13828
|
+
modifiers: modifiers2,
|
|
13829
|
+
open,
|
|
13830
|
+
placement,
|
|
13831
|
+
popperOptions,
|
|
13832
|
+
popperRef,
|
|
13833
|
+
transition,
|
|
13834
|
+
...other
|
|
13440
13835
|
};
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
|
|
13449
|
-
|
|
13450
|
-
ownerState,
|
|
13451
|
-
children: [typeof loading === "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
13452
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
13453
|
-
className: classes.loadingWrapper,
|
|
13454
|
-
style: {
|
|
13455
|
-
display: "contents"
|
|
13456
|
-
},
|
|
13457
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButtonLoadingIndicator, {
|
|
13458
|
-
className: classes.loadingIndicator,
|
|
13459
|
-
ownerState,
|
|
13460
|
-
children: loading && loadingIndicator
|
|
13461
|
-
})
|
|
13462
|
-
}), children]
|
|
13836
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PopperRoot, {
|
|
13837
|
+
as: component,
|
|
13838
|
+
direction: isRtl ? "rtl" : "ltr",
|
|
13839
|
+
slots: {
|
|
13840
|
+
root: RootComponent
|
|
13841
|
+
},
|
|
13842
|
+
slotProps: slotProps ?? componentsProps,
|
|
13843
|
+
...otherProps,
|
|
13844
|
+
ref
|
|
13463
13845
|
});
|
|
13464
13846
|
});
|
|
13465
|
-
|
|
13847
|
+
Popper$1.propTypes = {
|
|
13466
13848
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
13467
13849
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
13468
|
-
// │
|
|
13850
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
13469
13851
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
13470
13852
|
/**
|
|
13471
|
-
*
|
|
13853
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
13854
|
+
* or a function that returns either.
|
|
13855
|
+
* It's used to set the position of the popper.
|
|
13856
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
13472
13857
|
*/
|
|
13473
|
-
|
|
13474
|
-
const found = React$1.Children.toArray(props.children).some((child) => /* @__PURE__ */ React$1.isValidElement(child) && child.props.onClick);
|
|
13475
|
-
if (found) {
|
|
13476
|
-
return new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join("\n"));
|
|
13477
|
-
}
|
|
13478
|
-
return null;
|
|
13479
|
-
}),
|
|
13858
|
+
anchorEl: PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),
|
|
13480
13859
|
/**
|
|
13481
|
-
*
|
|
13860
|
+
* Popper render function or node.
|
|
13482
13861
|
*/
|
|
13483
|
-
|
|
13862
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
13484
13863
|
/**
|
|
13485
|
-
*
|
|
13864
|
+
* The component used for the root node.
|
|
13865
|
+
* Either a string to use a HTML element or a component.
|
|
13486
13866
|
*/
|
|
13487
|
-
|
|
13867
|
+
component: PropTypes.elementType,
|
|
13488
13868
|
/**
|
|
13489
|
-
* The
|
|
13490
|
-
*
|
|
13491
|
-
*
|
|
13492
|
-
* @
|
|
13869
|
+
* The components used for each slot inside the Popper.
|
|
13870
|
+
* Either a string to use a HTML element or a component.
|
|
13871
|
+
*
|
|
13872
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
13873
|
+
* @default {}
|
|
13493
13874
|
*/
|
|
13494
|
-
|
|
13875
|
+
components: PropTypes.shape({
|
|
13876
|
+
Root: PropTypes.elementType
|
|
13877
|
+
}),
|
|
13495
13878
|
/**
|
|
13496
|
-
*
|
|
13879
|
+
* The props used for each slot inside the Popper.
|
|
13880
|
+
*
|
|
13881
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
13882
|
+
* @default {}
|
|
13883
|
+
*/
|
|
13884
|
+
componentsProps: PropTypes.shape({
|
|
13885
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
13886
|
+
}),
|
|
13887
|
+
/**
|
|
13888
|
+
* An HTML element or function that returns one.
|
|
13889
|
+
* The `container` will have the portal children appended to it.
|
|
13890
|
+
*
|
|
13891
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
13892
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
13893
|
+
*
|
|
13894
|
+
* By default, it uses the body of the top-level document object,
|
|
13895
|
+
* so it's simply `document.body` most of the time.
|
|
13896
|
+
*/
|
|
13897
|
+
container: PropTypes.oneOfType([HTMLElementType, PropTypes.func]),
|
|
13898
|
+
/**
|
|
13899
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
13497
13900
|
* @default false
|
|
13498
13901
|
*/
|
|
13499
|
-
|
|
13902
|
+
disablePortal: PropTypes.bool,
|
|
13500
13903
|
/**
|
|
13501
|
-
*
|
|
13904
|
+
* Always keep the children in the DOM.
|
|
13905
|
+
* This prop can be useful in SEO situation or
|
|
13906
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
13502
13907
|
* @default false
|
|
13503
13908
|
*/
|
|
13504
|
-
|
|
13909
|
+
keepMounted: PropTypes.bool,
|
|
13505
13910
|
/**
|
|
13506
|
-
*
|
|
13911
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
13912
|
+
* most of its features are fully encapsulated "modifiers".
|
|
13507
13913
|
*
|
|
13508
|
-
*
|
|
13509
|
-
*
|
|
13510
|
-
*
|
|
13914
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
13915
|
+
* compute the position of the popper.
|
|
13916
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
13917
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
13511
13918
|
*/
|
|
13512
|
-
|
|
13919
|
+
modifiers: PropTypes.arrayOf(PropTypes.shape({
|
|
13920
|
+
data: PropTypes.object,
|
|
13921
|
+
effect: PropTypes.func,
|
|
13922
|
+
enabled: PropTypes.bool,
|
|
13923
|
+
fn: PropTypes.func,
|
|
13924
|
+
name: PropTypes.any,
|
|
13925
|
+
options: PropTypes.object,
|
|
13926
|
+
phase: PropTypes.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
13927
|
+
requires: PropTypes.arrayOf(PropTypes.string),
|
|
13928
|
+
requiresIfExists: PropTypes.arrayOf(PropTypes.string)
|
|
13929
|
+
})),
|
|
13513
13930
|
/**
|
|
13514
|
-
* If
|
|
13515
|
-
* side (this is often helpful for aligning the left or right
|
|
13516
|
-
* side of the icon with content above or below, without ruining the border
|
|
13517
|
-
* size and shape).
|
|
13518
|
-
* @default false
|
|
13931
|
+
* If `true`, the component is shown.
|
|
13519
13932
|
*/
|
|
13520
|
-
|
|
13933
|
+
open: PropTypes.bool.isRequired,
|
|
13521
13934
|
/**
|
|
13522
|
-
*
|
|
13935
|
+
* Popper placement.
|
|
13936
|
+
* @default 'bottom'
|
|
13523
13937
|
*/
|
|
13524
|
-
|
|
13938
|
+
placement: PropTypes.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
13525
13939
|
/**
|
|
13526
|
-
*
|
|
13527
|
-
*
|
|
13528
|
-
* @default null
|
|
13940
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
13941
|
+
* @default {}
|
|
13529
13942
|
*/
|
|
13530
|
-
|
|
13943
|
+
popperOptions: PropTypes.shape({
|
|
13944
|
+
modifiers: PropTypes.array,
|
|
13945
|
+
onFirstUpdate: PropTypes.func,
|
|
13946
|
+
placement: PropTypes.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
13947
|
+
strategy: PropTypes.oneOf(["absolute", "fixed"])
|
|
13948
|
+
}),
|
|
13531
13949
|
/**
|
|
13532
|
-
*
|
|
13533
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
13534
|
-
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
13535
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
13950
|
+
* A ref that points to the used popper instance.
|
|
13536
13951
|
*/
|
|
13537
|
-
|
|
13952
|
+
popperRef: refType,
|
|
13538
13953
|
/**
|
|
13539
|
-
* The
|
|
13540
|
-
*
|
|
13541
|
-
* @default 'medium'
|
|
13954
|
+
* The props used for each slot inside the Popper.
|
|
13955
|
+
* @default {}
|
|
13542
13956
|
*/
|
|
13543
|
-
|
|
13957
|
+
slotProps: PropTypes.shape({
|
|
13958
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
13959
|
+
}),
|
|
13960
|
+
/**
|
|
13961
|
+
* The components used for each slot inside the Popper.
|
|
13962
|
+
* Either a string to use a HTML element or a component.
|
|
13963
|
+
* @default {}
|
|
13964
|
+
*/
|
|
13965
|
+
slots: PropTypes.shape({
|
|
13966
|
+
root: PropTypes.elementType
|
|
13967
|
+
}),
|
|
13544
13968
|
/**
|
|
13545
13969
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
13546
13970
|
*/
|
|
13547
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
13971
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
13972
|
+
/**
|
|
13973
|
+
* Help supporting a react-transition-group/Transition component.
|
|
13974
|
+
* @default false
|
|
13975
|
+
*/
|
|
13976
|
+
transition: PropTypes.bool
|
|
13548
13977
|
};
|
|
13549
13978
|
function getStyleValue(value) {
|
|
13550
13979
|
return parseInt(value, 10) || 0;
|
|
@@ -17429,6 +17858,9 @@ const HelpIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
|
17429
17858
|
const SettingsIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
17430
17859
|
d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"
|
|
17431
17860
|
}), "Settings");
|
|
17861
|
+
const WarningIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
17862
|
+
d: "M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"
|
|
17863
|
+
}), "Warning");
|
|
17432
17864
|
/**!
|
|
17433
17865
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
17434
17866
|
* @version 1.16.1
|
|
@@ -27350,6 +27782,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
|
|
|
27350
27782
|
const configSchema1_0_17 = configSchema1_0_16.extend({
|
|
27351
27783
|
version: z.literal("1.0.17")
|
|
27352
27784
|
});
|
|
27785
|
+
const configSchema1_0_18 = configSchema1_0_17.extend({
|
|
27786
|
+
version: z.literal("1.0.18")
|
|
27787
|
+
});
|
|
27353
27788
|
let getRandomValues;
|
|
27354
27789
|
const rnds8 = new Uint8Array(16);
|
|
27355
27790
|
function rng() {
|
|
@@ -28588,7 +29023,54 @@ function upgradeFrom1_0_16(config2) {
|
|
|
28588
29023
|
version: "1.0.17"
|
|
28589
29024
|
};
|
|
28590
29025
|
}
|
|
28591
|
-
|
|
29026
|
+
function upgradeFrom1_0_17(config2) {
|
|
29027
|
+
const newConfig = cloneDeep(config2);
|
|
29028
|
+
const { datasets } = newConfig;
|
|
29029
|
+
const newDatasets = datasets.map((datasetDef) => {
|
|
29030
|
+
const { files } = datasetDef;
|
|
29031
|
+
const newFiles = files.map((fileDef) => {
|
|
29032
|
+
const { fileType, options } = fileDef;
|
|
29033
|
+
if (fileType === "spatialdata.zarr" || fileType === "spatialdata.zarr.zip") {
|
|
29034
|
+
if (options.labels && options.shapes) {
|
|
29035
|
+
throw new Error("Cannot upgrade both labels and shapes at the same time. For now, a workaround is to include two separate spatialdata.zarr file definitions, one for labels and one for shapes.");
|
|
29036
|
+
}
|
|
29037
|
+
if (options.labels) {
|
|
29038
|
+
const newOptions = {
|
|
29039
|
+
...options,
|
|
29040
|
+
obsSegmentations: options.labels
|
|
29041
|
+
};
|
|
29042
|
+
delete newOptions.labels;
|
|
29043
|
+
return {
|
|
29044
|
+
...fileDef,
|
|
29045
|
+
options: newOptions
|
|
29046
|
+
};
|
|
29047
|
+
}
|
|
29048
|
+
if (options.shapes) {
|
|
29049
|
+
const newOptions = {
|
|
29050
|
+
...options,
|
|
29051
|
+
obsSegmentations: options.shapes
|
|
29052
|
+
};
|
|
29053
|
+
delete newOptions.shapes;
|
|
29054
|
+
return {
|
|
29055
|
+
...fileDef,
|
|
29056
|
+
options: newOptions
|
|
29057
|
+
};
|
|
29058
|
+
}
|
|
29059
|
+
}
|
|
29060
|
+
return fileDef;
|
|
29061
|
+
});
|
|
29062
|
+
return {
|
|
29063
|
+
...datasetDef,
|
|
29064
|
+
files: newFiles
|
|
29065
|
+
};
|
|
29066
|
+
});
|
|
29067
|
+
return {
|
|
29068
|
+
...newConfig,
|
|
29069
|
+
datasets: newDatasets,
|
|
29070
|
+
version: "1.0.18"
|
|
29071
|
+
};
|
|
29072
|
+
}
|
|
29073
|
+
const latestConfigSchema = configSchema1_0_18;
|
|
28592
29074
|
const SCHEMA_HANDLERS = [
|
|
28593
29075
|
[configSchema0_1_0, upgradeFrom0_1_0],
|
|
28594
29076
|
[configSchema1_0_0, upgradeFrom1_0_0],
|
|
@@ -28607,7 +29089,8 @@ const SCHEMA_HANDLERS = [
|
|
|
28607
29089
|
[configSchema1_0_13, upgradeFrom1_0_13],
|
|
28608
29090
|
[configSchema1_0_14, upgradeFrom1_0_14],
|
|
28609
29091
|
[configSchema1_0_15, upgradeFrom1_0_15],
|
|
28610
|
-
[configSchema1_0_16, upgradeFrom1_0_16]
|
|
29092
|
+
[configSchema1_0_16, upgradeFrom1_0_16],
|
|
29093
|
+
[configSchema1_0_17, upgradeFrom1_0_17]
|
|
28611
29094
|
];
|
|
28612
29095
|
var re = { exports: {} };
|
|
28613
29096
|
var constants;
|
|
@@ -30642,9 +31125,7 @@ const FileType$1 = {
|
|
|
30642
31125
|
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
30643
31126
|
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
30644
31127
|
FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
|
|
30645
|
-
|
|
30646
|
-
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
30647
|
-
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
31128
|
+
OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
|
|
30648
31129
|
// SpatialData - zipped
|
|
30649
31130
|
IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
|
|
30650
31131
|
LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
|
|
@@ -30653,6 +31134,7 @@ const FileType$1 = {
|
|
|
30653
31134
|
OBS_SETS_SPATIALDATA_ZARR_ZIP: "obsSets.spatialdata.zarr.zip",
|
|
30654
31135
|
OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
|
|
30655
31136
|
FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
|
|
31137
|
+
OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
|
|
30656
31138
|
// MuData
|
|
30657
31139
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
30658
31140
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -30904,6 +31386,7 @@ const STATUS = {
|
|
|
30904
31386
|
[FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR]: DataType$1.OBS_FEATURE_MATRIX,
|
|
30905
31387
|
[FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$1.OBS_SETS,
|
|
30906
31388
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$1.FEATURE_LABELS,
|
|
31389
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$1.OBS_POINTS,
|
|
30907
31390
|
// For new file types to support old file types
|
|
30908
31391
|
[FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$1.OBS_EMBEDDING,
|
|
30909
31392
|
[FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$1.OBS_LOCATIONS,
|
|
@@ -31077,6 +31560,9 @@ const DATA_TYPE_COORDINATION_VALUE_USAGE = {
|
|
|
31077
31560
|
},
|
|
31078
31561
|
[FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: {
|
|
31079
31562
|
zip: FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR_ZIP
|
|
31563
|
+
},
|
|
31564
|
+
[FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
|
|
31565
|
+
zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
|
|
31080
31566
|
}
|
|
31081
31567
|
});
|
|
31082
31568
|
const AUTO_INDEPENDENT_COORDINATION_TYPES = [
|
|
@@ -31751,7 +32237,7 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
|
|
|
31751
32237
|
CoordinationType$1.HIERARCHY_LEVELS
|
|
31752
32238
|
]
|
|
31753
32239
|
});
|
|
31754
|
-
const version = "3.6.
|
|
32240
|
+
const version = "3.6.8";
|
|
31755
32241
|
const META_VERSION = {
|
|
31756
32242
|
version
|
|
31757
32243
|
};
|
|
@@ -32171,10 +32657,14 @@ const imageSpatialdataSchema = z.object({
|
|
|
32171
32657
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
32172
32658
|
});
|
|
32173
32659
|
const obsSegmentationsSpatialdataSchema = z.object({
|
|
32174
|
-
// TODO:
|
|
32175
|
-
|
|
32176
|
-
|
|
32177
|
-
|
|
32660
|
+
// TODO: support obsTypesFromElementNames?
|
|
32661
|
+
path: z.string().describe("The path to the segmentation data, stored in either shapes/ or labels/."),
|
|
32662
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the labels or shapes. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
32663
|
+
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
32664
|
+
});
|
|
32665
|
+
const obsPointsSpatialdataSchema = z.object({
|
|
32666
|
+
path: z.string().describe("The path to the point data."),
|
|
32667
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the points. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
|
|
32178
32668
|
coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
|
|
32179
32669
|
});
|
|
32180
32670
|
z.object({
|
|
@@ -32294,13 +32784,10 @@ z.object({
|
|
|
32294
32784
|
image: imageSpatialdataSchema,
|
|
32295
32785
|
// TODO: should this be a special schema
|
|
32296
32786
|
// to allow specifying fileUid (like for embeddingType)?
|
|
32297
|
-
// TODO: allow multiple labels?
|
|
32298
|
-
|
|
32787
|
+
// TODO: allow multiple labels/shapes?
|
|
32788
|
+
obsSegmentations: obsSegmentationsSpatialdataSchema,
|
|
32789
|
+
obsPoints: obsPointsSpatialdataSchema,
|
|
32299
32790
|
// TODO: allow multiple shapes?
|
|
32300
|
-
// TODO: unify labels and shapes to obsSegmentations,
|
|
32301
|
-
// then distinguish in expand function based on
|
|
32302
|
-
// "labels/*" vs. "shapes/*" in path?
|
|
32303
|
-
shapes: obsSegmentationsSpatialdataSchema,
|
|
32304
32791
|
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
32305
32792
|
obsSpots: obsSpotsSpatialdataSchema,
|
|
32306
32793
|
// TODO: obsPoints
|
|
@@ -41178,30 +41665,6 @@ function intern_delete({ _intern, _key }, value) {
|
|
|
41178
41665
|
function keyof(value) {
|
|
41179
41666
|
return value !== null && typeof value === "object" ? value.valueOf() : value;
|
|
41180
41667
|
}
|
|
41181
|
-
class AbstractLoaderError {
|
|
41182
|
-
constructor(message) {
|
|
41183
|
-
this.message = message;
|
|
41184
|
-
}
|
|
41185
|
-
// eslint-disable-next-line class-methods-use-this
|
|
41186
|
-
warnInConsole() {
|
|
41187
|
-
throw new Error("The warnInConsole() method has not been implemented.");
|
|
41188
|
-
}
|
|
41189
|
-
}
|
|
41190
|
-
class LoaderNotFoundError extends AbstractLoaderError {
|
|
41191
|
-
constructor(loaders, dataset, fileType, viewCoordinationValues) {
|
|
41192
|
-
super(`Error: unable to find matching ${fileType} file in dataset ${dataset}.`);
|
|
41193
|
-
this.name = "LoaderNotFoundError";
|
|
41194
|
-
this.loaders = loaders;
|
|
41195
|
-
this.dataset = dataset;
|
|
41196
|
-
this.fileType = fileType;
|
|
41197
|
-
this.viewCoordinationValues = viewCoordinationValues;
|
|
41198
|
-
this.message = `Expected to match on { ${Object.entries(viewCoordinationValues || {}).map(([k, v]) => `${k}: ${v ?? "null"}`).join(", ")} }`;
|
|
41199
|
-
}
|
|
41200
|
-
warnInConsole() {
|
|
41201
|
-
const { loaders, message } = this;
|
|
41202
|
-
log$1.warn(message, loaders);
|
|
41203
|
-
}
|
|
41204
|
-
}
|
|
41205
41668
|
function getSourceAndLoaderFromFileType(type, fileTypes) {
|
|
41206
41669
|
if (Array.isArray(fileTypes)) {
|
|
41207
41670
|
const matchingFileType = fileTypes.find((ft) => ft.name === type);
|
|
@@ -41580,7 +42043,7 @@ function useExpandedFeatureLabelsMap(featureType, featureLabelsMap, options) {
|
|
|
41580
42043
|
if (!fetchedMapping) return featureLabelsMap;
|
|
41581
42044
|
return new Map([
|
|
41582
42045
|
...stripCuriePrefixes ? Array.from(fetchedMapping).map(([k, v]) => [k.split(":")[1], v.split(":")[1]]) : fetchedMapping,
|
|
41583
|
-
...featureLabelsMap || []
|
|
42046
|
+
...Array.from((featureLabelsMap == null ? void 0 : featureLabelsMap.entries()) || [])
|
|
41584
42047
|
]);
|
|
41585
42048
|
}, [fetchedMapping, featureLabelsMap, stripCuriePrefixes]);
|
|
41586
42049
|
const dataStatus = enabled ? isFetching ? STATUS.LOADING : status : STATUS.SUCCESS;
|
|
@@ -42416,7 +42879,16 @@ function VitS(props) {
|
|
|
42416
42879
|
refetchOnWindowFocus: false,
|
|
42417
42880
|
retry: 2
|
|
42418
42881
|
}
|
|
42419
|
-
}
|
|
42882
|
+
},
|
|
42883
|
+
// Reference: https://tkdodo.eu/blog/react-query-error-handling#the-global-callbacks
|
|
42884
|
+
queryCache: new QueryCache({
|
|
42885
|
+
onError: (error) => {
|
|
42886
|
+
log$1.error(error);
|
|
42887
|
+
if (onWarn) {
|
|
42888
|
+
onWarn(error.message);
|
|
42889
|
+
}
|
|
42890
|
+
}
|
|
42891
|
+
})
|
|
42420
42892
|
// TODO: should the queryClient be shared? Or have an option to be shared
|
|
42421
42893
|
// (e.g., based on remountOnUidChange)?
|
|
42422
42894
|
}), [configKey]);
|
|
@@ -42632,6 +43104,18 @@ const useStyles$1 = makeStyles()((theme) => ({
|
|
|
42632
43104
|
borderRadius: "8px",
|
|
42633
43105
|
boxShadow: "0 0 10px rgba(0, 0, 0, 0.2)",
|
|
42634
43106
|
border: "10px solid grey"
|
|
43107
|
+
},
|
|
43108
|
+
errorList: {
|
|
43109
|
+
width: "100%",
|
|
43110
|
+
maxWidth: 300,
|
|
43111
|
+
padding: "0 4px"
|
|
43112
|
+
},
|
|
43113
|
+
errorListAlert: {
|
|
43114
|
+
marginTop: "2px",
|
|
43115
|
+
marginBottom: "2px"
|
|
43116
|
+
},
|
|
43117
|
+
errorListItemText: {
|
|
43118
|
+
fontSize: "12px"
|
|
42635
43119
|
}
|
|
42636
43120
|
}));
|
|
42637
43121
|
function SettingsIconWithArrow({ open }) {
|
|
@@ -42650,6 +43134,7 @@ function PlotOptions(props) {
|
|
|
42650
43134
|
buttonIcon,
|
|
42651
43135
|
buttonClassName: classes.iconButton,
|
|
42652
43136
|
placement: "bottom-end",
|
|
43137
|
+
title: "Plot Options",
|
|
42653
43138
|
"aria-label": "Open plot options menu"
|
|
42654
43139
|
},
|
|
42655
43140
|
options
|
|
@@ -42671,6 +43156,7 @@ function DownloadOptions(props) {
|
|
|
42671
43156
|
buttonIcon,
|
|
42672
43157
|
buttonClassName: classes.iconButton,
|
|
42673
43158
|
placement: "bottom-end",
|
|
43159
|
+
title: "Download Options",
|
|
42674
43160
|
"aria-label": "Open download options menu"
|
|
42675
43161
|
},
|
|
42676
43162
|
urls.map(({ url, name }) => /* @__PURE__ */ React__default.createElement(MenuItem, { dense: true, key: `${url}_${name}`, "aria-label": `Click to download ${name}` }, /* @__PURE__ */ React__default.createElement(Link, { underline: "always", href: url, target: "_blank", rel: "noopener", className: classes.downloadLink }, "Download ", name)))
|
|
@@ -42688,12 +43174,43 @@ function HelpButton(props) {
|
|
|
42688
43174
|
buttonIcon: /* @__PURE__ */ React__default.createElement(HelpIcon, null),
|
|
42689
43175
|
buttonClassName: classes.iconButton,
|
|
42690
43176
|
placement: "bottom-end",
|
|
43177
|
+
title: "Help Info",
|
|
42691
43178
|
"aria-label": "Open help info",
|
|
42692
43179
|
withPaper: false
|
|
42693
43180
|
},
|
|
42694
43181
|
/* @__PURE__ */ React__default.createElement("span", { className: classes.helpTextSpan }, helpText)
|
|
42695
43182
|
);
|
|
42696
43183
|
}
|
|
43184
|
+
function ErrorInfo(props) {
|
|
43185
|
+
const { errors } = props;
|
|
43186
|
+
const [open, setOpen] = useState(false);
|
|
43187
|
+
const { classes } = useStyles$1();
|
|
43188
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
43189
|
+
PopperMenu,
|
|
43190
|
+
{
|
|
43191
|
+
open,
|
|
43192
|
+
setOpen,
|
|
43193
|
+
buttonIcon: /* @__PURE__ */ React__default.createElement(WarningIcon, { color: "error" }),
|
|
43194
|
+
buttonClassName: classes.iconButton,
|
|
43195
|
+
placement: "bottom-end",
|
|
43196
|
+
title: "View Errors",
|
|
43197
|
+
"aria-label": "Open error info"
|
|
43198
|
+
},
|
|
43199
|
+
/* @__PURE__ */ React__default.createElement(List, { className: classes.errorList }, errors.map((error, index) => /* @__PURE__ */ React__default.createElement(
|
|
43200
|
+
Alert,
|
|
43201
|
+
{
|
|
43202
|
+
key: `${index}-${error.name}-${error.message}`,
|
|
43203
|
+
severity: "error",
|
|
43204
|
+
className: classes.errorListAlert,
|
|
43205
|
+
slots: { message: "span" },
|
|
43206
|
+
slotProps: { message: { className: classes.errorListItemText } }
|
|
43207
|
+
},
|
|
43208
|
+
error.name,
|
|
43209
|
+
": ",
|
|
43210
|
+
error.message
|
|
43211
|
+
)))
|
|
43212
|
+
);
|
|
43213
|
+
}
|
|
42697
43214
|
function ClosePaneButton(props) {
|
|
42698
43215
|
const { removeGridComponent } = props;
|
|
42699
43216
|
const { classes } = useStyles$1();
|
|
@@ -42703,7 +43220,7 @@ function ClosePaneButton(props) {
|
|
|
42703
43220
|
onClick: removeGridComponent,
|
|
42704
43221
|
size: "small",
|
|
42705
43222
|
className: classes.iconButton,
|
|
42706
|
-
title: "
|
|
43223
|
+
title: "Close View",
|
|
42707
43224
|
"aria-label": "Close panel button"
|
|
42708
43225
|
},
|
|
42709
43226
|
/* @__PURE__ */ React__default.createElement(CloseIcon, null)
|
|
@@ -42723,8 +43240,10 @@ function TitleInfo(props) {
|
|
|
42723
43240
|
closeButtonVisible = true,
|
|
42724
43241
|
downloadButtonVisible = true,
|
|
42725
43242
|
helpText,
|
|
42726
|
-
withPadding = true
|
|
43243
|
+
withPadding = true,
|
|
43244
|
+
errors: errorsProp
|
|
42727
43245
|
} = props;
|
|
43246
|
+
const errors = errorsProp == null ? void 0 : errorsProp.filter(Boolean);
|
|
42728
43247
|
const { classes } = useTitleStyles();
|
|
42729
43248
|
return (
|
|
42730
43249
|
// d-flex without wrapping div is not always full height; I don't understand the root cause.
|
|
@@ -42738,6 +43257,11 @@ function TitleInfo(props) {
|
|
|
42738
43257
|
{
|
|
42739
43258
|
urls
|
|
42740
43259
|
}
|
|
43260
|
+
) : null, Array.isArray(errors) && errors.length > 0 ? /* @__PURE__ */ React__default.createElement(
|
|
43261
|
+
ErrorInfo,
|
|
43262
|
+
{
|
|
43263
|
+
errors
|
|
43264
|
+
}
|
|
42741
43265
|
) : null, helpText ? /* @__PURE__ */ React__default.createElement(
|
|
42742
43266
|
HelpButton,
|
|
42743
43267
|
{
|
|
@@ -42770,12 +43294,16 @@ function TitleInfo(props) {
|
|
|
42770
43294
|
))
|
|
42771
43295
|
);
|
|
42772
43296
|
}
|
|
42773
|
-
|
|
42774
|
-
|
|
42775
|
-
|
|
42776
|
-
|
|
42777
|
-
|
|
42778
|
-
|
|
43297
|
+
class VitessceError extends Error {
|
|
43298
|
+
constructor(message) {
|
|
43299
|
+
super(message);
|
|
43300
|
+
this.name = "VitessceError";
|
|
43301
|
+
}
|
|
43302
|
+
}
|
|
43303
|
+
class LoaderNotFoundError extends VitessceError {
|
|
43304
|
+
constructor(message) {
|
|
43305
|
+
super(message);
|
|
43306
|
+
this.name = "LoaderNotFoundError";
|
|
42779
43307
|
}
|
|
42780
43308
|
}
|
|
42781
43309
|
function initCoordinationSpace(values2, setters, initialValues) {
|
|
@@ -42804,13 +43332,12 @@ async function dataQueryFn(ctx) {
|
|
|
42804
43332
|
return { data, coordinationValues, urls, requestInit: requestInit2 };
|
|
42805
43333
|
}
|
|
42806
43334
|
if (isRequired) {
|
|
42807
|
-
throw new LoaderNotFoundError(
|
|
43335
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${dataType}, ${JSON.stringify(matchOn)}`);
|
|
42808
43336
|
} else {
|
|
42809
43337
|
return { data: placeholderObject };
|
|
42810
43338
|
}
|
|
42811
43339
|
}
|
|
42812
43340
|
function useDataType(dataType, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
|
|
42813
|
-
const setWarning = useSetWarning();
|
|
42814
43341
|
const placeholderObject = useMemo(() => ({}), []);
|
|
42815
43342
|
const dataQuery = useQuery({
|
|
42816
43343
|
// TODO: only enable when loaders has been initialized?
|
|
@@ -42831,7 +43358,6 @@ function useDataType(dataType, loaders, dataset, isRequired, coordinationSetters
|
|
|
42831
43358
|
const loadedData = (data == null ? void 0 : data.data) || placeholderObject;
|
|
42832
43359
|
const coordinationValues = data == null ? void 0 : data.coordinationValues;
|
|
42833
43360
|
const urls = data == null ? void 0 : data.urls;
|
|
42834
|
-
const requestInit2 = data == null ? void 0 : data.requestInit;
|
|
42835
43361
|
useEffect(() => {
|
|
42836
43362
|
initCoordinationSpace(
|
|
42837
43363
|
coordinationValues,
|
|
@@ -42839,17 +43365,11 @@ function useDataType(dataType, loaders, dataset, isRequired, coordinationSetters
|
|
|
42839
43365
|
initialCoordinationValues
|
|
42840
43366
|
);
|
|
42841
43367
|
}, [coordinationValues]);
|
|
42842
|
-
useEffect(() => {
|
|
42843
|
-
if (error) {
|
|
42844
|
-
warn(error, setWarning);
|
|
42845
|
-
}
|
|
42846
|
-
}, [error, setWarning]);
|
|
42847
43368
|
const dataStatus = isFetching ? STATUS.LOADING : status;
|
|
42848
|
-
return [loadedData, dataStatus, urls,
|
|
43369
|
+
return [loadedData, dataStatus, urls, error];
|
|
42849
43370
|
}
|
|
42850
43371
|
function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOnObj, mergeCoordination, viewUid) {
|
|
42851
43372
|
const placeholderObject = useMemo(() => ({}), []);
|
|
42852
|
-
const setWarning = useSetWarning();
|
|
42853
43373
|
const matchOnEntries = matchOnObj ? Object.entries(matchOnObj) : [];
|
|
42854
43374
|
const dataQueries = useQueries({
|
|
42855
43375
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -42870,6 +43390,7 @@ function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSe
|
|
|
42870
43390
|
});
|
|
42871
43391
|
const anyLoading = dataQueries.some((q) => q.isFetching);
|
|
42872
43392
|
const anyError = dataQueries.some((q) => q.isError);
|
|
43393
|
+
const errors = anyError ? dataQueries.filter((q) => q.isError).map((q) => q.error) : [];
|
|
42873
43394
|
const dataStatus = anyLoading ? STATUS.LOADING : anyError ? STATUS.ERROR : STATUS.SUCCESS;
|
|
42874
43395
|
const isSuccess = dataStatus === STATUS.SUCCESS;
|
|
42875
43396
|
useEffect(() => {
|
|
@@ -42894,11 +43415,6 @@ function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSe
|
|
|
42894
43415
|
}
|
|
42895
43416
|
});
|
|
42896
43417
|
}, [isSuccess]);
|
|
42897
|
-
useEffect(() => {
|
|
42898
|
-
dataQueries.map((q) => q.error).filter((e) => Boolean(e)).forEach((error) => {
|
|
42899
|
-
warn(error, setWarning);
|
|
42900
|
-
});
|
|
42901
|
-
}, [anyError, setWarning]);
|
|
42902
43418
|
const data = useMemo(() => Object.fromEntries(
|
|
42903
43419
|
matchOnEntries.map(([scopeKey], i) => {
|
|
42904
43420
|
var _a2;
|
|
@@ -42917,7 +43433,7 @@ function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSe
|
|
|
42917
43433
|
// Deliberate dependency omissions: matchOnEntries, since dataQueries depends on it.
|
|
42918
43434
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42919
43435
|
), [dataQueries]);
|
|
42920
|
-
return [data, dataStatus, urls];
|
|
43436
|
+
return [data, dataStatus, urls, errors];
|
|
42921
43437
|
}
|
|
42922
43438
|
function useHasLoader(loaders, dataset, dataType, matchOn) {
|
|
42923
43439
|
const loader = useMatchingLoader(loaders, dataset, dataType, matchOn);
|
|
@@ -43103,7 +43619,6 @@ function useComparisonMetadata(loaders, dataset, isRequired, coordinationSetters
|
|
|
43103
43619
|
);
|
|
43104
43620
|
}
|
|
43105
43621
|
function useFeatureSelection(loaders, dataset, isRequired, selection, matchOn) {
|
|
43106
|
-
const setWarning = useSetWarning();
|
|
43107
43622
|
const featureQueries = useQueries({
|
|
43108
43623
|
queries: (selection == null ? void 0 : selection.map((featureId) => ({
|
|
43109
43624
|
structuralSharing: false,
|
|
@@ -43140,7 +43655,7 @@ function useFeatureSelection(loaders, dataset, isRequired, selection, matchOn) {
|
|
|
43140
43655
|
return { data: expressionData, dataKey: featureId };
|
|
43141
43656
|
}
|
|
43142
43657
|
if (isRequired) {
|
|
43143
|
-
throw new LoaderNotFoundError(
|
|
43658
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${DataType$1.OBS_FEATURE_MATRIX}, ${JSON.stringify(matchOn)}`);
|
|
43144
43659
|
} else {
|
|
43145
43660
|
return { data: null, dataKey: null };
|
|
43146
43661
|
}
|
|
@@ -43150,6 +43665,7 @@ function useFeatureSelection(loaders, dataset, isRequired, selection, matchOn) {
|
|
|
43150
43665
|
});
|
|
43151
43666
|
const anyLoading = featureQueries.some((q) => q.isFetching);
|
|
43152
43667
|
const anyError = featureQueries.some((q) => q.isError);
|
|
43668
|
+
const errors = anyError ? featureQueries.filter((q) => q.isError).map((q) => q.error) : [];
|
|
43153
43669
|
const dataStatus = anyLoading ? STATUS.LOADING : anyError ? STATUS.ERROR : STATUS.SUCCESS;
|
|
43154
43670
|
const isSuccess = dataStatus === STATUS.SUCCESS;
|
|
43155
43671
|
const geneData = useMemo(() => isSuccess ? featureQueries.map((q) => {
|
|
@@ -43160,15 +43676,9 @@ function useFeatureSelection(loaders, dataset, isRequired, selection, matchOn) {
|
|
|
43160
43676
|
var _a2;
|
|
43161
43677
|
return ((_a2 = q.data) == null ? void 0 : _a2.dataKey) || null;
|
|
43162
43678
|
}) : null, [isSuccess, selection, dataset]);
|
|
43163
|
-
|
|
43164
|
-
featureQueries.map((q) => q.error).filter((e) => Boolean(e)).forEach((error) => {
|
|
43165
|
-
warn(error, setWarning);
|
|
43166
|
-
});
|
|
43167
|
-
}, [anyError, setWarning]);
|
|
43168
|
-
return [geneData, loadedGeneName, dataStatus];
|
|
43679
|
+
return [geneData, loadedGeneName, dataStatus, errors];
|
|
43169
43680
|
}
|
|
43170
43681
|
function useComparativeDataType(loaders, dataset, isRequired, matchOn, volcanoOptions, dataType) {
|
|
43171
|
-
const setWarning = useSetWarning();
|
|
43172
43682
|
const placeholderObject = useMemo(() => ({}), []);
|
|
43173
43683
|
const statsQuery = useQuery({
|
|
43174
43684
|
// TODO: only enable once `loaders` is available?
|
|
@@ -43205,7 +43715,7 @@ function useComparativeDataType(loaders, dataset, isRequired, matchOn, volcanoOp
|
|
|
43205
43715
|
};
|
|
43206
43716
|
}
|
|
43207
43717
|
if (isRequired) {
|
|
43208
|
-
throw new LoaderNotFoundError(
|
|
43718
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${dataType}, ${JSON.stringify(matchOn)}`);
|
|
43209
43719
|
} else {
|
|
43210
43720
|
return { data: placeholderObject, dataKey: null };
|
|
43211
43721
|
}
|
|
@@ -43216,12 +43726,7 @@ function useComparativeDataType(loaders, dataset, isRequired, matchOn, volcanoOp
|
|
|
43216
43726
|
const loadedData = (data == null ? void 0 : data.data) || placeholderObject;
|
|
43217
43727
|
const dataStatus = isFetching ? STATUS.LOADING : status;
|
|
43218
43728
|
const urls = data == null ? void 0 : data.urls;
|
|
43219
|
-
|
|
43220
|
-
if (error) {
|
|
43221
|
-
setWarning(error.message);
|
|
43222
|
-
}
|
|
43223
|
-
}, [error, setWarning]);
|
|
43224
|
-
return [loadedData, dataStatus, urls];
|
|
43729
|
+
return [loadedData, dataStatus, urls, error];
|
|
43225
43730
|
}
|
|
43226
43731
|
function useFeatureStatsData(loaders, dataset, isRequired, matchOn, volcanoOptions) {
|
|
43227
43732
|
return useComparativeDataType(
|
|
@@ -43254,7 +43759,6 @@ function useObsSetStatsData(loaders, dataset, isRequired, matchOn, volcanoOption
|
|
|
43254
43759
|
);
|
|
43255
43760
|
}
|
|
43256
43761
|
function useObsFeatureMatrixIndices(loaders, dataset, isRequired, matchOn) {
|
|
43257
|
-
const setWarning = useSetWarning();
|
|
43258
43762
|
const placeholderObject = useMemo(() => ({}), []);
|
|
43259
43763
|
const indicesQuery = useQuery({
|
|
43260
43764
|
// TODO: only enable once `loaders` is available?
|
|
@@ -43301,7 +43805,7 @@ function useObsFeatureMatrixIndices(loaders, dataset, isRequired, matchOn) {
|
|
|
43301
43805
|
};
|
|
43302
43806
|
}
|
|
43303
43807
|
if (isRequired) {
|
|
43304
|
-
throw new LoaderNotFoundError(
|
|
43808
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${DataType$1.OBS_FEATURE_MATRIX}, ${JSON.stringify(matchOn)}`);
|
|
43305
43809
|
} else {
|
|
43306
43810
|
return { data: placeholderObject, dataKey: null };
|
|
43307
43811
|
}
|
|
@@ -43312,12 +43816,7 @@ function useObsFeatureMatrixIndices(loaders, dataset, isRequired, matchOn) {
|
|
|
43312
43816
|
const loadedData = (data == null ? void 0 : data.data) || placeholderObject;
|
|
43313
43817
|
const dataStatus = isFetching ? STATUS.LOADING : status;
|
|
43314
43818
|
const urls = data == null ? void 0 : data.urls;
|
|
43315
|
-
|
|
43316
|
-
if (error) {
|
|
43317
|
-
setWarning(error.message);
|
|
43318
|
-
}
|
|
43319
|
-
}, [error, setWarning]);
|
|
43320
|
-
return [loadedData, dataStatus, urls];
|
|
43819
|
+
return [loadedData, dataStatus, urls, error];
|
|
43321
43820
|
}
|
|
43322
43821
|
function useMultiObsPoints(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, viewUid) {
|
|
43323
43822
|
const obsTypeCoordination = useComplexCoordination(
|
|
@@ -43335,7 +43834,7 @@ function useMultiObsPoints(coordinationScopes, coordinationScopesBy, loaders, da
|
|
|
43335
43834
|
// indirect dependencies here.
|
|
43336
43835
|
[coordinationScopes, coordinationScopesBy]
|
|
43337
43836
|
);
|
|
43338
|
-
const [obsPointsData, obsPointsDataStatus, obsPointsUrls] = useDataTypeMulti(
|
|
43837
|
+
const [obsPointsData, obsPointsDataStatus, obsPointsUrls, obsPointsErrors] = useDataTypeMulti(
|
|
43339
43838
|
DataType$1.OBS_POINTS,
|
|
43340
43839
|
loaders,
|
|
43341
43840
|
dataset,
|
|
@@ -43346,7 +43845,7 @@ function useMultiObsPoints(coordinationScopes, coordinationScopesBy, loaders, da
|
|
|
43346
43845
|
mergeCoordination,
|
|
43347
43846
|
viewUid
|
|
43348
43847
|
);
|
|
43349
|
-
return [obsPointsData, obsPointsDataStatus, obsPointsUrls];
|
|
43848
|
+
return [obsPointsData, obsPointsDataStatus, obsPointsUrls, obsPointsErrors];
|
|
43350
43849
|
}
|
|
43351
43850
|
function useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, viewUid) {
|
|
43352
43851
|
const obsTypeCoordination = useComplexCoordination(
|
|
@@ -43364,7 +43863,7 @@ function useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dat
|
|
|
43364
43863
|
// indirect dependencies here.
|
|
43365
43864
|
[coordinationScopes, coordinationScopesBy]
|
|
43366
43865
|
);
|
|
43367
|
-
const [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls] = useDataTypeMulti(
|
|
43866
|
+
const [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls, obsSpotsErrors] = useDataTypeMulti(
|
|
43368
43867
|
DataType$1.OBS_SPOTS,
|
|
43369
43868
|
loaders,
|
|
43370
43869
|
dataset,
|
|
@@ -43375,7 +43874,7 @@ function useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dat
|
|
|
43375
43874
|
mergeCoordination,
|
|
43376
43875
|
viewUid
|
|
43377
43876
|
);
|
|
43378
|
-
return [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls];
|
|
43877
|
+
return [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls, obsSpotsErrors];
|
|
43379
43878
|
}
|
|
43380
43879
|
function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
43381
43880
|
const obsTypeCoordination = useComplexCoordination(
|
|
@@ -43393,7 +43892,7 @@ function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders,
|
|
|
43393
43892
|
// indirect dependencies here.
|
|
43394
43893
|
[coordinationScopes, coordinationScopesBy]
|
|
43395
43894
|
);
|
|
43396
|
-
const [obsSetsData, obsSetsDataStatus, obsSetsUrls] = useDataTypeMulti(
|
|
43895
|
+
const [obsSetsData, obsSetsDataStatus, obsSetsUrls, obsSetsErrors] = useDataTypeMulti(
|
|
43397
43896
|
DataType$1.OBS_SETS,
|
|
43398
43897
|
loaders,
|
|
43399
43898
|
dataset,
|
|
@@ -43402,7 +43901,7 @@ function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders,
|
|
|
43402
43901
|
{},
|
|
43403
43902
|
matchOnObj
|
|
43404
43903
|
);
|
|
43405
|
-
return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
|
|
43904
|
+
return [obsSetsData, obsSetsDataStatus, obsSetsUrls, obsSetsErrors];
|
|
43406
43905
|
}
|
|
43407
43906
|
function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
43408
43907
|
const featureTypeCoordination = useComplexCoordination(
|
|
@@ -43420,7 +43919,12 @@ function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loa
|
|
|
43420
43919
|
// indirect dependencies here.
|
|
43421
43920
|
[coordinationScopes, coordinationScopesBy]
|
|
43422
43921
|
);
|
|
43423
|
-
const [
|
|
43922
|
+
const [
|
|
43923
|
+
featureLabelsData,
|
|
43924
|
+
featureLabelsStatus,
|
|
43925
|
+
featureLabelsUrls,
|
|
43926
|
+
featureLabelsErrors
|
|
43927
|
+
] = useDataTypeMulti(
|
|
43424
43928
|
DataType$1.FEATURE_LABELS,
|
|
43425
43929
|
loaders,
|
|
43426
43930
|
dataset,
|
|
@@ -43429,7 +43933,12 @@ function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loa
|
|
|
43429
43933
|
{},
|
|
43430
43934
|
matchOnObj
|
|
43431
43935
|
);
|
|
43432
|
-
return [
|
|
43936
|
+
return [
|
|
43937
|
+
featureLabelsData,
|
|
43938
|
+
featureLabelsStatus,
|
|
43939
|
+
featureLabelsUrls,
|
|
43940
|
+
featureLabelsErrors
|
|
43941
|
+
];
|
|
43433
43942
|
}
|
|
43434
43943
|
function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
|
|
43435
43944
|
const obsLabelsTypes = useMultiCoordinationValues(
|
|
@@ -43442,7 +43951,7 @@ function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
|
|
|
43442
43951
|
{ obsLabelsType, obsType }
|
|
43443
43952
|
])
|
|
43444
43953
|
), [obsLabelsTypes, obsType]);
|
|
43445
|
-
const [obsLabelsData, obsLabelsDataStatus, obsLabelsUrls] = useDataTypeMulti(
|
|
43954
|
+
const [obsLabelsData, obsLabelsDataStatus, obsLabelsUrls, obsLabelsErrors] = useDataTypeMulti(
|
|
43446
43955
|
DataType$1.OBS_LABELS,
|
|
43447
43956
|
loaders,
|
|
43448
43957
|
dataset,
|
|
@@ -43451,7 +43960,7 @@ function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
|
|
|
43451
43960
|
{},
|
|
43452
43961
|
obsLabelsMatchOnObj
|
|
43453
43962
|
);
|
|
43454
|
-
return [obsLabelsTypes, obsLabelsData, obsLabelsDataStatus, obsLabelsUrls];
|
|
43963
|
+
return [obsLabelsTypes, obsLabelsData, obsLabelsDataStatus, obsLabelsUrls, obsLabelsErrors];
|
|
43455
43964
|
}
|
|
43456
43965
|
function useMultiObsSegmentations(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, viewUid) {
|
|
43457
43966
|
const imageCoordination = useComplexCoordination(
|
|
@@ -43472,7 +43981,8 @@ function useMultiObsSegmentations(coordinationScopes, coordinationScopesBy, load
|
|
|
43472
43981
|
const [
|
|
43473
43982
|
obsSegmentationsData,
|
|
43474
43983
|
obsSegmentationsDataStatus,
|
|
43475
|
-
obsSegmentationsUrls
|
|
43984
|
+
obsSegmentationsUrls,
|
|
43985
|
+
obsSegmentationsErrors
|
|
43476
43986
|
] = useDataTypeMulti(
|
|
43477
43987
|
DataType$1.OBS_SEGMENTATIONS,
|
|
43478
43988
|
loaders,
|
|
@@ -43484,7 +43994,12 @@ function useMultiObsSegmentations(coordinationScopes, coordinationScopesBy, load
|
|
|
43484
43994
|
mergeCoordination,
|
|
43485
43995
|
viewUid
|
|
43486
43996
|
);
|
|
43487
|
-
return [
|
|
43997
|
+
return [
|
|
43998
|
+
obsSegmentationsData,
|
|
43999
|
+
obsSegmentationsDataStatus,
|
|
44000
|
+
obsSegmentationsUrls,
|
|
44001
|
+
obsSegmentationsErrors
|
|
44002
|
+
];
|
|
43488
44003
|
}
|
|
43489
44004
|
function useMultiImages(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, viewUid) {
|
|
43490
44005
|
const imageCoordination = useComplexCoordination(
|
|
@@ -43502,7 +44017,7 @@ function useMultiImages(coordinationScopes, coordinationScopesBy, loaders, datas
|
|
|
43502
44017
|
// indirect dependencies here.
|
|
43503
44018
|
[coordinationScopes, coordinationScopesBy]
|
|
43504
44019
|
);
|
|
43505
|
-
const [imageData, imageDataStatus, imageUrls] = useDataTypeMulti(
|
|
44020
|
+
const [imageData, imageDataStatus, imageUrls, imageErrors] = useDataTypeMulti(
|
|
43506
44021
|
DataType$1.IMAGE,
|
|
43507
44022
|
loaders,
|
|
43508
44023
|
dataset,
|
|
@@ -43513,7 +44028,7 @@ function useMultiImages(coordinationScopes, coordinationScopesBy, loaders, datas
|
|
|
43513
44028
|
mergeCoordination,
|
|
43514
44029
|
viewUid
|
|
43515
44030
|
);
|
|
43516
|
-
return [imageData, imageDataStatus, imageUrls];
|
|
44031
|
+
return [imageData, imageDataStatus, imageUrls, imageErrors];
|
|
43517
44032
|
}
|
|
43518
44033
|
function getFeatureSelectionQueryKeyScopeTuplesAux(allSelections, allMatchOnObj, depth, dataset, dataType, isRequired, prevLevelScopes, currSelection, currMatchOn) {
|
|
43519
44034
|
var _a2;
|
|
@@ -43705,13 +44220,12 @@ async function featureSelectionQueryFn(ctx) {
|
|
|
43705
44220
|
};
|
|
43706
44221
|
}
|
|
43707
44222
|
if (isRequired) {
|
|
43708
|
-
throw new LoaderNotFoundError(
|
|
44223
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${dataType}, ${JSON.stringify(matchOn)}`);
|
|
43709
44224
|
} else {
|
|
43710
44225
|
return { data: null, dataKey: null };
|
|
43711
44226
|
}
|
|
43712
44227
|
}
|
|
43713
44228
|
function useFeatureSelectionMultiLevel(loaders, dataset, isRequired, matchOnObj, selections, depth) {
|
|
43714
|
-
const setWarning = useSetWarning();
|
|
43715
44229
|
const queryKeyScopeTuples = useMemo(() => getFeatureSelectionQueryKeyScopeTuples(
|
|
43716
44230
|
selections,
|
|
43717
44231
|
matchOnObj,
|
|
@@ -43731,6 +44245,7 @@ function useFeatureSelectionMultiLevel(loaders, dataset, isRequired, matchOnObj,
|
|
|
43731
44245
|
});
|
|
43732
44246
|
const anyLoading = featureQueries.some((q) => q.isFetching);
|
|
43733
44247
|
const anyError = featureQueries.some((q) => q.isError);
|
|
44248
|
+
const errors = anyError ? featureQueries.filter((q) => q.isError).map((q) => q.error) : [];
|
|
43734
44249
|
const dataStatus = anyLoading ? STATUS.LOADING : anyError ? STATUS.ERROR : STATUS.SUCCESS;
|
|
43735
44250
|
const flatGeneData = featureQueries.map((q) => {
|
|
43736
44251
|
var _a2;
|
|
@@ -43748,11 +44263,6 @@ function useFeatureSelectionMultiLevel(loaders, dataset, isRequired, matchOnObj,
|
|
|
43748
44263
|
var _a2;
|
|
43749
44264
|
return ((_a2 = q.data) == null ? void 0 : _a2.normData) || null;
|
|
43750
44265
|
});
|
|
43751
|
-
useEffect(() => {
|
|
43752
|
-
featureQueries.map((q) => q.error).filter((e) => Boolean(e)).forEach((error) => {
|
|
43753
|
-
warn(error, setWarning);
|
|
43754
|
-
});
|
|
43755
|
-
}, [anyError, setWarning]);
|
|
43756
44266
|
const [geneData, loadedGeneName, extents, normData] = useMemo(() => {
|
|
43757
44267
|
const nestedGeneData = nestFeatureSelectionQueryResults(queryKeyScopeTuples, flatGeneData);
|
|
43758
44268
|
const nestedLoadedGeneName = nestFeatureSelectionQueryResults(
|
|
@@ -43763,7 +44273,7 @@ function useFeatureSelectionMultiLevel(loaders, dataset, isRequired, matchOnObj,
|
|
|
43763
44273
|
const nestedNormData = nestFeatureSelectionQueryResults(queryKeyScopeTuples, flatNormData);
|
|
43764
44274
|
return [nestedGeneData, nestedLoadedGeneName, nestedExtents, nestedNormData];
|
|
43765
44275
|
}, [featureQueries.reduce((a, h) => a + h.dataUpdatedAt, 0), queryKeyScopeTuples]);
|
|
43766
|
-
return [geneData, loadedGeneName, extents, normData, dataStatus];
|
|
44276
|
+
return [geneData, loadedGeneName, extents, normData, dataStatus, errors];
|
|
43767
44277
|
}
|
|
43768
44278
|
async function matrixIndicesQueryFn(ctx) {
|
|
43769
44279
|
const { loaders } = ctx.meta;
|
|
@@ -43793,13 +44303,12 @@ async function matrixIndicesQueryFn(ctx) {
|
|
|
43793
44303
|
};
|
|
43794
44304
|
}
|
|
43795
44305
|
if (isRequired) {
|
|
43796
|
-
throw new LoaderNotFoundError(
|
|
44306
|
+
throw new LoaderNotFoundError(`Loader not found for parameters: ${dataset}, ${dataType}, ${JSON.stringify(matchOn)}`);
|
|
43797
44307
|
} else {
|
|
43798
44308
|
return { data: null, dataKey: null };
|
|
43799
44309
|
}
|
|
43800
44310
|
}
|
|
43801
44311
|
function useObsFeatureMatrixIndicesMultiLevel(loaders, dataset, isRequired, matchOnObj, depth) {
|
|
43802
|
-
const setWarning = useSetWarning();
|
|
43803
44312
|
const queryKeyScopeTuples = useMemo(() => getMatrixIndicesQueryKeyScopeTuples(
|
|
43804
44313
|
matchOnObj,
|
|
43805
44314
|
depth,
|
|
@@ -43818,24 +44327,19 @@ function useObsFeatureMatrixIndicesMultiLevel(loaders, dataset, isRequired, matc
|
|
|
43818
44327
|
});
|
|
43819
44328
|
const anyLoading = indicesQueries.some((q) => q.isFetching);
|
|
43820
44329
|
const anyError = indicesQueries.some((q) => q.isError);
|
|
44330
|
+
const errors = anyError ? indicesQueries.filter((q) => q.isError).map((q) => q.error) : [];
|
|
43821
44331
|
const dataStatus = anyLoading ? STATUS.LOADING : anyError ? STATUS.ERROR : STATUS.SUCCESS;
|
|
43822
44332
|
const flatIndicesData = indicesQueries.map((q) => {
|
|
43823
44333
|
var _a2;
|
|
43824
44334
|
return ((_a2 = q.data) == null ? void 0 : _a2.data) || null;
|
|
43825
44335
|
});
|
|
43826
|
-
useEffect(() => {
|
|
43827
|
-
indicesQueries.map((q) => q.error).filter((e) => Boolean(e)).forEach((error) => {
|
|
43828
|
-
warn(error, setWarning);
|
|
43829
|
-
});
|
|
43830
|
-
}, [anyError, setWarning]);
|
|
43831
44336
|
const indicesData = useMemo(() => {
|
|
43832
44337
|
const nestedIndicesData = nestQueryResults(queryKeyScopeTuples, flatIndicesData);
|
|
43833
44338
|
return nestedIndicesData;
|
|
43834
44339
|
}, [indicesQueries.reduce((a, h) => a + h.dataUpdatedAt, 0), queryKeyScopeTuples]);
|
|
43835
|
-
return [indicesData, dataStatus];
|
|
44340
|
+
return [indicesData, dataStatus, errors];
|
|
43836
44341
|
}
|
|
43837
44342
|
function useDataTypeMultiLevel(loaders, dataset, isRequired, matchOnObj, depth, dataType) {
|
|
43838
|
-
const setWarning = useSetWarning();
|
|
43839
44343
|
const queryKeyScopeTuples = useMemo(() => getQueryKeyScopeTuples(
|
|
43840
44344
|
matchOnObj,
|
|
43841
44345
|
depth,
|
|
@@ -43854,21 +44358,17 @@ function useDataTypeMultiLevel(loaders, dataset, isRequired, matchOnObj, depth,
|
|
|
43854
44358
|
});
|
|
43855
44359
|
const anyLoading = locationsQueries.some((q) => q.isFetching);
|
|
43856
44360
|
const anyError = locationsQueries.some((q) => q.isError);
|
|
44361
|
+
const errors = anyError ? locationsQueries.filter((q) => q.isError).map((q) => q.error) : [];
|
|
43857
44362
|
const dataStatus = anyLoading ? STATUS.LOADING : anyError ? STATUS.ERROR : STATUS.SUCCESS;
|
|
43858
44363
|
const flatIndicesData = locationsQueries.map((q) => {
|
|
43859
44364
|
var _a2;
|
|
43860
44365
|
return ((_a2 = q.data) == null ? void 0 : _a2.data) || null;
|
|
43861
44366
|
});
|
|
43862
|
-
useEffect(() => {
|
|
43863
|
-
locationsQueries.map((q) => q.error).filter((e) => Boolean(e)).forEach((error) => {
|
|
43864
|
-
warn(error, setWarning);
|
|
43865
|
-
});
|
|
43866
|
-
}, [anyError, setWarning]);
|
|
43867
44367
|
const locationsData = useMemo(() => {
|
|
43868
44368
|
const nestedIndicesData = nestQueryResults(queryKeyScopeTuples, flatIndicesData);
|
|
43869
44369
|
return nestedIndicesData;
|
|
43870
44370
|
}, [locationsQueries.reduce((a, h) => a + h.dataUpdatedAt, 0), queryKeyScopeTuples]);
|
|
43871
|
-
return [locationsData, dataStatus];
|
|
44371
|
+
return [locationsData, dataStatus, errors];
|
|
43872
44372
|
}
|
|
43873
44373
|
function useObsLocationsMultiLevel(loaders, dataset, isRequired, matchOnObj, depth) {
|
|
43874
44374
|
return useDataTypeMultiLevel(
|
|
@@ -43952,7 +44452,8 @@ function useSegmentationMultiFeatureSelection(coordinationScopes, coordinationSc
|
|
|
43952
44452
|
loadedSelections,
|
|
43953
44453
|
extents,
|
|
43954
44454
|
normData,
|
|
43955
|
-
featureStatus
|
|
44455
|
+
featureStatus,
|
|
44456
|
+
errors
|
|
43956
44457
|
] = useFeatureSelectionMultiLevel(
|
|
43957
44458
|
loaders,
|
|
43958
44459
|
dataset,
|
|
@@ -43961,7 +44462,7 @@ function useSegmentationMultiFeatureSelection(coordinationScopes, coordinationSc
|
|
|
43961
44462
|
selections,
|
|
43962
44463
|
2
|
|
43963
44464
|
);
|
|
43964
|
-
return [featureData, loadedSelections, extents, normData, featureStatus];
|
|
44465
|
+
return [featureData, loadedSelections, extents, normData, featureStatus, errors];
|
|
43965
44466
|
}
|
|
43966
44467
|
function useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
43967
44468
|
const obsFeatureMatrixCoordination = useComplexCoordination(
|
|
@@ -44008,7 +44509,8 @@ function useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy,
|
|
|
44008
44509
|
loadedSelections,
|
|
44009
44510
|
extents,
|
|
44010
44511
|
normData,
|
|
44011
|
-
featureStatus
|
|
44512
|
+
featureStatus,
|
|
44513
|
+
errors
|
|
44012
44514
|
] = useFeatureSelectionMultiLevel(
|
|
44013
44515
|
loaders,
|
|
44014
44516
|
dataset,
|
|
@@ -44017,7 +44519,7 @@ function useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy,
|
|
|
44017
44519
|
selections,
|
|
44018
44520
|
1
|
|
44019
44521
|
);
|
|
44020
|
-
return [featureData, loadedSelections, extents, normData, featureStatus];
|
|
44522
|
+
return [featureData, loadedSelections, extents, normData, featureStatus, errors];
|
|
44021
44523
|
}
|
|
44022
44524
|
function useSegmentationMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
44023
44525
|
const obsFeatureMatrixCoordination = useComplexCoordinationSecondary(
|
|
@@ -44038,14 +44540,14 @@ function useSegmentationMultiObsFeatureMatrixIndices(coordinationScopes, coordin
|
|
|
44038
44540
|
// indirect dependencies here.
|
|
44039
44541
|
[coordinationScopes, coordinationScopesBy]
|
|
44040
44542
|
);
|
|
44041
|
-
const [indicesData, indicesDataStatus] = useObsFeatureMatrixIndicesMultiLevel(
|
|
44543
|
+
const [indicesData, indicesDataStatus, indicesDataErrors] = useObsFeatureMatrixIndicesMultiLevel(
|
|
44042
44544
|
loaders,
|
|
44043
44545
|
dataset,
|
|
44044
44546
|
false,
|
|
44045
44547
|
matchOnObj,
|
|
44046
44548
|
2
|
|
44047
44549
|
);
|
|
44048
|
-
return [indicesData, indicesDataStatus];
|
|
44550
|
+
return [indicesData, indicesDataStatus, indicesDataErrors];
|
|
44049
44551
|
}
|
|
44050
44552
|
function useSpotMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
44051
44553
|
const obsFeatureMatrixCoordination = useComplexCoordination(
|
|
@@ -44065,14 +44567,14 @@ function useSpotMultiObsFeatureMatrixIndices(coordinationScopes, coordinationSco
|
|
|
44065
44567
|
// indirect dependencies here.
|
|
44066
44568
|
[coordinationScopes, coordinationScopesBy]
|
|
44067
44569
|
);
|
|
44068
|
-
const [indicesData, indicesDataStatus] = useObsFeatureMatrixIndicesMultiLevel(
|
|
44570
|
+
const [indicesData, indicesDataStatus, indicesDataErrors] = useObsFeatureMatrixIndicesMultiLevel(
|
|
44069
44571
|
loaders,
|
|
44070
44572
|
dataset,
|
|
44071
44573
|
false,
|
|
44072
44574
|
matchOnObj,
|
|
44073
44575
|
1
|
|
44074
44576
|
);
|
|
44075
|
-
return [indicesData, indicesDataStatus];
|
|
44577
|
+
return [indicesData, indicesDataStatus, indicesDataErrors];
|
|
44076
44578
|
}
|
|
44077
44579
|
function usePointMultiObsLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
44078
44580
|
const obsLabelsCoordination = useComplexCoordination(
|
|
@@ -44091,14 +44593,14 @@ function usePointMultiObsLabels(coordinationScopes, coordinationScopesBy, loader
|
|
|
44091
44593
|
// indirect dependencies here.
|
|
44092
44594
|
[coordinationScopes, coordinationScopesBy]
|
|
44093
44595
|
);
|
|
44094
|
-
const [indicesData, indicesDataStatus] = useObsLabelsMultiLevel(
|
|
44596
|
+
const [indicesData, indicesDataStatus, indicesDataErrors] = useObsLabelsMultiLevel(
|
|
44095
44597
|
loaders,
|
|
44096
44598
|
dataset,
|
|
44097
44599
|
false,
|
|
44098
44600
|
matchOnObj,
|
|
44099
44601
|
1
|
|
44100
44602
|
);
|
|
44101
|
-
return [indicesData, indicesDataStatus];
|
|
44603
|
+
return [indicesData, indicesDataStatus, indicesDataErrors];
|
|
44102
44604
|
}
|
|
44103
44605
|
function useSegmentationMultiObsLocations(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
44104
44606
|
const obsTypeCoordination = useComplexCoordinationSecondary(
|
|
@@ -44117,14 +44619,14 @@ function useSegmentationMultiObsLocations(coordinationScopes, coordinationScopes
|
|
|
44117
44619
|
// indirect dependencies here.
|
|
44118
44620
|
[coordinationScopes, coordinationScopesBy]
|
|
44119
44621
|
);
|
|
44120
|
-
const [indicesData, indicesDataStatus] = useObsLocationsMultiLevel(
|
|
44622
|
+
const [indicesData, indicesDataStatus, indicesDataErrors] = useObsLocationsMultiLevel(
|
|
44121
44623
|
loaders,
|
|
44122
44624
|
dataset,
|
|
44123
44625
|
false,
|
|
44124
44626
|
matchOnObj,
|
|
44125
44627
|
2
|
|
44126
44628
|
);
|
|
44127
|
-
return [indicesData, indicesDataStatus];
|
|
44629
|
+
return [indicesData, indicesDataStatus, indicesDataErrors];
|
|
44128
44630
|
}
|
|
44129
44631
|
function useSegmentationMultiObsSets(coordinationScopes, coordinationScopesBy, loaders, dataset) {
|
|
44130
44632
|
const obsTypeCoordination = useComplexCoordinationSecondary(
|
|
@@ -44143,14 +44645,14 @@ function useSegmentationMultiObsSets(coordinationScopes, coordinationScopesBy, l
|
|
|
44143
44645
|
// indirect dependencies here.
|
|
44144
44646
|
[coordinationScopes, coordinationScopesBy]
|
|
44145
44647
|
);
|
|
44146
|
-
const [indicesData, indicesDataStatus] = useObsSetsMultiLevel(
|
|
44648
|
+
const [indicesData, indicesDataStatus, indicesDataErrors] = useObsSetsMultiLevel(
|
|
44147
44649
|
loaders,
|
|
44148
44650
|
dataset,
|
|
44149
44651
|
false,
|
|
44150
44652
|
matchOnObj,
|
|
44151
44653
|
2
|
|
44152
44654
|
);
|
|
44153
|
-
return [indicesData, indicesDataStatus];
|
|
44655
|
+
return [indicesData, indicesDataStatus, indicesDataErrors];
|
|
44154
44656
|
}
|
|
44155
44657
|
const $b5e257d569688ac6$var$defaultContext = {
|
|
44156
44658
|
prefix: String(Math.round(Math.random() * 1e10)),
|