primeng 16.8.0 → 16.9.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 (101) hide show
  1. package/breadcrumb/breadcrumb.interface.d.ts +2 -2
  2. package/dropdown/dropdown.d.ts +2 -1
  3. package/esm2022/autocomplete/autocomplete.mjs +4 -3
  4. package/esm2022/breadcrumb/breadcrumb.interface.mjs +1 -1
  5. package/esm2022/calendar/calendar.mjs +4 -3
  6. package/esm2022/contextmenu/contextmenu.mjs +8 -4
  7. package/esm2022/dropdown/dropdown.mjs +12 -7
  8. package/esm2022/listbox/listbox.interface.mjs +1 -1
  9. package/esm2022/listbox/listbox.mjs +2 -2
  10. package/esm2022/multiselect/multiselect.mjs +22 -5
  11. package/esm2022/orderlist/orderlist.mjs +65 -33
  12. package/esm2022/paginator/paginator.mjs +61 -20
  13. package/esm2022/picklist/picklist.mjs +316 -53
  14. package/esm2022/sidebar/sidebar.mjs +5 -14
  15. package/esm2022/splitter/splitter.mjs +3 -3
  16. package/esm2022/table/table.mjs +10 -8
  17. package/esm2022/tabview/tabview.mjs +68 -23
  18. package/fesm2022/primeng-autocomplete.mjs +3 -2
  19. package/fesm2022/primeng-autocomplete.mjs.map +1 -1
  20. package/fesm2022/primeng-calendar.mjs +3 -2
  21. package/fesm2022/primeng-calendar.mjs.map +1 -1
  22. package/fesm2022/primeng-contextmenu.mjs +7 -3
  23. package/fesm2022/primeng-contextmenu.mjs.map +1 -1
  24. package/fesm2022/primeng-dropdown.mjs +11 -6
  25. package/fesm2022/primeng-dropdown.mjs.map +1 -1
  26. package/fesm2022/primeng-listbox.mjs +1 -1
  27. package/fesm2022/primeng-listbox.mjs.map +1 -1
  28. package/fesm2022/primeng-multiselect.mjs +21 -4
  29. package/fesm2022/primeng-multiselect.mjs.map +1 -1
  30. package/fesm2022/primeng-orderlist.mjs +64 -32
  31. package/fesm2022/primeng-orderlist.mjs.map +1 -1
  32. package/fesm2022/primeng-paginator.mjs +60 -19
  33. package/fesm2022/primeng-paginator.mjs.map +1 -1
  34. package/fesm2022/primeng-picklist.mjs +315 -52
  35. package/fesm2022/primeng-picklist.mjs.map +1 -1
  36. package/fesm2022/primeng-sidebar.mjs +4 -13
  37. package/fesm2022/primeng-sidebar.mjs.map +1 -1
  38. package/fesm2022/primeng-splitter.mjs +2 -2
  39. package/fesm2022/primeng-splitter.mjs.map +1 -1
  40. package/fesm2022/primeng-table.mjs +9 -7
  41. package/fesm2022/primeng-table.mjs.map +1 -1
  42. package/fesm2022/primeng-tabview.mjs +67 -22
  43. package/fesm2022/primeng-tabview.mjs.map +1 -1
  44. package/listbox/listbox.interface.d.ts +1 -1
  45. package/multiselect/multiselect.d.ts +2 -0
  46. package/orderlist/orderlist.d.ts +20 -4
  47. package/package.json +150 -150
  48. package/paginator/paginator.d.ts +4 -2
  49. package/picklist/picklist.d.ts +57 -5
  50. package/resources/components/dropdown/dropdown.css +1 -7
  51. package/resources/components/table/table.css +3 -3
  52. package/resources/themes/arya-blue/theme.css +7 -3
  53. package/resources/themes/arya-green/theme.css +7 -3
  54. package/resources/themes/arya-orange/theme.css +7 -3
  55. package/resources/themes/arya-purple/theme.css +7 -3
  56. package/resources/themes/bootstrap4-dark-blue/theme.css +7 -3
  57. package/resources/themes/bootstrap4-dark-purple/theme.css +7 -3
  58. package/resources/themes/bootstrap4-light-blue/theme.css +7 -3
  59. package/resources/themes/bootstrap4-light-purple/theme.css +7 -3
  60. package/resources/themes/fluent-light/theme.css +7 -3
  61. package/resources/themes/lara-dark-blue/theme.css +7 -3
  62. package/resources/themes/lara-dark-indigo/theme.css +7 -3
  63. package/resources/themes/lara-dark-purple/theme.css +7 -3
  64. package/resources/themes/lara-dark-teal/theme.css +7 -3
  65. package/resources/themes/lara-light-blue/theme.css +7 -3
  66. package/resources/themes/lara-light-indigo/theme.css +7 -3
  67. package/resources/themes/lara-light-purple/theme.css +7 -3
  68. package/resources/themes/lara-light-teal/theme.css +7 -3
  69. package/resources/themes/luna-amber/theme.css +7 -3
  70. package/resources/themes/luna-blue/theme.css +7 -3
  71. package/resources/themes/luna-green/theme.css +7 -3
  72. package/resources/themes/luna-pink/theme.css +7 -3
  73. package/resources/themes/md-dark-deeppurple/theme.css +7 -3
  74. package/resources/themes/md-dark-indigo/theme.css +7 -3
  75. package/resources/themes/md-light-deeppurple/theme.css +7 -3
  76. package/resources/themes/md-light-indigo/theme.css +7 -3
  77. package/resources/themes/mdc-dark-deeppurple/theme.css +7 -3
  78. package/resources/themes/mdc-dark-indigo/theme.css +7 -3
  79. package/resources/themes/mdc-light-deeppurple/theme.css +7 -3
  80. package/resources/themes/mdc-light-indigo/theme.css +7 -3
  81. package/resources/themes/mira/theme.css +7 -3
  82. package/resources/themes/nano/theme.css +7 -3
  83. package/resources/themes/nova/theme.css +7 -3
  84. package/resources/themes/nova-accent/theme.css +7 -3
  85. package/resources/themes/nova-alt/theme.css +7 -3
  86. package/resources/themes/rhea/theme.css +7 -3
  87. package/resources/themes/saga-blue/theme.css +7 -3
  88. package/resources/themes/saga-green/theme.css +7 -3
  89. package/resources/themes/saga-orange/theme.css +7 -3
  90. package/resources/themes/saga-purple/theme.css +7 -3
  91. package/resources/themes/soho-dark/theme.css +7 -3
  92. package/resources/themes/soho-light/theme.css +7 -3
  93. package/resources/themes/tailwind-light/theme.css +7 -3
  94. package/resources/themes/vela-blue/theme.css +7 -3
  95. package/resources/themes/vela-green/theme.css +7 -3
  96. package/resources/themes/vela-orange/theme.css +7 -3
  97. package/resources/themes/vela-purple/theme.css +7 -3
  98. package/resources/themes/viva-dark/theme.css +7 -3
  99. package/resources/themes/viva-light/theme.css +7 -3
  100. package/sidebar/sidebar.d.ts +2 -3
  101. package/tabview/tabview.d.ts +19 -2
