@sankhyalabs/ezui 5.21.0-dev.16 → 5.21.0-dev.17

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 (194) hide show
  1. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-card-item_3.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-chart.cjs.entry.js +433 -0
  11. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +2 -2
  16. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-form.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-grid.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-scroller_3.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  39. package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  47. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  48. package/dist/cjs/ezui.cjs.js +2 -2
  49. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  50. package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +7 -0
  51. package/dist/cjs/loader.cjs.js +2 -2
  52. package/dist/collection/collection-manifest.json +1 -0
  53. package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
  54. package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
  55. package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
  56. package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
  57. package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
  58. package/dist/collection/components/ez-chart/components/index.js +5 -0
  59. package/dist/collection/components/ez-chart/ez-chart.css +5 -0
  60. package/dist/collection/components/ez-chart/ez-chart.js +284 -0
  61. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
  62. package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
  63. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
  64. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
  65. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
  66. package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
  67. package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
  68. package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
  69. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
  70. package/dist/custom-elements/index.d.ts +6 -0
  71. package/dist/custom-elements/index.js +431 -1
  72. package/dist/esm/ez-actions-button.entry.js +1 -1
  73. package/dist/esm/ez-alert-list.entry.js +1 -1
  74. package/dist/esm/ez-alert.entry.js +1 -1
  75. package/dist/esm/ez-application.entry.js +1 -1
  76. package/dist/esm/ez-badge.entry.js +1 -1
  77. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  78. package/dist/esm/ez-button.entry.js +1 -1
  79. package/dist/esm/ez-calendar.entry.js +1 -1
  80. package/dist/esm/ez-card-item_3.entry.js +1 -1
  81. package/dist/esm/ez-chart.entry.js +429 -0
  82. package/dist/esm/ez-check.entry.js +1 -1
  83. package/dist/esm/ez-chip.entry.js +1 -1
  84. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  85. package/dist/esm/ez-combo-box.entry.js +1 -1
  86. package/dist/esm/ez-custom-form-input_2.entry.js +2 -2
  87. package/dist/esm/ez-date-input.entry.js +1 -1
  88. package/dist/esm/ez-date-time-input.entry.js +1 -1
  89. package/dist/esm/ez-dialog.entry.js +1 -1
  90. package/dist/esm/ez-dropdown.entry.js +1 -1
  91. package/dist/esm/ez-file-item.entry.js +1 -1
  92. package/dist/esm/ez-form-view.entry.js +1 -1
  93. package/dist/esm/ez-form.entry.js +1 -1
  94. package/dist/esm/ez-grid.entry.js +1 -1
  95. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  96. package/dist/esm/ez-icon.entry.js +1 -1
  97. package/dist/esm/ez-list.entry.js +1 -1
  98. package/dist/esm/ez-loading-bar.entry.js +1 -1
  99. package/dist/esm/ez-modal-container.entry.js +1 -1
  100. package/dist/esm/ez-modal.entry.js +1 -1
  101. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  102. package/dist/esm/ez-number-input.entry.js +1 -1
  103. package/dist/esm/ez-popover.entry.js +1 -1
  104. package/dist/esm/ez-popup.entry.js +1 -1
  105. package/dist/esm/ez-radio-button.entry.js +1 -1
  106. package/dist/esm/ez-scroller_3.entry.js +1 -1
  107. package/dist/esm/ez-search.entry.js +1 -1
  108. package/dist/esm/ez-skeleton.entry.js +1 -1
  109. package/dist/esm/ez-split-button.entry.js +1 -1
  110. package/dist/esm/ez-split-item.entry.js +1 -1
  111. package/dist/esm/ez-split-panel.entry.js +1 -1
  112. package/dist/esm/ez-tabselector.entry.js +1 -1
  113. package/dist/esm/ez-text-area.entry.js +1 -1
  114. package/dist/esm/ez-text-input.entry.js +1 -1
  115. package/dist/esm/ez-time-input.entry.js +1 -1
  116. package/dist/esm/ez-toast.entry.js +1 -1
  117. package/dist/esm/ez-upload.entry.js +1 -1
  118. package/dist/esm/ez-view-stack.entry.js +1 -1
  119. package/dist/esm/ezui.js +3 -3
  120. package/dist/esm/filter-column.entry.js +1 -1
  121. package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +7 -1
  122. package/dist/esm/loader.js +3 -3
  123. package/dist/ezui/ezui.esm.js +1 -1
  124. package/dist/ezui/{p-44caad9a.entry.js → p-0378416a.entry.js} +1 -1
  125. package/dist/ezui/{p-c942e4a7.entry.js → p-03e774a2.entry.js} +1 -1
  126. package/dist/ezui/{p-91f626d3.entry.js → p-0e551dd4.entry.js} +1 -1
  127. package/dist/ezui/{p-1285c902.entry.js → p-11b09aa1.entry.js} +1 -1
  128. package/dist/ezui/{p-77a4bd35.entry.js → p-11bfeca3.entry.js} +1 -1
  129. package/dist/ezui/p-1ddcbf69.entry.js +1 -0
  130. package/dist/ezui/{p-af95cd16.entry.js → p-24ca32a3.entry.js} +1 -1
  131. package/dist/ezui/{p-cc2dc4f4.entry.js → p-2a6e44a0.entry.js} +1 -1
  132. package/dist/ezui/{p-7922142b.entry.js → p-2af4e2de.entry.js} +1 -1
  133. package/dist/ezui/{p-baf80b13.entry.js → p-30951bd7.entry.js} +1 -1
  134. package/dist/ezui/{p-922ac38b.entry.js → p-31674f8e.entry.js} +1 -1
  135. package/dist/ezui/{p-bf79aaa1.entry.js → p-33792b2b.entry.js} +1 -1
  136. package/dist/ezui/{p-e85c48d7.entry.js → p-36180f4d.entry.js} +1 -1
  137. package/dist/ezui/{p-7bc07c31.entry.js → p-3f8c33e0.entry.js} +1 -1
  138. package/dist/ezui/{p-1ee2479b.entry.js → p-4559c266.entry.js} +1 -1
  139. package/dist/ezui/{p-93a19a8c.entry.js → p-507ec8ed.entry.js} +1 -1
  140. package/dist/ezui/{p-786559c5.entry.js → p-51e4c040.entry.js} +1 -1
  141. package/dist/ezui/p-569a0b9a.entry.js +1 -0
  142. package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
  143. package/dist/ezui/p-6ec40dec.entry.js +1 -0
  144. package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
  145. package/dist/ezui/{p-555c9018.entry.js → p-7567ccdd.entry.js} +1 -1
  146. package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
  147. package/dist/ezui/{p-072e6347.entry.js → p-82ac8b06.entry.js} +1 -1
  148. package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
  149. package/dist/ezui/{p-85afb815.entry.js → p-859854fb.entry.js} +1 -1
  150. package/dist/ezui/{p-bcb53f27.entry.js → p-868b56f7.entry.js} +1 -1
  151. package/dist/ezui/{p-85c8baae.entry.js → p-8eef0f70.entry.js} +1 -1
  152. package/dist/ezui/{p-09de35a2.entry.js → p-91ccae0c.entry.js} +1 -1
  153. package/dist/ezui/{p-3faa2b46.entry.js → p-9634631d.entry.js} +1 -1
  154. package/dist/ezui/{p-f3c526cc.entry.js → p-9a11e223.entry.js} +1 -1
  155. package/dist/ezui/{p-7af81663.entry.js → p-9a23d513.entry.js} +1 -1
  156. package/dist/ezui/{p-84e439b9.entry.js → p-9aa27e69.entry.js} +1 -1
  157. package/dist/ezui/{p-784fe207.entry.js → p-9c2e2d68.entry.js} +1 -1
  158. package/dist/ezui/{p-9050d2cd.entry.js → p-b0e71d23.entry.js} +1 -1
  159. package/dist/ezui/{p-17be134a.entry.js → p-b2f6bc0a.entry.js} +1 -1
  160. package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
  161. package/dist/ezui/{p-5bd5e68f.entry.js → p-c3b7a23e.entry.js} +1 -1
  162. package/dist/ezui/{p-d9401ea0.entry.js → p-cd1a2e6b.entry.js} +1 -1
  163. package/dist/ezui/{p-bae4e180.entry.js → p-dbeee5aa.entry.js} +1 -1
  164. package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
  165. package/dist/ezui/{p-30775e7f.entry.js → p-e151e795.entry.js} +1 -1
  166. package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
  167. package/dist/ezui/{p-0306dff7.entry.js → p-e6b38ade.entry.js} +1 -1
  168. package/dist/ezui/{p-3b9e5664.entry.js → p-ecd3ffad.entry.js} +1 -1
  169. package/dist/ezui/{p-650e4b6d.entry.js → p-f1c2c19e.entry.js} +1 -1
  170. package/dist/ezui/{p-13d2fe2d.entry.js → p-f1c3f85d.entry.js} +1 -1
  171. package/dist/ezui/{p-49456b34.entry.js → p-f291db18.entry.js} +1 -1
  172. package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
  173. package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
  174. package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
  175. package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
  176. package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
  177. package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
  178. package/dist/types/components/ez-chart/components/index.d.ts +5 -0
  179. package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
  180. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
  181. package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
  182. package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
  183. package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
  184. package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
  185. package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
  186. package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
  187. package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
  188. package/dist/types/components.d.ts +95 -0
  189. package/package.json +2 -1
  190. package/react/components.d.ts +1 -0
  191. package/react/components.js +1 -0
  192. package/react/components.js.map +1 -1
  193. package/dist/ezui/p-bc2f844e.entry.js +0 -1
  194. package/dist/ezui/p-e90dd4eb.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as o,h as t,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const i=class{constructor(t){o(this,t),this.label=void 0,this.enabled=!0,this.mode="regular",this.image=void 0,this.iconName=void 0,this.size=void 0}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}clickListener(o){this.enabled||o.stopImmediatePropagation()}componentDidLoad(){this._element&&n.addIDInfo(this._element),this._button&&n.addIDInfo(this._button,"button",{id:"embedded"})}getIconSize(o="medium"){const t=this.size&&this.size.toLowerCase();return["small","medium","large"].includes(t)?t:o}handleSlotChange(o){const t=o.target,e=t.assignedElements()[0];e&&("link"==this.mode?(e.style.display="inline","leftIcon"==t.name?e.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==t.name&&(e.style.paddingLeft="var(--ez-button__inline__icon--padding)")):e.style.setProperty("--ez-icon--color","var(--ez-icon--color)"))}render(){return"icon"==this.mode?t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})):"label-icon"==this.mode?t("div",{class:"label-icon"},t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})),t("label",{title:this.label},this.label)):"link"==this.mode?t("a",{class:`${this.getIconSize()} ${this.enabled?"":"disabled"}`,ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}})):t("button",{class:this.getIconSize(""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}}))}get _element(){return e(this)}};i.style=":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--color--disable-primary, '#e5eaf0');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";export{i as ez_button}
