@ikas/storefront 4.0.0-alpha.64 → 4.0.0-alpha.65

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.js';import*as o from"react";import{observer as n}from"mobx-react-lite";import r from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumberFromString as s}from'./../../../../ext/libphonenumber-js/min/exports/parsePhoneNumberFromString.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{getCountryCallingCode as a}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as m}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 l from"./get-countries.js";import i from"./style.module.scss.js";var u=n((function(n){var u=n.defaultCountry,c=n.disabled,d=void 0!==c&&c,p=n.placeholder,b=n.value,f=n.onChange,h=o.useState([]),v=h[0],j=h[1],g=o.useState(u||"TR"),N=g[0],_=g[1],x=o.useState(""),E=x[0],y=x[1];o.useEffect((function(){C();var e=N;if(b){var t=s(b);t&&t.country&&(e=t.country),y(m(b,e))}else F(e);_(e)}),[]);var C=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,l()];case 1:return e=t.sent(),j(e),[2]}}))}))},F=function(e){var t=a(e);y("+".concat(t))},S=function(e){return m(e,N)};return o.createElement(o.Fragment,null,o.createElement("div",{className:i.SelectFlag},o.createElement("div",{className:i.FlagContainer},o.createElement("div",{className:i.Flag},o.createElement("img",{className:i.FlagImage,alt:N,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(N,".svg")}),o.createElement("div",{className:i.Arrow})),o.createElement("select",{className:i.Select,value:N,onChange:function(e){if(e.target.value){var t=e.target.value;_(t),F(t)}},disabled:d},v.map((function(e){return o.createElement("option",{key:e.value,value:e.value},e.label)}))))),o.createElement("input",{className:i.Input,value:E,onChange:function(e){var t=S(e.target.value);y(t),f(t?r(t):e.target.value)},placeholder:p,disabled:d}))}));export{u as PhoneNumberInput};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as n}from"mobx-react-lite";import r from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumberFromString as s}from'./../../../../ext/libphonenumber-js/min/exports/parsePhoneNumberFromString.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{getCountryCallingCode as a}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as m}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 l from"./get-countries.js";import i from"./style.module.scss.js";var u=n((function(n){var u=n.defaultCountry,c=n.disabled,d=void 0!==c&&c,p=n.placeholder,b=n.value,f=n.onChange,h=o.useState([]),v=h[0],j=h[1],g=o.useState(u||"TR"),N=g[0],_=g[1],x=o.useState(""),y=x[0],C=x[1];o.useEffect((function(){E();var e=N;if(b){var t=s(b);t&&t.country&&(e=t.country),C(m(b,e))}else F(e);_(e)}),[]);var E=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,l()];case 1:return e=t.sent(),j(e),[2]}}))}))},F=function(e){var t=a(e);C("+".concat(t))},S=function(e){return m(e,N)};return o.createElement(o.Fragment,null,o.createElement("div",{className:i.SelectFlag},o.createElement("div",{className:i.FlagContainer},o.createElement("div",{className:i.Flag},o.createElement("img",{className:i.FlagImage,alt:N,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(N,".svg")}),o.createElement("div",{className:i.Arrow})),o.createElement("select",{className:i.Select,value:N,onChange:function(e){if(e.target.value){var t=e.target.value;_(t),F(t)}},disabled:d},v.map((function(e){return o.createElement("option",{key:e.value,value:e.value},e.label)}))))),o.createElement("input",{type:"tel",autoComplete:"tel",className:i.Input,value:y,onChange:function(e){var t=S(e.target.value);C(t),f(t?r(t):e.target.value)},placeholder:p,disabled:d}))}));export{u as PhoneNumberInput};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.0.0-alpha.64",
3
+ "version": "4.0.0-alpha.65",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "Umut Ozan Yıldırım",
6
6
  "license": "ISC",
@@ -23,11 +23,11 @@
23
23
  "libphonenumber-js": "^1.10.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@ikas/storefront-api": "^4.0.0-alpha.64",
27
- "@ikas/storefront-config": "^4.0.0-alpha.64",
28
- "@ikas/storefront-model-functions": "^4.0.0-alpha.64",
29
- "@ikas/storefront-models": "^4.0.0-alpha.64",
30
- "@ikas/storefront-providers": "^4.0.0-alpha.64",
26
+ "@ikas/storefront-api": "^4.0.0-alpha.65",
27
+ "@ikas/storefront-config": "^4.0.0-alpha.65",
28
+ "@ikas/storefront-model-functions": "^4.0.0-alpha.65",
29
+ "@ikas/storefront-models": "^4.0.0-alpha.65",
30
+ "@ikas/storefront-providers": "^4.0.0-alpha.65",
31
31
  "@rollup/plugin-commonjs": "^22.0.0",
32
32
  "@rollup/plugin-json": "^4.1.0",
33
33
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -53,11 +53,11 @@
53
53
  "query-string": "^6.13.8"
54
54
  },
55
55
  "peerDependencies": {
56
- "@ikas/storefront-api": "^4.0.0-alpha.64",
57
- "@ikas/storefront-config": "^4.0.0-alpha.64",
58
- "@ikas/storefront-model-functions": "^4.0.0-alpha.64",
59
- "@ikas/storefront-models": "^4.0.0-alpha.64",
60
- "@ikas/storefront-providers": "^4.0.0-alpha.64",
56
+ "@ikas/storefront-api": "^4.0.0-alpha.65",
57
+ "@ikas/storefront-config": "^4.0.0-alpha.65",
58
+ "@ikas/storefront-model-functions": "^4.0.0-alpha.65",
59
+ "@ikas/storefront-models": "^4.0.0-alpha.65",
60
+ "@ikas/storefront-providers": "^4.0.0-alpha.65",
61
61
  "mobx": "^6.1.3",
62
62
  "mobx-react-lite": "^3.1.5",
63
63
  "next": "12.2.0",