@connectif/ui-components 5.4.2 → 5.5.1
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/CHANGELOG.md +17 -0
- package/dist/components/input/UploadClickableArea.d.ts +5 -1
- package/dist/index.js +299 -245
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -8170,8 +8170,7 @@ var BaseListItem = ({
|
|
|
8170
8170
|
{
|
|
8171
8171
|
sx: {
|
|
8172
8172
|
flexGrow: 1,
|
|
8173
|
-
width: "100%"
|
|
8174
|
-
overflow: "auto"
|
|
8173
|
+
width: "100%"
|
|
8175
8174
|
},
|
|
8176
8175
|
children: children ? children : /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
8177
8176
|
/* @__PURE__ */ jsx7(
|
|
@@ -19093,13 +19092,13 @@ var TextFieldContainer = React49.forwardRef(function TextFieldContainer2({
|
|
|
19093
19092
|
display: "flex",
|
|
19094
19093
|
alignItems: multiline ? "start" : "center",
|
|
19095
19094
|
gap: "8px",
|
|
19096
|
-
backgroundColor: variant === "default" ? palette2.common.white : "transparent",
|
|
19095
|
+
backgroundColor: variant === "default" ? disabled ? palette2.grey[50] : palette2.common.white : "transparent",
|
|
19097
19096
|
width: "100%",
|
|
19098
19097
|
minHeight: "36px",
|
|
19099
19098
|
overflow: "hidden",
|
|
19100
19099
|
border: variant === "default" ? `1px solid ${palette2.grey[200]}` : "none",
|
|
19101
19100
|
borderRadius: variant === "default" ? "4px" : 0,
|
|
19102
|
-
color: isFocused ? effectiveActiveColor : palette2.grey[400],
|
|
19101
|
+
color: disabled ? palette2.grey[500] : isFocused ? effectiveActiveColor : palette2.grey[400],
|
|
19103
19102
|
padding: variant === "default" ? "1px 1px 1px 7px" : "2px 2px 2px 8px",
|
|
19104
19103
|
boxSizing: "border-box",
|
|
19105
19104
|
justifyContent: "end",
|
|
@@ -19111,9 +19110,6 @@ var TextFieldContainer = React49.forwardRef(function TextFieldContainer2({
|
|
|
19111
19110
|
borderColor: palette2.error.main,
|
|
19112
19111
|
color: palette2.error.main
|
|
19113
19112
|
},
|
|
19114
|
-
...disabled && {
|
|
19115
|
-
opacity: 0.5
|
|
19116
|
-
},
|
|
19117
19113
|
...highlighted && {
|
|
19118
19114
|
backgroundColor: lighten(effectiveActiveColor, 0.6)
|
|
19119
19115
|
},
|
|
@@ -19243,22 +19239,22 @@ import { Fragment as Fragment22, jsx as jsx101, jsxs as jsxs45 } from "react/jsx
|
|
|
19243
19239
|
var commonInputStylesOptions = {
|
|
19244
19240
|
shouldForwardProp: (prop) => prop !== "variant" && prop !== "typographyVariant"
|
|
19245
19241
|
};
|
|
19246
|
-
function getCommonInputStyles({ palette: palette2 }, { disabled, typographyVariant }) {
|
|
19242
|
+
function getCommonInputStyles({ palette: palette2 }, { disabled, typographyVariant, readOnly }) {
|
|
19247
19243
|
return {
|
|
19248
19244
|
...variants[typographyVariant ?? "body2"],
|
|
19249
|
-
backgroundColor: "transparent",
|
|
19245
|
+
backgroundColor: disabled || readOnly ? palette2.grey[50] : "transparent",
|
|
19250
19246
|
display: "block",
|
|
19251
19247
|
width: "0",
|
|
19252
19248
|
minWidth: "64px",
|
|
19253
19249
|
flexGrow: 1,
|
|
19254
19250
|
border: "none",
|
|
19255
|
-
color: disabled ? palette2.grey[
|
|
19251
|
+
color: disabled ? palette2.grey[500] : palette2.grey[900],
|
|
19256
19252
|
boxSizing: "border-box",
|
|
19257
19253
|
outline: "none",
|
|
19258
19254
|
padding: "6px 0",
|
|
19259
19255
|
textOverflow: "ellipsis",
|
|
19260
19256
|
"&::placeholder": {
|
|
19261
|
-
color: palette2.grey[
|
|
19257
|
+
color: palette2.grey[500]
|
|
19262
19258
|
}
|
|
19263
19259
|
};
|
|
19264
19260
|
}
|
|
@@ -19362,7 +19358,7 @@ var TextField = React52.forwardRef(function TextField2({
|
|
|
19362
19358
|
isError,
|
|
19363
19359
|
multiline,
|
|
19364
19360
|
sx: {
|
|
19365
|
-
backgroundColor: readOnly ? palette2.grey[50] : "transparent",
|
|
19361
|
+
backgroundColor: disabled || readOnly ? palette2.grey[50] : "transparent",
|
|
19366
19362
|
...sx
|
|
19367
19363
|
},
|
|
19368
19364
|
onClick: onContainerClick,
|
|
@@ -20214,7 +20210,7 @@ var ExtendedTextField = ({
|
|
|
20214
20210
|
InputProps,
|
|
20215
20211
|
error,
|
|
20216
20212
|
...rest
|
|
20217
|
-
}) => /* @__PURE__ */ jsx110(TextField_default, { ...
|
|
20213
|
+
}) => /* @__PURE__ */ jsx110(TextField_default, { ...rest, ...inputProps, readOnly: InputProps.readOnly });
|
|
20218
20214
|
var TimeField = function TimeField2({
|
|
20219
20215
|
onChange,
|
|
20220
20216
|
value,
|
|
@@ -21265,6 +21261,16 @@ var BootstrapInput = styled7(InputBase, {
|
|
|
21265
21261
|
backgroundColor: "white",
|
|
21266
21262
|
cursor: "default",
|
|
21267
21263
|
maxWidth: "100%",
|
|
21264
|
+
"&.Mui-disabled": {
|
|
21265
|
+
backgroundColor: palette2.grey[50],
|
|
21266
|
+
".MuiSelect-select": {
|
|
21267
|
+
color: palette2.grey[500],
|
|
21268
|
+
WebkitTextFillColor: palette2.grey[500],
|
|
21269
|
+
span: {
|
|
21270
|
+
color: "inherit !important"
|
|
21271
|
+
}
|
|
21272
|
+
}
|
|
21273
|
+
},
|
|
21268
21274
|
"& .MuiInputBase-input.MuiSelect-select": {
|
|
21269
21275
|
...variants["button-medium"],
|
|
21270
21276
|
padding: "0 36px 0 12px !important",
|
|
@@ -21296,7 +21302,7 @@ var ChevronIcon = ({ disabled = false }) => {
|
|
|
21296
21302
|
sx: {
|
|
21297
21303
|
marginLeft: "-24px !important",
|
|
21298
21304
|
transform: "translateX(-8px) !important",
|
|
21299
|
-
color: disabled ? `${palette2.grey[
|
|
21305
|
+
color: disabled ? `${palette2.grey[500]} !important` : palette2.grey[800]
|
|
21300
21306
|
}
|
|
21301
21307
|
}
|
|
21302
21308
|
);
|
|
@@ -22010,42 +22016,90 @@ var normalizeBlack = (color2) => {
|
|
|
22010
22016
|
};
|
|
22011
22017
|
|
|
22012
22018
|
// src/components/input/UploadClickableArea.tsx
|
|
22019
|
+
import * as React64 from "react";
|
|
22013
22020
|
import { Box as Box3 } from "@mui/material";
|
|
22014
22021
|
import { jsx as jsx119, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
22015
22022
|
var UploadClickableArea = ({
|
|
22016
22023
|
accept,
|
|
22017
22024
|
onFilesChanged,
|
|
22018
|
-
children
|
|
22019
|
-
|
|
22020
|
-
|
|
22021
|
-
|
|
22022
|
-
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
|
|
22025
|
+
children,
|
|
22026
|
+
draggingOverElement
|
|
22027
|
+
}) => {
|
|
22028
|
+
const [isDraggingOver, setIsDraggingOver] = React64.useState(false);
|
|
22029
|
+
const handleDrop = React64.useCallback(
|
|
22030
|
+
(e) => {
|
|
22031
|
+
e.preventDefault();
|
|
22032
|
+
e.stopPropagation();
|
|
22033
|
+
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
|
22034
|
+
onFilesChanged(e.dataTransfer.files);
|
|
22035
|
+
e.dataTransfer.clearData();
|
|
22036
|
+
}
|
|
22037
|
+
setIsDraggingOver(false);
|
|
22026
22038
|
},
|
|
22027
|
-
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
|
|
22040
|
-
|
|
22039
|
+
[onFilesChanged]
|
|
22040
|
+
);
|
|
22041
|
+
const handleDragOver = (e) => {
|
|
22042
|
+
e.preventDefault();
|
|
22043
|
+
e.stopPropagation();
|
|
22044
|
+
setIsDraggingOver(true);
|
|
22045
|
+
};
|
|
22046
|
+
const handleDragLeave = (e) => {
|
|
22047
|
+
e.preventDefault();
|
|
22048
|
+
e.stopPropagation();
|
|
22049
|
+
setIsDraggingOver(false);
|
|
22050
|
+
};
|
|
22051
|
+
return /* @__PURE__ */ jsxs55(
|
|
22052
|
+
Box3,
|
|
22053
|
+
{
|
|
22054
|
+
component: "label",
|
|
22055
|
+
onDrop: handleDrop,
|
|
22056
|
+
onDragOver: handleDragOver,
|
|
22057
|
+
onDragLeave: handleDragLeave,
|
|
22058
|
+
style: {
|
|
22059
|
+
cursor: "pointer",
|
|
22060
|
+
display: "inline-block"
|
|
22061
|
+
},
|
|
22062
|
+
children: [
|
|
22063
|
+
/* @__PURE__ */ jsx119(
|
|
22064
|
+
"input",
|
|
22065
|
+
{
|
|
22066
|
+
type: "file",
|
|
22067
|
+
accept,
|
|
22068
|
+
hidden: true,
|
|
22069
|
+
onChange: (e) => e?.target?.files && onFilesChanged(e?.target?.files)
|
|
22070
|
+
}
|
|
22071
|
+
),
|
|
22072
|
+
/* @__PURE__ */ jsxs55(Box3, { position: "relative", sx: { pointerEvents: "none" }, children: [
|
|
22073
|
+
children,
|
|
22074
|
+
isDraggingOver && draggingOverElement && /* @__PURE__ */ jsx119(
|
|
22075
|
+
Box3,
|
|
22076
|
+
{
|
|
22077
|
+
position: "absolute",
|
|
22078
|
+
top: "0",
|
|
22079
|
+
left: "0",
|
|
22080
|
+
width: "100%",
|
|
22081
|
+
height: "100%",
|
|
22082
|
+
zIndex: "1",
|
|
22083
|
+
"data-testid": "upload-clickable-area-dragging-over-component-container",
|
|
22084
|
+
sx: {
|
|
22085
|
+
pointerEvents: "none"
|
|
22086
|
+
},
|
|
22087
|
+
children: draggingOverElement
|
|
22088
|
+
}
|
|
22089
|
+
)
|
|
22090
|
+
] })
|
|
22091
|
+
]
|
|
22092
|
+
}
|
|
22093
|
+
);
|
|
22094
|
+
};
|
|
22041
22095
|
var UploadClickableArea_default = UploadClickableArea;
|
|
22042
22096
|
|
|
22043
22097
|
// src/components/input/categorized-picker/CategorizedPicker.tsx
|
|
22044
|
-
import
|
|
22098
|
+
import React67 from "react";
|
|
22045
22099
|
import { Grid as Grid3, Popover as Popover2, Select as Select3, Stack as Stack11 } from "@mui/material";
|
|
22046
22100
|
|
|
22047
22101
|
// src/components/input/categorized-picker/CategorizedPickerOptionItem.tsx
|
|
22048
|
-
import * as
|
|
22102
|
+
import * as React65 from "react";
|
|
22049
22103
|
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
22050
22104
|
var CategorizedPickerOptionItem = function CategorizedPickerOptionItem2({
|
|
22051
22105
|
option,
|
|
@@ -22056,8 +22110,8 @@ var CategorizedPickerOptionItem = function CategorizedPickerOptionItem2({
|
|
|
22056
22110
|
onSelect,
|
|
22057
22111
|
onScrollToItem
|
|
22058
22112
|
}) {
|
|
22059
|
-
const itemRef =
|
|
22060
|
-
|
|
22113
|
+
const itemRef = React65.useRef(null);
|
|
22114
|
+
React65.useEffect(() => {
|
|
22061
22115
|
if (selectedId === option.id && itemRef.current) {
|
|
22062
22116
|
onScrollToItem(itemRef.current);
|
|
22063
22117
|
}
|
|
@@ -22130,7 +22184,7 @@ var CategorizedPickerSubcategoryItem = function CategorizedPickerSubcategoryItem
|
|
|
22130
22184
|
var CategorizedPickerSubcategoryItem_default = CategorizedPickerSubcategoryItem;
|
|
22131
22185
|
|
|
22132
22186
|
// src/components/input/categorized-picker/CategorizedPickerGroupItem.tsx
|
|
22133
|
-
import * as
|
|
22187
|
+
import * as React66 from "react";
|
|
22134
22188
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
22135
22189
|
var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
22136
22190
|
option,
|
|
@@ -22141,7 +22195,7 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22141
22195
|
onSelect,
|
|
22142
22196
|
onScrollToItem
|
|
22143
22197
|
}) {
|
|
22144
|
-
const [isCollapsed, setCollapsed] =
|
|
22198
|
+
const [isCollapsed, setCollapsed] = React66.useState(
|
|
22145
22199
|
!searchText && !option.options.some(
|
|
22146
22200
|
(opt) => opt.categorizedPickerItemType === "option" && opt.id === selectedId
|
|
22147
22201
|
)
|
|
@@ -22414,13 +22468,13 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22414
22468
|
onChange
|
|
22415
22469
|
}) {
|
|
22416
22470
|
const { t } = useTranslation();
|
|
22417
|
-
const categoryRefs =
|
|
22471
|
+
const categoryRefs = React67.useRef(
|
|
22418
22472
|
{}
|
|
22419
22473
|
);
|
|
22420
|
-
const anchorRef =
|
|
22421
|
-
const [open, setOpen] =
|
|
22422
|
-
const [search, setSearch] =
|
|
22423
|
-
const unfilteredCategories =
|
|
22474
|
+
const anchorRef = React67.useRef(null);
|
|
22475
|
+
const [open, setOpen] = React67.useState(false);
|
|
22476
|
+
const [search, setSearch] = React67.useState("");
|
|
22477
|
+
const unfilteredCategories = React67.useMemo(
|
|
22424
22478
|
() => categories.map((category) => ({
|
|
22425
22479
|
...category,
|
|
22426
22480
|
categoryOptions: options.filter(category.filter)
|
|
@@ -22429,30 +22483,30 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22429
22483
|
),
|
|
22430
22484
|
[categories, options]
|
|
22431
22485
|
);
|
|
22432
|
-
const [filteredCategories, setFilteredCategories] =
|
|
22433
|
-
const getDefaultSelectedCategory =
|
|
22486
|
+
const [filteredCategories, setFilteredCategories] = React67.useState(unfilteredCategories);
|
|
22487
|
+
const getDefaultSelectedCategory = React67.useCallback(
|
|
22434
22488
|
() => filteredCategories.find(
|
|
22435
22489
|
(category) => category.categoryOptions.some((option) => option.id === value?.id)
|
|
22436
22490
|
),
|
|
22437
22491
|
[filteredCategories, value]
|
|
22438
22492
|
);
|
|
22439
|
-
const [selectedCategory, setSelectedCategory] =
|
|
22440
|
-
const onTypeSearch =
|
|
22493
|
+
const [selectedCategory, setSelectedCategory] = React67.useState(getDefaultSelectedCategory());
|
|
22494
|
+
const onTypeSearch = React67.useCallback(
|
|
22441
22495
|
(event) => {
|
|
22442
22496
|
setSearch(event.target.value);
|
|
22443
22497
|
},
|
|
22444
22498
|
[]
|
|
22445
22499
|
);
|
|
22446
|
-
const openPopover =
|
|
22500
|
+
const openPopover = React67.useCallback(() => {
|
|
22447
22501
|
setOpen(true);
|
|
22448
22502
|
setSearch("");
|
|
22449
22503
|
setSelectedCategory(getDefaultSelectedCategory());
|
|
22450
22504
|
onOpen?.();
|
|
22451
22505
|
}, [getDefaultSelectedCategory, onOpen]);
|
|
22452
|
-
const closePopover =
|
|
22506
|
+
const closePopover = React67.useCallback(() => {
|
|
22453
22507
|
setOpen(false);
|
|
22454
22508
|
}, []);
|
|
22455
|
-
|
|
22509
|
+
React67.useEffect(() => {
|
|
22456
22510
|
const tokens = search.split(",").map((s) => s.trim()).filter((s) => !!s);
|
|
22457
22511
|
if (tokens.length === 0) {
|
|
22458
22512
|
setFilteredCategories(unfilteredCategories);
|
|
@@ -22482,7 +22536,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22482
22536
|
}).filter((category) => !!category);
|
|
22483
22537
|
setFilteredCategories(nextCategories);
|
|
22484
22538
|
}, [categories, options, search, unfilteredCategories]);
|
|
22485
|
-
|
|
22539
|
+
React67.useEffect(() => {
|
|
22486
22540
|
const filteredSelectedCategory = selectedCategory && filteredCategories.find(
|
|
22487
22541
|
(category) => category.name === selectedCategory.name
|
|
22488
22542
|
);
|
|
@@ -22689,12 +22743,12 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22689
22743
|
var CategorizedPicker_default = CategorizedPicker;
|
|
22690
22744
|
|
|
22691
22745
|
// src/components/input/ItemSelector.tsx
|
|
22692
|
-
import * as
|
|
22746
|
+
import * as React69 from "react";
|
|
22693
22747
|
|
|
22694
22748
|
// src/components/input/SelectPopover.tsx
|
|
22695
|
-
import * as
|
|
22749
|
+
import * as React68 from "react";
|
|
22696
22750
|
import { Grid as Grid4, Stack as Stack12 } from "@mui/material";
|
|
22697
|
-
import { useState as
|
|
22751
|
+
import { useState as useState26 } from "react";
|
|
22698
22752
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
22699
22753
|
import { jsx as jsx127, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
22700
22754
|
var defaultItemsColorStyles = {
|
|
@@ -22728,11 +22782,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22728
22782
|
paddingContent
|
|
22729
22783
|
}) {
|
|
22730
22784
|
const { t } = useTranslation();
|
|
22731
|
-
const [searchText, setSearchText] =
|
|
22732
|
-
const [isScrollBottom, setIsScrollBottom] =
|
|
22733
|
-
const [currentItems, setCurrentItems] =
|
|
22734
|
-
const [currentSelectedItems, setCurrentSelectedItems] =
|
|
22735
|
-
const prevSelectedItemsIdsRef =
|
|
22785
|
+
const [searchText, setSearchText] = useState26("");
|
|
22786
|
+
const [isScrollBottom, setIsScrollBottom] = useState26(false);
|
|
22787
|
+
const [currentItems, setCurrentItems] = useState26([]);
|
|
22788
|
+
const [currentSelectedItems, setCurrentSelectedItems] = React68.useState([]);
|
|
22789
|
+
const prevSelectedItemsIdsRef = React68.useRef([]);
|
|
22736
22790
|
const onSearchTextChanged = (text) => {
|
|
22737
22791
|
onSearch(text);
|
|
22738
22792
|
setSearchText(text);
|
|
@@ -22744,7 +22798,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22744
22798
|
}
|
|
22745
22799
|
setCurrentSelectedItems(selectedItemsIds);
|
|
22746
22800
|
};
|
|
22747
|
-
|
|
22801
|
+
React68.useEffect(() => {
|
|
22748
22802
|
const prevSelectedItemsIds = prevSelectedItemsIdsRef.current;
|
|
22749
22803
|
if (keepCurrentSelectionOnSearch && anchorEl) {
|
|
22750
22804
|
let nextSelectedItems = currentSelectedItems;
|
|
@@ -23050,16 +23104,16 @@ var ItemSelector = function ItemSelector2({
|
|
|
23050
23104
|
onSearch,
|
|
23051
23105
|
onClose
|
|
23052
23106
|
}) {
|
|
23053
|
-
const [anchorEl, setAnchorEl] =
|
|
23054
|
-
const [searchText, setSearchText] =
|
|
23055
|
-
const allShownItemsRef =
|
|
23056
|
-
const selectRef =
|
|
23057
|
-
|
|
23107
|
+
const [anchorEl, setAnchorEl] = React69.useState();
|
|
23108
|
+
const [searchText, setSearchText] = React69.useState("");
|
|
23109
|
+
const allShownItemsRef = React69.useRef(items);
|
|
23110
|
+
const selectRef = React69.useRef(null);
|
|
23111
|
+
React69.useEffect(() => {
|
|
23058
23112
|
if (anchorEl) {
|
|
23059
23113
|
onSearch(searchText);
|
|
23060
23114
|
}
|
|
23061
23115
|
}, [anchorEl, onSearch, searchText]);
|
|
23062
|
-
|
|
23116
|
+
React69.useEffect(() => {
|
|
23063
23117
|
const allShownItems = allShownItemsRef.current;
|
|
23064
23118
|
allShownItemsRef.current = allShownItems.concat(
|
|
23065
23119
|
items.filter(
|
|
@@ -23305,7 +23359,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
23305
23359
|
var ItemSelector_default = ItemSelector;
|
|
23306
23360
|
|
|
23307
23361
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
23308
|
-
import * as
|
|
23362
|
+
import * as React73 from "react";
|
|
23309
23363
|
|
|
23310
23364
|
// src/utils/RegExpUtils.ts
|
|
23311
23365
|
var map = {
|
|
@@ -23319,10 +23373,10 @@ var map = {
|
|
|
23319
23373
|
var toDiacriticInsensitiveString = (input) => Array.from(input).map((char) => map[char] ? `[${map[char]}]` : char).join("");
|
|
23320
23374
|
|
|
23321
23375
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23322
|
-
import * as
|
|
23376
|
+
import * as React71 from "react";
|
|
23323
23377
|
|
|
23324
23378
|
// src/components/input/autocomplete/AutocompleteInputSelection.tsx
|
|
23325
|
-
import * as
|
|
23379
|
+
import * as React70 from "react";
|
|
23326
23380
|
import { jsx as jsx129, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
23327
23381
|
var AUTOCOMPLETE_PADDING_RIGHT = 6;
|
|
23328
23382
|
var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
@@ -23335,7 +23389,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
23335
23389
|
onRemoveValue
|
|
23336
23390
|
}) {
|
|
23337
23391
|
const { palette: palette2 } = useCustomTheme();
|
|
23338
|
-
const stackRef =
|
|
23392
|
+
const stackRef = React70.useRef(null);
|
|
23339
23393
|
return /* @__PURE__ */ jsxs60(
|
|
23340
23394
|
Stack_default,
|
|
23341
23395
|
{
|
|
@@ -23439,7 +23493,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23439
23493
|
}) {
|
|
23440
23494
|
const { palette: palette2 } = useCustomTheme();
|
|
23441
23495
|
const { t } = useTranslation();
|
|
23442
|
-
const [isHover, setIsHover] =
|
|
23496
|
+
const [isHover, setIsHover] = React71.useState(false);
|
|
23443
23497
|
const dirty = !!inputValue || Array.isArray(value) && value.length > 0 || !Array.isArray(value) && !!value;
|
|
23444
23498
|
const showClearButton = !disabled && dirty && !disableClear && (isOpenPopover || isHover);
|
|
23445
23499
|
return /* @__PURE__ */ jsx130(Fragment30, { children: /* @__PURE__ */ jsx130(
|
|
@@ -23612,7 +23666,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23612
23666
|
var AutocompleteInput_default = AutocompleteInput;
|
|
23613
23667
|
|
|
23614
23668
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23615
|
-
import * as
|
|
23669
|
+
import * as React72 from "react";
|
|
23616
23670
|
import { Popper as Popper2, ClickAwayListener } from "@mui/material";
|
|
23617
23671
|
import { FixedSizeList as FixedSizeList3 } from "react-window";
|
|
23618
23672
|
import AutoSizer5 from "react-virtualized-auto-sizer";
|
|
@@ -23657,7 +23711,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23657
23711
|
}) {
|
|
23658
23712
|
const { palette: palette2 } = useCustomTheme();
|
|
23659
23713
|
const { t } = useTranslation();
|
|
23660
|
-
const listRef =
|
|
23714
|
+
const listRef = React72.useRef(null);
|
|
23661
23715
|
const getText = (option) => {
|
|
23662
23716
|
const isInOptions = options.some((elem) => elem.id === option.id);
|
|
23663
23717
|
if (!isInOptions) {
|
|
@@ -23803,15 +23857,15 @@ var Autocomplete = function Autocomplete2({
|
|
|
23803
23857
|
onOpen = () => ({}),
|
|
23804
23858
|
disableClear
|
|
23805
23859
|
}) {
|
|
23806
|
-
const anchorRef =
|
|
23807
|
-
const inputRef =
|
|
23808
|
-
const [placeholder, setPlaceholder] =
|
|
23860
|
+
const anchorRef = React73.useRef(null);
|
|
23861
|
+
const inputRef = React73.useRef(null);
|
|
23862
|
+
const [placeholder, setPlaceholder] = React73.useState(
|
|
23809
23863
|
textFieldProps?.placeholder || ""
|
|
23810
23864
|
);
|
|
23811
|
-
const _renderLabel =
|
|
23812
|
-
const [inputValue, setInputValue] =
|
|
23813
|
-
const [isDirty, setDirty] =
|
|
23814
|
-
const getOptionsLabeled =
|
|
23865
|
+
const _renderLabel = React73.useCallback((id) => id, []);
|
|
23866
|
+
const [inputValue, setInputValue] = React73.useState("");
|
|
23867
|
+
const [isDirty, setDirty] = React73.useState(false);
|
|
23868
|
+
const getOptionsLabeled = React73.useCallback(
|
|
23815
23869
|
(options2, inputValue2 = "") => {
|
|
23816
23870
|
const searchValue = escapeRegExp2(inputValue2.trim());
|
|
23817
23871
|
const regExp = new RegExp(
|
|
@@ -23842,7 +23896,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23842
23896
|
renderLabel
|
|
23843
23897
|
]
|
|
23844
23898
|
);
|
|
23845
|
-
const getAllowFreeTextOption =
|
|
23899
|
+
const getAllowFreeTextOption = React73.useCallback(
|
|
23846
23900
|
(inputValue2) => {
|
|
23847
23901
|
if (allowFreeText) {
|
|
23848
23902
|
const freeOption = {
|
|
@@ -23860,27 +23914,27 @@ var Autocomplete = function Autocomplete2({
|
|
|
23860
23914
|
},
|
|
23861
23915
|
[_renderLabel, allowFreeText, options, renderLabel]
|
|
23862
23916
|
);
|
|
23863
|
-
const [filteredOptions, setFilteredOptions] =
|
|
23864
|
-
const virtualListRef =
|
|
23865
|
-
const [isOpenPopover, setOpenPopover] =
|
|
23917
|
+
const [filteredOptions, setFilteredOptions] = React73.useState(getOptionsLabeled([...options]));
|
|
23918
|
+
const virtualListRef = React73.createRef();
|
|
23919
|
+
const [isOpenPopover, setOpenPopover] = React73.useState(false);
|
|
23866
23920
|
const getSelectedIndexEmpty = () => multiple ? [] : void 0;
|
|
23867
|
-
const [selectedIndex, setSelectedIndex] =
|
|
23868
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
23869
|
-
|
|
23921
|
+
const [selectedIndex, setSelectedIndex] = React73.useState(getSelectedIndexEmpty());
|
|
23922
|
+
const [highlightedIndex, setHighlightedIndex] = React73.useState(-1);
|
|
23923
|
+
React73.useEffect(() => {
|
|
23870
23924
|
setFilteredOptions(getOptionsLabeled([...options]));
|
|
23871
23925
|
}, [options]);
|
|
23872
23926
|
const canAddValues = maxValues === void 0 || maxValues === 0 || !!multiple && Array.isArray(value) && value.length < maxValues;
|
|
23873
|
-
|
|
23927
|
+
React73.useEffect(() => {
|
|
23874
23928
|
if (disabled) {
|
|
23875
23929
|
setOpenPopover(false);
|
|
23876
23930
|
}
|
|
23877
23931
|
}, [disabled]);
|
|
23878
|
-
|
|
23932
|
+
React73.useEffect(() => {
|
|
23879
23933
|
if (!canAddValues && isOpenPopover) {
|
|
23880
23934
|
closePopover();
|
|
23881
23935
|
}
|
|
23882
23936
|
}, [canAddValues, isOpenPopover]);
|
|
23883
|
-
const getLastSelectedIndex =
|
|
23937
|
+
const getLastSelectedIndex = React73.useCallback(() => {
|
|
23884
23938
|
if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
|
|
23885
23939
|
return selectedIndex[selectedIndex.length - 1];
|
|
23886
23940
|
} else if (typeof selectedIndex === "number") {
|
|
@@ -23888,7 +23942,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23888
23942
|
}
|
|
23889
23943
|
return void 0;
|
|
23890
23944
|
}, [selectedIndex]);
|
|
23891
|
-
|
|
23945
|
+
React73.useEffect(() => {
|
|
23892
23946
|
if (isOpenPopover) {
|
|
23893
23947
|
if (highlightedIndex > -1) {
|
|
23894
23948
|
virtualListRef.current?.scrollToItem(highlightedIndex);
|
|
@@ -24160,7 +24214,7 @@ function elementIsDescendantOrEqual(parent2, descendant) {
|
|
|
24160
24214
|
}
|
|
24161
24215
|
|
|
24162
24216
|
// src/components/input/TextEditor.tsx
|
|
24163
|
-
import
|
|
24217
|
+
import React76 from "react";
|
|
24164
24218
|
import { Editor } from "@tinymce/tinymce-react";
|
|
24165
24219
|
import "tinymce/tinymce";
|
|
24166
24220
|
import "tinymce/models/dom/model";
|
|
@@ -24181,10 +24235,10 @@ import "tinymce/plugins/wordcount";
|
|
|
24181
24235
|
import "tinymce/plugins/emoticons/js/emojis";
|
|
24182
24236
|
|
|
24183
24237
|
// src/components/input/CodeEditorPopup.tsx
|
|
24184
|
-
import
|
|
24238
|
+
import React75 from "react";
|
|
24185
24239
|
|
|
24186
24240
|
// src/components/input/CodeEditor.tsx
|
|
24187
|
-
import
|
|
24241
|
+
import React74 from "react";
|
|
24188
24242
|
import CodeMirror, {
|
|
24189
24243
|
EditorView
|
|
24190
24244
|
} from "@uiw/react-codemirror";
|
|
@@ -24227,7 +24281,7 @@ var CodeEditor = function CodeEditor2({
|
|
|
24227
24281
|
}
|
|
24228
24282
|
);
|
|
24229
24283
|
};
|
|
24230
|
-
var CodeEditor_default =
|
|
24284
|
+
var CodeEditor_default = React74.forwardRef(CodeEditor);
|
|
24231
24285
|
|
|
24232
24286
|
// src/components/input/CodeEditorPopup.tsx
|
|
24233
24287
|
import format from "html-format";
|
|
@@ -24247,9 +24301,9 @@ var CodeEditorPopup = ({
|
|
|
24247
24301
|
onCancel
|
|
24248
24302
|
}) => {
|
|
24249
24303
|
const { t } = useTranslation();
|
|
24250
|
-
const [valueModified, setValueModified] =
|
|
24251
|
-
const [hasErrors, setHasErrors] =
|
|
24252
|
-
|
|
24304
|
+
const [valueModified, setValueModified] = React75.useState(value);
|
|
24305
|
+
const [hasErrors, setHasErrors] = React75.useState(false);
|
|
24306
|
+
React75.useEffect(() => {
|
|
24253
24307
|
if (open) {
|
|
24254
24308
|
setValueModified(value);
|
|
24255
24309
|
}
|
|
@@ -24479,15 +24533,15 @@ var TextEditor = function TextEditor2({
|
|
|
24479
24533
|
...rest
|
|
24480
24534
|
}) {
|
|
24481
24535
|
const { t } = useTranslation();
|
|
24482
|
-
const editorRef =
|
|
24483
|
-
const [internalValue] =
|
|
24536
|
+
const editorRef = React76.useRef(null);
|
|
24537
|
+
const [internalValue] = React76.useState(
|
|
24484
24538
|
initialValue ?? t("TEXT_EDITOR.INITIAL_VALUE")
|
|
24485
24539
|
);
|
|
24486
|
-
const [contentValue, setContentValue] =
|
|
24487
|
-
const [codeEditorChanges, setCodeEditorChanges] =
|
|
24488
|
-
const [isCodeEditorDirty, setIsCodeEditorDirty] =
|
|
24489
|
-
const [isCodeEditorOpened, setIsCodeEditorOpened] =
|
|
24490
|
-
const [isDirty, setIsDirty] =
|
|
24540
|
+
const [contentValue, setContentValue] = React76.useState("");
|
|
24541
|
+
const [codeEditorChanges, setCodeEditorChanges] = React76.useState("");
|
|
24542
|
+
const [isCodeEditorDirty, setIsCodeEditorDirty] = React76.useState(false);
|
|
24543
|
+
const [isCodeEditorOpened, setIsCodeEditorOpened] = React76.useState(false);
|
|
24544
|
+
const [isDirty, setIsDirty] = React76.useState(false);
|
|
24491
24545
|
const codeEditorButtonIndexToUse = codeEditorButtonIndex ?? customToolbarGroups.insert?.items?.length ?? DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.length;
|
|
24492
24546
|
const defaultToolbarInsertMenuItemsWithCodeEditor = DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.slice();
|
|
24493
24547
|
defaultToolbarInsertMenuItemsWithCodeEditor.splice(
|
|
@@ -24501,12 +24555,12 @@ var TextEditor = function TextEditor2({
|
|
|
24501
24555
|
0,
|
|
24502
24556
|
"cnCodeEditor"
|
|
24503
24557
|
);
|
|
24504
|
-
const onTextChange =
|
|
24558
|
+
const onTextChange = React76.useCallback(() => {
|
|
24505
24559
|
if (editorRef.current) {
|
|
24506
24560
|
onChange(editorRef.current?.getContent());
|
|
24507
24561
|
}
|
|
24508
24562
|
}, [onChange]);
|
|
24509
|
-
const onTextEditorDirty =
|
|
24563
|
+
const onTextEditorDirty = React76.useCallback(
|
|
24510
24564
|
(textEditorDirty) => {
|
|
24511
24565
|
editorRef.current?.setDirty(textEditorDirty);
|
|
24512
24566
|
setIsDirty(textEditorDirty);
|
|
@@ -24519,7 +24573,7 @@ var TextEditor = function TextEditor2({
|
|
|
24519
24573
|
},
|
|
24520
24574
|
[onDirty, onTextChange]
|
|
24521
24575
|
);
|
|
24522
|
-
|
|
24576
|
+
React76.useEffect(() => {
|
|
24523
24577
|
if (resetDirty && editorRef.current?.isDirty()) {
|
|
24524
24578
|
onTextEditorDirty(false);
|
|
24525
24579
|
}
|
|
@@ -24527,7 +24581,7 @@ var TextEditor = function TextEditor2({
|
|
|
24527
24581
|
onResetDirty();
|
|
24528
24582
|
}
|
|
24529
24583
|
}, [onResetDirty, onTextEditorDirty, resetDirty]);
|
|
24530
|
-
|
|
24584
|
+
React76.useEffect(() => {
|
|
24531
24585
|
if (newValue && editorRef.current) {
|
|
24532
24586
|
editorRef.current.setContent(newValue);
|
|
24533
24587
|
if (onNewValueSetter) {
|
|
@@ -24535,7 +24589,7 @@ var TextEditor = function TextEditor2({
|
|
|
24535
24589
|
}
|
|
24536
24590
|
}
|
|
24537
24591
|
}, [newValue, onNewValueSetter]);
|
|
24538
|
-
|
|
24592
|
+
React76.useEffect(() => {
|
|
24539
24593
|
if (forceCloseCodeEditor) {
|
|
24540
24594
|
setIsCodeEditorOpened(false);
|
|
24541
24595
|
if (onForceCloseCodeEditor) {
|
|
@@ -24782,10 +24836,10 @@ var TextEditor = function TextEditor2({
|
|
|
24782
24836
|
var TextEditor_default = TextEditor;
|
|
24783
24837
|
|
|
24784
24838
|
// src/components/input/PhoneField.tsx
|
|
24785
|
-
import * as
|
|
24839
|
+
import * as React77 from "react";
|
|
24786
24840
|
import { Fragment as Fragment35, jsx as jsx136, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24787
24841
|
var maxPhoneLengthWithPrefix = 16;
|
|
24788
|
-
var PhoneField =
|
|
24842
|
+
var PhoneField = React77.forwardRef(function PhoneField2({
|
|
24789
24843
|
value,
|
|
24790
24844
|
onChange,
|
|
24791
24845
|
defaultCountryCode = "34",
|
|
@@ -24793,20 +24847,20 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24793
24847
|
codeSelectProps,
|
|
24794
24848
|
...rest
|
|
24795
24849
|
}, ref) {
|
|
24796
|
-
const [countryCode, setCountryCode] =
|
|
24797
|
-
const [textValue, setTextValue] =
|
|
24798
|
-
const countryCodeOptions =
|
|
24850
|
+
const [countryCode, setCountryCode] = React77.useState(defaultCountryCode);
|
|
24851
|
+
const [textValue, setTextValue] = React77.useState("");
|
|
24852
|
+
const countryCodeOptions = React77.useMemo(
|
|
24799
24853
|
() => allCountries.map((c) => ({
|
|
24800
24854
|
value: c.countryCode,
|
|
24801
24855
|
label: `+${c.countryCode} ${c.name}`
|
|
24802
24856
|
})),
|
|
24803
24857
|
[]
|
|
24804
24858
|
);
|
|
24805
|
-
const sanitizeTextValue =
|
|
24859
|
+
const sanitizeTextValue = React77.useCallback(
|
|
24806
24860
|
(value2) => value2.replace(/[^\d]/g, ""),
|
|
24807
24861
|
[]
|
|
24808
24862
|
);
|
|
24809
|
-
const onChangeText =
|
|
24863
|
+
const onChangeText = React77.useCallback(
|
|
24810
24864
|
(event) => {
|
|
24811
24865
|
const sanitizedTextValue = sanitizeTextValue(
|
|
24812
24866
|
event.target.value
|
|
@@ -24820,7 +24874,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24820
24874
|
},
|
|
24821
24875
|
[countryCode, onChange, sanitizeTextValue, textValue]
|
|
24822
24876
|
);
|
|
24823
|
-
const onChangeCountryCode =
|
|
24877
|
+
const onChangeCountryCode = React77.useCallback(
|
|
24824
24878
|
(countryCode2) => {
|
|
24825
24879
|
const sanitizedTextValue = sanitizeTextValue(textValue).substring(
|
|
24826
24880
|
0,
|
|
@@ -24836,7 +24890,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24836
24890
|
},
|
|
24837
24891
|
[onChange, sanitizeTextValue, textValue]
|
|
24838
24892
|
);
|
|
24839
|
-
|
|
24893
|
+
React77.useEffect(() => {
|
|
24840
24894
|
const countryCode2 = getCountryCode(value);
|
|
24841
24895
|
if (!countryCode2) {
|
|
24842
24896
|
setTextValue("");
|
|
@@ -24881,7 +24935,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24881
24935
|
var PhoneField_default = PhoneField;
|
|
24882
24936
|
|
|
24883
24937
|
// src/components/input/NumberField.tsx
|
|
24884
|
-
import * as
|
|
24938
|
+
import * as React78 from "react";
|
|
24885
24939
|
import { jsx as jsx137, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24886
24940
|
var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
24887
24941
|
const propDescriptor = Object.getOwnPropertyDescriptor(
|
|
@@ -24898,7 +24952,7 @@ var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
|
24898
24952
|
r2.current.dispatchEvent(e);
|
|
24899
24953
|
}
|
|
24900
24954
|
};
|
|
24901
|
-
var NumberField =
|
|
24955
|
+
var NumberField = React78.forwardRef(function NumberField2({
|
|
24902
24956
|
value,
|
|
24903
24957
|
type = "integer",
|
|
24904
24958
|
onChange,
|
|
@@ -24915,16 +24969,16 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24915
24969
|
...rest
|
|
24916
24970
|
}, ref) {
|
|
24917
24971
|
const { palette: palette2 } = useCustomTheme();
|
|
24918
|
-
const inputRef =
|
|
24919
|
-
const numberToString =
|
|
24972
|
+
const inputRef = React78.useRef(null);
|
|
24973
|
+
const numberToString = React78.useCallback(
|
|
24920
24974
|
(value2) => typeof value2 === "number" && !isNaN(value2) ? fractionDigits !== 0 ? value2.toFixed(fractionDigits) : value2.toString() : "",
|
|
24921
24975
|
[fractionDigits]
|
|
24922
24976
|
);
|
|
24923
|
-
const stringToNumber =
|
|
24977
|
+
const stringToNumber = React78.useCallback(
|
|
24924
24978
|
(value2) => !value2 || isNaN(+value2) ? null : +value2,
|
|
24925
24979
|
[]
|
|
24926
24980
|
);
|
|
24927
|
-
const sanitizeDecimalTextValue =
|
|
24981
|
+
const sanitizeDecimalTextValue = React78.useCallback(
|
|
24928
24982
|
(value2) => {
|
|
24929
24983
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24930
24984
|
const numbersAndDots = value2.replace(/[^\d.]/g, "");
|
|
@@ -24936,7 +24990,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24936
24990
|
},
|
|
24937
24991
|
[fractionDigits]
|
|
24938
24992
|
);
|
|
24939
|
-
const sanitizeIntegerTextValue =
|
|
24993
|
+
const sanitizeIntegerTextValue = React78.useCallback(
|
|
24940
24994
|
(value2) => {
|
|
24941
24995
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24942
24996
|
const numbers = value2.replace(/[^\d]/g, "");
|
|
@@ -24944,7 +24998,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24944
24998
|
},
|
|
24945
24999
|
[]
|
|
24946
25000
|
);
|
|
24947
|
-
const _onChange =
|
|
25001
|
+
const _onChange = React78.useCallback(
|
|
24948
25002
|
(event) => {
|
|
24949
25003
|
const sanitizedTextValue = type === "integer" ? sanitizeIntegerTextValue(event.target.value) : sanitizeDecimalTextValue(event.target.value);
|
|
24950
25004
|
let numericValue = stringToNumber(sanitizedTextValue);
|
|
@@ -24974,7 +25028,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24974
25028
|
numberToString
|
|
24975
25029
|
]
|
|
24976
25030
|
);
|
|
24977
|
-
const stepUp =
|
|
25031
|
+
const stepUp = React78.useCallback(() => {
|
|
24978
25032
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24979
25033
|
setValueAndTriggerChangeEvent(
|
|
24980
25034
|
ref ?? inputRef,
|
|
@@ -24987,7 +25041,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24987
25041
|
);
|
|
24988
25042
|
}
|
|
24989
25043
|
}, [numberToString, ref, step, value]);
|
|
24990
|
-
const stepDown =
|
|
25044
|
+
const stepDown = React78.useCallback(() => {
|
|
24991
25045
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24992
25046
|
setValueAndTriggerChangeEvent(
|
|
24993
25047
|
ref ?? inputRef,
|
|
@@ -25000,7 +25054,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25000
25054
|
);
|
|
25001
25055
|
}
|
|
25002
25056
|
}, [numberToString, ref, step, value]);
|
|
25003
|
-
const _onKeyDown =
|
|
25057
|
+
const _onKeyDown = React78.useCallback(
|
|
25004
25058
|
(event) => {
|
|
25005
25059
|
onKeyDown && onKeyDown(event);
|
|
25006
25060
|
if (step <= 0) {
|
|
@@ -25019,8 +25073,8 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25019
25073
|
},
|
|
25020
25074
|
[onKeyDown, step, stepDown, stepUp]
|
|
25021
25075
|
);
|
|
25022
|
-
const [textValue, setTextValue] =
|
|
25023
|
-
const _onBlur =
|
|
25076
|
+
const [textValue, setTextValue] = React78.useState(numberToString(value));
|
|
25077
|
+
const _onBlur = React78.useCallback(
|
|
25024
25078
|
(event) => {
|
|
25025
25079
|
onBlur && onBlur(event);
|
|
25026
25080
|
const text = numberToString(value);
|
|
@@ -25082,7 +25136,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25082
25136
|
}
|
|
25083
25137
|
)
|
|
25084
25138
|
] }) : endAdornment;
|
|
25085
|
-
|
|
25139
|
+
React78.useEffect(() => {
|
|
25086
25140
|
if (stringToNumber(textValue) !== value) {
|
|
25087
25141
|
setTextValue(numberToString(value));
|
|
25088
25142
|
}
|
|
@@ -25103,11 +25157,11 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25103
25157
|
var NumberField_default = NumberField;
|
|
25104
25158
|
|
|
25105
25159
|
// src/components/input/DatePicker.tsx
|
|
25106
|
-
import * as
|
|
25160
|
+
import * as React80 from "react";
|
|
25107
25161
|
import { tz as tz8 } from "moment-timezone";
|
|
25108
25162
|
|
|
25109
25163
|
// src/components/input/DatePickerStatic.tsx
|
|
25110
|
-
import * as
|
|
25164
|
+
import * as React79 from "react";
|
|
25111
25165
|
import { tz as tz7 } from "moment-timezone";
|
|
25112
25166
|
import { jsx as jsx138, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
25113
25167
|
var minYear = 1900;
|
|
@@ -25118,13 +25172,13 @@ var DatePickerStatic = ({
|
|
|
25118
25172
|
minDate,
|
|
25119
25173
|
maxDate
|
|
25120
25174
|
}) => {
|
|
25121
|
-
const { timezone } =
|
|
25122
|
-
const [selectedDateParts, setSelectedDateParts] =
|
|
25123
|
-
const [visibleMonth, setVisibleMonth] =
|
|
25175
|
+
const { timezone } = React79.useContext(IntlContext);
|
|
25176
|
+
const [selectedDateParts, setSelectedDateParts] = React79.useState(void 0);
|
|
25177
|
+
const [visibleMonth, setVisibleMonth] = React79.useState({
|
|
25124
25178
|
year: minYear,
|
|
25125
25179
|
month: 0
|
|
25126
25180
|
});
|
|
25127
|
-
|
|
25181
|
+
React79.useEffect(() => {
|
|
25128
25182
|
if (selectedDateParts) {
|
|
25129
25183
|
setVisibleMonth({
|
|
25130
25184
|
year: selectedDateParts.year,
|
|
@@ -25138,7 +25192,7 @@ var DatePickerStatic = ({
|
|
|
25138
25192
|
});
|
|
25139
25193
|
}
|
|
25140
25194
|
}, [selectedDateParts, timezone]);
|
|
25141
|
-
|
|
25195
|
+
React79.useEffect(() => {
|
|
25142
25196
|
if (!value || isNaN(value.getTime())) {
|
|
25143
25197
|
setSelectedDateParts(void 0);
|
|
25144
25198
|
return;
|
|
@@ -25160,25 +25214,25 @@ var DatePickerStatic = ({
|
|
|
25160
25214
|
const endYear = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getFullYear() : maxYear;
|
|
25161
25215
|
const startMonth = minDate && !isNaN(minDate.getTime()) ? minDate.getMonth() : 0;
|
|
25162
25216
|
const endMonth = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getMonth() : 11;
|
|
25163
|
-
const options =
|
|
25217
|
+
const options = React79.useMemo(
|
|
25164
25218
|
() => Array.from(Array(endYear - startYear + 1)).map((_, i) => ({
|
|
25165
25219
|
value: startYear + i
|
|
25166
25220
|
})),
|
|
25167
25221
|
[endYear, startYear]
|
|
25168
25222
|
);
|
|
25169
|
-
const navigatePreviousMonth =
|
|
25223
|
+
const navigatePreviousMonth = React79.useCallback(() => {
|
|
25170
25224
|
setVisibleMonth({
|
|
25171
25225
|
month: visibleMonth.month === 0 ? 11 : visibleMonth.month - 1,
|
|
25172
25226
|
year: visibleMonth.month === 0 ? visibleMonth.year - 1 : visibleMonth.year
|
|
25173
25227
|
});
|
|
25174
25228
|
}, [visibleMonth]);
|
|
25175
|
-
const navigateNextMonth =
|
|
25229
|
+
const navigateNextMonth = React79.useCallback(() => {
|
|
25176
25230
|
setVisibleMonth({
|
|
25177
25231
|
month: visibleMonth.month === 11 ? 0 : visibleMonth.month + 1,
|
|
25178
25232
|
year: visibleMonth.month === 11 ? visibleMonth.year + 1 : visibleMonth.year
|
|
25179
25233
|
});
|
|
25180
25234
|
}, [visibleMonth]);
|
|
25181
|
-
const onChangeYear =
|
|
25235
|
+
const onChangeYear = React79.useCallback(
|
|
25182
25236
|
(value2) => {
|
|
25183
25237
|
const month = value2 === startYear ? Math.max(startMonth, visibleMonth.month) : value2 === endYear ? Math.min(endMonth, visibleMonth.month) : visibleMonth.month;
|
|
25184
25238
|
setVisibleMonth({
|
|
@@ -25188,11 +25242,11 @@ var DatePickerStatic = ({
|
|
|
25188
25242
|
},
|
|
25189
25243
|
[endMonth, endYear, startMonth, startYear, visibleMonth.month]
|
|
25190
25244
|
);
|
|
25191
|
-
const minSimpleDate =
|
|
25245
|
+
const minSimpleDate = React79.useMemo(
|
|
25192
25246
|
() => dateToSimpleDate(minDate, timezone),
|
|
25193
25247
|
[minDate, timezone]
|
|
25194
25248
|
);
|
|
25195
|
-
const maxSimpleDate =
|
|
25249
|
+
const maxSimpleDate = React79.useMemo(
|
|
25196
25250
|
() => dateToSimpleDate(maxDate, timezone),
|
|
25197
25251
|
[maxDate, timezone]
|
|
25198
25252
|
);
|
|
@@ -25304,18 +25358,18 @@ var DatePickerPopover_default = DatePickerPopover;
|
|
|
25304
25358
|
|
|
25305
25359
|
// src/components/input/DatePicker.tsx
|
|
25306
25360
|
import { Fragment as Fragment36, jsx as jsx140, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
25307
|
-
var DatePicker =
|
|
25361
|
+
var DatePicker = React80.forwardRef(
|
|
25308
25362
|
function DatePicker2({ value, onChange, onBlur, onKeyDown, minDate, maxDate, ...rest }, ref) {
|
|
25309
|
-
const { locale, timezone } =
|
|
25363
|
+
const { locale, timezone } = React80.useContext(IntlContext);
|
|
25310
25364
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
25311
25365
|
const { t } = useTranslation();
|
|
25312
|
-
const dateInputFormatPlaceholder =
|
|
25366
|
+
const dateInputFormatPlaceholder = React80.useMemo(
|
|
25313
25367
|
() => dateInputFormat.replace(/Y/g, t("DATE_COMPONENTS.YEAR_LETTER")).replace(/M/g, t("DATE_COMPONENTS.MONTH_LETTER")).replace(/D/g, t("DATE_COMPONENTS.DAY_LETTER")),
|
|
25314
25368
|
[dateInputFormat, t]
|
|
25315
25369
|
);
|
|
25316
|
-
const _containerRef =
|
|
25317
|
-
const [isPopoverOpen, setPopoverOpen] =
|
|
25318
|
-
const [textValue, setTextValue] =
|
|
25370
|
+
const _containerRef = React80.useRef(null);
|
|
25371
|
+
const [isPopoverOpen, setPopoverOpen] = React80.useState(false);
|
|
25372
|
+
const [textValue, setTextValue] = React80.useState("");
|
|
25319
25373
|
let anchorEl = null;
|
|
25320
25374
|
if (isPopoverOpen) {
|
|
25321
25375
|
if (rest.containerRef && typeof rest.containerRef === "object" && rest.containerRef.current) {
|
|
@@ -25324,21 +25378,21 @@ var DatePicker = React79.forwardRef(
|
|
|
25324
25378
|
anchorEl = _containerRef.current;
|
|
25325
25379
|
}
|
|
25326
25380
|
}
|
|
25327
|
-
const isValidDate =
|
|
25381
|
+
const isValidDate = React80.useCallback(
|
|
25328
25382
|
(dateString) => {
|
|
25329
25383
|
const date = parseDateForLocale(dateString, locale, timezone);
|
|
25330
25384
|
return !isNaN(date.getTime()) && (!minDate || date >= minDate) && (!maxDate || date <= maxDate);
|
|
25331
25385
|
},
|
|
25332
25386
|
[locale, maxDate, minDate, timezone]
|
|
25333
25387
|
);
|
|
25334
|
-
const onSelect =
|
|
25388
|
+
const onSelect = React80.useCallback(
|
|
25335
25389
|
(date) => {
|
|
25336
25390
|
setPopoverOpen(false);
|
|
25337
25391
|
onChange && onChange(date);
|
|
25338
25392
|
},
|
|
25339
25393
|
[onChange]
|
|
25340
25394
|
);
|
|
25341
|
-
const onChangeTextField =
|
|
25395
|
+
const onChangeTextField = React80.useCallback(
|
|
25342
25396
|
(event) => {
|
|
25343
25397
|
setTextValue(event.target.value);
|
|
25344
25398
|
if (!event.target.value && value) {
|
|
@@ -25357,7 +25411,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25357
25411
|
},
|
|
25358
25412
|
[isValidDate, locale, onChange, timezone, value]
|
|
25359
25413
|
);
|
|
25360
|
-
const onBlurTextField =
|
|
25414
|
+
const onBlurTextField = React80.useCallback(
|
|
25361
25415
|
(event) => {
|
|
25362
25416
|
if (!isValidDate(event.target.value)) {
|
|
25363
25417
|
value ? onChange && onChange(null) : setTextValue("");
|
|
@@ -25366,7 +25420,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25366
25420
|
},
|
|
25367
25421
|
[isValidDate, onChange, onBlur, value]
|
|
25368
25422
|
);
|
|
25369
|
-
const onKeyDownTextField =
|
|
25423
|
+
const onKeyDownTextField = React80.useCallback(
|
|
25370
25424
|
(event) => {
|
|
25371
25425
|
if (event.key === "ArrowDown") {
|
|
25372
25426
|
setPopoverOpen(true);
|
|
@@ -25375,7 +25429,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25375
25429
|
},
|
|
25376
25430
|
[onKeyDown]
|
|
25377
25431
|
);
|
|
25378
|
-
|
|
25432
|
+
React80.useEffect(() => {
|
|
25379
25433
|
const text = value && !isNaN(value.getTime()) ? tz8(value, timezone).format(dateInputFormat) : "";
|
|
25380
25434
|
setTextValue(text);
|
|
25381
25435
|
}, [dateInputFormat, timezone, value]);
|
|
@@ -25494,11 +25548,11 @@ var Checkbox = ({
|
|
|
25494
25548
|
var Checkbox_default = Checkbox;
|
|
25495
25549
|
|
|
25496
25550
|
// src/components/input/Radio.tsx
|
|
25497
|
-
import * as
|
|
25551
|
+
import * as React81 from "react";
|
|
25498
25552
|
import MuiRadio from "@mui/material/Radio";
|
|
25499
25553
|
import { FormControlLabel as FormControlLabel2 } from "@mui/material";
|
|
25500
25554
|
import { Fragment as Fragment38, jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
25501
|
-
var Radio =
|
|
25555
|
+
var Radio = React81.forwardRef(function Radio2({
|
|
25502
25556
|
label,
|
|
25503
25557
|
labelPlacement = "end",
|
|
25504
25558
|
onChange,
|
|
@@ -25509,7 +25563,7 @@ var Radio = React80.forwardRef(function Radio2({
|
|
|
25509
25563
|
size = "M",
|
|
25510
25564
|
...rest
|
|
25511
25565
|
}, ref) {
|
|
25512
|
-
const _onChange =
|
|
25566
|
+
const _onChange = React81.useCallback(
|
|
25513
25567
|
(event) => {
|
|
25514
25568
|
onChange && onChange(event, event.target.value);
|
|
25515
25569
|
},
|
|
@@ -25553,7 +25607,7 @@ var Radio = React80.forwardRef(function Radio2({
|
|
|
25553
25607
|
var Radio_default = Radio;
|
|
25554
25608
|
|
|
25555
25609
|
// src/components/input/PageSelector.tsx
|
|
25556
|
-
import * as
|
|
25610
|
+
import * as React82 from "react";
|
|
25557
25611
|
import { jsx as jsx143, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
25558
25612
|
var PageSelector = ({
|
|
25559
25613
|
currentPage,
|
|
@@ -25562,12 +25616,12 @@ var PageSelector = ({
|
|
|
25562
25616
|
text,
|
|
25563
25617
|
onPageChange
|
|
25564
25618
|
}) => {
|
|
25565
|
-
const handlePrevious =
|
|
25619
|
+
const handlePrevious = React82.useCallback(() => {
|
|
25566
25620
|
if (currentPage > 1) {
|
|
25567
25621
|
onPageChange(Math.max(1, currentPage - 1));
|
|
25568
25622
|
}
|
|
25569
25623
|
}, [currentPage, onPageChange]);
|
|
25570
|
-
const handleNext =
|
|
25624
|
+
const handleNext = React82.useCallback(() => {
|
|
25571
25625
|
onPageChange(
|
|
25572
25626
|
Math.min(Math.ceil(totalItems / pageSize), currentPage + 1)
|
|
25573
25627
|
);
|
|
@@ -25665,7 +25719,7 @@ var LinearProgress = ({
|
|
|
25665
25719
|
var LinearProgress_default = LinearProgress;
|
|
25666
25720
|
|
|
25667
25721
|
// src/components/progress/CircularProgress.tsx
|
|
25668
|
-
import * as
|
|
25722
|
+
import * as React83 from "react";
|
|
25669
25723
|
import MuiCircularProgress from "@mui/material/CircularProgress";
|
|
25670
25724
|
import Typography3 from "@mui/material/Typography";
|
|
25671
25725
|
import Box4 from "@mui/material/Box";
|
|
@@ -25691,7 +25745,7 @@ var CircularProgress = ({
|
|
|
25691
25745
|
typographyColor = black,
|
|
25692
25746
|
gradientColors
|
|
25693
25747
|
}) => {
|
|
25694
|
-
const gradientName =
|
|
25748
|
+
const gradientName = React83.useRef(
|
|
25695
25749
|
gradientColors ? crypto.randomUUID() : void 0
|
|
25696
25750
|
);
|
|
25697
25751
|
return /* @__PURE__ */ jsxs73(
|
|
@@ -25982,7 +26036,7 @@ var Loader = ({
|
|
|
25982
26036
|
var Loader_default = Loader;
|
|
25983
26037
|
|
|
25984
26038
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25985
|
-
import
|
|
26039
|
+
import React84 from "react";
|
|
25986
26040
|
import Markdown from "markdown-to-jsx";
|
|
25987
26041
|
import { styled as styled8 } from "@mui/material/styles";
|
|
25988
26042
|
import "katex/dist/katex.min.css";
|
|
@@ -26125,13 +26179,13 @@ var renderWithMath = (text) => {
|
|
|
26125
26179
|
}
|
|
26126
26180
|
return parts;
|
|
26127
26181
|
};
|
|
26128
|
-
var renderChildrenWithMath = (children) =>
|
|
26182
|
+
var renderChildrenWithMath = (children) => React84.Children.map(children, (child) => {
|
|
26129
26183
|
if (typeof child === "string") {
|
|
26130
26184
|
return renderWithMath(child);
|
|
26131
26185
|
}
|
|
26132
|
-
if (
|
|
26186
|
+
if (React84.isValidElement(child)) {
|
|
26133
26187
|
const element = child;
|
|
26134
|
-
return
|
|
26188
|
+
return React84.cloneElement(element, {
|
|
26135
26189
|
...element.props,
|
|
26136
26190
|
children: renderChildrenWithMath(element.props.children)
|
|
26137
26191
|
});
|
|
@@ -26248,10 +26302,10 @@ var Navbar = ({
|
|
|
26248
26302
|
var Navbar_default = Navbar;
|
|
26249
26303
|
|
|
26250
26304
|
// src/components/navbar/NavbarButton.tsx
|
|
26251
|
-
import * as
|
|
26305
|
+
import * as React85 from "react";
|
|
26252
26306
|
import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
|
|
26253
26307
|
import { jsx as jsx151, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
26254
|
-
var NavbarButton =
|
|
26308
|
+
var NavbarButton = React85.forwardRef(
|
|
26255
26309
|
function NavbarButton2({
|
|
26256
26310
|
iconId,
|
|
26257
26311
|
srcUrl,
|
|
@@ -26394,10 +26448,10 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx152(
|
|
|
26394
26448
|
var NavbarHeader_default = NavbarHeader;
|
|
26395
26449
|
|
|
26396
26450
|
// src/components/navbar/NavbarLogo.tsx
|
|
26397
|
-
import * as
|
|
26451
|
+
import * as React86 from "react";
|
|
26398
26452
|
import { ButtonBase as ButtonBase3 } from "@mui/material";
|
|
26399
26453
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
26400
|
-
var NavbarLogo =
|
|
26454
|
+
var NavbarLogo = React86.forwardRef(
|
|
26401
26455
|
function NavbarButton3({ src, ...rest }, ref) {
|
|
26402
26456
|
return /* @__PURE__ */ jsx153(
|
|
26403
26457
|
ButtonBase3,
|
|
@@ -26418,7 +26472,7 @@ var NavbarLogo = React85.forwardRef(
|
|
|
26418
26472
|
var NavbarLogo_default = NavbarLogo;
|
|
26419
26473
|
|
|
26420
26474
|
// src/components/overlay/DonutFocusOverlay.tsx
|
|
26421
|
-
import * as
|
|
26475
|
+
import * as React87 from "react";
|
|
26422
26476
|
import { Fragment as Fragment40, jsx as jsx154, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
26423
26477
|
var DonutFocusOverlay = ({
|
|
26424
26478
|
isVisible,
|
|
@@ -26428,8 +26482,8 @@ var DonutFocusOverlay = ({
|
|
|
26428
26482
|
chipLabel,
|
|
26429
26483
|
chipPosition = "right"
|
|
26430
26484
|
}) => {
|
|
26431
|
-
const [clientRect, setClientRect] =
|
|
26432
|
-
|
|
26485
|
+
const [clientRect, setClientRect] = React87.useState();
|
|
26486
|
+
React87.useEffect(() => {
|
|
26433
26487
|
if (!elementRef?.current) {
|
|
26434
26488
|
setClientRect(void 0);
|
|
26435
26489
|
return;
|
|
@@ -26578,17 +26632,17 @@ var Pager_default = Pager;
|
|
|
26578
26632
|
|
|
26579
26633
|
// src/components/scrollable/HorizontalScrollable.tsx
|
|
26580
26634
|
import { ButtonBase as ButtonBase4 } from "@mui/material";
|
|
26581
|
-
import * as
|
|
26635
|
+
import * as React88 from "react";
|
|
26582
26636
|
import { jsx as jsx156, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26583
26637
|
var HorizontalScrollable = ({
|
|
26584
26638
|
style: style3,
|
|
26585
26639
|
children,
|
|
26586
26640
|
stepDistance = 200
|
|
26587
26641
|
}) => {
|
|
26588
|
-
const horizontalContainerRef =
|
|
26589
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26590
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26591
|
-
|
|
26642
|
+
const horizontalContainerRef = React88.useRef(null);
|
|
26643
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React88.useState(true);
|
|
26644
|
+
const [isRightArrowHidden, setRightArrowHidden] = React88.useState(true);
|
|
26645
|
+
React88.useEffect(() => {
|
|
26592
26646
|
if (!horizontalContainerRef.current) {
|
|
26593
26647
|
return;
|
|
26594
26648
|
}
|
|
@@ -26693,7 +26747,7 @@ var HorizontalScrollable = ({
|
|
|
26693
26747
|
var HorizontalScrollable_default = HorizontalScrollable;
|
|
26694
26748
|
|
|
26695
26749
|
// src/components/scrollable/Carousel.tsx
|
|
26696
|
-
import * as
|
|
26750
|
+
import * as React89 from "react";
|
|
26697
26751
|
import { jsx as jsx157, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26698
26752
|
var buttonStyles = {
|
|
26699
26753
|
color: grey800,
|
|
@@ -26713,23 +26767,23 @@ function Carousel({
|
|
|
26713
26767
|
padding: padding2 = 8,
|
|
26714
26768
|
alignment = "left"
|
|
26715
26769
|
}) {
|
|
26716
|
-
const rootRef =
|
|
26717
|
-
const containerRef =
|
|
26718
|
-
const previousClientWidth =
|
|
26719
|
-
const isScrolling =
|
|
26720
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26721
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26722
|
-
const [paddingElement, setPaddingElement] =
|
|
26723
|
-
const [visibleCount, setVisibleCount] =
|
|
26724
|
-
const showedElementsRef =
|
|
26725
|
-
const updateArrows =
|
|
26770
|
+
const rootRef = React89.useRef(null);
|
|
26771
|
+
const containerRef = React89.useRef(null);
|
|
26772
|
+
const previousClientWidth = React89.useRef(null);
|
|
26773
|
+
const isScrolling = React89.useRef(false);
|
|
26774
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React89.useState(true);
|
|
26775
|
+
const [isRightArrowHidden, setRightArrowHidden] = React89.useState(true);
|
|
26776
|
+
const [paddingElement, setPaddingElement] = React89.useState();
|
|
26777
|
+
const [visibleCount, setVisibleCount] = React89.useState();
|
|
26778
|
+
const showedElementsRef = React89.useRef(void 0);
|
|
26779
|
+
const updateArrows = React89.useCallback(() => {
|
|
26726
26780
|
if (!showedElementsRef.current) {
|
|
26727
26781
|
return;
|
|
26728
26782
|
}
|
|
26729
26783
|
setLeftArrowHidden(showedElementsRef.current.start === 0);
|
|
26730
26784
|
setRightArrowHidden(showedElementsRef.current.end === items.length - 1);
|
|
26731
26785
|
}, [items.length]);
|
|
26732
|
-
const getUsableWidth =
|
|
26786
|
+
const getUsableWidth = React89.useCallback(
|
|
26733
26787
|
(el) => {
|
|
26734
26788
|
let current = el;
|
|
26735
26789
|
while (current) {
|
|
@@ -26743,7 +26797,7 @@ function Carousel({
|
|
|
26743
26797
|
},
|
|
26744
26798
|
[]
|
|
26745
26799
|
);
|
|
26746
|
-
const resetCarousel =
|
|
26800
|
+
const resetCarousel = React89.useCallback(
|
|
26747
26801
|
(root, container) => {
|
|
26748
26802
|
root.style.width = "";
|
|
26749
26803
|
showedElementsRef.current = void 0;
|
|
@@ -26751,7 +26805,7 @@ function Carousel({
|
|
|
26751
26805
|
},
|
|
26752
26806
|
[]
|
|
26753
26807
|
);
|
|
26754
|
-
const setMeasures =
|
|
26808
|
+
const setMeasures = React89.useCallback(
|
|
26755
26809
|
(root, container, nextElementsIndex) => {
|
|
26756
26810
|
const children = Array.from(container.children);
|
|
26757
26811
|
if (children.length === 0) {
|
|
@@ -26780,7 +26834,7 @@ function Carousel({
|
|
|
26780
26834
|
},
|
|
26781
26835
|
[alignment, gap2, getUsableWidth, items.length, padding2]
|
|
26782
26836
|
);
|
|
26783
|
-
const updateVisibleCount =
|
|
26837
|
+
const updateVisibleCount = React89.useCallback(() => {
|
|
26784
26838
|
const root = rootRef.current;
|
|
26785
26839
|
const container = containerRef.current;
|
|
26786
26840
|
if (!container || !parent) {
|
|
@@ -26827,7 +26881,7 @@ function Carousel({
|
|
|
26827
26881
|
updateArrows,
|
|
26828
26882
|
resetCarousel
|
|
26829
26883
|
]);
|
|
26830
|
-
const getInitialWidth =
|
|
26884
|
+
const getInitialWidth = React89.useCallback(
|
|
26831
26885
|
(el) => {
|
|
26832
26886
|
let current = el;
|
|
26833
26887
|
let width2 = 0;
|
|
@@ -26845,7 +26899,7 @@ function Carousel({
|
|
|
26845
26899
|
},
|
|
26846
26900
|
[]
|
|
26847
26901
|
);
|
|
26848
|
-
const resizeObserverCallback =
|
|
26902
|
+
const resizeObserverCallback = React89.useCallback(() => {
|
|
26849
26903
|
if (!rootRef.current || !containerRef.current) {
|
|
26850
26904
|
return;
|
|
26851
26905
|
}
|
|
@@ -26856,7 +26910,7 @@ function Carousel({
|
|
|
26856
26910
|
previousClientWidth.current = newClientWidth;
|
|
26857
26911
|
updateVisibleCount();
|
|
26858
26912
|
}, [getInitialWidth, updateVisibleCount]);
|
|
26859
|
-
|
|
26913
|
+
React89.useEffect(() => {
|
|
26860
26914
|
const container = containerRef.current;
|
|
26861
26915
|
if (!container) {
|
|
26862
26916
|
return;
|
|
@@ -27043,7 +27097,7 @@ import {
|
|
|
27043
27097
|
} from "notistack";
|
|
27044
27098
|
|
|
27045
27099
|
// src/components/snackbar/Snackbar.tsx
|
|
27046
|
-
import * as
|
|
27100
|
+
import * as React90 from "react";
|
|
27047
27101
|
import { SnackbarContent } from "notistack";
|
|
27048
27102
|
import { Typography as Typography4 } from "@mui/material";
|
|
27049
27103
|
import { jsx as jsx159, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -27071,7 +27125,7 @@ var iconColors = {
|
|
|
27071
27125
|
error: error300,
|
|
27072
27126
|
warning: complementary300
|
|
27073
27127
|
};
|
|
27074
|
-
var Snackbar =
|
|
27128
|
+
var Snackbar = React90.forwardRef(
|
|
27075
27129
|
function Snackbar2({
|
|
27076
27130
|
severity = "info",
|
|
27077
27131
|
message,
|
|
@@ -27083,10 +27137,10 @@ var Snackbar = React89.forwardRef(
|
|
|
27083
27137
|
identifierKey: key,
|
|
27084
27138
|
dataTestKey
|
|
27085
27139
|
}, ref) {
|
|
27086
|
-
const actionClickHandler =
|
|
27140
|
+
const actionClickHandler = React90.useCallback(() => {
|
|
27087
27141
|
onActionClick && onActionClick(key);
|
|
27088
27142
|
}, [onActionClick, key]);
|
|
27089
|
-
const closeClickHandler =
|
|
27143
|
+
const closeClickHandler = React90.useCallback(() => {
|
|
27090
27144
|
onCloseClick && onCloseClick(key);
|
|
27091
27145
|
}, [onCloseClick, key]);
|
|
27092
27146
|
return /* @__PURE__ */ jsx159(
|
|
@@ -27252,12 +27306,12 @@ var TabButton = ({
|
|
|
27252
27306
|
var TabButton_default = TabButton;
|
|
27253
27307
|
|
|
27254
27308
|
// src/components/tab/Tabs.tsx
|
|
27255
|
-
import * as
|
|
27309
|
+
import * as React92 from "react";
|
|
27256
27310
|
import MuiTabs from "@mui/material/Tabs";
|
|
27257
27311
|
|
|
27258
27312
|
// src/components/layout/SwipeableViews.tsx
|
|
27259
|
-
import * as
|
|
27260
|
-
import { useEffect as useEffect25, useRef as useRef30, useState as
|
|
27313
|
+
import * as React91 from "react";
|
|
27314
|
+
import { useEffect as useEffect25, useRef as useRef30, useState as useState37 } from "react";
|
|
27261
27315
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
27262
27316
|
var styles = {
|
|
27263
27317
|
container: {
|
|
@@ -27294,7 +27348,7 @@ function SwipeableViews({
|
|
|
27294
27348
|
const containerRef = useRef30(null);
|
|
27295
27349
|
const scrollTimeout = useRef30(null);
|
|
27296
27350
|
const scrollingMethod = useRef30("none");
|
|
27297
|
-
const [previousIndex, setPreviousIndex] =
|
|
27351
|
+
const [previousIndex, setPreviousIndex] = useState37(index);
|
|
27298
27352
|
const hideScrollAnimation = useRef30(true);
|
|
27299
27353
|
useEffect25(() => {
|
|
27300
27354
|
if (containerRef.current) {
|
|
@@ -27356,9 +27410,9 @@ function SwipeableViews({
|
|
|
27356
27410
|
);
|
|
27357
27411
|
}, 100);
|
|
27358
27412
|
},
|
|
27359
|
-
children:
|
|
27413
|
+
children: React91.Children.map(children, (child, childIndex) => {
|
|
27360
27414
|
let mountedChild = false;
|
|
27361
|
-
if (
|
|
27415
|
+
if (React91.isValidElement(child)) {
|
|
27362
27416
|
mountedChild = !!child.props.keepMounted;
|
|
27363
27417
|
}
|
|
27364
27418
|
return /* @__PURE__ */ jsx162(
|
|
@@ -27401,8 +27455,8 @@ var Tabs = ({
|
|
|
27401
27455
|
hideLineTabs = false,
|
|
27402
27456
|
backgroundScrollButtons = Colors_exports.white
|
|
27403
27457
|
}) => {
|
|
27404
|
-
const tabsRef =
|
|
27405
|
-
const [value, setValue] =
|
|
27458
|
+
const tabsRef = React92.useRef(null);
|
|
27459
|
+
const [value, setValue] = React92.useState(0);
|
|
27406
27460
|
const measureTextWidthRange = (child) => {
|
|
27407
27461
|
const walker = document.createTreeWalker(child, NodeFilter.SHOW_TEXT, {
|
|
27408
27462
|
acceptNode: (node) => node.textContent?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
|
|
@@ -27416,7 +27470,7 @@ var Tabs = ({
|
|
|
27416
27470
|
const rect = range.getBoundingClientRect();
|
|
27417
27471
|
return Math.round(rect.width);
|
|
27418
27472
|
};
|
|
27419
|
-
const waitForSmoothScrollEnd =
|
|
27473
|
+
const waitForSmoothScrollEnd = React92.useCallback(
|
|
27420
27474
|
(container, onEnd) => {
|
|
27421
27475
|
let prev = container.scrollLeft;
|
|
27422
27476
|
let idleFrames = 0;
|
|
@@ -27440,7 +27494,7 @@ var Tabs = ({
|
|
|
27440
27494
|
},
|
|
27441
27495
|
[]
|
|
27442
27496
|
);
|
|
27443
|
-
const calculateIndicatorTabWidth =
|
|
27497
|
+
const calculateIndicatorTabWidth = React92.useCallback((index) => {
|
|
27444
27498
|
if (!tabsRef.current) {
|
|
27445
27499
|
return null;
|
|
27446
27500
|
}
|
|
@@ -27459,7 +27513,7 @@ var Tabs = ({
|
|
|
27459
27513
|
indicator.style.width = `${textWidth}px`;
|
|
27460
27514
|
indicator.style.left = `${left}px`;
|
|
27461
27515
|
}, []);
|
|
27462
|
-
|
|
27516
|
+
React92.useEffect(() => {
|
|
27463
27517
|
if (!tabsRef.current) {
|
|
27464
27518
|
return;
|
|
27465
27519
|
}
|
|
@@ -27666,12 +27720,12 @@ var TableCell = ({
|
|
|
27666
27720
|
var TableCell_default = TableCell;
|
|
27667
27721
|
|
|
27668
27722
|
// src/components/table/TableCellCopy.tsx
|
|
27669
|
-
import * as
|
|
27723
|
+
import * as React93 from "react";
|
|
27670
27724
|
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
27671
27725
|
var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
27672
27726
|
const { t } = useTranslation();
|
|
27673
|
-
const [isCopied, setIsCopied] =
|
|
27674
|
-
const [showIcon, setShowIcon] =
|
|
27727
|
+
const [isCopied, setIsCopied] = React93.useState(false);
|
|
27728
|
+
const [showIcon, setShowIcon] = React93.useState(false);
|
|
27675
27729
|
const manageButtonClicked = () => {
|
|
27676
27730
|
void navigator.clipboard.writeText(textToCopy ?? text);
|
|
27677
27731
|
if (isCopied) {
|
|
@@ -27806,9 +27860,9 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
|
|
|
27806
27860
|
|
|
27807
27861
|
// src/components/toolbar/ToolbarBreadcrumbButton.tsx
|
|
27808
27862
|
import { ButtonBase as ButtonBase5 } from "@mui/material";
|
|
27809
|
-
import * as
|
|
27863
|
+
import * as React94 from "react";
|
|
27810
27864
|
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
27811
|
-
var ToolbarBreadcrumbButton =
|
|
27865
|
+
var ToolbarBreadcrumbButton = React94.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
|
|
27812
27866
|
return /* @__PURE__ */ jsx175(
|
|
27813
27867
|
ButtonBase5,
|
|
27814
27868
|
{
|
|
@@ -27920,20 +27974,20 @@ var Toolbar = ({
|
|
|
27920
27974
|
var Toolbar_default = Toolbar;
|
|
27921
27975
|
|
|
27922
27976
|
// src/components/toolbar/ToolbarTitle.tsx
|
|
27923
|
-
import * as
|
|
27924
|
-
import { useState as
|
|
27977
|
+
import * as React95 from "react";
|
|
27978
|
+
import { useState as useState40 } from "react";
|
|
27925
27979
|
import { jsx as jsx177, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
27926
|
-
var ToolbarTitle =
|
|
27980
|
+
var ToolbarTitle = React95.forwardRef(function ToolbarTitle2({
|
|
27927
27981
|
title,
|
|
27928
27982
|
align = "left",
|
|
27929
27983
|
className,
|
|
27930
27984
|
hoverActions,
|
|
27931
27985
|
color: color2 = grey900
|
|
27932
27986
|
}, ref) {
|
|
27933
|
-
const textElementRef =
|
|
27987
|
+
const textElementRef = React95.useRef(
|
|
27934
27988
|
null
|
|
27935
27989
|
);
|
|
27936
|
-
const [showHoverActions, setShowHoverActions] =
|
|
27990
|
+
const [showHoverActions, setShowHoverActions] = useState40(false);
|
|
27937
27991
|
return /* @__PURE__ */ jsx177(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx177(
|
|
27938
27992
|
TextEllipsisTooltip_default,
|
|
27939
27993
|
{
|
|
@@ -28174,7 +28228,7 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
28174
28228
|
var WidgetTitle_default = WidgetTitle;
|
|
28175
28229
|
|
|
28176
28230
|
// src/components/window/MinimizableWindow.tsx
|
|
28177
|
-
import * as
|
|
28231
|
+
import * as React96 from "react";
|
|
28178
28232
|
import { Fragment as Fragment42, jsx as jsx182, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
28179
28233
|
var sizes6 = {
|
|
28180
28234
|
M: 400,
|
|
@@ -28200,7 +28254,7 @@ var iconButtonsStyles = {
|
|
|
28200
28254
|
backgroundColor: "rgba(255, 255, 255, 0.2)"
|
|
28201
28255
|
}
|
|
28202
28256
|
};
|
|
28203
|
-
var MinimizableWindow =
|
|
28257
|
+
var MinimizableWindow = React96.forwardRef(function MinimizableWindow2({
|
|
28204
28258
|
children,
|
|
28205
28259
|
title,
|
|
28206
28260
|
size = "M",
|
|
@@ -28220,17 +28274,17 @@ var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
|
28220
28274
|
onBack
|
|
28221
28275
|
}, ref) {
|
|
28222
28276
|
const { t } = useTranslation();
|
|
28223
|
-
const overlayRef =
|
|
28224
|
-
const windowRef =
|
|
28225
|
-
const headerRef =
|
|
28226
|
-
const [isDraggingState, setIsDraggingState] =
|
|
28227
|
-
const diffRef =
|
|
28228
|
-
|
|
28277
|
+
const overlayRef = React96.useRef(null);
|
|
28278
|
+
const windowRef = React96.useRef(null);
|
|
28279
|
+
const headerRef = React96.useRef(null);
|
|
28280
|
+
const [isDraggingState, setIsDraggingState] = React96.useState(false);
|
|
28281
|
+
const diffRef = React96.useRef({ x: 0, y: 0 });
|
|
28282
|
+
React96.useImperativeHandle(ref, () => ({
|
|
28229
28283
|
window: windowRef.current,
|
|
28230
28284
|
header: headerRef.current,
|
|
28231
28285
|
overlay: overlayRef.current
|
|
28232
28286
|
}));
|
|
28233
|
-
|
|
28287
|
+
React96.useEffect(() => {
|
|
28234
28288
|
if (open) {
|
|
28235
28289
|
overlayRef.current?.style.removeProperty("transform");
|
|
28236
28290
|
overlayRef.current?.style.removeProperty("opacity");
|
|
@@ -28458,31 +28512,31 @@ var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
|
28458
28512
|
var MinimizableWindow_default = MinimizableWindow;
|
|
28459
28513
|
|
|
28460
28514
|
// src/hooks/useFormatters.ts
|
|
28461
|
-
import { useCallback as
|
|
28515
|
+
import { useCallback as useCallback24, useContext as useContext16 } from "react";
|
|
28462
28516
|
var useFormatters = () => {
|
|
28463
28517
|
const { locale, currency, timezone } = useContext16(IntlContext);
|
|
28464
28518
|
return {
|
|
28465
|
-
formatCompactNumber:
|
|
28519
|
+
formatCompactNumber: useCallback24(
|
|
28466
28520
|
(value) => formatCompactNumber(value, locale),
|
|
28467
28521
|
[locale]
|
|
28468
28522
|
),
|
|
28469
|
-
formatNumber:
|
|
28523
|
+
formatNumber: useCallback24(
|
|
28470
28524
|
(value, fractionSize) => formatNumber(value, locale, fractionSize),
|
|
28471
28525
|
[locale]
|
|
28472
28526
|
),
|
|
28473
|
-
formatPercentage:
|
|
28527
|
+
formatPercentage: useCallback24(
|
|
28474
28528
|
(value, fractionSize) => formatPercentage(value, locale, fractionSize),
|
|
28475
28529
|
[locale]
|
|
28476
28530
|
),
|
|
28477
|
-
formatCurrency:
|
|
28531
|
+
formatCurrency: useCallback24(
|
|
28478
28532
|
(value, notation) => formatCurrency(value, locale, currency, notation),
|
|
28479
28533
|
[currency, locale]
|
|
28480
28534
|
),
|
|
28481
|
-
formatDate:
|
|
28535
|
+
formatDate: useCallback24(
|
|
28482
28536
|
(date, format2) => formatDate(date, locale, timezone, format2),
|
|
28483
28537
|
[locale, timezone]
|
|
28484
28538
|
),
|
|
28485
|
-
formatPhone:
|
|
28539
|
+
formatPhone: useCallback24(
|
|
28486
28540
|
(phone, format2) => formatPhone(phone, format2),
|
|
28487
28541
|
[]
|
|
28488
28542
|
)
|