primereact 9.1.1 → 9.2.0

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 (158) hide show
  1. package/api/api.d.ts +2 -2
  2. package/autocomplete/autocomplete.cjs.js +1 -0
  3. package/autocomplete/autocomplete.cjs.min.js +1 -1
  4. package/autocomplete/autocomplete.esm.js +1 -0
  5. package/autocomplete/autocomplete.esm.min.js +1 -1
  6. package/autocomplete/autocomplete.js +1 -0
  7. package/autocomplete/autocomplete.min.js +1 -1
  8. package/avatar/avatar.cjs.js +2 -2
  9. package/avatar/avatar.cjs.min.js +1 -1
  10. package/avatar/avatar.esm.js +2 -2
  11. package/avatar/avatar.esm.min.js +1 -1
  12. package/avatar/avatar.js +2 -2
  13. package/avatar/avatar.min.js +1 -1
  14. package/calendar/calendar.cjs.js +2 -2
  15. package/calendar/calendar.cjs.min.js +1 -1
  16. package/calendar/calendar.esm.js +2 -2
  17. package/calendar/calendar.esm.min.js +1 -1
  18. package/calendar/calendar.js +2 -2
  19. package/calendar/calendar.min.js +1 -1
  20. package/contextmenu/contextmenu.cjs.js +61 -18
  21. package/contextmenu/contextmenu.cjs.min.js +1 -1
  22. package/contextmenu/contextmenu.d.ts +9 -0
  23. package/contextmenu/contextmenu.esm.js +63 -20
  24. package/contextmenu/contextmenu.esm.min.js +1 -1
  25. package/contextmenu/contextmenu.js +61 -18
  26. package/contextmenu/contextmenu.min.js +1 -1
  27. package/core/core.js +226 -115
  28. package/core/core.min.js +4 -4
  29. package/datatable/datatable.cjs.js +84 -79
  30. package/datatable/datatable.cjs.min.js +1 -1
  31. package/datatable/datatable.d.ts +2 -11
  32. package/datatable/datatable.esm.js +85 -80
  33. package/datatable/datatable.esm.min.js +1 -1
  34. package/datatable/datatable.js +84 -79
  35. package/datatable/datatable.min.css +1 -1
  36. package/datatable/datatable.min.js +1 -1
  37. package/dropdown/dropdown.cjs.js +1 -0
  38. package/dropdown/dropdown.cjs.min.js +1 -1
  39. package/dropdown/dropdown.esm.js +1 -0
  40. package/dropdown/dropdown.esm.min.js +1 -1
  41. package/dropdown/dropdown.js +1 -0
  42. package/dropdown/dropdown.min.js +1 -1
  43. package/hooks/hooks.cjs.js +34 -2
  44. package/hooks/hooks.cjs.min.js +1 -1
  45. package/hooks/hooks.d.ts +13 -0
  46. package/hooks/hooks.esm.js +34 -3
  47. package/hooks/hooks.esm.min.js +1 -1
  48. package/hooks/hooks.js +34 -2
  49. package/hooks/hooks.min.js +1 -1
  50. package/inputtext/inputtext.min.css +1 -1
  51. package/listbox/listbox.cjs.js +5 -4
  52. package/listbox/listbox.cjs.min.js +1 -1
  53. package/listbox/listbox.esm.js +5 -4
  54. package/listbox/listbox.esm.min.js +1 -1
  55. package/listbox/listbox.js +5 -4
  56. package/listbox/listbox.min.js +1 -1
  57. package/megamenu/megamenu.cjs.js +91 -6
  58. package/megamenu/megamenu.cjs.min.js +1 -1
  59. package/megamenu/megamenu.d.ts +9 -0
  60. package/megamenu/megamenu.esm.js +93 -8
  61. package/megamenu/megamenu.esm.min.js +1 -1
  62. package/megamenu/megamenu.js +91 -6
  63. package/megamenu/megamenu.min.css +1 -1
  64. package/megamenu/megamenu.min.js +1 -1
  65. package/multiselect/multiselect.cjs.js +1 -0
  66. package/multiselect/multiselect.cjs.min.js +1 -1
  67. package/multiselect/multiselect.esm.js +1 -0
  68. package/multiselect/multiselect.esm.min.js +1 -1
  69. package/multiselect/multiselect.js +1 -0
  70. package/multiselect/multiselect.min.js +1 -1
  71. package/package.json +1 -1
  72. package/primereact.all.cjs.js +554 -244
  73. package/primereact.all.cjs.min.js +1 -1
  74. package/primereact.all.esm.js +554 -245
  75. package/primereact.all.esm.min.js +1 -1
  76. package/primereact.all.js +554 -244
  77. package/primereact.all.min.js +1 -1
  78. package/resources/primereact.css +616 -667
  79. package/resources/primereact.min.css +1 -1
  80. package/resources/themes/arya-blue/theme.css +130 -2
  81. package/resources/themes/arya-green/theme.css +130 -2
  82. package/resources/themes/arya-orange/theme.css +130 -2
  83. package/resources/themes/arya-purple/theme.css +130 -2
  84. package/resources/themes/bootstrap4-dark-blue/theme.css +131 -2
  85. package/resources/themes/bootstrap4-dark-purple/theme.css +131 -2
  86. package/resources/themes/bootstrap4-light-blue/theme.css +131 -2
  87. package/resources/themes/bootstrap4-light-purple/theme.css +131 -2
  88. package/resources/themes/fluent-light/theme.css +131 -2
  89. package/resources/themes/lara-dark-blue/theme.css +131 -2
  90. package/resources/themes/lara-dark-indigo/theme.css +131 -2
  91. package/resources/themes/lara-dark-purple/theme.css +131 -2
  92. package/resources/themes/lara-dark-teal/theme.css +131 -2
  93. package/resources/themes/lara-light-blue/theme.css +131 -2
  94. package/resources/themes/lara-light-indigo/theme.css +131 -2
  95. package/resources/themes/lara-light-purple/theme.css +131 -2
  96. package/resources/themes/lara-light-teal/theme.css +131 -2
  97. package/resources/themes/luna-amber/theme.css +131 -2
  98. package/resources/themes/luna-blue/theme.css +131 -2
  99. package/resources/themes/luna-green/theme.css +131 -2
  100. package/resources/themes/luna-pink/theme.css +131 -2
  101. package/resources/themes/md-dark-deeppurple/theme.css +131 -2
  102. package/resources/themes/md-dark-indigo/theme.css +131 -2
  103. package/resources/themes/md-light-deeppurple/theme.css +131 -2
  104. package/resources/themes/md-light-indigo/theme.css +131 -2
  105. package/resources/themes/mdc-dark-deeppurple/theme.css +131 -2
  106. package/resources/themes/mdc-dark-indigo/theme.css +131 -2
  107. package/resources/themes/mdc-light-deeppurple/theme.css +131 -2
  108. package/resources/themes/mdc-light-indigo/theme.css +131 -2
  109. package/resources/themes/mira/theme.css +131 -2
  110. package/resources/themes/nano/theme.css +131 -2
  111. package/resources/themes/nova/theme.css +131 -2
  112. package/resources/themes/nova-accent/theme.css +131 -2
  113. package/resources/themes/nova-alt/theme.css +131 -2
  114. package/resources/themes/rhea/theme.css +131 -2
  115. package/resources/themes/saga-blue/theme.css +131 -2
  116. package/resources/themes/saga-green/theme.css +131 -2
  117. package/resources/themes/saga-orange/theme.css +131 -2
  118. package/resources/themes/saga-purple/theme.css +131 -2
  119. package/resources/themes/soho-dark/theme.css +131 -2
  120. package/resources/themes/soho-light/theme.css +131 -2
  121. package/resources/themes/tailwind-light/theme.css +131 -2
  122. package/resources/themes/vela-blue/theme.css +131 -2
  123. package/resources/themes/vela-green/theme.css +131 -2
  124. package/resources/themes/vela-orange/theme.css +131 -2
  125. package/resources/themes/vela-purple/theme.css +131 -2
  126. package/resources/themes/viva-dark/theme.css +131 -2
  127. package/resources/themes/viva-light/theme.css +131 -2
  128. package/tieredmenu/tieredmenu.cjs.js +69 -9
  129. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  130. package/tieredmenu/tieredmenu.d.ts +9 -0
  131. package/tieredmenu/tieredmenu.esm.js +71 -11
  132. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  133. package/tieredmenu/tieredmenu.js +69 -9
  134. package/tieredmenu/tieredmenu.min.js +1 -1
  135. package/toast/toast.min.css +1 -1
  136. package/treetable/treetable.cjs.js +12 -9
  137. package/treetable/treetable.cjs.min.js +1 -1
  138. package/treetable/treetable.d.ts +0 -5
  139. package/treetable/treetable.esm.js +12 -9
  140. package/treetable/treetable.esm.min.js +1 -1
  141. package/treetable/treetable.js +12 -9
  142. package/treetable/treetable.min.css +1 -1
  143. package/treetable/treetable.min.js +1 -1
  144. package/utils/utils.cjs.js +14 -9
  145. package/utils/utils.cjs.min.js +1 -1
  146. package/utils/utils.esm.js +14 -9
  147. package/utils/utils.esm.min.js +1 -1
  148. package/utils/utils.js +14 -9
  149. package/utils/utils.min.js +1 -1
  150. package/virtualscroller/virtualscroller.cjs.js +177 -104
  151. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  152. package/virtualscroller/virtualscroller.d.ts +20 -0
  153. package/virtualscroller/virtualscroller.esm.js +177 -104
  154. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  155. package/virtualscroller/virtualscroller.js +177 -104
  156. package/virtualscroller/virtualscroller.min.css +1 -1
  157. package/virtualscroller/virtualscroller.min.js +1 -1
  158. package/web-types.json +1 -1
