@oliasoft-open-source/react-ui-library 4.15.0-beta-8 → 4.15.1-beta-1
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 +233 -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;
|
|
@@ -55635,6 +55452,182 @@ const roundNumberCosmetic = (value) => {
|
|
|
55635
55452
|
roundToPrecision(toNum(value), COSMETIC_ROUNDING_DEFAULT_PRECISION)
|
|
55636
55453
|
) : value;
|
|
55637
55454
|
};
|
|
55455
|
+
var reactKeyboardEventHandler = { exports: {} };
|
|
55456
|
+
(function(module, exports) {
|
|
55457
|
+
!function(e2, t) {
|
|
55458
|
+
module.exports = t(React__default, PropTypes__default);
|
|
55459
|
+
}(window, function(e2, t) {
|
|
55460
|
+
return function(e3) {
|
|
55461
|
+
var t2 = {};
|
|
55462
|
+
function n2(r2) {
|
|
55463
|
+
if (t2[r2]) return t2[r2].exports;
|
|
55464
|
+
var o = t2[r2] = { i: r2, l: false, exports: {} };
|
|
55465
|
+
return e3[r2].call(o.exports, o, o.exports, n2), o.l = true, o.exports;
|
|
55466
|
+
}
|
|
55467
|
+
return n2.m = e3, n2.c = t2, n2.d = function(e4, t3, r2) {
|
|
55468
|
+
n2.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: r2 });
|
|
55469
|
+
}, n2.r = function(e4) {
|
|
55470
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
55471
|
+
}, n2.t = function(e4, t3) {
|
|
55472
|
+
if (1 & t3 && (e4 = n2(e4)), 8 & t3) return e4;
|
|
55473
|
+
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
55474
|
+
var r2 = /* @__PURE__ */ Object.create(null);
|
|
55475
|
+
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) {
|
|
55476
|
+
return e4[t4];
|
|
55477
|
+
}).bind(null, o));
|
|
55478
|
+
return r2;
|
|
55479
|
+
}, n2.n = function(e4) {
|
|
55480
|
+
var t3 = e4 && e4.__esModule ? function() {
|
|
55481
|
+
return e4.default;
|
|
55482
|
+
} : function() {
|
|
55483
|
+
return e4;
|
|
55484
|
+
};
|
|
55485
|
+
return n2.d(t3, "a", t3), t3;
|
|
55486
|
+
}, n2.o = function(e4, t3) {
|
|
55487
|
+
return Object.prototype.hasOwnProperty.call(e4, t3);
|
|
55488
|
+
}, n2.p = "", n2(n2.s = 0);
|
|
55489
|
+
}([function(e3, t2, n2) {
|
|
55490
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
55491
|
+
var r2 = n2(1);
|
|
55492
|
+
Object.defineProperty(t2, "default", { enumerable: true, get: function() {
|
|
55493
|
+
return function(e4) {
|
|
55494
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
55495
|
+
}(r2).default;
|
|
55496
|
+
} }), e3.exports = t2.default;
|
|
55497
|
+
}, function(e3, t2, n2) {
|
|
55498
|
+
Object.defineProperty(t2, "__esModule", { value: true });
|
|
55499
|
+
var r2 = Object.assign || function(e4) {
|
|
55500
|
+
for (var t3 = 1; t3 < arguments.length; t3++) {
|
|
55501
|
+
var n3 = arguments[t3];
|
|
55502
|
+
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e4[r3] = n3[r3]);
|
|
55503
|
+
}
|
|
55504
|
+
return e4;
|
|
55505
|
+
}, o = /* @__PURE__ */ function() {
|
|
55506
|
+
function e4(e5, t3) {
|
|
55507
|
+
for (var n3 = 0; n3 < t3.length; n3++) {
|
|
55508
|
+
var r3 = t3[n3];
|
|
55509
|
+
r3.enumerable = r3.enumerable || false, r3.configurable = true, "value" in r3 && (r3.writable = true), Object.defineProperty(e5, r3.key, r3);
|
|
55510
|
+
}
|
|
55511
|
+
}
|
|
55512
|
+
return function(t3, n3, r3) {
|
|
55513
|
+
return n3 && e4(t3.prototype, n3), r3 && e4(t3, r3), t3;
|
|
55514
|
+
};
|
|
55515
|
+
}(), i = l(n2(2)), u = l(n2(3)), a2 = n2(4);
|
|
55516
|
+
function l(e4) {
|
|
55517
|
+
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
55518
|
+
}
|
|
55519
|
+
var s = [], c2 = function(e4) {
|
|
55520
|
+
function t3(e5) {
|
|
55521
|
+
!function(e6, t4) {
|
|
55522
|
+
if (!(e6 instanceof t4)) throw new TypeError("Cannot call a class as a function");
|
|
55523
|
+
}(this, t3);
|
|
55524
|
+
var n3 = function(e6, t4) {
|
|
55525
|
+
if (!e6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
55526
|
+
return !t4 || "object" != typeof t4 && "function" != typeof t4 ? e6 : t4;
|
|
55527
|
+
}(this, (t3.__proto__ || Object.getPrototypeOf(t3)).call(this, e5));
|
|
55528
|
+
return n3.handleKeyboardEvent = n3.handleKeyboardEvent.bind(n3), n3.registerExclusiveHandler = n3.registerExclusiveHandler.bind(n3), n3.deregisterExclusiveHandler = n3.deregisterExclusiveHandler.bind(n3), n3;
|
|
55529
|
+
}
|
|
55530
|
+
return function(e5, t4) {
|
|
55531
|
+
if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function, not " + typeof t4);
|
|
55532
|
+
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);
|
|
55533
|
+
}(t3, i.default.Component), o(t3, [{ key: "componentDidMount", value: function() {
|
|
55534
|
+
document.addEventListener("keydown", this.handleKeyboardEvent, false), document.addEventListener("keyup", this.handleKeyboardEvent, false), document.addEventListener("keypress", this.handleKeyboardEvent, false);
|
|
55535
|
+
var e5 = this.props, t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
55536
|
+
t4 && !n3 && this.registerExclusiveHandler();
|
|
55537
|
+
} }, { key: "componentWillUnmount", value: function() {
|
|
55538
|
+
document.removeEventListener("keydown", this.handleKeyboardEvent, false), document.removeEventListener("keyup", this.handleKeyboardEvent, false), document.removeEventListener("keypress", this.handleKeyboardEvent, false), this.deregisterExclusiveHandler();
|
|
55539
|
+
} }, { key: "componentDidUpdate", value: function(e5) {
|
|
55540
|
+
var t4 = e5.isExclusive, n3 = e5.isDisabled;
|
|
55541
|
+
(this.props.isExclusive !== t4 || this.props.isDisabled !== n3) && (this.props.isExclusive && !this.props.isDisabled ? this.registerExclusiveHandler() : this.deregisterExclusiveHandler());
|
|
55542
|
+
} }, { key: "registerExclusiveHandler", value: function() {
|
|
55543
|
+
this.deregisterExclusiveHandler(), s.unshift(this);
|
|
55544
|
+
} }, { key: "deregisterExclusiveHandler", value: function() {
|
|
55545
|
+
var e5 = this;
|
|
55546
|
+
s.includes(this) && (s = s.filter(function(t4) {
|
|
55547
|
+
return t4 !== e5;
|
|
55548
|
+
}));
|
|
55549
|
+
} }, { key: "handleKeyboardEvent", value: function(e5) {
|
|
55550
|
+
var t4 = this.props, n3 = t4.isDisabled, r3 = t4.handleKeys, o2 = t4.onKeyEvent, i2 = t4.handleEventType, u2 = t4.children, l2 = t4.handleFocusableElements;
|
|
55551
|
+
if (n3) return false;
|
|
55552
|
+
if (!(i2 === e5.type)) return false;
|
|
55553
|
+
if (s.length > 0 && s[0] !== this) return false;
|
|
55554
|
+
var c3 = e5.target === document.body || l2, d2 = this.childrenContainer && this.childrenContainer.contains(e5.target);
|
|
55555
|
+
if (!(u2 ? d2 : c3)) return false;
|
|
55556
|
+
var f2 = (0, a2.findMatchedKey)(e5, r3);
|
|
55557
|
+
return !!f2 && (o2(f2, e5), true);
|
|
55558
|
+
} }, { key: "render", value: function() {
|
|
55559
|
+
var e5 = this, n3 = this.props.children, o2 = Object.assign({}, this.props), u2 = true, a3 = false, l2 = void 0;
|
|
55560
|
+
try {
|
|
55561
|
+
for (var s2, c3 = Object.keys(t3.propTypes)[Symbol.iterator](); !(u2 = (s2 = c3.next()).done); u2 = true) {
|
|
55562
|
+
delete o2[s2.value];
|
|
55563
|
+
}
|
|
55564
|
+
} catch (e6) {
|
|
55565
|
+
a3 = true, l2 = e6;
|
|
55566
|
+
} finally {
|
|
55567
|
+
try {
|
|
55568
|
+
!u2 && c3.return && c3.return();
|
|
55569
|
+
} finally {
|
|
55570
|
+
if (a3) throw l2;
|
|
55571
|
+
}
|
|
55572
|
+
}
|
|
55573
|
+
return n3 ? i.default.createElement("span", r2({ ref: function(t4) {
|
|
55574
|
+
e5.childrenContainer = t4;
|
|
55575
|
+
} }, o2), n3) : null;
|
|
55576
|
+
} }]), t3;
|
|
55577
|
+
}();
|
|
55578
|
+
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() {
|
|
55579
|
+
return null;
|
|
55580
|
+
} }, e3.exports = t2.default;
|
|
55581
|
+
}, function(t2, n2) {
|
|
55582
|
+
t2.exports = e2;
|
|
55583
|
+
}, function(e3, n2) {
|
|
55584
|
+
e3.exports = t;
|
|
55585
|
+
}, function(e3, t2, n2) {
|
|
55586
|
+
function r2(e4, t3, n3) {
|
|
55587
|
+
return t3 in e4 ? Object.defineProperty(e4, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e4[t3] = n3, e4;
|
|
55588
|
+
}
|
|
55589
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.matchKeyEvent = p, t2.findMatchedKey = function(e4, t3) {
|
|
55590
|
+
var n3 = t3.map(function(e5) {
|
|
55591
|
+
var t4 = e5.toLowerCase(), n4 = f2[t4];
|
|
55592
|
+
return n4 || [e5];
|
|
55593
|
+
}).reduce(function(e5, t4) {
|
|
55594
|
+
return e5.concat(t4);
|
|
55595
|
+
}, []).find(function(t4) {
|
|
55596
|
+
return p(e4, t4);
|
|
55597
|
+
});
|
|
55598
|
+
!n3 && t3.includes("all") && (n3 = "other");
|
|
55599
|
+
return n3;
|
|
55600
|
+
};
|
|
55601
|
+
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) {
|
|
55602
|
+
return Object.assign(e4, r2({}, t3.toUpperCase(), o[t3]));
|
|
55603
|
+
}, {}), u = "0123456789".split("").reduce(function(e4, t3, n3) {
|
|
55604
|
+
return Object.assign(e4, r2({}, t3, [n3 + 48, n3 + 96]));
|
|
55605
|
+
}, {}), a2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(e4, t3, n3) {
|
|
55606
|
+
return Object.assign(e4, r2({}, t3.toLowerCase(), [n3 + 65]), r2({}, t3, [n3 + 65]));
|
|
55607
|
+
}, {}), 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) {
|
|
55608
|
+
return Object.assign(e4, r2({}, "f" + t3, [n3 + 112]));
|
|
55609
|
+
}, {}), 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) };
|
|
55610
|
+
function p(e4, t3) {
|
|
55611
|
+
var n3 = e4.which || e4.keyCode, r3 = e4.type, o2 = Object.keys(s).filter(function(t4) {
|
|
55612
|
+
return e4[t4 + "Key"];
|
|
55613
|
+
}).sort(), i2 = t3.toLowerCase().trim(), u2 = "+" === i2 ? ["+"] : i2.split(/\s?\+\s?/), a3 = u2.pop(), l2 = c2[a3], d3 = u2;
|
|
55614
|
+
if ("keypress" === r3) return t3 == String.fromCharCode(n3).toLowerCase();
|
|
55615
|
+
if (0 === d3.length && 0 === o2.length) return l2.indexOf(n3) >= 0;
|
|
55616
|
+
if (d3.length > 0 && o2.length > 0) {
|
|
55617
|
+
var f3 = d3.map(function(e5) {
|
|
55618
|
+
return s[e5];
|
|
55619
|
+
}).sort(), p2 = f3.length === o2.length && f3.every(function(e5, t4) {
|
|
55620
|
+
return o2[t4] === e5;
|
|
55621
|
+
});
|
|
55622
|
+
return l2.indexOf(n3) >= 0 && p2;
|
|
55623
|
+
}
|
|
55624
|
+
return 0 == d3.length && 1 === o2.length && a3 === o2[0];
|
|
55625
|
+
}
|
|
55626
|
+
}]);
|
|
55627
|
+
});
|
|
55628
|
+
})(reactKeyboardEventHandler);
|
|
55629
|
+
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
55630
|
+
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
55638
55631
|
const getStringName$1 = (name2) => {
|
|
55639
55632
|
if (!name2) return "";
|
|
55640
55633
|
if (typeof name2 === "string") {
|
|
@@ -70952,41 +70945,6 @@ const SmartUploadModal = ({
|
|
|
70952
70945
|
}
|
|
70953
70946
|
) });
|
|
70954
70947
|
};
|
|
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
70948
|
export {
|
|
70991
70949
|
Accordion,
|
|
70992
70950
|
AccordionWithDefaultToggle,
|
|
@@ -71050,7 +71008,6 @@ export {
|
|
|
71050
71008
|
RichTextInput,
|
|
71051
71009
|
Row$1 as Row,
|
|
71052
71010
|
Select,
|
|
71053
|
-
SettingField,
|
|
71054
71011
|
SideBar,
|
|
71055
71012
|
Slider,
|
|
71056
71013
|
SmartUploadModal,
|