primevue 3.26.0 → 3.26.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 (82) hide show
  1. package/api/Api.d.ts +292 -284
  2. package/badge/Badge.d.ts +1 -1
  3. package/button/Button.d.ts +1 -1
  4. package/calendar/Calendar.vue +1 -1
  5. package/calendar/calendar.cjs.js +1 -1
  6. package/calendar/calendar.cjs.min.js +1 -1
  7. package/calendar/calendar.esm.js +1 -1
  8. package/calendar/calendar.esm.min.js +1 -1
  9. package/calendar/calendar.js +1 -1
  10. package/calendar/calendar.min.js +1 -1
  11. package/config/config.cjs.js +1 -1
  12. package/config/config.cjs.min.js +1 -1
  13. package/config/config.esm.js +1 -1
  14. package/config/config.esm.min.js +1 -1
  15. package/config/config.js +1 -1
  16. package/config/config.min.js +1 -1
  17. package/core/core.js +5 -4
  18. package/core/core.min.js +3 -3
  19. package/datatable/DataTable.d.ts +2 -2
  20. package/datatable/DataTable.vue +3 -1
  21. package/datatable/TableBody.vue +17 -5
  22. package/datatable/datatable.cjs.js +18 -15
  23. package/datatable/datatable.cjs.min.js +1 -1
  24. package/datatable/datatable.esm.js +18 -15
  25. package/datatable/datatable.esm.min.js +1 -1
  26. package/datatable/datatable.js +18 -15
  27. package/datatable/datatable.min.js +1 -1
  28. package/dropdown/Dropdown.d.ts +1 -1
  29. package/dropdown/Dropdown.vue +3 -2
  30. package/dropdown/dropdown.cjs.js +3 -2
  31. package/dropdown/dropdown.cjs.min.js +1 -1
  32. package/dropdown/dropdown.esm.js +3 -2
  33. package/dropdown/dropdown.esm.min.js +1 -1
  34. package/dropdown/dropdown.js +3 -2
  35. package/dropdown/dropdown.min.js +1 -1
  36. package/image/Image.d.ts +25 -0
  37. package/image/Image.vue +24 -6
  38. package/image/image.cjs.js +51 -41
  39. package/image/image.cjs.min.js +1 -1
  40. package/image/image.esm.js +51 -41
  41. package/image/image.esm.min.js +1 -1
  42. package/image/image.js +51 -41
  43. package/image/image.min.js +1 -1
  44. package/inlinemessage/InlineMessage.d.ts +1 -1
  45. package/listbox/Listbox.d.ts +1 -1
  46. package/message/Message.d.ts +1 -1
  47. package/multiselect/MultiSelect.d.ts +1 -1
  48. package/multiselect/MultiSelect.vue +3 -2
  49. package/multiselect/multiselect.cjs.js +3 -2
  50. package/multiselect/multiselect.cjs.min.js +1 -1
  51. package/multiselect/multiselect.esm.js +3 -2
  52. package/multiselect/multiselect.esm.min.js +1 -1
  53. package/multiselect/multiselect.js +3 -2
  54. package/multiselect/multiselect.min.js +1 -1
  55. package/package.json +1 -1
  56. package/splitbutton/SplitButton.d.ts +1 -1
  57. package/splitbutton/splitbutton.cjs.js +2 -2
  58. package/splitbutton/splitbutton.cjs.min.js +1 -1
  59. package/splitbutton/splitbutton.esm.js +2 -2
  60. package/splitbutton/splitbutton.esm.min.js +1 -1
  61. package/splitbutton/splitbutton.js +2 -2
  62. package/splitbutton/splitbutton.min.js +1 -1
  63. package/splitter/Splitter.vue +2 -11
  64. package/splitter/splitter.cjs.js +1 -2
  65. package/splitter/splitter.cjs.min.js +1 -1
  66. package/splitter/splitter.esm.js +1 -2
  67. package/splitter/splitter.esm.min.js +1 -1
  68. package/splitter/splitter.js +1 -2
  69. package/splitter/splitter.min.js +1 -1
  70. package/tag/Tag.d.ts +1 -1
  71. package/toast/Toast.d.ts +1 -1
  72. package/treetable/TreeTable.d.ts +2 -2
  73. package/vetur-attributes.json +4 -0
  74. package/vetur-tags.json +2 -1
  75. package/virtualscroller/VirtualScroller.vue +1 -1
  76. package/virtualscroller/virtualscroller.cjs.js +1 -1
  77. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  78. package/virtualscroller/virtualscroller.esm.js +1 -1
  79. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  80. package/virtualscroller/virtualscroller.js +1 -1
  81. package/virtualscroller/virtualscroller.min.js +1 -1
  82. package/web-types.json +37 -2
@@ -797,6 +797,10 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
797
797
  type: Array,
798
798
  default: null
799
799
  },
800
+ first: {
801
+ type: Number,
802
+ default: 0
803
+ },
800
804
  dataKey: {
801
805
  type: String,
802
806
  default: null
@@ -928,12 +932,12 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
928
932
  }
929
933
  },
930
934
  getRowKey(rowData, index) {
931
- return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey) : index;
935
+ return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey) : this.getRowIndex(index);
932
936
  },
933
937
  getRowIndex(index) {
934
938
  const getItemOptions = this.getVirtualScrollerProp('getItemOptions');
935
939
 
936
- return getItemOptions ? getItemOptions(index).index : index;
940
+ return getItemOptions ? getItemOptions(index).index : this.first + index;
937
941
  },
