From 0732a6c19238dfc58654867af39840349d9bc0b7 Mon Sep 17 00:00:00 2001 From: betavs Date: Thu, 9 Nov 2023 10:30:48 +0800 Subject: [PATCH 01/69] fix(split-button): outlined split button right border duplication on hover --- components/lib/splitbutton/style/SplitButtonStyle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lib/splitbutton/style/SplitButtonStyle.js b/components/lib/splitbutton/style/SplitButtonStyle.js index 920a91ee5..8f28b3c86 100644 --- a/components/lib/splitbutton/style/SplitButtonStyle.js +++ b/components/lib/splitbutton/style/SplitButtonStyle.js @@ -9,7 +9,8 @@ const css = ` .p-splitbutton .p-splitbutton-defaultbutton, .p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button, - .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button { + .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button, + .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button-outlined.p-button:hover { flex: 1 1 auto; border-top-right-radius: 0; border-bottom-right-radius: 0; From 2603b7a1405d42283e78a54333e7a0e3bf3b3d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ro=CC=88ttgen?= Date: Thu, 23 Nov 2023 16:48:14 +0100 Subject: [PATCH 02/69] Add 'filter'-event to Tree.vue --- components/lib/tree/Tree.d.ts | 22 +++++++++++++++++++++- components/lib/tree/Tree.spec.js | 16 ++++++++++++++-- components/lib/tree/Tree.vue | 4 +++- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/components/lib/tree/Tree.d.ts b/components/lib/tree/Tree.d.ts index e10178ff2..f25ade0e6 100755 --- a/components/lib/tree/Tree.d.ts +++ b/components/lib/tree/Tree.d.ts @@ -120,6 +120,21 @@ export interface TreeSelectionKeys { [key: string]: any; } +/** + * Custom filter event. + * @see {@link TreeEmits.filter} + */ +export interface TreeFilterEvent { + /** + * Original event + */ + originalEvent: Event; + /** + * Filter value + */ + value: string; +} + /** * Custom passthrough(pt) options. * @see {@link TreeProps.pt} @@ -424,7 +439,7 @@ export interface TreeEmits { * Emitted when the selection keys change. * @param {TreeSelectionKeys} value - New selection keys. */ - 'update:selectionKeys'(event: TreeSelectionKeys): void; + 'update:selectionKeys'(value: TreeSelectionKeys): void; /** * Callback to invoke when a node is selected. * @param {TreeNode} node - Node instance. @@ -445,6 +460,11 @@ export interface TreeEmits { * @param {TreeNode} node - Node instance. */ 'node-collapse'(node: TreeNode): void; + /** + * Callback to invoke on filter input. + * @param {TreeFilterEvent} event - Custom filter event. + */ + 'filter'(event: TreeFilterEvent): void; } /** diff --git a/components/lib/tree/Tree.spec.js b/components/lib/tree/Tree.spec.js index dbeeec934..cb43cf553 100644 --- a/components/lib/tree/Tree.spec.js +++ b/components/lib/tree/Tree.spec.js @@ -1,6 +1,4 @@ import { mount } from '@vue/test-utils'; -import PrimeVue from 'primevue/config'; -import { nextTick } from 'vue'; import Tree from './Tree.vue'; describe('Tree.vue', () => { @@ -42,4 +40,18 @@ describe('Tree.vue', () => { expect(wrapper.emitted('keydown')).toBeFalsy(); }); + + it('emits update:filterValue on filter input', async () => { + wrapper = mount(Tree, { + props: { + filter: true, + }, + }); + + let searchField = wrapper.find('input.p-tree-filter'); + + await searchField.trigger('keydown.space'); + + expect(wrapper.emitted('filter')).toBeTruthy(); + }) }); diff --git a/components/lib/tree/Tree.vue b/components/lib/tree/Tree.vue index 4d061c7b7..78ea7445f 100755 --- a/components/lib/tree/Tree.vue +++ b/components/lib/tree/Tree.vue @@ -47,7 +47,7 @@ import TreeNode from './TreeNode.vue'; export default { name: 'Tree', extends: BaseTree, - emits: ['node-expand', 'node-collapse', 'update:expandedKeys', 'update:selectionKeys', 'node-select', 'node-unselect'], + emits: ['node-expand', 'node-collapse', 'update:expandedKeys', 'update:selectionKeys', 'node-select', 'node-unselect', 'filter'], data() { return { d_expandedKeys: this.expandedKeys || {}, @@ -166,6 +166,8 @@ export default { if (event.code === 'Enter') { event.preventDefault(); } + + this.$emit('filter', { originalEvent: event, value: event.target.value }); }, findFilteredNodes(node, paramsWithoutNode) { if (node) { From f299fdaf01900b6e476b45a17745faf998dcaf70 Mon Sep 17 00:00:00 2001 From: wiebken-n <126778886+wiebken-n@users.noreply.github.com> Date: Sun, 26 Nov 2023 20:04:48 +0100 Subject: [PATCH 03/69] Fixed typo on doc for using images for custom icons (#4879) Corrected "any time of image" to "any type of image" --- doc/customicons/ImageDoc.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/customicons/ImageDoc.vue b/doc/customicons/ImageDoc.vue index a6dae3e0c..388f21f8e 100644 --- a/doc/customicons/ImageDoc.vue +++ b/doc/customicons/ImageDoc.vue @@ -1,6 +1,6 @@ From 21a88a3d32e8514b7e74371255e1f81a63199b40 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 Nov 2023 09:46:31 +0300 Subject: [PATCH 04/69] Update FilterSortEditDoc.vue --- doc/datatable/edit/FilterSortEditDoc.vue | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/doc/datatable/edit/FilterSortEditDoc.vue b/doc/datatable/edit/FilterSortEditDoc.vue index c098779b8..3297687ba 100644 --- a/doc/datatable/edit/FilterSortEditDoc.vue +++ b/doc/datatable/edit/FilterSortEditDoc.vue @@ -141,6 +141,20 @@ export default { event.preventDefault(); break; } + }, + isPositiveInteger(val) { + let str = String(val); + + str = str.trim(); + + if (!str) { + return false; + } + + str = str.replace(/^0+/, '') || '0'; + var n = Math.floor(Number(str)); + + return n !== Infinity && String(n) === str && n >= 0; } } }; @@ -215,6 +229,21 @@ const onCellEditComplete = (event) => { } }; +const isPositiveInteger = (val) => { + let str = String(val); + + str = str.trim(); + + if (!str) { + return false; + } + + str = str.replace(/^0+/, '') || '0'; + var n = Math.floor(Number(str)); + + return n !== Infinity && String(n) === str && n >= 0; +}; + <\/script> `, data: ` @@ -261,6 +290,20 @@ const onCellEditComplete = (event) => { else event.preventDefault(); break; } + }, + isPositiveInteger(val) { + let str = String(val); + + str = str.trim(); + + if (!str) { + return false; + } + + str = str.replace(/^0+/, '') || '0'; + var n = Math.floor(Number(str)); + + return n !== Infinity && String(n) === str && n >= 0; } } }; From 5cb90afcdbf629450ee5720d4e3faa71af58ea2c Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 Nov 2023 13:58:45 +0300 Subject: [PATCH 05/69] Fixed #4880 - Improve InlineMessage Implementation for Accessibility --- components/lib/inlinemessage/InlineMessage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/inlinemessage/InlineMessage.vue b/components/lib/inlinemessage/InlineMessage.vue index feeb4b3ca..14350d90a 100755 --- a/components/lib/inlinemessage/InlineMessage.vue +++ b/components/lib/inlinemessage/InlineMessage.vue @@ -1,5 +1,5 @@ diff --git a/doc/message/AccessibilityDoc.vue b/doc/message/AccessibilityDoc.vue index 21882ba72..6dfb74fc7 100644 --- a/doc/message/AccessibilityDoc.vue +++ b/doc/message/AccessibilityDoc.vue @@ -2,7 +2,7 @@

Screen Reader

- Message components use alert role that implicitly defines aria-live as "assertive" and aria-atomic as "true". Since any attribute is passed to the root element, attributes like aria-labelledby and + Message component uses alert role that implicitly defines aria-live as "assertive" and aria-atomic as "true". Since any attribute is passed to the root element, attributes like aria-labelledby and aria-label can optionally be used as well.

@@ -38,41 +38,3 @@
- - From 46c5857512787f1f8576cbca34ad754911e4848f Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 Nov 2023 14:06:02 +0300 Subject: [PATCH 07/69] Update AccessibilityDoc.vue --- doc/inlinemessage/AccessibilityDoc.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/inlinemessage/AccessibilityDoc.vue b/doc/inlinemessage/AccessibilityDoc.vue index e795b71a0..0e6a9b042 100644 --- a/doc/inlinemessage/AccessibilityDoc.vue +++ b/doc/inlinemessage/AccessibilityDoc.vue @@ -5,5 +5,7 @@ InlineMessage component uses alert role that implicitly defines aria-live as "assertive" and aria-atomic as "true". Since any attribute is passed to the root element, attributes like aria-labelledby and aria-label can optionally be used as well.

+

Keyboard Support

+

Component does not include any interactive elements.

From 89b77cceca4ef5f902145d415fe65a37c93c53bf Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 Nov 2023 15:21:56 +0300 Subject: [PATCH 08/69] Fixed #4662 - DataTable: Type definition doesn't match document --- components/lib/datatable/DataTable.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/datatable/DataTable.d.ts b/components/lib/datatable/DataTable.d.ts index b14382868..6df41b87e 100755 --- a/components/lib/datatable/DataTable.d.ts +++ b/components/lib/datatable/DataTable.d.ts @@ -378,7 +378,7 @@ export interface DataTableRowExpandEvent { /** * Expanded row data */ - data: any[]; + data: any; } /** From 75fb031fb4c38791d864395dc818b6f8e2cebb47 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 27 Nov 2023 12:25:08 +0000 Subject: [PATCH 09/69] Update API doc --- doc/common/apidoc/index.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index e2127ee3f..5c49eb761 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -18113,7 +18113,7 @@ "name": "data", "optional": false, "readonly": false, - "type": "any[]", + "type": "any", "default": "", "description": "Expanded row data" } @@ -18137,7 +18137,7 @@ "name": "data", "optional": false, "readonly": false, - "type": "any[]", + "type": "any", "default": "", "description": "Expanded row data" } From 098c7a5128c534bea627e3c355e966b4588e1dbb Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 Nov 2023 17:56:27 +0300 Subject: [PATCH 10/69] Fixed #4881 - Listbox: select-on-focus causes a crash --- components/lib/listbox/Listbox.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/lib/listbox/Listbox.vue b/components/lib/listbox/Listbox.vue index 4155b716b..6cbc89035 100755 --- a/components/lib/listbox/Listbox.vue +++ b/components/lib/listbox/Listbox.vue @@ -228,6 +228,7 @@ export default { onListFocus(event) { this.focused = true; this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1; + this.autoUpdateModel(); this.$emit('focus', event); }, onListBlur(event) { @@ -327,7 +328,7 @@ export default { let metaSelection = this.optionTouched ? false : this.metaKeySelection; if (metaSelection) { - let metaKey = event.metaKey || event.ctrlKey; + let metaKey = event && (event.metaKey || event.ctrlKey); if (selected) { if (metaKey) { @@ -632,7 +633,7 @@ export default { } }, autoUpdateModel() { - if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption && !this.multiple) { + if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption && !this.multiple && this.focused) { this.focusedOptionIndex = this.findFirstFocusedOptionIndex(); this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex]); } From b2ad40adccd9c0e841db4e7d3d53f2ffb4e03d34 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 28 Nov 2023 11:46:39 +0300 Subject: [PATCH 11/69] Fixed #4886 - Tree / TreeTable: new loadingMode property --- components/lib/tree/BaseTree.vue | 4 ++++ components/lib/tree/Tree.d.ts | 5 +++++ components/lib/tree/Tree.vue | 3 ++- components/lib/tree/TreeNode.vue | 25 +++++++++++++++------- components/lib/tree/style/TreeStyle.js | 1 + components/lib/treetable/BaseTreeTable.vue | 4 ++++ components/lib/treetable/BodyCell.vue | 20 +++++++++++++---- components/lib/treetable/TreeTable.d.ts | 5 +++++ components/lib/treetable/TreeTable.vue | 3 ++- components/lib/treetable/TreeTableRow.vue | 5 +++++ 10 files changed, 61 insertions(+), 14 deletions(-) diff --git a/components/lib/tree/BaseTree.vue b/components/lib/tree/BaseTree.vue index c91824417..1dc3e07c5 100644 --- a/components/lib/tree/BaseTree.vue +++ b/components/lib/tree/BaseTree.vue @@ -34,6 +34,10 @@ export default { type: String, default: undefined }, + loadingMode: { + type: String, + default: 'mask' + }, filter: { type: Boolean, default: false diff --git a/components/lib/tree/Tree.d.ts b/components/lib/tree/Tree.d.ts index a45c13807..4636d3cd3 100755 --- a/components/lib/tree/Tree.d.ts +++ b/components/lib/tree/Tree.d.ts @@ -232,6 +232,11 @@ export interface TreeProps { * @deprecated since v3.27.0. Use 'loadingicon' slot. */ loadingIcon?: string | undefined; + /** + * Loading mode display. + * @defaultValue mask + */ + loadingMode?: 'mask' | 'icon' | undefined; /** * When specified, displays an input field to filter the items. * @defaultValue false diff --git a/components/lib/tree/Tree.vue b/components/lib/tree/Tree.vue index 4d061c7b7..f4da4945b 100755 --- a/components/lib/tree/Tree.vue +++ b/components/lib/tree/Tree.vue @@ -1,6 +1,6 @@