genesys-spark-components 4.0.0-beta.40 → 4.0.0-beta.41

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 (345) hide show
  1. package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
  2. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-advanced-dropdown-legacy.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-badge.cjs.entry.js +4 -3
  8. package/dist/cjs/gux-blank-state.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button-slot.cjs.entry.js +4 -3
  12. package/dist/cjs/gux-button.cjs.entry.js +33 -18
  13. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  14. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-column-manager-item.cjs.entry.js +1 -2
  16. package/dist/cjs/gux-column-manager.cjs.entry.js +4 -4
  17. package/dist/cjs/gux-content-search.cjs.entry.js +2 -2
  18. package/dist/cjs/gux-context-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dismiss-button.cjs.entry.js +2 -2
  25. package/dist/cjs/gux-dropdown-multi.cjs.entry.js +1 -1
  26. package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
  27. package/dist/cjs/gux-flyout-menu.cjs.entry.js +4 -4
  28. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
  29. package/dist/cjs/gux-form-field-color.cjs.entry.js +2 -2
  30. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +2 -2
  31. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
  32. package/dist/cjs/gux-form-field-number_3.cjs.entry.js +2 -2
  33. package/dist/cjs/gux-form-field-phone.cjs.entry.js +2 -2
  34. package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/gux-form-field-range.cjs.entry.js +2 -2
  36. package/dist/cjs/gux-form-field-search.cjs.entry.js +2 -2
  37. package/dist/cjs/gux-form-field-select.cjs.entry.js +2 -2
  38. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +2 -2
  39. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +2 -2
  40. package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +2 -2
  41. package/dist/cjs/gux-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/gux-inline-alert.cjs.entry.js +2 -2
  43. package/dist/cjs/gux-list.cjs.entry.js +1 -1
  44. package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
  45. package/dist/cjs/gux-loading-message.cjs.entry.js +1 -1
  46. package/dist/cjs/gux-menu-option.cjs.entry.js +8 -1
  47. package/dist/cjs/gux-menu.cjs.entry.js +1 -1
  48. package/dist/cjs/gux-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
  50. package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
  51. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
  52. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
  53. package/dist/cjs/gux-pagination-legacy.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
  55. package/dist/cjs/gux-phone-input-beta.cjs.entry.js +436 -378
  56. package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-segmented-control-beta.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-skip-navigation-list.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  66. package/dist/cjs/gux-submenu.cjs.entry.js +8 -13
  67. package/dist/cjs/gux-switch-legacy.cjs.entry.js +1 -1
  68. package/dist/cjs/gux-tab-list.cjs.entry.js +1 -1
  69. package/dist/cjs/gux-tab-panel.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-tab.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-table-select-menu.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
  76. package/dist/cjs/gux-table.cjs.entry.js +1 -1
  77. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  78. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  79. package/dist/cjs/gux-tag.cjs.entry.js +1 -1
  80. package/dist/cjs/gux-text-highlight.cjs.entry.js +2 -2
  81. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  82. package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
  83. package/dist/cjs/gux-time-zone-picker-beta.cjs.entry.js +145 -47
  84. package/dist/cjs/gux-toast.cjs.entry.js +1 -1
  85. package/dist/cjs/gux-toggle-slider.cjs.entry.js +5 -3
  86. package/dist/cjs/gux-toggle.cjs.entry.js +2 -2
  87. package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
  88. package/dist/cjs/index-39160f18.js +4 -8
  89. package/dist/cjs/loader.cjs.js +1 -1
  90. package/dist/cjs/{on-attribute-change-4db59350.js → on-attribute-change-9b2d8c85.js} +0 -13
  91. package/dist/cjs/{usage-9feecec4.js → usage-7bd0f4a2.js} +1 -2
  92. package/dist/collection/collection-manifest.json +0 -1
  93. package/dist/collection/components/beta/gux-phone-input/gux-phone-input.js +334 -143
  94. package/dist/collection/components/beta/gux-phone-input/gux-phone.types.js +1 -0
  95. package/dist/collection/components/beta/gux-phone-input/services/RegionCountryCodeMap.js +0 -249
  96. package/dist/collection/components/beta/gux-phone-input/services/region-map.service.js +3 -3
  97. package/dist/collection/components/beta/gux-phone-input/tests/gux-phone-input.e2e.js +50 -38
  98. package/dist/collection/components/beta/gux-time-zone-picker/tests/gux-time-zone-picker.e2e.js +3 -3
  99. package/dist/collection/components/stable/gux-alert/gux-inline-alert.css +1 -1
  100. package/dist/collection/components/stable/gux-badge/gux-badge.css +2 -2
  101. package/dist/collection/components/stable/gux-button/gux-button.css +4 -1
  102. package/dist/collection/components/stable/gux-button/gux-button.js +36 -16
  103. package/dist/collection/components/stable/gux-button-slot/gux-button-slot.css +6 -0
  104. package/dist/collection/components/stable/gux-button-slot/gux-button-slot.js +19 -1
  105. package/dist/collection/components/stable/gux-column-manager/gux-column-manager-item/gux-column-manager-item.css +11 -3
  106. package/dist/collection/components/stable/gux-column-manager/gux-column-manager-item/gux-column-manager-item.js +0 -1
  107. package/dist/collection/components/stable/gux-column-manager/gux-column-manager.css +7 -5
  108. package/dist/collection/components/stable/gux-dismiss-button/gux-dismiss-button.css +2 -2
  109. package/dist/collection/components/stable/gux-flyout-menu/gux-flyout-menu.js +3 -3
  110. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.css +5 -5
  111. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.js +14 -0
  112. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.css +1 -1
  113. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.js +1 -0
  114. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.css +8 -8
  115. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.js +8 -12
  116. package/dist/collection/components/stable/gux-radial-loading/gux-radial-loading.css +5 -14
  117. package/dist/collection/components/stable/gux-radial-progress/gux-radial-progress.css +1 -4
  118. package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-menu.js +1 -1
  119. package/dist/collection/components/stable/gux-table/tests/gux-table.e2e.js +7 -4
  120. package/dist/collection/components/stable/gux-tabs/gux-tab/gux-tab.css +21 -20
  121. package/dist/collection/components/stable/gux-tabs/gux-tab-list/gux-tab-list.css +4 -4
  122. package/dist/collection/components/stable/gux-tabs/gux-tab-panel/gux-tab-panel.css +1 -1
  123. package/dist/collection/components/stable/gux-tabs/tests/gux-tabs.e2e.js +1 -2
  124. package/dist/collection/components/stable/gux-text-highlight/gux-text-highlight.css +4 -1
  125. package/dist/collection/components/stable/gux-toggle/gux-toggle-slider/gux-toggle-slider.css +81 -19
  126. package/dist/collection/components/stable/gux-toggle/gux-toggle-slider/gux-toggle-slider.js +4 -2
  127. package/dist/collection/components/stable/gux-toggle/gux-toggle.css +18 -6
  128. package/dist/component-specs.json +5 -4
  129. package/dist/deploy-info.json +3 -3
  130. package/dist/esm/genesys-webcomponents.js +1 -1
  131. package/dist/esm/gux-accordion.entry.js +1 -1
  132. package/dist/esm/gux-action-button.entry.js +1 -1
  133. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  134. package/dist/esm/gux-advanced-dropdown-legacy.entry.js +1 -1
  135. package/dist/esm/gux-announce-beta.entry.js +1 -1
  136. package/dist/esm/gux-badge.entry.js +4 -3
  137. package/dist/esm/gux-blank-state.entry.js +1 -1
  138. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  139. package/dist/esm/gux-button-multi.entry.js +1 -1
  140. package/dist/esm/gux-button-slot.entry.js +4 -3
  141. package/dist/esm/gux-button.entry.js +33 -18
  142. package/dist/esm/gux-calendar.entry.js +1 -1
  143. package/dist/esm/gux-card.entry.js +1 -1
  144. package/dist/esm/gux-column-manager-item.entry.js +1 -2
  145. package/dist/esm/gux-column-manager.entry.js +4 -4
  146. package/dist/esm/gux-content-search.entry.js +2 -2
  147. package/dist/esm/gux-context-menu.entry.js +1 -1
  148. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  149. package/dist/esm/gux-date-beta.entry.js +1 -1
  150. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  151. package/dist/esm/gux-datepicker.entry.js +1 -1
  152. package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
  153. package/dist/esm/gux-dismiss-button.entry.js +2 -2
  154. package/dist/esm/gux-dropdown-multi.entry.js +1 -1
  155. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  156. package/dist/esm/gux-flyout-menu.entry.js +4 -4
  157. package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
  158. package/dist/esm/gux-form-field-color.entry.js +2 -2
  159. package/dist/esm/gux-form-field-dropdown.entry.js +2 -2
  160. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  161. package/dist/esm/gux-form-field-number_3.entry.js +2 -2
  162. package/dist/esm/gux-form-field-phone.entry.js +2 -2
  163. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  164. package/dist/esm/gux-form-field-range.entry.js +2 -2
  165. package/dist/esm/gux-form-field-search.entry.js +2 -2
  166. package/dist/esm/gux-form-field-select.entry.js +2 -2
  167. package/dist/esm/gux-form-field-text-like.entry.js +2 -2
  168. package/dist/esm/gux-form-field-textarea.entry.js +2 -2
  169. package/dist/esm/gux-form-field-time-picker.entry.js +2 -2
  170. package/dist/esm/gux-icon.entry.js +1 -1
  171. package/dist/esm/gux-inline-alert.entry.js +2 -2
  172. package/dist/esm/gux-list.entry.js +1 -1
  173. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  174. package/dist/esm/gux-loading-message.entry.js +1 -1
  175. package/dist/esm/gux-menu-option.entry.js +8 -1
  176. package/dist/esm/gux-menu.entry.js +1 -1
  177. package/dist/esm/gux-modal.entry.js +1 -1
  178. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  179. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  180. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  181. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  182. package/dist/esm/gux-pagination-legacy.entry.js +1 -1
  183. package/dist/esm/gux-pagination.entry.js +1 -1
  184. package/dist/esm/gux-phone-input-beta.entry.js +436 -378
  185. package/dist/esm/gux-popover-list.entry.js +1 -1
  186. package/dist/esm/gux-radial-loading.entry.js +1 -1
  187. package/dist/esm/gux-radial-progress.entry.js +1 -1
  188. package/dist/esm/gux-rating.entry.js +1 -1
  189. package/dist/esm/gux-region-icon.entry.js +1 -1
  190. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  191. package/dist/esm/gux-segmented-control-beta.entry.js +1 -1
  192. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  193. package/dist/esm/gux-skip-navigation-list.entry.js +1 -1
  194. package/dist/esm/gux-sort-control.entry.js +1 -1
  195. package/dist/esm/gux-submenu.entry.js +8 -13
  196. package/dist/esm/gux-switch-legacy.entry.js +1 -1
  197. package/dist/esm/gux-tab-list.entry.js +1 -1
  198. package/dist/esm/gux-tab-panel.entry.js +1 -1
  199. package/dist/esm/gux-tab.entry.js +1 -1
  200. package/dist/esm/gux-table-select-menu.entry.js +1 -1
  201. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  202. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  203. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  204. package/dist/esm/gux-table-toolbar.entry.js +1 -1
  205. package/dist/esm/gux-table.entry.js +1 -1
  206. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  207. package/dist/esm/gux-tabs.entry.js +1 -1
  208. package/dist/esm/gux-tag.entry.js +1 -1
  209. package/dist/esm/gux-text-highlight.entry.js +2 -2
  210. package/dist/esm/gux-time-beta.entry.js +1 -1
  211. package/dist/esm/gux-time-picker.entry.js +1 -1
  212. package/dist/esm/gux-time-zone-picker-beta.entry.js +145 -47
  213. package/dist/esm/gux-toast.entry.js +1 -1
  214. package/dist/esm/gux-toggle-slider.entry.js +5 -3
  215. package/dist/esm/gux-toggle.entry.js +2 -2
  216. package/dist/esm/gux-tooltip.entry.js +1 -1
  217. package/dist/esm/index-a0eec33a.js +4 -8
  218. package/dist/esm/loader.js +1 -1
  219. package/dist/esm/{on-attribute-change-b91132e6.js → on-attribute-change-42a46627.js} +1 -13
  220. package/dist/esm/{usage-fb76486b.js → usage-d6681f18.js} +1 -2
  221. package/dist/genesys-webcomponents/genesys-webcomponents.css +3 -3
  222. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  223. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  224. package/dist/genesys-webcomponents/{p-ad5a9495.entry.js → p-07976cff.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-7deeb046.entry.js → p-09453413.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-85a97fdd.entry.js → p-0bb16852.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/p-17b43bc4.entry.js +1 -0
  228. package/dist/genesys-webcomponents/{p-a811a043.entry.js → p-18e3fe76.entry.js} +1 -1
  229. package/dist/genesys-webcomponents/{p-7463fc52.entry.js → p-1d721625.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-7e6b5a72.entry.js → p-1dece006.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-b716c999.entry.js → p-22f7b058.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/{p-e97e4344.entry.js → p-28c70a30.entry.js} +1 -1
  233. package/dist/genesys-webcomponents/{p-e491bcac.entry.js → p-32454e23.entry.js} +1 -1
  234. package/dist/genesys-webcomponents/{p-f254a399.entry.js → p-3336925d.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/{p-04b1029f.entry.js → p-3465ba68.entry.js} +1 -1
  236. package/dist/genesys-webcomponents/{p-d5f9129a.entry.js → p-35174acd.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/p-37a6cf93.entry.js +1 -0
  238. package/dist/genesys-webcomponents/p-37bfd195.js +1 -0
  239. package/dist/genesys-webcomponents/p-38bad8d2.entry.js +1 -0
  240. package/dist/genesys-webcomponents/{p-d89f8435.entry.js → p-38c781a4.entry.js} +1 -1
  241. package/dist/genesys-webcomponents/{p-298d37f4.entry.js → p-3af115ad.entry.js} +1 -1
  242. package/dist/genesys-webcomponents/{p-b1239813.entry.js → p-3c4047d1.entry.js} +1 -1
  243. package/dist/genesys-webcomponents/{p-283d98ec.entry.js → p-3cc59add.entry.js} +1 -1
  244. package/dist/genesys-webcomponents/{p-888e521b.js → p-3cf08509.js} +1 -1
  245. package/dist/genesys-webcomponents/{p-d7625bff.entry.js → p-3ea3a764.entry.js} +1 -1
  246. package/dist/genesys-webcomponents/{p-0714156f.entry.js → p-402b6233.entry.js} +1 -1
  247. package/dist/genesys-webcomponents/{p-0681e196.entry.js → p-432bb1ce.entry.js} +1 -1
  248. package/dist/genesys-webcomponents/{p-62bec424.entry.js → p-4b7e6ef2.entry.js} +1 -1
  249. package/dist/genesys-webcomponents/{p-22041782.entry.js → p-4dee44f2.entry.js} +1 -1
  250. package/dist/genesys-webcomponents/p-4e890707.entry.js +1 -0
  251. package/dist/genesys-webcomponents/{p-94c44b6b.entry.js → p-52054142.entry.js} +1 -1
  252. package/dist/genesys-webcomponents/{p-946d3b24.entry.js → p-530c362b.entry.js} +1 -1
  253. package/dist/genesys-webcomponents/{p-1d35e592.entry.js → p-5b36dd80.entry.js} +1 -1
  254. package/dist/genesys-webcomponents/{p-4c8af50f.entry.js → p-5dad03e8.entry.js} +1 -1
  255. package/dist/genesys-webcomponents/{p-882b432e.entry.js → p-5f316b49.entry.js} +1 -1
  256. package/dist/genesys-webcomponents/{p-ee292004.entry.js → p-6236f519.entry.js} +1 -1
  257. package/dist/genesys-webcomponents/{p-53e99e1c.entry.js → p-681b7fcf.entry.js} +1 -1
  258. package/dist/genesys-webcomponents/{p-0f20be96.entry.js → p-6b815f9c.entry.js} +1 -1
  259. package/dist/genesys-webcomponents/p-6d04e8cd.entry.js +1 -0
  260. package/dist/genesys-webcomponents/{p-59674f9b.entry.js → p-6dc75dce.entry.js} +1 -1
  261. package/dist/genesys-webcomponents/{p-2767eedd.entry.js → p-6debb4e2.entry.js} +1 -1
  262. package/dist/genesys-webcomponents/{p-3bca88f0.entry.js → p-700878bf.entry.js} +1 -1
  263. package/dist/genesys-webcomponents/{p-723cdd66.entry.js → p-707129d2.entry.js} +1 -1
  264. package/dist/genesys-webcomponents/{p-66642f70.entry.js → p-7a40b615.entry.js} +1 -1
  265. package/dist/genesys-webcomponents/{p-79f33755.entry.js → p-7af593fb.entry.js} +1 -1
  266. package/dist/genesys-webcomponents/{p-ff028bc8.entry.js → p-7b98f591.entry.js} +1 -1
  267. package/dist/genesys-webcomponents/p-7e9074e8.entry.js +1 -0
  268. package/dist/genesys-webcomponents/{p-959d205b.entry.js → p-81a7dfc0.entry.js} +1 -1
  269. package/dist/genesys-webcomponents/{p-092af550.entry.js → p-834ede94.entry.js} +1 -1
  270. package/dist/genesys-webcomponents/{p-49abdc36.entry.js → p-83b2133c.entry.js} +1 -1
  271. package/dist/genesys-webcomponents/p-87c75c0c.entry.js +1 -0
  272. package/dist/genesys-webcomponents/{p-c74273f5.entry.js → p-8df4a700.entry.js} +1 -1
  273. package/dist/genesys-webcomponents/p-8ff2c1fe.entry.js +1 -0
  274. package/dist/genesys-webcomponents/p-93608d93.entry.js +1 -0
  275. package/dist/genesys-webcomponents/{p-e6ba3486.entry.js → p-967772db.entry.js} +1 -1
  276. package/dist/genesys-webcomponents/{p-da1c6815.entry.js → p-970339d2.entry.js} +1 -1
  277. package/dist/genesys-webcomponents/{p-5edbbaa2.entry.js → p-9e79e6a9.entry.js} +1 -1
  278. package/dist/genesys-webcomponents/{p-079a3314.entry.js → p-9f83906b.entry.js} +1 -1
  279. package/dist/genesys-webcomponents/{p-e05782d1.entry.js → p-a712590a.entry.js} +1 -1
  280. package/dist/genesys-webcomponents/{p-a1151219.entry.js → p-a7341016.entry.js} +1 -1
  281. package/dist/genesys-webcomponents/p-ac85575f.entry.js +1 -0
  282. package/dist/genesys-webcomponents/{p-0023db21.entry.js → p-aeb23536.entry.js} +1 -1
  283. package/dist/genesys-webcomponents/{p-93296fc2.entry.js → p-b1aff517.entry.js} +1 -1
  284. package/dist/genesys-webcomponents/{p-b09ed8fd.entry.js → p-b48cf7fd.entry.js} +1 -1
  285. package/dist/genesys-webcomponents/{p-cda8804c.entry.js → p-b6271f28.entry.js} +1 -1
  286. package/dist/genesys-webcomponents/{p-34f39f9d.entry.js → p-b67960df.entry.js} +1 -1
  287. package/dist/genesys-webcomponents/{p-7ae89101.entry.js → p-b6d1e2e1.entry.js} +1 -1
  288. package/dist/genesys-webcomponents/p-b6fb5b65.entry.js +1 -0
  289. package/dist/genesys-webcomponents/{p-8cde9be1.entry.js → p-b8755c5a.entry.js} +1 -1
  290. package/dist/genesys-webcomponents/p-bb1ee297.entry.js +1 -0
  291. package/dist/genesys-webcomponents/{p-2e0206ad.entry.js → p-cc724d95.entry.js} +1 -1
  292. package/dist/genesys-webcomponents/p-d264a043.entry.js +1 -0
  293. package/dist/genesys-webcomponents/{p-c1d6b950.entry.js → p-d2a6a92d.entry.js} +1 -1
  294. package/dist/genesys-webcomponents/p-d967c7e7.entry.js +1 -0
  295. package/dist/genesys-webcomponents/{p-5f2d702e.entry.js → p-da6e6f64.entry.js} +1 -1
  296. package/dist/genesys-webcomponents/{p-a5f41d6c.entry.js → p-dadc097d.entry.js} +1 -1
  297. package/dist/genesys-webcomponents/{p-f6cdabee.entry.js → p-dc897b48.entry.js} +1 -1
  298. package/dist/genesys-webcomponents/{p-b83c0fce.entry.js → p-df01c156.entry.js} +1 -1
  299. package/dist/genesys-webcomponents/{p-06a051e2.entry.js → p-e3fc7d7d.entry.js} +1 -1
  300. package/dist/genesys-webcomponents/{p-4fc6e77b.entry.js → p-e604265e.entry.js} +1 -1
  301. package/dist/genesys-webcomponents/{p-bc151fdb.entry.js → p-e71c94cc.entry.js} +1 -1
  302. package/dist/genesys-webcomponents/{p-895e3e22.entry.js → p-e8261f28.entry.js} +1 -1
  303. package/dist/genesys-webcomponents/{p-9dfd5bd0.entry.js → p-e99f4472.entry.js} +1 -1
  304. package/dist/genesys-webcomponents/{p-fb229e19.entry.js → p-eb8434c9.entry.js} +1 -1
  305. package/dist/genesys-webcomponents/{p-703abdff.entry.js → p-ee473cc9.entry.js} +1 -1
  306. package/dist/genesys-webcomponents/{p-89ef8747.entry.js → p-ee643cb5.entry.js} +1 -1
  307. package/dist/genesys-webcomponents/{p-759d93b2.entry.js → p-f2c2a915.entry.js} +1 -1
  308. package/dist/genesys-webcomponents/{p-c8193aef.entry.js → p-f327dc53.entry.js} +1 -1
  309. package/dist/genesys-webcomponents/{p-c8d42dd7.entry.js → p-f5540a5d.entry.js} +1 -1
  310. package/dist/genesys-webcomponents/{p-88b39a07.entry.js → p-fb683f3e.entry.js} +1 -1
  311. package/dist/genesys-webcomponents/{p-8a67c5ac.entry.js → p-fbb62dfa.entry.js} +1 -1
  312. package/dist/stencil-wrapper.js +1 -1
  313. package/dist/types/components/beta/gux-phone-input/gux-phone-input.d.ts +31 -16
  314. package/dist/types/components/beta/gux-phone-input/gux-phone.types.d.ts +11 -0
  315. package/dist/types/components/beta/gux-phone-input/services/RegionCountryCodeMap.d.ts +0 -3
  316. package/dist/types/components/beta/gux-phone-input/services/region-map.service.d.ts +1 -5
  317. package/dist/types/components/stable/gux-button/gux-button.d.ts +5 -0
  318. package/dist/types/components/stable/gux-button-slot/gux-button-slot.d.ts +1 -0
  319. package/dist/types/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.d.ts +1 -0
  320. package/dist/types/components.d.ts +22 -45
  321. package/dist/types/stencil-wrapper.d.ts +1 -1
  322. package/package.json +1 -2
  323. package/dist/cjs/gux-table-select-popover.cjs.entry.js +0 -1893
  324. package/dist/collection/components/beta/gux-phone-input/components/gux-region-icon/gux-region-select.service.js +0 -25
  325. package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-popover/gux-table-header-popover.js +0 -171
  326. package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-popover/gux-table-select-popover.css +0 -12
  327. package/dist/esm/gux-table-select-popover.entry.js +0 -1889
  328. package/dist/genesys-webcomponents/p-041433c6.entry.js +0 -1
  329. package/dist/genesys-webcomponents/p-0439dede.entry.js +0 -1
  330. package/dist/genesys-webcomponents/p-3b9f7f34.entry.js +0 -1
  331. package/dist/genesys-webcomponents/p-457dce75.entry.js +0 -1
  332. package/dist/genesys-webcomponents/p-4e030b49.js +0 -1
  333. package/dist/genesys-webcomponents/p-644b750b.entry.js +0 -1
  334. package/dist/genesys-webcomponents/p-655abec1.entry.js +0 -1
  335. package/dist/genesys-webcomponents/p-69153f39.entry.js +0 -1
  336. package/dist/genesys-webcomponents/p-6c72ef03.entry.js +0 -1
  337. package/dist/genesys-webcomponents/p-992542c8.entry.js +0 -1
  338. package/dist/genesys-webcomponents/p-9d684bc6.entry.js +0 -1
  339. package/dist/genesys-webcomponents/p-a1c693e2.entry.js +0 -1
  340. package/dist/genesys-webcomponents/p-e3342cc2.entry.js +0 -1
  341. package/dist/genesys-webcomponents/p-e7d70a06.entry.js +0 -1
  342. package/dist/genesys-webcomponents/p-e841c083.entry.js +0 -1
  343. package/dist/genesys-webcomponents/p-ea41620e.entry.js +0 -1
  344. package/dist/types/components/beta/gux-phone-input/components/gux-region-icon/gux-region-select.service.d.ts +0 -1
  345. package/dist/types/components/stable/gux-table/gux-table-select-menu/gux-table-select-popover/gux-table-header-popover.d.ts +0 -32
@@ -11,26 +11,69 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  import { forceUpdate, h } from "@stencil/core";
12
12
  import libphonenumber, { PhoneNumberFormat } from "google-libphonenumber";
13
13
  import { trackComponent } from "../../../utils/tracking/usage";
14
- import { regionCountryCodeMap } from "./services/RegionCountryCodeMap";
15
14
  import { buildI18nForComponent, getDesiredLocale } from "../../../i18n";
16
15
  import countryResources from "./i18n/en.json";
17
16
  import { OnClickOutside } from "../../../utils/decorator/on-click-outside";
18
17
  import { getRegionObjects } from "./services/region-map.service";
19
18
  import { preventBrowserValidationStyling } from "../../../utils/dom/prevent-browser-validation-styling";
20
19
  import { logWarn } from "../../../utils/error/log-error";
20
+ import simulateNativeEvent from "../../../utils/dom/simulate-native-event";
21
21
  export class GuxPhoneInput {
22
22
  constructor() {
23
23
  this.phoneUtil = libphonenumber.PhoneNumberUtil.getInstance();
24
24
  this.regionObjects = [];
25
- this.value = undefined;
25
+ this.value = '';
26
26
  this.defaultRegion = undefined;
27
27
  this.labelId = undefined;
28
28
  this.hasError = false;
29
29
  this.disabled = false;
30
30
  this.required = false;
31
- this.phoneNumberFormat = 'INTERNATIONAL';
32
- this.region = undefined;
31
+ this.phoneNumberFormat = 'NATIONAL';
32
+ this.regionOptions = [];
33
33
  this.expanded = false;
34
+ this.region = null;
35
+ }
36
+ // eslint-disable-next-line @typescript-eslint/require-await
37
+ async setRegionAlpha2Code(alpha2Code) {
38
+ this._setRegionAlpha2Code(alpha2Code);
39
+ }
40
+ // eslint-disable-next-line @typescript-eslint/require-await
41
+ async setRegionDialCode(dialCode) {
42
+ const newRegion = this.getRegionFromDialCode(dialCode);
43
+ this.updateInputWithNewRegion(newRegion, this.region);
44
+ }
45
+ // eslint-disable-next-line @typescript-eslint/require-await
46
+ async getRegion() {
47
+ return this.region;
48
+ }
49
+ // eslint-disable-next-line @typescript-eslint/require-await
50
+ async getFormattedNumber(format = 'E164') {
51
+ var _a;
52
+ const phone = this.parsePhoneNumber(this.value, (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code);
53
+ const libFormat = this.parseDisplayFormat(format);
54
+ return phone ? this.phoneUtil.format(phone, libFormat) : null;
55
+ }
56
+ // eslint-disable-next-line @typescript-eslint/require-await
57
+ async getExtension() {
58
+ var _a;
59
+ const phone = this.parsePhoneNumber(this.value, (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code);
60
+ return phone ? phone.getExtension() : null;
61
+ }
62
+ // eslint-disable-next-line @typescript-eslint/require-await
63
+ async isPossibleNumber() {
64
+ var _a;
65
+ const phone = this.parsePhoneNumber(this.value, (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code);
66
+ return phone ? this.phoneUtil.isPossibleNumber(phone) : false;
67
+ }
68
+ // eslint-disable-next-line @typescript-eslint/require-await
69
+ async isValidNumber() {
70
+ var _a;
71
+ const phone = this.parsePhoneNumber(this.value, (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code);
72
+ return phone ? this.phoneUtil.isValidNumber(phone) : false;
73
+ }
74
+ updateValue(number) {
75
+ var _a;
76
+ this._setRegionAlpha2Code((_a = this.getRegionFromValue(number)) === null || _a === void 0 ? void 0 : _a.alpha2Code);
34
77
  }
35
78
  focusSelectedItemAfterRender(expanded) {
36
79
  if (expanded && this.listboxElement) {
@@ -41,22 +84,30 @@ export class GuxPhoneInput {
41
84
  });
42
85
  }
43
86
  }
44
- validateValue(newValue) {
45
- const selectedListboxOptionElement = this.getOptionElementByValue(newValue);
46
- if (selectedListboxOptionElement) {
47
- this.listboxElement.value = newValue;
48
- return;
49
- }
87
+ setDisplayFormat(format) {
88
+ this.displayFormat = this.parseDisplayFormat(format);
50
89
  }
51
90
  onInternallistboxoptionsupdated(event) {
52
91
  event.stopPropagation();
53
92
  forceUpdate(this.root);
54
93
  }
55
94
  onBlur(event) {
95
+ var _a;
56
96
  this.stopPropagationOfInternalFocusEvents(event);
97
+ // Native change events are not composed so they will not propagate out of the outermost of the shadow DOM.
98
+ if (this.value !== this.valueWhenFocused ||
99
+ ((_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code) !== this.regionAlphaCodeWhenFocused) {
100
+ simulateNativeEvent(this.root, 'change');
101
+ }
57
102
  }
58
103
  onFocus(event) {
104
+ var _a;
59
105
  this.stopPropagationOfInternalFocusEvents(event);
106
+ this.valueWhenFocused = this.value;
107
+ this.regionAlphaCodeWhenFocused = (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code;
108
+ if (this.regionOptions.length === 0) {
109
+ this.regionOptions = this.getRegionOptions();
110
+ }
60
111
  }
61
112
  onFocusout() {
62
113
  this.collapseListbox('noFocusChange');
@@ -78,98 +129,132 @@ export class GuxPhoneInput {
78
129
  }
79
130
  }
80
131
  componentDidLoad() {
81
- this.setValidation();
82
132
  this.setInput();
83
133
  this.setListBox();
84
134
  }
85
135
  componentWillRender() {
86
136
  trackComponent(this.root);
87
- this.validateValue(this.region);
88
137
  }
89
138
  initialValueParse() {
90
139
  var _a;
91
- this.setDisplayFormat();
140
+ this.setDisplayFormat(this.phoneNumberFormat);
92
141
  if (this.value) {
93
142
  try {
94
143
  const phone = this.phoneUtil.parse(this.value);
95
- this.numberText = this.phoneUtil.format(phone, this.displayFormat);
96
- this.region = this.getRegionCode(phone);
144
+ this._setRegionAlpha2Code((_a = this.getRegionFromValue(this.value)) === null || _a === void 0 ? void 0 : _a.alpha2Code);
145
+ this.value = this.phoneUtil.format(phone, this.displayFormat);
97
146
  }
98
147
  catch (e) {
99
- if (this.numberText === undefined) {
100
- // only show warning on initial render
101
- logWarn(this.root, 'Number cannot be parsed');
102
- this.numberText = this.value;
103
- this.region = '';
104
- }
148
+ logWarn(this.root, 'Number cannot be parsed');
105
149
  }
106
150
  }
107
151
  else {
108
- this.region = ((_a = this.defaultRegion) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || '';
109
- this.numberText = '';
152
+ this._setRegionAlpha2Code(this.defaultRegionCode);
153
+ this.value = '';
110
154
  }
111
- if (this.listboxElement) {
112
- this.listboxElement.value = this.region;
155
+ }
156
+ parseDisplayFormat(format) {
157
+ let output;
158
+ switch (format.toUpperCase()) {
159
+ case 'INTERNATIONAL':
160
+ output = PhoneNumberFormat.INTERNATIONAL;
161
+ break;
162
+ case 'E164':
163
+ output = PhoneNumberFormat.E164;
164
+ break;
165
+ case 'NATIONAL':
166
+ default:
167
+ output = PhoneNumberFormat.NATIONAL;
168
+ break;
113
169
  }
170
+ return output;
114
171
  }
115
- onInputChange(number) {
116
- if (number.startsWith('+')) {
117
- try {
118
- this.region = this.getRegionCode(this.phoneUtil.parse(number));
119
- }
120
- catch (e) {
121
- // parse failed, so check if there is a matching region in the string
122
- this.region = this.getRegionCodeFromRegionObjects(number);
123
- }
172
+ /** Returns parsed phone number object or null if utility threw an error (unknown region or impossible to parse number) */
173
+ parsePhoneNumber(value, region = 'ZZ') {
174
+ try {
175
+ return this.phoneUtil.parse(value, region);
124
176
  }
125
- this.numberText = number;
126
- this.phoneNumberUpdated();
127
- }
128
- getRegionCode(number) {
129
- let region = this.phoneUtil.getRegionCodeForNumber(number);
130
- // setting region to empty when either 001 (global satellite) or ZZ (unknown) are returned
131
- // phoneUtil doesn't always handle these cases in its other functions, so setting to an empty region (which is unknown with a globe as an icon) works best
132
- if (region === '001' || region === 'ZZ') {
133
- region = '';
177
+ catch (e) {
178
+ return null;
134
179
  }
135
- return region;
136
180
  }
137
- getRegionCodeFromRegionObjects(number) {
138
- var _a;
139
- return (((_a = this.regionObjects
140
- .filter(region => number.startsWith(region.countryCode))
141
- .sort((a, b) => b.countryCode.length - a.countryCode.length)[0]) === null || _a === void 0 ? void 0 : _a.code) ||
142
- '');
143
- }
144
- validatePhoneNumber() {
145
- if (this.value) {
146
- try {
147
- const phone = this.phoneUtil.parse(this.value);
148
- const isValid = phone &&
149
- this.phoneUtil.isValidNumberForRegion(phone, this.phoneUtil.getRegionCodeForNumber(phone));
150
- this.phoneValidationError.emit(!isValid);
151
- }
152
- catch (e) {
153
- if (this.numberText) {
154
- logWarn(this.root, 'Number cannot be parsed');
155
- this.phoneValidationError.emit(true);
156
- }
181
+ onInputChange(number) {
182
+ this.value = number;
183
+ }
184
+ regionObjectToRegion(regionObject) {
185
+ let output = null;
186
+ if (regionObject) {
187
+ const regionCopy = Object.assign({}, regionObject);
188
+ delete regionCopy.name;
189
+ output = regionCopy;
190
+ }
191
+ return output;
192
+ }
193
+ _setRegionAlpha2Code(regionCode) {
194
+ const newAlpha2Code = regionCode === null || regionCode === void 0 ? void 0 : regionCode.toUpperCase();
195
+ const regionMatch = this.regionObjects.find(r => r.alpha2Code === newAlpha2Code);
196
+ const newRegion = this.regionObjectToRegion(regionMatch);
197
+ this.updateInputWithNewRegion(newRegion, this.region);
198
+ }
199
+ updateInputWithNewRegion(region, lastRegion) {
200
+ this.region = region;
201
+ if (this.value.startsWith('+') &&
202
+ (lastRegion === null || lastRegion === void 0 ? void 0 : lastRegion.dialCode) !== (region === null || region === void 0 ? void 0 : region.dialCode) &&
203
+ lastRegion !== null) {
204
+ const newValue = this.value.replace((lastRegion === null || lastRegion === void 0 ? void 0 : lastRegion.dialCode) || '+', (region === null || region === void 0 ? void 0 : region.dialCode) || '');
205
+ if (this.value !== newValue) {
206
+ this.value = newValue;
157
207
  }
158
208
  }
159
209
  }
160
- phoneNumberUpdated() {
161
- this.value = `+${this.numberText.replace(/\D/, '')}`;
162
- this.input.emit(this.value);
210
+ get defaultRegionCode() {
211
+ var _a, _b;
212
+ const defaultRegion = (_a = this.defaultRegion) === null || _a === void 0 ? void 0 : _a.toUpperCase();
213
+ const regionMatch = defaultRegion
214
+ ? this.regionObjects.find(r => r.alpha2Code === defaultRegion)
215
+ : undefined;
216
+ return (_b = regionMatch === null || regionMatch === void 0 ? void 0 : regionMatch.alpha2Code) !== null && _b !== void 0 ? _b : null;
217
+ }
218
+ getRegionFromValue(number) {
219
+ return this.isNationalNumber(number)
220
+ ? this.region || null
221
+ : this.getRegionFromDialCode(number);
222
+ }
223
+ isNationalNumber(number) {
224
+ return !number.startsWith('+');
225
+ }
226
+ getRegionFromDialCode(number) {
227
+ const matches = this.regionObjects
228
+ .filter(region => number.startsWith(region.dialCode))
229
+ .sort((a, b) => a.name.localeCompare(b.name))
230
+ .map(regionObj => this.regionObjectToRegion(regionObj));
231
+ if (number === '+') {
232
+ return this.region || null;
233
+ }
234
+ if (matches.length < 2) {
235
+ return matches[0] || null;
236
+ }
237
+ try {
238
+ // Use googlelib-phonenumber to parse and get the region code (primarily works for complete, valid numbers)
239
+ const parsedNumber = this.phoneUtil.parse(number);
240
+ const parsedRegionCode = this.phoneUtil.getRegionCodeForNumber(parsedNumber);
241
+ const match = matches.find(r => r.alpha2Code === parsedRegionCode);
242
+ if (match) {
243
+ return match;
244
+ }
245
+ }
246
+ catch (e) {
247
+ // Error thrown while parsing, continue processing without googlelib-phonenumber
248
+ }
249
+ const currentRegionMatch = matches.find(r => { var _a; return r.alpha2Code === ((_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code); });
250
+ const defaultRegionMatch = matches.find(r => r.alpha2Code === this.defaultRegionCode);
251
+ return currentRegionMatch || defaultRegionMatch || matches[0];
163
252
  }
164
253
  stopPropagationOfInternalFocusEvents(event) {
165
254
  if (this.root.contains(event.relatedTarget)) {
166
- return event.stopImmediatePropagation();
255
+ event.stopImmediatePropagation();
167
256
  }
168
257
  }
169
- getOptionElementByValue(value) {
170
- const listboxOptionElements = this.root.shadowRoot.querySelectorAll('gux-option');
171
- return Array.from(listboxOptionElements).find(listboxOptionElement => listboxOptionElement.value === value);
172
- }
173
258
  fieldButtonClick() {
174
259
  this.expanded = !this.expanded;
175
260
  }
@@ -181,42 +266,10 @@ export class GuxPhoneInput {
181
266
  this.fieldButtonElement.focus();
182
267
  }
183
268
  }
184
- updateRegion(newValue) {
185
- if (this.region !== newValue) {
186
- this.collapseListbox('focusFieldButton');
187
- this.region = newValue;
188
- if (this.numberText.startsWith('+')) {
189
- this.numberText = regionCountryCodeMap[this.region] || '';
190
- }
191
- else {
192
- this.numberText = regionCountryCodeMap[this.region]
193
- ? regionCountryCodeMap[this.region] + this.numberText
194
- : '';
195
- }
196
- this.phoneNumberUpdated();
197
- }
198
- }
199
- setDisplayFormat() {
200
- switch (this.phoneNumberFormat) {
201
- case 'INTERNATIONAL':
202
- this.displayFormat = PhoneNumberFormat.INTERNATIONAL;
203
- break;
204
- case 'E164':
205
- this.displayFormat = PhoneNumberFormat.E164;
206
- break;
207
- }
208
- }
209
- setValidation() {
210
- this.root.addEventListener('focusout', (event) => {
211
- event.stopPropagation();
212
- this.validatePhoneNumber();
213
- });
214
- }
215
269
  setInput() {
216
270
  this.inputElement = this.root.shadowRoot.querySelector('input[type="tel"]');
217
271
  preventBrowserValidationStyling(this.inputElement);
218
- this.inputElement.addEventListener('input', (event) => {
219
- event.stopPropagation();
272
+ this.inputElement.addEventListener('input', () => {
220
273
  this.onInputChange(this.inputElement.value);
221
274
  });
222
275
  this.inputElement.addEventListener('focusin', (event) => {
@@ -226,11 +279,11 @@ export class GuxPhoneInput {
226
279
  }
227
280
  setListBox() {
228
281
  this.listboxElement.addEventListener('input', (event) => {
229
- event.stopPropagation();
230
- this.updateRegion(event.target.value);
231
- });
232
- this.listboxElement.addEventListener('change', (event) => {
233
- event.stopPropagation();
282
+ const regionCode = event.target
283
+ .value;
284
+ this.guxregionselect.emit(regionCode);
285
+ this._setRegionAlpha2Code(regionCode);
286
+ this.collapseListbox('focusFieldButton');
234
287
  });
235
288
  this.listboxElement.addEventListener('focusout', (event) => {
236
289
  event.stopPropagation();
@@ -255,11 +308,12 @@ export class GuxPhoneInput {
255
308
  return (h("div", { class: "gux-region-select" }, h("button", { type: "button", class: "gux-field gux-field-button", disabled: this.disabled, onClick: this.fieldButtonClick.bind(this), ref: el => (this.fieldButtonElement = el), "aria-haspopup": "listbox", "aria-expanded": this.expanded.toString(), "aria-label": this.i18n('regionDropdownButton') }, h("div", { class: "gux-field-content" }, this.renderButtonDisplay()), h("gux-icon", { class: "gux-expand-icon", iconName: "chevron-small-down", decorative: true }))));
256
309
  }
257
310
  renderButtonDisplay() {
258
- const selectedListboxOptionElement = this.getOptionElementByValue(this.region);
259
- return (h("div", { class: "gux-selected-option" }, (selectedListboxOptionElement === null || selectedListboxOptionElement === void 0 ? void 0 : selectedListboxOptionElement.value) ? (h("gux-region-icon", { region: this.region, "screenreader-text": this.i18n(this.region) })) : (h("gux-icon", { "icon-name": "globe", "screenreader-text": this.i18n('unknownRegion') }))));
311
+ var _a, _b;
312
+ return (h("div", { class: "gux-selected-option" }, this.region ? (h("gux-region-icon", { region: (_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code, "screenreader-text": this.i18n((_b = this.region) === null || _b === void 0 ? void 0 : _b.alpha2Code) })) : (h("gux-icon", { "icon-name": "globe", "screenreader-text": this.i18n('unknownRegion') }))));
260
313
  }
261
314
  renderInput() {
262
- return (h("input", { id: 'tel-input', class: "gux-phone-text-input", type: "tel", placeholder: this.phoneUtil.format(this.phoneUtil.getExampleNumber(this.region || 'US'), this.displayFormat), value: this.numberText, disabled: this.disabled }));
315
+ var _a;
316
+ return (h("input", { id: 'tel-input', class: "gux-phone-text-input", type: "tel", placeholder: this.phoneUtil.format(this.phoneUtil.getExampleNumber(((_a = this.region) === null || _a === void 0 ? void 0 : _a.alpha2Code) || this.defaultRegionCode || 'US'), this.displayFormat), value: this.value, disabled: this.disabled }));
263
317
  }
264
318
  renderTarget() {
265
319
  return (h("div", { class: {
@@ -267,14 +321,16 @@ export class GuxPhoneInput {
267
321
  'gux-error': this.hasError
268
322
  }, slot: "target" }, this.renderCountryButton(), this.renderInput()));
269
323
  }
270
- renderPopup() {
271
- const options = [
324
+ getRegionOptions() {
325
+ return [
272
326
  (h("gux-option", { value: "" }, h("span", { class: "gux-option-content" }, h("gux-icon", { "icon-name": "globe", decorative: true }), h("span", null, this.i18n('unknownRegion')), h("span", { class: "gux-country-code" }, "+"))))
273
- ].concat(this.regionObjects.map(region => (h("gux-option", { value: region.code }, h("span", { class: "gux-option-content" }, h("gux-region-icon", { region: region.code }), h("span", null, region.name), h("span", { class: "gux-country-code" }, region.countryCode))))));
274
- return (h("div", { slot: "popup", class: "gux-listbox-container" }, h("gux-listbox", { "aria-label": this.i18n('regionDropdown') }, options)));
327
+ ].concat(this.regionObjects.map(region => (h("gux-option", { value: region.alpha2Code }, h("span", { class: "gux-option-content" }, h("gux-region-icon", { region: region.alpha2Code }), h("span", null, region.name), h("span", { class: "gux-country-code" }, region.dialCode))))));
328
+ }
329
+ renderPopup() {
330
+ return (h("div", { slot: "popup", class: "gux-listbox-container" }, h("gux-listbox", { "aria-label": this.i18n('regionDropdown'), value: this.region ? this.region.alpha2Code : '' }, this.regionOptions)));
275
331
  }
276
332
  render() {
277
- return (h("gux-popup", { expanded: this.expanded, disabled: this.disabled }, this.renderTarget(), this.renderPopup()));
333
+ return (h("gux-popup", { expanded: this.expanded, disabled: this.disabled, "exceed-target-width": true }, this.renderTarget(), this.renderPopup()));
278
334
  }
279
335
  static get is() { return "gux-phone-input-beta"; }
280
336
  static get encapsulation() { return "shadow"; }
@@ -305,19 +361,20 @@ export class GuxPhoneInput {
305
361
  "text": ""
306
362
  },
307
363
  "attribute": "value",
308
- "reflect": false
364
+ "reflect": false,
365
+ "defaultValue": "''"
309
366
  },
310
367
  "defaultRegion": {
311
368
  "type": "string",
312
369
  "mutable": false,
313
370
  "complexType": {
314
- "original": "RegionCodes",
371
+ "original": "Alpha2Code",
315
372
  "resolved": "\"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BR\" | \"BS\" | \"BT\" | \"BV\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CF\" | \"CG\" | \"CH\" | \"CI\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CV\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB\" | \"GD\" | \"GE\" | \"GF\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GP\" | \"GQ\" | \"GR\" | \"GS\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MF\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NC\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PM\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RE\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SD\" | \"SE\" | \"SG\" | \"SH\" | \"SI\" | \"SJ\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VA\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WF\" | \"WS\" | \"XK\" | \"YE\" | \"YT\" | \"ZA\" | \"ZM\" | \"ZW\"",
316
373
  "references": {
317
- "RegionCodes": {
374
+ "Alpha2Code": {
318
375
  "location": "import",
319
- "path": "./services/RegionCountryCodeMap",
320
- "id": "src/components/beta/gux-phone-input/services/RegionCountryCodeMap.ts::RegionCodes"
376
+ "path": "./gux-phone.types",
377
+ "id": "src/components/beta/gux-phone-input/gux-phone.types.ts::Alpha2Code"
321
378
  }
322
379
  }
323
380
  },
@@ -325,7 +382,7 @@ export class GuxPhoneInput {
325
382
  "optional": false,
326
383
  "docs": {
327
384
  "tags": [],
328
- "text": ""
385
+ "text": "Default ISO 3166-1 alpha-2 region code."
329
386
  },
330
387
  "attribute": "default-region",
331
388
  "reflect": false
@@ -405,8 +462,8 @@ export class GuxPhoneInput {
405
462
  "type": "string",
406
463
  "mutable": false,
407
464
  "complexType": {
408
- "original": "'E164' | 'INTERNATIONAL'",
409
- "resolved": "\"E164\" | \"INTERNATIONAL\"",
465
+ "original": "'E164' | 'INTERNATIONAL' | 'NATIONAL'",
466
+ "resolved": "\"E164\" | \"INTERNATIONAL\" | \"NATIONAL\"",
410
467
  "references": {}
411
468
  },
412
469
  "required": false,
@@ -417,20 +474,21 @@ export class GuxPhoneInput {
417
474
  },
418
475
  "attribute": "phone-number-format",
419
476
  "reflect": false,
420
- "defaultValue": "'INTERNATIONAL'"
477
+ "defaultValue": "'NATIONAL'"
421
478
  }
422
479
  };
423
480
  }
424
481
  static get states() {
425
482
  return {
426
- "region": {},
427
- "expanded": {}
483
+ "regionOptions": {},
484
+ "expanded": {},
485
+ "region": {}
428
486
  };
429
487
  }
430
488
  static get events() {
431
489
  return [{
432
- "method": "input",
433
- "name": "input",
490
+ "method": "guxregionselect",
491
+ "name": "guxregionselect",
434
492
  "bubbles": true,
435
493
  "cancelable": true,
436
494
  "composed": true,
@@ -443,28 +501,161 @@ export class GuxPhoneInput {
443
501
  "resolved": "string",
444
502
  "references": {}
445
503
  }
446
- }, {
447
- "method": "phoneValidationError",
448
- "name": "phoneValidationError",
449
- "bubbles": true,
450
- "cancelable": true,
451
- "composed": true,
504
+ }];
505
+ }
506
+ static get methods() {
507
+ return {
508
+ "setRegionAlpha2Code": {
509
+ "complexType": {
510
+ "signature": "(alpha2Code: Alpha2Code) => Promise<void>",
511
+ "parameters": [{
512
+ "tags": [],
513
+ "text": ""
514
+ }],
515
+ "references": {
516
+ "Promise": {
517
+ "location": "global",
518
+ "id": "global::Promise"
519
+ },
520
+ "Alpha2Code": {
521
+ "location": "import",
522
+ "path": "./gux-phone.types",
523
+ "id": "src/components/beta/gux-phone-input/gux-phone.types.ts::Alpha2Code"
524
+ }
525
+ },
526
+ "return": "Promise<void>"
527
+ },
452
528
  "docs": {
453
- "tags": [],
454
- "text": ""
529
+ "text": "",
530
+ "tags": []
531
+ }
532
+ },
533
+ "setRegionDialCode": {
534
+ "complexType": {
535
+ "signature": "(dialCode: string) => Promise<void>",
536
+ "parameters": [{
537
+ "tags": [],
538
+ "text": ""
539
+ }],
540
+ "references": {
541
+ "Promise": {
542
+ "location": "global",
543
+ "id": "global::Promise"
544
+ }
545
+ },
546
+ "return": "Promise<void>"
455
547
  },
548
+ "docs": {
549
+ "text": "",
550
+ "tags": []
551
+ }
552
+ },
553
+ "getRegion": {
456
554
  "complexType": {
457
- "original": "boolean",
458
- "resolved": "boolean",
459
- "references": {}
555
+ "signature": "() => Promise<Region>",
556
+ "parameters": [],
557
+ "references": {
558
+ "Promise": {
559
+ "location": "global",
560
+ "id": "global::Promise"
561
+ },
562
+ "Region": {
563
+ "location": "import",
564
+ "path": "./gux-phone.types",
565
+ "id": "src/components/beta/gux-phone-input/gux-phone.types.ts::Region"
566
+ }
567
+ },
568
+ "return": "Promise<Region>"
569
+ },
570
+ "docs": {
571
+ "text": "",
572
+ "tags": []
460
573
  }
461
- }];
574
+ },
575
+ "getFormattedNumber": {
576
+ "complexType": {
577
+ "signature": "(format?: typeof this.phoneNumberFormat) => Promise<string>",
578
+ "parameters": [{
579
+ "tags": [],
580
+ "text": ""
581
+ }],
582
+ "references": {
583
+ "Promise": {
584
+ "location": "global",
585
+ "id": "global::Promise"
586
+ }
587
+ },
588
+ "return": "Promise<string>"
589
+ },
590
+ "docs": {
591
+ "text": "",
592
+ "tags": []
593
+ }
594
+ },
595
+ "getExtension": {
596
+ "complexType": {
597
+ "signature": "() => Promise<string>",
598
+ "parameters": [],
599
+ "references": {
600
+ "Promise": {
601
+ "location": "global",
602
+ "id": "global::Promise"
603
+ }
604
+ },
605
+ "return": "Promise<string>"
606
+ },
607
+ "docs": {
608
+ "text": "",
609
+ "tags": []
610
+ }
611
+ },
612
+ "isPossibleNumber": {
613
+ "complexType": {
614
+ "signature": "() => Promise<boolean>",
615
+ "parameters": [],
616
+ "references": {
617
+ "Promise": {
618
+ "location": "global",
619
+ "id": "global::Promise"
620
+ }
621
+ },
622
+ "return": "Promise<boolean>"
623
+ },
624
+ "docs": {
625
+ "text": "",
626
+ "tags": []
627
+ }
628
+ },
629
+ "isValidNumber": {
630
+ "complexType": {
631
+ "signature": "() => Promise<boolean>",
632
+ "parameters": [],
633
+ "references": {
634
+ "Promise": {
635
+ "location": "global",
636
+ "id": "global::Promise"
637
+ }
638
+ },
639
+ "return": "Promise<boolean>"
640
+ },
641
+ "docs": {
642
+ "text": "",
643
+ "tags": []
644
+ }
645
+ }
646
+ };
462
647
  }
463
648
  static get elementRef() { return "root"; }
464
649
  static get watchers() {
465
650
  return [{
651
+ "propName": "value",
652
+ "methodName": "updateValue"
653
+ }, {
466
654
  "propName": "expanded",
467
655
  "methodName": "focusSelectedItemAfterRender"
656
+ }, {
657
+ "propName": "phoneNumberFormat",
658
+ "methodName": "setDisplayFormat"
468
659
  }];
469
660
  }
470
661
  static get listeners() {