@ikas/storefront-config 6.1.0-beta.4 → 6.1.0-beta.400
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 +31 -1
- package/build/index.js +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasIndexPageSeoSetting, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontB2BSettings, IkasStorefrontRouting, IkasStorefrontType, IkasThemeJsonFavicon, IkasThemeJsonStockPreference, IkasStorefrontPopup } from "@ikas/storefront-models";
|
|
1
|
+
import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasIndexPageSeoSetting, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontB2BSettings, IkasStorefrontRouting, IkasStorefrontType, IkasThemeJsonFavicon, IkasThemeJsonStockPreference, IkasStorefrontPopup, IkasLoyaltyProgram, IkasSocialLoginSettings } from "@ikas/storefront-models";
|
|
2
|
+
/**
|
|
3
|
+
* Set on the navigation warning's script tag (FR-1077). A page that must run without the warning
|
|
4
|
+
* (checkout) looks for it: the tag is in the document only when that document installed the
|
|
5
|
+
* warning, which for checkout means it was reached by client-side navigation from a store page.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NAVIGATION_WARNING_SCRIPT_ATTRIBUTE = "data-ikas-navigation-warning";
|
|
2
8
|
export declare class IkasStorefrontConfig {
|
|
3
9
|
private static themeId?;
|
|
4
10
|
private static apiUrl?;
|
|
@@ -23,11 +29,14 @@ export declare class IkasStorefrontConfig {
|
|
|
23
29
|
private static universalAnalyticsId?;
|
|
24
30
|
private static pickUpStockLocationIds?;
|
|
25
31
|
private static tiktokPixelId?;
|
|
32
|
+
private static openAiPixelId?;
|
|
26
33
|
private static favicon?;
|
|
27
34
|
private static stockPreference?;
|
|
28
35
|
private static translations;
|
|
29
36
|
private static storefrontJSScripts;
|
|
37
|
+
private static themeStyleScripts;
|
|
30
38
|
private static highPriorityStoreFrontJSScripts;
|
|
39
|
+
private static navigationWarningScript?;
|
|
31
40
|
private static customerReviewSettings?;
|
|
32
41
|
private static productBackInStockSettings?;
|
|
33
42
|
private static merchantSettings?;
|
|
@@ -38,11 +47,16 @@ export declare class IkasStorefrontConfig {
|
|
|
38
47
|
private static custom?;
|
|
39
48
|
private static indexPageSeoSettings?;
|
|
40
49
|
private static storefrontPopups;
|
|
50
|
+
private static loyaltyPrograms;
|
|
51
|
+
private static payWithIkasUrl?;
|
|
52
|
+
private static milesSmilesSettings?;
|
|
41
53
|
private static sessionId?;
|
|
54
|
+
private static journeyId?;
|
|
42
55
|
private static visitorId?;
|
|
43
56
|
private static observers;
|
|
44
57
|
static addObserver(observer: IkasStorefrontConfigObserver): void;
|
|
45
58
|
static init(config: Partial<IkasStorefrontConfigParams>): void;
|
|
59
|
+
static clear(): void;
|
|
46
60
|
static initFromAPI(apiKey: string): Promise<void>;
|
|
47
61
|
static getCurrentRouting(): IkasStorefrontRouting | undefined;
|
|
48
62
|
static getCurrentLocale(): string;
|
|
@@ -76,11 +90,14 @@ export declare class IkasStorefrontConfig {
|
|
|
76
90
|
static getUniversalAnalyticsId(): string | undefined;
|
|
77
91
|
static getPickupStockLocationIds(): string[] | null | undefined;
|
|
78
92
|
static getTiktokPixelId(): string | undefined;
|
|
93
|
+
static getOpenAiPixelId(): string | undefined;
|
|
79
94
|
static getFavicon(): IkasThemeJsonFavicon | undefined;
|
|
80
95
|
static getStockPreference(): IkasThemeJsonStockPreference | undefined;
|
|
81
96
|
static getTranslations(): Record<string, any>;
|
|
82
97
|
static getStorefrontJSScripts(): string[];
|
|
98
|
+
static getThemeStyleScripts(): string[];
|
|
83
99
|
static getHighPriorityStorefrontJSScripts(): string[];
|
|
100
|
+
static getNavigationWarningScript(): string;
|
|
84
101
|
static getCustomerReviewSettings(): IkasCustomerReviewSettings | null | undefined;
|
|
85
102
|
static getProductBackInStockSettings(): IkasProductBackInStockSettings | null | undefined;
|
|
86
103
|
static getMerchantSettings(): IkasMerchantSettings | null | undefined;
|
|
@@ -88,6 +105,7 @@ export declare class IkasStorefrontConfig {
|
|
|
88
105
|
static getIsEditor(): boolean;
|
|
89
106
|
static getSessionId(): string | undefined;
|
|
90
107
|
static getVisitorId(): string | undefined;
|
|
108
|
+
static getJourneyId(): string | undefined;
|
|
91
109
|
static getCustomerSettings(): IkasCustomerSettings | undefined;
|
|
92
110
|
static getMetaTemplates(): IkasStorefontMetaTemplates[] | null;
|
|
93
111
|
static getDefaultCurrencyCode(): string | null | undefined;
|
|
@@ -95,6 +113,11 @@ export declare class IkasStorefrontConfig {
|
|
|
95
113
|
static getCustom(): Record<string, any> | null | undefined;
|
|
96
114
|
static getIndexPageSeoSettings(): IkasIndexPageSeoSetting[] | null | undefined;
|
|
97
115
|
static getStorefrontPopups(): IkasStorefrontPopup[];
|
|
116
|
+
static getLoyaltyPrograms(): IkasLoyaltyProgram[];
|
|
117
|
+
static getIsLosslessImageEnabled(): any;
|
|
118
|
+
static getPayWithIkasUrl(): string | null | undefined;
|
|
119
|
+
static getMilesSmilesSettings(): IkasSocialLoginSettings | null | undefined;
|
|
120
|
+
static isMilesSmilesActive(): boolean;
|
|
98
121
|
}
|
|
99
122
|
export declare type IkasStorefrontConfigObserver = {
|
|
100
123
|
id: string;
|
|
@@ -126,11 +149,14 @@ export declare type IkasStorefrontConfigParams = {
|
|
|
126
149
|
universalAnalyticsId?: string;
|
|
127
150
|
pickUpStockLocationIds?: string[] | null;
|
|
128
151
|
tiktokPixelId?: string;
|
|
152
|
+
openAiPixelId?: string;
|
|
129
153
|
favicon?: IkasThemeJsonFavicon;
|
|
130
154
|
stockPreference?: IkasThemeJsonStockPreference;
|
|
131
155
|
translations: Record<string, any>;
|
|
132
156
|
storefrontJSScripts: string[];
|
|
157
|
+
themeStyleScripts: string[];
|
|
133
158
|
highPriorityStoreFrontJSScripts: string[];
|
|
159
|
+
navigationWarningScript?: string;
|
|
134
160
|
customerReviewSettings?: IkasCustomerReviewSettings | null;
|
|
135
161
|
productBackInStockSettings?: IkasProductBackInStockSettings | null;
|
|
136
162
|
merchantSettings?: IkasMerchantSettings | null;
|
|
@@ -139,8 +165,12 @@ export declare type IkasStorefrontConfigParams = {
|
|
|
139
165
|
customerSettings?: IkasCustomerSettings;
|
|
140
166
|
sessionId?: string;
|
|
141
167
|
visitorId?: string;
|
|
168
|
+
journeyId?: string;
|
|
142
169
|
metaTemplates: IkasStorefontMetaTemplates[] | null;
|
|
143
170
|
custom?: Record<string, any> | null;
|
|
144
171
|
indexPageSeoSettings?: IkasIndexPageSeoSetting[] | null;
|
|
145
172
|
storefrontPopups: IkasStorefrontPopup[];
|
|
173
|
+
loyaltyPrograms: IkasLoyaltyProgram[];
|
|
174
|
+
payWithIkasUrl?: string | null;
|
|
175
|
+
milesSmilesSettings?: IkasSocialLoginSettings | null;
|
|
146
176
|
};
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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{var n=["themeSecret"];Object.entries(t).forEach((function(t){var e=t[0],r=t[1];n.includes(e)||(o[e]=r)})),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.getStorefrontPopups=function(){return this.storefrontPopups},o.routings=[],o.paymentGateways=[],o.translations={},o.storefrontJSScripts=[],o.highPriorityStoreFrontJSScripts=[],o.isEditor=!1,o.observers=[],o}();export{o as
|
|
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="data-ikas-navigation-warning",i=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{var n=["themeSecret"];Object.entries(t).forEach((function(t){var e=t[0],r=t[1];n.includes(e)||(o[e]=r)})),t.token&&(o.apiKey=t.token),this.notify()}catch(t){console.error(t)}},o.clear=function(){Object.keys(o).forEach((function(t){"observers"!==t&&"function"!=typeof o[t]&&(o[t]=void 0)})),o.routings=[],o.paymentGateways=[],o.translations={},o.storefrontJSScripts=[],o.themeStyleScripts=[],o.highPriorityStoreFrontJSScripts=[],o.storefrontPopups=[],o.loyaltyPrograms=[],o.isEditor=!1},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,delete t.navigationWarningScript,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.getOpenAiPixelId=function(){return o.openAiPixelId},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.getThemeStyleScripts=function(){return o.themeStyleScripts||[]},o.getHighPriorityStorefrontJSScripts=function(){return o.highPriorityStoreFrontJSScripts||[]},o.getNavigationWarningScript=function(){return o.navigationWarningScript||""},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.getJourneyId=function(){return o.journeyId},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.getStorefrontPopups=function(){return this.storefrontPopups},o.getLoyaltyPrograms=function(){return this.loyaltyPrograms},o.getIsLosslessImageEnabled=function(){var t;return null===(t=o.custom)||void 0===t?void 0:t.lossless},o.getPayWithIkasUrl=function(){return o.payWithIkasUrl},o.getMilesSmilesSettings=function(){return o.milesSmilesSettings},o.isMilesSmilesActive=function(){return!!o.milesSmilesSettings},o.routings=[],o.paymentGateways=[],o.translations={},o.storefrontJSScripts=[],o.themeStyleScripts=[],o.highPriorityStoreFrontJSScripts=[],o.isEditor=!1,o.observers=[],o}();export{i as IkasStorefrontConfig,o as NAVIGATION_WARNING_SCRIPT_ATTRIBUTE};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-config",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.400",
|
|
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": "^6.1.0-beta.
|
|
20
|
+
"@ikas/storefront-models": "^6.1.0-beta.400",
|
|
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": "^6.1.0-beta.
|
|
30
|
+
"@ikas/storefront-models": "^6.1.0-beta.400"
|
|
31
31
|
}
|
|
32
32
|
}
|