@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-75065.0 → 0.0.0-bugfix-dev-KB-83282.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 (62) hide show
  1. package/dist/cjs/ez-badge.cjs.entry.js +2 -14
  2. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +387 -0
  3. package/dist/cjs/ez-combo-box.cjs.entry.js +58 -184
  4. package/dist/cjs/ez-grid.cjs.entry.js +58 -0
  5. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +186 -0
  7. package/dist/cjs/{ez-multi-selection-list_2.cjs.entry.js → ez-popover-core_2.cjs.entry.js} +115 -196
  8. package/dist/cjs/ezui.cjs.js +1 -1
  9. package/dist/cjs/index-a7b0c73d.js +8 -4
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +2 -0
  12. package/dist/collection/components/ez-badge/ez-badge.css +1 -12
  13. package/dist/collection/components/ez-badge/ez-badge.js +1 -31
  14. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
  15. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
  16. package/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -250
  17. package/dist/collection/components/ez-combo-box/ez-combo-box.js +61 -194
  18. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +3 -0
  19. package/dist/collection/components/ez-grid/ez-grid.js +56 -1
  20. package/dist/collection/components/ez-icon/ez-icon.css +4 -1
  21. package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +0 -64
  22. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +47 -127
  23. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
  24. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +468 -0
  25. package/dist/custom-elements/index.d.ts +12 -0
  26. package/dist/custom-elements/index.js +395 -219
  27. package/dist/esm/ez-badge.entry.js +2 -14
  28. package/dist/esm/ez-combo-box-list_3.entry.js +381 -0
  29. package/dist/esm/ez-combo-box.entry.js +59 -185
  30. package/dist/esm/ez-grid.entry.js +59 -1
  31. package/dist/esm/ez-icon.entry.js +1 -1
  32. package/dist/esm/ez-multi-selection-list.entry.js +182 -0
  33. package/dist/esm/{ez-multi-selection-list_2.entry.js → ez-popover-core_2.entry.js} +116 -197
  34. package/dist/esm/ezui.js +1 -1
  35. package/dist/esm/index-baa5e267.js +8 -4
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/ezui/ezui.esm.js +1 -1
  38. package/dist/ezui/p-3a009184.entry.js +1 -0
  39. package/dist/ezui/{p-a5950a0d.entry.js → p-53116373.entry.js} +46 -46
  40. package/dist/ezui/p-56fe5341.entry.js +1 -0
  41. package/dist/ezui/p-650e4b6d.entry.js +1 -0
  42. package/dist/ezui/p-7bd15498.entry.js +1 -0
  43. package/dist/ezui/p-dc73e1fe.entry.js +1 -0
  44. package/dist/ezui/p-f5931caa.entry.js +1 -0
  45. package/dist/types/components/ez-badge/ez-badge.d.ts +0 -5
  46. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
  47. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -16
  48. package/dist/types/components/ez-grid/ez-grid.d.ts +5 -0
  49. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +6 -19
  50. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +81 -0
  51. package/dist/types/components.d.ts +218 -11
  52. package/package.json +1 -1
  53. package/react/components.d.ts +2 -0
  54. package/react/components.js +2 -0
  55. package/react/components.js.map +1 -1
  56. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -236
  57. package/dist/esm/ez-custom-form-input_2.entry.js +0 -231
  58. package/dist/ezui/p-0ca05a2f.entry.js +0 -1
  59. package/dist/ezui/p-64b461b3.entry.js +0 -1
  60. package/dist/ezui/p-cdac80f1.entry.js +0 -1
  61. package/dist/ezui/p-dc8b36c3.entry.js +0 -1
  62. package/dist/ezui/p-e75c7a23.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e,h as o,H as n,g as t}from"./p-23a36bb6.js";import{StringUtils as c,ElementIDUtils as i}from"@sankhyalabs/core";const a=class{constructor(o){e(this,o),this.size="medium",this.href=void 0,this.iconName=void 0}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):c.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}componentDidLoad(){i.addIDInfo(this._hostElement,"icon")}render(){return o(n,null,this.getIconContent())}get _hostElement(){return t(this)}};a.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:"\\ea01"}.ez-icon-2chevron-up:before{content:"\\ea02"}.ez-icon-acao:before{content:"\\ea03"}.ez-icon-account-outline:before{content:"\\ea04"}.ez-icon-account:before{content:"\\ea05"}.ez-icon-add-to-cart:before{content:"\\ea06"}.ez-icon-alert-circle-inverted:before{content:"\\ea07"}.ez-icon-alert-circle:before{content:"\\ea08"}.ez-icon-alert-mail:before{content:"\\ea09"}.ez-icon-alert-popup:before{content:"\\ea0a"}.ez-icon-anexo:before{content:"\\ea0b"}.ez-icon-antecipação:before{content:"\\ea0c"}.ez-icon-apps:before{content:"\\ea0d"}.ez-icon-arrow-forward:before{content:"\\ea0e"}.ez-icon-arrow-upward:before{content:"\\ea0f"}.ez-icon-arrow_back:before{content:"\\ea10"}.ez-icon-arrow_downward:before{content:"\\ea11"}.ez-icon-baixa:before{content:"\\ea12"}.ez-icon-balance:before{content:"\\ea13"}.ez-icon-bell-inverted:before{content:"\\ea14"}.ez-icon-bell:before{content:"\\ea15"}.ez-icon-boleto:before{content:"\\ea16"}.ez-icon-boolean:before{content:"\\ea17"}.ez-icon-business-center:before{content:"\\ea18"}.ez-icon-calendar-clock:before{content:"\\ea19"}.ez-icon-calendar:before{content:"\\ea1a"}.ez-icon-cart-history:before{content:"\\ea1b"}.ez-icon-cash-remove:before{content:"\\ea1c"}.ez-icon-check-circle-inverted:before{content:"\\ea1d"}.ez-icon-check-circle:before{content:"\\ea1e"}.ez-icon-check:before{content:"\\ea1f"}.ez-icon-chevron-down:before{content:"\\ea20"}.ez-icon-chevron-left:before{content:"\\ea21"}.ez-icon-chevron-right:before{content:"\\ea22"}.ez-icon-chevron-up:before{content:"\\ea23"}.ez-icon-circle--medium:before{content:"\\ea24"}.ez-icon-circle:before{content:"\\ea25"}.ez-icon-clean-cart:before{content:"\\ea26"}.ez-icon-cleaning:before{content:"\\ea27"}.ez-icon-clipboard:before{content:"\\ea28"}.ez-icon-clock-rotate-left:before{content:"\\ea29"}.ez-icon-close:before{content:"\\ea2a"}.ez-icon-cobrar:before{content:"\\ea2b"}.ez-icon-code:before{content:"\\ea2c"}.ez-icon-configuration:before{content:"\\ea2d"}.ez-icon-content-cut:before{content:"\\ea2e"}.ez-icon-copy:before{content:"\\ea2f"}.ez-icon-credit_card:before{content:"\\ea30"}.ez-icon-crop:before{content:"\\ea31"}.ez-icon-custom:before{content:"\\ea32"}.ez-icon-delete-file:before{content:"\\ea33"}.ez-icon-delete:before{content:"\\ea34"}.ez-icon-description:before{content:"\\ea35"}.ez-icon-dividir:before{content:"\\ea36"}.ez-icon-docx:before{content:"\\ea37"}.ez-icon-dot-notification:before{content:"\\ea38"}.ez-icon-dots-horizontal:before{content:"\\ea39"}.ez-icon-dots-vertical:before{content:"\\ea3a"}.ez-icon-drag-indicator:before{content:"\\ea3b"}.ez-icon-dual-chevron-down:before{content:"\\ea3c"}.ez-icon-dual-chevron-left:before{content:"\\ea3d"}.ez-icon-dual-chevron-right:before{content:"\\ea3e"}.ez-icon-dual-chevron-up:before{content:"\\ea3f"}.ez-icon-edit-file:before{content:"\\ea40"}.ez-icon-edit-table:before{content:"\\ea41"}.ez-icon-edit-time:before{content:"\\ea42"}.ez-icon-edit-value:before{content:"\\ea43"}.ez-icon-edit:before{content:"\\ea44"}.ez-icon-email:before{content:"\\ea45"}.ez-icon-estorno:before{content:"\\ea46"}.ez-icon-exe:before{content:"\\ea47"}.ez-icon-expand:before{content:"\\ea48"}.ez-icon-expandir_card:before{content:"\\ea49"}.ez-icon-extrato:before{content:"\\ea4a"}.ez-icon-eye-off:before{content:"\\ea4b"}.ez-icon-eye:before{content:"\\ea4c"}.ez-icon-favorite:before{content:"\\ea4d"}.ez-icon-figma:before{content:"\\ea4e"}.ez-icon-file-download:before{content:"\\ea4f"}.ez-icon-file-upload:before{content:"\\ea50"}.ez-icon-filter:before{content:"\\ea51"}.ez-icon-find-file:before{content:"\\ea52"}.ez-icon-find-page:before{content:"\\ea53"}.ez-icon-format-color-fill:before{content:"\\ea54"}.ez-icon-generic:before{content:"\\ea55"}.ez-icon-gif:before{content:"\\ea56"}.ez-icon-graph_bar:before{content:"\\ea57"}.ez-icon-handshake:before{content:"\\ea58"}.ez-icon-help-inverted:before{content:"\\ea59"}.ez-icon-help:before{content:"\\ea5a"}.ez-icon-hide-list:before{content:"\\ea5b"}.ez-icon-hide_menu:before{content:"\\ea5c"}.ez-icon-hierarchical-tree:before{content:"\\ea5d"}.ez-icon-home:before{content:"\\ea5e"}.ez-icon-icons104:before{content:"\\ea5f"}.ez-icon-language:before{content:"\\ea60"}.ez-icon-launch:before{content:"\\ea61"}.ez-icon-lightbulb:before{content:"\\ea62"}.ez-icon-list:before{content:"\\ea63"}.ez-icon-location:before{content:"\\ea64"}.ez-icon-lock-outline:before{content:"\\ea65"}.ez-icon-lock:before{content:"\\ea66"}.ez-icon-menu:before{content:"\\ea67"}.ez-icon-mid:before{content:"\\ea68"}.ez-icon-minus:before{content:"\\ea69"}.ez-icon-money-off:before{content:"\\ea6a"}.ez-icon-money:before{content:"\\ea6b"}.ez-icon-more:before{content:"\\ea6c"}.ez-icon-mp3:before{content:"\\ea6d"}.ez-icon-mp4:before{content:"\\ea6e"}.ez-icon-multiple-files:before{content:"\\ea6f"}.ez-icon-north-west:before{content:"\\ea70"}.ez-icon-number:before{content:"\\ea71"}.ez-icon-ordem-ascendente:before{content:"\\ea72"}.ez-icon-ordem-descendente:before{content:"\\ea73"}.ez-icon-parcelar:before{content:"\\ea74"}.ez-icon-pause:before{content:"\\ea75"}.ez-icon-payments:before{content:"\\ea76"}.ez-icon-pdf:before{content:"\\ea77"}.ez-icon-play:before{content:"\\ea78"}.ez-icon-plus:before{content:"\\ea79"}.ez-icon-png:before{content:"\\ea7a"}.ez-icon-power:before{content:"\\ea7b"}.ez-icon-pptx:before{content:"\\ea7c"}.ez-icon-preview:before{content:"\\ea7d"}.ez-icon-print:before{content:"\\ea7e"}.ez-icon-push-pin:before{content:"\\ea7f"}.ez-icon-rateio:before{content:"\\ea80"}.ez-icon-receipt:before{content:"\\ea81"}.ez-icon-recolher_card:before{content:"\\ea82"}.ez-icon-remove-from-cart:before{content:"\\ea83"}.ez-icon-restore:before{content:"\\ea84"}.ez-icon-return:before{content:"\\ea85"}.ez-icon-sankhya-place:before{content:"\\ea86"}.ez-icon-save:before{content:"\\ea87"}.ez-icon-search:before{content:"\\ea88"}.ez-icon-settings-inverted:before{content:"\\ea89"}.ez-icon-settings:before{content:"\\ea8a"}.ez-icon-share:before{content:"\\ea8b"}.ez-icon-shield:before{content:"\\ea8c"}.ez-icon-show-list:before{content:"\\ea8d"}.ez-icon-show_menu:before{content:"\\ea8e"}.ez-icon-south-east:before{content:"\\ea8f"}.ez-icon-sync:before{content:"\\ea90"}.ez-icon-table:before{content:"\\ea91"}.ez-icon-tag_code:before{content:"\\ea92"}.ez-icon-text:before{content:"\\ea93"}.ez-icon-timeline:before{content:"\\ea94"}.ez-icon-timer-outline:before{content:"\\ea95"}.ez-icon-trending-up:before{content:"\\ea96"}.ez-icon-tune:before{content:"\\ea97"}.ez-icon-txt:before{content:"\\ea98"}.ez-icon-un-pin:before{content:"\\ea99"}.ez-icon-unfold_less:before{content:"\\ea9a"}.ez-icon-unfold_more:before{content:"\\ea9b"}.ez-icon-user-circle:before{content:"\\ea9c"}.ez-icon-warning-outline:before{content:"\\ea9d"}.ez-icon-warning_triangle:before{content:"\\ea9e"}.ez-icon-whatshot:before{content:"\\ea9f"}.ez-icon-xlsx:before{content:"\\eaa0"}.ez-icon-zip:before{content:"\\eaa1"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';export{a as ez_icon}
@@ -0,0 +1 @@
1
+ import{r as e,h as a,H as t,g as i}from"./p-23a36bb6.js";import{ElementIDUtils as d}from"@sankhyalabs/core";var s;!function(e){e.EXTRA_LARGE="extra-large",e.LARGE="large",e.MEDIUM="medium",e.SMALL_MEDIUM="small-medium",e.SMALL="small",e.EXTRA_SMALL="extra-small"}(s||(s={}));const n=class{constructor(a){e(this,a),this._sizes={[s.EXTRA_LARGE]:{sufix:"xl"},[s.LARGE]:{sufix:"lg"},[s.MEDIUM]:{sufix:"md"},[s.SMALL_MEDIUM]:{sufix:"sm"},[s.SMALL]:{sufix:"xs"},[s.EXTRA_SMALL]:{sufix:"2xs"}},this.hasSlot=!1,this.size="small",this.label=void 0,this.iconLeft=void 0,this.iconRight=void 0,this.position={horizontal:"right",vertical:"top"}}getIconSize(){switch(this.size){case"large":return"large";case"medium":case"small-medium":return"small";case"small":return"x-small";default:return null}}componentDidLoad(){this._element&&d.addIDInfo(this._element),this._badge&&d.addIDInfo(this._badge,"ezBadge",{id:"embedded"})}handleSlotChange(){this.hasSlot=!0}validateIconLeft(){return this.iconLeft&&""!==this.iconLeft.trim()}validateIconRight(){return this.iconRight&&""!==this.iconRight.trim()}validateLabel(){return this.label&&""!==this.label.trim()}createContainerClassName(){let e=this._sizes[this.size].sufix,a=["badge__content"];return this.hasSlot&&(a.push("badge__content--fill-"+e),"bottom"==this.position.vertical&&"right"==this.position.horizontal&&a.push("badge__content--fill-bottom-right"),"bottom"==this.position.vertical&&"left"==this.position.horizontal&&a.push("badge__content--fill-bottom-left"),"top"==this.position.vertical&&"right"==this.position.horizontal&&a.push("badge__content--fill-top-right"),"top"==this.position.vertical&&"left"==this.position.horizontal&&a.push("badge__content--fill-top-left")),a.push(this.label?"badge__content--text-"+e:this.iconLeft||this.iconRight?"badge__content--icon-"+e:"badge__content--fill-"+e),a.join(" ")}render(){return a(t,null,a("div",{class:"badge"},a("div",null,a("slot",{name:"child-badge",onSlotchange:()=>{this.handleSlotChange()}})),a("div",{class:this.createContainerClassName(),ref:e=>this._badge=e},this.validateIconLeft()&&a("ez-icon",{class:"icon",iconName:this.iconLeft,size:this.getIconSize()}),this.validateLabel()&&a("label",{title:this.label},this.label),this.validateIconRight()&&a("ez-icon",{class:"icon",iconName:this.iconRight,size:this.getIconSize()}))))}get _element(){return i(this)}};n.style=":host{--ez-badge--size-2xs:var(--space--2xs, 8px);--ez-badge--size-xs:var(--space--xs, 12px);--ez-badge--size-sm:var(--space--sm, 16px);--ez-badge--size-md:var(--space--md, 20px);--ez-badge--size-lg:var(--space--lg, 24px);--ez-badge--size-xl:var(--space--xl, 32px);--ez-badge--padding-2xs:0;--ez-badge--padding-xs:var(--space--nano, 2px);--ez-badge--padding-sm:calc(var(--space--nano, 2px) + 1px);--ez-badge--padding-md:var(--space--3xs, 4px);--ez-badge--padding-lg:calc(var(--space--3xs, 4px) + 2px);--ez-badge--padding-xl:var(--space--2xs);--ez-badge--border-radius:calc(var(--border--radius-medium, 12px) + 8px);--ez-badge--font-family:var(--font-pattern, Roboto);--ez-badge--font-weight-medium:var(--text-weight--medium, 400);--ez-badge--background-color:var(--color--primary, #008561);--ez-badge--border-none:0;--ez-badge--color:var(--text--inverted, #ffffff);--ez-badge--gap:calc(var(--ez-badge--padding-xs) + 1px);--ez-badge--font-size-md:var(--text--medium);--ez-badge--font-size-sm:var(--text--medium);--ez-badge--font-size-xs:var(--text--small)}ez-icon{--ez-icon--color:inherit}.badge{display:flex;justify-content:center;align-items:center;position:relative}.badge__content{font-family:var(--ez-badge--font-family, Roboto);font-weight:var(--ez-badge--font-weight-medium, 400);background-color:var(--ez-badge--background-color, #008561);border:var(--ez-badge--border-none, 0);color:var(--ez-badge--color, #ffffff);border-radius:var(--ez-badge--border-radius, 20px);gap:var(--ez-badge--gap, 3px);display:flex;justify-content:center;align-items:center}.badge__content--fill-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px)}.badge__content--fill-2xs{height:var(--ez-badge--size-2xs, 8px);min-width:var(--ez-badge--size-2xs, 8px)}.badge__content--text-md{height:calc(var(--ez-badge--size-md, 20px) - 2px);min-width:var(--ez-badge--size-sm, 20px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-md)}.badge__content--text-sm{height:calc(var(--ez-badge--size-sm, 16px) - 2px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-sm)}.badge__content--text-xs{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-2xs);padding-bottom:var(--ez-badge--padding-2xs);padding-right:var(--ez-badge--padding-lg);padding-left:var(--ez-badge--padding-lg);font-size:var(--ez-badge--font-size-xs)}.badge__content--icon-lg{height:var(--ez-badge--size-lg, 24px);min-width:var(--ez-badge--size-lg, 24px);padding:var(--ez-badge--padding-md)}.badge__content--icon-md{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-md)}.badge__content--icon-sm{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-xs)}.badge__content--icon-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px);padding:var(--ez-badge--padding-xs)}.badge__content--fill{position:absolute;top:0;inset-inline-end:0;z-index:var(--most-visible, 2)}.badge__content--fill-top-right{transform:translate(50%, -50%);position:absolute;top:0;right:0}.badge__content--fill-top-left{transform:translate(-50%, -50%);position:absolute;top:0;left:0}.badge__content--fill-bottom-left{transform:translate(-50%, 50%);position:absolute;bottom:0;left:0}.badge__content--fill-bottom-right{transform:translate(50%, 50%);position:absolute;bottom:0;right:0}";export{n as ez_badge}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as n,H as o,g as i}from"./p-23a36bb6.js";const r=Math.min,s=Math.max,a=Math.round,c=t=>({x:t,y:t}),l={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function h(t,e,n){return s(t,r(e,n))}function f(t,e){return"function"==typeof t?t(e):t}function d(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function v(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}function b(t){return["top","bottom"].includes(d(t))?"y":"x"}function m(t){return v(b(t))}function x(t){return t.replace(/start|end/g,(t=>u[t]))}function g(t){return t.replace(/left|right|bottom|top/g,(t=>l[t]))}function w(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function _(t,e,n){let{reference:o,floating:i}=t;const r=b(e),s=m(e),a=y(s),c=d(e),l="y"===r,u=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,f=o[a]/2-i[a]/2;let v;switch(c){case"top":v={x:u,y:o.y-i.height};break;case"bottom":v={x:u,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:h};break;case"left":v={x:o.x-i.width,y:h};break;default:v={x:o.x,y:o.y}}switch(p(e)){case"start":v[s]-=f*(n&&l?-1:1);break;case"end":v[s]+=f*(n&&l?-1:1)}return v}async function z(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:p=0}=f(e,t),v=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),y=a[d?"floating"===h?"reference":"floating":h],b=w(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(y)))||n?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),m="floating"===h?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),g=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},_=w(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:x,strategy:c}):m);return{top:(b.top-_.top+v.top)/g.y,bottom:(_.bottom-b.bottom+v.bottom)/g.y,left:(b.left-_.left+v.left)/g.x,right:(_.right-b.right+v.right)/g.x}}function k(){return"undefined"!=typeof window}function O(t){return S(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function R(t){var e;return null==(e=(S(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function S(t){return!!k()&&(t instanceof Node||t instanceof P(t).Node)}function A(t){return!!k()&&(t instanceof Element||t instanceof P(t).Element)}function C(t){return!!k()&&(t instanceof HTMLElement||t instanceof P(t).HTMLElement)}function T(t){return!(!k()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof P(t).ShadowRoot)}function D(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function E(t){return["table","td","th"].includes(O(t))}function L(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function j(t){const e=F(),n=A(t)?B(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(O(t))}function B(t){return P(t).getComputedStyle(t)}function M(t){return A(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if("html"===O(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||R(t);return T(e)?e.host:e}function N(t){const e=$(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:C(e)&&D(e)?e:N(e)}function V(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=N(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=P(i);if(r){const t=H(s);return e.concat(s,s.visualViewport||[],D(i)?i:[],t&&n?V(t):[])}return e.concat(i,V(i,[],n))}function H(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function U(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=C(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=a(n)!==r||a(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function W(t){return A(t)?t:t.contextElement}function X(t){const e=W(t);if(!C(e))return c(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=U(e);let s=(r?a(n.width):n.width)/o,l=(r?a(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Y=c(0);function q(t){const e=P(t);return F()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Y}function I(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=W(t);let s=c(1);e&&(o?A(o)&&(s=X(o)):s=X(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==P(t))&&e}(r,n,o)?q(r):c(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,h=i.width/s.x,f=i.height/s.y;if(r){const t=P(r),e=o&&A(o)?P(o):o;let n=t,i=H(n);for(;i&&o&&e!==n;){const t=X(i),e=i.getBoundingClientRect(),o=B(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,u*=t.y,h*=t.x,f*=t.y,l+=r,u+=s,n=P(i),i=H(n)}}return w({width:h,height:f,x:l,y:u})}function J(t,e){const n=M(t).scrollLeft;return e?e.left+n:I(R(t)).left+n}function K(t,e,n){void 0===n&&(n=!1);const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-(n?0:J(t,o)),y:o.top+e.scrollTop}}function Q(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=P(t),o=R(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const t=F();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=R(t),n=M(t),o=t.ownerDocument.body,i=s(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=s(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+J(t);const c=-n.scrollTop;return"rtl"===B(o).direction&&(a+=s(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:c}}(R(t));else if(A(e))o=function(t,e){const n=I(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=C(t)?X(t):c(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=q(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return w(o)}function Z(t,e){const n=$(t);return!(n===e||!A(n)||G(n))&&("fixed"===B(n).position||Z(n,e))}function tt(t,e,n){const o=C(e),i=R(e),r="fixed"===n,s=I(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=c(0);if(o||!o&&!r)if(("body"!==O(e)||D(i))&&(a=M(e)),o){const t=I(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=J(i));const u=!i||o||r?c(0):K(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function et(t){return"static"===B(t).position}function nt(t,e){if(!C(t)||"fixed"===B(t).position)return null;if(e)return e(t);let n=t.offsetParent;return R(t)===n&&(n=n.ownerDocument.body),n}function ot(t,e){const n=P(t);if(L(t))return n;if(!C(t)){let e=$(t);for(;e&&!G(e);){if(A(e)&&!et(e))return e;e=$(e)}return n}let o=nt(t,e);for(;o&&E(o)&&et(o);)o=nt(o,e);return o&&G(o)&&et(o)&&!j(o)?n:o||function(t){let e=$(t);for(;C(e)&&!G(e);){if(j(e))return e;if(L(e))return null;e=$(e)}return null}(t)||n}const it={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=R(o),a=!!e&&L(e.floating);if(o===s||a&&r)return n;let l={scrollLeft:0,scrollTop:0},u=c(1);const h=c(0),f=C(o);if((f||!f&&!r)&&(("body"!==O(o)||D(s))&&(l=M(o)),C(o))){const t=I(o);u=X(o),h.x=t.x+o.clientLeft,h.y=t.y+o.clientTop}const d=!s||f||r?c(0):K(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+h.x+d.x,y:n.y*u.y-l.scrollTop*u.y+h.y+d.y}},getDocumentElement:R,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[..."clippingAncestors"===n?L(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=V(t,[],!1).filter((t=>A(t)&&"body"!==O(t))),i=null;const r="fixed"===B(t).position;let s=r?$(t):t;for(;A(s)&&!G(s);){const e=B(s),n=j(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||D(s)&&!n&&Z(t,s))?o=o.filter((t=>t!==s)):i=e,s=$(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],c=a.reduce(((t,n)=>{const o=Q(e,n,i);return t.top=s(o.top,t.top),t.right=r(o.right,t.right),t.bottom=r(o.bottom,t.bottom),t.left=s(o.left,t.left),t}),Q(e,a[0],i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:ot,getElementRects:async function(t){const e=this.getOffsetParent||ot,n=this.getDimensions,o=await n(t.floating);return{reference:tt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=U(t);return{width:e,height:n}},getScale:X,isElement:A,isRTL:function(t){return"rtl"===B(t).direction}},rt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=f(t,e),l={x:n,y:o},u=await z(e,c),p=b(d(i)),y=v(p);let m=l[y],x=l[p];r&&(m=h(m+u["y"===y?"top":"left"],m,m-u["y"===y?"bottom":"right"])),s&&(x=h(x+u["y"===p?"top":"left"],x,x-u["y"===p?"bottom":"right"]));const g=a.fn({...e,[y]:m,[p]:x});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[y]:r,[p]:s}}}}}},st=class{constructor(n){t(this,n),this.ezVisibilityChange=e(this,"ezVisibilityChange",7),this.TIME_DEBOUNCE=500,this.autoClose=!0,this.boxWidth="fit-content",this.opened=!1,this.overlayType="light",this.anchorElement=void 0,this.options={horizontalGap:0,verticalGap:0,fromRight:!1}}async observeOpened(t,e){t!==e&&(t?this.openPopover():this.hidePopover(),this.ezVisibilityChange.emit(t))}async updatePosition(t,e){this.updateOptionPosition(t,e),await this.updatePositionPopover()}async show(t,e){this.updateOptionPosition(t,e),this.opened=!0}async showUnder(t,e){e&&(this.options=e),this.anchorElement=t,this.opened=!0}async hide(){this.opened=!1}async setOptions(t){Object.assign(this.options,t)}async setAnchorElement(t){this.anchorElement=t}parseSizePixel(t,e){return t?"string"==typeof t?Number(t.replace("px","")):null!=t?t:0:null!=e?e:0}updateOptionPosition(t,e){Object.assign(this.options,{horizontalGap:this.parseSizePixel(e,this.options.horizontalGap),verticalGap:this.parseSizePixel(t,this.options.verticalGap)})}async updatePositionPopover(){var t;this._box&&this.opened&&(this.anchorElement||(this.anchorElement=this._host),"string"==typeof this.anchorElement&&(this.anchorElement=document.getElementById(this.anchorElement)),await((t,e,n)=>{const o=new Map,i={platform:it,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:h}=_(l,o,c),f=o,d={},p=0;for(let n=0;n<a.length;n++){const{name:r,fn:v}=a[n],{x:y,y:b,data:m,reset:x}=await v({x:u,y:h,initialPlacement:o,placement:f,strategy:i,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});u=null!=y?y:u,h=null!=b?b:h,d={...d,[r]:{...d[r],...m}},x&&p<=50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(l=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),({x:u,y:h}=_(l,f,c))),n=-1)}return{x:u,y:h,placement:f,strategy:i,middlewareData:d}})(t,e,{...i,platform:r})})(this.anchorElement,this._box,{placement:this.options.fromRight?"bottom-end":"bottom-start",middleware:[(void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:k=!0,...O}=f(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const P=d(i),R=b(a),S=d(a)===a,A=await(null==c.isRTL?void 0:c.isRTL(l.floating)),C=v||(S||!k?[g(a)]:function(t){const e=g(t);return[x(t),e,x(e)]}(a)),T="none"!==_;!v&&T&&C.push(...function(t,e,n,o){const i=p(t);let r=function(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}(d(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(x)))),r}(a,k,_,A));const D=[a,...C],E=await z(e,O),L=[];let j=(null==(o=r.flip)?void 0:o.overflows)||[];if(u&&L.push(E[P]),h){const t=function(t,e,n){void 0===n&&(n=!1);const o=p(t),i=m(t),r=y(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=g(s)),[s,g(s)]}(i,s,A);L.push(E[t[0]],E[t[1]])}if(j=[...j,{placement:i,overflows:L}],!L.every((t=>t<=0))){var F,G;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,e=D[t];if(e)return{data:{index:t,overflows:j},reset:{placement:e}};let n=null==(G=j.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:G.placement;if(!n)switch(w){case"bestFit":{var B;const t=null==(B=j.filter((t=>{if(T){const e=b(t.placement);return e===R||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:B[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}),rt({padding:5})],strategy:"fixed"}).then((({x:t,y:e,placement:n})=>{const o=n.includes("bottom")?e+this.options.verticalGap:e-this.options.verticalGap,i=n.includes("start")?t+this.options.horizontalGap:t-this.options.horizontalGap;Object.assign(this._box.style,{top:`${o}px`,left:`${i}px`})})))}hidePopover(){this._box&&(this._box.style.display="",this.hideOverlay(),this.ezVisibilityChange.emit(!1))}async openPopover(){this._box&&this.opened&&(this._box.style.display="flex",this._box.style.visibility="hidden",await this.updatePositionPopover(),this.openOverlay(),this.ezVisibilityChange.emit(!0),this._box.style.visibility="visible")}openOverlay(){this._overlay&&this._overlayIsActive&&(this._overlay.style.display="block")}hideOverlay(){this._overlay&&(this._overlay.style.display="none")}checkStatusOverlay(){return"none"!==this.overlayType||!("none"!==this.overlayType||!this.autoClose)}updatePositionDebounce(){this.opened&&(clearTimeout(this._timeoutDebounce),this._timeoutDebounce=setTimeout((()=>{this.updatePositionPopover()}),this.TIME_DEBOUNCE))}componentWillLoad(){window.addEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.addEventListener("resize",this.updatePositionDebounce.bind(this),!0)}componentDidLoad(){this._overlayIsActive=this.checkStatusOverlay(),this._resizeObserver=new ResizeObserver(this.updatePositionPopover.bind(this)),this._resizeObserver.observe(this._box),this.openPopover()}disconnectedCallback(){window.removeEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.removeEventListener("resize",this.updatePositionDebounce.bind(this),!0),this._resizeObserver.disconnect()}render(){return n(o,null,n("div",{ref:t=>this._overlay=t,onClick:()=>this.hide(),class:`popover__overlay popover__overlay--${this.overlayType}`}),n("section",{ref:t=>this._box=t,class:{popover__box:!0,"popover__box--fit-content":"fit-content"===this.boxWidth,"popover__box--full-width":"fit-content"!==this.boxWidth}},n("slot",null)))}get _host(){return i(this)}static get watchers(){return{opened:["observeOpened"]}}};st.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 4);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--more-visible--2x, 3)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";const at=class{constructor(n){t(this,n),this.ezVisibilityChange=e(this,"ezVisibilityChange",7),this.autoClose=!0,this.boxWidth="fit-content",this.opened=!1,this.overlayType="light",this.anchorElement=void 0,this.options={horizontalGap:0,verticalGap:0,fromRight:!1}}listenerEzVisibilityChange({detail:t}){this.ezVisibilityChange.emit(t)}async observeOpened(t){t&&!this._popOverCore&&this.renderPopoverCore(),this._popOverCore.opened=t}async updatePosition(t,e){var n;await(null===(n=this._popOverCore)||void 0===n?void 0:n.updatePosition(t,e))}async show(t,e){this._popOverCore||this.renderPopoverCore(),await this._popOverCore.show(t,e)}async showUnder(t,e){this._popOverCore||this.renderPopoverCore(),await this._popOverCore.showUnder(t,e)}async hide(){var t;await(null===(t=this._popOverCore)||void 0===t?void 0:t.hide())}async setOptions(t){var e;await(null===(e=this._popOverCore)||void 0===e?void 0:e.setOptions(t))}async setAnchorElement(t){var e;await(null===(e=this._popOverCore)||void 0===e?void 0:e.setAnchorElement(t))}renderPopoverCore(){this._popOverCore=document.createElement("ez-popover-core"),this._popOverCore.opened=this.opened,this._popOverCore.anchorElement=this.anchorElement,this._popOverCore.autoClose=this.autoClose,this._popOverCore.boxWidth=this.boxWidth,this._popOverCore.overlayType=this.overlayType,this._popOverCore.options=this.options;const t=this._host.children.item(0);t?this._popOverCore.appendChild(t):console.warn("O slot do popover está vazio. Adicione conteúdo ao slot para exibição correta."),document.body.appendChild(this._popOverCore)}render(){return n(o,null,n("slot",null))}get _host(){return i(this)}static get watchers(){return{opened:["observeOpened"]}}};at.style=":host{display:none}";export{st as ez_popover_core,at as ez_popover_plus}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,F as e,H as h}from"./p-23a36bb6.js";import{ArrayUtils as l}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const n=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&(this.searchInput.value=""),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:"(Vazio)"}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?l.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?l.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const h=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),l=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),o=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!h||!l);return this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&o?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,this.searchInput.value=""}handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&(this.searchInput.value="")}handleSearchOnOption(t){if(t.detail)return this.displayOptions=l.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:"Selecionar todos",class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions,listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:"Selecione os valores a serem filtrados através do campo de busca."})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:"Nenhum resultado encontrado."})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(h,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:"Buscar..",onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:"Buscar...",ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};n.style=".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);min-height:fit-content;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)}";export{n as ez_multi_selection_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as o,g as e}from"./p-23a36bb6.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-2187f86c.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this._textInputReady=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(a.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.value),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:""}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){var t,i;if(!this.enabled)return;this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}componentDidRender(){this._textInput&&(this._textInputReady=!0)}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(a.PRELOAD)}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))})),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&this._resizeObserver.disconnect()}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(a.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}openPopover(){var t;this.isOpen=!0,null===(t=this._popover)||void 0===t||t.show()}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var a;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(a||(a={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
@@ -24,12 +24,7 @@ export declare class EzBadge {
24
24
  * Define a posição do ícone em relação ao elemento filho.
25
25
  */
26
26
  position: IPosition;
27
- /**
28
- * Define a posição do ícone em relação ao elemento.
29
- */
30
- alignItems: "center" | "flex-end" | "flex-start";
31
27
  private getIconSize;
32
- private getAlignItemsClass;
33
28
  componentDidLoad(): void;
34
29
  private handleSlotChange;
35
30
  private validateIconLeft;
@@ -0,0 +1,104 @@
1
+ import { IOption } from "../ez-combo-box";
2
+ export declare class EzComboBoxList {
3
+ private _optionsList;
4
+ private _listWrapper;
5
+ /**
6
+ * Indica se o indicador de carregamento deve ser exibido.
7
+ *
8
+ * @tipo {boolean}
9
+ */
10
+ showLoading: boolean;
11
+ /**
12
+ * Lista de opções visíveis que serão exibidas no componente.
13
+ *
14
+ * @tipo {Array<IOption>}
15
+ */
16
+ visibleOptions: Array<IOption>;
17
+ /**
18
+ * Mensagem exibida quando a lista de opções está vazia.
19
+ *
20
+ * @padrão "Nenhum resultado encontrado"
21
+ * @tipo {string}
22
+ */
23
+ textEmptyList: string;
24
+ /**
25
+ * Indica se o valor de cada opção deve ser exibido junto com o rótulo.
26
+ *
27
+ * @tipo {boolean}
28
+ */
29
+ showOptionValue: boolean;
30
+ /**
31
+ * Índice da opção pré-selecionada na lista.
32
+ *
33
+ * @tipo {number}
34
+ */
35
+ preSelection: number;
36
+ /**
37
+ * Largura máxima da lista, em pixels.
38
+ *
39
+ * @tipo {number}
40
+ */
41
+ maxWidth: number;
42
+ /**
43
+ * Largura fixa da lista, em pixels.
44
+ *
45
+ * @tipo {number}
46
+ */
47
+ width: number;
48
+ /**
49
+ * Callback chamado quando uma opção é selecionada.
50
+ *
51
+ * @param option A opção selecionada.
52
+ * @tipo {(option: IOption) => void}
53
+ */
54
+ onOptionSelect: (option: IOption) => void;
55
+ /**
56
+ * Callback chamado quando o mouse passa sobre uma opção.
57
+ *
58
+ * @param index O índice da opção em foco.
59
+ * @tipo {(index: number) => void}
60
+ */
61
+ onOptionHover: (index: number) => void;
62
+ /**
63
+ * Move a seleção para a próxima opção na lista.
64
+ */
65
+ nextOption(): Promise<void>;
66
+ /**
67
+ * Move a seleção para a opção anterior na lista, sem ultrapassar o início.
68
+ */
69
+ previousOption(): Promise<void>;
70
+ /**
71
+ * Seleciona a opção atualmente pré-selecionada.
72
+ */
73
+ selectCurrentOption(): Promise<void>;
74
+ /**
75
+ * Observa mudanças na propriedade `width` e ajusta a largura da lista.
76
+ *
77
+ * @param newValue O novo valor da largura.
78
+ * @param oldValue O valor anterior da largura.
79
+ */
80
+ observeWidth(newValue: number, oldValue: number): void;
81
+ /**
82
+ * Observa mudanças na propriedade `maxWidth` e ajusta a largura máxima da lista.
83
+ *
84
+ * @param newValue O novo valor da largura máxima.
85
+ * @param oldValue O valor anterior da largura máxima.
86
+ */
87
+ observeMaxWidth(newValue: number, oldValue: number): void;
88
+ /**
89
+ * Gerencia a navegação por teclado na lista do combo box.
90
+ *
91
+ * - `ArrowDown`: Move para a próxima opção.
92
+ * - `ArrowUp`: Move para a opção anterior.
93
+ * - `Enter`: Seleciona a opção atual.
94
+ * - `Escape`: Limpa a pré-seleção.
95
+ *
96
+ * @param event O evento de teclado.
97
+ */
98
+ handleKeyDown(event: KeyboardEvent): void;
99
+ private buildItem;
100
+ private scrollToOption;
101
+ componentDidLoad(): void;
102
+ componentDidRender(): void;
103
+ render(): any;
104
+ }
@@ -2,11 +2,9 @@ import { EventEmitter } from "../../stencil-public-runtime";
2
2
  import { TFocusOptions } from "../ez-text-input/ez-text-input";
3
3
  export declare class EzComboBox {
4
4
  private _textInput;
5
- private _optionsList;
6
- private _listContainer;
7
- private _listWrapper;
5
+ private _comboBoxList;
6
+ private _popover;
8
7
  private _itemValueBasis;
9
- private _floatingID;
10
8
  private _source;
11
9
  private _changeDeboucingTimeout;
12
10
  private _deboucingTime;
@@ -15,12 +13,14 @@ export declare class EzComboBox {
15
13
  private _textEmptyList;
16
14
  private _lookupMode;
17
15
  private _resizeObserver;
16
+ isOpen: boolean;
18
17
  private el;
19
18
  private _preSelection;
20
19
  private _visibleOptions;
21
20
  private _startLoading;
22
21
  private _showLoading;
23
22
  private _criteria;
23
+ private _textInputReady;
24
24
  /**
25
25
  * Define o limite de caracteres mínimo para realizar uma pesquisa
26
26
  */
@@ -118,9 +118,6 @@ export declare class EzComboBox {
118
118
  * Limpa o valor do campo de pesquisa
119
119
  */
120
120
  clearValue(): Promise<void>;
121
- scrollListener(): void;
122
- private updateListPosition;
123
- private getListPosition;
124
121
  private isDifferentValues;
125
122
  private getFormattedText;
126
123
  private getText;
@@ -129,15 +126,8 @@ export declare class EzComboBox {
129
126
  private hasToAddEmptyoption;
130
127
  private getMaxWidthValue;
131
128
  private getWidthValue;
132
- private buildItem;
133
129
  private showOptions;
134
130
  private hideOptions;
135
- private isOptionsVisible;
136
- private nextOption;
137
- private previousOption;
138
- private scrollToOption;
139
- private selectCurrentOption;
140
- private controlListWithOnlyOne;
141
131
  private updateSource;
142
132
  private selectOption;
143
133
  private loadOptions;
@@ -145,17 +135,18 @@ export declare class EzComboBox {
145
135
  private setInputValue;
146
136
  private clearSearch;
147
137
  private resetOptions;
148
- componentWillLoad(): void;
149
138
  componentDidRender(): void;
139
+ componentWillLoad(): void;
150
140
  componentDidLoad(): void;
141
+ disconnectedCallback(): void;
151
142
  private handlerIconClick;
152
143
  private onTextInputChangeHandler;
153
144
  private clearDeboucingTimeout;
154
145
  private onTextInputClickHandler;
155
146
  private keyDownHandler;
156
- private handleEventPropagation;
157
147
  private onTextInputFocusOutHandler;
158
148
  private canShowListOptions;
149
+ private openPopover;
159
150
  render(): any;
160
151
  }
161
152
  export interface IOption {
@@ -20,6 +20,7 @@ export declare class EzGrid {
20
20
  private _headerOverflowWatcher;
21
21
  private _customEditor;
22
22
  private _customRenders;
23
+ private _keyboardManager;
23
24
  _element: HTMLElement;
24
25
  private _paginationInfo;
25
26
  private _paginationChangedByKeyboard;
@@ -225,6 +226,8 @@ export declare class EzGrid {
225
226
  private buildDataElementId;
226
227
  private previousPage;
227
228
  private nextPage;
229
+ private nextRecord;
230
+ private previousRecord;
228
231
  private resetPaginationState;
229
232
  private resolvePaginationClassMode;
230
233
  private handleCancelPagination;
@@ -251,5 +254,7 @@ export declare class EzGrid {
251
254
  private getDataSource;
252
255
  private hideHeader;
253
256
  private resolveLeftHeaderClass;
257
+ private initKeyboardManager;
258
+ private removeShortcuts;
254
259
  render(): any;
255
260
  }
@@ -1,11 +1,6 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class EzPopoverPlus {
3
- private _box;
4
- private _overlay;
5
- private _overlayIsActive;
6
- private _timeoutDebounce;
7
- private _resizeObserver;
8
- private TIME_DEBOUNCE;
3
+ private _popOverCore;
9
4
  _host: HTMLElement;
10
5
  /**
11
6
  * Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
@@ -35,7 +30,10 @@ export declare class EzPopoverPlus {
35
30
  * Emitido quando acontece a alteração de estado do componente.
36
31
  */
37
32
  ezVisibilityChange: EventEmitter<boolean>;
38
- observeOpened(newValue: boolean, oldValue: boolean): Promise<void>;
33
+ listenerEzVisibilityChange({ detail }: {
34
+ detail: any;
35
+ }): void;
36
+ observeOpened(newValue: boolean): Promise<void>;
39
37
  /**
40
38
  * Atualiza a posição do popover.
41
39
  */
@@ -60,18 +58,7 @@ export declare class EzPopoverPlus {
60
58
  * Altera o elemento de ancoragem.
61
59
  */
62
60
  setAnchorElement(anchor: HTMLElement | string): Promise<void>;
63
- private parseSizePixel;
64
- private updateOptionPosition;
65
- private updatePositionPopover;
66
- private hidePopover;
67
- private openPopover;
68
- private openOverlay;
69
- private hideOverlay;
70
- private checkStatusOverlay;
71
- private updatePositionDebounce;
72
- componentWillLoad(): void;
73
- componentDidLoad(): void;
74
- disconnectedCallback(): void;
61
+ private renderPopoverCore;
75
62
  render(): any;
76
63
  }
77
64
  export interface IEzPopoverAnchorOptions {
@@ -0,0 +1,81 @@
1
+ import { EventEmitter } from "../../../stencil-public-runtime";
2
+ export declare class EzPopoverCore {
3
+ private _box;
4
+ private _overlay;
5
+ private _overlayIsActive;
6
+ private _timeoutDebounce;
7
+ private _resizeObserver;
8
+ private TIME_DEBOUNCE;
9
+ _host: HTMLElement;
10
+ /**
11
+ * Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
12
+ */
13
+ autoClose: boolean;
14
+ /**
15
+ * Ajusta o comportamento da largura do popover.
16
+ */
17
+ boxWidth: "full-width" | "fit-content";
18
+ /**
19
+ * Define se o ez-popover está aberto.
20
+ */
21
+ opened: boolean;
22
+ /**
23
+ * Define o tipo de overlay do popover.
24
+ */
25
+ overlayType: "medium" | "light" | "none";
26
+ /**
27
+ * Define o elemento de ancoragem.
28
+ */
29
+ anchorElement: HTMLElement | string;
30
+ /**
31
+ * Define as opções do elemento.
32
+ */
33
+ options: IEzPopoverAnchorOptions;
34
+ /**
35
+ * Emitido quando acontece a alteração de estado do componente.
36
+ */
37
+ ezVisibilityChange: EventEmitter<boolean>;
38
+ observeOpened(newValue: boolean, oldValue: boolean): Promise<void>;
39
+ /**
40
+ * Atualiza a posição do popover.
41
+ */
42
+ updatePosition(top?: string, left?: string): Promise<void>;
43
+ /**
44
+ * Exibe o ez-popover.
45
+ */
46
+ show(top?: string | number, left?: string | number): Promise<void>;
47
+ /**
48
+ * Ancora a exibição do popOver a um elemento HTML.
49
+ */
50
+ showUnder(element: HTMLElement | string, options?: IEzPopoverAnchorOptions): Promise<void>;
51
+ /**
52
+ * Oculta o ez-popover.
53
+ */
54
+ hide(): Promise<void>;
55
+ /**
56
+ * Altera as opções.
57
+ */
58
+ setOptions(options: IEzPopoverAnchorOptions): Promise<void>;
59
+ /**
60
+ * Altera o elemento de ancoragem.
61
+ */
62
+ setAnchorElement(anchor: HTMLElement | string): Promise<void>;
63
+ private parseSizePixel;
64
+ private updateOptionPosition;
65
+ private updatePositionPopover;
66
+ private hidePopover;
67
+ private openPopover;
68
+ private openOverlay;
69
+ private hideOverlay;
70
+ private checkStatusOverlay;
71
+ private updatePositionDebounce;
72
+ componentWillLoad(): void;
73
+ componentDidLoad(): void;
74
+ disconnectedCallback(): void;
75
+ render(): any;
76
+ }
77
+ export interface IEzPopoverAnchorOptions {
78
+ horizontalGap?: number;
79
+ verticalGap?: number;
80
+ fromRight?: boolean;
81
+ }