funda-ui 4.7.270 → 4.7.333
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 +24 -34
- package/LiveSearch/index.d.ts +0 -1
- package/LiveSearch/index.js +25 -4
- package/Select/index.css +5 -0
- package/Select/index.js +72 -43
- package/lib/cjs/Accordion/index.js +24 -34
- package/lib/cjs/LiveSearch/index.d.ts +0 -1
- package/lib/cjs/LiveSearch/index.js +25 -4
- package/lib/cjs/Select/index.js +72 -43
- package/lib/css/Select/index.css +5 -0
- package/lib/esm/Accordion/Accordion.tsx +22 -27
- package/lib/esm/Accordion/AccordionItem.tsx +6 -5
- package/lib/esm/LiveSearch/index.tsx +26 -6
- package/lib/esm/SearchBar/index.tsx +0 -2
- package/lib/esm/Select/index.scss +8 -0
- package/lib/esm/Select/index.tsx +59 -43
- package/package.json +1 -1
package/Accordion/index.js
CHANGED
|
@@ -895,7 +895,7 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__
|
|
|
895
895
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
896
896
|
var cls = __webpack_require__(188);
|
|
897
897
|
;// CONCATENATED MODULE: ./src/AccordionItem.tsx
|
|
898
|
-
var _excluded = ["heightObserver", "index", "animSpeed", "easeType", "arrowOnly", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "
|
|
898
|
+
var _excluded = ["heightObserver", "index", "animSpeed", "easeType", "arrowOnly", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "activeItem", "title", "onToggleEv", "onTransitionEnd", "onItemCollapse", "isExpanded", "children"];
|
|
899
899
|
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); }
|
|
900
900
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
901
901
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -920,7 +920,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
920
920
|
itemHeaderClassName = props.itemHeaderClassName,
|
|
921
921
|
itemTriggerIcon = props.itemTriggerIcon,
|
|
922
922
|
itemStyle = props.itemStyle,
|
|
923
|
-
|
|
923
|
+
activeItem = props.activeItem,
|
|
924
924
|
title = props.title,
|
|
925
925
|
onToggleEv = props.onToggleEv,
|
|
926
926
|
onTransitionEnd = props.onTransitionEnd,
|
|
@@ -964,18 +964,18 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
964
964
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
965
965
|
if (contentWrapperRef.current && !initialHeightSet.current) {
|
|
966
966
|
initialHeightSet.current = true;
|
|
967
|
-
var shouldBeExpanded = typeof
|
|
967
|
+
var shouldBeExpanded = typeof activeItem !== 'undefined' && activeItem !== false;
|
|
968
968
|
if (controlledExpanded === undefined) {
|
|
969
969
|
setInternalExpanded(shouldBeExpanded);
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
// Set initial height when
|
|
972
|
+
// Set initial height when activeItem is true
|
|
973
973
|
if (shouldBeExpanded && contentRef.current) {
|
|
974
974
|
var contentHeight = contentRef.current.offsetHeight;
|
|
975
975
|
contentWrapperRef.current.style.height = "".concat(contentHeight, "px");
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
}, [
|
|
978
|
+
}, [activeItem, controlledExpanded]);
|
|
979
979
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
980
980
|
if (parseFloat(heightObserver) !== index) return;
|
|
981
981
|
|
|
@@ -1089,6 +1089,7 @@ var Accordion = function Accordion(props) {
|
|
|
1089
1089
|
var animSpeed = duration || 200;
|
|
1090
1090
|
var easeType = typeof alternateCollapse === 'undefined' ? EasingList['linear'] : EasingList[easing];
|
|
1091
1091
|
var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
1092
|
+
var animPlaceholderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
1092
1093
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
1093
1094
|
_useState2 = Accordion_slicedToArray(_useState, 2),
|
|
1094
1095
|
animOK = _useState2[0],
|
|
@@ -1113,9 +1114,7 @@ var Accordion = function Accordion(props) {
|
|
|
1113
1114
|
var $li = reactDomWrapperEl.querySelectorAll('.custom-accordion-item');
|
|
1114
1115
|
var $allContent = reactDomWrapperEl.querySelectorAll('.custom-accordion-content__wrapper');
|
|
1115
1116
|
var $curContent = reactDomEl.querySelector('.custom-accordion-content__wrapper');
|
|
1116
|
-
var $trigger = reactDomEl.querySelector('.custom-accordion-trigger');
|
|
1117
1117
|
if (reactDomEl.getAttribute('aria-expanded') === 'false' || reactDomEl.getAttribute('aria-expanded') === null) {
|
|
1118
|
-
var _curIndex;
|
|
1119
1118
|
setAnimOK(true);
|
|
1120
1119
|
setTimeout(function () {
|
|
1121
1120
|
setAnimOK(false);
|
|
@@ -1148,12 +1147,6 @@ var Accordion = function Accordion(props) {
|
|
|
1148
1147
|
});
|
|
1149
1148
|
}
|
|
1150
1149
|
reactDomEl.setAttribute('aria-expanded', 'true');
|
|
1151
|
-
|
|
1152
|
-
// Call onTriggerChange if it exists in the child props
|
|
1153
|
-
var childProps = (_curIndex = children[curIndex]) === null || _curIndex === void 0 ? void 0 : _curIndex.props;
|
|
1154
|
-
if (typeof (childProps === null || childProps === void 0 ? void 0 : childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1155
|
-
childProps.onTriggerChange($trigger, true);
|
|
1156
|
-
}
|
|
1157
1150
|
anim_default()($curContent, {
|
|
1158
1151
|
startHeight: 0,
|
|
1159
1152
|
endHeight: $curContent.scrollHeight,
|
|
@@ -1163,15 +1156,8 @@ var Accordion = function Accordion(props) {
|
|
|
1163
1156
|
animationInProgress.current = false;
|
|
1164
1157
|
});
|
|
1165
1158
|
} else {
|
|
1166
|
-
var _curIndex2;
|
|
1167
1159
|
reactDomEl.setAttribute('aria-expanded', 'false');
|
|
1168
1160
|
|
|
1169
|
-
// Call onTriggerChange if it exists in the child props
|
|
1170
|
-
var _childProps = (_curIndex2 = children[curIndex]) === null || _curIndex2 === void 0 ? void 0 : _curIndex2.props;
|
|
1171
|
-
if (typeof (_childProps === null || _childProps === void 0 ? void 0 : _childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1172
|
-
_childProps.onTriggerChange($trigger, false);
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
1161
|
// Remove current item from expanded items
|
|
1176
1162
|
setExpandedItems(function (prev) {
|
|
1177
1163
|
var newSet = new Set(prev);
|
|
@@ -1191,7 +1177,7 @@ var Accordion = function Accordion(props) {
|
|
|
1191
1177
|
|
|
1192
1178
|
// Initialize expanded items based on defaultActiveIndex or defaultActiveAll
|
|
1193
1179
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
1194
|
-
if (defaultActiveAll && children && rootRef.current) {
|
|
1180
|
+
if (defaultActiveAll && children && rootRef.current && animPlaceholderRef.current) {
|
|
1195
1181
|
var allIndices = Array.from({
|
|
1196
1182
|
length: children.length
|
|
1197
1183
|
}, function (_, i) {
|
|
@@ -1202,22 +1188,19 @@ var Accordion = function Accordion(props) {
|
|
|
1202
1188
|
// Actually expand all items without animation
|
|
1203
1189
|
var $allItems = rootRef.current.querySelectorAll('.custom-accordion-item');
|
|
1204
1190
|
Array.prototype.forEach.call($allItems, function (node, index) {
|
|
1205
|
-
var _index;
|
|
1206
|
-
node.setAttribute('aria-expanded', 'true');
|
|
1207
1191
|
var $curContent = node.querySelector('.custom-accordion-content__wrapper');
|
|
1208
|
-
var $trigger = node.querySelector('.custom-accordion-trigger');
|
|
1209
|
-
|
|
1210
|
-
// Call onTriggerChange if it exists in the child props
|
|
1211
|
-
var childProps = (_index = children[index]) === null || _index === void 0 ? void 0 : _index.props;
|
|
1212
|
-
if (typeof (childProps === null || childProps === void 0 ? void 0 : childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1213
|
-
childProps.onTriggerChange($trigger, true);
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
// Directly set height without animation
|
|
1217
1192
|
if ($curContent) {
|
|
1218
|
-
|
|
1193
|
+
// !!! Don't use the .custom-accordion-contentwrapper height directly, it may be more than a dozen pixels
|
|
1194
|
+
$curContent.style.height = "".concat(node.querySelector('.custom-accordion-content__wrapper > .custom-accordion-content').scrollHeight, "px");
|
|
1219
1195
|
}
|
|
1220
1196
|
});
|
|
1197
|
+
anim_default()(animPlaceholderRef.current, {
|
|
1198
|
+
startHeight: 0,
|
|
1199
|
+
endHeight: 10,
|
|
1200
|
+
speed: animSpeed
|
|
1201
|
+
}, easeType, function () {
|
|
1202
|
+
setTimeout(function () {}, animSpeed);
|
|
1203
|
+
});
|
|
1221
1204
|
} else if (defaultActiveIndex !== undefined) {
|
|
1222
1205
|
var initialExpanded = new Set();
|
|
1223
1206
|
if (Array.isArray(defaultActiveIndex)) {
|
|
@@ -1231,6 +1214,12 @@ var Accordion = function Accordion(props) {
|
|
|
1231
1214
|
}
|
|
1232
1215
|
}, [defaultActiveIndex, defaultActiveAll, children]);
|
|
1233
1216
|
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", {
|
|
1217
|
+
className: "custom-accordion-anim-placeholder",
|
|
1218
|
+
style: {
|
|
1219
|
+
display: 'none'
|
|
1220
|
+
},
|
|
1221
|
+
ref: animPlaceholderRef
|
|
1222
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
1234
1223
|
className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(wrapperClassName, 'accordion')),
|
|
1235
1224
|
role: "tablist",
|
|
1236
1225
|
ref: rootRef
|
|
@@ -1245,10 +1234,11 @@ var Accordion = function Accordion(props) {
|
|
|
1245
1234
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem, Accordion_extends({
|
|
1246
1235
|
key: "item" + i,
|
|
1247
1236
|
index: i,
|
|
1237
|
+
defaultActiveAll: defaultActiveAll,
|
|
1248
1238
|
animSpeed: animSpeed,
|
|
1249
1239
|
arrowOnly: arrowOnly,
|
|
1250
1240
|
heightObserver: heightObserver,
|
|
1251
|
-
|
|
1241
|
+
activeItem: _defaultActive,
|
|
1252
1242
|
onToggleEv: handleClickItem,
|
|
1253
1243
|
isExpanded: expandedItems.has(i) // Both controlled and uncontrolled modes are implemented
|
|
1254
1244
|
}, childProps));
|
package/LiveSearch/index.d.ts
CHANGED
package/LiveSearch/index.js
CHANGED
|
@@ -2802,7 +2802,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2802
2802
|
/* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8__);
|
|
2803
2803
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(188);
|
|
2804
2804
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__);
|
|
2805
|
-
var _excluded = ["contentRef", "popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "optionsExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "exceededSidePosOffset", "appearance", "isSearchInput", "
|
|
2805
|
+
var _excluded = ["contentRef", "popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "optionsExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "exceededSidePosOffset", "appearance", "isSearchInput", "loader", "readOnly", "disabled", "required", "placeholder", "noMatchPopup", "options", "value", "label", "name", "units", "iconLeft", "iconRight", "minLength", "maxLength", "id", "autoComplete", "autoCapitalize", "spellCheck", "icon", "btnId", "fetchTrigger", "hideIcon", "renderOption", "depth", "style", "winWidth", "tabIndex", "data", "autoShowOptions", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onClick", "onFetch", "onChange", "onKeyboardInput", "onBlur", "onPressEnter"];
|
|
2806
2806
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2807
2807
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2808
2808
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -2842,7 +2842,6 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
2842
2842
|
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
2843
2843
|
appearance = props.appearance,
|
|
2844
2844
|
isSearchInput = props.isSearchInput,
|
|
2845
|
-
allowSpacingRetrive = props.allowSpacingRetrive,
|
|
2846
2845
|
loader = props.loader,
|
|
2847
2846
|
readOnly = props.readOnly,
|
|
2848
2847
|
disabled = props.disabled,
|
|
@@ -3002,6 +3001,11 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3002
3001
|
}
|
|
3003
3002
|
}, [isOpen, rootRef, listRef]);
|
|
3004
3003
|
|
|
3004
|
+
// Only single symbols such as , #, and @ are allowed, and , a, a, , etc. are not allowed.
|
|
3005
|
+
var isSingleSpecialChar = function isSingleSpecialChar(str) {
|
|
3006
|
+
return typeof str === 'string' && /^[^\w\s]$/.test(str);
|
|
3007
|
+
};
|
|
3008
|
+
|
|
3005
3009
|
// Add function to the element that should be used as the scrollable area.
|
|
3006
3010
|
var _useWindowScroll = funda_utils_dist_cjs_useWindowScroll__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
3007
3011
|
performance: ['debounce', 500],
|
|
@@ -3173,12 +3177,29 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3173
3177
|
// Avoid fatal errors causing page crashes
|
|
3174
3178
|
var _queryString = typeof item.queryString !== 'undefined' && item.queryString !== null ? item.queryString : '';
|
|
3175
3179
|
var _val = typeof val !== 'undefined' && val !== null ? val : '';
|
|
3176
|
-
|
|
3180
|
+
|
|
3181
|
+
// STEP 1
|
|
3182
|
+
//========
|
|
3183
|
+
if (emptyValShowAll && _val === '') {
|
|
3177
3184
|
return true;
|
|
3178
3185
|
}
|
|
3179
|
-
|
|
3186
|
+
|
|
3187
|
+
// STEP 2
|
|
3188
|
+
//========
|
|
3189
|
+
// @@@ This code is triggered only if a custom request is used to update "options" @@@
|
|
3190
|
+
if (query && _val == ' ') {
|
|
3180
3191
|
return true;
|
|
3181
3192
|
}
|
|
3193
|
+
|
|
3194
|
+
// STEP 3
|
|
3195
|
+
//========
|
|
3196
|
+
// @@@ This code is triggered only if a custom request is used to update "options" @@@
|
|
3197
|
+
if (query && _val != '' && isSingleSpecialChar(_val)) {
|
|
3198
|
+
return true;
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
// STEP 4
|
|
3202
|
+
//========
|
|
3182
3203
|
if ((_queryString.split(',').some(function (l) {
|
|
3183
3204
|
return l.charAt(0) === _val.toLowerCase();
|
|
3184
3205
|
}) || _queryString.split(',').some(function (l) {
|
package/Select/index.css
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--cus-sel-searchbtn-hover-fill: #333;
|
|
17
17
|
--cus-sel-removebtn-fill: #000;
|
|
18
18
|
--cus-sel-removebtn-hover-fill: #f00;
|
|
19
|
+
--cus-sel-selected-color:#b1d0ff;
|
|
19
20
|
position: relative; /* Required */
|
|
20
21
|
/*------ Placeholder for input ------*/
|
|
21
22
|
/*------ Arrow ------*/
|
|
@@ -85,11 +86,15 @@
|
|
|
85
86
|
display: inline-block;
|
|
86
87
|
color: var(--cus-sel-placeholder-color);
|
|
87
88
|
width: 100%;
|
|
89
|
+
/* Select all highlights (for "Single selection") */
|
|
88
90
|
/* Text preview */
|
|
89
91
|
}
|
|
90
92
|
.custom-select__wrapper .custom-select-multi__control-blinking-cursor.animated {
|
|
91
93
|
animation: 1s mf-sel-blink step-end infinite;
|
|
92
94
|
}
|
|
95
|
+
.custom-select__wrapper .custom-select-multi__control-blinking-cursor.selected > span {
|
|
96
|
+
background-color: var(--cus-sel-selected-color);
|
|
97
|
+
}
|
|
93
98
|
.custom-select__wrapper .custom-select-multi__control-blinking-cursor.control-placeholder {
|
|
94
99
|
color: var(--cus-sel-input-placeholder-color);
|
|
95
100
|
}
|
package/Select/index.js
CHANGED
|
@@ -3771,6 +3771,12 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3771
3771
|
setBlinkingPosStart = _useState24[1];
|
|
3772
3772
|
var blinkingPosFauxRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3773
3773
|
var blinkingCursorPosDivRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3774
|
+
|
|
3775
|
+
// Select All status (for "Single selection")
|
|
3776
|
+
var _useState25 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
3777
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
3778
|
+
userInputboxIsAllSelected = _useState26[0],
|
|
3779
|
+
setUserInputboxIsAllSelected = _useState26[1];
|
|
3774
3780
|
var selectedSign = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
3775
3781
|
var MULTI_SEL_VALID = multiSelect ? multiSelect.valid : false;
|
|
3776
3782
|
var MULTI_SEL_ENTIRE_AREA_TRIGGER = typeof multiSelectEntireAreaTrigger === 'undefined' ? true : multiSelectEntireAreaTrigger;
|
|
@@ -3781,16 +3787,21 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3781
3787
|
allItemsLabel: 'All Content ({num})',
|
|
3782
3788
|
noneLabel: 'No items selected'
|
|
3783
3789
|
};
|
|
3784
|
-
var
|
|
3790
|
+
var _useState27 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
3785
3791
|
labels: [],
|
|
3786
3792
|
values: []
|
|
3787
3793
|
}),
|
|
3788
|
-
|
|
3789
|
-
controlArr =
|
|
3790
|
-
setControlArr =
|
|
3791
|
-
|
|
3794
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
3795
|
+
controlArr = _useState28[0],
|
|
3796
|
+
setControlArr = _useState28[1];
|
|
3797
|
+
|
|
3798
|
+
// Only single symbols such as , #, and @ are allowed, and , a, a, , etc. are not allowed.
|
|
3799
|
+
var isSingleSpecialChar = function isSingleSpecialChar(str) {
|
|
3800
|
+
return typeof str === 'string' && /^[^\w\s]$/.test(str);
|
|
3801
|
+
};
|
|
3802
|
+
var chkValueExist = function chkValueExist(v) {
|
|
3792
3803
|
return typeof v !== 'undefined' && v !== '';
|
|
3793
|
-
}
|
|
3804
|
+
};
|
|
3794
3805
|
var listContainerHeightLimit = function listContainerHeightLimit(num) {
|
|
3795
3806
|
var res = num;
|
|
3796
3807
|
if (res > LIST_CONTAINER_MAX_HEIGHT) res = LIST_CONTAINER_MAX_HEIGHT;
|
|
@@ -3929,35 +3940,12 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3929
3940
|
|
|
3930
3941
|
//performance
|
|
3931
3942
|
var handleChangeFetchSafe = useDebounce_default()(function (val) {
|
|
3932
|
-
var _orginalData = [];
|
|
3933
|
-
var update = function update(inputData) {
|
|
3934
|
-
var filterRes = function filterRes() {
|
|
3935
|
-
return inputData.filter(function (item) {
|
|
3936
|
-
// Avoid fatal errors causing page crashes
|
|
3937
|
-
var _queryString = typeof item.queryString !== 'undefined' && item.queryString !== null ? item.queryString : '';
|
|
3938
|
-
var _val = typeof val !== 'undefined' && val !== null ? val : '';
|
|
3939
|
-
if ((_queryString.split(',').some(function (l) {
|
|
3940
|
-
return l.charAt(0) === _val.toLowerCase();
|
|
3941
|
-
}) || _queryString.split(',').some(function (l) {
|
|
3942
|
-
return l.replace(/ /g, '').indexOf(_val.toLowerCase()) >= 0;
|
|
3943
|
-
}) || item.label.toLowerCase().indexOf(_val.toLowerCase()) >= 0) && _val != '') {
|
|
3944
|
-
return true;
|
|
3945
|
-
} else {
|
|
3946
|
-
return false;
|
|
3947
|
-
}
|
|
3948
|
-
});
|
|
3949
|
-
};
|
|
3950
|
-
return filterRes();
|
|
3951
|
-
};
|
|
3952
3943
|
if (fetchUpdate) {
|
|
3953
3944
|
// update filter status
|
|
3954
3945
|
setFilterItemsHasNoMatchData(false);
|
|
3955
3946
|
|
|
3956
3947
|
// Make a request
|
|
3957
3948
|
handleFetch(val).then(function (response) {
|
|
3958
|
-
_orginalData = response;
|
|
3959
|
-
var _filterRes = update(_orginalData);
|
|
3960
|
-
|
|
3961
3949
|
// pop win initalization
|
|
3962
3950
|
setTimeout(function () {
|
|
3963
3951
|
popwinPosInit();
|
|
@@ -3965,9 +3953,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3965
3953
|
}, 0);
|
|
3966
3954
|
});
|
|
3967
3955
|
} else {
|
|
3968
|
-
_orginalData = orginalData;
|
|
3969
|
-
var _filterRes = update(_orginalData);
|
|
3970
|
-
|
|
3971
3956
|
// pop win initalization
|
|
3972
3957
|
setTimeout(function () {
|
|
3973
3958
|
popwinPosInit();
|
|
@@ -3990,7 +3975,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3990
3975
|
_currentData,
|
|
3991
3976
|
_defaultValues,
|
|
3992
3977
|
_defaultLabels,
|
|
3993
|
-
|
|
3978
|
+
_filterRes,
|
|
3994
3979
|
_filterResQueryValue,
|
|
3995
3980
|
_filterResQueryLabel,
|
|
3996
3981
|
_currentData2,
|
|
@@ -4132,19 +4117,19 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4132
4117
|
|
|
4133
4118
|
// STEP 3: ===========
|
|
4134
4119
|
// If the default value is label, match value
|
|
4135
|
-
|
|
4120
|
+
_filterRes = [];
|
|
4136
4121
|
_filterResQueryValue = staticOptionsData.filter(function (item) {
|
|
4137
4122
|
return item.value == defaultValue;
|
|
4138
4123
|
});
|
|
4139
4124
|
_filterResQueryLabel = staticOptionsData.filter(function (item) {
|
|
4140
4125
|
return item.label == defaultValue;
|
|
4141
4126
|
});
|
|
4142
|
-
|
|
4143
|
-
if (_filterResQueryValue.length === 0)
|
|
4127
|
+
_filterRes = _filterResQueryValue;
|
|
4128
|
+
if (_filterResQueryValue.length === 0) _filterRes = _filterResQueryLabel;
|
|
4144
4129
|
|
|
4145
4130
|
// if the default value is Object
|
|
4146
|
-
if (isObject(inputDefault) &&
|
|
4147
|
-
|
|
4131
|
+
if (isObject(inputDefault) && _filterRes.length === 0) {
|
|
4132
|
+
_filterRes = [inputDefault];
|
|
4148
4133
|
}
|
|
4149
4134
|
|
|
4150
4135
|
// STEP 4: ===========
|
|
@@ -4156,9 +4141,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4156
4141
|
setControlValue('');
|
|
4157
4142
|
setControlLabel('');
|
|
4158
4143
|
} else {
|
|
4159
|
-
if (
|
|
4160
|
-
setControlValue(
|
|
4161
|
-
setControlLabel(formatIndentVal(
|
|
4144
|
+
if (_filterRes.length > 0) {
|
|
4145
|
+
setControlValue(_filterRes[0].value);
|
|
4146
|
+
setControlLabel(formatIndentVal(_filterRes[0].label, INDENT_LAST_PLACEHOLDER));
|
|
4162
4147
|
}
|
|
4163
4148
|
}
|
|
4164
4149
|
|
|
@@ -4426,6 +4411,25 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4426
4411
|
// Avoid fatal errors causing page crashes
|
|
4427
4412
|
var _queryString = typeof node.dataset.querystring !== 'undefined' && node.dataset.querystring !== null ? node.dataset.querystring : '';
|
|
4428
4413
|
var _val = typeof val !== 'undefined' && val !== null ? val : '';
|
|
4414
|
+
|
|
4415
|
+
// STEP 1
|
|
4416
|
+
//========
|
|
4417
|
+
// @@@ This code is triggered only if a custom request is used to update "options" @@@
|
|
4418
|
+
// If the condition is true, skip the loop and move on to the next node.
|
|
4419
|
+
if (fetchUpdate && _val == ' ') {
|
|
4420
|
+
return;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
// STEP 2
|
|
4424
|
+
//========
|
|
4425
|
+
// @@@ This code is triggered only if a custom request is used to update "options" @@@
|
|
4426
|
+
// If the condition is true, skip the loop and move on to the next node.
|
|
4427
|
+
if (fetchUpdate && _val != '' && isSingleSpecialChar(_val)) {
|
|
4428
|
+
return;
|
|
4429
|
+
}
|
|
4430
|
+
|
|
4431
|
+
// STEP 3
|
|
4432
|
+
//========
|
|
4429
4433
|
if ((_queryString.split(',').some(function (l) {
|
|
4430
4434
|
return l.charAt(0) === _val.toLowerCase();
|
|
4431
4435
|
}) || _queryString.split(',').some(function (l) {
|
|
@@ -4523,6 +4527,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4523
4527
|
// update filter status
|
|
4524
4528
|
setFilterItemsHasNoMatchData(false);
|
|
4525
4529
|
|
|
4530
|
+
// reset Select All status (for "Single selection")
|
|
4531
|
+
setUserInputboxIsAllSelected(false);
|
|
4532
|
+
|
|
4526
4533
|
// Unlocks the page
|
|
4527
4534
|
if (LOCK_BODY_SCROLL) (0,bodyScrollLock.enableBodyScroll)(document.querySelector('body'));
|
|
4528
4535
|
}
|
|
@@ -5498,6 +5505,15 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5498
5505
|
};
|
|
5499
5506
|
}, [orginalData]); // Avoid the issue that `setOptionsData(orginalData)` sets the original value to empty on the first entry
|
|
5500
5507
|
|
|
5508
|
+
// Select all detection functions in the input box (for "Single selection")
|
|
5509
|
+
function checkUserInputboxIsAllSelected(e) {
|
|
5510
|
+
var input = e.target;
|
|
5511
|
+
if (input && typeof input.selectionStart === 'number' && typeof input.selectionEnd === 'number') {
|
|
5512
|
+
setUserInputboxIsAllSelected(input.selectionStart === 0 && input.selectionEnd === input.value.length && input.value.length > 0);
|
|
5513
|
+
} else {
|
|
5514
|
+
setUserInputboxIsAllSelected(false);
|
|
5515
|
+
}
|
|
5516
|
+
}
|
|
5501
5517
|
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, label ? /*#__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", {
|
|
5502
5518
|
className: "custom-select__label"
|
|
5503
5519
|
}, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
@@ -5612,7 +5628,18 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5612
5628
|
autoComplete: typeof autoComplete === 'undefined' ? 'off' : autoComplete,
|
|
5613
5629
|
autoCapitalize: typeof autoCapitalize === 'undefined' ? 'off' : autoCapitalize,
|
|
5614
5630
|
spellCheck: typeof spellCheck === 'undefined' ? false : spellCheck
|
|
5615
|
-
}, attributes
|
|
5631
|
+
}, attributes, {
|
|
5632
|
+
// Select all detection (for "Single selection")
|
|
5633
|
+
onSelect: function onSelect(e) {
|
|
5634
|
+
checkUserInputboxIsAllSelected(e);
|
|
5635
|
+
},
|
|
5636
|
+
onKeyUp: function onKeyUp(e) {
|
|
5637
|
+
checkUserInputboxIsAllSelected(e);
|
|
5638
|
+
},
|
|
5639
|
+
onMouseUp: function onMouseUp(e) {
|
|
5640
|
+
checkUserInputboxIsAllSelected(e);
|
|
5641
|
+
}
|
|
5642
|
+
})))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", _extends({
|
|
5616
5643
|
ref: valueInputRef,
|
|
5617
5644
|
tabIndex: -1,
|
|
5618
5645
|
type: "hidden",
|
|
@@ -5642,7 +5669,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5642
5669
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
5643
5670
|
ref: blinkingCursorPosDivRef,
|
|
5644
5671
|
className: (0,cls.combinedCls)('custom-select-multi__control-blinking-cursor', {
|
|
5645
|
-
'animated': generateInputFocusStr() === BLINKING_CURSOR_STR
|
|
5672
|
+
'animated': generateInputFocusStr() === BLINKING_CURSOR_STR,
|
|
5673
|
+
// Select all highlights (for "Single selection")
|
|
5674
|
+
'selected': userInputboxIsAllSelected
|
|
5646
5675
|
})
|
|
5647
5676
|
}, controlTempValue || controlTempValue === '' ? controlTempValue.length === 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
5648
5677
|
className: "".concat(!hideBlinkingCursor() ? 'control-placeholder' : '')
|
|
@@ -895,7 +895,7 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__
|
|
|
895
895
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
896
896
|
var cls = __webpack_require__(188);
|
|
897
897
|
;// CONCATENATED MODULE: ./src/AccordionItem.tsx
|
|
898
|
-
var _excluded = ["heightObserver", "index", "animSpeed", "easeType", "arrowOnly", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "
|
|
898
|
+
var _excluded = ["heightObserver", "index", "animSpeed", "easeType", "arrowOnly", "itemClassName", "itemContentWrapperClassName", "itemContentClassName", "itemTriggerClassName", "itemHeaderClassName", "itemTriggerIcon", "itemStyle", "activeItem", "title", "onToggleEv", "onTransitionEnd", "onItemCollapse", "isExpanded", "children"];
|
|
899
899
|
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); }
|
|
900
900
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
901
901
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -920,7 +920,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
920
920
|
itemHeaderClassName = props.itemHeaderClassName,
|
|
921
921
|
itemTriggerIcon = props.itemTriggerIcon,
|
|
922
922
|
itemStyle = props.itemStyle,
|
|
923
|
-
|
|
923
|
+
activeItem = props.activeItem,
|
|
924
924
|
title = props.title,
|
|
925
925
|
onToggleEv = props.onToggleEv,
|
|
926
926
|
onTransitionEnd = props.onTransitionEnd,
|
|
@@ -964,18 +964,18 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
964
964
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
965
965
|
if (contentWrapperRef.current && !initialHeightSet.current) {
|
|
966
966
|
initialHeightSet.current = true;
|
|
967
|
-
var shouldBeExpanded = typeof
|
|
967
|
+
var shouldBeExpanded = typeof activeItem !== 'undefined' && activeItem !== false;
|
|
968
968
|
if (controlledExpanded === undefined) {
|
|
969
969
|
setInternalExpanded(shouldBeExpanded);
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
// Set initial height when
|
|
972
|
+
// Set initial height when activeItem is true
|
|
973
973
|
if (shouldBeExpanded && contentRef.current) {
|
|
974
974
|
var contentHeight = contentRef.current.offsetHeight;
|
|
975
975
|
contentWrapperRef.current.style.height = "".concat(contentHeight, "px");
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
}, [
|
|
978
|
+
}, [activeItem, controlledExpanded]);
|
|
979
979
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
980
980
|
if (parseFloat(heightObserver) !== index) return;
|
|
981
981
|
|
|
@@ -1089,6 +1089,7 @@ var Accordion = function Accordion(props) {
|
|
|
1089
1089
|
var animSpeed = duration || 200;
|
|
1090
1090
|
var easeType = typeof alternateCollapse === 'undefined' ? EasingList['linear'] : EasingList[easing];
|
|
1091
1091
|
var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
1092
|
+
var animPlaceholderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
1092
1093
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
1093
1094
|
_useState2 = Accordion_slicedToArray(_useState, 2),
|
|
1094
1095
|
animOK = _useState2[0],
|
|
@@ -1113,9 +1114,7 @@ var Accordion = function Accordion(props) {
|
|
|
1113
1114
|
var $li = reactDomWrapperEl.querySelectorAll('.custom-accordion-item');
|
|
1114
1115
|
var $allContent = reactDomWrapperEl.querySelectorAll('.custom-accordion-content__wrapper');
|
|
1115
1116
|
var $curContent = reactDomEl.querySelector('.custom-accordion-content__wrapper');
|
|
1116
|
-
var $trigger = reactDomEl.querySelector('.custom-accordion-trigger');
|
|
1117
1117
|
if (reactDomEl.getAttribute('aria-expanded') === 'false' || reactDomEl.getAttribute('aria-expanded') === null) {
|
|
1118
|
-
var _curIndex;
|
|
1119
1118
|
setAnimOK(true);
|
|
1120
1119
|
setTimeout(function () {
|
|
1121
1120
|
setAnimOK(false);
|
|
@@ -1148,12 +1147,6 @@ var Accordion = function Accordion(props) {
|
|
|
1148
1147
|
});
|
|
1149
1148
|
}
|
|
1150
1149
|
reactDomEl.setAttribute('aria-expanded', 'true');
|
|
1151
|
-
|
|
1152
|
-
// Call onTriggerChange if it exists in the child props
|
|
1153
|
-
var childProps = (_curIndex = children[curIndex]) === null || _curIndex === void 0 ? void 0 : _curIndex.props;
|
|
1154
|
-
if (typeof (childProps === null || childProps === void 0 ? void 0 : childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1155
|
-
childProps.onTriggerChange($trigger, true);
|
|
1156
|
-
}
|
|
1157
1150
|
anim_default()($curContent, {
|
|
1158
1151
|
startHeight: 0,
|
|
1159
1152
|
endHeight: $curContent.scrollHeight,
|
|
@@ -1163,15 +1156,8 @@ var Accordion = function Accordion(props) {
|
|
|
1163
1156
|
animationInProgress.current = false;
|
|
1164
1157
|
});
|
|
1165
1158
|
} else {
|
|
1166
|
-
var _curIndex2;
|
|
1167
1159
|
reactDomEl.setAttribute('aria-expanded', 'false');
|
|
1168
1160
|
|
|
1169
|
-
// Call onTriggerChange if it exists in the child props
|
|
1170
|
-
var _childProps = (_curIndex2 = children[curIndex]) === null || _curIndex2 === void 0 ? void 0 : _curIndex2.props;
|
|
1171
|
-
if (typeof (_childProps === null || _childProps === void 0 ? void 0 : _childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1172
|
-
_childProps.onTriggerChange($trigger, false);
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
1161
|
// Remove current item from expanded items
|
|
1176
1162
|
setExpandedItems(function (prev) {
|
|
1177
1163
|
var newSet = new Set(prev);
|
|
@@ -1191,7 +1177,7 @@ var Accordion = function Accordion(props) {
|
|
|
1191
1177
|
|
|
1192
1178
|
// Initialize expanded items based on defaultActiveIndex or defaultActiveAll
|
|
1193
1179
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
1194
|
-
if (defaultActiveAll && children && rootRef.current) {
|
|
1180
|
+
if (defaultActiveAll && children && rootRef.current && animPlaceholderRef.current) {
|
|
1195
1181
|
var allIndices = Array.from({
|
|
1196
1182
|
length: children.length
|
|
1197
1183
|
}, function (_, i) {
|
|
@@ -1202,22 +1188,19 @@ var Accordion = function Accordion(props) {
|
|
|
1202
1188
|
// Actually expand all items without animation
|
|
1203
1189
|
var $allItems = rootRef.current.querySelectorAll('.custom-accordion-item');
|
|
1204
1190
|
Array.prototype.forEach.call($allItems, function (node, index) {
|
|
1205
|
-
var _index;
|
|
1206
|
-
node.setAttribute('aria-expanded', 'true');
|
|
1207
1191
|
var $curContent = node.querySelector('.custom-accordion-content__wrapper');
|
|
1208
|
-
var $trigger = node.querySelector('.custom-accordion-trigger');
|
|
1209
|
-
|
|
1210
|
-
// Call onTriggerChange if it exists in the child props
|
|
1211
|
-
var childProps = (_index = children[index]) === null || _index === void 0 ? void 0 : _index.props;
|
|
1212
|
-
if (typeof (childProps === null || childProps === void 0 ? void 0 : childProps.onTriggerChange) === 'function' && $trigger) {
|
|
1213
|
-
childProps.onTriggerChange($trigger, true);
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
// Directly set height without animation
|
|
1217
1192
|
if ($curContent) {
|
|
1218
|
-
|
|
1193
|
+
// !!! Don't use the .custom-accordion-contentwrapper height directly, it may be more than a dozen pixels
|
|
1194
|
+
$curContent.style.height = "".concat(node.querySelector('.custom-accordion-content__wrapper > .custom-accordion-content').scrollHeight, "px");
|
|
1219
1195
|
}
|
|
1220
1196
|
});
|
|
1197
|
+
anim_default()(animPlaceholderRef.current, {
|
|
1198
|
+
startHeight: 0,
|
|
1199
|
+
endHeight: 10,
|
|
1200
|
+
speed: animSpeed
|
|
1201
|
+
}, easeType, function () {
|
|
1202
|
+
setTimeout(function () {}, animSpeed);
|
|
1203
|
+
});
|
|
1221
1204
|
} else if (defaultActiveIndex !== undefined) {
|
|
1222
1205
|
var initialExpanded = new Set();
|
|
1223
1206
|
if (Array.isArray(defaultActiveIndex)) {
|
|
@@ -1231,6 +1214,12 @@ var Accordion = function Accordion(props) {
|
|
|
1231
1214
|
}
|
|
1232
1215
|
}, [defaultActiveIndex, defaultActiveAll, children]);
|
|
1233
1216
|
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", {
|
|
1217
|
+
className: "custom-accordion-anim-placeholder",
|
|
1218
|
+
style: {
|
|
1219
|
+
display: 'none'
|
|
1220
|
+
},
|
|
1221
|
+
ref: animPlaceholderRef
|
|
1222
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
1234
1223
|
className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(wrapperClassName, 'accordion')),
|
|
1235
1224
|
role: "tablist",
|
|
1236
1225
|
ref: rootRef
|
|
@@ -1245,10 +1234,11 @@ var Accordion = function Accordion(props) {
|
|
|
1245
1234
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AccordionItem, Accordion_extends({
|
|
1246
1235
|
key: "item" + i,
|
|
1247
1236
|
index: i,
|
|
1237
|
+
defaultActiveAll: defaultActiveAll,
|
|
1248
1238
|
animSpeed: animSpeed,
|
|
1249
1239
|
arrowOnly: arrowOnly,
|
|
1250
1240
|
heightObserver: heightObserver,
|
|
1251
|
-
|
|
1241
|
+
activeItem: _defaultActive,
|
|
1252
1242
|
onToggleEv: handleClickItem,
|
|
1253
1243
|
isExpanded: expandedItems.has(i) // Both controlled and uncontrolled modes are implemented
|
|
1254
1244
|
}, childProps));
|