@sankhyalabs/ezui 0.0.0-bugfix-dev-kb-74998.3 → 0.0.0-bugfix-dev-KB-74246.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 (93) 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 +285 -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-form.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-grid.cjs.entry.js +770 -107
  8. package/dist/cjs/ez-list.cjs.entry.js +246 -205
  9. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-popup.cjs.entry.js +4 -1
  11. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  12. package/dist/cjs/ez-split-panel.cjs.entry.js +54 -2
  13. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  14. package/dist/cjs/ezui.cjs.js +1 -1
  15. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  16. package/dist/cjs/index-a7b0c73d.js +10 -2
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +1 -0
  19. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  20. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  21. package/dist/collection/components/ez-double-list/ez-double-list.js +418 -0
  22. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  23. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +6 -2
  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 +5 -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 +273 -208
  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/collection/utils/form/FormMetadata.js +1 -1
  39. package/dist/custom-elements/index.d.ts +6 -0
  40. package/dist/custom-elements/index.js +1466 -337
  41. package/dist/esm/{ez-card-item_3.entry.js → ez-card-item_2.entry.js} +1 -123
  42. package/dist/esm/ez-chart.entry.js +1 -1
  43. package/dist/esm/ez-double-list.entry.js +281 -0
  44. package/dist/esm/ez-filter-input.entry.js +126 -0
  45. package/dist/esm/ez-form-view.entry.js +8 -2
  46. package/dist/esm/ez-form.entry.js +1 -1
  47. package/dist/esm/ez-grid.entry.js +771 -108
  48. package/dist/esm/ez-list.entry.js +246 -205
  49. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  50. package/dist/esm/ez-popup.entry.js +4 -1
  51. package/dist/esm/ez-split-item.entry.js +3 -2
  52. package/dist/esm/ez-split-panel.entry.js +54 -2
  53. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  54. package/dist/esm/ezui.js +1 -1
  55. package/dist/esm/filter-column.entry.js +2 -2
  56. package/dist/esm/index-baa5e267.js +10 -2
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/ezui/ezui.esm.js +1 -1
  59. package/dist/ezui/p-13165bb1.entry.js +1 -0
  60. package/dist/ezui/p-17eabf46.entry.js +1 -0
  61. package/dist/ezui/p-2475fd6e.entry.js +1 -0
  62. package/dist/ezui/p-29e7a674.entry.js +309 -0
  63. package/dist/ezui/p-31d1fab6.entry.js +1 -0
  64. package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
  65. package/dist/ezui/p-5b205c80.entry.js +1 -0
  66. package/dist/ezui/p-65f471bc.entry.js +1 -0
  67. package/dist/ezui/p-66924de6.entry.js +1 -0
  68. package/dist/ezui/p-80dfc50b.js +1 -0
  69. package/dist/ezui/{p-d520839d.entry.js → p-9aafa8f7.entry.js} +1 -1
  70. package/dist/ezui/{p-b36542d8.entry.js → p-a6fe527a.entry.js} +1 -1
  71. package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
  72. package/dist/ezui/{p-2b46b37b.entry.js → p-fa6732f2.entry.js} +1 -1
  73. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  74. package/dist/types/components/ez-double-list/ez-double-list.d.ts +86 -0
  75. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  76. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
  77. package/dist/types/components/ez-list/ez-list.d.ts +19 -3
  78. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  79. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
  80. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +7 -0
  81. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +4 -0
  82. package/dist/types/components.d.ts +121 -14
  83. package/package.json +1 -1
  84. package/react/components.d.ts +1 -0
  85. package/react/components.js +1 -0
  86. package/react/components.js.map +1 -1
  87. package/dist/ezui/p-4575d511.entry.js +0 -1
  88. package/dist/ezui/p-90bcd2ba.entry.js +0 -1
  89. package/dist/ezui/p-bfad39eb.entry.js +0 -1
  90. package/dist/ezui/p-c806f32f.entry.js +0 -1
  91. package/dist/ezui/p-ca1ce49f.entry.js +0 -309
  92. package/dist/ezui/p-cd2e78f0.entry.js +0 -1
  93. 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
 
@@ -25,6 +26,7 @@ const EzList = class {
25
26
  this.itemSlotBuilder = undefined;
26
27
  this.itemLeftSlotBuilder = undefined;
27
28
  this.hoverFeedback = false;
29
+ this.enableMultipleSelection = false;
28
30
  }
