@ganpatiinfo/gids-core-web 14.0.0 → 15.0.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 (235) hide show
  1. package/dist/css/index.css +5386 -4888
  2. package/dist/css/index.css.map +1 -1
  3. package/dist/gids-action-bar.d.ts +1 -1
  4. package/dist/gids-action-bar.js +1 -1
  5. package/dist/gids-activity-gauge.d.ts +1 -1
  6. package/dist/gids-activity-gauge.js +1 -1
  7. package/dist/gids-advanced-tooltip.d.ts +1 -1
  8. package/dist/gids-advanced-tooltip.js +1 -1
  9. package/dist/gids-bar-chart.d.ts +1 -1
  10. package/dist/gids-bar-chart.js +1 -1
  11. package/dist/gids-calendar-header-panel.d.ts +1 -1
  12. package/dist/gids-calendar-header-panel.js +1 -1
  13. package/dist/gids-calendar-month-list.d.ts +1 -1
  14. package/dist/gids-calendar-month-list.js +1 -1
  15. package/dist/gids-calendar-year-list.d.ts +1 -1
  16. package/dist/gids-calendar-year-list.js +1 -1
  17. package/dist/gids-calendar.d.ts +1 -1
  18. package/dist/gids-calendar.js +1 -1
  19. package/dist/gids-chart-legend-item.d.ts +1 -1
  20. package/dist/gids-chart-legend-item.js +1 -1
  21. package/dist/gids-chart-legend.d.ts +1 -1
  22. package/dist/gids-chart-legend.js +1 -1
  23. package/dist/gids-chart.d.ts +1 -1
  24. package/dist/gids-chart.js +1 -1
  25. package/dist/gids-chevron-button.d.ts +1 -1
  26. package/dist/gids-chevron-button.js +1 -1
  27. package/dist/gids-dot.d.ts +1 -1
  28. package/dist/gids-dot.js +1 -1
  29. package/dist/gids-dropdown-field.d.ts +1 -1
  30. package/dist/gids-dropdown-field.js +1 -1
  31. package/dist/gids-dropdown-picker.d.ts +1 -1
  32. package/dist/gids-dropdown-picker.js +1 -1
  33. package/dist/gids-dropdown.d.ts +1 -1
  34. package/dist/gids-dropdown.js +1 -1
  35. package/dist/gids-expansion-body-list-item.d.ts +1 -1
  36. package/dist/gids-expansion-body-list-item.js +1 -1
  37. package/dist/gids-expansion-body-list.d.ts +1 -1
  38. package/dist/gids-expansion-body-list.js +1 -1
  39. package/dist/gids-expansion-group.d.ts +1 -1
  40. package/dist/gids-expansion-group.js +1 -1
  41. package/dist/gids-expansion.d.ts +1 -1
  42. package/dist/gids-expansion.js +1 -1
  43. package/dist/gids-field.d.ts +1 -1
  44. package/dist/gids-field.js +1 -1
  45. package/dist/gids-filter.d.ts +1 -1
  46. package/dist/gids-filter.js +1 -1
  47. package/dist/gids-icon.d.ts +1 -1
  48. package/dist/gids-icon.js +1 -1
  49. package/dist/gids-input.d.ts +1 -1
  50. package/dist/gids-input.js +1 -1
  51. package/dist/gids-level-gauge.d.ts +1 -1
  52. package/dist/gids-line-chart.d.ts +1 -1
  53. package/dist/gids-line-chart.js +1 -1
  54. package/dist/gids-md-table.d.ts +1 -1
  55. package/dist/gids-md-table.js +1 -1
  56. package/dist/gids-notification.d.ts +1 -1
  57. package/dist/gids-overflow-container.d.ts +1 -1
  58. package/dist/gids-overflow-container.js +1 -1
  59. package/dist/gids-overlay-provider.d.ts +1 -1
  60. package/dist/gids-overlay-provider.js +1 -1
  61. package/dist/gids-password-field.d.ts +1 -1
  62. package/dist/gids-password-field.js +1 -1
  63. package/dist/gids-pie-chart.d.ts +1 -1
  64. package/dist/gids-pie-chart.js +1 -1
  65. package/dist/gids-popover.d.ts +1 -1
  66. package/dist/gids-popover.js +1 -1
  67. package/dist/gids-progress-circle.d.ts +1 -1
  68. package/dist/gids-scrim.d.ts +1 -1
  69. package/dist/gids-scrim.js +1 -1
  70. package/dist/gids-skeleton.d.ts +11 -0
  71. package/dist/gids-skeleton.js +1 -0
  72. package/dist/gids-snackbar.d.ts +1 -1
  73. package/dist/gids-tab-item.d.ts +1 -1
  74. package/dist/gids-tab-item.js +1 -1
  75. package/dist/gids-tab.d.ts +1 -1
  76. package/dist/gids-tab.js +1 -1
  77. package/dist/gids-text-field.d.ts +1 -1
  78. package/dist/gids-text-field.js +1 -1
  79. package/dist/gids-toggle-button.d.ts +1 -1
  80. package/dist/gids-toggle-button.js +1 -1
  81. package/dist/gids-tooltip.d.ts +1 -1
  82. package/dist/gids-tooltip.js +1 -1
  83. package/dist/gids-transfer-list.d.ts +11 -0
  84. package/dist/gids-transfer-list.js +1 -0
  85. package/dist/p-474lVBcu.js +1 -0
  86. package/dist/{p-_HwuS8vK.js → p-9NZjfY_u.js} +1 -1
  87. package/dist/{p-Bh8qYmAS.js → p-B0Nc9rVM.js} +1 -1
  88. package/dist/{p-Bab1qxsC.js → p-BF46eY8H.js} +1 -1
  89. package/dist/{p-jzl-rPxB.js → p-BKIsp763.js} +1 -1
  90. package/dist/{p-BVA1LAFM.js → p-BgvpzBUx.js} +1 -1
  91. package/dist/{p-BYt-9DKT.js → p-BtKwhIx5.js} +1 -1
  92. package/dist/{p-DAnkY5ik.js → p-CLm5opt9.js} +1 -1
  93. package/dist/{p-C_RW9IFo.js → p-CZxn31uZ.js} +1 -1
  94. package/dist/{p-CU5JIcEp.js → p-Cyant-dw.js} +1 -1
  95. package/dist/{p-Dan1sCNk.js → p-D7qanqNO.js} +1 -1
  96. package/dist/{p-CnVmK0dH.js → p-DGenc1qz.js} +1 -1
  97. package/dist/{p-D5DRatg0.js → p-DLauG0q8.js} +1 -1
  98. package/dist/{p-DMVCMnTe.js → p-DaqhrFRM.js} +1 -1
  99. package/dist/{p-BzzDNTlP.js → p-Db4qRSmH.js} +1 -1
  100. package/dist/{p-DslOQITw.js → p-Df5xaj-o.js} +1 -1
  101. package/dist/{p-1fMG8D4t.js → p-DhtEw_C2.js} +1 -1
  102. package/dist/{p-BV0jg2ix.js → p-DshXkAUj.js} +1 -1
  103. package/dist/{p-DUUxlY-K.js → p-Dvh4sPkD.js} +1 -1
  104. package/dist/p-Iqbf3Pja.js +1 -0
  105. package/dist/{p-CatvDz2b.js → p-MnCDY1k9.js} +1 -1
  106. package/dist/types/components/html/GidsCrossTable/GidsCrossTable.d.ts +17 -0
  107. package/dist/types/components/html/GidsCrossTableBody/GidsCrossTableBody.d.ts +12 -0
  108. package/dist/types/components/html/GidsCrossTableRow/GidsCrossTableRow.d.ts +12 -0
  109. package/dist/types/components/html/GidsDialog/GidsDialog.d.ts +12 -0
  110. package/dist/types/components/html/GidsMatrixTable/GidsMatrixTable.d.ts +20 -0
  111. package/dist/types/components/html/GidsMatrixTableBody/GidsMatrixTableBody.d.ts +20 -0
  112. package/dist/types/components/html/GidsMenu/GidsMenu.d.ts +3 -3
  113. package/dist/types/components/html/GidsMenuGroup/GidsMenuGroup.d.ts +3 -3
  114. package/dist/types/components/html/GidsTable/GidsTable.d.ts +1 -1
  115. package/dist/types/components/html/GidsTableFooter/GidsTableFooter.d.ts +3 -3
  116. package/dist/types/components/html/GidsTableFooterControl/GidsTableFooterControl.d.ts +1 -1
  117. package/dist/types/components/html/GidsTableHeader/GidsTableHeader.d.ts +1 -1
  118. package/dist/types/components/html/GidsTableRow/GidsTableRow.d.ts +1 -1
  119. package/dist/types/components/html/_GidsDialogControl/GidsDialogControl.d.ts +8 -0
  120. package/dist/types/components/webComponents/GidsSkeleton/GidsSkeleton.d.ts +11 -0
  121. package/dist/types/components/webComponents/GidsTransferList/GidsTransferList.d.ts +49 -0
  122. package/dist/types/components.d.ts +131 -2
  123. package/dist-bundled/es/gids-action-bar.js +28 -27
  124. package/dist-bundled/es/gids-activity-gauge.js +1 -1
  125. package/dist-bundled/es/gids-advanced-tooltip.js +1 -1
  126. package/dist-bundled/es/gids-bar-chart.js +4 -4
  127. package/dist-bundled/es/gids-calendar-header-panel.js +3 -3
  128. package/dist-bundled/es/gids-calendar-month-list.js +1 -1
  129. package/dist-bundled/es/gids-calendar-year-list.js +1 -1
  130. package/dist-bundled/es/gids-calendar.js +23 -23
  131. package/dist-bundled/es/gids-chart-legend-item.js +1 -1
  132. package/dist-bundled/es/gids-chart-legend.js +4 -4
  133. package/dist-bundled/es/gids-chart.js +11 -11
  134. package/dist-bundled/es/gids-chevron-button.js +10 -10
  135. package/dist-bundled/es/gids-dot.js +3 -3
  136. package/dist-bundled/es/gids-dropdown-field.js +5 -5
  137. package/dist-bundled/es/gids-dropdown-picker.js +4 -4
  138. package/dist-bundled/es/gids-dropdown.js +1 -1
  139. package/dist-bundled/es/gids-expansion-body-list-item.js +3 -3
  140. package/dist-bundled/es/gids-expansion-body-list.js +2 -2
  141. package/dist-bundled/es/gids-expansion-group.js +12 -12
  142. package/dist-bundled/es/gids-expansion.js +6 -6
  143. package/dist-bundled/es/gids-field.js +3 -3
  144. package/dist-bundled/es/gids-filter.js +1 -1
  145. package/dist-bundled/es/gids-icon.js +3 -3
  146. package/dist-bundled/es/gids-input.js +4 -4
  147. package/dist-bundled/es/gids-level-gauge.js +1 -1
  148. package/dist-bundled/es/gids-line-chart.js +4 -4
  149. package/dist-bundled/es/gids-md-table.js +77 -77
  150. package/dist-bundled/es/gids-overflow-container.js +1 -1
  151. package/dist-bundled/es/gids-overlay-provider.js +20 -20
  152. package/dist-bundled/es/gids-password-field.js +53 -53
  153. package/dist-bundled/es/gids-pie-chart.js +4 -4
  154. package/dist-bundled/es/gids-popover.js +1 -1
  155. package/dist-bundled/es/gids-progress-circle.js +1 -1
  156. package/dist-bundled/es/gids-scrim.js +1 -1
  157. package/dist-bundled/es/gids-skeleton.js +41 -0
  158. package/dist-bundled/es/gids-tab-item.js +10 -10
  159. package/dist-bundled/es/gids-tab.js +4 -4
  160. package/dist-bundled/es/gids-text-field.js +15 -15
  161. package/dist-bundled/es/gids-toggle-button.js +1 -1
  162. package/dist-bundled/es/gids-tooltip.js +1 -1
  163. package/dist-bundled/es/gids-transfer-list.js +196 -0
  164. package/dist-bundled/es/p-474lVBcu-B1f8x2o1.js +31 -0
  165. package/dist-bundled/es/{p-_HwuS8vK-C0w4T5rV.js → p-9NZjfY_u-CnjUEy1y.js} +2 -2
  166. package/dist-bundled/es/{p-Bh8qYmAS-DhSpwB20.js → p-B0Nc9rVM-SBit1KrF.js} +6 -6
  167. package/dist-bundled/es/{p-Bab1qxsC-BMbD0lEy.js → p-BF46eY8H-Xn8Fl9EI.js} +3 -3
  168. package/dist-bundled/es/{p-jzl-rPxB-CC735zJp.js → p-BKIsp763-CqL9MgyZ.js} +7 -7
  169. package/dist-bundled/es/{p-BVA1LAFM-DdsY_n8R.js → p-BgvpzBUx-iq-eKBVZ.js} +7 -7
  170. package/dist-bundled/es/{p-BYt-9DKT-DByyhIUd.js → p-BtKwhIx5-DTEmfdxe.js} +6 -6
  171. package/dist-bundled/es/{p-CHGTBObD-EN4cCwtX.js → p-CHGTBObD-D_K9_Tmh.js} +15 -15
  172. package/dist-bundled/es/{p-DAnkY5ik-ChPtRpOX.js → p-CLm5opt9-DlxkI38w.js} +2 -2
  173. package/dist-bundled/es/{p-C_RW9IFo-DNQqJS8t.js → p-CZxn31uZ-BBHM983b.js} +10 -10
  174. package/dist-bundled/es/{p-CoS0NuDU-CqmDcRWj.js → p-CoS0NuDU-ByDvQAzA.js} +1 -1
  175. package/dist-bundled/es/{p-CU5JIcEp-CuVpd-eZ.js → p-Cyant-dw-Ch2zYNkx.js} +7 -7
  176. package/dist-bundled/es/{p-Dan1sCNk-mWcyyplK.js → p-D7qanqNO-Dby5jSjA.js} +14 -14
  177. package/dist-bundled/es/{p-CnVmK0dH-CbmnN-RR.js → p-DGenc1qz-CMwVEtCm.js} +5 -5
  178. package/dist-bundled/es/{p-D5DRatg0-DtQL-DQg.js → p-DLauG0q8-CCUuzYl9.js} +6 -6
  179. package/dist-bundled/es/{p-DMNS1d8v-CHF62UXm.js → p-DMNS1d8v-BX8e_AsY.js} +14 -14
  180. package/dist-bundled/es/{p-DMVCMnTe-D4eJKJsj.js → p-DaqhrFRM-2PqBeu5o.js} +4 -4
  181. package/dist-bundled/es/{p-BzzDNTlP-BkSyrafk.js → p-Db4qRSmH-B5pzOeve.js} +8 -8
  182. package/dist-bundled/es/{p-Degg_WJz-BLua06el.js → p-Degg_WJz-ORZcjc8G.js} +1 -1
  183. package/dist-bundled/es/{p-DslOQITw-BfwtLWqG.js → p-Df5xaj-o-fxAXUmag.js} +7 -7
  184. package/dist-bundled/es/{p-Dg2yoUxw-Cca8ROd_.js → p-Dg2yoUxw-DliMstZy.js} +8 -8
  185. package/dist-bundled/es/{p-1fMG8D4t-CIEDM74u.js → p-DhtEw_C2-D_91JSPC.js} +3 -3
  186. package/dist-bundled/es/{p-BV0jg2ix-DI0fZl_6.js → p-DshXkAUj-DgCiQIA2.js} +1 -1
  187. package/dist-bundled/es/{p-DUUxlY-K-mypBhVt6.js → p-Dvh4sPkD-B-T5C03p.js} +1 -1
  188. package/dist-bundled/es/p-Iqbf3Pja-DuajY4uD.js +52 -0
  189. package/dist-bundled/es/{p-CatvDz2b-C-Hlv2Xb.js → p-MnCDY1k9-CgbTyJ5R.js} +9 -9
  190. package/dist-bundled/es/{p-UVmSPzTd-6vjXok6h.js → p-UVmSPzTd-CR1higgJ.js} +1 -1
  191. package/dist-bundled/umd/gids-action-bar.umd.js +3 -3
  192. package/dist-bundled/umd/gids-activity-gauge.umd.js +1 -1
  193. package/dist-bundled/umd/gids-advanced-tooltip.umd.js +1 -1
  194. package/dist-bundled/umd/gids-bar-chart.umd.js +1 -1
  195. package/dist-bundled/umd/gids-calendar-header-panel.umd.js +2 -2
  196. package/dist-bundled/umd/gids-calendar-month-list.umd.js +2 -2
  197. package/dist-bundled/umd/gids-calendar-year-list.umd.js +2 -2
  198. package/dist-bundled/umd/gids-calendar.umd.js +1 -1
  199. package/dist-bundled/umd/gids-chart-legend-item.umd.js +1 -1
  200. package/dist-bundled/umd/gids-chart-legend.umd.js +1 -1
  201. package/dist-bundled/umd/gids-chart.umd.js +2 -2
  202. package/dist-bundled/umd/gids-chevron-button.umd.js +1 -1
  203. package/dist-bundled/umd/gids-dot.umd.js +1 -1
  204. package/dist-bundled/umd/gids-dropdown-field.umd.js +1 -1
  205. package/dist-bundled/umd/gids-dropdown-picker.umd.js +1 -1
  206. package/dist-bundled/umd/gids-dropdown.umd.js +1 -1
  207. package/dist-bundled/umd/gids-expansion-body-list-item.umd.js +1 -1
  208. package/dist-bundled/umd/gids-expansion-body-list.umd.js +1 -1
  209. package/dist-bundled/umd/gids-expansion-group.umd.js +1 -1
  210. package/dist-bundled/umd/gids-expansion.umd.js +1 -1
  211. package/dist-bundled/umd/gids-field.umd.js +1 -1
  212. package/dist-bundled/umd/gids-filter.umd.js +2 -2
  213. package/dist-bundled/umd/gids-icon.umd.js +1 -1
  214. package/dist-bundled/umd/gids-input.umd.js +2 -2
  215. package/dist-bundled/umd/gids-level-gauge.umd.js +1 -1
  216. package/dist-bundled/umd/gids-line-chart.umd.js +1 -1
  217. package/dist-bundled/umd/gids-md-table.umd.js +1 -1
  218. package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
  219. package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
  220. package/dist-bundled/umd/gids-password-field.umd.js +1 -1
  221. package/dist-bundled/umd/gids-pie-chart.umd.js +1 -1
  222. package/dist-bundled/umd/gids-popover.umd.js +1 -1
  223. package/dist-bundled/umd/gids-progress-circle.umd.js +1 -1
  224. package/dist-bundled/umd/gids-scrim.umd.js +1 -1
  225. package/dist-bundled/umd/gids-skeleton.umd.js +5 -0
  226. package/dist-bundled/umd/gids-tab-item.umd.js +2 -2
  227. package/dist-bundled/umd/gids-tab.umd.js +1 -1
  228. package/dist-bundled/umd/gids-text-field.umd.js +1 -1
  229. package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
  230. package/dist-bundled/umd/gids-tooltip.umd.js +1 -1
  231. package/dist-bundled/umd/gids-transfer-list.umd.js +5 -0
  232. package/dist-bundled/umd-complete/gids-core-web.umd.js +4 -4
  233. package/package.json +20 -4
  234. package/dist/p-D6lxqcxP.js +0 -1
  235. package/dist-bundled/es/p-D6lxqcxP-C6BOC0kV.js +0 -74
