@apia/components 4.0.18 → 4.0.20

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
@@ -3,11 +3,11 @@ import * as React from 'react';
3
3
  import React__default, { createContext, useContext, useEffect, useMemo, useState, useCallback, useRef, forwardRef, Fragment as Fragment$1, useDeferredValue, lazy, Suspense, useTransition, Children, memo, isValidElement, cloneElement } from 'react';
4
4
  import parse, { domToReact, Element } from 'html-react-parser';
5
5
  import { Spinner as Spinner$1, Box as Box$1 } from 'theme-ui';
6
- import { uniqueId as uniqueId$3, debounce, cloneDeep, isFunction as isFunction$1 } from 'lodash-es';
6
+ import { uniqueId as uniqueId$3, debounce, cloneDeep, isFunction } from 'lodash-es';
7
7
  import { Box, getVariant, useBreakpointIndex, Close, responsive, spacing, Heading, Button, Spinner, createElement, Select, Input, Flex, IconButton as IconButton$1, Image, injectStyles, Progress, Label, Paragraph, Container, Form, focusOutline, makeStyledComponent, useThemeUI, Grid, Textarea } from '@apia/theme';
8
8
  import { BarLoader } from 'react-spinners';
9
9
  import uniqueId$2 from 'lodash-es/uniqueId';
10
- import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, EventEmitter, useMount, getLabel, getSpecificParent, customEvents, isChild, useUnmount, StatefulEmitter, shallowEqual as shallowEqual$1, debugDispatcher, getDateFormat, AudioRecorder, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, arrayOrArray } from '@apia/util';
10
+ import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, EventEmitter, useMount, getLabel, getSpecificParent, customEvents, isChild, useUnmount, StatefulEmitter, shallowEqual as shallowEqual$1, getDateFormat, AudioRecorder, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, arrayOrArray } from '@apia/util';
11
11
  import usePortal from 'react-cool-portal';
12
12
  import { CSSTransition } from 'react-transition-group';
13
13
  import { uniqueId as uniqueId$1, defaultNotifier, NotificationsList } from '@apia/notifications';
@@ -20,12 +20,14 @@ import { useMenuState, ControlledMenu, MenuItem, MenuDivider, SubMenu } from '@s
20
20
  import { shallowEqual } from '@apia/store';
21
21
  import AnimateHeight from 'react-animate-height';
22
22
  import { useUpdateEffect as useUpdateEffect$1 } from 'ahooks';
23
+ import { FaCalendarAlt } from '@meronex/icons/fa';
23
24
  import dayjs from 'dayjs';
24
- import isFunction from 'lodash-es/isFunction';
25
+ import Calendar from 'react-calendar';
25
26
  import ReactInputMask from 'react-input-mask';
26
27
  import { Collector } from '@apia/validations';
27
28
  import { Remarkable } from 'remarkable';
28
29
  import { IconButton as IconButton$2, ApiaUtil as ApiaUtil$1 } from '@apia/components';
30
+ import isFunction$1 from 'lodash-es/isFunction';
29
31
  import { createFAsomeStore } from '@apia/dom-store';
30
32
  import { keyframes } from '@emotion/react';
31
33
 
@@ -38,10 +40,10 @@ const useAccordionContext = () => {
38
40
  return context;
39
41
  };
40
42
 
