@oliasoft-open-source/react-ui-library 4.15.1-beta-2 → 4.15.1-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/index.js +241 -241
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19768,6 +19768,182 @@ const NativeSelect = ({
|
|
|
19768
19768
|
}
|
|
19769
19769
|
);
|
|
19770
19770
|
};
|
|
19771
|
+
var reactKeyboardEventHandler = { exports: {} };
|
|
19772
|
+
(function(module, exports) {
|
|
19773
|
+
!function(e2, t) {
|
|
19774
|
+
module.exports = t(React__default, PropTypes__default);
|
|
19775
|
+
}(window, function(e2, t) {
|
|
19776
|
+
return function(e3) {
|
|
19777
|
+
var t2 = {};
|
|
19778
|
+
function n2(r2) {
|
|
19779
|
+
if (t2[r2]) return t2[r2].exports;
|
|
19780
|
+
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
19781
|
+
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
19782
|
+
}
|
|
19783
|
+
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
19784
|
+
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
19785
|
+
}, n2.r = function(e4) {
|
|
19786
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
19787
|
+
}, n2.t = function(e4, t3) {
|
|
19788
|
+
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
19789
|
+
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
19790
|
+
var r2 = /* @__PURE__ */ Object.create(null);
|
|
19791
|
+
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) {
|
|
19792
|
+
return e4[t4];
|
|
19793
|
+
}).bind(null, o));
|
|
19794
|
+
return r2;
|
|
19795
|
+
}, n2.n = function(e4) {
|
|
19796
|
+
var t3 = e4 && e4.__esModule ? function() {
|
|
19797
|
+
return e4.default;
|
|
19798
|
+
} : function() {
|
|
19799
|
+
return e4;
|
|
19800
|
+
};
|
|
19801
|
+
return n2.d(t3, "a", t3), t3;
|
|
19802
|
+
}, n2.o = function(e4, t3) {
|
|
19803
|
+
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
19804
|
+
}, n2.p = "", n2(n2.s = 0);
|
|
19805
|
+
}([function(e3, t2, n2) {
|
|
19806
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
19807
|
+
var r2 = n2(1);
|
|
19808
|
+
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
19809
|
+
return function(e4) {
|
|
19810
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
19811
|
+
}(r2).default;
|
|
19812
|
+
} }), e3.exports = t2.default;
|
|
19813
|
+
}, function(e3, t2, n2) {
|
|
19814
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
19815
|
+
var r2 = Object.assign || function(e4) {
|
|
19816
|
+
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
19817
|
+
var n3 = arguments[t3];
|
|
19818
|
+
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
19819
|
+
}
|
|
19820
|
+
return e4;
|
|
19821
|
+
}, o = /* @__PURE__ */ function() {
|
|
19822
|
+
function e4(e5, t3) {
|
|
19823
|
+
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
19824
|
+
var r3 = t3[n3];
|
|
19825
|
+
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
19826
|
+
}
|
|
19827
|
+
}
|
|
19828
|
+
return function(t3, n3, r3) {
|
|
19829
|
+
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
19830
|
+
};
|
|
19831
|
+
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
19832
|
+
function l(e4) {
|
|
19833
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
19834
|
+
}
|
|
19835
|
+
var s = [], c2 = function(e4) {
|
|
19836
|
+
function t3(e5) {
|
|
19837
|
+
!function(e6, t4) {
|
|
19838
|
+
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
19839
|
+
}(this, t3);
|
|
19840
|
+
var n3 = function(e6, t4) {
|
|
19841
|
+
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19842
|
+
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
19843
|
+
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
19844
|
+
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
19845
|
+
}
|
|
19846
|
+
return function(e5, t4) {
|
|
19847
|
+
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
19848
|
+
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);
|
|
19849
|
+
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
19850
|
+
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
19851
|
+
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
19852
|
+
t4 && !n3 && this.registerExclusiveHandler();
|
|
19853
|
+
} }, { key: "componentWillUnmount", value: function() {
|
|
19854
|
+
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
19855
|
+
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
19856
|
+
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
19857
|
+
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
19858
|
+
} }, { key: "registerExclusiveHandler", value: function() {
|
|
19859
|
+
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
19860
|
+
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
19861
|
+
var e5 = this;
|
|
19862
|
+
s.includes(this) && (s = s.filter(function(t4) {
|
|
19863
|
+
return t4 !== e5;
|
|
19864
|
+
}));
|
|
19865
|
+
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
19866
|
+
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
19867
|
+
if (n3) return false;
|
|
19868
|
+
if (!(i2 === e5.type)) return false;
|
|
19869
|
+
if (s.length > 0 && s[0] !== this) return false;
|
|
19870
|
+
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
19871
|
+
if (!(u2 ? d2 : c3)) return false;
|
|
19872
|
+
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
19873
|
+
return !!f2 && (o2(f2, e5), true);
|
|
19874
|
+
} }, { key: "render", value: function() {
|
|
19875
|
+
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
19876
|
+
try {
|
|
19877
|
+
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
19878
|
+
delete o2[s2.value];
|
|
19879
|
+
}
|
|
19880
|
+
} catch (e6) {
|
|
19881
|
+
a3 = true, l2 = e6;
|
|
19882
|
+
} finally {
|
|
19883
|
+
try {
|
|
19884
|
+
!u2 && c3.return && c3.return();
|
|
19885
|
+
} finally {
|
|
19886
|
+
if (a3) throw l2;
|
|
19887
|
+
}
|
|
19888
|
+
}
|
|
19889
|
+
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
19890
|
+
e5.childrenContainer = t4;
|
|
19891
|
+
} }, o2), n3) : null;
|
|
19892
|
+
} }]), t3;
|
|
19893
|
+
}();
|
|
19894
|
+
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() {
|
|
19895
|
+
return null;
|
|
19896
|
+
} }, e3.exports = t2.default;
|
|
19897
|
+
}, function(t2, n2) {
|
|
19898
|
+
t2.exports = e2;
|
|
19899
|
+
}, function(e3, n2) {
|
|
19900
|
+
e3.exports = t;
|
|
19901
|
+
}, function(e3, t2, n2) {
|
|
19902
|
+
function r2(e4, t3, n3) {
|
|
19903
|
+
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
19904
|
+
}
|
|
19905
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
19906
|
+
var n3 = t3.map(function(e5) {
|
|
19907
|
+
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
19908
|
+
return n4 || [e5];
|
|
19909
|
+
}).reduce(function(e5, t4) {
|
|
19910
|
+
return e5.concat(t4);
|
|
19911
|
+
}, []).find(function(t4) {
|
|
19912
|
+
return p(e4, t4);
|
|
19913
|
+
});
|
|
19914
|
+
!n3 && t3.includes("all") && (n3 = "other");
|
|
19915
|
+
return n3;
|
|
19916
|
+
};
|
|
19917
|
+
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) {
|
|
19918
|
+
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
19919
|
+
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
19920
|
+
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
19921
|
+
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
19922
|
+
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
19923
|
+
}, {}), 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) {
|
|
19924
|
+
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
19925
|
+
}, {}), 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) };
|
|
19926
|
+
function p(e4, t3) {
|
|
19927
|
+
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
19928
|
+
return e4[t4 + "Key"];
|
|
19929
|
+
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
19930
|
+
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
19931
|
+
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
19932
|
+
if (d3.length > 0 && o2.length > 0) {
|
|
19933
|
+
var f3 = d3.map(function(e5) {
|
|
19934
|
+
return s[e5];
|
|
19935
|
+
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
19936
|
+
return o2[t4] === e5;
|
|
19937
|
+
});
|
|
19938
|
+
return l2.indexOf(n3) >= 0 && p2;
|
|
19939
|
+
}
|
|
19940
|
+
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
19941
|
+
}
|
|
19942
|
+
}]);
|
|
19943
|
+
});
|
|
19944
|
+
})(reactKeyboardEventHandler);
|
|
19945
|
+
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
19946
|
+
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
19771
19947
|
const useFocus = () => {
|
|
19772
19948
|
const ref2 = useRef(null);
|
|
19773
19949
|
const setFocus = () => {
|
|
@@ -20753,7 +20929,7 @@ const Trigger = ({
|
|
|
20753
20929
|
order2
|
|
20754
20930
|
),
|
|
20755
20931
|
onClick: (evt) => {
|
|
20756
|
-
|
|
20932
|
+
console.log("TRIGGER ONCLICK");
|
|
20757
20933
|
if (typeof setInputFocus === "function") {
|
|
20758
20934
|
setInputFocus();
|
|
20759
20935
|
}
|
|
@@ -21295,64 +21471,71 @@ const CustomSelect = (props) => {
|
|
|
21295
21471
|
createAble,
|
|
21296
21472
|
listRef
|
|
21297
21473
|
});
|
|
21298
|
-
return /* @__PURE__ */
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21474
|
+
return /* @__PURE__ */ jsx("div", { style: { width: getTriggerWidth() }, children: /* @__PURE__ */ jsxs(
|
|
21475
|
+
KeyboardEventHandler,
|
|
21476
|
+
{
|
|
21477
|
+
handleKeys: Object.values(EventKey),
|
|
21478
|
+
onKeyEvent,
|
|
21479
|
+
children: [
|
|
21480
|
+
/* @__PURE__ */ jsx(
|
|
21481
|
+
Trigger,
|
|
21482
|
+
{
|
|
21483
|
+
selectedOptions,
|
|
21484
|
+
searchValue: state.searchValue,
|
|
21485
|
+
isOpen: state.isLayerOpen,
|
|
21486
|
+
focusedSelectedOptionIndex: state.triggerFocus.currentOption,
|
|
21487
|
+
clearAllIsFocused,
|
|
21488
|
+
searchable,
|
|
21489
|
+
triggerRef: mergeRefs(triggerRef, triggerProps.ref),
|
|
21490
|
+
error: error2,
|
|
21491
|
+
warning: warning2,
|
|
21492
|
+
tooltip: tooltip2,
|
|
21493
|
+
small: small2,
|
|
21494
|
+
isInTable: isInTable2,
|
|
21495
|
+
disabled: disabled2 || disabledContext,
|
|
21496
|
+
clearable,
|
|
21497
|
+
tabIndex,
|
|
21498
|
+
onClickTrigger,
|
|
21499
|
+
onChangeSearch,
|
|
21500
|
+
onClickDeselect: onClickDeselectOption,
|
|
21501
|
+
onClickClear: onClickClearAll,
|
|
21502
|
+
onFocus,
|
|
21503
|
+
onBlur,
|
|
21504
|
+
groupOrder,
|
|
21505
|
+
maxTooltipWidth,
|
|
21506
|
+
placeholder: placeholder3,
|
|
21507
|
+
right: right2,
|
|
21508
|
+
testId
|
|
21509
|
+
}
|
|
21510
|
+
),
|
|
21511
|
+
state.isLayerOpen && renderLayer(
|
|
21512
|
+
/* @__PURE__ */ jsx("div", { ...layerProps, className: styles$n.layerContainer, children: /* @__PURE__ */ jsx(
|
|
21513
|
+
Layer,
|
|
21514
|
+
{
|
|
21515
|
+
listRef,
|
|
21516
|
+
isMulti: isMulti2,
|
|
21517
|
+
sections: state.visibleOptions,
|
|
21518
|
+
selectedOptions,
|
|
21519
|
+
onSelectOption: (evt, option2) => {
|
|
21520
|
+
const close2 = !isMulti2 ? closeLayer : void 0;
|
|
21521
|
+
onSelectOption(evt, option2, close2);
|
|
21522
|
+
},
|
|
21523
|
+
closeLayer: () => {
|
|
21524
|
+
if (closeOnOptionActionClick) {
|
|
21525
|
+
closeLayer();
|
|
21526
|
+
}
|
|
21527
|
+
},
|
|
21528
|
+
width: getLayerWidth(triggerBounds),
|
|
21529
|
+
small: small2,
|
|
21530
|
+
focusedOptionIndex: state.layerFocus.current,
|
|
21531
|
+
firstSelectedOptionIndex: firstSelectedOptionIndex ?? 0,
|
|
21532
|
+
testId: testId && `${testId}-layer`
|
|
21345
21533
|
}
|
|
21346
|
-
}
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
testId: testId && `${testId}-layer`
|
|
21352
|
-
}
|
|
21353
|
-
) })
|
|
21354
|
-
)
|
|
21355
|
-
] });
|
|
21534
|
+
) })
|
|
21535
|
+
)
|
|
21536
|
+
]
|
|
21537
|
+
}
|
|
21538
|
+
) });
|
|
21356
21539
|
};
|
|
21357
21540
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
21358
21541
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
@@ -21482,31 +21665,24 @@ const Select = (props) => {
|
|
|
21482
21665
|
/* @__PURE__ */ jsx("div", { children: error2 })
|
|
21483
21666
|
] }) : error2;
|
|
21484
21667
|
const onChangeSelectedValue = (evt, selectedOptions2) => {
|
|
21485
|
-
console.log(1);
|
|
21486
21668
|
if (deprecatedEventHandler) {
|
|
21487
|
-
console.log(2);
|
|
21488
21669
|
const newSelectedOptions = multi ? selectedOptions2.map(
|
|
21489
21670
|
(o) => simpleInputs ? o.value : o
|
|
21490
21671
|
) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
21491
21672
|
if (newSelectedOptions) {
|
|
21492
|
-
console.log(3);
|
|
21493
21673
|
onChange(newSelectedOptions);
|
|
21494
21674
|
}
|
|
21495
21675
|
} else {
|
|
21496
|
-
console.log(4);
|
|
21497
21676
|
const isSyntheticEvent = !(evt instanceof Event);
|
|
21498
21677
|
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
21499
21678
|
if (isSyntheticEvent) {
|
|
21500
|
-
console.log(5);
|
|
21501
21679
|
evt.target.name = name2;
|
|
21502
21680
|
evt.target.value = value;
|
|
21503
21681
|
if (!multi) {
|
|
21504
21682
|
evt.target.label = selectedOptions2.label;
|
|
21505
|
-
console.log(6);
|
|
21506
21683
|
}
|
|
21507
21684
|
onChange(evt);
|
|
21508
21685
|
} else {
|
|
21509
|
-
console.log(7);
|
|
21510
21686
|
const customEvent = {
|
|
21511
21687
|
...evt,
|
|
21512
21688
|
target: {
|
|
@@ -55459,182 +55635,6 @@ const roundNumberCosmetic = (value) => {
|
|
|
55459
55635
|
roundToPrecision(toNum(value), COSMETIC_ROUNDING_DEFAULT_PRECISION)
|
|
55460
55636
|
) : value;
|
|
55461
55637
|
};
|
|
55462
|
-
var reactKeyboardEventHandler = { exports: {} };
|
|
55463
|
-
(function(module, exports) {
|
|
55464
|
-
!function(e2, t) {
|
|
55465
|
-
module.exports = t(React__default, PropTypes__default);
|
|
55466
|
-
}(window, function(e2, t) {
|
|
55467
|
-
return function(e3) {
|
|
55468
|
-
var t2 = {};
|
|
55469
|
-
function n2(r2) {
|
|
55470
|
-
if (t2[r2]) return t2[r2].exports;
|
|
55471
|
-
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
55472
|
-
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
55473
|
-
}
|
|
55474
|
-
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
55475
|
-
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
55476
|
-
}, n2.r = function(e4) {
|
|
55477
|
-
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
55478
|
-
}, n2.t = function(e4, t3) {
|
|
55479
|
-
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
55480
|
-
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
55481
|
-
var r2 = /* @__PURE__ */ Object.create(null);
|
|
55482
|
-
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) {
|
|
55483
|
-
return e4[t4];
|
|
55484
|
-
}).bind(null, o));
|
|
55485
|
-
return r2;
|
|
55486
|
-
}, n2.n = function(e4) {
|
|
55487
|
-
var t3 = e4 && e4.__esModule ? function() {
|
|
55488
|
-
return e4.default;
|
|
55489
|
-
} : function() {
|
|
55490
|
-
return e4;
|
|
55491
|
-
};
|
|
55492
|
-
return n2.d(t3, "a", t3), t3;
|
|
55493
|
-
}, n2.o = function(e4, t3) {
|
|
55494
|
-
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
55495
|
-
}, n2.p = "", n2(n2.s = 0);
|
|
55496
|
-
}([function(e3, t2, n2) {
|
|
55497
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
55498
|
-
var r2 = n2(1);
|
|
55499
|
-
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
55500
|
-
return function(e4) {
|
|
55501
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
55502
|
-
}(r2).default;
|
|
55503
|
-
} }), e3.exports = t2.default;
|
|
55504
|
-
}, function(e3, t2, n2) {
|
|
55505
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
55506
|
-
var r2 = Object.assign || function(e4) {
|
|
55507
|
-
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
55508
|
-
var n3 = arguments[t3];
|
|
55509
|
-
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
55510
|
-
}
|
|
55511
|
-
return e4;
|
|
55512
|
-
}, o = /* @__PURE__ */ function() {
|
|
55513
|
-
function e4(e5, t3) {
|
|
55514
|
-
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
55515
|
-
var r3 = t3[n3];
|
|
55516
|
-
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
55517
|
-
}
|
|
55518
|
-
}
|
|
55519
|
-
return function(t3, n3, r3) {
|
|
55520
|
-
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
55521
|
-
};
|
|
55522
|
-
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
55523
|
-
function l(e4) {
|
|
55524
|
-
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
55525
|
-
}
|
|
55526
|
-
var s = [], c2 = function(e4) {
|
|
55527
|
-
function t3(e5) {
|
|
55528
|
-
!function(e6, t4) {
|
|
55529
|
-
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
55530
|
-
}(this, t3);
|
|
55531
|
-
var n3 = function(e6, t4) {
|
|
55532
|
-
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
55533
|
-
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
55534
|
-
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
55535
|
-
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
55536
|
-
}
|
|
55537
|
-
return function(e5, t4) {
|
|
55538
|
-
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
55539
|
-
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);
|
|
55540
|
-
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
55541
|
-
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
55542
|
-
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
55543
|
-
t4 && !n3 && this.registerExclusiveHandler();
|
|
55544
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
55545
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
55546
|
-
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
55547
|
-
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
55548
|
-
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
55549
|
-
} }, { key: "registerExclusiveHandler", value: function() {
|
|
55550
|
-
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
55551
|
-
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
55552
|
-
var e5 = this;
|
|
55553
|
-
s.includes(this) && (s = s.filter(function(t4) {
|
|
55554
|
-
return t4 !== e5;
|
|
55555
|
-
}));
|
|
55556
|
-
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
55557
|
-
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
55558
|
-
if (n3) return false;
|
|
55559
|
-
if (!(i2 === e5.type)) return false;
|
|
55560
|
-
if (s.length > 0 && s[0] !== this) return false;
|
|
55561
|
-
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
55562
|
-
if (!(u2 ? d2 : c3)) return false;
|
|
55563
|
-
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
55564
|
-
return !!f2 && (o2(f2, e5), true);
|
|
55565
|
-
} }, { key: "render", value: function() {
|
|
55566
|
-
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
55567
|
-
try {
|
|
55568
|
-
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
55569
|
-
delete o2[s2.value];
|
|
55570
|
-
}
|
|
55571
|
-
} catch (e6) {
|
|
55572
|
-
a3 = true, l2 = e6;
|
|
55573
|
-
} finally {
|
|
55574
|
-
try {
|
|
55575
|
-
!u2 && c3.return && c3.return();
|
|
55576
|
-
} finally {
|
|
55577
|
-
if (a3) throw l2;
|
|
55578
|
-
}
|
|
55579
|
-
}
|
|
55580
|
-
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
55581
|
-
e5.childrenContainer = t4;
|
|
55582
|
-
} }, o2), n3) : null;
|
|
55583
|
-
} }]), t3;
|
|
55584
|
-
}();
|
|
55585
|
-
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() {
|
|
55586
|
-
return null;
|
|
55587
|
-
} }, e3.exports = t2.default;
|
|
55588
|
-
}, function(t2, n2) {
|
|
55589
|
-
t2.exports = e2;
|
|
55590
|
-
}, function(e3, n2) {
|
|
55591
|
-
e3.exports = t;
|
|
55592
|
-
}, function(e3, t2, n2) {
|
|
55593
|
-
function r2(e4, t3, n3) {
|
|
55594
|
-
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
55595
|
-
}
|
|
55596
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
55597
|
-
var n3 = t3.map(function(e5) {
|
|
55598
|
-
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
55599
|
-
return n4 || [e5];
|
|
55600
|
-
}).reduce(function(e5, t4) {
|
|
55601
|
-
return e5.concat(t4);
|
|
55602
|
-
}, []).find(function(t4) {
|
|
55603
|
-
return p(e4, t4);
|
|
55604
|
-
});
|
|
55605
|
-
!n3 && t3.includes("all") && (n3 = "other");
|
|
55606
|
-
return n3;
|
|
55607
|
-
};
|
|
55608
|
-
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) {
|
|
55609
|
-
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
55610
|
-
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
55611
|
-
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
55612
|
-
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
55613
|
-
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
55614
|
-
}, {}), 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) {
|
|
55615
|
-
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
55616
|
-
}, {}), 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) };
|
|
55617
|
-
function p(e4, t3) {
|
|
55618
|
-
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
55619
|
-
return e4[t4 + "Key"];
|
|
55620
|
-
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
55621
|
-
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
55622
|
-
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
55623
|
-
if (d3.length > 0 && o2.length > 0) {
|
|
55624
|
-
var f3 = d3.map(function(e5) {
|
|
55625
|
-
return s[e5];
|
|
55626
|
-
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
55627
|
-
return o2[t4] === e5;
|
|
55628
|
-
});
|
|
55629
|
-
return l2.indexOf(n3) >= 0 && p2;
|
|
55630
|
-
}
|
|
55631
|
-
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
55632
|
-
}
|
|
55633
|
-
}]);
|
|
55634
|
-
});
|
|
55635
|
-
})(reactKeyboardEventHandler);
|
|
55636
|
-
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
55637
|
-
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
55638
55638
|
const getStringName$1 = (name2) => {
|
|
55639
55639
|
if (!name2) return "";
|
|
55640
55640
|
if (typeof name2 === "string") {
|