@@ -34,6 +34,7 @@ class PickList {
34
34
  el;
35
35
  cd;
36
36
  filterService;
37
+ config;
37
38
  /**
38
39
  * An array of objects for the source list.
39
40
  * @group Props
@@ -53,7 +54,7 @@ class PickList {
53
54
  * Index of the element in tabbing order.
54
55
  * @group Props
55
56
  */
56
- tabindex;
57
+ tabindex = 0;
57
58
  /**
58
59
  * Defines a string that labels the move to right button for accessibility.
59
60
  * @group Props
@@ -295,11 +296,56 @@ class PickList {
295
296
  * @group Emits
296
297
  */
297
298
  onTargetFilter = new EventEmitter();
299
+ /**
300
+ * Callback to invoke when the list is focused
301
+ * @param {Event} event - Browser event.
302
+ * @group Emits
303
+ */
304
+ onFocus = new EventEmitter();
305
+ /**
306
+ * Callback to invoke when the list is blurred
307
+ * @param {Event} event - Browser event.
308
+ * @group Emits
309
+ */
310
+ onBlur = new EventEmitter();
298
311
  listViewSourceChild;
299
312
  listViewTargetChild;
300
313
  sourceFilterViewChild;
301
314
  targetFilterViewChild;
302
315
  templates;
316
+ get moveUpAriaLabel() {
317
+ return this.upButtonAriaLabel ? this.upButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveUp : undefined;
318
+ }
319
+ get moveTopAriaLabel() {
320
+ return this.topButtonAriaLabel ? this.topButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveTop : undefined;
321
+ }
322
+ get moveDownAriaLabel() {
323
+ return this.downButtonAriaLabel ? this.downButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveDown : undefined;
324
+ }
325
+ get moveBottomAriaLabel() {
326
+ return this.bottomButtonAriaLabel ? this.bottomButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveDown : undefined;
327
+ }
328
+ get moveToTargetAriaLabel() {
329
+ return this.rightButtonAriaLabel ? this.rightButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveToTarget : undefined;
330
+ }
331
+ get moveAllToTargetAriaLabel() {
332
+ return this.allRightButtonAriaLabel ? this.allRightButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveAllToTarget : undefined;
333
+ }
334
+ get moveToSourceAriaLabel() {
335
+ return this.allLeftButtonAriaLabel ? this.allLeftButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveToSource : undefined;
336
+ }
337
+ get moveAllToSourceAriaLabel() {
338
+ return this.allLeftButtonAriaLabel ? this.allLeftButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveAllToSource : undefined;
339
+ }
340
+ get idSource() {
341
+ return this.id + '_source';
342
+ }
343
+ get idTarget() {
344
+ return this.id + '_target';
345
+ }
346
+ get focusedOptionId() {
347
+ return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
348
+ }
303
349
  _breakpoint = '960px';
304
350
  itemTemplate;
305
351
  moveTopIconTemplate;
@@ -340,14 +386,21 @@ class PickList {
340
386
  window;
341
387
  media;
342
388
  viewChanged;
389
+ focusedOptionIndex = -1;
390
+ focusedOption;
391
+ focused = {
392
+ sourceList: false,
393
+ targetList: false
394
+ };
343
395
  mediaChangeListener;
344
- constructor(document, platformId, renderer, el, cd, filterService) {
396
+ constructor(document, platformId, renderer, el, cd, filterService, config) {
345
397
  this.document = document;
346
398
  this.platformId = platformId;
347
399
  this.renderer = renderer;
348
400
  this.el = el;
349
401
  this.cd = cd;
350
402
  this.filterService = filterService;
403
+ this.config = config;
351
404
  this.window = this.document.defaultView;
352
405
  }
353
406
  ngOnInit() {
@@ -446,11 +499,13 @@ class PickList {
446
499
  this.reorderedListElement = null;
447
500
  }
448
501
  }
449
- onItemClick(event, item, selectedItems, callback) {
502
+ onItemClick(event, item, selectedItems, callback, itemId) {
450
503
  if (this.disabled) {
451
504
  return;
452
505
  }
453
- let index = this.findIndexInSelection(item, selectedItems);
506
+ let index = this.findIndexInList(item, selectedItems);
507
+ if (itemId)
508
+ this.focusedOptionIndex = itemId;
454
509
  let selected = index != -1;
455
510
  let metaSelection = this.itemTouched ? false : this.metaKeySelection;
456
511
  if (metaSelection) {
@@ -474,6 +529,10 @@ class PickList {
474
529
  callback.emit({ originalEvent: event, items: selectedItems });
475
530
  this.itemTouched = false;
476
531
  }
532
+ onOptionMouseDown(index, listType) {
533
+ this.focused[listType === this.SOURCE_LIST ? 'sourceList' : 'targetList'] = true;
534
+ this.focusedOptionIndex = index;
535
+ }
477
536
  onSourceItemDblClick() {
478
537
  if (this.disabled) {
479
538
  return;
@@ -724,9 +783,16 @@ class PickList {
724
783
  }
725
784
  }
726
785
  isSelected(item, selectedItems) {
727
- return this.findIndexInSelection(item, selectedItems) != -1;
786
+ return this.findIndexInList(item, selectedItems) != -1;
787
+ }
788
+ itemClass(item, id, selectedItems) {
789
+ return {
790
+ 'p-picklist-item': true,
791
+ 'p-highlight': this.isSelected(item, selectedItems),
792
+ 'p-focus': id === this.focusedOptionId
793
+ };
728
794
  }
729
- findIndexInSelection(item, selectedItems) {
795
+ findIndexInList(item, selectedItems) {
730
796
  return ObjectUtils.findIndexInList(item, selectedItems);
731
797
  }
732
798
  onDrop(event, listType) {
@@ -777,6 +843,171 @@ class PickList {
777
843
  }
778
844
  }
779
845
  }
846
+ onListFocus(event, listType) {
847
+ let listElement = this.getListElement(listType);
848
+ const selectedFirstItem = DomHandler.findSingle(listElement, 'li.p-picklist-item.p-highlight') || DomHandler.findSingle(listElement, 'li.p-picklist-item');
849
+ const findIndex = ObjectUtils.findIndexInList(selectedFirstItem, listElement.children);
850
+ this.focused[listType === this.SOURCE_LIST ? 'sourceList' : 'targetList'] = true;
851
+ const index = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : selectedFirstItem ? findIndex : -1;
852
+ this.changeFocusedOptionIndex(index, listType);
853
+ this.onFocus.emit(event);
854
+ }
855
+ onListBlur(event, listType) {
856
+ this.focused[listType === this.SOURCE_LIST ? 'sourceList' : 'targetList'] = false;
857
+ this.focusedOptionIndex = -1;
858
+ this.focusedOption = null;
859
+ this.onBlur.emit(event);
860
+ }
861
+ getListElement(listType) {
862
+ return listType === this.SOURCE_LIST ? this.listViewSourceChild?.nativeElement : this.listViewTargetChild?.nativeElement;
863
+ }
864
+ getListItems(listType) {
865
+ let listElemet = this.getListElement(listType);
866
+ return DomHandler.find(listElemet, 'li.p-picklist-item');
867
+ }
868
+ getLatestSelectedVisibleOptionIndex(visibleList, selectedItems) {
869
+ const latestSelectedItem = [...selectedItems].reverse().find((item) => visibleList.includes(item));
870
+ return latestSelectedItem !== undefined ? visibleList.indexOf(latestSelectedItem) : -1;
871
+ }
872
+ getVisibleList(listType) {
873
+ if (listType === this.SOURCE_LIST) {
874
+ return this.visibleOptionsSource && this.visibleOptionsSource.length > 0 ? this.visibleOptionsSource : this.source && this.source.length > 0 ? this.source : null;
875
+ }
876
+ return this.visibleOptionsTarget && this.visibleOptionsTarget.length > 0 ? this.visibleOptionsTarget : this.target && this.target.length > 0 ? this.target : null;
877
+ }
878
+ setSelectionList(listType, selectedItems) {
879
+ if (listType === this.SOURCE_LIST) {
880
+ this.selectedItemsSource = selectedItems;
881
+ }
882
+ else {
883
+ this.selectedItemsTarget = selectedItems;
884
+ }
885
+ }
886
+ findNextOptionIndex(index, listType) {
887
+ const items = this.getListItems(listType);
888
+ const matchedOptionIndex = [...items].findIndex((link) => link.id === index);
889
+ return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
890
+ }
891
+ findPrevOptionIndex(index, listType) {
892
+ const items = this.getListItems(listType);
893
+ const matchedOptionIndex = [...items].findIndex((link) => link.id === index);
894
+ return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
895
+ }
896
+ onItemKeyDown(event, selectedItems, callback, listType) {
897
+ switch (event.code) {
898
+ case 'ArrowDown':
899
+ this.onArrowDownKey(event, selectedItems, callback, listType);
900
+ break;
901
+ case 'ArrowUp':
902
+ this.onArrowUpKey(event, selectedItems, callback, listType);
903
+ break;
904
+ case 'Home':
905
+ this.onHomeKey(event, selectedItems, callback, listType);
906
+ break;
907
+ case 'End':
908
+ this.onEndKey(event, selectedItems, callback, listType);
909
+ break;
910
+ case 'Enter':
911
+ this.onEnterKey(event, selectedItems, callback);
912
+ break;
913
+ case 'Space':
914
+ this.onSpaceKey(event, selectedItems, callback, listType);
915
+ break;
916
+ case 'KeyA':
917
+ if (event.ctrlKey) {
918
+ this.setSelectionList(listType, this.getVisibleList(listType));
919
+ callback.emit({ items: selectedItems });
920
+ event.preventDefault();
921
+ }
922
+ default:
923
+ break;
924
+ }
925
+ }
926
+ getFocusedOption(index, listType) {
927
+ if (index === -1)
928
+ return null;
929
+ if (listType === this.SOURCE_LIST) {
930
+ return this.visibleOptionsSource && this.visibleOptionsSource.length ? this.visibleOptionsSource[index] : this.source && this.source.length ? this.source[index] : null;
931
+ }
932
+ return this.visibleOptionsTarget && this.visibleOptionsTarget.length ? this.visibleOptionsTarget[index] : this.target && this.target.length ? this.target[index] : null;
933
+ }
934
+ changeFocusedOptionIndex(index, listType) {
935
+ const items = this.getListItems(listType);
936
+ let order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;
937
+ this.focusedOptionIndex = items[order].getAttribute('id');
938
+ this.focusedOption = this.getFocusedOption(order, listType);
939
+ this.scrollInView(items[order].getAttribute('id'), listType);
940
+ }
941
+ scrollInView(id, listType) {
942
+ const element = DomHandler.findSingle(this.getListElement(listType), `li[id="${id}"]`);
943
+ if (element) {
944
+ element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
945
+ }
946
+ }
947
+ onArrowDownKey(event, selectedItems, callback, listType) {
948
+ const optionIndex = this.findNextOptionIndex(this.focusedOptionIndex, listType);
949
+ this.changeFocusedOptionIndex(optionIndex, listType);
950
+ if (event.shiftKey) {
951
+ this.onEnterKey(event, selectedItems, callback);
952
+ }
953
+ event.preventDefault();
954
+ }
955
+ onArrowUpKey(event, selectedItems, callback, listType) {
956
+ const optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex, listType);
957
+ this.changeFocusedOptionIndex(optionIndex, listType);
958
+ if (event.shiftKey) {
959
+ this.onEnterKey(event, selectedItems, callback);
960
+ }
961
+ event.preventDefault();
962
+ }
963
+ onEnterKey(event, selectedItems, callback) {
964
+ this.onItemClick(event, this.focusedOption, selectedItems, callback);
965
+ event.preventDefault();
966
+ }
967
+ onSpaceKey(event, selectedItems, callback, listType) {
968
+ event.preventDefault();
969
+ if (event.shiftKey && selectedItems && selectedItems.length > 0) {
970
+ let visibleList = this.getVisibleList(listType);
971
+ let lastSelectedIndex = this.getLatestSelectedVisibleOptionIndex(visibleList, selectedItems);
972
+ if (lastSelectedIndex !== -1) {
973
+ let focusedIndex = ObjectUtils.findIndexInList(this.focusedOption, visibleList);
974
+ selectedItems = [...visibleList.slice(Math.min(lastSelectedIndex, focusedIndex), Math.max(lastSelectedIndex, focusedIndex) + 1)];
975
+ this.setSelectionList(listType, selectedItems);
976
+ callback.emit({ items: selectedItems });
977
+ return;
978
+ }
979
+ }
980
+ this.onEnterKey(event, selectedItems, callback);
981
+ }
982
+ onHomeKey(event, selectedItems, callback, listType) {
983
+ if (event.ctrlKey && event.shiftKey) {
984
+ let visibleList = this.getVisibleList(listType);
985
+ let focusedIndex = ObjectUtils.findIndexInList(this.focusedOption, visibleList);
986
+ selectedItems = [...visibleList.slice(0, focusedIndex + 1)];
987
+ this.setSelectionList(listType, selectedItems);
988
+ callback.emit({ items: selectedItems });
989
+ }
990
+ else {
991
+ this.changeFocusedOptionIndex(0, listType);
992
+ }
993
+ event.preventDefault();
994
+ }
995
+ onEndKey(event, selectedItems, callback, listType) {
996
+ let visibleList = this.getVisibleList(listType);
997
+ let lastIndex = visibleList && visibleList.length > 0 ? visibleList.length - 1 : null;
998
+ if (lastIndex === null)
999
+ return;
1000
+ if (event.ctrlKey && event.shiftKey) {
1001
+ let focusedIndex = ObjectUtils.findIndexInList(this.focusedOption, visibleList);
1002
+ selectedItems = [...visibleList.slice(focusedIndex, lastIndex)];
1003
+ this.setSelectionList(listType, selectedItems);
1004
+ callback.emit({ items: selectedItems });
1005
+ }
1006
+ else {
1007
+ this.changeFocusedOptionIndex(lastIndex, listType);
1008
+ }
1009
+ event.preventDefault();
1010
+ }
780
1011
  getDropIndexes(fromIndex, toIndex, droppedList, isTransfer, data) {
781
1012
  let previousIndex, currentIndex;
782
1013
  if (droppedList === this.SOURCE_LIST) {
@@ -888,17 +1119,17 @@ class PickList {
888
1119
  .p-picklist[${this.id}] {
889
1120
  flex-direction: column;
890
1121
  }
891
-
1122
+
892
1123
  .p-picklist[${this.id}] .p-picklist-buttons {
893
1124
  padding: var(--content-padding);
894
1125
  flex-direction: row;
895
1126
  }
896
-
1127
+
897
1128
  .p-picklist[${this.id}] .p-picklist-buttons .p-button {
898
1129
  margin-right: var(--inline-spacing);
899
1130
  margin-bottom: 0;
900
1131
  }
901
-
1132
+
902
1133
  .p-picklist[${this.id}] .p-picklist-buttons .p-button:last-child {
903
1134
  margin-right: 0;
904
1135
  }
@@ -940,13 +1171,13 @@ class PickList {
940
1171
  this.destroyStyle();
941
1172
  this.destroyMedia();
942
1173
  }
943
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: PickList, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FilterService }], target: i0.ɵɵFactoryTarget.Component });
944
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: PickList, selector: "p-pickList", inputs: { source: "source", target: "target", sourceHeader: "sourceHeader", tabindex: "tabindex", rightButtonAriaLabel: "rightButtonAriaLabel", leftButtonAriaLabel: "leftButtonAriaLabel", allRightButtonAriaLabel: "allRightButtonAriaLabel", allLeftButtonAriaLabel: "allLeftButtonAriaLabel", upButtonAriaLabel: "upButtonAriaLabel", downButtonAriaLabel: "downButtonAriaLabel", topButtonAriaLabel: "topButtonAriaLabel", bottomButtonAriaLabel: "bottomButtonAriaLabel", targetHeader: "targetHeader", responsive: "responsive", filterBy: "filterBy", filterLocale: "filterLocale", trackBy: "trackBy", sourceTrackBy: "sourceTrackBy", targetTrackBy: "targetTrackBy", showSourceFilter: "showSourceFilter", showTargetFilter: "showTargetFilter", metaKeySelection: "metaKeySelection", dragdrop: "dragdrop", style: "style", styleClass: "styleClass", sourceStyle: "sourceStyle", targetStyle: "targetStyle", showSourceControls: "showSourceControls", showTargetControls: "showTargetControls", sourceFilterPlaceholder: "sourceFilterPlaceholder", targetFilterPlaceholder: "targetFilterPlaceholder", disabled: "disabled", ariaSourceFilterLabel: "ariaSourceFilterLabel", ariaTargetFilterLabel: "ariaTargetFilterLabel", filterMatchMode: "filterMatchMode", stripedRows: "stripedRows", keepSelection: "keepSelection", breakpoint: "breakpoint" }, outputs: { onMoveToSource: "onMoveToSource", onMoveAllToSource: "onMoveAllToSource", onMoveAllToTarget: "onMoveAllToTarget", onMoveToTarget: "onMoveToTarget", onSourceReorder: "onSourceReorder", onTargetReorder: "onTargetReorder", onSourceSelect: "onSourceSelect", onTargetSelect: "onTargetSelect", onSourceFilter: "onSourceFilter", onTargetFilter: "onTargetFilter" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "listViewSourceChild", first: true, predicate: ["sourcelist"], descendants: true }, { propertyName: "listViewTargetChild", first: true, predicate: ["targetlist"], descendants: true }, { propertyName: "sourceFilterViewChild", first: true, predicate: ["sourceFilter"], descendants: true }, { propertyName: "targetFilterViewChild", first: true, predicate: ["targetFilter"], descendants: true }], ngImport: i0, template: `
1174
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: PickList, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FilterService }, { token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
1175
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: PickList, selector: "p-pickList", inputs: { source: "source", target: "target", sourceHeader: "sourceHeader", tabindex: "tabindex", rightButtonAriaLabel: "rightButtonAriaLabel", leftButtonAriaLabel: "leftButtonAriaLabel", allRightButtonAriaLabel: "allRightButtonAriaLabel", allLeftButtonAriaLabel: "allLeftButtonAriaLabel", upButtonAriaLabel: "upButtonAriaLabel", downButtonAriaLabel: "downButtonAriaLabel", topButtonAriaLabel: "topButtonAriaLabel", bottomButtonAriaLabel: "bottomButtonAriaLabel", targetHeader: "targetHeader", responsive: "responsive", filterBy: "filterBy", filterLocale: "filterLocale", trackBy: "trackBy", sourceTrackBy: "sourceTrackBy", targetTrackBy: "targetTrackBy", showSourceFilter: "showSourceFilter", showTargetFilter: "showTargetFilter", metaKeySelection: "metaKeySelection", dragdrop: "dragdrop", style: "style", styleClass: "styleClass", sourceStyle: "sourceStyle", targetStyle: "targetStyle", showSourceControls: "showSourceControls", showTargetControls: "showTargetControls", sourceFilterPlaceholder: "sourceFilterPlaceholder", targetFilterPlaceholder: "targetFilterPlaceholder", disabled: "disabled", ariaSourceFilterLabel: "ariaSourceFilterLabel", ariaTargetFilterLabel: "ariaTargetFilterLabel", filterMatchMode: "filterMatchMode", stripedRows: "stripedRows", keepSelection: "keepSelection", breakpoint: "breakpoint" }, outputs: { onMoveToSource: "onMoveToSource", onMoveAllToSource: "onMoveAllToSource", onMoveAllToTarget: "onMoveAllToTarget", onMoveToTarget: "onMoveToTarget", onSourceReorder: "onSourceReorder", onTargetReorder: "onTargetReorder", onSourceSelect: "onSourceSelect", onTargetSelect: "onTargetSelect", onSourceFilter: "onSourceFilter", onTargetFilter: "onTargetFilter", onFocus: "onFocus", onBlur: "onBlur" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "listViewSourceChild", first: true, predicate: ["sourcelist"], descendants: true }, { propertyName: "listViewTargetChild", first: true, predicate: ["targetlist"], descendants: true }, { propertyName: "sourceFilterViewChild", first: true, predicate: ["sourceFilter"], descendants: true }, { propertyName: "targetFilterViewChild", first: true, predicate: ["targetFilter"], descendants: true }], ngImport: i0, template: `
945
1176
  <div [class]="styleClass" [ngStyle]="style" [ngClass]="{ 'p-picklist p-component': true, 'p-picklist-striped': stripedRows }" cdkDropListGroup [attr.data-pc-name]="'picklist'" [attr.data-pc-section]="'root'">
946
1177
  <div class="p-picklist-buttons p-picklist-source-controls" *ngIf="showSourceControls" [attr.data-pc-section]="'sourceControls'" [attr.data-pc-group-section]="'controls'">
947
1178
  <button
948
1179
  type="button"
949
- [attr.aria-label]="upButtonAriaLabel"
1180
+ [attr.aria-label]="moveUpAriaLabel"
950
1181
  pButton
951
1182
  pRipple
952
1183
  class="p-button-icon-only"
@@ -959,7 +1190,7 @@ class PickList {
959
1190
  </button>
960
1191
  <button
961
1192
  type="button"
962
- [attr.aria-label]="topButtonAriaLabel"
1193
+ [attr.aria-label]="moveTopAriaLabel"
963
1194
  pButton
964
1195
  pRipple
965
1196
  class="p-button-icon-only"
@@ -972,7 +1203,7 @@ class PickList {
972
1203
  </button>
973
1204
  <button
974
1205
  type="button"
975
- [attr.aria-label]="downButtonAriaLabel"
1206
+ [attr.aria-label]="moveDownAriaLabel"
976
1207
  pButton
977
1208
  pRipple
978
1209
  class="p-button-icon-only"
@@ -985,7 +1216,7 @@ class PickList {
985
1216
  </button>
986
1217
  <button
987
1218
  type="button"
988
- [attr.aria-label]="bottomButtonAriaLabel"
1219
+ [attr.aria-label]="moveBottomAriaLabel"
989
1220
  pButton
990
1221
  pRipple
991
1222
  class="p-button-icon-only"
@@ -1030,12 +1261,18 @@ class PickList {
1030
1261
  <ul
1031
1262
  #sourcelist
1032
1263
  class="p-picklist-list p-picklist-source"
1264
+ [id]="idSource + '_list'"
1265
+ (keydown)="onItemKeyDown($event, selectedItemsSource, onSourceSelect, SOURCE_LIST)"
1266
+ (focus)="onListFocus($event, SOURCE_LIST)"
1267
+ (blur)="onListBlur($event, SOURCE_LIST)"
1033
1268
  cdkDropList
1034
1269
  [cdkDropListData]="source"
1035
1270
  (cdkDropListDropped)="onDrop($event, SOURCE_LIST)"
1036
1271
  [ngStyle]="sourceStyle"
1037
1272
  role="listbox"
1038
- aria-multiselectable="multiple"
1273
+ aria-multiselectable="true"
1274
+ [attr.aria-activedescendant]="focused['sourceList'] ? focusedOptionId : undefined"
1275
+ [attr.tabindex]="source && source.length > 0 ? tabindex : -1"
1039
1276
  [attr.data-pc-section]="'sourceList'"
1040
1277
  [attr.data-pc-group-section]="'list'"
1041
1278
  >
@@ -1044,16 +1281,17 @@ class PickList {
1044
1281
  [ngClass]="{ 'p-picklist-item': true, 'p-highlight': isSelected(item, selectedItemsSource), 'p-disabled': disabled }"
1045
1282
  pRipple
1046
1283
  cdkDrag
1284
+ [id]="idSource + '_' + i"
1285
+ [ngClass]="itemClass(item, idSource + '_' + i, selectedItemsSource)"
1047
1286
  [cdkDragData]="item"
1048
1287
  [cdkDragDisabled]="!dragdrop"
1049
- (click)="onItemClick($event, item, selectedItemsSource, onSourceSelect)"
1288
+ (click)="onItemClick($event, item, selectedItemsSource, onSourceSelect, idSource + '_' + i)"
1289
+ (mousedown)="onOptionMouseDown(i, SOURCE_LIST)"
1050
1290
  (dblclick)="onSourceItemDblClick()"
1051
1291
  (touchend)="onItemTouchEnd()"
1052
- (keydown)="onItemKeydown($event, item, selectedItemsSource, onSourceSelect)"
1053
1292
  *ngIf="isItemVisible(item, SOURCE_LIST)"
1054
1293
  role="option"
1055
1294
  [attr.data-pc-section]="'item'"
1056
- tabindex="0"
1057
1295
  [attr.aria-selected]="isSelected(item, selectedItemsSource)"
1058
1296
  >
1059
1297
  <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item, index: i }"></ng-container>
@@ -1070,28 +1308,28 @@ class PickList {
1070
1308
  </ul>
1071
1309
  </div>
1072
1310
  <div class="p-picklist-buttons p-picklist-transfer-buttons" [attr.data-pc-section]="'buttons'" [attr.data-pc-group-section]="'controls'">
1073
- <button type="button" [attr.aria-label]="rightButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveRightDisabled()" (click)="moveRight()" [attr.data-pc-section]="'moveToTargetButton'">
1311
+ <button type="button" [attr.aria-label]="moveToTargetAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveRightDisabled()" (click)="moveRight()" [attr.data-pc-section]="'moveToTargetButton'">
1074
1312
  <ng-container *ngIf="!moveToTargetIconTemplate">
1075
1313
  <AngleRightIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movetotargeticon'" />
1076
1314
  <AngleDownIcon *ngIf="viewChanged" [attr.data-pc-section]="'movetotargeticon'" />
1077
1315
  </ng-container>
1078
1316
  <ng-template *ngTemplateOutlet="moveToTargetIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1079
1317
  </button>
1080
- <button type="button" [attr.aria-label]="allRightButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllRightDisabled()" (click)="moveAllRight()" [attr.data-pc-section]="'moveAllToTargetButton'">
1318
+ <button type="button" [attr.aria-label]="moveAllToTargetAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllRightDisabled()" (click)="moveAllRight()" [attr.data-pc-section]="'moveAllToTargetButton'">
1081
1319
  <ng-container *ngIf="!moveAllToTargetIconTemplate">
1082
1320
  <AngleDoubleRightIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movealltotargeticon'" />
1083
1321
  <AngleDoubleDownIcon *ngIf="viewChanged" [attr.data-pc-section]="'movealltotargeticon'" />
1084
1322
  </ng-container>
1085
1323
  <ng-template *ngTemplateOutlet="moveAllToTargetIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1086
1324
  </button>
1087
- <button type="button" [attr.aria-label]="leftButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveLeftDisabled()" (click)="moveLeft()" [attr.data-pc-section]="'moveToSourceButton'">
1325
+ <button type="button" [attr.aria-label]="moveToSourceAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveLeftDisabled()" (click)="moveLeft()" [attr.data-pc-section]="'moveToSourceButton'">
1088
1326
  <ng-container *ngIf="!moveToSourceIconTemplate">
1089
1327
  <AngleLeftIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movedownsourceticon'" />
1090
1328
  <AngleUpIcon *ngIf="viewChanged" [attr.data-pc-section]="'movedownsourceticon'" />
1091
1329
  </ng-container>
1092
1330
  <ng-template *ngTemplateOutlet="moveToSourceIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1093
1331
  </button>
1094
- <button type="button" [attr.aria-label]="allLeftButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllLeftDisabled()" (click)="moveAllLeft()" [attr.data-pc-section]="'moveAllToSourceButton'">
1332
+ <button type="button" [attr.aria-label]="moveAllToSourceAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllLeftDisabled()" (click)="moveAllLeft()" [attr.data-pc-section]="'moveAllToSourceButton'">
1095
1333
  <ng-container *ngIf="!moveAllToSourceIconTemplate">
1096
1334
  <AngleDoubleLeftIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movealltosourceticon'" />
1097
1335
  <AngleDoubleUpIcon *ngIf="viewChanged" [attr.data-pc-section]="'movealltosourceticon'" />
@@ -1131,12 +1369,18 @@ class PickList {
1131
1369
  <ul
1132
1370
  #targetlist
1133
1371
  class="p-picklist-list p-picklist-target"
1372
+ [id]="idTarget + '_list'"
1373
+ (keydown)="onItemKeyDown($event, selectedItemsTarget, onTargetSelect, TARGET_LIST)"
1374
+ (focus)="onListFocus($event, TARGET_LIST)"
1375
+ (blur)="onListBlur($event, TARGET_LIST)"
1134
1376
  cdkDropList
1135
1377
  [cdkDropListData]="target"
1136
1378
  (cdkDropListDropped)="onDrop($event, TARGET_LIST)"
1137
1379
  [ngStyle]="targetStyle"
1138
1380
  role="listbox"
1139
- aria-multiselectable="multiple"
1381
+ aria-multiselectable="true"
1382
+ [attr.aria-activedescendant]="focused['targetList'] ? focusedOptionId : undefined"
1383
+ [attr.tabindex]="target && target.length > 0 ? tabindex : -1"
1140
1384
  [attr.data-pc-section]="'targetList'"
1141
1385
  [attr.data-pc-group-section]="'list'"
1142
1386
  >
@@ -1145,15 +1389,16 @@ class PickList {
1145
1389
  [ngClass]="{ 'p-picklist-item': true, 'p-highlight': isSelected(item, selectedItemsTarget), 'p-disabled': disabled }"
1146
1390
  pRipple
1147
1391
  cdkDrag
1392
+ [id]="idTarget + '_' + i"
1393
+ [ngClass]="itemClass(item, idTarget + '_' + i, selectedItemsTarget)"
1148
1394
  [cdkDragData]="item"
1149
1395
  [cdkDragDisabled]="!dragdrop"
1150
- (click)="onItemClick($event, item, selectedItemsTarget, onTargetSelect)"
1396
+ (click)="onItemClick($event, item, selectedItemsTarget, onTargetSelect, idTarget + '_' + i)"
1397
+ (mousedown)="onOptionMouseDown(i, TARGET_LIST)"
1151
1398
  (dblclick)="onTargetItemDblClick()"
1152
1399
  (touchend)="onItemTouchEnd()"
1153
- (keydown)="onItemKeydown($event, item, selectedItemsTarget, onTargetSelect)"
1154
1400
  *ngIf="isItemVisible(item, TARGET_LIST)"
1155
1401
  role="option"
1156
- tabindex="0"
1157
1402
  [attr.data-pc-section]="'item'"
1158
1403
  [attr.aria-selected]="isSelected(item, selectedItemsTarget)"
1159
1404
  >
@@ -1173,7 +1418,7 @@ class PickList {
1173
1418
  <div class="p-picklist-buttons p-picklist-target-controls" *ngIf="showTargetControls" [attr.data-pc-section]="'targetControls'" [attr.data-pc-group-section]="'controls'">
1174
1419
  <button
1175
1420
  type="button"
1176
- [attr.aria-label]="upButtonAriaLabel"
1421
+ [attr.aria-label]="moveUpAriaLabel"
1177
1422
  pButton
1178
1423
  pRipple
1179
1424
  class="p-button-icon-only"
@@ -1186,7 +1431,7 @@ class PickList {
1186
1431
  </button>
1187
1432
  <button
1188
1433
  type="button"
1189
- [attr.aria-label]="topButtonAriaLabel"
1434
+ [attr.aria-label]="moveTopAriaLabel"
1190
1435
  pButton
1191
1436
  pRipple
1192
1437
  class="p-button-icon-only"
@@ -1199,7 +1444,7 @@ class PickList {
1199
1444
  </button>
1200
1445
  <button
1201
1446
  type="button"
1202
- [attr.aria-label]="downButtonAriaLabel"
1447
+ [attr.aria-label]="moveDownAriaLabel"
1203
1448
  pButton
1204
1449
  pRipple
1205
1450
  class="p-button-icon-only"
@@ -1212,7 +1457,7 @@ class PickList {
1212
1457
  </button>
1213
1458
  <button
1214
1459
  type="button"
1215
- [attr.aria-label]="bottomButtonAriaLabel"
1460
+ [attr.aria-label]="moveBottomAriaLabel"
1216
1461
  pButton
1217
1462
  pRipple
1218
1463
  class="p-button-icon-only"
@@ -1234,7 +1479,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1234
1479
  <div class="p-picklist-buttons p-picklist-source-controls" *ngIf="showSourceControls" [attr.data-pc-section]="'sourceControls'" [attr.data-pc-group-section]="'controls'">
1235
1480
  <button
1236
1481
  type="button"
1237
- [attr.aria-label]="upButtonAriaLabel"
1482
+ [attr.aria-label]="moveUpAriaLabel"
1238
1483
  pButton
1239
1484
  pRipple
1240
1485
  class="p-button-icon-only"
@@ -1247,7 +1492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1247
1492
  </button>
1248
1493
  <button
1249
1494
  type="button"
1250
- [attr.aria-label]="topButtonAriaLabel"
1495
+ [attr.aria-label]="moveTopAriaLabel"
1251
1496
  pButton
1252
1497
  pRipple
1253
1498
  class="p-button-icon-only"
@@ -1260,7 +1505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1260
1505
  </button>
1261
1506
  <button
1262
1507
  type="button"
1263
- [attr.aria-label]="downButtonAriaLabel"
1508
+ [attr.aria-label]="moveDownAriaLabel"
1264
1509
  pButton
1265
1510
  pRipple
1266
1511
  class="p-button-icon-only"
@@ -1273,7 +1518,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1273
1518
  </button>
1274
1519
  <button
1275
1520
  type="button"
1276
- [attr.aria-label]="bottomButtonAriaLabel"
1521
+ [attr.aria-label]="moveBottomAriaLabel"
1277
1522
  pButton
1278
1523
  pRipple
1279
1524
  class="p-button-icon-only"
@@ -1318,12 +1563,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1318
1563
  <ul
1319
1564
  #sourcelist
1320
1565
  class="p-picklist-list p-picklist-source"
1566
+ [id]="idSource + '_list'"
1567
+ (keydown)="onItemKeyDown($event, selectedItemsSource, onSourceSelect, SOURCE_LIST)"
1568
+ (focus)="onListFocus($event, SOURCE_LIST)"
1569
+ (blur)="onListBlur($event, SOURCE_LIST)"
1321
1570
  cdkDropList
1322
1571
  [cdkDropListData]="source"
1323
1572
  (cdkDropListDropped)="onDrop($event, SOURCE_LIST)"
1324
1573
  [ngStyle]="sourceStyle"
1325
1574
  role="listbox"
1326
- aria-multiselectable="multiple"
1575
+ aria-multiselectable="true"
1576
+ [attr.aria-activedescendant]="focused['sourceList'] ? focusedOptionId : undefined"
1577
+ [attr.tabindex]="source && source.length > 0 ? tabindex : -1"
1327
1578
  [attr.data-pc-section]="'sourceList'"
1328
1579
  [attr.data-pc-group-section]="'list'"
1329
1580
  >
@@ -1332,16 +1583,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1332
1583
  [ngClass]="{ 'p-picklist-item': true, 'p-highlight': isSelected(item, selectedItemsSource), 'p-disabled': disabled }"
1333
1584
  pRipple
1334
1585
  cdkDrag
1586
+ [id]="idSource + '_' + i"
1587
+ [ngClass]="itemClass(item, idSource + '_' + i, selectedItemsSource)"
1335
1588
  [cdkDragData]="item"
1336
1589
  [cdkDragDisabled]="!dragdrop"
1337
- (click)="onItemClick($event, item, selectedItemsSource, onSourceSelect)"
1590
+ (click)="onItemClick($event, item, selectedItemsSource, onSourceSelect, idSource + '_' + i)"
1591
+ (mousedown)="onOptionMouseDown(i, SOURCE_LIST)"
1338
1592
  (dblclick)="onSourceItemDblClick()"
1339
1593
  (touchend)="onItemTouchEnd()"
1340
- (keydown)="onItemKeydown($event, item, selectedItemsSource, onSourceSelect)"
1341
1594
  *ngIf="isItemVisible(item, SOURCE_LIST)"
1342
1595
  role="option"
1343
1596
  [attr.data-pc-section]="'item'"
1344
- tabindex="0"
1345
1597
  [attr.aria-selected]="isSelected(item, selectedItemsSource)"
1346
1598
  >
1347
1599
  <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item, index: i }"></ng-container>
@@ -1358,28 +1610,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1358
1610
  </ul>
1359
1611
  </div>
1360
1612
  <div class="p-picklist-buttons p-picklist-transfer-buttons" [attr.data-pc-section]="'buttons'" [attr.data-pc-group-section]="'controls'">
1361
- <button type="button" [attr.aria-label]="rightButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveRightDisabled()" (click)="moveRight()" [attr.data-pc-section]="'moveToTargetButton'">
1613
+ <button type="button" [attr.aria-label]="moveToTargetAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveRightDisabled()" (click)="moveRight()" [attr.data-pc-section]="'moveToTargetButton'">
1362
1614
  <ng-container *ngIf="!moveToTargetIconTemplate">
1363
1615
  <AngleRightIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movetotargeticon'" />
1364
1616
  <AngleDownIcon *ngIf="viewChanged" [attr.data-pc-section]="'movetotargeticon'" />
1365
1617
  </ng-container>
1366
1618
  <ng-template *ngTemplateOutlet="moveToTargetIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1367
1619
  </button>
1368
- <button type="button" [attr.aria-label]="allRightButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllRightDisabled()" (click)="moveAllRight()" [attr.data-pc-section]="'moveAllToTargetButton'">
1620
+ <button type="button" [attr.aria-label]="moveAllToTargetAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllRightDisabled()" (click)="moveAllRight()" [attr.data-pc-section]="'moveAllToTargetButton'">
1369
1621
  <ng-container *ngIf="!moveAllToTargetIconTemplate">
1370
1622
  <AngleDoubleRightIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movealltotargeticon'" />
1371
1623
  <AngleDoubleDownIcon *ngIf="viewChanged" [attr.data-pc-section]="'movealltotargeticon'" />
1372
1624
  </ng-container>
1373
1625
  <ng-template *ngTemplateOutlet="moveAllToTargetIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1374
1626
  </button>
1375
- <button type="button" [attr.aria-label]="leftButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveLeftDisabled()" (click)="moveLeft()" [attr.data-pc-section]="'moveToSourceButton'">
1627
+ <button type="button" [attr.aria-label]="moveToSourceAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveLeftDisabled()" (click)="moveLeft()" [attr.data-pc-section]="'moveToSourceButton'">
1376
1628
  <ng-container *ngIf="!moveToSourceIconTemplate">
1377
1629
  <AngleLeftIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movedownsourceticon'" />
1378
1630
  <AngleUpIcon *ngIf="viewChanged" [attr.data-pc-section]="'movedownsourceticon'" />
1379
1631
  </ng-container>
1380
1632
  <ng-template *ngTemplateOutlet="moveToSourceIconTemplate; context: { $implicit: viewChanged }"></ng-template>
1381
1633
  </button>
1382
- <button type="button" [attr.aria-label]="allLeftButtonAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllLeftDisabled()" (click)="moveAllLeft()" [attr.data-pc-section]="'moveAllToSourceButton'">
1634
+ <button type="button" [attr.aria-label]="moveAllToSourceAriaLabel" pButton pRipple class="p-button-icon-only" [disabled]="moveAllLeftDisabled()" (click)="moveAllLeft()" [attr.data-pc-section]="'moveAllToSourceButton'">
1383
1635
  <ng-container *ngIf="!moveAllToSourceIconTemplate">
1384
1636
  <AngleDoubleLeftIcon *ngIf="!viewChanged" [attr.data-pc-section]="'movealltosourceticon'" />
1385
1637
  <AngleDoubleUpIcon *ngIf="viewChanged" [attr.data-pc-section]="'movealltosourceticon'" />
@@ -1419,12 +1671,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1419
1671
  <ul
1420
1672
  #targetlist
1421
1673
  class="p-picklist-list p-picklist-target"
1674
+ [id]="idTarget + '_list'"
1675
+ (keydown)="onItemKeyDown($event, selectedItemsTarget, onTargetSelect, TARGET_LIST)"
1676
+ (focus)="onListFocus($event, TARGET_LIST)"
1677
+ (blur)="onListBlur($event, TARGET_LIST)"
1422
1678
  cdkDropList
1423
1679
  [cdkDropListData]="target"
1424
1680
  (cdkDropListDropped)="onDrop($event, TARGET_LIST)"
1425
1681
  [ngStyle]="targetStyle"
1426
1682
  role="listbox"
1427
- aria-multiselectable="multiple"
1683
+ aria-multiselectable="true"
1684
+ [attr.aria-activedescendant]="focused['targetList'] ? focusedOptionId : undefined"
1685
+ [attr.tabindex]="target && target.length > 0 ? tabindex : -1"
1428
1686
  [attr.data-pc-section]="'targetList'"
1429
1687
  [attr.data-pc-group-section]="'list'"
1430
1688
  >
@@ -1433,15 +1691,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1433
1691
  [ngClass]="{ 'p-picklist-item': true, 'p-highlight': isSelected(item, selectedItemsTarget), 'p-disabled': disabled }"
1434
1692
  pRipple
1435
1693
  cdkDrag
1694
+ [id]="idTarget + '_' + i"
1695
+ [ngClass]="itemClass(item, idTarget + '_' + i, selectedItemsTarget)"
1436
1696
  [cdkDragData]="item"
1437
1697
  [cdkDragDisabled]="!dragdrop"
1438
- (click)="onItemClick($event, item, selectedItemsTarget, onTargetSelect)"
1698
+ (click)="onItemClick($event, item, selectedItemsTarget, onTargetSelect, idTarget + '_' + i)"
1699
+ (mousedown)="onOptionMouseDown(i, TARGET_LIST)"
1439
1700
  (dblclick)="onTargetItemDblClick()"
1440
1701
  (touchend)="onItemTouchEnd()"
1441
- (keydown)="onItemKeydown($event, item, selectedItemsTarget, onTargetSelect)"
1442
1702
  *ngIf="isItemVisible(item, TARGET_LIST)"
1443
1703
  role="option"
1444
- tabindex="0"
1445
1704
  [attr.data-pc-section]="'item'"
1446
1705
  [attr.aria-selected]="isSelected(item, selectedItemsTarget)"
1447
1706
  >
@@ -1461,7 +1720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1461
1720
  <div class="p-picklist-buttons p-picklist-target-controls" *ngIf="showTargetControls" [attr.data-pc-section]="'targetControls'" [attr.data-pc-group-section]="'controls'">
1462
1721
  <button
1463
1722
  type="button"
1464
- [attr.aria-label]="upButtonAriaLabel"
1723
+ [attr.aria-label]="moveUpAriaLabel"
1465
1724
  pButton
1466
1725
  pRipple
1467
1726
  class="p-button-icon-only"
@@ -1474,7 +1733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1474
1733
  </button>
1475
1734
  <button
1476
1735
  type="button"
1477
- [attr.aria-label]="topButtonAriaLabel"
1736
+ [attr.aria-label]="moveTopAriaLabel"
1478
1737
  pButton
1479
1738
  pRipple
1480
1739
  class="p-button-icon-only"
@@ -1487,7 +1746,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1487
1746
  </button>
1488
1747
  <button
1489
1748
  type="button"
1490
- [attr.aria-label]="downButtonAriaLabel"
1749
+ [attr.aria-label]="moveDownAriaLabel"
1491
1750
  pButton
1492
1751
  pRipple
1493
1752
  class="p-button-icon-only"
@@ -1500,7 +1759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1500
1759
  </button>
1501
1760
  <button
1502
1761
  type="button"
1503
- [attr.aria-label]="bottomButtonAriaLabel"
1762
+ [attr.aria-label]="moveBottomAriaLabel"
1504
1763
  pButton
1505
1764
  pRipple
1506
1765
  class="p-button-icon-only"
@@ -1522,7 +1781,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1522
1781
  }] }, { type: undefined, decorators: [{
1523
1782
  type: Inject,
1524
1783
  args: [PLATFORM_ID]
1525
- }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FilterService }]; }, propDecorators: { source: [{
1784
+ }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FilterService }, { type: i1.PrimeNGConfig }]; }, propDecorators: { source: [{
1526
1785
  type: Input
1527
1786
  }], target: [{
1528
1787
  type: Input
@@ -1618,6 +1877,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
1618
1877
  type: Output
1619
1878
  }], onTargetFilter: [{
1620
1879
  type: Output
1880
+ }], onFocus: [{
1881
+ type: Output
1882
+ }], onBlur: [{
1883
+ type: Output
1621
1884
  }], listViewSourceChild: [{
1622
1885
  type: ViewChild,
1623
1886
  args: ['sourcelist']