41
- var __defProp$s = Object.defineProperty;
42
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
43
- var __publicField$s = (obj, key, value) => {
44
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
43
+ var __defProp$r = Object.defineProperty;
44
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45
+ var __publicField$r = (obj, key, value) => {
46
+ __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
45
47
  return value;
46
48
  };
47
49
  function makeItemStateSelectorHook(handler) {
@@ -73,10 +75,10 @@ class AccordionHandler {
73
75
  constructor(id, props) {
74
76
  this.id = id;
75
77
  this.props = props;
76
- __publicField$s(this, "itemsState", {});
77
- __publicField$s(this, "itemsStateListeners", {});
78
- __publicField$s(this, "propsListeners", []);
79
- __publicField$s(this, "hooks", {
78
+ __publicField$r(this, "itemsState", {});
79
+ __publicField$r(this, "itemsStateListeners", {});
80
+ __publicField$r(this, "propsListeners", []);
81
+ __publicField$r(this, "hooks", {
80
82
  useAccordionContextProvider: () => {
81
83
  const Provider = useMemo(
82
84
  () => ({ children }) => /* @__PURE__ */ jsx(AccordionContext.Provider, { value: this, children }),
@@ -1015,75 +1017,75 @@ const WindowModal = forwardRef(
1015
1017
  }
1016
1018
  );
1017
1019
 
1018
- var __defProp$r = Object.defineProperty;
1019
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1020
- var __publicField$r = (obj, key, value) => {
1021
- __defNormalProp$r(obj, key + "" , value);
1020
+ var __defProp$q = Object.defineProperty;
1021
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1022
+ var __publicField$q = (obj, key, value) => {
1023
+ __defNormalProp$q(obj, key + "" , value);
1022
1024
  return value;
1023
1025
  };
1024
- var __accessCheck$d = (obj, member, msg) => {
1026
+ var __accessCheck$c = (obj, member, msg) => {
1025
1027
  if (!member.has(obj))
1026
1028
  throw TypeError("Cannot " + msg);
1027
1029
  };
1028
- var __privateGet$a = (obj, member, getter) => {
1029
- __accessCheck$d(obj, member, "read from private field");
1030
+ var __privateGet$9 = (obj, member, getter) => {
1031
+ __accessCheck$c(obj, member, "read from private field");
1030
1032
  return getter ? getter.call(obj) : member.get(obj);
1031
1033
  };
1032
- var __privateAdd$d = (obj, member, value) => {
1034
+ var __privateAdd$c = (obj, member, value) => {
1033
1035
  if (member.has(obj))
1034
1036
  throw TypeError("Cannot add the same private member more than once");
1035
1037
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
1036
1038
  };
1037
- var __privateSet$8 = (obj, member, value, setter) => {
1038
- __accessCheck$d(obj, member, "write to private field");
1039
+ var __privateSet$7 = (obj, member, value, setter) => {
1040
+ __accessCheck$c(obj, member, "write to private field");
1039
1041
  member.set(obj, value);
1040
1042
  return value;
1041
1043
  };
1042
1044
  var __privateMethod$3 = (obj, member, method) => {
1043
- __accessCheck$d(obj, member, "access private method");
1045
+ __accessCheck$c(obj, member, "access private method");
1044
1046
  return method;
1045
1047
  };
1046
- var _isLocked, _onChangeCb, _onDestroyCb, _evaluate, evaluate_fn, _a$1;
1048
+ var _isLocked, _onChangeCb, _onDestroyCb, _evaluate, evaluate_fn, _a;
1047
1049
  class BodyScrollLocker {
1048
1050
  constructor() {
1049
- __privateAdd$d(this, _isLocked, false);
1050
- __privateAdd$d(this, _onChangeCb, () => {
1051
+ __privateAdd$c(this, _isLocked, false);
1052
+ __privateAdd$c(this, _onChangeCb, () => {
1051
1053
  });
1052
- __privateAdd$d(this, _onDestroyCb, () => {
1054
+ __privateAdd$c(this, _onDestroyCb, () => {
1053
1055
  });
1054
1056
  }
1055
1057
  get isLocked() {
1056
- return __privateGet$a(this, _isLocked);
1058
+ return __privateGet$9(this, _isLocked);
1057
1059
  }
1058
1060
  destroy() {
1059
- __privateGet$a(this, _onDestroyCb).call(this);
1061
+ __privateGet$9(this, _onDestroyCb).call(this);
1060
1062
  }
1061
1063
  lock() {
1062
- __privateSet$8(this, _isLocked, true);
1063
- __privateGet$a(this, _onChangeCb).call(this);
1064
+ __privateSet$7(this, _isLocked, true);
1065
+ __privateGet$9(this, _onChangeCb).call(this);
1064
1066
  }
1065
1067
  unlock() {
1066
- __privateSet$8(this, _isLocked, false);
1067
- __privateGet$a(this, _onChangeCb).call(this);
1068
+ __privateSet$7(this, _isLocked, false);
1069
+ __privateGet$9(this, _onChangeCb).call(this);
1068
1070
  }
1069
1071
  onChange(cb) {
1070
- __privateSet$8(this, _onChangeCb, cb);
1071
- return () => __privateSet$8(this, _onChangeCb, () => {
1072
+ __privateSet$7(this, _onChangeCb, cb);
1073
+ return () => __privateSet$7(this, _onChangeCb, () => {
1072
1074
  });
1073
1075
  }
1074
1076
  onDestroy(cb) {
1075
- __privateSet$8(this, _onDestroyCb, cb);
1076
- return () => __privateSet$8(this, _onDestroyCb, () => {
1077
+ __privateSet$7(this, _onDestroyCb, cb);
1078
+ return () => __privateSet$7(this, _onDestroyCb, () => {
1077
1079
  });
1078
1080
  }
1079
1081
  }
1080
1082
  _isLocked = new WeakMap();
1081
1083
  _onChangeCb = new WeakMap();
1082
1084
  _onDestroyCb = new WeakMap();
1083
- const BodyScrollLock = new (_a$1 = class {
1085
+ const BodyScrollLock = new (_a = class {
1084
1086
  constructor() {
1085
- __privateAdd$d(this, _evaluate);
1086
- __publicField$r(this, "lockers", []);
1087
+ __privateAdd$c(this, _evaluate);
1088
+ __publicField$q(this, "lockers", []);
1087
1089
  }
1088
1090
  getLocker() {
1089
1091
  const locker = new BodyScrollLocker();
@@ -1103,7 +1105,7 @@ const BodyScrollLock = new (_a$1 = class {
1103
1105
  document.body.style.overflow = willLock ? "hidden" : "auto";
1104
1106
  if (!(willLock && document.body.scrollHeight > document.body.clientHeight))
1105
1107
  document.body.style.paddingRight = "0px";
1106
- }, _a$1)();
1108
+ }, _a)();
1107
1109
  function useBodyScrollLock(isLocked) {
1108
1110
  useEffect(() => {
1109
1111
  const locker = BodyScrollLock.getLocker();
@@ -1374,6 +1376,7 @@ const OpenModal = (props) => {
1374
1376
  ...modalProps,
1375
1377
  onExited: () => {
1376
1378
  props.onClose?.();
1379
+ props.onExited?.();
1377
1380
  if (!hasConfirmed.current) {
1378
1381
  props.onCancel?.();
1379
1382
  }
@@ -1408,36 +1411,36 @@ const OpenModal = (props) => {
1408
1411
  );
1409
1412
  };
1410
1413
 
1411
- var __defProp$q = Object.defineProperty;
1412
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1413
- var __publicField$q = (obj, key, value) => {
1414
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
1414
+ var __defProp$p = Object.defineProperty;
1415
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1416
+ var __publicField$p = (obj, key, value) => {
1417
+ __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
1415
1418
  return value;
1416
1419
  };
1417
- var __accessCheck$c = (obj, member, msg) => {
1420
+ var __accessCheck$b = (obj, member, msg) => {
1418
1421
  if (!member.has(obj))
1419
1422
  throw TypeError("Cannot " + msg);
1420
1423
  };
1421
- var __privateGet$9 = (obj, member, getter) => {
1422
- __accessCheck$c(obj, member, "read from private field");
1424
+ var __privateGet$8 = (obj, member, getter) => {
1425
+ __accessCheck$b(obj, member, "read from private field");
1423
1426
  return getter ? getter.call(obj) : member.get(obj);
1424
1427
  };
1425
- var __privateAdd$c = (obj, member, value) => {
1428
+ var __privateAdd$b = (obj, member, value) => {
1426
1429
  if (member.has(obj))
1427
1430
  throw TypeError("Cannot add the same private member more than once");
1428
1431
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
1429
1432
  };
1430
- var __privateSet$7 = (obj, member, value, setter) => {
1431
- __accessCheck$c(obj, member, "write to private field");
1433
+ var __privateSet$6 = (obj, member, value, setter) => {
1434
+ __accessCheck$b(obj, member, "write to private field");
1432
1435
  member.set(obj, value);
1433
1436
  return value;
1434
1437
  };
1435
1438
  var __privateWrapper$2 = (obj, member, setter, getter) => ({
1436
1439
  set _(value) {
1437
- __privateSet$7(obj, member, value);
1440
+ __privateSet$6(obj, member, value);
1438
1441
  },
1439
1442
  get _() {
1440
- return __privateGet$9(obj, member, getter);
1443
+ return __privateGet$8(obj, member, getter);
1441
1444
  }
1442
1445
  });
1443
1446
  var _emitter$4, _maxId$1, _maxOverlay, _useModalsList;
@@ -1448,16 +1451,16 @@ class ApiaUtilModalHandler {
1448
1451
  }
1449
1452
  class ApiaUtilModals {
1450
1453
  constructor() {
1451
- __publicField$q(this, "overlays", []);
1452
- __privateAdd$c(this, _emitter$4, new EventEmitter());
1453
- __privateAdd$c(this, _maxId$1, 0);
1454
- __privateAdd$c(this, _maxOverlay, 0);
1455
- __privateAdd$c(this, _useModalsList, () => {
1454
+ __publicField$p(this, "overlays", []);
1455
+ __privateAdd$b(this, _emitter$4, new EventEmitter());
1456
+ __privateAdd$b(this, _maxId$1, 0);
1457
+ __privateAdd$b(this, _maxOverlay, 0);
1458
+ __privateAdd$b(this, _useModalsList, () => {
1456
1459
  const [modals, setModals] = useState(
1457
1460
  []
1458
1461
  );
1459
1462
  useMount(() => {
1460
- const u1 = __privateGet$9(this, _emitter$4).on("open", (ev) => {
1463
+ const u1 = __privateGet$8(this, _emitter$4).on("open", (ev) => {
1461
1464
  setModals((current) => [
1462
1465
  ...current,
1463
1466
  {
@@ -1473,12 +1476,12 @@ class ApiaUtilModals {
1473
1476
  }
1474
1477
  ]);
1475
1478
  });
1476
- const u2 = __privateGet$9(this, _emitter$4).on("closeAll", () => {
1479
+ const u2 = __privateGet$8(this, _emitter$4).on("closeAll", () => {
1477
1480
  setModals(
1478
1481
  (current) => current.map((modal) => ({ ...modal, isOpen: false }))
1479
1482
  );
1480
1483
  });
1481
- const u3 = __privateGet$9(this, _emitter$4).on("close", (modalId) => {
1484
+ const u3 = __privateGet$8(this, _emitter$4).on("close", (modalId) => {
1482
1485
  setModals(
1483
1486
  (current) => current.map(
1484
1487
  (modal) => modal.id === modalId ? { ...modal, isOpen: false } : modal
@@ -1493,8 +1496,8 @@ class ApiaUtilModals {
1493
1496
  });
1494
1497
  return modals;
1495
1498
  });
1496
- __publicField$q(this, "Component", observer(() => {
1497
- const modals = __privateGet$9(this, _useModalsList).call(this);
1499
+ __publicField$p(this, "Component", observer(() => {
1500
+ const modals = __privateGet$8(this, _useModalsList).call(this);
1498
1501
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1499
1502
  modals.map((current) => /* @__PURE__ */ jsx(OpenModal, { ...current }, current.id)),
1500
1503
  this.overlays.map((c) => c.render)
@@ -1509,13 +1512,13 @@ class ApiaUtilModals {
1509
1512
  });
1510
1513
  }
1511
1514
  close(id) {
1512
- __privateGet$9(this, _emitter$4).emit("close", id);
1515
+ __privateGet$8(this, _emitter$4).emit("close", id);
1513
1516
  }
1514
1517
  open(props) {
1515
1518
  const id = props.id ?? `modal_${__privateWrapper$2(this, _maxId$1)._++}`;
1516
- __privateGet$9(this, _emitter$4).emit("open", { ...props, id });
1519
+ __privateGet$8(this, _emitter$4).emit("open", { ...props, id });
1517
1520
  return new ApiaUtilModalHandler(() => {
1518
- __privateGet$9(this, _emitter$4).emit("close", id);
1521
+ __privateGet$8(this, _emitter$4).emit("close", id);
1519
1522
  });
1520
1523
  }
1521
1524
  /**
@@ -1562,29 +1565,29 @@ _maxId$1 = new WeakMap();
1562
1565
  _maxOverlay = new WeakMap();
1563
1566
  _useModalsList = new WeakMap();
1564
1567
 
1565
- var __defProp$p = Object.defineProperty;
1566
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1567
- var __publicField$p = (obj, key, value) => {
1568
- __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
1568
+ var __defProp$o = Object.defineProperty;
1569
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1570
+ var __publicField$o = (obj, key, value) => {
1571
+ __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
1569
1572
  return value;
1570
1573
  };
1571
1574
  class ApiaUtilNotifications {
1572
1575
  constructor() {
1573
- __publicField$p(this, "close", (id) => {
1576
+ __publicField$o(this, "close", (id) => {
1574
1577
  defaultNotifier.close(id);
1575
1578
  });
1576
- __publicField$p(this, "closeAll", () => {
1579
+ __publicField$o(this, "closeAll", () => {
1577
1580
  defaultNotifier.closeAll();
1578
1581
  });
1579
- __publicField$p(this, "notify", (notification) => {
1582
+ __publicField$o(this, "notify", (notification) => {
1580
1583
  defaultNotifier.notify({
1581
1584
  ...notification,
1582
1585
  type: notification.type ?? "warning"
1583
1586
  });
1584
1587
  });
1585
1588
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1586
- __publicField$p(this, "useSelector", (selector) => defaultNotifier.useSelector(selector));
1587
- __publicField$p(this, "Component", () => {
1589
+ __publicField$o(this, "useSelector", (selector) => defaultNotifier.useSelector(selector));
1590
+ __publicField$o(this, "Component", () => {
1588
1591
  return /* @__PURE__ */ jsx(NotificationsList, {});
1589
1592
  });
1590
1593
  }
@@ -1609,6 +1612,10 @@ const TabsContext = React__default.createContext(null);
1609
1612
  function useTabsContext() {
1610
1613
  return React__default.useContext(TabsContext);
1611
1614
  }
1615
+ const CurrentTabContext = React__default.createContext(null);
1616
+ function useCurrentTab() {
1617
+ return React__default.useContext(CurrentTabContext);
1618
+ }
1612
1619
 
1613
1620
  const ContextMenu = observer(
1614
1621
  ({
@@ -1860,7 +1867,10 @@ function useShowScrollButtons() {
1860
1867
  }
1861
1868
 
1862
1869
  const TabsList = observer(
1863
- ({ arrowsBehavior = "focus" }) => {
1870
+ ({
1871
+ arrowsBehavior = "focus",
1872
+ children
1873
+ }) => {
1864
1874
  const controller = useTabsContext();
1865
1875
  const [showScrollButtons, setRef] = useShowScrollButtons();
1866
1876
  const onClickPrev = React__default.useCallback(() => {
@@ -1894,6 +1904,7 @@ const TabsList = observer(
1894
1904
  ...getVariant("layout.common.tabs.primary"),
1895
1905
  ref: setRef,
1896
1906
  children: [
1907
+ children?.beforeFixedTabs,
1897
1908
  /* @__PURE__ */ jsx(Box, { className: "tabsList__fixedTabs", children: fixedTabs.map((current) => /* @__PURE__ */ jsx(Item, { tab: current }, current.id)) }),
1898
1909
  /* @__PURE__ */ jsx(
1899
1910
  ContextMenu,
@@ -1956,23 +1967,23 @@ const TabsList = observer(
1956
1967
  }
1957
1968
  );
1958
1969
 
1959
- var __defProp$o = Object.defineProperty;
1960
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1961
- var __publicField$o = (obj, key, value) => {
1962
- __defNormalProp$o(obj, key + "" , value);
1970
+ var __defProp$n = Object.defineProperty;
1971
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1972
+ var __publicField$n = (obj, key, value) => {
1973
+ __defNormalProp$n(obj, key + "" , value);
1963
1974
  return value;
1964
1975
  };
1965
- var __accessCheck$b = (obj, member, msg) => {
1976
+ var __accessCheck$a = (obj, member, msg) => {
1966
1977
  if (!member.has(obj))
1967
1978
  throw TypeError("Cannot " + msg);
1968
1979
  };
1969
- var __privateAdd$b = (obj, member, value) => {
1980
+ var __privateAdd$a = (obj, member, value) => {
1970
1981
  if (member.has(obj))
1971
1982
  throw TypeError("Cannot add the same private member more than once");
1972
1983
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
1973
1984
  };
1974
1985
  var __privateMethod$2 = (obj, member, method) => {
1975
- __accessCheck$b(obj, member, "access private method");
1986
+ __accessCheck$a(obj, member, "access private method");
1976
1987
  return method;
1977
1988
  };
1978
1989
  var _innerAppend, innerAppend_fn;
@@ -1994,6 +2005,9 @@ class Tab {
1994
2005
  open(closeOthers) {
1995
2006
  this.controller.openTab(this.id, closeOthers);
1996
2007
  }
2008
+ remove() {
2009
+ this.controller.remove(this.id);
2010
+ }
1997
2011
  toggle(isShown) {
1998
2012
  this.controller.toggleTab(this.state.id, isShown);
1999
2013
  }
@@ -2002,8 +2016,8 @@ class TabsController {
2002
2016
  constructor(id, props) {
2003
2017
  this.id = id;
2004
2018
  this.props = props;
2005
- __privateAdd$b(this, _innerAppend);
2006
- __publicField$o(this, "state", {
2019
+ __privateAdd$a(this, _innerAppend);
2020
+ __publicField$n(this, "state", {
2007
2021
  isMultiple: false,
2008
2022
  openTabsHistory: /* @__PURE__ */ new Set(),
2009
2023
  tabs: /* @__PURE__ */ new Map(),
@@ -2035,7 +2049,7 @@ class TabsController {
2035
2049
  /**
2036
2050
  * Obviamente agrega un tab al listado de tabs
2037
2051
  */
2038
- append(tab, closeOthers) {
2052
+ append(tab, behavior) {
2039
2053
  if (this.getTab(tab.id)) {
2040
2054
  void ApiaUtil.instance.dialogs.confirm({
2041
2055
  children: getLabel("msgTabIsOpen").text,
@@ -2046,10 +2060,10 @@ class TabsController {
2046
2060
  ...tab,
2047
2061
  id: `${tab.id}_${uniqueId$2()}`,
2048
2062
  additionalProps: tab.additionalProps ?? {}
2049
- }, closeOthers);
2063
+ }, behavior);
2050
2064
  });
2051
2065
  } else
2052
- __privateMethod$2(this, _innerAppend, innerAppend_fn).call(this, tab, closeOthers);
2066
+ __privateMethod$2(this, _innerAppend, innerAppend_fn).call(this, tab, behavior);
2053
2067
  }
2054
2068
  async closeAll(closeFixedTabsAsWell = false, force = false) {
2055
2069
  for (const tab of this.tabsList) {
@@ -2118,6 +2132,10 @@ class TabsController {
2118
2132
  this.openTab(this.tabsList[0].id);
2119
2133
  }
2120
2134
  }
2135
+ remove(tabId) {
2136
+ this.state.openTabsHistory.delete(this.state.tabs.get(tabId));
2137
+ this.state.tabs.delete(tabId);
2138
+ }
2121
2139
  async toggleTab(tabId, isShown) {
2122
2140
  const willBeOpen = isShown || !this.getTab(tabId)?.state.isOpen;
2123
2141
  if (willBeOpen) {
@@ -2260,11 +2278,19 @@ class TabsController {
2260
2278
  }
2261
2279
  }
2262
2280
  _innerAppend = new WeakSet();
2263
- innerAppend_fn = function(tab, closeOthers = false) {
2264
- this.state.tabs.set(tab.id, new Tab(tab, this));
2281
+ innerAppend_fn = function(tab, behavior) {
2282
+ const tabsArray = [...this.state.tabs.values()];
2283
+ const afterId = behavior?.insertAfterId ?? tabsArray[tabsArray.length - 1]?.id;
2284
+ for (let i = 0; i <= tabsArray.length; i++) {
2285
+ if (!tabsArray[i] || tabsArray[i]?.id === afterId) {
2286
+ tabsArray.splice(i + 1, 0, new Tab(tab, this));
2287
+ break;
2288
+ }
2289
+ }
2290
+ this.state.tabs = new Map(tabsArray.map((c) => [c.id, c]));
2265
2291
  if (tab.isOpen) {
2266
- this.openTab(tab.id, closeOthers);
2267
- this.focusTab(tab.id, closeOthers);
2292
+ this.openTab(tab.id, behavior?.closeOthers);
2293
+ this.focusTab(tab.id, behavior?.closeOthers);
2268
2294
  }
2269
2295
  this.checkAtLeastOneOpen();
2270
2296
  };
@@ -2291,6 +2317,8 @@ const InnerRenderer = observer(({ tab }) => {
2291
2317
  },
2292
2318
  tab.id
2293
2319
  );
2320
+ const uns = useRef(() => {
2321
+ });
2294
2322
  return /* @__PURE__ */ jsx(
2295
2323
  Box,
2296
2324
  {
@@ -2303,6 +2331,18 @@ const InnerRenderer = observer(({ tab }) => {
2303
2331
  sx: {
2304
2332
  display: state.isOpen ? void 0 : "none"
2305
2333
  },
2334
+ ref: (el) => {
2335
+ uns.current();
2336
+ if (el instanceof HTMLElement) {
2337
+ const handleFocus = () => {
2338
+ tab.open();
2339
+ };
2340
+ el.addEventListener(customEvents.focus, handleFocus);
2341
+ uns.current = () => {
2342
+ el.removeEventListener(customEvents.focus, handleFocus);
2343
+ };
2344
+ }
2345
+ },
2306
2346
  children: accordion ?? tabContent
2307
2347
  },
2308
2348
  state.id
@@ -2319,7 +2359,7 @@ const TabsContent = observer((props) => {
2319
2359
  ...getVariant("layout.common.tabs.primary.content"),
2320
2360
  ...props,
2321
2361
  children: controller.tabsList.map((tab) => {
2322
- return /* @__PURE__ */ jsx(InnerRenderer, { tab }, tab.id);
2362
+ return /* @__PURE__ */ jsx(CurrentTabContext.Provider, { value: tab, children: /* @__PURE__ */ jsx(InnerRenderer, { tab }, tab.id) });
2323
2363
  })
2324
2364
  }
2325
2365
  );
@@ -2692,54 +2732,54 @@ const AlertModal = ({ children, onClose, title }) => {
2692
2732
  );
2693
2733
  };
2694
2734
 
2695
- var __defProp$n = Object.defineProperty;
2696
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2697
- var __publicField$n = (obj, key, value) => {
2698
- __defNormalProp$n(obj, key + "" , value);
2735
+ var __defProp$m = Object.defineProperty;
2736
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2737
+ var __publicField$m = (obj, key, value) => {
2738
+ __defNormalProp$m(obj, key + "" , value);
2699
2739
  return value;
2700
2740
  };
2701
- var __accessCheck$a = (obj, member, msg) => {
2741
+ var __accessCheck$9 = (obj, member, msg) => {
2702
2742
  if (!member.has(obj))
2703
2743
  throw TypeError("Cannot " + msg);
2704
2744
  };
2705
- var __privateGet$8 = (obj, member, getter) => {
2706
- __accessCheck$a(obj, member, "read from private field");
2745
+ var __privateGet$7 = (obj, member, getter) => {
2746
+ __accessCheck$9(obj, member, "read from private field");
2707
2747
  return getter ? getter.call(obj) : member.get(obj);
2708
2748
  };
2709
- var __privateAdd$a = (obj, member, value) => {
2749
+ var __privateAdd$9 = (obj, member, value) => {
2710
2750
  if (member.has(obj))
2711
2751
  throw TypeError("Cannot add the same private member more than once");
2712
2752
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2713
2753
  };
2714
- var __privateSet$6 = (obj, member, value, setter) => {
2715
- __accessCheck$a(obj, member, "write to private field");
2754
+ var __privateSet$5 = (obj, member, value, setter) => {
2755
+ __accessCheck$9(obj, member, "write to private field");
2716
2756
  member.set(obj, value);
2717
2757
  return value;
2718
2758
  };
2719
2759
  var __privateWrapper$1 = (obj, member, setter, getter) => ({
2720
2760
  set _(value) {
2721
- __privateSet$6(obj, member, value);
2761
+ __privateSet$5(obj, member, value);
2722
2762
  },
2723
2763
  get _() {
2724
- return __privateGet$8(obj, member, getter);
2764
+ return __privateGet$7(obj, member, getter);
2725
2765
  }
2726
2766
  });
2727
2767
  var _emitter$3, _maxIdAlert, _maxIdConfirm;
2728
2768
  class ApiaUtilDialogs {
2729
2769
  constructor() {
2730
- __privateAdd$a(this, _emitter$3, new EventEmitter());
2731
- __privateAdd$a(this, _maxIdAlert, 0);
2732
- __privateAdd$a(this, _maxIdConfirm, 0);
2733
- __publicField$n(this, "Component", () => {
2770
+ __privateAdd$9(this, _emitter$3, new EventEmitter());
2771
+ __privateAdd$9(this, _maxIdAlert, 0);
2772
+ __privateAdd$9(this, _maxIdConfirm, 0);
2773
+ __publicField$m(this, "Component", () => {
2734
2774
  const [confirmDialogs, setConfirmDialogs] = useState([]);
2735
2775
  const [alertsDialogs, setAlertsDialogs] = useState(
2736
2776
  []
2737
2777
  );
2738
2778
  useMount(() => {
2739
- const unsuscribe1 = __privateGet$8(this, _emitter$3).on("alert", (ev) => {
2779
+ const unsuscribe1 = __privateGet$7(this, _emitter$3).on("alert", (ev) => {
2740
2780
  setAlertsDialogs((current) => [...current, ev]);
2741
2781
  });
2742
- const unsuscribe2 = __privateGet$8(this, _emitter$3).on("confirm", (ev) => {
2782
+ const unsuscribe2 = __privateGet$7(this, _emitter$3).on("confirm", (ev) => {
2743
2783
  setConfirmDialogs((current) => [...current, ev]);
2744
2784
  });
2745
2785
  return () => {
@@ -2777,7 +2817,7 @@ class ApiaUtilDialogs {
2777
2817
  }
2778
2818
  alert(props) {
2779
2819
  return new Promise((resolve) => {
2780
- __privateGet$8(this, _emitter$3).emit("alert", {
2820
+ __privateGet$7(this, _emitter$3).emit("alert", {
2781
2821
  ...props,
2782
2822
  onClose: () => resolve(),
2783
2823
  id: `confirm${__privateWrapper$1(this, _maxIdAlert)._++}`
@@ -2786,7 +2826,7 @@ class ApiaUtilDialogs {
2786
2826
  }
2787
2827
  confirm(props) {
2788
2828
  return new Promise((resolve) => {
2789
- __privateGet$8(this, _emitter$3).emit("confirm", {
2829
+ __privateGet$7(this, _emitter$3).emit("confirm", {
2790
2830
  ...props,
2791
2831
  id: `confirm${__privateWrapper$1(this, _maxIdConfirm)._++}`,
2792
2832
  onCancel: () => resolve(false),
@@ -2850,31 +2890,31 @@ function parseStringToApiaNumber(value) {
2850
2890
  )}${decimalsString.length > 0 ? `${decimalSeparator$1}${decimalsString}` : ""}`;
2851
2891
  }
2852
2892
 
2853
- var __accessCheck$9 = (obj, member, msg) => {
2893
+ var __accessCheck$8 = (obj, member, msg) => {
2854
2894
  if (!member.has(obj))
2855
2895
  throw TypeError("Cannot " + msg);
2856
2896
  };
2857
- var __privateAdd$9 = (obj, member, value) => {
2897
+ var __privateAdd$8 = (obj, member, value) => {
2858
2898
  if (member.has(obj))
2859
2899
  throw TypeError("Cannot add the same private member more than once");
2860
2900
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2861
2901
  };
2862
2902
  var __privateMethod$1 = (obj, member, method) => {
2863
- __accessCheck$9(obj, member, "access private method");
2903
+ __accessCheck$8(obj, member, "access private method");
2864
2904
  return method;
2865
2905
  };
2866
2906
  var _parseString, parseString_fn, _findDelimiter, findDelimiter_fn, _parseCellValue, parseCellValue_fn;
2867
2907
  const delimiters = [",", ";", " ", "|"];
2868
2908
  class ApiaUtilParsers {
2869
2909
  constructor() {
2870
- __privateAdd$9(this, _parseString);
2910
+ __privateAdd$8(this, _parseString);
2871
2911
  /**
2872
2912
  * Inspecciona las primeras filas de un array de strings, en búsqueda del mejor delimitador
2873
2913
  * para convertir esos strings a array de datos, que serán el resultado de haber interpretado
2874
2914
  * un documento CSV.
2875
2915
  */
2876
- __privateAdd$9(this, _findDelimiter);
2877
- __privateAdd$9(this, _parseCellValue);
2916
+ __privateAdd$8(this, _findDelimiter);
2917
+ __privateAdd$8(this, _parseCellValue);
2878
2918
  }
2879
2919
  /**
2880
2920
  * Toma un número sin separadores de miles y lo devuelve en el formato
@@ -3012,10 +3052,10 @@ parseCellValue_fn = function(cellValue) {
3012
3052
  return cellValue.match(/^\s*"?([^"]+)"?[\s\r\n]*$/)?.[1] ?? cellValue;
3013
3053
  };
3014
3054
 
3015
- var __defProp$m = Object.defineProperty;
3016
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3017
- var __publicField$m = (obj, key, value) => {
3018
- __defNormalProp$m(obj, key + "" , value);
3055
+ var __defProp$l = Object.defineProperty;
3056
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3057
+ var __publicField$l = (obj, key, value) => {
3058
+ __defNormalProp$l(obj, key + "" , value);
3019
3059
  return value;
3020
3060
  };
3021
3061
  let maxId$1 = 0;
@@ -3023,35 +3063,35 @@ class ApiaUtilTooltip {
3023
3063
  constructor(props, close) {
3024
3064
  this.props = props;
3025
3065
  this.close = close;
3026
- __publicField$m(this, "id", `tooltip__${maxId$1++}`);
3066
+ __publicField$l(this, "id", `tooltip__${maxId$1++}`);
3027
3067
  }
3028
3068
  }
3029
3069
 
3030
- var __defProp$l = Object.defineProperty;
3031
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3032
- var __publicField$l = (obj, key, value) => {
3033
- __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
3070
+ var __defProp$k = Object.defineProperty;
3071
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3072
+ var __publicField$k = (obj, key, value) => {
3073
+ __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
3034
3074
  return value;
3035
3075
  };
3036
- var __accessCheck$8 = (obj, member, msg) => {
3076
+ var __accessCheck$7 = (obj, member, msg) => {
3037
3077
  if (!member.has(obj))
3038
3078
  throw TypeError("Cannot " + msg);
3039
3079
  };
3040
- var __privateGet$7 = (obj, member, getter) => {
3041
- __accessCheck$8(obj, member, "read from private field");
3080
+ var __privateGet$6 = (obj, member, getter) => {
3081
+ __accessCheck$7(obj, member, "read from private field");
3042
3082
  return getter ? getter.call(obj) : member.get(obj);
3043
3083
  };
3044
- var __privateAdd$8 = (obj, member, value) => {
3084
+ var __privateAdd$7 = (obj, member, value) => {
3045
3085
  if (member.has(obj))
3046
3086
  throw TypeError("Cannot add the same private member more than once");
3047
3087
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
3048
3088
  };
3049
- var __privateSet$5 = (obj, member, value, setter) => {
3050
- __accessCheck$8(obj, member, "write to private field");
3089
+ var __privateSet$4 = (obj, member, value, setter) => {
3090
+ __accessCheck$7(obj, member, "write to private field");
3051
3091
  member.set(obj, value);
3052
3092
  return value;
3053
3093
  };
3054
- var _timeout, _tooltipTimeout, _unsuscribe, _tooltipController, _tooltip;
3094
+ var _timeout, _tooltipTimeout, _unsuscribe, _tooltip;
3055
3095
  let y$1 = 0, x$1 = 0;
3056
3096
  document?.addEventListener("mousemove", (ev) => {
3057
3097
  x$1 = ev.clientX;
@@ -3060,55 +3100,53 @@ document?.addEventListener("mousemove", (ev) => {
3060
3100
  class AutomaticTooltip {
3061
3101
  constructor(tooltip = null, handler) {
3062
3102
  this.handler = handler;
3063
- __privateAdd$8(this, _timeout, 500);
3064
- __privateAdd$8(this, _tooltipTimeout, 0);
3065
- __privateAdd$8(this, _unsuscribe, null);
3066
- __privateAdd$8(this, _tooltipController, null);
3067
- __publicField$l(this, "ref", (el) => {
3103
+ __privateAdd$7(this, _timeout, 500);
3104
+ __privateAdd$7(this, _tooltipTimeout, 0);
3105
+ __privateAdd$7(this, _unsuscribe, null);
3106
+ __publicField$k(this, "ref", (el) => {
3068
3107
  var _a, _b;
3069
- (_a = __privateGet$7(this, _unsuscribe)) == null ? void 0 : _a.call(this);
3108
+ (_a = __privateGet$6(this, _unsuscribe)) == null ? void 0 : _a.call(this);
3070
3109
  const listener = () => {
3071
- clearTimeout(__privateGet$7(this, _tooltipTimeout));
3072
- __privateSet$5(this, _tooltipTimeout, setTimeout(() => {
3073
- if (__privateGet$7(this, _tooltip)?.children)
3074
- __privateSet$5(this, _tooltipController, this.handler.open({
3110
+ clearTimeout(__privateGet$6(this, _tooltipTimeout));
3111
+ __privateSet$4(this, _tooltipTimeout, setTimeout(() => {
3112
+ if (__privateGet$6(this, _tooltip)?.children)
3113
+ this.handler.open({
3075
3114
  closeOnMouseLeaveTooltip: true,
3076
3115
  closeOnEscape: true,
3077
3116
  closeOnScrollOut: true,
3078
- ...__privateGet$7(this, _tooltip),
3117
+ ...__privateGet$6(this, _tooltip),
3079
3118
  anchorPoint: { left: x$1 + 3, top: y$1 + 3 }
3080
- }));
3081
- }, __privateGet$7(this, _timeout)));
3119
+ });
3120
+ }, __privateGet$6(this, _timeout)));
3082
3121
  };
3083
3122
  const reset = () => {
3084
- clearTimeout(__privateGet$7(this, _tooltipTimeout));
3123
+ clearTimeout(__privateGet$6(this, _tooltipTimeout));
3085
3124
  };
3086
3125
  if (el) {
3087
3126
  el.addEventListener("mousemove", listener);
3088
3127
  el.addEventListener("mouseleave", reset);
3089
- __privateSet$5(this, _unsuscribe, () => {
3128
+ __privateSet$4(this, _unsuscribe, () => {
3090
3129
  el.removeEventListener("mousemove", listener);
3091
3130
  el.removeEventListener("mouseleave", reset);
3092
3131
  });
3093
3132
  } else {
3094
- (_b = __privateGet$7(this, _unsuscribe)) == null ? void 0 : _b.call(this);
3133
+ (_b = __privateGet$6(this, _unsuscribe)) == null ? void 0 : _b.call(this);
3095
3134
  reset();
3096
3135
  }
3097
3136
  });
3098
- __privateAdd$8(this, _tooltip, null);
3099
- __publicField$l(this, "update", (tooltip) => {
3100
- __privateSet$5(this, _tooltip, tooltip);
3137
+ __privateAdd$7(this, _tooltip, null);
3138
+ __publicField$k(this, "update", (tooltip) => {
3139
+ __privateSet$4(this, _tooltip, tooltip);
3101
3140
  });
3102
- __privateSet$5(this, _tooltip, tooltip);
3141
+ __privateSet$4(this, _tooltip, tooltip);
3103
3142
  if (tooltip?.timeout !== void 0) {
3104
- __privateSet$5(this, _timeout, tooltip?.timeout);
3143
+ __privateSet$4(this, _timeout, tooltip?.timeout);
3105
3144
  }
3106
3145
  }
3107
3146
  }
3108
3147
  _timeout = new WeakMap();
3109
3148
  _tooltipTimeout = new WeakMap();
3110
3149
  _unsuscribe = new WeakMap();
3111
- _tooltipController = new WeakMap();
3112
3150
  _tooltip = new WeakMap();
3113
3151
 
3114
3152
  function isAttachToElementAFunction(attachToElement) {
@@ -3448,21 +3486,21 @@ const Tooltip = ({
3448
3486
  );
3449
3487
  };
3450
3488
 
3451
- var __defProp$k = Object.defineProperty;
3452
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3453
- var __publicField$k = (obj, key, value) => {
3454
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
3489
+ var __defProp$j = Object.defineProperty;
3490
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3491
+ var __publicField$j = (obj, key, value) => {
3492
+ __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
3455
3493
  return value;
3456
3494
  };
3457
- var __accessCheck$7 = (obj, member, msg) => {
3495
+ var __accessCheck$6 = (obj, member, msg) => {
3458
3496
  if (!member.has(obj))
3459
3497
  throw TypeError("Cannot " + msg);
3460
3498
  };
3461
- var __privateGet$6 = (obj, member, getter) => {
3462
- __accessCheck$7(obj, member, "read from private field");
3499
+ var __privateGet$5 = (obj, member, getter) => {
3500
+ __accessCheck$6(obj, member, "read from private field");
3463
3501
  return getter ? getter.call(obj) : member.get(obj);
3464
3502
  };
3465
- var __privateAdd$7 = (obj, member, value) => {
3503
+ var __privateAdd$6 = (obj, member, value) => {
3466
3504
  if (member.has(obj))
3467
3505
  throw TypeError("Cannot add the same private member more than once");
3468
3506
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -3470,16 +3508,16 @@ var __privateAdd$7 = (obj, member, value) => {
3470
3508
  var _emitter$2, _shoutChangedList;
3471
3509
  class ApiaUtilTooltips {
3472
3510
  constructor() {
3473
- __privateAdd$7(this, _emitter$2, new EventEmitter());
3474
- __publicField$k(this, "tooltips", []);
3475
- __privateAdd$7(this, _shoutChangedList, () => {
3476
- __privateGet$6(this, _emitter$2).emit("changedList", [...this.tooltips]);
3511
+ __privateAdd$6(this, _emitter$2, new EventEmitter());
3512
+ __publicField$j(this, "tooltips", []);
3513
+ __privateAdd$6(this, _shoutChangedList, () => {
3514
+ __privateGet$5(this, _emitter$2).emit("changedList", [...this.tooltips]);
3477
3515
  });
3478
3516
  /**
3479
3517
  * Permite crear un tooltip que se abrirá automáticamente al estar parado
3480
3518
  * sobre un elemento durante 300ms
3481
3519
  */
3482
- __publicField$k(this, "useHover", (tooltip) => {
3520
+ __publicField$j(this, "useHover", (tooltip) => {
3483
3521
  let tt = void 0;
3484
3522
  tt = useMemo(() => {
3485
3523
  tt?.ref(null);
@@ -3490,15 +3528,15 @@ class ApiaUtilTooltips {
3490
3528
  });
3491
3529
  return tt;
3492
3530
  });
3493
- __publicField$k(this, "close", (id) => {
3531
+ __publicField$j(this, "close", (id) => {
3494
3532
  this.tooltips = this.tooltips.filter((current) => current.id !== id);
3495
- __privateGet$6(this, _shoutChangedList).call(this);
3533
+ __privateGet$5(this, _shoutChangedList).call(this);
3496
3534
  });
3497
- __publicField$k(this, "closeAll", () => {
3535
+ __publicField$j(this, "closeAll", () => {
3498
3536
  this.tooltips = [];
3499
- __privateGet$6(this, _shoutChangedList).call(this);
3537
+ __privateGet$5(this, _shoutChangedList).call(this);
3500
3538
  });
3501
- __publicField$k(this, "open", (tooltip) => {
3539
+ __publicField$j(this, "open", (tooltip) => {
3502
3540
  const controller = new ApiaUtilTooltip(tooltip, () => {
3503
3541
  this.close(controller.id);
3504
3542
  controller.props.onClose?.();
@@ -3508,29 +3546,35 @@ class ApiaUtilTooltips {
3508
3546
  } else {
3509
3547
  this.tooltips = [...this.tooltips, controller];
3510
3548
  }
3511
- __privateGet$6(this, _shoutChangedList).call(this);
3549
+ __privateGet$5(this, _shoutChangedList).call(this);
3512
3550
  return controller;
3513
3551
  });
3514
- __publicField$k(this, "Component", () => {
3552
+ __publicField$j(this, "Component", () => {
3515
3553
  const [tooltips, setTooltips] = useState(this.tooltips);
3516
3554
  useMount(() => {
3517
- const unsuscribeToList = __privateGet$6(this, _emitter$2).on("changedList", (ev) => {
3555
+ const unsuscribeToList = __privateGet$5(this, _emitter$2).on("changedList", (ev) => {
3518
3556
  setTooltips(ev);
3519
3557
  });
3520
3558
  return () => {
3521
3559
  unsuscribeToList();
3522
3560
  };
3523
3561
  });
3524
- return /* @__PURE__ */ jsx(FreeFocusInside, { sx: { position: "relative", zIndex: "tooltip" }, children: tooltips.map((current) => /* @__PURE__ */ createElement(
3525
- Tooltip,
3562
+ return /* @__PURE__ */ jsx(
3563
+ FreeFocusInside,
3526
3564
  {
3527
- ...current.props,
3528
- onClose: () => {
3529
- current.close();
3530
- },
3531
- key: current.id
3565
+ ...{ sx: { position: "relative", zIndex: "tooltip" } },
3566
+ children: tooltips.map((current) => /* @__PURE__ */ createElement(
3567
+ Tooltip,
3568
+ {
3569
+ ...current.props,
3570
+ onClose: () => {
3571
+ current.close();
3572
+ },
3573
+ key: current.id
3574
+ }
3575
+ ))
3532
3576
  }
3533
- )) });
3577
+ );
3534
3578
  });
3535
3579
  document.addEventListener("keydown", (ev) => {
3536
3580
  if (ev.code === "Escape" && this.tooltips.find((c) => c.props.closeOnEscape !== false)) {
@@ -3539,7 +3583,7 @@ class ApiaUtilTooltips {
3539
3583
  this.tooltips = this.tooltips.filter(
3540
3584
  (current) => current.props.closeOnEscape === false
3541
3585
  );
3542
- __privateGet$6(this, _shoutChangedList).call(this);
3586
+ __privateGet$5(this, _shoutChangedList).call(this);
3543
3587
  }
3544
3588
  });
3545
3589
  }
@@ -3547,36 +3591,36 @@ class ApiaUtilTooltips {
3547
3591
  _emitter$2 = new WeakMap();
3548
3592
  _shoutChangedList = new WeakMap();
3549
3593
 
3550
- var __defProp$j = Object.defineProperty;
3551
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3552
- var __publicField$j = (obj, key, value) => {
3553
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
3594
+ var __defProp$i = Object.defineProperty;
3595
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3596
+ var __publicField$i = (obj, key, value) => {
3597
+ __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
3554
3598
  return value;
3555
3599
  };
3556
- var __accessCheck$6 = (obj, member, msg) => {
3600
+ var __accessCheck$5 = (obj, member, msg) => {
3557
3601
  if (!member.has(obj))
3558
3602
  throw TypeError("Cannot " + msg);
3559
3603
  };
3560
- var __privateGet$5 = (obj, member, getter) => {
3561
- __accessCheck$6(obj, member, "read from private field");
3604
+ var __privateGet$4 = (obj, member, getter) => {
3605
+ __accessCheck$5(obj, member, "read from private field");
3562
3606
  return getter ? getter.call(obj) : member.get(obj);
3563
3607
  };
3564
- var __privateAdd$6 = (obj, member, value) => {
3608
+ var __privateAdd$5 = (obj, member, value) => {
3565
3609
  if (member.has(obj))
3566
3610
  throw TypeError("Cannot add the same private member more than once");
3567
3611
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
3568
3612
  };
3569
- var __privateSet$4 = (obj, member, value, setter) => {
3570
- __accessCheck$6(obj, member, "write to private field");
3613
+ var __privateSet$3 = (obj, member, value, setter) => {
3614
+ __accessCheck$5(obj, member, "write to private field");
3571
3615
  member.set(obj, value);
3572
3616
  return value;
3573
3617
  };
3574
3618
  var __privateWrapper = (obj, member, setter, getter) => ({
3575
3619
  set _(value) {
3576
- __privateSet$4(obj, member, value);
3620
+ __privateSet$3(obj, member, value);
3577
3621
  },
3578
3622
  get _() {
3579
- return __privateGet$5(obj, member, getter);
3623
+ return __privateGet$4(obj, member, getter);
3580
3624
  }
3581
3625
  });
3582
3626
  var _emitter$1, _items$1, _hooks, _maxId, _RenderMenu;
@@ -3585,14 +3629,14 @@ function isSubmenu(item) {
3585
3629
  }
3586
3630
  class ApiaUtilMenu {
3587
3631
  constructor() {
3588
- __privateAdd$6(this, _emitter$1, new EventEmitter());
3589
- __privateAdd$6(this, _items$1, []);
3590
- __publicField$j(this, "menuProps", null);
3591
- __privateAdd$6(this, _hooks, {
3632
+ __privateAdd$5(this, _emitter$1, new EventEmitter());
3633
+ __privateAdd$5(this, _items$1, []);
3634
+ __publicField$i(this, "menuProps", null);
3635
+ __privateAdd$5(this, _hooks, {
3592
3636
  useIsOpen: () => {
3593
3637
  const [isOpen, setIsOpen] = useState(false);
3594
3638
  useMount(() => {
3595
- return __privateGet$5(this, _emitter$1).on("toggle", setIsOpen);
3639
+ return __privateGet$4(this, _emitter$1).on("toggle", setIsOpen);
3596
3640
  });
3597
3641
  return [
3598
3642
  isOpen,
@@ -3602,19 +3646,19 @@ class ApiaUtilMenu {
3602
3646
  ];
3603
3647
  }
3604
3648
  });
3605
- __publicField$j(this, "close", () => {
3606
- __privateGet$5(this, _emitter$1).emit("toggle", false);
3649
+ __publicField$i(this, "close", () => {
3650
+ __privateGet$4(this, _emitter$1).emit("toggle", false);
3607
3651
  });
3608
- __publicField$j(this, "open", ({
3652
+ __publicField$i(this, "open", ({
3609
3653
  menuProps,
3610
3654
  items
3611
3655
  }) => {
3612
- __privateSet$4(this, _items$1, items);
3656
+ __privateSet$3(this, _items$1, items);
3613
3657
  this.menuProps = menuProps;
3614
- __privateGet$5(this, _emitter$1).emit("toggle", true);
3658
+ __privateGet$4(this, _emitter$1).emit("toggle", true);
3615
3659
  });
3616
- __privateAdd$6(this, _maxId, 0);
3617
- __privateAdd$6(this, _RenderMenu, (submenu) => {
3660
+ __privateAdd$5(this, _maxId, 0);
3661
+ __privateAdd$5(this, _RenderMenu, (submenu) => {
3618
3662
  const hasIcon = submenu.items.find(
3619
3663
  (c) => !!c.icon
3620
3664
  );
@@ -3627,7 +3671,7 @@ class ApiaUtilMenu {
3627
3671
  {
3628
3672
  label: current.label,
3629
3673
  className: hasIcon ? "with-icon" : "",
3630
- children: __privateGet$5(this, _RenderMenu).call(this, current)
3674
+ children: __privateGet$4(this, _RenderMenu).call(this, current)
3631
3675
  },
3632
3676
  `submenu${__privateWrapper(this, _maxId)._++}`
3633
3677
  );
@@ -3646,8 +3690,8 @@ class ApiaUtilMenu {
3646
3690
  return /* @__PURE__ */ createElement(MenuItem, { ...current, key: current.key }, children);
3647
3691
  }) });
3648
3692
  });
3649
- __publicField$j(this, "Component", () => {
3650
- const [isOpen, close] = __privateGet$5(this, _hooks).useIsOpen();
3693
+ __publicField$i(this, "Component", () => {
3694
+ const [isOpen, close] = __privateGet$4(this, _hooks).useIsOpen();
3651
3695
  if (!isOpen)
3652
3696
  return null;
3653
3697
  return /* @__PURE__ */ jsx(FreeFocusInside, { children: /* @__PURE__ */ jsx(
@@ -3659,7 +3703,7 @@ class ApiaUtilMenu {
3659
3703
  close();
3660
3704
  this.menuProps?.onClose?.(ev);
3661
3705
  },
3662
- children: __privateGet$5(this, _RenderMenu).call(this, { label: "", items: __privateGet$5(this, _items$1) })
3706
+ children: __privateGet$4(this, _RenderMenu).call(this, { label: "", items: __privateGet$4(this, _items$1) })
3663
3707
  }
3664
3708
  ) });
3665
3709
  });
@@ -3671,17 +3715,17 @@ _hooks = new WeakMap();
3671
3715
  _maxId = new WeakMap();
3672
3716
  _RenderMenu = new WeakMap();
3673
3717
 
3674
- var __defProp$i = Object.defineProperty;
3675
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3676
- var __publicField$i = (obj, key, value) => {
3677
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
3718
+ var __defProp$h = Object.defineProperty;
3719
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3720
+ var __publicField$h = (obj, key, value) => {
3721
+ __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
3678
3722
  return value;
3679
3723
  };
3680
3724
  class ApiaUtilMouse extends EventEmitter {
3681
3725
  constructor() {
3682
3726
  super();
3683
- __publicField$i(this, "x", 0);
3684
- __publicField$i(this, "y", 0);
3727
+ __publicField$h(this, "x", 0);
3728
+ __publicField$h(this, "y", 0);
3685
3729
  document.addEventListener("mousemove", (ev) => {
3686
3730
  this.x = ev.clientX;
3687
3731
  this.y = ev.clientY;
@@ -3693,42 +3737,42 @@ class ApiaUtilMouse extends EventEmitter {
3693
3737
  }
3694
3738
  }
3695
3739
 
3696
- var __defProp$h = Object.defineProperty;
3697
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3698
- var __publicField$h = (obj, key, value) => {
3699
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
3740
+ var __defProp$g = Object.defineProperty;
3741
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3742
+ var __publicField$g = (obj, key, value) => {
3743
+ __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
3700
3744
  return value;
3701
3745
  };
3702
- var __accessCheck$5 = (obj, member, msg) => {
3746
+ var __accessCheck$4 = (obj, member, msg) => {
3703
3747
  if (!member.has(obj))
3704
3748
  throw TypeError("Cannot " + msg);
3705
3749
  };
3706
- var __privateGet$4 = (obj, member, getter) => {
3707
- __accessCheck$5(obj, member, "read from private field");
3750
+ var __privateGet$3 = (obj, member, getter) => {
3751
+ __accessCheck$4(obj, member, "read from private field");
3708
3752
  return getter ? getter.call(obj) : member.get(obj);
3709
3753
  };
3710
- var __privateAdd$5 = (obj, member, value) => {
3754
+ var __privateAdd$4 = (obj, member, value) => {
3711
3755
  if (member.has(obj))
3712
3756
  throw TypeError("Cannot add the same private member more than once");
3713
3757
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
3714
3758
  };
3715
- var __privateSet$3 = (obj, member, value, setter) => {
3716
- __accessCheck$5(obj, member, "write to private field");
3759
+ var __privateSet$2 = (obj, member, value, setter) => {
3760
+ __accessCheck$4(obj, member, "write to private field");
3717
3761
  member.set(obj, value);
3718
3762
  return value;
3719
3763
  };
3720
3764
  var _instance;
3721
3765
  const _ApiaUtil = class _ApiaUtil {
3722
3766
  constructor() {
3723
- __publicField$h(this, "dialogs");
3724
- __publicField$h(this, "menu");
3725
- __publicField$h(this, "modals");
3726
- __publicField$h(this, "mouse");
3727
- __publicField$h(this, "notifications");
3728
- __publicField$h(this, "parsers");
3729
- __publicField$h(this, "tabs");
3730
- __publicField$h(this, "tooltips");
3731
- __publicField$h(this, "Component", () => {
3767
+ __publicField$g(this, "dialogs");
3768
+ __publicField$g(this, "menu");
3769
+ __publicField$g(this, "modals");
3770
+ __publicField$g(this, "mouse");
3771
+ __publicField$g(this, "notifications");
3772
+ __publicField$g(this, "parsers");
3773
+ __publicField$g(this, "tabs");
3774
+ __publicField$g(this, "tooltips");
3775
+ __publicField$g(this, "Component", () => {
3732
3776
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3733
3777
  /* @__PURE__ */ jsx(this.dialogs.Component, {}),
3734
3778
  /* @__PURE__ */ jsx(this.modals.Component, {}),
@@ -3747,32 +3791,32 @@ const _ApiaUtil = class _ApiaUtil {
3747
3791
  this.tooltips = new ApiaUtilTooltips();
3748
3792
  }
3749
3793
  static get instance() {
3750
- if (!__privateGet$4(this, _instance)) {
3751
- __privateSet$3(this, _instance, new _ApiaUtil());
3794
+ if (!__privateGet$3(this, _instance)) {
3795
+ __privateSet$2(this, _instance, new _ApiaUtil());
3752
3796
  }
3753
- return __privateGet$4(this, _instance);
3797
+ return __privateGet$3(this, _instance);
3754
3798
  }
3755
3799
  };
3756
3800
  _instance = new WeakMap();
3757
- __privateAdd$5(_ApiaUtil, _instance, void 0);
3801
+ __privateAdd$4(_ApiaUtil, _instance, void 0);
3758
3802
  let ApiaUtil = _ApiaUtil;
3759
3803
 
3760
- var __defProp$g = Object.defineProperty;
3761
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3762
- var __publicField$g = (obj, key, value) => {
3763
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
3804
+ var __defProp$f = Object.defineProperty;
3805
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3806
+ var __publicField$f = (obj, key, value) => {
3807
+ __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
3764
3808
  return value;
3765
3809
  };
3766
3810
  class ScreenLocker {
3767
3811
  constructor() {
3768
- __publicField$g(this, "emitter", new StatefulEmitter({
3812
+ __publicField$f(this, "emitter", new StatefulEmitter({
3769
3813
  locks: {
3770
3814
  common: { count: 0 },
3771
3815
  linear: { count: 0 },
3772
3816
  white: { count: 1 }
3773
3817
  }
3774
3818
  }));
3775
- __publicField$g(this, "lock", (options) => {
3819
+ __publicField$f(this, "lock", (options) => {
3776
3820
  this.emitter.setState("locks", (s) => {
3777
3821
  const key = options?.type ?? "common";
3778
3822
  return {
@@ -3788,11 +3832,11 @@ class ScreenLocker {
3788
3832
  };
3789
3833
  });
3790
3834
  });
3791
- __publicField$g(this, "hasReleased", false);
3835
+ __publicField$f(this, "hasReleased", false);
3792
3836
  /**
3793
3837
  * This method will work once, then, the action will be ignored. The ScreenLocker starts always locked on white, when this method is called, all listeners of onRelease will be called and the lock will be released.
3794
3838
  */
3795
- __publicField$g(this, "release", () => {
3839
+ __publicField$f(this, "release", () => {
3796
3840
  if (this.hasReleased)
3797
3841
  return;
3798
3842
  this.hasReleased = true;
@@ -3808,11 +3852,11 @@ class ScreenLocker {
3808
3852
  /**
3809
3853
  * This method notifies when the screenLock is released by the first time.
3810
3854
  */
3811
- __publicField$g(this, "onRelease", this.emitter.on.bind(this.emitter, "release"));
3855
+ __publicField$f(this, "onRelease", this.emitter.on.bind(this.emitter, "release"));
3812
3856
  /**
3813
3857
  * This component is the responsible for putting the lock courtain in the browser when it's required. It must be used once per application.
3814
3858
  */
3815
- __publicField$g(this, "Component", () => {
3859
+ __publicField$f(this, "Component", () => {
3816
3860
  const locks = this.emitter.useState("locks");
3817
3861
  const style = {
3818
3862
  alignItems: "center",
@@ -3863,7 +3907,7 @@ const OptionsBox = observer(() => {
3863
3907
  return /* @__PURE__ */ jsxs(
3864
3908
  Box,
3865
3909
  {
3866
- className: `autocomplete__option ${handler.focusedIndex === i ? "focused" : ""}`,
3910
+ className: `autocomplete__option ${handler.focusedIndex === i ? "focused" : ""} ${handler.state.readOnly ? "readOnly" : ""}`,
3867
3911
  onMouseDown: (ev) => {
3868
3912
  ev.stopPropagation();
3869
3913
  ev.preventDefault();
@@ -3885,34 +3929,34 @@ const OptionsBox = observer(() => {
3885
3929
  }) });
3886
3930
  });
3887
3931
 
3888
- var __defProp$f = Object.defineProperty;
3889
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3890
- var __publicField$f = (obj, key, value) => {
3891
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
3932
+ var __defProp$e = Object.defineProperty;
3933
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3934
+ var __publicField$e = (obj, key, value) => {
3935
+ __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
3892
3936
  return value;
3893
3937
  };
3894
- var __accessCheck$4 = (obj, member, msg) => {
3938
+ var __accessCheck$3 = (obj, member, msg) => {
3895
3939
  if (!member.has(obj))
3896
3940
  throw TypeError("Cannot " + msg);
3897
3941
  };
3898
- var __privateGet$3 = (obj, member, getter) => {
3899
- __accessCheck$4(obj, member, "read from private field");
3942
+ var __privateGet$2 = (obj, member, getter) => {
3943
+ __accessCheck$3(obj, member, "read from private field");
3900
3944
  return getter ? getter.call(obj) : member.get(obj);
3901
3945
  };
3902
- var __privateAdd$4 = (obj, member, value) => {
3946
+ var __privateAdd$3 = (obj, member, value) => {
3903
3947
  if (member.has(obj))
3904
3948
  throw TypeError("Cannot add the same private member more than once");
3905
3949
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
3906
3950
  };
3907
- var __privateSet$2 = (obj, member, value, setter) => {
3908
- __accessCheck$4(obj, member, "write to private field");
3951
+ var __privateSet$1 = (obj, member, value, setter) => {
3952
+ __accessCheck$3(obj, member, "write to private field");
3909
3953
  member.set(obj, value);
3910
3954
  return value;
3911
3955
  };
3912
3956
  var _actualSearch, _makeSearch, _search;
3913
3957
  class AutocompleteController {
3914
3958
  constructor(properties) {
3915
- __publicField$f(this, "state", {
3959
+ __publicField$e(this, "state", {
3916
3960
  disabled: false,
3917
3961
  readOnly: false,
3918
3962
  id: uniqueId$3("autocomplete"),
@@ -3923,7 +3967,7 @@ class AutocompleteController {
3923
3967
  value: "",
3924
3968
  width: 55
3925
3969
  });
3926
- __privateAdd$4(this, _actualSearch, (str) => {
3970
+ __privateAdd$3(this, _actualSearch, (str) => {
3927
3971
  this.state.options.forEach((c) => {
3928
3972
  if (this.state.caseInsensitive) {
3929
3973
  c.filtered = (c.searchLabel ?? c.label?.toString?.() ?? c.value).toLowerCase().indexOf(str.toLowerCase()) === -1;
@@ -3935,11 +3979,11 @@ class AutocompleteController {
3935
3979
  }
3936
3980
  });
3937
3981
  });
3938
- __privateAdd$4(this, _makeSearch, () => {
3939
- return debounce(__privateGet$3(this, _actualSearch), this.state.searchDebounce);
3982
+ __privateAdd$3(this, _makeSearch, () => {
3983
+ return debounce(__privateGet$2(this, _actualSearch), this.state.searchDebounce);
3940
3984
  });
3941
- __privateAdd$4(this, _search, __privateGet$3(this, _makeSearch).call(this));
3942
- __publicField$f(this, "tooltipRef", null);
3985
+ __privateAdd$3(this, _search, __privateGet$2(this, _makeSearch).call(this));
3986
+ __publicField$e(this, "tooltipRef", null);
3943
3987
  Object.assign(this.state, properties);
3944
3988
  if (properties.value) {
3945
3989
  this.state.showValue = String(
@@ -3954,7 +3998,7 @@ class AutocompleteController {
3954
3998
  reaction(
3955
3999
  () => this.state.searchDebounce,
3956
4000
  () => {
3957
- __privateSet$2(this, _search, __privateGet$3(this, _makeSearch).call(this));
4001
+ __privateSet$1(this, _search, __privateGet$2(this, _makeSearch).call(this));
3958
4002
  }
3959
4003
  );
3960
4004
  reaction(
@@ -3984,7 +4028,7 @@ class AutocompleteController {
3984
4028
  close(selectValue = true) {
3985
4029
  this.tooltipRef?.close();
3986
4030
  this.tooltipRef = null;
3987
- __privateGet$3(this, _actualSearch).call(this, "");
4031
+ __privateGet$2(this, _actualSearch).call(this, "");
3988
4032
  if (selectValue) {
3989
4033
  let currentValue = this.state.options.find(
3990
4034
  (c) => c.value === this.state.focusedValue
@@ -4111,7 +4155,7 @@ class AutocompleteController {
4111
4155
  return;
4112
4156
  }
4113
4157
  this.state.showValue = str;
4114
- __privateGet$3(this, _search).call(this, str);
4158
+ __privateGet$2(this, _search).call(this, str);
4115
4159
  }
4116
4160
  selectFocused() {
4117
4161
  this.close();
@@ -4120,16 +4164,18 @@ class AutocompleteController {
4120
4164
  this.setValue(newValue);
4121
4165
  }
4122
4166
  }
4123
- async setValue(value) {
4124
- if (this.state.disabled || this.state.readOnly) {
4167
+ async setValue(value, props) {
4168
+ if (this.state.disabled || this.state.readOnly || value === this.state.value && props?.fireOnChange !== false) {
4125
4169
  return;
4126
4170
  }
4127
4171
  const selectedOption = this.state.options.find((c) => c.value === value);
4128
4172
  const newValue = selectedOption?.value || "";
4129
- const onChangeResult = this.state.onChange?.(newValue, this);
4130
- if (onChangeResult instanceof Promise) {
4131
- if (!await onChangeResult) {
4132
- return;
4173
+ if (props?.fireOnChange !== false) {
4174
+ const onChangeResult = this.state.onChange?.(newValue, this);
4175
+ if (onChangeResult instanceof Promise) {
4176
+ if (!await onChangeResult) {
4177
+ return;
4178
+ }
4133
4179
  }
4134
4180
  }
4135
4181
  this.state.value = newValue;
@@ -4141,7 +4187,7 @@ _actualSearch = new WeakMap();
4141
4187
  _makeSearch = new WeakMap();
4142
4188
  _search = new WeakMap();
4143
4189
 
4144
- const SearchBox = observer(() => {
4190
+ const SearchBox = observer((props) => {
4145
4191
  const handler = useAutocompleteContext();
4146
4192
  const breakpoint = useBreakpointIndex();
4147
4193
  const inputRef = useRef(null);
@@ -4167,6 +4213,7 @@ const SearchBox = observer(() => {
4167
4213
  /* @__PURE__ */ jsx(
4168
4214
  Input,
4169
4215
  {
4216
+ ...props,
4170
4217
  ref: inputRef,
4171
4218
  className: `autocomplete__search ${handler.state.disabled ? "disabled" : ""} ${handler.state.readOnly ? "readOnly" : ""}`,
4172
4219
  onChange: (ev) => {
@@ -4225,6 +4272,7 @@ const KeyHandler$1 = observer((props) => {
4225
4272
  handler.focusPrevious();
4226
4273
  break;
4227
4274
  case "Enter":
4275
+ case "NumpadEnter":
4228
4276
  ev.preventDefault();
4229
4277
  if (handler.isOpen) {
4230
4278
  handler.selectFocused();
@@ -4279,10 +4327,10 @@ const Autocomplete = (props) => {
4279
4327
  });
4280
4328
  const prevProps = usePrevious(props.properties);
4281
4329
  if (!shallowEqual$1(prevProps.current, props.properties) && handler?.state) {
4330
+ Object.assign(handler.state, props.properties);
4282
4331
  if (prevProps.current?.value !== props.properties?.value && props.properties?.value !== void 0) {
4283
- handler.setValue(props.properties.value);
4332
+ handler.setValue(props.properties.value, { fireOnChange: false });
4284
4333
  }
4285
- Object.assign(handler.state, props.properties);
4286
4334
  }
4287
4335
  if (!handler) {
4288
4336
  return null;
@@ -4293,7 +4341,7 @@ const Autocomplete = (props) => {
4293
4341
  className: `autocomplete ${props.properties?.className || ""}`,
4294
4342
  "data-autocomplete-box": handler.state.id,
4295
4343
  ...getVariant("layout.common.components.autocomplete"),
4296
- children: /* @__PURE__ */ jsx(SearchBox, {})
4344
+ children: /* @__PURE__ */ jsx(SearchBox, { ...props.inputProps })
4297
4345
  }
4298
4346
  ) });
4299
4347
  };
@@ -4673,122 +4721,29 @@ const Checkbox$1 = forwardRef(
4673
4721
  );
4674
4722
  Checkbox$1.displayName = "Checkbox";
4675
4723
 
4676
- var __defProp$e = Object.defineProperty;
4677
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4678
- var __publicField$e = (obj, key, value) => {
4679
- __defNormalProp$e(obj, key + "" , value);
4680
- return value;
4681
- };
4682
- var __accessCheck$3 = (obj, member, msg) => {
4683
- if (!member.has(obj))
4684
- throw TypeError("Cannot " + msg);
4685
- };
4686
- var __privateGet$2 = (obj, member, getter) => {
4687
- __accessCheck$3(obj, member, "read from private field");
4688
- return getter ? getter.call(obj) : member.get(obj);
4689
- };
4690
- var __privateAdd$3 = (obj, member, value) => {
4691
- if (member.has(obj))
4692
- throw TypeError("Cannot add the same private member more than once");
4693
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
4694
- };
4695
- var __privateSet$1 = (obj, member, value, setter) => {
4696
- __accessCheck$3(obj, member, "write to private field");
4697
- member.set(obj, value);
4698
- return value;
4699
- };
4700
- var _onFocusCallbacks, _a;
4701
- const historySize = 50;
4702
- const globalFocus = new (_a = class {
4703
- constructor() {
4704
- __publicField$e(this, "focused", []);
4705
- __privateAdd$3(this, _onFocusCallbacks, []);
4706
- debugDispatcher.on(
4707
- "focusHistory",
4708
- () => {
4709
- console.info(this.focused);
4710
- },
4711
- "Muestra el historial de elementos que recibieron foco."
4712
- );
4713
- }
4714
- offFocus(cb) {
4715
- __privateSet$1(this, _onFocusCallbacks, __privateGet$2(this, _onFocusCallbacks).filter((current) => {
4716
- return current !== cb;
4717
- }));
4718
- }
4719
- onFocus(cb) {
4720
- __privateGet$2(this, _onFocusCallbacks).push(cb);
4721
- return () => {
4722
- this.offFocus(cb);
4723
- };
4724
- }
4725
- inDocument(el) {
4726
- return el instanceof Function || el instanceof HTMLElement && el.offsetParent !== null;
4727
- }
4728
- set focus(element) {
4729
- this.focused = this.focused.filter((el) => {
4730
- const existsInDocument = this.inDocument(el) && element !== el;
4731
- return existsInDocument;
4732
- });
4733
- this.focused.unshift(element);
4734
- if (this.focused.length > historySize) {
4735
- this.focused = this.focused.splice(0, historySize);
4736
- }
4737
- __privateGet$2(this, _onFocusCallbacks).forEach((cb) => {
4738
- return cb();
4739
- });
4740
- }
4741
- get list() {
4742
- return [...this.focused];
4743
- }
4744
- /**
4745
- * @param querySelector A query selector against which the element should match
4746
- * @returns The last HTMLElement if no querySelector argument provided or else, the last which matches
4747
- * against that query selector.
4748
- * */
4749
- last(querySelector, omit = 0) {
4750
- if (querySelector)
4751
- for (let i = omit; i <= this.focused.length; i++) {
4752
- const storedElement = this.focused[i];
4753
- const element = (
4754
- // eslint-disable-next-line no-nested-ternary
4755
- storedElement?.id !== void 0 ? storedElement : isFunction(storedElement) ? storedElement(false) : null
4756
- );
4757
- if (element && this.inDocument(element) && element.matches && element.matches(querySelector))
4758
- return element;
4759
- }
4760
- else
4761
- return this.focused[this.focused.length - 1];
4762
- return null;
4763
- }
4764
- }, _onFocusCallbacks = new WeakMap(), _a)();
4765
-
4766
- const FieldErrorMessage = ({ children, name }) => {
4767
- const [ref, setRef] = React.useState(null);
4768
- React.useEffect(() => {
4769
- if (children) {
4770
- const event = new CustomEvent(customEvents.focus, { bubbles: true });
4771
- ref?.dispatchEvent(event);
4772
- }
4773
- }, [children, ref]);
4774
- if (children) {
4724
+ const CalModal = React__default.forwardRef(
4725
+ ({ handleClickDay, calValue, locale }) => {
4775
4726
  return /* @__PURE__ */ jsx(
4776
4727
  Box,
4777
4728
  {
4778
- ref: setRef,
4779
- role: "alert",
4780
- "data-testid": name ? `err_${name}` : null,
4781
- sx: {
4782
- mb: "0",
4783
- color: "danger",
4784
- pt: "2"
4785
- },
4786
- children
4729
+ ...getVariant("layout.common.components.datePicker"),
4730
+ className: "datePicker",
4731
+ children: /* @__PURE__ */ jsx(
4732
+ Calendar,
4733
+ {
4734
+ onClickDay: handleClickDay,
4735
+ locale,
4736
+ value: calValue || /* @__PURE__ */ new Date(),
4737
+ nextLabel: "\u203A",
4738
+ next2Label: "\xBB",
4739
+ prevLabel: "\u2039",
4740
+ prev2Label: "\xAB"
4741
+ }
4742
+ )
4787
4743
  }
4788
4744
  );
4789
4745
  }
4790
- return null;
4791
- };
4746
+ );
4792
4747
 
4793
4748
  const IconInput = ({
4794
4749
  additionalButtons,
@@ -4819,8 +4774,10 @@ const IconInput = ({
4819
4774
  if (onBlur && (!ev.relatedTarget || ev.relatedTarget && !isChild(
4820
4775
  ev.relatedTarget,
4821
4776
  (current) => current === parentRef.current
4822
- )))
4777
+ ))) {
4778
+ Object.assign(ev.target, { value: innerInputRef.current?.value });
4823
4779
  onBlur(ev);
4780
+ }
4824
4781
  },
4825
4782
  [onBlur]
4826
4783
  );
@@ -4865,21 +4822,6 @@ const IconInput = ({
4865
4822
  );
4866
4823
  };
4867
4824
 
4868
- const getFieldErrorStyles = (isValid) => {
4869
- return {
4870
- borderLeftStyle: !isValid ? "solid" : null,
4871
- borderLeftWidth: !isValid ? "4px" : null,
4872
- borderLeftColor: !isValid ? "danger" : void 0
4873
- };
4874
- };
4875
- const getFieldTouchedStyles = (isTouched) => {
4876
- return {
4877
- borderStyle: isTouched ? "solid" : null,
4878
- borderWidth: isTouched ? "1px" : null,
4879
- borderColor: isTouched ? "orange" : void 0
4880
- };
4881
- };
4882
-
4883
4825
  const DEFAULT_LOCALE = window.LANG_CODE;
4884
4826
  const DEFAULT_MASK_PLACEHOLDER = "_";
4885
4827
  const dateFormat = getDateFormat();
@@ -4892,9 +4834,11 @@ const DateInput = React__default.forwardRef(
4892
4834
  ({
4893
4835
  allowPickBeforeToday,
4894
4836
  buttonProps: outerButtonProps,
4837
+ CalModalRenderer,
4895
4838
  className,
4896
4839
  error,
4897
4840
  getCustomMask,
4841
+ inputClassName,
4898
4842
  isLoading,
4899
4843
  onBlur,
4900
4844
  onChange,
@@ -4904,63 +4848,55 @@ const DateInput = React__default.forwardRef(
4904
4848
  value: outerValue,
4905
4849
  ...props
4906
4850
  }, ref) => {
4907
- const id = React__default.useMemo(uniqueId$2, []);
4851
+ const id = React__default.useMemo(uniqueId$3, []);
4908
4852
  const [inputValue, setInputValue] = React__default.useState(outerValue ?? "");
4909
4853
  const [calValue, setCalValue] = React__default.useState();
4910
4854
  const boxRef = React__default.useRef(null);
4911
- const { show, hide, ...modalProps } = useModal({
4912
- preFetcher() {
4913
- globalFocus.focus = () => boxRef.current?.querySelector(".iconButton");
4914
- return new Promise((resolve) => {
4915
- let currentSelectedDate = dayjs(inputValue, dateFormat);
4916
- if (!currentSelectedDate.isValid())
4917
- currentSelectedDate = dayjs(/* @__PURE__ */ new Date());
4918
- setCalValue(currentSelectedDate.toDate());
4919
- resolve();
4920
- });
4921
- }
4922
- });
4855
+ const { deleteFiltersTimestamp, ...otherProps } = props;
4856
+ const hasBlured = useRef(false);
4923
4857
  const [stateError, setError] = React__default.useState(error ?? null);
4924
4858
  const lastEmittedValue = React__default.useRef(outerValue ?? "");
4925
- useUpdateEffect(() => {
4859
+ useUpdateEffect$1(() => {
4926
4860
  setInputValue(outerValue ?? "");
4927
4861
  lastEmittedValue.current = outerValue;
4928
4862
  }, [outerValue]);
4929
- useUpdateEffect(() => {
4863
+ useUpdateEffect$1(() => {
4930
4864
  setError(error ?? null);
4931
4865
  }, [error]);
4932
- useUpdateEffect(() => {
4866
+ useUpdateEffect$1(() => {
4867
+ setError(null);
4868
+ if (deleteFiltersTimestamp !== void 0) {
4869
+ setCalendarValue("");
4870
+ }
4871
+ }, [deleteFiltersTimestamp]);
4872
+ useUpdateEffect$1(() => {
4933
4873
  if (onError)
4934
4874
  onError(stateError);
4875
+ if (stateError) {
4876
+ setInputValue("");
4877
+ }
4878
+ if (onError)
4879
+ onError(stateError ?? "");
4935
4880
  }, [stateError]);
4936
4881
  const shoutOnChange = React__default.useCallback(
4937
4882
  (newValue) => {
4938
- if (newValue !== lastEmittedValue.current && onChange) {
4939
- const result = onChange(newValue);
4940
- if (result) {
4941
- lastEmittedValue.current = newValue;
4942
- }
4943
- return result;
4944
- }
4945
- return true;
4883
+ lastEmittedValue.current = newValue;
4884
+ return onChange?.(newValue) ?? true;
4946
4885
  },
4947
4886
  [onChange]
4948
4887
  );
4949
4888
  const setCalendarValue = React__default.useCallback(
4950
- (value, nocheck) => {
4889
+ (value, nocheck, avoidShout) => {
4951
4890
  if (value === "") {
4952
- void shoutOnChange("");
4891
+ if (getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== inputValue)
4892
+ void shoutOnChange("");
4953
4893
  setInputValue("");
4894
+ setCalValue(/* @__PURE__ */ new Date());
4954
4895
  return;
4955
4896
  }
4956
- let newDate;
4957
- if (value !== "") {
4958
- newDate = dayjs(value, dateFormat);
4959
- if (!newDate.isValid())
4960
- newDate = dayjs(/* @__PURE__ */ new Date());
4961
- } else {
4962
- newDate = dayjs(/* @__PURE__ */ new Date());
4963
- }
4897
+ let newDate = dayjs(value, dateFormat);
4898
+ if (!newDate.isValid())
4899
+ newDate = dayjs(/* @__PURE__ */ new Date(), dateFormat);
4964
4900
  const formattedDate = newDate.format(dateFormat);
4965
4901
  const today = /* @__PURE__ */ new Date();
4966
4902
  today.setHours(0, 0, 0, 0);
@@ -4973,16 +4909,27 @@ const DateInput = React__default.forwardRef(
4973
4909
  setInputValue("");
4974
4910
  setError(window.MSG_FEC_FIN_MAY_FEC_INI);
4975
4911
  } else {
4976
- const shoutResult = shoutOnChange(value === "" ? "" : formattedDate);
4977
- if (shoutResult === false) {
4978
- setInputValue(shoutResult || "");
4979
- setError(null);
4980
- } else if (typeof shoutResult === "string") {
4981
- setInputValue("");
4982
- setError(shoutResult);
4983
- } else {
4912
+ if (avoidShout) {
4984
4913
  setInputValue(formattedDate);
4985
4914
  setError(null);
4915
+ setCalValue(newDate.toDate());
4916
+ } else {
4917
+ const shoutResult = shoutOnChange(
4918
+ value === "" ? "" : formattedDate
4919
+ );
4920
+ if (shoutResult === false) {
4921
+ setInputValue(shoutResult || "");
4922
+ setError(null);
4923
+ setCalValue(/* @__PURE__ */ new Date());
4924
+ } else if (typeof shoutResult === "string") {
4925
+ setInputValue("");
4926
+ setError(shoutResult);
4927
+ setCalValue(/* @__PURE__ */ new Date());
4928
+ } else {
4929
+ setInputValue(formattedDate);
4930
+ setError(null);
4931
+ setCalValue(newDate.toDate());
4932
+ }
4986
4933
  }
4987
4934
  }
4988
4935
  },
@@ -4990,40 +4937,70 @@ const DateInput = React__default.forwardRef(
4990
4937
  );
4991
4938
  const selectDate = React__default.useCallback(
4992
4939
  (val) => {
4993
- hide();
4994
4940
  const newValue = dayjs(val).format(dateFormat);
4995
4941
  setCalendarValue(newValue, true);
4996
4942
  },
4997
- [hide, setCalendarValue]
4943
+ [setCalendarValue]
4998
4944
  );
4999
- const onCloseCalendarModal = React__default.useCallback(() => {
5000
- hide();
5001
- }, [hide]);
4945
+ useEffect(() => {
4946
+ if (stateError !== "" && stateError !== null) {
4947
+ ApiaUtil.instance.notifications.notify({
4948
+ message: stateError,
4949
+ type: "warning"
4950
+ });
4951
+ }
4952
+ }, [stateError]);
5002
4953
  const handleBlur = React__default.useCallback(
5003
4954
  (ev) => {
4955
+ hasBlured.current = true;
4956
+ if (ev.target.value && !dayjs(ev.target.value, dateFormat, true).isValid()) {
4957
+ setInputValue("");
4958
+ onError?.(window.MSG_INVALID_DATE);
4959
+ return;
4960
+ }
5004
4961
  if (onBlur && !isChild(ev.relatedTarget, (current) => {
5005
4962
  return current.id === `DateModal${id}` || current.id === `DateInput${id}`;
5006
4963
  })) {
5007
- onBlur(ev);
4964
+ const newEvent = {
4965
+ ...ev,
4966
+ target: ev.target.matches("input.dateInput") ? ev.target : ev.target.closest(".dateInput")?.querySelector(
4967
+ "input"
4968
+ )
4969
+ };
4970
+ const actualBlur = onBlur instanceof Promise ? onBlur : (ev2) => new Promise((resolve) => {
4971
+ const result = onBlur?.(ev2);
4972
+ resolve(result);
4973
+ });
4974
+ void actualBlur(newEvent).then((result) => {
4975
+ if (typeof result === "string") {
4976
+ setError(result);
4977
+ } else if (result === false) {
4978
+ setInputValue("");
4979
+ }
4980
+ });
5008
4981
  }
5009
4982
  },
5010
- [id, onBlur]
4983
+ [id, onBlur, onError]
5011
4984
  );
5012
4985
  const inputProps = React__default.useMemo(
5013
4986
  () => ({
5014
- ...props,
5015
- className: "dateInput",
5016
- value: renderLabel ? renderLabel(inputValue) : inputValue,
5017
- inputRef: ref,
4987
+ ...otherProps,
4988
+ className: `dateInput ${inputClassName ?? ""}`,
4989
+ value: stateError ? "" : renderLabel ? renderLabel(inputValue) : inputValue,
4990
+ ref,
5018
4991
  onChange: (ev) => {
5019
4992
  setInputValue(ev.target.value);
5020
4993
  if (getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== ev.target.value && ev.target.value !== "")
5021
4994
  setError(null);
5022
4995
  },
5023
4996
  onBlur: (ev) => {
5024
- if (!(props.readOnly || getCustomMask))
5025
- setCalendarValue(ev.target.value);
5026
- handleBlur(ev);
4997
+ if (!(props.readOnly || getCustomMask || document.querySelector(".overlay.screenLock")))
4998
+ setCalendarValue(ev.target.value, false, true);
4999
+ if (hasBlured.current) {
5000
+ hasBlured.current = false;
5001
+ } else if (!document.querySelector(".overlay.screenLock")) {
5002
+ handleBlur(ev);
5003
+ }
5027
5004
  },
5028
5005
  onKeyDown: (ev) => {
5029
5006
  if (ev.key === "Enter")
@@ -5031,18 +5008,21 @@ const DateInput = React__default.forwardRef(
5031
5008
  }
5032
5009
  }),
5033
5010
  [
5034
- getCustomMask,
5035
- handleBlur,
5011
+ otherProps,
5012
+ inputClassName,
5013
+ stateError,
5014
+ renderLabel,
5036
5015
  inputValue,
5037
- props,
5038
5016
  ref,
5039
- renderLabel,
5040
- setCalendarValue
5017
+ props.readOnly,
5018
+ getCustomMask,
5019
+ setCalendarValue,
5020
+ handleBlur
5041
5021
  ]
5042
5022
  );
5043
5023
  const buttonProps = React__default.useMemo(
5044
5024
  () => ({
5045
- disabled: props.disabled ?? props.readOnly,
5025
+ disabled: props.disabled || props.readOnly,
5046
5026
  "aria-label": window.LBL_PICK_DATE,
5047
5027
  ...outerButtonProps
5048
5028
  }),
@@ -5060,60 +5040,118 @@ const DateInput = React__default.forwardRef(
5060
5040
  `#DateInput${id} input`
5061
5041
  )?.focus();
5062
5042
  },
5063
- type: "button",
5064
5043
  title: getLabel("btnAiDelete").text,
5065
- "aria-label": getLabel("btnAiDelete").text
5044
+ "aria-label": getLabel("btnAiDelete").text,
5045
+ type: "button"
5066
5046
  }
5067
5047
  ),
5068
5048
  [id, onDelete, setCalendarValue]
5069
5049
  );
5070
- return /* @__PURE__ */ jsxs(Fragment, { children: [
5071
- /* @__PURE__ */ jsx(
5072
- CalendarModal,
5073
- {
5074
- ...modalProps,
5075
- calValue,
5076
- locale: DEFAULT_LOCALE,
5077
- handleClickDay: selectDate,
5078
- onCancel: onCloseCalendarModal,
5079
- id: `DateModal${id}`
5080
- }
5081
- ),
5082
- /* @__PURE__ */ jsxs(
5083
- Box,
5084
- {
5085
- ...getVariant("forms.dateInput"),
5086
- className: `${className ?? ""} dateInput`,
5087
- id: `DateInput${id}`,
5088
- ref: boxRef,
5089
- children: [
5090
- /* @__PURE__ */ jsx(
5091
- IconInput,
5092
- {
5093
- additionalButtons: inputValue && inputValue !== getMaskForDateFormat().replaceAll(
5094
- "9",
5095
- DEFAULT_MASK_PLACEHOLDER
5096
- ) && !props.readOnly && !props.disabled ? additionalButtons : void 0,
5097
- isLoading,
5098
- maskPlaceholder: DEFAULT_MASK_PLACEHOLDER,
5099
- mask: getCustomMask ? getCustomMask() : getMaskForDateFormat(),
5100
- icon: icons.Calendar,
5101
- onBlur: handleBlur,
5102
- buttonProps,
5103
- inputProps,
5104
- readOnly: props.readOnly,
5105
- sx: getFieldErrorStyles(stateError === null),
5106
- onClick: show
5107
- }
5108
- ),
5109
- stateError && /* @__PURE__ */ jsx(FieldErrorMessage, { children: stateError })
5110
- ]
5111
- }
5112
- )
5113
- ] });
5050
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
5051
+ Box,
5052
+ {
5053
+ ...getVariant("forms.dateInput"),
5054
+ className: `${className ?? ""} dateInput`,
5055
+ id: `DateInput${id}`,
5056
+ ref: boxRef,
5057
+ onBlur: (e) => {
5058
+ if (hasBlured.current) {
5059
+ hasBlured.current = false;
5060
+ } else if (!document.querySelector(".overlay.screenLock")) {
5061
+ handleBlur(e);
5062
+ }
5063
+ },
5064
+ children: /* @__PURE__ */ jsx(
5065
+ IconInput,
5066
+ {
5067
+ additionalButtons: inputValue && inputValue !== getMaskForDateFormat().replaceAll(
5068
+ "9",
5069
+ DEFAULT_MASK_PLACEHOLDER
5070
+ ) && !props.readOnly && !props.disabled ? additionalButtons : void 0,
5071
+ buttonProps,
5072
+ className: `${stateError !== null ? "field__withError" : ""}`,
5073
+ icon: FaCalendarAlt,
5074
+ inputProps,
5075
+ isLoading,
5076
+ mask: getCustomMask ? getCustomMask() : getMaskForDateFormat(),
5077
+ maskPlaceholder: DEFAULT_MASK_PLACEHOLDER,
5078
+ onClick: (ev) => {
5079
+ const tooltip = ApiaUtil.instance.tooltips.open({
5080
+ attachToElement() {
5081
+ return ev.target.closest(
5082
+ "button"
5083
+ );
5084
+ },
5085
+ attachToElementAnchorPoint: "center",
5086
+ closeOnClick: false,
5087
+ closeOnClickOut: true,
5088
+ closeOnEscape: true,
5089
+ closeOnMouseLeaveTooltip: false,
5090
+ closeOnMouseLeaveAttachedElement: false,
5091
+ closeOnScrollOut: true,
5092
+ children: CalModalRenderer ? /* @__PURE__ */ jsx(
5093
+ CalModalRenderer,
5094
+ {
5095
+ calValue,
5096
+ locale: DEFAULT_LOCALE,
5097
+ handleClickDay: (ev2) => {
5098
+ selectDate(ev2);
5099
+ setCalValue(ev2);
5100
+ tooltip.close();
5101
+ }
5102
+ }
5103
+ ) : /* @__PURE__ */ jsx(
5104
+ CalModal,
5105
+ {
5106
+ calValue,
5107
+ locale: DEFAULT_LOCALE,
5108
+ handleClickDay: (ev2) => {
5109
+ selectDate(ev2);
5110
+ setCalValue(ev2);
5111
+ tooltip.close();
5112
+ }
5113
+ }
5114
+ ),
5115
+ initialFocusGetter(el) {
5116
+ return el.querySelector(`.react-calendar__tile--active`);
5117
+ },
5118
+ minSize: { width: 350, height: 310 }
5119
+ });
5120
+ },
5121
+ readOnly: props.readOnly
5122
+ }
5123
+ )
5124
+ }
5125
+ ) });
5114
5126
  }
5115
5127
  );
5116
- DateInput.displayName = "DateInput";
5128
+
5129
+ const FieldErrorMessage = ({ children, name }) => {
5130
+ const [ref, setRef] = React.useState(null);
5131
+ React.useEffect(() => {
5132
+ if (children) {
5133
+ const event = new CustomEvent(customEvents.focus, { bubbles: true });
5134
+ ref?.dispatchEvent(event);
5135
+ }
5136
+ }, [children, ref]);
5137
+ if (children) {
5138
+ return /* @__PURE__ */ jsx(
5139
+ Box,
5140
+ {
5141
+ ref: setRef,
5142
+ role: "alert",
5143
+ "data-testid": name ? `err_${name}` : null,
5144
+ sx: {
5145
+ mb: "0",
5146
+ color: "danger",
5147
+ pt: "2"
5148
+ },
5149
+ children
5150
+ }
5151
+ );
5152
+ }
5153
+ return null;
5154
+ };
5117
5155
 
5118
5156
  function fillZeros(amount) {
5119
5157
  return Array(Math.max(0, amount)).fill(0).join("");
@@ -5275,6 +5313,21 @@ const RequiredMark = ({
5275
5313
  return isRequired && !isReadonly && !isFormReadonly ? /* @__PURE__ */ jsx("span", { className: "requiredMark", title: getLabel("msgReqField").text, children: "*" }) : null;
5276
5314
  };
5277
5315
 
5316
+ const getFieldErrorStyles = (isValid) => {
5317
+ return {
5318
+ borderLeftStyle: !isValid ? "solid" : null,
5319
+ borderLeftWidth: !isValid ? "4px" : null,
5320
+ borderLeftColor: !isValid ? "danger" : void 0
5321
+ };
5322
+ };
5323
+ const getFieldTouchedStyles = (isTouched) => {
5324
+ return {
5325
+ borderStyle: isTouched ? "solid" : null,
5326
+ borderWidth: isTouched ? "1px" : null,
5327
+ borderColor: isTouched ? "orange" : void 0
5328
+ };
5329
+ };
5330
+
5278
5331
  injectStyles("layout.common.components.fieldLabel", {
5279
5332
  display: "flex",
5280
5333
  flexDirection: "column",
@@ -5381,10 +5434,12 @@ const AutoEllipsis = ({
5381
5434
  const timeout = useRef(0);
5382
5435
  const ref = useCallback(
5383
5436
  (el) => {
5384
- if (!el)
5437
+ if (!el || !document.contains(el))
5385
5438
  return;
5386
5439
  unsuscribe.current();
5387
5440
  function showBox() {
5441
+ if (!el || !document.contains(el))
5442
+ return;
5388
5443
  document.querySelectorAll(".autoellipsis_clone").forEach((c) => c.remove());
5389
5444
  clone.current = el.cloneNode(true);
5390
5445
  const target = findParent?.(el) ?? el;
@@ -5416,18 +5471,17 @@ const AutoEllipsis = ({
5416
5471
  clone.current.style.fill = "var(--theme-ui-colors-palette-text-primary)";
5417
5472
  clone.current.style.pointerEvents = "none";
5418
5473
  clone.current.style.wordBreak = "break-all";
5474
+ clone.current.classList.add("autoellipsis_clone");
5419
5475
  const overridenStyles = overrideStyles?.(el);
5420
5476
  if (overridenStyles) {
5421
- for (let i = 0; i < (overridenStyles?.length ?? 0); i++) {
5477
+ Object.entries(overridenStyles).forEach(([name, value]) => {
5478
+ if (name.match(/webkit/))
5479
+ return;
5422
5480
  try {
5423
- const name = overridenStyles[i];
5424
- const value = overridenStyles[name];
5425
- if (!name.match(/webkit/)) {
5426
- clone.current.style[name] = value;
5427
- }
5481
+ clone.current.style[name] = value;
5428
5482
  } catch (e) {
5429
5483
  }
5430
- }
5484
+ });
5431
5485
  }
5432
5486
  clone.current.addEventListener("mouseleave", (ev) => {
5433
5487
  if (isChild(
@@ -5437,8 +5491,17 @@ const AutoEllipsis = ({
5437
5491
  return;
5438
5492
  clone.current?.remove();
5439
5493
  });
5494
+ let interval = 0;
5440
5495
  function close() {
5496
+ clone.current?.remove();
5497
+ document.removeEventListener("scroll", close);
5498
+ clearInterval(interval);
5441
5499
  }
5500
+ interval = setInterval(() => {
5501
+ if (!document.contains(el)) {
5502
+ close();
5503
+ }
5504
+ }, 100);
5442
5505
  document.addEventListener("scroll", close);
5443
5506
  document.body.append(clone.current);
5444
5507
  const cloneBounding = clone.current.getBoundingClientRect();
@@ -5665,19 +5728,40 @@ const AccordionItemContent = ({
5665
5728
  const duration = handler.hooks.usePropsSelector(
5666
5729
  (current) => current.animationDuration
5667
5730
  );
5668
- return /* @__PURE__ */ jsxs(Box, { className: "accordion__item", "data-id": id, children: [
5669
- button,
5670
- /* @__PURE__ */ jsx(
5671
- AnimateHeight,
5672
- {
5673
- className: "accordion__item__content",
5674
- height: isExpanded ? "auto" : 0,
5675
- duration,
5676
- id: `accordion__${handler.id}__${id}`,
5677
- children: actualChildren
5678
- }
5679
- )
5680
- ] });
5731
+ const uns = useRef(() => {
5732
+ });
5733
+ return /* @__PURE__ */ jsxs(
5734
+ Box,
5735
+ {
5736
+ className: "accordion__item",
5737
+ "data-id": id,
5738
+ ref: (el) => {
5739
+ uns.current();
5740
+ if (el instanceof HTMLElement) {
5741
+ const handleFocus = () => {
5742
+ handler.toggleItem(id, true);
5743
+ };
5744
+ el.addEventListener(customEvents.focus, handleFocus);
5745
+ uns.current = () => {
5746
+ el.removeEventListener(customEvents.focus, handleFocus);
5747
+ };
5748
+ }
5749
+ },
5750
+ children: [
5751
+ button,
5752
+ /* @__PURE__ */ jsx(
5753
+ AnimateHeight,
5754
+ {
5755
+ className: `accordion__item__content ${isExpanded ? " expanded" : ""}`,
5756
+ height: isExpanded ? "auto" : 0,
5757
+ duration,
5758
+ id: `accordion__${handler.id}__${id}`,
5759
+ children: actualChildren
5760
+ }
5761
+ )
5762
+ ]
5763
+ }
5764
+ );
5681
5765
  };
5682
5766
 
5683
5767
  const AccordionItem = ({
@@ -5873,6 +5957,7 @@ const LabelBox = ({
5873
5957
  tooltip,
5874
5958
  closeTooltip,
5875
5959
  onClose,
5960
+ variant,
5876
5961
  ...props
5877
5962
  }) => {
5878
5963
  return /* @__PURE__ */ jsxs(
@@ -5880,17 +5965,16 @@ const LabelBox = ({
5880
5965
  {
5881
5966
  ...props,
5882
5967
  title: tooltip,
5883
- className: `labelBox ${className ?? ""}`,
5884
- variant: "layout.common.boxes.labelBox",
5968
+ className: `labelBox ${className ?? ""} ${variant || "normal"}`,
5969
+ ...getVariant("layout.common.boxes.labelBox"),
5885
5970
  children: [
5886
5971
  /* @__PURE__ */ jsx(Box, { className: "labelAndIcon", as: "span", children: label }),
5887
- /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
5972
+ onClose && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
5888
5973
  Close,
5889
5974
  {
5890
5975
  type: "button",
5891
5976
  className: "closeButton",
5892
5977
  onClick: onClose,
5893
- disabled: !onClose,
5894
5978
  title: closeTooltip,
5895
5979
  variant: "icon-outline-danger"
5896
5980
  }
@@ -6051,12 +6135,13 @@ const Dropzone = ({
6051
6135
  className,
6052
6136
  messageError,
6053
6137
  progress = 0,
6054
- defaultLabel = getLabel("lblUploadDrag").text,
6138
+ defaultLabel = getLabel("btnUploadClass").text,
6055
6139
  draggingLabel = getLabel("lblDroping").text,
6056
6140
  onClick,
6057
- onChange
6141
+ onChange,
6142
+ handleInfoButton
6058
6143
  }) => {
6059
- const innerSx = messageError ? { borderLeft: "7px solid", borderLeftColor: "danger" } : {};
6144
+ const innerSx = messageError ? { borderLeft: "2px solid", borderColor: "danger" } : {};
6060
6145
  const fileInputRef = useRef(null);
6061
6146
  const handleClick = (ev) => {
6062
6147
  onClick?.(ev);
@@ -6078,38 +6163,61 @@ const Dropzone = ({
6078
6163
  return /* @__PURE__ */ jsxs(
6079
6164
  Box,
6080
6165
  {
6081
- tabIndex: 0,
6082
6166
  ...getVariant("layout.execution.components.uploader.dropzone"),
6083
- sx: { ...innerSx, sx },
6084
- className: `dropzone ${className ?? ""}`,
6085
- onClick: handleClick,
6086
- onDrop: (e) => {
6087
- e.preventDefault();
6088
- const newFiles = Array.from(e.dataTransfer.files);
6089
- setIsDragging(false);
6090
- onChange?.(newFiles);
6091
- },
6092
- onDragEnter: handleDragStart,
6093
- onDragLeave: handleDragLeave,
6094
- onDragOver: handleDragOver,
6167
+ className: "dropzone__container",
6095
6168
  children: [
6096
- progress > 0 && progress < 100 && /* @__PURE__ */ jsx(Progress, { max: 100, value: progress, className: "progressBar" }),
6097
- messageError ? /* @__PURE__ */ jsx(Box, { color: "danger", children: messageError }) : isDragging ? draggingLabel : defaultLabel,
6098
- /* @__PURE__ */ jsx(
6099
- "input",
6169
+ /* @__PURE__ */ jsxs(
6170
+ Box,
6100
6171
  {
6101
- multiple: true,
6102
- type: "file",
6103
- ref: fileInputRef,
6104
- style: { display: "none" },
6105
- onChange: (e) => {
6106
- e.preventDefault();
6107
- if (e.target.files) {
6108
- const newFiles = Array.from([...e.target.files]);
6109
- onChange?.(newFiles);
6110
- e.target.value = "";
6172
+ tabIndex: 0,
6173
+ sx: { ...innerSx, sx },
6174
+ className: `dropzone ${className ?? ""}`,
6175
+ onClick: handleClick,
6176
+ onKeyDown: (ev) => {
6177
+ if (ev.code === "Enter" || ev.code === "Space") {
6178
+ handleClick(ev);
6111
6179
  }
6112
- }
6180
+ },
6181
+ onDrop: (e) => {
6182
+ e.preventDefault();
6183
+ const newFiles = Array.from(e.dataTransfer.files);
6184
+ setIsDragging(false);
6185
+ onChange?.(newFiles);
6186
+ },
6187
+ onDragEnter: handleDragStart,
6188
+ onDragLeave: handleDragLeave,
6189
+ onDragOver: handleDragOver,
6190
+ children: [
6191
+ progress > 0 && progress < 100 && /* @__PURE__ */ jsx(Progress, { max: 100, value: progress, className: "progressBar" }),
6192
+ messageError ? /* @__PURE__ */ jsx(Box, { color: "danger", children: messageError }) : isDragging ? draggingLabel : defaultLabel,
6193
+ /* @__PURE__ */ jsx(
6194
+ "input",
6195
+ {
6196
+ multiple: true,
6197
+ type: "file",
6198
+ ref: fileInputRef,
6199
+ style: { display: "none" },
6200
+ onChange: (e) => {
6201
+ e.preventDefault();
6202
+ if (e.target.files) {
6203
+ const newFiles = Array.from([...e.target.files]);
6204
+ onChange?.(newFiles);
6205
+ e.target.value = "";
6206
+ }
6207
+ }
6208
+ }
6209
+ )
6210
+ ]
6211
+ }
6212
+ ),
6213
+ handleInfoButton && /* @__PURE__ */ jsx(
6214
+ IconButton,
6215
+ {
6216
+ className: "info",
6217
+ iconSize: "Sm",
6218
+ icon: "Info",
6219
+ onMouseEnter: handleInfoButton,
6220
+ onClick: handleClick
6113
6221
  }
6114
6222
  )
6115
6223
  ]
@@ -6187,14 +6295,15 @@ const Attachments = observer(
6187
6295
  ({
6188
6296
  attachments,
6189
6297
  onRemove,
6190
- onAddDescription
6298
+ onAddDescription,
6299
+ className
6191
6300
  }) => {
6192
6301
  if (!attachments.length)
6193
6302
  return null;
6194
6303
  return /* @__PURE__ */ jsx(
6195
6304
  Box,
6196
6305
  {
6197
- className: "attachments",
6306
+ className: `attachments ${className}`,
6198
6307
  ...getVariant("layout.common.chat.attachments"),
6199
6308
  children: attachments.map((x) => /* @__PURE__ */ jsx(
6200
6309
  FileAttachment,
@@ -6804,7 +6913,7 @@ const _Templater = class _Templater {
6804
6913
  Object.entries(replacementVars).forEach(([varName, varContent]) => {
6805
6914
  if (varContent)
6806
6915
  Object.entries(varContent).forEach(([key, value]) => {
6807
- if (isFunction$1(value)) {
6916
+ if (isFunction(value)) {
6808
6917
  if (!contextMethods[contextId])
6809
6918
  contextMethods[contextId] = {};
6810
6919
  const methodId = uniqueId$3();
@@ -6903,38 +7012,43 @@ const Message = observer(
6903
7012
  }
6904
7013
  );
6905
7014
 
6906
- const History = observer(({ messages }) => {
6907
- let currentType = "";
6908
- return /* @__PURE__ */ jsx(AutoscrollContainer, { sx: { flexGrow: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(
6909
- Box,
6910
- {
6911
- ...getVariant("layout.common.chat.history"),
6912
- className: "chat_history",
6913
- children: messages.map((current, i) => {
6914
- let first = false;
6915
- let last = false;
6916
- if (currentType !== current.messageType) {
6917
- currentType = current.messageType;
6918
- first = true;
6919
- }
6920
- if (i === messages.length - 1 || messages[i + 1].messageType !== current.messageType) {
6921
- last = true;
6922
- }
6923
- return /* @__PURE__ */ jsx(
6924
- Message,
6925
- {
6926
- className: first ? "first" : last ? "last" : void 0,
6927
- type: current.messageType,
6928
- id: String(current.id),
6929
- attachments: current.attachments,
6930
- reference: current.reference,
6931
- message: current.message
7015
+ const History = observer(
7016
+ ({
7017
+ messages,
7018
+ className
7019
+ }) => {
7020
+ let currentType = "";
7021
+ return /* @__PURE__ */ jsx(AutoscrollContainer, { className, children: /* @__PURE__ */ jsx(
7022
+ Box,
7023
+ {
7024
+ ...getVariant("layout.common.chat.history"),
7025
+ className: "chat_history",
7026
+ children: messages.map((current, i) => {
7027
+ let first = false;
7028
+ let last = false;
7029
+ if (currentType !== current.messageType) {
7030
+ currentType = current.messageType;
7031
+ first = true;
6932
7032
  }
6933
- );
6934
- })
6935
- }
6936
- ) });
6937
- });
7033
+ if (i === messages.length - 1 || messages[i + 1].messageType !== current.messageType) {
7034
+ last = true;
7035
+ }
7036
+ return /* @__PURE__ */ jsx(
7037
+ Message,
7038
+ {
7039
+ className: first ? "first" : last ? "last" : void 0,
7040
+ type: current.messageType,
7041
+ id: String(current.id),
7042
+ attachments: current.attachments,
7043
+ reference: current.reference,
7044
+ message: current.message
7045
+ }
7046
+ );
7047
+ })
7048
+ }
7049
+ ) });
7050
+ }
7051
+ );
6938
7052
 
6939
7053
  function getBase64FromFile(f) {
6940
7054
  return ((f2) => new Promise((resolve, reject) => {
@@ -6980,7 +7094,8 @@ const TextArea = observer(
6980
7094
  onPrev,
6981
7095
  onNext,
6982
7096
  value,
6983
- attachments
7097
+ attachments,
7098
+ className
6984
7099
  }) => {
6985
7100
  const fileInputRef = useRef(null);
6986
7101
  const searchControlsRef = useRef(null);
@@ -7072,7 +7187,7 @@ const TextArea = observer(
7072
7187
  ev.preventDefault();
7073
7188
  onSubmit();
7074
7189
  },
7075
- className: "search_controls",
7190
+ className: `search_controls ${className}`,
7076
7191
  ...getVariant("layout.common.chat.form"),
7077
7192
  children: [
7078
7193
  dragging ? /* @__PURE__ */ jsx(
@@ -7089,7 +7204,6 @@ const TextArea = observer(
7089
7204
  children: getLabel("msgAiDragAndDrop").text
7090
7205
  }
7091
7206
  ) : /* @__PURE__ */ jsxs(Fragment, { children: [
7092
- " ",
7093
7207
  /* @__PURE__ */ jsx(
7094
7208
  AutogrowTextarea,
7095
7209
  {
@@ -7241,7 +7355,7 @@ class CameraController {
7241
7355
  }
7242
7356
  async closeCamera() {
7243
7357
  if (!this.videoElement.srcObject)
7244
- return null;
7358
+ return;
7245
7359
  const canvas = document.createElement("canvas");
7246
7360
  canvas.width = this.videoElement.videoWidth;
7247
7361
  canvas.height = this.videoElement.videoHeight;
@@ -7280,9 +7394,10 @@ var __publicField$a = (obj, key, value) => {
7280
7394
  return value;
7281
7395
  };
7282
7396
  class ChatController {
7283
- constructor(props, onMessageSubmit, additionalOptions) {
7397
+ constructor(props, onMessageSubmit, additionalOptions, classNames) {
7284
7398
  this.onMessageSubmit = onMessageSubmit;
7285
7399
  this.additionalOptions = additionalOptions;
7400
+ this.classNames = classNames;
7286
7401
  __publicField$a(this, "currentIndex", 0);
7287
7402
  __publicField$a(this, "state", {
7288
7403
  isLoading: false,
@@ -7346,7 +7461,13 @@ class ChatController {
7346
7461
  }
7347
7462
  }
7348
7463
  });
7349
- __publicField$a(this, "History", observer(() => /* @__PURE__ */ jsx(History, { messages: this.state.messages })));
7464
+ __publicField$a(this, "History", observer(() => /* @__PURE__ */ jsx(
7465
+ History,
7466
+ {
7467
+ messages: this.state.messages,
7468
+ className: this.classNames?.history
7469
+ }
7470
+ )));
7350
7471
  __publicField$a(this, "Attachments", observer(() => /* @__PURE__ */ jsx(
7351
7472
  Attachments,
7352
7473
  {
@@ -7354,6 +7475,7 @@ class ChatController {
7354
7475
  onRemove: (a) => {
7355
7476
  this.removeAttachment(a);
7356
7477
  },
7478
+ className: this.classNames?.attachments,
7357
7479
  onAddDescription: (a, ev) => this.state.currentMessage.addAttachmentDescription(a, ev)
7358
7480
  }
7359
7481
  )));
@@ -7361,6 +7483,7 @@ class ChatController {
7361
7483
  TextArea,
7362
7484
  {
7363
7485
  additionalOptions: this.additionalOptions,
7486
+ className: this.classNames?.textarea,
7364
7487
  value: this.state.currentMessage.message,
7365
7488
  isLoading: this.state.isLoading,
7366
7489
  isRecording: this.internalAudioRecorder.state.recording,
@@ -7539,7 +7662,8 @@ class FloatingChatController extends ChatController {
7539
7662
  super(
7540
7663
  { isWindowOpen: false, ...props },
7541
7664
  props.onMessageSubmit,
7542
- props.additionalOptions
7665
+ props.additionalOptions,
7666
+ props.classNames
7543
7667
  );
7544
7668
  __publicField$9(this, "modalTitle");
7545
7669
  __publicField$9(this, "Window", observer(() => {
@@ -7737,7 +7861,7 @@ const CollapsiblePanel = React__default.forwardRef(
7737
7861
  className: `collapsiblePanel ${className ?? ""}`,
7738
7862
  ...getVariant("layout.common.components.collapsiblePanel"),
7739
7863
  ref: (el) => {
7740
- if (isFunction(outerRef))
7864
+ if (isFunction$1(outerRef))
7741
7865
  outerRef(el);
7742
7866
  setRef(el);
7743
7867
  },
@@ -10929,5 +11053,5 @@ const _FiltersStore = class _FiltersStore {
10929
11053
  __publicField(_FiltersStore, "instance", new _FiltersStore());
10930
11054
  let FiltersStore = _FiltersStore;
10931
11055
 
10932
- export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, AutoscrollContainer, BaseButton, CalendarModal, Captcha, ChatController, ChatMessage, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingChatController, IconButton, IconInput, IconsList, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, ProgressBar, RequiredMark, ScreenLocker, SimpleButton, SortableList, SortableListItem, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useModal, useModalContext, useOtherTagButton, useTabsContext };
11056
+ export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, AutoscrollContainer, BaseButton, CalendarModal, Captcha, ChatController, ChatMessage, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingChatController, IconButton, IconInput, IconsList, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, ProgressBar, RequiredMark, ScreenLocker, SimpleButton, SortableList, SortableListItem, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useModal, useModalContext, useOtherTagButton, useTabsContext };
10933
11057
  //# sourceMappingURL=index.js.map