@sankhyalabs/ezui 0.0.0-bugfix-dev-kb-74998.4 → 0.0.0-bugfix-dev-KB-75210.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/cjs/{ez-card-item_3.cjs.entry.js → ez-card-item_2.cjs.entry.js} +0 -123
  2. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  4. package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
  5. package/dist/cjs/ez-form-view.cjs.entry.js +8 -2
  6. package/dist/cjs/ez-grid.cjs.entry.js +777 -109
  7. package/dist/cjs/ez-list.cjs.entry.js +253 -205
  8. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-popup.cjs.entry.js +4 -1
  10. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  11. package/dist/cjs/ez-split-panel.cjs.entry.js +54 -2
  12. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  13. package/dist/cjs/ezui.cjs.js +1 -1
  14. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  15. package/dist/cjs/index-a7b0c73d.js +10 -2
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -0
  18. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  19. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  20. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  21. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  22. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +6 -2
  23. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -1
  24. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +4 -0
  25. package/dist/collection/components/ez-grid/ez-grid.css +24 -6
  26. package/dist/collection/components/ez-grid/ez-grid.js +25 -5
  27. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  28. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
  29. package/dist/collection/components/ez-list/ez-list.js +296 -206
  30. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  31. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -2
  32. package/dist/collection/components/ez-popup/ez-popup.css +1 -0
  33. package/dist/collection/components/ez-popup/ez-popup.js +5 -2
  34. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  35. package/dist/collection/components/ez-split-panel/ez-split-panel.js +71 -1
  36. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +13 -2
  37. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +20 -1
  38. package/dist/custom-elements/index.d.ts +6 -0
  39. package/dist/custom-elements/index.js +1481 -338
  40. package/dist/esm/{ez-card-item_3.entry.js → ez-card-item_2.entry.js} +1 -123
  41. package/dist/esm/ez-chart.entry.js +1 -1
  42. package/dist/esm/ez-double-list.entry.js +283 -0
  43. package/dist/esm/ez-filter-input.entry.js +126 -0
  44. package/dist/esm/ez-form-view.entry.js +8 -2
  45. package/dist/esm/ez-grid.entry.js +778 -110
  46. package/dist/esm/ez-list.entry.js +253 -205
  47. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  48. package/dist/esm/ez-popup.entry.js +4 -1
  49. package/dist/esm/ez-split-item.entry.js +3 -2
  50. package/dist/esm/ez-split-panel.entry.js +54 -2
  51. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  52. package/dist/esm/ezui.js +1 -1
  53. package/dist/esm/filter-column.entry.js +2 -2
  54. package/dist/esm/index-baa5e267.js +10 -2
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/ezui/ezui.esm.js +1 -1
  57. package/dist/ezui/p-16e612fc.entry.js +1 -0
  58. package/dist/ezui/p-17eabf46.entry.js +1 -0
  59. package/dist/ezui/p-2475fd6e.entry.js +1 -0
  60. package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
  61. package/dist/ezui/p-5b205c80.entry.js +1 -0
  62. package/dist/ezui/p-65f471bc.entry.js +1 -0
  63. package/dist/ezui/p-66924de6.entry.js +1 -0
  64. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  65. package/dist/ezui/p-80dfc50b.js +1 -0
  66. package/dist/ezui/{p-b36542d8.entry.js → p-a6fe527a.entry.js} +1 -1
  67. package/dist/ezui/p-b46e9f59.entry.js +309 -0
  68. package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
  69. package/dist/ezui/{p-2b46b37b.entry.js → p-fa6732f2.entry.js} +1 -1
  70. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  71. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  72. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  73. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
  74. package/dist/types/components/ez-grid/ez-grid.d.ts +5 -1
  75. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  76. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  77. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
  78. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +7 -0
  79. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +4 -0
  80. package/dist/types/components.d.ts +133 -13
  81. package/package.json +1 -1
  82. package/react/components.d.ts +1 -0
  83. package/react/components.js +1 -0
  84. package/react/components.js.map +1 -1
  85. package/dist/ezui/p-4575d511.entry.js +0 -1
  86. package/dist/ezui/p-90bcd2ba.entry.js +0 -1
  87. package/dist/ezui/p-bfad39eb.entry.js +0 -1
  88. package/dist/ezui/p-c806f32f.entry.js +0 -1
  89. package/dist/ezui/p-ca1ce49f.entry.js +0 -309
  90. package/dist/ezui/p-cd2e78f0.entry.js +0 -1
  91. package/dist/ezui/p-e78e0843.entry.js +0 -1
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
+ const ezListHelper = require('./ezListHelper-0d3970b4.js');
7
8
 
