@ikas/storefront 6.1.0-beta.274 → 6.1.0-beta.275

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{makeAutoObservable as e}from"mobx";var t=function(){function t(t){void 0===t&&(t={});var r=this;this.installmentCount=1,this.toInput=function(){var e=r.expirationDate.split(" / "),t=parseInt(e[0]),i=parseInt(e[1]);return{cardNumber:r.cardNumber.split(" ").join(""),cardHolderName:r.cardHolderName,cvv:r.cvv,expiredMonth:t,expiredYear:i,installmentCount:r.installmentCount,threeDSecure:r.threeDSecure}},this.cardNumber=t.cardNumber||"",this.cardHolderName=t.cardHolderName||"",this.expirationDate=t.expirationDate||"",this.cvv=t.cvv||"",this.installmentCount=t.installmentCount||1,this.threeDSecure=t.threeDSecure||!1,e(this)}return Object.defineProperty(t.prototype,"validationResult",{get:function(){return{cardNumber:!!this.cardNumber&&(19===this.cardNumber.length||17===this.cardNumber.length),cardHolderName:!!this.cardHolderName,expirationDate:!!this.expirationDate&&7===this.expirationDate.length,cvv:!!this.cvv}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return Object.values(this.validationResult).every((function(e){return e}))},enumerable:!1,configurable:!0}),t}();export{t as default};
1
+ import{makeAutoObservable as e}from"mobx";var t,r=(t=[0,2,4,6,8,1,3,5,7,9],function(e){for(var r,a=e.replace(/\D/g,""),n=a.length,i=1,o=0;n;)r=parseInt(a.charAt(--n),10),o+=(i^=1)?t[r]:r;return!!o&&o%10==0});function a(e){var t=null==e?void 0:e.match(/^(\d{2})\s*\/\s*(\d{2})$/);if(!t)return!1;var r=parseInt(t[1],10),a=parseInt(t[2],10);if(r<1||r>12)return!1;var n=2e3+a,i=new Date,o=i.getFullYear(),u=i.getMonth()+1;return n>o||n===o&&r>=u}var n=function(){function t(t){void 0===t&&(t={});var r=this;this.installmentCount=1,this.toInput=function(){var e=r.expirationDate.split(" / "),t=parseInt(e[0]),a=parseInt(e[1]);return{cardNumber:r.cardNumber.split(" ").join(""),cardHolderName:r.cardHolderName,cvv:r.cvv,expiredMonth:t,expiredYear:a,installmentCount:r.installmentCount,threeDSecure:r.threeDSecure}},this.cardNumber=t.cardNumber||"",this.cardHolderName=t.cardHolderName||"",this.expirationDate=t.expirationDate||"",this.cvv=t.cvv||"",this.installmentCount=t.installmentCount||1,this.threeDSecure=t.threeDSecure||!1,e(this)}return Object.defineProperty(t.prototype,"validationResult",{get:function(){var e,t,n=null!==(t=null===(e=this.cardNumber)||void 0===e?void 0:e.replace(/\D/g,""))&&void 0!==t?t:"";return{cardNumber:!!this.cardNumber&&(19===this.cardNumber.length||17===this.cardNumber.length)&&r(n),cardHolderName:!!this.cardHolderName,expirationDate:!!this.expirationDate&&7===this.expirationDate.length&&a(this.expirationDate),cvv:!!this.cvv}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return Object.values(this.validationResult).every((function(e){return e}))},enumerable:!1,configurable:!0}),t}();export{n as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "6.1.0-beta.274",
3
+ "version": "6.1.0-beta.275",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -23,11 +23,11 @@
23
23
  "swiper": "11.0.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@ikas/storefront-api": "^6.1.0-beta.274",
27
- "@ikas/storefront-config": "^6.1.0-beta.274",
28
- "@ikas/storefront-model-functions": "^6.1.0-beta.274",
29
- "@ikas/storefront-models": "^6.1.0-beta.274",
30
- "@ikas/storefront-providers": "^6.1.0-beta.274",
26
+ "@ikas/storefront-api": "^6.1.0-beta.275",
27
+ "@ikas/storefront-config": "^6.1.0-beta.275",
28
+ "@ikas/storefront-model-functions": "^6.1.0-beta.275",
29
+ "@ikas/storefront-models": "^6.1.0-beta.275",
30
+ "@ikas/storefront-providers": "^6.1.0-beta.275",
31
31
  "@ikas/localized-address": "1.0.0-beta.6",
32
32
  "@adyen/adyen-web": "^5.57.0",
33
33
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -62,11 +62,11 @@
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@ikas/localized-address": "1.0.0-beta.6",
65
- "@ikas/storefront-api": "^6.1.0-beta.274",
66
- "@ikas/storefront-config": "^6.1.0-beta.274",
67
- "@ikas/storefront-model-functions": "^6.1.0-beta.274",
68
- "@ikas/storefront-models": "^6.1.0-beta.274",
69
- "@ikas/storefront-providers": "^6.1.0-beta.274",
65
+ "@ikas/storefront-api": "^6.1.0-beta.275",
66
+ "@ikas/storefront-config": "^6.1.0-beta.275",
67
+ "@ikas/storefront-model-functions": "^6.1.0-beta.275",
68
+ "@ikas/storefront-models": "^6.1.0-beta.275",
69
+ "@ikas/storefront-providers": "^6.1.0-beta.275",
70
70
  "mobx": "^6.1.3",
71
71
  "mobx-react-lite": "^3.1.5",
72
72
  "next": "12.2.0",