funda-ui 4.7.187 → 4.7.195
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/Accordion/index.js +10 -5
- package/Chatbox/index.js +4 -4
- package/Date/index.js +2 -2
- package/DragDropList/index.js +1 -1
- package/Input/index.js +2 -2
- package/LiveSearch/index.js +1 -1
- package/MultipleCheckboxes/index.d.ts +6 -5
- package/MultipleCheckboxes/index.js +18 -6
- package/MultipleSelect/index.js +1 -1
- package/RangeSlider/index.js +2 -2
- package/SearchBar/index.js +1 -1
- package/TagInput/index.js +1 -1
- package/Textarea/index.js +2 -2
- package/lib/cjs/Accordion/index.js +10 -5
- package/lib/cjs/Chatbox/index.js +4 -4
- package/lib/cjs/Date/index.js +2 -2
- package/lib/cjs/DragDropList/index.js +1 -1
- package/lib/cjs/Input/index.js +2 -2
- package/lib/cjs/LiveSearch/index.js +1 -1
- package/lib/cjs/MultipleCheckboxes/index.d.ts +6 -5
- package/lib/cjs/MultipleCheckboxes/index.js +18 -6
- package/lib/cjs/MultipleSelect/index.js +1 -1
- package/lib/cjs/RangeSlider/index.js +2 -2
- package/lib/cjs/SearchBar/index.js +1 -1
- package/lib/cjs/TagInput/index.js +1 -1
- package/lib/cjs/Textarea/index.js +2 -2
- package/lib/esm/Accordion/AccordionItem.tsx +3 -1
- package/lib/esm/Chatbox/index.tsx +2 -2
- package/lib/esm/DragDropList/index.tsx +1 -1
- package/lib/esm/Input/index.tsx +2 -2
- package/lib/esm/MultipleCheckboxes/index.tsx +43 -16
- package/lib/esm/SearchBar/index.tsx +1 -1
- package/lib/esm/TagInput/index.tsx +1 -1
- package/lib/esm/Textarea/index.tsx +2 -2
- package/package.json +1 -1
package/Accordion/index.js
CHANGED
|
@@ -806,6 +806,10 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__
|
|
|
806
806
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
807
807
|
var cls = __webpack_require__(188);
|
|
808
808
|
;// CONCATENATED MODULE: ./src/AccordionItem.tsx
|
|
809
|
+
var _excluded = ["heightObserver", "index", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "defaultActive", "title", "onToggleEv", "onTransitionEnd", "triggerType", "children"];
|
|
810
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
811
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
812
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
809
813
|
|
|
810
814
|
|
|
811
815
|
var AccordionItem = function AccordionItem(props) {
|
|
@@ -823,7 +827,8 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
823
827
|
onToggleEv = props.onToggleEv,
|
|
824
828
|
onTransitionEnd = props.onTransitionEnd,
|
|
825
829
|
triggerType = props.triggerType,
|
|
826
|
-
children = props.children
|
|
830
|
+
children = props.children,
|
|
831
|
+
attributes = _objectWithoutProperties(props, _excluded);
|
|
827
832
|
var activedClassName = typeof defaultActive !== 'undefined' && defaultActive !== false ? ' active' : '';
|
|
828
833
|
var observer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
829
834
|
var contentWrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -849,7 +854,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
849
854
|
if (contentRef.current) (_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.unobserve(contentRef.current);
|
|
850
855
|
};
|
|
851
856
|
}, [heightObserver]);
|
|
852
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
857
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", _extends({}, attributes, {
|
|
853
858
|
"data-index": index,
|
|
854
859
|
className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(itemClassName, 'accordion-item'), activedClassName),
|
|
855
860
|
onClick: triggerType === 'click' ? onToggleEv : function () {},
|
|
@@ -857,7 +862,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
857
862
|
onTransitionEnd: typeof onTransitionEnd === 'function' ? onTransitionEnd : function () {},
|
|
858
863
|
"aria-expanded": defaultActive ? 'true' : 'false',
|
|
859
864
|
style: typeof itemStyle !== 'undefined' ? itemStyle : {}
|
|
860
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
865
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
861
866
|
className: (0,cls.combinedCls)('custom-accordion-header', (0,cls.clsWrite)(itemHeaderClassName, 'accordion-header position-relative')),
|
|
862
867
|
role: "presentation"
|
|
863
868
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
@@ -883,7 +888,7 @@ var anim = __webpack_require__(993);
|
|
|
883
888
|
var anim_default = /*#__PURE__*/__webpack_require__.n(anim);
|
|
884
889
|
;// CONCATENATED MODULE: ./src/Accordion.tsx
|
|
885
890
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
886
|
-
function
|
|
891
|
+
function Accordion_extends() { Accordion_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Accordion_extends.apply(this, arguments); }
|
|
887
892
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
888
893
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
889
894
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -1013,7 +1018,7 @@ var Accordion = function Accordion(props) {
|
|
|
1013
1018
|
}, children != null ? children.map(function (item, i) {
|
|
1014
1019
|
var childProps = _objectSpread({}, item.props);
|
|
1015
1020
|
var _defaultActive = i === 0 && displayTheFirstItem ? true : false;
|
|
1016
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem,
|
|
1021
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem, Accordion_extends({
|
|
1017
1022
|
key: "item" + i,
|
|
1018
1023
|
index: i,
|
|
1019
1024
|
heightObserver: heightObserver,
|
package/Chatbox/index.js
CHANGED
|
@@ -2029,7 +2029,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2029
2029
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
2030
2030
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
2031
2031
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
2032
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
2032
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
2033
2033
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
2034
2034
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
2035
2035
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -2342,7 +2342,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2342
2342
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
2343
2343
|
}
|
|
2344
2344
|
|
|
2345
|
-
if (event.
|
|
2345
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
2346
2346
|
// DO NOT USE "preventDefault()"
|
|
2347
2347
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
2348
2348
|
}
|
|
@@ -5776,10 +5776,10 @@ var Chatbox = function Chatbox(props) {
|
|
|
5776
5776
|
disabled: loading ? true : false,
|
|
5777
5777
|
onKeyDown: function onKeyDown(event) {
|
|
5778
5778
|
// line breaks
|
|
5779
|
-
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
|
|
5779
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && (event.ctrlKey || event.metaKey)) {
|
|
5780
5780
|
return;
|
|
5781
5781
|
}
|
|
5782
|
-
if (event.key === 'Enter' && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
5782
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
5783
5783
|
event.preventDefault(); // Prevent line breaks
|
|
5784
5784
|
handleClickSafe();
|
|
5785
5785
|
}
|
package/Date/index.js
CHANGED
|
@@ -1536,7 +1536,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1536
1536
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1537
1537
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1538
1538
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1539
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1539
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1540
1540
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1541
1541
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1542
1542
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1842,7 +1842,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1842
1842
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
|
-
if (event.
|
|
1845
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1846
1846
|
// DO NOT USE "preventDefault()"
|
|
1847
1847
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1848
1848
|
}
|
package/DragDropList/index.js
CHANGED
|
@@ -1453,7 +1453,7 @@ var DragDropList = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef
|
|
|
1453
1453
|
});
|
|
1454
1454
|
};
|
|
1455
1455
|
var handleKeyDown = function handleKeyDown(e, itemId) {
|
|
1456
|
-
if (e.key === 'Enter') {
|
|
1456
|
+
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
1457
1457
|
handleEditSave(itemId);
|
|
1458
1458
|
} else if (e.key === 'Escape') {
|
|
1459
1459
|
handleEditCancel();
|
package/Input/index.js
CHANGED
|
@@ -982,7 +982,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
982
982
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
983
983
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
984
984
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
985
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
985
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
986
986
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
987
987
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
988
988
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1288,7 +1288,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
1288
1288
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
-
if (event.
|
|
1291
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1292
1292
|
// DO NOT USE "preventDefault()"
|
|
1293
1293
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1294
1294
|
}
|
package/LiveSearch/index.js
CHANGED
|
@@ -976,7 +976,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
976
976
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
if (event.
|
|
979
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
980
980
|
// DO NOT USE "preventDefault()"
|
|
981
981
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, onComposition);
|
|
982
982
|
}
|
|
@@ -21,7 +21,7 @@ export interface CustomOptionsItemsListParams {
|
|
|
21
21
|
convertArrToValByBrackets: (arr: string[]) => string;
|
|
22
22
|
isAllSelected: boolean;
|
|
23
23
|
handleSelectAll: () => void;
|
|
24
|
-
onChange?: (e:
|
|
24
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement> | null, value: string[] | null, valueStr: string, label: string[] | null, labelStr: string, currentData: OptionConfig | null, dataCollection: OptionConfig[]) => void;
|
|
25
25
|
attributes: React.HTMLAttributes<HTMLInputElement>;
|
|
26
26
|
}
|
|
27
27
|
export declare type MultipleCheckboxesProps = {
|
|
@@ -43,6 +43,7 @@ export declare type MultipleCheckboxesProps = {
|
|
|
43
43
|
required?: any;
|
|
44
44
|
showSelectAll?: boolean;
|
|
45
45
|
selectAllLabel?: string;
|
|
46
|
+
singleSelect?: boolean;
|
|
46
47
|
/** Whether to use square brackets to save result and initialize default value */
|
|
47
48
|
extractValueByBrackets?: boolean;
|
|
48
49
|
/** -- */
|
|
@@ -55,10 +56,10 @@ export declare type MultipleCheckboxesProps = {
|
|
|
55
56
|
fetchFuncAsync?: any;
|
|
56
57
|
fetchFuncMethod?: string;
|
|
57
58
|
fetchFuncMethodParams?: any[];
|
|
58
|
-
fetchCallback?: (data:
|
|
59
|
-
onFetch?: (data:
|
|
60
|
-
onLoad?: (
|
|
61
|
-
onChange?: (e:
|
|
59
|
+
fetchCallback?: (data: OptionConfig[]) => OptionConfig[];
|
|
60
|
+
onFetch?: (data: OptionConfig[]) => void;
|
|
61
|
+
onLoad?: (latestData: OptionConfig[], defaultValue: string | string[], rootElement: HTMLDivElement | HTMLTableElement | null) => void;
|
|
62
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement> | null, value: string[] | null, valueStr: string, label: string[] | null, labelStr: string, currentData: OptionConfig | null, dataCollection: OptionConfig[]) => void;
|
|
62
63
|
onCallbackListItem?: (optiondata: any) => void;
|
|
63
64
|
};
|
|
64
65
|
declare const MultipleCheckboxes: React.ForwardRefExoticComponent<MultipleCheckboxesProps & React.RefAttributes<unknown>>;
|
|
@@ -1183,7 +1183,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1183
1183
|
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__);
|
|
1184
1184
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(188);
|
|
1185
1185
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__);
|
|
1186
|
-
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "groupWrapperClassName", "groupLabelClassName", "inline", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "showSelectAll", "selectAllLabel", "extractValueByBrackets", "style", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onChange", "onCallbackListItem"];
|
|
1186
|
+
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "groupWrapperClassName", "groupLabelClassName", "inline", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "showSelectAll", "selectAllLabel", "singleSelect", "extractValueByBrackets", "style", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onChange", "onCallbackListItem"];
|
|
1187
1187
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1188
1188
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1189
1189
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -1230,6 +1230,8 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1230
1230
|
showSelectAll = _props$showSelectAll === void 0 ? false : _props$showSelectAll,
|
|
1231
1231
|
_props$selectAllLabel = props.selectAllLabel,
|
|
1232
1232
|
selectAllLabel = _props$selectAllLabel === void 0 ? 'Select all' : _props$selectAllLabel,
|
|
1233
|
+
_props$singleSelect = props.singleSelect,
|
|
1234
|
+
singleSelect = _props$singleSelect === void 0 ? false : _props$singleSelect,
|
|
1233
1235
|
extractValueByBrackets = props.extractValueByBrackets,
|
|
1234
1236
|
style = props.style,
|
|
1235
1237
|
fetchFuncAsync = props.fetchFuncAsync,
|
|
@@ -1348,7 +1350,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1348
1350
|
clear: function clear(cb) {
|
|
1349
1351
|
initDefaultValue('', dataInit);
|
|
1350
1352
|
cb === null || cb === void 0 ? void 0 : cb();
|
|
1351
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, '', null,
|
|
1353
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, '', null, '', null, []);
|
|
1352
1354
|
},
|
|
1353
1355
|
set: function set(value, cb) {
|
|
1354
1356
|
initDefaultValue(value, dataInit);
|
|
@@ -1373,7 +1375,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1373
1375
|
}).join(',');
|
|
1374
1376
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, _value, _valueStr, _label, _labelStr, null, _resDataCollection);
|
|
1375
1377
|
} else {
|
|
1376
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, value
|
|
1378
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, value !== null && value !== void 0 ? value : '', null, '', null, []);
|
|
1377
1379
|
}
|
|
1378
1380
|
},
|
|
1379
1381
|
selectAll: function selectAll() {
|
|
@@ -1412,10 +1414,20 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1412
1414
|
function handleCheckboxChange(itemKey) {
|
|
1413
1415
|
// first, make a copy of the original set rather than mutating the original
|
|
1414
1416
|
var newSelectedItems = new Set(selectedItems);
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
1417
|
+
if (singleSelect) {
|
|
1418
|
+
// If singleSelect is true, clear all selections first
|
|
1419
|
+
newSelectedItems.clear();
|
|
1420
|
+
// Only add the new selection if it wasn't already selected
|
|
1421
|
+
if (!selectedItems.has(itemKey)) {
|
|
1422
|
+
newSelectedItems.add(itemKey);
|
|
1423
|
+
}
|
|
1417
1424
|
} else {
|
|
1418
|
-
|
|
1425
|
+
// Original multi-select behavior
|
|
1426
|
+
if (!newSelectedItems.has(itemKey)) {
|
|
1427
|
+
newSelectedItems.add(itemKey);
|
|
1428
|
+
} else {
|
|
1429
|
+
newSelectedItems["delete"](itemKey);
|
|
1430
|
+
}
|
|
1419
1431
|
}
|
|
1420
1432
|
setSelectedItems(newSelectedItems);
|
|
1421
1433
|
return newSelectedItems;
|
package/MultipleSelect/index.js
CHANGED
|
@@ -1681,7 +1681,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1681
1681
|
});
|
|
1682
1682
|
};
|
|
1683
1683
|
var handleKeyDown = function handleKeyDown(e, itemId) {
|
|
1684
|
-
if (e.key === 'Enter') {
|
|
1684
|
+
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
1685
1685
|
handleEditSave(itemId);
|
|
1686
1686
|
} else if (e.key === 'Escape') {
|
|
1687
1687
|
handleEditCancel();
|
package/RangeSlider/index.js
CHANGED
|
@@ -1502,7 +1502,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1502
1502
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1503
1503
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1504
1504
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1505
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1505
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1506
1506
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1507
1507
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1508
1508
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1808,7 +1808,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1808
1808
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
|
-
if (event.
|
|
1811
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1812
1812
|
// DO NOT USE "preventDefault()"
|
|
1813
1813
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1814
1814
|
}
|
package/SearchBar/index.js
CHANGED
|
@@ -613,7 +613,7 @@ var SearchBar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(f
|
|
|
613
613
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
if (event.
|
|
616
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
617
617
|
// DO NOT USE "preventDefault()"
|
|
618
618
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, onComposition);
|
|
619
619
|
}
|
package/TagInput/index.js
CHANGED
|
@@ -960,7 +960,7 @@ var TagInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
960
960
|
function handleKeypress(event) {
|
|
961
961
|
// Avoid adding results before when the user enters text is not complete
|
|
962
962
|
if (onComposition) return;
|
|
963
|
-
if (event.
|
|
963
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter' || event.code === "Space") {
|
|
964
964
|
event.preventDefault();
|
|
965
965
|
if (alreadyInItems) return false;
|
|
966
966
|
|
package/Textarea/index.js
CHANGED
|
@@ -1301,7 +1301,7 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1301
1301
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1302
1302
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1303
1303
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1304
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1304
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1305
1305
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1306
1306
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1307
1307
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1614,7 +1614,7 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1614
1614
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
if (event.
|
|
1617
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1618
1618
|
// DO NOT USE "preventDefault()"
|
|
1619
1619
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1620
1620
|
}
|
|
@@ -806,6 +806,10 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__
|
|
|
806
806
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
807
807
|
var cls = __webpack_require__(188);
|
|
808
808
|
;// CONCATENATED MODULE: ./src/AccordionItem.tsx
|
|
809
|
+
var _excluded = ["heightObserver", "index", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "defaultActive", "title", "onToggleEv", "onTransitionEnd", "triggerType", "children"];
|
|
810
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
811
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
812
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
809
813
|
|
|
810
814
|
|
|
811
815
|
var AccordionItem = function AccordionItem(props) {
|
|
@@ -823,7 +827,8 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
823
827
|
onToggleEv = props.onToggleEv,
|
|
824
828
|
onTransitionEnd = props.onTransitionEnd,
|
|
825
829
|
triggerType = props.triggerType,
|
|
826
|
-
children = props.children
|
|
830
|
+
children = props.children,
|
|
831
|
+
attributes = _objectWithoutProperties(props, _excluded);
|
|
827
832
|
var activedClassName = typeof defaultActive !== 'undefined' && defaultActive !== false ? ' active' : '';
|
|
828
833
|
var observer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
829
834
|
var contentWrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -849,7 +854,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
849
854
|
if (contentRef.current) (_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.unobserve(contentRef.current);
|
|
850
855
|
};
|
|
851
856
|
}, [heightObserver]);
|
|
852
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
857
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", _extends({}, attributes, {
|
|
853
858
|
"data-index": index,
|
|
854
859
|
className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(itemClassName, 'accordion-item'), activedClassName),
|
|
855
860
|
onClick: triggerType === 'click' ? onToggleEv : function () {},
|
|
@@ -857,7 +862,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
857
862
|
onTransitionEnd: typeof onTransitionEnd === 'function' ? onTransitionEnd : function () {},
|
|
858
863
|
"aria-expanded": defaultActive ? 'true' : 'false',
|
|
859
864
|
style: typeof itemStyle !== 'undefined' ? itemStyle : {}
|
|
860
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
865
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
861
866
|
className: (0,cls.combinedCls)('custom-accordion-header', (0,cls.clsWrite)(itemHeaderClassName, 'accordion-header position-relative')),
|
|
862
867
|
role: "presentation"
|
|
863
868
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
@@ -883,7 +888,7 @@ var anim = __webpack_require__(993);
|
|
|
883
888
|
var anim_default = /*#__PURE__*/__webpack_require__.n(anim);
|
|
884
889
|
;// CONCATENATED MODULE: ./src/Accordion.tsx
|
|
885
890
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
886
|
-
function
|
|
891
|
+
function Accordion_extends() { Accordion_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Accordion_extends.apply(this, arguments); }
|
|
887
892
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
888
893
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
889
894
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -1013,7 +1018,7 @@ var Accordion = function Accordion(props) {
|
|
|
1013
1018
|
}, children != null ? children.map(function (item, i) {
|
|
1014
1019
|
var childProps = _objectSpread({}, item.props);
|
|
1015
1020
|
var _defaultActive = i === 0 && displayTheFirstItem ? true : false;
|
|
1016
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem,
|
|
1021
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem, Accordion_extends({
|
|
1017
1022
|
key: "item" + i,
|
|
1018
1023
|
index: i,
|
|
1019
1024
|
heightObserver: heightObserver,
|
package/lib/cjs/Chatbox/index.js
CHANGED
|
@@ -2029,7 +2029,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2029
2029
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
2030
2030
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
2031
2031
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
2032
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
2032
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
2033
2033
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
2034
2034
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
2035
2035
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -2342,7 +2342,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2342
2342
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
2343
2343
|
}
|
|
2344
2344
|
|
|
2345
|
-
if (event.
|
|
2345
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
2346
2346
|
// DO NOT USE "preventDefault()"
|
|
2347
2347
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
2348
2348
|
}
|
|
@@ -5776,10 +5776,10 @@ var Chatbox = function Chatbox(props) {
|
|
|
5776
5776
|
disabled: loading ? true : false,
|
|
5777
5777
|
onKeyDown: function onKeyDown(event) {
|
|
5778
5778
|
// line breaks
|
|
5779
|
-
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
|
|
5779
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && (event.ctrlKey || event.metaKey)) {
|
|
5780
5780
|
return;
|
|
5781
5781
|
}
|
|
5782
|
-
if (event.key === 'Enter' && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
5782
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
5783
5783
|
event.preventDefault(); // Prevent line breaks
|
|
5784
5784
|
handleClickSafe();
|
|
5785
5785
|
}
|
package/lib/cjs/Date/index.js
CHANGED
|
@@ -1536,7 +1536,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1536
1536
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1537
1537
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1538
1538
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1539
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1539
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1540
1540
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1541
1541
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1542
1542
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1842,7 +1842,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1842
1842
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
|
-
if (event.
|
|
1845
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1846
1846
|
// DO NOT USE "preventDefault()"
|
|
1847
1847
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1848
1848
|
}
|
|
@@ -1453,7 +1453,7 @@ var DragDropList = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef
|
|
|
1453
1453
|
});
|
|
1454
1454
|
};
|
|
1455
1455
|
var handleKeyDown = function handleKeyDown(e, itemId) {
|
|
1456
|
-
if (e.key === 'Enter') {
|
|
1456
|
+
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
1457
1457
|
handleEditSave(itemId);
|
|
1458
1458
|
} else if (e.key === 'Escape') {
|
|
1459
1459
|
handleEditCancel();
|
package/lib/cjs/Input/index.js
CHANGED
|
@@ -982,7 +982,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
982
982
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
983
983
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
984
984
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
985
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
985
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
986
986
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
987
987
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
988
988
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1288,7 +1288,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
1288
1288
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
-
if (event.
|
|
1291
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1292
1292
|
// DO NOT USE "preventDefault()"
|
|
1293
1293
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1294
1294
|
}
|
|
@@ -976,7 +976,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
976
976
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
if (event.
|
|
979
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
980
980
|
// DO NOT USE "preventDefault()"
|
|
981
981
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, onComposition);
|
|
982
982
|
}
|
|
@@ -21,7 +21,7 @@ export interface CustomOptionsItemsListParams {
|
|
|
21
21
|
convertArrToValByBrackets: (arr: string[]) => string;
|
|
22
22
|
isAllSelected: boolean;
|
|
23
23
|
handleSelectAll: () => void;
|
|
24
|
-
onChange?: (e:
|
|
24
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement> | null, value: string[] | null, valueStr: string, label: string[] | null, labelStr: string, currentData: OptionConfig | null, dataCollection: OptionConfig[]) => void;
|
|
25
25
|
attributes: React.HTMLAttributes<HTMLInputElement>;
|
|
26
26
|
}
|
|
27
27
|
export declare type MultipleCheckboxesProps = {
|
|
@@ -43,6 +43,7 @@ export declare type MultipleCheckboxesProps = {
|
|
|
43
43
|
required?: any;
|
|
44
44
|
showSelectAll?: boolean;
|
|
45
45
|
selectAllLabel?: string;
|
|
46
|
+
singleSelect?: boolean;
|
|
46
47
|
/** Whether to use square brackets to save result and initialize default value */
|
|
47
48
|
extractValueByBrackets?: boolean;
|
|
48
49
|
/** -- */
|
|
@@ -55,10 +56,10 @@ export declare type MultipleCheckboxesProps = {
|
|
|
55
56
|
fetchFuncAsync?: any;
|
|
56
57
|
fetchFuncMethod?: string;
|
|
57
58
|
fetchFuncMethodParams?: any[];
|
|
58
|
-
fetchCallback?: (data:
|
|
59
|
-
onFetch?: (data:
|
|
60
|
-
onLoad?: (
|
|
61
|
-
onChange?: (e:
|
|
59
|
+
fetchCallback?: (data: OptionConfig[]) => OptionConfig[];
|
|
60
|
+
onFetch?: (data: OptionConfig[]) => void;
|
|
61
|
+
onLoad?: (latestData: OptionConfig[], defaultValue: string | string[], rootElement: HTMLDivElement | HTMLTableElement | null) => void;
|
|
62
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement> | null, value: string[] | null, valueStr: string, label: string[] | null, labelStr: string, currentData: OptionConfig | null, dataCollection: OptionConfig[]) => void;
|
|
62
63
|
onCallbackListItem?: (optiondata: any) => void;
|
|
63
64
|
};
|
|
64
65
|
declare const MultipleCheckboxes: React.ForwardRefExoticComponent<MultipleCheckboxesProps & React.RefAttributes<unknown>>;
|
|
@@ -1183,7 +1183,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1183
1183
|
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__);
|
|
1184
1184
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(188);
|
|
1185
1185
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__);
|
|
1186
|
-
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "groupWrapperClassName", "groupLabelClassName", "inline", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "showSelectAll", "selectAllLabel", "extractValueByBrackets", "style", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onChange", "onCallbackListItem"];
|
|
1186
|
+
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "groupWrapperClassName", "groupLabelClassName", "inline", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "showSelectAll", "selectAllLabel", "singleSelect", "extractValueByBrackets", "style", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onChange", "onCallbackListItem"];
|
|
1187
1187
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1188
1188
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1189
1189
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -1230,6 +1230,8 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1230
1230
|
showSelectAll = _props$showSelectAll === void 0 ? false : _props$showSelectAll,
|
|
1231
1231
|
_props$selectAllLabel = props.selectAllLabel,
|
|
1232
1232
|
selectAllLabel = _props$selectAllLabel === void 0 ? 'Select all' : _props$selectAllLabel,
|
|
1233
|
+
_props$singleSelect = props.singleSelect,
|
|
1234
|
+
singleSelect = _props$singleSelect === void 0 ? false : _props$singleSelect,
|
|
1233
1235
|
extractValueByBrackets = props.extractValueByBrackets,
|
|
1234
1236
|
style = props.style,
|
|
1235
1237
|
fetchFuncAsync = props.fetchFuncAsync,
|
|
@@ -1348,7 +1350,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1348
1350
|
clear: function clear(cb) {
|
|
1349
1351
|
initDefaultValue('', dataInit);
|
|
1350
1352
|
cb === null || cb === void 0 ? void 0 : cb();
|
|
1351
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, '', null,
|
|
1353
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, '', null, '', null, []);
|
|
1352
1354
|
},
|
|
1353
1355
|
set: function set(value, cb) {
|
|
1354
1356
|
initDefaultValue(value, dataInit);
|
|
@@ -1373,7 +1375,7 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1373
1375
|
}).join(',');
|
|
1374
1376
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, _value, _valueStr, _label, _labelStr, null, _resDataCollection);
|
|
1375
1377
|
} else {
|
|
1376
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, value
|
|
1378
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, value !== null && value !== void 0 ? value : '', null, '', null, []);
|
|
1377
1379
|
}
|
|
1378
1380
|
},
|
|
1379
1381
|
selectAll: function selectAll() {
|
|
@@ -1412,10 +1414,20 @@ var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forw
|
|
|
1412
1414
|
function handleCheckboxChange(itemKey) {
|
|
1413
1415
|
// first, make a copy of the original set rather than mutating the original
|
|
1414
1416
|
var newSelectedItems = new Set(selectedItems);
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
1417
|
+
if (singleSelect) {
|
|
1418
|
+
// If singleSelect is true, clear all selections first
|
|
1419
|
+
newSelectedItems.clear();
|
|
1420
|
+
// Only add the new selection if it wasn't already selected
|
|
1421
|
+
if (!selectedItems.has(itemKey)) {
|
|
1422
|
+
newSelectedItems.add(itemKey);
|
|
1423
|
+
}
|
|
1417
1424
|
} else {
|
|
1418
|
-
|
|
1425
|
+
// Original multi-select behavior
|
|
1426
|
+
if (!newSelectedItems.has(itemKey)) {
|
|
1427
|
+
newSelectedItems.add(itemKey);
|
|
1428
|
+
} else {
|
|
1429
|
+
newSelectedItems["delete"](itemKey);
|
|
1430
|
+
}
|
|
1419
1431
|
}
|
|
1420
1432
|
setSelectedItems(newSelectedItems);
|
|
1421
1433
|
return newSelectedItems;
|
|
@@ -1681,7 +1681,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1681
1681
|
});
|
|
1682
1682
|
};
|
|
1683
1683
|
var handleKeyDown = function handleKeyDown(e, itemId) {
|
|
1684
|
-
if (e.key === 'Enter') {
|
|
1684
|
+
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
1685
1685
|
handleEditSave(itemId);
|
|
1686
1686
|
} else if (e.key === 'Escape') {
|
|
1687
1687
|
handleEditCancel();
|
|
@@ -1502,7 +1502,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1502
1502
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1503
1503
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1504
1504
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1505
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1505
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1506
1506
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1507
1507
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1508
1508
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1808,7 +1808,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1808
1808
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
|
-
if (event.
|
|
1811
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1812
1812
|
// DO NOT USE "preventDefault()"
|
|
1813
1813
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1814
1814
|
}
|
|
@@ -613,7 +613,7 @@ var SearchBar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(f
|
|
|
613
613
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
if (event.
|
|
616
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
617
617
|
// DO NOT USE "preventDefault()"
|
|
618
618
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, onComposition);
|
|
619
619
|
}
|
|
@@ -960,7 +960,7 @@ var TagInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
960
960
|
function handleKeypress(event) {
|
|
961
961
|
// Avoid adding results before when the user enters text is not complete
|
|
962
962
|
if (onComposition) return;
|
|
963
|
-
if (event.
|
|
963
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter' || event.code === "Space") {
|
|
964
964
|
event.preventDefault();
|
|
965
965
|
if (alreadyInItems) return false;
|
|
966
966
|
|
|
@@ -1301,7 +1301,7 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1301
1301
|
_props$aiPredictRemai = props.aiPredictRemainingTextRGB,
|
|
1302
1302
|
aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
|
|
1303
1303
|
_props$aiPredictConfi = props.aiPredictConfirmKey,
|
|
1304
|
-
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1304
|
+
aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
|
|
1305
1305
|
aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
|
|
1306
1306
|
aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
|
|
1307
1307
|
aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
|
|
@@ -1614,7 +1614,7 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1614
1614
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
if (event.
|
|
1617
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
1618
1618
|
// DO NOT USE "preventDefault()"
|
|
1619
1619
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
|
|
1620
1620
|
}
|
|
@@ -47,7 +47,8 @@ const AccordionItem = (props: AccordionItemProps) => {
|
|
|
47
47
|
onToggleEv,
|
|
48
48
|
onTransitionEnd,
|
|
49
49
|
triggerType,
|
|
50
|
-
children
|
|
50
|
+
children,
|
|
51
|
+
...attributes
|
|
51
52
|
} = props;
|
|
52
53
|
|
|
53
54
|
|
|
@@ -91,6 +92,7 @@ const AccordionItem = (props: AccordionItemProps) => {
|
|
|
91
92
|
<>
|
|
92
93
|
|
|
93
94
|
<div
|
|
95
|
+
{...attributes}
|
|
94
96
|
data-index={index}
|
|
95
97
|
className={combinedCls(
|
|
96
98
|
'custom-accordion-item',
|
|
@@ -1572,11 +1572,11 @@ const Chatbox = (props: ChatboxProps) => {
|
|
|
1572
1572
|
disabled={loading ? true : false}
|
|
1573
1573
|
onKeyDown={(event: React.KeyboardEvent) => {
|
|
1574
1574
|
// line breaks
|
|
1575
|
-
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
|
|
1575
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && (event.ctrlKey || event.metaKey)) {
|
|
1576
1576
|
return;
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
|
-
if (event.key === 'Enter' && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
1579
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
1580
1580
|
event.preventDefault(); // Prevent line breaks
|
|
1581
1581
|
handleClickSafe();
|
|
1582
1582
|
}
|
|
@@ -319,7 +319,7 @@ const DragDropList = forwardRef((props: DragDropListProps, externalRef: any) =>
|
|
|
319
319
|
|
|
320
320
|
|
|
321
321
|
const handleKeyDown = (e: any, itemId: number) => {
|
|
322
|
-
if (e.key === 'Enter') {
|
|
322
|
+
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
323
323
|
handleEditSave(itemId);
|
|
324
324
|
} else if (e.key === 'Escape') {
|
|
325
325
|
handleEditCancel();
|
package/lib/esm/Input/index.tsx
CHANGED
|
@@ -99,7 +99,7 @@ const Input = forwardRef((props: InputProps, externalRef: any) => {
|
|
|
99
99
|
appendControl,
|
|
100
100
|
aiPredict = false,
|
|
101
101
|
aiPredictRemainingTextRGB = [153, 153, 153],
|
|
102
|
-
aiPredictConfirmKey = [['Enter'], ['Tab'], ['Shift', ' ']],
|
|
102
|
+
aiPredictConfirmKey = [['Enter', 'NumpadEnter'], ['Tab'], ['Shift', ' ']],
|
|
103
103
|
aiPredictFetchFuncAsync,
|
|
104
104
|
aiPredictFetchFuncMethod,
|
|
105
105
|
aiPredictFetchFuncMethodParams,
|
|
@@ -407,7 +407,7 @@ const Input = forwardRef((props: InputProps, externalRef: any) => {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
|
|
410
|
-
if (event.
|
|
410
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter' ) {
|
|
411
411
|
// DO NOT USE "preventDefault()"
|
|
412
412
|
onPressEnter?.(event, valRef.current);
|
|
413
413
|
}
|
|
@@ -42,13 +42,13 @@ export interface CustomOptionsItemsListParams {
|
|
|
42
42
|
isAllSelected: boolean;
|
|
43
43
|
handleSelectAll: () => void;
|
|
44
44
|
onChange?: (
|
|
45
|
-
e:
|
|
46
|
-
value:
|
|
47
|
-
valueStr:
|
|
48
|
-
label:
|
|
49
|
-
labelStr:
|
|
50
|
-
currentData:
|
|
51
|
-
dataCollection:
|
|
45
|
+
e: React.ChangeEvent<HTMLInputElement> | null,
|
|
46
|
+
value: string[] | null,
|
|
47
|
+
valueStr: string,
|
|
48
|
+
label: string[] | null,
|
|
49
|
+
labelStr: string,
|
|
50
|
+
currentData: OptionConfig | null,
|
|
51
|
+
dataCollection: OptionConfig[]
|
|
52
52
|
) => void;
|
|
53
53
|
attributes: React.HTMLAttributes<HTMLInputElement>;
|
|
54
54
|
}
|
|
@@ -72,6 +72,7 @@ export type MultipleCheckboxesProps = {
|
|
|
72
72
|
required?: any;
|
|
73
73
|
showSelectAll?: boolean;
|
|
74
74
|
selectAllLabel?: string;
|
|
75
|
+
singleSelect?: boolean;
|
|
75
76
|
/** Whether to use square brackets to save result and initialize default value */
|
|
76
77
|
extractValueByBrackets?: boolean;
|
|
77
78
|
/** -- */
|
|
@@ -84,10 +85,22 @@ export type MultipleCheckboxesProps = {
|
|
|
84
85
|
fetchFuncAsync?: any;
|
|
85
86
|
fetchFuncMethod?: string;
|
|
86
87
|
fetchFuncMethodParams?: any[];
|
|
87
|
-
fetchCallback?: (data:
|
|
88
|
-
onFetch?: (data:
|
|
89
|
-
onLoad?: (
|
|
90
|
-
|
|
88
|
+
fetchCallback?: (data: OptionConfig[]) => OptionConfig[];
|
|
89
|
+
onFetch?: (data: OptionConfig[]) => void;
|
|
90
|
+
onLoad?: (
|
|
91
|
+
latestData: OptionConfig[],
|
|
92
|
+
defaultValue: string | string[],
|
|
93
|
+
rootElement: HTMLDivElement | HTMLTableElement | null
|
|
94
|
+
) => void;
|
|
95
|
+
onChange?: (
|
|
96
|
+
e: React.ChangeEvent<HTMLInputElement> | null,
|
|
97
|
+
value: string[] | null,
|
|
98
|
+
valueStr: string,
|
|
99
|
+
label: string[] | null,
|
|
100
|
+
labelStr: string,
|
|
101
|
+
currentData: OptionConfig | null,
|
|
102
|
+
dataCollection: OptionConfig[]
|
|
103
|
+
) => void;
|
|
91
104
|
onCallbackListItem?: (optiondata: any) => void;
|
|
92
105
|
|
|
93
106
|
};
|
|
@@ -114,6 +127,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
|
|
|
114
127
|
id,
|
|
115
128
|
showSelectAll = false,
|
|
116
129
|
selectAllLabel = 'Select all',
|
|
130
|
+
singleSelect = false,
|
|
117
131
|
extractValueByBrackets,
|
|
118
132
|
style,
|
|
119
133
|
fetchFuncAsync,
|
|
@@ -226,7 +240,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
|
|
|
226
240
|
initDefaultValue('', dataInit);
|
|
227
241
|
cb?.();
|
|
228
242
|
|
|
229
|
-
onChange?.(null, null, '', null,
|
|
243
|
+
onChange?.(null, null, '', null, '', null, []);
|
|
230
244
|
},
|
|
231
245
|
set: (value: any, cb?: any) => {
|
|
232
246
|
initDefaultValue(value, dataInit);
|
|
@@ -241,7 +255,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
|
|
|
241
255
|
|
|
242
256
|
onChange?.(null, _value, _valueStr, _label, _labelStr, null, _resDataCollection);
|
|
243
257
|
} else {
|
|
244
|
-
onChange?.(null, null, value, null,
|
|
258
|
+
onChange?.(null, null, value ?? '', null, '', null, []);
|
|
245
259
|
}
|
|
246
260
|
|
|
247
261
|
},
|
|
@@ -281,11 +295,24 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
|
|
|
281
295
|
function handleCheckboxChange(itemKey: string) {
|
|
282
296
|
// first, make a copy of the original set rather than mutating the original
|
|
283
297
|
const newSelectedItems = new Set(selectedItems);
|
|
284
|
-
|
|
285
|
-
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
if (singleSelect) {
|
|
301
|
+
// If singleSelect is true, clear all selections first
|
|
302
|
+
newSelectedItems.clear();
|
|
303
|
+
// Only add the new selection if it wasn't already selected
|
|
304
|
+
if (!selectedItems.has(itemKey)) {
|
|
305
|
+
newSelectedItems.add(itemKey);
|
|
306
|
+
}
|
|
286
307
|
} else {
|
|
287
|
-
|
|
308
|
+
// Original multi-select behavior
|
|
309
|
+
if (!newSelectedItems.has(itemKey)) {
|
|
310
|
+
newSelectedItems.add(itemKey);
|
|
311
|
+
} else {
|
|
312
|
+
newSelectedItems.delete(itemKey);
|
|
313
|
+
}
|
|
288
314
|
}
|
|
315
|
+
|
|
289
316
|
setSelectedItems(newSelectedItems);
|
|
290
317
|
|
|
291
318
|
return newSelectedItems;
|
|
@@ -160,7 +160,7 @@ const SearchBar = forwardRef((props: SearchBarProps, externalRef: any) => {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
if (event.
|
|
163
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
164
164
|
// DO NOT USE "preventDefault()"
|
|
165
165
|
onPressEnter?.(event, onComposition);
|
|
166
166
|
}
|
|
@@ -163,7 +163,7 @@ const TagInput = forwardRef((props: TagInputProps, externalRef: any) => {
|
|
|
163
163
|
if ( onComposition ) return;
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
if (event.
|
|
166
|
+
if ((event.key === 'Enter' || event.key === 'NumpadEnter') || event.code === "Space") {
|
|
167
167
|
event.preventDefault();
|
|
168
168
|
|
|
169
169
|
if (alreadyInItems) return false;
|
|
@@ -77,7 +77,7 @@ const Textarea = forwardRef((props: TextareaProps, externalRef: any) => {
|
|
|
77
77
|
iconRight,
|
|
78
78
|
aiPredict = false,
|
|
79
79
|
aiPredictRemainingTextRGB = [153, 153, 153],
|
|
80
|
-
aiPredictConfirmKey = [['Enter'],['Tab'],['Shift', ' ']],
|
|
80
|
+
aiPredictConfirmKey = [['Enter', 'NumpadEnter'],['Tab'],['Shift', ' ']],
|
|
81
81
|
aiPredictFetchFuncAsync,
|
|
82
82
|
aiPredictFetchFuncMethod,
|
|
83
83
|
aiPredictFetchFuncMethodParams,
|
|
@@ -393,7 +393,7 @@ const Textarea = forwardRef((props: TextareaProps, externalRef: any) => {
|
|
|
393
393
|
if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
if (event.
|
|
396
|
+
if (event.key === 'Enter' || event.key === 'NumpadEnter') {
|
|
397
397
|
// DO NOT USE "preventDefault()"
|
|
398
398
|
onPressEnter?.(event, valRef.current);
|
|
399
399
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "4.7.
|
|
5
|
+
"version": "4.7.195",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|