@ikas/storefront-config 4.10.0-beta.5 → 4.10.0-beta.50
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 +13 -1
- package/build/index.js +1 -1
- package/package.json +3 -3
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?;
|
|
@@ -25,6 +27,7 @@ export declare class IkasStorefrontConfig {
|
|
|
25
27
|
private static stockPreference?;
|
|
26
28
|
private static translations;
|
|
27
29
|
private static storefrontJSScripts;
|
|
30
|
+
private static highPriorityStoreFrontJSScripts;
|
|
28
31
|
private static customerReviewSettings?;
|
|
29
32
|
private static productBackInStockSettings?;
|
|
30
33
|
private static merchantSettings?;
|
|
@@ -33,6 +36,7 @@ export declare class IkasStorefrontConfig {
|
|
|
33
36
|
private static customerSettings?;
|
|
34
37
|
private static metaTemplates;
|
|
35
38
|
private static custom?;
|
|
39
|
+
private static indexPageSeoSettings?;
|
|
36
40
|
private static sessionId?;
|
|
37
41
|
private static visitorId?;
|
|
38
42
|
private static observers;
|
|
@@ -54,6 +58,9 @@ export declare class IkasStorefrontConfig {
|
|
|
54
58
|
static getCustomerToken(): string | undefined;
|
|
55
59
|
static getStorefrontId(): string | undefined;
|
|
56
60
|
static getStorefrontRoutingId(): string | undefined;
|
|
61
|
+
static getStorefrontType(): IkasStorefrontType | undefined;
|
|
62
|
+
static getStorefrontB2BSettings(): IkasStorefrontB2BSettings | undefined;
|
|
63
|
+
static isB2BStorefront(): boolean;
|
|
57
64
|
static getPriceListId(): string | undefined;
|
|
58
65
|
static getStockLocationIds(): string[] | undefined;
|
|
59
66
|
static getLoginRequiredCallback(): LoginRequiredCallbackType | undefined;
|
|
@@ -72,6 +79,7 @@ export declare class IkasStorefrontConfig {
|
|
|
72
79
|
static getStockPreference(): IkasThemeJsonStockPreference | undefined;
|
|
73
80
|
static getTranslations(): Record<string, any>;
|
|
74
81
|
static getStorefrontJSScripts(): string[];
|
|
82
|
+
static getHighPriorityStorefrontJSScripts(): string[];
|
|
75
83
|
static getCustomerReviewSettings(): IkasCustomerReviewSettings | null | undefined;
|
|
76
84
|
static getProductBackInStockSettings(): IkasProductBackInStockSettings | null | undefined;
|
|
77
85
|
static getMerchantSettings(): IkasMerchantSettings | null | undefined;
|
|
@@ -84,6 +92,7 @@ export declare class IkasStorefrontConfig {
|
|
|
84
92
|
static getDefaultCurrencyCode(): string | null | undefined;
|
|
85
93
|
static getDefaultCurrencySymbol(): string | null | undefined;
|
|
86
94
|
static getCustom(): Record<string, any> | null | undefined;
|
|
95
|
+
static getIndexPageSeoSettings(): IkasIndexPageSeoSetting[] | null | undefined;
|
|
87
96
|
}
|
|
88
97
|
export declare type IkasStorefrontConfigObserver = {
|
|
89
98
|
id: string;
|
|
@@ -99,6 +108,8 @@ export declare type IkasStorefrontConfigParams = {
|
|
|
99
108
|
customerToken?: string;
|
|
100
109
|
storefrontId?: string;
|
|
101
110
|
storefrontRoutingId?: string;
|
|
111
|
+
storefrontType?: IkasStorefrontType;
|
|
112
|
+
storefrontB2BSettings?: IkasStorefrontB2BSettings;
|
|
102
113
|
priceListId?: string;
|
|
103
114
|
stockLocationIds?: string[];
|
|
104
115
|
loginRequiredCallback?: LoginRequiredCallbackType;
|
|
@@ -127,4 +138,5 @@ export declare type IkasStorefrontConfigParams = {
|
|
|
127
138
|
visitorId?: string;
|
|
128
139
|
metaTemplates: IkasStorefontMetaTemplates[] | null;
|
|
129
140
|
custom?: Record<string, any> | null;
|
|
141
|
+
indexPageSeoSettings?: IkasIndexPageSeoSetting[] | null;
|
|
130
142
|
};
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__assign as n,__generator as e}from"./_virtual/_tslib.js";var
|
|
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.getHighPriorityStorefrontJSScripts=function(){return o.highPriorityStoreFrontJSScripts||[]},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.highPriorityStoreFrontJSScripts=[],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
|
+
"version": "4.10.0-beta.50",
|
|
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.
|
|
20
|
+
"@ikas/storefront-models": "^4.10.0-beta.50",
|
|
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.
|
|
30
|
+
"@ikas/storefront-models": "^4.10.0-beta.50"
|
|
31
31
|
}
|
|
32
32
|
}
|