@ikas/popup-renderer 1.0.201 → 1.0.202

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.
@@ -1 +1 @@
1
- import{__awaiter as e,__assign as t,__generator as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import*as r from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import n from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumber as i}from'./../../../../ext/libphonenumber-js/min/exports/parsePhoneNumber.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{isSupportedCountry as s}from'./../../../../ext/libphonenumber-js/min/exports/isSupportedCountry.js';import{getCountryCallingCode as l}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as a}from'./../../../../ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';import m from"./get-countries.js";import{observer as u}from'./../../../../ext/mobx-react-lite/es/observer.js';var d=u((function(u){var d=u.disabled,p=void 0!==d&&d,c=u.placeholder,h=u.value,b=u.onChange,v=u.inputStyle,f=u.className,j=u.sfProps,x=r.useState([]),g=x[0],y=x[1],_=r.useState((null==j?void 0:j.currentCountryCode)||"TR"),C=_[0],E=_[1],N=r.useState(""),S=N[0],w=N[1];r.useEffect((function(){P();var e=C;if(s(e)||(e="US"),h){var t=i(h);t&&t.country&&(e=t.country),w(a(h,e))}else I(e);E(e)}),[null==j?void 0:j.currentCountryCode]);var P=function(){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,m(null==j?void 0:j.currentLocale)];case 1:return e=t.sent(),y(e),[2]}}))}))},I=function(e){var t=l(e);w("+".concat(t))},T=function(e){return a(e,C)};return r.createElement("div",{style:t({position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",gap:8,pointerEvents:j?void 0:"none"},v)},r.createElement("div",{style:{}},r.createElement("div",{style:{position:"relative",width:"35px",height:"24px",flex:"0 0 35px"}},r.createElement("div",{style:{position:"relative",width:"35px",height:"24px",display:"flex",alignItems:"center"}},r.createElement("img",{style:{width:"24px",flex:"0 0 24px"},alt:C,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(C,".svg")}),r.createElement("div",{style:{display:"block",width:"0.3em",height:"0.3em",marginLeft:"0.35em",marginTop:"-0.2em",borderStyle:"solid",borderColor:"inherit",borderTopWidth:0,borderBottomWidth:"1px",borderLeftWidth:0,borderRightWidth:"1px",transform:"rotate(45deg)",opacity:.45,flex:"0 0 0.3em"}})),r.createElement("select",{style:{position:"absolute",top:0,left:0,zIndex:1,padding:0,opacity:0,border:0,width:"100%",height:"100%",cursor:"pointer"},value:C,onChange:function(e){if(e.target.value){var t=e.target.value;E(t),I(t)}},disabled:p},g.map((function(e){return r.createElement("option",{key:e.value,value:e.value},e.label)}))))),r.createElement("input",{type:"tel",autoComplete:"tel",value:S,onChange:function(e){var t=g.find((function(t){var o;return t.value===(null===(o=i(e.target.value))||void 0===o?void 0:o.country)}));t&&E(t.value);var o=T(e.target.value);w(o),b(o?n(o):e.target.value)},placeholder:c,disabled:p,className:f}))}));export{d as PhoneNumberInput};
1
+ import{__awaiter as e,__assign as t,__generator as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import*as r from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import n from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumber as i}from'./../../../../ext/libphonenumber-js/min/exports/parsePhoneNumber.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{isSupportedCountry as s}from'./../../../../ext/libphonenumber-js/min/exports/isSupportedCountry.js';import{getCountryCallingCode as l}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as a}from'./../../../../ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';import m from"./get-countries.js";import{observer as u}from'./../../../../ext/mobx-react-lite/es/observer.js';var d=u((function(u){var d=u.disabled,p=void 0!==d&&d,c=u.placeholder,b=u.value,h=u.onChange,v=u.inputStyle,f=u.className,g=u.sfProps,j=r.useState([]),x=j[0],y=j[1],C=r.useState((null==g?void 0:g.currentCountryCode)||"TR"),_=C[0],E=C[1],N=r.useState(""),w=N[0],S=N[1];r.useEffect((function(){P();var e=_;if(s(e)||(e="US"),b){var t=i(b);t&&t.country&&(e=t.country),S(a(b,e))}else k(e);E(e)}),[null==g?void 0:g.currentCountryCode]);var P=function(){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,m(null==g?void 0:g.currentLocale)];case 1:return e=t.sent(),y(e),[2]}}))}))},k=function(e){var t=l(e);S("+".concat(t))},I=function(e){return a(e,_)};return r.createElement("div",{style:t({position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",gap:8,pointerEvents:g?void 0:"none"},v)},r.createElement("div",{style:{}},r.createElement("div",{style:{position:"relative",width:"35px",height:"24px",flex:"0 0 35px"}},r.createElement("div",{style:{position:"relative",width:"35px",height:"24px",display:"flex",alignItems:"center"}},r.createElement("img",{style:{width:"24px",flex:"0 0 24px"},alt:_,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(_,".svg")}),r.createElement("div",{style:{display:"block",width:"0.3em",height:"0.3em",marginLeft:"0.35em",marginTop:"-0.2em",borderStyle:"solid",borderColor:"inherit",borderTopWidth:0,borderBottomWidth:"1px",borderLeftWidth:0,borderRightWidth:"1px",transform:"rotate(45deg)",opacity:.45,flex:"0 0 0.3em"}})),r.createElement("select",{style:{position:"absolute",top:0,left:0,zIndex:1,padding:0,opacity:0,border:0,width:"100%",height:"100%",cursor:"pointer"},value:_,onChange:function(e){if(e.target.value){var t=e.target.value;E(t),k(t)}},disabled:p},x.map((function(e){return r.createElement("option",{key:e.value,value:e.value},e.label)}))))),r.createElement("input",{type:"tel",autoComplete:"tel",value:w,onChange:function(e){var t=x.find((function(t){var o;return t.value===(null===(o=i(e.target.value))||void 0===o?void 0:o.country)}));t&&E(t.value);var o=I(e.target.value);S(o),h(o?n(o):e.target.value)},placeholder:c,disabled:p,className:f,style:{width:"100%",backgroundColor:"transparent",background:"transparent",border:"none",outline:"none"}}))}));export{d as PhoneNumberInput};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.201",
3
+ "version": "1.0.202",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",