@docsvision/management-console 6.2.0-beta.11 → 6.2.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +16 -9
- package/index.js +1603 -395
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useState, useEffect, createElement, useRef, useMemo, useContext, memo, isValidElement, cloneElement, Children, createContext, useCallback, useDebugValue, useLayoutEffect, forwardRef as forwardRef$1, Fragment as Fragment$1, Component, useReducer } from "react";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
|
-
import { Accordion as Accordion$1, AccordionSummary, AccordionDetails, Typography as Typography$3, Button as Button$3, Box, CircularProgress as CircularProgress$3, Tooltip as Tooltip$2, Breadcrumbs, IconButton as IconButton$3, Popover as Popover$4, SvgIcon as SvgIcon$3, TableCell as TableCell$2, Grid as Grid$1, Paper as Paper$3, Chip as Chip$1, MenuItem as MenuItem$2, List as List$4, ListItemButton, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, ListItem as ListItem$1, Input as Input$3, TextField as TextField$3, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, RadioGroup, Radio, createTheme as createTheme$3, TableContainer, Table as Table$1, TableHead, TableRow as TableRow$1, TableBody as TableBody$1, capitalize as capitalize$2, ThemeProvider as ThemeProvider$1,
|
|
4
|
+
import { Accordion as Accordion$1, AccordionSummary, AccordionDetails, Typography as Typography$3, Button as Button$3, Box, CircularProgress as CircularProgress$3, Tooltip as Tooltip$2, Breadcrumbs, IconButton as IconButton$3, Popover as Popover$4, SvgIcon as SvgIcon$3, TableCell as TableCell$2, Grid as Grid$1, Paper as Paper$3, Chip as Chip$1, MenuItem as MenuItem$2, List as List$4, ListItemButton, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, ListItem as ListItem$1, Input as Input$3, TextField as TextField$3, InputAdornment as InputAdornment$3, Stack, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, RadioGroup, Radio, createTheme as createTheme$3, TableContainer, Table as Table$1, TableHead, TableRow as TableRow$1, TableBody as TableBody$1, capitalize as capitalize$2, ThemeProvider as ThemeProvider$1, Dialog as Dialog$2, DialogTitle, DialogContent as DialogContent$2, DialogActions as DialogActions$2 } from "@mui/material";
|
|
5
5
|
import * as ReactDOM from "react-dom";
|
|
6
6
|
import ReactDOM__default, { flushSync } from "react-dom";
|
|
7
7
|
import { unstable_createGetCssVar, createSpacing as createSpacing$2, useTheme as useTheme$4, GlobalStyles as GlobalStyles$1, unstable_memoTheme, keyframes, css as css$2, styled as styled$1, alpha as alpha$2, lighten as lighten$2, darken as darken$2, decomposeColor as decomposeColor$2, recomposeColor as recomposeColor$2, getThemeProps as getThemeProps$2 } from "@mui/system";
|
|
@@ -66,7 +66,7 @@ function Accordion(props) {
|
|
|
66
66
|
}
|
|
67
67
|
function AlertBanner({ text }) {
|
|
68
68
|
if (text) {
|
|
69
|
-
return /* @__PURE__ */ jsx("div", { className: "alert-banner", children: /* @__PURE__ */ jsx(Typography$3, {
|
|
69
|
+
return /* @__PURE__ */ jsx("div", { className: "alert-banner", children: /* @__PURE__ */ jsx(Typography$3, { color: "inherit", children: text }) });
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function ButtonWithLoading(props) {
|
|
@@ -218,7 +218,7 @@ var __assign$2 = function() {
|
|
|
218
218
|
};
|
|
219
219
|
return __assign$2.apply(this, arguments);
|
|
220
220
|
};
|
|
221
|
-
function __rest$
|
|
221
|
+
function __rest$3(s2, e2) {
|
|
222
222
|
var t2 = {};
|
|
223
223
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
|
|
224
224
|
t2[p2] = s2[p2];
|
|
@@ -2220,7 +2220,7 @@ function classIfElse(condition, trueCss, falseCss) {
|
|
|
2220
2220
|
return condition ? " " + trueCss + " " : " " + falseCss + " ";
|
|
2221
2221
|
}
|
|
2222
2222
|
var Bar = function(props) {
|
|
2223
|
-
var position = props.position, divProps = __rest$
|
|
2223
|
+
var position = props.position, divProps = __rest$3(props, ["position"]);
|
|
2224
2224
|
return React__default.createElement(
|
|
2225
2225
|
"div",
|
|
2226
2226
|
__assign$2({}, divProps, { className: "scroll-bar__bar" + classIfDefined(props.className) }),
|
|
@@ -2237,7 +2237,7 @@ var ScrollPinIcon = function(props) {
|
|
|
2237
2237
|
var Handle = function(props) {
|
|
2238
2238
|
var position = props.position, title = props.title;
|
|
2239
2239
|
props.forceVisible;
|
|
2240
|
-
var divProps = __rest$
|
|
2240
|
+
var divProps = __rest$3(props, ["position", "title", "forceVisible"]);
|
|
2241
2241
|
return React__default.createElement(
|
|
2242
2242
|
"div",
|
|
2243
2243
|
__assign$2({}, divProps, { className: "scroll-bar__handle" + classIfDefined(props.className) + classIf(props.forceVisible, "scroll-bar__handle_force-visible"), style: { top: (position * 100).toFixed(2) + "%" } }),
|
|
@@ -2249,7 +2249,7 @@ var Placement = function(props) {
|
|
|
2249
2249
|
props.visible;
|
|
2250
2250
|
props.topIdent;
|
|
2251
2251
|
props.bottomIdent;
|
|
2252
|
-
var divProps = __rest$
|
|
2252
|
+
var divProps = __rest$3(props, ["visible", "topIdent", "bottomIdent"]);
|
|
2253
2253
|
return React__default.createElement("div", __assign$2({}, divProps, { className: "scroll-bar__placement" + classIfDefined(props.className) + showIf(props.visible), style: { top: props.topIdent, bottom: props.bottomIdent } }));
|
|
2254
2254
|
};
|
|
2255
2255
|
function calculatePosition(index, bottomIndex, totalCount) {
|
|
@@ -2445,7 +2445,7 @@ var ScrollBar = function(props) {
|
|
|
2445
2445
|
props.browserScrollPosition;
|
|
2446
2446
|
props.onChangeScrollPosition;
|
|
2447
2447
|
props.scrollBarId;
|
|
2448
|
-
var divProps = __rest$
|
|
2448
|
+
var divProps = __rest$3(props, ["topIndex", "bottomIndex", "totalCount", "topIdent", "bottomIdent", "browserScrollPosition", "onChangeScrollPosition", "scrollBarId"]);
|
|
2449
2449
|
var dragStarted = e(logic.$dragStarted);
|
|
2450
2450
|
var position = e(logic.$dragPosition);
|
|
2451
2451
|
var dragIndex = e(logic.$dragIndex);
|
|
@@ -2688,7 +2688,7 @@ var Toolbar$4 = function(props) {
|
|
|
2688
2688
|
var _a;
|
|
2689
2689
|
var height2 = e((_a = props.composition.services.toolbarHeight) === null || _a === void 0 ? void 0 : _a.$height);
|
|
2690
2690
|
props.composition;
|
|
2691
|
-
var className = props.className, style2 = props.style, divProps = __rest$
|
|
2691
|
+
var className = props.className, style2 = props.style, divProps = __rest$3(props, ["composition", "className", "style"]);
|
|
2692
2692
|
return React__default.createElement("div", __assign$2({ className: "dv-toolbar" + classIfDefined(className), style: __assign$2({ height: height2 + "px" }, style2) }, divProps, { "data-testid": "dv-toolbar" }), props.children);
|
|
2693
2693
|
};
|
|
2694
2694
|
var ToolbarHeightService = (
|
|
@@ -2837,7 +2837,7 @@ var __assign$1 = function() {
|
|
|
2837
2837
|
};
|
|
2838
2838
|
return __assign$1.apply(this, arguments);
|
|
2839
2839
|
};
|
|
2840
|
-
function __rest$
|
|
2840
|
+
function __rest$2(s2, e2) {
|
|
2841
2841
|
var t2 = {};
|
|
2842
2842
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
|
|
2843
2843
|
t2[p2] = s2[p2];
|
|
@@ -2852,7 +2852,7 @@ var uid = function() {
|
|
|
2852
2852
|
return Math.random().toString(36).substring(6);
|
|
2853
2853
|
};
|
|
2854
2854
|
var SVG = function(_a) {
|
|
2855
|
-
var animate2 = _a.animate, backgroundColor2 = _a.backgroundColor, backgroundOpacity = _a.backgroundOpacity, baseUrl = _a.baseUrl, children = _a.children, foregroundColor = _a.foregroundColor, foregroundOpacity = _a.foregroundOpacity, gradientRatio = _a.gradientRatio, uniqueKey = _a.uniqueKey, interval = _a.interval, rtl = _a.rtl, speed = _a.speed, style2 = _a.style, title = _a.title, props = __rest$
|
|
2855
|
+
var animate2 = _a.animate, backgroundColor2 = _a.backgroundColor, backgroundOpacity = _a.backgroundOpacity, baseUrl = _a.baseUrl, children = _a.children, foregroundColor = _a.foregroundColor, foregroundOpacity = _a.foregroundOpacity, gradientRatio = _a.gradientRatio, uniqueKey = _a.uniqueKey, interval = _a.interval, rtl = _a.rtl, speed = _a.speed, style2 = _a.style, title = _a.title, props = __rest$2(_a, ["animate", "backgroundColor", "backgroundOpacity", "baseUrl", "children", "foregroundColor", "foregroundOpacity", "gradientRatio", "uniqueKey", "interval", "rtl", "speed", "style", "title"]);
|
|
2856
2856
|
var fixedId = uniqueKey || uid();
|
|
2857
2857
|
var idClip = fixedId + "-diff";
|
|
2858
2858
|
var idGradient = fixedId + "-animated-diff";
|
|
@@ -3191,7 +3191,7 @@ var LazyLoadingService = (
|
|
|
3191
3191
|
);
|
|
3192
3192
|
var Icon = function(props) {
|
|
3193
3193
|
var _a;
|
|
3194
|
-
var loading = props.loading, iconClass = props.iconClass, loadingIconClass = props.loadingIconClass, iconProps = __rest$
|
|
3194
|
+
var loading = props.loading, iconClass = props.iconClass, loadingIconClass = props.loadingIconClass, iconProps = __rest$3(props, ["loading", "iconClass", "loadingIconClass"]);
|
|
3195
3195
|
return React__default.createElement("div", __assign$2({}, iconProps, { "data-testid": loading ? "dv-icon_loading" : "", className: classNames("dv-icon", props.className, (_a = {
|
|
3196
3196
|
"dv-icon_visible": iconClass || loadingIconClass,
|
|
3197
3197
|
"dv-icon_loading": loading,
|
|
@@ -3204,7 +3204,7 @@ var Icon = function(props) {
|
|
|
3204
3204
|
) : props.children);
|
|
3205
3205
|
};
|
|
3206
3206
|
var LoadingMore = function(props) {
|
|
3207
|
-
var loading = props.loading, divProps = __rest$
|
|
3207
|
+
var loading = props.loading, divProps = __rest$3(props, ["loading"]);
|
|
3208
3208
|
return React__default.createElement(
|
|
3209
3209
|
"div",
|
|
3210
3210
|
__assign$2({}, divProps, { className: "loading-more__container" + showIf(loading) + classIfDefined(props.className), "data-testid": "loading-more__container" }),
|
|
@@ -3882,7 +3882,7 @@ var TableHeaderCellContentPlugin = {
|
|
|
3882
3882
|
}
|
|
3883
3883
|
};
|
|
3884
3884
|
var TableHeaderColumn = function(props) {
|
|
3885
|
-
var _a = props.padding, padding2 = _a === void 0 ? true : _a, thProps = __rest$
|
|
3885
|
+
var _a = props.padding, padding2 = _a === void 0 ? true : _a, thProps = __rest$3(props, ["padding"]);
|
|
3886
3886
|
return React__default.createElement("th", __assign$2({}, thProps, { className: classNames("dv-table-header-column", classIfNot(padding2, "dv-table-header-column_no-padding"), props.className) }));
|
|
3887
3887
|
};
|
|
3888
3888
|
var TableHeaderColumnContentWrapperComponent = function(props) {
|
|
@@ -3943,7 +3943,7 @@ function ListViewRowPlugin(specialColumn) {
|
|
|
3943
3943
|
component: function(props) {
|
|
3944
3944
|
var _a;
|
|
3945
3945
|
var _b, _c, _d;
|
|
3946
|
-
var _e2 = props, className = _e2.className, composition = _e2.composition, otherProps = __rest$
|
|
3946
|
+
var _e2 = props, className = _e2.className, composition = _e2.composition, otherProps = __rest$3(_e2, ["className", "composition"]);
|
|
3947
3947
|
var viewMode = (_c = (_b = composition.data.tableData) === null || _b === void 0 ? void 0 : _b.ext.gridUserSettings.gridUserSettings.columnWidthMode) !== null && _c !== void 0 ? _c : 0;
|
|
3948
3948
|
var cellAttributeClassNames = (_a = {}, _a[ListViewRowPluginStyleTypes.Minimal] = "dv-ribbon-row__cell-attributes_width_minimal", _a[ListViewRowPluginStyleTypes.Medium] = "dv-ribbon-row__cell-attributes_width_medium", _a[ListViewRowPluginStyleTypes.Maximal] = "dv-ribbon-row__cell-attributes_width_maximal", _a);
|
|
3949
3949
|
var withSpecialColumn = false;
|
|
@@ -3975,7 +3975,7 @@ var ListViewCellPlugin = {
|
|
|
3975
3975
|
return getListViewEnabled(composition.data.tableData).value;
|
|
3976
3976
|
},
|
|
3977
3977
|
component: function(props) {
|
|
3978
|
-
var _a = props, className = _a.className, composition = _a.composition, otherProps = __rest$
|
|
3978
|
+
var _a = props, className = _a.className, composition = _a.composition, otherProps = __rest$3(_a, ["className", "composition"]);
|
|
3979
3979
|
return React__default.createElement(
|
|
3980
3980
|
"div",
|
|
3981
3981
|
__assign$2({ className: "dv-ribbon-cell" + classIfDefined(className) }, otherProps),
|
|
@@ -4010,11 +4010,11 @@ var ListViewHeaderPlugin = {
|
|
|
4010
4010
|
var Container$1 = function(props) {
|
|
4011
4011
|
props.name;
|
|
4012
4012
|
props.title;
|
|
4013
|
-
var className = props.className, containerProps = __rest$
|
|
4013
|
+
var className = props.className, containerProps = __rest$3(props, ["name", "title", "className"]);
|
|
4014
4014
|
return React__default.createElement("button", __assign$2({ key: props.name, className: classNames("dv-icon-button__container", className), "data-button-name": props.name, "aria-label": props.title }, containerProps), props.children || props.value);
|
|
4015
4015
|
};
|
|
4016
4016
|
var StyledBody = function(props) {
|
|
4017
|
-
var className = props.className, disabled = props.disabled, bodyProps = __rest$
|
|
4017
|
+
var className = props.className, disabled = props.disabled, bodyProps = __rest$3(props, ["className", "disabled"]);
|
|
4018
4018
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-icon-button__styled-body", className, { "dv-icon-button__styled-body_disabled": disabled }) }, bodyProps), props.children);
|
|
4019
4019
|
};
|
|
4020
4020
|
var IconButtonView = (
|
|
@@ -4030,7 +4030,7 @@ var IconButtonView = (
|
|
|
4030
4030
|
);
|
|
4031
4031
|
var IconButton$2 = function(props) {
|
|
4032
4032
|
props.iconClassName;
|
|
4033
|
-
var disabled = props.disabled, children = props.children, buttonProps = __rest$
|
|
4033
|
+
var disabled = props.disabled, children = props.children, buttonProps = __rest$3(props, ["iconClassName", "disabled", "children"]);
|
|
4034
4034
|
var view = useView(props, IconButtonView);
|
|
4035
4035
|
return React__default.createElement(
|
|
4036
4036
|
view.buttonContainer,
|
|
@@ -5185,11 +5185,11 @@ var PopoverLogic = (
|
|
|
5185
5185
|
);
|
|
5186
5186
|
function PopoverModal(props) {
|
|
5187
5187
|
var hideClassName2 = "dv-popover__modal_hide";
|
|
5188
|
-
var isOpen = props.isOpen, divProps = __rest$
|
|
5188
|
+
var isOpen = props.isOpen, divProps = __rest$3(props, ["isOpen"]);
|
|
5189
5189
|
return React__default.createElement("div", __assign$2({ className: "dv-popover__modal" + classIfNot(isOpen, hideClassName2) }, divProps), props.children);
|
|
5190
5190
|
}
|
|
5191
5191
|
var PopoverWrapper = React__default.forwardRef(function(props, ref2) {
|
|
5192
|
-
var className = props.className, divProps = __rest$
|
|
5192
|
+
var className = props.className, divProps = __rest$3(props, ["className"]);
|
|
5193
5193
|
return React__default.createElement("div", __assign$2({ className: "dv-popover__wrapper" + classIfDefined(className), ref: ref2 }, divProps), props.children);
|
|
5194
5194
|
});
|
|
5195
5195
|
var PopoverView = (
|
|
@@ -5249,7 +5249,7 @@ var Popover$3 = function(props) {
|
|
|
5249
5249
|
);
|
|
5250
5250
|
};
|
|
5251
5251
|
var MenuContent = function(props) {
|
|
5252
|
-
var className = props.className, isMobile = props.isMobile, children = props.children, divProps = __rest$
|
|
5252
|
+
var className = props.className, isMobile = props.isMobile, children = props.children, divProps = __rest$3(props, ["className", "isMobile", "children"]);
|
|
5253
5253
|
var defaultClass = isMobile ? "dv-context-menu__content_type_mobile" : "dv-context-menu__content_type_desktop";
|
|
5254
5254
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-context-menu__content", className, defaultClass) }, divProps), children);
|
|
5255
5255
|
};
|
|
@@ -5259,7 +5259,7 @@ var DevicesVisibility = function(props) {
|
|
|
5259
5259
|
return isVisible2 ? React__default.createElement("div", null, props.children) : React__default.createElement("div", null);
|
|
5260
5260
|
};
|
|
5261
5261
|
var DesktopBar = function(props) {
|
|
5262
|
-
var expanded = props.expanded, children = props.children, className = props.className, divProps = __rest$
|
|
5262
|
+
var expanded = props.expanded, children = props.children, className = props.className, divProps = __rest$3(props, ["expanded", "children", "className"]);
|
|
5263
5263
|
return React__default.createElement(
|
|
5264
5264
|
"div",
|
|
5265
5265
|
__assign$2({}, divProps, { className: classNames("dv-context-menu__desktop-bar", className, showIf(expanded)) }),
|
|
@@ -5312,7 +5312,7 @@ var MobileBar = function(props) {
|
|
|
5312
5312
|
);
|
|
5313
5313
|
};
|
|
5314
5314
|
var MenuBar = React__default.forwardRef(function(props, ref2) {
|
|
5315
|
-
var children = props.children, className = props.className, divProps = __rest$
|
|
5315
|
+
var children = props.children, className = props.className, divProps = __rest$3(props, ["children", "className"]);
|
|
5316
5316
|
return React__default.createElement("div", __assign$2({ ref: ref2, className: classNames("dv-adaptive-menu__bar", className) }, divProps), children);
|
|
5317
5317
|
});
|
|
5318
5318
|
var focusableSelector = "a[href], area[href], input, select, textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]";
|
|
@@ -5819,7 +5819,7 @@ var ContextMenu = function(props) {
|
|
|
5819
5819
|
);
|
|
5820
5820
|
};
|
|
5821
5821
|
var DesktopItem = function(props) {
|
|
5822
|
-
var name = props.name, iconClassName = props.iconClassName, className = props.className, onClick = props.onClick, children = props.children, padding2 = props.padding, visible = props.visible, title = props.title, dataTestId = props.dataTestId, divProps = __rest$
|
|
5822
|
+
var name = props.name, iconClassName = props.iconClassName, className = props.className, onClick = props.onClick, children = props.children, padding2 = props.padding, visible = props.visible, title = props.title, dataTestId = props.dataTestId, divProps = __rest$3(props, ["name", "iconClassName", "className", "onClick", "children", "padding", "visible", "title", "dataTestId"]);
|
|
5823
5823
|
var wrap;
|
|
5824
5824
|
var onKeyDown = function(event) {
|
|
5825
5825
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -5843,7 +5843,7 @@ var DesktopItem = function(props) {
|
|
|
5843
5843
|
);
|
|
5844
5844
|
};
|
|
5845
5845
|
var MobileItem = function(props) {
|
|
5846
|
-
var name = props.name, className = props.className, children = props.children, padding2 = props.padding, visible = props.visible, divProps = __rest$
|
|
5846
|
+
var name = props.name, className = props.className, children = props.children, padding2 = props.padding, visible = props.visible, divProps = __rest$3(props, ["name", "className", "children", "padding", "visible"]);
|
|
5847
5847
|
var wrapClassName = classNames("dv-context-menu__mobile-item", showIf(visible || visible === void 0), {
|
|
5848
5848
|
"dv-context-menu__mobile-item_padding-to-child": padding2
|
|
5849
5849
|
});
|
|
@@ -5867,7 +5867,7 @@ var MenuItemView = (
|
|
|
5867
5867
|
);
|
|
5868
5868
|
var MenuItem$1 = function(props) {
|
|
5869
5869
|
var view = useView(props, MenuItemView);
|
|
5870
|
-
var children = props.children, htmlProps = __rest$
|
|
5870
|
+
var children = props.children, htmlProps = __rest$3(props, ["children"]);
|
|
5871
5871
|
return React__default.createElement(
|
|
5872
5872
|
React__default.Fragment,
|
|
5873
5873
|
null,
|
|
@@ -6443,7 +6443,7 @@ serviceName(function(x) {
|
|
|
6443
6443
|
return x.sidePanel;
|
|
6444
6444
|
});
|
|
6445
6445
|
var SidePanelToggleIcon = function(props) {
|
|
6446
|
-
var open = props.open, svgProps = __rest$
|
|
6446
|
+
var open = props.open, svgProps = __rest$3(props, ["open"]);
|
|
6447
6447
|
return React__default.createElement(
|
|
6448
6448
|
"svg",
|
|
6449
6449
|
__assign$2({ version: "1.1", width: "24", height: "24", viewBox: "0 0 24 24", fill: "rgba(0, 0, 0, 0.54)", transform: open ? "scale(-1, 1)" : "", className: "dv-side-panel__toolbar-icon" }, svgProps),
|
|
@@ -6503,15 +6503,15 @@ var ModalDialogBorderSide;
|
|
|
6503
6503
|
})(ModalDialogBorderSide || (ModalDialogBorderSide = {}));
|
|
6504
6504
|
var ModalDialogBorder = function(props) {
|
|
6505
6505
|
props.color;
|
|
6506
|
-
var _b = props.side, side = _b === void 0 ? ModalDialogBorderSide.Top : _b, divProps = __rest$
|
|
6506
|
+
var _b = props.side, side = _b === void 0 ? ModalDialogBorderSide.Top : _b, divProps = __rest$3(props, ["color", "side"]);
|
|
6507
6507
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-modal-dialog__border", "dv-modal-dialog__border_" + side), style: { backgroundColor: props.color } }, divProps));
|
|
6508
6508
|
};
|
|
6509
6509
|
var ModalDialogBox = function(props) {
|
|
6510
|
-
var defaultWidth = props.defaultWidth, maxWidth2 = props.maxWidth, maxHeight2 = props.maxHeight, divProps = __rest$
|
|
6510
|
+
var defaultWidth = props.defaultWidth, maxWidth2 = props.maxWidth, maxHeight2 = props.maxHeight, divProps = __rest$3(props, ["defaultWidth", "maxWidth", "maxHeight"]);
|
|
6511
6511
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-modal-dialog__box", props.className, { "dv-modal-dialog__box_default": !!defaultWidth }), style: { maxWidth: maxWidth2, maxHeight: maxHeight2 } }, divProps), props.children);
|
|
6512
6512
|
};
|
|
6513
6513
|
var ModalDialogButtonPanel = function(props) {
|
|
6514
|
-
var children = props.children, className = props.className, divProps = __rest$
|
|
6514
|
+
var children = props.children, className = props.className, divProps = __rest$3(props, ["children", "className"]);
|
|
6515
6515
|
var wrapWithItem = function(child, key) {
|
|
6516
6516
|
return React__default.createElement("div", { key, className: classNames("dv-modal-dialog__button-panel-item"), children: child });
|
|
6517
6517
|
};
|
|
@@ -6520,7 +6520,7 @@ var ModalDialogButtonPanel = function(props) {
|
|
|
6520
6520
|
}) : wrapWithItem(children, "item"));
|
|
6521
6521
|
};
|
|
6522
6522
|
var ModalDialogCloseButton = function(props) {
|
|
6523
|
-
var _a = props.enabled, enabled = _a === void 0 ? true : _a, className = props.className, linkProps = __rest$
|
|
6523
|
+
var _a = props.enabled, enabled = _a === void 0 ? true : _a, className = props.className, linkProps = __rest$3(props, ["enabled", "className"]);
|
|
6524
6524
|
return React__default.createElement("a", __assign$2({ className: classNames("dv-modal-dialog__close-button", className), "data-testid": "dv-modal-dialog__close-button", onClick: function(ev) {
|
|
6525
6525
|
var _a2;
|
|
6526
6526
|
return enabled && ((_a2 = props.onClick) === null || _a2 === void 0 ? void 0 : _a2.call(props, ev));
|
|
@@ -6531,7 +6531,7 @@ var ModalDialogContainer = function(props) {
|
|
|
6531
6531
|
var isOpen = props.isOpen, _a = props.stopClickPropagation, stopClickPropagation = _a === void 0 ? true : _a, onEsc = props.onEsc;
|
|
6532
6532
|
props.onClick;
|
|
6533
6533
|
var disabledEscHandler = props.disabledEscHandler;
|
|
6534
|
-
__rest$
|
|
6534
|
+
__rest$3(props, ["isOpen", "stopClickPropagation", "onEsc", "onClick", "disabledEscHandler"]);
|
|
6535
6535
|
var onContentClick = function(event) {
|
|
6536
6536
|
if (stopClickPropagation) {
|
|
6537
6537
|
event.nativeEvent.stopPropagation();
|
|
@@ -6550,11 +6550,11 @@ var ModalDialogContent = function(props) {
|
|
|
6550
6550
|
};
|
|
6551
6551
|
var ModalDialogHeader = function(props) {
|
|
6552
6552
|
props.className;
|
|
6553
|
-
var divProps = __rest$
|
|
6553
|
+
var divProps = __rest$3(props, ["className"]);
|
|
6554
6554
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-modal-dialog__header", props.className), "data-testid": "dv-modal-dialog__header" }, divProps), props.children);
|
|
6555
6555
|
};
|
|
6556
6556
|
var ModalDialogScrollable = function(props) {
|
|
6557
|
-
var maxHeight2 = props.maxHeight, divProps = __rest$
|
|
6557
|
+
var maxHeight2 = props.maxHeight, divProps = __rest$3(props, ["maxHeight"]);
|
|
6558
6558
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-modal-dialog__scrollable", props.className), style: { maxHeight: maxHeight2 } }, divProps), props.children);
|
|
6559
6559
|
};
|
|
6560
6560
|
var mModalDialogHostContainerProvider;
|
|
@@ -6604,7 +6604,7 @@ var ModalHost = function(props) {
|
|
|
6604
6604
|
};
|
|
6605
6605
|
var ModalBackdrop$1 = function(props) {
|
|
6606
6606
|
var currentClickTarget;
|
|
6607
|
-
var onClick = props.onClick, visible = props.visible, htmlProps = __rest$
|
|
6607
|
+
var onClick = props.onClick, visible = props.visible, htmlProps = __rest$3(props, ["onClick", "visible"]);
|
|
6608
6608
|
var onMouseDown = function(e2) {
|
|
6609
6609
|
currentClickTarget = e2.target;
|
|
6610
6610
|
};
|
|
@@ -6766,7 +6766,7 @@ var ModalDialog$2 = function(props) {
|
|
|
6766
6766
|
};
|
|
6767
6767
|
var SCROLL_BAR_IDENT = 16;
|
|
6768
6768
|
var SidePanel = function(props) {
|
|
6769
|
-
var children = props.children, composition = props.composition, className = props.className, style2 = props.style, divProps = __rest$
|
|
6769
|
+
var children = props.children, composition = props.composition, className = props.className, style2 = props.style, divProps = __rest$3(props, ["children", "composition", "className", "style"]);
|
|
6770
6770
|
var isOpen = e(props.composition.services.sidePanel.$isOpen);
|
|
6771
6771
|
var scrollContainer = e(props.composition.services.scrollContainer.$scrollContainer);
|
|
6772
6772
|
e(props.composition.services.windowSize.$size);
|
|
@@ -7664,7 +7664,7 @@ var ButtonColorModes;
|
|
|
7664
7664
|
ButtonColorModes2[ButtonColorModes2["Secondary"] = 1] = "Secondary";
|
|
7665
7665
|
})(ButtonColorModes || (ButtonColorModes = {}));
|
|
7666
7666
|
var ButtonStyledBody = function(props) {
|
|
7667
|
-
var className = props.className, disabled = props.disabled, colorMode = props.colorMode, value = props.value, align = props.align, loading = props.loading, iconClass = props.iconClass, loadingIconClass = props.loadingIconClass, loadingIconCenter = props.loadingIconCenter, bodyProps = __rest$
|
|
7667
|
+
var className = props.className, disabled = props.disabled, colorMode = props.colorMode, value = props.value, align = props.align, loading = props.loading, iconClass = props.iconClass, loadingIconClass = props.loadingIconClass, loadingIconCenter = props.loadingIconCenter, bodyProps = __rest$3(props, ["className", "disabled", "colorMode", "value", "align", "loading", "iconClass", "loadingIconClass", "loadingIconCenter"]);
|
|
7668
7668
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-button-body", className, {
|
|
7669
7669
|
"dv-button-body_disabled": disabled && colorMode !== ButtonColorModes.Primary,
|
|
7670
7670
|
"dv-button-body_primary-disabled": disabled && colorMode === ButtonColorModes.Primary,
|
|
@@ -7677,11 +7677,11 @@ var ButtonStyledBody = function(props) {
|
|
|
7677
7677
|
}) }, bodyProps), props.children);
|
|
7678
7678
|
};
|
|
7679
7679
|
var ButtonContainer = function(props) {
|
|
7680
|
-
var className = props.className, stretchWidth = props.stretchWidth, containerProps = __rest$
|
|
7680
|
+
var className = props.className, stretchWidth = props.stretchWidth, containerProps = __rest$3(props, ["className", "stretchWidth"]);
|
|
7681
7681
|
return React__default.createElement("button", __assign$2({ className: classNames("dv-button", className, { "dv-button_stretch-width": stretchWidth !== false }) }, containerProps), props.children || props.value);
|
|
7682
7682
|
};
|
|
7683
7683
|
var TextSimple$1 = function(props) {
|
|
7684
|
-
var paddingLeft = props.paddingLeft, textProps = __rest$
|
|
7684
|
+
var paddingLeft = props.paddingLeft, textProps = __rest$3(props, ["paddingLeft"]);
|
|
7685
7685
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-button-text", props.className, { "dv-button-text_padding-left": paddingLeft }) }, textProps));
|
|
7686
7686
|
};
|
|
7687
7687
|
var ButtonView = (
|
|
@@ -7720,7 +7720,7 @@ var Button$2 = function(props) {
|
|
|
7720
7720
|
var view = useView(props, ButtonView);
|
|
7721
7721
|
var _a = extractStyleBodyProps(props), styledBodyProps = _a[0], _b = _a[1];
|
|
7722
7722
|
_b.onSetupView;
|
|
7723
|
-
var buttonProps = __rest$
|
|
7723
|
+
var buttonProps = __rest$3(_b, ["onSetupView"]);
|
|
7724
7724
|
var hasIcon = Boolean(props.iconClass || props.loading);
|
|
7725
7725
|
var text = props.value || props.children;
|
|
7726
7726
|
return React__default.createElement(
|
|
@@ -7947,7 +7947,7 @@ var MessageWindowService = (
|
|
|
7947
7947
|
}()
|
|
7948
7948
|
);
|
|
7949
7949
|
var ModalHeader = function(props) {
|
|
7950
|
-
var modalIcon = props.modalIcon, color2 = props.color, caption = props.caption, className = props.className, divProps = __rest$
|
|
7950
|
+
var modalIcon = props.modalIcon, color2 = props.color, caption = props.caption, className = props.className, divProps = __rest$3(props, ["modalIcon", "color", "caption", "className"]);
|
|
7951
7951
|
return React__default.createElement(
|
|
7952
7952
|
"div",
|
|
7953
7953
|
__assign$2({ className: classNames("dv-message-box__header-content", className) }, divProps),
|
|
@@ -8211,7 +8211,7 @@ var LabelText = function(props) {
|
|
|
8211
8211
|
return React__default.createElement("span", __assign$2({ className: classNames("dv-checkbox__label-text " + classIfNot(!!props.children, "dv-checkbox__label-text_empty"), props.className) }, props), props.children);
|
|
8212
8212
|
};
|
|
8213
8213
|
var Label = function(props) {
|
|
8214
|
-
var disabled = props.disabled, tabIndex = props.tabIndex, className = props.className, labelProps = __rest$
|
|
8214
|
+
var disabled = props.disabled, tabIndex = props.tabIndex, className = props.className, labelProps = __rest$3(props, ["disabled", "tabIndex", "className"]);
|
|
8215
8215
|
return React__default.createElement("label", __assign$2({}, labelProps, { className: classNames("dv-checkbox__label", { "dv-checkbox__label_disabled": disabled }, className), tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : disabled ? void 0 : 0 }), props.children);
|
|
8216
8216
|
};
|
|
8217
8217
|
var CheckBoxView = (
|
|
@@ -8254,7 +8254,7 @@ var CheckBox$1 = React__default.forwardRef(function(props, ref2) {
|
|
|
8254
8254
|
props.labelText;
|
|
8255
8255
|
props.onSetupView;
|
|
8256
8256
|
props.onSetupLogic;
|
|
8257
|
-
var htmlProps = __rest$
|
|
8257
|
+
var htmlProps = __rest$3(props, ["labelText", "onSetupView", "onSetupLogic"]);
|
|
8258
8258
|
var otherProps = {};
|
|
8259
8259
|
var inputProps = extractInputProps(htmlProps, otherProps);
|
|
8260
8260
|
var checked = props.checked;
|
|
@@ -8434,7 +8434,7 @@ var CheckboxRowPlugin = {
|
|
|
8434
8434
|
};
|
|
8435
8435
|
var composition = props.composition;
|
|
8436
8436
|
props.children;
|
|
8437
|
-
var cellProps = __rest$
|
|
8437
|
+
var cellProps = __rest$3(props, ["composition", "children"]);
|
|
8438
8438
|
var ribbonEnabled = getListViewEnabled(composition.data.tableData).value;
|
|
8439
8439
|
if (!ribbonEnabled) {
|
|
8440
8440
|
return React__default.createElement(
|
|
@@ -8489,7 +8489,7 @@ var CheckboxHeaderPlugin = {
|
|
|
8489
8489
|
var ref2 = React__default.createRef();
|
|
8490
8490
|
props.composition;
|
|
8491
8491
|
props.children;
|
|
8492
|
-
var columnProps = __rest$
|
|
8492
|
+
var columnProps = __rest$3(props, ["composition", "children"]);
|
|
8493
8493
|
return React__default.createElement(
|
|
8494
8494
|
TableHeaderColumn,
|
|
8495
8495
|
__assign$2({ padding: false }, columnProps),
|
|
@@ -11374,7 +11374,7 @@ function inspect() {
|
|
|
11374
11374
|
suffix = zone + '[")]';
|
|
11375
11375
|
return this.format(prefix2 + year + datetime + suffix);
|
|
11376
11376
|
}
|
|
11377
|
-
function format(inputString) {
|
|
11377
|
+
function format$1(inputString) {
|
|
11378
11378
|
if (!inputString) {
|
|
11379
11379
|
inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
|
|
11380
11380
|
}
|
|
@@ -12004,7 +12004,7 @@ proto.calendar = calendar$1;
|
|
|
12004
12004
|
proto.clone = clone;
|
|
12005
12005
|
proto.diff = diff$1;
|
|
12006
12006
|
proto.endOf = endOf;
|
|
12007
|
-
proto.format = format;
|
|
12007
|
+
proto.format = format$1;
|
|
12008
12008
|
proto.from = from;
|
|
12009
12009
|
proto.fromNow = fromNow;
|
|
12010
12010
|
proto.to = to;
|
|
@@ -14661,7 +14661,7 @@ var ColumnListButtonIcon = function(props) {
|
|
|
14661
14661
|
};
|
|
14662
14662
|
var ColumnListIndicator = function(props) {
|
|
14663
14663
|
props.className;
|
|
14664
|
-
var indicatorProps = __rest$
|
|
14664
|
+
var indicatorProps = __rest$3(props, ["className"]);
|
|
14665
14665
|
return React__default.createElement("span", __assign$2({ className: classNames("dv-column-list__indicator", {
|
|
14666
14666
|
"dv-column-list__indicator_ascending": props.sortDirection == SortDirection.Ascending,
|
|
14667
14667
|
"dv-column-list__indicator_descending": props.sortDirection == SortDirection.Descending
|
|
@@ -14669,17 +14669,17 @@ var ColumnListIndicator = function(props) {
|
|
|
14669
14669
|
};
|
|
14670
14670
|
var ColumnListItem = function(props) {
|
|
14671
14671
|
props.className;
|
|
14672
|
-
var isActive = props.isActive, itemProps = __rest$
|
|
14672
|
+
var isActive = props.isActive, itemProps = __rest$3(props, ["className", "isActive"]);
|
|
14673
14673
|
var itemClassnames = classNames("dv-column-list__item", { "dv-column-list__item_sorted": props.sortDirection != SortDirection.Disabled || isActive });
|
|
14674
14674
|
return React__default.createElement("li", __assign$2({ className: itemClassnames }, itemProps), props.children);
|
|
14675
14675
|
};
|
|
14676
14676
|
var ColumnListMenu = function(props) {
|
|
14677
|
-
var className = props.className, menuProps = __rest$
|
|
14677
|
+
var className = props.className, menuProps = __rest$3(props, ["className"]);
|
|
14678
14678
|
return React__default.createElement("ul", __assign$2({ className: classNames("dv-column-list__menu", className) }, menuProps), props.children);
|
|
14679
14679
|
};
|
|
14680
14680
|
var ColumnListText = function(props) {
|
|
14681
14681
|
props.className;
|
|
14682
|
-
var sortDirection = props.sortDirection, textProps = __rest$
|
|
14682
|
+
var sortDirection = props.sortDirection, textProps = __rest$3(props, ["className", "sortDirection"]);
|
|
14683
14683
|
return React__default.createElement("span", __assign$2({ className: classNames("dv-column-list__text", { "dv-column-list__text_sort": sortDirection !== SortDirection.Disabled }) }, textProps), props.children);
|
|
14684
14684
|
};
|
|
14685
14685
|
var ColumnListWrapper = React__default.forwardRef(function(props, ref2) {
|
|
@@ -14687,7 +14687,7 @@ var ColumnListWrapper = React__default.forwardRef(function(props, ref2) {
|
|
|
14687
14687
|
return React__default.createElement("span", { className: classNames("dv-column-list__wrapper", className), ref: ref2 }, props.children);
|
|
14688
14688
|
});
|
|
14689
14689
|
var ColumnListContainer = React__default.forwardRef(function(props, ref2) {
|
|
14690
|
-
var className = props.className, containerProps = __rest$
|
|
14690
|
+
var className = props.className, containerProps = __rest$3(props, ["className"]);
|
|
14691
14691
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-column-list__container", className), ref: ref2 }, containerProps), props.children);
|
|
14692
14692
|
});
|
|
14693
14693
|
var ColumnListButtonView = (
|
|
@@ -33868,8 +33868,8 @@ function requireRepeatString() {
|
|
|
33868
33868
|
hasRequiredRepeatString = 1;
|
|
33869
33869
|
var res = "";
|
|
33870
33870
|
var cache2;
|
|
33871
|
-
repeatString =
|
|
33872
|
-
function
|
|
33871
|
+
repeatString = repeat2;
|
|
33872
|
+
function repeat2(str, num) {
|
|
33873
33873
|
if (typeof str !== "string") {
|
|
33874
33874
|
throw new TypeError("expected a string");
|
|
33875
33875
|
}
|
|
@@ -33900,7 +33900,7 @@ var hasRequiredDist;
|
|
|
33900
33900
|
function requireDist() {
|
|
33901
33901
|
if (hasRequiredDist) return dist;
|
|
33902
33902
|
hasRequiredDist = 1;
|
|
33903
|
-
var
|
|
33903
|
+
var repeat2 = requireRepeatString();
|
|
33904
33904
|
var splitOnTags = function splitOnTags2(str) {
|
|
33905
33905
|
return str.split(/(<\/?[^>]+>)/g).filter(function(line) {
|
|
33906
33906
|
return line.trim() !== "";
|
|
@@ -33945,7 +33945,7 @@ function requireDist() {
|
|
|
33945
33945
|
if (isClosingTag(item)) {
|
|
33946
33946
|
depth--;
|
|
33947
33947
|
}
|
|
33948
|
-
var line =
|
|
33948
|
+
var line = repeat2(indent, depth) + item;
|
|
33949
33949
|
if (isOpeningTag(item)) {
|
|
33950
33950
|
depth++;
|
|
33951
33951
|
}
|
|
@@ -33999,7 +33999,7 @@ function ArrowDownIcon(props) {
|
|
|
33999
33999
|
);
|
|
34000
34000
|
}
|
|
34001
34001
|
var DropdownContainer = React__default.forwardRef(function DropdownContainer2(props, ref2) {
|
|
34002
|
-
var className = props.className, containerBodyClassName = props.containerBodyClassName, isMenuOpen = props.isMenuOpen, iconClassName = props.iconClassName, children = props.children, disabled = props.disabled, divProps = __rest$
|
|
34002
|
+
var className = props.className, containerBodyClassName = props.containerBodyClassName, isMenuOpen = props.isMenuOpen, iconClassName = props.iconClassName, children = props.children, disabled = props.disabled, divProps = __rest$3(props, ["className", "containerBodyClassName", "isMenuOpen", "iconClassName", "children", "disabled"]);
|
|
34003
34003
|
return React__default.createElement(
|
|
34004
34004
|
"div",
|
|
34005
34005
|
__assign$2({ className: "dv-dropdown__container" + classIfDefined(className) + classIf(disabled, "dv-dropdown__container_disabled"), ref: ref2 }, divProps),
|
|
@@ -34012,16 +34012,16 @@ var DropdownContainer = React__default.forwardRef(function DropdownContainer2(pr
|
|
|
34012
34012
|
);
|
|
34013
34013
|
});
|
|
34014
34014
|
function DropdownContent(props) {
|
|
34015
|
-
var selectedValue = props.selectedValue, className = props.className, elementProps = __rest$
|
|
34015
|
+
var selectedValue = props.selectedValue, className = props.className, elementProps = __rest$3(props, ["selectedValue", "className"]);
|
|
34016
34016
|
return React__default.createElement("div", __assign$2({ className: "dv-dropdown__content" + classIfDefined(className) }, elementProps), selectedValue);
|
|
34017
34017
|
}
|
|
34018
34018
|
var DropdownMenu = React__default.forwardRef(function DropdownMenu2(props, ref2) {
|
|
34019
|
-
var className = props.className, children = props.children, ulProps = __rest$
|
|
34019
|
+
var className = props.className, children = props.children, ulProps = __rest$3(props, ["className", "children"]);
|
|
34020
34020
|
return React__default.createElement("ul", __assign$2({ className: "dv-dropdown__menu" + classIfDefined(className), ref: ref2 }, ulProps), children);
|
|
34021
34021
|
});
|
|
34022
34022
|
var DropdownOption$1 = React__default.forwardRef(function DropdownOption(props, ref2) {
|
|
34023
34023
|
var _a, _b;
|
|
34024
|
-
var className = props.className, selected = props.selected, contentClassName = props.contentClassName, tooltipText = props.tooltipText, children = props.children, liProps = __rest$
|
|
34024
|
+
var className = props.className, selected = props.selected, contentClassName = props.contentClassName, tooltipText = props.tooltipText, children = props.children, liProps = __rest$3(props, ["className", "selected", "contentClassName", "tooltipText", "children"]);
|
|
34025
34025
|
var contentRef = React__default.useRef(null);
|
|
34026
34026
|
var showTooltipText = ((_a = contentRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) > ((_b = contentRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight);
|
|
34027
34027
|
return React__default.createElement(
|
|
@@ -35242,7 +35242,7 @@ var __assign = function() {
|
|
|
35242
35242
|
};
|
|
35243
35243
|
return __assign.apply(this, arguments);
|
|
35244
35244
|
};
|
|
35245
|
-
function __rest(s2, e2) {
|
|
35245
|
+
function __rest$1(s2, e2) {
|
|
35246
35246
|
var t2 = {};
|
|
35247
35247
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
|
|
35248
35248
|
t2[p2] = s2[p2];
|
|
@@ -38516,7 +38516,7 @@ var green$1 = {
|
|
|
38516
38516
|
500: "#4caf50",
|
|
38517
38517
|
700: "#388e3c"
|
|
38518
38518
|
};
|
|
38519
|
-
function clamp$
|
|
38519
|
+
function clamp$3(value) {
|
|
38520
38520
|
var min2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
38521
38521
|
var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
38522
38522
|
return Math.min(Math.max(min2, value), max2);
|
|
@@ -38609,7 +38609,7 @@ function fade(color2, value) {
|
|
|
38609
38609
|
}
|
|
38610
38610
|
function alpha$1(color2, value) {
|
|
38611
38611
|
color2 = decomposeColor$1(color2);
|
|
38612
|
-
value = clamp$
|
|
38612
|
+
value = clamp$3(value);
|
|
38613
38613
|
if (color2.type === "rgb" || color2.type === "hsl") {
|
|
38614
38614
|
color2.type += "a";
|
|
38615
38615
|
}
|
|
@@ -38618,7 +38618,7 @@ function alpha$1(color2, value) {
|
|
|
38618
38618
|
}
|
|
38619
38619
|
function darken$1(color2, coefficient) {
|
|
38620
38620
|
color2 = decomposeColor$1(color2);
|
|
38621
|
-
coefficient = clamp$
|
|
38621
|
+
coefficient = clamp$3(coefficient);
|
|
38622
38622
|
if (color2.type.indexOf("hsl") !== -1) {
|
|
38623
38623
|
color2.values[2] *= 1 - coefficient;
|
|
38624
38624
|
} else if (color2.type.indexOf("rgb") !== -1) {
|
|
@@ -38630,7 +38630,7 @@ function darken$1(color2, coefficient) {
|
|
|
38630
38630
|
}
|
|
38631
38631
|
function lighten$1(color2, coefficient) {
|
|
38632
38632
|
color2 = decomposeColor$1(color2);
|
|
38633
|
-
coefficient = clamp$
|
|
38633
|
+
coefficient = clamp$3(coefficient);
|
|
38634
38634
|
if (color2.type.indexOf("hsl") !== -1) {
|
|
38635
38635
|
color2.values[2] += (100 - color2.values[2]) * coefficient;
|
|
38636
38636
|
} else if (color2.type.indexOf("rgb") !== -1) {
|
|
@@ -39564,7 +39564,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
39564
39564
|
}(React__default.Component);
|
|
39565
39565
|
Transition.contextType = TransitionGroupContext;
|
|
39566
39566
|
Transition.propTypes = {};
|
|
39567
|
-
function noop$
|
|
39567
|
+
function noop$4() {
|
|
39568
39568
|
}
|
|
39569
39569
|
Transition.defaultProps = {
|
|
39570
39570
|
in: false,
|
|
@@ -39573,12 +39573,12 @@ Transition.defaultProps = {
|
|
|
39573
39573
|
appear: false,
|
|
39574
39574
|
enter: true,
|
|
39575
39575
|
exit: true,
|
|
39576
|
-
onEnter: noop$
|
|
39577
|
-
onEntering: noop$
|
|
39578
|
-
onEntered: noop$
|
|
39579
|
-
onExit: noop$
|
|
39580
|
-
onExiting: noop$
|
|
39581
|
-
onExited: noop$
|
|
39576
|
+
onEnter: noop$4,
|
|
39577
|
+
onEntering: noop$4,
|
|
39578
|
+
onEntered: noop$4,
|
|
39579
|
+
onExit: noop$4,
|
|
39580
|
+
onExiting: noop$4,
|
|
39581
|
+
onExited: noop$4
|
|
39582
39582
|
};
|
|
39583
39583
|
Transition.UNMOUNTED = UNMOUNTED;
|
|
39584
39584
|
Transition.EXITED = EXITED;
|
|
@@ -45424,7 +45424,7 @@ var useStyles = makeStyles(function(theme2) {
|
|
|
45424
45424
|
});
|
|
45425
45425
|
var ToolbarText = function(_a) {
|
|
45426
45426
|
var _b;
|
|
45427
|
-
var selected = _a.selected, label = _a.label, _c = _a.className, className = _c === void 0 ? null : _c, other = __rest(_a, ["selected", "label", "className"]);
|
|
45427
|
+
var selected = _a.selected, label = _a.label, _c = _a.className, className = _c === void 0 ? null : _c, other = __rest$1(_a, ["selected", "label", "className"]);
|
|
45428
45428
|
var classes2 = useStyles();
|
|
45429
45429
|
return createElement(Typography$2, __assign({
|
|
45430
45430
|
children: label,
|
|
@@ -45432,7 +45432,7 @@ var ToolbarText = function(_a) {
|
|
|
45432
45432
|
}, other));
|
|
45433
45433
|
};
|
|
45434
45434
|
var ToolbarButton = function(_a) {
|
|
45435
|
-
var classes2 = _a.classes, _b = _a.className, className = _b === void 0 ? null : _b, label = _a.label, selected = _a.selected, variant = _a.variant, align = _a.align, typographyClassName = _a.typographyClassName, other = __rest(_a, ["classes", "className", "label", "selected", "variant", "align", "typographyClassName"]);
|
|
45435
|
+
var classes2 = _a.classes, _b = _a.className, className = _b === void 0 ? null : _b, label = _a.label, selected = _a.selected, variant = _a.variant, align = _a.align, typographyClassName = _a.typographyClassName, other = __rest$1(_a, ["classes", "className", "label", "selected", "variant", "align", "typographyClassName"]);
|
|
45436
45436
|
return createElement(Button$1$1, __assign({
|
|
45437
45437
|
variant: "text",
|
|
45438
45438
|
className: clsx$3(classes2.toolbarBtn, className)
|
|
@@ -45479,7 +45479,7 @@ var useStyles$1 = makeStyles(function(theme2) {
|
|
|
45479
45479
|
});
|
|
45480
45480
|
var PickerToolbar = function(_a) {
|
|
45481
45481
|
var _b;
|
|
45482
|
-
var children = _a.children, isLandscape = _a.isLandscape, _c = _a.className, className = _c === void 0 ? null : _c, other = __rest(_a, ["children", "isLandscape", "className"]);
|
|
45482
|
+
var children = _a.children, isLandscape = _a.isLandscape, _c = _a.className, className = _c === void 0 ? null : _c, other = __rest$1(_a, ["children", "isLandscape", "className"]);
|
|
45483
45483
|
var classes2 = useStyles$1();
|
|
45484
45484
|
return createElement(Toolbar$3, __assign({
|
|
45485
45485
|
className: clsx$3(classes2.toolbar, (_b = {}, _b[classes2.toolbarLandscape] = isLandscape, _b), className)
|
|
@@ -45658,7 +45658,7 @@ var useStyles$3 = makeStyles(function(theme2) {
|
|
|
45658
45658
|
});
|
|
45659
45659
|
var Day = function(_a) {
|
|
45660
45660
|
var _b;
|
|
45661
|
-
var children = _a.children, disabled = _a.disabled, hidden = _a.hidden, current = _a.current, selected = _a.selected, other = __rest(_a, ["children", "disabled", "hidden", "current", "selected"]);
|
|
45661
|
+
var children = _a.children, disabled = _a.disabled, hidden = _a.hidden, current = _a.current, selected = _a.selected, other = __rest$1(_a, ["children", "disabled", "hidden", "current", "selected"]);
|
|
45662
45662
|
var classes2 = useStyles$3();
|
|
45663
45663
|
var className = clsx$3(classes2.day, (_b = {}, _b[classes2.hidden] = hidden, _b[classes2.current] = current, _b[classes2.daySelected] = selected, _b[classes2.dayDisabled] = disabled, _b));
|
|
45664
45664
|
return createElement(IconButton$1$1, __assign({
|
|
@@ -45677,7 +45677,7 @@ Day.defaultProps = {
|
|
|
45677
45677
|
selected: false
|
|
45678
45678
|
};
|
|
45679
45679
|
var DayWrapper = function(_a) {
|
|
45680
|
-
var children = _a.children, value = _a.value, disabled = _a.disabled, onSelect = _a.onSelect, dayInCurrentMonth = _a.dayInCurrentMonth, other = __rest(_a, ["children", "value", "disabled", "onSelect", "dayInCurrentMonth"]);
|
|
45680
|
+
var children = _a.children, value = _a.value, disabled = _a.disabled, onSelect = _a.onSelect, dayInCurrentMonth = _a.dayInCurrentMonth, other = __rest$1(_a, ["children", "value", "disabled", "onSelect", "dayInCurrentMonth"]);
|
|
45681
45681
|
var handleClick = useCallback(function() {
|
|
45682
45682
|
return onSelect(value);
|
|
45683
45683
|
}, [onSelect, value]);
|
|
@@ -46163,7 +46163,7 @@ var useStyles$6 = makeStyles(function(theme2) {
|
|
|
46163
46163
|
});
|
|
46164
46164
|
var Year = function(_a) {
|
|
46165
46165
|
var _b;
|
|
46166
|
-
var onSelect = _a.onSelect, forwardedRef = _a.forwardedRef, value = _a.value, selected = _a.selected, disabled = _a.disabled, children = _a.children, other = __rest(_a, ["onSelect", "forwardedRef", "value", "selected", "disabled", "children"]);
|
|
46166
|
+
var onSelect = _a.onSelect, forwardedRef = _a.forwardedRef, value = _a.value, selected = _a.selected, disabled = _a.disabled, children = _a.children, other = __rest$1(_a, ["onSelect", "forwardedRef", "value", "selected", "disabled", "children"]);
|
|
46167
46167
|
var classes2 = useStyles$6();
|
|
46168
46168
|
var handleClick = useCallback(function() {
|
|
46169
46169
|
return onSelect(value);
|
|
@@ -46215,7 +46215,7 @@ var ModalDialog = function(_a) {
|
|
|
46215
46215
|
var _b, _c;
|
|
46216
46216
|
var children = _a.children, classes2 = _a.classes, onAccept = _a.onAccept, onDismiss = _a.onDismiss, onClear = _a.onClear, onSetToday = _a.onSetToday, okLabel = _a.okLabel, cancelLabel = _a.cancelLabel, clearLabel = _a.clearLabel, todayLabel = _a.todayLabel, clearable = _a.clearable, showTodayButton = _a.showTodayButton;
|
|
46217
46217
|
_a.showTabs;
|
|
46218
|
-
var wider = _a.wider, other = __rest(_a, ["children", "classes", "onAccept", "onDismiss", "onClear", "onSetToday", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "clearable", "showTodayButton", "showTabs", "wider"]);
|
|
46218
|
+
var wider = _a.wider, other = __rest$1(_a, ["children", "classes", "onAccept", "onDismiss", "onClear", "onSetToday", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "clearable", "showTodayButton", "showTabs", "wider"]);
|
|
46219
46219
|
return createElement(Dialog$1, __assign({
|
|
46220
46220
|
role: "dialog",
|
|
46221
46221
|
onClose: onDismiss,
|
|
@@ -46269,7 +46269,7 @@ var ModalDialog$1 = withStyles(styles$2$1, {
|
|
|
46269
46269
|
name: "MuiPickersModal"
|
|
46270
46270
|
})(ModalDialog);
|
|
46271
46271
|
var ModalWrapper = function(_a) {
|
|
46272
|
-
var open = _a.open, children = _a.children, okLabel = _a.okLabel, cancelLabel = _a.cancelLabel, clearLabel = _a.clearLabel, todayLabel = _a.todayLabel, showTodayButton = _a.showTodayButton, clearable = _a.clearable, DialogProps = _a.DialogProps, showTabs = _a.showTabs, wider = _a.wider, InputComponent = _a.InputComponent, DateInputProps = _a.DateInputProps, onClear = _a.onClear, onAccept = _a.onAccept, onDismiss = _a.onDismiss, onSetToday = _a.onSetToday, other = __rest(_a, ["open", "children", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "showTodayButton", "clearable", "DialogProps", "showTabs", "wider", "InputComponent", "DateInputProps", "onClear", "onAccept", "onDismiss", "onSetToday"]);
|
|
46272
|
+
var open = _a.open, children = _a.children, okLabel = _a.okLabel, cancelLabel = _a.cancelLabel, clearLabel = _a.clearLabel, todayLabel = _a.todayLabel, showTodayButton = _a.showTodayButton, clearable = _a.clearable, DialogProps = _a.DialogProps, showTabs = _a.showTabs, wider = _a.wider, InputComponent = _a.InputComponent, DateInputProps = _a.DateInputProps, onClear = _a.onClear, onAccept = _a.onAccept, onDismiss = _a.onDismiss, onSetToday = _a.onSetToday, other = __rest$1(_a, ["open", "children", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "showTodayButton", "clearable", "DialogProps", "showTabs", "wider", "InputComponent", "DateInputProps", "onClear", "onAccept", "onDismiss", "onSetToday"]);
|
|
46273
46273
|
useKeyDown(open, {
|
|
46274
46274
|
Enter: onAccept
|
|
46275
46275
|
});
|
|
@@ -46317,7 +46317,7 @@ var InlineWrapper = function(_a) {
|
|
|
46317
46317
|
_a.onSetToday;
|
|
46318
46318
|
var onAccept = _a.onAccept;
|
|
46319
46319
|
_a.showTabs;
|
|
46320
|
-
var DateInputProps = _a.DateInputProps, InputComponent = _a.InputComponent, other = __rest(_a, ["open", "wider", "children", "PopoverProps", "onClear", "onDismiss", "onSetToday", "onAccept", "showTabs", "DateInputProps", "InputComponent"]);
|
|
46320
|
+
var DateInputProps = _a.DateInputProps, InputComponent = _a.InputComponent, other = __rest$1(_a, ["open", "wider", "children", "PopoverProps", "onClear", "onDismiss", "onSetToday", "onAccept", "showTabs", "DateInputProps", "InputComponent"]);
|
|
46321
46321
|
var ref2 = useRef();
|
|
46322
46322
|
var classes2 = useStyles$8();
|
|
46323
46323
|
useKeyDown(open, {
|
|
@@ -46355,7 +46355,7 @@ function getWrapperFromVariant(variant) {
|
|
|
46355
46355
|
}
|
|
46356
46356
|
var VariantContext = createContext(null);
|
|
46357
46357
|
var Wrapper = function(_a) {
|
|
46358
|
-
var variant = _a.variant, props = __rest(_a, ["variant"]);
|
|
46358
|
+
var variant = _a.variant, props = __rest$1(_a, ["variant"]);
|
|
46359
46359
|
var Component2 = getWrapperFromVariant(variant);
|
|
46360
46360
|
return createElement(VariantContext.Provider, {
|
|
46361
46361
|
value: variant || "dialog"
|
|
@@ -46936,7 +46936,7 @@ var useStyles$b = makeStyles(function(theme2) {
|
|
|
46936
46936
|
});
|
|
46937
46937
|
var Month = function(_a) {
|
|
46938
46938
|
var _b;
|
|
46939
|
-
var selected = _a.selected, onSelect = _a.onSelect, disabled = _a.disabled, value = _a.value, children = _a.children, other = __rest(_a, ["selected", "onSelect", "disabled", "value", "children"]);
|
|
46939
|
+
var selected = _a.selected, onSelect = _a.onSelect, disabled = _a.disabled, value = _a.value, children = _a.children, other = __rest$1(_a, ["selected", "onSelect", "disabled", "value", "children"]);
|
|
46940
46940
|
var classes2 = useStyles$b();
|
|
46941
46941
|
var handleSelection = useCallback(function() {
|
|
46942
46942
|
onSelect(value);
|
|
@@ -47405,7 +47405,7 @@ function usePickerState(props, options) {
|
|
|
47405
47405
|
return pickerState;
|
|
47406
47406
|
}
|
|
47407
47407
|
var PureDateInput = function(_a) {
|
|
47408
|
-
var inputValue = _a.inputValue, inputVariant = _a.inputVariant, validationError = _a.validationError, InputProps = _a.InputProps, _b = _a.TextFieldComponent, TextFieldComponent = _b === void 0 ? TextField$2 : _b, other = __rest(_a, ["inputValue", "inputVariant", "validationError", "InputProps", "TextFieldComponent"]);
|
|
47408
|
+
var inputValue = _a.inputValue, inputVariant = _a.inputVariant, validationError = _a.validationError, InputProps = _a.InputProps, _b = _a.TextFieldComponent, TextFieldComponent = _b === void 0 ? TextField$2 : _b, other = __rest$1(_a, ["inputValue", "inputVariant", "validationError", "InputProps", "TextFieldComponent"]);
|
|
47409
47409
|
var PureDateInputProps = useMemo(function() {
|
|
47410
47410
|
return __assign(__assign({}, InputProps), {
|
|
47411
47411
|
readOnly: true
|
|
@@ -47447,7 +47447,7 @@ function makePurePicker(_a) {
|
|
|
47447
47447
|
props.invalidLabel;
|
|
47448
47448
|
var timeIcon = props.timeIcon;
|
|
47449
47449
|
props.value;
|
|
47450
|
-
var variant = props.variant, orientation = props.orientation, disableToolbar = props.disableToolbar, loadingIndicator = props.loadingIndicator, _a2 = props.ToolbarComponent, ToolbarComponent = _a2 === void 0 ? DefaultToolbarComponent : _a2, showActionsBar = props.showActionsBar, showTodayButton = props.showTodayButton, todayLabel = props.todayLabel, showShiftButtons = props.showShiftButtons, setShiftFunction = props.setShiftFunction, shiftButtonValues = props.shiftButtonValues, other = __rest(props, ["allowKeyboardControl", "ampm", "hideTabs", "animateYearScrolling", "autoOk", "disableFuture", "disablePast", "format", "forwardedRef", "initialFocusedDate", "invalidDateMessage", "labelFunc", "leftArrowIcon", "leftArrowButtonProps", "maxDate", "maxDateMessage", "minDate", "onOpen", "onClose", "minDateMessage", "strictCompareDates", "minutesStep", "onAccept", "onChange", "onMonthChange", "onYearChange", "renderDay", "views", "openTo", "rightArrowIcon", "rightArrowButtonProps", "shouldDisableDate", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "value", "variant", "orientation", "disableToolbar", "loadingIndicator", "ToolbarComponent", "showActionsBar", "showTodayButton", "todayLabel", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
|
|
47450
|
+
var variant = props.variant, orientation = props.orientation, disableToolbar = props.disableToolbar, loadingIndicator = props.loadingIndicator, _a2 = props.ToolbarComponent, ToolbarComponent = _a2 === void 0 ? DefaultToolbarComponent : _a2, showActionsBar = props.showActionsBar, showTodayButton = props.showTodayButton, todayLabel = props.todayLabel, showShiftButtons = props.showShiftButtons, setShiftFunction = props.setShiftFunction, shiftButtonValues = props.shiftButtonValues, other = __rest$1(props, ["allowKeyboardControl", "ampm", "hideTabs", "animateYearScrolling", "autoOk", "disableFuture", "disablePast", "format", "forwardedRef", "initialFocusedDate", "invalidDateMessage", "labelFunc", "leftArrowIcon", "leftArrowButtonProps", "maxDate", "maxDateMessage", "minDate", "onOpen", "onClose", "minDateMessage", "strictCompareDates", "minutesStep", "onAccept", "onChange", "onMonthChange", "onYearChange", "renderDay", "views", "openTo", "rightArrowIcon", "rightArrowButtonProps", "shouldDisableDate", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "value", "variant", "orientation", "disableToolbar", "loadingIndicator", "ToolbarComponent", "showActionsBar", "showTodayButton", "todayLabel", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
|
|
47451
47451
|
var injectedProps = getCustomProps ? getCustomProps(props) : {};
|
|
47452
47452
|
var options = useOptions2(props);
|
|
47453
47453
|
var _b = usePickerState(props, options), pickerProps = _b.pickerProps, inputProps = _b.inputProps, wrapperProps = _b.wrapperProps;
|
|
@@ -47599,7 +47599,7 @@ var Rifm = function(props) {
|
|
|
47599
47599
|
var KeyboardDateInput = function(_a) {
|
|
47600
47600
|
var inputValue = _a.inputValue, _b = _a.showErrorOnBlur, showErrorOnBlur = _b === void 0 ? false : _b, inputVariant = _a.inputVariant, validationError = _a.validationError, KeyboardButtonProps = _a.KeyboardButtonProps, InputAdornmentProps = _a.InputAdornmentProps, onClick = _a.onClick, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, InputProps = _a.InputProps, mask2 = _a.mask, _c = _a.maskChar, maskChar = _c === void 0 ? "_" : _c;
|
|
47601
47601
|
_a.refuse;
|
|
47602
|
-
var format2 = _a.format, keyboardIcon = _a.keyboardIcon, disabled = _a.disabled, rifmFormatter = _a.rifmFormatter, _e2 = _a.TextFieldComponent, TextFieldComponent = _e2 === void 0 ? TextField$2 : _e2, other = __rest(_a, ["inputValue", "showErrorOnBlur", "inputVariant", "validationError", "KeyboardButtonProps", "InputAdornmentProps", "onClick", "onChange", "onBlur", "onFocus", "InputProps", "mask", "maskChar", "refuse", "format", "keyboardIcon", "disabled", "rifmFormatter", "TextFieldComponent"]);
|
|
47602
|
+
var format2 = _a.format, keyboardIcon = _a.keyboardIcon, disabled = _a.disabled, rifmFormatter = _a.rifmFormatter, _e2 = _a.TextFieldComponent, TextFieldComponent = _e2 === void 0 ? TextField$2 : _e2, other = __rest$1(_a, ["inputValue", "showErrorOnBlur", "inputVariant", "validationError", "KeyboardButtonProps", "InputAdornmentProps", "onClick", "onChange", "onBlur", "onFocus", "InputProps", "mask", "maskChar", "refuse", "format", "keyboardIcon", "disabled", "rifmFormatter", "TextFieldComponent"]);
|
|
47603
47603
|
var inputMask = mask2 || makeMaskFromFormat(format2, maskChar);
|
|
47604
47604
|
var letterPosition = format2.indexOf("a");
|
|
47605
47605
|
var formatter = useCallback(maskedDateFormatter(inputMask, maskChar), [mask2, maskChar]);
|
|
@@ -47730,7 +47730,7 @@ function makeKeyboardPicker(_a) {
|
|
|
47730
47730
|
var dateRangeIcon = props.dateRangeIcon;
|
|
47731
47731
|
props.emptyLabel;
|
|
47732
47732
|
props.invalidLabel;
|
|
47733
|
-
var timeIcon = props.timeIcon, orientation = props.orientation, variant = props.variant, disableToolbar = props.disableToolbar, loadingIndicator = props.loadingIndicator, showActionsBar = props.showActionsBar, showTodayButton = props.showTodayButton, todayLabel = props.todayLabel, _a2 = props.ToolbarComponent, ToolbarComponent = _a2 === void 0 ? DefaultToolbarComponent : _a2, showShiftButtons = props.showShiftButtons, setShiftFunction = props.setShiftFunction, shiftButtonValues = props.shiftButtonValues, other = __rest(props, ["allowKeyboardControl", "ampm", "hideTabs", "animateYearScrolling", "autoOk", "disableFuture", "disablePast", "format", "forwardedRef", "initialFocusedDate", "invalidDateMessage", "labelFunc", "leftArrowIcon", "leftArrowButtonProps", "maxDate", "maxDateMessage", "minDate", "onOpen", "onClose", "minDateMessage", "strictCompareDates", "minutesStep", "onAccept", "onChange", "onMonthChange", "onYearChange", "renderDay", "views", "openTo", "rightArrowIcon", "rightArrowButtonProps", "shouldDisableDate", "value", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "orientation", "variant", "disableToolbar", "loadingIndicator", "showActionsBar", "showTodayButton", "todayLabel", "ToolbarComponent", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
|
|
47733
|
+
var timeIcon = props.timeIcon, orientation = props.orientation, variant = props.variant, disableToolbar = props.disableToolbar, loadingIndicator = props.loadingIndicator, showActionsBar = props.showActionsBar, showTodayButton = props.showTodayButton, todayLabel = props.todayLabel, _a2 = props.ToolbarComponent, ToolbarComponent = _a2 === void 0 ? DefaultToolbarComponent : _a2, showShiftButtons = props.showShiftButtons, setShiftFunction = props.setShiftFunction, shiftButtonValues = props.shiftButtonValues, other = __rest$1(props, ["allowKeyboardControl", "ampm", "hideTabs", "animateYearScrolling", "autoOk", "disableFuture", "disablePast", "format", "forwardedRef", "initialFocusedDate", "invalidDateMessage", "labelFunc", "leftArrowIcon", "leftArrowButtonProps", "maxDate", "maxDateMessage", "minDate", "onOpen", "onClose", "minDateMessage", "strictCompareDates", "minutesStep", "onAccept", "onChange", "onMonthChange", "onYearChange", "renderDay", "views", "openTo", "rightArrowIcon", "rightArrowButtonProps", "shouldDisableDate", "value", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "orientation", "variant", "disableToolbar", "loadingIndicator", "showActionsBar", "showTodayButton", "todayLabel", "ToolbarComponent", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
|
|
47734
47734
|
var injectedProps = getCustomProps ? getCustomProps(props) : {};
|
|
47735
47735
|
var options = useOptions2(props);
|
|
47736
47736
|
var _b = useKeyboardPickerState(props, options), pickerProps = _b.pickerProps, inputProps = _b.inputProps, wrapperProps = _b.wrapperProps;
|
|
@@ -52799,7 +52799,7 @@ function ErrorBlock({ text, close }) {
|
|
|
52799
52799
|
] });
|
|
52800
52800
|
}
|
|
52801
52801
|
function ErrorMessage(props) {
|
|
52802
|
-
return /* @__PURE__ */ jsx("p",
|
|
52802
|
+
return /* @__PURE__ */ jsx(Typography$3, { component: "p", variant: "caption", className: classNames("error-message", props.className), children: props.message });
|
|
52803
52803
|
}
|
|
52804
52804
|
function ExpandButton$1(props) {
|
|
52805
52805
|
const { expanded, dataTestId, className, ...buttonProps } = props;
|
|
@@ -54023,11 +54023,11 @@ function extendSxProp$1(props) {
|
|
|
54023
54023
|
sx: finalSx
|
|
54024
54024
|
};
|
|
54025
54025
|
}
|
|
54026
|
-
function clamp$
|
|
54026
|
+
function clamp$2(val, min2 = Number.MIN_SAFE_INTEGER, max2 = Number.MAX_SAFE_INTEGER) {
|
|
54027
54027
|
return Math.max(min2, Math.min(val, max2));
|
|
54028
54028
|
}
|
|
54029
54029
|
function clampWrapper(value, min2 = 0, max2 = 1) {
|
|
54030
|
-
return clamp$
|
|
54030
|
+
return clamp$2(value, min2, max2);
|
|
54031
54031
|
}
|
|
54032
54032
|
function hexToRgb(color2) {
|
|
54033
54033
|
color2 = color2.slice(1);
|
|
@@ -58959,14 +58959,14 @@ function TextMessage(props) {
|
|
|
58959
58959
|
const { content, wrapperClassName, footer, footerClassName, header, headerClassName, contentClassName } = props;
|
|
58960
58960
|
const textContent = getTextContent$1(content, contentClassName);
|
|
58961
58961
|
return /* @__PURE__ */ jsxs("div", { className: classNames("text-message__wrapper", wrapperClassName), children: [
|
|
58962
|
-
header && /* @__PURE__ */ jsx("p",
|
|
58962
|
+
header && /* @__PURE__ */ jsx(Typography$3, { component: "p", className: headerClassName, children: header }),
|
|
58963
58963
|
textContent,
|
|
58964
|
-
footer && /* @__PURE__ */ jsx("p",
|
|
58964
|
+
footer && /* @__PURE__ */ jsx(Typography$3, { component: "p", className: footerClassName, children: footer })
|
|
58965
58965
|
] });
|
|
58966
58966
|
}
|
|
58967
58967
|
function getTextContent$1(content, className) {
|
|
58968
58968
|
if (typeof content === "string") {
|
|
58969
|
-
return /* @__PURE__ */ jsx("p",
|
|
58969
|
+
return /* @__PURE__ */ jsx(Typography$3, { component: "p", className, children: content });
|
|
58970
58970
|
}
|
|
58971
58971
|
return /* @__PURE__ */ jsx("ul", { className: classNames("text-message__list", className), children: content.map((m2) => /* @__PURE__ */ jsx("li", { children: m2 }, m2)) });
|
|
58972
58972
|
}
|
|
@@ -59004,7 +59004,7 @@ function CellTextContent({ content, multiline = false }) {
|
|
|
59004
59004
|
const shouldShowTooltip = isWidthOverflowing || isHeightOverflowing;
|
|
59005
59005
|
setShowTooltip(shouldShowTooltip);
|
|
59006
59006
|
}, [contentRef, content]);
|
|
59007
|
-
return /* @__PURE__ */ jsx(LightTooltip, { title: content, placement: "top-start", disableHoverListener: !showTooltip, children: /* @__PURE__ */ jsx("div", { ref: contentRef, className: multiline ? "cell-text-content-multiline" : "cell-text-content", children: /* @__PURE__ */ jsx("
|
|
59007
|
+
return /* @__PURE__ */ jsx(LightTooltip, { title: content, placement: "top-start", disableHoverListener: !showTooltip, children: /* @__PURE__ */ jsx("div", { ref: contentRef, className: multiline ? "cell-text-content-multiline" : "cell-text-content", children: /* @__PURE__ */ jsx(Typography$3, { variant: "body2", children: content }) }) });
|
|
59008
59008
|
}
|
|
59009
59009
|
function CellWithFixedWidth(props) {
|
|
59010
59010
|
const { content, maxWidth: maxWidth2 } = props;
|
|
@@ -59027,6 +59027,12 @@ function CellWithTwoLineClamping(props) {
|
|
|
59027
59027
|
};
|
|
59028
59028
|
return /* @__PURE__ */ jsx(Cell, { className, style: { maxWidth: maxWidth2 }, align: props.align || "left", onClick, children: /* @__PURE__ */ jsx(LightTooltip, { title: content, placement: "top-start", disableHoverListener: !showTooltip, children: /* @__PURE__ */ jsx("div", { ref: contentRef, className: "mui-table__cell-clamp-two-line", children: content }) }) });
|
|
59029
59029
|
}
|
|
59030
|
+
const ArrowDropDownOutlined = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59031
|
+
d: "m7 10 5 5 5-5z"
|
|
59032
|
+
}));
|
|
59033
|
+
const ArrowDropUpOutlined = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59034
|
+
d: "m7 14 5-5 5 5z"
|
|
59035
|
+
}));
|
|
59030
59036
|
const Clear = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
59031
59037
|
d: "M19 6.41 17.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"
|
|
59032
59038
|
}));
|
|
@@ -59060,7 +59066,7 @@ function DatabaseSettingsCard(props) {
|
|
|
59060
59066
|
/* @__PURE__ */ jsxs(Grid$1, { container: true, alignItems: "center", justifyContent: "space-between", wrap: "nowrap", className: "database-settings-card__head", children: [
|
|
59061
59067
|
/* @__PURE__ */ jsxs(Grid$1, { container: true, alignItems: "center", children: [
|
|
59062
59068
|
/* @__PURE__ */ jsx(StorageRounded, { color: "secondary", fontSize: "large" }),
|
|
59063
|
-
/* @__PURE__ */ jsx("
|
|
59069
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "h5", className: "database-settings-card__title", children: title })
|
|
59064
59070
|
] }),
|
|
59065
59071
|
/* @__PURE__ */ jsx(Grid$1, { children: isDefault && /* @__PURE__ */ jsx(Chip$1, { className: "database-settings-card__chip", size: "small", label }) })
|
|
59066
59072
|
] }),
|
|
@@ -59076,7 +59082,7 @@ function DropdownBody(props) {
|
|
|
59076
59082
|
const shouldShowTooltip = contentRef.current?.scrollWidth > contentRef.current?.offsetWidth;
|
|
59077
59083
|
setShowTooltip(shouldShowTooltip);
|
|
59078
59084
|
}, [displayName]);
|
|
59079
|
-
return /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: showTooltip ? displayName : "", disableFocusListener: true, disableTouchListener: true, children: /* @__PURE__ */ jsx("span",
|
|
59085
|
+
return /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: showTooltip ? displayName : "", disableFocusListener: true, disableTouchListener: true, children: /* @__PURE__ */ jsx(Typography$3, { component: "span", ref: contentRef, className: "dropdown-body", children: displayName }) });
|
|
59080
59086
|
}
|
|
59081
59087
|
function getDisplayName(label, options, value) {
|
|
59082
59088
|
if (typeof value === "undefined" || value === null) return label;
|
|
@@ -59086,7 +59092,7 @@ function getDisplayName(label, options, value) {
|
|
|
59086
59092
|
const DropdownOption2 = React__default.forwardRef(function DropdownOption22({ displayName, ...menuItemProps }, ref2) {
|
|
59087
59093
|
const contentRef = React__default.useRef(null);
|
|
59088
59094
|
const showTooltip = contentRef.current?.scrollWidth > contentRef.current?.offsetWidth;
|
|
59089
|
-
return /* @__PURE__ */ jsx(MenuItem$2, { ref: ref2, ...menuItemProps, children: /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: showTooltip ? displayName : "", disableFocusListener: true, disableTouchListener: true, children: /* @__PURE__ */ jsx("span",
|
|
59095
|
+
return /* @__PURE__ */ jsx(MenuItem$2, { ref: ref2, ...menuItemProps, children: /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: showTooltip ? displayName : "", disableFocusListener: true, disableTouchListener: true, children: /* @__PURE__ */ jsx(Typography$3, { component: "span", ref: contentRef, className: "dropdown-option__content", children: displayName }) }) });
|
|
59090
59096
|
});
|
|
59091
59097
|
function EditorWrapper({ children, isChanged, isEditable }) {
|
|
59092
59098
|
return /* @__PURE__ */ jsx("div", { className: classNames(classIf(isChanged, "changed"), classIf(isEditable, "editable"), "editor-wrapper"), children });
|
|
@@ -59130,10 +59136,10 @@ function EditorCollectionEditor(props) {
|
|
|
59130
59136
|
] });
|
|
59131
59137
|
}
|
|
59132
59138
|
function EditorDescription({ text }) {
|
|
59133
|
-
return text ? /* @__PURE__ */ jsx("
|
|
59139
|
+
return text ? /* @__PURE__ */ jsx(Typography$3, { variant: "body2", className: "editor-description", children: text }) : null;
|
|
59134
59140
|
}
|
|
59135
59141
|
function EditorName({ text }) {
|
|
59136
|
-
return /* @__PURE__ */ jsx("
|
|
59142
|
+
return /* @__PURE__ */ jsx(Typography$3, { variant: "h5", className: "editor-name", children: text });
|
|
59137
59143
|
}
|
|
59138
59144
|
function EditorInnerWrapper(props) {
|
|
59139
59145
|
const { label, description, children, className } = props;
|
|
@@ -59148,7 +59154,7 @@ function GroupPanel(props) {
|
|
|
59148
59154
|
return /* @__PURE__ */ jsx(List$4, { component: Paper$3, children: groups && Object.keys(groups).map((group) => {
|
|
59149
59155
|
return /* @__PURE__ */ jsxs(ListItemButton, { onClick: () => selectGroup(group), selected: selectedGroup === group, children: [
|
|
59150
59156
|
/* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(GroupIcon, {}) }),
|
|
59151
|
-
/* @__PURE__ */ jsx(ListItemText$1, { primary: group })
|
|
59157
|
+
/* @__PURE__ */ jsx(ListItemText$1, { slotProps: { primary: { variant: "body2" } }, primary: group })
|
|
59152
59158
|
] }, group);
|
|
59153
59159
|
}) });
|
|
59154
59160
|
}
|
|
@@ -73737,11 +73743,11 @@ function computeHeadingLevel(element) {
|
|
|
73737
73743
|
return ariaLevelAttribute || implicitHeadingLevels[element.tagName];
|
|
73738
73744
|
}
|
|
73739
73745
|
const normalize = getDefaultNormalizer();
|
|
73740
|
-
function escapeRegExp$
|
|
73746
|
+
function escapeRegExp$2(string) {
|
|
73741
73747
|
return string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
|
|
73742
73748
|
}
|
|
73743
73749
|
function getRegExpMatcher(string) {
|
|
73744
|
-
return new RegExp(escapeRegExp$
|
|
73750
|
+
return new RegExp(escapeRegExp$2(string.toLowerCase()), "i");
|
|
73745
73751
|
}
|
|
73746
73752
|
function makeSuggestion(queryName, element, content, _ref3) {
|
|
73747
73753
|
let {
|
|
@@ -76611,6 +76617,1213 @@ const WithSelectedItem = {
|
|
|
76611
76617
|
function NoOptionMenuItem({ text }) {
|
|
76612
76618
|
return /* @__PURE__ */ jsx(MenuItem$2, { className: "no-option-menu-item", disabled: true, children: text });
|
|
76613
76619
|
}
|
|
76620
|
+
const UNINITIALIZED = {};
|
|
76621
|
+
function useLazyRef(init, initArg) {
|
|
76622
|
+
const ref2 = React.useRef(UNINITIALIZED);
|
|
76623
|
+
if (ref2.current === UNINITIALIZED) {
|
|
76624
|
+
ref2.current = init(initArg);
|
|
76625
|
+
}
|
|
76626
|
+
return ref2;
|
|
76627
|
+
}
|
|
76628
|
+
const EMPTY$1 = [];
|
|
76629
|
+
function useOnMount(fn2) {
|
|
76630
|
+
React.useEffect(fn2, EMPTY$1);
|
|
76631
|
+
}
|
|
76632
|
+
class Timeout {
|
|
76633
|
+
static create() {
|
|
76634
|
+
return new Timeout();
|
|
76635
|
+
}
|
|
76636
|
+
currentId = null;
|
|
76637
|
+
/**
|
|
76638
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
76639
|
+
*/
|
|
76640
|
+
start(delay, fn2) {
|
|
76641
|
+
this.clear();
|
|
76642
|
+
this.currentId = setTimeout(() => {
|
|
76643
|
+
this.currentId = null;
|
|
76644
|
+
fn2();
|
|
76645
|
+
}, delay);
|
|
76646
|
+
}
|
|
76647
|
+
clear = () => {
|
|
76648
|
+
if (this.currentId !== null) {
|
|
76649
|
+
clearTimeout(this.currentId);
|
|
76650
|
+
this.currentId = null;
|
|
76651
|
+
}
|
|
76652
|
+
};
|
|
76653
|
+
disposeEffect = () => {
|
|
76654
|
+
return this.clear;
|
|
76655
|
+
};
|
|
76656
|
+
}
|
|
76657
|
+
function useTimeout() {
|
|
76658
|
+
const timeout = useLazyRef(Timeout.create).current;
|
|
76659
|
+
useOnMount(timeout.disposeEffect);
|
|
76660
|
+
return timeout;
|
|
76661
|
+
}
|
|
76662
|
+
function isFocusVisible(element) {
|
|
76663
|
+
try {
|
|
76664
|
+
return element.matches(":focus-visible");
|
|
76665
|
+
} catch (error) {
|
|
76666
|
+
}
|
|
76667
|
+
return false;
|
|
76668
|
+
}
|
|
76669
|
+
function getScrollbarSize(win = window) {
|
|
76670
|
+
const documentWidth = win.document.documentElement.clientWidth;
|
|
76671
|
+
return win.innerWidth - documentWidth;
|
|
76672
|
+
}
|
|
76673
|
+
const usePreviousProps = (value) => {
|
|
76674
|
+
const ref2 = React.useRef({});
|
|
76675
|
+
React.useEffect(() => {
|
|
76676
|
+
ref2.current = value;
|
|
76677
|
+
});
|
|
76678
|
+
return ref2.current;
|
|
76679
|
+
};
|
|
76680
|
+
function isHostComponent$1(element) {
|
|
76681
|
+
return typeof element === "string";
|
|
76682
|
+
}
|
|
76683
|
+
function appendOwnerState(elementType, otherProps, ownerState) {
|
|
76684
|
+
if (elementType === void 0 || isHostComponent$1(elementType)) {
|
|
76685
|
+
return otherProps;
|
|
76686
|
+
}
|
|
76687
|
+
return {
|
|
76688
|
+
...otherProps,
|
|
76689
|
+
ownerState: {
|
|
76690
|
+
...otherProps.ownerState,
|
|
76691
|
+
...ownerState
|
|
76692
|
+
}
|
|
76693
|
+
};
|
|
76694
|
+
}
|
|
76695
|
+
function extractEventHandlers(object, excludeKeys = []) {
|
|
76696
|
+
if (object === void 0) {
|
|
76697
|
+
return {};
|
|
76698
|
+
}
|
|
76699
|
+
const result = {};
|
|
76700
|
+
Object.keys(object).filter((prop) => prop.match(/^on[A-Z]/) && typeof object[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
|
|
76701
|
+
result[prop] = object[prop];
|
|
76702
|
+
});
|
|
76703
|
+
return result;
|
|
76704
|
+
}
|
|
76705
|
+
function omitEventHandlers(object) {
|
|
76706
|
+
if (object === void 0) {
|
|
76707
|
+
return {};
|
|
76708
|
+
}
|
|
76709
|
+
const result = {};
|
|
76710
|
+
Object.keys(object).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object[prop] === "function")).forEach((prop) => {
|
|
76711
|
+
result[prop] = object[prop];
|
|
76712
|
+
});
|
|
76713
|
+
return result;
|
|
76714
|
+
}
|
|
76715
|
+
function mergeSlotProps(parameters) {
|
|
76716
|
+
const {
|
|
76717
|
+
getSlotProps,
|
|
76718
|
+
additionalProps,
|
|
76719
|
+
externalSlotProps,
|
|
76720
|
+
externalForwardedProps,
|
|
76721
|
+
className
|
|
76722
|
+
} = parameters;
|
|
76723
|
+
if (!getSlotProps) {
|
|
76724
|
+
const joinedClasses2 = clsx$1(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
76725
|
+
const mergedStyle2 = {
|
|
76726
|
+
...additionalProps?.style,
|
|
76727
|
+
...externalForwardedProps?.style,
|
|
76728
|
+
...externalSlotProps?.style
|
|
76729
|
+
};
|
|
76730
|
+
const props2 = {
|
|
76731
|
+
...additionalProps,
|
|
76732
|
+
...externalForwardedProps,
|
|
76733
|
+
...externalSlotProps
|
|
76734
|
+
};
|
|
76735
|
+
if (joinedClasses2.length > 0) {
|
|
76736
|
+
props2.className = joinedClasses2;
|
|
76737
|
+
}
|
|
76738
|
+
if (Object.keys(mergedStyle2).length > 0) {
|
|
76739
|
+
props2.style = mergedStyle2;
|
|
76740
|
+
}
|
|
76741
|
+
return {
|
|
76742
|
+
props: props2,
|
|
76743
|
+
internalRef: void 0
|
|
76744
|
+
};
|
|
76745
|
+
}
|
|
76746
|
+
const eventHandlers = extractEventHandlers({
|
|
76747
|
+
...externalForwardedProps,
|
|
76748
|
+
...externalSlotProps
|
|
76749
|
+
});
|
|
76750
|
+
const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
|
|
76751
|
+
const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
|
|
76752
|
+
const internalSlotProps = getSlotProps(eventHandlers);
|
|
76753
|
+
const joinedClasses = clsx$1(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
76754
|
+
const mergedStyle = {
|
|
76755
|
+
...internalSlotProps?.style,
|
|
76756
|
+
...additionalProps?.style,
|
|
76757
|
+
...externalForwardedProps?.style,
|
|
76758
|
+
...externalSlotProps?.style
|
|
76759
|
+
};
|
|
76760
|
+
const props = {
|
|
76761
|
+
...internalSlotProps,
|
|
76762
|
+
...additionalProps,
|
|
76763
|
+
...otherPropsWithoutEventHandlers,
|
|
76764
|
+
...componentsPropsWithoutEventHandlers
|
|
76765
|
+
};
|
|
76766
|
+
if (joinedClasses.length > 0) {
|
|
76767
|
+
props.className = joinedClasses;
|
|
76768
|
+
}
|
|
76769
|
+
if (Object.keys(mergedStyle).length > 0) {
|
|
76770
|
+
props.style = mergedStyle;
|
|
76771
|
+
}
|
|
76772
|
+
return {
|
|
76773
|
+
props,
|
|
76774
|
+
internalRef: internalSlotProps.ref
|
|
76775
|
+
};
|
|
76776
|
+
}
|
|
76777
|
+
function resolveComponentProps(componentProps, ownerState, slotState) {
|
|
76778
|
+
if (typeof componentProps === "function") {
|
|
76779
|
+
return componentProps(ownerState, slotState);
|
|
76780
|
+
}
|
|
76781
|
+
return componentProps;
|
|
76782
|
+
}
|
|
76783
|
+
function useSlotProps(parameters) {
|
|
76784
|
+
const {
|
|
76785
|
+
elementType,
|
|
76786
|
+
externalSlotProps,
|
|
76787
|
+
ownerState,
|
|
76788
|
+
skipResolvingSlotProps = false,
|
|
76789
|
+
...other
|
|
76790
|
+
} = parameters;
|
|
76791
|
+
const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
|
|
76792
|
+
const {
|
|
76793
|
+
props: mergedProps,
|
|
76794
|
+
internalRef
|
|
76795
|
+
} = mergeSlotProps({
|
|
76796
|
+
...other,
|
|
76797
|
+
externalSlotProps: resolvedComponentsProps
|
|
76798
|
+
});
|
|
76799
|
+
const ref2 = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);
|
|
76800
|
+
const props = appendOwnerState(elementType, {
|
|
76801
|
+
...mergedProps,
|
|
76802
|
+
ref: ref2
|
|
76803
|
+
}, ownerState);
|
|
76804
|
+
return props;
|
|
76805
|
+
}
|
|
76806
|
+
function getReactElementRef(element) {
|
|
76807
|
+
if (parseInt(React.version, 10) >= 19) {
|
|
76808
|
+
return element?.props?.ref || null;
|
|
76809
|
+
}
|
|
76810
|
+
return element?.ref || null;
|
|
76811
|
+
}
|
|
76812
|
+
function __rest(s2, e2) {
|
|
76813
|
+
var t2 = {};
|
|
76814
|
+
for (var p2 in s2) {
|
|
76815
|
+
if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) {
|
|
76816
|
+
t2[p2] = s2[p2];
|
|
76817
|
+
}
|
|
76818
|
+
}
|
|
76819
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") {
|
|
76820
|
+
for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
|
|
76821
|
+
if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) {
|
|
76822
|
+
t2[p2[i2]] = s2[p2[i2]];
|
|
76823
|
+
}
|
|
76824
|
+
}
|
|
76825
|
+
}
|
|
76826
|
+
return t2;
|
|
76827
|
+
}
|
|
76828
|
+
var SourceType;
|
|
76829
|
+
(function(SourceType2) {
|
|
76830
|
+
SourceType2["event"] = "event";
|
|
76831
|
+
SourceType2["props"] = "prop";
|
|
76832
|
+
})(SourceType || (SourceType = {}));
|
|
76833
|
+
function noop$3() {
|
|
76834
|
+
}
|
|
76835
|
+
function memoizeOnce(cb) {
|
|
76836
|
+
var lastArgs;
|
|
76837
|
+
var lastValue = void 0;
|
|
76838
|
+
return function() {
|
|
76839
|
+
var args = [], len = arguments.length;
|
|
76840
|
+
while (len--) args[len] = arguments[len];
|
|
76841
|
+
if (lastArgs && args.length === lastArgs.length && args.every(function(value, index) {
|
|
76842
|
+
return value === lastArgs[index];
|
|
76843
|
+
})) {
|
|
76844
|
+
return lastValue;
|
|
76845
|
+
}
|
|
76846
|
+
lastArgs = args;
|
|
76847
|
+
lastValue = cb.apply(void 0, args);
|
|
76848
|
+
return lastValue;
|
|
76849
|
+
};
|
|
76850
|
+
}
|
|
76851
|
+
function charIsNumber(char) {
|
|
76852
|
+
return !!(char || "").match(/\d/);
|
|
76853
|
+
}
|
|
76854
|
+
function isNil(val) {
|
|
76855
|
+
return val === null || val === void 0;
|
|
76856
|
+
}
|
|
76857
|
+
function isNanValue(val) {
|
|
76858
|
+
return typeof val === "number" && isNaN(val);
|
|
76859
|
+
}
|
|
76860
|
+
function isNotValidValue(val) {
|
|
76861
|
+
return isNil(val) || isNanValue(val) || typeof val === "number" && !isFinite(val);
|
|
76862
|
+
}
|
|
76863
|
+
function escapeRegExp$1(str) {
|
|
76864
|
+
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
76865
|
+
}
|
|
76866
|
+
function getThousandsGroupRegex(thousandsGroupStyle) {
|
|
76867
|
+
switch (thousandsGroupStyle) {
|
|
76868
|
+
case "lakh":
|
|
76869
|
+
return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
|
|
76870
|
+
case "wan":
|
|
76871
|
+
return /(\d)(?=(\d{4})+(?!\d))/g;
|
|
76872
|
+
case "thousand":
|
|
76873
|
+
default:
|
|
76874
|
+
return /(\d)(?=(\d{3})+(?!\d))/g;
|
|
76875
|
+
}
|
|
76876
|
+
}
|
|
76877
|
+
function applyThousandSeparator(str, thousandSeparator, thousandsGroupStyle) {
|
|
76878
|
+
var thousandsGroupRegex = getThousandsGroupRegex(thousandsGroupStyle);
|
|
76879
|
+
var index = str.search(/[1-9]/);
|
|
76880
|
+
index = index === -1 ? str.length : index;
|
|
76881
|
+
return str.substring(0, index) + str.substring(index, str.length).replace(thousandsGroupRegex, "$1" + thousandSeparator);
|
|
76882
|
+
}
|
|
76883
|
+
function usePersistentCallback(cb) {
|
|
76884
|
+
var callbackRef = useRef(cb);
|
|
76885
|
+
callbackRef.current = cb;
|
|
76886
|
+
var persistentCbRef = useRef(function() {
|
|
76887
|
+
var args = [], len = arguments.length;
|
|
76888
|
+
while (len--) args[len] = arguments[len];
|
|
76889
|
+
return callbackRef.current.apply(callbackRef, args);
|
|
76890
|
+
});
|
|
76891
|
+
return persistentCbRef.current;
|
|
76892
|
+
}
|
|
76893
|
+
function splitDecimal(numStr, allowNegative) {
|
|
76894
|
+
if (allowNegative === void 0) allowNegative = true;
|
|
76895
|
+
var hasNegation = numStr[0] === "-";
|
|
76896
|
+
var addNegation = hasNegation && allowNegative;
|
|
76897
|
+
numStr = numStr.replace("-", "");
|
|
76898
|
+
var parts = numStr.split(".");
|
|
76899
|
+
var beforeDecimal = parts[0];
|
|
76900
|
+
var afterDecimal = parts[1] || "";
|
|
76901
|
+
return {
|
|
76902
|
+
beforeDecimal,
|
|
76903
|
+
afterDecimal,
|
|
76904
|
+
hasNegation,
|
|
76905
|
+
addNegation
|
|
76906
|
+
};
|
|
76907
|
+
}
|
|
76908
|
+
function fixLeadingZero(numStr) {
|
|
76909
|
+
if (!numStr) {
|
|
76910
|
+
return numStr;
|
|
76911
|
+
}
|
|
76912
|
+
var isNegative = numStr[0] === "-";
|
|
76913
|
+
if (isNegative) {
|
|
76914
|
+
numStr = numStr.substring(1, numStr.length);
|
|
76915
|
+
}
|
|
76916
|
+
var parts = numStr.split(".");
|
|
76917
|
+
var beforeDecimal = parts[0].replace(/^0+/, "") || "0";
|
|
76918
|
+
var afterDecimal = parts[1] || "";
|
|
76919
|
+
return (isNegative ? "-" : "") + beforeDecimal + (afterDecimal ? "." + afterDecimal : "");
|
|
76920
|
+
}
|
|
76921
|
+
function limitToScale(numStr, scale, fixedDecimalScale) {
|
|
76922
|
+
var str = "";
|
|
76923
|
+
var filler = fixedDecimalScale ? "0" : "";
|
|
76924
|
+
for (var i2 = 0; i2 <= scale - 1; i2++) {
|
|
76925
|
+
str += numStr[i2] || filler;
|
|
76926
|
+
}
|
|
76927
|
+
return str;
|
|
76928
|
+
}
|
|
76929
|
+
function repeat(str, count) {
|
|
76930
|
+
return Array(count + 1).join(str);
|
|
76931
|
+
}
|
|
76932
|
+
function toNumericString(num) {
|
|
76933
|
+
var _num = num + "";
|
|
76934
|
+
var sign2 = _num[0] === "-" ? "-" : "";
|
|
76935
|
+
if (sign2) {
|
|
76936
|
+
_num = _num.substring(1);
|
|
76937
|
+
}
|
|
76938
|
+
var ref2 = _num.split(/[eE]/g);
|
|
76939
|
+
var coefficient = ref2[0];
|
|
76940
|
+
var exponent = ref2[1];
|
|
76941
|
+
exponent = Number(exponent);
|
|
76942
|
+
if (!exponent) {
|
|
76943
|
+
return sign2 + coefficient;
|
|
76944
|
+
}
|
|
76945
|
+
coefficient = coefficient.replace(".", "");
|
|
76946
|
+
var decimalIndex = 1 + exponent;
|
|
76947
|
+
var coffiecientLn = coefficient.length;
|
|
76948
|
+
if (decimalIndex < 0) {
|
|
76949
|
+
coefficient = "0." + repeat("0", Math.abs(decimalIndex)) + coefficient;
|
|
76950
|
+
} else if (decimalIndex >= coffiecientLn) {
|
|
76951
|
+
coefficient = coefficient + repeat("0", decimalIndex - coffiecientLn);
|
|
76952
|
+
} else {
|
|
76953
|
+
coefficient = (coefficient.substring(0, decimalIndex) || "0") + "." + coefficient.substring(decimalIndex);
|
|
76954
|
+
}
|
|
76955
|
+
return sign2 + coefficient;
|
|
76956
|
+
}
|
|
76957
|
+
function roundToPrecision(numStr, scale, fixedDecimalScale) {
|
|
76958
|
+
if (["", "-"].indexOf(numStr) !== -1) {
|
|
76959
|
+
return numStr;
|
|
76960
|
+
}
|
|
76961
|
+
var shouldHaveDecimalSeparator = (numStr.indexOf(".") !== -1 || fixedDecimalScale) && scale;
|
|
76962
|
+
var ref2 = splitDecimal(numStr);
|
|
76963
|
+
var beforeDecimal = ref2.beforeDecimal;
|
|
76964
|
+
var afterDecimal = ref2.afterDecimal;
|
|
76965
|
+
var hasNegation = ref2.hasNegation;
|
|
76966
|
+
var floatValue = parseFloat("0." + (afterDecimal || "0"));
|
|
76967
|
+
var floatValueStr = afterDecimal.length <= scale ? "0." + afterDecimal : floatValue.toFixed(scale);
|
|
76968
|
+
var roundedDecimalParts = floatValueStr.split(".");
|
|
76969
|
+
var intPart = beforeDecimal;
|
|
76970
|
+
if (beforeDecimal && Number(roundedDecimalParts[0])) {
|
|
76971
|
+
intPart = beforeDecimal.split("").reverse().reduce(function(roundedStr, current, idx) {
|
|
76972
|
+
if (roundedStr.length > idx) {
|
|
76973
|
+
return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);
|
|
76974
|
+
}
|
|
76975
|
+
return current + roundedStr;
|
|
76976
|
+
}, roundedDecimalParts[0]);
|
|
76977
|
+
}
|
|
76978
|
+
var decimalPart = limitToScale(roundedDecimalParts[1] || "", scale, fixedDecimalScale);
|
|
76979
|
+
var negation = hasNegation ? "-" : "";
|
|
76980
|
+
var decimalSeparator = shouldHaveDecimalSeparator ? "." : "";
|
|
76981
|
+
return "" + negation + intPart + decimalSeparator + decimalPart;
|
|
76982
|
+
}
|
|
76983
|
+
function setCaretPosition(el2, caretPos) {
|
|
76984
|
+
el2.value = el2.value;
|
|
76985
|
+
if (el2 !== null) {
|
|
76986
|
+
if (el2.createTextRange) {
|
|
76987
|
+
var range2 = el2.createTextRange();
|
|
76988
|
+
range2.move("character", caretPos);
|
|
76989
|
+
range2.select();
|
|
76990
|
+
return true;
|
|
76991
|
+
}
|
|
76992
|
+
if (el2.selectionStart || el2.selectionStart === 0) {
|
|
76993
|
+
el2.focus();
|
|
76994
|
+
el2.setSelectionRange(caretPos, caretPos);
|
|
76995
|
+
return true;
|
|
76996
|
+
}
|
|
76997
|
+
el2.focus();
|
|
76998
|
+
return false;
|
|
76999
|
+
}
|
|
77000
|
+
}
|
|
77001
|
+
var findChangeRange = memoizeOnce(function(prevValue, newValue) {
|
|
77002
|
+
var i2 = 0, j = 0;
|
|
77003
|
+
var prevLength = prevValue.length;
|
|
77004
|
+
var newLength = newValue.length;
|
|
77005
|
+
while (prevValue[i2] === newValue[i2] && i2 < prevLength) {
|
|
77006
|
+
i2++;
|
|
77007
|
+
}
|
|
77008
|
+
while (prevValue[prevLength - 1 - j] === newValue[newLength - 1 - j] && newLength - j > i2 && prevLength - j > i2) {
|
|
77009
|
+
j++;
|
|
77010
|
+
}
|
|
77011
|
+
return {
|
|
77012
|
+
from: { start: i2, end: prevLength - j },
|
|
77013
|
+
to: { start: i2, end: newLength - j }
|
|
77014
|
+
};
|
|
77015
|
+
});
|
|
77016
|
+
var findChangedRangeFromCaretPositions = function(lastCaretPositions, currentCaretPosition) {
|
|
77017
|
+
var startPosition = Math.min(lastCaretPositions.selectionStart, currentCaretPosition);
|
|
77018
|
+
return {
|
|
77019
|
+
from: { start: startPosition, end: lastCaretPositions.selectionEnd },
|
|
77020
|
+
to: { start: startPosition, end: currentCaretPosition }
|
|
77021
|
+
};
|
|
77022
|
+
};
|
|
77023
|
+
function clamp$1(num, min2, max2) {
|
|
77024
|
+
return Math.min(Math.max(num, min2), max2);
|
|
77025
|
+
}
|
|
77026
|
+
function geInputCaretPosition(el2) {
|
|
77027
|
+
return Math.max(el2.selectionStart, el2.selectionEnd);
|
|
77028
|
+
}
|
|
77029
|
+
function addInputMode() {
|
|
77030
|
+
return typeof navigator !== "undefined" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
|
|
77031
|
+
}
|
|
77032
|
+
function getDefaultChangeMeta(value) {
|
|
77033
|
+
return {
|
|
77034
|
+
from: {
|
|
77035
|
+
start: 0,
|
|
77036
|
+
end: 0
|
|
77037
|
+
},
|
|
77038
|
+
to: {
|
|
77039
|
+
start: 0,
|
|
77040
|
+
end: value.length
|
|
77041
|
+
},
|
|
77042
|
+
lastValue: ""
|
|
77043
|
+
};
|
|
77044
|
+
}
|
|
77045
|
+
function defaultIsCharacterSame(ref2) {
|
|
77046
|
+
var currentValue = ref2.currentValue;
|
|
77047
|
+
var formattedValue = ref2.formattedValue;
|
|
77048
|
+
var currentValueIndex = ref2.currentValueIndex;
|
|
77049
|
+
var formattedValueIndex = ref2.formattedValueIndex;
|
|
77050
|
+
return currentValue[currentValueIndex] === formattedValue[formattedValueIndex];
|
|
77051
|
+
}
|
|
77052
|
+
function getCaretPosition(newFormattedValue, lastFormattedValue, curValue, curCaretPos, boundary, isValidInputCharacter, isCharacterSame) {
|
|
77053
|
+
if (isCharacterSame === void 0) isCharacterSame = defaultIsCharacterSame;
|
|
77054
|
+
var firstAllowedPosition = boundary.findIndex(function(b2) {
|
|
77055
|
+
return b2;
|
|
77056
|
+
});
|
|
77057
|
+
var prefixFormat = newFormattedValue.slice(0, firstAllowedPosition);
|
|
77058
|
+
if (!lastFormattedValue && !curValue.startsWith(prefixFormat)) {
|
|
77059
|
+
lastFormattedValue = prefixFormat;
|
|
77060
|
+
curValue = prefixFormat + curValue;
|
|
77061
|
+
curCaretPos = curCaretPos + prefixFormat.length;
|
|
77062
|
+
}
|
|
77063
|
+
var curValLn = curValue.length;
|
|
77064
|
+
var formattedValueLn = newFormattedValue.length;
|
|
77065
|
+
var addedIndexMap = {};
|
|
77066
|
+
var indexMap = new Array(curValLn);
|
|
77067
|
+
for (var i2 = 0; i2 < curValLn; i2++) {
|
|
77068
|
+
indexMap[i2] = -1;
|
|
77069
|
+
for (var j = 0, jLn = formattedValueLn; j < jLn; j++) {
|
|
77070
|
+
var isCharSame = isCharacterSame({
|
|
77071
|
+
currentValue: curValue,
|
|
77072
|
+
lastValue: lastFormattedValue,
|
|
77073
|
+
formattedValue: newFormattedValue,
|
|
77074
|
+
currentValueIndex: i2,
|
|
77075
|
+
formattedValueIndex: j
|
|
77076
|
+
});
|
|
77077
|
+
if (isCharSame && addedIndexMap[j] !== true) {
|
|
77078
|
+
indexMap[i2] = j;
|
|
77079
|
+
addedIndexMap[j] = true;
|
|
77080
|
+
break;
|
|
77081
|
+
}
|
|
77082
|
+
}
|
|
77083
|
+
}
|
|
77084
|
+
var pos = curCaretPos;
|
|
77085
|
+
while (pos < curValLn && (indexMap[pos] === -1 || !isValidInputCharacter(curValue[pos]))) {
|
|
77086
|
+
pos++;
|
|
77087
|
+
}
|
|
77088
|
+
var endIndex = pos === curValLn || indexMap[pos] === -1 ? formattedValueLn : indexMap[pos];
|
|
77089
|
+
pos = curCaretPos - 1;
|
|
77090
|
+
while (pos > 0 && indexMap[pos] === -1) {
|
|
77091
|
+
pos--;
|
|
77092
|
+
}
|
|
77093
|
+
var startIndex = pos === -1 || indexMap[pos] === -1 ? 0 : indexMap[pos] + 1;
|
|
77094
|
+
if (startIndex > endIndex) {
|
|
77095
|
+
return endIndex;
|
|
77096
|
+
}
|
|
77097
|
+
return curCaretPos - startIndex < endIndex - curCaretPos ? startIndex : endIndex;
|
|
77098
|
+
}
|
|
77099
|
+
function getCaretPosInBoundary(value, caretPos, boundary, direction) {
|
|
77100
|
+
var valLn = value.length;
|
|
77101
|
+
caretPos = clamp$1(caretPos, 0, valLn);
|
|
77102
|
+
if (direction === "left") {
|
|
77103
|
+
while (caretPos >= 0 && !boundary[caretPos]) {
|
|
77104
|
+
caretPos--;
|
|
77105
|
+
}
|
|
77106
|
+
if (caretPos === -1) {
|
|
77107
|
+
caretPos = boundary.indexOf(true);
|
|
77108
|
+
}
|
|
77109
|
+
} else {
|
|
77110
|
+
while (caretPos <= valLn && !boundary[caretPos]) {
|
|
77111
|
+
caretPos++;
|
|
77112
|
+
}
|
|
77113
|
+
if (caretPos > valLn) {
|
|
77114
|
+
caretPos = boundary.lastIndexOf(true);
|
|
77115
|
+
}
|
|
77116
|
+
}
|
|
77117
|
+
if (caretPos === -1) {
|
|
77118
|
+
caretPos = valLn;
|
|
77119
|
+
}
|
|
77120
|
+
return caretPos;
|
|
77121
|
+
}
|
|
77122
|
+
function caretUnknownFormatBoundary(formattedValue) {
|
|
77123
|
+
var boundaryAry = Array.from({ length: formattedValue.length + 1 }).map(function() {
|
|
77124
|
+
return true;
|
|
77125
|
+
});
|
|
77126
|
+
for (var i2 = 0, ln = boundaryAry.length; i2 < ln; i2++) {
|
|
77127
|
+
boundaryAry[i2] = Boolean(charIsNumber(formattedValue[i2]) || charIsNumber(formattedValue[i2 - 1]));
|
|
77128
|
+
}
|
|
77129
|
+
return boundaryAry;
|
|
77130
|
+
}
|
|
77131
|
+
function useInternalValues(value, defaultValue, valueIsNumericString, format2, removeFormatting2, onValueChange) {
|
|
77132
|
+
if (onValueChange === void 0) onValueChange = noop$3;
|
|
77133
|
+
var getValues = usePersistentCallback(function(value2, valueIsNumericString2) {
|
|
77134
|
+
var formattedValue, numAsString;
|
|
77135
|
+
if (isNotValidValue(value2)) {
|
|
77136
|
+
numAsString = "";
|
|
77137
|
+
formattedValue = "";
|
|
77138
|
+
} else if (typeof value2 === "number" || valueIsNumericString2) {
|
|
77139
|
+
numAsString = typeof value2 === "number" ? toNumericString(value2) : value2;
|
|
77140
|
+
formattedValue = format2(numAsString);
|
|
77141
|
+
} else {
|
|
77142
|
+
numAsString = removeFormatting2(value2, void 0);
|
|
77143
|
+
formattedValue = format2(numAsString);
|
|
77144
|
+
}
|
|
77145
|
+
return { formattedValue, numAsString };
|
|
77146
|
+
});
|
|
77147
|
+
var ref2 = useState(function() {
|
|
77148
|
+
return getValues(isNil(value) ? defaultValue : value, valueIsNumericString);
|
|
77149
|
+
});
|
|
77150
|
+
var values2 = ref2[0];
|
|
77151
|
+
var setValues = ref2[1];
|
|
77152
|
+
var _onValueChange = function(newValues2, sourceInfo) {
|
|
77153
|
+
if (newValues2.formattedValue !== values2.formattedValue) {
|
|
77154
|
+
setValues({
|
|
77155
|
+
formattedValue: newValues2.formattedValue,
|
|
77156
|
+
numAsString: newValues2.value
|
|
77157
|
+
});
|
|
77158
|
+
}
|
|
77159
|
+
onValueChange(newValues2, sourceInfo);
|
|
77160
|
+
};
|
|
77161
|
+
var _value = value;
|
|
77162
|
+
var _valueIsNumericString = valueIsNumericString;
|
|
77163
|
+
if (isNil(value)) {
|
|
77164
|
+
_value = values2.numAsString;
|
|
77165
|
+
_valueIsNumericString = true;
|
|
77166
|
+
}
|
|
77167
|
+
var newValues = getValues(_value, _valueIsNumericString);
|
|
77168
|
+
useMemo(function() {
|
|
77169
|
+
setValues(newValues);
|
|
77170
|
+
}, [newValues.formattedValue]);
|
|
77171
|
+
return [values2, _onValueChange];
|
|
77172
|
+
}
|
|
77173
|
+
function defaultRemoveFormatting(value) {
|
|
77174
|
+
return value.replace(/[^0-9]/g, "");
|
|
77175
|
+
}
|
|
77176
|
+
function defaultFormat(value) {
|
|
77177
|
+
return value;
|
|
77178
|
+
}
|
|
77179
|
+
function NumberFormatBase(props) {
|
|
77180
|
+
var type2 = props.type;
|
|
77181
|
+
if (type2 === void 0) type2 = "text";
|
|
77182
|
+
var displayType = props.displayType;
|
|
77183
|
+
if (displayType === void 0) displayType = "input";
|
|
77184
|
+
var customInput = props.customInput;
|
|
77185
|
+
var renderText = props.renderText;
|
|
77186
|
+
var getInputRef = props.getInputRef;
|
|
77187
|
+
var format2 = props.format;
|
|
77188
|
+
if (format2 === void 0) format2 = defaultFormat;
|
|
77189
|
+
var removeFormatting2 = props.removeFormatting;
|
|
77190
|
+
if (removeFormatting2 === void 0) removeFormatting2 = defaultRemoveFormatting;
|
|
77191
|
+
var defaultValue = props.defaultValue;
|
|
77192
|
+
var valueIsNumericString = props.valueIsNumericString;
|
|
77193
|
+
var onValueChange = props.onValueChange;
|
|
77194
|
+
var isAllowed = props.isAllowed;
|
|
77195
|
+
var onChange = props.onChange;
|
|
77196
|
+
if (onChange === void 0) onChange = noop$3;
|
|
77197
|
+
var onKeyDown = props.onKeyDown;
|
|
77198
|
+
if (onKeyDown === void 0) onKeyDown = noop$3;
|
|
77199
|
+
var onMouseUp = props.onMouseUp;
|
|
77200
|
+
if (onMouseUp === void 0) onMouseUp = noop$3;
|
|
77201
|
+
var onFocus = props.onFocus;
|
|
77202
|
+
if (onFocus === void 0) onFocus = noop$3;
|
|
77203
|
+
var onBlur = props.onBlur;
|
|
77204
|
+
if (onBlur === void 0) onBlur = noop$3;
|
|
77205
|
+
var propValue = props.value;
|
|
77206
|
+
var getCaretBoundary2 = props.getCaretBoundary;
|
|
77207
|
+
if (getCaretBoundary2 === void 0) getCaretBoundary2 = caretUnknownFormatBoundary;
|
|
77208
|
+
var isValidInputCharacter = props.isValidInputCharacter;
|
|
77209
|
+
if (isValidInputCharacter === void 0) isValidInputCharacter = charIsNumber;
|
|
77210
|
+
var isCharacterSame = props.isCharacterSame;
|
|
77211
|
+
var otherProps = __rest(props, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]);
|
|
77212
|
+
var ref2 = useInternalValues(propValue, defaultValue, Boolean(valueIsNumericString), format2, removeFormatting2, onValueChange);
|
|
77213
|
+
var ref_0 = ref2[0];
|
|
77214
|
+
var formattedValue = ref_0.formattedValue;
|
|
77215
|
+
var numAsString = ref_0.numAsString;
|
|
77216
|
+
var onFormattedValueChange = ref2[1];
|
|
77217
|
+
var caretPositionBeforeChange = useRef();
|
|
77218
|
+
var lastUpdatedValue = useRef({ formattedValue, numAsString });
|
|
77219
|
+
var _onValueChange = function(values2, source) {
|
|
77220
|
+
lastUpdatedValue.current = { formattedValue: values2.formattedValue, numAsString: values2.value };
|
|
77221
|
+
onFormattedValueChange(values2, source);
|
|
77222
|
+
};
|
|
77223
|
+
var ref$1 = useState(false);
|
|
77224
|
+
var mounted = ref$1[0];
|
|
77225
|
+
var setMounted = ref$1[1];
|
|
77226
|
+
var focusedElm = useRef(null);
|
|
77227
|
+
var timeout = useRef({
|
|
77228
|
+
setCaretTimeout: null,
|
|
77229
|
+
focusTimeout: null
|
|
77230
|
+
});
|
|
77231
|
+
useEffect(function() {
|
|
77232
|
+
setMounted(true);
|
|
77233
|
+
return function() {
|
|
77234
|
+
clearTimeout(timeout.current.setCaretTimeout);
|
|
77235
|
+
clearTimeout(timeout.current.focusTimeout);
|
|
77236
|
+
};
|
|
77237
|
+
}, []);
|
|
77238
|
+
var _format = format2;
|
|
77239
|
+
var getValueObject = function(formattedValue2, numAsString2) {
|
|
77240
|
+
var floatValue = parseFloat(numAsString2);
|
|
77241
|
+
return {
|
|
77242
|
+
formattedValue: formattedValue2,
|
|
77243
|
+
value: numAsString2,
|
|
77244
|
+
floatValue: isNaN(floatValue) ? void 0 : floatValue
|
|
77245
|
+
};
|
|
77246
|
+
};
|
|
77247
|
+
var setPatchedCaretPosition = function(el2, caretPos, currentValue) {
|
|
77248
|
+
if (el2.selectionStart === 0 && el2.selectionEnd === el2.value.length) {
|
|
77249
|
+
return;
|
|
77250
|
+
}
|
|
77251
|
+
setCaretPosition(el2, caretPos);
|
|
77252
|
+
timeout.current.setCaretTimeout = setTimeout(function() {
|
|
77253
|
+
if (el2.value === currentValue && el2.selectionStart !== caretPos) {
|
|
77254
|
+
setCaretPosition(el2, caretPos);
|
|
77255
|
+
}
|
|
77256
|
+
}, 0);
|
|
77257
|
+
};
|
|
77258
|
+
var correctCaretPosition = function(value, caretPos, direction) {
|
|
77259
|
+
return getCaretPosInBoundary(value, caretPos, getCaretBoundary2(value), direction);
|
|
77260
|
+
};
|
|
77261
|
+
var getNewCaretPosition = function(inputValue, newFormattedValue, caretPos) {
|
|
77262
|
+
var caretBoundary = getCaretBoundary2(newFormattedValue);
|
|
77263
|
+
var updatedCaretPos = getCaretPosition(newFormattedValue, formattedValue, inputValue, caretPos, caretBoundary, isValidInputCharacter, isCharacterSame);
|
|
77264
|
+
updatedCaretPos = getCaretPosInBoundary(newFormattedValue, updatedCaretPos, caretBoundary);
|
|
77265
|
+
return updatedCaretPos;
|
|
77266
|
+
};
|
|
77267
|
+
var updateValueAndCaretPosition = function(params) {
|
|
77268
|
+
var newFormattedValue = params.formattedValue;
|
|
77269
|
+
if (newFormattedValue === void 0) newFormattedValue = "";
|
|
77270
|
+
var input = params.input;
|
|
77271
|
+
var source = params.source;
|
|
77272
|
+
var event = params.event;
|
|
77273
|
+
var numAsString2 = params.numAsString;
|
|
77274
|
+
var caretPos;
|
|
77275
|
+
if (input) {
|
|
77276
|
+
var inputValue = params.inputValue || input.value;
|
|
77277
|
+
var currentCaretPosition2 = geInputCaretPosition(input);
|
|
77278
|
+
input.value = newFormattedValue;
|
|
77279
|
+
caretPos = getNewCaretPosition(inputValue, newFormattedValue, currentCaretPosition2);
|
|
77280
|
+
if (caretPos !== void 0) {
|
|
77281
|
+
setPatchedCaretPosition(input, caretPos, newFormattedValue);
|
|
77282
|
+
}
|
|
77283
|
+
}
|
|
77284
|
+
if (newFormattedValue !== formattedValue) {
|
|
77285
|
+
_onValueChange(getValueObject(newFormattedValue, numAsString2), { event, source });
|
|
77286
|
+
}
|
|
77287
|
+
};
|
|
77288
|
+
useEffect(function() {
|
|
77289
|
+
var ref3 = lastUpdatedValue.current;
|
|
77290
|
+
var lastFormattedValue = ref3.formattedValue;
|
|
77291
|
+
var lastNumAsString = ref3.numAsString;
|
|
77292
|
+
if (formattedValue !== lastFormattedValue || numAsString !== lastNumAsString) {
|
|
77293
|
+
_onValueChange(getValueObject(formattedValue, numAsString), {
|
|
77294
|
+
event: void 0,
|
|
77295
|
+
source: SourceType.props
|
|
77296
|
+
});
|
|
77297
|
+
}
|
|
77298
|
+
}, [formattedValue, numAsString]);
|
|
77299
|
+
var currentCaretPosition = focusedElm.current ? geInputCaretPosition(focusedElm.current) : void 0;
|
|
77300
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
77301
|
+
useIsomorphicLayoutEffect(function() {
|
|
77302
|
+
var input = focusedElm.current;
|
|
77303
|
+
if (formattedValue !== lastUpdatedValue.current.formattedValue && input) {
|
|
77304
|
+
var caretPos = getNewCaretPosition(lastUpdatedValue.current.formattedValue, formattedValue, currentCaretPosition);
|
|
77305
|
+
input.value = formattedValue;
|
|
77306
|
+
setPatchedCaretPosition(input, caretPos, formattedValue);
|
|
77307
|
+
}
|
|
77308
|
+
}, [formattedValue]);
|
|
77309
|
+
var formatInputValue = function(inputValue, event, source) {
|
|
77310
|
+
var input = event.target;
|
|
77311
|
+
var changeRange = caretPositionBeforeChange.current ? findChangedRangeFromCaretPositions(caretPositionBeforeChange.current, input.selectionEnd) : findChangeRange(formattedValue, inputValue);
|
|
77312
|
+
var changeMeta = Object.assign(Object.assign({}, changeRange), { lastValue: formattedValue });
|
|
77313
|
+
var _numAsString = removeFormatting2(inputValue, changeMeta);
|
|
77314
|
+
var _formattedValue = _format(_numAsString);
|
|
77315
|
+
_numAsString = removeFormatting2(_formattedValue, void 0);
|
|
77316
|
+
if (isAllowed && !isAllowed(getValueObject(_formattedValue, _numAsString))) {
|
|
77317
|
+
var input$1 = event.target;
|
|
77318
|
+
var currentCaretPosition2 = geInputCaretPosition(input$1);
|
|
77319
|
+
var caretPos = getNewCaretPosition(inputValue, formattedValue, currentCaretPosition2);
|
|
77320
|
+
input$1.value = formattedValue;
|
|
77321
|
+
setPatchedCaretPosition(input$1, caretPos, formattedValue);
|
|
77322
|
+
return false;
|
|
77323
|
+
}
|
|
77324
|
+
updateValueAndCaretPosition({
|
|
77325
|
+
formattedValue: _formattedValue,
|
|
77326
|
+
numAsString: _numAsString,
|
|
77327
|
+
inputValue,
|
|
77328
|
+
event,
|
|
77329
|
+
source,
|
|
77330
|
+
input: event.target
|
|
77331
|
+
});
|
|
77332
|
+
return true;
|
|
77333
|
+
};
|
|
77334
|
+
var setCaretPositionInfoBeforeChange = function(el2, endOffset) {
|
|
77335
|
+
if (endOffset === void 0) endOffset = 0;
|
|
77336
|
+
var selectionStart = el2.selectionStart;
|
|
77337
|
+
var selectionEnd = el2.selectionEnd;
|
|
77338
|
+
caretPositionBeforeChange.current = { selectionStart, selectionEnd: selectionEnd + endOffset };
|
|
77339
|
+
};
|
|
77340
|
+
var _onChange = function(e2) {
|
|
77341
|
+
var el2 = e2.target;
|
|
77342
|
+
var inputValue = el2.value;
|
|
77343
|
+
var changed = formatInputValue(inputValue, e2, SourceType.event);
|
|
77344
|
+
if (changed) {
|
|
77345
|
+
onChange(e2);
|
|
77346
|
+
}
|
|
77347
|
+
caretPositionBeforeChange.current = void 0;
|
|
77348
|
+
};
|
|
77349
|
+
var _onKeyDown = function(e2) {
|
|
77350
|
+
var el2 = e2.target;
|
|
77351
|
+
var key = e2.key;
|
|
77352
|
+
var selectionStart = el2.selectionStart;
|
|
77353
|
+
var selectionEnd = el2.selectionEnd;
|
|
77354
|
+
var value = el2.value;
|
|
77355
|
+
if (value === void 0) value = "";
|
|
77356
|
+
var expectedCaretPosition;
|
|
77357
|
+
if (key === "ArrowLeft" || key === "Backspace") {
|
|
77358
|
+
expectedCaretPosition = Math.max(selectionStart - 1, 0);
|
|
77359
|
+
} else if (key === "ArrowRight") {
|
|
77360
|
+
expectedCaretPosition = Math.min(selectionStart + 1, value.length);
|
|
77361
|
+
} else if (key === "Delete") {
|
|
77362
|
+
expectedCaretPosition = selectionStart;
|
|
77363
|
+
}
|
|
77364
|
+
var endOffset = 0;
|
|
77365
|
+
if (key === "Delete" && selectionStart === selectionEnd) {
|
|
77366
|
+
endOffset = 1;
|
|
77367
|
+
}
|
|
77368
|
+
var isArrowKey = key === "ArrowLeft" || key === "ArrowRight";
|
|
77369
|
+
if (expectedCaretPosition === void 0 || selectionStart !== selectionEnd && !isArrowKey) {
|
|
77370
|
+
onKeyDown(e2);
|
|
77371
|
+
setCaretPositionInfoBeforeChange(el2, endOffset);
|
|
77372
|
+
return;
|
|
77373
|
+
}
|
|
77374
|
+
var newCaretPosition = expectedCaretPosition;
|
|
77375
|
+
if (isArrowKey) {
|
|
77376
|
+
var direction = key === "ArrowLeft" ? "left" : "right";
|
|
77377
|
+
newCaretPosition = correctCaretPosition(value, expectedCaretPosition, direction);
|
|
77378
|
+
if (newCaretPosition !== expectedCaretPosition) {
|
|
77379
|
+
e2.preventDefault();
|
|
77380
|
+
}
|
|
77381
|
+
} else if (key === "Delete" && !isValidInputCharacter(value[expectedCaretPosition])) {
|
|
77382
|
+
newCaretPosition = correctCaretPosition(value, expectedCaretPosition, "right");
|
|
77383
|
+
} else if (key === "Backspace" && !isValidInputCharacter(value[expectedCaretPosition])) {
|
|
77384
|
+
newCaretPosition = correctCaretPosition(value, expectedCaretPosition, "left");
|
|
77385
|
+
}
|
|
77386
|
+
if (newCaretPosition !== expectedCaretPosition) {
|
|
77387
|
+
setPatchedCaretPosition(el2, newCaretPosition, value);
|
|
77388
|
+
}
|
|
77389
|
+
onKeyDown(e2);
|
|
77390
|
+
setCaretPositionInfoBeforeChange(el2, endOffset);
|
|
77391
|
+
};
|
|
77392
|
+
var _onMouseUp = function(e2) {
|
|
77393
|
+
var el2 = e2.target;
|
|
77394
|
+
var correctCaretPositionIfRequired = function() {
|
|
77395
|
+
var selectionStart = el2.selectionStart;
|
|
77396
|
+
var selectionEnd = el2.selectionEnd;
|
|
77397
|
+
var value = el2.value;
|
|
77398
|
+
if (value === void 0) value = "";
|
|
77399
|
+
if (selectionStart === selectionEnd) {
|
|
77400
|
+
var caretPosition = correctCaretPosition(value, selectionStart);
|
|
77401
|
+
if (caretPosition !== selectionStart) {
|
|
77402
|
+
setPatchedCaretPosition(el2, caretPosition, value);
|
|
77403
|
+
}
|
|
77404
|
+
}
|
|
77405
|
+
};
|
|
77406
|
+
correctCaretPositionIfRequired();
|
|
77407
|
+
requestAnimationFrame(function() {
|
|
77408
|
+
correctCaretPositionIfRequired();
|
|
77409
|
+
});
|
|
77410
|
+
onMouseUp(e2);
|
|
77411
|
+
setCaretPositionInfoBeforeChange(el2);
|
|
77412
|
+
};
|
|
77413
|
+
var _onFocus = function(e2) {
|
|
77414
|
+
if (e2.persist) {
|
|
77415
|
+
e2.persist();
|
|
77416
|
+
}
|
|
77417
|
+
var el2 = e2.target;
|
|
77418
|
+
var currentTarget = e2.currentTarget;
|
|
77419
|
+
focusedElm.current = el2;
|
|
77420
|
+
timeout.current.focusTimeout = setTimeout(function() {
|
|
77421
|
+
var selectionStart = el2.selectionStart;
|
|
77422
|
+
var selectionEnd = el2.selectionEnd;
|
|
77423
|
+
var value = el2.value;
|
|
77424
|
+
if (value === void 0) value = "";
|
|
77425
|
+
var caretPosition = correctCaretPosition(value, selectionStart);
|
|
77426
|
+
if (caretPosition !== selectionStart && !(selectionStart === 0 && selectionEnd === value.length)) {
|
|
77427
|
+
setPatchedCaretPosition(el2, caretPosition, value);
|
|
77428
|
+
}
|
|
77429
|
+
onFocus(Object.assign(Object.assign({}, e2), { currentTarget }));
|
|
77430
|
+
}, 0);
|
|
77431
|
+
};
|
|
77432
|
+
var _onBlur = function(e2) {
|
|
77433
|
+
focusedElm.current = null;
|
|
77434
|
+
clearTimeout(timeout.current.focusTimeout);
|
|
77435
|
+
clearTimeout(timeout.current.setCaretTimeout);
|
|
77436
|
+
onBlur(e2);
|
|
77437
|
+
};
|
|
77438
|
+
var inputMode = mounted && addInputMode() ? "numeric" : void 0;
|
|
77439
|
+
var inputProps = Object.assign({ inputMode }, otherProps, {
|
|
77440
|
+
type: type2,
|
|
77441
|
+
value: formattedValue,
|
|
77442
|
+
onChange: _onChange,
|
|
77443
|
+
onKeyDown: _onKeyDown,
|
|
77444
|
+
onMouseUp: _onMouseUp,
|
|
77445
|
+
onFocus: _onFocus,
|
|
77446
|
+
onBlur: _onBlur
|
|
77447
|
+
});
|
|
77448
|
+
if (displayType === "text") {
|
|
77449
|
+
return renderText ? React__default.createElement(React__default.Fragment, null, renderText(formattedValue, otherProps) || null) : React__default.createElement("span", Object.assign({}, otherProps, { ref: getInputRef }), formattedValue);
|
|
77450
|
+
} else if (customInput) {
|
|
77451
|
+
var CustomInput = customInput;
|
|
77452
|
+
return React__default.createElement(CustomInput, Object.assign({}, inputProps, { ref: getInputRef }));
|
|
77453
|
+
}
|
|
77454
|
+
return React__default.createElement("input", Object.assign({}, inputProps, { ref: getInputRef }));
|
|
77455
|
+
}
|
|
77456
|
+
function format(numStr, props) {
|
|
77457
|
+
var decimalScale = props.decimalScale;
|
|
77458
|
+
var fixedDecimalScale = props.fixedDecimalScale;
|
|
77459
|
+
var prefix2 = props.prefix;
|
|
77460
|
+
if (prefix2 === void 0) prefix2 = "";
|
|
77461
|
+
var suffix = props.suffix;
|
|
77462
|
+
if (suffix === void 0) suffix = "";
|
|
77463
|
+
var allowNegative = props.allowNegative;
|
|
77464
|
+
var thousandsGroupStyle = props.thousandsGroupStyle;
|
|
77465
|
+
if (thousandsGroupStyle === void 0) thousandsGroupStyle = "thousand";
|
|
77466
|
+
if (numStr === "" || numStr === "-") {
|
|
77467
|
+
return numStr;
|
|
77468
|
+
}
|
|
77469
|
+
var ref2 = getSeparators(props);
|
|
77470
|
+
var thousandSeparator = ref2.thousandSeparator;
|
|
77471
|
+
var decimalSeparator = ref2.decimalSeparator;
|
|
77472
|
+
var hasDecimalSeparator = decimalScale !== 0 && numStr.indexOf(".") !== -1 || decimalScale && fixedDecimalScale;
|
|
77473
|
+
var ref$1 = splitDecimal(numStr, allowNegative);
|
|
77474
|
+
var beforeDecimal = ref$1.beforeDecimal;
|
|
77475
|
+
var afterDecimal = ref$1.afterDecimal;
|
|
77476
|
+
var addNegation = ref$1.addNegation;
|
|
77477
|
+
if (decimalScale !== void 0) {
|
|
77478
|
+
afterDecimal = limitToScale(afterDecimal, decimalScale, !!fixedDecimalScale);
|
|
77479
|
+
}
|
|
77480
|
+
if (thousandSeparator) {
|
|
77481
|
+
beforeDecimal = applyThousandSeparator(beforeDecimal, thousandSeparator, thousandsGroupStyle);
|
|
77482
|
+
}
|
|
77483
|
+
if (prefix2) {
|
|
77484
|
+
beforeDecimal = prefix2 + beforeDecimal;
|
|
77485
|
+
}
|
|
77486
|
+
if (suffix) {
|
|
77487
|
+
afterDecimal = afterDecimal + suffix;
|
|
77488
|
+
}
|
|
77489
|
+
if (addNegation) {
|
|
77490
|
+
beforeDecimal = "-" + beforeDecimal;
|
|
77491
|
+
}
|
|
77492
|
+
numStr = beforeDecimal + (hasDecimalSeparator && decimalSeparator || "") + afterDecimal;
|
|
77493
|
+
return numStr;
|
|
77494
|
+
}
|
|
77495
|
+
function getSeparators(props) {
|
|
77496
|
+
var decimalSeparator = props.decimalSeparator;
|
|
77497
|
+
if (decimalSeparator === void 0) decimalSeparator = ".";
|
|
77498
|
+
var thousandSeparator = props.thousandSeparator;
|
|
77499
|
+
var allowedDecimalSeparators = props.allowedDecimalSeparators;
|
|
77500
|
+
if (thousandSeparator === true) {
|
|
77501
|
+
thousandSeparator = ",";
|
|
77502
|
+
}
|
|
77503
|
+
if (!allowedDecimalSeparators) {
|
|
77504
|
+
allowedDecimalSeparators = [decimalSeparator, "."];
|
|
77505
|
+
}
|
|
77506
|
+
return {
|
|
77507
|
+
decimalSeparator,
|
|
77508
|
+
thousandSeparator,
|
|
77509
|
+
allowedDecimalSeparators
|
|
77510
|
+
};
|
|
77511
|
+
}
|
|
77512
|
+
function handleNegation(value, allowNegative) {
|
|
77513
|
+
if (value === void 0) value = "";
|
|
77514
|
+
var negationRegex = new RegExp("(-)");
|
|
77515
|
+
var doubleNegationRegex = new RegExp("(-)(.)*(-)");
|
|
77516
|
+
var hasNegation = negationRegex.test(value);
|
|
77517
|
+
var removeNegation = doubleNegationRegex.test(value);
|
|
77518
|
+
value = value.replace(/-/g, "");
|
|
77519
|
+
if (hasNegation && !removeNegation && allowNegative) {
|
|
77520
|
+
value = "-" + value;
|
|
77521
|
+
}
|
|
77522
|
+
return value;
|
|
77523
|
+
}
|
|
77524
|
+
function getNumberRegex(decimalSeparator, global2) {
|
|
77525
|
+
return new RegExp("(^-)|[0-9]|" + escapeRegExp$1(decimalSeparator), "g");
|
|
77526
|
+
}
|
|
77527
|
+
function isNumericString(val, prefix2, suffix) {
|
|
77528
|
+
if (val === "") {
|
|
77529
|
+
return true;
|
|
77530
|
+
}
|
|
77531
|
+
return !(prefix2 === null || prefix2 === void 0 ? void 0 : prefix2.match(/\d/)) && !(suffix === null || suffix === void 0 ? void 0 : suffix.match(/\d/)) && typeof val === "string" && !isNaN(Number(val));
|
|
77532
|
+
}
|
|
77533
|
+
function removeFormatting(value, changeMeta, props) {
|
|
77534
|
+
var assign;
|
|
77535
|
+
if (changeMeta === void 0) changeMeta = getDefaultChangeMeta(value);
|
|
77536
|
+
var allowNegative = props.allowNegative;
|
|
77537
|
+
var prefix2 = props.prefix;
|
|
77538
|
+
if (prefix2 === void 0) prefix2 = "";
|
|
77539
|
+
var suffix = props.suffix;
|
|
77540
|
+
if (suffix === void 0) suffix = "";
|
|
77541
|
+
var decimalScale = props.decimalScale;
|
|
77542
|
+
var from2 = changeMeta.from;
|
|
77543
|
+
var to2 = changeMeta.to;
|
|
77544
|
+
var start2 = to2.start;
|
|
77545
|
+
var end2 = to2.end;
|
|
77546
|
+
var ref2 = getSeparators(props);
|
|
77547
|
+
var allowedDecimalSeparators = ref2.allowedDecimalSeparators;
|
|
77548
|
+
var decimalSeparator = ref2.decimalSeparator;
|
|
77549
|
+
var isBeforeDecimalSeparator = value[end2] === decimalSeparator;
|
|
77550
|
+
if (charIsNumber(value) && (value === prefix2 || value === suffix) && changeMeta.lastValue === "") {
|
|
77551
|
+
return value;
|
|
77552
|
+
}
|
|
77553
|
+
if (end2 - start2 === 1 && allowedDecimalSeparators.indexOf(value[start2]) !== -1) {
|
|
77554
|
+
var separator = decimalScale === 0 ? "" : decimalSeparator;
|
|
77555
|
+
value = value.substring(0, start2) + separator + value.substring(start2 + 1, value.length);
|
|
77556
|
+
}
|
|
77557
|
+
var stripNegation = function(value2, start3, end3) {
|
|
77558
|
+
var hasNegation2 = false;
|
|
77559
|
+
var hasDoubleNegation = false;
|
|
77560
|
+
if (prefix2.startsWith("-")) {
|
|
77561
|
+
hasNegation2 = false;
|
|
77562
|
+
} else if (value2.startsWith("--")) {
|
|
77563
|
+
hasNegation2 = false;
|
|
77564
|
+
hasDoubleNegation = true;
|
|
77565
|
+
} else if (suffix.startsWith("-") && value2.length === suffix.length) {
|
|
77566
|
+
hasNegation2 = false;
|
|
77567
|
+
} else if (value2[0] === "-") {
|
|
77568
|
+
hasNegation2 = true;
|
|
77569
|
+
}
|
|
77570
|
+
var charsToRemove = hasNegation2 ? 1 : 0;
|
|
77571
|
+
if (hasDoubleNegation) {
|
|
77572
|
+
charsToRemove = 2;
|
|
77573
|
+
}
|
|
77574
|
+
if (charsToRemove) {
|
|
77575
|
+
value2 = value2.substring(charsToRemove);
|
|
77576
|
+
start3 -= charsToRemove;
|
|
77577
|
+
end3 -= charsToRemove;
|
|
77578
|
+
}
|
|
77579
|
+
return { value: value2, start: start3, end: end3, hasNegation: hasNegation2 };
|
|
77580
|
+
};
|
|
77581
|
+
var toMetadata = stripNegation(value, start2, end2);
|
|
77582
|
+
var hasNegation = toMetadata.hasNegation;
|
|
77583
|
+
assign = toMetadata, value = assign.value, start2 = assign.start, end2 = assign.end;
|
|
77584
|
+
var ref$1 = stripNegation(changeMeta.lastValue, from2.start, from2.end);
|
|
77585
|
+
var fromStart = ref$1.start;
|
|
77586
|
+
var fromEnd = ref$1.end;
|
|
77587
|
+
var lastValue = ref$1.value;
|
|
77588
|
+
var updatedSuffixPart = value.substring(start2, end2);
|
|
77589
|
+
if (value.length && lastValue.length && (fromStart > lastValue.length - suffix.length || fromEnd < prefix2.length) && !(updatedSuffixPart && suffix.startsWith(updatedSuffixPart))) {
|
|
77590
|
+
value = lastValue;
|
|
77591
|
+
}
|
|
77592
|
+
var startIndex = 0;
|
|
77593
|
+
if (value.startsWith(prefix2)) {
|
|
77594
|
+
startIndex += prefix2.length;
|
|
77595
|
+
} else if (start2 < prefix2.length) {
|
|
77596
|
+
startIndex = start2;
|
|
77597
|
+
}
|
|
77598
|
+
value = value.substring(startIndex);
|
|
77599
|
+
end2 -= startIndex;
|
|
77600
|
+
var endIndex = value.length;
|
|
77601
|
+
var suffixStartIndex = value.length - suffix.length;
|
|
77602
|
+
if (value.endsWith(suffix)) {
|
|
77603
|
+
endIndex = suffixStartIndex;
|
|
77604
|
+
} else if (end2 > suffixStartIndex) {
|
|
77605
|
+
endIndex = end2;
|
|
77606
|
+
} else if (end2 > value.length - suffix.length) {
|
|
77607
|
+
endIndex = end2;
|
|
77608
|
+
}
|
|
77609
|
+
value = value.substring(0, endIndex);
|
|
77610
|
+
value = handleNegation(hasNegation ? "-" + value : value, allowNegative);
|
|
77611
|
+
value = (value.match(getNumberRegex(decimalSeparator)) || []).join("");
|
|
77612
|
+
var firstIndex = value.indexOf(decimalSeparator);
|
|
77613
|
+
value = value.replace(new RegExp(escapeRegExp$1(decimalSeparator), "g"), function(match, index) {
|
|
77614
|
+
return index === firstIndex ? "." : "";
|
|
77615
|
+
});
|
|
77616
|
+
var ref$2 = splitDecimal(value, allowNegative);
|
|
77617
|
+
var beforeDecimal = ref$2.beforeDecimal;
|
|
77618
|
+
var afterDecimal = ref$2.afterDecimal;
|
|
77619
|
+
var addNegation = ref$2.addNegation;
|
|
77620
|
+
if (to2.end - to2.start < from2.end - from2.start && beforeDecimal === "" && isBeforeDecimalSeparator && !parseFloat(afterDecimal)) {
|
|
77621
|
+
value = addNegation ? "-" : "";
|
|
77622
|
+
}
|
|
77623
|
+
return value;
|
|
77624
|
+
}
|
|
77625
|
+
function getCaretBoundary(formattedValue, props) {
|
|
77626
|
+
var prefix2 = props.prefix;
|
|
77627
|
+
if (prefix2 === void 0) prefix2 = "";
|
|
77628
|
+
var suffix = props.suffix;
|
|
77629
|
+
if (suffix === void 0) suffix = "";
|
|
77630
|
+
var boundaryAry = Array.from({ length: formattedValue.length + 1 }).map(function() {
|
|
77631
|
+
return true;
|
|
77632
|
+
});
|
|
77633
|
+
var hasNegation = formattedValue[0] === "-";
|
|
77634
|
+
boundaryAry.fill(false, 0, prefix2.length + (hasNegation ? 1 : 0));
|
|
77635
|
+
var valLn = formattedValue.length;
|
|
77636
|
+
boundaryAry.fill(false, valLn - suffix.length + 1, valLn + 1);
|
|
77637
|
+
return boundaryAry;
|
|
77638
|
+
}
|
|
77639
|
+
function validateAndUpdateProps(props) {
|
|
77640
|
+
var ref2 = getSeparators(props);
|
|
77641
|
+
var thousandSeparator = ref2.thousandSeparator;
|
|
77642
|
+
var decimalSeparator = ref2.decimalSeparator;
|
|
77643
|
+
var prefix2 = props.prefix;
|
|
77644
|
+
if (prefix2 === void 0) prefix2 = "";
|
|
77645
|
+
var allowNegative = props.allowNegative;
|
|
77646
|
+
if (allowNegative === void 0) allowNegative = true;
|
|
77647
|
+
if (thousandSeparator === decimalSeparator) {
|
|
77648
|
+
throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: " + thousandSeparator + ' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ' + decimalSeparator + " (default value for decimalSeparator is .)\n ");
|
|
77649
|
+
}
|
|
77650
|
+
if (prefix2.startsWith("-") && allowNegative) {
|
|
77651
|
+
console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: " + prefix2 + "\n allowNegative: " + allowNegative + "\n ");
|
|
77652
|
+
allowNegative = false;
|
|
77653
|
+
}
|
|
77654
|
+
return Object.assign(Object.assign({}, props), { allowNegative });
|
|
77655
|
+
}
|
|
77656
|
+
function useNumericFormat(props) {
|
|
77657
|
+
props = validateAndUpdateProps(props);
|
|
77658
|
+
props.decimalSeparator;
|
|
77659
|
+
props.allowedDecimalSeparators;
|
|
77660
|
+
props.thousandsGroupStyle;
|
|
77661
|
+
var suffix = props.suffix;
|
|
77662
|
+
var allowNegative = props.allowNegative;
|
|
77663
|
+
var allowLeadingZeros = props.allowLeadingZeros;
|
|
77664
|
+
var onKeyDown = props.onKeyDown;
|
|
77665
|
+
if (onKeyDown === void 0) onKeyDown = noop$3;
|
|
77666
|
+
var onBlur = props.onBlur;
|
|
77667
|
+
if (onBlur === void 0) onBlur = noop$3;
|
|
77668
|
+
var thousandSeparator = props.thousandSeparator;
|
|
77669
|
+
var decimalScale = props.decimalScale;
|
|
77670
|
+
var fixedDecimalScale = props.fixedDecimalScale;
|
|
77671
|
+
var prefix2 = props.prefix;
|
|
77672
|
+
if (prefix2 === void 0) prefix2 = "";
|
|
77673
|
+
var defaultValue = props.defaultValue;
|
|
77674
|
+
var value = props.value;
|
|
77675
|
+
var valueIsNumericString = props.valueIsNumericString;
|
|
77676
|
+
var onValueChange = props.onValueChange;
|
|
77677
|
+
var restProps = __rest(props, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]);
|
|
77678
|
+
var ref2 = getSeparators(props);
|
|
77679
|
+
var decimalSeparator = ref2.decimalSeparator;
|
|
77680
|
+
var allowedDecimalSeparators = ref2.allowedDecimalSeparators;
|
|
77681
|
+
var _format = function(numStr) {
|
|
77682
|
+
return format(numStr, props);
|
|
77683
|
+
};
|
|
77684
|
+
var _removeFormatting = function(inputValue, changeMeta) {
|
|
77685
|
+
return removeFormatting(inputValue, changeMeta, props);
|
|
77686
|
+
};
|
|
77687
|
+
var _value = isNil(value) ? defaultValue : value;
|
|
77688
|
+
var _valueIsNumericString = valueIsNumericString !== null && valueIsNumericString !== void 0 ? valueIsNumericString : isNumericString(_value, prefix2, suffix);
|
|
77689
|
+
if (!isNil(value)) {
|
|
77690
|
+
_valueIsNumericString = _valueIsNumericString || typeof value === "number";
|
|
77691
|
+
} else if (!isNil(defaultValue)) {
|
|
77692
|
+
_valueIsNumericString = _valueIsNumericString || typeof defaultValue === "number";
|
|
77693
|
+
}
|
|
77694
|
+
var roundIncomingValueToPrecision = function(value2) {
|
|
77695
|
+
if (isNotValidValue(value2)) {
|
|
77696
|
+
return value2;
|
|
77697
|
+
}
|
|
77698
|
+
if (typeof value2 === "number") {
|
|
77699
|
+
value2 = toNumericString(value2);
|
|
77700
|
+
}
|
|
77701
|
+
if (_valueIsNumericString && typeof decimalScale === "number") {
|
|
77702
|
+
return roundToPrecision(value2, decimalScale, Boolean(fixedDecimalScale));
|
|
77703
|
+
}
|
|
77704
|
+
return value2;
|
|
77705
|
+
};
|
|
77706
|
+
var ref$1 = useInternalValues(roundIncomingValueToPrecision(value), roundIncomingValueToPrecision(defaultValue), Boolean(_valueIsNumericString), _format, _removeFormatting, onValueChange);
|
|
77707
|
+
var ref$1_0 = ref$1[0];
|
|
77708
|
+
var numAsString = ref$1_0.numAsString;
|
|
77709
|
+
var formattedValue = ref$1_0.formattedValue;
|
|
77710
|
+
var _onValueChange = ref$1[1];
|
|
77711
|
+
var _onKeyDown = function(e2) {
|
|
77712
|
+
var el2 = e2.target;
|
|
77713
|
+
var key = e2.key;
|
|
77714
|
+
var selectionStart = el2.selectionStart;
|
|
77715
|
+
var selectionEnd = el2.selectionEnd;
|
|
77716
|
+
var value2 = el2.value;
|
|
77717
|
+
if (value2 === void 0) value2 = "";
|
|
77718
|
+
if ((key === "Backspace" || key === "Delete") && selectionEnd < prefix2.length) {
|
|
77719
|
+
e2.preventDefault();
|
|
77720
|
+
return;
|
|
77721
|
+
}
|
|
77722
|
+
if (selectionStart !== selectionEnd) {
|
|
77723
|
+
onKeyDown(e2);
|
|
77724
|
+
return;
|
|
77725
|
+
}
|
|
77726
|
+
if (key === "Backspace" && value2[0] === "-" && selectionStart === prefix2.length + 1 && allowNegative) {
|
|
77727
|
+
setCaretPosition(el2, 1);
|
|
77728
|
+
}
|
|
77729
|
+
if (decimalScale && fixedDecimalScale) {
|
|
77730
|
+
if (key === "Backspace" && value2[selectionStart - 1] === decimalSeparator) {
|
|
77731
|
+
setCaretPosition(el2, selectionStart - 1);
|
|
77732
|
+
e2.preventDefault();
|
|
77733
|
+
} else if (key === "Delete" && value2[selectionStart] === decimalSeparator) {
|
|
77734
|
+
e2.preventDefault();
|
|
77735
|
+
}
|
|
77736
|
+
}
|
|
77737
|
+
if ((allowedDecimalSeparators === null || allowedDecimalSeparators === void 0 ? void 0 : allowedDecimalSeparators.includes(key)) && value2[selectionStart] === decimalSeparator) {
|
|
77738
|
+
setCaretPosition(el2, selectionStart + 1);
|
|
77739
|
+
}
|
|
77740
|
+
var _thousandSeparator = thousandSeparator === true ? "," : thousandSeparator;
|
|
77741
|
+
if (key === "Backspace" && value2[selectionStart - 1] === _thousandSeparator) {
|
|
77742
|
+
setCaretPosition(el2, selectionStart - 1);
|
|
77743
|
+
}
|
|
77744
|
+
if (key === "Delete" && value2[selectionStart] === _thousandSeparator) {
|
|
77745
|
+
setCaretPosition(el2, selectionStart + 1);
|
|
77746
|
+
}
|
|
77747
|
+
onKeyDown(e2);
|
|
77748
|
+
};
|
|
77749
|
+
var _onBlur = function(e2) {
|
|
77750
|
+
var _value2 = numAsString;
|
|
77751
|
+
if (!_value2.match(/\d/g)) {
|
|
77752
|
+
_value2 = "";
|
|
77753
|
+
}
|
|
77754
|
+
if (!allowLeadingZeros) {
|
|
77755
|
+
_value2 = fixLeadingZero(_value2);
|
|
77756
|
+
}
|
|
77757
|
+
if (fixedDecimalScale && decimalScale) {
|
|
77758
|
+
_value2 = roundToPrecision(_value2, decimalScale, fixedDecimalScale);
|
|
77759
|
+
}
|
|
77760
|
+
if (_value2 !== numAsString) {
|
|
77761
|
+
var formattedValue2 = format(_value2, props);
|
|
77762
|
+
_onValueChange({
|
|
77763
|
+
formattedValue: formattedValue2,
|
|
77764
|
+
value: _value2,
|
|
77765
|
+
floatValue: parseFloat(_value2)
|
|
77766
|
+
}, {
|
|
77767
|
+
event: e2,
|
|
77768
|
+
source: SourceType.event
|
|
77769
|
+
});
|
|
77770
|
+
}
|
|
77771
|
+
onBlur(e2);
|
|
77772
|
+
};
|
|
77773
|
+
var isValidInputCharacter = function(inputChar) {
|
|
77774
|
+
if (inputChar === decimalSeparator) {
|
|
77775
|
+
return true;
|
|
77776
|
+
}
|
|
77777
|
+
return charIsNumber(inputChar);
|
|
77778
|
+
};
|
|
77779
|
+
var isCharacterSame = function(ref3) {
|
|
77780
|
+
var currentValue = ref3.currentValue;
|
|
77781
|
+
var lastValue = ref3.lastValue;
|
|
77782
|
+
var formattedValue2 = ref3.formattedValue;
|
|
77783
|
+
var currentValueIndex = ref3.currentValueIndex;
|
|
77784
|
+
var formattedValueIndex = ref3.formattedValueIndex;
|
|
77785
|
+
var curChar = currentValue[currentValueIndex];
|
|
77786
|
+
var newChar = formattedValue2[formattedValueIndex];
|
|
77787
|
+
var typedRange = findChangeRange(lastValue, currentValue);
|
|
77788
|
+
var to2 = typedRange.to;
|
|
77789
|
+
var getDecimalSeparatorIndex = function(value2) {
|
|
77790
|
+
return _removeFormatting(value2).indexOf(".") + prefix2.length;
|
|
77791
|
+
};
|
|
77792
|
+
if (value === 0 && fixedDecimalScale && decimalScale && currentValue[to2.start] === decimalSeparator && getDecimalSeparatorIndex(currentValue) < currentValueIndex && getDecimalSeparatorIndex(formattedValue2) > formattedValueIndex) {
|
|
77793
|
+
return false;
|
|
77794
|
+
}
|
|
77795
|
+
if (currentValueIndex >= to2.start && currentValueIndex < to2.end && allowedDecimalSeparators && allowedDecimalSeparators.includes(curChar) && newChar === decimalSeparator) {
|
|
77796
|
+
return true;
|
|
77797
|
+
}
|
|
77798
|
+
return curChar === newChar;
|
|
77799
|
+
};
|
|
77800
|
+
return Object.assign(Object.assign({}, restProps), {
|
|
77801
|
+
value: formattedValue,
|
|
77802
|
+
valueIsNumericString: false,
|
|
77803
|
+
isValidInputCharacter,
|
|
77804
|
+
isCharacterSame,
|
|
77805
|
+
onValueChange: _onValueChange,
|
|
77806
|
+
format: _format,
|
|
77807
|
+
removeFormatting: _removeFormatting,
|
|
77808
|
+
getCaretBoundary: function(formattedValue2) {
|
|
77809
|
+
return getCaretBoundary(formattedValue2, props);
|
|
77810
|
+
},
|
|
77811
|
+
onKeyDown: _onKeyDown,
|
|
77812
|
+
onBlur: _onBlur
|
|
77813
|
+
});
|
|
77814
|
+
}
|
|
77815
|
+
function NumericFormat(props) {
|
|
77816
|
+
var numericFormatProps = useNumericFormat(props);
|
|
77817
|
+
return React__default.createElement(NumberFormatBase, Object.assign({}, numericFormatProps));
|
|
77818
|
+
}
|
|
77819
|
+
const STEP = 1;
|
|
77820
|
+
const SMALL_STEP = 0.1;
|
|
77821
|
+
const LARGE_STEP = 10;
|
|
77822
|
+
const DEFAULT_DECIMAL_SCALE = 2;
|
|
77823
|
+
const ZERO_DECIMAL_SCALE = 0;
|
|
77824
|
+
const DEFAULT_DECIMAL_SEPARATOR = ",";
|
|
77825
|
+
const STEP_HOLD_DELAY = 200;
|
|
77826
|
+
const STEP_HOLD_INTERVAL = 100;
|
|
76614
77827
|
function NumberComponent(props) {
|
|
76615
77828
|
const {
|
|
76616
77829
|
name,
|
|
@@ -76618,57 +77831,177 @@ function NumberComponent(props) {
|
|
|
76618
77831
|
minValue,
|
|
76619
77832
|
maxValue,
|
|
76620
77833
|
onChange,
|
|
76621
|
-
|
|
76622
|
-
|
|
76623
|
-
|
|
76624
|
-
|
|
77834
|
+
slotProps,
|
|
77835
|
+
onKeyDown,
|
|
77836
|
+
onBlur,
|
|
77837
|
+
inputRef,
|
|
77838
|
+
className,
|
|
77839
|
+
allowDecimals = false,
|
|
77840
|
+
numberDecimalSeparator,
|
|
77841
|
+
disabled,
|
|
77842
|
+
...restProps
|
|
76625
77843
|
} = props;
|
|
76626
|
-
const
|
|
76627
|
-
const
|
|
76628
|
-
|
|
76629
|
-
|
|
76630
|
-
|
|
76631
|
-
|
|
76632
|
-
|
|
76633
|
-
|
|
76634
|
-
|
|
76635
|
-
|
|
76636
|
-
|
|
76637
|
-
|
|
77844
|
+
const decimalScale = allowDecimals ? DEFAULT_DECIMAL_SCALE : ZERO_DECIMAL_SCALE;
|
|
77845
|
+
const decimalSeparator = numberDecimalSeparator ?? DEFAULT_DECIMAL_SEPARATOR;
|
|
77846
|
+
const innerInputRef = React__default.useRef(null);
|
|
77847
|
+
const forkedInputRef = useForkRef(inputRef, innerInputRef);
|
|
77848
|
+
const innerValue = value ?? "";
|
|
77849
|
+
const valueRef = React__default.useRef(value);
|
|
77850
|
+
React__default.useEffect(() => {
|
|
77851
|
+
valueRef.current = innerValue;
|
|
77852
|
+
}, [innerValue]);
|
|
77853
|
+
const holdTimeoutRef = React__default.useRef(null);
|
|
77854
|
+
const holdIntervalRef = React__default.useRef(null);
|
|
77855
|
+
function clampValue(value2) {
|
|
77856
|
+
let newValue = value2;
|
|
77857
|
+
if (typeof minValue !== "undefined" && +value2 < +minValue) newValue = minValue;
|
|
77858
|
+
if (typeof maxValue !== "undefined" && +value2 > +maxValue) newValue = maxValue;
|
|
77859
|
+
return String(newValue);
|
|
77860
|
+
}
|
|
77861
|
+
function handleBlur(event) {
|
|
77862
|
+
if (valueRef.current) {
|
|
77863
|
+
onChange(clampValue(valueRef.current));
|
|
76638
77864
|
}
|
|
76639
|
-
|
|
76640
|
-
|
|
76641
|
-
|
|
76642
|
-
|
|
76643
|
-
|
|
76644
|
-
|
|
76645
|
-
|
|
76646
|
-
|
|
76647
|
-
|
|
77865
|
+
onBlur?.(event);
|
|
77866
|
+
}
|
|
77867
|
+
function handleKeyboardIncrement(event) {
|
|
77868
|
+
if (typeof maxValue !== "undefined" && +valueRef.current >= +maxValue) return;
|
|
77869
|
+
let newValue;
|
|
77870
|
+
switch (true) {
|
|
77871
|
+
case event.shiftKey:
|
|
77872
|
+
newValue = +valueRef.current + LARGE_STEP;
|
|
77873
|
+
break;
|
|
77874
|
+
case event.altKey:
|
|
77875
|
+
newValue = Math.round((+valueRef.current + SMALL_STEP) * 10) / 10;
|
|
77876
|
+
break;
|
|
77877
|
+
default:
|
|
77878
|
+
newValue = +valueRef.current + STEP;
|
|
77879
|
+
}
|
|
77880
|
+
onChange(clampValue(newValue));
|
|
77881
|
+
}
|
|
77882
|
+
function handleKeyboardDecrement(event) {
|
|
77883
|
+
if (typeof minValue !== "undefined" && +valueRef.current <= +minValue) return;
|
|
77884
|
+
let newValue;
|
|
77885
|
+
switch (true) {
|
|
77886
|
+
case event.shiftKey:
|
|
77887
|
+
newValue = +valueRef.current - LARGE_STEP;
|
|
77888
|
+
break;
|
|
77889
|
+
case event.altKey:
|
|
77890
|
+
newValue = Math.round((+valueRef.current - SMALL_STEP) * 10) / 10;
|
|
77891
|
+
break;
|
|
77892
|
+
default:
|
|
77893
|
+
newValue = +valueRef.current - STEP;
|
|
77894
|
+
}
|
|
77895
|
+
onChange(clampValue(newValue));
|
|
77896
|
+
}
|
|
77897
|
+
function handleMouseStep(type2) {
|
|
77898
|
+
let newValue;
|
|
77899
|
+
if (type2 === "increment") {
|
|
77900
|
+
if (typeof maxValue !== "undefined" && +valueRef.current >= +maxValue) return;
|
|
77901
|
+
newValue = +valueRef.current + STEP;
|
|
77902
|
+
} else {
|
|
77903
|
+
if (typeof minValue !== "undefined" && +valueRef.current <= +minValue) return;
|
|
77904
|
+
newValue = +valueRef.current - STEP;
|
|
76648
77905
|
}
|
|
77906
|
+
onChange(clampValue(newValue));
|
|
77907
|
+
}
|
|
77908
|
+
const handleControlsMouseStart = (type2) => (event) => {
|
|
77909
|
+
event.preventDefault();
|
|
77910
|
+
innerInputRef.current?.focus();
|
|
77911
|
+
handleMouseStep(type2);
|
|
77912
|
+
holdTimeoutRef.current = window.setTimeout(() => {
|
|
77913
|
+
holdIntervalRef.current = window.setInterval(() => handleMouseStep(type2), STEP_HOLD_INTERVAL);
|
|
77914
|
+
}, STEP_HOLD_DELAY);
|
|
76649
77915
|
};
|
|
76650
|
-
|
|
76651
|
-
|
|
77916
|
+
function handleControlsMouseEnd() {
|
|
77917
|
+
if (holdTimeoutRef.current) {
|
|
77918
|
+
clearTimeout(holdTimeoutRef.current);
|
|
77919
|
+
holdTimeoutRef.current = null;
|
|
77920
|
+
}
|
|
77921
|
+
if (holdIntervalRef.current) {
|
|
77922
|
+
clearInterval(holdIntervalRef.current);
|
|
77923
|
+
holdIntervalRef.current = null;
|
|
77924
|
+
}
|
|
76652
77925
|
}
|
|
76653
|
-
|
|
76654
|
-
|
|
76655
|
-
|
|
76656
|
-
|
|
76657
|
-
|
|
76658
|
-
|
|
76659
|
-
|
|
76660
|
-
|
|
76661
|
-
|
|
76662
|
-
|
|
76663
|
-
|
|
76664
|
-
|
|
76665
|
-
|
|
76666
|
-
|
|
76667
|
-
|
|
76668
|
-
|
|
76669
|
-
|
|
76670
|
-
|
|
76671
|
-
|
|
77926
|
+
function handleKeyDown2(event) {
|
|
77927
|
+
if (event.key === "ArrowDown") {
|
|
77928
|
+
event.preventDefault();
|
|
77929
|
+
handleKeyboardDecrement(event);
|
|
77930
|
+
}
|
|
77931
|
+
if (event.key === "ArrowUp") {
|
|
77932
|
+
event.preventDefault();
|
|
77933
|
+
handleKeyboardIncrement(event);
|
|
77934
|
+
}
|
|
77935
|
+
if (event.key === "Enter") {
|
|
77936
|
+
event.preventDefault();
|
|
77937
|
+
onChange(clampValue(valueRef.current));
|
|
77938
|
+
}
|
|
77939
|
+
if (event.key === "-" && valueRef.current === "0") {
|
|
77940
|
+
event.preventDefault();
|
|
77941
|
+
return;
|
|
77942
|
+
}
|
|
77943
|
+
onKeyDown?.(event);
|
|
77944
|
+
}
|
|
77945
|
+
function handleChange(values2, sourceInfo) {
|
|
77946
|
+
if (sourceInfo.source === "event") {
|
|
77947
|
+
const newValue = values2.value === "-0" ? "0" : values2.value;
|
|
77948
|
+
onChange(newValue);
|
|
77949
|
+
}
|
|
77950
|
+
}
|
|
77951
|
+
return /* @__PURE__ */ jsx(
|
|
77952
|
+
NumericFormat,
|
|
77953
|
+
{
|
|
77954
|
+
customInput: TextField$3,
|
|
77955
|
+
variant: "outlined",
|
|
77956
|
+
size: "small",
|
|
77957
|
+
fullWidth: true,
|
|
77958
|
+
value: innerValue,
|
|
77959
|
+
onBlur: handleBlur,
|
|
77960
|
+
onKeyDown: handleKeyDown2,
|
|
77961
|
+
onValueChange: handleChange,
|
|
77962
|
+
decimalScale,
|
|
77963
|
+
decimalSeparator,
|
|
77964
|
+
name,
|
|
77965
|
+
disabled,
|
|
77966
|
+
autoComplete: "off",
|
|
77967
|
+
slotProps: { ...slotProps, htmlInput: { "data-testid": `${name}-number-input`, ...slotProps?.htmlInput }, input: {
|
|
77968
|
+
...slotProps?.input,
|
|
77969
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment$3, { position: "end", className: classNames("number-component__controls"), children: /* @__PURE__ */ jsxs(Stack, { spacing: 0, children: [
|
|
77970
|
+
/* @__PURE__ */ jsx(
|
|
77971
|
+
IconButton$3,
|
|
77972
|
+
{
|
|
77973
|
+
className: "number-component__icon-button",
|
|
77974
|
+
onMouseDown: handleControlsMouseStart("increment"),
|
|
77975
|
+
disabled,
|
|
77976
|
+
onMouseUp: handleControlsMouseEnd,
|
|
77977
|
+
onMouseLeave: handleControlsMouseEnd,
|
|
77978
|
+
disableRipple: true,
|
|
77979
|
+
tabIndex: -1,
|
|
77980
|
+
"data-testid": `${name}-number-increment-button`,
|
|
77981
|
+
children: /* @__PURE__ */ jsx(ArrowDropUpOutlined, { fontSize: "small", className: "number-component__icon-up" })
|
|
77982
|
+
}
|
|
77983
|
+
),
|
|
77984
|
+
/* @__PURE__ */ jsx(
|
|
77985
|
+
IconButton$3,
|
|
77986
|
+
{
|
|
77987
|
+
className: "number-component__icon-button",
|
|
77988
|
+
onMouseDown: handleControlsMouseStart("decrement"),
|
|
77989
|
+
disabled,
|
|
77990
|
+
onMouseUp: handleControlsMouseEnd,
|
|
77991
|
+
onMouseLeave: handleControlsMouseEnd,
|
|
77992
|
+
disableRipple: true,
|
|
77993
|
+
tabIndex: -1,
|
|
77994
|
+
"data-testid": `${name}-number-decrement-button`,
|
|
77995
|
+
children: /* @__PURE__ */ jsx(ArrowDropDownOutlined, { fontSize: "small", className: "number-component__icon-down" })
|
|
77996
|
+
}
|
|
77997
|
+
)
|
|
77998
|
+
] }) })
|
|
77999
|
+
} },
|
|
78000
|
+
className: classNames("number-component", className),
|
|
78001
|
+
inputRef: forkedInputRef,
|
|
78002
|
+
...restProps
|
|
78003
|
+
}
|
|
78004
|
+
);
|
|
76672
78005
|
}
|
|
76673
78006
|
function ProcessOverlay(props) {
|
|
76674
78007
|
const { children, inProcess, message, spinnerSize = 60, className } = props;
|
|
@@ -82265,6 +83598,12 @@ const commonMuiProps = {
|
|
|
82265
83598
|
},
|
|
82266
83599
|
MenuListProps: {
|
|
82267
83600
|
disablePadding: true
|
|
83601
|
+
},
|
|
83602
|
+
slotProps: {
|
|
83603
|
+
paper: {
|
|
83604
|
+
// Сдвигаем меню на 1px вниз, чтобы фон поповера не накрывал нижнюю границу select, когда координаты поля оказываются «между пикселями»
|
|
83605
|
+
sx: { mt: "1px" }
|
|
83606
|
+
}
|
|
82268
83607
|
}
|
|
82269
83608
|
}
|
|
82270
83609
|
}
|
|
@@ -82337,6 +83676,35 @@ const theme = createTheme$3({
|
|
|
82337
83676
|
h1: {
|
|
82338
83677
|
fontSize: "2rem",
|
|
82339
83678
|
fontWeight: 600
|
|
83679
|
+
},
|
|
83680
|
+
h4: {
|
|
83681
|
+
fontSize: "1.2rem",
|
|
83682
|
+
fontWeight: 600
|
|
83683
|
+
},
|
|
83684
|
+
h5: {
|
|
83685
|
+
fontSize: "1.1rem",
|
|
83686
|
+
fontWeight: 600
|
|
83687
|
+
},
|
|
83688
|
+
h6: {
|
|
83689
|
+
fontSize: "1rem",
|
|
83690
|
+
fontWeight: 600,
|
|
83691
|
+
lineHeight: "normal"
|
|
83692
|
+
},
|
|
83693
|
+
subtitle1: {
|
|
83694
|
+
fontSize: "1.5rem",
|
|
83695
|
+
fontWeight: 400,
|
|
83696
|
+
lineHeight: 1.5
|
|
83697
|
+
},
|
|
83698
|
+
subtitle2: {
|
|
83699
|
+
fontSize: "1.2rem",
|
|
83700
|
+
fontWeight: 400
|
|
83701
|
+
},
|
|
83702
|
+
body2: {
|
|
83703
|
+
fontSize: ".85rem",
|
|
83704
|
+
lineHeight: 1.5
|
|
83705
|
+
},
|
|
83706
|
+
caption: {
|
|
83707
|
+
fontSize: ".8rem"
|
|
82340
83708
|
}
|
|
82341
83709
|
},
|
|
82342
83710
|
components: {
|
|
@@ -82443,10 +83811,14 @@ function Header(props) {
|
|
|
82443
83811
|
const { label, hidden } = props;
|
|
82444
83812
|
return /* @__PURE__ */ jsx("div", { className: classNames("header", hideIf(hidden)), children: /* @__PURE__ */ jsx(Typography$3, { variant: "h1", color: "secondary", children: label }) });
|
|
82445
83813
|
}
|
|
83814
|
+
function stringToBoolean$1(value) {
|
|
83815
|
+
return value && value === "true";
|
|
83816
|
+
}
|
|
82446
83817
|
function Number$1(props) {
|
|
82447
83818
|
const { required, id: fieldName, value = "", parameters = {} } = props;
|
|
82448
83819
|
const services = useContext(ServicesContext);
|
|
82449
|
-
const { maxValue, minValue } = parameters;
|
|
83820
|
+
const { maxValue, minValue, allowDecimals } = parameters;
|
|
83821
|
+
const { numberDecimalSeparator } = services.applicationSettings.culture;
|
|
82450
83822
|
const { resetField, control } = useCustomFormContext();
|
|
82451
83823
|
const {
|
|
82452
83824
|
field,
|
|
@@ -82457,34 +83829,23 @@ function Number$1(props) {
|
|
|
82457
83829
|
rules: { required },
|
|
82458
83830
|
defaultValue: value
|
|
82459
83831
|
});
|
|
82460
|
-
function handleBlur(event) {
|
|
82461
|
-
const newValue = event.target.value;
|
|
82462
|
-
if (minValue && +newValue < +minValue) {
|
|
82463
|
-
field.onChange(minValue);
|
|
82464
|
-
return;
|
|
82465
|
-
}
|
|
82466
|
-
if (maxValue && +newValue > +maxValue) {
|
|
82467
|
-
field.onChange(maxValue);
|
|
82468
|
-
return;
|
|
82469
|
-
}
|
|
82470
|
-
field.onBlur();
|
|
82471
|
-
}
|
|
82472
83832
|
const renderContent = () => {
|
|
82473
83833
|
if (minValue && maxValue && +maxValue <= +minValue) {
|
|
82474
83834
|
return /* @__PURE__ */ jsx(ErrorMessage, { message: services.resources.NumberRangeError });
|
|
82475
83835
|
}
|
|
83836
|
+
const { ref: ref2, ...restField } = field;
|
|
83837
|
+
const allowDecimalsBoolean = stringToBoolean$1(allowDecimals);
|
|
82476
83838
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
82477
83839
|
/* @__PURE__ */ jsx(
|
|
82478
|
-
|
|
83840
|
+
NumberComponent,
|
|
82479
83841
|
{
|
|
82480
|
-
|
|
82481
|
-
|
|
82482
|
-
fullWidth: true,
|
|
82483
|
-
...field,
|
|
82484
|
-
slotProps: { htmlInput: { "data-testid": "number-input" } },
|
|
83842
|
+
...restField,
|
|
83843
|
+
inputRef: ref2,
|
|
82485
83844
|
className: "number",
|
|
82486
|
-
|
|
82487
|
-
|
|
83845
|
+
maxValue,
|
|
83846
|
+
minValue,
|
|
83847
|
+
allowDecimals: allowDecimalsBoolean,
|
|
83848
|
+
numberDecimalSeparator
|
|
82488
83849
|
}
|
|
82489
83850
|
),
|
|
82490
83851
|
error && /* @__PURE__ */ jsx(ErrorMessage, { message: services.resources.Dialog_ValidationRequired })
|
|
@@ -82608,21 +83969,6 @@ const databaseGenerationSettingsValueType = {
|
|
|
82608
83969
|
useOuterMetadata: false
|
|
82609
83970
|
};
|
|
82610
83971
|
const ListContext = /* @__PURE__ */ React.createContext({});
|
|
82611
|
-
function isFocusVisible(element) {
|
|
82612
|
-
try {
|
|
82613
|
-
return element.matches(":focus-visible");
|
|
82614
|
-
} catch (error) {
|
|
82615
|
-
}
|
|
82616
|
-
return false;
|
|
82617
|
-
}
|
|
82618
|
-
const UNINITIALIZED = {};
|
|
82619
|
-
function useLazyRef(init, initArg) {
|
|
82620
|
-
const ref2 = React.useRef(UNINITIALIZED);
|
|
82621
|
-
if (ref2.current === UNINITIALIZED) {
|
|
82622
|
-
ref2.current = init(initArg);
|
|
82623
|
-
}
|
|
82624
|
-
return ref2;
|
|
82625
|
-
}
|
|
82626
83972
|
class LazyRipple {
|
|
82627
83973
|
/** React ref to the ripple instance */
|
|
82628
83974
|
/** If the ripple component should be mounted */
|
|
@@ -82690,40 +84036,6 @@ function createControlledPromise() {
|
|
|
82690
84036
|
p2.reject = reject;
|
|
82691
84037
|
return p2;
|
|
82692
84038
|
}
|
|
82693
|
-
const EMPTY$1 = [];
|
|
82694
|
-
function useOnMount(fn2) {
|
|
82695
|
-
React.useEffect(fn2, EMPTY$1);
|
|
82696
|
-
}
|
|
82697
|
-
class Timeout {
|
|
82698
|
-
static create() {
|
|
82699
|
-
return new Timeout();
|
|
82700
|
-
}
|
|
82701
|
-
currentId = null;
|
|
82702
|
-
/**
|
|
82703
|
-
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
82704
|
-
*/
|
|
82705
|
-
start(delay, fn2) {
|
|
82706
|
-
this.clear();
|
|
82707
|
-
this.currentId = setTimeout(() => {
|
|
82708
|
-
this.currentId = null;
|
|
82709
|
-
fn2();
|
|
82710
|
-
}, delay);
|
|
82711
|
-
}
|
|
82712
|
-
clear = () => {
|
|
82713
|
-
if (this.currentId !== null) {
|
|
82714
|
-
clearTimeout(this.currentId);
|
|
82715
|
-
this.currentId = null;
|
|
82716
|
-
}
|
|
82717
|
-
};
|
|
82718
|
-
disposeEffect = () => {
|
|
82719
|
-
return this.clear;
|
|
82720
|
-
};
|
|
82721
|
-
}
|
|
82722
|
-
function useTimeout() {
|
|
82723
|
-
const timeout = useLazyRef(Timeout.create).current;
|
|
82724
|
-
useOnMount(timeout.disposeEffect);
|
|
82725
|
-
return timeout;
|
|
82726
|
-
}
|
|
82727
84039
|
function Ripple(props) {
|
|
82728
84040
|
const {
|
|
82729
84041
|
className,
|
|
@@ -83785,109 +85097,6 @@ function getListItemTextUtilityClass(slot) {
|
|
|
83785
85097
|
return generateUtilityClass("MuiListItemText", slot);
|
|
83786
85098
|
}
|
|
83787
85099
|
const listItemTextClasses = generateUtilityClasses("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
|
|
83788
|
-
function isHostComponent$1(element) {
|
|
83789
|
-
return typeof element === "string";
|
|
83790
|
-
}
|
|
83791
|
-
function appendOwnerState(elementType, otherProps, ownerState) {
|
|
83792
|
-
if (elementType === void 0 || isHostComponent$1(elementType)) {
|
|
83793
|
-
return otherProps;
|
|
83794
|
-
}
|
|
83795
|
-
return {
|
|
83796
|
-
...otherProps,
|
|
83797
|
-
ownerState: {
|
|
83798
|
-
...otherProps.ownerState,
|
|
83799
|
-
...ownerState
|
|
83800
|
-
}
|
|
83801
|
-
};
|
|
83802
|
-
}
|
|
83803
|
-
function resolveComponentProps(componentProps, ownerState, slotState) {
|
|
83804
|
-
if (typeof componentProps === "function") {
|
|
83805
|
-
return componentProps(ownerState, slotState);
|
|
83806
|
-
}
|
|
83807
|
-
return componentProps;
|
|
83808
|
-
}
|
|
83809
|
-
function extractEventHandlers(object, excludeKeys = []) {
|
|
83810
|
-
if (object === void 0) {
|
|
83811
|
-
return {};
|
|
83812
|
-
}
|
|
83813
|
-
const result = {};
|
|
83814
|
-
Object.keys(object).filter((prop) => prop.match(/^on[A-Z]/) && typeof object[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
|
|
83815
|
-
result[prop] = object[prop];
|
|
83816
|
-
});
|
|
83817
|
-
return result;
|
|
83818
|
-
}
|
|
83819
|
-
function omitEventHandlers(object) {
|
|
83820
|
-
if (object === void 0) {
|
|
83821
|
-
return {};
|
|
83822
|
-
}
|
|
83823
|
-
const result = {};
|
|
83824
|
-
Object.keys(object).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object[prop] === "function")).forEach((prop) => {
|
|
83825
|
-
result[prop] = object[prop];
|
|
83826
|
-
});
|
|
83827
|
-
return result;
|
|
83828
|
-
}
|
|
83829
|
-
function mergeSlotProps(parameters) {
|
|
83830
|
-
const {
|
|
83831
|
-
getSlotProps,
|
|
83832
|
-
additionalProps,
|
|
83833
|
-
externalSlotProps,
|
|
83834
|
-
externalForwardedProps,
|
|
83835
|
-
className
|
|
83836
|
-
} = parameters;
|
|
83837
|
-
if (!getSlotProps) {
|
|
83838
|
-
const joinedClasses2 = clsx$1(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
83839
|
-
const mergedStyle2 = {
|
|
83840
|
-
...additionalProps?.style,
|
|
83841
|
-
...externalForwardedProps?.style,
|
|
83842
|
-
...externalSlotProps?.style
|
|
83843
|
-
};
|
|
83844
|
-
const props2 = {
|
|
83845
|
-
...additionalProps,
|
|
83846
|
-
...externalForwardedProps,
|
|
83847
|
-
...externalSlotProps
|
|
83848
|
-
};
|
|
83849
|
-
if (joinedClasses2.length > 0) {
|
|
83850
|
-
props2.className = joinedClasses2;
|
|
83851
|
-
}
|
|
83852
|
-
if (Object.keys(mergedStyle2).length > 0) {
|
|
83853
|
-
props2.style = mergedStyle2;
|
|
83854
|
-
}
|
|
83855
|
-
return {
|
|
83856
|
-
props: props2,
|
|
83857
|
-
internalRef: void 0
|
|
83858
|
-
};
|
|
83859
|
-
}
|
|
83860
|
-
const eventHandlers = extractEventHandlers({
|
|
83861
|
-
...externalForwardedProps,
|
|
83862
|
-
...externalSlotProps
|
|
83863
|
-
});
|
|
83864
|
-
const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
|
|
83865
|
-
const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
|
|
83866
|
-
const internalSlotProps = getSlotProps(eventHandlers);
|
|
83867
|
-
const joinedClasses = clsx$1(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
83868
|
-
const mergedStyle = {
|
|
83869
|
-
...internalSlotProps?.style,
|
|
83870
|
-
...additionalProps?.style,
|
|
83871
|
-
...externalForwardedProps?.style,
|
|
83872
|
-
...externalSlotProps?.style
|
|
83873
|
-
};
|
|
83874
|
-
const props = {
|
|
83875
|
-
...internalSlotProps,
|
|
83876
|
-
...additionalProps,
|
|
83877
|
-
...otherPropsWithoutEventHandlers,
|
|
83878
|
-
...componentsPropsWithoutEventHandlers
|
|
83879
|
-
};
|
|
83880
|
-
if (joinedClasses.length > 0) {
|
|
83881
|
-
props.className = joinedClasses;
|
|
83882
|
-
}
|
|
83883
|
-
if (Object.keys(mergedStyle).length > 0) {
|
|
83884
|
-
props.style = mergedStyle;
|
|
83885
|
-
}
|
|
83886
|
-
return {
|
|
83887
|
-
props,
|
|
83888
|
-
internalRef: internalSlotProps.ref
|
|
83889
|
-
};
|
|
83890
|
-
}
|
|
83891
85100
|
function useSlot(name, parameters) {
|
|
83892
85101
|
const {
|
|
83893
85102
|
className,
|
|
@@ -84291,7 +85500,7 @@ function DropdownWithTooltip(props) {
|
|
|
84291
85500
|
},
|
|
84292
85501
|
renderValue: (selected) => {
|
|
84293
85502
|
const selectedOption = options.find((option) => option.value === Number(selected));
|
|
84294
|
-
return /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: selectedOption?.tooltip, children: /* @__PURE__ */ jsx("span",
|
|
85503
|
+
return /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: selectedOption?.tooltip, children: /* @__PURE__ */ jsx(Typography$3, { component: "span", className: "database-generation-settings__selected-value", children: selectedOption?.displayName }) });
|
|
84295
85504
|
}
|
|
84296
85505
|
};
|
|
84297
85506
|
return /* @__PURE__ */ jsx(
|
|
@@ -84305,7 +85514,7 @@ function DropdownWithTooltip(props) {
|
|
|
84305
85514
|
className,
|
|
84306
85515
|
size: "small",
|
|
84307
85516
|
slotProps: { select: { ...selectProps, inputProps: { "data-testid": dataTestId } } },
|
|
84308
|
-
children: options.map((option) => /* @__PURE__ */ jsx(MenuItem, { value: option.value, "data-testid": `${dataTestId}-option-${option.value}`, children: /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: option.tooltip, children: /* @__PURE__ */ jsx("span",
|
|
85517
|
+
children: options.map((option) => /* @__PURE__ */ jsx(MenuItem, { value: option.value, "data-testid": `${dataTestId}-option-${option.value}`, children: /* @__PURE__ */ jsx(LightTooltip, { placement: "top", title: option.tooltip, children: /* @__PURE__ */ jsx(Typography$3, { component: "span", children: option.displayName }) }) }, `${name}_${option.value}`))
|
|
84309
85518
|
}
|
|
84310
85519
|
);
|
|
84311
85520
|
}
|
|
@@ -87114,6 +88323,9 @@ function SettingsPageRouteComponent(props) {
|
|
|
87114
88323
|
const settingsPageRouteHandler = async (application, paramsData) => {
|
|
87115
88324
|
const { layoutId, serviceId, itemId } = paramsData.data;
|
|
87116
88325
|
const { extendedLayoutId } = paramsData.params || {};
|
|
88326
|
+
if (serviceId) {
|
|
88327
|
+
await application.settingsNavigation.ensureServiceName(serviceId);
|
|
88328
|
+
}
|
|
87117
88329
|
return /* @__PURE__ */ jsx(
|
|
87118
88330
|
SettingsPageRouteComponent,
|
|
87119
88331
|
{
|
|
@@ -87151,11 +88363,11 @@ const itemSettingsPageRoute = {
|
|
|
87151
88363
|
hooks: settingsPageRouteHooks
|
|
87152
88364
|
};
|
|
87153
88365
|
var TabsContainer = function(props) {
|
|
87154
|
-
var className = props.className, divProps = __rest$
|
|
88366
|
+
var className = props.className, divProps = __rest$3(props, ["className"]);
|
|
87155
88367
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs", className) }, divProps));
|
|
87156
88368
|
};
|
|
87157
88369
|
var TabContent = function(props) {
|
|
87158
|
-
var className = props.className, divProps = __rest$
|
|
88370
|
+
var className = props.className, divProps = __rest$3(props, ["className"]);
|
|
87159
88371
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs__content", className) }, divProps));
|
|
87160
88372
|
};
|
|
87161
88373
|
var TabsRibbonAligning;
|
|
@@ -87165,13 +88377,13 @@ var TabsRibbonAligning;
|
|
|
87165
88377
|
TabsRibbonAligning2["Right"] = "right";
|
|
87166
88378
|
})(TabsRibbonAligning || (TabsRibbonAligning = {}));
|
|
87167
88379
|
var TabsRibbon = function(props) {
|
|
87168
|
-
var className = props.className, _a = props.aligning, aligning = _a === void 0 ? TabsRibbonAligning.Center : _a, divProps = __rest$
|
|
88380
|
+
var className = props.className, _a = props.aligning, aligning = _a === void 0 ? TabsRibbonAligning.Center : _a, divProps = __rest$3(props, ["className", "aligning"]);
|
|
87169
88381
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs__ribbon", className, "dv-tabs__ribbon_aligning-" + aligning) }, divProps));
|
|
87170
88382
|
};
|
|
87171
88383
|
var TabToggler = function(props) {
|
|
87172
88384
|
var className = props.className, name = props.name, index = props.index, disabled = props.disabled;
|
|
87173
88385
|
props.active;
|
|
87174
|
-
var onClick = props.onClick, onChangeActiveTab = props.onChangeActiveTab, divProps = __rest$
|
|
88386
|
+
var onClick = props.onClick, onChangeActiveTab = props.onChangeActiveTab, divProps = __rest$3(props, ["className", "name", "index", "disabled", "active", "onClick", "onChangeActiveTab"]);
|
|
87175
88387
|
var clickHandler = disabled ? doNothing : function(e2) {
|
|
87176
88388
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
87177
88389
|
return __generator(this, function(_a) {
|
|
@@ -87385,7 +88597,6 @@ function ReloadIcon(props) {
|
|
|
87385
88597
|
const { className, color: color2, loading, onClick } = props;
|
|
87386
88598
|
return /* @__PURE__ */ jsx("div", { onClick, className: classNames("reload-icon", className, classIf(loading, "loading")), children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color2, children: /* @__PURE__ */ jsx("path", { d: "M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z" }) }) });
|
|
87387
88599
|
}
|
|
87388
|
-
const ICON_COLOR = "#607d8b";
|
|
87389
88600
|
function ExpandButton(props) {
|
|
87390
88601
|
const { expanded, dataTestId, className, disabled, ...elementProps } = props;
|
|
87391
88602
|
const expandedClass = expanded ? "expand-button__expanded" : "expand-button__collapsed";
|
|
@@ -87399,12 +88610,13 @@ function ExpandButton(props) {
|
|
|
87399
88610
|
}
|
|
87400
88611
|
);
|
|
87401
88612
|
}
|
|
88613
|
+
const ICON_COLOR = "#607d8b";
|
|
87402
88614
|
function ServerList(props) {
|
|
87403
88615
|
const { services, servers, selectServer, reloadServerList, selectedServerId, loading } = props;
|
|
87404
88616
|
const [expanded, setExpanded] = useState(true);
|
|
87405
88617
|
return /* @__PURE__ */ jsxs("div", { className: "server-list", children: [
|
|
87406
88618
|
/* @__PURE__ */ jsxs("div", { className: "server-list__title", children: [
|
|
87407
|
-
/* @__PURE__ */ jsxs("
|
|
88619
|
+
/* @__PURE__ */ jsxs(Typography$3, { variant: "h5", className: "server-list__title__text", children: [
|
|
87408
88620
|
/* @__PURE__ */ jsx(ExpandButton, { onClick: () => setExpanded(!expanded), expanded: servers?.length > 0 && expanded, disabled: !servers?.length }),
|
|
87409
88621
|
`${services.resources.Servers} (${servers?.length ?? 0})`
|
|
87410
88622
|
] }),
|
|
@@ -87418,7 +88630,7 @@ function ServerList(props) {
|
|
|
87418
88630
|
{
|
|
87419
88631
|
className: "server-list__item-content" + classIf(selectedServerId === server.id, "selected"),
|
|
87420
88632
|
onClick: () => selectServer(server),
|
|
87421
|
-
children: server.name
|
|
88633
|
+
children: /* @__PURE__ */ jsx(Typography$3, { variant: "body2", component: "span", children: server.name })
|
|
87422
88634
|
}
|
|
87423
88635
|
)
|
|
87424
88636
|
] }, server.id);
|
|
@@ -87497,23 +88709,6 @@ class ServersPageLogic extends ComponentLogic {
|
|
|
87497
88709
|
function ServerIcon() {
|
|
87498
88710
|
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24px", height: "24px", fill: ICON_COLOR, children: /* @__PURE__ */ jsx("path", { d: "M2 4.6V9.4C2 10.3 2.5 11 3.2 11H20.9C21.5 11 22.1 10.3 22.1 9.4V4.6C22 3.7 21.5 3 20.8 3H3.2C2.5 3 2 3.7 2 4.6M10 8V6H9V8H10M5 8H7V6H5V8M20 9H4V5H20V9M2 14.6V19.4C2 20.3 2.5 21 3.2 21H20.9C21.5 21 22.1 20.3 22.1 19.4V14.6C22.1 13.7 21.6 13 20.9 13H3.2C2.5 13 2 13.7 2 14.6M10 18V16H9V18H10M5 18H7V16H5V18M20 19H4V15H20V19Z" }) });
|
|
87499
88711
|
}
|
|
87500
|
-
function ServerDescriptionCard(props) {
|
|
87501
|
-
const { name, operatingSystem, services } = props;
|
|
87502
|
-
const resources = services.resources;
|
|
87503
|
-
const fields = [
|
|
87504
|
-
{ label: resources.ServerName, value: name },
|
|
87505
|
-
{ label: resources.OperatingSystem, value: operatingSystem }
|
|
87506
|
-
];
|
|
87507
|
-
return /* @__PURE__ */ jsxs("div", { className: "server-description-card", children: [
|
|
87508
|
-
/* @__PURE__ */ jsx(InformationIcon, { className: "server-description-card__info-icon", color: ICON_COLOR }),
|
|
87509
|
-
/* @__PURE__ */ jsx("div", { className: "server-description-card__data", children: fields.map((field) => {
|
|
87510
|
-
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
87511
|
-
/* @__PURE__ */ jsx("label", { children: field.label }),
|
|
87512
|
-
/* @__PURE__ */ jsx("div", { children: field.value })
|
|
87513
|
-
] }, field.label);
|
|
87514
|
-
}) })
|
|
87515
|
-
] });
|
|
87516
|
-
}
|
|
87517
88712
|
function ComponentList(props) {
|
|
87518
88713
|
const { components, services, onComponentClick, onDeleteClick } = props;
|
|
87519
88714
|
const onDeleteIconClick = async (event, component) => {
|
|
@@ -87534,7 +88729,7 @@ function ComponentList(props) {
|
|
|
87534
88729
|
components.map((component) => {
|
|
87535
88730
|
return /* @__PURE__ */ jsxs("div", { className: "component-list__item", onClick: () => onComponentClick(component), children: [
|
|
87536
88731
|
/* @__PURE__ */ jsx(ComponentIcon, { color: ICON_COLOR }),
|
|
87537
|
-
/* @__PURE__ */ jsx(
|
|
88732
|
+
/* @__PURE__ */ jsx(Typography$3, { className: "component-list__item__content", children: component.serviceName }),
|
|
87538
88733
|
/* @__PURE__ */ jsx(
|
|
87539
88734
|
DeleteIcon,
|
|
87540
88735
|
{
|
|
@@ -87548,6 +88743,26 @@ function ComponentList(props) {
|
|
|
87548
88743
|
})
|
|
87549
88744
|
] });
|
|
87550
88745
|
}
|
|
88746
|
+
function ServerDescriptionCard(props) {
|
|
88747
|
+
const { name, operatingSystem, services } = props;
|
|
88748
|
+
const resources = services.resources;
|
|
88749
|
+
const fields = [
|
|
88750
|
+
{ label: resources.ServerName, value: name },
|
|
88751
|
+
{ label: resources.OperatingSystem, value: operatingSystem }
|
|
88752
|
+
];
|
|
88753
|
+
return /* @__PURE__ */ jsxs("div", { className: "server-description-card", children: [
|
|
88754
|
+
/* @__PURE__ */ jsx(InformationIcon, { className: "server-description-card__info-icon", color: ICON_COLOR }),
|
|
88755
|
+
/* @__PURE__ */ jsx("div", { className: "server-description-card__data", children: fields.map((field) => {
|
|
88756
|
+
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
88757
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
88758
|
+
field.label,
|
|
88759
|
+
":"
|
|
88760
|
+
] }),
|
|
88761
|
+
/* @__PURE__ */ jsx(Typography$3, { component: "span", variant: "body2", children: field.value })
|
|
88762
|
+
] }, field.label);
|
|
88763
|
+
}) })
|
|
88764
|
+
] });
|
|
88765
|
+
}
|
|
87551
88766
|
function ServerDescriptionPanel(props) {
|
|
87552
88767
|
const { serverDescription, loadingServices, services } = props;
|
|
87553
88768
|
const onComponentClick = (component) => {
|
|
@@ -87561,7 +88776,7 @@ function ServerDescriptionPanel(props) {
|
|
|
87561
88776
|
return /* @__PURE__ */ jsx(LoadingMore, { loading: true });
|
|
87562
88777
|
}
|
|
87563
88778
|
if (!serverDescription) {
|
|
87564
|
-
return /* @__PURE__ */ jsx("
|
|
88779
|
+
return /* @__PURE__ */ jsx(Typography$3, { variant: "subtitle2", className: "server-description-panel__title", children: services.resources.SelectServer });
|
|
87565
88780
|
}
|
|
87566
88781
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
87567
88782
|
/* @__PURE__ */ jsx(
|
|
@@ -87659,6 +88874,9 @@ class ServersController {
|
|
|
87659
88874
|
getServerInfo(serverId) {
|
|
87660
88875
|
return this.requestService.get(`api/servers/${serverId}`, null, { disableDialogsOnErrors: true });
|
|
87661
88876
|
}
|
|
88877
|
+
getServiceInfo(serviceId) {
|
|
88878
|
+
return this.requestService.get(`api/servers/service/${serviceId}`, null, { disableDialogsOnErrors: true });
|
|
88879
|
+
}
|
|
87662
88880
|
deleteService(serviceId) {
|
|
87663
88881
|
return this.requestService.delete(`api/servers/${serviceId}`);
|
|
87664
88882
|
}
|
|
@@ -87667,6 +88885,7 @@ const $SettingsNavigation = serviceName((s2) => s2.settingsNavigation);
|
|
|
87667
88885
|
class SettingsNavigationService {
|
|
87668
88886
|
constructor(application) {
|
|
87669
88887
|
this.application = application;
|
|
88888
|
+
this.serviceNamesCache = /* @__PURE__ */ new Map();
|
|
87670
88889
|
this.goToConfigurationPage = () => {
|
|
87671
88890
|
const { params, data } = this.application.routingService.getLastRouteResolvedParams() || {};
|
|
87672
88891
|
const { serverId, serviceId, layoutId } = data;
|
|
@@ -87674,6 +88893,29 @@ class SettingsNavigationService {
|
|
|
87674
88893
|
this.application.routingService.navigateToRoute(configurationPageUrl);
|
|
87675
88894
|
};
|
|
87676
88895
|
}
|
|
88896
|
+
async ensureServiceName(serviceId) {
|
|
88897
|
+
if (!serviceId) return;
|
|
88898
|
+
if (this.getCachedServiceName(serviceId)) {
|
|
88899
|
+
return;
|
|
88900
|
+
}
|
|
88901
|
+
try {
|
|
88902
|
+
const service = await this.application.serverController.getServiceInfo(serviceId);
|
|
88903
|
+
if (!service) return;
|
|
88904
|
+
this.rememberServiceName(service.serviceId, service.serviceName);
|
|
88905
|
+
} catch {
|
|
88906
|
+
}
|
|
88907
|
+
}
|
|
88908
|
+
rememberServiceName(serviceId, serviceName2) {
|
|
88909
|
+
if (!serviceId || !serviceName2) return;
|
|
88910
|
+
this.serviceNamesCache.set(serviceId, serviceName2);
|
|
88911
|
+
}
|
|
88912
|
+
getCachedServiceName(serviceId) {
|
|
88913
|
+
return this.serviceNamesCache.get(serviceId);
|
|
88914
|
+
}
|
|
88915
|
+
resolveServiceName(serverId, serviceId, fallback) {
|
|
88916
|
+
if (!serviceId) return fallback;
|
|
88917
|
+
return this.getCachedServiceName(serviceId) ?? fallback;
|
|
88918
|
+
}
|
|
87677
88919
|
convertPathToUrl(str, ...args) {
|
|
87678
88920
|
const matches2 = str.match(/(:\w+)/g);
|
|
87679
88921
|
if (!matches2) return str;
|
|
@@ -87715,9 +88957,10 @@ class SettingsNavigationService {
|
|
|
87715
88957
|
});
|
|
87716
88958
|
}
|
|
87717
88959
|
if (params.serviceName) {
|
|
88960
|
+
const resolvedServiceName = this.resolveServiceName(serverId, serviceId, serviceName2);
|
|
87718
88961
|
breadcrumbsItems.push({
|
|
87719
|
-
label:
|
|
87720
|
-
path: this.getSettingsPageUrl(serverId, serviceId, layoutId,
|
|
88962
|
+
label: resolvedServiceName,
|
|
88963
|
+
path: this.getSettingsPageUrl(serverId, serviceId, layoutId, resolvedServiceName)
|
|
87721
88964
|
});
|
|
87722
88965
|
}
|
|
87723
88966
|
if (params.itemName) {
|
|
@@ -87727,9 +88970,10 @@ class SettingsNavigationService {
|
|
|
87727
88970
|
});
|
|
87728
88971
|
}
|
|
87729
88972
|
if (route.path === CONFIGURATION_ROUTE_PATH) {
|
|
88973
|
+
const resolvedServiceName = this.resolveServiceName(serverId, serviceId, serviceName2);
|
|
87730
88974
|
breadcrumbsItems.push({
|
|
87731
88975
|
label: this.application.resources.AdvancedSettings,
|
|
87732
|
-
path: this.getConfigurationPageUrl(serverId, serviceId, layoutId,
|
|
88976
|
+
path: this.getConfigurationPageUrl(serverId, serviceId, layoutId, resolvedServiceName)
|
|
87733
88977
|
});
|
|
87734
88978
|
}
|
|
87735
88979
|
return breadcrumbsItems;
|
|
@@ -88699,46 +89943,6 @@ const gridHasBottomFillerSelector = (state) => {
|
|
|
88699
89943
|
}
|
|
88700
89944
|
return true;
|
|
88701
89945
|
};
|
|
88702
|
-
function getScrollbarSize(win = window) {
|
|
88703
|
-
const documentWidth = win.document.documentElement.clientWidth;
|
|
88704
|
-
return win.innerWidth - documentWidth;
|
|
88705
|
-
}
|
|
88706
|
-
const usePreviousProps = (value) => {
|
|
88707
|
-
const ref2 = React.useRef({});
|
|
88708
|
-
React.useEffect(() => {
|
|
88709
|
-
ref2.current = value;
|
|
88710
|
-
});
|
|
88711
|
-
return ref2.current;
|
|
88712
|
-
};
|
|
88713
|
-
function useSlotProps(parameters) {
|
|
88714
|
-
const {
|
|
88715
|
-
elementType,
|
|
88716
|
-
externalSlotProps,
|
|
88717
|
-
ownerState,
|
|
88718
|
-
skipResolvingSlotProps = false,
|
|
88719
|
-
...other
|
|
88720
|
-
} = parameters;
|
|
88721
|
-
const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
|
|
88722
|
-
const {
|
|
88723
|
-
props: mergedProps,
|
|
88724
|
-
internalRef
|
|
88725
|
-
} = mergeSlotProps({
|
|
88726
|
-
...other,
|
|
88727
|
-
externalSlotProps: resolvedComponentsProps
|
|
88728
|
-
});
|
|
88729
|
-
const ref2 = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);
|
|
88730
|
-
const props = appendOwnerState(elementType, {
|
|
88731
|
-
...mergedProps,
|
|
88732
|
-
ref: ref2
|
|
88733
|
-
}, ownerState);
|
|
88734
|
-
return props;
|
|
88735
|
-
}
|
|
88736
|
-
function getReactElementRef(element) {
|
|
88737
|
-
if (parseInt(React.version, 10) >= 19) {
|
|
88738
|
-
return element?.props?.ref || null;
|
|
88739
|
-
}
|
|
88740
|
-
return element?.ref || null;
|
|
88741
|
-
}
|
|
88742
89946
|
function fastMemo(component) {
|
|
88743
89947
|
return /* @__PURE__ */ React.memo(component, fastObjectShallowCompare);
|
|
88744
89948
|
}
|
|
@@ -121144,7 +122348,7 @@ function ExtendedConfiguration(props) {
|
|
|
121144
122348
|
] })
|
|
121145
122349
|
] }),
|
|
121146
122350
|
/* @__PURE__ */ jsxs("div", { className: "extended-configuration", children: [
|
|
121147
|
-
/* @__PURE__ */ jsx(Typography$3, { variant: "
|
|
122351
|
+
/* @__PURE__ */ jsx(Typography$3, { variant: "h1", color: "secondary", children: resources.AdvancedSettings }),
|
|
121148
122352
|
/* @__PURE__ */ jsx(SearchRow, { changeSearchText: (searchText2) => logic.changeSearchText(searchText2), searchText, services: props.services }),
|
|
121149
122353
|
/* @__PURE__ */ jsx(Paper$3, { className: "extended-configuration__table", children: /* @__PURE__ */ jsx(
|
|
121150
122354
|
DataGrid,
|
|
@@ -121183,7 +122387,11 @@ function ConfigurationRouteComponent(props) {
|
|
|
121183
122387
|
return /* @__PURE__ */ jsx(ServicesContext.Provider, { value: routeServices, children: /* @__PURE__ */ jsx(ExtendedConfiguration, { services: props.services, serviceId: props.serviceId }) });
|
|
121184
122388
|
}
|
|
121185
122389
|
const configurationRouteHandler = async (application, paramsData) => {
|
|
121186
|
-
|
|
122390
|
+
const { serviceId } = paramsData.data;
|
|
122391
|
+
if (serviceId) {
|
|
122392
|
+
await application.settingsNavigation.ensureServiceName(serviceId);
|
|
122393
|
+
}
|
|
122394
|
+
return /* @__PURE__ */ jsx(ConfigurationRouteComponent, { services: application, serviceId });
|
|
121187
122395
|
};
|
|
121188
122396
|
const configurationRoute = {
|
|
121189
122397
|
path: CONFIGURATION_ROUTE_PATH,
|
|
@@ -124222,7 +125430,7 @@ function ConfigurationLocksPage(props) {
|
|
|
124222
125430
|
resources,
|
|
124223
125431
|
pendingUnlockOperations
|
|
124224
125432
|
}
|
|
124225
|
-
) : /* @__PURE__ */ jsx("p",
|
|
125433
|
+
) : /* @__PURE__ */ jsx(Typography$3, { component: "p", className: "configuration-locks-page__text", children: resources.ConfigurationLocks_Empty }))
|
|
124226
125434
|
] }) });
|
|
124227
125435
|
}
|
|
124228
125436
|
function ConfigurationLocksRouteComponent(props) {
|