@ikas/storefront 4.5.10 → 4.5.12

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.
@@ -3,6 +3,7 @@ export declare class IkasImage implements IImage {
3
3
  id: string;
4
4
  isVideo: boolean;
5
5
  altText?: string | null;
6
+ fileName?: string | null;
6
7
  constructor(data: IImage);
7
8
  get src(): string;
8
9
  get thumbnailSrc(): string;
@@ -1 +1 @@
1
- import{IkasImageFunctions as t}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as r,computed as i}from"mobx";var n=function(){function n(n){var o=this;this.getSrc=function(e){return t.getSrc(o,e)},this.id=n.id,this.isVideo=n.isVideo,this.altText=n.altText,e(this,{id:r,isVideo:r,altText:r,src:i,thumbnailSrc:i})}return Object.defineProperty(n.prototype,"src",{get:function(){return t.getDefaultSrc(this)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"thumbnailSrc",{get:function(){return t.getThumbnailSrc(this)},enumerable:!1,configurable:!0}),n}();export{n as IkasImage};
1
+ import{IkasImageFunctions as t}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as i,computed as r}from"mobx";var n=function(){function n(n){var o=this;this.getSrc=function(e){return t.getSrc(o,e)},this.id=n.id,this.isVideo=n.isVideo,this.altText=n.altText,this.fileName=n.fileName,e(this,{id:i,isVideo:i,altText:i,src:r,thumbnailSrc:r})}return Object.defineProperty(n.prototype,"src",{get:function(){return t.getDefaultSrc(this)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"thumbnailSrc",{get:function(){return t.getThumbnailSrc(this)},enumerable:!1,configurable:!0}),n}();export{n as IkasImage};
@@ -1,6 +1,7 @@
1
1
  import { IkasImage } from "../../image";
2
2
  import { IkasProductImage as IProductImage } from "@ikas/storefront-models";
3
3
  export declare class IkasProductImage implements IProductImage {
4
+ fileName: string | null;
4
5
  imageId: string | null;
5
6
  isMain: boolean;
6
7
  isVideo: boolean | null;
@@ -1 +1 @@
1
- import{IkasImage as i}from"../../image/index.js";var e=function(e){this.imageId=e.imageId||null,this.isMain=e.isMain||!1,this.isVideo=e.isVideo||!1,this.order=e.order,this.image=e.image?new i(e.image):null};export{e as IkasProductImage};
1
+ import{__assign as i}from'./../../../../ext/tslib/tslib.es6.js';import{IkasImage as e}from"../../image/index.js";var s=function(s){this.fileName=s.fileName||null,this.imageId=s.imageId||null,this.isMain=s.isMain||!1,this.isVideo=s.isVideo||!1,this.order=s.order,this.image=s.image?new e(i(i({},s.image),{fileName:s.fileName})):null};export{s as IkasProductImage};
@@ -1 +1 @@
1
- import{__awaiter as o,__generator as t}from'./../ext/tslib/tslib.es6.js';import{configure as n,makeObservable as i,observable as e}from"mobx";import{enableStaticRendering as r}from"mobx-react-lite";import s from"lodash/sortBy";import u from"lodash/flatten";import{IkasCartStore as c}from"./cart/index.js";import{IkasCustomerStore as a}from"./customer/index.js";import l from"./location/index.js";import{IkasStorefrontConfig as d}from"@ikas/storefront-config";n({enforceActions:"never"}),r("undefined"==typeof window);var h=function(){function n(){this.currentPageType=null,this.localeOptions=[],this.languageOptions=[],this.showLocaleOptions=!1,this.currentCountryCode=null,this.spaLinksDisabled=!1,this.localeChecked=!1,this.customerStore=new a(this),this.cartStore=new c(this),"undefined"!=typeof window&&(this.spaLinksDisabled=navigator.userAgent.includes("Instagram")),this.init(),i(this,{currentPageType:e,localeOptions:e,languageOptions:e,showLocaleOptions:e,currentCountryCode:e,spaLinksDisabled:e})}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setLocalization=function(o){o.routing.domain?window.location.replace("https://"+o.routing.domain):window.location.replace(window.location.origin+(o.routing.path?"/"+o.routing.path:"")+(this.router?this.router.asPath:""))},n.prototype.setLanguage=function(o){var t=d.getRoutings().find((function(t){return t.id===o.id}));t&&window.location.replace(window.location.origin+(t.path?"/"+t.path:"")+(this.router?this.router.asPath:""))},n.prototype.checkLocalization=function(){return o(this,void 0,void 0,(function(){var o,n,i,e,r,c,a,h,g,f,p;return t(this,(function(t){switch(t.label){case 0:return this.localeChecked?[2]:"undefined"==typeof window?(console.warn("checkLocalization should be called on the client side!"),[2]):[4,l.getMyCountry()];case 1:return(o=t.sent()).isSuccess?(n=o.data,i=d.getCurrentRouting(),this.currentCountryCode=n,i&&n?(e=!0,r=d.getRoutings().filter((function(o){var t;return null===(t=o.countryCodes)||void 0===t?void 0:t.includes(n)})),c=d.getRoutings().find((function(o){var t;return!(null===(t=o.countryCodes)||void 0===t?void 0:t.length)})),r.length?r.some((function(o){return o.id===i.id}))||(e=!1):c&&i.id!==c.id&&(e=!1),a=[],h=[],g=u(d.getRoutings().map((function(o){return o.countryCodes||[]}))),[4,l.listCountry({iso2:{in:g}})]):[3,3]):[2];case 2:if(!(f=t.sent()).isSuccess)return[2];p=f.data||[],d.getRoutings().forEach((function(o){var t;(null===(t=o.countryCodes)||void 0===t?void 0:t.length)?o.countryCodes.forEach((function(t){var i=p.find((function(o){return o.iso2===t}));a.some((function(o){return o.iso2===(null==i?void 0:i.iso2)}))||a.push({id:(null==i?void 0:i.iso2)||(null==i?void 0:i.iso3)||Date.now()+"",countryName:(null==i?void 0:i.native)||(null==i?void 0:i.name)||"",iso2:(null==i?void 0:i.iso2)||void 0,iso3:(null==i?void 0:i.iso3)||void 0,routing:o,isRecommended:t===n})})):a.push({id:o.id,routing:o,isRecommended:!d.getRoutings().some((function(o){var t;return null===(t=o.countryCodes)||void 0===t?void 0:t.includes(n)}))})})),r.length&&(d.getRoutings().forEach((function(o){var t;r.some((function(t){return t.id===o.id}))&&h.push({id:o.id,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol,language:new Intl.DisplayNames([],{type:"language"}).of(o.locale)||"",locale:o.locale,isSelected:o.id===(null===(t=d.getCurrentRouting())||void 0===t?void 0:t.id)||!1})})),this.languageOptions=s(h,"language")),this.localeOptions=s(a,"countryName"),e||(this.showLocaleOptions=!0),this.localeChecked=!0,t.label=3;case 3:return[2]}}))}))},n.prototype.init=function(){this.customerStore.init()},n}();export{h as IkasBaseStore};
1
+ import{__awaiter as o,__generator as t}from'./../ext/tslib/tslib.es6.js';import{configure as n,makeObservable as i,observable as e}from"mobx";import{enableStaticRendering as r}from"mobx-react-lite";import s from"lodash/sortBy";import u from"lodash/flatten";import{IkasCartStore as a}from"./cart/index.js";import{IkasCustomerStore as c}from"./customer/index.js";import l from"./location/index.js";import{IkasStorefrontConfig as d}from"@ikas/storefront-config";n({enforceActions:"never"}),r("undefined"==typeof window);var h=function(){function n(){this.currentPageType=null,this.localeOptions=[],this.languageOptions=[],this.showLocaleOptions=!1,this.currentCountryCode=null,this.spaLinksDisabled=!1,this.localeChecked=!1,this.customerStore=new c(this),this.cartStore=new a(this),"undefined"!=typeof window&&(this.spaLinksDisabled=navigator.userAgent.includes("Instagram")),this.init(),i(this,{currentPageType:e,localeOptions:e,languageOptions:e,showLocaleOptions:e,currentCountryCode:e,spaLinksDisabled:e})}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setLocalization=function(o){o.routing.domain?window.location.replace("https://"+o.routing.domain):window.location.replace(window.location.origin+(o.routing.path?"/"+o.routing.path:"")+(this.router?this.router.asPath:""))},n.prototype.setLanguage=function(o){var t=d.getRoutings().find((function(t){return t.id===o.id}));t&&window.location.replace(window.location.origin+(t.path?"/"+t.path:"")+(this.router?this.router.asPath:""))},n.prototype.checkLocalization=function(){return o(this,void 0,void 0,(function(){var o,n,i,e,r,a,c,h,g,f,p;return t(this,(function(t){switch(t.label){case 0:return this.localeChecked?[2]:"undefined"==typeof window?(console.warn("checkLocalization should be called on the client side!"),[2]):[4,l.getMyCountry()];case 1:return(o=t.sent()).isSuccess?(n=o.data,i=d.getCurrentRouting(),this.currentCountryCode=n,i&&n?(e=!0,r=d.getRoutings().filter((function(o){var t;return null===(t=o.countryCodes)||void 0===t?void 0:t.includes(n)})),a=d.getRoutings().find((function(o){var t;return!(null===(t=o.countryCodes)||void 0===t?void 0:t.length)})),r.length?r.some((function(o){return o.id===i.id}))||(e=!1):a&&i.id!==a.id&&(e=!1),c=[],h=[],g=u(d.getRoutings().map((function(o){return o.countryCodes||[]}))),[4,l.listCountry({iso2:{in:g}})]):[3,3]):[2];case 2:if(!(f=t.sent()).isSuccess)return[2];p=f.data||[],d.getRoutings().forEach((function(o){var t;(null===(t=o.countryCodes)||void 0===t?void 0:t.length)?o.countryCodes.forEach((function(t){var i=p.find((function(o){return o.iso2===t}));c.some((function(o){return o.iso2===(null==i?void 0:i.iso2)}))||c.push({id:(null==i?void 0:i.iso2)||(null==i?void 0:i.iso3)||Date.now()+"",countryName:(null==i?void 0:i.native)||(null==i?void 0:i.name)||"",iso2:(null==i?void 0:i.iso2)||void 0,iso3:(null==i?void 0:i.iso3)||void 0,routing:o,isRecommended:t===n})})):c.push({id:o.id,routing:o,isRecommended:!d.getRoutings().some((function(o){var t;return null===(t=o.countryCodes)||void 0===t?void 0:t.includes(n)}))})})),r.length&&(d.getRoutings().forEach((function(o){var t;r.some((function(t){return t.id===o.id}))&&h.push({id:o.id,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol,language:"undefined"!=typeof Intl&&void 0!==Intl.DisplayNames&&new Intl.DisplayNames([],{type:"language"}).of(o.locale)||o.locale,locale:o.locale,isSelected:o.id===(null===(t=d.getCurrentRouting())||void 0===t?void 0:t.id)||!1})})),this.languageOptions=s(h,"language")),this.localeOptions=s(c,"countryName"),e||(this.showLocaleOptions=!0),this.localeChecked=!0,t.label=3;case 3:return[2]}}))}))},n.prototype.init=function(){this.customerStore.init()},n}();export{h as IkasBaseStore};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.5.10",
3
+ "version": "4.5.12",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -17,11 +17,11 @@
17
17
  "build": "rm -rf build && rollup -c"
18
18
  },
19
19
  "devDependencies": {
20
- "@ikas/storefront-api": "^4.5.10",
21
- "@ikas/storefront-config": "^4.5.10",
22
- "@ikas/storefront-model-functions": "^4.5.10",
23
- "@ikas/storefront-models": "^4.5.10",
24
- "@ikas/storefront-providers": "^4.5.10",
20
+ "@ikas/storefront-api": "^4.5.12",
21
+ "@ikas/storefront-config": "^4.5.12",
22
+ "@ikas/storefront-model-functions": "^4.5.12",
23
+ "@ikas/storefront-models": "^4.5.12",
24
+ "@ikas/storefront-providers": "^4.5.12",
25
25
  "@ikas/localized-address": "^1.0.0-beta.2",
26
26
  "@adyen/adyen-web": "^5.28.2",
27
27
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -55,11 +55,11 @@
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@ikas/localized-address": "^1.0.0-beta.2",
58
- "@ikas/storefront-api": "^4.5.10",
59
- "@ikas/storefront-config": "^4.5.10",
60
- "@ikas/storefront-model-functions": "^4.5.10",
61
- "@ikas/storefront-models": "^4.5.10",
62
- "@ikas/storefront-providers": "^4.5.10",
58
+ "@ikas/storefront-api": "^4.5.12",
59
+ "@ikas/storefront-config": "^4.5.12",
60
+ "@ikas/storefront-model-functions": "^4.5.12",
61
+ "@ikas/storefront-models": "^4.5.12",
62
+ "@ikas/storefront-providers": "^4.5.12",
63
63
  "mobx": "^6.1.3",
64
64
  "mobx-react-lite": "^3.1.5",
65
65
  "next": "12.2.0",