@connectif/ui-components 4.0.4 → 5.0.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/dist/index.js CHANGED
@@ -8078,7 +8078,8 @@ var ListItemText = ({
8078
8078
  typographyVariant,
8079
8079
  color: color2 = "inherit",
8080
8080
  tooltipClass,
8081
- "data-test": dataTest
8081
+ slotProps,
8082
+ "data-testid": dataTestId
8082
8083
  }) => {
8083
8084
  const textElementRef = React8.useRef(null);
8084
8085
  return /* @__PURE__ */ jsx6(
@@ -8095,9 +8096,10 @@ var ListItemText = ({
8095
8096
  component: "div",
8096
8097
  variant: typographyVariant,
8097
8098
  noWrap: true,
8098
- ...dataTest && {
8099
- "data-test": dataTest
8099
+ ...dataTestId && {
8100
+ "data-testid": dataTestId
8100
8101
  },
8102
+ ...slotProps?.typography,
8101
8103
  children: text || "\xA0"
8102
8104
  }
8103
8105
  )
@@ -8122,7 +8124,8 @@ var BaseListItem = ({
8122
8124
  text,
8123
8125
  subText,
8124
8126
  tooltipClass,
8125
- "data-test": dataTest
8127
+ slotProps,
8128
+ "data-testid": dataTestId
8126
8129
  }) => /* @__PURE__ */ jsxs2(
8127
8130
  Stack_default,
8128
8131
  {
@@ -8173,8 +8176,9 @@ var BaseListItem = ({
8173
8176
  text,
8174
8177
  typographyVariant,
8175
8178
  tooltipClass,
8176
- ...dataTest && {
8177
- "data-test": dataTest
8179
+ slotProps,
8180
+ ...dataTestId && {
8181
+ "data-testid": dataTestId
8178
8182
  }
8179
8183
  }
8180
8184
  ),
@@ -8184,6 +8188,7 @@ var BaseListItem = ({
8184
8188
  text: subText,
8185
8189
  typographyVariant: "caption",
8186
8190
  tooltipClass,
8191
+ slotProps,
8187
8192
  color: grey500
8188
8193
  }
8189
8194
  )
@@ -8225,11 +8230,12 @@ var ListItemButton = React9.forwardRef(function ListItemButton2({
8225
8230
  sx,
8226
8231
  variant,
8227
8232
  className = "",
8228
- "data-test": dataTest,
8229
- buttonDataTest,
8233
+ "data-testid": dataTestId,
8234
+ buttonDataTestId,
8230
8235
  tooltipClass,
8231
8236
  enableAuxClick = false,
8232
8237
  onClick,
8238
+ slotProps,
8233
8239
  ...rest
8234
8240
  }, ref) {
8235
8241
  return /* @__PURE__ */ jsx8(
@@ -8253,8 +8259,7 @@ var ListItemButton = React9.forwardRef(function ListItemButton2({
8253
8259
  ...sx
8254
8260
  },
8255
8261
  disabled,
8256
- "data-test": buttonDataTest,
8257
- "data-testid": buttonDataTest,
8262
+ ...buttonDataTestId && { "data-testid": buttonDataTestId },
8258
8263
  children: /* @__PURE__ */ jsx8(
8259
8264
  BaseListItem_default,
8260
8265
  {
@@ -8272,7 +8277,8 @@ var ListItemButton = React9.forwardRef(function ListItemButton2({
8272
8277
  subText,
8273
8278
  selected,
8274
8279
  tooltipClass,
8275
- "data-test": dataTest
8280
+ slotProps,
8281
+ ...dataTestId && { "data-testid": dataTestId }
8276
8282
  }
8277
8283
  }
8278
8284
  )
@@ -10280,6 +10286,7 @@ var ListItem = React22.forwardRef(function ListItem2({
10280
10286
  variant,
10281
10287
  className = "",
10282
10288
  tooltipClass,
10289
+ slotProps,
10283
10290
  ...rest
10284
10291
  }, ref) {
10285
10292
  return /* @__PURE__ */ jsx40(
@@ -10305,7 +10312,8 @@ var ListItem = React22.forwardRef(function ListItem2({
10305
10312
  text,
10306
10313
  subText,
10307
10314
  selected,
10308
- tooltipClass
10315
+ tooltipClass,
10316
+ slotProps
10309
10317
  }
10310
10318
  }
10311
10319
  )
@@ -21174,9 +21182,11 @@ var ChevronIcon = ({ disabled = false }) => /* @__PURE__ */ jsx114(
21174
21182
  );
21175
21183
  var SelectOption = ({
21176
21184
  value,
21185
+ id,
21177
21186
  label,
21178
21187
  selected,
21179
21188
  colors,
21189
+ slotProps,
21180
21190
  ...rest
21181
21191
  }) => /* @__PURE__ */ jsx114(
21182
21192
  ListItemButton_default,
@@ -21185,8 +21195,10 @@ var SelectOption = ({
21185
21195
  selected,
21186
21196
  "data-value": value,
21187
21197
  text: label,
21188
- "data-test": `select-option-${label}`,
21189
- buttonDataTest: `select-option-button-${label}`,
21198
+ ...id && {
21199
+ "data-testid": `select-option-${id}`,
21200
+ buttonDataTestId: `select-option-button-${id}`
21201
+ },
21190
21202
  sx: {
21191
21203
  "&:hover": {
21192
21204
  backgroundColor: colors?.hoverColor
@@ -21201,6 +21213,9 @@ var SelectOption = ({
21201
21213
  backgroundColor: selected ? colors?.selectedColor : "transparent",
21202
21214
  color: colors?.color
21203
21215
  },
21216
+ slotProps: {
21217
+ typography: slotProps?.optionText
21218
+ },
21204
21219
  ...rest
21205
21220
  }
21206
21221
  );
@@ -21223,7 +21238,7 @@ var Select = function Select2({
21223
21238
  menuZIndex,
21224
21239
  menuColors,
21225
21240
  menuMaxHeight,
21226
- dataTest,
21241
+ "data-testid": dataTestId,
21227
21242
  open,
21228
21243
  onOpen,
21229
21244
  ...rest
@@ -21337,7 +21352,7 @@ var Select = function Select2({
21337
21352
  }
21338
21353
  return options.find((o) => o.value === value2)?.label ?? value2;
21339
21354
  },
21340
- ...dataTest && { "data-test": dataTest },
21355
+ ...dataTestId && { "data-testid": dataTestId },
21341
21356
  inputProps: "data-testid" in rest ? {
21342
21357
  "data-testid": rest["data-testid"] + "-input"
21343
21358
  } : void 0,
@@ -21453,7 +21468,7 @@ var Select = function Select2({
21453
21468
  return options.find((o) => o.value === value2)?.label ?? value2;
21454
21469
  }
21455
21470
  },
21456
- ...dataTest && { "data-test": dataTest },
21471
+ ...dataTestId && { "data-testid": dataTestId },
21457
21472
  inputProps: "data-testid" in rest ? {
21458
21473
  "data-testid": rest["data-testid"] + "-input"
21459
21474
  } : void 0,
@@ -21477,17 +21492,19 @@ var Select = function Select2({
21477
21492
  },
21478
21493
  ...rest,
21479
21494
  children: children ?? options.map((option) => {
21480
- const { label, value: optionValue, ...rest2 } = option;
21495
+ const { label, value: optionValue, sx: sx2, ...rest2 } = option;
21481
21496
  return /* @__PURE__ */ jsx114(
21482
21497
  SelectOption,
21483
21498
  {
21484
21499
  label: label ?? value?.toString() ?? "",
21485
21500
  value: optionValue,
21501
+ id: optionValue,
21486
21502
  colors: !menuColors?.selectedColor ? {
21487
21503
  ...menuColors ?? {},
21488
21504
  selectedColor: primary50
21489
21505
  } : menuColors,
21490
21506
  selected: Array.isArray(currentValue) ? currentValue.some((v) => v === optionValue) : currentValue === optionValue,
21507
+ slotProps: { optionText: { sx: sx2 } },
21491
21508
  ...rest2
21492
21509
  },
21493
21510
  optionValue ?? ""
@@ -21587,9 +21604,7 @@ var DaysOfWeekPicker_default = DaysOfWeekPicker;
21587
21604
 
21588
21605
  // src/components/input/ColorPicker.tsx
21589
21606
  import * as React62 from "react";
21590
- import GradientColorPicker, {
21591
- useColorPicker
21592
- } from "react-best-gradient-color-picker";
21607
+ import GradientColorPicker from "react-best-gradient-color-picker";
21593
21608
  import { Fragment as Fragment23, jsx as jsx117, jsxs as jsxs53 } from "react/jsx-runtime";
21594
21609
  var colorRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^rgba?\((\d{1,3}), {0,1}(\d{1,3}), {0,1}(\d{1,3})(, {0,1}([01]|0?\.\d+))?\)$/;
21595
21610
  var isValidColor = (color2) => colorRegex.test(color2);
@@ -21633,18 +21648,10 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21633
21648
  const [internalPickerValue, setInternalPickerValue] = React62.useState(
21634
21649
  value || white
21635
21650
  );
21636
- const { valueToHex } = useColorPicker(
21637
- internalPickerValue ?? "",
21638
- setInternalPickerValue
21639
- );
21640
- const [textFieldValue, setTextFieldValue] = React62.useState(
21641
- value ? valueToHex() : ""
21642
- );
21643
- const [isValidPickerChange, setValidPickerChange] = React62.useState(false);
21651
+ const [textFieldValue, setTextFieldValue] = React62.useState(value ?? "");
21644
21652
  const [anchorEl, setAnchorEl] = React62.useState();
21645
21653
  const handleTextFieldChange = (event) => {
21646
21654
  const newValue = event.target.value;
21647
- setValidPickerChange(false);
21648
21655
  setTextFieldValue(newValue);
21649
21656
  if (isValidColor(newValue) || allowEmpty && newValue === "") {
21650
21657
  setInternalPickerValue(newValue);
@@ -21661,6 +21668,24 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21661
21668
  return hex.length === 1 ? "0" + hex : hex;
21662
21669
  }).join("");
21663
21670
  };
21671
+ const normalizeBlack = (color2) => {
21672
+ const rgb = color2.match(/\d+/g);
21673
+ if (!rgb) {
21674
+ return color2;
21675
+ }
21676
+ const [r2, g, b] = rgb.map(Number);
21677
+ if (r2 <= 1 && g <= 1 && b <= 1) {
21678
+ return "rgb(0,0,0)";
21679
+ }
21680
+ return color2;
21681
+ };
21682
+ const commitColor = React62.useCallback(() => {
21683
+ const finalValue = allowAlpha ? internalPickerValue : rgbToHex(internalPickerValue);
21684
+ setInternalPickerValue(finalValue);
21685
+ setTextFieldValue(finalValue);
21686
+ setPreviousColors((prev) => [finalValue, ...prev.slice(0, 17)]);
21687
+ onChange(finalValue);
21688
+ }, [internalPickerValue, allowAlpha, onChange]);
21664
21689
  const iconColor = /* @__PURE__ */ jsx117(
21665
21690
  IconButton_default,
21666
21691
  {
@@ -21672,17 +21697,6 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21672
21697
  sx: { color: value || grey600 }
21673
21698
  }
21674
21699
  );
21675
- React62.useEffect(() => {
21676
- const handleColorChange = (color2) => {
21677
- setPreviousColors((prev) => [color2, ...prev.slice(0, 17)]);
21678
- setTextFieldValue(valueToHex());
21679
- onChange(color2);
21680
- setValidPickerChange(false);
21681
- };
21682
- if (isValidPickerChange && internalPickerValue && internalPickerValue !== value) {
21683
- handleColorChange(internalPickerValue);
21684
- }
21685
- }, [value, internalPickerValue, onChange, isValidPickerChange, valueToHex]);
21686
21700
  return /* @__PURE__ */ jsxs53(Fragment23, { children: [
21687
21701
  /* @__PURE__ */ jsx117(
21688
21702
  TextField_default,
@@ -21696,13 +21710,13 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21696
21710
  inputSx: {
21697
21711
  fontFamily: "Source Sans Pro, sans-serif",
21698
21712
  fontWeight: "400",
21699
- color: { grey900 }
21713
+ color: grey900
21700
21714
  },
21701
21715
  placeholder: t("COLOR_PICKER.VALUE_NOT_DEFINED"),
21702
21716
  onChange: handleTextFieldChange,
21703
21717
  onBlur: () => {
21704
- if (value !== textFieldValue && valueToHex() !== textFieldValue) {
21705
- setTextFieldValue(valueToHex());
21718
+ if (!textFieldValue && !allowEmpty) {
21719
+ setTextFieldValue(internalPickerValue);
21706
21720
  }
21707
21721
  },
21708
21722
  startAdornment: iconColor,
@@ -21715,16 +21729,11 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21715
21729
  anchorEl,
21716
21730
  onClose: () => setAnchorEl(void 0),
21717
21731
  sx: { zIndex: popoverZIndex },
21718
- onMouseUp: () => {
21719
- setValidPickerChange(true);
21720
- },
21732
+ onMouseUp: commitColor,
21721
21733
  children: /* @__PURE__ */ jsx117(
21722
21734
  Box_default2,
21723
21735
  {
21724
21736
  className: "Cn-Color-Gradient-Box",
21725
- onMouseUp: () => {
21726
- setValidPickerChange(true);
21727
- },
21728
21737
  sx: {
21729
21738
  "&.Cn-Color-Gradient-Box": {
21730
21739
  backgroundColor: "white !important",
@@ -21771,9 +21780,10 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21771
21780
  height: height2,
21772
21781
  presets: currentColorPreset,
21773
21782
  onChange: (newColor) => {
21774
- setInternalPickerValue(
21775
- allowAlpha ? newColor : rgbToHex(newColor)
21776
- );
21783
+ const normalized = normalizeBlack(newColor);
21784
+ const preview = allowAlpha ? normalized : rgbToHex(normalized);
21785
+ setInternalPickerValue(preview);
21786
+ setTextFieldValue(preview);
21777
21787
  },
21778
21788
  hideAdvancedSliders: true,
21779
21789
  hideColorGuide: true,
@@ -22023,7 +22033,7 @@ var CategorizedPicker = function CategorizedPicker2({
22023
22033
  sx: { color: primaryMain }
22024
22034
  }
22025
22035
  ) : void 0,
22026
- buttonDataTest: dataTestId ? dataTestId + "-category-" + idx : void 0,
22036
+ buttonDataTestId: dataTestId ? dataTestId + "-category-" + idx : void 0,
22027
22037
  children: /* @__PURE__ */ jsx119(
22028
22038
  TextEllipsis_default,
22029
22039
  {
@@ -22073,7 +22083,7 @@ var CategorizedPicker = function CategorizedPicker2({
22073
22083
  onChange(option);
22074
22084
  closePopover();
22075
22085
  },
22076
- buttonDataTest: dataTestId ? dataTestId + "-option-" + idx : void 0,
22086
+ buttonDataTestId: dataTestId ? dataTestId + "-option-" + idx : void 0,
22077
22087
  children: /* @__PURE__ */ jsx119(
22078
22088
  TextEllipsis_default,
22079
22089
  {
@@ -22719,7 +22729,7 @@ var ItemSelector = function ItemSelector2({
22719
22729
  var ItemSelector_default = ItemSelector;
22720
22730
 
22721
22731
  // src/components/input/autocomplete/Autocomplete.tsx
22722
- import * as React68 from "react";
22732
+ import * as React69 from "react";
22723
22733
 
22724
22734
  // src/utils/RegExpUtils.ts
22725
22735
  var map = {
@@ -22999,16 +23009,40 @@ var AutocompleteInput = function AutocompleteInput2({
22999
23009
  ),
23000
23010
  autoComplete: "off",
23001
23011
  onMouseEnter: () => setIsHover(true),
23002
- onMouseLeave: () => setIsHover(false)
23012
+ onMouseLeave: () => setIsHover(false),
23013
+ "data-testid": "autocomplete-input"
23003
23014
  }
23004
23015
  ) });
23005
23016
  };
23006
23017
  var AutocompleteInput_default = AutocompleteInput;
23007
23018
 
23008
23019
  // src/components/input/autocomplete/AutocompleteList.tsx
23020
+ import * as React68 from "react";
23009
23021
  import { Popper, ClickAwayListener } from "@mui/material";
23010
23022
  import { FixedSizeList as FixedSizeList3 } from "react-window";
23011
23023
  import AutoSizer5 from "react-virtualized-auto-sizer";
23024
+
23025
+ // src/utils/AutocompleteUtils.ts
23026
+ function getInitialListScroll({
23027
+ highlightedIndex,
23028
+ itemHeight,
23029
+ selectedIndex,
23030
+ totalItems,
23031
+ containerHeight
23032
+ }) {
23033
+ const totalHeight = totalItems * itemHeight;
23034
+ let scrollTo = 0;
23035
+ if (highlightedIndex > -1) {
23036
+ scrollTo = highlightedIndex * itemHeight;
23037
+ } else if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
23038
+ scrollTo = selectedIndex[selectedIndex.length - 1] * itemHeight;
23039
+ } else if (typeof selectedIndex === "number") {
23040
+ scrollTo = selectedIndex * itemHeight;
23041
+ }
23042
+ return Math.min(scrollTo, Math.max(totalHeight - containerHeight, 0));
23043
+ }
23044
+
23045
+ // src/components/input/autocomplete/AutocompleteList.tsx
23012
23046
  import { Fragment as Fragment27, jsx as jsx124, jsxs as jsxs60 } from "react/jsx-runtime";
23013
23047
  var AUTOCOMPLETE_ITEM_HEIGHT = 44;
23014
23048
  var AutocompleteList = function AutocompleteList2({
@@ -23022,16 +23056,17 @@ var AutocompleteList = function AutocompleteList2({
23022
23056
  selectedIndex,
23023
23057
  highlightedIndex,
23024
23058
  virtualListRef,
23025
- listRef,
23026
23059
  filteredOptions,
23027
23060
  onAddSelectedValue,
23028
23061
  onClickAwayPopover
23029
23062
  }) {
23030
23063
  const { t } = useTranslation();
23064
+ const listRef = React68.useRef(null);
23031
23065
  const getText = (option) => {
23032
23066
  const isInOptions = options.some((elem) => elem.id === option.id);
23033
23067
  if (!isInOptions) {
23034
- return `${addNewValueText ?? t("AUTOCOMPLETE.ADD_NEW_VALUE")}: ${option.label}`;
23068
+ const addedValueText = addNewValueText === void 0 ? `${t("AUTOCOMPLETE.ADD_NEW_VALUE")}` : addNewValueText;
23069
+ return `${addedValueText ? `${addedValueText}: ` : ""}${option.label}`;
23035
23070
  }
23036
23071
  return option.label;
23037
23072
  };
@@ -23065,23 +23100,11 @@ var AutocompleteList = function AutocompleteList2({
23065
23100
  },
23066
23101
  text: getText(option),
23067
23102
  onClick: (event) => onAddSelectedValue(event, option),
23068
- "data-test": `autocomplete-option-${option.id}`
23103
+ "data-testid": `autocomplete-option-${option.id}`
23069
23104
  },
23070
23105
  option.id
23071
23106
  );
23072
23107
  };
23073
- const getInitialListScroll = () => {
23074
- if (highlightedIndex > -1) {
23075
- return highlightedIndex * AUTOCOMPLETE_ITEM_HEIGHT;
23076
- }
23077
- if (typeof selectedIndex === "number") {
23078
- return selectedIndex * AUTOCOMPLETE_ITEM_HEIGHT;
23079
- }
23080
- if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
23081
- return selectedIndex[selectedIndex.length - 1] * AUTOCOMPLETE_ITEM_HEIGHT;
23082
- }
23083
- return 0;
23084
- };
23085
23108
  return /* @__PURE__ */ jsx124(Fragment27, { children: /* @__PURE__ */ jsx124(
23086
23109
  ClickAwayListener,
23087
23110
  {
@@ -23132,7 +23155,15 @@ var AutocompleteList = function AutocompleteList2({
23132
23155
  width: width2,
23133
23156
  className: "Slim-Vertical-Scroll",
23134
23157
  ref: virtualListRef,
23135
- initialScrollOffset: getInitialListScroll(),
23158
+ initialScrollOffset: getInitialListScroll(
23159
+ {
23160
+ itemHeight: AUTOCOMPLETE_ITEM_HEIGHT,
23161
+ containerHeight: listRef.current?.clientHeight ?? 0,
23162
+ highlightedIndex,
23163
+ selectedIndex,
23164
+ totalItems: filteredOptions.length
23165
+ }
23166
+ ),
23136
23167
  children: ListItemButtonWrapper
23137
23168
  }
23138
23169
  ) })
@@ -23175,15 +23206,15 @@ var Autocomplete = function Autocomplete2({
23175
23206
  onOpen = () => ({}),
23176
23207
  disableClear
23177
23208
  }) {
23178
- const anchorRef = React68.useRef(null);
23179
- const inputRef = React68.useRef(null);
23180
- const [placeholder, setPlaceholder] = React68.useState(
23209
+ const anchorRef = React69.useRef(null);
23210
+ const inputRef = React69.useRef(null);
23211
+ const [placeholder, setPlaceholder] = React69.useState(
23181
23212
  textFieldProps?.placeholder || ""
23182
23213
  );
23183
- const _renderLabel = React68.useCallback((id) => id, []);
23184
- const [inputValue, setInputValue] = React68.useState("");
23185
- const [isDirty, setDirty] = React68.useState(false);
23186
- const getOptionsLabeled = React68.useCallback(
23214
+ const _renderLabel = React69.useCallback((id) => id, []);
23215
+ const [inputValue, setInputValue] = React69.useState("");
23216
+ const [isDirty, setDirty] = React69.useState(false);
23217
+ const getOptionsLabeled = React69.useCallback(
23187
23218
  (options2, inputValue2 = "") => {
23188
23219
  const searchValue = escapeRegExp2(inputValue2.trim());
23189
23220
  const regExp = new RegExp(
@@ -23214,7 +23245,7 @@ var Autocomplete = function Autocomplete2({
23214
23245
  renderLabel
23215
23246
  ]
23216
23247
  );
23217
- const getAllowFreeTextOption = React68.useCallback(
23248
+ const getAllowFreeTextOption = React69.useCallback(
23218
23249
  (inputValue2) => {
23219
23250
  if (allowFreeText) {
23220
23251
  const freeOption = {
@@ -23232,28 +23263,27 @@ var Autocomplete = function Autocomplete2({
23232
23263
  },
23233
23264
  [_renderLabel, allowFreeText, options, renderLabel]
23234
23265
  );
23235
- const [filteredOptions, setFilteredOptions] = React68.useState(getOptionsLabeled([...options]));
23236
- const listRef = React68.useRef(null);
23237
- const virtualListRef = React68.createRef();
23238
- const [isOpenPopover, setOpenPopover] = React68.useState(false);
23266
+ const [filteredOptions, setFilteredOptions] = React69.useState(getOptionsLabeled([...options]));
23267
+ const virtualListRef = React69.createRef();
23268
+ const [isOpenPopover, setOpenPopover] = React69.useState(false);
23239
23269
  const getSelectedIndexEmpty = () => multiple ? [] : void 0;
23240
- const [selectedIndex, setSelectedIndex] = React68.useState(getSelectedIndexEmpty());
23241
- const [highlightedIndex, setHighlightedIndex] = React68.useState(-1);
23242
- React68.useEffect(() => {
23270
+ const [selectedIndex, setSelectedIndex] = React69.useState(getSelectedIndexEmpty());
23271
+ const [highlightedIndex, setHighlightedIndex] = React69.useState(-1);
23272
+ React69.useEffect(() => {
23243
23273
  setFilteredOptions(getOptionsLabeled([...options]));
23244
23274
  }, [options]);
23245
23275
  const canAddValues = maxValues === void 0 || maxValues === 0 || !!multiple && Array.isArray(value) && value.length < maxValues;
23246
- React68.useEffect(() => {
23276
+ React69.useEffect(() => {
23247
23277
  if (disabled) {
23248
23278
  setOpenPopover(false);
23249
23279
  }
23250
23280
  }, [disabled]);
23251
- React68.useEffect(() => {
23281
+ React69.useEffect(() => {
23252
23282
  if (!canAddValues && isOpenPopover) {
23253
23283
  closePopover();
23254
23284
  }
23255
23285
  }, [canAddValues, isOpenPopover]);
23256
- const getLastSelectedIndex = React68.useCallback(() => {
23286
+ const getLastSelectedIndex = React69.useCallback(() => {
23257
23287
  if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
23258
23288
  return selectedIndex[selectedIndex.length - 1];
23259
23289
  } else if (typeof selectedIndex === "number") {
@@ -23261,7 +23291,7 @@ var Autocomplete = function Autocomplete2({
23261
23291
  }
23262
23292
  return void 0;
23263
23293
  }, [selectedIndex]);
23264
- React68.useEffect(() => {
23294
+ React69.useEffect(() => {
23265
23295
  if (isOpenPopover) {
23266
23296
  if (highlightedIndex > -1) {
23267
23297
  virtualListRef.current?.scrollToItem(highlightedIndex);
@@ -23508,7 +23538,6 @@ var Autocomplete = function Autocomplete2({
23508
23538
  filteredOptions,
23509
23539
  isOpen: isOpenPopover,
23510
23540
  virtualListRef,
23511
- listRef,
23512
23541
  addNewValueText,
23513
23542
  isLoading,
23514
23543
  loadingText,
@@ -23537,7 +23566,7 @@ function elementIsDescendantOrEqual(parent2, descendant) {
23537
23566
  }
23538
23567
 
23539
23568
  // src/components/input/TextEditor.tsx
23540
- import React71 from "react";
23569
+ import React72 from "react";
23541
23570
  import { Editor } from "@tinymce/tinymce-react";
23542
23571
  import "tinymce/tinymce";
23543
23572
  import "tinymce/models/dom/model";
@@ -23558,10 +23587,10 @@ import "tinymce/plugins/wordcount";
23558
23587
  import "tinymce/plugins/emoticons/js/emojis";
23559
23588
 
23560
23589
  // src/components/input/CodeEditorPopup.tsx
23561
- import React70 from "react";
23590
+ import React71 from "react";
23562
23591
 
23563
23592
  // src/components/input/CodeEditor.tsx
23564
- import React69 from "react";
23593
+ import React70 from "react";
23565
23594
  import CodeMirror, {
23566
23595
  EditorView
23567
23596
  } from "@uiw/react-codemirror";
@@ -23604,7 +23633,7 @@ var CodeEditor = function CodeEditor2({
23604
23633
  }
23605
23634
  );
23606
23635
  };
23607
- var CodeEditor_default = React69.forwardRef(CodeEditor);
23636
+ var CodeEditor_default = React70.forwardRef(CodeEditor);
23608
23637
 
23609
23638
  // src/components/input/CodeEditorPopup.tsx
23610
23639
  import format from "html-format";
@@ -23624,9 +23653,9 @@ var CodeEditorPopup = ({
23624
23653
  onCancel
23625
23654
  }) => {
23626
23655
  const { t } = useTranslation();
23627
- const [valueModified, setValueModified] = React70.useState(value);
23628
- const [hasErrors, setHasErrors] = React70.useState(false);
23629
- React70.useEffect(() => {
23656
+ const [valueModified, setValueModified] = React71.useState(value);
23657
+ const [hasErrors, setHasErrors] = React71.useState(false);
23658
+ React71.useEffect(() => {
23630
23659
  if (open) {
23631
23660
  setValueModified(value);
23632
23661
  }
@@ -23856,15 +23885,15 @@ var TextEditor = function TextEditor2({
23856
23885
  ...rest
23857
23886
  }) {
23858
23887
  const { t } = useTranslation();
23859
- const editorRef = React71.useRef(null);
23860
- const [internalValue] = React71.useState(
23888
+ const editorRef = React72.useRef(null);
23889
+ const [internalValue] = React72.useState(
23861
23890
  initialValue ?? t("TEXT_EDITOR.INITIAL_VALUE")
23862
23891
  );
23863
- const [contentValue, setContentValue] = React71.useState("");
23864
- const [codeEditorChanges, setCodeEditorChanges] = React71.useState("");
23865
- const [isCodeEditorDirty, setIsCodeEditorDirty] = React71.useState(false);
23866
- const [isCodeEditorOpened, setIsCodeEditorOpened] = React71.useState(false);
23867
- const [isDirty, setIsDirty] = React71.useState(false);
23892
+ const [contentValue, setContentValue] = React72.useState("");
23893
+ const [codeEditorChanges, setCodeEditorChanges] = React72.useState("");
23894
+ const [isCodeEditorDirty, setIsCodeEditorDirty] = React72.useState(false);
23895
+ const [isCodeEditorOpened, setIsCodeEditorOpened] = React72.useState(false);
23896
+ const [isDirty, setIsDirty] = React72.useState(false);
23868
23897
  const codeEditorButtonIndexToUse = codeEditorButtonIndex ?? customToolbarGroups.insert?.items?.length ?? DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.length;
23869
23898
  const defaultToolbarInsertMenuItemsWithCodeEditor = DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.slice();
23870
23899
  defaultToolbarInsertMenuItemsWithCodeEditor.splice(
@@ -23878,12 +23907,12 @@ var TextEditor = function TextEditor2({
23878
23907
  0,
23879
23908
  "cnCodeEditor"
23880
23909
  );
23881
- const onTextChange = React71.useCallback(() => {
23910
+ const onTextChange = React72.useCallback(() => {
23882
23911
  if (editorRef.current) {
23883
23912
  onChange(editorRef.current?.getContent());
23884
23913
  }
23885
23914
  }, [onChange]);
23886
- const onTextEditorDirty = React71.useCallback(
23915
+ const onTextEditorDirty = React72.useCallback(
23887
23916
  (textEditorDirty) => {
23888
23917
  editorRef.current?.setDirty(textEditorDirty);
23889
23918
  setIsDirty(textEditorDirty);
@@ -23896,7 +23925,7 @@ var TextEditor = function TextEditor2({
23896
23925
  },
23897
23926
  [onDirty, onTextChange]
23898
23927
  );
23899
- React71.useEffect(() => {
23928
+ React72.useEffect(() => {
23900
23929
  if (resetDirty && editorRef.current?.isDirty()) {
23901
23930
  onTextEditorDirty(false);
23902
23931
  }
@@ -23904,7 +23933,7 @@ var TextEditor = function TextEditor2({
23904
23933
  onResetDirty();
23905
23934
  }
23906
23935
  }, [onResetDirty, onTextEditorDirty, resetDirty]);
23907
- React71.useEffect(() => {
23936
+ React72.useEffect(() => {
23908
23937
  if (newValue && editorRef.current) {
23909
23938
  editorRef.current.setContent(newValue);
23910
23939
  if (onNewValueSetter) {
@@ -23912,7 +23941,7 @@ var TextEditor = function TextEditor2({
23912
23941
  }
23913
23942
  }
23914
23943
  }, [newValue, onNewValueSetter]);
23915
- React71.useEffect(() => {
23944
+ React72.useEffect(() => {
23916
23945
  if (forceCloseCodeEditor) {
23917
23946
  setIsCodeEditorOpened(false);
23918
23947
  if (onForceCloseCodeEditor) {
@@ -24159,10 +24188,10 @@ var TextEditor = function TextEditor2({
24159
24188
  var TextEditor_default = TextEditor;
24160
24189
 
24161
24190
  // src/components/input/PhoneField.tsx
24162
- import * as React72 from "react";
24191
+ import * as React73 from "react";
24163
24192
  import { Fragment as Fragment31, jsx as jsx129, jsxs as jsxs64 } from "react/jsx-runtime";
24164
24193
  var maxPhoneLengthWithPrefix = 16;
24165
- var PhoneField = React72.forwardRef(function PhoneField2({
24194
+ var PhoneField = React73.forwardRef(function PhoneField2({
24166
24195
  value,
24167
24196
  onChange,
24168
24197
  defaultCountryCode = "34",
@@ -24170,20 +24199,20 @@ var PhoneField = React72.forwardRef(function PhoneField2({
24170
24199
  codeSelectProps,
24171
24200
  ...rest
24172
24201
  }, ref) {
24173
- const [countryCode, setCountryCode] = React72.useState(defaultCountryCode);
24174
- const [textValue, setTextValue] = React72.useState("");
24175
- const countryCodeOptions = React72.useMemo(
24202
+ const [countryCode, setCountryCode] = React73.useState(defaultCountryCode);
24203
+ const [textValue, setTextValue] = React73.useState("");
24204
+ const countryCodeOptions = React73.useMemo(
24176
24205
  () => allCountries.map((c) => ({
24177
24206
  value: c.countryCode,
24178
24207
  label: `+${c.countryCode} ${c.name}`
24179
24208
  })),
24180
24209
  []
24181
24210
  );
24182
- const sanitizeTextValue = React72.useCallback(
24211
+ const sanitizeTextValue = React73.useCallback(
24183
24212
  (value2) => value2.replace(/[^\d]/g, ""),
24184
24213
  []
24185
24214
  );
24186
- const onChangeText = React72.useCallback(
24215
+ const onChangeText = React73.useCallback(
24187
24216
  (event) => {
24188
24217
  const sanitizedTextValue = sanitizeTextValue(
24189
24218
  event.target.value
@@ -24197,7 +24226,7 @@ var PhoneField = React72.forwardRef(function PhoneField2({
24197
24226
  },
24198
24227
  [countryCode, onChange, sanitizeTextValue, textValue]
24199
24228
  );
24200
- const onChangeCountryCode = React72.useCallback(
24229
+ const onChangeCountryCode = React73.useCallback(
24201
24230
  (countryCode2) => {
24202
24231
  const sanitizedTextValue = sanitizeTextValue(textValue).substring(
24203
24232
  0,
@@ -24213,7 +24242,7 @@ var PhoneField = React72.forwardRef(function PhoneField2({
24213
24242
  },
24214
24243
  [onChange, sanitizeTextValue, textValue]
24215
24244
  );
24216
- React72.useEffect(() => {
24245
+ React73.useEffect(() => {
24217
24246
  const countryCode2 = getCountryCode(value);
24218
24247
  if (!countryCode2) {
24219
24248
  setTextValue("");
@@ -24258,7 +24287,7 @@ var PhoneField = React72.forwardRef(function PhoneField2({
24258
24287
  var PhoneField_default = PhoneField;
24259
24288
 
24260
24289
  // src/components/input/NumberField.tsx
24261
- import * as React73 from "react";
24290
+ import * as React74 from "react";
24262
24291
  import { jsx as jsx130, jsxs as jsxs65 } from "react/jsx-runtime";
24263
24292
  var setValueAndTriggerChangeEvent = (r2, value) => {
24264
24293
  const propDescriptor = Object.getOwnPropertyDescriptor(
@@ -24275,7 +24304,7 @@ var setValueAndTriggerChangeEvent = (r2, value) => {
24275
24304
  r2.current.dispatchEvent(e);
24276
24305
  }
24277
24306
  };
24278
- var NumberField = React73.forwardRef(function NumberField2({
24307
+ var NumberField = React74.forwardRef(function NumberField2({
24279
24308
  value,
24280
24309
  type = "integer",
24281
24310
  onChange,
@@ -24291,16 +24320,16 @@ var NumberField = React73.forwardRef(function NumberField2({
24291
24320
  endAdornment,
24292
24321
  ...rest
24293
24322
  }, ref) {
24294
- const inputRef = React73.useRef(null);
24295
- const numberToString = React73.useCallback(
24323
+ const inputRef = React74.useRef(null);
24324
+ const numberToString = React74.useCallback(
24296
24325
  (value2) => typeof value2 === "number" && !isNaN(value2) ? fractionDigits !== 0 ? value2.toFixed(fractionDigits) : value2.toString() : "",
24297
24326
  [fractionDigits]
24298
24327
  );
24299
- const stringToNumber = React73.useCallback(
24328
+ const stringToNumber = React74.useCallback(
24300
24329
  (value2) => !value2 || isNaN(+value2) ? null : +value2,
24301
24330
  []
24302
24331
  );
24303
- const sanitizeDecimalTextValue = React73.useCallback(
24332
+ const sanitizeDecimalTextValue = React74.useCallback(
24304
24333
  (value2) => {
24305
24334
  const negativeSign = value2.charAt(0) === "-" ? "-" : "";
24306
24335
  const numbersAndDots = value2.replace(/[^\d.]/g, "");
@@ -24312,7 +24341,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24312
24341
  },
24313
24342
  [fractionDigits]
24314
24343
  );
24315
- const sanitizeIntegerTextValue = React73.useCallback(
24344
+ const sanitizeIntegerTextValue = React74.useCallback(
24316
24345
  (value2) => {
24317
24346
  const negativeSign = value2.charAt(0) === "-" ? "-" : "";
24318
24347
  const numbers = value2.replace(/[^\d]/g, "");
@@ -24320,7 +24349,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24320
24349
  },
24321
24350
  []
24322
24351
  );
24323
- const _onChange = React73.useCallback(
24352
+ const _onChange = React74.useCallback(
24324
24353
  (event) => {
24325
24354
  const sanitizedTextValue = type === "integer" ? sanitizeIntegerTextValue(event.target.value) : sanitizeDecimalTextValue(event.target.value);
24326
24355
  let numericValue = stringToNumber(sanitizedTextValue);
@@ -24350,7 +24379,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24350
24379
  numberToString
24351
24380
  ]
24352
24381
  );
24353
- const stepUp = React73.useCallback(() => {
24382
+ const stepUp = React74.useCallback(() => {
24354
24383
  if (typeof value === "number" && !isNaN(value)) {
24355
24384
  setValueAndTriggerChangeEvent(
24356
24385
  ref ?? inputRef,
@@ -24363,7 +24392,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24363
24392
  );
24364
24393
  }
24365
24394
  }, [numberToString, ref, step, value]);
24366
- const stepDown = React73.useCallback(() => {
24395
+ const stepDown = React74.useCallback(() => {
24367
24396
  if (typeof value === "number" && !isNaN(value)) {
24368
24397
  setValueAndTriggerChangeEvent(
24369
24398
  ref ?? inputRef,
@@ -24376,7 +24405,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24376
24405
  );
24377
24406
  }
24378
24407
  }, [numberToString, ref, step, value]);
24379
- const _onKeyDown = React73.useCallback(
24408
+ const _onKeyDown = React74.useCallback(
24380
24409
  (event) => {
24381
24410
  onKeyDown && onKeyDown(event);
24382
24411
  if (step <= 0) {
@@ -24395,8 +24424,8 @@ var NumberField = React73.forwardRef(function NumberField2({
24395
24424
  },
24396
24425
  [onKeyDown, step, stepDown, stepUp]
24397
24426
  );
24398
- const [textValue, setTextValue] = React73.useState(numberToString(value));
24399
- const _onBlur = React73.useCallback(
24427
+ const [textValue, setTextValue] = React74.useState(numberToString(value));
24428
+ const _onBlur = React74.useCallback(
24400
24429
  (event) => {
24401
24430
  onBlur && onBlur(event);
24402
24431
  const text = numberToString(value);
@@ -24458,7 +24487,7 @@ var NumberField = React73.forwardRef(function NumberField2({
24458
24487
  }
24459
24488
  )
24460
24489
  ] }) : endAdornment;
24461
- React73.useEffect(() => {
24490
+ React74.useEffect(() => {
24462
24491
  if (stringToNumber(textValue) !== value) {
24463
24492
  setTextValue(numberToString(value));
24464
24493
  }
@@ -24479,11 +24508,11 @@ var NumberField = React73.forwardRef(function NumberField2({
24479
24508
  var NumberField_default = NumberField;
24480
24509
 
24481
24510
  // src/components/input/DatePicker.tsx
24482
- import * as React75 from "react";
24511
+ import * as React76 from "react";
24483
24512
  import { tz as tz8 } from "moment-timezone";
24484
24513
 
24485
24514
  // src/components/input/DatePickerStatic.tsx
24486
- import * as React74 from "react";
24515
+ import * as React75 from "react";
24487
24516
  import { tz as tz7 } from "moment-timezone";
24488
24517
  import { jsx as jsx131, jsxs as jsxs66 } from "react/jsx-runtime";
24489
24518
  var minYear = 1900;
@@ -24494,13 +24523,13 @@ var DatePickerStatic = ({
24494
24523
  minDate,
24495
24524
  maxDate
24496
24525
  }) => {
24497
- const { timezone } = React74.useContext(IntlContext);
24498
- const [selectedDateParts, setSelectedDateParts] = React74.useState(void 0);
24499
- const [visibleMonth, setVisibleMonth] = React74.useState({
24526
+ const { timezone } = React75.useContext(IntlContext);
24527
+ const [selectedDateParts, setSelectedDateParts] = React75.useState(void 0);
24528
+ const [visibleMonth, setVisibleMonth] = React75.useState({
24500
24529
  year: minYear,
24501
24530
  month: 0
24502
24531
  });
24503
- React74.useEffect(() => {
24532
+ React75.useEffect(() => {
24504
24533
  if (selectedDateParts) {
24505
24534
  setVisibleMonth({
24506
24535
  year: selectedDateParts.year,
@@ -24514,7 +24543,7 @@ var DatePickerStatic = ({
24514
24543
  });
24515
24544
  }
24516
24545
  }, [selectedDateParts, timezone]);
24517
- React74.useEffect(() => {
24546
+ React75.useEffect(() => {
24518
24547
  if (!value || isNaN(value.getTime())) {
24519
24548
  setSelectedDateParts(void 0);
24520
24549
  return;
@@ -24536,25 +24565,25 @@ var DatePickerStatic = ({
24536
24565
  const endYear = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getFullYear() : maxYear;
24537
24566
  const startMonth = minDate && !isNaN(minDate.getTime()) ? minDate.getMonth() : 0;
24538
24567
  const endMonth = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getMonth() : 11;
24539
- const options = React74.useMemo(
24568
+ const options = React75.useMemo(
24540
24569
  () => Array.from(Array(endYear - startYear + 1)).map((_, i) => ({
24541
24570
  value: startYear + i
24542
24571
  })),
24543
24572
  [endYear, startYear]
24544
24573
  );
24545
- const navigatePreviousMonth = React74.useCallback(() => {
24574
+ const navigatePreviousMonth = React75.useCallback(() => {
24546
24575
  setVisibleMonth({
24547
24576
  month: visibleMonth.month === 0 ? 11 : visibleMonth.month - 1,
24548
24577
  year: visibleMonth.month === 0 ? visibleMonth.year - 1 : visibleMonth.year
24549
24578
  });
24550
24579
  }, [visibleMonth]);
24551
- const navigateNextMonth = React74.useCallback(() => {
24580
+ const navigateNextMonth = React75.useCallback(() => {
24552
24581
  setVisibleMonth({
24553
24582
  month: visibleMonth.month === 11 ? 0 : visibleMonth.month + 1,
24554
24583
  year: visibleMonth.month === 11 ? visibleMonth.year + 1 : visibleMonth.year
24555
24584
  });
24556
24585
  }, [visibleMonth]);
24557
- const onChangeYear = React74.useCallback(
24586
+ const onChangeYear = React75.useCallback(
24558
24587
  (value2) => {
24559
24588
  const month = value2 === startYear ? Math.max(startMonth, visibleMonth.month) : value2 === endYear ? Math.min(endMonth, visibleMonth.month) : visibleMonth.month;
24560
24589
  setVisibleMonth({
@@ -24564,11 +24593,11 @@ var DatePickerStatic = ({
24564
24593
  },
24565
24594
  [endMonth, endYear, startMonth, startYear, visibleMonth.month]
24566
24595
  );
24567
- const minSimpleDate = React74.useMemo(
24596
+ const minSimpleDate = React75.useMemo(
24568
24597
  () => dateToSimpleDate(minDate, timezone),
24569
24598
  [minDate, timezone]
24570
24599
  );
24571
- const maxSimpleDate = React74.useMemo(
24600
+ const maxSimpleDate = React75.useMemo(
24572
24601
  () => dateToSimpleDate(maxDate, timezone),
24573
24602
  [maxDate, timezone]
24574
24603
  );
@@ -24680,18 +24709,18 @@ var DatePickerPopover_default = DatePickerPopover;
24680
24709
 
24681
24710
  // src/components/input/DatePicker.tsx
24682
24711
  import { Fragment as Fragment32, jsx as jsx133, jsxs as jsxs67 } from "react/jsx-runtime";
24683
- var DatePicker = React75.forwardRef(
24712
+ var DatePicker = React76.forwardRef(
24684
24713
  function DatePicker2({ value, onChange, onBlur, onKeyDown, minDate, maxDate, ...rest }, ref) {
24685
- const { locale, timezone } = React75.useContext(IntlContext);
24714
+ const { locale, timezone } = React76.useContext(IntlContext);
24686
24715
  const dateInputFormat = getDateInputFormatForLocale(locale);
24687
24716
  const { t } = useTranslation();
24688
- const dateInputFormatPlaceholder = React75.useMemo(
24717
+ const dateInputFormatPlaceholder = React76.useMemo(
24689
24718
  () => 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")),
24690
24719
  [dateInputFormat, t]
24691
24720
  );
24692
- const _containerRef = React75.useRef(null);
24693
- const [isPopoverOpen, setPopoverOpen] = React75.useState(false);
24694
- const [textValue, setTextValue] = React75.useState("");
24721
+ const _containerRef = React76.useRef(null);
24722
+ const [isPopoverOpen, setPopoverOpen] = React76.useState(false);
24723
+ const [textValue, setTextValue] = React76.useState("");
24695
24724
  let anchorEl = null;
24696
24725
  if (isPopoverOpen) {
24697
24726
  if (rest.containerRef && typeof rest.containerRef === "object" && rest.containerRef.current) {
@@ -24700,21 +24729,21 @@ var DatePicker = React75.forwardRef(
24700
24729
  anchorEl = _containerRef.current;
24701
24730
  }
24702
24731
  }
24703
- const isValidDate = React75.useCallback(
24732
+ const isValidDate = React76.useCallback(
24704
24733
  (dateString) => {
24705
24734
  const date = parseDateForLocale(dateString, locale, timezone);
24706
24735
  return !isNaN(date.getTime()) && (!minDate || date >= minDate) && (!maxDate || date <= maxDate);
24707
24736
  },
24708
24737
  [locale, maxDate, minDate, timezone]
24709
24738
  );
24710
- const onSelect = React75.useCallback(
24739
+ const onSelect = React76.useCallback(
24711
24740
  (date) => {
24712
24741
  setPopoverOpen(false);
24713
24742
  onChange && onChange(date);
24714
24743
  },
24715
24744
  [onChange]
24716
24745
  );
24717
- const onChangeTextField = React75.useCallback(
24746
+ const onChangeTextField = React76.useCallback(
24718
24747
  (event) => {
24719
24748
  setTextValue(event.target.value);
24720
24749
  if (!event.target.value && value) {
@@ -24733,7 +24762,7 @@ var DatePicker = React75.forwardRef(
24733
24762
  },
24734
24763
  [isValidDate, locale, onChange, timezone, value]
24735
24764
  );
24736
- const onBlurTextField = React75.useCallback(
24765
+ const onBlurTextField = React76.useCallback(
24737
24766
  (event) => {
24738
24767
  if (!isValidDate(event.target.value)) {
24739
24768
  value ? onChange && onChange(null) : setTextValue("");
@@ -24742,7 +24771,7 @@ var DatePicker = React75.forwardRef(
24742
24771
  },
24743
24772
  [isValidDate, onChange, onBlur, value]
24744
24773
  );
24745
- const onKeyDownTextField = React75.useCallback(
24774
+ const onKeyDownTextField = React76.useCallback(
24746
24775
  (event) => {
24747
24776
  if (event.key === "ArrowDown") {
24748
24777
  setPopoverOpen(true);
@@ -24751,7 +24780,7 @@ var DatePicker = React75.forwardRef(
24751
24780
  },
24752
24781
  [onKeyDown]
24753
24782
  );
24754
- React75.useEffect(() => {
24783
+ React76.useEffect(() => {
24755
24784
  const text = value && !isNaN(value.getTime()) ? tz8(value, timezone).format(dateInputFormat) : "";
24756
24785
  setTextValue(text);
24757
24786
  }, [dateInputFormat, timezone, value]);
@@ -24870,11 +24899,11 @@ var Checkbox = ({
24870
24899
  var Checkbox_default = Checkbox;
24871
24900
 
24872
24901
  // src/components/input/Radio.tsx
24873
- import * as React76 from "react";
24902
+ import * as React77 from "react";
24874
24903
  import MuiRadio from "@mui/material/Radio";
24875
24904
  import { FormControlLabel as FormControlLabel2 } from "@mui/material";
24876
24905
  import { Fragment as Fragment34, jsx as jsx135, jsxs as jsxs69 } from "react/jsx-runtime";
24877
- var Radio = React76.forwardRef(function Radio2({
24906
+ var Radio = React77.forwardRef(function Radio2({
24878
24907
  label,
24879
24908
  labelPlacement = "end",
24880
24909
  onChange,
@@ -24885,7 +24914,7 @@ var Radio = React76.forwardRef(function Radio2({
24885
24914
  size = "M",
24886
24915
  ...rest
24887
24916
  }, ref) {
24888
- const _onChange = React76.useCallback(
24917
+ const _onChange = React77.useCallback(
24889
24918
  (event) => {
24890
24919
  onChange && onChange(event, event.target.value);
24891
24920
  },
@@ -24929,7 +24958,7 @@ var Radio = React76.forwardRef(function Radio2({
24929
24958
  var Radio_default = Radio;
24930
24959
 
24931
24960
  // src/components/input/PageSelector.tsx
24932
- import * as React77 from "react";
24961
+ import * as React78 from "react";
24933
24962
  import { jsx as jsx136, jsxs as jsxs70 } from "react/jsx-runtime";
24934
24963
  var PageSelector = ({
24935
24964
  currentPage,
@@ -24938,12 +24967,12 @@ var PageSelector = ({
24938
24967
  text,
24939
24968
  onPageChange
24940
24969
  }) => {
24941
- const handlePrevious = React77.useCallback(() => {
24970
+ const handlePrevious = React78.useCallback(() => {
24942
24971
  if (currentPage > 1) {
24943
24972
  onPageChange(Math.max(1, currentPage - 1));
24944
24973
  }
24945
24974
  }, [currentPage, onPageChange]);
24946
- const handleNext = React77.useCallback(() => {
24975
+ const handleNext = React78.useCallback(() => {
24947
24976
  onPageChange(
24948
24977
  Math.min(Math.ceil(totalItems / pageSize), currentPage + 1)
24949
24978
  );
@@ -25041,7 +25070,7 @@ var LinearProgress = ({
25041
25070
  var LinearProgress_default = LinearProgress;
25042
25071
 
25043
25072
  // src/components/progress/CircularProgress.tsx
25044
- import * as React78 from "react";
25073
+ import * as React79 from "react";
25045
25074
  import MuiCircularProgress from "@mui/material/CircularProgress";
25046
25075
  import Typography3 from "@mui/material/Typography";
25047
25076
  import Box4 from "@mui/material/Box";
@@ -25067,7 +25096,7 @@ var CircularProgress = ({
25067
25096
  typographyColor = black,
25068
25097
  gradientColors
25069
25098
  }) => {
25070
- const gradientName = React78.useRef(
25099
+ const gradientName = React79.useRef(
25071
25100
  gradientColors ? crypto.randomUUID() : void 0
25072
25101
  );
25073
25102
  return /* @__PURE__ */ jsxs71(
@@ -25358,7 +25387,7 @@ var Loader = ({
25358
25387
  var Loader_default = Loader;
25359
25388
 
25360
25389
  // src/components/markdown/MarkdownRenderer.tsx
25361
- import React79 from "react";
25390
+ import React80 from "react";
25362
25391
  import Markdown from "markdown-to-jsx";
25363
25392
  import { styled as styled8 } from "@mui/material/styles";
25364
25393
  import "katex/dist/katex.min.css";
@@ -25501,12 +25530,12 @@ var renderWithMath = (text) => {
25501
25530
  }
25502
25531
  return parts;
25503
25532
  };
25504
- var renderChildrenWithMath = (children) => React79.Children.map(children, (child) => {
25533
+ var renderChildrenWithMath = (children) => React80.Children.map(children, (child) => {
25505
25534
  if (typeof child === "string") {
25506
25535
  return renderWithMath(child);
25507
25536
  }
25508
- if (React79.isValidElement(child)) {
25509
- return React79.cloneElement(child, {
25537
+ if (React80.isValidElement(child)) {
25538
+ return React80.cloneElement(child, {
25510
25539
  ...child.props,
25511
25540
  children: renderChildrenWithMath(child.props.children)
25512
25541
  });
@@ -25623,10 +25652,10 @@ var Navbar = ({
25623
25652
  var Navbar_default = Navbar;
25624
25653
 
25625
25654
  // src/components/navbar/NavbarButton.tsx
25626
- import * as React80 from "react";
25655
+ import * as React81 from "react";
25627
25656
  import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
25628
25657
  import { jsx as jsx144, jsxs as jsxs75 } from "react/jsx-runtime";
25629
- var NavbarButton = React80.forwardRef(
25658
+ var NavbarButton = React81.forwardRef(
25630
25659
  function NavbarButton2({
25631
25660
  iconId,
25632
25661
  srcUrl,
@@ -25769,10 +25798,10 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx145(
25769
25798
  var NavbarHeader_default = NavbarHeader;
25770
25799
 
25771
25800
  // src/components/navbar/NavbarLogo.tsx
25772
- import * as React81 from "react";
25801
+ import * as React82 from "react";
25773
25802
  import { ButtonBase as ButtonBase3 } from "@mui/material";
25774
25803
  import { jsx as jsx146 } from "react/jsx-runtime";
25775
- var NavbarLogo = React81.forwardRef(
25804
+ var NavbarLogo = React82.forwardRef(
25776
25805
  function NavbarButton3({ src, ...rest }, ref) {
25777
25806
  return /* @__PURE__ */ jsx146(
25778
25807
  ButtonBase3,
@@ -25793,7 +25822,7 @@ var NavbarLogo = React81.forwardRef(
25793
25822
  var NavbarLogo_default = NavbarLogo;
25794
25823
 
25795
25824
  // src/components/overlay/DonutFocusOverlay.tsx
25796
- import * as React82 from "react";
25825
+ import * as React83 from "react";
25797
25826
  import { Fragment as Fragment36, jsx as jsx147, jsxs as jsxs76 } from "react/jsx-runtime";
25798
25827
  var DonutFocusOverlay = ({
25799
25828
  isVisible,
@@ -25803,8 +25832,8 @@ var DonutFocusOverlay = ({
25803
25832
  chipLabel,
25804
25833
  chipPosition = "right"
25805
25834
  }) => {
25806
- const [clientRect, setClientRect] = React82.useState();
25807
- React82.useEffect(() => {
25835
+ const [clientRect, setClientRect] = React83.useState();
25836
+ React83.useEffect(() => {
25808
25837
  if (!elementRef?.current) {
25809
25838
  setClientRect(void 0);
25810
25839
  return;
@@ -25953,17 +25982,17 @@ var Pager_default = Pager;
25953
25982
 
25954
25983
  // src/components/scrollable/HorizontalScrollable.tsx
25955
25984
  import { ButtonBase as ButtonBase4 } from "@mui/material";
25956
- import * as React83 from "react";
25985
+ import * as React84 from "react";
25957
25986
  import { jsx as jsx149, jsxs as jsxs78 } from "react/jsx-runtime";
25958
25987
  var HorizontalScrollable = ({
25959
25988
  style: style3,
25960
25989
  children,
25961
25990
  stepDistance = 200
25962
25991
  }) => {
25963
- const horizontalContainerRef = React83.useRef(null);
25964
- const [isLeftArrowHidden, setLeftArrowHidden] = React83.useState(true);
25965
- const [isRightArrowHidden, setRightArrowHidden] = React83.useState(true);
25966
- React83.useEffect(() => {
25992
+ const horizontalContainerRef = React84.useRef(null);
25993
+ const [isLeftArrowHidden, setLeftArrowHidden] = React84.useState(true);
25994
+ const [isRightArrowHidden, setRightArrowHidden] = React84.useState(true);
25995
+ React84.useEffect(() => {
25967
25996
  if (!horizontalContainerRef.current) {
25968
25997
  return;
25969
25998
  }
@@ -26068,7 +26097,7 @@ var HorizontalScrollable = ({
26068
26097
  var HorizontalScrollable_default = HorizontalScrollable;
26069
26098
 
26070
26099
  // src/components/scrollable/Carousel.tsx
26071
- import * as React84 from "react";
26100
+ import * as React85 from "react";
26072
26101
  import { jsx as jsx150, jsxs as jsxs79 } from "react/jsx-runtime";
26073
26102
  var buttonStyles = {
26074
26103
  color: grey800,
@@ -26087,24 +26116,24 @@ function Carousel({
26087
26116
  gap: gap2 = 8,
26088
26117
  padding: padding2 = 8
26089
26118
  }) {
26090
- const rootRef = React84.useRef(null);
26091
- const containerRef = React84.useRef(null);
26092
- const previousClientWidth = React84.useRef(null);
26093
- const isScrolling = React84.useRef(false);
26094
- const [isLeftArrowHidden, setLeftArrowHidden] = React84.useState(true);
26095
- const [isRightArrowHidden, setRightArrowHidden] = React84.useState(true);
26096
- const [paddingElement, setPaddingElement] = React84.useState();
26097
- const [visibleCount, setVisibleCount] = React84.useState();
26098
- const showedElementsRef = React84.useRef();
26099
- const [showedElements, setShowedElements] = React84.useState();
26100
- const updateArrows = React84.useCallback(() => {
26119
+ const rootRef = React85.useRef(null);
26120
+ const containerRef = React85.useRef(null);
26121
+ const previousClientWidth = React85.useRef(null);
26122
+ const isScrolling = React85.useRef(false);
26123
+ const [isLeftArrowHidden, setLeftArrowHidden] = React85.useState(true);
26124
+ const [isRightArrowHidden, setRightArrowHidden] = React85.useState(true);
26125
+ const [paddingElement, setPaddingElement] = React85.useState();
26126
+ const [visibleCount, setVisibleCount] = React85.useState();
26127
+ const showedElementsRef = React85.useRef();
26128
+ const [showedElements, setShowedElements] = React85.useState();
26129
+ const updateArrows = React85.useCallback(() => {
26101
26130
  if (!showedElementsRef.current) {
26102
26131
  return;
26103
26132
  }
26104
26133
  setLeftArrowHidden(showedElementsRef.current.start === 0);
26105
26134
  setRightArrowHidden(showedElementsRef.current.end === items.length - 1);
26106
26135
  }, [items.length]);
26107
- const getUsableWidth = React84.useCallback(
26136
+ const getUsableWidth = React85.useCallback(
26108
26137
  (el) => {
26109
26138
  let current = el;
26110
26139
  while (current) {
@@ -26118,7 +26147,7 @@ function Carousel({
26118
26147
  },
26119
26148
  []
26120
26149
  );
26121
- const resetCarousel = React84.useCallback(
26150
+ const resetCarousel = React85.useCallback(
26122
26151
  (root, container) => {
26123
26152
  root.style.width = "";
26124
26153
  showedElementsRef.current = void 0;
@@ -26127,7 +26156,7 @@ function Carousel({
26127
26156
  },
26128
26157
  []
26129
26158
  );
26130
- const setMeasures = React84.useCallback(
26159
+ const setMeasures = React85.useCallback(
26131
26160
  (root, container, nextElementsIndex) => {
26132
26161
  const children = Array.from(container.children);
26133
26162
  if (children.length === 0) {
@@ -26156,7 +26185,7 @@ function Carousel({
26156
26185
  },
26157
26186
  [gap2, getUsableWidth, items.length, padding2]
26158
26187
  );
26159
- const updateVisibleCount = React84.useCallback(() => {
26188
+ const updateVisibleCount = React85.useCallback(() => {
26160
26189
  const root = rootRef.current;
26161
26190
  const container = containerRef.current;
26162
26191
  if (!container || !parent) {
@@ -26202,7 +26231,7 @@ function Carousel({
26202
26231
  updateArrows,
26203
26232
  resetCarousel
26204
26233
  ]);
26205
- const getInitialWidth = React84.useCallback(
26234
+ const getInitialWidth = React85.useCallback(
26206
26235
  (el) => {
26207
26236
  let current = el;
26208
26237
  let width2 = 0;
@@ -26220,7 +26249,7 @@ function Carousel({
26220
26249
  },
26221
26250
  []
26222
26251
  );
26223
- const resizeObserverCallback = React84.useCallback(() => {
26252
+ const resizeObserverCallback = React85.useCallback(() => {
26224
26253
  if (!rootRef.current || !containerRef.current) {
26225
26254
  return;
26226
26255
  }
@@ -26231,7 +26260,7 @@ function Carousel({
26231
26260
  previousClientWidth.current = newClientWidth;
26232
26261
  updateVisibleCount();
26233
26262
  }, [getInitialWidth, updateVisibleCount]);
26234
- React84.useEffect(() => {
26263
+ React85.useEffect(() => {
26235
26264
  const container = containerRef.current;
26236
26265
  if (!container) {
26237
26266
  return;
@@ -26424,7 +26453,7 @@ import {
26424
26453
  } from "notistack";
26425
26454
 
26426
26455
  // src/components/snackbar/Snackbar.tsx
26427
- import * as React85 from "react";
26456
+ import * as React86 from "react";
26428
26457
  import { SnackbarContent } from "notistack";
26429
26458
  import { Typography as Typography4 } from "@mui/material";
26430
26459
  import { jsx as jsx152, jsxs as jsxs80 } from "react/jsx-runtime";
@@ -26452,7 +26481,7 @@ var iconColors = {
26452
26481
  error: error300,
26453
26482
  warning: complementary300
26454
26483
  };
26455
- var Snackbar = React85.forwardRef(
26484
+ var Snackbar = React86.forwardRef(
26456
26485
  function Snackbar2({
26457
26486
  severity = "info",
26458
26487
  message,
@@ -26464,10 +26493,10 @@ var Snackbar = React85.forwardRef(
26464
26493
  identifierKey: key,
26465
26494
  dataTestKey
26466
26495
  }, ref) {
26467
- const actionClickHandler = React85.useCallback(() => {
26496
+ const actionClickHandler = React86.useCallback(() => {
26468
26497
  onActionClick && onActionClick(key);
26469
26498
  }, [onActionClick, key]);
26470
- const closeClickHandler = React85.useCallback(() => {
26499
+ const closeClickHandler = React86.useCallback(() => {
26471
26500
  onCloseClick && onCloseClick(key);
26472
26501
  }, [onCloseClick, key]);
26473
26502
  return /* @__PURE__ */ jsx152(
@@ -26633,12 +26662,12 @@ var TabButton = ({
26633
26662
  var TabButton_default = TabButton;
26634
26663
 
26635
26664
  // src/components/tab/Tabs.tsx
26636
- import * as React87 from "react";
26665
+ import * as React88 from "react";
26637
26666
  import MuiTabs from "@mui/material/Tabs";
26638
26667
 
26639
26668
  // src/components/layout/SwipeableViews.tsx
26640
- import * as React86 from "react";
26641
- import { useEffect as useEffect23, useRef as useRef25, useState as useState34 } from "react";
26669
+ import * as React87 from "react";
26670
+ import { useEffect as useEffect22, useRef as useRef26, useState as useState34 } from "react";
26642
26671
  import { jsx as jsx155 } from "react/jsx-runtime";
26643
26672
  var styles = {
26644
26673
  container: {
@@ -26672,12 +26701,12 @@ function SwipeableViews({
26672
26701
  disableScroll = false,
26673
26702
  ...rootProps
26674
26703
  }) {
26675
- const containerRef = useRef25(null);
26676
- const scrollTimeout = useRef25();
26677
- const scrollingMethod = useRef25("none");
26704
+ const containerRef = useRef26(null);
26705
+ const scrollTimeout = useRef26();
26706
+ const scrollingMethod = useRef26("none");
26678
26707
  const [previousIndex, setPreviousIndex] = useState34(index);
26679
- const hideScrollAnimation = useRef25(true);
26680
- useEffect23(() => {
26708
+ const hideScrollAnimation = useRef26(true);
26709
+ useEffect22(() => {
26681
26710
  if (containerRef.current) {
26682
26711
  if (scrollingMethod.current === "manual") {
26683
26712
  scrollingMethod.current = "none";
@@ -26737,9 +26766,9 @@ function SwipeableViews({
26737
26766
  );
26738
26767
  }, 100);
26739
26768
  },
26740
- children: React86.Children.map(children, (child, childIndex) => {
26769
+ children: React87.Children.map(children, (child, childIndex) => {
26741
26770
  let mountedChild = false;
26742
- if (React86.isValidElement(child)) {
26771
+ if (React87.isValidElement(child)) {
26743
26772
  mountedChild = !!child.props.keepMounted;
26744
26773
  }
26745
26774
  return /* @__PURE__ */ jsx155(
@@ -26782,8 +26811,8 @@ var Tabs = ({
26782
26811
  hideLineTabs = false,
26783
26812
  backgroundScrollButtons = Colors_exports.white
26784
26813
  }) => {
26785
- const tabsRef = React87.useRef(null);
26786
- const [value, setValue] = React87.useState(0);
26814
+ const tabsRef = React88.useRef(null);
26815
+ const [value, setValue] = React88.useState(0);
26787
26816
  const measureTextWidthRange = (child) => {
26788
26817
  const walker = document.createTreeWalker(child, NodeFilter.SHOW_TEXT, {
26789
26818
  acceptNode: (node) => node.textContent?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
@@ -26797,7 +26826,7 @@ var Tabs = ({
26797
26826
  const rect = range.getBoundingClientRect();
26798
26827
  return Math.round(rect.width);
26799
26828
  };
26800
- const waitForSmoothScrollEnd = React87.useCallback(
26829
+ const waitForSmoothScrollEnd = React88.useCallback(
26801
26830
  (container, onEnd) => {
26802
26831
  let prev = container.scrollLeft;
26803
26832
  let idleFrames = 0;
@@ -26821,7 +26850,7 @@ var Tabs = ({
26821
26850
  },
26822
26851
  []
26823
26852
  );
26824
- const calculateIndicatorTabWidth = React87.useCallback((index) => {
26853
+ const calculateIndicatorTabWidth = React88.useCallback((index) => {
26825
26854
  if (!tabsRef.current) {
26826
26855
  return null;
26827
26856
  }
@@ -26840,7 +26869,7 @@ var Tabs = ({
26840
26869
  indicator.style.width = `${textWidth}px`;
26841
26870
  indicator.style.left = `${left}px`;
26842
26871
  }, []);
26843
- React87.useEffect(() => {
26872
+ React88.useEffect(() => {
26844
26873
  if (!tabsRef.current) {
26845
26874
  return;
26846
26875
  }
@@ -27047,12 +27076,12 @@ var TableCell = ({
27047
27076
  var TableCell_default = TableCell;
27048
27077
 
27049
27078
  // src/components/table/TableCellCopy.tsx
27050
- import * as React88 from "react";
27079
+ import * as React89 from "react";
27051
27080
  import { jsx as jsx163 } from "react/jsx-runtime";
27052
27081
  var TableCellCopy = ({ text, textToCopy, ...rest }) => {
27053
27082
  const { t } = useTranslation();
27054
- const [isCopied, setIsCopied] = React88.useState(false);
27055
- const [showIcon, setShowIcon] = React88.useState(false);
27083
+ const [isCopied, setIsCopied] = React89.useState(false);
27084
+ const [showIcon, setShowIcon] = React89.useState(false);
27056
27085
  const manageButtonClicked = () => {
27057
27086
  void navigator.clipboard.writeText(textToCopy ?? text);
27058
27087
  if (isCopied) {
@@ -27187,9 +27216,9 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
27187
27216
 
27188
27217
  // src/components/toolbar/ToolbarBreadcrumbButton.tsx
27189
27218
  import { ButtonBase as ButtonBase5 } from "@mui/material";
27190
- import * as React89 from "react";
27219
+ import * as React90 from "react";
27191
27220
  import { jsx as jsx168 } from "react/jsx-runtime";
27192
- var ToolbarBreadcrumbButton = React89.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
27221
+ var ToolbarBreadcrumbButton = React90.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
27193
27222
  return /* @__PURE__ */ jsx168(
27194
27223
  ButtonBase5,
27195
27224
  {
@@ -27301,17 +27330,17 @@ var Toolbar = ({
27301
27330
  var Toolbar_default = Toolbar;
27302
27331
 
27303
27332
  // src/components/toolbar/ToolbarTitle.tsx
27304
- import * as React90 from "react";
27333
+ import * as React91 from "react";
27305
27334
  import { useState as useState37 } from "react";
27306
27335
  import { jsx as jsx170, jsxs as jsxs83 } from "react/jsx-runtime";
27307
- var ToolbarTitle = React90.forwardRef(function ToolbarTitle2({
27336
+ var ToolbarTitle = React91.forwardRef(function ToolbarTitle2({
27308
27337
  title,
27309
27338
  align = "left",
27310
27339
  className,
27311
27340
  hoverActions,
27312
27341
  color: color2 = grey900
27313
27342
  }, ref) {
27314
- const textElementRef = React90.useRef(null);
27343
+ const textElementRef = React91.useRef(null);
27315
27344
  const [showHoverActions, setShowHoverActions] = useState37(false);
27316
27345
  return /* @__PURE__ */ jsx170(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx170(
27317
27346
  TextEllipsisTooltip_default,
@@ -27553,7 +27582,7 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
27553
27582
  var WidgetTitle_default = WidgetTitle;
27554
27583
 
27555
27584
  // src/components/window/MinimizableWindow.tsx
27556
- import * as React91 from "react";
27585
+ import * as React92 from "react";
27557
27586
  import { Fragment as Fragment38, jsx as jsx175, jsxs as jsxs85 } from "react/jsx-runtime";
27558
27587
  var sizes6 = {
27559
27588
  M: 400,
@@ -27579,7 +27608,7 @@ var iconButtonsStyles = {
27579
27608
  backgroundColor: "rgba(255, 255, 255, 0.2)"
27580
27609
  }
27581
27610
  };
27582
- var MinimizableWindow = React91.forwardRef(function MinimizableWindow2({
27611
+ var MinimizableWindow = React92.forwardRef(function MinimizableWindow2({
27583
27612
  children,
27584
27613
  title,
27585
27614
  size = "M",
@@ -27599,17 +27628,17 @@ var MinimizableWindow = React91.forwardRef(function MinimizableWindow2({
27599
27628
  onBack
27600
27629
  }, ref) {
27601
27630
  const { t } = useTranslation();
27602
- const overlayRef = React91.useRef(null);
27603
- const windowRef = React91.useRef(null);
27604
- const headerRef = React91.useRef(null);
27605
- const [isDraggingState, setIsDraggingState] = React91.useState(false);
27606
- const diffRef = React91.useRef({ x: 0, y: 0 });
27607
- React91.useImperativeHandle(ref, () => ({
27631
+ const overlayRef = React92.useRef(null);
27632
+ const windowRef = React92.useRef(null);
27633
+ const headerRef = React92.useRef(null);
27634
+ const [isDraggingState, setIsDraggingState] = React92.useState(false);
27635
+ const diffRef = React92.useRef({ x: 0, y: 0 });
27636
+ React92.useImperativeHandle(ref, () => ({
27608
27637
  window: windowRef.current,
27609
27638
  header: headerRef.current,
27610
27639
  overlay: overlayRef.current
27611
27640
  }));
27612
- React91.useEffect(() => {
27641
+ React92.useEffect(() => {
27613
27642
  if (open) {
27614
27643
  overlayRef.current?.style.removeProperty("transform");
27615
27644
  overlayRef.current?.style.removeProperty("opacity");
@@ -27837,31 +27866,31 @@ var MinimizableWindow = React91.forwardRef(function MinimizableWindow2({
27837
27866
  var MinimizableWindow_default = MinimizableWindow;
27838
27867
 
27839
27868
  // src/hooks/useFormatters.ts
27840
- import { useCallback as useCallback22, useContext as useContext16 } from "react";
27869
+ import { useCallback as useCallback23, useContext as useContext16 } from "react";
27841
27870
  var useFormatters = () => {
27842
27871
  const { locale, currency, timezone } = useContext16(IntlContext);
27843
27872
  return {
27844
- formatCompactNumber: useCallback22(
27873
+ formatCompactNumber: useCallback23(
27845
27874
  (value) => formatCompactNumber(value, locale),
27846
27875
  [locale]
27847
27876
  ),
27848
- formatNumber: useCallback22(
27877
+ formatNumber: useCallback23(
27849
27878
  (value, fractionSize) => formatNumber(value, locale, fractionSize),
27850
27879
  [locale]
27851
27880
  ),
27852
- formatPercentage: useCallback22(
27881
+ formatPercentage: useCallback23(
27853
27882
  (value, fractionSize) => formatPercentage(value, locale, fractionSize),
27854
27883
  [locale]
27855
27884
  ),
27856
- formatCurrency: useCallback22(
27885
+ formatCurrency: useCallback23(
27857
27886
  (value, notation) => formatCurrency(value, locale, currency, notation),
27858
27887
  [currency, locale]
27859
27888
  ),
27860
- formatDate: useCallback22(
27889
+ formatDate: useCallback23(
27861
27890
  (date, format2) => formatDate(date, locale, timezone, format2),
27862
27891
  [locale, timezone]
27863
27892
  ),
27864
- formatPhone: useCallback22(
27893
+ formatPhone: useCallback23(
27865
27894
  (phone, format2) => formatPhone(phone, format2),
27866
27895
  []
27867
27896
  )