@@ -1 +1 @@
1
- import{t,p as i,H as e,h as a}from"./p-Bf3p-DY2.js";import{GidsLineChartWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-DMNS1d8v.js";import{G as l}from"./p-D4Pimu_8.js";import{d as n}from"./p-DUUxlY-K.js";import{d as o}from"./p-DslOQITw.js";import{d}from"./p-BV0jg2ix.js";const{getGidsLineChartClassNames:h}=s,g=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.legend="none",this.chartData=[],this.yAxisVisible=!1,this.dataPoints=[],this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0,this.hoveredIndex=null,this.tooltip={visible:!1,x:0,y:0}}chartDataChanged(){this.updateDimensions()}dataPointsChanged(t){this.dataPoints=t}legendChanged(t){this.legend=t}yAxisVisibilityChanged(t){this.yAxisVisible=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:300}getTooltipItems(t){return this.chartData.reduce(((i,e)=>{const a=e.data[t];return a?(i.push({label:e?.label??"",value:String(a.value),seriesIndicatorColor:e?.seriesColor??""}),i):i}),[])}render(){if(this.chartLoading)return a("div",{class:"gids-line-chart__no-data"},a(r,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.flatMap((t=>Array.isArray(t?.data)?t.data.map((t=>t.value)):[])),i=t.length>0?Math.max(...t):10,e=Math.pow(10,Math.floor(Math.log10(i||1)));let s=e;i/e<=2?s=e/5:i/e<=5&&(s=e/2);const n=Math.ceil(i/s)*s;let o=[];if(Array.isArray(this.dataPoints)&&this.dataPoints.length>0)o=[...this.dataPoints].sort(((t,i)=>t-i));else{const t=5,i=n/(t-1);for(let e=0;e<t;e++)o.push(Math.round(0+e*i))}const d=Math.max(...o,n)-0||1,g=this?.chartData?.[0]?.data?.map((t=>t.label))??[],c=g.length,p=h({breakpoint:this.breakpoint});let y=!1,_=!1;return"mobile"===this.breakpoint?"none"!==this.legend&&(y=!0):"top"===this.legend?y=!0:"right"===this.legend&&(_=!0),a("div",{class:p},y?a("div",{class:"gids-line-chart__header"},a("gids-chart-legend",{orientation:"horizontal"},this.chartData.map((t=>a("gids-chart-legend-item",{key:t.label,seriesColor:t?.seriesColor,orientation:"horizontal"},t.label))))):null,a("div",{class:"gids-line-chart__main-container"},a("div",{class:"gids-line-chart__grid-layout"},a("span",{class:"gids-line-chart__y-axis-label"},this.yAxisLabel),a("div",{class:"gids-line-chart__chart-stage-container"},this.yAxisVisible?a("div",{class:"gids-line-chart__y-axis-scale-container"},o.map((t=>a("span",{id:"y-value",class:"gids-line-chart__scale-text gids-line-chart__y-axis-scale-value",key:t,style:{bottom:(t-0)/d*100+"%"}},t)))):null,a("div",{class:"gids-line-chart__chart-stage"},a("svg",{viewBox:"0 0 100 100",class:"gids-line-chart__chart-vector",preserveAspectRatio:"none"},a("defs",null,this.chartData.map(((t,i)=>{const e=t?.fillGradientStartColor,s=t?.fillGradientEndColor;return a("linearGradient",{id:`areaGradient-${i}`,x1:"0",y1:"0",x2:"0",y2:"1",key:i},a("stop",{offset:"0%",style:{stopColor:e,stopOpacity:"1"}}),a("stop",{offset:"100%",style:{stopColor:s,stopOpacity:"0"}}))}))),o.map((t=>{const i=100-(t-0)/d*100;return a("line",{x1:"0",y1:i,x2:"100",y2:i,class:"gids-line-chart__grid-line",key:t})})),this.chartData.map(((t,i)=>{if(!Array.isArray(t.data)||t.data.length<2)return null;const e=t.data.map(((t,i)=>`${0===i?"M":"L"} ${i/(c-1)*100} ${100-(t.value-0)/d*100}`)).join(" ");return a("g",{key:t.label||i},a("path",{d:`${e} L 100 100 L 0 100 Z`,fill:`url(#areaGradient-${i})`,opacity:t?.fillOpacity??"0.1",class:"gids-line-chart__chart-area"}),a("path",{d:e,class:"gids-line-chart__chart-line",fill:"none",style:{stroke:t?.seriesColor,strokeWidth:"2px"}}))})),a("rect",{x:"0",y:"0",width:"100",height:"100",fill:"transparent","pointer-events":"all",onMouseMove:t=>{const i=t.currentTarget.getBoundingClientRect(),e=Math.round((t.clientX-i.left)/i.width*(c-1));this.hoveredIndex=e,this.tooltip={visible:!0,x:t.clientX,y:t.clientY}},onMouseLeave:()=>{this.hoveredIndex=null,this.tooltip={...this.tooltip,visible:!1}}})),null!==this.hoveredIndex&&this.chartData.map(((t,i)=>{if(null===this.hoveredIndex)return;const e=this.hoveredIndex,s=t.data[e];return s?a("div",{id:`chart-dot-${i}`,class:"gids-line-chart__hover-dot",style:{left:e/(c-1)*100+"%",top:100-(s.value-0)/d*100+"%"}},a(l,{name:"new",size:"xs",appearance:"filled",style:{"--gidsIcon-color":t.seriesColor}})):null})),a("gids-advanced-tooltip",{visible:this.tooltip.visible,x:this.tooltip.x,y:this.tooltip.y,items:null!==this.hoveredIndex?this.getTooltipItems(this.hoveredIndex):[]}))),a("div",{class:"gids-line-chart__x-axis-scale-container"},g.map(((t,i)=>a("span",{class:"gids-line-chart__scale-text",key:i},t)))),a("span",{class:"gids-line-chart__x-axis-label"},this.xAxisLabel)),_?a("gids-chart-legend",{orientation:"vertical"},this.chartData.map((t=>a("gids-chart-legend-item",{key:t.label,seriesColor:t?.seriesColor,orientation:"vertical"},t.label)))):null))}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-line-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-line-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-line-chart__main-container{display:flex;gap:var(--gids-gap-200)}.gids-line-chart__header{display:flex;justify-content:flex-end;align-items:center;width:100%;margin-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-line-chart__grid-layout{display:grid;grid-template-columns:auto 1fr;grid-template-rows:minmax(180px, 280px) auto auto;flex:1;width:100%;height:100%;box-sizing:border-box}.gids-line-chart__y-axis-label{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center;margin-right:var(--gids-padding-horizontal-edge-to-element-600);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}.gids-line-chart__chart-stage-container{grid-column:2;grid-row:1;position:relative;width:100%;height:100%;padding-left:var(--gids-container-padding-desktop);box-sizing:border-box}.gids-line-chart__y-axis-scale-container{position:absolute;top:0;bottom:0;left:0;width:calc(var(--gids-container-padding-desktop) - var(--gids-padding-horizontal-edge-to-element-100));pointer-events:none}.gids-line-chart__y-axis-scale-value{position:absolute;right:0;transform:translateY(50%);margin-right:var(--gids-padding-horizontal-edge-to-element-100)}.gids-line-chart__chart-stage{position:relative;width:100%;height:100%;border-bottom:var(--gids-border-width-thin) solid var(--gids-color-border-default);box-sizing:border-box}.gids-line-chart__chart-vector{display:block;width:100%;height:100%;overflow:visible}.gids-line-chart__grid-line{stroke:var(--gids-color-border-default);stroke-width:0.5;fill:none}.gids-line-chart__chart-area{stroke:none}.gids-line-chart__chart-line{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.gids-line-chart__x-axis-scale-container{display:flex;grid-column:2;grid-row:2;justify-content:space-between;align-items:center;padding-left:var(--gids-container-padding-desktop);padding-top:var(--gids-padding-vertical-edge-to-element-200);gap:var(--gids-gap-050);box-sizing:border-box}.gids-line-chart__x-axis-label{grid-column:2;grid-row:3;display:flex;justify-content:center;align-items:center;padding-top:var(--gids-padding-vertical-edge-to-element-100);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);white-space:nowrap}.gids-line-chart__scale-text{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);user-select:none;white-space:nowrap}.gids-line-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}.gids-line-chart__hover-dot{position:absolute;transform:translate(-50%, -50%);pointer-events:none;z-index:20}"}},[0,"gids-line-chart",{breakpoint:[1],legend:[1],chartData:[16],yAxisVisible:[4,"y-axis-visible"],xAxisLabel:[1,"x-axis-label"],yAxisLabel:[1,"y-axis-label"],dataPoints:[16],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32],hoveredIndex:[32],tooltip:[32]},void 0,{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-line-chart","gids-advanced-tooltip","gids-chart-legend","gids-chart-legend-item"].forEach((i=>{switch(i){case"gids-line-chart":customElements.get(t(i))||customElements.define(t(i),g);break;case"gids-advanced-tooltip":customElements.get(t(i))||n();break;case"gids-chart-legend":customElements.get(t(i))||o();break;case"gids-chart-legend-item":customElements.get(t(i))||d()}}))}c();export{g as G,c as d}
1
+ import{t,p as i,H as e,h as a}from"./p-Bf3p-DY2.js";import{GidsLineChartWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-DMNS1d8v.js";import{G as l}from"./p-D4Pimu_8.js";import{d as n}from"./p-Dvh4sPkD.js";import{d as o}from"./p-Df5xaj-o.js";import{d}from"./p-DshXkAUj.js";const{getGidsLineChartClassNames:h}=s,g=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.legend="none",this.chartData=[],this.yAxisVisible=!1,this.dataPoints=[],this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0,this.hoveredIndex=null,this.tooltip={visible:!1,x:0,y:0}}chartDataChanged(){this.updateDimensions()}dataPointsChanged(t){this.dataPoints=t}legendChanged(t){this.legend=t}yAxisVisibilityChanged(t){this.yAxisVisible=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:300}getTooltipItems(t){return this.chartData.reduce(((i,e)=>{const a=e.data[t];return a?(i.push({label:e?.label??"",value:String(a.value),seriesIndicatorColor:e?.seriesColor??""}),i):i}),[])}render(){if(this.chartLoading)return a("div",{class:"gids-line-chart__no-data"},a(r,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.flatMap((t=>Array.isArray(t?.data)?t.data.map((t=>t.value)):[])),i=t.length>0?Math.max(...t):10,e=Math.pow(10,Math.floor(Math.log10(i||1)));let s=e;i/e<=2?s=e/5:i/e<=5&&(s=e/2);const n=Math.ceil(i/s)*s;let o=[];if(Array.isArray(this.dataPoints)&&this.dataPoints.length>0)o=[...this.dataPoints].sort(((t,i)=>t-i));else{const t=5,i=n/(t-1);for(let e=0;e<t;e++)o.push(Math.round(0+e*i))}const d=Math.max(...o,n)-0||1,g=this?.chartData?.[0]?.data?.map((t=>t.label))??[],c=g.length,p=h({breakpoint:this.breakpoint});let y=!1,_=!1;return"mobile"===this.breakpoint?"none"!==this.legend&&(y=!0):"top"===this.legend?y=!0:"right"===this.legend&&(_=!0),a("div",{class:p},y?a("div",{class:"gids-line-chart__header"},a("gids-chart-legend",{orientation:"horizontal"},this.chartData.map((t=>a("gids-chart-legend-item",{key:t.label,seriesColor:t?.seriesColor,orientation:"horizontal"},t.label))))):null,a("div",{class:"gids-line-chart__main-container"},a("div",{class:"gids-line-chart__grid-layout"},a("span",{class:"gids-line-chart__y-axis-label"},this.yAxisLabel),a("div",{class:"gids-line-chart__chart-stage-container"},this.yAxisVisible?a("div",{class:"gids-line-chart__y-axis-scale-container"},o.map((t=>a("span",{id:"y-value",class:"gids-line-chart__scale-text gids-line-chart__y-axis-scale-value",key:t,style:{bottom:(t-0)/d*100+"%"}},t)))):null,a("div",{class:"gids-line-chart__chart-stage"},a("svg",{viewBox:"0 0 100 100",class:"gids-line-chart__chart-vector",preserveAspectRatio:"none"},a("defs",null,this.chartData.map(((t,i)=>{const e=t?.fillGradientStartColor,s=t?.fillGradientEndColor;return a("linearGradient",{id:`areaGradient-${i}`,x1:"0",y1:"0",x2:"0",y2:"1",key:i},a("stop",{offset:"0%",style:{stopColor:e,stopOpacity:"1"}}),a("stop",{offset:"100%",style:{stopColor:s,stopOpacity:"0"}}))}))),o.map((t=>{const i=100-(t-0)/d*100;return a("line",{x1:"0",y1:i,x2:"100",y2:i,class:"gids-line-chart__grid-line",key:t})})),this.chartData.map(((t,i)=>{if(!Array.isArray(t.data)||t.data.length<2)return null;const e=t.data.map(((t,i)=>`${0===i?"M":"L"} ${i/(c-1)*100} ${100-(t.value-0)/d*100}`)).join(" ");return a("g",{key:t.label||i},a("path",{d:`${e} L 100 100 L 0 100 Z`,fill:`url(#areaGradient-${i})`,opacity:t?.fillOpacity??"0.1",class:"gids-line-chart__chart-area"}),a("path",{d:e,class:"gids-line-chart__chart-line",fill:"none",style:{stroke:t?.seriesColor,strokeWidth:"2px"}}))})),a("rect",{x:"0",y:"0",width:"100",height:"100",fill:"transparent","pointer-events":"all",onMouseMove:t=>{const i=t.currentTarget.getBoundingClientRect(),e=Math.round((t.clientX-i.left)/i.width*(c-1));this.hoveredIndex=e,this.tooltip={visible:!0,x:t.clientX,y:t.clientY}},onMouseLeave:()=>{this.hoveredIndex=null,this.tooltip={...this.tooltip,visible:!1}}})),null!==this.hoveredIndex&&this.chartData.map(((t,i)=>{if(null===this.hoveredIndex)return;const e=this.hoveredIndex,s=t.data[e];return s?a("div",{id:`chart-dot-${i}`,class:"gids-line-chart__hover-dot",style:{left:e/(c-1)*100+"%",top:100-(s.value-0)/d*100+"%"}},a(l,{name:"new",size:"xs",appearance:"filled",style:{"--gidsIcon-color":t.seriesColor}})):null})),a("gids-advanced-tooltip",{visible:this.tooltip.visible,x:this.tooltip.x,y:this.tooltip.y,items:null!==this.hoveredIndex?this.getTooltipItems(this.hoveredIndex):[]}))),a("div",{class:"gids-line-chart__x-axis-scale-container"},g.map(((t,i)=>a("span",{class:"gids-line-chart__scale-text",key:i},t)))),a("span",{class:"gids-line-chart__x-axis-label"},this.xAxisLabel)),_?a("gids-chart-legend",{orientation:"vertical"},this.chartData.map((t=>a("gids-chart-legend-item",{key:t.label,seriesColor:t?.seriesColor,orientation:"vertical"},t.label)))):null))}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-line-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-line-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-line-chart__main-container{display:flex;gap:var(--gids-gap-200)}.gids-line-chart__header{display:flex;justify-content:flex-end;align-items:center;width:100%;margin-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-line-chart__grid-layout{display:grid;grid-template-columns:auto 1fr;grid-template-rows:minmax(180px, 280px) auto auto;flex:1;width:100%;height:100%;box-sizing:border-box}.gids-line-chart__y-axis-label{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center;margin-right:var(--gids-padding-horizontal-edge-to-element-600);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}.gids-line-chart__chart-stage-container{grid-column:2;grid-row:1;position:relative;width:100%;height:100%;padding-left:var(--gids-container-padding-desktop);box-sizing:border-box}.gids-line-chart__y-axis-scale-container{position:absolute;top:0;bottom:0;left:0;width:calc(var(--gids-container-padding-desktop) - var(--gids-padding-horizontal-edge-to-element-100));pointer-events:none}.gids-line-chart__y-axis-scale-value{position:absolute;right:0;transform:translateY(50%);margin-right:var(--gids-padding-horizontal-edge-to-element-100)}.gids-line-chart__chart-stage{position:relative;width:100%;height:100%;border-bottom:var(--gids-border-width-thin) solid var(--gids-color-border-default);box-sizing:border-box}.gids-line-chart__chart-vector{display:block;width:100%;height:100%;overflow:visible}.gids-line-chart__grid-line{stroke:var(--gids-color-border-default);stroke-width:0.5;fill:none}.gids-line-chart__chart-area{stroke:none}.gids-line-chart__chart-line{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.gids-line-chart__x-axis-scale-container{display:flex;grid-column:2;grid-row:2;justify-content:space-between;align-items:center;padding-left:var(--gids-container-padding-desktop);padding-top:var(--gids-padding-vertical-edge-to-element-200);gap:var(--gids-gap-050);box-sizing:border-box}.gids-line-chart__x-axis-label{grid-column:2;grid-row:3;display:flex;justify-content:center;align-items:center;padding-top:var(--gids-padding-vertical-edge-to-element-100);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);white-space:nowrap}.gids-line-chart__scale-text{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);user-select:none;white-space:nowrap}.gids-line-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}.gids-line-chart__hover-dot{position:absolute;transform:translate(-50%, -50%);pointer-events:none;z-index:20}"}},[0,"gids-line-chart",{breakpoint:[1],legend:[1],chartData:[16],yAxisVisible:[4,"y-axis-visible"],xAxisLabel:[1,"x-axis-label"],yAxisLabel:[1,"y-axis-label"],dataPoints:[16],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32],hoveredIndex:[32],tooltip:[32]},void 0,{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-line-chart","gids-advanced-tooltip","gids-chart-legend","gids-chart-legend-item"].forEach((i=>{switch(i){case"gids-line-chart":customElements.get(t(i))||customElements.define(t(i),g);break;case"gids-advanced-tooltip":customElements.get(t(i))||n();break;case"gids-chart-legend":customElements.get(t(i))||o();break;case"gids-chart-legend-item":customElements.get(t(i))||d()}}))}c();export{g as G,c as d}
@@ -1 +1 @@
1
- import{t,p as e,H as i,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownPickerWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-UVmSPzTd.js";import{G as o}from"./p-D4Pimu_8.js";const{getGidsDropdownPickerClassNames:r}=n,a=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="subtle",this.size="sm",this.idPicker="",this.expanded=!1,this.hasLeadingIcon=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.handleDropdownPickerItemSelect=t=>{const{value:e,title:i,disabled:s,id:n,isPlaceholderItem:d}=t.detail;s||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:e,title:i,disabled:!1,originalEvent:t,isPlaceholderItem:d}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t.target;if(!(e instanceof Element))return;const i=e.closest(".gids-dropdown-item");if(!i||!this.hostElement.contains(i))return;if(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;const s=i instanceof HTMLButtonElement?i.value:i.getAttribute("value")||"";if("string"!=typeof s||0===s.length)return;const n=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const d=i.getAttribute("is-placeholder-item")??"";this.applySelection({id:n,value:s,title:i.textContent?.trim()??"",disabled:!1,originalEvent:t,isPlaceholderItem:!(!d||"true"!==d)})},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleDropdownButtonClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},this.handleOutSpaceClickOfDropdownButtonToggle=t=>{this.expanded&&(t.stopPropagation(),this.setExpandedState(!1))},this.handleDocumentPointerDown=t=>{2!==t.button&&this.expanded&&(("function"==typeof t.composedPath?t.composedPath():[]).includes(this.hostElement)||this.hostElement.contains(t.target)||this.setExpandedState(!1,t))},this.handleDocumentKeyDown=t=>{if(!this.expanded)return;const e=t.key;if("Escape"===e||"Esc"===e)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===e&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.setExpandedState(!1)}}handleExpandedChange(t){t&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}connectedCallback(){this.initialValue=this.value,this.attachItemListener(),this.attachDocumentListeners(),this.attachFormListener()}disconnectedCallback(){this.detachItemListener(),this.detachDocumentListeners(),this.detachFormListener()}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconDropdownPicker"]')}getDropdownButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.clearActive(),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}setExpandedState(t,e){const i=Boolean(t);i&&!this.isInteractive()||this.expanded!==i&&(this.expanded=i,i||(this.clearActive(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerToggle",{bubbles:!0,composed:!0,detail:{expanded:i,originalEvent:e}})))}syncInputDisplayValue(){const t=this.getDropdownButtonControl();t&&t.value!==(this.selectedItemTitle??"")&&(t.value=this.selectedItemTitle??"")}attachDocumentListeners(){this.hasDocumentListeners||"undefined"==typeof document||(document.addEventListener("pointerdown",this.handleDocumentPointerDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!0)}detachDocumentListeners(){this.hasDocumentListeners&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!1)}attachFormListener(){const t=this.hostElement.closest("form");this.patternForm!==t&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=t??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}isInteractive(){return!this.disabled}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}render(){const t=this.expanded&&this.isInteractive(),e=r({expanded:t}),i="string"==typeof this.idPicker?this.idPicker:void 0,n=i?`${i}__menu`:void 0;return s("div",{key:"c880ea07fedcfd10badccf52ebedacbd92bc5bbc",class:e,onClick:this.handleOutSpaceClickOfDropdownButtonToggle},s(d,{key:"5d84443478890e1f4c9673cc13106cf839d56b87",role:"pickerbox","aria-expanded":t?"true":"false","aria-haspopup":"pickerlistbox","aria-controls":n??"",onClick:this.handleDropdownButtonClickToggle,disabled:this.disabled,value:this.selectedItemTitle??this.value??"",loading:this.loading,appearance:this.appearance,size:this.size},this.hasLeadingIcon?s("slot",{name:"leadingIconDropdownPicker",slot:"leadingIcon"}):s(o,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"})),s("div",{key:"0de0bc785af3845fc02debc2561b055bf55816d7",class:"gids-dropdown-picker__menu",id:n,role:"pickerbox",onClick:this.handleMenuClick},s("slot",{key:"a91fb5d7c902bdbc6b2c0bd0e0bda515dc9c2dd2"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}}static get style(){return".gids-dropdown-picker{position:relative}.gids-dropdown-picker__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown-picker__menu>*{flex-shrink:0}.gids-dropdown-picker--expanded .gids-dropdown-picker__menu{display:flex}"}},[260,"gids-dropdown-picker",{appearance:[1],size:[1],idPicker:[1,"id-picker"],expanded:[1540],disabled:[516],loading:[516],value:[513],name:[1],onSelectionChange:[16],selectedItemTitle:[32],hasLeadingIcon:[32]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-dropdown-picker"].forEach((e=>{"gids-dropdown-picker"===e&&(customElements.get(t(e))||customElements.define(t(e),a))}))}h();export{a as G,h as d}
1
+ import{t,p as e,H as i,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownPickerWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-UVmSPzTd.js";import{G as d}from"./p-D4Pimu_8.js";const{getGidsDropdownPickerClassNames:a}=n,r=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="subtle",this.size="sm",this.idPicker="",this.expanded=!1,this.hasLeadingIcon=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.handleDropdownPickerItemSelect=t=>{const{value:e,title:i,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:e,title:i,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t.target;if(!(e instanceof Element))return;const i=e.closest(".gids-dropdown-item");if(!i||!this.hostElement.contains(i))return;if(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;const s=i instanceof HTMLButtonElement?i.value:i.getAttribute("value")||"";if("string"!=typeof s||0===s.length)return;const n=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=i.getAttribute("is-placeholder-item")??"";this.applySelection({id:n,value:s,title:i.textContent?.trim()??"",disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleDropdownButtonClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},this.handleOutSpaceClickOfDropdownButtonToggle=t=>{this.expanded&&(t.stopPropagation(),this.setExpandedState(!1))},this.handleDocumentPointerDown=t=>{2!==t.button&&this.expanded&&(("function"==typeof t.composedPath?t.composedPath():[]).includes(this.hostElement)||this.hostElement.contains(t.target)||this.setExpandedState(!1,t))},this.handleDocumentKeyDown=t=>{if(!this.expanded)return;const e=t.key;if("Escape"===e||"Esc"===e)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===e&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.setExpandedState(!1)}}handleExpandedChange(t){t&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}connectedCallback(){this.initialValue=this.value,this.attachItemListener(),this.attachDocumentListeners(),this.attachFormListener()}disconnectedCallback(){this.detachItemListener(),this.detachDocumentListeners(),this.detachFormListener()}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconDropdownPicker"]')}getDropdownButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.clearActive(),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}setExpandedState(t,e){const i=Boolean(t);i&&!this.isInteractive()||this.expanded!==i&&(this.expanded=i,i||(this.clearActive(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerToggle",{bubbles:!0,composed:!0,detail:{expanded:i,originalEvent:e}})))}syncInputDisplayValue(){const t=this.getDropdownButtonControl();t&&t.value!==(this.selectedItemTitle??"")&&(t.value=this.selectedItemTitle??"")}attachDocumentListeners(){this.hasDocumentListeners||"undefined"==typeof document||(document.addEventListener("pointerdown",this.handleDocumentPointerDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!0)}detachDocumentListeners(){this.hasDocumentListeners&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!1)}attachFormListener(){const t=this.hostElement.closest("form");this.patternForm!==t&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=t??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}isInteractive(){return!this.disabled}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}render(){const t=this.expanded&&this.isInteractive(),e=a({expanded:t}),i="string"==typeof this.idPicker?this.idPicker:void 0,n=i?`${i}__menu`:void 0;return s("div",{key:"607e21503727f86ea4489ede7108e67787a370a4",class:e,onClick:this.handleOutSpaceClickOfDropdownButtonToggle},s(o,{key:"2dfd4ebc12236d6561169ada2be6e98638838a4d",role:"pickerbox","aria-expanded":t?"true":"false","aria-haspopup":"pickerlistbox","aria-controls":n??"",onClick:this.handleDropdownButtonClickToggle,disabled:this.disabled,value:this.selectedItemTitle??this.value??"",loading:this.loading,appearance:this.appearance,size:this.size},this.hasLeadingIcon?s("slot",{name:"leadingIconDropdownPicker",slot:"leadingIcon"}):s(d,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"})),s("div",{key:"50f9c2877ae26020365446b28596a6aaa672d06a",class:"gids-dropdown-picker__menu",id:n,role:"pickerbox",onClick:this.handleMenuClick},s("slot",{key:"13210aa5e33e04614cfa1b90f977048fd9312646"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}}static get style(){return".gids-dropdown-picker{position:relative}.gids-dropdown-picker__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown-picker__menu>*{flex-shrink:0}.gids-dropdown-picker--expanded .gids-dropdown-picker__menu{display:flex}"}},[260,"gids-dropdown-picker",{appearance:[1],size:[1],idPicker:[1,"id-picker"],expanded:[1540],disabled:[516],loading:[516],value:[513],name:[1],onSelectionChange:[16],selectedItemTitle:[32],hasLeadingIcon:[32]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-dropdown-picker"].forEach((e=>{"gids-dropdown-picker"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}h();export{r as G,h as d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as n,h as a}from"./p-Bf3p-DY2.js";import{GidsChartLegendWebUtils as i}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendClassNames:s}=i,r=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal"}handleOrientationChange(e){this.orientation=e}render(){const e=s({orientation:this.orientation});return a("div",{key:"97408478636d27b5898b241ba555cf38e5076a6c",class:e},a("slot",{key:"b895d069db35e4d37a54bd98fc732b40a12ad9f0"}))}static get watchers(){return{orientation:[{handleOrientationChange:0}]}}static get style(){return".gids-chart-legend{display:inline-flex;align-items:flex-start;gap:var(--gids-gap-150)}.gids-chart-legend--orientation-vertical{flex-direction:column;gap:var(--gids-gap-050)}"}},[260,"gids-chart-legend",{orientation:[1]},void 0,{orientation:[{handleOrientationChange:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-chart-legend"].forEach((t=>{"gids-chart-legend"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}d();export{r as G,d}
1
+ import{t as e,p as t,H as n,h as a}from"./p-Bf3p-DY2.js";import{GidsChartLegendWebUtils as i}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendClassNames:s}=i,r=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal"}handleOrientationChange(e){this.orientation=e}render(){const e=s({orientation:this.orientation});return a("div",{key:"d387e1907756393b835e4ff67eba8b10ec16d029",class:e},a("slot",{key:"0d8dc89a1285cb331ac6ca99e1cd6b2c554a0b2c"}))}static get watchers(){return{orientation:[{handleOrientationChange:0}]}}static get style(){return".gids-chart-legend{display:inline-flex;align-items:flex-start;gap:var(--gids-gap-150)}.gids-chart-legend--orientation-vertical{flex-direction:column;gap:var(--gids-gap-050)}"}},[260,"gids-chart-legend",{orientation:[1]},void 0,{orientation:[{handleOrientationChange:0}]}]);function o(){"undefined"!=typeof customElements&&["gids-chart-legend"].forEach((t=>{"gids-chart-legend"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as G,o as d}
@@ -1 +1 @@
1
- import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-DslOQITw.js";import{d as r}from"./p-BV0jg2ix.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
1
+ import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-Df5xaj-o.js";import{d as r}from"./p-DshXkAUj.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as i,h as a}from"./p-Bf3p-DY2.js";import{G as r}from"./p-D4Pimu_8.js";import{GidsChartLegendItemWebUtils as s}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendItemClassNames:n}=s,o=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal",this.seriesType="1"}handleOrientationChange(e){this.orientation=e}handleSeriesTypeChange(e){this.seriesType=e}handleSeriesColorChange(e){this.seriesColor=e}render(){const e=this.seriesColor,t=e&&""!==e,i=n({seriesType:t?"none":this.seriesType,orientation:this.orientation});return a("div",{key:"fc8dd82b51491a682d1b63d2830971d6f3af262b",class:i},a("div",{key:"31247bb0d3f67953fe13eca31af5f546307c5968",class:"vertical"===this.orientation?"gids-chart-legend-item__dot-wrapper-vertical":"gids-chart-legend-item__dot-wrapper-horizontal"},a(r,{key:"daee92872cf487b7430b7cdce5756a1b7b3a9faf",name:"new",alt:"new_icon",appearance:"filled",style:t?{"--gidsIcon-color":e}:{}})),a("span",{key:"a5d6e1d6c6326b70db1b8066267454b6d06d1e80",class:"gids-chart-legend-item__label"},a("slot",{key:"ed798a7c0f897fd2a36342007640110d72a0cd8a"})))}static get watchers(){return{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}],seriesColor:[{handleSeriesColorChange:0}]}}static get style(){return".gids-chart-legend-item{display:flex;align-items:center;gap:var(--gids-gap-100);--gidsChartLegendItemIcon-color:var(--gids-color-icon-subtle);--gidsIcon-color:var(--gidsChartLegendItemIcon-color);--gidsIcon-height:var(--gids-size-080)}.gids-chart-legend-item--orientation-vertical{display:flex}.gids-chart-legend-item--series-2{--gidsChartLegendItemIcon-color:var(--gids-color-icon-warning)}.gids-chart-legend-item--series-3{--gidsChartLegendItemIcon-color:var(--gids-color-icon-danger)}.gids-chart-legend-item--series-4{--gidsChartLegendItemIcon-color:var(--gids-color-background-positive-bold-hovered)}.gids-chart-legend-item--series-5{--gidsChartLegendItemIcon-color:var(--gids-color-background-information-bold-default)}.gids-chart-legend-item--series-6{--gidsChartLegendItemIcon-color:rgb(238, 70, 188)}.gids-chart-legend-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);text-align:left;color:var(--gids-color-text-subtlest)}.gids-chart-legend-item__dot-wrapper-vertical{display:flex;padding-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-chart-legend-item__dot-wrapper-horizontal{display:flex;align-items:center}"}},[260,"gids-chart-legend-item",{orientation:[1],seriesType:[1,"series-type"],seriesColor:[1,"series-color"]},void 0,{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}],seriesColor:[{handleSeriesColorChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-chart-legend-item"].forEach((t=>{"gids-chart-legend-item"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}l();export{o as G,l as d}
1
+ import{t as e,p as t,H as a,h as i}from"./p-Bf3p-DY2.js";import{G as r}from"./p-D4Pimu_8.js";import{GidsChartLegendItemWebUtils as s}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendItemClassNames:n}=s,o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal",this.seriesType="1"}handleOrientationChange(e){this.orientation=e}handleSeriesTypeChange(e){this.seriesType=e}handleSeriesColorChange(e){this.seriesColor=e}render(){const e=this.seriesColor,t=e&&""!==e,a=n({seriesType:t?"none":this.seriesType,orientation:this.orientation});return i("div",{key:"47ef7cb59fa7ffc5b285d7d1e717edd53ae2e729",class:a},i("div",{key:"d2ff5aae2e3c2f0978a529b07aec6578170ffb15",class:"vertical"===this.orientation?"gids-chart-legend-item__dot-wrapper-vertical":"gids-chart-legend-item__dot-wrapper-horizontal"},i(r,{key:"f77b68781d1fc3a70359f7d2e019a32f762e9f08",name:"new",alt:"new_icon",appearance:"filled",style:t?{"--gidsIcon-color":e}:{}})),i("span",{key:"960a2f79f4eb0b4432d7e4ce2ab33f0ea8b756e0",class:"gids-chart-legend-item__label"},i("slot",{key:"c614cfba777ae00cf83ad60f971bd060b78603e0"})))}static get watchers(){return{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}],seriesColor:[{handleSeriesColorChange:0}]}}static get style(){return".gids-chart-legend-item{display:flex;align-items:center;gap:var(--gids-gap-100);--gidsChartLegendItemIcon-color:var(--gids-color-icon-subtle);--gidsIcon-color:var(--gidsChartLegendItemIcon-color);--gidsIcon-height:var(--gids-size-080)}.gids-chart-legend-item--orientation-vertical{display:flex}.gids-chart-legend-item--series-2{--gidsChartLegendItemIcon-color:var(--gids-color-icon-warning)}.gids-chart-legend-item--series-3{--gidsChartLegendItemIcon-color:var(--gids-color-icon-danger)}.gids-chart-legend-item--series-4{--gidsChartLegendItemIcon-color:var(--gids-color-background-positive-bold-hovered)}.gids-chart-legend-item--series-5{--gidsChartLegendItemIcon-color:var(--gids-color-background-information-bold-default)}.gids-chart-legend-item--series-6{--gidsChartLegendItemIcon-color:rgb(238, 70, 188)}.gids-chart-legend-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);text-align:left;color:var(--gids-color-text-subtlest)}.gids-chart-legend-item__dot-wrapper-vertical{display:flex;padding-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-chart-legend-item__dot-wrapper-horizontal{display:flex;align-items:center}"}},[260,"gids-chart-legend-item",{orientation:[1],seriesType:[1,"series-type"],seriesColor:[1,"series-color"]},void 0,{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}],seriesColor:[{handleSeriesColorChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-chart-legend-item"].forEach((t=>{"gids-chart-legend-item"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}l();export{o as G,l as d}
@@ -1 +1 @@
1
- import{t,p as e,H as a,h as i,d as s}from"./p-Bf3p-DY2.js";import{autoUpdate as o,offset as l,flip as d,shift as n,arrow as r,computePosition as p,platform as c}from"@floating-ui/dom";import{e as g}from"./p-BKcvOO8o.js";import{GidsAdvancedTooltipWebUtils as h}from"@ganpatiinfo/gids-web-shared";import{g as m}from"./p-B2zUuNXz.js";import{G as v}from"./p-D4Pimu_8.js";const{getGidsAdvancedTooltipClassNames:f}=h,b=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.visible=!1,this.x=0,this.y=0,this.offset=12,this.placement="top",this.items=[],this.currentPlacement="top"}connectedCallback(){const t=m();t&&this.host.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){const t=this.host.shadowRoot;if(!t)return;const e=t.querySelector(".gids-advanced-tooltip__arrow");e instanceof a&&(this.tooltipElement=this.host,this.arrowElement=e,this.createVirtualReference(),this.startAutoUpdate(),this.updatePosition())}disconnectedCallback(){this.cleanupAutoUpdate?.()}visibleChanged(){this.updatePosition()}positionChanged(){this.updatePosition()}placementChanged(){this.updatePosition()}itemsChanged(){this.updatePosition()}createVirtualReference(){this.virtualReference||(this.virtualReference={getBoundingClientRect:()=>new DOMRect(this.x,this.y,0,0)})}startAutoUpdate(){this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=o(this.virtualReference,this.tooltipElement,(()=>{this.updatePosition()}),{ancestorScroll:!0,ancestorResize:!1,elementResize:!0,layoutShift:!0,animationFrame:!0})}getMiddleware(){return[l(this.offset),d({padding:this.offset}),n({padding:this.offset}),r({element:this.arrowElement,padding:this.offset})]}async updatePosition(){if(this.tooltipElement)try{const{x:t,y:e,placement:a,middlewareData:i}=await p(this.virtualReference,this.tooltipElement,{placement:this.placement,strategy:"fixed",middleware:this.getMiddleware(),platform:{...c,getOffsetParent:t=>c.getOffsetParent(t,g)}});if(this.currentPlacement=a,Object.assign(this.tooltipElement.style,{left:`${t}px`,top:`${e}px`,position:"fixed"}),i.arrow&&this.arrowElement){const{x:t,y:e}=i.arrow;let s;switch(a.split("-")[0]??"top"){case"top":s="bottom";break;case"right":s="left";break;case"bottom":s="top";break;default:s="right"}Object.assign(this.arrowElement.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",right:"",bottom:"",[s]:"-5px",transform:"rotate(45deg)"})}}catch(t){console.error("computePosition failed",t)}}render(){const t=f({visible:this.visible});return i(s,{key:"c4de12b255e6667fb88a1868bbb458c0c8fd66a0",class:t,role:"tooltip",part:"tooltip"},i("div",{key:"30bce93d52ce6caa0cef1f7d815ed08faf66c082",class:"gids-advanced-tooltip__arrow",part:"arrow"}),i("div",{key:"d2077e539400730753303e432a3a0ffab23c5f16",class:"gids-advanced-tooltip__content"},this.items.map((t=>i("div",{class:"gids-advanced-tooltip__item",key:`${t.label}-${t.value}`},i("div",{class:"gids-advanced-tooltip__left"},i(v,{name:"new",size:"xs",appearance:"filled",style:{"--gidsIcon-color":t.seriesIndicatorColor}}),i("span",{class:"gids-advanced-tooltip__label"},t.label)),i("span",{class:"gids-advanced-tooltip__value"},t.value))))))}get host(){return this}static get watchers(){return{visible:[{visibleChanged:0}],x:[{positionChanged:0}],y:[{positionChanged:0}],placement:[{placementChanged:0}],items:[{itemsChanged:0}]}}static get style(){return".gids-advanced-tooltip{position:fixed;display:inline-flex;width:fit-content;height:fit-content;z-index:1001;--gidsAdvancedTooltip-background:var( --gids-color-background-neutral-bold-default );--gidsAdvancedTooltip-label-color:var(--gids-color-text-inverse);--gidsAdvancedTooltip-value-color:var(--gids-color-text-inverse)}.gids-advanced-tooltip--visible{opacity:1}.gids-advanced-tooltip__content{box-shadow:var(--gids-elevation-shadow-overlay);background:var(--gidsAdvancedTooltip-background);border-radius:var(--gids-border-radius-md);padding:var(--gids-padding-vertical-edge-to-element-150) var(--gids-padding-horizontal-edge-to-element-150);min-width:140px}.gids-advanced-tooltip__item{display:flex;justify-content:space-between;align-items:center;gap:var(--gids-gap-200)}.gids-advanced-tooltip__item+.gids-advanced-tooltip__item{margin-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-advanced-tooltip__left{display:flex;align-items:center;gap:var(--gids-gap-100)}.gids-advanced-tooltip__arrow{position:absolute;width:10px;height:10px;background:var(--gidsAdvancedTooltip-background);backdrop-filter:calc(var(--gids-backdrop-blur-2-xl));transform:rotate(45deg)}.gids-advanced-tooltip__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);color:var(--gidsAdvancedTooltip-label-color)}.gids-advanced-tooltip__value{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);color:var(--gidsAdvancedTooltip-value-color);white-space:nowrap}"}},[1,"gids-advanced-tooltip",{visible:[516],x:[2],y:[2],offset:[2],placement:[1],items:[16],currentPlacement:[32]},void 0,{visible:[{visibleChanged:0}],x:[{positionChanged:0}],y:[{positionChanged:0}],placement:[{placementChanged:0}],items:[{itemsChanged:0}]}]);function _(){"undefined"!=typeof customElements&&["gids-advanced-tooltip"].forEach((e=>{"gids-advanced-tooltip"===e&&(customElements.get(t(e))||customElements.define(t(e),b))}))}_();export{b as G,_ as d}
1
+ import{t,p as e,H as a,h as i,d as s}from"./p-Bf3p-DY2.js";import{autoUpdate as o,offset as l,flip as d,shift as n,arrow as r,computePosition as p,platform as c}from"@floating-ui/dom";import{e as g}from"./p-BKcvOO8o.js";import{GidsAdvancedTooltipWebUtils as h}from"@ganpatiinfo/gids-web-shared";import{g as m}from"./p-B2zUuNXz.js";import{G as v}from"./p-D4Pimu_8.js";const{getGidsAdvancedTooltipClassNames:f}=h,b=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.visible=!1,this.x=0,this.y=0,this.offset=12,this.placement="top",this.items=[],this.currentPlacement="top"}connectedCallback(){const t=m();t&&this.host.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){const t=this.host.shadowRoot;if(!t)return;const e=t.querySelector(".gids-advanced-tooltip__arrow");e instanceof a&&(this.tooltipElement=this.host,this.arrowElement=e,this.createVirtualReference(),this.startAutoUpdate(),this.updatePosition())}disconnectedCallback(){this.cleanupAutoUpdate?.()}visibleChanged(){this.updatePosition()}positionChanged(){this.updatePosition()}placementChanged(){this.updatePosition()}itemsChanged(){this.updatePosition()}createVirtualReference(){this.virtualReference||(this.virtualReference={getBoundingClientRect:()=>new DOMRect(this.x,this.y,0,0)})}startAutoUpdate(){this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=o(this.virtualReference,this.tooltipElement,(()=>{this.updatePosition()}),{ancestorScroll:!0,ancestorResize:!1,elementResize:!0,layoutShift:!0,animationFrame:!0})}getMiddleware(){return[l(this.offset),d({padding:this.offset}),n({padding:this.offset}),r({element:this.arrowElement,padding:this.offset})]}async updatePosition(){if(this.tooltipElement)try{const{x:t,y:e,placement:a,middlewareData:i}=await p(this.virtualReference,this.tooltipElement,{placement:this.placement,strategy:"fixed",middleware:this.getMiddleware(),platform:{...c,getOffsetParent:t=>c.getOffsetParent(t,g)}});if(this.currentPlacement=a,Object.assign(this.tooltipElement.style,{left:`${t}px`,top:`${e}px`,position:"fixed"}),i.arrow&&this.arrowElement){const{x:t,y:e}=i.arrow;let s;switch(a.split("-")[0]??"top"){case"top":s="bottom";break;case"right":s="left";break;case"bottom":s="top";break;default:s="right"}Object.assign(this.arrowElement.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",right:"",bottom:"",[s]:"-5px",transform:"rotate(45deg)"})}}catch(t){console.error("computePosition failed",t)}}render(){const t=f({visible:this.visible});return i(s,{key:"48ba3ccc586208e069e5458b065a97ddd2848a7d",class:t,role:"tooltip",part:"tooltip"},i("div",{key:"be80b54e06ee897497128211b95462f9a4814ff4",class:"gids-advanced-tooltip__arrow",part:"arrow"}),i("div",{key:"4bf75d4393dab1b5eab736402af4eba4ccc508bf",class:"gids-advanced-tooltip__content"},this.items.map((t=>i("div",{class:"gids-advanced-tooltip__item",key:`${t.label}-${t.value}`},i("div",{class:"gids-advanced-tooltip__left"},i(v,{name:"new",size:"xs",appearance:"filled",style:{"--gidsIcon-color":t.seriesIndicatorColor}}),i("span",{class:"gids-advanced-tooltip__label"},t.label)),i("span",{class:"gids-advanced-tooltip__value"},t.value))))))}get host(){return this}static get watchers(){return{visible:[{visibleChanged:0}],x:[{positionChanged:0}],y:[{positionChanged:0}],placement:[{placementChanged:0}],items:[{itemsChanged:0}]}}static get style(){return".gids-advanced-tooltip{position:fixed;display:inline-flex;width:fit-content;height:fit-content;z-index:1001;--gidsAdvancedTooltip-background:var( --gids-color-background-neutral-bold-default );--gidsAdvancedTooltip-label-color:var(--gids-color-text-inverse);--gidsAdvancedTooltip-value-color:var(--gids-color-text-inverse)}.gids-advanced-tooltip--visible{opacity:1}.gids-advanced-tooltip__content{box-shadow:var(--gids-elevation-shadow-overlay);background:var(--gidsAdvancedTooltip-background);border-radius:var(--gids-border-radius-md);padding:var(--gids-padding-vertical-edge-to-element-150) var(--gids-padding-horizontal-edge-to-element-150);min-width:140px}.gids-advanced-tooltip__item{display:flex;justify-content:space-between;align-items:center;gap:var(--gids-gap-200)}.gids-advanced-tooltip__item+.gids-advanced-tooltip__item{margin-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-advanced-tooltip__left{display:flex;align-items:center;gap:var(--gids-gap-100)}.gids-advanced-tooltip__arrow{position:absolute;width:10px;height:10px;background:var(--gidsAdvancedTooltip-background);backdrop-filter:calc(var(--gids-backdrop-blur-2-xl));transform:rotate(45deg)}.gids-advanced-tooltip__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);color:var(--gidsAdvancedTooltip-label-color)}.gids-advanced-tooltip__value{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);color:var(--gidsAdvancedTooltip-value-color);white-space:nowrap}"}},[1,"gids-advanced-tooltip",{visible:[516],x:[2],y:[2],offset:[2],placement:[1],items:[16],currentPlacement:[32]},void 0,{visible:[{visibleChanged:0}],x:[{positionChanged:0}],y:[{positionChanged:0}],placement:[{placementChanged:0}],items:[{itemsChanged:0}]}]);function _(){"undefined"!=typeof customElements&&["gids-advanced-tooltip"].forEach((e=>{"gids-advanced-tooltip"===e&&(customElements.get(t(e))||customElements.define(t(e),b))}))}_();export{b as G,_ as d}
@@ -0,0 +1 @@
1
+ import{h as t,F as i}from"./p-Bf3p-DY2.js";import{GidsButtonGroupWebUtils as e,GidsHeadingWebUtils as s,GidsEditButtonWebUtils as n,GidsDividerWebUtils as l,GidsListItemWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-D4Pimu_8.js";const{getGidsButtonGroupClassNames:o}=e,r=({layout:i,class:e},s)=>t("span",{class:o({layout:i},e)},s),{getGidsHeadingClassNames:c,getGidsHeadingSupportingTextTypographyClass:g}=s,_=({heading:i,supportingText:e,level:s="section",children:n,supportingTextTypography:l,class:a})=>t("div",{class:c(a)},t("div",{class:"gids-heading__content-container"},null!=i&&""!==i?"string"==typeof i?""!==i?t("span",{class:"section"===s?"gids-heading__heading-text-section":"gids-heading__heading-text-group"},i):null:i:null,null!=e&&""!==e?"string"==typeof e?""!==e?t("span",{class:`${"section"===s?"gids-heading__supporting-text-section":"gids-heading__supporting-text-group"} ${g(l)}`},e):null:e:null),n?t(r,{layout:"wrap"},n):null),{getGidsEditButtonClassNames:p}=n,u=({disabled:i,children:e,size:s="md",editButtonType:n="add",onPressEditButton:l,class:a,...o})=>t("button",{class:p({size:s},a),...o,onClick:l,disabled:i},"custom"===n&&e?t("div",null,e):"add"===n?t("div",{class:i?"gids-edit-button__add gids-edit-button__disabled":"gids-edit-button__add"},t(d,{name:"add",appearance:"filled",size:s})):"remove"===n?t("div",{class:i?"gids-edit-button__remove gids-edit-button__disabled":"gids-edit-button__remove"},t(d,{appearance:"filled",name:"remove",size:s})):void 0),{getGidsDividerClassNames:m}=l,b=({orientation:i})=>t("hr",{class:m({orientation:i})}),{getGidsListItemClassNames:y}=a,v=({id:e,value:s,index:n,defaultSelected:l,disabled:a,selected:o,editButton:r,onPressEditButton:c,onPressListItem:g,leadingAccessory:_,leadingSupport:p,leadingParagraph:m,trailingContent:v,trailingAccessory:x,trailingSupport:f,trailingParagraph:h,divider:C,role:P="list-item-option",isPlaceholderItem:B,class:G,...z},I)=>{const T=o||l;return t("button",{type:"button",id:e,class:y({selected:T,disabled:a},G),role:P,"aria-selected":T?"true":"false",disabled:a,value:(()=>{if("string"==typeof s&&""!==s.trim())return s;const t=I;return t?(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t||"number"==typeof t?String(t):t&&"object"==typeof t&&"text"in t?t.text??"":"")).join("").trim():""})(),tabIndex:n,onClick:t=>{const i=t.currentTarget;if(!i)return;if(t.defaultPrevented||i.disabled)return;const e=new CustomEvent("onPressListItem",{bubbles:!0,composed:!0,detail:{selectedIndex:n,defaultSelected:l,isPlaceholderItem:B}});g?.(e)},"is-placeholder-item":B?"true":"false",...z},t("div",{class:"gids-list-item__main-container"},null==r||"none"===r||a?null:t(u,{size:"md",editButtonType:r,onPressEditButton:c}),null!=_?t("div",{class:a?"gids-list-item__leading-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__leading-accessory-container"},_):null,t("div",{class:"gids-list-item__middle-content-container"},t("div",{class:"gids-list-item__leading-content-container"},t(i,null,null!=I?t("span",{class:a?"gids-list-item__leading-content-label gids-list-item__text-content-disabled":"gids-list-item__leading-content-label"},I):null,t("div",{class:"gids-list-item__leading-support-content"},null!=p?"string"==typeof p?t("p",{class:a?"gids-list-item__leading-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-supporting-text"},p):p:null,null!=m?"string"==typeof m?t("p",{class:a?"gids-list-item__leading-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-paragraph-text"},m):m:null))),t("div",{class:"gids-list-item__trailing-content-container"},t(i,null,null!=v?"string"==typeof v?t("span",{class:a?"gids-list-item__trailing-content-label gids-list-item__text-content-disabled":"gids-list-item__trailing-content-label"},v):v:null,t("div",{class:"gids-list-item__trailing-support-content"},null!=f?"string"==typeof f?t("p",{class:a?"gids-list-item__trailing-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-supporting-text"},f):f:null,null!=h?"string"==typeof h?t("p",{class:a?"gids-list-item__trailing-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-paragraph-text"},h):h:null)))),T?t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},t(d,{name:"checkmark",size:"md",appearance:"regular"})):null,T||null==x?null:t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},x)),C&&!T?t("div",{class:"gids-list-item__divider"},t(b,{orientation:"horizontal"})):null)};export{r as G,_ as a,v as b,b as c}
@@ -1 +1 @@
1
- import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"c75e54d5682a6cab95b56861725af0722230ae44"},e("div",{key:"1ecbbae66b42c8500368ab1dfee347e12400f4ac",class:l()},e("div",{key:"e67b522626951f216825631772d87fcd40b59a00",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"c6a348a5cc0f4195d964d343e380392337f90116",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"29747dd8fd31c32cee6ee23f50f08fe0f3d0dd6c",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"1b24c65b26fb184862dd4aeb573de0dca9d843c7",class:"gids-field__control"},e("slot",{key:"025942655f85c705d65d3ba9a3179e9d4cd1cd83",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"8dda0c1f671594bcc08bfd9ba0c70496439c4730",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
1
+ import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"04e91bbfe28bfeccc9f7e26f68bca78e4cb2c2f8"},e("div",{key:"ca99c8bbfac4b2974d55aeb215d36ab6725e6397",class:l()},e("div",{key:"87cb9e7457e76e85230813524f8c1bae588589c2",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"48743dccc0c7a29461ab1333a71b34058c43f194",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"42e854a1e83c75eeb35a4df7354d1310ea49627f",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"0583dca7c9bc05530f4c7588a0a7fa592b90fbd8",class:"gids-field__control"},e("slot",{key:"bb2ae2641451b497b1b5f8df40d645ef07935eaa",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"9498d95ece5f84d07e621653cfae8e5a3854c9dd",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
@@ -0,0 +1,17 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import { GidsCrossTableActionEvent, GidsCrossTableToolbarSettings, GidsInputStatus } from '@ganpatiinfo/gids-core-shared';
3
+ import { GidsCrossTableWebProps, GidsTableEntryTypographyStyle } from '@ganpatiinfo/gids-web-shared';
4
+ import { JSXBase } from '../../../stencil-public-runtime';
5
+ import { GidsTableToolbarProps } from '../GidsTableToolbar/GidsTableToolbar';
6
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
7
+ type GidsCrossTableNativeInputProps = Omit<JSXBase.IntrinsicElements['input'], 'ref'>;
8
+ export type GidsCrossTableToolbarBaseSettings = GidsCrossTableToolbarSettings<VNode, Event, VNode, GidsCrossTableNativeInputProps, GidsInputStatus> & Pick<GidsTableToolbarProps, 'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'onGidsSearchBarClear'>;
9
+ interface GidsCrossTableBaseWebProps extends Omit<GidsCrossTableWebProps<VNode, GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode, Event, VNode, GidsCrossTableNativeInputProps>, 'toolbarSettings' | 'children'>, Pick<JSXBase.IntrinsicElements['div'], 'class'> {
10
+ toolbarSettings?: GidsCrossTableToolbarBaseSettings;
11
+ }
12
+ type GidsCrossTableActionBaseEvent = GidsCrossTableActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
13
+ export interface GidsCrossTableProps extends GidsCrossTableBaseWebProps {
14
+ onCrossTableAction?: (event: GidsCrossTableActionBaseEvent) => void;
15
+ }
16
+ export declare const GidsCrossTable: ({ toolbar, toolbarChildren, headerItems, bodyContent, isHeaderVisible, isToolbarVisible, bodySettings, toolbarSettings, headerSettings, tableBorders, tableBorderRadius, tableBodyMaxHeight, horizontalScroll, crossHeaderSettings, onCrossTableAction, footerItems, footerSettings, isFooterVisible, isFooterControlVisible, footerControlSettings, footerControl, class: className, }: GidsCrossTableProps, children: VNode) => any;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import { GidsCrossTableBodyActionEvent } from '@ganpatiinfo/gids-core-shared';
3
+ import { GidsCrossTableBodyWebProps, GidsTableEntryTypographyStyle } from '@ganpatiinfo/gids-web-shared';
4
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
5
+ import { JSXBase } from '../../../stencil-public-runtime';
6
+ type GidsCrossTableBodyBaseWebProps = Omit<GidsCrossTableBodyWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode>, 'children'> & Pick<JSXBase.IntrinsicElements['tbody'], 'class'>;
7
+ export type GidsCrossTableBodyActionBaseEvent = GidsCrossTableBodyActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
8
+ export interface GidsCrossTableBodyProps extends GidsCrossTableBodyBaseWebProps {
9
+ onCrossTableBodyAction?: (event: GidsCrossTableBodyActionBaseEvent) => void;
10
+ }
11
+ export declare const GidsCrossTableBody: ({ bodySettings, bodyContent, bodyBorder, crossHeaderSettings, onCrossTableBodyAction, class: className, }: GidsCrossTableBodyProps, children: VNode) => any;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import { GidsCrossTableRowActionEvent } from '@ganpatiinfo/gids-core-shared';
3
+ import { GidsCrossTableRowWebProps, GidsTableEntryTypographyStyle } from '@ganpatiinfo/gids-web-shared';
4
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
5
+ import { JSXBase } from '../../../stencil-public-runtime';
6
+ type GidsCrossTableRowBaseWebProps = Omit<GidsCrossTableRowWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode>, 'children'> & Pick<JSXBase.IntrinsicElements['tr'], 'class'>;
7
+ export type GidsCrossTableRowActionBaseEvent = GidsCrossTableRowActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
8
+ export interface GidsCrossTableRowProps extends GidsCrossTableRowBaseWebProps {
9
+ onCrossTableRowAction?: (event: GidsCrossTableRowActionBaseEvent) => void;
10
+ }
11
+ export declare const GidsCrossTableRow: ({ rows, crossHeaderItem, crossHeaderSettings, onCrossTableRowAction, textAlignment, appearance, labelTypography, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, actionsBackgroundColor, actionsContentColor, backgroundColor, contentColor, class: className, }: GidsCrossTableRowProps, children: VNode) => any;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import { GidsDialogWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
+ type GidsDialogBaseWebProps = Omit<GidsDialogWebProps<VNode | string, Event, IconName, IconAppearance>, 'children'>;
5
+ export type GidsDialogCustomElement = Omit<HTMLDialogElement, 'open'> & {
6
+ element: HTMLDialogElement;
7
+ open: (parent?: HTMLElement) => void;
8
+ close: () => void;
9
+ };
10
+ export type GidsDialogProps = GidsDialogBaseWebProps;
11
+ export declare const GidsDialog: ({ variant, maxWidth, scrollMode, draggable, headerTitle, closeVisible, footerActions, headerDividerVisible, footerDividerVisible, transition, cancellable, onCloseDialog, onDialogFooterAction, }: GidsDialogProps, children: VNode | string) => any;
12
+ export {};
@@ -2,10 +2,30 @@ import { JSXBase } from '../../../stencil-public-runtime';
2
2
  import { GidsMatrixTableBodyActionButtonEvent } from '@ganpatiinfo/gids-core-shared';
3
3
  import { GidsMatrixTableWebProps, GidsTableCellTypographyStyle } from '@ganpatiinfo/gids-web-shared';
4
4
  import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
5
+ /**
6
+ * @deprecated
7
+ *
8
+ * Use `GidsCrossTable` and its props and functions instead.
9
+ */
5
10
  type GidsMatrixTableBaseWebProps = GidsMatrixTableWebProps<GidsTableCellTypographyStyle, IconName, IconAppearance>;
11
+ /**
12
+ * @deprecated
13
+ *
14
+ * Use `GidsCrossTable` and its props and functions instead.
15
+ */
6
16
  type GidsMatrixTableActionButtonBaseEvent = GidsMatrixTableBodyActionButtonEvent<Event, GidsTableCellTypographyStyle, IconName, IconAppearance>;
17
+ /**
18
+ * @deprecated
19
+ *
20
+ * Use `GidsCrossTable` and its props and functions instead.
21
+ */
7
22
  export interface GidsMatrixTableProps extends GidsMatrixTableBaseWebProps, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick' | 'onChange'> {
8
23
  onClickMatrixTableActionBtn?: (event: GidsMatrixTableActionButtonBaseEvent) => void;
9
24
  }
25
+ /**
26
+ * @deprecated
27
+ *
28
+ * Use `GidsCrossTable` and its props and functions instead.
29
+ */
10
30
  export declare const GidsMatrixTable: ({ topHeaderCells, tableBodyItems, width, isTopHeaderVisible, topHeaderAppearance, topHeaderLabelTypography, topHeaderTextAlignment, rowAppearance, rowLabelTypography, rowTextAlignment, tableBorders, tableBorderRadius, tableBodyMaxHeight, rowCellPrimaryActionButtons, rowCellSecondaryActionButtons, topHeaderPrimaryActionButtons, topHeaderSecondaryActionButtons, onClickMatrixTableActionBtn, matrixHeaderAppearance, matrixHeaderLabelTypography, matrixHeaderTextAlignment, matrixHeaderCellPrimaryActionButtons, matrixHeaderCellSecondaryActionButtons, class: className, }: GidsMatrixTableProps) => any;
11
31
  export {};
@@ -2,10 +2,30 @@ import { JSXBase } from '../../../stencil-public-runtime';
2
2
  import { GidsMatrixTableBodyWebProps, GidsTableCellTypographyStyle } from '@ganpatiinfo/gids-web-shared';
3
3
  import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
4
  import { GidsMatrixTableBodyActionButtonEvent } from '@ganpatiinfo/gids-core-shared';
5
+ /**
6
+ * @deprecated
7
+ *
8
+ * Use `GidsCrossTableBody` and its props and functions instead.
9
+ */
5
10
  type GidsMatrixTableBodyBaseWebProps = GidsMatrixTableBodyWebProps<GidsTableCellTypographyStyle, IconName, IconAppearance>;
11
+ /**
12
+ * @deprecated
13
+ *
14
+ * Use `GidsCrossTableBody` and its props and functions instead.
15
+ */
6
16
  export type GidsMatrixTableBodyActionButtonBaseEvent = GidsMatrixTableBodyActionButtonEvent<Event, GidsTableCellTypographyStyle, IconName, IconAppearance>;
17
+ /**
18
+ * @deprecated
19
+ *
20
+ * Use `GidsCrossTableBody` and its props and functions instead.
21
+ */
7
22
  export interface GidsMatrixTableBodyProps extends GidsMatrixTableBodyBaseWebProps, Omit<JSXBase.IntrinsicElements['tbody'], 'children'> {
8
23
  onClickMatrixBodyCellActionBtn?: (event: GidsMatrixTableBodyActionButtonBaseEvent) => void;
9
24
  }
25
+ /**
26
+ * @deprecated
27
+ *
28
+ * Use `GidsCrossTableBody` and its props and functions instead.
29
+ */
10
30
  export declare const GidsMatrixTableBody: ({ width, tableBodyItems, tableBorders, rowAppearance, rowLabelTypography, rowTextAlignment, matrixHeaderAppearance, matrixHeaderLabelTypography, matrixHeaderTextAlignment, rowCellPrimaryActionButtons, rowCellSecondaryActionButtons, matrixHeaderCellPrimaryActionButtons, matrixHeaderCellSecondaryActionButtons, onClickMatrixBodyCellActionBtn, class: className, }: GidsMatrixTableBodyProps) => any;
11
31
  export {};
@@ -1,6 +1,6 @@
1
- import { FunctionalComponent, VNode } from '../../../stencil-public-runtime';
1
+ import { VNode } from '../../../stencil-public-runtime';
2
2
  import { JSXBase } from '../../../stencil-public-runtime';
3
3
  import { GidsMenuWebProps } from '@ganpatiinfo/gids-web-shared';
4
- export interface GidsMenuProps extends GidsMenuWebProps<VNode, VNode | string>, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'> {
4
+ export interface GidsMenuProps extends Omit<GidsMenuWebProps<VNode, VNode | string>, 'children'>, Omit<JSXBase.IntrinsicElements['div'], 'onClick'> {
5
5
  }
6
- export declare const GidsMenu: FunctionalComponent<GidsMenuProps>;
6
+ export declare const GidsMenu: ({ heading, supportingText, level, supportingTextTypography, isHeaderDividerVisible, class: className, ...restProps }: GidsMenuProps, children: VNode) => any;
@@ -1,5 +1,5 @@
1
1
  import { VNode } from '../../../stencil-public-runtime';
2
- import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
2
+ import { JSXBase } from '../../../stencil-public-runtime';
3
3
  import { GidsMenuGroupWebProps } from '@ganpatiinfo/gids-web-shared';
4
- export type GidsMenuGroupProps = GidsMenuGroupWebProps<VNode> & Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'>;
5
- export declare const GidsMenuGroup: FunctionalComponent<GidsMenuGroupProps>;
4
+ export type GidsMenuGroupProps = Omit<GidsMenuGroupWebProps<VNode>, 'children'> & Omit<JSXBase.IntrinsicElements['div'], 'onClick'>;
5
+ export declare const GidsMenuGroup: ({ type, supportingText, class: className, ...rest }: GidsMenuGroupProps, children: VNode) => any;
@@ -12,5 +12,5 @@ export interface GidsTableProps extends GidsTableBaseWebProps {
12
12
  extraClasses?: string;
13
13
  onTableAction?: (event: GidsTableActionBaseEvent) => void;
14
14
  }
15
- export declare const GidsTable: ({ toolbar, headerItems, bodyContent, isHeaderVisible, isToolbarVisible, bodySettings, toolbarSettings, headerSettings, tableBorders, tableBorderRadius, tableBodyMaxHeight, toolbarChildren, onTableAction, horizontalScroll, class: className, ...restProps }: GidsTableProps, children: VNode) => any;
15
+ export declare const GidsTable: ({ toolbar, headerItems, bodyContent, isHeaderVisible, isToolbarVisible, bodySettings, toolbarSettings, headerSettings, tableBorders, tableBorderRadius, tableBodyMaxHeight, toolbarChildren, onTableAction, horizontalScroll, footerItems, footerSettings, isFooterVisible, isFooterControlVisible, footerControlSettings, footerControl, class: className, ...restProps }: GidsTableProps, children: VNode) => any;
16
16
  export {};
@@ -3,10 +3,10 @@ import { GidsTableEntryTypographyStyle, GidsTableFooterWebProps } from '@ganpati
3
3
  import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
4
  import { GidsTableFooterActionEvent } from '@ganpatiinfo/gids-core-shared';
5
5
  import { JSXBase } from '../../../stencil-public-runtime';
6
- export type GidsTableFooterNativeInputForwardedProps = Partial<Omit<HTMLInputElement, 'value' | 'readOnly' | 'name' | 'disabled'>>;
7
- export type GidsTableFooterBaseWebProps = Omit<GidsTableFooterWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode, VNode, GidsTableFooterNativeInputForwardedProps, Event>, 'children'> & Omit<JSXBase.IntrinsicElements['tfoot'], 'children'>;
6
+ export type GidsTableFooterNativeInputForwardedProps = Partial<Omit<JSXBase.IntrinsicElements['input'], 'value' | 'readOnly' | 'name' | 'disabled'>>;
7
+ export type GidsTableFooterBaseWebProps = Omit<GidsTableFooterWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode>, 'children'> & Omit<JSXBase.IntrinsicElements['tfoot'], 'children'>;
8
8
  export type GidsTableFooterActionBaseEvent = GidsTableFooterActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
9
9
  export interface GidsTableFooterProps extends GidsTableFooterBaseWebProps {
10
10
  onFooterAction?: (event: GidsTableFooterActionBaseEvent) => void;
11
11
  }
12
- export declare const GidsTableFooter: ({ appearance, labelTypography, textAlignment, leadingActions, trailingActions, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, footerControlSettings, footerControlChildren, footerItems, onFooterAction, class: className, ...restProps }: GidsTableFooterProps, children: VNode) => any;
12
+ export declare const GidsTableFooter: ({ appearance, labelTypography, textAlignment, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, footerItems, onFooterAction, class: className, ...restProps }: GidsTableFooterProps, children: VNode) => any;
@@ -5,4 +5,4 @@ import { JSXBase } from '../../../stencil-public-runtime';
5
5
  export type TableFooterNativeInputForwardedProps = Omit<JSXBase.IntrinsicElements['input'], 'disabled' | 'readOnly' | 'value' | 'name'>;
6
6
  export type GidsTableFooterControlBaseWebProps = Omit<GidsTableFooterControlWebProps<IconName, VNode, TableFooterNativeInputForwardedProps, VNode, Event>, 'children'> & Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onChange' | 'onClick'>;
7
7
  export type GidsTableFooterControlProps = GidsTableFooterControlBaseWebProps;
8
- export declare const GidsTableFooterControl: ({ bulkStatus, rangeStatus, tableViewControllerSettings, paginatorSettings, tableViewControllerVisible, paginatorVisible, class: className, }: GidsTableFooterControlProps, children: VNode) => any;
8
+ export declare const GidsTableFooterControl: ({ appearance, bulkStatus, rangeStatus, tableViewControllerSettings, paginatorSettings, tableViewControllerVisible, paginatorVisible, class: className, }: GidsTableFooterControlProps, children: VNode) => any;
@@ -6,4 +6,4 @@ export type GidsTableHeaderActionBaseEvent = GidsTableHeaderActionEvent<Event, G
6
6
  export interface GidsTableHeaderProps extends Omit<GidsTableHeaderWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, VNode>, 'children'>, Omit<JSXBase.IntrinsicElements['thead'], 'children'> {
7
7
  onHeaderAction?: (event: GidsTableHeaderActionBaseEvent) => void;
8
8
  }
9
- export declare const GidsTableHeader: ({ headerItems, appearance, labelTypography, textAlignment, leadingActions, trailingActions, onHeaderAction, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, class: className, ...restProps }: GidsTableHeaderProps, children: VNode) => any;
9
+ export declare const GidsTableHeader: ({ headerItems, appearance, labelTypography, textAlignment, onHeaderAction, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, class: className, ...restProps }: GidsTableHeaderProps, children: VNode) => any;
@@ -6,4 +6,4 @@ export type GidsTableRowActionBaseEvent = GidsTableRowActionEvent<Event, GidsTab
6
6
  export interface GidsTableRowProps extends Omit<GidsTableRowWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, never>, 'children' | 'onChange'>, Omit<JSXBase.IntrinsicElements['tr'], 'children'> {
7
7
  onRowAction?: (event: GidsTableRowActionBaseEvent) => void;
8
8
  }
9
- export declare const GidsTableRow: ({ rows, rowType, leadingActions, trailingActions, onRowAction, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, textAlignment, labelTypography, appearance, actionsBackgroundColor, actionsContentColor, backgroundColor, contentColor, class: className, ...restProps }: GidsTableRowProps, children: VNode) => any;
9
+ export declare const GidsTableRow: ({ rows, rowType, onRowAction, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, textAlignment, labelTypography, appearance, actionsBackgroundColor, actionsContentColor, backgroundColor, contentColor, class: className, ...restProps }: GidsTableRowProps, children: VNode) => any;
@@ -0,0 +1,8 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import { GidsDialogControlWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
+ import { JSXBase } from '../../../stencil-public-runtime';
5
+ type GidsDialogControlBaseWebProps = Omit<GidsDialogControlWebProps<VNode | string, Event, IconName, IconAppearance>, 'children'> & Omit<JSXBase.IntrinsicElements['dialog'], 'children'>;
6
+ export type GidsDialogControlProps = GidsDialogControlBaseWebProps;
7
+ export declare const GidsDialogControl: ({ variant, maxWidth, scrollMode, draggable, headerTitle, closeVisible, footerActions, headerDividerVisible, footerDividerVisible, onCloseDialogControl, onDialogControlFooterAction, class: className, }: GidsDialogControlProps, children: VNode | string) => any;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type GidsSkeletonWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsSkeletonAnimation, GidsSkeletonVariant } from '@ganpatiinfo/gids-core-shared';
3
+ export declare class GidsSkeleton implements GidsSkeletonWebProps {
4
+ variant?: GidsSkeletonVariant;
5
+ animation?: GidsSkeletonAnimation;
6
+ width?: string | number;
7
+ height?: string | number;
8
+ private getDimension;
9
+ private getStyle;
10
+ render(): any;
11
+ }
@@ -0,0 +1,49 @@
1
+ import { GidsTransferListListItem, GidsTransferListSelectEvent, GidsTransferListTransferActionEvent, GidsTransferListType } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsTransferListWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export type GidsTransferListEventType = Event | MouseEvent;
4
+ type GidsTransferListBaseWebProps = GidsTransferListWebProps<GidsTransferListEventType>;
5
+ export declare class GidsTransferList implements GidsTransferListBaseWebProps {
6
+ private hostElement;
7
+ leftListHeading?: string;
8
+ rightListHeading?: string;
9
+ moveAllVisible?: boolean;
10
+ transferListType?: GidsTransferListType;
11
+ leftListItems?: GidsTransferListListItem[];
12
+ rightListItems?: GidsTransferListListItem[];
13
+ listsMaxHeight?: string;
14
+ onTransferAction?: (event: GidsTransferListTransferActionEvent<GidsTransferListEventType>) => void;
15
+ onTransferListSelect?: (event: GidsTransferListSelectEvent<GidsTransferListEventType>) => void;
16
+ private leftListItemsState?;
17
+ private rightListItemsState?;
18
+ private tempLeftListItemsState?;
19
+ private tempRightListItemsState?;
20
+ protected handleListsMaxHeightChange(next: string): void;
21
+ protected handleLeftListHeadingChange(next: string): void;
22
+ protected handleRightListHeadingChange(next: string): void;
23
+ protected handleMoveAllVisibilityChange(next: boolean): void;
24
+ protected handleTransferListTypeChange(next: GidsTransferListType): void;
25
+ protected handleLeftListItemsChange(next: GidsTransferListListItem[]): void;
26
+ protected handleRightListItemsChange(next: GidsTransferListListItem[]): void;
27
+ componentDidLoad(): void;
28
+ private setListItemsStates;
29
+ private getListHeading;
30
+ private getListSupportingText;
31
+ private isAllItemsSelectedInList;
32
+ private isAtleastOneItemSelectedInList;
33
+ private renderListHeading;
34
+ private listItemSelection;
35
+ private onPressingListItem;
36
+ private selectUnselectListItem;
37
+ private isItemSelected;
38
+ private getStateListsItemsArr;
39
+ private getTempListsItemsArr;
40
+ private selectUnselectAllItems;
41
+ private callOnTransferListSelectFunc;
42
+ private movementButtonDisabled;
43
+ private callOnTransferAction;
44
+ private clearListSystem;
45
+ private moveListItems;
46
+ private onItemsMovement;
47
+ render(): any;
48
+ }
49
+ export {};