1
+ import{r as o,h as t,g as e}from"./p-e4c7eb39.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const i=class{constructor(t){o(this,t),this.label=void 0,this.enabled=!0,this.mode="regular",this.image=void 0,this.iconName=void 0,this.size=void 0}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}clickListener(o){this.enabled||o.stopImmediatePropagation()}componentDidLoad(){this._element&&n.addIDInfo(this._element),this._button&&n.addIDInfo(this._button,"button",{id:"embedded"})}getIconSize(o="medium"){const t=this.size&&this.size.toLowerCase();return["small","medium","large"].includes(t)?t:o}handleSlotChange(o){const t=o.target,e=t.assignedElements()[0];e&&("link"==this.mode?(e.style.display="inline","leftIcon"==t.name?e.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==t.name&&(e.style.paddingLeft="var(--ez-button__inline__icon--padding)")):e.style.setProperty("--ez-icon--color","var(--ez-icon--color)"))}render(){return"icon"==this.mode?t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})):"label-icon"==this.mode?t("div",{class:"label-icon"},t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})),t("label",{title:this.label},this.label)):"link"==this.mode?t("a",{class:`${this.getIconSize()} ${this.enabled?"":"disabled"}`,ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}})):t("button",{class:this.getIconSize(""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}}))}get _element(){return e(this)}};i.style=":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--color--disable-primary, '#e5eaf0');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";export{i as ez_button}
@@ -1 +1 @@
1
- import{r as t,c as i,f as o,h as a,g as e}from"./p-23a36bb6.js";import{D as l}from"./p-ab574d59.js";import{FloatingManager as d,ElementIDUtils as n}from"@sankhyalabs/core";class r{constructor(t,i,o,a,e,l,d,n,r,c){this.title=t,this.message=i,this.dialogType=o,this.confirm=a,this.icon=e,this.labelCancel=l,this.labelConfirm=d,this.btnConfirmDanger=n,this.callBack=r,this.beforeClose=c}}const c=class{constructor(o){t(this,o),this.ezCancel=i(this,"ezCancel",7),this.ezAccept=i(this,"ezAccept",7),this.PRIMARY_BUTTON_ID="EZ_DIALOG_PRIMARY_BUTTON",this.labelConfirm="Sim",this.labelCancel="Não",this.btnConfirmDanger=!1,this._messageQueue=[],this._canFocusOnPrimaryBtn=!1,this.confirm=!1,this.dialogType=void 0,this.message=void 0,this.opened=!1,this.personalizedIconPath=void 0,this.ezTitle=void 0,this.beforeClose=void 0}observeConfig(t,i){this.manageOverflow(),t&&!i&&(this._canFocusOnPrimaryBtn=!0)}handleKeyDown(t){"Escape"!==t.key&&"Esc"!==t.key||this.handleButtonClick(!1)}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=d.subscribeOverlayControl(this._overlayRef):d.unsubscribeOverlayControl(this._overlayRef||this._overlayId)}handleButtonClick(t){this._currentMessage.beforeClose&&!1===this._currentMessage.beforeClose(t)||(this.opened=this._messageQueue.length>0,this._currentMessage.callBack&&this._currentMessage.callBack(t),t?this.ezAccept.emit(t):this.ezCancel.emit(t),this._currentMessage=this._messageQueue.shift(),o(this))}async show(t,i,o,a,e,l,d,n,c){return this.opened=!0,new Promise((s=>{this._messageQueue.push(new r(t,i,o,a,e,l,d,n,s,c))}))}isCritical(t){return t===l.CRITICAL}getIconElement(t){if(t.dialogType!==l.DEFAULT)return a("ez-icon",{class:"changeable__icon "+this.getIconClass(t.dialogType),size:"small",iconName:this.getIconName(t)})}getIconClass(t){return this.isCritical(t)?"title-icon--critical":t===l.SUCCESS?"title-icon--success":t===l.WARN?"title-icon--warn":""}getIconName(t){return t.icon?t.icon:this.isCritical(t.dialogType)?"alert-circle-inverted":t.dialogType===l.WARN?"warning-outline":t.dialogType===l.SUCCESS?"check":void 0}getTypeIndicatorElement(t){if(t.dialogType!==l.DEFAULT)return a("div",{class:this.getClassIconIndicator(t.dialogType)})}getClassIconIndicator(t){return this.isCritical(t)?"dialog__critical--indicator":t==l.SUCCESS?"dialog__success--indicator":t==l.WARN?"dialog__warning--indicator":""}getClassContainer(t){return(t.dialogType||l.DEFAULT)===l.DEFAULT?"dialog__container dialog__container--default":"dialog__container"}getClassTitleLabel(t){return null==this.getIconElement(t)?"title title__label title__label--no-icon":"title title__label"}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new r(this.ezTitle,this.message,this.dialogType,this.confirm,this.personalizedIconPath,this.labelCancel,this.labelConfirm,this.btnConfirmDanger,null,this.beforeClose)))}componentDidLoad(){n.addIDInfo(this._element)}componentDidRender(){this.manageOverlay(),this.focusOnDialog(),this.handleFocusOnPrimaryButton()}focusOnDialog(){const t=this._element.shadowRoot.querySelector(".overlay .dialog");t instanceof HTMLDivElement&&(t.style.outline="none",t.focus())}handleFocusOnPrimaryButton(){this._canFocusOnPrimaryBtn&&(this.focusOnPrimaryButton(),this._canFocusOnPrimaryBtn=!1)}focusOnPrimaryButton(){const t=this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`),i=null==t?void 0:t.shadowRoot.querySelector("button");null==i||i.focus()}render(){return this.opened&&this._currentMessage?a("div",{class:"overlay",ref:t=>this._overlayRef=t},a("div",{tabindex:"-1",class:"dialog"},this.getTypeIndicatorElement(this._currentMessage),a("div",{class:this.getClassContainer(this._currentMessage)},a("div",{class:"title__container"},a("div",{class:"title__box"},this.getIconElement(this._currentMessage),a("div",{class:this.getClassTitleLabel(this._currentMessage),innerHTML:this._currentMessage.title,"data-element-id":n.getInternalIDInfo("title")})),a("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1),"data-element-id":n.getInternalIDInfo("buttonClose")})),a("div",{class:"message",innerHTML:this._currentMessage.message,"data-element-id":n.getInternalIDInfo("message")}),this._currentMessage.confirm&&a("div",{class:"button-yes-no__container"},a("ez-button",{class:"button__cancel","data-element-id":n.getInternalIDInfo("cancel"),label:this._currentMessage.labelCancel,onClick:()=>this.handleButtonClick(!1)}),a("ez-button",{id:this.PRIMARY_BUTTON_ID,class:this._currentMessage.btnConfirmDanger?"button__confirm--danger":"button__confirm","data-element-id":n.getInternalIDInfo("confirm"),label:this._currentMessage.labelConfirm,onClick:()=>this.handleButtonClick(!0)})),!this._currentMessage.confirm&&a("div",{class:"button__confirm--container"},a("ez-button",{id:this.PRIMARY_BUTTON_ID,label:"Ok","data-element-id":n.getInternalIDInfo("ok"),class:"button__confirm",onClick:()=>this.handleButtonClick(!0)}))))):null}get _element(){return e(this)}static get watchers(){return{opened:["observeConfig"]}}};c.style=':host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "Roboto");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "Roboto");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0;color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.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%}}';export{c as ez_dialog}
1
+ import{r as t,c as i,f as o,h as a,g as e}from"./p-e4c7eb39.js";import{D as l}from"./p-ab574d59.js";import{FloatingManager as d,ElementIDUtils as n}from"@sankhyalabs/core";class r{constructor(t,i,o,a,e,l,d,n,r,c){this.title=t,this.message=i,this.dialogType=o,this.confirm=a,this.icon=e,this.labelCancel=l,this.labelConfirm=d,this.btnConfirmDanger=n,this.callBack=r,this.beforeClose=c}}const c=class{constructor(o){t(this,o),this.ezCancel=i(this,"ezCancel",7),this.ezAccept=i(this,"ezAccept",7),this.PRIMARY_BUTTON_ID="EZ_DIALOG_PRIMARY_BUTTON",this.labelConfirm="Sim",this.labelCancel="Não",this.btnConfirmDanger=!1,this._messageQueue=[],this._canFocusOnPrimaryBtn=!1,this.confirm=!1,this.dialogType=void 0,this.message=void 0,this.opened=!1,this.personalizedIconPath=void 0,this.ezTitle=void 0,this.beforeClose=void 0}observeConfig(t,i){this.manageOverflow(),t&&!i&&(this._canFocusOnPrimaryBtn=!0)}handleKeyDown(t){"Escape"!==t.key&&"Esc"!==t.key||this.handleButtonClick(!1)}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=d.subscribeOverlayControl(this._overlayRef):d.unsubscribeOverlayControl(this._overlayRef||this._overlayId)}handleButtonClick(t){this._currentMessage.beforeClose&&!1===this._currentMessage.beforeClose(t)||(this.opened=this._messageQueue.length>0,this._currentMessage.callBack&&this._currentMessage.callBack(t),t?this.ezAccept.emit(t):this.ezCancel.emit(t),this._currentMessage=this._messageQueue.shift(),o(this))}async show(t,i,o,a,e,l,d,n,c){return this.opened=!0,new Promise((s=>{this._messageQueue.push(new r(t,i,o,a,e,l,d,n,s,c))}))}isCritical(t){return t===l.CRITICAL}getIconElement(t){if(t.dialogType!==l.DEFAULT)return a("ez-icon",{class:"changeable__icon "+this.getIconClass(t.dialogType),size:"small",iconName:this.getIconName(t)})}getIconClass(t){return this.isCritical(t)?"title-icon--critical":t===l.SUCCESS?"title-icon--success":t===l.WARN?"title-icon--warn":""}getIconName(t){return t.icon?t.icon:this.isCritical(t.dialogType)?"alert-circle-inverted":t.dialogType===l.WARN?"warning-outline":t.dialogType===l.SUCCESS?"check":void 0}getTypeIndicatorElement(t){if(t.dialogType!==l.DEFAULT)return a("div",{class:this.getClassIconIndicator(t.dialogType)})}getClassIconIndicator(t){return this.isCritical(t)?"dialog__critical--indicator":t==l.SUCCESS?"dialog__success--indicator":t==l.WARN?"dialog__warning--indicator":""}getClassContainer(t){return(t.dialogType||l.DEFAULT)===l.DEFAULT?"dialog__container dialog__container--default":"dialog__container"}getClassTitleLabel(t){return null==this.getIconElement(t)?"title title__label title__label--no-icon":"title title__label"}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new r(this.ezTitle,this.message,this.dialogType,this.confirm,this.personalizedIconPath,this.labelCancel,this.labelConfirm,this.btnConfirmDanger,null,this.beforeClose)))}componentDidLoad(){n.addIDInfo(this._element)}componentDidRender(){this.manageOverlay(),this.focusOnDialog(),this.handleFocusOnPrimaryButton()}focusOnDialog(){const t=this._element.shadowRoot.querySelector(".overlay .dialog");t instanceof HTMLDivElement&&(t.style.outline="none",t.focus())}handleFocusOnPrimaryButton(){this._canFocusOnPrimaryBtn&&(this.focusOnPrimaryButton(),this._canFocusOnPrimaryBtn=!1)}focusOnPrimaryButton(){const t=this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`),i=null==t?void 0:t.shadowRoot.querySelector("button");null==i||i.focus()}render(){return this.opened&&this._currentMessage?a("div",{class:"overlay",ref:t=>this._overlayRef=t},a("div",{tabindex:"-1",class:"dialog"},this.getTypeIndicatorElement(this._currentMessage),a("div",{class:this.getClassContainer(this._currentMessage)},a("div",{class:"title__container"},a("div",{class:"title__box"},this.getIconElement(this._currentMessage),a("div",{class:this.getClassTitleLabel(this._currentMessage),innerHTML:this._currentMessage.title,"data-element-id":n.getInternalIDInfo("title")})),a("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1),"data-element-id":n.getInternalIDInfo("buttonClose")})),a("div",{class:"message",innerHTML:this._currentMessage.message,"data-element-id":n.getInternalIDInfo("message")}),this._currentMessage.confirm&&a("div",{class:"button-yes-no__container"},a("ez-button",{class:"button__cancel","data-element-id":n.getInternalIDInfo("cancel"),label:this._currentMessage.labelCancel,onClick:()=>this.handleButtonClick(!1)}),a("ez-button",{id:this.PRIMARY_BUTTON_ID,class:this._currentMessage.btnConfirmDanger?"button__confirm--danger":"button__confirm","data-element-id":n.getInternalIDInfo("confirm"),label:this._currentMessage.labelConfirm,onClick:()=>this.handleButtonClick(!0)})),!this._currentMessage.confirm&&a("div",{class:"button__confirm--container"},a("ez-button",{id:this.PRIMARY_BUTTON_ID,label:"Ok","data-element-id":n.getInternalIDInfo("ok"),class:"button__confirm",onClick:()=>this.handleButtonClick(!0)}))))):null}get _element(){return e(this)}static get watchers(){return{opened:["observeConfig"]}}};c.style=':host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "Roboto");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "Roboto");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0;color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.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%}}';export{c as ez_dialog}
@@ -1 +1 @@
1
- import{r as e,c as a,h as i,H as t,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{E as n}from"./p-98bb8b16.js";const o=class{constructor(i){e(this,i),this.ezSelectionChange=a(this,"ezSelectionChange",7),this.open=!0,this.selectedId=void 0,this.items=[],this.tooltipResolver=void 0,this.filterText=""}async disableItem(e){[].concat(e).forEach((e=>this._tree.disableItem(e)))}async openGuideNavidator(){this.open=!0}async enableItem(e){[].concat(e).forEach((e=>this._tree.enableItem(e)))}async updateItem(e){[].concat(e).forEach((e=>this._tree.updateItem(e)))}async getItem(e){return this._tree.getItem(e)}async getCurrentPath(){var e;return null===(e=this._tree)||void 0===e?void 0:e.getCurrentPath()}async selectGuide(e){null!=this._tree&&null!=e&&(this._tree.selectItem(e),this.getCurrentPath().then((e=>{null==e||e.forEach((e=>{this._tree.openItem(e.id)}))})))}async getParent(e){return this._tree.getParent(e)}async handleToggleSidebar(){this.open=!this.open}handleFilterTree(e){"Enter"===e.key&&this._tree.applyFilter(this.filterText)}onFilterChanged(e){this.filterText=e.detail,e.stopPropagation()}render(){return s.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.handleToggleSidebar.bind(this),"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":s.getInternalIDInfo("openButton")}),i("aside",{tabIndex:-1,id:"navigator",class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-guide-navigator "+(this.open?"":"hidden"),"data-element-id":s.getInternalIDInfo("sidebar")},i("div",{role:"search",class:"ez-guide-navigator__actions"},i("ez-filter-input",{mode:"slim",value:this.filterText,onEzChange:e=>this.onFilterChanged(e),label:"Buscar guia","aria-placeholder":"Buscar guia",onKeyUp:this.handleFilterTree.bind(this),"data-element-id":s.getInternalIDInfo("textinput")}),i("ez-button",{onClick:this.handleToggleSidebar.bind(this),class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:"Ocultar menu","aria-label":"Ocultar menu","aria-controls":"navigator","data-element-id":s.getInternalIDInfo("closeButton")})),i("ez-scroller",{direction:n.VERTICAL,activeShadow:!0},i("ez-tree",{ref:e=>this._tree=e,items:this.items,"data-element-id":s.getInternalIDInfo("tree"),tooltipResolver:this.tooltipResolver,onEzChange:e=>this.ezSelectionChange.emit(e.detail),selectedId:this.selectedId}))))}get _element(){return r(this)}};o.style=":host{--ez-guide-navigator--padding-left:var(--space--large);--ez-guide-navigator--padding-right:var(--space--small);--ez-guide-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-guide-navigator--background-color:var(--color--inverted);--ez-guide-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-guide-navigator--actions-gap:var(--space--medium);--ez-guide-navigator--actions-margin:var(--space--large) 0 var(--space--medium);--ez-guide-navigator--actions-padding-right:calc(var(--space--medium, 12px) + var(--space--small, 6px))}.inverted{transform:rotate(180deg)}.ez-guide-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;padding-left:var(--ez-guide-navigator--padding-left);padding-right:var(--ez-guide-navigator--padding-right);background-color:var(--ez-guide-navigator--background-color);-webkit-box-shadow:var(--ez-guide-navigator--box-shadow);box-shadow:var(--ez-guide-navigator--box-shadow);border-radius:var(--ez-guide-navigator--border-radius)}.ez-guide-navigator__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-guide-navigator--actions-gap);margin:var(--ez-guide-navigator--actions-margin);padding-right:var(--ez-guide-navigator--actions-padding-right)}.hidden{display:none}";export{o as ez_guide_navigator}
1
+ import{r as e,c as a,h as i,H as t,g as r}from"./p-e4c7eb39.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{E as n}from"./p-98bb8b16.js";const o=class{constructor(i){e(this,i),this.ezSelectionChange=a(this,"ezSelectionChange",7),this.open=!0,this.selectedId=void 0,this.items=[],this.tooltipResolver=void 0,this.filterText=""}async disableItem(e){[].concat(e).forEach((e=>this._tree.disableItem(e)))}async openGuideNavidator(){this.open=!0}async enableItem(e){[].concat(e).forEach((e=>this._tree.enableItem(e)))}async updateItem(e){[].concat(e).forEach((e=>this._tree.updateItem(e)))}async getItem(e){return this._tree.getItem(e)}async getCurrentPath(){var e;return null===(e=this._tree)||void 0===e?void 0:e.getCurrentPath()}async selectGuide(e){null!=this._tree&&null!=e&&(this._tree.selectItem(e),this.getCurrentPath().then((e=>{null==e||e.forEach((e=>{this._tree.openItem(e.id)}))})))}async getParent(e){return this._tree.getParent(e)}async handleToggleSidebar(){this.open=!this.open}handleFilterTree(e){"Enter"===e.key&&this._tree.applyFilter(this.filterText)}onFilterChanged(e){this.filterText=e.detail,e.stopPropagation()}render(){return s.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.handleToggleSidebar.bind(this),"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":s.getInternalIDInfo("openButton")}),i("aside",{tabIndex:-1,id:"navigator",class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-guide-navigator "+(this.open?"":"hidden"),"data-element-id":s.getInternalIDInfo("sidebar")},i("div",{role:"search",class:"ez-guide-navigator__actions"},i("ez-filter-input",{mode:"slim",value:this.filterText,onEzChange:e=>this.onFilterChanged(e),label:"Buscar guia","aria-placeholder":"Buscar guia",onKeyUp:this.handleFilterTree.bind(this),"data-element-id":s.getInternalIDInfo("textinput")}),i("ez-button",{onClick:this.handleToggleSidebar.bind(this),class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:"Ocultar menu","aria-label":"Ocultar menu","aria-controls":"navigator","data-element-id":s.getInternalIDInfo("closeButton")})),i("ez-scroller",{direction:n.VERTICAL,activeShadow:!0},i("ez-tree",{ref:e=>this._tree=e,items:this.items,"data-element-id":s.getInternalIDInfo("tree"),tooltipResolver:this.tooltipResolver,onEzChange:e=>this.ezSelectionChange.emit(e.detail),selectedId:this.selectedId}))))}get _element(){return r(this)}};o.style=":host{--ez-guide-navigator--padding-left:var(--space--large);--ez-guide-navigator--padding-right:var(--space--small);--ez-guide-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-guide-navigator--background-color:var(--color--inverted);--ez-guide-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-guide-navigator--actions-gap:var(--space--medium);--ez-guide-navigator--actions-margin:var(--space--large) 0 var(--space--medium);--ez-guide-navigator--actions-padding-right:calc(var(--space--medium, 12px) + var(--space--small, 6px))}.inverted{transform:rotate(180deg)}.ez-guide-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;padding-left:var(--ez-guide-navigator--padding-left);padding-right:var(--ez-guide-navigator--padding-right);background-color:var(--ez-guide-navigator--background-color);-webkit-box-shadow:var(--ez-guide-navigator--box-shadow);box-shadow:var(--ez-guide-navigator--box-shadow);border-radius:var(--ez-guide-navigator--border-radius)}.ez-guide-navigator__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-guide-navigator--actions-gap);margin:var(--ez-guide-navigator--actions-margin);padding-right:var(--ez-guide-navigator--actions-padding-right)}.hidden{display:none}";export{o as ez_guide_navigator}
@@ -0,0 +1,9 @@
1
+ import { IChartRenderingStrategy } from "../interfaces";
2
+ import { BaseHighChartsRender } from "../types/BaseHighChartsRender";
3
+ import { ChartOptions } from '../interfaces/ChartOptions';
4
+ export declare class BarChartStrategy extends BaseHighChartsRender implements IChartRenderingStrategy {
5
+ private chart;
6
+ private buildOptions;
7
+ render(container: any, series: any, xAxis: any, yAxis: any, options: ChartOptions): void;
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IChartRenderingStrategy } from "../interfaces";
2
+ import { BaseHighChartsRender } from "../types/BaseHighChartsRender";
3
+ import { ChartOptions } from '../interfaces/ChartOptions';
4
+ export declare class ColumnChartStrategy extends BaseHighChartsRender implements IChartRenderingStrategy {
5
+ private chart;
6
+ private buildOptions;
7
+ render(container: any, series: any, xAxis: any, yAxis: any, options: ChartOptions): void;
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IChartRenderingStrategy } from "../interfaces";
2
+ import { BaseHighChartsRender } from "../types/BaseHighChartsRender";
3
+ import { ChartOptions } from '../interfaces/ChartOptions';
4
+ export declare class DonutChartStrategy extends BaseHighChartsRender implements IChartRenderingStrategy {
5
+ private chart;
6
+ private buildOptions;
7
+ render(container: any, series: any, _xAxis: any, _yAxis: any, options: ChartOptions): void;
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IChartRenderingStrategy } from "../interfaces";
2
+ import { BaseHighChartsRender } from "../types/BaseHighChartsRender";
3
+ import { ChartOptions } from '../interfaces/ChartOptions';
4
+ export declare class LineChartStrategy extends BaseHighChartsRender implements IChartRenderingStrategy {
5
+ private chart;
6
+ private buildOptions;
7
+ render(container: any, series: any, xAxis: any, yAxis: any, options: ChartOptions): void;
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IChartRenderingStrategy } from "../interfaces";
2
+ import { BaseHighChartsRender } from "../types/BaseHighChartsRender";
3
+ import { ChartOptions } from '../interfaces/ChartOptions';
4
+ export declare class PieChartStrategy extends BaseHighChartsRender implements IChartRenderingStrategy {
5
+ private chart;
6
+ private buildOptions;
7
+ render(container: any, series: any, _xAxis: any, _yAxis: any, options: ChartOptions): void;
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,5 @@
1
+ export * from './BarChart';
2
+ export * from './ColumnChart';
3
+ export * from './DonutChart';
4
+ export * from './LineChart';
5
+ export * from './PieChart';
@@ -0,0 +1,58 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { ChartAxis, ChartType } from './interfaces';
3
+ import { ChartSerie, SerieClickEvent } from './interfaces/ChartSerie';
4
+ export declare class EzChart {
5
+ private _container;
6
+ /**
7
+ * Define o tipo de gráfico apresentado pelo componente
8
+ */
9
+ type: ChartType;
10
+ /**
11
+ * Definições do eixo X do gráfico
12
+ */
13
+ xAxis: ChartAxis | Array<ChartAxis>;
14
+ /**
15
+ * Definições do eixo Y do gráfico
16
+ */
17
+ yAxis: ChartAxis | Array<ChartAxis>;
18
+ /**
19
+ * Define o titulo a ser apresentado no gráfico
20
+ */
21
+ chartTitle: string;
22
+ /**
23
+ * Define o sub titulo a ser apresentado no gráfico
24
+ */
25
+ chartSubTitle: string;
26
+ /**
27
+ * Define se a legenda do gráfico deve ser apresentada ou não.
28
+ */
29
+ legendEnabled: boolean;
30
+ /**
31
+ * Define as series a serem apresentadas no gráfico
32
+ */
33
+ series: ChartSerie | Array<ChartSerie>;
34
+ /**
35
+ * Define uma largura do gráfico
36
+ */
37
+ width: number;
38
+ /**
39
+ * Define a altura do gráfico
40
+ */
41
+ height: number;
42
+ /**
43
+ * Evento emitido quando ocorre um click em uma serie do gráfico
44
+ */
45
+ ezSerieClick: EventEmitter<SerieClickEvent>;
46
+ private chartContext;
47
+ private readonly STRATEGY_BY_CHART_TYPE;
48
+ constructor();
49
+ private initializeStrategies;
50
+ private renderChart;
51
+ componentWillLoad(): void;
52
+ componentWillUpdate(): void;
53
+ componentDidLoad(): void;
54
+ disconnectedCallback(): void;
55
+ handleTypeChange(): void;
56
+ private setChartStrategy;
57
+ render(): any;
58
+ }
@@ -0,0 +1,7 @@
1
+ export type ChartAxis = {
2
+ color?: string;
3
+ categories?: Array<string>;
4
+ formatter?: (value: number | string) => string;
5
+ text?: string;
6
+ invertedPosition?: boolean;
7
+ };
@@ -0,0 +1,11 @@
1
+ import { ChartAxis } from "./ChartAxis";
2
+ import { ChartOptions } from "./ChartOptions";
3
+ import { ChartSerie } from "./ChartSerie";
4
+ import { IChartRenderingStrategy } from "./ChartStrategies";
5
+ export declare class ChartContext {
6
+ private strategy;
7
+ constructor(strategy: IChartRenderingStrategy);
8
+ setStrategy(strategy: IChartRenderingStrategy): void;
9
+ render(container: HTMLElement, series: ChartSerie | Array<ChartSerie>, xAxis?: ChartAxis | Array<ChartAxis>, yAxis?: ChartAxis | Array<ChartAxis>, options?: ChartOptions): void;
10
+ destroy(): void;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { EventEmitter } from "../../../stencil-public-runtime";
2
+ import { SerieClickEvent } from "./ChartSerie";
3
+ export type ChartOptions = {
4
+ title?: string;
5
+ subTitle?: string;
6
+ legendEnabled?: boolean;
7
+ onClickSerie?: EventEmitter<SerieClickEvent>;
8
+ height?: number;
9
+ width?: number;
10
+ };
@@ -0,0 +1,20 @@
1
+ export type ChartSerie = {
2
+ data: Array<number | ChartSerieData>;
3
+ name?: string;
4
+ color?: string;
5
+ type?: 'column' | 'line' | 'bar';
6
+ yAxis?: number;
7
+ toolTipFormatter?: (serieName: string, xAxis: string | number, yAxis: number, dataName: string, percentage: number) => string;
8
+ showDataLabel?: boolean;
9
+ };
10
+ export type ChartSerieData = {
11
+ name: string;
12
+ y: number;
13
+ color?: string;
14
+ };
15
+ export type SerieClickEvent = {
16
+ name: string;
17
+ data: Array<number>;
18
+ type: string;
19
+ yAxis: number;
20
+ };
@@ -0,0 +1,7 @@
1
+ import { ChartAxis } from "./ChartAxis";
2
+ import { ChartOptions } from "./ChartOptions";
3
+ import { ChartSerie } from "./ChartSerie";
4
+ export interface IChartRenderingStrategy {
5
+ render(container: HTMLElement, series: ChartSerie | Array<ChartSerie>, xAxis?: ChartAxis | Array<ChartAxis>, yAxis?: ChartAxis | Array<ChartAxis>, options?: ChartOptions): void;
6
+ destroy(): void;
7
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum ChartType {
2
+ COLUMN = "column",
3
+ BAR = "bar",
4
+ LINE = "line",
5
+ PIE = "pie",
6
+ DONUT = "donut"
7
+ }
@@ -0,0 +1,5 @@
1
+ export * from './ChartContext';
2
+ export * from './ChartStrategies';
3
+ export * from './ChartType';
4
+ export * from './ChartAxis';
5
+ export * from './ChartSerie';
@@ -0,0 +1,15 @@
1
+ import { EventEmitter } from "../../../stencil-public-runtime";
2
+ import { Options, PointClickCallbackFunction, ResponsiveOptions, SeriesOptionsType, SubtitleOptions, TitleOptions, TooltipOptions, XAxisOptions, YAxisOptions } from "highcharts";
3
+ import { ChartAxis, ChartSerie } from "../interfaces";
4
+ export declare class BaseHighChartsRender {
5
+ parseSerie(series: ChartSerie | Array<ChartSerie>): Array<SeriesOptionsType>;
6
+ parseAxis(axis: ChartAxis | Array<ChartAxis>): YAxisOptions | XAxisOptions | Array<YAxisOptions | XAxisOptions>;
7
+ parseTitle(title: string): TitleOptions;
8
+ parseSubTitle(subTtile: string): SubtitleOptions;
9
+ buildFormatterTooltip(series: ChartSerie | Array<ChartSerie>): TooltipOptions;
10
+ buildOnClickCallBack(evt: EventEmitter): PointClickCallbackFunction;
11
+ buildResposiveConfig(): ResponsiveOptions;
12
+ buildDefaultChartOptions(): Options;
13
+ private chartSerieToSeriesOptions;
14
+ private chartAxisToAxisOptions;
15
+ }
@@ -11,6 +11,8 @@ import { SlotBuilder } from "./components/ez-list/ez-list";
11
11
  import { IPosition } from "./components/ez-badge/interfaces/IPosition";
12
12
  import { IBreadcrumbItem } from "./components/ez-breadcrumb/ez-breadcrumb";
13
13
  import { CardItem } from "./components/ez-card-item/ez-card-item";
14
+ import { ChartAxis, ChartType } from "./components/ez-chart/interfaces";
15
+ import { ChartSerie, SerieClickEvent } from "./components/ez-chart/interfaces/ChartSerie";
14
16
  import { CheckMode } from "./components/ez-check/CheckMode";
15
17
  import { IEzCheckBoxListPosition, IOption, ISearchArgument } from "./components/ez-combo-box/ez-combo-box";
16
18
  import { ICustomEditor } from "./utils/customEditor/interfaces/ICustomEditor";
@@ -245,6 +247,44 @@ export namespace Components {
245
247
  */
246
248
  "item": CardItem;
247
249
  }
250
+ interface EzChart {
251
+ /**
252
+ * Define o sub titulo a ser apresentado no gráfico
253
+ */
254
+ "chartSubTitle": string;
255
+ /**
256
+ * Define o titulo a ser apresentado no gráfico
257
+ */
258
+ "chartTitle": string;
259
+ /**
260
+ * Define a altura do gráfico
261
+ */
262
+ "height": number;
263
+ /**
264
+ * Define se a legenda do gráfico deve ser apresentada ou não.
265
+ */
266
+ "legendEnabled": boolean;
267
+ /**
268
+ * Define as series a serem apresentadas no gráfico
269
+ */
270
+ "series": ChartSerie | Array<ChartSerie>;
271
+ /**
272
+ * Define o tipo de gráfico apresentado pelo componente
273
+ */
274
+ "type": ChartType;
275
+ /**
276
+ * Define uma largura do gráfico
277
+ */
278
+ "width": number;
279
+ /**
280
+ * Definições do eixo X do gráfico
281
+ */
282
+ "xAxis": ChartAxis | Array<ChartAxis>;
283
+ /**
284
+ * Definições do eixo Y do gráfico
285
+ */
286
+ "yAxis": ChartAxis | Array<ChartAxis>;
287
+ }
248
288
  interface EzCheck {
249
289
  /**
250
290
  * Define o modo compacto com espaçamento menor entre label e o input
@@ -1764,6 +1804,10 @@ export interface EzCardItemCustomEvent<T> extends CustomEvent<T> {
1764
1804
  detail: T;
1765
1805
  target: HTMLEzCardItemElement;
1766
1806
  }
1807
+ export interface EzChartCustomEvent<T> extends CustomEvent<T> {
1808
+ detail: T;
1809
+ target: HTMLEzChartElement;
1810
+ }
1767
1811
  export interface EzCheckCustomEvent<T> extends CustomEvent<T> {
1768
1812
  detail: T;
1769
1813
  target: HTMLEzCheckElement;
@@ -1951,6 +1995,12 @@ declare global {
1951
1995
  prototype: HTMLEzCardItemElement;
1952
1996
  new (): HTMLEzCardItemElement;
1953
1997
  };
1998
+ interface HTMLEzChartElement extends Components.EzChart, HTMLStencilElement {
1999
+ }
2000
+ var HTMLEzChartElement: {
2001
+ prototype: HTMLEzChartElement;
2002
+ new (): HTMLEzChartElement;
2003
+ };
1954
2004
  interface HTMLEzCheckElement extends Components.EzCheck, HTMLStencilElement {
1955
2005
  }
1956
2006
  var HTMLEzCheckElement: {
@@ -2219,6 +2269,7 @@ declare global {
2219
2269
  "ez-button": HTMLEzButtonElement;
2220
2270
  "ez-calendar": HTMLEzCalendarElement;
2221
2271
  "ez-card-item": HTMLEzCardItemElement;
2272
+ "ez-chart": HTMLEzChartElement;
2222
2273
  "ez-check": HTMLEzCheckElement;
2223
2274
  "ez-chip": HTMLEzChipElement;
2224
2275
  "ez-collapsible-box": HTMLEzCollapsibleBoxElement;
@@ -2459,6 +2510,48 @@ declare namespace LocalJSX {
2459
2510
  */
2460
2511
  "onEzClick"?: (event: EzCardItemCustomEvent<CardItem>) => void;
2461
2512
  }
2513
+ interface EzChart {
2514
+ /**
2515
+ * Define o sub titulo a ser apresentado no gráfico
2516
+ */
2517
+ "chartSubTitle"?: string;
2518
+ /**
2519
+ * Define o titulo a ser apresentado no gráfico
2520
+ */
2521
+ "chartTitle"?: string;
2522
+ /**
2523
+ * Define a altura do gráfico
2524
+ */
2525
+ "height"?: number;
2526
+ /**
2527
+ * Define se a legenda do gráfico deve ser apresentada ou não.
2528
+ */
2529
+ "legendEnabled"?: boolean;
2530
+ /**
2531
+ * Evento emitido quando ocorre um click em uma serie do gráfico
2532
+ */
2533
+ "onEzSerieClick"?: (event: EzChartCustomEvent<SerieClickEvent>) => void;
2534
+ /**
2535
+ * Define as series a serem apresentadas no gráfico
2536
+ */
2537
+ "series"?: ChartSerie | Array<ChartSerie>;
2538
+ /**
2539
+ * Define o tipo de gráfico apresentado pelo componente
2540
+ */
2541
+ "type"?: ChartType;
2542
+ /**
2543
+ * Define uma largura do gráfico
2544
+ */
2545
+ "width"?: number;
2546
+ /**
2547
+ * Definições do eixo X do gráfico
2548
+ */
2549
+ "xAxis"?: ChartAxis | Array<ChartAxis>;
2550
+ /**
2551
+ * Definições do eixo Y do gráfico
2552
+ */
2553
+ "yAxis"?: ChartAxis | Array<ChartAxis>;
2554
+ }
2462
2555
  interface EzCheck {
2463
2556
  /**
2464
2557
  * Define o modo compacto com espaçamento menor entre label e o input
@@ -3810,6 +3903,7 @@ declare namespace LocalJSX {
3810
3903
  "ez-button": EzButton;
3811
3904
  "ez-calendar": EzCalendar;
3812
3905
  "ez-card-item": EzCardItem;
3906
+ "ez-chart": EzChart;
3813
3907
  "ez-check": EzCheck;
3814
3908
  "ez-chip": EzChip;
3815
3909
  "ez-collapsible-box": EzCollapsibleBox;
@@ -3868,6 +3962,7 @@ declare module "@stencil/core" {
3868
3962
  "ez-button": LocalJSX.EzButton & JSXBase.HTMLAttributes<HTMLEzButtonElement>;
3869
3963
  "ez-calendar": LocalJSX.EzCalendar & JSXBase.HTMLAttributes<HTMLEzCalendarElement>;
3870
3964
  "ez-card-item": LocalJSX.EzCardItem & JSXBase.HTMLAttributes<HTMLEzCardItemElement>;
3965
+ "ez-chart": LocalJSX.EzChart & JSXBase.HTMLAttributes<HTMLEzChartElement>;
3871
3966
  "ez-check": LocalJSX.EzCheck & JSXBase.HTMLAttributes<HTMLEzCheckElement>;
3872
3967
  "ez-chip": LocalJSX.EzChip & JSXBase.HTMLAttributes<HTMLEzChipElement>;
3873
3968
  "ez-collapsible-box": LocalJSX.EzCollapsibleBox & JSXBase.HTMLAttributes<HTMLEzCollapsibleBoxElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "5.21.0-dev.16",
3
+ "version": "5.21.0-dev.17",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -67,6 +67,7 @@
67
67
  "gulp": "^4.0.2",
68
68
  "gulp-run": "^1.7.1",
69
69
  "gulp-watch": "^5.0.1",
70
+ "highcharts": "^11.4.7",
70
71
  "http-server": "^0.12.3",
71
72
  "husky": "^8.0.3",
72
73
  "jest": "^26.6.3",