@ikas/storefront-config 4.2.0-alpha.2 → 4.2.0-alpha.3
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 +2 -3
- package/build/index.js +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasMerchantSettings,
|
|
|
2
2
|
export declare class IkasStorefrontConfig {
|
|
3
3
|
private static themeId?;
|
|
4
4
|
private static apiUrl?;
|
|
5
|
-
private static adminApiUrl?;
|
|
6
5
|
private static cdnUrl?;
|
|
7
6
|
private static apiKey?;
|
|
8
7
|
private static customerToken?;
|
|
@@ -49,7 +48,6 @@ export declare class IkasStorefrontConfig {
|
|
|
49
48
|
static toJSON(): {};
|
|
50
49
|
static getThemeId(): string | undefined;
|
|
51
50
|
static getApiUrl(): string | undefined;
|
|
52
|
-
static getAdminApiUrl(): string | undefined;
|
|
53
51
|
static getCdnUrl(): string | undefined;
|
|
54
52
|
static getApiKey(): string | undefined;
|
|
55
53
|
static getCustomerToken(): string | undefined;
|
|
@@ -82,6 +80,8 @@ export declare class IkasStorefrontConfig {
|
|
|
82
80
|
static getVisitorId(): string | undefined;
|
|
83
81
|
static getCustomerSettings(): IkasCustomerSettings | undefined;
|
|
84
82
|
static getMetaTemplates(): IkasStorefontMetaTemplates[] | null;
|
|
83
|
+
static getDefaultCurrencyCode(): string | null | undefined;
|
|
84
|
+
static getDefaultCurrencySymbol(): string | null | undefined;
|
|
85
85
|
}
|
|
86
86
|
export declare type IkasStorefrontConfigObserver = {
|
|
87
87
|
id: string;
|
|
@@ -91,7 +91,6 @@ export declare type LoginRequiredCallbackType = () => Promise<void> | void;
|
|
|
91
91
|
export declare type IkasStorefrontConfigParams = {
|
|
92
92
|
themeId?: string;
|
|
93
93
|
apiUrl?: string;
|
|
94
|
-
adminApiUrl?: string;
|
|
95
94
|
cdnUrl?: string;
|
|
96
95
|
apiKey?: string;
|
|
97
96
|
token?: string;
|
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.
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-config",
|
|
3
|
-
"version": "4.2.0-alpha.
|
|
3
|
+
"version": "4.2.0-alpha.3",
|
|
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.2.0-alpha.
|
|
20
|
+
"@ikas/storefront-models": "^4.2.0-alpha.3",
|
|
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.2.0-alpha.
|
|
30
|
+
"@ikas/storefront-models": "^4.2.0-alpha.3"
|
|
31
31
|
}
|
|
32
32
|
}
|