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.
- package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
- package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-advanced-dropdown-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-badge.cjs.entry.js +4 -3
- package/dist/cjs/gux-blank-state.cjs.entry.js +1 -1
- package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-slot.cjs.entry.js +4 -3
- package/dist/cjs/gux-button.cjs.entry.js +33 -18
- package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
- package/dist/cjs/gux-card.cjs.entry.js +1 -1
- package/dist/cjs/gux-column-manager-item.cjs.entry.js +1 -2
- package/dist/cjs/gux-column-manager.cjs.entry.js +4 -4
- package/dist/cjs/gux-content-search.cjs.entry.js +2 -2
- package/dist/cjs/gux-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-dismiss-button.cjs.entry.js +2 -2
- package/dist/cjs/gux-dropdown-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/gux-flyout-menu.cjs.entry.js +4 -4
- package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-color.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-number_3.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-phone.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-range.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-search.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-select.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-text-like.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-textarea.cjs.entry.js +2 -2
- package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/gux-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-inline-alert.cjs.entry.js +2 -2
- package/dist/cjs/gux-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-loading-message.cjs.entry.js +1 -1
- package/dist/cjs/gux-menu-option.cjs.entry.js +8 -1
- package/dist/cjs/gux-menu.cjs.entry.js +1 -1
- package/dist/cjs/gux-modal.cjs.entry.js +1 -1
- package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gux-phone-input-beta.cjs.entry.js +436 -378
- package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
- package/dist/cjs/gux-rating.cjs.entry.js +1 -1
- package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-segmented-control-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-skip-navigation-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
- package/dist/cjs/gux-submenu.cjs.entry.js +8 -13
- package/dist/cjs/gux-switch-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-tab-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/gux-tab.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-select-menu.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/gux-table.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gux-tag.cjs.entry.js +1 -1
- package/dist/cjs/gux-text-highlight.cjs.entry.js +2 -2
- package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-zone-picker-beta.cjs.entry.js +145 -47
- package/dist/cjs/gux-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-toggle-slider.cjs.entry.js +5 -3
- package/dist/cjs/gux-toggle.cjs.entry.js +2 -2
- package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/index-39160f18.js +4 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{on-attribute-change-4db59350.js → on-attribute-change-9b2d8c85.js} +0 -13
- package/dist/cjs/{usage-9feecec4.js → usage-7bd0f4a2.js} +1 -2
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/beta/gux-phone-input/gux-phone-input.js +334 -143
- package/dist/collection/components/beta/gux-phone-input/gux-phone.types.js +1 -0
- package/dist/collection/components/beta/gux-phone-input/services/RegionCountryCodeMap.js +0 -249
- package/dist/collection/components/beta/gux-phone-input/services/region-map.service.js +3 -3
- package/dist/collection/components/beta/gux-phone-input/tests/gux-phone-input.e2e.js +50 -38
- package/dist/collection/components/beta/gux-time-zone-picker/tests/gux-time-zone-picker.e2e.js +3 -3
- package/dist/collection/components/stable/gux-alert/gux-inline-alert.css +1 -1
- package/dist/collection/components/stable/gux-badge/gux-badge.css +2 -2
- package/dist/collection/components/stable/gux-button/gux-button.css +4 -1
- package/dist/collection/components/stable/gux-button/gux-button.js +36 -16
- package/dist/collection/components/stable/gux-button-slot/gux-button-slot.css +6 -0
- package/dist/collection/components/stable/gux-button-slot/gux-button-slot.js +19 -1
- package/dist/collection/components/stable/gux-column-manager/gux-column-manager-item/gux-column-manager-item.css +11 -3
- package/dist/collection/components/stable/gux-column-manager/gux-column-manager-item/gux-column-manager-item.js +0 -1
- package/dist/collection/components/stable/gux-column-manager/gux-column-manager.css +7 -5
- package/dist/collection/components/stable/gux-dismiss-button/gux-dismiss-button.css +2 -2
- package/dist/collection/components/stable/gux-flyout-menu/gux-flyout-menu.js +3 -3
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.css +5 -5
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.js +14 -0
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.css +1 -1
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.js +1 -0
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.css +8 -8
- package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.js +8 -12
- package/dist/collection/components/stable/gux-radial-loading/gux-radial-loading.css +5 -14
- package/dist/collection/components/stable/gux-radial-progress/gux-radial-progress.css +1 -4
- package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-menu.js +1 -1
- package/dist/collection/components/stable/gux-table/tests/gux-table.e2e.js +7 -4
- package/dist/collection/components/stable/gux-tabs/gux-tab/gux-tab.css +21 -20
- package/dist/collection/components/stable/gux-tabs/gux-tab-list/gux-tab-list.css +4 -4
- package/dist/collection/components/stable/gux-tabs/gux-tab-panel/gux-tab-panel.css +1 -1
- package/dist/collection/components/stable/gux-tabs/tests/gux-tabs.e2e.js +1 -2
- package/dist/collection/components/stable/gux-text-highlight/gux-text-highlight.css +4 -1
- package/dist/collection/components/stable/gux-toggle/gux-toggle-slider/gux-toggle-slider.css +81 -19
- package/dist/collection/components/stable/gux-toggle/gux-toggle-slider/gux-toggle-slider.js +4 -2
- package/dist/collection/components/stable/gux-toggle/gux-toggle.css +18 -6
- package/dist/component-specs.json +5 -4
- package/dist/deploy-info.json +3 -3
- package/dist/esm/genesys-webcomponents.js +1 -1
- package/dist/esm/gux-accordion.entry.js +1 -1
- package/dist/esm/gux-action-button.entry.js +1 -1
- package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-advanced-dropdown-legacy.entry.js +1 -1
- package/dist/esm/gux-announce-beta.entry.js +1 -1
- package/dist/esm/gux-badge.entry.js +4 -3
- package/dist/esm/gux-blank-state.entry.js +1 -1
- package/dist/esm/gux-breadcrumbs.entry.js +1 -1
- package/dist/esm/gux-button-multi.entry.js +1 -1
- package/dist/esm/gux-button-slot.entry.js +4 -3
- package/dist/esm/gux-button.entry.js +33 -18
- package/dist/esm/gux-calendar.entry.js +1 -1
- package/dist/esm/gux-card.entry.js +1 -1
- package/dist/esm/gux-column-manager-item.entry.js +1 -2
- package/dist/esm/gux-column-manager.entry.js +4 -4
- package/dist/esm/gux-content-search.entry.js +2 -2
- package/dist/esm/gux-context-menu.entry.js +1 -1
- package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
- package/dist/esm/gux-date-beta.entry.js +1 -1
- package/dist/esm/gux-date-time-beta.entry.js +1 -1
- package/dist/esm/gux-datepicker.entry.js +1 -1
- package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
- package/dist/esm/gux-dismiss-button.entry.js +2 -2
- package/dist/esm/gux-dropdown-multi.entry.js +1 -1
- package/dist/esm/gux-dropdown_3.entry.js +1 -1
- package/dist/esm/gux-flyout-menu.entry.js +4 -4
- package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
- package/dist/esm/gux-form-field-color.entry.js +2 -2
- package/dist/esm/gux-form-field-dropdown.entry.js +2 -2
- package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
- package/dist/esm/gux-form-field-number_3.entry.js +2 -2
- package/dist/esm/gux-form-field-phone.entry.js +2 -2
- package/dist/esm/gux-form-field-radio.entry.js +1 -1
- package/dist/esm/gux-form-field-range.entry.js +2 -2
- package/dist/esm/gux-form-field-search.entry.js +2 -2
- package/dist/esm/gux-form-field-select.entry.js +2 -2
- package/dist/esm/gux-form-field-text-like.entry.js +2 -2
- package/dist/esm/gux-form-field-textarea.entry.js +2 -2
- package/dist/esm/gux-form-field-time-picker.entry.js +2 -2
- package/dist/esm/gux-icon.entry.js +1 -1
- package/dist/esm/gux-inline-alert.entry.js +2 -2
- package/dist/esm/gux-list.entry.js +1 -1
- package/dist/esm/gux-listbox-multi.entry.js +1 -1
- package/dist/esm/gux-loading-message.entry.js +1 -1
- package/dist/esm/gux-menu-option.entry.js +8 -1
- package/dist/esm/gux-menu.entry.js +1 -1
- package/dist/esm/gux-modal.entry.js +1 -1
- package/dist/esm/gux-month-picker-beta.entry.js +1 -1
- package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
- package/dist/esm/gux-pagination-cursor.entry.js +1 -1
- package/dist/esm/gux-pagination-legacy.entry.js +1 -1
- package/dist/esm/gux-pagination.entry.js +1 -1
- package/dist/esm/gux-phone-input-beta.entry.js +436 -378
- package/dist/esm/gux-popover-list.entry.js +1 -1
- package/dist/esm/gux-radial-loading.entry.js +1 -1
- package/dist/esm/gux-radial-progress.entry.js +1 -1
- package/dist/esm/gux-rating.entry.js +1 -1
- package/dist/esm/gux-region-icon.entry.js +1 -1
- package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
- package/dist/esm/gux-segmented-control-beta.entry.js +1 -1
- package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-skip-navigation-list.entry.js +1 -1
- package/dist/esm/gux-sort-control.entry.js +1 -1
- package/dist/esm/gux-submenu.entry.js +8 -13
- package/dist/esm/gux-switch-legacy.entry.js +1 -1
- package/dist/esm/gux-tab-list.entry.js +1 -1
- package/dist/esm/gux-tab-panel.entry.js +1 -1
- package/dist/esm/gux-tab.entry.js +1 -1
- package/dist/esm/gux-table-select-menu.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
- package/dist/esm/gux-table-toolbar.entry.js +1 -1
- package/dist/esm/gux-table.entry.js +1 -1
- package/dist/esm/gux-tabs-advanced.entry.js +1 -1
- package/dist/esm/gux-tabs.entry.js +1 -1
- package/dist/esm/gux-tag.entry.js +1 -1
- package/dist/esm/gux-text-highlight.entry.js +2 -2
- package/dist/esm/gux-time-beta.entry.js +1 -1
- package/dist/esm/gux-time-picker.entry.js +1 -1
- package/dist/esm/gux-time-zone-picker-beta.entry.js +145 -47
- package/dist/esm/gux-toast.entry.js +1 -1
- package/dist/esm/gux-toggle-slider.entry.js +5 -3
- package/dist/esm/gux-toggle.entry.js +2 -2
- package/dist/esm/gux-tooltip.entry.js +1 -1
- package/dist/esm/index-a0eec33a.js +4 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{on-attribute-change-b91132e6.js → on-attribute-change-42a46627.js} +1 -13
- package/dist/esm/{usage-fb76486b.js → usage-d6681f18.js} +1 -2
- package/dist/genesys-webcomponents/genesys-webcomponents.css +3 -3
- package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
- package/dist/genesys-webcomponents/{p-ad5a9495.entry.js → p-07976cff.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7deeb046.entry.js → p-09453413.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-85a97fdd.entry.js → p-0bb16852.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-17b43bc4.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-a811a043.entry.js → p-18e3fe76.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7463fc52.entry.js → p-1d721625.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7e6b5a72.entry.js → p-1dece006.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b716c999.entry.js → p-22f7b058.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e97e4344.entry.js → p-28c70a30.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e491bcac.entry.js → p-32454e23.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f254a399.entry.js → p-3336925d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-04b1029f.entry.js → p-3465ba68.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d5f9129a.entry.js → p-35174acd.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-37a6cf93.entry.js +1 -0
- package/dist/genesys-webcomponents/p-37bfd195.js +1 -0
- package/dist/genesys-webcomponents/p-38bad8d2.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-d89f8435.entry.js → p-38c781a4.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-298d37f4.entry.js → p-3af115ad.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b1239813.entry.js → p-3c4047d1.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-283d98ec.entry.js → p-3cc59add.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-888e521b.js → p-3cf08509.js} +1 -1
- package/dist/genesys-webcomponents/{p-d7625bff.entry.js → p-3ea3a764.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0714156f.entry.js → p-402b6233.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0681e196.entry.js → p-432bb1ce.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-62bec424.entry.js → p-4b7e6ef2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-22041782.entry.js → p-4dee44f2.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-4e890707.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-94c44b6b.entry.js → p-52054142.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-946d3b24.entry.js → p-530c362b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-1d35e592.entry.js → p-5b36dd80.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4c8af50f.entry.js → p-5dad03e8.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-882b432e.entry.js → p-5f316b49.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ee292004.entry.js → p-6236f519.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-53e99e1c.entry.js → p-681b7fcf.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0f20be96.entry.js → p-6b815f9c.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-6d04e8cd.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-59674f9b.entry.js → p-6dc75dce.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-2767eedd.entry.js → p-6debb4e2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3bca88f0.entry.js → p-700878bf.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-723cdd66.entry.js → p-707129d2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-66642f70.entry.js → p-7a40b615.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-79f33755.entry.js → p-7af593fb.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ff028bc8.entry.js → p-7b98f591.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-7e9074e8.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-959d205b.entry.js → p-81a7dfc0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-092af550.entry.js → p-834ede94.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-49abdc36.entry.js → p-83b2133c.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-87c75c0c.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-c74273f5.entry.js → p-8df4a700.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-8ff2c1fe.entry.js +1 -0
- package/dist/genesys-webcomponents/p-93608d93.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-e6ba3486.entry.js → p-967772db.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-da1c6815.entry.js → p-970339d2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-5edbbaa2.entry.js → p-9e79e6a9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-079a3314.entry.js → p-9f83906b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e05782d1.entry.js → p-a712590a.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a1151219.entry.js → p-a7341016.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-ac85575f.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-0023db21.entry.js → p-aeb23536.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-93296fc2.entry.js → p-b1aff517.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b09ed8fd.entry.js → p-b48cf7fd.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-cda8804c.entry.js → p-b6271f28.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-34f39f9d.entry.js → p-b67960df.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7ae89101.entry.js → p-b6d1e2e1.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-b6fb5b65.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-8cde9be1.entry.js → p-b8755c5a.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-bb1ee297.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-2e0206ad.entry.js → p-cc724d95.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-d264a043.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-c1d6b950.entry.js → p-d2a6a92d.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-d967c7e7.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-5f2d702e.entry.js → p-da6e6f64.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a5f41d6c.entry.js → p-dadc097d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f6cdabee.entry.js → p-dc897b48.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b83c0fce.entry.js → p-df01c156.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-06a051e2.entry.js → p-e3fc7d7d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4fc6e77b.entry.js → p-e604265e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bc151fdb.entry.js → p-e71c94cc.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-895e3e22.entry.js → p-e8261f28.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-9dfd5bd0.entry.js → p-e99f4472.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-fb229e19.entry.js → p-eb8434c9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-703abdff.entry.js → p-ee473cc9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-89ef8747.entry.js → p-ee643cb5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-759d93b2.entry.js → p-f2c2a915.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c8193aef.entry.js → p-f327dc53.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c8d42dd7.entry.js → p-f5540a5d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-88b39a07.entry.js → p-fb683f3e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8a67c5ac.entry.js → p-fbb62dfa.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/components/beta/gux-phone-input/gux-phone-input.d.ts +31 -16
- package/dist/types/components/beta/gux-phone-input/gux-phone.types.d.ts +11 -0
- package/dist/types/components/beta/gux-phone-input/services/RegionCountryCodeMap.d.ts +0 -3
- package/dist/types/components/beta/gux-phone-input/services/region-map.service.d.ts +1 -5
- package/dist/types/components/stable/gux-button/gux-button.d.ts +5 -0
- package/dist/types/components/stable/gux-button-slot/gux-button-slot.d.ts +1 -0
- package/dist/types/components/stable/gux-flyout-menu/gux-menu/gux-menu-option/gux-menu-option.d.ts +1 -0
- package/dist/types/components.d.ts +22 -45
- package/dist/types/stencil-wrapper.d.ts +1 -1
- package/package.json +1 -2
- package/dist/cjs/gux-table-select-popover.cjs.entry.js +0 -1893
- package/dist/collection/components/beta/gux-phone-input/components/gux-region-icon/gux-region-select.service.js +0 -25
- package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-popover/gux-table-header-popover.js +0 -171
- package/dist/collection/components/stable/gux-table/gux-table-select-menu/gux-table-select-popover/gux-table-select-popover.css +0 -12
- package/dist/esm/gux-table-select-popover.entry.js +0 -1889
- package/dist/genesys-webcomponents/p-041433c6.entry.js +0 -1
- package/dist/genesys-webcomponents/p-0439dede.entry.js +0 -1
- package/dist/genesys-webcomponents/p-3b9f7f34.entry.js +0 -1
- package/dist/genesys-webcomponents/p-457dce75.entry.js +0 -1
- package/dist/genesys-webcomponents/p-4e030b49.js +0 -1
- package/dist/genesys-webcomponents/p-644b750b.entry.js +0 -1
- package/dist/genesys-webcomponents/p-655abec1.entry.js +0 -1
- package/dist/genesys-webcomponents/p-69153f39.entry.js +0 -1
- package/dist/genesys-webcomponents/p-6c72ef03.entry.js +0 -1
- package/dist/genesys-webcomponents/p-992542c8.entry.js +0 -1
- package/dist/genesys-webcomponents/p-9d684bc6.entry.js +0 -1
- package/dist/genesys-webcomponents/p-a1c693e2.entry.js +0 -1
- package/dist/genesys-webcomponents/p-e3342cc2.entry.js +0 -1
- package/dist/genesys-webcomponents/p-e7d70a06.entry.js +0 -1
- package/dist/genesys-webcomponents/p-e841c083.entry.js +0 -1
- package/dist/genesys-webcomponents/p-ea41620e.entry.js +0 -1
- package/dist/types/components/beta/gux-phone-input/components/gux-region-icon/gux-region-select.service.d.ts +0 -1
- 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 =
|
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 = '
|
32
|
-
this.
|
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
|
-
|
45
|
-
|
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.
|
96
|
-
this.
|
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
|
-
|
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.
|
109
|
-
this.
|
152
|
+
this._setRegionAlpha2Code(this.defaultRegionCode);
|
153
|
+
this.value = '';
|
110
154
|
}
|
111
|
-
|
112
|
-
|
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
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
126
|
-
|
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
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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
|
-
|
161
|
-
|
162
|
-
this.
|
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
|
-
|
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', (
|
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.
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
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
|
-
|
259
|
-
return (h("div", { class: "gux-selected-option" }, (
|
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
|
-
|
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
|
-
|
271
|
-
|
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.
|
274
|
-
|
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": "
|
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
|
-
"
|
374
|
+
"Alpha2Code": {
|
318
375
|
"location": "import",
|
319
|
-
"path": "./
|
320
|
-
"id": "src/components/beta/gux-phone-input/
|
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": "'
|
477
|
+
"defaultValue": "'NATIONAL'"
|
421
478
|
}
|
422
479
|
};
|
423
480
|
}
|
424
481
|
static get states() {
|
425
482
|
return {
|
426
|
-
"
|
427
|
-
"expanded": {}
|
483
|
+
"regionOptions": {},
|
484
|
+
"expanded": {},
|
485
|
+
"region": {}
|
428
486
|
};
|
429
487
|
}
|
430
488
|
static get events() {
|
431
489
|
return [{
|
432
|
-
"method": "
|
433
|
-
"name": "
|
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
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
"
|
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
|
-
"
|
454
|
-
"
|
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
|
-
"
|
458
|
-
"
|
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() {
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|