29
31
  /**
30
32
  * Limpa o histórico da lista.
@@ -46,56 +48,93 @@ const EzList = class {
46
48
  /**
47
49
  * Aplica seleção nas linhas da lista.
48
50
  */
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 {
51
+ async setSelection(selectedItem, scrollToOption, shitkey, ctrlKey) {
52
+ if (!selectedItem || !this.ezSelectable) {
78
53
  await this.removeSelection();
54
+ return;
55
+ }
56
+ if (this.useGroups) {
57
+ this.setSelectionWithGroups(selectedItem, scrollToOption);
58
+ return;
59
+ }
60
+ if (this.enableMultipleSelection && ctrlKey) {
61
+ this.setSelectionMultiple(selectedItem);
62
+ return;
63
+ }
64
+ if (this.enableMultipleSelection && shitkey) {
65
+ this.setSelectionRange(selectedItem);
66
+ return;
67
+ }
68
+ this.setSelectionSingleItem(selectedItem, scrollToOption);
69
+ this.ezSelectItem.emit(selectedItem);
70
+ }
71
+ setSelectionRange(selectedItem) {
72
+ const lastSelectedIndex = this._listItems.findIndex(item => item.selected);
73
+ const seletedItemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
74
+ if (lastSelectedIndex < 0 || lastSelectedIndex === seletedItemIndex) {
75
+ this.setSelectionSingleItem(selectedItem);
76
+ return;
79
77
  }
78
+ const minorIndex = Math.min(lastSelectedIndex, seletedItemIndex);
79
+ const majorIndex = Math.max(lastSelectedIndex, seletedItemIndex);
80
+ let newList = [...this._listItems];
81
+ newList.forEach((item, index) => {
82
+ item.selected = (index >= minorIndex && index <= majorIndex);
83
+ });
84
+ this._listItems = [...newList];
85
+ this.ezSelectItem.emit(this._listItems.filter(item => item.selected));
86
+ }
87
+ setSelectionMultiple(selectedItem) {
88
+ let newList = [...this._listItems];
89
+ newList.forEach(item => {
90
+ item.selected = (item.id === selectedItem.id) ? !item.selected : item.selected;
91
+ });
92
+ this._listItems = [...newList];
93
+ this.ezSelectItem.emit(this._listItems.filter(item => item.selected));
94
+ }
95
+ setSelectionSingleItem(selectedItem, scrollToOption) {
96
+ this.ezSelectItem.emit(selectedItem);
97
+ let newList = [...this._listItems];
98
+ newList.forEach(item => {
99
+ item.selected = item.id === selectedItem.id;
100
+ });
101
+ this._listItems = newList;
102
+ if (!scrollToOption)
103
+ return;
104
+ let liElem = this._itemContainer.querySelector('li#item_' + selectedItem.id);
105
+ if (liElem)
106
+ liElem.scrollIntoView();
107
+ }
108
+ setSelectionWithGroups(selectedItem, scrollToOption) {
109
+ this.ezSelectItem.emit(selectedItem);
110
+ let newList = [...this._listGroupItems];
111
+ newList.forEach(groupItem => {
112
+ groupItem.items.forEach(item => {
113
+ item.selected = item.id === selectedItem.id;
114
+ });
115
+ });
116
+ this._listGroupItems = newList;
117
+ if (!scrollToOption)
118
+ return;
119
+ let liElem = this._groupContainer.querySelector('li#item_' + selectedItem.id);
120
+ if (liElem)
121
+ liElem.scrollIntoView();
80
122
  }
81
123
  /**
82
124
  * Obtém o item selecionado.
83
125
  */
84
126
  async getSelection() {
127
+ if (!this.useGroups)
128
+ return this._listItems.find(item => item.selected == true);
85
129
  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
- }
130
+ this._listGroupItems.every(group => {
131
+ let item = group.items.find(item => item.selected == true);
132
+ if (item) {
133
+ selectedItem = item;
134
+ return false;
135
+ }
136
+ return true;
137
+ });
99
138
  return selectedItem;
100
139
  }
