@apia/components 4.0.20 → 4.0.24
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.d.ts +51 -1
- package/dist/index.js +190 -110
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { uniqueId as uniqueId$3, debounce, cloneDeep, isFunction } from 'lodash-
|
|
|
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, 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, uniqueId as uniqueId$4, 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';
|
|
@@ -40,10 +40,10 @@ const useAccordionContext = () => {
|
|
|
40
40
|
return context;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
var __defProp$
|
|
44
|
-
var __defNormalProp$
|
|
45
|
-
var __publicField$
|
|
46
|
-
__defNormalProp$
|
|
43
|
+
var __defProp$s = Object.defineProperty;
|
|
44
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
45
|
+
var __publicField$s = (obj, key, value) => {
|
|
46
|
+
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
47
47
|
return value;
|
|
48
48
|
};
|
|
49
49
|
function makeItemStateSelectorHook(handler) {
|
|
@@ -75,10 +75,10 @@ class AccordionHandler {
|
|
|
75
75
|
constructor(id, props) {
|
|
76
76
|
this.id = id;
|
|
77
77
|
this.props = props;
|
|
78
|
-
__publicField$
|
|
79
|
-
__publicField$
|
|
80
|
-
__publicField$
|
|
81
|
-
__publicField$
|
|
78
|
+
__publicField$s(this, "itemsState", {});
|
|
79
|
+
__publicField$s(this, "itemsStateListeners", {});
|
|
80
|
+
__publicField$s(this, "propsListeners", []);
|
|
81
|
+
__publicField$s(this, "hooks", {
|
|
82
82
|
useAccordionContextProvider: () => {
|
|
83
83
|
const Provider = useMemo(
|
|
84
84
|
() => ({ children }) => /* @__PURE__ */ jsx(AccordionContext.Provider, { value: this, children }),
|
|
@@ -1017,10 +1017,10 @@ const WindowModal = forwardRef(
|
|
|
1017
1017
|
}
|
|
1018
1018
|
);
|
|
1019
1019
|
|
|
1020
|
-
var __defProp$
|
|
1021
|
-
var __defNormalProp$
|
|
1022
|
-
var __publicField$
|
|
1023
|
-
__defNormalProp$
|
|
1020
|
+
var __defProp$r = Object.defineProperty;
|
|
1021
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1022
|
+
var __publicField$r = (obj, key, value) => {
|
|
1023
|
+
__defNormalProp$r(obj, key + "" , value);
|
|
1024
1024
|
return value;
|
|
1025
1025
|
};
|
|
1026
1026
|
var __accessCheck$c = (obj, member, msg) => {
|
|
@@ -1085,7 +1085,7 @@ _onDestroyCb = new WeakMap();
|
|
|
1085
1085
|
const BodyScrollLock = new (_a = class {
|
|
1086
1086
|
constructor() {
|
|
1087
1087
|
__privateAdd$c(this, _evaluate);
|
|
1088
|
-
__publicField$
|
|
1088
|
+
__publicField$r(this, "lockers", []);
|
|
1089
1089
|
}
|
|
1090
1090
|
getLocker() {
|
|
1091
1091
|
const locker = new BodyScrollLocker();
|
|
@@ -1411,10 +1411,10 @@ const OpenModal = (props) => {
|
|
|
1411
1411
|
);
|
|
1412
1412
|
};
|
|
1413
1413
|
|
|
1414
|
-
var __defProp$
|
|
1415
|
-
var __defNormalProp$
|
|
1416
|
-
var __publicField$
|
|
1417
|
-
__defNormalProp$
|
|
1414
|
+
var __defProp$q = Object.defineProperty;
|
|
1415
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1416
|
+
var __publicField$q = (obj, key, value) => {
|
|
1417
|
+
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1418
1418
|
return value;
|
|
1419
1419
|
};
|
|
1420
1420
|
var __accessCheck$b = (obj, member, msg) => {
|
|
@@ -1451,7 +1451,7 @@ class ApiaUtilModalHandler {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
class ApiaUtilModals {
|
|
1453
1453
|
constructor() {
|
|
1454
|
-
__publicField$
|
|
1454
|
+
__publicField$q(this, "overlays", []);
|
|
1455
1455
|
__privateAdd$b(this, _emitter$4, new EventEmitter());
|
|
1456
1456
|
__privateAdd$b(this, _maxId$1, 0);
|
|
1457
1457
|
__privateAdd$b(this, _maxOverlay, 0);
|
|
@@ -1496,7 +1496,7 @@ class ApiaUtilModals {
|
|
|
1496
1496
|
});
|
|
1497
1497
|
return modals;
|
|
1498
1498
|
});
|
|
1499
|
-
__publicField$
|
|
1499
|
+
__publicField$q(this, "Component", observer(() => {
|
|
1500
1500
|
const modals = __privateGet$8(this, _useModalsList).call(this);
|
|
1501
1501
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1502
1502
|
modals.map((current) => /* @__PURE__ */ jsx(OpenModal, { ...current }, current.id)),
|
|
@@ -1565,29 +1565,29 @@ _maxId$1 = new WeakMap();
|
|
|
1565
1565
|
_maxOverlay = new WeakMap();
|
|
1566
1566
|
_useModalsList = new WeakMap();
|
|
1567
1567
|
|
|
1568
|
-
var __defProp$
|
|
1569
|
-
var __defNormalProp$
|
|
1570
|
-
var __publicField$
|
|
1571
|
-
__defNormalProp$
|
|
1568
|
+
var __defProp$p = Object.defineProperty;
|
|
1569
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1570
|
+
var __publicField$p = (obj, key, value) => {
|
|
1571
|
+
__defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1572
1572
|
return value;
|
|
1573
1573
|
};
|
|
1574
1574
|
class ApiaUtilNotifications {
|
|
1575
1575
|
constructor() {
|
|
1576
|
-
__publicField$
|
|
1576
|
+
__publicField$p(this, "close", (id) => {
|
|
1577
1577
|
defaultNotifier.close(id);
|
|
1578
1578
|
});
|
|
1579
|
-
__publicField$
|
|
1579
|
+
__publicField$p(this, "closeAll", () => {
|
|
1580
1580
|
defaultNotifier.closeAll();
|
|
1581
1581
|
});
|
|
1582
|
-
__publicField$
|
|
1582
|
+
__publicField$p(this, "notify", (notification) => {
|
|
1583
1583
|
defaultNotifier.notify({
|
|
1584
1584
|
...notification,
|
|
1585
1585
|
type: notification.type ?? "warning"
|
|
1586
1586
|
});
|
|
1587
1587
|
});
|
|
1588
1588
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1589
|
-
__publicField$
|
|
1590
|
-
__publicField$
|
|
1589
|
+
__publicField$p(this, "useSelector", (selector) => defaultNotifier.useSelector(selector));
|
|
1590
|
+
__publicField$p(this, "Component", () => {
|
|
1591
1591
|
return /* @__PURE__ */ jsx(NotificationsList, {});
|
|
1592
1592
|
});
|
|
1593
1593
|
}
|
|
@@ -1967,10 +1967,10 @@ const TabsList = observer(
|
|
|
1967
1967
|
}
|
|
1968
1968
|
);
|
|
1969
1969
|
|
|
1970
|
-
var __defProp$
|
|
1971
|
-
var __defNormalProp$
|
|
1972
|
-
var __publicField$
|
|
1973
|
-
__defNormalProp$
|
|
1970
|
+
var __defProp$o = Object.defineProperty;
|
|
1971
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1972
|
+
var __publicField$o = (obj, key, value) => {
|
|
1973
|
+
__defNormalProp$o(obj, key + "" , value);
|
|
1974
1974
|
return value;
|
|
1975
1975
|
};
|
|
1976
1976
|
var __accessCheck$a = (obj, member, msg) => {
|
|
@@ -2017,7 +2017,7 @@ class TabsController {
|
|
|
2017
2017
|
this.id = id;
|
|
2018
2018
|
this.props = props;
|
|
2019
2019
|
__privateAdd$a(this, _innerAppend);
|
|
2020
|
-
__publicField$
|
|
2020
|
+
__publicField$o(this, "state", {
|
|
2021
2021
|
isMultiple: false,
|
|
2022
2022
|
openTabsHistory: /* @__PURE__ */ new Set(),
|
|
2023
2023
|
tabs: /* @__PURE__ */ new Map(),
|
|
@@ -2732,10 +2732,10 @@ const AlertModal = ({ children, onClose, title }) => {
|
|
|
2732
2732
|
);
|
|
2733
2733
|
};
|
|
2734
2734
|
|
|
2735
|
-
var __defProp$
|
|
2736
|
-
var __defNormalProp$
|
|
2737
|
-
var __publicField$
|
|
2738
|
-
__defNormalProp$
|
|
2735
|
+
var __defProp$n = Object.defineProperty;
|
|
2736
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2737
|
+
var __publicField$n = (obj, key, value) => {
|
|
2738
|
+
__defNormalProp$n(obj, key + "" , value);
|
|
2739
2739
|
return value;
|
|
2740
2740
|
};
|
|
2741
2741
|
var __accessCheck$9 = (obj, member, msg) => {
|
|
@@ -2770,7 +2770,7 @@ class ApiaUtilDialogs {
|
|
|
2770
2770
|
__privateAdd$9(this, _emitter$3, new EventEmitter());
|
|
2771
2771
|
__privateAdd$9(this, _maxIdAlert, 0);
|
|
2772
2772
|
__privateAdd$9(this, _maxIdConfirm, 0);
|
|
2773
|
-
__publicField$
|
|
2773
|
+
__publicField$n(this, "Component", () => {
|
|
2774
2774
|
const [confirmDialogs, setConfirmDialogs] = useState([]);
|
|
2775
2775
|
const [alertsDialogs, setAlertsDialogs] = useState(
|
|
2776
2776
|
[]
|
|
@@ -3052,10 +3052,10 @@ parseCellValue_fn = function(cellValue) {
|
|
|
3052
3052
|
return cellValue.match(/^\s*"?([^"]+)"?[\s\r\n]*$/)?.[1] ?? cellValue;
|
|
3053
3053
|
};
|
|
3054
3054
|
|
|
3055
|
-
var __defProp$
|
|
3056
|
-
var __defNormalProp$
|
|
3057
|
-
var __publicField$
|
|
3058
|
-
__defNormalProp$
|
|
3055
|
+
var __defProp$m = Object.defineProperty;
|
|
3056
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3057
|
+
var __publicField$m = (obj, key, value) => {
|
|
3058
|
+
__defNormalProp$m(obj, key + "" , value);
|
|
3059
3059
|
return value;
|
|
3060
3060
|
};
|
|
3061
3061
|
let maxId$1 = 0;
|
|
@@ -3063,14 +3063,14 @@ class ApiaUtilTooltip {
|
|
|
3063
3063
|
constructor(props, close) {
|
|
3064
3064
|
this.props = props;
|
|
3065
3065
|
this.close = close;
|
|
3066
|
-
__publicField$
|
|
3066
|
+
__publicField$m(this, "id", `tooltip__${maxId$1++}`);
|
|
3067
3067
|
}
|
|
3068
3068
|
}
|
|
3069
3069
|
|
|
3070
|
-
var __defProp$
|
|
3071
|
-
var __defNormalProp$
|
|
3072
|
-
var __publicField$
|
|
3073
|
-
__defNormalProp$
|
|
3070
|
+
var __defProp$l = Object.defineProperty;
|
|
3071
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3072
|
+
var __publicField$l = (obj, key, value) => {
|
|
3073
|
+
__defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3074
3074
|
return value;
|
|
3075
3075
|
};
|
|
3076
3076
|
var __accessCheck$7 = (obj, member, msg) => {
|
|
@@ -3103,7 +3103,7 @@ class AutomaticTooltip {
|
|
|
3103
3103
|
__privateAdd$7(this, _timeout, 500);
|
|
3104
3104
|
__privateAdd$7(this, _tooltipTimeout, 0);
|
|
3105
3105
|
__privateAdd$7(this, _unsuscribe, null);
|
|
3106
|
-
__publicField$
|
|
3106
|
+
__publicField$l(this, "ref", (el) => {
|
|
3107
3107
|
var _a, _b;
|
|
3108
3108
|
(_a = __privateGet$6(this, _unsuscribe)) == null ? void 0 : _a.call(this);
|
|
3109
3109
|
const listener = () => {
|
|
@@ -3135,7 +3135,7 @@ class AutomaticTooltip {
|
|
|
3135
3135
|
}
|
|
3136
3136
|
});
|
|
3137
3137
|
__privateAdd$7(this, _tooltip, null);
|
|
3138
|
-
__publicField$
|
|
3138
|
+
__publicField$l(this, "update", (tooltip) => {
|
|
3139
3139
|
__privateSet$4(this, _tooltip, tooltip);
|
|
3140
3140
|
});
|
|
3141
3141
|
__privateSet$4(this, _tooltip, tooltip);
|
|
@@ -3486,10 +3486,10 @@ const Tooltip = ({
|
|
|
3486
3486
|
);
|
|
3487
3487
|
};
|
|
3488
3488
|
|
|
3489
|
-
var __defProp$
|
|
3490
|
-
var __defNormalProp$
|
|
3491
|
-
var __publicField$
|
|
3492
|
-
__defNormalProp$
|
|
3489
|
+
var __defProp$k = Object.defineProperty;
|
|
3490
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3491
|
+
var __publicField$k = (obj, key, value) => {
|
|
3492
|
+
__defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3493
3493
|
return value;
|
|
3494
3494
|
};
|
|
3495
3495
|
var __accessCheck$6 = (obj, member, msg) => {
|
|
@@ -3509,7 +3509,7 @@ var _emitter$2, _shoutChangedList;
|
|
|
3509
3509
|
class ApiaUtilTooltips {
|
|
3510
3510
|
constructor() {
|
|
3511
3511
|
__privateAdd$6(this, _emitter$2, new EventEmitter());
|
|
3512
|
-
__publicField$
|
|
3512
|
+
__publicField$k(this, "tooltips", []);
|
|
3513
3513
|
__privateAdd$6(this, _shoutChangedList, () => {
|
|
3514
3514
|
__privateGet$5(this, _emitter$2).emit("changedList", [...this.tooltips]);
|
|
3515
3515
|
});
|
|
@@ -3517,7 +3517,7 @@ class ApiaUtilTooltips {
|
|
|
3517
3517
|
* Permite crear un tooltip que se abrirá automáticamente al estar parado
|
|
3518
3518
|
* sobre un elemento durante 300ms
|
|
3519
3519
|
*/
|
|
3520
|
-
__publicField$
|
|
3520
|
+
__publicField$k(this, "useHover", (tooltip) => {
|
|
3521
3521
|
let tt = void 0;
|
|
3522
3522
|
tt = useMemo(() => {
|
|
3523
3523
|
tt?.ref(null);
|
|
@@ -3528,15 +3528,15 @@ class ApiaUtilTooltips {
|
|
|
3528
3528
|
});
|
|
3529
3529
|
return tt;
|
|
3530
3530
|
});
|
|
3531
|
-
__publicField$
|
|
3531
|
+
__publicField$k(this, "close", (id) => {
|
|
3532
3532
|
this.tooltips = this.tooltips.filter((current) => current.id !== id);
|
|
3533
3533
|
__privateGet$5(this, _shoutChangedList).call(this);
|
|
3534
3534
|
});
|
|
3535
|
-
__publicField$
|
|
3535
|
+
__publicField$k(this, "closeAll", () => {
|
|
3536
3536
|
this.tooltips = [];
|
|
3537
3537
|
__privateGet$5(this, _shoutChangedList).call(this);
|
|
3538
3538
|
});
|
|
3539
|
-
__publicField$
|
|
3539
|
+
__publicField$k(this, "open", (tooltip) => {
|
|
3540
3540
|
const controller = new ApiaUtilTooltip(tooltip, () => {
|
|
3541
3541
|
this.close(controller.id);
|
|
3542
3542
|
controller.props.onClose?.();
|
|
@@ -3549,7 +3549,7 @@ class ApiaUtilTooltips {
|
|
|
3549
3549
|
__privateGet$5(this, _shoutChangedList).call(this);
|
|
3550
3550
|
return controller;
|
|
3551
3551
|
});
|
|
3552
|
-
__publicField$
|
|
3552
|
+
__publicField$k(this, "Component", () => {
|
|
3553
3553
|
const [tooltips, setTooltips] = useState(this.tooltips);
|
|
3554
3554
|
useMount(() => {
|
|
3555
3555
|
const unsuscribeToList = __privateGet$5(this, _emitter$2).on("changedList", (ev) => {
|
|
@@ -3591,10 +3591,10 @@ class ApiaUtilTooltips {
|
|
|
3591
3591
|
_emitter$2 = new WeakMap();
|
|
3592
3592
|
_shoutChangedList = new WeakMap();
|
|
3593
3593
|
|
|
3594
|
-
var __defProp$
|
|
3595
|
-
var __defNormalProp$
|
|
3596
|
-
var __publicField$
|
|
3597
|
-
__defNormalProp$
|
|
3594
|
+
var __defProp$j = Object.defineProperty;
|
|
3595
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3596
|
+
var __publicField$j = (obj, key, value) => {
|
|
3597
|
+
__defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3598
3598
|
return value;
|
|
3599
3599
|
};
|
|
3600
3600
|
var __accessCheck$5 = (obj, member, msg) => {
|
|
@@ -3631,7 +3631,7 @@ class ApiaUtilMenu {
|
|
|
3631
3631
|
constructor() {
|
|
3632
3632
|
__privateAdd$5(this, _emitter$1, new EventEmitter());
|
|
3633
3633
|
__privateAdd$5(this, _items$1, []);
|
|
3634
|
-
__publicField$
|
|
3634
|
+
__publicField$j(this, "menuProps", null);
|
|
3635
3635
|
__privateAdd$5(this, _hooks, {
|
|
3636
3636
|
useIsOpen: () => {
|
|
3637
3637
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -3646,10 +3646,10 @@ class ApiaUtilMenu {
|
|
|
3646
3646
|
];
|
|
3647
3647
|
}
|
|
3648
3648
|
});
|
|
3649
|
-
__publicField$
|
|
3649
|
+
__publicField$j(this, "close", () => {
|
|
3650
3650
|
__privateGet$4(this, _emitter$1).emit("toggle", false);
|
|
3651
3651
|
});
|
|
3652
|
-
__publicField$
|
|
3652
|
+
__publicField$j(this, "open", ({
|
|
3653
3653
|
menuProps,
|
|
3654
3654
|
items
|
|
3655
3655
|
}) => {
|
|
@@ -3690,7 +3690,7 @@ class ApiaUtilMenu {
|
|
|
3690
3690
|
return /* @__PURE__ */ createElement(MenuItem, { ...current, key: current.key }, children);
|
|
3691
3691
|
}) });
|
|
3692
3692
|
});
|
|
3693
|
-
__publicField$
|
|
3693
|
+
__publicField$j(this, "Component", () => {
|
|
3694
3694
|
const [isOpen, close] = __privateGet$4(this, _hooks).useIsOpen();
|
|
3695
3695
|
if (!isOpen)
|
|
3696
3696
|
return null;
|
|
@@ -3715,17 +3715,17 @@ _hooks = new WeakMap();
|
|
|
3715
3715
|
_maxId = new WeakMap();
|
|
3716
3716
|
_RenderMenu = new WeakMap();
|
|
3717
3717
|
|
|
3718
|
-
var __defProp$
|
|
3719
|
-
var __defNormalProp$
|
|
3720
|
-
var __publicField$
|
|
3721
|
-
__defNormalProp$
|
|
3718
|
+
var __defProp$i = Object.defineProperty;
|
|
3719
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3720
|
+
var __publicField$i = (obj, key, value) => {
|
|
3721
|
+
__defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3722
3722
|
return value;
|
|
3723
3723
|
};
|
|
3724
3724
|
class ApiaUtilMouse extends EventEmitter {
|
|
3725
3725
|
constructor() {
|
|
3726
3726
|
super();
|
|
3727
|
-
__publicField$
|
|
3728
|
-
__publicField$
|
|
3727
|
+
__publicField$i(this, "x", 0);
|
|
3728
|
+
__publicField$i(this, "y", 0);
|
|
3729
3729
|
document.addEventListener("mousemove", (ev) => {
|
|
3730
3730
|
this.x = ev.clientX;
|
|
3731
3731
|
this.y = ev.clientY;
|
|
@@ -3737,10 +3737,10 @@ class ApiaUtilMouse extends EventEmitter {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
3739
3739
|
|
|
3740
|
-
var __defProp$
|
|
3741
|
-
var __defNormalProp$
|
|
3742
|
-
var __publicField$
|
|
3743
|
-
__defNormalProp$
|
|
3740
|
+
var __defProp$h = Object.defineProperty;
|
|
3741
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3742
|
+
var __publicField$h = (obj, key, value) => {
|
|
3743
|
+
__defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3744
3744
|
return value;
|
|
3745
3745
|
};
|
|
3746
3746
|
var __accessCheck$4 = (obj, member, msg) => {
|
|
@@ -3764,15 +3764,15 @@ var __privateSet$2 = (obj, member, value, setter) => {
|
|
|
3764
3764
|
var _instance;
|
|
3765
3765
|
const _ApiaUtil = class _ApiaUtil {
|
|
3766
3766
|
constructor() {
|
|
3767
|
-
__publicField$
|
|
3768
|
-
__publicField$
|
|
3769
|
-
__publicField$
|
|
3770
|
-
__publicField$
|
|
3771
|
-
__publicField$
|
|
3772
|
-
__publicField$
|
|
3773
|
-
__publicField$
|
|
3774
|
-
__publicField$
|
|
3775
|
-
__publicField$
|
|
3767
|
+
__publicField$h(this, "dialogs");
|
|
3768
|
+
__publicField$h(this, "menu");
|
|
3769
|
+
__publicField$h(this, "modals");
|
|
3770
|
+
__publicField$h(this, "mouse");
|
|
3771
|
+
__publicField$h(this, "notifications");
|
|
3772
|
+
__publicField$h(this, "parsers");
|
|
3773
|
+
__publicField$h(this, "tabs");
|
|
3774
|
+
__publicField$h(this, "tooltips");
|
|
3775
|
+
__publicField$h(this, "Component", () => {
|
|
3776
3776
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3777
3777
|
/* @__PURE__ */ jsx(this.dialogs.Component, {}),
|
|
3778
3778
|
/* @__PURE__ */ jsx(this.modals.Component, {}),
|
|
@@ -3801,22 +3801,22 @@ _instance = new WeakMap();
|
|
|
3801
3801
|
__privateAdd$4(_ApiaUtil, _instance, void 0);
|
|
3802
3802
|
let ApiaUtil = _ApiaUtil;
|
|
3803
3803
|
|
|
3804
|
-
var __defProp$
|
|
3805
|
-
var __defNormalProp$
|
|
3806
|
-
var __publicField$
|
|
3807
|
-
__defNormalProp$
|
|
3804
|
+
var __defProp$g = Object.defineProperty;
|
|
3805
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3806
|
+
var __publicField$g = (obj, key, value) => {
|
|
3807
|
+
__defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3808
3808
|
return value;
|
|
3809
3809
|
};
|
|
3810
3810
|
class ScreenLocker {
|
|
3811
3811
|
constructor() {
|
|
3812
|
-
__publicField$
|
|
3812
|
+
__publicField$g(this, "emitter", new StatefulEmitter({
|
|
3813
3813
|
locks: {
|
|
3814
3814
|
common: { count: 0 },
|
|
3815
3815
|
linear: { count: 0 },
|
|
3816
3816
|
white: { count: 1 }
|
|
3817
3817
|
}
|
|
3818
3818
|
}));
|
|
3819
|
-
__publicField$
|
|
3819
|
+
__publicField$g(this, "lock", (options) => {
|
|
3820
3820
|
this.emitter.setState("locks", (s) => {
|
|
3821
3821
|
const key = options?.type ?? "common";
|
|
3822
3822
|
return {
|
|
@@ -3832,11 +3832,11 @@ class ScreenLocker {
|
|
|
3832
3832
|
};
|
|
3833
3833
|
});
|
|
3834
3834
|
});
|
|
3835
|
-
__publicField$
|
|
3835
|
+
__publicField$g(this, "hasReleased", false);
|
|
3836
3836
|
/**
|
|
3837
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.
|
|
3838
3838
|
*/
|
|
3839
|
-
__publicField$
|
|
3839
|
+
__publicField$g(this, "release", () => {
|
|
3840
3840
|
if (this.hasReleased)
|
|
3841
3841
|
return;
|
|
3842
3842
|
this.hasReleased = true;
|
|
@@ -3852,11 +3852,11 @@ class ScreenLocker {
|
|
|
3852
3852
|
/**
|
|
3853
3853
|
* This method notifies when the screenLock is released by the first time.
|
|
3854
3854
|
*/
|
|
3855
|
-
__publicField$
|
|
3855
|
+
__publicField$g(this, "onRelease", this.emitter.on.bind(this.emitter, "release"));
|
|
3856
3856
|
/**
|
|
3857
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.
|
|
3858
3858
|
*/
|
|
3859
|
-
__publicField$
|
|
3859
|
+
__publicField$g(this, "Component", () => {
|
|
3860
3860
|
const locks = this.emitter.useState("locks");
|
|
3861
3861
|
const style = {
|
|
3862
3862
|
alignItems: "center",
|
|
@@ -3929,10 +3929,10 @@ const OptionsBox = observer(() => {
|
|
|
3929
3929
|
}) });
|
|
3930
3930
|
});
|
|
3931
3931
|
|
|
3932
|
-
var __defProp$
|
|
3933
|
-
var __defNormalProp$
|
|
3934
|
-
var __publicField$
|
|
3935
|
-
__defNormalProp$
|
|
3932
|
+
var __defProp$f = Object.defineProperty;
|
|
3933
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3934
|
+
var __publicField$f = (obj, key, value) => {
|
|
3935
|
+
__defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3936
3936
|
return value;
|
|
3937
3937
|
};
|
|
3938
3938
|
var __accessCheck$3 = (obj, member, msg) => {
|
|
@@ -3956,7 +3956,7 @@ var __privateSet$1 = (obj, member, value, setter) => {
|
|
|
3956
3956
|
var _actualSearch, _makeSearch, _search;
|
|
3957
3957
|
class AutocompleteController {
|
|
3958
3958
|
constructor(properties) {
|
|
3959
|
-
__publicField$
|
|
3959
|
+
__publicField$f(this, "state", {
|
|
3960
3960
|
disabled: false,
|
|
3961
3961
|
readOnly: false,
|
|
3962
3962
|
id: uniqueId$3("autocomplete"),
|
|
@@ -3983,7 +3983,7 @@ class AutocompleteController {
|
|
|
3983
3983
|
return debounce(__privateGet$2(this, _actualSearch), this.state.searchDebounce);
|
|
3984
3984
|
});
|
|
3985
3985
|
__privateAdd$3(this, _search, __privateGet$2(this, _makeSearch).call(this));
|
|
3986
|
-
__publicField$
|
|
3986
|
+
__publicField$f(this, "tooltipRef", null);
|
|
3987
3987
|
Object.assign(this.state, properties);
|
|
3988
3988
|
if (properties.value) {
|
|
3989
3989
|
this.state.showValue = String(
|
|
@@ -5984,10 +5984,10 @@ const LabelBox = ({
|
|
|
5984
5984
|
);
|
|
5985
5985
|
};
|
|
5986
5986
|
|
|
5987
|
-
var __defProp$
|
|
5988
|
-
var __defNormalProp$
|
|
5989
|
-
var __publicField$
|
|
5990
|
-
__defNormalProp$
|
|
5987
|
+
var __defProp$e = Object.defineProperty;
|
|
5988
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5989
|
+
var __publicField$e = (obj, key, value) => {
|
|
5990
|
+
__defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5991
5991
|
return value;
|
|
5992
5992
|
};
|
|
5993
5993
|
let maxId = 0;
|
|
@@ -5997,8 +5997,8 @@ class ChatMessage {
|
|
|
5997
5997
|
this.messageType = messageType;
|
|
5998
5998
|
this.attachments = attachments;
|
|
5999
5999
|
this.reference = reference;
|
|
6000
|
-
__publicField$
|
|
6001
|
-
__publicField$
|
|
6000
|
+
__publicField$e(this, "id");
|
|
6001
|
+
__publicField$e(this, "clone", () => new ChatMessage(
|
|
6002
6002
|
this.message,
|
|
6003
6003
|
this.messageType,
|
|
6004
6004
|
this.attachments.map((x) => {
|
|
@@ -6225,6 +6225,86 @@ const Dropzone = ({
|
|
|
6225
6225
|
);
|
|
6226
6226
|
};
|
|
6227
6227
|
|
|
6228
|
+
var __defProp$d = Object.defineProperty;
|
|
6229
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6230
|
+
var __publicField$d = (obj, key, value) => {
|
|
6231
|
+
__defNormalProp$d(obj, key + "" , value);
|
|
6232
|
+
return value;
|
|
6233
|
+
};
|
|
6234
|
+
class UploadHandler {
|
|
6235
|
+
constructor(props) {
|
|
6236
|
+
this.props = props;
|
|
6237
|
+
__publicField$d(this, "state", { inProgressFiles: [], uploadedFiles: [] });
|
|
6238
|
+
makeAutoObservable(this);
|
|
6239
|
+
this.state.uploadedFiles = this.props.initialFiles;
|
|
6240
|
+
}
|
|
6241
|
+
delete(file) {
|
|
6242
|
+
this.props.onDelete(file).then((res) => {
|
|
6243
|
+
if (res === true) {
|
|
6244
|
+
this.state.uploadedFiles = this.state.uploadedFiles.filter(
|
|
6245
|
+
(c) => c !== file
|
|
6246
|
+
);
|
|
6247
|
+
} else if (typeof res === "string") {
|
|
6248
|
+
ApiaUtil.instance.notifications.notify({
|
|
6249
|
+
message: res
|
|
6250
|
+
});
|
|
6251
|
+
}
|
|
6252
|
+
});
|
|
6253
|
+
}
|
|
6254
|
+
start(files) {
|
|
6255
|
+
files.forEach((file) => {
|
|
6256
|
+
const newUpload = {
|
|
6257
|
+
abortController: new AbortController(),
|
|
6258
|
+
id: uniqueId$4("file_upload"),
|
|
6259
|
+
file,
|
|
6260
|
+
progress: 0
|
|
6261
|
+
};
|
|
6262
|
+
this.state.inProgressFiles.push(newUpload);
|
|
6263
|
+
this.props.onUpload(newUpload).then((res) => {
|
|
6264
|
+
this.state.inProgressFiles = this.state.inProgressFiles.filter(
|
|
6265
|
+
(c) => c.id !== newUpload.id
|
|
6266
|
+
);
|
|
6267
|
+
if (typeof res === "string") {
|
|
6268
|
+
ApiaUtil.instance.notifications.notify({
|
|
6269
|
+
message: res,
|
|
6270
|
+
icon: ""
|
|
6271
|
+
});
|
|
6272
|
+
} else if (res) {
|
|
6273
|
+
this.state.uploadedFiles.push(res);
|
|
6274
|
+
}
|
|
6275
|
+
});
|
|
6276
|
+
});
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
const Uploader = observer(({ handler }) => {
|
|
6280
|
+
return /* @__PURE__ */ jsxs(Box, { className: "file_uploader", children: [
|
|
6281
|
+
/* @__PURE__ */ jsx(Box, { className: "file_uploader__dropzone", children: (handler.props.isMultiple || handler.state.uploadedFiles.length === 0 && handler.state.inProgressFiles.length === 0) && /* @__PURE__ */ jsx(
|
|
6282
|
+
Dropzone,
|
|
6283
|
+
{
|
|
6284
|
+
onChange: (ev) => {
|
|
6285
|
+
handler.start(ev);
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
) }),
|
|
6289
|
+
/* @__PURE__ */ jsx(Box, { className: "file_uploader__in_progress", children: handler.state.inProgressFiles.map((c) => /* @__PURE__ */ jsx(
|
|
6290
|
+
Dropzone,
|
|
6291
|
+
{
|
|
6292
|
+
progress: c.progress,
|
|
6293
|
+
messageError: c.error
|
|
6294
|
+
},
|
|
6295
|
+
c.file.name
|
|
6296
|
+
)) }),
|
|
6297
|
+
/* @__PURE__ */ jsx(Box, { className: "file_uploader__files_list", children: handler.state.uploadedFiles.map((c) => /* @__PURE__ */ jsx(
|
|
6298
|
+
FileCard,
|
|
6299
|
+
{
|
|
6300
|
+
name: c.name,
|
|
6301
|
+
handleClose: () => handler.delete(c)
|
|
6302
|
+
},
|
|
6303
|
+
c.id
|
|
6304
|
+
)) })
|
|
6305
|
+
] });
|
|
6306
|
+
});
|
|
6307
|
+
|
|
6228
6308
|
const FileAttachment = observer(
|
|
6229
6309
|
({
|
|
6230
6310
|
attachment,
|
|
@@ -11053,5 +11133,5 @@ const _FiltersStore = class _FiltersStore {
|
|
|
11053
11133
|
__publicField(_FiltersStore, "instance", new _FiltersStore());
|
|
11054
11134
|
let FiltersStore = _FiltersStore;
|
|
11055
11135
|
|
|
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 };
|
|
11136
|
+
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, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11057
11137
|
//# sourceMappingURL=index.js.map
|