@oliasoft-open-source/react-ui-library 4.15.2-beta-2 → 4.15.2-beta-4
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 +202 -202
- package/dist/index.js +701 -424
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import React__default, { useContext, isValidElement, useState, useRef, useEffect
|
|
|
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
|
-
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, isObject as isObject$5, isEqual as isEqual$4
|
|
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
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$9, 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) {
|
|
@@ -3936,7 +3936,7 @@ var AccordionActionType = /* @__PURE__ */ ((AccordionActionType2) => {
|
|
|
3936
3936
|
AccordionActionType2["TOGGLE_ENABLE"] = "TOGGLE_ENABLE";
|
|
3937
3937
|
return AccordionActionType2;
|
|
3938
3938
|
})(AccordionActionType || {});
|
|
3939
|
-
const reducer$
|
|
3939
|
+
const reducer$3 = (state, action2) => {
|
|
3940
3940
|
switch (action2.type) {
|
|
3941
3941
|
case AccordionActionType.TOGGLE_ACCORDION:
|
|
3942
3942
|
return {
|
|
@@ -3962,7 +3962,7 @@ const AccordionWithDefaultToggle = ({
|
|
|
3962
3962
|
padding: padding2 = true,
|
|
3963
3963
|
children
|
|
3964
3964
|
}) => {
|
|
3965
|
-
const [state, dispatch] = useReducer(reducer$
|
|
3965
|
+
const [state, dispatch] = useReducer(reducer$3, {
|
|
3966
3966
|
accordionExpanded: expanded2,
|
|
3967
3967
|
defaultEnabled
|
|
3968
3968
|
});
|
|
@@ -13383,7 +13383,7 @@ var idle = {
|
|
|
13383
13383
|
completed: null,
|
|
13384
13384
|
shouldFlush: false
|
|
13385
13385
|
};
|
|
13386
|
-
var reducer$
|
|
13386
|
+
var reducer$2 = function(state, action2) {
|
|
13387
13387
|
if (state === void 0) {
|
|
13388
13388
|
state = idle;
|
|
13389
13389
|
}
|
|
@@ -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$
|
|
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))));
|
|
14498
14498
|
};
|
|
14499
14499
|
var clean$1 = function clean3() {
|
|
14500
14500
|
return {
|
|
@@ -19281,7 +19281,7 @@ const Dismiss = ({
|
|
|
19281
19281
|
}
|
|
19282
19282
|
);
|
|
19283
19283
|
};
|
|
19284
|
-
const reducer = (state, action2) => {
|
|
19284
|
+
const reducer$1 = (state, action2) => {
|
|
19285
19285
|
switch (action2.type) {
|
|
19286
19286
|
case MessageToggle.TOGGLE_DETAILS:
|
|
19287
19287
|
return {
|
|
@@ -19329,7 +19329,7 @@ const Message = ({ message }) => {
|
|
|
19329
19329
|
const initialState2 = {
|
|
19330
19330
|
detailsVisible
|
|
19331
19331
|
};
|
|
19332
|
-
const [state, dispatch] = useReducer(reducer, initialState2);
|
|
19332
|
+
const [state, dispatch] = useReducer(reducer$1, initialState2);
|
|
19333
19333
|
return /* @__PURE__ */ jsx(Fragment$1, { children: visible ? /* @__PURE__ */ jsxs(
|
|
19334
19334
|
"div",
|
|
19335
19335
|
{
|
|
@@ -19612,6 +19612,580 @@ const Page = ({
|
|
|
19612
19612
|
}
|
|
19613
19613
|
);
|
|
19614
19614
|
};
|
|
19615
|
+
const inputInTable$5 = "_inputInTable_sl2b5_1";
|
|
19616
|
+
const inputHover$5 = "_inputHover_sl2b5_13";
|
|
19617
|
+
const inputFocus$5 = "_inputFocus_sl2b5_18";
|
|
19618
|
+
const inputError$5 = "_inputError_sl2b5_25";
|
|
19619
|
+
const inputWarning$5 = "_inputWarning_sl2b5_26";
|
|
19620
|
+
const inputDisabled$5 = "_inputDisabled_sl2b5_61";
|
|
19621
|
+
const hideScrollbars$5 = "_hideScrollbars_sl2b5_67";
|
|
19622
|
+
const select = "_select_sl2b5_77";
|
|
19623
|
+
const isInTable$1 = "_isInTable_sl2b5_121";
|
|
19624
|
+
const unSelected = "_unSelected_sl2b5_133";
|
|
19625
|
+
const small$4 = "_small_sl2b5_174";
|
|
19626
|
+
const right$2 = "_right_sl2b5_182";
|
|
19627
|
+
const groupOrderFirst = "_groupOrderFirst_sl2b5_193";
|
|
19628
|
+
const groupOrderMiddle = "_groupOrderMiddle_sl2b5_194";
|
|
19629
|
+
const groupOrderLast = "_groupOrderLast_sl2b5_198";
|
|
19630
|
+
const styles$m = {
|
|
19631
|
+
inputInTable: inputInTable$5,
|
|
19632
|
+
inputHover: inputHover$5,
|
|
19633
|
+
inputFocus: inputFocus$5,
|
|
19634
|
+
inputError: inputError$5,
|
|
19635
|
+
inputWarning: inputWarning$5,
|
|
19636
|
+
inputDisabled: inputDisabled$5,
|
|
19637
|
+
hideScrollbars: hideScrollbars$5,
|
|
19638
|
+
select,
|
|
19639
|
+
isInTable: isInTable$1,
|
|
19640
|
+
unSelected,
|
|
19641
|
+
small: small$4,
|
|
19642
|
+
right: right$2,
|
|
19643
|
+
groupOrderFirst,
|
|
19644
|
+
groupOrderMiddle,
|
|
19645
|
+
groupOrderLast
|
|
19646
|
+
};
|
|
19647
|
+
const NativeSelect = ({
|
|
19648
|
+
disabled: disabled2 = false,
|
|
19649
|
+
error: error2 = null,
|
|
19650
|
+
warning: warning2 = null,
|
|
19651
|
+
tooltip: tooltip2 = null,
|
|
19652
|
+
options,
|
|
19653
|
+
onChange = noop$3,
|
|
19654
|
+
onFocus = noop$3,
|
|
19655
|
+
onBlur = noop$3,
|
|
19656
|
+
right: right2 = false,
|
|
19657
|
+
small: small2 = false,
|
|
19658
|
+
tabIndex = 0,
|
|
19659
|
+
selectedOption,
|
|
19660
|
+
width: width2 = null,
|
|
19661
|
+
groupOrder = null,
|
|
19662
|
+
testId,
|
|
19663
|
+
isInTable: isInTable2 = false,
|
|
19664
|
+
clearable,
|
|
19665
|
+
placeholder: placeholder3,
|
|
19666
|
+
hasNonExistentValue,
|
|
19667
|
+
maxTooltipWidth,
|
|
19668
|
+
borderRadius
|
|
19669
|
+
}) => {
|
|
19670
|
+
const disabledContext = useContext(DisabledContext);
|
|
19671
|
+
const internalValue = selectedOption === null ? "unselected" : (selectedOption == null ? void 0 : selectedOption.value) === null ? "unselected" : selectedOption == null ? void 0 : selectedOption.value;
|
|
19672
|
+
const isUnselected = internalValue === "unselected";
|
|
19673
|
+
const viewOptions = (internalValue === "unselected" || clearable ? [
|
|
19674
|
+
/* @__PURE__ */ jsx(
|
|
19675
|
+
"option",
|
|
19676
|
+
{
|
|
19677
|
+
value: "unselected",
|
|
19678
|
+
disabled: !clearable,
|
|
19679
|
+
hidden: !clearable,
|
|
19680
|
+
children: placeholder3 || "Select..."
|
|
19681
|
+
},
|
|
19682
|
+
"unselected"
|
|
19683
|
+
)
|
|
19684
|
+
] : []).concat(
|
|
19685
|
+
hasNonExistentValue ? [
|
|
19686
|
+
/* @__PURE__ */ jsx(
|
|
19687
|
+
"option",
|
|
19688
|
+
{
|
|
19689
|
+
value: selectedOption == null ? void 0 : selectedOption.value,
|
|
19690
|
+
disabled: disabled2 || disabledContext,
|
|
19691
|
+
children: selectedOption == null ? void 0 : selectedOption.label
|
|
19692
|
+
},
|
|
19693
|
+
"selectedNonExistentValue"
|
|
19694
|
+
)
|
|
19695
|
+
] : []
|
|
19696
|
+
).concat(
|
|
19697
|
+
options.map((option2, i) => {
|
|
19698
|
+
return /* @__PURE__ */ jsx(
|
|
19699
|
+
"option",
|
|
19700
|
+
{
|
|
19701
|
+
value: option2.value,
|
|
19702
|
+
"data-testid": option2.testId,
|
|
19703
|
+
children: option2.label
|
|
19704
|
+
},
|
|
19705
|
+
i
|
|
19706
|
+
);
|
|
19707
|
+
})
|
|
19708
|
+
);
|
|
19709
|
+
const order2 = (() => {
|
|
19710
|
+
if (groupOrder) {
|
|
19711
|
+
switch (groupOrder) {
|
|
19712
|
+
case GroupOrder.FIRST:
|
|
19713
|
+
return styles$m.groupOrderFirst;
|
|
19714
|
+
case GroupOrder.LAST:
|
|
19715
|
+
return styles$m.groupOrderLast;
|
|
19716
|
+
default:
|
|
19717
|
+
return styles$m.groupOrderMiddle;
|
|
19718
|
+
}
|
|
19719
|
+
}
|
|
19720
|
+
return "";
|
|
19721
|
+
})();
|
|
19722
|
+
return /* @__PURE__ */ jsx(
|
|
19723
|
+
Tooltip,
|
|
19724
|
+
{
|
|
19725
|
+
error: !!error2,
|
|
19726
|
+
warning: !!warning2,
|
|
19727
|
+
text: tooltip2 || error2 || warning2,
|
|
19728
|
+
enabled: tooltip2 && isStringNumberOrNode(tooltip2) || error2 && isStringNumberOrNode(error2) || warning2 && isStringNumberOrNode(warning2) || false,
|
|
19729
|
+
maxWidth: maxTooltipWidth,
|
|
19730
|
+
placement: "bottom-center",
|
|
19731
|
+
children: /* @__PURE__ */ jsx(
|
|
19732
|
+
"select",
|
|
19733
|
+
{
|
|
19734
|
+
className: cx$2(
|
|
19735
|
+
styles$m.select,
|
|
19736
|
+
isUnselected ? styles$m.unSelected : "",
|
|
19737
|
+
right2 ? styles$m.right : "",
|
|
19738
|
+
small2 ? styles$m.small : "",
|
|
19739
|
+
isInTable2 ? styles$m.isInTable : "",
|
|
19740
|
+
order2
|
|
19741
|
+
),
|
|
19742
|
+
style: {
|
|
19743
|
+
width: width2 || "",
|
|
19744
|
+
borderRadius: borderRadius || ""
|
|
19745
|
+
},
|
|
19746
|
+
onChange: (evt) => {
|
|
19747
|
+
const { value } = evt.target;
|
|
19748
|
+
let nextValue;
|
|
19749
|
+
if (value === "unselected") {
|
|
19750
|
+
nextValue = { value: null };
|
|
19751
|
+
} else {
|
|
19752
|
+
const foundOption = options.find(
|
|
19753
|
+
(o) => String(o.value) === String(value)
|
|
19754
|
+
);
|
|
19755
|
+
nextValue = foundOption || { value: null };
|
|
19756
|
+
}
|
|
19757
|
+
onChange(evt, nextValue);
|
|
19758
|
+
},
|
|
19759
|
+
onFocus,
|
|
19760
|
+
onBlur,
|
|
19761
|
+
tabIndex,
|
|
19762
|
+
value: internalValue,
|
|
19763
|
+
disabled: disabled2 || disabledContext,
|
|
19764
|
+
"data-error": error2 || null,
|
|
19765
|
+
"data-warning": warning2 || null,
|
|
19766
|
+
"data-testid": testId,
|
|
19767
|
+
children: viewOptions
|
|
19768
|
+
}
|
|
19769
|
+
)
|
|
19770
|
+
}
|
|
19771
|
+
);
|
|
19772
|
+
};
|
|
19773
|
+
var reactKeyboardEventHandler = { exports: {} };
|
|
19774
|
+
(function(module, exports) {
|
|
19775
|
+
!function(e2, t) {
|
|
19776
|
+
module.exports = t(React__default, PropTypes__default);
|
|
19777
|
+
}(window, function(e2, t) {
|
|
19778
|
+
return function(e3) {
|
|
19779
|
+
var t2 = {};
|
|
19780
|
+
function n2(r2) {
|
|
19781
|
+
if (t2[r2]) return t2[r2].exports;
|
|
19782
|
+
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
19783
|
+
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
19784
|
+
}
|
|
19785
|
+
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
19786
|
+
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
19787
|
+
}, n2.r = function(e4) {
|
|
19788
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
19789
|
+
}, n2.t = function(e4, t3) {
|
|
19790
|
+
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
19791
|
+
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
19792
|
+
var r2 = /* @__PURE__ */ Object.create(null);
|
|
19793
|
+
if (n2.r(r2), Object.defineProperty(r2, "default", { enumerable: true, value: e4 }), 2 & t3 && "string" != typeof e4) for (var o in e4) n2.d(r2, o, (function(t4) {
|
|
19794
|
+
return e4[t4];
|
|
19795
|
+
}).bind(null, o));
|
|
19796
|
+
return r2;
|
|
19797
|
+
}, n2.n = function(e4) {
|
|
19798
|
+
var t3 = e4 && e4.__esModule ? function() {
|
|
19799
|
+
return e4.default;
|
|
19800
|
+
} : function() {
|
|
19801
|
+
return e4;
|
|
19802
|
+
};
|
|
19803
|
+
return n2.d(t3, "a", t3), t3;
|
|
19804
|
+
}, n2.o = function(e4, t3) {
|
|
19805
|
+
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
19806
|
+
}, n2.p = "", n2(n2.s = 0);
|
|
19807
|
+
}([function(e3, t2, n2) {
|
|
19808
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
19809
|
+
var r2 = n2(1);
|
|
19810
|
+
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
19811
|
+
return function(e4) {
|
|
19812
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
19813
|
+
}(r2).default;
|
|
19814
|
+
} }), e3.exports = t2.default;
|
|
19815
|
+
}, function(e3, t2, n2) {
|
|
19816
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
19817
|
+
var r2 = Object.assign || function(e4) {
|
|
19818
|
+
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
19819
|
+
var n3 = arguments[t3];
|
|
19820
|
+
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
19821
|
+
}
|
|
19822
|
+
return e4;
|
|
19823
|
+
}, o = /* @__PURE__ */ function() {
|
|
19824
|
+
function e4(e5, t3) {
|
|
19825
|
+
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
19826
|
+
var r3 = t3[n3];
|
|
19827
|
+
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
19828
|
+
}
|
|
19829
|
+
}
|
|
19830
|
+
return function(t3, n3, r3) {
|
|
19831
|
+
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
19832
|
+
};
|
|
19833
|
+
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
19834
|
+
function l(e4) {
|
|
19835
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
19836
|
+
}
|
|
19837
|
+
var s = [], c2 = function(e4) {
|
|
19838
|
+
function t3(e5) {
|
|
19839
|
+
!function(e6, t4) {
|
|
19840
|
+
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
19841
|
+
}(this, t3);
|
|
19842
|
+
var n3 = function(e6, t4) {
|
|
19843
|
+
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19844
|
+
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
19845
|
+
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
19846
|
+
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
19847
|
+
}
|
|
19848
|
+
return function(e5, t4) {
|
|
19849
|
+
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
19850
|
+
e5.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e5, enumerable: false, writable: true, configurable: true } }), t4 && (Object.setPrototypeOf ? Object.setPrototypeOf(e5, t4) : e5.__proto__ = t4);
|
|
19851
|
+
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
19852
|
+
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
19853
|
+
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
19854
|
+
t4 && !n3 && this.registerExclusiveHandler();
|
|
19855
|
+
} }, { key: "componentWillUnmount", value: function() {
|
|
19856
|
+
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
19857
|
+
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
19858
|
+
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
19859
|
+
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
19860
|
+
} }, { key: "registerExclusiveHandler", value: function() {
|
|
19861
|
+
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
19862
|
+
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
19863
|
+
var e5 = this;
|
|
19864
|
+
s.includes(this) && (s = s.filter(function(t4) {
|
|
19865
|
+
return t4 !== e5;
|
|
19866
|
+
}));
|
|
19867
|
+
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
19868
|
+
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
19869
|
+
if (n3) return false;
|
|
19870
|
+
if (!(i2 === e5.type)) return false;
|
|
19871
|
+
if (s.length > 0 && s[0] !== this) return false;
|
|
19872
|
+
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
19873
|
+
if (!(u2 ? d2 : c3)) return false;
|
|
19874
|
+
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
19875
|
+
return !!f2 && (o2(f2, e5), true);
|
|
19876
|
+
} }, { key: "render", value: function() {
|
|
19877
|
+
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
19878
|
+
try {
|
|
19879
|
+
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
19880
|
+
delete o2[s2.value];
|
|
19881
|
+
}
|
|
19882
|
+
} catch (e6) {
|
|
19883
|
+
a3 = true, l2 = e6;
|
|
19884
|
+
} finally {
|
|
19885
|
+
try {
|
|
19886
|
+
!u2 && c3.return && c3.return();
|
|
19887
|
+
} finally {
|
|
19888
|
+
if (a3) throw l2;
|
|
19889
|
+
}
|
|
19890
|
+
}
|
|
19891
|
+
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
19892
|
+
e5.childrenContainer = t4;
|
|
19893
|
+
} }, o2), n3) : null;
|
|
19894
|
+
} }]), t3;
|
|
19895
|
+
}();
|
|
19896
|
+
t2.default = c2, c2.propTypes = { handleKeys: u.default.array, handleEventType: u.default.oneOf(["keydown", "keyup", "keypress"]), handleFocusableElements: u.default.bool, onKeyEvent: u.default.func, isDisabled: u.default.bool, isExclusive: u.default.bool, children: u.default.any }, c2.defaultProps = { handleKeys: [], handleFocusableElements: false, handleEventType: "keydown", onKeyEvent: function() {
|
|
19897
|
+
return null;
|
|
19898
|
+
} }, e3.exports = t2.default;
|
|
19899
|
+
}, function(t2, n2) {
|
|
19900
|
+
t2.exports = e2;
|
|
19901
|
+
}, function(e3, n2) {
|
|
19902
|
+
e3.exports = t;
|
|
19903
|
+
}, function(e3, t2, n2) {
|
|
19904
|
+
function r2(e4, t3, n3) {
|
|
19905
|
+
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
19906
|
+
}
|
|
19907
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
19908
|
+
var n3 = t3.map(function(e5) {
|
|
19909
|
+
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
19910
|
+
return n4 || [e5];
|
|
19911
|
+
}).reduce(function(e5, t4) {
|
|
19912
|
+
return e5.concat(t4);
|
|
19913
|
+
}, []).find(function(t4) {
|
|
19914
|
+
return p(e4, t4);
|
|
19915
|
+
});
|
|
19916
|
+
!n3 && t3.includes("all") && (n3 = "other");
|
|
19917
|
+
return n3;
|
|
19918
|
+
};
|
|
19919
|
+
var o = { backspace: [8], del: [46], delete: [46], ins: [45], insert: [45], tab: [9], enter: [13], return: [13], esc: [27], space: [32], pageup: [33], pagedown: [34], end: [35], home: [36], left: [37], up: [38], right: [39], down: [40], shift: [16], ctrl: [17], alt: [18], cap: [20], num: [144], clear: [12], meta: [91], ";": [186, 59], "=": [187, 61], ",": [188, 44], "-": [189, 45, 173, 109], minus: [189, 45, 173, 109], ".": [190, 110], "/": [191, 111], "`": [192], "[": [219], "\\": [220], "]": [221], "*": [106], "+": [107], plus: [107], "'": [222], quote: [222] }, i = Object.keys(o).reduce(function(e4, t3) {
|
|
19920
|
+
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
19921
|
+
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
19922
|
+
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
19923
|
+
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
19924
|
+
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
19925
|
+
}, {}), l = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(e4, t3, n3) {
|
|
19926
|
+
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
19927
|
+
}, {}), s = { control: "ctrl", ctrl: "ctrl", shift: "shift", meta: "meta", cmd: "meta", command: "meta", option: "alt", alt: "alt" }, c2 = t2.AllKeys = Object.assign({}, o, i, u, a2, l), d2 = Object.assign({}, u, a2), f2 = { all: Object.keys(c2), alphanumeric: Object.keys(d2), numeric: Object.keys(u), alphabetic: Object.keys(a2), function: Object.keys(l) };
|
|
19928
|
+
function p(e4, t3) {
|
|
19929
|
+
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
19930
|
+
return e4[t4 + "Key"];
|
|
19931
|
+
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
19932
|
+
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
19933
|
+
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
19934
|
+
if (d3.length > 0 && o2.length > 0) {
|
|
19935
|
+
var f3 = d3.map(function(e5) {
|
|
19936
|
+
return s[e5];
|
|
19937
|
+
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
19938
|
+
return o2[t4] === e5;
|
|
19939
|
+
});
|
|
19940
|
+
return l2.indexOf(n3) >= 0 && p2;
|
|
19941
|
+
}
|
|
19942
|
+
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
19943
|
+
}
|
|
19944
|
+
}]);
|
|
19945
|
+
});
|
|
19946
|
+
})(reactKeyboardEventHandler);
|
|
19947
|
+
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
19948
|
+
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
19949
|
+
const useFocus = () => {
|
|
19950
|
+
const ref2 = useRef(null);
|
|
19951
|
+
const setFocus = () => {
|
|
19952
|
+
if (ref2.current) {
|
|
19953
|
+
ref2.current.focus();
|
|
19954
|
+
}
|
|
19955
|
+
};
|
|
19956
|
+
return [ref2, setFocus];
|
|
19957
|
+
};
|
|
19958
|
+
const useFontsReady = () => {
|
|
19959
|
+
const [isFontLoaded, setFontLoaded] = useState(false);
|
|
19960
|
+
const isMounted = useRef(true);
|
|
19961
|
+
useEffect(() => {
|
|
19962
|
+
return () => {
|
|
19963
|
+
isMounted.current = false;
|
|
19964
|
+
};
|
|
19965
|
+
}, []);
|
|
19966
|
+
useEffect(() => {
|
|
19967
|
+
const fontIsReady = async () => {
|
|
19968
|
+
if (!document.fonts) return;
|
|
19969
|
+
await document.fonts.ready.then(() => {
|
|
19970
|
+
if (isMounted.current) {
|
|
19971
|
+
setFontLoaded(true);
|
|
19972
|
+
}
|
|
19973
|
+
});
|
|
19974
|
+
};
|
|
19975
|
+
fontIsReady();
|
|
19976
|
+
}, []);
|
|
19977
|
+
return isFontLoaded;
|
|
19978
|
+
};
|
|
19979
|
+
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
19980
|
+
const useWindowWidth = () => {
|
|
19981
|
+
const [width2, setWidth] = useState(getWidth());
|
|
19982
|
+
const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
|
|
19983
|
+
useEffect(() => {
|
|
19984
|
+
window.addEventListener("resize", resizeListener);
|
|
19985
|
+
return () => {
|
|
19986
|
+
window.removeEventListener("resize", resizeListener);
|
|
19987
|
+
};
|
|
19988
|
+
}, []);
|
|
19989
|
+
return width2;
|
|
19990
|
+
};
|
|
19991
|
+
var ReducerAction = /* @__PURE__ */ ((ReducerAction2) => {
|
|
19992
|
+
ReducerAction2["SET_VISIBLE_OPTIONS"] = "SET_VISIBLE_OPTIONS";
|
|
19993
|
+
ReducerAction2["RESET_LAYER_FOCUS"] = "RESET_LAYER_FOCUS";
|
|
19994
|
+
ReducerAction2["CLEAR_SEARCH"] = "CLEAR_SEARCH";
|
|
19995
|
+
ReducerAction2["ON_CHANGE_SEARCH"] = "ON_CHANGE_SEARCH";
|
|
19996
|
+
ReducerAction2["FOCUS_TRIGGER_INPUTS"] = "FOCUS_TRIGGER_INPUTS";
|
|
19997
|
+
ReducerAction2["BLUR_TRIGGER_INPUTS"] = "BLUR_TRIGGER_INPUTS";
|
|
19998
|
+
ReducerAction2["FOCUS_LAYER_OPTIONS"] = "FOCUS_LAYER_OPTIONS";
|
|
19999
|
+
ReducerAction2["OPEN_LAYER"] = "OPEN_LAYER";
|
|
20000
|
+
ReducerAction2["CLOSE_LAYER"] = "CLOSE_LAYER";
|
|
20001
|
+
return ReducerAction2;
|
|
20002
|
+
})(ReducerAction || {});
|
|
20003
|
+
const initialTriggerFocus = {
|
|
20004
|
+
options: ["none", "clearAll"],
|
|
20005
|
+
currentIndex: 0,
|
|
20006
|
+
currentOption: false,
|
|
20007
|
+
clearAll: false
|
|
20008
|
+
};
|
|
20009
|
+
const initialLayerFocusIndex = (firstSelectedOptionIndex) => firstSelectedOptionIndex !== null ? firstSelectedOptionIndex + 1 : 0;
|
|
20010
|
+
const initialLayerFocus = (options, firstSelectedOptionIndex) => {
|
|
20011
|
+
const layerFocusOptions = [
|
|
20012
|
+
"none",
|
|
20013
|
+
...options.map((o, i) => o.type !== MenuType.HEADING ? i : null).filter((o) => o !== null)
|
|
20014
|
+
];
|
|
20015
|
+
const layerFocusIndex = initialLayerFocusIndex(firstSelectedOptionIndex);
|
|
20016
|
+
return {
|
|
20017
|
+
options: layerFocusOptions,
|
|
20018
|
+
currentIndex: layerFocusIndex,
|
|
20019
|
+
current: layerFocusOptions[layerFocusIndex]
|
|
20020
|
+
};
|
|
20021
|
+
};
|
|
20022
|
+
const nextTriggerFocus = (direction, selectedOptions, triggerFocus) => {
|
|
20023
|
+
const sign = direction === "left" ? -1 : 1;
|
|
20024
|
+
const nextOptions = selectedOptions && selectedOptions.length ? [
|
|
20025
|
+
"none",
|
|
20026
|
+
...Array.from({ length: selectedOptions.length }, (_2, i) => i),
|
|
20027
|
+
"clearAll"
|
|
20028
|
+
] : ["none", "clearAll"];
|
|
20029
|
+
const increment = triggerFocus.currentIndex + sign;
|
|
20030
|
+
const nextIndex = (increment < 0 ? nextOptions.length - 1 : increment) % nextOptions.length;
|
|
20031
|
+
const next2 = nextOptions[nextIndex];
|
|
20032
|
+
const clearAll = next2 === "clearAll";
|
|
20033
|
+
return {
|
|
20034
|
+
options: nextOptions,
|
|
20035
|
+
currentIndex: nextIndex,
|
|
20036
|
+
currentOption: next2,
|
|
20037
|
+
clearAll
|
|
20038
|
+
};
|
|
20039
|
+
};
|
|
20040
|
+
const blurTriggerFocus = () => initialTriggerFocus;
|
|
20041
|
+
const blurLayerFocus = (layerFocus) => ({
|
|
20042
|
+
...layerFocus,
|
|
20043
|
+
currentIndex: 0,
|
|
20044
|
+
current: "none"
|
|
20045
|
+
});
|
|
20046
|
+
const reducer = (state, action2) => {
|
|
20047
|
+
switch (action2.type) {
|
|
20048
|
+
case ReducerAction.SET_VISIBLE_OPTIONS: {
|
|
20049
|
+
return {
|
|
20050
|
+
...state,
|
|
20051
|
+
visibleOptions: action2.options || []
|
|
20052
|
+
};
|
|
20053
|
+
}
|
|
20054
|
+
case ReducerAction.RESET_LAYER_FOCUS: {
|
|
20055
|
+
return {
|
|
20056
|
+
...state,
|
|
20057
|
+
layerFocus: initialLayerFocus(
|
|
20058
|
+
action2.options || [],
|
|
20059
|
+
action2.firstSelectedOptionIndex || 0
|
|
20060
|
+
)
|
|
20061
|
+
};
|
|
20062
|
+
}
|
|
20063
|
+
case ReducerAction.CLEAR_SEARCH: {
|
|
20064
|
+
return {
|
|
20065
|
+
...state,
|
|
20066
|
+
visibleOptions: action2.options || [],
|
|
20067
|
+
searchValue: ""
|
|
20068
|
+
};
|
|
20069
|
+
}
|
|
20070
|
+
case ReducerAction.ON_CHANGE_SEARCH: {
|
|
20071
|
+
const visibleOptions = (action2.options || []).filter(
|
|
20072
|
+
(o) => (String(o.label) + (o.details ? String(o.details) : "")).toLowerCase().includes(String(action2.value || "").toLowerCase())
|
|
20073
|
+
);
|
|
20074
|
+
let newVisibleOptions = [...visibleOptions];
|
|
20075
|
+
if (action2.createAble && action2.value && action2.value !== "") {
|
|
20076
|
+
newVisibleOptions.push({
|
|
20077
|
+
label: `Create "${action2.value}"`,
|
|
20078
|
+
value: action2.value,
|
|
20079
|
+
createAble: true
|
|
20080
|
+
});
|
|
20081
|
+
}
|
|
20082
|
+
return {
|
|
20083
|
+
...state,
|
|
20084
|
+
searchValue: action2.value,
|
|
20085
|
+
visibleOptions: newVisibleOptions,
|
|
20086
|
+
layerFocus: blurLayerFocus(state.layerFocus)
|
|
20087
|
+
};
|
|
20088
|
+
}
|
|
20089
|
+
case ReducerAction.FOCUS_TRIGGER_INPUTS: {
|
|
20090
|
+
return {
|
|
20091
|
+
...state,
|
|
20092
|
+
triggerFocus: nextTriggerFocus(
|
|
20093
|
+
action2.direction || "right",
|
|
20094
|
+
action2.selectedOptions || [],
|
|
20095
|
+
state.triggerFocus
|
|
20096
|
+
),
|
|
20097
|
+
layerFocus: blurLayerFocus(state.layerFocus)
|
|
20098
|
+
};
|
|
20099
|
+
}
|
|
20100
|
+
case ReducerAction.BLUR_TRIGGER_INPUTS: {
|
|
20101
|
+
return {
|
|
20102
|
+
...state,
|
|
20103
|
+
triggerFocus: blurTriggerFocus()
|
|
20104
|
+
};
|
|
20105
|
+
}
|
|
20106
|
+
case ReducerAction.FOCUS_LAYER_OPTIONS: {
|
|
20107
|
+
if (!action2.nextLayerFocus) {
|
|
20108
|
+
return state;
|
|
20109
|
+
}
|
|
20110
|
+
return {
|
|
20111
|
+
...state,
|
|
20112
|
+
layerFocus: action2.nextLayerFocus,
|
|
20113
|
+
triggerFocus: blurTriggerFocus()
|
|
20114
|
+
};
|
|
20115
|
+
}
|
|
20116
|
+
case ReducerAction.OPEN_LAYER: {
|
|
20117
|
+
return {
|
|
20118
|
+
...state,
|
|
20119
|
+
isLayerOpen: true
|
|
20120
|
+
};
|
|
20121
|
+
}
|
|
20122
|
+
case ReducerAction.CLOSE_LAYER: {
|
|
20123
|
+
return {
|
|
20124
|
+
...state,
|
|
20125
|
+
isLayerOpen: false
|
|
20126
|
+
};
|
|
20127
|
+
}
|
|
20128
|
+
default:
|
|
20129
|
+
return state;
|
|
20130
|
+
}
|
|
20131
|
+
};
|
|
20132
|
+
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
20133
|
+
EventKey2["RIGHT"] = "right";
|
|
20134
|
+
EventKey2["LEFT"] = "left";
|
|
20135
|
+
EventKey2["UP"] = "up";
|
|
20136
|
+
EventKey2["DOWN"] = "down";
|
|
20137
|
+
EventKey2["ENTER"] = "enter";
|
|
20138
|
+
EventKey2["ESC"] = "esc";
|
|
20139
|
+
EventKey2["TAB"] = "tab";
|
|
20140
|
+
return EventKey2;
|
|
20141
|
+
})(EventKey || {});
|
|
20142
|
+
const CustomSelect = (props) => {
|
|
20143
|
+
const {
|
|
20144
|
+
multi: isMulti2 = false,
|
|
20145
|
+
disabled: disabled2 = false,
|
|
20146
|
+
error: error2 = null,
|
|
20147
|
+
warning: warning2 = null,
|
|
20148
|
+
tooltip: tooltip2 = null,
|
|
20149
|
+
options,
|
|
20150
|
+
selectedOptions,
|
|
20151
|
+
onCreate = null,
|
|
20152
|
+
placeholder: placeholder3 = "",
|
|
20153
|
+
small: small2 = false,
|
|
20154
|
+
tabIndex = 0,
|
|
20155
|
+
onFocus = () => {
|
|
20156
|
+
},
|
|
20157
|
+
onBlur = () => {
|
|
20158
|
+
},
|
|
20159
|
+
searchable = true,
|
|
20160
|
+
clearable = false,
|
|
20161
|
+
maxTooltipWidth,
|
|
20162
|
+
closeOnOptionActionClick,
|
|
20163
|
+
//private props (don't use)
|
|
20164
|
+
isInTable: isInTable2 = false,
|
|
20165
|
+
groupOrder,
|
|
20166
|
+
firstSelectedOptionIndex = 0,
|
|
20167
|
+
right: right2 = false,
|
|
20168
|
+
testId = void 0
|
|
20169
|
+
} = props;
|
|
20170
|
+
useContext(DisabledContext);
|
|
20171
|
+
useRef(null);
|
|
20172
|
+
useFocus();
|
|
20173
|
+
useFontsReady();
|
|
20174
|
+
useReducer(
|
|
20175
|
+
reducer,
|
|
20176
|
+
// @ts-ignore: write explicit reason: write explicit reason
|
|
20177
|
+
{ options, firstSelectedOptionIndex },
|
|
20178
|
+
({ options: options2 }) => ({
|
|
20179
|
+
searchValue: "",
|
|
20180
|
+
visibleOptions: options2,
|
|
20181
|
+
layerFocus: initialLayerFocus(options2, firstSelectedOptionIndex ?? 0),
|
|
20182
|
+
//also gets reset when layer opens (because options can change)
|
|
20183
|
+
triggerFocus: initialTriggerFocus,
|
|
20184
|
+
isLayerOpen: false
|
|
20185
|
+
})
|
|
20186
|
+
);
|
|
20187
|
+
return /* @__PURE__ */ jsx(Fragment$1, {});
|
|
20188
|
+
};
|
|
19615
20189
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
19616
20190
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
19617
20191
|
const standardizeOptions = (options, simple) => {
|
|
@@ -19726,10 +20300,78 @@ const Select = (props) => {
|
|
|
19726
20300
|
checkNonExistentValues
|
|
19727
20301
|
);
|
|
19728
20302
|
const canUseNative = !multi;
|
|
20303
|
+
const useNative = native && canUseNative;
|
|
19729
20304
|
if (native && !canUseNative) {
|
|
19730
20305
|
console.warn("Native select does not support provided props (see stories)");
|
|
19731
20306
|
}
|
|
19732
|
-
|
|
20307
|
+
const nonExistentWarning = "Value no longer available for re-selection";
|
|
20308
|
+
const fullWarning = hasNonExistentValue && !disabled2 ? warning2 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
20309
|
+
/* @__PURE__ */ jsx("div", { children: nonExistentWarning }),
|
|
20310
|
+
/* @__PURE__ */ jsx("div", { children: warning2 })
|
|
20311
|
+
] }) : nonExistentWarning : warning2;
|
|
20312
|
+
const fullError = hasNonExistentValue && error2 && !disabled2 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
20313
|
+
/* @__PURE__ */ jsx("div", { children: nonExistentWarning }),
|
|
20314
|
+
/* @__PURE__ */ jsx("div", { children: error2 })
|
|
20315
|
+
] }) : error2;
|
|
20316
|
+
const onChangeSelectedValue = (evt, selectedOptions2) => {
|
|
20317
|
+
if (deprecatedEventHandler) {
|
|
20318
|
+
const newSelectedOptions = multi ? selectedOptions2.map(
|
|
20319
|
+
(o) => simpleInputs ? o.value : o
|
|
20320
|
+
) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
20321
|
+
if (newSelectedOptions) {
|
|
20322
|
+
onChange(newSelectedOptions);
|
|
20323
|
+
}
|
|
20324
|
+
} else {
|
|
20325
|
+
const isSyntheticEvent = !(evt instanceof Event);
|
|
20326
|
+
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
20327
|
+
if (isSyntheticEvent) {
|
|
20328
|
+
evt.target.name = name2;
|
|
20329
|
+
evt.target.value = value;
|
|
20330
|
+
if (!multi) {
|
|
20331
|
+
evt.target.label = selectedOptions2.label;
|
|
20332
|
+
}
|
|
20333
|
+
onChange(evt);
|
|
20334
|
+
} else {
|
|
20335
|
+
const customEvent = {
|
|
20336
|
+
...evt,
|
|
20337
|
+
target: {
|
|
20338
|
+
...evt.target,
|
|
20339
|
+
name: name2,
|
|
20340
|
+
value,
|
|
20341
|
+
label: !multi ? selectedOptions2.label : void 0
|
|
20342
|
+
}
|
|
20343
|
+
};
|
|
20344
|
+
onChange(customEvent);
|
|
20345
|
+
}
|
|
20346
|
+
}
|
|
20347
|
+
};
|
|
20348
|
+
return useNative ? /* @__PURE__ */ jsx(
|
|
20349
|
+
NativeSelect,
|
|
20350
|
+
{
|
|
20351
|
+
...props,
|
|
20352
|
+
options,
|
|
20353
|
+
selectedOption: selectedOptions,
|
|
20354
|
+
onChange: onChangeSelectedValue,
|
|
20355
|
+
hasNonExistentValue,
|
|
20356
|
+
warning: fullWarning,
|
|
20357
|
+
error: fullError,
|
|
20358
|
+
testId
|
|
20359
|
+
}
|
|
20360
|
+
) : /* @__PURE__ */ jsx(
|
|
20361
|
+
CustomSelect,
|
|
20362
|
+
{
|
|
20363
|
+
...props,
|
|
20364
|
+
options,
|
|
20365
|
+
selectedOptions,
|
|
20366
|
+
onChange: onChangeSelectedValue,
|
|
20367
|
+
multi,
|
|
20368
|
+
firstSelectedOptionIndex,
|
|
20369
|
+
warning: fullWarning,
|
|
20370
|
+
error: fullError,
|
|
20371
|
+
testId,
|
|
20372
|
+
closeOnOptionActionClick
|
|
20373
|
+
}
|
|
20374
|
+
);
|
|
19733
20375
|
};
|
|
19734
20376
|
const selectedRowsPerPage = (options, value) => {
|
|
19735
20377
|
return value || options && options.reduce((acc, row2) => {
|
|
@@ -19765,7 +20407,7 @@ const validateSelectedPage = (selectedPage, numPages, errorMessageTemplate = "Se
|
|
|
19765
20407
|
return valid;
|
|
19766
20408
|
};
|
|
19767
20409
|
const paginationContainer = "_paginationContainer_1tmz4_1";
|
|
19768
|
-
const styles$
|
|
20410
|
+
const styles$l = {
|
|
19769
20411
|
paginationContainer
|
|
19770
20412
|
};
|
|
19771
20413
|
const Pagination = ({ pagination }) => {
|
|
@@ -19802,7 +20444,7 @@ const Pagination = ({ pagination }) => {
|
|
|
19802
20444
|
onSelectPage(Number(value));
|
|
19803
20445
|
}
|
|
19804
20446
|
};
|
|
19805
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
20447
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$l.paginationContainer, children: [
|
|
19806
20448
|
rowsPerPage && /* @__PURE__ */ jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx(
|
|
19807
20449
|
Select,
|
|
19808
20450
|
{
|
|
@@ -19887,7 +20529,7 @@ const Pagination = ({ pagination }) => {
|
|
|
19887
20529
|
const toggleBox = "_toggleBox_lhie5_1";
|
|
19888
20530
|
const fullWidthStyleFix = "_fullWidthStyleFix_lhie5_8";
|
|
19889
20531
|
const dismiss = "_dismiss_lhie5_13";
|
|
19890
|
-
const styles$
|
|
20532
|
+
const styles$k = {
|
|
19891
20533
|
toggleBox,
|
|
19892
20534
|
fullWidthStyleFix,
|
|
19893
20535
|
dismiss
|
|
@@ -19941,7 +20583,7 @@ const Popover = ({
|
|
|
19941
20583
|
/* @__PURE__ */ jsxs(
|
|
19942
20584
|
"div",
|
|
19943
20585
|
{
|
|
19944
|
-
className: fullWidth ? cx$2(styles$
|
|
20586
|
+
className: fullWidth ? cx$2(styles$k.toggleBox, styles$k.fullWidthStyleFix) : cx$2(styles$k.toggleBox),
|
|
19945
20587
|
...layerProps,
|
|
19946
20588
|
children: [
|
|
19947
20589
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -19949,7 +20591,7 @@ const Popover = ({
|
|
|
19949
20591
|
content2,
|
|
19950
20592
|
{ close: close2 }
|
|
19951
20593
|
) : content2,
|
|
19952
|
-
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$
|
|
20594
|
+
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$k.dismiss, children: /* @__PURE__ */ jsx(Button$1, { small: true, round: true, onClick: close2, icon: IconType.CLOSE }) })
|
|
19953
20595
|
] }),
|
|
19954
20596
|
/* @__PURE__ */ jsx(
|
|
19955
20597
|
Arrow,
|
|
@@ -19968,7 +20610,7 @@ const Popover = ({
|
|
|
19968
20610
|
] });
|
|
19969
20611
|
};
|
|
19970
20612
|
const printHeader = "_printHeader_o7xxx_1";
|
|
19971
|
-
const styles$
|
|
20613
|
+
const styles$j = {
|
|
19972
20614
|
printHeader
|
|
19973
20615
|
};
|
|
19974
20616
|
const PrintHeader = ({
|
|
@@ -19980,7 +20622,7 @@ const PrintHeader = ({
|
|
|
19980
20622
|
{
|
|
19981
20623
|
src: logo2,
|
|
19982
20624
|
alt,
|
|
19983
|
-
className: styles$
|
|
20625
|
+
className: styles$j.printHeader,
|
|
19984
20626
|
style: { width: logoWidth }
|
|
19985
20627
|
}
|
|
19986
20628
|
);
|
|
@@ -19994,7 +20636,7 @@ const orange = "_orange_23ror_30";
|
|
|
19994
20636
|
const yellow = "_yellow_23ror_33";
|
|
19995
20637
|
const green = "_green_23ror_36";
|
|
19996
20638
|
const label$3 = "_label_23ror_39";
|
|
19997
|
-
const styles$
|
|
20639
|
+
const styles$i = {
|
|
19998
20640
|
progress: progress$1,
|
|
19999
20641
|
inverted,
|
|
20000
20642
|
bar,
|
|
@@ -20007,11 +20649,11 @@ const styles$j = {
|
|
|
20007
20649
|
label: label$3
|
|
20008
20650
|
};
|
|
20009
20651
|
const getColor = (perct) => {
|
|
20010
|
-
if (perct < 20) return styles$
|
|
20011
|
-
if (perct < 40) return styles$
|
|
20012
|
-
if (perct < 60) return styles$
|
|
20013
|
-
if (perct < 80) return styles$
|
|
20014
|
-
return styles$
|
|
20652
|
+
if (perct < 20) return styles$i.grey;
|
|
20653
|
+
if (perct < 40) return styles$i.red;
|
|
20654
|
+
if (perct < 60) return styles$i.orange;
|
|
20655
|
+
if (perct < 80) return styles$i.yellow;
|
|
20656
|
+
return styles$i.green;
|
|
20015
20657
|
};
|
|
20016
20658
|
const ProgressBar$1 = ({
|
|
20017
20659
|
width: width2 = "auto",
|
|
@@ -20024,21 +20666,21 @@ const ProgressBar$1 = ({
|
|
|
20024
20666
|
return /* @__PURE__ */ jsx("div", { style: { width: width2 }, "data-percent": percentage, children: /* @__PURE__ */ jsxs(
|
|
20025
20667
|
"div",
|
|
20026
20668
|
{
|
|
20027
|
-
className: cx$2(styles$
|
|
20669
|
+
className: cx$2(styles$i.progress, inverted2 ? styles$i.inverted : ""),
|
|
20028
20670
|
style: { width: width2 },
|
|
20029
20671
|
children: [
|
|
20030
20672
|
/* @__PURE__ */ jsx(
|
|
20031
20673
|
"div",
|
|
20032
20674
|
{
|
|
20033
20675
|
className: cx$2(
|
|
20034
|
-
styles$
|
|
20035
|
-
showProgressColors ? getColor(percentage) : colored2 ? styles$
|
|
20676
|
+
styles$i.bar,
|
|
20677
|
+
showProgressColors ? getColor(percentage) : colored2 ? styles$i.colored : ""
|
|
20036
20678
|
),
|
|
20037
20679
|
style: { width: `${percentage}%` },
|
|
20038
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
20680
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$i.label, children: !noLabel2 && `${percentage}%` })
|
|
20039
20681
|
}
|
|
20040
20682
|
),
|
|
20041
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
20683
|
+
/* @__PURE__ */ jsx("div", { className: styles$i.label, children: !noLabel2 && `${percentage}%` })
|
|
20042
20684
|
]
|
|
20043
20685
|
}
|
|
20044
20686
|
) });
|
|
@@ -20047,20 +20689,20 @@ const wrapper$1 = "_wrapper_1fbik_1";
|
|
|
20047
20689
|
const inline$1 = "_inline_1fbik_1";
|
|
20048
20690
|
const radio = "_radio_1fbik_5";
|
|
20049
20691
|
const labelMargin = "_labelMargin_1fbik_8";
|
|
20050
|
-
const small$
|
|
20692
|
+
const small$3 = "_small_1fbik_27";
|
|
20051
20693
|
const noMargin$1 = "_noMargin_1fbik_32";
|
|
20052
20694
|
const disabled$2 = "_disabled_1fbik_90";
|
|
20053
|
-
const isInTable
|
|
20695
|
+
const isInTable = "_isInTable_1fbik_106";
|
|
20054
20696
|
const helpIconEnabled$1 = "_helpIconEnabled_1fbik_111";
|
|
20055
|
-
const styles$
|
|
20697
|
+
const styles$h = {
|
|
20056
20698
|
wrapper: wrapper$1,
|
|
20057
20699
|
inline: inline$1,
|
|
20058
20700
|
radio,
|
|
20059
20701
|
labelMargin,
|
|
20060
|
-
small: small$
|
|
20702
|
+
small: small$3,
|
|
20061
20703
|
noMargin: noMargin$1,
|
|
20062
20704
|
disabled: disabled$2,
|
|
20063
|
-
isInTable
|
|
20705
|
+
isInTable,
|
|
20064
20706
|
helpIconEnabled: helpIconEnabled$1
|
|
20065
20707
|
};
|
|
20066
20708
|
const RadioInput = ({
|
|
@@ -20081,10 +20723,10 @@ const RadioInput = ({
|
|
|
20081
20723
|
"div",
|
|
20082
20724
|
{
|
|
20083
20725
|
className: cx$2(
|
|
20084
|
-
styles$
|
|
20085
|
-
disabled2 ? styles$
|
|
20086
|
-
small2 ? styles$
|
|
20087
|
-
noMargin2 ? styles$
|
|
20726
|
+
styles$h.radio,
|
|
20727
|
+
disabled2 ? styles$h.disabled : null,
|
|
20728
|
+
small2 ? styles$h.small : null,
|
|
20729
|
+
noMargin2 ? styles$h.noMargin : null
|
|
20088
20730
|
),
|
|
20089
20731
|
onClick: onChange,
|
|
20090
20732
|
"data-testid": testId,
|
|
@@ -20101,7 +20743,7 @@ const RadioInput = ({
|
|
|
20101
20743
|
}
|
|
20102
20744
|
),
|
|
20103
20745
|
/* @__PURE__ */ jsx("label", { "data-name": name2, "data-value": value, children: label2 }),
|
|
20104
|
-
showHelp && /* @__PURE__ */ jsx("div", { className: styles$
|
|
20746
|
+
showHelp && /* @__PURE__ */ jsx("div", { className: styles$h.helpIconEnabled, onClick: onClickHelp, children: /* @__PURE__ */ jsx(HelpIcon, { text: helpText }) })
|
|
20105
20747
|
]
|
|
20106
20748
|
}
|
|
20107
20749
|
);
|
|
@@ -20141,13 +20783,13 @@ const RadioButton = ({
|
|
|
20141
20783
|
"div",
|
|
20142
20784
|
{
|
|
20143
20785
|
className: cx$2(
|
|
20144
|
-
styles$
|
|
20145
|
-
inline2 ? styles$
|
|
20146
|
-
classForContainer === "inline fields" ? styles$
|
|
20786
|
+
styles$h.wrapper,
|
|
20787
|
+
inline2 ? styles$h.inline : null,
|
|
20788
|
+
classForContainer === "inline fields" ? styles$h.inline : null
|
|
20147
20789
|
//deprecated
|
|
20148
20790
|
),
|
|
20149
20791
|
children: [
|
|
20150
|
-
mainLabel && /* @__PURE__ */ jsx("label", { className: cx$2(inline2 && styles$
|
|
20792
|
+
mainLabel && /* @__PURE__ */ jsx("label", { className: cx$2(inline2 && styles$h.labelMargin), children: label2 }),
|
|
20151
20793
|
options.map(
|
|
20152
20794
|
(option2, index2) => {
|
|
20153
20795
|
const selected2 = option2.checked || option2.value === selectedValue || false;
|
|
@@ -50373,7 +51015,7 @@ var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
|
50373
51015
|
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(_extends$5);
|
|
50374
51016
|
const richTextToolbar = "_richTextToolbar_1gbkk_1";
|
|
50375
51017
|
const richTextToolbarContainer = "_richTextToolbarContainer_1gbkk_5";
|
|
50376
|
-
const styles$
|
|
51018
|
+
const styles$g = {
|
|
50377
51019
|
richTextToolbar,
|
|
50378
51020
|
richTextToolbarContainer
|
|
50379
51021
|
};
|
|
@@ -50425,8 +51067,8 @@ const RichTextToolbar = ({
|
|
|
50425
51067
|
active: active2.orderedList()
|
|
50426
51068
|
}
|
|
50427
51069
|
];
|
|
50428
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
50429
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
51070
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$g.richTextToolbarContainer, children: [
|
|
51071
|
+
/* @__PURE__ */ jsx("div", { className: styles$g.richTextToolbar, children: items.map((item2, index2) => /* @__PURE__ */ jsx(
|
|
50430
51072
|
Button$1,
|
|
50431
51073
|
{
|
|
50432
51074
|
small: true,
|
|
@@ -50446,22 +51088,22 @@ const RichTextToolbar = ({
|
|
|
50446
51088
|
toolbarComponent
|
|
50447
51089
|
] });
|
|
50448
51090
|
};
|
|
50449
|
-
const inputInTable$
|
|
50450
|
-
const inputHover$
|
|
50451
|
-
const inputFocus$
|
|
50452
|
-
const inputError$
|
|
50453
|
-
const inputWarning$
|
|
50454
|
-
const inputDisabled$
|
|
50455
|
-
const hideScrollbars$
|
|
51091
|
+
const inputInTable$4 = "_inputInTable_1fb4l_1";
|
|
51092
|
+
const inputHover$4 = "_inputHover_1fb4l_13";
|
|
51093
|
+
const inputFocus$4 = "_inputFocus_1fb4l_18";
|
|
51094
|
+
const inputError$4 = "_inputError_1fb4l_25";
|
|
51095
|
+
const inputWarning$4 = "_inputWarning_1fb4l_26";
|
|
51096
|
+
const inputDisabled$4 = "_inputDisabled_1fb4l_61";
|
|
51097
|
+
const hideScrollbars$4 = "_hideScrollbars_1fb4l_67";
|
|
50456
51098
|
const richTextInput = "_richTextInput_1fb4l_77";
|
|
50457
|
-
const styles$
|
|
50458
|
-
inputInTable: inputInTable$
|
|
50459
|
-
inputHover: inputHover$
|
|
50460
|
-
inputFocus: inputFocus$
|
|
50461
|
-
inputError: inputError$
|
|
50462
|
-
inputWarning: inputWarning$
|
|
50463
|
-
inputDisabled: inputDisabled$
|
|
50464
|
-
hideScrollbars: hideScrollbars$
|
|
51099
|
+
const styles$f = {
|
|
51100
|
+
inputInTable: inputInTable$4,
|
|
51101
|
+
inputHover: inputHover$4,
|
|
51102
|
+
inputFocus: inputFocus$4,
|
|
51103
|
+
inputError: inputError$4,
|
|
51104
|
+
inputWarning: inputWarning$4,
|
|
51105
|
+
inputDisabled: inputDisabled$4,
|
|
51106
|
+
hideScrollbars: hideScrollbars$4,
|
|
50465
51107
|
richTextInput
|
|
50466
51108
|
};
|
|
50467
51109
|
const RichTextInput = forwardRef(
|
|
@@ -50490,7 +51132,7 @@ const RichTextInput = forwardRef(
|
|
|
50490
51132
|
}
|
|
50491
51133
|
setState(state2);
|
|
50492
51134
|
};
|
|
50493
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
51135
|
+
return /* @__PURE__ */ jsx("div", { className: styles$f.richTextInput, children: /* @__PURE__ */ jsxs(
|
|
50494
51136
|
Remirror,
|
|
50495
51137
|
{
|
|
50496
51138
|
manager,
|
|
@@ -50512,164 +51154,6 @@ const RichTextInput = forwardRef(
|
|
|
50512
51154
|
) });
|
|
50513
51155
|
}
|
|
50514
51156
|
);
|
|
50515
|
-
const inputInTable$4 = "_inputInTable_sl2b5_1";
|
|
50516
|
-
const inputHover$4 = "_inputHover_sl2b5_13";
|
|
50517
|
-
const inputFocus$4 = "_inputFocus_sl2b5_18";
|
|
50518
|
-
const inputError$4 = "_inputError_sl2b5_25";
|
|
50519
|
-
const inputWarning$4 = "_inputWarning_sl2b5_26";
|
|
50520
|
-
const inputDisabled$4 = "_inputDisabled_sl2b5_61";
|
|
50521
|
-
const hideScrollbars$4 = "_hideScrollbars_sl2b5_67";
|
|
50522
|
-
const select = "_select_sl2b5_77";
|
|
50523
|
-
const isInTable = "_isInTable_sl2b5_121";
|
|
50524
|
-
const unSelected = "_unSelected_sl2b5_133";
|
|
50525
|
-
const small$3 = "_small_sl2b5_174";
|
|
50526
|
-
const right$2 = "_right_sl2b5_182";
|
|
50527
|
-
const groupOrderFirst = "_groupOrderFirst_sl2b5_193";
|
|
50528
|
-
const groupOrderMiddle = "_groupOrderMiddle_sl2b5_194";
|
|
50529
|
-
const groupOrderLast = "_groupOrderLast_sl2b5_198";
|
|
50530
|
-
const styles$f = {
|
|
50531
|
-
inputInTable: inputInTable$4,
|
|
50532
|
-
inputHover: inputHover$4,
|
|
50533
|
-
inputFocus: inputFocus$4,
|
|
50534
|
-
inputError: inputError$4,
|
|
50535
|
-
inputWarning: inputWarning$4,
|
|
50536
|
-
inputDisabled: inputDisabled$4,
|
|
50537
|
-
hideScrollbars: hideScrollbars$4,
|
|
50538
|
-
select,
|
|
50539
|
-
isInTable,
|
|
50540
|
-
unSelected,
|
|
50541
|
-
small: small$3,
|
|
50542
|
-
right: right$2,
|
|
50543
|
-
groupOrderFirst,
|
|
50544
|
-
groupOrderMiddle,
|
|
50545
|
-
groupOrderLast
|
|
50546
|
-
};
|
|
50547
|
-
const NativeSelect = ({
|
|
50548
|
-
disabled: disabled2 = false,
|
|
50549
|
-
error: error2 = null,
|
|
50550
|
-
warning: warning2 = null,
|
|
50551
|
-
tooltip: tooltip2 = null,
|
|
50552
|
-
options,
|
|
50553
|
-
onChange = noop$3,
|
|
50554
|
-
onFocus = noop$3,
|
|
50555
|
-
onBlur = noop$3,
|
|
50556
|
-
right: right2 = false,
|
|
50557
|
-
small: small2 = false,
|
|
50558
|
-
tabIndex = 0,
|
|
50559
|
-
selectedOption,
|
|
50560
|
-
width: width2 = null,
|
|
50561
|
-
groupOrder = null,
|
|
50562
|
-
testId,
|
|
50563
|
-
isInTable: isInTable2 = false,
|
|
50564
|
-
clearable,
|
|
50565
|
-
placeholder: placeholder3,
|
|
50566
|
-
hasNonExistentValue,
|
|
50567
|
-
maxTooltipWidth,
|
|
50568
|
-
borderRadius
|
|
50569
|
-
}) => {
|
|
50570
|
-
const disabledContext = useContext(DisabledContext);
|
|
50571
|
-
const internalValue = selectedOption === null ? "unselected" : (selectedOption == null ? void 0 : selectedOption.value) === null ? "unselected" : selectedOption == null ? void 0 : selectedOption.value;
|
|
50572
|
-
const isUnselected = internalValue === "unselected";
|
|
50573
|
-
const viewOptions = (internalValue === "unselected" || clearable ? [
|
|
50574
|
-
/* @__PURE__ */ jsx(
|
|
50575
|
-
"option",
|
|
50576
|
-
{
|
|
50577
|
-
value: "unselected",
|
|
50578
|
-
disabled: !clearable,
|
|
50579
|
-
hidden: !clearable,
|
|
50580
|
-
children: placeholder3 || "Select..."
|
|
50581
|
-
},
|
|
50582
|
-
"unselected"
|
|
50583
|
-
)
|
|
50584
|
-
] : []).concat(
|
|
50585
|
-
hasNonExistentValue ? [
|
|
50586
|
-
/* @__PURE__ */ jsx(
|
|
50587
|
-
"option",
|
|
50588
|
-
{
|
|
50589
|
-
value: selectedOption == null ? void 0 : selectedOption.value,
|
|
50590
|
-
disabled: disabled2 || disabledContext,
|
|
50591
|
-
children: selectedOption == null ? void 0 : selectedOption.label
|
|
50592
|
-
},
|
|
50593
|
-
"selectedNonExistentValue"
|
|
50594
|
-
)
|
|
50595
|
-
] : []
|
|
50596
|
-
).concat(
|
|
50597
|
-
options.map((option2, i) => {
|
|
50598
|
-
return /* @__PURE__ */ jsx(
|
|
50599
|
-
"option",
|
|
50600
|
-
{
|
|
50601
|
-
value: option2.value,
|
|
50602
|
-
"data-testid": option2.testId,
|
|
50603
|
-
children: option2.label
|
|
50604
|
-
},
|
|
50605
|
-
i
|
|
50606
|
-
);
|
|
50607
|
-
})
|
|
50608
|
-
);
|
|
50609
|
-
const order2 = (() => {
|
|
50610
|
-
if (groupOrder) {
|
|
50611
|
-
switch (groupOrder) {
|
|
50612
|
-
case GroupOrder.FIRST:
|
|
50613
|
-
return styles$f.groupOrderFirst;
|
|
50614
|
-
case GroupOrder.LAST:
|
|
50615
|
-
return styles$f.groupOrderLast;
|
|
50616
|
-
default:
|
|
50617
|
-
return styles$f.groupOrderMiddle;
|
|
50618
|
-
}
|
|
50619
|
-
}
|
|
50620
|
-
return "";
|
|
50621
|
-
})();
|
|
50622
|
-
return /* @__PURE__ */ jsx(
|
|
50623
|
-
Tooltip,
|
|
50624
|
-
{
|
|
50625
|
-
error: !!error2,
|
|
50626
|
-
warning: !!warning2,
|
|
50627
|
-
text: tooltip2 || error2 || warning2,
|
|
50628
|
-
enabled: tooltip2 && isStringNumberOrNode(tooltip2) || error2 && isStringNumberOrNode(error2) || warning2 && isStringNumberOrNode(warning2) || false,
|
|
50629
|
-
maxWidth: maxTooltipWidth,
|
|
50630
|
-
placement: "bottom-center",
|
|
50631
|
-
children: /* @__PURE__ */ jsx(
|
|
50632
|
-
"select",
|
|
50633
|
-
{
|
|
50634
|
-
className: cx$2(
|
|
50635
|
-
styles$f.select,
|
|
50636
|
-
isUnselected ? styles$f.unSelected : "",
|
|
50637
|
-
right2 ? styles$f.right : "",
|
|
50638
|
-
small2 ? styles$f.small : "",
|
|
50639
|
-
isInTable2 ? styles$f.isInTable : "",
|
|
50640
|
-
order2
|
|
50641
|
-
),
|
|
50642
|
-
style: {
|
|
50643
|
-
width: width2 || "",
|
|
50644
|
-
borderRadius: borderRadius || ""
|
|
50645
|
-
},
|
|
50646
|
-
onChange: (evt) => {
|
|
50647
|
-
const { value } = evt.target;
|
|
50648
|
-
let nextValue;
|
|
50649
|
-
if (value === "unselected") {
|
|
50650
|
-
nextValue = { value: null };
|
|
50651
|
-
} else {
|
|
50652
|
-
const foundOption = options.find(
|
|
50653
|
-
(o) => String(o.value) === String(value)
|
|
50654
|
-
);
|
|
50655
|
-
nextValue = foundOption || { value: null };
|
|
50656
|
-
}
|
|
50657
|
-
onChange(evt, nextValue);
|
|
50658
|
-
},
|
|
50659
|
-
onFocus,
|
|
50660
|
-
onBlur,
|
|
50661
|
-
tabIndex,
|
|
50662
|
-
value: internalValue,
|
|
50663
|
-
disabled: disabled2 || disabledContext,
|
|
50664
|
-
"data-error": error2 || null,
|
|
50665
|
-
"data-warning": warning2 || null,
|
|
50666
|
-
"data-testid": testId,
|
|
50667
|
-
children: viewOptions
|
|
50668
|
-
}
|
|
50669
|
-
)
|
|
50670
|
-
}
|
|
50671
|
-
);
|
|
50672
|
-
};
|
|
50673
51157
|
const row = "_row_n16je_1";
|
|
50674
51158
|
const styles$e = {
|
|
50675
51159
|
row
|
|
@@ -53800,192 +54284,6 @@ const roundNumberCosmetic = (value) => {
|
|
|
53800
54284
|
roundToPrecision(toNum(value), COSMETIC_ROUNDING_DEFAULT_PRECISION)
|
|
53801
54285
|
) : value;
|
|
53802
54286
|
};
|
|
53803
|
-
var reactKeyboardEventHandler = { exports: {} };
|
|
53804
|
-
(function(module, exports) {
|
|
53805
|
-
!function(e2, t) {
|
|
53806
|
-
module.exports = t(React__default, PropTypes__default);
|
|
53807
|
-
}(window, function(e2, t) {
|
|
53808
|
-
return function(e3) {
|
|
53809
|
-
var t2 = {};
|
|
53810
|
-
function n2(r2) {
|
|
53811
|
-
if (t2[r2]) return t2[r2].exports;
|
|
53812
|
-
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
53813
|
-
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
53814
|
-
}
|
|
53815
|
-
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
53816
|
-
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
53817
|
-
}, n2.r = function(e4) {
|
|
53818
|
-
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
53819
|
-
}, n2.t = function(e4, t3) {
|
|
53820
|
-
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
53821
|
-
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
53822
|
-
var r2 = /* @__PURE__ */ Object.create(null);
|
|
53823
|
-
if (n2.r(r2), Object.defineProperty(r2, "default", { enumerable: true, value: e4 }), 2 & t3 && "string" != typeof e4) for (var o in e4) n2.d(r2, o, (function(t4) {
|
|
53824
|
-
return e4[t4];
|
|
53825
|
-
}).bind(null, o));
|
|
53826
|
-
return r2;
|
|
53827
|
-
}, n2.n = function(e4) {
|
|
53828
|
-
var t3 = e4 && e4.__esModule ? function() {
|
|
53829
|
-
return e4.default;
|
|
53830
|
-
} : function() {
|
|
53831
|
-
return e4;
|
|
53832
|
-
};
|
|
53833
|
-
return n2.d(t3, "a", t3), t3;
|
|
53834
|
-
}, n2.o = function(e4, t3) {
|
|
53835
|
-
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
53836
|
-
}, n2.p = "", n2(n2.s = 0);
|
|
53837
|
-
}([function(e3, t2, n2) {
|
|
53838
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
53839
|
-
var r2 = n2(1);
|
|
53840
|
-
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
53841
|
-
return function(e4) {
|
|
53842
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
53843
|
-
}(r2).default;
|
|
53844
|
-
} }), e3.exports = t2.default;
|
|
53845
|
-
}, function(e3, t2, n2) {
|
|
53846
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
53847
|
-
var r2 = Object.assign || function(e4) {
|
|
53848
|
-
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
53849
|
-
var n3 = arguments[t3];
|
|
53850
|
-
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
53851
|
-
}
|
|
53852
|
-
return e4;
|
|
53853
|
-
}, o = /* @__PURE__ */ function() {
|
|
53854
|
-
function e4(e5, t3) {
|
|
53855
|
-
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
53856
|
-
var r3 = t3[n3];
|
|
53857
|
-
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
53858
|
-
}
|
|
53859
|
-
}
|
|
53860
|
-
return function(t3, n3, r3) {
|
|
53861
|
-
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
53862
|
-
};
|
|
53863
|
-
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
53864
|
-
function l(e4) {
|
|
53865
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
53866
|
-
}
|
|
53867
|
-
var s = [], c2 = function(e4) {
|
|
53868
|
-
function t3(e5) {
|
|
53869
|
-
!function(e6, t4) {
|
|
53870
|
-
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
53871
|
-
}(this, t3);
|
|
53872
|
-
var n3 = function(e6, t4) {
|
|
53873
|
-
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
53874
|
-
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
53875
|
-
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
53876
|
-
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
53877
|
-
}
|
|
53878
|
-
return function(e5, t4) {
|
|
53879
|
-
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
53880
|
-
e5.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e5, enumerable: false, writable: true, configurable: true } }), t4 && (Object.setPrototypeOf ? Object.setPrototypeOf(e5, t4) : e5.__proto__ = t4);
|
|
53881
|
-
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
53882
|
-
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
53883
|
-
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
53884
|
-
t4 && !n3 && this.registerExclusiveHandler();
|
|
53885
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
53886
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
53887
|
-
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
53888
|
-
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
53889
|
-
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
53890
|
-
} }, { key: "registerExclusiveHandler", value: function() {
|
|
53891
|
-
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
53892
|
-
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
53893
|
-
var e5 = this;
|
|
53894
|
-
s.includes(this) && (s = s.filter(function(t4) {
|
|
53895
|
-
return t4 !== e5;
|
|
53896
|
-
}));
|
|
53897
|
-
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
53898
|
-
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
53899
|
-
if (n3) return false;
|
|
53900
|
-
if (!(i2 === e5.type)) return false;
|
|
53901
|
-
if (s.length > 0 && s[0] !== this) return false;
|
|
53902
|
-
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
53903
|
-
if (!(u2 ? d2 : c3)) return false;
|
|
53904
|
-
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
53905
|
-
return !!f2 && (o2(f2, e5), true);
|
|
53906
|
-
} }, { key: "render", value: function() {
|
|
53907
|
-
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
53908
|
-
try {
|
|
53909
|
-
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
53910
|
-
delete o2[s2.value];
|
|
53911
|
-
}
|
|
53912
|
-
} catch (e6) {
|
|
53913
|
-
a3 = true, l2 = e6;
|
|
53914
|
-
} finally {
|
|
53915
|
-
try {
|
|
53916
|
-
!u2 && c3.return && c3.return();
|
|
53917
|
-
} finally {
|
|
53918
|
-
if (a3) throw l2;
|
|
53919
|
-
}
|
|
53920
|
-
}
|
|
53921
|
-
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
53922
|
-
e5.childrenContainer = t4;
|
|
53923
|
-
} }, o2), n3) : null;
|
|
53924
|
-
} }]), t3;
|
|
53925
|
-
}();
|
|
53926
|
-
t2.default = c2, c2.propTypes = { handleKeys: u.default.array, handleEventType: u.default.oneOf(["keydown", "keyup", "keypress"]), handleFocusableElements: u.default.bool, onKeyEvent: u.default.func, isDisabled: u.default.bool, isExclusive: u.default.bool, children: u.default.any }, c2.defaultProps = { handleKeys: [], handleFocusableElements: false, handleEventType: "keydown", onKeyEvent: function() {
|
|
53927
|
-
return null;
|
|
53928
|
-
} }, e3.exports = t2.default;
|
|
53929
|
-
}, function(t2, n2) {
|
|
53930
|
-
t2.exports = e2;
|
|
53931
|
-
}, function(e3, n2) {
|
|
53932
|
-
e3.exports = t;
|
|
53933
|
-
}, function(e3, t2, n2) {
|
|
53934
|
-
function r2(e4, t3, n3) {
|
|
53935
|
-
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
53936
|
-
}
|
|
53937
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
53938
|
-
var n3 = t3.map(function(e5) {
|
|
53939
|
-
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
53940
|
-
return n4 || [e5];
|
|
53941
|
-
}).reduce(function(e5, t4) {
|
|
53942
|
-
return e5.concat(t4);
|
|
53943
|
-
}, []).find(function(t4) {
|
|
53944
|
-
return p(e4, t4);
|
|
53945
|
-
});
|
|
53946
|
-
!n3 && t3.includes("all") && (n3 = "other");
|
|
53947
|
-
return n3;
|
|
53948
|
-
};
|
|
53949
|
-
var o = { backspace: [8], del: [46], delete: [46], ins: [45], insert: [45], tab: [9], enter: [13], return: [13], esc: [27], space: [32], pageup: [33], pagedown: [34], end: [35], home: [36], left: [37], up: [38], right: [39], down: [40], shift: [16], ctrl: [17], alt: [18], cap: [20], num: [144], clear: [12], meta: [91], ";": [186, 59], "=": [187, 61], ",": [188, 44], "-": [189, 45, 173, 109], minus: [189, 45, 173, 109], ".": [190, 110], "/": [191, 111], "`": [192], "[": [219], "\\": [220], "]": [221], "*": [106], "+": [107], plus: [107], "'": [222], quote: [222] }, i = Object.keys(o).reduce(function(e4, t3) {
|
|
53950
|
-
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
53951
|
-
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
53952
|
-
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
53953
|
-
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
53954
|
-
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
53955
|
-
}, {}), l = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(e4, t3, n3) {
|
|
53956
|
-
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
53957
|
-
}, {}), s = { control: "ctrl", ctrl: "ctrl", shift: "shift", meta: "meta", cmd: "meta", command: "meta", option: "alt", alt: "alt" }, c2 = t2.AllKeys = Object.assign({}, o, i, u, a2, l), d2 = Object.assign({}, u, a2), f2 = { all: Object.keys(c2), alphanumeric: Object.keys(d2), numeric: Object.keys(u), alphabetic: Object.keys(a2), function: Object.keys(l) };
|
|
53958
|
-
function p(e4, t3) {
|
|
53959
|
-
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
53960
|
-
return e4[t4 + "Key"];
|
|
53961
|
-
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
53962
|
-
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
53963
|
-
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
53964
|
-
if (d3.length > 0 && o2.length > 0) {
|
|
53965
|
-
var f3 = d3.map(function(e5) {
|
|
53966
|
-
return s[e5];
|
|
53967
|
-
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
53968
|
-
return o2[t4] === e5;
|
|
53969
|
-
});
|
|
53970
|
-
return l2.indexOf(n3) >= 0 && p2;
|
|
53971
|
-
}
|
|
53972
|
-
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
53973
|
-
}
|
|
53974
|
-
}]);
|
|
53975
|
-
});
|
|
53976
|
-
})(reactKeyboardEventHandler);
|
|
53977
|
-
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
53978
|
-
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
53979
|
-
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
53980
|
-
EventKey2["RIGHT"] = "right";
|
|
53981
|
-
EventKey2["LEFT"] = "left";
|
|
53982
|
-
EventKey2["UP"] = "up";
|
|
53983
|
-
EventKey2["DOWN"] = "down";
|
|
53984
|
-
EventKey2["ENTER"] = "enter";
|
|
53985
|
-
EventKey2["ESC"] = "esc";
|
|
53986
|
-
EventKey2["TAB"] = "tab";
|
|
53987
|
-
return EventKey2;
|
|
53988
|
-
})(EventKey || {});
|
|
53989
54287
|
const getStringName$1 = (name2) => {
|
|
53990
54288
|
if (!name2) return "";
|
|
53991
54289
|
if (typeof name2 === "string") {
|
|
@@ -69283,27 +69581,6 @@ const SmartUploadModal = ({
|
|
|
69283
69581
|
}
|
|
69284
69582
|
) });
|
|
69285
69583
|
};
|
|
69286
|
-
const useFocus = () => {
|
|
69287
|
-
const ref2 = useRef(null);
|
|
69288
|
-
const setFocus = () => {
|
|
69289
|
-
if (ref2.current) {
|
|
69290
|
-
ref2.current.focus();
|
|
69291
|
-
}
|
|
69292
|
-
};
|
|
69293
|
-
return [ref2, setFocus];
|
|
69294
|
-
};
|
|
69295
|
-
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
69296
|
-
const useWindowWidth = () => {
|
|
69297
|
-
const [width2, setWidth] = useState(getWidth());
|
|
69298
|
-
const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
|
|
69299
|
-
useEffect(() => {
|
|
69300
|
-
window.addEventListener("resize", resizeListener);
|
|
69301
|
-
return () => {
|
|
69302
|
-
window.removeEventListener("resize", resizeListener);
|
|
69303
|
-
};
|
|
69304
|
-
}, []);
|
|
69305
|
-
return width2;
|
|
69306
|
-
};
|
|
69307
69584
|
export {
|
|
69308
69585
|
Accordion,
|
|
69309
69586
|
AccordionWithDefaultToggle,
|