8
9
  const ezListCss = ".sc-ez-list-h {\n \n --ez-list__host--z-index: var(--visible, 1);\n\n \n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n \n --ez-list__host--padding: var(--space--medium, 12px);\n\n \n --ez-list__icon--padding: var(--space--small, 6px);\n\n \n --ez-list__icon--color: #AFB6C0;\n\n \n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n \n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n \n --ez-list__item--border-bottom;\n\n \n --ez-list__item--border-bottom-color;\n\n \n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__item--font-size: var(--text--medium, 14px);\n \n \n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n \n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n \n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n \n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n \n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n \n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n \n --ez-list__group--font-size: var(--text--medium, 14px);\n \n \n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n \n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n \n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n \n --ez-list__over--border--color: var(--color--primary, #008561);\n\n \n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n \n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n \n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n \n \n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n \n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n \n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n \n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n \n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n \n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n \n z-index: var(--ez-list__host--z-index);\n}\n\np.sc-ez-list {\n margin: 0;\n}\n\n.draggable.sc-ez-list {\n \n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging.sc-ez-list {\n background: #FFFFFF;\n \n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable.sc-ez-list {\n cursor: pointer;\n\n \n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container.sc-ez-list {\n margin: 0px !important;\n}\n\n.hover-feedback.sc-ez-list:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content.sc-ez-list {\n display: flex;\n align-items: center;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list.sc-ez-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n \n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list {\n display: flex;\n \n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list > div.sc-ez-list {\n \n padding: var(--space--3xs, 4px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n}\n\n.over.sc-ez-list {\n \n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space.sc-ez-list {\n \n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected.sc-ez-list {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected.sc-ez-list div.sc-ez-list:hover {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon.sc-ez-list {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon.sc-ez-list::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n \n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n*.sc-ez-list {\n box-sizing: border-box;\n}\n\n.checkbox.sc-ez-list {\n width: fit-content;\n}\n\n.text--ellipsis.sc-ez-list {\n overflow: hidden;\n text-overflow: ellipsis;\n \n \n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container.sc-ez-list {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name.sc-ez-list {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n \n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group.sc-ez-list {\n display: flex;\n flex-direction: column;\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container.sc-ez-list {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n \n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight.sc-ez-list {\n min-height: 100px;\n}\n\n.overlay-text.sc-ez-list {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item.sc-ez-list {\n \n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item.sc-ez-list {\n align-items: flex-end;\n}\n\n.overGroup.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
9
10
 