938
942
  getRowStyle(rowData) {
939
943
  if (this.rowStyle) {
@@ -1211,6 +1215,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
1211
1215
  let hiddenColLength = 0;
1212
1216
 
1213
1217
  this.columns.forEach((column) => {
1218
+ if (this.columnProp(column, 'selectionMode') === 'single') hiddenColLength--;
1214
1219
  if (this.columnProp(column, 'hidden')) hiddenColLength++;
1215
1220
  });
1216
1221
 
@@ -1262,12 +1267,10 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
1262
1267
  }, [
1263
1268
  (!$props.empty)
1264
1269
  ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList($props.value, (rowData, index) => {
1265
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1266
- key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_subheader'
1267
- }, [
1270
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
1268
1271
  ($props.templates['groupheader'] && $props.rowGroupMode === 'subheader' && $options.shouldRenderRowGroupHeader($props.value, rowData, $options.getRowIndex(index)))
1269
1272
  ? (vue.openBlock(), vue.createElementBlock("tr", {
1270
- key: 0,
1273
+ key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_subheader',
1271
1274
  class: "p-rowgroup-header",
1272
1275
  style: vue.normalizeStyle($options.rowGroupHeaderStyle),
1273
1276
  role: "row"
@@ -1315,12 +1318,10 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
1315
1318
  onDrop: _cache[13] || (_cache[13] = $event => ($options.onRowDrop($event)))
1316
1319
  }, [
1317
1320
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
1318
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1319
- key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
1320
- }, [
1321
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
1321
1322
  ($options.shouldRenderBodyCell($props.value, col, $options.getRowIndex(index)))
1322
1323
  ? (vue.openBlock(), vue.createBlock(_component_DTBodyCell, {
1323
- key: 0,
1324
+ key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i,
1324
1325
  rowData: rowData,
1325
1326
  column: col,
1326
1327
  rowIndex: $options.getRowIndex(index),
@@ -1349,7 +1350,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
1349
1350
  }, null, 8, ["rowData", "column", "rowIndex", "index", "selected", "rowTogglerIcon", "frozenRow", "rowspan", "editMode", "editing", "editingMeta", "responsiveLayout", "virtualScrollerContentProps", "ariaControls", "name", "onEditingMetaChange"]))
1350
1351
  : vue.createCommentVNode("", true)
1351
1352
  ], 64))
1352
- }), 128))
1353
+ }), 256))
1353
1354
  ], 46, _hoisted_3$4))
1354
1355
  : vue.createCommentVNode("", true),
1355
1356
  ($props.templates['expansion'] && $props.expandedRows && $options.isRowExpanded(rowData))
@@ -1384,7 +1385,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
1384
1385
  ]))
1385
1386
  : vue.createCommentVNode("", true)
1386
1387
  ], 64))
1387
- }), 128))
1388
+ }), 256))
1388
1389
  : (vue.openBlock(), vue.createElementBlock("tr", _hoisted_7$1, [
1389
1390
  vue.createElementVNode("td", { colspan: $options.columnsLength }, [
1390
1391
  ($props.templates.empty)
@@ -5220,7 +5221,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
5220
5221
  vue.createVNode(_component_DTVirtualScroller, vue.mergeProps({ ref: "virtualScroller" }, $props.virtualScrollerOptions, {
5221
5222
  items: $options.processedData,
5222
5223
  columns: $options.columns,
5223
- style: { height: $props.scrollHeight !== 'flex' ? $props.scrollHeight : undefined },
5224
+ style: $props.scrollHeight !== 'flex' ? { height: $props.scrollHeight } : undefined,
5224
5225
  scrollHeight: $props.scrollHeight !== 'flex' ? undefined : '100%',
5225
5226
  disabled: $options.virtualScrollerDisabled,
5226
5227
  loaderDisabled: "",
@@ -5272,6 +5273,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
5272
5273
  frozenRow: true,
5273
5274
  class: "p-datatable-frozen-tbody",
5274
5275
  columns: slotProps.columns,
5276
+ first: $data.d_first,
5275
5277
  dataKey: $props.dataKey,
5276
5278
  selection: $props.selection,
5277
5279
  selectionKeys: $data.d_selectionKeys,
@@ -5319,7 +5321,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
5319
5321
  onRowEditCancel: _cache[25] || (_cache[25] = $event => ($options.onRowEditCancel($event))),
5320
5322
  editingMeta: $data.d_editingMeta,
5321
5323
  onEditingMetaChange: $options.onEditingMetaChange
5322
- }, null, 8, ["value", "columns", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]))
5324
+ }, null, 8, ["value", "columns", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]))
5323
5325
  : vue.createCommentVNode("", true),
5324
5326
  vue.createVNode(_component_DTTableBody, {
5325
5327
  ref: "bodyRef",
@@ -5327,6 +5329,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
5327
5329
  class: vue.normalizeClass(slotProps.styleClass),
5328
5330
  columns: slotProps.columns,
5329
5331
  empty: $options.empty,
5332
+ first: $data.d_first,
5330
5333
  dataKey: $props.dataKey,
5331
5334
  selection: $props.selection,
5332
5335
  selectionKeys: $data.d_selectionKeys,
@@ -5375,7 +5378,7 @@ this.primevue.datatable = (function (api, Paginator, utils, VirtualScroller, Ove
5375
5378
  onRowEditCancel: _cache[42] || (_cache[42] = $event => ($options.onRowEditCancel($event))),
5376
5379
  editingMeta: $data.d_editingMeta,
5377
5380
  onEditingMetaChange: $options.onEditingMetaChange
5378
- }, null, 8, ["value", "class", "columns", "empty", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]),
5381
+ }, null, 8, ["value", "class", "columns", "empty", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]),
5379
5382
  ($options.hasSpacerStyle(slotProps.spacerStyle))
5380
5383
  ? (vue.openBlock(), vue.createElementBlock("tbody", {
5381
5384
  key: 1,