@ikas/storefront-config 4.5.0 → 4.5.1-beta.2
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 +3 -0
- package/build/index.js +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare class IkasStorefrontConfig {
|
|
|
32
32
|
private static isEditor;
|
|
33
33
|
private static customerSettings?;
|
|
34
34
|
private static metaTemplates;
|
|
35
|
+
private static custom?;
|
|
35
36
|
private static sessionId?;
|
|
36
37
|
private static visitorId?;
|
|
37
38
|
private static observers;
|
|
@@ -82,6 +83,7 @@ export declare class IkasStorefrontConfig {
|
|
|
82
83
|
static getMetaTemplates(): IkasStorefontMetaTemplates[] | null;
|
|
83
84
|
static getDefaultCurrencyCode(): string | null | undefined;
|
|
84
85
|
static getDefaultCurrencySymbol(): string | null | undefined;
|
|
86
|
+
static getCustom(): Record<string, any> | null | undefined;
|
|
85
87
|
}
|
|
86
88
|
export declare type IkasStorefrontConfigObserver = {
|
|
87
89
|
id: string;
|
|
@@ -124,4 +126,5 @@ export declare type IkasStorefrontConfigParams = {
|
|
|
124
126
|
sessionId?: string;
|
|
125
127
|
visitorId?: string;
|
|
126
128
|
metaTemplates: IkasStorefontMetaTemplates[] | null;
|
|
129
|
+
custom?: Record<string, any> | null;
|
|
127
130
|
};
|
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.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";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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-config",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1-beta.2",
|
|
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.5.
|
|
20
|
+
"@ikas/storefront-models": "^4.5.1-beta.2",
|
|
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.5.
|
|
30
|
+
"@ikas/storefront-models": "^4.5.1-beta.2"
|
|
31
31
|
}
|
|
32
32
|
}
|