101
140
  /**
@@ -119,14 +158,11 @@ const EzList = class {
119
158
  });
120
159
  });
121
160
  this._listGroupItems = newList;
161
+ return;
122
162
  }
123
- else {
124
- let newList = [...this._listItems];
125
- newList.forEach(item => {
126
- item.selected = false;
127
- });
128
- this._listItems = newList;
129
- }
163
+ let newList = [...this._listItems];
164
+ newList.forEach(item => item.selected = false);
165
+ this._listItems = newList;
130
166
  }
131
167
  applyUUID(item) {
132
168
  if (!item.id) {
@@ -188,78 +224,88 @@ const EzList = class {
188
224
  core.ElementIDUtils.addIDInfo(this._element);
189
225
  }
190
226
  onDrop(ev, dragEndItem) {
227
+ ev.stopPropagation();
191
228
  this.removeOverClass();
229
+ if (!this._dragStartItem)
230
+ return;
231
+ if (this.useGroups) {
232
+ this.onDropWithGroups(dragEndItem);
233
+ return;
234
+ }
235
+ this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(dragEndItem.index, false))];
236
+ this._listItemsHistory = [...this._listItems];
237
+ this.ezChange.emit(this._listItems);
238
+ }
239
+ buildDragHandlerConfig(targetIndex, moveToFinal) {
240
+ return {
241
+ listItems: this._listItems,
242
+ dragItem: this._dragStartItem,
243
+ enableMultipleSelection: this.enableMultipleSelection,
244
+ targetIndex,
245
+ moveToFinal,
246
+ clearSelection: () => this.setSelection(undefined)
247
+ };
248
+ }
249
+ ;
250
+ onDropWithGroups(dragEndItem) {
192
251
  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);
252
+ let newList = [...this._listGroupItems];
253
+ let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
254
+ //Remove item arrastado
255
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
256
+ //Adiciona item arrastado
257
+ if (groupEnd.sort) {
258
+ newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
259
+ newList
260
+ .find(group => group.group == dragEndItem.groupName)
261
+ .items.sort(function (a, b) {
262
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
263
+ });
264
+ if (groupEnd.sort === 'DSC') {
265
+ newList.find(group => group.group == dragEndItem.groupName).items.reverse();
225
266
  }
226
267
  }
227
- ev.stopPropagation();
268
+ else {
269
+ let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
270
+ newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
271
+ }
272
+ this._listGroupItems = newList;
273
+ this.ezChange.emit(this._listGroupItems);
228
274
  }
229
275
  onDropLastIndex(ev, groupDropped) {
276
+ ev.stopPropagation();
230
277
  this.removeOverClass();
278
+ if (!this._dragStartItem)
279
+ return;
280
+ if (this.useGroups) {
281
+ this.onDropLastItemWithGroups(groupDropped);
282
+ return;
283
+ }
284
+ const lastIndex = this._listItems.length - 1;
285
+ this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(lastIndex, true))];
286
+ this._listItemsHistory = [...this._listItems];
287
+ this.ezChange.emit(this._listItems);
288
+ }
289
+ onDropLastItemWithGroups(groupDropped) {
231
290
  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);
291
+ let newList = [...this._listGroupItems];
292
+ let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
293
+ //Remove item arrastado
294
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
295
+ //Adiciona item arrastado
296
+ newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
297
+ if (groupEnd.sort) {
298
+ newList
299
+ .find(group => group.group == groupDropped.group)
300
+ .items.sort(function (a, b) {
301
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
302
+ });
303
+ if (groupEnd.sort === 'DSC') {
304
+ newList.find(group => group.group == groupDropped.group).items.reverse();
260
305
  }
261
306
  }
262
- ev.stopPropagation();
307
+ this._listGroupItems = newList;
308
+ this.ezChange.emit(this._listGroupItems);
263
309
  }
264
310
  onDropGroup(groupSelected) {
265
311
  var _a;
@@ -297,19 +343,13 @@ const EzList = class {
297
343
  if (this.useGroups) {
298
344
  this.hideOverlays();
299
345
  }
300
- if (this._draggingElement) {
301
- try {
302
- this._element.removeChild(this._draggingElement);
303
- }
304
- catch (err) { }
305
- this._draggingElement = undefined;
306
- }
307
346
  }
308
347
  addOverClass(element) {
309
348
  if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
310
349
  element.classList.add('over');
350
+ return;
311
351
  }
312
- else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
352
+ if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
313
353
  this.addOverClass(element.parentElement);
314
354
  }
315
355
  }
@@ -365,84 +405,94 @@ const EzList = class {
365
405
  window.clearTimeout(this._changeDeboucingTimeout);
366
406
  }
367
407
  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 };
408
+ this.onDragStartWithGroups(group, item, index);
409
+ return;
375
410
  }
411
+ this._dragStartItem = { item: item.item, index: item.index };
412
+ }
413
+ onDragStartWithGroups(group, item, index) {
414
+ this._dragStartItem = { groupName: group.group, item: item, index: index };
415
+ this._changeDeboucingTimeout = window.setTimeout(() => {
416
+ this.showOverlays(group);
417
+ }, 10);
376
418
  }
377
419
  selectFirstItem() {
378
420
  if (this.useGroups) {
379
421
  this.setSelection(this._listGroupItems[0].items[0]);
380
422
  }
381
- {
423
+ else {
382
424
  this.setSelection(this._listItems[0]);
383
425
  }
384
426
  }
385
427
  nextOption(selectedItem) {
386
- let nextItem = undefined;
387
428
  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 };
429
+ this.setSelection(this.nextOptionWithGroups(selectedItem), true);
430
+ return;
431
+ }
432
+ let nextItem = undefined;
433
+ let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
434
+ if (itemIndex >= 0 && itemIndex < this._listItems.length) {
435
+ nextItem = this._listItems[itemIndex + 1];
436
+ }
437
+ this.setSelection(nextItem, true);
438
+ }
439
+ nextOptionWithGroups(selectedItem) {
440
+ let nextItem = undefined;
441
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
442
+ let item = undefined;
443
+ let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
444
+ if (itemIndex != undefined && itemIndex != -1) {
445
+ if (itemIndex === group.items.length - 1) {
446
+ if (groupIndex + 1 <= listGroupItems.length - 1) {
447
+ item = { label: listGroupItems[groupIndex + 1].items[0].label };
399
448
  }
400
449
  }
401
- if (item != undefined) {
402
- nextItem = item;
403
- return false;
450
+ else {
451
+ item = { label: group.items[itemIndex + 1].label };
404
452
  }
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
453
  }
413
- }
414
- this.setSelection(nextItem, true);
454
+ if (item != undefined) {
455
+ nextItem = item;
456
+ return false;
457
+ }
458
+ return true;
459
+ });
460
+ return nextItem;
415
461
  }
416
462
  previousOption(selectedItem) {
417
- let previousItem = undefined;
418
463
  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 };
464
+ this.setSelection(this.previousOptionWithGroups(selectedItem), true);
465
+ return;
466
+ }
467
+ let previousItem = undefined;
468
+ let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
469
+ if (itemIndex > 0 && itemIndex < this._listItems.length) {
470
+ previousItem = this._listItems[itemIndex - 1];
471
+ }
472
+ this.setSelection(previousItem, true);
473
+ }
474
+ previousOptionWithGroups(selectedItem) {
475
+ let previousItem = undefined;
476
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
477
+ let item = undefined;
478
+ let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
479
+ if (itemIndex != undefined && itemIndex != -1) {
480
+ if (itemIndex === 0) {
481
+ if (groupIndex - 1 >= 0) {
482
+ item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
430
483
  }
431
484
  }
432
- if (item != undefined) {
433
- previousItem = item;
434
- return false;
485
+ else {
486
+ item = { label: group.items[itemIndex - 1].label };
435
487
  }
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
488
  }
444
- }
445
- this.setSelection(previousItem, true);
489
+ if (item != undefined) {
490
+ previousItem = item;
491
+ return false;
492
+ }
493
+ return true;
494
+ });
495
+ return previousItem;
446
496
  }
447
497
  keyDownHandler(event) {
448
498
  if (!event.ctrlKey) {
@@ -484,11 +534,11 @@ const EzList = class {
484
534
  }
485
535
  }
486
536
  onDragOverItem(event) {
487
- if (this._dragStartItem) {
488
- event.preventDefault();
489
- this.addOverClass(event.target);
490
- event.stopPropagation();
491
- }
537
+ if (!this._dragStartItem)
538
+ return;
539
+ event.preventDefault();
540
+ this.addOverClass(event.target);
541
+ event.stopPropagation();
492
542
  }
493
543
  onDragOverLastIndex(ev) {
494
544
  ev.preventDefault();
@@ -528,38 +578,29 @@ const EzList = class {
528
578
  doubleClickItem(item) {
529
579
  this.ezDoubleClick.emit(item);
530
580
  }
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: {
581
+ buildItem(item, evt) {
582
+ return { id: item.id, label: item.label, check: evt.detail };
583
+ }
584
+ renderListWithGroups() {
585
+ return index.h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
586
+ 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
587
  'selectable-container': this.ezSelectable,
537
588
  'hover-feedback': this.hoverFeedback,
538
589
  }, key: 'item_' + item.id }, {
539
590
  [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 => {
591
+ }), 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)));
592
+ }));
593
+ }
594
+ renderList() {
595
+ return index.h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
552
596
  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: {
597
+ } }, index.h("div", { class: 'draggable-list' }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
554
598
  'selectable-container': this.ezSelectable,
555
599
  '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) }))))));
600
+ }, 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) })));
601
+ }
602
+ render() {
603
+ return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? this.renderListWithGroups() : this.renderList()));
563
604
  }
564
605
  };
565
606
  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) {