funda-ui 4.2.255 → 4.2.445

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.
Files changed (77) hide show
  1. package/CascadingSelect/index.js +1 -1
  2. package/EventCalendar/index.css +3 -0
  3. package/EventCalendar/index.d.ts +4 -1
  4. package/EventCalendar/index.js +16 -4
  5. package/EventCalendarTimeline/index.css +17 -0
  6. package/EventCalendarTimeline/index.d.ts +9 -2
  7. package/EventCalendarTimeline/index.js +77 -22
  8. package/LiveSearch/index.css +12 -0
  9. package/LiveSearch/index.js +1 -1
  10. package/ModalDialog/index.js +1 -1
  11. package/MultilevelDropdownMenu/index.css +2 -2
  12. package/MultilevelDropdownMenu/index.js +54 -46
  13. package/MultipleSelect/index.css +35 -26
  14. package/MultipleSelect/index.d.ts +3 -0
  15. package/MultipleSelect/index.js +366 -134
  16. package/NativeSelect/index.js +75 -47
  17. package/Pagination/index.d.ts +2 -0
  18. package/Pagination/index.js +25 -21
  19. package/Radio/index.js +14 -6
  20. package/RangeSlider/index.css +1 -0
  21. package/Select/index.css +5 -0
  22. package/Select/index.d.ts +1 -0
  23. package/Select/index.js +31 -11
  24. package/Tabs/index.js +13 -2
  25. package/Tree/index.js +90 -56
  26. package/lib/cjs/CascadingSelect/index.js +1 -1
  27. package/lib/cjs/EventCalendar/index.d.ts +4 -1
  28. package/lib/cjs/EventCalendar/index.js +16 -4
  29. package/lib/cjs/EventCalendarTimeline/index.d.ts +9 -2
  30. package/lib/cjs/EventCalendarTimeline/index.js +77 -22
  31. package/lib/cjs/LiveSearch/index.js +1 -1
  32. package/lib/cjs/ModalDialog/index.js +1 -1
  33. package/lib/cjs/MultilevelDropdownMenu/index.js +54 -46
  34. package/lib/cjs/MultipleSelect/index.d.ts +3 -0
  35. package/lib/cjs/MultipleSelect/index.js +366 -134
  36. package/lib/cjs/NativeSelect/index.js +75 -47
  37. package/lib/cjs/Pagination/index.d.ts +2 -0
  38. package/lib/cjs/Pagination/index.js +25 -21
  39. package/lib/cjs/Radio/index.js +14 -6
  40. package/lib/cjs/Select/index.d.ts +1 -0
  41. package/lib/cjs/Select/index.js +31 -11
  42. package/lib/cjs/Tabs/index.js +13 -2
  43. package/lib/cjs/Tree/index.js +90 -56
  44. package/lib/css/EventCalendar/index.css +3 -0
  45. package/lib/css/EventCalendarTimeline/index.css +17 -0
  46. package/lib/css/LiveSearch/index.css +12 -0
  47. package/lib/css/MultilevelDropdownMenu/index.css +2 -2
  48. package/lib/css/MultipleSelect/index.css +35 -26
  49. package/lib/css/RangeSlider/index.css +1 -0
  50. package/lib/css/Select/index.css +5 -0
  51. package/lib/esm/CascadingSelect/index.tsx +1 -1
  52. package/lib/esm/EventCalendar/index.scss +2 -0
  53. package/lib/esm/EventCalendar/index.tsx +23 -6
  54. package/lib/esm/EventCalendarTimeline/index.scss +24 -1
  55. package/lib/esm/EventCalendarTimeline/index.tsx +195 -118
  56. package/lib/esm/LiveSearch/index.scss +14 -1
  57. package/lib/esm/LiveSearch/index.tsx +1 -1
  58. package/lib/esm/ModalDialog/index.tsx +1 -1
  59. package/lib/esm/MultilevelDropdownMenu/{MenuList.tsx → ItemList.tsx} +52 -45
  60. package/lib/esm/MultilevelDropdownMenu/index.scss +2 -2
  61. package/lib/esm/MultilevelDropdownMenu/index.tsx +12 -4
  62. package/lib/esm/MultipleSelect/ItemList.tsx +300 -0
  63. package/lib/esm/MultipleSelect/index.scss +61 -30
  64. package/lib/esm/MultipleSelect/index.tsx +56 -87
  65. package/lib/esm/MultipleSelect/multiple-select-utils/func.ts +29 -0
  66. package/lib/esm/NativeSelect/index.tsx +4 -18
  67. package/lib/esm/NativeSelect/native-select-utils/func.ts +40 -0
  68. package/lib/esm/Pagination/index.tsx +31 -22
  69. package/lib/esm/Radio/index.tsx +19 -6
  70. package/lib/esm/RangeSlider/index.scss +2 -0
  71. package/lib/esm/Select/index.scss +6 -1
  72. package/lib/esm/Select/index.tsx +70 -54
  73. package/lib/esm/Table/Table.tsx +2 -0
  74. package/lib/esm/Tabs/Tabs.tsx +19 -4
  75. package/lib/esm/Tree/TreeList.tsx +61 -54
  76. package/lib/esm/Tree/index.tsx +4 -0
  77. package/package.json +1 -1
