@ikas/popup-renderer 1.0.199 → 1.0.200

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,__generator as t}from'./../../../../ext/tslib/tslib.es6.mjs.js';import*as o from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import r from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumber as n}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 i}from'./../../../../ext/libphonenumber-js/min/exports/isSupportedCountry.js';import{getCountryCallingCode as s}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as l}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 a}from'./../../../../ext/mobx-react-lite/es/observer.js';var u=a((function(a){var u=a.defaultCountry,d=a.disabled,p=void 0!==d&&d,c=a.placeholder,b=a.value,h=a.onChange,f=a.inputStyle,v=a.className,x=o.useState([]),j=x[0],g=x[1],y=o.useState(u||"TR"),_=y[0],C=y[1],E=o.useState(""),N=E[0],S=E[1];o.useEffect((function(){w();var e=_;if(i(e)||(e="US"),b){var t=n(b);t&&t.country&&(e=t.country),S(l(b,e))}else P(e);C(e)}),[u]);var w=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,m()];case 1:return e=t.sent(),g(e),[2]}}))}))},P=function(e){var t=s(e);S("+".concat(t))},T=function(e){return l(e,_)};return o.createElement(o.Fragment,null,o.createElement("div",{style:{position:"absolute",top:"26px",left:"16px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",flex:"0 0 35px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",display:"flex",alignItems:"center"}},o.createElement("img",{style:{width:"24px",flex:"0 0 24px"},alt:_,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(_,".svg")}),o.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"}})),o.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;C(t),P(t)}},disabled:p},j.map((function(e){return o.createElement("option",{key:e.value,value:e.value},e.label)}))))),o.createElement("input",{type:"tel",autoComplete:"tel",value:N,onChange:function(e){var t=j.find((function(t){var o;return t.value===(null===(o=n(e.target.value))||void 0===o?void 0:o.country)}));t&&C(t.value);var o=T(e.target.value);S(o),h(o?r(o):e.target.value)},placeholder:c,disabled:p,style:f,className:v}))}));export{u as PhoneNumberInput};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.mjs.js';import*as o from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import r from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumber as n}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 i}from'./../../../../ext/libphonenumber-js/min/exports/isSupportedCountry.js';import{getCountryCallingCode as s}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as l}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 a from"./get-countries.js";import{observer as m}from'./../../../../ext/mobx-react-lite/es/observer.js';var u=m((function(m){var u=m.defaultCountry,d=m.disabled,p=void 0!==d&&d,c=m.placeholder,b=m.value,h=m.onChange,f=m.inputStyle,v=m.className,x=o.useState([]),j=x[0],g=x[1],y=o.useState(u||"TR"),_=y[0],C=y[1],E=o.useState(""),N=E[0],S=E[1];o.useEffect((function(){w();var e=_;if(i(e)||(e="US"),b){var t=n(b);t&&t.country&&(e=t.country),S(l(b,e))}else P(e);C(e)}),[u]);var w=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,a()];case 1:return e=t.sent(),g(e),[2]}}))}))},P=function(e){var t=s(e);S("+".concat(t))},I=function(e){return l(e,_)};return o.createElement("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center"}},o.createElement("div",{style:{position:"absolute",top:"26px",left:"16px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",flex:"0 0 35px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",display:"flex",alignItems:"center"}},o.createElement("img",{style:{width:"24px",flex:"0 0 24px"},alt:_,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(_,".svg")}),o.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"}})),o.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;C(t),P(t)}},disabled:p},j.map((function(e){return o.createElement("option",{key:e.value,value:e.value},e.label)}))))),o.createElement("input",{type:"tel",autoComplete:"tel",value:N,onChange:function(e){var t=j.find((function(t){var o;return t.value===(null===(o=n(e.target.value))||void 0===o?void 0:o.country)}));t&&C(t.value);var o=I(e.target.value);S(o),h(o?r(o):e.target.value)},placeholder:c,disabled:p,style:f,className:v}))}));export{u as PhoneNumberInput};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.199",
3
+ "version": "1.0.200",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",