@connectif/ui-components 5.5.0 → 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 +10 -0
- package/dist/components/input/UploadClickableArea.d.ts +5 -1
- package/dist/index.js +281 -234
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
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(
|
|
@@ -21266,7 +21265,7 @@ var BootstrapInput = styled7(InputBase, {
|
|
|
21266
21265
|
backgroundColor: palette2.grey[50],
|
|
21267
21266
|
".MuiSelect-select": {
|
|
21268
21267
|
color: palette2.grey[500],
|
|
21269
|
-
|
|
21268
|
+
WebkitTextFillColor: palette2.grey[500],
|
|
21270
21269
|
span: {
|
|
21271
21270
|
color: "inherit !important"
|
|
21272
21271
|
}
|
|
@@ -22017,42 +22016,90 @@ var normalizeBlack = (color2) => {
|
|
|
22017
22016
|
};
|
|
22018
22017
|
|
|
22019
22018
|
// src/components/input/UploadClickableArea.tsx
|
|
22019
|
+
import * as React64 from "react";
|
|
22020
22020
|
import { Box as Box3 } from "@mui/material";
|
|
22021
22021
|
import { jsx as jsx119, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
22022
22022
|
var UploadClickableArea = ({
|
|
22023
22023
|
accept,
|
|
22024
22024
|
onFilesChanged,
|
|
22025
|
-
children
|
|
22026
|
-
|
|
22027
|
-
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
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);
|
|
22033
22038
|
},
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
|
|
22040
|
-
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
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
|
+
};
|
|
22048
22095
|
var UploadClickableArea_default = UploadClickableArea;
|
|
22049
22096
|
|
|
22050
22097
|
// src/components/input/categorized-picker/CategorizedPicker.tsx
|
|
22051
|
-
import
|
|
22098
|
+
import React67 from "react";
|
|
22052
22099
|
import { Grid as Grid3, Popover as Popover2, Select as Select3, Stack as Stack11 } from "@mui/material";
|
|
22053
22100
|
|
|
22054
22101
|
// src/components/input/categorized-picker/CategorizedPickerOptionItem.tsx
|
|
22055
|
-
import * as
|
|
22102
|
+
import * as React65 from "react";
|
|
22056
22103
|
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
22057
22104
|
var CategorizedPickerOptionItem = function CategorizedPickerOptionItem2({
|
|
22058
22105
|
option,
|
|
@@ -22063,8 +22110,8 @@ var CategorizedPickerOptionItem = function CategorizedPickerOptionItem2({
|
|
|
22063
22110
|
onSelect,
|
|
22064
22111
|
onScrollToItem
|
|
22065
22112
|
}) {
|
|
22066
|
-
const itemRef =
|
|
22067
|
-
|
|
22113
|
+
const itemRef = React65.useRef(null);
|
|
22114
|
+
React65.useEffect(() => {
|
|
22068
22115
|
if (selectedId === option.id && itemRef.current) {
|
|
22069
22116
|
onScrollToItem(itemRef.current);
|
|
22070
22117
|
}
|
|
@@ -22137,7 +22184,7 @@ var CategorizedPickerSubcategoryItem = function CategorizedPickerSubcategoryItem
|
|
|
22137
22184
|
var CategorizedPickerSubcategoryItem_default = CategorizedPickerSubcategoryItem;
|
|
22138
22185
|
|
|
22139
22186
|
// src/components/input/categorized-picker/CategorizedPickerGroupItem.tsx
|
|
22140
|
-
import * as
|
|
22187
|
+
import * as React66 from "react";
|
|
22141
22188
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
22142
22189
|
var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
22143
22190
|
option,
|
|
@@ -22148,7 +22195,7 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22148
22195
|
onSelect,
|
|
22149
22196
|
onScrollToItem
|
|
22150
22197
|
}) {
|
|
22151
|
-
const [isCollapsed, setCollapsed] =
|
|
22198
|
+
const [isCollapsed, setCollapsed] = React66.useState(
|
|
22152
22199
|
!searchText && !option.options.some(
|
|
22153
22200
|
(opt) => opt.categorizedPickerItemType === "option" && opt.id === selectedId
|
|
22154
22201
|
)
|
|
@@ -22421,13 +22468,13 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22421
22468
|
onChange
|
|
22422
22469
|
}) {
|
|
22423
22470
|
const { t } = useTranslation();
|
|
22424
|
-
const categoryRefs =
|
|
22471
|
+
const categoryRefs = React67.useRef(
|
|
22425
22472
|
{}
|
|
22426
22473
|
);
|
|
22427
|
-
const anchorRef =
|
|
22428
|
-
const [open, setOpen] =
|
|
22429
|
-
const [search, setSearch] =
|
|
22430
|
-
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(
|
|
22431
22478
|
() => categories.map((category) => ({
|
|
22432
22479
|
...category,
|
|
22433
22480
|
categoryOptions: options.filter(category.filter)
|
|
@@ -22436,30 +22483,30 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22436
22483
|
),
|
|
22437
22484
|
[categories, options]
|
|
22438
22485
|
);
|
|
22439
|
-
const [filteredCategories, setFilteredCategories] =
|
|
22440
|
-
const getDefaultSelectedCategory =
|
|
22486
|
+
const [filteredCategories, setFilteredCategories] = React67.useState(unfilteredCategories);
|
|
22487
|
+
const getDefaultSelectedCategory = React67.useCallback(
|
|
22441
22488
|
() => filteredCategories.find(
|
|
22442
22489
|
(category) => category.categoryOptions.some((option) => option.id === value?.id)
|
|
22443
22490
|
),
|
|
22444
22491
|
[filteredCategories, value]
|
|
22445
22492
|
);
|
|
22446
|
-
const [selectedCategory, setSelectedCategory] =
|
|
22447
|
-
const onTypeSearch =
|
|
22493
|
+
const [selectedCategory, setSelectedCategory] = React67.useState(getDefaultSelectedCategory());
|
|
22494
|
+
const onTypeSearch = React67.useCallback(
|
|
22448
22495
|
(event) => {
|
|
22449
22496
|
setSearch(event.target.value);
|
|
22450
22497
|
},
|
|
22451
22498
|
[]
|
|
22452
22499
|
);
|
|
22453
|
-
const openPopover =
|
|
22500
|
+
const openPopover = React67.useCallback(() => {
|
|
22454
22501
|
setOpen(true);
|
|
22455
22502
|
setSearch("");
|
|
22456
22503
|
setSelectedCategory(getDefaultSelectedCategory());
|
|
22457
22504
|
onOpen?.();
|
|
22458
22505
|
}, [getDefaultSelectedCategory, onOpen]);
|
|
22459
|
-
const closePopover =
|
|
22506
|
+
const closePopover = React67.useCallback(() => {
|
|
22460
22507
|
setOpen(false);
|
|
22461
22508
|
}, []);
|
|
22462
|
-
|
|
22509
|
+
React67.useEffect(() => {
|
|
22463
22510
|
const tokens = search.split(",").map((s) => s.trim()).filter((s) => !!s);
|
|
22464
22511
|
if (tokens.length === 0) {
|
|
22465
22512
|
setFilteredCategories(unfilteredCategories);
|
|
@@ -22489,7 +22536,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22489
22536
|
}).filter((category) => !!category);
|
|
22490
22537
|
setFilteredCategories(nextCategories);
|
|
22491
22538
|
}, [categories, options, search, unfilteredCategories]);
|
|
22492
|
-
|
|
22539
|
+
React67.useEffect(() => {
|
|
22493
22540
|
const filteredSelectedCategory = selectedCategory && filteredCategories.find(
|
|
22494
22541
|
(category) => category.name === selectedCategory.name
|
|
22495
22542
|
);
|
|
@@ -22696,12 +22743,12 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22696
22743
|
var CategorizedPicker_default = CategorizedPicker;
|
|
22697
22744
|
|
|
22698
22745
|
// src/components/input/ItemSelector.tsx
|
|
22699
|
-
import * as
|
|
22746
|
+
import * as React69 from "react";
|
|
22700
22747
|
|
|
22701
22748
|
// src/components/input/SelectPopover.tsx
|
|
22702
|
-
import * as
|
|
22749
|
+
import * as React68 from "react";
|
|
22703
22750
|
import { Grid as Grid4, Stack as Stack12 } from "@mui/material";
|
|
22704
|
-
import { useState as
|
|
22751
|
+
import { useState as useState26 } from "react";
|
|
22705
22752
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
22706
22753
|
import { jsx as jsx127, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
22707
22754
|
var defaultItemsColorStyles = {
|
|
@@ -22735,11 +22782,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22735
22782
|
paddingContent
|
|
22736
22783
|
}) {
|
|
22737
22784
|
const { t } = useTranslation();
|
|
22738
|
-
const [searchText, setSearchText] =
|
|
22739
|
-
const [isScrollBottom, setIsScrollBottom] =
|
|
22740
|
-
const [currentItems, setCurrentItems] =
|
|
22741
|
-
const [currentSelectedItems, setCurrentSelectedItems] =
|
|
22742
|
-
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([]);
|
|
22743
22790
|
const onSearchTextChanged = (text) => {
|
|
22744
22791
|
onSearch(text);
|
|
22745
22792
|
setSearchText(text);
|
|
@@ -22751,7 +22798,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22751
22798
|
}
|
|
22752
22799
|
setCurrentSelectedItems(selectedItemsIds);
|
|
22753
22800
|
};
|
|
22754
|
-
|
|
22801
|
+
React68.useEffect(() => {
|
|
22755
22802
|
const prevSelectedItemsIds = prevSelectedItemsIdsRef.current;
|
|
22756
22803
|
if (keepCurrentSelectionOnSearch && anchorEl) {
|
|
22757
22804
|
let nextSelectedItems = currentSelectedItems;
|
|
@@ -23057,16 +23104,16 @@ var ItemSelector = function ItemSelector2({
|
|
|
23057
23104
|
onSearch,
|
|
23058
23105
|
onClose
|
|
23059
23106
|
}) {
|
|
23060
|
-
const [anchorEl, setAnchorEl] =
|
|
23061
|
-
const [searchText, setSearchText] =
|
|
23062
|
-
const allShownItemsRef =
|
|
23063
|
-
const selectRef =
|
|
23064
|
-
|
|
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(() => {
|
|
23065
23112
|
if (anchorEl) {
|
|
23066
23113
|
onSearch(searchText);
|
|
23067
23114
|
}
|
|
23068
23115
|
}, [anchorEl, onSearch, searchText]);
|
|
23069
|
-
|
|
23116
|
+
React69.useEffect(() => {
|
|
23070
23117
|
const allShownItems = allShownItemsRef.current;
|
|
23071
23118
|
allShownItemsRef.current = allShownItems.concat(
|
|
23072
23119
|
items.filter(
|
|
@@ -23312,7 +23359,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
23312
23359
|
var ItemSelector_default = ItemSelector;
|
|
23313
23360
|
|
|
23314
23361
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
23315
|
-
import * as
|
|
23362
|
+
import * as React73 from "react";
|
|
23316
23363
|
|
|
23317
23364
|
// src/utils/RegExpUtils.ts
|
|
23318
23365
|
var map = {
|
|
@@ -23326,10 +23373,10 @@ var map = {
|
|
|
23326
23373
|
var toDiacriticInsensitiveString = (input) => Array.from(input).map((char) => map[char] ? `[${map[char]}]` : char).join("");
|
|
23327
23374
|
|
|
23328
23375
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23329
|
-
import * as
|
|
23376
|
+
import * as React71 from "react";
|
|
23330
23377
|
|
|
23331
23378
|
// src/components/input/autocomplete/AutocompleteInputSelection.tsx
|
|
23332
|
-
import * as
|
|
23379
|
+
import * as React70 from "react";
|
|
23333
23380
|
import { jsx as jsx129, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
23334
23381
|
var AUTOCOMPLETE_PADDING_RIGHT = 6;
|
|
23335
23382
|
var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
@@ -23342,7 +23389,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
23342
23389
|
onRemoveValue
|
|
23343
23390
|
}) {
|
|
23344
23391
|
const { palette: palette2 } = useCustomTheme();
|
|
23345
|
-
const stackRef =
|
|
23392
|
+
const stackRef = React70.useRef(null);
|
|
23346
23393
|
return /* @__PURE__ */ jsxs60(
|
|
23347
23394
|
Stack_default,
|
|
23348
23395
|
{
|
|
@@ -23446,7 +23493,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23446
23493
|
}) {
|
|
23447
23494
|
const { palette: palette2 } = useCustomTheme();
|
|
23448
23495
|
const { t } = useTranslation();
|
|
23449
|
-
const [isHover, setIsHover] =
|
|
23496
|
+
const [isHover, setIsHover] = React71.useState(false);
|
|
23450
23497
|
const dirty = !!inputValue || Array.isArray(value) && value.length > 0 || !Array.isArray(value) && !!value;
|
|
23451
23498
|
const showClearButton = !disabled && dirty && !disableClear && (isOpenPopover || isHover);
|
|
23452
23499
|
return /* @__PURE__ */ jsx130(Fragment30, { children: /* @__PURE__ */ jsx130(
|
|
@@ -23619,7 +23666,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23619
23666
|
var AutocompleteInput_default = AutocompleteInput;
|
|
23620
23667
|
|
|
23621
23668
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23622
|
-
import * as
|
|
23669
|
+
import * as React72 from "react";
|
|
23623
23670
|
import { Popper as Popper2, ClickAwayListener } from "@mui/material";
|
|
23624
23671
|
import { FixedSizeList as FixedSizeList3 } from "react-window";
|
|
23625
23672
|
import AutoSizer5 from "react-virtualized-auto-sizer";
|
|
@@ -23664,7 +23711,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23664
23711
|
}) {
|
|
23665
23712
|
const { palette: palette2 } = useCustomTheme();
|
|
23666
23713
|
const { t } = useTranslation();
|
|
23667
|
-
const listRef =
|
|
23714
|
+
const listRef = React72.useRef(null);
|
|
23668
23715
|
const getText = (option) => {
|
|
23669
23716
|
const isInOptions = options.some((elem) => elem.id === option.id);
|
|
23670
23717
|
if (!isInOptions) {
|
|
@@ -23810,15 +23857,15 @@ var Autocomplete = function Autocomplete2({
|
|
|
23810
23857
|
onOpen = () => ({}),
|
|
23811
23858
|
disableClear
|
|
23812
23859
|
}) {
|
|
23813
|
-
const anchorRef =
|
|
23814
|
-
const inputRef =
|
|
23815
|
-
const [placeholder, setPlaceholder] =
|
|
23860
|
+
const anchorRef = React73.useRef(null);
|
|
23861
|
+
const inputRef = React73.useRef(null);
|
|
23862
|
+
const [placeholder, setPlaceholder] = React73.useState(
|
|
23816
23863
|
textFieldProps?.placeholder || ""
|
|
23817
23864
|
);
|
|
23818
|
-
const _renderLabel =
|
|
23819
|
-
const [inputValue, setInputValue] =
|
|
23820
|
-
const [isDirty, setDirty] =
|
|
23821
|
-
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(
|
|
23822
23869
|
(options2, inputValue2 = "") => {
|
|
23823
23870
|
const searchValue = escapeRegExp2(inputValue2.trim());
|
|
23824
23871
|
const regExp = new RegExp(
|
|
@@ -23849,7 +23896,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23849
23896
|
renderLabel
|
|
23850
23897
|
]
|
|
23851
23898
|
);
|
|
23852
|
-
const getAllowFreeTextOption =
|
|
23899
|
+
const getAllowFreeTextOption = React73.useCallback(
|
|
23853
23900
|
(inputValue2) => {
|
|
23854
23901
|
if (allowFreeText) {
|
|
23855
23902
|
const freeOption = {
|
|
@@ -23867,27 +23914,27 @@ var Autocomplete = function Autocomplete2({
|
|
|
23867
23914
|
},
|
|
23868
23915
|
[_renderLabel, allowFreeText, options, renderLabel]
|
|
23869
23916
|
);
|
|
23870
|
-
const [filteredOptions, setFilteredOptions] =
|
|
23871
|
-
const virtualListRef =
|
|
23872
|
-
const [isOpenPopover, setOpenPopover] =
|
|
23917
|
+
const [filteredOptions, setFilteredOptions] = React73.useState(getOptionsLabeled([...options]));
|
|
23918
|
+
const virtualListRef = React73.createRef();
|
|
23919
|
+
const [isOpenPopover, setOpenPopover] = React73.useState(false);
|
|
23873
23920
|
const getSelectedIndexEmpty = () => multiple ? [] : void 0;
|
|
23874
|
-
const [selectedIndex, setSelectedIndex] =
|
|
23875
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
23876
|
-
|
|
23921
|
+
const [selectedIndex, setSelectedIndex] = React73.useState(getSelectedIndexEmpty());
|
|
23922
|
+
const [highlightedIndex, setHighlightedIndex] = React73.useState(-1);
|
|
23923
|
+
React73.useEffect(() => {
|
|
23877
23924
|
setFilteredOptions(getOptionsLabeled([...options]));
|
|
23878
23925
|
}, [options]);
|
|
23879
23926
|
const canAddValues = maxValues === void 0 || maxValues === 0 || !!multiple && Array.isArray(value) && value.length < maxValues;
|
|
23880
|
-
|
|
23927
|
+
React73.useEffect(() => {
|
|
23881
23928
|
if (disabled) {
|
|
23882
23929
|
setOpenPopover(false);
|
|
23883
23930
|
}
|
|
23884
23931
|
}, [disabled]);
|
|
23885
|
-
|
|
23932
|
+
React73.useEffect(() => {
|
|
23886
23933
|
if (!canAddValues && isOpenPopover) {
|
|
23887
23934
|
closePopover();
|
|
23888
23935
|
}
|
|
23889
23936
|
}, [canAddValues, isOpenPopover]);
|
|
23890
|
-
const getLastSelectedIndex =
|
|
23937
|
+
const getLastSelectedIndex = React73.useCallback(() => {
|
|
23891
23938
|
if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
|
|
23892
23939
|
return selectedIndex[selectedIndex.length - 1];
|
|
23893
23940
|
} else if (typeof selectedIndex === "number") {
|
|
@@ -23895,7 +23942,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23895
23942
|
}
|
|
23896
23943
|
return void 0;
|
|
23897
23944
|
}, [selectedIndex]);
|
|
23898
|
-
|
|
23945
|
+
React73.useEffect(() => {
|
|
23899
23946
|
if (isOpenPopover) {
|
|
23900
23947
|
if (highlightedIndex > -1) {
|
|
23901
23948
|
virtualListRef.current?.scrollToItem(highlightedIndex);
|
|
@@ -24167,7 +24214,7 @@ function elementIsDescendantOrEqual(parent2, descendant) {
|
|
|
24167
24214
|
}
|
|
24168
24215
|
|
|
24169
24216
|
// src/components/input/TextEditor.tsx
|
|
24170
|
-
import
|
|
24217
|
+
import React76 from "react";
|
|
24171
24218
|
import { Editor } from "@tinymce/tinymce-react";
|
|
24172
24219
|
import "tinymce/tinymce";
|
|
24173
24220
|
import "tinymce/models/dom/model";
|
|
@@ -24188,10 +24235,10 @@ import "tinymce/plugins/wordcount";
|
|
|
24188
24235
|
import "tinymce/plugins/emoticons/js/emojis";
|
|
24189
24236
|
|
|
24190
24237
|
// src/components/input/CodeEditorPopup.tsx
|
|
24191
|
-
import
|
|
24238
|
+
import React75 from "react";
|
|
24192
24239
|
|
|
24193
24240
|
// src/components/input/CodeEditor.tsx
|
|
24194
|
-
import
|
|
24241
|
+
import React74 from "react";
|
|
24195
24242
|
import CodeMirror, {
|
|
24196
24243
|
EditorView
|
|
24197
24244
|
} from "@uiw/react-codemirror";
|
|
@@ -24234,7 +24281,7 @@ var CodeEditor = function CodeEditor2({
|
|
|
24234
24281
|
}
|
|
24235
24282
|
);
|
|
24236
24283
|
};
|
|
24237
|
-
var CodeEditor_default =
|
|
24284
|
+
var CodeEditor_default = React74.forwardRef(CodeEditor);
|
|
24238
24285
|
|
|
24239
24286
|
// src/components/input/CodeEditorPopup.tsx
|
|
24240
24287
|
import format from "html-format";
|
|
@@ -24254,9 +24301,9 @@ var CodeEditorPopup = ({
|
|
|
24254
24301
|
onCancel
|
|
24255
24302
|
}) => {
|
|
24256
24303
|
const { t } = useTranslation();
|
|
24257
|
-
const [valueModified, setValueModified] =
|
|
24258
|
-
const [hasErrors, setHasErrors] =
|
|
24259
|
-
|
|
24304
|
+
const [valueModified, setValueModified] = React75.useState(value);
|
|
24305
|
+
const [hasErrors, setHasErrors] = React75.useState(false);
|
|
24306
|
+
React75.useEffect(() => {
|
|
24260
24307
|
if (open) {
|
|
24261
24308
|
setValueModified(value);
|
|
24262
24309
|
}
|
|
@@ -24486,15 +24533,15 @@ var TextEditor = function TextEditor2({
|
|
|
24486
24533
|
...rest
|
|
24487
24534
|
}) {
|
|
24488
24535
|
const { t } = useTranslation();
|
|
24489
|
-
const editorRef =
|
|
24490
|
-
const [internalValue] =
|
|
24536
|
+
const editorRef = React76.useRef(null);
|
|
24537
|
+
const [internalValue] = React76.useState(
|
|
24491
24538
|
initialValue ?? t("TEXT_EDITOR.INITIAL_VALUE")
|
|
24492
24539
|
);
|
|
24493
|
-
const [contentValue, setContentValue] =
|
|
24494
|
-
const [codeEditorChanges, setCodeEditorChanges] =
|
|
24495
|
-
const [isCodeEditorDirty, setIsCodeEditorDirty] =
|
|
24496
|
-
const [isCodeEditorOpened, setIsCodeEditorOpened] =
|
|
24497
|
-
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);
|
|
24498
24545
|
const codeEditorButtonIndexToUse = codeEditorButtonIndex ?? customToolbarGroups.insert?.items?.length ?? DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.length;
|
|
24499
24546
|
const defaultToolbarInsertMenuItemsWithCodeEditor = DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.slice();
|
|
24500
24547
|
defaultToolbarInsertMenuItemsWithCodeEditor.splice(
|
|
@@ -24508,12 +24555,12 @@ var TextEditor = function TextEditor2({
|
|
|
24508
24555
|
0,
|
|
24509
24556
|
"cnCodeEditor"
|
|
24510
24557
|
);
|
|
24511
|
-
const onTextChange =
|
|
24558
|
+
const onTextChange = React76.useCallback(() => {
|
|
24512
24559
|
if (editorRef.current) {
|
|
24513
24560
|
onChange(editorRef.current?.getContent());
|
|
24514
24561
|
}
|
|
24515
24562
|
}, [onChange]);
|
|
24516
|
-
const onTextEditorDirty =
|
|
24563
|
+
const onTextEditorDirty = React76.useCallback(
|
|
24517
24564
|
(textEditorDirty) => {
|
|
24518
24565
|
editorRef.current?.setDirty(textEditorDirty);
|
|
24519
24566
|
setIsDirty(textEditorDirty);
|
|
@@ -24526,7 +24573,7 @@ var TextEditor = function TextEditor2({
|
|
|
24526
24573
|
},
|
|
24527
24574
|
[onDirty, onTextChange]
|
|
24528
24575
|
);
|
|
24529
|
-
|
|
24576
|
+
React76.useEffect(() => {
|
|
24530
24577
|
if (resetDirty && editorRef.current?.isDirty()) {
|
|
24531
24578
|
onTextEditorDirty(false);
|
|
24532
24579
|
}
|
|
@@ -24534,7 +24581,7 @@ var TextEditor = function TextEditor2({
|
|
|
24534
24581
|
onResetDirty();
|
|
24535
24582
|
}
|
|
24536
24583
|
}, [onResetDirty, onTextEditorDirty, resetDirty]);
|
|
24537
|
-
|
|
24584
|
+
React76.useEffect(() => {
|
|
24538
24585
|
if (newValue && editorRef.current) {
|
|
24539
24586
|
editorRef.current.setContent(newValue);
|
|
24540
24587
|
if (onNewValueSetter) {
|
|
@@ -24542,7 +24589,7 @@ var TextEditor = function TextEditor2({
|
|
|
24542
24589
|
}
|
|
24543
24590
|
}
|
|
24544
24591
|
}, [newValue, onNewValueSetter]);
|
|
24545
|
-
|
|
24592
|
+
React76.useEffect(() => {
|
|
24546
24593
|
if (forceCloseCodeEditor) {
|
|
24547
24594
|
setIsCodeEditorOpened(false);
|
|
24548
24595
|
if (onForceCloseCodeEditor) {
|
|
@@ -24789,10 +24836,10 @@ var TextEditor = function TextEditor2({
|
|
|
24789
24836
|
var TextEditor_default = TextEditor;
|
|
24790
24837
|
|
|
24791
24838
|
// src/components/input/PhoneField.tsx
|
|
24792
|
-
import * as
|
|
24839
|
+
import * as React77 from "react";
|
|
24793
24840
|
import { Fragment as Fragment35, jsx as jsx136, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24794
24841
|
var maxPhoneLengthWithPrefix = 16;
|
|
24795
|
-
var PhoneField =
|
|
24842
|
+
var PhoneField = React77.forwardRef(function PhoneField2({
|
|
24796
24843
|
value,
|
|
24797
24844
|
onChange,
|
|
24798
24845
|
defaultCountryCode = "34",
|
|
@@ -24800,20 +24847,20 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24800
24847
|
codeSelectProps,
|
|
24801
24848
|
...rest
|
|
24802
24849
|
}, ref) {
|
|
24803
|
-
const [countryCode, setCountryCode] =
|
|
24804
|
-
const [textValue, setTextValue] =
|
|
24805
|
-
const countryCodeOptions =
|
|
24850
|
+
const [countryCode, setCountryCode] = React77.useState(defaultCountryCode);
|
|
24851
|
+
const [textValue, setTextValue] = React77.useState("");
|
|
24852
|
+
const countryCodeOptions = React77.useMemo(
|
|
24806
24853
|
() => allCountries.map((c) => ({
|
|
24807
24854
|
value: c.countryCode,
|
|
24808
24855
|
label: `+${c.countryCode} ${c.name}`
|
|
24809
24856
|
})),
|
|
24810
24857
|
[]
|
|
24811
24858
|
);
|
|
24812
|
-
const sanitizeTextValue =
|
|
24859
|
+
const sanitizeTextValue = React77.useCallback(
|
|
24813
24860
|
(value2) => value2.replace(/[^\d]/g, ""),
|
|
24814
24861
|
[]
|
|
24815
24862
|
);
|
|
24816
|
-
const onChangeText =
|
|
24863
|
+
const onChangeText = React77.useCallback(
|
|
24817
24864
|
(event) => {
|
|
24818
24865
|
const sanitizedTextValue = sanitizeTextValue(
|
|
24819
24866
|
event.target.value
|
|
@@ -24827,7 +24874,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24827
24874
|
},
|
|
24828
24875
|
[countryCode, onChange, sanitizeTextValue, textValue]
|
|
24829
24876
|
);
|
|
24830
|
-
const onChangeCountryCode =
|
|
24877
|
+
const onChangeCountryCode = React77.useCallback(
|
|
24831
24878
|
(countryCode2) => {
|
|
24832
24879
|
const sanitizedTextValue = sanitizeTextValue(textValue).substring(
|
|
24833
24880
|
0,
|
|
@@ -24843,7 +24890,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24843
24890
|
},
|
|
24844
24891
|
[onChange, sanitizeTextValue, textValue]
|
|
24845
24892
|
);
|
|
24846
|
-
|
|
24893
|
+
React77.useEffect(() => {
|
|
24847
24894
|
const countryCode2 = getCountryCode(value);
|
|
24848
24895
|
if (!countryCode2) {
|
|
24849
24896
|
setTextValue("");
|
|
@@ -24888,7 +24935,7 @@ var PhoneField = React76.forwardRef(function PhoneField2({
|
|
|
24888
24935
|
var PhoneField_default = PhoneField;
|
|
24889
24936
|
|
|
24890
24937
|
// src/components/input/NumberField.tsx
|
|
24891
|
-
import * as
|
|
24938
|
+
import * as React78 from "react";
|
|
24892
24939
|
import { jsx as jsx137, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24893
24940
|
var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
24894
24941
|
const propDescriptor = Object.getOwnPropertyDescriptor(
|
|
@@ -24905,7 +24952,7 @@ var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
|
24905
24952
|
r2.current.dispatchEvent(e);
|
|
24906
24953
|
}
|
|
24907
24954
|
};
|
|
24908
|
-
var NumberField =
|
|
24955
|
+
var NumberField = React78.forwardRef(function NumberField2({
|
|
24909
24956
|
value,
|
|
24910
24957
|
type = "integer",
|
|
24911
24958
|
onChange,
|
|
@@ -24922,16 +24969,16 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24922
24969
|
...rest
|
|
24923
24970
|
}, ref) {
|
|
24924
24971
|
const { palette: palette2 } = useCustomTheme();
|
|
24925
|
-
const inputRef =
|
|
24926
|
-
const numberToString =
|
|
24972
|
+
const inputRef = React78.useRef(null);
|
|
24973
|
+
const numberToString = React78.useCallback(
|
|
24927
24974
|
(value2) => typeof value2 === "number" && !isNaN(value2) ? fractionDigits !== 0 ? value2.toFixed(fractionDigits) : value2.toString() : "",
|
|
24928
24975
|
[fractionDigits]
|
|
24929
24976
|
);
|
|
24930
|
-
const stringToNumber =
|
|
24977
|
+
const stringToNumber = React78.useCallback(
|
|
24931
24978
|
(value2) => !value2 || isNaN(+value2) ? null : +value2,
|
|
24932
24979
|
[]
|
|
24933
24980
|
);
|
|
24934
|
-
const sanitizeDecimalTextValue =
|
|
24981
|
+
const sanitizeDecimalTextValue = React78.useCallback(
|
|
24935
24982
|
(value2) => {
|
|
24936
24983
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24937
24984
|
const numbersAndDots = value2.replace(/[^\d.]/g, "");
|
|
@@ -24943,7 +24990,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24943
24990
|
},
|
|
24944
24991
|
[fractionDigits]
|
|
24945
24992
|
);
|
|
24946
|
-
const sanitizeIntegerTextValue =
|
|
24993
|
+
const sanitizeIntegerTextValue = React78.useCallback(
|
|
24947
24994
|
(value2) => {
|
|
24948
24995
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24949
24996
|
const numbers = value2.replace(/[^\d]/g, "");
|
|
@@ -24951,7 +24998,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24951
24998
|
},
|
|
24952
24999
|
[]
|
|
24953
25000
|
);
|
|
24954
|
-
const _onChange =
|
|
25001
|
+
const _onChange = React78.useCallback(
|
|
24955
25002
|
(event) => {
|
|
24956
25003
|
const sanitizedTextValue = type === "integer" ? sanitizeIntegerTextValue(event.target.value) : sanitizeDecimalTextValue(event.target.value);
|
|
24957
25004
|
let numericValue = stringToNumber(sanitizedTextValue);
|
|
@@ -24981,7 +25028,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24981
25028
|
numberToString
|
|
24982
25029
|
]
|
|
24983
25030
|
);
|
|
24984
|
-
const stepUp =
|
|
25031
|
+
const stepUp = React78.useCallback(() => {
|
|
24985
25032
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24986
25033
|
setValueAndTriggerChangeEvent(
|
|
24987
25034
|
ref ?? inputRef,
|
|
@@ -24994,7 +25041,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
24994
25041
|
);
|
|
24995
25042
|
}
|
|
24996
25043
|
}, [numberToString, ref, step, value]);
|
|
24997
|
-
const stepDown =
|
|
25044
|
+
const stepDown = React78.useCallback(() => {
|
|
24998
25045
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24999
25046
|
setValueAndTriggerChangeEvent(
|
|
25000
25047
|
ref ?? inputRef,
|
|
@@ -25007,7 +25054,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25007
25054
|
);
|
|
25008
25055
|
}
|
|
25009
25056
|
}, [numberToString, ref, step, value]);
|
|
25010
|
-
const _onKeyDown =
|
|
25057
|
+
const _onKeyDown = React78.useCallback(
|
|
25011
25058
|
(event) => {
|
|
25012
25059
|
onKeyDown && onKeyDown(event);
|
|
25013
25060
|
if (step <= 0) {
|
|
@@ -25026,8 +25073,8 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25026
25073
|
},
|
|
25027
25074
|
[onKeyDown, step, stepDown, stepUp]
|
|
25028
25075
|
);
|
|
25029
|
-
const [textValue, setTextValue] =
|
|
25030
|
-
const _onBlur =
|
|
25076
|
+
const [textValue, setTextValue] = React78.useState(numberToString(value));
|
|
25077
|
+
const _onBlur = React78.useCallback(
|
|
25031
25078
|
(event) => {
|
|
25032
25079
|
onBlur && onBlur(event);
|
|
25033
25080
|
const text = numberToString(value);
|
|
@@ -25089,7 +25136,7 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25089
25136
|
}
|
|
25090
25137
|
)
|
|
25091
25138
|
] }) : endAdornment;
|
|
25092
|
-
|
|
25139
|
+
React78.useEffect(() => {
|
|
25093
25140
|
if (stringToNumber(textValue) !== value) {
|
|
25094
25141
|
setTextValue(numberToString(value));
|
|
25095
25142
|
}
|
|
@@ -25110,11 +25157,11 @@ var NumberField = React77.forwardRef(function NumberField2({
|
|
|
25110
25157
|
var NumberField_default = NumberField;
|
|
25111
25158
|
|
|
25112
25159
|
// src/components/input/DatePicker.tsx
|
|
25113
|
-
import * as
|
|
25160
|
+
import * as React80 from "react";
|
|
25114
25161
|
import { tz as tz8 } from "moment-timezone";
|
|
25115
25162
|
|
|
25116
25163
|
// src/components/input/DatePickerStatic.tsx
|
|
25117
|
-
import * as
|
|
25164
|
+
import * as React79 from "react";
|
|
25118
25165
|
import { tz as tz7 } from "moment-timezone";
|
|
25119
25166
|
import { jsx as jsx138, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
25120
25167
|
var minYear = 1900;
|
|
@@ -25125,13 +25172,13 @@ var DatePickerStatic = ({
|
|
|
25125
25172
|
minDate,
|
|
25126
25173
|
maxDate
|
|
25127
25174
|
}) => {
|
|
25128
|
-
const { timezone } =
|
|
25129
|
-
const [selectedDateParts, setSelectedDateParts] =
|
|
25130
|
-
const [visibleMonth, setVisibleMonth] =
|
|
25175
|
+
const { timezone } = React79.useContext(IntlContext);
|
|
25176
|
+
const [selectedDateParts, setSelectedDateParts] = React79.useState(void 0);
|
|
25177
|
+
const [visibleMonth, setVisibleMonth] = React79.useState({
|
|
25131
25178
|
year: minYear,
|
|
25132
25179
|
month: 0
|
|
25133
25180
|
});
|
|
25134
|
-
|
|
25181
|
+
React79.useEffect(() => {
|
|
25135
25182
|
if (selectedDateParts) {
|
|
25136
25183
|
setVisibleMonth({
|
|
25137
25184
|
year: selectedDateParts.year,
|
|
@@ -25145,7 +25192,7 @@ var DatePickerStatic = ({
|
|
|
25145
25192
|
});
|
|
25146
25193
|
}
|
|
25147
25194
|
}, [selectedDateParts, timezone]);
|
|
25148
|
-
|
|
25195
|
+
React79.useEffect(() => {
|
|
25149
25196
|
if (!value || isNaN(value.getTime())) {
|
|
25150
25197
|
setSelectedDateParts(void 0);
|
|
25151
25198
|
return;
|
|
@@ -25167,25 +25214,25 @@ var DatePickerStatic = ({
|
|
|
25167
25214
|
const endYear = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getFullYear() : maxYear;
|
|
25168
25215
|
const startMonth = minDate && !isNaN(minDate.getTime()) ? minDate.getMonth() : 0;
|
|
25169
25216
|
const endMonth = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getMonth() : 11;
|
|
25170
|
-
const options =
|
|
25217
|
+
const options = React79.useMemo(
|
|
25171
25218
|
() => Array.from(Array(endYear - startYear + 1)).map((_, i) => ({
|
|
25172
25219
|
value: startYear + i
|
|
25173
25220
|
})),
|
|
25174
25221
|
[endYear, startYear]
|
|
25175
25222
|
);
|
|
25176
|
-
const navigatePreviousMonth =
|
|
25223
|
+
const navigatePreviousMonth = React79.useCallback(() => {
|
|
25177
25224
|
setVisibleMonth({
|
|
25178
25225
|
month: visibleMonth.month === 0 ? 11 : visibleMonth.month - 1,
|
|
25179
25226
|
year: visibleMonth.month === 0 ? visibleMonth.year - 1 : visibleMonth.year
|
|
25180
25227
|
});
|
|
25181
25228
|
}, [visibleMonth]);
|
|
25182
|
-
const navigateNextMonth =
|
|
25229
|
+
const navigateNextMonth = React79.useCallback(() => {
|
|
25183
25230
|
setVisibleMonth({
|
|
25184
25231
|
month: visibleMonth.month === 11 ? 0 : visibleMonth.month + 1,
|
|
25185
25232
|
year: visibleMonth.month === 11 ? visibleMonth.year + 1 : visibleMonth.year
|
|
25186
25233
|
});
|
|
25187
25234
|
}, [visibleMonth]);
|
|
25188
|
-
const onChangeYear =
|
|
25235
|
+
const onChangeYear = React79.useCallback(
|
|
25189
25236
|
(value2) => {
|
|
25190
25237
|
const month = value2 === startYear ? Math.max(startMonth, visibleMonth.month) : value2 === endYear ? Math.min(endMonth, visibleMonth.month) : visibleMonth.month;
|
|
25191
25238
|
setVisibleMonth({
|
|
@@ -25195,11 +25242,11 @@ var DatePickerStatic = ({
|
|
|
25195
25242
|
},
|
|
25196
25243
|
[endMonth, endYear, startMonth, startYear, visibleMonth.month]
|
|
25197
25244
|
);
|
|
25198
|
-
const minSimpleDate =
|
|
25245
|
+
const minSimpleDate = React79.useMemo(
|
|
25199
25246
|
() => dateToSimpleDate(minDate, timezone),
|
|
25200
25247
|
[minDate, timezone]
|
|
25201
25248
|
);
|
|
25202
|
-
const maxSimpleDate =
|
|
25249
|
+
const maxSimpleDate = React79.useMemo(
|
|
25203
25250
|
() => dateToSimpleDate(maxDate, timezone),
|
|
25204
25251
|
[maxDate, timezone]
|
|
25205
25252
|
);
|
|
@@ -25311,18 +25358,18 @@ var DatePickerPopover_default = DatePickerPopover;
|
|
|
25311
25358
|
|
|
25312
25359
|
// src/components/input/DatePicker.tsx
|
|
25313
25360
|
import { Fragment as Fragment36, jsx as jsx140, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
25314
|
-
var DatePicker =
|
|
25361
|
+
var DatePicker = React80.forwardRef(
|
|
25315
25362
|
function DatePicker2({ value, onChange, onBlur, onKeyDown, minDate, maxDate, ...rest }, ref) {
|
|
25316
|
-
const { locale, timezone } =
|
|
25363
|
+
const { locale, timezone } = React80.useContext(IntlContext);
|
|
25317
25364
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
25318
25365
|
const { t } = useTranslation();
|
|
25319
|
-
const dateInputFormatPlaceholder =
|
|
25366
|
+
const dateInputFormatPlaceholder = React80.useMemo(
|
|
25320
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")),
|
|
25321
25368
|
[dateInputFormat, t]
|
|
25322
25369
|
);
|
|
25323
|
-
const _containerRef =
|
|
25324
|
-
const [isPopoverOpen, setPopoverOpen] =
|
|
25325
|
-
const [textValue, setTextValue] =
|
|
25370
|
+
const _containerRef = React80.useRef(null);
|
|
25371
|
+
const [isPopoverOpen, setPopoverOpen] = React80.useState(false);
|
|
25372
|
+
const [textValue, setTextValue] = React80.useState("");
|
|
25326
25373
|
let anchorEl = null;
|
|
25327
25374
|
if (isPopoverOpen) {
|
|
25328
25375
|
if (rest.containerRef && typeof rest.containerRef === "object" && rest.containerRef.current) {
|
|
@@ -25331,21 +25378,21 @@ var DatePicker = React79.forwardRef(
|
|
|
25331
25378
|
anchorEl = _containerRef.current;
|
|
25332
25379
|
}
|
|
25333
25380
|
}
|
|
25334
|
-
const isValidDate =
|
|
25381
|
+
const isValidDate = React80.useCallback(
|
|
25335
25382
|
(dateString) => {
|
|
25336
25383
|
const date = parseDateForLocale(dateString, locale, timezone);
|
|
25337
25384
|
return !isNaN(date.getTime()) && (!minDate || date >= minDate) && (!maxDate || date <= maxDate);
|
|
25338
25385
|
},
|
|
25339
25386
|
[locale, maxDate, minDate, timezone]
|
|
25340
25387
|
);
|
|
25341
|
-
const onSelect =
|
|
25388
|
+
const onSelect = React80.useCallback(
|
|
25342
25389
|
(date) => {
|
|
25343
25390
|
setPopoverOpen(false);
|
|
25344
25391
|
onChange && onChange(date);
|
|
25345
25392
|
},
|
|
25346
25393
|
[onChange]
|
|
25347
25394
|
);
|
|
25348
|
-
const onChangeTextField =
|
|
25395
|
+
const onChangeTextField = React80.useCallback(
|
|
25349
25396
|
(event) => {
|
|
25350
25397
|
setTextValue(event.target.value);
|
|
25351
25398
|
if (!event.target.value && value) {
|
|
@@ -25364,7 +25411,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25364
25411
|
},
|
|
25365
25412
|
[isValidDate, locale, onChange, timezone, value]
|
|
25366
25413
|
);
|
|
25367
|
-
const onBlurTextField =
|
|
25414
|
+
const onBlurTextField = React80.useCallback(
|
|
25368
25415
|
(event) => {
|
|
25369
25416
|
if (!isValidDate(event.target.value)) {
|
|
25370
25417
|
value ? onChange && onChange(null) : setTextValue("");
|
|
@@ -25373,7 +25420,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25373
25420
|
},
|
|
25374
25421
|
[isValidDate, onChange, onBlur, value]
|
|
25375
25422
|
);
|
|
25376
|
-
const onKeyDownTextField =
|
|
25423
|
+
const onKeyDownTextField = React80.useCallback(
|
|
25377
25424
|
(event) => {
|
|
25378
25425
|
if (event.key === "ArrowDown") {
|
|
25379
25426
|
setPopoverOpen(true);
|
|
@@ -25382,7 +25429,7 @@ var DatePicker = React79.forwardRef(
|
|
|
25382
25429
|
},
|
|
25383
25430
|
[onKeyDown]
|
|
25384
25431
|
);
|
|
25385
|
-
|
|
25432
|
+
React80.useEffect(() => {
|
|
25386
25433
|
const text = value && !isNaN(value.getTime()) ? tz8(value, timezone).format(dateInputFormat) : "";
|
|
25387
25434
|
setTextValue(text);
|
|
25388
25435
|
}, [dateInputFormat, timezone, value]);
|
|
@@ -25501,11 +25548,11 @@ var Checkbox = ({
|
|
|
25501
25548
|
var Checkbox_default = Checkbox;
|
|
25502
25549
|
|
|
25503
25550
|
// src/components/input/Radio.tsx
|
|
25504
|
-
import * as
|
|
25551
|
+
import * as React81 from "react";
|
|
25505
25552
|
import MuiRadio from "@mui/material/Radio";
|
|
25506
25553
|
import { FormControlLabel as FormControlLabel2 } from "@mui/material";
|
|
25507
25554
|
import { Fragment as Fragment38, jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
25508
|
-
var Radio =
|
|
25555
|
+
var Radio = React81.forwardRef(function Radio2({
|
|
25509
25556
|
label,
|
|
25510
25557
|
labelPlacement = "end",
|
|
25511
25558
|
onChange,
|
|
@@ -25516,7 +25563,7 @@ var Radio = React80.forwardRef(function Radio2({
|
|
|
25516
25563
|
size = "M",
|
|
25517
25564
|
...rest
|
|
25518
25565
|
}, ref) {
|
|
25519
|
-
const _onChange =
|
|
25566
|
+
const _onChange = React81.useCallback(
|
|
25520
25567
|
(event) => {
|
|
25521
25568
|
onChange && onChange(event, event.target.value);
|
|
25522
25569
|
},
|
|
@@ -25560,7 +25607,7 @@ var Radio = React80.forwardRef(function Radio2({
|
|
|
25560
25607
|
var Radio_default = Radio;
|
|
25561
25608
|
|
|
25562
25609
|
// src/components/input/PageSelector.tsx
|
|
25563
|
-
import * as
|
|
25610
|
+
import * as React82 from "react";
|
|
25564
25611
|
import { jsx as jsx143, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
25565
25612
|
var PageSelector = ({
|
|
25566
25613
|
currentPage,
|
|
@@ -25569,12 +25616,12 @@ var PageSelector = ({
|
|
|
25569
25616
|
text,
|
|
25570
25617
|
onPageChange
|
|
25571
25618
|
}) => {
|
|
25572
|
-
const handlePrevious =
|
|
25619
|
+
const handlePrevious = React82.useCallback(() => {
|
|
25573
25620
|
if (currentPage > 1) {
|
|
25574
25621
|
onPageChange(Math.max(1, currentPage - 1));
|
|
25575
25622
|
}
|
|
25576
25623
|
}, [currentPage, onPageChange]);
|
|
25577
|
-
const handleNext =
|
|
25624
|
+
const handleNext = React82.useCallback(() => {
|
|
25578
25625
|
onPageChange(
|
|
25579
25626
|
Math.min(Math.ceil(totalItems / pageSize), currentPage + 1)
|
|
25580
25627
|
);
|
|
@@ -25672,7 +25719,7 @@ var LinearProgress = ({
|
|
|
25672
25719
|
var LinearProgress_default = LinearProgress;
|
|
25673
25720
|
|
|
25674
25721
|
// src/components/progress/CircularProgress.tsx
|
|
25675
|
-
import * as
|
|
25722
|
+
import * as React83 from "react";
|
|
25676
25723
|
import MuiCircularProgress from "@mui/material/CircularProgress";
|
|
25677
25724
|
import Typography3 from "@mui/material/Typography";
|
|
25678
25725
|
import Box4 from "@mui/material/Box";
|
|
@@ -25698,7 +25745,7 @@ var CircularProgress = ({
|
|
|
25698
25745
|
typographyColor = black,
|
|
25699
25746
|
gradientColors
|
|
25700
25747
|
}) => {
|
|
25701
|
-
const gradientName =
|
|
25748
|
+
const gradientName = React83.useRef(
|
|
25702
25749
|
gradientColors ? crypto.randomUUID() : void 0
|
|
25703
25750
|
);
|
|
25704
25751
|
return /* @__PURE__ */ jsxs73(
|
|
@@ -25989,7 +26036,7 @@ var Loader = ({
|
|
|
25989
26036
|
var Loader_default = Loader;
|
|
25990
26037
|
|
|
25991
26038
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25992
|
-
import
|
|
26039
|
+
import React84 from "react";
|
|
25993
26040
|
import Markdown from "markdown-to-jsx";
|
|
25994
26041
|
import { styled as styled8 } from "@mui/material/styles";
|
|
25995
26042
|
import "katex/dist/katex.min.css";
|
|
@@ -26132,13 +26179,13 @@ var renderWithMath = (text) => {
|
|
|
26132
26179
|
}
|
|
26133
26180
|
return parts;
|
|
26134
26181
|
};
|
|
26135
|
-
var renderChildrenWithMath = (children) =>
|
|
26182
|
+
var renderChildrenWithMath = (children) => React84.Children.map(children, (child) => {
|
|
26136
26183
|
if (typeof child === "string") {
|
|
26137
26184
|
return renderWithMath(child);
|
|
26138
26185
|
}
|
|
26139
|
-
if (
|
|
26186
|
+
if (React84.isValidElement(child)) {
|
|
26140
26187
|
const element = child;
|
|
26141
|
-
return
|
|
26188
|
+
return React84.cloneElement(element, {
|
|
26142
26189
|
...element.props,
|
|
26143
26190
|
children: renderChildrenWithMath(element.props.children)
|
|
26144
26191
|
});
|
|
@@ -26255,10 +26302,10 @@ var Navbar = ({
|
|
|
26255
26302
|
var Navbar_default = Navbar;
|
|
26256
26303
|
|
|
26257
26304
|
// src/components/navbar/NavbarButton.tsx
|
|
26258
|
-
import * as
|
|
26305
|
+
import * as React85 from "react";
|
|
26259
26306
|
import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
|
|
26260
26307
|
import { jsx as jsx151, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
26261
|
-
var NavbarButton =
|
|
26308
|
+
var NavbarButton = React85.forwardRef(
|
|
26262
26309
|
function NavbarButton2({
|
|
26263
26310
|
iconId,
|
|
26264
26311
|
srcUrl,
|
|
@@ -26401,10 +26448,10 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx152(
|
|
|
26401
26448
|
var NavbarHeader_default = NavbarHeader;
|
|
26402
26449
|
|
|
26403
26450
|
// src/components/navbar/NavbarLogo.tsx
|
|
26404
|
-
import * as
|
|
26451
|
+
import * as React86 from "react";
|
|
26405
26452
|
import { ButtonBase as ButtonBase3 } from "@mui/material";
|
|
26406
26453
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
26407
|
-
var NavbarLogo =
|
|
26454
|
+
var NavbarLogo = React86.forwardRef(
|
|
26408
26455
|
function NavbarButton3({ src, ...rest }, ref) {
|
|
26409
26456
|
return /* @__PURE__ */ jsx153(
|
|
26410
26457
|
ButtonBase3,
|
|
@@ -26425,7 +26472,7 @@ var NavbarLogo = React85.forwardRef(
|
|
|
26425
26472
|
var NavbarLogo_default = NavbarLogo;
|
|
26426
26473
|
|
|
26427
26474
|
// src/components/overlay/DonutFocusOverlay.tsx
|
|
26428
|
-
import * as
|
|
26475
|
+
import * as React87 from "react";
|
|
26429
26476
|
import { Fragment as Fragment40, jsx as jsx154, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
26430
26477
|
var DonutFocusOverlay = ({
|
|
26431
26478
|
isVisible,
|
|
@@ -26435,8 +26482,8 @@ var DonutFocusOverlay = ({
|
|
|
26435
26482
|
chipLabel,
|
|
26436
26483
|
chipPosition = "right"
|
|
26437
26484
|
}) => {
|
|
26438
|
-
const [clientRect, setClientRect] =
|
|
26439
|
-
|
|
26485
|
+
const [clientRect, setClientRect] = React87.useState();
|
|
26486
|
+
React87.useEffect(() => {
|
|
26440
26487
|
if (!elementRef?.current) {
|
|
26441
26488
|
setClientRect(void 0);
|
|
26442
26489
|
return;
|
|
@@ -26585,17 +26632,17 @@ var Pager_default = Pager;
|
|
|
26585
26632
|
|
|
26586
26633
|
// src/components/scrollable/HorizontalScrollable.tsx
|
|
26587
26634
|
import { ButtonBase as ButtonBase4 } from "@mui/material";
|
|
26588
|
-
import * as
|
|
26635
|
+
import * as React88 from "react";
|
|
26589
26636
|
import { jsx as jsx156, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26590
26637
|
var HorizontalScrollable = ({
|
|
26591
26638
|
style: style3,
|
|
26592
26639
|
children,
|
|
26593
26640
|
stepDistance = 200
|
|
26594
26641
|
}) => {
|
|
26595
|
-
const horizontalContainerRef =
|
|
26596
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26597
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26598
|
-
|
|
26642
|
+
const horizontalContainerRef = React88.useRef(null);
|
|
26643
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React88.useState(true);
|
|
26644
|
+
const [isRightArrowHidden, setRightArrowHidden] = React88.useState(true);
|
|
26645
|
+
React88.useEffect(() => {
|
|
26599
26646
|
if (!horizontalContainerRef.current) {
|
|
26600
26647
|
return;
|
|
26601
26648
|
}
|
|
@@ -26700,7 +26747,7 @@ var HorizontalScrollable = ({
|
|
|
26700
26747
|
var HorizontalScrollable_default = HorizontalScrollable;
|
|
26701
26748
|
|
|
26702
26749
|
// src/components/scrollable/Carousel.tsx
|
|
26703
|
-
import * as
|
|
26750
|
+
import * as React89 from "react";
|
|
26704
26751
|
import { jsx as jsx157, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26705
26752
|
var buttonStyles = {
|
|
26706
26753
|
color: grey800,
|
|
@@ -26720,23 +26767,23 @@ function Carousel({
|
|
|
26720
26767
|
padding: padding2 = 8,
|
|
26721
26768
|
alignment = "left"
|
|
26722
26769
|
}) {
|
|
26723
|
-
const rootRef =
|
|
26724
|
-
const containerRef =
|
|
26725
|
-
const previousClientWidth =
|
|
26726
|
-
const isScrolling =
|
|
26727
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26728
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26729
|
-
const [paddingElement, setPaddingElement] =
|
|
26730
|
-
const [visibleCount, setVisibleCount] =
|
|
26731
|
-
const showedElementsRef =
|
|
26732
|
-
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(() => {
|
|
26733
26780
|
if (!showedElementsRef.current) {
|
|
26734
26781
|
return;
|
|
26735
26782
|
}
|
|
26736
26783
|
setLeftArrowHidden(showedElementsRef.current.start === 0);
|
|
26737
26784
|
setRightArrowHidden(showedElementsRef.current.end === items.length - 1);
|
|
26738
26785
|
}, [items.length]);
|
|
26739
|
-
const getUsableWidth =
|
|
26786
|
+
const getUsableWidth = React89.useCallback(
|
|
26740
26787
|
(el) => {
|
|
26741
26788
|
let current = el;
|
|
26742
26789
|
while (current) {
|
|
@@ -26750,7 +26797,7 @@ function Carousel({
|
|
|
26750
26797
|
},
|
|
26751
26798
|
[]
|
|
26752
26799
|
);
|
|
26753
|
-
const resetCarousel =
|
|
26800
|
+
const resetCarousel = React89.useCallback(
|
|
26754
26801
|
(root, container) => {
|
|
26755
26802
|
root.style.width = "";
|
|
26756
26803
|
showedElementsRef.current = void 0;
|
|
@@ -26758,7 +26805,7 @@ function Carousel({
|
|
|
26758
26805
|
},
|
|
26759
26806
|
[]
|
|
26760
26807
|
);
|
|
26761
|
-
const setMeasures =
|
|
26808
|
+
const setMeasures = React89.useCallback(
|
|
26762
26809
|
(root, container, nextElementsIndex) => {
|
|
26763
26810
|
const children = Array.from(container.children);
|
|
26764
26811
|
if (children.length === 0) {
|
|
@@ -26787,7 +26834,7 @@ function Carousel({
|
|
|
26787
26834
|
},
|
|
26788
26835
|
[alignment, gap2, getUsableWidth, items.length, padding2]
|
|
26789
26836
|
);
|
|
26790
|
-
const updateVisibleCount =
|
|
26837
|
+
const updateVisibleCount = React89.useCallback(() => {
|
|
26791
26838
|
const root = rootRef.current;
|
|
26792
26839
|
const container = containerRef.current;
|
|
26793
26840
|
if (!container || !parent) {
|
|
@@ -26834,7 +26881,7 @@ function Carousel({
|
|
|
26834
26881
|
updateArrows,
|
|
26835
26882
|
resetCarousel
|
|
26836
26883
|
]);
|
|
26837
|
-
const getInitialWidth =
|
|
26884
|
+
const getInitialWidth = React89.useCallback(
|
|
26838
26885
|
(el) => {
|
|
26839
26886
|
let current = el;
|
|
26840
26887
|
let width2 = 0;
|
|
@@ -26852,7 +26899,7 @@ function Carousel({
|
|
|
26852
26899
|
},
|
|
26853
26900
|
[]
|
|
26854
26901
|
);
|
|
26855
|
-
const resizeObserverCallback =
|
|
26902
|
+
const resizeObserverCallback = React89.useCallback(() => {
|
|
26856
26903
|
if (!rootRef.current || !containerRef.current) {
|
|
26857
26904
|
return;
|
|
26858
26905
|
}
|
|
@@ -26863,7 +26910,7 @@ function Carousel({
|
|
|
26863
26910
|
previousClientWidth.current = newClientWidth;
|
|
26864
26911
|
updateVisibleCount();
|
|
26865
26912
|
}, [getInitialWidth, updateVisibleCount]);
|
|
26866
|
-
|
|
26913
|
+
React89.useEffect(() => {
|
|
26867
26914
|
const container = containerRef.current;
|
|
26868
26915
|
if (!container) {
|
|
26869
26916
|
return;
|
|
@@ -27050,7 +27097,7 @@ import {
|
|
|
27050
27097
|
} from "notistack";
|
|
27051
27098
|
|
|
27052
27099
|
// src/components/snackbar/Snackbar.tsx
|
|
27053
|
-
import * as
|
|
27100
|
+
import * as React90 from "react";
|
|
27054
27101
|
import { SnackbarContent } from "notistack";
|
|
27055
27102
|
import { Typography as Typography4 } from "@mui/material";
|
|
27056
27103
|
import { jsx as jsx159, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -27078,7 +27125,7 @@ var iconColors = {
|
|
|
27078
27125
|
error: error300,
|
|
27079
27126
|
warning: complementary300
|
|
27080
27127
|
};
|
|
27081
|
-
var Snackbar =
|
|
27128
|
+
var Snackbar = React90.forwardRef(
|
|
27082
27129
|
function Snackbar2({
|
|
27083
27130
|
severity = "info",
|
|
27084
27131
|
message,
|
|
@@ -27090,10 +27137,10 @@ var Snackbar = React89.forwardRef(
|
|
|
27090
27137
|
identifierKey: key,
|
|
27091
27138
|
dataTestKey
|
|
27092
27139
|
}, ref) {
|
|
27093
|
-
const actionClickHandler =
|
|
27140
|
+
const actionClickHandler = React90.useCallback(() => {
|
|
27094
27141
|
onActionClick && onActionClick(key);
|
|
27095
27142
|
}, [onActionClick, key]);
|
|
27096
|
-
const closeClickHandler =
|
|
27143
|
+
const closeClickHandler = React90.useCallback(() => {
|
|
27097
27144
|
onCloseClick && onCloseClick(key);
|
|
27098
27145
|
}, [onCloseClick, key]);
|
|
27099
27146
|
return /* @__PURE__ */ jsx159(
|
|
@@ -27259,12 +27306,12 @@ var TabButton = ({
|
|
|
27259
27306
|
var TabButton_default = TabButton;
|
|
27260
27307
|
|
|
27261
27308
|
// src/components/tab/Tabs.tsx
|
|
27262
|
-
import * as
|
|
27309
|
+
import * as React92 from "react";
|
|
27263
27310
|
import MuiTabs from "@mui/material/Tabs";
|
|
27264
27311
|
|
|
27265
27312
|
// src/components/layout/SwipeableViews.tsx
|
|
27266
|
-
import * as
|
|
27267
|
-
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";
|
|
27268
27315
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
27269
27316
|
var styles = {
|
|
27270
27317
|
container: {
|
|
@@ -27301,7 +27348,7 @@ function SwipeableViews({
|
|
|
27301
27348
|
const containerRef = useRef30(null);
|
|
27302
27349
|
const scrollTimeout = useRef30(null);
|
|
27303
27350
|
const scrollingMethod = useRef30("none");
|
|
27304
|
-
const [previousIndex, setPreviousIndex] =
|
|
27351
|
+
const [previousIndex, setPreviousIndex] = useState37(index);
|
|
27305
27352
|
const hideScrollAnimation = useRef30(true);
|
|
27306
27353
|
useEffect25(() => {
|
|
27307
27354
|
if (containerRef.current) {
|
|
@@ -27363,9 +27410,9 @@ function SwipeableViews({
|
|
|
27363
27410
|
);
|
|
27364
27411
|
}, 100);
|
|
27365
27412
|
},
|
|
27366
|
-
children:
|
|
27413
|
+
children: React91.Children.map(children, (child, childIndex) => {
|
|
27367
27414
|
let mountedChild = false;
|
|
27368
|
-
if (
|
|
27415
|
+
if (React91.isValidElement(child)) {
|
|
27369
27416
|
mountedChild = !!child.props.keepMounted;
|
|
27370
27417
|
}
|
|
27371
27418
|
return /* @__PURE__ */ jsx162(
|
|
@@ -27408,8 +27455,8 @@ var Tabs = ({
|
|
|
27408
27455
|
hideLineTabs = false,
|
|
27409
27456
|
backgroundScrollButtons = Colors_exports.white
|
|
27410
27457
|
}) => {
|
|
27411
|
-
const tabsRef =
|
|
27412
|
-
const [value, setValue] =
|
|
27458
|
+
const tabsRef = React92.useRef(null);
|
|
27459
|
+
const [value, setValue] = React92.useState(0);
|
|
27413
27460
|
const measureTextWidthRange = (child) => {
|
|
27414
27461
|
const walker = document.createTreeWalker(child, NodeFilter.SHOW_TEXT, {
|
|
27415
27462
|
acceptNode: (node) => node.textContent?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
|
|
@@ -27423,7 +27470,7 @@ var Tabs = ({
|
|
|
27423
27470
|
const rect = range.getBoundingClientRect();
|
|
27424
27471
|
return Math.round(rect.width);
|
|
27425
27472
|
};
|
|
27426
|
-
const waitForSmoothScrollEnd =
|
|
27473
|
+
const waitForSmoothScrollEnd = React92.useCallback(
|
|
27427
27474
|
(container, onEnd) => {
|
|
27428
27475
|
let prev = container.scrollLeft;
|
|
27429
27476
|
let idleFrames = 0;
|
|
@@ -27447,7 +27494,7 @@ var Tabs = ({
|
|
|
27447
27494
|
},
|
|
27448
27495
|
[]
|
|
27449
27496
|
);
|
|
27450
|
-
const calculateIndicatorTabWidth =
|
|
27497
|
+
const calculateIndicatorTabWidth = React92.useCallback((index) => {
|
|
27451
27498
|
if (!tabsRef.current) {
|
|
27452
27499
|
return null;
|
|
27453
27500
|
}
|
|
@@ -27466,7 +27513,7 @@ var Tabs = ({
|
|
|
27466
27513
|
indicator.style.width = `${textWidth}px`;
|
|
27467
27514
|
indicator.style.left = `${left}px`;
|
|
27468
27515
|
}, []);
|
|
27469
|
-
|
|
27516
|
+
React92.useEffect(() => {
|
|
27470
27517
|
if (!tabsRef.current) {
|
|
27471
27518
|
return;
|
|
27472
27519
|
}
|
|
@@ -27673,12 +27720,12 @@ var TableCell = ({
|
|
|
27673
27720
|
var TableCell_default = TableCell;
|
|
27674
27721
|
|
|
27675
27722
|
// src/components/table/TableCellCopy.tsx
|
|
27676
|
-
import * as
|
|
27723
|
+
import * as React93 from "react";
|
|
27677
27724
|
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
27678
27725
|
var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
27679
27726
|
const { t } = useTranslation();
|
|
27680
|
-
const [isCopied, setIsCopied] =
|
|
27681
|
-
const [showIcon, setShowIcon] =
|
|
27727
|
+
const [isCopied, setIsCopied] = React93.useState(false);
|
|
27728
|
+
const [showIcon, setShowIcon] = React93.useState(false);
|
|
27682
27729
|
const manageButtonClicked = () => {
|
|
27683
27730
|
void navigator.clipboard.writeText(textToCopy ?? text);
|
|
27684
27731
|
if (isCopied) {
|
|
@@ -27813,9 +27860,9 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
|
|
|
27813
27860
|
|
|
27814
27861
|
// src/components/toolbar/ToolbarBreadcrumbButton.tsx
|
|
27815
27862
|
import { ButtonBase as ButtonBase5 } from "@mui/material";
|
|
27816
|
-
import * as
|
|
27863
|
+
import * as React94 from "react";
|
|
27817
27864
|
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
27818
|
-
var ToolbarBreadcrumbButton =
|
|
27865
|
+
var ToolbarBreadcrumbButton = React94.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
|
|
27819
27866
|
return /* @__PURE__ */ jsx175(
|
|
27820
27867
|
ButtonBase5,
|
|
27821
27868
|
{
|
|
@@ -27927,20 +27974,20 @@ var Toolbar = ({
|
|
|
27927
27974
|
var Toolbar_default = Toolbar;
|
|
27928
27975
|
|
|
27929
27976
|
// src/components/toolbar/ToolbarTitle.tsx
|
|
27930
|
-
import * as
|
|
27931
|
-
import { useState as
|
|
27977
|
+
import * as React95 from "react";
|
|
27978
|
+
import { useState as useState40 } from "react";
|
|
27932
27979
|
import { jsx as jsx177, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
27933
|
-
var ToolbarTitle =
|
|
27980
|
+
var ToolbarTitle = React95.forwardRef(function ToolbarTitle2({
|
|
27934
27981
|
title,
|
|
27935
27982
|
align = "left",
|
|
27936
27983
|
className,
|
|
27937
27984
|
hoverActions,
|
|
27938
27985
|
color: color2 = grey900
|
|
27939
27986
|
}, ref) {
|
|
27940
|
-
const textElementRef =
|
|
27987
|
+
const textElementRef = React95.useRef(
|
|
27941
27988
|
null
|
|
27942
27989
|
);
|
|
27943
|
-
const [showHoverActions, setShowHoverActions] =
|
|
27990
|
+
const [showHoverActions, setShowHoverActions] = useState40(false);
|
|
27944
27991
|
return /* @__PURE__ */ jsx177(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx177(
|
|
27945
27992
|
TextEllipsisTooltip_default,
|
|
27946
27993
|
{
|
|
@@ -28181,7 +28228,7 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
28181
28228
|
var WidgetTitle_default = WidgetTitle;
|
|
28182
28229
|
|
|
28183
28230
|
// src/components/window/MinimizableWindow.tsx
|
|
28184
|
-
import * as
|
|
28231
|
+
import * as React96 from "react";
|
|
28185
28232
|
import { Fragment as Fragment42, jsx as jsx182, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
28186
28233
|
var sizes6 = {
|
|
28187
28234
|
M: 400,
|
|
@@ -28207,7 +28254,7 @@ var iconButtonsStyles = {
|
|
|
28207
28254
|
backgroundColor: "rgba(255, 255, 255, 0.2)"
|
|
28208
28255
|
}
|
|
28209
28256
|
};
|
|
28210
|
-
var MinimizableWindow =
|
|
28257
|
+
var MinimizableWindow = React96.forwardRef(function MinimizableWindow2({
|
|
28211
28258
|
children,
|
|
28212
28259
|
title,
|
|
28213
28260
|
size = "M",
|
|
@@ -28227,17 +28274,17 @@ var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
|
28227
28274
|
onBack
|
|
28228
28275
|
}, ref) {
|
|
28229
28276
|
const { t } = useTranslation();
|
|
28230
|
-
const overlayRef =
|
|
28231
|
-
const windowRef =
|
|
28232
|
-
const headerRef =
|
|
28233
|
-
const [isDraggingState, setIsDraggingState] =
|
|
28234
|
-
const diffRef =
|
|
28235
|
-
|
|
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, () => ({
|
|
28236
28283
|
window: windowRef.current,
|
|
28237
28284
|
header: headerRef.current,
|
|
28238
28285
|
overlay: overlayRef.current
|
|
28239
28286
|
}));
|
|
28240
|
-
|
|
28287
|
+
React96.useEffect(() => {
|
|
28241
28288
|
if (open) {
|
|
28242
28289
|
overlayRef.current?.style.removeProperty("transform");
|
|
28243
28290
|
overlayRef.current?.style.removeProperty("opacity");
|
|
@@ -28465,31 +28512,31 @@ var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
|
28465
28512
|
var MinimizableWindow_default = MinimizableWindow;
|
|
28466
28513
|
|
|
28467
28514
|
// src/hooks/useFormatters.ts
|
|
28468
|
-
import { useCallback as
|
|
28515
|
+
import { useCallback as useCallback24, useContext as useContext16 } from "react";
|
|
28469
28516
|
var useFormatters = () => {
|
|
28470
28517
|
const { locale, currency, timezone } = useContext16(IntlContext);
|
|
28471
28518
|
return {
|
|
28472
|
-
formatCompactNumber:
|
|
28519
|
+
formatCompactNumber: useCallback24(
|
|
28473
28520
|
(value) => formatCompactNumber(value, locale),
|
|
28474
28521
|
[locale]
|
|
28475
28522
|
),
|
|
28476
|
-
formatNumber:
|
|
28523
|
+
formatNumber: useCallback24(
|
|
28477
28524
|
(value, fractionSize) => formatNumber(value, locale, fractionSize),
|
|
28478
28525
|
[locale]
|
|
28479
28526
|
),
|
|
28480
|
-
formatPercentage:
|
|
28527
|
+
formatPercentage: useCallback24(
|
|
28481
28528
|
(value, fractionSize) => formatPercentage(value, locale, fractionSize),
|
|
28482
28529
|
[locale]
|
|
28483
28530
|
),
|
|
28484
|
-
formatCurrency:
|
|
28531
|
+
formatCurrency: useCallback24(
|
|
28485
28532
|
(value, notation) => formatCurrency(value, locale, currency, notation),
|
|
28486
28533
|
[currency, locale]
|
|
28487
28534
|
),
|
|
28488
|
-
formatDate:
|
|
28535
|
+
formatDate: useCallback24(
|
|
28489
28536
|
(date, format2) => formatDate(date, locale, timezone, format2),
|
|
28490
28537
|
[locale, timezone]
|
|
28491
28538
|
),
|
|
28492
|
-
formatPhone:
|
|
28539
|
+
formatPhone: useCallback24(
|
|
28493
28540
|
(phone, format2) => formatPhone(phone, format2),
|
|
28494
28541
|
[]
|
|
28495
28542
|
)
|