@oliasoft-open-source/react-ui-library 4.15.2-beta-2 → 4.15.2-beta-3
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 +691 -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,570 @@ 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
|
+
useEffect(() => {
|
|
19961
|
+
const fontIsReady = async () => {
|
|
19962
|
+
if (!document.fonts) return;
|
|
19963
|
+
await document.fonts.ready.then(() => setFontLoaded(true));
|
|
19964
|
+
};
|
|
19965
|
+
fontIsReady();
|
|
19966
|
+
}, []);
|
|
19967
|
+
return isFontLoaded;
|
|
19968
|
+
};
|
|
19969
|
+
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
19970
|
+
const useWindowWidth = () => {
|
|
19971
|
+
const [width2, setWidth] = useState(getWidth());
|
|
19972
|
+
const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
|
|
19973
|
+
useEffect(() => {
|
|
19974
|
+
window.addEventListener("resize", resizeListener);
|
|
19975
|
+
return () => {
|
|
19976
|
+
window.removeEventListener("resize", resizeListener);
|
|
19977
|
+
};
|
|
19978
|
+
}, []);
|
|
19979
|
+
return width2;
|
|
19980
|
+
};
|
|
19981
|
+
var ReducerAction = /* @__PURE__ */ ((ReducerAction2) => {
|
|
19982
|
+
ReducerAction2["SET_VISIBLE_OPTIONS"] = "SET_VISIBLE_OPTIONS";
|
|
19983
|
+
ReducerAction2["RESET_LAYER_FOCUS"] = "RESET_LAYER_FOCUS";
|
|
19984
|
+
ReducerAction2["CLEAR_SEARCH"] = "CLEAR_SEARCH";
|
|
19985
|
+
ReducerAction2["ON_CHANGE_SEARCH"] = "ON_CHANGE_SEARCH";
|
|
19986
|
+
ReducerAction2["FOCUS_TRIGGER_INPUTS"] = "FOCUS_TRIGGER_INPUTS";
|
|
19987
|
+
ReducerAction2["BLUR_TRIGGER_INPUTS"] = "BLUR_TRIGGER_INPUTS";
|
|
19988
|
+
ReducerAction2["FOCUS_LAYER_OPTIONS"] = "FOCUS_LAYER_OPTIONS";
|
|
19989
|
+
ReducerAction2["OPEN_LAYER"] = "OPEN_LAYER";
|
|
19990
|
+
ReducerAction2["CLOSE_LAYER"] = "CLOSE_LAYER";
|
|
19991
|
+
return ReducerAction2;
|
|
19992
|
+
})(ReducerAction || {});
|
|
19993
|
+
const initialTriggerFocus = {
|
|
19994
|
+
options: ["none", "clearAll"],
|
|
19995
|
+
currentIndex: 0,
|
|
19996
|
+
currentOption: false,
|
|
19997
|
+
clearAll: false
|
|
19998
|
+
};
|
|
19999
|
+
const initialLayerFocusIndex = (firstSelectedOptionIndex) => firstSelectedOptionIndex !== null ? firstSelectedOptionIndex + 1 : 0;
|
|
20000
|
+
const initialLayerFocus = (options, firstSelectedOptionIndex) => {
|
|
20001
|
+
const layerFocusOptions = [
|
|
20002
|
+
"none",
|
|
20003
|
+
...options.map((o, i) => o.type !== MenuType.HEADING ? i : null).filter((o) => o !== null)
|
|
20004
|
+
];
|
|
20005
|
+
const layerFocusIndex = initialLayerFocusIndex(firstSelectedOptionIndex);
|
|
20006
|
+
return {
|
|
20007
|
+
options: layerFocusOptions,
|
|
20008
|
+
currentIndex: layerFocusIndex,
|
|
20009
|
+
current: layerFocusOptions[layerFocusIndex]
|
|
20010
|
+
};
|
|
20011
|
+
};
|
|
20012
|
+
const nextTriggerFocus = (direction, selectedOptions, triggerFocus) => {
|
|
20013
|
+
const sign = direction === "left" ? -1 : 1;
|
|
20014
|
+
const nextOptions = selectedOptions && selectedOptions.length ? [
|
|
20015
|
+
"none",
|
|
20016
|
+
...Array.from({ length: selectedOptions.length }, (_2, i) => i),
|
|
20017
|
+
"clearAll"
|
|
20018
|
+
] : ["none", "clearAll"];
|
|
20019
|
+
const increment = triggerFocus.currentIndex + sign;
|
|
20020
|
+
const nextIndex = (increment < 0 ? nextOptions.length - 1 : increment) % nextOptions.length;
|
|
20021
|
+
const next2 = nextOptions[nextIndex];
|
|
20022
|
+
const clearAll = next2 === "clearAll";
|
|
20023
|
+
return {
|
|
20024
|
+
options: nextOptions,
|
|
20025
|
+
currentIndex: nextIndex,
|
|
20026
|
+
currentOption: next2,
|
|
20027
|
+
clearAll
|
|
20028
|
+
};
|
|
20029
|
+
};
|
|
20030
|
+
const blurTriggerFocus = () => initialTriggerFocus;
|
|
20031
|
+
const blurLayerFocus = (layerFocus) => ({
|
|
20032
|
+
...layerFocus,
|
|
20033
|
+
currentIndex: 0,
|
|
20034
|
+
current: "none"
|
|
20035
|
+
});
|
|
20036
|
+
const reducer = (state, action2) => {
|
|
20037
|
+
switch (action2.type) {
|
|
20038
|
+
case ReducerAction.SET_VISIBLE_OPTIONS: {
|
|
20039
|
+
return {
|
|
20040
|
+
...state,
|
|
20041
|
+
visibleOptions: action2.options || []
|
|
20042
|
+
};
|
|
20043
|
+
}
|
|
20044
|
+
case ReducerAction.RESET_LAYER_FOCUS: {
|
|
20045
|
+
return {
|
|
20046
|
+
...state,
|
|
20047
|
+
layerFocus: initialLayerFocus(
|
|
20048
|
+
action2.options || [],
|
|
20049
|
+
action2.firstSelectedOptionIndex || 0
|
|
20050
|
+
)
|
|
20051
|
+
};
|
|
20052
|
+
}
|
|
20053
|
+
case ReducerAction.CLEAR_SEARCH: {
|
|
20054
|
+
return {
|
|
20055
|
+
...state,
|
|
20056
|
+
visibleOptions: action2.options || [],
|
|
20057
|
+
searchValue: ""
|
|
20058
|
+
};
|
|
20059
|
+
}
|
|
20060
|
+
case ReducerAction.ON_CHANGE_SEARCH: {
|
|
20061
|
+
const visibleOptions = (action2.options || []).filter(
|
|
20062
|
+
(o) => (String(o.label) + (o.details ? String(o.details) : "")).toLowerCase().includes(String(action2.value || "").toLowerCase())
|
|
20063
|
+
);
|
|
20064
|
+
let newVisibleOptions = [...visibleOptions];
|
|
20065
|
+
if (action2.createAble && action2.value && action2.value !== "") {
|
|
20066
|
+
newVisibleOptions.push({
|
|
20067
|
+
label: `Create "${action2.value}"`,
|
|
20068
|
+
value: action2.value,
|
|
20069
|
+
createAble: true
|
|
20070
|
+
});
|
|
20071
|
+
}
|
|
20072
|
+
return {
|
|
20073
|
+
...state,
|
|
20074
|
+
searchValue: action2.value,
|
|
20075
|
+
visibleOptions: newVisibleOptions,
|
|
20076
|
+
layerFocus: blurLayerFocus(state.layerFocus)
|
|
20077
|
+
};
|
|
20078
|
+
}
|
|
20079
|
+
case ReducerAction.FOCUS_TRIGGER_INPUTS: {
|
|
20080
|
+
return {
|
|
20081
|
+
...state,
|
|
20082
|
+
triggerFocus: nextTriggerFocus(
|
|
20083
|
+
action2.direction || "right",
|
|
20084
|
+
action2.selectedOptions || [],
|
|
20085
|
+
state.triggerFocus
|
|
20086
|
+
),
|
|
20087
|
+
layerFocus: blurLayerFocus(state.layerFocus)
|
|
20088
|
+
};
|
|
20089
|
+
}
|
|
20090
|
+
case ReducerAction.BLUR_TRIGGER_INPUTS: {
|
|
20091
|
+
return {
|
|
20092
|
+
...state,
|
|
20093
|
+
triggerFocus: blurTriggerFocus()
|
|
20094
|
+
};
|
|
20095
|
+
}
|
|
20096
|
+
case ReducerAction.FOCUS_LAYER_OPTIONS: {
|
|
20097
|
+
if (!action2.nextLayerFocus) {
|
|
20098
|
+
return state;
|
|
20099
|
+
}
|
|
20100
|
+
return {
|
|
20101
|
+
...state,
|
|
20102
|
+
layerFocus: action2.nextLayerFocus,
|
|
20103
|
+
triggerFocus: blurTriggerFocus()
|
|
20104
|
+
};
|
|
20105
|
+
}
|
|
20106
|
+
case ReducerAction.OPEN_LAYER: {
|
|
20107
|
+
return {
|
|
20108
|
+
...state,
|
|
20109
|
+
isLayerOpen: true
|
|
20110
|
+
};
|
|
20111
|
+
}
|
|
20112
|
+
case ReducerAction.CLOSE_LAYER: {
|
|
20113
|
+
return {
|
|
20114
|
+
...state,
|
|
20115
|
+
isLayerOpen: false
|
|
20116
|
+
};
|
|
20117
|
+
}
|
|
20118
|
+
default:
|
|
20119
|
+
return state;
|
|
20120
|
+
}
|
|
20121
|
+
};
|
|
20122
|
+
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
20123
|
+
EventKey2["RIGHT"] = "right";
|
|
20124
|
+
EventKey2["LEFT"] = "left";
|
|
20125
|
+
EventKey2["UP"] = "up";
|
|
20126
|
+
EventKey2["DOWN"] = "down";
|
|
20127
|
+
EventKey2["ENTER"] = "enter";
|
|
20128
|
+
EventKey2["ESC"] = "esc";
|
|
20129
|
+
EventKey2["TAB"] = "tab";
|
|
20130
|
+
return EventKey2;
|
|
20131
|
+
})(EventKey || {});
|
|
20132
|
+
const CustomSelect = (props) => {
|
|
20133
|
+
const {
|
|
20134
|
+
multi: isMulti2 = false,
|
|
20135
|
+
disabled: disabled2 = false,
|
|
20136
|
+
error: error2 = null,
|
|
20137
|
+
warning: warning2 = null,
|
|
20138
|
+
tooltip: tooltip2 = null,
|
|
20139
|
+
options,
|
|
20140
|
+
selectedOptions,
|
|
20141
|
+
onCreate = null,
|
|
20142
|
+
placeholder: placeholder3 = "",
|
|
20143
|
+
small: small2 = false,
|
|
20144
|
+
tabIndex = 0,
|
|
20145
|
+
onFocus = () => {
|
|
20146
|
+
},
|
|
20147
|
+
onBlur = () => {
|
|
20148
|
+
},
|
|
20149
|
+
searchable = true,
|
|
20150
|
+
clearable = false,
|
|
20151
|
+
maxTooltipWidth,
|
|
20152
|
+
closeOnOptionActionClick,
|
|
20153
|
+
//private props (don't use)
|
|
20154
|
+
isInTable: isInTable2 = false,
|
|
20155
|
+
groupOrder,
|
|
20156
|
+
firstSelectedOptionIndex = 0,
|
|
20157
|
+
right: right2 = false,
|
|
20158
|
+
testId = void 0
|
|
20159
|
+
} = props;
|
|
20160
|
+
useContext(DisabledContext);
|
|
20161
|
+
useRef(null);
|
|
20162
|
+
useFocus();
|
|
20163
|
+
useFontsReady();
|
|
20164
|
+
useReducer(
|
|
20165
|
+
reducer,
|
|
20166
|
+
// @ts-ignore: write explicit reason: write explicit reason
|
|
20167
|
+
{ options, firstSelectedOptionIndex },
|
|
20168
|
+
({ options: options2 }) => ({
|
|
20169
|
+
searchValue: "",
|
|
20170
|
+
visibleOptions: options2,
|
|
20171
|
+
layerFocus: initialLayerFocus(options2, firstSelectedOptionIndex ?? 0),
|
|
20172
|
+
//also gets reset when layer opens (because options can change)
|
|
20173
|
+
triggerFocus: initialTriggerFocus,
|
|
20174
|
+
isLayerOpen: false
|
|
20175
|
+
})
|
|
20176
|
+
);
|
|
20177
|
+
return /* @__PURE__ */ jsx(Fragment$1, {});
|
|
20178
|
+
};
|
|
19615
20179
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
19616
20180
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
19617
20181
|
const standardizeOptions = (options, simple) => {
|
|
@@ -19726,10 +20290,78 @@ const Select = (props) => {
|
|
|
19726
20290
|
checkNonExistentValues
|
|
19727
20291
|
);
|
|
19728
20292
|
const canUseNative = !multi;
|
|
20293
|
+
const useNative = native && canUseNative;
|
|
19729
20294
|
if (native && !canUseNative) {
|
|
19730
20295
|
console.warn("Native select does not support provided props (see stories)");
|
|
19731
20296
|
}
|
|
19732
|
-
|
|
20297
|
+
const nonExistentWarning = "Value no longer available for re-selection";
|
|
20298
|
+
const fullWarning = hasNonExistentValue && !disabled2 ? warning2 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
20299
|
+
/* @__PURE__ */ jsx("div", { children: nonExistentWarning }),
|
|
20300
|
+
/* @__PURE__ */ jsx("div", { children: warning2 })
|
|
20301
|
+
] }) : nonExistentWarning : warning2;
|
|
20302
|
+
const fullError = hasNonExistentValue && error2 && !disabled2 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
20303
|
+
/* @__PURE__ */ jsx("div", { children: nonExistentWarning }),
|
|
20304
|
+
/* @__PURE__ */ jsx("div", { children: error2 })
|
|
20305
|
+
] }) : error2;
|
|
20306
|
+
const onChangeSelectedValue = (evt, selectedOptions2) => {
|
|
20307
|
+
if (deprecatedEventHandler) {
|
|
20308
|
+
const newSelectedOptions = multi ? selectedOptions2.map(
|
|
20309
|
+
(o) => simpleInputs ? o.value : o
|
|
20310
|
+
) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
20311
|
+
if (newSelectedOptions) {
|
|
20312
|
+
onChange(newSelectedOptions);
|
|
20313
|
+
}
|
|
20314
|
+
} else {
|
|
20315
|
+
const isSyntheticEvent = !(evt instanceof Event);
|
|
20316
|
+
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
20317
|
+
if (isSyntheticEvent) {
|
|
20318
|
+
evt.target.name = name2;
|
|
20319
|
+
evt.target.value = value;
|
|
20320
|
+
if (!multi) {
|
|
20321
|
+
evt.target.label = selectedOptions2.label;
|
|
20322
|
+
}
|
|
20323
|
+
onChange(evt);
|
|
20324
|
+
} else {
|
|
20325
|
+
const customEvent = {
|
|
20326
|
+
...evt,
|
|
20327
|
+
target: {
|
|
20328
|
+
...evt.target,
|
|
20329
|
+
name: name2,
|
|
20330
|
+
value,
|
|
20331
|
+
label: !multi ? selectedOptions2.label : void 0
|
|
20332
|
+
}
|
|
20333
|
+
};
|
|
20334
|
+
onChange(customEvent);
|
|
20335
|
+
}
|
|
20336
|
+
}
|
|
20337
|
+
};
|
|
20338
|
+
return useNative ? /* @__PURE__ */ jsx(
|
|
20339
|
+
NativeSelect,
|
|
20340
|
+
{
|
|
20341
|
+
...props,
|
|
20342
|
+
options,
|
|
20343
|
+
selectedOption: selectedOptions,
|
|
20344
|
+
onChange: onChangeSelectedValue,
|
|
20345
|
+
hasNonExistentValue,
|
|
20346
|
+
warning: fullWarning,
|
|
20347
|
+
error: fullError,
|
|
20348
|
+
testId
|
|
20349
|
+
}
|
|
20350
|
+
) : /* @__PURE__ */ jsx(
|
|
20351
|
+
CustomSelect,
|
|
20352
|
+
{
|
|
20353
|
+
...props,
|
|
20354
|
+
options,
|
|
20355
|
+
selectedOptions,
|
|
20356
|
+
onChange: onChangeSelectedValue,
|
|
20357
|
+
multi,
|
|
20358
|
+
firstSelectedOptionIndex,
|
|
20359
|
+
warning: fullWarning,
|
|
20360
|
+
error: fullError,
|
|
20361
|
+
testId,
|
|
20362
|
+
closeOnOptionActionClick
|
|
20363
|
+
}
|
|
20364
|
+
);
|
|
19733
20365
|
};
|
|
19734
20366
|
const selectedRowsPerPage = (options, value) => {
|
|
19735
20367
|
return value || options && options.reduce((acc, row2) => {
|
|
@@ -19765,7 +20397,7 @@ const validateSelectedPage = (selectedPage, numPages, errorMessageTemplate = "Se
|
|
|
19765
20397
|
return valid;
|
|
19766
20398
|
};
|
|
19767
20399
|
const paginationContainer = "_paginationContainer_1tmz4_1";
|
|
19768
|
-
const styles$
|
|
20400
|
+
const styles$l = {
|
|
19769
20401
|
paginationContainer
|
|
19770
20402
|
};
|
|
19771
20403
|
const Pagination = ({ pagination }) => {
|
|
@@ -19802,7 +20434,7 @@ const Pagination = ({ pagination }) => {
|
|
|
19802
20434
|
onSelectPage(Number(value));
|
|
19803
20435
|
}
|
|
19804
20436
|
};
|
|
19805
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
20437
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$l.paginationContainer, children: [
|
|
19806
20438
|
rowsPerPage && /* @__PURE__ */ jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx(
|
|
19807
20439
|
Select,
|
|
19808
20440
|
{
|
|
@@ -19887,7 +20519,7 @@ const Pagination = ({ pagination }) => {
|
|
|
19887
20519
|
const toggleBox = "_toggleBox_lhie5_1";
|
|
19888
20520
|
const fullWidthStyleFix = "_fullWidthStyleFix_lhie5_8";
|
|
19889
20521
|
const dismiss = "_dismiss_lhie5_13";
|
|
19890
|
-
const styles$
|
|
20522
|
+
const styles$k = {
|
|
19891
20523
|
toggleBox,
|
|
19892
20524
|
fullWidthStyleFix,
|
|
19893
20525
|
dismiss
|
|
@@ -19941,7 +20573,7 @@ const Popover = ({
|
|
|
19941
20573
|
/* @__PURE__ */ jsxs(
|
|
19942
20574
|
"div",
|
|
19943
20575
|
{
|
|
19944
|
-
className: fullWidth ? cx$2(styles$
|
|
20576
|
+
className: fullWidth ? cx$2(styles$k.toggleBox, styles$k.fullWidthStyleFix) : cx$2(styles$k.toggleBox),
|
|
19945
20577
|
...layerProps,
|
|
19946
20578
|
children: [
|
|
19947
20579
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -19949,7 +20581,7 @@ const Popover = ({
|
|
|
19949
20581
|
content2,
|
|
19950
20582
|
{ close: close2 }
|
|
19951
20583
|
) : content2,
|
|
19952
|
-
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$
|
|
20584
|
+
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$k.dismiss, children: /* @__PURE__ */ jsx(Button$1, { small: true, round: true, onClick: close2, icon: IconType.CLOSE }) })
|
|
19953
20585
|
] }),
|
|
19954
20586
|
/* @__PURE__ */ jsx(
|
|
19955
20587
|
Arrow,
|
|
@@ -19968,7 +20600,7 @@ const Popover = ({
|
|
|
19968
20600
|
] });
|
|
19969
20601
|
};
|
|
19970
20602
|
const printHeader = "_printHeader_o7xxx_1";
|
|
19971
|
-
const styles$
|
|
20603
|
+
const styles$j = {
|
|
19972
20604
|
printHeader
|
|
19973
20605
|
};
|
|
19974
20606
|
const PrintHeader = ({
|
|
@@ -19980,7 +20612,7 @@ const PrintHeader = ({
|
|
|
19980
20612
|
{
|
|
19981
20613
|
src: logo2,
|
|
19982
20614
|
alt,
|
|
19983
|
-
className: styles$
|
|
20615
|
+
className: styles$j.printHeader,
|
|
19984
20616
|
style: { width: logoWidth }
|
|
19985
20617
|
}
|
|
19986
20618
|
);
|
|
@@ -19994,7 +20626,7 @@ const orange = "_orange_23ror_30";
|
|
|
19994
20626
|
const yellow = "_yellow_23ror_33";
|
|
19995
20627
|
const green = "_green_23ror_36";
|
|
19996
20628
|
const label$3 = "_label_23ror_39";
|
|
19997
|
-
const styles$
|
|
20629
|
+
const styles$i = {
|
|
19998
20630
|
progress: progress$1,
|
|
19999
20631
|
inverted,
|
|
20000
20632
|
bar,
|
|
@@ -20007,11 +20639,11 @@ const styles$j = {
|
|
|
20007
20639
|
label: label$3
|
|
20008
20640
|
};
|
|
20009
20641
|
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$
|
|
20642
|
+
if (perct < 20) return styles$i.grey;
|
|
20643
|
+
if (perct < 40) return styles$i.red;
|
|
20644
|
+
if (perct < 60) return styles$i.orange;
|
|
20645
|
+
if (perct < 80) return styles$i.yellow;
|
|
20646
|
+
return styles$i.green;
|
|
20015
20647
|
};
|
|
20016
20648
|
const ProgressBar$1 = ({
|
|
20017
20649
|
width: width2 = "auto",
|
|
@@ -20024,21 +20656,21 @@ const ProgressBar$1 = ({
|
|
|
20024
20656
|
return /* @__PURE__ */ jsx("div", { style: { width: width2 }, "data-percent": percentage, children: /* @__PURE__ */ jsxs(
|
|
20025
20657
|
"div",
|
|
20026
20658
|
{
|
|
20027
|
-
className: cx$2(styles$
|
|
20659
|
+
className: cx$2(styles$i.progress, inverted2 ? styles$i.inverted : ""),
|
|
20028
20660
|
style: { width: width2 },
|
|
20029
20661
|
children: [
|
|
20030
20662
|
/* @__PURE__ */ jsx(
|
|
20031
20663
|
"div",
|
|
20032
20664
|
{
|
|
20033
20665
|
className: cx$2(
|
|
20034
|
-
styles$
|
|
20035
|
-
showProgressColors ? getColor(percentage) : colored2 ? styles$
|
|
20666
|
+
styles$i.bar,
|
|
20667
|
+
showProgressColors ? getColor(percentage) : colored2 ? styles$i.colored : ""
|
|
20036
20668
|
),
|
|
20037
20669
|
style: { width: `${percentage}%` },
|
|
20038
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
20670
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$i.label, children: !noLabel2 && `${percentage}%` })
|
|
20039
20671
|
}
|
|
20040
20672
|
),
|
|
20041
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
20673
|
+
/* @__PURE__ */ jsx("div", { className: styles$i.label, children: !noLabel2 && `${percentage}%` })
|
|
20042
20674
|
]
|
|
20043
20675
|
}
|
|
20044
20676
|
) });
|
|
@@ -20047,20 +20679,20 @@ const wrapper$1 = "_wrapper_1fbik_1";
|
|
|
20047
20679
|
const inline$1 = "_inline_1fbik_1";
|
|
20048
20680
|
const radio = "_radio_1fbik_5";
|
|
20049
20681
|
const labelMargin = "_labelMargin_1fbik_8";
|
|
20050
|
-
const small$
|
|
20682
|
+
const small$3 = "_small_1fbik_27";
|
|
20051
20683
|
const noMargin$1 = "_noMargin_1fbik_32";
|
|
20052
20684
|
const disabled$2 = "_disabled_1fbik_90";
|
|
20053
|
-
const isInTable
|
|
20685
|
+
const isInTable = "_isInTable_1fbik_106";
|
|
20054
20686
|
const helpIconEnabled$1 = "_helpIconEnabled_1fbik_111";
|
|
20055
|
-
const styles$
|
|
20687
|
+
const styles$h = {
|
|
20056
20688
|
wrapper: wrapper$1,
|
|
20057
20689
|
inline: inline$1,
|
|
20058
20690
|
radio,
|
|
20059
20691
|
labelMargin,
|
|
20060
|
-
small: small$
|
|
20692
|
+
small: small$3,
|
|
20061
20693
|
noMargin: noMargin$1,
|
|
20062
20694
|
disabled: disabled$2,
|
|
20063
|
-
isInTable
|
|
20695
|
+
isInTable,
|
|
20064
20696
|
helpIconEnabled: helpIconEnabled$1
|
|
20065
20697
|
};
|
|
20066
20698
|
const RadioInput = ({
|
|
@@ -20081,10 +20713,10 @@ const RadioInput = ({
|
|
|
20081
20713
|
"div",
|
|
20082
20714
|
{
|
|
20083
20715
|
className: cx$2(
|
|
20084
|
-
styles$
|
|
20085
|
-
disabled2 ? styles$
|
|
20086
|
-
small2 ? styles$
|
|
20087
|
-
noMargin2 ? styles$
|
|
20716
|
+
styles$h.radio,
|
|
20717
|
+
disabled2 ? styles$h.disabled : null,
|
|
20718
|
+
small2 ? styles$h.small : null,
|
|
20719
|
+
noMargin2 ? styles$h.noMargin : null
|
|
20088
20720
|
),
|
|
20089
20721
|
onClick: onChange,
|
|
20090
20722
|
"data-testid": testId,
|
|
@@ -20101,7 +20733,7 @@ const RadioInput = ({
|
|
|
20101
20733
|
}
|
|
20102
20734
|
),
|
|
20103
20735
|
/* @__PURE__ */ jsx("label", { "data-name": name2, "data-value": value, children: label2 }),
|
|
20104
|
-
showHelp && /* @__PURE__ */ jsx("div", { className: styles$
|
|
20736
|
+
showHelp && /* @__PURE__ */ jsx("div", { className: styles$h.helpIconEnabled, onClick: onClickHelp, children: /* @__PURE__ */ jsx(HelpIcon, { text: helpText }) })
|
|
20105
20737
|
]
|
|
20106
20738
|
}
|
|
20107
20739
|
);
|
|
@@ -20141,13 +20773,13 @@ const RadioButton = ({
|
|
|
20141
20773
|
"div",
|
|
20142
20774
|
{
|
|
20143
20775
|
className: cx$2(
|
|
20144
|
-
styles$
|
|
20145
|
-
inline2 ? styles$
|
|
20146
|
-
classForContainer === "inline fields" ? styles$
|
|
20776
|
+
styles$h.wrapper,
|
|
20777
|
+
inline2 ? styles$h.inline : null,
|
|
20778
|
+
classForContainer === "inline fields" ? styles$h.inline : null
|
|
20147
20779
|
//deprecated
|
|
20148
20780
|
),
|
|
20149
20781
|
children: [
|
|
20150
|
-
mainLabel && /* @__PURE__ */ jsx("label", { className: cx$2(inline2 && styles$
|
|
20782
|
+
mainLabel && /* @__PURE__ */ jsx("label", { className: cx$2(inline2 && styles$h.labelMargin), children: label2 }),
|
|
20151
20783
|
options.map(
|
|
20152
20784
|
(option2, index2) => {
|
|
20153
20785
|
const selected2 = option2.checked || option2.value === selectedValue || false;
|
|
@@ -50373,7 +51005,7 @@ var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
|
50373
51005
|
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(_extends$5);
|
|
50374
51006
|
const richTextToolbar = "_richTextToolbar_1gbkk_1";
|
|
50375
51007
|
const richTextToolbarContainer = "_richTextToolbarContainer_1gbkk_5";
|
|
50376
|
-
const styles$
|
|
51008
|
+
const styles$g = {
|
|
50377
51009
|
richTextToolbar,
|
|
50378
51010
|
richTextToolbarContainer
|
|
50379
51011
|
};
|
|
@@ -50425,8 +51057,8 @@ const RichTextToolbar = ({
|
|
|
50425
51057
|
active: active2.orderedList()
|
|
50426
51058
|
}
|
|
50427
51059
|
];
|
|
50428
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
50429
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
51060
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$g.richTextToolbarContainer, children: [
|
|
51061
|
+
/* @__PURE__ */ jsx("div", { className: styles$g.richTextToolbar, children: items.map((item2, index2) => /* @__PURE__ */ jsx(
|
|
50430
51062
|
Button$1,
|
|
50431
51063
|
{
|
|
50432
51064
|
small: true,
|
|
@@ -50446,22 +51078,22 @@ const RichTextToolbar = ({
|
|
|
50446
51078
|
toolbarComponent
|
|
50447
51079
|
] });
|
|
50448
51080
|
};
|
|
50449
|
-
const inputInTable$
|
|
50450
|
-
const inputHover$
|
|
50451
|
-
const inputFocus$
|
|
50452
|
-
const inputError$
|
|
50453
|
-
const inputWarning$
|
|
50454
|
-
const inputDisabled$
|
|
50455
|
-
const hideScrollbars$
|
|
51081
|
+
const inputInTable$4 = "_inputInTable_1fb4l_1";
|
|
51082
|
+
const inputHover$4 = "_inputHover_1fb4l_13";
|
|
51083
|
+
const inputFocus$4 = "_inputFocus_1fb4l_18";
|
|
51084
|
+
const inputError$4 = "_inputError_1fb4l_25";
|
|
51085
|
+
const inputWarning$4 = "_inputWarning_1fb4l_26";
|
|
51086
|
+
const inputDisabled$4 = "_inputDisabled_1fb4l_61";
|
|
51087
|
+
const hideScrollbars$4 = "_hideScrollbars_1fb4l_67";
|
|
50456
51088
|
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$
|
|
51089
|
+
const styles$f = {
|
|
51090
|
+
inputInTable: inputInTable$4,
|
|
51091
|
+
inputHover: inputHover$4,
|
|
51092
|
+
inputFocus: inputFocus$4,
|
|
51093
|
+
inputError: inputError$4,
|
|
51094
|
+
inputWarning: inputWarning$4,
|
|
51095
|
+
inputDisabled: inputDisabled$4,
|
|
51096
|
+
hideScrollbars: hideScrollbars$4,
|
|
50465
51097
|
richTextInput
|
|
50466
51098
|
};
|
|
50467
51099
|
const RichTextInput = forwardRef(
|
|
@@ -50490,7 +51122,7 @@ const RichTextInput = forwardRef(
|
|
|
50490
51122
|
}
|
|
50491
51123
|
setState(state2);
|
|
50492
51124
|
};
|
|
50493
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
51125
|
+
return /* @__PURE__ */ jsx("div", { className: styles$f.richTextInput, children: /* @__PURE__ */ jsxs(
|
|
50494
51126
|
Remirror,
|
|
50495
51127
|
{
|
|
50496
51128
|
manager,
|
|
@@ -50512,164 +51144,6 @@ const RichTextInput = forwardRef(
|
|
|
50512
51144
|
) });
|
|
50513
51145
|
}
|
|
50514
51146
|
);
|
|
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
51147
|
const row = "_row_n16je_1";
|
|
50674
51148
|
const styles$e = {
|
|
50675
51149
|
row
|
|
@@ -53800,192 +54274,6 @@ const roundNumberCosmetic = (value) => {
|
|
|
53800
54274
|
roundToPrecision(toNum(value), COSMETIC_ROUNDING_DEFAULT_PRECISION)
|
|
53801
54275
|
) : value;
|
|
53802
54276
|
};
|
|
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
54277
|
const getStringName$1 = (name2) => {
|
|
53990
54278
|
if (!name2) return "";
|
|
53991
54279
|
if (typeof name2 === "string") {
|
|
@@ -69283,27 +69571,6 @@ const SmartUploadModal = ({
|
|
|
69283
69571
|
}
|
|
69284
69572
|
) });
|
|
69285
69573
|
};
|
|
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
69574
|
export {
|
|
69308
69575
|
Accordion,
|
|
69309
69576
|
AccordionWithDefaultToggle,
|