@@ -4569,7 +4569,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
4569
4569
  var DEPTH = depth || 1055; // the default value same as bootstrap
4570
4570
  var M_WIDTH = fullscreen ? undefined : typeof maxWidth === 'function' ? maxWidth() : maxWidth ? maxWidth : undefined;
4571
4571
  var M_HEIGHT = typeof minHeight === 'function' ? minHeight() : minHeight ? minHeight : undefined;
4572
- var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? true : lockBodyScroll;
4572
+ var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? false : lockBodyScroll;
4573
4573
  var uniqueID = (0, funda_utils__WEBPACK_IMPORTED_MODULE_2__.useComId)();
4574
4574
  var modalRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4575
4575
  var triggerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
@@ -9365,6 +9365,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9365
9365
  onModalDeleteClose = props.onModalDeleteClose,
9366
9366
  onModalEditEvent = props.onModalEditEvent,
9367
9367
  onModalDeleteEvent = props.onModalDeleteEvent,
9368
+ onCellMouseEnter = props.onCellMouseEnter,
9369
+ onCellMouseLeave = props.onCellMouseLeave,
9370
+ onCellClick = props.onCellClick,
9368
9371
  tableListSectionTitle = props.tableListSectionTitle,
9369
9372
  tableCellMinWidth = props.tableCellMinWidth,
9370
9373
  tableTooltipDirection = props.tableTooltipDirection,
@@ -9451,6 +9454,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9451
9454
  var BODY_DRAG = draggable || false;
9452
9455
  var CELL_MIN_W = typeof tableCellMinWidth === 'undefined' ? SHOW_WEEK ? 100 : 50 : tableCellMinWidth;
9453
9456
  var tableGridRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
9457
+ var tableGridHeaderRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
9454
9458
  var scrollHeaderRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
9455
9459
  var scrollBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
9456
9460
  var scrollListRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
@@ -9847,7 +9851,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9847
9851
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
9848
9852
  className: "e-cal-tl-table__cell-cushion e-cal-tl-table__cell-cushion-title",
9849
9853
  dangerouslySetInnerHTML: {
9850
- __html: item.listSection
9854
+ __html: item.listSection.title
9851
9855
  }
9852
9856
  })));
9853
9857
  });
@@ -9905,12 +9909,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9905
9909
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
9906
9910
  } : _currentData[0]);
9907
9911
  if (EVENTS_ENABLED) {
9908
- setShowEdit(true);
9909
9912
  onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
9910
9913
  rowData: listSectionData,
9911
9914
  id: 0,
9912
9915
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
9913
- } : _currentData[0]);
9916
+ } : _currentData[0], function () {
9917
+ return setShowEdit(true);
9918
+ });
9914
9919
  }
9915
9920
  }
9916
9921
  }
@@ -9951,11 +9956,15 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9951
9956
  e.preventDefault();
9952
9957
  e.stopPropagation();
9953
9958
  setShowDelete(true);
