@apia/components 4.0.45 → 4.0.46
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 +72 -47
- package/dist/index.js +588 -440
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import React__default, { createContext, useContext, useEffect, useMemo, useState
|
|
|
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
6
|
import { uniqueId as uniqueId$3, cloneDeep, isFunction as isFunction$1 } from 'lodash-es';
|
|
7
|
-
import { Box, getVariant, useBreakpointIndex, Close, responsive, spacing, Heading, Link, Button, Spinner, createElement, Select, Input, Flex, IconButton as IconButton$1, Image, injectStyles, focusOutline, makeStyledComponent, useThemeUI, Label as Label$1, Progress, Grid, Paragraph, Container, Textarea } from '@apia/theme';
|
|
7
|
+
import { Box, getVariant, useBreakpointIndex, Close, responsive, spacing, Heading, Link, Button, Spinner, createElement, Select, Input, Flex, IconButton as IconButton$1, Image, injectStyles, focusOutline, makeStyledComponent, useThemeUI, Label as Label$1, Progress, Grid, Paragraph, Container, Switch, 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, getLabel, isChild, EventEmitter, useUnmount, useMount, StatefulEmitter, shallowEqual as shallowEqual$1, getSpecificParent, getDateFormat, customEvents, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription,
|
|
10
|
+
import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, getLabel, isChild, EventEmitter, useUnmount, useMount, StatefulEmitter, shallowEqual as shallowEqual$1, getSpecificParent, uniqueId as uniqueId$4, getDateFormat, customEvents, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, toBoolean, useMatchScrollDirection, 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';
|
|
@@ -21,13 +21,14 @@ import { shallowEqual } from '@apia/store';
|
|
|
21
21
|
import AnimateHeight from 'react-animate-height';
|
|
22
22
|
import { useUpdateEffect as useUpdateEffect$1, useScroll } from 'ahooks';
|
|
23
23
|
import { FaCalendarAlt, FaBars } from '@meronex/icons/fa';
|
|
24
|
-
import dayjs from 'dayjs';
|
|
25
|
-
import Calendar from 'react-calendar';
|
|
26
24
|
import ReactInputMask from 'react-input-mask';
|
|
25
|
+
import Calendar from 'react-calendar';
|
|
26
|
+
import dayjs from 'dayjs';
|
|
27
27
|
import isFunction from 'lodash-es/isFunction';
|
|
28
28
|
import { createFAsomeStore } from '@apia/dom-store';
|
|
29
29
|
import { keyframes } from '@emotion/react';
|
|
30
30
|
import { Remarkable } from 'remarkable';
|
|
31
|
+
import { makeApiaUsersModal2, makeApiaPoolsModals2 } from '@apia/api';
|
|
31
32
|
|
|
32
33
|
const AccordionContext = createContext(null);
|
|
33
34
|
const AccordionItemContext = createContext(null);
|
|
@@ -38,10 +39,10 @@ const useAccordionContext = () => {
|
|
|
38
39
|
return context;
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
var __defProp$
|
|
42
|
-
var __defNormalProp$
|
|
43
|
-
var __publicField$
|
|
44
|
-
__defNormalProp$
|
|
42
|
+
var __defProp$p = Object.defineProperty;
|
|
43
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
44
|
+
var __publicField$p = (obj, key, value) => {
|
|
45
|
+
__defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
45
46
|
return value;
|
|
46
47
|
};
|
|
47
48
|
function makeItemStateSelectorHook(handler) {
|
|
@@ -73,10 +74,10 @@ class AccordionHandler {
|
|
|
73
74
|
constructor(id, props) {
|
|
74
75
|
this.id = id;
|
|
75
76
|
this.props = props;
|
|
76
|
-
__publicField$
|
|
77
|
-
__publicField$
|
|
78
|
-
__publicField$
|
|
79
|
-
__publicField$
|
|
77
|
+
__publicField$p(this, "itemsState", {});
|
|
78
|
+
__publicField$p(this, "itemsStateListeners", {});
|
|
79
|
+
__publicField$p(this, "propsListeners", []);
|
|
80
|
+
__publicField$p(this, "hooks", {
|
|
80
81
|
useAccordionContextProvider: () => {
|
|
81
82
|
const Provider = useMemo(
|
|
82
83
|
() => ({ children }) => /* @__PURE__ */ jsx(AccordionContext.Provider, { value: this, children }),
|
|
@@ -1019,10 +1020,10 @@ const WindowModal = forwardRef(
|
|
|
1019
1020
|
}
|
|
1020
1021
|
);
|
|
1021
1022
|
|
|
1022
|
-
var __defProp$
|
|
1023
|
-
var __defNormalProp$
|
|
1024
|
-
var __publicField$
|
|
1025
|
-
__defNormalProp$
|
|
1023
|
+
var __defProp$o = Object.defineProperty;
|
|
1024
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1025
|
+
var __publicField$o = (obj, key, value) => {
|
|
1026
|
+
__defNormalProp$o(obj, key + "" , value);
|
|
1026
1027
|
return value;
|
|
1027
1028
|
};
|
|
1028
1029
|
var __accessCheck$d = (obj, member, msg) => {
|
|
@@ -1087,7 +1088,7 @@ _onDestroyCb = new WeakMap();
|
|
|
1087
1088
|
const BodyScrollLock = new (_a = class {
|
|
1088
1089
|
constructor() {
|
|
1089
1090
|
__privateAdd$d(this, _evaluate);
|
|
1090
|
-
__publicField$
|
|
1091
|
+
__publicField$o(this, "lockers", []);
|
|
1091
1092
|
}
|
|
1092
1093
|
getLocker() {
|
|
1093
1094
|
const locker = new BodyScrollLocker();
|
|
@@ -1432,10 +1433,10 @@ const OpenModal = (props) => {
|
|
|
1432
1433
|
);
|
|
1433
1434
|
};
|
|
1434
1435
|
|
|
1435
|
-
var __defProp$
|
|
1436
|
-
var __defNormalProp$
|
|
1437
|
-
var __publicField$
|
|
1438
|
-
__defNormalProp$
|
|
1436
|
+
var __defProp$n = Object.defineProperty;
|
|
1437
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1438
|
+
var __publicField$n = (obj, key, value) => {
|
|
1439
|
+
__defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1439
1440
|
return value;
|
|
1440
1441
|
};
|
|
1441
1442
|
var __accessCheck$c = (obj, member, msg) => {
|
|
@@ -1479,14 +1480,14 @@ class ApiaUtilModalHandler {
|
|
|
1479
1480
|
}
|
|
1480
1481
|
class ApiaUtilModals {
|
|
1481
1482
|
constructor() {
|
|
1482
|
-
__publicField$
|
|
1483
|
-
__publicField$
|
|
1483
|
+
__publicField$n(this, "overlays", []);
|
|
1484
|
+
__publicField$n(this, "modals", []);
|
|
1484
1485
|
__privateAdd$c(this, _maxId$1, 0);
|
|
1485
1486
|
__privateAdd$c(this, _maxOverlay, 0);
|
|
1486
1487
|
__privateAdd$c(this, _innerClose, (id) => {
|
|
1487
1488
|
this.modals = this.modals.filter((s) => s.id !== id);
|
|
1488
1489
|
});
|
|
1489
|
-
__publicField$
|
|
1490
|
+
__publicField$n(this, "Component", observer(() => {
|
|
1490
1491
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1491
1492
|
this.modals.map((current) => /* @__PURE__ */ jsx(OpenModal, { ...current }, current.id)),
|
|
1492
1493
|
this.overlays.map((c) => c.render)
|
|
@@ -1576,29 +1577,37 @@ _maxId$1 = new WeakMap();
|
|
|
1576
1577
|
_maxOverlay = new WeakMap();
|
|
1577
1578
|
_innerClose = new WeakMap();
|
|
1578
1579
|
|
|
1579
|
-
var __defProp$
|
|
1580
|
-
var __defNormalProp$
|
|
1581
|
-
var __publicField$
|
|
1582
|
-
__defNormalProp$
|
|
1580
|
+
var __defProp$m = Object.defineProperty;
|
|
1581
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1582
|
+
var __publicField$m = (obj, key, value) => {
|
|
1583
|
+
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1583
1584
|
return value;
|
|
1584
1585
|
};
|
|
1585
1586
|
class ApiaUtilNotifications {
|
|
1586
|
-
constructor() {
|
|
1587
|
-
|
|
1587
|
+
constructor(util) {
|
|
1588
|
+
this.util = util;
|
|
1589
|
+
__publicField$m(this, "close", (id) => {
|
|
1588
1590
|
defaultNotifier.close(id);
|
|
1589
1591
|
});
|
|
1590
|
-
__publicField$
|
|
1592
|
+
__publicField$m(this, "closeAll", () => {
|
|
1591
1593
|
defaultNotifier.closeAll();
|
|
1592
1594
|
});
|
|
1593
|
-
__publicField$
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1595
|
+
__publicField$m(this, "notify", (notification) => {
|
|
1596
|
+
if (notification.type === "modal") {
|
|
1597
|
+
this.util.dialogs.alert({
|
|
1598
|
+
children: notification.message,
|
|
1599
|
+
title: notification.title || ""
|
|
1600
|
+
});
|
|
1601
|
+
} else {
|
|
1602
|
+
defaultNotifier.notify({
|
|
1603
|
+
...notification,
|
|
1604
|
+
type: notification.type ?? "warning"
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1598
1607
|
});
|
|
1599
1608
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1600
|
-
__publicField$
|
|
1601
|
-
__publicField$
|
|
1609
|
+
__publicField$m(this, "useSelector", (selector) => defaultNotifier.useSelector(selector));
|
|
1610
|
+
__publicField$m(this, "Component", () => {
|
|
1602
1611
|
return /* @__PURE__ */ jsx(NotificationsList, {});
|
|
1603
1612
|
});
|
|
1604
1613
|
}
|
|
@@ -2021,10 +2030,10 @@ const AlertModal = ({
|
|
|
2021
2030
|
);
|
|
2022
2031
|
};
|
|
2023
2032
|
|
|
2024
|
-
var __defProp$
|
|
2025
|
-
var __defNormalProp$
|
|
2026
|
-
var __publicField$
|
|
2027
|
-
__defNormalProp$
|
|
2033
|
+
var __defProp$l = Object.defineProperty;
|
|
2034
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2035
|
+
var __publicField$l = (obj, key, value) => {
|
|
2036
|
+
__defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2028
2037
|
return value;
|
|
2029
2038
|
};
|
|
2030
2039
|
var __accessCheck$b = (obj, member, msg) => {
|
|
@@ -2058,9 +2067,9 @@ class ApiaUtilDialogs {
|
|
|
2058
2067
|
constructor() {
|
|
2059
2068
|
__privateAdd$b(this, _maxIdAlert, 0);
|
|
2060
2069
|
__privateAdd$b(this, _maxIdConfirm, 0);
|
|
2061
|
-
__publicField$
|
|
2062
|
-
__publicField$
|
|
2063
|
-
__publicField$
|
|
2070
|
+
__publicField$l(this, "alerts", []);
|
|
2071
|
+
__publicField$l(this, "dialogs", []);
|
|
2072
|
+
__publicField$l(this, "Component", observer(() => {
|
|
2064
2073
|
const removeModal = useCallback(
|
|
2065
2074
|
(which) => {
|
|
2066
2075
|
this.dialogs = this.dialogs.filter((search) => search !== which);
|
|
@@ -2324,10 +2333,10 @@ parseCellValue_fn = function(cellValue) {
|
|
|
2324
2333
|
return cellValue.match(/^\s*"?([^"]+)"?[\s\r\n]*$/)?.[1] ?? cellValue;
|
|
2325
2334
|
};
|
|
2326
2335
|
|
|
2327
|
-
var __defProp$
|
|
2328
|
-
var __defNormalProp$
|
|
2329
|
-
var __publicField$
|
|
2330
|
-
__defNormalProp$
|
|
2336
|
+
var __defProp$k = Object.defineProperty;
|
|
2337
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2338
|
+
var __publicField$k = (obj, key, value) => {
|
|
2339
|
+
__defNormalProp$k(obj, key + "" , value);
|
|
2331
2340
|
return value;
|
|
2332
2341
|
};
|
|
2333
2342
|
let maxId = 0;
|
|
@@ -2335,14 +2344,14 @@ class ApiaUtilTooltip {
|
|
|
2335
2344
|
constructor(props, close) {
|
|
2336
2345
|
this.props = props;
|
|
2337
2346
|
this.close = close;
|
|
2338
|
-
__publicField$
|
|
2347
|
+
__publicField$k(this, "id", `tooltip__${maxId++}`);
|
|
2339
2348
|
}
|
|
2340
2349
|
}
|
|
2341
2350
|
|
|
2342
|
-
var __defProp$
|
|
2343
|
-
var __defNormalProp$
|
|
2344
|
-
var __publicField$
|
|
2345
|
-
__defNormalProp$
|
|
2351
|
+
var __defProp$j = Object.defineProperty;
|
|
2352
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2353
|
+
var __publicField$j = (obj, key, value) => {
|
|
2354
|
+
__defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2346
2355
|
return value;
|
|
2347
2356
|
};
|
|
2348
2357
|
var __accessCheck$9 = (obj, member, msg) => {
|
|
@@ -2375,7 +2384,7 @@ class AutomaticTooltip {
|
|
|
2375
2384
|
__privateAdd$9(this, _timeout$1, 500);
|
|
2376
2385
|
__privateAdd$9(this, _tooltipTimeout, 0);
|
|
2377
2386
|
__privateAdd$9(this, _unsuscribe, null);
|
|
2378
|
-
__publicField$
|
|
2387
|
+
__publicField$j(this, "ref", (el) => {
|
|
2379
2388
|
var _a, _b;
|
|
2380
2389
|
(_a = __privateGet$7(this, _unsuscribe)) == null ? void 0 : _a.call(this);
|
|
2381
2390
|
const listener = () => {
|
|
@@ -2407,7 +2416,7 @@ class AutomaticTooltip {
|
|
|
2407
2416
|
}
|
|
2408
2417
|
});
|
|
2409
2418
|
__privateAdd$9(this, _tooltip, null);
|
|
2410
|
-
__publicField$
|
|
2419
|
+
__publicField$j(this, "update", (tooltip) => {
|
|
2411
2420
|
__privateSet$5(this, _tooltip, tooltip);
|
|
2412
2421
|
});
|
|
2413
2422
|
__privateSet$5(this, _tooltip, tooltip);
|
|
@@ -2758,10 +2767,10 @@ const Tooltip = ({
|
|
|
2758
2767
|
);
|
|
2759
2768
|
};
|
|
2760
2769
|
|
|
2761
|
-
var __defProp$
|
|
2762
|
-
var __defNormalProp$
|
|
2763
|
-
var __publicField$
|
|
2764
|
-
__defNormalProp$
|
|
2770
|
+
var __defProp$i = Object.defineProperty;
|
|
2771
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2772
|
+
var __publicField$i = (obj, key, value) => {
|
|
2773
|
+
__defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2765
2774
|
return value;
|
|
2766
2775
|
};
|
|
2767
2776
|
var __accessCheck$8 = (obj, member, msg) => {
|
|
@@ -2781,7 +2790,7 @@ var _emitter$2, _shoutChangedList;
|
|
|
2781
2790
|
class ApiaUtilTooltips {
|
|
2782
2791
|
constructor() {
|
|
2783
2792
|
__privateAdd$8(this, _emitter$2, new EventEmitter());
|
|
2784
|
-
__publicField$
|
|
2793
|
+
__publicField$i(this, "tooltips", []);
|
|
2785
2794
|
__privateAdd$8(this, _shoutChangedList, () => {
|
|
2786
2795
|
__privateGet$6(this, _emitter$2).emit("changedList", [...this.tooltips]);
|
|
2787
2796
|
});
|
|
@@ -2789,7 +2798,7 @@ class ApiaUtilTooltips {
|
|
|
2789
2798
|
* Permite crear un tooltip que se abrirá automáticamente al estar parado
|
|
2790
2799
|
* sobre un elemento durante 300ms
|
|
2791
2800
|
*/
|
|
2792
|
-
__publicField$
|
|
2801
|
+
__publicField$i(this, "useHover", (tooltip) => {
|
|
2793
2802
|
let tt = void 0;
|
|
2794
2803
|
tt = useMemo(() => {
|
|
2795
2804
|
tt?.ref(null);
|
|
@@ -2800,15 +2809,15 @@ class ApiaUtilTooltips {
|
|
|
2800
2809
|
});
|
|
2801
2810
|
return tt;
|
|
2802
2811
|
});
|
|
2803
|
-
__publicField$
|
|
2812
|
+
__publicField$i(this, "close", (id) => {
|
|
2804
2813
|
this.tooltips = this.tooltips.filter((current) => current.id !== id);
|
|
2805
2814
|
__privateGet$6(this, _shoutChangedList).call(this);
|
|
2806
2815
|
});
|
|
2807
|
-
__publicField$
|
|
2816
|
+
__publicField$i(this, "closeAll", () => {
|
|
2808
2817
|
this.tooltips = [];
|
|
2809
2818
|
__privateGet$6(this, _shoutChangedList).call(this);
|
|
2810
2819
|
});
|
|
2811
|
-
__publicField$
|
|
2820
|
+
__publicField$i(this, "open", (tooltip) => {
|
|
2812
2821
|
const controller = new ApiaUtilTooltip(tooltip, () => {
|
|
2813
2822
|
this.close(controller.id);
|
|
2814
2823
|
controller.props.onClose?.();
|
|
@@ -2821,7 +2830,7 @@ class ApiaUtilTooltips {
|
|
|
2821
2830
|
__privateGet$6(this, _shoutChangedList).call(this);
|
|
2822
2831
|
return controller;
|
|
2823
2832
|
});
|
|
2824
|
-
__publicField$
|
|
2833
|
+
__publicField$i(this, "Component", () => {
|
|
2825
2834
|
const [tooltips, setTooltips] = useState(this.tooltips);
|
|
2826
2835
|
useMount(() => {
|
|
2827
2836
|
const unsuscribeToList = __privateGet$6(this, _emitter$2).on("changedList", (ev) => {
|
|
@@ -2863,10 +2872,10 @@ class ApiaUtilTooltips {
|
|
|
2863
2872
|
_emitter$2 = new WeakMap();
|
|
2864
2873
|
_shoutChangedList = new WeakMap();
|
|
2865
2874
|
|
|
2866
|
-
var __defProp$
|
|
2867
|
-
var __defNormalProp$
|
|
2868
|
-
var __publicField$
|
|
2869
|
-
__defNormalProp$
|
|
2875
|
+
var __defProp$h = Object.defineProperty;
|
|
2876
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2877
|
+
var __publicField$h = (obj, key, value) => {
|
|
2878
|
+
__defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2870
2879
|
return value;
|
|
2871
2880
|
};
|
|
2872
2881
|
var __accessCheck$7 = (obj, member, msg) => {
|
|
@@ -2903,7 +2912,7 @@ class ApiaUtilMenu {
|
|
|
2903
2912
|
constructor() {
|
|
2904
2913
|
__privateAdd$7(this, _emitter$1, new EventEmitter());
|
|
2905
2914
|
__privateAdd$7(this, _items$1, []);
|
|
2906
|
-
__publicField$
|
|
2915
|
+
__publicField$h(this, "menuProps", null);
|
|
2907
2916
|
__privateAdd$7(this, _hooks, {
|
|
2908
2917
|
useIsOpen: () => {
|
|
2909
2918
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -2918,10 +2927,10 @@ class ApiaUtilMenu {
|
|
|
2918
2927
|
];
|
|
2919
2928
|
}
|
|
2920
2929
|
});
|
|
2921
|
-
__publicField$
|
|
2930
|
+
__publicField$h(this, "close", () => {
|
|
2922
2931
|
__privateGet$5(this, _emitter$1).emit("toggle", false);
|
|
2923
2932
|
});
|
|
2924
|
-
__publicField$
|
|
2933
|
+
__publicField$h(this, "open", ({
|
|
2925
2934
|
menuProps,
|
|
2926
2935
|
items
|
|
2927
2936
|
}) => {
|
|
@@ -2962,7 +2971,7 @@ class ApiaUtilMenu {
|
|
|
2962
2971
|
return /* @__PURE__ */ createElement(MenuItem, { ...current, key: current.key }, children);
|
|
2963
2972
|
}) });
|
|
2964
2973
|
});
|
|
2965
|
-
__publicField$
|
|
2974
|
+
__publicField$h(this, "Component", () => {
|
|
2966
2975
|
const [isOpen, close] = __privateGet$5(this, _hooks).useIsOpen();
|
|
2967
2976
|
if (!isOpen)
|
|
2968
2977
|
return null;
|
|
@@ -2987,17 +2996,17 @@ _hooks = new WeakMap();
|
|
|
2987
2996
|
_maxId = new WeakMap();
|
|
2988
2997
|
_RenderMenu = new WeakMap();
|
|
2989
2998
|
|
|
2990
|
-
var __defProp$
|
|
2991
|
-
var __defNormalProp$
|
|
2992
|
-
var __publicField$
|
|
2993
|
-
__defNormalProp$
|
|
2999
|
+
var __defProp$g = Object.defineProperty;
|
|
3000
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3001
|
+
var __publicField$g = (obj, key, value) => {
|
|
3002
|
+
__defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2994
3003
|
return value;
|
|
2995
3004
|
};
|
|
2996
3005
|
class ApiaUtilMouse extends EventEmitter {
|
|
2997
3006
|
constructor() {
|
|
2998
3007
|
super();
|
|
2999
|
-
__publicField$
|
|
3000
|
-
__publicField$
|
|
3008
|
+
__publicField$g(this, "x", 0);
|
|
3009
|
+
__publicField$g(this, "y", 0);
|
|
3001
3010
|
document.addEventListener("mousemove", (ev) => {
|
|
3002
3011
|
this.x = ev.clientX;
|
|
3003
3012
|
this.y = ev.clientY;
|
|
@@ -3009,10 +3018,10 @@ class ApiaUtilMouse extends EventEmitter {
|
|
|
3009
3018
|
}
|
|
3010
3019
|
}
|
|
3011
3020
|
|
|
3012
|
-
var __defProp$
|
|
3013
|
-
var __defNormalProp$
|
|
3014
|
-
var __publicField$
|
|
3015
|
-
__defNormalProp$
|
|
3021
|
+
var __defProp$f = Object.defineProperty;
|
|
3022
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3023
|
+
var __publicField$f = (obj, key, value) => {
|
|
3024
|
+
__defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3016
3025
|
return value;
|
|
3017
3026
|
};
|
|
3018
3027
|
var __accessCheck$6 = (obj, member, msg) => {
|
|
@@ -3036,15 +3045,15 @@ var __privateSet$3 = (obj, member, value, setter) => {
|
|
|
3036
3045
|
var _instance;
|
|
3037
3046
|
const _ApiaUtil = class _ApiaUtil {
|
|
3038
3047
|
constructor() {
|
|
3039
|
-
__publicField$
|
|
3040
|
-
__publicField$
|
|
3041
|
-
__publicField$
|
|
3042
|
-
__publicField$
|
|
3043
|
-
__publicField$
|
|
3044
|
-
__publicField$
|
|
3045
|
-
__publicField$
|
|
3046
|
-
__publicField$
|
|
3047
|
-
__publicField$
|
|
3048
|
+
__publicField$f(this, "dialogs");
|
|
3049
|
+
__publicField$f(this, "menu");
|
|
3050
|
+
__publicField$f(this, "modals");
|
|
3051
|
+
__publicField$f(this, "mouse");
|
|
3052
|
+
__publicField$f(this, "notifications");
|
|
3053
|
+
__publicField$f(this, "parsers");
|
|
3054
|
+
__publicField$f(this, "tabs");
|
|
3055
|
+
__publicField$f(this, "tooltips");
|
|
3056
|
+
__publicField$f(this, "Component", () => {
|
|
3048
3057
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3049
3058
|
/* @__PURE__ */ jsx(this.dialogs.Component, {}),
|
|
3050
3059
|
/* @__PURE__ */ jsx(this.modals.Component, {}),
|
|
@@ -3057,7 +3066,7 @@ const _ApiaUtil = class _ApiaUtil {
|
|
|
3057
3066
|
this.menu = new ApiaUtilMenu();
|
|
3058
3067
|
this.modals = new ApiaUtilModals();
|
|
3059
3068
|
this.mouse = new ApiaUtilMouse();
|
|
3060
|
-
this.notifications = new ApiaUtilNotifications();
|
|
3069
|
+
this.notifications = new ApiaUtilNotifications(this);
|
|
3061
3070
|
this.parsers = new ApiaUtilParsers();
|
|
3062
3071
|
this.tabs = new ApiaUtilTabsController();
|
|
3063
3072
|
this.tooltips = new ApiaUtilTooltips();
|
|
@@ -3073,22 +3082,22 @@ _instance = new WeakMap();
|
|
|
3073
3082
|
__privateAdd$6(_ApiaUtil, _instance, void 0);
|
|
3074
3083
|
let ApiaUtil = _ApiaUtil;
|
|
3075
3084
|
|
|
3076
|
-
var __defProp$
|
|
3077
|
-
var __defNormalProp$
|
|
3078
|
-
var __publicField$
|
|
3079
|
-
__defNormalProp$
|
|
3085
|
+
var __defProp$e = Object.defineProperty;
|
|
3086
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3087
|
+
var __publicField$e = (obj, key, value) => {
|
|
3088
|
+
__defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3080
3089
|
return value;
|
|
3081
3090
|
};
|
|
3082
3091
|
class ScreenLocker {
|
|
3083
3092
|
constructor() {
|
|
3084
|
-
__publicField$
|
|
3093
|
+
__publicField$e(this, "emitter", new StatefulEmitter({
|
|
3085
3094
|
locks: {
|
|
3086
3095
|
common: { count: 0 },
|
|
3087
3096
|
linear: { count: 0 },
|
|
3088
3097
|
white: { count: 1 }
|
|
3089
3098
|
}
|
|
3090
3099
|
}));
|
|
3091
|
-
__publicField$
|
|
3100
|
+
__publicField$e(this, "lock", (options) => {
|
|
3092
3101
|
this.emitter.setState("locks", (s) => {
|
|
3093
3102
|
const key = options?.type ?? "common";
|
|
3094
3103
|
return {
|
|
@@ -3104,11 +3113,11 @@ class ScreenLocker {
|
|
|
3104
3113
|
};
|
|
3105
3114
|
});
|
|
3106
3115
|
});
|
|
3107
|
-
__publicField$
|
|
3116
|
+
__publicField$e(this, "hasReleased", false);
|
|
3108
3117
|
/**
|
|
3109
3118
|
* 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.
|
|
3110
3119
|
*/
|
|
3111
|
-
__publicField$
|
|
3120
|
+
__publicField$e(this, "release", () => {
|
|
3112
3121
|
if (this.hasReleased)
|
|
3113
3122
|
return;
|
|
3114
3123
|
this.hasReleased = true;
|
|
@@ -3124,11 +3133,11 @@ class ScreenLocker {
|
|
|
3124
3133
|
/**
|
|
3125
3134
|
* This method notifies when the screenLock is released by the first time.
|
|
3126
3135
|
*/
|
|
3127
|
-
__publicField$
|
|
3136
|
+
__publicField$e(this, "onRelease", this.emitter.on.bind(this.emitter, "release"));
|
|
3128
3137
|
/**
|
|
3129
3138
|
* This component is the responsible for putting the lock courtain in the browser when it's required. It must be used once per application.
|
|
3130
3139
|
*/
|
|
3131
|
-
__publicField$
|
|
3140
|
+
__publicField$e(this, "Component", () => {
|
|
3132
3141
|
const locks = this.emitter.useState("locks");
|
|
3133
3142
|
const style = {
|
|
3134
3143
|
alignItems: "center",
|
|
@@ -3201,10 +3210,10 @@ const OptionsBox = observer(() => {
|
|
|
3201
3210
|
}) });
|
|
3202
3211
|
});
|
|
3203
3212
|
|
|
3204
|
-
var __defProp$
|
|
3205
|
-
var __defNormalProp$
|
|
3206
|
-
var __publicField$
|
|
3207
|
-
__defNormalProp$
|
|
3213
|
+
var __defProp$d = Object.defineProperty;
|
|
3214
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3215
|
+
var __publicField$d = (obj, key, value) => {
|
|
3216
|
+
__defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3208
3217
|
return value;
|
|
3209
3218
|
};
|
|
3210
3219
|
var __accessCheck$5 = (obj, member, msg) => {
|
|
@@ -3228,7 +3237,7 @@ var __privateSet$2 = (obj, member, value, setter) => {
|
|
|
3228
3237
|
var _actualSearch, _timeout;
|
|
3229
3238
|
class AutocompleteController {
|
|
3230
3239
|
constructor(properties) {
|
|
3231
|
-
__publicField$
|
|
3240
|
+
__publicField$d(this, "state", {
|
|
3232
3241
|
disabled: false,
|
|
3233
3242
|
readOnly: false,
|
|
3234
3243
|
id: uniqueId$3("autocomplete"),
|
|
@@ -3261,7 +3270,7 @@ class AutocompleteController {
|
|
|
3261
3270
|
}
|
|
3262
3271
|
});
|
|
3263
3272
|
__privateAdd$5(this, _timeout, 0);
|
|
3264
|
-
__publicField$
|
|
3273
|
+
__publicField$d(this, "tooltipRef", null);
|
|
3265
3274
|
Object.assign(this.state, properties);
|
|
3266
3275
|
if (properties.value) {
|
|
3267
3276
|
this.state.showValue = String(
|
|
@@ -3996,30 +4005,6 @@ const Checkbox$1 = forwardRef(
|
|
|
3996
4005
|
);
|
|
3997
4006
|
Checkbox$1.displayName = "Checkbox";
|
|
3998
4007
|
|
|
3999
|
-
const CalModal = React__default.forwardRef(
|
|
4000
|
-
({ handleClickDay, calValue, locale }) => {
|
|
4001
|
-
return /* @__PURE__ */ jsx(
|
|
4002
|
-
Box,
|
|
4003
|
-
{
|
|
4004
|
-
...getVariant("layout.common.components.datePicker"),
|
|
4005
|
-
className: "datePicker",
|
|
4006
|
-
children: /* @__PURE__ */ jsx(
|
|
4007
|
-
Calendar,
|
|
4008
|
-
{
|
|
4009
|
-
onClickDay: handleClickDay,
|
|
4010
|
-
locale,
|
|
4011
|
-
value: calValue || /* @__PURE__ */ new Date(),
|
|
4012
|
-
nextLabel: "\u203A",
|
|
4013
|
-
next2Label: "\xBB",
|
|
4014
|
-
prevLabel: "\u2039",
|
|
4015
|
-
prev2Label: "\xAB"
|
|
4016
|
-
}
|
|
4017
|
-
)
|
|
4018
|
-
}
|
|
4019
|
-
);
|
|
4020
|
-
}
|
|
4021
|
-
);
|
|
4022
|
-
|
|
4023
4008
|
const IconInput = ({
|
|
4024
4009
|
additionalButtons,
|
|
4025
4010
|
additionalButtonsPosition = "before",
|
|
@@ -4096,6 +4081,36 @@ const IconInput = ({
|
|
|
4096
4081
|
);
|
|
4097
4082
|
};
|
|
4098
4083
|
|
|
4084
|
+
const CalModal = React__default.forwardRef(
|
|
4085
|
+
({ handleClickDay, calValue, locale }) => {
|
|
4086
|
+
return /* @__PURE__ */ jsx(
|
|
4087
|
+
Box,
|
|
4088
|
+
{
|
|
4089
|
+
...getVariant("layout.common.components.datePicker"),
|
|
4090
|
+
className: "datePicker",
|
|
4091
|
+
children: /* @__PURE__ */ jsx(
|
|
4092
|
+
Calendar,
|
|
4093
|
+
{
|
|
4094
|
+
onClickDay: handleClickDay,
|
|
4095
|
+
locale,
|
|
4096
|
+
value: calValue || /* @__PURE__ */ new Date(),
|
|
4097
|
+
nextLabel: "\u203A",
|
|
4098
|
+
next2Label: "\xBB",
|
|
4099
|
+
prevLabel: "\u2039",
|
|
4100
|
+
prev2Label: "\xAB"
|
|
4101
|
+
}
|
|
4102
|
+
)
|
|
4103
|
+
}
|
|
4104
|
+
);
|
|
4105
|
+
}
|
|
4106
|
+
);
|
|
4107
|
+
|
|
4108
|
+
var __defProp$c = Object.defineProperty;
|
|
4109
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4110
|
+
var __publicField$c = (obj, key, value) => {
|
|
4111
|
+
__defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4112
|
+
return value;
|
|
4113
|
+
};
|
|
4099
4114
|
const DEFAULT_LOCALE = window.LANG_CODE;
|
|
4100
4115
|
const DEFAULT_MASK_PLACEHOLDER = "_";
|
|
4101
4116
|
const dateFormat = getDateFormat();
|
|
@@ -4104,331 +4119,217 @@ const getMaskForDateFormat = () => {
|
|
|
4104
4119
|
return "9999/99/99";
|
|
4105
4120
|
return "99/99/9999";
|
|
4106
4121
|
};
|
|
4107
|
-
|
|
4108
|
-
({
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
}
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
setError(null);
|
|
4144
|
-
if (deleteFiltersTimestamp !== void 0) {
|
|
4145
|
-
setCalendarValue("");
|
|
4146
|
-
}
|
|
4147
|
-
}, [deleteFiltersTimestamp]);
|
|
4148
|
-
useUpdateEffect$1(() => {
|
|
4149
|
-
if (onError)
|
|
4150
|
-
onError(stateError);
|
|
4151
|
-
if (stateError) {
|
|
4152
|
-
setInputValue("");
|
|
4153
|
-
}
|
|
4154
|
-
if (onError)
|
|
4155
|
-
onError(stateError ?? "");
|
|
4156
|
-
}, [stateError]);
|
|
4157
|
-
const shoutOnChange = React__default.useCallback(
|
|
4158
|
-
(newValue) => {
|
|
4159
|
-
lastEmittedValue.current = newValue;
|
|
4160
|
-
return onChange?.(newValue) ?? true;
|
|
4161
|
-
},
|
|
4162
|
-
[onChange]
|
|
4122
|
+
class DateInputController {
|
|
4123
|
+
constructor(actualId) {
|
|
4124
|
+
__publicField$c(this, "props", {});
|
|
4125
|
+
__publicField$c(this, "state", {});
|
|
4126
|
+
__publicField$c(this, "_ref", null);
|
|
4127
|
+
__publicField$c(this, "error", false);
|
|
4128
|
+
__publicField$c(this, "inputValue", "");
|
|
4129
|
+
__publicField$c(this, "value", null);
|
|
4130
|
+
__publicField$c(this, "previousValue", "");
|
|
4131
|
+
this.props.id = uniqueId$4(actualId ?? "date-input");
|
|
4132
|
+
makeAutoObservable(this);
|
|
4133
|
+
}
|
|
4134
|
+
clear() {
|
|
4135
|
+
this.setValueFromString("");
|
|
4136
|
+
this.focus();
|
|
4137
|
+
}
|
|
4138
|
+
focus() {
|
|
4139
|
+
const input = this._ref?.querySelector("input");
|
|
4140
|
+
if (input) {
|
|
4141
|
+
input.focus();
|
|
4142
|
+
setTimeout(() => {
|
|
4143
|
+
window.requestAnimationFrame(() => {
|
|
4144
|
+
input.setSelectionRange(0, input.value.length);
|
|
4145
|
+
});
|
|
4146
|
+
}, 0);
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
ref(el) {
|
|
4150
|
+
this._ref = el;
|
|
4151
|
+
}
|
|
4152
|
+
get calendarElementId() {
|
|
4153
|
+
return `DateModal${this.props.id}`;
|
|
4154
|
+
}
|
|
4155
|
+
isInsidePicker(el) {
|
|
4156
|
+
return !!el?.closest(
|
|
4157
|
+
`#${CSS.escape(this.props.id ?? "")}, #${CSS.escape(this.calendarElementId)}`
|
|
4163
4158
|
);
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
setError(shoutResult);
|
|
4203
|
-
setCalValue(/* @__PURE__ */ new Date());
|
|
4204
|
-
} else {
|
|
4205
|
-
setInputValue(formattedDate);
|
|
4206
|
-
setError(null);
|
|
4207
|
-
setCalValue(newDate.toDate());
|
|
4208
|
-
}
|
|
4159
|
+
}
|
|
4160
|
+
onBlur(ev) {
|
|
4161
|
+
if (!this.isInsidePicker(ev.relatedTarget)) {
|
|
4162
|
+
if (this.error) {
|
|
4163
|
+
this.inputValue = "";
|
|
4164
|
+
this.value = null;
|
|
4165
|
+
this.error = false;
|
|
4166
|
+
}
|
|
4167
|
+
this.props.onBlur?.(this.inputValue, ev);
|
|
4168
|
+
}
|
|
4169
|
+
}
|
|
4170
|
+
onInputChange(ev) {
|
|
4171
|
+
this.setValueFromString(ev.target.value);
|
|
4172
|
+
}
|
|
4173
|
+
onCalendarSelect(value) {
|
|
4174
|
+
this.setValue(value);
|
|
4175
|
+
}
|
|
4176
|
+
openCalendar(ev) {
|
|
4177
|
+
const tooltip = ApiaUtil.instance.tooltips.open({
|
|
4178
|
+
attachToElement() {
|
|
4179
|
+
return ev.target.closest("button");
|
|
4180
|
+
},
|
|
4181
|
+
attachToElementAnchorPoint: "center",
|
|
4182
|
+
closeOnClick: false,
|
|
4183
|
+
closeOnClickOut: true,
|
|
4184
|
+
closeOnEscape: true,
|
|
4185
|
+
closeOnMouseLeaveTooltip: false,
|
|
4186
|
+
closeOnMouseLeaveAttachedElement: false,
|
|
4187
|
+
closeOnScrollOut: true,
|
|
4188
|
+
children: /* @__PURE__ */ jsx("div", { id: this.calendarElementId, children: /* @__PURE__ */ jsx(
|
|
4189
|
+
CalModal,
|
|
4190
|
+
{
|
|
4191
|
+
calValue: this.value || /* @__PURE__ */ new Date(),
|
|
4192
|
+
locale: DEFAULT_LOCALE,
|
|
4193
|
+
handleClickDay: (date) => {
|
|
4194
|
+
tooltip.close();
|
|
4195
|
+
this.onCalendarSelect(date);
|
|
4196
|
+
this.focus();
|
|
4209
4197
|
}
|
|
4210
4198
|
}
|
|
4199
|
+
) }),
|
|
4200
|
+
initialFocusGetter(el) {
|
|
4201
|
+
return el.querySelector(`.react-calendar__tile--active`);
|
|
4211
4202
|
},
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
},
|
|
4219
|
-
[setCalendarValue]
|
|
4220
|
-
);
|
|
4221
|
-
useEffect(() => {
|
|
4222
|
-
if (stateError !== "" && stateError !== null && !avoidErrorMessage) {
|
|
4223
|
-
ApiaUtil.instance.notifications.notify({
|
|
4224
|
-
message: stateError,
|
|
4225
|
-
type: "warning"
|
|
4203
|
+
minSize: { width: 350, height: 310 },
|
|
4204
|
+
onClose: () => {
|
|
4205
|
+
window.requestAnimationFrame(() => {
|
|
4206
|
+
if (!this.isInsidePicker(document.activeElement)) {
|
|
4207
|
+
this.props.onBlur?.(this.inputValue);
|
|
4208
|
+
}
|
|
4226
4209
|
});
|
|
4227
4210
|
}
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
};
|
|
4246
|
-
const actualBlur = onBlur instanceof Promise ? onBlur : (ev2) => new Promise((resolve) => {
|
|
4247
|
-
const result = onBlur?.(ev2);
|
|
4248
|
-
resolve(result);
|
|
4249
|
-
});
|
|
4250
|
-
void actualBlur(newEvent).then((result) => {
|
|
4251
|
-
if (typeof result === "string") {
|
|
4252
|
-
setError(result);
|
|
4253
|
-
} else if (result === false) {
|
|
4254
|
-
setInputValue("");
|
|
4255
|
-
}
|
|
4256
|
-
});
|
|
4257
|
-
}
|
|
4258
|
-
},
|
|
4259
|
-
[id, onBlur, onError]
|
|
4260
|
-
);
|
|
4261
|
-
const inputProps = React__default.useMemo(
|
|
4262
|
-
() => ({
|
|
4263
|
-
...otherProps,
|
|
4264
|
-
className: `dateInput ${inputClassName ?? ""}`,
|
|
4265
|
-
value: stateError ? "" : renderLabel ? renderLabel(inputValue) : inputValue,
|
|
4266
|
-
ref,
|
|
4267
|
-
onChange: (ev) => {
|
|
4268
|
-
if (props.readOnly) {
|
|
4269
|
-
return;
|
|
4270
|
-
}
|
|
4271
|
-
setInputValue(ev.target.value);
|
|
4272
|
-
if (getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== ev.target.value && ev.target.value !== "") {
|
|
4273
|
-
setError(null);
|
|
4274
|
-
const hasPlaceHolder = ev.target.value.match(/_/);
|
|
4275
|
-
if (!hasPlaceHolder)
|
|
4276
|
-
return onChange?.(ev.target.value);
|
|
4277
|
-
}
|
|
4278
|
-
},
|
|
4279
|
-
onBlur: (ev) => {
|
|
4280
|
-
setIsFocused(false);
|
|
4281
|
-
if (!(props.readOnly || getCustomMask || document.querySelector(".overlay.screenLock")))
|
|
4282
|
-
setCalendarValue(ev.target.value, false, true);
|
|
4283
|
-
if (hasBlured.current) {
|
|
4284
|
-
hasBlured.current = false;
|
|
4285
|
-
} else if (!document.querySelector(".overlay.screenLock")) {
|
|
4286
|
-
handleBlur(ev);
|
|
4287
|
-
}
|
|
4288
|
-
},
|
|
4289
|
-
onFocus: () => {
|
|
4290
|
-
setIsFocused(true);
|
|
4291
|
-
},
|
|
4292
|
-
onKeyDown: (ev) => {
|
|
4293
|
-
if (ev.key === "Enter")
|
|
4294
|
-
setCalendarValue(inputValue);
|
|
4211
|
+
});
|
|
4212
|
+
}
|
|
4213
|
+
setValueFromString(str, fire = true) {
|
|
4214
|
+
if (str === "" || str.replaceAll("_", "9") === getMaskForDateFormat()) {
|
|
4215
|
+
this.inputValue = "";
|
|
4216
|
+
this.setValue(null, fire);
|
|
4217
|
+
} else if (str !== this.inputValue) {
|
|
4218
|
+
const hasPlaceHolder = str.match(/_/);
|
|
4219
|
+
if (!hasPlaceHolder) {
|
|
4220
|
+
const value = dayjs(str, dateFormat);
|
|
4221
|
+
const formattedDate = value.format(dateFormat);
|
|
4222
|
+
if (value.isValid() && formattedDate === str) {
|
|
4223
|
+
this.setValue(value.toDate(), fire);
|
|
4224
|
+
} else {
|
|
4225
|
+
this.inputValue = str;
|
|
4226
|
+
this.props.onError?.(getLabel("msgInvalidDate").text);
|
|
4227
|
+
this.error = true;
|
|
4295
4228
|
}
|
|
4296
|
-
}
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4229
|
+
} else {
|
|
4230
|
+
this.inputValue = str;
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
async setValue(date, fire = true) {
|
|
4235
|
+
this.error = false;
|
|
4236
|
+
if (date !== this.value) {
|
|
4237
|
+
const dateValue = dayjs(date);
|
|
4238
|
+
const newValue = dateValue.isValid() ? dateValue.format(dateFormat) : "";
|
|
4239
|
+
const res = fire ? await this.props.onChange?.(newValue) : null;
|
|
4240
|
+
this.inputValue = newValue || "";
|
|
4241
|
+
if (typeof res !== "string") {
|
|
4242
|
+
this.value = date;
|
|
4243
|
+
} else {
|
|
4244
|
+
this.error = true;
|
|
4245
|
+
this.value = null;
|
|
4246
|
+
this.props.onError?.(res);
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
render(props) {
|
|
4251
|
+
const { onBlur, onChange, onError, id } = props;
|
|
4252
|
+
Object.assign(this.props, {
|
|
4253
|
+
onBlur,
|
|
4254
|
+
onChange,
|
|
4255
|
+
onError,
|
|
4256
|
+
id: id ?? this.props.id
|
|
4257
|
+
});
|
|
4258
|
+
const { value, disabled, readonly } = props;
|
|
4259
|
+
Object.assign(this.state, { readonly, value, disabled });
|
|
4260
|
+
if (value !== void 0 && this.previousValue !== value) {
|
|
4261
|
+
this.previousValue = value;
|
|
4262
|
+
this.setValueFromString(value, false);
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
const DateInput = observer(
|
|
4267
|
+
({
|
|
4268
|
+
className,
|
|
4269
|
+
disabled,
|
|
4270
|
+
id: outerId,
|
|
4271
|
+
inputRef,
|
|
4272
|
+
onBlur,
|
|
4273
|
+
onChange,
|
|
4274
|
+
onError,
|
|
4275
|
+
readonly,
|
|
4276
|
+
value: outerValue
|
|
4277
|
+
}) => {
|
|
4278
|
+
const controller = useMemo(
|
|
4279
|
+
() => new DateInputController(outerId),
|
|
4280
|
+
[outerId]
|
|
4318
4281
|
);
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
onMouseDown: (e) => {
|
|
4332
|
-
e.preventDefault();
|
|
4333
|
-
e.stopPropagation();
|
|
4334
|
-
},
|
|
4335
|
-
onClick: (e) => {
|
|
4336
|
-
e.stopPropagation();
|
|
4337
|
-
doDelete(e);
|
|
4338
|
-
},
|
|
4339
|
-
onKeyDown: (e) => {
|
|
4340
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
4341
|
-
e.preventDefault();
|
|
4342
|
-
doDelete(e);
|
|
4343
|
-
}
|
|
4344
|
-
},
|
|
4345
|
-
"aria-label": getLabel("btnAiDelete").text,
|
|
4346
|
-
title: getLabel("btnAiDelete").text,
|
|
4347
|
-
children: /* @__PURE__ */ jsx(Close, { type: "button", className: "delete_date_button" })
|
|
4348
|
-
}
|
|
4349
|
-
);
|
|
4350
|
-
}, [id, onDelete, setCalendarValue]);
|
|
4351
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
4282
|
+
controller.render({
|
|
4283
|
+
className,
|
|
4284
|
+
disabled,
|
|
4285
|
+
id: outerId,
|
|
4286
|
+
inputRef,
|
|
4287
|
+
onBlur,
|
|
4288
|
+
onChange,
|
|
4289
|
+
onError,
|
|
4290
|
+
readonly,
|
|
4291
|
+
value: outerValue
|
|
4292
|
+
});
|
|
4293
|
+
return /* @__PURE__ */ jsx(
|
|
4352
4294
|
Box,
|
|
4353
4295
|
{
|
|
4354
4296
|
...getVariant("forms.dateInput"),
|
|
4355
4297
|
className: `${className ?? ""} dateInput`,
|
|
4356
|
-
id:
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
setIsFocused(false);
|
|
4360
|
-
if (hasBlured.current) {
|
|
4361
|
-
hasBlured.current = false;
|
|
4362
|
-
} else if (!document.querySelector(".overlay.screenLock")) {
|
|
4363
|
-
handleBlur(e);
|
|
4364
|
-
}
|
|
4365
|
-
},
|
|
4298
|
+
id: controller.props.id,
|
|
4299
|
+
onBlur: controller.onBlur.bind(controller),
|
|
4300
|
+
ref: controller.ref.bind(controller),
|
|
4366
4301
|
children: /* @__PURE__ */ jsx(
|
|
4367
4302
|
IconInput,
|
|
4368
4303
|
{
|
|
4369
|
-
additionalButtons: (
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4304
|
+
additionalButtons: controller.inputValue && getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== controller.inputValue ? /* @__PURE__ */ jsx(
|
|
4305
|
+
Close,
|
|
4306
|
+
{
|
|
4307
|
+
as: "button",
|
|
4308
|
+
onClick: controller.clear.bind(controller),
|
|
4309
|
+
className: "delete_date_button",
|
|
4310
|
+
onMouseDown: (e) => {
|
|
4311
|
+
e.preventDefault();
|
|
4312
|
+
e.stopPropagation();
|
|
4313
|
+
}
|
|
4314
|
+
}
|
|
4315
|
+
) : void 0,
|
|
4316
|
+
buttonProps: { disabled },
|
|
4379
4317
|
icon: FaCalendarAlt,
|
|
4380
|
-
inputProps
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
attachToElement() {
|
|
4387
|
-
return ev.target.closest(
|
|
4388
|
-
"button"
|
|
4389
|
-
);
|
|
4390
|
-
},
|
|
4391
|
-
attachToElementAnchorPoint: "center",
|
|
4392
|
-
closeOnClick: false,
|
|
4393
|
-
closeOnClickOut: true,
|
|
4394
|
-
closeOnEscape: true,
|
|
4395
|
-
closeOnMouseLeaveTooltip: false,
|
|
4396
|
-
closeOnMouseLeaveAttachedElement: false,
|
|
4397
|
-
closeOnScrollOut: true,
|
|
4398
|
-
children: CalModalRenderer ? /* @__PURE__ */ jsx(
|
|
4399
|
-
CalModalRenderer,
|
|
4400
|
-
{
|
|
4401
|
-
calValue,
|
|
4402
|
-
locale: DEFAULT_LOCALE,
|
|
4403
|
-
handleClickDay: (ev2) => {
|
|
4404
|
-
selectDate(ev2);
|
|
4405
|
-
setCalValue(ev2);
|
|
4406
|
-
tooltip.close();
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4409
|
-
) : /* @__PURE__ */ jsx(
|
|
4410
|
-
CalModal,
|
|
4411
|
-
{
|
|
4412
|
-
calValue,
|
|
4413
|
-
locale: DEFAULT_LOCALE,
|
|
4414
|
-
handleClickDay: (ev2) => {
|
|
4415
|
-
selectDate(ev2);
|
|
4416
|
-
setCalValue(ev2);
|
|
4417
|
-
tooltip.close();
|
|
4418
|
-
}
|
|
4419
|
-
}
|
|
4420
|
-
),
|
|
4421
|
-
initialFocusGetter(el) {
|
|
4422
|
-
return el.querySelector(`.react-calendar__tile--active`);
|
|
4423
|
-
},
|
|
4424
|
-
minSize: { width: 350, height: 310 }
|
|
4425
|
-
});
|
|
4318
|
+
inputProps: {
|
|
4319
|
+
disabled,
|
|
4320
|
+
onChange: controller.onInputChange.bind(controller),
|
|
4321
|
+
value: controller.inputValue,
|
|
4322
|
+
id: outerId,
|
|
4323
|
+
name: outerId
|
|
4426
4324
|
},
|
|
4427
|
-
|
|
4325
|
+
mask: getMaskForDateFormat(),
|
|
4326
|
+
maskPlaceholder: DEFAULT_MASK_PLACEHOLDER,
|
|
4327
|
+
onClick: controller.openCalendar.bind(controller),
|
|
4328
|
+
readOnly: readonly
|
|
4428
4329
|
}
|
|
4429
4330
|
)
|
|
4430
4331
|
}
|
|
4431
|
-
)
|
|
4332
|
+
);
|
|
4432
4333
|
}
|
|
4433
4334
|
);
|
|
4434
4335
|
|
|
@@ -8817,6 +8718,253 @@ const MDRenderer = ({ str }) => {
|
|
|
8817
8718
|
};
|
|
8818
8719
|
var index = memo(MDRenderer);
|
|
8819
8720
|
|
|
8721
|
+
const SwitchCard = observer(
|
|
8722
|
+
({
|
|
8723
|
+
align = "left",
|
|
8724
|
+
icon,
|
|
8725
|
+
label,
|
|
8726
|
+
notSwitchedLabel,
|
|
8727
|
+
onClose,
|
|
8728
|
+
onSwitch,
|
|
8729
|
+
switchedLabel,
|
|
8730
|
+
switchProps,
|
|
8731
|
+
value,
|
|
8732
|
+
disabled
|
|
8733
|
+
}) => {
|
|
8734
|
+
const [isSwitched, setIsSwitched] = useState(toBoolean(value));
|
|
8735
|
+
useEffect(() => {
|
|
8736
|
+
setIsSwitched(toBoolean(value));
|
|
8737
|
+
}, [value]);
|
|
8738
|
+
const handleSwitchChange = (e) => {
|
|
8739
|
+
const newValue = e.target.checked;
|
|
8740
|
+
setIsSwitched(newValue);
|
|
8741
|
+
if (onSwitch) {
|
|
8742
|
+
onSwitch(newValue);
|
|
8743
|
+
}
|
|
8744
|
+
};
|
|
8745
|
+
return /* @__PURE__ */ jsxs(
|
|
8746
|
+
Box,
|
|
8747
|
+
{
|
|
8748
|
+
className: "switch__card",
|
|
8749
|
+
...getVariant("layout.common.components.switchCard"),
|
|
8750
|
+
children: [
|
|
8751
|
+
align === "left" && /* @__PURE__ */ jsx(
|
|
8752
|
+
Switch,
|
|
8753
|
+
{
|
|
8754
|
+
disabled,
|
|
8755
|
+
checked: isSwitched,
|
|
8756
|
+
...switchProps,
|
|
8757
|
+
onChange: handleSwitchChange
|
|
8758
|
+
}
|
|
8759
|
+
),
|
|
8760
|
+
/* @__PURE__ */ jsxs(Box, { className: "label__container", title: label, children: [
|
|
8761
|
+
icon && /* @__PURE__ */ jsx(Icon$1, { name: icon, title: "" }),
|
|
8762
|
+
label
|
|
8763
|
+
] }),
|
|
8764
|
+
(switchedLabel && isSwitched || align === "right" || onClose) && /* @__PURE__ */ jsxs(Box, { className: "switch__container", children: [
|
|
8765
|
+
!notSwitchedLabel && (isSwitched ? getLabel("lblCanUpdate").text : getLabel("lblCannotUpdate").text),
|
|
8766
|
+
align === "right" && /* @__PURE__ */ jsx(
|
|
8767
|
+
Switch,
|
|
8768
|
+
{
|
|
8769
|
+
disabled,
|
|
8770
|
+
checked: isSwitched,
|
|
8771
|
+
...switchProps,
|
|
8772
|
+
onChange: handleSwitchChange,
|
|
8773
|
+
className: "switch",
|
|
8774
|
+
title: isSwitched ? getLabel("lblCanUpdate").text : getLabel("lblCannotUpdate").text
|
|
8775
|
+
}
|
|
8776
|
+
),
|
|
8777
|
+
onClose && !disabled && /* @__PURE__ */ jsx(Close, { disabled, onClick: onClose })
|
|
8778
|
+
] })
|
|
8779
|
+
]
|
|
8780
|
+
}
|
|
8781
|
+
);
|
|
8782
|
+
}
|
|
8783
|
+
);
|
|
8784
|
+
|
|
8785
|
+
const PermissionsList = observer(() => {
|
|
8786
|
+
const controller = usePermissionsContext();
|
|
8787
|
+
const state = controller.permissions;
|
|
8788
|
+
return /* @__PURE__ */ jsxs(Box, { className: "permissions__list", children: [
|
|
8789
|
+
state.users && state.users.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8790
|
+
/* @__PURE__ */ jsx("span", { children: getLabel("sbtUsers").text }),
|
|
8791
|
+
/* @__PURE__ */ jsx(Box, { as: "ul", children: state.users.map((c) => {
|
|
8792
|
+
return /* @__PURE__ */ jsx(Box, { as: "li", children: /* @__PURE__ */ jsx(
|
|
8793
|
+
SwitchCard,
|
|
8794
|
+
{
|
|
8795
|
+
disabled: controller.disabled,
|
|
8796
|
+
label: c.userLogin,
|
|
8797
|
+
align: "right",
|
|
8798
|
+
icon: "User2",
|
|
8799
|
+
onClose: () => controller.onChangeUsers(
|
|
8800
|
+
controller.permissions.users.filter(
|
|
8801
|
+
(s) => s.userId !== c.userId
|
|
8802
|
+
)
|
|
8803
|
+
),
|
|
8804
|
+
onSwitch: (isSwitched) => c.canUpdate = isSwitched,
|
|
8805
|
+
value: c.canUpdate
|
|
8806
|
+
}
|
|
8807
|
+
) }, c.userId);
|
|
8808
|
+
}) })
|
|
8809
|
+
] }),
|
|
8810
|
+
state.pools && state.pools.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8811
|
+
/* @__PURE__ */ jsx("span", { children: getLabel("lblPool").text }),
|
|
8812
|
+
/* @__PURE__ */ jsx(Box, { as: "ul", children: state.pools.map((c) => {
|
|
8813
|
+
return /* @__PURE__ */ jsx(Box, { as: "li", children: /* @__PURE__ */ jsx(
|
|
8814
|
+
SwitchCard,
|
|
8815
|
+
{
|
|
8816
|
+
label: c.poolName,
|
|
8817
|
+
align: "right",
|
|
8818
|
+
icon: "Groups",
|
|
8819
|
+
onClose: () => controller.onChangePools(
|
|
8820
|
+
controller.permissions.pools.filter(
|
|
8821
|
+
(s) => s.poolId !== c.poolId
|
|
8822
|
+
)
|
|
8823
|
+
),
|
|
8824
|
+
onSwitch: (isSwitched) => c.canUpdate = isSwitched,
|
|
8825
|
+
value: c.canUpdate
|
|
8826
|
+
}
|
|
8827
|
+
) }, c.poolName);
|
|
8828
|
+
}) })
|
|
8829
|
+
] })
|
|
8830
|
+
] });
|
|
8831
|
+
});
|
|
8832
|
+
|
|
8833
|
+
const UserModalBtn = observer(() => {
|
|
8834
|
+
const context = usePermissionsContext();
|
|
8835
|
+
return /* @__PURE__ */ jsx(
|
|
8836
|
+
SimpleButton,
|
|
8837
|
+
{
|
|
8838
|
+
disabled: context.disabled,
|
|
8839
|
+
variant: "outline",
|
|
8840
|
+
onClick: () => {
|
|
8841
|
+
makeApiaUsersModal2().openModal({
|
|
8842
|
+
title: window.LBL_ADD_USER
|
|
8843
|
+
}).then((selected) => {
|
|
8844
|
+
context.onChangeUsers(
|
|
8845
|
+
selected.reduce(
|
|
8846
|
+
(acc, c) => {
|
|
8847
|
+
const newItem = {
|
|
8848
|
+
userId: c.row.id,
|
|
8849
|
+
userLogin: String(c.row.cells[0].children),
|
|
8850
|
+
canUpdate: false
|
|
8851
|
+
};
|
|
8852
|
+
if (!acc.some((c2) => c2.userId === newItem.userId)) {
|
|
8853
|
+
acc.push(newItem);
|
|
8854
|
+
}
|
|
8855
|
+
return acc;
|
|
8856
|
+
},
|
|
8857
|
+
[...context.permissions.users]
|
|
8858
|
+
)
|
|
8859
|
+
);
|
|
8860
|
+
});
|
|
8861
|
+
},
|
|
8862
|
+
children: getLabel("btnAddUser").text
|
|
8863
|
+
}
|
|
8864
|
+
);
|
|
8865
|
+
});
|
|
8866
|
+
|
|
8867
|
+
const PoolModalBtn = observer(() => {
|
|
8868
|
+
const context = usePermissionsContext();
|
|
8869
|
+
return /* @__PURE__ */ jsx(
|
|
8870
|
+
SimpleButton,
|
|
8871
|
+
{
|
|
8872
|
+
disabled: context.disabled,
|
|
8873
|
+
variant: "outline",
|
|
8874
|
+
onClick: () => {
|
|
8875
|
+
makeApiaPoolsModals2().openModal({
|
|
8876
|
+
title: window.LBL_ADD_GROUP
|
|
8877
|
+
}).then((selected) => {
|
|
8878
|
+
context.onChangePools(
|
|
8879
|
+
selected.reduce(
|
|
8880
|
+
(acc, c) => {
|
|
8881
|
+
const newItem = {
|
|
8882
|
+
poolId: c.row.id,
|
|
8883
|
+
poolName: String(c.row.cells[0].children),
|
|
8884
|
+
canUpdate: false
|
|
8885
|
+
};
|
|
8886
|
+
if (!acc.some((c2) => c2.poolId === newItem.poolId)) {
|
|
8887
|
+
acc.push(newItem);
|
|
8888
|
+
}
|
|
8889
|
+
return acc;
|
|
8890
|
+
},
|
|
8891
|
+
[...context.permissions.pools]
|
|
8892
|
+
)
|
|
8893
|
+
);
|
|
8894
|
+
});
|
|
8895
|
+
},
|
|
8896
|
+
children: getLabel("btnAddPool").text
|
|
8897
|
+
}
|
|
8898
|
+
);
|
|
8899
|
+
});
|
|
8900
|
+
|
|
8901
|
+
const PermissionsContext = createContext(null);
|
|
8902
|
+
function usePermissionsContext() {
|
|
8903
|
+
return useContext(PermissionsContext);
|
|
8904
|
+
}
|
|
8905
|
+
const Permissions = observer(
|
|
8906
|
+
({
|
|
8907
|
+
everyonePermissionsValue,
|
|
8908
|
+
collapsePermissions,
|
|
8909
|
+
disabled,
|
|
8910
|
+
onChangeEveryonePermissions,
|
|
8911
|
+
onChangeUsers,
|
|
8912
|
+
onChangePools,
|
|
8913
|
+
permissions
|
|
8914
|
+
}) => {
|
|
8915
|
+
return /* @__PURE__ */ jsx(
|
|
8916
|
+
CollapsiblePanel,
|
|
8917
|
+
{
|
|
8918
|
+
label: /* @__PURE__ */ jsx("span", { children: getLabel("lblPer").text }),
|
|
8919
|
+
id: "permissions",
|
|
8920
|
+
collapseIconToRight: true,
|
|
8921
|
+
closedIcon: "ArrowUpThin",
|
|
8922
|
+
openIcon: "ArrowDownThin",
|
|
8923
|
+
className: "uploader__permissions",
|
|
8924
|
+
collapsed: collapsePermissions,
|
|
8925
|
+
children: /* @__PURE__ */ jsx(
|
|
8926
|
+
PermissionsContext.Provider,
|
|
8927
|
+
{
|
|
8928
|
+
value: {
|
|
8929
|
+
onChangeUsers,
|
|
8930
|
+
onChangePools,
|
|
8931
|
+
permissions,
|
|
8932
|
+
disabled
|
|
8933
|
+
},
|
|
8934
|
+
children: /* @__PURE__ */ jsxs(Box, { ...getVariant("layout.common.components.uploader.permissions"), children: [
|
|
8935
|
+
/* @__PURE__ */ jsxs("label", { className: "uploader__permissions_selection", children: [
|
|
8936
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
8937
|
+
/* @__PURE__ */ jsx("span", { children: getLabel("lblTod").text }),
|
|
8938
|
+
/* @__PURE__ */ jsxs(
|
|
8939
|
+
Select,
|
|
8940
|
+
{
|
|
8941
|
+
disabled,
|
|
8942
|
+
onChange: (ev) => {
|
|
8943
|
+
onChangeEveryonePermissions(
|
|
8944
|
+
ev.target.value
|
|
8945
|
+
);
|
|
8946
|
+
},
|
|
8947
|
+
value: everyonePermissionsValue,
|
|
8948
|
+
children: [
|
|
8949
|
+
/* @__PURE__ */ jsx("option", { value: "M", children: getLabel("lblPerMod").text }),
|
|
8950
|
+
/* @__PURE__ */ jsx("option", { value: "R", children: getLabel("lblPerVer").text }),
|
|
8951
|
+
/* @__PURE__ */ jsx("option", { value: "", children: getLabel("lblAccessDenied").text })
|
|
8952
|
+
]
|
|
8953
|
+
}
|
|
8954
|
+
)
|
|
8955
|
+
] }),
|
|
8956
|
+
/* @__PURE__ */ jsx(UserModalBtn, {}),
|
|
8957
|
+
/* @__PURE__ */ jsx(PoolModalBtn, {})
|
|
8958
|
+
] }),
|
|
8959
|
+
/* @__PURE__ */ jsx(PermissionsList, {})
|
|
8960
|
+
] })
|
|
8961
|
+
}
|
|
8962
|
+
)
|
|
8963
|
+
}
|
|
8964
|
+
);
|
|
8965
|
+
}
|
|
8966
|
+
);
|
|
8967
|
+
|
|
8820
8968
|
const TabsContext = React__default.createContext(null);
|
|
8821
8969
|
function useTabsContext() {
|
|
8822
8970
|
return React__default.useContext(TabsContext);
|
|
@@ -11126,5 +11274,5 @@ const _FiltersStore = class _FiltersStore {
|
|
|
11126
11274
|
__publicField(_FiltersStore, "instance", new _FiltersStore());
|
|
11127
11275
|
let FiltersStore = _FiltersStore;
|
|
11128
11276
|
|
|
11129
|
-
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, index as MDRenderer, Modal, ModalContext, NumberInput, Overlay, Pagination, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11277
|
+
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, index as MDRenderer, Modal, ModalContext, NumberInput, Overlay, Pagination, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11130
11278
|
//# sourceMappingURL=index.js.map
|