@@ -12,6 +13,7 @@ const EzList = class {
12
13
  index.registerInstance(this, hostRef);
13
14
  this.ezChange = index.createEvent(this, "ezChange", 7);
14
15
  this.ezSelectItem = index.createEvent(this, "ezSelectItem", 7);
16
+ this.ezSelectMultipleItems = index.createEvent(this, "ezSelectMultipleItems", 7);
15
17
  this.ezCheckChange = index.createEvent(this, "ezCheckChange", 7);
16
18
  this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
17
19
  this._listItemsHistory = [];
@@ -25,6 +27,7 @@ const EzList = class {
25
27
  this.itemSlotBuilder = undefined;
26
28
  this.itemLeftSlotBuilder = undefined;
27
29
  this.hoverFeedback = false;
30
+ this.enableMultipleSelection = false;
28
31
  }
29
32
  /**
30
33
  * Limpa o histórico da lista.
@@ -46,56 +49,99 @@ const EzList = class {
46
49
  /**
47
50
  * Aplica seleção nas linhas da lista.
48
51
  */
49
- async setSelection(selectedItem, scrollToOption) {
50
- if (selectedItem && this.ezSelectable) {
51
- this.ezSelectItem.emit(selectedItem);
52
- if (this.useGroups) {
53
- let newList = [...this._listGroupItems];
54
- newList.forEach(groupItem => {
55
- groupItem.items.forEach(item => {
56
- item.selected = item.id === selectedItem.id;
57
- });
58
- });
59
- this._listGroupItems = newList;
60
- }
61
- else {
62
- let newList = [...this._listItems];
63
- newList.forEach(item => {
64
- item.selected = item.id === selectedItem.id;
65
- });
66
- this._listItems = newList;
67
- }
68
- if (scrollToOption) {
69
- let liElem = this.useGroups
70
- ? this._groupContainer.querySelector('li#item_' + selectedItem.id)
71
- : this._itemContainer.querySelector('li#item_' + selectedItem.id);
72
- if (liElem) {
73
- liElem.scrollIntoView();
74
- }
75
- }
76
- }
77
- else {
52
+ async setSelection(selectedItem, scrollToOption, shitkey, ctrlKey) {
53
+ if (!selectedItem || !this.ezSelectable) {
78
54
  await this.removeSelection();
55
+ return;
56
+ }
57
+ if (this.useGroups) {
58
+ this.setSelectionWithGroups(selectedItem, scrollToOption);
59
+ return;
60
+ }
61
+ if (this.enableMultipleSelection && ctrlKey) {
62
+ this.setSelectionMultiple(selectedItem);
63
+ return;
64
+ }
65
+ if (this.enableMultipleSelection && shitkey) {
66
+ this.setSelectionRange(selectedItem);
67
+ return;
68
+ }
69
+ this.setSelectionSingleItem(selectedItem, scrollToOption);
70
+ this.emitSelectedItems(selectedItem);
71
+ }
72
+ emitSelectedItems(singleItem, listItem) {
73
+ this.ezSelectItem.emit(singleItem);
74
+ this.ezSelectMultipleItems.emit(listItem !== null && listItem !== void 0 ? listItem : [singleItem]);
75
+ }
76
+ setSelectionRange(selectedItem) {
77
+ const lastSelectedIndex = this._listItems.findIndex(item => item.selected);
78
+ const seletedItemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
79
+ if (lastSelectedIndex < 0 || lastSelectedIndex === seletedItemIndex) {
80
+ this.setSelectionSingleItem(selectedItem);
81
+ return;
79
82
  }
83
+ const minorIndex = Math.min(lastSelectedIndex, seletedItemIndex);
84
+ const majorIndex = Math.max(lastSelectedIndex, seletedItemIndex);
85
+ let newList = [...this._listItems];
86
+ newList.forEach((item, index) => {
87
+ item.selected = (index >= minorIndex && index <= majorIndex);
88
+ });
89
+ this._listItems = [...newList];
90
+ const selectedList = this._listItems.filter(item => item.selected);
91
+ this.emitSelectedItems(selectedItem, selectedList);
92
+ }
93
+ setSelectionMultiple(selectedItem) {
94
+ let newList = [...this._listItems];
95
+ newList.forEach(item => {
96
+ item.selected = (item.id === selectedItem.id) ? !item.selected : item.selected;
97
+ });
98
+ this._listItems = [...newList];
99
+ const selectedList = this._listItems.filter(item => item.selected);
100
+ this.emitSelectedItems(selectedItem, selectedList);
101
+ }
102
+ setSelectionSingleItem(selectedItem, scrollToOption) {
103
+ this.emitSelectedItems(selectedItem);
104
+ let newList = [...this._listItems];
105
+ newList.forEach(item => {
106
+ item.selected = item.id === selectedItem.id;
107
+ });
108
+ this._listItems = newList;
109
+ if (!scrollToOption)
110
+ return;
111
+ let liElem = this._itemContainer.querySelector('li#item_' + selectedItem.id);
112
+ if (liElem)
113
+ liElem.scrollIntoView();
114
+ }
115
+ setSelectionWithGroups(selectedItem, scrollToOption) {
116
+ this.emitSelectedItems(selectedItem);
117
+ let newList = [...this._listGroupItems];
118
+ newList.forEach(groupItem => {
119
+ groupItem.items.forEach(item => {
120
+ item.selected = item.id === selectedItem.id;
121
+ });
122
+ });
123
+ this._listGroupItems = newList;
124
+ if (!scrollToOption)
125
+ return;
126
+ let liElem = this._groupContainer.querySelector('li#item_' + selectedItem.id);
127
+ if (liElem)
128
+ liElem.scrollIntoView();
80
129
  }
81
130
  /**
82
131
  * Obtém o item selecionado.
83
132
  */
84
133
  async getSelection() {
134
+ if (!this.useGroups)
135
+ return this._listItems.find(item => item.selected == true);
85
136
  let selectedItem;
86
- if (this.useGroups) {
87
- this._listGroupItems.every(group => {
88
- let item = group.items.find(item => item.selected == true);
89
- if (item) {
90
- selectedItem = item;
91
- return false;
92
- }
93
- return true;
94
- });
95
- }
96
- else {
97
- selectedItem = this._listItems.find(item => item.selected == true);
98
- }
137
+ this._listGroupItems.every(group => {
138
+ let item = group.items.find(item => item.selected == true);
139
+ if (item) {
140
+ selectedItem = item;
141
+ return false;
142
+ }
143
+ return true;
144
+ });
99
145
  return selectedItem;
100
146
  }
101
147
  /**
@@ -119,14 +165,11 @@ const EzList = class {
119
165
  });
120
166
  });
121
167
  this._listGroupItems = newList;
168
+ return;
122
169
  }
123
- else {
124
- let newList = [...this._listItems];
125
- newList.forEach(item => {
126
- item.selected = false;
127
- });
128
- this._listItems = newList;
129
- }
170
+ let newList = [...this._listItems];
171
+ newList.forEach(item => item.selected = false);
172
+ this._listItems = newList;
130
173
  }
131
174
  applyUUID(item) {
132
175
  if (!item.id) {
@@ -188,78 +231,88 @@ const EzList = class {
188
231
  core.ElementIDUtils.addIDInfo(this._element);
189
232
  }
190
233
  onDrop(ev, dragEndItem) {
234
+ ev.stopPropagation();
191
235
  this.removeOverClass();
236
+ if (!this._dragStartItem)
237
+ return;
238
+ if (this.useGroups) {
239
+ this.onDropWithGroups(dragEndItem);
240
+ return;
241
+ }
242
+ this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(dragEndItem.index, false))];
243
+ this._listItemsHistory = [...this._listItems];
244
+ this.ezChange.emit(this._listItems);
245
+ }
246
+ buildDragHandlerConfig(targetIndex, moveToFinal) {
247
+ return {
248
+ listItems: this._listItems,
249
+ dragItem: this._dragStartItem,
250
+ enableMultipleSelection: this.enableMultipleSelection,
251
+ targetIndex,
252
+ moveToFinal,
253
+ clearSelection: () => this.setSelection(undefined)
254
+ };
255
+ }
256
+ ;
257
+ onDropWithGroups(dragEndItem) {
192
258
  this.setSelection(undefined);
193
- if (this._dragStartItem) {
194
- if (this.useGroups) {
195
- let newList = [...this._listGroupItems];
196
- let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
197
- //Remove item arrastado
198
- newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
199
- //Adiciona item arrastado
200
- if (groupEnd.sort) {
201
- newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
202
- newList
203
- .find(group => group.group == dragEndItem.groupName)
204
- .items.sort(function (a, b) {
205
- return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
206
- });
207
- if (groupEnd.sort === 'DSC') {
208
- newList.find(group => group.group == dragEndItem.groupName).items.reverse();
209
- }
210
- }
211
- else {
212
- let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
213
- newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
214
- }
215
- this._listGroupItems = newList;
216
- this.ezChange.emit(this._listGroupItems);
217
- }
218
- else {
219
- let newList = [...this._listItems];
220
- newList.splice(this._dragStartItem.index, 1);
221
- newList.splice(dragEndItem.index, 0, this._dragStartItem.item);
222
- this._listItems = newList;
223
- this._listItemsHistory = newList;
224
- this.ezChange.emit(this._listItems);
259
+ let newList = [...this._listGroupItems];
260
+ let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
261
+ //Remove item arrastado
262
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
263
+ //Adiciona item arrastado
264
+ if (groupEnd.sort) {
265
+ newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
266
+ newList
267
+ .find(group => group.group == dragEndItem.groupName)
268
+ .items.sort(function (a, b) {
269
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
270
+ });
271
+ if (groupEnd.sort === 'DSC') {
272
+ newList.find(group => group.group == dragEndItem.groupName).items.reverse();
225
273
  }
226
274
  }
227
- ev.stopPropagation();
275
+ else {
276
+ let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
277
+ newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
278
+ }
279
+ this._listGroupItems = newList;
280
+ this.ezChange.emit(this._listGroupItems);
228
281
  }
229
282
  onDropLastIndex(ev, groupDropped) {
283
+ ev.stopPropagation();
230
284
  this.removeOverClass();
285
+ if (!this._dragStartItem)
286
+ return;
287
+ if (this.useGroups) {
288
+ this.onDropLastItemWithGroups(groupDropped);
289
+ return;
290
+ }
291
+ const lastIndex = this._listItems.length - 1;
292
+ this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(lastIndex, true))];
293
+ this._listItemsHistory = [...this._listItems];
294
+ this.ezChange.emit(this._listItems);
295
+ }
296
+ onDropLastItemWithGroups(groupDropped) {
231
297
  this.setSelection(undefined);
232
- if (this._dragStartItem) {
233
- if (this.useGroups) {
234
- let newList = [...this._listGroupItems];
235
- let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
236
- //Remove item arrastado
237
- newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
238
- //Adiciona item arrastado
239
- newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
240
- if (groupEnd.sort) {
241
- newList
242
- .find(group => group.group == groupDropped.group)
243
- .items.sort(function (a, b) {
244
- return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
245
- });
246
- if (groupEnd.sort === 'DSC') {
247
- newList.find(group => group.group == groupDropped.group).items.reverse();
248
- }
249
- }
250
- this._listGroupItems = newList;
251
- this.ezChange.emit(this._listGroupItems);
252
- }
253
- else {
254
- let newList = [...this._listItems];
255
- newList.splice(this._dragStartItem.index, 1);
256
- newList.push(this._dragStartItem.item);
257
- this._listItems = newList;
258
- this._listItemsHistory = newList;
259
- this.ezChange.emit(this._listItems);
298
+ let newList = [...this._listGroupItems];
299
+ let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
300
+ //Remove item arrastado
301
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
302
+ //Adiciona item arrastado
303
+ newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
304
+ if (groupEnd.sort) {
305
+ newList
306
+ .find(group => group.group == groupDropped.group)
307
+ .items.sort(function (a, b) {
308
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
309
+ });
310
+ if (groupEnd.sort === 'DSC') {
311
+ newList.find(group => group.group == groupDropped.group).items.reverse();
260
312
  }
261
313
  }
262
- ev.stopPropagation();
314
+ this._listGroupItems = newList;
315
+ this.ezChange.emit(this._listGroupItems);
263
316
  }
264
317
  onDropGroup(groupSelected) {
265
318
  var _a;
@@ -297,19 +350,13 @@ const EzList = class {
297
350
  if (this.useGroups) {
298
351
  this.hideOverlays();
299
352
  }
300
- if (this._draggingElement) {
301
- try {
302
- this._element.removeChild(this._draggingElement);
303
- }
304
- catch (err) { }
305
- this._draggingElement = undefined;
306
- }
307
353
  }
308
354
  addOverClass(element) {
309
355
  if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
310
356
  element.classList.add('over');
357
+ return;
311
358
  }
312
- else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
359
+ if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
313
360
  this.addOverClass(element.parentElement);
314
361
  }
315
362
  }
@@ -365,84 +412,94 @@ const EzList = class {
365
412
  window.clearTimeout(this._changeDeboucingTimeout);
366
413
  }
367
414
  if (this.useGroups) {
368
- this._dragStartItem = { groupName: group.group, item: item, index: index };
369
- this._changeDeboucingTimeout = window.setTimeout(() => {
370
- this.showOverlays(group);
371
- }, 10);
372
- }
373
- else {
374
- this._dragStartItem = { item: item.item, index: item.index };
415
+ this.onDragStartWithGroups(group, item, index);
416
+ return;
375
417
  }
418
+ this._dragStartItem = { item: item.item, index: item.index };
419
+ }
420
+ onDragStartWithGroups(group, item, index) {
421
+ this._dragStartItem = { groupName: group.group, item: item, index: index };
422
+ this._changeDeboucingTimeout = window.setTimeout(() => {
423
+ this.showOverlays(group);
424
+ }, 10);
376
425
  }
377
426
  selectFirstItem() {
378
427
  if (this.useGroups) {
379
428
  this.setSelection(this._listGroupItems[0].items[0]);
380
429
  }
381
- {
430
+ else {
382
431
  this.setSelection(this._listItems[0]);
383
432
  }
384
433
  }
385
434
  nextOption(selectedItem) {
386
- let nextItem = undefined;
387
435
  if (this.useGroups) {
388
- this._listGroupItems.every((group, groupIndex, listGroupItems) => {
389
- let item = undefined;
390
- let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
391
- if (itemIndex != undefined && itemIndex != -1) {
392
- if (itemIndex === group.items.length - 1) {
393
- if (groupIndex + 1 <= listGroupItems.length - 1) {
394
- item = { label: listGroupItems[groupIndex + 1].items[0].label };
395
- }
396
- }
397
- else {
398
- item = { label: group.items[itemIndex + 1].label };
436
+ this.setSelection(this.nextOptionWithGroups(selectedItem), true);
437
+ return;
438
+ }
439
+ let nextItem = undefined;
440
+ let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
441
+ if (itemIndex >= 0 && itemIndex < this._listItems.length) {
442
+ nextItem = this._listItems[itemIndex + 1];
443
+ }
444
+ this.setSelection(nextItem, true);
445
+ }
446
+ nextOptionWithGroups(selectedItem) {
447
+ let nextItem = undefined;
448
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
449
+ let item = undefined;
450
+ let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
451
+ if (itemIndex != undefined && itemIndex != -1) {
452
+ if (itemIndex === group.items.length - 1) {
453
+ if (groupIndex + 1 <= listGroupItems.length - 1) {
454
+ item = { label: listGroupItems[groupIndex + 1].items[0].label };
399
455
  }
400
456
  }
401
- if (item != undefined) {
402
- nextItem = item;
403
- return false;
457
+ else {
458
+ item = { label: group.items[itemIndex + 1].label };
404
459
  }
405
- return true;
406
- });
407
- }
408
- else {
409
- let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
410
- if (itemIndex >= 0 && itemIndex < this._listItems.length) {
411
- nextItem = this._listItems[itemIndex + 1];
412
460
  }
413
- }
414
- this.setSelection(nextItem, true);
461
+ if (item != undefined) {
462
+ nextItem = item;
463
+ return false;
464
+ }
465
+ return true;
466
+ });
467
+ return nextItem;
415
468
  }
416
469
  previousOption(selectedItem) {
417
- let previousItem = undefined;
418
470
  if (this.useGroups) {
419
- this._listGroupItems.every((group, groupIndex, listGroupItems) => {
420
- let item = undefined;
421
- let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
422
- if (itemIndex != undefined && itemIndex != -1) {
423
- if (itemIndex === 0) {
424
- if (groupIndex - 1 >= 0) {
425
- item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
426
- }
427
- }
428
- else {
429
- item = { label: group.items[itemIndex - 1].label };
471
+ this.setSelection(this.previousOptionWithGroups(selectedItem), true);
472
+ return;
473
+ }
474
+ let previousItem = undefined;
475
+ let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
476
+ if (itemIndex > 0 && itemIndex < this._listItems.length) {
477
+ previousItem = this._listItems[itemIndex - 1];
478
+ }
479
+ this.setSelection(previousItem, true);
480
+ }
481
+ previousOptionWithGroups(selectedItem) {
482
+ let previousItem = undefined;
483
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
484
+ let item = undefined;
485
+ let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
486
+ if (itemIndex != undefined && itemIndex != -1) {
487
+ if (itemIndex === 0) {
488
+ if (groupIndex - 1 >= 0) {
489
+ item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
430
490
  }
431
491
  }
432
- if (item != undefined) {
433
- previousItem = item;
434
- return false;
492
+ else {
493
+ item = { label: group.items[itemIndex - 1].label };
435
494
  }
436
- return true;
437
- });
438
- }
439
- else {
440
- let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
441
- if (itemIndex > 0 && itemIndex < this._listItems.length) {
442
- previousItem = this._listItems[itemIndex - 1];
443
495
  }
444
- }
445
- this.setSelection(previousItem, true);
496
+ if (item != undefined) {
497
+ previousItem = item;
498
+ return false;
499
+ }
500
+ return true;
501
+ });
502
+ return previousItem;
446
503
  }
447
504
  keyDownHandler(event) {
448
505
  if (!event.ctrlKey) {
@@ -484,11 +541,11 @@ const EzList = class {
484
541
  }
485
542
  }
486
543
  onDragOverItem(event) {
487
- if (this._dragStartItem) {
488
- event.preventDefault();
489
- this.addOverClass(event.target);
490
- event.stopPropagation();
491
- }
544
+ if (!this._dragStartItem)
545
+ return;
546
+ event.preventDefault();
547
+ this.addOverClass(event.target);
548
+ event.stopPropagation();
492
549
  }
493
550
  onDragOverLastIndex(ev) {
494
551
  ev.preventDefault();
@@ -528,38 +585,29 @@ const EzList = class {
528
585
  doubleClickItem(item) {
529
586
  this.ezDoubleClick.emit(item);
530
587
  }
531
- render() {
532
- return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => {
533
- this.keyDownHandler(event);
534
- } }, this._listGroupItems.map(group => {
535
- return (index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: "group-name", title: group.group }, group.group), index.h("section", { class: "section-container", onDragOver: ev => ev.preventDefault() }, index.h("div", { class: "group-items-container" }, index.h("div", { class: "draggable-list" }, group.items.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
588
+ buildItem(item, evt) {
589
+ return { id: item.id, label: item.label, check: evt.detail };
590
+ }
591
+ renderListWithGroups() {
592
+ return index.h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
593
+ return (index.h("div", { id: this.getDivGroupId(group.group), class: 'group', key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: 'group-name', title: group.group }, group.group), index.h("section", { class: 'section-container', onDragOver: ev => ev.preventDefault() }, index.h("div", { class: 'group-items-container' }, index.h("div", { class: 'draggable-list' }, group.items.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
536
594
  'selectable-container': this.ezSelectable,
537
595
  'hover-feedback': this.hoverFeedback,
538
596
  }, key: 'item_' + item.id }, {
539
597
  [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
540
- }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
541
- this.doubleClickItem(item);
542
- }, onClick: () => {
543
- this.setSelection(item);
544
- }, onDragLeave: () => {
545
- group.sort ? undefined : this.removeOverClass();
546
- }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => {
547
- group.sort ? undefined : this.onDragOverItem(event);
548
- }, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
549
- this.onDragOverLastIndex(event);
550
- }, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
551
- }))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
598
+ }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), onClick: () => this.setSelection(item), onDragLeave: () => group.sort ? undefined : this.removeOverClass(), onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => group.sort ? undefined : this.onDragOverItem(event), onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: 'item-content' }, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit(this.buildItem(item, evt)) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: 'last-droppable-space', onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverLastIndex(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: 'group-overlay' }, "Mover para ", group.group)) : undefined)));
599
+ }));
600
+ }
601
+ renderList() {
602
+ return index.h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
552
603
  this.keyDownHandler(event);
553
- } }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
604
+ } }, index.h("div", { class: 'draggable-list' }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
554
605
  'selectable-container': this.ezSelectable,
555
606
  'hover-feedback': this.hoverFeedback,
556
- }, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDblClick: () => {
557
- this.doubleClickItem(item);
558
- }, onClick: () => {
559
- this.setSelection(item);
560
- }, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
561
- this.onDragOverLastIndex(event);
562
- }, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
607
+ }, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), onClick: (event) => this.setSelection(item, false, event.shiftKey, (event.altKey || event.metaKey)), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDragOver: event => this.onDragOverItem(event), onDragLeave: () => this.removeOverClass(), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: 'item-content' }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: 'last-droppable-space', onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverLastIndex(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) })));
608
+ }
609
+ render() {
610
+ return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? this.renderListWithGroups() : this.renderList()));
563
611
  }
564
612
  };
565
613
  EzList.style = ezListCss;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
- const ezMultiSelectionListCss = ".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;display:block;width:304px;height:322px;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{height:235px;max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
8
+ const ezMultiSelectionListCss = ".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;--ez-multi-selection-default-height:322px;display:block;width:304px;height:var(--ez-multi-selection-default-height);max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
9
9
 
10
10
  var ViewScenarios;
11
11
  (function (ViewScenarios) {