@@ -266,7 +266,7 @@ var DomHandler = /*#__PURE__*/function () {
266
266
  key: "getOuterWidth",
267
267
  value: function getOuterWidth(el, margin) {
268
268
  if (el) {
269
- var width = el.offsetWidth || el.getBoundingClientRect().width;
269
+ var width = el.getBoundingClientRect().width || el.offsetWidth;
270
270
  if (margin) {
271
271
  var style = getComputedStyle(el);
272
272
  width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
@@ -279,7 +279,7 @@ var DomHandler = /*#__PURE__*/function () {
279
279
  key: "getOuterHeight",
280
280
  value: function getOuterHeight(el, margin) {
281
281
  if (el) {
282
- var height = el.offsetHeight || el.getBoundingClientRect().height;
282
+ var height = el.getBoundingClientRect().height || el.offsetHeight;
283
283
  if (margin) {
284
284
  var style = getComputedStyle(el);
285
285
  height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
@@ -463,7 +463,7 @@ var DomHandler = /*#__PURE__*/function () {
463
463
  }, {
464
464
  key: "absolutePosition",
465
465
  value: function absolutePosition(element, target) {
466
- if (element) {
466
+ if (element && target) {
467
467
  var elementDimensions = element.offsetParent ? {
468
468
  width: element.offsetWidth,
469
469
  height: element.offsetHeight
@@ -495,7 +495,7 @@ var DomHandler = /*#__PURE__*/function () {
495
495
  }, {
496
496
  key: "relativePosition",
497
497
  value: function relativePosition(element, target) {
498
- if (element) {
498
+ if (element && target) {
499
499
  var elementDimensions = element.offsetParent ? {
500
500
  width: element.offsetWidth,
501
501
  height: element.offsetHeight
@@ -1930,12 +1930,17 @@ var ObjectUtils = /*#__PURE__*/function () {
1930
1930
  key: "isValidChild",
1931
1931
  value: function isValidChild(child, type, validTypes) {
1932
1932
  /* eslint-disable */
1933
- try {
1934
- if ("production" !== 'production' && this.getProp(child, '__TYPE') !== type && child.type.displayName !== type) ;
1935
- } catch (error) {
1936
- // NOOP
1933
+ if (child) {
1934
+ var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
1935
+ var isValid = childType === type;
1936
+ try {
1937
+ var messageTypes; if ("production" !== 'production' && !isValid) ;
1938
+ } catch (error) {
1939
+ // NOOP
1940
+ }
1941
+ return isValid;
1937
1942
  }
1938
- return true;
1943
+ return false;
1939
1944
  /* eslint-enable */
1940
1945
  }
1941
1946
  }, {
@@ -2938,6 +2943,34 @@ var useInterval = function useInterval(fn) {
2938
2943
  };
2939
2944
  /* eslint-enable */
2940
2945
 
2946
+ var useMatchMedia = function useMatchMedia(query) {
2947
+ var when = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2948
+ var _React$useState = React.useState(false),
2949
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2950
+ matches = _React$useState2[0],
2951
+ setMatches = _React$useState2[1];
2952
+ var matchMedia = React.useRef(null);
2953
+ var handleChange = function handleChange(e) {
2954
+ return setMatches(e.matches);
2955
+ };
2956
+ var bind = function bind() {
2957
+ return matchMedia.current && matchMedia.current.addEventListener('change', handleChange);
2958
+ };
2959
+ var unbind = function unbind() {
2960
+ return matchMedia.current && matchMedia.current.removeEventListener('change', handleChange) && (matchMedia.current = null);
2961
+ };
2962
+ React.useEffect(function () {
2963
+ if (when) {
2964
+ matchMedia.current = window.matchMedia(query);
2965
+ setMatches(matchMedia.current.matches);
2966
+ bind();
2967
+ }
2968
+ return unbind;
2969
+ }, [query, when]);
2970
+ return matches;
2971
+ };
2972
+ /* eslint-enable */
2973
+
2941
2974
  /* eslint-disable */
2942
2975
  var useMountEffect = function useMountEffect(fn) {
2943
2976
  return React.useEffect(fn, []);
@@ -3263,11 +3296,14 @@ var useOverlayScrollListener = function useOverlayScrollListener(_ref) {
3263
3296
  /* eslint-enable */
3264
3297
 
3265
3298
  var useResizeListener = function useResizeListener(_ref) {
3266
- var listener = _ref.listener;
3299
+ var listener = _ref.listener,
3300
+ _ref$when = _ref.when,
3301
+ when = _ref$when === void 0 ? true : _ref$when;
3267
3302
  return useEventListener({
3268
3303
  target: 'window',
3269
3304
  type: 'resize',
3270
- listener: listener
3305
+ listener: listener,
3306
+ when: when
3271
3307
  });
3272
3308
  };
3273
3309
 
@@ -4716,14 +4752,18 @@ var VirtualScrollerBase = {
4716
4752
  id: null,
4717
4753
  style: null,
4718
4754
  className: null,
4755
+ tabIndex: 0,
4719
4756
  items: null,
4720
4757
  itemSize: 0,
4721
4758
  scrollHeight: null,
4722
4759
  scrollWidth: null,
4723
4760
  orientation: 'vertical',
4761
+ step: 0,
4724
4762
  numToleratedItems: null,
4725
4763
  delay: 0,
4726
4764
  resizeDelay: 10,
4765
+ appendOnly: false,
4766
+ inline: false,
4727
4767
  lazy: false,
4728
4768
  disabled: false,
4729
4769
  loaderDisabled: false,
@@ -4753,6 +4793,7 @@ function ownKeys$v(object, enumerableOnly) { var keys = Object.keys(object); if
4753
4793
  function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$v(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$v(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4754
4794
  var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
4755
4795
  var props = VirtualScrollerBase.getProps(inProps);
4796
+ var prevProps = usePrevious(inProps) || {};
4756
4797
  var vertical = props.orientation === 'vertical';
4757
4798
  var horizontal = props.orientation === 'horizontal';
4758
4799
  var both = props.orientation === 'both';
@@ -4770,25 +4811,29 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4770
4811
  _React$useState4 = _slicedToArray(_React$useState3, 2),
4771
4812
  lastState = _React$useState4[0],
4772
4813
  setLastState = _React$useState4[1];
4773
- var _React$useState5 = React.useState(both ? {
4814
+ var _React$useState5 = React.useState(0),
4815
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
4816
+ pageState = _React$useState6[0],
4817
+ setPageState = _React$useState6[1];
4818
+ var _React$useState7 = React.useState(both ? {
4774
4819
  rows: 0,
4775
4820
  cols: 0
4776
4821
  } : 0),
4777
- _React$useState6 = _slicedToArray(_React$useState5, 2),
4778
- numItemsInViewportState = _React$useState6[0],
4779
- setNumItemsInViewportState = _React$useState6[1];
4780
- var _React$useState7 = React.useState(props.numToleratedItems),
4781
4822
  _React$useState8 = _slicedToArray(_React$useState7, 2),
4782
- numToleratedItemsState = _React$useState8[0],
4783
- setNumToleratedItemsState = _React$useState8[1];
4784
- var _React$useState9 = React.useState(props.loading || false),
4823
+ numItemsInViewportState = _React$useState8[0],
4824
+ setNumItemsInViewportState = _React$useState8[1];
4825
+ var _React$useState9 = React.useState(props.numToleratedItems),
4785
4826
  _React$useState10 = _slicedToArray(_React$useState9, 2),
4786
- loadingState = _React$useState10[0],
4787
- setLoadingState = _React$useState10[1];
4788
- var _React$useState11 = React.useState([]),
4827
+ numToleratedItemsState = _React$useState10[0],
4828
+ setNumToleratedItemsState = _React$useState10[1];
4829
+ var _React$useState11 = React.useState(props.loading || false),
4789
4830
  _React$useState12 = _slicedToArray(_React$useState11, 2),
4790
- loaderArrState = _React$useState12[0],
4791
- setLoaderArrState = _React$useState12[1];
4831
+ loadingState = _React$useState12[0],
4832
+ setLoadingState = _React$useState12[1];
4833
+ var _React$useState13 = React.useState([]),
4834
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
4835
+ loaderArrState = _React$useState14[0],
4836
+ setLoaderArrState = _React$useState14[1];
4792
4837
  var elementRef = React.useRef(null);
4793
4838
  var _contentRef = React.useRef(null);
4794
4839
  var _spacerRef = React.useRef(null);
@@ -4799,14 +4844,19 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4799
4844
  } : 0);
4800
4845
  var scrollTimeout = React.useRef(null);
4801
4846
  var resizeTimeout = React.useRef(null);
4847
+ var contentStyle = React.useRef({});
4848
+ var spacerStyle = React.useRef({});
4802
4849
  var defaultWidth = React.useRef(null);
4803
4850
  var defaultHeight = React.useRef(null);
4804
- var prevItems = usePrevious(props.items);
4805
- var prevLoading = usePrevious(props.loading);
4851
+ var defaultContentWidth = React.useRef(null);
4852
+ var defaultContentHeight = React.useRef(null);
4853
+ var isItemRangeChanged = React.useRef(false);
4854
+ var lazyLoadState = React.useRef(null);
4806
4855
  var _useResizeListener = useResizeListener({
4807
4856
  listener: function listener(event) {
4808
4857
  return onResize();
4809
- }
4858
+ },
4859
+ when: !props.disabled
4810
4860
  }),
4811
4861
  _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
4812
4862
  bindWindowResizeListener = _useResizeListener2[0];
@@ -4815,13 +4865,23 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4815
4865
  type: 'orientationchange',
4816
4866
  listener: function listener(event) {
4817
4867
  return onResize();
4818
- }
4868
+ },
4869
+ when: !props.disabled
4819
4870
  }),
4820
4871
  _useEventListener2 = _slicedToArray(_useEventListener, 1),
4821
4872
  bindOrientationChangeListener = _useEventListener2[0];
4822
4873
  var getElementRef = function getElementRef() {
4823
4874
  return elementRef;
4824
4875
  };
4876
+ var getPageByFirst = function getPageByFirst(first) {
4877
+ return Math.floor((first + numToleratedItemsState * 4) / (props.step || 1));
4878
+ };
4879
+ var setContentElement = function setContentElement(element) {
4880
+ _contentRef.current = element || _contentRef.current || DomHandler.findSingle(elementRef.current, '.p-virtualscroller-content');
4881
+ };
4882
+ var isPageChanged = function isPageChanged(first) {
4883
+ return props.step ? pageState !== getPageByFirst(first) : true;
4884
+ };
4825
4885
  var scrollTo = function scrollTo(options) {
4826
4886
  lastScrollPos.current = both ? {
4827
4887
  top: 0,
@@ -4833,13 +4893,14 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4833
4893
  var behavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';
4834
4894
  var _calculateNumItems = calculateNumItems(),
4835
4895
  numToleratedItems = _calculateNumItems.numToleratedItems;
4896
+ var contentPos = getContentPosition();
4836
4897
  var calculateFirst = function calculateFirst() {
4837
4898
  var _index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
4838
4899
  var _numT = arguments.length > 1 ? arguments[1] : undefined;
4839
4900
  return _index <= _numT ? 0 : _index;
4840
4901
  };
4841
- var calculateCoord = function calculateCoord(_first, _size) {
4842
- return _first * _size;
4902
+ var calculateCoord = function calculateCoord(_first, _size, _cpos) {
4903
+ return _first * _size + _cpos;
4843
4904
  };
4844
4905
  var scrollToItem = function scrollToItem() {
4845
4906
  var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
@@ -4850,20 +4911,25 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4850
4911
  behavior: behavior
4851
4912
  });
4852
4913
  };
4914
+ var newFirst = both ? {
4915
+ rows: 0,
4916
+ cols: 0
4917
+ } : 0;
4918
+ var isRangeChanged = false;
4853
4919
  if (both) {
4854
- var newFirst = {
4920
+ newFirst = {
4855
4921
  rows: calculateFirst(index[0], numToleratedItems[0]),
4856
4922
  cols: calculateFirst(index[1], numToleratedItems[1])
4857
4923
  };
4858
- if (newFirst.rows !== firstState.rows || newFirst.cols !== firstState.cols) {
4859
- scrollToItem(calculateCoord(newFirst.cols, props.itemSize[1]), calculateCoord(newFirst.rows, props.itemSize[0]));
4860
- }
4924
+ scrollToItem(calculateCoord(newFirst.cols, props.itemSize[1], contentPos.left), calculateCoord(newFirst.rows, props.itemSize[0], contentPos.top));
4925
+ isRangeChanged = firstState.rows !== newFirst.rows || firstState.cols !== newFirst.cols;
4861
4926
  } else {
4862
- var _newFirst = calculateFirst(index, numToleratedItems);
4863
- if (_newFirst !== firstState) {
4864
- horizontal ? scrollToItem(calculateCoord(_newFirst, props.itemSize), 0) : scrollToItem(0, calculateCoord(_newFirst, props.itemSize));
4865
- }
4927
+ newFirst = calculateFirst(index, numToleratedItems);
4928
+ horizontal ? scrollToItem(calculateCoord(newFirst, props.itemSize, contentPos.left), 0) : scrollToItem(0, calculateCoord(newFirst, props.itemSize, contentPos.top));
4929
+ isRangeChanged = firstState !== newFirst;
4866
4930
  }
4931
+ isItemRangeChanged.current = isRangeChanged;
4932
+ setFirstState(newFirst);
4867
4933
  };
4868
4934
  var scrollInView = function scrollInView(index, to) {
4869
4935
  var behavior = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'auto';
@@ -4980,7 +5046,8 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
4980
5046
  var _calculateNumItems2 = calculateNumItems(),
4981
5047
  numItemsInViewport = _calculateNumItems2.numItemsInViewport,
4982
5048
  numToleratedItems = _calculateNumItems2.numToleratedItems;
4983
- var calculateLast = function calculateLast(_first, _num, _numT, _isCols) {
5049
+ var calculateLast = function calculateLast(_first, _num, _numT) {
5050
+ var _isCols = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
4984
5051
  return getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);
4985
5052
  };
4986
5053
  var last = both ? {
@@ -5002,9 +5069,15 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5002
5069
  }));
5003
5070
  }
5004
5071
  if (props.lazy) {
5005
- props.onLazyLoad && props.onLazyLoad({
5006
- first: firstState,
5007
- last: last
5072
+ Promise.resolve().then(function () {
5073
+ lazyLoadState.current = {
5074
+ first: props.step ? both ? {
5075
+ rows: 0,
5076
+ cols: firstState.cols
5077
+ } : 0 : firstState,
5078
+ last: Math.min(props.step ? props.step : last, props.items.length)
5079
+ };
5080
+ props.onLazyLoad && props.onLazyLoad(lazyLoadState.current);
5008
5081
  });
5009
5082
  }
5010
5083
  };
@@ -5013,12 +5086,21 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5013
5086
  Promise.resolve().then(function () {
5014
5087
  if (_contentRef.current) {
5015
5088
  _contentRef.current.style.minHeight = _contentRef.current.style.minWidth = 'auto';
5016
- var _contentRef$current = _contentRef.current,
5017
- offsetWidth = _contentRef$current.offsetWidth,
5018
- offsetHeight = _contentRef$current.offsetHeight;
5019
- (both || horizontal) && (elementRef.current.style.width = (offsetWidth < defaultWidth.current ? offsetWidth : defaultWidth.current) + 'px');
5020
- (both || vertical) && (elementRef.current.style.height = (offsetHeight < defaultHeight.current ? offsetHeight : defaultHeight.current) + 'px');
5089
+ _contentRef.current.style.position = 'relative';
5090
+ elementRef.current.style.contain = 'none';
5091
+
5092
+ /*const [contentWidth, contentHeight] = [DomHandler.getWidth(contentRef.current), DomHandler.getHeight(contentRef.current)];
5093
+ contentWidth !== defaultContentWidth.current && (elementRef.current.style.width = '');
5094
+ contentHeight !== defaultContentHeight.current && (elementRef.current.style.height = '');*/
5095
+
5096
+ var _ref = [DomHandler.getWidth(elementRef.current), DomHandler.getHeight(elementRef.current)],
5097
+ width = _ref[0],
5098
+ height = _ref[1];
5099
+ (both || horizontal) && (elementRef.current.style.width = (width < defaultWidth.current ? width : props.scrollWidth || defaultWidth.current) + 'px');
5100
+ (both || vertical) && (elementRef.current.style.height = (height < defaultHeight.current ? height : props.scrollHeight || defaultHeight.current) + 'px');
5021
5101
  _contentRef.current.style.minHeight = _contentRef.current.style.minWidth = '';
5102
+ _contentRef.current.style.position = '';
5103
+ elementRef.current.style.contain = '';
5022
5104
  }
5023
5105
  });
5024
5106
  }
@@ -5031,10 +5113,10 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5031
5113
  var getContentPosition = function getContentPosition() {
5032
5114
  if (_contentRef.current) {
5033
5115
  var style = getComputedStyle(_contentRef.current);
5034
- var left = parseInt(style.paddingLeft, 10) + Math.max(parseInt(style.left, 10), 0);
5035
- var right = parseInt(style.paddingRight, 10) + Math.max(parseInt(style.right, 10), 0);
5036
- var top = parseInt(style.paddingTop, 10) + Math.max(parseInt(style.top, 10), 0);
5037
- var bottom = parseInt(style.paddingBottom, 10) + Math.max(parseInt(style.bottom, 10), 0);
5116
+ var left = parseFloat(style.paddingLeft) + Math.max(parseFloat(style.left) || 0, 0);
5117
+ var right = parseFloat(style.paddingRight) + Math.max(parseFloat(style.right) || 0, 0);
5118
+ var top = parseFloat(style.paddingTop) + Math.max(parseFloat(style.top) || 0, 0);
5119
+ var bottom = parseFloat(style.paddingBottom) + Math.max(parseFloat(style.bottom) || 0, 0);
5038
5120
  return {
5039
5121
  left: left,
5040
5122
  right: right,
@@ -5071,11 +5153,11 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5071
5153
  };
5072
5154
  var setSpacerSize = function setSpacerSize() {
5073
5155
  var items = props.items;
5074
- if (_spacerRef.current && items) {
5156
+ if (items) {
5075
5157
  var contentPos = getContentPosition();
5076
5158
  var setProp = function setProp(_name, _value, _size) {
5077
5159
  var _cpos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
5078
- return _spacerRef.current.style[_name] = (_value || []).length * _size + _cpos + 'px';
5160
+ return spacerStyle.current = _objectSpread$v(_objectSpread$v({}, spacerStyle.current), _defineProperty({}, "".concat(_name), (_value || []).length * _size + _cpos + 'px'));
5079
5161
  };
5080
5162
  if (both) {
5081
5163
  setProp('height', items, props.itemSize[0], contentPos.y);
@@ -5086,7 +5168,7 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5086
5168
  }
5087
5169
  };
5088
5170
  var setContentPosition = function setContentPosition(pos) {
5089
- if (_contentRef.current) {
5171
+ if (_contentRef.current && !props.appendOnly) {
5090
5172
  var first = pos ? pos.first : firstState;
5091
5173
  var calculateTranslateVal = function calculateTranslateVal(_first, _size) {
5092
5174
  return _first * _size;
@@ -5095,7 +5177,9 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5095
5177
  var _x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
5096
5178
  var _y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
5097
5179
  _stickyRef.current && (_stickyRef.current.style.top = "-".concat(_y, "px"));
5098
- _contentRef.current.style.transform = "translate3d(".concat(_x, "px, ").concat(_y, "px, 0)");
5180
+ contentStyle.current = _objectSpread$v(_objectSpread$v({}, contentStyle.current), {
5181
+ transform: "translate3d(".concat(_x, "px, ").concat(_y, "px, 0)")
5182
+ });
5099
5183
  };
5100
5184
  if (both) {
5101
5185
  setTransform(calculateTranslateVal(first.cols, props.itemSize[1]), calculateTranslateVal(first.rows, props.itemSize[0]));
@@ -5139,36 +5223,40 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5139
5223
  if (both) {
5140
5224
  var isScrollDown = lastScrollPos.current.top <= scrollTop;
5141
5225
  var isScrollRight = lastScrollPos.current.left <= scrollLeft;
5142
- var currentIndex = {
5143
- rows: calculateCurrentIndex(scrollTop, props.itemSize[0]),
5144
- cols: calculateCurrentIndex(scrollLeft, props.itemSize[1])
5145
- };
5146
- var triggerIndex = {
5147
- rows: calculateTriggerIndex(currentIndex.rows, firstState.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0], isScrollDown),
5148
- cols: calculateTriggerIndex(currentIndex.cols, firstState.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], isScrollRight)
5149
- };
5150
- newFirst = {
5151
- rows: calculateFirst(currentIndex.rows, triggerIndex.rows, firstState.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0], isScrollDown),
5152
- cols: calculateFirst(currentIndex.cols, triggerIndex.cols, firstState.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], isScrollRight)
5153
- };
5154
- newLast = {
5155
- rows: calculateLast(currentIndex.rows, newFirst.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0]),
5156
- cols: calculateLast(currentIndex.cols, newFirst.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], true)
5157
- };
5158
- isRangeChanged = newFirst.rows !== firstState.rows || newLast.rows !== lastState.rows || newFirst.cols !== firstState.cols || newLast.cols !== lastState.cols;
5159
- newScrollPos = {
5160
- top: scrollTop,
5161
- left: scrollLeft
5162
- };
5226
+ if (!props.appendOnly || props.appendOnly && (isScrollDown || isScrollRight)) {
5227
+ var currentIndex = {
5228
+ rows: calculateCurrentIndex(scrollTop, props.itemSize[0]),
5229
+ cols: calculateCurrentIndex(scrollLeft, props.itemSize[1])
5230
+ };
5231
+ var triggerIndex = {
5232
+ rows: calculateTriggerIndex(currentIndex.rows, firstState.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0], isScrollDown),
5233
+ cols: calculateTriggerIndex(currentIndex.cols, firstState.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], isScrollRight)
5234
+ };
5235
+ newFirst = {
5236
+ rows: calculateFirst(currentIndex.rows, triggerIndex.rows, firstState.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0], isScrollDown),
5237
+ cols: calculateFirst(currentIndex.cols, triggerIndex.cols, firstState.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], isScrollRight)
5238
+ };
5239
+ newLast = {
5240
+ rows: calculateLast(currentIndex.rows, newFirst.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0]),
5241
+ cols: calculateLast(currentIndex.cols, newFirst.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], true)
5242
+ };
5243
+ isRangeChanged = newFirst.rows !== firstState.rows || newLast.rows !== lastState.rows || newFirst.cols !== firstState.cols || newLast.cols !== lastState.cols || isItemRangeChanged.current;
5244
+ newScrollPos = {
5245
+ top: scrollTop,
5246
+ left: scrollLeft
5247
+ };
5248
+ }
5163
5249
  } else {
5164
5250
  var scrollPos = horizontal ? scrollLeft : scrollTop;
5165
5251
  var isScrollDownOrRight = lastScrollPos.current <= scrollPos;
5166
- var _currentIndex2 = calculateCurrentIndex(scrollPos, props.itemSize);
5167
- var _triggerIndex2 = calculateTriggerIndex(_currentIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
5168
- newFirst = calculateFirst(_currentIndex2, _triggerIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
5169
- newLast = calculateLast(_currentIndex2, newFirst, lastState, numItemsInViewportState, numToleratedItemsState);
5170
- isRangeChanged = newFirst !== firstState || newLast !== lastState;
5171
- newScrollPos = scrollPos;
5252
+ if (!props.appendOnly || props.appendOnly && isScrollDownOrRight) {
5253
+ var _currentIndex2 = calculateCurrentIndex(scrollPos, props.itemSize);
5254
+ var _triggerIndex2 = calculateTriggerIndex(_currentIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
5255
+ newFirst = calculateFirst(_currentIndex2, _triggerIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
5256
+ newLast = calculateLast(_currentIndex2, newFirst, lastState, numItemsInViewportState, numToleratedItemsState);
5257
+ isRangeChanged = newFirst !== firstState || newLast !== lastState || isItemRangeChanged.current;
5258
+ newScrollPos = scrollPos;
5259
+ }
5172
5260
  }
5173
5261
  return {
5174
5262
  first: newFirst,
@@ -5193,8 +5281,14 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5193
5281
  setLastState(last);
5194
5282
  lastScrollPos.current = scrollPos;
5195
5283
  props.onScrollIndexChange && props.onScrollIndexChange(newState);
5196
- if (props.lazy) {
5197
- props.onLazyLoad && props.onLazyLoad(newState);
5284
+ if (props.lazy && isPageChanged(first)) {
5285
+ var newLazyLoadState = {
5286
+ first: props.step ? Math.min(getPageByFirst(first) * props.step, props.items.length - props.step) : first,
5287
+ last: Math.min(props.step ? (getPageByFirst(first) + 1) * props.step : last, props.items.length)
5288
+ };
5289
+ var isLazyStateChanged = !lazyLoadState.current || lazyLoadState.current.first !== newLazyLoadState.first || lazyLoadState.current.last !== newLazyLoadState.last;
5290
+ isLazyStateChanged && props.onLazyLoad && props.onLazyLoad(newLazyLoadState);
5291
+ lazyLoadState.current = newLazyLoadState;
5198
5292
  }
5199
5293
  }
5200
5294
  };
@@ -5204,17 +5298,21 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5204
5298
  if (scrollTimeout.current) {
5205
5299
  clearTimeout(scrollTimeout.current);
5206
5300
  }
5207
- if (!loadingState && props.showLoader) {
5208
- var _onScrollPositionChan2 = onScrollPositionChange(event),
5209
- changed = _onScrollPositionChan2.isRangeChanged;
5210
- changed && setLoadingState(true);
5301
+ if (isPageChanged(firstState)) {
5302
+ if (!loadingState && props.showLoader) {
5303
+ var _onScrollPositionChan2 = onScrollPositionChange(event),
5304
+ isRangeChanged = _onScrollPositionChan2.isRangeChanged;
5305
+ var changed = isRangeChanged || (props.step ? isPageChanged(firstState) : false);
5306
+ changed && setLoadingState(true);
5307
+ }
5308
+ scrollTimeout.current = setTimeout(function () {
5309
+ onScrollChange(event);
5310
+ if (loadingState && props.showLoader && (!props.lazy || props.loading === undefined)) {
5311
+ setLoadingState(false);
5312
+ setPageState(getPageByFirst(firstState));
5313
+ }
5314
+ }, props.delay);
5211
5315
  }
5212
- scrollTimeout.current = setTimeout(function () {
5213
- onScrollChange(event);
5214
- if (loadingState && props.showLoader && (!props.lazy || props.loading === undefined)) {
5215
- setLoadingState(false);
5216
- }
5217
- }, props.delay);
5218
5316
  } else {
5219
5317
  onScrollChange(event);
5220
5318
  }
@@ -5225,9 +5323,9 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5225
5323
  }
5226
5324
  resizeTimeout.current = setTimeout(function () {
5227
5325
  if (elementRef.current) {
5228
- var _ref = [DomHandler.getWidth(elementRef.current), DomHandler.getHeight(elementRef.current)],
5229
- width = _ref[0],
5230
- height = _ref[1];
5326
+ var _ref2 = [DomHandler.getWidth(elementRef.current), DomHandler.getHeight(elementRef.current)],
5327
+ width = _ref2[0],
5328
+ height = _ref2[1];
5231
5329
  var isDiffWidth = width !== defaultWidth.current,
5232
5330
  isDiffHeight = height !== defaultHeight.current;
5233
5331
  var reinit = both ? isDiffWidth || isDiffHeight : horizontal ? isDiffWidth : vertical ? isDiffHeight : false;
@@ -5235,6 +5333,8 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5235
5333
  setNumToleratedItemsState(props.numToleratedItems);
5236
5334
  defaultWidth.current = width;
5237
5335
  defaultHeight.current = height;
5336
+ defaultContentWidth.current = DomHandler.getWidth(_contentRef.current);
5337
+ defaultContentHeight.current = DomHandler.getHeight(_contentRef.current);
5238
5338
  }
5239
5339
  }
5240
5340
  }, props.resizeDelay);
@@ -5267,12 +5367,24 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5267
5367
  var loadedItems = function loadedItems() {
5268
5368
  var items = props.items;
5269
5369
  if (items && !loadingState) {
5270
- if (both) return items.slice(firstState.rows, lastState.rows).map(function (item) {
5271
- return props.columns ? item : item.slice(firstState.cols, lastState.cols);
5272
- });else if (horizontal && props.columns) return items;else return items.slice(firstState, lastState);
5370
+ if (both) return items.slice(props.appendOnly ? 0 : firstState.rows, lastState.rows).map(function (item) {
5371
+ return props.columns ? item : item.slice(props.appendOnly ? 0 : firstState.cols, lastState.cols);
5372
+ });else if (horizontal && props.columns) return items;else return items.slice(props.appendOnly ? 0 : firstState, lastState);
5273
5373
  }
5274
5374
  return [];
5275
5375
  };
5376
+ var viewInit = function viewInit() {
5377
+ if (elementRef.current && DomHandler.isVisible(elementRef.current)) {
5378
+ setContentElement(_contentRef.current);
5379
+ init();
5380
+ bindWindowResizeListener();
5381
+ bindOrientationChangeListener();
5382
+ defaultWidth.current = DomHandler.getWidth(elementRef.current);
5383
+ defaultHeight.current = DomHandler.getHeight(elementRef.current);
5384
+ defaultContentWidth.current = DomHandler.getWidth(_contentRef.current);
5385
+ defaultContentHeight.current = DomHandler.getHeight(_contentRef.current);
5386
+ }
5387
+ };
5276
5388
  var init = function init() {
5277
5389
  if (!props.disabled) {
5278
5390
  setSize();
@@ -5281,17 +5393,11 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5281
5393
  }
5282
5394
  };
5283
5395
  useMountEffect(function () {
5284
- if (!props.disabled) {
5285
- init();
5286
- bindWindowResizeListener();
5287
- bindOrientationChangeListener();
5288
- defaultWidth.current = DomHandler.getWidth(elementRef.current);
5289
- defaultHeight.current = DomHandler.getHeight(elementRef.current);
5290
- }
5396
+ viewInit();
5291
5397
  });
5292
5398
  useUpdateEffect(function () {
5293
5399
  init();
5294
- }, [props.itemSize, props.scrollHeight]);
5400
+ }, [props.itemSize, props.scrollHeight, props.scrollWidth]);
5295
5401
  useUpdateEffect(function () {
5296
5402
  if (props.numToleratedItems !== numToleratedItemsState) {
5297
5403
  setNumToleratedItemsState(props.numToleratedItems);
@@ -5303,11 +5409,11 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5303
5409
  }
5304
5410
  }, [numToleratedItemsState]);
5305
5411
  useUpdateEffect(function () {
5306
- if (!prevItems || prevItems.length !== (props.items || []).length) {
5412
+ if (!prevProps.items || prevProps.items.length !== (props.items || []).length) {
5307
5413
  init();
5308
5414
  }
5309
5415
  var loading = loadingState;
5310
- if (props.lazy && prevLoading !== props.loading && props.loading !== loadingState) {
5416
+ if (props.lazy && prevProps.loading !== props.loading && props.loading !== loadingState) {
5311
5417
  setLoadingState(props.loading);
5312
5418
  loading = props.loading;
5313
5419
  }
@@ -5369,6 +5475,7 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5369
5475
  if (props.showSpacer) {
5370
5476
  return /*#__PURE__*/React.createElement("div", {
5371
5477
  ref: _spacerRef,
5478
+ style: spacerStyle.current,
5372
5479
  className: "p-virtualscroller-spacer"
5373
5480
  });
5374
5481
  }
@@ -5392,11 +5499,14 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5392
5499
  });
5393
5500
  var content = /*#__PURE__*/React.createElement("div", {
5394
5501
  ref: _contentRef,
5502
+ style: contentStyle.current,
5395
5503
  className: className
5396
5504
  }, items);
5397
5505
  if (props.contentTemplate) {
5398
5506
  var defaultOptions = {
5507
+ style: contentStyle.current,
5399
5508
  className: className,
5509
+ spacerStyle: spacerStyle.current,
5400
5510
  contentRef: function contentRef(el) {
5401
5511
  return _contentRef.current = ObjectUtils.getRefElement(el);
5402
5512
  },
@@ -5439,10 +5549,9 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5439
5549
  } else {
5440
5550
  var otherProps = VirtualScrollerBase.getOtherProps(props);
5441
5551
  var className = classNames('p-virtualscroller', {
5442
- 'p-both-scroll': both,
5443
- 'p-virtualscroller-both': both,
5444
- 'p-virtualscroller-horizontal': horizontal,
5445
- 'p-horizontal-scroll': horizontal
5552
+ 'p-virtualscroller-inline': props.inline,
5553
+ 'p-virtualscroller-both p-both-scroll': both,
5554
+ 'p-virtualscroller-horizontal p-horizontal-scroll': horizontal
5446
5555
  }, props.className);
5447
5556
  var loader = createLoader();
5448
5557
  var _content = createContent();
@@ -5450,7 +5559,7 @@ var VirtualScroller = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fun
5450
5559
  return /*#__PURE__*/React.createElement("div", _extends({
5451
5560
  ref: elementRef,
5452
5561
  className: className,
5453
- tabIndex: 0,
5562
+ tabIndex: props.tabIndex,
5454
5563
  style: props.style
5455
5564
  }, otherProps, {
5456
5565
  onScroll: onScroll
@@ -5546,6 +5655,7 @@ var AutoCompletePanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(f
5546
5655
  var className = classNames('p-autocomplete-items', options.className);
5547
5656
  return /*#__PURE__*/React.createElement("ul", {
5548
5657
  ref: options.contentRef,
5658
+ style: options.style,
5549
5659
  className: className,
5550
5660
  role: "listbox",
5551
5661
  id: props.listId
@@ -6217,7 +6327,7 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
6217
6327
  imageFailed = _React$useState2[0],
6218
6328
  setImageFailed = _React$useState2[1];
6219
6329
  var createContent = function createContent() {
6220
- if (props.image && !imageFailed) {
6330
+ if (ObjectUtils.isNotEmpty(props.image) && !imageFailed) {
6221
6331
  return /*#__PURE__*/React.createElement("img", {
6222
6332
  src: props.image,
6223
6333
  alt: props.imageAlt,
@@ -6259,7 +6369,7 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
6259
6369
  });
6260
6370
  var otherProps = AvatarBase.getOtherProps(props);
6261
6371
  var containerClassName = classNames('p-avatar p-component', {
6262
- 'p-avatar-image': props.image !== null && !imageFailed,
6372
+ 'p-avatar-image': ObjectUtils.isNotEmpty(props.image) && !imageFailed,
6263
6373
  'p-avatar-circle': props.shape === 'circle',
6264
6374
  'p-avatar-lg': props.size === 'large',
6265
6375
  'p-avatar-xl': props.size === 'xlarge',
@@ -8832,7 +8942,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
8832
8942
  setValue(props.value);
8833
8943
  }
8834
8944
  return function () {
8835
- props.mask && unbindMaskEvents();
8945
+ props.mask && unbindMaskEvents && unbindMaskEvents();
8836
8946
  };
8837
8947
  });
8838
8948
  useUpdateEffect(function () {
@@ -9056,7 +9166,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
9056
9166
  }
9057
9167
  return _content2;
9058
9168
  }
9059
- var displayYear = props.inline ? metaYear : currentYear;
9169
+ var displayYear = props.numberOfMonths > 1 ? metaYear : currentYear;
9060
9170
  return currentView !== 'year' && /*#__PURE__*/React.createElement("button", {
9061
9171
  className: "p-datepicker-year p-link",
9062
9172
  onClick: switchToYearView,
@@ -13140,6 +13250,8 @@ var ContextMenuBase = {
13140
13250
  global: false,
13141
13251
  autoZIndex: true,
13142
13252
  baseZIndex: 0,
13253
+ breakpoint: undefined,
13254
+ scrollHeight: '400px',
13143
13255
  appendTo: null,
13144
13256
  transitionOptions: null,
13145
13257
  onShow: null,
@@ -13165,7 +13277,7 @@ var ContextMenuSub = /*#__PURE__*/React.memo(function (props) {
13165
13277
  setActiveItemState(null);
13166
13278
  }
13167
13279
  var onItemMouseEnter = function onItemMouseEnter(event, item) {
13168
- if (item.disabled) {
13280
+ if (item.disabled || props.isMobileMode) {
13169
13281
  event.preventDefault();
13170
13282
  return;
13171
13283
  }
@@ -13185,26 +13297,31 @@ var ContextMenuSub = /*#__PURE__*/React.memo(function (props) {
13185
13297
  item: item
13186
13298
  });
13187
13299
  }
13300
+ if (props.isMobileMode && item.items) {
13301
+ if (activeItemState && item === activeItemState) setActiveItemState(null);else setActiveItemState(item);
13302
+ }
13188
13303
  if (!item.items) {
13189
13304
  props.onLeafClick(event);
13190
13305
  }
13191
13306
  };
13192
13307
  var position = function position() {
13193
- var parentItem = submenuRef.current.parentElement;
13194
- var containerOffset = DomHandler.getOffset(parentItem);
13195
- var viewport = DomHandler.getViewport();
13196
- var sublistWidth = submenuRef.current.offsetParent ? submenuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(submenuRef.current);
13197
- var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);
13198
- var top = parseInt(containerOffset.top, 10) + submenuRef.current.offsetHeight - DomHandler.getWindowScrollTop();
13199
- if (top > viewport.height) {
13200
- submenuRef.current.style.top = viewport.height - top + 'px';
13201
- } else {
13202
- submenuRef.current.style.top = '0px';
13203
- }
13204
- if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {
13205
- submenuRef.current.style.left = -1 * sublistWidth + 'px';
13206
- } else {
13207
- submenuRef.current.style.left = itemOuterWidth + 'px';
13308
+ if (!props.isMobileMode) {
13309
+ var parentItem = submenuRef.current.parentElement;
13310
+ var containerOffset = DomHandler.getOffset(parentItem);
13311
+ var viewport = DomHandler.getViewport();
13312
+ var sublistWidth = submenuRef.current.offsetParent ? submenuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(submenuRef.current);
13313
+ var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);
13314
+ var top = parseInt(containerOffset.top, 10) + submenuRef.current.offsetHeight - DomHandler.getWindowScrollTop();
13315
+ if (top > viewport.height) {
13316
+ submenuRef.current.style.top = viewport.height - top + 'px';
13317
+ } else {
13318
+ submenuRef.current.style.top = '0px';
13319
+ }
13320
+ if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {
13321
+ submenuRef.current.style.left = -1 * sublistWidth + 'px';
13322
+ } else {
13323
+ submenuRef.current.style.left = itemOuterWidth + 'px';
13324
+ }
13208
13325
  }
13209
13326
  };
13210
13327
  var onEnter = function onEnter() {
@@ -13226,7 +13343,8 @@ var ContextMenuSub = /*#__PURE__*/React.memo(function (props) {
13226
13343
  menuProps: props.menuProps,
13227
13344
  model: item.items,
13228
13345
  resetMenu: item !== activeItemState,
13229
- onLeafClick: props.onLeafClick
13346
+ onLeafClick: props.onLeafClick,
13347
+ isMobileMode: props.isMobileMode
13230
13348
  });
13231
13349
  }
13232
13350
  return null;
@@ -13335,8 +13453,14 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13335
13453
  _React$useState6 = _slicedToArray(_React$useState5, 2),
13336
13454
  resetMenuState = _React$useState6[0],
13337
13455
  setResetMenuState = _React$useState6[1];
13456
+ var _React$useState7 = React.useState(null),
13457
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
13458
+ attributeSelectorState = _React$useState8[0],
13459
+ setAttributeSelectorState = _React$useState8[1];
13338
13460
  var menuRef = React.useRef(null);
13339
13461
  var currentEvent = React.useRef(null);
13462
+ var styleElementRef = React.useRef(null);
13463
+ var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
13340
13464
  var _useEventListener = useEventListener({
13341
13465
  type: 'click',
13342
13466
  listener: function listener(event) {
@@ -13367,6 +13491,17 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13367
13491
  _useResizeListener2 = _slicedToArray(_useResizeListener, 2),
13368
13492
  bindDocumentResizeListener = _useResizeListener2[0],
13369
13493
  unbindDocumentResizeListener = _useResizeListener2[1];
13494
+ var createStyle = function createStyle() {
13495
+ if (!styleElementRef.current) {
13496
+ styleElementRef.current = DomHandler.createInlineStyle(PrimeReact.nonce);
13497
+ var selector = "".concat(attributeSelectorState);
13498
+ var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-contextmenu[").concat(selector, "] > ul {\n max-height: ").concat(props.scrollHeight, ";\n overflow: ").concat(props.scrollHeight ? 'auto' : '', ";\n }\n\n .p-contextmenu[").concat(selector, "] .p-submenu-list {\n position: relative;\n }\n\n .p-contextmenu[").concat(selector, "] .p-menuitem-active > .p-submenu-list {\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n padding: 0 0 0 calc(var(--inline-spacing) * 2); /* @todo */\n }\n\n .p-contextmenu[").concat(selector, "] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-contextmenu[").concat(selector, "] .p-submenu-icon:before {\n content: \"\\e930\";\n }\n}\n");
13499
+ styleElementRef.current.innerHTML = innerHTML;
13500
+ }
13501
+ };
13502
+ var destroyStyle = function destroyStyle() {
13503
+ styleElementRef.current = DomHandler.removeInlineStyle(styleElementRef.current);
13504
+ };
13370
13505
  var onMenuClick = function onMenuClick() {
13371
13506
  setResetMenuState(false);
13372
13507
  };
@@ -13395,6 +13530,10 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13395
13530
  ZIndexUtils.set('menu', menuRef.current, PrimeReact.autoZIndex, props.baseZIndex || PrimeReact.zIndex['menu']);
13396
13531
  }
13397
13532
  position(currentEvent.current);
13533
+ if (attributeSelectorState && props.breakpoint) {
13534
+ menuRef.current.setAttribute(attributeSelectorState, '');
13535
+ createStyle();
13536
+ }
13398
13537
  };
13399
13538
  var onEntered = function onEntered() {
13400
13539
  bindDocumentListeners();
@@ -13405,6 +13544,7 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13405
13544
  };
13406
13545
  var onExited = function onExited() {
13407
13546
  ZIndexUtils.clear(menuRef.current);
13547
+ destroyStyle();
13408
13548
  };
13409
13549
  var position = function position(event) {
13410
13550
  if (event) {
@@ -13457,7 +13597,19 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13457
13597
  if (props.global) {
13458
13598
  bindDocumentContextMenuListener();
13459
13599
  }
13600
+ if (props.breakpoint) {
13601
+ !attributeSelectorState && setAttributeSelectorState(UniqueComponentId());
13602
+ }
13460
13603
  });
13604
+ useUpdateEffect(function () {
13605
+ if (attributeSelectorState && menuRef.current) {
13606
+ menuRef.current.setAttribute(attributeSelectorState, '');
13607
+ createStyle();
13608
+ }
13609
+ return function () {
13610
+ destroyStyle();
13611
+ };
13612
+ }, [attributeSelectorState, props.breakpoint]);
13461
13613
  useUpdateEffect(function () {
13462
13614
  if (visibleState) {
13463
13615
  setVisibleState(false);
@@ -13513,7 +13665,8 @@ var ContextMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
13513
13665
  model: props.model,
13514
13666
  root: true,
13515
13667
  resetMenu: resetMenuState,
13516
- onLeafClick: onLeafClick
13668
+ onLeafClick: onLeafClick,
13669
+ isMobileMode: isMobileMode
13517
13670
  })));
13518
13671
  };
13519
13672
  var element = createContextMenu();
@@ -15474,6 +15627,7 @@ var DropdownPanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
15474
15627
  var content = isEmptyFilter ? createEmptyMessage() : options.children;
15475
15628
  return /*#__PURE__*/React.createElement("ul", {
15476
15629
  ref: options.contentRef,
15630
+ style: options.style,
15477
15631
  className: className,
15478
15632
  role: "listbox"
15479
15633
  }, content);
@@ -16514,7 +16668,6 @@ var DataTableBase = {
16514
16668
  defaultProps: {
16515
16669
  __TYPE: 'DataTable',
16516
16670
  alwaysShowPaginator: true,
16517
- autoLayout: false,
16518
16671
  breakpoint: '960px',
16519
16672
  cellClassName: null,
16520
16673
  cellSelection: false,
@@ -16606,7 +16759,7 @@ var DataTableBase = {
16606
16759
  reorderableColumns: false,
16607
16760
  reorderableRows: false,
16608
16761
  resizableColumns: false,
16609
- responsiveLayout: 'stack',
16762
+ responsiveLayout: 'scroll',
16610
16763
  rowClassName: null,
16611
16764
  rowEditValidator: null,
16612
16765
  rowExpansionTemplate: null,
@@ -16616,7 +16769,6 @@ var DataTableBase = {
16616
16769
  rowHover: false,
16617
16770
  rows: null,
16618
16771
  rowsPerPageOptions: null,
16619
- scrollDirection: 'vertical',
16620
16772
  scrollHeight: null,
16621
16773
  scrollable: false,
16622
16774
  selectAll: false,
@@ -17470,7 +17622,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17470
17622
  return props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, props.dataKey);
17471
17623
  };
17472
17624
  var getTabIndex = function getTabIndex() {
17473
- return isFocusable() && !props.allowCellSelection ? props.index === 0 ? props.tabIndex : -1 : null;
17625
+ return isFocusable() && !props.allowCellSelection ? props.rowIndex === 0 ? props.tabIndex : -1 : null;
17474
17626
  };
17475
17627
  var findIndex = function findIndex(collection, rowData) {
17476
17628
  return (collection || []).findIndex(function (data) {
@@ -17527,35 +17679,35 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17527
17679
  props.onRowClick({
17528
17680
  originalEvent: event,
17529
17681
  data: props.rowData,
17530
- index: props.index
17682
+ index: props.rowIndex
17531
17683
  });
17532
17684
  };
17533
17685
  var onDoubleClick = function onDoubleClick(event) {
17534
17686
  props.onRowDoubleClick({
17535
17687
  originalEvent: event,
17536
17688
  data: props.rowData,
17537
- index: props.index
17689
+ index: props.rowIndex
17538
17690
  });
17539
17691
  };
17540
17692
  var onRightClick = function onRightClick(event) {
17541
17693
  props.onRowRightClick({
17542
17694
  originalEvent: event,
17543
17695
  data: props.rowData,
17544
- index: props.index
17696
+ index: props.rowIndex
17545
17697
  });
17546
17698
  };
17547
17699
  var onMouseEnter = function onMouseEnter(event) {
17548
17700
  props.onRowMouseEnter({
17549
17701
  originalEvent: event,
17550
17702
  data: props.rowData,
17551
- index: props.index
17703
+ index: props.rowIndex
17552
17704
  });
17553
17705
  };
17554
17706
  var onMouseLeave = function onMouseLeave(event) {
17555
17707
  props.onRowMouseLeave({
17556
17708
  originalEvent: event,
17557
17709
  data: props.rowData,
17558
- index: props.index
17710
+ index: props.rowIndex
17559
17711
  });
17560
17712
  };
17561
17713
  var onTouchEnd = function onTouchEnd(event) {
@@ -17609,49 +17761,49 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17609
17761
  props.onRowMouseDown({
17610
17762
  originalEvent: event,
17611
17763
  data: props.rowData,
17612
- index: props.index
17764
+ index: props.rowIndex
17613
17765
  });
17614
17766
  };
17615
17767
  var onMouseUp = function onMouseUp(event) {
17616
17768
  props.onRowMouseUp({
17617
17769
  originalEvent: event,
17618
17770
  data: props.rowData,
17619
- index: props.index
17771
+ index: props.rowIndex
17620
17772
  });
17621
17773
  };
17622
17774
  var onDragStart = function onDragStart(event) {
17623
17775
  props.onRowDragStart({
17624
17776
  originalEvent: event,
17625
17777
  data: props.rowData,
17626
- index: props.index
17778
+ index: props.rowIndex
17627
17779
  });
17628
17780
  };
17629
17781
  var onDragOver = function onDragOver(event) {
17630
17782
  props.onRowDragOver({
17631
17783
  originalEvent: event,
17632
17784
  data: props.rowData,
17633
- index: props.index
17785
+ index: props.rowIndex
17634
17786
  });
17635
17787
  };
17636
17788
  var onDragLeave = function onDragLeave(event) {
17637
17789
  props.onRowDragLeave({
17638
17790
  originalEvent: event,
17639
17791
  data: props.rowData,
17640
- index: props.index
17792
+ index: props.rowIndex
17641
17793
  });
17642
17794
  };
17643
17795
  var onDragEnd = function onDragEnd(event) {
17644
17796
  props.onRowDragEnd({
17645
17797
  originalEvent: event,
17646
17798
  data: props.rowData,
17647
- index: props.index
17799
+ index: props.rowIndex
17648
17800
  });
17649
17801
  };
17650
17802
  var onDrop = function onDrop(event) {
17651
17803
  props.onRowDrop({
17652
17804
  originalEvent: event,
17653
17805
  data: props.rowData,
17654
- index: props.index
17806
+ index: props.rowIndex
17655
17807
  });
17656
17808
  };
17657
17809
  var onEditChange = function onEditChange(e, isEditing) {
@@ -17695,7 +17847,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17695
17847
  props.onRowEditInit({
17696
17848
  originalEvent: event,
17697
17849
  data: props.rowData,
17698
- index: props.index
17850
+ index: props.rowIndex
17699
17851
  });
17700
17852
  }
17701
17853
  onEditChange(e, true);
@@ -17711,7 +17863,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17711
17863
  props.onRowEditSave({
17712
17864
  originalEvent: event,
17713
17865
  data: props.rowData,
17714
- index: props.index,
17866
+ index: props.rowIndex,
17715
17867
  valid: valid
17716
17868
  });
17717
17869
  }
@@ -17729,7 +17881,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17729
17881
  props.onRowEditCancel({
17730
17882
  originalEvent: event,
17731
17883
  data: props.rowData,
17732
- index: props.index
17884
+ index: props.rowIndex
17733
17885
  });
17734
17886
  }
17735
17887
  onEditChange(e, false);
@@ -17747,7 +17899,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17747
17899
  tableSelector: props.tableSelector,
17748
17900
  column: col,
17749
17901
  rowData: props.rowData,
17750
- rowIndex: props.index,
17902
+ rowIndex: props.rowIndex,
17751
17903
  index: i,
17752
17904
  rowSpan: rowSpan,
17753
17905
  dataKey: props.dataKey,
@@ -17794,9 +17946,9 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
17794
17946
  'p-highlight-contextmenu': props.contextMenuSelected,
17795
17947
  'p-selectable-row': props.allowRowSelection && props.isSelectable({
17796
17948
  data: props.rowData,
17797
- index: props.index
17949
+ index: props.rowIndex
17798
17950
  }),
17799
- 'p-row-odd': props.index % 2 !== 0
17951
+ 'p-row-odd': props.rowIndex % 2 !== 0
17800
17952
  });
17801
17953
  var style = {
17802
17954
  height: props.virtualScrollerOptions ? props.virtualScrollerOptions.itemSize : undefined
@@ -17871,7 +18023,6 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
17871
18023
  var rowDragging = React.useRef(false);
17872
18024
  var draggedRowIndex = React.useRef(null);
17873
18025
  var droppedRowIndex = React.useRef(null);
17874
- var prevVirtualScrollerOptions = usePrevious(props.virtualScrollerOptions);
17875
18026
  var isSubheaderGrouping = props.rowGroupMode && props.rowGroupMode === 'subheader';
17876
18027
  var isRadioSelectionMode = props.selectionMode === 'radiobutton';
17877
18028
  var isCheckboxSelectionMode = props.selectionMode === 'checkbox';
@@ -18021,10 +18172,6 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18021
18172
  });
18022
18173
  }
18023
18174
  };
18024
- var updateVirtualScrollerPosition = function updateVirtualScrollerPosition() {
18025
- var tableHeaderHeight = DomHandler.getOuterHeight(elementRef.current.previousElementSibling);
18026
- elementRef.current.style.top = (elementRef.current.style.top || 0) + tableHeaderHeight + 'px';
18027
- };
18028
18175
  var onSingleSelection = function onSingleSelection(_ref) {
18029
18176
  var originalEvent = _ref.originalEvent,
18030
18177
  data = _ref.data,
@@ -18578,16 +18725,6 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18578
18725
  updateFrozenRowGroupHeaderStickyPosition();
18579
18726
  }
18580
18727
  });
18581
- useMountEffect(function () {
18582
- if (!props.isVirtualScrollerDisabled && getVirtualScrollerOption('vertical')) {
18583
- updateVirtualScrollerPosition();
18584
- }
18585
- });
18586
- useUpdateEffect(function () {
18587
- if (!props.isVirtualScrollerDisabled && getVirtualScrollerOption('vertical') && getVirtualScrollerOption('itemSize', prevVirtualScrollerOptions) !== getVirtualScrollerOption('itemSize')) {
18588
- updateVirtualScrollerPosition();
18589
- }
18590
- }, [props.virtualScrollerOptions]);
18591
18728
  useUpdateEffect(function () {
18592
18729
  if (props.paginator && isMultipleSelection()) {
18593
18730
  anchorRowIndex.current = null;
@@ -18615,9 +18752,8 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18615
18752
  }
18616
18753
  return null;
18617
18754
  };
18618
- var createGroupHeader = function createGroupHeader(rowData, index, expanded, colSpan) {
18619
- if (isSubheaderGrouping && shouldRenderRowGroupHeader(props.value, rowData, index - props.first)) {
18620
- var _options;
18755
+ var createGroupHeader = function createGroupHeader(rowData, rowIndex, expanded, colSpan) {
18756
+ if (isSubheaderGrouping && shouldRenderRowGroupHeader(props.value, rowData, rowIndex - props.first)) {
18621
18757
  var style = rowGroupHeaderStyle();
18622
18758
  var toggler = props.expandableRowGroups && /*#__PURE__*/React.createElement(RowTogglerButton, {
18623
18759
  onClick: onRowToggle,
@@ -18626,9 +18762,11 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18626
18762
  expandedRowIcon: props.expandedRowIcon,
18627
18763
  collapsedRowIcon: props.collapsedRowIcon
18628
18764
  });
18629
- var options = (_options = {
18630
- index: index
18631
- }, _defineProperty(_options, "index", index), _defineProperty(_options, "props", props.tableProps), _defineProperty(_options, "customRendering", false), _options);
18765
+ var options = {
18766
+ index: rowIndex,
18767
+ props: props.tableProps,
18768
+ customRendering: false
18769
+ };
18632
18770
  var _content2 = ObjectUtils.getJSXElement(props.rowGroupHeaderTemplate, rowData, options);
18633
18771
 
18634
18772
  // check if the user wants complete control of the rendering
@@ -18647,7 +18785,7 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18647
18785
  }
18648
18786
  return null;
18649
18787
  };
18650
- var createRow = function createRow(rowData, index, expanded) {
18788
+ var createRow = function createRow(rowData, rowIndex, index, expanded) {
18651
18789
  if (!props.expandableRowGroups || expanded) {
18652
18790
  var selected = isSelectionEnabled() ? isSelected(rowData) : false;
18653
18791
  var contextMenuSelected = isContextMenuSelected(rowData);
@@ -18660,6 +18798,7 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18660
18798
  value: props.value,
18661
18799
  columns: props.columns,
18662
18800
  rowData: rowData,
18801
+ rowIndex: rowIndex,
18663
18802
  index: index,
18664
18803
  selected: selected,
18665
18804
  contextMenuSelected: contextMenuSelected,
@@ -18718,11 +18857,11 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18718
18857
  });
18719
18858
  }
18720
18859
  };
18721
- var createExpansion = function createExpansion(rowData, index, expanded, colSpan) {
18860
+ var createExpansion = function createExpansion(rowData, rowIndex, expanded, colSpan) {
18722
18861
  if (expanded && !(isSubheaderGrouping && props.expandableRowGroups)) {
18723
- var id = "".concat(props.tableSelector, "_content_").concat(index, "_expanded");
18862
+ var id = "".concat(props.tableSelector, "_content_").concat(rowIndex, "_expanded");
18724
18863
  var options = {
18725
- index: index,
18864
+ index: rowIndex,
18726
18865
  customRendering: false
18727
18866
  };
18728
18867
  var _content3 = ObjectUtils.getJSXElement(props.rowExpansionTemplate, rowData, options);
@@ -18742,10 +18881,10 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18742
18881
  }
18743
18882
  return null;
18744
18883
  };
18745
- var createGroupFooter = function createGroupFooter(rowData, index, expanded, colSpan) {
18746
- if (isSubheaderGrouping && shouldRenderRowGroupFooter(props.value, rowData, index - props.first, expanded)) {
18884
+ var createGroupFooter = function createGroupFooter(rowData, rowIndex, expanded, colSpan) {
18885
+ if (isSubheaderGrouping && shouldRenderRowGroupFooter(props.value, rowData, rowIndex - props.first, expanded)) {
18747
18886
  var _content4 = ObjectUtils.getJSXElement(props.rowGroupFooterTemplate, rowData, {
18748
- index: index,
18887
+ index: rowIndex,
18749
18888
  colSpan: colSpan,
18750
18889
  props: props.tableProps
18751
18890
  });
@@ -18757,25 +18896,25 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
18757
18896
  return null;
18758
18897
  };
18759
18898
  var createContent = function createContent() {
18760
- return props.value.map(function (rowData, i) {
18761
- var index = getVirtualScrollerOption('getItemOptions') ? getVirtualScrollerOption('getItemOptions')(i).index : props.first + i;
18762
- var key = getRowKey(rowData, index);
18899
+ return props.value && props.value.map(function (rowData, index) {
18900
+ var rowIndex = getVirtualScrollerOption('getItemOptions') ? getVirtualScrollerOption('getItemOptions')(index).index : props.first + index;
18901
+ var key = getRowKey(rowData, rowIndex);
18763
18902
  var expanded = isRowExpanded(rowData);
18764
18903
  var colSpan = getColumnsLength();
18765
- var groupHeader = createGroupHeader(rowData, index, expanded, colSpan);
18766
- var row = createRow(rowData, index, expanded);
18767
- var expansion = createExpansion(rowData, index, expanded, colSpan);
18768
- var groupFooter = createGroupFooter(rowData, index, expanded, colSpan);
18904
+ var groupHeader = createGroupHeader(rowData, rowIndex, expanded, colSpan);
18905
+ var row = createRow(rowData, rowIndex, index, expanded);
18906
+ var expansion = createExpansion(rowData, rowIndex, expanded, colSpan);
18907
+ var groupFooter = createGroupFooter(rowData, rowIndex, expanded, colSpan);
18769
18908
  return /*#__PURE__*/React.createElement(React.Fragment, {
18770
18909
  key: key
18771
18910
  }, groupHeader, row, expansion, groupFooter);
18772
18911
  });
18773
18912
  };
18774
- var className = classNames('p-datatable-tbody', props.className);
18775
18913
  var content = props.empty ? createEmptyContent() : createContent();
18776
18914
  return /*#__PURE__*/React.createElement("tbody", {
18777
18915
  ref: refCallback,
18778
- className: className
18916
+ style: props.style,
18917
+ className: props.className
18779
18918
  }, content);
18780
18919
  }));
18781
18920
  TableBody.displayName = 'TableBody';
@@ -20466,9 +20605,10 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
20466
20605
  if (ObjectUtils.isNotEmpty(widths)) {
20467
20606
  createStyleElement();
20468
20607
  var innerHTML = '';
20608
+ var selector = ".p-datatable[".concat(attributeSelectorState, "] > .p-datatable-wrapper > .p-datatable-table");
20469
20609
  widths.forEach(function (width, index) {
20470
- var style = props.scrollable ? "flex: 1 1 ".concat(width, "px !important") : "width: ".concat(width, "px !important");
20471
- innerHTML += "\n .p-datatable[".concat(attributeSelectorState, "] .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
20610
+ var style = "width: ".concat(width, "px !important; max-width: ").concat(width, "px !important");
20611
+ innerHTML += "\n ".concat(selector, " > .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n ").concat(selector, " > .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n ").concat(selector, " > .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
20472
20612
  });
20473
20613
  styleElement.current.innerHTML = innerHTML;
20474
20614
  }
@@ -20636,10 +20776,11 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
20636
20776
  destroyStyleElement();
20637
20777
  createStyleElement();
20638
20778
  var innerHTML = '';
20779
+ var selector = ".p-datatable[".concat(attributeSelectorState, "] > .p-datatable-wrapper > .p-datatable-table");
20639
20780
  widths.forEach(function (width, index) {
20640
20781
  var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width;
20641
- var style = props.scrollable ? "flex: 1 1 ".concat(colWidth, "px !important") : "width: ".concat(colWidth, "px !important");
20642
- innerHTML += "\n .p-datatable[".concat(attributeSelectorState, "] .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
20782
+ var style = "width: ".concat(colWidth, "px !important; max-width: ").concat(colWidth, "px !important");
20783
+ innerHTML += "\n ".concat(selector, " > .p-datatable-thead > tr > th:nth-child(").concat(index + 1, "),\n ").concat(selector, " > .p-datatable-tbody > tr > td:nth-child(").concat(index + 1, "),\n ").concat(selector, " > .p-datatable-tfoot > tr > td:nth-child(").concat(index + 1, ") {\n ").concat(style, "\n }\n ");
20643
20784
  });
20644
20785
  styleElement.current.innerHTML = innerHTML;
20645
20786
  };
@@ -20802,7 +20943,9 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
20802
20943
  var createResponsiveStyle = function createResponsiveStyle() {
20803
20944
  if (!responsiveStyleElement.current) {
20804
20945
  responsiveStyleElement.current = DomHandler.createInlineStyle(PrimeReact.nonce);
20805
- var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-thead > tr > th,\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n .p-datatable[").concat(attributeSelectorState, "].p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n .p-datatable[").concat(attributeSelectorState, "] .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n");
20946
+ var selector = ".p-datatable[".concat(attributeSelectorState, "] > .p-datatable-wrapper > .p-datatable-table");
20947
+ var gridLinesSelector = ".p-datatable[".concat(attributeSelectorState, "].p-datatable-gridlines > .p-datatable-wrapper > .p-datatable-table");
20948
+ var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n ").concat(selector, " > .p-datatable-thead > tr > th,\n ").concat(selector, " > .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n ").concat(selector, " > .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n ").concat(selector, " > .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n ").concat(gridLinesSelector, "] > .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n ").concat(selector, " > .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n");
20806
20949
  responsiveStyleElement.current.innerHTML = innerHTML;
20807
20950
  }
20808
20951
  };
@@ -21279,7 +21422,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21279
21422
  return data;
21280
21423
  };
21281
21424
  useMountEffect(function () {
21282
- setAttributeSelectorState(UniqueComponentId());
21425
+ !attributeSelectorState && setAttributeSelectorState(UniqueComponentId());
21283
21426
  setFiltersState(cloneFilters(props.filters));
21284
21427
  setD_filtersState(cloneFilters(props.filters));
21285
21428
  if (isStateful()) {
@@ -21290,11 +21433,16 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21290
21433
  }
21291
21434
  });
21292
21435
  useUpdateEffect(function () {
21293
- elementRef.current.setAttribute(attributeSelectorState, '');
21294
- if (props.responsiveLayout === 'stack' && !props.scrollable) {
21295
- createResponsiveStyle();
21436
+ if (attributeSelectorState) {
21437
+ elementRef.current.setAttribute(attributeSelectorState, '');
21438
+ if (props.responsiveLayout === 'stack' && !props.scrollable) {
21439
+ createResponsiveStyle();
21440
+ }
21296
21441
  }
21297
- }, [attributeSelectorState]);
21442
+ return function () {
21443
+ destroyResponsiveStyle();
21444
+ };
21445
+ }, [attributeSelectorState, props.breakpoint]);
21298
21446
  useUpdateEffect(function () {
21299
21447
  var filters = cloneFilters(props.filters);
21300
21448
  setFiltersState(filters);
@@ -21425,12 +21573,14 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21425
21573
  var rows = options.rows,
21426
21574
  columns = options.columns,
21427
21575
  contentRef = options.contentRef,
21428
- className = options.className;
21429
- options.itemSize;
21576
+ style = options.style,
21577
+ className = options.className,
21578
+ spacerStyle = options.spacerStyle,
21579
+ itemSize = options.itemSize;
21430
21580
  var frozenBody = ObjectUtils.isNotEmpty(props.frozenValue) && /*#__PURE__*/React.createElement(TableBody, {
21431
21581
  ref: frozenBodyRef,
21432
21582
  value: props.frozenValue,
21433
- className: "p-datatable-frozen-tbody",
21583
+ className: "p-datatable-tbody p-datatable-frozen-tbody",
21434
21584
  frozenRow: true,
21435
21585
  tableProps: props,
21436
21586
  tableSelector: attributeSelectorState,
@@ -21501,7 +21651,8 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21501
21651
  var body = /*#__PURE__*/React.createElement(TableBody, {
21502
21652
  ref: bodyRef,
21503
21653
  value: dataToRender(rows),
21504
- className: className,
21654
+ style: style,
21655
+ className: classNames('p-datatable-tbody', className),
21505
21656
  empty: empty,
21506
21657
  frozenRow: false,
21507
21658
  tableProps: props,
@@ -21571,7 +21722,13 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21571
21722
  virtualScrollerOptions: options,
21572
21723
  isVirtualScrollerDisabled: isVirtualScrollerDisabled
21573
21724
  });
21574
- return /*#__PURE__*/React.createElement(React.Fragment, null, frozenBody, body);
21725
+ var spacerBody = ObjectUtils.isNotEmpty(spacerStyle) ? /*#__PURE__*/React.createElement(TableBody, {
21726
+ style: {
21727
+ height: "calc(".concat(spacerStyle.height, " - ").concat(rows.length * itemSize, "px)")
21728
+ },
21729
+ className: "p-datatable-virtualscroller-spacer"
21730
+ }) : null;
21731
+ return /*#__PURE__*/React.createElement(React.Fragment, null, frozenBody, body, spacerBody);
21575
21732
  };
21576
21733
  var createTableFooter = function createTableFooter(options) {
21577
21734
  var columns = options.columns;
@@ -21602,13 +21759,19 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21602
21759
  scrollHeight: props.scrollHeight !== 'flex' ? undefined : '100%',
21603
21760
  disabled: _isVirtualScrollerDisabled,
21604
21761
  loaderDisabled: true,
21762
+ inline: true,
21763
+ autoSize: true,
21605
21764
  showSpacer: false,
21606
21765
  contentTemplate: function contentTemplate(options) {
21607
21766
  var ref = function ref(el) {
21608
21767
  tableRef.current = el;
21609
21768
  options.spacerRef && options.spacerRef(el);
21610
21769
  };
21611
- var tableClassName = classNames('p-datatable-table', props.tableClassName);
21770
+ var tableClassName = classNames('p-datatable-table', {
21771
+ 'p-datatable-scrollable-table': props.scrollable,
21772
+ 'p-datatable-resizable-table': props.resizableColumns,
21773
+ 'p-datatable-resizable-table-fit': props.resizableColumns && props.columnResizeMode === 'fit'
21774
+ }, props.tableClassName);
21612
21775
  var tableHeader = createTableHeader(options, empty);
21613
21776
  var tableBody = createTableBody(options, selectionModeInColumn, empty, _isVirtualScrollerDisabled);
21614
21777
  var tableFooter = createTableFooter(options);
@@ -21703,13 +21866,9 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
21703
21866
  'p-datatable-hoverable-rows': props.rowHover,
21704
21867
  'p-datatable-selectable': selectable && !props.cellSelection,
21705
21868
  'p-datatable-selectable-cell': selectable && props.cellSelection,
21706
- 'p-datatable-auto-layout': props.autoLayout,
21707
21869
  'p-datatable-resizable': props.resizableColumns,
21708
21870
  'p-datatable-resizable-fit': props.resizableColumns && props.columnResizeMode === 'fit',
21709
21871
  'p-datatable-scrollable': props.scrollable,
21710
- 'p-datatable-scrollable-vertical': props.scrollable && props.scrollDirection === 'vertical',
21711
- 'p-datatable-scrollable-horizontal': props.scrollable && props.scrollDirection === 'horizontal',
21712
- 'p-datatable-scrollable-both': props.scrollable && props.scrollDirection === 'both',
21713
21872
  'p-datatable-flex-scrollable': props.scrollable && props.scrollHeight === 'flex',
21714
21873
  'p-datatable-responsive-stack': props.responsiveLayout === 'stack',
21715
21874
  'p-datatable-responsive-scroll': props.responsiveLayout === 'scroll',
@@ -26313,14 +26472,15 @@ var ListBox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
26313
26472
  itemTemplate: function itemTemplate(item, options) {
26314
26473
  return item && createItem(item, options.index, options);
26315
26474
  },
26316
- contentTemplate: function contentTemplate(option) {
26317
- var className = classNames('p-listbox-list', option.className);
26475
+ contentTemplate: function contentTemplate(options) {
26476
+ var className = classNames('p-listbox-list', options.className);
26318
26477
  return /*#__PURE__*/React.createElement("ul", _extends({
26319
- ref: option.contentRef,
26478
+ ref: options.contentRef,
26479
+ style: options.style,
26320
26480
  className: className,
26321
26481
  role: "listbox",
26322
26482
  "aria-multiselectable": props.multiple
26323
- }, ariaProps), option.children);
26483
+ }, ariaProps), options.children);
26324
26484
  }
26325
26485
  });
26326
26486
  return /*#__PURE__*/React.createElement(VirtualScroller, _extends({
@@ -26368,6 +26528,8 @@ var MegaMenuBase = {
26368
26528
  style: null,
26369
26529
  className: null,
26370
26530
  orientation: 'horizontal',
26531
+ breakpoint: undefined,
26532
+ scrollHeight: '400px',
26371
26533
  start: null,
26372
26534
  end: null,
26373
26535
  children: undefined
@@ -26386,17 +26548,41 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26386
26548
  _React$useState2 = _slicedToArray(_React$useState, 2),
26387
26549
  activeItemState = _React$useState2[0],
26388
26550
  setActiveItemState = _React$useState2[1];
26551
+ var _React$useState3 = React.useState(null),
26552
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
26553
+ attributeSelectorState = _React$useState4[0],
26554
+ setAttributeSelectorState = _React$useState4[1];
26555
+ var _React$useState5 = React.useState(false),
26556
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
26557
+ mobileActiveState = _React$useState6[0],
26558
+ setMobileActiveState = _React$useState6[1];
26389
26559
  var elementRef = React.useRef(null);
26560
+ var styleElementRef = React.useRef(null);
26561
+ var menuButtonRef = React.useRef(null);
26390
26562
  var horizontal = props.orientation === 'horizontal';
26391
26563
  var vertical = props.orientation === 'vertical';
26564
+ var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
26392
26565
  var _useEventListener = useEventListener({
26393
26566
  type: 'click',
26394
26567
  listener: function listener(event) {
26395
- isOutsideClicked(event) && setActiveItemState(null);
26568
+ if ((!isMobileMode || mobileActiveState) && isOutsideClicked(event)) {
26569
+ setActiveItemState(null);
26570
+ setMobileActiveState(false);
26571
+ }
26396
26572
  }
26397
26573
  }),
26398
26574
  _useEventListener2 = _slicedToArray(_useEventListener, 1),
26399
26575
  bindDocumentClickListener = _useEventListener2[0];
26576
+ var _useResizeListener = useResizeListener({
26577
+ listener: function listener() {
26578
+ if (!isMobileMode || mobileActiveState) {
26579
+ setActiveItemState(null);
26580
+ setMobileActiveState(false);
26581
+ }
26582
+ }
26583
+ }),
26584
+ _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
26585
+ bindDocumentResizeListener = _useResizeListener2[0];
26400
26586
  var onLeafClick = function onLeafClick(event, item) {
26401
26587
  if (item.disabled) {
26402
26588
  event.preventDefault();
@@ -26412,9 +26598,10 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26412
26598
  });
26413
26599
  }
26414
26600
  setActiveItemState(null);
26601
+ setMobileActiveState(false);
26415
26602
  };
26416
26603
  var onCategoryMouseEnter = function onCategoryMouseEnter(event, item) {
26417
- if (item.disabled) {
26604
+ if (item.disabled || isMobileMode) {
26418
26605
  event.preventDefault();
26419
26606
  return;
26420
26607
  }
@@ -26477,6 +26664,13 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26477
26664
  var collapseMenu = function collapseMenu(item) {
26478
26665
  setActiveItemState(null);
26479
26666
  };
26667
+ var toggle = function toggle(event) {
26668
+ event.preventDefault();
26669
+ setMobileActiveState(function (prevMobileActive) {
26670
+ return !prevMobileActive;
26671
+ });
26672
+ setActiveItemState(null);
26673
+ };
26480
26674
  var findNextItem = function findNextItem(item) {
26481
26675
  var nextItem = item.nextElementSibling;
26482
26676
  return nextItem ? DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? findNextItem(nextItem) : nextItem : null;
@@ -26494,7 +26688,7 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26494
26688
  prevItem && prevItem.children[0].focus();
26495
26689
  };
26496
26690
  var isOutsideClicked = function isOutsideClicked(event) {
26497
- return elementRef.current && !(elementRef.current.isSameNode(event.target) || elementRef.current.contains(event.target));
26691
+ return elementRef.current && !(elementRef.current.isSameNode(event.target) || elementRef.current.contains(event.target) || menuButtonRef.current && menuButtonRef.current.contains(event.target));
26498
26692
  };
26499
26693
  var getColumnClassName = function getColumnClassName(category) {
26500
26694
  var length = category.items ? category.items.length : 0;
@@ -26527,13 +26721,23 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26527
26721
  };
26528
26722
  });
26529
26723
  useMountEffect(function () {
26724
+ if (props.breakpoint) {
26725
+ !attributeSelectorState && setAttributeSelectorState(UniqueComponentId());
26726
+ }
26530
26727
  bindDocumentClickListener();
26728
+ bindDocumentResizeListener();
26531
26729
  });
26532
26730
  useUpdateEffect(function () {
26533
26731
  var currentPanel = DomHandler.findSingle(elementRef.current, '.p-menuitem-active > .p-megamenu-panel');
26534
- if (activeItemState) {
26732
+ if (activeItemState && !isMobileMode) {
26535
26733
  ZIndexUtils.set('menu', currentPanel, PrimeReact.autoZIndex, PrimeReact.zIndex['menu']);
26536
26734
  }
26735
+ if (isMobileMode) {
26736
+ currentPanel && currentPanel.previousElementSibling.scrollIntoView({
26737
+ block: 'nearest',
26738
+ inline: 'nearest'
26739
+ });
26740
+ }
26537
26741
  return function () {
26538
26742
  ZIndexUtils.clear(currentPanel);
26539
26743
  };
@@ -26659,6 +26863,26 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26659
26863
  }
26660
26864
  return null;
26661
26865
  };
26866
+ var createStyle = function createStyle() {
26867
+ if (!styleElementRef.current) {
26868
+ styleElementRef.current = DomHandler.createInlineStyle(PrimeReact.nonce);
26869
+ var selector = "".concat(attributeSelectorState);
26870
+ var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-megamenu[").concat(selector, "] > .p-megamenu-root-list .p-menuitem-active .p-megamenu-panel {\n position: relative;\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n background: inherit;\n }\n\n .p-megamenu[").concat(selector, "] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-megamenu[").concat(selector, "] .p-megamenu-grid {\n flex-wrap: wrap;\n }\n\n ").concat(horizontal ? "\n.p-megamenu[".concat(selector, "] .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal {\n position: relative;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal .p-megamenu-root-list {\n display: none;\n}\n\n.p-megamenu-horizontal[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: auto;\n flex: 1;\n padding: 0;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-mobile-active .p-megamenu-root-list {\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n ") : '', "\n\n ").concat(vertical ? "\n.p-megamenu-vertical[".concat(selector, "] {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-root-list {\n max-height: ").concat(props.scrollHeight, ";\n overflow: ").concat(props.scrollHeight ? 'auto' : '', ";\n}\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: 100%;\n padding: 0;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-submenu {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] .p-megamenu-submenu-header {\n background: inherit;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-submenu-icon:before {\n content: \"\\e930\";\n}\n ") : '', "\n}\n");
26871
+ styleElementRef.current.innerHTML = innerHTML;
26872
+ }
26873
+ };
26874
+ var destroyStyle = function destroyStyle() {
26875
+ styleElementRef.current = DomHandler.removeInlineStyle(styleElementRef.current);
26876
+ };
26877
+ useUpdateEffect(function () {
26878
+ if (attributeSelectorState && elementRef.current) {
26879
+ elementRef.current.setAttribute(attributeSelectorState, '');
26880
+ createStyle();
26881
+ }
26882
+ return function () {
26883
+ destroyStyle();
26884
+ };
26885
+ }, [attributeSelectorState, props.breakpoint]);
26662
26886
  var createCategory = function createCategory(category, index) {
26663
26887
  var className = classNames('p-menuitem', {
26664
26888
  'p-menuitem-active': category === activeItemState
@@ -26729,20 +26953,41 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
26729
26953
  }
26730
26954
  return null;
26731
26955
  };
26956
+ var createMenuButton = function createMenuButton() {
26957
+ if (props.orientation === 'vertical' || props.model && props.model.length < 1) {
26958
+ return null;
26959
+ }
26960
+ /* eslint-disable */
26961
+ var button = /*#__PURE__*/React.createElement("a", {
26962
+ ref: menuButtonRef,
26963
+ href: '#',
26964
+ role: "button",
26965
+ tabIndex: 0,
26966
+ className: "p-megamenu-button",
26967
+ onClick: toggle
26968
+ }, /*#__PURE__*/React.createElement("i", {
26969
+ className: "pi pi-bars"
26970
+ }));
26971
+ /* eslint-enable */
26972
+
26973
+ return button;
26974
+ };
26732
26975
  var otherProps = MegaMenuBase.getOtherProps(props);
26733
26976
  var className = classNames('p-megamenu p-component', {
26734
26977
  'p-megamenu-horizontal': props.orientation === 'horizontal',
26735
- 'p-megamenu-vertical': props.orientation === 'vertical'
26978
+ 'p-megamenu-vertical': props.orientation === 'vertical',
26979
+ 'p-megamenu-mobile-active': mobileActiveState
26736
26980
  }, props.className);
26737
26981
  var menu = createMenu();
26738
26982
  var start = createStartContent();
26739
26983
  var end = createEndContent();
26984
+ var menuButton = createMenuButton();
26740
26985
  return /*#__PURE__*/React.createElement("div", _extends({
26741
26986
  ref: elementRef,
26742
26987
  id: props.id,
26743
26988
  className: className,
26744
26989
  style: props.style
26745
- }, otherProps), start, menu, end);
26990
+ }, otherProps), start, menuButton, menu, end);
26746
26991
  }));
26747
26992
  MegaMenu.displayName = 'MegaMenu';
26748
26993
 
@@ -28278,6 +28523,7 @@ var MultiSelectPanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fu
28278
28523
  var content = isEmptyFilter() ? createEmptyFilter() : options.children;
28279
28524
  return /*#__PURE__*/React.createElement("ul", {
28280
28525
  ref: options.contentRef,
28526
+ style: options.style,
28281
28527
  className: className,
28282
28528
  role: "listbox",
28283
28529
  "aria-multiselectable": true
@@ -35727,6 +35973,8 @@ var TieredMenuBase = {
35727
35973
  className: null,
35728
35974
  autoZIndex: true,
35729
35975
  baseZIndex: 0,
35976
+ breakpoint: undefined,
35977
+ scrollHeight: '400px',
35730
35978
  appendTo: null,
35731
35979
  transitionOptions: null,
35732
35980
  onShow: null,
@@ -35750,13 +35998,20 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
35750
35998
  var _useEventListener = useEventListener({
35751
35999
  type: 'click',
35752
36000
  listener: function listener(event) {
35753
- if (elementRef.current && !elementRef.current.contains(event.target)) {
36001
+ if (!props.isMobileMode && elementRef.current && !elementRef.current.contains(event.target)) {
35754
36002
  setActiveItemState(null);
35755
36003
  }
35756
36004
  }
35757
36005
  }),
35758
36006
  _useEventListener2 = _slicedToArray(_useEventListener, 1),
35759
36007
  bindDocumentClickListener = _useEventListener2[0];
36008
+ var _useResizeListener = useResizeListener({
36009
+ listener: function listener() {
36010
+ !props.isMobileMode && setActiveItemState(null);
36011
+ }
36012
+ }),
36013
+ _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
36014
+ bindDocumentResizeListener = _useResizeListener2[0];
35760
36015
  var position = function position() {
35761
36016
  if (elementRef.current) {
35762
36017
  var parentItem = elementRef.current.parentElement;
@@ -35776,7 +36031,7 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
35776
36031
  }
35777
36032
  };
35778
36033
  var onItemMouseEnter = function onItemMouseEnter(event, item) {
35779
- if (item.disabled) {
36034
+ if (item.disabled || props.isMobileMode) {
35780
36035
  event.preventDefault();
35781
36036
  return;
35782
36037
  }
@@ -35802,7 +36057,7 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
35802
36057
  item: item
35803
36058
  });
35804
36059
  }
35805
- if (props.root) {
36060
+ if (props.root || props.isMobileMode) {
35806
36061
  if (item.items) {
35807
36062
  if (activeItemState && item === activeItemState) setActiveItemState(null);else setActiveItemState(item);
35808
36063
  }
@@ -35857,21 +36112,27 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
35857
36112
  return prevItem ? DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? findPrevItem(prevItem) : prevItem : null;
35858
36113
  };
35859
36114
  var onLeafClick = function onLeafClick(event) {
35860
- setActiveItemState(null);
35861
- props.onLeafClick && props.onLeafClick(event);
35862
- props.onHide && props.onHide(event);
36115
+ if (!props.isMobileMode || props.popup) {
36116
+ setActiveItemState(null);
36117
+ props.onLeafClick && props.onLeafClick(event);
36118
+ props.onHide && props.onHide(event);
36119
+ }
35863
36120
  };
35864
36121
  useMountEffect(function () {
35865
36122
  bindDocumentClickListener();
36123
+ bindDocumentResizeListener();
35866
36124
  });
35867
36125
  useUpdateEffect(function () {
35868
36126
  if (!props.parentActive) {
35869
36127
  setActiveItemState(null);
35870
36128
  }
35871
- if (!props.root && props.parentActive) {
36129
+ if (!props.root && props.parentActive && !props.isMobileMode) {
35872
36130
  position();
35873
36131
  }
35874
36132
  }, [props.parentActive]);
36133
+ useUpdateEffect(function () {
36134
+ props.onItemToggle && props.onItemToggle();
36135
+ }, [activeItemState]);
35875
36136
  var createSeparator = function createSeparator(index) {
35876
36137
  var key = 'separator_' + index;
35877
36138
  return /*#__PURE__*/React.createElement("li", {
@@ -35888,7 +36149,9 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
35888
36149
  onLeafClick: onLeafClick,
35889
36150
  popup: props.popup,
35890
36151
  onKeyDown: onChildItemKeyDown,
35891
- parentActive: item === activeItemState
36152
+ parentActive: item === activeItemState,
36153
+ isMobileMode: props.isMobileMode,
36154
+ onItemToggle: props.onItemToggle
35892
36155
  });
35893
36156
  }
35894
36157
  return null;
@@ -35998,8 +36261,14 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
35998
36261
  _React$useState2 = _slicedToArray(_React$useState, 2),
35999
36262
  visibleState = _React$useState2[0],
36000
36263
  setVisibleState = _React$useState2[1];
36264
+ var _React$useState3 = React.useState(null),
36265
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
36266
+ attributeSelectorState = _React$useState4[0],
36267
+ setAttributeSelectorState = _React$useState4[1];
36001
36268
  var menuRef = React.useRef(null);
36002
36269
  var targetRef = React.useRef(null);
36270
+ var styleElementRef = React.useRef(null);
36271
+ var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
36003
36272
  var _useOverlayListener = useOverlayListener({
36004
36273
  target: targetRef,
36005
36274
  overlay: menuRef,
@@ -36037,11 +36306,31 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
36037
36306
  props.onHide && props.onHide(event);
36038
36307
  }
36039
36308
  };
36309
+ var onItemToggle = function onItemToggle() {
36310
+ if (props.popup && isMobileMode) {
36311
+ DomHandler.absolutePosition(menuRef.current, targetRef.current);
36312
+ }
36313
+ };
36314
+ var createStyle = function createStyle() {
36315
+ if (!styleElementRef.current) {
36316
+ styleElementRef.current = DomHandler.createInlineStyle(PrimeReact.nonce);
36317
+ var selector = "".concat(attributeSelectorState);
36318
+ var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-tieredmenu[").concat(selector, "] > ul {\n max-height: ").concat(props.scrollHeight, ";\n overflow: ").concat(props.scrollHeight ? 'auto' : '', ";\n }\n\n .p-tieredmenu[").concat(selector, "] .p-submenu-list {\n position: relative;\n }\n\n .p-tieredmenu[").concat(selector, "] .p-menuitem-active > .p-submenu-list {\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n padding: 0 0 0 calc(var(--inline-spacing) * 2); /* @todo */\n }\n\n .p-tieredmenu[").concat(selector, "] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-tieredmenu[").concat(selector, "] .p-submenu-icon:before {\n content: \"\\e930\";\n }\n\n ").concat(!props.popup ? ".p-tieredmenu[".concat(selector, "] { width: 100%; }") : '', "\n}\n");
36319
+ styleElementRef.current.innerHTML = innerHTML;
36320
+ }
36321
+ };
36322
+ var destroyStyle = function destroyStyle() {
36323
+ styleElementRef.current = DomHandler.removeInlineStyle(styleElementRef.current);
36324
+ };
36040
36325
  var onEnter = function onEnter() {
36041
36326
  if (props.autoZIndex) {
36042
36327
  ZIndexUtils.set('menu', menuRef.current, PrimeReact.autoZIndex, props.baseZIndex || PrimeReact.zIndex['menu']);
36043
36328
  }
36044
36329
  DomHandler.absolutePosition(menuRef.current, targetRef.current);
36330
+ if (attributeSelectorState && props.breakpoint) {
36331
+ menuRef.current.setAttribute(attributeSelectorState, '');
36332
+ createStyle();
36333
+ }
36045
36334
  };
36046
36335
  var onEntered = function onEntered() {
36047
36336
  bindOverlayListener();
@@ -36052,7 +36341,22 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
36052
36341
  };
36053
36342
  var onExited = function onExited() {
36054
36343
  ZIndexUtils.clear(menuRef.current);
36344
+ destroyStyle();
36055
36345
  };
36346
+ useMountEffect(function () {
36347
+ if (props.breakpoint) {
36348
+ !attributeSelectorState && setAttributeSelectorState(UniqueComponentId());
36349
+ }
36350
+ });
36351
+ useUpdateEffect(function () {
36352
+ if (attributeSelectorState && menuRef.current) {
36353
+ menuRef.current.setAttribute(attributeSelectorState, '');
36354
+ createStyle();
36355
+ }
36356
+ return function () {
36357
+ destroyStyle();
36358
+ };
36359
+ }, [attributeSelectorState, props.breakpoint]);
36056
36360
  useUnmountEffect(function () {
36057
36361
  ZIndexUtils.clear(menuRef.current);
36058
36362
  });
@@ -36100,7 +36404,9 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
36100
36404
  model: props.model,
36101
36405
  root: true,
36102
36406
  popup: props.popup,
36103
- onHide: hide
36407
+ onHide: hide,
36408
+ isMobileMode: isMobileMode,
36409
+ onItemToggle: onItemToggle
36104
36410
  })));
36105
36411
  };
36106
36412
  var element = createElement();
@@ -38392,7 +38698,6 @@ var TreeTableBase = {
38392
38698
  defaultProps: {
38393
38699
  __TYPE: 'TreeTable',
38394
38700
  alwaysShowPaginator: true,
38395
- autoLayout: false,
38396
38701
  className: null,
38397
38702
  columnResizeMode: 'fit',
38398
38703
  contextMenuSelectionKey: null,
@@ -38907,14 +39212,14 @@ var TreeTableRow = /*#__PURE__*/React.memo(function (props) {
38907
39212
  return null;
38908
39213
  }
38909
39214
  };
38910
- var createCell = function createCell(column) {
39215
+ var createCell = function createCell(column, index) {
38911
39216
  var toggler, checkbox;
38912
39217
  if (getColumnProp(column, 'expander')) {
38913
39218
  toggler = createToggler();
38914
39219
  checkbox = createCheckbox();
38915
39220
  }
38916
39221
  return /*#__PURE__*/React.createElement(TreeTableBodyCell, _extends({
38917
- key: getColumnProp(column, 'columnKey') || getColumnProp(column, 'field')
39222
+ key: "".concat(getColumnProp(column, 'columnKey') || getColumnProp(column, 'field'), "_").concat(index)
38918
39223
  }, ColumnBase.getCProps(column), {
38919
39224
  column: column,
38920
39225
  selectOnEdit: props.selectOnEdit,
@@ -38927,7 +39232,7 @@ var TreeTableRow = /*#__PURE__*/React.memo(function (props) {
38927
39232
  if (expanded && props.node.children) {
38928
39233
  return props.node.children.map(function (childNode, index) {
38929
39234
  return /*#__PURE__*/React.createElement(TreeTableRow, {
38930
- key: childNode.key || JSON.stringify(childNode.data),
39235
+ key: "".concat(childNode.key || JSON.stringify(childNode.data), "_").concat(index),
38931
39236
  level: props.level + 1,
38932
39237
  rowIndex: props.rowIndex + '_' + index,
38933
39238
  node: childNode,
@@ -39132,7 +39437,7 @@ var TreeTableBody = /*#__PURE__*/React.memo(function (props) {
39132
39437
  };
39133
39438
  var createRow = function createRow(node, index) {
39134
39439
  return /*#__PURE__*/React.createElement(TreeTableRow, {
39135
- key: node.key || JSON.stringify(node.data),
39440
+ key: "".concat(node.key || JSON.stringify(node.data), "_").concat(index),
39136
39441
  level: 0,
39137
39442
  rowIndex: index,
39138
39443
  selectOnEdit: props.selectOnEdit,
@@ -40532,7 +40837,7 @@ var TreeTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
40532
40837
  }
40533
40838
  scrollableView = createScrollableView(value, scrollableColumns, false, props.headerColumnGroup, props.footerColumnGroup);
40534
40839
  return /*#__PURE__*/React.createElement("div", {
40535
- className: "p-treetable-scrollable-wrapper"
40840
+ className: "p-treetable-wrapper p-treetable-scrollable-wrapper"
40536
40841
  }, frozenView, scrollableView);
40537
40842
  };
40538
40843
  var createRegularTable = function createRegularTable(value) {
@@ -40540,12 +40845,17 @@ var TreeTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
40540
40845
  var header = createTableHeader(columns, props.headerColumnGroup);
40541
40846
  var footer = createTableFooter(columns, props.footerColumnGroup);
40542
40847
  var body = createTableBody(value, columns);
40848
+ var tableClassName = classNames('p-treetable-table', {
40849
+ 'p-treetable-scrollable-table': props.scrollable,
40850
+ 'p-treetable-resizable-table': props.resizableColumns,
40851
+ 'p-treetable-resizable-table-fit': props.resizableColumns && props.columnResizeMode === 'fit'
40852
+ }, props.tableClassName);
40543
40853
  return /*#__PURE__*/React.createElement("div", {
40544
40854
  className: "p-treetable-wrapper"
40545
40855
  }, /*#__PURE__*/React.createElement("table", {
40546
40856
  ref: tableRef,
40547
40857
  style: props.tableStyle,
40548
- className: props.tableClassName
40858
+ className: tableClassName
40549
40859
  }, header, footer, body));
40550
40860
  };
40551
40861
  var createTable = function createTable(value) {
@@ -40571,7 +40881,6 @@ var TreeTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
40571
40881
  'p-treetable-selectable': isRowSelectionMode(),
40572
40882
  'p-treetable-resizable': props.resizableColumns,
40573
40883
  'p-treetable-resizable-fit': props.resizableColumns && props.columnResizeMode === 'fit',
40574
- 'p-treetable-auto-layout': props.autoLayout,
40575
40884
  'p-treetable-striped': props.stripedRows,
40576
40885
  'p-treetable-gridlines': props.showGridlines
40577
40886
  }, props.className);
@@ -40614,7 +40923,7 @@ var TreeTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
40614
40923
  id: props.id,
40615
40924
  className: className,
40616
40925
  style: props.style,
40617
- "data-scrollselectors": ".p-treetable-scrollable-body"
40926
+ "data-scrollselectors": ".p-treetable-wrapper"
40618
40927
  }, otherProps), loader, headerFacet, paginatorTop, table, paginatorBottom, footerFacet, resizeHelper, reorderIndicatorUp, reorderIndicatorDown);
40619
40928
  });
40620
40929
  TreeTable.displayName = 'TreeTable';
@@ -40738,4 +41047,4 @@ var TriStateCheckbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fu
40738
41047
  }));
40739
41048
  TriStateCheckbox.displayName = 'TriStateCheckbox';
40740
41049
 
40741
- export { Accordion, AccordionTab, AutoComplete, Avatar, AvatarGroup, Badge, BlockUI, BreadCrumb, Button, CSSTransition, Calendar, Card, Carousel, CascadeSelect, PrimeReactChart as Chart, Checkbox, Chip, Chips, ColorPicker, Column, ColumnGroup, ConfirmDialog, ConfirmPopup, ConnectedOverlayScrollHandler, ContextMenu, DataScroller, DataTable, DataView, DataViewItem, DataViewLayoutOptions, DeferredContent, Dialog, Divider, Dock, DomHandler, Dropdown, Editor, EventBus, Fieldset, FileUpload, FilterMatchMode, FilterOperator, FilterService, Galleria, IconUtils, Image, Inplace, InplaceContent, InplaceDisplay, InputMask, InputNumber, InputSwitch, InputText, InputTextarea, KeyFilter, Knob, ListBox, MegaMenu, Mention, Menu, Menubar, Message, MessageSeverity, Messages, MultiSelect, MultiStateCheckbox, ObjectUtils, OrderList, OrganizationChart, OverlayPanel, OverlayService, Paginator, Panel, PanelMenu, Password, PickList, Portal, PrimeIcons, ProgressBar, ProgressSpinner, RadioButton, Rating, Ripple, Row, ScrollPanel, ScrollTop, SelectButton, Sidebar, Skeleton, SlideMenu, Slider, SortOrder, SpeedDial, SplitButton, Splitter, SplitterPanel, Steps, StyleClass, TabMenu, TabPanel, TabView, Tag, Terminal, TerminalService, TieredMenu, Timeline, Toast, ToggleButton, Toolbar, Tooltip, Tree, TreeSelect, TreeTable, TriStateCheckbox, UniqueComponentId, VirtualScroller, ZIndexUtils, addLocale, ariaLabel, classNames, confirmDialog, confirmPopup, PrimeReact as default, locale, localeOption, localeOptions, mask, updateLocaleOption, updateLocaleOptions, useClickOutside, useCounter, useDebounce, useEventListener, useFavicon, useIntersectionObserver, useInterval, useLocalStorage, useMountEffect, useMouse, useMove, useOverlayListener, useOverlayScrollListener, usePrevious, useResizeListener, useSessionStorage, useStorage, useTimeout, useUnmountEffect, useUpdateEffect };
41050
+ export { Accordion, AccordionTab, AutoComplete, Avatar, AvatarGroup, Badge, BlockUI, BreadCrumb, Button, CSSTransition, Calendar, Card, Carousel, CascadeSelect, PrimeReactChart as Chart, Checkbox, Chip, Chips, ColorPicker, Column, ColumnGroup, ConfirmDialog, ConfirmPopup, ConnectedOverlayScrollHandler, ContextMenu, DataScroller, DataTable, DataView, DataViewItem, DataViewLayoutOptions, DeferredContent, Dialog, Divider, Dock, DomHandler, Dropdown, Editor, EventBus, Fieldset, FileUpload, FilterMatchMode, FilterOperator, FilterService, Galleria, IconUtils, Image, Inplace, InplaceContent, InplaceDisplay, InputMask, InputNumber, InputSwitch, InputText, InputTextarea, KeyFilter, Knob, ListBox, MegaMenu, Mention, Menu, Menubar, Message, MessageSeverity, Messages, MultiSelect, MultiStateCheckbox, ObjectUtils, OrderList, OrganizationChart, OverlayPanel, OverlayService, Paginator, Panel, PanelMenu, Password, PickList, Portal, PrimeIcons, ProgressBar, ProgressSpinner, RadioButton, Rating, Ripple, Row, ScrollPanel, ScrollTop, SelectButton, Sidebar, Skeleton, SlideMenu, Slider, SortOrder, SpeedDial, SplitButton, Splitter, SplitterPanel, Steps, StyleClass, TabMenu, TabPanel, TabView, Tag, Terminal, TerminalService, TieredMenu, Timeline, Toast, ToggleButton, Toolbar, Tooltip, Tree, TreeSelect, TreeTable, TriStateCheckbox, UniqueComponentId, VirtualScroller, ZIndexUtils, addLocale, ariaLabel, classNames, confirmDialog, confirmPopup, PrimeReact as default, locale, localeOption, localeOptions, mask, updateLocaleOption, updateLocaleOptions, useClickOutside, useCounter, useDebounce, useEventListener, useFavicon, useIntersectionObserver, useInterval, useLocalStorage, useMatchMedia, useMountEffect, useMouse, useMove, useOverlayListener, useOverlayScrollListener, usePrevious, useResizeListener, useSessionStorage, useStorage, useTimeout, useUnmountEffect, useUpdateEffect };