@ikas/storefront-config 4.10.0-beta.3 → 4.10.0-beta.30

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.
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontRouting, IkasThemeJsonFavicon, IkasThemeJsonStockPreference } from "@ikas/storefront-models";
1
+ import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasIndexPageSeoSetting, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontB2BSettings, IkasStorefrontRouting, IkasStorefrontType, IkasThemeJsonFavicon, IkasThemeJsonStockPreference } from "@ikas/storefront-models";
2
2
  export declare class IkasStorefrontConfig {
3
3
  private static themeId?;
4
4
  private static apiUrl?;
@@ -7,6 +7,8 @@ export declare class IkasStorefrontConfig {
7
7
  private static customerToken?;
8
8
  private static storefrontId?;
9
9
  private static storefrontRoutingId?;
10
+ private static storefrontType?;
11
+ private static storefrontB2BSettings?;
10
12
  private static priceListId?;
11
13
  private static stockLocationIds?;
12
14
  private static loginRequiredCallback?;
@@ -33,6 +35,7 @@ export declare class IkasStorefrontConfig {
33
35
  private static customerSettings?;
34
36
  private static metaTemplates;
35
37
  private static custom?;
38
+ private static indexPageSeoSettings?;
36
39
  private static sessionId?;
37
40
  private static visitorId?;
38
41
  private static observers;
@@ -54,6 +57,9 @@ export declare class IkasStorefrontConfig {
54
57
  static getCustomerToken(): string | undefined;
55
58
  static getStorefrontId(): string | undefined;
56
59
  static getStorefrontRoutingId(): string | undefined;
60
+ static getStorefrontType(): IkasStorefrontType | undefined;
61
+ static getStorefrontB2BSettings(): IkasStorefrontB2BSettings | undefined;
62
+ static isB2BStorefront(): boolean;
57
63
  static getPriceListId(): string | undefined;
58
64
  static getStockLocationIds(): string[] | undefined;
59
65
  static getLoginRequiredCallback(): LoginRequiredCallbackType | undefined;
@@ -84,6 +90,7 @@ export declare class IkasStorefrontConfig {
84
90
  static getDefaultCurrencyCode(): string | null | undefined;
85
91
  static getDefaultCurrencySymbol(): string | null | undefined;
86
92
  static getCustom(): Record<string, any> | null | undefined;
93
+ static getIndexPageSeoSettings(): IkasIndexPageSeoSetting[] | null | undefined;
87
94
  }
88
95
  export declare type IkasStorefrontConfigObserver = {
89
96
  id: string;
@@ -99,6 +106,8 @@ export declare type IkasStorefrontConfigParams = {
99
106
  customerToken?: string;
100
107
  storefrontId?: string;
101
108
  storefrontRoutingId?: string;
109
+ storefrontType?: IkasStorefrontType;
110
+ storefrontB2BSettings?: IkasStorefrontB2BSettings;
102
111
  priceListId?: string;
103
112
  stockLocationIds?: string[];
104
113
  loginRequiredCallback?: LoginRequiredCallbackType;
@@ -127,4 +136,5 @@ export declare type IkasStorefrontConfigParams = {
127
136
  visitorId?: string;
128
137
  metaTemplates: IkasStorefontMetaTemplates[] | null;
129
138
  custom?: Record<string, any> | null;
139
+ indexPageSeoSettings?: IkasIndexPageSeoSetting[] | null;
130
140
  };
package/build/index.js CHANGED
@@ -1 +1 @@
1
- import{__awaiter as t,__assign as n,__generator as e}from"./_virtual/_tslib.js";var r=function(){function r(){}return r.addObserver=function(t){var n=r.observers.find((function(n){return n.id===t.id}));n?n.callback=t.callback:r.observers.push(t),t.callback(r)},r.init=function(t){try{Object.entries(t).forEach((function(t){var n=t[0],e=t[1];r[n]=e})),t.token&&(r.apiKey=t.token),this.notify()}catch(t){console.error(t)}},r.initFromAPI=function(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2]}))}))},r.getCurrentRouting=function(){return r.routings.find((function(t){return t.id===r.storefrontRoutingId}))},r.getCurrentLocale=function(){var t=r.getCurrentRouting();return(null==t?void 0:t.locale)||"en"},r.notify=function(){var t=this;this.observers.forEach((function(n){return n.callback(t)}))},r.isCustomerReviewEnabled=function(){var t=r.getCustomerReviewSettings();return!!t&&!t.customerPurchaseRequired},r.isCustomerReviewLoginRequired=function(){var t=r.getCustomerReviewSettings();return!t||t.customerLoginRequired},r.isBackInStockEnabled=function(){return!!r.getProductBackInStockSettings()},r.isCustomerLoginRequiredForBackInStock=function(){var t=r.getProductBackInStockSettings();return t&&t.customerLoginRequired},r.toJSON=function(){var t=n({},this);return delete t.observers,t},r.getThemeId=function(){return r.themeId},r.getApiUrl=function(){return r.apiUrl},r.getCdnUrl=function(){return r.cdnUrl},r.getApiKey=function(){return r.apiKey},r.getCustomerToken=function(){return r.customerToken},r.getStorefrontId=function(){return r.storefrontId},r.getStorefrontRoutingId=function(){return r.storefrontRoutingId},r.getPriceListId=function(){return r.priceListId},r.getStockLocationIds=function(){return r.stockLocationIds},r.getLoginRequiredCallback=function(){return r.loginRequiredCallback},r.getDomain=function(){return r.domain},r.getStorefrontThemeId=function(){return r.storefrontThemeId},r.getSalesChannelId=function(){return r.salesChannelId},r.getRoutings=function(){return r.routings},r.getPaymentGateways=function(){return r.paymentGateways},r.getGtmId=function(){return r.gtmId},r.getFbpId=function(){return r.fbpId},r.getAnalytics4Id=function(){return r.analytics4Id},r.getUniversalAnalyticsId=function(){return r.universalAnalyticsId},r.getPickupStockLocationIds=function(){return r.pickUpStockLocationIds},r.getTiktokPixelId=function(){return r.tiktokPixelId},r.getFavicon=function(){return r.favicon},r.getStockPreference=function(){return r.stockPreference},r.getTranslations=function(){return r.translations},r.getStorefrontJSScripts=function(){return r.storefrontJSScripts},r.getCustomerReviewSettings=function(){return r.customerReviewSettings},r.getProductBackInStockSettings=function(){return r.productBackInStockSettings},r.getMerchantSettings=function(){return r.merchantSettings},r.getCurrentPageComponents=function(){return r.currentPageComponents},r.getIsEditor=function(){return r.isEditor},r.getSessionId=function(){return r.sessionId},r.getVisitorId=function(){return r.visitorId},r.getCustomerSettings=function(){return r.customerSettings},r.getMetaTemplates=function(){return r.metaTemplates},r.getDefaultCurrencyCode=function(){var t;return null===(t=r.getCurrentRouting())||void 0===t?void 0:t.currencyCode},r.getDefaultCurrencySymbol=function(){var t;return null===(t=r.getCurrentRouting())||void 0===t?void 0:t.currencySymbol},r.getCustom=function(){return this.custom},r.routings=[],r.paymentGateways=[],r.translations={},r.storefrontJSScripts=[],r.isEditor=!1,r.observers=[],r}();export{r as IkasStorefrontConfig};
1
+ import{__awaiter as t,__assign as n,__generator as e}from"./_virtual/_tslib.js";import{IkasStorefrontType as r}from"@ikas/storefront-models";var o=function(){function o(){}return o.addObserver=function(t){var n=o.observers.find((function(n){return n.id===t.id}));n?n.callback=t.callback:o.observers.push(t),t.callback(o)},o.init=function(t){try{Object.entries(t).forEach((function(t){var n=t[0],e=t[1];o[n]=e})),t.token&&(o.apiKey=t.token),this.notify()}catch(t){console.error(t)}},o.initFromAPI=function(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2]}))}))},o.getCurrentRouting=function(){return o.routings.find((function(t){return t.id===o.storefrontRoutingId}))},o.getCurrentLocale=function(){var t=o.getCurrentRouting();return(null==t?void 0:t.locale)||"en"},o.notify=function(){var t=this;this.observers.forEach((function(n){return n.callback(t)}))},o.isCustomerReviewEnabled=function(){var t=o.getCustomerReviewSettings();return!!t&&!t.customerPurchaseRequired},o.isCustomerReviewLoginRequired=function(){var t=o.getCustomerReviewSettings();return!t||t.customerLoginRequired},o.isBackInStockEnabled=function(){return!!o.getProductBackInStockSettings()},o.isCustomerLoginRequiredForBackInStock=function(){var t=o.getProductBackInStockSettings();return t&&t.customerLoginRequired},o.toJSON=function(){var t=n({},this);return delete t.observers,t},o.getThemeId=function(){return o.themeId},o.getApiUrl=function(){return o.apiUrl},o.getCdnUrl=function(){return o.cdnUrl},o.getApiKey=function(){return o.apiKey},o.getCustomerToken=function(){return o.customerToken},o.getStorefrontId=function(){return o.storefrontId},o.getStorefrontRoutingId=function(){return o.storefrontRoutingId},o.getStorefrontType=function(){return o.storefrontType},o.getStorefrontB2BSettings=function(){return o.storefrontB2BSettings},o.isB2BStorefront=function(){return o.storefrontType===r.B2B_STOREFRONT},o.getPriceListId=function(){return o.priceListId},o.getStockLocationIds=function(){return o.stockLocationIds},o.getLoginRequiredCallback=function(){return o.loginRequiredCallback},o.getDomain=function(){return o.domain},o.getStorefrontThemeId=function(){return o.storefrontThemeId},o.getSalesChannelId=function(){return o.salesChannelId},o.getRoutings=function(){return o.routings},o.getPaymentGateways=function(){return o.paymentGateways},o.getGtmId=function(){return o.gtmId},o.getFbpId=function(){return o.fbpId},o.getAnalytics4Id=function(){return o.analytics4Id},o.getUniversalAnalyticsId=function(){return o.universalAnalyticsId},o.getPickupStockLocationIds=function(){return o.pickUpStockLocationIds},o.getTiktokPixelId=function(){return o.tiktokPixelId},o.getFavicon=function(){return o.favicon},o.getStockPreference=function(){return o.stockPreference},o.getTranslations=function(){return o.translations},o.getStorefrontJSScripts=function(){return o.storefrontJSScripts},o.getCustomerReviewSettings=function(){return o.customerReviewSettings},o.getProductBackInStockSettings=function(){return o.productBackInStockSettings},o.getMerchantSettings=function(){return o.merchantSettings},o.getCurrentPageComponents=function(){return o.currentPageComponents},o.getIsEditor=function(){return o.isEditor},o.getSessionId=function(){return o.sessionId},o.getVisitorId=function(){return o.visitorId},o.getCustomerSettings=function(){return o.customerSettings},o.getMetaTemplates=function(){return o.metaTemplates},o.getDefaultCurrencyCode=function(){var t;return null===(t=o.getCurrentRouting())||void 0===t?void 0:t.currencyCode},o.getDefaultCurrencySymbol=function(){var t;return null===(t=o.getCurrentRouting())||void 0===t?void 0:t.currencySymbol},o.getCustom=function(){return this.custom},o.getIndexPageSeoSettings=function(){return o.indexPageSeoSettings},o.routings=[],o.paymentGateways=[],o.translations={},o.storefrontJSScripts=[],o.isEditor=!1,o.observers=[],o}();export{o as IkasStorefrontConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-config",
3
- "version": "4.10.0-beta.3",
3
+ "version": "4.10.0-beta.30",
4
4
  "description": "Common configuration for ikas storefront packages.",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.js",
@@ -17,7 +17,7 @@
17
17
  "license": "ISC",
18
18
  "dependencies": {},
19
19
  "devDependencies": {
20
- "@ikas/storefront-models": "^4.10.0-beta.3",
20
+ "@ikas/storefront-models": "^4.10.0-beta.30",
21
21
  "prettier": "^2.2.1",
22
22
  "rollup": "^2.75.6",
23
23
  "rollup-plugin-terser": "^7.0.2",
@@ -27,6 +27,6 @@
27
27
  "typescript-transform-paths": "^2.2.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "@ikas/storefront-models": "^4.10.0-beta.3"
30
+ "@ikas/storefront-models": "^4.10.0-beta.30"
31
31
  }
32
32
  }