primereact 7.2.0 → 7.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/calendar/calendar.cjs.js +1 -1
  2. package/calendar/calendar.cjs.min.js +1 -1
  3. package/calendar/calendar.esm.js +1 -1
  4. package/calendar/calendar.esm.min.js +1 -1
  5. package/calendar/calendar.js +1 -1
  6. package/calendar/calendar.min.js +1 -1
  7. package/carousel/carousel.cjs.js +212 -5
  8. package/carousel/carousel.cjs.min.js +1 -1
  9. package/carousel/carousel.esm.js +212 -5
  10. package/carousel/carousel.esm.min.js +1 -1
  11. package/carousel/carousel.js +212 -5
  12. package/carousel/carousel.min.js +1 -1
  13. package/core/core.js +34 -3
  14. package/core/core.min.js +4 -4
  15. package/datatable/datatable.cjs.js +21 -16
  16. package/datatable/datatable.cjs.min.js +1 -1
  17. package/datatable/datatable.d.ts +1 -0
  18. package/datatable/datatable.esm.js +21 -16
  19. package/datatable/datatable.esm.min.js +1 -1
  20. package/datatable/datatable.js +21 -16
  21. package/datatable/datatable.min.js +1 -1
  22. package/dataview/dataview.cjs.js +1 -5
  23. package/dataview/dataview.cjs.min.js +1 -1
  24. package/dataview/dataview.esm.js +1 -5
  25. package/dataview/dataview.esm.min.js +1 -1
  26. package/dataview/dataview.js +1 -5
  27. package/dataview/dataview.min.js +1 -1
  28. package/dropdown/dropdown.cjs.js +1 -1
  29. package/dropdown/dropdown.cjs.min.js +1 -1
  30. package/dropdown/dropdown.esm.js +1 -1
  31. package/dropdown/dropdown.esm.min.js +1 -1
  32. package/dropdown/dropdown.js +1 -1
  33. package/dropdown/dropdown.min.js +1 -1
  34. package/galleria/galleria.cjs.js +212 -5
  35. package/galleria/galleria.cjs.min.js +1 -1
  36. package/galleria/galleria.esm.js +212 -5
  37. package/galleria/galleria.esm.min.js +1 -1
  38. package/galleria/galleria.js +212 -5
  39. package/galleria/galleria.min.js +1 -1
  40. package/inputnumber/inputnumber.cjs.js +5 -1
  41. package/inputnumber/inputnumber.cjs.min.js +1 -1
  42. package/inputnumber/inputnumber.esm.js +5 -1
  43. package/inputnumber/inputnumber.esm.min.js +1 -1
  44. package/inputnumber/inputnumber.js +5 -1
  45. package/inputnumber/inputnumber.min.js +1 -1
  46. package/knob/knob.cjs.js +1 -1
  47. package/knob/knob.cjs.min.js +1 -1
  48. package/knob/knob.esm.js +1 -1
  49. package/knob/knob.esm.min.js +1 -1
  50. package/knob/knob.js +1 -1
  51. package/knob/knob.min.js +1 -1
  52. package/multiselect/multiselect.cjs.js +1 -1
  53. package/multiselect/multiselect.cjs.min.js +1 -1
  54. package/multiselect/multiselect.esm.js +1 -1
  55. package/multiselect/multiselect.esm.min.js +1 -1
  56. package/multiselect/multiselect.js +1 -1
  57. package/multiselect/multiselect.min.js +1 -1
  58. package/package.json +1 -1
  59. package/primereact.all.cjs.js +142 -122
  60. package/primereact.all.cjs.min.js +1 -1
  61. package/primereact.all.esm.js +142 -122
  62. package/primereact.all.esm.min.js +1 -1
  63. package/primereact.all.js +142 -122
  64. package/primereact.all.min.js +1 -1
  65. package/resources/primereact.css +7 -2
  66. package/resources/primereact.min.css +1 -1
  67. package/resources/themes/arya-blue/theme.css +254 -2
  68. package/resources/themes/arya-green/theme.css +254 -2
  69. package/resources/themes/arya-orange/theme.css +254 -2
  70. package/resources/themes/arya-purple/theme.css +254 -2
  71. package/resources/themes/bootstrap4-dark-blue/theme.css +254 -2
  72. package/resources/themes/bootstrap4-dark-purple/theme.css +254 -2
  73. package/resources/themes/bootstrap4-light-blue/theme.css +252 -0
  74. package/resources/themes/bootstrap4-light-purple/theme.css +252 -0
  75. package/resources/themes/fluent-light/theme.css +252 -0
  76. package/resources/themes/lara-dark-blue/theme.css +261 -44
  77. package/resources/themes/lara-dark-indigo/theme.css +261 -44
  78. package/resources/themes/lara-dark-purple/theme.css +261 -44
  79. package/resources/themes/lara-dark-teal/theme.css +261 -44
  80. package/resources/themes/lara-light-blue/theme.css +259 -42
  81. package/resources/themes/lara-light-indigo/theme.css +259 -42
  82. package/resources/themes/lara-light-purple/theme.css +259 -42
  83. package/resources/themes/lara-light-teal/theme.css +259 -42
  84. package/resources/themes/luna-amber/theme.css +252 -0
  85. package/resources/themes/luna-blue/theme.css +252 -0
  86. package/resources/themes/luna-green/theme.css +252 -0
  87. package/resources/themes/luna-pink/theme.css +252 -0
  88. package/resources/themes/md-dark-deeppurple/theme.css +328 -2
  89. package/resources/themes/md-dark-indigo/theme.css +328 -2
  90. package/resources/themes/md-light-deeppurple/theme.css +326 -0
  91. package/resources/themes/md-light-indigo/theme.css +326 -0
  92. package/resources/themes/mdc-dark-deeppurple/theme.css +328 -2
  93. package/resources/themes/mdc-dark-indigo/theme.css +328 -2
  94. package/resources/themes/mdc-light-deeppurple/theme.css +326 -0
  95. package/resources/themes/mdc-light-indigo/theme.css +326 -0
  96. package/resources/themes/nova/theme.css +252 -0
  97. package/resources/themes/nova-accent/theme.css +252 -0
  98. package/resources/themes/nova-alt/theme.css +252 -0
  99. package/resources/themes/rhea/theme.css +252 -0
  100. package/resources/themes/saga-blue/theme.css +252 -0
  101. package/resources/themes/saga-green/theme.css +252 -0
  102. package/resources/themes/saga-orange/theme.css +252 -0
  103. package/resources/themes/saga-purple/theme.css +252 -0
  104. package/resources/themes/tailwind-light/theme.css +252 -0
  105. package/resources/themes/vela-blue/theme.css +254 -2
  106. package/resources/themes/vela-green/theme.css +254 -2
  107. package/resources/themes/vela-orange/theme.css +254 -2
  108. package/resources/themes/vela-purple/theme.css +254 -2
  109. package/splitbutton/splitbutton.d.ts +4 -1
  110. package/splitbutton/splitbutton.min.css +1 -1
  111. package/tabmenu/tabmenu.cjs.js +1 -1
  112. package/tabmenu/tabmenu.cjs.min.js +1 -1
  113. package/tabmenu/tabmenu.esm.js +1 -1
  114. package/tabmenu/tabmenu.esm.min.js +1 -1
  115. package/tabmenu/tabmenu.js +1 -1
  116. package/tabmenu/tabmenu.min.js +1 -1
  117. package/tabview/tabview.cjs.js +1 -1
  118. package/tabview/tabview.cjs.min.js +1 -1
  119. package/tabview/tabview.esm.js +1 -1
  120. package/tabview/tabview.esm.min.js +1 -1
  121. package/tabview/tabview.js +1 -1
  122. package/tabview/tabview.min.js +1 -1
  123. package/toolbar/toolbar.min.css +1 -1
  124. package/tree/tree.cjs.js +2 -1
  125. package/tree/tree.cjs.min.js +1 -1
  126. package/tree/tree.esm.js +2 -1
  127. package/tree/tree.esm.min.js +1 -1
  128. package/tree/tree.js +2 -1
  129. package/tree/tree.min.js +1 -1
  130. package/treeselect/treeselect.cjs.js +3 -3
  131. package/treeselect/treeselect.cjs.min.js +1 -1
  132. package/treeselect/treeselect.esm.js +3 -3
  133. package/treeselect/treeselect.esm.min.js +1 -1
  134. package/treeselect/treeselect.js +3 -3
  135. package/treeselect/treeselect.min.js +1 -1
  136. package/treetable/treetable.cjs.js +12 -10
  137. package/treetable/treetable.cjs.min.js +1 -1
  138. package/treetable/treetable.esm.js +8 -7
  139. package/treetable/treetable.esm.min.js +1 -1
  140. package/treetable/treetable.js +12 -10
  141. package/treetable/treetable.min.js +1 -1
  142. package/utils/utils.cjs.js +26 -0
  143. package/utils/utils.cjs.min.js +1 -1
  144. package/utils/utils.d.ts +1 -0
  145. package/utils/utils.esm.js +26 -0
  146. package/utils/utils.esm.min.js +1 -1
  147. package/utils/utils.js +26 -0
  148. package/utils/utils.min.js +1 -1
  149. package/web-types.json +15 -3
  150. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  151. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  152. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  153. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  154. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  155. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  156. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  157. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  158. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  159. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  160. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  161. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  162. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  163. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  164. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  165. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  166. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  167. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  168. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  169. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  170. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  171. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  172. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  173. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  174. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  175. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  176. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  177. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  178. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  179. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  180. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  181. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  182. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  183. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  184. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  185. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  186. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  187. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  188. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  189. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  190. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  191. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  192. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  193. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  194. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  195. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  196. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  197. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  198. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  199. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  200. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  201. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  202. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  203. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  204. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  205. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  206. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  207. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  208. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  209. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  210. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  211. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  212. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  213. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  214. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  215. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  216. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  217. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  218. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  219. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  220. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  221. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  222. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  223. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  224. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  225. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  226. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  227. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  228. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  229. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
