@oliasoft-open-source/react-ui-library 4.15.0-beta-8 → 4.15.1-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -11
- package/dist/index.js +240 -276
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1190,15 +1190,6 @@ declare interface ISelectSelectedOption {
|
|
|
1190
1190
|
testId?: string;
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
-
export declare interface ISettingFieldProps {
|
|
1194
|
-
helpText: string;
|
|
1195
|
-
children: ReactNode;
|
|
1196
|
-
active?: boolean;
|
|
1197
|
-
isLastField?: boolean;
|
|
1198
|
-
selectedOption: 'all_users' | 'superusers_admin';
|
|
1199
|
-
handleSelectChange: (value: 'all_users' | 'superusers_admin') => void;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
1193
|
export declare interface ISideBarProps {
|
|
1203
1194
|
options: {
|
|
1204
1195
|
title: string;
|
|
@@ -1707,8 +1698,6 @@ export declare const Row: ({ alignItems, justifyContent, children, flex, height,
|
|
|
1707
1698
|
|
|
1708
1699
|
export declare const Select: (props: ISelectProps) => JSX_2.Element;
|
|
1709
1700
|
|
|
1710
|
-
export declare const SettingField: ({ helpText, active, children, isLastField, selectedOption, handleSelectChange, }: ISettingFieldProps) => JSX_2.Element;
|
|
1711
|
-
|
|
1712
1701
|
export declare const SideBar: default_2.MemoExoticComponent<({ options, startOpen, onShiftClickToggleOpen, top, }: ISideBarProps) => JSX_2.Element>;
|
|
1713
1702
|
|
|
1714
1703
|
export declare const Slider: ({ name, label, width, labelWidth, value, min, max, step, marks, showArrows, showTooltip, tooltipFormatter, disabled, range, small, vertical, onChange, }: ISliderProps) => JSX_2.Element;
|
package/dist/index.js
CHANGED
|
@@ -19768,182 +19768,6 @@ 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);
|
|
19947
19771
|
const useFocus = () => {
|
|
19948
19772
|
const ref2 = useRef(null);
|
|
19949
19773
|
const setFocus = () => {
|
|
@@ -21471,71 +21295,64 @@ const CustomSelect = (props) => {
|
|
|
21471
21295
|
createAble,
|
|
21472
21296
|
listRef
|
|
21473
21297
|
});
|
|
21474
|
-
return /* @__PURE__ */
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21478
|
-
|
|
21479
|
-
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
|
|
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`
|
|
21298
|
+
return /* @__PURE__ */ jsxs("div", { style: { width: getTriggerWidth() }, children: [
|
|
21299
|
+
/* @__PURE__ */ jsx(
|
|
21300
|
+
Trigger,
|
|
21301
|
+
{
|
|
21302
|
+
selectedOptions,
|
|
21303
|
+
searchValue: state.searchValue,
|
|
21304
|
+
isOpen: state.isLayerOpen,
|
|
21305
|
+
focusedSelectedOptionIndex: state.triggerFocus.currentOption,
|
|
21306
|
+
clearAllIsFocused,
|
|
21307
|
+
searchable,
|
|
21308
|
+
triggerRef: mergeRefs(triggerRef, triggerProps.ref),
|
|
21309
|
+
error: error2,
|
|
21310
|
+
warning: warning2,
|
|
21311
|
+
tooltip: tooltip2,
|
|
21312
|
+
small: small2,
|
|
21313
|
+
isInTable: isInTable2,
|
|
21314
|
+
disabled: disabled2 || disabledContext,
|
|
21315
|
+
clearable,
|
|
21316
|
+
tabIndex,
|
|
21317
|
+
onClickTrigger,
|
|
21318
|
+
onChangeSearch,
|
|
21319
|
+
onClickDeselect: onClickDeselectOption,
|
|
21320
|
+
onClickClear: onClickClearAll,
|
|
21321
|
+
onFocus,
|
|
21322
|
+
onBlur,
|
|
21323
|
+
groupOrder,
|
|
21324
|
+
maxTooltipWidth,
|
|
21325
|
+
placeholder: placeholder3,
|
|
21326
|
+
right: right2,
|
|
21327
|
+
testId
|
|
21328
|
+
}
|
|
21329
|
+
),
|
|
21330
|
+
state.isLayerOpen && renderLayer(
|
|
21331
|
+
/* @__PURE__ */ jsx("div", { ...layerProps, className: styles$n.layerContainer, children: /* @__PURE__ */ jsx(
|
|
21332
|
+
Layer,
|
|
21333
|
+
{
|
|
21334
|
+
listRef,
|
|
21335
|
+
isMulti: isMulti2,
|
|
21336
|
+
sections: state.visibleOptions,
|
|
21337
|
+
selectedOptions,
|
|
21338
|
+
onSelectOption: (evt, option2) => {
|
|
21339
|
+
const close2 = !isMulti2 ? closeLayer : void 0;
|
|
21340
|
+
onSelectOption(evt, option2, close2);
|
|
21341
|
+
},
|
|
21342
|
+
closeLayer: () => {
|
|
21343
|
+
if (closeOnOptionActionClick) {
|
|
21344
|
+
closeLayer();
|
|
21533
21345
|
}
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
|
|
21538
|
-
|
|
21346
|
+
},
|
|
21347
|
+
width: getLayerWidth(triggerBounds),
|
|
21348
|
+
small: small2,
|
|
21349
|
+
focusedOptionIndex: state.layerFocus.current,
|
|
21350
|
+
firstSelectedOptionIndex: firstSelectedOptionIndex ?? 0,
|
|
21351
|
+
testId: testId && `${testId}-layer`
|
|
21352
|
+
}
|
|
21353
|
+
) })
|
|
21354
|
+
)
|
|
21355
|
+
] });
|
|
21539
21356
|
};
|
|
21540
21357
|
const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
|
|
21541
21358
|
const isMulti = (selectedOptions) => selectedOptions instanceof Array;
|
|
@@ -21665,24 +21482,31 @@ const Select = (props) => {
|
|
|
21665
21482
|
/* @__PURE__ */ jsx("div", { children: error2 })
|
|
21666
21483
|
] }) : error2;
|
|
21667
21484
|
const onChangeSelectedValue = (evt, selectedOptions2) => {
|
|
21485
|
+
console.log(1);
|
|
21668
21486
|
if (deprecatedEventHandler) {
|
|
21487
|
+
console.log(2);
|
|
21669
21488
|
const newSelectedOptions = multi ? selectedOptions2.map(
|
|
21670
21489
|
(o) => simpleInputs ? o.value : o
|
|
21671
21490
|
) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
21672
21491
|
if (newSelectedOptions) {
|
|
21492
|
+
console.log(3);
|
|
21673
21493
|
onChange(newSelectedOptions);
|
|
21674
21494
|
}
|
|
21675
21495
|
} else {
|
|
21496
|
+
console.log(4);
|
|
21676
21497
|
const isSyntheticEvent = !(evt instanceof Event);
|
|
21677
21498
|
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
21678
21499
|
if (isSyntheticEvent) {
|
|
21500
|
+
console.log(5);
|
|
21679
21501
|
evt.target.name = name2;
|
|
21680
21502
|
evt.target.value = value;
|
|
21681
21503
|
if (!multi) {
|
|
21682
21504
|
evt.target.label = selectedOptions2.label;
|
|
21505
|
+
console.log(6);
|
|
21683
21506
|
}
|
|
21684
21507
|
onChange(evt);
|
|
21685
21508
|
} else {
|
|
21509
|
+
console.log(7);
|
|
21686
21510
|
const customEvent = {
|
|
21687
21511
|
...evt,
|
|
21688
21512
|
target: {
|
|
@@ -55635,6 +55459,182 @@ const roundNumberCosmetic = (value) => {
|
|
|
55635
55459
|
roundToPrecision(toNum(value), COSMETIC_ROUNDING_DEFAULT_PRECISION)
|
|
55636
55460
|
) : value;
|
|
55637
55461
|
};
|
|
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") {
|
|
@@ -70952,41 +70952,6 @@ const SmartUploadModal = ({
|
|
|
70952
70952
|
}
|
|
70953
70953
|
) });
|
|
70954
70954
|
};
|
|
70955
|
-
const SettingField = ({
|
|
70956
|
-
helpText,
|
|
70957
|
-
active: active2 = true,
|
|
70958
|
-
children,
|
|
70959
|
-
isLastField = false,
|
|
70960
|
-
selectedOption,
|
|
70961
|
-
handleSelectChange
|
|
70962
|
-
}) => {
|
|
70963
|
-
const options = [
|
|
70964
|
-
{ label: "All users", value: "all_users" },
|
|
70965
|
-
{ label: "Superusers and Admin only", value: "superusers_admin" }
|
|
70966
|
-
];
|
|
70967
|
-
const onSelectChange = (event) => {
|
|
70968
|
-
handleSelectChange(event.target.value);
|
|
70969
|
-
};
|
|
70970
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
70971
|
-
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
|
|
70972
|
-
children,
|
|
70973
|
-
/* @__PURE__ */ jsx(
|
|
70974
|
-
Select,
|
|
70975
|
-
{
|
|
70976
|
-
name: "userType",
|
|
70977
|
-
options,
|
|
70978
|
-
value: selectedOption,
|
|
70979
|
-
disabled: !active2,
|
|
70980
|
-
onChange: onSelectChange,
|
|
70981
|
-
"aria-label": "Select user type",
|
|
70982
|
-
width: "auto"
|
|
70983
|
-
}
|
|
70984
|
-
)
|
|
70985
|
-
] }),
|
|
70986
|
-
/* @__PURE__ */ jsx(Text, { muted: true, children: helpText }),
|
|
70987
|
-
!isLastField && /* @__PURE__ */ jsx(Divider, {})
|
|
70988
|
-
] });
|
|
70989
|
-
};
|
|
70990
70955
|
export {
|
|
70991
70956
|
Accordion,
|
|
70992
70957
|
AccordionWithDefaultToggle,
|
|
@@ -71050,7 +71015,6 @@ export {
|
|
|
71050
71015
|
RichTextInput,
|
|
71051
71016
|
Row$1 as Row,
|
|
71052
71017
|
Select,
|
|
71053
|
-
SettingField,
|
|
71054
71018
|
SideBar,
|
|
71055
71019
|
Slider,
|
|
71056
71020
|
SmartUploadModal,
|