Files
im_webapp/umd/290.prod.js
T
2023-01-27 16:18:23 -08:00

2 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";(globalThis.webpackChunktinode_webapp=globalThis.webpackChunktinode_webapp||[]).push([[290],{1290:(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var c=s(7363),a=s.n(c),n=s(916),l=s(6670),o=s(3905);class r extends a().PureComponent{constructor(e){super(e),this.countries=[];const{formatDisplayName:t}=e.intl;l.forEach((e=>{e.dial.split(",").forEach((s=>{this.countries.push({dial:s.trim(),code:e.code,flag:(0,o.Yu)(e.code),name:t(e.code,{type:"region"})})}))})),this.countries.sort(((e,t)=>e.name.localeCompare(t.name)))}componentDidMount(){this.selectedRef&&this.selectedRef.scrollIntoView({block:"center",inline:"nearest"})}render(){const e=[],t=this.props.selected||"US";return this.countries.forEach(((s,c)=>{const n=s.code==t?"selected ":"";e.push(a().createElement("li",{className:n,key:c,ref:e=>{s.code==t&&(this.selectedRef=e)},onClick:e=>this.props.onSubmit(s.code,s.dial)},a().createElement("span",{className:"country-flag"},s.flag),a().createElement("span",{className:"country"}," ",s.name),a().createElement("span",{className:"dial-code"}," +",s.dial)))})),a().createElement("div",{className:"scrollable-panel",style:{height:"30rem"}},a().createElement("ul",{className:"phone-country-selector"},e))}}const i=(0,n.injectIntl)(r)}}]);
//# sourceMappingURL=290.prod.js.map