@sankhyalabs/ezui 4.18.2 → 4.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/cjs/constants-3a1d64fb.js +7 -0
  2. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
  4. package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
  5. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-grid.cjs.entry.js +373 -282
  7. package/dist/cjs/ez-list.cjs.entry.js +85 -72
  8. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
  9. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +181 -0
  11. package/dist/cjs/{ez-filter-input_4.cjs.entry.js → ez-scroller_3.cjs.entry.js} +0 -116
  12. package/dist/cjs/ezui.cjs.js +1 -1
  13. package/dist/cjs/filter-column.cjs.entry.js +108 -0
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/collection-manifest.json +3 -0
  16. package/dist/collection/components/ez-check/ez-check.css +1 -0
  17. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
  18. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +186 -119
  19. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +8 -0
  20. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +8 -1
  21. package/dist/collection/components/ez-grid/ez-grid.css +14 -4
  22. package/dist/collection/components/ez-grid/ez-grid.js +49 -20
  23. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +34 -0
  24. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +297 -0
  25. package/dist/collection/components/ez-list/ez-list.css +0 -1
  26. package/dist/collection/components/ez-list/ez-list.js +88 -77
  27. package/dist/collection/components/ez-modal/ez-modal.css +0 -1
  28. package/dist/collection/components/ez-modal-container/ez-modal-container.css +11 -0
  29. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
  30. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +36 -0
  31. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +318 -0
  32. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js +1 -0
  33. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js +1 -0
  34. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css +18 -0
  35. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js +41 -0
  36. package/dist/collection/utils/constants.js +1 -0
  37. package/dist/custom-elements/index.d.ts +18 -0
  38. package/dist/custom-elements/index.js +764 -365
  39. package/dist/esm/constants-6dab64f7.js +4 -0
  40. package/dist/esm/ez-check.entry.js +1 -1
  41. package/dist/esm/ez-combo-box.entry.js +2 -2
  42. package/dist/esm/ez-filter-input_2.entry.js +132 -0
  43. package/dist/esm/ez-form-view.entry.js +1 -1
  44. package/dist/esm/ez-grid.entry.js +373 -282
  45. package/dist/esm/ez-list.entry.js +85 -72
  46. package/dist/esm/ez-modal-container.entry.js +2 -2
  47. package/dist/esm/ez-modal.entry.js +1 -1
  48. package/dist/esm/ez-multi-selection-list.entry.js +177 -0
  49. package/dist/esm/{ez-filter-input_4.entry.js → ez-scroller_3.entry.js} +3 -118
  50. package/dist/esm/ezui.js +1 -1
  51. package/dist/esm/filter-column.entry.js +104 -0
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/ezui/ezui.esm.js +1 -1
  54. package/dist/ezui/p-06b3c6cd.entry.js +1 -0
  55. package/dist/ezui/{p-967758ac.entry.js → p-0dc118f3.entry.js} +1 -1
  56. package/dist/ezui/p-27a01a26.js +1 -0
  57. package/dist/ezui/p-353be5eb.entry.js +1 -0
  58. package/dist/ezui/p-3e25ecbc.entry.js +1 -0
  59. package/dist/ezui/{p-b945133d.entry.js → p-4186ca4f.entry.js} +1 -1
  60. package/dist/ezui/{p-b2056805.entry.js → p-5c0ac5ba.entry.js} +1 -1
  61. package/dist/ezui/{p-5110b212.entry.js → p-71faa111.entry.js} +1 -1
  62. package/dist/ezui/{p-9334e296.entry.js → p-b7dd1382.entry.js} +2 -2
  63. package/dist/ezui/p-c72a799e.entry.js +1 -0
  64. package/dist/ezui/p-e04e9dbd.entry.js +1 -0
  65. package/dist/ezui/p-f9787309.entry.js +1 -0
  66. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -1
  67. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +14 -5
  68. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +1 -0
  69. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +9 -7
  70. package/dist/types/components/ez-grid/ez-grid.d.ts +14 -4
  71. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +45 -0
  72. package/dist/types/components/ez-list/ez-list.d.ts +5 -5
  73. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +64 -0
  74. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +4 -0
  75. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.d.ts +4 -0
  76. package/dist/types/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.d.ts +4 -0
  77. package/dist/types/components.d.ts +117 -1
  78. package/dist/types/utils/constants.d.ts +1 -0
  79. package/package.json +1 -1
  80. package/react/components.d.ts +3 -0
  81. package/react/components.js +3 -0
  82. package/react/components.js.map +1 -1
  83. package/dist/cjs/constants-5a75e2f3.js +0 -5
  84. package/dist/esm/constants-ca136201.js +0 -3
  85. package/dist/ezui/p-3f4ae3a3.js +0 -1
  86. package/dist/ezui/p-4ebb1d15.entry.js +0 -1
  87. package/dist/ezui/p-afea6e50.entry.js +0 -1
  88. package/dist/ezui/p-f71f0aa2.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-6fbf1820.js';