9959
+ var _existsContent = _currentData[0];
9960
+ if (typeof _existsContent !== 'undefined') {
9961
+ _existsContent.rowData = listSectionData;
9962
+ }
9954
9963
  onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_currentData.length === 0 ? {
9955
9964
  rowData: listSectionData,
9956
9965
  id: 0,
9957
9966
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
9958
- } : _currentData[0]);
9967
+ } : _existsContent);
9959
9968
  }
9960
9969
  }, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
9961
9970
  width: "20px",
@@ -9978,11 +9987,30 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9978
9987
  "data-day": padZero(d),
9979
9988
  "data-week": i,
9980
9989
  "data-row": rowIndex,
9981
- onMouseEnter: _eventContentTooltip === '' ? function () {} : tableTooltipDisabled ? function () {} : _eventContent !== '' ? function (e) {
9982
- handleTableTooltipMouseEnter(e, _eventContentTooltip);
9983
- } : function () {},
9984
- onMouseLeave: _eventContentTooltip === '' ? function () {} : tableTooltipDisabled ? function () {} : _eventContent !== '' ? handleTableTooltipMouseLeave : function () {},
9990
+ onMouseEnter: function onMouseEnter(e) {
9991
+ onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
9992
+ if (_eventContentTooltip !== '') {
9993
+ if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
9994
+ if (_eventContent !== '') {
9995
+ handleTableTooltipMouseEnter(e, _eventContentTooltip);
9996
+ }
9997
+ }
9998
+ }
9999
+ },
10000
+ onMouseLeave: function onMouseLeave(e) {
10001
+ onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
10002
+ if (_eventContentTooltip !== '') {
10003
+ if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
10004
+ if (_eventContent !== '') {
10005
+ handleTableTooltipMouseLeave();
10006
+ }
10007
+ }
10008
+ }
10009
+ },
9985
10010
  onClick: function onClick(e) {
10011
+ //
10012
+ onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
10013
+
9986
10014
  // update row data
9987
10015
  setTableRowNum(rowIndex);
9988
10016
  if (_currentData.length > 0) {
@@ -9998,12 +10026,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
9998
10026
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
9999
10027
  } : _currentData[0]);
10000
10028
  if (EVENTS_ENABLED) {
10001
- setShowEdit(true);
10002
10029
  onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
10003
10030
  rowData: listSectionData,
10004
10031
  id: 0,
10005
10032
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10006
- } : _currentData[0]);
10033
+ } : _currentData[0], function () {
10034
+ return setShowEdit(true);
10035
+ });
10007
10036
  }
10008
10037
  }
10009
10038
  }
@@ -10085,12 +10114,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10085
10114
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10086
10115
  } : _currentData[0]);
10087
10116
  if (EVENTS_ENABLED) {
10088
- setShowEdit(true);
10089
10117
  onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
10090
10118
  rowData: listSectionData,
10091
10119
  id: 0,
10092
10120
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10093
- } : _currentData[0]);
10121
+ } : _currentData[0], function () {
10122
+ return setShowEdit(true);
10123
+ });
10094
10124
  }
10095
10125
  }
10096
10126
  }
@@ -10137,11 +10167,15 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10137
10167
  e.preventDefault();
10138
10168
  e.stopPropagation();
10139
10169
  setShowDelete(true);
10170
+ var _existsContent = _currentData[0];
10171
+ if (typeof _existsContent !== 'undefined') {
10172
+ _existsContent.rowData = listSectionData;
10173
+ }
10140
10174
  onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_currentData.length === 0 ? {
10141
10175
  rowData: listSectionData,
10142
10176
  id: 0,
10143
10177
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10144
- } : _currentData[0]);
10178
+ } : _existsContent);
10145
10179
  }
10146
10180
  }, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
10147
10181
  width: "20px",
@@ -10164,11 +10198,30 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10164
10198
  "data-day": padZero(d),
10165
10199
  "data-week": i,
10166
10200
  "data-row": rowIndex,
