@docsvision/management-console 6.2.0-beta.10 → 6.2.0-beta.12
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 +28 -9
- package/index.js +1551 -357
- 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";
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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
|
}));
|
|
@@ -59056,7 +59062,7 @@ const WarningIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
|
59056
59062
|
}));
|
|
59057
59063
|
function DatabaseSettingsCard(props) {
|
|
59058
59064
|
const { title, label, isDefault, children, size = "sm", error } = props;
|
|
59059
|
-
return /* @__PURE__ */ jsx(Grid$1, { className: classNames("database-settings-card__wrapper", { "database-settings-card__wrapper_medium": size === "md" }), children: /* @__PURE__ */ jsxs(Paper$3, {
|
|
59065
|
+
return /* @__PURE__ */ jsx(Grid$1, { className: classNames("database-settings-card__wrapper", { "database-settings-card__wrapper_medium": size === "md" }), children: /* @__PURE__ */ jsxs(Paper$3, { children: [
|
|
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" }),
|
|
@@ -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,56 +77831,186 @@ 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
|
-
|
|
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
|
+
);
|
|
78005
|
+
}
|
|
78006
|
+
function ProcessOverlay(props) {
|
|
78007
|
+
const { children, inProcess, message, spinnerSize = 60, className } = props;
|
|
78008
|
+
return /* @__PURE__ */ jsxs("div", { className: classNames("process-overlay", className), children: [
|
|
78009
|
+
/* @__PURE__ */ jsx("div", { className: classNames({ "process-overlay__content_blur": inProcess }), children }),
|
|
78010
|
+
inProcess && /* @__PURE__ */ jsxs("div", { className: "process-overlay__process", children: [
|
|
78011
|
+
/* @__PURE__ */ jsx(CircularProgress$3, { size: spinnerSize, thickness: 4, color: "primary" }),
|
|
78012
|
+
message && /* @__PURE__ */ jsx(Typography$3, { color: "primary", fontWeight: "bold", children: message })
|
|
78013
|
+
] })
|
|
76671
78014
|
] });
|
|
76672
78015
|
}
|
|
76673
78016
|
class EditorFactory {
|
|
@@ -82255,6 +83598,12 @@ const commonMuiProps = {
|
|
|
82255
83598
|
},
|
|
82256
83599
|
MenuListProps: {
|
|
82257
83600
|
disablePadding: true
|
|
83601
|
+
},
|
|
83602
|
+
slotProps: {
|
|
83603
|
+
paper: {
|
|
83604
|
+
// Сдвигаем меню на 1px вниз, чтобы фон поповера не накрывал нижнюю границу select, когда координаты поля оказываются «между пикселями»
|
|
83605
|
+
sx: { mt: "1px" }
|
|
83606
|
+
}
|
|
82258
83607
|
}
|
|
82259
83608
|
}
|
|
82260
83609
|
}
|
|
@@ -82433,10 +83782,14 @@ function Header(props) {
|
|
|
82433
83782
|
const { label, hidden } = props;
|
|
82434
83783
|
return /* @__PURE__ */ jsx("div", { className: classNames("header", hideIf(hidden)), children: /* @__PURE__ */ jsx(Typography$3, { variant: "h1", color: "secondary", children: label }) });
|
|
82435
83784
|
}
|
|
83785
|
+
function stringToBoolean$1(value) {
|
|
83786
|
+
return value && value === "true";
|
|
83787
|
+
}
|
|
82436
83788
|
function Number$1(props) {
|
|
82437
83789
|
const { required, id: fieldName, value = "", parameters = {} } = props;
|
|
82438
83790
|
const services = useContext(ServicesContext);
|
|
82439
|
-
const { maxValue, minValue } = parameters;
|
|
83791
|
+
const { maxValue, minValue, allowDecimals } = parameters;
|
|
83792
|
+
const { numberDecimalSeparator } = services.applicationSettings.culture;
|
|
82440
83793
|
const { resetField, control } = useCustomFormContext();
|
|
82441
83794
|
const {
|
|
82442
83795
|
field,
|
|
@@ -82447,34 +83800,23 @@ function Number$1(props) {
|
|
|
82447
83800
|
rules: { required },
|
|
82448
83801
|
defaultValue: value
|
|
82449
83802
|
});
|
|
82450
|
-
function handleBlur(event) {
|
|
82451
|
-
const newValue = event.target.value;
|
|
82452
|
-
if (minValue && +newValue < +minValue) {
|
|
82453
|
-
field.onChange(minValue);
|
|
82454
|
-
return;
|
|
82455
|
-
}
|
|
82456
|
-
if (maxValue && +newValue > +maxValue) {
|
|
82457
|
-
field.onChange(maxValue);
|
|
82458
|
-
return;
|
|
82459
|
-
}
|
|
82460
|
-
field.onBlur();
|
|
82461
|
-
}
|
|
82462
83803
|
const renderContent = () => {
|
|
82463
83804
|
if (minValue && maxValue && +maxValue <= +minValue) {
|
|
82464
83805
|
return /* @__PURE__ */ jsx(ErrorMessage, { message: services.resources.NumberRangeError });
|
|
82465
83806
|
}
|
|
83807
|
+
const { ref: ref2, ...restField } = field;
|
|
83808
|
+
const allowDecimalsBoolean = stringToBoolean$1(allowDecimals);
|
|
82466
83809
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
82467
83810
|
/* @__PURE__ */ jsx(
|
|
82468
|
-
|
|
83811
|
+
NumberComponent,
|
|
82469
83812
|
{
|
|
82470
|
-
|
|
82471
|
-
|
|
82472
|
-
fullWidth: true,
|
|
82473
|
-
...field,
|
|
82474
|
-
slotProps: { htmlInput: { "data-testid": "number-input" } },
|
|
83813
|
+
...restField,
|
|
83814
|
+
inputRef: ref2,
|
|
82475
83815
|
className: "number",
|
|
82476
|
-
|
|
82477
|
-
|
|
83816
|
+
maxValue,
|
|
83817
|
+
minValue,
|
|
83818
|
+
allowDecimals: allowDecimalsBoolean,
|
|
83819
|
+
numberDecimalSeparator
|
|
82478
83820
|
}
|
|
82479
83821
|
),
|
|
82480
83822
|
error && /* @__PURE__ */ jsx(ErrorMessage, { message: services.resources.Dialog_ValidationRequired })
|
|
@@ -82598,21 +83940,6 @@ const databaseGenerationSettingsValueType = {
|
|
|
82598
83940
|
useOuterMetadata: false
|
|
82599
83941
|
};
|
|
82600
83942
|
const ListContext = /* @__PURE__ */ React.createContext({});
|
|
82601
|
-
function isFocusVisible(element) {
|
|
82602
|
-
try {
|
|
82603
|
-
return element.matches(":focus-visible");
|
|
82604
|
-
} catch (error) {
|
|
82605
|
-
}
|
|
82606
|
-
return false;
|
|
82607
|
-
}
|
|
82608
|
-
const UNINITIALIZED = {};
|
|
82609
|
-
function useLazyRef(init, initArg) {
|
|
82610
|
-
const ref2 = React.useRef(UNINITIALIZED);
|
|
82611
|
-
if (ref2.current === UNINITIALIZED) {
|
|
82612
|
-
ref2.current = init(initArg);
|
|
82613
|
-
}
|
|
82614
|
-
return ref2;
|
|
82615
|
-
}
|
|
82616
83943
|
class LazyRipple {
|
|
82617
83944
|
/** React ref to the ripple instance */
|
|
82618
83945
|
/** If the ripple component should be mounted */
|
|
@@ -82680,40 +84007,6 @@ function createControlledPromise() {
|
|
|
82680
84007
|
p2.reject = reject;
|
|
82681
84008
|
return p2;
|
|
82682
84009
|
}
|
|
82683
|
-
const EMPTY$1 = [];
|
|
82684
|
-
function useOnMount(fn2) {
|
|
82685
|
-
React.useEffect(fn2, EMPTY$1);
|
|
82686
|
-
}
|
|
82687
|
-
class Timeout {
|
|
82688
|
-
static create() {
|
|
82689
|
-
return new Timeout();
|
|
82690
|
-
}
|
|
82691
|
-
currentId = null;
|
|
82692
|
-
/**
|
|
82693
|
-
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
82694
|
-
*/
|
|
82695
|
-
start(delay, fn2) {
|
|
82696
|
-
this.clear();
|
|
82697
|
-
this.currentId = setTimeout(() => {
|
|
82698
|
-
this.currentId = null;
|
|
82699
|
-
fn2();
|
|
82700
|
-
}, delay);
|
|
82701
|
-
}
|
|
82702
|
-
clear = () => {
|
|
82703
|
-
if (this.currentId !== null) {
|
|
82704
|
-
clearTimeout(this.currentId);
|
|
82705
|
-
this.currentId = null;
|
|
82706
|
-
}
|
|
82707
|
-
};
|
|
82708
|
-
disposeEffect = () => {
|
|
82709
|
-
return this.clear;
|
|
82710
|
-
};
|
|
82711
|
-
}
|
|
82712
|
-
function useTimeout() {
|
|
82713
|
-
const timeout = useLazyRef(Timeout.create).current;
|
|
82714
|
-
useOnMount(timeout.disposeEffect);
|
|
82715
|
-
return timeout;
|
|
82716
|
-
}
|
|
82717
84010
|
function Ripple(props) {
|
|
82718
84011
|
const {
|
|
82719
84012
|
className,
|
|
@@ -83775,109 +85068,6 @@ function getListItemTextUtilityClass(slot) {
|
|
|
83775
85068
|
return generateUtilityClass("MuiListItemText", slot);
|
|
83776
85069
|
}
|
|
83777
85070
|
const listItemTextClasses = generateUtilityClasses("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
|
|
83778
|
-
function isHostComponent$1(element) {
|
|
83779
|
-
return typeof element === "string";
|
|
83780
|
-
}
|
|
83781
|
-
function appendOwnerState(elementType, otherProps, ownerState) {
|
|
83782
|
-
if (elementType === void 0 || isHostComponent$1(elementType)) {
|
|
83783
|
-
return otherProps;
|
|
83784
|
-
}
|
|
83785
|
-
return {
|
|
83786
|
-
...otherProps,
|
|
83787
|
-
ownerState: {
|
|
83788
|
-
...otherProps.ownerState,
|
|
83789
|
-
...ownerState
|
|
83790
|
-
}
|
|
83791
|
-
};
|
|
83792
|
-
}
|
|
83793
|
-
function resolveComponentProps(componentProps, ownerState, slotState) {
|
|
83794
|
-
if (typeof componentProps === "function") {
|
|
83795
|
-
return componentProps(ownerState, slotState);
|
|
83796
|
-
}
|
|
83797
|
-
return componentProps;
|
|
83798
|
-
}
|
|
83799
|
-
function extractEventHandlers(object, excludeKeys = []) {
|
|
83800
|
-
if (object === void 0) {
|
|
83801
|
-
return {};
|
|
83802
|
-
}
|
|
83803
|
-
const result = {};
|
|
83804
|
-
Object.keys(object).filter((prop) => prop.match(/^on[A-Z]/) && typeof object[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
|
|
83805
|
-
result[prop] = object[prop];
|
|
83806
|
-
});
|
|
83807
|
-
return result;
|
|
83808
|
-
}
|
|
83809
|
-
function omitEventHandlers(object) {
|
|
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")).forEach((prop) => {
|
|
83815
|
-
result[prop] = object[prop];
|
|
83816
|
-
});
|
|
83817
|
-
return result;
|
|
83818
|
-
}
|
|
83819
|
-
function mergeSlotProps(parameters) {
|
|
83820
|
-
const {
|
|
83821
|
-
getSlotProps,
|
|
83822
|
-
additionalProps,
|
|
83823
|
-
externalSlotProps,
|
|
83824
|
-
externalForwardedProps,
|
|
83825
|
-
className
|
|
83826
|
-
} = parameters;
|
|
83827
|
-
if (!getSlotProps) {
|
|
83828
|
-
const joinedClasses2 = clsx$1(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
83829
|
-
const mergedStyle2 = {
|
|
83830
|
-
...additionalProps?.style,
|
|
83831
|
-
...externalForwardedProps?.style,
|
|
83832
|
-
...externalSlotProps?.style
|
|
83833
|
-
};
|
|
83834
|
-
const props2 = {
|
|
83835
|
-
...additionalProps,
|
|
83836
|
-
...externalForwardedProps,
|
|
83837
|
-
...externalSlotProps
|
|
83838
|
-
};
|
|
83839
|
-
if (joinedClasses2.length > 0) {
|
|
83840
|
-
props2.className = joinedClasses2;
|
|
83841
|
-
}
|
|
83842
|
-
if (Object.keys(mergedStyle2).length > 0) {
|
|
83843
|
-
props2.style = mergedStyle2;
|
|
83844
|
-
}
|
|
83845
|
-
return {
|
|
83846
|
-
props: props2,
|
|
83847
|
-
internalRef: void 0
|
|
83848
|
-
};
|
|
83849
|
-
}
|
|
83850
|
-
const eventHandlers = extractEventHandlers({
|
|
83851
|
-
...externalForwardedProps,
|
|
83852
|
-
...externalSlotProps
|
|
83853
|
-
});
|
|
83854
|
-
const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
|
|
83855
|
-
const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
|
|
83856
|
-
const internalSlotProps = getSlotProps(eventHandlers);
|
|
83857
|
-
const joinedClasses = clsx$1(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
|
|
83858
|
-
const mergedStyle = {
|
|
83859
|
-
...internalSlotProps?.style,
|
|
83860
|
-
...additionalProps?.style,
|
|
83861
|
-
...externalForwardedProps?.style,
|
|
83862
|
-
...externalSlotProps?.style
|
|
83863
|
-
};
|
|
83864
|
-
const props = {
|
|
83865
|
-
...internalSlotProps,
|
|
83866
|
-
...additionalProps,
|
|
83867
|
-
...otherPropsWithoutEventHandlers,
|
|
83868
|
-
...componentsPropsWithoutEventHandlers
|
|
83869
|
-
};
|
|
83870
|
-
if (joinedClasses.length > 0) {
|
|
83871
|
-
props.className = joinedClasses;
|
|
83872
|
-
}
|
|
83873
|
-
if (Object.keys(mergedStyle).length > 0) {
|
|
83874
|
-
props.style = mergedStyle;
|
|
83875
|
-
}
|
|
83876
|
-
return {
|
|
83877
|
-
props,
|
|
83878
|
-
internalRef: internalSlotProps.ref
|
|
83879
|
-
};
|
|
83880
|
-
}
|
|
83881
85071
|
function useSlot(name, parameters) {
|
|
83882
85072
|
const {
|
|
83883
85073
|
className,
|
|
@@ -86910,6 +88100,11 @@ var ILongOperationCompleteStatus = /* @__PURE__ */ ((ILongOperationCompleteStatu
|
|
|
86910
88100
|
ILongOperationCompleteStatus2[ILongOperationCompleteStatus2["Error"] = 1] = "Error";
|
|
86911
88101
|
return ILongOperationCompleteStatus2;
|
|
86912
88102
|
})(ILongOperationCompleteStatus || {});
|
|
88103
|
+
var ILongOperationScope = /* @__PURE__ */ ((ILongOperationScope2) => {
|
|
88104
|
+
ILongOperationScope2[ILongOperationScope2["Global"] = 0] = "Global";
|
|
88105
|
+
ILongOperationScope2[ILongOperationScope2["Local"] = 1] = "Local";
|
|
88106
|
+
return ILongOperationScope2;
|
|
88107
|
+
})(ILongOperationScope || {});
|
|
86913
88108
|
class SettingsPageLogic extends ComponentLogic {
|
|
86914
88109
|
constructor() {
|
|
86915
88110
|
super(...arguments);
|
|
@@ -86927,6 +88122,8 @@ class SettingsPageLogic extends ComponentLogic {
|
|
|
86927
88122
|
realtimeCommunication.on("ReceiveLongOperationCompleteNotification", (notification) => {
|
|
86928
88123
|
const { data, route } = routingService.getLastRouteResolvedParams() || {};
|
|
86929
88124
|
const isCurrentService = data?.serviceId === notification.serviceId;
|
|
88125
|
+
const isLocalScope = notification.scope === ILongOperationScope.Local;
|
|
88126
|
+
if (isLocalScope && !isCurrentService) return;
|
|
86930
88127
|
const buttonsProps = isCurrentService ? [{ text: resources.RefreshPage, onClick: () => location.reload(), dataTestId: "reload-button" }] : [];
|
|
86931
88128
|
const notyType = notification.status === ILongOperationCompleteStatus.Success ? "info" : "error";
|
|
86932
88129
|
const note = showNote({ type: notyType, timeout: 0, text: notification.message, buttonsProps });
|
|
@@ -87097,6 +88294,9 @@ function SettingsPageRouteComponent(props) {
|
|
|
87097
88294
|
const settingsPageRouteHandler = async (application, paramsData) => {
|
|
87098
88295
|
const { layoutId, serviceId, itemId } = paramsData.data;
|
|
87099
88296
|
const { extendedLayoutId } = paramsData.params || {};
|
|
88297
|
+
if (serviceId) {
|
|
88298
|
+
await application.settingsNavigation.ensureServiceName(serviceId);
|
|
88299
|
+
}
|
|
87100
88300
|
return /* @__PURE__ */ jsx(
|
|
87101
88301
|
SettingsPageRouteComponent,
|
|
87102
88302
|
{
|
|
@@ -87134,11 +88334,11 @@ const itemSettingsPageRoute = {
|
|
|
87134
88334
|
hooks: settingsPageRouteHooks
|
|
87135
88335
|
};
|
|
87136
88336
|
var TabsContainer = function(props) {
|
|
87137
|
-
var className = props.className, divProps = __rest$
|
|
88337
|
+
var className = props.className, divProps = __rest$3(props, ["className"]);
|
|
87138
88338
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs", className) }, divProps));
|
|
87139
88339
|
};
|
|
87140
88340
|
var TabContent = function(props) {
|
|
87141
|
-
var className = props.className, divProps = __rest$
|
|
88341
|
+
var className = props.className, divProps = __rest$3(props, ["className"]);
|
|
87142
88342
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs__content", className) }, divProps));
|
|
87143
88343
|
};
|
|
87144
88344
|
var TabsRibbonAligning;
|
|
@@ -87148,13 +88348,13 @@ var TabsRibbonAligning;
|
|
|
87148
88348
|
TabsRibbonAligning2["Right"] = "right";
|
|
87149
88349
|
})(TabsRibbonAligning || (TabsRibbonAligning = {}));
|
|
87150
88350
|
var TabsRibbon = function(props) {
|
|
87151
|
-
var className = props.className, _a = props.aligning, aligning = _a === void 0 ? TabsRibbonAligning.Center : _a, divProps = __rest$
|
|
88351
|
+
var className = props.className, _a = props.aligning, aligning = _a === void 0 ? TabsRibbonAligning.Center : _a, divProps = __rest$3(props, ["className", "aligning"]);
|
|
87152
88352
|
return React__default.createElement("div", __assign$2({ className: classNames("dv-tabs__ribbon", className, "dv-tabs__ribbon_aligning-" + aligning) }, divProps));
|
|
87153
88353
|
};
|
|
87154
88354
|
var TabToggler = function(props) {
|
|
87155
88355
|
var className = props.className, name = props.name, index = props.index, disabled = props.disabled;
|
|
87156
88356
|
props.active;
|
|
87157
|
-
var onClick = props.onClick, onChangeActiveTab = props.onChangeActiveTab, divProps = __rest$
|
|
88357
|
+
var onClick = props.onClick, onChangeActiveTab = props.onChangeActiveTab, divProps = __rest$3(props, ["className", "name", "index", "disabled", "active", "onClick", "onChangeActiveTab"]);
|
|
87158
88358
|
var clickHandler = disabled ? doNothing : function(e2) {
|
|
87159
88359
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
87160
88360
|
return __generator(this, function(_a) {
|
|
@@ -87642,6 +88842,9 @@ class ServersController {
|
|
|
87642
88842
|
getServerInfo(serverId) {
|
|
87643
88843
|
return this.requestService.get(`api/servers/${serverId}`, null, { disableDialogsOnErrors: true });
|
|
87644
88844
|
}
|
|
88845
|
+
getServiceInfo(serviceId) {
|
|
88846
|
+
return this.requestService.get(`api/servers/service/${serviceId}`, null, { disableDialogsOnErrors: true });
|
|
88847
|
+
}
|
|
87645
88848
|
deleteService(serviceId) {
|
|
87646
88849
|
return this.requestService.delete(`api/servers/${serviceId}`);
|
|
87647
88850
|
}
|
|
@@ -87650,6 +88853,7 @@ const $SettingsNavigation = serviceName((s2) => s2.settingsNavigation);
|
|
|
87650
88853
|
class SettingsNavigationService {
|
|
87651
88854
|
constructor(application) {
|
|
87652
88855
|
this.application = application;
|
|
88856
|
+
this.serviceNamesCache = /* @__PURE__ */ new Map();
|
|
87653
88857
|
this.goToConfigurationPage = () => {
|
|
87654
88858
|
const { params, data } = this.application.routingService.getLastRouteResolvedParams() || {};
|
|
87655
88859
|
const { serverId, serviceId, layoutId } = data;
|
|
@@ -87657,6 +88861,29 @@ class SettingsNavigationService {
|
|
|
87657
88861
|
this.application.routingService.navigateToRoute(configurationPageUrl);
|
|
87658
88862
|
};
|
|
87659
88863
|
}
|
|
88864
|
+
async ensureServiceName(serviceId) {
|
|
88865
|
+
if (!serviceId) return;
|
|
88866
|
+
if (this.getCachedServiceName(serviceId)) {
|
|
88867
|
+
return;
|
|
88868
|
+
}
|
|
88869
|
+
try {
|
|
88870
|
+
const service = await this.application.serverController.getServiceInfo(serviceId);
|
|
88871
|
+
if (!service) return;
|
|
88872
|
+
this.rememberServiceName(service.serviceId, service.serviceName);
|
|
88873
|
+
} catch {
|
|
88874
|
+
}
|
|
88875
|
+
}
|
|
88876
|
+
rememberServiceName(serviceId, serviceName2) {
|
|
88877
|
+
if (!serviceId || !serviceName2) return;
|
|
88878
|
+
this.serviceNamesCache.set(serviceId, serviceName2);
|
|
88879
|
+
}
|
|
88880
|
+
getCachedServiceName(serviceId) {
|
|
88881
|
+
return this.serviceNamesCache.get(serviceId);
|
|
88882
|
+
}
|
|
88883
|
+
resolveServiceName(serverId, serviceId, fallback) {
|
|
88884
|
+
if (!serviceId) return fallback;
|
|
88885
|
+
return this.getCachedServiceName(serviceId) ?? fallback;
|
|
88886
|
+
}
|
|
87660
88887
|
convertPathToUrl(str, ...args) {
|
|
87661
88888
|
const matches2 = str.match(/(:\w+)/g);
|
|
87662
88889
|
if (!matches2) return str;
|
|
@@ -87698,9 +88925,10 @@ class SettingsNavigationService {
|
|
|
87698
88925
|
});
|
|
87699
88926
|
}
|
|
87700
88927
|
if (params.serviceName) {
|
|
88928
|
+
const resolvedServiceName = this.resolveServiceName(serverId, serviceId, serviceName2);
|
|
87701
88929
|
breadcrumbsItems.push({
|
|
87702
|
-
label:
|
|
87703
|
-
path: this.getSettingsPageUrl(serverId, serviceId, layoutId,
|
|
88930
|
+
label: resolvedServiceName,
|
|
88931
|
+
path: this.getSettingsPageUrl(serverId, serviceId, layoutId, resolvedServiceName)
|
|
87704
88932
|
});
|
|
87705
88933
|
}
|
|
87706
88934
|
if (params.itemName) {
|
|
@@ -87710,9 +88938,10 @@ class SettingsNavigationService {
|
|
|
87710
88938
|
});
|
|
87711
88939
|
}
|
|
87712
88940
|
if (route.path === CONFIGURATION_ROUTE_PATH) {
|
|
88941
|
+
const resolvedServiceName = this.resolveServiceName(serverId, serviceId, serviceName2);
|
|
87713
88942
|
breadcrumbsItems.push({
|
|
87714
88943
|
label: this.application.resources.AdvancedSettings,
|
|
87715
|
-
path: this.getConfigurationPageUrl(serverId, serviceId, layoutId,
|
|
88944
|
+
path: this.getConfigurationPageUrl(serverId, serviceId, layoutId, resolvedServiceName)
|
|
87716
88945
|
});
|
|
87717
88946
|
}
|
|
87718
88947
|
return breadcrumbsItems;
|
|
@@ -88682,46 +89911,6 @@ const gridHasBottomFillerSelector = (state) => {
|
|
|
88682
89911
|
}
|
|
88683
89912
|
return true;
|
|
88684
89913
|
};
|
|
88685
|
-
function getScrollbarSize(win = window) {
|
|
88686
|
-
const documentWidth = win.document.documentElement.clientWidth;
|
|
88687
|
-
return win.innerWidth - documentWidth;
|
|
88688
|
-
}
|
|
88689
|
-
const usePreviousProps = (value) => {
|
|
88690
|
-
const ref2 = React.useRef({});
|
|
88691
|
-
React.useEffect(() => {
|
|
88692
|
-
ref2.current = value;
|
|
88693
|
-
});
|
|
88694
|
-
return ref2.current;
|
|
88695
|
-
};
|
|
88696
|
-
function useSlotProps(parameters) {
|
|
88697
|
-
const {
|
|
88698
|
-
elementType,
|
|
88699
|
-
externalSlotProps,
|
|
88700
|
-
ownerState,
|
|
88701
|
-
skipResolvingSlotProps = false,
|
|
88702
|
-
...other
|
|
88703
|
-
} = parameters;
|
|
88704
|
-
const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
|
|
88705
|
-
const {
|
|
88706
|
-
props: mergedProps,
|
|
88707
|
-
internalRef
|
|
88708
|
-
} = mergeSlotProps({
|
|
88709
|
-
...other,
|
|
88710
|
-
externalSlotProps: resolvedComponentsProps
|
|
88711
|
-
});
|
|
88712
|
-
const ref2 = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);
|
|
88713
|
-
const props = appendOwnerState(elementType, {
|
|
88714
|
-
...mergedProps,
|
|
88715
|
-
ref: ref2
|
|
88716
|
-
}, ownerState);
|
|
88717
|
-
return props;
|
|
88718
|
-
}
|
|
88719
|
-
function getReactElementRef(element) {
|
|
88720
|
-
if (parseInt(React.version, 10) >= 19) {
|
|
88721
|
-
return element?.props?.ref || null;
|
|
88722
|
-
}
|
|
88723
|
-
return element?.ref || null;
|
|
88724
|
-
}
|
|
88725
89914
|
function fastMemo(component) {
|
|
88726
89915
|
return /* @__PURE__ */ React.memo(component, fastObjectShallowCompare);
|
|
88727
89916
|
}
|
|
@@ -121166,7 +122355,11 @@ function ConfigurationRouteComponent(props) {
|
|
|
121166
122355
|
return /* @__PURE__ */ jsx(ServicesContext.Provider, { value: routeServices, children: /* @__PURE__ */ jsx(ExtendedConfiguration, { services: props.services, serviceId: props.serviceId }) });
|
|
121167
122356
|
}
|
|
121168
122357
|
const configurationRouteHandler = async (application, paramsData) => {
|
|
121169
|
-
|
|
122358
|
+
const { serviceId } = paramsData.data;
|
|
122359
|
+
if (serviceId) {
|
|
122360
|
+
await application.settingsNavigation.ensureServiceName(serviceId);
|
|
122361
|
+
}
|
|
122362
|
+
return /* @__PURE__ */ jsx(ConfigurationRouteComponent, { services: application, serviceId });
|
|
121170
122363
|
};
|
|
121171
122364
|
const configurationRoute = {
|
|
121172
122365
|
path: CONFIGURATION_ROUTE_PATH,
|
|
@@ -124655,6 +125848,7 @@ export {
|
|
|
124655
125848
|
PageTabPanel,
|
|
124656
125849
|
PageTable,
|
|
124657
125850
|
PageTitle,
|
|
125851
|
+
ProcessOverlay,
|
|
124658
125852
|
ResourcesManagement,
|
|
124659
125853
|
RootElementService,
|
|
124660
125854
|
RouteContentRenderService,
|