2
2
  import { ElementIDUtils, StringUtils } from '@sankhyalabs/core';
3
3
 
4
- const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Roboto\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Roboto\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--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>');--ez-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-list__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-list__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__scrollbar--width:var(--space--medium, 12px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px dashed #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content{display:flex;overflow:hidden;justify-content:flex-start;align-items:center;width:100%}.draggable-list{padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;color:var(--text-color);scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.draggable-list li{display:flex;height:32px;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color)}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.draggable-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-list__icon--color);-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-name{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--title--primary);font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb:vertical:hover,.group-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container::-webkit-scrollbar-thumb:vertical:active,.group-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb:vertical:hover,.items-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container::-webkit-scrollbar-thumb:vertical:active,.items-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer;font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size)}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
4
+ const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Roboto\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Roboto\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--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>');--ez-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-list__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-list__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__scrollbar--width:var(--space--medium, 12px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px dashed #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content{display:flex;overflow:hidden;justify-content:flex-start;align-items:center;width:100%}.draggable-list{padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;color:var(--text-color);scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.draggable-list li{display:flex;height:32px;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color)}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.draggable-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-list__icon--color);-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-name{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--title--primary);font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb:vertical:hover,.group-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container::-webkit-scrollbar-thumb:vertical:active,.group-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb:vertical:hover,.items-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container::-webkit-scrollbar-thumb:vertical:active,.items-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer;font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size)}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
5
5
 