10167
- onMouseEnter: _eventContentTooltip === '' ? function () {} : tableTooltipDisabled ? function () {} : _eventContent !== '' ? function (e) {
10168
- handleTableTooltipMouseEnter(e, _eventContentTooltip);
10169
- } : function () {},
10170
- onMouseLeave: _eventContentTooltip === '' ? function () {} : tableTooltipDisabled ? function () {} : _eventContent !== '' ? handleTableTooltipMouseLeave : function () {},
10201
+ onMouseEnter: function onMouseEnter(e) {
10202
+ onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
10203
+ if (_eventContentTooltip !== '') {
10204
+ if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
10205
+ if (_eventContent !== '') {
10206
+ handleTableTooltipMouseEnter(e, _eventContentTooltip);
10207
+ }
10208
+ }
10209
+ }
10210
+ },
10211
+ onMouseLeave: function onMouseLeave(e) {
10212
+ onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
10213
+ if (_eventContentTooltip !== '') {
10214
+ if (typeof tableTooltipDisabled === 'undefined' || tableTooltipDisabled === false) {
10215
+ if (_eventContent !== '') {
10216
+ handleTableTooltipMouseLeave();
10217
+ }
10218
+ }
10219
+ }
10220
+ },
10171
10221
  onClick: function onClick(e) {
10222
+ //
10223
+ onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
10224
+
10172
10225
  // update row data
10173
10226
  setTableRowNum(rowIndex);
10174
10227
  if (_currentData.length > 0) {
@@ -10184,12 +10237,13 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10184
10237
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10185
10238
  } : _currentData[0]);
10186
10239
  if (EVENTS_ENABLED) {
10187
- setShowEdit(true);
10188
10240
  onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(_currentData.length === 0 ? {
10189
10241
  rowData: listSectionData,
10190
10242
  id: 0,
10191
10243
  date: getCalendarDate("".concat(year, "-").concat(month + 1, "-").concat(d))
10192
- } : _currentData[0]);
10244
+ } : _currentData[0], function () {
10245
+ return setShowEdit(true);
10246
+ });
10193
10247
  }
10194
10248
  }
10195
10249
  }
@@ -10537,7 +10591,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10537
10591
  type: "button",
10538
10592
  className: "e-cal-tl__btn e-cal-tl__btn--today",
10539
10593
  onClick: handleTodayChange
10540
- }, langToday || 'Today'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
10594
+ }, langToday || 'Today'))), val.length === 0 ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
10541
10595
  ref: tableGridRef,
10542
10596
  className: "e-cal-tl-table__timeline-table__wrapper invisible"
10543
10597
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
@@ -10546,6 +10600,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10546
10600
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("colgroup", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", {
10547
10601
  className: "e-cal-tl-table__datagrid-header"
10548
10602
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("col", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("thead", {
10603
+ ref: tableGridHeaderRef,
10549
10604
  role: "rowgroup"
10550
10605
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
10551
10606
  role: "presentation"
@@ -10623,7 +10678,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
10623
10678
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
10624
10679
  key: i
10625
10680
  }, generateDaysUi(item.eventSources, item.listSection, i, true));
10626
- }))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
10681
+ })))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
10627
10682
  show: showDelete,
10628
10683
  maskOpacity: modalMaskOpacity,
10629
10684
  triggerClassName: "",
@@ -9784,7 +9784,7 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
9784
9784
  onClick: handleSelect
9785
9785
  });
9786
9786
  }) : null))))) : null, hideIcon ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, !fetchTrigger ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
9787
- className: "livesearch__wrapper-searchbtn position-absolute top-0 end-0"
9787
+ className: "livesearch__wrapper-searchbtn"
9788
9788
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
9789
9789
  tabIndex: -1,
9790
9790
  type: "button",
@@ -4447,7 +4447,7 @@ var ModalDialog = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
4447
4447
  var DEPTH = depth || 1055; // the default value same as bootstrap
4448
4448
  var M_WIDTH = fullscreen ? undefined : typeof maxWidth === 'function' ? maxWidth() : maxWidth ? maxWidth : undefined;
4449
4449
  var M_HEIGHT = typeof minHeight === 'function' ? minHeight() : minHeight ? minHeight : undefined;
4450
- var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? true : lockBodyScroll;
4450
+ var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? false : lockBodyScroll;
4451
4451
  var uniqueID = (0,funda_utils__WEBPACK_IMPORTED_MODULE_2__.useComId)();
4452
4452
  var modalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4453
4453
  var triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
@@ -4199,7 +4199,7 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_re
4199
4199
  var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
4200
4200
  // EXTERNAL MODULE: ../Utils/dist/cjs/index.js
