@oliasoft-open-source/react-ui-library 4.15.2-beta-4 → 4.15.2-beta-6
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/global.css +430 -0
- package/dist/index.js +1978 -613
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,12 +11,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
11
11
|
var _docChanged, _ignoreNextExit, _suggesters, _next, _prev, _handlerMatches, _ignored, _removed, _lastChangeFromAppend, _a;
|
|
12
12
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
13
13
|
import * as React$4 from "react";
|
|
14
|
-
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, useImperativeHandle, memo, cloneElement as cloneElement$1 } from "react";
|
|
14
|
+
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, PureComponent, useImperativeHandle, memo, cloneElement as cloneElement$1 } from "react";
|
|
15
15
|
import * as PropTypes from "prop-types";
|
|
16
16
|
import PropTypes__default from "prop-types";
|
|
17
17
|
import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
|
|
18
18
|
import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$4 } from "lodash";
|
|
19
|
-
import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$
|
|
19
|
+
import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
|
|
20
20
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
21
21
|
function getDefaultExportFromCjs(x2) {
|
|
22
22
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -186,7 +186,7 @@ var InputType = /* @__PURE__ */ ((InputType2) => {
|
|
|
186
186
|
})(InputType || {});
|
|
187
187
|
const chevron = "_chevron_1kw4m_1";
|
|
188
188
|
const expanded$2 = "_expanded_1kw4m_9";
|
|
189
|
-
const styles$
|
|
189
|
+
const styles$U = {
|
|
190
190
|
chevron,
|
|
191
191
|
expanded: expanded$2
|
|
192
192
|
};
|
|
@@ -286,8 +286,8 @@ function __spreadArray$2(to2, from3, pack) {
|
|
|
286
286
|
}
|
|
287
287
|
return to2.concat(ar2 || Array.prototype.slice.call(from3));
|
|
288
288
|
}
|
|
289
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed,
|
|
290
|
-
var e2 = new Error(
|
|
289
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message2) {
|
|
290
|
+
var e2 = new Error(message2);
|
|
291
291
|
return e2.name = "SuppressedError", e2.error = error2, e2.suppressed = suppressed, e2;
|
|
292
292
|
};
|
|
293
293
|
/*!
|
|
@@ -869,7 +869,7 @@ const wrapper$5 = "_wrapper_18jt2_1";
|
|
|
869
869
|
const customSvg = "_customSvg_18jt2_8";
|
|
870
870
|
const customPng = "_customPng_18jt2_11";
|
|
871
871
|
const clickable$2 = "_clickable_18jt2_16";
|
|
872
|
-
const styles$
|
|
872
|
+
const styles$T = {
|
|
873
873
|
wrapper: wrapper$5,
|
|
874
874
|
customSvg,
|
|
875
875
|
customPng,
|
|
@@ -1544,8 +1544,8 @@ const Icon = ({
|
|
|
1544
1544
|
"div",
|
|
1545
1545
|
{
|
|
1546
1546
|
className: cx$2(
|
|
1547
|
-
styles$
|
|
1548
|
-
(clickable2 || onClick) && !disabledContext ? styles$
|
|
1547
|
+
styles$T.wrapper,
|
|
1548
|
+
(clickable2 || onClick) && !disabledContext ? styles$T.clickable : ""
|
|
1549
1549
|
),
|
|
1550
1550
|
style: style2,
|
|
1551
1551
|
onClick: (evt) => onClick && !disabledContext ? onClick(evt) : void 0,
|
|
@@ -1553,7 +1553,7 @@ const Icon = ({
|
|
|
1553
1553
|
children: isValidElement(icon2) ? icon2 : typeof icon2 === "string" && (icon2.includes(".svg") || icon2.includes("image/svg")) ? /* @__PURE__ */ jsx(
|
|
1554
1554
|
ReactSVG,
|
|
1555
1555
|
{
|
|
1556
|
-
className: styles$
|
|
1556
|
+
className: styles$T.customSvg,
|
|
1557
1557
|
beforeInjection: (svg) => {
|
|
1558
1558
|
if (size2) {
|
|
1559
1559
|
svg.setAttribute("width", String(size2));
|
|
@@ -1562,26 +1562,26 @@ const Icon = ({
|
|
|
1562
1562
|
},
|
|
1563
1563
|
src: icon2
|
|
1564
1564
|
}
|
|
1565
|
-
) : typeof icon2 === "string" && (icon2.includes(".png") || icon2.includes("image/png")) ? /* @__PURE__ */ jsx("img", { alt: "icon", className: styles$
|
|
1565
|
+
) : typeof icon2 === "string" && (icon2.includes(".png") || icon2.includes("image/png")) ? /* @__PURE__ */ jsx("img", { alt: "icon", className: styles$T.customPng, src: icon2 }) : typeof icon2 === "string" ? /* @__PURE__ */ jsx(NamedIcon, { icon: icon2 }) : null
|
|
1566
1566
|
}
|
|
1567
1567
|
);
|
|
1568
1568
|
};
|
|
1569
1569
|
const Chevron = ({ expanded: expanded2 }) => {
|
|
1570
|
-
return /* @__PURE__ */ jsx("span", { className: cx$2(styles$
|
|
1570
|
+
return /* @__PURE__ */ jsx("span", { className: cx$2(styles$U.chevron, expanded2 ? styles$U.expanded : ""), children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHEVRON_RIGHT }) });
|
|
1571
1571
|
};
|
|
1572
1572
|
const accordion = "_accordion_15p8j_1";
|
|
1573
1573
|
const accordionHeader = "_accordionHeader_15p8j_5";
|
|
1574
|
-
const heading$
|
|
1574
|
+
const heading$6 = "_heading_15p8j_9";
|
|
1575
1575
|
const clickable$1 = "_clickable_15p8j_12";
|
|
1576
1576
|
const bordered$4 = "_bordered_15p8j_18";
|
|
1577
1577
|
const accordionContent = "_accordionContent_15p8j_18";
|
|
1578
1578
|
const expanded$1 = "_expanded_15p8j_36";
|
|
1579
1579
|
const padding$3 = "_padding_15p8j_44";
|
|
1580
1580
|
const squareBottom = "_squareBottom_15p8j_47";
|
|
1581
|
-
const styles$
|
|
1581
|
+
const styles$S = {
|
|
1582
1582
|
accordion,
|
|
1583
1583
|
accordionHeader,
|
|
1584
|
-
heading: heading$
|
|
1584
|
+
heading: heading$6,
|
|
1585
1585
|
clickable: clickable$1,
|
|
1586
1586
|
bordered: bordered$4,
|
|
1587
1587
|
accordionContent,
|
|
@@ -1603,21 +1603,21 @@ const AccordionBase = ({
|
|
|
1603
1603
|
"div",
|
|
1604
1604
|
{
|
|
1605
1605
|
className: cx$2(
|
|
1606
|
-
styles$
|
|
1607
|
-
bordered2 ? styles$
|
|
1608
|
-
expanded2 ? styles$
|
|
1609
|
-
squareBottom2 ? styles$
|
|
1606
|
+
styles$S.accordion,
|
|
1607
|
+
bordered2 ? styles$S.bordered : "",
|
|
1608
|
+
expanded2 ? styles$S.expanded : "",
|
|
1609
|
+
squareBottom2 ? styles$S.squareBottom : ""
|
|
1610
1610
|
),
|
|
1611
1611
|
children: [
|
|
1612
1612
|
/* @__PURE__ */ jsxs(
|
|
1613
1613
|
"div",
|
|
1614
1614
|
{
|
|
1615
|
-
className: cx$2(styles$
|
|
1615
|
+
className: cx$2(styles$S.accordionHeader, onClick ? styles$S.clickable : ""),
|
|
1616
1616
|
onClick,
|
|
1617
1617
|
"data-testid": testId,
|
|
1618
1618
|
children: [
|
|
1619
1619
|
/* @__PURE__ */ jsx(Chevron, { expanded: expanded2 }),
|
|
1620
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
1620
|
+
/* @__PURE__ */ jsx("div", { className: styles$S.heading, children: heading2 })
|
|
1621
1621
|
]
|
|
1622
1622
|
}
|
|
1623
1623
|
),
|
|
@@ -1625,8 +1625,8 @@ const AccordionBase = ({
|
|
|
1625
1625
|
"div",
|
|
1626
1626
|
{
|
|
1627
1627
|
className: cx$2(
|
|
1628
|
-
styles$
|
|
1629
|
-
bordered2 && padding2 ? styles$
|
|
1628
|
+
styles$S.accordionContent,
|
|
1629
|
+
bordered2 && padding2 ? styles$S.padding : ""
|
|
1630
1630
|
),
|
|
1631
1631
|
children
|
|
1632
1632
|
}
|
|
@@ -1698,20 +1698,20 @@ const Accordion = ({
|
|
|
1698
1698
|
};
|
|
1699
1699
|
const checkbox = "_checkbox_1ybyr_1";
|
|
1700
1700
|
const noLabel = "_noLabel_1ybyr_17";
|
|
1701
|
-
const small$
|
|
1701
|
+
const small$d = "_small_1ybyr_20";
|
|
1702
1702
|
const checkmark = "_checkmark_1ybyr_43";
|
|
1703
|
-
const disabled$
|
|
1703
|
+
const disabled$a = "_disabled_1ybyr_67";
|
|
1704
1704
|
const noMargin$2 = "_noMargin_1ybyr_81";
|
|
1705
|
-
const isInTable$
|
|
1705
|
+
const isInTable$4 = "_isInTable_1ybyr_84";
|
|
1706
1706
|
const helpIconEnabled$2 = "_helpIconEnabled_1ybyr_87";
|
|
1707
|
-
const styles$
|
|
1707
|
+
const styles$R = {
|
|
1708
1708
|
checkbox,
|
|
1709
1709
|
noLabel,
|
|
1710
|
-
small: small$
|
|
1710
|
+
small: small$d,
|
|
1711
1711
|
checkmark,
|
|
1712
|
-
disabled: disabled$
|
|
1712
|
+
disabled: disabled$a,
|
|
1713
1713
|
noMargin: noMargin$2,
|
|
1714
|
-
isInTable: isInTable$
|
|
1714
|
+
isInTable: isInTable$4,
|
|
1715
1715
|
helpIconEnabled: helpIconEnabled$2
|
|
1716
1716
|
};
|
|
1717
1717
|
var MapShim = function() {
|
|
@@ -2173,7 +2173,7 @@ var ResizeObserverSPI = (
|
|
|
2173
2173
|
}()
|
|
2174
2174
|
);
|
|
2175
2175
|
var observers$1 = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
|
|
2176
|
-
var ResizeObserver$
|
|
2176
|
+
var ResizeObserver$2 = (
|
|
2177
2177
|
/** @class */
|
|
2178
2178
|
/* @__PURE__ */ function() {
|
|
2179
2179
|
function ResizeObserver2(callback) {
|
|
@@ -2195,7 +2195,7 @@ var ResizeObserver$1 = (
|
|
|
2195
2195
|
"unobserve",
|
|
2196
2196
|
"disconnect"
|
|
2197
2197
|
].forEach(function(method) {
|
|
2198
|
-
ResizeObserver$
|
|
2198
|
+
ResizeObserver$2.prototype[method] = function() {
|
|
2199
2199
|
var _a2;
|
|
2200
2200
|
return (_a2 = observers$1.get(this))[method].apply(_a2, arguments);
|
|
2201
2201
|
};
|
|
@@ -2204,15 +2204,15 @@ var index = function() {
|
|
|
2204
2204
|
if (typeof global$1$1.ResizeObserver !== "undefined") {
|
|
2205
2205
|
return global$1$1.ResizeObserver;
|
|
2206
2206
|
}
|
|
2207
|
-
return ResizeObserver$
|
|
2207
|
+
return ResizeObserver$2;
|
|
2208
2208
|
}();
|
|
2209
2209
|
var isProduction$3 = process.env.NODE_ENV === "production";
|
|
2210
|
-
function warning$7(condition,
|
|
2210
|
+
function warning$7(condition, message2) {
|
|
2211
2211
|
if (!isProduction$3) {
|
|
2212
2212
|
if (condition) {
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
2215
|
-
var text2 = "Warning: " +
|
|
2215
|
+
var text2 = "Warning: " + message2;
|
|
2216
2216
|
if (typeof console !== "undefined") {
|
|
2217
2217
|
console.warn(text2);
|
|
2218
2218
|
}
|
|
@@ -2659,7 +2659,7 @@ function getShouldCloseAccordingToChildren(registrations, event) {
|
|
|
2659
2659
|
return true;
|
|
2660
2660
|
}
|
|
2661
2661
|
function useGroup(_ref2) {
|
|
2662
|
-
var
|
|
2662
|
+
var isOpen2 = _ref2.isOpen, onOutsideClick = _ref2.onOutsideClick, onParentClose = _ref2.onParentClose;
|
|
2663
2663
|
var trigger2 = useRef(null);
|
|
2664
2664
|
var layer2 = useRef(null);
|
|
2665
2665
|
var registrations = useRef(/* @__PURE__ */ new Set());
|
|
@@ -2693,7 +2693,7 @@ function useGroup(_ref2) {
|
|
|
2693
2693
|
}, [possibleRegisterFn, shouldCloseWhenClickedOutside, onParentClose, registrations]);
|
|
2694
2694
|
useEffect(function() {
|
|
2695
2695
|
var isChild = typeof possibleRegisterFn === "function";
|
|
2696
|
-
var shouldNotListen = !
|
|
2696
|
+
var shouldNotListen = !isOpen2 || !onOutsideClick || isChild;
|
|
2697
2697
|
if (shouldNotListen) {
|
|
2698
2698
|
return;
|
|
2699
2699
|
}
|
|
@@ -2706,15 +2706,15 @@ function useGroup(_ref2) {
|
|
|
2706
2706
|
return function() {
|
|
2707
2707
|
return document.removeEventListener("click", handleClick2, true);
|
|
2708
2708
|
};
|
|
2709
|
-
}, [
|
|
2709
|
+
}, [isOpen2, onOutsideClick, shouldCloseWhenClickedOutside, possibleRegisterFn]);
|
|
2710
2710
|
useEffect(function() {
|
|
2711
|
-
if (!
|
|
2711
|
+
if (!isOpen2) {
|
|
2712
2712
|
registrations.current.forEach(function(_ref4) {
|
|
2713
2713
|
var closeChild = _ref4.closeChild;
|
|
2714
2714
|
return closeChild();
|
|
2715
2715
|
});
|
|
2716
2716
|
}
|
|
2717
|
-
}, [
|
|
2717
|
+
}, [isOpen2]);
|
|
2718
2718
|
return {
|
|
2719
2719
|
closeOnOutsideClickRefs: {
|
|
2720
2720
|
trigger: trigger2,
|
|
@@ -3413,7 +3413,7 @@ var DEFAULT_OPTIONS$1 = {
|
|
|
3413
3413
|
};
|
|
3414
3414
|
function useLayer(_ref) {
|
|
3415
3415
|
var _triggerBoundsRef$cur;
|
|
3416
|
-
var _ref$isOpen = _ref.isOpen,
|
|
3416
|
+
var _ref$isOpen = _ref.isOpen, isOpen2 = _ref$isOpen === void 0 ? false : _ref$isOpen, _ref$overflowContaine = _ref.overflowContainer, overflowContainer = _ref$overflowContaine === void 0 ? DEFAULT_OPTIONS$1.overflowContainer : _ref$overflowContaine, _ref$environment = _ref.environment, environment2 = _ref$environment === void 0 ? typeof window !== "undefined" ? window : void 0 : _ref$environment, ResizeObserverPolyfill = _ref.ResizeObserver, _ref$placement = _ref.placement, placement = _ref$placement === void 0 ? DEFAULT_OPTIONS$1.placement : _ref$placement, _ref$possiblePlacemen = _ref.possiblePlacements, possiblePlacements = _ref$possiblePlacemen === void 0 ? DEFAULT_OPTIONS$1.possiblePlacements : _ref$possiblePlacemen, _ref$preferX = _ref.preferX, preferX = _ref$preferX === void 0 ? DEFAULT_OPTIONS$1.preferX : _ref$preferX, _ref$preferY = _ref.preferY, preferY = _ref$preferY === void 0 ? DEFAULT_OPTIONS$1.preferY : _ref$preferY, _ref$auto = _ref.auto, auto2 = _ref$auto === void 0 ? DEFAULT_OPTIONS$1.auto : _ref$auto, _ref$snap = _ref.snap, snap = _ref$snap === void 0 ? DEFAULT_OPTIONS$1.snap : _ref$snap, _ref$triggerOffset = _ref.triggerOffset, triggerOffset = _ref$triggerOffset === void 0 ? DEFAULT_OPTIONS$1.triggerOffset : _ref$triggerOffset, _ref$containerOffset = _ref.containerOffset, containerOffset = _ref$containerOffset === void 0 ? DEFAULT_OPTIONS$1.containerOffset : _ref$containerOffset, _ref$arrowOffset = _ref.arrowOffset, arrowOffset = _ref$arrowOffset === void 0 ? DEFAULT_OPTIONS$1.arrowOffset : _ref$arrowOffset, _ref$container = _ref.container, container2 = _ref$container === void 0 ? DEFAULT_OPTIONS$1.container : _ref$container, _ref$layerDimensions = _ref.layerDimensions, layerDimensions = _ref$layerDimensions === void 0 ? null : _ref$layerDimensions, onDisappear = _ref.onDisappear, onOutsideClick = _ref.onOutsideClick, onParentClose = _ref.onParentClose, triggerOption = _ref.trigger;
|
|
3417
3417
|
var _useState = useState(function() {
|
|
3418
3418
|
return {
|
|
3419
3419
|
layerSide: placement === "center" ? "center" : Placements.getSidesFromPlacementType(placement)[0].prop,
|
|
@@ -3432,7 +3432,7 @@ function useLayer(_ref) {
|
|
|
3432
3432
|
};
|
|
3433
3433
|
}), state = _useState[0], setState = _useState[1];
|
|
3434
3434
|
var triggerBoundsRef = useRef(null);
|
|
3435
|
-
var lastState = useLastState(state,
|
|
3435
|
+
var lastState = useLastState(state, isOpen2);
|
|
3436
3436
|
var repositioningToken = useRef({
|
|
3437
3437
|
cancelled: false
|
|
3438
3438
|
});
|
|
@@ -3483,13 +3483,13 @@ function useLayer(_ref) {
|
|
|
3483
3483
|
var _useTrackElements = useTrackElements({
|
|
3484
3484
|
ResizeObserverPolyfill,
|
|
3485
3485
|
environment: environment2,
|
|
3486
|
-
enabled:
|
|
3486
|
+
enabled: isOpen2,
|
|
3487
3487
|
overflowContainer,
|
|
3488
3488
|
onChange: handlePositioning,
|
|
3489
3489
|
triggerOption
|
|
3490
3490
|
}), triggerRef = _useTrackElements.triggerRef, layerRef = _useTrackElements.layerRef, arrowRef = _useTrackElements.arrowRef, closestScrollContainer = _useTrackElements.closestScrollContainer;
|
|
3491
3491
|
var _useGroup = useGroup({
|
|
3492
|
-
isOpen,
|
|
3492
|
+
isOpen: isOpen2,
|
|
3493
3493
|
onOutsideClick,
|
|
3494
3494
|
onParentClose
|
|
3495
3495
|
}), closeOnOutsideClickRefs = _useGroup.closeOnOutsideClickRefs, registrations = _useGroup.registrations;
|
|
@@ -3507,7 +3507,7 @@ function useLayer(_ref) {
|
|
|
3507
3507
|
layerSide: state.layerSide
|
|
3508
3508
|
},
|
|
3509
3509
|
layerSide: state.layerSide,
|
|
3510
|
-
triggerBounds:
|
|
3510
|
+
triggerBounds: isOpen2 ? triggerOption ? triggerOption.getBounds() : (_triggerBoundsRef$cur = triggerBoundsRef.current) == null ? void 0 : _triggerBoundsRef$cur.getBoundingClientRect() : null,
|
|
3511
3511
|
renderLayer: function renderLayer(children) {
|
|
3512
3512
|
return typeof document !== "undefined" ? createPortal(createElement(GroupProvider, {
|
|
3513
3513
|
registrations,
|
|
@@ -3711,7 +3711,7 @@ function useHover(_temp) {
|
|
|
3711
3711
|
const tooltip = "_tooltip_wli9z_1";
|
|
3712
3712
|
const error$3 = "_error_wli9z_15";
|
|
3713
3713
|
const warning$6 = "_warning_wli9z_19";
|
|
3714
|
-
const styles$
|
|
3714
|
+
const styles$Q = {
|
|
3715
3715
|
tooltip,
|
|
3716
3716
|
error: error$3,
|
|
3717
3717
|
warning: warning$6
|
|
@@ -3742,8 +3742,8 @@ const TooltipLayer = ({
|
|
|
3742
3742
|
"div",
|
|
3743
3743
|
{
|
|
3744
3744
|
className: cx$2(
|
|
3745
|
-
styles$
|
|
3746
|
-
error2 ? styles$
|
|
3745
|
+
styles$Q.tooltip,
|
|
3746
|
+
error2 ? styles$Q.error : warning2 ? styles$Q.warning : ""
|
|
3747
3747
|
),
|
|
3748
3748
|
...layerProps,
|
|
3749
3749
|
children: [
|
|
@@ -3779,9 +3779,9 @@ const Tooltip = ({
|
|
|
3779
3779
|
delayEnter: 100,
|
|
3780
3780
|
delayLeave: 0
|
|
3781
3781
|
});
|
|
3782
|
-
const
|
|
3782
|
+
const isOpen2 = !visible ? false : forceOpen ? true : isOver;
|
|
3783
3783
|
const { renderLayer, triggerProps, layerProps, arrowProps } = useLayer({
|
|
3784
|
-
isOpen,
|
|
3784
|
+
isOpen: isOpen2,
|
|
3785
3785
|
overflowContainer: true,
|
|
3786
3786
|
ResizeObserver: index,
|
|
3787
3787
|
auto: true,
|
|
@@ -3791,7 +3791,7 @@ const Tooltip = ({
|
|
|
3791
3791
|
onParentClose: forceClose
|
|
3792
3792
|
});
|
|
3793
3793
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3794
|
-
|
|
3794
|
+
isOpen2 && renderLayer(
|
|
3795
3795
|
/* @__PURE__ */ jsx(
|
|
3796
3796
|
TooltipLayer,
|
|
3797
3797
|
{
|
|
@@ -3812,7 +3812,7 @@ const Tooltip = ({
|
|
|
3812
3812
|
const helpIcon = "_helpIcon_hd0z2_1";
|
|
3813
3813
|
const active$9 = "_active_hd0z2_9";
|
|
3814
3814
|
const clickable = "_clickable_hd0z2_12";
|
|
3815
|
-
const styles$
|
|
3815
|
+
const styles$P = {
|
|
3816
3816
|
helpIcon,
|
|
3817
3817
|
active: active$9,
|
|
3818
3818
|
clickable
|
|
@@ -3843,9 +3843,9 @@ const HelpIcon = ({
|
|
|
3843
3843
|
"div",
|
|
3844
3844
|
{
|
|
3845
3845
|
className: cx$2(
|
|
3846
|
-
styles$
|
|
3847
|
-
onClick ? styles$
|
|
3848
|
-
active2 ? styles$
|
|
3846
|
+
styles$P.helpIcon,
|
|
3847
|
+
onClick ? styles$P.clickable : "",
|
|
3848
|
+
active2 ? styles$P.active : ""
|
|
3849
3849
|
),
|
|
3850
3850
|
onClick: onClickHelpIcon,
|
|
3851
3851
|
"data-testid": testId,
|
|
@@ -3876,12 +3876,12 @@ const CheckBox = ({
|
|
|
3876
3876
|
"div",
|
|
3877
3877
|
{
|
|
3878
3878
|
className: cx$2(
|
|
3879
|
-
styles$
|
|
3880
|
-
noMargin2 && styles$
|
|
3881
|
-
isInTable2 && styles$
|
|
3882
|
-
isDisabled && styles$
|
|
3883
|
-
small2 && styles$
|
|
3884
|
-
!label2 && styles$
|
|
3879
|
+
styles$R.checkbox,
|
|
3880
|
+
noMargin2 && styles$R.noMargin,
|
|
3881
|
+
isInTable2 && styles$R.isInTable,
|
|
3882
|
+
isDisabled && styles$R.disabled,
|
|
3883
|
+
small2 && styles$R.small,
|
|
3884
|
+
!label2 && styles$R.noLabel
|
|
3885
3885
|
),
|
|
3886
3886
|
"data-ix": dataix,
|
|
3887
3887
|
onClick: (evt) => {
|
|
@@ -3913,10 +3913,10 @@ const CheckBox = ({
|
|
|
3913
3913
|
}
|
|
3914
3914
|
),
|
|
3915
3915
|
/* @__PURE__ */ jsxs("label", { htmlFor: name2, children: [
|
|
3916
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
3916
|
+
/* @__PURE__ */ jsx("span", { className: styles$R.checkmark, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHECK }) }),
|
|
3917
3917
|
label2
|
|
3918
3918
|
] }),
|
|
3919
|
-
showHelp && /* @__PURE__ */ jsx("div", { className: styles$
|
|
3919
|
+
showHelp && /* @__PURE__ */ jsx("div", { className: styles$R.helpIconEnabled, onClick: onClickHelp, children: /* @__PURE__ */ jsx(HelpIcon, { text: helpText }) })
|
|
3920
3920
|
]
|
|
3921
3921
|
}
|
|
3922
3922
|
);
|
|
@@ -3925,7 +3925,7 @@ const bordered$3 = "_bordered_1cgsf_1";
|
|
|
3925
3925
|
const checkboxWrapper = "_checkboxWrapper_1cgsf_7";
|
|
3926
3926
|
const padding$2 = "_padding_1cgsf_13";
|
|
3927
3927
|
const contentWrapper = "_contentWrapper_1cgsf_16";
|
|
3928
|
-
const styles$
|
|
3928
|
+
const styles$O = {
|
|
3929
3929
|
bordered: bordered$3,
|
|
3930
3930
|
checkboxWrapper,
|
|
3931
3931
|
padding: padding$2,
|
|
@@ -3967,7 +3967,7 @@ const AccordionWithDefaultToggle = ({
|
|
|
3967
3967
|
defaultEnabled
|
|
3968
3968
|
});
|
|
3969
3969
|
const content2 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3970
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
3970
|
+
/* @__PURE__ */ jsx("div", { className: styles$O.checkboxWrapper, children: /* @__PURE__ */ jsx(
|
|
3971
3971
|
CheckBox,
|
|
3972
3972
|
{
|
|
3973
3973
|
label: toggleLabel,
|
|
@@ -3978,7 +3978,7 @@ const AccordionWithDefaultToggle = ({
|
|
|
3978
3978
|
checked: state.defaultEnabled
|
|
3979
3979
|
}
|
|
3980
3980
|
) }),
|
|
3981
|
-
state.accordionExpanded && /* @__PURE__ */ jsx("div", { className: styles$
|
|
3981
|
+
state.accordionExpanded && /* @__PURE__ */ jsx("div", { className: styles$O.contentWrapper, children })
|
|
3982
3982
|
] });
|
|
3983
3983
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3984
3984
|
/* @__PURE__ */ jsx(
|
|
@@ -3991,61 +3991,61 @@ const AccordionWithDefaultToggle = ({
|
|
|
3991
3991
|
onClick: () => dispatch({ type: AccordionActionType.TOGGLE_ACCORDION })
|
|
3992
3992
|
}
|
|
3993
3993
|
),
|
|
3994
|
-
/* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
3994
|
+
/* @__PURE__ */ jsx("div", { className: cx$2(styles$O.bordered, padding2 ? styles$O.padding : ""), children: content2 })
|
|
3995
3995
|
] });
|
|
3996
3996
|
};
|
|
3997
|
-
const inputInTable$
|
|
3998
|
-
const inputHover$
|
|
3999
|
-
const inputFocus$
|
|
4000
|
-
const inputError$
|
|
4001
|
-
const inputWarning$
|
|
4002
|
-
const inputDisabled$
|
|
4003
|
-
const hideScrollbars$
|
|
3997
|
+
const inputInTable$b = "_inputInTable_1m45a_1";
|
|
3998
|
+
const inputHover$b = "_inputHover_1m45a_13";
|
|
3999
|
+
const inputFocus$b = "_inputFocus_1m45a_18";
|
|
4000
|
+
const inputError$b = "_inputError_1m45a_25";
|
|
4001
|
+
const inputWarning$b = "_inputWarning_1m45a_26";
|
|
4002
|
+
const inputDisabled$b = "_inputDisabled_1m45a_61";
|
|
4003
|
+
const hideScrollbars$b = "_hideScrollbars_1m45a_67";
|
|
4004
4004
|
const button$3 = "_button_1m45a_100";
|
|
4005
4005
|
const active$8 = "_active_1m45a_135";
|
|
4006
4006
|
const green$1 = "_green_1m45a_135";
|
|
4007
4007
|
const red$1 = "_red_1m45a_135";
|
|
4008
4008
|
const orange$1 = "_orange_1m45a_135";
|
|
4009
|
-
const icon$
|
|
4009
|
+
const icon$5 = "_icon_1m45a_147";
|
|
4010
4010
|
const iconOnly = "_iconOnly_1m45a_153";
|
|
4011
4011
|
const basic = "_basic_1m45a_163";
|
|
4012
4012
|
const muted$2 = "_muted_1m45a_169";
|
|
4013
|
-
const disabled$
|
|
4014
|
-
const small$
|
|
4013
|
+
const disabled$9 = "_disabled_1m45a_188";
|
|
4014
|
+
const small$c = "_small_1m45a_198";
|
|
4015
4015
|
const pill = "_pill_1m45a_203";
|
|
4016
4016
|
const round = "_round_1m45a_204";
|
|
4017
4017
|
const inverted$1 = "_inverted_1m45a_310";
|
|
4018
|
-
const groupOrderFirst$
|
|
4019
|
-
const groupOrderMiddle$
|
|
4020
|
-
const groupOrderLast$
|
|
4018
|
+
const groupOrderFirst$4 = "_groupOrderFirst_1m45a_340";
|
|
4019
|
+
const groupOrderMiddle$4 = "_groupOrderMiddle_1m45a_341";
|
|
4020
|
+
const groupOrderLast$4 = "_groupOrderLast_1m45a_342";
|
|
4021
4021
|
const buttonStyles = {
|
|
4022
|
-
inputInTable: inputInTable$
|
|
4023
|
-
inputHover: inputHover$
|
|
4024
|
-
inputFocus: inputFocus$
|
|
4025
|
-
inputError: inputError$
|
|
4026
|
-
inputWarning: inputWarning$
|
|
4027
|
-
inputDisabled: inputDisabled$
|
|
4028
|
-
hideScrollbars: hideScrollbars$
|
|
4022
|
+
inputInTable: inputInTable$b,
|
|
4023
|
+
inputHover: inputHover$b,
|
|
4024
|
+
inputFocus: inputFocus$b,
|
|
4025
|
+
inputError: inputError$b,
|
|
4026
|
+
inputWarning: inputWarning$b,
|
|
4027
|
+
inputDisabled: inputDisabled$b,
|
|
4028
|
+
hideScrollbars: hideScrollbars$b,
|
|
4029
4029
|
button: button$3,
|
|
4030
4030
|
active: active$8,
|
|
4031
4031
|
green: green$1,
|
|
4032
4032
|
red: red$1,
|
|
4033
4033
|
orange: orange$1,
|
|
4034
|
-
icon: icon$
|
|
4034
|
+
icon: icon$5,
|
|
4035
4035
|
iconOnly,
|
|
4036
4036
|
basic,
|
|
4037
4037
|
muted: muted$2,
|
|
4038
|
-
disabled: disabled$
|
|
4039
|
-
small: small$
|
|
4038
|
+
disabled: disabled$9,
|
|
4039
|
+
small: small$c,
|
|
4040
4040
|
pill,
|
|
4041
4041
|
round,
|
|
4042
4042
|
inverted: inverted$1,
|
|
4043
|
-
groupOrderFirst: groupOrderFirst$
|
|
4044
|
-
groupOrderMiddle: groupOrderMiddle$
|
|
4045
|
-
groupOrderLast: groupOrderLast$
|
|
4043
|
+
groupOrderFirst: groupOrderFirst$4,
|
|
4044
|
+
groupOrderMiddle: groupOrderMiddle$4,
|
|
4045
|
+
groupOrderLast: groupOrderLast$4
|
|
4046
4046
|
};
|
|
4047
4047
|
const spinner = "_spinner_156m4_1";
|
|
4048
|
-
const styles$
|
|
4048
|
+
const styles$N = {
|
|
4049
4049
|
spinner
|
|
4050
4050
|
};
|
|
4051
4051
|
const Spinner$1 = ({
|
|
@@ -4056,7 +4056,7 @@ const Spinner$1 = ({
|
|
|
4056
4056
|
}) => {
|
|
4057
4057
|
const color2 = colored2 ? "var(--color-text-primary)" : dark2 ? "var(--color-text-muted)" : "white";
|
|
4058
4058
|
const fontSize = small2 ? "var(--font-size)" : tiny ? "var(--font-size-xs)" : "var(--size)";
|
|
4059
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
4059
|
+
return /* @__PURE__ */ jsx("div", { className: styles$N.spinner, style: { color: color2, fontSize } });
|
|
4060
4060
|
};
|
|
4061
4061
|
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
4062
4062
|
ButtonType2["SUBMIT"] = "submit";
|
|
@@ -4180,84 +4180,84 @@ const actions$2 = "_actions_1t7vd_1";
|
|
|
4180
4180
|
const childComponent = "_childComponent_1t7vd_11";
|
|
4181
4181
|
const actionComponentContainer = "_actionComponentContainer_1t7vd_14";
|
|
4182
4182
|
const active$7 = "_active_1t7vd_36";
|
|
4183
|
-
const styles$
|
|
4183
|
+
const styles$M = {
|
|
4184
4184
|
actions: actions$2,
|
|
4185
4185
|
childComponent,
|
|
4186
4186
|
actionComponentContainer,
|
|
4187
4187
|
active: active$7
|
|
4188
4188
|
};
|
|
4189
4189
|
const wrapper$4 = "_wrapper_8cxhw_1";
|
|
4190
|
-
const layer = "_layer_8cxhw_5";
|
|
4191
|
-
const layerContainer = "_layerContainer_8cxhw_8";
|
|
4190
|
+
const layer$1 = "_layer_8cxhw_5";
|
|
4191
|
+
const layerContainer$1 = "_layerContainer_8cxhw_8";
|
|
4192
4192
|
const nested = "_nested_8cxhw_24";
|
|
4193
4193
|
const fileInput$1 = "_fileInput_8cxhw_36";
|
|
4194
|
-
const trigger$
|
|
4194
|
+
const trigger$2 = "_trigger_8cxhw_41";
|
|
4195
4195
|
const middleAlignedInline = "_middleAlignedInline_8cxhw_50";
|
|
4196
|
-
const heading$
|
|
4196
|
+
const heading$5 = "_heading_8cxhw_56";
|
|
4197
4197
|
const headingIcon = "_headingIcon_8cxhw_62";
|
|
4198
|
-
const option = "_option_8cxhw_74";
|
|
4198
|
+
const option$1 = "_option_8cxhw_74";
|
|
4199
4199
|
const active$6 = "_active_8cxhw_93";
|
|
4200
|
-
const selected = "_selected_8cxhw_98";
|
|
4201
|
-
const optionContent = "_optionContent_8cxhw_105";
|
|
4200
|
+
const selected$1 = "_selected_8cxhw_98";
|
|
4201
|
+
const optionContent$1 = "_optionContent_8cxhw_105";
|
|
4202
4202
|
const inline$4 = "_inline_8cxhw_109";
|
|
4203
|
-
const icon$
|
|
4204
|
-
const check = "_check_8cxhw_115";
|
|
4203
|
+
const icon$4 = "_icon_8cxhw_114";
|
|
4204
|
+
const check$1 = "_check_8cxhw_115";
|
|
4205
4205
|
const text$3 = "_text_8cxhw_141";
|
|
4206
|
-
const label$
|
|
4206
|
+
const label$a = "_label_8cxhw_146";
|
|
4207
4207
|
const description = "_description_8cxhw_157";
|
|
4208
4208
|
const arrow$1 = "_arrow_8cxhw_161";
|
|
4209
4209
|
const divider$1 = "_divider_8cxhw_165";
|
|
4210
4210
|
const deprecatedSemanticIcon = "_deprecatedSemanticIcon_8cxhw_169";
|
|
4211
|
-
const disabled$
|
|
4211
|
+
const disabled$8 = "_disabled_8cxhw_173";
|
|
4212
4212
|
const buttonLabel = "_buttonLabel_8cxhw_178";
|
|
4213
4213
|
const buttonCaret = "_buttonCaret_8cxhw_184";
|
|
4214
4214
|
const component = "_component_8cxhw_188";
|
|
4215
|
-
const right$
|
|
4215
|
+
const right$7 = "_right_8cxhw_194";
|
|
4216
4216
|
const actions$1 = "_actions_8cxhw_199";
|
|
4217
|
-
const styles$
|
|
4217
|
+
const styles$L = {
|
|
4218
4218
|
wrapper: wrapper$4,
|
|
4219
|
-
layer,
|
|
4220
|
-
layerContainer,
|
|
4219
|
+
layer: layer$1,
|
|
4220
|
+
layerContainer: layerContainer$1,
|
|
4221
4221
|
nested,
|
|
4222
4222
|
fileInput: fileInput$1,
|
|
4223
|
-
trigger: trigger$
|
|
4223
|
+
trigger: trigger$2,
|
|
4224
4224
|
middleAlignedInline,
|
|
4225
|
-
heading: heading$
|
|
4225
|
+
heading: heading$5,
|
|
4226
4226
|
headingIcon,
|
|
4227
|
-
option,
|
|
4227
|
+
option: option$1,
|
|
4228
4228
|
active: active$6,
|
|
4229
|
-
selected,
|
|
4230
|
-
optionContent,
|
|
4229
|
+
selected: selected$1,
|
|
4230
|
+
optionContent: optionContent$1,
|
|
4231
4231
|
inline: inline$4,
|
|
4232
|
-
icon: icon$
|
|
4233
|
-
check,
|
|
4232
|
+
icon: icon$4,
|
|
4233
|
+
check: check$1,
|
|
4234
4234
|
text: text$3,
|
|
4235
|
-
label: label$
|
|
4235
|
+
label: label$a,
|
|
4236
4236
|
description,
|
|
4237
4237
|
arrow: arrow$1,
|
|
4238
4238
|
divider: divider$1,
|
|
4239
4239
|
deprecatedSemanticIcon,
|
|
4240
|
-
disabled: disabled$
|
|
4240
|
+
disabled: disabled$8,
|
|
4241
4241
|
buttonLabel,
|
|
4242
4242
|
buttonCaret,
|
|
4243
4243
|
component,
|
|
4244
|
-
right: right$
|
|
4244
|
+
right: right$7,
|
|
4245
4245
|
actions: actions$1
|
|
4246
4246
|
};
|
|
4247
|
-
const Heading$
|
|
4247
|
+
const Heading$3 = ({ label: label2, onClick, icon: icon2, testId }) => /* @__PURE__ */ jsxs(
|
|
4248
4248
|
"div",
|
|
4249
4249
|
{
|
|
4250
4250
|
onClick: (evt) => evt.stopPropagation(),
|
|
4251
|
-
className: styles$
|
|
4251
|
+
className: styles$L.heading,
|
|
4252
4252
|
"data-testid": testId,
|
|
4253
4253
|
children: [
|
|
4254
4254
|
label2,
|
|
4255
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4255
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.headingIcon, onClick, children: icon2 })
|
|
4256
4256
|
]
|
|
4257
4257
|
}
|
|
4258
4258
|
);
|
|
4259
|
-
const Divider$1 = () => /* @__PURE__ */ jsx("hr", { className: styles$
|
|
4260
|
-
const Option$
|
|
4259
|
+
const Divider$1 = () => /* @__PURE__ */ jsx("hr", { className: styles$L.divider });
|
|
4260
|
+
const Option$2 = ({
|
|
4261
4261
|
actions: actions2,
|
|
4262
4262
|
label: label2,
|
|
4263
4263
|
url,
|
|
@@ -4309,30 +4309,30 @@ const Option$1 = ({
|
|
|
4309
4309
|
href: url,
|
|
4310
4310
|
to: url,
|
|
4311
4311
|
className: cx$2(
|
|
4312
|
-
styles$
|
|
4313
|
-
disabled2 ? styles$
|
|
4314
|
-
inline2 ? styles$
|
|
4315
|
-
selected2 ? styles$
|
|
4312
|
+
styles$L.option,
|
|
4313
|
+
disabled2 ? styles$L.disabled : "",
|
|
4314
|
+
inline2 ? styles$L.inline : "",
|
|
4315
|
+
selected2 ? styles$L.selected : ""
|
|
4316
4316
|
),
|
|
4317
4317
|
onClick: handleClick2,
|
|
4318
4318
|
"data-testid": testId,
|
|
4319
4319
|
children: [
|
|
4320
|
-
icon2 ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
4321
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
4320
|
+
icon2 ? /* @__PURE__ */ jsx("span", { className: styles$L.icon, children: /* @__PURE__ */ jsx(Icon, { icon: icon2 }) }) : null,
|
|
4321
|
+
/* @__PURE__ */ jsxs("div", { className: styles$L.optionContent, children: [
|
|
4322
4322
|
upload && /* @__PURE__ */ jsx(
|
|
4323
4323
|
"input",
|
|
4324
4324
|
{
|
|
4325
4325
|
type: "file",
|
|
4326
|
-
className: styles$
|
|
4326
|
+
className: styles$L.fileInput,
|
|
4327
4327
|
onChange: handleFileChange
|
|
4328
4328
|
}
|
|
4329
4329
|
),
|
|
4330
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4331
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4330
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.label, title: `${title2 || label2}`, children: label2 }),
|
|
4331
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.description, children: description2 })
|
|
4332
4332
|
] }),
|
|
4333
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
4334
|
-
selected2 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
4335
|
-
!!(actions2 == null ? void 0 : actions2.length) && /* @__PURE__ */ jsx("div", { className: styles$
|
|
4333
|
+
/* @__PURE__ */ jsxs("div", { className: styles$L.right, children: [
|
|
4334
|
+
selected2 && /* @__PURE__ */ jsx("span", { className: styles$L.check, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHECK }) }),
|
|
4335
|
+
!!(actions2 == null ? void 0 : actions2.length) && /* @__PURE__ */ jsx("div", { className: styles$L.actions, children: /* @__PURE__ */ jsx(Actions, { actions: actions2 }) })
|
|
4336
4336
|
] })
|
|
4337
4337
|
]
|
|
4338
4338
|
}
|
|
@@ -4351,7 +4351,7 @@ var MenuCarat = /* @__PURE__ */ ((MenuCarat2) => {
|
|
|
4351
4351
|
MenuCarat2["DOWN"] = "down";
|
|
4352
4352
|
return MenuCarat2;
|
|
4353
4353
|
})(MenuCarat || {});
|
|
4354
|
-
const Section = ({
|
|
4354
|
+
const Section$1 = ({
|
|
4355
4355
|
section: section2,
|
|
4356
4356
|
closeOnOptionClick,
|
|
4357
4357
|
close: close2,
|
|
@@ -4364,7 +4364,7 @@ const Section = ({
|
|
|
4364
4364
|
switch (section2.type) {
|
|
4365
4365
|
case MenuType.HEADING:
|
|
4366
4366
|
return /* @__PURE__ */ jsx(
|
|
4367
|
-
Heading$
|
|
4367
|
+
Heading$3,
|
|
4368
4368
|
{
|
|
4369
4369
|
label: (section2 == null ? void 0 : section2.label) ?? "",
|
|
4370
4370
|
onClick: section2.onClick,
|
|
@@ -4376,7 +4376,7 @@ const Section = ({
|
|
|
4376
4376
|
return /* @__PURE__ */ jsx(Divider$1, {});
|
|
4377
4377
|
case MenuType.OPTION:
|
|
4378
4378
|
return /* @__PURE__ */ jsx(
|
|
4379
|
-
Option$
|
|
4379
|
+
Option$2,
|
|
4380
4380
|
{
|
|
4381
4381
|
actions: section2.actions,
|
|
4382
4382
|
label: (section2 == null ? void 0 : section2.label) ?? "",
|
|
@@ -4424,7 +4424,7 @@ const childPath = (path, sectionIndex) => `${path}.sections[${sectionIndex}]`.re
|
|
|
4424
4424
|
const closePath = (path) => `${path}.close`.replace(/^\./, "");
|
|
4425
4425
|
const siblings = (tree2, path) => get$2(tree2, parentPath(path), []);
|
|
4426
4426
|
const registerClose = (tree2, path, close2) => set(tree2, closePath(path), close2);
|
|
4427
|
-
const Layer$
|
|
4427
|
+
const Layer$2 = ({
|
|
4428
4428
|
sections,
|
|
4429
4429
|
isNested,
|
|
4430
4430
|
width: width2,
|
|
@@ -4470,11 +4470,11 @@ const Layer$1 = ({
|
|
|
4470
4470
|
return /* @__PURE__ */ jsx(
|
|
4471
4471
|
"div",
|
|
4472
4472
|
{
|
|
4473
|
-
className: cx$2(styles$
|
|
4473
|
+
className: cx$2(styles$L.layer, isNested ? styles$L.nested : null),
|
|
4474
4474
|
style: { maxWidth: width2, maxHeight },
|
|
4475
4475
|
"data-testid": testId,
|
|
4476
4476
|
children: /* @__PURE__ */ jsx("ul", { children: localSections.map((section2, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
4477
|
-
Section,
|
|
4477
|
+
Section$1,
|
|
4478
4478
|
{
|
|
4479
4479
|
section: section2,
|
|
4480
4480
|
closeOnOptionClick: section2.closeOnOptionClick,
|
|
@@ -4487,7 +4487,7 @@ const Layer$1 = ({
|
|
|
4487
4487
|
}
|
|
4488
4488
|
);
|
|
4489
4489
|
};
|
|
4490
|
-
const placementOptions = (placement, isNested = false) => ({
|
|
4490
|
+
const placementOptions$1 = (placement, isNested = false) => ({
|
|
4491
4491
|
auto: true,
|
|
4492
4492
|
preferX: "right",
|
|
4493
4493
|
preferY: "bottom",
|
|
@@ -4501,19 +4501,19 @@ const getType = (item2) => {
|
|
|
4501
4501
|
};
|
|
4502
4502
|
const wrapper$3 = "_wrapper_nwprz_1";
|
|
4503
4503
|
const badge = "_badge_nwprz_5";
|
|
4504
|
-
const label$
|
|
4504
|
+
const label$9 = "_label_nwprz_11";
|
|
4505
4505
|
const dark = "_dark_nwprz_23";
|
|
4506
4506
|
const light = "_light_nwprz_26";
|
|
4507
|
-
const small$
|
|
4507
|
+
const small$b = "_small_nwprz_29";
|
|
4508
4508
|
const dot$1 = "_dot_nwprz_33";
|
|
4509
4509
|
const hasChildren = "_hasChildren_nwprz_39";
|
|
4510
|
-
const styles$
|
|
4510
|
+
const styles$K = {
|
|
4511
4511
|
wrapper: wrapper$3,
|
|
4512
4512
|
badge,
|
|
4513
|
-
label: label$
|
|
4513
|
+
label: label$9,
|
|
4514
4514
|
dark,
|
|
4515
4515
|
light,
|
|
4516
|
-
small: small$
|
|
4516
|
+
small: small$b,
|
|
4517
4517
|
dot: dot$1,
|
|
4518
4518
|
hasChildren
|
|
4519
4519
|
};
|
|
@@ -4535,16 +4535,16 @@ const Badge = ({
|
|
|
4535
4535
|
small: small2 = false
|
|
4536
4536
|
}) => {
|
|
4537
4537
|
const visible = !(title2 === null && dot2 === false);
|
|
4538
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
4538
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$K.wrapper, children: [
|
|
4539
4539
|
visible && /* @__PURE__ */ jsx(
|
|
4540
4540
|
"sup",
|
|
4541
4541
|
{
|
|
4542
4542
|
className: cx$2(
|
|
4543
|
-
styles$
|
|
4544
|
-
isDark(color2) ? styles$
|
|
4545
|
-
title2 !== null ? styles$
|
|
4546
|
-
small2 ? styles$
|
|
4547
|
-
children ? styles$
|
|
4543
|
+
styles$K.badge,
|
|
4544
|
+
isDark(color2) ? styles$K.dark : styles$K.light,
|
|
4545
|
+
title2 !== null ? styles$K.label : styles$K.dot,
|
|
4546
|
+
small2 ? styles$K.small : "",
|
|
4547
|
+
children ? styles$K.hasChildren : ""
|
|
4548
4548
|
),
|
|
4549
4549
|
style: {
|
|
4550
4550
|
background: color2 || void 0,
|
|
@@ -4570,16 +4570,16 @@ const Button = ({
|
|
|
4570
4570
|
active: active2
|
|
4571
4571
|
}) => {
|
|
4572
4572
|
const disabledContext = useContext(DisabledContext);
|
|
4573
|
-
const buttonLabel2 = trigger2 === TriggerType.BUTTON ? label2 : trigger2 === TriggerType.DROP_DOWN_BUTTON ? /* @__PURE__ */ jsxs("span", { className: styles$
|
|
4574
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4575
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4573
|
+
const buttonLabel2 = trigger2 === TriggerType.BUTTON ? label2 : trigger2 === TriggerType.DROP_DOWN_BUTTON ? /* @__PURE__ */ jsxs("span", { className: styles$L.middleAlignedInline, children: [
|
|
4574
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.buttonLabel, children: label2 }),
|
|
4575
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.buttonCaret, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHEVRON_DOWN }) })
|
|
4576
4576
|
] }) : null;
|
|
4577
4577
|
return /* @__PURE__ */ jsx(
|
|
4578
4578
|
"div",
|
|
4579
4579
|
{
|
|
4580
4580
|
className: cx$2(
|
|
4581
|
-
styles$
|
|
4582
|
-
disabled2 || disabledContext ? styles$
|
|
4581
|
+
styles$L.trigger,
|
|
4582
|
+
disabled2 || disabledContext ? styles$L.disabled : null
|
|
4583
4583
|
),
|
|
4584
4584
|
style: { width: width2 },
|
|
4585
4585
|
children: /* @__PURE__ */ jsx(
|
|
@@ -4607,7 +4607,7 @@ const Text$1 = ({
|
|
|
4607
4607
|
title: title2,
|
|
4608
4608
|
carat,
|
|
4609
4609
|
disabled: disabled2,
|
|
4610
|
-
isOpen,
|
|
4610
|
+
isOpen: isOpen2,
|
|
4611
4611
|
selected: selected2
|
|
4612
4612
|
}) => {
|
|
4613
4613
|
let titleText;
|
|
@@ -4620,14 +4620,14 @@ const Text$1 = ({
|
|
|
4620
4620
|
"div",
|
|
4621
4621
|
{
|
|
4622
4622
|
className: cx$2(
|
|
4623
|
-
styles$
|
|
4624
|
-
disabled2 ? styles$
|
|
4625
|
-
|
|
4626
|
-
selected2 ? styles$
|
|
4623
|
+
styles$L.trigger,
|
|
4624
|
+
disabled2 ? styles$L.disabled : null,
|
|
4625
|
+
isOpen2 ? styles$L.active : null,
|
|
4626
|
+
selected2 ? styles$L.selected : null
|
|
4627
4627
|
),
|
|
4628
4628
|
children: [
|
|
4629
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
4630
|
-
carat && carat === MenuCarat.RIGHT ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
4629
|
+
/* @__PURE__ */ jsx("span", { className: styles$L.label, title: titleText, children: label2 }),
|
|
4630
|
+
carat && carat === MenuCarat.RIGHT ? /* @__PURE__ */ jsx("span", { className: styles$L.arrow, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHEVRON_RIGHT }) }) : carat && carat === MenuCarat.DOWN ? /* @__PURE__ */ jsx("span", { className: styles$L.arrow, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CHEVRON_DOWN }) }) : null
|
|
4631
4631
|
]
|
|
4632
4632
|
}
|
|
4633
4633
|
);
|
|
@@ -4640,7 +4640,7 @@ const Component = ({
|
|
|
4640
4640
|
return /* @__PURE__ */ jsx(
|
|
4641
4641
|
"div",
|
|
4642
4642
|
{
|
|
4643
|
-
className: cx$2(styles$
|
|
4643
|
+
className: cx$2(styles$L.component, disabled2 ? styles$L.disabled : null),
|
|
4644
4644
|
"data-testid": testId,
|
|
4645
4645
|
children: component2
|
|
4646
4646
|
}
|
|
@@ -4666,7 +4666,7 @@ const TriggerTooltip = ({
|
|
|
4666
4666
|
}
|
|
4667
4667
|
);
|
|
4668
4668
|
};
|
|
4669
|
-
const Trigger = React__default.forwardRef(
|
|
4669
|
+
const Trigger$1 = React__default.forwardRef(
|
|
4670
4670
|
({
|
|
4671
4671
|
isDisabled,
|
|
4672
4672
|
badgeTitle,
|
|
@@ -4684,7 +4684,7 @@ const Trigger = React__default.forwardRef(
|
|
|
4684
4684
|
component: component2,
|
|
4685
4685
|
groupOrder,
|
|
4686
4686
|
fullHeight,
|
|
4687
|
-
isOpen,
|
|
4687
|
+
isOpen: isOpen2,
|
|
4688
4688
|
error: error2,
|
|
4689
4689
|
warning: warning2,
|
|
4690
4690
|
tooltip: tooltip2,
|
|
@@ -4705,7 +4705,7 @@ const Trigger = React__default.forwardRef(
|
|
|
4705
4705
|
loading,
|
|
4706
4706
|
error: error2,
|
|
4707
4707
|
warning: warning2,
|
|
4708
|
-
active:
|
|
4708
|
+
active: isOpen2
|
|
4709
4709
|
}
|
|
4710
4710
|
) : trigger2 === TriggerType.TEXT ? /* @__PURE__ */ jsx(
|
|
4711
4711
|
Text$1,
|
|
@@ -4714,7 +4714,7 @@ const Trigger = React__default.forwardRef(
|
|
|
4714
4714
|
title: title2,
|
|
4715
4715
|
disabled: isDisabled,
|
|
4716
4716
|
carat: !contextMenu ? isNested ? MenuCarat.RIGHT : MenuCarat.DOWN : void 0,
|
|
4717
|
-
isOpen,
|
|
4717
|
+
isOpen: isOpen2,
|
|
4718
4718
|
selected: selected2
|
|
4719
4719
|
}
|
|
4720
4720
|
) : trigger2 === TriggerType.COMPONENT ? /* @__PURE__ */ jsx(Component, { component: component2, disabled: isDisabled }) : null;
|
|
@@ -4723,7 +4723,7 @@ const Trigger = React__default.forwardRef(
|
|
|
4723
4723
|
"div",
|
|
4724
4724
|
{
|
|
4725
4725
|
ref: ref2,
|
|
4726
|
-
className: styles$
|
|
4726
|
+
className: styles$L.wrapper,
|
|
4727
4727
|
style: width2 ? { width: width2 } : {
|
|
4728
4728
|
...fullHeight && {
|
|
4729
4729
|
height: "100%",
|
|
@@ -4763,19 +4763,19 @@ const useContextMenu = ({
|
|
|
4763
4763
|
}) => {
|
|
4764
4764
|
const { hasMousePosition, resetMousePosition, handleMouseEvent, trigger: trigger2 } = useMousePositionAsTrigger();
|
|
4765
4765
|
const close2 = resetMousePosition;
|
|
4766
|
-
const
|
|
4766
|
+
const isOpen2 = hasMousePosition;
|
|
4767
4767
|
const { layerProps, renderLayer } = useLayer({
|
|
4768
|
-
isOpen,
|
|
4768
|
+
isOpen: isOpen2,
|
|
4769
4769
|
trigger: trigger2,
|
|
4770
|
-
...placementOptions(placement),
|
|
4770
|
+
...placementOptions$1(placement),
|
|
4771
4771
|
possiblePlacements,
|
|
4772
4772
|
ResizeObserver: index,
|
|
4773
4773
|
onOutsideClick: close2,
|
|
4774
4774
|
overflowContainer
|
|
4775
4775
|
});
|
|
4776
|
-
const layer2 =
|
|
4776
|
+
const layer2 = isOpen2 && renderLayer(
|
|
4777
4777
|
/* @__PURE__ */ jsx("div", { ...layerProps, children: /* @__PURE__ */ jsx(
|
|
4778
|
-
Layer$
|
|
4778
|
+
Layer$2,
|
|
4779
4779
|
{
|
|
4780
4780
|
isNested: false,
|
|
4781
4781
|
width: width2,
|
|
@@ -4830,7 +4830,7 @@ const ContextMenu = ({
|
|
|
4830
4830
|
const isDisabled = disabled2 || isMenuEmpty(menu2) || disabledContext;
|
|
4831
4831
|
return /* @__PURE__ */ jsxs("div", { onContextMenu, "data-testid": testId, children: [
|
|
4832
4832
|
/* @__PURE__ */ jsx(
|
|
4833
|
-
Trigger,
|
|
4833
|
+
Trigger$1,
|
|
4834
4834
|
{
|
|
4835
4835
|
width: width2,
|
|
4836
4836
|
fullHeight: fullHeightTrigger,
|
|
@@ -4887,12 +4887,12 @@ const DropDownMenu = ({
|
|
|
4887
4887
|
showAllButton,
|
|
4888
4888
|
possiblePlacements = ["bottom-start", "top-start"]
|
|
4889
4889
|
} = menu2;
|
|
4890
|
-
const [
|
|
4890
|
+
const [isOpen2, setOpen] = isBoolean$2(openProp) && isFunction$3(setOpenProp) ? [openProp, setOpenProp] : useState(false);
|
|
4891
4891
|
const close2 = () => setOpen(false);
|
|
4892
4892
|
const open = () => setOpen(true);
|
|
4893
4893
|
const { triggerProps, layerProps, renderLayer } = useLayer({
|
|
4894
|
-
isOpen,
|
|
4895
|
-
...placementOptions(placement, isNested),
|
|
4894
|
+
isOpen: isOpen2,
|
|
4895
|
+
...placementOptions$1(placement, isNested),
|
|
4896
4896
|
possiblePlacements,
|
|
4897
4897
|
ResizeObserver: index,
|
|
4898
4898
|
onOutsideClick: close2,
|
|
@@ -4905,7 +4905,7 @@ const DropDownMenu = ({
|
|
|
4905
4905
|
if (isDisabled) {
|
|
4906
4906
|
return;
|
|
4907
4907
|
}
|
|
4908
|
-
if (
|
|
4908
|
+
if (isOpen2) {
|
|
4909
4909
|
close2();
|
|
4910
4910
|
return;
|
|
4911
4911
|
}
|
|
@@ -4918,7 +4918,7 @@ const DropDownMenu = ({
|
|
|
4918
4918
|
};
|
|
4919
4919
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
4920
4920
|
/* @__PURE__ */ jsx(
|
|
4921
|
-
Trigger,
|
|
4921
|
+
Trigger$1,
|
|
4922
4922
|
{
|
|
4923
4923
|
ref: triggerProps.ref,
|
|
4924
4924
|
isDisabled,
|
|
@@ -4936,7 +4936,7 @@ const DropDownMenu = ({
|
|
|
4936
4936
|
isNested,
|
|
4937
4937
|
component: component2,
|
|
4938
4938
|
groupOrder,
|
|
4939
|
-
isOpen,
|
|
4939
|
+
isOpen: isOpen2,
|
|
4940
4940
|
tooltip: tooltip2,
|
|
4941
4941
|
error: error2,
|
|
4942
4942
|
warning: warning2,
|
|
@@ -4944,16 +4944,16 @@ const DropDownMenu = ({
|
|
|
4944
4944
|
selected: selected2
|
|
4945
4945
|
}
|
|
4946
4946
|
),
|
|
4947
|
-
|
|
4947
|
+
isOpen2 && renderLayer(
|
|
4948
4948
|
/* @__PURE__ */ jsx(
|
|
4949
4949
|
"div",
|
|
4950
4950
|
{
|
|
4951
4951
|
...layerProps,
|
|
4952
|
-
className: styles$
|
|
4952
|
+
className: styles$L.layerContainer,
|
|
4953
4953
|
"data-testid": menu2.testId,
|
|
4954
4954
|
onClick: (evt) => evt.stopPropagation(),
|
|
4955
4955
|
children: /* @__PURE__ */ jsx(
|
|
4956
|
-
Layer$
|
|
4956
|
+
Layer$2,
|
|
4957
4957
|
{
|
|
4958
4958
|
sections,
|
|
4959
4959
|
isNested,
|
|
@@ -5018,7 +5018,7 @@ const SubmenuActions = (props) => {
|
|
|
5018
5018
|
const Actions = (props) => {
|
|
5019
5019
|
const disabledContext = useContext(DisabledContext);
|
|
5020
5020
|
const { actions: actions2 = [], closeLayer } = props;
|
|
5021
|
-
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
5021
|
+
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$M.actions), children: actions2.map((action2, index2) => {
|
|
5022
5022
|
const hidden2 = (action2 == null ? void 0 : action2.hidden) || !action2 || !Object.keys(action2).length;
|
|
5023
5023
|
if (!hidden2) {
|
|
5024
5024
|
if (action2.childComponent && React__default.isValidElement(action2.childComponent)) {
|
|
@@ -5026,7 +5026,7 @@ const Actions = (props) => {
|
|
|
5026
5026
|
"div",
|
|
5027
5027
|
{
|
|
5028
5028
|
"data-testid": action2.testId,
|
|
5029
|
-
className: styles$
|
|
5029
|
+
className: styles$M.childComponent,
|
|
5030
5030
|
children: action2.childComponent
|
|
5031
5031
|
},
|
|
5032
5032
|
index2
|
|
@@ -5075,17 +5075,17 @@ const Actions = (props) => {
|
|
|
5075
5075
|
}) });
|
|
5076
5076
|
};
|
|
5077
5077
|
const breadcrumb = "_breadcrumb_2k0cd_1";
|
|
5078
|
-
const small$
|
|
5078
|
+
const small$a = "_small_2k0cd_4";
|
|
5079
5079
|
const labelContainer = "_labelContainer_2k0cd_7";
|
|
5080
5080
|
const active$5 = "_active_2k0cd_17";
|
|
5081
|
-
const disabled$
|
|
5081
|
+
const disabled$7 = "_disabled_2k0cd_22";
|
|
5082
5082
|
const separator = "_separator_2k0cd_27";
|
|
5083
|
-
const styles$
|
|
5083
|
+
const styles$J = {
|
|
5084
5084
|
breadcrumb,
|
|
5085
|
-
small: small$
|
|
5085
|
+
small: small$a,
|
|
5086
5086
|
labelContainer,
|
|
5087
5087
|
active: active$5,
|
|
5088
|
-
disabled: disabled$
|
|
5088
|
+
disabled: disabled$7,
|
|
5089
5089
|
separator
|
|
5090
5090
|
};
|
|
5091
5091
|
var BreadcrumbLinkType = /* @__PURE__ */ ((BreadcrumbLinkType2) => {
|
|
@@ -5111,16 +5111,16 @@ const Link$2 = ({
|
|
|
5111
5111
|
{
|
|
5112
5112
|
onClick,
|
|
5113
5113
|
className: cx$2(
|
|
5114
|
-
styles$
|
|
5115
|
-
active2 && styles$
|
|
5116
|
-
(disabled2 || disabledContext) && styles$
|
|
5114
|
+
styles$J.labelContainer,
|
|
5115
|
+
active2 && styles$J.active,
|
|
5116
|
+
(disabled2 || disabledContext) && styles$J.disabled
|
|
5117
5117
|
),
|
|
5118
5118
|
children: isLink ? /* @__PURE__ */ jsx("a", { href: url, children: label2 }) : isCustom ? element : label2
|
|
5119
5119
|
}
|
|
5120
5120
|
);
|
|
5121
5121
|
};
|
|
5122
5122
|
const Breadcrumb = ({ links, small: small2 = false }) => {
|
|
5123
|
-
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
5123
|
+
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$J.breadcrumb, small2 && styles$J.small), children: links.map((link2, i) => {
|
|
5124
5124
|
const isFinal = links.length === i + 1;
|
|
5125
5125
|
const { type, label: label2, url, onClick, active: active2, disabled: disabled2, element } = link2;
|
|
5126
5126
|
return /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -5136,14 +5136,14 @@ const Breadcrumb = ({ links, small: small2 = false }) => {
|
|
|
5136
5136
|
element
|
|
5137
5137
|
}
|
|
5138
5138
|
),
|
|
5139
|
-
!isFinal && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5139
|
+
!isFinal && /* @__PURE__ */ jsx("span", { className: styles$J.separator, children: "/" })
|
|
5140
5140
|
] }, i);
|
|
5141
5141
|
}) });
|
|
5142
5142
|
};
|
|
5143
|
-
const label$
|
|
5143
|
+
const label$8 = "_label_iu2wi_1";
|
|
5144
5144
|
const buttonGroup = "_buttonGroup_iu2wi_11";
|
|
5145
|
-
const styles$
|
|
5146
|
-
label: label$
|
|
5145
|
+
const styles$I = {
|
|
5146
|
+
label: label$8,
|
|
5147
5147
|
buttonGroup
|
|
5148
5148
|
};
|
|
5149
5149
|
const ButtonGroup = (props) => {
|
|
@@ -5196,7 +5196,7 @@ const ButtonGroup = (props) => {
|
|
|
5196
5196
|
};
|
|
5197
5197
|
const renderHeader = () => {
|
|
5198
5198
|
if (header2) {
|
|
5199
|
-
return /* @__PURE__ */ jsx("label", { className: styles$
|
|
5199
|
+
return /* @__PURE__ */ jsx("label", { className: styles$I.label, children: header2 });
|
|
5200
5200
|
}
|
|
5201
5201
|
};
|
|
5202
5202
|
const renderButtons = () => {
|
|
@@ -5253,7 +5253,7 @@ const ButtonGroup = (props) => {
|
|
|
5253
5253
|
};
|
|
5254
5254
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
5255
5255
|
renderHeader(),
|
|
5256
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
5256
|
+
/* @__PURE__ */ jsx("div", { className: styles$I.buttonGroup, "data-testid": testId, children: renderButtons() })
|
|
5257
5257
|
] }) });
|
|
5258
5258
|
};
|
|
5259
5259
|
const card = "_card_ucdeu_1";
|
|
@@ -5263,7 +5263,7 @@ const cardHeader = "_cardHeader_ucdeu_13";
|
|
|
5263
5263
|
const cardContentBorderTop = "_cardContentBorderTop_ucdeu_19";
|
|
5264
5264
|
const padding$1 = "_padding_ucdeu_22";
|
|
5265
5265
|
const cardContent = "_cardContent_ucdeu_19";
|
|
5266
|
-
const styles$
|
|
5266
|
+
const styles$H = {
|
|
5267
5267
|
card,
|
|
5268
5268
|
bordered: bordered$2,
|
|
5269
5269
|
raised,
|
|
@@ -5284,20 +5284,20 @@ const Card = ({
|
|
|
5284
5284
|
"div",
|
|
5285
5285
|
{
|
|
5286
5286
|
className: cx$2(
|
|
5287
|
-
styles$
|
|
5288
|
-
bordered2 ? styles$
|
|
5289
|
-
raised2 ? styles$
|
|
5287
|
+
styles$H.card,
|
|
5288
|
+
bordered2 ? styles$H.bordered : "",
|
|
5289
|
+
raised2 ? styles$H.raised : ""
|
|
5290
5290
|
),
|
|
5291
5291
|
style: { margin: margin2 },
|
|
5292
5292
|
children: [
|
|
5293
|
-
heading2 ? /* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
5293
|
+
heading2 ? /* @__PURE__ */ jsx("div", { className: cx$2(styles$H.cardHeader), children: heading2 }) : null,
|
|
5294
5294
|
/* @__PURE__ */ jsx(
|
|
5295
5295
|
"div",
|
|
5296
5296
|
{
|
|
5297
5297
|
className: cx$2(
|
|
5298
|
-
styles$
|
|
5299
|
-
heading2 ? styles$
|
|
5300
|
-
padding2 ? styles$
|
|
5298
|
+
styles$H.cardContent,
|
|
5299
|
+
heading2 ? styles$H.cardContentBorderTop : "",
|
|
5300
|
+
padding2 ? styles$H.padding : ""
|
|
5301
5301
|
),
|
|
5302
5302
|
children
|
|
5303
5303
|
}
|
|
@@ -5325,8 +5325,8 @@ function __spreadArray$1(to2, from3, pack) {
|
|
|
5325
5325
|
}
|
|
5326
5326
|
return to2.concat(ar2 || Array.prototype.slice.call(from3));
|
|
5327
5327
|
}
|
|
5328
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed,
|
|
5329
|
-
var e2 = new Error(
|
|
5328
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message2) {
|
|
5329
|
+
var e2 = new Error(message2);
|
|
5330
5330
|
return e2.name = "SuppressedError", e2.error = error2, e2.suppressed = suppressed, e2;
|
|
5331
5331
|
};
|
|
5332
5332
|
function memoize$1(fn) {
|
|
@@ -6497,7 +6497,7 @@ const Column = ({
|
|
|
6497
6497
|
const divider = "_divider_2bfzh_1";
|
|
6498
6498
|
const alignLeft = "_alignLeft_2bfzh_12";
|
|
6499
6499
|
const alignRight = "_alignRight_2bfzh_15";
|
|
6500
|
-
const styles$
|
|
6500
|
+
const styles$G = {
|
|
6501
6501
|
divider,
|
|
6502
6502
|
alignLeft,
|
|
6503
6503
|
alignRight
|
|
@@ -6509,9 +6509,9 @@ const faint = "_faint_11ofj_10";
|
|
|
6509
6509
|
const success$1 = "_success_11ofj_13";
|
|
6510
6510
|
const warning$5 = "_warning_11ofj_16";
|
|
6511
6511
|
const error$2 = "_error_11ofj_19";
|
|
6512
|
-
const small$
|
|
6512
|
+
const small$9 = "_small_11ofj_22";
|
|
6513
6513
|
const link$1 = "_link_11ofj_25";
|
|
6514
|
-
const styles$
|
|
6514
|
+
const styles$F = {
|
|
6515
6515
|
bold: bold$1,
|
|
6516
6516
|
center,
|
|
6517
6517
|
muted: muted$1,
|
|
@@ -6519,7 +6519,7 @@ const styles$D = {
|
|
|
6519
6519
|
success: success$1,
|
|
6520
6520
|
warning: warning$5,
|
|
6521
6521
|
error: error$2,
|
|
6522
|
-
small: small$
|
|
6522
|
+
small: small$9,
|
|
6523
6523
|
link: link$1
|
|
6524
6524
|
};
|
|
6525
6525
|
const Text = ({
|
|
@@ -6539,16 +6539,16 @@ const Text = ({
|
|
|
6539
6539
|
"span",
|
|
6540
6540
|
{
|
|
6541
6541
|
className: cx$2(
|
|
6542
|
-
bold2 && styles$
|
|
6543
|
-
center2 && styles$
|
|
6544
|
-
error2 && styles$
|
|
6545
|
-
faint2 && styles$
|
|
6546
|
-
link2 && styles$
|
|
6547
|
-
muted2 && styles$
|
|
6548
|
-
onClick && styles$
|
|
6549
|
-
small2 && styles$
|
|
6550
|
-
success2 && styles$
|
|
6551
|
-
warning2 && styles$
|
|
6542
|
+
bold2 && styles$F.bold,
|
|
6543
|
+
center2 && styles$F.center,
|
|
6544
|
+
error2 && styles$F.error,
|
|
6545
|
+
faint2 && styles$F.faint,
|
|
6546
|
+
link2 && styles$F.link,
|
|
6547
|
+
muted2 && styles$F.muted,
|
|
6548
|
+
onClick && styles$F.clickable,
|
|
6549
|
+
small2 && styles$F.small,
|
|
6550
|
+
success2 && styles$F.success,
|
|
6551
|
+
warning2 && styles$F.warning
|
|
6552
6552
|
),
|
|
6553
6553
|
onClick,
|
|
6554
6554
|
children
|
|
@@ -6558,9 +6558,9 @@ const Text = ({
|
|
|
6558
6558
|
const cssAlignClass = (align) => {
|
|
6559
6559
|
switch (align) {
|
|
6560
6560
|
case Align.LEFT:
|
|
6561
|
-
return styles$
|
|
6561
|
+
return styles$G.alignLeft;
|
|
6562
6562
|
case Align.RIGHT:
|
|
6563
|
-
return styles$
|
|
6563
|
+
return styles$G.alignRight;
|
|
6564
6564
|
default:
|
|
6565
6565
|
return "";
|
|
6566
6566
|
}
|
|
@@ -6573,7 +6573,7 @@ const Divider = ({
|
|
|
6573
6573
|
}) => /* @__PURE__ */ jsx(
|
|
6574
6574
|
"div",
|
|
6575
6575
|
{
|
|
6576
|
-
className: `${styles$
|
|
6576
|
+
className: `${styles$G.divider} ${cssAlignClass(align)}`,
|
|
6577
6577
|
style: {
|
|
6578
6578
|
marginTop: margin2,
|
|
6579
6579
|
marginBottom: margin2,
|
|
@@ -6582,15 +6582,15 @@ const Divider = ({
|
|
|
6582
6582
|
children: typeof children === "string" ? /* @__PURE__ */ jsx(Text, { muted: true, children }) : children
|
|
6583
6583
|
}
|
|
6584
6584
|
);
|
|
6585
|
-
const heading$
|
|
6585
|
+
const heading$4 = "_heading_yhdiy_1";
|
|
6586
6586
|
const top$1 = "_top_yhdiy_10";
|
|
6587
|
-
const icons$
|
|
6588
|
-
const styles$
|
|
6589
|
-
heading: heading$
|
|
6587
|
+
const icons$2 = "_icons_yhdiy_20";
|
|
6588
|
+
const styles$E = {
|
|
6589
|
+
heading: heading$4,
|
|
6590
6590
|
top: top$1,
|
|
6591
|
-
icons: icons$
|
|
6591
|
+
icons: icons$2
|
|
6592
6592
|
};
|
|
6593
|
-
const Heading$
|
|
6593
|
+
const Heading$2 = ({
|
|
6594
6594
|
children,
|
|
6595
6595
|
helpText,
|
|
6596
6596
|
onClick,
|
|
@@ -6606,13 +6606,13 @@ const Heading$1 = ({
|
|
|
6606
6606
|
return /* @__PURE__ */ jsxs(
|
|
6607
6607
|
"div",
|
|
6608
6608
|
{
|
|
6609
|
-
className: cx$2(styles$
|
|
6609
|
+
className: cx$2(styles$E.heading, top2 ? styles$E.top : ""),
|
|
6610
6610
|
style: { marginBottom },
|
|
6611
6611
|
onClick,
|
|
6612
6612
|
"data-testid": testId,
|
|
6613
6613
|
children: [
|
|
6614
6614
|
children,
|
|
6615
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6615
|
+
/* @__PURE__ */ jsxs("div", { className: styles$E.icons, children: [
|
|
6616
6616
|
icon2 && /* @__PURE__ */ jsx(HelpIcon, { onClick: onIconClick, icon: icon2 }),
|
|
6617
6617
|
isHelpIconDisplayed && /* @__PURE__ */ jsx(HelpIcon, { text: helpText, onClick: onClickHelp }),
|
|
6618
6618
|
libraryIcon && /* @__PURE__ */ jsx(
|
|
@@ -6635,7 +6635,7 @@ const header$2 = "_header_18g0k_24";
|
|
|
6635
6635
|
const dismiss$2 = "_dismiss_18g0k_33";
|
|
6636
6636
|
const content$3 = "_content_18g0k_38";
|
|
6637
6637
|
const footer$2 = "_footer_18g0k_47";
|
|
6638
|
-
const styles$
|
|
6638
|
+
const styles$D = {
|
|
6639
6639
|
dialog,
|
|
6640
6640
|
inline: inline$3,
|
|
6641
6641
|
scroll: scroll$3,
|
|
@@ -6670,16 +6670,16 @@ const Dialog = ({ dialog: dialog2 }) => {
|
|
|
6670
6670
|
"div",
|
|
6671
6671
|
{
|
|
6672
6672
|
className: cx$2(
|
|
6673
|
-
styles$
|
|
6674
|
-
width2 ? styles$
|
|
6675
|
-
scroll3 ? styles$
|
|
6673
|
+
styles$D.dialog,
|
|
6674
|
+
width2 ? styles$D.inline : null,
|
|
6675
|
+
scroll3 ? styles$D.scroll : null
|
|
6676
6676
|
),
|
|
6677
6677
|
style: { width: width2, height: height2 },
|
|
6678
6678
|
"data-testid": testId ?? null,
|
|
6679
6679
|
children: [
|
|
6680
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6681
|
-
/* @__PURE__ */ jsx(Heading$
|
|
6682
|
-
onClose ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
6680
|
+
/* @__PURE__ */ jsxs("div", { className: styles$D.header, children: [
|
|
6681
|
+
/* @__PURE__ */ jsx(Heading$2, { testId: testId && `${testId}-heading`, top: true, marginBottom: 0, children: heading2 }),
|
|
6682
|
+
onClose ? /* @__PURE__ */ jsx("div", { className: styles$D.dismiss, children: /* @__PURE__ */ jsx(
|
|
6683
6683
|
Button$1,
|
|
6684
6684
|
{
|
|
6685
6685
|
icon: IconType.CLOSE,
|
|
@@ -6696,7 +6696,7 @@ const Dialog = ({ dialog: dialog2 }) => {
|
|
|
6696
6696
|
"div",
|
|
6697
6697
|
{
|
|
6698
6698
|
"data-testid": testId && `${testId}-content`,
|
|
6699
|
-
className: styles$
|
|
6699
|
+
className: styles$D.content,
|
|
6700
6700
|
style: { padding: contentPadding2 },
|
|
6701
6701
|
children: convertStringToJsx(content2)
|
|
6702
6702
|
}
|
|
@@ -6705,7 +6705,7 @@ const Dialog = ({ dialog: dialog2 }) => {
|
|
|
6705
6705
|
"div",
|
|
6706
6706
|
{
|
|
6707
6707
|
"data-testid": testId && `${testId}-footer`,
|
|
6708
|
-
className: styles$
|
|
6708
|
+
className: styles$D.footer,
|
|
6709
6709
|
children: footer2
|
|
6710
6710
|
}
|
|
6711
6711
|
)
|
|
@@ -6713,16 +6713,16 @@ const Dialog = ({ dialog: dialog2 }) => {
|
|
|
6713
6713
|
}
|
|
6714
6714
|
);
|
|
6715
6715
|
};
|
|
6716
|
-
const inputInTable$
|
|
6717
|
-
const inputHover$
|
|
6718
|
-
const inputFocus$
|
|
6719
|
-
const inputError$
|
|
6720
|
-
const inputWarning$
|
|
6721
|
-
const inputDisabled$
|
|
6722
|
-
const hideScrollbars$
|
|
6716
|
+
const inputInTable$a = "_inputInTable_1f40p_1";
|
|
6717
|
+
const inputHover$a = "_inputHover_1f40p_13";
|
|
6718
|
+
const inputFocus$a = "_inputFocus_1f40p_18";
|
|
6719
|
+
const inputError$a = "_inputError_1f40p_25";
|
|
6720
|
+
const inputWarning$a = "_inputWarning_1f40p_26";
|
|
6721
|
+
const inputDisabled$a = "_inputDisabled_1f40p_61";
|
|
6722
|
+
const hideScrollbars$a = "_hideScrollbars_1f40p_67";
|
|
6723
6723
|
const inline$2 = "_inline_1f40p_90";
|
|
6724
6724
|
const left$2 = "_left_1f40p_93";
|
|
6725
|
-
const right$
|
|
6725
|
+
const right$6 = "_right_1f40p_96";
|
|
6726
6726
|
const fixed$1 = "_fixed_1f40p_99";
|
|
6727
6727
|
const border$1 = "_border_1f40p_111";
|
|
6728
6728
|
const shadow = "_shadow_1f40p_117";
|
|
@@ -6735,20 +6735,20 @@ const toggleButtonOpen = "_toggleButtonOpen_1f40p_162";
|
|
|
6735
6735
|
const tabs$1 = "_tabs_1f40p_165";
|
|
6736
6736
|
const tab$1 = "_tab_1f40p_165";
|
|
6737
6737
|
const active$4 = "_active_1f40p_197";
|
|
6738
|
-
const disabled$
|
|
6738
|
+
const disabled$6 = "_disabled_1f40p_222";
|
|
6739
6739
|
const tabsContent = "_tabsContent_1f40p_229";
|
|
6740
6740
|
const resizeHandle = "_resizeHandle_1f40p_235";
|
|
6741
|
-
const styles$
|
|
6742
|
-
inputInTable: inputInTable$
|
|
6743
|
-
inputHover: inputHover$
|
|
6744
|
-
inputFocus: inputFocus$
|
|
6745
|
-
inputError: inputError$
|
|
6746
|
-
inputWarning: inputWarning$
|
|
6747
|
-
inputDisabled: inputDisabled$
|
|
6748
|
-
hideScrollbars: hideScrollbars$
|
|
6741
|
+
const styles$C = {
|
|
6742
|
+
inputInTable: inputInTable$a,
|
|
6743
|
+
inputHover: inputHover$a,
|
|
6744
|
+
inputFocus: inputFocus$a,
|
|
6745
|
+
inputError: inputError$a,
|
|
6746
|
+
inputWarning: inputWarning$a,
|
|
6747
|
+
inputDisabled: inputDisabled$a,
|
|
6748
|
+
hideScrollbars: hideScrollbars$a,
|
|
6749
6749
|
inline: inline$2,
|
|
6750
6750
|
left: left$2,
|
|
6751
|
-
right: right$
|
|
6751
|
+
right: right$6,
|
|
6752
6752
|
fixed: fixed$1,
|
|
6753
6753
|
border: border$1,
|
|
6754
6754
|
shadow,
|
|
@@ -6761,7 +6761,7 @@ const styles$A = {
|
|
|
6761
6761
|
tabs: tabs$1,
|
|
6762
6762
|
tab: tab$1,
|
|
6763
6763
|
active: active$4,
|
|
6764
|
-
disabled: disabled$
|
|
6764
|
+
disabled: disabled$6,
|
|
6765
6765
|
tabsContent,
|
|
6766
6766
|
resizeHandle
|
|
6767
6767
|
};
|
|
@@ -6779,13 +6779,13 @@ const DrawerTabs = ({
|
|
|
6779
6779
|
testId
|
|
6780
6780
|
}) => {
|
|
6781
6781
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6782
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6782
|
+
/* @__PURE__ */ jsx("div", { className: styles$C.tabs, children: tabs2.map((tab2, index2) => /* @__PURE__ */ jsx(
|
|
6783
6783
|
"div",
|
|
6784
6784
|
{
|
|
6785
6785
|
className: cx$2(
|
|
6786
|
-
styles$
|
|
6787
|
-
activeTab === index2 && open ? styles$
|
|
6788
|
-
tab2.disabled ? styles$
|
|
6786
|
+
styles$C.tab,
|
|
6787
|
+
activeTab === index2 && open ? styles$C.active : "",
|
|
6788
|
+
tab2.disabled ? styles$C.disabled : ""
|
|
6789
6789
|
),
|
|
6790
6790
|
style: { background: background2 },
|
|
6791
6791
|
onClick: !tab2.disabled ? () => handleTabClick(index2) : void 0,
|
|
@@ -6800,7 +6800,7 @@ const DrawerTabs = ({
|
|
|
6800
6800
|
"div",
|
|
6801
6801
|
{
|
|
6802
6802
|
style: { width: typeof width2 === "number" ? `${width2}px` : width2 },
|
|
6803
|
-
className: styles$
|
|
6803
|
+
className: styles$C.tabsContent,
|
|
6804
6804
|
"data-testid": testId && `${testId}-content-${index2}`,
|
|
6805
6805
|
children: active2 && open && tab2.content
|
|
6806
6806
|
},
|
|
@@ -8721,7 +8721,7 @@ const MIN_OPEN_WIDTH = 240;
|
|
|
8721
8721
|
const ResizeHandle = forwardRef(
|
|
8722
8722
|
(props, ref2) => {
|
|
8723
8723
|
const { handleAxis, ...rest } = props;
|
|
8724
|
-
return /* @__PURE__ */ jsx("div", { ref: ref2, className: styles$
|
|
8724
|
+
return /* @__PURE__ */ jsx("div", { ref: ref2, className: styles$C.resizeHandle, ...rest, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG }) });
|
|
8725
8725
|
}
|
|
8726
8726
|
);
|
|
8727
8727
|
const DrawerResizeWrapper = ({
|
|
@@ -8747,7 +8747,7 @@ const DrawerResizeWrapper = ({
|
|
|
8747
8747
|
handle: /* @__PURE__ */ jsx(ResizeHandle, {}),
|
|
8748
8748
|
resizeHandles: right2 ? ["w"] : ["e"],
|
|
8749
8749
|
axis: "x",
|
|
8750
|
-
className: isResizing2 ? styles$
|
|
8750
|
+
className: isResizing2 ? styles$C.isResizing : "",
|
|
8751
8751
|
onResizeStart: () => {
|
|
8752
8752
|
if (setOpen) setOpen(true);
|
|
8753
8753
|
if (onResize) onResize(width2);
|
|
@@ -8845,17 +8845,17 @@ const Drawer = ({
|
|
|
8845
8845
|
"div",
|
|
8846
8846
|
{
|
|
8847
8847
|
className: cx$2(
|
|
8848
|
-
styles$
|
|
8849
|
-
shadow4 ? styles$
|
|
8850
|
-
fixed2 ? styles$
|
|
8851
|
-
right2 ? styles$
|
|
8848
|
+
styles$C.drawer,
|
|
8849
|
+
shadow4 ? styles$C.shadow : "",
|
|
8850
|
+
fixed2 ? styles$C.fixed : styles$C.inline,
|
|
8851
|
+
right2 ? styles$C.right : styles$C.left
|
|
8852
8852
|
),
|
|
8853
8853
|
style: { top: top2 },
|
|
8854
8854
|
children: [
|
|
8855
8855
|
/* @__PURE__ */ jsx(
|
|
8856
8856
|
"div",
|
|
8857
8857
|
{
|
|
8858
|
-
className: cx$2(styles$
|
|
8858
|
+
className: cx$2(styles$C.drawerContent, border2 && styles$C.border),
|
|
8859
8859
|
style: {
|
|
8860
8860
|
background: background2,
|
|
8861
8861
|
borderColor: typeof border2 === "string" ? border2 : void 0,
|
|
@@ -8881,9 +8881,9 @@ const Drawer = ({
|
|
|
8881
8881
|
"span",
|
|
8882
8882
|
{
|
|
8883
8883
|
className: cx$2(
|
|
8884
|
-
styles$
|
|
8885
|
-
localOpen && (isStandardButton || isCustomButton && buttonAnimate) ? styles$
|
|
8886
|
-
buttonPosition === "top" ? styles$
|
|
8884
|
+
styles$C.toggleButton,
|
|
8885
|
+
localOpen && (isStandardButton || isCustomButton && buttonAnimate) ? styles$C.toggleButtonOpen : "",
|
|
8886
|
+
buttonPosition === "top" ? styles$C.top : styles$C.bottom
|
|
8887
8887
|
),
|
|
8888
8888
|
children: isCustomButton ? button2 : /* @__PURE__ */ jsx(
|
|
8889
8889
|
Button$1,
|
|
@@ -8903,7 +8903,7 @@ const Drawer = ({
|
|
|
8903
8903
|
};
|
|
8904
8904
|
const empty$2 = "_empty_fe425_1";
|
|
8905
8905
|
const text$2 = "_text_fe425_11";
|
|
8906
|
-
const styles$
|
|
8906
|
+
const styles$B = {
|
|
8907
8907
|
empty: empty$2,
|
|
8908
8908
|
text: text$2
|
|
8909
8909
|
};
|
|
@@ -8917,7 +8917,7 @@ const Empty = ({
|
|
|
8917
8917
|
return /* @__PURE__ */ jsxs(
|
|
8918
8918
|
"div",
|
|
8919
8919
|
{
|
|
8920
|
-
className: styles$
|
|
8920
|
+
className: styles$B.empty,
|
|
8921
8921
|
style: { width: width2, height: height2 },
|
|
8922
8922
|
"data-testid": testId,
|
|
8923
8923
|
children: [
|
|
@@ -8949,7 +8949,7 @@ const Empty = ({
|
|
|
8949
8949
|
)
|
|
8950
8950
|
] })
|
|
8951
8951
|
] }) }),
|
|
8952
|
-
text2 !== "" && /* @__PURE__ */ jsx("div", { className: styles$
|
|
8952
|
+
text2 !== "" && /* @__PURE__ */ jsx("div", { className: styles$B.text, children: /* @__PURE__ */ jsx(Text, { faint: true, children: text2 }) }),
|
|
8953
8953
|
children
|
|
8954
8954
|
]
|
|
8955
8955
|
}
|
|
@@ -9003,7 +9003,7 @@ const FileButton = ({
|
|
|
9003
9003
|
] });
|
|
9004
9004
|
};
|
|
9005
9005
|
const inputGroup = "_inputGroup_biuoa_1";
|
|
9006
|
-
const styles$
|
|
9006
|
+
const styles$A = {
|
|
9007
9007
|
inputGroup
|
|
9008
9008
|
};
|
|
9009
9009
|
const isDOMTypeElement = (element) => {
|
|
@@ -9028,43 +9028,43 @@ const InputGroup = ({
|
|
|
9028
9028
|
return /* @__PURE__ */ jsx(
|
|
9029
9029
|
"div",
|
|
9030
9030
|
{
|
|
9031
|
-
className: cx$2(styles$
|
|
9031
|
+
className: cx$2(styles$A.inputGroup),
|
|
9032
9032
|
style: { width: width2 },
|
|
9033
9033
|
children: elements
|
|
9034
9034
|
}
|
|
9035
9035
|
);
|
|
9036
9036
|
};
|
|
9037
|
-
const inputInTable$
|
|
9038
|
-
const inputHover$
|
|
9039
|
-
const inputFocus$
|
|
9040
|
-
const inputError$
|
|
9041
|
-
const inputWarning$
|
|
9042
|
-
const inputDisabled$
|
|
9043
|
-
const hideScrollbars$
|
|
9044
|
-
const input = "_input_1285q_1";
|
|
9045
|
-
const isInTable$
|
|
9046
|
-
const small$
|
|
9047
|
-
const right$
|
|
9048
|
-
const groupOrderFirst$
|
|
9049
|
-
const groupOrderMiddle$
|
|
9050
|
-
const groupOrderLast$
|
|
9051
|
-
const styles$
|
|
9052
|
-
inputInTable: inputInTable$
|
|
9053
|
-
inputHover: inputHover$
|
|
9054
|
-
inputFocus: inputFocus$
|
|
9055
|
-
inputError: inputError$
|
|
9056
|
-
inputWarning: inputWarning$
|
|
9057
|
-
inputDisabled: inputDisabled$
|
|
9058
|
-
hideScrollbars: hideScrollbars$
|
|
9059
|
-
input,
|
|
9060
|
-
isInTable: isInTable$
|
|
9061
|
-
small: small$
|
|
9062
|
-
right: right$
|
|
9063
|
-
groupOrderFirst: groupOrderFirst$
|
|
9064
|
-
groupOrderMiddle: groupOrderMiddle$
|
|
9065
|
-
groupOrderLast: groupOrderLast$
|
|
9037
|
+
const inputInTable$9 = "_inputInTable_1285q_1";
|
|
9038
|
+
const inputHover$9 = "_inputHover_1285q_13";
|
|
9039
|
+
const inputFocus$9 = "_inputFocus_1285q_18";
|
|
9040
|
+
const inputError$9 = "_inputError_1285q_25";
|
|
9041
|
+
const inputWarning$9 = "_inputWarning_1285q_26";
|
|
9042
|
+
const inputDisabled$9 = "_inputDisabled_1285q_61";
|
|
9043
|
+
const hideScrollbars$9 = "_hideScrollbars_1285q_67";
|
|
9044
|
+
const input$1 = "_input_1285q_1";
|
|
9045
|
+
const isInTable$3 = "_isInTable_1285q_100";
|
|
9046
|
+
const small$8 = "_small_1285q_124";
|
|
9047
|
+
const right$5 = "_right_1285q_170";
|
|
9048
|
+
const groupOrderFirst$3 = "_groupOrderFirst_1285q_173";
|
|
9049
|
+
const groupOrderMiddle$3 = "_groupOrderMiddle_1285q_174";
|
|
9050
|
+
const groupOrderLast$3 = "_groupOrderLast_1285q_175";
|
|
9051
|
+
const styles$z = {
|
|
9052
|
+
inputInTable: inputInTable$9,
|
|
9053
|
+
inputHover: inputHover$9,
|
|
9054
|
+
inputFocus: inputFocus$9,
|
|
9055
|
+
inputError: inputError$9,
|
|
9056
|
+
inputWarning: inputWarning$9,
|
|
9057
|
+
inputDisabled: inputDisabled$9,
|
|
9058
|
+
hideScrollbars: hideScrollbars$9,
|
|
9059
|
+
input: input$1,
|
|
9060
|
+
isInTable: isInTable$3,
|
|
9061
|
+
small: small$8,
|
|
9062
|
+
right: right$5,
|
|
9063
|
+
groupOrderFirst: groupOrderFirst$3,
|
|
9064
|
+
groupOrderMiddle: groupOrderMiddle$3,
|
|
9065
|
+
groupOrderLast: groupOrderLast$3
|
|
9066
9066
|
};
|
|
9067
|
-
const Input = forwardRef(
|
|
9067
|
+
const Input$1 = forwardRef(
|
|
9068
9068
|
({
|
|
9069
9069
|
error: error2 = null,
|
|
9070
9070
|
tooltip: tooltip2 = null,
|
|
@@ -9100,11 +9100,11 @@ const Input = forwardRef(
|
|
|
9100
9100
|
if (groupOrder) {
|
|
9101
9101
|
switch (groupOrder) {
|
|
9102
9102
|
case "first":
|
|
9103
|
-
return styles$
|
|
9103
|
+
return styles$z.groupOrderFirst;
|
|
9104
9104
|
case "last":
|
|
9105
|
-
return styles$
|
|
9105
|
+
return styles$z.groupOrderLast;
|
|
9106
9106
|
default:
|
|
9107
|
-
return styles$
|
|
9107
|
+
return styles$z.groupOrderMiddle;
|
|
9108
9108
|
}
|
|
9109
9109
|
}
|
|
9110
9110
|
return "";
|
|
@@ -9138,10 +9138,10 @@ const Input = forwardRef(
|
|
|
9138
9138
|
autoComplete: "off",
|
|
9139
9139
|
disabled: disabled2 || disabledContext,
|
|
9140
9140
|
className: cx$2(
|
|
9141
|
-
styles$
|
|
9142
|
-
right2 ? styles$
|
|
9143
|
-
small2 ? styles$
|
|
9144
|
-
isInTable2 ? styles$
|
|
9141
|
+
styles$z.input,
|
|
9142
|
+
right2 ? styles$z.right : "",
|
|
9143
|
+
small2 ? styles$z.small : "",
|
|
9144
|
+
isInTable2 ? styles$z.isInTable : ""
|
|
9145
9145
|
),
|
|
9146
9146
|
style: { width: width2 },
|
|
9147
9147
|
"data-error": error2 || null,
|
|
@@ -9154,7 +9154,7 @@ const Input = forwardRef(
|
|
|
9154
9154
|
}
|
|
9155
9155
|
);
|
|
9156
9156
|
const fileInput = "_fileInput_1elar_1";
|
|
9157
|
-
const styles$
|
|
9157
|
+
const styles$y = {
|
|
9158
9158
|
fileInput
|
|
9159
9159
|
};
|
|
9160
9160
|
var InputReaderMethods = /* @__PURE__ */ ((InputReaderMethods2) => {
|
|
@@ -9232,7 +9232,7 @@ const FileInput = ({
|
|
|
9232
9232
|
};
|
|
9233
9233
|
return /* @__PURE__ */ jsxs("div", { onClick: handleClick2, style: { width: width2 }, children: [
|
|
9234
9234
|
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
9235
|
-
/* @__PURE__ */ jsx(Input, { value: fileName || "", placeholder: placeholder3, disabled: true }),
|
|
9235
|
+
/* @__PURE__ */ jsx(Input$1, { value: fileName || "", placeholder: placeholder3, disabled: true }),
|
|
9236
9236
|
/* @__PURE__ */ jsx(
|
|
9237
9237
|
Button$1,
|
|
9238
9238
|
{
|
|
@@ -9248,7 +9248,7 @@ const FileInput = ({
|
|
|
9248
9248
|
{
|
|
9249
9249
|
name: name2,
|
|
9250
9250
|
ref: inputRef,
|
|
9251
|
-
className: styles$
|
|
9251
|
+
className: styles$y.fileInput,
|
|
9252
9252
|
type: "file",
|
|
9253
9253
|
accept,
|
|
9254
9254
|
multiple: multi,
|
|
@@ -9258,13 +9258,13 @@ const FileInput = ({
|
|
|
9258
9258
|
)
|
|
9259
9259
|
] });
|
|
9260
9260
|
};
|
|
9261
|
-
const label$
|
|
9261
|
+
const label$7 = "_label_18pfe_1";
|
|
9262
9262
|
const labelLeft$1 = "_labelLeft_18pfe_5";
|
|
9263
|
-
const icons = "_icons_18pfe_13";
|
|
9264
|
-
const styles$
|
|
9265
|
-
label: label$
|
|
9263
|
+
const icons$1 = "_icons_18pfe_13";
|
|
9264
|
+
const styles$x = {
|
|
9265
|
+
label: label$7,
|
|
9266
9266
|
labelLeft: labelLeft$1,
|
|
9267
|
-
icons
|
|
9267
|
+
icons: icons$1
|
|
9268
9268
|
};
|
|
9269
9269
|
const Label$2 = ({
|
|
9270
9270
|
label: label2 = null,
|
|
@@ -9284,9 +9284,9 @@ const Label$2 = ({
|
|
|
9284
9284
|
libraryIcon,
|
|
9285
9285
|
labelLeft: labelLeft2 = false
|
|
9286
9286
|
}) => {
|
|
9287
|
-
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
9287
|
+
return /* @__PURE__ */ jsx("div", { className: cx$2(styles$x.label, labelLeft2 ? styles$x.labelLeft : ""), children: /* @__PURE__ */ jsxs("label", { style: { width: width2 || "" }, children: [
|
|
9288
9288
|
label2,
|
|
9289
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
9289
|
+
/* @__PURE__ */ jsxs("div", { className: styles$x.icons, children: [
|
|
9290
9290
|
(helpText || onClickHelp) && /* @__PURE__ */ jsx(
|
|
9291
9291
|
HelpIcon,
|
|
9292
9292
|
{
|
|
@@ -9321,7 +9321,7 @@ const labelLeft = "_labelLeft_1xoss_5";
|
|
|
9321
9321
|
const fieldInput = "_fieldInput_1xoss_9";
|
|
9322
9322
|
const formRow$1 = "_formRow_1xoss_12";
|
|
9323
9323
|
const button$2 = "_button_1xoss_22";
|
|
9324
|
-
const styles$
|
|
9324
|
+
const styles$w = {
|
|
9325
9325
|
field,
|
|
9326
9326
|
labelLeft,
|
|
9327
9327
|
fieldInput,
|
|
@@ -9352,7 +9352,7 @@ const Field = ({
|
|
|
9352
9352
|
return /* @__PURE__ */ jsxs(
|
|
9353
9353
|
"div",
|
|
9354
9354
|
{
|
|
9355
|
-
className: cx$2(styles$
|
|
9355
|
+
className: cx$2(styles$w.field, labelLeft2 ? styles$w.labelLeft : ""),
|
|
9356
9356
|
"data-testid": testId,
|
|
9357
9357
|
children: [
|
|
9358
9358
|
(label2 || labelLeft2) && /* @__PURE__ */ jsx(
|
|
@@ -9369,7 +9369,7 @@ const Field = ({
|
|
|
9369
9369
|
labelLeft: labelLeft2
|
|
9370
9370
|
}
|
|
9371
9371
|
),
|
|
9372
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
9372
|
+
/* @__PURE__ */ jsx("div", { className: styles$w.fieldInput, children })
|
|
9373
9373
|
]
|
|
9374
9374
|
}
|
|
9375
9375
|
);
|
|
@@ -9400,11 +9400,11 @@ const Flex = ({
|
|
|
9400
9400
|
);
|
|
9401
9401
|
};
|
|
9402
9402
|
const formRow = "_formRow_odewu_1";
|
|
9403
|
-
const styles$
|
|
9403
|
+
const styles$v = {
|
|
9404
9404
|
formRow
|
|
9405
9405
|
};
|
|
9406
9406
|
const FormRow = ({ children }) => {
|
|
9407
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
9407
|
+
return /* @__PURE__ */ jsx("div", { className: styles$v.formRow, children });
|
|
9408
9408
|
};
|
|
9409
9409
|
const getGapValue = (gap) => {
|
|
9410
9410
|
if (typeof gap === "boolean") {
|
|
@@ -9460,16 +9460,16 @@ const Grid = ({
|
|
|
9460
9460
|
);
|
|
9461
9461
|
};
|
|
9462
9462
|
const addon = "_addon_b4w53_1";
|
|
9463
|
-
const small$
|
|
9464
|
-
const groupOrderFirst$
|
|
9465
|
-
const groupOrderMiddle$
|
|
9466
|
-
const groupOrderLast$
|
|
9467
|
-
const styles$
|
|
9463
|
+
const small$7 = "_small_b4w53_12";
|
|
9464
|
+
const groupOrderFirst$2 = "_groupOrderFirst_b4w53_16";
|
|
9465
|
+
const groupOrderMiddle$2 = "_groupOrderMiddle_b4w53_17";
|
|
9466
|
+
const groupOrderLast$2 = "_groupOrderLast_b4w53_21";
|
|
9467
|
+
const styles$u = {
|
|
9468
9468
|
addon,
|
|
9469
|
-
small: small$
|
|
9470
|
-
groupOrderFirst: groupOrderFirst$
|
|
9471
|
-
groupOrderMiddle: groupOrderMiddle$
|
|
9472
|
-
groupOrderLast: groupOrderLast$
|
|
9469
|
+
small: small$7,
|
|
9470
|
+
groupOrderFirst: groupOrderFirst$2,
|
|
9471
|
+
groupOrderMiddle: groupOrderMiddle$2,
|
|
9472
|
+
groupOrderLast: groupOrderLast$2
|
|
9473
9473
|
};
|
|
9474
9474
|
const InputGroupAddon = ({
|
|
9475
9475
|
children,
|
|
@@ -9480,16 +9480,16 @@ const InputGroupAddon = ({
|
|
|
9480
9480
|
if (groupOrder) {
|
|
9481
9481
|
switch (groupOrder) {
|
|
9482
9482
|
case GroupOrder.FIRST:
|
|
9483
|
-
return styles$
|
|
9483
|
+
return styles$u.groupOrderFirst;
|
|
9484
9484
|
case GroupOrder.LAST:
|
|
9485
|
-
return styles$
|
|
9485
|
+
return styles$u.groupOrderLast;
|
|
9486
9486
|
default:
|
|
9487
|
-
return styles$
|
|
9487
|
+
return styles$u.groupOrderMiddle;
|
|
9488
9488
|
}
|
|
9489
9489
|
}
|
|
9490
9490
|
return "";
|
|
9491
9491
|
})();
|
|
9492
|
-
return /* @__PURE__ */ jsx("span", { className: cx$2(styles$
|
|
9492
|
+
return /* @__PURE__ */ jsx("span", { className: cx$2(styles$u.addon, order2, small2 ? styles$u.small : ""), children });
|
|
9493
9493
|
};
|
|
9494
9494
|
function _typeof$2(o) {
|
|
9495
9495
|
"@babel/helpers - typeof";
|
|
@@ -9551,7 +9551,7 @@ var $$observable = function() {
|
|
|
9551
9551
|
var randomString = function randomString2() {
|
|
9552
9552
|
return Math.random().toString(36).substring(7).split("").join(".");
|
|
9553
9553
|
};
|
|
9554
|
-
var ActionTypes = {
|
|
9554
|
+
var ActionTypes$1 = {
|
|
9555
9555
|
INIT: "@@redux/INIT" + randomString(),
|
|
9556
9556
|
REPLACE: "@@redux/REPLACE" + randomString(),
|
|
9557
9557
|
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
|
@@ -9698,7 +9698,7 @@ function createStore$1(reducer2, preloadedState, enhancer) {
|
|
|
9698
9698
|
}
|
|
9699
9699
|
currentReducer = nextReducer;
|
|
9700
9700
|
dispatch({
|
|
9701
|
-
type: ActionTypes.REPLACE
|
|
9701
|
+
type: ActionTypes$1.REPLACE
|
|
9702
9702
|
});
|
|
9703
9703
|
}
|
|
9704
9704
|
function observable() {
|
|
@@ -9733,7 +9733,7 @@ function createStore$1(reducer2, preloadedState, enhancer) {
|
|
|
9733
9733
|
}, _ref;
|
|
9734
9734
|
}
|
|
9735
9735
|
dispatch({
|
|
9736
|
-
type: ActionTypes.INIT
|
|
9736
|
+
type: ActionTypes$1.INIT
|
|
9737
9737
|
});
|
|
9738
9738
|
return _ref2 = {
|
|
9739
9739
|
dispatch,
|
|
@@ -10895,12 +10895,12 @@ function isPlainObject$3(obj) {
|
|
|
10895
10895
|
}
|
|
10896
10896
|
return proto === baseProto;
|
|
10897
10897
|
}
|
|
10898
|
-
function warning$4(
|
|
10898
|
+
function warning$4(message2) {
|
|
10899
10899
|
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
10900
|
-
console.error(
|
|
10900
|
+
console.error(message2);
|
|
10901
10901
|
}
|
|
10902
10902
|
try {
|
|
10903
|
-
throw new Error(
|
|
10903
|
+
throw new Error(message2);
|
|
10904
10904
|
} catch (e2) {
|
|
10905
10905
|
}
|
|
10906
10906
|
}
|
|
@@ -11166,11 +11166,11 @@ var useMemo = useMemoOne;
|
|
|
11166
11166
|
var useCallback = useCallbackOne;
|
|
11167
11167
|
var isProduction$2 = process.env.NODE_ENV === "production";
|
|
11168
11168
|
var prefix$2 = "Invariant failed";
|
|
11169
|
-
function invariant$4(condition,
|
|
11169
|
+
function invariant$4(condition, message2) {
|
|
11170
11170
|
if (isProduction$2) {
|
|
11171
11171
|
throw new Error(prefix$2);
|
|
11172
11172
|
}
|
|
11173
|
-
var provided = typeof
|
|
11173
|
+
var provided = typeof message2 === "function" ? message2() : message2;
|
|
11174
11174
|
var value = provided ? "".concat(prefix$2, ": ").concat(provided) : prefix$2;
|
|
11175
11175
|
throw new Error(value);
|
|
11176
11176
|
}
|
|
@@ -11380,14 +11380,14 @@ var lineStartWithSpaces = /^[ \t]*/gm;
|
|
|
11380
11380
|
var clean = function clean2(value) {
|
|
11381
11381
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
|
11382
11382
|
};
|
|
11383
|
-
var getDevMessage = function getDevMessage2(
|
|
11384
|
-
return clean("\n %creact-beautiful-dnd\n\n %c" + clean(
|
|
11383
|
+
var getDevMessage = function getDevMessage2(message2) {
|
|
11384
|
+
return clean("\n %creact-beautiful-dnd\n\n %c" + clean(message2) + "\n\n %c👷 This is a development only message. It will be removed in production builds.\n");
|
|
11385
11385
|
};
|
|
11386
|
-
var getFormattedMessage = function getFormattedMessage2(
|
|
11387
|
-
return [getDevMessage(
|
|
11386
|
+
var getFormattedMessage = function getFormattedMessage2(message2) {
|
|
11387
|
+
return [getDevMessage(message2), "color: #00C584; font-size: 1.2em; font-weight: bold;", "line-height: 1.5", "color: #723874;"];
|
|
11388
11388
|
};
|
|
11389
11389
|
var isDisabledFlag = "__react-beautiful-dnd-disable-dev-warnings";
|
|
11390
|
-
function log(type,
|
|
11390
|
+
function log(type, message2) {
|
|
11391
11391
|
var _console;
|
|
11392
11392
|
if (isProduction$1) {
|
|
11393
11393
|
return;
|
|
@@ -11395,7 +11395,7 @@ function log(type, message) {
|
|
|
11395
11395
|
if (typeof window !== "undefined" && window[isDisabledFlag]) {
|
|
11396
11396
|
return;
|
|
11397
11397
|
}
|
|
11398
|
-
(_console = console)[type].apply(_console, getFormattedMessage(
|
|
11398
|
+
(_console = console)[type].apply(_console, getFormattedMessage(message2));
|
|
11399
11399
|
}
|
|
11400
11400
|
var warning$3 = log.bind(null, "warn");
|
|
11401
11401
|
var error$1 = log.bind(null, "error");
|
|
@@ -11420,17 +11420,17 @@ function bindEvents(el2, bindings, sharedOptions) {
|
|
|
11420
11420
|
}
|
|
11421
11421
|
var isProduction$1$1 = process.env.NODE_ENV === "production";
|
|
11422
11422
|
var prefix = "Invariant failed";
|
|
11423
|
-
function RbdInvariant(
|
|
11424
|
-
this.message =
|
|
11423
|
+
function RbdInvariant(message2) {
|
|
11424
|
+
this.message = message2;
|
|
11425
11425
|
}
|
|
11426
11426
|
RbdInvariant.prototype.toString = function toString() {
|
|
11427
11427
|
return this.message;
|
|
11428
11428
|
};
|
|
11429
|
-
function invariant$3(condition,
|
|
11429
|
+
function invariant$3(condition, message2) {
|
|
11430
11430
|
if (isProduction$1$1) {
|
|
11431
11431
|
throw new RbdInvariant(prefix);
|
|
11432
11432
|
} else {
|
|
11433
|
-
throw new RbdInvariant(prefix + ": " + (
|
|
11433
|
+
throw new RbdInvariant(prefix + ": " + (message2 || ""));
|
|
11434
11434
|
}
|
|
11435
11435
|
}
|
|
11436
11436
|
var ErrorBoundary = function(_React$Component) {
|
|
@@ -13026,11 +13026,11 @@ var patchDroppableMap = function(droppables, updated) {
|
|
|
13026
13026
|
var clearUnusedPlaceholder = function clearUnusedPlaceholder2(_ref) {
|
|
13027
13027
|
var previousImpact = _ref.previousImpact, impact = _ref.impact, droppables = _ref.droppables;
|
|
13028
13028
|
var last = whatIsDraggedOver(previousImpact);
|
|
13029
|
-
var
|
|
13029
|
+
var now2 = whatIsDraggedOver(impact);
|
|
13030
13030
|
if (!last) {
|
|
13031
13031
|
return droppables;
|
|
13032
13032
|
}
|
|
13033
|
-
if (last ===
|
|
13033
|
+
if (last === now2) {
|
|
13034
13034
|
return droppables;
|
|
13035
13035
|
}
|
|
13036
13036
|
var lastDroppable = droppables[last];
|
|
@@ -14094,7 +14094,7 @@ var getExpiringAnnounce = function(announce) {
|
|
|
14094
14094
|
var timeoutId = setTimeout(function() {
|
|
14095
14095
|
isExpired = true;
|
|
14096
14096
|
});
|
|
14097
|
-
var result = function result2(
|
|
14097
|
+
var result = function result2(message2) {
|
|
14098
14098
|
if (wasCalled) {
|
|
14099
14099
|
process.env.NODE_ENV !== "production" ? warning$3("Announcement already made. Not making a second announcement") : void 0;
|
|
14100
14100
|
return;
|
|
@@ -14104,7 +14104,7 @@ var getExpiringAnnounce = function(announce) {
|
|
|
14104
14104
|
return;
|
|
14105
14105
|
}
|
|
14106
14106
|
wasCalled = true;
|
|
14107
|
-
announce(
|
|
14107
|
+
announce(message2);
|
|
14108
14108
|
clearTimeout(timeoutId);
|
|
14109
14109
|
};
|
|
14110
14110
|
result.wasCalled = function() {
|
|
@@ -14411,7 +14411,7 @@ var dimensionMarshalStopper = function(marshal) {
|
|
|
14411
14411
|
};
|
|
14412
14412
|
};
|
|
14413
14413
|
};
|
|
14414
|
-
var focus = function(marshal) {
|
|
14414
|
+
var focus$1 = function(marshal) {
|
|
14415
14415
|
var isWatching2 = false;
|
|
14416
14416
|
return function() {
|
|
14417
14417
|
return function(next2) {
|
|
@@ -14494,7 +14494,7 @@ var composeEnhancers = process.env.NODE_ENV !== "production" && typeof window !=
|
|
|
14494
14494
|
}) : compose;
|
|
14495
14495
|
var createStore = function(_ref) {
|
|
14496
14496
|
var dimensionMarshal = _ref.dimensionMarshal, focusMarshal = _ref.focusMarshal, styleMarshal = _ref.styleMarshal, getResponders = _ref.getResponders, announce = _ref.announce, autoScroller = _ref.autoScroller;
|
|
14497
|
-
return createStore$1(reducer$2, composeEnhancers(applyMiddleware(style(styleMarshal), dimensionMarshalStopper(dimensionMarshal), lift$1$1(dimensionMarshal), drop$1, dropAnimationFinish, dropAnimationFlushOnScroll, pendingDrop, autoScroll(autoScroller), scrollListener, focus(focusMarshal), responders(getResponders, announce))));
|
|
14497
|
+
return createStore$1(reducer$2, composeEnhancers(applyMiddleware(style(styleMarshal), dimensionMarshalStopper(dimensionMarshal), lift$1$1(dimensionMarshal), drop$1, dropAnimationFinish, dropAnimationFlushOnScroll, pendingDrop, autoScroll(autoScroller), scrollListener, focus$1(focusMarshal), responders(getResponders, announce))));
|
|
14498
14498
|
};
|
|
14499
14499
|
var clean$1 = function clean3() {
|
|
14500
14500
|
return {
|
|
@@ -14871,8 +14871,8 @@ var stopAt = config.durationDampening.stopDampeningAt;
|
|
|
14871
14871
|
var dampenValueByTime = function(proposedScroll, dragStartTime) {
|
|
14872
14872
|
var startOfRange = dragStartTime;
|
|
14873
14873
|
var endOfRange = stopAt;
|
|
14874
|
-
var
|
|
14875
|
-
var runTime =
|
|
14874
|
+
var now2 = Date.now();
|
|
14875
|
+
var runTime = now2 - startOfRange;
|
|
14876
14876
|
if (runTime >= stopAt) {
|
|
14877
14877
|
return proposedScroll;
|
|
14878
14878
|
}
|
|
@@ -15518,11 +15518,11 @@ function useFocusMarshal(contextId) {
|
|
|
15518
15518
|
}, [tryGiveFocus]);
|
|
15519
15519
|
var tryRecordFocus = useCallback(function tryRecordFocus2(id2) {
|
|
15520
15520
|
recordRef.current = null;
|
|
15521
|
-
var
|
|
15522
|
-
if (!
|
|
15521
|
+
var focused2 = document.activeElement;
|
|
15522
|
+
if (!focused2) {
|
|
15523
15523
|
return;
|
|
15524
15524
|
}
|
|
15525
|
-
if (
|
|
15525
|
+
if (focused2.getAttribute(dragHandle.draggableId) !== id2) {
|
|
15526
15526
|
return;
|
|
15527
15527
|
}
|
|
15528
15528
|
recordRef.current = id2;
|
|
@@ -15722,13 +15722,13 @@ function useAnnouncer(contextId) {
|
|
|
15722
15722
|
});
|
|
15723
15723
|
};
|
|
15724
15724
|
}, [id2]);
|
|
15725
|
-
var announce = useCallback(function(
|
|
15725
|
+
var announce = useCallback(function(message2) {
|
|
15726
15726
|
var el2 = ref2.current;
|
|
15727
15727
|
if (el2) {
|
|
15728
|
-
el2.textContent =
|
|
15728
|
+
el2.textContent = message2;
|
|
15729
15729
|
return;
|
|
15730
15730
|
}
|
|
15731
|
-
process.env.NODE_ENV !== "production" ? warning$3('\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "' +
|
|
15731
|
+
process.env.NODE_ENV !== "production" ? warning$3('\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "' + message2 + '"\n ') : void 0;
|
|
15732
15732
|
}, []);
|
|
15733
15733
|
return announce;
|
|
15734
15734
|
}
|
|
@@ -18677,16 +18677,16 @@ var InfiniteScroll = (
|
|
|
18677
18677
|
return InfiniteScroll2;
|
|
18678
18678
|
}(Component$1)
|
|
18679
18679
|
);
|
|
18680
|
-
const inputInTable$
|
|
18681
|
-
const inputHover$
|
|
18682
|
-
const inputFocus$
|
|
18683
|
-
const inputError$
|
|
18684
|
-
const inputWarning$
|
|
18685
|
-
const inputDisabled$
|
|
18686
|
-
const hideScrollbars$
|
|
18680
|
+
const inputInTable$8 = "_inputInTable_1llou_1";
|
|
18681
|
+
const inputHover$8 = "_inputHover_1llou_13";
|
|
18682
|
+
const inputFocus$8 = "_inputFocus_1llou_18";
|
|
18683
|
+
const inputError$8 = "_inputError_1llou_25";
|
|
18684
|
+
const inputWarning$8 = "_inputWarning_1llou_26";
|
|
18685
|
+
const inputDisabled$8 = "_inputDisabled_1llou_61";
|
|
18686
|
+
const hideScrollbars$8 = "_hideScrollbars_1llou_67";
|
|
18687
18687
|
const header$1 = "_header_1llou_77";
|
|
18688
18688
|
const headerTitle = "_headerTitle_1llou_77";
|
|
18689
|
-
const heading$
|
|
18689
|
+
const heading$3 = "_heading_1llou_78";
|
|
18690
18690
|
const itemHeader = "_itemHeader_1llou_78";
|
|
18691
18691
|
const narrow = "_narrow_1llou_81";
|
|
18692
18692
|
const stickyHeader = "_stickyHeader_1llou_85";
|
|
@@ -18702,31 +18702,31 @@ const item$4 = "_item_1llou_78";
|
|
|
18702
18702
|
const action = "_action_1llou_192";
|
|
18703
18703
|
const active$3 = "_active_1llou_195";
|
|
18704
18704
|
const indented = "_indented_1llou_202";
|
|
18705
|
-
const disabled$
|
|
18706
|
-
const label$
|
|
18707
|
-
const details$
|
|
18705
|
+
const disabled$5 = "_disabled_1llou_215";
|
|
18706
|
+
const label$6 = "_label_1llou_226";
|
|
18707
|
+
const details$2 = "_details_1llou_237";
|
|
18708
18708
|
const metadata = "_metadata_1llou_238";
|
|
18709
18709
|
const itemContent = "_itemContent_1llou_246";
|
|
18710
18710
|
const indentIcon = "_indentIcon_1llou_253";
|
|
18711
18711
|
const expandIcon = "_expandIcon_1llou_258";
|
|
18712
18712
|
const expanded = "_expanded_1llou_265";
|
|
18713
|
-
const right$
|
|
18713
|
+
const right$4 = "_right_1llou_268";
|
|
18714
18714
|
const actions = "_actions_1llou_276";
|
|
18715
18715
|
const scrollableList = "_scrollableList_1llou_281";
|
|
18716
18716
|
const infiniteScrollContainer = "_infiniteScrollContainer_1llou_286";
|
|
18717
18717
|
const hideScrollbar = "_hideScrollbar_1llou_67";
|
|
18718
18718
|
const noPointerEvents = "_noPointerEvents_1llou_303";
|
|
18719
18719
|
const listStyles = {
|
|
18720
|
-
inputInTable: inputInTable$
|
|
18721
|
-
inputHover: inputHover$
|
|
18722
|
-
inputFocus: inputFocus$
|
|
18723
|
-
inputError: inputError$
|
|
18724
|
-
inputWarning: inputWarning$
|
|
18725
|
-
inputDisabled: inputDisabled$
|
|
18726
|
-
hideScrollbars: hideScrollbars$
|
|
18720
|
+
inputInTable: inputInTable$8,
|
|
18721
|
+
inputHover: inputHover$8,
|
|
18722
|
+
inputFocus: inputFocus$8,
|
|
18723
|
+
inputError: inputError$8,
|
|
18724
|
+
inputWarning: inputWarning$8,
|
|
18725
|
+
inputDisabled: inputDisabled$8,
|
|
18726
|
+
hideScrollbars: hideScrollbars$8,
|
|
18727
18727
|
header: header$1,
|
|
18728
18728
|
headerTitle,
|
|
18729
|
-
heading: heading$
|
|
18729
|
+
heading: heading$3,
|
|
18730
18730
|
itemHeader,
|
|
18731
18731
|
narrow,
|
|
18732
18732
|
stickyHeader,
|
|
@@ -18742,15 +18742,15 @@ const listStyles = {
|
|
|
18742
18742
|
action,
|
|
18743
18743
|
active: active$3,
|
|
18744
18744
|
indented,
|
|
18745
|
-
disabled: disabled$
|
|
18746
|
-
label: label$
|
|
18747
|
-
details: details$
|
|
18745
|
+
disabled: disabled$5,
|
|
18746
|
+
label: label$6,
|
|
18747
|
+
details: details$2,
|
|
18748
18748
|
metadata,
|
|
18749
18749
|
itemContent,
|
|
18750
18750
|
indentIcon,
|
|
18751
18751
|
expandIcon,
|
|
18752
18752
|
expanded,
|
|
18753
|
-
right: right$
|
|
18753
|
+
right: right$4,
|
|
18754
18754
|
actions,
|
|
18755
18755
|
scrollableList,
|
|
18756
18756
|
infiniteScrollContainer,
|
|
@@ -18785,7 +18785,7 @@ const ListHeading = forwardRef(
|
|
|
18785
18785
|
onClickToggleNarrow: onToggleNarrow
|
|
18786
18786
|
}
|
|
18787
18787
|
),
|
|
18788
|
-
name2 && /* @__PURE__ */ jsx("div", { className: listStyles.headerTitle, children: /* @__PURE__ */ jsx(Heading$
|
|
18788
|
+
name2 && /* @__PURE__ */ jsx("div", { className: listStyles.headerTitle, children: /* @__PURE__ */ jsx(Heading$2, { top: true, marginBottom: 0, children: name2 }) }),
|
|
18789
18789
|
/* @__PURE__ */ jsx("div", { className: listStyles.right, children: /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: actions2 }) }) })
|
|
18790
18790
|
]
|
|
18791
18791
|
}
|
|
@@ -18976,15 +18976,15 @@ const cover = "_cover_477i5_14";
|
|
|
18976
18976
|
const dimmer = "_dimmer_477i5_21";
|
|
18977
18977
|
const content$2 = "_content_477i5_44";
|
|
18978
18978
|
const text$1 = "_text_477i5_49";
|
|
18979
|
-
const details = "_details_477i5_53";
|
|
18980
|
-
const styles$
|
|
18979
|
+
const details$1 = "_details_477i5_53";
|
|
18980
|
+
const styles$t = {
|
|
18981
18981
|
loader,
|
|
18982
18982
|
fullViewPortSize,
|
|
18983
18983
|
cover,
|
|
18984
18984
|
dimmer,
|
|
18985
18985
|
content: content$2,
|
|
18986
18986
|
text: text$1,
|
|
18987
|
-
details
|
|
18987
|
+
details: details$1
|
|
18988
18988
|
};
|
|
18989
18989
|
const Loader = ({
|
|
18990
18990
|
width: width2,
|
|
@@ -19002,22 +19002,22 @@ const Loader = ({
|
|
|
19002
19002
|
return /* @__PURE__ */ jsx(
|
|
19003
19003
|
"div",
|
|
19004
19004
|
{
|
|
19005
|
-
className: cx$2(styles$
|
|
19006
|
-
[styles$
|
|
19005
|
+
className: cx$2(styles$t.loader, cover2 ? styles$t.cover : "", {
|
|
19006
|
+
[styles$t.fullViewPortSize]: fullViewPortSize2
|
|
19007
19007
|
}),
|
|
19008
19008
|
style: { width: width2, height: height2 },
|
|
19009
19009
|
"data-testid": testId,
|
|
19010
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
19010
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$t.dimmer, style: { background: background2, color: color2 }, children: /* @__PURE__ */ jsxs(
|
|
19011
19011
|
"div",
|
|
19012
19012
|
{
|
|
19013
|
-
className: styles$
|
|
19013
|
+
className: styles$t.content,
|
|
19014
19014
|
"data-testid": testId && `${testId}-content`,
|
|
19015
19015
|
children: [
|
|
19016
19016
|
children,
|
|
19017
19017
|
text2 && /* @__PURE__ */ jsx(
|
|
19018
19018
|
"div",
|
|
19019
19019
|
{
|
|
19020
|
-
className: styles$
|
|
19020
|
+
className: styles$t.text,
|
|
19021
19021
|
"data-testid": testId && `${testId}-text`,
|
|
19022
19022
|
children: text2
|
|
19023
19023
|
}
|
|
@@ -19025,7 +19025,7 @@ const Loader = ({
|
|
|
19025
19025
|
details2 && /* @__PURE__ */ jsx(
|
|
19026
19026
|
"div",
|
|
19027
19027
|
{
|
|
19028
|
-
className: styles$
|
|
19028
|
+
className: styles$t.details,
|
|
19029
19029
|
"data-testid": testId && `${testId}-details`,
|
|
19030
19030
|
children: details2
|
|
19031
19031
|
}
|
|
@@ -19208,13 +19208,13 @@ const List = ({
|
|
|
19208
19208
|
}
|
|
19209
19209
|
);
|
|
19210
19210
|
};
|
|
19211
|
-
const inputInTable$
|
|
19212
|
-
const inputHover$
|
|
19213
|
-
const inputFocus$
|
|
19214
|
-
const inputError$
|
|
19215
|
-
const inputWarning$
|
|
19216
|
-
const inputDisabled$
|
|
19217
|
-
const hideScrollbars$
|
|
19211
|
+
const inputInTable$7 = "_inputInTable_1okhq_1";
|
|
19212
|
+
const inputHover$7 = "_inputHover_1okhq_13";
|
|
19213
|
+
const inputFocus$7 = "_inputFocus_1okhq_18";
|
|
19214
|
+
const inputError$7 = "_inputError_1okhq_25";
|
|
19215
|
+
const inputWarning$7 = "_inputWarning_1okhq_26";
|
|
19216
|
+
const inputDisabled$7 = "_inputDisabled_1okhq_61";
|
|
19217
|
+
const hideScrollbars$7 = "_hideScrollbars_1okhq_67";
|
|
19218
19218
|
const container$1 = "_container_1okhq_83";
|
|
19219
19219
|
const block$1 = "_block_1okhq_101";
|
|
19220
19220
|
const info = "_info_1okhq_104";
|
|
@@ -19222,21 +19222,21 @@ const success = "_success_1okhq_108";
|
|
|
19222
19222
|
const warning$2 = "_warning_1okhq_112";
|
|
19223
19223
|
const error = "_error_1okhq_116";
|
|
19224
19224
|
const content$1 = "_content_1okhq_120";
|
|
19225
|
-
const heading$
|
|
19226
|
-
const icon$
|
|
19225
|
+
const heading$2 = "_heading_1okhq_124";
|
|
19226
|
+
const icon$3 = "_icon_1okhq_131";
|
|
19227
19227
|
const dismiss$1 = "_dismiss_1okhq_139";
|
|
19228
19228
|
const absolute = "_absolute_1okhq_143";
|
|
19229
19229
|
const legendToggle = "_legendToggle_1okhq_155";
|
|
19230
19230
|
const detailsText = "_detailsText_1okhq_165";
|
|
19231
19231
|
const footer$1 = "_footer_1okhq_169";
|
|
19232
|
-
const styles$
|
|
19233
|
-
inputInTable: inputInTable$
|
|
19234
|
-
inputHover: inputHover$
|
|
19235
|
-
inputFocus: inputFocus$
|
|
19236
|
-
inputError: inputError$
|
|
19237
|
-
inputWarning: inputWarning$
|
|
19238
|
-
inputDisabled: inputDisabled$
|
|
19239
|
-
hideScrollbars: hideScrollbars$
|
|
19232
|
+
const styles$s = {
|
|
19233
|
+
inputInTable: inputInTable$7,
|
|
19234
|
+
inputHover: inputHover$7,
|
|
19235
|
+
inputFocus: inputFocus$7,
|
|
19236
|
+
inputError: inputError$7,
|
|
19237
|
+
inputWarning: inputWarning$7,
|
|
19238
|
+
inputDisabled: inputDisabled$7,
|
|
19239
|
+
hideScrollbars: hideScrollbars$7,
|
|
19240
19240
|
container: container$1,
|
|
19241
19241
|
block: block$1,
|
|
19242
19242
|
info,
|
|
@@ -19244,8 +19244,8 @@ const styles$q = {
|
|
|
19244
19244
|
warning: warning$2,
|
|
19245
19245
|
error,
|
|
19246
19246
|
content: content$1,
|
|
19247
|
-
heading: heading$
|
|
19248
|
-
icon: icon$
|
|
19247
|
+
heading: heading$2,
|
|
19248
|
+
icon: icon$3,
|
|
19249
19249
|
dismiss: dismiss$1,
|
|
19250
19250
|
absolute,
|
|
19251
19251
|
legendToggle,
|
|
@@ -19273,9 +19273,9 @@ const Dismiss = ({
|
|
|
19273
19273
|
"div",
|
|
19274
19274
|
{
|
|
19275
19275
|
className: cx$2(
|
|
19276
|
-
styles$
|
|
19277
|
-
isInToast ? styles$
|
|
19278
|
-
type === MessageType.INFO ? styles$
|
|
19276
|
+
styles$s.dismiss,
|
|
19277
|
+
isInToast ? styles$s.absolute : "",
|
|
19278
|
+
type === MessageType.INFO ? styles$s.info : type === MessageType.SUCCESS ? styles$s.success : type === MessageType.WARNING ? styles$s.warning : type === MessageType.ERROR ? styles$s.error : null
|
|
19279
19279
|
),
|
|
19280
19280
|
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CLOSE, onClick: onClose, testId })
|
|
19281
19281
|
}
|
|
@@ -19294,8 +19294,8 @@ const reducer$1 = (state, action2) => {
|
|
|
19294
19294
|
};
|
|
19295
19295
|
const Details = ({ details: details2, visible, dispatch }) => {
|
|
19296
19296
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
19297
|
-
/* @__PURE__ */ jsx("div", { className: cx$2(styles$
|
|
19298
|
-
visible ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
19297
|
+
/* @__PURE__ */ jsx("div", { className: cx$2(styles$s.legendToggle), onClick: dispatch, children: visible ? "Hide details" : "Show details" }),
|
|
19298
|
+
visible ? /* @__PURE__ */ jsx("div", { className: styles$s.detailsText, children: details2 }) : null
|
|
19299
19299
|
] });
|
|
19300
19300
|
};
|
|
19301
19301
|
const DialogIcon = ({ type }) => {
|
|
@@ -19311,7 +19311,7 @@ const DialogIcon = ({ type }) => {
|
|
|
19311
19311
|
return /* @__PURE__ */ jsx(Icon, { icon: IconType.INFO, size: size2 });
|
|
19312
19312
|
}
|
|
19313
19313
|
};
|
|
19314
|
-
const Message = ({ message }) => {
|
|
19314
|
+
const Message = ({ message: message2 }) => {
|
|
19315
19315
|
const {
|
|
19316
19316
|
visible,
|
|
19317
19317
|
type = MessageType.INFO,
|
|
@@ -19325,7 +19325,7 @@ const Message = ({ message }) => {
|
|
|
19325
19325
|
onClose,
|
|
19326
19326
|
width: width2,
|
|
19327
19327
|
maxHeight
|
|
19328
|
-
} =
|
|
19328
|
+
} = message2;
|
|
19329
19329
|
const initialState2 = {
|
|
19330
19330
|
detailsVisible
|
|
19331
19331
|
};
|
|
@@ -19334,15 +19334,15 @@ const Message = ({ message }) => {
|
|
|
19334
19334
|
"div",
|
|
19335
19335
|
{
|
|
19336
19336
|
className: cx$2(
|
|
19337
|
-
styles$
|
|
19338
|
-
width2 ? styles$
|
|
19339
|
-
type === MessageType.SUCCESS ? styles$
|
|
19337
|
+
styles$s.container,
|
|
19338
|
+
width2 ? styles$s.block : null,
|
|
19339
|
+
type === MessageType.SUCCESS ? styles$s.success : type === MessageType.WARNING ? styles$s.warning : type === MessageType.ERROR ? styles$s.error : styles$s.info
|
|
19340
19340
|
),
|
|
19341
19341
|
style: { width: width2, maxHeight },
|
|
19342
19342
|
children: [
|
|
19343
|
-
/* @__PURE__ */ jsx("div", { children: icon2 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
19344
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
19345
|
-
heading2 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
19343
|
+
/* @__PURE__ */ jsx("div", { children: icon2 ? /* @__PURE__ */ jsx("div", { className: styles$s.icon, children: /* @__PURE__ */ jsx(DialogIcon, { type }) }) : null }),
|
|
19344
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.content, children: [
|
|
19345
|
+
heading2 ? /* @__PURE__ */ jsx("div", { className: styles$s.heading, children: heading2 }) : null,
|
|
19346
19346
|
/* @__PURE__ */ jsx("div", { children: content2 }),
|
|
19347
19347
|
details2 ? /* @__PURE__ */ jsx(
|
|
19348
19348
|
Details,
|
|
@@ -19352,7 +19352,7 @@ const Message = ({ message }) => {
|
|
|
19352
19352
|
dispatch: () => dispatch({ type: MessageToggle.TOGGLE_DETAILS })
|
|
19353
19353
|
}
|
|
19354
19354
|
) : null,
|
|
19355
|
-
!!footer2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
19355
|
+
!!footer2 && /* @__PURE__ */ jsx("div", { className: styles$s.footer, children: footer2 })
|
|
19356
19356
|
] }),
|
|
19357
19357
|
withDismiss ? /* @__PURE__ */ jsx(Dismiss, { type, onClose }) : null
|
|
19358
19358
|
]
|
|
@@ -19384,7 +19384,7 @@ const wrapper$2 = "_wrapper_sb0hc_1";
|
|
|
19384
19384
|
const contentContainer = "_contentContainer_sb0hc_15";
|
|
19385
19385
|
const centered = "_centered_sb0hc_24";
|
|
19386
19386
|
const newLine = "_newLine_sb0hc_28";
|
|
19387
|
-
const styles$
|
|
19387
|
+
const styles$r = {
|
|
19388
19388
|
wrapper: wrapper$2,
|
|
19389
19389
|
contentContainer,
|
|
19390
19390
|
centered,
|
|
@@ -19404,12 +19404,12 @@ const Wrapper = ({ children }) => {
|
|
|
19404
19404
|
}
|
|
19405
19405
|
}
|
|
19406
19406
|
}, []);
|
|
19407
|
-
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, tabIndex: -1, className: cx$2(styles$
|
|
19407
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, tabIndex: -1, className: cx$2(styles$r.wrapper), children });
|
|
19408
19408
|
};
|
|
19409
19409
|
const Content$2 = ({ children, width: width2, centered: centered2 }) => /* @__PURE__ */ jsx(
|
|
19410
19410
|
"div",
|
|
19411
19411
|
{
|
|
19412
|
-
className: cx$2(styles$
|
|
19412
|
+
className: cx$2(styles$r.contentContainer, centered2 ? styles$r.centered : ""),
|
|
19413
19413
|
style: { maxWidth: width2 },
|
|
19414
19414
|
children
|
|
19415
19415
|
}
|
|
@@ -19457,36 +19457,36 @@ const Modal = ({
|
|
|
19457
19457
|
const menu$1 = "_menu_12x4u_1";
|
|
19458
19458
|
const header = "_header_12x4u_11";
|
|
19459
19459
|
const item$3 = "_item_12x4u_27";
|
|
19460
|
-
const heading = "_heading_12x4u_32";
|
|
19461
|
-
const styles$
|
|
19460
|
+
const heading$1 = "_heading_12x4u_32";
|
|
19461
|
+
const styles$q = {
|
|
19462
19462
|
menu: menu$1,
|
|
19463
19463
|
header,
|
|
19464
19464
|
item: item$3,
|
|
19465
|
-
heading
|
|
19465
|
+
heading: heading$1
|
|
19466
19466
|
};
|
|
19467
|
-
const Option = ({
|
|
19467
|
+
const Option$1 = ({
|
|
19468
19468
|
option: option2,
|
|
19469
19469
|
onChange
|
|
19470
19470
|
}) => {
|
|
19471
19471
|
const { key: key2, label: label2, selected: selected2 } = option2;
|
|
19472
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
19472
|
+
return /* @__PURE__ */ jsx("div", { className: styles$q.item, children: /* @__PURE__ */ jsx(CheckBox, { label: label2, noMargin: true, checked: selected2, onChange }) }, key2);
|
|
19473
19473
|
};
|
|
19474
|
-
const Heading = ({ label: label2 }) => /* @__PURE__ */ jsx("div", { className: styles$
|
|
19474
|
+
const Heading$1 = ({ label: label2 }) => /* @__PURE__ */ jsx("div", { className: styles$q.heading, children: label2 });
|
|
19475
19475
|
var DropdownType = /* @__PURE__ */ ((DropdownType2) => {
|
|
19476
19476
|
DropdownType2["HEADING"] = "Heading";
|
|
19477
19477
|
DropdownType2["DIVIDER"] = "Divider";
|
|
19478
19478
|
DropdownType2["DEFAULT"] = "Default";
|
|
19479
19479
|
return DropdownType2;
|
|
19480
19480
|
})(DropdownType || {});
|
|
19481
|
-
const Layer = ({
|
|
19481
|
+
const Layer$1 = ({
|
|
19482
19482
|
options,
|
|
19483
19483
|
onChangeOptions,
|
|
19484
19484
|
showHeader,
|
|
19485
19485
|
maxHeight
|
|
19486
19486
|
}) => {
|
|
19487
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$2("menu", styles$
|
|
19487
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$2("menu", styles$q.menu), style: { maxHeight }, children: [
|
|
19488
19488
|
showHeader && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
19489
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
19489
|
+
/* @__PURE__ */ jsxs("div", { className: styles$q.header, children: [
|
|
19490
19490
|
/* @__PURE__ */ jsx(
|
|
19491
19491
|
"a",
|
|
19492
19492
|
{
|
|
@@ -19532,12 +19532,12 @@ const Layer = ({
|
|
|
19532
19532
|
options.map((option2, index2) => {
|
|
19533
19533
|
switch (option2.type) {
|
|
19534
19534
|
case DropdownType.HEADING:
|
|
19535
|
-
return /* @__PURE__ */ jsx(Heading, { label: option2.label }, index2);
|
|
19535
|
+
return /* @__PURE__ */ jsx(Heading$1, { label: option2.label }, index2);
|
|
19536
19536
|
case DropdownType.DIVIDER:
|
|
19537
19537
|
return /* @__PURE__ */ jsx(Divider, { margin: 0 }, index2);
|
|
19538
19538
|
default:
|
|
19539
19539
|
return /* @__PURE__ */ jsx(
|
|
19540
|
-
Option,
|
|
19540
|
+
Option$1,
|
|
19541
19541
|
{
|
|
19542
19542
|
option: option2,
|
|
19543
19543
|
onChange: (evt) => {
|
|
@@ -19572,7 +19572,7 @@ const OptionDropdown = ({
|
|
|
19572
19572
|
trigger: TriggerType.DROP_DOWN_BUTTON,
|
|
19573
19573
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
19574
19574
|
sections: /* @__PURE__ */ jsx(
|
|
19575
|
-
Layer,
|
|
19575
|
+
Layer$1,
|
|
19576
19576
|
{
|
|
19577
19577
|
options,
|
|
19578
19578
|
onChangeOptions: (evt, nextOptions) => {
|
|
@@ -19591,7 +19591,7 @@ const OptionDropdown = ({
|
|
|
19591
19591
|
};
|
|
19592
19592
|
const page = "_page_beskc_1";
|
|
19593
19593
|
const scroll$1 = "_scroll_beskc_23";
|
|
19594
|
-
const styles$
|
|
19594
|
+
const styles$p = {
|
|
19595
19595
|
page,
|
|
19596
19596
|
scroll: scroll$1
|
|
19597
19597
|
};
|
|
@@ -19606,43 +19606,43 @@ const Page = ({
|
|
|
19606
19606
|
return /* @__PURE__ */ jsx(
|
|
19607
19607
|
"div",
|
|
19608
19608
|
{
|
|
19609
|
-
className: cx$2(styles$
|
|
19609
|
+
className: cx$2(styles$p.page, scroll3 ? styles$p.scroll : ""),
|
|
19610
19610
|
style: { left: left2, padding: padding2, top: top2 },
|
|
19611
19611
|
children
|
|
19612
19612
|
}
|
|
19613
19613
|
);
|
|
19614
19614
|
};
|
|
19615
|
-
const inputInTable$
|
|
19616
|
-
const inputHover$
|
|
19617
|
-
const inputFocus$
|
|
19618
|
-
const inputError$
|
|
19619
|
-
const inputWarning$
|
|
19620
|
-
const inputDisabled$
|
|
19621
|
-
const hideScrollbars$
|
|
19615
|
+
const inputInTable$6 = "_inputInTable_sl2b5_1";
|
|
19616
|
+
const inputHover$6 = "_inputHover_sl2b5_13";
|
|
19617
|
+
const inputFocus$6 = "_inputFocus_sl2b5_18";
|
|
19618
|
+
const inputError$6 = "_inputError_sl2b5_25";
|
|
19619
|
+
const inputWarning$6 = "_inputWarning_sl2b5_26";
|
|
19620
|
+
const inputDisabled$6 = "_inputDisabled_sl2b5_61";
|
|
19621
|
+
const hideScrollbars$6 = "_hideScrollbars_sl2b5_67";
|
|
19622
19622
|
const select = "_select_sl2b5_77";
|
|
19623
|
-
const isInTable$
|
|
19623
|
+
const isInTable$2 = "_isInTable_sl2b5_121";
|
|
19624
19624
|
const unSelected = "_unSelected_sl2b5_133";
|
|
19625
|
-
const small$
|
|
19626
|
-
const right$
|
|
19627
|
-
const groupOrderFirst = "_groupOrderFirst_sl2b5_193";
|
|
19628
|
-
const groupOrderMiddle = "_groupOrderMiddle_sl2b5_194";
|
|
19629
|
-
const groupOrderLast = "_groupOrderLast_sl2b5_198";
|
|
19630
|
-
const styles$
|
|
19631
|
-
inputInTable: inputInTable$
|
|
19632
|
-
inputHover: inputHover$
|
|
19633
|
-
inputFocus: inputFocus$
|
|
19634
|
-
inputError: inputError$
|
|
19635
|
-
inputWarning: inputWarning$
|
|
19636
|
-
inputDisabled: inputDisabled$
|
|
19637
|
-
hideScrollbars: hideScrollbars$
|
|
19625
|
+
const small$6 = "_small_sl2b5_174";
|
|
19626
|
+
const right$3 = "_right_sl2b5_182";
|
|
19627
|
+
const groupOrderFirst$1 = "_groupOrderFirst_sl2b5_193";
|
|
19628
|
+
const groupOrderMiddle$1 = "_groupOrderMiddle_sl2b5_194";
|
|
19629
|
+
const groupOrderLast$1 = "_groupOrderLast_sl2b5_198";
|
|
19630
|
+
const styles$o = {
|
|
19631
|
+
inputInTable: inputInTable$6,
|
|
19632
|
+
inputHover: inputHover$6,
|
|
19633
|
+
inputFocus: inputFocus$6,
|
|
19634
|
+
inputError: inputError$6,
|
|
19635
|
+
inputWarning: inputWarning$6,
|
|
19636
|
+
inputDisabled: inputDisabled$6,
|
|
19637
|
+
hideScrollbars: hideScrollbars$6,
|
|
19638
19638
|
select,
|
|
19639
|
-
isInTable: isInTable$
|
|
19639
|
+
isInTable: isInTable$2,
|
|
19640
19640
|
unSelected,
|
|
19641
|
-
small: small$
|
|
19642
|
-
right: right$
|
|
19643
|
-
groupOrderFirst,
|
|
19644
|
-
groupOrderMiddle,
|
|
19645
|
-
groupOrderLast
|
|
19641
|
+
small: small$6,
|
|
19642
|
+
right: right$3,
|
|
19643
|
+
groupOrderFirst: groupOrderFirst$1,
|
|
19644
|
+
groupOrderMiddle: groupOrderMiddle$1,
|
|
19645
|
+
groupOrderLast: groupOrderLast$1
|
|
19646
19646
|
};
|
|
19647
19647
|
const NativeSelect = ({
|
|
19648
19648
|
disabled: disabled2 = false,
|
|
@@ -19710,11 +19710,11 @@ const NativeSelect = ({
|
|
|
19710
19710
|
if (groupOrder) {
|
|
19711
19711
|
switch (groupOrder) {
|
|
19712
19712
|
case GroupOrder.FIRST:
|
|
19713
|
-
return styles$
|
|
19713
|
+
return styles$o.groupOrderFirst;
|
|
19714
19714
|
case GroupOrder.LAST:
|
|
19715
|
-
return styles$
|
|
19715
|
+
return styles$o.groupOrderLast;
|
|
19716
19716
|
default:
|
|
19717
|
-
return styles$
|
|
19717
|
+
return styles$o.groupOrderMiddle;
|
|
19718
19718
|
}
|
|
19719
19719
|
}
|
|
19720
19720
|
return "";
|
|
@@ -19732,11 +19732,11 @@ const NativeSelect = ({
|
|
|
19732
19732
|
"select",
|
|
19733
19733
|
{
|
|
19734
19734
|
className: cx$2(
|
|
19735
|
-
styles$
|
|
19736
|
-
isUnselected ? styles$
|
|
19737
|
-
right2 ? styles$
|
|
19738
|
-
small2 ? styles$
|
|
19739
|
-
isInTable2 ? styles$
|
|
19735
|
+
styles$o.select,
|
|
19736
|
+
isUnselected ? styles$o.unSelected : "",
|
|
19737
|
+
right2 ? styles$o.right : "",
|
|
19738
|
+
small2 ? styles$o.small : "",
|
|
19739
|
+
isInTable2 ? styles$o.isInTable : "",
|
|
19740
19740
|
order2
|
|
19741
19741
|
),
|
|
19742
19742
|
style: {
|
|
@@ -19988,6 +19988,1018 @@ const useWindowWidth = () => {
|
|
|
19988
19988
|
}, []);
|
|
19989
19989
|
return width2;
|
|
19990
19990
|
};
|
|
19991
|
+
function _assertThisInitialized(e2) {
|
|
19992
|
+
if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19993
|
+
return e2;
|
|
19994
|
+
}
|
|
19995
|
+
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
19996
|
+
var now = hasNativePerformanceNow ? function() {
|
|
19997
|
+
return performance.now();
|
|
19998
|
+
} : function() {
|
|
19999
|
+
return Date.now();
|
|
20000
|
+
};
|
|
20001
|
+
function cancelTimeout(timeoutID) {
|
|
20002
|
+
cancelAnimationFrame(timeoutID.id);
|
|
20003
|
+
}
|
|
20004
|
+
function requestTimeout(callback, delay) {
|
|
20005
|
+
var start3 = now();
|
|
20006
|
+
function tick() {
|
|
20007
|
+
if (now() - start3 >= delay) {
|
|
20008
|
+
callback.call(null);
|
|
20009
|
+
} else {
|
|
20010
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
20011
|
+
}
|
|
20012
|
+
}
|
|
20013
|
+
var timeoutID = {
|
|
20014
|
+
id: requestAnimationFrame(tick)
|
|
20015
|
+
};
|
|
20016
|
+
return timeoutID;
|
|
20017
|
+
}
|
|
20018
|
+
var size$1 = -1;
|
|
20019
|
+
function getScrollbarSize(recalculate) {
|
|
20020
|
+
if (recalculate === void 0) {
|
|
20021
|
+
recalculate = false;
|
|
20022
|
+
}
|
|
20023
|
+
if (size$1 === -1 || recalculate) {
|
|
20024
|
+
var div = document.createElement("div");
|
|
20025
|
+
var style2 = div.style;
|
|
20026
|
+
style2.width = "50px";
|
|
20027
|
+
style2.height = "50px";
|
|
20028
|
+
style2.overflow = "scroll";
|
|
20029
|
+
document.body.appendChild(div);
|
|
20030
|
+
size$1 = div.offsetWidth - div.clientWidth;
|
|
20031
|
+
document.body.removeChild(div);
|
|
20032
|
+
}
|
|
20033
|
+
return size$1;
|
|
20034
|
+
}
|
|
20035
|
+
var cachedRTLResult = null;
|
|
20036
|
+
function getRTLOffsetType(recalculate) {
|
|
20037
|
+
if (recalculate === void 0) {
|
|
20038
|
+
recalculate = false;
|
|
20039
|
+
}
|
|
20040
|
+
if (cachedRTLResult === null || recalculate) {
|
|
20041
|
+
var outerDiv = document.createElement("div");
|
|
20042
|
+
var outerStyle = outerDiv.style;
|
|
20043
|
+
outerStyle.width = "50px";
|
|
20044
|
+
outerStyle.height = "50px";
|
|
20045
|
+
outerStyle.overflow = "scroll";
|
|
20046
|
+
outerStyle.direction = "rtl";
|
|
20047
|
+
var innerDiv = document.createElement("div");
|
|
20048
|
+
var innerStyle = innerDiv.style;
|
|
20049
|
+
innerStyle.width = "100px";
|
|
20050
|
+
innerStyle.height = "100px";
|
|
20051
|
+
outerDiv.appendChild(innerDiv);
|
|
20052
|
+
document.body.appendChild(outerDiv);
|
|
20053
|
+
if (outerDiv.scrollLeft > 0) {
|
|
20054
|
+
cachedRTLResult = "positive-descending";
|
|
20055
|
+
} else {
|
|
20056
|
+
outerDiv.scrollLeft = 1;
|
|
20057
|
+
if (outerDiv.scrollLeft === 0) {
|
|
20058
|
+
cachedRTLResult = "negative";
|
|
20059
|
+
} else {
|
|
20060
|
+
cachedRTLResult = "positive-ascending";
|
|
20061
|
+
}
|
|
20062
|
+
}
|
|
20063
|
+
document.body.removeChild(outerDiv);
|
|
20064
|
+
return cachedRTLResult;
|
|
20065
|
+
}
|
|
20066
|
+
return cachedRTLResult;
|
|
20067
|
+
}
|
|
20068
|
+
if (process.env.NODE_ENV !== "production") ;
|
|
20069
|
+
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
20070
|
+
var defaultItemKey$1 = function defaultItemKey(index2, data) {
|
|
20071
|
+
return index2;
|
|
20072
|
+
};
|
|
20073
|
+
var devWarningsDirection = null;
|
|
20074
|
+
var devWarningsTagName$1 = null;
|
|
20075
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20076
|
+
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
20077
|
+
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
20078
|
+
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
20079
|
+
}
|
|
20080
|
+
}
|
|
20081
|
+
function createListComponent(_ref) {
|
|
20082
|
+
var _class;
|
|
20083
|
+
var getItemOffset2 = _ref.getItemOffset, getEstimatedTotalSize2 = _ref.getEstimatedTotalSize, getItemSize2 = _ref.getItemSize, getOffsetForIndexAndAlignment2 = _ref.getOffsetForIndexAndAlignment, getStartIndexForOffset2 = _ref.getStartIndexForOffset, getStopIndexForStartIndex2 = _ref.getStopIndexForStartIndex, initInstanceProps2 = _ref.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange, validateProps2 = _ref.validateProps;
|
|
20084
|
+
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
20085
|
+
_inheritsLoose$3(List2, _PureComponent);
|
|
20086
|
+
function List2(props) {
|
|
20087
|
+
var _this;
|
|
20088
|
+
_this = _PureComponent.call(this, props) || this;
|
|
20089
|
+
_this._instanceProps = initInstanceProps2(_this.props, _assertThisInitialized(_this));
|
|
20090
|
+
_this._outerRef = void 0;
|
|
20091
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
20092
|
+
_this.state = {
|
|
20093
|
+
instance: _assertThisInitialized(_this),
|
|
20094
|
+
isScrolling: false,
|
|
20095
|
+
scrollDirection: "forward",
|
|
20096
|
+
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
20097
|
+
scrollUpdateWasRequested: false
|
|
20098
|
+
};
|
|
20099
|
+
_this._callOnItemsRendered = void 0;
|
|
20100
|
+
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
20101
|
+
return _this.props.onItemsRendered({
|
|
20102
|
+
overscanStartIndex,
|
|
20103
|
+
overscanStopIndex,
|
|
20104
|
+
visibleStartIndex,
|
|
20105
|
+
visibleStopIndex
|
|
20106
|
+
});
|
|
20107
|
+
});
|
|
20108
|
+
_this._callOnScroll = void 0;
|
|
20109
|
+
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
20110
|
+
return _this.props.onScroll({
|
|
20111
|
+
scrollDirection,
|
|
20112
|
+
scrollOffset,
|
|
20113
|
+
scrollUpdateWasRequested
|
|
20114
|
+
});
|
|
20115
|
+
});
|
|
20116
|
+
_this._getItemStyle = void 0;
|
|
20117
|
+
_this._getItemStyle = function(index2) {
|
|
20118
|
+
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
20119
|
+
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
20120
|
+
var style2;
|
|
20121
|
+
if (itemStyleCache.hasOwnProperty(index2)) {
|
|
20122
|
+
style2 = itemStyleCache[index2];
|
|
20123
|
+
} else {
|
|
20124
|
+
var _offset = getItemOffset2(_this.props, index2, _this._instanceProps);
|
|
20125
|
+
var size2 = getItemSize2(_this.props, index2, _this._instanceProps);
|
|
20126
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20127
|
+
var isRtl = direction === "rtl";
|
|
20128
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
20129
|
+
itemStyleCache[index2] = style2 = {
|
|
20130
|
+
position: "absolute",
|
|
20131
|
+
left: isRtl ? void 0 : offsetHorizontal,
|
|
20132
|
+
right: isRtl ? offsetHorizontal : void 0,
|
|
20133
|
+
top: !isHorizontal ? _offset : 0,
|
|
20134
|
+
height: !isHorizontal ? size2 : "100%",
|
|
20135
|
+
width: isHorizontal ? size2 : "100%"
|
|
20136
|
+
};
|
|
20137
|
+
}
|
|
20138
|
+
return style2;
|
|
20139
|
+
};
|
|
20140
|
+
_this._getItemStyleCache = void 0;
|
|
20141
|
+
_this._getItemStyleCache = memoizeOne(function(_2, __, ___) {
|
|
20142
|
+
return {};
|
|
20143
|
+
});
|
|
20144
|
+
_this._onScrollHorizontal = function(event) {
|
|
20145
|
+
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
20146
|
+
_this.setState(function(prevState) {
|
|
20147
|
+
if (prevState.scrollOffset === scrollLeft) {
|
|
20148
|
+
return null;
|
|
20149
|
+
}
|
|
20150
|
+
var direction = _this.props.direction;
|
|
20151
|
+
var scrollOffset = scrollLeft;
|
|
20152
|
+
if (direction === "rtl") {
|
|
20153
|
+
switch (getRTLOffsetType()) {
|
|
20154
|
+
case "negative":
|
|
20155
|
+
scrollOffset = -scrollLeft;
|
|
20156
|
+
break;
|
|
20157
|
+
case "positive-descending":
|
|
20158
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
20159
|
+
break;
|
|
20160
|
+
}
|
|
20161
|
+
}
|
|
20162
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
20163
|
+
return {
|
|
20164
|
+
isScrolling: true,
|
|
20165
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
20166
|
+
scrollOffset,
|
|
20167
|
+
scrollUpdateWasRequested: false
|
|
20168
|
+
};
|
|
20169
|
+
}, _this._resetIsScrollingDebounced);
|
|
20170
|
+
};
|
|
20171
|
+
_this._onScrollVertical = function(event) {
|
|
20172
|
+
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
20173
|
+
_this.setState(function(prevState) {
|
|
20174
|
+
if (prevState.scrollOffset === scrollTop) {
|
|
20175
|
+
return null;
|
|
20176
|
+
}
|
|
20177
|
+
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
20178
|
+
return {
|
|
20179
|
+
isScrolling: true,
|
|
20180
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
20181
|
+
scrollOffset,
|
|
20182
|
+
scrollUpdateWasRequested: false
|
|
20183
|
+
};
|
|
20184
|
+
}, _this._resetIsScrollingDebounced);
|
|
20185
|
+
};
|
|
20186
|
+
_this._outerRefSetter = function(ref2) {
|
|
20187
|
+
var outerRef = _this.props.outerRef;
|
|
20188
|
+
_this._outerRef = ref2;
|
|
20189
|
+
if (typeof outerRef === "function") {
|
|
20190
|
+
outerRef(ref2);
|
|
20191
|
+
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
20192
|
+
outerRef.current = ref2;
|
|
20193
|
+
}
|
|
20194
|
+
};
|
|
20195
|
+
_this._resetIsScrollingDebounced = function() {
|
|
20196
|
+
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
20197
|
+
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
20198
|
+
}
|
|
20199
|
+
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
20200
|
+
};
|
|
20201
|
+
_this._resetIsScrolling = function() {
|
|
20202
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
20203
|
+
_this.setState({
|
|
20204
|
+
isScrolling: false
|
|
20205
|
+
}, function() {
|
|
20206
|
+
_this._getItemStyleCache(-1, null);
|
|
20207
|
+
});
|
|
20208
|
+
};
|
|
20209
|
+
return _this;
|
|
20210
|
+
}
|
|
20211
|
+
List2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
20212
|
+
validateSharedProps$1(nextProps, prevState);
|
|
20213
|
+
validateProps2(nextProps);
|
|
20214
|
+
return null;
|
|
20215
|
+
};
|
|
20216
|
+
var _proto = List2.prototype;
|
|
20217
|
+
_proto.scrollTo = function scrollTo(scrollOffset) {
|
|
20218
|
+
scrollOffset = Math.max(0, scrollOffset);
|
|
20219
|
+
this.setState(function(prevState) {
|
|
20220
|
+
if (prevState.scrollOffset === scrollOffset) {
|
|
20221
|
+
return null;
|
|
20222
|
+
}
|
|
20223
|
+
return {
|
|
20224
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
20225
|
+
scrollOffset,
|
|
20226
|
+
scrollUpdateWasRequested: true
|
|
20227
|
+
};
|
|
20228
|
+
}, this._resetIsScrollingDebounced);
|
|
20229
|
+
};
|
|
20230
|
+
_proto.scrollToItem = function scrollToItem(index2, align) {
|
|
20231
|
+
if (align === void 0) {
|
|
20232
|
+
align = "auto";
|
|
20233
|
+
}
|
|
20234
|
+
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
20235
|
+
var scrollOffset = this.state.scrollOffset;
|
|
20236
|
+
index2 = Math.max(0, Math.min(index2, itemCount - 1));
|
|
20237
|
+
var scrollbarSize = 0;
|
|
20238
|
+
if (this._outerRef) {
|
|
20239
|
+
var outerRef = this._outerRef;
|
|
20240
|
+
if (layout === "vertical") {
|
|
20241
|
+
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
20242
|
+
} else {
|
|
20243
|
+
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
20244
|
+
}
|
|
20245
|
+
}
|
|
20246
|
+
this.scrollTo(getOffsetForIndexAndAlignment2(this.props, index2, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
20247
|
+
};
|
|
20248
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
20249
|
+
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
20250
|
+
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
20251
|
+
var outerRef = this._outerRef;
|
|
20252
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
20253
|
+
outerRef.scrollLeft = initialScrollOffset;
|
|
20254
|
+
} else {
|
|
20255
|
+
outerRef.scrollTop = initialScrollOffset;
|
|
20256
|
+
}
|
|
20257
|
+
}
|
|
20258
|
+
this._callPropsCallbacks();
|
|
20259
|
+
};
|
|
20260
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
20261
|
+
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
20262
|
+
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
20263
|
+
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
20264
|
+
var outerRef = this._outerRef;
|
|
20265
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
20266
|
+
if (direction === "rtl") {
|
|
20267
|
+
switch (getRTLOffsetType()) {
|
|
20268
|
+
case "negative":
|
|
20269
|
+
outerRef.scrollLeft = -scrollOffset;
|
|
20270
|
+
break;
|
|
20271
|
+
case "positive-ascending":
|
|
20272
|
+
outerRef.scrollLeft = scrollOffset;
|
|
20273
|
+
break;
|
|
20274
|
+
default:
|
|
20275
|
+
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
20276
|
+
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
20277
|
+
break;
|
|
20278
|
+
}
|
|
20279
|
+
} else {
|
|
20280
|
+
outerRef.scrollLeft = scrollOffset;
|
|
20281
|
+
}
|
|
20282
|
+
} else {
|
|
20283
|
+
outerRef.scrollTop = scrollOffset;
|
|
20284
|
+
}
|
|
20285
|
+
}
|
|
20286
|
+
this._callPropsCallbacks();
|
|
20287
|
+
};
|
|
20288
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
20289
|
+
if (this._resetIsScrollingTimeoutId !== null) {
|
|
20290
|
+
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
20291
|
+
}
|
|
20292
|
+
};
|
|
20293
|
+
_proto.render = function render2() {
|
|
20294
|
+
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height2 = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width2 = _this$props5.width;
|
|
20295
|
+
var isScrolling = this.state.isScrolling;
|
|
20296
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20297
|
+
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
20298
|
+
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
20299
|
+
var items = [];
|
|
20300
|
+
if (itemCount > 0) {
|
|
20301
|
+
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
20302
|
+
items.push(createElement(children, {
|
|
20303
|
+
data: itemData,
|
|
20304
|
+
key: itemKey(_index, itemData),
|
|
20305
|
+
index: _index,
|
|
20306
|
+
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
20307
|
+
style: this._getItemStyle(_index)
|
|
20308
|
+
}));
|
|
20309
|
+
}
|
|
20310
|
+
}
|
|
20311
|
+
var estimatedTotalSize = getEstimatedTotalSize2(this.props, this._instanceProps);
|
|
20312
|
+
return createElement(outerElementType || outerTagName || "div", {
|
|
20313
|
+
className,
|
|
20314
|
+
onScroll,
|
|
20315
|
+
ref: this._outerRefSetter,
|
|
20316
|
+
style: _extends$4({
|
|
20317
|
+
position: "relative",
|
|
20318
|
+
height: height2,
|
|
20319
|
+
width: width2,
|
|
20320
|
+
overflow: "auto",
|
|
20321
|
+
WebkitOverflowScrolling: "touch",
|
|
20322
|
+
willChange: "transform",
|
|
20323
|
+
direction
|
|
20324
|
+
}, style2)
|
|
20325
|
+
}, createElement(innerElementType || innerTagName || "div", {
|
|
20326
|
+
children: items,
|
|
20327
|
+
ref: innerRef,
|
|
20328
|
+
style: {
|
|
20329
|
+
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
20330
|
+
pointerEvents: isScrolling ? "none" : void 0,
|
|
20331
|
+
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
20332
|
+
}
|
|
20333
|
+
}));
|
|
20334
|
+
};
|
|
20335
|
+
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
20336
|
+
if (typeof this.props.onItemsRendered === "function") {
|
|
20337
|
+
var itemCount = this.props.itemCount;
|
|
20338
|
+
if (itemCount > 0) {
|
|
20339
|
+
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
20340
|
+
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
20341
|
+
}
|
|
20342
|
+
}
|
|
20343
|
+
if (typeof this.props.onScroll === "function") {
|
|
20344
|
+
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
20345
|
+
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
20346
|
+
}
|
|
20347
|
+
};
|
|
20348
|
+
_proto._getRangeToRender = function _getRangeToRender() {
|
|
20349
|
+
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
20350
|
+
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
20351
|
+
if (itemCount === 0) {
|
|
20352
|
+
return [0, 0, 0, 0];
|
|
20353
|
+
}
|
|
20354
|
+
var startIndex = getStartIndexForOffset2(this.props, scrollOffset, this._instanceProps);
|
|
20355
|
+
var stopIndex = getStopIndexForStartIndex2(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
20356
|
+
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
20357
|
+
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
20358
|
+
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
20359
|
+
};
|
|
20360
|
+
return List2;
|
|
20361
|
+
}(PureComponent), _class.defaultProps = {
|
|
20362
|
+
direction: "ltr",
|
|
20363
|
+
itemData: void 0,
|
|
20364
|
+
layout: "vertical",
|
|
20365
|
+
overscanCount: 2,
|
|
20366
|
+
useIsScrolling: false
|
|
20367
|
+
}, _class;
|
|
20368
|
+
}
|
|
20369
|
+
var validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {
|
|
20370
|
+
var children = _ref2.children, direction = _ref2.direction, height2 = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width2 = _ref2.width;
|
|
20371
|
+
var instance = _ref3.instance;
|
|
20372
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20373
|
+
if (innerTagName != null || outerTagName != null) {
|
|
20374
|
+
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
20375
|
+
devWarningsTagName$1.add(instance);
|
|
20376
|
+
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
20377
|
+
}
|
|
20378
|
+
}
|
|
20379
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20380
|
+
switch (direction) {
|
|
20381
|
+
case "horizontal":
|
|
20382
|
+
case "vertical":
|
|
20383
|
+
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
20384
|
+
devWarningsDirection.add(instance);
|
|
20385
|
+
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
20386
|
+
}
|
|
20387
|
+
break;
|
|
20388
|
+
case "ltr":
|
|
20389
|
+
case "rtl":
|
|
20390
|
+
break;
|
|
20391
|
+
default:
|
|
20392
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
20393
|
+
}
|
|
20394
|
+
switch (layout) {
|
|
20395
|
+
case "horizontal":
|
|
20396
|
+
case "vertical":
|
|
20397
|
+
break;
|
|
20398
|
+
default:
|
|
20399
|
+
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
20400
|
+
}
|
|
20401
|
+
if (children == null) {
|
|
20402
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
20403
|
+
}
|
|
20404
|
+
if (isHorizontal && typeof width2 !== "number") {
|
|
20405
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width2 === null ? "null" : typeof width2) + '" was specified.'));
|
|
20406
|
+
} else if (!isHorizontal && typeof height2 !== "number") {
|
|
20407
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height2 === null ? "null" : typeof height2) + '" was specified.'));
|
|
20408
|
+
}
|
|
20409
|
+
}
|
|
20410
|
+
};
|
|
20411
|
+
var FixedSizeList = /* @__PURE__ */ createListComponent({
|
|
20412
|
+
getItemOffset: function getItemOffset(_ref, index2) {
|
|
20413
|
+
var itemSize = _ref.itemSize;
|
|
20414
|
+
return index2 * itemSize;
|
|
20415
|
+
},
|
|
20416
|
+
getItemSize: function getItemSize(_ref2, index2) {
|
|
20417
|
+
var itemSize = _ref2.itemSize;
|
|
20418
|
+
return itemSize;
|
|
20419
|
+
},
|
|
20420
|
+
getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {
|
|
20421
|
+
var itemCount = _ref3.itemCount, itemSize = _ref3.itemSize;
|
|
20422
|
+
return itemSize * itemCount;
|
|
20423
|
+
},
|
|
20424
|
+
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index2, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
20425
|
+
var direction = _ref4.direction, height2 = _ref4.height, itemCount = _ref4.itemCount, itemSize = _ref4.itemSize, layout = _ref4.layout, width2 = _ref4.width;
|
|
20426
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20427
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
20428
|
+
var lastItemOffset = Math.max(0, itemCount * itemSize - size2);
|
|
20429
|
+
var maxOffset = Math.min(lastItemOffset, index2 * itemSize);
|
|
20430
|
+
var minOffset = Math.max(0, index2 * itemSize - size2 + itemSize + scrollbarSize);
|
|
20431
|
+
if (align === "smart") {
|
|
20432
|
+
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
20433
|
+
align = "auto";
|
|
20434
|
+
} else {
|
|
20435
|
+
align = "center";
|
|
20436
|
+
}
|
|
20437
|
+
}
|
|
20438
|
+
switch (align) {
|
|
20439
|
+
case "start":
|
|
20440
|
+
return maxOffset;
|
|
20441
|
+
case "end":
|
|
20442
|
+
return minOffset;
|
|
20443
|
+
case "center": {
|
|
20444
|
+
var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
20445
|
+
if (middleOffset < Math.ceil(size2 / 2)) {
|
|
20446
|
+
return 0;
|
|
20447
|
+
} else if (middleOffset > lastItemOffset + Math.floor(size2 / 2)) {
|
|
20448
|
+
return lastItemOffset;
|
|
20449
|
+
} else {
|
|
20450
|
+
return middleOffset;
|
|
20451
|
+
}
|
|
20452
|
+
}
|
|
20453
|
+
case "auto":
|
|
20454
|
+
default:
|
|
20455
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
20456
|
+
return scrollOffset;
|
|
20457
|
+
} else if (scrollOffset < minOffset) {
|
|
20458
|
+
return minOffset;
|
|
20459
|
+
} else {
|
|
20460
|
+
return maxOffset;
|
|
20461
|
+
}
|
|
20462
|
+
}
|
|
20463
|
+
},
|
|
20464
|
+
getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset3) {
|
|
20465
|
+
var itemCount = _ref5.itemCount, itemSize = _ref5.itemSize;
|
|
20466
|
+
return Math.max(0, Math.min(itemCount - 1, Math.floor(offset3 / itemSize)));
|
|
20467
|
+
},
|
|
20468
|
+
getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {
|
|
20469
|
+
var direction = _ref6.direction, height2 = _ref6.height, itemCount = _ref6.itemCount, itemSize = _ref6.itemSize, layout = _ref6.layout, width2 = _ref6.width;
|
|
20470
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20471
|
+
var offset3 = startIndex * itemSize;
|
|
20472
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
20473
|
+
var numVisibleItems = Math.ceil((size2 + scrollOffset - offset3) / itemSize);
|
|
20474
|
+
return Math.max(0, Math.min(
|
|
20475
|
+
itemCount - 1,
|
|
20476
|
+
startIndex + numVisibleItems - 1
|
|
20477
|
+
// -1 is because stop index is inclusive
|
|
20478
|
+
));
|
|
20479
|
+
},
|
|
20480
|
+
initInstanceProps: function initInstanceProps(props) {
|
|
20481
|
+
},
|
|
20482
|
+
shouldResetStyleCacheOnItemSizeChange: true,
|
|
20483
|
+
validateProps: function validateProps(_ref7) {
|
|
20484
|
+
var itemSize = _ref7.itemSize;
|
|
20485
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20486
|
+
if (typeof itemSize !== "number") {
|
|
20487
|
+
throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
20488
|
+
}
|
|
20489
|
+
}
|
|
20490
|
+
}
|
|
20491
|
+
});
|
|
20492
|
+
const layerContainer = "_layerContainer_dw2pp_1";
|
|
20493
|
+
const layer = "_layer_dw2pp_1";
|
|
20494
|
+
const small$5 = "_small_dw2pp_23";
|
|
20495
|
+
const heading = "_heading_dw2pp_26";
|
|
20496
|
+
const option = "_option_dw2pp_27";
|
|
20497
|
+
const message = "_message_dw2pp_28";
|
|
20498
|
+
const focused = "_focused_dw2pp_64";
|
|
20499
|
+
const selected = "_selected_dw2pp_68";
|
|
20500
|
+
const disabled$4 = "_disabled_dw2pp_71";
|
|
20501
|
+
const check = "_check_dw2pp_75";
|
|
20502
|
+
const optionContent = "_optionContent_dw2pp_92";
|
|
20503
|
+
const label$5 = "_label_dw2pp_97";
|
|
20504
|
+
const icon$2 = "_icon_dw2pp_104";
|
|
20505
|
+
const details = "_details_dw2pp_109";
|
|
20506
|
+
const styles$n = {
|
|
20507
|
+
layerContainer,
|
|
20508
|
+
layer,
|
|
20509
|
+
small: small$5,
|
|
20510
|
+
heading,
|
|
20511
|
+
option,
|
|
20512
|
+
message,
|
|
20513
|
+
focused,
|
|
20514
|
+
selected,
|
|
20515
|
+
disabled: disabled$4,
|
|
20516
|
+
check,
|
|
20517
|
+
optionContent,
|
|
20518
|
+
label: label$5,
|
|
20519
|
+
icon: icon$2,
|
|
20520
|
+
details
|
|
20521
|
+
};
|
|
20522
|
+
const Heading = ({ label: label2 }) => {
|
|
20523
|
+
return /* @__PURE__ */ jsx(
|
|
20524
|
+
"div",
|
|
20525
|
+
{
|
|
20526
|
+
onClick: (evt) => evt.stopPropagation(),
|
|
20527
|
+
className: styles$n.heading,
|
|
20528
|
+
children: label2
|
|
20529
|
+
}
|
|
20530
|
+
);
|
|
20531
|
+
};
|
|
20532
|
+
const Option = ({
|
|
20533
|
+
details: details2,
|
|
20534
|
+
label: label2,
|
|
20535
|
+
icon: icon2,
|
|
20536
|
+
disabled: disabled2 = false,
|
|
20537
|
+
selected: selected2 = false,
|
|
20538
|
+
focused: focused2 = false,
|
|
20539
|
+
onSelectOption,
|
|
20540
|
+
actions: actions2,
|
|
20541
|
+
closeLayer,
|
|
20542
|
+
testId
|
|
20543
|
+
}) => {
|
|
20544
|
+
return /* @__PURE__ */ jsxs(
|
|
20545
|
+
"div",
|
|
20546
|
+
{
|
|
20547
|
+
className: cx$2(
|
|
20548
|
+
styles$n.option,
|
|
20549
|
+
disabled2 ? styles$n.disabled : "",
|
|
20550
|
+
selected2 ? styles$n.selected : "",
|
|
20551
|
+
focused2 ? styles$n.focused : ""
|
|
20552
|
+
),
|
|
20553
|
+
onClick: !disabled2 && onSelectOption ? onSelectOption : void 0,
|
|
20554
|
+
"data-testid": testId,
|
|
20555
|
+
children: [
|
|
20556
|
+
/* @__PURE__ */ jsx("div", { className: styles$n.optionContent, children: /* @__PURE__ */ jsxs("span", { className: styles$n.label, title: label2, children: [
|
|
20557
|
+
label2,
|
|
20558
|
+
icon2 && /* @__PURE__ */ jsx("span", { className: styles$n.icon, children: icon2 })
|
|
20559
|
+
] }) }),
|
|
20560
|
+
details2 && /* @__PURE__ */ jsx("div", { className: cx$2(styles$n.details), children: /* @__PURE__ */ jsx(Text, { faint: true, children: details2 }) }),
|
|
20561
|
+
!!(actions2 == null ? void 0 : actions2.length) && /* @__PURE__ */ jsx("div", { className: cx$2(styles$n.actions), children: /* @__PURE__ */ jsx(Actions, { actions: actions2, closeLayer }) }),
|
|
20562
|
+
/* @__PURE__ */ jsx("span", { className: styles$n.check, children: selected2 ? /* @__PURE__ */ jsx(Icon, { icon: IconType.CHECK }) : null })
|
|
20563
|
+
]
|
|
20564
|
+
}
|
|
20565
|
+
);
|
|
20566
|
+
};
|
|
20567
|
+
const Section = ({
|
|
20568
|
+
section: section2,
|
|
20569
|
+
selected: selected2,
|
|
20570
|
+
focused: focused2,
|
|
20571
|
+
onSelectOption,
|
|
20572
|
+
closeLayer
|
|
20573
|
+
}) => {
|
|
20574
|
+
const disabledContext = useContext(DisabledContext);
|
|
20575
|
+
switch (section2.type) {
|
|
20576
|
+
case MenuType.HEADING:
|
|
20577
|
+
return /* @__PURE__ */ jsx(Heading, { label: section2.label });
|
|
20578
|
+
case MenuType.OPTION:
|
|
20579
|
+
default:
|
|
20580
|
+
return /* @__PURE__ */ jsx(
|
|
20581
|
+
Option,
|
|
20582
|
+
{
|
|
20583
|
+
closeLayer,
|
|
20584
|
+
actions: section2.actions,
|
|
20585
|
+
label: section2.label,
|
|
20586
|
+
details: section2.details,
|
|
20587
|
+
icon: section2.icon,
|
|
20588
|
+
disabled: section2.disabled || disabledContext,
|
|
20589
|
+
selected: selected2,
|
|
20590
|
+
focused: focused2,
|
|
20591
|
+
onSelectOption,
|
|
20592
|
+
testId: section2.testId
|
|
20593
|
+
}
|
|
20594
|
+
);
|
|
20595
|
+
}
|
|
20596
|
+
};
|
|
20597
|
+
const getTextWidth = (text2, font) => {
|
|
20598
|
+
const element = document.createElement("canvas");
|
|
20599
|
+
const context2 = element.getContext("2d");
|
|
20600
|
+
if (!context2) {
|
|
20601
|
+
return 0;
|
|
20602
|
+
}
|
|
20603
|
+
context2.font = font;
|
|
20604
|
+
return context2.measureText(text2).width;
|
|
20605
|
+
};
|
|
20606
|
+
const FONT_SIZE = "13px";
|
|
20607
|
+
const FONT_SIZE_SMALL = "12px";
|
|
20608
|
+
const FONT_FAMILY = "Roobert";
|
|
20609
|
+
const FONT_FAMILY_FALLBACK = "sans-serif";
|
|
20610
|
+
const PADDING = 12;
|
|
20611
|
+
const PADDING_SMALL = 8;
|
|
20612
|
+
const TOGGLE_SIZE = 30;
|
|
20613
|
+
const TOGGLE_SIZE_SMALL = 24;
|
|
20614
|
+
const TAG_PADDING = 5;
|
|
20615
|
+
const TAG_PADDING_SMALL = 3;
|
|
20616
|
+
const TAG_BORDER_WIDTH = 1;
|
|
20617
|
+
const TAG_MARGIN = 2;
|
|
20618
|
+
const MAX_OPTIONS_LENGTH = 10;
|
|
20619
|
+
const getFont = (small2 = false, isFontLoaded = false) => {
|
|
20620
|
+
const fontSize = small2 ? FONT_SIZE_SMALL : FONT_SIZE;
|
|
20621
|
+
const fontFamily = isFontLoaded ? FONT_FAMILY : FONT_FAMILY_FALLBACK;
|
|
20622
|
+
return `${fontSize} ${fontFamily}`;
|
|
20623
|
+
};
|
|
20624
|
+
const getExtraOptionWidth = (small2 = false, scrollbar = false) => {
|
|
20625
|
+
const SCROLLBAR_WIDTH = 17;
|
|
20626
|
+
return (small2 ? PADDING_SMALL : PADDING) + (small2 ? TOGGLE_SIZE_SMALL : TOGGLE_SIZE) + (scrollbar ? SCROLLBAR_WIDTH : 0);
|
|
20627
|
+
};
|
|
20628
|
+
const getWidestOptionWidth = (options, small2, isFontLoaded, placeholder3) => {
|
|
20629
|
+
const font = getFont(small2, isFontLoaded);
|
|
20630
|
+
const placeholderWidth = placeholder3 ? getTextWidth(placeholder3, font) : 0;
|
|
20631
|
+
const widestTextWidth = Math.ceil(
|
|
20632
|
+
options.reduce((acc, option2) => {
|
|
20633
|
+
var _a2;
|
|
20634
|
+
const optionActionsWidth = (((_a2 = option2 == null ? void 0 : option2.actions) == null ? void 0 : _a2.length) ?? 0) * 24;
|
|
20635
|
+
const optionIconWidth = option2.icon ? (small2 ? parseInt(FONT_SIZE_SMALL) : parseInt(FONT_SIZE)) + 7 : 0;
|
|
20636
|
+
const optionsText = `${option2.label} ${option2.details || ""}`;
|
|
20637
|
+
const optionWidth = getTextWidth(optionsText, font) + optionActionsWidth + optionIconWidth;
|
|
20638
|
+
acc = optionWidth > acc ? optionWidth : acc;
|
|
20639
|
+
return acc;
|
|
20640
|
+
}, placeholderWidth)
|
|
20641
|
+
);
|
|
20642
|
+
const extraWidth = getExtraOptionWidth(small2, true);
|
|
20643
|
+
return widestTextWidth + extraWidth;
|
|
20644
|
+
};
|
|
20645
|
+
const getMultiOptionWidth = (option2, small2, isFontLoaded) => {
|
|
20646
|
+
const font = getFont(true, isFontLoaded);
|
|
20647
|
+
const textWidth = getTextWidth(option2.label, font);
|
|
20648
|
+
const extraWidth = (small2 ? TAG_PADDING_SMALL : TAG_PADDING) * 2 + TAG_BORDER_WIDTH * 2 + TAG_MARGIN;
|
|
20649
|
+
return Math.ceil(textWidth + extraWidth);
|
|
20650
|
+
};
|
|
20651
|
+
const Layer = ({
|
|
20652
|
+
listRef,
|
|
20653
|
+
isMulti: isMulti2,
|
|
20654
|
+
sections,
|
|
20655
|
+
selectedOptions,
|
|
20656
|
+
onSelectOption,
|
|
20657
|
+
focusedOptionIndex,
|
|
20658
|
+
width: width2,
|
|
20659
|
+
small: small2,
|
|
20660
|
+
firstSelectedOptionIndex,
|
|
20661
|
+
closeLayer,
|
|
20662
|
+
testId
|
|
20663
|
+
}) => {
|
|
20664
|
+
useEffect(() => {
|
|
20665
|
+
if (firstSelectedOptionIndex !== void 0 && firstSelectedOptionIndex !== null && listRef.current !== null && typeof listRef.current.scrollToItem === "function") {
|
|
20666
|
+
listRef.current.scrollToItem(firstSelectedOptionIndex, "start");
|
|
20667
|
+
}
|
|
20668
|
+
}, [firstSelectedOptionIndex, listRef]);
|
|
20669
|
+
const optionHeight = small2 ? 24 : 30;
|
|
20670
|
+
return /* @__PURE__ */ jsx(
|
|
20671
|
+
"div",
|
|
20672
|
+
{
|
|
20673
|
+
"data-testid": testId,
|
|
20674
|
+
className: cx$2(styles$n.layer, small2 && styles$n.small),
|
|
20675
|
+
children: !sections.length ? /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { className: styles$n.message, style: { width: width2 }, children: "No matches" }) }) }) : /* @__PURE__ */ jsx(
|
|
20676
|
+
FixedSizeList,
|
|
20677
|
+
{
|
|
20678
|
+
ref: listRef,
|
|
20679
|
+
height: sections.length < MAX_OPTIONS_LENGTH ? optionHeight * sections.length : optionHeight * MAX_OPTIONS_LENGTH,
|
|
20680
|
+
itemCount: sections.length,
|
|
20681
|
+
itemSize: optionHeight,
|
|
20682
|
+
width: width2,
|
|
20683
|
+
children: ({ index: index2, style: style2 }) => {
|
|
20684
|
+
var _a2;
|
|
20685
|
+
return /* @__PURE__ */ jsx("div", { style: style2, children: /* @__PURE__ */ jsx(
|
|
20686
|
+
Section,
|
|
20687
|
+
{
|
|
20688
|
+
closeLayer,
|
|
20689
|
+
section: sections[index2],
|
|
20690
|
+
selected: isMulti2 && sections[index2].type !== MenuType.HEADING && Array.isArray(selectedOptions) ? selectedOptions.some(
|
|
20691
|
+
(v2) => {
|
|
20692
|
+
var _a3;
|
|
20693
|
+
return v2 && (v2 == null ? void 0 : v2.value) === ((_a3 = sections == null ? void 0 : sections[index2]) == null ? void 0 : _a3.value);
|
|
20694
|
+
}
|
|
20695
|
+
) : !Array.isArray(selectedOptions) && ((_a2 = sections == null ? void 0 : sections[index2]) == null ? void 0 : _a2.value) === (selectedOptions == null ? void 0 : selectedOptions.value),
|
|
20696
|
+
focused: focusedOptionIndex === index2,
|
|
20697
|
+
onSelectOption: (evt) => onSelectOption(evt, sections[index2])
|
|
20698
|
+
}
|
|
20699
|
+
) });
|
|
20700
|
+
}
|
|
20701
|
+
}
|
|
20702
|
+
)
|
|
20703
|
+
}
|
|
20704
|
+
);
|
|
20705
|
+
};
|
|
20706
|
+
const inputInTable$5 = "_inputInTable_7uwhv_1";
|
|
20707
|
+
const inputHover$5 = "_inputHover_7uwhv_13";
|
|
20708
|
+
const inputFocus$5 = "_inputFocus_7uwhv_18";
|
|
20709
|
+
const inputError$5 = "_inputError_7uwhv_25";
|
|
20710
|
+
const inputWarning$5 = "_inputWarning_7uwhv_26";
|
|
20711
|
+
const inputDisabled$5 = "_inputDisabled_7uwhv_61";
|
|
20712
|
+
const hideScrollbars$5 = "_hideScrollbars_7uwhv_67";
|
|
20713
|
+
const trigger$1 = "_trigger_7uwhv_77";
|
|
20714
|
+
const isInTable$1 = "_isInTable_7uwhv_93";
|
|
20715
|
+
const input = "_input_7uwhv_1";
|
|
20716
|
+
const isOpen = "_isOpen_7uwhv_114";
|
|
20717
|
+
const disabled$3 = "_disabled_7uwhv_156";
|
|
20718
|
+
const icons = "_icons_7uwhv_162";
|
|
20719
|
+
const clearAll = "_clearAll_7uwhv_169";
|
|
20720
|
+
const iconOpen = "_iconOpen_7uwhv_170";
|
|
20721
|
+
const small$4 = "_small_7uwhv_181";
|
|
20722
|
+
const triggerInputContainer = "_triggerInputContainer_7uwhv_189";
|
|
20723
|
+
const right$2 = "_right_7uwhv_198";
|
|
20724
|
+
const multiOptions = "_multiOptions_7uwhv_211";
|
|
20725
|
+
const multiOption = "_multiOption_7uwhv_211";
|
|
20726
|
+
const label$4 = "_label_7uwhv_239";
|
|
20727
|
+
const closeMultiOption = "_closeMultiOption_7uwhv_242";
|
|
20728
|
+
const focus = "_focus_7uwhv_253";
|
|
20729
|
+
const selectedSingleValue = "_selectedSingleValue_7uwhv_257";
|
|
20730
|
+
const placeHolder = "_placeHolder_7uwhv_258";
|
|
20731
|
+
const groupOrderFirst = "_groupOrderFirst_7uwhv_297";
|
|
20732
|
+
const groupOrderMiddle = "_groupOrderMiddle_7uwhv_298";
|
|
20733
|
+
const groupOrderLast = "_groupOrderLast_7uwhv_302";
|
|
20734
|
+
const detailedLabel = "_detailedLabel_7uwhv_307";
|
|
20735
|
+
const styles$m = {
|
|
20736
|
+
inputInTable: inputInTable$5,
|
|
20737
|
+
inputHover: inputHover$5,
|
|
20738
|
+
inputFocus: inputFocus$5,
|
|
20739
|
+
inputError: inputError$5,
|
|
20740
|
+
inputWarning: inputWarning$5,
|
|
20741
|
+
inputDisabled: inputDisabled$5,
|
|
20742
|
+
hideScrollbars: hideScrollbars$5,
|
|
20743
|
+
trigger: trigger$1,
|
|
20744
|
+
isInTable: isInTable$1,
|
|
20745
|
+
input,
|
|
20746
|
+
isOpen,
|
|
20747
|
+
disabled: disabled$3,
|
|
20748
|
+
icons,
|
|
20749
|
+
clearAll,
|
|
20750
|
+
iconOpen,
|
|
20751
|
+
small: small$4,
|
|
20752
|
+
triggerInputContainer,
|
|
20753
|
+
right: right$2,
|
|
20754
|
+
multiOptions,
|
|
20755
|
+
multiOption,
|
|
20756
|
+
label: label$4,
|
|
20757
|
+
closeMultiOption,
|
|
20758
|
+
focus,
|
|
20759
|
+
selectedSingleValue,
|
|
20760
|
+
placeHolder,
|
|
20761
|
+
groupOrderFirst,
|
|
20762
|
+
groupOrderMiddle,
|
|
20763
|
+
groupOrderLast,
|
|
20764
|
+
detailedLabel
|
|
20765
|
+
};
|
|
20766
|
+
const MultiSelectedOptions = ({
|
|
20767
|
+
selectedOptions,
|
|
20768
|
+
small: small2,
|
|
20769
|
+
width: width2,
|
|
20770
|
+
testId
|
|
20771
|
+
}) => {
|
|
20772
|
+
const isFontLoaded = useFontsReady();
|
|
20773
|
+
const [displayedOptions, setDisplayedOptions] = useState([]);
|
|
20774
|
+
const [overflowOptions, setOverflowOptions] = useState([]);
|
|
20775
|
+
useEffect(() => {
|
|
20776
|
+
let displayed = [];
|
|
20777
|
+
let overflow = [];
|
|
20778
|
+
let usedWidth = 0;
|
|
20779
|
+
selectedOptions.forEach((option2, index2) => {
|
|
20780
|
+
usedWidth += getMultiOptionWidth(option2, small2, isFontLoaded);
|
|
20781
|
+
if (index2 === selectedOptions.length - 1 && usedWidth < width2) {
|
|
20782
|
+
displayed.push(option2);
|
|
20783
|
+
} else if (usedWidth < width2 - 24) {
|
|
20784
|
+
displayed.push(option2);
|
|
20785
|
+
} else {
|
|
20786
|
+
overflow.push(option2);
|
|
20787
|
+
}
|
|
20788
|
+
});
|
|
20789
|
+
setDisplayedOptions(displayed);
|
|
20790
|
+
setOverflowOptions(overflow);
|
|
20791
|
+
}, [selectedOptions, isFontLoaded, width2]);
|
|
20792
|
+
return /* @__PURE__ */ jsxs(
|
|
20793
|
+
"div",
|
|
20794
|
+
{
|
|
20795
|
+
className: styles$m.multiOptions,
|
|
20796
|
+
"data-testid": testId && `${testId}-value`,
|
|
20797
|
+
children: [
|
|
20798
|
+
displayedOptions.filter((option2) => option2 && option2.label).map((option2, index2) => /* @__PURE__ */ jsx(
|
|
20799
|
+
"span",
|
|
20800
|
+
{
|
|
20801
|
+
className: styles$m.multiOption,
|
|
20802
|
+
onClick: (evt) => {
|
|
20803
|
+
evt.stopPropagation();
|
|
20804
|
+
},
|
|
20805
|
+
children: option2.label
|
|
20806
|
+
},
|
|
20807
|
+
index2
|
|
20808
|
+
)),
|
|
20809
|
+
overflowOptions.length > 0 && /* @__PURE__ */ jsx(
|
|
20810
|
+
Tooltip,
|
|
20811
|
+
{
|
|
20812
|
+
text: overflowOptions.map((option2, index2) => /* @__PURE__ */ jsx("div", { children: option2.label }, index2)),
|
|
20813
|
+
display: "inline-flex",
|
|
20814
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$m.multiOption, children: displayedOptions.length ? `+${overflowOptions.length}` : `${overflowOptions.length} items` })
|
|
20815
|
+
}
|
|
20816
|
+
)
|
|
20817
|
+
]
|
|
20818
|
+
}
|
|
20819
|
+
);
|
|
20820
|
+
};
|
|
20821
|
+
const Input = ({
|
|
20822
|
+
selectedOptions,
|
|
20823
|
+
searchable = false,
|
|
20824
|
+
searchValue,
|
|
20825
|
+
onChange = noop$3,
|
|
20826
|
+
inputRef,
|
|
20827
|
+
error: error2,
|
|
20828
|
+
placeholder: placeholder3 = "Select...",
|
|
20829
|
+
small: small2,
|
|
20830
|
+
testId
|
|
20831
|
+
}) => {
|
|
20832
|
+
const containerRef = useRef(null);
|
|
20833
|
+
const isMulti2 = Array.isArray(selectedOptions);
|
|
20834
|
+
const hasSelectedValues = isMulti2 ? selectedOptions.length > 0 : !!selectedOptions;
|
|
20835
|
+
const inputSize = searchValue ? searchValue.length + 1 : 1;
|
|
20836
|
+
const getMultiOptionsWidth = () => {
|
|
20837
|
+
var _a2, _b;
|
|
20838
|
+
const containerWidth = ((_a2 = containerRef.current) == null ? void 0 : _a2.offsetWidth) || 0;
|
|
20839
|
+
const inputWidth = ((_b = inputRef.current) == null ? void 0 : _b.offsetWidth) || 0;
|
|
20840
|
+
return containerWidth - inputWidth;
|
|
20841
|
+
};
|
|
20842
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$m.triggerInputContainer, ref: containerRef, children: [
|
|
20843
|
+
!hasSelectedValues ? /* @__PURE__ */ jsx("span", { className: styles$m.placeHolder, children: !(searchValue == null ? void 0 : searchValue.length) ? placeholder3 : "" }) : isMulti2 ? /* @__PURE__ */ jsx(
|
|
20844
|
+
MultiSelectedOptions,
|
|
20845
|
+
{
|
|
20846
|
+
selectedOptions,
|
|
20847
|
+
small: small2,
|
|
20848
|
+
width: getMultiOptionsWidth(),
|
|
20849
|
+
testId
|
|
20850
|
+
}
|
|
20851
|
+
) : /* @__PURE__ */ jsx(
|
|
20852
|
+
"span",
|
|
20853
|
+
{
|
|
20854
|
+
className: styles$m.selectedSingleValue,
|
|
20855
|
+
"data-testid": testId && `${testId}-value`,
|
|
20856
|
+
children: !(searchValue == null ? void 0 : searchValue.length) ? selectedOptions == null ? void 0 : selectedOptions.label : ""
|
|
20857
|
+
}
|
|
20858
|
+
),
|
|
20859
|
+
searchable ? /* @__PURE__ */ jsx(
|
|
20860
|
+
"input",
|
|
20861
|
+
{
|
|
20862
|
+
tabIndex: -1,
|
|
20863
|
+
ref: inputRef,
|
|
20864
|
+
size: inputSize,
|
|
20865
|
+
className: styles$m.input,
|
|
20866
|
+
value: searchValue,
|
|
20867
|
+
onChange: (evt) => onChange(evt.target.value),
|
|
20868
|
+
"data-error": error2 || null,
|
|
20869
|
+
"data-testid": testId && `${testId}-input`
|
|
20870
|
+
}
|
|
20871
|
+
) : null
|
|
20872
|
+
] });
|
|
20873
|
+
};
|
|
20874
|
+
const Trigger = ({
|
|
20875
|
+
selectedOptions,
|
|
20876
|
+
searchValue,
|
|
20877
|
+
searchable,
|
|
20878
|
+
clearable,
|
|
20879
|
+
onClickTrigger,
|
|
20880
|
+
element,
|
|
20881
|
+
error: error2,
|
|
20882
|
+
warning: warning2,
|
|
20883
|
+
tooltip: tooltip2,
|
|
20884
|
+
small: small2,
|
|
20885
|
+
isInTable: isInTable2,
|
|
20886
|
+
disabled: disabled2,
|
|
20887
|
+
onChangeSearch,
|
|
20888
|
+
onClickDeselect,
|
|
20889
|
+
onClickClear,
|
|
20890
|
+
tabIndex,
|
|
20891
|
+
isOpen: isOpen2,
|
|
20892
|
+
triggerRef,
|
|
20893
|
+
clearAllIsFocused,
|
|
20894
|
+
focusedSelectedOptionIndex,
|
|
20895
|
+
onFocus,
|
|
20896
|
+
onBlur,
|
|
20897
|
+
groupOrder,
|
|
20898
|
+
maxTooltipWidth,
|
|
20899
|
+
placeholder: placeholder3,
|
|
20900
|
+
right: right2,
|
|
20901
|
+
testId
|
|
20902
|
+
}) => {
|
|
20903
|
+
var _a2;
|
|
20904
|
+
const [inputRef, setInputFocus] = useFocus();
|
|
20905
|
+
const hasSelection2 = Array.isArray(selectedOptions) ? selectedOptions.length > 0 && ((_a2 = selectedOptions[0]) == null ? void 0 : _a2.value) : selectedOptions == null ? void 0 : selectedOptions.value;
|
|
20906
|
+
const canClear = clearable && hasSelection2;
|
|
20907
|
+
const order2 = (() => {
|
|
20908
|
+
if (groupOrder) {
|
|
20909
|
+
switch (groupOrder) {
|
|
20910
|
+
case GroupOrder.FIRST:
|
|
20911
|
+
return styles$m.groupOrderFirst;
|
|
20912
|
+
case GroupOrder.LAST:
|
|
20913
|
+
return styles$m.groupOrderLast;
|
|
20914
|
+
default:
|
|
20915
|
+
return styles$m.groupOrderMiddle;
|
|
20916
|
+
}
|
|
20917
|
+
}
|
|
20918
|
+
return "";
|
|
20919
|
+
})();
|
|
20920
|
+
const selectedOptionsWithDetails = !Array.isArray(selectedOptions) && (selectedOptions == null ? void 0 : selectedOptions.details) ? {
|
|
20921
|
+
...selectedOptions,
|
|
20922
|
+
label: /* @__PURE__ */ jsxs("div", { className: cx$2(styles$m.detailedLabel), children: [
|
|
20923
|
+
/* @__PURE__ */ jsx(Text, { children: selectedOptions.label }),
|
|
20924
|
+
/* @__PURE__ */ jsx(Text, { muted: true, children: selectedOptions.details })
|
|
20925
|
+
] })
|
|
20926
|
+
} : selectedOptions;
|
|
20927
|
+
const triggerInput = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
20928
|
+
element,
|
|
20929
|
+
/* @__PURE__ */ jsxs(
|
|
20930
|
+
"div",
|
|
20931
|
+
{
|
|
20932
|
+
ref: triggerRef,
|
|
20933
|
+
tabIndex,
|
|
20934
|
+
className: cx$2(
|
|
20935
|
+
styles$m.trigger,
|
|
20936
|
+
isOpen2 ? styles$m.isOpen : "",
|
|
20937
|
+
disabled2 ? styles$m.disabled : "",
|
|
20938
|
+
small2 ? styles$m.small : "",
|
|
20939
|
+
isInTable2 ? styles$m.isInTable : "",
|
|
20940
|
+
right2 ? styles$m.right : "",
|
|
20941
|
+
order2
|
|
20942
|
+
),
|
|
20943
|
+
onClick: (evt) => {
|
|
20944
|
+
onClickTrigger(evt);
|
|
20945
|
+
if (typeof setInputFocus === "function") {
|
|
20946
|
+
requestAnimationFrame(() => setInputFocus());
|
|
20947
|
+
}
|
|
20948
|
+
},
|
|
20949
|
+
onFocus,
|
|
20950
|
+
onBlur,
|
|
20951
|
+
"data-error": error2 || null,
|
|
20952
|
+
"data-warning": warning2 || null,
|
|
20953
|
+
"data-testid": testId,
|
|
20954
|
+
children: [
|
|
20955
|
+
/* @__PURE__ */ jsx(
|
|
20956
|
+
Input,
|
|
20957
|
+
{
|
|
20958
|
+
selectedOptions: selectedOptionsWithDetails,
|
|
20959
|
+
placeholder: placeholder3,
|
|
20960
|
+
searchable,
|
|
20961
|
+
searchValue,
|
|
20962
|
+
inputRef,
|
|
20963
|
+
onChange: onChangeSearch,
|
|
20964
|
+
error: error2,
|
|
20965
|
+
small: small2,
|
|
20966
|
+
testId
|
|
20967
|
+
}
|
|
20968
|
+
),
|
|
20969
|
+
/* @__PURE__ */ jsx("span", { className: styles$m.icons, children: canClear ? /* @__PURE__ */ jsx(
|
|
20970
|
+
"span",
|
|
20971
|
+
{
|
|
20972
|
+
className: cx$2(
|
|
20973
|
+
styles$m.clearAll,
|
|
20974
|
+
clearAllIsFocused ? styles$m.focus : ""
|
|
20975
|
+
),
|
|
20976
|
+
onClick: (evt) => {
|
|
20977
|
+
evt.stopPropagation();
|
|
20978
|
+
if (onClickClear) {
|
|
20979
|
+
onClickClear(evt);
|
|
20980
|
+
}
|
|
20981
|
+
},
|
|
20982
|
+
"data-testid": testId && `${testId}-clear`,
|
|
20983
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.CLOSE })
|
|
20984
|
+
}
|
|
20985
|
+
) : /* @__PURE__ */ jsx("span", { className: cx$2(styles$m.iconOpen), children: /* @__PURE__ */ jsx(Icon, { icon: "chevron down" }) }) })
|
|
20986
|
+
]
|
|
20987
|
+
}
|
|
20988
|
+
)
|
|
20989
|
+
] });
|
|
20990
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(
|
|
20991
|
+
Tooltip,
|
|
20992
|
+
{
|
|
20993
|
+
error: !!error2,
|
|
20994
|
+
warning: !!warning2,
|
|
20995
|
+
text: tooltip2 || error2 || warning2,
|
|
20996
|
+
enabled: tooltip2 && isStringNumberOrNode(tooltip2) || error2 && isStringNumberOrNode(error2) || warning2 && isStringNumberOrNode(warning2) || false,
|
|
20997
|
+
maxWidth: maxTooltipWidth,
|
|
20998
|
+
placement: "bottom-center",
|
|
20999
|
+
children: triggerInput
|
|
21000
|
+
}
|
|
21001
|
+
) });
|
|
21002
|
+
};
|
|
19991
21003
|
var ReducerAction = /* @__PURE__ */ ((ReducerAction2) => {
|
|
19992
21004
|
ReducerAction2["SET_VISIBLE_OPTIONS"] = "SET_VISIBLE_OPTIONS";
|
|
19993
21005
|
ReducerAction2["RESET_LAYER_FOCUS"] = "RESET_LAYER_FOCUS";
|
|
@@ -20019,6 +21031,17 @@ const initialLayerFocus = (options, firstSelectedOptionIndex) => {
|
|
|
20019
21031
|
current: layerFocusOptions[layerFocusIndex]
|
|
20020
21032
|
};
|
|
20021
21033
|
};
|
|
21034
|
+
const nextLayerFocus = (direction, layerFocus) => {
|
|
21035
|
+
const sign = direction === "up" ? -1 : 1;
|
|
21036
|
+
const increment = layerFocus.currentIndex + sign;
|
|
21037
|
+
const nextIndex = (increment < 0 ? layerFocus.options.length - 1 : increment) % layerFocus.options.length;
|
|
21038
|
+
const next2 = layerFocus.options[nextIndex];
|
|
21039
|
+
return {
|
|
21040
|
+
...layerFocus,
|
|
21041
|
+
currentIndex: nextIndex,
|
|
21042
|
+
current: next2
|
|
21043
|
+
};
|
|
21044
|
+
};
|
|
20022
21045
|
const nextTriggerFocus = (direction, selectedOptions, triggerFocus) => {
|
|
20023
21046
|
const sign = direction === "left" ? -1 : 1;
|
|
20024
21047
|
const nextOptions = selectedOptions && selectedOptions.length ? [
|
|
@@ -20029,12 +21052,12 @@ const nextTriggerFocus = (direction, selectedOptions, triggerFocus) => {
|
|
|
20029
21052
|
const increment = triggerFocus.currentIndex + sign;
|
|
20030
21053
|
const nextIndex = (increment < 0 ? nextOptions.length - 1 : increment) % nextOptions.length;
|
|
20031
21054
|
const next2 = nextOptions[nextIndex];
|
|
20032
|
-
const
|
|
21055
|
+
const clearAll2 = next2 === "clearAll";
|
|
20033
21056
|
return {
|
|
20034
21057
|
options: nextOptions,
|
|
20035
21058
|
currentIndex: nextIndex,
|
|
20036
21059
|
currentOption: next2,
|
|
20037
|
-
clearAll
|
|
21060
|
+
clearAll: clearAll2
|
|
20038
21061
|
};
|
|
20039
21062
|
};
|
|
20040
21063
|
const blurTriggerFocus = () => initialTriggerFocus;
|
|
@@ -20129,6 +21152,25 @@ const reducer = (state, action2) => {
|
|
|
20129
21152
|
return state;
|
|
20130
21153
|
}
|
|
20131
21154
|
};
|
|
21155
|
+
const placementOptions = {
|
|
21156
|
+
auto: true,
|
|
21157
|
+
possiblePlacements: ["bottom-start", "top-start"],
|
|
21158
|
+
placement: "bottom-start",
|
|
21159
|
+
preferX: "right",
|
|
21160
|
+
preferY: "bottom"
|
|
21161
|
+
};
|
|
21162
|
+
var ActionTypes = /* @__PURE__ */ ((ActionTypes2) => {
|
|
21163
|
+
ActionTypes2["CLOSE_LAYER"] = "CLOSE_LAYER";
|
|
21164
|
+
ActionTypes2["OPEN_LAYER"] = "OPEN_LAYER";
|
|
21165
|
+
ActionTypes2["SET_VISIBLE_OPTIONS"] = "SET_VISIBLE_OPTIONS";
|
|
21166
|
+
ActionTypes2["CLEAR_SEARCH"] = "CLEAR_SEARCH";
|
|
21167
|
+
ActionTypes2["RESET_LAYER_FOCUS"] = "RESET_LAYER_FOCUS";
|
|
21168
|
+
ActionTypes2["FOCUS_LAYER_OPTIONS"] = "FOCUS_LAYER_OPTIONS";
|
|
21169
|
+
ActionTypes2["BLUR_TRIGGER_INPUTS"] = "BLUR_TRIGGER_INPUTS";
|
|
21170
|
+
ActionTypes2["FOCUS_TRIGGER_INPUTS"] = "FOCUS_TRIGGER_INPUTS";
|
|
21171
|
+
ActionTypes2["ON_CHANGE_SEARCH"] = "ON_CHANGE_SEARCH";
|
|
21172
|
+
return ActionTypes2;
|
|
21173
|
+
})(ActionTypes || {});
|
|
20132
21174
|
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
20133
21175
|
EventKey2["RIGHT"] = "right";
|
|
20134
21176
|
EventKey2["LEFT"] = "left";
|
|
@@ -20139,6 +21181,239 @@ var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
|
20139
21181
|
EventKey2["TAB"] = "tab";
|
|
20140
21182
|
return EventKey2;
|
|
20141
21183
|
})(EventKey || {});
|
|
21184
|
+
const useCustomSelectLogic = ({
|
|
21185
|
+
state,
|
|
21186
|
+
dispatch,
|
|
21187
|
+
options,
|
|
21188
|
+
setTriggerFocus,
|
|
21189
|
+
disabled: disabled2,
|
|
21190
|
+
disabledContext,
|
|
21191
|
+
onCreate,
|
|
21192
|
+
onChange,
|
|
21193
|
+
selectedOptions,
|
|
21194
|
+
width: width2,
|
|
21195
|
+
small: small2,
|
|
21196
|
+
isFontLoaded,
|
|
21197
|
+
placeholder: placeholder3,
|
|
21198
|
+
firstSelectedOptionIndex,
|
|
21199
|
+
createAble,
|
|
21200
|
+
listRef,
|
|
21201
|
+
autoLayerWidth
|
|
21202
|
+
}) => {
|
|
21203
|
+
const closeLayer = () => {
|
|
21204
|
+
if (state.isLayerOpen) {
|
|
21205
|
+
dispatch({ type: ActionTypes.CLOSE_LAYER });
|
|
21206
|
+
}
|
|
21207
|
+
setTriggerFocus();
|
|
21208
|
+
};
|
|
21209
|
+
const openLayer = () => dispatch({ type: ActionTypes.OPEN_LAYER });
|
|
21210
|
+
const isFirstRun = useRef(true);
|
|
21211
|
+
useEffect(() => {
|
|
21212
|
+
if (isFirstRun.current) {
|
|
21213
|
+
isFirstRun.current = false;
|
|
21214
|
+
} else {
|
|
21215
|
+
dispatch({ type: ActionTypes.SET_VISIBLE_OPTIONS, options });
|
|
21216
|
+
}
|
|
21217
|
+
}, [options]);
|
|
21218
|
+
const onSelectOption = (evt, option2, close2) => {
|
|
21219
|
+
if (!(disabled2 || disabledContext)) {
|
|
21220
|
+
if (close2) {
|
|
21221
|
+
close2();
|
|
21222
|
+
}
|
|
21223
|
+
if (option2) {
|
|
21224
|
+
if (option2.createAble && onCreate) {
|
|
21225
|
+
onCreate(option2.value);
|
|
21226
|
+
} else {
|
|
21227
|
+
if (!option2.disabled) {
|
|
21228
|
+
if (Array.isArray(selectedOptions)) {
|
|
21229
|
+
const alreadySelected = selectedOptions.some(
|
|
21230
|
+
(selectedOption) => selectedOption.label === option2.label
|
|
21231
|
+
);
|
|
21232
|
+
if (!alreadySelected) {
|
|
21233
|
+
const newSelectedOptions = [...selectedOptions, option2];
|
|
21234
|
+
if (onChange) {
|
|
21235
|
+
onChange(evt, newSelectedOptions);
|
|
21236
|
+
}
|
|
21237
|
+
} else {
|
|
21238
|
+
const newSelectedOptions = selectedOptions.filter(
|
|
21239
|
+
(opt) => opt.label !== option2.label
|
|
21240
|
+
);
|
|
21241
|
+
if (onChange) {
|
|
21242
|
+
onChange(evt, newSelectedOptions);
|
|
21243
|
+
}
|
|
21244
|
+
}
|
|
21245
|
+
} else {
|
|
21246
|
+
if (onChange) {
|
|
21247
|
+
onChange(evt, option2);
|
|
21248
|
+
}
|
|
21249
|
+
}
|
|
21250
|
+
}
|
|
21251
|
+
}
|
|
21252
|
+
}
|
|
21253
|
+
dispatch({ type: ActionTypes.CLEAR_SEARCH, options });
|
|
21254
|
+
setTriggerFocus();
|
|
21255
|
+
}
|
|
21256
|
+
};
|
|
21257
|
+
const getTriggerWidth = useCallback$1(() => {
|
|
21258
|
+
if (!width2) return "100%";
|
|
21259
|
+
if (width2 !== "auto") return width2;
|
|
21260
|
+
return getWidestOptionWidth(options, small2, isFontLoaded, placeholder3);
|
|
21261
|
+
}, [options, isFontLoaded]);
|
|
21262
|
+
const getLayerWidth = useCallback$1(
|
|
21263
|
+
(triggerBounds2) => {
|
|
21264
|
+
if (!autoLayerWidth) return triggerBounds2 == null ? void 0 : triggerBounds2.width;
|
|
21265
|
+
const layerWidth = Math.max(
|
|
21266
|
+
getWidestOptionWidth(options, small2, isFontLoaded, placeholder3),
|
|
21267
|
+
triggerBounds2 == null ? void 0 : triggerBounds2.width
|
|
21268
|
+
);
|
|
21269
|
+
return layerWidth;
|
|
21270
|
+
},
|
|
21271
|
+
[options, isFontLoaded]
|
|
21272
|
+
);
|
|
21273
|
+
const { renderLayer, layerProps, triggerProps, triggerBounds } = useLayer({
|
|
21274
|
+
isOpen: (state == null ? void 0 : state.isLayerOpen) ?? false,
|
|
21275
|
+
overflowContainer: true,
|
|
21276
|
+
...placementOptions,
|
|
21277
|
+
ResizeObserver,
|
|
21278
|
+
onOutsideClick: closeLayer,
|
|
21279
|
+
onParentClose: closeLayer
|
|
21280
|
+
});
|
|
21281
|
+
const onClickTrigger = () => {
|
|
21282
|
+
if (disabled2 || disabledContext) {
|
|
21283
|
+
return;
|
|
21284
|
+
}
|
|
21285
|
+
if (state.isLayerOpen) {
|
|
21286
|
+
closeLayer();
|
|
21287
|
+
return;
|
|
21288
|
+
}
|
|
21289
|
+
dispatch({
|
|
21290
|
+
type: ActionTypes.RESET_LAYER_FOCUS,
|
|
21291
|
+
options,
|
|
21292
|
+
firstSelectedOptionIndex
|
|
21293
|
+
});
|
|
21294
|
+
openLayer();
|
|
21295
|
+
};
|
|
21296
|
+
const isFirstRender = useRef(true);
|
|
21297
|
+
useEffect(() => {
|
|
21298
|
+
if (isFirstRender.current) {
|
|
21299
|
+
isFirstRender.current = false;
|
|
21300
|
+
} else {
|
|
21301
|
+
if (!state.isLayerOpen) {
|
|
21302
|
+
dispatch({ type: ActionTypes.CLEAR_SEARCH, options });
|
|
21303
|
+
}
|
|
21304
|
+
}
|
|
21305
|
+
}, [state.isLayerOpen]);
|
|
21306
|
+
const onClickDeselectOption = (evt, options2) => {
|
|
21307
|
+
const newSelectedOptions = selectedOptions instanceof Array ? selectedOptions.filter((option2) => option2.value !== options2.value) : null;
|
|
21308
|
+
if (onChange) {
|
|
21309
|
+
onChange(evt, newSelectedOptions);
|
|
21310
|
+
}
|
|
21311
|
+
};
|
|
21312
|
+
const onClickClearAll = (evt) => {
|
|
21313
|
+
const newSelectedOptions = selectedOptions instanceof Array ? [] : { value: null };
|
|
21314
|
+
if (onChange) {
|
|
21315
|
+
onChange(evt, newSelectedOptions);
|
|
21316
|
+
}
|
|
21317
|
+
};
|
|
21318
|
+
const onChangeSearch = (value) => dispatch({
|
|
21319
|
+
type: ActionTypes.ON_CHANGE_SEARCH,
|
|
21320
|
+
options,
|
|
21321
|
+
value,
|
|
21322
|
+
createAble
|
|
21323
|
+
});
|
|
21324
|
+
const clickTrigger = () => {
|
|
21325
|
+
openLayer();
|
|
21326
|
+
dispatch({ type: ActionTypes.BLUR_TRIGGER_INPUTS });
|
|
21327
|
+
};
|
|
21328
|
+
const scrollToItem = (index2) => {
|
|
21329
|
+
if (listRef.current && Number.isInteger(index2)) {
|
|
21330
|
+
listRef.current.scrollToItem(index2);
|
|
21331
|
+
}
|
|
21332
|
+
};
|
|
21333
|
+
const focusNextLayerOption = (ICustomSelectDirection2) => {
|
|
21334
|
+
const next2 = nextLayerFocus(ICustomSelectDirection2, state.layerFocus);
|
|
21335
|
+
dispatch({
|
|
21336
|
+
type: ActionTypes.FOCUS_LAYER_OPTIONS,
|
|
21337
|
+
nextLayerFocus: next2
|
|
21338
|
+
});
|
|
21339
|
+
scrollToItem(next2.current);
|
|
21340
|
+
};
|
|
21341
|
+
const focusTriggerInputs = (ICustomSelectDirection2) => {
|
|
21342
|
+
dispatch({
|
|
21343
|
+
type: ActionTypes.FOCUS_TRIGGER_INPUTS,
|
|
21344
|
+
ICustomSelectDirection: ICustomSelectDirection2,
|
|
21345
|
+
selectedOptions
|
|
21346
|
+
});
|
|
21347
|
+
};
|
|
21348
|
+
const clearAll2 = (evt) => onClickClearAll(evt);
|
|
21349
|
+
const deselectIsFocused = selectedOptions && selectedOptions[state.triggerFocus.currentOption];
|
|
21350
|
+
const deselectOption = (evt) => {
|
|
21351
|
+
onClickDeselectOption(
|
|
21352
|
+
evt,
|
|
21353
|
+
selectedOptions[state.triggerFocus.currentOption]
|
|
21354
|
+
);
|
|
21355
|
+
};
|
|
21356
|
+
const selectOption = (evt) => {
|
|
21357
|
+
var _a2;
|
|
21358
|
+
onSelectOption(
|
|
21359
|
+
evt,
|
|
21360
|
+
(_a2 = state == null ? void 0 : state.visibleOptions) == null ? void 0 : _a2[state.layerFocus.current],
|
|
21361
|
+
closeLayer
|
|
21362
|
+
);
|
|
21363
|
+
};
|
|
21364
|
+
const clearAllIsFocused = state.triggerFocus.clearAll;
|
|
21365
|
+
const onKeyEvent = (key2, evt) => {
|
|
21366
|
+
switch (key2) {
|
|
21367
|
+
case EventKey.UP: {
|
|
21368
|
+
focusNextLayerOption(key2);
|
|
21369
|
+
break;
|
|
21370
|
+
}
|
|
21371
|
+
case EventKey.DOWN: {
|
|
21372
|
+
if (state.isLayerOpen) {
|
|
21373
|
+
focusNextLayerOption(key2);
|
|
21374
|
+
} else {
|
|
21375
|
+
clickTrigger();
|
|
21376
|
+
}
|
|
21377
|
+
break;
|
|
21378
|
+
}
|
|
21379
|
+
case EventKey.LEFT:
|
|
21380
|
+
case EventKey.RIGHT: {
|
|
21381
|
+
focusTriggerInputs(key2);
|
|
21382
|
+
break;
|
|
21383
|
+
}
|
|
21384
|
+
case EventKey.ENTER: {
|
|
21385
|
+
if (clearAllIsFocused) {
|
|
21386
|
+
clearAll2(evt);
|
|
21387
|
+
} else if (deselectIsFocused) {
|
|
21388
|
+
deselectOption(evt);
|
|
21389
|
+
} else {
|
|
21390
|
+
selectOption(evt);
|
|
21391
|
+
}
|
|
21392
|
+
break;
|
|
21393
|
+
}
|
|
21394
|
+
case EventKey.ESC: {
|
|
21395
|
+
closeLayer();
|
|
21396
|
+
break;
|
|
21397
|
+
}
|
|
21398
|
+
}
|
|
21399
|
+
};
|
|
21400
|
+
return {
|
|
21401
|
+
getTriggerWidth,
|
|
21402
|
+
onKeyEvent,
|
|
21403
|
+
clearAllIsFocused,
|
|
21404
|
+
triggerProps,
|
|
21405
|
+
onClickTrigger,
|
|
21406
|
+
onChangeSearch,
|
|
21407
|
+
onClickDeselectOption,
|
|
21408
|
+
onClickClearAll,
|
|
21409
|
+
renderLayer,
|
|
21410
|
+
layerProps,
|
|
21411
|
+
closeLayer,
|
|
21412
|
+
onSelectOption,
|
|
21413
|
+
getLayerWidth,
|
|
21414
|
+
triggerBounds
|
|
21415
|
+
};
|
|
21416
|
+
};
|
|
20142
21417
|
const CustomSelect = (props) => {
|
|
20143
21418
|
const {
|
|
20144
21419
|
multi: isMulti2 = false,
|
|
@@ -20167,11 +21442,12 @@ const CustomSelect = (props) => {
|
|
|
20167
21442
|
right: right2 = false,
|
|
20168
21443
|
testId = void 0
|
|
20169
21444
|
} = props;
|
|
20170
|
-
useContext(DisabledContext);
|
|
20171
|
-
|
|
20172
|
-
|
|
20173
|
-
|
|
20174
|
-
|
|
21445
|
+
const disabledContext = useContext(DisabledContext);
|
|
21446
|
+
const createAble = onCreate !== null;
|
|
21447
|
+
const listRef = useRef(null);
|
|
21448
|
+
const [triggerRef, setTriggerFocus] = useFocus();
|
|
21449
|
+
const isFontLoaded = useFontsReady();
|
|
21450
|
+
const [state, dispatch] = useReducer(
|
|
20175
21451
|
reducer,
|
|
20176
21452
|
// @ts-ignore: write explicit reason: write explicit reason
|
|
20177
21453
|
{ options, firstSelectedOptionIndex },
|
|
@@ -20184,7 +21460,96 @@ const CustomSelect = (props) => {
|
|
|
20184
21460
|
isLayerOpen: false
|
|
20185
21461
|
})
|
|
20186
21462
|
);
|
|
20187
|
-
|
|
21463
|
+
const {
|
|
21464
|
+
getTriggerWidth,
|
|
21465
|
+
onKeyEvent,
|
|
21466
|
+
clearAllIsFocused,
|
|
21467
|
+
triggerProps,
|
|
21468
|
+
onClickTrigger,
|
|
21469
|
+
onChangeSearch,
|
|
21470
|
+
onClickDeselectOption,
|
|
21471
|
+
onClickClearAll,
|
|
21472
|
+
renderLayer,
|
|
21473
|
+
layerProps,
|
|
21474
|
+
closeLayer,
|
|
21475
|
+
onSelectOption,
|
|
21476
|
+
getLayerWidth,
|
|
21477
|
+
triggerBounds
|
|
21478
|
+
} = useCustomSelectLogic({
|
|
21479
|
+
...props,
|
|
21480
|
+
state,
|
|
21481
|
+
dispatch,
|
|
21482
|
+
setTriggerFocus,
|
|
21483
|
+
disabledContext,
|
|
21484
|
+
isFontLoaded,
|
|
21485
|
+
createAble,
|
|
21486
|
+
listRef
|
|
21487
|
+
});
|
|
21488
|
+
return /* @__PURE__ */ jsx("div", { style: { width: getTriggerWidth() }, children: /* @__PURE__ */ jsxs(
|
|
21489
|
+
KeyboardEventHandler,
|
|
21490
|
+
{
|
|
21491
|
+
handleKeys: Object.values(EventKey),
|
|
21492
|
+
onKeyEvent,
|
|
21493
|
+
children: [
|
|
21494
|
+
/* @__PURE__ */ jsx(
|
|
21495
|
+
Trigger,
|
|
21496
|
+
{
|
|
21497
|
+
selectedOptions,
|
|
21498
|
+
searchValue: state.searchValue,
|
|
21499
|
+
isOpen: state.isLayerOpen,
|
|
21500
|
+
focusedSelectedOptionIndex: state.triggerFocus.currentOption,
|
|
21501
|
+
clearAllIsFocused,
|
|
21502
|
+
searchable,
|
|
21503
|
+
triggerRef: mergeRefs(triggerRef, triggerProps.ref),
|
|
21504
|
+
error: error2,
|
|
21505
|
+
warning: warning2,
|
|
21506
|
+
tooltip: tooltip2,
|
|
21507
|
+
small: small2,
|
|
21508
|
+
isInTable: isInTable2,
|
|
21509
|
+
disabled: disabled2 || disabledContext,
|
|
21510
|
+
clearable,
|
|
21511
|
+
tabIndex,
|
|
21512
|
+
onClickTrigger,
|
|
21513
|
+
onChangeSearch,
|
|
21514
|
+
onClickDeselect: onClickDeselectOption,
|
|
21515
|
+
onClickClear: onClickClearAll,
|
|
21516
|
+
onFocus,
|
|
21517
|
+
onBlur,
|
|
21518
|
+
groupOrder,
|
|
21519
|
+
maxTooltipWidth,
|
|
21520
|
+
placeholder: placeholder3,
|
|
21521
|
+
right: right2,
|
|
21522
|
+
testId
|
|
21523
|
+
}
|
|
21524
|
+
),
|
|
21525
|
+
state.isLayerOpen && renderLayer(
|
|
21526
|
+
/* @__PURE__ */ jsx("div", { ...layerProps, className: styles$n.layerContainer, children: /* @__PURE__ */ jsx(
|
|
21527
|
+
Layer,
|
|
21528
|
+
{
|
|
21529
|
+
listRef,
|
|
21530
|
+
isMulti: isMulti2,
|
|
21531
|
+
sections: state.visibleOptions,
|
|
21532
|
+
selectedOptions,
|
|
21533
|
+
onSelectOption: (evt, option2) => {
|
|
21534
|
+
const close2 = !isMulti2 ? closeLayer : void 0;
|
|
21535
|
+
onSelectOption(evt, option2, close2);
|
|
21536
|
+
},
|
|
21537
|
+
closeLayer: () => {
|
|
21538
|
+
if (closeOnOptionActionClick) {
|
|
21539
|
+
closeLayer();
|
|
21540
|
+
}
|
|
21541
|
+
},
|
|
21542
|
+
width: getLayerWidth(triggerBounds),
|
|
21543
|
+
small: small2,
|
|
21544
|
+
focusedOptionIndex: state.layerFocus.current,
|
|
21545
|
+
firstSelectedOptionIndex: firstSelectedOptionIndex ?? 0,
|
|
21546
|
+
testId: testId && `${testId}-layer`
|
|
21547
|
+
}
|
|
21548
|
+
) })
|
|
21549
|
+
)
|
|
21550
|
+
]
|
|
21551
|
+
}
|
|
21552
|
+
) });
|
|
20188
21553
|
};
|
|
20189
21554
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
20190
21555
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
@@ -20485,7 +21850,7 @@ const Pagination = ({ pagination }) => {
|
|
|
20485
21850
|
),
|
|
20486
21851
|
/* @__PURE__ */ jsxs(InputGroup, { small: small2, width: "auto", children: [
|
|
20487
21852
|
/* @__PURE__ */ jsx(
|
|
20488
|
-
Input,
|
|
21853
|
+
Input$1,
|
|
20489
21854
|
{
|
|
20490
21855
|
right: true,
|
|
20491
21856
|
value: unvalidatedSelectedPage,
|
|
@@ -20548,7 +21913,7 @@ const Popover = ({
|
|
|
20548
21913
|
onToggle: externalOnToggle
|
|
20549
21914
|
}) => {
|
|
20550
21915
|
const disabledContext = useContext(DisabledContext);
|
|
20551
|
-
const [
|
|
21916
|
+
const [isOpen2, setOpen] = externalIsOpen !== void 0 ? [externalIsOpen, externalOnToggle] : useState(false);
|
|
20552
21917
|
const close2 = () => {
|
|
20553
21918
|
if (!disabled2 && !disabledContext) {
|
|
20554
21919
|
if (setOpen) {
|
|
@@ -20559,7 +21924,7 @@ const Popover = ({
|
|
|
20559
21924
|
const toggle2 = () => {
|
|
20560
21925
|
if (!(disabled2 || disabledContext)) {
|
|
20561
21926
|
if (setOpen) {
|
|
20562
|
-
setOpen(!
|
|
21927
|
+
setOpen(!isOpen2);
|
|
20563
21928
|
}
|
|
20564
21929
|
}
|
|
20565
21930
|
};
|
|
@@ -20569,7 +21934,7 @@ const Popover = ({
|
|
|
20569
21934
|
}
|
|
20570
21935
|
}, [disabled2, disabledContext]);
|
|
20571
21936
|
const { renderLayer, arrowProps, layerProps, triggerProps } = useLayer({
|
|
20572
|
-
isOpen,
|
|
21937
|
+
isOpen: isOpen2,
|
|
20573
21938
|
placement,
|
|
20574
21939
|
auto: true,
|
|
20575
21940
|
triggerOffset: 6,
|
|
@@ -20579,7 +21944,7 @@ const Popover = ({
|
|
|
20579
21944
|
});
|
|
20580
21945
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
20581
21946
|
/* @__PURE__ */ jsx("div", { ref: triggerProps.ref, onClick: toggle2, "data-testid": testId, children }),
|
|
20582
|
-
|
|
21947
|
+
isOpen2 && renderLayer(
|
|
20583
21948
|
/* @__PURE__ */ jsxs(
|
|
20584
21949
|
"div",
|
|
20585
21950
|
{
|
|
@@ -20856,11 +22221,11 @@ var makeError = { exports: {} };
|
|
|
20856
22221
|
});
|
|
20857
22222
|
};
|
|
20858
22223
|
}
|
|
20859
|
-
function BaseError(
|
|
20860
|
-
if (
|
|
22224
|
+
function BaseError(message2) {
|
|
22225
|
+
if (message2 !== void 0) {
|
|
20861
22226
|
defineProperty2(this, "message", {
|
|
20862
22227
|
configurable: true,
|
|
20863
|
-
value:
|
|
22228
|
+
value: message2,
|
|
20864
22229
|
writable: true
|
|
20865
22230
|
});
|
|
20866
22231
|
}
|
|
@@ -21516,14 +22881,14 @@ function debounce$1(delay, atBegin, callback) {
|
|
|
21516
22881
|
function Cast(value) {
|
|
21517
22882
|
return value;
|
|
21518
22883
|
}
|
|
21519
|
-
function assertGet(value, key2,
|
|
22884
|
+
function assertGet(value, key2, message2) {
|
|
21520
22885
|
const prop = value[key2];
|
|
21521
|
-
assert(!isUndefined(prop),
|
|
22886
|
+
assert(!isUndefined(prop), message2);
|
|
21522
22887
|
return prop;
|
|
21523
22888
|
}
|
|
21524
|
-
function assert(testValue,
|
|
22889
|
+
function assert(testValue, message2) {
|
|
21525
22890
|
if (!testValue) {
|
|
21526
|
-
throw new AssertionError(
|
|
22891
|
+
throw new AssertionError(message2);
|
|
21527
22892
|
}
|
|
21528
22893
|
}
|
|
21529
22894
|
var AssertionError = class extends makeErrorExports.BaseError {
|
|
@@ -21798,8 +23163,8 @@ function isErrorConstant(code) {
|
|
|
21798
23163
|
return isString$2(code) && includes(values(ErrorConstant), code);
|
|
21799
23164
|
}
|
|
21800
23165
|
function createErrorMessage(code, extraMessage) {
|
|
21801
|
-
const
|
|
21802
|
-
const prefix2 =
|
|
23166
|
+
const message2 = errorMessageMap[code];
|
|
23167
|
+
const prefix2 = message2 ? `${message2}
|
|
21803
23168
|
|
|
21804
23169
|
` : "";
|
|
21805
23170
|
const customMessage = extraMessage ? `${extraMessage}
|
|
@@ -21811,9 +23176,9 @@ var RemirrorError = class extends makeErrorExports.BaseError {
|
|
|
21811
23176
|
/**
|
|
21812
23177
|
* The constructor is intentionally kept private to prevent being extended from.
|
|
21813
23178
|
*/
|
|
21814
|
-
constructor({ code, message, disableLogging = false } = {}) {
|
|
23179
|
+
constructor({ code, message: message2, disableLogging = false } = {}) {
|
|
21815
23180
|
const errorCode = isErrorConstant(code) ? code : ErrorConstant.CUSTOM;
|
|
21816
|
-
super(createErrorMessage(errorCode,
|
|
23181
|
+
super(createErrorMessage(errorCode, message2));
|
|
21817
23182
|
this.errorCode = errorCode;
|
|
21818
23183
|
this.url = `${ERROR_INFORMATION_URL}#${errorCode.toLowerCase()}`;
|
|
21819
23184
|
if (!disableLogging) {
|
|
@@ -24534,16 +25899,16 @@ class NodeContext {
|
|
|
24534
25899
|
}
|
|
24535
25900
|
}
|
|
24536
25901
|
class ParseContext {
|
|
24537
|
-
constructor(parser2, options,
|
|
25902
|
+
constructor(parser2, options, isOpen2) {
|
|
24538
25903
|
this.parser = parser2;
|
|
24539
25904
|
this.options = options;
|
|
24540
|
-
this.isOpen =
|
|
25905
|
+
this.isOpen = isOpen2;
|
|
24541
25906
|
this.open = 0;
|
|
24542
25907
|
let topNode = options.topNode, topContext;
|
|
24543
|
-
let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (
|
|
25908
|
+
let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen2 ? OPT_OPEN_LEFT : 0);
|
|
24544
25909
|
if (topNode)
|
|
24545
25910
|
topContext = new NodeContext(topNode.type, topNode.attrs, Mark$1.none, true, options.topMatch || topNode.type.contentMatch, topOptions);
|
|
24546
|
-
else if (
|
|
25911
|
+
else if (isOpen2)
|
|
24547
25912
|
topContext = new NodeContext(null, null, Mark$1.none, true, null, topOptions);
|
|
24548
25913
|
else
|
|
24549
25914
|
topContext = new NodeContext(parser2.schema.topNodeType, null, Mark$1.none, true, null, topOptions);
|
|
@@ -25485,8 +26850,8 @@ class StepResult {
|
|
|
25485
26850
|
/**
|
|
25486
26851
|
Create a failed step result.
|
|
25487
26852
|
*/
|
|
25488
|
-
static fail(
|
|
25489
|
-
return new StepResult(null,
|
|
26853
|
+
static fail(message2) {
|
|
26854
|
+
return new StepResult(null, message2);
|
|
25490
26855
|
}
|
|
25491
26856
|
/**
|
|
25492
26857
|
Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
|
|
@@ -26632,8 +27997,8 @@ class DocAttrStep extends Step {
|
|
|
26632
27997
|
Step.jsonID("docAttr", DocAttrStep);
|
|
26633
27998
|
let TransformError = class extends Error {
|
|
26634
27999
|
};
|
|
26635
|
-
TransformError = function TransformError2(
|
|
26636
|
-
let err = Error.call(this,
|
|
28000
|
+
TransformError = function TransformError2(message2) {
|
|
28001
|
+
let err = Error.call(this, message2);
|
|
26637
28002
|
err.__proto__ = TransformError2.prototype;
|
|
26638
28003
|
return err;
|
|
26639
28004
|
};
|
|
@@ -31033,10 +32398,10 @@ editHandlers.keydown = (view, _event) => {
|
|
|
31033
32398
|
if (event.keyCode != 229)
|
|
31034
32399
|
view.domObserver.forceFlush();
|
|
31035
32400
|
if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
|
|
31036
|
-
let
|
|
31037
|
-
view.input.lastIOSEnter =
|
|
32401
|
+
let now2 = Date.now();
|
|
32402
|
+
view.input.lastIOSEnter = now2;
|
|
31038
32403
|
view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
31039
|
-
if (view.input.lastIOSEnter ==
|
|
32404
|
+
if (view.input.lastIOSEnter == now2) {
|
|
31040
32405
|
view.someProp("handleKeyDown", (f2) => f2(view, keyEvent(13, "Enter")));
|
|
31041
32406
|
view.input.lastIOSEnter = 0;
|
|
31042
32407
|
}
|
|
@@ -31166,14 +32531,14 @@ handlers.mousedown = (view, _event) => {
|
|
|
31166
32531
|
let event = _event;
|
|
31167
32532
|
view.input.shiftKey = event.shiftKey;
|
|
31168
32533
|
let flushed = forceDOMFlush(view);
|
|
31169
|
-
let
|
|
31170
|
-
if (
|
|
32534
|
+
let now2 = Date.now(), type = "singleClick";
|
|
32535
|
+
if (now2 - view.input.lastClick.time < 500 && isNear$1(event, view.input.lastClick) && !event[selectNodeModifier]) {
|
|
31171
32536
|
if (view.input.lastClick.type == "singleClick")
|
|
31172
32537
|
type = "doubleClick";
|
|
31173
32538
|
else if (view.input.lastClick.type == "doubleClick")
|
|
31174
32539
|
type = "tripleClick";
|
|
31175
32540
|
}
|
|
31176
|
-
view.input.lastClick = { time:
|
|
32541
|
+
view.input.lastClick = { time: now2, x: event.clientX, y: event.clientY, type };
|
|
31177
32542
|
let pos = view.posAtCoords(eventCoords(event));
|
|
31178
32543
|
if (!pos)
|
|
31179
32544
|
return;
|
|
@@ -49143,7 +50508,7 @@ var moo = { exports: {} };
|
|
|
49143
50508
|
return new LexerIterator(this);
|
|
49144
50509
|
};
|
|
49145
50510
|
}
|
|
49146
|
-
Lexer2.prototype.formatError = function(token2,
|
|
50511
|
+
Lexer2.prototype.formatError = function(token2, message2) {
|
|
49147
50512
|
if (token2 == null) {
|
|
49148
50513
|
var text2 = this.buffer.slice(this.index);
|
|
49149
50514
|
var token2 = {
|
|
@@ -49163,7 +50528,7 @@ var moo = { exports: {} };
|
|
|
49163
50528
|
this.line - token2.line + numLinesAround + 1
|
|
49164
50529
|
).slice(0, 5);
|
|
49165
50530
|
var errorLines = [];
|
|
49166
|
-
errorLines.push(
|
|
50531
|
+
errorLines.push(message2 + " at line " + token2.line + " col " + token2.col + ":");
|
|
49167
50532
|
errorLines.push("");
|
|
49168
50533
|
for (var i = 0; i < displayedLines.length; i++) {
|
|
49169
50534
|
var line2 = displayedLines[i];
|
|
@@ -49498,14 +50863,14 @@ function processTokens(tokens, mapText) {
|
|
|
49498
50863
|
];
|
|
49499
50864
|
});
|
|
49500
50865
|
}
|
|
49501
|
-
function compileMessage(
|
|
50866
|
+
function compileMessage(message2, mapText = (v2) => v2) {
|
|
49502
50867
|
try {
|
|
49503
|
-
return processTokens(parse_1(
|
|
50868
|
+
return processTokens(parse_1(message2), mapText);
|
|
49504
50869
|
} catch (e2) {
|
|
49505
50870
|
console.error(`${e2.message}
|
|
49506
50871
|
|
|
49507
|
-
Message: ${
|
|
49508
|
-
return
|
|
50872
|
+
Message: ${message2}`);
|
|
50873
|
+
return message2;
|
|
49509
50874
|
}
|
|
49510
50875
|
}
|
|
49511
50876
|
const isString$1 = (s) => typeof s === "string";
|
|
@@ -49563,21 +50928,21 @@ const getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
|
49563
50928
|
const style2 = (format) => {
|
|
49564
50929
|
return typeof format === "object" ? format : formats[format] || { style: format };
|
|
49565
50930
|
};
|
|
49566
|
-
const replaceOctothorpe = (value,
|
|
50931
|
+
const replaceOctothorpe = (value, message2) => {
|
|
49567
50932
|
const numberFormat = Object.keys(formats).length ? style2("number") : void 0;
|
|
49568
50933
|
const valueStr = number$1(locales, value, numberFormat);
|
|
49569
|
-
return
|
|
50934
|
+
return message2.replace(new RegExp(OCTOTHORPE_PH, "g"), valueStr);
|
|
49570
50935
|
};
|
|
49571
50936
|
return {
|
|
49572
50937
|
plural: (value, cases) => {
|
|
49573
50938
|
const { offset: offset3 = 0 } = cases;
|
|
49574
|
-
const
|
|
49575
|
-
return replaceOctothorpe(value - offset3,
|
|
50939
|
+
const message2 = plural(locales, false, value, cases);
|
|
50940
|
+
return replaceOctothorpe(value - offset3, message2);
|
|
49576
50941
|
},
|
|
49577
50942
|
selectordinal: (value, cases) => {
|
|
49578
50943
|
const { offset: offset3 = 0 } = cases;
|
|
49579
|
-
const
|
|
49580
|
-
return replaceOctothorpe(value - offset3,
|
|
50944
|
+
const message2 = plural(locales, true, value, cases);
|
|
50945
|
+
return replaceOctothorpe(value - offset3, message2);
|
|
49581
50946
|
},
|
|
49582
50947
|
select: selectFormatter,
|
|
49583
50948
|
number: (value, format) => number$1(locales, value, style2(format)),
|
|
@@ -49591,12 +50956,12 @@ function interpolate$1(translation, locale, locales) {
|
|
|
49591
50956
|
const formatMessage = (tokens, replaceOctothorpe = false) => {
|
|
49592
50957
|
if (!Array.isArray(tokens))
|
|
49593
50958
|
return tokens;
|
|
49594
|
-
return tokens.reduce((
|
|
50959
|
+
return tokens.reduce((message2, token2) => {
|
|
49595
50960
|
if (token2 === "#" && replaceOctothorpe) {
|
|
49596
|
-
return
|
|
50961
|
+
return message2 + OCTOTHORPE_PH;
|
|
49597
50962
|
}
|
|
49598
50963
|
if (isString$1(token2)) {
|
|
49599
|
-
return
|
|
50964
|
+
return message2 + token2;
|
|
49600
50965
|
}
|
|
49601
50966
|
const [name2, type, format] = token2;
|
|
49602
50967
|
let interpolatedFormat = {};
|
|
@@ -49620,9 +50985,9 @@ function interpolate$1(translation, locale, locales) {
|
|
|
49620
50985
|
value = values2[name2];
|
|
49621
50986
|
}
|
|
49622
50987
|
if (value == null) {
|
|
49623
|
-
return
|
|
50988
|
+
return message2;
|
|
49624
50989
|
}
|
|
49625
|
-
return
|
|
50990
|
+
return message2 + value;
|
|
49626
50991
|
}, "");
|
|
49627
50992
|
};
|
|
49628
50993
|
const result = formatMessage(translation);
|
|
@@ -49769,13 +51134,13 @@ class I18n extends EventEmitter {
|
|
|
49769
51134
|
this.emit("change");
|
|
49770
51135
|
}
|
|
49771
51136
|
_(id2, values2, options) {
|
|
49772
|
-
let
|
|
51137
|
+
let message2 = options == null ? void 0 : options.message;
|
|
49773
51138
|
if (!id2) {
|
|
49774
51139
|
id2 = "";
|
|
49775
51140
|
}
|
|
49776
51141
|
if (!isString$1(id2)) {
|
|
49777
51142
|
values2 = id2.values || values2;
|
|
49778
|
-
|
|
51143
|
+
message2 = id2.message;
|
|
49779
51144
|
id2 = id2.id;
|
|
49780
51145
|
}
|
|
49781
51146
|
const messageForId = this.messages[id2];
|
|
@@ -49787,7 +51152,7 @@ class I18n extends EventEmitter {
|
|
|
49787
51152
|
if (messageMissing) {
|
|
49788
51153
|
this.emit("missing", { id: id2, locale: this._locale });
|
|
49789
51154
|
}
|
|
49790
|
-
let translation = messageForId ||
|
|
51155
|
+
let translation = messageForId || message2 || id2;
|
|
49791
51156
|
if (process.env.NODE_ENV !== "production") {
|
|
49792
51157
|
translation = isString$1(translation) ? compileMessage(translation) : translation;
|
|
49793
51158
|
}
|
|
@@ -51305,13 +52670,13 @@ const styles$d = {
|
|
|
51305
52670
|
icon: icon$1
|
|
51306
52671
|
};
|
|
51307
52672
|
const TooltipIcon = memo(
|
|
51308
|
-
({ isOpen, label: label2, icon: icon2, invalid }) => {
|
|
52673
|
+
({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
|
|
51309
52674
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
51310
52675
|
/* @__PURE__ */ jsx(
|
|
51311
52676
|
Tooltip,
|
|
51312
52677
|
{
|
|
51313
52678
|
text: label2,
|
|
51314
|
-
enabled: !
|
|
52679
|
+
enabled: !isOpen2,
|
|
51315
52680
|
placement: "right-center",
|
|
51316
52681
|
possiblePlacements: ["right-center"],
|
|
51317
52682
|
fontSize: 16,
|
|
@@ -51326,7 +52691,7 @@ const TooltipIcon = memo(
|
|
|
51326
52691
|
(prevProps, nextProps) => isEqual$1(prevProps, nextProps)
|
|
51327
52692
|
);
|
|
51328
52693
|
const Link$1 = ({
|
|
51329
|
-
isOpen,
|
|
52694
|
+
isOpen: isOpen2,
|
|
51330
52695
|
items,
|
|
51331
52696
|
sectionIndex,
|
|
51332
52697
|
onClick,
|
|
@@ -51351,7 +52716,7 @@ const Link$1 = ({
|
|
|
51351
52716
|
label: link2.label,
|
|
51352
52717
|
icon: link2.icon,
|
|
51353
52718
|
invalid: link2.invalid,
|
|
51354
|
-
isOpen
|
|
52719
|
+
isOpen: isOpen2
|
|
51355
52720
|
},
|
|
51356
52721
|
key2
|
|
51357
52722
|
)
|
|
@@ -51361,7 +52726,7 @@ const Link$1 = ({
|
|
|
51361
52726
|
}) });
|
|
51362
52727
|
};
|
|
51363
52728
|
const Sections = ({
|
|
51364
|
-
isOpen,
|
|
52729
|
+
isOpen: isOpen2,
|
|
51365
52730
|
sections,
|
|
51366
52731
|
onClick
|
|
51367
52732
|
}) => {
|
|
@@ -51370,7 +52735,7 @@ const Sections = ({
|
|
|
51370
52735
|
/* @__PURE__ */ jsx(
|
|
51371
52736
|
Link$1,
|
|
51372
52737
|
{
|
|
51373
|
-
isOpen,
|
|
52738
|
+
isOpen: isOpen2,
|
|
51374
52739
|
items: section2.items,
|
|
51375
52740
|
sectionIndex: i,
|
|
51376
52741
|
onClick,
|
|
@@ -51387,7 +52752,7 @@ const SideBar = memo(
|
|
|
51387
52752
|
},
|
|
51388
52753
|
top: top2
|
|
51389
52754
|
}) => {
|
|
51390
|
-
const [
|
|
52755
|
+
const [isOpen2, setIsOpen] = useState(startOpen);
|
|
51391
52756
|
const onClick = (evt, value, label2, clickHandler) => {
|
|
51392
52757
|
evt.preventDefault();
|
|
51393
52758
|
if (typeof clickHandler === "function") {
|
|
@@ -51402,7 +52767,7 @@ const SideBar = memo(
|
|
|
51402
52767
|
Drawer,
|
|
51403
52768
|
{
|
|
51404
52769
|
fixed: true,
|
|
51405
|
-
open:
|
|
52770
|
+
open: isOpen2,
|
|
51406
52771
|
top: top2,
|
|
51407
52772
|
background: "var(--color-background-sidebar)",
|
|
51408
52773
|
closedWidth: "var(--size-sidebar)",
|
|
@@ -51415,19 +52780,19 @@ const SideBar = memo(
|
|
|
51415
52780
|
if (evt.shiftKey && onShiftClickToggleOpen) {
|
|
51416
52781
|
onShiftClickToggleOpen(evt);
|
|
51417
52782
|
}
|
|
51418
|
-
setIsOpen(!
|
|
52783
|
+
setIsOpen(!isOpen2);
|
|
51419
52784
|
},
|
|
51420
52785
|
colored: true,
|
|
51421
52786
|
round: true,
|
|
51422
52787
|
icon: IconType.LEFT
|
|
51423
52788
|
}
|
|
51424
52789
|
),
|
|
51425
|
-
children: /* @__PURE__ */ jsx("div", { className: cx$2(styles$d.sidebar, !
|
|
52790
|
+
children: /* @__PURE__ */ jsx("div", { className: cx$2(styles$d.sidebar, !isOpen2 ? styles$d.collapsed : ""), children: visible && /* @__PURE__ */ jsxs("div", { className: styles$d.inner, children: [
|
|
51426
52791
|
/* @__PURE__ */ jsx("h4", { className: styles$d.title, children: options.title }),
|
|
51427
52792
|
/* @__PURE__ */ jsx(
|
|
51428
52793
|
Sections,
|
|
51429
52794
|
{
|
|
51430
|
-
isOpen,
|
|
52795
|
+
isOpen: isOpen2,
|
|
51431
52796
|
sections: options.sections,
|
|
51432
52797
|
onClick
|
|
51433
52798
|
}
|
|
@@ -51497,21 +52862,21 @@ var preWarningFns = [];
|
|
|
51497
52862
|
var preMessage = function preMessage2(fn) {
|
|
51498
52863
|
preWarningFns.push(fn);
|
|
51499
52864
|
};
|
|
51500
|
-
function warning$1(valid,
|
|
52865
|
+
function warning$1(valid, message2) {
|
|
51501
52866
|
if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
|
|
51502
52867
|
var finalMessage = preWarningFns.reduce(function(msg2, preMessageFn) {
|
|
51503
52868
|
return preMessageFn(msg2 !== null && msg2 !== void 0 ? msg2 : "", "warning");
|
|
51504
|
-
},
|
|
52869
|
+
}, message2);
|
|
51505
52870
|
if (finalMessage) {
|
|
51506
52871
|
console.error("Warning: ".concat(finalMessage));
|
|
51507
52872
|
}
|
|
51508
52873
|
}
|
|
51509
52874
|
}
|
|
51510
|
-
function note(valid,
|
|
52875
|
+
function note(valid, message2) {
|
|
51511
52876
|
if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
|
|
51512
52877
|
var finalMessage = preWarningFns.reduce(function(msg2, preMessageFn) {
|
|
51513
52878
|
return preMessageFn(msg2 !== null && msg2 !== void 0 ? msg2 : "", "note");
|
|
51514
|
-
},
|
|
52879
|
+
}, message2);
|
|
51515
52880
|
if (finalMessage) {
|
|
51516
52881
|
console.warn("Note: ".concat(finalMessage));
|
|
51517
52882
|
}
|
|
@@ -51520,17 +52885,17 @@ function note(valid, message) {
|
|
|
51520
52885
|
function resetWarned() {
|
|
51521
52886
|
warned$1 = {};
|
|
51522
52887
|
}
|
|
51523
|
-
function call(method, valid,
|
|
51524
|
-
if (!valid && !warned$1[
|
|
51525
|
-
method(false,
|
|
51526
|
-
warned$1[
|
|
52888
|
+
function call(method, valid, message2) {
|
|
52889
|
+
if (!valid && !warned$1[message2]) {
|
|
52890
|
+
method(false, message2);
|
|
52891
|
+
warned$1[message2] = true;
|
|
51527
52892
|
}
|
|
51528
52893
|
}
|
|
51529
|
-
function warningOnce(valid,
|
|
51530
|
-
call(warning$1, valid,
|
|
52894
|
+
function warningOnce(valid, message2) {
|
|
52895
|
+
call(warning$1, valid, message2);
|
|
51531
52896
|
}
|
|
51532
|
-
function noteOnce(valid,
|
|
51533
|
-
call(note, valid,
|
|
52897
|
+
function noteOnce(valid, message2) {
|
|
52898
|
+
call(note, valid, message2);
|
|
51534
52899
|
}
|
|
51535
52900
|
warningOnce.preMessage = preMessage;
|
|
51536
52901
|
warningOnce.resetWarned = resetWarned;
|
|
@@ -54028,7 +55393,7 @@ const Title$1 = ({
|
|
|
54028
55393
|
return /* @__PURE__ */ jsx("div", { children: actionsComponent });
|
|
54029
55394
|
};
|
|
54030
55395
|
return /* @__PURE__ */ jsxs("div", { className: styles$a.title, children: [
|
|
54031
|
-
isNameDefined ? /* @__PURE__ */ jsx(Heading$
|
|
55396
|
+
isNameDefined ? /* @__PURE__ */ jsx(Heading$2, { children: /* @__PURE__ */ jsx("span", { "data-testid": testId, children: name2 }) }) : null,
|
|
54032
55397
|
actionsContainer()
|
|
54033
55398
|
] });
|
|
54034
55399
|
};
|
|
@@ -54248,7 +55613,7 @@ const InputCell = ({
|
|
|
54248
55613
|
type
|
|
54249
55614
|
}) => {
|
|
54250
55615
|
return /* @__PURE__ */ jsx(
|
|
54251
|
-
Input,
|
|
55616
|
+
Input$1,
|
|
54252
55617
|
{
|
|
54253
55618
|
name: cell2.name,
|
|
54254
55619
|
value: cell2.value,
|
|
@@ -54417,7 +55782,7 @@ const NumberInput = ({
|
|
|
54417
55782
|
handleKeys: [EventKey.ENTER],
|
|
54418
55783
|
onKeyEvent: (_key, evt) => onChangeValue(evt),
|
|
54419
55784
|
children: /* @__PURE__ */ jsx(
|
|
54420
|
-
Input,
|
|
55785
|
+
Input$1,
|
|
54421
55786
|
{
|
|
54422
55787
|
type: "text",
|
|
54423
55788
|
name: stringName,
|
|
@@ -56484,11 +57849,11 @@ eventManager.on(
|
|
|
56484
57849
|
);
|
|
56485
57850
|
const toast = ({
|
|
56486
57851
|
id: id2,
|
|
56487
|
-
message = { type: MessageType.INFO, content: "" },
|
|
57852
|
+
message: message2 = { type: MessageType.INFO, content: "" },
|
|
56488
57853
|
autoClose = 6e3,
|
|
56489
57854
|
onClose
|
|
56490
57855
|
}) => {
|
|
56491
|
-
const { type = MessageType.INFO } =
|
|
57856
|
+
const { type = MessageType.INFO } = message2 ?? {};
|
|
56492
57857
|
const CloseButton2 = ({
|
|
56493
57858
|
closeToast
|
|
56494
57859
|
}) => /* @__PURE__ */ jsx(
|
|
@@ -56504,7 +57869,7 @@ const toast = ({
|
|
|
56504
57869
|
Message,
|
|
56505
57870
|
{
|
|
56506
57871
|
message: {
|
|
56507
|
-
...
|
|
57872
|
+
...message2,
|
|
56508
57873
|
visible: true,
|
|
56509
57874
|
width: "100%",
|
|
56510
57875
|
maxHeight: "500px",
|
|
@@ -56513,7 +57878,7 @@ const toast = ({
|
|
|
56513
57878
|
}
|
|
56514
57879
|
);
|
|
56515
57880
|
const toastType = (() => {
|
|
56516
|
-
switch (
|
|
57881
|
+
switch (message2 == null ? void 0 : message2.type) {
|
|
56517
57882
|
case MessageType.SUCCESS:
|
|
56518
57883
|
return toast$1.TYPE.SUCCESS;
|
|
56519
57884
|
case MessageType.WARNING:
|
|
@@ -60334,7 +61699,7 @@ var ResizeObserverController = function() {
|
|
|
60334
61699
|
};
|
|
60335
61700
|
return ResizeObserverController2;
|
|
60336
61701
|
}();
|
|
60337
|
-
var ResizeObserver = function() {
|
|
61702
|
+
var ResizeObserver$1 = function() {
|
|
60338
61703
|
function ResizeObserver2(callback) {
|
|
60339
61704
|
if (arguments.length === 0) {
|
|
60340
61705
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
@@ -60426,14 +61791,14 @@ var warning = function() {
|
|
|
60426
61791
|
var invariant = function() {
|
|
60427
61792
|
};
|
|
60428
61793
|
if (process.env.NODE_ENV !== "production") {
|
|
60429
|
-
warning = function(check2,
|
|
61794
|
+
warning = function(check2, message2) {
|
|
60430
61795
|
if (!check2 && typeof console !== "undefined") {
|
|
60431
|
-
console.warn(
|
|
61796
|
+
console.warn(message2);
|
|
60432
61797
|
}
|
|
60433
61798
|
};
|
|
60434
|
-
invariant = function(check2,
|
|
61799
|
+
invariant = function(check2, message2) {
|
|
60435
61800
|
if (!check2) {
|
|
60436
|
-
throw new Error(
|
|
61801
|
+
throw new Error(message2);
|
|
60437
61802
|
}
|
|
60438
61803
|
};
|
|
60439
61804
|
}
|
|
@@ -62610,11 +63975,11 @@ function useTapGesture(_a2) {
|
|
|
62610
63975
|
useUnmountEffect(removePointerEndListener);
|
|
62611
63976
|
}
|
|
62612
63977
|
var warned = /* @__PURE__ */ new Set();
|
|
62613
|
-
function warnOnce(condition,
|
|
62614
|
-
if (condition || warned.has(
|
|
63978
|
+
function warnOnce(condition, message2, element) {
|
|
63979
|
+
if (condition || warned.has(message2))
|
|
62615
63980
|
return;
|
|
62616
|
-
console.warn(
|
|
62617
|
-
warned.add(
|
|
63981
|
+
console.warn(message2);
|
|
63982
|
+
warned.add(message2);
|
|
62618
63983
|
}
|
|
62619
63984
|
var observerCallbacks = /* @__PURE__ */ new WeakMap();
|
|
62620
63985
|
var observers = /* @__PURE__ */ new WeakMap();
|
|
@@ -67604,7 +68969,7 @@ function AnimateHeight(props) {
|
|
|
67604
68969
|
open: { opacity: 1, height: "auto" },
|
|
67605
68970
|
close: { opacity: 0, height: 0 }
|
|
67606
68971
|
} : _b, children = props.children;
|
|
67607
|
-
var _c = useMeasure({ polyfill: ResizeObserver }), ref2 = _c[0], height2 = _c[1].height;
|
|
68972
|
+
var _c = useMeasure({ polyfill: ResizeObserver$1 }), ref2 = _c[0], height2 = _c[1].height;
|
|
67608
68973
|
var _d = useState(isVisible3), isVisibleChildren = _d[0], setIsVisibleChildren = _d[1];
|
|
67609
68974
|
var _e2 = useState(isVisible3), isVisibleContainer = _e2[0], setIsVisibleContainer = _e2[1];
|
|
67610
68975
|
var _f = useState(false), transition = _f[0], setTransition = _f[1];
|
|
@@ -68536,7 +69901,7 @@ const styles$1 = {
|
|
|
68536
69901
|
const TreeItem = ({
|
|
68537
69902
|
node: node2,
|
|
68538
69903
|
depth,
|
|
68539
|
-
isOpen,
|
|
69904
|
+
isOpen: isOpen2,
|
|
68540
69905
|
onToggle,
|
|
68541
69906
|
hasChild,
|
|
68542
69907
|
draggable: draggable2,
|
|
@@ -68569,7 +69934,7 @@ const TreeItem = ({
|
|
|
68569
69934
|
const handleDragOver = (event) => {
|
|
68570
69935
|
event.preventDefault();
|
|
68571
69936
|
event.stopPropagation();
|
|
68572
|
-
if (hasChild && !
|
|
69937
|
+
if (hasChild && !isOpen2 && (/* @__PURE__ */ new Date()).getTime() - dragOverStartTime > 200) {
|
|
68573
69938
|
handleToggle(event);
|
|
68574
69939
|
}
|
|
68575
69940
|
};
|
|
@@ -68617,10 +69982,10 @@ const TreeItem = ({
|
|
|
68617
69982
|
Button$1,
|
|
68618
69983
|
{
|
|
68619
69984
|
basic: true,
|
|
68620
|
-
colored:
|
|
69985
|
+
colored: isOpen2 ? true : Color.MUTED,
|
|
68621
69986
|
small: true,
|
|
68622
69987
|
round: true,
|
|
68623
|
-
icon:
|
|
69988
|
+
icon: isOpen2 ? (icons2 == null ? void 0 : icons2.collapse) || IconType.COLLAPSE : (icons2 == null ? void 0 : icons2.expand) || IconType.EXPAND,
|
|
68624
69989
|
onClick: handleToggle
|
|
68625
69990
|
}
|
|
68626
69991
|
) }),
|
|
@@ -68748,7 +70113,7 @@ const Tree = ({
|
|
|
68748
70113
|
}
|
|
68749
70114
|
},
|
|
68750
70115
|
rootId: 0,
|
|
68751
|
-
render: (node2, { depth, isOpen, onToggle, hasChild }) => {
|
|
70116
|
+
render: (node2, { depth, isOpen: isOpen2, onToggle, hasChild }) => {
|
|
68752
70117
|
var _a3;
|
|
68753
70118
|
return /* @__PURE__ */ jsx(
|
|
68754
70119
|
TreeItem,
|
|
@@ -68756,9 +70121,9 @@ const Tree = ({
|
|
|
68756
70121
|
hasChild: itemHasChild ? itemHasChild(node2) : hasChild,
|
|
68757
70122
|
node: node2,
|
|
68758
70123
|
depth,
|
|
68759
|
-
isOpen,
|
|
70124
|
+
isOpen: isOpen2,
|
|
68760
70125
|
onToggle: () => {
|
|
68761
|
-
onItemToggle == null ? void 0 : onItemToggle(node2, !
|
|
70126
|
+
onItemToggle == null ? void 0 : onItemToggle(node2, !isOpen2);
|
|
68762
70127
|
onToggle();
|
|
68763
70128
|
},
|
|
68764
70129
|
draggable: draggable2,
|
|
@@ -69107,7 +70472,7 @@ const UnitInput = ({
|
|
|
69107
70472
|
}
|
|
69108
70473
|
}, [initDisplayUnit, value, error2, shouldLinkAutomaticly]);
|
|
69109
70474
|
const alternativeUnits = getAlternativeUnits();
|
|
69110
|
-
const displayUnitLabel = label$
|
|
70475
|
+
const displayUnitLabel = label$b(displayLayer.unit) || displayLayer.unit || "";
|
|
69111
70476
|
const noConvert = noConversion || !alternativeUnits || alternativeUnits && alternativeUnits.length === 1;
|
|
69112
70477
|
const stringName = getStringName(name2);
|
|
69113
70478
|
let sectionsPredefinedMenu;
|
|
@@ -69298,7 +70663,7 @@ const convertVisibleRows = ({
|
|
|
69298
70663
|
type: CellType.SELECT,
|
|
69299
70664
|
searchable: false,
|
|
69300
70665
|
options: (_a2 = getUnitsForQuantity(unitKey)) == null ? void 0 : _a2.map((unit2) => ({
|
|
69301
|
-
label: label$
|
|
70666
|
+
label: label$b(unit2),
|
|
69302
70667
|
value: unit2
|
|
69303
70668
|
})),
|
|
69304
70669
|
native: headerCell.native,
|
|
@@ -69610,11 +70975,11 @@ export {
|
|
|
69610
70975
|
FormRow,
|
|
69611
70976
|
Grid,
|
|
69612
70977
|
GroupOrder,
|
|
69613
|
-
Heading$
|
|
70978
|
+
Heading$2 as Heading,
|
|
69614
70979
|
HelpIcon,
|
|
69615
70980
|
Icon,
|
|
69616
70981
|
IconType,
|
|
69617
|
-
Input,
|
|
70982
|
+
Input$1 as Input,
|
|
69618
70983
|
InputGroup,
|
|
69619
70984
|
InputGroupAddon,
|
|
69620
70985
|
InputReaderMethods,
|