6
6
  const EzList = class {
7
7
  constructor(hostRef) {
@@ -13,7 +13,7 @@ const EzList = class {
13
13
  this._listItems = [];
14
14
  this._listGroupItems = [];
15
15
  this.dataSource = [];
16
- this.listMode = "regular";
16
+ this.listMode = 'regular';
17
17
  this.useGroups = false;
18
18
  this.ezDraggable = false;
19
19
  this.ezSelectable = false;
@@ -31,10 +31,10 @@ const EzList = class {
31
31
  */
32
32
  async scrollToTop() {
33
33
  if (this.useGroups) {
34
- this._element.shadowRoot.querySelector(".group-container").scrollTop = 0;
34
+ this._element.shadowRoot.querySelector('.group-container').scrollTop = 0;
35
35
  }
36
36
  else {
37
- this._element.shadowRoot.querySelector(".items-container").scrollTop = 0;
37
+ this._element.shadowRoot.querySelector('.items-container').scrollTop = 0;
38
38
  }
39
39
  }
40
40
  /**
@@ -70,9 +70,9 @@ const EzList = class {
70
70
  this._listItems = newList;
71
71
  }
72
72
  if (scrollToOption) {
73
- let liElem = this.useGroups ?
74
- this._groupContainer.querySelector("li#item_" + this.getItemId(selectedItem.label))
75
- : this._itemContainer.querySelector("li#item_" + this.getItemId(selectedItem.label));
73
+ let liElem = this.useGroups
74
+ ? this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
75
+ : this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
76
76
  if (liElem) {
77
77
  liElem.scrollIntoView();
78
78
  }
@@ -89,7 +89,7 @@ const EzList = class {
89
89
  let selectedItem;
90
90
  if (this.useGroups) {
91
91
  this._listGroupItems.every(group => {
92
- let item = group.items.find((item) => item.selected == true);
92
+ let item = group.items.find(item => item.selected == true);
93
93
  if (item) {
94
94
  selectedItem = item;
95
95
  return false;
@@ -98,7 +98,7 @@ const EzList = class {
98
98
  });
99
99
  }
100
100
  else {
101
- selectedItem = this._listItems.find((item) => item.selected == true);
101
+ selectedItem = this._listItems.find(item => item.selected == true);
102
102
  }
103
103
  return selectedItem;
104
104
  }
@@ -128,7 +128,7 @@ const EzList = class {
128
128
  itemGroup.items.sort(function (a, b) {
129
129
  return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
130
130
  });
131
- if (itemGroup.sort === "DSC") {
131
+ if (itemGroup.sort === 'DSC') {
132
132
  itemGroup.items.reverse();
133
133
  }
134
134
  }
@@ -153,19 +153,19 @@ const EzList = class {
153
153
  }
154
154
  buildIdDraggableListAndSelectable() {
155
155
  const shadow = this._element.shadowRoot;
156
- const draggableList = shadow.querySelectorAll(".draggable-list");
156
+ const draggableList = shadow.querySelectorAll('.draggable-list');
157
157
  draggableList === null || draggableList === void 0 ? void 0 : draggableList.forEach((draggable, index) => {
158
158
  var _a, _b;
159
- let suffix = "draggableList";
159
+ let suffix = 'draggableList';
160
160
  const group = (_b = (_a = this._listGroupItems) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b.group;
161
161
  if (this.useGroups && group) {
162
162
  suffix = suffix.concat('_', group);
163
163
  }
164
164
  ElementIDUtils.addIDInfoIfNotExists(draggable, suffix);
165
165
  });
166
- const selectable = shadow.querySelectorAll(".selectable-container");
166
+ const selectable = shadow.querySelectorAll('.selectable-container');
167
167
  selectable === null || selectable === void 0 ? void 0 : selectable.forEach((item) => {
168
- ElementIDUtils.addIDInfoIfNotExists(item, "selectable");
168
+ ElementIDUtils.addIDInfoIfNotExists(item, 'selectable');
169
169
  });
170
170
  }
171
171
  componentWillLoad() {
@@ -192,15 +192,17 @@ const EzList = class {
192
192
  //Adiciona item arrastado
193
193
  if (groupEnd.sort) {
194
194
  newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
195
- newList.find(group => group.group == dragEndItem.groupName).items.sort(function (a, b) {
195
+ newList
196
+ .find(group => group.group == dragEndItem.groupName)
197
+ .items.sort(function (a, b) {
196
198
  return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
197
199
  });
198
- if (groupEnd.sort === "DSC") {
200
+ if (groupEnd.sort === 'DSC') {
199
201
  newList.find(group => group.group == dragEndItem.groupName).items.reverse();
200
202
  }
201
203
  }
202
204
  else {
203
- let indexForAdd = (dragEndItem.index > this._dragStartItem.index) ? dragEndItem.index - 1 : dragEndItem.index;
205
+ let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
204
206
  newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
205
207
  }
206
208
  this._listGroupItems = newList;
@@ -229,10 +231,12 @@ const EzList = class {
229
231
  //Adiciona item arrastado
230
232
  newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
231
233
  if (groupEnd.sort) {
232
- newList.find(group => group.group == groupDropped.group).items.sort(function (a, b) {
234
+ newList
235
+ .find(group => group.group == groupDropped.group)
236
+ .items.sort(function (a, b) {
233
237
  return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
234
238
  });
235
- if (groupEnd.sort === "DSC") {
239
+ if (groupEnd.sort === 'DSC') {
236
240
  newList.find(group => group.group == groupDropped.group).items.reverse();
237
241
  }
238
242
  }
@@ -295,23 +299,23 @@ const EzList = class {
295
299
  }
296
300
  }
297
301
  addOverClass(element) {
298
- if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
299
- element.classList.add("over");
302
+ if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
303
+ element.classList.add('over');
300
304
  }
301
- else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
305
+ else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
302
306
  this.addOverClass(element.parentElement);
303
307
  }
304
308
  }
305
309
  addOverGroupClass(ev, group) {
306
310
  if (ev.target) {
307
- let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
308
- let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
311
+ let groupContainer = this._groupContainer.querySelector('div#' + this.getDivGroupId(group.group));
312
+ let groupOverlay = groupContainer.getElementsByClassName('group-overlay')[0];
309
313
  if (group.items.length > 0) {
310
- groupOverlay.setAttribute("style", "display:grid");
314
+ groupOverlay.setAttribute('style', 'display:grid');
311
315
  }
312
316
  else {
313
- groupOverlay.classList.add("presetedHeight");
314
- groupOverlay.setAttribute("style", "display:grid");
317
+ groupOverlay.classList.add('presetedHeight');
318
+ groupOverlay.setAttribute('style', 'display:grid');
315
319
  groupOverlay.scrollIntoView(false);
316
320
  }
317
321
  }
@@ -321,31 +325,31 @@ const EzList = class {
321
325
  let overCollection;
322
326
  let overLastDroppableCollection;
323
327
  if (this.useGroups) {
324
- overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("over");
325
- overLastDroppableCollection = this._groupContainer.getElementsByClassName("last-droppable-space");
328
+ overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
329
+ overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
326
330
  }
327
331
  else {
328
- overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName("over");
329
- overLastDroppableCollection = this._itemContainer.getElementsByClassName("last-droppable-space");
332
+ overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
333
+ overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
330
334
  }
331
335
  if (overCollection) {
332
336
  Array.from(overCollection).forEach(function (element) {
333
- element.classList.remove("over");
337
+ element.classList.remove('over');
334
338
  });
335
339
  }
336
340
  if (overLastDroppableCollection) {
337
341
  Array.from(overLastDroppableCollection).forEach(function (element) {
338
- element.classList.remove("over");
342
+ element.classList.remove('over');
339
343
  });
340
344
  }
341
345
  }
342
346
  removeOverGroupClass(ev, group) {
343
347
  if (ev.target) {
344
- let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
345
- let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
348
+ let groupContainer = this._groupContainer.querySelector('div#' + this.getDivGroupId(group.group));
349
+ let groupOverlay = groupContainer.getElementsByClassName('group-overlay')[0];
346
350
  if (groupOverlay) {
347
- groupOverlay.classList.remove("presetedHeight");
348
- groupOverlay.setAttribute("style", "display:none");
351
+ groupOverlay.classList.remove('presetedHeight');
352
+ groupOverlay.setAttribute('style', 'display:none');
349
353
  }
350
354
  }
351
355
  }
@@ -410,7 +414,7 @@ const EzList = class {
410
414
  let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
411
415
  if (itemIndex != undefined && itemIndex != -1) {
412
416
  if (itemIndex === 0) {
413
- if ((groupIndex - 1 >= 0)) {
417
+ if (groupIndex - 1 >= 0) {
414
418
  item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
415
419
  }
416
420
  }
@@ -438,10 +442,10 @@ const EzList = class {
438
442
  this.getSelection().then(selectedItem => {
439
443
  if (selectedItem) {
440
444
  switch (event.key) {
441
- case "ArrowDown":
445
+ case 'ArrowDown':
442
446
  this.nextOption(selectedItem);
443
447
  break;
444
- case "ArrowUp":
448
+ case 'ArrowUp':
445
449
  this.previousOption(selectedItem);
446
450
  break;
447
451
  }
@@ -454,19 +458,19 @@ const EzList = class {
454
458
  }
455
459
  getItemId(itemLabel) {
456
460
  if (itemLabel) {
457
- return itemLabel.replace(/[^a-z0-9_]/gi, "_");
461
+ return itemLabel.replace(/[^a-z0-9_]/gi, '_');
458
462
  }
459
463
  return undefined;
460
464
  }
461
465
  getDivGroupId(groupName) {
462
466
  if (groupName) {
463
- return "group-" + groupName.replace(/[^a-z0-9_]/gi, "_");
467
+ return 'group-' + groupName.replace(/[^a-z0-9_]/gi, '_');
464
468
  }
465
469
  return undefined;
466
470
  }
467
471
  getGroupOverlayId(groupName) {
468
472
  if (groupName) {
469
- return "group-overlay-" + groupName.replace(/[^a-z0-9_]/gi, "_");
473
+ return 'group-overlay-' + groupName.replace(/[^a-z0-9_]/gi, '_');
470
474
  }
471
475
  return undefined;
472
476
  }
@@ -486,26 +490,26 @@ const EzList = class {
486
490
  onDragOverLastIndex(ev) {
487
491
  ev.preventDefault();
488
492
  if (this._dragStartItem) {
489
- ev.target.classList.add("over");
493
+ ev.target.classList.add('over');
490
494
  ev.stopPropagation();
491
495
  }
492
496
  }
493
497
  showOverlays(groupDragStart) {
494
- let groupOverlayCollection = this._groupContainer.getElementsByClassName("group-overlay");
498
+ let groupOverlayCollection = this._groupContainer.getElementsByClassName('group-overlay');
495
499
  Array.from(groupOverlayCollection).forEach(groupOverlay => {
496
500
  let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
497
- if (groupOverlayID && groupOverlay.getAttribute("id") && groupOverlayID != groupOverlay.getAttribute("id")) {
498
- groupOverlay.classList.add("presetedHeight");
499
- groupOverlay.setAttribute("style", "display:grid");
501
+ if (groupOverlayID && groupOverlay.getAttribute('id') && groupOverlayID != groupOverlay.getAttribute('id')) {
502
+ groupOverlay.classList.add('presetedHeight');
503
+ groupOverlay.setAttribute('style', 'display:grid');
500
504
  }
501
505
  });
502
506
  }
503
507
  hideOverlays() {
504
508
  var _a;
505
- let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("group-overlay");
509
+ let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('group-overlay');
506
510
  Array.from(groupOverlayCollection).forEach(groupOverlay => {
507
- groupOverlay.classList.remove("presetedHeight");
508
- groupOverlay.setAttribute("style", "display:none");
511
+ groupOverlay.classList.remove('presetedHeight');
512
+ groupOverlay.setAttribute('style', 'display:none');
509
513
  });
510
514
  }
511
515
  getContainerItemBuilder(item, group, className) {
@@ -516,30 +520,39 @@ const EzList = class {
516
520
  if (customContent == undefined) {
517
521
  return;
518
522
  }
519
- if (typeof customContent !== "string") {
520
- return (h("div", { class: className }, customContent));
523
+ if (typeof customContent !== 'string') {
524
+ return h("div", { class: className }, customContent);
521
525
  }
522
- return (h("div", { class: className, innerHTML: customContent }));
526
+ return h("div", { class: className, innerHTML: customContent });
523
527
  }
524
528
  render() {
525
- return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
526
- h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
527
- return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name", title: group.group }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => (h("li", Object.assign({ id: "item_" + this.getItemId(item.label), class: {
528
- "selectable-container": this.ezSelectable,
529
- "hover-feedback": this.hoverFeedback
530
- }, key: "item_" + this.getItemId(item.label) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils.replaceAccentuatedChars(item.label)}`) }), h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, this.listMode === "regular" ?
531
- h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label) :
532
- 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(item, group, "slot-item") : undefined))))), 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 ?
533
- h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)
534
- : undefined));
535
- }))
536
- :
537
- h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => (h("li", Object.assign({ id: "item_" + this.getItemId(item.label), class: {
538
- "selectable-container": this.ezSelectable,
539
- "hover-feedback": this.hoverFeedback
540
- }, key: "item_" + this.getItemId(item.label) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils.replaceAccentuatedChars(item.label)}`) }), h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.listMode === "regular" ?
541
- h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)) :
542
- h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, 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(item) : undefined)))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
529
+ return (h(Host, { ref: el => (this._element = el) }, this.useGroups ? (h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => {
530
+ this.keyDownHandler(event);
531
+ } }, this._listGroupItems.map(group => {
532
+ return (h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name", title: group.group }, group.group), h("section", { class: "section-container", onDragOver: ev => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => (h("li", Object.assign({ id: 'item_' + this.getItemId(item.label), class: {
533
+ 'selectable-container': this.ezSelectable,
534
+ 'hover-feedback': this.hoverFeedback,
535
+ }, key: 'item_' + this.getItemId(item.label) }, {
536
+ [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils.replaceAccentuatedChars(item.label)}`),
537
+ }), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onClick: () => {
538
+ this.setSelection(item);
539
+ }, onDragLeave: () => {
540
+ group.sort ? undefined : this.removeOverClass();
541
+ }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: event => {
542
+ group.sort ? undefined : this.onDragOverItem(event);
543
+ }, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)) : (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(item, group, 'slot-item') : undefined))))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
544
+ this.onDragOverLastIndex(event);
545
+ }, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
546
+ }))) : (h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
547
+ this.keyDownHandler(event);
548
+ } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => (h("li", Object.assign({ id: 'item_' + this.getItemId(item.label), class: {
549
+ 'selectable-container': this.ezSelectable,
550
+ 'hover-feedback': this.hoverFeedback,
551
+ }, key: 'item_' + this.getItemId(item.label) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils.replaceAccentuatedChars(item.label)}`) }), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => {
552
+ this.setSelection(item);
553
+ }, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.listMode === 'regular' ? (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, 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(item) : undefined)))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
554
+ this.onDragOverLastIndex(event);
555
+ }, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
543
556
  }
544
557
  };
545
558
  EzList.style = ezListCss;
@@ -17,7 +17,7 @@ var ModalButtonStatus;
17
17
  })(ModalButtonStatus || (ModalButtonStatus = {}));
18
18
  const ModalButtonStatus$1 = ModalButtonStatus;
19
19
 
20
- const ezModalContainerCss = ".sc-ez-modal-container-h{display:grid;grid-template-rows:0 auto 1fr auto;width:100%;height:100%}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{overflow-y:auto;overflow-x:clip}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
20
+ const ezModalContainerCss = ".sc-ez-modal-container-h{display:grid;grid-template-rows:0 auto 1fr auto;width:100%;height:100%;--ez-modal-container__content--subtract-height:154px}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{display:flex;overflow-y:auto;overflow-x:clip;height:calc(100vh - var(--ez-modal-container__content--subtract-height))}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;width:0px;background-color:transparent;border:none}.ez-modal-container__footer.sc-ez-modal-container{padding-top:var(--space--small, 6px)}";
21
21
 
22
22
  const EzModalContainer = class {
23
23
  constructor(hostRef) {
@@ -52,7 +52,7 @@ const EzModalContainer = class {
52
52
  this._closeButton.focus();
53
53
  }
54
54
  render() {
55
- return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-flex ez-flex--justify-end" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
55
+ return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-flex ez-flex--justify-end ez-modal-container__footer" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
56
56
  }
57
57
  };
58
58
  EzModalContainer.style = ezModalContainerCss;
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-6fbf1820.js';
2
2
  import { FloatingManager } from '@sankhyalabs/core';
3
3
 
4
- const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
4
+ const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
5
5
 
6
6
  const EzModal = class {
7
7
  constructor(hostRef) {
@@ -0,0 +1,177 @@
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-6fbf1820.js';
2
+ import { ArrayUtils } from '@sankhyalabs/core';
3
+
4
+ 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;top:-12px;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)}";
5
+
6
+ var ViewScenarios;
7
+ (function (ViewScenarios) {
8
+ ViewScenarios["DATASOURCE_RESULTS"] = "DATASOURCE_RESULTS";
9
+ ViewScenarios["DATASOURCE_RESULTS_EMPTY"] = "DATASOURCE_RESULTS_EMPTY";
10
+ ViewScenarios["DATASOURCE_INIT"] = "DATASOURCE_INIT";
11
+ ViewScenarios["OPTIONS_EMPTY"] = "OPTIONS_EMPTY";
12
+ ViewScenarios["OPTIONS"] = "OPTIONS";
13
+ })(ViewScenarios || (ViewScenarios = {}));
14
+ const EzMuiltiSelectionList = class {
15
+ constructor(hostRef) {
16
+ registerInstance(this, hostRef);
17
+ this.changeFilteredOptions = createEvent(this, "changeFilteredOptions", 7);
18
+ this.columnName = undefined;
19
+ this.dataSource = undefined;
20
+ this.useOptions = false;
21
+ this.options = undefined;
22
+ this.filteredOptions = undefined;
23
+ this.displayOptions = undefined;
24
+ this.viewScenario = undefined;
25
+ this.displayOptionToCheckAllItems = true;
26
+ }
27
+ async clearFilteredOptions() {
28
+ this.setInitialScenario();
29
+ this.filteredOptions = [];
30
+ if (this.searchInput) {
31
+ this.searchInput.value = '';
32
+ }
33
+ if (this.filterInput) {
34
+ this.filterInput.value = '';
35
+ }
36
+ }
37
+ onChangeUseOptions() {
38
+ this.setInitialScenario();
39
+ }
40
+ onChangeOptions() {
41
+ if (this.options) {
42
+ this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.options);
43
+ }
44
+ this.checkInput && this.changeCheckAllValeuFromFilteredOptions();
45
+ this.setInitialScenario();
46
+ }
47
+ onChangeFilteredOptions(optionsListUpdated) {
48
+ this.displayOptions = this.filteredOptions;
49
+ this.displayOptionToCheckAllItems = this.filteredOptions.length > 1;
50
+ this.checkInput && this.changeCheckAllValeuFromFilteredOptions();
51
+ this.changeFilteredOptions.emit(optionsListUpdated);
52
+ }
53
+ componentDidRender() {
54
+ this.changeCheckAllValeuFromFilteredOptions();
55
+ }
56
+ ordenationByCheckStateAndAlphabetically(filteredOptions) {
57
+ const listWithSelectChecked = [];
58
+ const listWithNotSelectChecked = [];
59
+ filteredOptions.forEach(item => (item.check ? listWithSelectChecked.push(item) : listWithNotSelectChecked.push(item)));
60
+ return [...ArrayUtils.sortAlphabetically(listWithSelectChecked), ...ArrayUtils.sortAlphabetically(listWithNotSelectChecked)];
61
+ }
62
+ changeCheckAllValeuFromFilteredOptions() {
63
+ var _a, _b, _c, _d;
64
+ const selectAll = (_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.every(item => item.check === true);
65
+ const notSelectAll = (_b = this.filteredOptions) === null || _b === void 0 ? void 0 : _b.every(item => item.check === false);
66
+ const selectIndeterminated = ((_c = this.filteredOptions) === null || _c === void 0 ? void 0 : _c.some(item => item.check === false)) && ((_d = this.filteredOptions) === null || _d === void 0 ? void 0 : _d.some(item => item.check === true)) && (!selectAll || !notSelectAll);
67
+ if (this.checkInput && selectAll) {
68
+ this.checkInput.indeterminate = false;
69
+ this.checkInput.value = true;
70
+ return;
71
+ }
72
+ if (this.checkInput && selectIndeterminated) {
73
+ this.checkInput.indeterminate = true;
74
+ this.checkInput.value = false;
75
+ return;
76
+ }
77
+ if (this.checkInput && notSelectAll) {
78
+ this.checkInput.indeterminate = false;
79
+ this.checkInput.value = false;
80
+ return;
81
+ }
82
+ }
83
+ setInitialScenario() {
84
+ if (this.useOptions) {
85
+ this.viewScenario = ViewScenarios.OPTIONS;
86
+ this.changeCheckAllValeuFromFilteredOptions();
87
+ return;
88
+ }
89
+ this.viewScenario = this.options && this.options.length > 0 ? ViewScenarios.DATASOURCE_RESULTS : ViewScenarios.DATASOURCE_INIT;
90
+ }
91
+ async searchWithDataSource(searchArgument, fieldName) {
92
+ const { argument, mode } = searchArgument;
93
+ if (mode !== 'PRELOAD') {
94
+ return this.dataSource.fetchData(argument, fieldName);
95
+ }
96
+ }
97
+ handleSearchOnDataSource(event) {
98
+ var _a;
99
+ const optionsToSort = (_a = this.filteredOptions) !== null && _a !== void 0 ? _a : [];
100
+ if (event.detail && !optionsToSort.some(item => item.value == event.detail.value)) {
101
+ this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
102
+ }
103
+ this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
104
+ }
105
+ handleRemoveItemFromOptions(item) {
106
+ this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
107
+ if (this.filteredOptions.length === 0) {
108
+ this.viewScenario = ViewScenarios.DATASOURCE_INIT;
109
+ }
110
+ if (this.searchInput) {
111
+ this.searchInput.value = '';
112
+ }
113
+ }
114
+ handleSearchOnOption(event) {
115
+ if (event.detail) {
116
+ this.displayOptions = ArrayUtils.applyStringFilter(event.detail, this.filteredOptions, true);
117
+ this.viewScenario = this.displayOptions.length === 0 ? ViewScenarios.OPTIONS_EMPTY : ViewScenarios.OPTIONS;
118
+ return;
119
+ }
120
+ this.displayOptions = this.filteredOptions;
121
+ this.viewScenario = ViewScenarios.OPTIONS;
122
+ }
123
+ handleChangeSelectAllItems(event) {
124
+ this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([
125
+ ...this.filteredOptions.map(item => {
126
+ item.check = !!event.detail;
127
+ return item;
128
+ }),
129
+ ]);
130
+ }
131
+ handleChangeSelectedItem(event) {
132
+ const { detail: itemCheckSelected } = event;
133
+ this.filteredOptions = this.filteredOptions.map(item => {
134
+ if (item.label === itemCheckSelected.label) {
135
+ return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
136
+ }
137
+ return item;
138
+ });
139
+ this.clearInputs();
140
+ }
141
+ clearInputs() {
142
+ this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
143
+ }
144
+ buildViewList(hasDelete) {
145
+ return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
146
+ }
147
+ buildDeleteIconSlot(item) {
148
+ return h("ez-icon", { style: { cursor: 'pointer' }, iconName: "delete", onClick: () => this.handleRemoveItemFromOptions(item) });
149
+ }
150
+ buildInitViewWithDataSource() {
151
+ return h("multi-selection-box-message", { message: "Selecione os valores a serem filtrados atrav\u00E9s do campo de busca." });
152
+ }
153
+ buildViewEmptyResults() {
154
+ return h("multi-selection-box-message", { message: "Nenhum resultado encontrado." });
155
+ }
156
+ scenarioToDisplay(view) {
157
+ const scenarios = {
158
+ [ViewScenarios.DATASOURCE_INIT]: this.buildInitViewWithDataSource(),
159
+ [ViewScenarios.DATASOURCE_RESULTS]: this.buildViewList(true),
160
+ [ViewScenarios.DATASOURCE_RESULTS_EMPTY]: this.buildViewEmptyResults(),
161
+ [ViewScenarios.OPTIONS_EMPTY]: this.buildViewEmptyResults(),
162
+ [ViewScenarios.OPTIONS]: this.buildViewList(false),
163
+ };
164
+ return scenarios[view];
165
+ }
166
+ render() {
167
+ return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
168
+ }
169
+ static get watchers() { return {
170
+ "useOptions": ["onChangeUseOptions"],
171
+ "options": ["onChangeOptions"],
172
+ "filteredOptions": ["onChangeFilteredOptions"]
173
+ }; }
174
+ };
175
+ EzMuiltiSelectionList.style = ezMultiSelectionListCss;
176
+
177
+ export { EzMuiltiSelectionList as ez_multi_selection_list };