4201
4201
  var cjs = __webpack_require__(456);
4202
- ;// CONCATENATED MODULE: ./src/MenuList.tsx
4202
+ ;// CONCATENATED MODULE: ./src/ItemList.tsx
4203
4203
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4204
4204
  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."); }
4205
4205
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -4212,8 +4212,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
4212
4212
  /* Recursively nested components to traverse nodes
4213
4213
  -------------------------------------------------*/
4214
4214
 
4215
- function MenuList(props) {
4216
- var alternateCollapse = props.alternateCollapse,
4215
+ function ItemList(props) {
4216
+ var root = props.root,
4217
+ alternateCollapse = props.alternateCollapse,
4217
4218
  first = props.first,
4218
4219
  arrow = props.arrow,
4219
4220
  childClassName = props.childClassName,
@@ -4268,6 +4269,7 @@ function MenuList(props) {
4268
4269
  };
4269
4270
  function handleClick(e) {
4270
4271
  e.preventDefault();
4272
+ e.stopPropagation();
4271
4273
  var hyperlink = e.currentTarget;
4272
4274
  var url = hyperlink.getAttribute('href');
4273
4275
  var subElement = (0,cjs.getNextSiblings)(hyperlink, 'ul');
@@ -4321,48 +4323,50 @@ function MenuList(props) {
4321
4323
  }));
4322
4324
  }
4323
4325
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4324
- // Activate current item
4325
- //=====================
4326
- var allItems = rootRef.current ? [].slice.call(document.querySelectorAll(".".concat(childClassName, " a"))).map(function (item) {
4327
- var _item$parentNode$clas;
4328
- return {
4329
- href: item.getAttribute('href'),
4330
- el: item,
4331
- actived: (_item$parentNode$clas = item.parentNode.classList) !== null && _item$parentNode$clas !== void 0 && _item$parentNode$clas.contains('active') ? true : false,
4332
- expandedLink: document.body.contains(item.parentNode.parentNode.previousSibling) ? item.parentNode.parentNode.previousSibling : false
4333
- };
4334
- }) : [];
4335
- allItems.forEach(function (hyperlink) {
4336
- // Expand the currently active item by default
4337
- if (hyperlink.actived) {
4338
- hyperlink.el.setAttribute('aria-expanded', 'true');
4339
- if (hyperlink.expandedLink) {
4340
- var expandedLink = hyperlink.expandedLink; // <a>
4341
- activeClass(expandedLink.parentNode, 'add');
4342
- expandedLink.setAttribute('aria-expanded', true);
4343
- }
4344
-
4345
- // init <ul> height
4346
- var ul = (0,cjs.getNextSiblings)(hyperlink.el, 'ul');
4347
- [].slice.call(ul).forEach(function (_curUl) {
4348
- var allHeight = [].slice.call(_curUl.querySelectorAll('li')).map(function (_curLi) {
4349
- return _curLi.scrollHeight;
4350
- });
4326
+ if (root !== null && data.length > 0) {
4327
+ // Activate current item
4328
+ //=====================
4329
+ var allItems = rootRef.current ? [].slice.call(root.querySelectorAll(".".concat(childClassName, " a"))).map(function (item) {
4330
+ var _item$parentNode$clas;
4331
+ return {
4332
+ href: item.getAttribute('href'),
4333
+ el: item,
4334
+ actived: (_item$parentNode$clas = item.parentNode.classList) !== null && _item$parentNode$clas !== void 0 && _item$parentNode$clas.contains('active') ? true : false,
4335
+ expandedLink: document.body.contains(item.parentNode.parentNode.previousSibling) ? item.parentNode.parentNode.previousSibling : false
4336
+ };
4337
+ }) : [];
4338
+ allItems.forEach(function (hyperlink) {
4339
+ // Expand the currently active item by default
4340
+ if (hyperlink.actived) {
4341
+ hyperlink.el.setAttribute('aria-expanded', 'true');
4342
+ if (hyperlink.expandedLink) {
4343
+ var expandedLink = hyperlink.expandedLink; // <a>
4344
+ activeClass(expandedLink.parentNode, 'add');
4345
+ expandedLink.setAttribute('aria-expanded', true);
4346
+ }
4351
4347
 
4352
- // Prevent missing height, causing the last element to be clipped
4353
- var maxHeight = Math.max.apply(Math, _toConsumableArray(allHeight));
4354
- allHeight.push(maxHeight * 3);
4348
+ // init <ul> height
4349
+ var ul = (0,cjs.getNextSiblings)(hyperlink.el, 'ul');
4350
+ [].slice.call(ul).forEach(function (_curUl) {
4351
+ var allHeight = [].slice.call(_curUl.querySelectorAll('li')).map(function (_curLi) {
4352
+ return _curLi.scrollHeight;
4353
+ });
4355
4354
 
4356
- //
4357
- var totalHeight = allHeight.reduce(function (accumulator, currentValue) {
4358
- return accumulator + currentValue;
4359
- }, 0);
4355
+ // Prevent missing height, causing the last element to be clipped
4356
+ var maxHeight = Math.max.apply(Math, _toConsumableArray(allHeight));
4357
+ allHeight.push(maxHeight * 3);
4360
4358
 
4361
- // Prevent the use of iframe or other situations where the height is 0
4362
- _curUl.style.maxHeight = "".concat(totalHeight == 0 ? 999 : totalHeight, "px");
4363
- });
4364
- }
4365
- });
4359
+ //
4360
+ var totalHeight = allHeight.reduce(function (accumulator, currentValue) {
4361
+ return accumulator + currentValue;
4362
+ }, 0);
4363
+
4364
+ // Prevent the use of iframe or other situations where the height is 0
4365
+ _curUl.style.maxHeight = "".concat(totalHeight == 0 ? 999 : totalHeight, "px");
4366
+ });
4367
+ }
4368
+ });
4369
+ }
4366
4370
  }, [data]);
