@ikas/storefront 3.0.0-alpha.36 → 3.0.0-alpha.38

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{__assign as t,__extends as i}from'../../../../ext/tslib/tslib.es6.js';import{makeObservable as e,observable as s,computed as n}from"mobx";import{OrderAddressCity as r}from"../../../../__api/models/OrderAddressCity.js";import{OrderAddressCountry as o}from"../../../../__api/models/OrderAddressCountry.js";import{OrderAddressDistrict as u}from"../../../../__api/models/OrderAddressDistrict.js";import{OrderAddressState as d}from"../../../../__api/models/OrderAddressState.js";import{validatePhoneNumber as l}from"../../../../utils/helper.js";import"../../../../storefront/index.js";import"../../../../utils/i18n.js";import"../../checkout-settings/index.js";import{CheckoutRequirementEnum as a}from"../../../../__api/types/index.js";var h=function(){function i(t){void 0===t&&(t={}),this.country=null,this.state=null,this.city=null,this.district=null,this.checkoutSettings=null,this.isDistrictRequired=!1,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.city=t.city?new p(t.city):null,this.company=t.company||null,this.country=t.country?new c(t.country):null,this.district=t.district?new m(t.district):null,this.state=t.state?new f(t.state):null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.checkoutSettings=t.checkoutSettings,this.isDistrictRequired=t.isDistrictRequired,e(this,{addressLine1:s,addressLine2:s,city:s,company:s,country:s,district:s,firstName:s,id:s,identityNumber:s,isDefault:s,lastName:s,phone:s,postalCode:s,state:s,taxNumber:s,taxOffice:s,checkoutSettings:s,isDistrictRequired:s,addressText:n,validationResult:n,isValid:n})}return Object.defineProperty(i.prototype,"addressText",{get:function(){var t=[];return this.addressLine1&&t.push(this.addressLine1),this.addressLine2&&t.push(this.addressLine2),this.postalCode&&t.push(this.postalCode),this.district&&this.district.name&&t.push(this.district.name),this.city&&this.city.name&&t.push(this.city.name),this.state&&this.state.name&&"Default"!==this.state.name&&t.push(this.state.name),this.country&&this.country.name&&t.push(this.country.name),t.join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"validationResult",{get:function(){var t,i,e,s,n,r,o,u=!!this.phone&&this.phone.length>=10&&l(this.phone);return{firstName:!!this.firstName,lastName:!!this.lastName,addressLine1:!!this.addressLine1,country:!!(null===(t=this.country)||void 0===t?void 0:t.name),state:!!this.state,city:!!(null===(i=this.city)||void 0===i?void 0:i.name),district:!this.isDistrictRequired||!!(null===(e=this.district)||void 0===e?void 0:e.id),phone:!((null===(s=this.checkoutSettings)||void 0===s?void 0:s.phoneRequirement)===a.MANDATORY||(null===(n=this.checkoutSettings)||void 0===n?void 0:n.phoneRequirement)===a.OPTIONAL&&this.phone)||u,postalCode:(null===(r=this.checkoutSettings)||void 0===r?void 0:r.postalCodeRequirement)!==a.MANDATORY||!!this.postalCode,identityNumber:(null===(o=this.checkoutSettings)||void 0===o?void 0:o.identityNumberRequirement)!==a.MANDATORY||!!this.identityNumber}},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isValid",{get:function(){return Object.values(this.validationResult).every((function(t){return t}))},enumerable:!1,configurable:!0}),i.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.isDistrictRequired,i},i}(),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(o),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(r),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(u),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(d);export{h as IkasOrderAddress,p as IkasOrderAddressCity,c as IkasOrderAddressCountry,m as IkasOrderAddressDistrict,f as IkasOrderAddressState};
1
+ import{__assign as t,__extends as i}from'../../../../ext/tslib/tslib.es6.js';import{makeObservable as e,observable as s,computed as n}from"mobx";import{OrderAddressCity as r}from"../../../../__api/models/OrderAddressCity.js";import{OrderAddressCountry as o}from"../../../../__api/models/OrderAddressCountry.js";import{OrderAddressDistrict as u}from"../../../../__api/models/OrderAddressDistrict.js";import{OrderAddressState as d}from"../../../../__api/models/OrderAddressState.js";import{validatePhoneNumber as l}from"../../../../utils/helper.js";import"../../../../storefront/index.js";import"../../../../utils/i18n.js";import"../../checkout-settings/index.js";import{CheckoutRequirementEnum as a}from"../../../../__api/types/index.js";var h=function(){function i(t){void 0===t&&(t={}),this.country=null,this.state=null,this.city=null,this.district=null,this.checkoutSettings=null,this.isDistrictRequired=!1,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.city=t.city?new m(t.city):null,this.company=t.company||null,this.country=t.country?new c(t.country):null,this.district=t.district?new p(t.district):null,this.state=t.state?new f(t.state):null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.checkoutSettings=t.checkoutSettings,this.isDistrictRequired=t.isDistrictRequired,e(this,{addressLine1:s,addressLine2:s,city:s,company:s,country:s,district:s,firstName:s,id:s,identityNumber:s,isDefault:s,lastName:s,phone:s,postalCode:s,state:s,taxNumber:s,taxOffice:s,checkoutSettings:s,isDistrictRequired:s,addressText:n,validationResult:n,isValid:n})}return Object.defineProperty(i.prototype,"addressText",{get:function(){var t=[];return this.addressLine1&&t.push(this.addressLine1),this.addressLine2&&t.push(this.addressLine2),this.postalCode&&t.push(this.postalCode),this.district&&this.district.name&&t.push(this.district.name),this.city&&this.city.name&&t.push(this.city.name),this.state&&this.state.name&&"Default"!==this.state.name&&t.push(this.state.name),this.country&&this.country.name&&t.push(this.country.name),t.join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"validationResult",{get:function(){var t,i,e,s,n,r,o,u=!!this.phone&&this.phone.length>=10&&l(this.phone);return{firstName:!!this.firstName,lastName:!!this.lastName,addressLine1:!!this.addressLine1,country:!!(null===(t=this.country)||void 0===t?void 0:t.name),state:!!this.state,city:!!(null===(i=this.city)||void 0===i?void 0:i.name),district:!this.isDistrictRequired||!!(null===(e=this.district)||void 0===e?void 0:e.name),phone:!((null===(s=this.checkoutSettings)||void 0===s?void 0:s.phoneRequirement)===a.MANDATORY||(null===(n=this.checkoutSettings)||void 0===n?void 0:n.phoneRequirement)===a.OPTIONAL&&this.phone)||u,postalCode:(null===(r=this.checkoutSettings)||void 0===r?void 0:r.postalCodeRequirement)!==a.MANDATORY||!!this.postalCode,identityNumber:(null===(o=this.checkoutSettings)||void 0===o?void 0:o.identityNumberRequirement)!==a.MANDATORY||!!this.identityNumber}},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isValid",{get:function(){return Object.values(this.validationResult).every((function(t){return t}))},enumerable:!1,configurable:!0}),i.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.isDistrictRequired,i},i}(),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(o),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(r),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(u),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(d);export{h as IkasOrderAddress,m as IkasOrderAddressCity,c as IkasOrderAddressCountry,p as IkasOrderAddressDistrict,f as IkasOrderAddressState};
@@ -1 +1 @@
1
- var e={next:"12.0.7",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^3.0.0-alpha.36"},n={"@types/node":"^14.14.6","@types/react":"^17.0.2","@types/react-dom":"^17.0.2","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},t={"@types/react":"17.0.2","@types/react-dom":"17.0.2"},s={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},i='{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}',a='const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);',r="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev/api/sf\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n",l="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com/api/sf\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";export{e as DEPENDENCIES,n as DEV_DEPENDENCIES,r as DEV_ENV,a as NEXT_CONFIG,l as PROD_ENV,t as RESOLUTIONS,s as SCRIPTS,i as TS_CONFIG};
1
+ var e={next:"12.0.7",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^3.0.0-alpha.37"},n={"@types/node":"^14.14.6","@types/react":"^17.0.2","@types/react-dom":"^17.0.2","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},t={"@types/react":"17.0.2","@types/react-dom":"17.0.2"},s={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},i='{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}',a='const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);',r="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev/api/sf\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n",l="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com/api/sf\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";export{e as DEPENDENCIES,n as DEV_DEPENDENCIES,r as DEV_ENV,a as NEXT_CONFIG,l as PROD_ENV,t as RESOLUTIONS,s as SCRIPTS,i as TS_CONFIG};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "3.0.0-alpha.36",
3
+ "version": "3.0.0-alpha.38",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.js",
6
6
  "author": "Umut Ozan Yıldırım",