@@ -363,6 +363,7 @@ export interface DataTableProps {
363
363
 
364
364
  export declare class DataTable extends React.Component<DataTableProps, any> {
365
365
  public reset(): void;
366
+ public resetScroll(): void;
366
367
  public exportCSV(options?: { selectionOnly: boolean }): void;
367
368
  public filter<T>(value: T, field: string, mode: DataTableFilterMatchModeType, index?: number): void;
368
369
  public resetColumnOrder(): void;
@@ -2244,12 +2244,6 @@ var TableBody = /*#__PURE__*/function (_Component) {
2244
2244
  key: "selectRange",
2245
2245
  value: function selectRange(event) {
2246
2246
  var rangeStart, rangeEnd;
2247
- var isLazyAndPaginator = this.props.lazy && this.props.paginator;
2248
-
2249
- if (isLazyAndPaginator) {
2250
- this.anchorRowIndex += this.anchorRowFirst;
2251
- this.rangeRowIndex += this.props.first;
2252
- }
2253
2247
 
2254
2248
  if (this.rangeRowIndex > this.anchorRowIndex) {
2255
2249
  rangeStart = this.anchorRowIndex;
@@ -2261,7 +2255,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
2261
2255
  rangeStart = rangeEnd = this.rangeRowIndex;
2262
2256
  }
2263
2257
 
2264
- if (isLazyAndPaginator) {
2258
+ if (this.props.paginator) {
2265
2259
  rangeStart = Math.max(rangeStart - this.props.first, 0);
2266
2260
  rangeEnd -= this.props.first;
2267
2261
  }
@@ -2815,6 +2809,10 @@ var TableBody = /*#__PURE__*/function (_Component) {
2815
2809
  if (!this.props.isVirtualScrollerDisabled && this.getVirtualScrollerOption('vertical') && this.getVirtualScrollerOption('itemSize', prevProps.virtualScrollerOptions) !== this.getVirtualScrollerOption('itemSize')) {
2816
2810
  this.updateVirtualScrollerPosition();
2817
2811
  }
2812
+
2813
+ if (this.props.paginator && this.isMultipleSelection() && this.props.first !== prevProps.first) {
2814
+ this.anchorRowIndex = null;
2815
+ }
2818
2816
  }
2819
2817
  }, {
2820
2818
  key: "componentWillUnmount",
@@ -5889,11 +5887,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
5889
5887
  }, {
5890
5888
  key: "compareValuesOnSort",
5891
5889
  value: function compareValuesOnSort(value1, value2) {
5892
- var result = null;
5893
- if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {
5894
- numeric: true
5895
- });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
5896
- return result;
5890
+ return ObjectUtils.sort(value1, value2, 1, PrimeReact.locale);
5897
5891
  }
5898
5892
  }, {
5899
5893
  key: "addSortMeta",
@@ -6230,6 +6224,14 @@ var DataTable = /*#__PURE__*/function (_Component) {
6230
6224
  this.resetColumnOrder();
6231
6225
  this.setState(state);
6232
6226
  }
6227
+ }, {
6228
+ key: "resetScroll",
6229
+ value: function resetScroll() {
6230
+ if (this.wrapper) {
6231
+ var scrollableContainer = !this.isVirtualScrollerDisabled() ? DomHandler.findSingle(this.wrapper, '.p-virtualscroller') : this.wrapper;
6232
+ scrollableContainer.scrollTo(0, 0);
6233
+ }
6234
+ }
6233
6235
  }, {
6234
6236
  key: "resetColumnOrder",
6235
6237
  value: function resetColumnOrder() {
@@ -6371,11 +6373,11 @@ var DataTable = /*#__PURE__*/function (_Component) {
6371
6373
  attributeSelector: UniqueComponentId()
6372
6374
  }, function () {
6373
6375
  _this16.el.setAttribute(_this16.state.attributeSelector, '');
6374
- });
6375
6376
 
6376
- if (this.props.responsiveLayout === 'stack' && !this.props.scrollable) {
6377
- this.createResponsiveStyle();
6378
- }
6377
+ if (_this16.props.responsiveLayout === 'stack' && !_this16.props.scrollable) {
6378
+ _this16.createResponsiveStyle();
6379
+ }
6380
+ });
6379
6381
 
6380
6382
  if (this.isStateful()) {
6381
6383
  this.setState(this.restoreState(this.state));
@@ -6660,6 +6662,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
6660
6662
  var isVirtualScrollerDisabled = this.isVirtualScrollerDisabled();
6661
6663
  var virtualScrollerOptions = this.props.virtualScrollerOptions || {};
6662
6664
  return /*#__PURE__*/React.createElement("div", {
6665
+ ref: function ref(el) {
6666
+ return _this17.wrapper = el;
6667
+ },
6663
6668
  className: "p-datatable-wrapper",
6664
6669
  style: {
6665
6670
  maxHeight: isVirtualScrollerDisabled ? this.props.scrollHeight : null