4367
4371
  if (data) {
4368
4372
  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("ul", {
@@ -4417,9 +4421,10 @@ function MenuList(props) {
4417
4421
  dangerouslySetInnerHTML: {
4418
4422
  __html: "".concat(item.title)
4419
4423
  }
4420
- }), item.children ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4424
+ }), item.children && item.children.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4421
4425
  className: "arrow"
4422
- }, arrowGenerator()) : ''), item.children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(MenuList, {
4426
+ }, arrowGenerator()) : ''), item.children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ItemList, {
4427
+ root: root,
4423
4428
  data: item.children,
4424
4429
  first: false,
4425
4430
  arrow: arrow,
@@ -4450,6 +4455,7 @@ var MultilevelDropdownMenu = function MultilevelDropdownMenu(props) {
4450
4455
  data = props.data,
4451
4456
  id = props.id,
4452
4457
  onSelect = props.onSelect;
4458
+ var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4453
4459
  var uniqueID = (0,cjs.useComId)();
4454
4460
  var idRes = id || uniqueID;
4455
4461
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
@@ -4461,8 +4467,10 @@ var MultilevelDropdownMenu = function MultilevelDropdownMenu(props) {
4461
4467
  }, [data]);
4462
4468
  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("nav", {
4463
4469
  id: idRes,
4464
- className: navbarClassName ? navbarClassName : "navbar"
4465
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(MenuList, {
4470
+ className: navbarClassName ? navbarClassName : "navbar",
4471
+ ref: rootRef
4472
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ItemList, {
4473
+ root: rootRef.current,
4466
4474
  alternateCollapse: alternateCollapse,
4467
4475
  first: true,
4468
4476
  arrow: arrow,
@@ -4,6 +4,7 @@ export interface OptionConfig {
4
4
  }
5
5
  declare type MultipleSelectProps = {
6
6
  wrapperClassName?: string;
7
+ childClassName?: string;
7
8
  wrapperMinHeight?: string;
8
9
  wrapperMinWidth?: string;
9
10
  availableHeaderTitle?: string;
@@ -16,6 +17,8 @@ declare type MultipleSelectProps = {
16
17
  hierarchical?: boolean;
17
18
  indentation?: string;
18
19
  doubleIndent?: boolean;
20
+ alternateCollapse?: boolean;
21
+ arrow?: React.ReactNode;
19
22
  value?: string;
20
23
  label?: React.ReactNode | string;
21
24
  name?: string;